@elliemae/ds-menu-items-action 3.70.0-next.3 → 3.70.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,7 @@ const DSMenuItemsAction = (props) => {
57
57
  readOnly,
58
58
  as
59
59
  } = propsWithDefault;
60
+ const { getOwnerProps } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
60
61
  const handleOnClick = import_react.default.useCallback(
61
62
  (e) => {
62
63
  if (disabled || applyAriaDisabled || readOnly) return;
@@ -87,16 +88,27 @@ const DSMenuItemsAction = (props) => {
87
88
  pl: optionsShouldHavePadding ? 40 : 16,
88
89
  style: wrapperStyles,
89
90
  "data-type": "action",
90
- "aria-disabled": applyAriaDisabled,
91
+ "aria-disabled": applyAriaDisabled || disabled || readOnly,
91
92
  ...globalAttributes,
92
93
  onClick: handleOnClick,
93
94
  onKeyDown: handleOnKeyDown,
94
95
  ...xStyledProps,
95
96
  as,
96
- children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...propsWithDefault }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemLabel, { children: label }),
98
- secondaryLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemSecondaryLabel, { children: secondaryLabel })
99
- ] }) })
97
+ getOwnerProps,
98
+ children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...propsWithDefault }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ import_ds_menu_items_commons.StyledContentWrapper,
100
+ {
101
+ cols: gridLayout,
102
+ minHeight: "16px",
103
+ gutter: "xxs",
104
+ alignItems: "center",
105
+ getOwnerProps,
106
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemLabel, { getOwnerProps, variant: "b2", component: "span", children: label }),
108
+ secondaryLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_menu_items_commons.StyleMenuItemSecondaryLabel, { getOwnerProps, children: secondaryLabel })
109
+ ] })
110
+ }
111
+ )
100
112
  }
101
113
  );
