@eightshift/ui-components 6.1.1 → 6.3.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/{Button-CFnNdpNZ.js → Button-DtRmB6b8.js} +7 -6
- package/dist/{Dialog-D0jMcN-a.js → Dialog-DTIxSDhz.js} +115 -52
- package/dist/{FocusScope-BJhC1-1e.js → FocusScope-CjFQ7cbd.js} +16 -16
- package/dist/{Hidden-Rfj-STx7.js → Hidden-DOH36apC.js} +23 -6
- package/dist/{Input-B4X6-x6r.js → Input-BG9DaxYN.js} +6 -6
- package/dist/{Label-BDlf9vIY.js → Label-_aSf9-8u.js} +1 -1
- package/dist/{ListBox-BaN0n5h3.js → ListBox-DXFyyj_r.js} +15 -12
- package/dist/{OverlayArrow-Dy0qw7WL.js → OverlayArrow-Fuxj-1QM.js} +27 -9
- package/dist/{RadioGroup-CjCAbUr4.js → RadioGroup-DCeiLxLK.js} +9 -9
- package/dist/{SearchField-CafsA525.js → SearchField-B_yKFXRk.js} +11 -11
- package/dist/{SelectionManager-oojq6MOy.js → SelectionManager-B02LcxLr.js} +143 -96
- package/dist/{Slider-BIbaMdUE.js → Slider-bR3fAmim.js} +7 -7
- package/dist/{VisuallyHidden-CqnizvzQ.js → VisuallyHidden-DZnWrkn8.js} +1 -1
- package/dist/assets/style-admin.css +637 -327
- package/dist/assets/style-editor.css +637 -327
- package/dist/assets/style.css +637 -327
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +1 -1
- package/dist/assets/wp-overrides/fix-label-text-case.css +1 -1
- package/dist/assets/wp-overrides/increase-sidebar-width.css +1 -1
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +7 -7
- package/dist/assets/wp-overrides/replace-fonts.css +5 -5
- package/dist/assets/wp-overrides/restyle-tooltips.css +3 -3
- package/dist/assets/wp-overrides/round-corners.css +1 -1
- package/dist/assets/wp-overrides/unify-button-sizes.css +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/button/button.js +12 -9
- package/dist/components/checkbox/checkbox.js +10 -10
- package/dist/components/color-pickers/solid-color-picker.js +10 -10
- package/dist/components/expandable/expandable.js +5 -5
- package/dist/components/input-field/input-field.js +6 -9
- package/dist/components/link-input/link-input.js +191 -68
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +5 -5
- package/dist/components/modal/modal.js +11 -8
- package/dist/components/notice/notice.js +3 -3
- package/dist/components/number-picker/number-picker.js +7 -7
- package/dist/components/options-panel/options-panel.js +6 -6
- package/dist/components/popover/popover.js +8 -7
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/responsive/mini-responsive.js +81 -70
- package/dist/components/responsive/responsive.js +24 -40
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +11 -5
- package/dist/components/select/async-multi-select.js +89 -47
- package/dist/components/select/async-select.js +90 -47
- package/dist/components/select/multi-select.js +161 -117
- package/dist/components/select/shared.js +5 -4
- package/dist/components/select/single-select.js +159 -115
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/tabs/tabs.js +39 -8
- package/dist/components/toggle/switch.js +5 -5
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +11 -9
- package/dist/{proxy-DFlYXk07.js → proxy-CNEXmkdK.js} +205 -137
- package/dist/{shared-CMLCUova.js → shared-CNH8QfV9.js} +50 -15
- package/dist/{textSelection-CeoEP4rL.js → textSelection-DA3VcKpG.js} +1 -1
- package/dist/{useButton-5YL_nmpZ.js → useButton-DyMX0EVr.js} +2 -2
- package/dist/{useEvent-Zze2g7CX.js → useEvent-Bfy68GHZ.js} +1 -1
- package/dist/{useFilter-8S94U4xM.js → useFilter-Bg5C34XC.js} +1 -1
- package/dist/{useFocusRing-rUOwLdTK.js → useFocusRing-B2glEZ25.js} +9 -7
- package/dist/{useFormReset-BxtOoO5Q.js → useFormReset-BoxsKyJ9.js} +1 -1
- package/dist/{useFormValidation-DTmPrTD8.js → useFormValidation-BrbMhS2N.js} +4 -3
- package/dist/{useHover-CmyvqeWX.js → useHover-DkmPQdGE.js} +76 -58
- package/dist/{useListState-B22CApJO.js → useListState-BjnzKozj.js} +3 -3
- package/dist/{useNumberField-CTkI-U9a.js → useNumberField-CsygZKz9.js} +45 -15
- package/dist/{usePress-CNefMs8d.js → usePress-Ck5xMtDr.js} +21 -21
- package/dist/{useToggle-CFFOmZWi.js → useToggle-Ddc7N8pR.js} +4 -4
- package/dist/{useToggleState-BWrKKisg.js → useToggleState-H_lORSWO.js} +1 -1
- package/package.json +22 -21
- package/dist/useSingleSelectListState-CDZGQDLC.js +0 -38
|
@@ -2,14 +2,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
3
3
|
import { _ as __, a as _n } from "../../default-i18n-CnQeC5Pl.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
|
-
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-
|
|
6
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-
|
|
7
|
-
import { $ as $
|
|
8
|
-
import { $ as $
|
|
9
|
-
import { $ as $
|
|
10
|
-
import {
|
|
11
|
-
import { g as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-
|
|
12
|
-
import {
|
|
5
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-B_yKFXRk.js";
|
|
6
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-DtRmB6b8.js";
|
|
7
|
+
import { f as $07b14b47974efb58$export$5b6b19405a83ff9d, i as $72a5793c14baf454$export$8b251419efc915eb } from "../../Dialog-DTIxSDhz.js";
|
|
8
|
+
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BG9DaxYN.js";
|
|
9
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-_aSf9-8u.js";
|
|
10
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$dca12b0bb56e4fc } from "../../ListBox-DXFyyj_r.js";
|
|
11
|
+
import { g as getGroupedOptions, b as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-CNH8QfV9.js";
|
|
12
|
+
import { $ as $e1995378a142960e$export$fb8073518f34e6ec } from "../../SelectionManager-B02LcxLr.js";
|
|
13
|
+
import { useRef, useState, useMemo, cloneElement, isValidElement } from "react";
|
|
13
14
|
import { icons } from "../../icons/icons.js";
|
|
14
15
|
import "../../react-jsx-parser.min-DAh4myol.js";
|
|
15
16
|
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
@@ -19,7 +20,7 @@ import { TriggeredPopover } from "../popover/popover.js";
|
|
|
19
20
|
import { DraggableList } from "../draggable-list/draggable-list.js";
|
|
20
21
|
import { DraggableListItem } from "../draggable-list/draggable-list-item.js";
|
|
21
22
|
import { randomId } from "../../utilities/hash.js";
|
|
22
|
-
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-
|
|
23
|
+
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-Bg5C34XC.js";
|
|
23
24
|
/**
|
|
24
25
|
* Multi-select menu.
|
|
25
26
|
*
|
|
@@ -35,6 +36,8 @@ import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-8
|
|
|
35
36
|
* @param {string|{label: string, value: string, metadata: Object<string, any>?}} props.value - Current value of the select.
|
|
36
37
|
* @param {Function} props.onChange - Function to call when the value changes.
|
|
37
38
|
* @param {boolean} [props.simpleValue=false] - If `true`, instead of using a `{label: '', value: ''}` value type, a string is used (just the value).
|
|
39
|
+
* @param {string} [props.groupKey] - If provided, the options will be grouped by this key.
|
|
40
|
+
* @param {Object} [props.groupValueMapping] - If provided, the group headers will be mapped to these labels/icons.
|
|
38
41
|
* @param {boolean} [props.clearable] - Whether the select is clearable.
|
|
39
42
|
* @param {boolean} [props.disabled] - Whether the select is disabled.
|
|
40
43
|
* @param {string} [props.placeholder] - Placeholder text to show when no value is selected.
|
|
@@ -83,6 +86,8 @@ const MultiSelect = (props) => {
|
|
|
83
86
|
onChange,
|
|
84
87
|
options,
|
|
85
88
|
simpleValue = false,
|
|
89
|
+
groupKey,
|
|
90
|
+
groupValueMapping,
|
|
86
91
|
disabled = false,
|
|
87
92
|
clearable = false,
|
|
88
93
|
placeholder = __("Select...", "eightshift-ui-components"),
|
|
@@ -98,8 +103,44 @@ const MultiSelect = (props) => {
|
|
|
98
103
|
hidden,
|
|
99
104
|
...rest
|
|
100
105
|
} = props;
|
|
101
|
-
const ref = useRef();
|
|
106
|
+
const ref = useRef(null);
|
|
107
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
102
108
|
const { contains } = $bb77f239b46e8c72$export$3274cf84b703fff({ sensitivity: "base" });
|
|
109
|
+
const filteredOptions = useMemo(() => {
|
|
110
|
+
if (!searchable || searchTerm.length === 0) {
|
|
111
|
+
return options;
|
|
112
|
+
}
|
|
113
|
+
return options?.filter((item) => {
|
|
114
|
+
return contains(item.label ?? "", searchTerm) || contains(item?.subtitle ?? "", searchTerm);
|
|
115
|
+
});
|
|
116
|
+
}, [options, searchable, searchTerm, contains]);
|
|
117
|
+
const groupedOptions = useMemo(() => getGroupedOptions(filteredOptions, groupKey, groupValueMapping), [filteredOptions, groupKey, groupValueMapping]);
|
|
118
|
+
const renderItem = (item) => {
|
|
119
|
+
let icon2 = item?.icon ?? null;
|
|
120
|
+
if (typeof item?.icon === "string") {
|
|
121
|
+
icon2 = icons?.[item.icon] ?? null;
|
|
122
|
+
}
|
|
123
|
+
return /* @__PURE__ */ jsxs(
|
|
124
|
+
OptionItemBase,
|
|
125
|
+
{
|
|
126
|
+
id: item?.value ?? randomId(8),
|
|
127
|
+
className: item?.className,
|
|
128
|
+
selectIndicator: true,
|
|
129
|
+
children: [
|
|
130
|
+
customMenuOption && customMenuOption(item),
|
|
131
|
+
!customMenuOption && /* @__PURE__ */ jsx(
|
|
132
|
+
RichLabel,
|
|
133
|
+
{
|
|
134
|
+
icon: icon2,
|
|
135
|
+
label: item?.label,
|
|
136
|
+
subtitle: item?.subtitle,
|
|
137
|
+
noColor: true
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
};
|
|
103
144
|
const currentValue = getValue(simpleValue, value, options);
|
|
104
145
|
const currentValueKeys = value?.map((item) => item?.value ?? item);
|
|
105
146
|
const handleSelectionChange = (selected) => {
|
|
@@ -127,14 +168,7 @@ const MultiSelect = (props) => {
|
|
|
127
168
|
...option
|
|
128
169
|
};
|
|
129
170
|
})?.filter(Boolean);
|
|
130
|
-
onChange(
|
|
131
|
-
selectedValues.map((item) => ({
|
|
132
|
-
label: item?.label,
|
|
133
|
-
value: item?.value,
|
|
134
|
-
subtitle: item?.subtitle,
|
|
135
|
-
meta: item?.meta
|
|
136
|
-
}))
|
|
137
|
-
);
|
|
171
|
+
onChange(selectedValues);
|
|
138
172
|
};
|
|
139
173
|
if (hidden) {
|
|
140
174
|
return null;
|
|
@@ -215,6 +249,11 @@ const MultiSelect = (props) => {
|
|
|
215
249
|
selectionMode: "multiple",
|
|
216
250
|
isDisabled: disabled,
|
|
217
251
|
value: currentValueKeys,
|
|
252
|
+
onOpenChange: (isOpen) => {
|
|
253
|
+
if (!isOpen) {
|
|
254
|
+
setSearchTerm("");
|
|
255
|
+
}
|
|
256
|
+
},
|
|
218
257
|
onChange: (selected) => handleSelectionChange(selected),
|
|
219
258
|
placeholder,
|
|
220
259
|
...rest,
|
|
@@ -308,10 +347,12 @@ const MultiSelect = (props) => {
|
|
|
308
347
|
slot: null
|
|
309
348
|
},
|
|
310
349
|
className: "es:grid es:grid-cols-1 es:grid-rows-[auto_minmax(0,1fr)] es:p-0!",
|
|
311
|
-
wrapperClassName: "es:w-72 es:px-1.5 es:h-fit es:from-surface-300/35 es:to-surface-300/35 es:overflow-clip es:rounded-20!",
|
|
350
|
+
wrapperClassName: "es:w-(--select-width) es:min-w-72 es:px-1.5 es:h-fit es:from-surface-300/35 es:to-surface-300/35 es:overflow-clip es:rounded-20!",
|
|
312
351
|
hidden: noReorder || disabled || currentValue?.length < 2,
|
|
352
|
+
style: { "--select-width": ref.current ? `${ref.current.offsetWidth}px` : "var(--trigger-width)" },
|
|
353
|
+
triggerRef: ref,
|
|
313
354
|
children: [
|
|
314
|
-
/* @__PURE__ */ jsx("span", { className: 'es:text-
|
|
355
|
+
/* @__PURE__ */ jsx("span", { className: 'es:text-sm es:ml-3 es:mt-2 es:mb-1 es:font-variation-["wdth"_100,"wght"_325,"ROND"_100] es:text-surface-600', children: __("Item order", "eightshift-ui-components") }),
|
|
315
356
|
/* @__PURE__ */ jsx(
|
|
316
357
|
DraggableList,
|
|
317
358
|
{
|
|
@@ -349,7 +390,8 @@ const MultiSelect = (props) => {
|
|
|
349
390
|
$07b14b47974efb58$export$5b6b19405a83ff9d,
|
|
350
391
|
{
|
|
351
392
|
className: ({ isEntering, isExiting }) => clsx(
|
|
352
|
-
"es:
|
|
393
|
+
"es:font-sans",
|
|
394
|
+
"es:w-(--select-width) es:min-w-72",
|
|
353
395
|
"es:outline-hidden",
|
|
354
396
|
searchable ? "es:rounded-b-xl es:rounded-t-3xl" : "es:rounded-2xl",
|
|
355
397
|
"es:overflow-clip es:grid es:grid-cols-1",
|
|
@@ -374,93 +416,98 @@ const MultiSelect = (props) => {
|
|
|
374
416
|
placement: "bottom left",
|
|
375
417
|
maxHeight: 260,
|
|
376
418
|
triggerRef: ref,
|
|
419
|
+
style: { "--select-width": ref.current ? `${ref.current.offsetWidth}px` : "var(--trigger-width)" },
|
|
377
420
|
children: [
|
|
378
|
-
searchable && /* @__PURE__ */ jsxs(
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
388
|
-
{
|
|
389
|
-
placeholder: __("Search...", "eightshift-ui-components"),
|
|
390
|
-
className: clsx(
|
|
391
|
-
"es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
|
|
392
|
-
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
|
|
393
|
-
"es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
|
|
394
|
-
"es:text-accent-950 es:placeholder:text-accent-700/50",
|
|
395
|
-
"es:transition"
|
|
396
|
-
)
|
|
397
|
-
}
|
|
398
|
-
),
|
|
399
|
-
/* @__PURE__ */ jsx(
|
|
400
|
-
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
401
|
-
{
|
|
402
|
-
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
403
|
-
className: clsx(
|
|
404
|
-
"es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent",
|
|
405
|
-
"es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300",
|
|
406
|
-
"es:peer-placeholder-shown:opacity-0"
|
|
407
|
-
),
|
|
408
|
-
children: icons.clearAlt
|
|
409
|
-
}
|
|
410
|
-
)
|
|
411
|
-
]
|
|
412
|
-
}
|
|
413
|
-
),
|
|
414
|
-
/* @__PURE__ */ jsx(
|
|
415
|
-
$eed445e0843c11d0$export$41f133550aa26f48,
|
|
416
|
-
{
|
|
417
|
-
className: "es:space-y-0.75 es:p-1.5 es:pt-0 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl",
|
|
418
|
-
items: options,
|
|
419
|
-
renderEmptyState: () => /* @__PURE__ */ jsx(
|
|
420
|
-
RichLabel,
|
|
421
|
+
searchable && /* @__PURE__ */ jsxs(
|
|
422
|
+
$d2f53cda644affe3$export$2f2b9559550c7bbc,
|
|
423
|
+
{
|
|
424
|
+
filter: () => true,
|
|
425
|
+
inputValue: searchTerm,
|
|
426
|
+
onInputChange: setSearchTerm,
|
|
427
|
+
children: [
|
|
428
|
+
/* @__PURE__ */ jsxs(
|
|
429
|
+
$440f4836bcb56932$export$b94867ecbd698f21,
|
|
421
430
|
{
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
431
|
+
"aria-label": __("Search", "eightshift-ui-components"),
|
|
432
|
+
className: "es:flex es:items-center es:relative",
|
|
433
|
+
autoFocus: true,
|
|
434
|
+
children: [
|
|
435
|
+
/* @__PURE__ */ jsx(
|
|
436
|
+
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
437
|
+
{
|
|
438
|
+
placeholder: __("Search...", "eightshift-ui-components"),
|
|
439
|
+
className: clsx(
|
|
440
|
+
"es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
|
|
441
|
+
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl! es:border-none!",
|
|
442
|
+
"es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
|
|
443
|
+
"es:text-accent-950 es:placeholder:text-accent-700/50",
|
|
444
|
+
"es:transition"
|
|
445
|
+
)
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ jsx(
|
|
449
|
+
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
450
|
+
{
|
|
451
|
+
slot: "clear",
|
|
452
|
+
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
453
|
+
className: clsx(
|
|
454
|
+
"es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent",
|
|
455
|
+
"es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300",
|
|
456
|
+
"es:peer-placeholder-shown:opacity-0"
|
|
457
|
+
),
|
|
458
|
+
children: icons.clearAlt
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
]
|
|
428
462
|
}
|
|
429
463
|
),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
464
|
+
/* @__PURE__ */ jsxs(
|
|
465
|
+
$eed445e0843c11d0$export$41f133550aa26f48,
|
|
466
|
+
{
|
|
467
|
+
className: "es:space-y-0.75 es:p-1.5 es:pt-0 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl",
|
|
468
|
+
renderEmptyState: () => /* @__PURE__ */ jsx(
|
|
469
|
+
RichLabel,
|
|
470
|
+
{
|
|
471
|
+
icon: icons.searchEmpty,
|
|
472
|
+
label: __("No results", "eightshift-ui-components"),
|
|
473
|
+
subtitle: __("Try a different search term", "eightshift-ui-components"),
|
|
474
|
+
className: "es:min-h-14 es:p-2 es:w-fit es:mx-auto es:motion-preset-slide-up es:motion-ease-spring-bouncy es:motion-duration-200 es:shrink-0",
|
|
475
|
+
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
476
|
+
noColor: true
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
children: [
|
|
480
|
+
groupedOptions && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: groupedOptions, children: (item) => /* @__PURE__ */ jsxs(
|
|
481
|
+
$eed445e0843c11d0$export$dca12b0bb56e4fc,
|
|
482
|
+
{
|
|
483
|
+
id: item.key,
|
|
484
|
+
className: "es:flex es:flex-col es:gap-0.75",
|
|
485
|
+
children: [
|
|
486
|
+
/* @__PURE__ */ jsx($72a5793c14baf454$export$8b251419efc915eb, { className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none", children: /* @__PURE__ */ jsx(
|
|
487
|
+
RichLabel,
|
|
488
|
+
{
|
|
489
|
+
icon: item?.icon,
|
|
490
|
+
label: item?.label,
|
|
491
|
+
subtitle: item?.subtitle,
|
|
492
|
+
endIcon: item?.endIcon,
|
|
493
|
+
fullWidth: true
|
|
494
|
+
}
|
|
495
|
+
) }),
|
|
496
|
+
/* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: item.options, children: (subItem) => renderItem(subItem) })
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
) }),
|
|
500
|
+
!groupedOptions && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: searchable ? filteredOptions : options, children: (item) => renderItem(item) })
|
|
501
|
+
]
|
|
434
502
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
selectIndicator: true,
|
|
441
|
-
children: [
|
|
442
|
-
customMenuOption && customMenuOption(item),
|
|
443
|
-
!customMenuOption && /* @__PURE__ */ jsx(
|
|
444
|
-
RichLabel,
|
|
445
|
-
{
|
|
446
|
-
icon: icon2,
|
|
447
|
-
label: item?.label,
|
|
448
|
-
subtitle: item?.subtitle,
|
|
449
|
-
noColor: true
|
|
450
|
-
}
|
|
451
|
-
)
|
|
452
|
-
]
|
|
453
|
-
}
|
|
454
|
-
);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
)
|
|
458
|
-
] }),
|
|
459
|
-
!searchable && /* @__PURE__ */ jsx(
|
|
503
|
+
)
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
),
|
|
507
|
+
!searchable && /* @__PURE__ */ jsxs(
|
|
460
508
|
$eed445e0843c11d0$export$41f133550aa26f48,
|
|
461
509
|
{
|
|
462
510
|
className: "es:space-y-0.75 es:p-1.5 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl",
|
|
463
|
-
items: options,
|
|
464
511
|
renderEmptyState: () => /* @__PURE__ */ jsx(
|
|
465
512
|
RichLabel,
|
|
466
513
|
{
|
|
@@ -472,32 +519,29 @@ const MultiSelect = (props) => {
|
|
|
472
519
|
noColor: true
|
|
473
520
|
}
|
|
474
521
|
),
|
|
475
|
-
children:
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
icon2 = icons?.[item.icon] ?? null;
|
|
479
|
-
}
|
|
480
|
-
return /* @__PURE__ */ jsxs(
|
|
481
|
-
OptionItemBase,
|
|
522
|
+
children: [
|
|
523
|
+
groupedOptions && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: groupedOptions, children: (item) => /* @__PURE__ */ jsxs(
|
|
524
|
+
$eed445e0843c11d0$export$dca12b0bb56e4fc,
|
|
482
525
|
{
|
|
483
|
-
id: item
|
|
484
|
-
className:
|
|
485
|
-
selectIndicator: true,
|
|
526
|
+
id: item.key,
|
|
527
|
+
className: "es:flex es:flex-col es:gap-0.75",
|
|
486
528
|
children: [
|
|
487
|
-
|
|
488
|
-
!customMenuOption && /* @__PURE__ */ jsx(
|
|
529
|
+
/* @__PURE__ */ jsx($72a5793c14baf454$export$8b251419efc915eb, { className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none", children: /* @__PURE__ */ jsx(
|
|
489
530
|
RichLabel,
|
|
490
531
|
{
|
|
491
|
-
icon:
|
|
532
|
+
icon: item?.icon,
|
|
492
533
|
label: item?.label,
|
|
493
534
|
subtitle: item?.subtitle,
|
|
494
|
-
|
|
535
|
+
endIcon: item?.endIcon,
|
|
536
|
+
fullWidth: true
|
|
495
537
|
}
|
|
496
|
-
)
|
|
538
|
+
) }),
|
|
539
|
+
/* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: item.options, children: (subItem) => renderItem(subItem) })
|
|
497
540
|
]
|
|
498
541
|
}
|
|
499
|
-
)
|
|
500
|
-
|
|
542
|
+
) }),
|
|
543
|
+
!groupedOptions && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: options, children: (item) => renderItem(item) })
|
|
544
|
+
]
|
|
501
545
|
}
|
|
502
546
|
)
|
|
503
547
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../default-i18n-CnQeC5Pl.js";
|
|
3
|
-
import "../../Button-
|
|
4
|
-
import "../../ListBox-
|
|
5
|
-
import { O, S, g, m } from "../../shared-
|
|
3
|
+
import "../../Button-DtRmB6b8.js";
|
|
4
|
+
import "../../ListBox-DXFyyj_r.js";
|
|
5
|
+
import { O, S, g, b, m } from "../../shared-CNH8QfV9.js";
|
|
6
6
|
import "../../icons/icons.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../../react-jsx-parser.min-DAh4myol.js";
|
|
@@ -11,6 +11,7 @@ import "../animated-visibility/animated-visibility.js";
|
|
|
11
11
|
export {
|
|
12
12
|
O as OptionItemBase,
|
|
13
13
|
S as SelectClearButton,
|
|
14
|
-
g as
|
|
14
|
+
g as getGroupedOptions,
|
|
15
|
+
b as getValue,
|
|
15
16
|
m as moveArrayItem
|
|
16
17
|
};
|