@elliemae/ds-menu-items 3.27.0-next.9 → 3.27.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.
Files changed (101) hide show
  1. package/dist/cjs/components/ActionMenuItem/index.js +6 -61
  2. package/dist/cjs/components/ActionMenuItem/index.js.map +2 -2
  3. package/dist/cjs/components/MultiMenuItem/index.js +6 -79
  4. package/dist/cjs/components/MultiMenuItem/index.js.map +2 -2
  5. package/dist/cjs/components/Section/index.js +6 -29
  6. package/dist/cjs/components/Section/index.js.map +2 -2
  7. package/dist/cjs/components/Separator/index.js +6 -32
  8. package/dist/cjs/components/Separator/index.js.map +2 -2
  9. package/dist/cjs/components/SingleMenuItem/index.js +6 -84
  10. package/dist/cjs/components/SingleMenuItem/index.js.map +3 -3
  11. package/dist/cjs/components/SingleWithSubmenuItem/index.js +5 -124
  12. package/dist/cjs/components/SingleWithSubmenuItem/index.js.map +2 -2
  13. package/dist/cjs/components/SkeletonMenuItem/index.js +5 -26
  14. package/dist/cjs/components/SkeletonMenuItem/index.js.map +2 -2
  15. package/dist/cjs/components/SubmenuItem/index.js +5 -128
  16. package/dist/cjs/components/SubmenuItem/index.js.map +2 -2
  17. package/dist/cjs/components/index.js +51 -9
  18. package/dist/cjs/components/index.js.map +2 -2
  19. package/dist/cjs/exported-related/index.js +9 -2
  20. package/dist/cjs/exported-related/index.js.map +2 -2
  21. package/dist/cjs/index.js +45 -4
  22. package/dist/cjs/index.js.map +2 -2
  23. package/dist/esm/components/ActionMenuItem/index.js +11 -65
  24. package/dist/esm/components/ActionMenuItem/index.js.map +3 -3
  25. package/dist/esm/components/MultiMenuItem/index.js +12 -79
  26. package/dist/esm/components/MultiMenuItem/index.js.map +3 -3
  27. package/dist/esm/components/Section/index.js +12 -29
  28. package/dist/esm/components/Section/index.js.map +3 -3
  29. package/dist/esm/components/Separator/index.js +11 -37
  30. package/dist/esm/components/Separator/index.js.map +3 -3
  31. package/dist/esm/components/SingleMenuItem/index.js +11 -88
  32. package/dist/esm/components/SingleMenuItem/index.js.map +3 -3
  33. package/dist/esm/components/SingleWithSubmenuItem/index.js +9 -131
  34. package/dist/esm/components/SingleWithSubmenuItem/index.js.map +3 -3
  35. package/dist/esm/components/SkeletonMenuItem/index.js +10 -26
  36. package/dist/esm/components/SkeletonMenuItem/index.js.map +3 -3
  37. package/dist/esm/components/SubmenuItem/index.js +9 -135
  38. package/dist/esm/components/SubmenuItem/index.js.map +3 -3
  39. package/dist/esm/components/index.js +92 -8
  40. package/dist/esm/components/index.js.map +2 -2
  41. package/dist/esm/exported-related/index.js +5 -1
  42. package/dist/esm/exported-related/index.js.map +2 -2
  43. package/dist/esm/index.js +77 -3
  44. package/dist/esm/index.js.map +2 -2
  45. package/dist/types/components/ActionMenuItem/index.d.ts +1 -5
  46. package/dist/types/components/MultiMenuItem/index.d.ts +1 -5
  47. package/dist/types/components/Section/index.d.ts +1 -5
  48. package/dist/types/components/Separator/index.d.ts +1 -5
  49. package/dist/types/components/SingleMenuItem/index.d.ts +1 -5
  50. package/dist/types/components/SingleWithSubmenuItem/index.d.ts +1 -5
  51. package/dist/types/components/SkeletonMenuItem/index.d.ts +1 -4
  52. package/dist/types/components/SubmenuItem/index.d.ts +1 -5
  53. package/dist/types/components/index.d.ts +8 -8
  54. package/dist/types/exported-related/index.d.ts +1 -1
  55. package/dist/types/index.d.ts +2 -3
  56. package/package.json +11 -12
  57. package/dist/cjs/TempTreeviewItem.js +0 -133
  58. package/dist/cjs/TempTreeviewItem.js.map +0 -7
  59. package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -87
  60. package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
  61. package/dist/cjs/components/SubmenuItem/getChevronHandlers.js +0 -72
  62. package/dist/cjs/components/SubmenuItem/getChevronHandlers.js.map +0 -7
  63. package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js +0 -64
  64. package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
  65. package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js +0 -46
  66. package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
  67. package/dist/cjs/components/styled.js +0 -192
  68. package/dist/cjs/components/styled.js.map +0 -7
  69. package/dist/cjs/components/useGetGlobalsAndXStyledProps.js +0 -42
  70. package/dist/cjs/components/useGetGlobalsAndXStyledProps.js.map +0 -7
  71. package/dist/cjs/exported-related/constants.js +0 -51
  72. package/dist/cjs/exported-related/constants.js.map +0 -7
  73. package/dist/cjs/react-desc-prop-types.js +0 -169
  74. package/dist/cjs/react-desc-prop-types.js.map +0 -7
  75. package/dist/esm/TempTreeviewItem.js +0 -103
  76. package/dist/esm/TempTreeviewItem.js.map +0 -7
  77. package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -57
  78. package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
  79. package/dist/esm/components/SubmenuItem/getChevronHandlers.js +0 -42
  80. package/dist/esm/components/SubmenuItem/getChevronHandlers.js.map +0 -7
  81. package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js +0 -34
  82. package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
  83. package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js +0 -16
  84. package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
  85. package/dist/esm/components/styled.js +0 -162
  86. package/dist/esm/components/styled.js.map +0 -7
  87. package/dist/esm/components/useGetGlobalsAndXStyledProps.js +0 -12
  88. package/dist/esm/components/useGetGlobalsAndXStyledProps.js.map +0 -7
  89. package/dist/esm/exported-related/constants.js +0 -21
  90. package/dist/esm/exported-related/constants.js.map +0 -7
  91. package/dist/esm/react-desc-prop-types.js +0 -139
  92. package/dist/esm/react-desc-prop-types.js.map +0 -7
  93. package/dist/types/TempTreeviewItem.d.ts +0 -16
  94. package/dist/types/components/SingleWithSubmenuItem/useGetSubmenuHandlers.d.ts +0 -7
  95. package/dist/types/components/SubmenuItem/getChevronHandlers.d.ts +0 -7
  96. package/dist/types/components/SubmenuItem/getEllipsisHandlers.d.ts +0 -8
  97. package/dist/types/components/SubmenuItem/useGetSubmenuHandlers.d.ts +0 -8
  98. package/dist/types/components/styled.d.ts +0 -22
  99. package/dist/types/components/useGetGlobalsAndXStyledProps.d.ts +0 -5
  100. package/dist/types/exported-related/constants.d.ts +0 -15
  101. package/dist/types/react-desc-prop-types.d.ts +0 -106
