@elliemae/ds-menu-items-single 3.48.2-rc.0 → 3.49.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSMenuItemsSingle.js +1 -1
- package/dist/cjs/DSMenuItemsSingle.js.map +2 -2
- package/dist/esm/DSMenuItemsSingle.js +1 -1
- package/dist/esm/DSMenuItemsSingle.js.map +2 -2
- package/dist/types/config/useMenuItemsSingle.d.ts +6 -6
- package/dist/types/react-desc-prop-types.d.ts +1 -0
- package/package.json +7 -7
|
@@ -101,7 +101,7 @@ const DSMenuItemsSingle = (props) => {
|
|
|
101
101
|
"data-testid": dataTestid,
|
|
102
102
|
disabled,
|
|
103
103
|
"data-type": "single",
|
|
104
|
-
"aria-disabled": applyAriaDisabled,
|
|
104
|
+
"aria-disabled": applyAriaDisabled || disabled,
|
|
105
105
|
...globalProps,
|
|
106
106
|
onClick: handleOnClick,
|
|
107
107
|
...xstyledProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSMenuItemsSingle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { type DSMenuItemsSingleT, DSMenuItemsSinglePropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsSingle } from './config/useMenuItemsSingle.js';\n\nconst DSMenuItemsSingle: React.ComponentType<DSMenuItemsSingleT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useMenuItemsSingle(props);\n const {\n dsId,\n label,\n secondaryLabel,\n isSelected,\n onClick,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n } = propsWithDefault;\n\n const onMouseDownHandler = React.useCallback(\n (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n },\n [disabled, onMouseDown],\n );\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n onClick?.(e);\n },\n [applyAriaDisabled, onClick],\n );\n\n const gridLayout = React.useMemo(() => {\n const cols = {\n small: ['1rem', 'auto'],\n medium: ['1.2308rem', 'auto'],\n };\n if (secondaryLabel) {\n cols.small.push('min-content');\n cols.medium.push('min-content');\n }\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n aria-selected={isSelected}\n id={dsId}\n role=\"option\"\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseDown={onMouseDownHandler}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n data-type=\"single\"\n aria-disabled={applyAriaDisabled}\n {...globalProps}\n onClick={handleOnClick}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>}\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSSingleMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingle.displayName = 'DSSingleMenuItem';\nconst DSMenuItemsSingleWithSchema = describe(DSMenuItemsSingle);\nDSMenuItemsSingleWithSchema.propTypes = DSMenuItemsSinglePropTypesSchema;\n\nexport { DSMenuItemsSingle, DSMenuItemsSingleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFf;AAlFR,mBAAkB;AAClB,8BAAyB;AACzB,mCAKO;AACP,sBAA0B;AAC1B,mCAA0E;AAC1E,gCAAmC;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aAAa,QAAI,8CAAmB,KAAK;AAChF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,qBAAqB,aAAAA,QAAM;AAAA,IAC/B,CAAC,MAAwB;AACvB,UAAI,SAAU;AACd,oBAAc,CAAC;AAAA,IACjB;AAAA,IACA,CAAC,UAAU,WAAW;AAAA,EACxB;AAEA,QAAM,gBAAgB,aAAAA,QAAM;AAAA,IAC1B,CAAC,MAAwB;AACvB,UAAI,kBAAmB;AACvB,gBAAU,CAAC;AAAA,IACb;AAAA,IACA,CAAC,mBAAmB,OAAO;AAAA,EAC7B;AAEA,QAAM,aAAa,aAAAA,QAAM,QAAQ,MAAM;AACrC,UAAM,OAAO;AAAA,MACX,OAAO,CAAC,QAAQ,MAAM;AAAA,MACtB,QAAQ,CAAC,aAAa,MAAM;AAAA,IAC9B;AACA,QAAI,gBAAgB;AAClB,WAAK,MAAM,KAAK,aAAa;AAC7B,WAAK,OAAO,KAAK,aAAa;AAAA,IAChC;AACA,WAAO;AAAA,EACT,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,iBAAe;AAAA,MACf,IAAI;AAAA,MACJ,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,WAAW,WAAW,wBAAwB;AAAA,MAC9C,OAAO;AAAA,MACP,eAAa;AAAA,MACb;AAAA,MACA,aAAU;AAAA,MACV,iBAAe;AAAA,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { type DSMenuItemsSingleT, DSMenuItemsSinglePropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsSingle } from './config/useMenuItemsSingle.js';\n\nconst DSMenuItemsSingle: React.ComponentType<DSMenuItemsSingleT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useMenuItemsSingle(props);\n const {\n dsId,\n label,\n secondaryLabel,\n isSelected,\n onClick,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n } = propsWithDefault;\n\n const onMouseDownHandler = React.useCallback(\n (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n },\n [disabled, onMouseDown],\n );\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n onClick?.(e);\n },\n [applyAriaDisabled, onClick],\n );\n\n const gridLayout = React.useMemo(() => {\n const cols = {\n small: ['1rem', 'auto'],\n medium: ['1.2308rem', 'auto'],\n };\n if (secondaryLabel) {\n cols.small.push('min-content');\n cols.medium.push('min-content');\n }\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n aria-selected={isSelected}\n id={dsId}\n role=\"option\"\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseDown={onMouseDownHandler}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n data-type=\"single\"\n aria-disabled={applyAriaDisabled || disabled}\n {...globalProps}\n onClick={handleOnClick}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>}\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSSingleMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingle.displayName = 'DSSingleMenuItem';\nconst DSMenuItemsSingleWithSchema = describe(DSMenuItemsSingle);\nDSMenuItemsSingleWithSchema.propTypes = DSMenuItemsSinglePropTypesSchema;\n\nexport { DSMenuItemsSingle, DSMenuItemsSingleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFf;AAlFR,mBAAkB;AAClB,8BAAyB;AACzB,mCAKO;AACP,sBAA0B;AAC1B,mCAA0E;AAC1E,gCAAmC;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aAAa,QAAI,8CAAmB,KAAK;AAChF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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CAAC,iBAAiB,KAAK,GAAG,GAAG;AAAA,QAC5E,4CAAC,mDAAoB,iBAAM;AAAA,QAC1B,mBAAmB,UAAa,4CAAC,4DAA6B,0BAAe;AAAA,SAChF;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -72,7 +72,7 @@ const DSMenuItemsSingle = (props) => {
|
|
|
72
72
|
"data-testid": dataTestid,
|
|
73
73
|
disabled,
|
|
74
74
|
"data-type": "single",
|
|
75
|
-
"aria-disabled": applyAriaDisabled,
|
|
75
|
+
"aria-disabled": applyAriaDisabled || disabled,
|
|
76
76
|
...globalProps,
|
|
77
77
|
onClick: handleOnClick,
|
|
78
78
|
...xstyledProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSMenuItemsSingle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { type DSMenuItemsSingleT, DSMenuItemsSinglePropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsSingle } from './config/useMenuItemsSingle.js';\n\nconst DSMenuItemsSingle: React.ComponentType<DSMenuItemsSingleT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useMenuItemsSingle(props);\n const {\n dsId,\n label,\n secondaryLabel,\n isSelected,\n onClick,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n } = propsWithDefault;\n\n const onMouseDownHandler = React.useCallback(\n (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n },\n [disabled, onMouseDown],\n );\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n onClick?.(e);\n },\n [applyAriaDisabled, onClick],\n );\n\n const gridLayout = React.useMemo(() => {\n const cols = {\n small: ['1rem', 'auto'],\n medium: ['1.2308rem', 'auto'],\n };\n if (secondaryLabel) {\n cols.small.push('min-content');\n cols.medium.push('min-content');\n }\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n aria-selected={isSelected}\n id={dsId}\n role=\"option\"\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseDown={onMouseDownHandler}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n data-type=\"single\"\n aria-disabled={applyAriaDisabled}\n {...globalProps}\n onClick={handleOnClick}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>}\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSSingleMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingle.displayName = 'DSSingleMenuItem';\nconst DSMenuItemsSingleWithSchema = describe(DSMenuItemsSingle);\nDSMenuItemsSingleWithSchema.propTypes = DSMenuItemsSinglePropTypesSchema;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AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,WAAW,WAAW,wBAAwB;AAAA,MAC9C,OAAO;AAAA,MACP,eAAa;AAAA,MACb;AAAA,MACA,aAAU;AAAA,MACV,iBAAe;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { type DSMenuItemsSingleT, DSMenuItemsSinglePropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsSingle } from './config/useMenuItemsSingle.js';\n\nconst DSMenuItemsSingle: React.ComponentType<DSMenuItemsSingleT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useMenuItemsSingle(props);\n const {\n dsId,\n label,\n secondaryLabel,\n isSelected,\n onClick,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n } = propsWithDefault;\n\n const onMouseDownHandler = React.useCallback(\n (e: React.MouseEvent) => {\n if (disabled) return;\n onMouseDown?.(e);\n },\n [disabled, onMouseDown],\n );\n\n const handleOnClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n onClick?.(e);\n },\n [applyAriaDisabled, onClick],\n );\n\n const gridLayout = React.useMemo(() => {\n const cols = {\n small: ['1rem', 'auto'],\n medium: ['1.2308rem', 'auto'],\n };\n if (secondaryLabel) {\n cols.small.push('min-content');\n cols.medium.push('min-content');\n }\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n aria-selected={isSelected}\n id={dsId}\n role=\"option\"\n isActive={isActive}\n isSelected={isSelected}\n innerRef={innerRef}\n onMouseDown={onMouseDownHandler}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n className={isActive ? 'ds-list-item-active' : ''}\n style={wrapperStyles}\n data-testid={dataTestid}\n disabled={disabled}\n data-type=\"single\"\n aria-disabled={applyAriaDisabled || disabled}\n {...globalProps}\n onClick={handleOnClick}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <div>{isSelected && <Checkmark size=\"s\" color={['brand-primary', '600']} />}</div>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>}\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSSingleMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsSingle.displayName = 'DSSingleMenuItem';\nconst DSMenuItemsSingleWithSchema = describe(DSMenuItemsSingle);\nDSMenuItemsSingleWithSchema.propTypes = DSMenuItemsSinglePropTypesSchema;\n\nexport { DSMenuItemsSingle, DSMenuItemsSingleWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkFf,cAEA,YAFA;AAlFR,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAkC,wCAAwC;AAC1E,SAAS,0BAA0B;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,mBAAmB,KAAK;AAChF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AA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AAA,QAC1B,mBAAmB,UAAa,oBAAC,+BAA6B,0BAAe;AAAA,SAChF;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -8,7 +8,7 @@ export interface MenuItemsSingleCTX {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Props) => {
|
|
10
10
|
propsWithDefault: DSMenuItemsSingleT.InternalProps;
|
|
11
|
-
globalProps: Partial<Pick<object, "label" | "disabled" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "tabIndex" | "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" | "onResize" | "onResizeCapture" | "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" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "
|
|
11
|
+
globalProps: Partial<Pick<object, "label" | "disabled" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "tabIndex" | "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" | "onResize" | "onResizeCapture" | "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" | "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" | "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;
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
14
|
onClick?: React.MouseEventHandler<HTMLLIElement> | undefined;
|
|
@@ -20,7 +20,7 @@ export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Prop
|
|
|
20
20
|
list?: string | undefined;
|
|
21
21
|
"aria-activedescendant"?: string | undefined;
|
|
22
22
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
23
|
-
"aria-autocomplete"?: "
|
|
23
|
+
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
24
24
|
"aria-braillelabel"?: string | undefined;
|
|
25
25
|
"aria-brailleroledescription"?: string | undefined;
|
|
26
26
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Prop
|
|
|
35
35
|
"aria-description"?: string | undefined;
|
|
36
36
|
"aria-details"?: string | undefined;
|
|
37
37
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
38
|
-
"aria-dropeffect"?: "
|
|
38
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
39
39
|
"aria-errormessage"?: string | undefined;
|
|
40
40
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
41
41
|
"aria-flowto"?: string | undefined;
|
|
@@ -233,6 +233,7 @@ export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Prop
|
|
|
233
233
|
suppressContentEditableWarning?: boolean | undefined;
|
|
234
234
|
suppressHydrationWarning?: boolean | undefined;
|
|
235
235
|
accessKey?: string | undefined;
|
|
236
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined;
|
|
236
237
|
autoFocus?: boolean | undefined;
|
|
237
238
|
className?: string | undefined;
|
|
238
239
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
@@ -262,7 +263,6 @@ export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Prop
|
|
|
262
263
|
rev?: string | undefined;
|
|
263
264
|
typeof?: string | undefined;
|
|
264
265
|
vocab?: string | undefined;
|
|
265
|
-
autoCapitalize?: string | undefined;
|
|
266
266
|
autoCorrect?: string | undefined;
|
|
267
267
|
autoSave?: string | undefined;
|
|
268
268
|
color?: string | undefined;
|
|
@@ -273,8 +273,8 @@ export declare const useMenuItemsSingle: (propsFromUser: DSMenuItemsSingleT.Prop
|
|
|
273
273
|
itemRef?: string | undefined;
|
|
274
274
|
results?: number | undefined;
|
|
275
275
|
security?: string | undefined;
|
|
276
|
-
unselectable?: "
|
|
277
|
-
inputMode?: "
|
|
276
|
+
unselectable?: "off" | "on" | undefined;
|
|
277
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
278
278
|
is?: string | undefined;
|
|
279
279
|
accept?: string | undefined;
|
|
280
280
|
acceptCharset?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-menu-items-single",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.49.0-beta.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Menu Items Single",
|
|
6
6
|
"files": [
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@xstyled/styled-components": "~3.6.0",
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
40
|
+
"@elliemae/ds-grid": "3.49.0-beta.2",
|
|
41
|
+
"@elliemae/ds-icons": "3.49.0-beta.2",
|
|
42
|
+
"@elliemae/ds-menu-items-commons": "3.49.0-beta.2",
|
|
43
|
+
"@elliemae/ds-props-helpers": "3.49.0-beta.2",
|
|
44
|
+
"@elliemae/ds-system": "3.49.0-beta.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"styled-components": "~5.3.9",
|
|
49
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
49
|
+
"@elliemae/ds-monorepo-devops": "3.49.0-beta.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@testing-library/jest-dom": "~5.16.4",
|