laif-ds 0.2.54 → 0.2.56

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.
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
- import { __require as t } from "../node_modules/eventemitter3/index2.js";
4
- var r = t();
5
- const m = /* @__PURE__ */ e(r);
2
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
3
+ import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
4
+ var t = e();
5
+ const a = /* @__PURE__ */ r(t);
6
6
  export {
7
- m as default
7
+ a as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
3
- import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
4
- var t = e();
5
- const a = /* @__PURE__ */ r(t);
2
+ import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
+ import { __require as r } from "../node_modules/extend/index.js";
4
+ var t = r();
5
+ const x = /* @__PURE__ */ e(t);
6
6
  export {
7
- a as default
7
+ x as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
- import { __require as r } from "../node_modules/extend/index.js";
4
- var t = r();
5
- const x = /* @__PURE__ */ e(t);
3
+ import { __require as t } from "../node_modules/eventemitter3/index2.js";
4
+ var r = t();
5
+ const m = /* @__PURE__ */ e(r);
6
6
  export {
7
- x as default
7
+ m as default
8
8
  };
@@ -3,7 +3,7 @@ import { jsxs as s, jsx as l, Fragment as re } from "react/jsx-runtime";
3
3
  import { Badge as ne } from "./badge.js";
4
4
  import { Command as te, CommandInput as se, CommandList as ie, CommandEmpty as oe, CommandGroup as R, CommandItem as A } from "./command.js";
5
5
  import { Label as de } from "./label.js";
6
- import { designTokens as d } from "../../lib/design-tokens.js";
6
+ import { designTokens as i } from "../../lib/design-tokens.js";
7
7
  import { cn as y } from "../../lib/utils.js";
8
8
  import { useState as h, useRef as ce, useMemo as S, useCallback as ue, useEffect as me } from "react";
9
9
  import { Checkbox as fe } from "./checkbox.js";
@@ -11,11 +11,11 @@ import { Icon as z } from "./icon.js";
11
11
  import { Popover as pe, PopoverTrigger as he, PopoverContent as ge } from "./popover.js";
12
12
  import ve from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
13
13
  const be = {
14
- sm: d.sizes.sm,
15
- default: d.sizes.default,
16
- lg: d.sizes.lg
14
+ sm: i.sizes.sm,
15
+ default: i.sizes.default,
16
+ lg: i.sizes.lg
17
17
  };
18
- function ke(P) {
18
+ function Ve(P) {
19
19
  const {
20
20
  multiple: r = !1,
21
21
  options: c,
@@ -33,17 +33,17 @@ function ke(P) {
33
33
  className: q = "",
34
34
  labelClassName: H = "",
35
35
  wrpClassName: J = "",
36
- searchable: O = !1,
36
+ searchable: I = !1,
37
37
  creatable: K = !1,
38
38
  groupBy: v = "group",
39
- maxSelected: o,
39
+ maxSelected: d,
40
40
  showChipsInsteadOfCount: Q = !1,
41
41
  disabled: b,
42
42
  size: U = "default",
43
43
  isSingleSelectClearable: Y = !1
44
- } = P, [x, C] = h(!1), [u, N] = h(""), w = ce(null), [V, Z] = h(0), k = P.hasOwnProperty("value"), [_, ee] = h(T), i = k ? B : _, m = (e) => {
45
- k || ee(e), W?.(e);
46
- }, n = S(() => r ? Array.isArray(i) ? i : [] : i != null ? [i] : [], [i, r]), f = S(() => {
44
+ } = P, [x, C] = h(!1), [u, w] = h(""), N = ce(null), [O, Z] = h(0), V = P.hasOwnProperty("value"), [_, ee] = h(T), o = V ? B : _, m = (e) => {
45
+ V || ee(e), W?.(e);
46
+ }, n = S(() => r ? Array.isArray(o) ? o : [] : o != null ? [o] : [], [o, r]), f = S(() => {
47
47
  const e = c.filter((t) => n.includes(t.value));
48
48
  if (r) {
49
49
  const t = n.filter((a) => !e.find((p) => p.value === a)).map((a) => ({ value: a, label: a }));
@@ -51,11 +51,11 @@ function ke(P) {
51
51
  } else if (n.length && !e.length)
52
52
  return [{ value: n[0], label: n[0] }];
53
53
  return e;
54
- }, [c, n, r]), I = (e) => {
54
+ }, [c, n, r]), k = (e) => {
55
55
  if (!e.disabled)
56
56
  if (r) {
57
57
  const t = n.includes(e.value);
58
- if (!t && o !== void 0 && n.length >= o)
58
+ if (!t && d !== void 0 && n.length >= d)
59
59
  return;
60
60
  m(
61
61
  t ? n.filter((a) => a !== e.value) : [...n, e.value]
@@ -63,7 +63,7 @@ function ke(P) {
63
63
  } else
64
64
  m(e.value), C(!1);
65
65
  }, j = ue(() => {
66
- m(r ? [] : void 0), N(""), g && g();
66
+ m(r ? [] : void 0), w(""), g && g();
67
67
  }, [m, g, r]), le = S(() => v ? c.reduce(
68
68
  (e, t) => {
69
69
  const a = t[v] || "";
@@ -72,7 +72,7 @@ function ke(P) {
72
72
  {}
73
73
  ) : { "": c }, [c, v]);
74
74
  return me(() => {
75
- w.current && Z(w.current.getBoundingClientRect().width);
75
+ N.current && Z(N.current.getBoundingClientRect().width);
76
76
  }, [x, n, c]), /* @__PURE__ */ s("div", { className: y("flex flex-col gap-1.5", J), children: [
77
77
  D && /* @__PURE__ */ l(de, { className: H, children: D }),
78
78
  /* @__PURE__ */ s(
@@ -85,13 +85,13 @@ function ke(P) {
85
85
  /* @__PURE__ */ l(he, { asChild: !0, children: /* @__PURE__ */ s(
86
86
  "div",
87
87
  {
88
- ref: w,
88
+ ref: N,
89
89
  className: y(
90
- d.input.base,
91
- d.radius.default,
92
- d.focusRingWithin,
90
+ i.input.base,
91
+ i.radius.default,
92
+ i.focusRingWithin,
93
93
  "flex w-full min-w-[100px] cursor-pointer items-center justify-between gap-2",
94
- x && d.activeRing,
94
+ x && i.activeRing,
95
95
  be[U],
96
96
  b && "cursor-not-allowed opacity-50",
97
97
  q
@@ -104,7 +104,7 @@ function ke(P) {
104
104
  variant: "secondary",
105
105
  className: "hover:bg-d-secondary/100 bg-d-secondary/50 border-d-border flex cursor-pointer items-center gap-1 border",
106
106
  onClick: (t) => {
107
- t.stopPropagation(), I(e);
107
+ t.stopPropagation(), k(e);
108
108
  },
109
109
  children: [
110
110
  e.label,
@@ -134,7 +134,7 @@ function ke(P) {
134
134
  )
135
135
  ] }) : /* @__PURE__ */ s("div", { className: "flex h-full w-full min-w-0 items-center justify-between gap-2", children: [
136
136
  /* @__PURE__ */ l("div", { className: "min-w-0 flex-1 truncate", children: typeof f[0]?.label == "string" ? /* @__PURE__ */ l("span", { children: f[0]?.label }) : f[0]?.label }),
137
- Y && i !== void 0 && i !== null && /* @__PURE__ */ l(
137
+ Y && o !== void 0 && o !== null && /* @__PURE__ */ l(
138
138
  "div",
139
139
  {
140
140
  className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
@@ -162,17 +162,17 @@ function ke(P) {
162
162
  ge,
163
163
  {
164
164
  className: "p-0",
165
- style: { width: V > 0 ? V : "auto" },
165
+ style: { width: O > 0 ? O : "auto" },
166
166
  align: "start",
167
167
  sideOffset: 4,
168
- children: /* @__PURE__ */ s(te, { shouldFilter: !!O, className: "w-full", children: [
169
- O && /* @__PURE__ */ l(
168
+ children: /* @__PURE__ */ s(te, { shouldFilter: !!I, className: "w-full", children: [
169
+ I && /* @__PURE__ */ l(
170
170
  se,
171
171
  {
172
172
  placeholder: F,
173
173
  className: "placeholder:text-d-muted-foreground",
174
174
  value: u,
175
- onValueChange: N
175
+ onValueChange: w
176
176
  }
177
177
  ),
178
178
  /* @__PURE__ */ s(ie, { className: "max-h-60 overflow-auto overscroll-contain", children: [
@@ -182,7 +182,7 @@ function ke(P) {
182
182
  {
183
183
  className: "cursor-pointer",
184
184
  onSelect: () => {
185
- u && (m(r ? [...n, u] : u), N(""), !r && C(!1));
185
+ u && (m(r ? [...n, u] : u), w(""), !r && C(!1));
186
186
  },
187
187
  children: /* @__PURE__ */ s("div", { className: "text-d-foreground text-xs", children: [
188
188
  L,
@@ -193,16 +193,17 @@ function ke(P) {
193
193
  }
194
194
  ) }),
195
195
  Object.entries(le).map(([e, t]) => /* @__PURE__ */ l(R, { heading: e || void 0, children: t.map((a) => {
196
- const p = n.includes(a.value), ae = r && o !== void 0 && !p && n.length >= o, M = a.disabled || ae;
196
+ const p = n.includes(a.value), ae = r && d !== void 0 && !p && n.length >= d, M = a.disabled || ae;
197
197
  return /* @__PURE__ */ s(
198
198
  A,
199
199
  {
200
200
  value: typeof a.label == "string" ? a.label : String(a.value),
201
- onSelect: () => !M && I(a),
201
+ onSelect: () => !M && k(a),
202
202
  className: y(
203
203
  "cursor-pointer",
204
+ i.dropdownItem.hover,
204
205
  M && "cursor-not-allowed opacity-50",
205
- !r && p && "bg-d-accent/75 text-d-accent-foreground"
206
+ !r && p && i.dropdownItem.selected
206
207
  ),
207
208
  children: [
208
209
  r && /* @__PURE__ */ l(fe, { checked: p, className: "mr-1" }),
@@ -213,7 +214,7 @@ function ke(P) {
213
214
  );
214
215
  }) }, e))
215
216
  ] }),
216
- r && o !== void 0 && n.length >= o && /* @__PURE__ */ l("div", { className: "border-d-border text-d-muted-foreground border-t px-2 py-1 text-xs", children: G(o) })
217
+ r && d !== void 0 && n.length >= d && /* @__PURE__ */ l("div", { className: "border-d-border text-d-muted-foreground border-t px-2 py-1 text-xs", children: G(d) })
217
218
  ] })
218
219
  }
219
220
  )
@@ -223,5 +224,5 @@ function ke(P) {
223
224
  ] });
224
225
  }
225
226
  export {
226
- ke as AppSelect
227
+ Ve as AppSelect
227
228
  };
@@ -1,23 +1,22 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
3
3
  import { useDebounce as de } from "../../hooks/use-debounce.js";
4
4
  import { cva as ie } from "../../node_modules/class-variance-authority/dist/index.js";
5
5
  import * as R from "react";
6
- import { useState as p, useEffect as b, useCallback as j } from "react";
7
- import { designTokens as x } from "../../lib/design-tokens.js";
6
+ import { useState as w, useEffect as b, useCallback as j } from "react";
7
+ import { designTokens as u } from "../../lib/design-tokens.js";
8
8
  import { cn as M } from "../../lib/utils.js";
9
9
  import { Checkbox as fe } from "./checkbox.js";
10
10
  import { Command as me, CommandInput as ue, CommandList as he, CommandEmpty as ge, CommandGroup as O, CommandItem as V } from "./command.js";
11
11
  import { Icon as _ } from "./icon.js";
12
12
  import { Label as pe } from "./label.js";
13
- import { Popover as xe, PopoverTrigger as we, PopoverContent as ye } from "./popover.js";
13
+ import { Popover as we, PopoverTrigger as xe, PopoverContent as ye } from "./popover.js";
14
14
  import Ne from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
15
- import be from "../../node_modules/lucide-react/dist/esm/icons/check.js";
16
- const Ce = ie(
15
+ const be = ie(
17
16
  M(
18
- x.input.base,
19
- x.radius.default,
20
- x.interaction.disabled,
17
+ u.input.base,
18
+ u.radius.default,
19
+ u.interaction.disabled,
21
20
  "flex items-center justify-between whitespace-nowrap transition-all [&>span]:line-clamp-1",
22
21
  "data-[placeholder]:text-d-muted-foreground",
23
22
  "focus:outline-none"
@@ -25,9 +24,9 @@ const Ce = ie(
25
24
  {
26
25
  variants: {
27
26
  size: {
28
- default: x.sizes.default,
29
- sm: x.sizes.sm,
30
- lg: x.sizes.lg
27
+ default: u.sizes.default,
28
+ sm: u.sizes.sm,
29
+ lg: u.sizes.lg
31
30
  }
32
31
  },
33
32
  defaultVariants: {
@@ -35,10 +34,10 @@ const Ce = ie(
35
34
  }
36
35
  }
37
36
  );
38
- function Be({
37
+ function Fe({
39
38
  fetcher: i,
40
39
  initialOptions: t,
41
- debounce: w = 300,
40
+ debounce: x = 300,
42
41
  renderOptionItem: C,
43
42
  resolveOptionValue: a,
44
43
  renderSelectedValue: s,
@@ -48,14 +47,14 @@ function Be({
48
47
  value: n,
49
48
  onChange: g,
50
49
  disabled: A = !1,
51
- className: D,
52
- wrpClassName: v,
50
+ className: v,
51
+ wrpClassName: D,
53
52
  noResultsMessage: E,
54
53
  clearable: S = !0,
55
54
  multiple: l = !1,
56
55
  size: ee
57
56
  }) {
58
- const [m, L] = p(!1), P = R.useRef(null), F = R.useRef(null), re = R.useRef(null), [ne, I] = p({ loading: !1, error: null }), [X, te] = p(""), W = de(X, w), [B, q] = p(/* @__PURE__ */ new Map()), [$, G] = p([]), [H, se] = p(0), [J, Q] = p(() => t?.length ? new Map(
57
+ const [m, I] = w(!1), L = R.useRef(null), P = R.useRef(null), re = R.useRef(null), [ne, F] = w({ loading: !1, error: null }), [X, te] = w(""), W = de(X, x), [B, q] = w(/* @__PURE__ */ new Map()), [$, G] = w([]), [H, se] = w(0), [J, Q] = w(() => t?.length ? new Map(
59
58
  t.map((e) => [a(e), e])
60
59
  ) : /* @__PURE__ */ new Map());
61
60
  b(() => {
@@ -67,7 +66,7 @@ function Be({
67
66
  return t.forEach((c) => o.set(a(c), c)), o;
68
67
  }));
69
68
  }, [t, a]);
70
- const [k, Y] = p([]), z = j(
69
+ const [k, Y] = w([]), z = j(
71
70
  (e) => {
72
71
  if (!e) {
73
72
  Y([]);
@@ -103,33 +102,33 @@ function Be({
103
102
  }
104
103
  (async () => {
105
104
  try {
106
- I({ loading: !0, error: null });
105
+ F({ loading: !0, error: null });
107
106
  const c = await i(W);
108
107
  q((d) => new Map(d).set(e, c)), G(c), Q((d) => {
109
108
  const y = new Map(d);
110
109
  return c.forEach((U) => y.set(a(U), U)), y;
111
110
  });
112
111
  } catch (c) {
113
- I({
112
+ F({
114
113
  loading: !1,
115
114
  error: c instanceof Error ? c.message : "Failed to fetch options"
116
115
  });
117
116
  } finally {
118
- I((c) => ({ ...c, loading: !1 }));
117
+ F((c) => ({ ...c, loading: !1 }));
119
118
  }
120
119
  })();
121
120
  }, [m, W, B, i, a]), b(() => {
122
121
  m && z(n);
123
122
  }, [m, z, n]), b(() => {
124
- m && P.current && P.current.focus();
123
+ m && L.current && L.current.focus();
125
124
  }, [m]), b(() => {
126
- if (!m || !F.current) return;
127
- const e = F.current.getBoundingClientRect();
125
+ if (!m || !P.current) return;
126
+ const e = P.current.getBoundingClientRect();
128
127
  se(e.width);
129
128
  }, [m]);
130
129
  const ce = j(
131
130
  (e) => {
132
- g?.(S && e === n ? "" : e), L(!1);
131
+ g?.(S && e === n ? "" : e), I(!1);
133
132
  },
134
133
  [n, g, S]
135
134
  ), ae = j(
@@ -142,34 +141,34 @@ function Be({
142
141
  [n, g, l]
143
142
  ), oe = j(
144
143
  (e) => {
145
- e.stopPropagation(), e.preventDefault(), g?.(l ? [] : ""), L(!1);
144
+ e.stopPropagation(), e.preventDefault(), g?.(l ? [] : ""), I(!1);
146
145
  },
147
146
  [g]
148
147
  ), Z = R.useId();
149
- return /* @__PURE__ */ u("div", { className: M("flex flex-col gap-1.5", v), children: [
148
+ return /* @__PURE__ */ p("div", { className: M("flex flex-col gap-1.5", D), children: [
150
149
  N && /* @__PURE__ */ r(pe, { htmlFor: Z, children: N }),
151
- /* @__PURE__ */ u(xe, { open: m, onOpenChange: L, children: [
152
- /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
150
+ /* @__PURE__ */ p(we, { open: m, onOpenChange: I, children: [
151
+ /* @__PURE__ */ r(xe, { asChild: !0, children: /* @__PURE__ */ r(
153
152
  "button",
154
153
  {
155
154
  id: Z,
156
- ref: F,
155
+ ref: P,
157
156
  type: "button",
158
157
  disabled: A,
159
158
  className: M(
160
- Ce({ size: ee }),
159
+ be({ size: ee }),
161
160
  "!border-d-border/50 border !shadow-none",
162
161
  A && "cursor-not-allowed opacity-50",
163
162
  "font-normal",
164
163
  "w-full",
165
164
  "w-full",
166
- x.focusRing,
167
- m && x.activeRing,
168
- D
165
+ u.focusRing,
166
+ m && u.activeRing,
167
+ v
169
168
  ),
170
- children: /* @__PURE__ */ u("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
169
+ children: /* @__PURE__ */ p("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
171
170
  l ? Array.isArray(n) && n.length > 0 ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: n.length === 1 ? k[0] && s(k[0]) : `${n.length} elementi selezionati` }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }) : K ? /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 truncate text-left", children: s(K) }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground truncate text-left", children: f }),
172
- /* @__PURE__ */ u("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
171
+ /* @__PURE__ */ p("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
173
172
  S && (l && Array.isArray(n) && n.length > 0 || !l && K) && /* @__PURE__ */ r(
174
173
  "div",
175
174
  {
@@ -210,9 +209,9 @@ function Be({
210
209
  onWheel: (e) => e.stopPropagation(),
211
210
  avoidCollisions: !1,
212
211
  children: /* @__PURE__ */ r(
213
- Se,
212
+ Ae,
214
213
  {
215
- inputRef: P,
214
+ inputRef: L,
216
215
  commandListRef: re,
217
216
  placeholder: f,
218
217
  searchTerm: X,
@@ -235,10 +234,10 @@ function Be({
235
234
  ] })
236
235
  ] });
237
236
  }
238
- function Ae({
237
+ function Ce({
239
238
  option: i,
240
239
  multiple: t,
241
- value: w,
240
+ value: x,
242
241
  resolveOptionValue: C,
243
242
  renderSelectedValue: a,
244
243
  renderOptionItem: s,
@@ -247,35 +246,28 @@ function Ae({
247
246
  }) {
248
247
  const f = C(i);
249
248
  let n = !1;
250
- return t ? n = Array.isArray(w) && w.includes(f) : n = w === f, /* @__PURE__ */ r(
249
+ return t ? n = Array.isArray(x) && x.includes(f) : n = x === f, /* @__PURE__ */ r(
251
250
  V,
252
251
  {
253
252
  value: f,
254
253
  onSelect: t ? N : h,
255
- className: "cursor-pointer",
256
- children: /* @__PURE__ */ u("div", { className: "flex w-full items-center justify-between overflow-hidden", children: [
257
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
258
- t && /* @__PURE__ */ r(fe, { checked: n }),
259
- s ? /* @__PURE__ */ r("div", { className: "truncate", children: s(i) }) : /* @__PURE__ */ r("span", { className: "truncate", children: a(i) })
260
- ] }),
261
- /* @__PURE__ */ r(
262
- be,
263
- {
264
- className: M(
265
- "ml-2 h-4 w-4 flex-shrink-0",
266
- n ? "opacity-100" : "opacity-0"
267
- )
268
- }
269
- )
270
- ] })
254
+ className: M(
255
+ "cursor-pointer",
256
+ u.dropdownItem.hover,
257
+ !t && n && u.dropdownItem.selected
258
+ ),
259
+ children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between overflow-hidden", children: /* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
260
+ t && /* @__PURE__ */ r(fe, { checked: n }),
261
+ s ? /* @__PURE__ */ r("div", { className: "truncate", children: s(i) }) : /* @__PURE__ */ r("span", { className: "truncate", children: a(i) })
262
+ ] }) })
271
263
  },
272
264
  f
273
265
  );
274
266
  }
275
- function Se({
267
+ function Ae({
276
268
  inputRef: i,
277
269
  commandListRef: t,
278
- placeholder: w,
270
+ placeholder: x,
279
271
  searchTerm: C,
280
272
  onSearchTermChange: a,
281
273
  fetchState: s,
@@ -285,36 +277,36 @@ function Se({
285
277
  multiple: n,
286
278
  value: g,
287
279
  resolveOptionValue: A,
288
- renderSelectedValue: D,
289
- renderOptionItem: v,
280
+ renderSelectedValue: v,
281
+ renderOptionItem: D,
290
282
  onSelect: E,
291
283
  onSelectMultiple: S
292
284
  }) {
293
- return /* @__PURE__ */ u(me, { shouldFilter: !1, className: "w-full border-none shadow-sm", children: [
285
+ return /* @__PURE__ */ p(me, { shouldFilter: !1, className: "w-full border-none shadow-sm", children: [
294
286
  /* @__PURE__ */ r(
295
287
  ue,
296
288
  {
297
289
  ref: i,
298
- placeholder: w,
290
+ placeholder: x,
299
291
  className: "placeholder:text-d-muted-foreground",
300
292
  value: C,
301
293
  onValueChange: a
302
294
  }
303
295
  ),
304
296
  s.loading && h.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ r(Ne, { className: "h-4 w-4 animate-spin" }) }),
305
- /* @__PURE__ */ u(he, { ref: t, children: [
297
+ /* @__PURE__ */ p(he, { ref: t, children: [
306
298
  s.error && /* @__PURE__ */ r("div", { className: "text-d-destructive p-3 text-center", children: s.error }),
307
- s.loading && h.length === 0 && /* @__PURE__ */ r(Re, {}),
299
+ s.loading && h.length === 0 && /* @__PURE__ */ r(Se, {}),
308
300
  !s.loading && !s.error && h.length === 0 && (N || /* @__PURE__ */ r(ge, { children: f || "No results found." })),
309
301
  !s.loading && !s.error && h.length > 0 && /* @__PURE__ */ r(O, { children: h.map((l) => /* @__PURE__ */ r(
310
- Ae,
302
+ Ce,
311
303
  {
312
304
  option: l,
313
305
  multiple: n,
314
306
  value: g,
315
307
  resolveOptionValue: A,
316
- renderSelectedValue: D,
317
- renderOptionItem: v,
308
+ renderSelectedValue: v,
309
+ renderOptionItem: D,
318
310
  onSelect: E,
319
311
  onSelectMultiple: S
320
312
  },
@@ -323,16 +315,16 @@ function Se({
323
315
  ] })
324
316
  ] });
325
317
  }
326
- function Re() {
327
- return /* @__PURE__ */ r(O, { children: [1, 2, 3].map((i) => /* @__PURE__ */ r(V, { disabled: !0, children: /* @__PURE__ */ u("div", { className: "flex w-full items-center gap-2", children: [
318
+ function Se() {
319
+ return /* @__PURE__ */ r(O, { children: [1, 2, 3].map((i) => /* @__PURE__ */ r(V, { disabled: !0, children: /* @__PURE__ */ p("div", { className: "flex w-full items-center gap-2", children: [
328
320
  /* @__PURE__ */ r("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
329
- /* @__PURE__ */ u("div", { className: "flex flex-1 flex-col gap-1", children: [
321
+ /* @__PURE__ */ p("div", { className: "flex flex-1 flex-col gap-1", children: [
330
322
  /* @__PURE__ */ r("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
331
323
  /* @__PURE__ */ r("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
332
324
  ] })
333
325
  ] }) }, i)) });
334
326
  }
335
327
  export {
336
- Be as AsyncSelect,
337
- Ce as selectTriggerVariants
328
+ Fe as AsyncSelect,
329
+ be as selectTriggerVariants
338
330
  };
@@ -3,10 +3,10 @@ import { jsx as t, jsxs as l } from "react/jsx-runtime";
3
3
  import { Root as g } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
4
4
  import { cva as f } from "../../node_modules/class-variance-authority/dist/index.js";
5
5
  import { designTokens as r } from "../../lib/design-tokens.js";
6
- import { cn as s } from "../../lib/utils.js";
7
- import { Icon as v } from "./icon.js";
8
- const m = f(
9
- s(
6
+ import { cn as d } from "../../lib/utils.js";
7
+ import { Icon as h } from "./icon.js";
8
+ const v = f(
9
+ d(
10
10
  r.text.base,
11
11
  r.radius.default,
12
12
  r.focusRing,
@@ -43,32 +43,32 @@ const m = f(
43
43
  }
44
44
  );
45
45
  function N({
46
- className: d,
47
- variant: a,
46
+ className: a,
47
+ variant: o,
48
48
  size: e,
49
49
  asChild: n = !1,
50
50
  iconLeft: i,
51
51
  iconRight: c,
52
- isLoading: h = !1,
53
- ...o
52
+ isLoading: m = !1,
53
+ ...s
54
54
  }) {
55
55
  const u = n ? g : "button";
56
56
  return n ? /* @__PURE__ */ t(
57
57
  u,
58
58
  {
59
59
  "data-slot": "button",
60
- className: s(m({ variant: a, size: e, className: d })),
61
- ...o
60
+ className: d(v({ variant: o, size: e, className: a })),
61
+ ...s
62
62
  }
63
63
  ) : /* @__PURE__ */ l(
64
64
  u,
65
65
  {
66
66
  "data-slot": "button",
67
- className: s("relative", m({ variant: a, size: e, className: d })),
68
- ...o,
67
+ className: d("relative", v({ variant: o, size: e, className: a })),
68
+ ...s,
69
69
  children: [
70
- /* @__PURE__ */ t("span", { className: "absolute inset-0 overflow-hidden rounded-[inherit] pointer-events-none", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-out" }) }),
71
- h ? /* @__PURE__ */ l(
70
+ o !== "ghost" && o !== "ghost-destructive" && o !== "ghost-accent" && o !== "link" && /* @__PURE__ */ t("span", { className: "absolute inset-0 overflow-hidden rounded-[inherit] pointer-events-none", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-out" }) }),
71
+ m ? /* @__PURE__ */ l(
72
72
  "svg",
73
73
  {
74
74
  className: "mr-1 -ml-1 animate-spin",
@@ -100,15 +100,15 @@ function N({
100
100
  ]
101
101
  }
102
102
  ) : i && /* @__PURE__ */ t(
103
- v,
103
+ h,
104
104
  {
105
105
  name: i,
106
106
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
107
107
  }
108
108
  ),
109
- o.children,
109
+ s.children,
110
110
  c && /* @__PURE__ */ t(
111
- v,
111
+ h,
112
112
  {
113
113
  name: c,
114
114
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
@@ -120,5 +120,5 @@ function N({
120
120
  }
121
121
  export {
122
122
  N as Button,
123
- m as buttonVariants
123
+ v as buttonVariants
124
124
  };