@dimasbaguspm/versaur 0.0.28 → 0.0.30
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/js/{bottom-sheet-tOKkkgJA.js → bottom-sheet-DUcwK0Yd.js} +1 -1
- package/dist/js/{bottom-sheet-input-BIbHW5ME.js → bottom-sheet-input-Bzx0ecmU.js} +629 -722
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-C1zMt0DR.js → image-rectangle-BMEGIW-6.js} +354 -256
- package/dist/js/index.js +43 -41
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +25 -23
- package/dist/js/{tabs-CtPlBMP4.js → tabs-CIWr5hdb.js} +1 -1
- package/dist/js/{tooltip-C_riAXZP.js → tooltip-IazSAgsg.js} +16 -16
- package/dist/js/{top-bar-BqLv8_hy.js → top-bar-BdmaTpTp.js} +179 -166
- package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +2 -3
- package/dist/types/forms/chip-multiple-input/types.d.ts +1 -21
- package/dist/types/forms/chip-single-input/chip-single-input.d.ts +2 -3
- package/dist/types/forms/chip-single-input/types.d.ts +1 -9
- package/dist/types/layouts/page-header/page-header.atoms.d.ts +2 -1
- package/dist/types/layouts/page-header/page-header.d.ts +4 -0
- package/dist/types/layouts/page-header/types.d.ts +6 -0
- package/dist/types/primitive/attribute/attribute.d.ts +10 -0
- package/dist/types/primitive/attribute/index.d.ts +2 -0
- package/dist/types/primitive/attribute/types.d.ts +14 -0
- package/dist/types/primitive/attribute-list/attribute.atoms.d.ts +5 -0
- package/dist/types/primitive/attribute-list/attribute.d.ts +4 -0
- package/dist/types/primitive/attribute-list/index.d.ts +2 -0
- package/dist/types/primitive/attribute-list/types.d.ts +24 -0
- package/dist/types/primitive/card/card.d.ts +1 -1
- package/dist/types/primitive/card/types.d.ts +7 -2
- package/dist/types/primitive/index.d.ts +2 -0
- package/dist/utils/enforce-subpath-import.js +2 -0
- package/package.json +1 -1
|
@@ -241,7 +241,224 @@ const alertVariants = cva(
|
|
|
241
241
|
children: e
|
|
242
242
|
}
|
|
243
243
|
)
|
|
244
|
-
),
|
|
244
|
+
), textVariants = cva("", {
|
|
245
|
+
variants: {
|
|
246
|
+
color: {
|
|
247
|
+
primary: "text-primary",
|
|
248
|
+
secondary: "text-secondary",
|
|
249
|
+
tertiary: "text-tertiary",
|
|
250
|
+
ghost: "text-ghost",
|
|
251
|
+
neutral: "text-ghost",
|
|
252
|
+
success: "text-success",
|
|
253
|
+
info: "text-info",
|
|
254
|
+
warning: "text-warning",
|
|
255
|
+
danger: "text-danger",
|
|
256
|
+
inherit: "",
|
|
257
|
+
gray: "text-gray-500",
|
|
258
|
+
black: "text-black",
|
|
259
|
+
white: "text-white"
|
|
260
|
+
},
|
|
261
|
+
hasUnderline: {
|
|
262
|
+
true: "underline",
|
|
263
|
+
false: ""
|
|
264
|
+
},
|
|
265
|
+
isCapitalize: {
|
|
266
|
+
true: "capitalize",
|
|
267
|
+
false: ""
|
|
268
|
+
},
|
|
269
|
+
align: {
|
|
270
|
+
left: "text-left",
|
|
271
|
+
center: "text-center",
|
|
272
|
+
right: "text-right",
|
|
273
|
+
justify: "text-justify"
|
|
274
|
+
},
|
|
275
|
+
italic: {
|
|
276
|
+
true: "italic",
|
|
277
|
+
false: ""
|
|
278
|
+
},
|
|
279
|
+
clamp: {
|
|
280
|
+
1: "line-clamp-1",
|
|
281
|
+
2: "line-clamp-2",
|
|
282
|
+
3: "line-clamp-3",
|
|
283
|
+
4: "line-clamp-4",
|
|
284
|
+
5: "line-clamp-5",
|
|
285
|
+
none: ""
|
|
286
|
+
},
|
|
287
|
+
ellipsis: {
|
|
288
|
+
true: "truncate",
|
|
289
|
+
false: ""
|
|
290
|
+
},
|
|
291
|
+
as: {
|
|
292
|
+
h1: "font-bold text-4xl leading-loose",
|
|
293
|
+
h2: "font-semibold text-3xl leading-relaxed",
|
|
294
|
+
h3: "font-medium text-2xl leading-relaxed",
|
|
295
|
+
h4: "font-bold text-xl leading-normal",
|
|
296
|
+
h5: "font-semibold text-lg leading-normal",
|
|
297
|
+
h6: "font-medium text-base leading-normal",
|
|
298
|
+
p: "font-normal text-base leading-normal",
|
|
299
|
+
span: "font-normal text-base leading-normal",
|
|
300
|
+
label: "font-normal text-xs leading-normal"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
defaultVariants: {
|
|
304
|
+
color: "neutral",
|
|
305
|
+
hasUnderline: !1,
|
|
306
|
+
isCapitalize: !1,
|
|
307
|
+
align: "left",
|
|
308
|
+
italic: !1,
|
|
309
|
+
clamp: "none",
|
|
310
|
+
ellipsis: !1,
|
|
311
|
+
as: "span"
|
|
312
|
+
}
|
|
313
|
+
}), Text = forwardRef(
|
|
314
|
+
({
|
|
315
|
+
as: e = "span",
|
|
316
|
+
color: t = "ghost",
|
|
317
|
+
hasUnderline: r = !1,
|
|
318
|
+
isCapitalize: s = !1,
|
|
319
|
+
align: i = "left",
|
|
320
|
+
italic: n = !1,
|
|
321
|
+
clamp: o = "none",
|
|
322
|
+
ellipsis: a = !1,
|
|
323
|
+
fontSize: l,
|
|
324
|
+
fontWeight: c,
|
|
325
|
+
className: h,
|
|
326
|
+
children: b,
|
|
327
|
+
...d
|
|
328
|
+
}, p) => {
|
|
329
|
+
const f = [
|
|
330
|
+
"h1",
|
|
331
|
+
"h2",
|
|
332
|
+
"h3",
|
|
333
|
+
"h4",
|
|
334
|
+
"h5",
|
|
335
|
+
"h6",
|
|
336
|
+
"p",
|
|
337
|
+
"span",
|
|
338
|
+
"label"
|
|
339
|
+
].includes(e) ? e : "span", v = l ? `text-${l}` : "", w = c ? `font-${c}` : "";
|
|
340
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
341
|
+
e,
|
|
342
|
+
{
|
|
343
|
+
ref: p,
|
|
344
|
+
className: cn(
|
|
345
|
+
textVariants({
|
|
346
|
+
color: t,
|
|
347
|
+
hasUnderline: r,
|
|
348
|
+
isCapitalize: s,
|
|
349
|
+
align: i,
|
|
350
|
+
italic: n,
|
|
351
|
+
clamp: o,
|
|
352
|
+
ellipsis: a,
|
|
353
|
+
// @ts-expect-error - `as` is not a valid variant
|
|
354
|
+
as: f
|
|
355
|
+
}),
|
|
356
|
+
v,
|
|
357
|
+
w,
|
|
358
|
+
h
|
|
359
|
+
),
|
|
360
|
+
...d,
|
|
361
|
+
children: b
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
), Attribute = forwardRef(
|
|
366
|
+
function({ title: t, children: r, className: s, ...i }, n) {
|
|
367
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: n, className: cn("space-y-1", s), ...i, children: [
|
|
368
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
369
|
+
Text,
|
|
370
|
+
{
|
|
371
|
+
as: "h4",
|
|
372
|
+
fontSize: "sm",
|
|
373
|
+
fontWeight: "normal",
|
|
374
|
+
color: "gray",
|
|
375
|
+
className: "leading-none",
|
|
376
|
+
children: t
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "base", fontWeight: "normal", children: r })
|
|
380
|
+
] });
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
function getColSpan$1(e = 1) {
|
|
384
|
+
switch (e) {
|
|
385
|
+
case 1:
|
|
386
|
+
return "col-span-1";
|
|
387
|
+
case 2:
|
|
388
|
+
return "col-span-2";
|
|
389
|
+
case 3:
|
|
390
|
+
return "col-span-3";
|
|
391
|
+
case 4:
|
|
392
|
+
return "col-span-4";
|
|
393
|
+
case 5:
|
|
394
|
+
return "col-span-5";
|
|
395
|
+
case 6:
|
|
396
|
+
return "col-span-6";
|
|
397
|
+
case 7:
|
|
398
|
+
return "col-span-7";
|
|
399
|
+
case 8:
|
|
400
|
+
return "col-span-8";
|
|
401
|
+
case 9:
|
|
402
|
+
return "col-span-9";
|
|
403
|
+
case 10:
|
|
404
|
+
return "col-span-10";
|
|
405
|
+
case 11:
|
|
406
|
+
return "col-span-11";
|
|
407
|
+
case 12:
|
|
408
|
+
return "col-span-12";
|
|
409
|
+
default:
|
|
410
|
+
return "col-span-1";
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
function getGridCols(e = 4) {
|
|
414
|
+
switch (e) {
|
|
415
|
+
case 1:
|
|
416
|
+
return "grid-cols-1";
|
|
417
|
+
case 2:
|
|
418
|
+
return "grid-cols-2";
|
|
419
|
+
case 3:
|
|
420
|
+
return "grid-cols-3";
|
|
421
|
+
case 4:
|
|
422
|
+
return "grid-cols-4";
|
|
423
|
+
case 5:
|
|
424
|
+
return "grid-cols-5";
|
|
425
|
+
case 6:
|
|
426
|
+
return "grid-cols-6";
|
|
427
|
+
case 7:
|
|
428
|
+
return "grid-cols-7";
|
|
429
|
+
case 8:
|
|
430
|
+
return "grid-cols-8";
|
|
431
|
+
case 9:
|
|
432
|
+
return "grid-cols-9";
|
|
433
|
+
case 10:
|
|
434
|
+
return "grid-cols-10";
|
|
435
|
+
case 11:
|
|
436
|
+
return "grid-cols-11";
|
|
437
|
+
case 12:
|
|
438
|
+
return "grid-cols-12";
|
|
439
|
+
default:
|
|
440
|
+
return "grid-cols-4";
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
const AttributeListItem = forwardRef(function({ children: t, className: r, span: s = 1, title: i, ...n }, o) {
|
|
444
|
+
const a = getColSpan$1(s);
|
|
445
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: o, className: cn(a, r), ...n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Attribute, { title: i, children: t }) });
|
|
446
|
+
}), AttributeListRoot = forwardRef(
|
|
447
|
+
function({ children: t, className: r, columns: s = 4, ...i }, n) {
|
|
448
|
+
const o = getGridCols(s);
|
|
449
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
450
|
+
"ul",
|
|
451
|
+
{
|
|
452
|
+
ref: n,
|
|
453
|
+
className: cn("grid gap-4", o, r),
|
|
454
|
+
...i,
|
|
455
|
+
children: t
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
), AttributeList = Object.assign(AttributeListRoot, {
|
|
460
|
+
Item: AttributeListItem
|
|
461
|
+
}), avatarVariants = cva(
|
|
245
462
|
"inline-flex items-center justify-center font-medium text-white overflow-hidden transition-all duration-200 select-none relative",
|
|
246
463
|
{
|
|
247
464
|
variants: {
|
|
@@ -348,7 +565,7 @@ const alertVariants = cva(
|
|
|
348
565
|
},
|
|
349
566
|
shape: {
|
|
350
567
|
rounded: "rounded-full",
|
|
351
|
-
square: "rounded-
|
|
568
|
+
square: "rounded-xs"
|
|
352
569
|
},
|
|
353
570
|
size: {
|
|
354
571
|
sm: "text-xs px-1 py-0.25 h-3",
|
|
@@ -365,47 +582,47 @@ const alertVariants = cva(
|
|
|
365
582
|
{
|
|
366
583
|
variant: "default",
|
|
367
584
|
color: "primary",
|
|
368
|
-
className: "bg-primary-light text-primary"
|
|
585
|
+
className: "bg-primary-light/60 text-primary"
|
|
369
586
|
},
|
|
370
587
|
{
|
|
371
588
|
variant: "default",
|
|
372
589
|
color: "secondary",
|
|
373
|
-
className: "bg-secondary-light text-secondary"
|
|
590
|
+
className: "bg-secondary-light/70 text-secondary"
|
|
374
591
|
},
|
|
375
592
|
{
|
|
376
593
|
variant: "default",
|
|
377
594
|
color: "tertiary",
|
|
378
|
-
className: "bg-tertiary-light text-tertiary"
|
|
595
|
+
className: "bg-tertiary-light/50 text-tertiary"
|
|
379
596
|
},
|
|
380
597
|
{
|
|
381
598
|
variant: "default",
|
|
382
599
|
color: "ghost",
|
|
383
|
-
className: "bg-ghost
|
|
600
|
+
className: "bg-ghost/05 text-ghost"
|
|
384
601
|
},
|
|
385
602
|
{
|
|
386
603
|
variant: "default",
|
|
387
604
|
color: "neutral",
|
|
388
|
-
className: "bg-neutral text-foreground"
|
|
605
|
+
className: "bg-neutral-light text-foreground"
|
|
389
606
|
},
|
|
390
607
|
{
|
|
391
608
|
variant: "default",
|
|
392
609
|
color: "success",
|
|
393
|
-
className: "bg-success-light text-success"
|
|
610
|
+
className: "bg-success-light/40 text-success"
|
|
394
611
|
},
|
|
395
612
|
{
|
|
396
613
|
variant: "default",
|
|
397
614
|
color: "info",
|
|
398
|
-
className: "bg-info-light text-info"
|
|
615
|
+
className: "bg-info-light/50 text-info"
|
|
399
616
|
},
|
|
400
617
|
{
|
|
401
618
|
variant: "default",
|
|
402
619
|
color: "warning",
|
|
403
|
-
className: "bg-warning-light text-warning"
|
|
620
|
+
className: "bg-warning-light/50 text-warning"
|
|
404
621
|
},
|
|
405
622
|
{
|
|
406
623
|
variant: "default",
|
|
407
624
|
color: "danger",
|
|
408
|
-
className: "bg-danger-light text-danger"
|
|
625
|
+
className: "bg-danger-light/40 text-danger"
|
|
409
626
|
},
|
|
410
627
|
// Outline variant color combinations
|
|
411
628
|
{
|
|
@@ -520,9 +737,7 @@ const alertVariants = cva(
|
|
|
520
737
|
}
|
|
521
738
|
);
|
|
522
739
|
}
|
|
523
|
-
)
|
|
524
|
-
Badge.displayName = "Badge";
|
|
525
|
-
const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("rect", { width: 32, height: 32, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), SvgSpenicleRounded = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("rect", { width: 32, height: 32, rx: 8, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), SvgSpenicleCircle = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("circle", { cx: 16, cy: 16, r: 16, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), brandSizeClass = cva("", {
|
|
740
|
+
), SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("rect", { width: 32, height: 32, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), SvgSpenicleRounded = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("rect", { width: 32, height: 32, rx: 8, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), SvgSpenicleCircle = (e) => /* @__PURE__ */ React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ React.createElement("title", null, "Spenicle"), /* @__PURE__ */ React.createElement("circle", { cx: 16, cy: 16, r: 16, fill: "#e07a5f" }), /* @__PURE__ */ React.createElement("g", { transform: "translate(16, 16) scale(0.625) translate(-12, -12)" }, /* @__PURE__ */ React.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" }))), brandSizeClass = cva("", {
|
|
526
741
|
variants: {
|
|
527
742
|
size: {
|
|
528
743
|
xs: "h-6 w-6",
|
|
@@ -577,7 +792,7 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
|
|
|
577
792
|
"secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary hover:text-white focus-visible:ring-secondary-light focus-visible:ring-offset-white transition-all",
|
|
578
793
|
"tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary hover:text-white focus-visible:ring-tertiary-light focus-visible:ring-offset-white transition-all",
|
|
579
794
|
"ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost hover:text-white focus-visible:ring-ghost-light focus-visible:ring-offset-white transition-all",
|
|
580
|
-
"neutral-outline": "border border-
|
|
795
|
+
"neutral-outline": "border border-border text-foreground bg-white hover:bg-neutral hover:text-foreground focus-visible:ring-foreground-light focus-visible:ring-offset-white transition-all",
|
|
581
796
|
// Ghost variants (subtle)
|
|
582
797
|
"primary-ghost": "text-primary bg-white hover:bg-primary/20 focus-visible:ring-primary focus-visible:ring-offset-white",
|
|
583
798
|
"secondary-ghost": "text-secondary bg-white hover:bg-secondary/20 focus-visible:ring-secondary focus-visible:ring-offset-white",
|
|
@@ -670,7 +885,7 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
|
|
|
670
885
|
"secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary hover:text-white focus-visible:ring-secondary-light focus-visible:ring-offset-white transition-all",
|
|
671
886
|
"tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary hover:text-white focus-visible:ring-tertiary-light focus-visible:ring-offset-white transition-all",
|
|
672
887
|
"ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost hover:text-white focus-visible:ring-ghost-light focus-visible:ring-offset-white transition-all",
|
|
673
|
-
"neutral-outline": "border border-
|
|
888
|
+
"neutral-outline": "border border-border text-foreground bg-white hover:bg-neutral hover:text-foreground focus-visible:ring-foreground-light focus-visible:ring-offset-white transition-all",
|
|
674
889
|
"primary-ghost": "text-primary bg-white hover:bg-primary/20 focus-visible:ring-primary focus-visible:ring-offset-white",
|
|
675
890
|
"secondary-ghost": "text-secondary bg-white hover:bg-secondary/20 focus-visible:ring-secondary focus-visible:ring-offset-white",
|
|
676
891
|
"tertiary-ghost": "text-tertiary bg-white hover:bg-tertiary/20 focus-visible:ring-tertiary focus-visible:ring-offset-white",
|
|
@@ -706,9 +921,9 @@ function useFloatingPosition(e, t = "1rem") {
|
|
|
706
921
|
const r = useRef(null), [s, i] = useState({}), [n, o] = useState("fixed bottom-4 right-4"), a = useCallback(() => {
|
|
707
922
|
const c = r.current;
|
|
708
923
|
if (!c) return;
|
|
709
|
-
const
|
|
924
|
+
const b = c.getBoundingClientRect().height > window.innerHeight;
|
|
710
925
|
let d = {}, p = "";
|
|
711
|
-
|
|
926
|
+
b ? (d = {
|
|
712
927
|
position: "fixed",
|
|
713
928
|
bottom: t,
|
|
714
929
|
zIndex: 50,
|
|
@@ -743,10 +958,10 @@ const ButtonFloat = forwardRef(
|
|
|
743
958
|
offset: n = "1rem",
|
|
744
959
|
...o
|
|
745
960
|
}, a) {
|
|
746
|
-
const [l, c,
|
|
961
|
+
const [l, c, h] = useFloatingPosition(
|
|
747
962
|
i,
|
|
748
963
|
n
|
|
749
|
-
), [
|
|
964
|
+
), [b, d] = useState(!1);
|
|
750
965
|
return useEffect(() => {
|
|
751
966
|
d(!0);
|
|
752
967
|
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: l, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -756,8 +971,8 @@ const ButtonFloat = forwardRef(
|
|
|
756
971
|
type: o.type || "button",
|
|
757
972
|
className: cn(
|
|
758
973
|
buttonFloatVariants({ variant: r, size: s }),
|
|
759
|
-
|
|
760
|
-
|
|
974
|
+
h,
|
|
975
|
+
b && "animate-fab-in",
|
|
761
976
|
t
|
|
762
977
|
),
|
|
763
978
|
style: c,
|
|
@@ -815,7 +1030,7 @@ const buttonIconVariants = cva(
|
|
|
815
1030
|
"secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary hover:text-white focus-visible:ring-secondary-light focus-visible:ring-offset-white transition-all",
|
|
816
1031
|
"tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary hover:text-white focus-visible:ring-tertiary-light focus-visible:ring-offset-white transition-all",
|
|
817
1032
|
"ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost hover:text-white focus-visible:ring-ghost-light focus-visible:ring-offset-white transition-all",
|
|
818
|
-
"neutral-outline": "border border-
|
|
1033
|
+
"neutral-outline": "border border-border text-foreground bg-white hover:bg-neutral hover:text-foreground focus-visible:ring-foreground-light focus-visible:ring-offset-white transition-all",
|
|
819
1034
|
"primary-ghost": "text-primary bg-white hover:bg-primary/20 focus-visible:ring-primary focus-visible:ring-offset-white",
|
|
820
1035
|
"secondary-ghost": "text-secondary bg-white hover:bg-secondary/20 focus-visible:ring-secondary focus-visible:ring-offset-white",
|
|
821
1036
|
"tertiary-ghost": "text-tertiary bg-white hover:bg-tertiary/20 focus-visible:ring-tertiary focus-visible:ring-offset-white",
|
|
@@ -1075,7 +1290,7 @@ const BUTTONS = [
|
|
|
1075
1290
|
"aria-label": "Calculator input"
|
|
1076
1291
|
}
|
|
1077
1292
|
),
|
|
1078
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((
|
|
1293
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((h, b) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full", children: h.map((d) => d === "⌫" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1079
1294
|
ButtonIcon,
|
|
1080
1295
|
{
|
|
1081
1296
|
as: X,
|
|
@@ -1096,135 +1311,14 @@ const BUTTONS = [
|
|
|
1096
1311
|
children: d
|
|
1097
1312
|
},
|
|
1098
1313
|
d
|
|
1099
|
-
)) },
|
|
1314
|
+
)) }, b)) })
|
|
1100
1315
|
]
|
|
1101
1316
|
}
|
|
1102
1317
|
);
|
|
1103
1318
|
}
|
|
1104
1319
|
);
|
|
1105
1320
|
Calculator.displayName = "Calculator";
|
|
1106
|
-
const
|
|
1107
|
-
variants: {
|
|
1108
|
-
color: {
|
|
1109
|
-
primary: "text-primary",
|
|
1110
|
-
secondary: "text-secondary",
|
|
1111
|
-
tertiary: "text-tertiary",
|
|
1112
|
-
ghost: "text-ghost",
|
|
1113
|
-
neutral: "text-ghost",
|
|
1114
|
-
success: "text-success",
|
|
1115
|
-
info: "text-info",
|
|
1116
|
-
warning: "text-warning",
|
|
1117
|
-
danger: "text-danger",
|
|
1118
|
-
inherit: "",
|
|
1119
|
-
gray: "text-gray-500",
|
|
1120
|
-
black: "text-black",
|
|
1121
|
-
white: "text-white"
|
|
1122
|
-
},
|
|
1123
|
-
hasUnderline: {
|
|
1124
|
-
true: "underline",
|
|
1125
|
-
false: ""
|
|
1126
|
-
},
|
|
1127
|
-
isCapitalize: {
|
|
1128
|
-
true: "capitalize",
|
|
1129
|
-
false: ""
|
|
1130
|
-
},
|
|
1131
|
-
align: {
|
|
1132
|
-
left: "text-left",
|
|
1133
|
-
center: "text-center",
|
|
1134
|
-
right: "text-right",
|
|
1135
|
-
justify: "text-justify"
|
|
1136
|
-
},
|
|
1137
|
-
italic: {
|
|
1138
|
-
true: "italic",
|
|
1139
|
-
false: ""
|
|
1140
|
-
},
|
|
1141
|
-
clamp: {
|
|
1142
|
-
1: "line-clamp-1",
|
|
1143
|
-
2: "line-clamp-2",
|
|
1144
|
-
3: "line-clamp-3",
|
|
1145
|
-
4: "line-clamp-4",
|
|
1146
|
-
5: "line-clamp-5",
|
|
1147
|
-
none: ""
|
|
1148
|
-
},
|
|
1149
|
-
ellipsis: {
|
|
1150
|
-
true: "truncate",
|
|
1151
|
-
false: ""
|
|
1152
|
-
},
|
|
1153
|
-
as: {
|
|
1154
|
-
h1: "font-bold text-4xl leading-loose",
|
|
1155
|
-
h2: "font-semibold text-3xl leading-relaxed",
|
|
1156
|
-
h3: "font-medium text-2xl leading-relaxed",
|
|
1157
|
-
h4: "font-bold text-xl leading-normal",
|
|
1158
|
-
h5: "font-semibold text-lg leading-normal",
|
|
1159
|
-
h6: "font-medium text-base leading-normal",
|
|
1160
|
-
p: "font-normal text-base leading-normal",
|
|
1161
|
-
span: "font-normal text-base leading-normal",
|
|
1162
|
-
label: "font-normal text-xs leading-normal"
|
|
1163
|
-
}
|
|
1164
|
-
},
|
|
1165
|
-
defaultVariants: {
|
|
1166
|
-
color: "neutral",
|
|
1167
|
-
hasUnderline: !1,
|
|
1168
|
-
isCapitalize: !1,
|
|
1169
|
-
align: "left",
|
|
1170
|
-
italic: !1,
|
|
1171
|
-
clamp: "none",
|
|
1172
|
-
ellipsis: !1,
|
|
1173
|
-
as: "span"
|
|
1174
|
-
}
|
|
1175
|
-
}), Text = forwardRef(
|
|
1176
|
-
({
|
|
1177
|
-
as: e = "span",
|
|
1178
|
-
color: t = "ghost",
|
|
1179
|
-
hasUnderline: r = !1,
|
|
1180
|
-
isCapitalize: s = !1,
|
|
1181
|
-
align: i = "left",
|
|
1182
|
-
italic: n = !1,
|
|
1183
|
-
clamp: o = "none",
|
|
1184
|
-
ellipsis: a = !1,
|
|
1185
|
-
fontSize: l,
|
|
1186
|
-
fontWeight: c,
|
|
1187
|
-
className: x,
|
|
1188
|
-
children: h,
|
|
1189
|
-
...d
|
|
1190
|
-
}, p) => {
|
|
1191
|
-
const f = [
|
|
1192
|
-
"h1",
|
|
1193
|
-
"h2",
|
|
1194
|
-
"h3",
|
|
1195
|
-
"h4",
|
|
1196
|
-
"h5",
|
|
1197
|
-
"h6",
|
|
1198
|
-
"p",
|
|
1199
|
-
"span",
|
|
1200
|
-
"label"
|
|
1201
|
-
].includes(e) ? e : "span", v = l ? `text-${l}` : "", w = c ? `font-${c}` : "";
|
|
1202
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1203
|
-
e,
|
|
1204
|
-
{
|
|
1205
|
-
ref: p,
|
|
1206
|
-
className: cn(
|
|
1207
|
-
textVariants({
|
|
1208
|
-
color: t,
|
|
1209
|
-
hasUnderline: r,
|
|
1210
|
-
isCapitalize: s,
|
|
1211
|
-
align: i,
|
|
1212
|
-
italic: n,
|
|
1213
|
-
clamp: o,
|
|
1214
|
-
ellipsis: a,
|
|
1215
|
-
// @ts-expect-error - `as` is not a valid variant
|
|
1216
|
-
as: f
|
|
1217
|
-
}),
|
|
1218
|
-
v,
|
|
1219
|
-
w,
|
|
1220
|
-
x
|
|
1221
|
-
),
|
|
1222
|
-
...d,
|
|
1223
|
-
children: h
|
|
1224
|
-
}
|
|
1225
|
-
);
|
|
1226
|
-
}
|
|
1227
|
-
), CalendarContext = createContext(null);
|
|
1321
|
+
const CalendarContext = createContext(null);
|
|
1228
1322
|
function useCalendarContext() {
|
|
1229
1323
|
const e = useContext(CalendarContext);
|
|
1230
1324
|
if (!e)
|
|
@@ -1267,7 +1361,7 @@ const CalendarHeader = () => {
|
|
|
1267
1361
|
] })
|
|
1268
1362
|
] });
|
|
1269
1363
|
}, CalendarWeekdays = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 px-4 text-ghost-500 mb-3", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((e) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fontSize: "xs", color: "ghost", align: "center", children: e }, e)) }), CalendarDaysSingle = () => {
|
|
1270
|
-
const e = useCalendarContext(), { year: t, month: r, value: s, onChange: i, setMonth: n, setYear: o } = e, a = (g, m) => new Date(g, m + 1, 0).getDate(), c = ((g, m) => new Date(g, m, 1).getDay())(t, r),
|
|
1364
|
+
const e = useCalendarContext(), { year: t, month: r, value: s, onChange: i, setMonth: n, setYear: o } = e, a = (g, m) => new Date(g, m + 1, 0).getDate(), c = ((g, m) => new Date(g, m, 1).getDay())(t, r), h = a(t, r), b = r - 1 < 0 ? 11 : r - 1, d = r === 0 ? t - 1 : t, p = a(t, b), y = r === 11 ? 0 : r + 1, f = r === 11 ? t + 1 : t, v = [];
|
|
1271
1365
|
for (let g = 0; g < c; g++) {
|
|
1272
1366
|
const m = p - c + g + 1;
|
|
1273
1367
|
v.push(
|
|
@@ -1279,14 +1373,14 @@ const CalendarHeader = () => {
|
|
|
1279
1373
|
"aria-label": "Previous month day",
|
|
1280
1374
|
variant: "ghost",
|
|
1281
1375
|
onClick: () => {
|
|
1282
|
-
i?.(new Date(d,
|
|
1376
|
+
i?.(new Date(d, b, m)), n(b), o(d);
|
|
1283
1377
|
}
|
|
1284
1378
|
},
|
|
1285
1379
|
"prev-" + g
|
|
1286
1380
|
)
|
|
1287
1381
|
);
|
|
1288
1382
|
}
|
|
1289
|
-
for (let g = 1; g <=
|
|
1383
|
+
for (let g = 1; g <= h; g++) {
|
|
1290
1384
|
const m = s instanceof Date && s.getFullYear() === t && s.getMonth() === r && s.getDate() === g;
|
|
1291
1385
|
v.push(
|
|
1292
1386
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1314,7 +1408,7 @@ const CalendarHeader = () => {
|
|
|
1314
1408
|
)
|
|
1315
1409
|
);
|
|
1316
1410
|
}
|
|
1317
|
-
const w = c +
|
|
1411
|
+
const w = c + h;
|
|
1318
1412
|
for (let g = 0; g < (w % 7 === 0 ? 0 : 7 - w % 7); g++)
|
|
1319
1413
|
v.push(
|
|
1320
1414
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1333,27 +1427,27 @@ const CalendarHeader = () => {
|
|
|
1333
1427
|
);
|
|
1334
1428
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 gap-2 px-4 pb-4", children: v });
|
|
1335
1429
|
}, CalendarDaysRange = () => {
|
|
1336
|
-
const { year: e, month: t, value: r, onChange: s, setMonth: i, setYear: n } = useCalendarContext(), o = (u,
|
|
1430
|
+
const { year: e, month: t, value: r, onChange: s, setMonth: i, setYear: n } = useCalendarContext(), o = (u, x) => new Date(u, x + 1, 0).getDate(), l = ((u, x) => new Date(u, x, 1).getDay())(e, t), c = o(e, t), h = t - 1 < 0 ? 11 : t - 1, b = t === 0 ? e - 1 : e, d = o(e, h), p = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e, f = [], v = () => {
|
|
1337
1431
|
if (!Array.isArray(r)) return [null, null];
|
|
1338
|
-
const [u,
|
|
1339
|
-
return !u && !
|
|
1432
|
+
const [u, x] = r;
|
|
1433
|
+
return !u && !x ? [null, null] : u && x ? u <= x ? [u, x] : [x, u] : [u, x];
|
|
1340
1434
|
}, [w, g] = v(), m = (u) => {
|
|
1341
1435
|
if (!w || !g) return !1;
|
|
1342
|
-
const
|
|
1343
|
-
return
|
|
1436
|
+
const x = new Date(e, t, u);
|
|
1437
|
+
return x >= w && x <= g;
|
|
1344
1438
|
}, S = (u) => w ? w.getFullYear() === e && w.getMonth() === t && w.getDate() === u : !1, I = (u) => g ? g.getFullYear() === e && g.getMonth() === t && g.getDate() === u : !1;
|
|
1345
1439
|
for (let u = 0; u < l; u++) {
|
|
1346
|
-
const
|
|
1440
|
+
const x = d - l + u + 1;
|
|
1347
1441
|
f.push(
|
|
1348
1442
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1349
1443
|
ButtonIcon,
|
|
1350
1444
|
{
|
|
1351
|
-
as: () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "sm", color: "tertiary", children:
|
|
1445
|
+
as: () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "sm", color: "tertiary", children: x }),
|
|
1352
1446
|
size: "sm",
|
|
1353
1447
|
"aria-label": "Previous month day",
|
|
1354
1448
|
variant: "ghost",
|
|
1355
1449
|
onClick: () => {
|
|
1356
|
-
s?.([null, null]), i(
|
|
1450
|
+
s?.([null, null]), i(h), n(b);
|
|
1357
1451
|
}
|
|
1358
1452
|
},
|
|
1359
1453
|
"prev-" + u
|
|
@@ -1361,7 +1455,7 @@ const CalendarHeader = () => {
|
|
|
1361
1455
|
);
|
|
1362
1456
|
}
|
|
1363
1457
|
for (let u = 1; u <= c; u++) {
|
|
1364
|
-
const
|
|
1458
|
+
const x = m(u), E = S(u), C = I(u);
|
|
1365
1459
|
f.push(
|
|
1366
1460
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1367
1461
|
ButtonIcon,
|
|
@@ -1371,16 +1465,16 @@ const CalendarHeader = () => {
|
|
|
1371
1465
|
{
|
|
1372
1466
|
as: "span",
|
|
1373
1467
|
fontSize: "sm",
|
|
1374
|
-
color:
|
|
1468
|
+
color: x || E || C ? "inherit" : "ghost",
|
|
1375
1469
|
className: cn(
|
|
1376
|
-
|
|
1470
|
+
x && " bg-primary text-white",
|
|
1377
1471
|
E && "rounded-l-full bg-primary text-white",
|
|
1378
1472
|
C && "rounded-r-full bg-primary text-white"
|
|
1379
1473
|
),
|
|
1380
1474
|
children: u
|
|
1381
1475
|
}
|
|
1382
1476
|
),
|
|
1383
|
-
variant: E || C ||
|
|
1477
|
+
variant: E || C || x ? "primary" : "ghost",
|
|
1384
1478
|
size: "sm",
|
|
1385
1479
|
"aria-label": `Select ${e}-${t + 1}-${u}`,
|
|
1386
1480
|
"aria-current": E || C ? "date" : void 0,
|
|
@@ -1426,12 +1520,12 @@ function useCalendar({
|
|
|
1426
1520
|
initialYear: s,
|
|
1427
1521
|
initialMonth: i
|
|
1428
1522
|
}) {
|
|
1429
|
-
const [n, o] = useState(i), [a, l] = useState(s), [c,
|
|
1523
|
+
const [n, o] = useState(i), [a, l] = useState(s), [c, h] = useState([
|
|
1430
1524
|
null,
|
|
1431
1525
|
null
|
|
1432
1526
|
]);
|
|
1433
|
-
let
|
|
1434
|
-
t === "range" && !e && (
|
|
1527
|
+
let b = e;
|
|
1528
|
+
t === "range" && !e && (b = c);
|
|
1435
1529
|
const d = useCallback(() => {
|
|
1436
1530
|
const f = n === 0 ? 11 : n - 1, v = n === 0 ? a - 1 : a;
|
|
1437
1531
|
o(f), l(v), t === "single" && r?.(new Date(v, f, 1));
|
|
@@ -1440,14 +1534,14 @@ function useCalendar({
|
|
|
1440
1534
|
o(f), l(v), t === "single" && r?.(new Date(v, f, 1));
|
|
1441
1535
|
}, [n, a, t, r]), y = useCallback(
|
|
1442
1536
|
(f) => {
|
|
1443
|
-
t === "single" ? r?.(f) : t === "range" && (
|
|
1537
|
+
t === "single" ? r?.(f) : t === "range" && (h(f), r?.(f));
|
|
1444
1538
|
},
|
|
1445
1539
|
[t, r]
|
|
1446
1540
|
);
|
|
1447
1541
|
return {
|
|
1448
1542
|
year: a,
|
|
1449
1543
|
month: n,
|
|
1450
|
-
value:
|
|
1544
|
+
value: b,
|
|
1451
1545
|
setMonth: o,
|
|
1452
1546
|
setYear: l,
|
|
1453
1547
|
onChange: y,
|
|
@@ -1489,7 +1583,7 @@ const CalendarRoot = ({
|
|
|
1489
1583
|
}
|
|
1490
1584
|
);
|
|
1491
1585
|
}, Calendar = Object.assign(CalendarRoot, {}), cardVariants = cva(
|
|
1492
|
-
"block transition-colors duration-200 cursor-pointer",
|
|
1586
|
+
"block transition-colors duration-200 cursor-pointer w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-light hover:bg-gray-50",
|
|
1493
1587
|
{
|
|
1494
1588
|
variants: {
|
|
1495
1589
|
size: {
|
|
@@ -1502,57 +1596,18 @@ const CalendarRoot = ({
|
|
|
1502
1596
|
shape: {
|
|
1503
1597
|
rounded: "rounded-lg",
|
|
1504
1598
|
square: "rounded-none"
|
|
1505
|
-
}
|
|
1506
|
-
},
|
|
1507
|
-
defaultVariants: {
|
|
1508
|
-
size: "md",
|
|
1509
|
-
shape: "rounded"
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
), tileVariants = cva(
|
|
1513
|
-
// Base classes
|
|
1514
|
-
"block transition-colors duration-200",
|
|
1515
|
-
{
|
|
1516
|
-
variants: {
|
|
1517
|
-
variant: {
|
|
1518
|
-
white: "bg-white border border-border",
|
|
1519
|
-
neutral: "bg-neutral border border-gray-200",
|
|
1520
|
-
primary: "bg-primary-soft border border-primary",
|
|
1521
|
-
secondary: "bg-secondary-soft border border-secondary",
|
|
1522
|
-
tertiary: "bg-tertiary-soft border border-tertiary",
|
|
1523
|
-
ghost: "bg-transparent border border-ghost",
|
|
1524
|
-
success: "bg-success-soft border border-success",
|
|
1525
|
-
info: "bg-info-soft border border-info",
|
|
1526
|
-
warning: "bg-warning-soft border border-warning",
|
|
1527
|
-
danger: "bg-danger-soft border border-danger"
|
|
1528
|
-
},
|
|
1529
|
-
size: {
|
|
1530
|
-
xs: "p-2",
|
|
1531
|
-
sm: "p-3",
|
|
1532
|
-
md: "p-4",
|
|
1533
|
-
lg: "p-6",
|
|
1534
|
-
xl: "p-8"
|
|
1535
1599
|
},
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1600
|
+
bordered: {
|
|
1601
|
+
true: "border border-border",
|
|
1602
|
+
false: ""
|
|
1539
1603
|
}
|
|
1540
1604
|
},
|
|
1541
1605
|
defaultVariants: {
|
|
1542
|
-
variant: "white",
|
|
1543
1606
|
size: "md",
|
|
1544
|
-
shape: "rounded"
|
|
1607
|
+
shape: "rounded",
|
|
1608
|
+
bordered: !1
|
|
1545
1609
|
}
|
|
1546
1610
|
}
|
|
1547
|
-
), Tile = forwardRef(
|
|
1548
|
-
({ variant: e = "white", size: t = "md", shape: r = "rounded", className: s, ...i }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1549
|
-
"div",
|
|
1550
|
-
{
|
|
1551
|
-
ref: n,
|
|
1552
|
-
className: cn(tileVariants({ variant: e, size: t, shape: r }), s),
|
|
1553
|
-
...i
|
|
1554
|
-
}
|
|
1555
|
-
)
|
|
1556
1611
|
), Card = forwardRef(
|
|
1557
1612
|
({
|
|
1558
1613
|
size: e = "md",
|
|
@@ -1562,14 +1617,15 @@ const CalendarRoot = ({
|
|
|
1562
1617
|
subtitle: i,
|
|
1563
1618
|
badge: n,
|
|
1564
1619
|
supplementaryInfo: o,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1620
|
+
bordered: a = !1,
|
|
1621
|
+
className: l,
|
|
1622
|
+
...c
|
|
1623
|
+
}, h) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1624
|
+
"button",
|
|
1569
1625
|
{
|
|
1570
|
-
ref:
|
|
1571
|
-
className: cn(cardVariants({ size: e, shape: t }),
|
|
1572
|
-
...
|
|
1626
|
+
ref: h,
|
|
1627
|
+
className: cn(cardVariants({ size: e, shape: t, bordered: a }), l),
|
|
1628
|
+
...c,
|
|
1573
1629
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4", children: [
|
|
1574
1630
|
r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r }),
|
|
1575
1631
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
|
|
@@ -1591,25 +1647,25 @@ const CalendarRoot = ({
|
|
|
1591
1647
|
variants: {
|
|
1592
1648
|
variant: {
|
|
1593
1649
|
// Core variants using Versaur color system
|
|
1594
|
-
primary: "bg-primary text-
|
|
1595
|
-
secondary: "bg-secondary text-
|
|
1596
|
-
tertiary: "bg-tertiary text-
|
|
1597
|
-
ghost: "bg-
|
|
1650
|
+
primary: "bg-primary-light text-primary hover:bg-primary-soft focus-visible:ring-primary-light focus-visible:ring-offset-white",
|
|
1651
|
+
secondary: "bg-secondary-light text-secondary hover:bg-secondary-soft focus-visible:ring-secondary-light focus-visible:ring-offset-white",
|
|
1652
|
+
tertiary: "bg-tertiary-light text-tertiary hover:bg-tertiary-soft focus-visible:ring-tertiary-light focus-visible:ring-offset-white",
|
|
1653
|
+
ghost: "bg-white text-foreground hover:bg-ghost-soft focus-visible:ring-ghost-light focus-visible:ring-offset-white",
|
|
1598
1654
|
neutral: "bg-neutral text-foreground hover:bg-neutral/80 focus-visible:ring-foreground-light focus-visible:ring-offset-white",
|
|
1599
1655
|
// Outline variants
|
|
1600
1656
|
"primary-outline": "border border-primary text-primary bg-white hover:bg-primary-soft focus-visible:ring-primary-light focus-visible:ring-offset-white",
|
|
1601
1657
|
"secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary-soft focus-visible:ring-secondary-light focus-visible:ring-offset-white",
|
|
1602
1658
|
"tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary-soft focus-visible:ring-tertiary-light focus-visible:ring-offset-white",
|
|
1603
1659
|
"ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost-soft focus-visible:ring-ghost-light focus-visible:ring-offset-white",
|
|
1604
|
-
"neutral-outline": "border border-
|
|
1660
|
+
"neutral-outline": "border border-border text-foreground bg-white hover:bg-neutral focus-visible:ring-foreground-light focus-visible:ring-offset-white",
|
|
1605
1661
|
// Semantic variants
|
|
1606
|
-
success: "bg-success text-white hover:bg-success/90 focus-visible:ring-success-light focus-visible:ring-offset-white
|
|
1662
|
+
success: "bg-success text-white hover:bg-success/90 focus-visible:ring-success-light focus-visible:ring-offset-white",
|
|
1607
1663
|
"success-outline": "border border-success text-success bg-white hover:bg-success-soft focus-visible:ring-success-light focus-visible:ring-offset-white",
|
|
1608
|
-
info: "bg-info text-white hover:bg-info/90 focus-visible:ring-info-light focus-visible:ring-offset-white
|
|
1664
|
+
info: "bg-info text-white hover:bg-info/90 focus-visible:ring-info-light focus-visible:ring-offset-white",
|
|
1609
1665
|
"info-outline": "border border-info text-info bg-white hover:bg-info-soft focus-visible:ring-info-light focus-visible:ring-offset-white",
|
|
1610
|
-
warning: "bg-warning text-white hover:bg-warning/90 focus-visible:ring-warning-light focus-visible:ring-offset-white
|
|
1666
|
+
warning: "bg-warning text-white hover:bg-warning/90 focus-visible:ring-warning-light focus-visible:ring-offset-white",
|
|
1611
1667
|
"warning-outline": "border border-warning text-warning bg-white hover:bg-warning-soft focus-visible:ring-warning-light focus-visible:ring-offset-white",
|
|
1612
|
-
danger: "bg-danger text-white hover:bg-danger/90 focus-visible:ring-danger-light focus-visible:ring-offset-white
|
|
1668
|
+
danger: "bg-danger text-white hover:bg-danger/90 focus-visible:ring-danger-light focus-visible:ring-offset-white",
|
|
1613
1669
|
"danger-outline": "border border-danger text-danger bg-white hover:bg-danger-soft focus-visible:ring-danger-light focus-visible:ring-offset-white"
|
|
1614
1670
|
},
|
|
1615
1671
|
size: {
|
|
@@ -1655,9 +1711,9 @@ const CalendarRoot = ({
|
|
|
1655
1711
|
{
|
|
1656
1712
|
variants: {
|
|
1657
1713
|
spacing: {
|
|
1658
|
-
sm: "py-8",
|
|
1659
|
-
md: "py-12",
|
|
1660
|
-
lg: "py-16"
|
|
1714
|
+
sm: "py-8 px-4",
|
|
1715
|
+
md: "py-12 px-6",
|
|
1716
|
+
lg: "py-16 px-8"
|
|
1661
1717
|
},
|
|
1662
1718
|
hasGrayBackground: {
|
|
1663
1719
|
true: "bg-neutral-soft",
|
|
@@ -1671,10 +1727,6 @@ const CalendarRoot = ({
|
|
|
1671
1727
|
}
|
|
1672
1728
|
), noResultsHeaderVariants = cva(
|
|
1673
1729
|
"flex flex-row items-center gap-3 mb-2"
|
|
1674
|
-
), noResultsTitleVariants = cva(
|
|
1675
|
-
"text-lg font-semibold text-foreground"
|
|
1676
|
-
), noResultsSubtitleVariants = cva(
|
|
1677
|
-
"text-foreground-light mb-6 max-w-md"
|
|
1678
1730
|
), NoResults = React__default.forwardRef(
|
|
1679
1731
|
function e({ icon: t, title: r, subtitle: s, action: i, className: n, hasGrayBackground: o, ...a }, l) {
|
|
1680
1732
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -1688,9 +1740,9 @@ const CalendarRoot = ({
|
|
|
1688
1740
|
children: [
|
|
1689
1741
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: noResultsHeaderVariants(), children: [
|
|
1690
1742
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: t, size: "lg", color: "ghost", "aria-hidden": "true" }),
|
|
1691
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h2",
|
|
1743
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h2", fontSize: "lg", children: r })
|
|
1692
1744
|
] }),
|
|
1693
|
-
s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", className:
|
|
1745
|
+
s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", align: "center", color: "gray", className: "mb-4", children: s }),
|
|
1694
1746
|
i && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: i })
|
|
1695
1747
|
]
|
|
1696
1748
|
}
|
|
@@ -1901,7 +1953,51 @@ const getTableColumnClass = (e) => {
|
|
|
1901
1953
|
Footer: TableFooter,
|
|
1902
1954
|
Row: TableRow,
|
|
1903
1955
|
RowItem: TableRowItem
|
|
1904
|
-
})
|
|
1956
|
+
}), tileVariants = cva(
|
|
1957
|
+
// Base classes
|
|
1958
|
+
"block transition-colors duration-200",
|
|
1959
|
+
{
|
|
1960
|
+
variants: {
|
|
1961
|
+
variant: {
|
|
1962
|
+
white: "bg-white border border-border",
|
|
1963
|
+
neutral: "bg-neutral border border-gray-200",
|
|
1964
|
+
primary: "bg-primary-soft border border-primary",
|
|
1965
|
+
secondary: "bg-secondary-soft border border-secondary",
|
|
1966
|
+
tertiary: "bg-tertiary-soft border border-tertiary",
|
|
1967
|
+
ghost: "bg-transparent border border-ghost",
|
|
1968
|
+
success: "bg-success-soft border border-success",
|
|
1969
|
+
info: "bg-info-soft border border-info",
|
|
1970
|
+
warning: "bg-warning-soft border border-warning",
|
|
1971
|
+
danger: "bg-danger-soft border border-danger"
|
|
1972
|
+
},
|
|
1973
|
+
size: {
|
|
1974
|
+
xs: "p-2",
|
|
1975
|
+
sm: "p-3",
|
|
1976
|
+
md: "p-4",
|
|
1977
|
+
lg: "p-6",
|
|
1978
|
+
xl: "p-8"
|
|
1979
|
+
},
|
|
1980
|
+
shape: {
|
|
1981
|
+
rounded: "rounded-lg",
|
|
1982
|
+
square: "rounded-none"
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
defaultVariants: {
|
|
1986
|
+
variant: "white",
|
|
1987
|
+
size: "md",
|
|
1988
|
+
shape: "rounded"
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
), Tile = forwardRef(
|
|
1992
|
+
({ variant: e = "white", size: t = "md", shape: r = "rounded", className: s, ...i }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1993
|
+
"div",
|
|
1994
|
+
{
|
|
1995
|
+
ref: n,
|
|
1996
|
+
className: cn(tileVariants({ variant: e, size: t, shape: r }), s),
|
|
1997
|
+
...i
|
|
1998
|
+
}
|
|
1999
|
+
)
|
|
2000
|
+
);
|
|
1905
2001
|
function getColSpan(e = 4) {
|
|
1906
2002
|
switch (e) {
|
|
1907
2003
|
case 1:
|
|
@@ -2089,8 +2185,8 @@ const BaseImage = forwardRef(
|
|
|
2089
2185
|
position: a = "cover",
|
|
2090
2186
|
size: l = "auto",
|
|
2091
2187
|
shape: c,
|
|
2092
|
-
className:
|
|
2093
|
-
...
|
|
2188
|
+
className: h,
|
|
2189
|
+
...b
|
|
2094
2190
|
}, d) => {
|
|
2095
2191
|
const { loaded: p, errored: y, handleLoad: f, handleError: v } = useImage({
|
|
2096
2192
|
src: e
|
|
@@ -2125,7 +2221,7 @@ const BaseImage = forwardRef(
|
|
|
2125
2221
|
size: l,
|
|
2126
2222
|
shape: c
|
|
2127
2223
|
}),
|
|
2128
|
-
|
|
2224
|
+
h
|
|
2129
2225
|
),
|
|
2130
2226
|
onLoad: (m) => {
|
|
2131
2227
|
f(), r?.(m);
|
|
@@ -2133,7 +2229,7 @@ const BaseImage = forwardRef(
|
|
|
2133
2229
|
onError: (m) => {
|
|
2134
2230
|
v(), s?.(m);
|
|
2135
2231
|
},
|
|
2136
|
-
...
|
|
2232
|
+
...b
|
|
2137
2233
|
}
|
|
2138
2234
|
);
|
|
2139
2235
|
}
|
|
@@ -2148,17 +2244,19 @@ export {
|
|
|
2148
2244
|
NoResults as N,
|
|
2149
2245
|
Table as T,
|
|
2150
2246
|
Anchor as a,
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2247
|
+
Attribute as b,
|
|
2248
|
+
AttributeList as c,
|
|
2249
|
+
Avatar as d,
|
|
2250
|
+
Brand as e,
|
|
2251
|
+
Button as f,
|
|
2252
|
+
ButtonFloat as g,
|
|
2253
|
+
ButtonIcon as h,
|
|
2254
|
+
Calendar as i,
|
|
2255
|
+
Card as j,
|
|
2256
|
+
Text as k,
|
|
2257
|
+
Tile as l,
|
|
2258
|
+
ImageCircle as m,
|
|
2259
|
+
ImageSquare as n,
|
|
2260
|
+
ImageRectangle as o,
|
|
2261
|
+
BaseImage as p
|
|
2164
2262
|
};
|