@elliemae/ds-menu-items 3.21.2-rc.1 → 3.21.2-rc.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/components/ActionMenuItem/index.js +15 -5
- package/dist/cjs/components/ActionMenuItem/index.js.map +2 -2
- package/dist/cjs/components/MultiMenuItem/index.js +17 -4
- package/dist/cjs/components/MultiMenuItem/index.js.map +2 -2
- package/dist/cjs/components/Section/index.js +18 -5
- package/dist/cjs/components/Section/index.js.map +2 -2
- package/dist/cjs/components/Separator/index.js +18 -4
- package/dist/cjs/components/Separator/index.js.map +2 -2
- package/dist/cjs/components/SingleMenuItem/index.js +19 -5
- package/dist/cjs/components/SingleMenuItem/index.js.map +2 -2
- package/dist/cjs/components/SkeletonMenuItem/index.js +2 -1
- package/dist/cjs/components/SkeletonMenuItem/index.js.map +2 -2
- package/dist/cjs/components/styled.js +16 -0
- package/dist/cjs/components/styled.js.map +2 -2
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js +42 -0
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +46 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/components/ActionMenuItem/index.js +16 -6
- package/dist/esm/components/ActionMenuItem/index.js.map +2 -2
- package/dist/esm/components/MultiMenuItem/index.js +18 -5
- package/dist/esm/components/MultiMenuItem/index.js.map +2 -2
- package/dist/esm/components/Section/index.js +19 -6
- package/dist/esm/components/Section/index.js.map +2 -2
- package/dist/esm/components/Separator/index.js +26 -6
- package/dist/esm/components/Separator/index.js.map +2 -2
- package/dist/esm/components/SingleMenuItem/index.js +20 -6
- package/dist/esm/components/SingleMenuItem/index.js.map +2 -2
- package/dist/esm/components/SkeletonMenuItem/index.js +3 -2
- package/dist/esm/components/SkeletonMenuItem/index.js.map +2 -2
- package/dist/esm/components/styled.js +16 -0
- package/dist/esm/components/styled.js.map +2 -2
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js +12 -0
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +47 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/components/ActionMenuItem/index.d.ts +1 -1
- package/dist/types/components/MultiMenuItem/index.d.ts +1 -1
- package/dist/types/components/Section/index.d.ts +1 -1
- package/dist/types/components/Separator/index.d.ts +1 -1
- package/dist/types/components/SingleMenuItem/index.d.ts +2 -1
- package/dist/types/components/SkeletonMenuItem/index.d.ts +1 -1
- package/dist/types/components/styled.d.ts +1 -0
- package/dist/types/components/useGetGlobalsAndXStyledProps.d.ts +5 -0
- package/dist/types/react-desc-prop-types.d.ts +7 -0
- package/package.json +7 -7
|
@@ -29,7 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var ActionMenuItem_exports = {};
|
|
30
30
|
__export(ActionMenuItem_exports, {
|
|
31
31
|
ActionMenuItem: () => ActionMenuItem,
|
|
32
|
-
ActionMenuItemWithSchema: () => ActionMenuItemWithSchema
|
|
32
|
+
ActionMenuItemWithSchema: () => ActionMenuItemWithSchema,
|
|
33
|
+
DSActionMenuItem: () => ActionMenuItem
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(ActionMenuItem_exports);
|
|
35
36
|
var React = __toESM(require("react"));
|
|
@@ -39,9 +40,10 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
39
40
|
var import_react_desc_prop_types = require("../../react-desc-prop-types.js");
|
|
40
41
|
var import_styled = require("../styled.js");
|
|
41
42
|
var import_exported_related = require("../../exported-related/index.js");
|
|
43
|
+
var import_useGetGlobalsAndXStyledProps = require("../useGetGlobalsAndXStyledProps.js");
|
|
42
44
|
const ActionMenuItem = (props) => {
|
|
43
45
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultActionProps);
|
|
44
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
46
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.ActionMenuItemPropTypes, `${import_exported_related.DSMenuItemName}Action`);
|
|
45
47
|
const {
|
|
46
48
|
dsId,
|
|
47
49
|
label,
|
|
@@ -54,6 +56,12 @@ const ActionMenuItem = (props) => {
|
|
|
54
56
|
optionsShouldHavePadding,
|
|
55
57
|
render: Render
|
|
56
58
|
} = propsWithDefault;
|
|
59
|
+
const { globalAttributes, xStyledProps } = (0, import_useGetGlobalsAndXStyledProps.useGetGlobalsAndXStyledProps)(
|
|
60
|
+
propsWithDefault,
|
|
61
|
+
props.original ? {
|
|
62
|
+
onClick
|
|
63
|
+
} : void 0
|
|
64
|
+
);
|
|
57
65
|
const gridLayout = (0, import_react.useMemo)(() => {
|
|
58
66
|
const cols = ["auto"];
|
|
59
67
|
if (secondaryLabel)
|
|
@@ -72,6 +80,8 @@ const ActionMenuItem = (props) => {
|
|
|
72
80
|
pl: optionsShouldHavePadding ? 40 : 16,
|
|
73
81
|
style: wrapperStyles,
|
|
74
82
|
"data-type": "action",
|
|
83
|
+
...globalAttributes,
|
|
84
|
+
...xStyledProps,
|
|
75
85
|
children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...propsWithDefault }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
76
86
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleMenuItemLabel, { children: label }),
|
|
77
87
|
secondaryLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleMenuItemSecondaryLabel, { children: secondaryLabel })
|
|
@@ -79,8 +89,8 @@ const ActionMenuItem = (props) => {
|
|
|
79
89
|
}
|
|
80
90
|
);
|
|
81
91
|
};
|
|
82
|
-
ActionMenuItem.propTypes = import_react_desc_prop_types.
|
|
83
|
-
ActionMenuItem.displayName =
|
|
92
|
+
ActionMenuItem.propTypes = import_react_desc_prop_types.ActionMenuItemPropTypes;
|
|
93
|
+
ActionMenuItem.displayName = "DSActionMenuItem";
|
|
84
94
|
const ActionMenuItemWithSchema = (0, import_ds_props_helpers.describe)(ActionMenuItem);
|
|
85
|
-
ActionMenuItemWithSchema.propTypes = import_react_desc_prop_types.
|
|
95
|
+
ActionMenuItemWithSchema.propTypes = import_react_desc_prop_types.ActionMenuItemPropTypes;
|
|
86
96
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/ActionMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultActionProps,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultActionProps, ActionMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport {\n StyledContentWrapper,\n StyledGlobalMenuItemWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\nconst ActionMenuItem: React.ComponentType<DSMenuItemT.ActionProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultActionProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, ActionMenuItemPropTypes, `${DSMenuItemName}Action`);\n\n const {\n dsId,\n label,\n secondaryLabel,\n onClick,\n isActive,\n disabled,\n innerRef,\n wrapperStyles,\n optionsShouldHavePadding,\n render: Render,\n } = propsWithDefault;\n\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(\n propsWithDefault,\n props.original\n ? {\n onClick: onClick,\n }\n : undefined,\n );\n const gridLayout = 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 onClick={!disabled ? onClick : undefined}\n ref={innerRef}\n pl={optionsShouldHavePadding ? 40 : 16}\n style={wrapperStyles}\n data-type=\"action\"\n {...globalAttributes}\n {...xStyledProps}\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\nActionMenuItem.propTypes = ActionMenuItemPropTypes;\nActionMenuItem.displayName = 'DSActionMenuItem';\nconst ActionMenuItemWithSchema = describe(ActionMenuItem);\nActionMenuItemWithSchema.propTypes = ActionMenuItemPropTypes;\n\nexport { ActionMenuItem, ActionMenuItem as DSActionMenuItem, ActionMenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;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Ae,cAAc;AAC7B,MAAM,+BAA2B,kCAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var MultiMenuItem_exports = {};
|
|
30
30
|
__export(MultiMenuItem_exports, {
|
|
31
|
+
DSMultiMenuItem: () => MultiMenuItem,
|
|
31
32
|
MultiMenuItem: () => MultiMenuItem,
|
|
32
33
|
MultiMenuItemWithSchema: () => MultiMenuItemWithSchema
|
|
33
34
|
});
|
|
@@ -38,11 +39,12 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
38
39
|
var import_ds_form_checkbox = require("@elliemae/ds-form-checkbox");
|
|
39
40
|
var import_react_desc_prop_types = require("../../react-desc-prop-types.js");
|
|
40
41
|
var import_styled = require("../styled.js");
|
|
42
|
+
var import_useGetGlobalsAndXStyledProps = require("../useGetGlobalsAndXStyledProps.js");
|
|
41
43
|
var import_exported_related = require("../../exported-related/index.js");
|
|
42
44
|
const noop = () => null;
|
|
43
45
|
const MultiMenuItem = (props) => {
|
|
44
46
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultMultiProps);
|
|
45
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
47
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.MultiMenuItemPropTypes, `${import_exported_related.DSMenuItemName}Multi`);
|
|
46
48
|
const {
|
|
47
49
|
dsId,
|
|
48
50
|
label,
|
|
@@ -59,6 +61,15 @@ const MultiMenuItem = (props) => {
|
|
|
59
61
|
tabIndex,
|
|
60
62
|
render: Render
|
|
61
63
|
} = propsWithDefault;
|
|
64
|
+
const { globalAttributes, xStyledProps } = (0, import_useGetGlobalsAndXStyledProps.useGetGlobalsAndXStyledProps)(
|
|
65
|
+
propsWithDefault,
|
|
66
|
+
props.original ? {
|
|
67
|
+
onClick,
|
|
68
|
+
onMouseDown,
|
|
69
|
+
onMouseEnter,
|
|
70
|
+
onMouseLeave
|
|
71
|
+
} : void 0
|
|
72
|
+
);
|
|
62
73
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
74
|
import_styled.StyledGlobalMenuItemWrapper,
|
|
64
75
|
{
|
|
@@ -77,6 +88,8 @@ const MultiMenuItem = (props) => {
|
|
|
77
88
|
onClick,
|
|
78
89
|
"data-testid": dataTestid,
|
|
79
90
|
"data-type": "multi",
|
|
91
|
+
...globalAttributes,
|
|
92
|
+
...xStyledProps,
|
|
80
93
|
children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
94
|
import_ds_form_checkbox.PresentationalCheckbox,
|
|
82
95
|
{
|
|
@@ -94,8 +107,8 @@ const MultiMenuItem = (props) => {
|
|
|
94
107
|
}
|
|
95
108
|
);
|
|
96
109
|
};
|
|
97
|
-
MultiMenuItem.propTypes = import_react_desc_prop_types.
|
|
98
|
-
MultiMenuItem.displayName =
|
|
110
|
+
MultiMenuItem.propTypes = import_react_desc_prop_types.MultiMenuItemPropTypes;
|
|
111
|
+
MultiMenuItem.displayName = "DSMultiMenuItem";
|
|
99
112
|
const MultiMenuItemWithSchema = (0, import_ds_props_helpers.describe)(MultiMenuItem);
|
|
100
|
-
MultiMenuItemWithSchema.propTypes = import_react_desc_prop_types.
|
|
113
|
+
MultiMenuItemWithSchema.propTypes = import_react_desc_prop_types.MultiMenuItemPropTypes;
|
|
101
114
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/MultiMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { PresentationalCheckbox } from '@elliemae/ds-form-checkbox';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultMultiProps,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { PresentationalCheckbox } from '@elliemae/ds-form-checkbox';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultMultiProps, MultiMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport { StyledGlobalMenuItemWrapper, StyledItemContent } from '../styled.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst noop = () => null;\n\nconst MultiMenuItem: React.ComponentType<DSMenuItemT.MultiProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultMultiProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, MultiMenuItemPropTypes, `${DSMenuItemName}Multi`);\n\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 } = propsWithDefault;\n\n // menuitems use original prop from dsdropdownmenu or dscombobox\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(\n propsWithDefault,\n props.original\n ? {\n onClick: onClick,\n onMouseDown: onMouseDown,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n }\n : undefined,\n );\n\n return (\n <StyledGlobalMenuItemWrapper\n id={dsId}\n disabled={disabled}\n isActive={isActive}\n isSelected={isSelected}\n ref={innerRef}\n onMouseDown={onMouseDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n role=\"option\"\n className={isActive ? 'ds-list-item-active' : ''}\n aria-selected={isSelected}\n style={wrapperStyles}\n onClick={onClick}\n data-testid={dataTestid}\n data-type=\"multi\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...props} />\n ) : (\n <StyledItemContent>\n <PresentationalCheckbox\n disabled={disabled}\n checked={isSelected}\n onMouseDown={onMouseDown}\n name={label}\n label={label}\n onChange={noop}\n tabIndex={tabIndex}\n wrapLabel\n device=\"desktop\"\n />\n </StyledItemContent>\n )}\n </StyledGlobalMenuItemWrapper>\n );\n};\n\nMultiMenuItem.propTypes = MultiMenuItemPropTypes;\nMultiMenuItem.displayName = 'DSMultiMenuItem';\nconst MultiMenuItemWithSchema = describe(MultiMenuItem);\nMultiMenuItemWithSchema.propTypes = MultiMenuItemPropTypes;\n\nexport { MultiMenuItem, MultiMenuItem as DSMultiMenuItem, MultiMenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmEf;AAlER,8BAAuF;AACvF,8BAAuC;AAEvC,mCAA0D;AAC1D,oBAA+D;AAC/D,0CAA6C;AAC7C,8BAA+B;AAE/B,MAAM,OAAO,MAAM;AAEnB,MAAM,gBAA6D,CAAC,UAAU;AAC5E,QAAM,uBAAmB,sDAA6B,OAAO,8CAAiB;AAE9E,8DAA+B,kBAAkB,qDAAwB,GAAG,6CAAqB;AAEjG,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,EACV,IAAI;AAGJ,QAAM,EAAE,kBAAkB,aAAa,QAAI;AAAA,IACzC;AAAA,IACA,MAAM,WACF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IACA;AAAA,EACN;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,WAAW,WAAW,wBAAwB;AAAA,MAC9C,iBAAe;AAAA,MACf,OAAO;AAAA,MACP;AAAA,MACA,eAAa;AAAA,MACb,aAAU;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,qBAAW,SACV,4CAAC,UAAQ,GAAG,OAAO,IAEnB,4CAAC,mCACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,SAAS;AAAA,UACT;AAAA,UACA,MAAM;AAAA,UACN;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,WAAS;AAAA,UACT,QAAO;AAAA;AAAA,MACT,GACF;AAAA;AAAA,EAEJ;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var Section_exports = {};
|
|
30
30
|
__export(Section_exports, {
|
|
31
|
+
DSSectionMenuItem: () => Section,
|
|
31
32
|
Section: () => Section,
|
|
32
33
|
SectionWithSchema: () => SectionWithSchema
|
|
33
34
|
});
|
|
@@ -38,14 +39,26 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
38
39
|
var import_react_desc_prop_types = require("../../react-desc-prop-types.js");
|
|
39
40
|
var import_styled = require("../styled.js");
|
|
40
41
|
var import_exported_related = require("../../exported-related/index.js");
|
|
42
|
+
var import_useGetGlobalsAndXStyledProps = require("../useGetGlobalsAndXStyledProps.js");
|
|
41
43
|
const Section = (props) => {
|
|
42
44
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSectionProps);
|
|
43
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
45
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.SectionMenuItemPropTypes, `${import_exported_related.DSMenuItemName}Section`);
|
|
44
46
|
const { label, wrapperStyles, innerRef, render: Render } = props;
|
|
45
|
-
|
|
47
|
+
const { globalAttributes, xStyledProps } = (0, import_useGetGlobalsAndXStyledProps.useGetGlobalsAndXStyledProps)(propsWithDefault);
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
import_styled.StyledSectionWrapper,
|
|
50
|
+
{
|
|
51
|
+
style: wrapperStyles,
|
|
52
|
+
ref: innerRef,
|
|
53
|
+
role: "presentation",
|
|
54
|
+
...globalAttributes,
|
|
55
|
+
...xStyledProps,
|
|
56
|
+
children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledGroupLabel, { children: label })
|
|
57
|
+
}
|
|
58
|
+
);
|
|
46
59
|
};
|
|
47
|
-
Section.propTypes = import_react_desc_prop_types.
|
|
48
|
-
Section.displayName =
|
|
60
|
+
Section.propTypes = import_react_desc_prop_types.SectionMenuItemPropTypes;
|
|
61
|
+
Section.displayName = "DSSectionMenuItem";
|
|
49
62
|
const SectionWithSchema = (0, import_ds_props_helpers.describe)(Section);
|
|
50
|
-
SectionWithSchema.propTypes = import_react_desc_prop_types.
|
|
63
|
+
SectionWithSchema.propTypes = import_react_desc_prop_types.SectionMenuItemPropTypes;
|
|
51
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/Section/index.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 { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSectionProps, SectionMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport { StyledSectionWrapper, StyledGroupLabel } from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\n\nconst Section: React.ComponentType<DSMenuItemT.SectionProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSectionProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, SectionMenuItemPropTypes, `${DSMenuItemName}Section`);\n\n const { label, wrapperStyles, innerRef, render: Render } = props;\n\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);\n\n return (\n <StyledSectionWrapper\n style={wrapperStyles}\n ref={innerRef}\n role=\"presentation\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? <Render {...props} /> : <StyledGroupLabel>{label}</StyledGroupLabel>}\n </StyledSectionWrapper>\n );\n};\n\nSection.propTypes = SectionMenuItemPropTypes;\nSection.displayName = 'DSSectionMenuItem';\nconst SectionWithSchema = describe(Section);\nSectionWithSchema.propTypes = SectionMenuItemPropTypes;\n\nexport { Section, Section as DSSectionMenuItem, SectionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBO;AAxB9B,8BAAuF;AAEvF,mCAA8D;AAC9D,oBAAuD;AACvD,8BAA+B;AAC/B,0CAA6C;AAE7C,MAAM,UAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,sDAA6B,OAAO,gDAAmB;AAEhF,8DAA+B,kBAAkB,uDAA0B,GAAG,+CAAuB;AAErG,QAAM,EAAE,OAAO,eAAe,UAAU,QAAQ,OAAO,IAAI;AAE3D,QAAM,EAAE,kBAAkB,aAAa,QAAI,kEAA6B,gBAAgB;AAExF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,KAAK;AAAA,MACL,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,qBAAW,SAAY,4CAAC,UAAQ,GAAG,OAAO,IAAK,4CAAC,kCAAkB,iBAAM;AAAA;AAAA,EAC3E;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,wBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var Separator_exports = {};
|
|
30
30
|
__export(Separator_exports, {
|
|
31
|
+
DSSeparatorMenuItem: () => Separator,
|
|
31
32
|
Separator: () => Separator,
|
|
32
33
|
SeparatorWithSchema: () => SeparatorWithSchema
|
|
33
34
|
});
|
|
@@ -40,12 +41,25 @@ var import_styled = require("../styled.js");
|
|
|
40
41
|
var import_exported_related = require("../../exported-related/index.js");
|
|
41
42
|
const Separator = (props) => {
|
|
42
43
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSeparatorProps);
|
|
43
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
44
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.MenuItemPropTypes, `${import_exported_related.DSMenuItemName}Separator`);
|
|
44
45
|
const { wrapperStyles, innerRef, render: Render } = propsWithDefault;
|
|
45
|
-
|
|
46
|
+
const sourceGlobalProps = propsWithDefault.original ?? propsWithDefault;
|
|
47
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(sourceGlobalProps);
|
|
48
|
+
const xStyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(sourceGlobalProps);
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_styled.StyledSeparatorWrapper,
|
|
51
|
+
{
|
|
52
|
+
style: wrapperStyles,
|
|
53
|
+
ref: innerRef,
|
|
54
|
+
role: "presentation",
|
|
55
|
+
...globalAttributes,
|
|
56
|
+
...xStyledProps,
|
|
57
|
+
children: Render ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparator, { role: "presentation" })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
46
60
|
};
|
|
47
|
-
Separator.propTypes = import_react_desc_prop_types.
|
|
61
|
+
Separator.propTypes = import_react_desc_prop_types.MenuItemPropTypes;
|
|
48
62
|
Separator.displayName = `${import_exported_related.DSMenuItemName}Separator`;
|
|
49
63
|
const SeparatorWithSchema = (0, import_ds_props_helpers.describe)(Separator);
|
|
50
|
-
SeparatorWithSchema.propTypes = import_react_desc_prop_types.
|
|
64
|
+
SeparatorWithSchema.propTypes = import_react_desc_prop_types.MenuItemPropTypes;
|
|
51
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/Separator/index.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 useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { MenuItemPropTypes, defaultSeparatorProps } from '../../react-desc-prop-types.js';\nimport { StyledSeparatorWrapper, StyledSeparator } from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst Separator: React.ComponentType<DSMenuItemT.SeparatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSeparatorProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, MenuItemPropTypes, `${DSMenuItemName}Separator`);\n const { wrapperStyles, innerRef, render: Render } = propsWithDefault;\n\n // menuitems use original prop from dsdropdownmenu or dscombobox\n const sourceGlobalProps = propsWithDefault.original ?? propsWithDefault;\n\n const globalAttributes = useGetGlobalAttributes(sourceGlobalProps);\n\n const xStyledProps = useGetXstyledProps(sourceGlobalProps);\n return (\n <StyledSeparatorWrapper\n style={wrapperStyles}\n ref={innerRef}\n role=\"presentation\"\n {...globalAttributes}\n {...xStyledProps}\n >\n {Render ? <Render {...props} /> : <StyledSeparator role=\"presentation\" />}\n </StyledSeparatorWrapper>\n );\n};\n\nSeparator.propTypes = MenuItemPropTypes;\nSeparator.displayName = `${DSMenuItemName}Separator`;\nconst SeparatorWithSchema = describe(Separator);\nSeparatorWithSchema.propTypes = MenuItemPropTypes;\n\nexport { Separator, Separator as DSSeparatorMenuItem, SeparatorWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiCP;AAhChB,8BAMO;AAEP,mCAAyD;AACzD,oBAAwD;AACxD,8BAA+B;AAE/B,MAAM,YAA6D,CAAC,UAAU;AAC5E,QAAM,uBAAmB,sDAA6B,OAAO,kDAAqB;AAElF,8DAA+B,kBAAkB,gDAAmB,GAAG,iDAAyB;AAChG,QAAM,EAAE,eAAe,UAAU,QAAQ,OAAO,IAAI;AAGpD,QAAM,oBAAoB,iBAAiB,YAAY;AAEvD,QAAM,uBAAmB,gDAAuB,iBAAiB;AAEjE,QAAM,mBAAe,4CAAmB,iBAAiB;AACzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,KAAK;AAAA,MACL,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,mBAAS,4CAAC,UAAQ,GAAG,OAAO,IAAK,4CAAC,iCAAgB,MAAK,gBAAe;AAAA;AAAA,EACzE;AAEJ;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc,GAAG;AAC3B,MAAM,0BAAsB,kCAAS,SAAS;AAC9C,oBAAoB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,7 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var SingleMenuItem_exports = {};
|
|
30
30
|
__export(SingleMenuItem_exports, {
|
|
31
|
-
|
|
31
|
+
DSSingleMenuItem: () => SingleMenuItem,
|
|
32
|
+
SingleMenuItem: () => SingleMenuItem,
|
|
33
|
+
SingleMenuItemWithSchema: () => SingleMenuItemWithSchema
|
|
32
34
|
});
|
|
33
35
|
module.exports = __toCommonJS(SingleMenuItem_exports);
|
|
34
36
|
var React = __toESM(require("react"));
|
|
@@ -36,12 +38,13 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
38
|
var import_react = require("react");
|
|
37
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
40
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
41
|
+
var import_useGetGlobalsAndXStyledProps = require("../useGetGlobalsAndXStyledProps.js");
|
|
39
42
|
var import_react_desc_prop_types = require("../../react-desc-prop-types.js");
|
|
40
43
|
var import_styled = require("../styled.js");
|
|
41
44
|
var import_exported_related = require("../../exported-related/index.js");
|
|
42
45
|
const SingleMenuItem = (props) => {
|
|
43
46
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultSingleProps);
|
|
44
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
47
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.SingleMenuItemPropTypes, `${import_exported_related.DSMenuItemName}Single`);
|
|
45
48
|
const {
|
|
46
49
|
dsId,
|
|
47
50
|
label,
|
|
@@ -58,6 +61,15 @@ const SingleMenuItem = (props) => {
|
|
|
58
61
|
dataTestid,
|
|
59
62
|
disabled
|
|
60
63
|
} = propsWithDefault;
|
|
64
|
+
const { globalAttributes, xStyledProps } = (0, import_useGetGlobalsAndXStyledProps.useGetGlobalsAndXStyledProps)(
|
|
65
|
+
propsWithDefault,
|
|
66
|
+
props.original ? {
|
|
67
|
+
onClick,
|
|
68
|
+
onMouseDown,
|
|
69
|
+
onMouseEnter,
|
|
70
|
+
onMouseLeave
|
|
71
|
+
} : void 0
|
|
72
|
+
);
|
|
61
73
|
const gridLayout = (0, import_react.useMemo)(() => {
|
|
62
74
|
const cols = ["16px", "auto"];
|
|
63
75
|
if (secondaryLabel)
|
|
@@ -82,6 +94,8 @@ const SingleMenuItem = (props) => {
|
|
|
82
94
|
"data-testid": dataTestid,
|
|
83
95
|
disabled,
|
|
84
96
|
"data-type": "single",
|
|
97
|
+
...globalAttributes,
|
|
98
|
+
...xStyledProps,
|
|
85
99
|
children: Render !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Render, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
|
|
86
100
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, { size: "s", color: ["brand-primary", "600"] }) }),
|
|
87
101
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleMenuItemLabel, { children: label }),
|
|
@@ -90,8 +104,8 @@ const SingleMenuItem = (props) => {
|
|
|
90
104
|
}
|
|
91
105
|
);
|
|
92
106
|
};
|
|
93
|
-
SingleMenuItem.propTypes = import_react_desc_prop_types.
|
|
94
|
-
SingleMenuItem.displayName =
|
|
107
|
+
SingleMenuItem.propTypes = import_react_desc_prop_types.SingleMenuItemPropTypes;
|
|
108
|
+
SingleMenuItem.displayName = "DSSingleMenuItem";
|
|
95
109
|
const SingleMenuItemWithSchema = (0, import_ds_props_helpers.describe)(SingleMenuItem);
|
|
96
|
-
SingleMenuItemWithSchema.propTypes = import_react_desc_prop_types.
|
|
110
|
+
SingleMenuItemWithSchema.propTypes = import_react_desc_prop_types.SingleMenuItemPropTypes;
|
|
97
111
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/SingleMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSingleProps,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { useGetGlobalsAndXStyledProps } from '../useGetGlobalsAndXStyledProps.js';\nimport type { DSMenuItemT } from '../../react-desc-prop-types.js';\nimport { defaultSingleProps, SingleMenuItemPropTypes } from '../../react-desc-prop-types.js';\nimport {\n StyledContentWrapper,\n StyledGlobalMenuItemWrapper,\n StyleMenuItemLabel,\n StyleMenuItemSecondaryLabel,\n} from '../styled.js';\nimport { DSMenuItemName } from '../../exported-related/index.js';\n\nconst SingleMenuItem: React.ComponentType<DSMenuItemT.SingleProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSingleProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, SingleMenuItemPropTypes, `${DSMenuItemName}Single`);\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 } = propsWithDefault;\n\n const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(\n propsWithDefault,\n props.original\n ? {\n onClick: onClick,\n onMouseDown: onMouseDown,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n }\n : undefined,\n );\n\n const gridLayout = useMemo(() => {\n const cols = ['16px', 'auto'];\n if (secondaryLabel) cols.push('min-content');\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 onClick={onClick}\n ref={innerRef}\n onMouseDown={onMouseDown}\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 {...globalAttributes}\n {...xStyledProps}\n >\n {Render !== undefined ? (\n <Render {...props} />\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\nSingleMenuItem.propTypes = SingleMenuItemPropTypes;\nSingleMenuItem.displayName = 'DSSingleMenuItem';\nconst SingleMenuItemWithSchema = describe(SingleMenuItem);\nSingleMenuItemWithSchema.propTypes = SingleMenuItemPropTypes;\n\nexport { SingleMenuItem, SingleMenuItem as DSSingleMenuItem, SingleMenuItemWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Ef;AA1ER,mBAA+B;AAC/B,8BAAuF;AACvF,sBAA0B;AAC1B,0CAA6C;AAE7C,mCAA4D;AAC5D,oBAKO;AACP,8BAA+B;AAE/B,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,uBAAmB,sDAA6B,OAAO,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AA2B,kCAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var SkeletonMenuItem_exports = {};
|
|
30
30
|
__export(SkeletonMenuItem_exports, {
|
|
31
|
+
DSSkeletonMenuItem: () => SkeletonMenuItem,
|
|
31
32
|
SkeletonMenuItem: () => SkeletonMenuItem
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(SkeletonMenuItem_exports);
|
|
@@ -38,7 +39,7 @@ var import_ds_skeleton = require("@elliemae/ds-skeleton");
|
|
|
38
39
|
var import_styled = require("../styled.js");
|
|
39
40
|
const SkeletonMenuItem = () => {
|
|
40
41
|
const gridLayout = (0, import_react.useMemo)(() => ["16px", "auto"], []);
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSkeletonWrapper, { "data-type": "skeleton", "data-testid": "ds-skeleton-menu-item", role: "option", "aria-label": "skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
|
|
42
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_skeleton.DSSkeleton, { variant: "rectangular", width: "100%" }),
|
|
43
44
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_skeleton.DSSkeleton, { variant: "rectangular", width: "100%" })
|
|
44
45
|
] }) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/SkeletonMenuItem/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { StyledContentWrapper,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { StyledContentWrapper, StyledSkeletonWrapper } from '../styled.js';\nconst SkeletonMenuItem = () => {\n const gridLayout = useMemo(() => ['16px', 'auto'], []);\n\n return (\n <StyledSkeletonWrapper data-type=\"skeleton\" data-testid=\"ds-skeleton-menu-item\" role=\"option\" aria-label=\"skeleton\">\n <StyledContentWrapper cols={gridLayout} minHeight=\"16px\" gutter=\"xxs\" alignItems=\"center\">\n <DSSkeleton variant=\"rectangular\" width={'100%'} />\n <DSSkeleton variant=\"rectangular\" width={'100%'} />\n </StyledContentWrapper>\n </StyledSkeletonWrapper>\n );\n};\n\nexport { SkeletonMenuItem, SkeletonMenuItem as DSSkeletonMenuItem };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQjB;AARN,mBAA+B;AAC/B,yBAA2B;AAC3B,oBAA4D;AAC5D,MAAM,mBAAmB,MAAM;AAC7B,QAAM,iBAAa,sBAAQ,MAAM,CAAC,QAAQ,MAAM,GAAG,CAAC,CAAC;AAErD,SACE,4CAAC,uCAAsB,aAAU,YAAW,eAAY,yBAAwB,MAAK,UAAS,cAAW,YACvG,uDAAC,sCAAqB,MAAM,YAAY,WAAU,QAAO,QAAO,OAAM,YAAW,UAC/E;AAAA,gDAAC,iCAAW,SAAQ,eAAc,OAAO,QAAQ;AAAA,IACjD,4CAAC,iCAAW,SAAQ,eAAc,OAAO,QAAQ;AAAA,KACnD,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,6 +39,7 @@ __export(styled_exports, {
|
|
|
39
39
|
StyledSectionWrapper: () => StyledSectionWrapper,
|
|
40
40
|
StyledSeparator: () => StyledSeparator,
|
|
41
41
|
StyledSeparatorWrapper: () => StyledSeparatorWrapper,
|
|
42
|
+
StyledSkeletonWrapper: () => StyledSkeletonWrapper,
|
|
42
43
|
StyledVerticalSeparator: () => StyledVerticalSeparator
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(styled_exports);
|
|
@@ -68,6 +69,21 @@ const disabledOption = () => import_ds_system.css`
|
|
|
68
69
|
cursor: not-allowed;
|
|
69
70
|
}
|
|
70
71
|
`;
|
|
72
|
+
const StyledSkeletonWrapper = (0, import_ds_system.styled)("li", {
|
|
73
|
+
name: import_exported_related.DSMenuItemName,
|
|
74
|
+
slot: import_exported_related.DSMenuItemSlots.MENU_ITEM_WRAPPER
|
|
75
|
+
})`
|
|
76
|
+
min-height: 32px;
|
|
77
|
+
padding-left: 16px;
|
|
78
|
+
padding-right: 16px;
|
|
79
|
+
display: grid;
|
|
80
|
+
align-items: center;
|
|
81
|
+
list-style: none;
|
|
82
|
+
position: relative;
|
|
83
|
+
background-color: 'white';
|
|
84
|
+
|
|
85
|
+
${import_ds_system.xStyledCommonProps}
|
|
86
|
+
`;
|
|
71
87
|
const StyledGlobalMenuItemWrapper = (0, import_ds_system.styled)("li", {
|
|
72
88
|
name: import_exported_related.DSMenuItemName,
|
|
73
89
|
slot: import_exported_related.DSMenuItemSlots.MENU_ITEM_WRAPPER
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { LayoutProps, SizingProps, PositionProps, SpaceProps } from '@elliemae/ds-system';\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSMenuItemName, DSMenuItemSlots } from '../exported-related/index.js';\n\nconst borderOutside = () => css`\n :after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid ${({ theme }) => theme.colors.brand[500]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nconst disabledOption = () => css`\n color: ${({ theme }) => theme.colors.neutral[500]};\n\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n`;\n\ninterface StyledGlobalMenuItemWrapperT extends LayoutProps, SizingProps, PositionProps, SpaceProps {\n isSelected?: boolean;\n isActive?: boolean;\n disabled?: boolean;\n}\n\nexport const StyledGlobalMenuItemWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_WRAPPER,\n})<StyledGlobalMenuItemWrapperT>`\n cursor: pointer;\n min-height: 32px;\n\n padding-left: 16px;\n padding-right: 16px;\n display: grid;\n align-items: center;\n list-style: none;\n position: relative;\n\n ${(props) => {\n if (props.disabled) return disabledOption();\n if (props.isActive) return borderOutside();\n return '';\n }};\n\n background-color: ${(props) => (props.isActive ? props.theme.colors.brand[200] : 'white')};\n\n &:hover {\n background-color: ${(props) => !props.disabled && props.theme.colors.brand[200]};\n }\n ${xStyledCommonProps}\n`;\n\nexport const StyleMenuItemLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_LABEL })`\n padding: 8px 0;\n font-size: 13px;\n`;\n\nexport const StyleMenuItemSecondaryLabel = styled('span', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECONDARY_LABEL,\n})`\n padding: 8px 0;\n font-size: 11px;\n font-style: italic;\n color: brand-800;\n`;\n\nexport const StyledIconContainer = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_ICON })`\n width: 25px;\n height: 24px;\n display: grid;\n grid-template-columns: min-content auto;\n place-items: center;\n`;\n\nexport const StyledEllipsisButton = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_ELLIPSIS_BUTTON,\n})<{ disabled: boolean }>`\n position: relative;\n width: 100%;\n height: 100%;\n display: grid;\n place-items: center;\n background: transparent;\n :active {\n ${(props) => (props.disabled ? '' : borderOutside())}\n }\n`;\n\nexport const StyledItemContent = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_CONTENT })`\n display: flex;\n width: 100%;\n margin: 8px 0px;\n`;\n\nexport const StyledSeparator = styled('hr', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR })`\n border: 0;\n border-top: 1px solid #697489;\n margin: 4px 0px;\n padding: 0;\n`;\n\nexport const StyledSeparatorWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledGroupLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_GROUP_LABEL })`\n font-size: 13px;\n color: neutral-500;\n`;\n\nexport const StyledSectionWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECTION_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n height: 24px;\n display: flex;\n align-items: center;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledVerticalSeparator = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_VERTICAL_SEPARATOR,\n})`\n width: 1px;\n height: 18px;\n background-color: neutral-300;\n`;\n\nexport const StyledContentWrapper = styled(Grid, {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_CONTENT_WRAPPER,\n})``;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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EAChD,MAAM;AAAA,EACN,MAAM,wCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQK,CAAC,UAAW,MAAM,WAAW,KAAK,cAAc;AAAA;AAAA;AAI/C,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,wCAAgB,MAAM,wCAAgB,kBAAkB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMzG,MAAM,sBAAkB,yBAAO,MAAM,EAAE,MAAM,wCAAgB,MAAM,wCAAgB,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxG,MAAM,6BAAyB,yBAAO,MAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,wCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA,IAIG;AAAA;AAGG,MAAM,uBAAmB,yBAAO,QAAQ,EAAE,MAAM,wCAAgB,MAAM,wCAAgB,sBAAsB,CAAC;AAAA;AAAA;AAAA;AAK7G,MAAM,2BAAuB,yBAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOG;AAAA;AAGG,MAAM,8BAA0B,yBAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,wCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMM,MAAM,2BAAuB,yBAAO,qBAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wCAAgB;AACxB,CAAC;",
|
|
4
|
+
"sourcesContent": ["import type { LayoutProps, SizingProps, PositionProps, SpaceProps } from '@elliemae/ds-system';\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSMenuItemName, DSMenuItemSlots } from '../exported-related/index.js';\n\nconst borderOutside = () => css`\n :after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid ${({ theme }) => theme.colors.brand[500]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nconst disabledOption = () => css`\n color: ${({ theme }) => theme.colors.neutral[500]};\n\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n`;\n\ninterface StyledGlobalMenuItemWrapperT extends LayoutProps, SizingProps, PositionProps, SpaceProps {\n isSelected?: boolean;\n isActive?: boolean;\n disabled?: boolean;\n}\n\nexport const StyledSkeletonWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_WRAPPER,\n})<StyledGlobalMenuItemWrapperT>`\n min-height: 32px;\n padding-left: 16px;\n padding-right: 16px;\n display: grid;\n align-items: center;\n list-style: none;\n position: relative;\n background-color: 'white';\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledGlobalMenuItemWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_WRAPPER,\n})<StyledGlobalMenuItemWrapperT>`\n cursor: pointer;\n min-height: 32px;\n\n padding-left: 16px;\n padding-right: 16px;\n display: grid;\n align-items: center;\n list-style: none;\n position: relative;\n\n ${(props) => {\n if (props.disabled) return disabledOption();\n if (props.isActive) return borderOutside();\n return '';\n }};\n\n background-color: ${(props) => (props.isActive ? props.theme.colors.brand[200] : 'white')};\n\n &:hover {\n background-color: ${(props) => !props.disabled && props.theme.colors.brand[200]};\n }\n ${xStyledCommonProps}\n`;\n\nexport const StyleMenuItemLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_LABEL })`\n padding: 8px 0;\n font-size: 13px;\n`;\n\nexport const StyleMenuItemSecondaryLabel = styled('span', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECONDARY_LABEL,\n})`\n padding: 8px 0;\n font-size: 11px;\n font-style: italic;\n color: brand-800;\n`;\n\nexport const StyledIconContainer = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_ICON })`\n width: 25px;\n height: 24px;\n display: grid;\n grid-template-columns: min-content auto;\n place-items: center;\n`;\n\nexport const StyledEllipsisButton = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_ELLIPSIS_BUTTON,\n})<{ disabled: boolean }>`\n position: relative;\n width: 100%;\n height: 100%;\n display: grid;\n place-items: center;\n background: transparent;\n :active {\n ${(props) => (props.disabled ? '' : borderOutside())}\n }\n`;\n\nexport const StyledItemContent = styled('div', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_CONTENT })`\n display: flex;\n width: 100%;\n margin: 8px 0px;\n`;\n\nexport const StyledSeparator = styled('hr', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR })`\n border: 0;\n border-top: 1px solid #697489;\n margin: 4px 0px;\n padding: 0;\n`;\n\nexport const StyledSeparatorWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SEPARATOR_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledGroupLabel = styled('span', { name: DSMenuItemName, slot: DSMenuItemSlots.MENU_ITEM_GROUP_LABEL })`\n font-size: 13px;\n color: neutral-500;\n`;\n\nexport const StyledSectionWrapper = styled('li', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_SECTION_WRAPPER,\n})`\n list-style: none;\n padding: 0px 16px;\n height: 24px;\n display: flex;\n align-items: center;\n\n ${xStyledCommonProps}\n`;\n\nexport const StyledVerticalSeparator = styled('div', {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_VERTICAL_SEPARATOR,\n})`\n width: 1px;\n height: 18px;\n background-color: neutral-300;\n`;\n\nexport const StyledContentWrapper = styled(Grid, {\n name: DSMenuItemName,\n slot: DSMenuItemSlots.MENU_ITEM_CONTENT_WRAPPER,\n})``;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;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 -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useGetGlobalsAndXStyledProps_exports = {};
|
|
30
|
+
__export(useGetGlobalsAndXStyledProps_exports, {
|
|
31
|
+
useGetGlobalsAndXStyledProps: () => useGetGlobalsAndXStyledProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useGetGlobalsAndXStyledProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
const useGetGlobalsAndXStyledProps = (props, toMergeEvents) => {
|
|
37
|
+
const sourceGlobalProps = props.original ?? props;
|
|
38
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(sourceGlobalProps, toMergeEvents);
|
|
39
|
+
const xStyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(sourceGlobalProps);
|
|
40
|
+
return { globalAttributes, xStyledProps };
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=useGetGlobalsAndXStyledProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/useGetGlobalsAndXStyledProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport type { DSMenuItemT } from '../react-desc-prop-types.js';\n\nexport const useGetGlobalsAndXStyledProps = (\n props: DSMenuItemT.AllTypeItems,\n toMergeEvents?: Record<string, unknown>,\n) => {\n const sourceGlobalProps = props.original ?? props;\n\n const globalAttributes = useGetGlobalAttributes(sourceGlobalProps, toMergeEvents);\n const xStyledProps = useGetXstyledProps(sourceGlobalProps);\n\n return { globalAttributes, xStyledProps };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA2D;AAGpD,MAAM,+BAA+B,CAC1C,OACA,kBACG;AACH,QAAM,oBAAoB,MAAM,YAAY;AAE5C,QAAM,uBAAmB,gDAAuB,mBAAmB,aAAa;AAChF,QAAM,mBAAe,4CAAmB,iBAAiB;AAEzD,SAAO,EAAE,kBAAkB,aAAa;AAC1C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -28,6 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var react_desc_prop_types_exports = {};
|
|
30
30
|
__export(react_desc_prop_types_exports, {
|
|
31
|
+
ActionMenuItemPropTypes: () => ActionMenuItemPropTypes,
|
|
32
|
+
MenuItemPropTypes: () => MenuItemPropTypes,
|
|
33
|
+
MultiMenuItemPropTypes: () => MultiMenuItemPropTypes,
|
|
34
|
+
SectionMenuItemPropTypes: () => SectionMenuItemPropTypes,
|
|
35
|
+
SingleMenuItemPropTypes: () => SingleMenuItemPropTypes,
|
|
31
36
|
defaultActionProps: () => defaultActionProps,
|
|
32
37
|
defaultCommonProps: () => defaultCommonProps,
|
|
33
38
|
defaultMultiProps: () => defaultMultiProps,
|
|
@@ -114,9 +119,50 @@ const defaultSingleWithSubmenuProps = {
|
|
|
114
119
|
...defaultSubmenuProps
|
|
115
120
|
};
|
|
116
121
|
const itemProps = {
|
|
122
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
123
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
117
124
|
dsId: import_ds_props_helpers.PropTypes.string,
|
|
118
125
|
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]),
|
|
119
126
|
wrapperStyles: import_ds_props_helpers.PropTypes.object,
|
|
120
127
|
render: import_ds_props_helpers.PropTypes.func
|
|
121
128
|
};
|
|
129
|
+
const MenuItemPropTypes = {
|
|
130
|
+
dsId: import_ds_props_helpers.PropTypes.string.description("The unique ID for the menu item.").isRequired,
|
|
131
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([
|
|
132
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
133
|
+
current: import_ds_props_helpers.PropTypes.instanceOf(HTMLLIElement)
|
|
134
|
+
}),
|
|
135
|
+
import_ds_props_helpers.PropTypes.func.description(
|
|
136
|
+
" A ref object or callback function to access the underlying DOM element (HTMLLIElement) of the menu item."
|
|
137
|
+
)
|
|
138
|
+
]),
|
|
139
|
+
render: import_ds_props_helpers.PropTypes.func.description("A custom render function to render the content of the menu item.")
|
|
140
|
+
};
|
|
141
|
+
const SingleMenuItemPropTypes = {
|
|
142
|
+
...MenuItemPropTypes,
|
|
143
|
+
label: import_ds_props_helpers.PropTypes.string.description("The label of the menu item."),
|
|
144
|
+
secondaryLabel: import_ds_props_helpers.PropTypes.string.description("The secondary label of the menu item."),
|
|
145
|
+
isActive: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is active."),
|
|
146
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is disabled."),
|
|
147
|
+
isSelected: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is selected.")
|
|
148
|
+
};
|
|
149
|
+
const MultiMenuItemPropTypes = {
|
|
150
|
+
...MenuItemPropTypes,
|
|
151
|
+
label: import_ds_props_helpers.PropTypes.string.description("The label of the menu item."),
|
|
152
|
+
secondaryLabel: import_ds_props_helpers.PropTypes.string.description("The secondary label of the menu item."),
|
|
153
|
+
isActive: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is active."),
|
|
154
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is disabled."),
|
|
155
|
+
isSelected: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is selected.")
|
|
156
|
+
};
|
|
157
|
+
const ActionMenuItemPropTypes = {
|
|
158
|
+
...MenuItemPropTypes,
|
|
159
|
+
label: import_ds_props_helpers.PropTypes.string.description("The label of the menu item."),
|
|
160
|
+
value: import_ds_props_helpers.PropTypes.any.description("The value of the menu item."),
|
|
161
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is disabled."),
|
|
162
|
+
isActive: import_ds_props_helpers.PropTypes.bool.description("Whether the menu item is active.")
|
|
163
|
+
};
|
|
164
|
+
const SectionMenuItemPropTypes = {
|
|
165
|
+
...MenuItemPropTypes,
|
|
166
|
+
label: import_ds_props_helpers.PropTypes.string.description("The label of the menu item.")
|
|
167
|
+
};
|
|
122
168
|
//# sourceMappingURL=react-desc-prop-types.js.map
|