@elliemae/ds-menu-items 3.27.0-next.8 → 3.27.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ActionMenuItem/index.js +6 -61
- package/dist/cjs/components/ActionMenuItem/index.js.map +2 -2
- package/dist/cjs/components/MultiMenuItem/index.js +6 -79
- package/dist/cjs/components/MultiMenuItem/index.js.map +2 -2
- package/dist/cjs/components/Section/index.js +6 -29
- package/dist/cjs/components/Section/index.js.map +2 -2
- package/dist/cjs/components/Separator/index.js +6 -32
- package/dist/cjs/components/Separator/index.js.map +2 -2
- package/dist/cjs/components/SingleMenuItem/index.js +6 -84
- package/dist/cjs/components/SingleMenuItem/index.js.map +3 -3
- package/dist/cjs/components/SingleWithSubmenuItem/index.js +5 -124
- package/dist/cjs/components/SingleWithSubmenuItem/index.js.map +2 -2
- package/dist/cjs/components/SkeletonMenuItem/index.js +5 -26
- package/dist/cjs/components/SkeletonMenuItem/index.js.map +2 -2
- package/dist/cjs/components/SubmenuItem/index.js +5 -128
- package/dist/cjs/components/SubmenuItem/index.js.map +2 -2
- package/dist/cjs/components/index.js +51 -9
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/exported-related/index.js +9 -2
- package/dist/cjs/exported-related/index.js.map +2 -2
- package/dist/cjs/index.js +45 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/components/ActionMenuItem/index.js +11 -65
- package/dist/esm/components/ActionMenuItem/index.js.map +3 -3
- package/dist/esm/components/MultiMenuItem/index.js +12 -79
- package/dist/esm/components/MultiMenuItem/index.js.map +3 -3
- package/dist/esm/components/Section/index.js +12 -29
- package/dist/esm/components/Section/index.js.map +3 -3
- package/dist/esm/components/Separator/index.js +11 -37
- package/dist/esm/components/Separator/index.js.map +3 -3
- package/dist/esm/components/SingleMenuItem/index.js +11 -88
- package/dist/esm/components/SingleMenuItem/index.js.map +3 -3
- package/dist/esm/components/SingleWithSubmenuItem/index.js +9 -131
- package/dist/esm/components/SingleWithSubmenuItem/index.js.map +3 -3
- package/dist/esm/components/SkeletonMenuItem/index.js +10 -26
- package/dist/esm/components/SkeletonMenuItem/index.js.map +3 -3
- package/dist/esm/components/SubmenuItem/index.js +9 -135
- package/dist/esm/components/SubmenuItem/index.js.map +3 -3
- package/dist/esm/components/index.js +92 -8
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/exported-related/index.js +5 -1
- package/dist/esm/exported-related/index.js.map +2 -2
- package/dist/esm/index.js +77 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/types/components/ActionMenuItem/index.d.ts +1 -5
- package/dist/types/components/MultiMenuItem/index.d.ts +1 -5
- package/dist/types/components/Section/index.d.ts +1 -5
- package/dist/types/components/Separator/index.d.ts +1 -5
- package/dist/types/components/SingleMenuItem/index.d.ts +1 -5
- package/dist/types/components/SingleWithSubmenuItem/index.d.ts +1 -5
- package/dist/types/components/SkeletonMenuItem/index.d.ts +1 -4
- package/dist/types/components/SubmenuItem/index.d.ts +1 -5
- package/dist/types/components/index.d.ts +8 -8
- package/dist/types/exported-related/index.d.ts +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +11 -12
- package/dist/cjs/TempTreeviewItem.js +0 -133
- package/dist/cjs/TempTreeviewItem.js.map +0 -7
- package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -87
- package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/getChevronHandlers.js +0 -72
- package/dist/cjs/components/SubmenuItem/getChevronHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js +0 -64
- package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js +0 -46
- package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/cjs/components/styled.js +0 -192
- package/dist/cjs/components/styled.js.map +0 -7
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js +0 -42
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js.map +0 -7
- package/dist/cjs/exported-related/constants.js +0 -51
- package/dist/cjs/exported-related/constants.js.map +0 -7
- package/dist/cjs/react-desc-prop-types.js +0 -169
- package/dist/cjs/react-desc-prop-types.js.map +0 -7
- package/dist/esm/TempTreeviewItem.js +0 -103
- package/dist/esm/TempTreeviewItem.js.map +0 -7
- package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -57
- package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/getChevronHandlers.js +0 -42
- package/dist/esm/components/SubmenuItem/getChevronHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js +0 -34
- package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js +0 -16
- package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/esm/components/styled.js +0 -162
- package/dist/esm/components/styled.js.map +0 -7
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js +0 -12
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js.map +0 -7
- package/dist/esm/exported-related/constants.js +0 -21
- package/dist/esm/exported-related/constants.js.map +0 -7
- package/dist/esm/react-desc-prop-types.js +0 -139
- package/dist/esm/react-desc-prop-types.js.map +0 -7
- package/dist/types/TempTreeviewItem.d.ts +0 -16
- package/dist/types/components/SingleWithSubmenuItem/useGetSubmenuHandlers.d.ts +0 -7
- package/dist/types/components/SubmenuItem/getChevronHandlers.d.ts +0 -7
- package/dist/types/components/SubmenuItem/getEllipsisHandlers.d.ts +0 -8
- package/dist/types/components/SubmenuItem/useGetSubmenuHandlers.d.ts +0 -8
- package/dist/types/components/styled.d.ts +0 -22
- package/dist/types/components/useGetGlobalsAndXStyledProps.d.ts +0 -5
- package/dist/types/exported-related/constants.d.ts +0 -15
- package/dist/types/react-desc-prop-types.d.ts +0 -106
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useRef, useCallback } from "react";
|
|
3
|
-
const useGetSubmenuHandlers = ({
|
|
4
|
-
disabled,
|
|
5
|
-
rightAddon,
|
|
6
|
-
isSubmenuOpened,
|
|
7
|
-
onMouseEnter,
|
|
8
|
-
onSubmenuOpen,
|
|
9
|
-
onSubmenuClose,
|
|
10
|
-
onMouseLeave
|
|
11
|
-
}) => {
|
|
12
|
-
const timeoutRef = useRef(null);
|
|
13
|
-
const onMouseEnterHandler = useCallback(
|
|
14
|
-
(e) => {
|
|
15
|
-
if (rightAddon !== "ellipsis") {
|
|
16
|
-
if (timeoutRef.current !== null)
|
|
17
|
-
clearTimeout(timeoutRef.current);
|
|
18
|
-
else if (!isSubmenuOpened)
|
|
19
|
-
onSubmenuOpen(e);
|
|
20
|
-
timeoutRef.current = null;
|
|
21
|
-
}
|
|
22
|
-
onMouseEnter(e);
|
|
23
|
-
},
|
|
24
|
-
[isSubmenuOpened, onMouseEnter, onSubmenuOpen, rightAddon]
|
|
25
|
-
);
|
|
26
|
-
const onMouseLeaveHandler = useCallback(
|
|
27
|
-
(e) => {
|
|
28
|
-
if (rightAddon !== "ellipsis") {
|
|
29
|
-
if (timeoutRef.current === null) {
|
|
30
|
-
timeoutRef.current = setTimeout(() => {
|
|
31
|
-
timeoutRef.current = null;
|
|
32
|
-
onSubmenuClose(e);
|
|
33
|
-
}, 300);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
onMouseLeave(e);
|
|
37
|
-
},
|
|
38
|
-
[onMouseLeave, onSubmenuClose, rightAddon]
|
|
39
|
-
);
|
|
40
|
-
const onEllipsisClick = useCallback(
|
|
41
|
-
(e) => {
|
|
42
|
-
if (disabled)
|
|
43
|
-
return;
|
|
44
|
-
e.stopPropagation();
|
|
45
|
-
if (isSubmenuOpened)
|
|
46
|
-
onSubmenuClose(e);
|
|
47
|
-
else
|
|
48
|
-
onSubmenuOpen(e);
|
|
49
|
-
},
|
|
50
|
-
[disabled, isSubmenuOpened, onSubmenuClose, onSubmenuOpen]
|
|
51
|
-
);
|
|
52
|
-
return { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick };
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
useGetSubmenuHandlers
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=useGetSubmenuHandlers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SingleWithSubmenuItem/useGetSubmenuHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useCallback } from 'react';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\n\nexport const useGetSubmenuHandlers = ({\n disabled,\n rightAddon,\n isSubmenuOpened,\n onMouseEnter,\n onSubmenuOpen,\n onSubmenuClose,\n onMouseLeave,\n}: Required<DSMenuItemT.SingleWithSubmenuProps>) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const onMouseEnterHandler = useCallback(\n (e: React.MouseEvent) => {\n if (rightAddon !== 'ellipsis') {\n if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);\n else if (!isSubmenuOpened) onSubmenuOpen(e);\n timeoutRef.current = null;\n }\n onMouseEnter(e);\n },\n [isSubmenuOpened, onMouseEnter, onSubmenuOpen, rightAddon],\n );\n\n const onMouseLeaveHandler = useCallback(\n (e: React.MouseEvent) => {\n if (rightAddon !== 'ellipsis') {\n if (timeoutRef.current === null) {\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null;\n onSubmenuClose(e);\n }, 300);\n }\n }\n onMouseLeave(e);\n },\n [onMouseLeave, onSubmenuClose, rightAddon],\n );\n\n const onEllipsisClick: React.MouseEventHandler = useCallback(\n (e) => {\n if (disabled) return;\n e.stopPropagation();\n if (isSubmenuOpened) onSubmenuClose(e);\n else onSubmenuOpen(e);\n },\n [disabled, isSubmenuOpened, onSubmenuClose, onSubmenuOpen],\n );\n\n return { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,mBAAmB;AAG7B,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAoD;AAClD,QAAM,aAAa,OAA8B,IAAI;AAErD,QAAM,sBAAsB;AAAA,IAC1B,CAAC,MAAwB;AACvB,UAAI,eAAe,YAAY;AAC7B,YAAI,WAAW,YAAY;AAAM,uBAAa,WAAW,OAAO;AAAA,iBACvD,CAAC;AAAiB,wBAAc,CAAC;AAC1C,mBAAW,UAAU;AAAA,MACvB;AACA,mBAAa,CAAC;AAAA,IAChB;AAAA,IACA,CAAC,iBAAiB,cAAc,eAAe,UAAU;AAAA,EAC3D;AAEA,QAAM,sBAAsB;AAAA,IAC1B,CAAC,MAAwB;AACvB,UAAI,eAAe,YAAY;AAC7B,YAAI,WAAW,YAAY,MAAM;AAC/B,qBAAW,UAAU,WAAW,MAAM;AACpC,uBAAW,UAAU;AACrB,2BAAe,CAAC;AAAA,UAClB,GAAG,GAAG;AAAA,QACR;AAAA,MACF;AACA,mBAAa,CAAC;AAAA,IAChB;AAAA,IACA,CAAC,cAAc,gBAAgB,UAAU;AAAA,EAC3C;AAEA,QAAM,kBAA2C;AAAA,IAC/C,CAAC,MAAM;AACL,UAAI;AAAU;AACd,QAAE,gBAAgB;AAClB,UAAI;AAAiB,uBAAe,CAAC;AAAA;AAChC,sBAAc,CAAC;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,iBAAiB,gBAAgB,aAAa;AAAA,EAC3D;AAEA,SAAO,EAAE,qBAAqB,qBAAqB,gBAAgB;AACrE;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const getChevronHandlers = ({
|
|
3
|
-
isSubmenuOpened,
|
|
4
|
-
onMouseEnter,
|
|
5
|
-
onSubmenuOpen,
|
|
6
|
-
onSubmenuClose,
|
|
7
|
-
onMouseLeave,
|
|
8
|
-
onMouseDown,
|
|
9
|
-
disabled
|
|
10
|
-
}) => {
|
|
11
|
-
const timeoutRef = { current: null };
|
|
12
|
-
const onMouseEnterHandler = (e) => {
|
|
13
|
-
if (timeoutRef.current !== null)
|
|
14
|
-
clearTimeout(timeoutRef.current);
|
|
15
|
-
else if (!isSubmenuOpened)
|
|
16
|
-
onSubmenuOpen?.(e);
|
|
17
|
-
timeoutRef.current = null;
|
|
18
|
-
onMouseEnter?.(e);
|
|
19
|
-
};
|
|
20
|
-
const onMouseLeaveHandler = (e) => {
|
|
21
|
-
if (timeoutRef.current === null) {
|
|
22
|
-
timeoutRef.current = setTimeout(() => {
|
|
23
|
-
timeoutRef.current = null;
|
|
24
|
-
onSubmenuClose?.(e);
|
|
25
|
-
}, 300);
|
|
26
|
-
}
|
|
27
|
-
onMouseLeave?.(e);
|
|
28
|
-
};
|
|
29
|
-
const onMouseDownHandler = (e) => {
|
|
30
|
-
if (disabled)
|
|
31
|
-
return;
|
|
32
|
-
onMouseDown?.(e);
|
|
33
|
-
};
|
|
34
|
-
const onEllipsisClick = () => {
|
|
35
|
-
throw new Error("Invoking onEllipsisClick from chevron handlers... this should never happen");
|
|
36
|
-
};
|
|
37
|
-
return { onMouseEnterHandler, onMouseLeaveHandler, onMouseDownHandler, onEllipsisClick };
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
getChevronHandlers
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=getChevronHandlers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SubmenuItem/getChevronHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSMenuItemT } from '../../react-desc-prop-types.js';\n\n// what we are trying to do:\n// onMouseEnter -> open submenu\n// onMouseLeave -> close submenu\n// onEllipsisClick -> we should not even invoke this handler, as the \"ellipsis\" should not even exist?\n\n// what are the \"challenges\" of the task:\n// - the submenu close has an animation and we ideally want to be sure state changes after the animation is done\n// (we do it via an hardcoded 300ms delay, this is know to cause issues in some cases)\n// - \"what is open and what is closed\" state lives under ds-dropdownmenu,\n// we manipulate it via \"onSubmenuOpen\" and \"onSubmenuClose\" callbacks\n// - we have created the API in such a way that we implement a \"bridge\" and \"inversion of control\" pattern\n// this requires extra care when handling the logic and designing the solution\n\n// important and relevant info:\n// when this comment has been written,\n// onSubmenuOpen coming from SingleWithSubmenuProps is forcing only one submenu to be open at a time internally\n// the logic for this is implemented in ds-dropdownmenu,\n// we had a bug in which we were invoking a stale callback,\n// we monkeypatching it by ensuring the callback never changes\n// in the future we should create code with \"hydraters\" to avoid this as per shuttle-v2\n\nexport const getChevronHandlers = ({\n isSubmenuOpened,\n onMouseEnter,\n onSubmenuOpen,\n onSubmenuClose,\n onMouseLeave,\n onMouseDown,\n disabled,\n}: Required<DSMenuItemT.SubmenuProps>) => {\n const timeoutRef: { current: NodeJS.Timeout | null } = { current: null };\n\n const onMouseEnterHandler = (e: React.MouseEvent) => {\n if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);\n else if (!isSubmenuOpened) onSubmenuOpen?.(e);\n timeoutRef.current = null;\n onMouseEnter?.(e);\n };\n\n const onMouseLeaveHandler = (e: React.MouseEvent) => {\n if (timeoutRef.current === null) {\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null;\n onSubmenuClose?.(e);\n }, 300);\n }\n onMouseLeave?.(e);\n };\n\n const onMouseDownHandler = (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n };\n\n const onEllipsisClick = () => {\n throw new Error('Invoking onEllipsisClick from chevron handlers... this should never happen');\n };\n\n return { onMouseEnterHandler, onMouseLeaveHandler, onMouseDownHandler, onEllipsisClick };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACuBhB,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA0C;AACxC,QAAM,aAAiD,EAAE,SAAS,KAAK;AAEvE,QAAM,sBAAsB,CAAC,MAAwB;AACnD,QAAI,WAAW,YAAY;AAAM,mBAAa,WAAW,OAAO;AAAA,aACvD,CAAC;AAAiB,sBAAgB,CAAC;AAC5C,eAAW,UAAU;AACrB,mBAAe,CAAC;AAAA,EAClB;AAEA,QAAM,sBAAsB,CAAC,MAAwB;AACnD,QAAI,WAAW,YAAY,MAAM;AAC/B,iBAAW,UAAU,WAAW,MAAM;AACpC,mBAAW,UAAU;AACrB,yBAAiB,CAAC;AAAA,MACpB,GAAG,GAAG;AAAA,IACR;AACA,mBAAe,CAAC;AAAA,EAClB;AAEA,QAAM,qBAAqB,CAAC,MAAwB;AAClD,QAAI;AAAU;AACd,kBAAc,CAAC;AAAA,EACjB;AAEA,QAAM,kBAAkB,MAAM;AAC5B,UAAM,IAAI,MAAM,4EAA4E;AAAA,EAC9F;AAEA,SAAO,EAAE,qBAAqB,qBAAqB,oBAAoB,gBAAgB;AACzF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const getEllipsisHandlers = ({
|
|
3
|
-
disabled,
|
|
4
|
-
isSubmenuOpened,
|
|
5
|
-
onMouseEnter,
|
|
6
|
-
onSubmenuOpen,
|
|
7
|
-
onSubmenuClose,
|
|
8
|
-
onMouseLeave,
|
|
9
|
-
onMouseDown
|
|
10
|
-
}) => {
|
|
11
|
-
const onMouseEnterHandler = (e) => onMouseEnter?.(e);
|
|
12
|
-
const onMouseLeaveHandler = (e) => onMouseLeave?.(e);
|
|
13
|
-
const onMouseDownHandler = (e) => {
|
|
14
|
-
if (disabled) {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
onMouseDown?.(e);
|
|
19
|
-
};
|
|
20
|
-
const onEllipsisClick = (e) => {
|
|
21
|
-
if (disabled)
|
|
22
|
-
return;
|
|
23
|
-
e.stopPropagation();
|
|
24
|
-
if (isSubmenuOpened)
|
|
25
|
-
onSubmenuClose(e);
|
|
26
|
-
else
|
|
27
|
-
onSubmenuOpen(e);
|
|
28
|
-
};
|
|
29
|
-
return { onMouseEnterHandler, onMouseLeaveHandler, onMouseDownHandler, onEllipsisClick };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
getEllipsisHandlers
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=getEllipsisHandlers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SubmenuItem/getEllipsisHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSMenuItemT } from '../../react-desc-prop-types.js';\n\n// what we are trying to do:\n// onMouseEnter -> be transparently \"doing nothing\" as hover does nothing by design for \"ellipsis\"\n// onMouseLeave -> be transparently \"doing nothing\" as hover does nothing by design for \"ellipsis\"\n// onEllipsisClick -> toggle the submenu open/close as per design\n\n// what are the \"challenges\" of the task:\n// - we have created the API in such a way that we implement a \"bridge\" and \"inversion of control\" pattern\n// this requires extra care when handling the logic and designing the solution\n\nexport const getEllipsisHandlers = ({\n disabled,\n isSubmenuOpened,\n onMouseEnter,\n onSubmenuOpen,\n onSubmenuClose,\n onMouseLeave,\n onMouseDown,\n}: Required<DSMenuItemT.SubmenuProps>) => {\n // why not just onMouseEnterHandler = onMouseEnter?\n // we expect onMouseEnterHandler/onMouseLeaveHandler\n // to always exist even if onMouseEnter/onMouseLeave are undefined\n // also, if in the future we need custom logic for these handlers, we can add it here\n const onMouseEnterHandler: React.MouseEventHandler = (e) => onMouseEnter?.(e);\n const onMouseLeaveHandler: React.MouseEventHandler = (e) => onMouseLeave?.(e);\n const onMouseDownHandler: React.MouseEventHandler = (e) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n onMouseDown?.(e);\n };\n const onEllipsisClick: React.MouseEventHandler = (e) => {\n if (disabled) return;\n e.stopPropagation();\n if (isSubmenuOpened) onSubmenuClose(e);\n else onSubmenuOpen(e);\n };\n\n return { onMouseEnterHandler, onMouseLeaveHandler, onMouseDownHandler, onEllipsisClick };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACWhB,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA0C;AAKxC,QAAM,sBAA+C,CAAC,MAAM,eAAe,CAAC;AAC5E,QAAM,sBAA+C,CAAC,MAAM,eAAe,CAAC;AAC5E,QAAM,qBAA8C,CAAC,MAAM;AACzD,QAAI,UAAU;AACZ,QAAE,eAAe;AACjB;AAAA,IACF;AACA,kBAAc,CAAC;AAAA,EACjB;AACA,QAAM,kBAA2C,CAAC,MAAM;AACtD,QAAI;AAAU;AACd,MAAE,gBAAgB;AAClB,QAAI;AAAiB,qBAAe,CAAC;AAAA;AAChC,oBAAc,CAAC;AAAA,EACtB;AAEA,SAAO,EAAE,qBAAqB,qBAAqB,oBAAoB,gBAAgB;AACzF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { getEllipsisHandlers } from "./getEllipsisHandlers.js";
|
|
4
|
-
import { getChevronHandlers } from "./getChevronHandlers.js";
|
|
5
|
-
const useGetSubmenuHandlers = (submenuProps) => {
|
|
6
|
-
const { rightAddon } = submenuProps;
|
|
7
|
-
return useMemo(() => {
|
|
8
|
-
if (rightAddon === "ellipsis")
|
|
9
|
-
return getEllipsisHandlers(submenuProps);
|
|
10
|
-
return getChevronHandlers(submenuProps);
|
|
11
|
-
}, [submenuProps, rightAddon]);
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
useGetSubmenuHandlers
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=useGetSubmenuHandlers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SubmenuItem/useGetSubmenuHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { getEllipsisHandlers } from './getEllipsisHandlers.js';\nimport { getChevronHandlers } from './getChevronHandlers.js';\n\n// what we are trying to do:\n// Ellipsis case:\n// onMouseEnter -> open submenu\n// onMouseLeave -> close submenu\n// onEllipsisClick -> we should not even invoke this handler, as the \"ellipsis\" should not even exist?\n// Chevron case:\n// onMouseEnter -> be transparently \"doing nothing\" as hover does nothing by design for \"ellipsis\"\n// onMouseLeave -> be transparently \"doing nothing\" as hover does nothing by design for \"ellipsis\"\n// onEllipsisClick -> toggle the submenu open/close as per design\n\n// what are the \"challenges\" of the task:\n// - we have chosen to abstract multiple possible logical \"flows\" into the same layer for some reason\n// specifically speaking this is trying to solve the\n// \"rightAddons\" is \"ellipsis\" case\n// at the same time as the\n// \"rightAddons\" is \"chevron\" case\n// they have more differences than similarities, so this is messy\n\n// @yuri since I'm both lazy and stupid, I want my code to be as stupid simple as me\n// I am removing one layer of abstraction,\n// ellipsis gets it's own logical flow\n// as does chevron\n// if you are a DRY advocate, you will probably hate me for this, I'm all for AHA (Avoid Hasty Abstractions).\nexport const useGetSubmenuHandlers = (submenuProps: Required<DSMenuItemT.SubmenuProps>) => {\n const { rightAddon } = submenuProps;\n return useMemo(() => {\n if (rightAddon === 'ellipsis') return getEllipsisHandlers(submenuProps);\n return getChevronHandlers(submenuProps);\n }, [submenuProps, rightAddon]);\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAExB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAyB5B,MAAM,wBAAwB,CAAC,iBAAqD;AACzF,QAAM,EAAE,WAAW,IAAI;AACvB,SAAO,QAAQ,MAAM;AACnB,QAAI,eAAe;AAAY,aAAO,oBAAoB,YAAY;AACtE,WAAO,mBAAmB,YAAY;AAAA,EACxC,GAAG,CAAC,cAAc,UAAU,CAAC;AAC/B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { styled, css, xStyledCommonProps } from "@elliemae/ds-system";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { DSMenuItemName, DSMenuItemSlots } from "../exported-related/index.js";
|
|
5
|
-
const borderOutside = () => css`
|
|
6
|
-
:after {
|
|
7
|
-
display: block;
|
|
8
|
-
content: ' ';
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
right: 0;
|
|
13
|
-
bottom: 0;
|
|
14
|
-
border: 1px solid ${({ theme }) => theme.colors.brand[500]};
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
z-index: 7;
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
const disabledOption = () => css`
|
|
20
|
-
color: ${({ theme }) => theme.colors.neutral[500]};
|
|
21
|
-
background-color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
22
|
-
cursor: not-allowed;
|
|
23
|
-
* {
|
|
24
|
-
cursor: not-allowed;
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
const StyledGlobalMenuItemWrapper = styled("li", {
|
|
28
|
-
name: DSMenuItemName,
|
|
29
|
-
slot: DSMenuItemSlots.MENU_ITEM_WRAPPER
|
|
30
|
-
})`
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
min-height: 32px;
|
|
33
|
-
|
|
34
|
-
padding-left: 16px;
|
|
35
|
-
padding-right: 16px;
|
|
36
|
-
display: grid;
|
|
37
|
-
align-items: center;
|
|
38
|
-
list-style: none;
|
|
39
|
-
position: relative;
|
|
40
|
-
|
|
41
|
-
${(props) => {
|
|
42
|
-
if (props.disabled)
|
|
43
|
-
return disabledOption();
|
|
44
|
-
if (props.isActive)
|
|
45
|
-
return borderOutside();
|
|
46
|
-
return "";
|
|
47
|
-
}};
|
|
48
|
-
|
|
49
|
-
background-color: ${(props) => props.isActive ? props.theme.colors.brand[200] : props.theme.colors.neutral["000"]};
|
|
50
|
-
|
|
51
|
-
// focus style for standalone version
|
|
52
|
-
&:focus {
|
|
53
|
-
${(props) => {
|
|
54
|
-
if (props.disabled)
|
|
55
|
-
return disabledOption();
|
|
56
|
-
return borderOutside();
|
|
57
|
-
}};
|
|
58
|
-
outline: none;
|
|
59
|
-
background-color: ${(props) => !props.disabled ? props.theme.colors.brand[200] : props.theme.colors.neutral["000"]};
|
|
60
|
-
}
|
|
61
|
-
&:hover {
|
|
62
|
-
background-color: ${(props) => !props.disabled && props.theme.colors.brand[200]};
|
|
63
|
-
}
|
|
64
|
-
${xStyledCommonProps}
|
|
65
|
-
`;
|
|
66
|
-
const StyleMenuItemLabel = styled("span", { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_LABEL })`
|
|
67
|
-
padding: 8px 0;
|
|
68
|
-
font-size: 13px;
|
|
69
|
-
`;
|
|
70
|
-
const StyleMenuItemSecondaryLabel = styled("span", {
|
|
71
|
-
name: DSMenuItemName,
|
|
72
|
-
slot: DSMenuItemSlots.MENU_ITEM_SECONDARY_LABEL
|
|
73
|
-
})`
|
|
74
|
-
padding: 8px 0;
|
|
75
|
-
font-size: 11px;
|
|
76
|
-
font-style: italic;
|
|
77
|
-
color: brand-800;
|
|
78
|
-
`;
|
|
79
|
-
const StyledIconContainer = styled("div", { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_ICON })`
|
|
80
|
-
width: 25px;
|
|
81
|
-
height: 24px;
|
|
82
|
-
display: grid;
|
|
83
|
-
grid-template-columns: min-content auto;
|
|
84
|
-
place-items: center;
|
|
85
|
-
`;
|
|
86
|
-
const StyledEllipsisButton = styled("div", {
|
|
87
|
-
name: DSMenuItemName,
|
|
88
|
-
slot: DSMenuItemSlots.MENU_ITEM_ELLIPSIS_BUTTON
|
|
89
|
-
})`
|
|
90
|
-
position: relative;
|
|
91
|
-
width: 100%;
|
|
92
|
-
height: 100%;
|
|
93
|
-
display: grid;
|
|
94
|
-
place-items: center;
|
|
95
|
-
background: transparent;
|
|
96
|
-
:active {
|
|
97
|
-
${(props) => props.disabled ? "" : borderOutside()}
|
|
98
|
-
}
|
|
99
|
-
`;
|
|
100
|
-
const StyledItemContent = styled("div", { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_CONTENT })`
|
|
101
|
-
display: flex;
|
|
102
|
-
width: 100%;
|
|
103
|
-
margin: 8px 0px;
|
|
104
|
-
`;
|
|
105
|
-
const StyledSeparator = styled("hr", { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR })`
|
|
106
|
-
border: 0;
|
|
107
|
-
border-top: 1px solid #697489;
|
|
108
|
-
margin: 4px 0px;
|
|
109
|
-
padding: 0;
|
|
110
|
-
`;
|
|
111
|
-
const StyledSeparatorWrapper = styled("li", {
|
|
112
|
-
name: DSMenuItemName,
|
|
113
|
-
slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR_WRAPPER
|
|
114
|
-
})`
|
|
115
|
-
list-style: none;
|
|
116
|
-
padding: 0px 16px;
|
|
117
|
-
|
|
118
|
-
${xStyledCommonProps}
|
|
119
|
-
`;
|
|
120
|
-
const StyledGroupLabel = styled("span", { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_GROUP_LABEL })`
|
|
121
|
-
font-size: 13px;
|
|
122
|
-
color: neutral-500;
|
|
123
|
-
`;
|
|
124
|
-
const StyledSectionWrapper = styled("li", {
|
|
125
|
-
name: DSMenuItemName,
|
|
126
|
-
slot: DSMenuItemSlots.MENU_ITEM_SECTION_WRAPPER
|
|
127
|
-
})`
|
|
128
|
-
list-style: none;
|
|
129
|
-
padding: 0px 16px;
|
|
130
|
-
height: 24px;
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
|
|
134
|
-
${xStyledCommonProps}
|
|
135
|
-
`;
|
|
136
|
-
const StyledVerticalSeparator = styled("div", {
|
|
137
|
-
name: DSMenuItemName,
|
|
138
|
-
slot: DSMenuItemSlots.MENU_ITEM_VERTICAL_SEPARATOR
|
|
139
|
-
})`
|
|
140
|
-
width: 1px;
|
|
141
|
-
height: 18px;
|
|
142
|
-
background-color: neutral-300;
|
|
143
|
-
`;
|
|
144
|
-
const StyledContentWrapper = styled(Grid, {
|
|
145
|
-
name: DSMenuItemName,
|
|
146
|
-
slot: DSMenuItemSlots.MENU_ITEM_CONTENT_WRAPPER
|
|
147
|
-
})``;
|
|
148
|
-
export {
|
|
149
|
-
StyleMenuItemLabel,
|
|
150
|
-
StyleMenuItemSecondaryLabel,
|
|
151
|
-
StyledContentWrapper,
|
|
152
|
-
StyledEllipsisButton,
|
|
153
|
-
StyledGlobalMenuItemWrapper,
|
|
154
|
-
StyledGroupLabel,
|
|
155
|
-
StyledIconContainer,
|
|
156
|
-
StyledItemContent,
|
|
157
|
-
StyledSectionWrapper,
|
|
158
|
-
StyledSeparator,
|
|
159
|
-
StyledSeparatorWrapper,
|
|
160
|
-
StyledVerticalSeparator
|
|
161
|
-
};
|
|
162
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { LayoutProps, SizingProps, PositionProps, SpaceProps } from '@elliemae/ds-system';\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSMenuItemName, DSMenuItemSlots } from '../exported-related/index.js';\n\nconst borderOutside = () => css`\n :after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid ${({ theme }) => theme.colors.brand[500]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nconst disabledOption = () => css`\n color: ${({ theme }) => theme.colors.neutral[500]};\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n`;\n\ninterface StyledGlobalMenuItemWrapperT extends LayoutProps, SizingProps, PositionProps, SpaceProps {\n isSelected?: boolean;\n isActive?: boolean;\n disabled?: boolean;\n}\n\nexport const StyledGlobalMenuItemWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_WRAPPER,\n})<StyledGlobalMenuItemWrapperT>`\n cursor: pointer;\n min-height: 32px;\n\n padding-left: 16px;\n padding-right: 16px;\n display: grid;\n align-items: center;\n list-style: none;\n position: relative;\n\n ${(props) => {\n if (props.disabled) return disabledOption();\n if (props.isActive) return borderOutside();\n return '';\n }};\n\n background-color: ${(props) => (props.isActive ? props.theme.colors.brand[200] : props.theme.colors.neutral['000'])};\n\n // focus style for standalone version\n &:focus {\n ${(props) => {\n if (props.disabled) return disabledOption();\n return borderOutside();\n }};\n outline: none;\n background-color: ${(props) =>\n !props.disabled ? props.theme.colors.brand[200] : props.theme.colors.neutral['000']};\n }\n &:hover {\n background-color: ${(props) => !props.disabled && props.theme.colors.brand[200]};\n }\n ${xStyledCommonProps}\n`;\n\nexport const StyleMenuItemLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_LABEL })`\n padding: 8px 0;\n font-size: 13px;\n`;\n\nexport const StyleMenuItemSecondaryLabel = styled('span', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECONDARY_LABEL,\n})`\n padding: 8px 0;\n font-size: 11px;\n font-style: italic;\n color: brand-800;\n`;\n\nexport const StyledIconContainer = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_ICON })`\n width: 25px;\n height: 24px;\n display: grid;\n grid-template-columns: min-content auto;\n place-items: center;\n`;\n\nexport const StyledEllipsisButton = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_ELLIPSIS_BUTTON,\n})<{ disabled: boolean }>`\n position: relative;\n width: 100%;\n height: 100%;\n display: grid;\n place-items: center;\n background: transparent;\n :active {\n ${(props) => (props.disabled ? '' : borderOutside())}\n }\n`;\n\nexport const StyledItemContent = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_CONTENT })`\n display: flex;\n width: 100%;\n margin: 8px 0px;\n`;\n\nexport const StyledSeparator = styled('hr', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR })`\n border: 0;\n border-top: 1px solid #697489;\n margin: 4px 0px;\n padding: 0;\n`;\n\nexport const StyledSeparatorWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledGroupLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_GROUP_LABEL })`\n font-size: 13px;\n color: neutral-500;\n`;\n\nexport const StyledSectionWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECTION_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n height: 24px;\n display: flex;\n align-items: center;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledVerticalSeparator = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_VERTICAL_SEPARATOR,\n})`\n width: 1px;\n height: 18px;\n background-color: neutral-300;\n`;\n\nexport const StyledContentWrapper = styled(Grid, {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_CONTENT_WRAPPER,\n})``;\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useGetGlobalAttributes, useGetXstyledProps } from "@elliemae/ds-props-helpers";
|
|
3
|
-
const useGetGlobalsAndXStyledProps = (props, toMergeEvents) => {
|
|
4
|
-
const sourceGlobalProps = props.original ?? props;
|
|
5
|
-
const globalAttributes = useGetGlobalAttributes(sourceGlobalProps, toMergeEvents);
|
|
6
|
-
const xStyledProps = useGetXstyledProps(sourceGlobalProps);
|
|
7
|
-
return { globalAttributes, xStyledProps };
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
useGetGlobalsAndXStyledProps
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=useGetGlobalsAndXStyledProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/useGetGlobalsAndXStyledProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../react-desc-prop-types.js';\n\nexport const useGetGlobalsAndXStyledProps = (\n props: DSMenuItemT.AllTypeItems,\n toMergeEvents?: Record<string, unknown>,\n) => {\n const sourceGlobalProps = props.original ?? props;\n\n const globalAttributes = useGetGlobalAttributes(sourceGlobalProps, toMergeEvents);\n const xStyledProps = useGetXstyledProps(sourceGlobalProps);\n\n return { globalAttributes, xStyledProps };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB,0BAA0B;AAGpD,MAAM,+BAA+B,CAC1C,OACA,kBACG;AACH,QAAM,oBAAoB,MAAM,YAAY;AAE5C,QAAM,mBAAmB,uBAAuB,mBAAmB,aAAa;AAChF,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,SAAO,EAAE,kBAAkB,aAAa;AAC1C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const DSMenuItemName = "DSMenuItem";
|
|
3
|
-
const DSMenuItemSlots = {
|
|
4
|
-
MENU_ITEM_WRAPPER: "menu-item-wrapper",
|
|
5
|
-
MENU_ITEM_LABEL: "menu-item-label",
|
|
6
|
-
MENU_ITEM_SECONDARY_LABEL: "menu-item-secondary-label",
|
|
7
|
-
MENU_ITEM_ICON: "menu-item-icon",
|
|
8
|
-
MENU_ITEM_ELLIPSIS_BUTTON: "menu-item-ellipsis-button",
|
|
9
|
-
MENU_ITEM_CONTENT: "menu-item-content",
|
|
10
|
-
MENU_ITEM_SEPARATOR: "menu-item-separator",
|
|
11
|
-
MENU_ITEM_SEPARATOR_WRAPPER: "menu-item-separator-wrapper",
|
|
12
|
-
MENU_ITEM_GROUP_LABEL: "menu-item-group-label",
|
|
13
|
-
MENU_ITEM_SECTION_WRAPPER: "menu-item-section-wrapper",
|
|
14
|
-
MENU_ITEM_VERTICAL_SEPARATOR: "menu-item-vertical-separator",
|
|
15
|
-
MENU_ITEM_CONTENT_WRAPPER: "menu-item-content-wrapper"
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
DSMenuItemName,
|
|
19
|
-
DSMenuItemSlots
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSMenuItemName = 'DSMenuItem';\n\nexport const DSMenuItemSlots = {\n MENU_ITEM_WRAPPER: 'menu-item-wrapper',\n MENU_ITEM_LABEL: 'menu-item-label',\n MENU_ITEM_SECONDARY_LABEL: 'menu-item-secondary-label',\n MENU_ITEM_ICON: 'menu-item-icon',\n MENU_ITEM_ELLIPSIS_BUTTON: 'menu-item-ellipsis-button',\n MENU_ITEM_CONTENT: 'menu-item-content',\n MENU_ITEM_SEPARATOR: 'menu-item-separator',\n MENU_ITEM_SEPARATOR_WRAPPER: 'menu-item-separator-wrapper',\n MENU_ITEM_GROUP_LABEL: 'menu-item-group-label',\n MENU_ITEM_SECTION_WRAPPER: 'menu-item-section-wrapper',\n MENU_ITEM_VERTICAL_SEPARATOR: 'menu-item-vertical-separator',\n MENU_ITEM_CONTENT_WRAPPER: 'menu-item-content-wrapper',\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,2BAA2B;AAAA,EAC3B,gBAAgB;AAAA,EAChB,2BAA2B;AAAA,EAC3B,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,8BAA8B;AAAA,EAC9B,2BAA2B;AAC7B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
-
const noop = () => null;
|
|
4
|
-
const defaultCommonProps = {
|
|
5
|
-
innerRef: noop,
|
|
6
|
-
wrapperStyles: {}
|
|
7
|
-
};
|
|
8
|
-
const defaultActionProps = {
|
|
9
|
-
...defaultCommonProps,
|
|
10
|
-
label: "",
|
|
11
|
-
value: void 0,
|
|
12
|
-
disabled: false,
|
|
13
|
-
isActive: false,
|
|
14
|
-
onClick: noop,
|
|
15
|
-
optionsShouldHavePadding: false,
|
|
16
|
-
tabIndex: 0
|
|
17
|
-
};
|
|
18
|
-
const defaultMultiProps = {
|
|
19
|
-
...defaultCommonProps,
|
|
20
|
-
label: "",
|
|
21
|
-
isActive: false,
|
|
22
|
-
disabled: false,
|
|
23
|
-
isSelected: false,
|
|
24
|
-
onClick: noop,
|
|
25
|
-
onMouseDown: noop,
|
|
26
|
-
onMouseEnter: noop,
|
|
27
|
-
onMouseLeave: noop,
|
|
28
|
-
tabIndex: 0
|
|
29
|
-
};
|
|
30
|
-
const defaultSingleProps = {
|
|
31
|
-
...defaultCommonProps,
|
|
32
|
-
label: "",
|
|
33
|
-
isActive: false,
|
|
34
|
-
disabled: false,
|
|
35
|
-
isSelected: false,
|
|
36
|
-
onClick: noop,
|
|
37
|
-
onMouseDown: noop,
|
|
38
|
-
onMouseEnter: noop,
|
|
39
|
-
onMouseLeave: noop,
|
|
40
|
-
dataTestid: "ds-menu-item",
|
|
41
|
-
tabIndex: 0
|
|
42
|
-
};
|
|
43
|
-
const defaultSubmenuProps = {
|
|
44
|
-
...defaultCommonProps,
|
|
45
|
-
label: "",
|
|
46
|
-
isActive: false,
|
|
47
|
-
disabled: false,
|
|
48
|
-
isSubmenuOpened: false,
|
|
49
|
-
onSubmenuOpen: noop,
|
|
50
|
-
rightAddon: "chevron",
|
|
51
|
-
optionsShouldHavePadding: false,
|
|
52
|
-
Dropdown: noop,
|
|
53
|
-
dropdownProps: {
|
|
54
|
-
options: [],
|
|
55
|
-
onSubmenuToggle: noop,
|
|
56
|
-
openedSubmenus: {},
|
|
57
|
-
selectedOptions: {},
|
|
58
|
-
onKeyDown: noop,
|
|
59
|
-
onOptionClick: noop,
|
|
60
|
-
onClickOutside: noop,
|
|
61
|
-
minWidth: "auto",
|
|
62
|
-
maxHeight: "auto"
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const defaultSectionProps = {
|
|
66
|
-
...defaultCommonProps,
|
|
67
|
-
label: ""
|
|
68
|
-
};
|
|
69
|
-
const defaultSeparatorProps = {
|
|
70
|
-
...defaultCommonProps
|
|
71
|
-
};
|
|
72
|
-
const defaultSingleWithSubmenuProps = {
|
|
73
|
-
...defaultSingleProps,
|
|
74
|
-
...defaultSubmenuProps
|
|
75
|
-
};
|
|
76
|
-
const itemProps = {
|
|
77
|
-
...globalAttributesPropTypes,
|
|
78
|
-
...xstyledPropTypes,
|
|
79
|
-
dsId: PropTypes.string,
|
|
80
|
-
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),
|
|
81
|
-
wrapperStyles: PropTypes.object,
|
|
82
|
-
render: PropTypes.func
|
|
83
|
-
};
|
|
84
|
-
const MenuItemPropTypes = {
|
|
85
|
-
dsId: PropTypes.string.description("The unique ID for the menu item.").isRequired,
|
|
86
|
-
innerRef: PropTypes.oneOfType([
|
|
87
|
-
PropTypes.shape({
|
|
88
|
-
current: PropTypes.node
|
|
89
|
-
}),
|
|
90
|
-
PropTypes.func.description(
|
|
91
|
-
" A ref object or callback function to access the underlying DOM element (HTMLLIElement) of the menu item."
|
|
92
|
-
)
|
|
93
|
-
]),
|
|
94
|
-
render: PropTypes.func.description("A custom render function to render the content of the menu item.")
|
|
95
|
-
};
|
|
96
|
-
const SingleMenuItemPropTypes = {
|
|
97
|
-
...MenuItemPropTypes,
|
|
98
|
-
label: PropTypes.string.description("The label of the menu item."),
|
|
99
|
-
secondaryLabel: PropTypes.string.description("The secondary label of the menu item."),
|
|
100
|
-
isActive: PropTypes.bool.description("Whether the menu item is active."),
|
|
101
|
-
disabled: PropTypes.bool.description("Whether the menu item is disabled."),
|
|
102
|
-
isSelected: PropTypes.bool.description("Whether the menu item is selected.")
|
|
103
|
-
};
|
|
104
|
-
const MultiMenuItemPropTypes = {
|
|
105
|
-
...MenuItemPropTypes,
|
|
106
|
-
label: PropTypes.string.description("The label of the menu item."),
|
|
107
|
-
secondaryLabel: PropTypes.string.description("The secondary label of the menu item."),
|
|
108
|
-
isActive: PropTypes.bool.description("Whether the menu item is active."),
|
|
109
|
-
disabled: PropTypes.bool.description("Whether the menu item is disabled."),
|
|
110
|
-
isSelected: PropTypes.bool.description("Whether the menu item is selected.")
|
|
111
|
-
};
|
|
112
|
-
const ActionMenuItemPropTypes = {
|
|
113
|
-
...MenuItemPropTypes,
|
|
114
|
-
label: PropTypes.string.description("The label of the menu item."),
|
|
115
|
-
value: PropTypes.any.description("The value of the menu item."),
|
|
116
|
-
disabled: PropTypes.bool.description("Whether the menu item is disabled."),
|
|
117
|
-
isActive: PropTypes.bool.description("Whether the menu item is active.")
|
|
118
|
-
};
|
|
119
|
-
const SectionMenuItemPropTypes = {
|
|
120
|
-
...MenuItemPropTypes,
|
|
121
|
-
label: PropTypes.string.description("The label of the menu item.")
|
|
122
|
-
};
|
|
123
|
-
export {
|
|
124
|
-
ActionMenuItemPropTypes,
|
|
125
|
-
MenuItemPropTypes,
|
|
126
|
-
MultiMenuItemPropTypes,
|
|
127
|
-
SectionMenuItemPropTypes,
|
|
128
|
-
SingleMenuItemPropTypes,
|
|
129
|
-
defaultActionProps,
|
|
130
|
-
defaultCommonProps,
|
|
131
|
-
defaultMultiProps,
|
|
132
|
-
defaultSectionProps,
|
|
133
|
-
defaultSeparatorProps,
|
|
134
|
-
defaultSingleProps,
|
|
135
|
-
defaultSingleWithSubmenuProps,
|
|
136
|
-
defaultSubmenuProps,
|
|
137
|
-
itemProps
|
|
138
|
-
};
|
|
139
|
-
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { PropsWithChildren, WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nexport namespace DSMenuItemT {\n export interface CommonProps<T = Record<string, unknown>> {\n dsId: string;\n innerRef?: React.RefObject<HTMLLIElement> | ((_ref: HTMLLIElement) => void);\n wrapperStyles?: Record<string, unknown>;\n render?: React.ComponentType<T>;\n original?: Record<string, unknown>;\n }\n\n export interface ActionProps extends CommonProps<ActionProps> {\n label?: string;\n secondaryLabel?: string;\n value?: unknown;\n disabled?: boolean;\n isActive?: boolean;\n onClick?: React.MouseEventHandler;\n optionsShouldHavePadding?: boolean;\n tabIndex: WCAGTabIndex;\n }\n\n export interface SkeletonProps extends CommonProps<ActionProps> {\n secondaryLabel?: string;\n isActive?: boolean;\n onClick?: React.MouseEventHandler;\n tabIndex?: WCAGTabIndex;\n }\n\n export interface MultiProps extends CommonProps<MultiProps> {\n label?: string;\n isActive?: boolean;\n disabled?: boolean;\n isSelected?: boolean;\n onClick?: React.MouseEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n onMouseDown?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n dataTestid?: string;\n tabIndex?: WCAGTabIndex;\n value?: unknown;\n }\n\n export interface SingleProps extends CommonProps<SingleProps> {\n label?: string;\n secondaryLabel?: string;\n isActive?: boolean;\n disabled?: boolean;\n isSelected?: boolean;\n onClick?: React.MouseEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n onMouseDown?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n dataTestid?: string;\n tabIndex?: number;\n value?: unknown;\n }\n\n export interface SubmenuProps extends CommonProps<SubmenuProps> {\n label?: string;\n secondaryLabel?: string;\n isActive?: boolean;\n disabled?: boolean;\n isSubmenuOpened?: boolean;\n onSubmenuOpen?: React.MouseEventHandler;\n onSubmenuClose?: React.MouseEventHandler;\n rightAddon?: 'ellipsis' | 'chevron';\n optionsShouldHavePadding?: boolean;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n onMouseDown?: React.MouseEventHandler;\n Dropdown: React.ComponentType<PropsWithChildren<SubmenuProps['dropdownProps']>>;\n dropdownProps?: {\n options: any[];\n onSubmenuToggle?: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: any,\n e: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n openedSubmenus?: Record<string, boolean>;\n selectedOptions?: Record<string, boolean>;\n onKeyDown?: React.KeyboardEventHandler;\n onOptionClick?: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: any,\n e: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n onClickOutside?: (e: MouseEvent | React.KeyboardEvent | TouchEvent) => void;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n [key: string]: unknown;\n };\n }\n\n export interface SectionProps extends CommonProps<SectionProps> {\n label?: string;\n }\n\n export type SeparatorProps = CommonProps<SeparatorProps>;\n\n export interface SingleWithSubmenuProps extends Omit<SingleProps, 'render'>, Omit<SubmenuProps, 'render'> {\n render?: React.ComponentType<SingleWithSubmenuProps>;\n }\n export type AllTypeItems = ActionProps | MultiProps | SingleProps | SubmenuProps | SectionProps | SeparatorProps;\n}\n\nconst noop = () => null;\n\nexport const defaultCommonProps: Partial<Omit<DSMenuItemT.CommonProps, 'render'>> = {\n innerRef: noop,\n wrapperStyles: {},\n};\n\nexport const defaultActionProps: Partial<DSMenuItemT.ActionProps> = {\n ...defaultCommonProps,\n label: '',\n value: undefined,\n disabled: false,\n isActive: false,\n onClick: noop,\n optionsShouldHavePadding: false,\n tabIndex: 0,\n};\n\nexport const defaultMultiProps: Partial<DSMenuItemT.MultiProps> = {\n ...defaultCommonProps,\n label: '',\n isActive: false,\n disabled: false,\n isSelected: false,\n onClick: noop,\n onMouseDown: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n tabIndex: 0,\n};\n\nexport const defaultSingleProps: Partial<DSMenuItemT.SingleProps> = {\n ...defaultCommonProps,\n label: '',\n isActive: false,\n disabled: false,\n isSelected: false,\n onClick: noop,\n onMouseDown: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n dataTestid: 'ds-menu-item',\n tabIndex: 0,\n};\n\nexport const defaultSubmenuProps: Partial<DSMenuItemT.SubmenuProps> = {\n ...defaultCommonProps,\n label: '',\n isActive: false,\n disabled: false,\n isSubmenuOpened: false,\n onSubmenuOpen: noop,\n rightAddon: 'chevron',\n optionsShouldHavePadding: false,\n Dropdown: noop,\n dropdownProps: {\n options: [],\n onSubmenuToggle: noop,\n openedSubmenus: {},\n selectedOptions: {},\n onKeyDown: noop,\n onOptionClick: noop,\n onClickOutside: noop,\n minWidth: 'auto',\n maxHeight: 'auto',\n },\n};\n\nexport const defaultSectionProps: Partial<DSMenuItemT.SectionProps> = {\n ...defaultCommonProps,\n label: '',\n};\n\nexport const defaultSeparatorProps: Partial<DSMenuItemT.SeparatorProps> = {\n ...defaultCommonProps,\n};\n\nexport const defaultSingleWithSubmenuProps: Partial<Omit<DSMenuItemT.SingleWithSubmenuProps, 'render'>> = {\n ...defaultSingleProps,\n ...defaultSubmenuProps,\n};\n\nexport const itemProps = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n dsId: PropTypes.string,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n wrapperStyles: PropTypes.object,\n render: PropTypes.func,\n} as WeakValidationMap<unknown>;\n\nexport const MenuItemPropTypes = {\n dsId: PropTypes.string.description('The unique ID for the menu item.').isRequired,\n innerRef: PropTypes.oneOfType([\n PropTypes.shape({\n current: PropTypes.node,\n }),\n PropTypes.func.description(\n ' A ref object or callback function to access the underlying DOM element (HTMLLIElement) of the menu item.',\n ),\n ]),\n render: PropTypes.func.description('A custom render function to render the content of the menu item.'),\n} as WeakValidationMap<unknown>;\n\nexport const SingleMenuItemPropTypes = {\n ...MenuItemPropTypes,\n label: PropTypes.string.description('The label of the menu item.'),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.'),\n disabled: PropTypes.bool.description('Whether the menu item is disabled.'),\n isSelected: PropTypes.bool.description('Whether the menu item is selected.'),\n} as WeakValidationMap<unknown>;\n\nexport const MultiMenuItemPropTypes = {\n ...MenuItemPropTypes,\n label: PropTypes.string.description('The label of the menu item.'),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.'),\n disabled: PropTypes.bool.description('Whether the menu item is disabled.'),\n isSelected: PropTypes.bool.description('Whether the menu item is selected.'),\n} as WeakValidationMap<unknown>;\n\nexport const ActionMenuItemPropTypes = {\n ...MenuItemPropTypes,\n label: PropTypes.string.description('The label of the menu item.'),\n value: PropTypes.any.description('The value of the menu item.'),\n disabled: PropTypes.bool.description('Whether the menu item is disabled.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.'),\n} as WeakValidationMap<unknown>;\n\nexport const SectionMenuItemPropTypes = {\n ...MenuItemPropTypes,\n label: PropTypes.string.description('The label of the menu item.'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ItemT {
|
|
3
|
-
dsId: string;
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
depth: number;
|
|
6
|
-
subitems: ItemT[] | null;
|
|
7
|
-
}
|
|
8
|
-
interface TreeviewItemProps {
|
|
9
|
-
onCollapse: (dsId: string) => void;
|
|
10
|
-
item: ItemT;
|
|
11
|
-
onSelect?: (dsId: string) => void;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
multiple?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const TreeviewItem: React.ComponentType<TreeviewItemProps>;
|
|
16
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { DSMenuItemT } from '../../react-desc-prop-types.js';
|
|
3
|
-
export declare const useGetSubmenuHandlers: ({ disabled, rightAddon, isSubmenuOpened, onMouseEnter, onSubmenuOpen, onSubmenuClose, onMouseLeave, }: Required<DSMenuItemT.SingleWithSubmenuProps>) => {
|
|
4
|
-
onMouseEnterHandler: (e: React.MouseEvent) => void;
|
|
5
|
-
onMouseLeaveHandler: (e: React.MouseEvent) => void;
|
|
6
|
-
onEllipsisClick: import("react").MouseEventHandler<Element>;
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DSMenuItemT } from '../../react-desc-prop-types.js';
|
|
2
|
-
export declare const getChevronHandlers: ({ isSubmenuOpened, onMouseEnter, onSubmenuOpen, onSubmenuClose, onMouseLeave, onMouseDown, disabled, }: Required<DSMenuItemT.SubmenuProps>) => {
|
|
3
|
-
onMouseEnterHandler: (e: React.MouseEvent) => void;
|
|
4
|
-
onMouseLeaveHandler: (e: React.MouseEvent) => void;
|
|
5
|
-
onMouseDownHandler: (e: React.MouseEvent) => void;
|
|
6
|
-
onEllipsisClick: () => never;
|
|
7
|
-
};
|