@dimasbaguspm/versaur 0.0.16 → 0.0.17

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 (58) hide show
  1. package/dist/js/bottom-sheet-CHRSxXRE.js +501 -0
  2. package/dist/js/{switch-input-Bx6_2zG9.js → email-input-CVyrFzqL.js} +592 -807
  3. package/dist/js/enforce-subpath-import.js +5 -2
  4. package/dist/js/feedbacks/index.js +1 -1
  5. package/dist/js/{form-layout-4ASWdXn8.js → form-layout-Dhlv-FZL.js} +1 -1
  6. package/dist/js/forms/index.js +17 -14
  7. package/dist/js/{index-DOdDlCoL.js → index-C1uJQB34.js} +2 -2
  8. package/dist/js/index.js +45 -43
  9. package/dist/js/layouts/index.js +1 -1
  10. package/dist/js/modal-FqewbVts.js +150 -0
  11. package/dist/js/navigation/index.js +1 -1
  12. package/dist/js/overlays/index.js +4 -4
  13. package/dist/js/primitive/index.js +14 -15
  14. package/dist/js/{skeleton-BNZyaRjo.js → skeleton-QEyPZAuF.js} +1 -1
  15. package/dist/js/{tabs-BbOkYchB.js → tabs-DYcTvVao.js} +1 -1
  16. package/dist/js/tile-B9bt2AY6.js +1776 -0
  17. package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +10 -0
  18. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +5 -0
  19. package/dist/types/forms/chip-multiple-input/index.d.ts +2 -0
  20. package/dist/types/forms/{chip-input → chip-multiple-input}/types.d.ts +16 -4
  21. package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +10 -0
  22. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +5 -0
  23. package/dist/types/forms/chip-single-input/index.d.ts +1 -0
  24. package/dist/types/forms/chip-single-input/types.d.ts +67 -0
  25. package/dist/types/forms/date-single-picker-input/date-single-picker-input.d.ts +1 -8
  26. package/dist/types/forms/date-single-picker-input/index.d.ts +1 -1
  27. package/dist/types/forms/date-single-picker-input/types.d.ts +12 -66
  28. package/dist/types/forms/email-input/email-input.d.ts +8 -0
  29. package/dist/types/forms/email-input/index.d.ts +2 -0
  30. package/dist/types/forms/email-input/types.d.ts +6 -0
  31. package/dist/types/forms/index.d.ts +5 -1
  32. package/dist/types/forms/price-input/index.d.ts +2 -0
  33. package/dist/types/forms/price-input/price-input.d.ts +6 -0
  34. package/dist/types/forms/price-input/types.d.ts +15 -0
  35. package/dist/types/forms/price-input/use-price-input.d.ts +6 -0
  36. package/dist/types/forms/search-input/index.d.ts +2 -0
  37. package/dist/types/forms/search-input/search-input.d.ts +8 -0
  38. package/dist/types/forms/search-input/types.d.ts +35 -0
  39. package/dist/types/forms/segment-multiple-input/types.d.ts +1 -5
  40. package/dist/types/forms/segment-single-input/types.d.ts +1 -5
  41. package/dist/types/overlays/modal/types.d.ts +1 -1
  42. package/dist/types/primitive/anchor/types.d.ts +8 -2
  43. package/package.json +1 -1
  44. package/dist/js/bottom-sheet-Difan0U1.js +0 -340
  45. package/dist/js/calendar-CUjVZ7Ap.js +0 -811
  46. package/dist/js/menu-Bm-yPIMN.js +0 -310
  47. package/dist/js/tile-BjhJ5Mvl.js +0 -939
  48. package/dist/types/forms/chip-input/chip-input.atoms.d.ts +0 -10
  49. package/dist/types/forms/chip-input/chip-input.d.ts +0 -5
  50. package/dist/types/forms/chip-input/index.d.ts +0 -2
  51. package/dist/types/forms/date-range-picker-input/date-range-picker-input.d.ts +0 -10
  52. package/dist/types/forms/date-range-picker-input/index.d.ts +0 -2
  53. package/dist/types/forms/date-range-picker-input/types.d.ts +0 -64
  54. package/dist/types/forms/date-range-picker-input/use-date-range-picker.d.ts +0 -13
  55. package/dist/types/forms/date-single-picker-input/date-single-picker-input.atoms.d.ts +0 -13
  56. package/dist/types/forms/date-single-picker-input/date-single-picker-input.docked.d.ts +0 -14
  57. package/dist/types/forms/date-single-picker-input/date-single-picker-input.modal.d.ts +0 -15
  58. package/dist/types/forms/date-single-picker-input/use-date-single-picker.d.ts +0 -10
