@eightshift/ui-components 1.7.1 → 1.8.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.
Files changed (112) hide show
  1. package/dist/{Button-VbCAu4hd.js → Button-Xa6Ny0p_.js} +7 -7
  2. package/dist/{Color-BpLubxWI.js → Color-VsesNqCf.js} +5 -17
  3. package/dist/{ColorSwatch-CinC14s3.js → ColorSwatch-xOFAZO_h.js} +4 -4
  4. package/dist/ComboBox-CP_SqnqT.js +1886 -0
  5. package/dist/Dialog-jcIYer1n.js +2177 -0
  6. package/dist/{FieldError-BttM1Nxd.js → FieldError-BPe3YgNH.js} +2 -2
  7. package/dist/{FocusScope-CtCX0OGo.js → FocusScope-uV-xoRHT.js} +8 -9
  8. package/dist/{Group-XzWUooix.js → Group-Bvmb49y7.js} +5 -5
  9. package/dist/{Heading-DZelepHV.js → Heading-Bfhyr4ZC.js} +1 -1
  10. package/dist/{Hidden-CcFqOzrp.js → Hidden-7ZhNuLM9.js} +2 -2
  11. package/dist/{Input-CV1qVS6t.js → Input-C2dTSp9z.js} +10 -10
  12. package/dist/{Label-BwqMVkuV.js → Label-DqNX_sAU.js} +2 -2
  13. package/dist/{List-Bx2anbX-.js → List-C7L49CxW.js} +1 -1
  14. package/dist/{ListBox-DuZPdnkk.js → ListBox-B9r1QoSm.js} +19 -18
  15. package/dist/{NumberFormatter-U_Gx0UDq.js → NumberFormatter-DA8u1Ot7.js} +4 -6
  16. package/dist/OverlayArrow-ClRhYjQu.js +567 -0
  17. package/dist/{Select-c7902d94.esm-DtzFQzf-.js → Select-aab027f3.esm-B8nEum75.js} +4 -4
  18. package/dist/{SelectionManager-x27KqnAT.js → SelectionManager-DP537Pbu.js} +177 -141
  19. package/dist/{Separator-BM58t3PP.js → Separator-Dmxzf3m_.js} +62 -52
  20. package/dist/{Slider-D9Cs6yKr.js → Slider-BgHBCyI7.js} +16 -14
  21. package/dist/{Text-BVIXT8qq.js → Text-DImhB4rT.js} +1 -1
  22. package/dist/{VisuallyHidden-WhC7vZaL.js → VisuallyHidden-wryJF4qQ.js} +2 -2
  23. package/dist/assets/style.css +1 -1
  24. package/dist/assets/wp-ui-enhancements.css +1 -1
  25. package/dist/components/animated-visibility/animated-visibility.js +141 -113
  26. package/dist/components/base-control/base-control.js +1 -1
  27. package/dist/components/button/button.js +10 -7
  28. package/dist/components/checkbox/checkbox.js +19 -11
  29. package/dist/components/color-pickers/color-picker.js +1 -1
  30. package/dist/components/color-pickers/color-swatch.js +3 -3
  31. package/dist/components/color-pickers/gradient-editor.js +2 -2
  32. package/dist/components/color-pickers/solid-color-picker.js +21 -21
  33. package/dist/components/component-toggle/component-toggle.js +1 -1
  34. package/dist/components/draggable/draggable-handle.js +2 -2
  35. package/dist/components/draggable/draggable.js +2 -2
  36. package/dist/components/draggable-list/draggable-list-item.js +2 -2
  37. package/dist/components/draggable-list/draggable-list.js +2 -2
  38. package/dist/components/expandable/expandable.js +3 -3
  39. package/dist/components/index.js +8 -4
  40. package/dist/components/input-field/input-field.js +7 -7
  41. package/dist/components/item-collection/item-collection.js +1 -1
  42. package/dist/components/link-input/link-input.js +10 -1872
  43. package/dist/components/list-box/list-box.js +2 -2
  44. package/dist/components/matrix-align/matrix-align.js +2 -2
  45. package/dist/components/menu/menu.js +7 -974
  46. package/dist/components/modal/modal.js +7 -7
  47. package/dist/components/number-picker/number-picker.js +10 -10
  48. package/dist/components/option-select/option-select.js +1 -1
  49. package/dist/components/options-panel/options-panel.js +1 -1
  50. package/dist/components/placeholders/file-placeholder.js +1 -1
  51. package/dist/components/popover/popover.js +2 -2
  52. package/dist/components/radio/radio.js +13 -13
  53. package/dist/components/repeater/repeater-item.js +1 -1
  54. package/dist/components/repeater/repeater.js +2 -2
  55. package/dist/components/responsive/mini-responsive.js +3 -3
  56. package/dist/components/responsive/responsive-legacy.js +2 -2
  57. package/dist/components/responsive/responsive.js +2 -2
  58. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  59. package/dist/components/select/async-multi-select.js +3 -3
  60. package/dist/components/select/async-single-select.js +2 -2
  61. package/dist/components/select/custom-select-default-components.js +1 -1
  62. package/dist/components/select/multi-select-components.js +1 -1
  63. package/dist/components/select/multi-select.js +3 -3
  64. package/dist/components/select/react-select-component-wrappers.js +1 -1
  65. package/dist/components/select/single-select.js +2 -2
  66. package/dist/components/select/v2/async-select.js +307 -0
  67. package/dist/components/select/v2/shared.js +24 -0
  68. package/dist/components/select/v2/single-select.js +993 -0
  69. package/dist/components/slider/column-config-slider.js +3 -3
  70. package/dist/components/slider/slider.js +3 -3
  71. package/dist/components/slider/utils.js +1 -1
  72. package/dist/components/tabs/tabs.js +16 -16
  73. package/dist/components/toggle/switch.js +6 -6
  74. package/dist/components/toggle/toggle.js +1 -1
  75. package/dist/components/toggle-button/toggle-button.js +55 -12
  76. package/dist/components/tooltip/tooltip.js +532 -8
  77. package/dist/{context-Cs-ZD1nu.js → context-BI3VdU0Z.js} +2 -2
  78. package/dist/{default-i18n-DRnM8y4w.js → default-i18n-CM1-Xvzf.js} +183 -176
  79. package/dist/{focusSafely-CgFLw4FA.js → focusSafely-Cl9cN7Qx.js} +14 -14
  80. package/dist/icons/icons.js +171 -1
  81. package/dist/icons/jsx-svg.js +16 -3
  82. package/dist/{index-a301f526.esm-BMg114iK.js → index-641ee5b8.esm-BclOH4xf.js} +165 -29
  83. package/dist/{index-BTCzc3zb.js → index-D0mHceYg.js} +81 -17
  84. package/dist/index.js +7 -3
  85. package/dist/{multi-select-components-DTvEidE3.js → multi-select-components-BGQBvx-z.js} +55 -44
  86. package/dist/{react-jsx-parser.min-B5HVwW_W.js → react-jsx-parser.min-CVit0rZn.js} +5620 -7409
  87. package/dist/{react-select-async.esm-CxA8wpeT.js → react-select-async.esm-B8kK0aL4.js} +3 -3
  88. package/dist/{react-select.esm-CeE7o5M9.js → react-select.esm-ucYwBxq5.js} +3 -3
  89. package/dist/{textSelection-CvK0YHTZ.js → textSelection-DDDNsS-g.js} +1 -1
  90. package/dist/{useButton-Cy9eEev7.js → useButton-CRKy9xk2.js} +4 -4
  91. package/dist/{useEvent-LZebwyrb.js → useEvent-D54lIBrO.js} +1 -1
  92. package/dist/{useFocusRing-BMOTWmOx.js → useFocusRing-DKxoCzVD.js} +1 -1
  93. package/dist/{useFocusable-ByyKSVQv.js → useFocusable-CPKTGWPn.js} +4 -4
  94. package/dist/{useFormReset-B8m1uz1J.js → useFormReset-CTp--h9B.js} +1 -1
  95. package/dist/{useFormValidationState-BjMhz_VI.js → useFormValidation-BNBrliSj.js} +92 -88
  96. package/dist/{useLabel-B6uO0wVK.js → useLabel-CzGdEzIq.js} +2 -2
  97. package/dist/{useLabels-5dFkeiXx.js → useLabels-eGSmZC_Z.js} +1 -1
  98. package/dist/{useListState-eKxv7HPC.js → useListState-D7mE1Y00.js} +1 -1
  99. package/dist/{useLocalizedStringFormatter-BaKmjFNp.js → useLocalizedStringFormatter-BBeUyA9l.js} +1 -1
  100. package/dist/{useNumberField-DMMUTZ-h.js → useNumberField-BmEJmL3K.js} +27 -20
  101. package/dist/{useNumberFormatter-Cyx5Dxkf.js → useNumberFormatter-CTY_UZxq.js} +2 -2
  102. package/dist/{usePress-D8nPoIQm.js → usePress-BG9At5Lb.js} +4 -4
  103. package/dist/{useSingleSelectListState-CABciySJ.js → useSingleSelectListState-DeJEr7lC.js} +2 -2
  104. package/dist/{useToggle-BmltE9Zr.js → useToggle-QlyoyPYv.js} +4 -4
  105. package/dist/{useToggleState-DZXLEnA_.js → useToggleState-C1mnFRiI.js} +1 -1
  106. package/dist/utilities/text-helpers.js +6 -0
  107. package/dist/{utils-BCJajCwh.js → utils-BSxcP7tv.js} +15 -14
  108. package/package.json +20 -20
  109. package/dist/Dialog-BN5EE7UH.js +0 -934
  110. package/dist/isScrollable-Dh9D9IOd.js +0 -9
  111. package/dist/tooltip-eKaARDoV.js +0 -1084
  112. package/dist/useMenuTrigger-4fwEmto8.js +0 -246
