@elliemae/ds-menu-items 3.9.0-next.5

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.
Files changed (53) hide show
  1. package/dist/cjs/components/ActionMenuItem/index.js +70 -0
  2. package/dist/cjs/components/ActionMenuItem/index.js.map +7 -0
  3. package/dist/cjs/components/MultiMenuItem/index.js +92 -0
  4. package/dist/cjs/components/MultiMenuItem/index.js.map +7 -0
  5. package/dist/cjs/components/Section/index.js +58 -0
  6. package/dist/cjs/components/Section/index.js.map +7 -0
  7. package/dist/cjs/components/Separator/index.js +53 -0
  8. package/dist/cjs/components/Separator/index.js.map +7 -0
  9. package/dist/cjs/components/SingleMenuItem/index.js +95 -0
  10. package/dist/cjs/components/SingleMenuItem/index.js.map +7 -0
  11. package/dist/cjs/components/SingleWithSubmenuItem/index.js +158 -0
  12. package/dist/cjs/components/SingleWithSubmenuItem/index.js.map +7 -0
  13. package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +83 -0
  14. package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +7 -0
  15. package/dist/cjs/components/SubmenuItem/index.js +147 -0
  16. package/dist/cjs/components/SubmenuItem/index.js.map +7 -0
  17. package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js +83 -0
  18. package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js.map +7 -0
  19. package/dist/cjs/components/index.js +32 -0
  20. package/dist/cjs/components/index.js.map +7 -0
  21. package/dist/cjs/components/styled.js +159 -0
  22. package/dist/cjs/components/styled.js.map +7 -0
  23. package/dist/cjs/index.js +26 -0
  24. package/dist/cjs/index.js.map +7 -0
  25. package/dist/cjs/react-desc-prop-types.js +118 -0
  26. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  27. package/dist/esm/components/ActionMenuItem/index.js +44 -0
  28. package/dist/esm/components/ActionMenuItem/index.js.map +7 -0
  29. package/dist/esm/components/MultiMenuItem/index.js +66 -0
  30. package/dist/esm/components/MultiMenuItem/index.js.map +7 -0
  31. package/dist/esm/components/Section/index.js +32 -0
  32. package/dist/esm/components/Section/index.js.map +7 -0
  33. package/dist/esm/components/Separator/index.js +27 -0
  34. package/dist/esm/components/Separator/index.js.map +7 -0
  35. package/dist/esm/components/SingleMenuItem/index.js +69 -0
  36. package/dist/esm/components/SingleMenuItem/index.js.map +7 -0
  37. package/dist/esm/components/SingleWithSubmenuItem/index.js +138 -0
  38. package/dist/esm/components/SingleWithSubmenuItem/index.js.map +7 -0
  39. package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +57 -0
  40. package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +7 -0
  41. package/dist/esm/components/SubmenuItem/index.js +127 -0
  42. package/dist/esm/components/SubmenuItem/index.js.map +7 -0
  43. package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js +57 -0
  44. package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js.map +7 -0
  45. package/dist/esm/components/index.js +9 -0
  46. package/dist/esm/components/index.js.map +7 -0
  47. package/dist/esm/components/styled.js +140 -0
  48. package/dist/esm/components/styled.js.map +7 -0
  49. package/dist/esm/index.js +3 -0
  50. package/dist/esm/index.js.map +7 -0
  51. package/dist/esm/react-desc-prop-types.js +92 -0
  52. package/dist/esm/react-desc-prop-types.js.map +7 -0
  53. package/package.json +62 -0
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var ActionMenuItem_exports = {};
26
+ __export(ActionMenuItem_exports, {
27
+ ActionMenuItem: () => ActionMenuItem,
28
+ ActionMenuItemWithSchema: () => ActionMenuItemWithSchema
29
+ });
30
+ module.exports = __toCommonJS(ActionMenuItem_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_ds_utilities = require("@elliemae/ds-utilities");
34
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
35
+ var import_styled = require("../styled");
36
+ const ActionMenuItem = (props) => {
37
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultActionProps);
38
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
39
+ const {
40
+ dsId,
41
+ label,
42
+ onClick,
43
+ isActive,
44
+ disabled,
45
+ innerRef,
46
+ wrapperStyles,
47
+ optionsShouldHavePadding,
48
+ render: Render
49
+ } = propsWithDefault;
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledGlobalMenuItemWrapper, {
51
+ id: dsId,
52
+ role: "option",
53
+ isActive,
54
+ disabled,
55
+ onClick: !disabled ? onClick : void 0,
56
+ ref: innerRef,
57
+ pl: optionsShouldHavePadding ? 40 : 16,
58
+ style: wrapperStyles,
59
+ children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
60
+ ...propsWithDefault
61
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemLabel, {
62
+ children: label
63
+ })
64
+ });
65
+ };
66
+ ActionMenuItem.propTypes = import_react_desc_prop_types.itemProps;
67
+ ActionMenuItem.displayName = "ActionMenuItem";
68
+ const ActionMenuItemWithSchema = (0, import_ds_utilities.describe)(ActionMenuItem);
69
+ ActionMenuItemWithSchema.propTypes = import_react_desc_prop_types.itemProps;
70
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/ActionMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSMenuItemT, defaultActionProps, itemProps } from '../../react-desc-prop-types';\nimport { StyledGlobalMenuItemWrapper, StyledItemLabel } from '../styled';\n\nconst ActionMenuItem = (props: DSMenuItemT.ActionProps): JSX.Element => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultActionProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n\n const {\n dsId,\n label,\n onClick,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n } = propsWithDefault;\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n role=\"option\"\n isActive={isActive}\n disabled={disabled}\n onClick={!disabled ? onClick : undefined}\n ref={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n >\n {Render !== undefined ? <Render {...propsWithDefault} /> : <StyledItemLabel>{label}</StyledItemLabel>}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nActionMenuItem.propTypes = itemProps;\nActionMenuItem.displayName = 'ActionMenuItem';\nconst ActionMenuItemWithSchema = describe(ActionMenuItem);\nActionMenuItemWithSchema.propTypes = itemProps;\n\nexport { ActionMenuItem, ActionMenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,mCAA2D;AAC3D,oBAA6D;AAE7D,MAAM,iBAAiB,CAAC,UAAgD;AACtE,QAAM,uBAAmB,kDAA6B,OAAO,+CAAkB;AAE/E,0DAA+B,kBAAkB,sCAAS;AAE1D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AAEJ,SACE,4CAAC;AAAA,IACC,IAAI;AAAA,IACJ,MAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,CAAC,WAAW,UAAU;AAAA,IAC/B,KAAK;AAAA,IACL,IAAI,2BAA2B,KAAK;AAAA,IACpC,OAAO;AAAA,IAEN,qBAAW,SAAY,4CAAC;AAAA,MAAQ,GAAG;AAAA,KAAkB,IAAK,4CAAC;AAAA,MAAiB;AAAA,KAAM;AAAA,GACrF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,8BAAS,cAAc;AACxD,yBAAyB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var MultiMenuItem_exports = {};
26
+ __export(MultiMenuItem_exports, {
27
+ MultiMenuItem: () => MultiMenuItem,
28
+ MultiMenuItemWithSchema: () => MultiMenuItemWithSchema
29
+ });
30
+ module.exports = __toCommonJS(MultiMenuItem_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_ds_utilities = require("@elliemae/ds-utilities");
34
+ var import_ds_form_checkbox = require("@elliemae/ds-form-checkbox");
35
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
36
+ var import_styled = require("../styled");
37
+ const noop = () => null;
38
+ const MultiMenuItem = (props) => {
39
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultMultiProps);
40
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
41
+ const {
42
+ dsId,
43
+ label,
44
+ disabled,
45
+ isSelected,
46
+ isActive,
47
+ onClick,
48
+ innerRef,
49
+ onMouseEnter,
50
+ onMouseLeave,
51
+ onMouseDown,
52
+ wrapperStyles,
53
+ tabIndex,
54
+ render: Render
55
+ } = propsWithDefault;
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledGlobalMenuItemWrapper, {
57
+ id: dsId,
58
+ disabled,
59
+ isActive,
60
+ isSelected,
61
+ ref: innerRef,
62
+ onMouseDown,
63
+ onMouseEnter,
64
+ onMouseLeave,
65
+ role: "option",
66
+ className: isActive ? "ds-list-item-active" : "",
67
+ "aria-selected": isSelected,
68
+ style: wrapperStyles,
69
+ onClick,
70
+ "data-testid": "combobox-option",
71
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemContent, {
72
+ children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
73
+ ...props
74
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_checkbox.DSControlledCheckbox, {
75
+ disabled,
76
+ checked: isSelected,
77
+ onMouseDown,
78
+ name: label,
79
+ label,
80
+ onChange: noop,
81
+ tabIndex,
82
+ wrapLabel: true,
83
+ device: "desktop"
84
+ })
85
+ })
86
+ });
87
+ };
88
+ MultiMenuItem.propTypes = import_react_desc_prop_types.itemProps;
89
+ MultiMenuItem.displayName = "MultiMenuItem";
90
+ const MultiMenuItemWithSchema = (0, import_ds_utilities.describe)(MultiMenuItem);
91
+ MultiMenuItemWithSchema.propTypes = import_react_desc_prop_types.itemProps;
92
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/MultiMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSControlledCheckbox } from '@elliemae/ds-form-checkbox';\nimport { DSMenuItemT, defaultMultiProps, itemProps } from '../../react-desc-prop-types';\nimport { StyledGlobalMenuItemWrapper, StyledItemContent } from '../styled';\n\nconst noop = () => null;\n\nconst MultiMenuItem: React.ComponentType<DSMenuItemT.MultiProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultMultiProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n\n const {\n dsId,\n label,\n disabled,\n isSelected,\n isActive,\n onClick,\n innerRef,\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n wrapperStyles,\n tabIndex,\n render: Render,\n } = propsWithDefault;\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n disabled={disabled}\n isActive={isActive}\n isSelected={isSelected}\n ref={innerRef}\n onMouseDown={onMouseDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n role=\"option\"\n className={isActive ? 'ds-list-item-active' : ''}\n aria-selected={isSelected}\n style={wrapperStyles}\n onClick={onClick}\n data-testid=\"combobox-option\"\n >\n <StyledItemContent>\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <DSControlledCheckbox\n disabled={disabled}\n checked={isSelected}\n onMouseDown={onMouseDown}\n name={label}\n label={label}\n onChange={noop}\n tabIndex={tabIndex}\n wrapLabel\n device=\"desktop\"\n />\n )}\n </StyledItemContent>\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nMultiMenuItem.propTypes = itemProps;\nMultiMenuItem.displayName = 'MultiMenuItem';\nconst MultiMenuItemWithSchema = describe(MultiMenuItem);\nMultiMenuItemWithSchema.propTypes = itemProps;\n\nexport { MultiMenuItem, MultiMenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,8BAAqC;AACrC,mCAA0D;AAC1D,oBAA+D;AAE/D,MAAM,OAAO,MAAM;AAEnB,MAAM,gBAA6D,CAAC,UAAU;AAC5E,QAAM,uBAAmB,kDAA6B,OAAO,8CAAiB;AAE9E,0DAA+B,kBAAkB,sCAAS;AAE1D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AAEJ,SACE,4CAAC;AAAA,IACC,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAK;AAAA,IACL,WAAW,WAAW,wBAAwB;AAAA,IAC9C,iBAAe;AAAA,IACf,OAAO;AAAA,IACP;AAAA,IACA,eAAY;AAAA,IAEZ,sDAAC;AAAA,MACE,qBAAW,SACV,4CAAC;AAAA,QAAQ,GAAG;AAAA,OAAO,IAEnB,4CAAC;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA,MAAM;AAAA,QACN;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA,WAAS;AAAA,QACT,QAAO;AAAA,OACT;AAAA,KAEJ;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var Section_exports = {};
26
+ __export(Section_exports, {
27
+ Section: () => Section,
28
+ SectionWithSchema: () => SectionWithSchema
29
+ });
30
+ module.exports = __toCommonJS(Section_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_ds_grid = require("@elliemae/ds-grid");
34
+ var import_ds_utilities = require("@elliemae/ds-utilities");
35
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
36
+ var import_styled = require("../styled");
37
+ const Section = (props) => {
38
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSectionProps);
39
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
40
+ const { label, wrapperStyles, innerRef, render: Render } = props;
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSectionWrapper, {
42
+ style: wrapperStyles,
43
+ ref: innerRef,
44
+ role: "presentation",
45
+ children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
46
+ ...props
47
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
48
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledGroupLabel, {
49
+ children: label
50
+ })
51
+ })
52
+ });
53
+ };
54
+ Section.propTypes = import_react_desc_prop_types.itemProps;
55
+ Section.displayName = "Section";
56
+ const SectionWithSchema = (0, import_ds_utilities.describe)(Section);
57
+ SectionWithSchema.propTypes = import_react_desc_prop_types.itemProps;
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/Section/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSMenuItemT, defaultSectionProps, itemProps } from '../../react-desc-prop-types';\nimport { StyledSectionWrapper, StyledGroupLabel } from '../styled';\n\nconst Section: React.ComponentType<DSMenuItemT.SectionProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSectionProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n\n const { label, wrapperStyles, innerRef, render: Render } = props;\n\n return (\n <StyledSectionWrapper style={wrapperStyles} ref={innerRef} role=\"presentation\">\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <Grid>\n <StyledGroupLabel>{label}</StyledGroupLabel>\n </Grid>\n )}\n </StyledSectionWrapper>\n );\n};\n\nSection.propTypes = itemProps;\nSection.displayName = 'Section';\nconst SectionWithSchema = describe(Section);\nSectionWithSchema.propTypes = itemProps;\n\nexport { Section, SectionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,qBAAqB;AACrB,0BAAuF;AACvF,mCAA4D;AAC5D,oBAAuD;AAEvD,MAAM,UAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,kDAA6B,OAAO,gDAAmB;AAEhF,0DAA+B,kBAAkB,sCAAS;AAE1D,QAAM,EAAE,OAAO,eAAe,UAAU,QAAQ,OAAO,IAAI;AAE3D,SACE,4CAAC;AAAA,IAAqB,OAAO;AAAA,IAAe,KAAK;AAAA,IAAU,MAAK;AAAA,IAC7D,qBAAW,SACV,4CAAC;AAAA,MAAQ,GAAG;AAAA,KAAO,IAEnB,4CAAC;AAAA,MACC,sDAAC;AAAA,QAAkB;AAAA,OAAM;AAAA,KAC3B;AAAA,GAEJ;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,wBAAoB,8BAAS,OAAO;AAC1C,kBAAkB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var Separator_exports = {};
26
+ __export(Separator_exports, {
27
+ Separator: () => Separator,
28
+ SeparatorWithSchema: () => SeparatorWithSchema
29
+ });
30
+ module.exports = __toCommonJS(Separator_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_ds_utilities = require("@elliemae/ds-utilities");
34
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
35
+ var import_styled = require("../styled");
36
+ const Separator = (props) => {
37
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSeparatorProps);
38
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
39
+ const { wrapperStyles, innerRef, render: Render } = propsWithDefault;
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparatorWrapper, {
41
+ style: wrapperStyles,
42
+ ref: innerRef,
43
+ role: "separator",
44
+ children: Render ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
45
+ ...props
46
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparator, {})
47
+ });
48
+ };
49
+ Separator.propTypes = import_react_desc_prop_types.itemProps;
50
+ Separator.displayName = "Separator";
51
+ const SeparatorWithSchema = (0, import_ds_utilities.describe)(Separator);
52
+ SeparatorWithSchema.propTypes = import_react_desc_prop_types.itemProps;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/Separator/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSMenuItemT, itemProps, defaultSeparatorProps } from '../../react-desc-prop-types';\nimport { StyledSeparatorWrapper, StyledSeparator } from '../styled';\n\nconst Separator: React.ComponentType<DSMenuItemT.SeparatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSeparatorProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n const { wrapperStyles, innerRef, render: Render } = propsWithDefault;\n return (\n <StyledSeparatorWrapper style={wrapperStyles} ref={innerRef} role=\"separator\">\n {Render ? <Render {...props} /> : <StyledSeparator />}\n </StyledSeparatorWrapper>\n );\n};\n\nSeparator.propTypes = itemProps;\nSeparator.displayName = 'Separator';\nconst SeparatorWithSchema = describe(Separator);\nSeparatorWithSchema.propTypes = itemProps;\n\nexport { Separator, SeparatorWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,mCAA8D;AAC9D,oBAAwD;AAExD,MAAM,YAA6D,CAAC,UAAU;AAC5E,QAAM,uBAAmB,kDAA6B,OAAO,kDAAqB;AAElF,0DAA+B,kBAAkB,sCAAS;AAC1D,QAAM,EAAE,eAAe,UAAU,QAAQ,OAAO,IAAI;AACpD,SACE,4CAAC;AAAA,IAAuB,OAAO;AAAA,IAAe,KAAK;AAAA,IAAU,MAAK;AAAA,IAC/D,mBAAS,4CAAC;AAAA,MAAQ,GAAG;AAAA,KAAO,IAAK,4CAAC,iCAAgB;AAAA,GACrD;AAEJ;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,0BAAsB,8BAAS,SAAS;AAC9C,oBAAoB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var SingleMenuItem_exports = {};
26
+ __export(SingleMenuItem_exports, {
27
+ SingleMenuItem: () => SingleMenuItem
28
+ });
29
+ module.exports = __toCommonJS(SingleMenuItem_exports);
30
+ var React = __toESM(require("react"));
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ var import_ds_utilities = require("@elliemae/ds-utilities");
33
+ var import_ds_icons = require("@elliemae/ds-icons");
34
+ var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
35
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
36
+ var import_styled = require("../styled");
37
+ const SingleMenuItem = (props) => {
38
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSingleProps);
39
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
40
+ const {
41
+ dsId,
42
+ label,
43
+ isSelected,
44
+ onClick,
45
+ isActive,
46
+ innerRef,
47
+ onMouseDown,
48
+ onMouseEnter,
49
+ onMouseLeave,
50
+ wrapperStyles,
51
+ render: Render,
52
+ dataTestid,
53
+ disabled
54
+ } = propsWithDefault;
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledGlobalMenuItemWrapper, {
56
+ "aria-selected": isSelected,
57
+ id: dsId,
58
+ role: "option",
59
+ isActive,
60
+ isSelected,
61
+ onClick,
62
+ ref: innerRef,
63
+ onMouseDown,
64
+ onMouseEnter,
65
+ onMouseLeave,
66
+ className: isActive ? "ds-list-item-active" : "",
67
+ style: wrapperStyles,
68
+ "data-testid": dataTestid,
69
+ disabled,
70
+ children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
71
+ ...props
72
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.default, {
73
+ cols: ["16px", "auto"],
74
+ minHeight: "16px",
75
+ gutter: "xxs",
76
+ alignItems: "center",
77
+ children: [
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
79
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, {
80
+ size: "s",
81
+ color: ["brand-primary", "600"]
82
+ })
83
+ }),
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleMenuItemLabel, {
85
+ children: label
86
+ })
87
+ ]
88
+ })
89
+ });
90
+ };
91
+ SingleMenuItem.propTypes = import_react_desc_prop_types.itemProps;
92
+ SingleMenuItem.displayName = "SingleMenuItem";
93
+ const SingleMenuItemWithSchema = (0, import_ds_utilities.describe)(SingleMenuItem);
94
+ SingleMenuItemWithSchema.propTypes = import_react_desc_prop_types.itemProps;
95
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/SingleMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport Grid from '@elliemae/ds-grid';\nimport { DSMenuItemT, defaultSingleProps, itemProps } from '../../react-desc-prop-types';\nimport { StyledGlobalMenuItemWrapper, StyleMenuItemLabel } from '../styled';\n\nconst SingleMenuItem: React.ComponentType<DSMenuItemT.SingleProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSingleProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n const {\n dsId,\n label,\n isSelected,\n onClick,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n } = propsWithDefault;\n\n return (\n <StyledGlobalMenuItemWrapper\n aria-selected={isSelected}\n id={dsId}\n role=\"option\"\n isActive={isActive}\n isSelected={isSelected}\n onClick={onClick}\n ref={innerRef}\n onMouseDown={onMouseDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n >\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <Grid cols={['16px', 'auto']} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n </Grid>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nSingleMenuItem.propTypes = itemProps;\nSingleMenuItem.displayName = 'SingleMenuItem';\nconst SingleMenuItemWithSchema = describe(SingleMenuItem);\nSingleMenuItemWithSchema.propTypes = itemProps;\n\nexport { SingleMenuItem };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,sBAA0B;AAC1B,qBAAiB;AACjB,mCAA2D;AAC3D,oBAAgE;AAEhE,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,uBAAmB,kDAA6B,OAAO,+CAAkB;AAE/E,0DAA+B,kBAAkB,sCAAS;AAC1D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,SACE,4CAAC;AAAA,IACC,iBAAe;AAAA,IACf,IAAI;AAAA,IACJ,MAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,WAAW,wBAAwB;AAAA,IAC9C,OAAO;AAAA,IACP,eAAa;AAAA,IACb;AAAA,IAEC,qBAAW,SACV,4CAAC;AAAA,MAAQ,GAAG;AAAA,KAAO,IAEnB,6CAAC,eAAAA,SAAA;AAAA,MAAK,MAAM,CAAC,QAAQ,MAAM;AAAA,MAAG,WAAU;AAAA,MAAO,QAAO;AAAA,MAAM,YAAW;AAAA,MACrE;AAAA,oDAAC;AAAA,UAAK,wBAAc,4CAAC;AAAA,YAAU,MAAK;AAAA,YAAI,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SAAG;AAAA,QAC5E,4CAAC;AAAA,UAAoB;AAAA,SAAM;AAAA;AAAA,KAC7B;AAAA,GAEJ;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,8BAAS,cAAc;AACxD,yBAAyB,YAAY;",
6
+ "names": ["Grid"]
7
+ }
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var SingleWithSubmenuItem_exports = {};
26
+ __export(SingleWithSubmenuItem_exports, {
27
+ SingleWithSubmenuItem: () => SingleWithSubmenuItem,
28
+ SingleWithSubmenuItemWithSchema: () => SingleWithSubmenuItemWithSchema
29
+ });
30
+ module.exports = __toCommonJS(SingleWithSubmenuItem_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_react = require("react");
34
+ var import_ds_grid = require("@elliemae/ds-grid");
35
+ var import_ds_icons = require("@elliemae/ds-icons");
36
+ var import_ds_utilities = require("@elliemae/ds-utilities");
37
+ var import_react_desc_prop_types = require("../../react-desc-prop-types");
38
+ var import_styled = require("../styled");
39
+ var import_useGetSubmenuHandlers = require("./useGetSubmenuHandlers");
40
+ const SingleWithSubmenuItem = (props) => {
41
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(
42
+ props,
43
+ import_react_desc_prop_types.defaultSingleWithSubmenuProps
44
+ );
45
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.itemProps);
46
+ const {
47
+ dsId,
48
+ label,
49
+ isActive,
50
+ disabled,
51
+ onClick,
52
+ isSelected,
53
+ isSubmenuOpened,
54
+ rightAddon,
55
+ innerRef,
56
+ wrapperStyles,
57
+ render: Render,
58
+ Dropdown,
59
+ dropdownProps: {
60
+ options,
61
+ openedSubmenus,
62
+ onSubmenuToggle,
63
+ selectedOptions,
64
+ onKeyDown,
65
+ onOptionClick,
66
+ onClickOutside,
67
+ minWidth,
68
+ maxHeight
69
+ }
70
+ } = propsWithDefault;
71
+ const [delayedIsOpened, setDelayedIsOpened] = (0, import_react.useState)(false);
72
+ (0, import_react.useEffect)(() => {
73
+ setTimeout(() => setDelayedIsOpened(isSubmenuOpened));
74
+ }, [isSubmenuOpened]);
75
+ const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = (0, import_useGetSubmenuHandlers.useGetSubmenuHandlers)(propsWithDefault);
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dropdown, {
77
+ isOpened: delayedIsOpened,
78
+ options: options ?? [],
79
+ onOptionClick,
80
+ startPlacementPreference: "right-start",
81
+ placementOrderPreference: ["right-start", "right-end", "left-start", "left-end"],
82
+ selectedOptions,
83
+ openedSubmenus,
84
+ onSubmenuToggle,
85
+ onKeyDown,
86
+ onClickOutside,
87
+ customOffset: [-4, 1],
88
+ onMouseEnter: onMouseEnterHandler,
89
+ onMouseLeave: onMouseLeaveHandler,
90
+ wrapperStyles: { ...wrapperStyles, w: "100%" },
91
+ minWidth,
92
+ maxHeight,
93
+ as: "li",
94
+ role: "option",
95
+ "aria-selected": isSubmenuOpened,
96
+ "aria-describedby": `dropdownmenu-submenu-${dsId}`,
97
+ id: dsId,
98
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledGlobalMenuItemWrapper, {
99
+ pr: 0,
100
+ onClick: !disabled ? onClick : void 0,
101
+ isSelected: isSubmenuOpened,
102
+ disabled,
103
+ isActive,
104
+ onMouseEnter: onMouseEnterHandler,
105
+ onMouseLeave: onMouseLeaveHandler,
106
+ ref: innerRef,
107
+ as: "div",
108
+ children: [
109
+ Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, {
110
+ ...propsWithDefault
111
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
112
+ cols: ["16px", "auto", "min-content"],
113
+ gutter: "xxs",
114
+ alignItems: "center",
115
+ children: [
116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
117
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, {
118
+ size: "s",
119
+ color: disabled ? ["neutral", "500"] : ["brand-primary", "600"]
120
+ })
121
+ }),
122
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemLabel, {
123
+ children: label
124
+ }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledIconContainer, {
126
+ children: [
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledVerticalSeparator, {}),
128
+ rightAddon === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledEllipsisButton, {
129
+ tabIndex: -1,
130
+ onClick: onEllipsisClick,
131
+ disabled,
132
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.MoreOptionsVert, {
133
+ className: "ds-dropdown-menu-v2-more-options",
134
+ color: disabled ? ["neutral", "500"] : ["brand-primary", "600"],
135
+ size: "s"
136
+ })
137
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronRight, {
138
+ color: disabled ? ["neutral", "500"] : ["brand-primary", "600"],
139
+ size: "s"
140
+ })
141
+ ]
142
+ })
143
+ ]
144
+ }),
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
146
+ id: `dropdownmenu-submenu-${dsId}`,
147
+ style: { display: "none" },
148
+ children: "submenu, to open this submenu press the Right Arrow key"
149
+ })
150
+ ]
151
+ })
152
+ });
153
+ };
154
+ SingleWithSubmenuItem.propTypes = import_react_desc_prop_types.itemProps;
155
+ SingleWithSubmenuItem.displayName = "SingleWithSubmenuItem";
156
+ const SingleWithSubmenuItemWithSchema = (0, import_ds_utilities.describe)(SingleWithSubmenuItem);
157
+ SingleWithSubmenuItemWithSchema.propTypes = import_react_desc_prop_types.itemProps;
158
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/SingleWithSubmenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useEffect, useState } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSMenuItemT, defaultSingleWithSubmenuProps, itemProps } from '../../react-desc-prop-types';\nimport {\n StyledItemLabel,\n StyledIconContainer,\n StyledEllipsisButton,\n StyledGlobalMenuItemWrapper,\n StyledVerticalSeparator,\n} from '../styled';\nimport { useGetSubmenuHandlers } from './useGetSubmenuHandlers';\n\nconst SingleWithSubmenuItem: React.ComponentType<DSMenuItemT.SingleWithSubmenuProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSMenuItemT.SingleWithSubmenuProps>>(\n props,\n defaultSingleWithSubmenuProps,\n );\n\n useValidateTypescriptPropTypes(propsWithDefault, itemProps);\n\n const {\n dsId,\n label,\n isActive,\n disabled,\n onClick,\n isSelected,\n isSubmenuOpened,\n rightAddon,\n innerRef,\n wrapperStyles,\n render: Render,\n Dropdown,\n dropdownProps: {\n options,\n openedSubmenus,\n onSubmenuToggle,\n selectedOptions,\n onKeyDown,\n onOptionClick,\n onClickOutside,\n minWidth,\n maxHeight,\n },\n } = propsWithDefault;\n\n // If we don't delay the opening of the poppers, the position will not be placed correctly\n // That why we delay it for the next render using the useEffect hook\n // TODO -- @carusox move this to utilities as a hook\n const [delayedIsOpened, setDelayedIsOpened] = useState(false);\n\n useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = useGetSubmenuHandlers(propsWithDefault);\n\n return (\n <Dropdown\n isOpened={delayedIsOpened}\n options={options ?? []}\n onOptionClick={onOptionClick}\n startPlacementPreference=\"right-start\"\n placementOrderPreference={['right-start', 'right-end', 'left-start', 'left-end']}\n selectedOptions={selectedOptions}\n openedSubmenus={openedSubmenus}\n onSubmenuToggle={onSubmenuToggle}\n onKeyDown={onKeyDown}\n onClickOutside={onClickOutside}\n customOffset={[-4, 1]}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n wrapperStyles={{ ...wrapperStyles, w: '100%' }}\n minWidth={minWidth}\n maxHeight={maxHeight}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n >\n <StyledGlobalMenuItemWrapper\n pr={0}\n onClick={!disabled ? onClick : undefined}\n isSelected={isSubmenuOpened}\n disabled={disabled}\n isActive={isActive}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n ref={innerRef}\n as=\"div\"\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <Grid cols={['16px', 'auto', 'min-content']} gutter=\"xxs\" alignItems=\"center\">\n <div>\n {isSelected && <Checkmark size=\"s\" color={disabled ? ['neutral', '500'] : ['brand-primary', '600']} />}\n </div>\n <StyledItemLabel>{label}</StyledItemLabel>\n <StyledIconContainer>\n <StyledVerticalSeparator />\n {rightAddon === 'ellipsis' ? (\n <StyledEllipsisButton tabIndex={-1} onClick={onEllipsisClick} disabled={disabled}>\n <MoreOptionsVert\n className=\"ds-dropdown-menu-v2-more-options\"\n color={disabled ? ['neutral', '500'] : ['brand-primary', '600']}\n size=\"s\"\n />\n </StyledEllipsisButton>\n ) : (\n <ChevronRight color={disabled ? ['neutral', '500'] : ['brand-primary', '600']} size=\"s\" />\n )}\n </StyledIconContainer>\n </Grid>\n )}\n <span id={`dropdownmenu-submenu-${dsId}`} style={{ display: 'none' }}>\n submenu, to open this submenu press the Right Arrow key\n </span>\n </StyledGlobalMenuItemWrapper>\n </Dropdown>\n );\n};\n\nSingleWithSubmenuItem.propTypes = itemProps;\nSingleWithSubmenuItem.displayName = 'SingleWithSubmenuItem';\nconst SingleWithSubmenuItemWithSchema = describe(SingleWithSubmenuItem);\nSingleWithSubmenuItemWithSchema.propTypes = itemProps;\n\nexport { SingleWithSubmenuItem, SingleWithSubmenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }