@contentstudio/ui 0.1.0 → 0.1.1

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as z, computed as d, openBlock as o, createElementBlock as i, normalizeClass as p, mergeProps as B, createBlock as M, resolveDynamicComponent as I, createCommentVNode as g, renderSlot as S, createElementVNode as c, withKeys as Z, withModifiers as X, toDisplayString as v, createTextVNode as A, ref as E, watch as ee, onMounted as se, onUnmounted as te, withDirectives as U, vModelText as ae, Fragment as F, renderList as le, vShow as oe, normalizeStyle as O, unref as D } from "vue";
2
- const T = {
1
+ import { defineComponent as C, computed as c, openBlock as l, createElementBlock as o, normalizeClass as h, unref as i, mergeProps as z, createBlock as j, resolveDynamicComponent as M, createCommentVNode as g, renderSlot as B, createElementVNode as f, withKeys as te, withModifiers as K, toDisplayString as p, createTextVNode as L, ref as A, watch as se, onMounted as le, onUnmounted as ae, withDirectives as W, vModelText as oe, Fragment as D, renderList as ne, vShow as ie, normalizeStyle as E } from "vue";
2
+ const F = {
3
3
  primary: {
4
4
  base: "blue",
5
5
  light: "50",
@@ -72,48 +72,48 @@ const T = {
72
72
  border: "200",
73
73
  focus: "300"
74
74
  }
75
- }, P = (l, s, e = {}) => {
76
- const { hover: u = !1, active: t = !1, focus: r = !1, disabled: b = !1 } = e;
77
- if (b)
75
+ }, P = (e, s, t = {}) => {
76
+ const { hover: n = !1, active: r = !1, focus: u = !1, disabled: x = !1 } = t;
77
+ if (x)
78
78
  return "bg-gray-100 border-gray-200 text-gray-400 cursor-not-allowed";
79
- const a = T[l];
79
+ const a = F[e];
80
80
  if (!a || s === "default")
81
81
  return "";
82
- const n = [];
82
+ const d = [];
83
83
  switch (s) {
84
84
  case "filled":
85
- n.push(`bg-${a.base}-${a.main}`), n.push("text-white"), u && n.push(`hover:bg-${a.base}-${a.hover}`), t && n.push(`active:bg-${a.base}-${a.dark}`), r && n.push(`focus:ring-${a.base}-${a.focus}/20`);
85
+ d.push(`bg-${a.base}-${a.main}`), d.push("text-white"), n && d.push(`hover:bg-${a.base}-${a.hover}`), r && d.push(`active:bg-${a.base}-${a.dark}`), u && d.push(`focus:ring-${a.base}-${a.focus}/20`);
86
86
  break;
87
87
  case "light":
88
- n.push(`bg-${a.base}-${a.light}`), n.push(`text-${a.base}-${a.main}`), n.push(`border border-${a.base}-${a.border}`), u && n.push(`hover:bg-${a.base}-100`), t && n.push(`active:bg-${a.base}-200`), r && n.push(`focus:ring-${a.base}-${a.focus}/20`);
88
+ d.push(`bg-${a.base}-${a.light}`), d.push(`text-${a.base}-${a.main}`), d.push(`border border-${a.base}-${a.border}`), n && d.push(`hover:bg-${a.base}-100`), r && d.push(`active:bg-${a.base}-200`), u && d.push(`focus:ring-${a.base}-${a.focus}/20`);
89
89
  break;
90
90
  case "outline":
91
- n.push("bg-white"), n.push(`text-${a.base}-${a.main}`), n.push(`border-2 border-${a.base}-${a.main}`), u && n.push(`hover:bg-${a.base}-50`), t && n.push(`active:bg-${a.base}-100`), r && n.push(`focus:ring-${a.base}-${a.focus}/20`);
91
+ d.push("bg-white"), d.push(`text-${a.base}-${a.main}`), d.push(`border-2 border-${a.base}-${a.main}`), n && d.push(`hover:bg-${a.base}-50`), r && d.push(`active:bg-${a.base}-100`), u && d.push(`focus:ring-${a.base}-${a.focus}/20`);
92
92
  break;
93
93
  case "subtle":
94
- n.push(`text-${a.base}-${a.main}`), u && n.push(`hover:bg-${a.base}-50`), t && n.push(`active:bg-${a.base}-100`), r && n.push(`focus:ring-${a.base}-${a.focus}/20`);
94
+ d.push(`text-${a.base}-${a.main}`), n && d.push(`hover:bg-${a.base}-50`), r && d.push(`active:bg-${a.base}-100`), u && d.push(`focus:ring-${a.base}-${a.focus}/20`);
95
95
  break;
96
96
  case "white":
97
- n.push("bg-white text-gray-900"), u && n.push("hover:bg-gray-50"), t && n.push("active:bg-gray-100"), r && n.push("focus:ring-gray-200");
97
+ d.push("bg-white text-gray-900"), n && d.push("hover:bg-gray-50"), r && d.push("active:bg-gray-100"), u && d.push("focus:ring-gray-200");
98
98
  break;
99
99
  case "dot":
100
- n.push(`bg-${a.base}-${a.main}`);
100
+ d.push(`bg-${a.base}-${a.main}`);
101
101
  break;
102
102
  }
103
- return n.join(" ");
104
- }, re = (l, s) => {
103
+ return d.join(" ");
104
+ }, re = (e, s) => {
105
105
  if (s === "filled")
106
106
  return "text-white";
107
- const e = T[l];
108
- return `text-${e.base}-${e.main}`;
109
- }, ie = (l, s) => {
107
+ const t = F[e];
108
+ return `text-${t.base}-${t.main}`;
109
+ }, de = (e, s) => {
110
110
  if (s === "filled")
111
111
  return "text-white";
112
- const e = T[l];
113
- return `text-${e.base}-${e.main}`;
114
- }, ne = (l) => {
112
+ const t = F[e];
113
+ return `text-${t.base}-${t.main}`;
114
+ }, ce = (e) => {
115
115
  const s = ["shadow-sm", "transition-all duration-200"];
116
- switch (l) {
116
+ switch (e) {
117
117
  case "filled":
118
118
  s.push("border-transparent");
119
119
  break;
@@ -133,15 +133,7 @@ const T = {
133
133
  s.push("border");
134
134
  }
135
135
  return s.join(" ");
136
- }, de = (l) => {
137
- const s = T[l];
138
- return [
139
- "focus:outline-none",
140
- "focus:ring-2",
141
- "focus:ring-offset-0",
142
- `focus:ring-${s.base}-${s.focus}/20`
143
- ].join(" ");
144
- }, W = {
136
+ }, O = {
145
137
  button: {
146
138
  xs: { padding: { x: "px-2", y: "py-1" }, text: "text-xs", icon: "w-3 h-3" },
147
139
  sm: { padding: { x: "px-3", y: "py-1.5" }, text: "text-sm", icon: "w-4 h-4" },
@@ -212,11 +204,11 @@ const T = {
212
204
  lg: { padding: { x: "px-5", y: "py-4" }, text: "text-lg", icon: "w-6 h-6" },
213
205
  xl: { padding: { x: "px-6", y: "py-5" }, text: "text-xl", icon: "w-7 h-7" }
214
206
  }
215
- }, L = (l, s) => {
216
- const e = W[s][l];
217
- return [e.padding.x, e.padding.y, e.text].filter(Boolean).join(" ");
218
- }, Y = (l, s) => W[s][l].icon || "", _ = (l, s) => W[s][l].height || "", N = (l) => {
219
- switch (l) {
207
+ }, S = (e, s) => {
208
+ const t = O[s][e];
209
+ return [t.padding.x, t.padding.y, t.text].filter(Boolean).join(" ");
210
+ }, U = (e, s) => O[s][e].icon || "", X = (e, s) => O[s][e].height || "", Y = (e) => {
211
+ switch (e) {
220
212
  case "xs":
221
213
  return "text-xs";
222
214
  case "sm":
@@ -230,8 +222,8 @@ const T = {
230
222
  default:
231
223
  return "text-base";
232
224
  }
233
- }, ue = (l) => {
234
- switch (l) {
225
+ }, ue = (e) => {
226
+ switch (e) {
235
227
  case "xs":
236
228
  return "space-x-1";
237
229
  case "sm":
@@ -245,19 +237,38 @@ const T = {
245
237
  default:
246
238
  return "space-x-3";
247
239
  }
248
- }, R = (l) => {
240
+ }, R = (e) => {
249
241
  const s = [];
250
- return l.disabled && s.push("opacity-50 cursor-not-allowed pointer-events-none"), l.loading && s.push("cursor-wait"), l.active && s.push("ring-2 ring-offset-2"), l.error && s.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"), l.success && s.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"), s.join(" ");
251
- }, ce = (l) => {
242
+ return e.disabled && s.push("opacity-50 cursor-not-allowed pointer-events-none"), e.loading && s.push("cursor-wait"), e.active && s.push("ring-2 ring-offset-2"), e.error && s.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"), e.success && s.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"), s.join(" ");
243
+ }, he = (e) => {
252
244
  const s = [];
253
- return l.valid && s.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"), l.invalid && s.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"), l.pending && s.push("border-yellow-300 focus:ring-yellow-500/20 focus:border-yellow-500"), s.join(" ");
254
- }, pe = (l, s = "primary") => {
255
- const e = [];
256
- return l.hover && e.push(`hover:bg-${s}-50`), l.active && e.push(`active:bg-${s}-100`), l.focus && e.push(`focus:outline-none focus:ring-2 focus:ring-${s}-500/20 focus:border-${s}-500`), e.join(" ");
257
- }, fe = ["disabled", "type"], he = {
245
+ return e.valid && s.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"), e.invalid && s.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"), e.pending && s.push("border-yellow-300 focus:ring-yellow-500/20 focus:border-yellow-500"), s.join(" ");
246
+ }, fe = (e, s = "primary") => {
247
+ const t = [];
248
+ return e.hover && t.push(`hover:bg-${s}-50`), e.active && t.push(`active:bg-${s}-100`), e.focus && t.push(`focus:outline-none focus:ring-2 focus:ring-${s}-500/20 focus:border-${s}-500`), t.join(" ");
249
+ }, xe = ["disabled", "type"], ge = {
258
250
  key: 1,
259
251
  class: "mr-2"
260
- }, Qe = /* @__PURE__ */ z({
252
+ }, be = /* @__PURE__ */ f("svg", {
253
+ class: "animate-spin h-4 w-4",
254
+ xmlns: "http://www.w3.org/2000/svg",
255
+ fill: "none",
256
+ viewBox: "0 0 24 24"
257
+ }, [
258
+ /* @__PURE__ */ f("circle", {
259
+ class: "opacity-25",
260
+ cx: "12",
261
+ cy: "12",
262
+ r: "10",
263
+ stroke: "currentColor",
264
+ "stroke-width": "4"
265
+ }),
266
+ /* @__PURE__ */ f("path", {
267
+ class: "opacity-75",
268
+ fill: "currentColor",
269
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
270
+ })
271
+ ], -1), gt = /* @__PURE__ */ C({
261
272
  __name: "Button",
262
273
  props: {
263
274
  variant: { default: "filled" },
@@ -267,19 +278,17 @@ const T = {
267
278
  disabled: { type: Boolean, default: !1 },
268
279
  loading: { type: Boolean, default: !1 },
269
280
  fullWidth: { type: Boolean, default: !1 },
270
- class: {},
271
281
  type: { default: "button" },
272
- leftSection: {},
273
- rightSection: {},
274
- leftSectionProps: {},
275
- rightSectionProps: {},
276
- onClick: {}
282
+ leftSection: null,
283
+ rightSection: null,
284
+ leftSectionProps: null,
285
+ rightSectionProps: null,
286
+ gradient: null
277
287
  },
278
- emits: ["click"],
279
- setup(l, { emit: s }) {
280
- const e = l, u = s, t = (a) => {
281
- !e.disabled && !e.loading && u("click", a);
282
- }, r = (a) => ({
288
+ setup(e, { emit: s }) {
289
+ const t = e, n = (x) => {
290
+ !t.disabled && !t.loading && s("click", x);
291
+ }, r = (x) => ({
283
292
  none: "rounded-none",
284
293
  xs: "rounded",
285
294
  sm: "rounded-md",
@@ -287,83 +296,64 @@ const T = {
287
296
  lg: "rounded-xl",
288
297
  xl: "rounded-2xl",
289
298
  full: "rounded-full"
290
- })[a] || "rounded-lg", b = d(() => {
291
- const a = "inline-flex items-center justify-center font-medium transition-all duration-200", n = P(e.color, e.variant, {
299
+ })[x] || "rounded-lg", u = c(() => {
300
+ const x = "inline-flex items-center justify-center font-medium transition-all duration-200", a = P(t.color, t.variant, {
292
301
  hover: !0,
293
302
  active: !0,
294
303
  focus: !0
295
- }), w = L(e.size, "button"), x = e.leftSection || e.rightSection ? Y(e.size, "button") : "", m = R({
296
- disabled: e.disabled,
297
- loading: e.loading
298
- }), C = r(e.radius);
304
+ }), d = S(t.size, "button"), y = t.leftSection || t.rightSection ? U(t.size, "button") : "", m = R({
305
+ disabled: t.disabled,
306
+ loading: t.loading
307
+ }), w = r(t.radius);
299
308
  return [
300
- a,
301
- n,
302
- w,
303
309
  x,
310
+ a,
311
+ d,
312
+ y,
304
313
  m,
305
- C,
314
+ w,
306
315
  {
307
- "w-full": e.fullWidth,
308
- "cursor-pointer": !e.disabled && !e.loading
316
+ "w-full": t.fullWidth,
317
+ "cursor-pointer": !t.disabled && !t.loading
309
318
  }
310
319
  ];
311
320
  });
312
- return (a, n) => (o(), i("button", {
313
- class: p(b.value),
314
- disabled: a.disabled || a.loading,
315
- type: a.type,
316
- onClick: t
321
+ return (x, a) => (l(), o("button", {
322
+ class: h(i(u)),
323
+ disabled: e.disabled || e.loading,
324
+ type: e.type,
325
+ onClick: n
317
326
  }, [
318
- a.leftSection ? (o(), i("span", B({ key: 0 }, a.leftSectionProps, { class: "mr-2" }), [
319
- (o(), M(I(a.leftSection)))
327
+ e.leftSection ? (l(), o("span", z({ key: 0 }, e.leftSectionProps, { class: "mr-2" }), [
328
+ (l(), j(M(e.leftSection)))
320
329
  ], 16)) : g("", !0),
321
- a.loading ? (o(), i("span", he, [
322
- S(a.$slots, "loader", {}, () => [
323
- n[0] || (n[0] = c("svg", {
324
- class: "animate-spin h-4 w-4",
325
- xmlns: "http://www.w3.org/2000/svg",
326
- fill: "none",
327
- viewBox: "0 0 24 24"
328
- }, [
329
- c("circle", {
330
- class: "opacity-25",
331
- cx: "12",
332
- cy: "12",
333
- r: "10",
334
- stroke: "currentColor",
335
- "stroke-width": "4"
336
- }),
337
- c("path", {
338
- class: "opacity-75",
339
- fill: "currentColor",
340
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
341
- })
342
- ], -1))
330
+ e.loading ? (l(), o("span", ge, [
331
+ B(x.$slots, "loader", {}, () => [
332
+ be
343
333
  ])
344
334
  ])) : g("", !0),
345
- S(a.$slots, "default"),
346
- a.rightSection ? (o(), i("span", B({ key: 2 }, a.rightSectionProps, { class: "ml-2" }), [
347
- (o(), M(I(a.rightSection)))
335
+ B(x.$slots, "default"),
336
+ e.rightSection ? (l(), o("span", z({ key: 2 }, e.rightSectionProps, { class: "ml-2" }), [
337
+ (l(), j(M(e.rightSection)))
348
338
  ], 16)) : g("", !0)
349
- ], 10, fe));
339
+ ], 10, xe));
350
340
  }
351
- }), ge = (l) => {
341
+ }), Q = (e) => {
352
342
  const s = ["relative"];
353
- l.fullWidth && s.push("w-full");
354
- const e = R({
355
- disabled: l.disabled,
356
- error: l.error,
357
- required: l.required || l.withAsterisk
343
+ e.fullWidth && s.push("w-full");
344
+ const t = R({
345
+ disabled: e.disabled,
346
+ error: e.error,
347
+ required: e.required || e.withAsterisk
358
348
  });
359
- return e && s.push(e), s.join(" ");
360
- }, be = (l) => {
349
+ return t && s.push(t), s.join(" ");
350
+ }, G = (e) => {
361
351
  const s = [
362
352
  "block",
363
353
  "font-medium",
364
354
  "mb-1"
365
355
  ];
366
- switch (l.size) {
356
+ switch (e.size) {
367
357
  case "xs":
368
358
  s.push("text-xs");
369
359
  break;
@@ -379,307 +369,290 @@ const T = {
379
369
  default:
380
370
  s.push("text-sm");
381
371
  }
382
- return l.error ? s.push("text-red-500") : l.disabled ? s.push("text-gray-400") : s.push("text-gray-700"), (l.required || l.withAsterisk) && s.push('after:content-["*"] after:ml-0.5 after:text-red-500'), s.join(" ");
383
- }, xe = ["aria-checked", "aria-disabled", "onKeydown"], ye = {
372
+ return e.error ? s.push("text-red-500") : e.disabled ? s.push("text-gray-400") : s.push("text-gray-700"), (e.required || e.withAsterisk) && s.push('after:content-["*"] after:ml-0.5 after:text-red-500'), s.join(" ");
373
+ }, J = (e) => {
374
+ const s = [
375
+ "mt-1",
376
+ "text-sm"
377
+ ];
378
+ return e.error ? s.push("text-red-500") : e.disabled ? s.push("text-gray-400") : s.push("text-gray-500"), s.join(" ");
379
+ }, pe = ["aria-checked", "aria-disabled", "onKeydown"], ye = /* @__PURE__ */ f("polyline", { points: "20 6 9 17 4 12" }, null, -1), me = [
380
+ ye
381
+ ], ve = /* @__PURE__ */ f("line", {
382
+ x1: "5",
383
+ y1: "12",
384
+ x2: "19",
385
+ y2: "12"
386
+ }, null, -1), we = [
387
+ ve
388
+ ], ke = {
384
389
  key: 2,
385
390
  class: "text-sm text-red-500 mt-0.5"
386
- }, me = {
391
+ }, Ce = {
387
392
  name: "Checkbox"
388
- }, Ge = /* @__PURE__ */ z({
389
- ...me,
393
+ }, bt = /* @__PURE__ */ C({
394
+ ...Ce,
390
395
  props: {
391
396
  modelValue: { type: [Boolean, Array], default: !1 },
392
- value: {},
393
- id: {},
394
- label: { default: "" },
395
- color: { default: "primary" },
397
+ value: null,
398
+ id: null,
399
+ label: null,
400
+ color: null,
396
401
  size: { default: "md" },
397
402
  radius: { default: "sm" },
398
403
  labelPosition: { default: "right" },
399
- description: { default: "" },
400
- error: { default: "" },
404
+ description: null,
405
+ error: null,
401
406
  disabled: { type: Boolean, default: !1 },
402
407
  indeterminate: { type: Boolean, default: !1 },
403
408
  iconColor: { default: "" },
404
- autoContrast: { type: Boolean }
409
+ autoContrast: { type: Boolean, default: !1 }
405
410
  },
406
411
  emits: ["update:modelValue", "change"],
407
- setup(l, { emit: s }) {
408
- const e = l, u = s, t = d(() => e.modelValue), r = () => {
409
- if (e.disabled)
412
+ setup(e, { emit: s }) {
413
+ const t = e, n = c(() => t.modelValue), r = () => {
414
+ if (t.disabled)
410
415
  return;
411
- const y = !t.value;
412
- u("update:modelValue", y), u("change", y);
413
- }, b = () => {
416
+ const v = !n.value;
417
+ s("update:modelValue", v), s("change", v);
418
+ }, u = () => {
414
419
  r();
415
- }, a = d(() => ge({
416
- size: e.size,
417
- error: !!e.error,
418
- disabled: e.disabled,
419
- required: !1,
420
- withAsterisk: !1,
421
- fullWidth: !1
422
- })), n = {
423
- xs: "w-3.5 h-3.5",
424
- sm: "w-4 h-4",
425
- md: "w-5 h-5",
426
- lg: "w-6 h-6",
427
- xl: "w-7 h-7"
428
- }, w = {
429
- none: "rounded-none",
430
- xs: "rounded-[2px]",
431
- sm: "rounded-[3px]",
432
- md: "rounded-[4px]",
433
- lg: "rounded-[6px]",
434
- xl: "rounded-[8px]",
435
- full: "rounded-full"
436
- }, x = d(() => [
437
- "flex-shrink-0 flex items-center justify-center",
438
- "transition-colors duration-200",
420
+ }, x = c(() => G({
421
+ size: t.size,
422
+ disabled: t.disabled,
423
+ error: t.error
424
+ })), a = c(() => J({
425
+ color: t.color
426
+ })), d = c(() => [
427
+ "flex",
428
+ "flex-col",
429
+ t.labelPosition === "left" ? "order-first" : ""
430
+ ]), y = c(() => [
431
+ "inline-flex",
432
+ "items-center",
433
+ "justify-center",
434
+ "rounded-md",
439
435
  "border",
440
- n[e.size] || n.md,
441
- w[e.radius] || w.sm,
442
- {
443
- "border-gray-300 hover:border-gray-400 bg-white": !t.value && !e.error && !e.disabled && !e.indeterminate,
444
- "border-red-500 hover:border-red-600": e.error,
445
- "border-gray-200 bg-gray-100": e.disabled,
446
- [`${P(e.color, "filled")} border-transparent`]: (t.value || e.indeterminate) && !e.disabled,
447
- "cursor-pointer": !e.disabled,
448
- "cursor-not-allowed": e.disabled
449
- }
450
- ]), m = d(() => [
451
- "transform",
452
- {
453
- "w-3 h-3": e.size === "xs",
454
- "w-3.5 h-3.5": e.size === "sm",
455
- "w-4 h-4": e.size === "md",
456
- "w-4.5 h-4.5": e.size === "lg",
457
- "w-5 h-5": e.size === "xl"
458
- },
459
- e.iconColor || (e.color === "light" ? "text-gray-900" : "text-white")
460
- ]), C = d(() => be({
461
- size: e.size,
462
- disabled: e.disabled,
463
- error: !!e.error
464
- })), V = d(() => [
465
- "flex flex-col flex-grow",
466
- {
467
- "cursor-pointer": !e.disabled,
468
- "cursor-not-allowed": e.disabled
469
- }
470
- ]), j = d(() => [
471
- "text-sm text-gray-500 mt-0.5",
472
- { "text-gray-400": e.disabled }
473
- ]);
474
- return (y, f) => (o(), i("div", {
475
- class: p([a.value, "flex items-center gap-2"])
436
+ "border-gray-300",
437
+ "cursor-pointer",
438
+ "transition-colors",
439
+ "duration-200",
440
+ "ease-in-out",
441
+ t.size === "xs" ? "h-3 w-3" : "",
442
+ t.size === "sm" ? "h-4 w-4" : "",
443
+ t.size === "md" ? "h-5 w-5" : "",
444
+ t.size === "lg" ? "h-6 w-6" : "",
445
+ t.size === "xl" ? "h-7 w-7" : "",
446
+ t.disabled ? "opacity-50 cursor-not-allowed" : "",
447
+ n.value ? "bg-primary-600 border-primary-600" : "bg-white hover:border-primary-500"
448
+ ]), m = c(() => [
449
+ "text-white",
450
+ t.size === "xs" ? "h-2 w-2" : "",
451
+ t.size === "sm" ? "h-3 w-3" : "",
452
+ t.size === "md" ? "h-4 w-4" : "",
453
+ t.size === "lg" ? "h-5 w-5" : "",
454
+ t.size === "xl" ? "h-6 w-6" : ""
455
+ ]), w = c(() => Q({
456
+ disabled: t.disabled,
457
+ error: t.error
458
+ }));
459
+ return (v, I) => (l(), o("div", {
460
+ class: h([i(w), "flex items-center gap-2"])
476
461
  }, [
477
- c("div", {
478
- class: p(x.value),
479
- onClick: b,
462
+ f("div", {
463
+ class: h(i(y)),
464
+ onClick: u,
480
465
  role: "checkbox",
481
- "aria-checked": t.value,
482
- "aria-disabled": y.disabled,
466
+ "aria-checked": i(n),
467
+ "aria-disabled": e.disabled,
483
468
  tabindex: "0",
484
- onKeydown: Z(X(b, ["prevent"]), ["space"])
469
+ onKeydown: te(K(u, ["prevent"]), ["space"])
485
470
  }, [
486
- t.value && !y.indeterminate ? (o(), i("svg", {
471
+ i(n) && !e.indeterminate ? (l(), o("svg", {
487
472
  key: 0,
488
473
  xmlns: "http://www.w3.org/2000/svg",
489
- class: p(m.value),
474
+ class: h(i(m)),
490
475
  viewBox: "0 0 24 24",
491
476
  fill: "none",
492
477
  stroke: "currentColor",
493
478
  "stroke-width": "3",
494
479
  "stroke-linecap": "round",
495
480
  "stroke-linejoin": "round"
496
- }, f[0] || (f[0] = [
497
- c("polyline", { points: "20 6 9 17 4 12" }, null, -1)
498
- ]), 2)) : g("", !0),
499
- y.indeterminate ? (o(), i("svg", {
481
+ }, me, 2)) : g("", !0),
482
+ e.indeterminate ? (l(), o("svg", {
500
483
  key: 1,
501
484
  xmlns: "http://www.w3.org/2000/svg",
502
- class: p(m.value),
485
+ class: h(i(m)),
503
486
  viewBox: "0 0 24 24",
504
487
  fill: "none",
505
488
  stroke: "currentColor",
506
489
  "stroke-width": "3",
507
490
  "stroke-linecap": "round",
508
491
  "stroke-linejoin": "round"
509
- }, f[1] || (f[1] = [
510
- c("line", {
511
- x1: "5",
512
- y1: "12",
513
- x2: "19",
514
- y2: "12"
515
- }, null, -1)
516
- ]), 2)) : g("", !0)
517
- ], 42, xe),
518
- y.label || y.description ? (o(), i("div", {
492
+ }, we, 2)) : g("", !0)
493
+ ], 42, pe),
494
+ e.label || e.description ? (l(), o("div", {
519
495
  key: 0,
520
- class: p(V.value)
496
+ class: h(i(d))
521
497
  }, [
522
- y.label ? (o(), i("label", {
498
+ e.label ? (l(), o("label", {
523
499
  key: 0,
524
- class: p([C.value, "pt-0.5"]),
525
- onClick: b
526
- }, v(y.label), 3)) : g("", !0),
527
- y.description ? (o(), i("div", {
500
+ class: h([i(x), "pt-0.5"]),
501
+ onClick: u
502
+ }, p(e.label), 3)) : g("", !0),
503
+ e.description ? (l(), o("div", {
528
504
  key: 1,
529
- class: p(j.value)
530
- }, v(y.description), 3)) : g("", !0),
531
- y.error ? (o(), i("div", ye, v(y.error), 1)) : g("", !0)
505
+ class: h(i(a))
506
+ }, p(e.description), 3)) : g("", !0),
507
+ e.error ? (l(), o("div", ke, p(e.error), 1)) : g("", !0)
532
508
  ], 2)) : g("", !0)
533
509
  ], 2));
534
510
  }
535
- }), ve = ["aria-checked", "aria-disabled"], we = ["id", "checked", "disabled", "value"], ke = ["for"], Je = /* @__PURE__ */ z({
511
+ }), $e = ["aria-checked", "aria-disabled"], ze = ["id", "checked", "disabled", "value"], Be = ["for"], pt = /* @__PURE__ */ C({
536
512
  __name: "Radio",
537
513
  props: {
538
514
  modelValue: { default: void 0 },
539
515
  value: { default: void 0 },
540
- label: { default: "" },
516
+ id: { default: () => `radio-${Math.random().toString(36).substr(2, 9)}` },
517
+ label: null,
541
518
  color: { default: "primary" },
542
519
  size: { default: "md" },
543
520
  labelPosition: { default: "right" },
544
- description: { default: "" },
545
- error: { default: "" },
521
+ description: null,
522
+ error: null,
546
523
  disabled: { type: Boolean, default: !1 },
547
- iconColor: { default: "" },
548
- id: { default: () => `radio-${Math.random().toString(36).substr(2, 9)}` }
524
+ iconColor: null
549
525
  },
550
- emits: ["update:modelValue", "change"],
551
- setup(l, { emit: s }) {
552
- const e = l, u = s, t = d(() => e.modelValue === e.value), r = () => {
553
- e.disabled || (u("update:modelValue", e.value), u("change", e.value));
554
- }, b = d(() => ({
526
+ setup(e, { emit: s }) {
527
+ const t = e, n = c(() => t.modelValue === t.value), r = () => {
528
+ t.disabled || (s("update:modelValue", t.value), s("change", t.value));
529
+ }, u = c(() => [
530
+ Q({
531
+ disabled: t.disabled,
532
+ error: t.error
533
+ }),
534
+ "flex items-center gap-2",
535
+ t.labelPosition === "left" ? "flex-row-reverse" : "flex-row"
536
+ ]), x = c(() => [
537
+ "relative flex items-center justify-center rounded-full border transition-colors duration-200",
538
+ v.value,
539
+ n.value ? `bg-${t.color}-600 border-${t.color}-600` : "bg-white border-gray-300 hover:border-gray-400",
540
+ t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
541
+ ]), a = c(() => [
542
+ "rounded-full bg-white",
543
+ I.value,
544
+ t.disabled ? "opacity-50" : ""
545
+ ]), d = c(() => G({
546
+ size: t.size,
547
+ disabled: t.disabled,
548
+ error: t.error
549
+ })), y = c(() => J({
550
+ color: t.color
551
+ })), m = c(() => [
552
+ "text-sm text-red-500 mt-1"
553
+ ]), w = c(() => [
554
+ "flex flex-col",
555
+ t.disabled ? "cursor-not-allowed" : "cursor-pointer"
556
+ ]), v = c(() => ({
555
557
  xs: "w-4 h-4",
556
558
  sm: "w-5 h-5",
557
559
  md: "w-6 h-6",
558
560
  lg: "w-8 h-8",
559
561
  xl: "w-10 h-10"
560
- })[e.size]), a = d(() => ({
562
+ })[t.size]), I = c(() => ({
561
563
  xs: "w-2 h-2",
562
564
  sm: "w-2.5 h-2.5",
563
565
  md: "w-3 h-3",
564
566
  lg: "w-4 h-4",
565
567
  xl: "w-5 h-5"
566
- })[e.size]), n = d(() => ({
567
- disabled: e.disabled,
568
- error: !!e.error
569
- })), w = d(() => [
570
- "inline-flex items-start gap-2",
571
- e.labelPosition === "left" ? "flex-row-reverse justify-between" : "flex-row",
572
- e.disabled ? "cursor-not-allowed" : "cursor-pointer",
573
- R(n.value)
574
- ]), x = d(() => [
575
- "relative flex items-center justify-center rounded-full border-2 transition-colors duration-200 flex-shrink-0 mt-0.5",
576
- b.value,
577
- t.value ? `${P(e.color, "filled")} border-blue-500` : "border-gray-300 hover:border-gray-400 bg-white"
578
- ]), m = d(() => [
579
- "rounded-full",
580
- a.value,
581
- t.value ? "bg-white scale-100" : "bg-transparent scale-0"
582
- ]), C = d(() => [
583
- "flex flex-col flex-grow",
584
- e.labelPosition === "left" ? "items-end" : "items-start"
585
- ]), V = d(() => [
586
- N(e.size),
587
- "font-medium",
588
- e.disabled ? "text-gray-400" : "text-gray-900 cursor-pointer"
589
- ]), j = d(() => [
590
- "text-sm text-gray-500 mt-1"
591
- ]), y = d(() => [
592
- "text-sm text-red-500 mt-1"
593
- ]);
594
- return (f, q) => (o(), i("div", {
595
- class: p(w.value),
568
+ })[t.size]);
569
+ return (V, q) => (l(), o("div", {
570
+ class: h(i(u)),
596
571
  onClick: r,
597
- "aria-checked": t.value,
598
- "aria-disabled": f.disabled,
572
+ "aria-checked": i(n),
573
+ "aria-disabled": e.disabled,
599
574
  role: "radio"
600
575
  }, [
601
- c("input", {
576
+ f("input", {
602
577
  ref: "radio",
603
578
  type: "radio",
604
- id: f.id,
605
- checked: t.value,
606
- disabled: f.disabled,
607
- value: f.value,
579
+ id: e.id,
580
+ checked: i(n),
581
+ disabled: e.disabled,
582
+ value: e.value,
608
583
  onChange: r,
609
584
  class: "sr-only"
610
- }, null, 40, we),
611
- c("div", {
612
- class: p(x.value)
585
+ }, null, 40, ze),
586
+ f("div", {
587
+ class: h(i(x))
613
588
  }, [
614
- t.value ? (o(), i("div", {
589
+ i(n) ? (l(), o("div", {
615
590
  key: 0,
616
- class: p([m.value, "transition-transform duration-200 ease-in-out"])
591
+ class: h([i(a), "transition-transform duration-200 ease-in-out"])
617
592
  }, null, 2)) : g("", !0)
618
593
  ], 2),
619
- c("div", {
620
- class: p(C.value)
594
+ f("div", {
595
+ class: h(i(w))
621
596
  }, [
622
- f.label ? (o(), i("label", {
597
+ e.label ? (l(), o("label", {
623
598
  key: 0,
624
- for: f.id,
625
- class: p(V.value)
599
+ for: e.id,
600
+ class: h(i(d))
626
601
  }, [
627
- S(f.$slots, "label", {}, () => [
628
- A(v(f.label), 1)
602
+ B(V.$slots, "label", {}, () => [
603
+ L(p(e.label), 1)
629
604
  ])
630
- ], 10, ke)) : g("", !0),
631
- f.description ? (o(), i("div", {
605
+ ], 10, Be)) : g("", !0),
606
+ e.description ? (l(), o("div", {
632
607
  key: 1,
633
- class: p(j.value)
608
+ class: h(i(y))
634
609
  }, [
635
- S(f.$slots, "description", {}, () => [
636
- A(v(f.description), 1)
610
+ B(V.$slots, "description", {}, () => [
611
+ L(p(e.description), 1)
637
612
  ])
638
613
  ], 2)) : g("", !0),
639
- f.error ? (o(), i("div", {
614
+ e.error ? (l(), o("div", {
640
615
  key: 2,
641
- class: p(y.value)
616
+ class: h(i(m))
642
617
  }, [
643
- S(f.$slots, "error", {}, () => [
644
- A(v(f.error), 1)
618
+ B(V.$slots, "error", {}, () => [
619
+ L(p(e.error), 1)
645
620
  ])
646
621
  ], 2)) : g("", !0)
647
622
  ], 2)
648
- ], 10, ve));
623
+ ], 10, $e));
649
624
  }
650
- }), Ce = ["for"], $e = {
625
+ }), Se = ["for"], Ve = {
651
626
  key: 0,
652
627
  class: "text-red-500",
653
628
  "aria-hidden": "true"
654
- }, ze = { class: "relative" }, Be = ["id", "type", "value", "placeholder", "disabled", "required"], Ze = /* @__PURE__ */ z({
629
+ }, Pe = { class: "relative" }, je = ["id", "type", "value", "placeholder", "disabled", "required"], yt = /* @__PURE__ */ C({
655
630
  __name: "TextInput",
656
631
  props: {
657
- id: {},
632
+ id: null,
658
633
  type: { default: "text" },
659
- modelValue: {},
660
- placeholder: {},
634
+ modelValue: null,
635
+ placeholder: null,
661
636
  disabled: { type: Boolean, default: !1 },
662
- label: {},
663
- labelProps: {},
664
- description: {},
665
- descriptionProps: {},
666
- error: {},
667
- errorProps: {},
668
- wrapperProps: {},
669
- inputProps: {},
637
+ label: null,
638
+ labelProps: null,
639
+ description: null,
640
+ descriptionProps: null,
641
+ error: null,
642
+ errorProps: null,
643
+ wrapperProps: null,
644
+ inputProps: null,
670
645
  size: { default: "md" },
671
646
  radius: { default: "md" },
672
- required: { type: Boolean, default: !1 },
647
+ rightSection: null,
648
+ rightSectionProps: null,
649
+ leftSection: null,
650
+ leftSectionProps: null,
673
651
  withAsterisk: { type: Boolean, default: !1 },
674
- withError: { type: Boolean, default: !1 },
675
- rightSection: {},
676
- rightSectionProps: {},
677
- leftSection: {},
678
- leftSectionProps: {}
652
+ required: { type: Boolean, default: !1 }
679
653
  },
680
- emits: ["update:modelValue"],
681
- setup(l) {
682
- const s = l, e = (t) => ({
654
+ setup(e) {
655
+ const s = e, t = (r) => ({
683
656
  none: "rounded-none",
684
657
  xs: "rounded",
685
658
  sm: "rounded-md",
@@ -687,93 +660,140 @@ const T = {
687
660
  lg: "rounded-xl",
688
661
  xl: "rounded-2xl",
689
662
  full: "rounded-full"
690
- })[t] || "rounded-lg", u = d(() => {
691
- const t = [
663
+ })[r] || "rounded-lg", n = c(() => {
664
+ const r = [
692
665
  "block w-full bg-white transition-all duration-200",
693
666
  "border border-gray-200",
694
667
  "text-gray-900",
695
668
  "focus:outline-none focus:ring-2 focus:ring-offset-0 focus:border-transparent",
696
669
  "placeholder:text-gray-400",
697
670
  "shadow-sm"
698
- ], r = L(s.size, "input"), b = _(s.size, "input"), a = R({
671
+ ], u = S(s.size, "input"), x = S(s.size, "input"), a = R({
699
672
  disabled: s.disabled,
700
673
  error: s.withError || !!s.error
701
- }), n = e(s.radius), w = {
674
+ }), d = t(s.radius), y = {
702
675
  left: s.leftSection ? "pl-10" : "",
703
676
  right: s.rightSection ? "pr-10" : ""
704
- }, x = s.disabled ? "" : [
677
+ }, m = s.disabled ? "" : [
705
678
  s.withError || s.error ? "focus:ring-red-500/20 focus:border-red-500" : "focus:ring-blue-500/20 focus:border-blue-500",
706
679
  "hover:border-gray-300"
707
680
  ];
708
681
  return [
709
- ...t,
710
- r,
711
- b,
682
+ ...r,
683
+ u,
684
+ x,
712
685
  a,
713
- n,
714
- w.left,
715
- w.right,
716
- x
686
+ d,
687
+ y.left,
688
+ y.right,
689
+ m
717
690
  ].filter(Boolean).join(" ");
718
691
  });
719
- return (t, r) => (o(), i("div", B({
692
+ return (r, u) => (l(), o("div", z({
720
693
  class: [
721
694
  "relative flex flex-col",
722
- { "opacity-50 pointer-events-none": t.disabled }
695
+ { "opacity-50 pointer-events-none": e.disabled }
723
696
  ]
724
- }, t.wrapperProps), [
725
- t.label ? (o(), i("label", B({
697
+ }, e.wrapperProps), [
698
+ e.label ? (l(), o("label", z({
726
699
  key: 0,
727
- for: t.id,
700
+ for: e.id,
728
701
  class: "mb-1 text-sm font-medium text-gray-700 flex items-center gap-1"
729
- }, t.labelProps), [
730
- A(v(t.label) + " ", 1),
731
- t.required || t.withAsterisk ? (o(), i("span", $e, "*")) : g("", !0)
732
- ], 16, Ce)) : g("", !0),
733
- c("div", ze, [
734
- t.leftSection ? (o(), i("div", B({
702
+ }, e.labelProps), [
703
+ L(p(e.label) + " ", 1),
704
+ e.required || e.withAsterisk ? (l(), o("span", Ve, "*")) : g("", !0)
705
+ ], 16, Se)) : g("", !0),
706
+ f("div", Pe, [
707
+ e.leftSection ? (l(), o("div", z({
735
708
  key: 0,
736
709
  class: "absolute inset-y-0 left-0 flex items-center pl-3"
737
- }, t.leftSectionProps), [
738
- (o(), M(I(t.leftSection)))
710
+ }, e.leftSectionProps), [
711
+ (l(), j(M(e.leftSection)))
739
712
  ], 16)) : g("", !0),
740
- c("input", B({
741
- id: t.id,
742
- type: t.type,
743
- value: t.modelValue,
744
- placeholder: t.placeholder,
745
- disabled: t.disabled,
746
- required: t.required,
747
- class: u.value,
748
- onInput: r[0] || (r[0] = (b) => t.$emit("update:modelValue", b.target.value))
749
- }, t.inputProps), null, 16, Be),
750
- t.rightSection ? (o(), i("div", B({
713
+ f("input", z({
714
+ id: e.id,
715
+ type: e.type,
716
+ value: e.modelValue,
717
+ placeholder: e.placeholder,
718
+ disabled: e.disabled,
719
+ required: e.required,
720
+ class: i(n),
721
+ onInput: u[0] || (u[0] = (x) => r.$emit("update:modelValue", x.target.value))
722
+ }, e.inputProps), null, 16, je),
723
+ e.rightSection ? (l(), o("div", z({
751
724
  key: 1,
752
725
  class: "absolute inset-y-0 right-0 flex items-center pr-3"
753
- }, t.rightSectionProps), [
754
- (o(), M(I(t.rightSection)))
726
+ }, e.rightSectionProps), [
727
+ (l(), j(M(e.rightSection)))
755
728
  ], 16)) : g("", !0)
756
729
  ]),
757
- t.description ? (o(), i("p", B({
730
+ e.description ? (l(), o("p", z({
758
731
  key: 1,
759
732
  class: "mt-1 text-sm text-gray-500"
760
- }, t.descriptionProps), v(t.description), 17)) : g("", !0),
761
- t.error ? (o(), i("p", B({
733
+ }, e.descriptionProps), p(e.description), 17)) : g("", !0),
734
+ e.error ? (l(), o("p", z({
762
735
  key: 2,
763
736
  class: "mt-1 text-sm text-red-500"
764
- }, t.errorProps), v(t.error), 17)) : g("", !0)
737
+ }, e.errorProps), p(e.error), 17)) : g("", !0)
765
738
  ], 16));
766
739
  }
767
- }), Se = ["aria-expanded", "aria-disabled"], Ve = ["placeholder", "disabled"], Pe = {
740
+ }), Me = ["aria-expanded", "aria-disabled"], Ie = ["placeholder", "disabled"], Le = {
768
741
  key: 1,
769
742
  class: "w-full truncate text-gray-900"
770
- }, je = { class: "flex items-center gap-2 shrink-0" }, Me = {
743
+ }, Re = { class: "flex items-center gap-2 shrink-0" }, qe = ["onClick"], Ae = /* @__PURE__ */ f("svg", {
744
+ class: "w-4 h-4",
745
+ fill: "none",
746
+ stroke: "currentColor",
747
+ viewBox: "0 0 24 24"
748
+ }, [
749
+ /* @__PURE__ */ f("path", {
750
+ "stroke-linecap": "round",
751
+ "stroke-linejoin": "round",
752
+ "stroke-width": "2",
753
+ d: "M6 18L18 6M6 6l12 12"
754
+ })
755
+ ], -1), De = [
756
+ Ae
757
+ ], Te = /* @__PURE__ */ f("path", {
758
+ "stroke-linecap": "round",
759
+ "stroke-linejoin": "round",
760
+ "stroke-width": "2",
761
+ d: "M19 9l-7 7-7-7"
762
+ }, null, -1), Ee = [
763
+ Te
764
+ ], Fe = {
771
765
  key: 0,
772
766
  class: "py-3 text-center text-gray-500"
773
- }, Ie = ["onClick"], Le = {
767
+ }, Oe = /* @__PURE__ */ f("svg", {
768
+ class: "animate-spin h-5 w-5 mx-auto",
769
+ xmlns: "http://www.w3.org/2000/svg",
770
+ fill: "none",
771
+ viewBox: "0 0 24 24"
772
+ }, [
773
+ /* @__PURE__ */ f("circle", {
774
+ class: "opacity-25",
775
+ cx: "12",
776
+ cy: "12",
777
+ r: "10",
778
+ stroke: "currentColor",
779
+ "stroke-width": "4"
780
+ }),
781
+ /* @__PURE__ */ f("path", {
782
+ class: "opacity-75",
783
+ fill: "currentColor",
784
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
785
+ })
786
+ ], -1), He = ["onClick"], Ne = /* @__PURE__ */ f("path", {
787
+ "stroke-linecap": "round",
788
+ "stroke-linejoin": "round",
789
+ "stroke-width": "2",
790
+ d: "M5 13l4 4L19 7"
791
+ }, null, -1), We = [
792
+ Ne
793
+ ], Ke = {
774
794
  key: 0,
775
795
  class: "py-3 px-4 text-gray-500 text-center text-sm"
776
- }, es = /* @__PURE__ */ z({
796
+ }, mt = /* @__PURE__ */ C({
777
797
  __name: "Select",
778
798
  props: {
779
799
  modelValue: { default: null },
@@ -785,16 +805,15 @@ const T = {
785
805
  loading: { type: Boolean, default: !1 },
786
806
  error: { type: Boolean, default: !1 },
787
807
  size: { default: "md" },
788
- radius: { default: "md" },
808
+ radius: { default: "sm" },
789
809
  variant: { default: "outline" },
790
810
  color: { default: "primary" },
791
811
  withCheckIcon: { type: Boolean, default: !0 },
792
- checkIconPosition: { default: "left" },
793
- nothingFoundMessage: { default: "No options found" }
812
+ checkIconPosition: { default: "right" },
813
+ nothingFoundMessage: { default: "Nothing found..." }
794
814
  },
795
- emits: ["update:modelValue", "change"],
796
- setup(l, { emit: s }) {
797
- const e = l, u = s, t = E(!1), r = E(""), b = E(null), a = E(null), n = (h) => ({
815
+ setup(e, { emit: s }) {
816
+ const t = e, n = A(!1), r = A(""), u = A(null), x = A(null), a = (b) => ({
798
817
  none: "rounded-none",
799
818
  xs: "rounded",
800
819
  sm: "rounded-md",
@@ -802,191 +821,171 @@ const T = {
802
821
  lg: "rounded-xl",
803
822
  xl: "rounded-2xl",
804
823
  full: "rounded-full"
805
- })[h] || "rounded-lg", w = d(() => {
806
- const h = "w-full flex items-center justify-between transition-colors duration-200", k = L(e.size, "input"), $ = _(e.size, "input"), H = n(e.radius), K = e.error ? "focus-within:ring-2 focus-within:ring-red-500/20 focus-within:border-red-500" : "focus-within:ring-2 focus-within:ring-primary-500/20 focus-within:border-primary-500", Q = e.variant === "filled" ? `bg-gray-50 border border-transparent ${!e.disabled && `hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${K}`}` : `bg-white border border-gray-300 ${!e.disabled && `hover:border-gray-400 ${K}`}`, G = R({
807
- disabled: e.disabled,
808
- error: e.error
809
- }), J = !e.disabled && "cursor-pointer";
824
+ })[b] || "rounded-lg", d = c(() => {
825
+ const b = "w-full flex items-center justify-between transition-colors duration-200", $ = S(t.size, "input"), k = getHeightClasses(t.size, "input"), H = a(t.radius), N = t.error ? "focus-within:ring-2 focus-within:ring-red-500/20 focus-within:border-red-500" : "focus-within:ring-2 focus-within:ring-primary-500/20 focus-within:border-primary-500", Z = t.variant === "filled" ? `bg-gray-50 border border-transparent ${!t.disabled && `hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${N}`}` : `bg-white border border-gray-300 ${!t.disabled && `hover:border-gray-400 ${N}`}`, _ = R({
826
+ disabled: t.disabled,
827
+ error: t.error
828
+ }), ee = !t.disabled && "cursor-pointer";
810
829
  return [
811
- h,
812
- k,
830
+ b,
813
831
  $,
832
+ k,
814
833
  H,
815
- Q,
816
- G,
817
- J
834
+ Z,
835
+ _,
836
+ ee
818
837
  ].filter(Boolean).join(" ");
819
- }), x = d(() => e.options.find((h) => h.value === e.modelValue)), m = d(() => {
838
+ }), y = c(() => t.options.find((b) => b.value === t.modelValue)), m = c(() => {
820
839
  if (!r.value)
821
- return e.options;
822
- const h = r.value.toLowerCase();
823
- return e.options.filter(
824
- (k) => k.label.toLowerCase().includes(h)
840
+ return t.options;
841
+ const b = r.value.toLowerCase();
842
+ return t.options.filter(
843
+ ($) => $.label.toLowerCase().includes(b)
825
844
  );
826
- }), C = () => {
827
- var h;
828
- e.disabled || (e.searchable ? ((h = b.value) == null || h.focus(), t.value = !0) : t.value = !t.value);
829
- }, V = (h) => {
830
- u("update:modelValue", h.value), u("change", h), t.value = !1, e.searchable && (r.value = h.label);
831
- }, j = () => {
832
- u("update:modelValue", null), u("change", null), r.value = "";
833
- }, y = () => {
834
- t.value || (t.value = !0);
835
- }, f = () => {
836
- t.value || (t.value = !0);
837
- }, q = (h) => {
838
- const k = h.target;
839
- a.value && !a.value.contains(k) && (t.value = !1);
845
+ }), w = () => {
846
+ var b;
847
+ t.disabled || (t.searchable ? ((b = u.value) == null || b.focus(), n.value = !0) : n.value = !n.value);
848
+ }, v = (b) => {
849
+ s("update:modelValue", b.value), s("change", b), n.value = !1, t.searchable && (r.value = b.label);
850
+ }, I = () => {
851
+ s("update:modelValue", null), s("change", null), r.value = "";
852
+ }, V = () => {
853
+ n.value || (n.value = !0);
854
+ }, q = () => {
855
+ n.value || (n.value = !0);
856
+ }, T = (b) => {
857
+ const $ = b.target;
858
+ x.value && !x.value.contains($) && (n.value = !1);
840
859
  };
841
- return ee(() => e.modelValue, (h) => {
842
- h ? x.value && e.searchable && (r.value = x.value.label) : r.value = "";
843
- }), se(() => {
844
- document.addEventListener("click", q);
845
- }), te(() => {
846
- document.removeEventListener("click", q);
847
- }), (h, k) => (o(), i("div", {
860
+ return se(() => t.modelValue, (b) => {
861
+ b ? y.value && t.searchable && (r.value = y.value.label) : r.value = "";
862
+ }), le(() => {
863
+ document.addEventListener("click", T);
864
+ }), ae(() => {
865
+ document.removeEventListener("click", T);
866
+ }), (b, $) => (l(), o("div", {
848
867
  class: "relative select",
849
868
  ref_key: "selectRoot",
850
- ref: a
869
+ ref: x
851
870
  }, [
852
- c("div", {
853
- class: p(w.value),
871
+ f("div", {
872
+ class: h(i(d)),
854
873
  role: "combobox",
855
- "aria-expanded": t.value,
856
- "aria-disabled": h.disabled,
857
- onClick: C
874
+ "aria-expanded": n.value,
875
+ "aria-disabled": e.disabled,
876
+ onClick: w
858
877
  }, [
859
- h.searchable ? U((o(), i("input", {
878
+ e.searchable ? W((l(), o("input", {
860
879
  key: 0,
861
880
  ref_key: "searchInput",
862
- ref: b,
863
- "onUpdate:modelValue": k[0] || (k[0] = ($) => r.value = $),
864
- placeholder: h.placeholder,
881
+ ref: u,
882
+ "onUpdate:modelValue": $[0] || ($[0] = (k) => r.value = k),
883
+ placeholder: e.placeholder,
865
884
  type: "text",
866
885
  class: "w-full bg-transparent outline-none placeholder:text-gray-500",
867
- disabled: h.disabled,
868
- onFocus: y,
869
- onInput: f
870
- }, null, 40, Ve)), [
871
- [ae, r.value]
872
- ]) : (o(), i("div", Pe, v(x.value ? x.value.label : h.placeholder), 1)),
873
- c("div", je, [
874
- h.clearable && h.modelValue && !h.disabled ? (o(), i("button", {
886
+ disabled: e.disabled,
887
+ onFocus: V,
888
+ onInput: q
889
+ }, null, 40, Ie)), [
890
+ [oe, r.value]
891
+ ]) : (l(), o("div", Le, p(i(y) ? i(y).label : e.placeholder), 1)),
892
+ f("div", Re, [
893
+ e.clearable && e.modelValue && !e.disabled ? (l(), o("button", {
875
894
  key: 0,
876
895
  type: "button",
877
896
  class: "p-1 hover:bg-gray-100 rounded-full text-gray-500 hover:text-gray-700",
878
- onClick: X(j, ["stop"])
879
- }, k[1] || (k[1] = [
880
- c("svg", {
881
- class: "w-4 h-4",
882
- fill: "none",
883
- stroke: "currentColor",
884
- viewBox: "0 0 24 24"
885
- }, [
886
- c("path", {
887
- "stroke-linecap": "round",
888
- "stroke-linejoin": "round",
889
- "stroke-width": "2",
890
- d: "M6 18L18 6M6 6l12 12"
891
- })
892
- ], -1)
893
- ]))) : g("", !0),
894
- (o(), i("svg", {
895
- class: p(["w-4 h-4 text-gray-500 transition-transform duration-200", { "rotate-180": t.value }]),
897
+ onClick: K(I, ["stop"])
898
+ }, De, 8, qe)) : g("", !0),
899
+ (l(), o("svg", {
900
+ class: h(["w-4 h-4 text-gray-500 transition-transform duration-200", { "rotate-180": n.value }]),
896
901
  fill: "none",
897
902
  stroke: "currentColor",
898
903
  viewBox: "0 0 24 24"
899
- }, k[2] || (k[2] = [
900
- c("path", {
901
- "stroke-linecap": "round",
902
- "stroke-linejoin": "round",
903
- "stroke-width": "2",
904
- d: "M19 9l-7 7-7-7"
905
- }, null, -1)
906
- ]), 2))
904
+ }, Ee, 2))
907
905
  ])
908
- ], 10, Se),
909
- U(c("div", {
910
- class: p([
906
+ ], 10, Me),
907
+ W(f("div", {
908
+ class: h([
911
909
  "absolute w-full z-50 mt-1 bg-white",
912
910
  "border border-gray-200",
913
- n(e.radius),
911
+ a(t.radius),
914
912
  "shadow-lg max-h-[240px] overflow-auto",
915
913
  "divide-y divide-gray-100"
916
914
  ])
917
915
  }, [
918
- h.loading ? (o(), i("div", Me, [
919
- S(h.$slots, "loader", {}, () => [
920
- k[3] || (k[3] = c("svg", {
921
- class: "animate-spin h-5 w-5 mx-auto",
922
- xmlns: "http://www.w3.org/2000/svg",
923
- fill: "none",
924
- viewBox: "0 0 24 24"
925
- }, [
926
- c("circle", {
927
- class: "opacity-25",
928
- cx: "12",
929
- cy: "12",
930
- r: "10",
931
- stroke: "currentColor",
932
- "stroke-width": "4"
933
- }),
934
- c("path", {
935
- class: "opacity-75",
936
- fill: "currentColor",
937
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
938
- })
939
- ], -1))
916
+ e.loading ? (l(), o("div", Fe, [
917
+ B(b.$slots, "loader", {}, () => [
918
+ Oe
940
919
  ])
941
- ])) : (o(), i(F, { key: 1 }, [
942
- (o(!0), i(F, null, le(m.value, ($) => (o(), i("div", {
943
- key: $.value,
944
- class: p([
920
+ ])) : (l(), o(D, { key: 1 }, [
921
+ (l(!0), o(D, null, ne(i(m), (k) => (l(), o("div", {
922
+ key: k.value,
923
+ class: h([
945
924
  "py-2.5 px-4 flex items-center transition-colors duration-200",
946
925
  "text-[14px] leading-5",
947
926
  "text-gray-900",
948
- $.value === h.modelValue ? "bg-gray-50 font-medium" : "hover:bg-gray-50",
949
- $.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
927
+ k.value === e.modelValue ? "bg-gray-50 font-medium" : "hover:bg-gray-50",
928
+ k.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
950
929
  ]),
951
- onClick: (H) => !$.disabled && V($)
930
+ onClick: (H) => !k.disabled && v(k)
952
931
  }, [
953
- h.withCheckIcon && $.value === h.modelValue ? (o(), i("svg", {
932
+ e.withCheckIcon && k.value === e.modelValue ? (l(), o("svg", {
954
933
  key: 0,
955
- class: p([
934
+ class: h([
956
935
  "w-4 h-4 text-primary-600 shrink-0",
957
- h.checkIconPosition === "left" ? "mr-2" : "ml-2 order-last"
936
+ e.checkIconPosition === "left" ? "mr-2" : "ml-2 order-last"
958
937
  ]),
959
938
  fill: "none",
960
939
  stroke: "currentColor",
961
940
  viewBox: "0 0 24 24"
962
- }, k[4] || (k[4] = [
963
- c("path", {
964
- "stroke-linecap": "round",
965
- "stroke-linejoin": "round",
966
- "stroke-width": "2",
967
- d: "M5 13l4 4L19 7"
968
- }, null, -1)
969
- ]), 2)) : g("", !0),
970
- c("span", {
971
- class: p({ "text-gray-500": $.disabled })
972
- }, v($.label), 3)
973
- ], 10, Ie))), 128)),
974
- m.value.length === 0 ? (o(), i("div", Le, v(h.nothingFoundMessage || "No options found"), 1)) : g("", !0)
941
+ }, We, 2)) : g("", !0),
942
+ f("span", {
943
+ class: h({ "text-gray-500": k.disabled })
944
+ }, p(k.label), 3)
945
+ ], 10, He))), 128)),
946
+ i(m).length === 0 ? (l(), o("div", Ke, p(e.nothingFoundMessage || "No options found"), 1)) : g("", !0)
975
947
  ], 64))
976
948
  ], 2), [
977
- [oe, t.value]
949
+ [ie, n.value]
978
950
  ])
979
951
  ], 512));
980
952
  }
981
- }), Re = ["disabled"], qe = {
953
+ }), Ue = ["disabled"], Xe = {
982
954
  key: 0,
983
955
  class: "w-3.5 h-3.5",
984
956
  viewBox: "0 0 20 20",
985
957
  fill: "currentColor"
986
- }, Ae = {
958
+ }, Ye = /* @__PURE__ */ f("path", {
959
+ "fill-rule": "evenodd",
960
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
961
+ "clip-rule": "evenodd"
962
+ }, null, -1), Qe = [
963
+ Ye
964
+ ], Ge = {
987
965
  key: 1,
988
966
  class: "animate-spin"
989
- }, ss = /* @__PURE__ */ z({
967
+ }, Je = /* @__PURE__ */ f("svg", {
968
+ class: "w-3.5 h-3.5",
969
+ xmlns: "http://www.w3.org/2000/svg",
970
+ fill: "none",
971
+ viewBox: "0 0 24 24"
972
+ }, [
973
+ /* @__PURE__ */ f("circle", {
974
+ class: "opacity-25",
975
+ cx: "12",
976
+ cy: "12",
977
+ r: "10",
978
+ stroke: "currentColor",
979
+ "stroke-width": "4"
980
+ }),
981
+ /* @__PURE__ */ f("path", {
982
+ class: "opacity-75",
983
+ fill: "currentColor",
984
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
985
+ })
986
+ ], -1), Ze = [
987
+ Je
988
+ ], vt = /* @__PURE__ */ C({
990
989
  __name: "Chip",
991
990
  props: {
992
991
  modelValue: { type: Boolean, default: !1 },
@@ -994,83 +993,60 @@ const T = {
994
993
  size: { default: "md" },
995
994
  variant: { default: "filled" },
996
995
  color: { default: "primary" },
996
+ radius: { default: "xl" },
997
+ checked: { type: Boolean, default: !1 },
997
998
  disabled: { type: Boolean, default: !1 },
999
+ withRemoveButton: { type: Boolean, default: !1 },
998
1000
  withCheckIcon: { type: Boolean, default: !0 },
999
- loading: { type: Boolean, default: !1 },
1000
- allowDeselect: { type: Boolean, default: !0 }
1001
+ checkIconPosition: { default: "left" },
1002
+ allowDeselect: { type: Boolean, default: !0 },
1003
+ loading: { type: Boolean, default: !1 }
1001
1004
  },
1002
1005
  emits: ["update:modelValue"],
1003
- setup(l, { emit: s }) {
1004
- const e = l, u = s, t = d(() => de(e.color)), r = d(() => L(e.size, "chip")), b = d(() => R({
1005
- disabled: e.disabled,
1006
- loading: e.loading
1007
- })), a = d(() => P(e.color, "filled")), n = d(() => P(e.color, "outline")), w = () => {
1008
- e.disabled || e.loading || e.modelValue && !e.allowDeselect || u("update:modelValue", !e.modelValue);
1006
+ setup(e, { emit: s }) {
1007
+ const t = e, n = c(() => P(t.color)), r = c(() => S(t.size, "chip")), u = c(() => R({
1008
+ disabled: t.disabled,
1009
+ loading: t.loading
1010
+ })), x = c(() => P(t.color, "filled")), a = c(() => P(t.color, "outline")), d = () => {
1011
+ t.disabled || t.loading || t.modelValue && !t.allowDeselect || s("update:modelValue", !t.modelValue);
1009
1012
  };
1010
- return (x, m) => (o(), i("button", {
1011
- class: p([
1013
+ return (y, m) => (l(), o("button", {
1014
+ class: h([
1012
1015
  "inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none",
1013
1016
  "focus:outline-none",
1014
- t.value,
1015
- r.value,
1016
- b.value,
1017
- x.modelValue ? a.value : n.value,
1017
+ i(n),
1018
+ i(r),
1019
+ i(u),
1020
+ e.modelValue ? i(x) : i(a),
1018
1021
  "cursor-pointer"
1019
1022
  ]),
1020
- disabled: x.disabled || x.loading,
1021
- onClick: w
1023
+ disabled: e.disabled || e.loading,
1024
+ onClick: d
1022
1025
  }, [
1023
- x.withCheckIcon && x.modelValue ? (o(), i("svg", qe, m[0] || (m[0] = [
1024
- c("path", {
1025
- "fill-rule": "evenodd",
1026
- d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
1027
- "clip-rule": "evenodd"
1028
- }, null, -1)
1029
- ]))) : g("", !0),
1030
- x.loading ? (o(), i("span", Ae, m[1] || (m[1] = [
1031
- c("svg", {
1032
- class: "w-3.5 h-3.5",
1033
- xmlns: "http://www.w3.org/2000/svg",
1034
- fill: "none",
1035
- viewBox: "0 0 24 24"
1036
- }, [
1037
- c("circle", {
1038
- class: "opacity-25",
1039
- cx: "12",
1040
- cy: "12",
1041
- r: "10",
1042
- stroke: "currentColor",
1043
- "stroke-width": "4"
1044
- }),
1045
- c("path", {
1046
- class: "opacity-75",
1047
- fill: "currentColor",
1048
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1049
- })
1050
- ], -1)
1051
- ]))) : g("", !0),
1052
- c("span", {
1053
- class: p([
1026
+ e.withCheckIcon && e.modelValue ? (l(), o("svg", Xe, Qe)) : g("", !0),
1027
+ e.loading ? (l(), o("span", Ge, Ze)) : g("", !0),
1028
+ f("span", {
1029
+ class: h([
1054
1030
  "whitespace-nowrap",
1055
- x.loading ? "opacity-75" : ""
1031
+ e.loading ? "opacity-75" : ""
1056
1032
  ])
1057
- }, v(x.label), 3)
1058
- ], 10, Re));
1033
+ }, p(e.label), 3)
1034
+ ], 10, Ue));
1059
1035
  }
1060
- }), Ee = (l, s = 0) => {
1061
- const e = {
1036
+ }), _e = (e, s = 0) => {
1037
+ const t = {
1062
1038
  position: "absolute",
1063
1039
  transform: "translate(50%, -50%)"
1064
- }, [u, t] = l.split("-");
1065
- if (u === "top" ? e.top = "0" : u === "bottom" ? (e.bottom = "0", e.transform = "translate(50%, 50%)") : u === "middle" && (e.top = "50%", t === "start" ? e.transform = "translate(-50%, -50%)" : t === "end" ? e.transform = "translate(50%, -50%)" : e.transform = "translate(0, -50%)"), t === "start" ? (e.left = "0", e.transform = u === "bottom" ? "translate(-50%, 50%)" : "translate(-50%, -50%)") : t === "end" ? e.right = "0" : t === "center" && (e.left = "50%", e.transform = u === "bottom" ? "translate(-50%, 50%)" : "translate(-50%, -50%)"), s) {
1066
- const r = e.transform.includes("50%") ? "50%" : "0", b = e.transform.includes("-50%") ? "-50%" : "50%";
1067
- (u === "top" || u === "bottom") && (e.transform = `translate(${r}, ${b}) translateY(${s}px)`), (t === "start" || t === "end") && (e.transform = `translate(${r}, ${b}) translateX(${t === "start" ? -s : s}px)`);
1040
+ }, [n, r] = e.split("-");
1041
+ if (n === "top" ? t.top = "0" : n === "bottom" ? (t.bottom = "0", t.transform = "translate(50%, 50%)") : n === "middle" && (t.top = "50%", r === "start" ? t.transform = "translate(-50%, -50%)" : r === "end" ? t.transform = "translate(50%, -50%)" : t.transform = "translate(0, -50%)"), r === "start" ? (t.left = "0", t.transform = n === "bottom" ? "translate(-50%, 50%)" : "translate(-50%, -50%)") : r === "end" ? t.right = "0" : r === "center" && (t.left = "50%", t.transform = n === "bottom" ? "translate(-50%, 50%)" : "translate(-50%, -50%)"), s) {
1042
+ const u = t.transform.includes("50%") ? "50%" : "0", x = t.transform.includes("-50%") ? "-50%" : "50%";
1043
+ (n === "top" || n === "bottom") && (t.transform = `translate(${u}, ${x}) translateY(${s}px)`), (r === "start" || r === "end") && (t.transform = `translate(${u}, ${x}) translateX(${r === "start" ? -s : s}px)`);
1068
1044
  }
1069
- return e;
1070
- }, Fe = {
1045
+ return t;
1046
+ }, et = {
1071
1047
  name: "Indicator"
1072
- }, Te = /* @__PURE__ */ z({
1073
- ...Fe,
1048
+ }, tt = /* @__PURE__ */ C({
1049
+ ...et,
1074
1050
  props: {
1075
1051
  position: { default: "top-end" },
1076
1052
  size: { default: "md" },
@@ -1085,21 +1061,21 @@ const T = {
1085
1061
  processing: { type: Boolean, default: !1 },
1086
1062
  zIndex: { default: 200 }
1087
1063
  },
1088
- setup(l) {
1089
- const s = l, e = d(() => [
1064
+ setup(e) {
1065
+ const s = e, t = c(() => [
1090
1066
  s.inline ? "inline-block" : "block",
1091
1067
  "relative"
1092
- ]), u = d(() => ({
1068
+ ]), n = c(() => ({
1093
1069
  ...s.inline && { display: "inline-block" }
1094
- })), t = d(() => [
1070
+ })), r = c(() => [
1095
1071
  // Base classes
1096
1072
  "flex items-center justify-center",
1097
1073
  "absolute",
1098
1074
  "select-none",
1099
1075
  "rounded-full",
1100
1076
  // Size classes
1101
- _(s.size, "indicator"),
1102
- L(s.size, "indicator"),
1077
+ X(s.size, "indicator"),
1078
+ S(s.size, "indicator"),
1103
1079
  // Color classes
1104
1080
  !s.disabled && `bg-${s.color === "primary" ? "blue" : s.color}-600 text-white`,
1105
1081
  s.disabled && "bg-gray-200 text-gray-500",
@@ -1107,205 +1083,204 @@ const T = {
1107
1083
  s.withBorder && "border-2 border-white dark:border-gray-900",
1108
1084
  // Processing animation
1109
1085
  s.processing && "animate-pulse"
1110
- ]), r = d(() => ({
1111
- ...Ee(s.position, s.offset),
1086
+ ]), u = c(() => ({
1087
+ ..._e(s.position, s.offset),
1112
1088
  zIndex: s.zIndex
1113
1089
  }));
1114
- return (b, a) => (o(), i("div", {
1115
- class: p(e.value),
1116
- style: O(u.value)
1090
+ return (x, a) => (l(), o("div", {
1091
+ class: h(i(t)),
1092
+ style: E(i(n))
1117
1093
  }, [
1118
- b.disabled ? g("", !0) : (o(), i("div", {
1094
+ e.disabled ? g("", !0) : (l(), o("div", {
1119
1095
  key: 0,
1120
- class: p(t.value),
1121
- style: O(r.value)
1122
- }, v(b.label), 7)),
1123
- S(b.$slots, "default", {}, void 0, !0)
1096
+ class: h(i(r)),
1097
+ style: E(i(u))
1098
+ }, p(e.label), 7)),
1099
+ B(x.$slots, "default", {}, void 0, !0)
1124
1100
  ], 6));
1125
1101
  }
1126
1102
  });
1127
- const _e = (l, s) => {
1128
- const e = l.__vccOpts || l;
1129
- for (const [u, t] of s)
1130
- e[u] = t;
1131
- return e;
1132
- }, ts = /* @__PURE__ */ _e(Te, [["__scopeId", "data-v-9f21c403"]]), De = ["aria-valuenow"], as = /* @__PURE__ */ z({
1103
+ const st = (e, s) => {
1104
+ const t = e.__vccOpts || e;
1105
+ for (const [n, r] of s)
1106
+ t[n] = r;
1107
+ return t;
1108
+ }, wt = /* @__PURE__ */ st(tt, [["__scopeId", "data-v-643e9acf"]]), lt = ["aria-valuenow"], kt = /* @__PURE__ */ C({
1133
1109
  __name: "Progress",
1134
1110
  props: {
1135
1111
  value: { default: 0 },
1136
1112
  size: { default: "md" },
1137
- color: {},
1138
- label: {},
1113
+ color: null,
1114
+ label: null,
1139
1115
  striped: { type: Boolean, default: !1 },
1140
1116
  animated: { type: Boolean, default: !1 }
1141
1117
  },
1142
- setup(l) {
1143
- return (s, e) => (o(), i("div", {
1144
- class: p([
1118
+ setup(e) {
1119
+ return (s, t) => (l(), o("div", {
1120
+ class: h([
1145
1121
  "relative w-full rounded-sm overflow-hidden",
1146
1122
  "bg-gray-100",
1147
- D(_)(s.size, "progress")
1123
+ i(X)(e.size, "progress")
1148
1124
  ]),
1149
1125
  role: "progressbar",
1150
- "aria-valuenow": s.value,
1126
+ "aria-valuenow": e.value,
1151
1127
  "aria-valuemin": "0",
1152
1128
  "aria-valuemax": "100"
1153
1129
  }, [
1154
- c("div", {
1155
- class: p([
1130
+ f("div", {
1131
+ class: h([
1156
1132
  "h-full transition-all duration-300 ease-in-out",
1157
- D(P)(s.color || "primary", "filled"),
1133
+ i(P)(e.color || "primary", "filled"),
1158
1134
  {
1159
- "bg-striped": s.striped && !s.animated,
1160
- "bg-striped animate-progress": s.animated
1135
+ "bg-striped": e.striped && !e.animated,
1136
+ "bg-striped animate-progress": e.animated
1161
1137
  }
1162
1138
  ]),
1163
- style: O({ width: `${s.value}%` })
1139
+ style: E({ width: `${e.value}%` })
1164
1140
  }, [
1165
- s.label && (s.size === "lg" || s.size === "xl") ? (o(), i("span", {
1141
+ e.label && (e.size === "lg" || e.size === "xl") ? (l(), o("span", {
1166
1142
  key: 0,
1167
- class: p([
1143
+ class: h([
1168
1144
  "block px-2 py-1 text-white whitespace-nowrap font-medium leading-none",
1169
- D(N)(s.size)
1145
+ i(Y)(e.size)
1170
1146
  ])
1171
- }, v(s.label), 3)) : g("", !0)
1147
+ }, p(e.label), 3)) : g("", !0)
1172
1148
  ], 6)
1173
- ], 10, De));
1149
+ ], 10, lt));
1174
1150
  }
1175
1151
  });
1176
- const Oe = {
1152
+ const at = {
1177
1153
  key: 0,
1178
1154
  class: "flex-shrink-0"
1179
- }, We = {
1155
+ }, ot = {
1180
1156
  key: 0,
1181
1157
  class: "flex items-center justify-between"
1182
- }, Ne = {
1158
+ }, nt = {
1183
1159
  key: 1,
1184
1160
  class: "flex-shrink-0 ml-3"
1185
- }, He = ["disabled"], ls = /* @__PURE__ */ z({
1161
+ }, it = ["disabled"], rt = /* @__PURE__ */ f("span", { class: "sr-only" }, "Close", -1), dt = /* @__PURE__ */ f("svg", {
1162
+ class: "h-5 w-5",
1163
+ viewBox: "0 0 20 20",
1164
+ fill: "currentColor",
1165
+ "aria-hidden": "true"
1166
+ }, [
1167
+ /* @__PURE__ */ f("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
1168
+ ], -1), ct = [
1169
+ rt,
1170
+ dt
1171
+ ], Ct = /* @__PURE__ */ C({
1186
1172
  __name: "Alert",
1187
1173
  props: {
1188
- title: {},
1189
- message: {},
1190
- icon: {},
1174
+ title: null,
1175
+ message: null,
1176
+ icon: null,
1191
1177
  variant: { default: "default" },
1192
1178
  color: { default: "primary" },
1193
1179
  size: { default: "md" },
1194
1180
  closable: { type: Boolean, default: !1 },
1195
- onClose: {},
1181
+ onClose: null,
1196
1182
  disabled: { type: Boolean, default: !1 },
1197
1183
  loading: { type: Boolean, default: !1 },
1198
1184
  valid: { type: Boolean, default: void 0 },
1199
- invalid: { type: Boolean, default: void 0 },
1200
- class: {}
1185
+ invalid: { type: Boolean, default: void 0 }
1201
1186
  },
1202
1187
  emits: ["close"],
1203
- setup(l, { emit: s }) {
1204
- const e = l, u = s, t = d(() => P(e.color, e.variant, {
1188
+ setup(e, { emit: s }) {
1189
+ const t = e, n = c(() => P(t.color, t.variant, {
1205
1190
  hover: !1,
1206
1191
  active: !1,
1207
1192
  focus: !1,
1208
- disabled: e.disabled
1209
- })), r = d(() => ne(e.variant)), b = d(() => re(e.color, e.variant)), a = d(() => ie(e.color, e.variant)), n = d(() => L(e.size, "alert")), w = d(() => Y(e.size, "alert")), x = d(() => N(e.size)), m = d(() => ue(e.size)), C = d(() => R({
1210
- disabled: e.disabled,
1211
- loading: e.loading
1212
- })), V = d(() => ce({
1213
- valid: e.valid,
1214
- invalid: e.invalid
1215
- })), j = d(() => pe({
1193
+ disabled: t.disabled
1194
+ })), r = c(() => ce(t.variant)), u = c(() => re(t.color, t.variant)), x = c(() => de(t.color, t.variant)), a = c(() => S(t.size, "alert")), d = c(() => U(t.size, "alert")), y = c(() => Y(t.size)), m = c(() => ue(t.size)), w = c(() => R({
1195
+ disabled: t.disabled,
1196
+ loading: t.loading
1197
+ })), v = c(() => he({
1198
+ valid: t.valid,
1199
+ invalid: t.invalid
1200
+ })), I = c(() => fe({
1216
1201
  hover: !0,
1217
1202
  focus: !0
1218
- }, e.color)), y = () => {
1219
- u("close");
1203
+ }, t.color)), V = () => {
1204
+ s("close");
1220
1205
  };
1221
- return (f, q) => (o(), i("div", {
1222
- class: p([
1206
+ return (q, T) => (l(), o("div", {
1207
+ class: h([
1223
1208
  "relative rounded-md",
1224
- r.value,
1225
- t.value,
1226
- n.value,
1227
- C.value,
1228
- V.value
1209
+ i(r),
1210
+ i(n),
1211
+ i(a),
1212
+ i(w),
1213
+ i(v)
1229
1214
  ]),
1230
1215
  role: "alert"
1231
1216
  }, [
1232
- c("div", {
1233
- class: p(["flex items-start", [m.value]])
1217
+ f("div", {
1218
+ class: h(["flex items-start", [i(m)]])
1234
1219
  }, [
1235
- f.icon ? (o(), i("div", Oe, [
1236
- (o(), M(I(f.icon), {
1237
- class: p([
1238
- w.value,
1239
- b.value
1220
+ e.icon ? (l(), o("div", at, [
1221
+ (l(), j(M(e.icon), {
1222
+ class: h([
1223
+ i(d),
1224
+ i(u)
1240
1225
  ])
1241
1226
  }, null, 8, ["class"]))
1242
1227
  ])) : g("", !0),
1243
- c("div", {
1244
- class: p(["flex-grow", [f.icon && "ml-3"]])
1228
+ f("div", {
1229
+ class: h(["flex-grow", [e.icon && "ml-3"]])
1245
1230
  }, [
1246
- f.title ? (o(), i("div", We, [
1247
- c("h3", {
1248
- class: p([
1231
+ e.title ? (l(), o("div", ot, [
1232
+ f("h3", {
1233
+ class: h([
1249
1234
  "font-medium",
1250
- a.value
1235
+ i(x)
1251
1236
  ])
1252
- }, v(f.title), 3)
1237
+ }, p(e.title), 3)
1253
1238
  ])) : g("", !0),
1254
- f.message ? (o(), i("div", {
1239
+ e.message ? (l(), o("div", {
1255
1240
  key: 1,
1256
- class: p([
1241
+ class: h([
1257
1242
  "mt-1",
1258
- f.variant === "filled" ? "text-white/90" : "text-gray-600",
1259
- x.value
1243
+ e.variant === "filled" ? "text-white/90" : "text-gray-600",
1244
+ i(y)
1260
1245
  ])
1261
- }, v(f.message), 3)) : g("", !0),
1262
- S(f.$slots, "default")
1246
+ }, p(e.message), 3)) : g("", !0),
1247
+ B(q.$slots, "default")
1263
1248
  ], 2),
1264
- f.closable ? (o(), i("div", Ne, [
1265
- c("button", {
1249
+ e.closable ? (l(), o("div", nt, [
1250
+ f("button", {
1266
1251
  type: "button",
1267
- class: p(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2", [
1268
- f.variant === "filled" ? "text-white/80 hover:text-white focus:ring-white" : "text-gray-400 hover:text-gray-500 focus:ring-primary-500",
1269
- j.value
1252
+ class: h(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2", [
1253
+ e.variant === "filled" ? "text-white/80 hover:text-white focus:ring-white" : "text-gray-400 hover:text-gray-500 focus:ring-primary-500",
1254
+ i(I)
1270
1255
  ]]),
1271
- disabled: f.disabled,
1272
- onClick: y
1273
- }, q[0] || (q[0] = [
1274
- c("span", { class: "sr-only" }, "Close", -1),
1275
- c("svg", {
1276
- class: "h-5 w-5",
1277
- viewBox: "0 0 20 20",
1278
- fill: "currentColor",
1279
- "aria-hidden": "true"
1280
- }, [
1281
- c("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
1282
- ], -1)
1283
- ]), 10, He)
1256
+ disabled: e.disabled,
1257
+ onClick: V
1258
+ }, ct, 10, it)
1284
1259
  ])) : g("", !0)
1285
1260
  ], 2)
1286
1261
  ], 2));
1287
1262
  }
1288
- }), os = {}, Ke = {
1263
+ }), $t = {}, ut = {
1289
1264
  key: 0,
1290
1265
  class: "badge-section mr-2"
1291
- }, Ue = { class: "badge-label" }, Xe = {
1266
+ }, ht = { class: "badge-label" }, ft = {
1292
1267
  key: 1,
1293
1268
  class: "badge-section ml-2"
1294
- }, rs = /* @__PURE__ */ z({
1269
+ }, zt = /* @__PURE__ */ C({
1295
1270
  __name: "Badge",
1296
1271
  props: {
1297
1272
  size: { default: "md" },
1298
1273
  circle: { type: Boolean, default: !1 },
1299
1274
  radius: { default: "xl" },
1300
1275
  color: { default: "primary" },
1301
- gradient: {},
1302
- leftSection: {},
1303
- rightSection: {},
1276
+ gradient: null,
1277
+ leftSection: null,
1278
+ rightSection: null,
1304
1279
  fullWidth: { type: Boolean, default: !1 },
1305
1280
  variant: { default: "filled" }
1306
1281
  },
1307
- setup(l) {
1308
- const s = l, e = (r) => ({
1282
+ setup(e) {
1283
+ const s = e, t = (u) => ({
1309
1284
  none: "rounded-none",
1310
1285
  xs: "rounded",
1311
1286
  sm: "rounded-md",
@@ -1313,50 +1288,50 @@ const Oe = {
1313
1288
  lg: "rounded-xl",
1314
1289
  xl: "rounded-2xl",
1315
1290
  full: "rounded-full"
1316
- })[r] || "rounded-lg", u = (r) => `relative pl-6 before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:w-2 before:h-2 before:rounded-full before:bg-${r}-500`, t = d(() => {
1317
- var m, C;
1318
- const r = "inline-flex items-center justify-center font-medium", b = s.variant === "gradient" ? `bg-gradient-to-r from-${(m = s.gradient) == null ? void 0 : m.from} to-${(C = s.gradient) == null ? void 0 : C.to} text-white` : P(s.color, s.variant), a = L(s.size, "badge"), n = e(s.radius), w = s.variant === "dot" ? u(s.color) : "";
1291
+ })[u] || "rounded-lg", n = (u) => `relative pl-6 before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:w-2 before:h-2 before:rounded-full before:bg-${u}-500`, r = c(() => {
1292
+ var w, v;
1293
+ const u = "inline-flex items-center justify-center font-medium", x = s.variant === "gradient" ? `bg-gradient-to-r from-${(w = s.gradient) == null ? void 0 : w.from} to-${(v = s.gradient) == null ? void 0 : v.to} text-white` : P(s.color, s.variant), a = S(s.size, "badge"), d = t(s.radius), y = s.variant === "dot" ? n(s.color) : "";
1319
1294
  return [
1320
- r,
1321
- b,
1295
+ u,
1296
+ x,
1322
1297
  a,
1323
- n,
1324
- w,
1298
+ d,
1299
+ y,
1325
1300
  {
1326
1301
  "aspect-square p-0": s.circle,
1327
1302
  "w-full": s.fullWidth
1328
1303
  }
1329
1304
  ].filter(Boolean).join(" ");
1330
1305
  });
1331
- return (r, b) => (o(), i("div", {
1332
- class: p(t.value)
1306
+ return (u, x) => (l(), o("div", {
1307
+ class: h(i(r))
1333
1308
  }, [
1334
- r.leftSection ? (o(), i("span", Ke, [
1335
- typeof r.leftSection == "string" ? (o(), i(F, { key: 0 }, [
1336
- A(v(r.leftSection), 1)
1337
- ], 64)) : (o(), M(I(r.leftSection), { key: 1 }))
1309
+ e.leftSection ? (l(), o("span", ut, [
1310
+ typeof e.leftSection == "string" ? (l(), o(D, { key: 0 }, [
1311
+ L(p(e.leftSection), 1)
1312
+ ], 64)) : (l(), j(M(e.leftSection), { key: 1 }))
1338
1313
  ])) : g("", !0),
1339
- c("span", Ue, [
1340
- S(r.$slots, "default")
1314
+ f("span", ht, [
1315
+ B(u.$slots, "default")
1341
1316
  ]),
1342
- r.rightSection ? (o(), i("span", Xe, [
1343
- typeof r.rightSection == "string" ? (o(), i(F, { key: 0 }, [
1344
- A(v(r.rightSection), 1)
1345
- ], 64)) : (o(), M(I(r.rightSection), { key: 1 }))
1317
+ e.rightSection ? (l(), o("span", ft, [
1318
+ typeof e.rightSection == "string" ? (l(), o(D, { key: 0 }, [
1319
+ L(p(e.rightSection), 1)
1320
+ ], 64)) : (l(), j(M(e.rightSection), { key: 1 }))
1346
1321
  ])) : g("", !0)
1347
1322
  ], 2));
1348
1323
  }
1349
1324
  });
1350
1325
  export {
1351
- ls as Alert,
1352
- rs as Badge,
1353
- Qe as Button,
1354
- Ge as Checkbox,
1355
- ss as Chip,
1356
- ts as Indicator,
1357
- as as Progress,
1358
- Je as Radio,
1359
- es as Select,
1360
- Ze as TextInput,
1361
- os as composables
1326
+ Ct as Alert,
1327
+ zt as Badge,
1328
+ gt as Button,
1329
+ bt as Checkbox,
1330
+ vt as Chip,
1331
+ wt as Indicator,
1332
+ kt as Progress,
1333
+ pt as Radio,
1334
+ mt as Select,
1335
+ yt as TextInput,
1336
+ $t as composables
1362
1337
  };