@elliemae/ds-menu-items-single-with-submenu 3.80.0-next.3 → 3.80.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSMenuItemsSingleWithSubmenu.js +3 -1
- package/dist/cjs/DSMenuItemsSingleWithSubmenu.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +10 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSMenuItemsSingleWithSubmenu.js +3 -1
- package/dist/esm/DSMenuItemsSingleWithSubmenu.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +10 -0
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/react-desc-prop-types.d.ts +7 -0
- package/package.json +8 -8
|
@@ -56,6 +56,7 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
56
56
|
isSubmenuOpened,
|
|
57
57
|
rightAddon,
|
|
58
58
|
innerRef,
|
|
59
|
+
dropdownMeasureRef,
|
|
59
60
|
wrapperStyles,
|
|
60
61
|
render: Render,
|
|
61
62
|
Dropdown,
|
|
@@ -115,6 +116,7 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
115
116
|
"aria-selected": isSubmenuOpened,
|
|
116
117
|
"aria-describedby": `dropdownmenu-submenu-${dsId}`,
|
|
117
118
|
id: dsId,
|
|
119
|
+
innerRef: dropdownMeasureRef,
|
|
118
120
|
...globalProps,
|
|
119
121
|
...restXStyled,
|
|
120
122
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -128,8 +130,8 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
128
130
|
isActive,
|
|
129
131
|
onMouseEnter: onMouseEnterHandler,
|
|
130
132
|
onMouseLeave: onMouseLeaveHandler,
|
|
131
|
-
as: "div",
|
|
132
133
|
innerRef,
|
|
134
|
+
as: "div",
|
|
133
135
|
"data-type": "single-with-submenu",
|
|
134
136
|
getOwnerProps,
|
|
135
137
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSMenuItemsSingleWithSubmenu.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\nimport React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n StyledIconContainer,\n StyledVerticalSeparator,\n StyledEllipsisButton,\n} from '@elliemae/ds-menu-items-commons';\nimport {\n type DSMenuItemsSingleWithSubmenuT,\n DSMenuItemsSingleWithSubmenuPropTypesSchema,\n} from './react-desc-prop-types.js';\nimport { useMenuItemsSingleWithSubmenu } from './config/useMenuItemsSingleWithSubmenu.js';\n\nconst DSMenuItemsSingleWithSubmenu: React.ComponentType<DSMenuItemsSingleWithSubmenuT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps, eventHandlers } = useMenuItemsSingleWithSubmenu(props);\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = eventHandlers;\n const {\n dsId,\n label,\n secondaryLabel,\n isActive,\n disabled,\n applyAriaDisabled,\n readOnly,\n onClick,\n isSelected,\n isSubmenuOpened,\n rightAddon,\n innerRef,\n wrapperStyles,\n render: Render,\n Dropdown,\n dropdownProps: {\n options,\n openedSubmenus,\n onSubmenuToggle,\n selectedOptions,\n onKeyDown,\n onOptionClick,\n onClickOutside,\n minWidth,\n maxHeight,\n },\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\n\n // If we don't delay the opening of the poppers, the position will not be placed correctly\n // That why we delay it for the next render using the useEffect hook\n // TODO -- @carusox move this to utilities as a hook\n const [delayedIsOpened, setDelayedIsOpened] = React.useState(false);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-unused-vars\n const { minWidth: _widthToRemoveFromGlobals, ...restXStyled } = xstyledProps;\n\n React.useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const gridLayout = React.useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || applyAriaDisabled) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, onClick],\n );\n\n return (\n <Dropdown\n isOpened={delayedIsOpened}\n options={options ?? []}\n onOptionClick={onOptionClick}\n startPlacementPreference=\"right-start\"\n placementOrderPreference={['right-start', 'right-end', 'left-start', 'left-end']}\n selectedOptions={selectedOptions}\n openedSubmenus={openedSubmenus}\n onSubmenuToggle={onSubmenuToggle}\n onKeyDown={onKeyDown}\n onClickOutside={onClickOutside}\n customOffset={[-4, 1]}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n wrapperStyles={{ ...wrapperStyles, w: '100%' }}\n minWidth={minWidth}\n maxHeight={maxHeight}\n data-popover-label={label}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n {...globalProps}\n {...restXStyled}\n >\n <StyledGlobalMenuItemWrapper\n pr={0}\n onClick={handleOnClick}\n isSelected={isSubmenuOpened}\n disabled={disabled}\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n isActive={isActive}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n as={'div' as keyof React.JSX.IntrinsicElements}\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\nimport React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n StyledIconContainer,\n StyledVerticalSeparator,\n StyledEllipsisButton,\n} from '@elliemae/ds-menu-items-commons';\nimport {\n type DSMenuItemsSingleWithSubmenuT,\n DSMenuItemsSingleWithSubmenuPropTypesSchema,\n} from './react-desc-prop-types.js';\nimport { useMenuItemsSingleWithSubmenu } from './config/useMenuItemsSingleWithSubmenu.js';\n\nconst DSMenuItemsSingleWithSubmenu: React.ComponentType<DSMenuItemsSingleWithSubmenuT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps, eventHandlers } = useMenuItemsSingleWithSubmenu(props);\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = eventHandlers;\n const {\n dsId,\n label,\n secondaryLabel,\n isActive,\n disabled,\n applyAriaDisabled,\n readOnly,\n onClick,\n isSelected,\n isSubmenuOpened,\n rightAddon,\n innerRef,\n dropdownMeasureRef,\n wrapperStyles,\n render: Render,\n Dropdown,\n dropdownProps: {\n options,\n openedSubmenus,\n onSubmenuToggle,\n selectedOptions,\n onKeyDown,\n onOptionClick,\n onClickOutside,\n minWidth,\n maxHeight,\n },\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\n\n // If we don't delay the opening of the poppers, the position will not be placed correctly\n // That why we delay it for the next render using the useEffect hook\n // TODO -- @carusox move this to utilities as a hook\n const [delayedIsOpened, setDelayedIsOpened] = React.useState(false);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-unused-vars\n const { minWidth: _widthToRemoveFromGlobals, ...restXStyled } = xstyledProps;\n\n React.useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const gridLayout = React.useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || applyAriaDisabled) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, onClick],\n );\n\n return (\n <Dropdown\n isOpened={delayedIsOpened}\n options={options ?? []}\n onOptionClick={onOptionClick}\n startPlacementPreference=\"right-start\"\n placementOrderPreference={['right-start', 'right-end', 'left-start', 'left-end']}\n selectedOptions={selectedOptions}\n openedSubmenus={openedSubmenus}\n onSubmenuToggle={onSubmenuToggle}\n onKeyDown={onKeyDown}\n onClickOutside={onClickOutside}\n customOffset={[-4, 1]}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n wrapperStyles={{ ...wrapperStyles, w: '100%' }}\n minWidth={minWidth}\n maxHeight={maxHeight}\n data-popover-label={label}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n innerRef={dropdownMeasureRef}\n {...globalProps}\n {...restXStyled}\n >\n <StyledGlobalMenuItemWrapper\n pr={0}\n onClick={handleOnClick}\n isSelected={isSubmenuOpened}\n disabled={disabled}\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n isActive={isActive}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n innerRef={innerRef}\n as={'div' as keyof React.JSX.IntrinsicElements}\n data-type=\"single-with-submenu\"\n getOwnerProps={getOwnerProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} gutter=\"xxs\" alignItems=\"center\" getOwnerProps={getOwnerProps}>\n {isSelected ? (\n <Checkmark\n size=\"s\"\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n />\n ) : (\n <div />\n )}\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n <StyledIconContainer getOwnerProps={getOwnerProps}>\n <StyledVerticalSeparator getOwnerProps={getOwnerProps} />\n {rightAddon === 'ellipsis' ? (\n <StyledEllipsisButton\n tabIndex={-1}\n onClick={onEllipsisClick}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n getOwnerProps={getOwnerProps}\n >\n <MoreOptionsVert\n className=\"ds-dropdown-menu-v2-more-options\"\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n size=\"s\"\n />\n </StyledEllipsisButton>\n ) : (\n <ChevronRight\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n size=\"s\"\n />\n )}\n </StyledIconContainer>\n </StyledContentWrapper>\n )}\n <span id={`dropdownmenu-submenu-${dsId}`} style={{ display: 'none' }}>\n submenu, to open this submenu press the Right Arrow key\n </span>\n </StyledGlobalMenuItemWrapper>\n </Dropdown>\n );\n};\n\n// this is `'DSMenuItemSingleWithSubmenu'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingleWithSubmenu.displayName = `DSMenuItemSingleWithSubmenu`;\nconst DSMenuItemsSingleWithSubmenuWithSchema = describe(DSMenuItemsSingleWithSubmenu);\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nDSMenuItemsSingleWithSubmenuWithSchema.propTypes = DSMenuItemsSingleWithSubmenuPropTypesSchema;\n\nexport { DSMenuItemsSingleWithSubmenu, DSMenuItemsSingleWithSubmenuWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA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B;AAAA,gBACtD,eAAe,aACd;AAAA,kBAAC;AAAA;AAAA,oBACC,UAAU;AAAA,oBACV,SAAS;AAAA,oBACT;AAAA,oBACA;AAAA,oBACA;AAAA,oBAEA;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV,OAAO,YAAY,oBAAoB,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK;AAAA,wBACnF,MAAK;AAAA;AAAA,oBACP;AAAA;AAAA,gBACF,IAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,YAAY,oBAAoB,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK;AAAA,oBACnF,MAAK;AAAA;AAAA,gBACP;AAAA,iBAEJ;AAAA,eACF;AAAA,YAEF,4CAAC,UAAK,IAAI,wBAAwB,IAAI,IAAI,OAAO,EAAE,SAAS,OAAO,GAAG,qEAEtE;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAGA,6BAA6B,cAAc;AAC3C,MAAM,6CAAyC,kCAAS,4BAA4B;AAEpF,uCAAuC,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -61,6 +61,8 @@ const defaultProps = {
|
|
|
61
61
|
rightAddon: "chevron",
|
|
62
62
|
optionsShouldHavePadding: false,
|
|
63
63
|
Dropdown: () => null,
|
|
64
|
+
dropdownMeasureRef: () => {
|
|
65
|
+
},
|
|
64
66
|
// this is a lie, the "default" dropdownProps is not producing anything useful...
|
|
65
67
|
// the idea of "default" is that if the user does not provide a value, we still have a valid value to use...
|
|
66
68
|
dropdownProps: {
|
|
@@ -103,6 +105,14 @@ const DSMenuItemsSingleWithSubmenuPropTypes = {
|
|
|
103
105
|
"The visual element to display on the right side of the menu item."
|
|
104
106
|
),
|
|
105
107
|
Dropdown: import_ds_props_helpers.PropTypes.func.description("The Dropdown component to use to render the submenu."),
|
|
108
|
+
dropdownMeasureRef: import_ds_props_helpers.PropTypes.oneOfType([
|
|
109
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
110
|
+
current: import_ds_props_helpers.PropTypes.node
|
|
111
|
+
}),
|
|
112
|
+
import_ds_props_helpers.PropTypes.func.description(
|
|
113
|
+
"Internal-only ref for the Dropdown root, set by the virtualized rendering path. Not meant to be passed by an application."
|
|
114
|
+
)
|
|
115
|
+
]).defaultValue(`(() => {})`),
|
|
106
116
|
dropdownProps: import_ds_props_helpers.PropTypes.shape({
|
|
107
117
|
options: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.any).description("The options to display in the submenu."),
|
|
108
118
|
onSubmenuToggle: import_ds_props_helpers.PropTypes.func.description(
|
|
@@ -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 @typescript-eslint/no-duplicate-type-constituents */\n\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSMenuItemsSingleWithSubmenuT {\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler<Element>;\n onMouseDown: React.MouseEventHandler<Element>;\n onMouseEnter: React.MouseEventHandler<Element>;\n onMouseLeave: React.MouseEventHandler<Element>;\n dataTestid: string;\n tabIndex: 0 | -1 | '0' | '-1';\n\n isSubmenuOpened: boolean;\n onSubmenuOpen: React.MouseEventHandler<Element>;\n rightAddon: 'ellipsis' | 'chevron';\n optionsShouldHavePadding: boolean;\n Dropdown: React.ComponentType<React.PropsWithChildren<DSMenuItemsSingleWithSubmenuT.DefaultProps['dropdownProps']>>;\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: unknown[];\n onSubmenuToggle?: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n openedSubmenus?: Record<string, boolean>;\n selectedOptions?: Record<string, boolean>;\n onKeyDown?: React.KeyboardEventHandler;\n onOptionClick?: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n onClickOutside?: (\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element> | React.TouchEvent<Element>,\n ) => void;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n [key: string]: unknown;\n };\n };\n\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsSingleWithSubmenuT.InternalProps> & {\n secondaryLabel?: string;\n value?: unknown;\n onSubmenuClose?: React.MouseEventHandler<Element>;\n };\n\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSMenuItemsSingleWithSubmenuT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n dataTestid: 'ds-menu-item',\n tabIndex: 0,\n\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSubmenuOpened: false,\n onSubmenuOpen: () => {},\n rightAddon: 'chevron',\n optionsShouldHavePadding: false,\n Dropdown: () => null,\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: [],\n onSubmenuToggle: () => {},\n openedSubmenus: {},\n selectedOptions: {},\n onKeyDown: () => {},\n onOptionClick: () => {},\n onClickOutside: () => {},\n minWidth: 'auto',\n maxHeight: 'auto',\n },\n};\n\n// we are removing some keys from the global attributes because they are overridden by the action props\n// eslint-disable-next-line no-unused-vars\nconst { tabIndex, label, value, ...notOvverriddenCommonPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsSingleWithSubmenuPropTypes: DSPropTypesSchema<DSMenuItemsSingleWithSubmenuT.InternalProps> = {\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n ...notOvverriddenCommonPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\n\n // TODO - add support to PropTypes.oneOf for typeof number\n // currently PropTypes.oneOf([0, -1]) is not supported\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('The tab index of the menu item. for WCAG 2.1 AA compliance only -1 and 0 are allowed.')\n .defaultValue(defaultProps.tabIndex),\n label: PropTypes.string.description('The label of the menu item.'),\n value: PropTypes.any.description('The value of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.').defaultValue(defaultProps.isActive),\n optionsShouldHavePadding: PropTypes.bool\n .description('Whether the menu item should have padding. This is used in the context of a menu with options.')\n .defaultValue(defaultProps.optionsShouldHavePadding),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isSelected: PropTypes.bool\n .description('Whether the menu item has to show the selected state or not.')\n .defaultValue(defaultProps.isSelected),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.').defaultValue(defaultProps.dataTestid),\n isSubmenuOpened: PropTypes.bool\n .description('Whether the submenu is opened or not.')\n .defaultValue(defaultProps.isSubmenuOpened),\n onSubmenuOpen: PropTypes.func.description('Callback fired when the user tries to open the submenu.'),\n onSubmenuClose: PropTypes.func.description('Callback fired when the user tries to close the submenu.'),\n rightAddon: PropTypes.oneOf(['ellipsis', 'chevron']).description(\n 'The visual element to display on the right side of the menu item.',\n ),\n Dropdown: PropTypes.func.description('The Dropdown component to use to render the submenu.'),\n dropdownProps: PropTypes.shape({\n options: PropTypes.arrayOf(PropTypes.any).description('The options to display in the submenu.'),\n onSubmenuToggle: PropTypes.func\n .description(\n 'Callback fired when the user tries to toggle the submenu. It receives the next opened submenus, the submenu and the event.',\n )\n .signature(\n '((nextOpenedSubmenus: Record<string, boolean>, submenu: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n openedSubmenus: PropTypes.objectOf(PropTypes.bool).description('The opened submenus.'),\n selectedOptions: PropTypes.objectOf(PropTypes.bool).description('The selected options.'),\n onKeyDown: PropTypes.func.description('Callback fired when the user presses a key.'),\n onOptionClick: PropTypes.func\n .description(\n 'Callback fired when the user clicks on an option. It receives the next selected options, the clicked option and the event.',\n )\n .signature(\n '((nextSelectedOptions: Record<string, boolean>, clickedOption: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n onClickOutside: PropTypes.func\n .description('Callback fired when the user clicks outside the submenu.')\n .signature('((e: MouseEvent | React.KeyboardEvent | TouchEvent) => void)'),\n minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The min width of the submenu.'),\n maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The max height of the submenu.'),\n }).description('The props to pass to the Dropdown component.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsSingleWithSubmenuPropTypesSchema =\n DSMenuItemsSingleWithSubmenuPropTypes as unknown as WeakValidationMap<DSMenuItemsSingleWithSubmenuT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AAEvE,mCAIO;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSMenuItemsSingleWithSubmenuT {\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler<Element>;\n onMouseDown: React.MouseEventHandler<Element>;\n onMouseEnter: React.MouseEventHandler<Element>;\n onMouseLeave: React.MouseEventHandler<Element>;\n dataTestid: string;\n tabIndex: 0 | -1 | '0' | '-1';\n\n isSubmenuOpened: boolean;\n onSubmenuOpen: React.MouseEventHandler<Element>;\n rightAddon: 'ellipsis' | 'chevron';\n optionsShouldHavePadding: boolean;\n Dropdown: React.ComponentType<React.PropsWithChildren<DSMenuItemsSingleWithSubmenuT.DefaultProps['dropdownProps']>>;\n /**\n * Internal-only, set by `ds-dropdownmenu-v2`'s virtualized rendering path \u2014 a ref for the\n * `Dropdown` root specifically, separate from the component's own public `innerRef` (which\n * targets its inner content wrapper and must keep doing so for direct consumers of this\n * component). Not meant to be passed by an application; defaults to a no-op.\n */\n dropdownMeasureRef: React.RefObject<HTMLElement> | ((el: HTMLElement | null) => void);\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: unknown[];\n onSubmenuToggle?: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n openedSubmenus?: Record<string, boolean>;\n selectedOptions?: Record<string, boolean>;\n onKeyDown?: React.KeyboardEventHandler;\n onOptionClick?: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n onClickOutside?: (\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element> | React.TouchEvent<Element>,\n ) => void;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n [key: string]: unknown;\n };\n };\n\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsSingleWithSubmenuT.InternalProps> & {\n secondaryLabel?: string;\n value?: unknown;\n onSubmenuClose?: React.MouseEventHandler<Element>;\n };\n\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSMenuItemsSingleWithSubmenuT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n dataTestid: 'ds-menu-item',\n tabIndex: 0,\n\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSubmenuOpened: false,\n onSubmenuOpen: () => {},\n rightAddon: 'chevron',\n optionsShouldHavePadding: false,\n Dropdown: () => null,\n dropdownMeasureRef: () => {},\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: [],\n onSubmenuToggle: () => {},\n openedSubmenus: {},\n selectedOptions: {},\n onKeyDown: () => {},\n onOptionClick: () => {},\n onClickOutside: () => {},\n minWidth: 'auto',\n maxHeight: 'auto',\n },\n};\n\n// we are removing some keys from the global attributes because they are overridden by the action props\n// eslint-disable-next-line no-unused-vars\nconst { tabIndex, label, value, ...notOvverriddenCommonPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsSingleWithSubmenuPropTypes: DSPropTypesSchema<DSMenuItemsSingleWithSubmenuT.InternalProps> = {\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n ...notOvverriddenCommonPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\n\n // TODO - add support to PropTypes.oneOf for typeof number\n // currently PropTypes.oneOf([0, -1]) is not supported\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('The tab index of the menu item. for WCAG 2.1 AA compliance only -1 and 0 are allowed.')\n .defaultValue(defaultProps.tabIndex),\n label: PropTypes.string.description('The label of the menu item.'),\n value: PropTypes.any.description('The value of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.').defaultValue(defaultProps.isActive),\n optionsShouldHavePadding: PropTypes.bool\n .description('Whether the menu item should have padding. This is used in the context of a menu with options.')\n .defaultValue(defaultProps.optionsShouldHavePadding),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isSelected: PropTypes.bool\n .description('Whether the menu item has to show the selected state or not.')\n .defaultValue(defaultProps.isSelected),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.').defaultValue(defaultProps.dataTestid),\n isSubmenuOpened: PropTypes.bool\n .description('Whether the submenu is opened or not.')\n .defaultValue(defaultProps.isSubmenuOpened),\n onSubmenuOpen: PropTypes.func.description('Callback fired when the user tries to open the submenu.'),\n onSubmenuClose: PropTypes.func.description('Callback fired when the user tries to close the submenu.'),\n rightAddon: PropTypes.oneOf(['ellipsis', 'chevron']).description(\n 'The visual element to display on the right side of the menu item.',\n ),\n Dropdown: PropTypes.func.description('The Dropdown component to use to render the submenu.'),\n dropdownMeasureRef: PropTypes.oneOfType([\n PropTypes.shape({\n current: PropTypes.node,\n }),\n PropTypes.func.description(\n 'Internal-only ref for the Dropdown root, set by the virtualized rendering path. Not meant to be passed by an application.',\n ),\n ]).defaultValue(`(() => {})`),\n dropdownProps: PropTypes.shape({\n options: PropTypes.arrayOf(PropTypes.any).description('The options to display in the submenu.'),\n onSubmenuToggle: PropTypes.func\n .description(\n 'Callback fired when the user tries to toggle the submenu. It receives the next opened submenus, the submenu and the event.',\n )\n .signature(\n '((nextOpenedSubmenus: Record<string, boolean>, submenu: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n openedSubmenus: PropTypes.objectOf(PropTypes.bool).description('The opened submenus.'),\n selectedOptions: PropTypes.objectOf(PropTypes.bool).description('The selected options.'),\n onKeyDown: PropTypes.func.description('Callback fired when the user presses a key.'),\n onOptionClick: PropTypes.func\n .description(\n 'Callback fired when the user clicks on an option. It receives the next selected options, the clicked option and the event.',\n )\n .signature(\n '((nextSelectedOptions: Record<string, boolean>, clickedOption: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n onClickOutside: PropTypes.func\n .description('Callback fired when the user clicks outside the submenu.')\n .signature('((e: MouseEvent | React.KeyboardEvent | TouchEvent) => void)'),\n minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The min width of the submenu.'),\n maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The max height of the submenu.'),\n }).description('The props to pass to the Dropdown component.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsSingleWithSubmenuPropTypesSchema =\n DSMenuItemsSingleWithSubmenuPropTypes as unknown as WeakValidationMap<DSMenuItemsSingleWithSubmenuT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AAEvE,mCAIO;AA4FA,MAAM,eAA2D;AAAA,EACtE,GAAG;AAAA,EAEH,YAAY;AAAA,EACZ,SAAS,MAAM;AAAA,EAAC;AA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+BAA+B;AAAA,IAC/G,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,gCAAgC;AAAA,EACnH,CAAC,EAAE,YAAY,8CAA8C;AAAA,EAC7D,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,8CACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,6 +32,7 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
32
32
|
isSubmenuOpened,
|
|
33
33
|
rightAddon,
|
|
34
34
|
innerRef,
|
|
35
|
+
dropdownMeasureRef,
|
|
35
36
|
wrapperStyles,
|
|
36
37
|
render: Render,
|
|
37
38
|
Dropdown,
|
|
@@ -91,6 +92,7 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
91
92
|
"aria-selected": isSubmenuOpened,
|
|
92
93
|
"aria-describedby": `dropdownmenu-submenu-${dsId}`,
|
|
93
94
|
id: dsId,
|
|
95
|
+
innerRef: dropdownMeasureRef,
|
|
94
96
|
...globalProps,
|
|
95
97
|
...restXStyled,
|
|
96
98
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -104,8 +106,8 @@ const DSMenuItemsSingleWithSubmenu = (props) => {
|
|
|
104
106
|
isActive,
|
|
105
107
|
onMouseEnter: onMouseEnterHandler,
|
|
106
108
|
onMouseLeave: onMouseLeaveHandler,
|
|
107
|
-
as: "div",
|
|
108
109
|
innerRef,
|
|
110
|
+
as: "div",
|
|
109
111
|
"data-type": "single-with-submenu",
|
|
110
112
|
getOwnerProps,
|
|
111
113
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSMenuItemsSingleWithSubmenu.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n StyledIconContainer,\n StyledVerticalSeparator,\n StyledEllipsisButton,\n} from '@elliemae/ds-menu-items-commons';\nimport {\n type DSMenuItemsSingleWithSubmenuT,\n DSMenuItemsSingleWithSubmenuPropTypesSchema,\n} from './react-desc-prop-types.js';\nimport { useMenuItemsSingleWithSubmenu } from './config/useMenuItemsSingleWithSubmenu.js';\n\nconst DSMenuItemsSingleWithSubmenu: React.ComponentType<DSMenuItemsSingleWithSubmenuT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps, eventHandlers } = useMenuItemsSingleWithSubmenu(props);\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = eventHandlers;\n const {\n dsId,\n label,\n secondaryLabel,\n isActive,\n disabled,\n applyAriaDisabled,\n readOnly,\n onClick,\n isSelected,\n isSubmenuOpened,\n rightAddon,\n innerRef,\n wrapperStyles,\n render: Render,\n Dropdown,\n dropdownProps: {\n options,\n openedSubmenus,\n onSubmenuToggle,\n selectedOptions,\n onKeyDown,\n onOptionClick,\n onClickOutside,\n minWidth,\n maxHeight,\n },\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\n\n // If we don't delay the opening of the poppers, the position will not be placed correctly\n // That why we delay it for the next render using the useEffect hook\n // TODO -- @carusox move this to utilities as a hook\n const [delayedIsOpened, setDelayedIsOpened] = React.useState(false);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-unused-vars\n const { minWidth: _widthToRemoveFromGlobals, ...restXStyled } = xstyledProps;\n\n React.useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const gridLayout = React.useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || applyAriaDisabled) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, onClick],\n );\n\n return (\n <Dropdown\n isOpened={delayedIsOpened}\n options={options ?? []}\n onOptionClick={onOptionClick}\n startPlacementPreference=\"right-start\"\n placementOrderPreference={['right-start', 'right-end', 'left-start', 'left-end']}\n selectedOptions={selectedOptions}\n openedSubmenus={openedSubmenus}\n onSubmenuToggle={onSubmenuToggle}\n onKeyDown={onKeyDown}\n onClickOutside={onClickOutside}\n customOffset={[-4, 1]}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n wrapperStyles={{ ...wrapperStyles, w: '100%' }}\n minWidth={minWidth}\n maxHeight={maxHeight}\n data-popover-label={label}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n {...globalProps}\n {...restXStyled}\n >\n <StyledGlobalMenuItemWrapper\n pr={0}\n onClick={handleOnClick}\n isSelected={isSubmenuOpened}\n disabled={disabled}\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n isActive={isActive}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n as={'div' as keyof React.JSX.IntrinsicElements}\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { MoreOptionsVert, ChevronRight, Checkmark } from '@elliemae/ds-icons';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n StyledIconContainer,\n StyledVerticalSeparator,\n StyledEllipsisButton,\n} from '@elliemae/ds-menu-items-commons';\nimport {\n type DSMenuItemsSingleWithSubmenuT,\n DSMenuItemsSingleWithSubmenuPropTypesSchema,\n} from './react-desc-prop-types.js';\nimport { useMenuItemsSingleWithSubmenu } from './config/useMenuItemsSingleWithSubmenu.js';\n\nconst DSMenuItemsSingleWithSubmenu: React.ComponentType<DSMenuItemsSingleWithSubmenuT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps, eventHandlers } = useMenuItemsSingleWithSubmenu(props);\n const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = eventHandlers;\n const {\n dsId,\n label,\n secondaryLabel,\n isActive,\n disabled,\n applyAriaDisabled,\n readOnly,\n onClick,\n isSelected,\n isSubmenuOpened,\n rightAddon,\n innerRef,\n dropdownMeasureRef,\n wrapperStyles,\n render: Render,\n Dropdown,\n dropdownProps: {\n options,\n openedSubmenus,\n onSubmenuToggle,\n selectedOptions,\n onKeyDown,\n onOptionClick,\n onClickOutside,\n minWidth,\n maxHeight,\n },\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\n\n // If we don't delay the opening of the poppers, the position will not be placed correctly\n // That why we delay it for the next render using the useEffect hook\n // TODO -- @carusox move this to utilities as a hook\n const [delayedIsOpened, setDelayedIsOpened] = React.useState(false);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-unused-vars\n const { minWidth: _widthToRemoveFromGlobals, ...restXStyled } = xstyledProps;\n\n React.useEffect(() => {\n setTimeout(() => setDelayedIsOpened(isSubmenuOpened));\n }, [isSubmenuOpened]);\n\n const gridLayout = React.useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\n cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || applyAriaDisabled) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, onClick],\n );\n\n return (\n <Dropdown\n isOpened={delayedIsOpened}\n options={options ?? []}\n onOptionClick={onOptionClick}\n startPlacementPreference=\"right-start\"\n placementOrderPreference={['right-start', 'right-end', 'left-start', 'left-end']}\n selectedOptions={selectedOptions}\n openedSubmenus={openedSubmenus}\n onSubmenuToggle={onSubmenuToggle}\n onKeyDown={onKeyDown}\n onClickOutside={onClickOutside}\n customOffset={[-4, 1]}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n wrapperStyles={{ ...wrapperStyles, w: '100%' }}\n minWidth={minWidth}\n maxHeight={maxHeight}\n data-popover-label={label}\n as=\"li\"\n role=\"option\"\n aria-selected={isSubmenuOpened}\n aria-describedby={`dropdownmenu-submenu-${dsId}`}\n id={dsId}\n innerRef={dropdownMeasureRef}\n {...globalProps}\n {...restXStyled}\n >\n <StyledGlobalMenuItemWrapper\n pr={0}\n onClick={handleOnClick}\n isSelected={isSubmenuOpened}\n disabled={disabled}\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n isActive={isActive}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n innerRef={innerRef}\n as={'div' as keyof React.JSX.IntrinsicElements}\n data-type=\"single-with-submenu\"\n getOwnerProps={getOwnerProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} gutter=\"xxs\" alignItems=\"center\" getOwnerProps={getOwnerProps}>\n {isSelected ? (\n <Checkmark\n size=\"s\"\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n />\n ) : (\n <div />\n )}\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n <StyledIconContainer getOwnerProps={getOwnerProps}>\n <StyledVerticalSeparator getOwnerProps={getOwnerProps} />\n {rightAddon === 'ellipsis' ? (\n <StyledEllipsisButton\n tabIndex={-1}\n onClick={onEllipsisClick}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n getOwnerProps={getOwnerProps}\n >\n <MoreOptionsVert\n className=\"ds-dropdown-menu-v2-more-options\"\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n size=\"s\"\n />\n </StyledEllipsisButton>\n ) : (\n <ChevronRight\n color={disabled || applyAriaDisabled ? ['neutral', '500'] : ['brand-primary', '600']}\n size=\"s\"\n />\n )}\n </StyledIconContainer>\n </StyledContentWrapper>\n )}\n <span id={`dropdownmenu-submenu-${dsId}`} style={{ display: 'none' }}>\n submenu, to open this submenu press the Right Arrow key\n </span>\n </StyledGlobalMenuItemWrapper>\n </Dropdown>\n );\n};\n\n// this is `'DSMenuItemSingleWithSubmenu'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingleWithSubmenu.displayName = `DSMenuItemSingleWithSubmenu`;\nconst DSMenuItemsSingleWithSubmenuWithSchema = describe(DSMenuItemsSingleWithSubmenu);\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nDSMenuItemsSingleWithSubmenuWithSchema.propTypes = DSMenuItemsSingleWithSubmenuPropTypesSchema;\n\nexport { DSMenuItemsSingleWithSubmenu, DSMenuItemsSingleWithSubmenuWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4Hb,cAiBE,YAjBF;AA3HV,OAAOA,YAAW;AAClB,SAAS,UAAU,qBAAqB;AACxC,SAAS,iBAAiB,cAAc,iBAAiB;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP,SAAS,qCAAqC;AAE9C,MAAM,+BAAyF,CAAC,UAAU;AACxG,QAAM,EAAE,kBAAkB,aAAa,cAAc,c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,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK;AAAA,wBACnF,MAAK;AAAA;AAAA,oBACP;AAAA;AAAA,gBACF,IAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO,YAAY,oBAAoB,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK;AAAA,oBACnF,MAAK;AAAA;AAAA,gBACP;AAAA,iBAEJ;AAAA,eACF;AAAA,YAEF,oBAAC,UAAK,IAAI,wBAAwB,IAAI,IAAI,OAAO,EAAE,SAAS,OAAO,GAAG,qEAEtE;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAGA,6BAA6B,cAAc;AAC3C,MAAM,yCAAyC,SAAS,4BAA4B;AAEpF,uCAAuC,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -29,6 +29,8 @@ const defaultProps = {
|
|
|
29
29
|
rightAddon: "chevron",
|
|
30
30
|
optionsShouldHavePadding: false,
|
|
31
31
|
Dropdown: () => null,
|
|
32
|
+
dropdownMeasureRef: () => {
|
|
33
|
+
},
|
|
32
34
|
// this is a lie, the "default" dropdownProps is not producing anything useful...
|
|
33
35
|
// the idea of "default" is that if the user does not provide a value, we still have a valid value to use...
|
|
34
36
|
dropdownProps: {
|
|
@@ -71,6 +73,14 @@ const DSMenuItemsSingleWithSubmenuPropTypes = {
|
|
|
71
73
|
"The visual element to display on the right side of the menu item."
|
|
72
74
|
),
|
|
73
75
|
Dropdown: PropTypes.func.description("The Dropdown component to use to render the submenu."),
|
|
76
|
+
dropdownMeasureRef: PropTypes.oneOfType([
|
|
77
|
+
PropTypes.shape({
|
|
78
|
+
current: PropTypes.node
|
|
79
|
+
}),
|
|
80
|
+
PropTypes.func.description(
|
|
81
|
+
"Internal-only ref for the Dropdown root, set by the virtualized rendering path. Not meant to be passed by an application."
|
|
82
|
+
)
|
|
83
|
+
]).defaultValue(`(() => {})`),
|
|
74
84
|
dropdownProps: PropTypes.shape({
|
|
75
85
|
options: PropTypes.arrayOf(PropTypes.any).description("The options to display in the submenu."),
|
|
76
86
|
onSubmenuToggle: PropTypes.func.description(
|
|
@@ -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 @typescript-eslint/no-duplicate-type-constituents */\n\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSMenuItemsSingleWithSubmenuT {\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler<Element>;\n onMouseDown: React.MouseEventHandler<Element>;\n onMouseEnter: React.MouseEventHandler<Element>;\n onMouseLeave: React.MouseEventHandler<Element>;\n dataTestid: string;\n tabIndex: 0 | -1 | '0' | '-1';\n\n isSubmenuOpened: boolean;\n onSubmenuOpen: React.MouseEventHandler<Element>;\n rightAddon: 'ellipsis' | 'chevron';\n optionsShouldHavePadding: boolean;\n Dropdown: React.ComponentType<React.PropsWithChildren<DSMenuItemsSingleWithSubmenuT.DefaultProps['dropdownProps']>>;\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: unknown[];\n onSubmenuToggle?: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n openedSubmenus?: Record<string, boolean>;\n selectedOptions?: Record<string, boolean>;\n onKeyDown?: React.KeyboardEventHandler;\n onOptionClick?: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n onClickOutside?: (\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element> | React.TouchEvent<Element>,\n ) => void;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n [key: string]: unknown;\n };\n };\n\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsSingleWithSubmenuT.InternalProps> & {\n secondaryLabel?: string;\n value?: unknown;\n onSubmenuClose?: React.MouseEventHandler<Element>;\n };\n\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSMenuItemsSingleWithSubmenuT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n dataTestid: 'ds-menu-item',\n tabIndex: 0,\n\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSubmenuOpened: false,\n onSubmenuOpen: () => {},\n rightAddon: 'chevron',\n optionsShouldHavePadding: false,\n Dropdown: () => null,\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: [],\n onSubmenuToggle: () => {},\n openedSubmenus: {},\n selectedOptions: {},\n onKeyDown: () => {},\n onOptionClick: () => {},\n onClickOutside: () => {},\n minWidth: 'auto',\n maxHeight: 'auto',\n },\n};\n\n// we are removing some keys from the global attributes because they are overridden by the action props\n// eslint-disable-next-line no-unused-vars\nconst { tabIndex, label, value, ...notOvverriddenCommonPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsSingleWithSubmenuPropTypes: DSPropTypesSchema<DSMenuItemsSingleWithSubmenuT.InternalProps> = {\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n ...notOvverriddenCommonPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\n\n // TODO - add support to PropTypes.oneOf for typeof number\n // currently PropTypes.oneOf([0, -1]) is not supported\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('The tab index of the menu item. for WCAG 2.1 AA compliance only -1 and 0 are allowed.')\n .defaultValue(defaultProps.tabIndex),\n label: PropTypes.string.description('The label of the menu item.'),\n value: PropTypes.any.description('The value of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.').defaultValue(defaultProps.isActive),\n optionsShouldHavePadding: PropTypes.bool\n .description('Whether the menu item should have padding. This is used in the context of a menu with options.')\n .defaultValue(defaultProps.optionsShouldHavePadding),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isSelected: PropTypes.bool\n .description('Whether the menu item has to show the selected state or not.')\n .defaultValue(defaultProps.isSelected),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.').defaultValue(defaultProps.dataTestid),\n isSubmenuOpened: PropTypes.bool\n .description('Whether the submenu is opened or not.')\n .defaultValue(defaultProps.isSubmenuOpened),\n onSubmenuOpen: PropTypes.func.description('Callback fired when the user tries to open the submenu.'),\n onSubmenuClose: PropTypes.func.description('Callback fired when the user tries to close the submenu.'),\n rightAddon: PropTypes.oneOf(['ellipsis', 'chevron']).description(\n 'The visual element to display on the right side of the menu item.',\n ),\n Dropdown: PropTypes.func.description('The Dropdown component to use to render the submenu.'),\n dropdownProps: PropTypes.shape({\n options: PropTypes.arrayOf(PropTypes.any).description('The options to display in the submenu.'),\n onSubmenuToggle: PropTypes.func\n .description(\n 'Callback fired when the user tries to toggle the submenu. It receives the next opened submenus, the submenu and the event.',\n )\n .signature(\n '((nextOpenedSubmenus: Record<string, boolean>, submenu: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n openedSubmenus: PropTypes.objectOf(PropTypes.bool).description('The opened submenus.'),\n selectedOptions: PropTypes.objectOf(PropTypes.bool).description('The selected options.'),\n onKeyDown: PropTypes.func.description('Callback fired when the user presses a key.'),\n onOptionClick: PropTypes.func\n .description(\n 'Callback fired when the user clicks on an option. It receives the next selected options, the clicked option and the event.',\n )\n .signature(\n '((nextSelectedOptions: Record<string, boolean>, clickedOption: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n onClickOutside: PropTypes.func\n .description('Callback fired when the user clicks outside the submenu.')\n .signature('((e: MouseEvent | React.KeyboardEvent | TouchEvent) => void)'),\n minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The min width of the submenu.'),\n maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The max height of the submenu.'),\n }).description('The props to pass to the Dropdown component.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsSingleWithSubmenuPropTypesSchema =\n DSMenuItemsSingleWithSubmenuPropTypes as unknown as WeakValidationMap<DSMenuItemsSingleWithSubmenuT.Props>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE;AAAA,EAEE;AAAA,EACA;AAAA,OACK;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSMenuItemsSingleWithSubmenuT {\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler<Element>;\n onMouseDown: React.MouseEventHandler<Element>;\n onMouseEnter: React.MouseEventHandler<Element>;\n onMouseLeave: React.MouseEventHandler<Element>;\n dataTestid: string;\n tabIndex: 0 | -1 | '0' | '-1';\n\n isSubmenuOpened: boolean;\n onSubmenuOpen: React.MouseEventHandler<Element>;\n rightAddon: 'ellipsis' | 'chevron';\n optionsShouldHavePadding: boolean;\n Dropdown: React.ComponentType<React.PropsWithChildren<DSMenuItemsSingleWithSubmenuT.DefaultProps['dropdownProps']>>;\n /**\n * Internal-only, set by `ds-dropdownmenu-v2`'s virtualized rendering path \u2014 a ref for the\n * `Dropdown` root specifically, separate from the component's own public `innerRef` (which\n * targets its inner content wrapper and must keep doing so for direct consumers of this\n * component). Not meant to be passed by an application; defaults to a no-op.\n */\n dropdownMeasureRef: React.RefObject<HTMLElement> | ((el: HTMLElement | null) => void);\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: unknown[];\n onSubmenuToggle?: (\n nextOpenedSubmenus: Record<string, boolean>,\n submenu: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n openedSubmenus?: Record<string, boolean>;\n selectedOptions?: Record<string, boolean>;\n onKeyDown?: React.KeyboardEventHandler;\n onOptionClick?: (\n nextSelectedOptions: Record<string, boolean>,\n clickedOption: unknown,\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element>,\n ) => void;\n onClickOutside?: (\n e: React.MouseEvent<Element> | React.KeyboardEvent<Element> | React.TouchEvent<Element>,\n ) => void;\n minWidth?: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n [key: string]: unknown;\n };\n };\n\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsSingleWithSubmenuT.InternalProps> & {\n secondaryLabel?: string;\n value?: unknown;\n onSubmenuClose?: React.MouseEventHandler<Element>;\n };\n\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSMenuItemsSingleWithSubmenuT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n dataTestid: 'ds-menu-item',\n tabIndex: 0,\n\n // this is a lie, the \"default\" label is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSubmenuOpened: false,\n onSubmenuOpen: () => {},\n rightAddon: 'chevron',\n optionsShouldHavePadding: false,\n Dropdown: () => null,\n dropdownMeasureRef: () => {},\n // this is a lie, the \"default\" dropdownProps is not producing anything useful...\n // the idea of \"default\" is that if the user does not provide a value, we still have a valid value to use...\n dropdownProps: {\n options: [],\n onSubmenuToggle: () => {},\n openedSubmenus: {},\n selectedOptions: {},\n onKeyDown: () => {},\n onOptionClick: () => {},\n onClickOutside: () => {},\n minWidth: 'auto',\n maxHeight: 'auto',\n },\n};\n\n// we are removing some keys from the global attributes because they are overridden by the action props\n// eslint-disable-next-line no-unused-vars\nconst { tabIndex, label, value, ...notOvverriddenCommonPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsSingleWithSubmenuPropTypes: DSPropTypesSchema<DSMenuItemsSingleWithSubmenuT.InternalProps> = {\n // each single menu-item is in charge of spreading the GlobalAttributesT & XstyledProps\n // they are NOT inherited from a common element from ds-menu-items-commons\n ...notOvverriddenCommonPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\n\n // TODO - add support to PropTypes.oneOf for typeof number\n // currently PropTypes.oneOf([0, -1]) is not supported\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('The tab index of the menu item. for WCAG 2.1 AA compliance only -1 and 0 are allowed.')\n .defaultValue(defaultProps.tabIndex),\n label: PropTypes.string.description('The label of the menu item.'),\n value: PropTypes.any.description('The value of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.').defaultValue(defaultProps.isActive),\n optionsShouldHavePadding: PropTypes.bool\n .description('Whether the menu item should have padding. This is used in the context of a menu with options.')\n .defaultValue(defaultProps.optionsShouldHavePadding),\n secondaryLabel: PropTypes.string.description('The secondary label of the menu item.'),\n isSelected: PropTypes.bool\n .description('Whether the menu item has to show the selected state or not.')\n .defaultValue(defaultProps.isSelected),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.').defaultValue(defaultProps.dataTestid),\n isSubmenuOpened: PropTypes.bool\n .description('Whether the submenu is opened or not.')\n .defaultValue(defaultProps.isSubmenuOpened),\n onSubmenuOpen: PropTypes.func.description('Callback fired when the user tries to open the submenu.'),\n onSubmenuClose: PropTypes.func.description('Callback fired when the user tries to close the submenu.'),\n rightAddon: PropTypes.oneOf(['ellipsis', 'chevron']).description(\n 'The visual element to display on the right side of the menu item.',\n ),\n Dropdown: PropTypes.func.description('The Dropdown component to use to render the submenu.'),\n dropdownMeasureRef: PropTypes.oneOfType([\n PropTypes.shape({\n current: PropTypes.node,\n }),\n PropTypes.func.description(\n 'Internal-only ref for the Dropdown root, set by the virtualized rendering path. Not meant to be passed by an application.',\n ),\n ]).defaultValue(`(() => {})`),\n dropdownProps: PropTypes.shape({\n options: PropTypes.arrayOf(PropTypes.any).description('The options to display in the submenu.'),\n onSubmenuToggle: PropTypes.func\n .description(\n 'Callback fired when the user tries to toggle the submenu. It receives the next opened submenus, the submenu and the event.',\n )\n .signature(\n '((nextOpenedSubmenus: Record<string, boolean>, submenu: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n openedSubmenus: PropTypes.objectOf(PropTypes.bool).description('The opened submenus.'),\n selectedOptions: PropTypes.objectOf(PropTypes.bool).description('The selected options.'),\n onKeyDown: PropTypes.func.description('Callback fired when the user presses a key.'),\n onOptionClick: PropTypes.func\n .description(\n 'Callback fired when the user clicks on an option. It receives the next selected options, the clicked option and the event.',\n )\n .signature(\n '((nextSelectedOptions: Record<string, boolean>, clickedOption: unknown, e: React.MouseEvent | React.KeyboardEvent) => void)',\n ),\n onClickOutside: PropTypes.func\n .description('Callback fired when the user clicks outside the submenu.')\n .signature('((e: MouseEvent | React.KeyboardEvent | TouchEvent) => void)'),\n minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The min width of the submenu.'),\n maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('The max height of the submenu.'),\n }).description('The props to pass to the Dropdown component.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsSingleWithSubmenuPropTypesSchema =\n DSMenuItemsSingleWithSubmenuPropTypes as unknown as WeakValidationMap<DSMenuItemsSingleWithSubmenuT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AA4FA,MAAM,eAA2D;AAAA,EACtE,GAAG;AAAA,EAEH,YAAY;AAAA,EACZ,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,aAAa,MAAM;AAAA,EAAC;AAAA,EACpB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA;AAAA;AAAA,EAIV,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,YAAY;AAAA,EACZ,0BAA0B;AAAA,EAC1B,UAAU,MAAM;AAAA,EAChB,oBAAoB,MAAM;AA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AA,IACnD;AAAA,EACF;AAAA,EACA,UAAU,UAAU,KAAK,YAAY,sDAAsD;AAAA,EAC3F,oBAAoB,UAAU,UAAU;AAAA,IACtC,UAAU,MAAM;AAAA,MACd,SAAS,UAAU;AAAA,IACrB,CAAC;AAAA,IACD,UAAU,KAAK;AAAA,MACb;AAAA,IACF;AAAA,EACF,CAAC,EAAE,aAAa,YAAY;AAAA,EAC5B,eAAe,UAAU,MAAM;AAAA,IAC7B,SAAS,UAAU,QAAQ,UAAU,GAAG,EAAE,YAAY,wCAAwC;AAAA,IAC9F,iBAAiB,UAAU,KACxB;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,IACF;AAAA,IACF,gBAAgB,UAAU,SAAS,UAAU,IAAI,EAAE,YAAY,sBAAsB;AAAA,IACrF,iBAAiB,UAAU,SAAS,UAAU,IAAI,EAAE,YAAY,uBAAuB;AAAA,IACvF,WAAW,UAAU,KAAK,YAAY,6CAA6C;AAAA,IACnF,eAAe,UAAU,KACtB;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,IACF;AAAA,IACF,gBAAgB,UAAU,KACvB,YAAY,0DAA0D,EACtE,UAAU,8DAA8D;AAAA,IAC3E,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,IAC/G,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,gCAAgC;AAAA,EACnH,CAAC,EAAE,YAAY,8CAA8C;AAAA,EAC7D,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,8CACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,6 +22,13 @@ export declare namespace DSMenuItemsSingleWithSubmenuT {
|
|
|
22
22
|
rightAddon: 'ellipsis' | 'chevron';
|
|
23
23
|
optionsShouldHavePadding: boolean;
|
|
24
24
|
Dropdown: React.ComponentType<React.PropsWithChildren<DSMenuItemsSingleWithSubmenuT.DefaultProps['dropdownProps']>>;
|
|
25
|
+
/**
|
|
26
|
+
* Internal-only, set by `ds-dropdownmenu-v2`'s virtualized rendering path — a ref for the
|
|
27
|
+
* `Dropdown` root specifically, separate from the component's own public `innerRef` (which
|
|
28
|
+
* targets its inner content wrapper and must keep doing so for direct consumers of this
|
|
29
|
+
* component). Not meant to be passed by an application; defaults to a no-op.
|
|
30
|
+
*/
|
|
31
|
+
dropdownMeasureRef: React.RefObject<HTMLElement> | ((el: HTMLElement | null) => void);
|
|
25
32
|
dropdownProps: {
|
|
26
33
|
options: unknown[];
|
|
27
34
|
onSubmenuToggle?: (nextOpenedSubmenus: Record<string, boolean>, submenu: unknown, e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-menu-items-single-with-submenu",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.30",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Menu Items Single With Submenu",
|
|
6
6
|
"files": [
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-grid": "3.80.0-next.
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
39
|
+
"@elliemae/ds-grid": "3.80.0-next.30",
|
|
40
|
+
"@elliemae/ds-icons": "3.80.0-next.30",
|
|
41
|
+
"@elliemae/ds-menu-items-commons": "3.80.0-next.30",
|
|
42
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.30",
|
|
43
|
+
"@elliemae/ds-system": "3.80.0-next.30"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.30",
|
|
46
47
|
"jest": "^30.0.0",
|
|
47
48
|
"lodash-es": "^4.18.1",
|
|
48
|
-
"styled-components": "~5.3.11"
|
|
49
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.3"
|
|
49
|
+
"styled-components": "~5.3.11"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@testing-library/jest-dom": "^6.6.3",
|