@eightshift/ui-components 6.1.1 → 6.2.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/{Dialog-D0jMcN-a.js → Dialog-DDfABlp4.js} +26 -17
- package/dist/{ListBox-BaN0n5h3.js → ListBox-ByPsaVVK.js} +10 -8
- package/dist/{SearchField-CafsA525.js → SearchField-BME59dt-.js} +1 -1
- package/dist/{SelectionManager-oojq6MOy.js → SelectionManager-iru59gc4.js} +32 -31
- package/dist/assets/style-admin.css +9 -0
- package/dist/assets/style-editor.css +9 -0
- package/dist/assets/style.css +9 -0
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/link-input/link-input.js +6 -6
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/modal/modal.js +2 -2
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/rich-label/rich-label.js +6 -2
- package/dist/components/select/async-multi-select.js +78 -40
- package/dist/components/select/async-select.js +79 -39
- package/dist/components/select/multi-select.js +150 -110
- package/dist/components/select/shared.js +4 -3
- package/dist/components/select/single-select.js +151 -109
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/{shared-CMLCUova.js → shared-HdRrpnhs.js} +39 -5
- package/dist/{useFilter-8S94U4xM.js → useFilter-NhAlifsK.js} +1 -1
- package/dist/{useListState-B22CApJO.js → useListState-HOvCQJFf.js} +1 -1
- package/dist/{useSingleSelectListState-CDZGQDLC.js → useSingleSelectListState-BtrMHGeE.js} +1 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-CFnNdpN
|
|
|
2
2
|
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $df56164dff5785e2$export$4338b53315abf666, d as $bdb11010cef70236$export$f680877a34711e37, c as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, o as $ff5963eb1fccf552$export$e08e3b67e392101e, m as $b5e257d569688ac6$export$535bd6ca7f90a273, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, a as $64fa3d84918910a7$export$df3a06d6289f983e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, e as $64fa3d84918910a7$export$fabf2dc03a41866e, n as $64fa3d84918910a7$export$c62b8e45d58ddad9, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 } from "./utils-Cr3pLd9c.js";
|
|
3
3
|
import { c as $4e85f108e88277b8$export$b0d3ecf7112093a7, a as $4e85f108e88277b8$export$698f465ec27e93df, $ as $4e85f108e88277b8$export$d688439359537581 } from "./RSPContexts-CJ-HBf0L.js";
|
|
4
4
|
import { e as $dd149f63282afbbf$export$f6211563215e3b37, a as $2a41e45df1593e64$export$d39e1813b3bdd0e1, d as $9daab02d461809db$export$683480f191c0e3ea, $ as $fc909762b330b746$export$61c6a8c84e605fb6, b as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./OverlayArrow-Dy0qw7WL.js";
|
|
5
|
-
import {
|
|
5
|
+
import { e as $cc38e7bd3fc7b213$export$2bb74740c4e19def, d as $21f1aa98acb08317$export$c57958e35f31ed73, B as $feb5ffebff200149$export$c3d8340acf92597f, o as $ae20dd8cbca75726$export$d6daf82dcd84e87c, s as $c5a24bc478652b5f$export$1005530eda016c13, C as $8a26561d2877236e$export$c24ed0104d07eab9, f as $880e95eb8b93ba9a$export$ecf600387e221c37, a as $7af3f5b51489e0b5$export$253fe78d46329472, b as $7613b1592d41b092$export$6cd28814d92fa9c9, c as $d496c0a20b6e58ec$export$6c8a5aaad13c9852, j as $e1995378a142960e$export$18af5c7a9e9b3664, D as $23b9f4fcf0fe224b$export$5ae2504e948afce5, p as $23b9f4fcf0fe224b$export$d68d59712b04d9d1, g as $e1995378a142960e$export$bf788dd355e3a401, $ as $e1995378a142960e$export$fb8073518f34e6ec, k as $23b9f4fcf0fe224b$export$fd11f34e1d07f134, h as $e1995378a142960e$export$e953bb1cd0f19726, i as $23b9f4fcf0fe224b$export$437f11dc9b403b78, l as $7135fc7d473fd974$export$4feb769f8ddf26c5, m as $7135fc7d473fd974$export$d40e14dec8b060a8, q as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "./SelectionManager-iru59gc4.js";
|
|
6
6
|
import $dbSRa$react__default, { useRef, useContext, useEffect, useMemo, useState, useCallback, createContext, forwardRef } from "react";
|
|
7
7
|
import { $ as $1d5b8b8664671ef2$export$c9549807523555e0 } from "./SelectionIndicator-D7WMzeAW.js";
|
|
8
8
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
|
|
@@ -2017,6 +2017,14 @@ function $875d6693e12af071$var$toggleKey(set, key) {
|
|
|
2017
2017
|
return res;
|
|
2018
2018
|
}
|
|
2019
2019
|
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ createContext({});
|
|
2020
|
+
const $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$5ae2504e948afce5, function Header(props, ref) {
|
|
2021
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
2022
|
+
return /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$df3a06d6289f983e.header, {
|
|
2023
|
+
className: "react-aria-Header",
|
|
2024
|
+
...props,
|
|
2025
|
+
ref
|
|
2026
|
+
}, props.children);
|
|
2027
|
+
});
|
|
2020
2028
|
const $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ createContext({});
|
|
2021
2029
|
class $431f98aba6844401$export$7750289ca694c0b5 extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
|
|
2022
2030
|
filter(collection, newCollection) {
|
|
@@ -2708,20 +2716,21 @@ export {
|
|
|
2708
2716
|
$07b14b47974efb58$export$5b6b19405a83ff9d as f,
|
|
2709
2717
|
$de32f1b87079253c$export$3ddf2d174ce01153 as g,
|
|
2710
2718
|
$de32f1b87079253c$export$2e1e1122cf0cba88 as h,
|
|
2711
|
-
$
|
|
2712
|
-
$
|
|
2713
|
-
$
|
|
2714
|
-
$
|
|
2715
|
-
$
|
|
2716
|
-
$
|
|
2717
|
-
$
|
|
2718
|
-
$
|
|
2719
|
-
$
|
|
2720
|
-
$
|
|
2721
|
-
$
|
|
2722
|
-
$
|
|
2723
|
-
$
|
|
2724
|
-
$
|
|
2725
|
-
$
|
|
2726
|
-
$
|
|
2719
|
+
$72a5793c14baf454$export$8b251419efc915eb as i,
|
|
2720
|
+
$325a3faab7a68acd$export$a16aca283550c30d as j,
|
|
2721
|
+
$a11501f3d1d39e6c$export$ea8f71083e90600f as k,
|
|
2722
|
+
$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as l,
|
|
2723
|
+
$337b884510726a0d$export$14c98a7594375490 as m,
|
|
2724
|
+
$5e3802645cc19319$export$1c3ebcada18427bf as n,
|
|
2725
|
+
$de32f1b87079253c$export$d2f961adcb0afbe as o,
|
|
2726
|
+
$86ea4cb521eb2e37$export$2317d149ed6f78c4 as p,
|
|
2727
|
+
$337b884510726a0d$export$c6fdb837b070b4ff as q,
|
|
2728
|
+
$62d8ded9296f3872$export$cfa2225e87938781 as r,
|
|
2729
|
+
$982254629710d113$export$b95089534ab7c1fd as s,
|
|
2730
|
+
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as t,
|
|
2731
|
+
$2a25aae57d74318e$export$a05409b8bb224a5a as u,
|
|
2732
|
+
$431f98aba6844401$export$6615d83f6de245ce as v,
|
|
2733
|
+
$72a5793c14baf454$export$e0e4026c12a8bdbb as w,
|
|
2734
|
+
$168583247155ddda$export$dc9c12ed27dd1b49 as x,
|
|
2735
|
+
$07b14b47974efb58$export$9b9a0cd73afb7ca4 as y
|
|
2727
2736
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, d as $bdb11010cef70236$export$f680877a34711e37, b as $3ef42575df84b30b$export$9d1611c77c2fe928, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, o as $ff5963eb1fccf552$export$e08e3b67e392101e, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $df56164dff5785e2$export$4338b53315abf666, h as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$df3a06d6289f983e, i as $64fa3d84918910a7$export$2881499e37b75b9a, n as $64fa3d84918910a7$export$c62b8e45d58ddad9, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 } from "./utils-Cr3pLd9c.js";
|
|
2
|
-
import {
|
|
2
|
+
import { f as $880e95eb8b93ba9a$export$ecf600387e221c37, g as $e1995378a142960e$export$bf788dd355e3a401, $ as $e1995378a142960e$export$fb8073518f34e6ec, h as $e1995378a142960e$export$e953bb1cd0f19726, i as $23b9f4fcf0fe224b$export$437f11dc9b403b78, j as $e1995378a142960e$export$18af5c7a9e9b3664, k as $23b9f4fcf0fe224b$export$fd11f34e1d07f134, l as $7135fc7d473fd974$export$4feb769f8ddf26c5, m as $7135fc7d473fd974$export$d40e14dec8b060a8, n as $23b9f4fcf0fe224b$export$8258a0665a675899 } from "./SelectionManager-iru59gc4.js";
|
|
3
3
|
import $dbSRa$react__default, { useRef, createContext, useCallback, useMemo, forwardRef, useContext, useEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { r as $62d8ded9296f3872$export$cfa2225e87938781, s as $982254629710d113$export$b95089534ab7c1fd, t as $453cc9f0df89c0a5$export$77d5aafae4e095b2, j as $325a3faab7a68acd$export$a16aca283550c30d, u as $2a25aae57d74318e$export$a05409b8bb224a5a, v as $431f98aba6844401$export$6615d83f6de245ce, w as $72a5793c14baf454$export$e0e4026c12a8bdbb } from "./Dialog-DDfABlp4.js";
|
|
5
5
|
import { c as $4e85f108e88277b8$export$b0d3ecf7112093a7 } from "./RSPContexts-CJ-HBf0L.js";
|
|
6
6
|
import { $ as $1d5b8b8664671ef2$export$c9549807523555e0 } from "./SelectionIndicator-D7WMzeAW.js";
|
|
7
7
|
import { $ as $c8a5a149f625efcf$export$758399f318e6385a } from "./SharedElementTransition-CtoWSaF0.js";
|
|
8
8
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-CjFEHSfr.js";
|
|
9
9
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
|
|
10
10
|
import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, D as $c87311424ea30a05$export$9ac100e40613ea10, C as $c87311424ea30a05$export$78551043582a6a98, x as $6179b936705e76d3$export$ae780daf29e6d456, m as $507fabe10e71c6fb$export$b9b3dfddab17db27, E as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18, o as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useHover-CmyvqeWX.js";
|
|
11
|
-
import { a as $e72dd72e1c76a225$export$ba9d38c0f1bf2b36, $ as $e72dd72e1c76a225$export$2f645645f7bca764, b as $cdc5a6778b766db2$export$a9d04c5684123369 } from "./useListState-
|
|
11
|
+
import { a as $e72dd72e1c76a225$export$ba9d38c0f1bf2b36, $ as $e72dd72e1c76a225$export$2f645645f7bca764, b as $cdc5a6778b766db2$export$a9d04c5684123369 } from "./useListState-HOvCQJFf.js";
|
|
12
12
|
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-rUOwLdTK.js";
|
|
13
13
|
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-DzXzKZZZ.js";
|
|
14
14
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-iUFQCK8m.js";
|
|
@@ -511,6 +511,7 @@ function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, classNam
|
|
|
511
511
|
renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
|
|
512
512
|
})));
|
|
513
513
|
}
|
|
514
|
+
const $eed445e0843c11d0$export$dca12b0bb56e4fc = /* @__PURE__ */ $e1995378a142960e$export$e953bb1cd0f19726($23b9f4fcf0fe224b$export$437f11dc9b403b78, $eed445e0843c11d0$var$ListBoxSectionInner);
|
|
514
515
|
const $eed445e0843c11d0$export$a11e76429ed99b4 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$fd11f34e1d07f134, function ListBoxItem(props, forwardedRef, item) {
|
|
515
516
|
let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
516
517
|
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
@@ -684,9 +685,10 @@ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$8258a0665a675
|
|
|
684
685
|
});
|
|
685
686
|
export {
|
|
686
687
|
$eed445e0843c11d0$export$41f133550aa26f48 as $,
|
|
687
|
-
$
|
|
688
|
-
$b1f0cad8af73213b$export$
|
|
689
|
-
$
|
|
690
|
-
$eed445e0843c11d0$export$
|
|
691
|
-
$eed445e0843c11d0$export$
|
|
688
|
+
$eed445e0843c11d0$export$dca12b0bb56e4fc as a,
|
|
689
|
+
$b1f0cad8af73213b$export$3585ede4d035bf14 as b,
|
|
690
|
+
$b1f0cad8af73213b$export$9145995848b05025 as c,
|
|
691
|
+
$eed445e0843c11d0$export$7ff8f37d2d81a48d as d,
|
|
692
|
+
$eed445e0843c11d0$export$7c5906fe4f1f2af2 as e,
|
|
693
|
+
$eed445e0843c11d0$export$a11e76429ed99b4 as f
|
|
692
694
|
};
|
|
@@ -3,7 +3,7 @@ import { o as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $bdb11010cef70236$
|
|
|
3
3
|
import { v as $507fabe10e71c6fb$export$630ff653c5ada6a9, c as $c87311424ea30a05$export$fedb369cb70207f1, s as $c87311424ea30a05$export$a11b0059900ceec8, b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, N as $507fabe10e71c6fb$export$887a228355cf7d95, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-CmyvqeWX.js";
|
|
4
4
|
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-D8O3gOdV.js";
|
|
5
5
|
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-Zze2g7CX.js";
|
|
6
|
-
import {
|
|
6
|
+
import { v as $5671b20cf9b562b2$export$831c820ad60f9d12, w as $55f9b1ae81f22853$export$76e4e37e5339496d, x as $5671b20cf9b562b2$export$447a38995de2c711, y as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, t as $55f9b1ae81f22853$export$2b35b76d2e30e129, z as $21f1aa98acb08317$export$16792effe837dba3, A as $55f9b1ae81f22853$export$759df0d867455a91 } from "./SelectionManager-iru59gc4.js";
|
|
7
7
|
import $dbSRa$react__default, { useRef, useState, useEffect, useCallback, useMemo, createContext } from "react";
|
|
8
8
|
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CEDs0LsA.js";
|
|
9
9
|
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-CFnNdpNZ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import $dbSRa$react__default, { useRef, useState, useEffect, useMemo, cloneElement, useContext,
|
|
1
|
+
import $dbSRa$react__default, { useRef, useState, useEffect, useMemo, cloneElement, useContext, createContext, forwardRef, useCallback, isValidElement } from "react";
|
|
2
2
|
import { D as $c87311424ea30a05$export$9ac100e40613ea10, g as $d4ee10de306f2510$export$4282f70798064fe0, f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, d as $431fbd86ca7dc216$export$b204af158042fbac, A as $7215afc6de606d6b$export$de79e2c695e052f3, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, K as $c87311424ea30a05$export$e1865c3bedcd822b, L as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, u as $3ad3f6e1647bc98d$export$80f3e147d781571c, v as $507fabe10e71c6fb$export$630ff653c5ada6a9, q as $b4b717babfbb907b$export$bebd5a1431fec25d, J as $ea8dcbcb9ea1b556$export$95185d699e05d4d7, M as $f645667febf57a63$export$f9762fab77588ecb, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-CmyvqeWX.js";
|
|
3
3
|
import { c as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, o as $ff5963eb1fccf552$export$e08e3b67e392101e, m as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-Cr3pLd9c.js";
|
|
4
4
|
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-Zze2g7CX.js";
|
|
@@ -2425,34 +2425,35 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
}
|
|
2427
2427
|
export {
|
|
2428
|
-
$
|
|
2429
|
-
$
|
|
2430
|
-
$
|
|
2431
|
-
$
|
|
2432
|
-
$
|
|
2433
|
-
$
|
|
2434
|
-
$
|
|
2435
|
-
$
|
|
2436
|
-
$
|
|
2437
|
-
$
|
|
2438
|
-
$
|
|
2439
|
-
$e1995378a142960e$export$
|
|
2440
|
-
$
|
|
2441
|
-
$
|
|
2442
|
-
$
|
|
2443
|
-
$23b9f4fcf0fe224b$export$
|
|
2444
|
-
$
|
|
2445
|
-
$
|
|
2446
|
-
$
|
|
2447
|
-
$
|
|
2448
|
-
$
|
|
2449
|
-
$
|
|
2450
|
-
$
|
|
2451
|
-
$
|
|
2452
|
-
$55f9b1ae81f22853$export$
|
|
2453
|
-
$
|
|
2454
|
-
$
|
|
2455
|
-
$
|
|
2456
|
-
$
|
|
2457
|
-
$
|
|
2428
|
+
$e1995378a142960e$export$fb8073518f34e6ec as $,
|
|
2429
|
+
$55f9b1ae81f22853$export$759df0d867455a91 as A,
|
|
2430
|
+
$feb5ffebff200149$export$c3d8340acf92597f as B,
|
|
2431
|
+
$8a26561d2877236e$export$c24ed0104d07eab9 as C,
|
|
2432
|
+
$23b9f4fcf0fe224b$export$5ae2504e948afce5 as D,
|
|
2433
|
+
$7af3f5b51489e0b5$export$253fe78d46329472 as a,
|
|
2434
|
+
$7613b1592d41b092$export$6cd28814d92fa9c9 as b,
|
|
2435
|
+
$d496c0a20b6e58ec$export$6c8a5aaad13c9852 as c,
|
|
2436
|
+
$21f1aa98acb08317$export$c57958e35f31ed73 as d,
|
|
2437
|
+
$cc38e7bd3fc7b213$export$2bb74740c4e19def as e,
|
|
2438
|
+
$880e95eb8b93ba9a$export$ecf600387e221c37 as f,
|
|
2439
|
+
$e1995378a142960e$export$bf788dd355e3a401 as g,
|
|
2440
|
+
$e1995378a142960e$export$e953bb1cd0f19726 as h,
|
|
2441
|
+
$23b9f4fcf0fe224b$export$437f11dc9b403b78 as i,
|
|
2442
|
+
$e1995378a142960e$export$18af5c7a9e9b3664 as j,
|
|
2443
|
+
$23b9f4fcf0fe224b$export$fd11f34e1d07f134 as k,
|
|
2444
|
+
$7135fc7d473fd974$export$4feb769f8ddf26c5 as l,
|
|
2445
|
+
$7135fc7d473fd974$export$d40e14dec8b060a8 as m,
|
|
2446
|
+
$23b9f4fcf0fe224b$export$8258a0665a675899 as n,
|
|
2447
|
+
$ae20dd8cbca75726$export$d6daf82dcd84e87c as o,
|
|
2448
|
+
$23b9f4fcf0fe224b$export$d68d59712b04d9d1 as p,
|
|
2449
|
+
$7135fc7d473fd974$export$90e00781bc59d8f9 as q,
|
|
2450
|
+
$7135fc7d473fd974$export$a164736487e3f0ae as r,
|
|
2451
|
+
$c5a24bc478652b5f$export$1005530eda016c13 as s,
|
|
2452
|
+
$55f9b1ae81f22853$export$2b35b76d2e30e129 as t,
|
|
2453
|
+
$fb3050f43d946246$export$e32c88dfddc6e1d8 as u,
|
|
2454
|
+
$5671b20cf9b562b2$export$831c820ad60f9d12 as v,
|
|
2455
|
+
$55f9b1ae81f22853$export$76e4e37e5339496d as w,
|
|
2456
|
+
$5671b20cf9b562b2$export$447a38995de2c711 as x,
|
|
2457
|
+
$55f9b1ae81f22853$export$6c5dc7e81d2cc29a as y,
|
|
2458
|
+
$21f1aa98acb08317$export$16792effe837dba3 as z
|
|
2458
2459
|
};
|
|
@@ -3142,6 +3142,10 @@ input[data-rac]::-webkit-search-cancel-button {
|
|
|
3142
3142
|
border-radius: var(--es-radius-3xl);
|
|
3143
3143
|
}
|
|
3144
3144
|
|
|
3145
|
+
:is(body, body #wpwrap) .es\:rounded-3xl\! {
|
|
3146
|
+
border-radius: var(--es-radius-3xl) !important;
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3145
3149
|
:is(body, body #wpwrap) .es\:rounded-4xl {
|
|
3146
3150
|
border-radius: var(--es-radius-4xl);
|
|
3147
3151
|
}
|
|
@@ -10292,6 +10296,11 @@ input[data-rac]::-webkit-search-cancel-button {
|
|
|
10292
10296
|
border-radius: var(--es-radius-xl) !important;
|
|
10293
10297
|
}
|
|
10294
10298
|
|
|
10299
|
+
:is(body, body #wpwrap) .es\:nth-2\:rounded-t-xl:nth-child(2) {
|
|
10300
|
+
border-top-left-radius: var(--es-radius-xl);
|
|
10301
|
+
border-top-right-radius: var(--es-radius-xl);
|
|
10302
|
+
}
|
|
10303
|
+
|
|
10295
10304
|
@media (prefers-contrast: more) {
|
|
10296
10305
|
:is(body, body #wpwrap) .es\:contrast-more\:text-current {
|
|
10297
10306
|
color: currentColor;
|
|
@@ -3110,6 +3110,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
3110
3110
|
border-radius: var(--es-radius-3xl);
|
|
3111
3111
|
}
|
|
3112
3112
|
|
|
3113
|
+
:is(body, #wpwrap #editor) .es\:rounded-3xl\! {
|
|
3114
|
+
border-radius: var(--es-radius-3xl) !important;
|
|
3115
|
+
}
|
|
3116
|
+
|
|
3113
3117
|
:is(body, #wpwrap #editor) .es\:rounded-4xl {
|
|
3114
3118
|
border-radius: var(--es-radius-4xl);
|
|
3115
3119
|
}
|
|
@@ -10260,6 +10264,11 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
10260
10264
|
border-radius: var(--es-radius-xl) !important;
|
|
10261
10265
|
}
|
|
10262
10266
|
|
|
10267
|
+
:is(body, #wpwrap #editor) .es\:nth-2\:rounded-t-xl:nth-child(2) {
|
|
10268
|
+
border-top-left-radius: var(--es-radius-xl);
|
|
10269
|
+
border-top-right-radius: var(--es-radius-xl);
|
|
10270
|
+
}
|
|
10271
|
+
|
|
10263
10272
|
@media (prefers-contrast: more) {
|
|
10264
10273
|
:is(body, #wpwrap #editor) .es\:contrast-more\:text-current {
|
|
10265
10274
|
color: currentColor;
|
package/dist/assets/style.css
CHANGED
|
@@ -3595,6 +3595,10 @@ input[data-rac]::-webkit-search-cancel-button {
|
|
|
3595
3595
|
border-radius: var(--es-radius-3xl);
|
|
3596
3596
|
}
|
|
3597
3597
|
|
|
3598
|
+
.es\:rounded-3xl\! {
|
|
3599
|
+
border-radius: var(--es-radius-3xl) !important;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3598
3602
|
.es\:rounded-4xl {
|
|
3599
3603
|
border-radius: var(--es-radius-4xl);
|
|
3600
3604
|
}
|
|
@@ -10745,6 +10749,11 @@ input[data-rac]::-webkit-search-cancel-button {
|
|
|
10745
10749
|
border-radius: var(--es-radius-xl) !important;
|
|
10746
10750
|
}
|
|
10747
10751
|
|
|
10752
|
+
.es\:nth-2\:rounded-t-xl:nth-child(2) {
|
|
10753
|
+
border-top-left-radius: var(--es-radius-xl);
|
|
10754
|
+
border-top-right-radius: var(--es-radius-xl);
|
|
10755
|
+
}
|
|
10756
|
+
|
|
10748
10757
|
@media (prefers-contrast: more) {
|
|
10749
10758
|
.es\:contrast-more\:text-current {
|
|
10750
10759
|
color: currentColor;
|
|
@@ -1444,7 +1444,7 @@ const SolidColorPicker = (props) => {
|
|
|
1444
1444
|
"es:hover:placeholder:text-surface-400",
|
|
1445
1445
|
"es:placeholder:text-secondary-400",
|
|
1446
1446
|
"es:shadow-xs es:shadow-black/5",
|
|
1447
|
-
"es:rounded-lg es:focus:rounded-xl",
|
|
1447
|
+
"es:rounded-lg! es:focus:rounded-xl!",
|
|
1448
1448
|
"es:border-none!"
|
|
1449
1449
|
)
|
|
1450
1450
|
}
|
|
@@ -5,17 +5,17 @@ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError
|
|
|
5
5
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
6
6
|
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-B4X6-x6r.js";
|
|
7
7
|
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { b as $b1f0cad8af73213b$export$3585ede4d035bf14, c as $b1f0cad8af73213b$export$9145995848b05025, d as $eed445e0843c11d0$export$7ff8f37d2d81a48d, e as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48, f as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-ByPsaVVK.js";
|
|
9
|
+
import { x as $168583247155ddda$export$dc9c12ed27dd1b49, u as $2a25aae57d74318e$export$a05409b8bb224a5a, t as $453cc9f0df89c0a5$export$77d5aafae4e095b2, n as $5e3802645cc19319$export$1c3ebcada18427bf, o as $de32f1b87079253c$export$d2f961adcb0afbe, y as $07b14b47974efb58$export$9b9a0cd73afb7ca4, f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-DDfABlp4.js";
|
|
10
10
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-CjFEHSfr.js";
|
|
11
|
-
import {
|
|
11
|
+
import { o as $ae20dd8cbca75726$export$d6daf82dcd84e87c, s as $c5a24bc478652b5f$export$1005530eda016c13, t as $55f9b1ae81f22853$export$2b35b76d2e30e129, g as $e1995378a142960e$export$bf788dd355e3a401 } from "../../SelectionManager-iru59gc4.js";
|
|
12
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-eGTqWSTd.js";
|
|
13
13
|
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, d as $9daab02d461809db$export$683480f191c0e3ea } from "../../OverlayArrow-Dy0qw7WL.js";
|
|
14
14
|
import $dbSRa$react__default, { useRef, useEffect, useMemo, useState, useCallback, forwardRef, createContext } from "react";
|
|
15
|
-
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-
|
|
15
|
+
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-NhAlifsK.js";
|
|
16
16
|
import { b as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-DTmPrTD8.js";
|
|
17
|
-
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-
|
|
18
|
-
import { c as $a02d57049d202695$export$d085fb9e920b5ca7 } from "../../useListState-
|
|
17
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-BtrMHGeE.js";
|
|
18
|
+
import { c as $a02d57049d202695$export$d085fb9e920b5ca7 } from "../../useListState-HOvCQJFf.js";
|
|
19
19
|
import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, L as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, K as $c87311424ea30a05$export$e1865c3bedcd822b, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, g as $d4ee10de306f2510$export$4282f70798064fe0, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-CmyvqeWX.js";
|
|
20
20
|
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-D8O3gOdV.js";
|
|
21
21
|
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-Zze2g7CX.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $431f98aba6844401$export$1ff3c3f08ae963c0, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-
|
|
2
|
+
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $431f98aba6844401$export$1ff3c3f08ae963c0, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-DDfABlp4.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { k as $a11501f3d1d39e6c$export$ea8f71083e90600f, l as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, m as $337b884510726a0d$export$14c98a7594375490, n as $5e3802645cc19319$export$1c3ebcada18427bf, o as $de32f1b87079253c$export$d2f961adcb0afbe, p as $86ea4cb521eb2e37$export$2317d149ed6f78c4, q as $337b884510726a0d$export$c6fdb837b070b4ff, h as $de32f1b87079253c$export$2e1e1122cf0cba88, g as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-DDfABlp4.js";
|
|
3
3
|
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-CY-_gt-U.js";
|
|
4
4
|
import { m as $b5e257d569688ac6$export$535bd6ca7f90a273, b as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $df56164dff5785e2$export$4338b53315abf666, l as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$df3a06d6289f983e, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-Cr3pLd9c.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-eGTqWSTd.js";
|
|
6
|
-
import {
|
|
6
|
+
import { d as $21f1aa98acb08317$export$c57958e35f31ed73, e as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "../../SelectionManager-iru59gc4.js";
|
|
7
7
|
import $dbSRa$react__default, { useState, useEffect, forwardRef, useContext, useRef, createContext, useMemo } from "react";
|
|
8
8
|
import { $ as $d3f049242431219c$export$45fda7c47f93fd48, a as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../animation-Dfl8uEb3.js";
|
|
9
9
|
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../../OverlayArrow-Dy0qw7WL.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { f as $07b14b47974efb58$export$5b6b19405a83ff9d, g as $de32f1b87079253c$export$3ddf2d174ce01153, h as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-
|
|
2
|
+
import { f as $07b14b47974efb58$export$5b6b19405a83ff9d, g as $de32f1b87079253c$export$3ddf2d174ce01153, h as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-DDfABlp4.js";
|
|
3
3
|
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
4
4
|
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
@@ -6,6 +6,7 @@ import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
|
6
6
|
* @component
|
|
7
7
|
* @param {Object} props - Component props.
|
|
8
8
|
* @param {JSX.Element} [props.icon] - Icon to display.
|
|
9
|
+
* @param {JSX.Element} [props.endIcon] - Icon to display at the end of the label.
|
|
9
10
|
* @param {string} [props.label] - Label to display.
|
|
10
11
|
* @param {string} [props.subtitle] - Subtitle to display.
|
|
11
12
|
* @param {JSX.Element} [props.as] - Element to render the label as. Not compatible with `contentsOnly`.
|
|
@@ -33,6 +34,7 @@ import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
|
33
34
|
const RichLabel = (props) => {
|
|
34
35
|
const {
|
|
35
36
|
icon,
|
|
37
|
+
endIcon,
|
|
36
38
|
label,
|
|
37
39
|
subtitle,
|
|
38
40
|
as,
|
|
@@ -55,7 +57,8 @@ const RichLabel = (props) => {
|
|
|
55
57
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
58
|
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5 es:not-contrast-more:opacity-85", iconClassName), children: icon }),
|
|
57
59
|
label && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance", labelClassName), children: label }),
|
|
58
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance es:text-xs es:not-contrast-more:opacity-65", subtitleClassName), children: subtitle })
|
|
60
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance es:text-xs es:not-contrast-more:opacity-65", subtitleClassName), children: subtitle }),
|
|
61
|
+
endIcon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5 es:not-contrast-more:opacity-85 es:ml-auto", iconClassName), children: endIcon })
|
|
59
62
|
] });
|
|
60
63
|
}
|
|
61
64
|
return /* @__PURE__ */ jsxs(ComponentToRender, { className: clsx("es:flex es:items-center es:gap-1.75 es:text-sm", fullWidth && "es:grow", className), children: [
|
|
@@ -63,7 +66,8 @@ const RichLabel = (props) => {
|
|
|
63
66
|
(label || subtitle) && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:items-start es:text-balance es:text-start", inlineSubtitle ? "es:gap-1.5" : "es:flex-col", labelSubtitleWrapClassName), children: [
|
|
64
67
|
label && /* @__PURE__ */ jsx("span", { className: clsx('es:font-variation-["wdth"_120,"wght"_400]', labelClassName), children: label }),
|
|
65
68
|
subtitle && /* @__PURE__ */ jsx("span", { className: clsx(!fullSizeSubtitle && "es:text-12", "es:not-contrast-more:opacity-65", subtitleClassName), children: subtitle })
|
|
66
|
-
] })
|
|
69
|
+
] }),
|
|
70
|
+
endIcon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5 es:shrink-0", "es:not-contrast-more:opacity-85 es:ml-auto", iconClassName), children: endIcon })
|
|
67
71
|
] });
|
|
68
72
|
};
|
|
69
73
|
export {
|
|
@@ -2,20 +2,20 @@ 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-
|
|
5
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-BME59dt-.js";
|
|
6
6
|
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-CFnNdpNZ.js";
|
|
7
|
+
import { f as $07b14b47974efb58$export$5b6b19405a83ff9d, i as $72a5793c14baf454$export$8b251419efc915eb } from "../../Dialog-DDfABlp4.js";
|
|
7
8
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-B4X6-x6r.js";
|
|
8
9
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
|
|
9
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-
|
|
10
|
-
import {
|
|
11
|
-
import { $ as $
|
|
12
|
-
import { useRef, cloneElement } from "react";
|
|
10
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$dca12b0bb56e4fc } from "../../ListBox-ByPsaVVK.js";
|
|
11
|
+
import { g as getGroupedOptions, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-HdRrpnhs.js";
|
|
12
|
+
import { $ as $e1995378a142960e$export$fb8073518f34e6ec } from "../../SelectionManager-iru59gc4.js";
|
|
13
|
+
import { useMemo, useRef, cloneElement } from "react";
|
|
13
14
|
import { icons } from "../../icons/icons.js";
|
|
14
15
|
import "../../react-jsx-parser.min-DAh4myol.js";
|
|
15
16
|
import { Spinner } from "../../icons/spinner.js";
|
|
16
17
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
17
18
|
import { unescapeHTML } from "../../utilities/text-helpers.js";
|
|
18
|
-
import { randomId } from "../../utilities/hash.js";
|
|
19
19
|
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
20
20
|
import { c as cva } from "../../index-BHpUy2Ix.js";
|
|
21
21
|
import { TriggeredPopover } from "../popover/popover.js";
|
|
@@ -43,6 +43,7 @@ import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../useAsyncLi
|
|
|
43
43
|
* @param {Function} [props.getMeta] - Function to get the metadata for the item from the fetched data. `(item: Object<string, any>) => Object<string, any>` (optional)
|
|
44
44
|
* @param {Function} [props.getIcon] - Function to get the icon for the item from the fetched data. `(item: Object<string, any>) => JSX.Element | string`
|
|
45
45
|
* @param {Function} [props.getSubtitle] - Function to get the subtitle for the item from the fetched data. `(item: Object<string, any>) => string`
|
|
46
|
+
* @param {Function} [props.getGroup] - Function to get the group name for the item from the fetched data. `(item: Object<string, any>) => string`
|
|
46
47
|
* @param {Function} [props.getData] - Function to pre-process the fetched data before it is used in the select. `(data: Object<string, any>[]) => Object<string, any>[]`
|
|
47
48
|
* @param {Function} [props.fetchUrl] - Function to get the URL for fetching data. Provides typed search text if entered. `(searchText: string) => string`
|
|
48
49
|
* @param {Object} [props.fetchConfig] - Configuration object for the fetch request, passed to the `fetch` function.
|
|
@@ -52,6 +53,8 @@ import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../useAsyncLi
|
|
|
52
53
|
* @param {JSX.Element} [props.customValueDisplay] - If provided, replaces the default current value display of each selected item. `({ value: string, label: string, subtitle: string, metadata: any }) => JSX.Element`
|
|
53
54
|
* @param {JSX.Element} [props.customDropdownArrow] - If provided, replaces the default dropdown arrow indicator.
|
|
54
55
|
* @param {string} props.className - Classes to pass to the select menu.
|
|
56
|
+
* @param {string} [props.groupKey] - If provided, the options will be grouped by this key.
|
|
57
|
+
* @param {Object} [props.groupValueMapping] - If provided, the group headers will be mapped to these labels/icons.
|
|
55
58
|
* @param {boolean} [props.noMinWidth=false] - If `true`, the select menu will not have a minimum width.
|
|
56
59
|
* @param {boolean} [props.flat] - If `true`, component will look more flat. Useful for nested layer of controls.
|
|
57
60
|
* @param {boolean} [props.noReorder] - If `true`, the option for reordering selected items is disabled.
|
|
@@ -98,11 +101,14 @@ const AsyncMultiSelect = (props) => {
|
|
|
98
101
|
getMeta,
|
|
99
102
|
getIcon,
|
|
100
103
|
getSubtitle,
|
|
104
|
+
getGroup,
|
|
101
105
|
getData = (data) => data,
|
|
102
106
|
customMenuOption,
|
|
103
107
|
customValueDisplay,
|
|
104
108
|
customDropdownArrow,
|
|
105
109
|
className,
|
|
110
|
+
groupKey,
|
|
111
|
+
groupValueMapping,
|
|
106
112
|
flat,
|
|
107
113
|
size = "default",
|
|
108
114
|
noMinWidth = false,
|
|
@@ -121,7 +127,8 @@ const AsyncMultiSelect = (props) => {
|
|
|
121
127
|
json = processLoadedOptions ? processLoadedOptions(getData(res)) : getData(res);
|
|
122
128
|
} else {
|
|
123
129
|
const res = await fetch(fetchUrl(filterText), { ...fetchConfig, signal });
|
|
124
|
-
|
|
130
|
+
const data = await res.json();
|
|
131
|
+
json = processLoadedOptions ? processLoadedOptions(getData(data)) : getData(data);
|
|
125
132
|
}
|
|
126
133
|
const output = json?.map((item, index) => {
|
|
127
134
|
const id = getValue?.(item) ?? index;
|
|
@@ -132,6 +139,9 @@ const AsyncMultiSelect = (props) => {
|
|
|
132
139
|
if (getSubtitle) {
|
|
133
140
|
entry.subtitle = unescapeHTML(getSubtitle(item));
|
|
134
141
|
}
|
|
142
|
+
if (getGroup) {
|
|
143
|
+
entry[groupKey ?? "_group"] = getGroup(item);
|
|
144
|
+
}
|
|
135
145
|
return entry;
|
|
136
146
|
});
|
|
137
147
|
if (filterText.length > 0) {
|
|
@@ -150,6 +160,40 @@ const AsyncMultiSelect = (props) => {
|
|
|
150
160
|
};
|
|
151
161
|
}
|
|
152
162
|
});
|
|
163
|
+
const groupedItems = useMemo(
|
|
164
|
+
() => getGroupedOptions(list?.items, groupKey ?? (getGroup ? "_group" : null), groupValueMapping),
|
|
165
|
+
[list?.items, groupKey, groupValueMapping, getGroup]
|
|
166
|
+
);
|
|
167
|
+
const renderItem = (item) => {
|
|
168
|
+
let icon2 = item?.icon ?? null;
|
|
169
|
+
if (typeof item?.icon === "string") {
|
|
170
|
+
icon2 = icons?.[item.icon] ?? null;
|
|
171
|
+
}
|
|
172
|
+
if (getIcon && !icon2) {
|
|
173
|
+
icon2 = getIcon(item);
|
|
174
|
+
}
|
|
175
|
+
return /* @__PURE__ */ jsxs(
|
|
176
|
+
OptionItemBase,
|
|
177
|
+
{
|
|
178
|
+
id: item.value,
|
|
179
|
+
textValue: item.label,
|
|
180
|
+
selectIndicator: true,
|
|
181
|
+
children: [
|
|
182
|
+
customMenuOption && customMenuOption(item),
|
|
183
|
+
!customMenuOption && /* @__PURE__ */ jsx(
|
|
184
|
+
RichLabel,
|
|
185
|
+
{
|
|
186
|
+
icon: icon2,
|
|
187
|
+
label: item.label,
|
|
188
|
+
subtitle: item.subtitle,
|
|
189
|
+
noColor: true
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
item.value
|
|
195
|
+
);
|
|
196
|
+
};
|
|
153
197
|
const handleSelectionChange = (rawSelected) => {
|
|
154
198
|
let selected;
|
|
155
199
|
if (list.filterText.length > 0) {
|
|
@@ -168,7 +212,6 @@ const AsyncMultiSelect = (props) => {
|
|
|
168
212
|
selected = rawSelected;
|
|
169
213
|
}
|
|
170
214
|
list.setSelectedKeys(selected);
|
|
171
|
-
list.filterText = "";
|
|
172
215
|
if (selected === null || selected === void 0) {
|
|
173
216
|
onChange(null);
|
|
174
217
|
return;
|
|
@@ -186,14 +229,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
186
229
|
...option
|
|
187
230
|
};
|
|
188
231
|
}).filter(Boolean);
|
|
189
|
-
onChange(
|
|
190
|
-
selectedValues.map((item) => ({
|
|
191
|
-
label: item?.label,
|
|
192
|
-
value: item?.value,
|
|
193
|
-
subtitle: item?.subtitle,
|
|
194
|
-
meta: item?.meta
|
|
195
|
-
}))
|
|
196
|
-
);
|
|
232
|
+
onChange(selectedValues);
|
|
197
233
|
};
|
|
198
234
|
const ref = useRef();
|
|
199
235
|
const currentValueKeys = value?.map((item) => item?.value ?? item);
|
|
@@ -276,6 +312,13 @@ const AsyncMultiSelect = (props) => {
|
|
|
276
312
|
selectionMode: "multiple",
|
|
277
313
|
isDisabled: disabled,
|
|
278
314
|
value: currentValueKeys ?? [],
|
|
315
|
+
onOpenChange: (isOpen) => {
|
|
316
|
+
if (!isOpen) {
|
|
317
|
+
setTimeout(() => {
|
|
318
|
+
list.setFilterText("");
|
|
319
|
+
}, 100);
|
|
320
|
+
}
|
|
321
|
+
},
|
|
279
322
|
onChange: (selected) => handleSelectionChange(selected),
|
|
280
323
|
placeholder,
|
|
281
324
|
...rest,
|
|
@@ -463,7 +506,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
463
506
|
placeholder: __("Search...", "eightshift-ui-components"),
|
|
464
507
|
className: clsx(
|
|
465
508
|
"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",
|
|
466
|
-
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
|
|
509
|
+
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl! es:border-none!",
|
|
467
510
|
"es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
|
|
468
511
|
"es:text-accent-950 es:placeholder:text-accent-700/50",
|
|
469
512
|
"es:transition"
|
|
@@ -473,6 +516,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
473
516
|
/* @__PURE__ */ jsx(
|
|
474
517
|
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
475
518
|
{
|
|
519
|
+
slot: "clear",
|
|
476
520
|
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
477
521
|
className: clsx(
|
|
478
522
|
"es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent",
|
|
@@ -486,11 +530,10 @@ const AsyncMultiSelect = (props) => {
|
|
|
486
530
|
}
|
|
487
531
|
),
|
|
488
532
|
list.isLoading && /* @__PURE__ */ jsx("div", { className: "es:p-3 es:min-h-16 es:flex es:items-center es:justify-center", children: /* @__PURE__ */ jsx(Spinner, {}) }),
|
|
489
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ jsxs(
|
|
490
534
|
$eed445e0843c11d0$export$41f133550aa26f48,
|
|
491
535
|
{
|
|
492
536
|
className: clsx("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", list?.isLoading && "es:hidden"),
|
|
493
|
-
items: list?.items ?? [],
|
|
494
537
|
selectedKeys: list.selectedKeys,
|
|
495
538
|
selectionMode: "multiple",
|
|
496
539
|
selectionBehavior: "toggle",
|
|
@@ -508,34 +551,29 @@ const AsyncMultiSelect = (props) => {
|
|
|
508
551
|
noColor: true
|
|
509
552
|
}
|
|
510
553
|
),
|
|
511
|
-
children:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
icon2 = icons?.[item.icon] ?? null;
|
|
515
|
-
}
|
|
516
|
-
return /* @__PURE__ */ jsxs(
|
|
517
|
-
OptionItemBase,
|
|
554
|
+
children: [
|
|
555
|
+
groupedItems && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: groupedItems, children: (section) => /* @__PURE__ */ jsxs(
|
|
556
|
+
$eed445e0843c11d0$export$dca12b0bb56e4fc,
|
|
518
557
|
{
|
|
519
|
-
id:
|
|
520
|
-
className:
|
|
521
|
-
selectIndicator: true,
|
|
558
|
+
id: section.key,
|
|
559
|
+
className: "es:flex es:flex-col es:gap-0.75",
|
|
522
560
|
children: [
|
|
523
|
-
|
|
524
|
-
!customMenuOption && /* @__PURE__ */ jsx(
|
|
561
|
+
/* @__PURE__ */ jsx($72a5793c14baf454$export$8b251419efc915eb, { className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none", children: /* @__PURE__ */ jsx(
|
|
525
562
|
RichLabel,
|
|
526
563
|
{
|
|
527
|
-
icon:
|
|
528
|
-
label:
|
|
529
|
-
subtitle:
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
noColor: true
|
|
564
|
+
icon: section?.icon,
|
|
565
|
+
label: section?.label,
|
|
566
|
+
subtitle: section?.subtitle,
|
|
567
|
+
endIcon: section?.endIcon,
|
|
568
|
+
fullWidth: true
|
|
533
569
|
}
|
|
534
|
-
)
|
|
570
|
+
) }),
|
|
571
|
+
/* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: section.options, children: (item) => renderItem(item) })
|
|
535
572
|
]
|
|
536
573
|
}
|
|
537
|
-
)
|
|
538
|
-
|
|
574
|
+
) }),
|
|
575
|
+
!groupedItems && /* @__PURE__ */ jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: list.items ?? [], children: (item) => renderItem(item) })
|
|
576
|
+
]
|
|
539
577
|
}
|
|
540
578
|
)
|
|
541
579
|
]
|