@@ -1,83 +1,16 @@
1
1
  import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
4
- import { PresentationalCheckbox } from "@elliemae/ds-form-checkbox";
5
- import { defaultMultiProps, MultiMenuItemPropTypes } from "../../react-desc-prop-types.js";
6
- import { StyledGlobalMenuItemWrapper, StyledItemContent } from "../styled.js";
7
- import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
8
- import { DSMenuItemName } from "../../exported-related/index.js";
9
- const noop = () => null;
10
- const MultiMenuItem = (props) => {
11
- const propsWithDefault = useMemoMergePropsWithDefault(props, defaultMultiProps);
12
- useValidateTypescriptPropTypes(propsWithDefault, MultiMenuItemPropTypes, `${DSMenuItemName}Multi`);
13
- const {
14
- dsId,
15
- label,
16
- disabled,
17
- isSelected,
18
- isActive,
19
- onClick,
20
- dataTestid,
21
- innerRef,
22
- onMouseEnter,
23
- onMouseLeave,
24
- onMouseDown,
25
- wrapperStyles,
26
- tabIndex,
27
- render: Render
28
- } = propsWithDefault;
29
- const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(
30
- propsWithDefault,
31
- props.original ? {
32
- onClick,
33
- onMouseDown,
34
- onMouseEnter,
35
- onMouseLeave
36
- } : void 0
37
- );
38
- return /* @__PURE__ */ jsx(
39
- StyledGlobalMenuItemWrapper,
40
- {
41
- id: dsId,
42
- disabled,
43
- isActive,
44
- isSelected,
45
- innerRef,
46
- onMouseDown,
47
- onMouseEnter,
48
- onMouseLeave,
49
- role: "option",
50
- className: isActive ? "ds-list-item-active" : "",
51
- "aria-selected": isSelected,
52
- style: wrapperStyles,
53
- onClick,
54
- "data-testid": dataTestid,
55
- "data-type": "multi",
56
- ...globalAttributes,
57
- ...xStyledProps,
58
- children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledItemContent, { children: /* @__PURE__ */ jsx(
59
- PresentationalCheckbox,
60
- {
61
- disabled,
62
- checked: isSelected,
63
- onMouseDown,
64
- name: label,
65
- label,
66
- onChange: noop,
67
- tabIndex,
68
- wrapLabel: true,
69
- device: "desktop"
70
- }
71
- ) })
72
- }
73
- );
74
- };
75
- MultiMenuItem.displayName = "DSMultiMenuItem";
76
- const MultiMenuItemWithSchema = describe(MultiMenuItem);
77
- MultiMenuItemWithSchema.propTypes = MultiMenuItemPropTypes;
2
+ import {
3
+ DSMenuItemsMulti,
4
+ DSMenuItemsMulti as DSMenuItemsMulti2,
5
+ DSMenuItemsMultiWithSchema,
6
+ DSMenuItemsMulti as DSMenuItemsMulti3,
7
+ DSMenuItemsMultiWithSchema as DSMenuItemsMultiWithSchema2
8
+ } from "@elliemae/ds-menu-items-multi";
78
9
  export {
79
- MultiMenuItem as DSMultiMenuItem,
80
- MultiMenuItem,
81
- MultiMenuItemWithSchema
10
+ DSMenuItemsMulti3 as DSMenuItemsMulti,
11
+ DSMenuItemsMultiWithSchema2 as DSMenuItemsMultiWithSchema,
12
+ DSMenuItemsMulti2 as DSMultiMenuItem,
13
+ DSMenuItemsMulti as MultiMenuItem,
14
+ DSMenuItemsMultiWithSchema as MultiMenuItemWithSchema
82
15
  };
