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