cekat-ui 1.1.0 → 1.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.
Files changed (71) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +6 -0
  2. package/dist/components/Avatar/AvatarIcons.d.ts +8 -0
  3. package/dist/components/Avatar/avatar.styles.d.ts +12 -0
  4. package/dist/components/Avatar/avatar.types.d.ts +16 -0
  5. package/dist/components/Avatar/index.d.ts +3 -0
  6. package/dist/components/AvatarGroup/AvatarGroup.d.ts +6 -0
  7. package/dist/components/AvatarGroup/avatargroup.styles.d.ts +8 -0
  8. package/dist/components/AvatarGroup/avatargroup.types.d.ts +16 -0
  9. package/dist/components/AvatarGroup/index.d.ts +3 -0
  10. package/dist/components/AvatarLabelGroup/AvatarLabelGroup.d.ts +6 -0
  11. package/dist/components/AvatarLabelGroup/avatarlabelgroup.styles.d.ts +5 -0
  12. package/dist/components/AvatarLabelGroup/avatarlabelgroup.types.d.ts +14 -0
  13. package/dist/components/AvatarLabelGroup/index.d.ts +3 -0
  14. package/dist/components/AvatarProfilePhoto/AvatarProfilePhoto.d.ts +6 -0
  15. package/dist/components/AvatarProfilePhoto/avatarprofilephoto.styles.d.ts +10 -0
  16. package/dist/components/AvatarProfilePhoto/avatarprofilephoto.types.d.ts +12 -0
  17. package/dist/components/AvatarProfilePhoto/index.d.ts +3 -0
  18. package/dist/components/Badge/Badge.d.ts +6 -0
  19. package/dist/components/Badge/badge.styles.d.ts +20 -0
  20. package/dist/components/Badge/badge.types.d.ts +23 -0
  21. package/dist/components/Badge/index.d.ts +3 -0
  22. package/dist/components/BadgeGroup/BadgeGroup.d.ts +6 -0
  23. package/dist/components/BadgeGroup/badgegroup.styles.d.ts +28 -0
  24. package/dist/components/BadgeGroup/badgegroup.types.d.ts +19 -0
  25. package/dist/components/BadgeGroup/index.d.ts +3 -0
  26. package/dist/components/Button/Button.d.ts +1 -1
  27. package/dist/components/Button/button.styles.d.ts +2 -1
  28. package/dist/components/Button/button.types.d.ts +2 -1
  29. package/dist/components/Checkbox/checkbox.types.d.ts +3 -1
  30. package/dist/components/Dropdown/Dropdown.d.ts +2 -0
  31. package/dist/components/Dropdown/dropdown.styles.d.ts +19 -0
  32. package/dist/components/Dropdown/dropdown.types.d.ts +44 -0
  33. package/dist/components/Dropdown/index.d.ts +3 -0
  34. package/dist/components/Input/Input.d.ts +1 -1
  35. package/dist/components/Input/input.styles.d.ts +21 -3
  36. package/dist/components/Input/input.types.d.ts +24 -1
  37. package/dist/components/InputDropdown/InputDropdown.d.ts +2 -0
  38. package/dist/components/InputDropdown/index.d.ts +3 -0
  39. package/dist/components/InputDropdown/inputDropdown.styles.d.ts +15 -0
  40. package/dist/components/InputDropdown/inputDropdown.types.d.ts +45 -0
  41. package/dist/components/Loading/Loading.d.ts +6 -0
  42. package/dist/components/Loading/LoadingSpinner.d.ts +9 -0
  43. package/dist/components/Loading/index.d.ts +3 -0
  44. package/dist/components/Loading/loading.styles.d.ts +6 -0
  45. package/dist/components/Loading/loading.types.d.ts +10 -0
  46. package/dist/components/Radio/radio.types.d.ts +3 -1
  47. package/dist/components/Tab/Tab.d.ts +6 -0
  48. package/dist/components/Tab/TabList.d.ts +6 -0
  49. package/dist/components/Tab/index.d.ts +4 -0
  50. package/dist/components/Tab/tab.styles.d.ts +15 -0
  51. package/dist/components/Tab/tab.types.d.ts +24 -0
  52. package/dist/components/Tag/Tag.d.ts +6 -0
  53. package/dist/components/Tag/index.d.ts +3 -0
  54. package/dist/components/Tag/tag.styles.d.ts +19 -0
  55. package/dist/components/Tag/tag.types.d.ts +21 -0
  56. package/dist/components/Textarea/Textarea.d.ts +4 -0
  57. package/dist/components/Textarea/index.d.ts +3 -0
  58. package/dist/components/Textarea/textarea.styles.d.ts +14 -0
  59. package/dist/components/Textarea/textarea.types.d.ts +17 -0
  60. package/dist/components/Toggle/toggle.styles.d.ts +2 -1
  61. package/dist/components/Toggle/toggle.types.d.ts +5 -1
  62. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  63. package/dist/components/Tooltip/tooltip.styles.d.ts +2 -0
  64. package/dist/components/Tooltip/tooltip.types.d.ts +1 -0
  65. package/dist/index.d.ts +12 -0
  66. package/dist/index.es.js +2688 -649
  67. package/dist/index.umd.js +1 -1
  68. package/dist/style.css +1904 -416
  69. package/dist/utils/color.d.ts +4 -0
  70. package/package.json +4 -4
  71. package/tailwind.preset.cjs +137 -39