83
16
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/MultiMenuItem/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { PresentationalCheckbox } from '@elliemae/ds-form-checkbox';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultMultiProps, MultiMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport { StyledGlobalMenuItemWrapper, StyledItemContent } from '../styled.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst noop = () => null;\n\nconst MultiMenuItem: React.ComponentType<DSMenuItemT.MultiProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultMultiProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, MultiMenuItemPropTypes, `${DSMenuItemName}Multi`);\n\n const {\n dsId,\n label,\n disabled,\n isSelected,\n isActive,\n onClick,\n dataTestid,\n innerRef,\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n wrapperStyles,\n tabIndex,\n render: Render,\n } = propsWithDefault;\n\n // menuitems use original prop from dsdropdownmenu or dscombobox\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(\n propsWithDefault,\n props.original\n ? {\n onClick: onClick,\n onMouseDown: onMouseDown,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n }\n : undefined,\n );\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n disabled={disabled}\n isActive={isActive}\n isSelected={isSelected}\n innerRef={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={dataTestid}\n data-type=\"multi\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <StyledItemContent>\n <PresentationalCheckbox\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 </StyledItemContent>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nMultiMenuItem.displayName = 'DSMultiMenuItem';\nconst MultiMenuItemWithSchema = describe(MultiMenuItem);\nMultiMenuItemWithSchema.propTypes = MultiMenuItemPropTypes;\n\nexport { MultiMenuItem, MultiMenuItem as DSMultiMenuItem, MultiMenuItemWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmEf;AAlER,SAAS,UAAU,8BAA8B,sCAAsC;AACvF,SAAS,8BAA8B;AAEvC,SAAS,mBAAmB,8BAA8B;AAC1D,SAAS,6BAA6B,yBAAyB;AAC/D,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAE/B,MAAM,OAAO,MAAM;AAEnB,MAAM,gBAA6D,CAAC,UAAU;AAC5E,QAAM,mBAAmB,6BAA6B,OAAO,iBAAiB;AAE9E,iCAA+B,kBAAkB,wBAAwB,GAAG,qBAAqB;AAEjG,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;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AAGJ,QAAM,EAAE,kBAAkB,aAAa,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,WACF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IACA;AAAA,EACN;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,WAAW,WAAW,wBAAwB;AAAA,MAC9C,iBAAe;AAAA,MACf,OAAO;AAAA,MACP;AAAA,MACA,eAAa;AAAA,MACb,aAAU;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,qBAAW,SACV,oBAAC,UAAQ,GAAG,OAAO,IAEnB,oBAAC,qBACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,SAAS;AAAA,UACT;AAAA,UACA,MAAM;AAAA,UACN;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,WAAS;AAAA,UACT,QAAO;AAAA;AAAA,MACT,GACF;AAAA;AAAA,EAEJ;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsMulti as MultiMenuItem,\n DSMenuItemsMulti as DSMultiMenuItem,\n DSMenuItemsMultiWithSchema as MultiMenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsMulti,\n DSMenuItemsMultiWithSchema,\n type DSMenuItemsMultiT,\n} from '@elliemae/ds-menu-items-multi';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEsB;AAAA,EACA,oBAApBA;AAAA,EAC8B;AAAA,EAE9B,oBAAAA;AAAA,EACA,8BAAAC;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsMulti", "DSMenuItemsMultiWithSchema"]
7
7
  }
@@ -1,33 +1,16 @@
1
1
  import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
4
- import { defaultSectionProps, SectionMenuItemPropTypes } from "../../react-desc-prop-types.js";
5
- import { StyledSectionWrapper, StyledGroupLabel } from "../styled.js";
6
- import { DSMenuItemName } from "../../exported-related/index.js";
7
- import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
8
- const Section = (props) => {
9
- const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSectionProps);
10
- useValidateTypescriptPropTypes(propsWithDefault, SectionMenuItemPropTypes, `${DSMenuItemName}Section`);
11
- const { label, wrapperStyles, innerRef, render: Render } = props;
12
- const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);
13
- return /* @__PURE__ */ jsx(
14
- StyledSectionWrapper,
15
- {
16
- style: wrapperStyles,
17
- innerRef,
18
- role: "option",
19
- ...globalAttributes,
20
- ...xStyledProps,
21
- children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledGroupLabel, { children: label })
22
- }
23
- );
24
- };
25
- Section.displayName = "DSSectionMenuItem";
26
- const SectionWithSchema = describe(Section);
27
- SectionWithSchema.propTypes = SectionMenuItemPropTypes;
2
+ import {
3
+ DSMenuItemsSection,
4
+ DSMenuItemsSection as DSMenuItemsSection2,
5
+ DSMenuItemsSectionWithSchema,
6
+ DSMenuItemsSection as DSMenuItemsSection3,
7
+ DSMenuItemsSectionWithSchema as DSMenuItemsSectionWithSchema2
8
+ } from "@elliemae/ds-menu-items-section";
28
9
  export {
29
- Section as DSSectionMenuItem,
30
- Section,
31
- SectionWithSchema
10
+ DSMenuItemsSection3 as DSMenuItemsSection,
11
+ DSMenuItemsSectionWithSchema2 as DSMenuItemsSectionWithSchema,
12
+ DSMenuItemsSection2 as DSSectionMenuItem,
13
+ DSMenuItemsSection as Section,
14
+ DSMenuItemsSectionWithSchema as SectionWithSchema
32
15
  };
