@elliemae/ds-dropdownmenu-v2 3.50.1-next.9 → 3.51.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ __export(constants_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(constants_exports);
36
36
  var React = __toESM(require("react"));
37
- const DSDropdownMenuName = "DSDropdownMenu";
37
+ const DSDropdownMenuName = "DSDropdownmenu";
38
38
  const DSDropdownMenuSlots = {
39
39
  ROOT: "root",
40
40
  LOADING_WRAPPER: "loading-wrapper",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/exported-related/constants.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSDropdownMenuName = 'DSDropdownMenu';\n\nexport const DSDropdownMenuSlots = {\n ROOT: 'root',\n LOADING_WRAPPER: 'loading-wrapper',\n LISTBOX_WRAPPER: 'listbox-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n OPTION_LIST_WRAPPER: 'option-list-wrapper',\n EMPTY_STATE_WRAPPER: 'empty-state-wrapper',\n};\n\nexport const DSDropdownMenuPlacements = {\n TOP_START: 'top-start' as const,\n TOP: 'top' as const,\n TOP_END: 'top-end' as const,\n RIGHT_START: 'right-start' as const,\n RIGHT: 'right' as const,\n RIGHT_END: 'right-end' as const,\n BOTTOM_END: 'bottom-end' as const,\n BOTTOM: 'bottom' as const,\n BOTTOM_START: 'bottom-start' as const,\n LEFT_END: 'left-end' as const,\n LEFT: 'left' as const,\n LEFT_START: 'left-start' as const,\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["export const DSDropdownMenuName = 'DSDropdownmenu';\n\nexport const DSDropdownMenuSlots = {\n ROOT: 'root',\n LOADING_WRAPPER: 'loading-wrapper',\n LISTBOX_WRAPPER: 'listbox-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n OPTION_LIST_WRAPPER: 'option-list-wrapper',\n EMPTY_STATE_WRAPPER: 'empty-state-wrapper',\n};\n\nexport const DSDropdownMenuPlacements = {\n TOP_START: 'top-start' as const,\n TOP: 'top' as const,\n TOP_END: 'top-end' as const,\n RIGHT_START: 'right-start' as const,\n RIGHT: 'right' as const,\n RIGHT_END: 'right-end' as const,\n BOTTOM_END: 'bottom-end' as const,\n BOTTOM: 'bottom' as const,\n BOTTOM_START: 'bottom-start' as const,\n LEFT_END: 'left-end' as const,\n LEFT: 'left' as const,\n LEFT_START: 'left-start' as const,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB;AAE3B,MAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEO,MAAM,2BAA2B;AAAA,EACtC,WAAW;AAAA,EACX,KAAK;AAAA,EACL,SAAS;AAAA,EACT,aAAa;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/DropdownMenuEmptyState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { StyledEmptyStateWrapper } from '../styled.js';\nimport type { SizingProps } from '@elliemae/ds-system';\n\ninterface DropdownMenuEmptyStateProps {\n minWidth: SizingProps['minWidth'];\n maxHeight: SizingProps['maxHeight'];\n}\nexport const DropdownMenuEmptyState: React.FC<DropdownMenuEmptyStateProps> = (props) => (\n <StyledEmptyStateWrapper px=\"xxs\" py=\"xxxs\" role=\"alert\" {...props}>\n No content available\n </StyledEmptyStateWrapper>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADSrB;AARF,oBAAwC;AAOjC,MAAM,yBAAgE,CAAC,UAC5E,4CAAC,yCAAwB,IAAG,OAAM,IAAG,QAAO,MAAK,SAAS,GAAG,OAAO,kCAEpE;",
4
+ "sourcesContent": ["import React from 'react';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport { StyledEmptyStateWrapper } from '../styled.js';\n\ninterface DropdownMenuEmptyStateProps {\n minWidth: SizingProps['minWidth'];\n maxHeight: SizingProps['maxHeight'];\n}\nexport const DropdownMenuEmptyState: React.FC<DropdownMenuEmptyStateProps> = (props) => (\n <StyledEmptyStateWrapper px=\"xxs\" py=\"xxxs\" role=\"alert\" {...props}>\n No content available\n </StyledEmptyStateWrapper>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADSrB;AAPF,oBAAwC;AAMjC,MAAM,yBAAgE,CAAC,UAC5E,4CAAC,yCAAwB,IAAG,OAAM,IAAG,QAAO,MAAK,SAAS,GAAG,OAAO,kCAEpE;",
6
6
  "names": []
7
7
  }
@@ -48,7 +48,7 @@ const menuItemMap = [
48
48
  "skeleton"
49
49
  ];
50
50
  const Component = (props) => {
51
- const type = props.type;
51
+ const { type } = props;
52
52
  switch (type) {
53
53
  case "action":
54
54
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items.ActionMenuItem, { ...props });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/DropdownMenuItemFactory.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport {\n ActionMenuItem,\n SingleMenuItem,\n MultiMenuItem,\n SubmenuItem,\n Separator,\n Section,\n SingleWithSubmenuItem,\n SkeletonMenuItem,\n} from '@elliemae/ds-menu-items';\nimport type { DSDropdownMenuT } from '../react-desc-prop-types.js';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { useDropdownMenuItemHandlers } from '../hooks/index.js';\n\nconst menuItemMap = [\n 'action',\n 'single',\n 'checkbox',\n 'submenu',\n 'separator',\n 'section',\n 'singleWithSubmenu',\n 'skeleton',\n] as const;\n\nconst Component = (props: DSDropdownMenuT.Item) => {\n const type = props.type;\n switch (type) {\n case 'action':\n return <ActionMenuItem {...props} />;\n case 'single':\n return <SingleMenuItem {...props} />;\n case 'checkbox':\n return <MultiMenuItem {...props} />;\n case 'submenu':\n return <SubmenuItem {...props} />;\n case 'separator':\n return <Separator {...props} />;\n case 'section':\n return <Section {...props} />;\n case 'singleWithSubmenu':\n return <SingleWithSubmenuItem {...props} />;\n case 'skeleton':\n return <SkeletonMenuItem {...props} />;\n default:\n // The purpose of 'UnexpectedOptionType' is to make sure that whenever we reach the default case, the type must be never\n // If it isn't, we forgot to add a case for a new option type that was added to DSDropdownMenuT.Item\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n const UnexpectedOptionType: never = type;\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Provided option type (${type}) is not valid. Please provide one of: ${menuItemMap.join(', ')}`);\n }\n};\n\nexport const DropdownMenuItemFactory: React.ComponentType<{\n option: DSDropdownMenuT.Item;\n style?: Record<string, unknown>;\n innerRef?: (el: HTMLElement) => void;\n optionsShouldHavePadding: boolean;\n}> = ({ option, style, innerRef, optionsShouldHavePadding }): JSX.Element => {\n const {\n props: { selectedOptions, onOptionClick, openedSubmenus, onSubmenuToggle, onClickOutside },\n activeDescendant,\n DSDropdownMenuV2,\n } = useContext(DSDropdownMenuContext);\n\n const { onDropdownKeyDown, ...handlers } = useDropdownMenuItemHandlers(option);\n\n const itemProps = useMemo(\n () => ({\n ...handlers,\n innerRef,\n isActive: activeDescendant === option.dsId,\n isSelected: selectedOptions ? !!selectedOptions[option.dsId] : false,\n isSubmenuOpened: openedSubmenus ? !!openedSubmenus[option.dsId] : false,\n tabIndex: -1 as const,\n optionsShouldHavePadding,\n wrapperStyles: style,\n Dropdown: DSDropdownMenuV2,\n dropdownProps: {\n ...option,\n options: option.type === 'submenu' || option.type === 'singleWithSubmenu' ? option.options : [],\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n selectedOptions,\n openedSubmenus,\n onKeyDown: onDropdownKeyDown,\n },\n }),\n [\n handlers,\n innerRef,\n activeDescendant,\n option,\n selectedOptions,\n openedSubmenus,\n optionsShouldHavePadding,\n style,\n DSDropdownMenuV2,\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n onDropdownKeyDown,\n ],\n );\n\n return <Component {...option} {...itemProps} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BV;AA9Bb,mBAA2C;AAC3C,2BASO;AAEP,iCAAsC;AACtC,mBAA4C;AAE5C,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,YAAY,CAAC,UAAgC;AACjD,QAAM,OAAO,MAAM;AACnB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,4CAAC,uCAAgB,GAAG,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,4CAAC,uCAAgB,GAAG,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,4CAAC,sCAAe,GAAG,OAAO;AAAA,IACnC,KAAK;AACH,aAAO,4CAAC,oCAAa,GAAG,OAAO;AAAA,IACjC,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;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO,4CAAC,aAAW,GAAG,QAAS,GAAG,WAAW;AAC/C;",
4
+ "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport {\n ActionMenuItem,\n SingleMenuItem,\n MultiMenuItem,\n SubmenuItem,\n Separator,\n Section,\n SingleWithSubmenuItem,\n SkeletonMenuItem,\n} from '@elliemae/ds-menu-items';\nimport type { DSDropdownMenuT } from '../react-desc-prop-types.js';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { useDropdownMenuItemHandlers } from '../hooks/index.js';\n\nconst menuItemMap = [\n 'action',\n 'single',\n 'checkbox',\n 'submenu',\n 'separator',\n 'section',\n 'singleWithSubmenu',\n 'skeleton',\n] as const;\n\nconst Component = (props: DSDropdownMenuT.Item) => {\n const { type } = props;\n switch (type) {\n case 'action':\n return <ActionMenuItem {...props} />;\n case 'single':\n return <SingleMenuItem {...props} />;\n case 'checkbox':\n return <MultiMenuItem {...props} />;\n case 'submenu':\n return <SubmenuItem {...props} />;\n case 'separator':\n return <Separator {...props} />;\n case 'section':\n return <Section {...props} />;\n case 'singleWithSubmenu':\n return <SingleWithSubmenuItem {...props} />;\n case 'skeleton':\n return <SkeletonMenuItem {...props} />;\n default:\n // The purpose of 'UnexpectedOptionType' is to make sure that whenever we reach the default case, the type must be never\n // If it isn't, we forgot to add a case for a new option type that was added to DSDropdownMenuT.Item\n // this way tslint will be used to catch this mistake\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, no-case-declarations\n const UnexpectedOptionType: never = type;\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions,\n throw new Error(`Provided option type (${type}) is not valid. Please provide one of: ${menuItemMap.join(', ')}`);\n }\n};\n\nexport const DropdownMenuItemFactory: React.ComponentType<{\n option: DSDropdownMenuT.Item;\n style?: Record<string, unknown>;\n innerRef?: (el: HTMLElement) => void;\n optionsShouldHavePadding: boolean;\n}> = ({ option, style, innerRef, optionsShouldHavePadding }): JSX.Element => {\n const {\n props: { selectedOptions, onOptionClick, openedSubmenus, onSubmenuToggle, onClickOutside },\n activeDescendant,\n DSDropdownMenuV2,\n } = useContext(DSDropdownMenuContext);\n\n const { onDropdownKeyDown, ...handlers } = useDropdownMenuItemHandlers(option);\n\n const itemProps = useMemo(\n () => ({\n ...handlers,\n innerRef,\n isActive: activeDescendant === option.dsId,\n isSelected: selectedOptions ? !!selectedOptions[option.dsId] : false,\n isSubmenuOpened: openedSubmenus ? !!openedSubmenus[option.dsId] : false,\n tabIndex: -1 as const,\n optionsShouldHavePadding,\n wrapperStyles: style,\n Dropdown: DSDropdownMenuV2,\n dropdownProps: {\n ...option,\n options: option.type === 'submenu' || option.type === 'singleWithSubmenu' ? option.options : [],\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n selectedOptions,\n openedSubmenus,\n onKeyDown: onDropdownKeyDown,\n },\n }),\n [\n handlers,\n innerRef,\n activeDescendant,\n option,\n selectedOptions,\n openedSubmenus,\n optionsShouldHavePadding,\n style,\n DSDropdownMenuV2,\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n onDropdownKeyDown,\n ],\n );\n\n return <Component {...option} {...itemProps} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BV;AA9Bb,mBAA2C;AAC3C,2BASO;AAEP,iCAAsC;AACtC,mBAA4C;AAE5C,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,YAAY,CAAC,UAAgC;AACjD,QAAM,EAAE,KAAK,IAAI;AACjB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,4CAAC,uCAAgB,GAAG,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,4CAAC,uCAAgB,GAA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A;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO,4CAAC,aAAW,GAAG,QAAS,GAAG,WAAW;AAC/C;",
6
6
  "names": []
7
7
  }
@@ -32,11 +32,14 @@ __export(DropdownMenuSkeleton_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(DropdownMenuSkeleton_exports);
34
34
  var React = __toESM(require("react"));
35
- var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_jsx_runtime = (
36
+ // eslint-disable-next-line react/no-array-index-key
37
+ require("react/jsx-runtime")
38
+ );
36
39
  var import_ds_menu_items = require("@elliemae/ds-menu-items");
37
40
  var import_ds_grid = require("@elliemae/ds-grid");
38
41
  const DropdownMenuSkeleton = () => {
39
42
  const SKELETON_AMOUNT = 5;
40
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { children: Array(SKELETON_AMOUNT).fill(0).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items.SkeletonMenuItem, { dsId: `${index}-skeleton` }, index)) });
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { children: Array(SKELETON_AMOUNT).fill(0).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items.SkeletonMenuItem, { dsId: `${index}-skeleton` }, `prefilled-${index}-skeleton`)) });
41
44
  };
42
45
  //# sourceMappingURL=DropdownMenuSkeleton.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/DropdownMenuSkeleton.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYb;AAXV,2BAAiC;AACjC,qBAAqB;AAEd,MAAM,uBAAuB,MAAM;AACxC,QAAM,kBAAkB;AAExB,SACE,4CAAC,uBACE,gBAAM,eAAe,EACnB,KAAK,CAAC,EACN,IAAI,CAAC,GAAG,UACP,4CAAC,yCAA6B,MAAM,GAAG,KAAK,eAArB,KAAkC,CAC1D,GACL;AAEJ;",
4
+ "sourcesContent": ["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 // eslint-disable-next-line react/no-array-index-key\n <SkeletonMenuItem key={`prefilled-${index}-skeleton`} dsId={`${index}-skeleton`} />\n ))}\n </Grid>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADab;AAAA;AAAA;AAAA;AAZV,2BAAiC;AACjC,qBAAqB;AAEd,MAAM,uBAAuB,MAAM;AACxC,QAAM,kBAAkB;AAExB,SACE,4CAAC,uBACE,gBAAM,eAAe,EACnB,KAAK,CAAC,EACN,IAAI,CAAC,GAAG,UAEP,4CAAC,yCAAqD,MAAM,GAAG,KAAK,eAA7C,aAAa,KAAK,WAAwC,CAClF,GACL;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual';\nimport {\n type GlobalAttributesT,\n PropTypes,\n type XstyledProps,\n globalAttributesPropTypes,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\n\nexport namespace DSDropdownMenuT {\n export 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[] | readonly 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: boolean;\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 extends Omit<GlobalAttributesT, 'value'>, XstyledProps {\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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleOptions extends CommonItemOptions {\n type: 'single';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleWithSubmenuOptions extends CommonItemOptions {\n type: 'singleWithSubmenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSubmenuOptions extends CommonItemOptions {\n type: 'submenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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\nexport const actionOptionSchema = 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});\nexport const singleOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['single']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const checkboxOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['checkbox']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const submenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['submenu']),\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});\nexport const singleWithSubmenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['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});\nexport const separatorOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['separator']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\nexport const sectionOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['section']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\n\nexport const optionTypesSchemas = PropTypes.oneOfType([\n actionOptionSchema,\n singleOptionSchema,\n checkboxOptionSchema,\n submenuOptionSchema,\n singleWithSubmenuOptionSchema,\n separatorOptionSchema,\n sectionOptionSchema,\n]);\n\nexport const DSDropdownMenuV2PropTypes = {\n options: PropTypes.arrayOf(optionTypesSchemas).description('The array of option for the menu').omitValidation()\n .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 ValidationMap<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", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual';\nimport {\n type GlobalAttributesT,\n PropTypes,\n type XstyledProps,\n globalAttributesPropTypes,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\n\nexport namespace DSDropdownMenuT {\n export 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[] | readonly 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 React.JSX.IntrinsicElements;\n children?: React.ReactNode;\n isSkeleton: boolean;\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 extends Omit<GlobalAttributesT, 'value'>, XstyledProps {\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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleOptions extends CommonItemOptions {\n type: 'single';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleWithSubmenuOptions extends CommonItemOptions {\n type: 'singleWithSubmenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSubmenuOptions extends CommonItemOptions {\n type: 'submenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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\nexport const actionOptionSchema = 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});\nexport const singleOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['single']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const checkboxOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['checkbox']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const submenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['submenu']),\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});\nexport const singleWithSubmenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['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});\nexport const separatorOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['separator']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\nexport const sectionOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['section']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\n\nexport const optionTypesSchemas = PropTypes.oneOfType([\n actionOptionSchema,\n singleOptionSchema,\n checkboxOptionSchema,\n submenuOptionSchema,\n singleWithSubmenuOptionSchema,\n separatorOptionSchema,\n sectionOptionSchema,\n]);\n\nexport const DSDropdownMenuV2PropTypes = {\n options: PropTypes.arrayOf(optionTypesSchemas).description('The array of option for the menu').omitValidation()\n .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 ValidationMap<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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAMO;AA6KA,MAAM,qBAAqB,kCAAU,MAAM;AAAA,EAChD,MAAM,kCAAU,OAAO;AAAA,EACvB,MAAM,kCAAU,MAAM,CAAC,QAAQ,CAAC;AAAA,EAChC,OAAO,kCAAU,OAAO;AAAA,EACxB,gBAAgB,kCAAU;AAAA,EAC1B,UAAU,kCAAU;AAAA,EACpB,QAAQ,kCAAU;AACpB,CAAC;AACM,MAAM,qBAAqB,kCAAU,MAAM;AAAA,EAChD,MAAM,kCAAU,OAAO;AAAA,EACvB,MAAM,kCAAU,MAAM,CAAC,QAAQ,CAAC;AAAA,EAChC,OAAO,kCAAU,OAAO;AAAA,EACxB,gBAAgB,kCAAU;AAAA,EAC1B,OAAO,kCAAU,IAAI;AAAA,EACrB,UAAU,kCAAU;AAAA,EACpB,QAAQ,kCAAU;AACpB,CAAC;AACM,MAAM,uBAAuB,kCAAU,MAAM;AAAA,EAClD,MAAM,kCAAU,OAAO;AAAA,EACvB,MAAM,kCAAU,MAAM,CAAC,UAAU,CAAC;AAAA,EAClC,OA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Aa,EAAE;AAAA,EAC7E,YAAY,kCAAU,KACnB,YAAY,uDAAuD,EACnE,aAAa,MAAS;AAAA,EACzB,WAAW,kCAAU,OAAO,YAAY,kEAAkE;AAAA,EAC1G,UAAU,kCAAU,IAAI,YAAY,qCAAqC,EAAE,aAAa,MAAS;AAAA,EACjG,WAAW,kCAAU,IAAI,YAAY,sCAAsC,EAAE,aAAa,MAAS;AAAA,EACnG,GAAG;AAAA,EACH,WAAW,kCAAU,KAAK,YAAY,yCAAyC,EAAE,aAAa,MAAM,IAAI;AAAA,EACxG,cAAc,kCAAU,KACrB,YAAY,0DAA0D,EACtE,aAAa,MAAM,IAAI;AAAA,EAC1B,cAAc,kCAAU,KACrB,YAAY,2DAA2D,EACvE,aAAa,MAAM,IAAI;AAAA,EAC1B,YAAY,kCAAU,KAAK,YAAY,sDAAsD,EAAE,aAAa,KAAK;AACnH;AAEO,MAAM,eAA6C;AAAA,EACxD,gBAAgB,MAAM;AAAA,EACtB,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,cAAc,MAAM;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,gBAAgB,CAAC;AAAA,EACjB,iBAAiB,MAAM;AAAA,EACvB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,0BAA0B;AAAA,EAC1B,0BAA0B,CAAC,gBAAgB,aAAa,eAAe,aAAa,cAAc,UAAU;AAAA,EAC5G,cAAc,CAAC,GAAG,CAAC;AAAA,EACnB,eAAe,CAAC;AAAA,EAChB,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,EACzB,IAAI;AAAA,EACJ,YAAY;AACd;",
6
6
  "names": []
7
7
  }
@@ -323,7 +323,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
323
323
  wrapperStyles: { color: "red" },
324
324
  actionRef: { current: {} },
325
325
  as: "div",
326
- children: "",
327
326
  isSkeleton: false,
328
327
  HeaderComp: () => "Header",
329
328
  maxHeight: 500,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-dropdown-v2-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSDropdownMenuV2 } from '../index.js';\nimport type { DSDropdownMenuT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSDropdownMenuT.Props;\ntype ComponentPropsInternals = DSDropdownMenuT.InternalProps;\ntype ComponentPropsDefaultProps = DSDropdownMenuT.DefaultProps;\ntype ComponentPropsOptionalProps = DSDropdownMenuT.OptionalProps;\ntype ComponentPropsRequiredProps = DSDropdownMenuT.RequiredProps;\n\nconst placementOrderPreference: DSDropdownMenuT.PopperPlacementsT[] = ['bottom', 'bottom-end', 'bottom-start'];\nconst customOffset: DSDropdownMenuT.DefaultProps['customOffset'] = [0, 0];\n\nconst submenuOptions: DSDropdownMenuT.Item[] = [\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 1',\n },\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 2',\n },\n {\n type: 'single',\n dsId: 'id4.3',\n value: 'id4.3',\n label: 'Single Subitem 3',\n },\n];\n\nconst options: DSDropdownMenuT.Item[] = [\n // Action Menu Item\n {\n type: 'action',\n dsId: 'id1',\n value: 'id1',\n label: 'Action Item',\n disabled: false,\n },\n // Single Menu Item\n {\n type: 'single',\n dsId: 'id2',\n value: 'id2',\n label: 'Single Item',\n disabled: false,\n },\n // Multi MenuItem Item\n {\n type: 'checkbox',\n dsId: 'id3',\n value: 'id3',\n label: 'Multi Menu Item',\n disabled: false,\n },\n // Submenu Item\n {\n type: 'submenu',\n dsId: 'id4',\n value: 'id4',\n label: 'Submenu Item',\n disabled: false,\n rightAddon: 'ellipsis',\n options: submenuOptions,\n },\n // Separator\n {\n type: 'separator',\n dsId: '1d5',\n },\n // section\n {\n type: 'section',\n dsId: '1d6',\n label: 'Section',\n },\n // Single With Submenu Item\n {\n type: 'singleWithSubmenu',\n dsId: 'id7',\n value: 'id7',\n label: 'Single With Submenu',\n disabled: false,\n rightAddon: 'chevron',\n options: submenuOptions,\n },\n // Skeleton\n {\n type: 'skeleton',\n dsId: 'id8',\n },\n];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n isOpened: false,\n options: options,\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onMouseEnter: () => {},\n isLoading: false,\n hasInput: true,\n inputValue: '',\n inputPlaceholder: '',\n customOffset: customOffset,\n isSkeleton: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSDropdownMenuV2 {...testExplicitDefinition} />\n <DSDropdownMenuV2 {...testInferedTypeCompatibility} />\n <DSDropdownMenuV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSDropdownMenuV2\n isOpened={false}\n options={options}\n onClickOutside={() => {}}\n onKeyDown={() => {}}\n onMouseEnter={() => {}}\n onMouseLeave={() => {}}\n selectedOptions={{ id1: true, id2: false, id3: false }}\n onOptionClick={() => {}}\n openedSubmenus={{ 'id1.1': true, 'id2.2': false, 'id3.3': false }}\n onSubmenuToggle={() => {}}\n isLoading={false}\n hasInput={false}\n inputValue=\"\"\n inputPlaceholder=\"\"\n onInputChange={() => {}}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={placementOrderPreference}\n customOffset={customOffset}\n wrapperStyles={{ color: 'red' }}\n actionRef={{ current: {} }}\n as=\"div\"\n children=\"\"\n isSkeleton={false}\n HeaderComp={() => 'Header'}\n maxHeight={500}\n minWidth={100}\n zIndex={99}\n ></DSDropdownMenuV2>\n </>\n);\n"],
5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,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,6BAAkB,GAAG,wBAAwB;AAAA,EAC9C,4CAAC,6BAAkB,GAAG,8BAA8B;AAAA,EACpD,4CAAC,6BAAkB,GAAG,uBAAuB;AAAA,EAE7C;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV;AAAA,MACA,gBAAgB,MAAM;AAAA,MAAC;AAAA,MACvB,WAAW,MAAM;AAAA,MAAC;AAAA,MAClB,cAAc,MAAM;AAAA,MAAC;AAAA,MACrB,cAAc,MAAM;AAAA,MAAC;AAAA,MACrB,iBAAiB,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,MAAM;AAAA,MACrD,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,gBAAgB,EAAE,SAAS,MAAM,SAAS,OAAO,SAAS,MAAM;AAAA,MAChE,iBAAiB,MAAM;AAAA,MAAC;AAAA,MACxB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,YAAW;AAAA,MACX,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,0BAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,eAAe,EAAE,OAAO,MAAM;AAAA,MAC9B,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,MACzB,IAAG;AAAA,MACH,UAAS;AAAA,MACT,YAAY;AAAA,MACZ,YAAY,MAAM;AAAA,MAClB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,EACT;AAAA,GACH;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSDropdownMenuV2 } from '../index.js';\nimport type { DSDropdownMenuT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSDropdownMenuT.Props;\ntype ComponentPropsInternals = DSDropdownMenuT.InternalProps;\ntype ComponentPropsDefaultProps = DSDropdownMenuT.DefaultProps;\ntype ComponentPropsOptionalProps = DSDropdownMenuT.OptionalProps;\ntype ComponentPropsRequiredProps = DSDropdownMenuT.RequiredProps;\n\nconst placementOrderPreference: DSDropdownMenuT.PopperPlacementsT[] = ['bottom', 'bottom-end', 'bottom-start'];\nconst customOffset: DSDropdownMenuT.DefaultProps['customOffset'] = [0, 0];\n\nconst submenuOptions: DSDropdownMenuT.Item[] = [\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 1',\n },\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 2',\n },\n {\n type: 'single',\n dsId: 'id4.3',\n value: 'id4.3',\n label: 'Single Subitem 3',\n },\n];\n\nconst options: DSDropdownMenuT.Item[] = [\n // Action Menu Item\n {\n type: 'action',\n dsId: 'id1',\n value: 'id1',\n label: 'Action Item',\n disabled: false,\n },\n // Single Menu Item\n {\n type: 'single',\n dsId: 'id2',\n value: 'id2',\n label: 'Single Item',\n disabled: false,\n },\n // Multi MenuItem Item\n {\n type: 'checkbox',\n dsId: 'id3',\n value: 'id3',\n label: 'Multi Menu Item',\n disabled: false,\n },\n // Submenu Item\n {\n type: 'submenu',\n dsId: 'id4',\n value: 'id4',\n label: 'Submenu Item',\n disabled: false,\n rightAddon: 'ellipsis',\n options: submenuOptions,\n },\n // Separator\n {\n type: 'separator',\n dsId: '1d5',\n },\n // section\n {\n type: 'section',\n dsId: '1d6',\n label: 'Section',\n },\n // Single With Submenu Item\n {\n type: 'singleWithSubmenu',\n dsId: 'id7',\n value: 'id7',\n label: 'Single With Submenu',\n disabled: false,\n rightAddon: 'chevron',\n options: submenuOptions,\n },\n // Skeleton\n {\n type: 'skeleton',\n dsId: 'id8',\n },\n];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n isOpened: false,\n options,\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onMouseEnter: () => {},\n isLoading: false,\n hasInput: true,\n inputValue: '',\n inputPlaceholder: '',\n customOffset,\n isSkeleton: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSDropdownMenuV2 {...testExplicitDefinition} />\n <DSDropdownMenuV2 {...testInferedTypeCompatibility} />\n <DSDropdownMenuV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSDropdownMenuV2\n isOpened={false}\n options={options}\n onClickOutside={() => {}}\n onKeyDown={() => {}}\n onMouseEnter={() => {}}\n onMouseLeave={() => {}}\n selectedOptions={{ id1: true, id2: false, id3: false }}\n onOptionClick={() => {}}\n openedSubmenus={{ 'id1.1': true, 'id2.2': false, 'id3.3': false }}\n onSubmenuToggle={() => {}}\n isLoading={false}\n hasInput={false}\n inputValue=\"\"\n inputPlaceholder=\"\"\n onInputChange={() => {}}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={placementOrderPreference}\n customOffset={customOffset}\n wrapperStyles={{ color: 'red' }}\n actionRef={{ current: {} }}\n as=\"div\"\n isSkeleton={false}\n HeaderComp={() => 'Header'}\n maxHeight={500}\n minWidth={100}\n zIndex={99}\n ></DSDropdownMenuV2>\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC0QrB;AAvQF,eAAiC;AAUjC,MAAM,2BAAgE,CAAC,UAAU,cAAc,cAAc;AAC7G,MAAM,eAA6D,CAAC,GAAG,CAAC;AAExE,MAAM,iBAAyC;AAAA,EAC7C;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAkC;AAAA;AAAA,EAEtC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AA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;AAAA,MACV,YAAW;AAAA,MACX,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,0BAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,eAAe,EAAE,OAAO,MAAM;AAAA,MAC9B,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,MACzB,IAAG;AAAA,MACH,YAAY;AAAA,MACZ,YAAY,MAAM;AAAA,MAClB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,EACT;AAAA,GACH;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- const DSDropdownMenuName = "DSDropdownMenu";
2
+ const DSDropdownMenuName = "DSDropdownmenu";
3
3
  const DSDropdownMenuSlots = {
4
4
  ROOT: "root",
5
5
  LOADING_WRAPPER: "loading-wrapper",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/constants.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSDropdownMenuName = 'DSDropdownMenu';\n\nexport const DSDropdownMenuSlots = {\n ROOT: 'root',\n LOADING_WRAPPER: 'loading-wrapper',\n LISTBOX_WRAPPER: 'listbox-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n OPTION_LIST_WRAPPER: 'option-list-wrapper',\n EMPTY_STATE_WRAPPER: 'empty-state-wrapper',\n};\n\nexport const DSDropdownMenuPlacements = {\n TOP_START: 'top-start' as const,\n TOP: 'top' as const,\n TOP_END: 'top-end' as const,\n RIGHT_START: 'right-start' as const,\n RIGHT: 'right' as const,\n RIGHT_END: 'right-end' as const,\n BOTTOM_END: 'bottom-end' as const,\n BOTTOM: 'bottom' as const,\n BOTTOM_START: 'bottom-start' as const,\n LEFT_END: 'left-end' as const,\n LEFT: 'left' as const,\n LEFT_START: 'left-start' as const,\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSDropdownMenuName = 'DSDropdownmenu';\n\nexport const DSDropdownMenuSlots = {\n ROOT: 'root',\n LOADING_WRAPPER: 'loading-wrapper',\n LISTBOX_WRAPPER: 'listbox-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n OPTION_LIST_WRAPPER: 'option-list-wrapper',\n EMPTY_STATE_WRAPPER: 'empty-state-wrapper',\n};\n\nexport const DSDropdownMenuPlacements = {\n TOP_START: 'top-start' as const,\n TOP: 'top' as const,\n TOP_END: 'top-end' as const,\n RIGHT_START: 'right-start' as const,\n RIGHT: 'right' as const,\n RIGHT_END: 'right-end' as const,\n BOTTOM_END: 'bottom-end' as const,\n BOTTOM: 'bottom' as const,\n BOTTOM_START: 'bottom-start' as const,\n LEFT_END: 'left-end' as const,\n LEFT: 'left' as const,\n LEFT_START: 'left-start' as const,\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,qBAAqB;AAE3B,MAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEO,MAAM,2BAA2B;AAAA,EACtC,WAAW;AAAA,EACX,KAAK;AAAA,EACL,SAAS;AAAA,EACT,aAAa;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AACd;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropdownMenuEmptyState.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledEmptyStateWrapper } from '../styled.js';\nimport type { SizingProps } from '@elliemae/ds-system';\n\ninterface DropdownMenuEmptyStateProps {\n minWidth: SizingProps['minWidth'];\n maxHeight: SizingProps['maxHeight'];\n}\nexport const DropdownMenuEmptyState: React.FC<DropdownMenuEmptyStateProps> = (props) => (\n <StyledEmptyStateWrapper px=\"xxs\" py=\"xxxs\" role=\"alert\" {...props}>\n No content available\n </StyledEmptyStateWrapper>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACSrB;AARF,SAAS,+BAA+B;AAOjC,MAAM,yBAAgE,CAAC,UAC5E,oBAAC,2BAAwB,IAAG,OAAM,IAAG,QAAO,MAAK,SAAS,GAAG,OAAO,kCAEpE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport { StyledEmptyStateWrapper } from '../styled.js';\n\ninterface DropdownMenuEmptyStateProps {\n minWidth: SizingProps['minWidth'];\n maxHeight: SizingProps['maxHeight'];\n}\nexport const DropdownMenuEmptyState: React.FC<DropdownMenuEmptyStateProps> = (props) => (\n <StyledEmptyStateWrapper px=\"xxs\" py=\"xxxs\" role=\"alert\" {...props}>\n No content available\n </StyledEmptyStateWrapper>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACSrB;AAPF,SAAS,+BAA+B;AAMjC,MAAM,yBAAgE,CAAC,UAC5E,oBAAC,2BAAwB,IAAG,OAAM,IAAG,QAAO,MAAK,SAAS,GAAG,OAAO,kCAEpE;",
6
6
  "names": []
7
7
  }
@@ -24,7 +24,7 @@ const menuItemMap = [
24
24
  "skeleton"
25
25
  ];
26
26
  const Component = (props) => {
27
- const type = props.type;
27
+ const { type } = props;
28
28
  switch (type) {
29
29
  case "action":
30
30
  return /* @__PURE__ */ jsx(ActionMenuItem, { ...props });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropdownMenuItemFactory.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useMemo } from 'react';\nimport {\n ActionMenuItem,\n SingleMenuItem,\n MultiMenuItem,\n SubmenuItem,\n Separator,\n Section,\n SingleWithSubmenuItem,\n SkeletonMenuItem,\n} from '@elliemae/ds-menu-items';\nimport type { DSDropdownMenuT } from '../react-desc-prop-types.js';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { useDropdownMenuItemHandlers } from '../hooks/index.js';\n\nconst menuItemMap = [\n 'action',\n 'single',\n 'checkbox',\n 'submenu',\n 'separator',\n 'section',\n 'singleWithSubmenu',\n 'skeleton',\n] as const;\n\nconst Component = (props: DSDropdownMenuT.Item) => {\n const type = props.type;\n switch (type) {\n case 'action':\n return <ActionMenuItem {...props} />;\n case 'single':\n return <SingleMenuItem {...props} />;\n case 'checkbox':\n return <MultiMenuItem {...props} />;\n case 'submenu':\n return <SubmenuItem {...props} />;\n case 'separator':\n return <Separator {...props} />;\n case 'section':\n return <Section {...props} />;\n case 'singleWithSubmenu':\n return <SingleWithSubmenuItem {...props} />;\n case 'skeleton':\n return <SkeletonMenuItem {...props} />;\n default:\n // The purpose of 'UnexpectedOptionType' is to make sure that whenever we reach the default case, the type must be never\n // If it isn't, we forgot to add a case for a new option type that was added to DSDropdownMenuT.Item\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n const UnexpectedOptionType: never = type;\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Provided option type (${type}) is not valid. Please provide one of: ${menuItemMap.join(', ')}`);\n }\n};\n\nexport const DropdownMenuItemFactory: React.ComponentType<{\n option: DSDropdownMenuT.Item;\n style?: Record<string, unknown>;\n innerRef?: (el: HTMLElement) => void;\n optionsShouldHavePadding: boolean;\n}> = ({ option, style, innerRef, optionsShouldHavePadding }): JSX.Element => {\n const {\n props: { selectedOptions, onOptionClick, openedSubmenus, onSubmenuToggle, onClickOutside },\n activeDescendant,\n DSDropdownMenuV2,\n } = useContext(DSDropdownMenuContext);\n\n const { onDropdownKeyDown, ...handlers } = useDropdownMenuItemHandlers(option);\n\n const itemProps = useMemo(\n () => ({\n ...handlers,\n innerRef,\n isActive: activeDescendant === option.dsId,\n isSelected: selectedOptions ? !!selectedOptions[option.dsId] : false,\n isSubmenuOpened: openedSubmenus ? !!openedSubmenus[option.dsId] : false,\n tabIndex: -1 as const,\n optionsShouldHavePadding,\n wrapperStyles: style,\n Dropdown: DSDropdownMenuV2,\n dropdownProps: {\n ...option,\n options: option.type === 'submenu' || option.type === 'singleWithSubmenu' ? option.options : [],\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n selectedOptions,\n openedSubmenus,\n onKeyDown: onDropdownKeyDown,\n },\n }),\n [\n handlers,\n innerRef,\n activeDescendant,\n option,\n selectedOptions,\n openedSubmenus,\n optionsShouldHavePadding,\n style,\n DSDropdownMenuV2,\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n onDropdownKeyDown,\n ],\n );\n\n return <Component {...option} {...itemProps} />;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8BV;AA9Bb,SAAgB,YAAY,eAAe;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,6BAA6B;AACtC,SAAS,mCAAmC;AAE5C,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,YAAY,CAAC,UAAgC;AACjD,QAAM,OAAO,MAAM;AACnB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,oBAAC,kBAAgB,GAAG,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,oBAAC,kBAAgB,GAAG,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,oBAAC,iBAAe,GAAG,OAAO;AAAA,IACnC,KAAK;AACH,aAAO,oBAAC,eAAa,GAAG,OAAO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AAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO,oBAAC,aAAW,GAAG,QAAS,GAAG,WAAW;AAC/C;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useMemo } from 'react';\nimport {\n ActionMenuItem,\n SingleMenuItem,\n MultiMenuItem,\n SubmenuItem,\n Separator,\n Section,\n SingleWithSubmenuItem,\n SkeletonMenuItem,\n} from '@elliemae/ds-menu-items';\nimport type { DSDropdownMenuT } from '../react-desc-prop-types.js';\nimport { DSDropdownMenuContext } from '../DropdownMenuContext.js';\nimport { useDropdownMenuItemHandlers } from '../hooks/index.js';\n\nconst menuItemMap = [\n 'action',\n 'single',\n 'checkbox',\n 'submenu',\n 'separator',\n 'section',\n 'singleWithSubmenu',\n 'skeleton',\n] as const;\n\nconst Component = (props: DSDropdownMenuT.Item) => {\n const { type } = props;\n switch (type) {\n case 'action':\n return <ActionMenuItem {...props} />;\n case 'single':\n return <SingleMenuItem {...props} />;\n case 'checkbox':\n return <MultiMenuItem {...props} />;\n case 'submenu':\n return <SubmenuItem {...props} />;\n case 'separator':\n return <Separator {...props} />;\n case 'section':\n return <Section {...props} />;\n case 'singleWithSubmenu':\n return <SingleWithSubmenuItem {...props} />;\n case 'skeleton':\n return <SkeletonMenuItem {...props} />;\n default:\n // The purpose of 'UnexpectedOptionType' is to make sure that whenever we reach the default case, the type must be never\n // If it isn't, we forgot to add a case for a new option type that was added to DSDropdownMenuT.Item\n // this way tslint will be used to catch this mistake\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, no-case-declarations\n const UnexpectedOptionType: never = type;\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions,\n throw new Error(`Provided option type (${type}) is not valid. Please provide one of: ${menuItemMap.join(', ')}`);\n }\n};\n\nexport const DropdownMenuItemFactory: React.ComponentType<{\n option: DSDropdownMenuT.Item;\n style?: Record<string, unknown>;\n innerRef?: (el: HTMLElement) => void;\n optionsShouldHavePadding: boolean;\n}> = ({ option, style, innerRef, optionsShouldHavePadding }): JSX.Element => {\n const {\n props: { selectedOptions, onOptionClick, openedSubmenus, onSubmenuToggle, onClickOutside },\n activeDescendant,\n DSDropdownMenuV2,\n } = useContext(DSDropdownMenuContext);\n\n const { onDropdownKeyDown, ...handlers } = useDropdownMenuItemHandlers(option);\n\n const itemProps = useMemo(\n () => ({\n ...handlers,\n innerRef,\n isActive: activeDescendant === option.dsId,\n isSelected: selectedOptions ? !!selectedOptions[option.dsId] : false,\n isSubmenuOpened: openedSubmenus ? !!openedSubmenus[option.dsId] : false,\n tabIndex: -1 as const,\n optionsShouldHavePadding,\n wrapperStyles: style,\n Dropdown: DSDropdownMenuV2,\n dropdownProps: {\n ...option,\n options: option.type === 'submenu' || option.type === 'singleWithSubmenu' ? option.options : [],\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n selectedOptions,\n openedSubmenus,\n onKeyDown: onDropdownKeyDown,\n },\n }),\n [\n handlers,\n innerRef,\n activeDescendant,\n option,\n selectedOptions,\n openedSubmenus,\n optionsShouldHavePadding,\n style,\n DSDropdownMenuV2,\n onClickOutside,\n onOptionClick,\n onSubmenuToggle,\n onDropdownKeyDown,\n ],\n );\n\n return <Component {...option} {...itemProps} />;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8BV;AA9Bb,SAAgB,YAAY,eAAe;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,6BAA6B;AACtC,SAAS,mCAAmC;AAE5C,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,YAAY,CAAC,UAAgC;AACjD,QAAM,EAAE,KAAK,IAAI;AACjB,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,oBAAC,kBAA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AAAA,QACA;AAAA,QACA,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO,oBAAC,aAAW,GAAG,QAAS,GAAG,WAAW;AAC/C;",
6
6
  "names": []
7
7
  }
@@ -4,7 +4,10 @@ import { SkeletonMenuItem } from "@elliemae/ds-menu-items";
4
4
  import { Grid } from "@elliemae/ds-grid";
5
5
  const DropdownMenuSkeleton = () => {
6
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)) });
7
+ return /* @__PURE__ */ jsx(Grid, { children: Array(SKELETON_AMOUNT).fill(0).map((_, index) => (
8
+ // eslint-disable-next-line react/no-array-index-key
9
+ /* @__PURE__ */ jsx(SkeletonMenuItem, { dsId: `${index}-skeleton` }, `prefilled-${index}-skeleton`)
10
+ )) });
8
11
  };