@@ -1,15 +1,15 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { c as $a11501f3d1d39e6c$export$ea8f71083e90600f, d as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, e as $337b884510726a0d$export$14c98a7594375490, f as $5e3802645cc19319$export$1c3ebcada18427bf, g as $de32f1b87079253c$export$d2f961adcb0afbe, h as $337b884510726a0d$export$c6fdb837b070b4ff, i as $86ea4cb521eb2e37$export$2317d149ed6f78c4, b as $de32f1b87079253c$export$2e1e1122cf0cba88, a as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-BN5EE7UH.js";
3
- import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-DZelepHV.js";
4
- import { d as $b5e257d569688ac6$export$535bd6ca7f90a273, c as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, o as $64fa3d84918910a7$export$45fda7c47f93fd48, p as $64fa3d84918910a7$export$6d3443f2c48bfc20, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, m as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-BCJajCwh.js";
2
+ import { g as $a11501f3d1d39e6c$export$ea8f71083e90600f, h as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, i as $337b884510726a0d$export$14c98a7594375490, j as $5e3802645cc19319$export$1c3ebcada18427bf, k as $de32f1b87079253c$export$d2f961adcb0afbe, l as $337b884510726a0d$export$c6fdb837b070b4ff, m as $86ea4cb521eb2e37$export$2317d149ed6f78c4, f as $de32f1b87079253c$export$2e1e1122cf0cba88, e as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-jcIYer1n.js";
3
+ import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-Bfhyr4ZC.js";
4
+ import { e as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, m as $df56164dff5785e2$export$4338b53315abf666, o as $64fa3d84918910a7$export$45fda7c47f93fd48, p as $64fa3d84918910a7$export$6d3443f2c48bfc20, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, n as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-BSxcP7tv.js";
5
5
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
6
6
  import React__default, { useState, useEffect, forwardRef, useContext, useRef, useMemo, createContext } from "react";
7
- import { $ as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../../tooltip-eKaARDoV.js";
7
+ import { $ as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../../OverlayArrow-ClRhYjQu.js";
8
8
  import { Button } from "../button/button.js";
9
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
9
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
10
10
  import { c as clsx } from "../../lite-DVmmD_-j.js";
11
11
  import { icons } from "../../icons/icons.js";
12
- import "../../react-jsx-parser.min-B5HVwW_W.js";
12
+ import "../../react-jsx-parser.min-CVit0rZn.js";
13
13
  import { HStack } from "../layout/hstack.js";
14
14
  let $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
15
15
  function $5df64b3807dc15ee$export$d699905dd57c73ca() {
@@ -52,7 +52,7 @@ function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
52
52
  });
53
53
  $337b884510726a0d$export$14c98a7594375490();
54
54
  useEffect(() => {
55
- if (state.isOpen) return $5e3802645cc19319$export$1c3ebcada18427bf([
55
+ if (state.isOpen && ref.current) return $5e3802645cc19319$export$1c3ebcada18427bf([
56
56
  ref.current
57
57
  ]);
58
58
  }, [
@@ -1,17 +1,17 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { forwardRef, useRef, createContext, useState, cloneElement } from "react";
3
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
4
- import { $ as $a049562f99e7db0e$export$f9c6924e160136d1, a as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-XzWUooix.js";
5
- import { $ as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CV1qVS6t.js";
6
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BwqMVkuV.js";
7
- import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-VbCAu4hd.js";
8
- import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-BCJajCwh.js";
9
- import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BttM1Nxd.js";
3
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
4
+ import { a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-Bvmb49y7.js";
5
+ import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-C2dTSp9z.js";
6
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DqNX_sAU.js";
7
+ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-Xa6Ny0p_.js";
8
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-BSxcP7tv.js";
9
+ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BPe3YgNH.js";
10
10
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
11
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-BVIXT8qq.js";
11
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-DImhB4rT.js";
12
12
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
13
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-Cs-ZD1nu.js";
14
- import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-DMMUTZ-h.js";
13
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BI3VdU0Z.js";
14
+ import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-BmEJmL3K.js";
15
15
  import { Button } from "../button/button.js";
16
16
  import { icons } from "../../icons/icons.js";
17
17
  import { c as clsx } from "../../lite-DVmmD_-j.js";
@@ -7,7 +7,7 @@ import { Menu, MenuSeparator, MenuItem } from "../menu/menu.js";
7
7
  import { RadioButtonGroup, RadioButton } from "../radio/radio.js";
8
8
  import { RichLabel } from "../rich-label/rich-label.js";
9
9
  import { ToggleButton } from "../toggle-button/toggle-button.js";
10
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
10
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
11
11
  /**
12
12
  * A component that allows the user to select an option from a list of options.
13
13
  *
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../lite-DVmmD_-j.js";
3
3
  import { RichLabel } from "../rich-label/rich-label.js";
4
- import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-DZelepHV.js";
4
+ import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-Bfhyr4ZC.js";
5
5
  /**
6
6
  * Component that provides a container panel for options, with an optional title.
7
7
  * Best used within the Gutenberg sidebar, instead of the default `PanelBody` component.
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
2
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
3
3
  import { icons } from "../../icons/icons.js";
4
4
  import { RichLabel } from "../rich-label/rich-label.js";
5
5
  import { c as clsx } from "../../lite-DVmmD_-j.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, a as $de32f1b87079253c$export$3ddf2d174ce01153, b as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-BN5EE7UH.js";
2
+ import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, e as $de32f1b87079253c$export$3ddf2d174ce01153, f as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-jcIYer1n.js";
3
3
  import { c as clsx } from "../../lite-DVmmD_-j.js";
4
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
4
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
5
5
  import { Button } from "../button/button.js";
6
6
  /**
7
7
  * A popover component.
@@ -1,20 +1,20 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BwqMVkuV.js";
3
- import { c as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4 } from "../../utils-BCJajCwh.js";
4
- import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BttM1Nxd.js";
2
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DqNX_sAU.js";
3
+ import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, m as $df56164dff5785e2$export$4338b53315abf666, n as $5dc95899b306f630$export$c9058316764c140e, i as $64fa3d84918910a7$export$ef03459518577ad4 } from "../../utils-BSxcP7tv.js";
4
+ import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BPe3YgNH.js";
5
5
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
6
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-BVIXT8qq.js";
6
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-DImhB4rT.js";
7
7
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
8
8
  import React__default, { useMemo, useState, forwardRef, createContext, cloneElement } from "react";
9
- import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidationState-BjMhz_VI.js";
10
- import { d as $9ab94262bd0047c7$export$420e68273165f4ec, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-CgFLw4FA.js";
11
- import { b as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-CtCX0OGo.js";
12
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-Cs-ZD1nu.js";
13
- import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-B8m1uz1J.js";
14
- import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "../../useFocusable-ByyKSVQv.js";
15
- import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-D8nPoIQm.js";
16
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-BMOTWmOx.js";
17
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-WhC7vZaL.js";
9
+ import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-BNBrliSj.js";
10
+ import { d as $9ab94262bd0047c7$export$420e68273165f4ec, e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-Cl9cN7Qx.js";
11
+ import { b as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-uV-xoRHT.js";
12
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BI3VdU0Z.js";
13
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-CTp--h9B.js";
14
+ import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "../../useFocusable-CPKTGWPn.js";
15
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-BG9At5Lb.js";
16
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-DKxoCzVD.js";
17
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-wryJF4qQ.js";
18
18
  import { c as clsx } from "../../lite-DVmmD_-j.js";
19
19
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
20
20
  import { RichLabel } from "../rich-label/rich-label.js";
@@ -5,7 +5,7 @@ import { icons } from "../../icons/icons.js";
5
5
  import { c as clsx } from "../../lite-DVmmD_-j.js";
6
6
  import { useContext } from "react";
7
7
  import { Expandable } from "../expandable/expandable.js";
8
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
8
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
9
9
  import { RepeaterContext } from "./repeater-context.js";
10
10
  /**
11
11
  * A Repeater item.
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
2
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
3
3
  import { Button } from "../button/button.js";
4
4
  import { icons } from "../../icons/icons.js";
5
5
  import { useId } from "react";
@@ -7,7 +7,7 @@ import { BaseControl } from "../base-control/base-control.js";
7
7
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
8
8
  import { RepeaterContext } from "./repeater-context.js";
9
9
  import { c as clsx } from "../../lite-DVmmD_-j.js";
10
- import { L as List, a as arrayRemove, b as arrayMove } from "../../List-Bx2anbX-.js";
10
+ import { L as List, a as arrayRemove, b as arrayMove } from "../../List-C7L49CxW.js";
11
11
  const fixIds = (items, itemIdBase) => {
12
12
  return items == null ? void 0 : items.map((item, i) => ({
13
13
  ...item,
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { cloneElement } from "react";
3
- import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
3
+ import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
4
  import { c as clsx } from "../../lite-DVmmD_-j.js";
5
- import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
5
+ import { _ as __, s as sprintf } from "../../default-i18n-CM1-Xvzf.js";
6
6
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
7
7
  import { upperFirst } from "../../utilities/es-dash.js";
8
8
  import { icons } from "../../icons/icons.js";
@@ -12,7 +12,7 @@ import { Spacer } from "../spacer/spacer.js";
12
12
  import { BaseControl } from "../base-control/base-control.js";
13
13
  import { TriggeredPopover } from "../popover/popover.js";
14
14
  import { OptionSelect } from "../option-select/option-select.js";
15
- import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-BVIXT8qq.js";
15
+ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-DImhB4rT.js";
16
16
  /**
17
17
  * A compact, inline version of `Responsive`. Allows the user to set different values for different breakpoints.
18
18
  *
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
3
+ import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
4
  import { c as clsx } from "../../lite-DVmmD_-j.js";
5
- import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
5
+ import { _ as __, s as sprintf } from "../../default-i18n-CM1-Xvzf.js";
6
6
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
7
7
  import { upperFirst } from "../../utilities/es-dash.js";
8
8
  import { icons } from "../../icons/icons.js";
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
3
+ import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
4
  import { c as clsx } from "../../lite-DVmmD_-j.js";
5
- import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
5
+ import { _ as __, s as sprintf } from "../../default-i18n-CM1-Xvzf.js";
6
6
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
7
7
  import { upperFirst } from "../../utilities/es-dash.js";
8
8
  import { icons } from "../../icons/icons.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
2
+ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
3
3
  import { upperFirst } from "../../utilities/es-dash.js";
4
4
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
5
5
  import { icons } from "../../icons/icons.js";
@@ -1,12 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- import { A as AsyncSelect$1 } from "../../react-select-async.esm-CxA8wpeT.js";
4
- import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-DTvEidE3.js";
3
+ import { A as AsyncSelect$1 } from "../../react-select-async.esm-B8kK0aL4.js";
4
+ import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-BGQBvx-z.js";
5
5
  import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
6
6
  import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
7
7
  import { BaseControl } from "../base-control/base-control.js";
8
8
  import { eightshiftSelectClasses } from "./styles.js";
9
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
9
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
10
10
  /**
11
11
  * Multi-select menu with async loading and re-ordering.
12
12
  *
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { A as AsyncSelect$1 } from "../../react-select-async.esm-CxA8wpeT.js";
2
+ import { A as AsyncSelect$1 } from "../../react-select-async.esm-B8kK0aL4.js";
3
3
  import { CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
5
  import { eightshiftSelectClasses } from "./styles.js";
6
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
6
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
7
7
  /**
8
8
  * Select menu with async loading.
9
9
  *
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import { icons } from "../../icons/icons.js";
4
4
  import { c as clsx } from "../../lite-DVmmD_-j.js";
5
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
5
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
6
6
  /**
7
7
  * Default dropdown indicator for CustomSelect.
8
8
  *
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { g, a, b } from "../../multi-select-components-DTvEidE3.js";
2
+ import { g, a, b } from "../../multi-select-components-BGQBvx-z.js";
3
3
  import "../../lite-DVmmD_-j.js";
4
4
  export {
5
5
  g as getDragEndHandler,
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- import { S as StateManagedSelect$1 } from "../../react-select.esm-CeE7o5M9.js";
4
- import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-DTvEidE3.js";
3
+ import { S as StateManagedSelect$1 } from "../../react-select.esm-ucYwBxq5.js";
4
+ import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-BGQBvx-z.js";
5
5
  import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
6
6
  import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
7
7
  import { getValue } from "./shared.js";
8
8
  import { BaseControl } from "../base-control/base-control.js";
9
9
  import { eightshiftSelectClasses } from "./styles.js";
10
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
10
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
11
11
  /**
12
12
  * Multi-select menu with re-orderable items.
13
13
  *
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
2
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
3
3
  /**
4
4
  * Custom dropdown indicator for CustomSelect.
5
5
  *
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { S as StateManagedSelect$1 } from "../../react-select.esm-CeE7o5M9.js";
2
+ import { S as StateManagedSelect$1 } from "../../react-select.esm-ucYwBxq5.js";
3
3
  import { CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
4
4
  import { getValue } from "./shared.js";
5
5
  import { BaseControl } from "../base-control/base-control.js";
6
6
  import { eightshiftSelectClasses } from "./styles.js";
7
- import { c as components } from "../../index-a301f526.esm-BMg114iK.js";
7
+ import { c as components } from "../../index-641ee5b8.esm-BclOH4xf.js";
8
8
  /**
9
9
  * Select menu.
10
10
  *
@@ -0,0 +1,307 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { _ as __ } from "../../../default-i18n-CM1-Xvzf.js";
3
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-Xa6Ny0p_.js";
4
+ import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a, b as $d01f2c01039c0eec$export$c02625b26074192c } from "../../../ComboBox-CP_SqnqT.js";
5
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-C2dTSp9z.js";
6
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-DqNX_sAU.js";
7
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-B9r1QoSm.js";
8
+ import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-jcIYer1n.js";
9
+ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-DImhB4rT.js";
10
+ import { OptionItemBase } from "./shared.js";
11
+ import { RichLabel } from "../../rich-label/rich-label.js";
12
+ import { BaseControl } from "../../base-control/base-control.js";
13
+ import { useEffect, useRef, cloneElement, useContext } from "react";
14
+ import { icons } from "../../../icons/icons.js";
15
+ import "../../../react-jsx-parser.min-CVit0rZn.js";
16
+ import { unescapeHTML } from "../../../utilities/text-helpers.js";
17
+ import { c as clsx } from "../../../utils-BSxcP7tv.js";
18
+ /**
19
+ * Select menu with async loading.
20
+ *
21
+ * @component
22
+ * @param {Object} props - Component props.
23
+ * @param {string} [props.label] - Label of the component.
24
+ * @param {string} [props.help] - Help text of the component.
25
+ * @param {string} [props.icon] - Icon of the component.
26
+ * @param {string} [props.subtitle] - Subtitle of the component.
27
+ * @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to show to the right of the label.
28
+ * @param {boolean} [props.inline] - Whether the Select menu is displayed inline with the label, to the right.
29
+ * @param {{label: string, value: string, metadata: Object<string, any>?}} props.value - Current value of the select.
30
+ * @param {Function} props.onChange - Function to call when the value changes.
31
+ * @param {boolean} [props.clearable=false] - Whether the select is clearable.
32
+ * @param {boolean} [props.noSearch=false] - Whether the search is disabled.
33
+ * @param {boolean} [props.disabled=false] - Whether the select is disabled.
34
+ * @param {boolean} [props.keepMenuOpenAfterSelect=false] - Whether the menu stays open after an select.
35
+ * @param {string} [props.placeholder] - Placeholder text to show when no value is selected.
36
+ * @param {JSX.Element} [props.customMenuOption] - If provided, replaces the default item in the dropdown menu. `({ value: string, label: string, subtitle: string, metadata: any }) => JSX.Element`
37
+ * @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`
38
+ * @param {Function} [props.processLoadedOptions] - Allows modifying (filtering, grouping, ...) options output after the items have been dynamically fetched. Must include `label`, `value`, and `id` keys in the output, additional fields can be added as required.
39
+ * @param {string} props.className - Classes to pass to the select menu.
40
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
41
+ *
42
+ * @returns {JSX.Element} The __ExperimentalAsyncSelect component.
43
+ *
44
+ * @example
45
+ * const [value, setValue] = useState(null);
46
+ *
47
+ * <__ExperimentalAsyncSelect
48
+ * label='Select items'
49
+ * fetchUrl={(searchText) => `https://api.example.com/items?q=${searchText}`}
50
+ * value={value}
51
+ * onChange={setValue}
52
+ * getLabel={(item) => item?.name}
53
+ * getValue={(item) => item?.id}
54
+ * />
55
+ *
56
+ * @preserve
57
+ */
58
+ const __ExperimentalAsyncSelect = (props) => {
59
+ const {
60
+ label,
61
+ help,
62
+ icon,
63
+ subtitle,
64
+ actions,
65
+ inline,
66
+ value,
67
+ onChange,
68
+ noSearch = false,
69
+ disabled = false,
70
+ clearable = false,
71
+ className,
72
+ placeholder,
73
+ customMenuOption,
74
+ customValueDisplay,
75
+ processLoadedOptions = (options) => options,
76
+ fetchUrl,
77
+ fetchConfig = {},
78
+ getLabel,
79
+ getValue,
80
+ getMeta,
81
+ getIcon,
82
+ getSubtitle,
83
+ getData = (data) => data,
84
+ hidden,
85
+ ...rest
86
+ } = props;
87
+ let list = $f86e6c1ec7da6ebb$export$bc3384a35de93d66({
88
+ // initialFilterText: value?.label,
89
+ async load({ signal, filterText: rawFilterText }) {
90
+ let filterText = rawFilterText.trim();
91
+ const res = await fetch(fetchUrl(filterText), { ...fetchConfig, signal });
92
+ const json = getData(await res.json());
93
+ const output = json == null ? void 0 : json.map((item) => {
94
+ const id = getValue(item);
95
+ const entry = { label: unescapeHTML(getLabel(item)), value: id };
96
+ if (getMeta) {
97
+ entry.meta = getMeta(item);
98
+ }
99
+ if (getSubtitle) {
100
+ entry.subtitle = unescapeHTML(getSubtitle(item));
101
+ }
102
+ return entry;
103
+ });
104
+ return {
105
+ items: output
106
+ };
107
+ }
108
+ });
109
+ let listItems = [...list.items];
110
+ if (value == null ? void 0 : value.value) {
111
+ const selectedIndex = listItems.findIndex((item) => item.value === (value == null ? void 0 : value.value));
112
+ if (selectedIndex === -1) {
113
+ listItems = [{ ...value }, ...listItems];
114
+ }
115
+ }
116
+ useEffect(() => {
117
+ if (list.filterText !== (value == null ? void 0 : value.label)) {
118
+ list.setFilterText(value == null ? void 0 : value.label);
119
+ }
120
+ if (!value && list.filterText) {
121
+ list.setFilterText("");
122
+ }
123
+ }, [value]);
124
+ const ref = useRef();
125
+ if (hidden) {
126
+ return null;
127
+ }
128
+ return /* @__PURE__ */ jsxs(
129
+ $d01f2c01039c0eec$export$72b9695b8216309a,
130
+ {
131
+ onSelectionChange: (selected) => {
132
+ if (selected === null || selected === void 0) {
133
+ onChange(null);
134
+ list.setFilterText("");
135
+ return;
136
+ }
137
+ if (selected === (value == null ? void 0 : value.value) || list.filterText === (value == null ? void 0 : value.label)) {
138
+ return;
139
+ }
140
+ const item = (list == null ? void 0 : list.getItem(selected)) ?? listItems.find((item2) => item2.value === selected);
141
+ if (!item) {
142
+ onChange(null);
143
+ list.setFilterText("");
144
+ return;
145
+ }
146
+ list.setFilterText(item.label);
147
+ onChange(item);
148
+ },
149
+ allowsCustomValue: false,
150
+ allowsEmptyCollection: true,
151
+ selectedKey: (value == null ? void 0 : value.value) ?? null,
152
+ inputValue: list.filterText,
153
+ onInputChange: list.setFilterText,
154
+ items: listItems,
155
+ isDisabled: disabled,
156
+ menuTrigger: "focus",
157
+ ...rest,
158
+ children: [
159
+ /* @__PURE__ */ jsx(
160
+ BaseControl,
161
+ {
162
+ icon,
163
+ label,
164
+ subtitle,
165
+ help,
166
+ actions,
167
+ labelAs: $01b77f81d0f07f68$export$b04be29aa201d4f5,
168
+ inline,
169
+ children: /* @__PURE__ */ jsxs(
170
+ "div",
171
+ {
172
+ className: clsx(
173
+ "es-uic-relative es-uic-flex es-uic-max-w-80 es-uic-items-center es-uic-gap-1 es-uic-p-1 focus-visible:es-uic-outline-none focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500/50",
174
+ "es-uic-h-9 es-uic-rounded-md es-uic-border es-uic-border-gray-300 es-uic-bg-white es-uic-text-sm es-uic-shadow-sm es-uic-transition",
175
+ "focus:es-uic-outline-none",
176
+ !inline && "es-uic-w-full",
177
+ disabled && "es-uic-select-none"
178
+ ),
179
+ ref,
180
+ children: [
181
+ /* @__PURE__ */ jsx(
182
+ $3985021b0ad6602f$export$f5b8910cec6cf069,
183
+ {
184
+ className: clsx(
185
+ "es-uic-peer es-uic-h-6 es-uic-w-full es-uic-grow es-uic-rounded-sm es-uic-p-1 es-uic-text-sm es-uic-text-transparent es-uic-transition",
186
+ "focus:es-uic-text-current focus:es-uic-outline-none",
187
+ "focus-visible:es-uic-outline-none focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500/50",
188
+ "selection:es-uic-bg-teal-500/20 selection:es-uic-text-teal-950",
189
+ disabled && "es-uic-bg-transparent es-uic-text-gray-400 selection:es-uic-bg-transparent selection:es-uic-text-transparent",
190
+ !((value == null ? void 0 : value.value) && list.filterText.length) && "es-uic-pr-6"
191
+ ),
192
+ placeholder: placeholder ?? __("Select...", "eightshift-ui-components")
193
+ }
194
+ ),
195
+ value && /* @__PURE__ */ jsxs(
196
+ "div",
197
+ {
198
+ className: clsx(
199
+ "es-uic-pointer-events-none es-uic-absolute es-uic-bottom-0 es-uic-left-2 es-uic-top-0 es-uic-my-auto es-uic-flex es-uic-select-none es-uic-items-center es-uic-overflow-hidden",
200
+ "has-[svg]:es-uic-left-1 peer-data-[focused=true]:es-uic-invisible peer-disabled:es-uic-opacity-40",
201
+ clearable ? "es-uic-right-16" : "es-uic-right-6"
202
+ ),
203
+ children: [
204
+ customValueDisplay && customValueDisplay(value),
205
+ !customValueDisplay && /* @__PURE__ */ jsx(
206
+ RichLabel,
207
+ {
208
+ icon: getIcon(value),
209
+ label: value == null ? void 0 : value.label,
210
+ subtitle: value == null ? void 0 : value.subtitle,
211
+ className: "[&_span]:es-uic-overflow-hidden [&_span]:es-uic-text-ellipsis [&_span]:es-uic-text-nowrap"
212
+ }
213
+ )
214
+ ]
215
+ }
216
+ ),
217
+ clearable && /* @__PURE__ */ jsx(ClearButton, { disabled }),
218
+ /* @__PURE__ */ jsx(
219
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
220
+ {
221
+ className: clsx(
222
+ "es-uic-group es-uic-absolute es-uic-bottom-0 es-uic-right-0 es-uic-top-0 es-uic-my-auto es-uic-size-6",
223
+ disabled ? "es-uic-text-gray-300" : "es-uic-text-gray-500"
224
+ ),
225
+ children: cloneElement(icons.dropdownCaretAlt, {
226
+ className: "es-uic-w-4 group-aria-expanded:-es-uic-scale-y-100 es-uic-transition-transform es-uic-duration-200",
227
+ "aria-hidden": true
228
+ })
229
+ }
230
+ )
231
+ ]
232
+ }
233
+ )
234
+ }
235
+ ),
236
+ /* @__PURE__ */ jsxs(
237
+ $07b14b47974efb58$export$5b6b19405a83ff9d,
238
+ {
239
+ className: clsx(
240
+ "es-uic-flex es-uic-w-80 es-uic-min-w-9 es-uic-max-w-80 es-uic-flex-col es-uic-overflow-x-hidden es-uic-rounded-md es-uic-border es-uic-border-gray-200 es-uic-bg-white es-uic-text-sm es-uic-shadow-lg",
241
+ "focus:es-uic-outline-none",
242
+ "entering:es-uic-animate-in entering:es-uic-fade-in-0 entering:es-uic-slide-in-from-top-3 entering:es-uic-fill-mode-forwards",
243
+ "exiting:es-uic-animate-out exiting:es-uic-fade-out-0 exiting:es-uic-slide-out-to-top-2 exiting:es-uic-fill-mode-forwards"
244
+ ),
245
+ placement: "bottom left",
246
+ triggerRef: ref,
247
+ children: [
248
+ !list.isLoading && list.items.length > 0 && /* @__PURE__ */ jsx($eed445e0843c11d0$export$41f133550aa26f48, { className: "es-uic-space-y-0.5 es-uic-p-1 focus:es-uic-outline-none", children: (item) => {
249
+ return /* @__PURE__ */ jsxs(
250
+ OptionItemBase,
251
+ {
252
+ id: item.value,
253
+ className: item == null ? void 0 : item.className,
254
+ children: [
255
+ customMenuOption && customMenuOption(item),
256
+ !customMenuOption && /* @__PURE__ */ jsx(
257
+ RichLabel,
258
+ {
259
+ icon: (item == null ? void 0 : item.icon) ?? getIcon(item),
260
+ label: item == null ? void 0 : item.label,
261
+ subtitle: item.subtitle
262
+ }
263
+ )
264
+ ]
265
+ }
266
+ );
267
+ } }),
268
+ list.isLoading && cloneElement(icons.loader, { className: "es-uic-mx-auto es-uic-my-4 es-uic-animate-spin es-uic-size-5.5 es-uic-text-teal-700" }),
269
+ !list.isLoading && list.items.length === 0 && /* @__PURE__ */ jsx("div", { className: "es-uic-flex es-uic-p-2", children: /* @__PURE__ */ jsxs(
270
+ $514c0188e459b4c0$export$5f1af8db9871e1d6,
271
+ {
272
+ slot: "errorMessage",
273
+ className: clsx("es-uic-flex es-uic-w-full es-uic-items-center es-uic-gap-1 es-uic-rounded es-uic-text-amber-950"),
274
+ children: [
275
+ icons.searchEmpty,
276
+ __("Nothing found", "eightshift-ui-components")
277
+ ]
278
+ }
279
+ ) })
280
+ ]
281
+ }
282
+ )
283
+ ]
284
+ }
285
+ );
286
+ };
287
+ const ClearButton = ({ disabled }) => {
288
+ const state = useContext($d01f2c01039c0eec$export$c02625b26074192c);
289
+ const isEmpty = (state == null ? void 0 : state.selectedKey) === null || (state == null ? void 0 : state.inputValue) === "";
290
+ return /* @__PURE__ */ jsx(
291
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
292
+ {
293
+ "aria-label": __("Clear value", "eightshift-ui-components"),
294
+ className: clsx(
295
+ "es-uic-mr-7 es-uic-flex es-uic-h-6 es-uic-w-8 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-text-sm es-uic-text-gray-600 es-uic-transition hover:es-uic-bg-red-50 hover:es-uic-text-red-900 focus:es-uic-outline-none focus:es-uic-ring focus:es-uic-ring-teal-500/50 disabled:es-uic-text-gray-300",
296
+ isEmpty ? "es-uic-hidden" : "es-uic-flex"
297
+ ),
298
+ onPress: () => state == null ? void 0 : state.setSelectedKey(null),
299
+ slot: null,
300
+ isDisabled: disabled || isEmpty,
301
+ children: icons.clearAlt
302
+ }
303
+ );
304
+ };
305
+ export {
306
+ __ExperimentalAsyncSelect
307
+ };