102
114
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSMenuItemsAction.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 { type DSMenuItemsActionT, DSMenuItemsActionPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsAction } from './config/useMenuItemsAction.js';\n\nconst DSMenuItemsAction: React.ComponentType<DSMenuItemsActionT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsAction(props);\n\n const {\n dsId,\n label,\n secondaryLabel,\n onClick,\n onKeyDown,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n applyAriaDisabled,\n readOnly,\n as,\n } = propsWithDefault;\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 = ['auto'];\n if (secondaryLabel) cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n role=\"option\"\n isActive={isActive}\n disabled={disabled}\n innerRef={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n data-type=\"action\"\n aria-disabled={applyAriaDisabled}\n {...globalAttributes}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n {...xStyledProps}\n as={as}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n </>\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSActionMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsAction.displayName = 'DSActionMenuItem';\nconst DSMenuItemsActionWithSchema = describe(DSMenuItemsAction);\nDSMenuItemsActionWithSchema.propTypes = DSMenuItemsActionPropTypesSchema;\n\nexport { DSMenuItemsAction, DSMenuItemsActionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuEf;AAvER,mBAAkB;AAClB,8BAAyB;AACzB,mCAKO;AACP,mCAA0E;AAC1E,gCAAmC;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,QAAI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jD,GACF;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 { type DSMenuItemsActionT, DSMenuItemsActionPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsAction } from './config/useMenuItemsAction.js';\n\nconst DSMenuItemsAction: React.ComponentType<DSMenuItemsActionT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsAction(props);\n\n const {\n dsId,\n label,\n secondaryLabel,\n onClick,\n onKeyDown,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n applyAriaDisabled,\n readOnly,\n as,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\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 = ['auto'];\n if (secondaryLabel) cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n role=\"option\"\n isActive={isActive}\n disabled={disabled}\n innerRef={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n data-type=\"action\"\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n {...globalAttributes}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n {...xStyledProps}\n as={as}\n getOwnerProps={getOwnerProps}\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 <>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n </>\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSActionMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsAction.displayName = 'DSActionMenuItem';\nconst DSMenuItemsActionWithSchema = describe(DSMenuItemsAction);\nDSMenuItemsActionWithSchema.propTypes = DSMenuItemsActionPropTypesSchema;\n\nexport { DSMenuItemsAction, DSMenuItemsActionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Ef;AA1ER,mBAAkB;AAClB,8BAAwC;AACxC,mCAKO;AACP,mCAA0E;AAC1E,gCAAmC;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,QAAI,8CAAmB,KAAK;AAEhH,QAAM;AAAA,IACJ;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,Q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cAAc;AAChC,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
- import { describe } from "@elliemae/ds-props-helpers";
4
+ import { describe, useOwnerProps } from "@elliemae/ds-props-helpers";
5
5
  import {
6
6
  StyledGlobalMenuItemWrapper,
7
7
  StyledContentWrapper,
@@ -28,6 +28,7 @@ const DSMenuItemsAction = (props) => {
28
28
  readOnly,
29
29
  as
30
30
  } = propsWithDefault;
31
+ const { getOwnerProps } = useOwnerProps(propsWithDefault);
31
32
  const handleOnClick = React2.useCallback(
32
33
  (e) => {
33
34
  if (disabled || applyAriaDisabled || readOnly) return;
@@ -58,16 +59,27 @@ const DSMenuItemsAction = (props) => {
58
59
  pl: optionsShouldHavePadding ? 40 : 16,
59
60
  style: wrapperStyles,
60
61
  "data-type": "action",
61
- "aria-disabled": applyAriaDisabled,
62
+ "aria-disabled": applyAriaDisabled || disabled || readOnly,
62
63
  ...globalAttributes,
63
64
  onClick: handleOnClick,
64
65
  onKeyDown: handleOnKeyDown,
65
66
  ...xStyledProps,
66
67
  as,
67
- children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...propsWithDefault }) : /* @__PURE__ */ jsx(StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: /* @__PURE__ */ jsxs(Fragment, { children: [
68
- /* @__PURE__ */ jsx(StyleMenuItemLabel, { children: label }),
69
- secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { children: secondaryLabel })
70
- ] }) })
68
+ getOwnerProps,
69
+ children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...propsWithDefault }) : /* @__PURE__ */ jsx(
70
+ StyledContentWrapper,
71
+ {
72
+ cols: gridLayout,
73
+ minHeight: "16px",
74
+ gutter: "xxs",
75
+ alignItems: "center",
76
+ getOwnerProps,
77
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
78
+ /* @__PURE__ */ jsx(StyleMenuItemLabel, { getOwnerProps, variant: "b2", component: "span", children: label }),
79
+ secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { getOwnerProps, children: secondaryLabel })
80
+ ] })
81
+ }
82
+ )
71
83
  }
72
84
  );
