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

59 lines
2.3 KiB
Plaintext

var $ce7359c25a7dec1c$exports = require("./useLabel.main.js");
var $iujgQ$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useField", () => $50e2f39368b9c636$export$294aa081a6c6f55d);
/*
* Copyright 2021 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 $50e2f39368b9c636$export$294aa081a6c6f55d(props) {
let { description: description, errorMessage: errorMessage, isInvalid: isInvalid, validationState: validationState } = props;
let { labelProps: labelProps, fieldProps: fieldProps } = (0, $ce7359c25a7dec1c$exports.useLabel)(props);
let descriptionId = (0, $iujgQ$reactariautils.useSlotId)([
Boolean(description),
Boolean(errorMessage),
isInvalid,
validationState
]);
let errorMessageId = (0, $iujgQ$reactariautils.useSlotId)([
Boolean(description),
Boolean(errorMessage),
isInvalid,
validationState
]);
fieldProps = (0, $iujgQ$reactariautils.mergeProps)(fieldProps, {
'aria-describedby': [
descriptionId,
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
errorMessageId,
props['aria-describedby']
].filter(Boolean).join(' ') || undefined
});
return {
labelProps: labelProps,
fieldProps: fieldProps,
descriptionProps: {
id: descriptionId
},
errorMessageProps: {
id: errorMessageId
}
};
}
//# sourceMappingURL=useField.main.js.map