@midas-ds/components 10.1.1 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionItem-BGWiWjxA.cjs +1 -0
- package/AccordionItem-ChHpW8EW.js +320 -0
- package/BadgeContainer-DM8TdyMT.js +37 -0
- package/BadgeContainer-I1XA3OCl.cjs +1 -0
- package/Breadcrumbs-CwDUNIqF.js +250 -0
- package/Breadcrumbs-DtjJ1UmU.cjs +1 -0
- package/Button-BoJl6JGM.cjs +1 -0
- package/Button-Csih3v23.js +38 -0
- package/Button-DjBChs7s.js +340 -0
- package/Button-htW9qIsS.cjs +1 -0
- package/Button.module-DEQtBYe5.cjs +1 -0
- package/Button.module-tti8HGxs.js +14 -0
- package/ButtonGroup-DUqW5dzM.cjs +1 -0
- package/ButtonGroup-DvVvear6.js +22 -0
- package/CHANGELOG.md +68 -0
- package/Card-0G0mj9q5.cjs +1 -0
- package/Card-yrtGzt70.js +131 -0
- package/CharacterCounter-BL_nZHya.js +22 -0
- package/CharacterCounter-CHcTDHO-.cjs +1 -0
- package/Checkbox-5HINZdGu.js +263 -0
- package/Checkbox-DqcPg5hz.cjs +1 -0
- package/CheckboxGroup-BBrSMuDY.cjs +1 -0
- package/CheckboxGroup-CLgixk2p.js +243 -0
- package/Collection-BIDsXNhi.cjs +1 -0
- package/Collection-Brgjpkne.js +576 -0
- package/ColorSchemeSwitch-BpzQ7g0b.js +106 -0
- package/ColorSchemeSwitch-C-qWuqkU.cjs +16 -0
- package/ComboBox-CVDyp2a-.js +1379 -0
- package/ComboBox-CWJUg9Xx.cjs +1 -0
- package/DateField-DeDhiYnW.cjs +1 -0
- package/DateField-DhU3q-rG.js +47 -0
- package/DateInputDivider-ADvOavHw.cjs +1 -0
- package/DateInputDivider-CF4xWsMT.js +2904 -0
- package/DateRangePicker-BsAHhy99.cjs +6 -0
- package/DateRangePicker-ziD1_k1W.js +881 -0
- package/Dialog-B8GTYbvu.cjs +1 -0
- package/Dialog-BOrYdX50.cjs +1 -0
- package/Dialog-CXNu48AC.js +208 -0
- package/Dialog-D14MbJ7o.js +1633 -0
- package/DragAndDrop-DNth776R.cjs +1 -0
- package/DragAndDrop-o3ruz_SR.js +60 -0
- package/Dropdown-CJ6My6EI.cjs +6 -0
- package/Dropdown-Df58j43I.js +84 -0
- package/FieldError-CAcjosk_.js +46 -0
- package/FieldError-CKBb2-mp.cjs +1 -0
- package/FileUpload-CxCOtyB9.cjs +2 -0
- package/FileUpload-D6qoEAjn.js +2373 -0
- package/FocusScope-5c9SVBcR.cjs +1 -0
- package/FocusScope-CxkURfoc.js +625 -0
- package/Form-BuOomA4T.cjs +1 -0
- package/Form-CXcEMuBf.js +5 -0
- package/Grid--OhtgCo6.js +27 -0
- package/Grid-DVQtOcu9.cjs +1 -0
- package/GridItem-DlbSdRmB.js +246 -0
- package/GridItem-XgHmZWXY.cjs +1 -0
- package/Group-B6EslsHZ.js +44 -0
- package/Group-CgiqQHH1.cjs +1 -0
- package/Heading-BFtiin0g.js +46 -0
- package/Heading-mHhCbGjY.cjs +1 -0
- package/Hidden-BxRZGdEW.cjs +1 -0
- package/Hidden-C9KWUR7b.js +34 -0
- package/InfoBanner-BLM-TJJ6.js +83 -0
- package/InfoBanner-C2kTIsrB.cjs +1 -0
- package/Input-BTzwcf72.js +41 -0
- package/Input-DKSAYvsw.cjs +1 -0
- package/Label-7Ybb99CE.cjs +1 -0
- package/Label-BwJrdqEE.js +70 -0
- package/Layout-1g6bMH62.cjs +16 -0
- package/Layout-Ey8flY7E.js +468 -0
- package/Link-B88l_oaE.cjs +6 -0
- package/Link-BQhauBuw.cjs +1 -0
- package/Link-DX5BbBnn.js +59 -0
- package/Link-yNO2-sqx.js +71 -0
- package/LinkButton-CBpGLETx.cjs +6 -0
- package/LinkButton-o6uS1XsR.js +69 -0
- package/ListBox-DP9M4H6R.cjs +1 -0
- package/ListBox-GnVK_Pdq.js +529 -0
- package/ListBoxButton-DPBrtXyv.cjs +1 -0
- package/ListBoxButton-D_J3jlP0.js +15 -0
- package/ListBoxSection-BGaigBnG.cjs +1 -0
- package/ListBoxSection-C0BGnpB4.js +1058 -0
- package/ListKeyboardDelegate-DNI8GQtX.js +167 -0
- package/ListKeyboardDelegate-DTg9h4v6.cjs +1 -0
- package/Logo-BIrOEINM.js +133 -0
- package/Logo-DT2_2O43.cjs +1 -0
- package/OverlayArrow-CDLXPTew.js +506 -0
- package/OverlayArrow-D75k-EMl.cjs +1 -0
- package/Popover-BGGXeD54.js +38 -0
- package/Popover-CqNWzPf-.cjs +1 -0
- package/ProgressBar-DMSg-Prr.js +53 -0
- package/ProgressBar-Jbg28j2a.cjs +1 -0
- package/RSPContexts-BW2SEIqe.js +11 -0
- package/RSPContexts-D8hmBfGm.cjs +1 -0
- package/Radio-BwqrdhQE.cjs +1 -0
- package/Radio-Cz29wPXd.js +311 -0
- package/RangeCalendar-BehUaydF.cjs +11 -0
- package/RangeCalendar-RAlAHlNL.js +1683 -0
- package/SearchField-CxMwDeUM.cjs +6 -0
- package/SearchField-IlvZ3Kh6.js +362 -0
- package/Select-2q1iSzAX.cjs +1 -0
- package/Select-BVQZtoi9.js +646 -0
- package/SelectionManager-B4ORduja.js +1032 -0
- package/SelectionManager-CwYux2h3.cjs +1 -0
- package/Separator-Cu9fYKUM.js +59 -0
- package/Separator-DECIYLtZ.cjs +1 -0
- package/Skeleton-BAwbfKBW.cjs +1 -0
- package/Skeleton-BePDRmrO.js +40 -0
- package/Spinner-D31SXm-U.js +41 -0
- package/Spinner-P35rvvsl.cjs +6 -0
- package/Table-B40CGLT-.cjs +16 -0
- package/Table-F4oYBtUM.js +2447 -0
- package/Tabs-B4oZJkZG.js +404 -0
- package/Tabs-DA2qXhzb.cjs +1 -0
- package/Tag-DPAGmcMK.cjs +1 -0
- package/Tag-Du7GvSv2.js +745 -0
- package/Text-3MNwRMpI.cjs +1 -0
- package/Text-B2K-BJKQ.cjs +1 -0
- package/Text-BoXuUVVH.js +15 -0
- package/Text-jWWg0B20.js +32 -0
- package/TextArea-C7JZ_pQd.cjs +1 -0
- package/TextArea-XeBCSyzl.js +191 -0
- package/TextField-BgNdhZi_.cjs +1 -0
- package/TextField-C-hTPukq.js +119 -0
- package/TextField.module-BcpPBWnD.js +13 -0
- package/TextField.module-Dw5Rtn9y.cjs +1 -0
- package/Toast-AbDA1BOs.cjs +1 -0
- package/Toast-Btg21Xge.js +989 -0
- package/ToggleButtonGroup-B5yz1tm2.js +210 -0
- package/ToggleButtonGroup-BFDoj0P6.cjs +1 -0
- package/Tooltip-CMLs7WMw.js +283 -0
- package/Tooltip-DeBuBKhS.cjs +1 -0
- package/VisuallyHidden-CLWHbz2n.cjs +1 -0
- package/VisuallyHidden-ZCYf65q4.js +40 -0
- package/accordion/index.cjs +1 -0
- package/accordion/index.js +5 -0
- package/arrow-right-Dg8sttFO.js +14 -0
- package/arrow-right-QJ2gXPKQ.cjs +6 -0
- package/assets/AccordionItem.css +1 -0
- package/assets/BadgeContainer.css +1 -0
- package/assets/Breadcrumbs.css +1 -0
- package/assets/Button.css +1 -0
- package/assets/ButtonGroup.css +1 -0
- package/assets/Card.css +1 -0
- package/assets/CharacterCounter.css +1 -0
- package/assets/Checkbox.css +1 -0
- package/assets/ColorSchemeSwitch.css +1 -0
- package/assets/ComboBox.css +1 -0
- package/assets/DateField.css +1 -0
- package/assets/DateInputDivider.css +1 -0
- package/assets/DateRangePicker.css +1 -0
- package/assets/Dialog.css +1 -0
- package/assets/Dropdown.css +1 -0
- package/assets/FieldError.css +1 -0
- package/assets/FileUpload.css +1 -0
- package/assets/GridItem.css +1 -0
- package/assets/Heading.css +1 -0
- package/assets/InfoBanner.css +1 -0
- package/assets/Label.css +1 -0
- package/assets/Layout.css +1 -0
- package/assets/Link.css +1 -0
- package/assets/LinkButton.css +1 -0
- package/assets/ListBoxSection.css +1 -0
- package/assets/Logo.css +1 -0
- package/assets/Popover.css +1 -0
- package/assets/ProgressBar.css +1 -0
- package/assets/Radio.css +1 -0
- package/assets/RangeCalendar.css +1 -0
- package/assets/SearchField.css +1 -0
- package/assets/Select.css +1 -0
- package/assets/Skeleton.css +1 -0
- package/assets/Spinner.css +1 -0
- package/assets/Table.css +1 -0
- package/assets/Tabs.css +1 -0
- package/assets/Tag.css +1 -0
- package/assets/Text.css +1 -0
- package/assets/TextField.css +1 -0
- package/assets/Toast.css +1 -0
- package/assets/ToggleButtonGroup.css +1 -0
- package/assets/Tooltip.css +1 -0
- package/badge/index.cjs +1 -0
- package/badge/index.js +5 -0
- package/breadcrumbs/index.cjs +1 -0
- package/breadcrumbs/index.js +4 -0
- package/button/index.cjs +1 -0
- package/button/index.js +6 -0
- package/calendar/CalendarHeader.d.ts +2 -1
- package/calendar/index.cjs +1 -0
- package/calendar/index.js +5 -0
- package/card/index.cjs +1 -0
- package/card/index.js +10 -0
- package/character-counter/index.cjs +1 -0
- package/character-counter/index.js +4 -0
- package/check-CLF6Yxza.js +11 -0
- package/check-D_KoootC.cjs +6 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/CheckboxGroup.d.ts +8 -8
- package/checkbox/CheckboxGroupFieldError.d.ts +8 -0
- package/checkbox/CheckboxGroupItem.d.ts +3 -0
- package/checkbox/CheckboxInner.d.ts +2 -0
- package/checkbox/SingleCheckbox.d.ts +3 -0
- package/checkbox/context.d.ts +3 -0
- package/checkbox/index.cjs +1 -0
- package/checkbox/index.d.ts +2 -1
- package/checkbox/index.js +6 -0
- package/checkbox/intl/translations.json.d.ts +35 -0
- package/checkbox/types.d.ts +14 -0
- package/checkbox/useSelectAll.d.ts +7 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-down-jl83cllc.cjs +6 -0
- package/circle-check-B9HYcH7Z.js +26 -0
- package/circle-check-BGo8gML8.cjs +11 -0
- package/clsx-C11secjj.cjs +1 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/color-scheme-switch/index.cjs +1 -0
- package/color-scheme-switch/index.js +4 -0
- package/combobox/ComboBox.d.ts +3 -1
- package/combobox/index.cjs +1 -0
- package/combobox/index.js +7 -0
- package/common/types.d.ts +2 -0
- package/context-C81gPYvC.js +80 -0
- package/context-DjwhtgxQ.cjs +1 -0
- package/createLucideIcon-Cg_wkoIA.cjs +21 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-field/DateField.d.ts +3 -0
- package/date-field/index.cjs +1 -0
- package/date-field/index.js +8 -0
- package/date-picker/DatePicker.d.ts +3 -0
- package/date-picker/DateRangePicker.d.ts +3 -0
- package/date-picker/index.cjs +1 -0
- package/date-picker/index.js +5 -0
- package/dropdown/index.cjs +1 -0
- package/dropdown/index.js +5 -0
- package/field-error/FieldError.d.ts +4 -1
- package/field-error/index.cjs +1 -0
- package/field-error/index.js +4 -0
- package/file-upload/FileUpload.d.ts +3 -0
- package/file-upload/index.cjs +1 -0
- package/file-upload/index.js +4 -0
- package/filterDOMProps-BS2lrgFA.cjs +1 -0
- package/filterDOMProps-D6KHYVBX.js +24 -0
- package/getScrollParent-BhFcYrwL.js +9 -0
- package/getScrollParent-DDJu9WHU.cjs +1 -0
- package/grid/Grid.d.ts +15 -4
- package/grid/GridItem.d.ts +31 -2
- package/grid/index.cjs +1 -0
- package/grid/index.d.ts +2 -2
- package/grid/index.js +8 -0
- package/heading/index.cjs +1 -0
- package/heading/index.js +4 -0
- package/index-CGRFP4CC.js +120 -0
- package/index-Dsz3aiWt.cjs +17 -0
- package/index.cjs +1 -169
- package/index.d.ts +1 -1
- package/index.js +129 -29979
- package/inertValue-B3AFhVG4.cjs +1 -0
- package/inertValue-B7loUihk.js +8 -0
- package/info-BZwphdye.js +15 -0
- package/info-CIEIENo6.cjs +6 -0
- package/info-banner/index.cjs +1 -0
- package/info-banner/index.js +4 -0
- package/label/InfoPopover.d.ts +9 -0
- package/label/LabelWrapper.d.ts +11 -0
- package/label/index.cjs +1 -0
- package/label/index.d.ts +1 -0
- package/label/index.js +4 -0
- package/layout/index.cjs +1 -0
- package/layout/index.js +8 -0
- package/link/index.cjs +1 -0
- package/link/index.js +6 -0
- package/link-button/index.cjs +1 -0
- package/link-button/index.js +6 -0
- package/list-box/index.cjs +1 -0
- package/list-box/index.js +9 -0
- package/logo/index.cjs +1 -0
- package/logo/index.js +4 -0
- package/modal/index.cjs +1 -0
- package/modal/index.js +6 -0
- package/number-BE8InLgI.js +6 -0
- package/number-E0x3H9cL.cjs +1 -0
- package/package.json +4 -4
- package/popover/Popover.d.ts +7 -0
- package/popover/index.cjs +1 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.js +4 -0
- package/progress-bar/index.cjs +1 -0
- package/progress-bar/index.js +4 -0
- package/radio/Radio.d.ts +3 -0
- package/radio/index.cjs +1 -0
- package/radio/index.js +5 -0
- package/scrollIntoView-C8doLzDd.cjs +1 -0
- package/scrollIntoView-Hwb_aaNf.js +87 -0
- package/search-field/index.cjs +1 -0
- package/search-field/index.js +4 -0
- package/select/index.cjs +1 -0
- package/select/index.js +4 -0
- package/skeleton/Skeleton.d.ts +5 -0
- package/skeleton/index.cjs +1 -0
- package/skeleton/index.js +4 -0
- package/spinner/index.cjs +1 -0
- package/spinner/index.js +4 -0
- package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
- package/square-arrow-out-up-right-V4Gd08uI.cjs +6 -0
- package/table/Table.d.ts +7 -1
- package/table/index.cjs +1 -0
- package/table/index.js +9 -0
- package/tabs/index.cjs +1 -0
- package/tabs/index.js +4 -0
- package/tag/index.cjs +1 -0
- package/tag/index.js +5 -0
- package/text/index.cjs +1 -0
- package/text/index.js +4 -0
- package/textfield/TextFieldBase.d.ts +2 -0
- package/textfield/index.cjs +1 -0
- package/textfield/index.js +7 -0
- package/theme/index.cjs +1 -0
- package/theme/index.d.ts +4 -0
- package/{theme.js → theme/index.js} +2 -2
- package/theme/tokens.d.ts +10 -0
- package/toast/index.cjs +1 -0
- package/toast/index.js +9 -0
- package/toggle-button/index.cjs +1 -0
- package/toggle-button/index.js +5 -0
- package/tokens-p6pg1Cea.cjs +1 -0
- package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
- package/tooltip/index.cjs +1 -0
- package/tooltip/index.js +5 -0
- package/triangle-alert-DJW8U7jL.cjs +6 -0
- package/triangle-alert-wxyxspAl.js +21 -0
- package/useButton-B8dB9sot.js +47 -0
- package/useButton-cpNi-fY4.cjs +1 -0
- package/useControlledState-D0L6S_5r.cjs +1 -0
- package/useControlledState-u436Wbp1.js +30 -0
- package/useDateFormatter-CnxoJ4jF.cjs +1 -0
- package/useDateFormatter-EHm4auIg.js +1571 -0
- package/useEvent-DxBxMX2V.cjs +1 -0
- package/useEvent-IsD2Awnh.js +21 -0
- package/useField-CXKYU74k.cjs +1 -0
- package/useField-DvpGZkw_.js +35 -0
- package/useFilter-BTgDWHVx.cjs +1 -0
- package/useFilter-CUq74PQ2.js +35 -0
- package/useFocusRing-CbImDrwF.cjs +1 -0
- package/useFocusRing-XnR3cZjO.js +82 -0
- package/useFocusable-C8uh8K4g.js +125 -0
- package/useFocusable-NUVSFcRC.cjs +1 -0
- package/useFormValidation-BIGzfO9h.js +215 -0
- package/useFormValidation-ClximP89.cjs +1 -0
- package/useHasTabbableChild-C-1mZUQe.js +34 -0
- package/useHasTabbableChild-DCBTulUQ.cjs +1 -0
- package/useHighlightSelectionDescription-CnBDT86u.js +567 -0
- package/useHighlightSelectionDescription-CzYucm61.cjs +1 -0
- package/useHover-DjIHtjGN.js +490 -0
- package/useHover-_mv5J4_q.cjs +1 -0
- package/useLabels-BDwkBYbE.js +17 -0
- package/useLabels-BLOfc6Y-.cjs +1 -0
- package/useListState-Bx8u4IFG.cjs +1 -0
- package/useListState-CrZFZffI.js +132 -0
- package/useLocalizedStringFormatter-BKoxGZf1.js +96 -0
- package/useLocalizedStringFormatter-BsxLt89S.cjs +1 -0
- package/useLocalizedStringFormatter-D3JQyjb4.js +21 -0
- package/useLocalizedStringFormatter-ioacM-Yt.cjs +1 -0
- package/useObserveElement-BdI4zgd7.js +27 -0
- package/useObserveElement-MhzEsCkX.cjs +1 -0
- package/usePress-0AjDbW9R.cjs +7 -0
- package/usePress-CNjmDzap.js +542 -0
- package/useSingleSelectListState-0AGHxvy3.js +34 -0
- package/useSingleSelectListState-Cl3KV5E1.cjs +1 -0
- package/useTextField--czJtyNd.cjs +1 -0
- package/useTextField-Cw-33OP_.js +86 -0
- package/useToggleState-Bz5rAf4C.js +18 -0
- package/useToggleState-DoIkSQdj.cjs +1 -0
- package/useUpdateEffect-C5YQs_1w.cjs +1 -0
- package/useUpdateEffect-CCDx8D4X.js +13 -0
- package/utils-BNtZbAib.cjs +1 -0
- package/utils-DIMfEPAt.js +308 -0
- package/x-H8Zrx8-x.cjs +6 -0
- package/x-JK7i-TQC.js +14 -0
- package/flex/Flex.d.ts +0 -17
- package/flex/FlexItem.d.ts +0 -15
- package/flex/index.d.ts +0 -2
- package/index.css +0 -1
- package/theme.cjs +0 -1
- package/tokens-COoF1t17.cjs +0 -1
- /package/{global.css → assets/global.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./utils-BNtZbAib.cjs"),$=require("react");function i(e,t,a,r){let c=u.$8ae05eaa5c114e9c$export$7f54fc3180508a52(a),f=a==null;$.useEffect(()=>{if(f||!e.current)return;let n=e.current;return n.addEventListener(t,c,r),()=>{n.removeEventListener(t,c,r)}},[e,t,r,f,c])}exports.$e9faafb641e167db$export$90fc3a17d93f704c=i;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { f as l } from "./utils-DIMfEPAt.js";
|
|
2
|
+
import { useEffect as u } from "react";
|
|
3
|
+
function m(e, t, f, r) {
|
|
4
|
+
let a = l(f), c = f == null;
|
|
5
|
+
u(() => {
|
|
6
|
+
if (c || !e.current) return;
|
|
7
|
+
let n = e.current;
|
|
8
|
+
return n.addEventListener(t, a, r), () => {
|
|
9
|
+
n.removeEventListener(t, a, r);
|
|
10
|
+
};
|
|
11
|
+
}, [
|
|
12
|
+
e,
|
|
13
|
+
t,
|
|
14
|
+
r,
|
|
15
|
+
c,
|
|
16
|
+
a
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
m as $
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./Button-htW9qIsS.cjs"),r=require("./utils-BNtZbAib.cjs");function b(e){let{description:o,errorMessage:i,isInvalid:d,validationState:t}=e,{labelProps:l,fieldProps:a}=n.$d191a55c9702f145$export$8467354a121f1b9f(e),s=r.$bdb11010cef70236$export$b4cc09c592e8fdb8([!!o,!!i,d,t]),c=r.$bdb11010cef70236$export$b4cc09c592e8fdb8([!!o,!!i,d,t]);return a=r.$3ef42575df84b30b$export$9d1611c77c2fe928(a,{"aria-describedby":[s,c,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:l,fieldProps:a,descriptionProps:{id:s},errorMessageProps:{id:c}}}exports.$2baaea4c71418dea$export$294aa081a6c6f55d=b;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { a as c } from "./Button-DjBChs7s.js";
|
|
2
|
+
import { d as l, c as f } from "./utils-DIMfEPAt.js";
|
|
3
|
+
function $(e) {
|
|
4
|
+
let { description: r, errorMessage: o, isInvalid: i, validationState: d } = e, { labelProps: n, fieldProps: a } = c(e), s = l([
|
|
5
|
+
!!r,
|
|
6
|
+
!!o,
|
|
7
|
+
i,
|
|
8
|
+
d
|
|
9
|
+
]), t = l([
|
|
10
|
+
!!r,
|
|
11
|
+
!!o,
|
|
12
|
+
i,
|
|
13
|
+
d
|
|
14
|
+
]);
|
|
15
|
+
return a = f(a, {
|
|
16
|
+
"aria-describedby": [
|
|
17
|
+
s,
|
|
18
|
+
// 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
|
|
19
|
+
t,
|
|
20
|
+
e["aria-describedby"]
|
|
21
|
+
].filter(Boolean).join(" ") || void 0
|
|
22
|
+
}), {
|
|
23
|
+
labelProps: n,
|
|
24
|
+
fieldProps: a,
|
|
25
|
+
descriptionProps: {
|
|
26
|
+
id: s
|
|
27
|
+
},
|
|
28
|
+
errorMessageProps: {
|
|
29
|
+
id: t
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
$
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./ListKeyboardDelegate-DTg9h4v6.cjs"),c=require("react");function C(h){let l=u.$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",...h}),r=c.useCallback((a,e)=>e.length===0?!0:(a=a.normalize("NFC"),e=e.normalize("NFC"),l.compare(a.slice(0,e.length),e)===0),[l]),o=c.useCallback((a,e)=>e.length===0?!0:(a=a.normalize("NFC"),e=e.normalize("NFC"),l.compare(a.slice(-e.length),e)===0),[l]),f=c.useCallback((a,e)=>{if(e.length===0)return!0;a=a.normalize("NFC"),e=e.normalize("NFC");let t=0,n=e.length;for(;t+n<=a.length;t++){let m=a.slice(t,t+n);if(l.compare(e,m)===0)return!0}return!1},[l]);return c.useMemo(()=>({startsWith:r,endsWith:o,contains:f}),[r,o,f])}exports.$bb77f239b46e8c72$export$3274cf84b703fff=C;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { $ as p } from "./ListKeyboardDelegate-DNI8GQtX.js";
|
|
2
|
+
import { useCallback as o, useMemo as $ } from "react";
|
|
3
|
+
function F(h) {
|
|
4
|
+
let l = p({
|
|
5
|
+
usage: "search",
|
|
6
|
+
...h
|
|
7
|
+
}), r = o((a, e) => e.length === 0 ? !0 : (a = a.normalize("NFC"), e = e.normalize("NFC"), l.compare(a.slice(0, e.length), e) === 0), [
|
|
8
|
+
l
|
|
9
|
+
]), c = o((a, e) => e.length === 0 ? !0 : (a = a.normalize("NFC"), e = e.normalize("NFC"), l.compare(a.slice(-e.length), e) === 0), [
|
|
10
|
+
l
|
|
11
|
+
]), f = o((a, e) => {
|
|
12
|
+
if (e.length === 0) return !0;
|
|
13
|
+
a = a.normalize("NFC"), e = e.normalize("NFC");
|
|
14
|
+
let t = 0, m = e.length;
|
|
15
|
+
for (; t + m <= a.length; t++) {
|
|
16
|
+
let n = a.slice(t, t + m);
|
|
17
|
+
if (l.compare(e, n) === 0) return !0;
|
|
18
|
+
}
|
|
19
|
+
return !1;
|
|
20
|
+
}, [
|
|
21
|
+
l
|
|
22
|
+
]);
|
|
23
|
+
return $(() => ({
|
|
24
|
+
startsWith: r,
|
|
25
|
+
endsWith: c,
|
|
26
|
+
contains: f
|
|
27
|
+
}), [
|
|
28
|
+
r,
|
|
29
|
+
c,
|
|
30
|
+
f
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
F as $
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./useHover-_mv5J4_q.cjs"),c=require("react");function g($){let{isDisabled:F,onBlurWithin:a,onFocusWithin:r,onFocusWithinChange:t}=$,i=c.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=s.$03deb23ff14920c4$export$4eaf04e54aa8eed6(),o=c.useCallback(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,d(),a&&a(e),t&&t(!1))},[a,t,i,d]),n=s.$8a9cb279dc87e130$export$715c682d09d639cc(o),b=c.useCallback(e=>{if(!e.currentTarget.contains(e.target))return;const f=s.$431fbd86ca7dc216$export$b204af158042fbac(e.target),u=s.$d4ee10de306f2510$export$cd4e5573fbe2b576(f);if(!i.current.isFocusWithin&&u===s.$d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)){r&&r(e),t&&t(!0),i.current.isFocusWithin=!0,n(e);let p=e.currentTarget;l(f,"focus",h=>{if(i.current.isFocusWithin&&!s.$d4ee10de306f2510$export$4282f70798064fe0(p,h.target)){let x=new f.defaultView.FocusEvent("blur",{relatedTarget:h.target});s.$8a9cb279dc87e130$export$c2b7abe5d61ec696(x,p);let W=s.$8a9cb279dc87e130$export$525bc4921d56d4a(x);o(W)}},{capture:!0})}},[r,t,n,l,o]);return F?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:o}}}function v($={}){let{autoFocus:F=!1,isTextInput:a,within:r}=$,t=c.useRef({isFocused:!1,isFocusVisible:F||s.$507fabe10e71c6fb$export$b9b3dfddab17db27()}),[i,l]=c.useState(!1),[d,o]=c.useState(()=>t.current.isFocused&&t.current.isFocusVisible),n=c.useCallback(()=>o(t.current.isFocused&&t.current.isFocusVisible),[]),b=c.useCallback(u=>{t.current.isFocused=u,l(u),n()},[n]);s.$507fabe10e71c6fb$export$ec71b4b83ac08ec3(u=>{t.current.isFocusVisible=u,n()},[],{isTextInput:a});let{focusProps:e}=s.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({isDisabled:r,onFocusChange:b}),{focusWithinProps:f}=g({isDisabled:!r,onFocusWithinChange:b});return{isFocused:i,isFocusVisible:d,focusProps:r?f:e}}exports.$9ab94262bd0047c7$export$420e68273165f4ec=g;exports.$f7dceffc5ad7768b$export$4e328f61c538687f=v;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { b as T, c as v, d as m, e as V, f as P, g as C, h as w, i as B, j as D, k as E, l as G } from "./useHover-DjIHtjGN.js";
|
|
2
|
+
import { useRef as x, useCallback as d, useState as g } from "react";
|
|
3
|
+
function L(b) {
|
|
4
|
+
let { isDisabled: $, onBlurWithin: n, onFocusWithin: i, onFocusWithinChange: t } = b, s = x({
|
|
5
|
+
isFocusWithin: !1
|
|
6
|
+
}), { addGlobalListener: a, removeAllGlobalListeners: f } = T(), o = d((e) => {
|
|
7
|
+
e.currentTarget.contains(e.target) && s.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget) && (s.current.isFocusWithin = !1, f(), n && n(e), t && t(!1));
|
|
8
|
+
}, [
|
|
9
|
+
n,
|
|
10
|
+
t,
|
|
11
|
+
s,
|
|
12
|
+
f
|
|
13
|
+
]), r = v(o), l = d((e) => {
|
|
14
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
15
|
+
const u = m(e.target), c = V(u);
|
|
16
|
+
if (!s.current.isFocusWithin && c === P(e.nativeEvent)) {
|
|
17
|
+
i && i(e), t && t(!0), s.current.isFocusWithin = !0, r(e);
|
|
18
|
+
let F = e.currentTarget;
|
|
19
|
+
a(u, "focus", (p) => {
|
|
20
|
+
if (s.current.isFocusWithin && !C(F, p.target)) {
|
|
21
|
+
let h = new u.defaultView.FocusEvent("blur", {
|
|
22
|
+
relatedTarget: p.target
|
|
23
|
+
});
|
|
24
|
+
w(h, F);
|
|
25
|
+
let W = B(h);
|
|
26
|
+
o(W);
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
capture: !0
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}, [
|
|
33
|
+
i,
|
|
34
|
+
t,
|
|
35
|
+
r,
|
|
36
|
+
a,
|
|
37
|
+
o
|
|
38
|
+
]);
|
|
39
|
+
return $ ? {
|
|
40
|
+
focusWithinProps: {
|
|
41
|
+
// These cannot be null, that would conflict in mergeProps
|
|
42
|
+
onFocus: void 0,
|
|
43
|
+
onBlur: void 0
|
|
44
|
+
}
|
|
45
|
+
} : {
|
|
46
|
+
focusWithinProps: {
|
|
47
|
+
onFocus: l,
|
|
48
|
+
onBlur: o
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function k(b = {}) {
|
|
53
|
+
let { autoFocus: $ = !1, isTextInput: n, within: i } = b, t = x({
|
|
54
|
+
isFocused: !1,
|
|
55
|
+
isFocusVisible: $ || D()
|
|
56
|
+
}), [s, a] = g(!1), [f, o] = g(() => t.current.isFocused && t.current.isFocusVisible), r = d(() => o(t.current.isFocused && t.current.isFocusVisible), []), l = d((c) => {
|
|
57
|
+
t.current.isFocused = c, a(c), r();
|
|
58
|
+
}, [
|
|
59
|
+
r
|
|
60
|
+
]);
|
|
61
|
+
E((c) => {
|
|
62
|
+
t.current.isFocusVisible = c, r();
|
|
63
|
+
}, [], {
|
|
64
|
+
isTextInput: n
|
|
65
|
+
});
|
|
66
|
+
let { focusProps: e } = G({
|
|
67
|
+
isDisabled: i,
|
|
68
|
+
onFocusChange: l
|
|
69
|
+
}), { focusWithinProps: u } = L({
|
|
70
|
+
isDisabled: !i,
|
|
71
|
+
onFocusWithinChange: l
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
isFocused: s,
|
|
75
|
+
isFocusVisible: f,
|
|
76
|
+
focusProps: i ? u : e
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
k as $,
|
|
81
|
+
L as a
|
|
82
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { d as P, e as b, r as m, v as l, l as g } from "./useHover-DjIHtjGN.js";
|
|
2
|
+
import { $ as y, l as E, c as $ } from "./utils-DIMfEPAt.js";
|
|
3
|
+
import d, { useRef as D, useEffect as w, useContext as h } from "react";
|
|
4
|
+
let a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
5
|
+
function p() {
|
|
6
|
+
if (typeof window > "u") return;
|
|
7
|
+
function e(t) {
|
|
8
|
+
return "propertyName" in t;
|
|
9
|
+
}
|
|
10
|
+
let r = (t) => {
|
|
11
|
+
if (!e(t) || !t.target) return;
|
|
12
|
+
let o = a.get(t.target);
|
|
13
|
+
o || (o = /* @__PURE__ */ new Set(), a.set(t.target, o), t.target.addEventListener("transitioncancel", n, {
|
|
14
|
+
once: !0
|
|
15
|
+
})), o.add(t.propertyName);
|
|
16
|
+
}, n = (t) => {
|
|
17
|
+
if (!e(t) || !t.target) return;
|
|
18
|
+
let o = a.get(t.target);
|
|
19
|
+
if (o && (o.delete(t.propertyName), o.size === 0 && (t.target.removeEventListener("transitioncancel", n), a.delete(t.target)), a.size === 0)) {
|
|
20
|
+
for (let f of c) f();
|
|
21
|
+
c.clear();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
document.body.addEventListener("transitionrun", r), document.body.addEventListener("transitionend", n);
|
|
25
|
+
}
|
|
26
|
+
typeof document < "u" && (document.readyState !== "loading" ? p() : document.addEventListener("DOMContentLoaded", p));
|
|
27
|
+
function C() {
|
|
28
|
+
for (const [e] of a)
|
|
29
|
+
"isConnected" in e && !e.isConnected && a.delete(e);
|
|
30
|
+
}
|
|
31
|
+
function F(e) {
|
|
32
|
+
requestAnimationFrame(() => {
|
|
33
|
+
C(), a.size === 0 ? e() : c.add(e);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function S(e, r) {
|
|
37
|
+
y(() => {
|
|
38
|
+
if (e && e.ref && r)
|
|
39
|
+
return e.ref.current = r.current, () => {
|
|
40
|
+
e.ref && (e.ref.current = null);
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function L(e) {
|
|
45
|
+
const r = P(e), n = b(r);
|
|
46
|
+
if (m() === "virtual") {
|
|
47
|
+
let t = n;
|
|
48
|
+
F(() => {
|
|
49
|
+
b(r) === t && e.isConnected && l(e);
|
|
50
|
+
});
|
|
51
|
+
} else l(e);
|
|
52
|
+
}
|
|
53
|
+
function v(e) {
|
|
54
|
+
if (!e) return;
|
|
55
|
+
let r = !0;
|
|
56
|
+
return (n) => {
|
|
57
|
+
let t = {
|
|
58
|
+
...n,
|
|
59
|
+
preventDefault() {
|
|
60
|
+
n.preventDefault();
|
|
61
|
+
},
|
|
62
|
+
isDefaultPrevented() {
|
|
63
|
+
return n.isDefaultPrevented();
|
|
64
|
+
},
|
|
65
|
+
stopPropagation() {
|
|
66
|
+
r && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : r = !0;
|
|
67
|
+
},
|
|
68
|
+
continuePropagation() {
|
|
69
|
+
r = !1;
|
|
70
|
+
},
|
|
71
|
+
isPropagationStopped() {
|
|
72
|
+
return r;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
e(t), r && n.stopPropagation();
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function N(e) {
|
|
79
|
+
return {
|
|
80
|
+
keyboardProps: e.isDisabled ? {} : {
|
|
81
|
+
onKeyDown: v(e.onKeyDown),
|
|
82
|
+
onKeyUp: v(e.onKeyUp)
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
let x = /* @__PURE__ */ d.createContext(null);
|
|
87
|
+
function T(e) {
|
|
88
|
+
let r = h(x) || {};
|
|
89
|
+
S(r, e);
|
|
90
|
+
let { ref: n, ...t } = r;
|
|
91
|
+
return t;
|
|
92
|
+
}
|
|
93
|
+
const z = /* @__PURE__ */ d.forwardRef(function(r, n) {
|
|
94
|
+
let { children: t, ...o } = r, f = E(n), i = {
|
|
95
|
+
...o,
|
|
96
|
+
ref: f
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ d.createElement(x.Provider, {
|
|
99
|
+
value: i
|
|
100
|
+
}, t);
|
|
101
|
+
});
|
|
102
|
+
function O(e, r) {
|
|
103
|
+
let { focusProps: n } = g(e), { keyboardProps: t } = N(e), o = $(n, t), f = T(r), i = e.isDisabled ? {} : f, s = D(e.autoFocus);
|
|
104
|
+
w(() => {
|
|
105
|
+
s.current && r.current && L(r.current), s.current = !1;
|
|
106
|
+
}, [
|
|
107
|
+
r
|
|
108
|
+
]);
|
|
109
|
+
let u = e.excludeFromTabOrder ? -1 : 0;
|
|
110
|
+
return e.isDisabled && (u = void 0), {
|
|
111
|
+
focusableProps: $({
|
|
112
|
+
...o,
|
|
113
|
+
tabIndex: u
|
|
114
|
+
}, i)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
O as $,
|
|
119
|
+
L as a,
|
|
120
|
+
x as b,
|
|
121
|
+
z as c,
|
|
122
|
+
F as d,
|
|
123
|
+
S as e,
|
|
124
|
+
N as f
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./useHover-_mv5J4_q.cjs"),i=require("./utils-BNtZbAib.cjs"),c=require("react");let f=new Map,b=new Set;function p(){if(typeof window>"u")return;function e(t){return"propertyName"in t}let r=t=>{if(!e(t)||!t.target)return;let o=f.get(t.target);o||(o=new Set,f.set(t.target,o),t.target.addEventListener("transitioncancel",n,{once:!0})),o.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let o=f.get(t.target);if(o&&(o.delete(t.propertyName),o.size===0&&(t.target.removeEventListener("transitioncancel",n),f.delete(t.target)),f.size===0)){for(let d of b)d();b.clear()}};document.body.addEventListener("transitionrun",r),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?p():document.addEventListener("DOMContentLoaded",p));function E(){for(const[e]of f)"isConnected"in e&&!e.isConnected&&f.delete(e)}function x(e){requestAnimationFrame(()=>{E(),f.size===0?e():b.add(e)})}function P(e,r){i.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(e&&e.ref&&r)return e.ref.current=r.current,()=>{e.ref&&(e.ref.current=null)}})}function g(e){const r=a.$431fbd86ca7dc216$export$b204af158042fbac(e),n=a.$d4ee10de306f2510$export$cd4e5573fbe2b576(r);if(a.$507fabe10e71c6fb$export$630ff653c5ada6a9()==="virtual"){let t=n;x(()=>{a.$d4ee10de306f2510$export$cd4e5573fbe2b576(r)===t&&e.isConnected&&a.$7215afc6de606d6b$export$de79e2c695e052f3(e)})}else a.$7215afc6de606d6b$export$de79e2c695e052f3(e)}function v(e){if(!e)return;let r=!0;return n=>{let t={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){r&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):r=!0},continuePropagation(){r=!1},isPropagationStopped(){return r}};e(t),r&&n.stopPropagation()}}function y(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:v(e.onKeyDown),onKeyUp:v(e.onKeyUp)}}}let u=c.createContext(null);function m(e){let r=c.useContext(u)||{};P(r,e);let{ref:n,...t}=r;return t}const D=c.forwardRef(function(r,n){let{children:t,...o}=r,d=i.$df56164dff5785e2$export$4338b53315abf666(n),$={...o,ref:d};return c.createElement(u.Provider,{value:$},t)});function w(e,r){let{focusProps:n}=a.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6(e),{keyboardProps:t}=y(e),o=i.$3ef42575df84b30b$export$9d1611c77c2fe928(n,t),d=m(r),$=e.isDisabled?{}:d,s=c.useRef(e.autoFocus);c.useEffect(()=>{s.current&&r.current&&g(r.current),s.current=!1},[r]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:i.$3ef42575df84b30b$export$9d1611c77c2fe928({...o,tabIndex:l},$)}}exports.$3ad3f6e1647bc98d$export$80f3e147d781571c=g;exports.$46d819fcbaf35654$export$8f71654801c2f7cd=y;exports.$bbed8b41f857bcc0$export$24490316f764c430=x;exports.$e7801be82b4b2a53$export$4debdb1a3f0fa79e=P;exports.$f645667febf57a63$export$13f3202a3e5ddd5=D;exports.$f645667febf57a63$export$4c014de7c8940b4c=w;exports.$f645667febf57a63$export$f9762fab77588ecb=u;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { f as V, $ as j } from "./utils-DIMfEPAt.js";
|
|
2
|
+
import { useRef as M, useEffect as S, useMemo as h, useContext as F, createContext as Q, useState as $ } from "react";
|
|
3
|
+
import { s as _ } from "./useHover-DjIHtjGN.js";
|
|
4
|
+
function X(a, e, i) {
|
|
5
|
+
let t = M(e), n = V(() => {
|
|
6
|
+
i && i(t.current);
|
|
7
|
+
});
|
|
8
|
+
S(() => {
|
|
9
|
+
var r;
|
|
10
|
+
let l = a == null || (r = a.current) === null || r === void 0 ? void 0 : r.form;
|
|
11
|
+
return l == null || l.addEventListener("reset", n), () => {
|
|
12
|
+
l == null || l.removeEventListener("reset", n);
|
|
13
|
+
};
|
|
14
|
+
}, [
|
|
15
|
+
a,
|
|
16
|
+
n
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
const L = {
|
|
20
|
+
badInput: !1,
|
|
21
|
+
customError: !1,
|
|
22
|
+
patternMismatch: !1,
|
|
23
|
+
rangeOverflow: !1,
|
|
24
|
+
rangeUnderflow: !1,
|
|
25
|
+
stepMismatch: !1,
|
|
26
|
+
tooLong: !1,
|
|
27
|
+
tooShort: !1,
|
|
28
|
+
typeMismatch: !1,
|
|
29
|
+
valueMissing: !1,
|
|
30
|
+
valid: !0
|
|
31
|
+
}, O = {
|
|
32
|
+
...L,
|
|
33
|
+
customError: !0,
|
|
34
|
+
valid: !1
|
|
35
|
+
}, f = {
|
|
36
|
+
isInvalid: !1,
|
|
37
|
+
validationDetails: L,
|
|
38
|
+
validationErrors: []
|
|
39
|
+
}, k = Q({}), w = "__formValidationState" + Date.now();
|
|
40
|
+
function Z(a) {
|
|
41
|
+
if (a[w]) {
|
|
42
|
+
let { realtimeValidation: e, displayValidation: i, updateValidation: t, resetValidation: n, commitValidation: r } = a[w];
|
|
43
|
+
return {
|
|
44
|
+
realtimeValidation: e,
|
|
45
|
+
displayValidation: i,
|
|
46
|
+
updateValidation: t,
|
|
47
|
+
resetValidation: n,
|
|
48
|
+
commitValidation: r
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return q(a);
|
|
52
|
+
}
|
|
53
|
+
function q(a) {
|
|
54
|
+
let { isInvalid: e, validationState: i, name: t, value: n, builtinValidation: r, validate: l, validationBehavior: v = "aria" } = a;
|
|
55
|
+
i && (e || (e = i === "invalid"));
|
|
56
|
+
let o = e !== void 0 ? {
|
|
57
|
+
isInvalid: e,
|
|
58
|
+
validationErrors: [],
|
|
59
|
+
validationDetails: O
|
|
60
|
+
} : null, s = h(() => {
|
|
61
|
+
if (!l || n == null) return null;
|
|
62
|
+
let d = N(l, n);
|
|
63
|
+
return A(d);
|
|
64
|
+
}, [
|
|
65
|
+
l,
|
|
66
|
+
n
|
|
67
|
+
]);
|
|
68
|
+
r != null && r.validationDetails.valid && (r = void 0);
|
|
69
|
+
let u = F(k), c = h(() => t ? Array.isArray(t) ? t.flatMap((d) => x(u[d])) : x(u[t]) : [], [
|
|
70
|
+
u,
|
|
71
|
+
t
|
|
72
|
+
]), [B, T] = $(u), [D, b] = $(!1);
|
|
73
|
+
u !== B && (T(u), b(!1));
|
|
74
|
+
let p = h(() => A(D ? [] : c), [
|
|
75
|
+
D,
|
|
76
|
+
c
|
|
77
|
+
]), C = M(f), [E, y] = $(f), m = M(f), U = () => {
|
|
78
|
+
if (!R) return;
|
|
79
|
+
g(!1);
|
|
80
|
+
let d = s || r || C.current;
|
|
81
|
+
I(d, m.current) || (m.current = d, y(d));
|
|
82
|
+
}, [R, g] = $(!1);
|
|
83
|
+
return S(U), {
|
|
84
|
+
realtimeValidation: o || p || s || r || f,
|
|
85
|
+
displayValidation: v === "native" ? o || p || E : o || p || s || r || E,
|
|
86
|
+
updateValidation(d) {
|
|
87
|
+
v === "aria" && !I(E, d) ? y(d) : C.current = d;
|
|
88
|
+
},
|
|
89
|
+
resetValidation() {
|
|
90
|
+
let d = f;
|
|
91
|
+
I(d, m.current) || (m.current = d, y(d)), v === "native" && g(!1), b(!0);
|
|
92
|
+
},
|
|
93
|
+
commitValidation() {
|
|
94
|
+
v === "native" && g(!0), b(!0);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function x(a) {
|
|
99
|
+
return a ? Array.isArray(a) ? a : [
|
|
100
|
+
a
|
|
101
|
+
] : [];
|
|
102
|
+
}
|
|
103
|
+
function N(a, e) {
|
|
104
|
+
if (typeof a == "function") {
|
|
105
|
+
let i = a(e);
|
|
106
|
+
if (i && typeof i != "boolean") return x(i);
|
|
107
|
+
}
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
function A(a) {
|
|
111
|
+
return a.length ? {
|
|
112
|
+
isInvalid: !0,
|
|
113
|
+
validationErrors: a,
|
|
114
|
+
validationDetails: O
|
|
115
|
+
} : null;
|
|
116
|
+
}
|
|
117
|
+
function I(a, e) {
|
|
118
|
+
return a === e ? !0 : !!a && !!e && a.isInvalid === e.isInvalid && a.validationErrors.length === e.validationErrors.length && a.validationErrors.every((i, t) => i === e.validationErrors[t]) && Object.entries(a.validationDetails).every(([i, t]) => e.validationDetails[i] === t);
|
|
119
|
+
}
|
|
120
|
+
function ee(...a) {
|
|
121
|
+
let e = /* @__PURE__ */ new Set(), i = !1, t = {
|
|
122
|
+
...L
|
|
123
|
+
};
|
|
124
|
+
for (let l of a) {
|
|
125
|
+
var n, r;
|
|
126
|
+
for (let v of l.validationErrors) e.add(v);
|
|
127
|
+
i || (i = l.isInvalid);
|
|
128
|
+
for (let v in t) (n = t)[r = v] || (n[r] = l.validationDetails[v]);
|
|
129
|
+
}
|
|
130
|
+
return t.valid = !i, {
|
|
131
|
+
isInvalid: i,
|
|
132
|
+
validationErrors: [
|
|
133
|
+
...e
|
|
134
|
+
],
|
|
135
|
+
validationDetails: t
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function ae(a, e, i) {
|
|
139
|
+
let { validationBehavior: t, focus: n } = a;
|
|
140
|
+
j(() => {
|
|
141
|
+
if (t === "native" && (i != null && i.current) && !i.current.disabled) {
|
|
142
|
+
let o = e.realtimeValidation.isInvalid ? e.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
|
|
143
|
+
i.current.setCustomValidity(o), i.current.hasAttribute("title") || (i.current.title = ""), e.realtimeValidation.isInvalid || e.updateValidation(Y(i.current));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
let r = V(() => {
|
|
147
|
+
e.resetValidation();
|
|
148
|
+
}), l = V((o) => {
|
|
149
|
+
var s;
|
|
150
|
+
e.displayValidation.isInvalid || e.commitValidation();
|
|
151
|
+
let u = i == null || (s = i.current) === null || s === void 0 ? void 0 : s.form;
|
|
152
|
+
if (!o.defaultPrevented && i && u && z(u) === i.current) {
|
|
153
|
+
var c;
|
|
154
|
+
n ? n() : (c = i.current) === null || c === void 0 || c.focus(), _("keyboard");
|
|
155
|
+
}
|
|
156
|
+
o.preventDefault();
|
|
157
|
+
}), v = V(() => {
|
|
158
|
+
e.commitValidation();
|
|
159
|
+
});
|
|
160
|
+
S(() => {
|
|
161
|
+
let o = i == null ? void 0 : i.current;
|
|
162
|
+
if (!o) return;
|
|
163
|
+
let s = o.form;
|
|
164
|
+
return o.addEventListener("invalid", l), o.addEventListener("change", v), s == null || s.addEventListener("reset", r), () => {
|
|
165
|
+
o.removeEventListener("invalid", l), o.removeEventListener("change", v), s == null || s.removeEventListener("reset", r);
|
|
166
|
+
};
|
|
167
|
+
}, [
|
|
168
|
+
i,
|
|
169
|
+
l,
|
|
170
|
+
v,
|
|
171
|
+
r,
|
|
172
|
+
t
|
|
173
|
+
]);
|
|
174
|
+
}
|
|
175
|
+
function P(a) {
|
|
176
|
+
let e = a.validity;
|
|
177
|
+
return {
|
|
178
|
+
badInput: e.badInput,
|
|
179
|
+
customError: e.customError,
|
|
180
|
+
patternMismatch: e.patternMismatch,
|
|
181
|
+
rangeOverflow: e.rangeOverflow,
|
|
182
|
+
rangeUnderflow: e.rangeUnderflow,
|
|
183
|
+
stepMismatch: e.stepMismatch,
|
|
184
|
+
tooLong: e.tooLong,
|
|
185
|
+
tooShort: e.tooShort,
|
|
186
|
+
typeMismatch: e.typeMismatch,
|
|
187
|
+
valueMissing: e.valueMissing,
|
|
188
|
+
valid: e.valid
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function Y(a) {
|
|
192
|
+
return {
|
|
193
|
+
isInvalid: !a.validity.valid,
|
|
194
|
+
validationDetails: P(a),
|
|
195
|
+
validationErrors: a.validationMessage ? [
|
|
196
|
+
a.validationMessage
|
|
197
|
+
] : []
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function z(a) {
|
|
201
|
+
for (let e = 0; e < a.elements.length; e++) {
|
|
202
|
+
let i = a.elements[e];
|
|
203
|
+
if (!i.validity.valid) return i;
|
|
204
|
+
}
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
export {
|
|
208
|
+
Z as $,
|
|
209
|
+
X as a,
|
|
210
|
+
ae as b,
|
|
211
|
+
ee as c,
|
|
212
|
+
w as d,
|
|
213
|
+
f as e,
|
|
214
|
+
L as f
|
|
215
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("./utils-BNtZbAib.cjs"),s=require("react"),q=require("./useHover-_mv5J4_q.cjs");function B(a,e,t){let i=s.useRef(e),n=b.$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{t&&t(i.current)});s.useEffect(()=>{var r;let l=a==null||(r=a.current)===null||r===void 0?void 0:r.form;return l==null||l.addEventListener("reset",n),()=>{l==null||l.removeEventListener("reset",n)}},[a,n])}const V={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},C={...V,customError:!0,valid:!1},$={isInvalid:!1,validationDetails:V,validationErrors:[]},T=s.createContext({}),I="__formValidationState"+Date.now();function U(a){if(a[I]){let{realtimeValidation:e,displayValidation:t,updateValidation:i,resetValidation:n,commitValidation:r}=a[I];return{realtimeValidation:e,displayValidation:t,updateValidation:i,resetValidation:n,commitValidation:r}}return j(a)}function j(a){let{isInvalid:e,validationState:t,name:i,value:n,builtinValidation:r,validate:l,validationBehavior:v="aria"}=a;t&&(e||(e=t==="invalid"));let o=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:C}:null,c=s.useMemo(()=>{if(!l||n==null)return null;let d=F(l,n);return D(d)},[l,n]);r!=null&&r.validationDetails.valid&&(r=void 0);let u=s.useContext(T),f=s.useMemo(()=>i?Array.isArray(i)?i.flatMap(d=>M(u[d])):M(u[i]):[],[u,i]),[w,A]=s.useState(u),[S,p]=s.useState(!1);u!==w&&(A(u),p(!1));let E=s.useMemo(()=>D(S?[]:f),[S,f]),L=s.useRef($),[y,g]=s.useState($),m=s.useRef($),R=()=>{if(!O)return;h(!1);let d=c||r||L.current;x(d,m.current)||(m.current=d,g(d))},[O,h]=s.useState(!1);return s.useEffect(R),{realtimeValidation:o||E||c||r||$,displayValidation:v==="native"?o||E||y:o||E||c||r||y,updateValidation(d){v==="aria"&&!x(y,d)?g(d):L.current=d},resetValidation(){let d=$;x(d,m.current)||(m.current=d,g(d)),v==="native"&&h(!1),p(!0)},commitValidation(){v==="native"&&h(!0),p(!0)}}}function M(a){return a?Array.isArray(a)?a:[a]:[]}function F(a,e){if(typeof a=="function"){let t=a(e);if(t&&typeof t!="boolean")return M(t)}return[]}function D(a){return a.length?{isInvalid:!0,validationErrors:a,validationDetails:C}:null}function x(a,e){return a===e?!0:!!a&&!!e&&a.isInvalid===e.isInvalid&&a.validationErrors.length===e.validationErrors.length&&a.validationErrors.every((t,i)=>t===e.validationErrors[i])&&Object.entries(a.validationDetails).every(([t,i])=>e.validationDetails[t]===i)}function Q(...a){let e=new Set,t=!1,i={...V};for(let l of a){var n,r;for(let v of l.validationErrors)e.add(v);t||(t=l.isInvalid);for(let v in i)(n=i)[r=v]||(n[r]=l.validationDetails[v])}return i.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:i}}function _(a,e,t){let{validationBehavior:i,focus:n}=a;b.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(i==="native"&&(t!=null&&t.current)&&!t.current.disabled){let o=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(o),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(H(t.current))}});let r=b.$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{e.resetValidation()}),l=b.$8ae05eaa5c114e9c$export$7f54fc3180508a52(o=>{var c;e.displayValidation.isInvalid||e.commitValidation();let u=t==null||(c=t.current)===null||c===void 0?void 0:c.form;if(!o.defaultPrevented&&t&&u&&N(u)===t.current){var f;n?n():(f=t.current)===null||f===void 0||f.focus(),q.$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}o.preventDefault()}),v=b.$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{e.commitValidation()});s.useEffect(()=>{let o=t==null?void 0:t.current;if(!o)return;let c=o.form;return o.addEventListener("invalid",l),o.addEventListener("change",v),c==null||c.addEventListener("reset",r),()=>{o.removeEventListener("invalid",l),o.removeEventListener("change",v),c==null||c.removeEventListener("reset",r)}},[t,l,v,r,i])}function k(a){let e=a.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function H(a){return{isInvalid:!a.validity.valid,validationDetails:k(a),validationErrors:a.validationMessage?[a.validationMessage]:[]}}function N(a){for(let e=0;e<a.elements.length;e++){let t=a.elements[e];if(!t.validity.valid)return t}return null}exports.$99facab73266f662$export$5add1d006293d136=B;exports.$e5be200c675c3b3a$export$75ee7c75d68f5b0e=Q;exports.$e5be200c675c3b3a$export$a763b9476acd3eb=I;exports.$e5be200c675c3b3a$export$aca958c65c314e6c=V;exports.$e5be200c675c3b3a$export$dad6ae84456c676a=$;exports.$e5be200c675c3b3a$export$fc1a364ae1f3ff10=U;exports.$e93e671b31057976$export$b8473d3665f3a75a=_;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { $ as s } from "./FocusScope-CxkURfoc.js";
|
|
2
|
+
import { $ as u } from "./utils-DIMfEPAt.js";
|
|
3
|
+
import { useState as c } from "react";
|
|
4
|
+
function f(e, t) {
|
|
5
|
+
let a = t == null ? void 0 : t.isDisabled, [d, i] = c(!1);
|
|
6
|
+
return u(() => {
|
|
7
|
+
if (e != null && e.current && !a) {
|
|
8
|
+
let r = () => {
|
|
9
|
+
if (e.current) {
|
|
10
|
+
let l = s(e.current, {
|
|
11
|
+
tabbable: !0
|
|
12
|
+
});
|
|
13
|
+
i(!!l.nextNode());
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
r();
|
|
17
|
+
let b = new MutationObserver(r);
|
|
18
|
+
return b.observe(e.current, {
|
|
19
|
+
subtree: !0,
|
|
20
|
+
childList: !0,
|
|
21
|
+
attributes: !0,
|
|
22
|
+
attributeFilter: [
|
|
23
|
+
"tabIndex",
|
|
24
|
+
"disabled"
|
|
25
|
+
]
|
|
26
|
+
}), () => {
|
|
27
|
+
b.disconnect();
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}), a ? !1 : d;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
f as $
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./FocusScope-5c9SVBcR.cjs"),l=require("./utils-BNtZbAib.cjs"),s=require("react");function n(e,t){let r=t==null?void 0:t.isDisabled,[u,c]=s.useState(!1);return l.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(e!=null&&e.current&&!r){let a=()=>{if(e.current){let d=i.$9bf71ea28793e738$export$2d6ec8fc375ceafa(e.current,{tabbable:!0});c(!!d.nextNode())}};a();let b=new MutationObserver(a);return b.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{b.disconnect()}}}),r?!1:u}exports.$83013635b024ae3d$export$eac1895992b9f3d6=n;
|