33
16
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Section/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSectionProps, SectionMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport { StyledSectionWrapper, StyledGroupLabel } from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\n\nconst Section: React.ComponentType<DSMenuItemT.SectionProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSectionProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, SectionMenuItemPropTypes, `${DSMenuItemName}Section`);\n\n const { label, wrapperStyles, innerRef, render: Render } = props;\n\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);\n\n return (\n <StyledSectionWrapper\n style={wrapperStyles}\n innerRef={innerRef}\n role=\"option\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? <Render {...props} /> : <StyledGroupLabel>{label}</StyledGroupLabel>}\n </StyledSectionWrapper>\n );\n};\n\nSection.displayName = 'DSSectionMenuItem';\nconst SectionWithSchema = describe(Section);\nSectionWithSchema.propTypes = SectionMenuItemPropTypes;\n\nexport { Section, Section as DSSectionMenuItem, SectionWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACyBO;AAxB9B,SAAS,UAAU,8BAA8B,sCAAsC;AAEvF,SAAS,qBAAqB,gCAAgC;AAC9D,SAAS,sBAAsB,wBAAwB;AACvD,SAAS,sBAAsB;AAC/B,SAAS,oCAAoC;AAE7C,MAAM,UAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAA6B,OAAO,mBAAmB;AAEhF,iCAA+B,kBAAkB,0BAA0B,GAAG,uBAAuB;AAErG,QAAM,EAAE,OAAO,eAAe,UAAU,QAAQ,OAAO,IAAI;AAE3D,QAAM,EAAE,kBAAkB,aAAa,IAAI,6BAA6B,gBAAgB;AAExF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP;AAAA,MACA,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,qBAAW,SAAY,oBAAC,UAAQ,GAAG,OAAO,IAAK,oBAAC,oBAAkB,iBAAM;AAAA;AAAA,EAC3E;AAEJ;AAEA,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSection as Section,\n DSMenuItemsSection as DSSectionMenuItem,\n DSMenuItemsSectionWithSchema as SectionWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSection,\n DSMenuItemsSectionWithSchema,\n type DSMenuItemsSectionT,\n} from '@elliemae/ds-menu-items-section';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEwB;AAAA,EACA,sBAAtBA;AAAA,EACgC;AAAA,EAEhC,sBAAAA;AAAA,EACA,gCAAAC;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsSection", "DSMenuItemsSectionWithSchema"]
7
7
  }
@@ -1,42 +1,16 @@
1
1
  import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import {
4
- describe,
5
- useMemoMergePropsWithDefault,
6
- useGetGlobalAttributes,
7
- useGetXstyledProps,
8
- useValidateTypescriptPropTypes
9
- } from "@elliemae/ds-props-helpers";
10
- import { MenuItemPropTypes, defaultSeparatorProps } from "../../react-desc-prop-types.js";
11
- import { StyledSeparatorWrapper, StyledSeparator } from "../styled.js";
12
- import { DSMenuItemName } from "../../exported-related/index.js";
13
- const Separator = (props) => {
14
- const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSeparatorProps);
15
- useValidateTypescriptPropTypes(propsWithDefault, MenuItemPropTypes, `${DSMenuItemName}Separator`);
16
- const { wrapperStyles, innerRef, render: Render } = propsWithDefault;
17
- const sourceGlobalProps = propsWithDefault.original ?? propsWithDefault;
18
- const globalAttributes = useGetGlobalAttributes(sourceGlobalProps);
19
- const xStyledProps = useGetXstyledProps(sourceGlobalProps);
20
- return /* @__PURE__ */ jsx(
21
- StyledSeparatorWrapper,
22
- {
23
- style: wrapperStyles,
24
- innerRef,
25
- "aria-label": "separator",
26
- ...globalAttributes,
27
- ...xStyledProps,
28
- role: "option",
29
- tabIndex: void 0,
30
- children: Render ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledSeparator, {})
31
- }
32
- );
33
- };
34
- Separator.displayName = `${DSMenuItemName}Separator`;
35
- const SeparatorWithSchema = describe(Separator);
36
- SeparatorWithSchema.propTypes = MenuItemPropTypes;
3
+ DSMenuItemsSeparator,
4
+ DSMenuItemsSeparator as DSMenuItemsSeparator2,
5
+ DSMenuItemsSeparatorWithSchema,
6
+ DSMenuItemsSeparator as DSMenuItemsSeparator3,
7
+ DSMenuItemsSeparatorWithSchema as DSMenuItemsSeparatorWithSchema2
8
+ } from "@elliemae/ds-menu-items-separator";
37
9
  export {
38
- Separator as DSSeparatorMenuItem,
39
- Separator,
40
- SeparatorWithSchema
10
+ DSMenuItemsSeparator3 as DSMenuItemsSeparator,
11
+ DSMenuItemsSeparatorWithSchema2 as DSMenuItemsSeparatorWithSchema,
12
+ DSMenuItemsSeparator2 as DSSeparatorMenuItem,
13
+ DSMenuItemsSeparator as Separator,
14
+ DSMenuItemsSeparatorWithSchema as SeparatorWithSchema
41
15
  };
42
16
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Separator/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { MenuItemPropTypes, defaultSeparatorProps } from '../../react-desc-prop-types.js';\nimport { StyledSeparatorWrapper, StyledSeparator } from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst Separator: React.ComponentType<DSMenuItemT.SeparatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSeparatorProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, MenuItemPropTypes, `${DSMenuItemName}Separator`);\n const { wrapperStyles, innerRef, render: Render } = propsWithDefault;\n\n // menuitems use original prop from dsdropdownmenu or dscombobox\n const sourceGlobalProps = propsWithDefault.original ?? propsWithDefault;\n\n const globalAttributes = useGetGlobalAttributes(sourceGlobalProps);\n\n const xStyledProps = useGetXstyledProps(sourceGlobalProps);\n return (\n <StyledSeparatorWrapper\n style={wrapperStyles}\n innerRef={innerRef}\n aria-label=\"separator\"\n {...globalAttributes}\n {...xStyledProps}\n role=\"option\"\n tabIndex={undefined}\n >\n {Render ? <Render {...props} /> : <StyledSeparator />}\n </StyledSeparatorWrapper>\n );\n};\n\nSeparator.displayName = `${DSMenuItemName}Separator`;\nconst SeparatorWithSchema = describe(Separator);\nSeparatorWithSchema.propTypes = MenuItemPropTypes;\n\nexport { Separator, Separator as DSSeparatorMenuItem, SeparatorWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmCP;AAlChB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,mBAAmB,6BAA6B;AACzD,SAAS,wBAAwB,uBAAuB;AACxD,SAAS,sBAAsB;AAE/B,MAAM,YAA6D,CAAC,UAAU;AAC5E,QAAM,mBAAmB,6BAA6B,OAAO,qBAAqB;AAElF,iCAA+B,kBAAkB,mBAAmB,GAAG,yBAAyB;AAChG,QAAM,EAAE,eAAe,UAAU,QAAQ,OAAO,IAAI;AAGpD,QAAM,oBAAoB,iBAAiB,YAAY;AAEvD,QAAM,mBAAmB,uBAAuB,iBAAiB;AAEjE,QAAM,eAAe,mBAAmB,iBAAiB;AACzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP;AAAA,MACA,cAAW;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAK;AAAA,MACL,UAAU;AAAA,MAET,mBAAS,oBAAC,UAAQ,GAAG,OAAO,IAAK,oBAAC,mBAAgB;AAAA;AAAA,EACrD;AAEJ;AAEA,UAAU,cAAc,GAAG;AAC3B,MAAM,sBAAsB,SAAS,SAAS;AAC9C,oBAAoB,YAAY;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSeparator as Separator,\n DSMenuItemsSeparator as DSSeparatorMenuItem,\n DSMenuItemsSeparatorWithSchema as SeparatorWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSeparator,\n DSMenuItemsSeparatorWithSchema,\n type DSMenuItemsSeparatorT,\n} from '@elliemae/ds-menu-items-separator';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAE0B;AAAA,EACA,wBAAxBA;AAAA,EACkC;AAAA,EAElC,wBAAAA;AAAA,EACA,kCAAAC;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsSeparator", "DSMenuItemsSeparatorWithSchema"]
7
7
  }
