@eightshift/ui-components 1.1.2 → 1.1.3
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.
|
@@ -1489,8 +1489,8 @@ const MenuItem = (props) => {
|
|
|
1489
1489
|
(selected === false || checked === false) && icons.dummySpacer,
|
|
1490
1490
|
icon,
|
|
1491
1491
|
children,
|
|
1492
|
-
shortcut && /* @__PURE__ */ jsx("div", { className: "es-uic-ml-auto es-uic-text-[0.6875rem] es-uic-tracking-tight es-uic-text-gray-400", children: shortcut }),
|
|
1493
|
-
endIcon && /* @__PURE__ */ jsx("div", { className: clsx(!shortcut && "es-uic-ml-auto"), children: endIcon })
|
|
1492
|
+
shortcut && /* @__PURE__ */ jsx("div", { className: "es-uic-ml-auto es-uic-pl-2 es-uic-text-[0.6875rem] es-uic-tracking-tight es-uic-text-gray-400", children: shortcut }),
|
|
1493
|
+
endIcon && /* @__PURE__ */ jsx("div", { className: clsx(!shortcut && "es-uic-ml-auto es-uic-pl-2"), children: endIcon })
|
|
1494
1494
|
]
|
|
1495
1495
|
}
|
|
1496
1496
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { A as AsyncSelect$1 } from "../../react-select-async.esm-5zW9Dv9E.js";
|
|
3
4
|
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-7vKCF8dG.js";
|
|
4
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
5
6
|
import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
6
7
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
8
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
8
|
-
import { fixIds } from "./shared.js";
|
|
9
9
|
import { c as components } from "../../index-a301f526.esm-ByOfDxiG.js";
|
|
10
10
|
/**
|
|
11
11
|
* Multi-select menu with async loading and re-ordering.
|
|
@@ -71,7 +71,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
71
71
|
inline,
|
|
72
72
|
loadOptions,
|
|
73
73
|
preloadOptions = true,
|
|
74
|
-
value,
|
|
74
|
+
value: rawValue,
|
|
75
75
|
onChange,
|
|
76
76
|
disabled = false,
|
|
77
77
|
noSearch = false,
|
|
@@ -89,6 +89,11 @@ const AsyncMultiSelect = (props) => {
|
|
|
89
89
|
hidden,
|
|
90
90
|
...additionalProps
|
|
91
91
|
} = props;
|
|
92
|
+
const idBase = useId();
|
|
93
|
+
const value = rawValue.map((item, index) => ({
|
|
94
|
+
...item,
|
|
95
|
+
id: `${idBase}-${index}`
|
|
96
|
+
}));
|
|
92
97
|
if (hidden) {
|
|
93
98
|
return null;
|
|
94
99
|
}
|
|
@@ -96,7 +101,6 @@ const AsyncMultiSelect = (props) => {
|
|
|
96
101
|
const results = await loadOptions(searchText);
|
|
97
102
|
return processLoadedOptions((results == null ? void 0 : results.map((item) => ({ id: item.value, ...item }))) ?? []);
|
|
98
103
|
};
|
|
99
|
-
fixIds(value, onChange);
|
|
100
104
|
return /* @__PURE__ */ jsx(
|
|
101
105
|
BaseControl,
|
|
102
106
|
{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { S as StateManagedSelect$1 } from "../../react-select.esm-Bi6uzjbT.js";
|
|
3
4
|
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-7vKCF8dG.js";
|
|
4
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
5
6
|
import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
6
|
-
import {
|
|
7
|
+
import { getValue, customOnChange } from "./shared.js";
|
|
7
8
|
import { BaseControl } from "../base-control/base-control.js";
|
|
8
9
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
9
10
|
import { c as components } from "../../index-a301f526.esm-ByOfDxiG.js";
|
|
@@ -64,7 +65,7 @@ const MultiSelect = (props) => {
|
|
|
64
65
|
subtitle,
|
|
65
66
|
actions,
|
|
66
67
|
inline,
|
|
67
|
-
value,
|
|
68
|
+
value: rawValue,
|
|
68
69
|
onChange,
|
|
69
70
|
options,
|
|
70
71
|
simpleValue = false,
|
|
@@ -83,10 +84,14 @@ const MultiSelect = (props) => {
|
|
|
83
84
|
hidden,
|
|
84
85
|
...additionalProps
|
|
85
86
|
} = props;
|
|
87
|
+
const idBase = useId();
|
|
88
|
+
const value = rawValue.map((item, index) => ({
|
|
89
|
+
...item,
|
|
90
|
+
id: `${idBase}-${index}`
|
|
91
|
+
}));
|
|
86
92
|
if (hidden) {
|
|
87
93
|
return null;
|
|
88
94
|
}
|
|
89
|
-
fixIds(value, onChange);
|
|
90
95
|
return /* @__PURE__ */ jsx(
|
|
91
96
|
BaseControl,
|
|
92
97
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"eslint-plugin-prettier": "^5.1.3",
|
|
64
64
|
"framer-motion": "^11.2.12",
|
|
65
65
|
"glob": "^10.4.2",
|
|
66
|
-
"globals": "^15.
|
|
66
|
+
"globals": "^15.7.0",
|
|
67
67
|
"just-camel-case": "^6.2.0",
|
|
68
68
|
"just-debounce-it": "^3.2.0",
|
|
69
69
|
"just-has": "^2.3.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"just-kebab-case": "^4.2.0",
|
|
72
72
|
"just-throttle": "^4.2.0",
|
|
73
73
|
"lightningcss": "^1.25.1",
|
|
74
|
-
"postcss": "^8.4.
|
|
74
|
+
"postcss": "^8.4.39",
|
|
75
75
|
"prettier": "^3.3.2",
|
|
76
76
|
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
77
77
|
"react-aria": "^3.33.1",
|