9
12
  export {
10
13
  DropdownMenuSkeleton
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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,KAAK,eAArB,KAAkC,CAC1D,GACL;AAEJ;",
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 // eslint-disable-next-line react/no-array-index-key\n <SkeletonMenuItem key={`prefilled-${index}-skeleton`} dsId={`${index}-skeleton`} />\n ))}\n </Grid>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACab;AAZV,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;AAAA;AAAA,IAEP,oBAAC,oBAAqD,MAAM,GAAG,KAAK,eAA7C,aAAa,KAAK,WAAwC;AAAA,GAClF,GACL;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual';\nimport {\n type GlobalAttributesT,\n PropTypes,\n type XstyledProps,\n globalAttributesPropTypes,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\n\nexport namespace DSDropdownMenuT {\n export 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[] | readonly 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: boolean;\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 extends Omit<GlobalAttributesT, 'value'>, XstyledProps {\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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleOptions extends CommonItemOptions {\n type: 'single';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleWithSubmenuOptions extends CommonItemOptions {\n type: 'singleWithSubmenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSubmenuOptions extends CommonItemOptions {\n type: 'submenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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\nexport const actionOptionSchema = 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});\nexport const singleOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['single']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const checkboxOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['checkbox']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const submenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['submenu']),\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});\nexport const singleWithSubmenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['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});\nexport const separatorOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['separator']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\nexport const sectionOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['section']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\n\nexport const optionTypesSchemas = PropTypes.oneOfType([\n actionOptionSchema,\n singleOptionSchema,\n checkboxOptionSchema,\n submenuOptionSchema,\n singleWithSubmenuOptionSchema,\n separatorOptionSchema,\n sectionOptionSchema,\n]);\n\nexport const DSDropdownMenuV2PropTypes = {\n options: PropTypes.arrayOf(optionTypesSchemas).description('The array of option for the menu').omitValidation()\n .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 ValidationMap<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"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type React from 'react';\nimport type { useVirtual } from 'react-virtual';\nimport {\n type GlobalAttributesT,\n PropTypes,\n type XstyledProps,\n globalAttributesPropTypes,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\n\nexport namespace DSDropdownMenuT {\n export 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[] | readonly 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 React.JSX.IntrinsicElements;\n children?: React.ReactNode;\n isSkeleton: boolean;\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 extends Omit<GlobalAttributesT, 'value'>, XstyledProps {\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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleOptions extends CommonItemOptions {\n type: 'single';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n }\n\n export interface ItemSingleWithSubmenuOptions extends CommonItemOptions {\n type: 'singleWithSubmenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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 applyAriaDisabled?: boolean;\n }\n\n export interface ItemSubmenuOptions extends CommonItemOptions {\n type: 'submenu';\n label: string;\n value: unknown;\n disabled?: boolean;\n applyAriaDisabled?: 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\nexport const actionOptionSchema = 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});\nexport const singleOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['single']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const checkboxOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['checkbox']),\n label: PropTypes.string.isRequired,\n secondaryLabel: PropTypes.string,\n value: PropTypes.any.isRequired,\n disabled: PropTypes.bool,\n render: PropTypes.func,\n});\nexport const submenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['submenu']),\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});\nexport const singleWithSubmenuOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['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});\nexport const separatorOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['separator']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\nexport const sectionOptionSchema = PropTypes.shape({\n dsId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['section']),\n label: PropTypes.string.isRequired,\n render: PropTypes.func,\n});\n\nexport const optionTypesSchemas = PropTypes.oneOfType([\n actionOptionSchema,\n singleOptionSchema,\n checkboxOptionSchema,\n submenuOptionSchema,\n singleWithSubmenuOptionSchema,\n separatorOptionSchema,\n sectionOptionSchema,\n]);\n\nexport const DSDropdownMenuV2PropTypes = {\n options: PropTypes.arrayOf(optionTypesSchemas).description('The array of option for the menu').omitValidation()\n .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 ValidationMap<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
5
  "mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EAEE;AAAA,EAEA;AAAA,OAEK;AA6KA,MAAM,qBAAqB,UAAU,MAAM;AAAA,EAChD,MAAM,UAAU,OAAO;AAAA,EACvB,MAAM,UAAU,MAAM,CAAC,QAAQ,CAAC;AAAA,EAChC,OAAO,UAAU,OAAO;AAAA,EACxB,gBAAgB,UAAU;AAAA,EAC1B,UAAU,UAAU;AAAA,EACpB,QAAQ,UAAU;AACpB,CAAC;AACM,MAAM,qBAAqB,UAAU,MAAM;AAAA,EAChD,MAAM,UAAU,OAAO;AAAA,EACvB,MAAM,UAAU,MAAM,CAAC,QAAQ,CAAC;AAAA,EAChC,OAAO,UAAU,OAAO;AAAA,EACxB,gBAAgB,UAAU;AAAA,EAC1B,OAAO,UAAU,IAAI;AAAA,EACrB,UAAU,UAAU;AAAA,EACpB,QAAQ,UAAU;AACpB,CAAC;AACM,MAAM,uBAAuB,UAAU,MAAM;AAAA,EAClD,MAAM,UAAU,OAAO;AAAA,EACvB,MAAM,UAAU,MAAM,CAAC,UAAU,CAAC;AAAA,EAClC,OAAO,UAAU,OAAO;AAAA,EACxB,gBAAgB,UAAU;AAAA,EAC1B,OAAO,UAAU,IAAI;AAAA,EACrB,UAAU,UAAU;AAAA,EACpB,QAAQ,UAAU;AACpB,CAAC;AACM,MAAM,sBAAsB,UAAU,MAAM;AAAA,EACjD,MAAM,UAAU,OAAO;AAAA,EACvB,MAAM,UAAU,MAAM,CAAC,SAAS,CAAC;AAAA,EACjC,OAAO,UAAU,OAAO;AAAA,EACxB,gBAAgB,UAAU;AAAA,EAC1B,OAAO,UAAU,IAAI;AAAA,EACrB,UAAU,UAAU;AAAA,EACpB,YAAY,UAAU,MAAM,CAAC,WAAW,UAAU,CAAC;AAAA,EACnD,SAAS,UAAU;AAAA,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DAAsD,EAAE,aAAa,KAAK;AACnH;AAEO,MAAM,eAA6C;AAAA,EACxD,gBAAgB,MAAM;AAAA,EACtB,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,cAAc,MAAM;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,gBAAgB,CAAC;AAAA,EACjB,iBAAiB,MAAM;AAAA,EACvB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,0BAA0B;AAAA,EAC1B,0BAA0B,CAAC,gBAAgB,aAAa,eAAe,aAAa,cAAc,UAAU;AAAA,EAC5G,cAAc,CAAC,GAAG,CAAC;AAAA,EACnB,eAAe,CAAC;AAAA,EAChB,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,EACzB,IAAI;AAAA,EACJ,YAAY;AACd;",
6
6
  "names": []
7
7
  }
