@easypost/easy-ui 1.0.0-alpha.111 → 1.0.0-alpha.113
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/AlertBadge/AlertBadge.d.ts +1 -1
- package/AlertBadge/AlertBadge.d.ts.map +1 -1
- package/AlertBadge/index.js +20 -16
- package/AlertBadge/index.mjs +20 -16
- package/Badge/index.js +29 -19
- package/Badge/index.mjs +29 -19
- package/Banner/index.js +19 -12
- package/Banner/index.mjs +19 -12
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/CHANGELOG.md +13 -0
- package/Calendar/index.js +1 -1
- package/Calendar/index.mjs +1 -1
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/CheckableCard/index.js +33 -24
- package/CheckableCard/index.mjs +33 -24
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/CodeBlock/context.d.ts +2 -1
- package/CodeBlock/context.d.ts.map +1 -1
- package/CodeBlock/index.js +81 -59
- package/CodeBlock/index.mjs +81 -59
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/ColorPicker/index.js +71 -54
- package/ColorPicker/index.mjs +71 -54
- package/CustomerPortalLayout/index.js +101 -72
- package/CustomerPortalLayout/index.mjs +101 -72
- package/DataGrid/index.js +229 -173
- package/DataGrid/index.mjs +229 -173
- package/DatePicker/index.js +10 -8
- package/DatePicker/index.mjs +10 -8
- package/DateRangePicker/index.js +10 -8
- package/DateRangePicker/index.mjs +10 -8
- package/Drawer/context.d.ts +2 -2
- package/Drawer/context.d.ts.map +1 -1
- package/Drawer/index.js +99 -78
- package/Drawer/index.mjs +99 -78
- package/Drawer/useIntersectionDetection.d.ts +1 -1
- package/Drawer/useIntersectionDetection.d.ts.map +1 -1
- package/DropdownButton/index.js +15 -7
- package/DropdownButton/index.mjs +16 -8
- package/EmptyStateCard/index.js +53 -33
- package/EmptyStateCard/index.mjs +53 -33
- package/FocusedProductLayout/index.js +104 -76
- package/FocusedProductLayout/index.mjs +104 -76
- package/ForgeLayout/index.js +283 -217
- package/ForgeLayout/index.mjs +283 -217
- package/FormLayout/index.js +38 -24
- package/FormLayout/index.mjs +38 -24
- 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/index.js +16 -9
- package/IconButton/index.mjs +17 -10
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/KebabButton/index.js +1 -1
- package/KebabButton/index.mjs +1 -1
- package/Menu/MenuTrigger.d.ts +1 -1
- package/Menu/MenuTrigger.d.ts.map +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Modal/context.d.ts +3 -3
- package/Modal/context.d.ts.map +1 -1
- package/Modal/index.js +124 -93
- package/Modal/index.mjs +124 -93
- package/Modal/useIntersectionDetection.d.ts +1 -1
- package/Modal/useIntersectionDetection.d.ts.map +1 -1
- package/MultiSelect/MultiSelectDropdown.d.ts +2 -2
- package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -1
- package/MultiSelect/index.js +106 -83
- package/MultiSelect/index.mjs +107 -84
- package/MultiSelect/utilities.d.ts +1 -1
- package/MultiSelect/utilities.d.ts.map +1 -1
- package/MultipageSection/index.js +94 -71
- package/MultipageSection/index.mjs +94 -71
- package/NexusLayout/index.js +136 -102
- package/NexusLayout/index.mjs +136 -102
- package/Notification/NotificationTransition.d.ts +1 -1
- package/Notification/NotificationTransition.d.ts.map +1 -1
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +62 -50
- package/Pagination/index.mjs +63 -51
- package/PillGroup/index.js +1 -1
- package/PillGroup/index.mjs +1 -1
- package/PlanCard/illustrations/Building01/index.js +532 -531
- package/PlanCard/illustrations/Building01/index.mjs +532 -531
- package/PlanCard/illustrations/Building02/index.js +206 -205
- package/PlanCard/illustrations/Building02/index.mjs +206 -205
- package/PlanCard/illustrations/Building03/index.js +773 -772
- package/PlanCard/illustrations/Building03/index.mjs +773 -772
- package/PlanCard/illustrations/Building04/index.js +1528 -1527
- package/PlanCard/illustrations/Building04/index.mjs +1528 -1527
- package/PlanCard/index.js +59 -36
- package/PlanCard/index.mjs +60 -37
- package/ProductLayout/index.js +132 -91
- package/ProductLayout/index.mjs +132 -91
- package/Provider/index.js +18 -14
- package/Provider/index.mjs +18 -14
- package/RadioButtonGroup/index.js +14 -10
- package/RadioButtonGroup/index.mjs +14 -10
- package/RadioGroup/index.js +1 -1
- package/RadioGroup/index.mjs +1 -1
- package/RangeCalendar/index.js +1 -1
- package/RangeCalendar/index.mjs +1 -1
- package/SearchNav/CondensedSearchNav.d.ts.map +1 -1
- package/SearchNav/index.js +197 -141
- package/SearchNav/index.mjs +197 -141
- package/SearchNav/utilities.d.ts +3 -3
- package/SearchNav/utilities.d.ts.map +1 -1
- package/SectionCard/index.js +43 -25
- package/SectionCard/index.mjs +43 -25
- package/Select/index.js +74 -62
- package/Select/index.mjs +74 -62
- 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 +22 -16
- package/SplitToggleCard/index.mjs +22 -16
- 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 +22 -16
- package/TabPanels/index.mjs +24 -18
- 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 +3 -3
- package/Textarea/index.mjs +3 -3
- package/Theme/index.js +1 -1
- package/Theme/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +20 -15
- package/ToggleCard/index.mjs +21 -16
- 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 +115 -88
- package/VerticalNav/index.mjs +115 -88
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/{Button-5AuHgwU3.js → Button-C3vDXJsJ.js} +15 -12
- package/__chunks__/{Button-BsGH6vGC.mjs → Button-Dexauftx.mjs} +16 -13
- package/__chunks__/{Calendar-D09mdpmC.js → Calendar-BEbdigVB.js} +3 -2
- package/__chunks__/{Calendar-BGZysoV0.mjs → Calendar-BOxw8lwX.mjs} +3 -2
- package/__chunks__/{CalendarBase-Bn9o8BdD.mjs → CalendarBase-3a9i7QNo.mjs} +86 -64
- package/__chunks__/{CalendarBase-DHxad3N9.js → CalendarBase-Bx8bdXeT.js} +86 -64
- package/__chunks__/{Card-CJug4GMX.mjs → Card-8778avMv.mjs} +21 -12
- package/__chunks__/{Card-BM2DKiVA.js → Card-DIZFYg6E.js} +21 -12
- package/__chunks__/{Checkbox-BWfY9XqH.mjs → Checkbox-C-NlI-Ym.mjs} +36 -28
- package/__chunks__/{Checkbox-D2-8vvdr.js → Checkbox-DFWhjlaO.js} +36 -28
- package/__chunks__/{CodeSnippet-CIijbclb.js → CodeSnippet-BCOMwE07.js} +16 -12
- package/__chunks__/{CodeSnippet-QpCpkoXv.mjs → CodeSnippet-CWnMHdVu.mjs} +16 -12
- package/__chunks__/{DatePickerBase-CFB0JDQA.mjs → DatePickerBase-C4PwUr9x.mjs} +80 -62
- package/__chunks__/{DatePickerBase-DSPIErms.js → DatePickerBase-XoRply_u.js} +80 -62
- package/__chunks__/EasyPostLogo-D3WNdZ29.js +22 -0
- package/__chunks__/EasyPostLogo-tf6CCEAq.mjs +23 -0
- package/__chunks__/{HelpMenu-CO6kYktc.mjs → HelpMenu-8r0cjx5z.mjs} +30 -21
- package/__chunks__/{HelpMenu-nihaGEVy.js → HelpMenu-DBo_fklD.js} +30 -20
- package/__chunks__/{HorizontalGrid-CAwv7zKY.js → HorizontalGrid-BAvSeg39.js} +5 -3
- package/__chunks__/{HorizontalGrid-Dz8EFgmu.mjs → HorizontalGrid-C4MBFEH-.mjs} +6 -4
- package/__chunks__/{HorizontalStack-CxE8tPx_.mjs → HorizontalStack-BkE82C73.mjs} +6 -4
- package/__chunks__/{HorizontalStack-CXpjASZi.js → HorizontalStack-DidoI4Ks.js} +5 -3
- package/__chunks__/{Icon-W8F9w-jS.js → Icon-BVa5ddiD.js} +11 -10
- package/__chunks__/{Icon-0SN9dbwU.mjs → Icon-DzTns8u5.mjs} +11 -10
- package/__chunks__/{InputCaption-BJO9_Tby.mjs → InputCaption-B8bZH6sX.mjs} +19 -15
- package/__chunks__/{InputCaption-C3Hf9Hvt.js → InputCaption-Dkyn1sg6.js} +19 -15
- package/__chunks__/{InputField-dq5XIhr1.mjs → InputField-BTrYBVAD.mjs} +77 -66
- package/__chunks__/{InputField-CDHznUZd.js → InputField-Dvkk5R1K.js} +77 -66
- package/__chunks__/{InputIcon-Bpg4lyQx.mjs → InputIcon-BLJ6dx_5.mjs} +9 -8
- package/__chunks__/{InputIcon-DdcvN3A4.js → InputIcon-BSIAXX9k.js} +9 -8
- package/__chunks__/{KebabButton-DdzHU7is.js → KebabButton-3FnxY-Fz.js} +15 -8
- package/__chunks__/{KebabButton-Bf1OdC5_.mjs → KebabButton-DSK0ISAn.mjs} +15 -8
- package/__chunks__/{Menu-DHwqwFlg.mjs → Menu-C2F4fvhd.mjs} +88 -70
- package/__chunks__/{Menu-Kfc6nxFP.js → Menu-Du8SsMeJ.js} +88 -70
- package/__chunks__/{Notification-vF_YGVIP.js → Notification-CeJn5Qq1.js} +62 -48
- package/__chunks__/{Notification-BoT3Hm0B.mjs → Notification-CgUT2gv6.mjs} +64 -50
- package/__chunks__/{PillGroup-DjLJ4wVb.mjs → PillGroup-EJ8t8SrT.mjs} +41 -27
- package/__chunks__/{PillGroup-CAHVIlU0.js → PillGroup-rTS853Rr.js} +41 -27
- package/__chunks__/{RadioGroup-CGQKZwDU.js → RadioGroup-BFqH1Csi.js} +58 -40
- package/__chunks__/{RadioGroup-DUu5GEpn.mjs → RadioGroup-DBgIqOkZ.mjs} +58 -40
- package/__chunks__/{RangeCalendar-LPcJB19o.mjs → RangeCalendar-BSsmX9l4.mjs} +3 -2
- package/__chunks__/{RangeCalendar-Ckqj2J9L.js → RangeCalendar-Do2nei5A.js} +3 -2
- package/__chunks__/{SelectOverlay-DptO7xtn.mjs → SelectOverlay-DUIIhF4t.mjs} +62 -51
- package/__chunks__/{SelectOverlay-CmbC4zrD.js → SelectOverlay-DjiJHthj.js} +62 -51
- package/__chunks__/{SelectorErrorTooltip-Dw1Fvd_q.mjs → SelectorErrorTooltip-BC-1JoX3.mjs} +19 -12
- package/__chunks__/{SelectorErrorTooltip-_D8DSBKs.js → SelectorErrorTooltip-BMxbuFiM.js} +19 -11
- package/__chunks__/{Spinner-DOmPV59I.mjs → Spinner-2PFCOK3I.mjs} +17 -13
- package/__chunks__/{Spinner-D0ifPtVV.js → Spinner-Dd68v9QX.js} +16 -12
- package/__chunks__/{Stepper-CX0Mu37p.js → Stepper-BZ90AIx0.js} +47 -36
- package/__chunks__/{Stepper-BEyDIPNJ.mjs → Stepper-q3YNLglj.mjs} +48 -37
- package/__chunks__/{TabNav-vCt_zTvE.mjs → TabNav-BnpNl7tj.mjs} +10 -8
- package/__chunks__/{TabNav-B8aEzVyr.js → TabNav-CLVG0bL2.js} +10 -8
- package/__chunks__/{Tabs-BL8odO0p.js → Tabs-5_61DIBw.js} +46 -37
- package/__chunks__/{Tabs-DJ4aKu11.mjs → Tabs-CtyYEye0.mjs} +47 -38
- package/__chunks__/{Text-CSESKR_s.js → Text-C4CEsglh.js} +5 -4
- package/__chunks__/{Text-YOL3isF4.mjs → Text-u9mYLeWj.mjs} +5 -4
- package/__chunks__/{TextField-D2QhDAdD.mjs → TextField-D1JGaTQv.mjs} +3 -3
- package/__chunks__/{TextField-94cCP805.js → TextField-DE1vPtQm.js} +3 -3
- package/__chunks__/{Theme-BAFk7BvV.mjs → Theme-CyUCrGdN.mjs} +28 -18
- package/__chunks__/{Theme-DqbmY4wy.js → Theme-unLHjjnm.js} +27 -17
- package/__chunks__/{Toggle-D2ucsFxO.js → Toggle-BHzAGPDh.js} +43 -37
- package/__chunks__/{Toggle-CxjLdmzW.mjs → Toggle-DioYP2KQ.mjs} +43 -37
- package/__chunks__/{Tooltip-DAyUY3na.mjs → Tooltip-BKGkKnOx.mjs} +25 -17
- package/__chunks__/{Tooltip-DqpxBjpa.js → Tooltip-COjtKErw.js} +25 -17
- package/__chunks__/{UnstyledButton-DpQ5Ic9D.mjs → UnstyledButton-BCg7eEyP.mjs} +6 -4
- package/__chunks__/{UnstyledButton-BFpQ2Irc.js → UnstyledButton-_YQekhlm.js} +5 -3
- package/__chunks__/{VerticalStack-C2yDQVHD.mjs → VerticalStack-Cbdpucbh.mjs} +6 -4
- package/__chunks__/{VerticalStack-Dzpv3O67.js → VerticalStack-CunLpHRv.js} +5 -3
- package/__chunks__/index-CqNUlUoB.js +217 -0
- package/__chunks__/index-ee-P7jQr.mjs +218 -0
- package/__chunks__/jsx-runtime-CH1d66I3.js +320 -0
- package/__chunks__/jsx-runtime-DTpFD6nx.mjs +321 -0
- package/__chunks__/{useEdgeInterceptors-D_DARZZd.mjs → useEdgeInterceptors-BBmo6MI4.mjs} +17 -14
- package/__chunks__/{useEdgeInterceptors-Ihk8NfjJ.js → useEdgeInterceptors-BLxn3eUi.js} +16 -13
- package/package.json +5 -7
- package/types.d.ts +1 -1
- package/types.d.ts.map +1 -1
- package/utilities/Noop.d.ts +1 -1
- package/utilities/Noop.d.ts.map +1 -1
- package/utilities/react.d.ts +1 -1
- package/utilities/react.d.ts.map +1 -1
- package/utilities/react.js +1 -1
- package/utilities/react.mjs +1 -1
- package/utilities/test.d.ts +1 -0
- package/utilities/test.d.ts.map +1 -1
- package/__chunks__/EasyPostLogo-B3Um5vvS.mjs +0 -22
- package/__chunks__/EasyPostLogo-DQt5KlFX.js +0 -21
- package/__chunks__/index-CUcRN4NO.js +0 -311
- package/__chunks__/index-Izk6uvQC.mjs +0 -312
package/VerticalNav/index.js
CHANGED
|
@@ -31,16 +31,17 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
34
|
-
const
|
|
34
|
+
const jsxRuntime = require("../__chunks__/jsx-runtime-CH1d66I3.js");
|
|
35
35
|
const Item$1 = require("../__chunks__/Item-h_oPjYVR.js");
|
|
36
36
|
const utilities_css = require("../utilities/css.js");
|
|
37
|
-
const Icon = require("../__chunks__/Icon-
|
|
38
|
-
const Text = require("../__chunks__/Text-
|
|
37
|
+
const Icon = require("../__chunks__/Icon-BVa5ddiD.js");
|
|
38
|
+
const Text = require("../__chunks__/Text-C4CEsglh.js");
|
|
39
39
|
const useHover = require("../__chunks__/useHover-Ck1otl-j.js");
|
|
40
40
|
const mergeProps = require("../__chunks__/mergeProps-DLPcevok.js");
|
|
41
|
+
const React = require("react");
|
|
41
42
|
const useListState = require("../__chunks__/useListState-DDaaA7mG.js");
|
|
42
43
|
const ArrowForwardIos = require("../__chunks__/ArrowForwardIos-DpRiDPNZ.js");
|
|
43
|
-
const UnstyledButton = require("../__chunks__/UnstyledButton-
|
|
44
|
+
const UnstyledButton = require("../__chunks__/UnstyledButton-_YQekhlm.js");
|
|
44
45
|
const useTreeState = require("../__chunks__/useTreeState-Cb1U-iBl.js");
|
|
45
46
|
function Item(_props) {
|
|
46
47
|
return null;
|
|
@@ -66,21 +67,26 @@ const styles$5 = {
|
|
|
66
67
|
};
|
|
67
68
|
function Container(props) {
|
|
68
69
|
const { renderBanner, renderLogo, supplementaryAction, ["aria-label"]: ariaLabel, ["aria-labelledby"]: ariaLabelledBy, ["aria-describedby"]: ariaDescribedBy, ["aria-details"]: ariaDetails, children } = props;
|
|
69
|
-
return
|
|
70
|
-
className: styles$5.Container
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
return jsxRuntime.jsxRuntimeExports.jsxs("div", {
|
|
71
|
+
className: styles$5.Container,
|
|
72
|
+
children: [renderBanner && jsxRuntime.jsxRuntimeExports.jsx("div", {
|
|
73
|
+
className: styles$5.banner,
|
|
74
|
+
children: renderBanner()
|
|
75
|
+
}), renderLogo && jsxRuntime.jsxRuntimeExports.jsx("div", {
|
|
76
|
+
className: styles$5.logo,
|
|
77
|
+
children: renderLogo()
|
|
78
|
+
}), jsxRuntime.jsxRuntimeExports.jsx("nav", {
|
|
79
|
+
className: styles$5.nav,
|
|
80
|
+
"aria-label": ariaLabel,
|
|
81
|
+
"aria-labelledby": ariaLabelledBy,
|
|
82
|
+
"aria-describedby": ariaDescribedBy,
|
|
83
|
+
"aria-details": ariaDetails,
|
|
84
|
+
children
|
|
85
|
+
}), supplementaryAction && jsxRuntime.jsxRuntimeExports.jsx("div", {
|
|
86
|
+
className: styles$5.supplementaryActionContainer,
|
|
87
|
+
children: supplementaryAction
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
84
90
|
}
|
|
85
91
|
const NavItem$1 = "_NavItem_1qxcs_4";
|
|
86
92
|
const hovered$1 = "_hovered_1qxcs_11";
|
|
@@ -101,19 +107,26 @@ function NavItem(props) {
|
|
|
101
107
|
const _a = item.props, { as: As = "a", children, icon, label, textValue: _textValue } = _a, linkProps = __objRest(_a, ["as", "children", "icon", "label", "textValue"]);
|
|
102
108
|
const { hoverProps, isHovered } = useHover.$6179b936705e76d3$export$ae780daf29e6d456({});
|
|
103
109
|
const className = utilities_css.classNames(navItemStyles.NavItem, isHovered && navItemStyles.hovered, classNameFromParent);
|
|
104
|
-
return
|
|
105
|
-
className
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
return jsxRuntime.jsxRuntimeExports.jsxs("div", {
|
|
111
|
+
className,
|
|
112
|
+
children: [jsxRuntime.jsxRuntimeExports.jsxs("div", {
|
|
113
|
+
className: navItemStyles.linkContainer,
|
|
114
|
+
children: [jsxRuntime.jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
115
|
+
className: navItemStyles.link,
|
|
116
|
+
"aria-current": isSelected ? "true" : void 0,
|
|
117
|
+
"aria-expanded": isExpanded ? "true" : void 0
|
|
118
|
+
}, mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(hoverProps, linkProps)), {
|
|
119
|
+
children: [icon && jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, {
|
|
120
|
+
symbol: icon
|
|
121
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(Text.Text, {
|
|
122
|
+
variant: "subtitle2",
|
|
123
|
+
children: label
|
|
124
|
+
})]
|
|
125
|
+
})), expansionSlot]
|
|
126
|
+
}), children && isChildrenVisible && jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, {
|
|
127
|
+
children: item.rendered
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
117
130
|
}
|
|
118
131
|
const VerticalNavTypeContext = React.createContext(null);
|
|
119
132
|
const useVerticalNavType = () => {
|
|
@@ -129,23 +142,24 @@ function ListVerticalNav(props) {
|
|
|
129
142
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
130
143
|
selectionMode: "single"
|
|
131
144
|
}));
|
|
132
|
-
return
|
|
133
|
-
value: "list"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
return jsxRuntime.jsxRuntimeExports.jsx(VerticalNavTypeContext.Provider, {
|
|
146
|
+
value: "list",
|
|
147
|
+
children: jsxRuntime.jsxRuntimeExports.jsx(Container, __spreadProps(__spreadValues({}, props), {
|
|
148
|
+
children: [...state.collection].map((item) => jsxRuntime.jsxRuntimeExports.jsx(ListNavItem, {
|
|
149
|
+
item,
|
|
150
|
+
state
|
|
151
|
+
}, item.key))
|
|
152
|
+
}))
|
|
153
|
+
});
|
|
139
154
|
}
|
|
140
155
|
function ListNavItem({ item, state }) {
|
|
141
156
|
const isSelected = state.selectionManager.isSelected(item.key);
|
|
142
|
-
return
|
|
143
|
-
key: item.key,
|
|
157
|
+
return jsxRuntime.jsxRuntimeExports.jsx(NavItem, {
|
|
144
158
|
item,
|
|
145
159
|
className: utilities_css.classNames(isSelected && navItemStyles[utilities_css.variationName("selected", "list")]),
|
|
146
160
|
isChildrenVisible: isSelected,
|
|
147
161
|
isSelected
|
|
148
|
-
});
|
|
162
|
+
}, item.key);
|
|
149
163
|
}
|
|
150
164
|
const SubnavItemDot$1 = "_SubnavItemDot_145t2_4";
|
|
151
165
|
const cozy = "_cozy_145t2_16";
|
|
@@ -157,7 +171,7 @@ const styles$4 = {
|
|
|
157
171
|
};
|
|
158
172
|
function SubnavItemDot({ isCozy, isVisible }) {
|
|
159
173
|
const className = utilities_css.classNames(styles$4.SubnavItemDot, isCozy && styles$4.cozy, isVisible && styles$4.visible);
|
|
160
|
-
return
|
|
174
|
+
return jsxRuntime.jsxRuntimeExports.jsx("span", {
|
|
161
175
|
className
|
|
162
176
|
});
|
|
163
177
|
}
|
|
@@ -181,18 +195,22 @@ function SubnavItem(props) {
|
|
|
181
195
|
if (icon) {
|
|
182
196
|
throw new Error("icon is unsupported on <Subnav.Item />s");
|
|
183
197
|
}
|
|
184
|
-
return
|
|
185
|
-
className
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
return jsxRuntime.jsxRuntimeExports.jsxs("div", {
|
|
199
|
+
className,
|
|
200
|
+
children: [jsxRuntime.jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
201
|
+
className: styles$3.link,
|
|
202
|
+
"aria-current": isSelected ? "true" : void 0
|
|
203
|
+
}, mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(hoverProps, linkProps)), {
|
|
204
|
+
children: [(type === "list" || level > 1) && jsxRuntime.jsxRuntimeExports.jsx(SubnavItemDot, {
|
|
205
|
+
isCozy: type === "list",
|
|
206
|
+
isVisible: isSelected
|
|
207
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(Text.Text, {
|
|
208
|
+
variant: "body2",
|
|
209
|
+
weight: isSelected && level === 1 ? "medium" : "normal",
|
|
210
|
+
children: label
|
|
211
|
+
})]
|
|
212
|
+
})), item.props.children && item.rendered]
|
|
213
|
+
});
|
|
196
214
|
}
|
|
197
215
|
const Subnav$1 = "_Subnav_1eh4a_4";
|
|
198
216
|
const styles$2 = {
|
|
@@ -207,16 +225,17 @@ function Subnav(props) {
|
|
|
207
225
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
208
226
|
selectionMode: "single"
|
|
209
227
|
}));
|
|
210
|
-
return
|
|
211
|
-
value: level
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
228
|
+
return jsxRuntime.jsxRuntimeExports.jsx(SubnavLevelContext.Provider, {
|
|
229
|
+
value: level,
|
|
230
|
+
children: jsxRuntime.jsxRuntimeExports.jsx("div", {
|
|
231
|
+
className: styles$2.Subnav,
|
|
232
|
+
children: [...state.collection].map((item, i) => jsxRuntime.jsxRuntimeExports.jsx(SubnavItem, {
|
|
233
|
+
level,
|
|
234
|
+
state,
|
|
235
|
+
item
|
|
236
|
+
}, String(i)))
|
|
237
|
+
})
|
|
238
|
+
});
|
|
220
239
|
}
|
|
221
240
|
const SupplementaryAction$1 = "_SupplementaryAction_1i552_4";
|
|
222
241
|
const styles$1 = {
|
|
@@ -224,14 +243,17 @@ const styles$1 = {
|
|
|
224
243
|
};
|
|
225
244
|
const SupplementaryAction = React.forwardRef((props, ref) => {
|
|
226
245
|
const _a = props, { as: As = "button", children } = _a, elementProps = __objRest(_a, ["as", "children"]);
|
|
227
|
-
return
|
|
246
|
+
return jsxRuntime.jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
228
247
|
ref,
|
|
229
248
|
className: styles$1.SupplementaryAction
|
|
230
|
-
}, elementProps),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
249
|
+
}, elementProps), {
|
|
250
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(Text.Text, {
|
|
251
|
+
variant: "subtitle2",
|
|
252
|
+
children
|
|
253
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, {
|
|
254
|
+
symbol: ArrowForwardIos.ArrowForwardIos,
|
|
255
|
+
size: "xs"
|
|
256
|
+
})]
|
|
235
257
|
}));
|
|
236
258
|
});
|
|
237
259
|
SupplementaryAction.displayName = "SupplementaryAction";
|
|
@@ -243,14 +265,17 @@ const styles = {
|
|
|
243
265
|
};
|
|
244
266
|
function ExpandButton(_a) {
|
|
245
267
|
var _b = _a, { isExpanded } = _b, props = __objRest(_b, ["isExpanded"]);
|
|
246
|
-
return
|
|
268
|
+
return jsxRuntime.jsxRuntimeExports.jsxs(UnstyledButton.UnstyledButton, __spreadProps(__spreadValues({
|
|
247
269
|
className: utilities_css.classNames(styles.ExpandButton, isExpanded && styles.expanded)
|
|
248
|
-
}, props),
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
270
|
+
}, props), {
|
|
271
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, {
|
|
272
|
+
symbol: ArrowForwardIos.ArrowForwardIos,
|
|
273
|
+
size: "2xs"
|
|
274
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(Text.Text, {
|
|
275
|
+
visuallyHidden: true,
|
|
276
|
+
children: "Expand"
|
|
277
|
+
})]
|
|
278
|
+
}));
|
|
254
279
|
}
|
|
255
280
|
function TreeVerticalNav(props) {
|
|
256
281
|
const _a = props, { selectedKey } = _a, treeStateProps = __objRest(_a, ["selectedKey"]);
|
|
@@ -258,24 +283,26 @@ function TreeVerticalNav(props) {
|
|
|
258
283
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
259
284
|
selectionMode: "single"
|
|
260
285
|
}));
|
|
261
|
-
return
|
|
262
|
-
value: "tree"
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
286
|
+
return jsxRuntime.jsxRuntimeExports.jsx(VerticalNavTypeContext.Provider, {
|
|
287
|
+
value: "tree",
|
|
288
|
+
children: jsxRuntime.jsxRuntimeExports.jsx(Container, __spreadProps(__spreadValues({}, props), {
|
|
289
|
+
children: [...state.collection].map((item) => jsxRuntime.jsxRuntimeExports.jsx(TreeNavItem, {
|
|
290
|
+
item,
|
|
291
|
+
state
|
|
292
|
+
}, item.key))
|
|
293
|
+
}))
|
|
294
|
+
});
|
|
268
295
|
}
|
|
269
296
|
function TreeNavItem({ item, state }) {
|
|
270
297
|
const isSelected = state.selectionManager.isSelected(item.key);
|
|
271
298
|
const isExpanded = state.expandedKeys.has(item.key);
|
|
272
|
-
return
|
|
299
|
+
return jsxRuntime.jsxRuntimeExports.jsx(NavItem, {
|
|
273
300
|
item,
|
|
274
301
|
className: utilities_css.classNames(isSelected && navItemStyles[utilities_css.variationName("selected", "tree")]),
|
|
275
302
|
isChildrenVisible: isExpanded,
|
|
276
303
|
isSelected,
|
|
277
304
|
isExpanded,
|
|
278
|
-
expansionSlot: item.props.children &&
|
|
305
|
+
expansionSlot: item.props.children && jsxRuntime.jsxRuntimeExports.jsx(ExpandButton, {
|
|
279
306
|
isExpanded,
|
|
280
307
|
onPress: () => {
|
|
281
308
|
state.toggleKey(item.key);
|
|
@@ -284,7 +311,7 @@ function TreeNavItem({ item, state }) {
|
|
|
284
311
|
});
|
|
285
312
|
}
|
|
286
313
|
function VerticalNav(props) {
|
|
287
|
-
return
|
|
314
|
+
return jsxRuntime.jsxRuntimeExports.jsx(ListVerticalNav, __spreadValues({}, props));
|
|
288
315
|
}
|
|
289
316
|
VerticalNav.Item = Item;
|
|
290
317
|
VerticalNav.Subnav = Subnav;
|
package/VerticalNav/index.mjs
CHANGED
|
@@ -29,16 +29,17 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import
|
|
32
|
+
import { j as jsxRuntimeExports } from "../__chunks__/jsx-runtime-DTpFD6nx.mjs";
|
|
33
33
|
import { $ as $c1d7fb2ec91bae71$export$6d08773d2e66f8f2 } from "../__chunks__/Item-FD89BR0i.mjs";
|
|
34
34
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
35
|
-
import { I as Icon } from "../__chunks__/Icon-
|
|
36
|
-
import { T as Text } from "../__chunks__/Text-
|
|
35
|
+
import { I as Icon } from "../__chunks__/Icon-DzTns8u5.mjs";
|
|
36
|
+
import { T as Text } from "../__chunks__/Text-u9mYLeWj.mjs";
|
|
37
37
|
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../__chunks__/useHover-FWU5y5-k.mjs";
|
|
38
38
|
import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../__chunks__/mergeProps-COnPag8r.mjs";
|
|
39
|
+
import { createContext, useContext, useMemo, forwardRef } from "react";
|
|
39
40
|
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "../__chunks__/useListState-3s3ZON5A.mjs";
|
|
40
41
|
import { A as ArrowForwardIos } from "../__chunks__/ArrowForwardIos-DSeLeLhY.mjs";
|
|
41
|
-
import { U as UnstyledButton } from "../__chunks__/UnstyledButton-
|
|
42
|
+
import { U as UnstyledButton } from "../__chunks__/UnstyledButton-BCg7eEyP.mjs";
|
|
42
43
|
import { $ as $875d6693e12af071$export$728d6ba534403756 } from "../__chunks__/useTreeState-B9z3iENl.mjs";
|
|
43
44
|
function Item(_props) {
|
|
44
45
|
return null;
|
|
@@ -64,21 +65,26 @@ const styles$5 = {
|
|
|
64
65
|
};
|
|
65
66
|
function Container(props) {
|
|
66
67
|
const { renderBanner, renderLogo, supplementaryAction, ["aria-label"]: ariaLabel, ["aria-labelledby"]: ariaLabelledBy, ["aria-describedby"]: ariaDescribedBy, ["aria-details"]: ariaDetails, children } = props;
|
|
67
|
-
return
|
|
68
|
-
className: styles$5.Container
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
return jsxRuntimeExports.jsxs("div", {
|
|
69
|
+
className: styles$5.Container,
|
|
70
|
+
children: [renderBanner && jsxRuntimeExports.jsx("div", {
|
|
71
|
+
className: styles$5.banner,
|
|
72
|
+
children: renderBanner()
|
|
73
|
+
}), renderLogo && jsxRuntimeExports.jsx("div", {
|
|
74
|
+
className: styles$5.logo,
|
|
75
|
+
children: renderLogo()
|
|
76
|
+
}), jsxRuntimeExports.jsx("nav", {
|
|
77
|
+
className: styles$5.nav,
|
|
78
|
+
"aria-label": ariaLabel,
|
|
79
|
+
"aria-labelledby": ariaLabelledBy,
|
|
80
|
+
"aria-describedby": ariaDescribedBy,
|
|
81
|
+
"aria-details": ariaDetails,
|
|
82
|
+
children
|
|
83
|
+
}), supplementaryAction && jsxRuntimeExports.jsx("div", {
|
|
84
|
+
className: styles$5.supplementaryActionContainer,
|
|
85
|
+
children: supplementaryAction
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
82
88
|
}
|
|
83
89
|
const NavItem$1 = "_NavItem_1qxcs_4";
|
|
84
90
|
const hovered$1 = "_hovered_1qxcs_11";
|
|
@@ -99,19 +105,26 @@ function NavItem(props) {
|
|
|
99
105
|
const _a = item.props, { as: As = "a", children, icon, label, textValue: _textValue } = _a, linkProps = __objRest(_a, ["as", "children", "icon", "label", "textValue"]);
|
|
100
106
|
const { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({});
|
|
101
107
|
const className = classNames(navItemStyles.NavItem, isHovered && navItemStyles.hovered, classNameFromParent);
|
|
102
|
-
return
|
|
103
|
-
className
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
return jsxRuntimeExports.jsxs("div", {
|
|
109
|
+
className,
|
|
110
|
+
children: [jsxRuntimeExports.jsxs("div", {
|
|
111
|
+
className: navItemStyles.linkContainer,
|
|
112
|
+
children: [jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
113
|
+
className: navItemStyles.link,
|
|
114
|
+
"aria-current": isSelected ? "true" : void 0,
|
|
115
|
+
"aria-expanded": isExpanded ? "true" : void 0
|
|
116
|
+
}, $3ef42575df84b30b$export$9d1611c77c2fe928(hoverProps, linkProps)), {
|
|
117
|
+
children: [icon && jsxRuntimeExports.jsx(Icon, {
|
|
118
|
+
symbol: icon
|
|
119
|
+
}), jsxRuntimeExports.jsx(Text, {
|
|
120
|
+
variant: "subtitle2",
|
|
121
|
+
children: label
|
|
122
|
+
})]
|
|
123
|
+
})), expansionSlot]
|
|
124
|
+
}), children && isChildrenVisible && jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
|
|
125
|
+
children: item.rendered
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
115
128
|
}
|
|
116
129
|
const VerticalNavTypeContext = createContext(null);
|
|
117
130
|
const useVerticalNavType = () => {
|
|
@@ -127,23 +140,24 @@ function ListVerticalNav(props) {
|
|
|
127
140
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
128
141
|
selectionMode: "single"
|
|
129
142
|
}));
|
|
130
|
-
return
|
|
131
|
-
value: "list"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
return jsxRuntimeExports.jsx(VerticalNavTypeContext.Provider, {
|
|
144
|
+
value: "list",
|
|
145
|
+
children: jsxRuntimeExports.jsx(Container, __spreadProps(__spreadValues({}, props), {
|
|
146
|
+
children: [...state.collection].map((item) => jsxRuntimeExports.jsx(ListNavItem, {
|
|
147
|
+
item,
|
|
148
|
+
state
|
|
149
|
+
}, item.key))
|
|
150
|
+
}))
|
|
151
|
+
});
|
|
137
152
|
}
|
|
138
153
|
function ListNavItem({ item, state }) {
|
|
139
154
|
const isSelected = state.selectionManager.isSelected(item.key);
|
|
140
|
-
return
|
|
141
|
-
key: item.key,
|
|
155
|
+
return jsxRuntimeExports.jsx(NavItem, {
|
|
142
156
|
item,
|
|
143
157
|
className: classNames(isSelected && navItemStyles[variationName("selected", "list")]),
|
|
144
158
|
isChildrenVisible: isSelected,
|
|
145
159
|
isSelected
|
|
146
|
-
});
|
|
160
|
+
}, item.key);
|
|
147
161
|
}
|
|
148
162
|
const SubnavItemDot$1 = "_SubnavItemDot_145t2_4";
|
|
149
163
|
const cozy = "_cozy_145t2_16";
|
|
@@ -155,7 +169,7 @@ const styles$4 = {
|
|
|
155
169
|
};
|
|
156
170
|
function SubnavItemDot({ isCozy, isVisible }) {
|
|
157
171
|
const className = classNames(styles$4.SubnavItemDot, isCozy && styles$4.cozy, isVisible && styles$4.visible);
|
|
158
|
-
return
|
|
172
|
+
return jsxRuntimeExports.jsx("span", {
|
|
159
173
|
className
|
|
160
174
|
});
|
|
161
175
|
}
|
|
@@ -179,18 +193,22 @@ function SubnavItem(props) {
|
|
|
179
193
|
if (icon) {
|
|
180
194
|
throw new Error("icon is unsupported on <Subnav.Item />s");
|
|
181
195
|
}
|
|
182
|
-
return
|
|
183
|
-
className
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
196
|
+
return jsxRuntimeExports.jsxs("div", {
|
|
197
|
+
className,
|
|
198
|
+
children: [jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
199
|
+
className: styles$3.link,
|
|
200
|
+
"aria-current": isSelected ? "true" : void 0
|
|
201
|
+
}, $3ef42575df84b30b$export$9d1611c77c2fe928(hoverProps, linkProps)), {
|
|
202
|
+
children: [(type === "list" || level > 1) && jsxRuntimeExports.jsx(SubnavItemDot, {
|
|
203
|
+
isCozy: type === "list",
|
|
204
|
+
isVisible: isSelected
|
|
205
|
+
}), jsxRuntimeExports.jsx(Text, {
|
|
206
|
+
variant: "body2",
|
|
207
|
+
weight: isSelected && level === 1 ? "medium" : "normal",
|
|
208
|
+
children: label
|
|
209
|
+
})]
|
|
210
|
+
})), item.props.children && item.rendered]
|
|
211
|
+
});
|
|
194
212
|
}
|
|
195
213
|
const Subnav$1 = "_Subnav_1eh4a_4";
|
|
196
214
|
const styles$2 = {
|
|
@@ -205,16 +223,17 @@ function Subnav(props) {
|
|
|
205
223
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
206
224
|
selectionMode: "single"
|
|
207
225
|
}));
|
|
208
|
-
return
|
|
209
|
-
value: level
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
226
|
+
return jsxRuntimeExports.jsx(SubnavLevelContext.Provider, {
|
|
227
|
+
value: level,
|
|
228
|
+
children: jsxRuntimeExports.jsx("div", {
|
|
229
|
+
className: styles$2.Subnav,
|
|
230
|
+
children: [...state.collection].map((item, i) => jsxRuntimeExports.jsx(SubnavItem, {
|
|
231
|
+
level,
|
|
232
|
+
state,
|
|
233
|
+
item
|
|
234
|
+
}, String(i)))
|
|
235
|
+
})
|
|
236
|
+
});
|
|
218
237
|
}
|
|
219
238
|
const SupplementaryAction$1 = "_SupplementaryAction_1i552_4";
|
|
220
239
|
const styles$1 = {
|
|
@@ -222,14 +241,17 @@ const styles$1 = {
|
|
|
222
241
|
};
|
|
223
242
|
const SupplementaryAction = forwardRef((props, ref) => {
|
|
224
243
|
const _a = props, { as: As = "button", children } = _a, elementProps = __objRest(_a, ["as", "children"]);
|
|
225
|
-
return
|
|
244
|
+
return jsxRuntimeExports.jsxs(As, __spreadProps(__spreadValues({
|
|
226
245
|
ref,
|
|
227
246
|
className: styles$1.SupplementaryAction
|
|
228
|
-
}, elementProps),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
247
|
+
}, elementProps), {
|
|
248
|
+
children: [jsxRuntimeExports.jsx(Text, {
|
|
249
|
+
variant: "subtitle2",
|
|
250
|
+
children
|
|
251
|
+
}), jsxRuntimeExports.jsx(Icon, {
|
|
252
|
+
symbol: ArrowForwardIos,
|
|
253
|
+
size: "xs"
|
|
254
|
+
})]
|
|
233
255
|
}));
|
|
234
256
|
});
|
|
235
257
|
SupplementaryAction.displayName = "SupplementaryAction";
|
|
@@ -241,14 +263,17 @@ const styles = {
|
|
|
241
263
|
};
|
|
242
264
|
function ExpandButton(_a) {
|
|
243
265
|
var _b = _a, { isExpanded } = _b, props = __objRest(_b, ["isExpanded"]);
|
|
244
|
-
return
|
|
266
|
+
return jsxRuntimeExports.jsxs(UnstyledButton, __spreadProps(__spreadValues({
|
|
245
267
|
className: classNames(styles.ExpandButton, isExpanded && styles.expanded)
|
|
246
|
-
}, props),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
268
|
+
}, props), {
|
|
269
|
+
children: [jsxRuntimeExports.jsx(Icon, {
|
|
270
|
+
symbol: ArrowForwardIos,
|
|
271
|
+
size: "2xs"
|
|
272
|
+
}), jsxRuntimeExports.jsx(Text, {
|
|
273
|
+
visuallyHidden: true,
|
|
274
|
+
children: "Expand"
|
|
275
|
+
})]
|
|
276
|
+
}));
|
|
252
277
|
}
|
|
253
278
|
function TreeVerticalNav(props) {
|
|
254
279
|
const _a = props, { selectedKey } = _a, treeStateProps = __objRest(_a, ["selectedKey"]);
|
|
@@ -256,24 +281,26 @@ function TreeVerticalNav(props) {
|
|
|
256
281
|
selectedKeys: selectedKey ? [selectedKey] : [],
|
|
257
282
|
selectionMode: "single"
|
|
258
283
|
}));
|
|
259
|
-
return
|
|
260
|
-
value: "tree"
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
284
|
+
return jsxRuntimeExports.jsx(VerticalNavTypeContext.Provider, {
|
|
285
|
+
value: "tree",
|
|
286
|
+
children: jsxRuntimeExports.jsx(Container, __spreadProps(__spreadValues({}, props), {
|
|
287
|
+
children: [...state.collection].map((item) => jsxRuntimeExports.jsx(TreeNavItem, {
|
|
288
|
+
item,
|
|
289
|
+
state
|
|
290
|
+
}, item.key))
|
|
291
|
+
}))
|
|
292
|
+
});
|
|
266
293
|
}
|
|
267
294
|
function TreeNavItem({ item, state }) {
|
|
268
295
|
const isSelected = state.selectionManager.isSelected(item.key);
|
|
269
296
|
const isExpanded = state.expandedKeys.has(item.key);
|
|
270
|
-
return
|
|
297
|
+
return jsxRuntimeExports.jsx(NavItem, {
|
|
271
298
|
item,
|
|
272
299
|
className: classNames(isSelected && navItemStyles[variationName("selected", "tree")]),
|
|
273
300
|
isChildrenVisible: isExpanded,
|
|
274
301
|
isSelected,
|
|
275
302
|
isExpanded,
|
|
276
|
-
expansionSlot: item.props.children &&
|
|
303
|
+
expansionSlot: item.props.children && jsxRuntimeExports.jsx(ExpandButton, {
|
|
277
304
|
isExpanded,
|
|
278
305
|
onPress: () => {
|
|
279
306
|
state.toggleKey(item.key);
|
|
@@ -282,7 +309,7 @@ function TreeNavItem({ item, state }) {
|
|
|
282
309
|
});
|
|
283
310
|
}
|
|
284
311
|
function VerticalNav(props) {
|
|
285
|
-
return
|
|
312
|
+
return jsxRuntimeExports.jsx(ListVerticalNav, __spreadValues({}, props));
|
|
286
313
|
}
|
|
287
314
|
VerticalNav.Item = Item;
|
|
288
315
|
VerticalNav.Subnav = Subnav;
|
package/VerticalStack/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const VerticalStack = require("../__chunks__/VerticalStack-
|
|
3
|
+
const VerticalStack = require("../__chunks__/VerticalStack-CunLpHRv.js");
|
|
4
4
|
exports.VerticalStack = VerticalStack.VerticalStack;
|
package/VerticalStack/index.mjs
CHANGED