@elliemae/ds-dropdownmenu-v2 3.25.0-next.3

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 (130) hide show
  1. package/dist/cjs/DSDropdownMenu.js +50 -0
  2. package/dist/cjs/DSDropdownMenu.js.map +7 -0
  3. package/dist/cjs/DropdownMenuContext.js +37 -0
  4. package/dist/cjs/DropdownMenuContext.js.map +7 -0
  5. package/dist/cjs/DropdownMenuDataTestId.js +42 -0
  6. package/dist/cjs/DropdownMenuDataTestId.js.map +7 -0
  7. package/dist/cjs/config/useDropdownMenuConfig.js +114 -0
  8. package/dist/cjs/config/useDropdownMenuConfig.js.map +7 -0
  9. package/dist/cjs/config/useReferenceConfig.js +47 -0
  10. package/dist/cjs/config/useReferenceConfig.js.map +7 -0
  11. package/dist/cjs/exported-related/constants.js +45 -0
  12. package/dist/cjs/exported-related/constants.js.map +7 -0
  13. package/dist/cjs/exported-related/index.js +30 -0
  14. package/dist/cjs/exported-related/index.js.map +7 -0
  15. package/dist/cjs/hooks/index.js +32 -0
  16. package/dist/cjs/hooks/index.js.map +7 -0
  17. package/dist/cjs/hooks/useAutofocusContainerOnOpen.js +49 -0
  18. package/dist/cjs/hooks/useAutofocusContainerOnOpen.js.map +7 -0
  19. package/dist/cjs/hooks/useDropdownListboxHandlers.js +126 -0
  20. package/dist/cjs/hooks/useDropdownListboxHandlers.js.map +7 -0
  21. package/dist/cjs/hooks/useDropdownMenuItemHandlers.js +128 -0
  22. package/dist/cjs/hooks/useDropdownMenuItemHandlers.js.map +7 -0
  23. package/dist/cjs/hooks/useGetOptionSpecialAttributes.js +47 -0
  24. package/dist/cjs/hooks/useGetOptionSpecialAttributes.js.map +7 -0
  25. package/dist/cjs/index.js +39 -0
  26. package/dist/cjs/index.js.map +7 -0
  27. package/dist/cjs/package.json +7 -0
  28. package/dist/cjs/parts/DropdownMenuContent.js +100 -0
  29. package/dist/cjs/parts/DropdownMenuContent.js.map +7 -0
  30. package/dist/cjs/parts/DropdownMenuEmptyState.js +38 -0
  31. package/dist/cjs/parts/DropdownMenuEmptyState.js.map +7 -0
  32. package/dist/cjs/parts/DropdownMenuItemFactory.js +106 -0
  33. package/dist/cjs/parts/DropdownMenuItemFactory.js.map +7 -0
  34. package/dist/cjs/parts/DropdownMenuListBox.js +135 -0
  35. package/dist/cjs/parts/DropdownMenuListBox.js.map +7 -0
  36. package/dist/cjs/parts/DropdownMenuLoading.js +73 -0
  37. package/dist/cjs/parts/DropdownMenuLoading.js.map +7 -0
  38. package/dist/cjs/parts/DropdownMenuSkeleton.js +42 -0
  39. package/dist/cjs/parts/DropdownMenuSkeleton.js.map +7 -0
  40. package/dist/cjs/react-desc-prop-types.js +129 -0
  41. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  42. package/dist/cjs/styled.js +120 -0
  43. package/dist/cjs/styled.js.map +7 -0
  44. package/dist/cjs/utils/findInCircularList.js +42 -0
  45. package/dist/cjs/utils/findInCircularList.js.map +7 -0
  46. package/dist/cjs/utils/index.js +32 -0
  47. package/dist/cjs/utils/index.js.map +7 -0
  48. package/dist/cjs/utils/isOptionFocuseable.js +36 -0
  49. package/dist/cjs/utils/isOptionFocuseable.js.map +7 -0
  50. package/dist/cjs/utils/manageOpenedSubmenus.js +67 -0
  51. package/dist/cjs/utils/manageOpenedSubmenus.js.map +7 -0
  52. package/dist/esm/DSDropdownMenu.js +20 -0
  53. package/dist/esm/DSDropdownMenu.js.map +7 -0
  54. package/dist/esm/DropdownMenuContext.js +7 -0
  55. package/dist/esm/DropdownMenuContext.js.map +7 -0
  56. package/dist/esm/DropdownMenuDataTestId.js +12 -0
  57. package/dist/esm/DropdownMenuDataTestId.js.map +7 -0
  58. package/dist/esm/config/useDropdownMenuConfig.js +84 -0
  59. package/dist/esm/config/useDropdownMenuConfig.js.map +7 -0
  60. package/dist/esm/config/useReferenceConfig.js +17 -0
  61. package/dist/esm/config/useReferenceConfig.js.map +7 -0
  62. package/dist/esm/exported-related/constants.js +15 -0
  63. package/dist/esm/exported-related/constants.js.map +7 -0
  64. package/dist/esm/exported-related/index.js +3 -0
  65. package/dist/esm/exported-related/index.js.map +7 -0
  66. package/dist/esm/hooks/index.js +5 -0
  67. package/dist/esm/hooks/index.js.map +7 -0
  68. package/dist/esm/hooks/useAutofocusContainerOnOpen.js +19 -0
  69. package/dist/esm/hooks/useAutofocusContainerOnOpen.js.map +7 -0
  70. package/dist/esm/hooks/useDropdownListboxHandlers.js +96 -0
  71. package/dist/esm/hooks/useDropdownListboxHandlers.js.map +7 -0
  72. package/dist/esm/hooks/useDropdownMenuItemHandlers.js +98 -0
  73. package/dist/esm/hooks/useDropdownMenuItemHandlers.js.map +7 -0
  74. package/dist/esm/hooks/useGetOptionSpecialAttributes.js +17 -0
  75. package/dist/esm/hooks/useGetOptionSpecialAttributes.js.map +7 -0
  76. package/dist/esm/index.js +8 -0
  77. package/dist/esm/index.js.map +7 -0
  78. package/dist/esm/package.json +7 -0
  79. package/dist/esm/parts/DropdownMenuContent.js +70 -0
  80. package/dist/esm/parts/DropdownMenuContent.js.map +7 -0
  81. package/dist/esm/parts/DropdownMenuEmptyState.js +8 -0
  82. package/dist/esm/parts/DropdownMenuEmptyState.js.map +7 -0
  83. package/dist/esm/parts/DropdownMenuItemFactory.js +85 -0
  84. package/dist/esm/parts/DropdownMenuItemFactory.js.map +7 -0
  85. package/dist/esm/parts/DropdownMenuListBox.js +105 -0
  86. package/dist/esm/parts/DropdownMenuListBox.js.map +7 -0
  87. package/dist/esm/parts/DropdownMenuLoading.js +43 -0
  88. package/dist/esm/parts/DropdownMenuLoading.js.map +7 -0
  89. package/dist/esm/parts/DropdownMenuSkeleton.js +12 -0
  90. package/dist/esm/parts/DropdownMenuSkeleton.js.map +7 -0
  91. package/dist/esm/react-desc-prop-types.js +102 -0
  92. package/dist/esm/react-desc-prop-types.js.map +7 -0
  93. package/dist/esm/styled.js +90 -0
  94. package/dist/esm/styled.js.map +7 -0
  95. package/dist/esm/utils/findInCircularList.js +12 -0
  96. package/dist/esm/utils/findInCircularList.js.map +7 -0
  97. package/dist/esm/utils/index.js +5 -0
  98. package/dist/esm/utils/index.js.map +7 -0
  99. package/dist/esm/utils/isOptionFocuseable.js +6 -0
  100. package/dist/esm/utils/isOptionFocuseable.js.map +7 -0
  101. package/dist/esm/utils/manageOpenedSubmenus.js +37 -0
  102. package/dist/esm/utils/manageOpenedSubmenus.js.map +7 -0
  103. package/dist/types/DSDropdownMenu.d.ts +5 -0
  104. package/dist/types/DropdownMenuContext.d.ts +3 -0
  105. package/dist/types/DropdownMenuDataTestId.d.ts +7 -0
  106. package/dist/types/config/useDropdownMenuConfig.d.ts +2 -0
  107. package/dist/types/config/useReferenceConfig.d.ts +7 -0
  108. package/dist/types/exported-related/constants.d.ts +9 -0
  109. package/dist/types/exported-related/index.d.ts +1 -0
  110. package/dist/types/hooks/index.d.ts +3 -0
  111. package/dist/types/hooks/useAutofocusContainerOnOpen.d.ts +1 -0
  112. package/dist/types/hooks/useDropdownListboxHandlers.d.ts +8 -0
  113. package/dist/types/hooks/useDropdownMenuItemHandlers.d.ts +12 -0
  114. package/dist/types/hooks/useGetOptionSpecialAttributes.d.ts +3 -0
  115. package/dist/types/index.d.ts +4 -0
  116. package/dist/types/parts/DropdownMenuContent.d.ts +2 -0
  117. package/dist/types/parts/DropdownMenuEmptyState.d.ts +8 -0
  118. package/dist/types/parts/DropdownMenuItemFactory.d.ts +8 -0
  119. package/dist/types/parts/DropdownMenuListBox.d.ts +2 -0
  120. package/dist/types/parts/DropdownMenuLoading.d.ts +2 -0
  121. package/dist/types/parts/DropdownMenuSkeleton.d.ts +1 -0
  122. package/dist/types/react-desc-prop-types.d.ts +120 -0
  123. package/dist/types/styled.d.ts +20 -0
  124. package/dist/types/tests/DSDropdownMenuV2.keyboardEvents.test.d.ts +1 -0
  125. package/dist/types/tests/DSDropdownMenuV2.pointerEvents.test.d.ts +1 -0
  126. package/dist/types/utils/findInCircularList.d.ts +1 -0
  127. package/dist/types/utils/index.d.ts +3 -0
  128. package/dist/types/utils/isOptionFocuseable.d.ts +2 -0
  129. package/dist/types/utils/manageOpenedSubmenus.d.ts +2 -0
  130. package/package.json +75 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropdownMenuListBox.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useMemo } from 'react';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { DropdownMenuDataTestId } from '../DropdownMenuDataTestId.js';\nimport { useDropdownListboxHandlers } from '../hooks/useDropdownListboxHandlers.js';\nimport { StyledInputWrapper, StyledListBoxWrapper, StyledHeaderWrapper, StyledOptionListWrapper } from '../styled.js';\nimport { DropdownMenuEmptyState } from './DropdownMenuEmptyState.js';\nimport { DropdownMenuItemFactory } from './DropdownMenuItemFactory.js';\nimport { DropdownMenuSkeleton } from './DropdownMenuSkeleton.js';\n\nimport { useAutofocusContainerOnOpen, useGetOptionSpecialAttributes } from '../hooks/index.js';\n\nexport const DropdownMenuListBox: React.ComponentType<Record<string, never>> = () => {\n const ctx = useContext(DSDropdownMenuContext);\n const {\n triggerReferenceElement,\n props: {\n isSkeleton,\n options,\n hasInput,\n inputValue,\n onInputChange,\n HeaderComp,\n minWidth: userMinWidth,\n maxHeight: userMaxHeight,\n },\n activeDescendant,\n listboxReference,\n inputReference,\n virtualListHelpers: { totalSize, virtualItems },\n } = ctx;\n\n useAutofocusContainerOnOpen();\n\n const { onKeyDown, onMouseEnter, onMouseLeave } = useDropdownListboxHandlers();\n\n const { optionsShouldHavePadding } = useGetOptionSpecialAttributes();\n\n const minWidth = useMemo(\n () => (userMinWidth !== undefined ? userMinWidth : Math.max(triggerReferenceElement?.offsetWidth ?? 0, 162)),\n [triggerReferenceElement?.offsetWidth, userMinWidth],\n );\n\n return useMemo(() => {\n if (virtualItems.length === 0) {\n return <DropdownMenuEmptyState minWidth={minWidth} maxHeight={userMaxHeight || 400} />;\n }\n return (\n <StyledListBoxWrapper\n minWidth={minWidth}\n maxHeight={userMaxHeight || 400}\n innerRef={listboxReference}\n tabIndex={0}\n data-testid={DropdownMenuDataTestId.MENU_WRAPPER}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n hasHeader={!!HeaderComp}\n >\n {isSkeleton ? (\n <DropdownMenuSkeleton />\n ) : (\n <>\n {HeaderComp && (\n <StyledHeaderWrapper alignItems=\"center\">\n <HeaderComp ctx={ctx} />\n </StyledHeaderWrapper>\n )}\n {hasInput && (\n <StyledInputWrapper key=\"dropdown-listbox-input-wrapper\" hasHeader={!!HeaderComp}>\n <DSInputText value={inputValue} onChange={onInputChange} innerRef={inputReference} />\n </StyledInputWrapper>\n )}\n <StyledOptionListWrapper\n aria-activedescendant={activeDescendant}\n data-testid={DropdownMenuDataTestId.LISTBOX}\n role=\"listbox\"\n aria-label=\"List of options\"\n style={{ height: totalSize || 16 }}\n >\n {virtualItems.map((vItem) => (\n <DropdownMenuItemFactory\n option={options[vItem.index]}\n style={{ position: 'absolute', top: vItem.start, left: 0, width: '100%' }}\n key={`dropdown-listbox-option-${options[vItem.index].dsId}`}\n innerRef={vItem.measureRef}\n optionsShouldHavePadding={optionsShouldHavePadding}\n />\n ))}\n </StyledOptionListWrapper>\n </>\n )}\n </StyledListBoxWrapper>\n );\n }, [\n HeaderComp,\n activeDescendant,\n ctx,\n hasInput,\n inputReference,\n inputValue,\n isSkeleton,\n listboxReference,\n minWidth,\n onInputChange,\n onKeyDown,\n onMouseEnter,\n onMouseLeave,\n options,\n optionsShouldHavePadding,\n totalSize,\n userMaxHeight,\n virtualItems,\n ]);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC6CV,SAiBH,UAjBG,KAiBH,YAjBG;AA7Cb,SAAgB,YAAY,eAAe;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAS,kCAAkC;AAC3C,SAAS,oBAAoB,sBAAsB,qBAAqB,+BAA+B;AACvG,SAAS,8BAA8B;AACvC,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AAErC,SAAS,6BAA6B,qCAAqC;AAEpE,MAAM,sBAAkE,MAAM;AACnF,QAAM,MAAM,WAAW,qBAAqB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB,EAAE,WAAW,aAAa;AAAA,EAChD,IAAI;AAEJ,8BAA4B;AAE5B,QAAM,EAAE,WAAW,cAAc,aAAa,IAAI,2BAA2B;AAE7E,QAAM,EAAE,yBAAyB,IAAI,8BAA8B;AAEnE,QAAM,WAAW;AAAA,IACf,MAAO,iBAAiB,SAAY,eAAe,KAAK,IAAI,yBAAyB,eAAe,GAAG,GAAG;AAAA,IAC1G,CAAC,yBAAyB,aAAa,YAAY;AAAA,EACrD;AAEA,SAAO,QAAQ,MAAM;AACnB,QAAI,aAAa,WAAW,GAAG;AAC7B,aAAO,oBAAC,0BAAuB,UAAoB,WAAW,iBAAiB,KAAK;AAAA,IACtF;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,iBAAiB;AAAA,QAC5B,UAAU;AAAA,QACV,UAAU;AAAA,QACV,eAAa,uBAAuB;AAAA,QACpC;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,CAAC,CAAC;AAAA,QAEZ,uBACC,oBAAC,wBAAqB,IAEtB,iCACG;AAAA,wBACC,oBAAC,uBAAoB,YAAW,UAC9B,8BAAC,cAAW,KAAU,GACxB;AAAA,UAED,YACC,oBAAC,sBAAwD,WAAW,CAAC,CAAC,YACpE,8BAAC,eAAY,OAAO,YAAY,UAAU,eAAe,UAAU,gBAAgB,KAD7D,gCAExB;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,yBAAuB;AAAA,cACvB,eAAa,uBAAuB;AAAA,cACpC,MAAK;AAAA,cACL,cAAW;AAAA,cACX,OAAO,EAAE,QAAQ,aAAa,GAAG;AAAA,cAEhC,uBAAa,IAAI,CAAC,UACjB;AAAA,gBAAC;AAAA;AAAA,kBACC,QAAQ,QAAQ,MAAM,KAAK;AAAA,kBAC3B,OAAO,EAAE,UAAU,YAAY,KAAK,MAAM,OAAO,MAAM,GAAG,OAAO,OAAO;AAAA,kBAExE,UAAU,MAAM;AAAA,kBAChB;AAAA;AAAA,gBAFK,2BAA2B,QAAQ,MAAM,KAAK,EAAE;AAAA,cAGvD,CACD;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA,IAEJ;AAAA,EAEJ,GAAG;AAAA,IACD;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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useCallback, useContext, useLayoutEffect, useRef } from "react";
4
+ import { DSCircularProgressIndicator } from "@elliemae/ds-circular-progress-indicator";
5
+ import { DSDropdownMenuContext } from "../DropdownMenuContext.js";
6
+ import { DropdownMenuDataTestId } from "../DropdownMenuDataTestId.js";
7
+ import { StyledLoadingWrapper } from "../styled.js";
8
+ const DropdownMenuLoading = () => {
9
+ const {
10
+ props: { onClickOutside },
11
+ triggerReferenceElement
12
+ } = useContext(DSDropdownMenuContext);
13
+ const loadingRef = useRef(null);
14
+ useLayoutEffect(() => {
15
+ loadingRef.current?.focus();
16
+ }, [loadingRef]);
17
+ const onKeyDown = useCallback(
18
+ (e) => {
19
+ if (e.code === "Escape" || e.code === "ArrowLeft")
20
+ onClickOutside(e);
21
+ },
22
+ [onClickOutside]
23
+ );
24
+ return /* @__PURE__ */ jsx(
25
+ StyledLoadingWrapper,
26
+ {
27
+ minWidth: triggerReferenceElement?.offsetWidth ?? 0,
28
+ justifyContent: "center",
29
+ alignItems: "center",
30
+ "data-testid": DropdownMenuDataTestId.LOADING,
31
+ tabIndex: 0,
32
+ role: "status",
33
+ innerRef: loadingRef,
34
+ "aria-busy": "true",
35
+ onKeyDown,
36
+ children: /* @__PURE__ */ jsx(DSCircularProgressIndicator, { size: "l" })
37
+ }
38
+ );
39
+ };
40
+ export {
41
+ DropdownMenuLoading
42
+ };
43
+ //# sourceMappingURL=DropdownMenuLoading.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropdownMenuLoading.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useContext, useLayoutEffect, useRef } from 'react';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { DropdownMenuDataTestId } from '../DropdownMenuDataTestId.js';\nimport { StyledLoadingWrapper } from '../styled.js';\n\nexport const DropdownMenuLoading: React.ComponentType<Record<string, never>> = () => {\n const {\n props: { onClickOutside },\n triggerReferenceElement,\n } = useContext(DSDropdownMenuContext);\n\n const loadingRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n loadingRef.current?.focus();\n }, [loadingRef]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n if (e.code === 'Escape' || e.code === 'ArrowLeft') onClickOutside(e);\n },\n [onClickOutside],\n );\n\n return (\n <StyledLoadingWrapper\n minWidth={triggerReferenceElement?.offsetWidth ?? 0}\n justifyContent=\"center\"\n alignItems=\"center\"\n data-testid={DropdownMenuDataTestId.LOADING}\n tabIndex={0}\n role=\"status\"\n innerRef={loadingRef}\n aria-busy=\"true\"\n onKeyDown={onKeyDown}\n >\n <DSCircularProgressIndicator size=\"l\" />\n </StyledLoadingWrapper>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqCjB;AArCN,SAAgB,aAAa,YAAY,iBAAiB,cAAc;AACxE,SAAS,mCAAmC;AAC5C,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAS,4BAA4B;AAE9B,MAAM,sBAAkE,MAAM;AACnF,QAAM;AAAA,IACJ,OAAO,EAAE,eAAe;AAAA,IACxB;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,aAAa,OAAuB,IAAI;AAE9C,kBAAgB,MAAM;AACpB,eAAW,SAAS,MAAM;AAAA,EAC5B,GAAG,CAAC,UAAU,CAAC;AAEf,QAAM,YAAwC;AAAA,IAC5C,CAAC,MAAM;AACL,UAAI,EAAE,SAAS,YAAY,EAAE,SAAS;AAAa,uBAAe,CAAC;AAAA,IACrE;AAAA,IACA,CAAC,cAAc;AAAA,EACjB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,yBAAyB,eAAe;AAAA,MAClD,gBAAe;AAAA,MACf,YAAW;AAAA,MACX,eAAa,uBAAuB;AAAA,MACpC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,UAAU;AAAA,MACV,aAAU;AAAA,MACV;AAAA,MAEA,8BAAC,+BAA4B,MAAK,KAAI;AAAA;AAAA,EACxC;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { SkeletonMenuItem } from "@elliemae/ds-menu-items";
4
+ import { Grid } from "@elliemae/ds-grid";
5
+ const DropdownMenuSkeleton = () => {
6
+ const SKELETON_AMOUNT = 5;
7
+ return /* @__PURE__ */ jsx(Grid, { children: Array(SKELETON_AMOUNT).fill(0).map((_, index) => /* @__PURE__ */ jsx(SkeletonMenuItem, { dsId: `${index}-skeleton` }, index)) });
8
+ };
9
+ export {
10
+ DropdownMenuSkeleton
11
+ };
12
+ //# sourceMappingURL=DropdownMenuSkeleton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropdownMenuSkeleton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SkeletonMenuItem } from '@elliemae/ds-menu-items';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const DropdownMenuSkeleton = () => {\n const SKELETON_AMOUNT = 5;\n\n return (\n <Grid>\n {Array(SKELETON_AMOUNT)\n .fill(0)\n .map((_, index) => (\n <SkeletonMenuItem key={index} dsId={`${index}-skeleton`} />\n ))}\n </Grid>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACYb;AAXV,SAAS,wBAAwB;AACjC,SAAS,YAAY;AAEd,MAAM,uBAAuB,MAAM;AACxC,QAAM,kBAAkB;AAExB,SACE,oBAAC,QACE,gBAAM,eAAe,EACnB,KAAK,CAAC,EACN,IAAI,CAAC,GAAG,UACP,oBAAC,oBAA6B,MAAM,GAAG,oBAAhB,KAAkC,CAC1D,GACL;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,102 @@
1
+ import * as React from "react";
2
+ import {
3
+ PropTypes,
4
+ globalAttributesPropTypes
5
+ } from "@elliemae/ds-props-helpers";
6
+ const optionTypes = PropTypes.oneOfType([
7
+ PropTypes.shape({
8
+ dsId: PropTypes.string.isRequired,
9
+ type: PropTypes.oneOf(["action"]),
10
+ label: PropTypes.string.isRequired,
11
+ secondaryLabel: PropTypes.string,
12
+ disabled: PropTypes.bool,
13
+ render: PropTypes.func
14
+ }),
15
+ PropTypes.shape({
16
+ dsId: PropTypes.string.isRequired,
17
+ type: PropTypes.oneOf(["single", "checkbox"]),
18
+ label: PropTypes.string.isRequired,
19
+ secondaryLabel: PropTypes.string,
20
+ value: PropTypes.any.isRequired,
21
+ disabled: PropTypes.bool,
22
+ render: PropTypes.func
23
+ }),
24
+ PropTypes.shape({
25
+ dsId: PropTypes.string.isRequired,
26
+ type: PropTypes.oneOf(["submenu", "singleWithSubmenu"]),
27
+ label: PropTypes.string.isRequired,
28
+ secondaryLabel: PropTypes.string,
29
+ value: PropTypes.any.isRequired,
30
+ disabled: PropTypes.bool,
31
+ rightAddon: PropTypes.oneOf(["chevron", "ellipsis"]),
32
+ options: PropTypes.array,
33
+ minWidth: PropTypes.any,
34
+ maxHeight: PropTypes.any,
35
+ render: PropTypes.func
36
+ }),
37
+ PropTypes.shape({
38
+ dsId: PropTypes.string.isRequired,
39
+ type: PropTypes.oneOf(["separator", "section"]),
40
+ label: PropTypes.string.isRequired,
41
+ render: PropTypes.func
42
+ })
43
+ ]);
44
+ const DSDropdownMenuV2PropTypes = {
45
+ options: PropTypes.arrayOf(optionTypes).description("The array of option for the menu").omitValidation().isRequired,
46
+ isOpened: PropTypes.bool.description("Whether the dropdown menu is opened or not").isRequired,
47
+ onClickOutside: PropTypes.func.description("Callback executed when you click outside the dropdown menu, or press the Esc key").defaultValue(() => null),
48
+ selectedOptions: PropTypes.object.description(
49
+ "Object with the ids of the options as keys, and booleans as keys. Represents the state of the current selection in the dropdown menu"
50
+ ).defaultValue({}),
51
+ onOptionClick: PropTypes.func.description(
52
+ "Callback triggered when an item is clicked or pressed. We provide the next selected options, the clicked option and the event, in that order"
53
+ ).defaultValue(() => null),
54
+ openedSubmenus: PropTypes.object.description(
55
+ "Object with the ids of the submenus as keys, and booleans as keys. Represents the state of the current opened submenus"
56
+ ).defaultValue({}),
57
+ onSubmenuToggle: PropTypes.func.description(
58
+ "Callback triggered when a submenu is opened or closed. We provide the next opened submenus, the clicked one and the event, in that order"
59
+ ).defaultValue(() => null),
60
+ startPlacementPreference: PropTypes.string.description("Where to place the popper for the dropdown menu").defaultValue("bottom-start"),
61
+ placementOrderPreference: PropTypes.arrayOf(PropTypes.string).description("Placement priorities for the dropdown menu").defaultValue(["bottom-start", "top-start", "right-start", "right-end", "left-start", "left-end"]),
62
+ customOffset: PropTypes.arrayOf(PropTypes.number).description("Custom offset for the dropdown menu").defaultValue([0, 4]),
63
+ wrapperStyles: PropTypes.object.description("Styling for the dropdown menu wrapper").defaultValue({}),
64
+ isLoading: PropTypes.bool.description("Whether the dropdown menu should render the loading indicator").defaultValue(false),
65
+ zIndex: PropTypes.number.description("ZIndex for the popper").defaultValue(10),
66
+ HeaderComp: PropTypes.func.description("Component to render as a header for the dropdown menu").defaultValue(void 0),
67
+ actionRef: PropTypes.object.description("Reference where all the exposed action callbacks will be exposed"),
68
+ minWidth: PropTypes.any.description("Minimum width for the dropdown menu").defaultValue(void 0),
69
+ maxHeight: PropTypes.any.description("Maximum height for the dropdown menu").defaultValue(void 0),
70
+ ...globalAttributesPropTypes,
71
+ onKeyDown: PropTypes.func.description("Callback executed when a key is pressed").defaultValue(() => null),
72
+ onMouseEnter: PropTypes.func.description("Callback executed when the mouse enter the dropdown menu").defaultValue(() => null),
73
+ onMouseLeave: PropTypes.func.description("Callback executed when the mouse leaves the dropdown menu").defaultValue(() => null),
74
+ isSkeleton: PropTypes.bool.description("Whether the dropdown menu should render the skeleton").defaultValue(false)
75
+ };
76
+ const defaultProps = {
77
+ onClickOutside: () => null,
78
+ onKeyDown: () => null,
79
+ onMouseEnter: () => null,
80
+ onMouseLeave: () => null,
81
+ selectedOptions: {},
82
+ onOptionClick: () => null,
83
+ openedSubmenus: {},
84
+ onSubmenuToggle: () => null,
85
+ isLoading: false,
86
+ hasInput: false,
87
+ inputValue: "",
88
+ inputPlaceholder: "Hint text",
89
+ onInputChange: () => null,
90
+ startPlacementPreference: "bottom-start",
91
+ placementOrderPreference: ["bottom-start", "top-start", "right-start", "right-end", "left-start", "left-end"],
92
+ customOffset: [0, 4],
93
+ wrapperStyles: {},
94
+ actionRef: { current: {} },
95
+ as: "div",
96
+ isSkeleton: false
97
+ };
98
+ export {
99
+ DSDropdownMenuV2PropTypes,
100
+ defaultProps
101
+ };
102
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-use-before-define */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual';\nimport {\n type GlobalAttributesT,\n PropTypes,\n type XstyledProps,\n globalAttributesPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\n\nexport namespace DSDropdownMenuT {\n type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n\n export interface RequiredProps {\n options: Item[];\n isOpened: boolean;\n }\n\n export interface DefaultProps {\n onClickOutside: (e: MouseEvent | React.KeyboardEvent | TouchEvent) => void;\n onKeyDown: React.KeyboardEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onMouseLeave: React.MouseEventHandler;\n selectedOptions: Record<string, boolean>;\n onOptionClick: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: Item,\n e: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n openedSubmenus: Record<string, boolean>;\n onSubmenuToggle: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: Item,\n e: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n isLoading: boolean;\n hasInput: boolean;\n inputValue: string;\n inputPlaceholder: string;\n onInputChange: React.FormEventHandler<HTMLInputElement>;\n startPlacementPreference: PopperPlacementsT;\n placementOrderPreference: PopperPlacementsT[];\n customOffset: [number, number];\n wrapperStyles: Record<string, unknown>;\n actionRef: React.MutableRefObject<Record<string, unknown>>;\n as: keyof JSX.IntrinsicElements;\n children?: React.ReactNode;\n isSkeleton: false;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n HeaderComp?: React.ComponentType<{ ctx?: DSDropdownMenuT.CTX }>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n Omit<XstyledProps, 'zIndex'>,\n RequiredProps {}\n\n export interface CTX {\n props: React.PropsWithChildren<InternalProps>;\n triggerReferenceElement: HTMLDivElement | null;\n setTriggerReferenceElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n listboxReference: React.RefObject<HTMLDivElement>;\n inputReference: React.RefObject<HTMLInputElement>;\n activeDescendant: string;\n setActiveDescendant: React.Dispatch<React.SetStateAction<string>>;\n scrollOptionIntoView: (dsId: string) => void;\n virtualListHelpers: ReturnType<typeof useVirtual>;\n DSDropdownMenuV2: React.ComponentType<Props>;\n }\n\n interface CommonItemOptions {\n dsId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n render?: React.ComponentType<any>;\n onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;\n onKeyDown?: (e: React.KeyboardEvent) => null;\n }\n\n export interface ItemActionOptions extends CommonItemOptions {\n type: 'action';\n label: string;\n value: unknown;\n disabled?: boolean;\n }\n\n export interface ItemSingleOptions extends CommonItemOptions {\n type: 'single';\n label: string;\n value: unknown;\n disabled?: boolean;\n }\n\n export interface ItemSingleWithSubmenuOptions extends CommonItemOptions {\n type: 'singleWithSubmenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n rightAddon?: 'chevron' | 'ellipsis';\n options: Item[];\n }\n\n export interface ItemCheckboxOptions extends CommonItemOptions {\n type: 'checkbox';\n label: string;\n value: unknown;\n disabled?: boolean;\n }\n\n export interface ItemSubmenuOptions extends CommonItemOptions {\n type: 'submenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n rightAddon?: 'chevron' | 'ellipsis';\n options: Item[];\n }\n\n export interface ItemSeparatorOptions extends CommonItemOptions {\n type: 'separator';\n }\n\n export interface ItemSectionOptions extends CommonItemOptions {\n type: 'section';\n label: string;\n }\n\n export interface ItemSkeletonOptions extends CommonItemOptions {\n type: 'skeleton';\n }\n\n export type Item =\n | ItemActionOptions\n | ItemSingleOptions\n | ItemCheckboxOptions\n | ItemSubmenuOptions\n | ItemSingleWithSubmenuOptions\n | ItemSeparatorOptions\n | ItemSectionOptions\n | ItemSkeletonOptions;\n\n export interface ItemDictionary {\n [dsId: string]: {\n original: Item;\n containerRef: React.RefObject<HTMLDivElement>;\n parent: string | null;\n };\n }\n}\n\nconst optionTypes = PropTypes.oneOfType([\n PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['action']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n }),\n PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['single', 'checkbox']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n }),\n PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['submenu', 'singleWithSubmenu']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n rightAddon: PropTypes.oneOf(['chevron', 'ellipsis']),\n options: PropTypes.array,\n minWidth: PropTypes.any,\n maxHeight: PropTypes.any,\n render: PropTypes.func,\n }),\n PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['separator', 'section']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n }),\n]);\n\nexport const DSDropdownMenuV2PropTypes = {\n options: PropTypes.arrayOf(optionTypes).description('The array of option for the menu').omitValidation().isRequired,\n isOpened: PropTypes.bool.description('Whether the dropdown menu is opened or not').isRequired,\n onClickOutside: PropTypes.func\n .description('Callback executed when you click outside the dropdown menu, or press the Esc key')\n .defaultValue(() => null),\n selectedOptions: PropTypes.object\n .description(\n 'Object with the ids of the options as keys, and booleans as keys. Represents the state of the current selection in the dropdown menu',\n )\n .defaultValue({}),\n onOptionClick: PropTypes.func\n .description(\n 'Callback triggered when an item is clicked or pressed. We provide the next selected options, the clicked option and the event, in that order',\n )\n .defaultValue(() => null),\n openedSubmenus: PropTypes.object\n .description(\n 'Object with the ids of the submenus as keys, and booleans as keys. Represents the state of the current opened submenus',\n )\n .defaultValue({}),\n onSubmenuToggle: PropTypes.func\n .description(\n 'Callback triggered when a submenu is opened or closed. We provide the next opened submenus, the clicked one and the event, in that order',\n )\n .defaultValue(() => null),\n startPlacementPreference: PropTypes.string\n .description('Where to place the popper for the dropdown menu')\n .defaultValue('bottom-start'),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.string)\n .description('Placement priorities for the dropdown menu')\n .defaultValue(['bottom-start', 'top-start', 'right-start', 'right-end', 'left-start', 'left-end']),\n customOffset: PropTypes.arrayOf(PropTypes.number)\n .description('Custom offset for the dropdown menu')\n .defaultValue([0, 4]),\n wrapperStyles: PropTypes.object.description('Styling for the dropdown menu wrapper').defaultValue({}),\n isLoading: PropTypes.bool\n .description('Whether the dropdown menu should render the loading indicator')\n .defaultValue(false),\n zIndex: PropTypes.number.description('ZIndex for the popper').defaultValue(10),\n HeaderComp: PropTypes.func\n .description('Component to render as a header for the dropdown menu')\n .defaultValue(undefined),\n actionRef: PropTypes.object.description('Reference where all the exposed action callbacks will be exposed'),\n minWidth: PropTypes.any.description('Minimum width for the dropdown menu').defaultValue(undefined),\n maxHeight: PropTypes.any.description('Maximum height for the dropdown menu').defaultValue(undefined),\n ...globalAttributesPropTypes,\n onKeyDown: PropTypes.func.description('Callback executed when a key is pressed').defaultValue(() => null),\n onMouseEnter: PropTypes.func\n .description('Callback executed when the mouse enter the dropdown menu')\n .defaultValue(() => null),\n onMouseLeave: PropTypes.func\n .description('Callback executed when the mouse leaves the dropdown menu')\n .defaultValue(() => null),\n isSkeleton: PropTypes.bool.description('Whether the dropdown menu should render the skeleton').defaultValue(false),\n} as WeakValidationMap<unknown>;\n\nexport const defaultProps: DSDropdownMenuT.DefaultProps = {\n onClickOutside: () => null,\n onKeyDown: () => null,\n onMouseEnter: () => null,\n onMouseLeave: () => null,\n selectedOptions: {},\n onOptionClick: () => null,\n openedSubmenus: {},\n onSubmenuToggle: () => null,\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: 'Hint text',\n onInputChange: () => null,\n startPlacementPreference: 'bottom-start',\n placementOrderPreference: ['bottom-start', 'top-start', 'right-start', 'right-end', 'left-start', 'left-end'],\n customOffset: [0, 4],\n wrapperStyles: {},\n actionRef: { current: {} },\n as: 'div',\n isSkeleton: false,\n};\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,90 @@
1
+ import * as React from "react";
2
+ import { Grid } from "@elliemae/ds-grid";
3
+ import { styled, space, sizing, position, layout } from "@elliemae/ds-system";
4
+ import { DSDropdownMenuName, DSDropdownMenuSlots } from "./exported-related/index.js";
5
+ const StyledTriggerWrapper = styled("div", { name: DSDropdownMenuName, slot: DSDropdownMenuSlots.ROOT })`
6
+ width: fit-content;
7
+ ${space}
8
+ ${sizing}
9
+ ${position}
10
+ ${layout}
11
+ `;
12
+ const StyledListBoxWrapper = styled("div", {
13
+ name: DSDropdownMenuName,
14
+ slot: DSDropdownMenuSlots.LISTBOX_WRAPPER
15
+ })`
16
+ ${sizing}
17
+ padding: ${(props) => props.hasHeader ? 0 : "4px"} 0 4px 0;
18
+ overflow-y: auto;
19
+ background-color: white;
20
+ outline: none;
21
+ list-style: none;
22
+ `;
23
+ const StyledOptionListWrapper = styled("ul", {
24
+ name: DSDropdownMenuName,
25
+ slot: DSDropdownMenuSlots.OPTION_LIST_WRAPPER
26
+ })`
27
+ position: relative;
28
+ margin: 0;
29
+ padding: 0;
30
+ list-style: none;
31
+ outline: none;
32
+ `;
33
+ const StyledLoadingWrapper = styled(Grid, {
34
+ name: DSDropdownMenuName,
35
+ slot: DSDropdownMenuSlots.LOADING_WRAPPER
36
+ })`
37
+ height: ${(props) => props.theme.space.xxl};
38
+ min-width: ${(props) => props.minWidth}px;
39
+ background-color: white;
40
+ outline: none;
41
+ `;
42
+ const StyledEmptyStateWrapper = styled(Grid, {
43
+ name: DSDropdownMenuName,
44
+ slot: DSDropdownMenuSlots.EMPTY_STATE_WRAPPER
45
+ })`
46
+ font-weight: ${(props) => props.theme.fontWeights.regular};
47
+ font-size: ${(props) => props.theme.fontSizes.value[500]};
48
+ color: ${(props) => props.theme.colors.neutral[500]};
49
+ `;
50
+ const StyledInputWrapper = styled(Grid)`
51
+ padding-top: ${(props) => props.hasHeader ? props.theme.space.xxs : 0};
52
+ padding-left: ${(props) => props.theme.space.xxs};
53
+ padding-right: ${(props) => props.theme.space.xxs};
54
+ padding-bottom: ${(props) => props.theme.space.xxs};
55
+
56
+ .em-ds-input {
57
+ :focus,
58
+ :hover {
59
+ outline: none !important;
60
+ border: none !important;
61
+ box-shadow: none !important;
62
+ }
63
+ :focus {
64
+ border: 1px solid ${(props) => props.theme.colors.brand[700]} !important;
65
+ box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.brand[700]} !important;
66
+ }
67
+ }
68
+ `;
69
+ const StyledHeaderWrapper = styled(Grid, { name: DSDropdownMenuName, slot: DSDropdownMenuSlots.HEADER_WRAPPER })`
70
+ width: 100%;
71
+ border-bottom: 1px solid ${(props) => props.theme.colors.neutral[300]};
72
+ color: ${(props) => props.theme.colors.neutral[500]};
73
+ font-size: 12px;
74
+ padding-left: ${(props) => props.theme.space.xxxs};
75
+ position: sticky;
76
+ top: 0;
77
+ z-index: 20;
78
+ background-color: white;
79
+ min-height: 16px;
80
+ `;
81
+ export {
82
+ StyledEmptyStateWrapper,
83
+ StyledHeaderWrapper,
84
+ StyledInputWrapper,
85
+ StyledListBoxWrapper,
86
+ StyledLoadingWrapper,
87
+ StyledOptionListWrapper,
88
+ StyledTriggerWrapper
89
+ };
90
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { styled, space, sizing, position, layout } from '@elliemae/ds-system';\nimport type { LayoutProps, SpaceProps, SizingProps, PositionProps } from '@elliemae/ds-system';\nimport { DSDropdownMenuName, DSDropdownMenuSlots } from './exported-related/index.js';\n\nexport const StyledTriggerWrapper = styled('div', { name: DSDropdownMenuName, slot: DSDropdownMenuSlots.ROOT })<\n LayoutProps & SpaceProps & SizingProps & PositionProps\n>`\n width: fit-content;\n ${space}\n ${sizing}\n ${position}\n ${layout}\n`;\n\nexport const StyledListBoxWrapper = styled('div', {\n name: DSDropdownMenuName,\n slot: DSDropdownMenuSlots.LISTBOX_WRAPPER,\n})<{ minWidth: SizingProps['minWidth']; maxHeight: SizingProps['maxHeight']; hasHeader: boolean }>`\n ${sizing}\n padding: ${(props) => (props.hasHeader ? 0 : '4px')} 0 4px 0;\n overflow-y: auto;\n background-color: white;\n outline: none;\n list-style: none;\n`;\n\nexport const StyledOptionListWrapper = styled('ul', {\n name: DSDropdownMenuName,\n slot: DSDropdownMenuSlots.OPTION_LIST_WRAPPER,\n})`\n position: relative;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: none;\n`;\n\nexport const StyledLoadingWrapper = styled(Grid, {\n name: DSDropdownMenuName,\n slot: DSDropdownMenuSlots.LOADING_WRAPPER,\n})<{ minWidth: number }>`\n height: ${(props) => props.theme.space.xxl};\n min-width: ${(props) => props.minWidth}px;\n background-color: white;\n outline: none;\n`;\n\nexport const StyledEmptyStateWrapper = styled(Grid, {\n name: DSDropdownMenuName,\n slot: DSDropdownMenuSlots.EMPTY_STATE_WRAPPER,\n})<{ minWidth: SizingProps['minWidth']; maxHeight: SizingProps['maxHeight'] }>`\n font-weight: ${(props) => props.theme.fontWeights.regular};\n font-size: ${(props) => props.theme.fontSizes.value[500]};\n color: ${(props) => props.theme.colors.neutral[500]};\n`;\n\nexport const StyledInputWrapper = styled(Grid)<{ hasHeader: boolean }>`\n padding-top: ${(props) => (props.hasHeader ? props.theme.space.xxs : 0)};\n padding-left: ${(props) => props.theme.space.xxs};\n padding-right: ${(props) => props.theme.space.xxs};\n padding-bottom: ${(props) => props.theme.space.xxs};\n\n .em-ds-input {\n :focus,\n :hover {\n outline: none !important;\n border: none !important;\n box-shadow: none !important;\n }\n :focus {\n border: 1px solid ${(props) => props.theme.colors.brand[700]} !important;\n box-shadow: inset 0 0 0 1px ${(props) => props.theme.colors.brand[700]} !important;\n }\n }\n`;\n\nexport const StyledHeaderWrapper = styled(Grid, { name: DSDropdownMenuName, slot: DSDropdownMenuSlots.HEADER_WRAPPER })`\n width: 100%;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral[300]};\n color: ${(props) => props.theme.colors.neutral[500]};\n font-size: 12px;\n padding-left: ${(props) => props.theme.space.xxxs};\n position: sticky;\n top: 0;\n z-index: 20;\n background-color: white;\n min-height: 16px;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AACrB,SAAS,QAAQ,OAAO,QAAQ,UAAU,cAAc;AAExD,SAAS,oBAAoB,2BAA2B;AAEjD,MAAM,uBAAuB,OAAO,OAAO,EAAE,MAAM,oBAAoB,MAAM,oBAAoB,KAAK,CAAC;AAAA;AAAA,IAI1G;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,IACG;AAAA,aACS,CAAC,UAAW,MAAM,YAAY,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxC,MAAM,0BAA0B,OAAO,MAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQM,MAAM,uBAAuB,OAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,YACW,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,eAC1B,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAKzB,MAAM,0BAA0B,OAAO,MAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,iBACgB,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,eACrC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA,WAC9C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAG7C,MAAM,qBAAqB,OAAO,IAAI;AAAA,iBAC5B,CAAC,UAAW,MAAM,YAAY,MAAM,MAAM,MAAM,MAAM;AAAA,kBACrD,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC5B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,oBAC5B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAUvB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA,oCAC7B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAKpE,MAAM,sBAAsB,OAAO,MAAM,EAAE,MAAM,oBAAoB,MAAM,oBAAoB,eAAe,CAAC;AAAA;AAAA,6BAEzF,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,WAC3D,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,kBAElC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ const findInCircularList = (list, from, criteria, step = 1) => {
3
+ for (let i = (from + step + list.length) % list.length; i !== from; i = (i + step + list.length) % list.length) {
4
+ if (criteria(list[i]))
5
+ return i;
6
+ }
7
+ return from;
8
+ };
9
+ export {
10
+ findInCircularList
11
+ };
12
+ //# sourceMappingURL=findInCircularList.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/findInCircularList.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const findInCircularList = <T>(list: T[], from: number, criteria: (item: T) => boolean, step = 1): number => {\n for (let i = (from + step + list.length) % list.length; i !== from; i = (i + step + list.length) % list.length) {\n if (criteria(list[i])) return i;\n }\n return from; // return same item\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,qBAAqB,CAAI,MAAW,MAAc,UAAgC,OAAO,MAAc;AAClH,WAAS,KAAK,OAAO,OAAO,KAAK,UAAU,KAAK,QAAQ,MAAM,MAAM,KAAK,IAAI,OAAO,KAAK,UAAU,KAAK,QAAQ;AAC9G,QAAI,SAAS,KAAK,CAAC,CAAC;AAAG,aAAO;AAAA,EAChC;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export * from "./findInCircularList.js";
3
+ export * from "./isOptionFocuseable.js";
4
+ export * from "./manageOpenedSubmenus.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './findInCircularList.js';\nexport * from './isOptionFocuseable.js';\nexport * from './manageOpenedSubmenus.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ const isOptionFocuseable = (opt) => !["section", "separator"].includes(opt.type) && !("disabled" in opt && opt.disabled);
3
+ export {
4
+ isOptionFocuseable
5
+ };
6
+ //# sourceMappingURL=isOptionFocuseable.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/isOptionFocuseable.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSDropdownMenuT } from '../react-desc-prop-types.js';\n\nexport const isOptionFocuseable = (opt: DSDropdownMenuT.Item): boolean =>\n !['section', 'separator'].includes(opt.type) && !('disabled' in opt && opt.disabled);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEhB,MAAM,qBAAqB,CAAC,QACjC,CAAC,CAAC,WAAW,WAAW,EAAE,SAAS,IAAI,IAAI,KAAK,EAAE,cAAc,OAAO,IAAI;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ const isSubmenu = (item) => item.type === "submenu" || item.type === "singleWithSubmenu";
3
+ const buildItemToParentObject = (options, parent = "__root") => {
4
+ let obj = {};
5
+ options?.forEach((opt) => {
6
+ if (isSubmenu(opt)) {
7
+ obj[opt.dsId] = parent;
8
+ if ("options" in opt) {
9
+ obj = { ...obj, ...buildItemToParentObject(opt.options, opt.dsId) };
10
+ }
11
+ }
12
+ });
13
+ return obj;
14
+ };
15
+ const manageOpenedSubmenus = (options, selectedOptions, clickedOption) => {
16
+ if (!isSubmenu(clickedOption)) {
17
+ return selectedOptions;
18
+ }
19
+ if (selectedOptions[clickedOption.dsId] === false) {
20
+ return selectedOptions;
21
+ }
22
+ const itemToParent = buildItemToParentObject(options);
23
+ const nextSelectedOptions = { ...selectedOptions };
24
+ Object.keys(itemToParent).forEach((item) => {
25
+ nextSelectedOptions[item] = false;
26
+ });
27
+ let currentItem = clickedOption.dsId;
28
+ while (currentItem !== "__root") {
29
+ nextSelectedOptions[currentItem] = true;
30
+ currentItem = itemToParent[currentItem];
31
+ }
32
+ return nextSelectedOptions;
33
+ };
34
+ export {
35
+ manageOpenedSubmenus
36
+ };
37
+ //# sourceMappingURL=manageOpenedSubmenus.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/manageOpenedSubmenus.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSDropdownMenuT } from '../react-desc-prop-types.js';\n\nconst isSubmenu = (item: DSDropdownMenuT.Item): boolean => item.type === 'submenu' || item.type === 'singleWithSubmenu';\n\nconst buildItemToParentObject = (options: DSDropdownMenuT.Item[], parent = '__root'): Record<string, string> => {\n let obj: Record<string, string> = {};\n options?.forEach((opt) => {\n if (isSubmenu(opt)) {\n obj[opt.dsId] = parent;\n if ('options' in opt) {\n obj = { ...obj, ...buildItemToParentObject(opt.options, opt.dsId) };\n }\n }\n });\n return obj;\n};\n\nexport const manageOpenedSubmenus = (\n options: DSDropdownMenuT.Item[],\n selectedOptions: Record<string, boolean>,\n clickedOption: DSDropdownMenuT.Item,\n): Record<string, boolean> => {\n // If this options is not a submenu, do nothing\n if (!isSubmenu(clickedOption)) {\n return selectedOptions;\n }\n\n // If we are closing this submenu, do nothing\n if (selectedOptions[clickedOption.dsId] === false) {\n return selectedOptions;\n }\n\n // Get the item --> parent relationships of the submenus\n const itemToParent = buildItemToParentObject(options);\n\n // Clone the selected options\n const nextSelectedOptions = { ...selectedOptions };\n\n // Close all submenus\n Object.keys(itemToParent).forEach((item) => {\n nextSelectedOptions[item] = false;\n });\n\n // Open this submenu and all of it's parents\n let currentItem = clickedOption.dsId;\n while (currentItem !== '__root') {\n nextSelectedOptions[currentItem] = true;\n currentItem = itemToParent[currentItem];\n }\n\n return nextSelectedOptions;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,YAAY,CAAC,SAAwC,KAAK,SAAS,aAAa,KAAK,SAAS;AAEpG,MAAM,0BAA0B,CAAC,SAAiC,SAAS,aAAqC;AAC9G,MAAI,MAA8B,CAAC;AACnC,WAAS,QAAQ,CAAC,QAAQ;AACxB,QAAI,UAAU,GAAG,GAAG;AAClB,UAAI,IAAI,IAAI,IAAI;AAChB,UAAI,aAAa,KAAK;AACpB,cAAM,EAAE,GAAG,KAAK,GAAG,wBAAwB,IAAI,SAAS,IAAI,IAAI,EAAE;AAAA,MACpE;AAAA,IACF;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEO,MAAM,uBAAuB,CAClC,SACA,iBACA,kBAC4B;AAE5B,MAAI,CAAC,UAAU,aAAa,GAAG;AAC7B,WAAO;AAAA,EACT;AAGA,MAAI,gBAAgB,cAAc,IAAI,MAAM,OAAO;AACjD,WAAO;AAAA,EACT;AAGA,QAAM,eAAe,wBAAwB,OAAO;AAGpD,QAAM,sBAAsB,EAAE,GAAG,gBAAgB;AAGjD,SAAO,KAAK,YAAY,EAAE,QAAQ,CAAC,SAAS;AAC1C,wBAAoB,IAAI,IAAI;AAAA,EAC9B,CAAC;AAGD,MAAI,cAAc,cAAc;AAChC,SAAO,gBAAgB,UAAU;AAC/B,wBAAoB,WAAW,IAAI;AACnC,kBAAc,aAAa,WAAW;AAAA,EACxC;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { DSDropdownMenuT } from './react-desc-prop-types.js';
3
+ declare const DSDropdownMenuV2: React.ComponentType<DSDropdownMenuT.Props>;
4
+ declare const DSDropdownMenuV2WithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSDropdownMenuT.Props>;
5
+ export { DSDropdownMenuV2, DSDropdownMenuV2WithSchema };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { DSDropdownMenuT } from './react-desc-prop-types.js';
3
+ export declare const DSDropdownMenuContext: import("react").Context<DSDropdownMenuT.CTX>;
@@ -0,0 +1,7 @@
1
+ export declare const DropdownMenuDataTestId: {
2
+ TRIGGER_WRAPPER: string;
3
+ LISTBOX: string;
4
+ MENU_WRAPPER: string;
5
+ LOADING: string;
6
+ OPTION: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { DSDropdownMenuT } from '../react-desc-prop-types.js';
2
+ export declare const useDropdownMenuConfig: (props: DSDropdownMenuT.Props, self: React.ComponentType<DSDropdownMenuT.Props>) => DSDropdownMenuT.CTX;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const useReferenceConfig: () => {
3
+ triggerReferenceElement: HTMLDivElement | null;
4
+ setTriggerReferenceElement: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
5
+ listboxReference: import("react").RefObject<HTMLDivElement>;
6
+ inputReference: import("react").RefObject<HTMLInputElement>;
7
+ };
@@ -0,0 +1,9 @@
1
+ export declare const DSDropdownMenuName = "DSDropdownMenu";
2
+ export declare const DSDropdownMenuSlots: {
3
+ ROOT: string;
4
+ LOADING_WRAPPER: string;
5
+ LISTBOX_WRAPPER: string;
6
+ HEADER_WRAPPER: string;
7
+ OPTION_LIST_WRAPPER: string;
8
+ EMPTY_STATE_WRAPPER: string;
9
+ };
@@ -0,0 +1 @@
1
+ export * from './constants.js';
@@ -0,0 +1,3 @@
1
+ export * from './useAutofocusContainerOnOpen.js';
2
+ export * from './useDropdownMenuItemHandlers.js';
3
+ export * from './useGetOptionSpecialAttributes.js';
@@ -0,0 +1 @@
1
+ export declare const useAutofocusContainerOnOpen: () => void;
@@ -0,0 +1,8 @@
1
+ import type React from 'react';
2
+ type UseDropdownListboxHandlersType = () => {
3
+ onKeyDown: React.KeyboardEventHandler;
4
+ onMouseEnter: React.MouseEventHandler;
5
+ onMouseLeave?: React.MouseEventHandler;
6
+ };
7
+ export declare const useDropdownListboxHandlers: UseDropdownListboxHandlersType;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import type { DSDropdownMenuT } from '../react-desc-prop-types.js';
3
+ type UseDropdownMenuItemHandlersType = (option: DSDropdownMenuT.Item) => {
4
+ onClick: (e: React.MouseEvent | React.KeyboardEvent) => void;
5
+ onSubmenuOpen: (e: React.MouseEvent | React.KeyboardEvent) => void;
6
+ onSubmenuClose: (e: React.MouseEvent | React.KeyboardEvent) => void;
7
+ onDropdownKeyDown: React.KeyboardEventHandler;
8
+ onMouseEnter: React.MouseEventHandler;
9
+ onMouseLeave: React.MouseEventHandler;
10
+ };
11
+ export declare const useDropdownMenuItemHandlers: UseDropdownMenuItemHandlersType;
12
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const useGetOptionSpecialAttributes: () => {
2
+ optionsShouldHavePadding: boolean;
3
+ };
@@ -0,0 +1,4 @@
1
+ export * from './DSDropdownMenu.js';
2
+ export * from './exported-related/index.js';
3
+ export type { DSDropdownMenuT } from './react-desc-prop-types.js';
4
+ export { DropdownMenuDataTestId } from './DropdownMenuDataTestId.js';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DropdownMenuContent: React.ComponentType<Record<string, never>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { SizingProps } from '@elliemae/ds-system';
3
+ interface DropdownMenuEmptyStateProps {
4
+ minWidth: SizingProps['minWidth'];
5
+ maxHeight: SizingProps['maxHeight'];
6
+ }
7
+ export declare const DropdownMenuEmptyState: React.FC<DropdownMenuEmptyStateProps>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { DSDropdownMenuT } from '../react-desc-prop-types.js';
3
+ export declare const DropdownMenuItemFactory: React.ComponentType<{
4
+ option: DSDropdownMenuT.Item;
5
+ style?: Record<string, unknown>;
6
+ innerRef?: (el: HTMLElement) => void;
7
+ optionsShouldHavePadding: boolean;
8
+ }>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DropdownMenuListBox: React.ComponentType<Record<string, never>>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DropdownMenuLoading: React.ComponentType<Record<string, never>>;
@@ -0,0 +1 @@
1
+ export declare const DropdownMenuSkeleton: () => import("react/jsx-runtime").JSX.Element;