@eightshift/ui-components 5.0.0 → 5.0.2

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 (144) hide show
  1. package/dist/Button-BpwTmkAe.js +185 -0
  2. package/dist/Collection-n5d0zIgb.js +2398 -0
  3. package/dist/Color-lVhk8V_G.js +2452 -0
  4. package/dist/ColorSwatch-DntWEAC3.js +64 -0
  5. package/dist/ComboBox-BJpTEATT.js +1915 -0
  6. package/dist/Dialog-O9uw63D7.js +2317 -0
  7. package/dist/FieldError-DHrSdE_Q.js +42 -0
  8. package/dist/FocusScope-BEPI2m7u.js +831 -0
  9. package/dist/Form-Cq3fu75_.js +5 -0
  10. package/dist/Group-DDPhPPTQ.js +48 -0
  11. package/dist/Heading-ba38ScjJ.js +16 -0
  12. package/dist/Hidden-rE6uR-lr.js +41 -0
  13. package/dist/Input-BmDS8Juy.js +133 -0
  14. package/dist/Label-JS_ob-kh.js +17 -0
  15. package/dist/List-CZMUbkFU.js +593 -0
  16. package/dist/ListBox-BTxlCGcc.js +664 -0
  17. package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
  18. package/dist/OverlayArrow-5aDgmImj.js +637 -0
  19. package/dist/RSPContexts-2lR5GG9p.js +14 -0
  20. package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
  21. package/dist/Separator-CaTBkETC.js +332 -0
  22. package/dist/Slider-C-S1oEH9.js +853 -0
  23. package/dist/Text-BuJgePCv.js +16 -0
  24. package/dist/VisuallyHidden-BYi0pekx.js +48 -0
  25. package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
  26. package/dist/assets/index.css +57 -0
  27. package/dist/assets/style-admin.css +5908 -0
  28. package/dist/assets/style-editor.css +5908 -0
  29. package/dist/assets/style.css +5914 -0
  30. package/dist/assets/wp-font-enhancements.css +8 -0
  31. package/dist/assets/wp-ui-enhancements.css +396 -0
  32. package/dist/components/animated-visibility/animated-visibility.js +105 -0
  33. package/dist/components/base-control/base-control.js +86 -0
  34. package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
  35. package/dist/components/button/button.js +387 -0
  36. package/dist/components/checkbox/checkbox.js +323 -0
  37. package/dist/components/color-pickers/color-picker.js +272 -0
  38. package/dist/components/color-pickers/color-swatch.js +59 -0
  39. package/dist/components/color-pickers/gradient-editor.js +534 -0
  40. package/dist/components/color-pickers/solid-color-picker.js +1567 -0
  41. package/dist/components/component-toggle/component-toggle.js +161 -0
  42. package/dist/components/container-panel/container-panel.js +131 -0
  43. package/dist/components/draggable/draggable-context.js +5 -0
  44. package/dist/components/draggable/draggable-handle.js +46 -0
  45. package/dist/components/draggable/draggable.js +7320 -0
  46. package/dist/components/draggable-list/draggable-list-context.js +5 -0
  47. package/dist/components/draggable-list/draggable-list-item.js +77 -0
  48. package/dist/components/draggable-list/draggable-list.js +151 -0
  49. package/dist/components/expandable/expandable.js +342 -0
  50. package/dist/components/index.js +137 -0
  51. package/dist/components/input-field/input-field.js +231 -0
  52. package/dist/components/item-collection/item-collection.js +59 -0
  53. package/dist/components/layout/hstack.js +30 -0
  54. package/dist/components/layout/vstack.js +30 -0
  55. package/dist/components/link-input/link-input.js +284 -0
  56. package/dist/components/matrix-align/matrix-align.js +134 -0
  57. package/dist/components/menu/menu.js +285 -0
  58. package/dist/components/modal/modal.js +305 -0
  59. package/dist/components/notice/notice.js +123 -0
  60. package/dist/components/number-picker/number-picker.js +292 -0
  61. package/dist/components/option-select/option-select.js +264 -0
  62. package/dist/components/options-panel/options-panel.js +158 -0
  63. package/dist/components/placeholders/file-placeholder.js +42 -0
  64. package/dist/components/placeholders/image-placeholder.js +88 -0
  65. package/dist/components/placeholders/media-placeholder.js +63 -0
  66. package/dist/components/popover/popover.js +207 -0
  67. package/dist/components/radio/radio.js +582 -0
  68. package/dist/components/repeater/repeater-context.js +5 -0
  69. package/dist/components/repeater/repeater-item.js +119 -0
  70. package/dist/components/repeater/repeater.js +280 -0
  71. package/dist/components/responsive/mini-responsive.js +498 -0
  72. package/dist/components/responsive/responsive-legacy.js +343 -0
  73. package/dist/components/responsive/responsive.js +583 -0
  74. package/dist/components/responsive-preview/responsive-preview.js +123 -0
  75. package/dist/components/rich-label/rich-label.js +66 -0
  76. package/dist/components/select/async-multi-select.js +157 -0
  77. package/dist/components/select/async-single-select.js +137 -0
  78. package/dist/components/select/custom-select-default-components.js +38 -0
  79. package/dist/components/select/multi-select-components.js +8 -0
  80. package/dist/components/select/multi-select.js +151 -0
  81. package/dist/components/select/react-select-component-wrappers.js +90 -0
  82. package/dist/components/select/shared.js +26 -0
  83. package/dist/components/select/single-select.js +131 -0
  84. package/dist/components/select/styles.js +49 -0
  85. package/dist/components/select/v2/async-select.js +297 -0
  86. package/dist/components/select/v2/shared.js +24 -0
  87. package/dist/components/select/v2/single-select.js +1004 -0
  88. package/dist/components/slider/column-config-slider.js +210 -0
  89. package/dist/components/slider/slider.js +345 -0
  90. package/dist/components/slider/utils.js +94 -0
  91. package/dist/components/spacer/spacer.js +97 -0
  92. package/dist/components/tabs/tabs.js +703 -0
  93. package/dist/components/toggle/switch.js +156 -0
  94. package/dist/components/toggle/toggle.js +64 -0
  95. package/dist/components/toggle-button/toggle-button.js +343 -0
  96. package/dist/components/tooltip/tooltip.js +527 -0
  97. package/dist/context-BbYZoHvX.js +92 -0
  98. package/dist/default-i18n-CT_oS1Fy.js +922 -0
  99. package/dist/filterDOMProps-EDDcM64A.js +28 -0
  100. package/dist/icons/block-icon.js +42 -0
  101. package/dist/icons/generic-color-swatch.js +113 -0
  102. package/dist/icons/icons.js +30495 -0
  103. package/dist/icons/index.js +11 -0
  104. package/dist/icons/jsx-svg.js +50 -0
  105. package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
  106. package/dist/index-BljRBEr_.js +44 -0
  107. package/dist/index-CFozsmNS.js +28321 -0
  108. package/dist/index.js +139 -0
  109. package/dist/lite-DVmmD_-j.js +7 -0
  110. package/dist/modifiers.esm-BuJQPI1X.js +31 -0
  111. package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
  112. package/dist/number-GajL10e1.js +36 -0
  113. package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
  114. package/dist/react-select-async.esm-D937XTWW.js +107 -0
  115. package/dist/react-select.esm-Ciai3aKf.js +15 -0
  116. package/dist/style-admin.js +1 -0
  117. package/dist/style-editor.js +1 -0
  118. package/dist/style.js +1 -0
  119. package/dist/textSelection-8DpK8fJl.js +46 -0
  120. package/dist/useButton-Bt3BffJm.js +50 -0
  121. package/dist/useEvent-ICdlokG-.js +23 -0
  122. package/dist/useFocusRing-Bv0UJQl8.js +107 -0
  123. package/dist/useFormReset-D2YaWRIA.js +22 -0
  124. package/dist/useFormValidation-Dy0PXJg5.js +224 -0
  125. package/dist/useHover-C2SkI1Fn.js +895 -0
  126. package/dist/useLabel-BPCd5c7-.js +27 -0
  127. package/dist/useLabels-B7-lUnAF.js +23 -0
  128. package/dist/useListState-DkyH7elT.js +168 -0
  129. package/dist/useLocalizedStringFormatter-C9GO0IDB.js +121 -0
  130. package/dist/useNumberField-CU1_u8ze.js +1215 -0
  131. package/dist/useNumberFormatter-CZ9QUnRt.js +13 -0
  132. package/dist/usePress-BrJylgPR.js +688 -0
  133. package/dist/useSingleSelectListState-C4sorv2p.js +38 -0
  134. package/dist/useToggle-CDa3YAZI.js +59 -0
  135. package/dist/useToggleState-ibcBUHnB.js +19 -0
  136. package/dist/utilities/array-helpers.js +56 -0
  137. package/dist/utilities/debounce-throttle.js +123 -0
  138. package/dist/utilities/es-dash.js +382 -0
  139. package/dist/utilities/index.js +27 -0
  140. package/dist/utilities/text-helpers.js +136 -0
  141. package/dist/utils-CZt7LCbO.js +403 -0
  142. package/dist/wp/wp-font-enhancements.js +1 -0
  143. package/dist/wp/wp-ui-enhancements.js +1 -0
  144. package/package.json +24 -24
