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

35 lines
1.3 KiB
Plaintext

import $fkdHx$intlStringsmodulejs from "./intlStrings.module.js";
import {useId as $fkdHx$useId} from "@react-aria/utils";
import {useLocalizedStringFormatter as $fkdHx$useLocalizedStringFormatter} from "@react-aria/i18n";
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $7cb39d07f245a780$export$70e2eed1a92976ad(props, state) {
let { key: key } = props;
let manager = state.selectionManager;
let checkboxId = (0, $fkdHx$useId)();
let isDisabled = !state.selectionManager.canSelectItem(key);
let isSelected = state.selectionManager.isSelected(key);
// Checkbox should always toggle selection, regardless of selectionBehavior.
let onChange = ()=>manager.toggleSelection(key);
const stringFormatter = (0, $fkdHx$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fkdHx$intlStringsmodulejs))), '@react-aria/grid');
return {
checkboxProps: {
id: checkboxId,
'aria-label': stringFormatter.format('select'),
isSelected: isSelected,
isDisabled: isDisabled,
onChange: onChange
}
};
}
export {$7cb39d07f245a780$export$70e2eed1a92976ad as useGridSelectionCheckbox};
//# sourceMappingURL=useGridSelectionCheckbox.module.js.map