laif-ds 0.2.49 → 0.2.51

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