@@ -1,93 +1,16 @@
1
1
  import * as React from "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import React2, { useMemo } from "react";
4
- import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
5
- import { Checkmark } from "@elliemae/ds-icons";
6
- import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
7
- import { defaultSingleProps, SingleMenuItemPropTypes } from "../../react-desc-prop-types.js";
8
2
  import {
9
- StyledContentWrapper,
10
- StyledGlobalMenuItemWrapper,
11
- StyleMenuItemLabel,
12
- StyleMenuItemSecondaryLabel
13
- } from "../styled.js";
14
- import { DSMenuItemName } from "../../exported-related/index.js";
15
- const SingleMenuItem = (props) => {
16
- const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSingleProps);
17
- useValidateTypescriptPropTypes(propsWithDefault, SingleMenuItemPropTypes, `${DSMenuItemName}Single`);
18
- const {
19
- dsId,
20
- label,
21
- secondaryLabel,
22
- isSelected,
23
- onClick,
24
- isActive,
25
- innerRef,
26
- onMouseDown,
27
- onMouseEnter,
28
- onMouseLeave,
29
- wrapperStyles,
30
- render: Render,
31
- dataTestid,
32
- disabled
33
- } = propsWithDefault;
34
- const onMouseDownHandler = React2.useCallback(
35
- (e) => {
36
- if (disabled)
37
- return;
38
- onMouseDown?.(e);
39
- },
40
- [disabled, onMouseDown]
41
- );
42
- const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(
43
- propsWithDefault,
44
- props.original ? {
45
- onClick,
46
- onMouseDown: onMouseDownHandler,
47
- onMouseEnter,
48
- onMouseLeave
49
- } : void 0
50
- );
51
- const gridLayout = useMemo(() => {
52
- const cols = ["16px", "auto"];
53
- if (secondaryLabel)
54
- cols.push("min-content");
55
- return cols;
56
- }, [secondaryLabel]);
57
- return /* @__PURE__ */ jsx(
58
- StyledGlobalMenuItemWrapper,
59
- {
60
- "aria-selected": isSelected,
61
- id: dsId,
62
- role: "option",
63
- isActive,
64
- isSelected,
65
- onClick,
66
- innerRef,
67
- onMouseDown: onMouseDownHandler,
68
- onMouseEnter,
69
- onMouseLeave,
70
- className: isActive ? "ds-list-item-active" : "",
71
- style: wrapperStyles,
72
- "data-testid": dataTestid,
73
- disabled,
74
- "data-type": "single",
75
- ...globalAttributes,
76
- ...xStyledProps,
77
- children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
78
- /* @__PURE__ */ jsx("div", { children: isSelected && /* @__PURE__ */ jsx(Checkmark, { size: "s", color: ["brand-primary", "600"] }) }),
79
- /* @__PURE__ */ jsx(StyleMenuItemLabel, { children: label }),
80
- secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { children: secondaryLabel })
81
- ] })
82
- }
83
- );
84
- };
85
- SingleMenuItem.displayName = "DSSingleMenuItem";
86
- const SingleMenuItemWithSchema = describe(SingleMenuItem);
87
- SingleMenuItemWithSchema.propTypes = SingleMenuItemPropTypes;
3
+ DSMenuItemsSingle,
4
+ DSMenuItemsSingle as DSMenuItemsSingle2,
5
+ DSMenuItemsSingleWithSchema,
6
+ DSMenuItemsSingle as DSMenuItemsSingle3,
7
+ DSMenuItemsSingleWithSchema as DSMenuItemsSingleWithSchema2
8
+ } from "@elliemae/ds-menu-items-single";
88
9
  export {
89
- SingleMenuItem as DSSingleMenuItem,
90
- SingleMenuItem,
91
- SingleMenuItemWithSchema
10
+ DSMenuItemsSingle3 as DSMenuItemsSingle,
11
+ DSMenuItemsSingleWithSchema2 as DSMenuItemsSingleWithSchema,
12
+ DSMenuItemsSingle2 as DSSingleMenuItem,
13
+ DSMenuItemsSingle as SingleMenuItem,
14
+ DSMenuItemsSingleWithSchema as SingleMenuItemWithSchema
92
15
  };