@@ -0,0 +1,297 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { _ as __ } from "../../../default-i18n-CT_oS1Fy.js";
3
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BpwTmkAe.js";
4
+ import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a, b as $d01f2c01039c0eec$export$c02625b26074192c } from "../../../ComboBox-BJpTEATT.js";
5
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-BmDS8Juy.js";
6
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-JS_ob-kh.js";
7
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-BTxlCGcc.js";
8
+ import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-O9uw63D7.js";
9
+ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-BuJgePCv.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-DZCiis5V.js";
16
+ import { unescapeHTML } from "../../../utilities/text-helpers.js";
17
+ import { c as clsx } from "../../../utils-CZt7LCbO.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:relative es:flex es:max-w-80 es:items-center es:gap-1 es:p-1 es:focus-visible:outline-hidden es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
174
+ "es:h-9 es:rounded-lg es:border es:border-secondary-300 es:bg-white es:text-sm es:shadow-xs es:transition",
175
+ "es:any-focus:outline-hidden",
176
+ !inline && "es:w-full",
177
+ disabled && "es:select-none",
178
+ "es:has-[[aria-haspopup=listbox][data-focus-visible=true],[aria-autocomplete=list][data-focus-visible=true]]:border-accent-500 es:has-[[aria-haspopup=listbox][data-focus-visible=true],[aria-autocomplete=list][data-focus-visible=true]]:ring-2 es:has-[[aria-haspopup=listbox][data-focus-visible=true],[aria-autocomplete=list][data-focus-visible=true]]:ring-accent-500/50"
179
+ ),
180
+ ref,
181
+ children: [
182
+ /* @__PURE__ */ jsx(
183
+ $3985021b0ad6602f$export$f5b8910cec6cf069,
184
+ {
185
+ className: clsx(
186
+ "es:peer es:h-6 es:w-full es:grow es:rounded-sm es:p-1 es:pr-6 es:text-sm es:text-transparent es:transition",
187
+ "es:focus:text-current es:any-focus:outline-hidden",
188
+ "es:selection:bg-accent-500/20 es:selection:text-accent-950",
189
+ disabled && "es:bg-transparent es:text-secondary-400 es:selection:bg-transparent es:selection:text-transparent"
190
+ ),
191
+ placeholder: placeholder ?? __("Select...", "eightshift-ui-components")
192
+ }
193
+ ),
194
+ value && /* @__PURE__ */ jsxs(
195
+ "div",
196
+ {
197
+ className: clsx(
198
+ "es:pointer-events-none es:absolute es:bottom-0 es:left-2 es:top-0 es:my-auto es:flex es:select-none es:items-center es:overflow-hidden",
199
+ "es:has-[svg]:left-1 es:peer-data-[focused=true]:invisible es:peer-disabled:opacity-40",
200
+ clearable ? "es:right-16" : "es:right-6"
201
+ ),
202
+ children: [
203
+ customValueDisplay && customValueDisplay(value),
204
+ !customValueDisplay && /* @__PURE__ */ jsx(
205
+ RichLabel,
206
+ {
207
+ icon: getIcon(value),
208
+ label: value == null ? void 0 : value.label,
209
+ subtitle: value == null ? void 0 : value.subtitle,
210
+ className: "es:[&_span]:overflow-hidden es:[&_span]:text-ellipsis es:[&_span]:text-nowrap"
211
+ }
212
+ )
213
+ ]
214
+ }
215
+ ),
216
+ clearable && /* @__PURE__ */ jsx(ClearButton, { disabled }),
217
+ /* @__PURE__ */ jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: clsx("es:group es:absolute es:bottom-0 es:right-0 es:top-0 es:my-auto es:size-6", disabled ? "es:text-secondary-300" : "es:text-secondary-500"), children: cloneElement(icons.dropdownCaretAlt, {
218
+ className: "es:w-4 es:group-aria-expanded:-scale-y-100 es:transition-transform es:duration-200",
219
+ "aria-hidden": true
220
+ }) })
221
+ ]
222
+ }
223
+ )
224
+ }
225
+ ),
226
+ /* @__PURE__ */ jsxs(
227
+ $07b14b47974efb58$export$5b6b19405a83ff9d,
228
+ {
229
+ className: ({ isEntering, isExiting }) => clsx(
230
+ "es:flex es:w-80 es:min-w-9 es:max-w-80 es:flex-col es:overflow-x-hidden es:rounded-lg es:border es:border-secondary-200 es:bg-white es:text-sm es:shadow-lg",
231
+ "es:any-focus:outline-hidden",
232
+ isEntering && "es:motion-safe:motion-preset-slide-down-sm es:motion-safe:motion-duration-300 es:motion-reduce:motion-preset-fade-md",
233
+ isExiting && "es:not-motion-reduce:motion-translate-y-out-[-2.5%] es:motion-opacity-out-0 es:motion-duration-200"
234
+ ),
235
+ placement: "bottom left",
236
+ triggerRef: ref,
237
+ children: [
238
+ !list.isLoading && list.items.length > 0 && /* @__PURE__ */ jsx($eed445e0843c11d0$export$41f133550aa26f48, { className: "es:space-y-0.5 es:p-1 es:any-focus:outline-hidden", children: (item) => {
239
+ return /* @__PURE__ */ jsxs(
240
+ OptionItemBase,
241
+ {
242
+ id: item.value,
243
+ className: item == null ? void 0 : item.className,
244
+ children: [
245
+ customMenuOption && customMenuOption(item),
246
+ !customMenuOption && /* @__PURE__ */ jsx(
247
+ RichLabel,
248
+ {
249
+ icon: (item == null ? void 0 : item.icon) ?? getIcon(item),
250
+ label: item == null ? void 0 : item.label,
251
+ subtitle: item.subtitle
252
+ }
253
+ )
254
+ ]
255
+ }
256
+ );
257
+ } }),
258
+ list.isLoading && cloneElement(icons.loader, { className: "es:mx-auto es:my-4 es:animate-spin es:size-5.5 es:text-accent-700" }),
259
+ !list.isLoading && list.items.length === 0 && /* @__PURE__ */ jsx("div", { className: "es:flex es:p-2", children: /* @__PURE__ */ jsxs(
260
+ $514c0188e459b4c0$export$5f1af8db9871e1d6,
261
+ {
262
+ slot: "errorMessage",
263
+ className: clsx("es:flex es:w-full es:items-center es:gap-1 es:rounded es:text-amber-950"),
264
+ children: [
265
+ icons.searchEmpty,
266
+ __("Nothing found", "eightshift-ui-components")
267
+ ]
268
+ }
269
+ ) })
270
+ ]
271
+ }
272
+ )
273
+ ]
274
+ }
275
+ );
276
+ };
277
+ const ClearButton = ({ disabled }) => {
278
+ const state = useContext($d01f2c01039c0eec$export$c02625b26074192c);
279
+ const isEmpty = (state == null ? void 0 : state.selectedKey) === null || (state == null ? void 0 : state.inputValue) === "";
280
+ return /* @__PURE__ */ jsx(
281
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
282
+ {
283
+ "aria-label": __("Clear value", "eightshift-ui-components"),
284
+ className: clsx(
285
+ "es:mr-7 es:flex es:h-6 es:w-8 es:items-center es:justify-center es:rounded es:text-sm es:text-secondary-600 es:transition es:hover:bg-red-50 es:hover:text-red-900 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300 es:cursor-pointer",
286
+ isEmpty ? "es:hidden" : "es:flex"
287
+ ),
288
+ onPress: () => state == null ? void 0 : state.setSelectedKey(null),
289
+ slot: null,
290
+ isDisabled: disabled || isEmpty,
291
+ children: icons.clearAlt
292
+ }
293
+ );
294
+ };
295
+ export {
296
+ __ExperimentalAsyncSelect
297
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-BTxlCGcc.js";
3
+ import { c as clsx } from "../../../utils-CZt7LCbO.js";
4
+ const OptionItemBase = (props) => {
5
+ var _a;
6
+ return /* @__PURE__ */ jsx(
7
+ $eed445e0843c11d0$export$a11e76429ed99b4,
8
+ {
9
+ ...props,
10
+ textValue: (_a = props == null ? void 0 : props.value) == null ? void 0 : _a.label,
11
+ className: clsx(
12
+ "es:flex es:min-h-9 es:select-none es:items-center es:gap-1 es:rounded es:p-2 es:transition",
13
+ "es:any-focus:outline-hidden",
14
+ "es:hover:bg-secondary-100 es:hover:outline-hidden",
15
+ "selected:es:bg-accent-600/15 selected:es:text-accent-950",
16
+ "es:focus-visible:bg-secondary-100 es:focus-visible:outline-hidden",
17
+ "es:active:bg-accent-700/15"
18
+ )
19
+ }
20
+ );
21
+ };
22
+ export {
23
+ OptionItemBase
24
+ };