@elliemae/ds-menu-items-single 3.70.0-next.27 → 3.70.0-next.29

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.
@@ -112,7 +112,7 @@ const DSMenuItemsSingle = (props) => {
112
112
  "data-testid": dataTestid,
113
113
  disabled,
114
114
  "data-type": "single",
115
- "aria-disabled": applyAriaDisabled || disabled,
115
+ "aria-disabled": applyAriaDisabled || disabled || readOnly,
116
116
  ...globalProps,
117
117
  onClick: handleOnClick,
118
118
  onKeyDown: handleOnKeyDown,
@@ -128,7 +128,7 @@ const DSMenuItemsSingle = (props) => {
128
128
  getOwnerProps,
129
129
  children: [
130
130
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, { size: "s", color: checkmarkColor }) }),
131
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemLabel, { getOwnerProps, variant: "b2", children: label }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemLabel, { getOwnerProps, variant: "b2", component: "span", children: label }),
132
132
  secondaryLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemSecondaryLabel, { getOwnerProps, children: secondaryLabel })
133
133
  ]
134
134
  }
@@ -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, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark, type SvgIconT } 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 onKeyDown,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(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 (disabled || applyAriaDisabled || readOnly) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, readOnly, onClick],\n );\n\n const handleOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if ((applyAriaDisabled || readOnly) && (e.code === 'Space' || e.code === 'Enter')) return;\n onKeyDown?.(e);\n },\n [applyAriaDisabled, readOnly, onKeyDown],\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 const checkmarkColor: SvgIconT.OptionalProps['color'] = applyAriaDisabled\n ? ['neutral', '400']\n : ['brand-primary', '600'];\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 onKeyDown={handleOnKeyDown}\n getOwnerProps={getOwnerProps}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper\n cols={gridLayout}\n minHeight=\"16px\"\n gutter=\"xxs\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n >\n <div>{isSelected && <Checkmark size=\"s\" color={checkmarkColor} />}</div>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\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;ADoGf;AApGR,mBAAkB;AAClB,8BAAwC;AACxC,mCAKO;AACP,sBAAyC;AACzC,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;AA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;AAAA,MAC9C,OAAO;AAAA,MACP,eAAa;AAAA,MACb;AAAA,MACA,aAAU;AAAA,MACV,iBAAe,qBAAqB;AAAA,MACnC,GAAG;AAAA,MACJ,SAAS;AAAA,MACT,WAAW;AAAA,MACX;AAAA,MACC,GAAG;AAAA,MAEH,qBAAW,SACV,4CAAC,UAAQ,GAAG,kBAAkB,IAE9B;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,UACV,QAAO;AAAA,UACP,YAAW;AAAA,UACX;AAAA,UAEA;AAAA,wDAAC,SAAK,wBAAc,4CAAC,6BAAU,MAAK,KAAI,OAAO,gBAAgB,GAAG;AAAA,YAClE,4CAAC,mDAAmB,eAA8B,SAAQ,MACvD,iBACH;AAAA,YACC,mBAAmB,UAClB,4CAAC,4DAA4B,eAA+B,0BAAe;AAAA;AAAA;AAAA,MAE/E;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark, type SvgIconT } 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 onKeyDown,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(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 (disabled || applyAriaDisabled || readOnly) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, readOnly, onClick],\n );\n\n const handleOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if ((applyAriaDisabled || readOnly) && (e.code === 'Space' || e.code === 'Enter')) return;\n onKeyDown?.(e);\n },\n [applyAriaDisabled, readOnly, onKeyDown],\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 const checkmarkColor: SvgIconT.OptionalProps['color'] = applyAriaDisabled\n ? ['neutral', '400']\n : ['brand-primary', '600'];\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 || readOnly}\n {...globalProps}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n getOwnerProps={getOwnerProps}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper\n cols={gridLayout}\n minHeight=\"16px\"\n gutter=\"xxs\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n >\n <div>{isSelected && <Checkmark size=\"s\" color={checkmarkColor} />}</div>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\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;ADoGf;AApGR,mBAAkB;AAClB,8BAAwC;AACxC,mCAKO;AACP,sBAAyC;AACzC,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;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,cAAc,QAAI,uCAAc,gBAAgB;AAExD,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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;AAAA,UACX;AAAA,UAEA;AAAA,wDAAC,SAAK,wBAAc,4CAAC,6BAAU,MAAK,KAAI,OAAO,gBAAgB,GAAG;AAAA,YAClE,4CAAC,mDAAmB,eAA8B,SAAQ,MAAK,WAAU,QACtE,iBACH;AAAA,YACC,mBAAmB,UAClB,4CAAC,4DAA4B,eAA+B,0BAAe;AAAA;AAAA;AAAA,MAE/E;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -83,7 +83,7 @@ const DSMenuItemsSingle = (props) => {
83
83
  "data-testid": dataTestid,
84
84
  disabled,
85
85
  "data-type": "single",
86
- "aria-disabled": applyAriaDisabled || disabled,
86
+ "aria-disabled": applyAriaDisabled || disabled || readOnly,
87
87
  ...globalProps,
88
88
  onClick: handleOnClick,
89
89
  onKeyDown: handleOnKeyDown,
@@ -99,7 +99,7 @@ const DSMenuItemsSingle = (props) => {
99
99
  getOwnerProps,
100
100
  children: [
101
101
  /* @__PURE__ */ jsx("div", { children: isSelected && /* @__PURE__ */ jsx(Checkmark, { size: "s", color: checkmarkColor }) }),
102
- /* @__PURE__ */ jsx(StyleMenuItemLabel, { getOwnerProps, variant: "b2", children: label }),
102
+ /* @__PURE__ */ jsx(StyleMenuItemLabel, { getOwnerProps, variant: "b2", component: "span", children: label }),
103
103
  secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { getOwnerProps, children: secondaryLabel })
104
104
  ]
