@elliemae/ds-menu-items-multi 3.80.0-next.72 → 3.80.0-next.76
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/DSMenuItemsMulti.js +9 -9
- package/dist/cjs/DSMenuItemsMulti.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +3 -4
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSMenuItemsMulti.js +17 -10
- package/dist/esm/DSMenuItemsMulti.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +3 -4
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/useMenuItemsMulti.d.ts +2 -2
- package/dist/types/react-desc-prop-types.d.ts +0 -1
- package/package.json +6 -6
|
@@ -63,22 +63,22 @@ const DSMenuItemsMulti = (props) => {
|
|
|
63
63
|
readOnly
|
|
64
64
|
} = propsWithDefault;
|
|
65
65
|
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(props);
|
|
66
|
+
const locked = (0, import_ds_props_helpers.isLocked)({ disabled, applyAriaDisabled, readOnly });
|
|
66
67
|
const handleOnClick = import_react.default.useCallback(
|
|
67
68
|
(e) => {
|
|
68
|
-
if (
|
|
69
|
+
if (locked) return;
|
|
69
70
|
onClick?.(e);
|
|
70
71
|
},
|
|
71
|
-
[
|
|
72
|
+
[locked, onClick]
|
|
72
73
|
);
|
|
73
74
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
75
|
import_ds_menu_items_commons.StyledGlobalMenuItemWrapper,
|
|
75
76
|
{
|
|
76
77
|
id: dsId,
|
|
77
|
-
disabled,
|
|
78
|
+
$disabled: disabled,
|
|
78
79
|
isActive,
|
|
79
80
|
isSelected,
|
|
80
81
|
innerRef,
|
|
81
|
-
onMouseDown,
|
|
82
82
|
onMouseEnter,
|
|
83
83
|
onMouseLeave,
|
|
84
84
|
role: "option",
|
|
@@ -87,10 +87,10 @@ const DSMenuItemsMulti = (props) => {
|
|
|
87
87
|
style: wrapperStyles,
|
|
88
88
|
"data-testid": dataTestid,
|
|
89
89
|
"data-type": "multi",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
$applyAriaDisabled: applyAriaDisabled,
|
|
91
|
+
$readOnly: readOnly,
|
|
92
|
+
...(0, import_ds_props_helpers.omitLockedHandlers)((0, import_ds_props_helpers.omitLockAttributes)(globalAttributes), locked),
|
|
93
|
+
"aria-disabled": (0, import_ds_props_helpers.resolveAriaDisabled)({ softLocked: locked, consumerValue: globalAttributes["aria-disabled"] }),
|
|
94
94
|
onClick: handleOnClick,
|
|
95
95
|
getOwnerProps,
|
|
96
96
|
getOwnerPropsArguments,
|
|
@@ -102,7 +102,7 @@ const DSMenuItemsMulti = (props) => {
|
|
|
102
102
|
applyAriaDisabled,
|
|
103
103
|
readOnly,
|
|
104
104
|
checked: isSelected,
|
|
105
|
-
onMouseDown,
|
|
105
|
+
onMouseDown: locked ? void 0 : onMouseDown,
|
|
106
106
|
name: label,
|
|
107
107
|
label,
|
|
108
108
|
onChange: noop,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSMenuItemsMulti.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport {\n describe,\n isLocked,\n omitLockAttributes,\n omitLockedHandlers,\n useOwnerProps,\n resolveAriaDisabled,\n} from '@elliemae/ds-props-helpers';\nimport { PresentationalCheckbox } from '@elliemae/ds-form-checkbox';\nimport { StyledGlobalMenuItemWrapper, StyledItemContent } from '@elliemae/ds-menu-items-commons';\nimport { type DSMenuItemsMultiT, DSMenuItemsMultiPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsMulti } from './config/useMenuItemsMulti.js';\n\nconst noop = () => {};\n\nconst DSMenuItemsMulti: React.ComponentType<DSMenuItemsMultiT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsMulti(props);\n const {\n dsId,\n label,\n disabled,\n isSelected,\n isActive,\n onClick,\n dataTestid,\n innerRef,\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n wrapperStyles,\n tabIndex,\n render: Render,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const locked = isLocked({ disabled, applyAriaDisabled, readOnly });\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (locked) return;\n onClick?.(e);\n },\n [locked, onClick],\n );\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n $disabled={disabled}\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n role=\"option\"\n className={isActive ? 'ds-list-item-active' : ''}\n aria-selected={isSelected}\n style={wrapperStyles}\n data-testid={dataTestid}\n data-type=\"multi\"\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n {...omitLockedHandlers(omitLockAttributes(globalAttributes), locked)}\n // after the spread: a locked item prints \"true\" whatever the consumer passes; an unlocked item keeps the\n // consumer's own value (inversion of control)\n aria-disabled={resolveAriaDisabled({ softLocked: locked, consumerValue: globalAttributes['aria-disabled'] })}\n onClick={handleOnClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledItemContent getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <PresentationalCheckbox\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n checked={isSelected}\n onMouseDown={locked ? undefined : onMouseDown}\n name={label}\n label={label}\n onChange={noop}\n tabIndex={tabIndex}\n wrapLabel\n />\n </StyledItemContent>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSMultiMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsMulti.displayName = 'DSMultiMenuItem';\nconst DSMenuItemsMultiWithSchema = describe(DSMenuItemsMulti);\nDSMenuItemsMultiWithSchema.propTypes = DSMenuItemsMultiPropTypesSchema;\n\nexport { DSMenuItemsMulti, DSMenuItemsMultiWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Ef;AA1ER,mBAAkB;AAClB,8BAOO;AACP,8BAAuC;AACvC,mCAA+D;AAC/D,mCAAwE;AACxE,+BAAkC;AAElC,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,QAAI,4CAAkB,KAAK;AAC/G,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,KAAK;AAErE,QAAM,aAAS,kCAAS,EAAE,UAAU,mBAAmB,SAAS,CAAC;AACjE,QAAM,gBAAgB,aAAAA,QAAM;AAAA,IAC1B,CAAC,MAAwB;AACvB,UAAI,OAAQ;AACZ,gBAAU,CAAC;AAAA,IACb;AAAA,IACA,CAAC,QAAQ,OAAO;AAAA,EAClB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,WAAW,WAAW,wBAAwB;AAAA,MAC9C,iBAAe;AAAA,MACf,OAAO;AAAA,MACP,eAAa;AAAA,MACb,aAAU;AAAA,MACV,oBAAoB;AAAA,MACpB,WAAW;AAAA,MACV,OAAG,gDAAmB,4CAAmB,gBAAgB,GAAG,MAAM;AAAA,MAGnE,qBAAe,6CAAoB,EAAE,YAAY,QAAQ,eAAe,iBAAiB,eAAe,EAAE,CAAC;AAAA,MAC3G,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEH,qBAAW,SACV,4CAAC,UAAQ,GAAG,kBAAkB,IAE9B,4CAAC,kDAAkB,eAA8B,wBAC/C;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT,aAAa,SAAS,SAAY;AAAA,UAClC,MAAM;AAAA,UACN;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,WAAS;AAAA;AAAA,MACX,GACF;AAAA;AAAA,EAEJ;AAEJ;AAGA,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -50,8 +50,7 @@ const defaultProps = {
|
|
|
50
50
|
onMouseEnter: () => {
|
|
51
51
|
},
|
|
52
52
|
onMouseLeave: () => {
|
|
53
|
-
}
|
|
54
|
-
tabIndex: 0
|
|
53
|
+
}
|
|
55
54
|
};
|
|
56
55
|
const { tabIndex, label, value, ...notOvverriddenGlobalPropsTypes } = import_ds_props_helpers.globalAttributesPropTypes;
|
|
57
56
|
const DSMenuItemsMultiPropTypes = {
|
|
@@ -63,7 +62,7 @@ const DSMenuItemsMultiPropTypes = {
|
|
|
63
62
|
// TODO - add support to PropTypes.oneOf for typeof number
|
|
64
63
|
// currently PropTypes.oneOf([0, -1]) is not supported
|
|
65
64
|
tabIndex: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.string]).description(
|
|
66
|
-
"The tab index of the menu item.
|
|
65
|
+
"The tab index of the menu item. The item sets none by default: the host that composes it decides. For WCAG 2.1 AA compliance only -1 and 0 are allowed."
|
|
67
66
|
),
|
|
68
67
|
label: import_ds_props_helpers.PropTypes.string.description("The label of the menu item."),
|
|
69
68
|
isActive: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is active."),
|
|
@@ -71,7 +70,7 @@ const DSMenuItemsMultiPropTypes = {
|
|
|
71
70
|
value: import_ds_props_helpers.PropTypes.any.description("The value of the menu item."),
|
|
72
71
|
dataTestid: import_ds_props_helpers.PropTypes.string.description("The data-testid of the menu item."),
|
|
73
72
|
applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
|
|
74
|
-
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS.
|
|
73
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM."
|
|
75
74
|
).defaultValue(false)
|
|
76
75
|
};
|
|
77
76
|
const DSMenuItemsMultiPropTypesSchema = DSMenuItemsMultiPropTypes;
|
|
@@ -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, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\n\nexport declare namespace DSMenuItemsMultiT {\n export type WCAGTabIndex = 0 | -1;\n\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler;\n onMouseDown: React.MouseEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onMouseLeave: React.MouseEventHandler;\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AACvE,mCAIO;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\n\nexport declare namespace DSMenuItemsMultiT {\n export type WCAGTabIndex = 0 | -1;\n\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler;\n onMouseDown: React.MouseEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onMouseLeave: React.MouseEventHandler;\n };\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsMultiT.InternalProps> & {\n dataTestid?: string;\n value?: unknown;\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: DSMenuItemsMultiT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\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, ...notOvverriddenGlobalPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsMultiPropTypes: DSPropTypesSchema<DSMenuItemsMultiT.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 ...notOvverriddenGlobalPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\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]).description(\n 'The tab index of the menu item. The item sets none by default: the host that composes it decides. For WCAG 2.1 AA compliance only -1 and 0 are allowed.',\n ),\n label: PropTypes.string.description('The label of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.'),\n isSelected: PropTypes.bool.description('Whether the menu item has to show the selected state or not.'),\n value: PropTypes.any.description('The value of the menu item.'),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsMultiPropTypesSchema =\n DSMenuItemsMultiPropTypes as unknown as ValidationMap<DSMenuItemsMultiT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AACvE,mCAIO;AAiDA,MAAM,eAA+C;AAAA,EAC1D,GAAG;AAAA,EACH,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,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;AACvB;AAIA,MAAM,EAAE,UAAU,OAAO,OAAO,GAAG,+BAA+B,IAAI;AAE/D,MAAM,4BAAgF;AAAA;AAAA;AAAA,EAG3F,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA,EAGH,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE;AAAA,IAClE;AAAA,EACF;AAAA,EACA,OAAO,kCAAU,OAAO,YAAY,6BAA6B;AAAA,EACjE,UAAU,kCAAU,KAAK,YAAY,kCAAkC;AAAA,EACvE,YAAY,kCAAU,KAAK,YAAY,8DAA8D;AAAA,EACrG,OAAO,kCAAU,IAAI,YAAY,6BAA6B;AAAA,EAC9D,YAAY,kCAAU,OAAO,YAAY,mCAAmC;AAAA,EAC5E,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,kCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
describe,
|
|
6
|
+
isLocked,
|
|
7
|
+
omitLockAttributes,
|
|
8
|
+
omitLockedHandlers,
|
|
9
|
+
useOwnerProps,
|
|
10
|
+
resolveAriaDisabled
|
|
11
|
+
} from "@elliemae/ds-props-helpers";
|
|
5
12
|
import { PresentationalCheckbox } from "@elliemae/ds-form-checkbox";
|
|
6
13
|
import { StyledGlobalMenuItemWrapper, StyledItemContent } from "@elliemae/ds-menu-items-commons";
|
|
7
14
|
import { DSMenuItemsMultiPropTypesSchema } from "./react-desc-prop-types.js";
|
|
@@ -29,22 +36,22 @@ const DSMenuItemsMulti = (props) => {
|
|
|
29
36
|
readOnly
|
|
30
37
|
} = propsWithDefault;
|
|
31
38
|
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);
|
|
39
|
+
const locked = isLocked({ disabled, applyAriaDisabled, readOnly });
|
|
32
40
|
const handleOnClick = React2.useCallback(
|
|
33
41
|
(e) => {
|
|
34
|
-
if (
|
|
42
|
+
if (locked) return;
|
|
35
43
|
onClick?.(e);
|
|
36
44
|
},
|
|
37
|
-
[
|
|
45
|
+
[locked, onClick]
|
|
38
46
|
);
|
|
39
47
|
return /* @__PURE__ */ jsx(
|
|
40
48
|
StyledGlobalMenuItemWrapper,
|
|
41
49
|
{
|
|
42
50
|
id: dsId,
|
|
43
|
-
disabled,
|
|
51
|
+
$disabled: disabled,
|
|
44
52
|
isActive,
|
|
45
53
|
isSelected,
|
|
46
54
|
innerRef,
|
|
47
|
-
onMouseDown,
|
|
48
55
|
onMouseEnter,
|
|
49
56
|
onMouseLeave,
|
|
50
57
|
role: "option",
|
|
@@ -53,10 +60,10 @@ const DSMenuItemsMulti = (props) => {
|
|
|
53
60
|
style: wrapperStyles,
|
|
54
61
|
"data-testid": dataTestid,
|
|
55
62
|
"data-type": "multi",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
$applyAriaDisabled: applyAriaDisabled,
|
|
64
|
+
$readOnly: readOnly,
|
|
65
|
+
...omitLockedHandlers(omitLockAttributes(globalAttributes), locked),
|
|
66
|
+
"aria-disabled": resolveAriaDisabled({ softLocked: locked, consumerValue: globalAttributes["aria-disabled"] }),
|
|
60
67
|
onClick: handleOnClick,
|
|
61
68
|
getOwnerProps,
|
|
62
69
|
getOwnerPropsArguments,
|
|
@@ -68,7 +75,7 @@ const DSMenuItemsMulti = (props) => {
|
|
|
68
75
|
applyAriaDisabled,
|
|
69
76
|
readOnly,
|
|
70
77
|
checked: isSelected,
|
|
71
|
-
onMouseDown,
|
|
78
|
+
onMouseDown: locked ? void 0 : onMouseDown,
|
|
72
79
|
name: label,
|
|
73
80
|
label,
|
|
74
81
|
onChange: noop,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSMenuItemsMulti.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n isLocked,\n omitLockAttributes,\n omitLockedHandlers,\n useOwnerProps,\n resolveAriaDisabled,\n} from '@elliemae/ds-props-helpers';\nimport { PresentationalCheckbox } from '@elliemae/ds-form-checkbox';\nimport { StyledGlobalMenuItemWrapper, StyledItemContent } from '@elliemae/ds-menu-items-commons';\nimport { type DSMenuItemsMultiT, DSMenuItemsMultiPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsMulti } from './config/useMenuItemsMulti.js';\n\nconst noop = () => {};\n\nconst DSMenuItemsMulti: React.ComponentType<DSMenuItemsMultiT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsMulti(props);\n const {\n dsId,\n label,\n disabled,\n isSelected,\n isActive,\n onClick,\n dataTestid,\n innerRef,\n onMouseEnter,\n onMouseLeave,\n onMouseDown,\n wrapperStyles,\n tabIndex,\n render: Render,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(props);\n\n const locked = isLocked({ disabled, applyAriaDisabled, readOnly });\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (locked) return;\n onClick?.(e);\n },\n [locked, onClick],\n );\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n $disabled={disabled}\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n role=\"option\"\n className={isActive ? 'ds-list-item-active' : ''}\n aria-selected={isSelected}\n style={wrapperStyles}\n data-testid={dataTestid}\n data-type=\"multi\"\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n {...omitLockedHandlers(omitLockAttributes(globalAttributes), locked)}\n // after the spread: a locked item prints \"true\" whatever the consumer passes; an unlocked item keeps the\n // consumer's own value (inversion of control)\n aria-disabled={resolveAriaDisabled({ softLocked: locked, consumerValue: globalAttributes['aria-disabled'] })}\n onClick={handleOnClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledItemContent getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <PresentationalCheckbox\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n checked={isSelected}\n onMouseDown={locked ? undefined : onMouseDown}\n name={label}\n label={label}\n onChange={noop}\n tabIndex={tabIndex}\n wrapLabel\n />\n </StyledItemContent>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSMultiMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsMulti.displayName = 'DSMultiMenuItem';\nconst DSMenuItemsMultiWithSchema = describe(DSMenuItemsMulti);\nDSMenuItemsMultiWithSchema.propTypes = DSMenuItemsMultiPropTypesSchema;\n\nexport { DSMenuItemsMulti, DSMenuItemsMultiWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0Ef;AA1ER,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,yBAAyB;AAC/D,SAAiC,uCAAuC;AACxE,SAAS,yBAAyB;AAElC,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,IAAI,kBAAkB,KAAK;AAC/G,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAc,KAAK;AAErE,QAAM,SAAS,SAAS,EAAE,UAAU,mBAAmB,SAAS,CAAC;AACjE,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,CAAC,MAAwB;AACvB,UAAI,OAAQ;AACZ,gBAAU,CAAC;AAAA,IACb;AAAA,IACA,CAAC,QAAQ,OAAO;AAAA,EAClB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,WAAW,WAAW,wBAAwB;AAAA,MAC9C,iBAAe;AAAA,MACf,OAAO;AAAA,MACP,eAAa;AAAA,MACb,aAAU;AAAA,MACV,oBAAoB;AAAA,MACpB,WAAW;AAAA,MACV,GAAG,mBAAmB,mBAAmB,gBAAgB,GAAG,MAAM;AAAA,MAGnE,iBAAe,oBAAoB,EAAE,YAAY,QAAQ,eAAe,iBAAiB,eAAe,EAAE,CAAC;AAAA,MAC3G,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEH,qBAAW,SACV,oBAAC,UAAQ,GAAG,kBAAkB,IAE9B,oBAAC,qBAAkB,eAA8B,wBAC/C;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT,aAAa,SAAS,SAAY;AAAA,UAClC,MAAM;AAAA,UACN;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,WAAS;AAAA;AAAA,MACX,GACF;AAAA;AAAA,EAEJ;AAEJ;AAGA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,8 +18,7 @@ const defaultProps = {
|
|
|
18
18
|
onMouseEnter: () => {
|
|
19
19
|
},
|
|
20
20
|
onMouseLeave: () => {
|
|
21
|
-
}
|
|
22
|
-
tabIndex: 0
|
|
21
|
+
}
|
|
23
22
|
};
|
|
24
23
|
const { tabIndex, label, value, ...notOvverriddenGlobalPropsTypes } = globalAttributesPropTypes;
|
|
25
24
|
const DSMenuItemsMultiPropTypes = {
|
|
@@ -31,7 +30,7 @@ const DSMenuItemsMultiPropTypes = {
|
|
|
31
30
|
// TODO - add support to PropTypes.oneOf for typeof number
|
|
32
31
|
// currently PropTypes.oneOf([0, -1]) is not supported
|
|
33
32
|
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description(
|
|
34
|
-
"The tab index of the menu item.
|
|
33
|
+
"The tab index of the menu item. The item sets none by default: the host that composes it decides. For WCAG 2.1 AA compliance only -1 and 0 are allowed."
|
|
35
34
|
),
|
|
36
35
|
label: PropTypes.string.description("The label of the menu item."),
|
|
37
36
|
isActive: PropTypes.bool.description("Whether the menu item is active."),
|
|
@@ -39,7 +38,7 @@ const DSMenuItemsMultiPropTypes = {
|
|
|
39
38
|
value: PropTypes.any.description("The value of the menu item."),
|
|
40
39
|
dataTestid: PropTypes.string.description("The data-testid of the menu item."),
|
|
41
40
|
applyAriaDisabled: PropTypes.bool.description(
|
|
42
|
-
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS.
|
|
41
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM."
|
|
43
42
|
).defaultValue(false)
|
|
44
43
|
};
|
|
45
44
|
const DSMenuItemsMultiPropTypesSchema = DSMenuItemsMultiPropTypes;
|
|
@@ -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, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\n\nexport declare namespace DSMenuItemsMultiT {\n export type WCAGTabIndex = 0 | -1;\n\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler;\n onMouseDown: React.MouseEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onMouseLeave: React.MouseEventHandler;\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE;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, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n type DSMenuItemsCommonsT,\n DSMenuItemsCommonsPropTypes,\n DSMenuItemsCommonsDefaultProps,\n} from '@elliemae/ds-menu-items-commons';\nimport type React from 'react';\n\nexport declare namespace DSMenuItemsMultiT {\n export type WCAGTabIndex = 0 | -1;\n\n // typescript inheritance has no syntax support for \"interfaces\", we have to use union types instead...\n export type RequiredProps = DSMenuItemsCommonsT.RequiredProps;\n export type DefaultProps = DSMenuItemsCommonsT.DefaultProps & {\n label: string;\n isActive: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n isSelected: boolean;\n onClick: React.MouseEventHandler;\n onMouseDown: React.MouseEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onMouseLeave: React.MouseEventHandler;\n };\n export type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsMultiT.InternalProps> & {\n dataTestid?: string;\n value?: unknown;\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: DSMenuItemsMultiT.DefaultProps = {\n ...DSMenuItemsCommonsDefaultProps,\n label: '',\n isActive: false,\n disabled: false,\n applyAriaDisabled: false,\n isSelected: false,\n onClick: () => {},\n onMouseDown: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\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, ...notOvverriddenGlobalPropsTypes } = globalAttributesPropTypes;\n\nexport const DSMenuItemsMultiPropTypes: DSPropTypesSchema<DSMenuItemsMultiT.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 ...notOvverriddenGlobalPropsTypes,\n ...xstyledPropTypes,\n ...DSMenuItemsCommonsPropTypes,\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]).description(\n 'The tab index of the menu item. The item sets none by default: the host that composes it decides. For WCAG 2.1 AA compliance only -1 and 0 are allowed.',\n ),\n label: PropTypes.string.description('The label of the menu item.'),\n isActive: PropTypes.bool.description('Whether the menu item is active.'),\n isSelected: PropTypes.bool.description('Whether the menu item has to show the selected state or not.'),\n value: PropTypes.any.description('The value of the menu item.'),\n dataTestid: PropTypes.string.description('The data-testid of the menu item.'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. IGNORES EVERY ACTION (click, Enter, Space) AND THE CONSUMER HANDLERS FOR THEM.',\n )\n .defaultValue(false),\n};\n\nexport const DSMenuItemsMultiPropTypesSchema =\n DSMenuItemsMultiPropTypes as unknown as ValidationMap<DSMenuItemsMultiT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE;AAAA,EAEE;AAAA,EACA;AAAA,OACK;AAiDA,MAAM,eAA+C;AAAA,EAC1D,GAAG;AAAA,EACH,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,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;AACvB;AAIA,MAAM,EAAE,UAAU,OAAO,OAAO,GAAG,+BAA+B,IAAI;AAE/D,MAAM,4BAAgF;AAAA;AAAA;AAAA,EAG3F,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA,EAGH,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE;AAAA,IAClE;AAAA,EACF;AAAA,EACA,OAAO,UAAU,OAAO,YAAY,6BAA6B;AAAA,EACjE,UAAU,UAAU,KAAK,YAAY,kCAAkC;AAAA,EACvE,YAAY,UAAU,KAAK,YAAY,8DAA8D;AAAA,EACrG,OAAO,UAAU,IAAI,YAAY,6BAA6B;AAAA,EAC9D,YAAY,UAAU,OAAO,YAAY,mCAAmC;AAAA,EAC5E,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,kCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,14 +8,13 @@ export interface MenuItemsMultiCTX {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const useMenuItemsMulti: (propsFromUser: DSMenuItemsMultiT.Props) => {
|
|
10
10
|
propsWithDefault: DSMenuItemsMultiT.InternalProps;
|
|
11
|
-
globalProps: Partial<Pick<object, "label" | "disabled" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "
|
|
11
|
+
globalProps: Partial<Pick<object, "label" | "disabled" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
|
|
12
12
|
label?: string | undefined | undefined;
|
|
13
13
|
disabled?: boolean | undefined | undefined;
|
|
14
14
|
onClick?: React.MouseEventHandler<HTMLLIElement> | undefined;
|
|
15
15
|
onMouseDown?: React.MouseEventHandler<HTMLLIElement> | undefined;
|
|
16
16
|
onMouseEnter?: React.MouseEventHandler<HTMLLIElement> | undefined;
|
|
17
17
|
onMouseLeave?: React.MouseEventHandler<HTMLLIElement> | undefined;
|
|
18
|
-
tabIndex?: 0 | -1 | undefined;
|
|
19
18
|
form?: string | undefined | undefined;
|
|
20
19
|
list?: string | undefined | undefined;
|
|
21
20
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -246,6 +245,7 @@ export declare const useMenuItemsMulti: (propsFromUser: DSMenuItemsMultiT.Props)
|
|
|
246
245
|
slot?: string | undefined | undefined;
|
|
247
246
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
248
247
|
style?: React.CSSProperties | undefined;
|
|
248
|
+
tabIndex?: 0 | -1 | undefined;
|
|
249
249
|
title?: string | undefined | undefined;
|
|
250
250
|
translate?: "yes" | "no" | undefined | undefined;
|
|
251
251
|
radioGroup?: string | undefined | undefined;
|
|
@@ -14,7 +14,6 @@ export declare namespace DSMenuItemsMultiT {
|
|
|
14
14
|
onMouseDown: React.MouseEventHandler;
|
|
15
15
|
onMouseEnter: React.MouseEventHandler;
|
|
16
16
|
onMouseLeave: React.MouseEventHandler;
|
|
17
|
-
tabIndex: WCAGTabIndex;
|
|
18
17
|
};
|
|
19
18
|
type OptionalProps = DSMenuItemsCommonsT.OptionalProps<DSMenuItemsMultiT.InternalProps> & {
|
|
20
19
|
dataTestid?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-menu-items-multi",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.76",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Menu Items Multi",
|
|
6
6
|
"files": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-form-checkbox": "3.80.0-next.
|
|
40
|
-
"@elliemae/ds-menu-items-commons": "3.80.0-next.
|
|
41
|
-
"@elliemae/ds-props-helpers": "3.80.0-next.
|
|
39
|
+
"@elliemae/ds-form-checkbox": "3.80.0-next.76",
|
|
40
|
+
"@elliemae/ds-menu-items-commons": "3.80.0-next.76",
|
|
41
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.76"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.
|
|
45
|
-
"@elliemae/ds-test-utils": "3.80.0-next.
|
|
44
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.76",
|
|
45
|
+
"@elliemae/ds-test-utils": "3.80.0-next.76",
|
|
46
46
|
"jest": "^30.0.0",
|
|
47
47
|
"lodash-es": "^4.18.1",
|
|
48
48
|
"styled-components": "~5.3.11"
|