package/dist/index.es.js CHANGED
@@ -1,49 +1,49 @@
1
- import * as h from "react";
2
- import s, { forwardRef as B, createElement as V, useId as D, useState as F } from "react";
3
- import { createPortal as _ } from "react-dom";
4
- function j(e) {
5
- var r, t, a = "";
6
- if (typeof e == "string" || typeof e == "number") a += e;
7
- else if (typeof e == "object") if (Array.isArray(e)) {
8
- var i = e.length;
9
- for (r = 0; r < i; r++) e[r] && (t = j(e[r])) && (a && (a += " "), a += t);
10
- } else for (t in e) e[t] && (a && (a += " "), a += t);
11
- return a;
1
+ import * as e from "react";
2
+ import d, { forwardRef as pe, createElement as M, useId as ge, useState as be } from "react";
3
+ import { createPortal as fe } from "react-dom";
4
+ function J(t) {
5
+ var s, r, l = "";
6
+ if (typeof t == "string" || typeof t == "number") l += t;
7
+ else if (typeof t == "object") if (Array.isArray(t)) {
8
+ var i = t.length;
9
+ for (s = 0; s < i; s++) t[s] && (r = J(t[s])) && (l && (l += " "), l += r);
10
+ } else for (r in t) t[r] && (l && (l += " "), l += r);
11
+ return l;
12
12
  }
13
- function x() {
14
- for (var e, r, t = 0, a = "", i = arguments.length; t < i; t++) (e = arguments[t]) && (r = j(e)) && (a && (a += " "), a += r);
15
- return a;
13
+ function g() {
14
+ for (var t, s, r = 0, l = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (s = J(t)) && (l && (l += " "), l += s);
15
+ return l;
16
16
  }
17
- const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u = (e, r) => (t) => {
18
- var a;
19
- if (r?.variants == null) return $(e, t?.class, t?.className);
20
- const { variants: i, defaultVariants: l } = r, m = Object.keys(i).map((n) => {
21
- const c = t?.[n], f = l?.[n];
22
- if (c === null) return null;
23
- const g = R(c) || R(f);
24
- return i[n][g];
25
- }), d = t && Object.entries(t).reduce((n, c) => {
26
- let [f, g] = c;
27
- return g === void 0 || (n[f] = g), n;
28
- }, {}), o = r == null || (a = r.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((n, c) => {
29
- let { class: f, className: g, ...b } = c;
30
- return Object.entries(b).every((y) => {
31
- let [E, N] = y;
32
- return Array.isArray(N) ? N.includes({
33
- ...l,
34
- ...d
35
- }[E]) : {
36
- ...l,
37
- ...d
38
- }[E] === N;
17
+ const H = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, F = g, b = (t, s) => (r) => {
18
+ var l;
19
+ if (s?.variants == null) return F(t, r?.class, r?.className);
20
+ const { variants: i, defaultVariants: a } = s, c = Object.keys(i).map((o) => {
21
+ const m = r?.[o], p = a?.[o];
22
+ if (m === null) return null;
23
+ const f = H(m) || H(p);
24
+ return i[o][f];
25
+ }), n = r && Object.entries(r).reduce((o, m) => {
26
+ let [p, f] = m;
27
+ return f === void 0 || (o[p] = f), o;
28
+ }, {}), u = s == null || (l = s.compoundVariants) === null || l === void 0 ? void 0 : l.reduce((o, m) => {
29
+ let { class: p, className: f, ...h } = m;
30
+ return Object.entries(h).every((E) => {
31
+ let [w, k] = E;
32
+ return Array.isArray(k) ? k.includes({
33
+ ...a,
34
+ ...n
35
+ }[w]) : {
36
+ ...a,
37
+ ...n
38
+ }[w] === k;
39
39
  }) ? [
40
- ...n,
41
- f,
42
- g
43
- ] : n;
40
+ ...o,
41
+ p,
42
+ f
43
+ ] : o;
44
44
  }, []);
45
- return $(e, m, o, t?.class, t?.className);
46
- }, O = u(
45
+ return F(t, c, u, r?.class, r?.className);
46
+ }, he = b(
47
47
  [
48
48
  "inline-flex items-center justify-center font-bold",
49
49
  "transition-colors duration-150",
@@ -53,6 +53,7 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
53
53
  {
54
54
  variants: {
55
55
  size: {
56
+ xs: "py-1 px-2 gap-1 rounded-md text-caption-sm",
56
57
  sm: "h-[36px] px-4 gap-1 rounded-lg text-caption-sm",
57
58
  md: "h-[44px] px-4 gap-2 rounded-lg text-sm",
58
59
  lg: "h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",
@@ -63,13 +64,17 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
63
64
  primary: "",
64
65
  destructive: ""
65
66
  },
67
+ iconOnly: {
68
+ true: "!p-0",
69
+ false: ""
70
+ },
66
71
  variant: {
67
72
  solid: ["text-white", "disabled:bg-light-100 disabled:text-light-400"],
68
73
  outline: [
69
74
  "bg-white border",
70
75
  "disabled:bg-white disabled:text-light-400 disabled:border-light-200"
71
76
  ],
72
- ghost: ["bg-white", "disabled:text-light-400"],
77
+ ghost: ["bg-transparent", "disabled:text-light-400"],
73
78
  "outline-primary": [
74
79
  "bg-white border border-primary-500 text-primary-500",
75
80
  "hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800",
@@ -77,7 +82,7 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
77
82
  "disabled:bg-white disabled:text-light-400 disabled:border-light-200"
78
83
  ],
79
84
  "ghost-primary": [
80
- "bg-white text-primary-500",
85
+ "bg-transparent text-primary-500",
81
86
  "hover:bg-primary-50 hover:text-primary-800",
82
87
  "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
83
88
  "disabled:text-light-400"
@@ -117,7 +122,7 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
117
122
  variant: "ghost",
118
123
  class: [
119
124
  "text-light-800",
120
- "hover:bg-light-50",
125
+ "hover:bg-light-50 hover:text-light-900",
121
126
  "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
122
127
  ].join(" ")
123
128
  },
@@ -134,7 +139,7 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
134
139
  tone: "primary",
135
140
  variant: "plain-black",
136
141
  class: [
137
- "text-light-900",
142
+ "text-light-800",
138
143
  "hover:text-light-900 hover:bg-transparent",
139
144
  "focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"
140
145
  ].join(" ")
@@ -155,7 +160,7 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
155
160
  variant: "outline",
156
161
  class: [
157
162
  "border-error-500 text-error-500",
158
- "hover:border-error-300 hover:bg-error-50 hover:text-error-800",
163
+ "hover:border-error-300 hover:bg-error-100 hover:text-error-800",
159
164
  "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
160
165
  ].join(" ")
161
166
  },
@@ -177,43 +182,56 @@ const R = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $ = x, u =
177
182
  "hover:text-error-800 hover:bg-transparent",
178
183
  "focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"
179
184
  ].join(" ")
180
- }
185
+ },
186
+ /* ================= ICON ONLY (square) ================= */
187
+ { size: "xs", iconOnly: !0, class: "!w-[26px] !h-[26px]" },
188
+ { size: "sm", iconOnly: !0, class: "!w-[36px] !h-[36px]" },
189
+ { size: "md", iconOnly: !0, class: "!w-[44px] !h-[44px]" },
190
+ { size: "lg", iconOnly: !0, class: "!w-[52px] !h-[52px]" },
191
+ { size: "xl", iconOnly: !0, class: "!w-[60px] !h-[60px]" },
192
+ { size: "2xl", iconOnly: !0, class: "!w-[68px] !h-[68px]" }
181
193
  ],
182
194
  defaultVariants: {
183
195
  size: "md",
184
196
  tone: "primary",
185
- variant: "solid"
197
+ variant: "solid",
198
+ iconOnly: !1
186
199
  }
187
200
  }
188
- ), P = ({
189
- children: e,
190
- className: r,
191
- tone: t,
192
- variant: a,
201
+ ), xe = ({
202
+ children: t,
203
+ className: s,
204
+ tone: r,
205
+ variant: l,
193
206
  size: i,
194
- ...l
195
- }) => /* @__PURE__ */ s.createElement(
207
+ iconOnly: a,
208
+ ...c
209
+ }) => /* @__PURE__ */ d.createElement(
196
210
  "button",
197
211
  {
198
- className: x(O({ tone: t, variant: a, size: i }), r),
199
- ...l
212
+ className: g(
213
+ he({ tone: r, variant: l, size: i, iconOnly: a }),
214
+ s
215
+ ),
216
+ ...c
200
217
  },
201
- e
202
- ), G = ({ children: e }) => /* @__PURE__ */ s.createElement("span", { className: "flex items-center" }, e), W = ({ children: e }) => /* @__PURE__ */ s.createElement("span", { className: "whitespace-nowrap" }, e), z = P;
203
- z.Icon = G;
204
- z.Text = W;
205
- const M = u(
218
+ t
219
+ ), ve = ({ children: t }) => /* @__PURE__ */ d.createElement("span", { className: "flex items-center" }, t), ye = ({ children: t }) => /* @__PURE__ */ d.createElement("span", { className: "whitespace-nowrap" }, t), Y = xe;
220
+ Y.Icon = ve;
221
+ Y.Text = ye;
222
+ const we = b(
206
223
  [
207
224
  "inline-flex items-center justify-center",
208
- "border-2 transition-colors duration-150",
209
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"
225
+ "border transition-colors duration-150",
226
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
210
227
  ],
211
228
  {
212
229
  variants: {
213
230
  size: {
214
- sm: "h-5 w-5 rounded-[4px]",
215
- md: "h-6 w-6 rounded-[6px]",
216
- lg: "h-8 w-8 rounded-[8px]"
231
+ sm: "h-4 w-4 rounded-[4px]",
232
+ md: "h-5 w-5 rounded-[6px]",
233
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
234
+ lg: "h-5 w-5 rounded-[6px]"
217
235
  },
218
236
  checked: {
219
237
  true: "",
@@ -228,16 +246,16 @@ const M = u(
228
246
  {
229
247
  checked: !1,
230
248
  disabled: !1,
231
- className: "bg-white border-[#D0D5DD]"
249
+ className: "bg-white border-light-200 hover:border-light-400"
232
250
  },
233
251
  {
234
252
  checked: !0,
235
253
  disabled: !1,
236
- className: "bg-primary-500 border-primary-500 text-white"
254
+ className: "bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"
237
255
  },
238
256
  {
239
257
  disabled: !0,
240
- className: "bg-[#F2F4F7] border-[#E4E7EC] text-white"
258
+ className: "bg-light-100 border-light-200 text-white"
241
259
  }
242
260
  ],
243
261
  defaultVariants: {
@@ -246,48 +264,49 @@ const M = u(
246
264
  disabled: !1
247
265
  }
248
266
  }
249
- ), L = {
267
+ ), Ee = {
250
268
  sm: { width: 12, height: 9 },
251
269
  md: { width: 14, height: 10 },
252
- lg: { width: 18, height: 14 }
253
- }, U = h.forwardRef(
270
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
271
+ lg: { width: 14, height: 10 }
272
+ }, Ne = e.forwardRef(
254
273
  ({
255
- id: e,
256
- checked: r,
257
- indeterminate: t = !1,
258
- disabled: a,
274
+ id: t,
275
+ checked: s,
276
+ indeterminate: r = !1,
277
+ disabled: l,
259
278
  size: i = "md",
260
- onCheckedChange: l,
261
- className: m
262
- }, d) => {
263
- const o = () => {
264
- a || l?.(!r);
265
- }, n = L[i], c = a ? "text-white/80" : "text-current";
266
- return /* @__PURE__ */ h.createElement(
279
+ onCheckedChange: a,
280
+ className: c
281
+ }, n) => {
282
+ const u = () => {
283
+ l || a?.(!s);
284
+ }, o = Ee[i], m = l ? "text-white/80" : "text-current";
285
+ return /* @__PURE__ */ e.createElement(
267
286
  "button",
268
287
  {
269
- id: e,
270
- ref: d,
288
+ id: t,
289
+ ref: n,
271
290
  type: "button",
272
291
  role: "checkbox",
273
- "aria-checked": t ? "mixed" : r,
274
- disabled: a,
275
- onClick: o,
276
- className: x(
277
- M({ size: i, checked: r, disabled: a }),
278
- m
292
+ "aria-checked": r ? "mixed" : s,
293
+ disabled: l,
294
+ onClick: u,
295
+ className: g(
296
+ we({ size: i, checked: s, disabled: l }),
297
+ c
279
298
  )
280
299
  },
281
- r && !t && /* @__PURE__ */ h.createElement(
300
+ s && !r && /* @__PURE__ */ e.createElement(
282
301
  "svg",
283
302
  {
284
- width: n.width,
285
- height: n.height,
303
+ width: o.width,
304
+ height: o.height,
286
305
  viewBox: "0 0 14 10",
287
306
  fill: "none",
288
- className: c
307
+ className: m
289
308
  },
290
- /* @__PURE__ */ h.createElement(
309
+ /* @__PURE__ */ e.createElement(
291
310
  "path",
292
311
  {
293
312
  d: "M1 5L5 9L13 1",
@@ -298,56 +317,56 @@ const M = u(
298
317
  }
299
318
  )
300
319
  ),
301
- t && /* @__PURE__ */ h.createElement(
320
+ r && /* @__PURE__ */ e.createElement(
302
321
  "span",
303
322
  {
304
- className: x(
305
- c,
323
+ className: g(
324
+ m,
306
325
  "bg-current rounded-sm",
307
326
  i === "sm" && "h-0.5 w-3",
308
- i === "md" && "h-0.5 w-4",
309
- i === "lg" && "h-0.5 w-5"
327
+ (i === "md" || i === "lg") && "h-0.5 w-4"
310
328
  )
311
329
  }
312
330
  )
313
331
  );
314
332
  }
315
333
  );
316
- U.displayName = "Checkbox";
317
- const I = h.createContext(null), Fe = ({
318
- value: e,
319
- defaultValue: r,
320
- onValueChange: t,
321
- children: a,
334
+ Ne.displayName = "Checkbox";
335
+ const ee = e.createContext(null), $r = ({
336
+ value: t,
337
+ defaultValue: s,
338
+ onValueChange: r,
339
+ children: l,
322
340
  className: i
323
341
  }) => {
324
- const [l, m] = h.useState(r), d = e ?? l, o = (n) => {
325
- m(n), t?.(n);
342
+ const [a, c] = e.useState(s), n = t ?? a, u = (o) => {
343
+ c(o), r?.(o);
326
344
  };
327
- return /* @__PURE__ */ h.createElement(
328
- I.Provider,
345
+ return /* @__PURE__ */ e.createElement(
346
+ ee.Provider,
329
347
  {
330
- value: { value: d, onValueChange: o }
348
+ value: { value: n, onValueChange: u }
331
349
  },
332
- /* @__PURE__ */ h.createElement("div", { role: "radiogroup", className: i }, a)
350
+ /* @__PURE__ */ e.createElement("div", { role: "radiogroup", className: i }, l)
333
351
  );
334
- }, K = () => {
335
- const e = h.useContext(I);
336
- if (!e)
352
+ }, ke = () => {
353
+ const t = e.useContext(ee);
354
+ if (!t)
337
355
  throw new Error("RadioGroupItem must be used within RadioGroup");
338
- return e;
339
- }, Z = u(
356
+ return t;
357
+ }, Se = b(
340
358
  [
341
359
  "relative inline-flex items-center justify-center",
342
- "border-2 rounded-full transition-colors duration-150",
343
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"
360
+ "border rounded-full transition-colors duration-150",
361
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
344
362
  ],
345
363
  {
346
364
  variants: {
347
365
  size: {
348
- sm: "h-5 w-5",
349
- md: "h-6 w-6",
350
- lg: "h-8 w-8"
366
+ sm: "h-4 w-4",
367
+ md: "h-5 w-5",
368
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
369
+ lg: "h-5 w-5"
351
370
  },
352
371
  checked: {
353
372
  true: "",
@@ -362,16 +381,16 @@ const I = h.createContext(null), Fe = ({
362
381
  {
363
382
  checked: !1,
364
383
  disabled: !1,
365
- className: "border-[#D0D5DD] bg-white"
384
+ className: "border-light-200 bg-white hover:border-light-400"
366
385
  },
367
386
  {
368
387
  checked: !0,
369
388
  disabled: !1,
370
- className: "border-primary-500 bg-primary-500"
389
+ className: "border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"
371
390
  },
372
391
  {
373
392
  disabled: !0,
374
- className: "border-[#E4E7EC] bg-[#F2F4F7]"
393
+ className: "border-light-200 bg-light-100"
375
394
  }
376
395
  ],
377
396
  defaultVariants: {
@@ -380,14 +399,15 @@ const I = h.createContext(null), Fe = ({
380
399
  disabled: !1
381
400
  }
382
401
  }
383
- ), q = u(
402
+ ), Ce = b(
384
403
  ["rounded-full bg-white transition-all"],
385
404
  {
386
405
  variants: {
387
406
  size: {
388
- sm: "h-2 w-2",
389
- md: "h-2.5 w-2.5",
390
- lg: "h-3 w-3"
407
+ sm: "h-1.5 w-1.5",
408
+ md: "h-2 w-2",
409
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
410
+ lg: "h-2 w-2"
391
411
  },
392
412
  checked: {
393
413
  true: "scale-100",
@@ -399,135 +419,163 @@ const I = h.createContext(null), Fe = ({
399
419
  checked: !1
400
420
  }
401
421
  }
402
- ), H = h.forwardRef(({ id: e, value: r, disabled: t, size: a = "md", className: i }, l) => {
403
- const { value: m, onValueChange: d } = K(), o = m === r;
404
- return /* @__PURE__ */ h.createElement(
422
+ ), ze = e.forwardRef(({ id: t, value: s, disabled: r, size: l = "md", className: i }, a) => {
423
+ const { value: c, onValueChange: n } = ke(), u = c === s;
424
+ return /* @__PURE__ */ e.createElement(
405
425
  "button",
406
426
  {
407
- ref: l,
408
- id: e,
427
+ ref: a,
428
+ id: t,
409
429
  type: "button",
410
430
  role: "radio",
411
- "aria-checked": o,
412
- disabled: t,
431
+ "aria-checked": u,
432
+ disabled: r,
413
433
  onClick: () => {
414
- t || d?.(r);
434
+ r || n?.(s);
415
435
  },
416
- className: x(
417
- Z({ size: a, checked: o, disabled: t }),
436
+ className: g(
437
+ Se({ size: l, checked: u, disabled: r }),
418
438
  i
419
439
  )
420
440
  },
421
- /* @__PURE__ */ h.createElement(
441
+ /* @__PURE__ */ e.createElement(
422
442
  "span",
423
443
  {
424
- className: q({
425
- size: a,
426
- checked: o
444
+ className: Ce({
445
+ size: l,
446
+ checked: u
427
447
  })
428
448
  }
429
449
  )
430
450
  );
431
451
  });
432
- H.displayName = "RadioGroupItem";
433
- const J = u(
434
- "relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors duration-200 focus-visible:outline-none",
452
+ ze.displayName = "RadioGroupItem";
453
+ const Le = b(
454
+ [
455
+ "inline-flex items-center shrink-0 rounded-full p-[2px]",
456
+ "transition-colors duration-200",
457
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"
458
+ ],
435
459
  {
436
460
  variants: {
437
461
  size: {
438
- sm: "h-6 w-10",
439
- md: "h-8 w-14",
440
- lg: "h-10 w-[72px]"
462
+ sm: "h-5 w-9",
463
+ md: "h-6 w-11",
464
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
465
+ lg: "h-6 w-11"
441
466
  },
442
467
  checked: {
443
- true: "bg-primary-500",
444
- false: "bg-[#e4e7ec]"
468
+ true: "justify-end",
469
+ false: "justify-start"
445
470
  },
446
471
  disabled: {
447
- true: "cursor-not-allowed opacity-60"
448
- }
449
- },
450
- defaultVariants: {
451
- size: "md",
452
- checked: !1
453
- }
454
- }
455
- ), Q = u(
456
- "absolute top-1 left-1 rounded-full bg-white transition-transform duration-200 shadow",
457
- {
458
- variants: {
459
- size: {
460
- sm: "h-4 w-4",
461
- md: "h-6 w-6",
462
- lg: "h-8 w-8"
472
+ true: "cursor-not-allowed",
473
+ false: "cursor-pointer"
463
474
  },
464
- checked: {
465
- true: "",
466
- false: ""
475
+ variant: {
476
+ default: "",
477
+ success: ""
467
478
  }
468
479
  },
469
480
  compoundVariants: [
470
481
  {
471
- size: "sm",
472
- checked: !0,
473
- className: "translate-x-4"
482
+ checked: !1,
483
+ disabled: !1,
484
+ className: "bg-light-200"
474
485
  },
475
486
  {
476
- size: "md",
477
487
  checked: !0,
478
- className: "translate-x-6"
488
+ disabled: !1,
489
+ variant: "default",
490
+ className: "bg-primary-500 hover:bg-primary-800"
479
491
  },
480
492
  {
481
- size: "lg",
482
493
  checked: !0,
483
- className: "translate-x-8"
494
+ disabled: !1,
495
+ variant: "success",
496
+ className: "bg-success-500 hover:bg-success-800"
497
+ },
498
+ {
499
+ disabled: !0,
500
+ className: "bg-light-100"
501
+ },
502
+ {
503
+ variant: "default",
504
+ className: "focus-visible:ring-primary-400"
505
+ },
506
+ {
507
+ variant: "success",
508
+ className: "focus-visible:ring-success-500"
484
509
  }
485
510
  ],
486
511
  defaultVariants: {
487
512
  size: "md",
488
- checked: !1
513
+ checked: !1,
514
+ disabled: !1,
515
+ variant: "default"
516
+ }
517
+ }
518
+ ), Be = b(
519
+ "rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",
520
+ {
521
+ variants: {
522
+ size: {
523
+ sm: "h-4 w-4",
524
+ md: "h-5 w-5",
525
+ // deprecated: `lg` is aliased to `md` for backward compatibility.
526
+ lg: "h-5 w-5"
527
+ },
528
+ disabled: {
529
+ true: "bg-light-50",
530
+ false: "bg-white"
531
+ }
532
+ },
533
+ defaultVariants: {
534
+ size: "md",
535
+ disabled: !1
489
536
  }
490
537
  }
491
- ), X = h.forwardRef(
538
+ ), Te = e.forwardRef(
492
539
  ({
493
- checked: e = !1,
494
- size: r = "md",
495
- disabled: t,
496
- onCheckedChange: a,
497
- className: i
498
- }, l) => /* @__PURE__ */ h.createElement(
540
+ checked: t = !1,
541
+ size: s = "md",
542
+ variant: r = "default",
543
+ disabled: l,
544
+ onCheckedChange: i,
545
+ className: a
546
+ }, c) => /* @__PURE__ */ e.createElement(
499
547
  "button",
500
548
  {
501
- ref: l,
549
+ ref: c,
502
550
  type: "button",
503
551
  role: "switch",
504
- "aria-checked": e,
505
- disabled: t,
552
+ "aria-checked": t,
553
+ disabled: l,
506
554
  onClick: () => {
507
- t || a?.(!e);
555
+ l || i?.(!t);
508
556
  },
509
- className: x(
510
- J({ size: r, checked: e, disabled: t }),
511
- i
557
+ className: g(
558
+ Le({ size: s, checked: t, disabled: l, variant: r }),
559
+ a
512
560
  )
513
561
  },
514
- /* @__PURE__ */ h.createElement(
562
+ /* @__PURE__ */ e.createElement(
515
563
  "span",
516
564
  {
517
- className: Q({
518
- size: r,
519
- checked: e
565
+ className: Be({
566
+ size: s,
567
+ disabled: l
520
568
  })
521
569
  }
522
570
  )
523
571
  )
524
572
  );
525
- X.displayName = "Toggle";
526
- const Y = u(
573
+ Te.displayName = "Toggle";
574
+ const Ve = b(
527
575
  [
528
- "relative rounded-xl px-4 py-2 text-sm text-white",
529
- "bg-[#020b1c]",
530
- "shadow-[0_10px_30px_rgba(2,8,23,0.25)]",
576
+ "relative rounded-lg text-caption-sm font-semibold text-white",
577
+ "bg-primary-900",
578
+ "shadow-lg",
531
579
  "pointer-events-none",
532
580
  "select-none"
533
581
  ],
@@ -538,426 +586,1789 @@ const Y = u(
538
586
  bottom: "",
539
587
  left: "",
540
588
  right: ""
589
+ },
590
+ hasSupportingText: {
591
+ true: "p-3",
592
+ false: "px-3 py-2"
541
593
  }
542
594
  },
543
595
  defaultVariants: {
544
- side: "top"
596
+ side: "top",
597
+ hasSupportingText: !1
545
598
  }
546
599
  }
547
- ), ee = u(
548
- [
549
- "absolute w-2 h-2 rotate-45",
550
- "bg-[#020b1c]"
551
- ],
552
- {
553
- variants: {
554
- side: {
555
- top: "bottom-[-4px] left-1/2 -translate-x-1/2",
556
- bottom: "top-[-4px] left-1/2 -translate-x-1/2",
557
- left: "right-[-4px] top-1/2 -translate-y-1/2",
558
- right: "left-[-4px] top-1/2 -translate-y-1/2"
559
- }
560
- },
561
- defaultVariants: {
562
- side: "top"
600
+ ), je = "mt-1 font-medium text-light-100", Ie = b(["absolute"], {
601
+ variants: {
602
+ side: {
603
+ top: [
604
+ "bottom-[-6px] left-1/2 -translate-x-1/2",
605
+ "border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"
606
+ ],
607
+ bottom: [
608
+ "top-[-6px] left-1/2 -translate-x-1/2",
609
+ "border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"
610
+ ],
611
+ left: [
612
+ "right-[-6px] top-1/2 -translate-y-1/2",
613
+ "border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"
614
+ ],
615
+ right: [
616
+ "left-[-6px] top-1/2 -translate-y-1/2",
617
+ "border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"
618
+ ]
563
619
  }
620
+ },
621
+ defaultVariants: {
622
+ side: "top"
564
623
  }
565
- ), C = 12, te = ({
566
- content: e,
624
+ }), O = 12, Oe = ({
625
+ content: t,
626
+ supportingText: s,
567
627
  side: r = "top",
568
- open: t,
569
- defaultOpen: a = !1,
570
- disabled: i = !1,
571
- delay: l = 0,
572
- className: m,
573
- children: d
628
+ open: l,
629
+ defaultOpen: i = !1,
630
+ disabled: a = !1,
631
+ delay: c = 0,
632
+ className: n,
633
+ children: u
574
634
  }) => {
575
- const [o, n] = h.useState(a), [c, f] = h.useState(null), g = h.useRef(null), b = h.useRef(null), y = () => {
576
- if (i || !g.current) return;
577
- const v = g.current.getBoundingClientRect();
578
- let p = 0, w = 0;
635
+ const [o, m] = e.useState(i), [p, f] = e.useState(null), h = e.useRef(null), E = e.useRef(null), w = () => {
636
+ if (a || !h.current) return;
637
+ const x = h.current.getBoundingClientRect();
638
+ let N = 0, C = 0;
579
639
  switch (r) {
580
640
  case "top":
581
- p = v.top - C, w = v.left + v.width / 2;
641
+ N = x.top - O, C = x.left + x.width / 2;
582
642
  break;
583
643
  case "bottom":
584
- p = v.bottom + C, w = v.left + v.width / 2;
644
+ N = x.bottom + O, C = x.left + x.width / 2;
585
645
  break;
586
646
  case "left":
587
- p = v.top + v.height / 2, w = v.left - C;
647
+ N = x.top + x.height / 2, C = x.left - O;
588
648
  break;
589
649
  case "right":
590
- p = v.top + v.height / 2, w = v.right + C;
650
+ N = x.top + x.height / 2, C = x.right + O;
591
651
  break;
592
652
  }
593
- const k = () => {
594
- f({ top: p, left: w }), n(!0);
653
+ const L = () => {
654
+ f({ top: N, left: C }), m(!0);
595
655
  };
596
- l > 0 ? b.current = window.setTimeout(k, l) : k();
597
- }, E = () => {
598
- b.current && (clearTimeout(b.current), b.current = null), n(!1);
599
- }, N = t ?? o;
600
- return /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(
656
+ c > 0 ? E.current = window.setTimeout(L, c) : L();
657
+ }, k = () => {
658
+ E.current && (clearTimeout(E.current), E.current = null), m(!1);
659
+ }, y = l ?? o;
660
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
601
661
  "span",
602
662
  {
603
- ref: g,
663
+ ref: h,
604
664
  className: "inline-flex",
605
- onMouseEnter: y,
606
- onMouseLeave: E,
607
- onFocus: y,
608
- onBlur: E,
665
+ onMouseEnter: w,
666
+ onMouseLeave: k,
667
+ onFocus: w,
668
+ onBlur: k,
609
669
  tabIndex: 0
610
670
  },
611
- d
612
- ), N && c && _(
613
- /* @__PURE__ */ h.createElement(
671
+ u
672
+ ), y && p && fe(
673
+ /* @__PURE__ */ e.createElement(
614
674
  "div",
615
675
  {
616
676
  role: "tooltip",
617
677
  className: "fixed z-[9999] pointer-events-none",
618
678
  style: {
619
- top: c.top,
620
- left: c.left,
679
+ top: p.top,
680
+ left: p.left,
621
681
  transform: r === "top" ? "translate(-50%, -100%)" : r === "bottom" ? "translate(-50%, 0)" : r === "left" ? "translate(-100%, -50%)" : "translate(0, -50%)"
622
682
  }
623
683
  },
624
- /* @__PURE__ */ h.createElement(
684
+ /* @__PURE__ */ e.createElement(
625
685
  "div",
626
686
  {
627
- className: x(
628
- Y({ side: r }),
629
- m
687
+ className: g(
688
+ Ve({
689
+ side: r,
690
+ hasSupportingText: !!s
691
+ }),
692
+ n
630
693
  )
631
694
  },
632
- e,
633
- /* @__PURE__ */ h.createElement("span", { className: ee({ side: r }) })
695
+ t,
696
+ s && /* @__PURE__ */ e.createElement("p", { className: je }, s),
697
+ /* @__PURE__ */ e.createElement("span", { className: Ie({ side: r }) })
634
698
  )
635
699
  ),
636
700
  document.body
637
701
  ));
638
702
  };
639
- te.displayName = "Tooltip";
640
- const re = u("flex flex-col gap-1 w-[320px]", {
641
- variants: {
642
- size: {
643
- sm: "text-caption-lg",
644
- md: "text-sm"
645
- }
703
+ Oe.displayName = "Tooltip";
704
+ const _e = {
705
+ brand: {
706
+ bg: "bg-primary-50",
707
+ border: "border-primary-300",
708
+ text: "text-primary-700"
646
709
  },
647
- defaultVariants: {
648
- size: "md"
649
- }
650
- }), se = u("flex items-center gap-1 font-bold text-sm", {
651
- variants: {
652
- error: {
653
- true: "",
654
- false: "text-light-800"
655
- }
710
+ gray: {
711
+ bg: "bg-white",
712
+ border: "border-light-200",
713
+ text: "text-light-800"
656
714
  },
657
- defaultVariants: {
658
- error: !1
715
+ error: {
716
+ bg: "bg-error-50",
717
+ border: "border-error-200",
718
+ text: "text-error-700"
719
+ },
720
+ warning: {
721
+ bg: "bg-warning-50",
722
+ border: "border-warning-200",
723
+ text: "text-warning-700"
724
+ },
725
+ success: {
726
+ bg: "bg-success-50",
727
+ border: "border-success-200",
728
+ text: "text-success-700"
729
+ },
730
+ "blue-gray": {
731
+ bg: "bg-blue-gray-50",
732
+ border: "border-blue-gray-200",
733
+ text: "text-blue-gray-700"
734
+ },
735
+ "blue-light": {
736
+ bg: "bg-blue-light-50",
737
+ border: "border-blue-light-200",
738
+ text: "text-blue-light-700"
739
+ },
740
+ indigo: {
741
+ bg: "bg-indigo-50",
742
+ border: "border-indigo-200",
743
+ text: "text-indigo-700"
744
+ },
745
+ purple: {
746
+ bg: "bg-purple-50",
747
+ border: "border-purple-200",
748
+ text: "text-purple-700"
749
+ },
750
+ blue: {
751
+ bg: "bg-blue-50",
752
+ border: "border-blue-200",
753
+ text: "text-blue-700"
754
+ },
755
+ pink: {
756
+ bg: "bg-pink-50",
757
+ border: "border-pink-200",
758
+ text: "text-pink-700"
759
+ },
760
+ orange: {
761
+ bg: "bg-orange-50",
762
+ border: "border-orange-200",
763
+ text: "text-orange-700"
659
764
  }
660
- }), ae = u(
765
+ }, $e = b(
661
766
  [
662
- "flex items-center w-full rounded-lg border",
663
- "bg-white transition-colors",
664
- "focus-within:ring-2"
767
+ "inline-flex items-center gap-1 border",
768
+ "font-medium transition-colors duration-150",
769
+ "select-none"
665
770
  ],
666
771
  {
667
772
  variants: {
668
773
  size: {
669
- sm: "h-9 px-3 gap-2",
670
- md: "h-11 px-3 gap-2"
774
+ sm: "text-caption-sm py-[3px]",
775
+ md: "text-caption-lg py-[2px]",
776
+ lg: "text-caption-lg py-1"
671
777
  },
672
- error: {
673
- true: ["border-error-200", "focus-within:ring-error-500"],
674
- false: ["border-light-200", "focus-within:ring-primary-500"]
778
+ shape: {
779
+ rounded: "rounded-md",
780
+ pill: "rounded-full"
781
+ },
782
+ hasLeading: {
783
+ true: "",
784
+ false: ""
785
+ },
786
+ hasTrailing: {
787
+ true: "",
788
+ false: ""
789
+ },
790
+ interactive: {
791
+ true: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
792
+ false: ""
675
793
  },
676
794
  disabled: {
677
- true: "bg-light-100 text-light-400 cursor-not-allowed",
795
+ true: "cursor-not-allowed opacity-60",
678
796
  false: ""
679
797
  }
680
798
  },
799
+ compoundVariants: [
800
+ { size: "sm", hasLeading: !1, className: "pl-2" },
801
+ { size: "sm", hasLeading: !0, className: "pl-1" },
802
+ { size: "sm", hasTrailing: !1, className: "pr-2" },
803
+ { size: "sm", hasTrailing: !0, className: "pr-1" },
804
+ { size: "md", hasLeading: !1, className: "pl-[9px]" },
805
+ { size: "md", hasLeading: !0, className: "pl-1" },
806
+ { size: "md", hasTrailing: !1, className: "pr-[9px]" },
807
+ { size: "md", hasTrailing: !0, className: "pr-1" },
808
+ { size: "lg", hasLeading: !1, className: "pl-2.5" },
809
+ { size: "lg", hasLeading: !0, className: "pl-1.5" },
810
+ { size: "lg", hasTrailing: !1, className: "pr-2.5" },
811
+ { size: "lg", hasTrailing: !0, className: "pr-1.5" }
812
+ ],
681
813
  defaultVariants: {
682
- size: "md",
683
- error: !1,
814
+ size: "sm",
815
+ shape: "rounded",
816
+ hasLeading: !1,
817
+ hasTrailing: !1,
818
+ interactive: !1,
684
819
  disabled: !1
685
820
  }
686
821
  }
687
- ), ie = u(
688
- [
689
- "flex-1 bg-transparent outline-none text-light-900",
690
- "placeholder:text-light-500",
691
- "disabled:text-light-400 disabled:cursor-not-allowed"
692
- ],
822
+ ), We = b(
823
+ ["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],
693
824
  {
694
825
  variants: {
695
- size: {
696
- sm: "text-caption-lg",
697
- md: "text-body-sm"
698
- },
699
- error: {
700
- true: "",
701
- false: "text-light-900"
826
+ checked: {
827
+ true: "bg-primary-500 border-primary-500",
828
+ false: ""
702
829
  }
703
830
  },
704
831
  defaultVariants: {
705
- size: "md",
706
- error: !1
707
- }
708
- }
709
- ), le = u("text-caption-lg", {
710
- variants: {
711
- error: {
712
- true: "text-error-600",
713
- false: "text-light-700"
832
+ checked: !1
714
833
  }
715
834
  }
716
- });
717
- function S({
718
- label: e,
719
- required: r,
720
- hint: t,
721
- rightIcon: a,
722
- size: i = "md",
723
- error: l = !1,
724
- disabled: m = !1,
725
- prefix: d,
726
- suffix: o,
727
- maxLength: n,
728
- value: c,
729
- className: f,
730
- wrapperClassName: g,
731
- ...b
732
- }) {
733
- return /* @__PURE__ */ s.createElement("div", { className: x(re({ size: i }), g) }, e && /* @__PURE__ */ s.createElement("label", { className: se({ error: l }) }, e, r && /* @__PURE__ */ s.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ s.createElement(
835
+ ), Re = "shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800", Me = "shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400", te = /^#([0-9a-f]{6})$/i, re = (t) => te.test(t.trim()), se = (t, s) => {
836
+ const r = te.exec(t.trim());
837
+ if (!r) return;
838
+ const l = parseInt(r[1], 16), i = l >> 16 & 255, a = l >> 8 & 255, c = l & 255;
839
+ return `rgba(${i}, ${a}, ${c}, ${s})`;
840
+ }, ae = ({
841
+ children: t,
842
+ size: s = "sm",
843
+ shape: r = "rounded",
844
+ icon: l,
845
+ checked: i,
846
+ onCheckedChange: a,
847
+ onClose: c,
848
+ count: n,
849
+ disabled: u = !1,
850
+ className: o,
851
+ color: m = "gray",
852
+ customColor: p
853
+ }) => {
854
+ const f = a !== void 0, h = i !== void 0 || !!l, E = !!c || n !== void 0, w = _e[m], k = !!(p && re(p)), y = k ? {
855
+ borderColor: p,
856
+ backgroundColor: se(p, 0.12),
857
+ color: p
858
+ } : void 0, x = () => {
859
+ u || a?.(!i);
860
+ }, N = (C) => {
861
+ !f || u || (C.key === "Enter" || C.key === " ") && (C.preventDefault(), x());
862
+ };
863
+ return /* @__PURE__ */ e.createElement(
734
864
  "div",
735
865
  {
736
- className: ae({
737
- size: i,
738
- error: l,
739
- disabled: m
740
- })
741
- },
742
- d && /* @__PURE__ */ s.createElement("div", { className: "flex items-center" }, d),
743
- /* @__PURE__ */ s.createElement(
744
- "input",
745
- {
746
- ...b,
747
- disabled: m,
748
- maxLength: n,
749
- value: c,
750
- className: x(ie({ size: i }), f)
751
- }
752
- ),
753
- (a || o) && /* @__PURE__ */ s.createElement("div", { className: "flex h-full items-center gap-2" }, a && /* @__PURE__ */ s.createElement("div", { className: "flex h-full items-center pb-0.5 text-light-400 hover:text-light-600" }, a), o && /* @__PURE__ */ s.createElement("div", { className: "flex h-full items-center gap-1 leading-none text-light-700" }, o))
754
- ), n && typeof c == "string" && /* @__PURE__ */ s.createElement("div", { className: "text-right text-xs text-light-400" }, c.length, "/", n), t && /* @__PURE__ */ s.createElement("p", { className: le({ error: l }) }, t));
755
- }
756
- function ne({ children: e }) {
757
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, e);
758
- }
759
- function oe({ children: e }) {
760
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, e);
761
- }
762
- var ce = {
763
- outline: {
764
- xmlns: "http://www.w3.org/2000/svg",
765
- width: 24,
766
- height: 24,
767
- viewBox: "0 0 24 24",
768
- fill: "none",
769
- stroke: "currentColor",
770
- strokeWidth: 2,
771
- strokeLinecap: "round",
772
- strokeLinejoin: "round"
773
- },
774
- filled: {
775
- xmlns: "http://www.w3.org/2000/svg",
776
- width: 24,
777
- height: 24,
778
- viewBox: "0 0 24 24",
779
- fill: "currentColor",
780
- stroke: "none"
781
- }
782
- };
783
- const ue = (e, r, t, a) => {
784
- const i = B(
785
- ({ color: l = "currentColor", size: m = 24, stroke: d = 2, title: o, className: n, children: c, ...f }, g) => V(
786
- "svg",
866
+ role: f ? "checkbox" : void 0,
867
+ "aria-checked": f ? !!i : void 0,
868
+ "aria-disabled": u || void 0,
869
+ tabIndex: f && !u ? 0 : void 0,
870
+ onClick: f ? x : void 0,
871
+ onKeyDown: N,
872
+ style: y,
873
+ className: g(
874
+ $e({
875
+ size: s,
876
+ shape: r,
877
+ hasLeading: h,
878
+ hasTrailing: E,
879
+ interactive: f,
880
+ disabled: u
881
+ }),
882
+ !k && w.bg,
883
+ !k && w.border,
884
+ !k && w.text,
885
+ o
886
+ )
887
+ },
888
+ i !== void 0 && /* @__PURE__ */ e.createElement(
889
+ "span",
787
890
  {
788
- ref: g,
789
- ...ce[e],
790
- width: m,
791
- height: m,
792
- className: ["tabler-icon", `tabler-icon-${r}`, n].join(" "),
793
- strokeWidth: d,
794
- stroke: l,
795
- ...f
891
+ className: g(
892
+ We({ checked: i }),
893
+ !i && !k && w.border
894
+ ),
895
+ style: !i && k ? { borderColor: p } : void 0
796
896
  },
797
- [
798
- o && V("title", { key: "svg-title" }, o),
799
- ...a.map(([b, y]) => V(b, y)),
800
- ...Array.isArray(c) ? c : [c]
801
- ]
802
- )
803
- );
804
- return i.displayName = `${t}`, i;
805
- };
806
- const de = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], A = ue("outline", "chevron-down", "ChevronDown", de);
807
- function _e({
808
- size: e = "md",
809
- label: r,
810
- required: t,
811
- hint: a,
812
- error: i,
813
- disabled: l,
814
- placeholder: m = "+1 (555) 000-0000",
815
- rightIcon: d,
816
- value: o,
817
- onChange: n,
818
- className: c,
819
- wrapperClassName: f
820
- }) {
821
- return /* @__PURE__ */ s.createElement(
822
- S,
823
- {
824
- size: e,
825
- label: r,
826
- required: t,
827
- hint: a,
828
- error: i,
829
- disabled: l,
830
- placeholder: m,
831
- rightIcon: d,
832
- value: o,
833
- onChange: n,
834
- className: c,
835
- wrapperClassName: f,
836
- prefix: /* @__PURE__ */ s.createElement("div", { className: "flex items-center gap-1 pr-2 text-sm text-light-700" }, /* @__PURE__ */ s.createElement("span", null, "US"), /* @__PURE__ */ s.createElement(A, { size: 14 }))
837
- }
838
- );
839
- }
840
- function Oe({
841
- size: e = "md",
842
- label: r,
843
- required: t,
844
- hint: a,
845
- error: i,
846
- disabled: l,
847
- value: m,
848
- placeholder: d = "1,000.00",
849
- currency: o = "USD",
850
- onCurrencyChange: n,
851
- rightIcon: c,
852
- onChange: f,
853
- className: g,
854
- wrapperClassName: b
855
- }) {
856
- return /* @__PURE__ */ s.createElement(
857
- S,
858
- {
859
- size: e,
860
- label: r,
861
- required: t,
862
- hint: a,
863
- error: i,
864
- disabled: l,
865
- value: m,
866
- placeholder: d,
867
- rightIcon: c,
868
- onChange: f,
869
- className: g,
870
- wrapperClassName: b,
871
- prefix: /* @__PURE__ */ s.createElement("span", { className: "select-none text-sm text-light-700" }, "$"),
872
- suffix: /* @__PURE__ */ s.createElement(
873
- "button",
897
+ i && /* @__PURE__ */ e.createElement(
898
+ "svg",
874
899
  {
875
- type: "button",
876
- disabled: l,
877
- onClick: n,
878
- className: "flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"
900
+ viewBox: "0 0 14 10",
901
+ fill: "none",
902
+ className: "size-full text-white"
879
903
  },
880
- o,
881
- /* @__PURE__ */ s.createElement(A, { size: 14 })
904
+ /* @__PURE__ */ e.createElement(
905
+ "path",
906
+ {
907
+ d: "M1 5L5 9L13 1",
908
+ stroke: "currentColor",
909
+ strokeWidth: "2",
910
+ strokeLinecap: "round",
911
+ strokeLinejoin: "round"
912
+ }
913
+ )
882
914
  )
883
- }
884
- );
885
- }
886
- function Pe({
887
- size: e = "md",
888
- label: r,
889
- required: t,
890
- hint: a,
891
- disabled: i,
892
- error: l,
893
- className: m,
894
- wrapperClassName: d,
895
- value: o,
896
- maxLength: n,
897
- placeholder: c,
898
- onChange: f
899
- }) {
900
- const g = o.length > n, b = l || g;
901
- return /* @__PURE__ */ s.createElement(
902
- S,
903
- {
904
- size: e,
905
- label: r,
906
- required: t,
907
- disabled: i,
908
- error: b,
909
- value: o,
910
- placeholder: c,
911
- onChange: f,
912
- className: m,
913
- wrapperClassName: d,
914
- hint: a,
915
- suffix: /* @__PURE__ */ s.createElement(
916
- "span",
917
- {
918
- className: x(
919
- "text-caption-lg",
920
- g ? "text-error-600" : "text-light-400"
921
- )
915
+ ),
916
+ l,
917
+ /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
918
+ n !== void 0 && /* @__PURE__ */ e.createElement("span", { className: Re }, n),
919
+ c && /* @__PURE__ */ e.createElement(
920
+ "button",
921
+ {
922
+ type: "button",
923
+ "aria-label": "Remove",
924
+ disabled: u,
925
+ onClick: (C) => {
926
+ C.stopPropagation(), c();
922
927
  },
923
- o.length,
924
- "/",
925
- n
926
- )
927
- }
928
+ className: Me
929
+ },
930
+ /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 10 10", fill: "none", className: "size-2.5" }, /* @__PURE__ */ e.createElement(
931
+ "path",
932
+ {
933
+ d: "M1 1L9 9M9 1L1 9",
934
+ stroke: "currentColor",
935
+ strokeWidth: "1.5",
936
+ strokeLinecap: "round"
937
+ }
938
+ ))
939
+ )
928
940
  );
929
- }
930
- function Ge({
931
- size: e = "md",
932
- label: r = "Card number",
933
- required: t,
934
- hint: a,
935
- error: i,
936
- disabled: l,
937
- placeholder: m = "Card number",
938
- value: d,
939
- onChange: o,
941
+ };
942
+ ae.displayName = "Tag";
943
+ const Ae = {
944
+ brand: {
945
+ solidBg: "bg-primary-50",
946
+ solidBorder: "border-primary-300",
947
+ solidText: "text-primary-500",
948
+ outlineBorder: "border-primary-500",
949
+ outlineText: "text-primary-700"
950
+ },
951
+ gray: {
952
+ solidBg: "bg-light-50",
953
+ solidBorder: "border-light-200",
954
+ solidText: "text-light-700",
955
+ outlineBorder: "border-light-600",
956
+ outlineText: "text-light-700"
957
+ },
958
+ error: {
959
+ solidBg: "bg-error-50",
960
+ solidBorder: "border-error-200",
961
+ solidText: "text-error-700",
962
+ outlineBorder: "border-error-600",
963
+ outlineText: "text-error-700"
964
+ },
965
+ warning: {
966
+ solidBg: "bg-warning-50",
967
+ solidBorder: "border-warning-200",
968
+ solidText: "text-warning-700",
969
+ outlineBorder: "border-warning-600",
970
+ outlineText: "text-warning-700"
971
+ },
972
+ success: {
973
+ solidBg: "bg-success-50",
974
+ solidBorder: "border-success-200",
975
+ solidText: "text-success-700",
976
+ outlineBorder: "border-success-600",
977
+ outlineText: "text-success-700"
978
+ },
979
+ "blue-gray": {
980
+ solidBg: "bg-blue-gray-50",
981
+ solidBorder: "border-blue-gray-200",
982
+ solidText: "text-blue-gray-700",
983
+ outlineBorder: "border-blue-gray-600",
984
+ outlineText: "text-blue-gray-700"
985
+ },
986
+ "blue-light": {
987
+ solidBg: "bg-blue-light-50",
988
+ solidBorder: "border-blue-light-200",
989
+ solidText: "text-blue-light-700",
990
+ outlineBorder: "border-blue-light-600",
991
+ outlineText: "text-blue-light-700"
992
+ },
993
+ indigo: {
994
+ solidBg: "bg-indigo-50",
995
+ solidBorder: "border-indigo-200",
996
+ solidText: "text-indigo-700",
997
+ outlineBorder: "border-indigo-600",
998
+ outlineText: "text-indigo-700"
999
+ },
1000
+ purple: {
1001
+ solidBg: "bg-purple-50",
1002
+ solidBorder: "border-purple-200",
1003
+ solidText: "text-purple-700",
1004
+ outlineBorder: "border-purple-600",
1005
+ outlineText: "text-purple-700"
1006
+ },
1007
+ blue: {
1008
+ solidBg: "bg-blue-50",
1009
+ solidBorder: "border-blue-200",
1010
+ solidText: "text-blue-700",
1011
+ outlineBorder: "border-blue-600",
1012
+ outlineText: "text-blue-700"
1013
+ },
1014
+ pink: {
1015
+ solidBg: "bg-pink-50",
1016
+ solidBorder: "border-pink-200",
1017
+ solidText: "text-pink-700",
1018
+ outlineBorder: "border-pink-600",
1019
+ outlineText: "text-pink-700"
1020
+ },
1021
+ orange: {
1022
+ solidBg: "bg-orange-50",
1023
+ solidBorder: "border-orange-200",
1024
+ solidText: "text-orange-700",
1025
+ outlineBorder: "border-orange-600",
1026
+ outlineText: "text-orange-700"
1027
+ }
1028
+ }, Pe = b(
1029
+ [
1030
+ "inline-flex items-center gap-1 border font-medium",
1031
+ "transition-colors duration-150"
1032
+ ],
1033
+ {
1034
+ variants: {
1035
+ size: {
1036
+ sm: "text-caption-sm py-0.5",
1037
+ md: "text-caption-lg py-0.5",
1038
+ lg: "text-caption-lg py-1"
1039
+ },
1040
+ shape: {
1041
+ pill: "rounded-full",
1042
+ badge: ""
1043
+ },
1044
+ modern: {
1045
+ true: "rounded-md shadow-xs",
1046
+ false: ""
1047
+ },
1048
+ hasLeading: {
1049
+ true: "",
1050
+ false: ""
1051
+ },
1052
+ hasTrailing: {
1053
+ true: "",
1054
+ false: ""
1055
+ },
1056
+ iconOnly: {
1057
+ true: "p-[5px]",
1058
+ false: ""
1059
+ },
1060
+ interactive: {
1061
+ true: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
1062
+ false: ""
1063
+ },
1064
+ disabled: {
1065
+ true: "cursor-not-allowed opacity-60",
1066
+ false: ""
1067
+ }
1068
+ },
1069
+ compoundVariants: [
1070
+ // shape=badge radius (only applies when not overridden by `modern`)
1071
+ { shape: "badge", size: "sm", modern: !1, className: "rounded-md" },
1072
+ { shape: "badge", size: "md", modern: !1, className: "rounded-md" },
1073
+ { shape: "badge", size: "lg", modern: !1, className: "rounded-lg" },
1074
+ // horizontal padding (skipped entirely when iconOnly)
1075
+ {
1076
+ size: "sm",
1077
+ shape: "pill",
1078
+ iconOnly: !1,
1079
+ hasLeading: !1,
1080
+ className: "pl-2"
1081
+ },
1082
+ {
1083
+ size: "sm",
1084
+ shape: "badge",
1085
+ iconOnly: !1,
1086
+ hasLeading: !1,
1087
+ className: "pl-1.5"
1088
+ },
1089
+ { size: "sm", iconOnly: !1, hasLeading: !0, className: "pl-1" },
1090
+ {
1091
+ size: "sm",
1092
+ iconOnly: !1,
1093
+ hasTrailing: !1,
1094
+ className: "pr-2"
1095
+ },
1096
+ { size: "sm", iconOnly: !1, hasTrailing: !0, className: "pr-1" },
1097
+ {
1098
+ size: "md",
1099
+ iconOnly: !1,
1100
+ hasLeading: !1,
1101
+ className: "pl-2.5"
1102
+ },
1103
+ { size: "md", iconOnly: !1, hasLeading: !0, className: "pl-1" },
1104
+ {
1105
+ size: "md",
1106
+ iconOnly: !1,
1107
+ hasTrailing: !1,
1108
+ className: "pr-2.5"
1109
+ },
1110
+ { size: "md", iconOnly: !1, hasTrailing: !0, className: "pr-1" },
1111
+ {
1112
+ size: "lg",
1113
+ shape: "pill",
1114
+ iconOnly: !1,
1115
+ hasLeading: !1,
1116
+ className: "pl-3"
1117
+ },
1118
+ {
1119
+ size: "lg",
1120
+ shape: "badge",
1121
+ iconOnly: !1,
1122
+ hasLeading: !1,
1123
+ className: "pl-2.5"
1124
+ },
1125
+ { size: "lg", iconOnly: !1, hasLeading: !0, className: "pl-1.5" },
1126
+ {
1127
+ size: "lg",
1128
+ shape: "pill",
1129
+ iconOnly: !1,
1130
+ hasTrailing: !1,
1131
+ className: "pr-3"
1132
+ },
1133
+ {
1134
+ size: "lg",
1135
+ shape: "badge",
1136
+ iconOnly: !1,
1137
+ hasTrailing: !1,
1138
+ className: "pr-2.5"
1139
+ },
1140
+ { size: "lg", iconOnly: !1, hasTrailing: !0, className: "pr-1.5" }
1141
+ ],
1142
+ defaultVariants: {
1143
+ size: "sm",
1144
+ shape: "pill",
1145
+ modern: !1,
1146
+ hasLeading: !1,
1147
+ hasTrailing: !1,
1148
+ iconOnly: !1,
1149
+ interactive: !1,
1150
+ disabled: !1
1151
+ }
1152
+ }
1153
+ ), De = "size-4 shrink-0 rounded border bg-white", Ge = "shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400", He = ({
1154
+ children: t,
1155
+ size: s = "sm",
1156
+ shape: r = "pill",
1157
+ variant: l = "solid",
1158
+ color: i = "brand",
1159
+ customColor: a,
1160
+ modern: c = !1,
1161
+ icon: n,
1162
+ trailingIcon: u,
1163
+ checked: o,
1164
+ onCheckedChange: m,
1165
+ onClose: p,
1166
+ iconOnly: f = !1,
1167
+ disabled: h = !1,
1168
+ className: E
1169
+ }) => {
1170
+ const w = m !== void 0, k = o !== void 0 || !!n, y = !!p || !!u, x = Ae[i], N = !!(a && re(a)), C = N ? {
1171
+ borderColor: a,
1172
+ color: a,
1173
+ backgroundColor: l === "outline" ? "transparent" : se(a, 0.1)
1174
+ } : void 0, L = () => {
1175
+ h || m?.(!o);
1176
+ }, S = (z) => {
1177
+ !w || h || (z.key === "Enter" || z.key === " ") && (z.preventDefault(), L());
1178
+ };
1179
+ return /* @__PURE__ */ e.createElement(
1180
+ "div",
1181
+ {
1182
+ role: w ? "checkbox" : void 0,
1183
+ "aria-checked": w ? !!o : void 0,
1184
+ "aria-disabled": h || void 0,
1185
+ tabIndex: w && !h ? 0 : void 0,
1186
+ onClick: w ? L : void 0,
1187
+ onKeyDown: S,
1188
+ style: C,
1189
+ className: g(
1190
+ Pe({
1191
+ size: s,
1192
+ shape: r,
1193
+ modern: c,
1194
+ hasLeading: k,
1195
+ hasTrailing: y,
1196
+ iconOnly: f,
1197
+ interactive: w,
1198
+ disabled: h
1199
+ }),
1200
+ !N && (l === "outline" ? g("bg-transparent", x.outlineBorder, x.outlineText) : g(x.solidBg, x.solidBorder, x.solidText)),
1201
+ E
1202
+ )
1203
+ },
1204
+ o !== void 0 && /* @__PURE__ */ e.createElement(
1205
+ "span",
1206
+ {
1207
+ className: g(
1208
+ De,
1209
+ o ? "bg-primary-500 border-primary-500" : !N && x.solidBorder
1210
+ ),
1211
+ style: !o && N ? { borderColor: a } : void 0
1212
+ },
1213
+ o && /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 14 10", fill: "none", className: "size-full text-white" }, /* @__PURE__ */ e.createElement(
1214
+ "path",
1215
+ {
1216
+ d: "M1 5L5 9L13 1",
1217
+ stroke: "currentColor",
1218
+ strokeWidth: "2",
1219
+ strokeLinecap: "round",
1220
+ strokeLinejoin: "round"
1221
+ }
1222
+ ))
1223
+ ),
1224
+ n,
1225
+ !f && /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
1226
+ u,
1227
+ p && /* @__PURE__ */ e.createElement(
1228
+ "button",
1229
+ {
1230
+ type: "button",
1231
+ "aria-label": "Remove",
1232
+ disabled: h,
1233
+ onClick: (z) => {
1234
+ z.stopPropagation(), p();
1235
+ },
1236
+ className: Ge
1237
+ },
1238
+ /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 10 10", fill: "none", className: "size-2.5" }, /* @__PURE__ */ e.createElement(
1239
+ "path",
1240
+ {
1241
+ d: "M1 1L9 9M9 1L1 9",
1242
+ stroke: "currentColor",
1243
+ strokeWidth: "1.5",
1244
+ strokeLinecap: "round"
1245
+ }
1246
+ ))
1247
+ )
1248
+ );
1249
+ };
1250
+ He.displayName = "Badge";
1251
+ const Fe = {
1252
+ brand: {
1253
+ bg50: "bg-primary-50",
1254
+ hoverBg100: "hover:bg-primary-100",
1255
+ border200: "border-primary-200",
1256
+ border500: "border-primary-500",
1257
+ text500: "text-primary-500"
1258
+ },
1259
+ gray: {
1260
+ bg50: "bg-light-50",
1261
+ hoverBg100: "hover:bg-light-100",
1262
+ border200: "border-light-200",
1263
+ border500: "border-light-500",
1264
+ text500: "text-light-500"
1265
+ },
1266
+ error: {
1267
+ bg50: "bg-error-50",
1268
+ hoverBg100: "hover:bg-error-100",
1269
+ border200: "border-error-200",
1270
+ border500: "border-error-500",
1271
+ text500: "text-error-500"
1272
+ },
1273
+ warning: {
1274
+ bg50: "bg-warning-50",
1275
+ hoverBg100: "hover:bg-warning-100",
1276
+ border200: "border-warning-200",
1277
+ border500: "border-warning-500",
1278
+ text500: "text-warning-500"
1279
+ },
1280
+ success: {
1281
+ bg50: "bg-success-50",
1282
+ hoverBg100: "hover:bg-success-100",
1283
+ border200: "border-success-200",
1284
+ border500: "border-success-500",
1285
+ text500: "text-success-500"
1286
+ }
1287
+ }, Ke = {
1288
+ md: {
1289
+ outerPad: { leading: "pl-1 pr-2.5 py-1", trailing: "pl-3 pr-1 py-1" },
1290
+ gap: "gap-2",
1291
+ chipPad: "px-2 py-0.5",
1292
+ text: "text-caption-lg"
1293
+ },
1294
+ lg: {
1295
+ outerPad: { leading: "pl-1.5 pr-3 py-1.5", trailing: "pl-3 pr-1.5 py-1.5" },
1296
+ gap: "gap-2",
1297
+ chipPad: "px-2.5 py-[3px]",
1298
+ text: "text-body-sm"
1299
+ }
1300
+ }, Ze = ({
1301
+ badgeLabel: t,
1302
+ children: s,
1303
+ size: r = "md",
1304
+ theme: l = "light",
1305
+ color: i = "brand",
1306
+ badgePosition: a = "leading",
1307
+ icon: c,
1308
+ onClick: n,
1309
+ className: u
1310
+ }) => {
1311
+ const o = Fe[i], m = Ke[r], p = l === "modern", f = l === "outline", h = g(
1312
+ "inline-flex items-center border transition-colors duration-150",
1313
+ m.gap,
1314
+ m.outerPad[a],
1315
+ p ? "rounded-lg bg-light-50 border-light-200 shadow-xs" : f ? g("rounded-full bg-white border-[1.5px]", o.border500) : g("rounded-full", o.bg50, o.border200, o.hoverBg100),
1316
+ n && "cursor-pointer",
1317
+ u
1318
+ ), E = g(
1319
+ "inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",
1320
+ m.chipPad,
1321
+ m.text,
1322
+ p ? "rounded-md bg-white border-light-200 text-light-800" : f ? g("rounded-full bg-white border-[1.5px]", o.border500, o.text500) : g("rounded-full bg-white", o.border200, o.text500)
1323
+ ), w = g(
1324
+ "inline-flex items-center gap-1 font-medium",
1325
+ m.text,
1326
+ p ? "text-light-800" : o.text500
1327
+ ), k = /* @__PURE__ */ e.createElement("span", { className: E }, p && /* @__PURE__ */ e.createElement("span", { className: "size-2 shrink-0 rounded-full bg-light-400" }), t);
1328
+ return /* @__PURE__ */ e.createElement(
1329
+ "div",
1330
+ {
1331
+ role: n ? "button" : void 0,
1332
+ tabIndex: n ? 0 : void 0,
1333
+ onClick: n,
1334
+ className: h
1335
+ },
1336
+ a === "leading" && k,
1337
+ /* @__PURE__ */ e.createElement("span", { className: w }, s, c),
1338
+ a === "trailing" && k
1339
+ );
1340
+ };
1341
+ Ze.displayName = "BadgeGroup";
1342
+ const Ue = ({ size: t }) => {
1343
+ const s = t * 0.09, r = (t - s) / 2, l = 2 * Math.PI * r;
1344
+ return /* @__PURE__ */ e.createElement(
1345
+ "svg",
1346
+ {
1347
+ width: t,
1348
+ height: t,
1349
+ viewBox: `0 0 ${t} ${t}`,
1350
+ fill: "none",
1351
+ className: "animate-spin"
1352
+ },
1353
+ /* @__PURE__ */ e.createElement(
1354
+ "circle",
1355
+ {
1356
+ cx: t / 2,
1357
+ cy: t / 2,
1358
+ r,
1359
+ strokeWidth: s,
1360
+ className: "stroke-light-100"
1361
+ }
1362
+ ),
1363
+ /* @__PURE__ */ e.createElement(
1364
+ "circle",
1365
+ {
1366
+ cx: t / 2,
1367
+ cy: t / 2,
1368
+ r,
1369
+ strokeWidth: s,
1370
+ strokeLinecap: "round",
1371
+ strokeDasharray: `${l * 0.25} ${l}`,
1372
+ className: "stroke-primary-600"
1373
+ }
1374
+ )
1375
+ );
1376
+ }, qe = ({ size: t }) => {
1377
+ const s = e.useId(), r = t * 0.125, l = (t - r) / 2, i = 2 * Math.PI * l;
1378
+ return /* @__PURE__ */ e.createElement(
1379
+ "svg",
1380
+ {
1381
+ width: t,
1382
+ height: t,
1383
+ viewBox: `0 0 ${t} ${t}`,
1384
+ fill: "none",
1385
+ className: "animate-spin text-primary-600"
1386
+ },
1387
+ /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("linearGradient", { id: s, x1: "100%", y1: "0%", x2: "0%", y2: "100%" }, /* @__PURE__ */ e.createElement("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "1" }), /* @__PURE__ */ e.createElement("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" }))),
1388
+ /* @__PURE__ */ e.createElement(
1389
+ "circle",
1390
+ {
1391
+ cx: t / 2,
1392
+ cy: t / 2,
1393
+ r: l,
1394
+ strokeWidth: r,
1395
+ className: "stroke-light-100"
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ e.createElement(
1399
+ "circle",
1400
+ {
1401
+ cx: t / 2,
1402
+ cy: t / 2,
1403
+ r: l,
1404
+ strokeWidth: r,
1405
+ strokeLinecap: "round",
1406
+ stroke: `url(#${s})`,
1407
+ strokeDasharray: `${i * 0.75} ${i}`
1408
+ }
1409
+ )
1410
+ );
1411
+ }, Qe = ({ size: t }) => {
1412
+ const r = Math.max(t * 0.1, 3), l = (t - r) / 2;
1413
+ return /* @__PURE__ */ e.createElement(
1414
+ "div",
1415
+ {
1416
+ className: "relative animate-spin",
1417
+ style: { width: t, height: t }
1418
+ },
1419
+ Array.from({ length: 12 }).map((i, a) => {
1420
+ const c = 30 * a, n = 0.15 + 0.85 * a / 11;
1421
+ return /* @__PURE__ */ e.createElement(
1422
+ "span",
1423
+ {
1424
+ key: a,
1425
+ className: "absolute rounded-full bg-primary-600 top-1/2 left-1/2",
1426
+ style: {
1427
+ width: r,
1428
+ height: r,
1429
+ opacity: n,
1430
+ marginTop: -r / 2,
1431
+ marginLeft: -r / 2,
1432
+ transform: `rotate(${c}deg) translate(${l}px) rotate(${-c}deg)`
1433
+ }
1434
+ }
1435
+ );
1436
+ })
1437
+ );
1438
+ }, Xe = {
1439
+ sm: { box: 32, gapClass: "gap-4", textClass: "text-caption-lg" },
1440
+ md: { box: 48, gapClass: "gap-4", textClass: "text-caption-lg" },
1441
+ lg: { box: 56, gapClass: "gap-4", textClass: "text-body-lg" },
1442
+ xl: { box: 64, gapClass: "gap-5", textClass: "text-body-lg" }
1443
+ }, Je = ({
1444
+ size: t = "sm",
1445
+ style: s = "line-simple",
1446
+ supportingText: r = !0,
1447
+ label: l = "Loading...",
1448
+ className: i
1449
+ }) => {
1450
+ const { box: a, gapClass: c, textClass: n } = Xe[t];
1451
+ return /* @__PURE__ */ e.createElement(
1452
+ "div",
1453
+ {
1454
+ role: "status",
1455
+ "aria-label": typeof l == "string" ? l : "Loading",
1456
+ className: g("inline-flex flex-col items-center", c, i)
1457
+ },
1458
+ s === "line-simple" && /* @__PURE__ */ e.createElement(Ue, { size: a }),
1459
+ s === "line-spinner" && /* @__PURE__ */ e.createElement(qe, { size: a }),
1460
+ s === "dot-circle" && /* @__PURE__ */ e.createElement(Qe, { size: a }),
1461
+ r && /* @__PURE__ */ e.createElement(
1462
+ "p",
1463
+ {
1464
+ className: g(
1465
+ "font-medium text-light-700 whitespace-nowrap",
1466
+ n
1467
+ )
1468
+ },
1469
+ l
1470
+ )
1471
+ );
1472
+ };
1473
+ Je.displayName = "Loading";
1474
+ const le = ({
1475
+ className: t,
1476
+ style: s
1477
+ }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: t, style: s }, /* @__PURE__ */ e.createElement(
1478
+ "path",
1479
+ {
1480
+ d: "M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",
1481
+ stroke: "currentColor",
1482
+ strokeWidth: "1.75"
1483
+ }
1484
+ ), /* @__PURE__ */ e.createElement(
1485
+ "path",
1486
+ {
1487
+ d: "M3.75 20.25a8.25 8.25 0 0 1 16.5 0",
1488
+ stroke: "currentColor",
1489
+ strokeWidth: "1.75",
1490
+ strokeLinecap: "round"
1491
+ }
1492
+ )), ie = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement("circle", { cx: "10", cy: "10", r: "9", className: "fill-primary-500 stroke-white", strokeWidth: "1.5" }), /* @__PURE__ */ e.createElement(
1493
+ "path",
1494
+ {
1495
+ d: "M6 10.2 8.6 12.8 14 7",
1496
+ stroke: "white",
1497
+ strokeWidth: "1.75",
1498
+ strokeLinecap: "round",
1499
+ strokeLinejoin: "round"
1500
+ }
1501
+ )), Ye = {
1502
+ xs: { box: 24, borderWidth: "0.5px", statusSize: 6, badgeSize: 10, textClass: "text-caption-sm" },
1503
+ sm: { box: 32, borderWidth: "0.5px", statusSize: 8, badgeSize: 12, textClass: "text-caption-lg" },
1504
+ md: { box: 40, borderWidth: "0.75px", statusSize: 10, badgeSize: 14, textClass: "text-body-sm" },
1505
+ lg: { box: 48, borderWidth: "0.75px", statusSize: 12, badgeSize: 16, textClass: "text-body-lg" },
1506
+ xl: { box: 56, borderWidth: "0.75px", statusSize: 14, badgeSize: 18, textClass: "text-h6" },
1507
+ "2xl": { box: 64, borderWidth: "0.75px", statusSize: 16, badgeSize: 20, textClass: "text-h5 leading-7" }
1508
+ }, et = "#17B26A", _ = ({
1509
+ src: t,
1510
+ alt: s,
1511
+ initials: r,
1512
+ size: l = "md",
1513
+ status: i = "none",
1514
+ statusIcon: a,
1515
+ contrastBorder: c = !0,
1516
+ className: n
1517
+ }) => {
1518
+ const { box: u, borderWidth: o, statusSize: m, badgeSize: p, textClass: f } = Ye[l], h = t ? "image" : r !== void 0 ? "initials" : "placeholder";
1519
+ return /* @__PURE__ */ e.createElement(
1520
+ "div",
1521
+ {
1522
+ className: g("relative inline-block shrink-0 rounded-full", n),
1523
+ style: { width: u, height: u }
1524
+ },
1525
+ h === "image" && /* @__PURE__ */ e.createElement(
1526
+ "img",
1527
+ {
1528
+ src: t,
1529
+ alt: s ?? "",
1530
+ className: "absolute inset-0 size-full rounded-full object-cover"
1531
+ }
1532
+ ),
1533
+ h === "placeholder" && /* @__PURE__ */ e.createElement("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-light-50" }, /* @__PURE__ */ e.createElement(
1534
+ le,
1535
+ {
1536
+ className: "text-light-300",
1537
+ style: { width: u * 0.55, height: u * 0.55 }
1538
+ }
1539
+ )),
1540
+ h === "initials" && /* @__PURE__ */ e.createElement(
1541
+ "div",
1542
+ {
1543
+ className: g(
1544
+ "absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",
1545
+ f
1546
+ )
1547
+ },
1548
+ r
1549
+ ),
1550
+ c && /* @__PURE__ */ e.createElement(
1551
+ "div",
1552
+ {
1553
+ className: "pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",
1554
+ style: { borderWidth: o, borderStyle: "solid" }
1555
+ }
1556
+ ),
1557
+ i === "online" && /* @__PURE__ */ e.createElement(
1558
+ "span",
1559
+ {
1560
+ className: "absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",
1561
+ style: {
1562
+ width: m,
1563
+ height: m,
1564
+ backgroundColor: et
1565
+ }
1566
+ }
1567
+ ),
1568
+ i === "company" && /* @__PURE__ */ e.createElement(
1569
+ "div",
1570
+ {
1571
+ className: "absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",
1572
+ style: { width: p, height: p }
1573
+ },
1574
+ a
1575
+ ),
1576
+ i === "verified" && /* @__PURE__ */ e.createElement(
1577
+ "div",
1578
+ {
1579
+ className: "absolute bottom-0 right-0",
1580
+ style: { width: p, height: p }
1581
+ },
1582
+ /* @__PURE__ */ e.createElement(ie, { className: "size-full" })
1583
+ )
1584
+ );
1585
+ };
1586
+ _.displayName = "Avatar";
1587
+ const tt = {
1588
+ xs: { box: 24, overlap: -4, contrastBorderWidth: "0.5px", plusIconSize: 16, textClass: "text-caption-sm" },
1589
+ sm: { box: 32, overlap: -8, contrastBorderWidth: "0.5px", plusIconSize: 16, textClass: "text-caption-lg" },
1590
+ md: { box: 40, overlap: -12, contrastBorderWidth: "0.75px", plusIconSize: 20, textClass: "text-body-sm" }
1591
+ }, rt = ({
1592
+ avatars: t,
1593
+ max: s,
1594
+ size: r = "xs",
1595
+ onAdd: l,
1596
+ className: i
1597
+ }) => {
1598
+ const { box: a, overlap: c, contrastBorderWidth: n, textClass: u } = tt[r], o = s ? t.slice(0, s) : t, m = s && t.length > s ? t.length - s : 0;
1599
+ return /* @__PURE__ */ e.createElement("div", { className: g("inline-flex items-start gap-2", i) }, /* @__PURE__ */ e.createElement("div", { className: "flex items-start" }, o.map((p, f) => /* @__PURE__ */ e.createElement(
1600
+ "div",
1601
+ {
1602
+ key: f,
1603
+ className: "relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",
1604
+ style: { width: a, height: a, marginRight: c }
1605
+ },
1606
+ p.src ? /* @__PURE__ */ e.createElement(
1607
+ "img",
1608
+ {
1609
+ src: p.src,
1610
+ alt: p.alt ?? "",
1611
+ className: "size-full object-cover"
1612
+ }
1613
+ ) : /* @__PURE__ */ e.createElement("div", { className: "flex size-full items-center justify-center bg-light-50 font-semibold text-light-500" }, p.initials),
1614
+ /* @__PURE__ */ e.createElement(
1615
+ "div",
1616
+ {
1617
+ className: "pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",
1618
+ style: { borderWidth: n, borderStyle: "solid" }
1619
+ }
1620
+ )
1621
+ )), m > 0 && /* @__PURE__ */ e.createElement(
1622
+ "div",
1623
+ {
1624
+ className: "relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",
1625
+ style: { width: a, height: a }
1626
+ },
1627
+ /* @__PURE__ */ e.createElement("span", { className: g("font-semibold text-light-600", u) }, "+", m)
1628
+ )), l && /* @__PURE__ */ e.createElement(
1629
+ "button",
1630
+ {
1631
+ type: "button",
1632
+ onClick: l,
1633
+ "aria-label": "Add",
1634
+ className: "flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",
1635
+ style: { width: a, height: a }
1636
+ },
1637
+ /* @__PURE__ */ e.createElement(
1638
+ "svg",
1639
+ {
1640
+ width: a * 0.4,
1641
+ height: a * 0.4,
1642
+ viewBox: "0 0 20 20",
1643
+ fill: "none"
1644
+ },
1645
+ /* @__PURE__ */ e.createElement(
1646
+ "path",
1647
+ {
1648
+ d: "M10 4v12M4 10h12",
1649
+ stroke: "currentColor",
1650
+ strokeWidth: "1.75",
1651
+ strokeLinecap: "round"
1652
+ }
1653
+ )
1654
+ )
1655
+ ));
1656
+ };
1657
+ rt.displayName = "AvatarGroup";
1658
+ const st = {
1659
+ xs: { nameClass: "text-caption-sm", subtitleClass: "text-caption-sm" },
1660
+ sm: { nameClass: "text-caption-lg", subtitleClass: "text-caption-sm" },
1661
+ md: { nameClass: "text-caption-lg", subtitleClass: "text-caption-lg" },
1662
+ lg: { nameClass: "text-body-sm", subtitleClass: "text-body-sm" },
1663
+ xl: { nameClass: "text-body-lg", subtitleClass: "text-body-sm" }
1664
+ }, at = ({
1665
+ name: t,
1666
+ subtitle: s,
1667
+ src: r,
1668
+ initials: l,
1669
+ size: i = "xs",
1670
+ status: a = "none",
1671
+ statusIcon: c,
1672
+ className: n
1673
+ }) => {
1674
+ const { nameClass: u, subtitleClass: o } = st[i];
1675
+ return /* @__PURE__ */ e.createElement("div", { className: g("inline-flex items-center gap-2", n) }, /* @__PURE__ */ e.createElement(
1676
+ _,
1677
+ {
1678
+ src: r,
1679
+ initials: l,
1680
+ size: i,
1681
+ status: a,
1682
+ statusIcon: c
1683
+ }
1684
+ ), /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-start whitespace-nowrap" }, /* @__PURE__ */ e.createElement("span", { className: g("font-bold text-light-800", u) }, t), s && /* @__PURE__ */ e.createElement("span", { className: g("font-normal text-light-700", o) }, s)));
1685
+ };
1686
+ at.displayName = "AvatarLabelGroup";
1687
+ const lt = {
1688
+ sm: {
1689
+ box: 72,
1690
+ ringWidth: 3,
1691
+ shadowClass: "shadow-md",
1692
+ iconSize: 36,
1693
+ textClass: "text-h4",
1694
+ verifiedSize: 20,
1695
+ verifiedOffset: 0
1696
+ },
1697
+ md: {
1698
+ box: 96,
1699
+ ringWidth: 4,
1700
+ shadowClass: "shadow-lg",
1701
+ iconSize: 48,
1702
+ textClass: "text-h3",
1703
+ verifiedSize: 24,
1704
+ verifiedOffset: 0
1705
+ },
1706
+ lg: {
1707
+ box: 160,
1708
+ ringWidth: 4,
1709
+ shadowClass: "shadow-lg",
1710
+ iconSize: 80,
1711
+ textClass: "text-h1",
1712
+ verifiedSize: 32,
1713
+ verifiedOffset: 4
1714
+ }
1715
+ }, it = ({
1716
+ src: t,
1717
+ alt: s,
1718
+ initials: r,
1719
+ size: l = "sm",
1720
+ verified: i = !0,
1721
+ contrastBorder: a = !0,
1722
+ className: c
1723
+ }) => {
1724
+ const {
1725
+ box: n,
1726
+ ringWidth: u,
1727
+ shadowClass: o,
1728
+ iconSize: m,
1729
+ textClass: p,
1730
+ verifiedSize: f,
1731
+ verifiedOffset: h
1732
+ } = lt[l], E = t ? "image" : r !== void 0 ? "initials" : "placeholder";
1733
+ return /* @__PURE__ */ e.createElement(
1734
+ "div",
1735
+ {
1736
+ className: g("relative rounded-full", c),
1737
+ style: { width: n, height: n }
1738
+ },
1739
+ /* @__PURE__ */ e.createElement(
1740
+ "div",
1741
+ {
1742
+ className: g(
1743
+ "absolute inset-0 overflow-hidden rounded-full border-white",
1744
+ o,
1745
+ E !== "image" && "bg-light-100"
1746
+ ),
1747
+ style: { borderWidth: u, borderStyle: "solid" }
1748
+ },
1749
+ E === "image" && /* @__PURE__ */ e.createElement(
1750
+ "img",
1751
+ {
1752
+ src: t,
1753
+ alt: s ?? "",
1754
+ className: "absolute inset-0 size-full rounded-full object-cover"
1755
+ }
1756
+ ),
1757
+ a && /* @__PURE__ */ e.createElement("div", { className: "pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]" }),
1758
+ E === "placeholder" && /* @__PURE__ */ e.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ e.createElement(
1759
+ le,
1760
+ {
1761
+ className: "text-light-300",
1762
+ style: { width: m, height: m }
1763
+ }
1764
+ )),
1765
+ E === "initials" && /* @__PURE__ */ e.createElement(
1766
+ "div",
1767
+ {
1768
+ className: g(
1769
+ "absolute inset-0 flex items-center justify-center font-semibold text-light-500",
1770
+ p
1771
+ )
1772
+ },
1773
+ r
1774
+ )
1775
+ ),
1776
+ i && /* @__PURE__ */ e.createElement(
1777
+ "div",
1778
+ {
1779
+ className: "absolute",
1780
+ style: {
1781
+ width: f,
1782
+ height: f,
1783
+ bottom: h,
1784
+ right: h
1785
+ }
1786
+ },
1787
+ /* @__PURE__ */ e.createElement(ie, { className: "size-full" })
1788
+ )
1789
+ );
1790
+ };
1791
+ it.displayName = "AvatarProfilePhoto";
1792
+ const nt = {
1793
+ "button-gray": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1794
+ "button-white": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1795
+ "button-primary": { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3 py-2 text-base gap-2" },
1796
+ underline: { sm: "h-8 px-1 pb-3 text-sm gap-2", md: "h-9 px-1 pb-3 text-base gap-2" },
1797
+ "underline-filled": { sm: "h-11 p-3 text-sm gap-2", md: "h-12 p-3 text-base gap-2" },
1798
+ line: { sm: "h-9 px-3 py-2 text-sm gap-2", md: "h-11 px-3.5 py-2.5 text-base gap-2" }
1799
+ }, ot = {
1800
+ "button-gray": "rounded-md",
1801
+ "button-white": "rounded-md",
1802
+ "button-primary": "rounded-md",
1803
+ underline: "rounded-none",
1804
+ "underline-filled": "rounded-none",
1805
+ line: "rounded-none"
1806
+ }, ct = {
1807
+ "button-gray": {
1808
+ active: "bg-light-50 text-light-700",
1809
+ inactive: "bg-transparent text-light-500",
1810
+ hoverInactive: "hover:bg-light-50 hover:text-light-700",
1811
+ hasFocusRing: !0
1812
+ },
1813
+ "button-white": {
1814
+ active: "bg-white text-light-700 shadow-sm",
1815
+ inactive: "bg-transparent text-light-500",
1816
+ hoverInactive: "hover:bg-white hover:text-light-700 hover:shadow-sm",
1817
+ hasFocusRing: !0
1818
+ },
1819
+ "button-primary": {
1820
+ active: "bg-primary-50 text-primary-700",
1821
+ inactive: "bg-transparent text-light-500",
1822
+ hoverInactive: "hover:bg-primary-50 hover:text-primary-700",
1823
+ hasFocusRing: !0
1824
+ },
1825
+ underline: {
1826
+ active: "border-b-2 border-primary-500 text-primary-700",
1827
+ inactive: "border-b-2 border-transparent text-light-500",
1828
+ hoverInactive: "hover:border-primary-500 hover:text-primary-700",
1829
+ hasFocusRing: !1
1830
+ },
1831
+ "underline-filled": {
1832
+ active: "bg-primary-50 border-b-2 border-primary-500 text-primary-700",
1833
+ inactive: "bg-transparent border-b-2 border-transparent text-light-500",
1834
+ hoverInactive: "hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",
1835
+ hasFocusRing: !1
1836
+ },
1837
+ line: {
1838
+ active: "bg-transparent border-l-2 border-primary-500 text-primary-700",
1839
+ inactive: "bg-transparent border-l-2 border-transparent text-light-500",
1840
+ hoverInactive: "hover:border-primary-500 hover:text-primary-700",
1841
+ hasFocusRing: !0
1842
+ }
1843
+ }, dt = "inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700", ut = {
1844
+ "button-gray": { gapClass: "gap-1", hasHairline: !1 },
1845
+ "button-white": { gapClass: "gap-1", hasHairline: !1 },
1846
+ "button-primary": { gapClass: "gap-1", hasHairline: !1 },
1847
+ underline: { gapClass: "gap-3", hasHairline: !0 },
1848
+ "underline-filled": { gapClass: "gap-3", hasHairline: !0 },
1849
+ line: { gapClass: "gap-1", hasHairline: !1 }
1850
+ }, mt = ({
1851
+ children: t,
1852
+ variant: s = "button-primary",
1853
+ size: r = "sm",
1854
+ active: l = !1,
1855
+ fullWidth: i = !1,
1856
+ count: a,
1857
+ disabled: c = !1,
1858
+ onClick: n,
1859
+ className: u
1860
+ }) => {
1861
+ const o = ct[s];
1862
+ return /* @__PURE__ */ e.createElement(
1863
+ "button",
1864
+ {
1865
+ type: "button",
1866
+ role: "tab",
1867
+ "aria-selected": l,
1868
+ disabled: c,
1869
+ onClick: n,
1870
+ className: g(
1871
+ "inline-flex items-center justify-center font-semibold transition-colors duration-150",
1872
+ nt[s][r],
1873
+ ot[s],
1874
+ l ? o.active : o.inactive,
1875
+ !l && !c && o.hoverInactive,
1876
+ o.hasFocusRing && "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",
1877
+ i && "w-full",
1878
+ c ? "cursor-not-allowed opacity-60" : "cursor-pointer",
1879
+ u
1880
+ )
1881
+ },
1882
+ /* @__PURE__ */ e.createElement("span", { className: "whitespace-nowrap" }, t),
1883
+ a !== void 0 && /* @__PURE__ */ e.createElement("span", { className: dt }, a)
1884
+ );
1885
+ };
1886
+ mt.displayName = "Tab";
1887
+ const pt = ({
1888
+ children: t,
1889
+ variant: s = "button-primary",
1890
+ orientation: r = "horizontal",
1891
+ boxed: l = !1,
1892
+ className: i
1893
+ }) => {
1894
+ const { gapClass: a, hasHairline: c } = ut[s];
1895
+ return /* @__PURE__ */ e.createElement(
1896
+ "div",
1897
+ {
1898
+ role: "tablist",
1899
+ "aria-orientation": r,
1900
+ className: g(
1901
+ "inline-flex",
1902
+ r === "vertical" ? "flex-col items-stretch" : "flex-row items-center",
1903
+ a,
1904
+ l && "rounded-lg border border-light-200 bg-light-50 p-1",
1905
+ c && r === "horizontal" && !l && "border-b border-light-200",
1906
+ i
1907
+ )
1908
+ },
1909
+ t
1910
+ );
1911
+ };
1912
+ pt.displayName = "TabList";
1913
+ const gt = b("flex flex-col gap-1 w-full max-w-[320px]", {
1914
+ variants: {
1915
+ size: {
1916
+ xs: "text-caption-sm",
1917
+ sm: "text-caption-lg",
1918
+ md: "text-sm"
1919
+ }
1920
+ },
1921
+ defaultVariants: {
1922
+ size: "md"
1923
+ }
1924
+ }), bt = b("flex items-center gap-1 font-bold text-sm", {
1925
+ variants: {
1926
+ error: {
1927
+ true: "",
1928
+ false: "text-light-800"
1929
+ }
1930
+ },
1931
+ defaultVariants: {
1932
+ error: !1
1933
+ }
1934
+ }), ft = b(
1935
+ [
1936
+ "flex items-center w-full border",
1937
+ "bg-white transition-[border-color,border-width]"
1938
+ ],
1939
+ {
1940
+ variants: {
1941
+ size: {
1942
+ xs: "h-7 px-2 gap-1 rounded text-caption-sm",
1943
+ sm: "h-9 px-3 gap-2 rounded-lg",
1944
+ md: "h-11 px-3 gap-2 rounded-lg"
1945
+ },
1946
+ error: {
1947
+ true: [
1948
+ "border-error-200",
1949
+ "focus-within:border-2 focus-within:border-error-500"
1950
+ ],
1951
+ false: [
1952
+ "border-light-200",
1953
+ "focus-within:border-2 focus-within:border-primary-500"
1954
+ ]
1955
+ },
1956
+ disabled: {
1957
+ true: "bg-light-100 text-light-400 cursor-not-allowed",
1958
+ false: ""
1959
+ }
1960
+ },
1961
+ defaultVariants: {
1962
+ size: "md",
1963
+ error: !1,
1964
+ disabled: !1
1965
+ }
1966
+ }
1967
+ ), ht = b(
1968
+ [
1969
+ "flex-1 bg-transparent outline-none text-light-900",
1970
+ "placeholder:text-light-500",
1971
+ "disabled:text-light-400 disabled:cursor-not-allowed"
1972
+ ],
1973
+ {
1974
+ variants: {
1975
+ size: {
1976
+ xs: "text-caption-sm",
1977
+ sm: "text-caption-lg",
1978
+ md: "text-body-sm"
1979
+ },
1980
+ error: {
1981
+ true: "",
1982
+ false: "text-light-900"
1983
+ }
1984
+ },
1985
+ defaultVariants: {
1986
+ size: "md",
1987
+ error: !1
1988
+ }
1989
+ }
1990
+ ), xt = b("text-caption-lg", {
1991
+ variants: {
1992
+ error: {
1993
+ true: "text-error-500",
1994
+ false: "text-light-700"
1995
+ }
1996
+ }
1997
+ }), vt = b(
1998
+ "flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",
1999
+ {
2000
+ variants: {
2001
+ size: {
2002
+ xs: "rounded",
2003
+ sm: "rounded-lg",
2004
+ md: "rounded-lg"
2005
+ },
2006
+ error: {
2007
+ true: [
2008
+ "border-error-200",
2009
+ "focus-within:border-2 focus-within:border-error-500"
2010
+ ],
2011
+ false: [
2012
+ "border-light-200",
2013
+ "focus-within:border-2 focus-within:border-primary-500"
2014
+ ]
2015
+ },
2016
+ disabled: {
2017
+ true: "bg-light-100",
2018
+ false: ""
2019
+ }
2020
+ },
2021
+ defaultVariants: { size: "md", error: !1, disabled: !1 }
2022
+ }
2023
+ ), yt = b("flex flex-1 items-center min-w-0", {
2024
+ variants: {
2025
+ size: {
2026
+ xs: "gap-1 px-2 py-1",
2027
+ sm: "gap-2 px-3 py-2",
2028
+ md: "gap-2 px-3 py-2"
2029
+ },
2030
+ disabled: {
2031
+ true: "text-light-400 cursor-not-allowed",
2032
+ false: ""
2033
+ }
2034
+ },
2035
+ defaultVariants: { size: "md", disabled: !1 }
2036
+ }), wt = b("flex items-center text-light-700 whitespace-nowrap border-r border-light-200", {
2037
+ variants: {
2038
+ size: {
2039
+ xs: "px-2 text-caption-sm",
2040
+ sm: "px-3 text-caption-lg",
2041
+ md: "px-3 text-body-sm"
2042
+ }
2043
+ },
2044
+ defaultVariants: { size: "md" }
2045
+ }), K = b(
2046
+ [
2047
+ "flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer",
2048
+ "hover:bg-transparent hover:text-light-900",
2049
+ "disabled:cursor-not-allowed disabled:text-light-400"
2050
+ ],
2051
+ {
2052
+ variants: {
2053
+ size: {
2054
+ xs: "text-caption-sm",
2055
+ sm: "text-caption-lg",
2056
+ md: "text-body-sm"
2057
+ }
2058
+ },
2059
+ defaultVariants: { size: "md" }
2060
+ }
2061
+ ), Et = b(
2062
+ "flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",
2063
+ {
2064
+ variants: {
2065
+ size: {
2066
+ xs: "text-caption-sm",
2067
+ sm: "text-caption-lg",
2068
+ md: "text-body-sm"
2069
+ }
2070
+ },
2071
+ defaultVariants: { size: "md" }
2072
+ }
2073
+ ), Z = ({ className: t }) => /* @__PURE__ */ d.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ d.createElement(
2074
+ "path",
2075
+ {
2076
+ d: "M5 7.5L10 12.5L15 7.5",
2077
+ stroke: "currentColor",
2078
+ strokeWidth: "1.67",
2079
+ strokeLinecap: "round",
2080
+ strokeLinejoin: "round"
2081
+ }
2082
+ )), Nt = {
2083
+ xs: "h-7",
2084
+ // 18px (caption-sm) + 8 + 2 = 28px
2085
+ sm: "h-[30px]",
2086
+ // 20px (caption-lg) + 8 + 2 = 30px
2087
+ md: "h-[34px]"
2088
+ // 24px (body-sm) + 8 + 2 = 34px
2089
+ }, kt = ({ size: t, error: s, disabled: r }) => g(
2090
+ "flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",
2091
+ Nt[t],
2092
+ s ? "border-error-200 focus-within:border-2 focus-within:border-error-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2093
+ r && "bg-light-100 text-light-400 cursor-not-allowed"
2094
+ ), St = ({ error: t }) => g("flex items-center gap-1 text-caption-sm font-semibold", t ? "" : "text-light-800"), Ct = "flex flex-col w-full max-w-[320px]";
2095
+ function j({
2096
+ label: t,
2097
+ required: s,
2098
+ hint: r,
2099
+ rightIcon: l,
2100
+ size: i = "md",
2101
+ error: a = !1,
2102
+ disabled: c = !1,
2103
+ compact: n = !1,
2104
+ hideCalendarIcon: u = !1,
2105
+ type: o,
2106
+ prefix: m,
2107
+ suffix: p,
2108
+ leadingAddon: f,
2109
+ leadingDropdown: h,
2110
+ trailingDropdown: E,
2111
+ trailingButton: w,
2112
+ maxLength: k,
2113
+ value: y,
2114
+ className: x,
2115
+ wrapperClassName: N,
2116
+ ...C
2117
+ }) {
2118
+ const L = !!(f || w), S = /* @__PURE__ */ d.createElement(d.Fragment, null, h && /* @__PURE__ */ d.createElement(
2119
+ "button",
2120
+ {
2121
+ type: "button",
2122
+ onClick: h.onClick,
2123
+ disabled: h.disabled || c,
2124
+ className: K({ size: i })
2125
+ },
2126
+ /* @__PURE__ */ d.createElement("span", null, h.value),
2127
+ /* @__PURE__ */ d.createElement(Z, { className: "size-5 text-light-500" })
2128
+ ), m && /* @__PURE__ */ d.createElement("div", { className: "flex items-center" }, m), /* @__PURE__ */ d.createElement(
2129
+ "input",
2130
+ {
2131
+ ...C,
2132
+ type: o,
2133
+ disabled: c,
2134
+ maxLength: k,
2135
+ value: y,
2136
+ className: g(
2137
+ ht({ size: i, error: a }),
2138
+ "h-full",
2139
+ u && "[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",
2140
+ o === "date" && "[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",
2141
+ x
2142
+ )
2143
+ }
2144
+ ), (l || p) && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center gap-2" }, l && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center pb-0.5 text-light-400 hover:text-light-600" }, l), p && /* @__PURE__ */ d.createElement("div", { className: "flex h-full items-center gap-1 leading-none text-light-700" }, p)), E && /* @__PURE__ */ d.createElement(
2145
+ "button",
2146
+ {
2147
+ type: "button",
2148
+ onClick: E.onClick,
2149
+ disabled: E.disabled || c,
2150
+ className: K({ size: i })
2151
+ },
2152
+ /* @__PURE__ */ d.createElement("span", null, E.value),
2153
+ /* @__PURE__ */ d.createElement(Z, { className: "size-5 text-light-500" })
2154
+ ));
2155
+ return /* @__PURE__ */ d.createElement("div", { className: g(n ? Ct : gt({ size: i }), N) }, t && /* @__PURE__ */ d.createElement("label", { className: n ? St({ error: a }) : bt({ error: a }) }, t, s && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), L ? /* @__PURE__ */ d.createElement("div", { className: vt({ size: i, error: a, disabled: c }) }, f && /* @__PURE__ */ d.createElement("div", { className: wt({ size: i }) }, f), /* @__PURE__ */ d.createElement("div", { className: yt({ size: i, disabled: c }) }, S), w && /* @__PURE__ */ d.createElement(
2156
+ "button",
2157
+ {
2158
+ type: "button",
2159
+ onClick: w.onClick,
2160
+ disabled: w.disabled || c,
2161
+ className: Et({ size: i })
2162
+ },
2163
+ w.icon,
2164
+ /* @__PURE__ */ d.createElement("span", null, w.label)
2165
+ )) : /* @__PURE__ */ d.createElement("div", { className: n ? kt({ size: i, error: a, disabled: c }) : ft({ size: i, error: a, disabled: c }) }, S), k && typeof y == "string" && /* @__PURE__ */ d.createElement("div", { className: "text-right text-xs text-light-400" }, y.length, "/", k), r && /* @__PURE__ */ d.createElement("p", { className: xt({ error: a }) }, r));
2166
+ }
2167
+ function zt({ children: t }) {
2168
+ return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, t);
2169
+ }
2170
+ function Lt({ children: t }) {
2171
+ return /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-light-500" }, t);
2172
+ }
2173
+ var Bt = {
2174
+ outline: {
2175
+ xmlns: "http://www.w3.org/2000/svg",
2176
+ width: 24,
2177
+ height: 24,
2178
+ viewBox: "0 0 24 24",
2179
+ fill: "none",
2180
+ stroke: "currentColor",
2181
+ strokeWidth: 2,
2182
+ strokeLinecap: "round",
2183
+ strokeLinejoin: "round"
2184
+ },
2185
+ filled: {
2186
+ xmlns: "http://www.w3.org/2000/svg",
2187
+ width: 24,
2188
+ height: 24,
2189
+ viewBox: "0 0 24 24",
2190
+ fill: "currentColor",
2191
+ stroke: "none"
2192
+ }
2193
+ };
2194
+ const Tt = (t, s, r, l) => {
2195
+ const i = pe(
2196
+ ({ color: a = "currentColor", size: c = 24, stroke: n = 2, title: u, className: o, children: m, ...p }, f) => M(
2197
+ "svg",
2198
+ {
2199
+ ref: f,
2200
+ ...Bt[t],
2201
+ width: c,
2202
+ height: c,
2203
+ className: ["tabler-icon", `tabler-icon-${s}`, o].join(" "),
2204
+ strokeWidth: n,
2205
+ stroke: a,
2206
+ ...p
2207
+ },
2208
+ [
2209
+ u && M("title", { key: "svg-title" }, u),
2210
+ ...l.map(([h, E]) => M(h, E)),
2211
+ ...Array.isArray(m) ? m : [m]
2212
+ ]
2213
+ )
2214
+ );
2215
+ return i.displayName = `${r}`, i;
2216
+ };
2217
+ const Vt = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], ne = Tt("outline", "chevron-down", "ChevronDown", Vt);
2218
+ function Wr({
2219
+ size: t = "md",
2220
+ label: s,
2221
+ required: r,
2222
+ hint: l,
2223
+ error: i,
2224
+ disabled: a,
2225
+ placeholder: c = "+1 (555) 000-0000",
940
2226
  rightIcon: n,
941
- prefix: c,
942
- className: f,
943
- wrapperClassName: g
2227
+ value: u,
2228
+ onChange: o,
2229
+ className: m,
2230
+ wrapperClassName: p
944
2231
  }) {
945
- return /* @__PURE__ */ s.createElement(
946
- S,
2232
+ return /* @__PURE__ */ d.createElement(
2233
+ j,
947
2234
  {
948
- size: e,
949
- label: r,
950
- required: t,
951
- hint: a,
2235
+ size: t,
2236
+ label: s,
2237
+ required: r,
2238
+ hint: l,
952
2239
  error: i,
953
- disabled: l,
954
- placeholder: m,
955
- value: d,
956
- onChange: o,
2240
+ disabled: a,
2241
+ placeholder: c,
957
2242
  rightIcon: n,
2243
+ value: u,
2244
+ onChange: o,
2245
+ className: m,
2246
+ wrapperClassName: p,
2247
+ prefix: /* @__PURE__ */ d.createElement("div", { className: "flex items-center gap-1 pr-2 text-sm text-light-700" }, /* @__PURE__ */ d.createElement("span", null, "US"), /* @__PURE__ */ d.createElement(ne, { size: 14 }))
2248
+ }
2249
+ );
2250
+ }
2251
+ function Rr({
2252
+ size: t = "md",
2253
+ label: s,
2254
+ required: r,
2255
+ hint: l,
2256
+ error: i,
2257
+ disabled: a,
2258
+ value: c,
2259
+ placeholder: n = "1,000.00",
2260
+ currency: u = "USD",
2261
+ onCurrencyChange: o,
2262
+ rightIcon: m,
2263
+ onChange: p,
2264
+ className: f,
2265
+ wrapperClassName: h
2266
+ }) {
2267
+ return /* @__PURE__ */ d.createElement(
2268
+ j,
2269
+ {
2270
+ size: t,
2271
+ label: s,
2272
+ required: r,
2273
+ hint: l,
2274
+ error: i,
2275
+ disabled: a,
2276
+ value: c,
2277
+ placeholder: n,
2278
+ rightIcon: m,
2279
+ onChange: p,
958
2280
  className: f,
959
- wrapperClassName: g,
960
- prefix: c ?? /* @__PURE__ */ s.createElement(
2281
+ wrapperClassName: h,
2282
+ prefix: /* @__PURE__ */ d.createElement("span", { className: "select-none text-sm text-light-700" }, "$"),
2283
+ suffix: /* @__PURE__ */ d.createElement(
2284
+ "button",
2285
+ {
2286
+ type: "button",
2287
+ disabled: a,
2288
+ onClick: o,
2289
+ className: "flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"
2290
+ },
2291
+ u,
2292
+ /* @__PURE__ */ d.createElement(ne, { size: 14 })
2293
+ )
2294
+ }
2295
+ );
2296
+ }
2297
+ function Mr({
2298
+ size: t = "md",
2299
+ label: s,
2300
+ required: r,
2301
+ hint: l,
2302
+ disabled: i,
2303
+ error: a,
2304
+ className: c,
2305
+ wrapperClassName: n,
2306
+ value: u,
2307
+ maxLength: o,
2308
+ placeholder: m,
2309
+ onChange: p
2310
+ }) {
2311
+ const f = u.length > o, h = a || f;
2312
+ return /* @__PURE__ */ d.createElement(
2313
+ j,
2314
+ {
2315
+ size: t,
2316
+ label: s,
2317
+ required: r,
2318
+ disabled: i,
2319
+ error: h,
2320
+ value: u,
2321
+ placeholder: m,
2322
+ onChange: p,
2323
+ className: c,
2324
+ wrapperClassName: n,
2325
+ hint: l,
2326
+ suffix: /* @__PURE__ */ d.createElement(
2327
+ "span",
2328
+ {
2329
+ className: g(
2330
+ "text-caption-lg",
2331
+ f ? "text-error-600" : "text-light-400"
2332
+ )
2333
+ },
2334
+ u.length,
2335
+ "/",
2336
+ o
2337
+ )
2338
+ }
2339
+ );
2340
+ }
2341
+ function Ar({
2342
+ size: t = "md",
2343
+ label: s = "Card number",
2344
+ required: r,
2345
+ hint: l,
2346
+ error: i,
2347
+ disabled: a,
2348
+ placeholder: c = "Card number",
2349
+ value: n,
2350
+ onChange: u,
2351
+ rightIcon: o,
2352
+ prefix: m,
2353
+ className: p,
2354
+ wrapperClassName: f
2355
+ }) {
2356
+ return /* @__PURE__ */ d.createElement(
2357
+ j,
2358
+ {
2359
+ size: t,
2360
+ label: s,
2361
+ required: r,
2362
+ hint: l,
2363
+ error: i,
2364
+ disabled: a,
2365
+ placeholder: c,
2366
+ value: n,
2367
+ onChange: u,
2368
+ rightIcon: o,
2369
+ className: p,
2370
+ wrapperClassName: f,
2371
+ prefix: m ?? /* @__PURE__ */ d.createElement(
961
2372
  "img",
962
2373
  {
963
2374
  src: "/stories/assets/mastercard.png",
@@ -968,19 +2379,121 @@ function Ge({
968
2379
  inputMode: "numeric",
969
2380
  autoComplete: "cc-number"
970
2381
  }
971
- );
972
- }
973
- const T = S;
974
- T.Prefix = ne;
975
- T.Suffix = oe;
976
- const me = u("flex w-[320px] flex-col gap-1"), fe = u("flex items-center gap-1 text-sm font-bold", {
2382
+ );
2383
+ }
2384
+ const oe = j;
2385
+ oe.Prefix = zt;
2386
+ oe.Suffix = Lt;
2387
+ const jt = "flex flex-col gap-1 w-full max-w-[320px]", It = b("flex items-center gap-1 font-bold text-sm", {
2388
+ variants: {
2389
+ error: {
2390
+ true: "",
2391
+ false: "text-light-800"
2392
+ }
2393
+ },
2394
+ defaultVariants: {
2395
+ error: !1
2396
+ }
2397
+ }), Ot = b(
2398
+ [
2399
+ "flex w-full gap-2 border rounded-lg p-3 bg-white",
2400
+ "transition-[border-color,border-width]"
2401
+ ],
2402
+ {
2403
+ variants: {
2404
+ error: {
2405
+ true: [
2406
+ "border-error-200",
2407
+ "focus-within:border-2 focus-within:border-error-500"
2408
+ ],
2409
+ false: [
2410
+ "border-light-200",
2411
+ "focus-within:border-2 focus-within:border-primary-500"
2412
+ ]
2413
+ },
2414
+ disabled: {
2415
+ true: "bg-light-100 cursor-not-allowed",
2416
+ false: ""
2417
+ }
2418
+ },
2419
+ defaultVariants: {
2420
+ error: !1,
2421
+ disabled: !1
2422
+ }
2423
+ }
2424
+ ), _t = b(
2425
+ [
2426
+ "flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900",
2427
+ "placeholder:text-light-500",
2428
+ "disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"
2429
+ ],
2430
+ {
2431
+ variants: {
2432
+ resizable: {
2433
+ true: "resize-y",
2434
+ false: "resize-none"
2435
+ }
2436
+ },
2437
+ defaultVariants: {
2438
+ resizable: !0
2439
+ }
2440
+ }
2441
+ ), $t = b("text-caption-lg", {
2442
+ variants: {
2443
+ error: {
2444
+ true: "text-error-500",
2445
+ false: "text-light-700"
2446
+ }
2447
+ },
2448
+ defaultVariants: {
2449
+ error: !1
2450
+ }
2451
+ }), Wt = ({ error: t, disabled: s }) => g(
2452
+ "flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",
2453
+ t ? "border-error-200 focus-within:border-2 focus-within:border-error-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2454
+ s && "bg-light-100 cursor-not-allowed"
2455
+ ), Rt = ({ error: t }) => g("flex items-center gap-1 text-caption-sm font-semibold", t ? "" : "text-light-800"), Mt = (t) => g("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900", "placeholder:text-light-500", t ? "resize-y" : "resize-none"), At = "flex flex-col w-full max-w-[320px]", Pt = e.forwardRef(
2456
+ ({
2457
+ label: t,
2458
+ required: s,
2459
+ hint: r,
2460
+ helpIcon: l,
2461
+ error: i = !1,
2462
+ disabled: a = !1,
2463
+ resizable: c = !0,
2464
+ compact: n = !1,
2465
+ rows: u,
2466
+ style: o,
2467
+ className: m,
2468
+ wrapperClassName: p,
2469
+ ...f
2470
+ }, h) => {
2471
+ const E = u ? { minHeight: `${u * 20}px` } : void 0;
2472
+ return /* @__PURE__ */ e.createElement("div", { className: g(n ? At : jt, p) }, t && /* @__PURE__ */ e.createElement("label", { className: n ? Rt({ error: i }) : It({ error: i }) }, t, s && /* @__PURE__ */ e.createElement("span", { className: "text-error-400" }, "*"), l), /* @__PURE__ */ e.createElement("div", { className: n ? Wt({ error: i, disabled: a }) : Ot({ error: i, disabled: a }) }, /* @__PURE__ */ e.createElement(
2473
+ "textarea",
2474
+ {
2475
+ ref: h,
2476
+ disabled: a,
2477
+ rows: u,
2478
+ style: { ...E, ...o },
2479
+ className: g(
2480
+ n ? Mt(c && !a) : _t({ resizable: c && !a }),
2481
+ m
2482
+ ),
2483
+ ...f
2484
+ }
2485
+ )), r && /* @__PURE__ */ e.createElement("p", { className: $t({ error: i }) }, r));
2486
+ }
2487
+ );
2488
+ Pt.displayName = "Textarea";
2489
+ const Dt = b("flex w-[320px] flex-col gap-1"), Gt = b("flex items-center gap-1 text-sm font-bold", {
977
2490
  variants: {
978
2491
  error: {
979
2492
  true: "text-error-600",
980
2493
  false: "text-light-800"
981
2494
  }
982
2495
  }
983
- }), ge = u(["flex items-center", "rounded-lg border bg-white", "overflow-hidden", "transition-colors"], {
2496
+ }), Ht = b(["flex items-center", "rounded-lg border bg-white", "overflow-hidden", "transition-colors"], {
984
2497
  variants: {
985
2498
  size: {
986
2499
  sm: "h-9 px-2",
@@ -1000,14 +2513,14 @@ const me = u("flex w-[320px] flex-col gap-1"), fe = u("flex items-center gap-1 t
1000
2513
  error: !1,
1001
2514
  disabled: !1
1002
2515
  }
1003
- }), he = u(["flex items-center gap-1", "overflow-x-auto overflow-y-hidden", "whitespace-nowrap", "scrollbar-hide", "flex-1"]), pe = u("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"), be = u(["min-w-[120px]", "bg-transparent outline-none", "text-light-900 placeholder:text-light-500"], {
2516
+ }), Ft = b(["flex items-center gap-1", "overflow-x-auto overflow-y-hidden", "whitespace-nowrap", "scrollbar-hide", "flex-1"]), Kt = b("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"), Zt = b(["min-w-[120px]", "bg-transparent outline-none", "text-light-900 placeholder:text-light-500"], {
1004
2517
  variants: {
1005
2518
  disabled: {
1006
2519
  true: "cursor-not-allowed text-light-400",
1007
2520
  false: ""
1008
2521
  }
1009
2522
  }
1010
- }), xe = u("text-caption-lg", {
2523
+ }), Ut = b("text-caption-lg", {
1011
2524
  variants: {
1012
2525
  error: {
1013
2526
  true: "text-error-600",
@@ -1015,64 +2528,64 @@ const me = u("flex w-[320px] flex-col gap-1"), fe = u("flex items-center gap-1 t
1015
2528
  }
1016
2529
  }
1017
2530
  });
1018
- function We({
1019
- size: e = "md",
1020
- label: r,
1021
- required: t,
1022
- hint: a,
2531
+ function Pr({
2532
+ size: t = "md",
2533
+ label: s,
2534
+ required: r,
2535
+ hint: l,
1023
2536
  error: i = !1,
1024
- disabled: l = !1,
1025
- placeholder: m = "Add items",
1026
- rightIcon: d,
1027
- className: o,
1028
- wrapperClassName: n,
1029
- options: c,
1030
- value: f = [],
1031
- onChange: g
2537
+ disabled: a = !1,
2538
+ placeholder: c = "Add items",
2539
+ rightIcon: n,
2540
+ className: u,
2541
+ wrapperClassName: o,
2542
+ options: m,
2543
+ value: p = [],
2544
+ onChange: f
1032
2545
  }) {
1033
- const b = D(), [y, E] = F(""), N = (p) => {
1034
- const w = c.find((k) => k.label === p);
1035
- w && (f.some((k) => k.id === w.id) || (g?.([...f, w]), E("")));
1036
- }, v = (p) => {
1037
- g?.(f.filter((w) => w.id !== p));
2546
+ const h = ge(), [E, w] = be(""), k = (x) => {
2547
+ const N = m.find((C) => C.label === x);
2548
+ N && (p.some((C) => C.id === N.id) || (f?.([...p, N]), w("")));
2549
+ }, y = (x) => {
2550
+ f?.(p.filter((N) => N.id !== x));
1038
2551
  };
1039
- return /* @__PURE__ */ s.createElement("div", { className: x(me(), n) }, r && /* @__PURE__ */ s.createElement("label", { className: fe({ error: i }) }, r, t && /* @__PURE__ */ s.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ s.createElement("div", { className: ge({ size: e, error: i, disabled: l }) }, /* @__PURE__ */ s.createElement("div", { className: he() }, f.map((p) => /* @__PURE__ */ s.createElement("span", { key: p.id, className: pe() }, p.avatar && /* @__PURE__ */ s.createElement(
2552
+ return /* @__PURE__ */ d.createElement("div", { className: g(Dt(), o) }, s && /* @__PURE__ */ d.createElement("label", { className: Gt({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: Ht({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: Ft() }, p.map((x) => /* @__PURE__ */ d.createElement("span", { key: x.id, className: Kt() }, x.avatar && /* @__PURE__ */ d.createElement(
1040
2553
  "img",
1041
2554
  {
1042
- src: p.avatar,
1043
- alt: p.label,
2555
+ src: x.avatar,
2556
+ alt: x.label,
1044
2557
  className: "h-4 w-4 rounded-full"
1045
2558
  }
1046
- ), p.label, !l && /* @__PURE__ */ s.createElement(
2559
+ ), x.label, !a && /* @__PURE__ */ d.createElement(
1047
2560
  "button",
1048
2561
  {
1049
2562
  type: "button",
1050
- onClick: () => v(p.id),
2563
+ onClick: () => y(x.id),
1051
2564
  className: "ml-1 text-light-500 hover:text-light-700"
1052
2565
  },
1053
2566
  "×"
1054
- ))), /* @__PURE__ */ s.createElement(
2567
+ ))), /* @__PURE__ */ d.createElement(
1055
2568
  "input",
1056
2569
  {
1057
- list: b,
1058
- value: y,
1059
- onChange: (p) => {
1060
- E(p.target.value), N(p.target.value);
2570
+ list: h,
2571
+ value: E,
2572
+ onChange: (x) => {
2573
+ w(x.target.value), k(x.target.value);
1061
2574
  },
1062
- placeholder: f.length === 0 ? m : "",
1063
- disabled: l,
1064
- className: x(be({ disabled: l }), o)
2575
+ placeholder: p.length === 0 ? c : "",
2576
+ disabled: a,
2577
+ className: g(Zt({ disabled: a }), u)
1065
2578
  }
1066
- ), /* @__PURE__ */ s.createElement("datalist", { id: b }, c.map((p) => /* @__PURE__ */ s.createElement("option", { key: p.id, value: p.label })))), d && /* @__PURE__ */ s.createElement("div", { className: "ml-2 flex shrink-0 items-center text-light-400" }, d)), a && /* @__PURE__ */ s.createElement("p", { className: xe({ error: i }) }, a));
2579
+ ), /* @__PURE__ */ d.createElement("datalist", { id: h }, m.map((x) => /* @__PURE__ */ d.createElement("option", { key: x.id, value: x.label })))), n && /* @__PURE__ */ d.createElement("div", { className: "ml-2 flex shrink-0 items-center text-light-400" }, n)), l && /* @__PURE__ */ d.createElement("p", { className: Ut({ error: i }) }, l));
1067
2580
  }
1068
- const ve = u("flex w-[320px] flex-col gap-1"), we = u("flex items-center gap-1 font-bold text-sm", {
2581
+ const qt = b("flex w-[320px] flex-col gap-1"), Qt = b("flex items-center gap-1 font-bold text-sm", {
1069
2582
  variants: {
1070
2583
  error: {
1071
2584
  true: "",
1072
2585
  false: "text-light-800"
1073
2586
  }
1074
2587
  }
1075
- }), ye = u("flex items-stretch rounded-lg border bg-white transition-colors", {
2588
+ }), Xt = b("flex items-stretch rounded-lg border bg-white transition-colors", {
1076
2589
  variants: {
1077
2590
  error: {
1078
2591
  true: "",
@@ -1083,7 +2596,7 @@ const ve = u("flex w-[320px] flex-col gap-1"), we = u("flex items-center gap-1 f
1083
2596
  false: ""
1084
2597
  }
1085
2598
  }
1086
- }), Ee = u("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none", {
2599
+ }), Jt = b("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none", {
1087
2600
  variants: {
1088
2601
  size: {
1089
2602
  sm: "h-9",
@@ -1094,7 +2607,7 @@ const ve = u("flex w-[320px] flex-col gap-1"), we = u("flex items-center gap-1 f
1094
2607
  false: "bg-white"
1095
2608
  }
1096
2609
  }
1097
- }), Ne = "w-px bg-light-200", ke = u(["flex flex-1 items-center gap-2 px-3 rounded-r-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
2610
+ }), Yt = "w-px bg-light-200", er = b(["flex flex-1 items-center gap-2 px-3 rounded-r-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
1098
2611
  variants: {
1099
2612
  size: {
1100
2613
  sm: "h-9",
@@ -1109,14 +2622,14 @@ const ve = u("flex w-[320px] flex-col gap-1"), we = u("flex items-center gap-1 f
1109
2622
  false: ""
1110
2623
  }
1111
2624
  }
1112
- }), Se = u("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
2625
+ }), tr = b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
1113
2626
  variants: {
1114
2627
  disabled: {
1115
2628
  true: "text-light-400 cursor-not-allowed",
1116
2629
  false: ""
1117
2630
  }
1118
2631
  }
1119
- }), Ce = u("text-caption-lg", {
2632
+ }), rr = b("text-caption-lg", {
1120
2633
  variants: {
1121
2634
  error: {
1122
2635
  true: "text-error-600",
@@ -1124,46 +2637,46 @@ const ve = u("flex w-[320px] flex-col gap-1"), we = u("flex items-center gap-1 f
1124
2637
  }
1125
2638
  }
1126
2639
  });
1127
- function Me({
1128
- size: e = "md",
1129
- label: r,
1130
- required: t,
1131
- hint: a,
2640
+ function Dr({
2641
+ size: t = "md",
2642
+ label: s,
2643
+ required: r,
2644
+ hint: l,
1132
2645
  error: i = !1,
1133
- disabled: l = !1,
1134
- placeholder: m = "www.cekat.ai",
1135
- value: d,
1136
- rightIcon: o,
1137
- onChange: n,
1138
- className: c,
1139
- wrapperClassName: f
2646
+ disabled: a = !1,
2647
+ placeholder: c = "www.cekat.ai",
2648
+ value: n,
2649
+ rightIcon: u,
2650
+ onChange: o,
2651
+ className: m,
2652
+ wrapperClassName: p
1140
2653
  }) {
1141
- return /* @__PURE__ */ s.createElement("div", { className: x(ve(), f) }, r && /* @__PURE__ */ s.createElement("label", { className: we({ error: i }) }, r, t && /* @__PURE__ */ s.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ s.createElement("div", { className: ye({ error: i, disabled: l }) }, /* @__PURE__ */ s.createElement("div", { className: Ee({ size: e }) }, "http://"), /* @__PURE__ */ s.createElement("div", { className: Ne }), /* @__PURE__ */ s.createElement("div", { className: ke({ size: e, error: i, disabled: l }) }, /* @__PURE__ */ s.createElement(
2654
+ return /* @__PURE__ */ d.createElement("div", { className: g(qt(), p) }, s && /* @__PURE__ */ d.createElement("label", { className: Qt({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: Xt({ error: i, disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: Jt({ size: t }) }, "http://"), /* @__PURE__ */ d.createElement("div", { className: Yt }), /* @__PURE__ */ d.createElement("div", { className: er({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement(
1142
2655
  "input",
1143
2656
  {
1144
- value: d,
1145
- onChange: n,
1146
- placeholder: m,
1147
- disabled: l,
1148
- className: x(Se({ disabled: l }), c)
2657
+ value: n,
2658
+ onChange: o,
2659
+ placeholder: c,
2660
+ disabled: a,
2661
+ className: g(tr({ disabled: a }), m)
1149
2662
  }
1150
- ), o && /* @__PURE__ */ s.createElement("div", { className: "flex items-center text-light-400" }, o))), a && /* @__PURE__ */ s.createElement("p", { className: Ce({ error: i }) }, a));
2663
+ ), u && /* @__PURE__ */ d.createElement("div", { className: "flex items-center text-light-400" }, u))), l && /* @__PURE__ */ d.createElement("p", { className: rr({ error: i }) }, l));
1151
2664
  }
1152
- const Ve = u("flex w-[320px] flex-col gap-1"), Re = u("flex items-center gap-1 font-bold text-sm", {
2665
+ const sr = b("flex w-[320px] flex-col gap-1"), ar = b("flex items-center gap-1 font-bold text-sm", {
1153
2666
  variants: {
1154
2667
  error: {
1155
2668
  true: "text-error-600",
1156
2669
  false: "text-light-800"
1157
2670
  }
1158
2671
  }
1159
- }), $e = u("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors", {
2672
+ }), lr = b("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors", {
1160
2673
  variants: {
1161
2674
  disabled: {
1162
2675
  true: "bg-light-100",
1163
2676
  false: ""
1164
2677
  }
1165
2678
  }
1166
- }), je = u(["flex flex-1 items-center gap-2 px-3 rounded-l-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
2679
+ }), ir = b(["flex flex-1 items-center gap-2 px-3 rounded-l-lg", "transition-shadow", "focus-within:ring-2 focus-within:ring-offset-0"], {
1167
2680
  variants: {
1168
2681
  size: {
1169
2682
  sm: "h-9",
@@ -1178,14 +2691,14 @@ const Ve = u("flex w-[320px] flex-col gap-1"), Re = u("flex items-center gap-1 f
1178
2691
  false: ""
1179
2692
  }
1180
2693
  }
1181
- }), ze = u("w-px transition-colors", {
2694
+ }), nr = b("w-px transition-colors", {
1182
2695
  variants: {
1183
2696
  error: {
1184
2697
  true: "focus:bg-error-200 group-focus-within:bg-error-500",
1185
2698
  false: "focus:bg-light-200 group-focus-within:bg-primary-500"
1186
2699
  }
1187
2700
  }
1188
- }), Ie = u("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none", {
2701
+ }), or = b("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none", {
1189
2702
  variants: {
1190
2703
  size: {
1191
2704
  sm: "h-9",
@@ -1196,14 +2709,14 @@ const Ve = u("flex w-[320px] flex-col gap-1"), Re = u("flex items-center gap-1 f
1196
2709
  false: "bg-white"
1197
2710
  }
1198
2711
  }
1199
- }), Ae = u("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
2712
+ }), cr = b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500", {
1200
2713
  variants: {
1201
2714
  disabled: {
1202
2715
  true: "text-light-400 cursor-not-allowed",
1203
2716
  false: ""
1204
2717
  }
1205
2718
  }
1206
- }), Te = u("text-caption-lg", {
2719
+ }), dr = b("text-caption-lg", {
1207
2720
  variants: {
1208
2721
  error: {
1209
2722
  true: "text-error-600",
@@ -1211,45 +2724,571 @@ const Ve = u("flex w-[320px] flex-col gap-1"), Re = u("flex items-center gap-1 f
1211
2724
  }
1212
2725
  }
1213
2726
  });
1214
- function Le({
1215
- size: e = "md",
1216
- label: r,
1217
- required: t,
1218
- hint: a,
2727
+ function Gr({
2728
+ size: t = "md",
2729
+ label: s,
2730
+ required: r,
2731
+ hint: l,
1219
2732
  error: i = !1,
1220
- disabled: l = !1,
1221
- placeholder: m = "www.cekat.ai",
1222
- value: d,
1223
- rightIcon: o,
1224
- suffix: n,
1225
- onChange: c,
1226
- className: f,
1227
- wrapperClassName: g
2733
+ disabled: a = !1,
2734
+ placeholder: c = "www.cekat.ai",
2735
+ value: n,
2736
+ rightIcon: u,
2737
+ suffix: o,
2738
+ onChange: m,
2739
+ className: p,
2740
+ wrapperClassName: f
1228
2741
  }) {
1229
- return /* @__PURE__ */ s.createElement("div", { className: x(Ve(), g) }, r && /* @__PURE__ */ s.createElement("label", { className: Re({ error: i }) }, r, t && /* @__PURE__ */ s.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ s.createElement("div", { className: $e({ disabled: l }) }, /* @__PURE__ */ s.createElement("div", { className: je({ size: e, error: i, disabled: l }) }, /* @__PURE__ */ s.createElement(
2742
+ return /* @__PURE__ */ d.createElement("div", { className: g(sr(), f) }, s && /* @__PURE__ */ d.createElement("label", { className: ar({ error: i }) }, s, r && /* @__PURE__ */ d.createElement("span", { className: "text-error-400" }, "*")), /* @__PURE__ */ d.createElement("div", { className: lr({ disabled: a }) }, /* @__PURE__ */ d.createElement("div", { className: ir({ size: t, error: i, disabled: a }) }, /* @__PURE__ */ d.createElement(
1230
2743
  "input",
1231
2744
  {
1232
- value: d,
1233
- onChange: c,
1234
- placeholder: m,
1235
- disabled: l,
1236
- className: x(Ae({ disabled: l }), f)
2745
+ value: n,
2746
+ onChange: m,
2747
+ placeholder: c,
2748
+ disabled: a,
2749
+ className: g(cr({ disabled: a }), p)
2750
+ }
2751
+ ), u && /* @__PURE__ */ d.createElement("div", { className: "text-light-400" }, u)), /* @__PURE__ */ d.createElement("div", { className: nr({ error: i }) }), /* @__PURE__ */ d.createElement("div", { className: or({ size: t, disabled: a }) }, o)), l && /* @__PURE__ */ d.createElement("p", { className: dr({ error: i }) }, l));
2752
+ }
2753
+ const ur = b("flex w-full max-w-[320px] flex-col gap-1"), mr = b(
2754
+ "flex items-center gap-1 text-sm font-bold text-light-800"
2755
+ ), U = b(
2756
+ [
2757
+ "flex w-full items-center border bg-white text-left",
2758
+ "transition-[border-color,border-width]"
2759
+ ],
2760
+ {
2761
+ variants: {
2762
+ size: {
2763
+ xs: "h-7 gap-1 rounded px-2 text-caption-sm",
2764
+ sm: "h-9 gap-2 rounded-lg px-3 text-caption-lg",
2765
+ md: "h-11 gap-2 rounded-lg px-3 text-body-sm"
2766
+ },
2767
+ open: {
2768
+ true: "border-2 border-primary-500",
2769
+ false: "border-light-200 focus-within:border-2 focus-within:border-primary-500"
2770
+ },
2771
+ disabled: {
2772
+ true: "cursor-not-allowed bg-light-100",
2773
+ false: "cursor-pointer"
2774
+ }
2775
+ },
2776
+ defaultVariants: { size: "md", open: !1, disabled: !1 }
2777
+ }
2778
+ ), pr = b(
2779
+ [
2780
+ "absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto",
2781
+ "rounded-lg border border-light-200 bg-white py-1",
2782
+ "shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"
2783
+ ],
2784
+ {
2785
+ variants: {
2786
+ size: {
2787
+ xs: "max-h-52",
2788
+ sm: "max-h-64",
2789
+ md: "max-h-80"
2790
+ }
2791
+ },
2792
+ defaultVariants: { size: "md" }
2793
+ }
2794
+ ), q = b(
2795
+ "flex w-full items-center rounded-md text-left",
2796
+ {
2797
+ variants: {
2798
+ size: {
2799
+ xs: "gap-1 px-2 py-1 text-caption-sm",
2800
+ sm: "gap-2 px-3 py-1.5 text-caption-lg",
2801
+ md: "gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"
2802
+ },
2803
+ disabled: {
2804
+ true: "cursor-not-allowed text-light-400",
2805
+ false: "cursor-pointer hover:bg-light-50"
2806
+ }
2807
+ },
2808
+ defaultVariants: { size: "md", disabled: !1 }
2809
+ }
2810
+ ), gr = b("text-caption-lg text-light-700"), br = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2811
+ "path",
2812
+ {
2813
+ d: "M5 7.5L10 12.5L15 7.5",
2814
+ stroke: "currentColor",
2815
+ strokeWidth: "1.67",
2816
+ strokeLinecap: "round",
2817
+ strokeLinejoin: "round"
2818
+ }
2819
+ )), fr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2820
+ "path",
2821
+ {
2822
+ d: "M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",
2823
+ stroke: "currentColor",
2824
+ strokeWidth: "1.67",
2825
+ strokeLinecap: "round",
2826
+ strokeLinejoin: "round"
2827
+ }
2828
+ )), hr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
2829
+ "path",
2830
+ {
2831
+ d: "M16.67 5L7.5 14.17L3.33 10",
2832
+ stroke: "currentColor",
2833
+ strokeWidth: "1.67",
2834
+ strokeLinecap: "round",
2835
+ strokeLinejoin: "round"
2836
+ }
2837
+ )), A = {
2838
+ xs: "size-4",
2839
+ sm: "size-5",
2840
+ md: "size-6"
2841
+ }, Q = {
2842
+ xs: "size-4",
2843
+ sm: "size-5",
2844
+ md: "size-5"
2845
+ }, xr = {
2846
+ xs: "text-caption-sm",
2847
+ sm: "text-caption-lg",
2848
+ md: "text-body-sm"
2849
+ }, vr = {
2850
+ xs: "h-7",
2851
+ sm: "h-[30px]",
2852
+ md: "h-[34px]"
2853
+ }, X = ({ size: t, open: s, disabled: r }) => g(
2854
+ "flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",
2855
+ xr[t],
2856
+ vr[t],
2857
+ s ? "border-2 border-primary-500" : "border-light-200 focus-within:border-2 focus-within:border-primary-500",
2858
+ r ? "cursor-not-allowed bg-light-100" : "cursor-pointer"
2859
+ ), yr = () => "flex items-center gap-1 text-caption-sm font-semibold text-light-800", wr = "flex w-full max-w-[320px] flex-col";
2860
+ function Hr({
2861
+ size: t = "md",
2862
+ type: s = "default",
2863
+ label: r,
2864
+ required: l,
2865
+ helpIcon: i,
2866
+ hint: a,
2867
+ placeholder: c = "Select option",
2868
+ disabled: n = !1,
2869
+ compact: u = !1,
2870
+ leadingIcon: o,
2871
+ options: m,
2872
+ value: p = null,
2873
+ onChange: f,
2874
+ values: h = [],
2875
+ onValuesChange: E,
2876
+ className: w,
2877
+ wrapperClassName: k
2878
+ }) {
2879
+ const [y, x] = e.useState(!1), [N, C] = e.useState(""), L = e.useRef(null), S = e.useRef(null), z = s === "tags", V = s === "search" || z, T = m.find((v) => v.id === p) ?? null, $ = m.filter((v) => h.includes(v.id)), W = N ? m.filter(
2880
+ (v) => `${v.label} ${v.supportingText ?? ""}`.toLowerCase().includes(N.toLowerCase())
2881
+ ) : m, I = () => {
2882
+ x(!1), C("");
2883
+ };
2884
+ e.useEffect(() => {
2885
+ if (!y) return;
2886
+ const v = (B) => {
2887
+ L.current?.contains(B.target) || I();
2888
+ };
2889
+ return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
2890
+ }, [y]), e.useEffect(() => {
2891
+ y && V && S.current?.focus();
2892
+ }, [y, V]);
2893
+ const P = () => {
2894
+ n || (y ? I() : x(!0));
2895
+ }, R = (v) => {
2896
+ v.disabled || (z ? (E?.(
2897
+ h.includes(v.id) ? h.filter((B) => B !== v.id) : [...h, v.id]
2898
+ ), C(""), S.current?.focus()) : (f?.(v), I()));
2899
+ }, ce = (v) => {
2900
+ if (v.key === "Enter") {
2901
+ v.preventDefault();
2902
+ const B = W.find((me) => !me.disabled);
2903
+ y && B && R(B);
2904
+ } else v.key === "Backspace" && z && !N && h.length ? E?.(h.slice(0, -1)) : y || x(!0);
2905
+ }, D = (v) => v.avatar ? /* @__PURE__ */ e.createElement(
2906
+ "img",
2907
+ {
2908
+ src: v.avatar,
2909
+ alt: "",
2910
+ className: g(A[t], "shrink-0 rounded-full object-cover")
2911
+ }
2912
+ ) : v.icon ? /* @__PURE__ */ e.createElement(
2913
+ "span",
2914
+ {
2915
+ className: g(
2916
+ A[t],
2917
+ "flex shrink-0 items-center justify-center",
2918
+ n ? "text-light-400" : "text-light-500"
2919
+ )
2920
+ },
2921
+ v.icon
2922
+ ) : v.dot ? /* @__PURE__ */ e.createElement(
2923
+ "span",
2924
+ {
2925
+ className: "size-2 shrink-0 rounded-full",
2926
+ style: { backgroundColor: n ? "#d0d5dd" : v.dot }
1237
2927
  }
1238
- ), o && /* @__PURE__ */ s.createElement("div", { className: "text-light-400" }, o)), /* @__PURE__ */ s.createElement("div", { className: ze({ error: i }) }), /* @__PURE__ */ s.createElement("div", { className: Ie({ size: e, disabled: l }) }, n)), a && /* @__PURE__ */ s.createElement("p", { className: Te({ error: i }) }, a));
2928
+ ) : null, de = T ? D(T) : o ? /* @__PURE__ */ e.createElement(
2929
+ "span",
2930
+ {
2931
+ className: g(
2932
+ A[t],
2933
+ "flex shrink-0 items-center justify-center",
2934
+ n ? "text-light-400" : "text-light-500"
2935
+ )
2936
+ },
2937
+ o
2938
+ ) : null, G = T ? /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ e.createElement(
2939
+ "span",
2940
+ {
2941
+ className: g(
2942
+ "truncate font-medium",
2943
+ n ? "text-light-400" : "text-light-800"
2944
+ )
2945
+ },
2946
+ T.label
2947
+ ), T.supportingText && /* @__PURE__ */ e.createElement("span", { className: n ? "text-light-400" : "text-light-700" }, T.supportingText)) : /* @__PURE__ */ e.createElement("span", { className: n ? "text-light-400" : "text-light-500" }, c), ue = y && /* @__PURE__ */ e.createElement("div", { role: "listbox", className: pr({ size: t }) }, W.length === 0 && /* @__PURE__ */ e.createElement("div", { className: g(q({ size: t }), "mx-1 w-auto text-light-500 hover:bg-transparent") }, "No options found"), W.map((v) => {
2948
+ const B = z ? h.includes(v.id) : v.id === p;
2949
+ return /* @__PURE__ */ e.createElement("div", { key: v.id, className: "px-1 py-0.5" }, /* @__PURE__ */ e.createElement(
2950
+ "button",
2951
+ {
2952
+ type: "button",
2953
+ role: "option",
2954
+ "aria-selected": B,
2955
+ disabled: v.disabled,
2956
+ onClick: () => R(v),
2957
+ className: q({ size: t, disabled: v.disabled })
2958
+ },
2959
+ D(v),
2960
+ /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap" }, /* @__PURE__ */ e.createElement(
2961
+ "span",
2962
+ {
2963
+ className: g(
2964
+ "truncate font-medium",
2965
+ v.disabled ? "text-light-400" : "text-light-900"
2966
+ )
2967
+ },
2968
+ v.label
2969
+ ), v.supportingText && /* @__PURE__ */ e.createElement(
2970
+ "span",
2971
+ {
2972
+ className: v.disabled ? "text-light-400" : "text-light-700"
2973
+ },
2974
+ v.supportingText
2975
+ )),
2976
+ B && /* @__PURE__ */ e.createElement(hr, { className: "ml-auto size-5 shrink-0 text-primary-500" })
2977
+ ));
2978
+ }));
2979
+ return /* @__PURE__ */ e.createElement("div", { ref: L, className: g(u ? wr : ur(), k) }, r && /* @__PURE__ */ e.createElement("label", { className: u ? yr() : mr() }, r, l && /* @__PURE__ */ e.createElement("span", { className: "text-error-400" }, "*"), i), /* @__PURE__ */ e.createElement(
2980
+ "div",
2981
+ {
2982
+ className: "relative",
2983
+ onKeyDown: (v) => {
2984
+ v.key === "Escape" && I();
2985
+ }
2986
+ },
2987
+ s === "default" ? /* @__PURE__ */ e.createElement(
2988
+ "button",
2989
+ {
2990
+ type: "button",
2991
+ "aria-haspopup": "listbox",
2992
+ "aria-expanded": y,
2993
+ disabled: n,
2994
+ onClick: P,
2995
+ className: g(u ? X({ size: t, open: y, disabled: n }) : U({ size: t, open: y, disabled: n }), w)
2996
+ },
2997
+ de,
2998
+ /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center" }, G),
2999
+ /* @__PURE__ */ e.createElement(
3000
+ br,
3001
+ {
3002
+ className: g(Q[t], "shrink-0 text-light-500")
3003
+ }
3004
+ )
3005
+ ) : /* @__PURE__ */ e.createElement(
3006
+ "div",
3007
+ {
3008
+ role: "combobox",
3009
+ "aria-haspopup": "listbox",
3010
+ "aria-expanded": y,
3011
+ onClick: P,
3012
+ className: g(u ? X({ size: t, open: y, disabled: n }) : U({ size: t, open: y, disabled: n }), w)
3013
+ },
3014
+ /* @__PURE__ */ e.createElement(
3015
+ fr,
3016
+ {
3017
+ className: g(
3018
+ Q[t],
3019
+ "shrink-0",
3020
+ n ? "text-light-400" : "text-light-500"
3021
+ )
3022
+ }
3023
+ ),
3024
+ z && $.length > 0 && /* @__PURE__ */ e.createElement("div", { className: "flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide" }, $.map((v) => /* @__PURE__ */ e.createElement(
3025
+ ae,
3026
+ {
3027
+ key: v.id,
3028
+ size: "sm",
3029
+ disabled: n,
3030
+ icon: v.avatar ? /* @__PURE__ */ e.createElement(
3031
+ "img",
3032
+ {
3033
+ src: v.avatar,
3034
+ alt: "",
3035
+ className: "size-4 shrink-0 rounded-full object-cover"
3036
+ }
3037
+ ) : void 0,
3038
+ onClose: () => R(v)
3039
+ },
3040
+ v.label
3041
+ ))),
3042
+ !z && !y && T ? /* @__PURE__ */ e.createElement("span", { className: "flex min-w-0 flex-1 items-center" }, G) : /* @__PURE__ */ e.createElement(
3043
+ "input",
3044
+ {
3045
+ ref: S,
3046
+ value: N,
3047
+ disabled: n,
3048
+ placeholder: z && $.length > 0 ? "" : c,
3049
+ onChange: (v) => {
3050
+ C(v.target.value), y || x(!0);
3051
+ },
3052
+ onKeyDown: ce,
3053
+ className: "min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"
3054
+ }
3055
+ )
3056
+ ),
3057
+ ue
3058
+ ), a && /* @__PURE__ */ e.createElement("p", { className: gr() }, a));
3059
+ }
3060
+ const Er = b(
3061
+ [
3062
+ "inline-flex items-center justify-center gap-1 shrink-0",
3063
+ "rounded-md border border-light-200 bg-white px-2 py-1",
3064
+ "font-bold text-caption-sm text-light-900",
3065
+ "transition-shadow"
3066
+ ],
3067
+ {
3068
+ variants: {
3069
+ open: {
3070
+ true: "shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",
3071
+ false: ""
3072
+ },
3073
+ disabled: {
3074
+ true: "cursor-not-allowed opacity-50",
3075
+ false: "cursor-pointer"
3076
+ }
3077
+ },
3078
+ defaultVariants: { open: !1, disabled: !1 }
3079
+ }
3080
+ ), Nr = b(
3081
+ "flex size-5 shrink-0 items-center justify-center text-light-500",
3082
+ {
3083
+ variants: {
3084
+ disabled: {
3085
+ true: "cursor-not-allowed opacity-50",
3086
+ false: "cursor-pointer hover:text-light-700"
3087
+ }
3088
+ },
3089
+ defaultVariants: { disabled: !1 }
3090
+ }
3091
+ ), kr = b(
3092
+ "rounded-full transition-shadow",
3093
+ {
3094
+ variants: {
3095
+ open: {
3096
+ true: "shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",
3097
+ false: ""
3098
+ },
3099
+ disabled: {
3100
+ true: "cursor-not-allowed opacity-50",
3101
+ false: "cursor-pointer"
3102
+ }
3103
+ },
3104
+ defaultVariants: { open: !1, disabled: !1 }
3105
+ }
3106
+ ), Sr = b([
3107
+ "absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip",
3108
+ "rounded-lg border border-light-200 bg-white",
3109
+ "shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"
3110
+ ]), Cr = b(
3111
+ "flex w-full flex-col items-start border-b border-light-200 px-4 py-3"
3112
+ ), zr = b(
3113
+ "flex w-full flex-col items-start overflow-y-auto py-1"
3114
+ ), Lr = b(
3115
+ [
3116
+ "mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5",
3117
+ "text-left font-bold text-caption-lg"
3118
+ ],
3119
+ {
3120
+ variants: {
3121
+ disabled: {
3122
+ true: "cursor-not-allowed text-light-400",
3123
+ false: "cursor-pointer text-light-800 hover:bg-light-50"
3124
+ }
3125
+ },
3126
+ defaultVariants: { disabled: !1 }
3127
+ }
3128
+ ), Br = b(
3129
+ "ml-auto shrink-0 font-normal text-caption-sm text-light-500"
3130
+ ), Tr = b("my-1 h-px w-full bg-light-200"), Vr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 18 18", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3131
+ "path",
3132
+ {
3133
+ d: "M4.5 6.75L9 11.25L13.5 6.75",
3134
+ stroke: "currentColor",
3135
+ strokeWidth: "1.67",
3136
+ strokeLinecap: "round",
3137
+ strokeLinejoin: "round"
3138
+ }
3139
+ )), jr = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 18 18", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3140
+ "path",
3141
+ {
3142
+ d: "M13.5 11.25L9 6.75L4.5 11.25",
3143
+ stroke: "currentColor",
3144
+ strokeWidth: "1.67",
3145
+ strokeLinecap: "round",
3146
+ strokeLinejoin: "round"
3147
+ }
3148
+ )), Ir = ({ className: t }) => /* @__PURE__ */ e.createElement("svg", { viewBox: "0 0 20 20", fill: "none", className: t }, /* @__PURE__ */ e.createElement(
3149
+ "path",
3150
+ {
3151
+ d: "M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",
3152
+ stroke: "currentColor",
3153
+ strokeWidth: "1.67",
3154
+ strokeLinecap: "round",
3155
+ strokeLinejoin: "round"
3156
+ }
3157
+ ));
3158
+ function Fr({
3159
+ trigger: t = "button",
3160
+ label: s = "Account",
3161
+ icon: r,
3162
+ avatarSrc: l,
3163
+ avatarInitials: i,
3164
+ header: a,
3165
+ items: c,
3166
+ open: n,
3167
+ defaultOpen: u = !1,
3168
+ onOpenChange: o,
3169
+ disabled: m = !1,
3170
+ align: p = "end",
3171
+ className: f,
3172
+ menuClassName: h
3173
+ }) {
3174
+ const [E, w] = e.useState(u), k = n !== void 0, y = k ? n : E, x = e.useRef(null), N = (S) => {
3175
+ k || w(S), o?.(S);
3176
+ };
3177
+ e.useEffect(() => {
3178
+ if (!y) return;
3179
+ const S = (V) => {
3180
+ x.current?.contains(V.target) || N(!1);
3181
+ }, z = (V) => {
3182
+ V.key === "Escape" && N(!1);
3183
+ };
3184
+ return document.addEventListener("mousedown", S), document.addEventListener("keydown", z), () => {
3185
+ document.removeEventListener("mousedown", S), document.removeEventListener("keydown", z);
3186
+ };
3187
+ }, [y]);
3188
+ const C = () => {
3189
+ m || N(!y);
3190
+ }, L = (S) => {
3191
+ S.disabled || (S.onClick?.(), N(!1));
3192
+ };
3193
+ return /* @__PURE__ */ e.createElement("div", { ref: x, className: g("relative inline-block", f) }, t === "button" && /* @__PURE__ */ e.createElement(
3194
+ "button",
3195
+ {
3196
+ type: "button",
3197
+ "aria-haspopup": "menu",
3198
+ "aria-expanded": y,
3199
+ disabled: m,
3200
+ onClick: C,
3201
+ className: Er({ open: y, disabled: m })
3202
+ },
3203
+ /* @__PURE__ */ e.createElement("span", null, s),
3204
+ y ? /* @__PURE__ */ e.createElement(jr, { className: "size-[18px]" }) : /* @__PURE__ */ e.createElement(Vr, { className: "size-[18px]" })
3205
+ ), t === "icon" && /* @__PURE__ */ e.createElement(
3206
+ "button",
3207
+ {
3208
+ type: "button",
3209
+ "aria-haspopup": "menu",
3210
+ "aria-expanded": y,
3211
+ "aria-label": s,
3212
+ disabled: m,
3213
+ onClick: C,
3214
+ className: Nr({ disabled: m })
3215
+ },
3216
+ r ?? /* @__PURE__ */ e.createElement(Ir, { className: "size-5" })
3217
+ ), t === "avatar" && /* @__PURE__ */ e.createElement(
3218
+ "button",
3219
+ {
3220
+ type: "button",
3221
+ "aria-haspopup": "menu",
3222
+ "aria-expanded": y,
3223
+ "aria-label": s,
3224
+ disabled: m,
3225
+ onClick: C,
3226
+ className: kr({ open: y, disabled: m })
3227
+ },
3228
+ /* @__PURE__ */ e.createElement(_, { src: l, initials: i, size: "md", status: "online" })
3229
+ ), y && /* @__PURE__ */ e.createElement(
3230
+ "div",
3231
+ {
3232
+ role: "menu",
3233
+ className: g(
3234
+ Sr(),
3235
+ p === "end" ? "right-0" : "left-0",
3236
+ h
3237
+ )
3238
+ },
3239
+ a && /* @__PURE__ */ e.createElement("div", { className: Cr() }, /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center gap-3" }, /* @__PURE__ */ e.createElement(
3240
+ _,
3241
+ {
3242
+ src: a.avatarSrc,
3243
+ initials: a.avatarInitials,
3244
+ size: "md",
3245
+ status: a.status ?? "online"
3246
+ }
3247
+ ), /* @__PURE__ */ e.createElement("div", { className: "flex min-w-0 flex-1 flex-col items-start text-left" }, /* @__PURE__ */ e.createElement("span", { className: "w-full truncate text-sm font-bold text-light-800" }, a.name), a.subtitle && /* @__PURE__ */ e.createElement("span", { className: "w-full truncate text-caption-lg font-normal text-light-700" }, a.subtitle)))),
3248
+ /* @__PURE__ */ e.createElement("div", { className: zr() }, c.map(
3249
+ (S) => S.divider ? /* @__PURE__ */ e.createElement("div", { key: S.id, role: "separator", className: Tr() }) : /* @__PURE__ */ e.createElement(
3250
+ "button",
3251
+ {
3252
+ key: S.id,
3253
+ type: "button",
3254
+ role: "menuitem",
3255
+ disabled: S.disabled,
3256
+ onClick: () => L(S),
3257
+ className: Lr({ disabled: S.disabled })
3258
+ },
3259
+ S.icon && /* @__PURE__ */ e.createElement("span", { className: "flex size-4 shrink-0 items-center justify-center" }, S.icon),
3260
+ /* @__PURE__ */ e.createElement("span", { className: "flex-1 truncate" }, S.label),
3261
+ S.shortcut && /* @__PURE__ */ e.createElement("span", { className: Br() }, S.shortcut)
3262
+ )
3263
+ ))
3264
+ ));
1239
3265
  }
1240
3266
  export {
1241
- z as Button,
1242
- Ge as CardNumberInput,
1243
- U as Checkbox,
1244
- T as Input,
1245
- Pe as InputCounter,
1246
- We as MultiSelectInput,
1247
- _e as PhoneInput,
1248
- Fe as RadioGroup,
1249
- H as RadioGroupItem,
1250
- Oe as SaleAmountInput,
1251
- X as Toggle,
1252
- te as Tooltip,
1253
- Le as WebsiteCopyInput,
1254
- Me as WebsiteInput
3267
+ _ as Avatar,
3268
+ rt as AvatarGroup,
3269
+ at as AvatarLabelGroup,
3270
+ it as AvatarProfilePhoto,
3271
+ He as Badge,
3272
+ Ze as BadgeGroup,
3273
+ Y as Button,
3274
+ Ar as CardNumberInput,
3275
+ Ne as Checkbox,
3276
+ Fr as Dropdown,
3277
+ oe as Input,
3278
+ Mr as InputCounter,
3279
+ Hr as InputDropdown,
3280
+ Je as Loading,
3281
+ Pr as MultiSelectInput,
3282
+ Wr as PhoneInput,
3283
+ $r as RadioGroup,
3284
+ ze as RadioGroupItem,
3285
+ Rr as SaleAmountInput,
3286
+ mt as Tab,
3287
+ pt as TabList,
3288
+ ae as Tag,
3289
+ Pt as Textarea,
3290
+ Te as Toggle,
3291
+ Oe as Tooltip,
3292
+ Gr as WebsiteCopyInput,
3293
+ Dr as WebsiteInput
1255
3294
  };