Files
NapCatQQ/.pnpm-store/v3/files/f5/82f9281c0257e5cedcc725fd8867d0a3f9664ca02d4b998ba9a569a20c54afdafdb9ec5b8fd498dbfbd7c96c416eda3383ab6eec8cb6ea4a70d6be5895e5ee
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

68 lines
2.7 KiB
Plaintext

var $a217ebca77471970$exports = require("./utils.main.js");
var $283e5d8830177ead$exports = require("./TabsKeyboardDelegate.main.js");
var $c5HcZ$reactariautils = require("@react-aria/utils");
var $c5HcZ$reactariai18n = require("@react-aria/i18n");
var $c5HcZ$react = require("react");
var $c5HcZ$reactariaselection = require("@react-aria/selection");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useTabList", () => $f2b4a4926440e901$export$773e389e644c5874);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $f2b4a4926440e901$export$773e389e644c5874(props, state, ref) {
let { orientation: orientation = 'horizontal', keyboardActivation: keyboardActivation = 'automatic' } = props;
let { collection: collection, selectionManager: manager, disabledKeys: disabledKeys } = state;
let { direction: direction } = (0, $c5HcZ$reactariai18n.useLocale)();
let delegate = (0, $c5HcZ$react.useMemo)(()=>new (0, $283e5d8830177ead$exports.TabsKeyboardDelegate)(collection, direction, orientation, disabledKeys), [
collection,
disabledKeys,
orientation,
direction
]);
let { collectionProps: collectionProps } = (0, $c5HcZ$reactariaselection.useSelectableCollection)({
ref: ref,
selectionManager: manager,
keyboardDelegate: delegate,
selectOnFocus: keyboardActivation === 'automatic',
disallowEmptySelection: true,
scrollRef: ref,
linkBehavior: 'selection'
});
// Compute base id for all tabs
let tabsId = (0, $c5HcZ$reactariautils.useId)();
(0, $a217ebca77471970$exports.tabsIds).set(state, tabsId);
let tabListLabelProps = (0, $c5HcZ$reactariautils.useLabels)({
...props,
id: tabsId
});
return {
tabListProps: {
...(0, $c5HcZ$reactariautils.mergeProps)(collectionProps, tabListLabelProps),
role: 'tablist',
'aria-orientation': orientation,
tabIndex: undefined
}
};
}
//# sourceMappingURL=useTabList.main.js.map