@oneplatformdev/ui 0.1.10-94 → 0.1.11-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 (54) hide show
  1. package/AlertDialog/AlertDialog.d.ts.map +1 -1
  2. package/AlertDialog/AlertDialog.js +40 -46
  3. package/AlertDialog/AlertDialog.js.map +1 -1
  4. package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
  5. package/AlertDialog/AlertDialogRoot.js +37 -33
  6. package/AlertDialog/AlertDialogRoot.js.map +1 -1
  7. package/Button/Button.d.ts.map +1 -1
  8. package/Button/Button.js +71 -46
  9. package/Button/Button.js.map +1 -1
  10. package/Button/Button.stories.d.ts +3 -0
  11. package/Button/Button.stories.d.ts.map +1 -1
  12. package/Button/Button.stories.js +128 -13
  13. package/Button/Button.stories.js.map +1 -1
  14. package/Button/Button.types.d.ts +7 -6
  15. package/Button/Button.types.d.ts.map +1 -1
  16. package/Button/buttonVariants.d.ts +33 -1
  17. package/Button/buttonVariants.d.ts.map +1 -1
  18. package/Button/buttonVariants.js +158 -4
  19. package/Button/buttonVariants.js.map +1 -1
  20. package/Button/index.js +5 -4
  21. package/ButtonIcon/buttonIconVariants.d.ts +1 -1
  22. package/CHANGELOG.md +297 -0
  23. package/Combobox/Combobox.d.ts.map +1 -1
  24. package/Combobox/Combobox.js +107 -106
  25. package/Combobox/Combobox.js.map +1 -1
  26. package/DataTable/useDataTable.d.ts +1 -1
  27. package/Dialog/Dialog.js +14 -14
  28. package/Dialog/Dialog.js.map +1 -1
  29. package/Form/Form_old.d.ts +1 -1
  30. package/Form/Form_old.d.ts.map +1 -1
  31. package/FormInput/FormInput.d.ts.map +1 -1
  32. package/FormInput/FormInput.js +29 -26
  33. package/FormInput/FormInput.js.map +1 -1
  34. package/FormSelect/FormSelect.d.ts.map +1 -1
  35. package/FormSelect/FormSelect.js +30 -26
  36. package/FormSelect/FormSelect.js.map +1 -1
  37. package/FormSelect/FormSelect.types.d.ts +4 -2
  38. package/FormSelect/FormSelect.types.d.ts.map +1 -1
  39. package/Input/Input.types.d.ts +2 -0
  40. package/Input/Input.types.d.ts.map +1 -1
  41. package/Search/Search.d.ts.map +1 -1
  42. package/Search/Search.js +35 -33
  43. package/Search/Search.js.map +1 -1
  44. package/Select/Select.d.ts.map +1 -1
  45. package/Select/Select.js +23 -23
  46. package/Select/Select.js.map +1 -1
  47. package/Select/SelectRoot.d.ts +2 -1
  48. package/Select/SelectRoot.d.ts.map +1 -1
  49. package/Select/SelectRoot.js +59 -57
  50. package/Select/SelectRoot.js.map +1 -1
  51. package/Toast/Toast.d.ts +1 -1
  52. package/Toast/toastVariants.d.ts +1 -1
  53. package/index.js +325 -324
  54. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,300 @@
