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

40 lines
1.6 KiB
Plaintext

import {useId as $bdb11010cef70236$export$f680877a34711e37} from "./useId.mjs";
/*
* 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 $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
let { id: id, 'aria-label': label, 'aria-labelledby': labelledBy } = props;
// If there is both an aria-label and aria-labelledby,
// combine them by pointing to the element itself.
id = (0, $bdb11010cef70236$export$f680877a34711e37)(id);
if (labelledBy && label) {
let ids = new Set([
id,
...labelledBy.trim().split(/\s+/)
]);
labelledBy = [
...ids
].join(' ');
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(' ');
// If no labels are provided, use the default
if (!label && !labelledBy && defaultLabel) label = defaultLabel;
return {
id: id,
'aria-label': label,
'aria-labelledby': labelledBy
};
}
export {$313b98861ee5dd6c$export$d6875122194c7b44 as useLabels};
//# sourceMappingURL=useLabels.module.js.map