@elliemae/ds-menu-items 3.27.0-next.9 → 3.27.0
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 +6 -61
- package/dist/cjs/components/ActionMenuItem/index.js.map +2 -2
- package/dist/cjs/components/MultiMenuItem/index.js +6 -79
- package/dist/cjs/components/MultiMenuItem/index.js.map +2 -2
- package/dist/cjs/components/Section/index.js +6 -29
- package/dist/cjs/components/Section/index.js.map +2 -2
- package/dist/cjs/components/Separator/index.js +6 -32
- package/dist/cjs/components/Separator/index.js.map +2 -2
- package/dist/cjs/components/SingleMenuItem/index.js +6 -84
- package/dist/cjs/components/SingleMenuItem/index.js.map +3 -3
- package/dist/cjs/components/SingleWithSubmenuItem/index.js +5 -124
- package/dist/cjs/components/SingleWithSubmenuItem/index.js.map +2 -2
- package/dist/cjs/components/SkeletonMenuItem/index.js +5 -26
- package/dist/cjs/components/SkeletonMenuItem/index.js.map +2 -2
- package/dist/cjs/components/SubmenuItem/index.js +5 -128
- package/dist/cjs/components/SubmenuItem/index.js.map +2 -2
- package/dist/cjs/components/index.js +51 -9
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/exported-related/index.js +9 -2
- package/dist/cjs/exported-related/index.js.map +2 -2
- package/dist/cjs/index.js +45 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/components/ActionMenuItem/index.js +11 -65
- package/dist/esm/components/ActionMenuItem/index.js.map +3 -3
- package/dist/esm/components/MultiMenuItem/index.js +12 -79
- package/dist/esm/components/MultiMenuItem/index.js.map +3 -3
- package/dist/esm/components/Section/index.js +12 -29
- package/dist/esm/components/Section/index.js.map +3 -3
- package/dist/esm/components/Separator/index.js +11 -37
- package/dist/esm/components/Separator/index.js.map +3 -3
- package/dist/esm/components/SingleMenuItem/index.js +11 -88
- package/dist/esm/components/SingleMenuItem/index.js.map +3 -3
- package/dist/esm/components/SingleWithSubmenuItem/index.js +9 -131
- package/dist/esm/components/SingleWithSubmenuItem/index.js.map +3 -3
- package/dist/esm/components/SkeletonMenuItem/index.js +10 -26
- package/dist/esm/components/SkeletonMenuItem/index.js.map +3 -3
- package/dist/esm/components/SubmenuItem/index.js +9 -135
- package/dist/esm/components/SubmenuItem/index.js.map +3 -3
- package/dist/esm/components/index.js +92 -8
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/exported-related/index.js +5 -1
- package/dist/esm/exported-related/index.js.map +2 -2
- package/dist/esm/index.js +77 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/types/components/ActionMenuItem/index.d.ts +1 -5
- package/dist/types/components/MultiMenuItem/index.d.ts +1 -5
- package/dist/types/components/Section/index.d.ts +1 -5
- package/dist/types/components/Separator/index.d.ts +1 -5
- package/dist/types/components/SingleMenuItem/index.d.ts +1 -5
- package/dist/types/components/SingleWithSubmenuItem/index.d.ts +1 -5
- package/dist/types/components/SkeletonMenuItem/index.d.ts +1 -4
- package/dist/types/components/SubmenuItem/index.d.ts +1 -5
- package/dist/types/components/index.d.ts +8 -8
- package/dist/types/exported-related/index.d.ts +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +11 -12
- package/dist/cjs/TempTreeviewItem.js +0 -133
- package/dist/cjs/TempTreeviewItem.js.map +0 -7
- package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -87
- package/dist/cjs/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/getChevronHandlers.js +0 -72
- package/dist/cjs/components/SubmenuItem/getChevronHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js +0 -64
- package/dist/cjs/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
- package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js +0 -46
- package/dist/cjs/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/cjs/components/styled.js +0 -192
- package/dist/cjs/components/styled.js.map +0 -7
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js +0 -42
- package/dist/cjs/components/useGetGlobalsAndXStyledProps.js.map +0 -7
- package/dist/cjs/exported-related/constants.js +0 -51
- package/dist/cjs/exported-related/constants.js.map +0 -7
- package/dist/cjs/react-desc-prop-types.js +0 -169
- package/dist/cjs/react-desc-prop-types.js.map +0 -7
- package/dist/esm/TempTreeviewItem.js +0 -103
- package/dist/esm/TempTreeviewItem.js.map +0 -7
- package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js +0 -57
- package/dist/esm/components/SingleWithSubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/getChevronHandlers.js +0 -42
- package/dist/esm/components/SubmenuItem/getChevronHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js +0 -34
- package/dist/esm/components/SubmenuItem/getEllipsisHandlers.js.map +0 -7
- package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js +0 -16
- package/dist/esm/components/SubmenuItem/useGetSubmenuHandlers.js.map +0 -7
- package/dist/esm/components/styled.js +0 -162
- package/dist/esm/components/styled.js.map +0 -7
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js +0 -12
- package/dist/esm/components/useGetGlobalsAndXStyledProps.js.map +0 -7
- package/dist/esm/exported-related/constants.js +0 -21
- package/dist/esm/exported-related/constants.js.map +0 -7
- package/dist/esm/react-desc-prop-types.js +0 -139
- package/dist/esm/react-desc-prop-types.js.map +0 -7
- package/dist/types/TempTreeviewItem.d.ts +0 -16
- package/dist/types/components/SingleWithSubmenuItem/useGetSubmenuHandlers.d.ts +0 -7
- package/dist/types/components/SubmenuItem/getChevronHandlers.d.ts +0 -7
- package/dist/types/components/SubmenuItem/getEllipsisHandlers.d.ts +0 -8
- package/dist/types/components/SubmenuItem/useGetSubmenuHandlers.d.ts +0 -8
- package/dist/types/components/styled.d.ts +0 -22
- package/dist/types/components/useGetGlobalsAndXStyledProps.d.ts +0 -5
- package/dist/types/exported-related/constants.d.ts +0 -15
- package/dist/types/react-desc-prop-types.d.ts +0 -106
|
@@ -1,83 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const noop = () => null;
|
|
10
|
-
const MultiMenuItem = (props) => {
|
|
11
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultMultiProps);
|
|
12
|
-
useValidateTypescriptPropTypes(propsWithDefault, MultiMenuItemPropTypes, `${DSMenuItemName}Multi`);
|
|
13
|
-
const {
|
|
14
|
-
dsId,
|
|
15
|
-
label,
|
|
16
|
-
disabled,
|
|
17
|
-
isSelected,
|
|
18
|
-
isActive,
|
|
19
|
-
onClick,
|
|
20
|
-
dataTestid,
|
|
21
|
-
innerRef,
|
|
22
|
-
onMouseEnter,
|
|
23
|
-
onMouseLeave,
|
|
24
|
-
onMouseDown,
|
|
25
|
-
wrapperStyles,
|
|
26
|
-
tabIndex,
|
|
27
|
-
render: Render
|
|
28
|
-
} = propsWithDefault;
|
|
29
|
-
const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(
|
|
30
|
-
propsWithDefault,
|
|
31
|
-
props.original ? {
|
|
32
|
-
onClick,
|
|
33
|
-
onMouseDown,
|
|
34
|
-
onMouseEnter,
|
|
35
|
-
onMouseLeave
|
|
36
|
-
} : void 0
|
|
37
|
-
);
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
-
StyledGlobalMenuItemWrapper,
|
|
40
|
-
{
|
|
41
|
-
id: dsId,
|
|
42
|
-
disabled,
|
|
43
|
-
isActive,
|
|
44
|
-
isSelected,
|
|
45
|
-
innerRef,
|
|
46
|
-
onMouseDown,
|
|
47
|
-
onMouseEnter,
|
|
48
|
-
onMouseLeave,
|
|
49
|
-
role: "option",
|
|
50
|
-
className: isActive ? "ds-list-item-active" : "",
|
|
51
|
-
"aria-selected": isSelected,
|
|
52
|
-
style: wrapperStyles,
|
|
53
|
-
onClick,
|
|
54
|
-
"data-testid": dataTestid,
|
|
55
|
-
"data-type": "multi",
|
|
56
|
-
...globalAttributes,
|
|
57
|
-
...xStyledProps,
|
|
58
|
-
children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledItemContent, { children: /* @__PURE__ */ jsx(
|
|
59
|
-
PresentationalCheckbox,
|
|
60
|
-
{
|
|
61
|
-
disabled,
|
|
62
|
-
checked: isSelected,
|
|
63
|
-
onMouseDown,
|
|
64
|
-
name: label,
|
|
65
|
-
label,
|
|
66
|
-
onChange: noop,
|
|
67
|
-
tabIndex,
|
|
68
|
-
wrapLabel: true,
|
|
69
|
-
device: "desktop"
|
|
70
|
-
}
|
|
71
|
-
) })
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
MultiMenuItem.displayName = "DSMultiMenuItem";
|
|
76
|
-
const MultiMenuItemWithSchema = describe(MultiMenuItem);
|
|
77
|
-
MultiMenuItemWithSchema.propTypes = MultiMenuItemPropTypes;
|
|
2
|
+
import {
|
|
3
|
+
DSMenuItemsMulti,
|
|
4
|
+
DSMenuItemsMulti as DSMenuItemsMulti2,
|
|
5
|
+
DSMenuItemsMultiWithSchema,
|
|
6
|
+
DSMenuItemsMulti as DSMenuItemsMulti3,
|
|
7
|
+
DSMenuItemsMultiWithSchema as DSMenuItemsMultiWithSchema2
|
|
8
|
+
} from "@elliemae/ds-menu-items-multi";
|
|
78
9
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
10
|
+
DSMenuItemsMulti3 as DSMenuItemsMulti,
|
|
11
|
+
DSMenuItemsMultiWithSchema2 as DSMenuItemsMultiWithSchema,
|
|
12
|
+
DSMenuItemsMulti2 as DSMultiMenuItem,
|
|
13
|
+
DSMenuItemsMulti as MultiMenuItem,
|
|
14
|
+
DSMenuItemsMultiWithSchema as MultiMenuItemWithSchema
|
|
82
15
|
};
|
|
83
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/MultiMenuItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsMulti as MultiMenuItem,\n DSMenuItemsMulti as DSMultiMenuItem,\n DSMenuItemsMultiWithSchema as MultiMenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsMulti,\n DSMenuItemsMultiWithSchema,\n type DSMenuItemsMultiT,\n} from '@elliemae/ds-menu-items-multi';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEsB;AAAA,EACA,oBAApBA;AAAA,EAC8B;AAAA,EAE9B,oBAAAA;AAAA,EACA,8BAAAC;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsMulti", "DSMenuItemsMultiWithSchema"]
|
|
7
7
|
}
|
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSectionProps);
|
|
10
|
-
useValidateTypescriptPropTypes(propsWithDefault, SectionMenuItemPropTypes, `${DSMenuItemName}Section`);
|
|
11
|
-
const { label, wrapperStyles, innerRef, render: Render } = props;
|
|
12
|
-
const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
StyledSectionWrapper,
|
|
15
|
-
{
|
|
16
|
-
style: wrapperStyles,
|
|
17
|
-
innerRef,
|
|
18
|
-
role: "option",
|
|
19
|
-
...globalAttributes,
|
|
20
|
-
...xStyledProps,
|
|
21
|
-
children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledGroupLabel, { children: label })
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
Section.displayName = "DSSectionMenuItem";
|
|
26
|
-
const SectionWithSchema = describe(Section);
|
|
27
|
-
SectionWithSchema.propTypes = SectionMenuItemPropTypes;
|
|
2
|
+
import {
|
|
3
|
+
DSMenuItemsSection,
|
|
4
|
+
DSMenuItemsSection as DSMenuItemsSection2,
|
|
5
|
+
DSMenuItemsSectionWithSchema,
|
|
6
|
+
DSMenuItemsSection as DSMenuItemsSection3,
|
|
7
|
+
DSMenuItemsSectionWithSchema as DSMenuItemsSectionWithSchema2
|
|
8
|
+
} from "@elliemae/ds-menu-items-section";
|
|
28
9
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
DSMenuItemsSection3 as DSMenuItemsSection,
|
|
11
|
+
DSMenuItemsSectionWithSchema2 as DSMenuItemsSectionWithSchema,
|
|
12
|
+
DSMenuItemsSection2 as DSSectionMenuItem,
|
|
13
|
+
DSMenuItemsSection as Section,
|
|
14
|
+
DSMenuItemsSectionWithSchema as SectionWithSchema
|
|
32
15
|
};
|
|
33
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Section/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSection as Section,\n DSMenuItemsSection as DSSectionMenuItem,\n DSMenuItemsSectionWithSchema as SectionWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSection,\n DSMenuItemsSectionWithSchema,\n type DSMenuItemsSectionT,\n} from '@elliemae/ds-menu-items-section';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEwB;AAAA,EACA,sBAAtBA;AAAA,EACgC;AAAA,EAEhC,sBAAAA;AAAA,EACA,gCAAAC;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsSection", "DSMenuItemsSectionWithSchema"]
|
|
7
7
|
}
|
|
@@ -1,42 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "@elliemae/ds-
|
|
10
|
-
import { MenuItemPropTypes, defaultSeparatorProps } from "../../react-desc-prop-types.js";
|
|
11
|
-
import { StyledSeparatorWrapper, StyledSeparator } from "../styled.js";
|
|
12
|
-
import { DSMenuItemName } from "../../exported-related/index.js";
|
|
13
|
-
const Separator = (props) => {
|
|
14
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSeparatorProps);
|
|
15
|
-
useValidateTypescriptPropTypes(propsWithDefault, MenuItemPropTypes, `${DSMenuItemName}Separator`);
|
|
16
|
-
const { wrapperStyles, innerRef, render: Render } = propsWithDefault;
|
|
17
|
-
const sourceGlobalProps = propsWithDefault.original ?? propsWithDefault;
|
|
18
|
-
const globalAttributes = useGetGlobalAttributes(sourceGlobalProps);
|
|
19
|
-
const xStyledProps = useGetXstyledProps(sourceGlobalProps);
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
21
|
-
StyledSeparatorWrapper,
|
|
22
|
-
{
|
|
23
|
-
style: wrapperStyles,
|
|
24
|
-
innerRef,
|
|
25
|
-
"aria-label": "separator",
|
|
26
|
-
...globalAttributes,
|
|
27
|
-
...xStyledProps,
|
|
28
|
-
role: "option",
|
|
29
|
-
tabIndex: void 0,
|
|
30
|
-
children: Render ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsx(StyledSeparator, {})
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
Separator.displayName = `${DSMenuItemName}Separator`;
|
|
35
|
-
const SeparatorWithSchema = describe(Separator);
|
|
36
|
-
SeparatorWithSchema.propTypes = MenuItemPropTypes;
|
|
3
|
+
DSMenuItemsSeparator,
|
|
4
|
+
DSMenuItemsSeparator as DSMenuItemsSeparator2,
|
|
5
|
+
DSMenuItemsSeparatorWithSchema,
|
|
6
|
+
DSMenuItemsSeparator as DSMenuItemsSeparator3,
|
|
7
|
+
DSMenuItemsSeparatorWithSchema as DSMenuItemsSeparatorWithSchema2
|
|
8
|
+
} from "@elliemae/ds-menu-items-separator";
|
|
37
9
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
10
|
+
DSMenuItemsSeparator3 as DSMenuItemsSeparator,
|
|
11
|
+
DSMenuItemsSeparatorWithSchema2 as DSMenuItemsSeparatorWithSchema,
|
|
12
|
+
DSMenuItemsSeparator2 as DSSeparatorMenuItem,
|
|
13
|
+
DSMenuItemsSeparator as Separator,
|
|
14
|
+
DSMenuItemsSeparatorWithSchema as SeparatorWithSchema
|
|
41
15
|
};
|
|
42
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Separator/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSeparator as Separator,\n DSMenuItemsSeparator as DSSeparatorMenuItem,\n DSMenuItemsSeparatorWithSchema as SeparatorWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSeparator,\n DSMenuItemsSeparatorWithSchema,\n type DSMenuItemsSeparatorT,\n} from '@elliemae/ds-menu-items-separator';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAE0B;AAAA,EACA,wBAAxBA;AAAA,EACkC;AAAA,EAElC,wBAAAA;AAAA,EACA,kCAAAC;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsSeparator", "DSMenuItemsSeparatorWithSchema"]
|
|
7
7
|
}
|
|
@@ -1,93 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React2, { useMemo } from "react";
|
|
4
|
-
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
5
|
-
import { Checkmark } from "@elliemae/ds-icons";
|
|
6
|
-
import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
|
|
7
|
-
import { defaultSingleProps, SingleMenuItemPropTypes } from "../../react-desc-prop-types.js";
|
|
8
2
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const SingleMenuItem = (props) => {
|
|
16
|
-
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultSingleProps);
|
|
17
|
-
useValidateTypescriptPropTypes(propsWithDefault, SingleMenuItemPropTypes, `${DSMenuItemName}Single`);
|
|
18
|
-
const {
|
|
19
|
-
dsId,
|
|
20
|
-
label,
|
|
21
|
-
secondaryLabel,
|
|
22
|
-
isSelected,
|
|
23
|
-
onClick,
|
|
24
|
-
isActive,
|
|
25
|
-
innerRef,
|
|
26
|
-
onMouseDown,
|
|
27
|
-
onMouseEnter,
|
|
28
|
-
onMouseLeave,
|
|
29
|
-
wrapperStyles,
|
|
30
|
-
render: Render,
|
|
31
|
-
dataTestid,
|
|
32
|
-
disabled
|
|
33
|
-
} = propsWithDefault;
|
|
34
|
-
const onMouseDownHandler = React2.useCallback(
|
|
35
|
-
(e) => {
|
|
36
|
-
if (disabled)
|
|
37
|
-
return;
|
|
38
|
-
onMouseDown?.(e);
|
|
39
|
-
},
|
|
40
|
-
[disabled, onMouseDown]
|
|
41
|
-
);
|
|
42
|
-
const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(
|
|
43
|
-
propsWithDefault,
|
|
44
|
-
props.original ? {
|
|
45
|
-
onClick,
|
|
46
|
-
onMouseDown: onMouseDownHandler,
|
|
47
|
-
onMouseEnter,
|
|
48
|
-
onMouseLeave
|
|
49
|
-
} : void 0
|
|
50
|
-
);
|
|
51
|
-
const gridLayout = useMemo(() => {
|
|
52
|
-
const cols = ["16px", "auto"];
|
|
53
|
-
if (secondaryLabel)
|
|
54
|
-
cols.push("min-content");
|
|
55
|
-
return cols;
|
|
56
|
-
}, [secondaryLabel]);
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
-
StyledGlobalMenuItemWrapper,
|
|
59
|
-
{
|
|
60
|
-
"aria-selected": isSelected,
|
|
61
|
-
id: dsId,
|
|
62
|
-
role: "option",
|
|
63
|
-
isActive,
|
|
64
|
-
isSelected,
|
|
65
|
-
onClick,
|
|
66
|
-
innerRef,
|
|
67
|
-
onMouseDown: onMouseDownHandler,
|
|
68
|
-
onMouseEnter,
|
|
69
|
-
onMouseLeave,
|
|
70
|
-
className: isActive ? "ds-list-item-active" : "",
|
|
71
|
-
style: wrapperStyles,
|
|
72
|
-
"data-testid": dataTestid,
|
|
73
|
-
disabled,
|
|
74
|
-
"data-type": "single",
|
|
75
|
-
...globalAttributes,
|
|
76
|
-
...xStyledProps,
|
|
77
|
-
children: Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...props }) : /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
|
|
78
|
-
/* @__PURE__ */ jsx("div", { children: isSelected && /* @__PURE__ */ jsx(Checkmark, { size: "s", color: ["brand-primary", "600"] }) }),
|
|
79
|
-
/* @__PURE__ */ jsx(StyleMenuItemLabel, { children: label }),
|
|
80
|
-
secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { children: secondaryLabel })
|
|
81
|
-
] })
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
SingleMenuItem.displayName = "DSSingleMenuItem";
|
|
86
|
-
const SingleMenuItemWithSchema = describe(SingleMenuItem);
|
|
87
|
-
SingleMenuItemWithSchema.propTypes = SingleMenuItemPropTypes;
|
|
3
|
+
DSMenuItemsSingle,
|
|
4
|
+
DSMenuItemsSingle as DSMenuItemsSingle2,
|
|
5
|
+
DSMenuItemsSingleWithSchema,
|
|
6
|
+
DSMenuItemsSingle as DSMenuItemsSingle3,
|
|
7
|
+
DSMenuItemsSingleWithSchema as DSMenuItemsSingleWithSchema2
|
|
8
|
+
} from "@elliemae/ds-menu-items-single";
|
|
88
9
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
10
|
+
DSMenuItemsSingle3 as DSMenuItemsSingle,
|
|
11
|
+
DSMenuItemsSingleWithSchema2 as DSMenuItemsSingleWithSchema,
|
|
12
|
+
DSMenuItemsSingle2 as DSSingleMenuItem,
|
|
13
|
+
DSMenuItemsSingle as SingleMenuItem,
|
|
14
|
+
DSMenuItemsSingleWithSchema as SingleMenuItemWithSchema
|
|
92
15
|
};
|
|
93
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SingleMenuItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSingle as SingleMenuItem,\n DSMenuItemsSingle as DSSingleMenuItem,\n DSMenuItemsSingleWithSchema as SingleMenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSingle,\n DSMenuItemsSingleWithSchema,\n type DSMenuItemsSingleT,\n} from '@elliemae/ds-menu-items-single';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEuB;AAAA,EACA,qBAArBA;AAAA,EAC+B;AAAA,EAE/B,qBAAAA;AAAA,EACA,+BAAAC;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsSingle", "DSMenuItemsSingleWithSchema"]
|
|
7
7
|
}
|
|
@@ -1,136 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState, useMemo } from "react";
|
|
4
|
-
import { MoreOptionsVert, ChevronRight, Checkmark } from "@elliemae/ds-icons";
|
|
5
|
-
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
6
|
-
import { defaultSingleWithSubmenuProps, itemProps } from "../../react-desc-prop-types.js";
|
|
7
2
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
StyledVerticalSeparator,
|
|
14
|
-
StyledContentWrapper
|
|
15
|
-
} from "../styled.js";
|
|
16
|
-
import { useGetSubmenuHandlers } from "./useGetSubmenuHandlers.js";
|
|
17
|
-
import { DSMenuItemName } from "../../exported-related/index.js";
|
|
18
|
-
import { useGetGlobalsAndXStyledProps } from "../useGetGlobalsAndXStyledProps.js";
|
|
19
|
-
const SingleWithSubmenuItem = (props) => {
|
|
20
|
-
const propsWithDefault = useMemoMergePropsWithDefault(
|
|
21
|
-
props,
|
|
22
|
-
defaultSingleWithSubmenuProps
|
|
23
|
-
);
|
|
24
|
-
useValidateTypescriptPropTypes(propsWithDefault, itemProps, `${DSMenuItemName}SingleWithSubmenu`);
|
|
25
|
-
const {
|
|
26
|
-
dsId,
|
|
27
|
-
label,
|
|
28
|
-
secondaryLabel,
|
|
29
|
-
isActive,
|
|
30
|
-
disabled,
|
|
31
|
-
onClick,
|
|
32
|
-
isSelected,
|
|
33
|
-
isSubmenuOpened,
|
|
34
|
-
rightAddon,
|
|
35
|
-
innerRef,
|
|
36
|
-
wrapperStyles,
|
|
37
|
-
render: Render,
|
|
38
|
-
Dropdown,
|
|
39
|
-
dropdownProps: {
|
|
40
|
-
options,
|
|
41
|
-
openedSubmenus,
|
|
42
|
-
onSubmenuToggle,
|
|
43
|
-
selectedOptions,
|
|
44
|
-
onKeyDown,
|
|
45
|
-
onOptionClick,
|
|
46
|
-
onClickOutside,
|
|
47
|
-
minWidth,
|
|
48
|
-
maxHeight
|
|
49
|
-
}
|
|
50
|
-
} = propsWithDefault;
|
|
51
|
-
const [delayedIsOpened, setDelayedIsOpened] = useState(false);
|
|
52
|
-
const { globalAttributes, xStyledProps } = useGetGlobalsAndXStyledProps(propsWithDefault);
|
|
53
|
-
const { minWidth: customMinWidth, ...restXStyled } = xStyledProps;
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
setTimeout(() => setDelayedIsOpened(isSubmenuOpened));
|
|
56
|
-
}, [isSubmenuOpened]);
|
|
57
|
-
const { onMouseEnterHandler, onMouseLeaveHandler, onEllipsisClick } = useGetSubmenuHandlers(propsWithDefault);
|
|
58
|
-
const gridLayout = useMemo(() => {
|
|
59
|
-
const cols = ["16px", "auto"];
|
|
60
|
-
if (secondaryLabel)
|
|
61
|
-
cols.push("min-content");
|
|
62
|
-
cols.push("min-content");
|
|
63
|
-
return cols;
|
|
64
|
-
}, [secondaryLabel]);
|
|
65
|
-
return /* @__PURE__ */ jsx(
|
|
66
|
-
Dropdown,
|
|
67
|
-
{
|
|
68
|
-
isOpened: delayedIsOpened,
|
|
69
|
-
options: options ?? [],
|
|
70
|
-
onOptionClick,
|
|
71
|
-
startPlacementPreference: "right-start",
|
|
72
|
-
placementOrderPreference: ["right-start", "right-end", "left-start", "left-end"],
|
|
73
|
-
selectedOptions,
|
|
74
|
-
openedSubmenus,
|
|
75
|
-
onSubmenuToggle,
|
|
76
|
-
onKeyDown,
|
|
77
|
-
onClickOutside,
|
|
78
|
-
customOffset: [-4, 1],
|
|
79
|
-
onMouseEnter: onMouseEnterHandler,
|
|
80
|
-
onMouseLeave: onMouseLeaveHandler,
|
|
81
|
-
wrapperStyles: { ...wrapperStyles, w: "100%" },
|
|
82
|
-
minWidth,
|
|
83
|
-
maxHeight,
|
|
84
|
-
"data-popover-label": label,
|
|
85
|
-
as: "li",
|
|
86
|
-
role: "option",
|
|
87
|
-
"aria-selected": isSubmenuOpened,
|
|
88
|
-
"aria-describedby": `dropdownmenu-submenu-${dsId}`,
|
|
89
|
-
id: dsId,
|
|
90
|
-
...globalAttributes,
|
|
91
|
-
...restXStyled,
|
|
92
|
-
children: /* @__PURE__ */ jsxs(
|
|
93
|
-
StyledGlobalMenuItemWrapper,
|
|
94
|
-
{
|
|
95
|
-
pr: 0,
|
|
96
|
-
onClick: !disabled ? onClick : void 0,
|
|
97
|
-
isSelected: isSubmenuOpened,
|
|
98
|
-
disabled,
|
|
99
|
-
isActive,
|
|
100
|
-
onMouseEnter: onMouseEnterHandler,
|
|
101
|
-
onMouseLeave: onMouseLeaveHandler,
|
|
102
|
-
as: "div",
|
|
103
|
-
innerRef,
|
|
104
|
-
"data-type": "single-with-submenu",
|
|
105
|
-
children: [
|
|
106
|
-
Render !== void 0 ? /* @__PURE__ */ jsx(Render, { ...propsWithDefault }) : /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, gutter: "xxs", alignItems: "center", children: [
|
|
107
|
-
isSelected ? /* @__PURE__ */ jsx(Checkmark, { size: "s", color: disabled ? ["neutral", "500"] : ["brand-primary", "600"] }) : /* @__PURE__ */ jsx("div", {}),
|
|
108
|
-
/* @__PURE__ */ jsx(StyleMenuItemLabel, { children: label }),
|
|
109
|
-
secondaryLabel !== void 0 && /* @__PURE__ */ jsx(StyleMenuItemSecondaryLabel, { children: secondaryLabel }),
|
|
110
|
-
/* @__PURE__ */ jsxs(StyledIconContainer, { children: [
|
|
111
|
-
/* @__PURE__ */ jsx(StyledVerticalSeparator, {}),
|
|
112
|
-
rightAddon === "ellipsis" ? /* @__PURE__ */ jsx(StyledEllipsisButton, { tabIndex: -1, onClick: onEllipsisClick, disabled, children: /* @__PURE__ */ jsx(
|
|
113
|
-
MoreOptionsVert,
|
|
114
|
-
{
|
|
115
|
-
className: "ds-dropdown-menu-v2-more-options",
|
|
116
|
-
color: disabled ? ["neutral", "500"] : ["brand-primary", "600"],
|
|
117
|
-
size: "s"
|
|
118
|
-
}
|
|
119
|
-
) }) : /* @__PURE__ */ jsx(ChevronRight, { color: disabled ? ["neutral", "500"] : ["brand-primary", "600"], size: "s" })
|
|
120
|
-
] })
|
|
121
|
-
] }),
|
|
122
|
-
/* @__PURE__ */ jsx("span", { id: `dropdownmenu-submenu-${dsId}`, style: { display: "none" }, children: "submenu, to open this submenu press the Right Arrow key" })
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
};
|
|
129
|
-
SingleWithSubmenuItem.displayName = `${DSMenuItemName}SingleWithSubmenu`;
|
|
130
|
-
const SingleWithSubmenuItemWithSchema = describe(SingleWithSubmenuItem);
|
|
131
|
-
SingleWithSubmenuItemWithSchema.propTypes = itemProps;
|
|
3
|
+
DSMenuItemsSingleWithSubmenu,
|
|
4
|
+
DSMenuItemsSingleWithSubmenuWithSchema,
|
|
5
|
+
DSMenuItemsSingleWithSubmenu as DSMenuItemsSingleWithSubmenu2,
|
|
6
|
+
DSMenuItemsSingleWithSubmenuWithSchema as DSMenuItemsSingleWithSubmenuWithSchema2
|
|
7
|
+
} from "@elliemae/ds-menu-items-single-with-submenu";
|
|
132
8
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
9
|
+
DSMenuItemsSingleWithSubmenu2 as DSMenuItemsSingleWithSubmenu,
|
|
10
|
+
DSMenuItemsSingleWithSubmenuWithSchema2 as DSMenuItemsSingleWithSubmenuWithSchema,
|
|
11
|
+
DSMenuItemsSingleWithSubmenu as SingleWithSubmenuItem,
|
|
12
|
+
DSMenuItemsSingleWithSubmenuWithSchema as SingleWithSubmenuItemWithSchema
|
|
135
13
|
};
|
|
136
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SingleWithSubmenuItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSingleWithSubmenu as SingleWithSubmenuItem,\n DSMenuItemsSingleWithSubmenuWithSchema as SingleWithSubmenuItemWithSchema,\n // the \"current\" correctly named export\n DSMenuItemsSingleWithSubmenu,\n DSMenuItemsSingleWithSubmenuWithSchema,\n type DSMenuItemsSingleWithSubmenuT,\n} from '@elliemae/ds-menu-items-single-with-submenu';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEkC;AAAA,EACU;AAAA,EAE1C,gCAAAA;AAAA,EACA,0CAAAC;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsSingleWithSubmenu", "DSMenuItemsSingleWithSubmenuWithSchema"]
|
|
7
7
|
}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const gridLayout = useMemo(() => ["16px", "auto"], []);
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
StyledGlobalMenuItemWrapper,
|
|
11
|
-
{
|
|
12
|
-
id: dsId,
|
|
13
|
-
"data-type": "skeleton",
|
|
14
|
-
"data-testid": "ds-skeleton-menu-item",
|
|
15
|
-
role: "option",
|
|
16
|
-
"aria-label": "skeleton",
|
|
17
|
-
style: wrapperStyles,
|
|
18
|
-
isActive,
|
|
19
|
-
children: /* @__PURE__ */ jsxs(StyledContentWrapper, { cols: gridLayout, minHeight: "16px", gutter: "xxs", alignItems: "center", children: [
|
|
20
|
-
/* @__PURE__ */ jsx(DSSkeleton, { variant: "rectangular", width: "100%" }),
|
|
21
|
-
/* @__PURE__ */ jsx(DSSkeleton, { variant: "rectangular", width: "100%" })
|
|
22
|
-
] })
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
DSMenuItemsSkeleton,
|
|
4
|
+
DSMenuItemsSkeleton as DSMenuItemsSkeleton2,
|
|
5
|
+
DSMenuItemsSkeleton as DSMenuItemsSkeleton3,
|
|
6
|
+
DSMenuItemsSkeletonWithSchema
|
|
7
|
+
} from "@elliemae/ds-menu-items-skeleton";
|
|
26
8
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
DSMenuItemsSkeleton3 as DSMenuItemsSkeleton,
|
|
10
|
+
DSMenuItemsSkeletonWithSchema,
|
|
11
|
+
DSMenuItemsSkeleton2 as DSSkeletonMenuItem,
|
|
12
|
+
DSMenuItemsSkeleton as SkeletonMenuItem
|
|
29
13
|
};
|
|
30
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/SkeletonMenuItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n // legacy exports where renaming like this, keeping around for backwards compatibility.\n DSMenuItemsSkeleton as SkeletonMenuItem,\n DSMenuItemsSkeleton as DSSkeletonMenuItem,\n // the \"current\" correctly named export\n DSMenuItemsSkeleton,\n DSMenuItemsSkeletonWithSchema,\n type DSMenuItemsSkeletonT,\n} from '@elliemae/ds-menu-items-skeleton';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EAEyB;AAAA,EACA,uBAAvBA;AAAA,EAEA,uBAAAA;AAAA,EACA;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSMenuItemsSkeleton"]
|
|
7
7
|
}
|