1
+ ## 0.1.11-0 (2025-12-26)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **Button:** enhance button component with new variants, adornments, and improved props ([0d373b8](https://github.com/oneplatformdev/core-web/commit/0d373b8))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated @oneplatformdev/utils to 0.1.1-170
10
+ - Updated @oneplatformdev/hooks to 0.1.0-156
11
+ - Updated @oneplatformdev/tokens to 0.0.1-143
12
+
13
+ ### ❤️ Thank You
14
+
15
+ - Bohdan Radchenko
16
+
17
+ ## 0.1.10-120 (2025-12-26)
18
+
19
+ ### 🚀 Features
20
+
21
+ - enhance FormSelect with onChangePrepare and updated onChange signature ([3b4402b](https://github.com/oneplatformdev/core-web/commit/3b4402b))
22
+
23
+ ### 🩹 Fixes
24
+
25
+ - **FormSelect:** ensure default value is an empty string when undefined ([056631f](https://github.com/oneplatformdev/core-web/commit/056631f))
26
+ - update icon size for large button variant ([1e7c0a7](https://github.com/oneplatformdev/core-web/commit/1e7c0a7))
27
+ - add min-width to large button variant ([e34bc71](https://github.com/oneplatformdev/core-web/commit/e34bc71))
28
+ - handle undefined value in FormSelect component ([9c7ae4a](https://github.com/oneplatformdev/core-web/commit/9c7ae4a))
29
+ - minor alert dialog content ([#41](https://github.com/oneplatformdev/core-web/pull/41))
30
+ - update Dialog component title font size for better readability and add .env to .gitignore ([9646134](https://github.com/oneplatformdev/core-web/commit/9646134))
31
+ - adjust Dialog component styling for better alignment and update container size in CSS ([afaa5af](https://github.com/oneplatformdev/core-web/commit/afaa5af))
32
+ - update XIcon styling in Dialog component for improved visibility ([164338b](https://github.com/oneplatformdev/core-web/commit/164338b))
33
+ - update dialog primitive close ([5e7c577](https://github.com/oneplatformdev/core-web/commit/5e7c577))
34
+ - update dialog primitive close ([560b5ba](https://github.com/oneplatformdev/core-web/commit/560b5ba))
35
+ - update dialog primitive close ([f63b143](https://github.com/oneplatformdev/core-web/commit/f63b143))
36
+
37
+ ### 🧱 Updated Dependencies
38
+
39
+ - Updated @oneplatformdev/utils to 0.1.1-169
40
+ - Updated @oneplatformdev/hooks to 0.1.0-155
41
+ - Updated @oneplatformdev/tokens to 0.0.1-142
42
+
43
+ ### ❤️ Thank You
44
+
45
+ - Bohdan Radchenko @BohdanRadchenko
46
+ - BohdanRadchenko
47
+
48
+ ## 0.1.10-118 (2025-12-23)
49
+
50
+ ### 🧱 Updated Dependencies
51
+
52
+ - Updated @oneplatformdev/utils to 0.1.1-167
53
+ - Updated @oneplatformdev/hooks to 0.1.0-153
54
+ - Updated @oneplatformdev/tokens to 0.0.1-140
55
+
56
+ ## 0.1.10-117 (2025-12-23)
57
+
58
+ ### 🧱 Updated Dependencies
59
+
60
+ - Updated @oneplatformdev/utils to 0.1.1-166
61
+ - Updated @oneplatformdev/hooks to 0.1.0-152
62
+ - Updated @oneplatformdev/tokens to 0.0.1-139
63
+
64
+ ## 0.1.10-116 (2025-12-23)
65
+
66
+ ### 🧱 Updated Dependencies
67
+
68
+ - Updated @oneplatformdev/utils to 0.1.1-165
69
+ - Updated @oneplatformdev/hooks to 0.1.0-151
70
+ - Updated @oneplatformdev/tokens to 0.0.1-138
71
+
72
+ ## 0.1.10-115 (2025-12-18)
73
+
74
+ ### 🧱 Updated Dependencies
75
+
76
+ - Updated @oneplatformdev/utils to 0.1.1-164
77
+ - Updated @oneplatformdev/hooks to 0.1.0-150
78
+ - Updated @oneplatformdev/tokens to 0.0.1-137
79
+
80
+ ## 0.1.10-114 (2025-12-18)
81
+
82
+ ### 🩹 Fixes
83
+
84
+ - update icon size for large button variant ([1e7c0a7](https://github.com/oneplatformdev/core-web/commit/1e7c0a7))
85
+
86
+ ### 🧱 Updated Dependencies
87
+
88
+ - Updated @oneplatformdev/utils to 0.1.1-163
89
+ - Updated @oneplatformdev/hooks to 0.1.0-149
90
+ - Updated @oneplatformdev/tokens to 0.0.1-136
91
+
92
+ ### ❤️ Thank You
93
+
94
+ - Bohdan Radchenko
95
+
96
+ ## 0.1.10-113 (2025-12-18)
97
+
98
+ ### 🩹 Fixes
99
+
100
+ - add min-width to large button variant ([e34bc71](https://github.com/oneplatformdev/core-web/commit/e34bc71))
101
+ - handle undefined value in FormSelect component ([9c7ae4a](https://github.com/oneplatformdev/core-web/commit/9c7ae4a))
102
+
103
+ ### 🧱 Updated Dependencies
104
+
105
+ - Updated @oneplatformdev/utils to 0.1.1-162
106
+ - Updated @oneplatformdev/hooks to 0.1.0-148
107
+ - Updated @oneplatformdev/tokens to 0.0.1-135
108
+
109
+ ### ❤️ Thank You
110
+
111
+ - Bohdan Radchenko
112
+
113
+ ## 0.1.10-112 (2025-12-17)
114
+
115
+ ### 🧱 Updated Dependencies
116
+
117
+ - Updated @oneplatformdev/utils to 0.1.1-161
118
+ - Updated @oneplatformdev/hooks to 0.1.0-147
119
+ - Updated @oneplatformdev/tokens to 0.0.1-134
120
+
121
+ ## 0.1.10-111 (2025-12-17)
122
+
123
+ ### 🩹 Fixes
124
+
125
+ - minor alert dialog content ([#41](https://github.com/oneplatformdev/core-web/pull/41))
126
+
127
+ ### 🧱 Updated Dependencies
128
+
129
+ - Updated @oneplatformdev/utils to 0.1.1-160
130
+ - Updated @oneplatformdev/hooks to 0.1.0-146
131
+ - Updated @oneplatformdev/tokens to 0.0.1-133
132
+
133
+ ### ❤️ Thank You
134
+
135
+ - Bohdan Radchenko @BohdanRadchenko
136
+
137
+ ## 0.1.10-110 (2025-12-15)
138
+
139
+ ### 🩹 Fixes
140
+
141
+ - simplify AlertDialog component structure and improve styling ([e27bb84](https://github.com/oneplatformdev/core-web/commit/e27bb84))
142
+
143
+ ### 🧱 Updated Dependencies
144
+
145
+ - Updated @oneplatformdev/utils to 0.1.1-159
146
+ - Updated @oneplatformdev/hooks to 0.1.0-145
147
+ - Updated @oneplatformdev/tokens to 0.0.1-132
148
+
149
+ ### ❤️ Thank You
150
+
151
+ - Bohdan Radchenko
152
+
153
+ ## 0.1.10-109 (2025-12-15)
154
+
155
+ ### 🧱 Updated Dependencies
156
+
157
+ - Updated @oneplatformdev/utils to 0.1.1-158
158
+ - Updated @oneplatformdev/hooks to 0.1.0-144
159
+ - Updated @oneplatformdev/tokens to 0.0.1-131
160
+
161
+ ## 0.1.10-108 (2025-12-15)
162
+
163
+ ### 🧱 Updated Dependencies
164
+
165
+ - Updated @oneplatformdev/utils to 0.1.1-157
166
+ - Updated @oneplatformdev/hooks to 0.1.0-143
167
+ - Updated @oneplatformdev/tokens to 0.0.1-130
168
+
169
+ ## 0.1.10-107 (2025-12-15)
170
+
171
+ ### 🧱 Updated Dependencies
172
+
173
+ - Updated @oneplatformdev/utils to 0.1.1-156
174
+ - Updated @oneplatformdev/hooks to 0.1.0-142
175
+ - Updated @oneplatformdev/tokens to 0.0.1-129
176
+
177
+ ## 0.1.10-106 (2025-12-15)
178
+
179
+ ### 🧱 Updated Dependencies
180
+
181
+ - Updated @oneplatformdev/utils to 0.1.1-155
182
+ - Updated @oneplatformdev/hooks to 0.1.0-141
183
+ - Updated @oneplatformdev/tokens to 0.0.1-128
184
+
185
+ ## 0.1.10-105 (2025-12-15)
186
+
187
+ ### 🧱 Updated Dependencies
188
+
189
+ - Updated @oneplatformdev/utils to 0.1.1-154
190
+ - Updated @oneplatformdev/hooks to 0.1.0-140
191
+ - Updated @oneplatformdev/tokens to 0.0.1-127
192
+
193
+ ## 0.1.10-104 (2025-12-08)
194
+
195
+ ### 🩹 Fixes
196
+
197
+ - update Dialog component title font size for better readability and add .env to .gitignore ([9646134](https://github.com/oneplatformdev/core-web/commit/9646134))
198
+ - adjust Dialog component styling for better alignment and update container size in CSS ([afaa5af](https://github.com/oneplatformdev/core-web/commit/afaa5af))
199
+
200
+ ### 🧱 Updated Dependencies
201
+
202
+ - Updated @oneplatformdev/utils to 0.1.1-153
203
+ - Updated @oneplatformdev/hooks to 0.1.0-139
204
+ - Updated @oneplatformdev/tokens to 0.0.1-126
205
+
206
+ ### ❤️ Thank You
207
+
208
+ - Bohdan Radchenko
209
+
210
+ ## 0.1.10-103 (2025-12-04)
211
+
212
+ ### 🩹 Fixes
213
+
214
+ - update XIcon styling in Dialog component for improved visibility ([164338b](https://github.com/oneplatformdev/core-web/commit/164338b))
215
+
216
+ ### 🧱 Updated Dependencies
217
+
218
+ - Updated @oneplatformdev/utils to 0.1.1-152
219
+ - Updated @oneplatformdev/hooks to 0.1.0-138
220
+ - Updated @oneplatformdev/tokens to 0.0.1-125
221
+
222
+ ### ❤️ Thank You
223
+
224
+ - Bohdan Radchenko
225
+
226
+ ## 0.1.10-102 (2025-12-03)
227
+
228
+ ### 🚀 Features
229
+
230
+ - enhance FormSelect with onChangePrepare and updated onChange signature ([3b4402b](https://github.com/oneplatformdev/core-web/commit/3b4402b))
231
+
232
+ ### 🧱 Updated Dependencies
233
+
234
+ - Updated @oneplatformdev/utils to 0.1.1-151
235
+ - Updated @oneplatformdev/hooks to 0.1.0-137
236
+ - Updated @oneplatformdev/tokens to 0.0.1-124
237
+
238
+ ### ❤️ Thank You
239
+
240
+ - Bohdan Radchenko
241
+
242
+ ## 0.1.10-101 (2025-12-03)
243
+
244
+ ### 🧱 Updated Dependencies
245
+
246
+ - Updated @oneplatformdev/utils to 0.1.1-150
247
+ - Updated @oneplatformdev/hooks to 0.1.0-136
248
+ - Updated @oneplatformdev/tokens to 0.0.1-123
249
+
250
+ ## 0.1.10-100 (2025-12-03)
251
+
252
+ ### 🧱 Updated Dependencies
253
+
254
+ - Updated @oneplatformdev/utils to 0.1.1-149
255
+ - Updated @oneplatformdev/hooks to 0.1.0-135
256
+ - Updated @oneplatformdev/tokens to 0.0.1-122
257
+
258
+ ## 0.1.10-99 (2025-12-03)
259
+
260
+ ### 🧱 Updated Dependencies
261
+
262
+ - Updated @oneplatformdev/utils to 0.1.1-148
263
+ - Updated @oneplatformdev/hooks to 0.1.0-134
264
+ - Updated @oneplatformdev/tokens to 0.0.1-121
265
+
266
+ ## 0.1.10-98 (2025-12-03)
267
+
268
+ ### 🧱 Updated Dependencies
269
+
270
+ - Updated @oneplatformdev/utils to 0.1.1-147
271
+ - Updated @oneplatformdev/hooks to 0.1.0-133
272
+ - Updated @oneplatformdev/tokens to 0.0.1-120
273
+
274
+ ## 0.1.10-97 (2025-12-03)
275
+
276
+ ### 🧱 Updated Dependencies
277
+
278
+ - Updated @oneplatformdev/utils to 0.1.1-146
279
+ - Updated @oneplatformdev/hooks to 0.1.0-132
280
+ - Updated @oneplatformdev/tokens to 0.0.1-119
281
+
282
+ ## 0.1.10-96 (2025-11-25)
283
+
284
+ ### 🧱 Updated Dependencies
285
+
286
+ - Updated @oneplatformdev/utils to 0.1.1-145
287
+ - Updated @oneplatformdev/hooks to 0.1.0-131
288
+ - Updated @oneplatformdev/tokens to 0.0.1-118
289
+
290
+ ## 0.1.10-95 (2025-11-25)
291
+
292
+ ### 🧱 Updated Dependencies
293
+
294
+ - Updated @oneplatformdev/utils to 0.1.1-144
295
+ - Updated @oneplatformdev/hooks to 0.1.0-130
296
+ - Updated @oneplatformdev/tokens to 0.0.1-117
297
+
1
298
  ## 0.1.10-94 (2025-11-25)
2
299
 
3
300
  ### 🧱 Updated Dependencies
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAGL,aAAa,EACd,MAAM,kBAAkB,CAAC;AAqB1B,eAAO,MAAM,QAAQ,0GA6PpB,CAAC"}
1
+ {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/Combobox/Combobox.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAGL,aAAa,EACd,MAAM,kBAAkB,CAAC;AAqB1B,eAAO,MAAM,QAAQ,0GA+PpB,CAAC"}
@@ -1,173 +1,174 @@
1
- import { jsx as t, jsxs as c, Fragment as H } from "react/jsx-runtime";
2
- import { forwardRef as te, useRef as ne, useState as d, useCallback as p, useEffect as oe, useMemo as R, useLayoutEffect as re } from "react";
3
- import { LoadingMask as ae } from "../LoadingMask/LoadingMask.js";
1
+ import { jsx as e, jsxs as d, Fragment as j } from "react/jsx-runtime";
2
+ import { forwardRef as oe, useState as s, useCallback as p, useEffect as re, useMemo as M, useLayoutEffect as ae } from "react";
3
+ import { LoadingMask as V } from "../LoadingMask/LoadingMask.js";
4
4
  import "../LoadingMask/RenderLoadingMask.js";
5
- import { Popover as se, PopoverTrigger as ie, PopoverContent as le } from "../Popover/Popover.js";
5
+ import { Popover as ie, PopoverTrigger as se, PopoverContent as le } from "../Popover/Popover.js";
6
6
  import { Button as ce } from "../Button/Button.js";
7
7
  import "../Button/buttonVariants.js";
8
- import { Command as de, CommandInput as pe, CommandList as ue, CommandGroup as me, CommandEmpty as V, CommandItem as fe } from "../Command/Command.js";
9
- import { cn as j } from "@oneplatformdev/utils";
8
+ import { Command as de, CommandInput as pe, CommandList as me, CommandGroup as fe, CommandEmpty as X, CommandItem as ue } from "../Command/Command.js";
9
+ import { cn as R } from "@oneplatformdev/utils";
10
10
  import { useDebounceCallback as he } from "@oneplatformdev/hooks";
11
11
  import { X as ge, ChevronsUpDown as be } from "lucide-react";
12
12
  import { ComboboxOptions as ve } from "./ComboboxOptions.js";
13
- const Ce = (S) => {
14
- const { value: u, flattenOptions: n = [], selectedOption: N } = S;
15
- if (!u) return "No value for render label";
16
- const C = [n.find((m) => String(m.value).toLowerCase() === String(u).toLowerCase()), N].filter(Boolean).map((m) => m.label).find(Boolean);
17
- return C || u;
18
- }, Ee = te(
19
- (S, u) => {
13
+ const ye = (S) => {
14
+ const { value: m, flattenOptions: n = [], selectedOption: L } = S;
15
+ if (!m) return "No value for render label";
16
+ const y = [n.find((f) => String(f.value).toLowerCase() === String(m).toLowerCase()), L].filter(Boolean).map((f) => f.label).find(Boolean);
17
+ return y || m;
18
+ }, Ee = oe(
19
+ (S, m) => {
20
20
  const {
21
21
  value: n,
22
- onChange: N,
22
+ onChange: L,
23
23
  placeholder: T,
24
- disabled: C,
25
- searchLabel: m = "Type to search...",
26
- fetchOptions: W,
27
- options: L,
24
+ disabled: y,
25
+ searchLabel: f = "Type to search...",
26
+ fetchOptions: _,
27
+ options: N,
28
28
  emptyLabel: A = "No options",
29
- emptyAction: y,
29
+ emptyAction: C,
30
30
  commandInputAction: I,
31
31
  listHeadAction: w,
32
32
  onMount: k
33
- } = S, B = ne(!1), [i, P] = d(!1), [a, D] = d(""), [f, E] = d(), [o, l] = d(!1), [r, X] = d([]), [_, J] = d([]), h = p((e) => {
34
- const b = (M) => {
35
- const s = [], q = (x) => {
33
+ } = S, [F, z] = s(!1), [l, B] = s(!1), [a, P] = s(""), [u, D] = s(), [o, c] = s(!1), [r, J] = s([]), [K, Q] = s([]), h = p((t) => {
34
+ const b = (E) => {
35
+ const i = [], H = (x) => {
36
36
  if (x)
37
37
  for (const v of x)
38
- s.push(v), v.items && v.items.length && q(v.items);
38
+ i.push(v), v.items && v.items.length && H(v.items);
39
39
  };
40
- q(M), J((x) => {
41
- if (!s.find((O) => !!n && String(O.value) === String(n))) {
42
- const O = f || x.find((ee) => !!n && String(ee.value) === String(n));
43
- if (O) return [O, ...s];
40
+ H(E), Q((x) => {
41
+ if (!i.find((O) => !!n && String(O.value) === String(n))) {
42
+ const O = u || x.find((ne) => !!n && String(ne.value) === String(n));
43
+ if (O) return [O, ...i];
44
44
  }
45
- return s;
45
+ return i;
46
46
  });
47
47
  };
48
- X((M) => {
49
- const s = typeof e == "function" ? e(M) : e;
50
- return b(s), s;
48
+ J((E) => {
49
+ const i = typeof t == "function" ? t(E) : t;
50
+ return b(i), i;
51
51
  });
52
- }, [f, n]);
53
- oe(() => {
54
- L?.length && h(L);
55
- }, [L]);
56
- const K = async () => {
57
- i || (F(), D(""));
58
- }, F = p(async (e) => {
59
- l(!0);
52
+ }, [u, n]);
53
+ re(() => {
54
+ N?.length && h(N);
55
+ }, [N]);
56
+ const Y = async () => {
57
+ l || (G(), P(""));
58
+ }, G = p(async (t) => {
59
+ c(!0);
60
60
  try {
61
- const b = await W(e);
61
+ const b = await _(t);
62
62
  h(b);
63
63
  } catch (b) {
64
64
  console.error("Unexpected error while get option:", b);
65
65
  } finally {
66
- l(!1);
66
+ c(!1);
67
67
  }
68
- }, [h]), Q = he(F, 1e3, {
68
+ }, [h]), Z = he(G, 1e3, {
69
69
  leading: !1,
70
70
  trailing: !0
71
- }), Y = p((e) => {
72
- l(!0), D(e), Q(e);
73
- }, []), z = p((e) => {
74
- N(e.value), E(e), l(!1);
75
- }, []), Z = p(() => {
76
- z({ value: "", label: "" }), E(void 0), l(!1);
77
- }, []), G = R(() => !!a && !r.length && !o, [o, r.length, a]), U = R(() => !r.length && !o, [o, r.length, a]), g = R(() => ({
71
+ }), $ = p((t) => {
72
+ c(!0), P(t), Z(t);
73
+ }, []), U = p((t) => {
74
+ L(t.value), D(t), c(!1);
75
+ }, []), ee = p(() => {
76
+ U({ value: "", label: "" }), D(void 0), c(!1);
77
+ }, []), W = M(() => !!a && !r.length && !o, [o, r.length, a]), q = M(() => !r.length && !o, [o, r.length, a]), g = M(() => ({
78
78
  options: r,
79
79
  setOptions: h,
80
- selectedOption: f,
81
- setSelectedOption: E,
80
+ selectedOption: u,
81
+ setSelectedOption: D,
82
82
  search: a || "",
83
- setSearch: D,
84
- open: i,
85
- setOpen: P,
83
+ setSearch: P,
84
+ open: l,
85
+ setOpen: B,
86
86
  loading: o,
87
- setLoading: l,
88
- isEmptyList: U,
89
- isSearchedEmptyList: G
90
- }), [o, i, r, a, f, U, G, h]), $ = p(() => {
91
- if (!k) {
92
- B.current = !0;
93
- return;
87
+ setLoading: c,
88
+ isEmptyList: q,
89
+ isSearchedEmptyList: W
90
+ }), [o, l, r, a, u, q, W, h]), te = p(async () => {
91
+ if (k) {
92
+ z(!0);
93
+ try {
94
+ await k(g);
95
+ } finally {
96
+ z(!1);
97
+ }
94
98
  }
95
- k(g).finally(() => {
96
- B.current = !0;
97
- });
98
- }, [g, k]);
99
- return re(() => ($(), () => {
100
- B.current = !1;
101
- }), []), /* @__PURE__ */ t("div", { className: "w-full", ref: u, children: /* @__PURE__ */ c(
102
- se,
99
+ }, [k, g]);
100
+ return ae(() => {
101
+ te();
102
+ }, []), /* @__PURE__ */ e("div", { className: "w-full", ref: m, children: /* @__PURE__ */ d(
103
+ ie,
103
104
  {
104
- open: i,
105
- onOpenChange: (e) => {
106
- P(e), e && K();
105
+ open: l,
106
+ onOpenChange: (t) => {
107
+ B(t), t && Y();
107
108
  },
108
109
  children: [
109
- /* @__PURE__ */ t(ie, { asChild: !0, className: "border-input", children: /* @__PURE__ */ c(
110
+ /* @__PURE__ */ e(se, { asChild: !0, className: "border-input", children: /* @__PURE__ */ e(
110
111
  ce,
111
112
  {
112
113
  variant: "outline",
113
114
  role: "combobox",
114
115
  size: "lg",
115
- "aria-expanded": i,
116
- className: j(
117
- "w-full justify-between font-normal text-sm bg-transparent relative p-3",
116
+ "aria-expanded": l,
117
+ className: R(
118
+ "relative w-full justify-between font-normal text-sm bg-transparent relative p-3",
118
119
  "border border-border",
119
- i && "border-2 outline-hidden ring-1 ring-ring",
120
+ l && "border-2 outline-hidden ring-1 ring-ring",
120
121
  "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring"
121
122
  ),
122
- disabled: C,
123
- children: [
124
- /* @__PURE__ */ t("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: n ? Ce({ value: n, flattenOptions: _, selectedOption: f }) : /* @__PURE__ */ t("span", { className: "text-gray-400", children: T }) }),
125
- n ? /* @__PURE__ */ t(
123
+ disabled: y || F,
124
+ children: F ? /* @__PURE__ */ e(V, { fullWidth: !0 }) : /* @__PURE__ */ d(j, { children: [
125
+ /* @__PURE__ */ e("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: n ? ye({ value: n, flattenOptions: K, selectedOption: u }) : /* @__PURE__ */ e("span", { className: "text-gray-400", children: T }) }),
126
+ n ? /* @__PURE__ */ e(
126
127
  "div",
127
128
  {
128
- className: j(
129
+ className: R(
129
130
  "absolute top-0 right-1",
130
131
  "flex items-center justify-center",
131
132
  "w-9 aspect-square [&_svg]:size-5",
132
133
  "opacity-50 cursor-pointer hover:opacity-100"
133
134
  ),
134
- onClick: (e) => {
135
- e.stopPropagation(), Z();
135
+ onClick: (t) => {
136
+ t.stopPropagation(), ee();
136
137
  },
137
- children: /* @__PURE__ */ t(ge, {})
138
+ children: /* @__PURE__ */ e(ge, {})
138
139
  }
139
- ) : /* @__PURE__ */ t(be, { className: "opacity-50 w-4 h-4" })
140
- ]
140
+ ) : /* @__PURE__ */ e(be, { className: "opacity-50 w-4 h-4" })
141
+ ] })
141
142
  }
142
143
  ) }),
143
- /* @__PURE__ */ t(
144
+ /* @__PURE__ */ e(
144
145
  le,
145
146
  {
146
147
  className: "w-(--radix-popper-anchor-width) max-w-none p-0",
147
148
  align: "start",
148
- children: /* @__PURE__ */ c(de, { shouldFilter: !1, children: [
149
- /* @__PURE__ */ t(
149
+ children: /* @__PURE__ */ d(de, { shouldFilter: !1, children: [
150
+ /* @__PURE__ */ e(
150
151
  pe,
151
152
  {
152
- placeholder: m,
153
+ placeholder: f,
153
154
  value: a,
154
- onValueChange: Y
155
+ onValueChange: $
155
156
  }
156
157
  ),
157
158
  typeof I == "function" ? I(g) : I,
158
- /* @__PURE__ */ t(ue, { children: /* @__PURE__ */ c(
159
- me,
159
+ /* @__PURE__ */ e(me, { children: /* @__PURE__ */ d(
160
+ fe,
160
161
  {
161
- className: j(!r.length && "p-0 shadow-none"),
162
+ className: R(!r.length && "p-0 shadow-none"),
162
163
  children: [
163
- o && /* @__PURE__ */ t(ae, { fullWidth: !0 }),
164
- !o && !!a && /* @__PURE__ */ t(H, { children: y ? /* @__PURE__ */ c(V, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
165
- /* @__PURE__ */ t("span", { children: A }),
166
- typeof y == "function" ? y(g) : y
167
- ] }) : /* @__PURE__ */ t(V, { children: A }) }),
168
- !o && /* @__PURE__ */ c(H, { children: [
169
- !!r.length && w && /* @__PURE__ */ t(
170
- fe,
164
+ o && /* @__PURE__ */ e(V, { fullWidth: !0 }),
165
+ !o && !!a && /* @__PURE__ */ e(j, { children: C ? /* @__PURE__ */ d(X, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
166
+ /* @__PURE__ */ e("span", { children: A }),
167
+ typeof C == "function" ? C(g) : C
168
+ ] }) : /* @__PURE__ */ e(X, { children: A }) }),
169
+ !o && /* @__PURE__ */ d(j, { children: [
170
+ !!r.length && w && /* @__PURE__ */ e(
171
+ ue,
171
172
  {
172
173
  asChild: !0,
173
174
  className: "w-full",
@@ -175,13 +176,13 @@ const Ce = (S) => {
175
176
  },
176
177
  "combobox-list-head-action"
177
178
  ),
178
- /* @__PURE__ */ t(
179
+ /* @__PURE__ */ e(
179
180
  ve,
180
181
  {
181
182
  value: n,
182
183
  options: r,
183
- onChangeOption: z,
184
- setOpen: P
184
+ onChangeOption: U,
185
+ setOpen: B
185
186
  }
186
187
  )
187
188
  ] })