@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,1633 @@
|
|
|
1
|
+
import { e as Er } from "./Button-DjBChs7s.js";
|
|
2
|
+
import { l as be, c as _, f as Ae, e as re, $ as j, n as de, k as Dr, d as Q, a as oe, b as G, j as H, g as Cr, o as ce, m as wr, h as Ar } from "./utils-DIMfEPAt.js";
|
|
3
|
+
import { $ as Mr } from "./RSPContexts-BW2SEIqe.js";
|
|
4
|
+
import { h as Sr, e as kr, d as Br, a as Te, b as Fr, c as Kr, f as Or, g as Re } from "./OverlayArrow-CDLXPTew.js";
|
|
5
|
+
import { $ as Tr, b as Rr, c as Ir, d as Ie, e as Nr, g as Lr } from "./Collection-Brgjpkne.js";
|
|
6
|
+
import { $ as zr, a as _r, b as Me, c as Hr, d as Ur } from "./Separator-Cu9fYKUM.js";
|
|
7
|
+
import f, { useRef as M, useContext as P, useEffect as F, useMemo as z, useState as B, useCallback as me, forwardRef as ge, createContext as D } from "react";
|
|
8
|
+
import { $ as Vr } from "./Text-BoXuUVVH.js";
|
|
9
|
+
import { $ as K } from "./filterDOMProps-D6KHYVBX.js";
|
|
10
|
+
import { l as Wr, d as jr, $ as Ne, a as Gr, b as Le } from "./SelectionManager-B4ORduja.js";
|
|
11
|
+
import { g as fe, b as qr, a as Zr, c as Jr } from "./usePress-CNjmDzap.js";
|
|
12
|
+
import { e as Yr, f as Xr, a as $e } from "./useFocusable-C8uh8K4g.js";
|
|
13
|
+
import { d as Qr, y as eo, v as Se, $ as ze, j as ke, l as to } from "./useHover-DjIHtjGN.js";
|
|
14
|
+
import { b as _e } from "./useLocalizedStringFormatter-BKoxGZf1.js";
|
|
15
|
+
import { $ as ro } from "./useControlledState-u436Wbp1.js";
|
|
16
|
+
import { c as oo, a as He } from "./FocusScope-CxkURfoc.js";
|
|
17
|
+
import ao from "react-dom";
|
|
18
|
+
import { b as no } from "./Hidden-C9KWUR7b.js";
|
|
19
|
+
import { $ as so } from "./context-C81gPYvC.js";
|
|
20
|
+
import { a as lo } from "./useFocusRing-XnR3cZjO.js";
|
|
21
|
+
import { $ as Ue } from "./getScrollParent-BhFcYrwL.js";
|
|
22
|
+
import { $ as io } from "./useLabels-BDwkBYbE.js";
|
|
23
|
+
import { $ as uo } from "./VisuallyHidden-ZCYf65q4.js";
|
|
24
|
+
const Ve = /* @__PURE__ */ f.forwardRef(({ children: t, ...e }, r) => {
|
|
25
|
+
let a = M(!1), o = P(fe);
|
|
26
|
+
r = be(r || (o == null ? void 0 : o.ref));
|
|
27
|
+
let s = _(o || {}, {
|
|
28
|
+
...e,
|
|
29
|
+
ref: r,
|
|
30
|
+
register() {
|
|
31
|
+
a.current = !0, o && o.register();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return Yr(o, r), F(() => {
|
|
35
|
+
a.current || (process.env.NODE_ENV !== "production" && console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."), a.current = !0);
|
|
36
|
+
}, []), /* @__PURE__ */ f.createElement(fe.Provider, {
|
|
37
|
+
value: s
|
|
38
|
+
}, t);
|
|
39
|
+
});
|
|
40
|
+
function co({ children: t }) {
|
|
41
|
+
let e = z(() => ({
|
|
42
|
+
register: () => {
|
|
43
|
+
}
|
|
44
|
+
}), []);
|
|
45
|
+
return /* @__PURE__ */ f.createElement(fe.Provider, {
|
|
46
|
+
value: e
|
|
47
|
+
}, t);
|
|
48
|
+
}
|
|
49
|
+
function fo(t) {
|
|
50
|
+
let { ref: e, onInteractOutside: r, isDisabled: a, onInteractOutsideStart: o } = t, s = M({
|
|
51
|
+
isPointerDown: !1,
|
|
52
|
+
ignoreEmulatedMouseEvents: !1
|
|
53
|
+
}), u = Ae((n) => {
|
|
54
|
+
r && Y(n, e) && (o && o(n), s.current.isPointerDown = !0);
|
|
55
|
+
}), i = Ae((n) => {
|
|
56
|
+
r && r(n);
|
|
57
|
+
});
|
|
58
|
+
F(() => {
|
|
59
|
+
let n = s.current;
|
|
60
|
+
if (a) return;
|
|
61
|
+
const d = e.current, l = Qr(d);
|
|
62
|
+
if (typeof PointerEvent < "u") {
|
|
63
|
+
let $ = (p) => {
|
|
64
|
+
n.isPointerDown && Y(p, e) && i(p), n.isPointerDown = !1;
|
|
65
|
+
};
|
|
66
|
+
return l.addEventListener("pointerdown", u, !0), l.addEventListener("click", $, !0), () => {
|
|
67
|
+
l.removeEventListener("pointerdown", u, !0), l.removeEventListener("click", $, !0);
|
|
68
|
+
};
|
|
69
|
+
} else if (process.env.NODE_ENV === "test") {
|
|
70
|
+
let $ = (c) => {
|
|
71
|
+
n.ignoreEmulatedMouseEvents ? n.ignoreEmulatedMouseEvents = !1 : n.isPointerDown && Y(c, e) && i(c), n.isPointerDown = !1;
|
|
72
|
+
}, p = (c) => {
|
|
73
|
+
n.ignoreEmulatedMouseEvents = !0, n.isPointerDown && Y(c, e) && i(c), n.isPointerDown = !1;
|
|
74
|
+
};
|
|
75
|
+
return l.addEventListener("mousedown", u, !0), l.addEventListener("mouseup", $, !0), l.addEventListener("touchstart", u, !0), l.addEventListener("touchend", p, !0), () => {
|
|
76
|
+
l.removeEventListener("mousedown", u, !0), l.removeEventListener("mouseup", $, !0), l.removeEventListener("touchstart", u, !0), l.removeEventListener("touchend", p, !0);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}, [
|
|
80
|
+
e,
|
|
81
|
+
a,
|
|
82
|
+
u,
|
|
83
|
+
i
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
function Y(t, e) {
|
|
87
|
+
if (t.button > 0) return !1;
|
|
88
|
+
if (t.target) {
|
|
89
|
+
const r = t.target.ownerDocument;
|
|
90
|
+
if (!r || !r.documentElement.contains(t.target) || t.target.closest("[data-react-aria-top-layer]")) return !1;
|
|
91
|
+
}
|
|
92
|
+
return e.current ? !t.composedPath().includes(e.current) : !1;
|
|
93
|
+
}
|
|
94
|
+
const w = [];
|
|
95
|
+
function $o(t, e) {
|
|
96
|
+
let { onClose: r, shouldCloseOnBlur: a, isOpen: o, isDismissable: s = !1, isKeyboardDismissDisabled: u = !1, shouldCloseOnInteractOutside: i } = t;
|
|
97
|
+
F(() => {
|
|
98
|
+
if (o && !w.includes(e))
|
|
99
|
+
return w.push(e), () => {
|
|
100
|
+
let b = w.indexOf(e);
|
|
101
|
+
b >= 0 && w.splice(b, 1);
|
|
102
|
+
};
|
|
103
|
+
}, [
|
|
104
|
+
o,
|
|
105
|
+
e
|
|
106
|
+
]);
|
|
107
|
+
let n = () => {
|
|
108
|
+
w[w.length - 1] === e && r && r();
|
|
109
|
+
}, d = (b) => {
|
|
110
|
+
(!i || i(b.target)) && w[w.length - 1] === e && (b.stopPropagation(), b.preventDefault());
|
|
111
|
+
}, l = (b) => {
|
|
112
|
+
(!i || i(b.target)) && (w[w.length - 1] === e && (b.stopPropagation(), b.preventDefault()), n());
|
|
113
|
+
}, $ = (b) => {
|
|
114
|
+
b.key === "Escape" && !u && !b.nativeEvent.isComposing && (b.stopPropagation(), b.preventDefault(), n());
|
|
115
|
+
};
|
|
116
|
+
fo({
|
|
117
|
+
ref: e,
|
|
118
|
+
onInteractOutside: s && o ? l : void 0,
|
|
119
|
+
onInteractOutsideStart: d
|
|
120
|
+
});
|
|
121
|
+
let { focusWithinProps: p } = lo({
|
|
122
|
+
isDisabled: !a,
|
|
123
|
+
onBlurWithin: (b) => {
|
|
124
|
+
!b.relatedTarget || oo(b.relatedTarget) || (!i || i(b.relatedTarget)) && (r == null || r());
|
|
125
|
+
}
|
|
126
|
+
}), c = (b) => {
|
|
127
|
+
b.target === b.currentTarget && b.preventDefault();
|
|
128
|
+
};
|
|
129
|
+
return {
|
|
130
|
+
overlayProps: {
|
|
131
|
+
onKeyDown: $,
|
|
132
|
+
...p
|
|
133
|
+
},
|
|
134
|
+
underlayProps: {
|
|
135
|
+
onPointerDown: c
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function We(t, e, r) {
|
|
140
|
+
let { type: a } = t, { isOpen: o } = e;
|
|
141
|
+
F(() => {
|
|
142
|
+
r && r.current && Sr.set(r.current, e.close);
|
|
143
|
+
});
|
|
144
|
+
let s;
|
|
145
|
+
a === "menu" ? s = !0 : a === "listbox" && (s = "listbox");
|
|
146
|
+
let u = re();
|
|
147
|
+
return {
|
|
148
|
+
triggerProps: {
|
|
149
|
+
"aria-haspopup": s,
|
|
150
|
+
"aria-expanded": o,
|
|
151
|
+
"aria-controls": o ? u : void 0,
|
|
152
|
+
onPress: e.toggle
|
|
153
|
+
},
|
|
154
|
+
overlayProps: {
|
|
155
|
+
id: u
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
const ie = typeof document < "u" && window.visualViewport, po = /* @__PURE__ */ new Set([
|
|
160
|
+
"checkbox",
|
|
161
|
+
"radio",
|
|
162
|
+
"range",
|
|
163
|
+
"color",
|
|
164
|
+
"file",
|
|
165
|
+
"image",
|
|
166
|
+
"button",
|
|
167
|
+
"submit",
|
|
168
|
+
"reset"
|
|
169
|
+
]);
|
|
170
|
+
let X = 0, ue;
|
|
171
|
+
function bo(t = {}) {
|
|
172
|
+
let { isDisabled: e } = t;
|
|
173
|
+
j(() => {
|
|
174
|
+
if (!e)
|
|
175
|
+
return X++, X === 1 && (eo() ? ue = go() : ue = mo()), () => {
|
|
176
|
+
X--, X === 0 && ue();
|
|
177
|
+
};
|
|
178
|
+
}, [
|
|
179
|
+
e
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
182
|
+
function mo() {
|
|
183
|
+
let t = window.innerWidth - document.documentElement.clientWidth;
|
|
184
|
+
return de(t > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
|
|
185
|
+
("scrollbarGutter" in document.documentElement.style ? k(document.documentElement, "scrollbarGutter", "stable") : k(document.documentElement, "paddingRight", `${t}px`)), k(document.documentElement, "overflow", "hidden"));
|
|
186
|
+
}
|
|
187
|
+
function go() {
|
|
188
|
+
let t, e, r = (d) => {
|
|
189
|
+
t = Ue(d.target, !0), !(t === document.documentElement && t === document.body) && t instanceof HTMLElement && window.getComputedStyle(t).overscrollBehavior === "auto" && (e = k(t, "overscrollBehavior", "contain"));
|
|
190
|
+
}, a = (d) => {
|
|
191
|
+
if (!t || t === document.documentElement || t === document.body) {
|
|
192
|
+
d.preventDefault();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
t.scrollHeight === t.clientHeight && t.scrollWidth === t.clientWidth && d.preventDefault();
|
|
196
|
+
}, o = () => {
|
|
197
|
+
e && e();
|
|
198
|
+
}, s = (d) => {
|
|
199
|
+
let l = d.target;
|
|
200
|
+
vo(l) && (i(), l.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
201
|
+
l.style.transform = "", ie && (ie.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
202
|
+
Be(l);
|
|
203
|
+
}) : ie.addEventListener("resize", () => Be(l), {
|
|
204
|
+
once: !0
|
|
205
|
+
}));
|
|
206
|
+
}));
|
|
207
|
+
}, u = null, i = () => {
|
|
208
|
+
if (u) return;
|
|
209
|
+
let d = () => {
|
|
210
|
+
window.scrollTo(0, 0);
|
|
211
|
+
}, l = window.pageXOffset, $ = window.pageYOffset;
|
|
212
|
+
u = de(V(window, "scroll", d), k(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), k(document.documentElement, "overflow", "hidden"), k(document.body, "marginTop", `-${$}px`), () => {
|
|
213
|
+
window.scrollTo(l, $);
|
|
214
|
+
}), window.scrollTo(0, 0);
|
|
215
|
+
}, n = de(V(document, "touchstart", r, {
|
|
216
|
+
passive: !1,
|
|
217
|
+
capture: !0
|
|
218
|
+
}), V(document, "touchmove", a, {
|
|
219
|
+
passive: !1,
|
|
220
|
+
capture: !0
|
|
221
|
+
}), V(document, "touchend", o, {
|
|
222
|
+
passive: !1,
|
|
223
|
+
capture: !0
|
|
224
|
+
}), V(document, "focus", s, !0));
|
|
225
|
+
return () => {
|
|
226
|
+
e == null || e(), u == null || u(), n();
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function k(t, e, r) {
|
|
230
|
+
let a = t.style[e];
|
|
231
|
+
return t.style[e] = r, () => {
|
|
232
|
+
t.style[e] = a;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function V(t, e, r, a) {
|
|
236
|
+
return t.addEventListener(e, r, a), () => {
|
|
237
|
+
t.removeEventListener(e, r, a);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function Be(t) {
|
|
241
|
+
let e = document.scrollingElement || document.documentElement, r = t;
|
|
242
|
+
for (; r && r !== e; ) {
|
|
243
|
+
let a = Ue(r);
|
|
244
|
+
if (a !== document.documentElement && a !== document.body && a !== r) {
|
|
245
|
+
let o = a.getBoundingClientRect().top, s = r.getBoundingClientRect().top;
|
|
246
|
+
s > o + r.clientHeight && (a.scrollTop += s - o);
|
|
247
|
+
}
|
|
248
|
+
r = a.parentElement;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function vo(t) {
|
|
252
|
+
return t instanceof HTMLInputElement && !po.has(t.type) || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable;
|
|
253
|
+
}
|
|
254
|
+
var je = {};
|
|
255
|
+
je = {
|
|
256
|
+
dismiss: "تجاهل"
|
|
257
|
+
};
|
|
258
|
+
var Ge = {};
|
|
259
|
+
Ge = {
|
|
260
|
+
dismiss: "Отхвърляне"
|
|
261
|
+
};
|
|
262
|
+
var qe = {};
|
|
263
|
+
qe = {
|
|
264
|
+
dismiss: "Odstranit"
|
|
265
|
+
};
|
|
266
|
+
var Ze = {};
|
|
267
|
+
Ze = {
|
|
268
|
+
dismiss: "Luk"
|
|
269
|
+
};
|
|
270
|
+
var Je = {};
|
|
271
|
+
Je = {
|
|
272
|
+
dismiss: "Schließen"
|
|
273
|
+
};
|
|
274
|
+
var Ye = {};
|
|
275
|
+
Ye = {
|
|
276
|
+
dismiss: "Απόρριψη"
|
|
277
|
+
};
|
|
278
|
+
var Xe = {};
|
|
279
|
+
Xe = {
|
|
280
|
+
dismiss: "Dismiss"
|
|
281
|
+
};
|
|
282
|
+
var Qe = {};
|
|
283
|
+
Qe = {
|
|
284
|
+
dismiss: "Descartar"
|
|
285
|
+
};
|
|
286
|
+
var et = {};
|
|
287
|
+
et = {
|
|
288
|
+
dismiss: "Lõpeta"
|
|
289
|
+
};
|
|
290
|
+
var tt = {};
|
|
291
|
+
tt = {
|
|
292
|
+
dismiss: "Hylkää"
|
|
293
|
+
};
|
|
294
|
+
var rt = {};
|
|
295
|
+
rt = {
|
|
296
|
+
dismiss: "Rejeter"
|
|
297
|
+
};
|
|
298
|
+
var ot = {};
|
|
299
|
+
ot = {
|
|
300
|
+
dismiss: "התעלם"
|
|
301
|
+
};
|
|
302
|
+
var at = {};
|
|
303
|
+
at = {
|
|
304
|
+
dismiss: "Odbaci"
|
|
305
|
+
};
|
|
306
|
+
var nt = {};
|
|
307
|
+
nt = {
|
|
308
|
+
dismiss: "Elutasítás"
|
|
309
|
+
};
|
|
310
|
+
var st = {};
|
|
311
|
+
st = {
|
|
312
|
+
dismiss: "Ignora"
|
|
313
|
+
};
|
|
314
|
+
var lt = {};
|
|
315
|
+
lt = {
|
|
316
|
+
dismiss: "閉じる"
|
|
317
|
+
};
|
|
318
|
+
var it = {};
|
|
319
|
+
it = {
|
|
320
|
+
dismiss: "무시"
|
|
321
|
+
};
|
|
322
|
+
var ut = {};
|
|
323
|
+
ut = {
|
|
324
|
+
dismiss: "Atmesti"
|
|
325
|
+
};
|
|
326
|
+
var dt = {};
|
|
327
|
+
dt = {
|
|
328
|
+
dismiss: "Nerādīt"
|
|
329
|
+
};
|
|
330
|
+
var ct = {};
|
|
331
|
+
ct = {
|
|
332
|
+
dismiss: "Lukk"
|
|
333
|
+
};
|
|
334
|
+
var ft = {};
|
|
335
|
+
ft = {
|
|
336
|
+
dismiss: "Negeren"
|
|
337
|
+
};
|
|
338
|
+
var $t = {};
|
|
339
|
+
$t = {
|
|
340
|
+
dismiss: "Zignoruj"
|
|
341
|
+
};
|
|
342
|
+
var pt = {};
|
|
343
|
+
pt = {
|
|
344
|
+
dismiss: "Descartar"
|
|
345
|
+
};
|
|
346
|
+
var bt = {};
|
|
347
|
+
bt = {
|
|
348
|
+
dismiss: "Dispensar"
|
|
349
|
+
};
|
|
350
|
+
var mt = {};
|
|
351
|
+
mt = {
|
|
352
|
+
dismiss: "Revocare"
|
|
353
|
+
};
|
|
354
|
+
var gt = {};
|
|
355
|
+
gt = {
|
|
356
|
+
dismiss: "Пропустить"
|
|
357
|
+
};
|
|
358
|
+
var vt = {};
|
|
359
|
+
vt = {
|
|
360
|
+
dismiss: "Zrušiť"
|
|
361
|
+
};
|
|
362
|
+
var xt = {};
|
|
363
|
+
xt = {
|
|
364
|
+
dismiss: "Opusti"
|
|
365
|
+
};
|
|
366
|
+
var yt = {};
|
|
367
|
+
yt = {
|
|
368
|
+
dismiss: "Odbaci"
|
|
369
|
+
};
|
|
370
|
+
var ht = {};
|
|
371
|
+
ht = {
|
|
372
|
+
dismiss: "Avvisa"
|
|
373
|
+
};
|
|
374
|
+
var Pt = {};
|
|
375
|
+
Pt = {
|
|
376
|
+
dismiss: "Kapat"
|
|
377
|
+
};
|
|
378
|
+
var Et = {};
|
|
379
|
+
Et = {
|
|
380
|
+
dismiss: "Скасувати"
|
|
381
|
+
};
|
|
382
|
+
var Dt = {};
|
|
383
|
+
Dt = {
|
|
384
|
+
dismiss: "取消"
|
|
385
|
+
};
|
|
386
|
+
var Ct = {};
|
|
387
|
+
Ct = {
|
|
388
|
+
dismiss: "關閉"
|
|
389
|
+
};
|
|
390
|
+
var wt = {};
|
|
391
|
+
wt = {
|
|
392
|
+
"ar-AE": je,
|
|
393
|
+
"bg-BG": Ge,
|
|
394
|
+
"cs-CZ": qe,
|
|
395
|
+
"da-DK": Ze,
|
|
396
|
+
"de-DE": Je,
|
|
397
|
+
"el-GR": Ye,
|
|
398
|
+
"en-US": Xe,
|
|
399
|
+
"es-ES": Qe,
|
|
400
|
+
"et-EE": et,
|
|
401
|
+
"fi-FI": tt,
|
|
402
|
+
"fr-FR": rt,
|
|
403
|
+
"he-IL": ot,
|
|
404
|
+
"hr-HR": at,
|
|
405
|
+
"hu-HU": nt,
|
|
406
|
+
"it-IT": st,
|
|
407
|
+
"ja-JP": lt,
|
|
408
|
+
"ko-KR": it,
|
|
409
|
+
"lt-LT": ut,
|
|
410
|
+
"lv-LV": dt,
|
|
411
|
+
"nb-NO": ct,
|
|
412
|
+
"nl-NL": ft,
|
|
413
|
+
"pl-PL": $t,
|
|
414
|
+
"pt-BR": pt,
|
|
415
|
+
"pt-PT": bt,
|
|
416
|
+
"ro-RO": mt,
|
|
417
|
+
"ru-RU": gt,
|
|
418
|
+
"sk-SK": vt,
|
|
419
|
+
"sl-SI": xt,
|
|
420
|
+
"sr-SP": yt,
|
|
421
|
+
"sv-SE": ht,
|
|
422
|
+
"tr-TR": Pt,
|
|
423
|
+
"uk-UA": Et,
|
|
424
|
+
"zh-CN": Dt,
|
|
425
|
+
"zh-TW": Ct
|
|
426
|
+
};
|
|
427
|
+
function xo(t) {
|
|
428
|
+
return t && t.__esModule ? t.default : t;
|
|
429
|
+
}
|
|
430
|
+
function Fe(t) {
|
|
431
|
+
let { onDismiss: e, ...r } = t, a = _e(xo(wt), "@react-aria/overlays"), o = io(r, a.format("dismiss")), s = () => {
|
|
432
|
+
e && e();
|
|
433
|
+
};
|
|
434
|
+
return /* @__PURE__ */ f.createElement(uo, null, /* @__PURE__ */ f.createElement("button", {
|
|
435
|
+
...o,
|
|
436
|
+
tabIndex: -1,
|
|
437
|
+
onClick: s,
|
|
438
|
+
style: {
|
|
439
|
+
width: 1,
|
|
440
|
+
height: 1
|
|
441
|
+
}
|
|
442
|
+
}));
|
|
443
|
+
}
|
|
444
|
+
let W = /* @__PURE__ */ new WeakMap(), h = [];
|
|
445
|
+
function yo(t, e = document.body) {
|
|
446
|
+
let r = new Set(t), a = /* @__PURE__ */ new Set(), o = (n) => {
|
|
447
|
+
for (let p of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) r.add(p);
|
|
448
|
+
let d = (p) => {
|
|
449
|
+
if (r.has(p) || p.parentElement && a.has(p.parentElement) && p.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
|
|
450
|
+
for (let c of r)
|
|
451
|
+
if (p.contains(c)) return NodeFilter.FILTER_SKIP;
|
|
452
|
+
return NodeFilter.FILTER_ACCEPT;
|
|
453
|
+
}, l = document.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, {
|
|
454
|
+
acceptNode: d
|
|
455
|
+
}), $ = d(n);
|
|
456
|
+
if ($ === NodeFilter.FILTER_ACCEPT && s(n), $ !== NodeFilter.FILTER_REJECT) {
|
|
457
|
+
let p = l.nextNode();
|
|
458
|
+
for (; p != null; )
|
|
459
|
+
s(p), p = l.nextNode();
|
|
460
|
+
}
|
|
461
|
+
}, s = (n) => {
|
|
462
|
+
var d;
|
|
463
|
+
let l = (d = W.get(n)) !== null && d !== void 0 ? d : 0;
|
|
464
|
+
n.getAttribute("aria-hidden") === "true" && l === 0 || (l === 0 && n.setAttribute("aria-hidden", "true"), a.add(n), W.set(n, l + 1));
|
|
465
|
+
};
|
|
466
|
+
h.length && h[h.length - 1].disconnect(), o(e);
|
|
467
|
+
let u = new MutationObserver((n) => {
|
|
468
|
+
for (let d of n)
|
|
469
|
+
if (!(d.type !== "childList" || d.addedNodes.length === 0) && ![
|
|
470
|
+
...r,
|
|
471
|
+
...a
|
|
472
|
+
].some((l) => l.contains(d.target))) {
|
|
473
|
+
for (let l of d.removedNodes) l instanceof Element && (r.delete(l), a.delete(l));
|
|
474
|
+
for (let l of d.addedNodes)
|
|
475
|
+
(l instanceof HTMLElement || l instanceof SVGElement) && (l.dataset.liveAnnouncer === "true" || l.dataset.reactAriaTopLayer === "true") ? r.add(l) : l instanceof Element && o(l);
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
u.observe(e, {
|
|
479
|
+
childList: !0,
|
|
480
|
+
subtree: !0
|
|
481
|
+
});
|
|
482
|
+
let i = {
|
|
483
|
+
visibleNodes: r,
|
|
484
|
+
hiddenNodes: a,
|
|
485
|
+
observe() {
|
|
486
|
+
u.observe(e, {
|
|
487
|
+
childList: !0,
|
|
488
|
+
subtree: !0
|
|
489
|
+
});
|
|
490
|
+
},
|
|
491
|
+
disconnect() {
|
|
492
|
+
u.disconnect();
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
return h.push(i), () => {
|
|
496
|
+
u.disconnect();
|
|
497
|
+
for (let n of a) {
|
|
498
|
+
let d = W.get(n);
|
|
499
|
+
d != null && (d === 1 ? (n.removeAttribute("aria-hidden"), W.delete(n)) : W.set(n, d - 1));
|
|
500
|
+
}
|
|
501
|
+
i === h[h.length - 1] ? (h.pop(), h.length && h[h.length - 1].observe()) : h.splice(h.indexOf(i), 1);
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function ho(t) {
|
|
505
|
+
let e = h[h.length - 1];
|
|
506
|
+
if (e && !e.visibleNodes.has(t))
|
|
507
|
+
return e.visibleNodes.add(t), () => {
|
|
508
|
+
e.visibleNodes.delete(t);
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
function Po(t, e) {
|
|
512
|
+
let { triggerRef: r, popoverRef: a, groupRef: o, isNonModal: s, isKeyboardDismissDisabled: u, shouldCloseOnInteractOutside: i, ...n } = t, d = n.trigger === "SubmenuTrigger", { overlayProps: l, underlayProps: $ } = $o({
|
|
513
|
+
isOpen: e.isOpen,
|
|
514
|
+
onClose: e.close,
|
|
515
|
+
shouldCloseOnBlur: !0,
|
|
516
|
+
isDismissable: !s || d,
|
|
517
|
+
isKeyboardDismissDisabled: u,
|
|
518
|
+
shouldCloseOnInteractOutside: i
|
|
519
|
+
}, o ?? a), { overlayProps: p, arrowProps: c, placement: b } = kr({
|
|
520
|
+
...n,
|
|
521
|
+
targetRef: r,
|
|
522
|
+
overlayRef: a,
|
|
523
|
+
isOpen: e.isOpen,
|
|
524
|
+
onClose: s && !d ? e.close : null
|
|
525
|
+
});
|
|
526
|
+
return bo({
|
|
527
|
+
isDisabled: s || !e.isOpen
|
|
528
|
+
}), j(() => {
|
|
529
|
+
if (e.isOpen && a.current) {
|
|
530
|
+
var x, g;
|
|
531
|
+
return s ? ho((x = o == null ? void 0 : o.current) !== null && x !== void 0 ? x : a.current) : yo([
|
|
532
|
+
(g = o == null ? void 0 : o.current) !== null && g !== void 0 ? g : a.current
|
|
533
|
+
]);
|
|
534
|
+
}
|
|
535
|
+
}, [
|
|
536
|
+
s,
|
|
537
|
+
e.isOpen,
|
|
538
|
+
a,
|
|
539
|
+
o
|
|
540
|
+
]), {
|
|
541
|
+
popoverProps: _(l, p),
|
|
542
|
+
arrowProps: c,
|
|
543
|
+
underlayProps: $,
|
|
544
|
+
placement: b
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
const At = /* @__PURE__ */ f.createContext(null);
|
|
548
|
+
function Ke(t) {
|
|
549
|
+
let e = Dr(), { portalContainer: r = e ? null : document.body, isExiting: a } = t, [o, s] = B(!1), u = z(() => ({
|
|
550
|
+
contain: o,
|
|
551
|
+
setContain: s
|
|
552
|
+
}), [
|
|
553
|
+
o,
|
|
554
|
+
s
|
|
555
|
+
]), { getContainer: i } = Br();
|
|
556
|
+
if (!t.portalContainer && i && (r = i()), !r) return null;
|
|
557
|
+
let n = t.children;
|
|
558
|
+
return t.disableFocusManagement || (n = /* @__PURE__ */ f.createElement(He, {
|
|
559
|
+
restoreFocus: !0,
|
|
560
|
+
contain: (t.shouldContainFocus || o) && !a
|
|
561
|
+
}, n)), n = /* @__PURE__ */ f.createElement(At.Provider, {
|
|
562
|
+
value: u
|
|
563
|
+
}, /* @__PURE__ */ f.createElement(co, null, n)), /* @__PURE__ */ ao.createPortal(n, r);
|
|
564
|
+
}
|
|
565
|
+
function Eo() {
|
|
566
|
+
let t = P(At), e = t == null ? void 0 : t.setContain;
|
|
567
|
+
j(() => {
|
|
568
|
+
e == null || e(!0);
|
|
569
|
+
}, [
|
|
570
|
+
e
|
|
571
|
+
]);
|
|
572
|
+
}
|
|
573
|
+
var Mt = {};
|
|
574
|
+
Mt = {
|
|
575
|
+
longPressMessage: "اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"
|
|
576
|
+
};
|
|
577
|
+
var St = {};
|
|
578
|
+
St = {
|
|
579
|
+
longPressMessage: "Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"
|
|
580
|
+
};
|
|
581
|
+
var kt = {};
|
|
582
|
+
kt = {
|
|
583
|
+
longPressMessage: "Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"
|
|
584
|
+
};
|
|
585
|
+
var Bt = {};
|
|
586
|
+
Bt = {
|
|
587
|
+
longPressMessage: "Langt tryk eller tryk på Alt + pil ned for at åbne menuen"
|
|
588
|
+
};
|
|
589
|
+
var Ft = {};
|
|
590
|
+
Ft = {
|
|
591
|
+
longPressMessage: "Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"
|
|
592
|
+
};
|
|
593
|
+
var Kt = {};
|
|
594
|
+
Kt = {
|
|
595
|
+
longPressMessage: "Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"
|
|
596
|
+
};
|
|
597
|
+
var Ot = {};
|
|
598
|
+
Ot = {
|
|
599
|
+
longPressMessage: "Long press or press Alt + ArrowDown to open menu"
|
|
600
|
+
};
|
|
601
|
+
var Tt = {};
|
|
602
|
+
Tt = {
|
|
603
|
+
longPressMessage: "Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"
|
|
604
|
+
};
|
|
605
|
+
var Rt = {};
|
|
606
|
+
Rt = {
|
|
607
|
+
longPressMessage: "Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"
|
|
608
|
+
};
|
|
609
|
+
var It = {};
|
|
610
|
+
It = {
|
|
611
|
+
longPressMessage: "Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"
|
|
612
|
+
};
|
|
613
|
+
var Nt = {};
|
|
614
|
+
Nt = {
|
|
615
|
+
longPressMessage: "Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."
|
|
616
|
+
};
|
|
617
|
+
var Lt = {};
|
|
618
|
+
Lt = {
|
|
619
|
+
longPressMessage: "לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"
|
|
620
|
+
};
|
|
621
|
+
var zt = {};
|
|
622
|
+
zt = {
|
|
623
|
+
longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"
|
|
624
|
+
};
|
|
625
|
+
var _t = {};
|
|
626
|
+
_t = {
|
|
627
|
+
longPressMessage: "Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"
|
|
628
|
+
};
|
|
629
|
+
var Ht = {};
|
|
630
|
+
Ht = {
|
|
631
|
+
longPressMessage: "Premere a lungo o premere Alt + Freccia giù per aprire il menu"
|
|
632
|
+
};
|
|
633
|
+
var Ut = {};
|
|
634
|
+
Ut = {
|
|
635
|
+
longPressMessage: "長押しまたは Alt+下矢印キーでメニューを開く"
|
|
636
|
+
};
|
|
637
|
+
var Vt = {};
|
|
638
|
+
Vt = {
|
|
639
|
+
longPressMessage: "길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"
|
|
640
|
+
};
|
|
641
|
+
var Wt = {};
|
|
642
|
+
Wt = {
|
|
643
|
+
longPressMessage: "Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."
|
|
644
|
+
};
|
|
645
|
+
var jt = {};
|
|
646
|
+
jt = {
|
|
647
|
+
longPressMessage: "Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"
|
|
648
|
+
};
|
|
649
|
+
var Gt = {};
|
|
650
|
+
Gt = {
|
|
651
|
+
longPressMessage: "Langt trykk eller trykk Alt + PilNed for å åpne menyen"
|
|
652
|
+
};
|
|
653
|
+
var qt = {};
|
|
654
|
+
qt = {
|
|
655
|
+
longPressMessage: "Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"
|
|
656
|
+
};
|
|
657
|
+
var Zt = {};
|
|
658
|
+
Zt = {
|
|
659
|
+
longPressMessage: "Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"
|
|
660
|
+
};
|
|
661
|
+
var Jt = {};
|
|
662
|
+
Jt = {
|
|
663
|
+
longPressMessage: "Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"
|
|
664
|
+
};
|
|
665
|
+
var Yt = {};
|
|
666
|
+
Yt = {
|
|
667
|
+
longPressMessage: "Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"
|
|
668
|
+
};
|
|
669
|
+
var Xt = {};
|
|
670
|
+
Xt = {
|
|
671
|
+
longPressMessage: "Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"
|
|
672
|
+
};
|
|
673
|
+
var Qt = {};
|
|
674
|
+
Qt = {
|
|
675
|
+
longPressMessage: "Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"
|
|
676
|
+
};
|
|
677
|
+
var er = {};
|
|
678
|
+
er = {
|
|
679
|
+
longPressMessage: "Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"
|
|
680
|
+
};
|
|
681
|
+
var tr = {};
|
|
682
|
+
tr = {
|
|
683
|
+
longPressMessage: "Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"
|
|
684
|
+
};
|
|
685
|
+
var rr = {};
|
|
686
|
+
rr = {
|
|
687
|
+
longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"
|
|
688
|
+
};
|
|
689
|
+
var or = {};
|
|
690
|
+
or = {
|
|
691
|
+
longPressMessage: "Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"
|
|
692
|
+
};
|
|
693
|
+
var ar = {};
|
|
694
|
+
ar = {
|
|
695
|
+
longPressMessage: "Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"
|
|
696
|
+
};
|
|
697
|
+
var nr = {};
|
|
698
|
+
nr = {
|
|
699
|
+
longPressMessage: "Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"
|
|
700
|
+
};
|
|
701
|
+
var sr = {};
|
|
702
|
+
sr = {
|
|
703
|
+
longPressMessage: "长按或按 Alt + 向下方向键以打开菜单"
|
|
704
|
+
};
|
|
705
|
+
var lr = {};
|
|
706
|
+
lr = {
|
|
707
|
+
longPressMessage: "長按或按 Alt+向下鍵以開啟功能表"
|
|
708
|
+
};
|
|
709
|
+
var ir = {};
|
|
710
|
+
ir = {
|
|
711
|
+
"ar-AE": Mt,
|
|
712
|
+
"bg-BG": St,
|
|
713
|
+
"cs-CZ": kt,
|
|
714
|
+
"da-DK": Bt,
|
|
715
|
+
"de-DE": Ft,
|
|
716
|
+
"el-GR": Kt,
|
|
717
|
+
"en-US": Ot,
|
|
718
|
+
"es-ES": Tt,
|
|
719
|
+
"et-EE": Rt,
|
|
720
|
+
"fi-FI": It,
|
|
721
|
+
"fr-FR": Nt,
|
|
722
|
+
"he-IL": Lt,
|
|
723
|
+
"hr-HR": zt,
|
|
724
|
+
"hu-HU": _t,
|
|
725
|
+
"it-IT": Ht,
|
|
726
|
+
"ja-JP": Ut,
|
|
727
|
+
"ko-KR": Vt,
|
|
728
|
+
"lt-LT": Wt,
|
|
729
|
+
"lv-LV": jt,
|
|
730
|
+
"nb-NO": Gt,
|
|
731
|
+
"nl-NL": qt,
|
|
732
|
+
"pl-PL": Zt,
|
|
733
|
+
"pt-BR": Jt,
|
|
734
|
+
"pt-PT": Yt,
|
|
735
|
+
"ro-RO": Xt,
|
|
736
|
+
"ru-RU": Qt,
|
|
737
|
+
"sk-SK": er,
|
|
738
|
+
"sl-SI": tr,
|
|
739
|
+
"sr-SP": rr,
|
|
740
|
+
"sv-SE": or,
|
|
741
|
+
"tr-TR": ar,
|
|
742
|
+
"uk-UA": nr,
|
|
743
|
+
"zh-CN": sr,
|
|
744
|
+
"zh-TW": lr
|
|
745
|
+
};
|
|
746
|
+
function Do(t) {
|
|
747
|
+
return t && t.__esModule ? t.default : t;
|
|
748
|
+
}
|
|
749
|
+
function Co(t, e, r) {
|
|
750
|
+
let { type: a = "menu", isDisabled: o, trigger: s = "press" } = t, u = re(), { triggerProps: i, overlayProps: n } = We({
|
|
751
|
+
type: a
|
|
752
|
+
}, e, r), d = (c) => {
|
|
753
|
+
if (!o && !(s === "longPress" && !c.altKey) && r && r.current)
|
|
754
|
+
switch (c.key) {
|
|
755
|
+
case "Enter":
|
|
756
|
+
case " ":
|
|
757
|
+
if (s === "longPress") return;
|
|
758
|
+
case "ArrowDown":
|
|
759
|
+
"continuePropagation" in c || c.stopPropagation(), c.preventDefault(), e.toggle("first");
|
|
760
|
+
break;
|
|
761
|
+
case "ArrowUp":
|
|
762
|
+
"continuePropagation" in c || c.stopPropagation(), c.preventDefault(), e.toggle("last");
|
|
763
|
+
break;
|
|
764
|
+
default:
|
|
765
|
+
"continuePropagation" in c && c.continuePropagation();
|
|
766
|
+
}
|
|
767
|
+
}, l = _e(Do(ir), "@react-aria/menu"), { longPressProps: $ } = Wr({
|
|
768
|
+
isDisabled: o || s !== "longPress",
|
|
769
|
+
accessibilityDescription: l.format("longPressMessage"),
|
|
770
|
+
onLongPressStart() {
|
|
771
|
+
e.close();
|
|
772
|
+
},
|
|
773
|
+
onLongPress() {
|
|
774
|
+
e.open("first");
|
|
775
|
+
}
|
|
776
|
+
}), p = {
|
|
777
|
+
preventFocusOnPress: !0,
|
|
778
|
+
onPressStart(c) {
|
|
779
|
+
c.pointerType !== "touch" && c.pointerType !== "keyboard" && !o && (Se(c.target), e.open(c.pointerType === "virtual" ? "first" : null));
|
|
780
|
+
},
|
|
781
|
+
onPress(c) {
|
|
782
|
+
c.pointerType === "touch" && !o && (Se(c.target), e.toggle());
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
return delete i.onPress, {
|
|
786
|
+
// @ts-ignore - TODO we pass out both DOMAttributes AND AriaButtonProps, but useButton will discard the longPress event handlers, it's only through PressResponder magic that this works for RSP and RAC. it does not work in aria examples
|
|
787
|
+
menuTriggerProps: {
|
|
788
|
+
...i,
|
|
789
|
+
...s === "press" ? p : $,
|
|
790
|
+
id: u,
|
|
791
|
+
onKeyDown: d
|
|
792
|
+
},
|
|
793
|
+
menuProps: {
|
|
794
|
+
...n,
|
|
795
|
+
"aria-labelledby": u,
|
|
796
|
+
autoFocus: e.focusStrategy || !0,
|
|
797
|
+
onClose: e.close
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
const ur = /* @__PURE__ */ new WeakMap();
|
|
802
|
+
function wo(t, e, r) {
|
|
803
|
+
let { shouldFocusWrap: a = !0, onKeyDown: o, onKeyUp: s, ...u } = t;
|
|
804
|
+
!t["aria-label"] && !t["aria-labelledby"] && process.env.NODE_ENV !== "production" && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
805
|
+
let i = K(t, {
|
|
806
|
+
labelable: !0
|
|
807
|
+
}), { listProps: n } = zr({
|
|
808
|
+
...u,
|
|
809
|
+
ref: r,
|
|
810
|
+
selectionManager: e.selectionManager,
|
|
811
|
+
collection: e.collection,
|
|
812
|
+
disabledKeys: e.disabledKeys,
|
|
813
|
+
shouldFocusWrap: a,
|
|
814
|
+
linkBehavior: "override"
|
|
815
|
+
});
|
|
816
|
+
return ur.set(e, {
|
|
817
|
+
onClose: t.onClose,
|
|
818
|
+
onAction: t.onAction,
|
|
819
|
+
shouldUseVirtualFocus: t.shouldUseVirtualFocus
|
|
820
|
+
}), {
|
|
821
|
+
menuProps: _(i, {
|
|
822
|
+
onKeyDown: o,
|
|
823
|
+
onKeyUp: s
|
|
824
|
+
}, {
|
|
825
|
+
role: "menu",
|
|
826
|
+
...n,
|
|
827
|
+
onKeyDown: (d) => {
|
|
828
|
+
var l;
|
|
829
|
+
(d.key !== "Escape" || t.shouldUseVirtualFocus) && ((l = n.onKeyDown) === null || l === void 0 || l.call(n, d));
|
|
830
|
+
}
|
|
831
|
+
})
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function Ao(t, e, r) {
|
|
835
|
+
let { id: a, key: o, closeOnSelect: s, isVirtualized: u, "aria-haspopup": i, onPressStart: n, onPressUp: d, onPress: l, onPressChange: $, onPressEnd: p, onHoverStart: c, onHoverChange: b, onHoverEnd: x, onKeyDown: g, onKeyUp: O, onFocus: T, onFocusChange: q, onBlur: A, selectionManager: y = e.selectionManager } = t, E = !!i, U = E && t["aria-expanded"] === "true";
|
|
836
|
+
var R;
|
|
837
|
+
let C = (R = t.isDisabled) !== null && R !== void 0 ? R : y.isDisabled(o);
|
|
838
|
+
var S;
|
|
839
|
+
let Z = (S = t.isSelected) !== null && S !== void 0 ? S : y.isSelected(o), I = ur.get(e), v = e.collection.getItem(o), N = t.onClose || I.onClose, fr = qr(), ne = (m) => {
|
|
840
|
+
var le;
|
|
841
|
+
if (!E) {
|
|
842
|
+
if (!(v == null || (le = v.props) === null || le === void 0) && le.onAction ? v.props.onAction() : t.onAction && t.onAction(o), I.onAction) {
|
|
843
|
+
let Pr = I.onAction;
|
|
844
|
+
Pr(o);
|
|
845
|
+
}
|
|
846
|
+
m.target instanceof HTMLAnchorElement && v && fr.open(m.target, m, v.props.href, v.props.routerOptions);
|
|
847
|
+
}
|
|
848
|
+
}, se = "menuitem";
|
|
849
|
+
E || (y.selectionMode === "single" ? se = "menuitemradio" : y.selectionMode === "multiple" && (se = "menuitemcheckbox"));
|
|
850
|
+
let he = Q(), Pe = Q(), Ee = Q(), J = {
|
|
851
|
+
id: a,
|
|
852
|
+
"aria-disabled": C || void 0,
|
|
853
|
+
role: se,
|
|
854
|
+
"aria-label": t["aria-label"],
|
|
855
|
+
"aria-labelledby": he,
|
|
856
|
+
"aria-describedby": [
|
|
857
|
+
Pe,
|
|
858
|
+
Ee
|
|
859
|
+
].filter(Boolean).join(" ") || void 0,
|
|
860
|
+
"aria-controls": t["aria-controls"],
|
|
861
|
+
"aria-haspopup": i,
|
|
862
|
+
"aria-expanded": t["aria-expanded"]
|
|
863
|
+
};
|
|
864
|
+
y.selectionMode !== "none" && !E && (J["aria-checked"] = Z), u && (J["aria-posinset"] = v == null ? void 0 : v.index, J["aria-setsize"] = _r(e.collection));
|
|
865
|
+
let $r = (m) => {
|
|
866
|
+
m.pointerType === "keyboard" && ne(m), n == null || n(m);
|
|
867
|
+
}, De = () => {
|
|
868
|
+
!E && N && (s ?? (y.selectionMode !== "multiple" || y.isLink(o))) && N();
|
|
869
|
+
}, pr = (m) => {
|
|
870
|
+
m.pointerType === "mouse" && (ne(m), De()), d == null || d(m);
|
|
871
|
+
}, br = (m) => {
|
|
872
|
+
m.pointerType !== "keyboard" && m.pointerType !== "mouse" && (ne(m), De()), l == null || l(m);
|
|
873
|
+
}, { itemProps: L, isFocused: Ce } = jr({
|
|
874
|
+
id: a,
|
|
875
|
+
selectionManager: y,
|
|
876
|
+
key: o,
|
|
877
|
+
ref: r,
|
|
878
|
+
shouldSelectOnPressUp: !0,
|
|
879
|
+
allowsDifferentPressOrigin: !0,
|
|
880
|
+
// Disable all handling of links in useSelectable item
|
|
881
|
+
// because we handle it ourselves. The behavior of menus
|
|
882
|
+
// is slightly different from other collections because
|
|
883
|
+
// actions are performed on key down rather than key up.
|
|
884
|
+
linkBehavior: "none",
|
|
885
|
+
shouldUseVirtualFocus: I.shouldUseVirtualFocus
|
|
886
|
+
}), { pressProps: mr, isPressed: gr } = Zr({
|
|
887
|
+
onPressStart: $r,
|
|
888
|
+
onPress: br,
|
|
889
|
+
onPressUp: pr,
|
|
890
|
+
onPressChange: $,
|
|
891
|
+
onPressEnd: p,
|
|
892
|
+
isDisabled: C
|
|
893
|
+
}), { hoverProps: vr } = ze({
|
|
894
|
+
isDisabled: C,
|
|
895
|
+
onHoverStart(m) {
|
|
896
|
+
!ke() && !(U && i) && (y.setFocused(!0), y.setFocusedKey(o)), c == null || c(m);
|
|
897
|
+
},
|
|
898
|
+
onHoverChange: b,
|
|
899
|
+
onHoverEnd: x
|
|
900
|
+
}), { keyboardProps: xr } = Xr({
|
|
901
|
+
onKeyDown: (m) => {
|
|
902
|
+
if (m.repeat) {
|
|
903
|
+
m.continuePropagation();
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
switch (m.key) {
|
|
907
|
+
case " ":
|
|
908
|
+
!C && y.selectionMode === "none" && !E && s !== !1 && N && N();
|
|
909
|
+
break;
|
|
910
|
+
case "Enter":
|
|
911
|
+
!C && s !== !1 && !E && N && N();
|
|
912
|
+
break;
|
|
913
|
+
default:
|
|
914
|
+
E || m.continuePropagation(), g == null || g(m);
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
onKeyUp: O
|
|
919
|
+
}), { focusProps: yr } = to({
|
|
920
|
+
onBlur: A,
|
|
921
|
+
onFocus: T,
|
|
922
|
+
onFocusChange: q
|
|
923
|
+
}), we = K(v == null ? void 0 : v.props);
|
|
924
|
+
delete we.id;
|
|
925
|
+
let hr = Jr(v == null ? void 0 : v.props);
|
|
926
|
+
return {
|
|
927
|
+
menuItemProps: {
|
|
928
|
+
...J,
|
|
929
|
+
..._(
|
|
930
|
+
we,
|
|
931
|
+
hr,
|
|
932
|
+
E ? {
|
|
933
|
+
onFocus: L.onFocus,
|
|
934
|
+
"data-collection": L["data-collection"],
|
|
935
|
+
"data-key": L["data-key"]
|
|
936
|
+
} : L,
|
|
937
|
+
mr,
|
|
938
|
+
vr,
|
|
939
|
+
xr,
|
|
940
|
+
yr,
|
|
941
|
+
// Prevent DOM focus from moving on mouse down when using virtual focus or this is a submenu/subdialog trigger.
|
|
942
|
+
I.shouldUseVirtualFocus || E ? {
|
|
943
|
+
onMouseDown: (m) => m.preventDefault()
|
|
944
|
+
} : void 0
|
|
945
|
+
),
|
|
946
|
+
// If a submenu is expanded, set the tabIndex to -1 so that shift tabbing goes out of the menu instead of the parent menu item.
|
|
947
|
+
tabIndex: L.tabIndex != null && U && !I.shouldUseVirtualFocus ? -1 : L.tabIndex
|
|
948
|
+
},
|
|
949
|
+
labelProps: {
|
|
950
|
+
id: he
|
|
951
|
+
},
|
|
952
|
+
descriptionProps: {
|
|
953
|
+
id: Pe
|
|
954
|
+
},
|
|
955
|
+
keyboardShortcutProps: {
|
|
956
|
+
id: Ee
|
|
957
|
+
},
|
|
958
|
+
isFocused: Ce,
|
|
959
|
+
isFocusVisible: Ce && y.isFocused && ke() && !U,
|
|
960
|
+
isSelected: Z,
|
|
961
|
+
isPressed: gr,
|
|
962
|
+
isDisabled: C
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
function Mo(t) {
|
|
966
|
+
let { heading: e, "aria-label": r } = t, a = re();
|
|
967
|
+
return {
|
|
968
|
+
itemProps: {
|
|
969
|
+
role: "presentation"
|
|
970
|
+
},
|
|
971
|
+
headingProps: e ? {
|
|
972
|
+
// Techincally, menus cannot contain headings according to ARIA.
|
|
973
|
+
// We hide the heading from assistive technology, using role="presentation",
|
|
974
|
+
// and only use it as a label for the nested group.
|
|
975
|
+
id: a,
|
|
976
|
+
role: "presentation"
|
|
977
|
+
} : {},
|
|
978
|
+
groupProps: {
|
|
979
|
+
role: "group",
|
|
980
|
+
"aria-label": r,
|
|
981
|
+
"aria-labelledby": e ? a : void 0
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
function So(t, e) {
|
|
986
|
+
let { role: r = "dialog" } = t, a = Q();
|
|
987
|
+
a = t["aria-label"] ? void 0 : a;
|
|
988
|
+
let o = M(!1);
|
|
989
|
+
return F(() => {
|
|
990
|
+
if (e.current && !e.current.contains(document.activeElement)) {
|
|
991
|
+
$e(e.current);
|
|
992
|
+
let s = setTimeout(() => {
|
|
993
|
+
document.activeElement === e.current && (o.current = !0, e.current && (e.current.blur(), $e(e.current)), o.current = !1);
|
|
994
|
+
}, 500);
|
|
995
|
+
return () => {
|
|
996
|
+
clearTimeout(s);
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
}, [
|
|
1000
|
+
e
|
|
1001
|
+
]), Eo(), {
|
|
1002
|
+
dialogProps: {
|
|
1003
|
+
...K(t, {
|
|
1004
|
+
labelable: !0
|
|
1005
|
+
}),
|
|
1006
|
+
role: r,
|
|
1007
|
+
tabIndex: -1,
|
|
1008
|
+
"aria-labelledby": t["aria-labelledby"] || a,
|
|
1009
|
+
// Prevent blur events from reaching useOverlay, which may cause
|
|
1010
|
+
// popovers to close. Since focus is contained within the dialog,
|
|
1011
|
+
// we don't want this to occur due to the above useEffect.
|
|
1012
|
+
onBlur: (s) => {
|
|
1013
|
+
o.current && s.stopPropagation();
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
titleProps: {
|
|
1017
|
+
id: a
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
function ve(t) {
|
|
1022
|
+
let e = Te(t), [r, a] = B(null), [o, s] = B([]), u = () => {
|
|
1023
|
+
s([]), e.close();
|
|
1024
|
+
};
|
|
1025
|
+
return {
|
|
1026
|
+
focusStrategy: r,
|
|
1027
|
+
...e,
|
|
1028
|
+
open(d = null) {
|
|
1029
|
+
a(d), e.open();
|
|
1030
|
+
},
|
|
1031
|
+
toggle(d = null) {
|
|
1032
|
+
a(d), e.toggle();
|
|
1033
|
+
},
|
|
1034
|
+
close() {
|
|
1035
|
+
u();
|
|
1036
|
+
},
|
|
1037
|
+
expandedKeysStack: o,
|
|
1038
|
+
openSubmenu: (d, l) => {
|
|
1039
|
+
s(($) => l > $.length ? $ : [
|
|
1040
|
+
...$.slice(0, l),
|
|
1041
|
+
d
|
|
1042
|
+
]);
|
|
1043
|
+
},
|
|
1044
|
+
closeSubmenu: (d, l) => {
|
|
1045
|
+
s(($) => $[l] === d ? $.slice(0, l) : $);
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
class ko {
|
|
1050
|
+
*[Symbol.iterator]() {
|
|
1051
|
+
yield* this.iterable;
|
|
1052
|
+
}
|
|
1053
|
+
get size() {
|
|
1054
|
+
return this.keyMap.size;
|
|
1055
|
+
}
|
|
1056
|
+
getKeys() {
|
|
1057
|
+
return this.keyMap.keys();
|
|
1058
|
+
}
|
|
1059
|
+
getKeyBefore(e) {
|
|
1060
|
+
let r = this.keyMap.get(e);
|
|
1061
|
+
var a;
|
|
1062
|
+
return r && (a = r.prevKey) !== null && a !== void 0 ? a : null;
|
|
1063
|
+
}
|
|
1064
|
+
getKeyAfter(e) {
|
|
1065
|
+
let r = this.keyMap.get(e);
|
|
1066
|
+
var a;
|
|
1067
|
+
return r && (a = r.nextKey) !== null && a !== void 0 ? a : null;
|
|
1068
|
+
}
|
|
1069
|
+
getFirstKey() {
|
|
1070
|
+
return this.firstKey;
|
|
1071
|
+
}
|
|
1072
|
+
getLastKey() {
|
|
1073
|
+
return this.lastKey;
|
|
1074
|
+
}
|
|
1075
|
+
getItem(e) {
|
|
1076
|
+
var r;
|
|
1077
|
+
return (r = this.keyMap.get(e)) !== null && r !== void 0 ? r : null;
|
|
1078
|
+
}
|
|
1079
|
+
at(e) {
|
|
1080
|
+
const r = [
|
|
1081
|
+
...this.getKeys()
|
|
1082
|
+
];
|
|
1083
|
+
return this.getItem(r[e]);
|
|
1084
|
+
}
|
|
1085
|
+
constructor(e, { expandedKeys: r } = {}) {
|
|
1086
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e, r = r || /* @__PURE__ */ new Set();
|
|
1087
|
+
let a = (i) => {
|
|
1088
|
+
if (this.keyMap.set(i.key, i), i.childNodes && (i.type === "section" || r.has(i.key))) for (let n of i.childNodes) a(n);
|
|
1089
|
+
};
|
|
1090
|
+
for (let i of e) a(i);
|
|
1091
|
+
let o = null, s = 0;
|
|
1092
|
+
for (let [i, n] of this.keyMap)
|
|
1093
|
+
o ? (o.nextKey = i, n.prevKey = o.key) : (this.firstKey = i, n.prevKey = void 0), n.type === "item" && (n.index = s++), o = n, o.nextKey = void 0;
|
|
1094
|
+
var u;
|
|
1095
|
+
this.lastKey = (u = o == null ? void 0 : o.key) !== null && u !== void 0 ? u : null;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
function Bo(t) {
|
|
1099
|
+
let { onExpandedChange: e } = t, [r, a] = ro(t.expandedKeys ? new Set(t.expandedKeys) : void 0, t.defaultExpandedKeys ? new Set(t.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e), o = Ne(t), s = z(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
1100
|
+
t.disabledKeys
|
|
1101
|
+
]), u = Gr(t, me((n) => new ko(n, {
|
|
1102
|
+
expandedKeys: r
|
|
1103
|
+
}), [
|
|
1104
|
+
r
|
|
1105
|
+
]), null);
|
|
1106
|
+
return F(() => {
|
|
1107
|
+
o.focusedKey != null && !u.getItem(o.focusedKey) && o.setFocusedKey(null);
|
|
1108
|
+
}, [
|
|
1109
|
+
u,
|
|
1110
|
+
o.focusedKey
|
|
1111
|
+
]), {
|
|
1112
|
+
collection: u,
|
|
1113
|
+
expandedKeys: r,
|
|
1114
|
+
disabledKeys: s,
|
|
1115
|
+
toggleKey: (n) => {
|
|
1116
|
+
a(Fo(r, n));
|
|
1117
|
+
},
|
|
1118
|
+
setExpandedKeys: a,
|
|
1119
|
+
selectionManager: new Le(u, o)
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function Fo(t, e) {
|
|
1123
|
+
let r = new Set(t);
|
|
1124
|
+
return r.has(e) ? r.delete(e) : r.add(e), r;
|
|
1125
|
+
}
|
|
1126
|
+
const xe = /* @__PURE__ */ D(null), Oe = /* @__PURE__ */ D(null), ia = /* @__PURE__ */ ge(function(e, r) {
|
|
1127
|
+
[e, r] = oe(e, r, xe);
|
|
1128
|
+
let a = P(ae), o = Te(e), s = e.isOpen != null || e.defaultOpen != null || !a ? o : a, u = Fr(r, s.isOpen) || e.isExiting || !1, i = no(), { direction: n } = so();
|
|
1129
|
+
if (i) {
|
|
1130
|
+
let d = e.children;
|
|
1131
|
+
return typeof d == "function" && (d = d({
|
|
1132
|
+
trigger: e.trigger || null,
|
|
1133
|
+
placement: "bottom",
|
|
1134
|
+
isEntering: !1,
|
|
1135
|
+
isExiting: !1,
|
|
1136
|
+
defaultChildren: null
|
|
1137
|
+
})), /* @__PURE__ */ f.createElement(f.Fragment, null, d);
|
|
1138
|
+
}
|
|
1139
|
+
return s && !s.isOpen && !u ? null : /* @__PURE__ */ f.createElement(Ko, {
|
|
1140
|
+
...e,
|
|
1141
|
+
triggerRef: e.triggerRef,
|
|
1142
|
+
state: s,
|
|
1143
|
+
popoverRef: r,
|
|
1144
|
+
isExiting: u,
|
|
1145
|
+
dir: n
|
|
1146
|
+
});
|
|
1147
|
+
});
|
|
1148
|
+
function Ko({ state: t, isExiting: e, UNSTABLE_portalContainer: r, clearContexts: a, ...o }) {
|
|
1149
|
+
let s = M(null), [u, i] = B(0), n = M(null), d = P(Oe), l = d && o.trigger === "SubmenuTrigger";
|
|
1150
|
+
j(() => {
|
|
1151
|
+
s.current && t.isOpen && i(s.current.getBoundingClientRect().width);
|
|
1152
|
+
}, [
|
|
1153
|
+
t.isOpen,
|
|
1154
|
+
s
|
|
1155
|
+
]);
|
|
1156
|
+
var $;
|
|
1157
|
+
let { popoverProps: p, underlayProps: c, arrowProps: b, placement: x } = Po({
|
|
1158
|
+
...o,
|
|
1159
|
+
offset: ($ = o.offset) !== null && $ !== void 0 ? $ : 8,
|
|
1160
|
+
arrowSize: u,
|
|
1161
|
+
// If this is a submenu/subdialog, use the root popover's container
|
|
1162
|
+
// to detect outside interaction and add aria-hidden.
|
|
1163
|
+
groupRef: l ? d : n
|
|
1164
|
+
}, t), g = o.popoverRef, O = Kr(g, !!x) || o.isEntering || !1, T = G({
|
|
1165
|
+
...o,
|
|
1166
|
+
defaultClassName: "react-aria-Popover",
|
|
1167
|
+
values: {
|
|
1168
|
+
trigger: o.trigger || null,
|
|
1169
|
+
placement: x,
|
|
1170
|
+
isEntering: O,
|
|
1171
|
+
isExiting: e
|
|
1172
|
+
}
|
|
1173
|
+
}), q = !o.isNonModal || o.trigger === "SubmenuTrigger", [A, y] = B(!1);
|
|
1174
|
+
j(() => {
|
|
1175
|
+
g.current && y(q && !g.current.querySelector("[role=dialog]"));
|
|
1176
|
+
}, [
|
|
1177
|
+
g,
|
|
1178
|
+
q
|
|
1179
|
+
]), F(() => {
|
|
1180
|
+
A && g.current && !g.current.contains(document.activeElement) && $e(g.current);
|
|
1181
|
+
}, [
|
|
1182
|
+
A,
|
|
1183
|
+
g
|
|
1184
|
+
]);
|
|
1185
|
+
let E = z(() => {
|
|
1186
|
+
let S = T.children;
|
|
1187
|
+
if (a) for (let Z of a) S = /* @__PURE__ */ f.createElement(Z.Provider, {
|
|
1188
|
+
value: null
|
|
1189
|
+
}, S);
|
|
1190
|
+
return S;
|
|
1191
|
+
}, [
|
|
1192
|
+
T.children,
|
|
1193
|
+
a
|
|
1194
|
+
]), U = {
|
|
1195
|
+
...p.style,
|
|
1196
|
+
...T.style
|
|
1197
|
+
}, R = /* @__PURE__ */ f.createElement("div", {
|
|
1198
|
+
..._(K(o), p),
|
|
1199
|
+
...T,
|
|
1200
|
+
role: A ? "dialog" : void 0,
|
|
1201
|
+
tabIndex: A ? -1 : void 0,
|
|
1202
|
+
"aria-label": o["aria-label"],
|
|
1203
|
+
"aria-labelledby": o["aria-labelledby"],
|
|
1204
|
+
ref: g,
|
|
1205
|
+
slot: o.slot || void 0,
|
|
1206
|
+
style: U,
|
|
1207
|
+
dir: o.dir,
|
|
1208
|
+
"data-trigger": o.trigger,
|
|
1209
|
+
"data-placement": x,
|
|
1210
|
+
"data-entering": O || void 0,
|
|
1211
|
+
"data-exiting": e || void 0
|
|
1212
|
+
}, !o.isNonModal && /* @__PURE__ */ f.createElement(Fe, {
|
|
1213
|
+
onDismiss: t.close
|
|
1214
|
+
}), /* @__PURE__ */ f.createElement(Or.Provider, {
|
|
1215
|
+
value: {
|
|
1216
|
+
...b,
|
|
1217
|
+
placement: x,
|
|
1218
|
+
ref: s
|
|
1219
|
+
}
|
|
1220
|
+
}, E), /* @__PURE__ */ f.createElement(Fe, {
|
|
1221
|
+
onDismiss: t.close
|
|
1222
|
+
}));
|
|
1223
|
+
if (!l) return /* @__PURE__ */ f.createElement(Ke, {
|
|
1224
|
+
...o,
|
|
1225
|
+
shouldContainFocus: A,
|
|
1226
|
+
isExiting: e,
|
|
1227
|
+
portalContainer: r
|
|
1228
|
+
}, !o.isNonModal && t.isOpen && /* @__PURE__ */ f.createElement("div", {
|
|
1229
|
+
"data-testid": "underlay",
|
|
1230
|
+
...c,
|
|
1231
|
+
style: {
|
|
1232
|
+
position: "fixed",
|
|
1233
|
+
inset: 0
|
|
1234
|
+
}
|
|
1235
|
+
}), /* @__PURE__ */ f.createElement("div", {
|
|
1236
|
+
ref: n,
|
|
1237
|
+
style: {
|
|
1238
|
+
display: "contents"
|
|
1239
|
+
}
|
|
1240
|
+
}, /* @__PURE__ */ f.createElement(Oe.Provider, {
|
|
1241
|
+
value: n
|
|
1242
|
+
}, R)));
|
|
1243
|
+
var C;
|
|
1244
|
+
return /* @__PURE__ */ f.createElement(Ke, {
|
|
1245
|
+
...o,
|
|
1246
|
+
shouldContainFocus: A,
|
|
1247
|
+
isExiting: e,
|
|
1248
|
+
portalContainer: (C = r ?? (d == null ? void 0 : d.current)) !== null && C !== void 0 ? C : void 0
|
|
1249
|
+
}, R);
|
|
1250
|
+
}
|
|
1251
|
+
const Oo = /* @__PURE__ */ D({}), dr = /* @__PURE__ */ D(null), ye = /* @__PURE__ */ D(null), ee = /* @__PURE__ */ D(null), te = /* @__PURE__ */ D(null);
|
|
1252
|
+
function ua(t) {
|
|
1253
|
+
let e = ve(t), r = M(null), { menuTriggerProps: a, menuProps: o } = Co({
|
|
1254
|
+
...t,
|
|
1255
|
+
type: "menu"
|
|
1256
|
+
}, e, r), [s, u] = B(null), i = me(() => {
|
|
1257
|
+
r.current && u(r.current.offsetWidth + "px");
|
|
1258
|
+
}, [
|
|
1259
|
+
r
|
|
1260
|
+
]);
|
|
1261
|
+
Re({
|
|
1262
|
+
ref: r,
|
|
1263
|
+
onResize: i
|
|
1264
|
+
});
|
|
1265
|
+
let n = M(null);
|
|
1266
|
+
return /* @__PURE__ */ f.createElement(H, {
|
|
1267
|
+
values: [
|
|
1268
|
+
[
|
|
1269
|
+
dr,
|
|
1270
|
+
{
|
|
1271
|
+
...o,
|
|
1272
|
+
ref: n
|
|
1273
|
+
}
|
|
1274
|
+
],
|
|
1275
|
+
[
|
|
1276
|
+
ae,
|
|
1277
|
+
e
|
|
1278
|
+
],
|
|
1279
|
+
[
|
|
1280
|
+
ee,
|
|
1281
|
+
e
|
|
1282
|
+
],
|
|
1283
|
+
[
|
|
1284
|
+
xe,
|
|
1285
|
+
{
|
|
1286
|
+
trigger: "MenuTrigger",
|
|
1287
|
+
triggerRef: r,
|
|
1288
|
+
scrollRef: n,
|
|
1289
|
+
placement: "bottom start",
|
|
1290
|
+
style: {
|
|
1291
|
+
"--trigger-width": s
|
|
1292
|
+
},
|
|
1293
|
+
"aria-labelledby": o["aria-labelledby"]
|
|
1294
|
+
}
|
|
1295
|
+
]
|
|
1296
|
+
]
|
|
1297
|
+
}, /* @__PURE__ */ f.createElement(Ve, {
|
|
1298
|
+
...a,
|
|
1299
|
+
ref: r,
|
|
1300
|
+
isPressed: e.isOpen
|
|
1301
|
+
}, t.children));
|
|
1302
|
+
}
|
|
1303
|
+
const To = /* @__PURE__ */ D(null), da = /* @__PURE__ */ ge(function(e, r) {
|
|
1304
|
+
return [e, r] = oe(e, r, dr), /* @__PURE__ */ f.createElement(Rr, {
|
|
1305
|
+
content: /* @__PURE__ */ f.createElement(Ir, e)
|
|
1306
|
+
}, (a) => /* @__PURE__ */ f.createElement(Ro, {
|
|
1307
|
+
props: e,
|
|
1308
|
+
collection: a,
|
|
1309
|
+
menuRef: r
|
|
1310
|
+
}));
|
|
1311
|
+
});
|
|
1312
|
+
function Ro({ props: t, collection: e, menuRef: r }) {
|
|
1313
|
+
let { filter: a, collectionProps: o, collectionRef: s } = P(Me) || {};
|
|
1314
|
+
r = be(z(() => wr(r, s !== void 0 ? s : null), [
|
|
1315
|
+
s,
|
|
1316
|
+
r
|
|
1317
|
+
]));
|
|
1318
|
+
let u = z(() => a ? e.UNSTABLE_filter(a) : e, [
|
|
1319
|
+
e,
|
|
1320
|
+
a
|
|
1321
|
+
]), i = Bo({
|
|
1322
|
+
...t,
|
|
1323
|
+
collection: u,
|
|
1324
|
+
children: void 0
|
|
1325
|
+
}), n = P(ee), { isVirtualized: d, CollectionRoot: l } = P(Ie), { menuProps: $ } = wo({
|
|
1326
|
+
...t,
|
|
1327
|
+
...o,
|
|
1328
|
+
isVirtualized: d,
|
|
1329
|
+
onClose: t.onClose || (n == null ? void 0 : n.close)
|
|
1330
|
+
}, i, r), p = G({
|
|
1331
|
+
defaultClassName: "react-aria-Menu",
|
|
1332
|
+
className: t.className,
|
|
1333
|
+
style: t.style,
|
|
1334
|
+
values: {
|
|
1335
|
+
isEmpty: i.collection.size === 0
|
|
1336
|
+
}
|
|
1337
|
+
}), c = null;
|
|
1338
|
+
return i.collection.size === 0 && t.renderEmptyState && (c = /* @__PURE__ */ f.createElement("div", {
|
|
1339
|
+
role: "menuitem",
|
|
1340
|
+
style: {
|
|
1341
|
+
display: "contents"
|
|
1342
|
+
}
|
|
1343
|
+
}, t.renderEmptyState())), /* @__PURE__ */ f.createElement(He, null, /* @__PURE__ */ f.createElement("div", {
|
|
1344
|
+
...K(t),
|
|
1345
|
+
...$,
|
|
1346
|
+
...p,
|
|
1347
|
+
ref: r,
|
|
1348
|
+
slot: t.slot || void 0,
|
|
1349
|
+
"data-empty": i.collection.size === 0 || void 0,
|
|
1350
|
+
onScroll: t.onScroll
|
|
1351
|
+
}, /* @__PURE__ */ f.createElement(H, {
|
|
1352
|
+
values: [
|
|
1353
|
+
[
|
|
1354
|
+
ye,
|
|
1355
|
+
i
|
|
1356
|
+
],
|
|
1357
|
+
[
|
|
1358
|
+
Hr,
|
|
1359
|
+
{
|
|
1360
|
+
elementType: "div"
|
|
1361
|
+
}
|
|
1362
|
+
],
|
|
1363
|
+
[
|
|
1364
|
+
Nr,
|
|
1365
|
+
{
|
|
1366
|
+
name: "MenuSection",
|
|
1367
|
+
render: No
|
|
1368
|
+
}
|
|
1369
|
+
],
|
|
1370
|
+
[
|
|
1371
|
+
To,
|
|
1372
|
+
{
|
|
1373
|
+
parentMenuRef: r,
|
|
1374
|
+
shouldUseVirtualFocus: o == null ? void 0 : o.shouldUseVirtualFocus
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
[
|
|
1378
|
+
pe,
|
|
1379
|
+
null
|
|
1380
|
+
],
|
|
1381
|
+
[
|
|
1382
|
+
Me,
|
|
1383
|
+
null
|
|
1384
|
+
],
|
|
1385
|
+
[
|
|
1386
|
+
te,
|
|
1387
|
+
i.selectionManager
|
|
1388
|
+
],
|
|
1389
|
+
/* Ensure root MenuTriggerState is defined, in case Menu is rendered outside a MenuTrigger. */
|
|
1390
|
+
/* We assume the context can never change between defined and undefined. */
|
|
1391
|
+
/* eslint-disable-next-line react-hooks/rules-of-hooks */
|
|
1392
|
+
[
|
|
1393
|
+
ee,
|
|
1394
|
+
n ?? ve({})
|
|
1395
|
+
]
|
|
1396
|
+
]
|
|
1397
|
+
}, /* @__PURE__ */ f.createElement(l, {
|
|
1398
|
+
collection: i.collection,
|
|
1399
|
+
persistedKeys: Lr(i.selectionManager.focusedKey),
|
|
1400
|
+
scrollRef: r
|
|
1401
|
+
})), c));
|
|
1402
|
+
}
|
|
1403
|
+
class Io extends Le {
|
|
1404
|
+
get focusedKey() {
|
|
1405
|
+
return this.parent.focusedKey;
|
|
1406
|
+
}
|
|
1407
|
+
get isFocused() {
|
|
1408
|
+
return this.parent.isFocused;
|
|
1409
|
+
}
|
|
1410
|
+
setFocusedKey(e, r) {
|
|
1411
|
+
return this.parent.setFocusedKey(e, r);
|
|
1412
|
+
}
|
|
1413
|
+
setFocused(e) {
|
|
1414
|
+
this.parent.setFocused(e);
|
|
1415
|
+
}
|
|
1416
|
+
get childFocusStrategy() {
|
|
1417
|
+
return this.parent.childFocusStrategy;
|
|
1418
|
+
}
|
|
1419
|
+
constructor(e, r) {
|
|
1420
|
+
super(e.collection, r), this.parent = e;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
function No(t, e, r, a = "react-aria-MenuSection") {
|
|
1424
|
+
var o, s;
|
|
1425
|
+
let u = P(ye), { CollectionBranch: i } = P(Ie), [n, d] = Ar();
|
|
1426
|
+
var l;
|
|
1427
|
+
let { headingProps: $, groupProps: p } = Mo({
|
|
1428
|
+
heading: d,
|
|
1429
|
+
"aria-label": (l = r.props["aria-label"]) !== null && l !== void 0 ? l : void 0
|
|
1430
|
+
}), c = G({
|
|
1431
|
+
defaultClassName: a,
|
|
1432
|
+
className: (o = r.props) === null || o === void 0 ? void 0 : o.className,
|
|
1433
|
+
style: (s = r.props) === null || s === void 0 ? void 0 : s.style,
|
|
1434
|
+
values: {}
|
|
1435
|
+
}), b = P(te), x = Ne(t), g = t.selectionMode != null ? new Io(b, x) : b;
|
|
1436
|
+
return /* @__PURE__ */ f.createElement("section", {
|
|
1437
|
+
...K(t),
|
|
1438
|
+
...p,
|
|
1439
|
+
...c,
|
|
1440
|
+
ref: e
|
|
1441
|
+
}, /* @__PURE__ */ f.createElement(H, {
|
|
1442
|
+
values: [
|
|
1443
|
+
[
|
|
1444
|
+
Ur,
|
|
1445
|
+
{
|
|
1446
|
+
...$,
|
|
1447
|
+
ref: n
|
|
1448
|
+
}
|
|
1449
|
+
],
|
|
1450
|
+
[
|
|
1451
|
+
te,
|
|
1452
|
+
g
|
|
1453
|
+
]
|
|
1454
|
+
]
|
|
1455
|
+
}, /* @__PURE__ */ f.createElement(i, {
|
|
1456
|
+
collection: u.collection,
|
|
1457
|
+
parent: r
|
|
1458
|
+
})));
|
|
1459
|
+
}
|
|
1460
|
+
const pe = /* @__PURE__ */ D(null), ca = /* @__PURE__ */ Tr("item", function(e, r, a) {
|
|
1461
|
+
var o;
|
|
1462
|
+
[e, r] = oe(e, r, pe);
|
|
1463
|
+
let s = (o = Cr(pe)) === null || o === void 0 ? void 0 : o.id, u = P(ye), i = be(r), n = P(te), { menuItemProps: d, labelProps: l, descriptionProps: $, keyboardShortcutProps: p, ...c } = Ao({
|
|
1464
|
+
...e,
|
|
1465
|
+
id: s,
|
|
1466
|
+
key: a.key,
|
|
1467
|
+
selectionManager: n
|
|
1468
|
+
}, u, i), { hoverProps: b, isHovered: x } = ze({
|
|
1469
|
+
isDisabled: c.isDisabled
|
|
1470
|
+
}), g = G({
|
|
1471
|
+
...e,
|
|
1472
|
+
id: void 0,
|
|
1473
|
+
children: a.rendered,
|
|
1474
|
+
defaultClassName: "react-aria-MenuItem",
|
|
1475
|
+
values: {
|
|
1476
|
+
...c,
|
|
1477
|
+
isHovered: x,
|
|
1478
|
+
isFocusVisible: c.isFocusVisible,
|
|
1479
|
+
selectionMode: n.selectionMode,
|
|
1480
|
+
selectionBehavior: n.selectionBehavior,
|
|
1481
|
+
hasSubmenu: !!e["aria-haspopup"],
|
|
1482
|
+
isOpen: e["aria-expanded"] === "true"
|
|
1483
|
+
}
|
|
1484
|
+
}), O = e.href ? "a" : "div";
|
|
1485
|
+
return /* @__PURE__ */ f.createElement(O, {
|
|
1486
|
+
..._(d, b),
|
|
1487
|
+
...g,
|
|
1488
|
+
ref: i,
|
|
1489
|
+
"data-disabled": c.isDisabled || void 0,
|
|
1490
|
+
"data-hovered": x || void 0,
|
|
1491
|
+
"data-focused": c.isFocused || void 0,
|
|
1492
|
+
"data-focus-visible": c.isFocusVisible || void 0,
|
|
1493
|
+
"data-pressed": c.isPressed || void 0,
|
|
1494
|
+
"data-selected": c.isSelected || void 0,
|
|
1495
|
+
"data-selection-mode": n.selectionMode === "none" ? void 0 : n.selectionMode,
|
|
1496
|
+
"data-has-submenu": !!e["aria-haspopup"] || void 0,
|
|
1497
|
+
"data-open": e["aria-expanded"] === "true" || void 0
|
|
1498
|
+
}, /* @__PURE__ */ f.createElement(H, {
|
|
1499
|
+
values: [
|
|
1500
|
+
[
|
|
1501
|
+
Vr,
|
|
1502
|
+
{
|
|
1503
|
+
slots: {
|
|
1504
|
+
[ce]: l,
|
|
1505
|
+
label: l,
|
|
1506
|
+
description: $
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
[
|
|
1511
|
+
Oo,
|
|
1512
|
+
p
|
|
1513
|
+
]
|
|
1514
|
+
]
|
|
1515
|
+
}, g.children));
|
|
1516
|
+
}), cr = /* @__PURE__ */ D(null), ae = /* @__PURE__ */ D(null);
|
|
1517
|
+
function fa(t) {
|
|
1518
|
+
let e = ve(t), r = M(null), { triggerProps: a, overlayProps: o } = We({
|
|
1519
|
+
type: "dialog"
|
|
1520
|
+
}, e, r), [s, u] = B(null), i = me(() => {
|
|
1521
|
+
r.current && u(r.current.offsetWidth + "px");
|
|
1522
|
+
}, [
|
|
1523
|
+
r
|
|
1524
|
+
]);
|
|
1525
|
+
return Re({
|
|
1526
|
+
ref: r,
|
|
1527
|
+
onResize: i
|
|
1528
|
+
}), a.id = re(), o["aria-labelledby"] = a.id, /* @__PURE__ */ f.createElement(H, {
|
|
1529
|
+
values: [
|
|
1530
|
+
[
|
|
1531
|
+
ae,
|
|
1532
|
+
e
|
|
1533
|
+
],
|
|
1534
|
+
[
|
|
1535
|
+
ee,
|
|
1536
|
+
e
|
|
1537
|
+
],
|
|
1538
|
+
[
|
|
1539
|
+
cr,
|
|
1540
|
+
o
|
|
1541
|
+
],
|
|
1542
|
+
[
|
|
1543
|
+
xe,
|
|
1544
|
+
{
|
|
1545
|
+
trigger: "DialogTrigger",
|
|
1546
|
+
triggerRef: r,
|
|
1547
|
+
"aria-labelledby": o["aria-labelledby"],
|
|
1548
|
+
style: {
|
|
1549
|
+
"--trigger-width": s
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
]
|
|
1553
|
+
]
|
|
1554
|
+
}, /* @__PURE__ */ f.createElement(Ve, {
|
|
1555
|
+
...a,
|
|
1556
|
+
ref: r,
|
|
1557
|
+
isPressed: e.isOpen
|
|
1558
|
+
}, t.children));
|
|
1559
|
+
}
|
|
1560
|
+
const $a = /* @__PURE__ */ ge(function(e, r) {
|
|
1561
|
+
let a = e["aria-labelledby"];
|
|
1562
|
+
[e, r] = oe(e, r, cr);
|
|
1563
|
+
let { dialogProps: o, titleProps: s } = So({
|
|
1564
|
+
...e,
|
|
1565
|
+
// Only pass aria-labelledby from props, not context.
|
|
1566
|
+
// Context is used as a fallback below.
|
|
1567
|
+
"aria-labelledby": a
|
|
1568
|
+
}, r), u = P(ae);
|
|
1569
|
+
!o["aria-label"] && !o["aria-labelledby"] && (e["aria-labelledby"] ? o["aria-labelledby"] = e["aria-labelledby"] : process.env.NODE_ENV !== "production" && console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));
|
|
1570
|
+
let i = G({
|
|
1571
|
+
defaultClassName: "react-aria-Dialog",
|
|
1572
|
+
className: e.className,
|
|
1573
|
+
style: e.style,
|
|
1574
|
+
children: e.children,
|
|
1575
|
+
values: {
|
|
1576
|
+
close: (u == null ? void 0 : u.close) || (() => {
|
|
1577
|
+
})
|
|
1578
|
+
}
|
|
1579
|
+
});
|
|
1580
|
+
return /* @__PURE__ */ f.createElement("section", {
|
|
1581
|
+
...K(e),
|
|
1582
|
+
...o,
|
|
1583
|
+
...i,
|
|
1584
|
+
ref: r,
|
|
1585
|
+
slot: e.slot || void 0
|
|
1586
|
+
}, /* @__PURE__ */ f.createElement(H, {
|
|
1587
|
+
values: [
|
|
1588
|
+
[
|
|
1589
|
+
Mr,
|
|
1590
|
+
{
|
|
1591
|
+
slots: {
|
|
1592
|
+
[ce]: {},
|
|
1593
|
+
title: {
|
|
1594
|
+
...s,
|
|
1595
|
+
level: 2
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
],
|
|
1600
|
+
[
|
|
1601
|
+
Er,
|
|
1602
|
+
{
|
|
1603
|
+
slots: {
|
|
1604
|
+
[ce]: {},
|
|
1605
|
+
close: {
|
|
1606
|
+
onPress: () => u == null ? void 0 : u.close()
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1611
|
+
]
|
|
1612
|
+
}, i.children));
|
|
1613
|
+
});
|
|
1614
|
+
export {
|
|
1615
|
+
fa as $,
|
|
1616
|
+
ia as a,
|
|
1617
|
+
ua as b,
|
|
1618
|
+
da as c,
|
|
1619
|
+
ca as d,
|
|
1620
|
+
$o as e,
|
|
1621
|
+
bo as f,
|
|
1622
|
+
Eo as g,
|
|
1623
|
+
yo as h,
|
|
1624
|
+
ae as i,
|
|
1625
|
+
Fe as j,
|
|
1626
|
+
Ke as k,
|
|
1627
|
+
$a as l,
|
|
1628
|
+
xe as m,
|
|
1629
|
+
cr as n,
|
|
1630
|
+
Co as o,
|
|
1631
|
+
ve as p,
|
|
1632
|
+
Ve as q
|
|
1633
|
+
};
|