93
16
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SingleMenuItem/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSingleProps, SingleMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport {\n StyledContentWrapper,\n StyledGlobalMenuItemWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst SingleMenuItem: React.ComponentType<DSMenuItemT.SingleProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSingleProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, SingleMenuItemPropTypes, `${DSMenuItemName}Single`);\n const {\n dsId,\n label,\n secondaryLabel,\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 const onMouseDownHandler = React.useCallback(\n (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n },\n [disabled, onMouseDown],\n );\n\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(\n propsWithDefault,\n props.original\n ? {\n onClick: onClick,\n onMouseDown: onMouseDownHandler,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n }\n : undefined,\n );\n\n const gridLayout = useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\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 innerRef={innerRef}\n onMouseDown={onMouseDownHandler}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n data-type=\"single\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>}\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nSingleMenuItem.displayName = 'DSSingleMenuItem';\nconst SingleMenuItemWithSchema = describe(SingleMenuItem);\nSingleMenuItemWithSchema.propTypes = SingleMenuItemPropTypes;\n\nexport { SingleMenuItem, SingleMenuItem as DSSingleMenuItem, SingleMenuItemWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkFf,cAEA,YAFA;AAlFR,OAAOA,UAAS,eAAe;AAC/B,SAAS,UAAU,8BAA8B,sCAAsC;AACvF,SAAS,iBAAiB;AAC1B,SAAS,oCAAoC;AAE7C,SAAS,oBAAoB,+BAA+B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAE/B,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,6BAA6B,OAAO,kBAAkB;AAE/E,iCAA+B,kBAAkB,yBAAyB,GAAG,sBAAsB;AACnG,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,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,qBAAqBA,OAAM;AAAA,IAC/B,CAAC,MAAwB;AACvB,UAAI;AAAU;AACd,oBAAc,CAAC;AAAA,IACjB;AAAA,IACA,CAAC,UAAU,WAAW;AAAA,EACxB;AAEA,QAAM,EAAE,kBAAkB,aAAa,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,WACF;AAAA,MACE;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,IACF,IACA;AAAA,EACN;AAEA,QAAM,aAAa,QAAQ,MAAM;AAC/B,UAAM,OAAO,CAAC,QAAQ,MAAM;AAC5B,QAAI;AAAgB,WAAK,KAAK,aAAa;AAC3C,WAAO;AAAA,EACT,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,iBAAe;AAAA,MACf,IAAI;AAAA,MACJ,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,WAAW,WAAW,wBAAwB;AAAA,MAC9C,OAAO;AAAA,MACP,eAAa;AAAA,MACb;AAAA,MACA,aAAU;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,qBAAW,SACV,oBAAC,UAAQ,GAAG,OAAO,IAEnB,qBAAC,wBAAqB,MAAM,YAAY,WAAU,QAAO,QAAO,OAAM,YAAW,UAC/E;AAAA,4BAAC,SAAK,wBAAc,oBAAC,aAAU,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG,GAAG;AAAA,QAC5E,oBAAC,sBAAoB,iBAAM;AAAA,QAC1B,mBAAmB,UAAa,oBAAC,+BAA6B,0BAAe;AAAA,SAChF;AAAA;AAAA,EAEJ;AAEJ;AAEA,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSingle as SingleMenuItem,\n DSMenuItemsSingle as DSSingleMenuItem,\n DSMenuItemsSingleWithSchema as SingleMenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSingle,\n DSMenuItemsSingleWithSchema,\n type DSMenuItemsSingleT,\n} from '@elliemae/ds-menu-items-single';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEuB;AAAA,EACA,qBAArBA;AAAA,EAC+B;AAAA,EAE/B,qBAAAA;AAAA,EACA,+BAAAC;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsSingle", "DSMenuItemsSingleWithSchema"]
7
7
  }
@@ -1,136 +1,14 @@
1
1
  import * as React from "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useEffect, useState, useMemo } from "react";