@@ -300,7 +300,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
300
300
  wrapperStyles: { color: "red" },
301
301
  actionRef: { current: {} },
302
302
  as: "div",
303
- children: "",
304
303
  isSkeleton: false,
305
304
  HeaderComp: () => "Header",
306
305
  maxHeight: 500,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-dropdown-v2-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSDropdownMenuV2 } from '../index.js';\nimport type { DSDropdownMenuT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSDropdownMenuT.Props;\ntype ComponentPropsInternals = DSDropdownMenuT.InternalProps;\ntype ComponentPropsDefaultProps = DSDropdownMenuT.DefaultProps;\ntype ComponentPropsOptionalProps = DSDropdownMenuT.OptionalProps;\ntype ComponentPropsRequiredProps = DSDropdownMenuT.RequiredProps;\n\nconst placementOrderPreference: DSDropdownMenuT.PopperPlacementsT[] = ['bottom', 'bottom-end', 'bottom-start'];\nconst customOffset: DSDropdownMenuT.DefaultProps['customOffset'] = [0, 0];\n\nconst submenuOptions: DSDropdownMenuT.Item[] = [\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 1',\n },\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 2',\n },\n {\n type: 'single',\n dsId: 'id4.3',\n value: 'id4.3',\n label: 'Single Subitem 3',\n },\n];\n\nconst options: DSDropdownMenuT.Item[] = [\n // Action Menu Item\n {\n type: 'action',\n dsId: 'id1',\n value: 'id1',\n label: 'Action Item',\n disabled: false,\n },\n // Single Menu Item\n {\n type: 'single',\n dsId: 'id2',\n value: 'id2',\n label: 'Single Item',\n disabled: false,\n },\n // Multi MenuItem Item\n {\n type: 'checkbox',\n dsId: 'id3',\n value: 'id3',\n label: 'Multi Menu Item',\n disabled: false,\n },\n // Submenu Item\n {\n type: 'submenu',\n dsId: 'id4',\n value: 'id4',\n label: 'Submenu Item',\n disabled: false,\n rightAddon: 'ellipsis',\n options: submenuOptions,\n },\n // Separator\n {\n type: 'separator',\n dsId: '1d5',\n },\n // section\n {\n type: 'section',\n dsId: '1d6',\n label: 'Section',\n },\n // Single With Submenu Item\n {\n type: 'singleWithSubmenu',\n dsId: 'id7',\n value: 'id7',\n label: 'Single With Submenu',\n disabled: false,\n rightAddon: 'chevron',\n options: submenuOptions,\n },\n // Skeleton\n {\n type: 'skeleton',\n dsId: 'id8',\n },\n];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n isOpened: false,\n options: options,\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onMouseEnter: () => {},\n isLoading: false,\n hasInput: true,\n inputValue: '',\n inputPlaceholder: '',\n customOffset: customOffset,\n isSkeleton: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpened: false,\n options: options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference: placementOrderPreference,\n customOffset: customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSDropdownMenuV2 {...testExplicitDefinition} />\n <DSDropdownMenuV2 {...testInferedTypeCompatibility} />\n <DSDropdownMenuV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSDropdownMenuV2\n isOpened={false}\n options={options}\n onClickOutside={() => {}}\n onKeyDown={() => {}}\n onMouseEnter={() => {}}\n onMouseLeave={() => {}}\n selectedOptions={{ id1: true, id2: false, id3: false }}\n onOptionClick={() => {}}\n openedSubmenus={{ 'id1.1': true, 'id2.2': false, 'id3.3': false }}\n onSubmenuToggle={() => {}}\n isLoading={false}\n hasInput={false}\n inputValue=\"\"\n inputPlaceholder=\"\"\n onInputChange={() => {}}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={placementOrderPreference}\n customOffset={customOffset}\n wrapperStyles={{ color: 'red' }}\n actionRef={{ current: {} }}\n as=\"div\"\n children=\"\"\n isSkeleton={false}\n HeaderComp={() => 'Header'}\n maxHeight={500}\n minWidth={100}\n zIndex={99}\n ></DSDropdownMenuV2>\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC0QrB,mBAEE,KAFF;AAvQF,SAAS,wBAAwB;AAUjC,MAAM,2BAAgE,CAAC,UAAU,cAAc,cAAc;AAC7G,MAAM,eAA6D,CAAC,GAAG,CAAC;AAExE,MAAM,iBAAyC;AAAA,EAC7C;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAkC;AAAA;AAAA,EAEtC;AAAA,IACE,MAAM;AAAA,IACN,MAAM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MAChE,iBAAiB,MAAM;AAAA,MAAC;AAAA,MACxB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,YAAW;AAAA,MACX,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,0BAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,eAAe,EAAE,OAAO,MAAM;AAAA,MAC9B,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,MACzB,IAAG;AAAA,MACH,UAAS;AAAA,MACT,YAAY;AAAA,MACZ,YAAY,MAAM;AAAA,MAClB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,EACT;AAAA,GACH;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSDropdownMenuV2 } from '../index.js';\nimport type { DSDropdownMenuT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSDropdownMenuT.Props;\ntype ComponentPropsInternals = DSDropdownMenuT.InternalProps;\ntype ComponentPropsDefaultProps = DSDropdownMenuT.DefaultProps;\ntype ComponentPropsOptionalProps = DSDropdownMenuT.OptionalProps;\ntype ComponentPropsRequiredProps = DSDropdownMenuT.RequiredProps;\n\nconst placementOrderPreference: DSDropdownMenuT.PopperPlacementsT[] = ['bottom', 'bottom-end', 'bottom-start'];\nconst customOffset: DSDropdownMenuT.DefaultProps['customOffset'] = [0, 0];\n\nconst submenuOptions: DSDropdownMenuT.Item[] = [\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 1',\n },\n {\n type: 'single',\n dsId: 'id4.1',\n value: 'id4.1',\n label: 'Single Subitem 2',\n },\n {\n type: 'single',\n dsId: 'id4.3',\n value: 'id4.3',\n label: 'Single Subitem 3',\n },\n];\n\nconst options: DSDropdownMenuT.Item[] = [\n // Action Menu Item\n {\n type: 'action',\n dsId: 'id1',\n value: 'id1',\n label: 'Action Item',\n disabled: false,\n },\n // Single Menu Item\n {\n type: 'single',\n dsId: 'id2',\n value: 'id2',\n label: 'Single Item',\n disabled: false,\n },\n // Multi MenuItem Item\n {\n type: 'checkbox',\n dsId: 'id3',\n value: 'id3',\n label: 'Multi Menu Item',\n disabled: false,\n },\n // Submenu Item\n {\n type: 'submenu',\n dsId: 'id4',\n value: 'id4',\n label: 'Submenu Item',\n disabled: false,\n rightAddon: 'ellipsis',\n options: submenuOptions,\n },\n // Separator\n {\n type: 'separator',\n dsId: '1d5',\n },\n // section\n {\n type: 'section',\n dsId: '1d6',\n label: 'Section',\n },\n // Single With Submenu Item\n {\n type: 'singleWithSubmenu',\n dsId: 'id7',\n value: 'id7',\n label: 'Single With Submenu',\n disabled: false,\n rightAddon: 'chevron',\n options: submenuOptions,\n },\n // Skeleton\n {\n type: 'skeleton',\n dsId: 'id8',\n },\n];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n isOpened: false,\n options,\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onMouseEnter: () => {},\n isLoading: false,\n hasInput: true,\n inputValue: '',\n inputPlaceholder: '',\n customOffset,\n isSkeleton: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpened: false,\n options,\n onClickOutside: () => {},\n onKeyDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n selectedOptions: { id1: true, id2: false, id3: false },\n onOptionClick: () => {},\n openedSubmenus: { 'id1.1': true, 'id2.2': false, 'id3.3': false },\n onSubmenuToggle: () => {},\n isLoading: false,\n hasInput: false,\n inputValue: '',\n inputPlaceholder: '',\n onInputChange: () => {},\n startPlacementPreference: 'bottom',\n placementOrderPreference,\n customOffset,\n wrapperStyles: { color: 'red' },\n actionRef: { current: {} },\n as: 'div',\n children: '',\n isSkeleton: false,\n HeaderComp: () => 'Header',\n maxHeight: 500,\n minWidth: 100,\n zIndex: 99,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSDropdownMenuV2 {...testExplicitDefinition} />\n <DSDropdownMenuV2 {...testInferedTypeCompatibility} />\n <DSDropdownMenuV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSDropdownMenuV2\n isOpened={false}\n options={options}\n onClickOutside={() => {}}\n onKeyDown={() => {}}\n onMouseEnter={() => {}}\n onMouseLeave={() => {}}\n selectedOptions={{ id1: true, id2: false, id3: false }}\n onOptionClick={() => {}}\n openedSubmenus={{ 'id1.1': true, 'id2.2': false, 'id3.3': false }}\n onSubmenuToggle={() => {}}\n isLoading={false}\n hasInput={false}\n inputValue=\"\"\n inputPlaceholder=\"\"\n onInputChange={() => {}}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={placementOrderPreference}\n customOffset={customOffset}\n wrapperStyles={{ color: 'red' }}\n actionRef={{ current: {} }}\n as=\"div\"\n isSkeleton={false}\n HeaderComp={() => 'Header'}\n maxHeight={500}\n minWidth={100}\n zIndex={99}\n ></DSDropdownMenuV2>\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0QrB,mBAEE,KAFF;AAvQF,SAAS,wBAAwB;AAUjC,MAAM,2BAAgE,CAAC,UAAU,cAAc,cAAc;AAC7G,MAAM,eAA6D,CAAC,GAAG,CAAC;AAExE,MAAM,iBAAyC;AAAA,EAC7C;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAkC;AAAA;AAAA,EAEtC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AAAA;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA;AAA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,EACJ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY,MAAM;AAAA,EAClB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AACV;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,oBAAkB,GAAG,wBAAwB;AAAA,EAC9C,oBAAC,oBAAkB,GAAG,8BAA8B;AAAA,EACpD,oBAAC,oBAAkB,GAAG,uBAAuB;AAAA,EAE7C;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV;AAAA,MACA,gBAAgB,MAAM;AAAA,MAAC;AAAA,MACvB,WAAW,MAAM;AAAA,MAAC;AAAA,MAClB,cAAc,MAAM;AAAA,MAAC;AAAA,MACrB,cAAc,MAAM;AAAA,MAAC;AAAA,MACrB,iBAAiB,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,MAAM;AAAA,MACrD,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,gBAAgB,EAAE,SAAS,MAAM,SAAS,OAAO,SAAS,MAAM;AAAA,MAChE,iBAAiB,MAAM;AAAA,MAAC;AAAA,MACxB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,YAAW;AAAA,MACX,kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MAAC;AAAA,MACtB,0BAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,eAAe,EAAE,OAAO,MAAM;AAAA,MAC9B,WAAW,EAAE,SAAS,CAAC,EAAE;AAAA,MACzB,IAAG;AAAA,MACH,YAAY;AAAA,MACZ,YAAY,MAAM;AAAA,MAClB,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,EACT;AAAA,GACH;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- export declare const DSDropdownMenuName = "DSDropdownMenu";
1
+ export declare const DSDropdownMenuName = "DSDropdownmenu";
2
2
  export declare const DSDropdownMenuSlots: {
3
3
  ROOT: string;
4
4
  LOADING_WRAPPER: string;
@@ -28,7 +28,7 @@ export declare namespace DSDropdownMenuT {
28
28
  customOffset: [number, number];
29
29
  wrapperStyles: Record<string, unknown>;
30
30
  actionRef: React.MutableRefObject<Record<string, unknown>>;
31
- as: keyof JSX.IntrinsicElements;
31
+ as: keyof React.JSX.IntrinsicElements;
32
32
  children?: React.ReactNode;
33
33
  isSkeleton: boolean;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-dropdownmenu-v2",
3
- "version": "3.50.1-next.9",
3
+ "version": "3.51.0-beta.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Dropdown Menu V2",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
26
26
  },
27
27
  "engines": {
28
- "pnpm": ">=6",
29
- "node": ">=16"
28
+ "pnpm": ">=9",
29
+ "node": ">=22"
30
30
  },
31
31
  "author": "ICE MT",
32
32
  "jestSonar": {
@@ -38,25 +38,25 @@
38
38
  "dependencies": {
39
39
  "@xstyled/system": "~3.7.3",
40
40
  "react-virtual": "~2.10.4",
41
- "@elliemae/ds-circular-progress-indicator": "3.50.1-next.9",
42
- "@elliemae/ds-grid": "3.50.1-next.9",
43
- "@elliemae/ds-form-input-text": "3.50.1-next.9",
44
- "@elliemae/ds-menu-button": "3.50.1-next.9",
45
- "@elliemae/ds-menu-items": "3.50.1-next.9",
46
- "@elliemae/ds-popperjs": "3.50.1-next.9",
47
- "@elliemae/ds-props-helpers": "3.50.1-next.9",
48
- "@elliemae/ds-system": "3.50.1-next.9"
41
+ "@elliemae/ds-circular-progress-indicator": "3.51.0-beta.2",
42
+ "@elliemae/ds-grid": "3.51.0-beta.2",
43
+ "@elliemae/ds-popperjs": "3.51.0-beta.2",
44
+ "@elliemae/ds-menu-items": "3.51.0-beta.2",
45
+ "@elliemae/ds-props-helpers": "3.51.0-beta.2",
46
+ "@elliemae/ds-form-input-text": "3.51.0-beta.2",
47
+ "@elliemae/ds-menu-button": "3.51.0-beta.2",
48
+ "@elliemae/ds-system": "3.51.0-beta.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@elliemae/pui-cli": "9.0.0-next.31",
51
+ "@elliemae/pui-cli": "9.0.0-next.55",
52
52
  "jest": "~29.7.0",
53
53
  "styled-components": "~5.3.9",
54
- "@elliemae/ds-monorepo-devops": "3.50.1-next.9"
54
+ "@elliemae/ds-monorepo-devops": "3.51.0-beta.2"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@xstyled/styled-components": "~3.7.3",
58
- "react": "^17.0.2",
59
- "react-dom": "^17.0.2",
58
+ "react": "^18.3.1",
59
+ "react-dom": "^18.3.1",
60
60
  "styled-components": "~5.3.9"
61
61
  },
62
62
  "publishConfig": {