@dmsi/wedgekit-react 0.0.2
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/README.md +35 -0
- package/dist/chunk-27KIIUAR.js +59 -0
- package/dist/chunk-2G2E2JMA.js +123 -0
- package/dist/chunk-4C66DLIJ.js +51 -0
- package/dist/chunk-4RD5ZF2V.js +55 -0
- package/dist/chunk-4RJKB7LC.js +14 -0
- package/dist/chunk-4T7F5BZZ.js +26 -0
- package/dist/chunk-5GOBP2JS.js +53 -0
- package/dist/chunk-6ZY524ID.js +42 -0
- package/dist/chunk-AWQSSKCK.js +32 -0
- package/dist/chunk-BNHSAFMP.js +93 -0
- package/dist/chunk-BWRHL2AG.js +439 -0
- package/dist/chunk-DKKYR6DS.js +132 -0
- package/dist/chunk-E5ALT5W7.js +182 -0
- package/dist/chunk-FY7PTP6E.js +322 -0
- package/dist/chunk-GTCSRHPF.js +119 -0
- package/dist/chunk-I2UVVKQI.js +12 -0
- package/dist/chunk-IGQVA7SC.js +41 -0
- package/dist/chunk-K3IKUSZW.js +59 -0
- package/dist/chunk-KENSVWOY.js +151 -0
- package/dist/chunk-KX3O6GJ6.js +138 -0
- package/dist/chunk-L4UM372R.js +253 -0
- package/dist/chunk-ORMEWXMH.js +37 -0
- package/dist/chunk-Q3FKEKIN.js +23 -0
- package/dist/chunk-SEKKGFM6.js +28 -0
- package/dist/chunk-SY3HT54E.js +91 -0
- package/dist/chunk-TAW5ZZ4Z.js +346 -0
- package/dist/chunk-TRUPPHBQ.js +109 -0
- package/dist/chunk-TU55CHXU.js +30 -0
- package/dist/chunk-TWZZB4WO.js +114 -0
- package/dist/chunk-TYI74BSP.js +62 -0
- package/dist/chunk-U42SKNR6.js +104 -0
- package/dist/chunk-UU3FA6LV.js +72 -0
- package/dist/chunk-WVUIIBRR.js +51 -0
- package/dist/chunk-XUIPGYP5.js +39 -0
- package/dist/chunk-Z4UCFUF7.js +299 -0
- package/dist/components/Breadcrumbs.cjs +376 -0
- package/dist/components/Breadcrumbs.js +90 -0
- package/dist/components/Button.cjs +319 -0
- package/dist/components/Button.js +8 -0
- package/dist/components/CalendarRange.cjs +520 -0
- package/dist/components/CalendarRange.js +13 -0
- package/dist/components/Caption.cjs +283 -0
- package/dist/components/Caption.js +80 -0
- package/dist/components/Checkbox.cjs +378 -0
- package/dist/components/Checkbox.js +11 -0
- package/dist/components/ContentTab.cjs +382 -0
- package/dist/components/ContentTab.js +10 -0
- package/dist/components/ContentTabs.cjs +472 -0
- package/dist/components/ContentTabs.js +98 -0
- package/dist/components/DMSiLogo.cjs +79 -0
- package/dist/components/DMSiLogo.js +56 -0
- package/dist/components/DataGrid.cjs +3113 -0
- package/dist/components/DataGrid.js +758 -0
- package/dist/components/DataGridCell.cjs +1907 -0
- package/dist/components/DataGridCell.js +24 -0
- package/dist/components/DataTable.cjs +791 -0
- package/dist/components/DataTable.js +720 -0
- package/dist/components/DateInput.cjs +1130 -0
- package/dist/components/DateInput.js +170 -0
- package/dist/components/DateRangeInput.cjs +1131 -0
- package/dist/components/DateRangeInput.js +171 -0
- package/dist/components/DebugJson.cjs +50 -0
- package/dist/components/DebugJson.js +27 -0
- package/dist/components/Display.cjs +234 -0
- package/dist/components/Display.js +12 -0
- package/dist/components/EditingContext.cjs +73 -0
- package/dist/components/EditingContext.js +35 -0
- package/dist/components/FilterGroup.cjs +1431 -0
- package/dist/components/FilterGroup.js +231 -0
- package/dist/components/FullViewportBox.cjs +35 -0
- package/dist/components/FullViewportBox.js +12 -0
- package/dist/components/Grid.cjs +69 -0
- package/dist/components/Grid.js +36 -0
- package/dist/components/GridContainer.cjs +125 -0
- package/dist/components/GridContainer.js +92 -0
- package/dist/components/Heading.cjs +238 -0
- package/dist/components/Heading.js +14 -0
- package/dist/components/HorizontalDivider.cjs +33 -0
- package/dist/components/HorizontalDivider.js +10 -0
- package/dist/components/Icon.cjs +98 -0
- package/dist/components/Icon.js +7 -0
- package/dist/components/Input.cjs +672 -0
- package/dist/components/Input.js +21 -0
- package/dist/components/InputGroup.cjs +270 -0
- package/dist/components/InputGroup.js +60 -0
- package/dist/components/Label.cjs +223 -0
- package/dist/components/Label.js +8 -0
- package/dist/components/Link.cjs +262 -0
- package/dist/components/Link.js +8 -0
- package/dist/components/List.cjs +37 -0
- package/dist/components/List.js +14 -0
- package/dist/components/LiveChatComponent.cjs +63 -0
- package/dist/components/LiveChatComponent.js +40 -0
- package/dist/components/LogoAgilityTopBar.cjs +115 -0
- package/dist/components/LogoAgilityTopBar.js +92 -0
- package/dist/components/LogoDMSiTopBar.cjs +79 -0
- package/dist/components/LogoDMSiTopBar.js +7 -0
- package/dist/components/LogoMillworkTopBar.cjs +221 -0
- package/dist/components/LogoMillworkTopBar.js +198 -0
- package/dist/components/MainBar.cjs +211 -0
- package/dist/components/MainBar.js +65 -0
- package/dist/components/Menu.cjs +437 -0
- package/dist/components/Menu.js +11 -0
- package/dist/components/MenuOption.cjs +483 -0
- package/dist/components/MenuOption.js +13 -0
- package/dist/components/MobileDataGrid.cjs +658 -0
- package/dist/components/MobileDataGrid.js +125 -0
- package/dist/components/Modal.cjs +783 -0
- package/dist/components/Modal.js +245 -0
- package/dist/components/ModalButtons.cjs +385 -0
- package/dist/components/ModalButtons.js +10 -0
- package/dist/components/ModalContent.cjs +57 -0
- package/dist/components/ModalContent.js +7 -0
- package/dist/components/ModalHeader.cjs +426 -0
- package/dist/components/ModalHeader.js +11 -0
- package/dist/components/ModalScrim.cjs +64 -0
- package/dist/components/ModalScrim.js +7 -0
- package/dist/components/NavigationTab.cjs +431 -0
- package/dist/components/NavigationTab.js +10 -0
- package/dist/components/NavigationTabs.cjs +477 -0
- package/dist/components/NavigationTabs.js +56 -0
- package/dist/components/Notification.cjs +640 -0
- package/dist/components/Notification.js +117 -0
- package/dist/components/OptionPill.cjs +478 -0
- package/dist/components/OptionPill.js +11 -0
- package/dist/components/Paragraph.cjs +231 -0
- package/dist/components/Paragraph.js +8 -0
- package/dist/components/Password.cjs +700 -0
- package/dist/components/Password.js +53 -0
- package/dist/components/ProjectBar.cjs +242 -0
- package/dist/components/ProjectBar.js +63 -0
- package/dist/components/Radio.cjs +349 -0
- package/dist/components/Radio.js +131 -0
- package/dist/components/Search.cjs +767 -0
- package/dist/components/Search.js +12 -0
- package/dist/components/Select.cjs +758 -0
- package/dist/components/Select.js +12 -0
- package/dist/components/SideMenu.cjs +54 -0
- package/dist/components/SideMenu.js +21 -0
- package/dist/components/SideMenuGroup.cjs +422 -0
- package/dist/components/SideMenuGroup.js +83 -0
- package/dist/components/SideMenuItem.cjs +388 -0
- package/dist/components/SideMenuItem.js +70 -0
- package/dist/components/Stack.cjs +138 -0
- package/dist/components/Stack.js +7 -0
- package/dist/components/StatusPill.cjs +265 -0
- package/dist/components/StatusPill.js +52 -0
- package/dist/components/Stepper.cjs +885 -0
- package/dist/components/Stepper.js +105 -0
- package/dist/components/Subheader.cjs +226 -0
- package/dist/components/Subheader.js +8 -0
- package/dist/components/Surface.cjs +98 -0
- package/dist/components/Surface.js +40 -0
- package/dist/components/Swatch.cjs +1728 -0
- package/dist/components/Swatch.js +1319 -0
- package/dist/components/Textarea.cjs +269 -0
- package/dist/components/Textarea.js +96 -0
- package/dist/components/Theme.cjs +36 -0
- package/dist/components/Theme.js +7 -0
- package/dist/components/Time.cjs +1118 -0
- package/dist/components/Time.js +353 -0
- package/dist/components/Toast.cjs +644 -0
- package/dist/components/Toast.js +218 -0
- package/dist/components/Tooltip.cjs +273 -0
- package/dist/components/Tooltip.js +9 -0
- package/dist/components/TopBar.cjs +352 -0
- package/dist/components/TopBar.js +132 -0
- package/dist/components/useInfiniteScroll.cjs +57 -0
- package/dist/components/useInfiniteScroll.js +8 -0
- package/dist/components/useMatchesMedia.cjs +53 -0
- package/dist/components/useMatchesMedia.js +9 -0
- package/dist/components/useMenuSystem.cjs +358 -0
- package/dist/components/useMenuSystem.js +11 -0
- package/dist/components/useMounted.cjs +39 -0
- package/dist/components/useMounted.js +8 -0
- package/dist/fonts.css +21 -0
- package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
- package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
- package/dist/index.css +4401 -0
- package/dist/open-sans-55T6A4JE.woff2 +0 -0
- package/dist/types.cjs +18 -0
- package/dist/types.js +0 -0
- package/package.json +66 -0
- package/src/brand.css +125 -0
- package/src/classNames.ts +144 -0
- package/src/components/Breadcrumbs.tsx +116 -0
- package/src/components/Button.tsx +210 -0
- package/src/components/CalendarRange.tsx +429 -0
- package/src/components/Caption.tsx +101 -0
- package/src/components/Checkbox.tsx +196 -0
- package/src/components/ContentTab.tsx +66 -0
- package/src/components/ContentTabs.tsx +103 -0
- package/src/components/DMSiLogo.tsx +32 -0
- package/src/components/DataGrid.tsx +948 -0
- package/src/components/DataGridCell.tsx +384 -0
- package/src/components/DataTable.tsx +835 -0
- package/src/components/DateInput.tsx +188 -0
- package/src/components/DateRangeInput.tsx +179 -0
- package/src/components/DebugJson.tsx +24 -0
- package/src/components/Display.tsx +60 -0
- package/src/components/EditingContext.tsx +40 -0
- package/src/components/FilterGroup.tsx +234 -0
- package/src/components/FullViewportBox.tsx +11 -0
- package/src/components/Grid.tsx +75 -0
- package/src/components/GridContainer.tsx +124 -0
- package/src/components/Heading.tsx +66 -0
- package/src/components/HorizontalDivider.tsx +3 -0
- package/src/components/Icon.tsx +36 -0
- package/src/components/Input.tsx +511 -0
- package/src/components/InputGroup.tsx +51 -0
- package/src/components/Label.tsx +40 -0
- package/src/components/Link.tsx +106 -0
- package/src/components/List.tsx +10 -0
- package/src/components/LiveChatComponent.tsx +56 -0
- package/src/components/LogoAgilityTopBar.tsx +53 -0
- package/src/components/LogoDMSiTopBar.tsx +32 -0
- package/src/components/LogoMillworkTopBar.tsx +118 -0
- package/src/components/MainBar.tsx +83 -0
- package/src/components/Menu.tsx +286 -0
- package/src/components/MenuOption.tsx +275 -0
- package/src/components/MobileDataGrid.tsx +135 -0
- package/src/components/Modal.tsx +271 -0
- package/src/components/ModalButtons.tsx +44 -0
- package/src/components/ModalContent.tsx +23 -0
- package/src/components/ModalHeader.tsx +41 -0
- package/src/components/ModalScrim.tsx +35 -0
- package/src/components/NavigationTab.tsx +89 -0
- package/src/components/NavigationTabs.tsx +63 -0
- package/src/components/Notification.tsx +120 -0
- package/src/components/OptionPill.tsx +114 -0
- package/src/components/Paragraph.tsx +49 -0
- package/src/components/Password.tsx +46 -0
- package/src/components/ProjectBar.tsx +76 -0
- package/src/components/Radio.tsx +140 -0
- package/src/components/Search.tsx +129 -0
- package/src/components/Select.tsx +104 -0
- package/src/components/SideMenu.tsx +21 -0
- package/src/components/SideMenuGroup.tsx +81 -0
- package/src/components/SideMenuItem.tsx +90 -0
- package/src/components/Stack.tsx +179 -0
- package/src/components/StatusPill.tsx +51 -0
- package/src/components/Stepper.tsx +91 -0
- package/src/components/Subheader.tsx +44 -0
- package/src/components/Surface.tsx +34 -0
- package/src/components/Swatch.tsx +1066 -0
- package/src/components/Textarea.tsx +101 -0
- package/src/components/Theme.tsx +13 -0
- package/src/components/Time.tsx +438 -0
- package/src/components/Toast.tsx +244 -0
- package/src/components/Tooltip.tsx +137 -0
- package/src/components/TopBar.tsx +124 -0
- package/src/components/useInfiniteScroll.tsx +40 -0
- package/src/components/useMatchesMedia.tsx +28 -0
- package/src/components/useMenuSystem.tsx +367 -0
- package/src/components/useMounted.tsx +14 -0
- package/src/darkmode.css +140 -0
- package/src/fonts.css +23 -0
- package/src/index.css +509 -0
- package/src/index.tsx +2 -0
- package/src/types.ts +149 -0
- package/src/utils/formatting.tsx +81 -0
- package/src/utils.ts +23 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
typography
|
|
3
|
+
} from "./chunk-KX3O6GJ6.js";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-ORMEWXMH.js";
|
|
9
|
+
|
|
10
|
+
// src/components/Heading.tsx
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var Heading = (_a) => {
|
|
14
|
+
var _b = _a, {
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
as,
|
|
18
|
+
color,
|
|
19
|
+
align,
|
|
20
|
+
variant = "heading1"
|
|
21
|
+
} = _b, props = __objRest(_b, [
|
|
22
|
+
"className",
|
|
23
|
+
"children",
|
|
24
|
+
"as",
|
|
25
|
+
"color",
|
|
26
|
+
"align",
|
|
27
|
+
"variant"
|
|
28
|
+
]);
|
|
29
|
+
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
30
|
+
const Element = as != null ? as : defaultElement;
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
Element,
|
|
33
|
+
__spreadProps(__spreadValues({
|
|
34
|
+
className: clsx(
|
|
35
|
+
typography[variant],
|
|
36
|
+
className,
|
|
37
|
+
align === "left" && "text-left",
|
|
38
|
+
align === "center" && "text-center",
|
|
39
|
+
align === "right" && "text-right"
|
|
40
|
+
),
|
|
41
|
+
style: __spreadProps(__spreadValues({}, props.style), {
|
|
42
|
+
color: color ? `var(--color-${color})` : void 0
|
|
43
|
+
})
|
|
44
|
+
}, props), {
|
|
45
|
+
children
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
Heading.displayName = "Heading";
|
|
50
|
+
var Heading1 = (props) => /* @__PURE__ */ jsx(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
|
|
51
|
+
var Heading2 = (props) => /* @__PURE__ */ jsx(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
|
|
52
|
+
var Heading3 = (props) => /* @__PURE__ */ jsx(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
|
|
53
|
+
Heading1.displayName = "Heading1";
|
|
54
|
+
Heading2.displayName = "Heading2";
|
|
55
|
+
Heading3.displayName = "Heading3";
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
Heading,
|
|
59
|
+
Heading1,
|
|
60
|
+
Heading2,
|
|
61
|
+
Heading3
|
|
62
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// src/components/Stack.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var useFlexClassNames = ({ items, justify, grow }) => clsx(
|
|
5
|
+
"flex",
|
|
6
|
+
items === "start" && "items-start",
|
|
7
|
+
grow && "grow",
|
|
8
|
+
items === "start" && "items-start",
|
|
9
|
+
items === "center" && "items-center",
|
|
10
|
+
items === "end" && "items-end",
|
|
11
|
+
items === "start-center" && "items-start desktop:items-center",
|
|
12
|
+
justify === "start" && "justify-start",
|
|
13
|
+
justify === "center" && "justify-center",
|
|
14
|
+
justify === "end" && "justify-end",
|
|
15
|
+
justify === "end" && "justify-end",
|
|
16
|
+
justify === "between" && "justify-between",
|
|
17
|
+
justify === "around" && "justify-around"
|
|
18
|
+
);
|
|
19
|
+
var Stack = ({
|
|
20
|
+
children,
|
|
21
|
+
items,
|
|
22
|
+
justify,
|
|
23
|
+
grow,
|
|
24
|
+
padding,
|
|
25
|
+
paddingX,
|
|
26
|
+
horizontal,
|
|
27
|
+
horizontalMobile,
|
|
28
|
+
elevation = 0,
|
|
29
|
+
rounded,
|
|
30
|
+
centered,
|
|
31
|
+
width,
|
|
32
|
+
maxWidth,
|
|
33
|
+
minWidth,
|
|
34
|
+
height,
|
|
35
|
+
maxHeight,
|
|
36
|
+
borderColor,
|
|
37
|
+
backgroundColor,
|
|
38
|
+
sizing = "none",
|
|
39
|
+
overflowY = "inherit",
|
|
40
|
+
overflowX = "inherit",
|
|
41
|
+
flexShrink,
|
|
42
|
+
flexGrow,
|
|
43
|
+
position,
|
|
44
|
+
top,
|
|
45
|
+
left
|
|
46
|
+
}) => {
|
|
47
|
+
const flexClassNames = useFlexClassNames({ items, justify, grow });
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
style: {
|
|
52
|
+
height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
|
|
53
|
+
maxHeight: maxHeight !== void 0 ? `${maxHeight}px` : void 0,
|
|
54
|
+
maxWidth: maxWidth !== void 0 ? `${maxWidth}px` : void 0,
|
|
55
|
+
width: width !== void 0 && typeof width === "number" ? `${width}px` : void 0,
|
|
56
|
+
minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
|
|
57
|
+
border: borderColor ? `1px solid var(--color-${borderColor})` : void 0,
|
|
58
|
+
backgroundColor: backgroundColor ? `var(--color-${backgroundColor})` : void 0,
|
|
59
|
+
flexGrow: flexGrow !== void 0 ? flexGrow : void 0,
|
|
60
|
+
flexShrink: flexShrink !== void 0 ? flexShrink : void 0,
|
|
61
|
+
position: position !== void 0 ? position : void 0,
|
|
62
|
+
top: top !== void 0 ? `${top}px` : void 0,
|
|
63
|
+
left: left !== void 0 ? `${left}px` : void 0
|
|
64
|
+
},
|
|
65
|
+
className: clsx(
|
|
66
|
+
"scrollbar-thin",
|
|
67
|
+
width !== "fit" && "w-full",
|
|
68
|
+
width === "full" && "w-full",
|
|
69
|
+
centered && "mx-auto",
|
|
70
|
+
overflowY == "auto" && "overflow-y-auto",
|
|
71
|
+
overflowY == "hidden" && "overflow-y-hidden",
|
|
72
|
+
overflowY == "scroll" && "overflow-y-scroll",
|
|
73
|
+
overflowX == "auto" && "overflow-x-auto",
|
|
74
|
+
overflowX == "hidden" && "overflow-x-hidden",
|
|
75
|
+
overflowX == "scroll" && "overflow-x-scroll",
|
|
76
|
+
padding && sizing === "container" && "p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding",
|
|
77
|
+
padding && sizing === "layout" && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
|
|
78
|
+
padding && sizing === "layout-group" && "p-mobile-layout-group-padding desktop:p-desktop-layout-group-padding compact:p-desktop-compact-layout-group-padding",
|
|
79
|
+
padding && sizing === "component" && "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
|
|
80
|
+
paddingX && sizing === "container" && "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
|
|
81
|
+
paddingX && sizing === "layout" && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
|
|
82
|
+
paddingX && sizing === "layout-group" && "px-mobile-layout-group-padding desktop:px-desktop-layout-group-padding compact:px-desktop-compact-layout-group-padding",
|
|
83
|
+
paddingX && sizing === "component" && "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
|
|
84
|
+
horizontal ? "desktop:flex-row" : "desktop:flex-col",
|
|
85
|
+
horizontalMobile ? "flex-row" : "flex-col",
|
|
86
|
+
flexClassNames,
|
|
87
|
+
sizing === "layout-group" && "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-compact-layout-group-gap",
|
|
88
|
+
sizing === "layout" && "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-compact-layout-gap",
|
|
89
|
+
sizing === "container" && "gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-compact-container-gap",
|
|
90
|
+
sizing === "component" && "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-compact-component-gap",
|
|
91
|
+
elevation === 0 && "shadow-none",
|
|
92
|
+
elevation === 2 && "shadow-2",
|
|
93
|
+
elevation === 4 && "shadow-4",
|
|
94
|
+
elevation === 16 && "shadow-16",
|
|
95
|
+
rounded && "rounded"
|
|
96
|
+
),
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
Stack
|
|
104
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-KENSVWOY.js";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-ORMEWXMH.js";
|
|
9
|
+
|
|
10
|
+
// src/components/ContentTab.tsx
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
import { useCallback, useState } from "react";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var ContentTab = (_a) => {
|
|
15
|
+
var _b = _a, {
|
|
16
|
+
label,
|
|
17
|
+
selected = false,
|
|
18
|
+
className,
|
|
19
|
+
disabled = false,
|
|
20
|
+
onClick,
|
|
21
|
+
ref
|
|
22
|
+
} = _b, props = __objRest(_b, [
|
|
23
|
+
"label",
|
|
24
|
+
"selected",
|
|
25
|
+
"className",
|
|
26
|
+
"disabled",
|
|
27
|
+
"onClick",
|
|
28
|
+
"ref"
|
|
29
|
+
]);
|
|
30
|
+
const [active, setActive] = useState(false);
|
|
31
|
+
const handleClick = useCallback(
|
|
32
|
+
(e) => {
|
|
33
|
+
if (!disabled) {
|
|
34
|
+
onClick == null ? void 0 : onClick(e);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
[onClick, disabled]
|
|
38
|
+
);
|
|
39
|
+
const computedClassName = clsx(
|
|
40
|
+
"absolute left-0 right-0 bottom-0 transition-colors duration-200 ease-in-out hover:bg-border-action-hover z-10",
|
|
41
|
+
"rounded-px",
|
|
42
|
+
"h-0.5",
|
|
43
|
+
active && "bg-text-action-primary-active",
|
|
44
|
+
!active && !disabled && "bg-text-action-primary-normal",
|
|
45
|
+
!active && disabled && "bg-text-action-primary-disabled",
|
|
46
|
+
className
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Button,
|
|
51
|
+
__spreadProps(__spreadValues({
|
|
52
|
+
ref,
|
|
53
|
+
variant: "tertiary",
|
|
54
|
+
disabled,
|
|
55
|
+
onMouseDown: () => setActive(true),
|
|
56
|
+
onMouseLeave: () => setActive(false),
|
|
57
|
+
onMouseUp: () => setActive(false),
|
|
58
|
+
onClick: handleClick,
|
|
59
|
+
role: "tab",
|
|
60
|
+
"aria-selected": selected
|
|
61
|
+
}, props), {
|
|
62
|
+
children: label
|
|
63
|
+
})
|
|
64
|
+
),
|
|
65
|
+
selected && /* @__PURE__ */ jsx("div", { className: computedClassName, children: " " })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
ContentTab.displayName = "ContentTab";
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
ContentTab
|
|
72
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// ../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
2
|
+
import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from "react";
|
|
3
|
+
var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
4
|
+
var CSS = /* @__PURE__ */ Object.freeze({
|
|
5
|
+
Translate: {
|
|
6
|
+
toString(transform) {
|
|
7
|
+
if (!transform) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const {
|
|
11
|
+
x,
|
|
12
|
+
y
|
|
13
|
+
} = transform;
|
|
14
|
+
return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
Scale: {
|
|
18
|
+
toString(transform) {
|
|
19
|
+
if (!transform) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const {
|
|
23
|
+
scaleX,
|
|
24
|
+
scaleY
|
|
25
|
+
} = transform;
|
|
26
|
+
return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
Transform: {
|
|
30
|
+
toString(transform) {
|
|
31
|
+
if (!transform) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" ");
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
Transition: {
|
|
38
|
+
toString(_ref) {
|
|
39
|
+
let {
|
|
40
|
+
property,
|
|
41
|
+
duration,
|
|
42
|
+
easing
|
|
43
|
+
} = _ref;
|
|
44
|
+
return property + " " + duration + "ms " + easing;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
CSS
|
|
51
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading2
|
|
3
|
+
} from "./chunk-TYI74BSP.js";
|
|
4
|
+
import {
|
|
5
|
+
Button
|
|
6
|
+
} from "./chunk-KENSVWOY.js";
|
|
7
|
+
import {
|
|
8
|
+
Icon
|
|
9
|
+
} from "./chunk-IGQVA7SC.js";
|
|
10
|
+
|
|
11
|
+
// src/components/ModalHeader.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var ModalHeader = ({
|
|
14
|
+
title,
|
|
15
|
+
hideCloseIcon,
|
|
16
|
+
headerIcon,
|
|
17
|
+
onClose
|
|
18
|
+
}) => {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-desktop-compact-container-gap", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
21
|
+
headerIcon,
|
|
22
|
+
title && /* @__PURE__ */ jsx(Heading2, { as: "p", children: title })
|
|
23
|
+
] }),
|
|
24
|
+
!hideCloseIcon && /* @__PURE__ */ jsx(
|
|
25
|
+
Button,
|
|
26
|
+
{
|
|
27
|
+
iconOnly: true,
|
|
28
|
+
variant: "tertiary",
|
|
29
|
+
onClick: onClose,
|
|
30
|
+
leftIcon: /* @__PURE__ */ jsx("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ jsx(Icon, { name: "close", size: 24 }) })
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
ModalHeader.displayName = "ModalHeader";
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
ModalHeader
|
|
39
|
+
};
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useMatchesMobile
|
|
3
|
+
} from "./chunk-SEKKGFM6.js";
|
|
4
|
+
import {
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "./chunk-ORMEWXMH.js";
|
|
7
|
+
|
|
8
|
+
// src/components/useMenuSystem.tsx
|
|
9
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
10
|
+
function useSubMenuSystem(mobilePositionTo) {
|
|
11
|
+
const [activeMenus, setActiveMenus] = useState(
|
|
12
|
+
{}
|
|
13
|
+
);
|
|
14
|
+
const [activeMenu, setActiveMenu] = useState("");
|
|
15
|
+
const [currentSubMenuLevel, setCurrentSubMenuLevel] = useState(null);
|
|
16
|
+
const menuRootRef = useRef(null);
|
|
17
|
+
const subMenuRefs = useRef({});
|
|
18
|
+
const hoverTimeoutRef = useRef(null);
|
|
19
|
+
const closeTimeoutRef = useRef(null);
|
|
20
|
+
const isMobile = useMatchesMobile();
|
|
21
|
+
const toggleMenu = (menuId, level) => {
|
|
22
|
+
if (closeTimeoutRef.current) {
|
|
23
|
+
clearTimeout(closeTimeoutRef.current);
|
|
24
|
+
closeTimeoutRef.current = null;
|
|
25
|
+
}
|
|
26
|
+
setActiveMenu(menuId);
|
|
27
|
+
setCurrentSubMenuLevel(level);
|
|
28
|
+
setActiveMenus((prev) => {
|
|
29
|
+
const newActiveMenus = __spreadValues({}, prev);
|
|
30
|
+
if (newActiveMenus[level] === menuId) {
|
|
31
|
+
delete newActiveMenus[level];
|
|
32
|
+
} else {
|
|
33
|
+
newActiveMenus[level] = menuId;
|
|
34
|
+
}
|
|
35
|
+
Object.keys(newActiveMenus).forEach((key) => {
|
|
36
|
+
if (Number(key) > level) {
|
|
37
|
+
delete newActiveMenus[Number(key)];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return newActiveMenus;
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const openMenu = (menuId, level) => {
|
|
44
|
+
if (closeTimeoutRef.current) {
|
|
45
|
+
clearTimeout(closeTimeoutRef.current);
|
|
46
|
+
closeTimeoutRef.current = null;
|
|
47
|
+
}
|
|
48
|
+
setActiveMenus((prev) => {
|
|
49
|
+
const newActiveMenus = __spreadValues({}, prev);
|
|
50
|
+
newActiveMenus[level] = menuId;
|
|
51
|
+
Object.keys(newActiveMenus).forEach((key) => {
|
|
52
|
+
if (Number(key) > level) {
|
|
53
|
+
delete newActiveMenus[Number(key)];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return newActiveMenus;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const openMenuWithDelay = (menuId, level, delay = 150) => {
|
|
60
|
+
if (isMobile) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (hoverTimeoutRef.current) {
|
|
64
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
65
|
+
}
|
|
66
|
+
hoverTimeoutRef.current = setTimeout(() => {
|
|
67
|
+
openMenu(menuId, level);
|
|
68
|
+
}, delay);
|
|
69
|
+
};
|
|
70
|
+
const closeMenuWithDelay = (level, delay = 500) => {
|
|
71
|
+
if (isMobile) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (hoverTimeoutRef.current) {
|
|
75
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
76
|
+
hoverTimeoutRef.current = null;
|
|
77
|
+
}
|
|
78
|
+
closeTimeoutRef.current = setTimeout(() => {
|
|
79
|
+
closeSubMenuLevel(level);
|
|
80
|
+
}, delay);
|
|
81
|
+
};
|
|
82
|
+
const cancelCloseTimeout = () => {
|
|
83
|
+
if (isMobile) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (closeTimeoutRef.current) {
|
|
87
|
+
clearTimeout(closeTimeoutRef.current);
|
|
88
|
+
closeTimeoutRef.current = null;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const closeSubMenuLevel = (level) => {
|
|
92
|
+
setActiveMenus((prev) => {
|
|
93
|
+
const newActiveMenus = __spreadValues({}, prev);
|
|
94
|
+
delete newActiveMenus[level];
|
|
95
|
+
Object.keys(newActiveMenus).forEach((key) => {
|
|
96
|
+
if (Number(key) >= level) {
|
|
97
|
+
delete newActiveMenus[Number(key)];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
if (isMobile) {
|
|
101
|
+
const newSubMenuLevel = level - 1;
|
|
102
|
+
setCurrentSubMenuLevel(newSubMenuLevel);
|
|
103
|
+
const newActiveMenu = newActiveMenus[newSubMenuLevel];
|
|
104
|
+
if (Object.keys(newActiveMenus).length > 0 && newActiveMenu) {
|
|
105
|
+
setActiveMenu(newActiveMenu);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return newActiveMenus;
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const registerSubMenu = (id, element) => {
|
|
112
|
+
subMenuRefs.current[id] = element;
|
|
113
|
+
};
|
|
114
|
+
const isMenuActive = (menuId, level) => {
|
|
115
|
+
return activeMenus[level] === menuId;
|
|
116
|
+
};
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
const handleClickOutside = (event) => {
|
|
119
|
+
var _a;
|
|
120
|
+
if (Object.keys(activeMenus).length === 0) return;
|
|
121
|
+
const target = event.target;
|
|
122
|
+
if ((_a = menuRootRef.current) == null ? void 0 : _a.contains(target)) return;
|
|
123
|
+
const isInsideActiveSubmenu = Object.values(activeMenus).some((id) => {
|
|
124
|
+
const submenuEl = subMenuRefs.current[id];
|
|
125
|
+
return submenuEl == null ? void 0 : submenuEl.contains(target);
|
|
126
|
+
});
|
|
127
|
+
if (!isInsideActiveSubmenu) {
|
|
128
|
+
setActiveMenus({});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
132
|
+
return () => {
|
|
133
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
134
|
+
};
|
|
135
|
+
}, [activeMenus]);
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
return () => {
|
|
138
|
+
if (hoverTimeoutRef.current) {
|
|
139
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
140
|
+
}
|
|
141
|
+
if (closeTimeoutRef.current) {
|
|
142
|
+
clearTimeout(closeTimeoutRef.current);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}, []);
|
|
146
|
+
const getAllFocusableMenuElements = () => {
|
|
147
|
+
const elements = [];
|
|
148
|
+
if (menuRootRef.current) {
|
|
149
|
+
elements.push(...Array.from(menuRootRef.current.children));
|
|
150
|
+
}
|
|
151
|
+
Object.values(activeMenus).forEach((menuId) => {
|
|
152
|
+
const submenuEl = subMenuRefs.current[menuId];
|
|
153
|
+
if (submenuEl) {
|
|
154
|
+
elements.push(...Array.from(submenuEl.children));
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return elements;
|
|
158
|
+
};
|
|
159
|
+
const findCurrentMenuLevel = (element) => {
|
|
160
|
+
let current = element.parentElement;
|
|
161
|
+
while (current) {
|
|
162
|
+
const level = current.getAttribute("data-menu-level");
|
|
163
|
+
if (level !== null) {
|
|
164
|
+
return parseInt(level, 10);
|
|
165
|
+
}
|
|
166
|
+
current = current.parentElement;
|
|
167
|
+
}
|
|
168
|
+
return 0;
|
|
169
|
+
};
|
|
170
|
+
const getMenuElementsAtLevel = (level) => {
|
|
171
|
+
var _a;
|
|
172
|
+
if (level === 0 && menuRootRef.current) {
|
|
173
|
+
return Array.from(menuRootRef.current.children);
|
|
174
|
+
}
|
|
175
|
+
const menuId = (_a = Object.entries(activeMenus).find(([, id]) => {
|
|
176
|
+
const submenuEl = subMenuRefs.current[id];
|
|
177
|
+
return submenuEl && submenuEl.getAttribute("data-menu-level") === level.toString();
|
|
178
|
+
})) == null ? void 0 : _a[1];
|
|
179
|
+
if (menuId) {
|
|
180
|
+
const submenuEl = subMenuRefs.current[menuId];
|
|
181
|
+
if (submenuEl) {
|
|
182
|
+
return Array.from(submenuEl.children);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return [];
|
|
186
|
+
};
|
|
187
|
+
return {
|
|
188
|
+
menuRootRef,
|
|
189
|
+
activeMenus,
|
|
190
|
+
openMenu,
|
|
191
|
+
isMenuActive,
|
|
192
|
+
registerSubMenu,
|
|
193
|
+
closeSubMenuLevel,
|
|
194
|
+
getAllFocusableMenuElements,
|
|
195
|
+
findCurrentMenuLevel,
|
|
196
|
+
getMenuElementsAtLevel,
|
|
197
|
+
mobileHide: isMobile && Object.keys(activeMenus).length > 0,
|
|
198
|
+
listeners: {
|
|
199
|
+
onSubMenuHover: openMenuWithDelay,
|
|
200
|
+
onSubMenuLeave: closeMenuWithDelay,
|
|
201
|
+
onSubMenuEnter: cancelCloseTimeout,
|
|
202
|
+
toggleMenu,
|
|
203
|
+
mobilePositionTo,
|
|
204
|
+
activeMenu,
|
|
205
|
+
currentSubMenuLevel,
|
|
206
|
+
closeSubMenuLevel
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
function useMenuPosition(elementRef, position = "bottom", options) {
|
|
211
|
+
const [menuPosition, setMenuPosition] = useState({
|
|
212
|
+
top: 0,
|
|
213
|
+
left: 0,
|
|
214
|
+
minWidth: 0
|
|
215
|
+
});
|
|
216
|
+
const isMobile = useMatchesMobile();
|
|
217
|
+
const updatePosition = useCallback(() => {
|
|
218
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
219
|
+
if (!(elementRef == null ? void 0 : elementRef.current)) return;
|
|
220
|
+
const triggerRect = elementRef.current.getBoundingClientRect();
|
|
221
|
+
const menuRect = (_b = (_a = options == null ? void 0 : options.menuRef) == null ? void 0 : _a.current) == null ? void 0 : _b.getBoundingClientRect();
|
|
222
|
+
const viewportWidth = window.innerWidth;
|
|
223
|
+
const menuWidth = (menuRect == null ? void 0 : menuRect.width) || triggerRect.width;
|
|
224
|
+
const topOffset = (_c = options == null ? void 0 : options.topOffset) != null ? _c : 4;
|
|
225
|
+
let top = 0;
|
|
226
|
+
let left = 0;
|
|
227
|
+
if (position === "bottom" || position === "bottom-right") {
|
|
228
|
+
top = triggerRect.top + triggerRect.height + topOffset;
|
|
229
|
+
} else {
|
|
230
|
+
top = triggerRect.top;
|
|
231
|
+
}
|
|
232
|
+
if (position === "bottom") {
|
|
233
|
+
left = triggerRect.left + window.scrollX;
|
|
234
|
+
} else if (position === "bottom-right") {
|
|
235
|
+
left = triggerRect.right + window.scrollX - menuWidth;
|
|
236
|
+
} else if (position === "right") {
|
|
237
|
+
left = triggerRect.right + window.scrollX;
|
|
238
|
+
}
|
|
239
|
+
const overflowsLeftViewport = left + menuWidth > viewportWidth;
|
|
240
|
+
if (overflowsLeftViewport) {
|
|
241
|
+
left = triggerRect.left - menuWidth;
|
|
242
|
+
}
|
|
243
|
+
if (isMobile) {
|
|
244
|
+
left = triggerRect.left + menuWidth > viewportWidth ? Math.max(viewportWidth - menuWidth, 0) - 8 : triggerRect.left;
|
|
245
|
+
top = ((_f = (_e = (_d = elementRef.current.parentElement) == null ? void 0 : _d.getBoundingClientRect()) == null ? void 0 : _e.top) != null ? _f : 0) + ((_i = (_h = (_g = elementRef.current.parentElement) == null ? void 0 : _g.getBoundingClientRect()) == null ? void 0 : _h.height) != null ? _i : 0) + topOffset;
|
|
246
|
+
}
|
|
247
|
+
setMenuPosition({
|
|
248
|
+
top,
|
|
249
|
+
left,
|
|
250
|
+
minWidth: triggerRect.width
|
|
251
|
+
});
|
|
252
|
+
}, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
|
|
253
|
+
useEffect(() => {
|
|
254
|
+
if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
|
|
255
|
+
const handleClickOutside = (event) => {
|
|
256
|
+
var _a, _b, _c, _d, _e;
|
|
257
|
+
const target = event.target;
|
|
258
|
+
if ((_a = elementRef.current) == null ? void 0 : _a.contains(target)) return;
|
|
259
|
+
if ((_c = (_b = options.menuRef) == null ? void 0 : _b.current) == null ? void 0 : _c.contains(target)) return;
|
|
260
|
+
if ((_d = options.additionalRefs) == null ? void 0 : _d.some((ref) => {
|
|
261
|
+
var _a2;
|
|
262
|
+
return (_a2 = ref.current) == null ? void 0 : _a2.contains(target);
|
|
263
|
+
}))
|
|
264
|
+
return;
|
|
265
|
+
(_e = options.setIsOpen) == null ? void 0 : _e.call(options, false);
|
|
266
|
+
};
|
|
267
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
268
|
+
return () => {
|
|
269
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
270
|
+
};
|
|
271
|
+
}, [
|
|
272
|
+
options,
|
|
273
|
+
elementRef,
|
|
274
|
+
options == null ? void 0 : options.isOpen,
|
|
275
|
+
options == null ? void 0 : options.setIsOpen,
|
|
276
|
+
options == null ? void 0 : options.menuRef,
|
|
277
|
+
options == null ? void 0 : options.additionalRefs
|
|
278
|
+
]);
|
|
279
|
+
useEffect(() => {
|
|
280
|
+
updatePosition();
|
|
281
|
+
const resizeObserver = new ResizeObserver(updatePosition);
|
|
282
|
+
if (elementRef == null ? void 0 : elementRef.current) {
|
|
283
|
+
resizeObserver.observe(elementRef.current);
|
|
284
|
+
}
|
|
285
|
+
window.addEventListener("scroll", updatePosition);
|
|
286
|
+
window.addEventListener("resize", updatePosition);
|
|
287
|
+
return () => {
|
|
288
|
+
resizeObserver.disconnect();
|
|
289
|
+
window.removeEventListener("scroll", updatePosition);
|
|
290
|
+
window.removeEventListener("resize", updatePosition);
|
|
291
|
+
};
|
|
292
|
+
}, [elementRef, updatePosition]);
|
|
293
|
+
return { menuPosition, updatePosition };
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export {
|
|
297
|
+
useSubMenuSystem,
|
|
298
|
+
useMenuPosition
|
|
299
|
+
};
|