@@ -1,939 +0,0 @@
1
- import { c as b, j as n, a as l } from "./index-DOdDlCoL.js";
2
- import * as u from "react";
3
- import { forwardRef as d, useState as v, useEffect as x, useCallback as y, useRef as S, createContext as V, useContext as T, useMemo as A } from "react";
4
- const B = b(
5
- "relative flex items-center gap-2 rounded-md p-2 text-sm transition-all duration-200",
6
- {
7
- variants: {
8
- variant: {
9
- default: "",
10
- outline: "border"
11
- },
12
- color: {
13
- // Core colors
14
- primary: "",
15
- secondary: "",
16
- tertiary: "",
17
- ghost: "",
18
- neutral: "",
19
- // Semantic colors
20
- success: "",
21
- info: "",
22
- warning: "",
23
- danger: ""
24
- }
25
- },
26
- compoundVariants: [
27
- // Default variant styles (soft backgrounds)
28
- {
29
- variant: "default",
30
- color: "primary",
31
- class: "bg-primary-soft text-primary border border-primary"
32
- },
33
- {
34
- variant: "default",
35
- color: "secondary",
36
- class: "bg-secondary-soft text-secondary border border-secondary"
37
- },
38
- {
39
- variant: "default",
40
- color: "tertiary",
41
- class: "bg-tertiary-soft text-tertiary border border-tertiary"
42
- },
43
- {
44
- variant: "default",
45
- color: "ghost",
46
- class: "bg-ghost-soft text-ghost border border-ghost"
47
- },
48
- {
49
- variant: "default",
50
- color: "neutral",
51
- class: "bg-border/50 text-foreground border border-border"
52
- },
53
- {
54
- variant: "default",
55
- color: "success",
56
- class: "bg-success-soft text-success border border-success"
57
- },
58
- {
59
- variant: "default",
60
- color: "info",
61
- class: "bg-info-soft text-info border border-info"
62
- },
63
- {
64
- variant: "default",
65
- color: "warning",
66
- class: "bg-warning-soft text-warning border border-warning"
67
- },
68
- {
69
- variant: "default",
70
- color: "danger",
71
- class: "bg-danger-soft text-danger border border-danger"
72
- },
73
- // Outline variant styles
74
- {
75
- variant: "outline",
76
- color: "primary",
77
- class: "bg-transparent text-primary border-primary"
78
- },
79
- {
80
- variant: "outline",
81
- color: "secondary",
82
- class: "bg-transparent text-secondary border-secondary"
83
- },
84
- {
85
- variant: "outline",
86
- color: "tertiary",
87
- class: "bg-transparent text-tertiary border-tertiary"
88
- },
89
- {
90
- variant: "outline",
91
- color: "ghost",
92
- class: "bg-transparent text-ghost border-ghost"
93
- },
94
- {
95
- variant: "outline",
96
- color: "neutral",
97
- class: "bg-transparent text-foreground border-border"
98
- },
99
- {
100
- variant: "outline",
101
- color: "success",
102
- class: "bg-transparent text-success border-success"
103
- },
104
- {
105
- variant: "outline",
106
- color: "info",
107
- class: "bg-transparent text-info border-info"
108
- },
109
- {
110
- variant: "outline",
111
- color: "warning",
112
- class: "bg-transparent text-warning border-warning"
113
- },
114
- {
115
- variant: "outline",
116
- color: "danger",
117
- class: "bg-transparent text-danger border-danger"
118
- }
119
- ],
120
- defaultVariants: {
121
- variant: "default",
122
- color: "neutral"
123
- }
124
- }
125
- ), R = b(
126
- "flex-shrink-0 flex justify-center items-center ",
127
- {
128
- variants: {
129
- size: {
130
- sm: "w-4 h-4",
131
- md: "w-5 h-5",
132
- lg: "w-6 h-6"
133
- }
134
- },
135
- defaultVariants: {
136
- size: "md"
137
- }
138
- }
139
- ), C = d(
140
- ({ className: e, children: r, ...t }, s) => /* @__PURE__ */ n.jsx("div", { ref: s, className: l(R(), e), ...t, children: r })
141
- ), k = d(
142
- ({
143
- variant: e = "default",
144
- color: r = "neutral",
145
- icon: t,
146
- className: s,
147
- children: o,
148
- ...a
149
- }, g) => /* @__PURE__ */ n.jsxs(
150
- "div",
151
- {
152
- ref: g,
153
- role: "alert",
154
- className: l(B({ variant: e, color: r }), s),
155
- ...a,
156
- children: [
157
- t && /* @__PURE__ */ n.jsx(C, { children: t }),
158
- /* @__PURE__ */ n.jsx("div", { className: "flex-1", children: o })
159
- ]
160
- }
161
- )
162
- ), le = Object.assign(k, {
163
- Icon: C
164
- }), I = b(
165
- [
166
- "inline-flex items-center transition-colors underline underline-offset-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
167
- // pseudo selectors for anchor
168
- "hover:no-underline"
169
- ],
170
- {
171
- variants: {
172
- color: {
173
- primary: "text-primary",
174
- secondary: "text-secondary",
175
- ghost: "text-ghost",
176
- danger: "text-danger",
177
- neutral: "text-neutral"
178
- }
179
- },
180
- defaultVariants: {
181
- color: "primary"
182
- }
183
- }
184
- ), O = d(
185
- ({
186
- children: e,
187
- className: r,
188
- color: t = "primary",
189
- fontSize: s = "base",
190
- fontWeight: o = "medium",
191
- ...a
192
- }, g) => {
193
- const i = s ? `text-${s}` : "text-base", f = o ? `font-${o}` : "font-medium";
194
- return /* @__PURE__ */ n.jsx(
195
- "a",
196
- {
197
- ref: g,
198
- className: l(
199
- I({ color: t }),
200
- i,
201
- f,
202
- r
203
- ),
204
- ...a,
205
- children: e
206
- }
207
- );
208
- }
209
- );
210
- O.displayName = "Anchor";
211
- const q = b(
212
- "inline-flex items-center justify-center font-medium text-white overflow-hidden transition-all duration-200 select-none relative",
213
- {
214
- variants: {
215
- variant: {
216
- // Core variants using Versaur color system
217
- primary: "bg-primary-light text-primary",
218
- secondary: "bg-secondary-light text-secondary",
219
- tertiary: "bg-tertiary-light text-tertiary",
220
- ghost: "bg-ghost-light text-ghost",
221
- neutral: "bg-neutral-light text-foreground border border-border",
222
- // Semantic variants
223
- success: "bg-success-light text-success",
224
- info: "bg-info-light text-info",
225
- warning: "bg-warning-light text-warning",
226
- danger: "bg-danger-light text-danger"
227
- },
228
- size: {
229
- xs: "h-6 w-6 text-xs",
230
- sm: "h-8 w-8 text-xs",
231
- md: "h-10 w-10 text-sm",
232
- lg: "h-12 w-12 text-base",
233
- xl: "h-16 w-16 text-xl"
234
- },
235
- shape: {
236
- circle: "rounded-full",
237
- square: "rounded-none",
238
- rounded: "rounded-md"
239
- }
240
- },
241
- defaultVariants: {
242
- variant: "primary",
243
- size: "md",
244
- shape: "circle"
245
- }
246
- }
247
- ), F = b(
248
- "absolute inset-0 h-full w-full object-cover"
249
- ), L = d(
250
- ({
251
- variant: e = "primary",
252
- size: r = "md",
253
- shape: t = "circle",
254
- className: s,
255
- children: o,
256
- ...a
257
- }, g) => /* @__PURE__ */ n.jsx(
258
- "div",
259
- {
260
- ref: g,
261
- className: l(q({ variant: e, size: r, shape: t }), s),
262
- ...a,
263
- children: o
264
- }
265
- )
266
- ), $ = d(
267
- ({ src: e, alt: r, className: t, onError: s, ...o }, a) => {
268
- const [g, i] = v(!1);
269
- x(() => {
270
- i(!1);
271
- }, [e]);
272
- const f = y(
273
- (c) => {
274
- i(!0), s?.(c);
275
- },
276
- [s]
277
- );
278
- return g ? null : /* @__PURE__ */ n.jsx(
279
- "img",
280
- {
281
- ref: a,
282
- src: e,
283
- alt: r,
284
- className: l(F(), t),
285
- onError: f,
286
- ...o
287
- }
288
- );
289
- }
290
- ), ce = Object.assign(L, {
291
- /**
292
- * AvatarImage sub-component for displaying images with fallback behavior
293
- */
294
- Image: $
295
- }), M = b(
296
- "inline-flex items-center justify-center font-medium transition-all duration-200 select-none gap-1 min-h-[1.25rem]",
297
- {
298
- variants: {
299
- variant: {
300
- default: "",
301
- outline: "border bg-background"
302
- },
303
- color: {
304
- // Core colors
305
- primary: "",
306
- secondary: "",
307
- tertiary: "",
308
- ghost: "",
309
- neutral: "",
310
- // Semantic colors
311
- success: "",
312
- info: "",
313
- warning: "",
314
- danger: ""
315
- },
316
- shape: {
317
- rounded: "rounded-full",
318
- square: "rounded-md"
319
- },
320
- size: {
321
- sm: "text-xs px-1 py-0.25 h-3",
322
- md: "text-xs px-1.5 py-0.5 h-4",
323
- lg: "text-sm px-2 py-1 h-6"
324
- },
325
- iconOnly: {
326
- true: "",
327
- false: ""
328
- }
329
- },
330
- compoundVariants: [
331
- // Default variant color combinations - using light/soft backgrounds
332
- {
333
- variant: "default",
334
- color: "primary",
335
- className: "bg-primary-light text-primary"
336
- },
337
- {
338
- variant: "default",
339
- color: "secondary",
340
- className: "bg-secondary-light text-secondary"
341
- },
342
- {
343
- variant: "default",
344
- color: "tertiary",
345
- className: "bg-tertiary-light text-tertiary"
346
- },
347
- {
348
- variant: "default",
349
- color: "ghost",
350
- className: "bg-ghost-light text-ghost"
351
- },
352
- {
353
- variant: "default",
354
- color: "neutral",
355
- className: "bg-neutral text-foreground"
356
- },
357
- {
358
- variant: "default",
359
- color: "success",
360
- className: "bg-success-light text-success"
361
- },
362
- {
363
- variant: "default",
364
- color: "info",
365
- className: "bg-info-light text-info"
366
- },
367
- {
368
- variant: "default",
369
- color: "warning",
370
- className: "bg-warning-light text-warning"
371
- },
372
- {
373
- variant: "default",
374
- color: "danger",
375
- className: "bg-danger-light text-danger"
376
- },
377
- // Outline variant color combinations
378
- {
379
- variant: "outline",
380
- color: "primary",
381
- className: "border-primary text-primary"
382
- },
383
- {
384
- variant: "outline",
385
- color: "secondary",
386
- className: "border-secondary text-secondary"
387
- },
388
- {
389
- variant: "outline",
390
- color: "tertiary",
391
- className: "border-tertiary text-tertiary"
392
- },
393
- {
394
- variant: "outline",
395
- color: "ghost",
396
- className: "border-ghost text-ghost"
397
- },
398
- {
399
- variant: "outline",
400
- color: "neutral",
401
- className: "border-neutral text-foreground"
402
- },
403
- {
404
- variant: "outline",
405
- color: "success",
406
- className: "border-success text-success"
407
- },
408
- {
409
- variant: "outline",
410
- color: "info",
411
- className: "border-info text-info"
412
- },
413
- {
414
- variant: "outline",
415
- color: "warning",
416
- className: "border-warning text-warning"
417
- },
418
- {
419
- variant: "outline",
420
- color: "danger",
421
- className: "border-danger text-danger"
422
- },
423
- // Icon-only size adjustments
424
- {
425
- iconOnly: !0,
426
- size: "sm",
427
- className: "px-1 py-1 w-5 h-5"
428
- },
429
- {
430
- iconOnly: !0,
431
- size: "md",
432
- className: "px-1.5 py-1.5 w-6 h-6"
433
- },
434
- {
435
- iconOnly: !0,
436
- size: "lg",
437
- className: "px-2 py-2 w-7 h-7"
438
- }
439
- ],
440
- defaultVariants: {
441
- variant: "default",
442
- color: "primary",
443
- shape: "square",
444
- size: "md",
445
- iconOnly: !1
446
- }
447
- }
448
- ), P = d(
449
- ({
450
- variant: e = "default",
451
- shape: r = "square",
452
- color: t = "primary",
453
- size: s = "md",
454
- iconLeft: o,
455
- iconRight: a,
456
- className: g,
457
- children: i,
458
- ...f
459
- }, c) => {
460
- const h = !(i != null && i !== "") && !!(o || a);
461
- return /* @__PURE__ */ n.jsx(
462
- "span",
463
- {
464
- ref: c,
465
- className: l(
466
- M({
467
- variant: e,
468
- color: t,
469
- shape: r,
470
- size: s,
471
- iconOnly: h
472
- }),
473
- g
474
- ),
475
- ...f,
476
- children: h ? (
477
- // Icon-only mode: display only the icon
478
- o || a
479
- ) : (
480
- // Normal mode: display icon(s) and text
481
- /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
482
- o,
483
- i,
484
- a
485
- ] })
486
- )
487
- }
488
- );
489
- }
490
- );
491
- P.displayName = "Badge";
492
- const E = (e) => /* @__PURE__ */ u.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("title", null, "Spenicle"), /* @__PURE__ */ u.createElement("rect", { width: 32, height: 32, fill: "#e07a5f" }), /* @__PURE__ */ u.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ u.createElement("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z", fill: "white" }))), H = (e) => /* @__PURE__ */ u.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("title", null, "Spenicle"), /* @__PURE__ */ u.createElement("rect", { width: 32, height: 32, rx: 8, fill: "#e07a5f" }), /* @__PURE__ */ u.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ u.createElement("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z", fill: "white" }))), Y = (e) => /* @__PURE__ */ u.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("title", null, "Spenicle"), /* @__PURE__ */ u.createElement("circle", { cx: 16, cy: 16, r: 16, fill: "#e07a5f" }), /* @__PURE__ */ u.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ u.createElement("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z", fill: "white" }))), _ = b("", {
493
- variants: {
494
- size: {
495
- xs: "h-6 w-6",
496
- sm: "h-6 w-6",
497
- md: "h-8 w-8",
498
- lg: "h-10 w-10",
499
- xl: "h-12 w-12"
500
- }
501
- },
502
- defaultVariants: {
503
- size: "md"
504
- }
505
- }), D = d(
506
- ({ shape: e = "square", size: r, ...t }, s) => {
507
- const a = {
508
- square: E,
509
- rounded: H,
510
- circle: Y
511
- }[e] || E;
512
- return /* @__PURE__ */ n.jsx(
513
- a,
514
- {
515
- ref: s,
516
- ...t,
517
- className: l("inline-block", _({ size: r }))
518
- }
519
- );
520
- }
521
- ), de = d(
522
- ({ name: e = "spenicle", size: r = "md", shape: t, ...s }, o) => /* @__PURE__ */ n.jsx(
523
- "span",
524
- {
525
- ref: o,
526
- className: l("inline-flex items-center gap-2"),
527
- ...s,
528
- children: /* @__PURE__ */ n.jsx(D, { shape: t, size: r, "aria-hidden": "true" })
529
- }
530
- )
531
- ), G = b(
532
- [
533
- "inline-flex items-center justify-center gap-2",
534
- "rounded-lg",
535
- "font-medium",
536
- "transition-all",
537
- "duration-200",
538
- "focus-visible:outline-none",
539
- "focus-visible:ring-2",
540
- "focus-visible:ring-offset-2",
541
- "disabled:opacity-50",
542
- "disabled:pointer-events-none",
543
- "select-none",
544
- "shadow-lg",
545
- "transition-transform",
546
- "transition-shadow",
547
- "will-change-transform,opacity,box-shadow",
548
- "hover:scale-105",
549
- "active:scale-95",
550
- "focus-visible:shadow-xl",
551
- "hover:shadow-xl",
552
- "active:shadow-md"
553
- ].join(" "),
554
- {
555
- variants: {
556
- variant: {
557
- primary: "bg-primary text-white hover:bg-primary/90 focus-visible:ring-primary-soft focus-visible:ring-offset-white",
558
- secondary: "bg-secondary text-white hover:bg-secondary/90 focus-visible:ring-secondary-soft focus-visible:ring-offset-white",
559
- tertiary: "bg-tertiary text-white hover:bg-tertiary/90 focus-visible:ring-tertiary-soft focus-visible:ring-offset-white",
560
- ghost: "bg-white text-foreground hover:bg-ghost-soft focus-visible:ring-ghost-soft focus-visible:ring-offset-white",
561
- neutral: "bg-neutral text-foreground border border-border hover:bg-neutral/80 focus-visible:ring-foreground-soft focus-visible:ring-offset-white",
562
- "primary-outline": "border border-primary text-primary bg-white hover:bg-primary hover:text-white focus-visible:ring-primary-soft focus-visible:ring-offset-white",
563
- "secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary hover:text-white focus-visible:ring-secondary-soft focus-visible:ring-offset-white",
564
- "tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary hover:text-white focus-visible:ring-tertiary-soft focus-visible:ring-offset-white",
565
- "ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost hover:text-white focus-visible:ring-ghost-soft focus-visible:ring-offset-white",
566
- "neutral-outline": "border border-neutral text-foreground bg-white hover:bg-neutral hover:text-foreground focus-visible:ring-foreground-soft focus-visible:ring-offset-white",
567
- "primary-ghost": "text-primary bg-white hover:bg-primary-soft focus-visible:ring-primary-soft focus-visible:ring-offset-white",
568
- "secondary-ghost": "text-secondary bg-white hover:bg-secondary-soft focus-visible:ring-secondary-soft focus-visible:ring-offset-white",
569
- "tertiary-ghost": "text-tertiary bg-white hover:bg-tertiary-soft focus-visible:ring-tertiary-soft focus-visible:ring-offset-white",
570
- "neutral-ghost": "text-foreground bg-white hover:bg-neutral/70 focus-visible:ring-foreground-soft focus-visible:ring-offset-white",
571
- success: "bg-success text-white hover:bg-success/90 focus-visible:ring-success-soft focus-visible:ring-offset-white",
572
- "success-outline": "border border-success text-success bg-white hover:bg-success hover:text-white focus-visible:ring-success-soft focus-visible:ring-offset-white",
573
- "success-ghost": "text-success bg-white hover:bg-success-soft focus-visible:ring-success-soft focus-visible:ring-offset-white",
574
- info: "bg-info text-white hover:bg-info/90 focus-visible:ring-info-soft focus-visible:ring-offset-white",
575
- "info-outline": "border border-info text-info bg-white hover:bg-info hover:text-white focus-visible:ring-info-soft focus-visible:ring-offset-white",
576
- "info-ghost": "text-info bg-white hover:bg-info-soft focus-visible:ring-info-soft focus-visible:ring-offset-white",
577
- warning: "bg-warning text-white hover:bg-warning/90 focus-visible:ring-warning-soft focus-visible:ring-offset-white",
578
- "warning-outline": "border border-warning text-warning bg-white hover:bg-warning hover:text-white focus-visible:ring-warning-soft focus-visible:ring-offset-white",
579
- "warning-ghost": "text-warning bg-white hover:bg-warning-soft focus-visible:ring-warning-soft focus-visible:ring-offset-white",
580
- danger: "bg-danger text-white hover:bg-danger/90 focus-visible:ring-danger-soft focus-visible:ring-offset-white",
581
- "danger-outline": "border border-danger text-danger bg-white hover:bg-danger hover:text-white focus-visible:ring-danger-soft focus-visible:ring-offset-white",
582
- "danger-ghost": "text-danger bg-white hover:bg-danger-soft focus-visible:ring-danger-soft focus-visible:ring-offset-white",
583
- outline: "border border-border text-foreground bg-white hover:bg-accent-soft focus-visible:ring-accent-soft focus-visible:ring-offset-white",
584
- destructive: "bg-danger text-white hover:bg-danger/90 focus-visible:ring-danger-soft focus-visible:ring-offset-white"
585
- },
586
- size: {
587
- sm: "h-12 w-12 min-w-12 min-h-12 text-base",
588
- md: "h-14 w-14 min-w-14 min-h-14 text-lg",
589
- lg: "h-16 w-16 min-w-16 min-h-16 text-xl"
590
- }
591
- },
592
- defaultVariants: {
593
- variant: "primary",
594
- size: "md"
595
- }
596
- }
597
- );
598
- function J(e, r = "1rem") {
599
- const t = S(null), [s, o] = v({}), [a, g] = v("fixed bottom-4 right-4"), i = y(() => {
600
- const c = t.current;
601
- if (!c) return;
602
- const m = c.getBoundingClientRect().height > window.innerHeight;
603
- let h = {}, p = "";
604
- m ? (h = {
605
- position: "fixed",
606
- bottom: r,
607
- zIndex: 50,
608
- transform: `translateY(${c.scrollTop}px)`
609
- }, p = `fixed bottom-4 ${e}-4`) : (h = {
610
- position: "fixed",
611
- bottom: r,
612
- zIndex: 50
613
- }, p = `fixed bottom-4 ${e}-4`), o(h), g(p);
614
- }, [e, r]);
615
- return x(() => {
616
- i();
617
- const c = t.current;
618
- return c && c.addEventListener("scroll", i), window.addEventListener("resize", i), () => {
619
- c && c.removeEventListener("scroll", i), window.removeEventListener("resize", i);
620
- };
621
- }, [i]), x(() => {
622
- t.current && i();
623
- }, [e, r, i]), [y(
624
- (c) => {
625
- t.current = c, c && i();
626
- },
627
- [i]
628
- ), s, a];
629
- }
630
- const ge = d(
631
- function({
632
- className: r,
633
- variant: t = "primary",
634
- size: s = "md",
635
- side: o = "right",
636
- offset: a = "1rem",
637
- ...g
638
- }, i) {
639
- const [f, c, w] = J(
640
- o,
641
- a
642
- ), [m, h] = v(!1);
643
- return x(() => {
644
- h(!0);
645
- }, []), /* @__PURE__ */ n.jsx("div", { ref: f, children: /* @__PURE__ */ n.jsx(
646
- "button",
647
- {
648
- ref: i,
649
- type: g.type || "button",
650
- className: l(
651
- G({ variant: t, size: s }),
652
- w,
653
- m && "animate-fab-in",
654
- r
655
- ),
656
- style: c,
657
- ...g
658
- }
659
- ) });
660
- }
661
- ), K = b(
662
- "flex items-center gap-2 px-4 py-2 rounded-sm w-fit relative shadow-sm",
663
- {
664
- variants: {
665
- color: {
666
- success: "text-success-bold bg-success-soft border-l-4 border-success",
667
- info: "text-info-bold bg-info-soft border-l-4 border-info",
668
- warning: "text-warning-bold bg-warning-soft border-l-4 border-warning",
669
- danger: "text-danger-bold bg-danger-soft border-l-4 border-danger"
670
- }
671
- },
672
- defaultVariants: {
673
- color: "success"
674
- }
675
- }
676
- ), Q = ({
677
- children: e,
678
- ...r
679
- }) => /* @__PURE__ */ n.jsx(
680
- "span",
681
- {
682
- className: "flex-1 truncate text-sm",
683
- "data-testid": "snackbar-text",
684
- ...r,
685
- children: e
686
- }
687
- ), U = ({
688
- children: e,
689
- ...r
690
- }) => /* @__PURE__ */ n.jsx("span", { className: "ml-2", "data-testid": "snackbar-action", ...r, children: e }), ue = d(
691
- ({ children: e, action: r, color: t, className: s, ...o }, a) => /* @__PURE__ */ n.jsxs(
692
- "div",
693
- {
694
- ref: a,
695
- role: "status",
696
- "aria-live": "polite",
697
- className: l(K({ color: t }), s),
698
- ...o,
699
- children: [
700
- /* @__PURE__ */ n.jsx(Q, { children: e }),
701
- r && /* @__PURE__ */ n.jsx(U, { children: r })
702
- ]
703
- }
704
- )
705
- ), z = V(null), W = z.Provider;
706
- function N() {
707
- const e = T(z);
708
- if (!e)
709
- throw new Error("Table compound components must be used within <Table>");
710
- return e;
711
- }
712
- const j = (e) => {
713
- if (e < 1 || e > 12)
714
- throw new Error("Column span must be between 1 and 12");
715
- switch (e) {
716
- case 1:
717
- return "grid-cols-1";
718
- case 2:
719
- return "grid-cols-2";
720
- case 3:
721
- return "grid-cols-3";
722
- case 4:
723
- return "grid-cols-4";
724
- case 5:
725
- return "grid-cols-5";
726
- case 6:
727
- return "grid-cols-6";
728
- case 7:
729
- return "grid-cols-7";
730
- case 8:
731
- return "grid-cols-8";
732
- case 9:
733
- return "grid-cols-9";
734
- case 10:
735
- return "grid-cols-10";
736
- case 11:
737
- return "grid-cols-11";
738
- case 12:
739
- return "grid-cols-12";
740
- default:
741
- return "grid-cols-2";
742
- }
743
- }, X = (e) => {
744
- if (e < 1 || e > 12)
745
- throw new Error("Column span must be between 1 and 12");
746
- switch (e) {
747
- case 1:
748
- return "col-span-1";
749
- case 2:
750
- return "col-span-2";
751
- case 3:
752
- return "col-span-3";
753
- case 4:
754
- return "col-span-4";
755
- case 5:
756
- return "col-span-5";
757
- case 6:
758
- return "col-span-6";
759
- case 7:
760
- return "col-span-7";
761
- case 8:
762
- return "col-span-8";
763
- case 9:
764
- return "col-span-9";
765
- case 10:
766
- return "col-span-10";
767
- case 11:
768
- return "col-span-11";
769
- case 12:
770
- return "col-span-12";
771
- default:
772
- return "col-span-2";
773
- }
774
- }, Z = d(
775
- ({ children: e, className: r, ...t }, s) => {
776
- const { maxColumns: o } = N();
777
- return /* @__PURE__ */ n.jsx(
778
- "div",
779
- {
780
- role: "rowgroup",
781
- className: l("bg-neutral-soft", r),
782
- ...t,
783
- ref: s,
784
- children: /* @__PURE__ */ n.jsx(
785
- "div",
786
- {
787
- role: "row",
788
- className: l("grid gap-4", j(o)),
789
- children: e
790
- }
791
- )
792
- }
793
- );
794
- }
795
- ), ee = d(
796
- ({ children: e, className: r, ...t }, s) => /* @__PURE__ */ n.jsx("div", { role: "rowgroup", ref: s, className: l(r), ...t, children: e })
797
- ), re = d(
798
- ({ children: e, className: r, ...t }, s) => {
799
- const { maxColumns: o } = N();
800
- return /* @__PURE__ */ n.jsx(
801
- "div",
802
- {
803
- role: "rowgroup",
804
- className: l("bg-neutral-soft", r),
805
- ...t,
806
- ref: s,
807
- children: /* @__PURE__ */ n.jsx(
808
- "div",
809
- {
810
- role: "row",
811
- className: l("grid gap-4", j(o)),
812
- children: e
813
- }
814
- )
815
- }
816
- );
817
- }
818
- ), te = d(
819
- ({ children: e, className: r, ...t }, s) => {
820
- const { maxColumns: o } = N();
821
- return /* @__PURE__ */ n.jsx(
822
- "div",
823
- {
824
- role: "row",
825
- className: l(
826
- "grid gap-4",
827
- j(o),
828
- "border-b border-border last:border-0",
829
- r
830
- ),
831
- ref: s,
832
- ...t,
833
- children: e
834
- }
835
- );
836
- }
837
- ), se = d(
838
- ({ as: e = "td", span: r, align: t = "left", children: s, className: o, ...a }, g) => {
839
- const i = e === "th" ? "columnheader" : "cell";
840
- let f = "text-left";
841
- return t === "center" ? f = "text-center" : t === "right" && (f = "text-right"), /* @__PURE__ */ n.jsx(
842
- "div",
843
- {
844
- ref: g,
845
- role: i,
846
- className: l(
847
- "px-4 py-2",
848
- "[&:not(:last-child)]:border-r [&:not(:last-child)]:border-border",
849
- X(r),
850
- f,
851
- o
852
- ),
853
- ...a,
854
- children: s
855
- }
856
- );
857
- }
858
- ), oe = d(
859
- ({ children: e, className: r, maxColumns: t = 12, ...s }, o) => {
860
- const a = A(
861
- () => ({ maxColumns: t }),
862
- [t]
863
- );
864
- return /* @__PURE__ */ n.jsx(W, { value: a, children: /* @__PURE__ */ n.jsx(
865
- "div",
866
- {
867
- ref: o,
868
- role: "table",
869
- className: l(
870
- "w-full overflow-x-auto rounded-lg border border-border",
871
- r
872
- ),
873
- ...s,
874
- children: e
875
- }
876
- ) });
877
- }
878
- ), fe = Object.assign(oe, {
879
- Header: Z,
880
- Body: ee,
881
- Footer: re,
882
- Row: te,
883
- Column: se
884
- }), ne = b(
885
- // Base classes
886
- "block transition-colors duration-200",
887
- {
888
- variants: {
889
- variant: {
890
- white: "bg-white border border-border",
891
- neutral: "bg-neutral border border-gray-200",
892
- primary: "bg-primary-soft border border-primary",
893
- secondary: "bg-secondary-soft border border-secondary",
894
- tertiary: "bg-tertiary-soft border border-tertiary",
895
- ghost: "bg-transparent border border-ghost",
896
- success: "bg-success-soft border border-success",
897
- info: "bg-info-soft border border-info",
898
- warning: "bg-warning-soft border border-warning",
899
- danger: "bg-danger-soft border border-danger"
900
- },
901
- size: {
902
- xs: "p-2",
903
- sm: "p-3",
904
- md: "p-4",
905
- lg: "p-6",
906
- xl: "p-8"
907
- },
908
- shape: {
909
- rounded: "rounded-lg",
910
- square: "rounded-none"
911
- }
912
- },
913
- defaultVariants: {
914
- variant: "white",
915
- size: "md",
916
- shape: "rounded"
917
- }
918
- }
919
- ), be = d(
920
- ({ variant: e = "white", size: r = "md", shape: t = "rounded", className: s, ...o }, a) => /* @__PURE__ */ n.jsx(
921
- "div",
922
- {
923
- ref: a,
924
- className: l(ne({ variant: e, size: r, shape: t }), s),
925
- ...o
926
- }
927
- )
928
- );
929
- export {
930
- le as A,
931
- P as B,
932
- ue as S,
933
- fe as T,
934
- O as a,
935
- ce as b,
936
- de as c,
937
- ge as d,
938
- be as e
939
- };