@easypost/easy-ui 1.0.0-alpha.50 → 1.0.0-alpha.52
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/Badge/index.js +14 -14
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +5 -5
- package/Banner/index.mjs +5 -5
- package/Button/Button.d.ts +3 -1
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.stories.d.ts +10 -9
- package/Button/Button.stories.d.ts.map +1 -1
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/Button/utilities.d.ts +3 -0
- package/Button/utilities.d.ts.map +1 -1
- package/CHANGELOG.md +14 -0
- package/Calendar/index.js +16 -16
- package/Calendar/index.mjs +25 -25
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/index.js +14 -14
- package/CodeBlock/index.mjs +16 -16
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/DataGrid/index.js +59 -59
- package/DataGrid/index.mjs +73 -73
- package/Drawer/index.js +18 -18
- package/Drawer/index.mjs +21 -21
- package/DropdownButton/DropdownButton.stories.d.ts +5 -5
- package/DropdownButton/DropdownButton.stories.d.ts.map +1 -1
- package/DropdownButton/index.js +13 -13
- package/DropdownButton/index.mjs +13 -13
- package/EmptyStateCard/index.js +8 -8
- package/EmptyStateCard/index.mjs +8 -8
- package/FocusedProductLayout/index.js +23 -23
- package/FocusedProductLayout/index.mjs +23 -23
- package/FormLayout/index.js +5 -5
- package/FormLayout/index.mjs +5 -5
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.mjs +1 -1
- package/IconButton/IconButton.stories.d.ts +5 -5
- package/IconButton/IconButton.stories.d.ts.map +1 -1
- package/IconButton/index.js +13 -13
- package/IconButton/index.mjs +13 -13
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/InputField/useInputField.d.ts +1 -1
- package/Menu/Menu.stories.d.ts +3 -0
- package/Menu/Menu.stories.d.ts.map +1 -1
- package/Menu/MenuItem.d.ts.map +1 -1
- package/Menu/MenuOverlay.d.ts +17 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/MenuSection.d.ts.map +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Menu/utilities.d.ts +14 -0
- package/Menu/utilities.d.ts.map +1 -1
- package/Modal/index.js +19 -19
- package/Modal/index.mjs +22 -22
- package/NexusLayout/index.js +29 -29
- package/NexusLayout/index.mjs +32 -32
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +8 -8
- package/Pagination/index.mjs +8 -8
- package/PillGroup/index.js +6 -6
- package/PillGroup/index.mjs +21 -21
- package/ProductLayout/index.js +22 -22
- package/ProductLayout/index.mjs +25 -25
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +2 -2
- package/RadioGroup/index.js +16 -16
- package/RadioGroup/index.mjs +25 -25
- package/SearchNav/index.js +30 -30
- package/SearchNav/index.mjs +30 -30
- package/SectionCard/index.js +7 -7
- package/SectionCard/index.mjs +7 -7
- package/Select/index.js +5 -5
- package/Select/index.mjs +5 -5
- package/SelectorErrorTooltip/index.js +1 -1
- package/SelectorErrorTooltip/index.mjs +1 -1
- package/Spinner/index.js +1 -1
- package/Spinner/index.mjs +1 -1
- package/SplitToggleCard/index.js +4 -4
- package/SplitToggleCard/index.mjs +4 -4
- package/Stepper/index.js +1 -1
- package/Stepper/index.mjs +1 -1
- package/TabNav/index.js +1 -1
- package/TabNav/index.mjs +1 -1
- package/TabPanels/index.js +1 -1
- package/TabPanels/index.mjs +7 -7
- package/Tabs/index.js +1 -1
- package/Tabs/index.mjs +1 -1
- package/Text/index.js +1 -1
- package/Text/index.mjs +1 -1
- package/TextField/index.js +1 -1
- package/TextField/index.mjs +1 -1
- package/Textarea/index.js +1 -1
- package/Textarea/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +2 -2
- package/ToggleCard/index.mjs +2 -2
- package/Tooltip/index.js +1 -1
- package/Tooltip/index.mjs +1 -1
- package/UnstyledButton/index.js +1 -1
- package/UnstyledButton/index.mjs +1 -1
- package/VerticalNav/index.js +25 -25
- package/VerticalNav/index.mjs +26 -26
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/{Button-Cozw9-m0.mjs → Button-B-PwoC5y.mjs} +18 -18
- package/__chunks__/{Button-C-mB1EYo.js → Button-C8CAs9Ya.js} +18 -18
- package/__chunks__/{Card-D5esBfKs.mjs → Card-BWhI0hJm.mjs} +12 -12
- package/__chunks__/{Card-CdZZPjdi.js → Card-UU3JcpMA.js} +12 -12
- package/__chunks__/{Checkbox-fgdDL8Px.mjs → Checkbox-BZqZjAnI.mjs} +24 -24
- package/__chunks__/{Checkbox-DwWYoXAb.js → Checkbox-CqRLbwPQ.js} +20 -20
- package/__chunks__/{CodeSnippet-58AO7aHj.js → CodeSnippet-B1oVvl-o.js} +2 -2
- package/__chunks__/{CodeSnippet-CvGyrwuz.mjs → CodeSnippet-pRcbJYFv.mjs} +2 -2
- package/__chunks__/{FocusScope-DvD_pBFD.mjs → FocusScope-CjqREKhC.mjs} +3 -3
- package/__chunks__/{HelpMenu-DVYCUwcR.mjs → HelpMenu-BqXmt7b0.mjs} +7 -7
- package/__chunks__/{HelpMenu-DSWVDWlE.js → HelpMenu-c9NnR9pL.js} +7 -7
- package/__chunks__/{HorizontalGrid-DHOuWfNd.mjs → HorizontalGrid-DdZMHCh6.mjs} +1 -1
- package/__chunks__/{HorizontalGrid-C7kgKRft.js → HorizontalGrid-LK3oV1Xf.js} +1 -1
- package/__chunks__/{HorizontalStack-BfGot1sk.mjs → HorizontalStack-Cj64cYl-.mjs} +1 -1
- package/__chunks__/{HorizontalStack-B55fQ7wl.js → HorizontalStack-CyOBQGUF.js} +1 -1
- package/__chunks__/{Icon-B9N6In4d.mjs → Icon-BmhO04p4.mjs} +2 -2
- package/__chunks__/{Icon-0Aepk36j.js → Icon-vgTkejl_.js} +2 -2
- package/__chunks__/{InputField-CFm0QRF2.js → InputField-nGv1FZJR.js} +5 -5
- package/__chunks__/{InputField-DpZDDBRI.mjs → InputField-w-orC_z_.mjs} +10 -10
- package/__chunks__/{InputIcon-C0O8aQLE.mjs → InputIcon-D5WHF9JB.mjs} +25 -25
- package/__chunks__/{InputIcon-BDeDh51H.js → InputIcon-eg1DDtXb.js} +25 -25
- package/__chunks__/{Menu-DFIPOTVY.mjs → Menu-Bo7BjljK.mjs} +78 -31
- package/__chunks__/{Menu-y3ibNiZf.js → Menu-ComLF8Lu.js} +72 -25
- package/__chunks__/{Notification-C2f4ZUOA.mjs → Notification-B344rGS6.mjs} +20 -20
- package/__chunks__/{Notification-DKf4hi-k.js → Notification-BZ3ybUEX.js} +15 -15
- package/__chunks__/{Overlay-NSOiekJL.mjs → Overlay-Dz_4R38U.mjs} +2 -2
- package/__chunks__/{SelectOverlay-C06AcPFT.js → SelectOverlay-DQgtS85D.js} +21 -21
- package/__chunks__/{SelectOverlay-D9bddTht.mjs → SelectOverlay-Dlh7kgJP.mjs} +32 -32
- package/__chunks__/{SelectorErrorTooltip-houttOE4.mjs → SelectorErrorTooltip-BkPBRxMN.mjs} +4 -4
- package/__chunks__/{SelectorErrorTooltip-B4c63TSV.js → SelectorErrorTooltip-PmNc0Njc.js} +4 -4
- package/__chunks__/{Spinner-uRV-Py_H.mjs → Spinner-7zBK2Xm-.mjs} +8 -8
- package/__chunks__/{Spinner-CrvpgZz3.js → Spinner-DzWjiJW-.js} +5 -5
- package/__chunks__/{Stepper-8pmHgGMW.mjs → Stepper-CSyqKD6E.mjs} +28 -28
- package/__chunks__/{Stepper-CzOhqh9s.js → Stepper-D_Eb3lcZ.js} +26 -26
- package/__chunks__/{TabNav-VfVP0i2f.js → TabNav-bXzfdbir.js} +1 -1
- package/__chunks__/{TabNav-BLHhKoF3.mjs → TabNav-ihtxj9yI.mjs} +1 -1
- package/__chunks__/{Tabs-BF2fjh5_.mjs → Tabs-CJ0TRL3H.mjs} +19 -19
- package/__chunks__/{Tabs-hmc36j2A.js → Tabs-CmmF0WMQ.js} +17 -17
- package/__chunks__/{Text-Co1k1a0Q.mjs → Text-CLXCmUFd.mjs} +34 -34
- package/__chunks__/{Text-CLNl4ktK.js → Text-DN9QVNH4.js} +34 -34
- package/__chunks__/{Toggle-B56Z2_Wn.js → Toggle-D4oyHZCf.js} +12 -12
- package/__chunks__/{Toggle-sHxf5_Z1.mjs → Toggle-DytN4mU6.mjs} +14 -14
- package/__chunks__/{Tooltip-BFYMYM8t.js → Tooltip-BFf05Sd7.js} +11 -12
- package/__chunks__/{Tooltip-H--IFdjD.mjs → Tooltip-BHGCJiVl.mjs} +12 -13
- package/__chunks__/{UnstyledButton-Bl1UoMqJ.js → UnstyledButton-DVpiY5Qh.js} +7 -4
- package/__chunks__/{UnstyledButton-NAjBMn23.mjs → UnstyledButton-DcvMv4SL.mjs} +8 -5
- package/__chunks__/{VerticalStack-DVQ47Sgy.js → VerticalStack-CbamvYP6.js} +3 -3
- package/__chunks__/{VerticalStack-CIBy26G5.mjs → VerticalStack-DOMDyLlK.mjs} +3 -3
- package/__chunks__/{VisuallyHidden-BUfWRoE5.mjs → VisuallyHidden-CBNzWIG8.mjs} +2 -2
- package/__chunks__/{ariaHideOutside-enBbyPlv.mjs → ariaHideOutside-CGNrOhSc.mjs} +4 -4
- package/__chunks__/{context-vBsWZ3Ni.mjs → context-D3I6RuRU.mjs} +1 -1
- package/__chunks__/{focusSafely-Cg665ed0.mjs → focusSafely-MxnwWbsu.mjs} +1 -1
- package/__chunks__/{mergeProps-CTaIJjOz.mjs → mergeProps-SJQ-f8LF.mjs} +3 -3
- package/__chunks__/{scrollIntoView-kxx1IN_-.mjs → scrollIntoView-C4vMSOYx.mjs} +1 -1
- package/__chunks__/{useButton-DXm5VgDJ.mjs → useButton-COCB0O4M.mjs} +3 -3
- package/__chunks__/{useButton-DbLIL_Ws.js → useButton-hrdBTa5u.js} +1 -1
- package/__chunks__/{useDialog-uuzOXBNO.mjs → useDialog-47nl4w_8.mjs} +4 -4
- package/__chunks__/{useEdgeInterceptors-CHGcWJgn.js → useEdgeInterceptors-CrrZ-iAb.js} +5 -5
- package/__chunks__/{useEdgeInterceptors-DuFYe9N2.mjs → useEdgeInterceptors-D0TMU4bR.mjs} +5 -5
- package/__chunks__/{useField-V_J-oAim.mjs → useField-DPD-La1H.mjs} +2 -2
- package/__chunks__/{useFocus-DSrpUdfo.mjs → useFocus-DOcjAFnP.mjs} +1 -1
- package/__chunks__/{useFocusRing-DEnOkFNv.mjs → useFocusRing-Cj5zef_6.mjs} +3 -3
- package/__chunks__/{useFocusVisible-3GO81-mK.mjs → useFocusVisible-DXAxI2Xj.mjs} +5 -5
- package/__chunks__/{useFocusWithin-Dowl-zQ8.mjs → useFocusWithin-Bg5BTlgA.mjs} +1 -1
- package/__chunks__/{useFocusable-DKo4wWkA.js → useFocusable-By9yXfUQ.js} +32 -2
- package/__chunks__/{useFocusable-D7496iqi.mjs → useFocusable-Uo_zjP6s.mjs} +36 -6
- package/__chunks__/{useFormReset-Z8kPFt1Y.mjs → useFormReset-CFhWic3i.mjs} +1 -1
- package/__chunks__/{useFormValidation-IDftdxEG.mjs → useFormValidation-C_CD-7QE.mjs} +2 -2
- package/__chunks__/{useHasTabbableChild-BiqyiyYV.mjs → useHasTabbableChild-DhoFI49t.mjs} +2 -2
- package/__chunks__/{useHighlightSelectionDescription-Bhj3NHov.mjs → useHighlightSelectionDescription-BGSwVQtc.mjs} +3 -3
- package/__chunks__/{useLabel-D5AQm8lF.mjs → useLabel-BlM5Qwvq.mjs} +2 -2
- package/__chunks__/{useLabels-GVN_BrWS.mjs → useLabels-DdXkBiwn.mjs} +1 -1
- package/__chunks__/{useLocalizedStringFormatter-D8BlhW_5.mjs → useLocalizedStringFormatter-DJWWtB78.mjs} +1 -1
- package/__chunks__/{useOverlayPosition-DOUNnvBc.js → useModal-BV6_Azqp.js} +67 -0
- package/__chunks__/{useOverlayPosition-C15BXmuc.mjs → useModal-sVKQd6HX.mjs} +72 -5
- package/__chunks__/{usePress-DPi5mXfq.mjs → usePress-CA-sH9oY.mjs} +4 -4
- package/__chunks__/{useSelectableItem-CHyfwMdA.mjs → useSelectableItem-Dn-hODEw.mjs} +7 -7
- package/__chunks__/{useSelectableList-UrsfEn_q.mjs → useSelectableList-DjrCndUM.mjs} +2 -2
- package/__chunks__/{useSyncRef-BiS62sNy.mjs → useSyncRef-Cp332icp.mjs} +1 -1
- package/__chunks__/{useToggle-aIu1nW8S.mjs → useToggle-V7BhKpNo.mjs} +4 -4
- package/__chunks__/{useToggle-U50aBv7S.js → useToggle-qLiVQ6Y2.js} +1 -1
- package/__chunks__/{useTriggerWidth-E4NybnOT.js → useTriggerWidth-Bj1hzfIg.js} +67 -2
- package/__chunks__/{useTriggerWidth-BMatkUuB.mjs → useTriggerWidth-CI9YrWOP.mjs} +81 -16
- package/package.json +2 -2
- package/style.css +1053 -1056
- package/utilities/storybook.d.ts +25 -1
- package/utilities/storybook.d.ts.map +1 -1
- package/__chunks__/useKeyboard-C9jAeK81.mjs +0 -52
- package/__chunks__/useKeyboard-cV-AdZ-T.js +0 -51
- package/__chunks__/useModal-D548rAs-.js +0 -86
- package/__chunks__/useModal-kt-e-joU.mjs +0 -87
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useCallback, useEffect, useState } from "react";
|
|
2
|
-
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c,
|
|
2
|
+
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, e as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
3
3
|
const $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
|
|
4
4
|
var _el_ownerDocument;
|
|
5
5
|
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
@@ -327,10 +327,10 @@ export {
|
|
|
327
327
|
$431fbd86ca7dc216$export$b204af158042fbac as a,
|
|
328
328
|
$507fabe10e71c6fb$export$b9b3dfddab17db27 as b,
|
|
329
329
|
$507fabe10e71c6fb$export$ec71b4b83ac08ec3 as c,
|
|
330
|
-
$
|
|
331
|
-
$
|
|
332
|
-
$
|
|
333
|
-
$
|
|
330
|
+
$507fabe10e71c6fb$export$8397ddfc504fdb9a as d,
|
|
331
|
+
$431fbd86ca7dc216$export$f21a1ffae260145a as e,
|
|
332
|
+
$507fabe10e71c6fb$export$630ff653c5ada6a9 as f,
|
|
333
|
+
$c87311424ea30a05$export$78551043582a6a98 as g,
|
|
334
334
|
$c87311424ea30a05$export$fedb369cb70207f1 as h,
|
|
335
335
|
$c87311424ea30a05$export$e1865c3bedcd822b as i,
|
|
336
336
|
$c87311424ea30a05$export$9ac100e40613ea10 as j,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $8a9cb279dc87e130$export$715c682d09d639cc } from "./useFocusVisible-
|
|
1
|
+
import { $ as $8a9cb279dc87e130$export$715c682d09d639cc } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
2
2
|
import { useRef, useCallback } from "react";
|
|
3
3
|
function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
4
4
|
let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
|
|
@@ -35,7 +35,36 @@ const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
|
35
35
|
const useSyncRef = require("./useSyncRef-CPg4onT-.js");
|
|
36
36
|
const React = require("react");
|
|
37
37
|
const useFocus = require("./useFocus-Dk6g6k91.js");
|
|
38
|
-
|
|
38
|
+
function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
39
|
+
if (!handler) return void 0;
|
|
40
|
+
let shouldStopPropagation = true;
|
|
41
|
+
return (e) => {
|
|
42
|
+
let event = __spreadProps(__spreadValues({}, e), {
|
|
43
|
+
preventDefault() {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
},
|
|
46
|
+
isDefaultPrevented() {
|
|
47
|
+
return e.isDefaultPrevented();
|
|
48
|
+
},
|
|
49
|
+
stopPropagation() {
|
|
50
|
+
console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
51
|
+
},
|
|
52
|
+
continuePropagation() {
|
|
53
|
+
shouldStopPropagation = false;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
handler(event);
|
|
57
|
+
if (shouldStopPropagation) e.stopPropagation();
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
|
|
61
|
+
return {
|
|
62
|
+
keyboardProps: props.isDisabled ? {} : {
|
|
63
|
+
onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
|
|
64
|
+
onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
39
68
|
let $e6afbd83fe6ebbd2$var$FocusableContext = /* @__PURE__ */ React.createContext(null);
|
|
40
69
|
function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
|
|
41
70
|
let context = React.useContext($e6afbd83fe6ebbd2$var$FocusableContext) || {};
|
|
@@ -45,7 +74,7 @@ function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
|
|
|
45
74
|
}
|
|
46
75
|
function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
|
|
47
76
|
let { focusProps } = useFocus.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
|
|
48
|
-
let { keyboardProps } =
|
|
77
|
+
let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
|
|
49
78
|
let interactions = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(focusProps, keyboardProps);
|
|
50
79
|
let domProps = $e6afbd83fe6ebbd2$var$useFocusableContext(domRef);
|
|
51
80
|
let interactionProps = props.isDisabled ? {} : domProps;
|
|
@@ -62,4 +91,5 @@ function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
|
|
|
62
91
|
}), interactionProps)
|
|
63
92
|
};
|
|
64
93
|
}
|
|
94
|
+
exports.$46d819fcbaf35654$export$8f71654801c2f7cd = $46d819fcbaf35654$export$8f71654801c2f7cd;
|
|
65
95
|
exports.$e6afbd83fe6ebbd2$export$4c014de7c8940b4c = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c;
|
|
@@ -29,12 +29,41 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { $ as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-
|
|
33
|
-
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-
|
|
34
|
-
import { $ as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./useSyncRef-
|
|
32
|
+
import { $ as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-MxnwWbsu.mjs";
|
|
33
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
34
|
+
import { $ as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./useSyncRef-Cp332icp.mjs";
|
|
35
35
|
import React__default, { useRef, useEffect, useContext } from "react";
|
|
36
|
-
import { $ as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useFocus-
|
|
37
|
-
|
|
36
|
+
import { $ as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useFocus-DOcjAFnP.mjs";
|
|
37
|
+
function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
38
|
+
if (!handler) return void 0;
|
|
39
|
+
let shouldStopPropagation = true;
|
|
40
|
+
return (e) => {
|
|
41
|
+
let event = __spreadProps(__spreadValues({}, e), {
|
|
42
|
+
preventDefault() {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
},
|
|
45
|
+
isDefaultPrevented() {
|
|
46
|
+
return e.isDefaultPrevented();
|
|
47
|
+
},
|
|
48
|
+
stopPropagation() {
|
|
49
|
+
console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
50
|
+
},
|
|
51
|
+
continuePropagation() {
|
|
52
|
+
shouldStopPropagation = false;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
handler(event);
|
|
56
|
+
if (shouldStopPropagation) e.stopPropagation();
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
|
|
60
|
+
return {
|
|
61
|
+
keyboardProps: props.isDisabled ? {} : {
|
|
62
|
+
onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
|
|
63
|
+
onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
38
67
|
let $e6afbd83fe6ebbd2$var$FocusableContext = /* @__PURE__ */ React__default.createContext(null);
|
|
39
68
|
function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
|
|
40
69
|
let context = useContext($e6afbd83fe6ebbd2$var$FocusableContext) || {};
|
|
@@ -62,5 +91,6 @@ function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
|
|
|
62
91
|
};
|
|
63
92
|
}
|
|
64
93
|
export {
|
|
65
|
-
$e6afbd83fe6ebbd2$export$4c014de7c8940b4c as
|
|
94
|
+
$e6afbd83fe6ebbd2$export$4c014de7c8940b4c as $,
|
|
95
|
+
$46d819fcbaf35654$export$8f71654801c2f7cd as a
|
|
66
96
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
4
4
|
let resetValue = useRef(initialValue);
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { createContext, useMemo, useContext, useState, useRef, useEffect } from "react";
|
|
21
|
-
import {
|
|
22
|
-
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c,
|
|
21
|
+
import { d as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
22
|
+
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
23
23
|
const $e5be200c675c3b3a$export$aca958c65c314e6c = {
|
|
24
24
|
badInput: false,
|
|
25
25
|
customError: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-
|
|
2
|
-
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-
|
|
1
|
+
import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-CjqREKhC.mjs";
|
|
2
|
+
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-SJQ-f8LF.mjs";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
5
5
|
let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $ as $4f58c5f72bcf79f7$export$496315a1608d9602, a as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./LiveAnnouncer-UhhG0KqR.mjs";
|
|
2
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
2
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-DJWWtB78.mjs";
|
|
3
3
|
import { useRef, useMemo } from "react";
|
|
4
|
-
import { $ as $ef06256079686ba0$export$f8aeda7b10753fa1 } from "./scrollIntoView-
|
|
5
|
-
import { o as $507fabe10e71c6fb$export$98e20ec92f614cfe } from "./useFocusVisible-
|
|
4
|
+
import { $ as $ef06256079686ba0$export$f8aeda7b10753fa1 } from "./scrollIntoView-C4vMSOYx.mjs";
|
|
5
|
+
import { o as $507fabe10e71c6fb$export$98e20ec92f614cfe } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
6
6
|
var $682989befd4f478d$exports = {};
|
|
7
7
|
$682989befd4f478d$exports = {
|
|
8
8
|
"deselectedItem": (args) => `${args.item} غير المحدد`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
1
|
+
import { d as $bdb11010cef70236$export$f680877a34711e37 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
2
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-DdXkBiwn.mjs";
|
|
3
3
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
4
4
|
let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
|
|
5
5
|
id = $bdb11010cef70236$export$f680877a34711e37(id);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as $bdb11010cef70236$export$f680877a34711e37 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
2
2
|
function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
|
|
3
3
|
let { id, "aria-label": label, "aria-labelledby": labelledBy } = props;
|
|
4
4
|
id = $bdb11010cef70236$export$f680877a34711e37(id);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-D3I6RuRU.mjs";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
const $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
|
|
4
4
|
const $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
|
|
@@ -18,6 +18,18 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
return a;
|
|
19
19
|
};
|
|
20
20
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
21
33
|
const useFocusVisible = require("./useFocusVisible-DAg8LS6j.js");
|
|
22
34
|
const number = require("./number-C4N6pKyl.js");
|
|
23
35
|
const useCloseOnScroll = require("./useCloseOnScroll-CLFhBFoo.js");
|
|
@@ -25,6 +37,7 @@ const React = require("react");
|
|
|
25
37
|
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
26
38
|
const useResizeObserver = require("./useResizeObserver-BsbT3mjh.js");
|
|
27
39
|
const context = require("./context-D3NeXov7.js");
|
|
40
|
+
const ReactDOM = require("react-dom");
|
|
28
41
|
const $edcf132a9284368a$var$AXIS = {
|
|
29
42
|
top: "top",
|
|
30
43
|
bottom: "top",
|
|
@@ -469,4 +482,58 @@ function $2a41e45df1593e64$var$translateRTL(position, direction) {
|
|
|
469
482
|
if (direction === "rtl") return position.replace("start", "right").replace("end", "left");
|
|
470
483
|
return position.replace("start", "left").replace("end", "right");
|
|
471
484
|
}
|
|
485
|
+
const $f57aed4a881a3485$var$Context = /* @__PURE__ */ React.createContext(null);
|
|
486
|
+
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
|
|
487
|
+
let { children } = props;
|
|
488
|
+
let parent = React.useContext($f57aed4a881a3485$var$Context);
|
|
489
|
+
let [modalCount, setModalCount] = React.useState(0);
|
|
490
|
+
let context2 = React.useMemo(() => ({
|
|
491
|
+
parent,
|
|
492
|
+
modalCount,
|
|
493
|
+
addModal() {
|
|
494
|
+
setModalCount((count) => count + 1);
|
|
495
|
+
if (parent) parent.addModal();
|
|
496
|
+
},
|
|
497
|
+
removeModal() {
|
|
498
|
+
setModalCount((count) => count - 1);
|
|
499
|
+
if (parent) parent.removeModal();
|
|
500
|
+
}
|
|
501
|
+
}), [
|
|
502
|
+
parent,
|
|
503
|
+
modalCount
|
|
504
|
+
]);
|
|
505
|
+
return /* @__PURE__ */ React.createElement($f57aed4a881a3485$var$Context.Provider, {
|
|
506
|
+
value: context2
|
|
507
|
+
}, children);
|
|
508
|
+
}
|
|
509
|
+
function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
|
|
510
|
+
let context2 = React.useContext($f57aed4a881a3485$var$Context);
|
|
511
|
+
return {
|
|
512
|
+
modalProviderProps: {
|
|
513
|
+
"aria-hidden": context2 && context2.modalCount > 0 ? true : void 0
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function $f57aed4a881a3485$var$OverlayContainerDOM(props) {
|
|
518
|
+
let { modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();
|
|
519
|
+
return /* @__PURE__ */ React.createElement("div", __spreadValues(__spreadValues({
|
|
520
|
+
"data-overlay-container": true
|
|
521
|
+
}, props), modalProviderProps));
|
|
522
|
+
}
|
|
523
|
+
function $f57aed4a881a3485$export$bf688221f59024e5(props) {
|
|
524
|
+
return /* @__PURE__ */ React.createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /* @__PURE__ */ React.createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));
|
|
525
|
+
}
|
|
526
|
+
function $f57aed4a881a3485$export$b47c3594eab58386(props) {
|
|
527
|
+
let isSSR = mergeProps.$b5e257d569688ac6$export$535bd6ca7f90a273();
|
|
528
|
+
let _a = props, { portalContainer = isSSR ? null : document.body } = _a, rest = __objRest(_a, ["portalContainer"]);
|
|
529
|
+
React.useEffect(() => {
|
|
530
|
+
if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
531
|
+
}, [
|
|
532
|
+
portalContainer
|
|
533
|
+
]);
|
|
534
|
+
if (!portalContainer) return null;
|
|
535
|
+
let contents = /* @__PURE__ */ React.createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);
|
|
536
|
+
return /* @__PURE__ */ ReactDOM.createPortal(contents, portalContainer);
|
|
537
|
+
}
|
|
472
538
|
exports.$2a41e45df1593e64$export$d39e1813b3bdd0e1 = $2a41e45df1593e64$export$d39e1813b3bdd0e1;
|
|
539
|
+
exports.$f57aed4a881a3485$export$b47c3594eab58386 = $f57aed4a881a3485$export$b47c3594eab58386;
|
|
@@ -17,13 +17,26 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { g as $c87311424ea30a05$export$78551043582a6a98 } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
21
33
|
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-CLRm_tTs.mjs";
|
|
22
34
|
import { $ as $dd149f63282afbbf$export$18fc8428861184da } from "./useCloseOnScroll-DxZ3orlK.mjs";
|
|
23
|
-
import { useState, useRef, useEffect, useCallback } from "react";
|
|
24
|
-
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-
|
|
35
|
+
import React__default, { useState, useRef, useEffect, useCallback, useContext, useMemo } from "react";
|
|
36
|
+
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, e as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
25
37
|
import { $ as $9daab02d461809db$export$683480f191c0e3ea } from "./useResizeObserver-Dyb4wvuA.mjs";
|
|
26
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
38
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-D3I6RuRU.mjs";
|
|
39
|
+
import ReactDOM from "react-dom";
|
|
27
40
|
const $edcf132a9284368a$var$AXIS = {
|
|
28
41
|
top: "top",
|
|
29
42
|
bottom: "top",
|
|
@@ -468,6 +481,60 @@ function $2a41e45df1593e64$var$translateRTL(position, direction) {
|
|
|
468
481
|
if (direction === "rtl") return position.replace("start", "right").replace("end", "left");
|
|
469
482
|
return position.replace("start", "left").replace("end", "right");
|
|
470
483
|
}
|
|
484
|
+
const $f57aed4a881a3485$var$Context = /* @__PURE__ */ React__default.createContext(null);
|
|
485
|
+
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
|
|
486
|
+
let { children } = props;
|
|
487
|
+
let parent = useContext($f57aed4a881a3485$var$Context);
|
|
488
|
+
let [modalCount, setModalCount] = useState(0);
|
|
489
|
+
let context = useMemo(() => ({
|
|
490
|
+
parent,
|
|
491
|
+
modalCount,
|
|
492
|
+
addModal() {
|
|
493
|
+
setModalCount((count) => count + 1);
|
|
494
|
+
if (parent) parent.addModal();
|
|
495
|
+
},
|
|
496
|
+
removeModal() {
|
|
497
|
+
setModalCount((count) => count - 1);
|
|
498
|
+
if (parent) parent.removeModal();
|
|
499
|
+
}
|
|
500
|
+
}), [
|
|
501
|
+
parent,
|
|
502
|
+
modalCount
|
|
503
|
+
]);
|
|
504
|
+
return /* @__PURE__ */ React__default.createElement($f57aed4a881a3485$var$Context.Provider, {
|
|
505
|
+
value: context
|
|
506
|
+
}, children);
|
|
507
|
+
}
|
|
508
|
+
function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
|
|
509
|
+
let context = useContext($f57aed4a881a3485$var$Context);
|
|
510
|
+
return {
|
|
511
|
+
modalProviderProps: {
|
|
512
|
+
"aria-hidden": context && context.modalCount > 0 ? true : void 0
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
function $f57aed4a881a3485$var$OverlayContainerDOM(props) {
|
|
517
|
+
let { modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();
|
|
518
|
+
return /* @__PURE__ */ React__default.createElement("div", __spreadValues(__spreadValues({
|
|
519
|
+
"data-overlay-container": true
|
|
520
|
+
}, props), modalProviderProps));
|
|
521
|
+
}
|
|
522
|
+
function $f57aed4a881a3485$export$bf688221f59024e5(props) {
|
|
523
|
+
return /* @__PURE__ */ React__default.createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /* @__PURE__ */ React__default.createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));
|
|
524
|
+
}
|
|
525
|
+
function $f57aed4a881a3485$export$b47c3594eab58386(props) {
|
|
526
|
+
let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
|
|
527
|
+
let _a = props, { portalContainer = isSSR ? null : document.body } = _a, rest = __objRest(_a, ["portalContainer"]);
|
|
528
|
+
React__default.useEffect(() => {
|
|
529
|
+
if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
530
|
+
}, [
|
|
531
|
+
portalContainer
|
|
532
|
+
]);
|
|
533
|
+
if (!portalContainer) return null;
|
|
534
|
+
let contents = /* @__PURE__ */ React__default.createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);
|
|
535
|
+
return /* @__PURE__ */ ReactDOM.createPortal(contents, portalContainer);
|
|
536
|
+
}
|
|
471
537
|
export {
|
|
472
|
-
$
|
|
538
|
+
$f57aed4a881a3485$export$b47c3594eab58386 as $,
|
|
539
|
+
$2a41e45df1593e64$export$d39e1813b3bdd0e1 as a
|
|
473
540
|
};
|
|
@@ -13,12 +13,12 @@ var __objRest = (source, exclude) => {
|
|
|
13
13
|
}
|
|
14
14
|
return target;
|
|
15
15
|
};
|
|
16
|
-
import { k as $c87311424ea30a05$export$b7d78993b74f766d, j as $c87311424ea30a05$export$9ac100e40613ea10,
|
|
17
|
-
import { a as $7215afc6de606d6b$export$de79e2c695e052f3, b as $bbed8b41f857bcc0$export$24490316f764c430 } from "./focusSafely-
|
|
16
|
+
import { k as $c87311424ea30a05$export$b7d78993b74f766d, j as $c87311424ea30a05$export$9ac100e40613ea10, g as $c87311424ea30a05$export$78551043582a6a98, l as $c87311424ea30a05$export$7bef049ce92e4224, h as $c87311424ea30a05$export$fedb369cb70207f1, a as $431fbd86ca7dc216$export$b204af158042fbac, m as $6a7db85432448f7f$export$29bf1b5f2c56cf63, n as $6a7db85432448f7f$export$60278871457622de, e as $431fbd86ca7dc216$export$f21a1ffae260145a } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
17
|
+
import { a as $7215afc6de606d6b$export$de79e2c695e052f3, b as $bbed8b41f857bcc0$export$24490316f764c430 } from "./focusSafely-MxnwWbsu.mjs";
|
|
18
18
|
import { $ as $ae1eeba8b9eafd08$export$5165eccb35aaadb5 } from "./context-BzShm_W7.mjs";
|
|
19
|
-
import {
|
|
19
|
+
import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./mergeProps-SJQ-f8LF.mjs";
|
|
20
20
|
import React__default, { useMemo, createContext, useContext, useRef, useCallback, useEffect, useState } from "react";
|
|
21
|
-
import { $ as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./useSyncRef-
|
|
21
|
+
import { $ as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./useSyncRef-Cp332icp.mjs";
|
|
22
22
|
function _check_private_redeclaration(obj, privateCollection) {
|
|
23
23
|
if (privateCollection.has(obj)) {
|
|
24
24
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
@@ -19,13 +19,13 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { useEffect, useRef } from "react";
|
|
21
21
|
import { flushSync } from "react-dom";
|
|
22
|
-
import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-
|
|
23
|
-
import { $ as $6a99195332edec8b$export$80f3e147d781571c, a as $7215afc6de606d6b$export$de79e2c695e052f3 } from "./focusSafely-
|
|
24
|
-
import {
|
|
25
|
-
import { b as $03deb23ff14920c4$export$4eaf04e54aa8eed6, $ as $f6c31cce2adf654f$export$45712eceda6fad21, c as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, d as $ea8dcbcb9ea1b556$export$95185d699e05d4d7 } from "./usePress-
|
|
26
|
-
import { $ as $ef06256079686ba0$export$f8aeda7b10753fa1, a as $2f04cbc44ee30ce0$export$53a0910f038337bd, b as $2f04cbc44ee30ce0$export$c826860796309d1b } from "./scrollIntoView-
|
|
27
|
-
import { i as $c87311424ea30a05$export$e1865c3bedcd822b, j as $c87311424ea30a05$export$9ac100e40613ea10,
|
|
28
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
22
|
+
import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-CjqREKhC.mjs";
|
|
23
|
+
import { $ as $6a99195332edec8b$export$80f3e147d781571c, a as $7215afc6de606d6b$export$de79e2c695e052f3 } from "./focusSafely-MxnwWbsu.mjs";
|
|
24
|
+
import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
25
|
+
import { b as $03deb23ff14920c4$export$4eaf04e54aa8eed6, $ as $f6c31cce2adf654f$export$45712eceda6fad21, c as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, d as $ea8dcbcb9ea1b556$export$95185d699e05d4d7 } from "./usePress-CA-sH9oY.mjs";
|
|
26
|
+
import { $ as $ef06256079686ba0$export$f8aeda7b10753fa1, a as $2f04cbc44ee30ce0$export$53a0910f038337bd, b as $2f04cbc44ee30ce0$export$c826860796309d1b } from "./scrollIntoView-C4vMSOYx.mjs";
|
|
27
|
+
import { i as $c87311424ea30a05$export$e1865c3bedcd822b, j as $c87311424ea30a05$export$9ac100e40613ea10, f as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
28
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-D3I6RuRU.mjs";
|
|
29
29
|
function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
|
|
30
30
|
let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler);
|
|
31
31
|
let isDisabled = handler == null;
|
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { $ as $ae20dd8cbca75726$export$d6daf82dcd84e87c } from "./useSelectableItem-
|
|
20
|
+
import { $ as $ae20dd8cbca75726$export$d6daf82dcd84e87c } from "./useSelectableItem-Dn-hODEw.mjs";
|
|
21
21
|
import { $ as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "./isScrollable-DwbLAiO0.mjs";
|
|
22
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
22
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-D3I6RuRU.mjs";
|
|
23
23
|
import { useMemo } from "react";
|
|
24
24
|
let $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
|
|
25
25
|
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-
|
|
1
|
+
import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-SJQ-f8LF.mjs";
|
|
2
2
|
function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
3
3
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
4
4
|
if (context && context.ref && ref) {
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
|
|
21
|
-
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-
|
|
21
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
22
22
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
|
|
23
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
24
|
-
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-
|
|
25
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-
|
|
23
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-CFhWic3i.mjs";
|
|
24
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-Uo_zjP6s.mjs";
|
|
25
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-CA-sH9oY.mjs";
|
|
26
26
|
function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
|
|
27
27
|
let { isReadOnly } = props;
|
|
28
28
|
let [isSelected, setSelected] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isSelected, props.defaultSelected || false, props.onChange);
|
|
@@ -22,7 +22,7 @@ const useControlledState = require("./useControlledState-mnKBd6Uc.js");
|
|
|
22
22
|
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
23
23
|
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
24
24
|
const useFormReset = require("./useFormReset-Bgj93eR3.js");
|
|
25
|
-
const useFocusable = require("./useFocusable-
|
|
25
|
+
const useFocusable = require("./useFocusable-By9yXfUQ.js");
|
|
26
26
|
const usePress = require("./usePress-DjyN_yP2.js");
|
|
27
27
|
function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
|
|
28
28
|
let { isReadOnly } = props;
|
|
@@ -72,7 +72,7 @@ const useLabels = require("./useLabels-KmwewLTv.js");
|
|
|
72
72
|
const useLocalizedStringFormatter = require("./useLocalizedStringFormatter-D74_5d4h.js");
|
|
73
73
|
const VisuallyHidden = require("./VisuallyHidden-zJSJlhfQ.js");
|
|
74
74
|
const ariaHideOutside = require("./ariaHideOutside-qn3-pnlW.js");
|
|
75
|
-
const
|
|
75
|
+
const useModal = require("./useModal-BV6_Azqp.js");
|
|
76
76
|
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
77
77
|
const useSelectableItem = require("./useSelectableItem-Bgjo4Ulj.js");
|
|
78
78
|
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
@@ -327,7 +327,7 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
|
327
327
|
isKeyboardDismissDisabled,
|
|
328
328
|
shouldCloseOnInteractOutside
|
|
329
329
|
}, popoverRef);
|
|
330
|
-
let { overlayProps: positionProps, arrowProps, placement } =
|
|
330
|
+
let { overlayProps: positionProps, arrowProps, placement } = useModal.$2a41e45df1593e64$export$d39e1813b3bdd0e1(__spreadProps(__spreadValues({}, otherProps), {
|
|
331
331
|
targetRef: triggerRef,
|
|
332
332
|
overlayRef: popoverRef,
|
|
333
333
|
isOpen: state.isOpen,
|
|
@@ -613,9 +613,69 @@ const ITEM_HEIGHT = 32;
|
|
|
613
613
|
const Y_PADDING_INSIDE_OVERLAY = 8;
|
|
614
614
|
const OVERLAY_OFFSET = 8;
|
|
615
615
|
const OVERLAY_PADDING_FROM_CONTAINER = 12;
|
|
616
|
+
const SELECT_ALL_KEY = "all";
|
|
616
617
|
function getUnmergedPopoverStyles(width, triggerWidth) {
|
|
617
618
|
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getComponentToken("menu", "item_height", `${utilities_css.pxToRem(ITEM_HEIGHT)}rem`)), utilities_css.getComponentToken("menu", "padding.y", `${utilities_css.pxToRem(Y_PADDING_INSIDE_OVERLAY)}rem`)), utilities_css.getComponentToken("menu", "min-width", width === "auto" ? `${triggerWidth}px` : void 0)), utilities_css.getResponsiveValue("menu", "width", width !== "auto" && width !== "fit-content" ? width : "auto"));
|
|
618
619
|
}
|
|
620
|
+
function getAllSelectableItems(state) {
|
|
621
|
+
return [...state.collection].reduce((acc, item) => {
|
|
622
|
+
if (item.type === "section") {
|
|
623
|
+
[...item.childNodes].forEach((child) => {
|
|
624
|
+
if (child.key !== SELECT_ALL_KEY && !state.disabledKeys.has(child.key)) {
|
|
625
|
+
acc.add(child.key);
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
} else {
|
|
629
|
+
if (item.key !== SELECT_ALL_KEY && !state.disabledKeys.has(item.key)) {
|
|
630
|
+
acc.add(item.key);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return acc;
|
|
634
|
+
}, /* @__PURE__ */ new Set());
|
|
635
|
+
}
|
|
636
|
+
function filterSelectedKeys(keys) {
|
|
637
|
+
return new Set([...keys].filter((v) => v !== SELECT_ALL_KEY));
|
|
638
|
+
}
|
|
639
|
+
function getFilteredSelectedKeys(state) {
|
|
640
|
+
return filterSelectedKeys(state.selectionManager.selectedKeys);
|
|
641
|
+
}
|
|
642
|
+
function isSelectAllSelected(state) {
|
|
643
|
+
return state.selectionManager.isSelectAll || getFilteredSelectedKeys(state).size === getAllSelectableItems(state).size;
|
|
644
|
+
}
|
|
645
|
+
function isSelectAllIndeterminate(state) {
|
|
646
|
+
return !isSelectAllSelected(state) && getFilteredSelectedKeys(state).size > 0;
|
|
647
|
+
}
|
|
648
|
+
function useSelectionCapture() {
|
|
649
|
+
const selectionPendingRef = React.useRef(false);
|
|
650
|
+
const isSelectionPending = React.useCallback(() => {
|
|
651
|
+
return selectionPendingRef.current === true;
|
|
652
|
+
}, []);
|
|
653
|
+
const markSelectionPending = React.useCallback(() => {
|
|
654
|
+
selectionPendingRef.current = true;
|
|
655
|
+
}, []);
|
|
656
|
+
const markSelectionStale = React.useCallback(() => {
|
|
657
|
+
selectionPendingRef.current = false;
|
|
658
|
+
}, []);
|
|
659
|
+
React.useEffect(() => {
|
|
660
|
+
window.addEventListener("keydown", markSelectionPending);
|
|
661
|
+
window.addEventListener("pointerdown", markSelectionStale, {
|
|
662
|
+
capture: true
|
|
663
|
+
});
|
|
664
|
+
window.addEventListener("keyup", markSelectionStale);
|
|
665
|
+
return () => {
|
|
666
|
+
window.removeEventListener("keydown", markSelectionPending);
|
|
667
|
+
window.removeEventListener("pointerdown", markSelectionStale, {
|
|
668
|
+
capture: true
|
|
669
|
+
});
|
|
670
|
+
window.removeEventListener("keyup", markSelectionStale);
|
|
671
|
+
};
|
|
672
|
+
}, [markSelectionPending, markSelectionStale]);
|
|
673
|
+
return {
|
|
674
|
+
isSelectionPending,
|
|
675
|
+
markSelectionPending,
|
|
676
|
+
markSelectionStale
|
|
677
|
+
};
|
|
678
|
+
}
|
|
619
679
|
function useTriggerWidth(triggerRef) {
|
|
620
680
|
const [triggerWidth, setTriggerWidth] = React.useState(null);
|
|
621
681
|
useResizeObserver.$9daab02d461809db$export$683480f191c0e3ea({
|
|
@@ -649,6 +709,11 @@ exports.DEFAULT_WIDTH = DEFAULT_WIDTH;
|
|
|
649
709
|
exports.ITEM_HEIGHT = ITEM_HEIGHT;
|
|
650
710
|
exports.OVERLAY_OFFSET = OVERLAY_OFFSET;
|
|
651
711
|
exports.OVERLAY_PADDING_FROM_CONTAINER = OVERLAY_PADDING_FROM_CONTAINER;
|
|
712
|
+
exports.SELECT_ALL_KEY = SELECT_ALL_KEY;
|
|
652
713
|
exports.Y_PADDING_INSIDE_OVERLAY = Y_PADDING_INSIDE_OVERLAY;
|
|
714
|
+
exports.filterSelectedKeys = filterSelectedKeys;
|
|
653
715
|
exports.getUnmergedPopoverStyles = getUnmergedPopoverStyles;
|
|
716
|
+
exports.isSelectAllIndeterminate = isSelectAllIndeterminate;
|
|
717
|
+
exports.isSelectAllSelected = isSelectAllSelected;
|
|
718
|
+
exports.useSelectionCapture = useSelectionCapture;
|
|
654
719
|
exports.useTriggerWidth = useTriggerWidth;
|