105
105
  }
@@ -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, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark, type SvgIconT } 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 onKeyDown,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(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 (disabled || applyAriaDisabled || readOnly) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, readOnly, onClick],\n );\n\n const handleOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if ((applyAriaDisabled || readOnly) && (e.code === 'Space' || e.code === 'Enter')) return;\n onKeyDown?.(e);\n },\n [applyAriaDisabled, readOnly, onKeyDown],\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 const checkmarkColor: SvgIconT.OptionalProps['color'] = applyAriaDisabled\n ? ['neutral', '400']\n : ['brand-primary', '600'];\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 onKeyDown={handleOnKeyDown}\n getOwnerProps={getOwnerProps}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper\n cols={gridLayout}\n minHeight=\"16px\"\n gutter=\"xxs\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n >\n <div>{isSelected && <Checkmark size=\"s\" color={checkmarkColor} />}</div>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\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;ACoGf,cAEA,YAFA;AApGR,OAAOA,YAAW;AAClB,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAgC;AACzC,SAAkC,wCAAwC;AAC1E,SAAS,0BAA0B;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aA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ACJ,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,qBAAqB;AAAA,MACnC,GAAG;AAAA,MACJ,SAAS;AAAA,MACT,WAAW;AAAA,MACX;AAAA,MACC,GAAG;AAAA,MAEH,qBAAW,SACV,oBAAC,UAAQ,GAAG,kBAAkB,IAE9B;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,UACV,QAAO;AAAA,UACP,YAAW;AAAA,UACX;AAAA,UAEA;AAAA,gCAAC,SAAK,wBAAc,oBAAC,aAAU,MAAK,KAAI,OAAO,gBAAgB,GAAG;AAAA,YAClE,oBAAC,sBAAmB,eAA8B,SAAQ,MACvD,iBACH;AAAA,YACC,mBAAmB,UAClB,oBAAC,+BAA4B,eAA+B,0BAAe;AAAA;AAAA;AAAA,MAE/E;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport {\n StyledGlobalMenuItemWrapper,\n StyledContentWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '@elliemae/ds-menu-items-commons';\nimport { Checkmark, type SvgIconT } 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 onKeyDown,\n isActive,\n innerRef,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n wrapperStyles,\n render: Render,\n dataTestid,\n disabled,\n applyAriaDisabled,\n readOnly,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(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 (disabled || applyAriaDisabled || readOnly) return;\n onClick?.(e);\n },\n [disabled, applyAriaDisabled, readOnly, onClick],\n );\n\n const handleOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if ((applyAriaDisabled || readOnly) && (e.code === 'Space' || e.code === 'Enter')) return;\n onKeyDown?.(e);\n },\n [applyAriaDisabled, readOnly, onKeyDown],\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 const checkmarkColor: SvgIconT.OptionalProps['color'] = applyAriaDisabled\n ? ['neutral', '400']\n : ['brand-primary', '600'];\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 || readOnly}\n {...globalProps}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n getOwnerProps={getOwnerProps}\n {...xstyledProps}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper\n cols={gridLayout}\n minHeight=\"16px\"\n gutter=\"xxs\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n >\n <div>{isSelected && <Checkmark size=\"s\" color={checkmarkColor} />}</div>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\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;ACoGf,cAEA,YAFA;AApGR,OAAOA,YAAW;AAClB,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAgC;AACzC,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;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,cAAc,IAAI,cAAc,gBAAgB;AAExD,QAAM,qBAAqBA,OAAM;AA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,UAAQ,GAAG,kBAAkB,IAE9B;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,UACV,QAAO;AAAA,UACP,YAAW;AAAA,UACX;AAAA,UAEA;AAAA,gCAAC,SAAK,wBAAc,oBAAC,aAAU,MAAK,KAAI,OAAO,gBAAgB,GAAG;AAAA,YAClE,oBAAC,sBAAmB,eAA8B,SAAQ,MAAK,WAAU,QACtE,iBACH;AAAA,YACC,mBAAmB,UAClB,oBAAC,+BAA4B,eAA+B,0BAAe;AAAA;AAAA;AAAA,MAE/E;AAAA;AAAA,EAEJ;AAEJ;AAGA,kBAAkB,cAAc;AAChC,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
6
6
  "names": ["React"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-menu-items-single",
3
- "version": "3.70.0-next.27",
3
+ "version": "3.70.0-next.29",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Menu Items Single",
6
6
  "files": [
@@ -36,16 +36,16 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-menu-items-commons": "3.70.0-next.27",
40
- "@elliemae/ds-icons": "3.70.0-next.27",
41
- "@elliemae/ds-props-helpers": "3.70.0-next.27"
39
+ "@elliemae/ds-menu-items-commons": "3.70.0-next.29",
40
+ "@elliemae/ds-icons": "3.70.0-next.29",
41
+ "@elliemae/ds-props-helpers": "3.70.0-next.29"
42
42
  },
43
43
  "devDependencies": {
44
44
  "jest": "^30.0.0",
45
45
  "lodash-es": "^4.18.1",
46
46
  "styled-components": "~5.3.9",
47
- "@elliemae/ds-monorepo-devops": "3.70.0-next.27",
48
- "@elliemae/ds-test-utils": "3.70.0-next.27"
47
+ "@elliemae/ds-test-utils": "3.70.0-next.29",
48
+ "@elliemae/ds-monorepo-devops": "3.70.0-next.29"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@testing-library/jest-dom": "^6.6.3",