@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,506 @@
|
|
|
1
|
+
import { $ as Y, a as ue, b as pe } from "./utils-DIMfEPAt.js";
|
|
2
|
+
import { flushSync as me } from "react-dom";
|
|
3
|
+
import ve, { useEffect as K, useState as Q, useCallback as F, useRef as W, useContext as ge, createContext as re, forwardRef as $e } from "react";
|
|
4
|
+
import { u as he } from "./useHover-DjIHtjGN.js";
|
|
5
|
+
import { $ as q } from "./number-BE8InLgI.js";
|
|
6
|
+
import { $ as be } from "./context-C81gPYvC.js";
|
|
7
|
+
import { $ as xe } from "./useControlledState-u436Wbp1.js";
|
|
8
|
+
import { $ as we } from "./filterDOMProps-D6KHYVBX.js";
|
|
9
|
+
function Ee() {
|
|
10
|
+
return typeof window.ResizeObserver < "u";
|
|
11
|
+
}
|
|
12
|
+
function D(t) {
|
|
13
|
+
const { ref: e, box: l, onResize: n } = t;
|
|
14
|
+
K(() => {
|
|
15
|
+
let o = e == null ? void 0 : e.current;
|
|
16
|
+
if (o)
|
|
17
|
+
if (Ee()) {
|
|
18
|
+
const r = new window.ResizeObserver((c) => {
|
|
19
|
+
c.length && n();
|
|
20
|
+
});
|
|
21
|
+
return r.observe(o, {
|
|
22
|
+
box: l
|
|
23
|
+
}), () => {
|
|
24
|
+
o && r.unobserve(o);
|
|
25
|
+
};
|
|
26
|
+
} else
|
|
27
|
+
return window.addEventListener("resize", n, !1), () => {
|
|
28
|
+
window.removeEventListener("resize", n, !1);
|
|
29
|
+
};
|
|
30
|
+
}, [
|
|
31
|
+
n,
|
|
32
|
+
e,
|
|
33
|
+
l
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
function Ue(t, e = !0) {
|
|
37
|
+
let [l, n] = Q(!0), o = l && e;
|
|
38
|
+
return Y(() => {
|
|
39
|
+
if (o && t.current && "getAnimations" in t.current)
|
|
40
|
+
for (let r of t.current.getAnimations()) r instanceof CSSTransition && r.cancel();
|
|
41
|
+
}, [
|
|
42
|
+
t,
|
|
43
|
+
o
|
|
44
|
+
]), ie(t, o, F(() => n(!1), [])), o;
|
|
45
|
+
}
|
|
46
|
+
function Ge(t, e) {
|
|
47
|
+
let [l, n] = Q(e ? "open" : "closed");
|
|
48
|
+
switch (l) {
|
|
49
|
+
case "open":
|
|
50
|
+
e || n("exiting");
|
|
51
|
+
break;
|
|
52
|
+
case "closed":
|
|
53
|
+
case "exiting":
|
|
54
|
+
e && n("open");
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
let o = l === "exiting";
|
|
58
|
+
return ie(t, o, F(() => {
|
|
59
|
+
n((r) => r === "exiting" ? "closed" : r);
|
|
60
|
+
}, [])), o;
|
|
61
|
+
}
|
|
62
|
+
function ie(t, e, l) {
|
|
63
|
+
Y(() => {
|
|
64
|
+
if (e && t.current) {
|
|
65
|
+
if (!("getAnimations" in t.current)) {
|
|
66
|
+
l();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
let n = t.current.getAnimations();
|
|
70
|
+
if (n.length === 0) {
|
|
71
|
+
l();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let o = !1;
|
|
75
|
+
return Promise.all(n.map((r) => r.finished)).then(() => {
|
|
76
|
+
o || me(() => {
|
|
77
|
+
l();
|
|
78
|
+
});
|
|
79
|
+
}).catch(() => {
|
|
80
|
+
}), () => {
|
|
81
|
+
o = !0;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}, [
|
|
85
|
+
t,
|
|
86
|
+
e,
|
|
87
|
+
l
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
const I = {
|
|
91
|
+
top: "top",
|
|
92
|
+
bottom: "top",
|
|
93
|
+
left: "left",
|
|
94
|
+
right: "left"
|
|
95
|
+
}, Z = {
|
|
96
|
+
top: "bottom",
|
|
97
|
+
bottom: "top",
|
|
98
|
+
left: "right",
|
|
99
|
+
right: "left"
|
|
100
|
+
}, Pe = {
|
|
101
|
+
top: "left",
|
|
102
|
+
left: "top"
|
|
103
|
+
}, J = {
|
|
104
|
+
top: "height",
|
|
105
|
+
left: "width"
|
|
106
|
+
}, ae = {
|
|
107
|
+
width: "totalWidth",
|
|
108
|
+
height: "totalHeight"
|
|
109
|
+
}, X = {};
|
|
110
|
+
let P = typeof document < "u" ? window.visualViewport : null;
|
|
111
|
+
function V(t) {
|
|
112
|
+
let e = 0, l = 0, n = 0, o = 0, r = 0, c = 0, i = {};
|
|
113
|
+
var $;
|
|
114
|
+
let f = (($ = P == null ? void 0 : P.scale) !== null && $ !== void 0 ? $ : 1) > 1;
|
|
115
|
+
if (t.tagName === "BODY") {
|
|
116
|
+
let d = document.documentElement;
|
|
117
|
+
n = d.clientWidth, o = d.clientHeight;
|
|
118
|
+
var u;
|
|
119
|
+
e = (u = P == null ? void 0 : P.width) !== null && u !== void 0 ? u : n;
|
|
120
|
+
var g;
|
|
121
|
+
l = (g = P == null ? void 0 : P.height) !== null && g !== void 0 ? g : o, i.top = d.scrollTop || t.scrollTop, i.left = d.scrollLeft || t.scrollLeft, P && (r = P.offsetTop, c = P.offsetLeft);
|
|
122
|
+
} else
|
|
123
|
+
({ width: e, height: l, top: r, left: c } = B(t)), i.top = t.scrollTop, i.left = t.scrollLeft, n = e, o = l;
|
|
124
|
+
if (he() && (t.tagName === "BODY" || t.tagName === "HTML") && f) {
|
|
125
|
+
i.top = 0, i.left = 0;
|
|
126
|
+
var p;
|
|
127
|
+
r = (p = P == null ? void 0 : P.pageTop) !== null && p !== void 0 ? p : 0;
|
|
128
|
+
var a;
|
|
129
|
+
c = (a = P == null ? void 0 : P.pageLeft) !== null && a !== void 0 ? a : 0;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
width: e,
|
|
133
|
+
height: l,
|
|
134
|
+
totalWidth: n,
|
|
135
|
+
totalHeight: o,
|
|
136
|
+
scroll: i,
|
|
137
|
+
top: r,
|
|
138
|
+
left: c
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function Ce(t) {
|
|
142
|
+
return {
|
|
143
|
+
top: t.scrollTop,
|
|
144
|
+
left: t.scrollLeft,
|
|
145
|
+
width: t.scrollWidth,
|
|
146
|
+
height: t.scrollHeight
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function ee(t, e, l, n, o, r, c) {
|
|
150
|
+
var i;
|
|
151
|
+
let $ = (i = o.scroll[t]) !== null && i !== void 0 ? i : 0, f = n[J[t]], u = n.scroll[I[t]] + r, g = f + n.scroll[I[t]] - r, p = e - $ + c[t] - n[I[t]], a = e - $ + l + c[t] - n[I[t]];
|
|
152
|
+
return p < u ? u - p : a > g ? Math.max(g - a, u - p) : 0;
|
|
153
|
+
}
|
|
154
|
+
function Le(t) {
|
|
155
|
+
let e = window.getComputedStyle(t);
|
|
156
|
+
return {
|
|
157
|
+
top: parseInt(e.marginTop, 10) || 0,
|
|
158
|
+
bottom: parseInt(e.marginBottom, 10) || 0,
|
|
159
|
+
left: parseInt(e.marginLeft, 10) || 0,
|
|
160
|
+
right: parseInt(e.marginRight, 10) || 0
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function te(t) {
|
|
164
|
+
if (X[t]) return X[t];
|
|
165
|
+
let [e, l] = t.split(" "), n = I[e] || "right", o = Pe[n];
|
|
166
|
+
I[l] || (l = "center");
|
|
167
|
+
let r = J[n], c = J[o];
|
|
168
|
+
return X[t] = {
|
|
169
|
+
placement: e,
|
|
170
|
+
crossPlacement: l,
|
|
171
|
+
axis: n,
|
|
172
|
+
crossAxis: o,
|
|
173
|
+
size: r,
|
|
174
|
+
crossSize: c
|
|
175
|
+
}, X[t];
|
|
176
|
+
}
|
|
177
|
+
function G(t, e, l, n, o, r, c, i, $, f) {
|
|
178
|
+
let { placement: u, crossPlacement: g, axis: p, crossAxis: a, size: d, crossSize: h } = n, s = {};
|
|
179
|
+
var m;
|
|
180
|
+
s[a] = (m = t[a]) !== null && m !== void 0 ? m : 0;
|
|
181
|
+
var v, E, R, C;
|
|
182
|
+
g === "center" ? s[a] += (((v = t[h]) !== null && v !== void 0 ? v : 0) - ((E = l[h]) !== null && E !== void 0 ? E : 0)) / 2 : g !== a && (s[a] += ((R = t[h]) !== null && R !== void 0 ? R : 0) - ((C = l[h]) !== null && C !== void 0 ? C : 0)), s[a] += r;
|
|
183
|
+
const b = t[a] - l[h] + $ + f, H = t[a] + t[h] - $ - f;
|
|
184
|
+
if (s[a] = q(s[a], b, H), u === p) {
|
|
185
|
+
const y = i ? c[d] : e[ae[d]];
|
|
186
|
+
s[Z[p]] = Math.floor(y - t[p] + o);
|
|
187
|
+
} else s[p] = Math.floor(t[p] + t[d] + o);
|
|
188
|
+
return s;
|
|
189
|
+
}
|
|
190
|
+
function Se(t, e, l, n, o, r, c, i) {
|
|
191
|
+
const $ = n ? l.height : e[ae.height];
|
|
192
|
+
var f;
|
|
193
|
+
let u = t.top != null ? l.top + t.top : l.top + ($ - ((f = t.bottom) !== null && f !== void 0 ? f : 0) - c);
|
|
194
|
+
var g, p, a, d, h, s;
|
|
195
|
+
let m = i !== "top" ? (
|
|
196
|
+
// We want the distance between the top of the overlay to the bottom of the boundary
|
|
197
|
+
Math.max(0, e.height + e.top + ((g = e.scroll.top) !== null && g !== void 0 ? g : 0) - u - (((p = o.top) !== null && p !== void 0 ? p : 0) + ((a = o.bottom) !== null && a !== void 0 ? a : 0) + r))
|
|
198
|
+
) : Math.max(0, u + c - (e.top + ((d = e.scroll.top) !== null && d !== void 0 ? d : 0)) - (((h = o.top) !== null && h !== void 0 ? h : 0) + ((s = o.bottom) !== null && s !== void 0 ? s : 0) + r));
|
|
199
|
+
return Math.min(e.height - r * 2, m);
|
|
200
|
+
}
|
|
201
|
+
function oe(t, e, l, n, o, r) {
|
|
202
|
+
let { placement: c, axis: i, size: $ } = r;
|
|
203
|
+
var f, u;
|
|
204
|
+
if (c === i) return Math.max(0, l[i] - t[i] - ((f = t.scroll[i]) !== null && f !== void 0 ? f : 0) + e[i] - ((u = n[i]) !== null && u !== void 0 ? u : 0) - n[Z[i]] - o);
|
|
205
|
+
var g;
|
|
206
|
+
return Math.max(0, t[$] + t[i] + t.scroll[i] - e[i] - l[i] - l[$] - ((g = n[i]) !== null && g !== void 0 ? g : 0) - n[Z[i]] - o);
|
|
207
|
+
}
|
|
208
|
+
function Re(t, e, l, n, o, r, c, i, $, f, u, g, p, a, d, h) {
|
|
209
|
+
let s = te(t), { size: m, crossAxis: v, crossSize: E, placement: R, crossPlacement: C } = s, b = G(e, i, l, s, u, g, f, p, d, h), H = u, y = oe(i, f, e, o, r + u, s);
|
|
210
|
+
if (c && n[m] > y) {
|
|
211
|
+
let U = te(`${Z[R]} ${C}`), de = G(e, i, l, U, u, g, f, p, d, h);
|
|
212
|
+
oe(i, f, e, o, r + u, U) > y && (s = U, b = de, H = u);
|
|
213
|
+
}
|
|
214
|
+
let _ = "bottom";
|
|
215
|
+
s.axis === "top" ? s.placement === "top" ? _ = "top" : s.placement === "bottom" && (_ = "bottom") : s.crossAxis === "top" && (s.crossPlacement === "top" ? _ = "bottom" : s.crossPlacement === "bottom" && (_ = "top"));
|
|
216
|
+
let w = ee(v, b[v], l[E], i, $, r, f);
|
|
217
|
+
b[v] += w;
|
|
218
|
+
let S = Se(b, i, f, p, o, r, l.height, _);
|
|
219
|
+
a && a < S && (S = a), l.height = Math.min(l.height, S), b = G(e, i, l, s, H, g, f, p, d, h), w = ee(v, b[v], l[E], i, $, r, f), b[v] += w;
|
|
220
|
+
let T = {}, M = e[v] + 0.5 * e[E] - b[v] - o[I[v]];
|
|
221
|
+
const z = d / 2 + h;
|
|
222
|
+
var O, k, A, L;
|
|
223
|
+
const N = I[v] === "left" ? ((O = o.left) !== null && O !== void 0 ? O : 0) + ((k = o.right) !== null && k !== void 0 ? k : 0) : ((A = o.top) !== null && A !== void 0 ? A : 0) + ((L = o.bottom) !== null && L !== void 0 ? L : 0), j = l[E] - N - d / 2 - h, ce = e[v] + d / 2 - (b[v] + o[I[v]]), se = e[v] + e[E] - d / 2 - (b[v] + o[I[v]]), fe = q(M, ce, se);
|
|
224
|
+
return T[v] = q(fe, z, j), {
|
|
225
|
+
position: b,
|
|
226
|
+
maxHeight: S,
|
|
227
|
+
arrowOffsetLeft: T.left,
|
|
228
|
+
arrowOffsetTop: T.top,
|
|
229
|
+
placement: s.placement
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function Te(t) {
|
|
233
|
+
let { placement: e, targetNode: l, overlayNode: n, scrollNode: o, padding: r, shouldFlip: c, boundaryElement: i, offset: $, crossOffset: f, maxHeight: u, arrowSize: g = 0, arrowBoundaryOffset: p = 0 } = t, a = n instanceof HTMLElement ? _e(n) : document.documentElement, d = a === document.documentElement;
|
|
234
|
+
const h = window.getComputedStyle(a).position;
|
|
235
|
+
let s = !!h && h !== "static", m = d ? B(l) : le(l, a);
|
|
236
|
+
if (!d) {
|
|
237
|
+
let { marginTop: T, marginLeft: M } = window.getComputedStyle(l);
|
|
238
|
+
m.top += parseInt(T, 10) || 0, m.left += parseInt(M, 10) || 0;
|
|
239
|
+
}
|
|
240
|
+
let v = B(n), E = Le(n);
|
|
241
|
+
var R, C;
|
|
242
|
+
v.width += ((R = E.left) !== null && R !== void 0 ? R : 0) + ((C = E.right) !== null && C !== void 0 ? C : 0);
|
|
243
|
+
var b, H;
|
|
244
|
+
v.height += ((b = E.top) !== null && b !== void 0 ? b : 0) + ((H = E.bottom) !== null && H !== void 0 ? H : 0);
|
|
245
|
+
let y = Ce(o), _ = V(i), w = V(a), S = i.tagName === "BODY" ? B(a) : le(a, i);
|
|
246
|
+
return a.tagName === "HTML" && i.tagName === "BODY" && (w.scroll.top = 0, w.scroll.left = 0), Re(e, m, v, y, E, r, c, _, w, S, $, f, s, u, g, p);
|
|
247
|
+
}
|
|
248
|
+
function B(t) {
|
|
249
|
+
let { top: e, left: l, width: n, height: o } = t.getBoundingClientRect(), { scrollTop: r, scrollLeft: c, clientTop: i, clientLeft: $ } = document.documentElement;
|
|
250
|
+
return {
|
|
251
|
+
top: e + r - i,
|
|
252
|
+
left: l + c - $,
|
|
253
|
+
width: n,
|
|
254
|
+
height: o
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function le(t, e) {
|
|
258
|
+
let l = window.getComputedStyle(t), n;
|
|
259
|
+
if (l.position === "fixed") {
|
|
260
|
+
let { top: o, left: r, width: c, height: i } = t.getBoundingClientRect();
|
|
261
|
+
n = {
|
|
262
|
+
top: o,
|
|
263
|
+
left: r,
|
|
264
|
+
width: c,
|
|
265
|
+
height: i
|
|
266
|
+
};
|
|
267
|
+
} else {
|
|
268
|
+
n = B(t);
|
|
269
|
+
let o = B(e), r = window.getComputedStyle(e);
|
|
270
|
+
o.top += (parseInt(r.borderTopWidth, 10) || 0) - e.scrollTop, o.left += (parseInt(r.borderLeftWidth, 10) || 0) - e.scrollLeft, n.top -= o.top, n.left -= o.left;
|
|
271
|
+
}
|
|
272
|
+
return n.top -= parseInt(l.marginTop, 10) || 0, n.left -= parseInt(l.marginLeft, 10) || 0, n;
|
|
273
|
+
}
|
|
274
|
+
function _e(t) {
|
|
275
|
+
let e = t.offsetParent;
|
|
276
|
+
if (e && e === document.body && window.getComputedStyle(e).position === "static" && !ne(e) && (e = document.documentElement), e == null)
|
|
277
|
+
for (e = t.parentElement; e && !ne(e); ) e = e.parentElement;
|
|
278
|
+
return e || document.documentElement;
|
|
279
|
+
}
|
|
280
|
+
function ne(t) {
|
|
281
|
+
let e = window.getComputedStyle(t);
|
|
282
|
+
return e.transform !== "none" || /transform|perspective/.test(e.willChange) || e.filter !== "none" || e.contain === "paint" || "backdropFilter" in e && e.backdropFilter !== "none" || "WebkitBackdropFilter" in e && e.WebkitBackdropFilter !== "none";
|
|
283
|
+
}
|
|
284
|
+
const ze = /* @__PURE__ */ new WeakMap();
|
|
285
|
+
function He(t) {
|
|
286
|
+
let { triggerRef: e, isOpen: l, onClose: n } = t;
|
|
287
|
+
K(() => {
|
|
288
|
+
if (!l || n === null) return;
|
|
289
|
+
let o = (r) => {
|
|
290
|
+
let c = r.target;
|
|
291
|
+
if (!e.current || c instanceof Node && !c.contains(e.current) || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement) return;
|
|
292
|
+
let i = n || ze.get(e.current);
|
|
293
|
+
i && i();
|
|
294
|
+
};
|
|
295
|
+
return window.addEventListener("scroll", o, !0), () => {
|
|
296
|
+
window.removeEventListener("scroll", o, !0);
|
|
297
|
+
};
|
|
298
|
+
}, [
|
|
299
|
+
l,
|
|
300
|
+
n,
|
|
301
|
+
e
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
let x = typeof document < "u" ? window.visualViewport : null;
|
|
305
|
+
function qe(t) {
|
|
306
|
+
let { direction: e } = be(), { arrowSize: l = 0, targetRef: n, overlayRef: o, scrollRef: r = o, placement: c = "bottom", containerPadding: i = 12, shouldFlip: $ = !0, boundaryElement: f = typeof document < "u" ? document.body : null, offset: u = 0, crossOffset: g = 0, shouldUpdatePosition: p = !0, isOpen: a = !0, onClose: d, maxHeight: h, arrowBoundaryOffset: s = 0 } = t, [m, v] = Q(null), E = [
|
|
307
|
+
p,
|
|
308
|
+
c,
|
|
309
|
+
o.current,
|
|
310
|
+
n.current,
|
|
311
|
+
r.current,
|
|
312
|
+
i,
|
|
313
|
+
$,
|
|
314
|
+
f,
|
|
315
|
+
u,
|
|
316
|
+
g,
|
|
317
|
+
a,
|
|
318
|
+
e,
|
|
319
|
+
h,
|
|
320
|
+
s,
|
|
321
|
+
l
|
|
322
|
+
], R = W(x == null ? void 0 : x.scale);
|
|
323
|
+
K(() => {
|
|
324
|
+
a && (R.current = x == null ? void 0 : x.scale);
|
|
325
|
+
}, [
|
|
326
|
+
a
|
|
327
|
+
]);
|
|
328
|
+
let C = F(() => {
|
|
329
|
+
if (p === !1 || !a || !o.current || !n.current || !f || (x == null ? void 0 : x.scale) !== R.current) return;
|
|
330
|
+
let w = null;
|
|
331
|
+
if (r.current && r.current.contains(document.activeElement)) {
|
|
332
|
+
var S;
|
|
333
|
+
let L = (S = document.activeElement) === null || S === void 0 ? void 0 : S.getBoundingClientRect(), N = r.current.getBoundingClientRect();
|
|
334
|
+
var T;
|
|
335
|
+
if (w = {
|
|
336
|
+
type: "top",
|
|
337
|
+
offset: ((T = L == null ? void 0 : L.top) !== null && T !== void 0 ? T : 0) - N.top
|
|
338
|
+
}, w.offset > N.height / 2) {
|
|
339
|
+
w.type = "bottom";
|
|
340
|
+
var M;
|
|
341
|
+
w.offset = ((M = L == null ? void 0 : L.bottom) !== null && M !== void 0 ? M : 0) - N.bottom;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
let z = o.current;
|
|
345
|
+
if (!h && o.current) {
|
|
346
|
+
var O;
|
|
347
|
+
z.style.top = "0px", z.style.bottom = "";
|
|
348
|
+
var k;
|
|
349
|
+
z.style.maxHeight = ((k = (O = window.visualViewport) === null || O === void 0 ? void 0 : O.height) !== null && k !== void 0 ? k : window.innerHeight) + "px";
|
|
350
|
+
}
|
|
351
|
+
let A = Te({
|
|
352
|
+
placement: Ae(c, e),
|
|
353
|
+
overlayNode: o.current,
|
|
354
|
+
targetNode: n.current,
|
|
355
|
+
scrollNode: r.current || o.current,
|
|
356
|
+
padding: i,
|
|
357
|
+
shouldFlip: $,
|
|
358
|
+
boundaryElement: f,
|
|
359
|
+
offset: u,
|
|
360
|
+
crossOffset: g,
|
|
361
|
+
maxHeight: h,
|
|
362
|
+
arrowSize: l,
|
|
363
|
+
arrowBoundaryOffset: s
|
|
364
|
+
});
|
|
365
|
+
if (A.position) {
|
|
366
|
+
if (z.style.top = "", z.style.bottom = "", z.style.left = "", z.style.right = "", Object.keys(A.position).forEach((L) => z.style[L] = A.position[L] + "px"), z.style.maxHeight = A.maxHeight != null ? A.maxHeight + "px" : "", w && document.activeElement && r.current) {
|
|
367
|
+
let L = document.activeElement.getBoundingClientRect(), N = r.current.getBoundingClientRect(), j = L[w.type] - N[w.type];
|
|
368
|
+
r.current.scrollTop += j - w.offset;
|
|
369
|
+
}
|
|
370
|
+
v(A);
|
|
371
|
+
}
|
|
372
|
+
}, E);
|
|
373
|
+
Y(C, E), ye(C), D({
|
|
374
|
+
ref: o,
|
|
375
|
+
onResize: C
|
|
376
|
+
}), D({
|
|
377
|
+
ref: n,
|
|
378
|
+
onResize: C
|
|
379
|
+
});
|
|
380
|
+
let b = W(!1);
|
|
381
|
+
Y(() => {
|
|
382
|
+
let w, S = () => {
|
|
383
|
+
b.current = !0, clearTimeout(w), w = setTimeout(() => {
|
|
384
|
+
b.current = !1;
|
|
385
|
+
}, 500), C();
|
|
386
|
+
}, T = () => {
|
|
387
|
+
b.current && S();
|
|
388
|
+
};
|
|
389
|
+
return x == null || x.addEventListener("resize", S), x == null || x.addEventListener("scroll", T), () => {
|
|
390
|
+
x == null || x.removeEventListener("resize", S), x == null || x.removeEventListener("scroll", T);
|
|
391
|
+
};
|
|
392
|
+
}, [
|
|
393
|
+
C
|
|
394
|
+
]);
|
|
395
|
+
let H = F(() => {
|
|
396
|
+
b.current || d == null || d();
|
|
397
|
+
}, [
|
|
398
|
+
d,
|
|
399
|
+
b
|
|
400
|
+
]);
|
|
401
|
+
He({
|
|
402
|
+
triggerRef: n,
|
|
403
|
+
isOpen: a,
|
|
404
|
+
onClose: d && H
|
|
405
|
+
});
|
|
406
|
+
var y, _;
|
|
407
|
+
return {
|
|
408
|
+
overlayProps: {
|
|
409
|
+
style: {
|
|
410
|
+
position: "absolute",
|
|
411
|
+
zIndex: 1e5,
|
|
412
|
+
...m == null ? void 0 : m.position,
|
|
413
|
+
maxHeight: (y = m == null ? void 0 : m.maxHeight) !== null && y !== void 0 ? y : "100vh"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
placement: (_ = m == null ? void 0 : m.placement) !== null && _ !== void 0 ? _ : null,
|
|
417
|
+
arrowProps: {
|
|
418
|
+
"aria-hidden": "true",
|
|
419
|
+
role: "presentation",
|
|
420
|
+
style: {
|
|
421
|
+
left: m == null ? void 0 : m.arrowOffsetLeft,
|
|
422
|
+
top: m == null ? void 0 : m.arrowOffsetTop
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
updatePosition: C
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function ye(t) {
|
|
429
|
+
Y(() => (window.addEventListener("resize", t, !1), () => {
|
|
430
|
+
window.removeEventListener("resize", t, !1);
|
|
431
|
+
}), [
|
|
432
|
+
t
|
|
433
|
+
]);
|
|
434
|
+
}
|
|
435
|
+
function Ae(t, e) {
|
|
436
|
+
return e === "rtl" ? t.replace("start", "right").replace("end", "left") : t.replace("start", "left").replace("end", "right");
|
|
437
|
+
}
|
|
438
|
+
const Ie = /* @__PURE__ */ re({});
|
|
439
|
+
function Je() {
|
|
440
|
+
var t;
|
|
441
|
+
return (t = ge(Ie)) !== null && t !== void 0 ? t : {};
|
|
442
|
+
}
|
|
443
|
+
function Ke(t) {
|
|
444
|
+
let [e, l] = xe(t.isOpen, t.defaultOpen || !1, t.onOpenChange);
|
|
445
|
+
const n = F(() => {
|
|
446
|
+
l(!0);
|
|
447
|
+
}, [
|
|
448
|
+
l
|
|
449
|
+
]), o = F(() => {
|
|
450
|
+
l(!1);
|
|
451
|
+
}, [
|
|
452
|
+
l
|
|
453
|
+
]), r = F(() => {
|
|
454
|
+
l(!e);
|
|
455
|
+
}, [
|
|
456
|
+
l,
|
|
457
|
+
e
|
|
458
|
+
]);
|
|
459
|
+
return {
|
|
460
|
+
isOpen: e,
|
|
461
|
+
setOpen: l,
|
|
462
|
+
open: n,
|
|
463
|
+
close: o,
|
|
464
|
+
toggle: r
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
const Me = /* @__PURE__ */ re({
|
|
468
|
+
placement: "bottom"
|
|
469
|
+
}), Qe = /* @__PURE__ */ $e(function(e, l) {
|
|
470
|
+
[e, l] = ue(e, l, Me);
|
|
471
|
+
let n = e.placement, o = {
|
|
472
|
+
position: "absolute",
|
|
473
|
+
transform: n === "top" || n === "bottom" ? "translateX(-50%)" : "translateY(-50%)"
|
|
474
|
+
};
|
|
475
|
+
n != null && (o[n] = "100%");
|
|
476
|
+
let r = pe({
|
|
477
|
+
...e,
|
|
478
|
+
defaultClassName: "react-aria-OverlayArrow",
|
|
479
|
+
values: {
|
|
480
|
+
placement: n
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
r.style && Object.keys(r.style).forEach((i) => r.style[i] === void 0 && delete r.style[i]);
|
|
484
|
+
let c = we(e);
|
|
485
|
+
return /* @__PURE__ */ ve.createElement("div", {
|
|
486
|
+
...c,
|
|
487
|
+
...r,
|
|
488
|
+
style: {
|
|
489
|
+
...o,
|
|
490
|
+
...r.style
|
|
491
|
+
},
|
|
492
|
+
ref: l,
|
|
493
|
+
"data-placement": n
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
export {
|
|
497
|
+
Qe as $,
|
|
498
|
+
Ke as a,
|
|
499
|
+
Ge as b,
|
|
500
|
+
Ue as c,
|
|
501
|
+
Je as d,
|
|
502
|
+
qe as e,
|
|
503
|
+
Me as f,
|
|
504
|
+
D as g,
|
|
505
|
+
ze as h
|
|
506
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const q=require("./utils-BNtZbAib.cjs"),de=require("react-dom"),w=require("react"),fe=require("./useHover-_mv5J4_q.cjs"),G=require("./number-E0x3H9cL.cjs"),ue=require("./context-DjwhtgxQ.cjs"),pe=require("./useControlledState-D0L6S_5r.cjs"),$e=require("./filterDOMProps-BS2lrgFA.cjs");function me(){return typeof window.ResizeObserver<"u"}function J(t){const{ref:e,box:l,onResize:n}=t;w.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(me()){const r=new window.ResizeObserver(c=>{c.length&&n()});return r.observe(o,{box:l}),()=>{o&&r.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,l])}function ve(t,e=!0){let[l,n]=w.useState(!0),o=l&&e;return q.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let r of t.current.getAnimations())r instanceof CSSTransition&&r.cancel()},[t,o]),oe(t,o,w.useCallback(()=>n(!1),[])),o}function ge(t,e){let[l,n]=w.useState(e?"open":"closed");switch(l){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=l==="exiting";return oe(t,o,w.useCallback(()=>{n(r=>r==="exiting"?"closed":r)},[])),o}function oe(t,e,l){q.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){l();return}let n=t.current.getAnimations();if(n.length===0){l();return}let o=!1;return Promise.all(n.map(r=>r.finished)).then(()=>{o||de.flushSync(()=>{l()})}).catch(()=>{}),()=>{o=!0}}},[t,e,l])}const M={top:"top",bottom:"top",left:"left",right:"left"},X={top:"bottom",bottom:"top",left:"right",right:"left"},be={top:"left",left:"top"},K={top:"height",left:"width"},le={width:"totalWidth",height:"totalHeight"},Y={};let P=typeof document<"u"?window.visualViewport:null;function Q(t){let e=0,l=0,n=0,o=0,r=0,c=0,i={};var g;let d=((g=P==null?void 0:P.scale)!==null&&g!==void 0?g:1)>1;if(t.tagName==="BODY"){let f=document.documentElement;n=f.clientWidth,o=f.clientHeight;var u;e=(u=P==null?void 0:P.width)!==null&&u!==void 0?u:n;var v;l=(v=P==null?void 0:P.height)!==null&&v!==void 0?v:o,i.top=f.scrollTop||t.scrollTop,i.left=f.scrollLeft||t.scrollLeft,P&&(r=P.offsetTop,c=P.offsetLeft)}else({width:e,height:l,top:r,left:c}=B(t)),i.top=t.scrollTop,i.left=t.scrollLeft,n=e,o=l;if(fe.$c87311424ea30a05$export$78551043582a6a98()&&(t.tagName==="BODY"||t.tagName==="HTML")&&d){i.top=0,i.left=0;var p;r=(p=P==null?void 0:P.pageTop)!==null&&p!==void 0?p:0;var a;c=(a=P==null?void 0:P.pageLeft)!==null&&a!==void 0?a:0}return{width:e,height:l,totalWidth:n,totalHeight:o,scroll:i,top:r,left:c}}function he(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function W(t,e,l,n,o,r,c){var i;let g=(i=o.scroll[t])!==null&&i!==void 0?i:0,d=n[K[t]],u=n.scroll[M[t]]+r,v=d+n.scroll[M[t]]-r,p=e-g+c[t]-n[M[t]],a=e-g+l+c[t]-n[M[t]];return p<u?u-p:a>v?Math.max(v-a,u-p):0}function xe(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function D(t){if(Y[t])return Y[t];let[e,l]=t.split(" "),n=M[e]||"right",o=be[n];M[l]||(l="center");let r=K[n],c=K[o];return Y[t]={placement:e,crossPlacement:l,axis:n,crossAxis:o,size:r,crossSize:c},Y[t]}function U(t,e,l,n,o,r,c,i,g,d){let{placement:u,crossPlacement:v,axis:p,crossAxis:a,size:f,crossSize:b}=n,s={};var $;s[a]=($=t[a])!==null&&$!==void 0?$:0;var m,C,T,S;v==="center"?s[a]+=(((m=t[b])!==null&&m!==void 0?m:0)-((C=l[b])!==null&&C!==void 0?C:0))/2:v!==a&&(s[a]+=((T=t[b])!==null&&T!==void 0?T:0)-((S=l[b])!==null&&S!==void 0?S:0)),s[a]+=r;const h=t[a]-l[b]+g+d,y=t[a]+t[b]-g-d;if(s[a]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(s[a],h,y),u===p){const A=i?c[f]:e[le[f]];s[X[p]]=Math.floor(A-t[p]+o)}else s[p]=Math.floor(t[p]+t[f]+o);return s}function we(t,e,l,n,o,r,c,i){const g=n?l.height:e[le.height];var d;let u=t.top!=null?l.top+t.top:l.top+(g-((d=t.bottom)!==null&&d!==void 0?d:0)-c);var v,p,a,f,b,s;let $=i!=="top"?Math.max(0,e.height+e.top+((v=e.scroll.top)!==null&&v!==void 0?v:0)-u-(((p=o.top)!==null&&p!==void 0?p:0)+((a=o.bottom)!==null&&a!==void 0?a:0)+r)):Math.max(0,u+c-(e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0))-(((b=o.top)!==null&&b!==void 0?b:0)+((s=o.bottom)!==null&&s!==void 0?s:0)+r));return Math.min(e.height-r*2,$)}function V(t,e,l,n,o,r){let{placement:c,axis:i,size:g}=r;var d,u;if(c===i)return Math.max(0,l[i]-t[i]-((d=t.scroll[i])!==null&&d!==void 0?d:0)+e[i]-((u=n[i])!==null&&u!==void 0?u:0)-n[X[i]]-o);var v;return Math.max(0,t[g]+t[i]+t.scroll[i]-e[i]-l[i]-l[g]-((v=n[i])!==null&&v!==void 0?v:0)-n[X[i]]-o)}function Ee(t,e,l,n,o,r,c,i,g,d,u,v,p,a,f,b){let s=D(t),{size:$,crossAxis:m,crossSize:C,placement:T,crossPlacement:S}=s,h=U(e,i,l,s,u,v,d,p,f,b),y=u,A=V(i,d,e,o,r+u,s);if(c&&n[$]>A){let j=D(`${X[T]} ${S}`),se=U(e,i,l,j,u,v,d,p,f,b);V(i,d,e,o,r+u,j)>A&&(s=j,h=se,y=u)}let z="bottom";s.axis==="top"?s.placement==="top"?z="top":s.placement==="bottom"&&(z="bottom"):s.crossAxis==="top"&&(s.crossPlacement==="top"?z="bottom":s.crossPlacement==="bottom"&&(z="top"));let E=W(m,h[m],l[C],i,g,r,d);h[m]+=E;let R=we(h,i,d,p,o,r,l.height,z);a&&a<R&&(R=a),l.height=Math.min(l.height,R),h=U(e,i,l,s,y,v,d,p,f,b),E=W(m,h[m],l[C],i,g,r,d),h[m]+=E;let H={},O=e[m]+.5*e[C]-h[m]-o[M[m]];const _=f/2+b;var k,N,I,L;const F=M[m]==="left"?((k=o.left)!==null&&k!==void 0?k:0)+((N=o.right)!==null&&N!==void 0?N:0):((I=o.top)!==null&&I!==void 0?I:0)+((L=o.bottom)!==null&&L!==void 0?L:0),Z=l[C]-F-f/2-b,ie=e[m]+f/2-(h[m]+o[M[m]]),ae=e[m]+e[C]-f/2-(h[m]+o[M[m]]),ce=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(O,ie,ae);return H[m]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(ce,_,Z),{position:h,maxHeight:R,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:s.placement}}function Ce(t){let{placement:e,targetNode:l,overlayNode:n,scrollNode:o,padding:r,shouldFlip:c,boundaryElement:i,offset:g,crossOffset:d,maxHeight:u,arrowSize:v=0,arrowBoundaryOffset:p=0}=t,a=n instanceof HTMLElement?Pe(n):document.documentElement,f=a===document.documentElement;const b=window.getComputedStyle(a).position;let s=!!b&&b!=="static",$=f?B(l):ee(l,a);if(!f){let{marginTop:H,marginLeft:O}=window.getComputedStyle(l);$.top+=parseInt(H,10)||0,$.left+=parseInt(O,10)||0}let m=B(n),C=xe(n);var T,S;m.width+=((T=C.left)!==null&&T!==void 0?T:0)+((S=C.right)!==null&&S!==void 0?S:0);var h,y;m.height+=((h=C.top)!==null&&h!==void 0?h:0)+((y=C.bottom)!==null&&y!==void 0?y:0);let A=he(o),z=Q(i),E=Q(a),R=i.tagName==="BODY"?B(a):ee(a,i);return a.tagName==="HTML"&&i.tagName==="BODY"&&(E.scroll.top=0,E.scroll.left=0),Ee(e,$,m,A,C,r,c,z,E,R,g,d,s,u,v,p)}function B(t){let{top:e,left:l,width:n,height:o}=t.getBoundingClientRect(),{scrollTop:r,scrollLeft:c,clientTop:i,clientLeft:g}=document.documentElement;return{top:e+r-i,left:l+c-g,width:n,height:o}}function ee(t,e){let l=window.getComputedStyle(t),n;if(l.position==="fixed"){let{top:o,left:r,width:c,height:i}=t.getBoundingClientRect();n={top:o,left:r,width:c,height:i}}else{n=B(t);let o=B(e),r=window.getComputedStyle(e);o.top+=(parseInt(r.borderTopWidth,10)||0)-e.scrollTop,o.left+=(parseInt(r.borderLeftWidth,10)||0)-e.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(l.marginTop,10)||0,n.left-=parseInt(l.marginLeft,10)||0,n}function Pe(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!te(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!te(e);)e=e.parentElement;return e||document.documentElement}function te(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const ne=new WeakMap;function Se(t){let{triggerRef:e,isOpen:l,onClose:n}=t;w.useEffect(()=>{if(!l||n===null)return;let o=r=>{let c=r.target;if(!e.current||c instanceof Node&&!c.contains(e.current)||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement)return;let i=n||ne.get(e.current);i&&i()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[l,n,e])}let x=typeof document<"u"?window.visualViewport:null;function Le(t){let{direction:e}=ue.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{arrowSize:l=0,targetRef:n,overlayRef:o,scrollRef:r=o,placement:c="bottom",containerPadding:i=12,shouldFlip:g=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:u=0,crossOffset:v=0,shouldUpdatePosition:p=!0,isOpen:a=!0,onClose:f,maxHeight:b,arrowBoundaryOffset:s=0}=t,[$,m]=w.useState(null),C=[p,c,o.current,n.current,r.current,i,g,d,u,v,a,e,b,s,l],T=w.useRef(x==null?void 0:x.scale);w.useEffect(()=>{a&&(T.current=x==null?void 0:x.scale)},[a]);let S=w.useCallback(()=>{if(p===!1||!a||!o.current||!n.current||!d||(x==null?void 0:x.scale)!==T.current)return;let E=null;if(r.current&&r.current.contains(document.activeElement)){var R;let L=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),F=r.current.getBoundingClientRect();var H;if(E={type:"top",offset:((H=L==null?void 0:L.top)!==null&&H!==void 0?H:0)-F.top},E.offset>F.height/2){E.type="bottom";var O;E.offset=((O=L==null?void 0:L.bottom)!==null&&O!==void 0?O:0)-F.bottom}}let _=o.current;if(!b&&o.current){var k;_.style.top="0px",_.style.bottom="";var N;_.style.maxHeight=((N=(k=window.visualViewport)===null||k===void 0?void 0:k.height)!==null&&N!==void 0?N:window.innerHeight)+"px"}let I=Ce({placement:Te(c,e),overlayNode:o.current,targetNode:n.current,scrollNode:r.current||o.current,padding:i,shouldFlip:g,boundaryElement:d,offset:u,crossOffset:v,maxHeight:b,arrowSize:l,arrowBoundaryOffset:s});if(I.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(I.position).forEach(L=>_.style[L]=I.position[L]+"px"),_.style.maxHeight=I.maxHeight!=null?I.maxHeight+"px":"",E&&document.activeElement&&r.current){let L=document.activeElement.getBoundingClientRect(),F=r.current.getBoundingClientRect(),Z=L[E.type]-F[E.type];r.current.scrollTop+=Z-E.offset}m(I)}},C);q.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(S,C),Re(S),J({ref:o,onResize:S}),J({ref:n,onResize:S});let h=w.useRef(!1);q.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let E,R=()=>{h.current=!0,clearTimeout(E),E=setTimeout(()=>{h.current=!1},500),S()},H=()=>{h.current&&R()};return x==null||x.addEventListener("resize",R),x==null||x.addEventListener("scroll",H),()=>{x==null||x.removeEventListener("resize",R),x==null||x.removeEventListener("scroll",H)}},[S]);let y=w.useCallback(()=>{h.current||f==null||f()},[f,h]);Se({triggerRef:n,isOpen:a,onClose:f&&y});var A,z;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(A=$==null?void 0:$.maxHeight)!==null&&A!==void 0?A:"100vh"}},placement:(z=$==null?void 0:$.placement)!==null&&z!==void 0?z:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:S}}function Re(t){q.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Te(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const He=w.createContext({});function ze(){var t;return(t=w.useContext(He))!==null&&t!==void 0?t:{}}function _e(t){let[e,l]=pe.$458b0a5536c1a7cf$export$40bfa8c7b0832715(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=w.useCallback(()=>{l(!0)},[l]),o=w.useCallback(()=>{l(!1)},[l]),r=w.useCallback(()=>{l(!e)},[l,e]);return{isOpen:e,setOpen:l,open:n,close:o,toggle:r}}const re=w.createContext({placement:"bottom"}),ye=w.forwardRef(function(e,l){[e,l]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,l,re);let n=e.placement,o={position:"absolute",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"};n!=null&&(o[n]="100%");let r=q.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});r.style&&Object.keys(r.style).forEach(i=>r.style[i]===void 0&&delete r.style[i]);let c=$e.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);return w.createElement("div",{...c,...r,style:{...o,...r.style},ref:l,"data-placement":n})});exports.$2a41e45df1593e64$export$d39e1813b3bdd0e1=Le;exports.$44f671af83e7d9e0$export$2de4954e8ae13b9f=re;exports.$44f671af83e7d9e0$export$746d02f47f4d381=ye;exports.$96b38030c423d352$export$9fc1347d4195ccb3=ze;exports.$9daab02d461809db$export$683480f191c0e3ea=J;exports.$d3f049242431219c$export$45fda7c47f93fd48=ge;exports.$d3f049242431219c$export$6d3443f2c48bfc20=ve;exports.$dd149f63282afbbf$export$f6211563215e3b37=ne;exports.$fc909762b330b746$export$61c6a8c84e605fb6=_e;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "./clsx-OuTLNxxd.js";
|
|
3
|
+
import { $ as c } from "./OverlayArrow-CDLXPTew.js";
|
|
4
|
+
import { a as i } from "./Dialog-D14MbJ7o.js";
|
|
5
|
+
import './assets/Popover.css';const m = "_popover_8b5s3_4", d = "_arrow_8b5s3_18", r = {
|
|
6
|
+
popover: m,
|
|
7
|
+
arrow: d
|
|
8
|
+
};
|
|
9
|
+
function v({
|
|
10
|
+
children: e,
|
|
11
|
+
className: s,
|
|
12
|
+
offset: p = 4,
|
|
13
|
+
...a
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
...a,
|
|
19
|
+
offset: p,
|
|
20
|
+
className: f(r.popover, s),
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ o(c, { className: r.arrow, children: /* @__PURE__ */ o(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
width: 8,
|
|
26
|
+
height: 8,
|
|
27
|
+
viewBox: "0 0 8 8",
|
|
28
|
+
children: /* @__PURE__ */ o("path", { d: "M0 0 L4 4 L8 0" })
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
e
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
v as P
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Popover.css');const r=require("react/jsx-runtime"),i=require("./clsx-C11secjj.cjs"),n=require("./OverlayArrow-D75k-EMl.cjs"),a=require("./Dialog-B8GTYbvu.cjs"),p="_popover_8b5s3_4",l="_arrow_8b5s3_18",e={popover:p,arrow:l};function x({children:o,className:s,offset:t=4,...c}){return r.jsxs(a.$07b14b47974efb58$export$5b6b19405a83ff9d,{...c,offset:t,className:i.clsx(e.popover,s),children:[r.jsx(n.$44f671af83e7d9e0$export$746d02f47f4d381,{className:e.arrow,children:r.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:r.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),o]})}exports.Popover=x;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "./Button-DjBChs7s.js";
|
|
3
|
+
import { L as m } from "./Label-BwJrdqEE.js";
|
|
4
|
+
import { c } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
import './assets/ProgressBar.css';const o = "_progressBar_1ekuq_4", N = "_label_1ekuq_12", v = "_value_1ekuq_17", h = "_bar_1ekuq_22", x = "_fill_1ekuq_28", s = {
|
|
6
|
+
progressBar: o,
|
|
7
|
+
label: N,
|
|
8
|
+
value: v,
|
|
9
|
+
bar: h,
|
|
10
|
+
fill: x
|
|
11
|
+
}, B = ({
|
|
12
|
+
label: r,
|
|
13
|
+
labelProps: e,
|
|
14
|
+
showValueLabel: n = !1,
|
|
15
|
+
...t
|
|
16
|
+
}) => /* @__PURE__ */ a(
|
|
17
|
+
u,
|
|
18
|
+
{
|
|
19
|
+
...t,
|
|
20
|
+
className: c(s.progressBar, t.className),
|
|
21
|
+
children: ({ percentage: i, valueText: l, isIndeterminate: _ }) => /* @__PURE__ */ d(f, { children: [
|
|
22
|
+
r && /* @__PURE__ */ a(
|
|
23
|
+
m,
|
|
24
|
+
{
|
|
25
|
+
elementType: "span",
|
|
26
|
+
...e,
|
|
27
|
+
className: c(e == null ? void 0 : e.className, s.label),
|
|
28
|
+
children: r
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
n && /* @__PURE__ */ a(
|
|
32
|
+
m,
|
|
33
|
+
{
|
|
34
|
+
elementType: "span",
|
|
35
|
+
...e,
|
|
36
|
+
id: "",
|
|
37
|
+
className: c(e == null ? void 0 : e.className, s.value),
|
|
38
|
+
children: l
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ a("div", { className: s.bar, children: /* @__PURE__ */ a(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: s.fill,
|
|
45
|
+
style: { width: `${_ ? 50 : i}%` }
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
export {
|
|
52
|
+
B as P
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/ProgressBar.css');const s=require("react/jsx-runtime"),x=require("./Button-htW9qIsS.cjs"),n=require("./Label-7Ybb99CE.cjs"),c=require("./clsx-C11secjj.cjs"),m="_progressBar_1ekuq_4",d="_label_1ekuq_12",q="_value_1ekuq_17",N="_bar_1ekuq_22",f="_fill_1ekuq_28",a={progressBar:m,label:d,value:q,bar:N,fill:f},j=({label:r,labelProps:e,showValueLabel:l=!1,...t})=>s.jsx(x.$0393f8ab869a0f1a$export$c17561cb55d4db30,{...t,className:c.clsx(a.progressBar,t.className),children:({percentage:i,valueText:u,isIndeterminate:_})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(n.Label,{elementType:"span",...e,className:c.clsx(e==null?void 0:e.className,a.label),children:r}),l&&s.jsx(n.Label,{elementType:"span",...e,id:"",className:c.clsx(e==null?void 0:e.className,a.value),children:u}),s.jsx("div",{className:a.bar,children:s.jsx("div",{className:a.fill,style:{width:`${_?50:i}%`}})})]})});exports.ProgressBar=j;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),t=e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);const c=e.createContext({});exports.$4e85f108e88277b8$export$b085522c77523c51=t;exports.$4e85f108e88277b8$export$d688439359537581=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Radio.css');const y=require("react/jsx-runtime"),G=require("./Group-CgiqQHH1.cjs"),t=require("./utils-BNtZbAib.cjs"),I=require("./FieldError-CKBb2-mp.cjs"),L=require("./Form-BuOomA4T.cjs"),N=require("./Button-htW9qIsS.cjs"),j=require("./Text-B2K-BJKQ.cjs"),B=require("./filterDOMProps-BS2lrgFA.cjs"),s=require("react"),w=require("./useFormValidation-ClximP89.cjs"),E=require("./usePress-0AjDbW9R.cjs"),k=require("./useFocusable-NUVSFcRC.cjs"),T=require("./FocusScope-5c9SVBcR.cjs"),C=require("./useFocusRing-CbImDrwF.cjs"),W=require("./useField-CXKYU74k.cjs"),A=require("./context-DjwhtgxQ.cjs"),H=require("./useHover-_mv5J4_q.cjs"),K=require("./VisuallyHidden-CLWHbz2n.cjs"),U=require("./useControlledState-D0L6S_5r.cjs"),z=require("./clsx-C11secjj.cjs"),M=require("./Label-7Ybb99CE.cjs"),J=require("./Text-3MNwRMpI.cjs"),S=new WeakMap;function Q(a,e,d){let{value:l,children:n,"aria-label":r,"aria-labelledby":o}=a;const i=a.isDisabled||e.isDisabled;let $=n!=null,b=r!=null||o!=null;!$&&!b&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let c=e.selectedValue===l,P=V=>{V.stopPropagation(),e.setSelectedValue(l)},{pressProps:h,isPressed:R}=E.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:i}),{pressProps:m,isPressed:p}=E.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:i,onPress(){var V;e.setSelectedValue(l),(V=d.current)===null||V===void 0||V.focus()}}),{focusableProps:F}=k.$f645667febf57a63$export$4c014de7c8940b4c(t.$3ef42575df84b30b$export$9d1611c77c2fe928(a,{onFocus:()=>e.setLastFocusedValue(l)}),d),D=t.$3ef42575df84b30b$export$9d1611c77c2fe928(h,F),g=B.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),x=-1;e.selectedValue!=null?e.selectedValue===l&&(x=0):(e.lastFocusedValue===l||e.lastFocusedValue==null)&&(x=0),i&&(x=void 0);let{name:v,descriptionId:u,errorMessageId:q,validationBehavior:f}=S.get(e);return w.$99facab73266f662$export$5add1d006293d136(d,e.selectedValue,e.setSelectedValue),w.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:f},e,d),{labelProps:t.$3ef42575df84b30b$export$9d1611c77c2fe928(m,{onClick:V=>V.preventDefault()}),inputProps:t.$3ef42575df84b30b$export$9d1611c77c2fe928(g,{...D,type:"radio",name:v,tabIndex:x,disabled:i,required:e.isRequired&&f==="native",checked:c,value:l,onChange:P,"aria-describedby":[a["aria-describedby"],e.isInvalid?q:null,u].filter(Boolean).join(" ")||void 0}),isDisabled:i,isSelected:c,isPressed:R||p}}function X(a,e){let{name:d,isReadOnly:l,isRequired:n,isDisabled:r,orientation:o="vertical",validationBehavior:i="aria"}=a,{direction:$}=A.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{isInvalid:b,validationErrors:c,validationDetails:P}=e.displayValidation,{labelProps:h,fieldProps:R,descriptionProps:m,errorMessageProps:p}=W.$2baaea4c71418dea$export$294aa081a6c6f55d({...a,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:a.errorMessage||c}),F=B.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),{focusWithinProps:D}=C.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin(v){var u;(u=a.onBlur)===null||u===void 0||u.call(a,v),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:a.onFocus,onFocusWithinChange:a.onFocusChange}),g=v=>{let u;switch(v.key){case"ArrowRight":$==="rtl"&&o!=="vertical"?u="prev":u="next";break;case"ArrowLeft":$==="rtl"&&o!=="vertical"?u="next":u="prev";break;case"ArrowDown":u="next";break;case"ArrowUp":u="prev";break;default:return}v.preventDefault();let q=T.$9bf71ea28793e738$export$2d6ec8fc375ceafa(v.currentTarget,{from:v.target}),f;u==="next"?(f=q.nextNode(),f||(q.currentNode=v.currentTarget,f=q.firstChild())):(f=q.previousNode(),f||(q.currentNode=v.currentTarget,f=q.lastChild())),f&&(f.focus(),e.setSelectedValue(f.value))},x=t.$bdb11010cef70236$export$f680877a34711e37(d);return S.set(e,{name:x,descriptionId:m.id,errorMessageId:p.id,validationBehavior:i}),{radioGroupProps:t.$3ef42575df84b30b$export$9d1611c77c2fe928(F,{role:"radiogroup",onKeyDown:g,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":a["aria-errormessage"],"aria-readonly":l||void 0,"aria-required":n||void 0,"aria-disabled":r||void 0,"aria-orientation":o,...R,...D}),labelProps:h,descriptionProps:m,errorMessageProps:p,isInvalid:b,validationErrors:c,validationDetails:P}}let Y=Math.round(Math.random()*1e10),Z=0;function ee(a){let e=s.useMemo(()=>a.name||`radio-group-${Y}-${++Z}`,[a.name]);var d;let[l,n]=U.$458b0a5536c1a7cf$export$40bfa8c7b0832715(a.value,(d=a.defaultValue)!==null&&d!==void 0?d:null,a.onChange),[r,o]=s.useState(null),i=w.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...a,value:l}),$=c=>{!a.isReadOnly&&!a.isDisabled&&(n(c),i.commitValidation())},b=i.displayValidation.isInvalid;return{...i,name:e,selectedValue:l,setSelectedValue:$,lastFocusedValue:r,setLastFocusedValue:o,isDisabled:a.isDisabled||!1,isReadOnly:a.isReadOnly||!1,isRequired:a.isRequired||!1,validationState:a.validationState||(b?"invalid":null),isInvalid:b}}const ae=s.createContext(null),ie=s.createContext(null),O=s.createContext(null),de=s.forwardRef(function(e,d){[e,d]=t.$64fa3d84918910a7$export$29f1550f4b0d4415(e,d,ae);let{validationBehavior:l}=t.$64fa3d84918910a7$export$fabf2dc03a41866e(L.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var n,r;let o=(r=(n=e.validationBehavior)!==null&&n!==void 0?n:l)!==null&&r!==void 0?r:"native",i=ee({...e,validationBehavior:o}),[$,b]=t.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:c,labelProps:P,descriptionProps:h,errorMessageProps:R,...m}=X({...e,label:b,validationBehavior:o},i),p=t.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:{orientation:e.orientation||"vertical",isDisabled:i.isDisabled,isReadOnly:i.isReadOnly,isRequired:i.isRequired,isInvalid:i.isInvalid,state:i},defaultClassName:"react-aria-RadioGroup"});return s.createElement("div",{...c,...p,ref:d,slot:e.slot||void 0,"data-orientation":e.orientation||"vertical","data-invalid":i.isInvalid||void 0,"data-disabled":i.isDisabled||void 0,"data-readonly":i.isReadOnly||void 0,"data-required":i.isRequired||void 0},s.createElement(t.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[O,i],[N.$01b77f81d0f07f68$export$75b6ee27786ba447,{...P,ref:$,elementType:"span"}],[j.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:h,errorMessage:R}}],[I.$ee014567cb39d3f0$export$ff05c3ac10437e03,m]]},p.children))}),re=s.forwardRef(function(e,d){let{inputRef:l=null,...n}=e;[e,d]=t.$64fa3d84918910a7$export$29f1550f4b0d4415(n,d,ie);let r=s.useContext(O),o=t.$df56164dff5785e2$export$4338b53315abf666(s.useMemo(()=>t.$5dc95899b306f630$export$c9058316764c140e(l,e.inputRef!==void 0?e.inputRef:null),[l,e.inputRef])),{labelProps:i,inputProps:$,isSelected:b,isDisabled:c,isPressed:P}=Q({...t.$64fa3d84918910a7$export$ef03459518577ad4(e),children:typeof e.children=="function"?!0:e.children},r,o),{isFocused:h,isFocusVisible:R,focusProps:m}=C.$f7dceffc5ad7768b$export$4e328f61c538687f(),p=c||r.isReadOnly,{hoverProps:F,isHovered:D}=H.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:p}),g=t.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Radio",values:{isSelected:b,isPressed:P,isHovered:D,isFocused:h,isFocusVisible:R,isDisabled:c,isReadOnly:r.isReadOnly,isInvalid:r.isInvalid,isRequired:r.isRequired}}),x=B.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);return delete x.id,s.createElement("label",{...t.$3ef42575df84b30b$export$9d1611c77c2fe928(x,i,F,g),ref:d,"data-selected":b||void 0,"data-pressed":P||void 0,"data-hovered":D||void 0,"data-focused":h||void 0,"data-focus-visible":R||void 0,"data-disabled":c||void 0,"data-readonly":r.isReadOnly||void 0,"data-invalid":r.isInvalid||void 0,"data-required":r.isRequired||void 0},s.createElement(K.$5c3e21d68f1c4674$export$439d29a4e110a164,{elementType:"span"},s.createElement("input",{...t.$3ef42575df84b30b$export$9d1611c77c2fe928($,m),ref:o})),g.children)}),le="_radioGroup_i4hw0_4",te="_wrap_i4hw0_15",oe="_radio_i4hw0_4",_={radioGroup:le,wrap:te,radio:oe},se=({label:a,description:e,errorMessage:d,children:l,className:n,errorPosition:r="top",popover:o,...i})=>y.jsxs(de,{...i,className:z.clsx(_.radioGroup,n),children:[y.jsx(M.LabelWrapper,{popover:o,children:a&&y.jsx(M.Label,{children:a})}),e&&y.jsx(J.Text,{slot:"description",children:e}),r==="top"&&y.jsx(I.FieldError,{"data-testid":"fieldError",children:d}),y.jsx(G.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{className:_.wrap,children:l}),r==="bottom"&&y.jsx(I.FieldError,{"data-testid":"fieldError",children:d})]}),ne=a=>y.jsx(re,{className:_.radio,...a});exports.Radio=ne;exports.RadioGroup=se;
|