4
- import { MoreOptionsVert, ChevronRight, Checkmark } from "@elliemae/ds-icons";
5
- import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
6
- import { defaultSingleWithSubmenuProps, itemProps } from "../../react-desc-prop-types.js";
7
2
  import {
8
- StyleMenuItemLabel,
9
- StyleMenuItemSecondaryLabel,
10
- StyledIconContainer,
11
- StyledEllipsisButton,
12
- StyledGlobalMenuItemWrapper,
13
- StyledVerticalSeparator,
14
- StyledContentWrapper
15
- } from "../styled.js";
16
- import { useGetSubmenuHandlers } from "./useGetSubmenuHandlers.js";
17
- import { DSMenuItemName } from "../../exported-related/index.js";
18
- import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
19
- const SingleWithSubmenuItem = (props) => {
20
- const propsWithDefault = useMemoMergePropsWithDefault(
21
- props,
22
- defaultSingleWithSubmenuProps
23
- );
24
- useValidateTypescriptPropTypes(propsWithDefault, itemProps, `${DSMenuItemName}SingleWithSubmenu`);
25
- const {
26
- dsId,
27
- label,
28
- secondaryLabel,
29
- isActive,
30
- disabled,
31
- onClick,
32
- isSelected,
33
- isSubmenuOpened,
34
- rightAddon,
35
- innerRef,
36
- wrapperStyles,
37
- render: Render,
38
- Dropdown,
39
- dropdownProps: {
40
- options,
41
- openedSubmenus,
42
- onSubmenuToggle,
43
- selectedOptions,
44
- onKeyDown,
45
- onOptionClick,
46
- onClickOutside,
47
- minWidth,
48
- maxHeight
49
- }
50
- } = propsWithDefault;
51
- const [delayedIsOpened, setDelayedIsOpened] = useState(false);
52
- const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);
53
- const { minWidth: customMinWidth, ...restXStyled } = xStyledProps;
54
- useEffect(() => {
55
- setTimeout(() => setDelayedIsOpened(isSubmenuOpened));
56
- }, [isSubmenuOpened]);
57
- const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = useGetSubmenuHandlers(propsWithDefault);
58
- const gridLayout = useMemo(() => {
59
- const cols = ["16px", "auto"];
60
- if (secondaryLabel)
61
- cols.push("min-content");
62
- cols.push("min-content");
63
- return cols;
64
- }, [secondaryLabel]);
65
- return /* @__PURE__ */ jsx(
66
- Dropdown,
67
- {
68
- isOpened: delayedIsOpened,
69
- options: options ?? [],
70
- onOptionClick,
71
- startPlacementPreference: "right-start",
72
- placementOrderPreference: ["right-start", "right-end", "left-start", "left-end"],
73
- selectedOptions,
74
- openedSubmenus,
75
- onSubmenuToggle,
76
- onKeyDown,
77
- onClickOutside,
78
- customOffset: [-4, 1],
79
- onMouseEnter: onMouseEnterHandler,
80
- onMouseLeave: onMouseLeaveHandler,
81
- wrapperStyles: { ...wrapperStyles, w: "100%" },
82
- minWidth,
83
- maxHeight,
84
- "data-popover-label": label,
85
- as: "li",
86
- role: "option",
87
- "aria-selected": isSubmenuOpened,
88
- "aria-describedby": `dropdownmenu-submenu-${dsId}`,
89
- id: dsId,
90
- ...globalAttributes,
91
- ...restXStyled,
92
- children: /* @__PURE__ */ jsxs(
93
- StyledGlobalMenuItemWrapper,
94
- {
95
- pr: 0,
96
- onClick: !disabled ? onClick : void 0,
97
- isSelected: isSubmenuOpened,
98
- disabled,
99
- isActive,
100
- onMouseEnter: onMouseEnterHandler,
101
- onMouseLeave: onMouseLeaveHandler,
102
- as: "div",
103
- innerRef,
104
- "data-type": "single-with-submenu",
105
- children: [
106
- Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...propsWithDefault }) : /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, gutter: "xxs", alignItems: "center", children: [
107
- isSelected ? /* @__PURE__ */ jsx(Checkmark, { size: "s", color: disabled ? ["neutral", "500"] : ["brand-primary", "600"] }) : /* @__PURE__ */ jsx("div", {}),
108
- /* @__PURE__ */ jsx(StyleMenuItemLabel, { children: label }),
109
- secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { children: secondaryLabel }),
110
- /* @__PURE__ */ jsxs(StyledIconContainer, { children: [
111
- /* @__PURE__ */ jsx(StyledVerticalSeparator, {}),
112
- rightAddon === "ellipsis" ? /* @__PURE__ */ jsx(StyledEllipsisButton, { tabIndex: -1, onClick: onEllipsisClick, disabled, children: /* @__PURE__ */ jsx(
113
- MoreOptionsVert,
114
- {
115
- className: "ds-dropdown-menu-v2-more-options",
116
- color: disabled ? ["neutral", "500"] : ["brand-primary", "600"],
117
- size: "s"
118
- }
119
- ) }) : /* @__PURE__ */ jsx(ChevronRight, { color: disabled ? ["neutral", "500"] : ["brand-primary", "600"], size: "s" })
120
- ] })
121
- ] }),
122
- /* @__PURE__ */ jsx("span", { id: `dropdownmenu-submenu-${dsId}`, style: { display: "none" }, children: "submenu, to open this submenu press the Right Arrow key" })
123
- ]
124
- }
125
- )
126
- }
127
- );
128
- };
129
- SingleWithSubmenuItem.displayName = `${DSMenuItemName}SingleWithSubmenu`;
130
- const SingleWithSubmenuItemWithSchema = describe(SingleWithSubmenuItem);
131
- SingleWithSubmenuItemWithSchema.propTypes = itemProps;
3
+ DSMenuItemsSingleWithSubmenu,
4
+ DSMenuItemsSingleWithSubmenuWithSchema,
5
+ DSMenuItemsSingleWithSubmenu as DSMenuItemsSingleWithSubmenu2,
6
+ DSMenuItemsSingleWithSubmenuWithSchema as DSMenuItemsSingleWithSubmenuWithSchema2
7
+ } from "@elliemae/ds-menu-items-single-with-submenu";
132
8
  export {
133
- SingleWithSubmenuItem,
134
- SingleWithSubmenuItemWithSchema
9
+ DSMenuItemsSingleWithSubmenu2 as DSMenuItemsSingleWithSubmenu,
10
+ DSMenuItemsSingleWithSubmenuWithSchema2 as DSMenuItemsSingleWithSubmenuWithSchema,
11
+ DSMenuItemsSingleWithSubmenu as SingleWithSubmenuItem,
12
+ DSMenuItemsSingleWithSubmenuWithSchema as SingleWithSubmenuItemWithSchema
135
13
  };
