@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
|
@@ -20,18 +20,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
import * as React from "react";
|
|
21
21
|
import React__default, { useEffect, useState } from "react";
|
|
22
22
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
23
|
-
import { s as styles, m as mapIconSize, g as getElementType, b as logWarningsForInvalidPropConfiguration, l as logWarningForMissingAriaLabel, L as Label, I as InputIcon, a as InputCaption } from "./InputIcon-
|
|
24
|
-
import { T as Text } from "./Text-
|
|
25
|
-
import { I as Icon } from "./Icon-
|
|
26
|
-
import { U as UnstyledButton } from "./UnstyledButton-
|
|
27
|
-
import {
|
|
28
|
-
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-
|
|
23
|
+
import { s as styles, m as mapIconSize, g as getElementType, b as logWarningsForInvalidPropConfiguration, l as logWarningForMissingAriaLabel, L as Label, I as InputIcon, a as InputCaption } from "./InputIcon-D5WHF9JB.mjs";
|
|
24
|
+
import { T as Text } from "./Text-CLXCmUFd.mjs";
|
|
25
|
+
import { I as Icon } from "./Icon-BmhO04p4.mjs";
|
|
26
|
+
import { U as UnstyledButton } from "./UnstyledButton-DcvMv4SL.mjs";
|
|
27
|
+
import { e as $431fbd86ca7dc216$export$f21a1ffae260145a } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
28
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
29
29
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
|
|
30
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
30
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-CFhWic3i.mjs";
|
|
31
31
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
|
|
32
|
-
import { $ as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./useField-
|
|
33
|
-
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-
|
|
34
|
-
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidation-
|
|
32
|
+
import { $ as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./useField-DPD-La1H.mjs";
|
|
33
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-Uo_zjP6s.mjs";
|
|
34
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidation-C_CD-7QE.mjs";
|
|
35
35
|
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-BOYR4wqI.mjs";
|
|
36
36
|
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
37
37
|
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
@@ -30,32 +30,32 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
import React__default from "react";
|
|
33
|
-
import { T as Text } from "./Text-
|
|
33
|
+
import { T as Text } from "./Text-CLXCmUFd.mjs";
|
|
34
34
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
35
|
-
import { I as Icon } from "./Icon-
|
|
36
|
-
const root = "
|
|
37
|
-
const inputIconContainer = "
|
|
38
|
-
const label = "
|
|
39
|
-
const input = "
|
|
40
|
-
const errorInput = "
|
|
41
|
-
const inputSizeSm = "
|
|
42
|
-
const inputSizeLg = "
|
|
43
|
-
const passwordInput = "
|
|
44
|
-
const passwordBtn = "
|
|
45
|
-
const hovered = "
|
|
46
|
-
const textArea = "
|
|
47
|
-
const passwordBtnError = "
|
|
48
|
-
const passwordBtnSm = "
|
|
49
|
-
const passwordBtnLg = "
|
|
50
|
-
const icon = "
|
|
51
|
-
const iconDisabled = "
|
|
52
|
-
const iconStart = "
|
|
53
|
-
const iconEnd = "
|
|
54
|
-
const iconStartInput = "
|
|
55
|
-
const iconEndInput = "
|
|
56
|
-
const inputIconPlacementSm = "
|
|
57
|
-
const inputIconPlacementLg = "
|
|
58
|
-
const caption = "
|
|
35
|
+
import { I as Icon } from "./Icon-BmhO04p4.mjs";
|
|
36
|
+
const root = "_root_yhwwa_5";
|
|
37
|
+
const inputIconContainer = "_inputIconContainer_yhwwa_26";
|
|
38
|
+
const label = "_label_yhwwa_32";
|
|
39
|
+
const input = "_input_yhwwa_26";
|
|
40
|
+
const errorInput = "_errorInput_yhwwa_68";
|
|
41
|
+
const inputSizeSm = "_inputSizeSm_yhwwa_76";
|
|
42
|
+
const inputSizeLg = "_inputSizeLg_yhwwa_88";
|
|
43
|
+
const passwordInput = "_passwordInput_yhwwa_94";
|
|
44
|
+
const passwordBtn = "_passwordBtn_yhwwa_104";
|
|
45
|
+
const hovered = "_hovered_yhwwa_130";
|
|
46
|
+
const textArea = "_textArea_yhwwa_139";
|
|
47
|
+
const passwordBtnError = "_passwordBtnError_yhwwa_144";
|
|
48
|
+
const passwordBtnSm = "_passwordBtnSm_yhwwa_150";
|
|
49
|
+
const passwordBtnLg = "_passwordBtnLg_yhwwa_155";
|
|
50
|
+
const icon = "_icon_yhwwa_160";
|
|
51
|
+
const iconDisabled = "_iconDisabled_yhwwa_170";
|
|
52
|
+
const iconStart = "_iconStart_yhwwa_174";
|
|
53
|
+
const iconEnd = "_iconEnd_yhwwa_178";
|
|
54
|
+
const iconStartInput = "_iconStartInput_yhwwa_182";
|
|
55
|
+
const iconEndInput = "_iconEndInput_yhwwa_186";
|
|
56
|
+
const inputIconPlacementSm = "_inputIconPlacementSm_yhwwa_190";
|
|
57
|
+
const inputIconPlacementLg = "_inputIconPlacementLg_yhwwa_194";
|
|
58
|
+
const caption = "_caption_yhwwa_198";
|
|
59
59
|
const styles = {
|
|
60
60
|
root,
|
|
61
61
|
inputIconContainer,
|
|
@@ -31,32 +31,32 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
const React = require("react");
|
|
34
|
-
const Text = require("./Text-
|
|
34
|
+
const Text = require("./Text-DN9QVNH4.js");
|
|
35
35
|
const utilities_css = require("../utilities/css.js");
|
|
36
|
-
const Icon = require("./Icon-
|
|
37
|
-
const root = "
|
|
38
|
-
const inputIconContainer = "
|
|
39
|
-
const label = "
|
|
40
|
-
const input = "
|
|
41
|
-
const errorInput = "
|
|
42
|
-
const inputSizeSm = "
|
|
43
|
-
const inputSizeLg = "
|
|
44
|
-
const passwordInput = "
|
|
45
|
-
const passwordBtn = "
|
|
46
|
-
const hovered = "
|
|
47
|
-
const textArea = "
|
|
48
|
-
const passwordBtnError = "
|
|
49
|
-
const passwordBtnSm = "
|
|
50
|
-
const passwordBtnLg = "
|
|
51
|
-
const icon = "
|
|
52
|
-
const iconDisabled = "
|
|
53
|
-
const iconStart = "
|
|
54
|
-
const iconEnd = "
|
|
55
|
-
const iconStartInput = "
|
|
56
|
-
const iconEndInput = "
|
|
57
|
-
const inputIconPlacementSm = "
|
|
58
|
-
const inputIconPlacementLg = "
|
|
59
|
-
const caption = "
|
|
36
|
+
const Icon = require("./Icon-vgTkejl_.js");
|
|
37
|
+
const root = "_root_yhwwa_5";
|
|
38
|
+
const inputIconContainer = "_inputIconContainer_yhwwa_26";
|
|
39
|
+
const label = "_label_yhwwa_32";
|
|
40
|
+
const input = "_input_yhwwa_26";
|
|
41
|
+
const errorInput = "_errorInput_yhwwa_68";
|
|
42
|
+
const inputSizeSm = "_inputSizeSm_yhwwa_76";
|
|
43
|
+
const inputSizeLg = "_inputSizeLg_yhwwa_88";
|
|
44
|
+
const passwordInput = "_passwordInput_yhwwa_94";
|
|
45
|
+
const passwordBtn = "_passwordBtn_yhwwa_104";
|
|
46
|
+
const hovered = "_hovered_yhwwa_130";
|
|
47
|
+
const textArea = "_textArea_yhwwa_139";
|
|
48
|
+
const passwordBtnError = "_passwordBtnError_yhwwa_144";
|
|
49
|
+
const passwordBtnSm = "_passwordBtnSm_yhwwa_150";
|
|
50
|
+
const passwordBtnLg = "_passwordBtnLg_yhwwa_155";
|
|
51
|
+
const icon = "_icon_yhwwa_160";
|
|
52
|
+
const iconDisabled = "_iconDisabled_yhwwa_170";
|
|
53
|
+
const iconStart = "_iconStart_yhwwa_174";
|
|
54
|
+
const iconEnd = "_iconEnd_yhwwa_178";
|
|
55
|
+
const iconStartInput = "_iconStartInput_yhwwa_182";
|
|
56
|
+
const iconEndInput = "_iconEndInput_yhwwa_186";
|
|
57
|
+
const inputIconPlacementSm = "_inputIconPlacementSm_yhwwa_190";
|
|
58
|
+
const inputIconPlacementLg = "_inputIconPlacementLg_yhwwa_194";
|
|
59
|
+
const caption = "_caption_yhwwa_198";
|
|
60
60
|
const styles = {
|
|
61
61
|
root,
|
|
62
62
|
inputIconContainer,
|
|
@@ -29,23 +29,25 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import React__default, { useState, createContext, useContext, useMemo } from "react";
|
|
32
|
+
import React__default, { useState, createContext, useContext, useCallback, useMemo } from "react";
|
|
33
33
|
import { o as omit } from "./omit-B_jU3Uog.mjs";
|
|
34
|
-
import {
|
|
34
|
+
import { C as Checkbox } from "./Checkbox-BZqZjAnI.mjs";
|
|
35
|
+
import { T as Text } from "./Text-CLXCmUFd.mjs";
|
|
36
|
+
import { $ as $453cc9f0df89c0a5$export$77d5aafae4e095b2, S as SELECT_ALL_KEY, j as isSelectAllSelected, k as isSelectAllIndeterminate, b as $9fc4852771d079eb$export$6e2c8f0811a474ce, c as $f4b273590fab9f93$export$52210f68a14655d0, l as useSelectionCapture, d as $f2f8a6077418541e$export$542a6fd13ac93354, m as filterSelectedKeys, g as getUnmergedPopoverStyles, e as $86ea4cb521eb2e37$export$2317d149ed6f78c4, f as DEFAULT_MAX_ITEMS_UNTIL_SCROLL, i as DEFAULT_PLACEMENT, D as DEFAULT_WIDTH, O as OVERLAY_PADDING_FROM_CONTAINER, I as ITEM_HEIGHT, Y as Y_PADDING_INSIDE_OVERLAY, h as OVERLAY_OFFSET, a as $168583247155ddda$export$dc9c12ed27dd1b49, u as useTriggerWidth } from "./useTriggerWidth-CI9YrWOP.mjs";
|
|
35
37
|
import { $ as $c1d7fb2ec91bae71$export$6d08773d2e66f8f2 } from "./Item-BhrTPNN2.mjs";
|
|
36
|
-
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $bdb11010cef70236$export$b4cc09c592e8fdb8,
|
|
38
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $bdb11010cef70236$export$b4cc09c592e8fdb8, d as $bdb11010cef70236$export$f680877a34711e37 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
37
39
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
|
|
38
|
-
import { $ as $982254629710d113$export$b95089534ab7c1fd } from "./useSelectableList-
|
|
39
|
-
import { c as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, $ as $f6c31cce2adf654f$export$45712eceda6fad21, e as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "./usePress-
|
|
40
|
-
import { $ as $
|
|
41
|
-
import {
|
|
42
|
-
import { b as $507fabe10e71c6fb$export$b9b3dfddab17db27 } from "./useFocusVisible-3GO81-mK.mjs";
|
|
40
|
+
import { $ as $982254629710d113$export$b95089534ab7c1fd } from "./useSelectableList-DjrCndUM.mjs";
|
|
41
|
+
import { c as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, $ as $f6c31cce2adf654f$export$45712eceda6fad21, e as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "./usePress-CA-sH9oY.mjs";
|
|
42
|
+
import { $ as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useFocus-DOcjAFnP.mjs";
|
|
43
|
+
import { b as $507fabe10e71c6fb$export$b9b3dfddab17db27 } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
43
44
|
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-BOYR4wqI.mjs";
|
|
44
|
-
import {
|
|
45
|
-
import { a as $880e95eb8b93ba9a$export$ecf600387e221c37 } from "./useSelectableItem-
|
|
45
|
+
import { a as $46d819fcbaf35654$export$8f71654801c2f7cd } from "./useFocusable-Uo_zjP6s.mjs";
|
|
46
|
+
import { a as $880e95eb8b93ba9a$export$ecf600387e221c37 } from "./useSelectableItem-Dn-hODEw.mjs";
|
|
47
|
+
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.mjs";
|
|
46
48
|
import { useScrollbar } from "../utilities/useScrollbar.mjs";
|
|
49
|
+
import { a as $337b884510726a0d$export$c6fdb837b070b4ff } from "./Overlay-Dz_4R38U.mjs";
|
|
47
50
|
import { $ as $875d6693e12af071$export$728d6ba534403756 } from "./useTreeState-BZxhJy4m.mjs";
|
|
48
|
-
import { a as $337b884510726a0d$export$c6fdb837b070b4ff } from "./Overlay-NSOiekJL.mjs";
|
|
49
51
|
import { a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "./useCloseOnScroll-DxZ3orlK.mjs";
|
|
50
52
|
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
51
53
|
let overlayTriggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
|
|
@@ -297,15 +299,15 @@ function useInternalMenuContext() {
|
|
|
297
299
|
}
|
|
298
300
|
return menuContext;
|
|
299
301
|
}
|
|
300
|
-
const underlay = "
|
|
301
|
-
const root = "
|
|
302
|
-
const menu = "
|
|
303
|
-
const menuList = "
|
|
304
|
-
const sectionList = "
|
|
305
|
-
const sectionTitle = "
|
|
306
|
-
const itemContent = "
|
|
307
|
-
const separator = "
|
|
308
|
-
const item = "
|
|
302
|
+
const underlay = "_underlay_19ji7_5";
|
|
303
|
+
const root = "_root_19ji7_10";
|
|
304
|
+
const menu = "_menu_19ji7_74";
|
|
305
|
+
const menuList = "_menuList_19ji7_79";
|
|
306
|
+
const sectionList = "_sectionList_19ji7_80";
|
|
307
|
+
const sectionTitle = "_sectionTitle_19ji7_86";
|
|
308
|
+
const itemContent = "_itemContent_19ji7_93";
|
|
309
|
+
const separator = "_separator_19ji7_94";
|
|
310
|
+
const item = "_item_19ji7_93";
|
|
309
311
|
const styles = {
|
|
310
312
|
underlay,
|
|
311
313
|
root,
|
|
@@ -323,23 +325,30 @@ function MenuItem(_props) {
|
|
|
323
325
|
Object.assign(MenuItem, $c1d7fb2ec91bae71$export$6d08773d2e66f8f2);
|
|
324
326
|
function MenuItemContent({ item: item2, state }) {
|
|
325
327
|
const ref = React__default.useRef(null);
|
|
328
|
+
const { selectionManager: { selectionMode } } = state;
|
|
326
329
|
const { closeOnSelect, href } = item2.props;
|
|
327
330
|
const { menuItemProps, isFocused, isSelected, isDisabled } = $a2e5df62f93c7633$export$9d32628fc2aea7da(__spreadProps(__spreadValues({}, item2), {
|
|
328
331
|
closeOnSelect
|
|
329
332
|
}), state, ref);
|
|
330
333
|
const MenuItemContainer = href ? LinkMenuItemContainer : StandardMenuItemContainer;
|
|
331
|
-
const props =
|
|
334
|
+
const props = $3ef42575df84b30b$export$9d1611c77c2fe928(menuItemProps, href ? omit(item2.props, ["aria-label", "as", "children", "closeOnSelect"]) : item2.key === SELECT_ALL_KEY ? {
|
|
335
|
+
"aria-checked": isSelectAllSelected(state)
|
|
336
|
+
} : {});
|
|
332
337
|
return React__default.createElement(MenuItemContainer, __spreadProps(__spreadValues({}, props), {
|
|
333
338
|
itemRef: ref,
|
|
334
339
|
className: styles.item,
|
|
335
340
|
"data-is-disabled": isDisabled,
|
|
336
341
|
"data-is-focused": isFocused,
|
|
337
|
-
"data-is-selected": isSelected
|
|
342
|
+
"data-is-selected": item2.key === SELECT_ALL_KEY ? isSelectAllSelected(state) : isSelected
|
|
338
343
|
}), React__default.createElement("div", {
|
|
339
344
|
className: styles.itemContent
|
|
340
|
-
}, React__default.createElement(Text, {
|
|
345
|
+
}, selectionMode !== "multiple" ? React__default.createElement(Text, {
|
|
341
346
|
variant: "body1",
|
|
342
347
|
truncate: true
|
|
348
|
+
}, item2.rendered) : React__default.createElement(Checkbox, {
|
|
349
|
+
isDisabled,
|
|
350
|
+
isIndeterminate: item2.key === SELECT_ALL_KEY ? isSelectAllIndeterminate(state) : void 0,
|
|
351
|
+
isSelected: item2.key === SELECT_ALL_KEY ? isSelectAllSelected(state) : isSelected
|
|
343
352
|
}, item2.rendered)));
|
|
344
353
|
}
|
|
345
354
|
function StandardMenuItemContainer(_a) {
|
|
@@ -356,6 +365,18 @@ function LinkMenuItemContainer(_c) {
|
|
|
356
365
|
ref: itemRef
|
|
357
366
|
}, props)));
|
|
358
367
|
}
|
|
368
|
+
var noop_1;
|
|
369
|
+
var hasRequiredNoop;
|
|
370
|
+
function requireNoop() {
|
|
371
|
+
if (hasRequiredNoop) return noop_1;
|
|
372
|
+
hasRequiredNoop = 1;
|
|
373
|
+
function noop2() {
|
|
374
|
+
}
|
|
375
|
+
noop_1 = noop2;
|
|
376
|
+
return noop_1;
|
|
377
|
+
}
|
|
378
|
+
var noopExports = requireNoop();
|
|
379
|
+
const noop = /* @__PURE__ */ getDefaultExportFromCjs(noopExports);
|
|
359
380
|
function MenuSection(_props) {
|
|
360
381
|
return null;
|
|
361
382
|
}
|
|
@@ -372,9 +393,12 @@ function MenuSectionContent({ section, state }) {
|
|
|
372
393
|
const hasContent = section.hasChildNodes || section.rendered;
|
|
373
394
|
return React__default.createElement(React__default.Fragment, null, isNotFirstOrLast && React__default.createElement("li", __spreadProps(__spreadValues({}, separatorProps), {
|
|
374
395
|
className: styles.separator
|
|
375
|
-
})), hasContent && React__default.createElement("li", __spreadValues({}, itemProps), section.hasChildNodes && React__default.createElement(React__default.Fragment, null, React__default.createElement("
|
|
396
|
+
})), hasContent && React__default.createElement("li", __spreadValues({}, itemProps), section.hasChildNodes && React__default.createElement(React__default.Fragment, null, section.rendered && React__default.createElement("span", __spreadProps(__spreadValues({}, headingProps), {
|
|
376
397
|
className: styles.sectionTitle
|
|
377
|
-
}),
|
|
398
|
+
}), React__default.createElement(Text, {
|
|
399
|
+
variant: "subtitle1",
|
|
400
|
+
color: "primary.900"
|
|
401
|
+
}, section.rendered)), React__default.createElement("ul", __spreadProps(__spreadValues({}, groupProps), {
|
|
378
402
|
className: styles.sectionList
|
|
379
403
|
}), [...section.childNodes].map((item2) => {
|
|
380
404
|
return React__default.createElement(MenuItemContent, {
|
|
@@ -392,13 +416,10 @@ function MenuOverlay(props) {
|
|
|
392
416
|
return React__default.createElement(MenuOverlayContent, __spreadValues({}, props));
|
|
393
417
|
}
|
|
394
418
|
function MenuOverlayContent(props) {
|
|
395
|
-
const { children, disabledKeys, maxItemsUntilScroll = DEFAULT_MAX_ITEMS_UNTIL_SCROLL, onAction, onClose, placement = DEFAULT_PLACEMENT, width = DEFAULT_WIDTH } = props;
|
|
419
|
+
const { children, defaultSelectedKeys, disabledKeys, maxItemsUntilScroll = DEFAULT_MAX_ITEMS_UNTIL_SCROLL, onAction = noop, onClose, placement = DEFAULT_PLACEMENT, width = DEFAULT_WIDTH, selectionMode, onSelectionChange = noop, selectedKeys } = props;
|
|
396
420
|
const popoverRef = React__default.useRef(null);
|
|
397
421
|
const menuRef = React__default.useRef(null);
|
|
398
|
-
const
|
|
399
|
-
children,
|
|
400
|
-
disabledKeys
|
|
401
|
-
});
|
|
422
|
+
const { isSelectionPending, markSelectionPending, markSelectionStale } = useSelectionCapture();
|
|
402
423
|
const { menuTriggerState, triggerRef, triggerWidth, menuPropsFromTrigger } = useInternalMenuContext();
|
|
403
424
|
const { popoverProps, underlayProps } = $f2f8a6077418541e$export$542a6fd13ac93354({
|
|
404
425
|
containerPadding: OVERLAY_PADDING_FROM_CONTAINER,
|
|
@@ -409,9 +430,35 @@ function MenuOverlayContent(props) {
|
|
|
409
430
|
scrollRef: menuRef,
|
|
410
431
|
triggerRef
|
|
411
432
|
}, menuTriggerState);
|
|
433
|
+
const handleSelectionChange = useCallback((keys) => {
|
|
434
|
+
if (!isSelectionPending()) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
onSelectionChange(keys === "all" ? keys : filterSelectedKeys(keys));
|
|
438
|
+
markSelectionStale();
|
|
439
|
+
}, [isSelectionPending, markSelectionStale, onSelectionChange]);
|
|
440
|
+
const menuTreeState = $875d6693e12af071$export$728d6ba534403756({
|
|
441
|
+
children,
|
|
442
|
+
defaultSelectedKeys,
|
|
443
|
+
disabledKeys,
|
|
444
|
+
selectionMode,
|
|
445
|
+
selectedKeys,
|
|
446
|
+
onSelectionChange: handleSelectionChange
|
|
447
|
+
});
|
|
448
|
+
const handleAction = useCallback((key) => {
|
|
449
|
+
markSelectionPending();
|
|
450
|
+
if (key === SELECT_ALL_KEY && isSelectAllSelected(menuTreeState)) {
|
|
451
|
+
menuTreeState.selectionManager.clearSelection();
|
|
452
|
+
} else if (key === SELECT_ALL_KEY) {
|
|
453
|
+
menuTreeState.selectionManager.selectAll();
|
|
454
|
+
} else {
|
|
455
|
+
menuTreeState.selectionManager.toggleSelection(key);
|
|
456
|
+
}
|
|
457
|
+
onAction(key);
|
|
458
|
+
}, [markSelectionPending, menuTreeState, onAction]);
|
|
412
459
|
const { menuProps } = $d5336fe17ce95402$export$38eaa17faae8f579($3ef42575df84b30b$export$9d1611c77c2fe928({
|
|
413
460
|
disabledKeys,
|
|
414
|
-
onAction,
|
|
461
|
+
onAction: handleAction,
|
|
415
462
|
onClose
|
|
416
463
|
}, menuPropsFromTrigger), menuTreeState, menuRef);
|
|
417
464
|
useScrollbar(menuRef, "ezui-os-theme-overlay");
|
|
@@ -32,21 +32,23 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
};
|
|
33
33
|
const React = require("react");
|
|
34
34
|
const omit = require("./omit-jjOwwbdQ.js");
|
|
35
|
-
const
|
|
35
|
+
const Checkbox = require("./Checkbox-CqRLbwPQ.js");
|
|
36
|
+
const Text = require("./Text-DN9QVNH4.js");
|
|
37
|
+
const useTriggerWidth = require("./useTriggerWidth-Bj1hzfIg.js");
|
|
36
38
|
const Item = require("./Item-CfWjPrxx.js");
|
|
37
39
|
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
38
40
|
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
39
41
|
const useSelectableList = require("./useSelectableList-CjopKGbS.js");
|
|
40
42
|
const usePress = require("./usePress-DjyN_yP2.js");
|
|
41
|
-
const useTriggerWidth = require("./useTriggerWidth-E4NybnOT.js");
|
|
42
43
|
const useFocus = require("./useFocus-Dk6g6k91.js");
|
|
43
44
|
const useFocusVisible = require("./useFocusVisible-DAg8LS6j.js");
|
|
44
45
|
const useHover = require("./useHover-BIKwjrCT.js");
|
|
45
|
-
const
|
|
46
|
+
const useFocusable = require("./useFocusable-By9yXfUQ.js");
|
|
46
47
|
const useSelectableItem = require("./useSelectableItem-Bgjo4Ulj.js");
|
|
48
|
+
const _commonjsHelpers = require("./_commonjsHelpers-Bc2YnDe1.js");
|
|
47
49
|
const utilities_useScrollbar = require("../utilities/useScrollbar.js");
|
|
48
|
-
const useTreeState = require("./useTreeState-D6aHf9kN.js");
|
|
49
50
|
const Overlay = require("./Overlay-DBi2SVGv.js");
|
|
51
|
+
const useTreeState = require("./useTreeState-D6aHf9kN.js");
|
|
50
52
|
const useCloseOnScroll = require("./useCloseOnScroll-CLFhBFoo.js");
|
|
51
53
|
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
52
54
|
let overlayTriggerState = useCloseOnScroll.$fc909762b330b746$export$61c6a8c84e605fb6(props);
|
|
@@ -217,7 +219,7 @@ function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
|
217
219
|
onHoverChange,
|
|
218
220
|
onHoverEnd
|
|
219
221
|
});
|
|
220
|
-
let { keyboardProps } =
|
|
222
|
+
let { keyboardProps } = useFocusable.$46d819fcbaf35654$export$8f71654801c2f7cd({
|
|
221
223
|
onKeyDown: (e) => {
|
|
222
224
|
if (e.repeat) {
|
|
223
225
|
e.continuePropagation();
|
|
@@ -298,15 +300,15 @@ function useInternalMenuContext() {
|
|
|
298
300
|
}
|
|
299
301
|
return menuContext;
|
|
300
302
|
}
|
|
301
|
-
const underlay = "
|
|
302
|
-
const root = "
|
|
303
|
-
const menu = "
|
|
304
|
-
const menuList = "
|
|
305
|
-
const sectionList = "
|
|
306
|
-
const sectionTitle = "
|
|
307
|
-
const itemContent = "
|
|
308
|
-
const separator = "
|
|
309
|
-
const item = "
|
|
303
|
+
const underlay = "_underlay_19ji7_5";
|
|
304
|
+
const root = "_root_19ji7_10";
|
|
305
|
+
const menu = "_menu_19ji7_74";
|
|
306
|
+
const menuList = "_menuList_19ji7_79";
|
|
307
|
+
const sectionList = "_sectionList_19ji7_80";
|
|
308
|
+
const sectionTitle = "_sectionTitle_19ji7_86";
|
|
309
|
+
const itemContent = "_itemContent_19ji7_93";
|
|
310
|
+
const separator = "_separator_19ji7_94";
|
|
311
|
+
const item = "_item_19ji7_93";
|
|
310
312
|
const styles = {
|
|
311
313
|
underlay,
|
|
312
314
|
root,
|
|
@@ -324,23 +326,30 @@ function MenuItem(_props) {
|
|
|
324
326
|
Object.assign(MenuItem, Item.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2);
|
|
325
327
|
function MenuItemContent({ item: item2, state }) {
|
|
326
328
|
const ref = React.useRef(null);
|
|
329
|
+
const { selectionManager: { selectionMode } } = state;
|
|
327
330
|
const { closeOnSelect, href } = item2.props;
|
|
328
331
|
const { menuItemProps, isFocused, isSelected, isDisabled } = $a2e5df62f93c7633$export$9d32628fc2aea7da(__spreadProps(__spreadValues({}, item2), {
|
|
329
332
|
closeOnSelect
|
|
330
333
|
}), state, ref);
|
|
331
334
|
const MenuItemContainer = href ? LinkMenuItemContainer : StandardMenuItemContainer;
|
|
332
|
-
const props =
|
|
335
|
+
const props = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(menuItemProps, href ? omit.omit(item2.props, ["aria-label", "as", "children", "closeOnSelect"]) : item2.key === useTriggerWidth.SELECT_ALL_KEY ? {
|
|
336
|
+
"aria-checked": useTriggerWidth.isSelectAllSelected(state)
|
|
337
|
+
} : {});
|
|
333
338
|
return React.createElement(MenuItemContainer, __spreadProps(__spreadValues({}, props), {
|
|
334
339
|
itemRef: ref,
|
|
335
340
|
className: styles.item,
|
|
336
341
|
"data-is-disabled": isDisabled,
|
|
337
342
|
"data-is-focused": isFocused,
|
|
338
|
-
"data-is-selected": isSelected
|
|
343
|
+
"data-is-selected": item2.key === useTriggerWidth.SELECT_ALL_KEY ? useTriggerWidth.isSelectAllSelected(state) : isSelected
|
|
339
344
|
}), React.createElement("div", {
|
|
340
345
|
className: styles.itemContent
|
|
341
|
-
}, React.createElement(Text.Text, {
|
|
346
|
+
}, selectionMode !== "multiple" ? React.createElement(Text.Text, {
|
|
342
347
|
variant: "body1",
|
|
343
348
|
truncate: true
|
|
349
|
+
}, item2.rendered) : React.createElement(Checkbox.Checkbox, {
|
|
350
|
+
isDisabled,
|
|
351
|
+
isIndeterminate: item2.key === useTriggerWidth.SELECT_ALL_KEY ? useTriggerWidth.isSelectAllIndeterminate(state) : void 0,
|
|
352
|
+
isSelected: item2.key === useTriggerWidth.SELECT_ALL_KEY ? useTriggerWidth.isSelectAllSelected(state) : isSelected
|
|
344
353
|
}, item2.rendered)));
|
|
345
354
|
}
|
|
346
355
|
function StandardMenuItemContainer(_a) {
|
|
@@ -357,6 +366,18 @@ function LinkMenuItemContainer(_c) {
|
|
|
357
366
|
ref: itemRef
|
|
358
367
|
}, props)));
|
|
359
368
|
}
|
|
369
|
+
var noop_1;
|
|
370
|
+
var hasRequiredNoop;
|
|
371
|
+
function requireNoop() {
|
|
372
|
+
if (hasRequiredNoop) return noop_1;
|
|
373
|
+
hasRequiredNoop = 1;
|
|
374
|
+
function noop2() {
|
|
375
|
+
}
|
|
376
|
+
noop_1 = noop2;
|
|
377
|
+
return noop_1;
|
|
378
|
+
}
|
|
379
|
+
var noopExports = requireNoop();
|
|
380
|
+
const noop = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(noopExports);
|
|
360
381
|
function MenuSection(_props) {
|
|
361
382
|
return null;
|
|
362
383
|
}
|
|
@@ -373,9 +394,12 @@ function MenuSectionContent({ section, state }) {
|
|
|
373
394
|
const hasContent = section.hasChildNodes || section.rendered;
|
|
374
395
|
return React.createElement(React.Fragment, null, isNotFirstOrLast && React.createElement("li", __spreadProps(__spreadValues({}, separatorProps), {
|
|
375
396
|
className: styles.separator
|
|
376
|
-
})), hasContent && React.createElement("li", __spreadValues({}, itemProps), section.hasChildNodes && React.createElement(React.Fragment, null, React.createElement("
|
|
397
|
+
})), hasContent && React.createElement("li", __spreadValues({}, itemProps), section.hasChildNodes && React.createElement(React.Fragment, null, section.rendered && React.createElement("span", __spreadProps(__spreadValues({}, headingProps), {
|
|
377
398
|
className: styles.sectionTitle
|
|
378
|
-
}),
|
|
399
|
+
}), React.createElement(Text.Text, {
|
|
400
|
+
variant: "subtitle1",
|
|
401
|
+
color: "primary.900"
|
|
402
|
+
}, section.rendered)), React.createElement("ul", __spreadProps(__spreadValues({}, groupProps), {
|
|
379
403
|
className: styles.sectionList
|
|
380
404
|
}), [...section.childNodes].map((item2) => {
|
|
381
405
|
return React.createElement(MenuItemContent, {
|
|
@@ -393,13 +417,10 @@ function MenuOverlay(props) {
|
|
|
393
417
|
return React.createElement(MenuOverlayContent, __spreadValues({}, props));
|
|
394
418
|
}
|
|
395
419
|
function MenuOverlayContent(props) {
|
|
396
|
-
const { children, disabledKeys, maxItemsUntilScroll = useTriggerWidth.DEFAULT_MAX_ITEMS_UNTIL_SCROLL, onAction, onClose, placement = useTriggerWidth.DEFAULT_PLACEMENT, width = useTriggerWidth.DEFAULT_WIDTH } = props;
|
|
420
|
+
const { children, defaultSelectedKeys, disabledKeys, maxItemsUntilScroll = useTriggerWidth.DEFAULT_MAX_ITEMS_UNTIL_SCROLL, onAction = noop, onClose, placement = useTriggerWidth.DEFAULT_PLACEMENT, width = useTriggerWidth.DEFAULT_WIDTH, selectionMode, onSelectionChange = noop, selectedKeys } = props;
|
|
397
421
|
const popoverRef = React.useRef(null);
|
|
398
422
|
const menuRef = React.useRef(null);
|
|
399
|
-
const
|
|
400
|
-
children,
|
|
401
|
-
disabledKeys
|
|
402
|
-
});
|
|
423
|
+
const { isSelectionPending, markSelectionPending, markSelectionStale } = useTriggerWidth.useSelectionCapture();
|
|
403
424
|
const { menuTriggerState, triggerRef, triggerWidth, menuPropsFromTrigger } = useInternalMenuContext();
|
|
404
425
|
const { popoverProps, underlayProps } = useTriggerWidth.$f2f8a6077418541e$export$542a6fd13ac93354({
|
|
405
426
|
containerPadding: useTriggerWidth.OVERLAY_PADDING_FROM_CONTAINER,
|
|
@@ -410,9 +431,35 @@ function MenuOverlayContent(props) {
|
|
|
410
431
|
scrollRef: menuRef,
|
|
411
432
|
triggerRef
|
|
412
433
|
}, menuTriggerState);
|
|
434
|
+
const handleSelectionChange = React.useCallback((keys) => {
|
|
435
|
+
if (!isSelectionPending()) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
onSelectionChange(keys === "all" ? keys : useTriggerWidth.filterSelectedKeys(keys));
|
|
439
|
+
markSelectionStale();
|
|
440
|
+
}, [isSelectionPending, markSelectionStale, onSelectionChange]);
|
|
441
|
+
const menuTreeState = useTreeState.$875d6693e12af071$export$728d6ba534403756({
|
|
442
|
+
children,
|
|
443
|
+
defaultSelectedKeys,
|
|
444
|
+
disabledKeys,
|
|
445
|
+
selectionMode,
|
|
446
|
+
selectedKeys,
|
|
447
|
+
onSelectionChange: handleSelectionChange
|
|
448
|
+
});
|
|
449
|
+
const handleAction = React.useCallback((key) => {
|
|
450
|
+
markSelectionPending();
|
|
451
|
+
if (key === useTriggerWidth.SELECT_ALL_KEY && useTriggerWidth.isSelectAllSelected(menuTreeState)) {
|
|
452
|
+
menuTreeState.selectionManager.clearSelection();
|
|
453
|
+
} else if (key === useTriggerWidth.SELECT_ALL_KEY) {
|
|
454
|
+
menuTreeState.selectionManager.selectAll();
|
|
455
|
+
} else {
|
|
456
|
+
menuTreeState.selectionManager.toggleSelection(key);
|
|
457
|
+
}
|
|
458
|
+
onAction(key);
|
|
459
|
+
}, [markSelectionPending, menuTreeState, onAction]);
|
|
413
460
|
const { menuProps } = $d5336fe17ce95402$export$38eaa17faae8f579(mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928({
|
|
414
461
|
disabledKeys,
|
|
415
|
-
onAction,
|
|
462
|
+
onAction: handleAction,
|
|
416
463
|
onClose
|
|
417
464
|
}, menuPropsFromTrigger), menuTreeState, menuRef);
|
|
418
465
|
utilities_useScrollbar.useScrollbar(menuRef, "ezui-os-theme-overlay");
|
|
@@ -21,17 +21,17 @@ import * as React from "react";
|
|
|
21
21
|
import React__default, { useEffect, useState, useCallback, useRef, useMemo, createContext, useContext } from "react";
|
|
22
22
|
import { C as Close } from "./Close-Cq6Q6MN6.mjs";
|
|
23
23
|
import { C as CheckCircle } from "./CheckCircle-C9h2PNWU.mjs";
|
|
24
|
-
import {
|
|
25
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
24
|
+
import { d as $bdb11010cef70236$export$f680877a34711e37, $ as $bdb11010cef70236$export$b4cc09c592e8fdb8, b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-SJQ-f8LF.mjs";
|
|
25
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-DJWWtB78.mjs";
|
|
26
26
|
import { createPortal } from "react-dom";
|
|
27
27
|
import { s as shimExports } from "./index-DCSYt1ke.mjs";
|
|
28
|
-
import { I as Icon } from "./Icon-
|
|
29
|
-
import { T as Text } from "./Text-
|
|
28
|
+
import { I as Icon } from "./Icon-BmhO04p4.mjs";
|
|
29
|
+
import { T as Text } from "./Text-CLXCmUFd.mjs";
|
|
30
30
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
31
|
-
import { U as UnstyledButton } from "./UnstyledButton-
|
|
32
|
-
import { a as $7215afc6de606d6b$export$de79e2c695e052f3 } from "./focusSafely-
|
|
33
|
-
import {
|
|
34
|
-
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusWithin-
|
|
31
|
+
import { U as UnstyledButton } from "./UnstyledButton-DcvMv4SL.mjs";
|
|
32
|
+
import { a as $7215afc6de606d6b$export$de79e2c695e052f3 } from "./focusSafely-MxnwWbsu.mjs";
|
|
33
|
+
import { f as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from "./useFocusVisible-DXAxI2Xj.mjs";
|
|
34
|
+
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusWithin-Bg5BTlgA.mjs";
|
|
35
35
|
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-BOYR4wqI.mjs";
|
|
36
36
|
var __defProp$3 = Object.defineProperty;
|
|
37
37
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
@@ -998,18 +998,18 @@ function $6cc546b19ee7130a$export$b8cbbb20a51697de(props, state, ref) {
|
|
|
998
998
|
})
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
const statusPromotional = "
|
|
1002
|
-
const statusSuccess = "
|
|
1003
|
-
const statusNeutral = "
|
|
1004
|
-
const statusWarning = "
|
|
1005
|
-
const statusError = "
|
|
1006
|
-
const typeToast = "
|
|
1007
|
-
const typeAlert = "
|
|
1008
|
-
const Notification$1 = "
|
|
1009
|
-
const iconText = "
|
|
1010
|
-
const closeButton = "
|
|
1011
|
-
const region = "
|
|
1012
|
-
const container = "
|
|
1001
|
+
const statusPromotional = "_statusPromotional_yspgt_5";
|
|
1002
|
+
const statusSuccess = "_statusSuccess_yspgt_10";
|
|
1003
|
+
const statusNeutral = "_statusNeutral_yspgt_15";
|
|
1004
|
+
const statusWarning = "_statusWarning_yspgt_20";
|
|
1005
|
+
const statusError = "_statusError_yspgt_25";
|
|
1006
|
+
const typeToast = "_typeToast_yspgt_30";
|
|
1007
|
+
const typeAlert = "_typeAlert_yspgt_34";
|
|
1008
|
+
const Notification$1 = "_Notification_yspgt_39";
|
|
1009
|
+
const iconText = "_iconText_yspgt_55";
|
|
1010
|
+
const closeButton = "_closeButton_yspgt_61";
|
|
1011
|
+
const region = "_region_yspgt_70";
|
|
1012
|
+
const container = "_container_yspgt_76";
|
|
1013
1013
|
const styles = {
|
|
1014
1014
|
statusPromotional,
|
|
1015
1015
|
statusSuccess,
|
|
@@ -25,10 +25,10 @@ const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
|
25
25
|
const useLocalizedStringFormatter = require("./useLocalizedStringFormatter-D74_5d4h.js");
|
|
26
26
|
const ReactDOM = require("react-dom");
|
|
27
27
|
const index = require("./index-CTw89HMx.js");
|
|
28
|
-
const Icon = require("./Icon-
|
|
29
|
-
const Text = require("./Text-
|
|
28
|
+
const Icon = require("./Icon-vgTkejl_.js");
|
|
29
|
+
const Text = require("./Text-DN9QVNH4.js");
|
|
30
30
|
const utilities_css = require("../utilities/css.js");
|
|
31
|
-
const UnstyledButton = require("./UnstyledButton-
|
|
31
|
+
const UnstyledButton = require("./UnstyledButton-DVpiY5Qh.js");
|
|
32
32
|
const focusSafely = require("./focusSafely-BpCL6rxl.js");
|
|
33
33
|
const useFocusVisible = require("./useFocusVisible-DAg8LS6j.js");
|
|
34
34
|
const useFocusWithin = require("./useFocusWithin-CxvNMoRn.js");
|
|
@@ -1015,18 +1015,18 @@ function $6cc546b19ee7130a$export$b8cbbb20a51697de(props, state, ref) {
|
|
|
1015
1015
|
})
|
|
1016
1016
|
};
|
|
1017
1017
|
}
|
|
1018
|
-
const statusPromotional = "
|
|
1019
|
-
const statusSuccess = "
|
|
1020
|
-
const statusNeutral = "
|
|
1021
|
-
const statusWarning = "
|
|
1022
|
-
const statusError = "
|
|
1023
|
-
const typeToast = "
|
|
1024
|
-
const typeAlert = "
|
|
1025
|
-
const Notification$1 = "
|
|
1026
|
-
const iconText = "
|
|
1027
|
-
const closeButton = "
|
|
1028
|
-
const region = "
|
|
1029
|
-
const container = "
|
|
1018
|
+
const statusPromotional = "_statusPromotional_yspgt_5";
|
|
1019
|
+
const statusSuccess = "_statusSuccess_yspgt_10";
|
|
1020
|
+
const statusNeutral = "_statusNeutral_yspgt_15";
|
|
1021
|
+
const statusWarning = "_statusWarning_yspgt_20";
|
|
1022
|
+
const statusError = "_statusError_yspgt_25";
|
|
1023
|
+
const typeToast = "_typeToast_yspgt_30";
|
|
1024
|
+
const typeAlert = "_typeAlert_yspgt_34";
|
|
1025
|
+
const Notification$1 = "_Notification_yspgt_39";
|
|
1026
|
+
const iconText = "_iconText_yspgt_55";
|
|
1027
|
+
const closeButton = "_closeButton_yspgt_61";
|
|
1028
|
+
const region = "_region_yspgt_70";
|
|
1029
|
+
const container = "_container_yspgt_76";
|
|
1030
1030
|
const styles = {
|
|
1031
1031
|
statusPromotional,
|
|
1032
1032
|
statusSuccess,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React__default, { useMemo, useContext, createContext, useState } from "react";
|
|
2
2
|
import { $ as $ae1eeba8b9eafd08$export$5165eccb35aaadb5 } from "./context-BzShm_W7.mjs";
|
|
3
|
-
import { a as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-
|
|
3
|
+
import { a as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-CjqREKhC.mjs";
|
|
4
4
|
import ReactDOM from "react-dom";
|
|
5
|
-
import {
|
|
5
|
+
import { e as $b5e257d569688ac6$export$535bd6ca7f90a273, b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-SJQ-f8LF.mjs";
|
|
6
6
|
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children }) {
|
|
7
7
|
let context = useMemo(() => ({
|
|
8
8
|
register: () => {
|