73
85
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSMenuItemsAction.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 { type DSMenuItemsActionT, DSMenuItemsActionPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsAction } from './config/useMenuItemsAction.js';\n\nconst DSMenuItemsAction: React.ComponentType<DSMenuItemsActionT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsAction(props);\n\n const {\n dsId,\n label,\n secondaryLabel,\n onClick,\n onKeyDown,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n applyAriaDisabled,\n readOnly,\n as,\n } = propsWithDefault;\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 = ['auto'];\n if (secondaryLabel) cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n role=\"option\"\n isActive={isActive}\n disabled={disabled}\n innerRef={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n data-type=\"action\"\n aria-disabled={applyAriaDisabled}\n {...globalAttributes}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n {...xStyledProps}\n as={as}\n >\n {Render !== undefined ? (\n <Render {...propsWithDefault} />\n ) : (\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <>\n <StyleMenuItemLabel>{label}</StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n </>\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSActionMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsAction.displayName = 'DSActionMenuItem';\nconst DSMenuItemsActionWithSchema = describe(DSMenuItemsAction);\nDSMenuItemsActionWithSchema.propTypes = DSMenuItemsActionPropTypesSchema;\n\nexport { DSMenuItemsAction, DSMenuItemsActionWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACuEf,SAGE,UAHF,KAGE,YAHF;AAvER,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAkC,wCAAwC;AAC1E,SAAS,0BAA0B;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,IAAI,mBAAmB,KAAK;AAEhH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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Y;",
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 { type DSMenuItemsActionT, DSMenuItemsActionPropTypesSchema } from './react-desc-prop-types.js';\nimport { useMenuItemsAction } from './config/useMenuItemsAction.js';\n\nconst DSMenuItemsAction: React.ComponentType<DSMenuItemsActionT.Props> = (props) => {\n const { propsWithDefault, globalProps: globalAttributes, xstyledProps: xStyledProps } = useMenuItemsAction(props);\n\n const {\n dsId,\n label,\n secondaryLabel,\n onClick,\n onKeyDown,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n applyAriaDisabled,\n readOnly,\n as,\n } = propsWithDefault;\n\n const { getOwnerProps } = useOwnerProps(propsWithDefault);\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 = ['auto'];\n if (secondaryLabel) cols.push('min-content');\n return cols;\n }, [secondaryLabel]);\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n role=\"option\"\n isActive={isActive}\n disabled={disabled}\n innerRef={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n data-type=\"action\"\n aria-disabled={applyAriaDisabled || disabled || readOnly}\n {...globalAttributes}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n {...xStyledProps}\n as={as}\n getOwnerProps={getOwnerProps}\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 <>\n <StyleMenuItemLabel getOwnerProps={getOwnerProps} variant=\"b2\" component=\"span\">\n {label}\n </StyleMenuItemLabel>\n {secondaryLabel !== undefined && (\n <StyleMenuItemSecondaryLabel getOwnerProps={getOwnerProps}>{secondaryLabel}</StyleMenuItemSecondaryLabel>\n )}\n </>\n </StyledContentWrapper>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\n// this is `'DSActionMenuItem'` for legacy reasons, when moving to inheritance pattern this has been kept as it was to avoid complications\nDSMenuItemsAction.displayName = 'DSActionMenuItem';\nconst DSMenuItemsActionWithSchema = describe(DSMenuItemsAction);\nDSMenuItemsActionWithSchema.propTypes = DSMenuItemsActionPropTypesSchema;\n\nexport { DSMenuItemsAction, DSMenuItemsActionWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0Ef,SASE,UATF,KASE,YATF;AA1ER,OAAOA,YAAW;AAClB,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAkC,wCAAwC;AAC1E,SAAS,0BAA0B;AAEnC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,kBAAkB,cAAc,aAAa,IAAI,mBAAmB,KAAK;AAEhH,QAAM;AAAA,IACJ;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,EAAE,cAAc,IAAI,cAAc,gBAAgB;AAExD,QAAM,gBAAgBA,OAAM;AAAA,IAC1B,C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ANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-menu-items-action",
3
- "version": "3.70.0-next.3",
3
+ "version": "3.70.0-next.30",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Menu Items Action",
6
6
  "files": [
@@ -36,21 +36,21 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-menu-items-commons": "3.70.0-next.3",
40
- "@elliemae/ds-props-helpers": "3.70.0-next.3"
39
+ "@elliemae/ds-menu-items-commons": "3.70.0-next.30",
40
+ "@elliemae/ds-props-helpers": "3.70.0-next.30"
41
41
  },
42
42
  "devDependencies": {
43
43
  "jest": "^30.0.0",
44
- "lodash-es": "^4.17.21",
44
+ "lodash-es": "^4.18.1",
45
45
  "styled-components": "~5.3.9",
46
- "@elliemae/ds-monorepo-devops": "3.70.0-next.3",
47
- "@elliemae/ds-test-utils": "3.70.0-next.3"
46
+ "@elliemae/ds-monorepo-devops": "3.70.0-next.30",
47
+ "@elliemae/ds-test-utils": "3.70.0-next.30"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@testing-library/jest-dom": "^6.6.3",
51
51
  "@testing-library/react": "^16.0.1",
52
52
  "@testing-library/user-event": "~14.6.1",
53
- "lodash-es": "^4.17.21",
53
+ "lodash-es": "^4.18.1",
54
54
  "react": "^18.3.1",
55
55
  "react-dom": "^18.3.1",
56
56
  "styled-components": "~5.3.9"