136
14
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SingleWithSubmenuItem/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable max-lines */\nimport React, { useEffect, useState, useMemo } from 'react';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSingleWithSubmenuProps, itemProps } from '../../react-desc-prop-types.js';\nimport {\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n StyledIconContainer,\n StyledEllipsisButton,\n StyledGlobalMenuItemWrapper,\n StyledVerticalSeparator,\n StyledContentWrapper,\n} from '../styled.js';\nimport { useGetSubmenuHandlers } from './useGetSubmenuHandlers.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\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, `${DSMenuItemName}SingleWithSubmenu`);\n\n const {\n dsId,\n label,\n secondaryLabel,\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 const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);\n const { minWidth: customMinWidth, ...restXStyled } = xStyledProps;\n\n useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = useGetSubmenuHandlers(propsWithDefault);\n\n const gridLayout = useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\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 data-popover-label={label}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n {...globalAttributes}\n {...restXStyled}\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 as={'div' as keyof JSX.IntrinsicElements}\n innerRef={innerRef}\n data-type=\"single-with-submenu\"\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} gutter=\"xxs\" alignItems=\"center\">\n {isSelected ? (\n <Checkmark size=\"s\" color={disabled ? ['neutral', '500'] : ['brand-primary', '600']} />\n ) : (\n <div />\n )}\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\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 </StyledContentWrapper>\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.displayName = `${DSMenuItemName}SingleWithSubmenu`;\nconst SingleWithSubmenuItemWithSchema = describe(SingleWithSubmenuItem);\nSingleWithSubmenuItemWithSchema.propTypes = itemProps;\n\nexport { SingleWithSubmenuItem, SingleWithSubmenuItemWithSchema };\n"],
5
- "mappings": "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",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSingleWithSubmenu as SingleWithSubmenuItem,\n DSMenuItemsSingleWithSubmenuWithSchema as SingleWithSubmenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSingleWithSubmenu,\n DSMenuItemsSingleWithSubmenuWithSchema,\n type DSMenuItemsSingleWithSubmenuT,\n} from '@elliemae/ds-menu-items-single-with-submenu';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEkC;AAAA,EACU;AAAA,EAE1C,gCAAAA;AAAA,EACA,0CAAAC;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsSingleWithSubmenu", "DSMenuItemsSingleWithSubmenuWithSchema"]
7
7
  }
@@ -1,30 +1,14 @@
1
1
  import * as React from "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useMemo } from "react";
4
- import { DSSkeleton } from "@elliemae/ds-skeleton";
5
- import { StyledContentWrapper, StyledGlobalMenuItemWrapper } from "../styled.js";
6
- const SkeletonMenuItem = (props) => {
7
- const { wrapperStyles, isActive, dsId } = props;
8
- const gridLayout = useMemo(() => ["16px", "auto"], []);
9
- return /* @__PURE__ */ jsx(
10
- StyledGlobalMenuItemWrapper,
11
- {
12
- id: dsId,
13
- "data-type": "skeleton",
14
- "data-testid": "ds-skeleton-menu-item",
15
- role: "option",
16
- "aria-label": "skeleton",
17
- style: wrapperStyles,
18
- isActive,
19
- children: /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
20
- /* @__PURE__ */ jsx(DSSkeleton, { variant: "rectangular", width: "100%" }),
21
- /* @__PURE__ */ jsx(DSSkeleton, { variant: "rectangular", width: "100%" })
22
- ] })
23
- }
24
- );
25
- };
2
+ import {
3
+ DSMenuItemsSkeleton,
4
+ DSMenuItemsSkeleton as DSMenuItemsSkeleton2,
5
+ DSMenuItemsSkeleton as DSMenuItemsSkeleton3,
6
+ DSMenuItemsSkeletonWithSchema
7
+ } from "@elliemae/ds-menu-items-skeleton";
26
8
  export {
27
- SkeletonMenuItem as DSSkeletonMenuItem,
28
- SkeletonMenuItem
9
+ DSMenuItemsSkeleton3 as DSMenuItemsSkeleton,
10
+ DSMenuItemsSkeletonWithSchema,
11
+ DSMenuItemsSkeleton2 as DSSkeletonMenuItem,
12
+ DSMenuItemsSkeleton as SkeletonMenuItem
29
13
  };
30
14
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SkeletonMenuItem/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { type DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { StyledContentWrapper, StyledGlobalMenuItemWrapper } from '../styled.js';\nconst SkeletonMenuItem: React.ComponentType<DSMenuItemT.SkeletonProps> = (props) => {\n const { wrapperStyles, isActive, dsId } = props;\n const gridLayout = useMemo(() => ['16px', 'auto'], []);\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n data-type=\"skeleton\"\n data-testid=\"ds-skeleton-menu-item\"\n role=\"option\"\n aria-label=\"skeleton\"\n style={wrapperStyles}\n isActive={isActive}\n >\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <DSSkeleton variant=\"rectangular\" width={'100%'} />\n <DSSkeleton variant=\"rectangular\" width={'100%'} />\n </StyledContentWrapper>\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nexport { SkeletonMenuItem, SkeletonMenuItem as DSSkeletonMenuItem };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkBjB,SACE,KADF;AAlBN,SAAgB,eAAe;AAC/B,SAAS,kBAAkB;AAE3B,SAAS,sBAAsB,mCAAmC;AAClE,MAAM,mBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,eAAe,UAAU,KAAK,IAAI;AAC1C,QAAM,aAAa,QAAQ,MAAM,CAAC,QAAQ,MAAM,GAAG,CAAC,CAAC;AAErD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,aAAU;AAAA,MACV,eAAY;AAAA,MACZ,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACP;AAAA,MAEA,+BAAC,wBAAqB,MAAM,YAAY,WAAU,QAAO,QAAO,OAAM,YAAW,UAC/E;AAAA,4BAAC,cAAW,SAAQ,eAAc,OAAO,QAAQ;AAAA,QACjD,oBAAC,cAAW,SAAQ,eAAc,OAAO,QAAQ;AAAA,SACnD;AAAA;AAAA,EACF;AAEJ;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSkeleton as SkeletonMenuItem,\n DSMenuItemsSkeleton as DSSkeletonMenuItem,\n // the \"current\" correctly named export\n DSMenuItemsSkeleton,\n DSMenuItemsSkeletonWithSchema,\n type DSMenuItemsSkeletonT,\n} from '@elliemae/ds-menu-items-skeleton';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEyB;AAAA,EACA,uBAAvBA;AAAA,EAEA,uBAAAA;AAAA,EACA;AAAA,OAEK;",
6
+ "names": ["DSMenuItemsSkeleton"]
7
7
  }