@kopexa/theme 1.4.3 → 1.5.0

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.
@@ -20,8 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/components/index.ts
21
21
  var components_exports = {};
22
22
  __export(components_exports, {
23
+ alertDialog: () => alertDialog,
23
24
  button: () => button,
24
25
  calendar: () => calendar,
26
+ chip: () => chip,
25
27
  command: () => command,
26
28
  dialog: () => dialog,
27
29
  drawer: () => drawer,
@@ -35,8 +37,22 @@ __export(components_exports, {
35
37
  });
36
38
  module.exports = __toCommonJS(components_exports);
37
39
 
38
- // src/components/button.ts
40
+ // src/components/alert-dialog.ts
39
41
  var import_tailwind_variants = require("tailwind-variants");
42
+ var alertDialog = (0, import_tailwind_variants.tv)({
43
+ slots: {
44
+ overlay: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
45
+ content: "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
46
+ header: "flex flex-col gap-2 text-center sm:text-left",
47
+ footer: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
48
+ title: "text-lg font-semibold",
49
+ description: "text-muted-foreground text-sm",
50
+ action: ""
51
+ }
52
+ });
53
+
54
+ // src/components/button.ts
55
+ var import_tailwind_variants2 = require("tailwind-variants");
40
56
 
41
57
  // src/utils/classes.ts
42
58
  var focusVisibleClasses = [
@@ -49,6 +65,7 @@ var focusWithinClasses = [
49
65
 
50
66
  // src/utils/variants.ts
51
67
  var solid = {
68
+ default: "bg-accent text-accent-foreground",
52
69
  primary: "bg-primary text-primary-foreground",
53
70
  secondary: "bg-secondary text-secondary-foreground",
54
71
  destructive: "bg-destructive text-destructive-foreground",
@@ -56,12 +73,31 @@ var solid = {
56
73
  success: "bg-success text-success-foreground"
57
74
  };
58
75
  var outline = {
76
+ default: "bg-transparent border border-accent text-accent-foreground",
59
77
  primary: "bg-transparent border-primary text-primary",
60
- secondary: "bg-transparent border-secondary text-secondary",
78
+ secondary: "bg-transparent border-secondary text-secondary-foreground",
61
79
  destructive: "bg-transparent border-destructive text-destructive",
62
80
  warning: "bg-transparent border-warning text-warning",
63
81
  success: "bg-transparent border-success text-success"
64
82
  };
83
+ var flat = {
84
+ default: "bg-accent/40 text-accent-700",
85
+ primary: "bg-primary/20 text-primary-600",
86
+ secondary: "bg-secondary/20 text-secondary-600",
87
+ success: "bg-success/20 text-success-700 dark:text-success",
88
+ warning: "bg-warning/20 text-warning-700 dark:text-warning",
89
+ destructive: "bg-danger/20 text-danger-600 dark:text-danger-500",
90
+ foreground: "bg-foreground/10 text-foreground"
91
+ };
92
+ var faded = {
93
+ default: "border-default bg-accent/30 text-default-foreground",
94
+ primary: "border-default bg-accent/30 text-primary",
95
+ secondary: "border-default bg-accent/30 text-secondary-foreground",
96
+ success: "border-default bg-accent/30 text-success",
97
+ warning: "border-default bg-accent/30 text-warning",
98
+ destructive: "border-default bg-accent/30 text-danger",
99
+ foreground: "border-default bg-accent/30 text-foreground"
100
+ };
65
101
  var ghost = {
66
102
  primary: "bg-transparent text-primary",
67
103
  secondary: "bg-transparent text-secondary",
@@ -72,11 +108,13 @@ var ghost = {
72
108
  var colorVariants = {
73
109
  solid,
74
110
  ghost,
75
- outline
111
+ outline,
112
+ flat,
113
+ faded
76
114
  };
77
115
 
78
116
  // src/components/button.ts
79
- var button = (0, import_tailwind_variants.tv)({
117
+ var button = (0, import_tailwind_variants2.tv)({
80
118
  base: [
81
119
  "group relative inline-flex items-center justify-center select-none",
82
120
  "box-border appearance-none",
@@ -223,8 +261,8 @@ var button = (0, import_tailwind_variants.tv)({
223
261
  });
224
262
 
225
263
  // src/components/calendar.ts
226
- var import_tailwind_variants2 = require("tailwind-variants");
227
- var calendar = (0, import_tailwind_variants2.tv)({
264
+ var import_tailwind_variants3 = require("tailwind-variants");
265
+ var calendar = (0, import_tailwind_variants3.tv)({
228
266
  slots: {
229
267
  base: [
230
268
  "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
@@ -275,9 +313,326 @@ var calendar = (0, import_tailwind_variants2.tv)({
275
313
  }
276
314
  });
277
315
 
316
+ // src/components/chip.ts
317
+ var import_tailwind_variants4 = require("tailwind-variants");
318
+ var chip = (0, import_tailwind_variants4.tv)({
319
+ slots: {
320
+ root: [
321
+ "relative",
322
+ "max-w-fit",
323
+ "min-w-min",
324
+ "inline-flex",
325
+ "items-center",
326
+ "justify-between",
327
+ "box-border",
328
+ "whitespace-nowrap",
329
+ "isolate"
330
+ ],
331
+ content: "flex-1 text-inherit font-normal",
332
+ indicator: "relative flex size-2 ml-1",
333
+ indicatorPulse: "absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",
334
+ indicatorDot: "relative inline-flex size-2 rounded-full",
335
+ status: "flex items-center gap-2 border-r pr-1 font-medium ml-1",
336
+ closeButton: [
337
+ "z-10 appearance-none outline-none select-none transition-opacity",
338
+ "opacity-70 hover:opacity-100 cursor-pointer active:opacity-50"
339
+ ]
340
+ },
341
+ variants: {
342
+ variant: {
343
+ solid: {},
344
+ bordered: {
345
+ root: "border-2 bg-transparent"
346
+ },
347
+ faded: {
348
+ root: "border-2"
349
+ },
350
+ flat: {}
351
+ },
352
+ color: {
353
+ default: {
354
+ status: "border-default-200 dark:border-default-700"
355
+ },
356
+ primary: {
357
+ status: "border-primary-200 dark:border-primary-700"
358
+ },
359
+ secondary: {
360
+ status: "border-secondary-200 dark:border-secondary-700"
361
+ },
362
+ success: {
363
+ status: "border-success-200 dark:border-success-700"
364
+ },
365
+ destructive: {
366
+ status: "border-destructive-200 dark:border-destructive-700"
367
+ },
368
+ warning: {
369
+ status: "border-warning-200 dark:border-warning-700"
370
+ }
371
+ },
372
+ indicatorColor: {
373
+ default: {
374
+ indicatorDot: "bg-accent"
375
+ },
376
+ primary: {
377
+ indicatorDot: "bg-primary"
378
+ },
379
+ secondary: {
380
+ indicatorDot: "bg-secondary"
381
+ },
382
+ success: {
383
+ indicatorDot: "bg-success"
384
+ },
385
+ warning: {
386
+ indicatorDot: "bg-warning"
387
+ },
388
+ destructive: {
389
+ indicatorDot: "bg-destructive"
390
+ },
391
+ info: {
392
+ indicatorDot: "bg-info"
393
+ }
394
+ },
395
+ indicator: {
396
+ true: {},
397
+ false: {}
398
+ },
399
+ indicatorVariant: {
400
+ pulse: {}
401
+ },
402
+ size: {
403
+ sm: {
404
+ root: "px-1 h-6 text-[11px] [&_svg]:size-3",
405
+ status: "text-[11px]",
406
+ content: "px-1",
407
+ closeButton: ["[&_svg]:size-3", "px-1"]
408
+ },
409
+ md: {
410
+ root: "px-1 h-7 text-sm [&_svg]:size-4",
411
+ status: "text-sm",
412
+ content: "px-2",
413
+ closeButton: ["[&_svg]:size-4", "px-2"]
414
+ },
415
+ lg: {
416
+ root: "px-2 h-8 text-md [&_svg]:size-5",
417
+ status: "text-md",
418
+ content: "px-2",
419
+ closeButton: ["[&_svg]:size-5", "px-2"]
420
+ }
421
+ },
422
+ isCloseable: {
423
+ true: {},
424
+ false: {}
425
+ },
426
+ radius: {
427
+ none: {
428
+ root: "rounded-none"
429
+ },
430
+ sm: {
431
+ root: "rounded-sm"
432
+ },
433
+ md: {
434
+ root: "rounded-md"
435
+ },
436
+ lg: {
437
+ root: "rounded-lg"
438
+ },
439
+ full: {
440
+ root: "rounded-full"
441
+ }
442
+ },
443
+ disabled: {
444
+ true: {
445
+ root: "opacity-50 pointer-events-none"
446
+ },
447
+ false: {}
448
+ }
449
+ },
450
+ defaultVariants: {
451
+ color: "default",
452
+ variant: "solid",
453
+ size: "sm",
454
+ radius: "full",
455
+ indicatorVariant: "pulse",
456
+ indicatorColor: "success"
457
+ },
458
+ compoundVariants: [
459
+ // solid / color
460
+ {
461
+ variant: "solid",
462
+ color: "default",
463
+ class: {
464
+ root: colorVariants.solid.default
465
+ }
466
+ },
467
+ {
468
+ variant: "solid",
469
+ color: "primary",
470
+ class: {
471
+ root: colorVariants.solid.primary
472
+ }
473
+ },
474
+ {
475
+ variant: "solid",
476
+ color: "secondary",
477
+ class: {
478
+ root: colorVariants.solid.secondary
479
+ }
480
+ },
481
+ {
482
+ variant: "solid",
483
+ color: "success",
484
+ class: {
485
+ root: colorVariants.solid.success
486
+ }
487
+ },
488
+ {
489
+ variant: "solid",
490
+ color: "warning",
491
+ class: {
492
+ root: colorVariants.solid.warning
493
+ }
494
+ },
495
+ {
496
+ variant: "solid",
497
+ color: "destructive",
498
+ class: {
499
+ root: colorVariants.solid.destructive
500
+ }
501
+ },
502
+ // bordered / color
503
+ {
504
+ variant: "bordered",
505
+ color: "default",
506
+ class: {
507
+ root: colorVariants.outline.default
508
+ }
509
+ },
510
+ {
511
+ variant: "bordered",
512
+ color: "primary",
513
+ class: {
514
+ root: colorVariants.outline.primary
515
+ }
516
+ },
517
+ {
518
+ variant: "bordered",
519
+ color: "secondary",
520
+ class: {
521
+ root: colorVariants.outline.secondary
522
+ }
523
+ },
524
+ {
525
+ variant: "bordered",
526
+ color: "success",
527
+ class: {
528
+ root: colorVariants.outline.success
529
+ }
530
+ },
531
+ {
532
+ variant: "bordered",
533
+ color: "warning",
534
+ class: {
535
+ root: colorVariants.outline.warning
536
+ }
537
+ },
538
+ {
539
+ variant: "bordered",
540
+ color: "destructive",
541
+ class: {
542
+ root: colorVariants.outline.destructive
543
+ }
544
+ },
545
+ {
546
+ variant: "flat",
547
+ color: "default",
548
+ class: {
549
+ root: colorVariants.flat.default
550
+ }
551
+ },
552
+ {
553
+ variant: "flat",
554
+ color: "primary",
555
+ class: {
556
+ root: colorVariants.flat.primary
557
+ }
558
+ },
559
+ {
560
+ variant: "flat",
561
+ color: "secondary",
562
+ class: {
563
+ root: colorVariants.flat.secondary
564
+ }
565
+ },
566
+ {
567
+ variant: "flat",
568
+ color: "success",
569
+ class: {
570
+ root: colorVariants.flat.success
571
+ }
572
+ },
573
+ {
574
+ variant: "flat",
575
+ color: "warning",
576
+ class: {
577
+ root: colorVariants.flat.warning
578
+ }
579
+ },
580
+ {
581
+ variant: "flat",
582
+ color: "destructive",
583
+ class: {
584
+ root: colorVariants.flat.destructive
585
+ }
586
+ },
587
+ // faded / color
588
+ {
589
+ variant: "faded",
590
+ color: "default",
591
+ class: {
592
+ root: colorVariants.faded.default
593
+ }
594
+ },
595
+ {
596
+ variant: "faded",
597
+ color: "primary",
598
+ class: {
599
+ root: colorVariants.faded.primary
600
+ }
601
+ },
602
+ {
603
+ variant: "faded",
604
+ color: "secondary",
605
+ class: {
606
+ root: colorVariants.faded.secondary
607
+ }
608
+ },
609
+ {
610
+ variant: "faded",
611
+ color: "success",
612
+ class: {
613
+ root: colorVariants.faded.success
614
+ }
615
+ },
616
+ {
617
+ variant: "faded",
618
+ color: "warning",
619
+ class: {
620
+ root: colorVariants.faded.warning
621
+ }
622
+ },
623
+ {
624
+ variant: "faded",
625
+ color: "destructive",
626
+ class: {
627
+ root: colorVariants.faded.destructive
628
+ }
629
+ }
630
+ ]
631
+ });
632
+
278
633
  // src/components/command.ts
279
- var import_tailwind_variants3 = require("tailwind-variants");
280
- var command = (0, import_tailwind_variants3.tv)({
634
+ var import_tailwind_variants5 = require("tailwind-variants");
635
+ var command = (0, import_tailwind_variants5.tv)({
281
636
  slots: {
282
637
  root: "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
283
638
  inputWrapper: "flex h-9 items-center gap-2 border-b px-3",
@@ -296,8 +651,8 @@ var command = (0, import_tailwind_variants3.tv)({
296
651
  });
297
652
 
298
653
  // src/components/dialog.ts
299
- var import_tailwind_variants4 = require("tailwind-variants");
300
- var dialog = (0, import_tailwind_variants4.tv)({
654
+ var import_tailwind_variants6 = require("tailwind-variants");
655
+ var dialog = (0, import_tailwind_variants6.tv)({
301
656
  slots: {
302
657
  overlay: ["fixed inset-0 z-50 bg-black/25"],
303
658
  content: [
@@ -388,8 +743,8 @@ var dialog = (0, import_tailwind_variants4.tv)({
388
743
  });
389
744
 
390
745
  // src/components/drawer.ts
391
- var import_tailwind_variants5 = require("tailwind-variants");
392
- var drawer = (0, import_tailwind_variants5.tv)({
746
+ var import_tailwind_variants7 = require("tailwind-variants");
747
+ var drawer = (0, import_tailwind_variants7.tv)({
393
748
  slots: {
394
749
  overlay: dialog.slots.overlay,
395
750
  content: [
@@ -469,8 +824,8 @@ var drawer = (0, import_tailwind_variants5.tv)({
469
824
  });
470
825
 
471
826
  // src/components/dropdown-menu.ts
472
- var import_tailwind_variants6 = require("tailwind-variants");
473
- var dropdownMenu = (0, import_tailwind_variants6.tv)({
827
+ var import_tailwind_variants8 = require("tailwind-variants");
828
+ var dropdownMenu = (0, import_tailwind_variants8.tv)({
474
829
  slots: {
475
830
  root: "",
476
831
  content: "min-w-56 bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
@@ -490,14 +845,14 @@ var dropdownMenu = (0, import_tailwind_variants6.tv)({
490
845
  });
491
846
 
492
847
  // src/components/input.ts
493
- var import_tailwind_variants7 = require("tailwind-variants");
494
- var passwordInput = (0, import_tailwind_variants7.tv)({
848
+ var import_tailwind_variants9 = require("tailwind-variants");
849
+ var passwordInput = (0, import_tailwind_variants9.tv)({
495
850
  slots: {
496
851
  button: "focus:outline-hidden",
497
852
  icon: "pointer-events-none text-muted-foreground"
498
853
  }
499
854
  });
500
- var input = (0, import_tailwind_variants7.tv)({
855
+ var input = (0, import_tailwind_variants9.tv)({
501
856
  base: [],
502
857
  slots: {
503
858
  inputWrapper: [
@@ -578,8 +933,8 @@ var input = (0, import_tailwind_variants7.tv)({
578
933
  });
579
934
 
580
935
  // src/components/page-layout.ts
581
- var import_tailwind_variants8 = require("tailwind-variants");
582
- var pageLayout = (0, import_tailwind_variants8.tv)({
936
+ var import_tailwind_variants10 = require("tailwind-variants");
937
+ var pageLayout = (0, import_tailwind_variants10.tv)({
583
938
  slots: {
584
939
  root: "",
585
940
  wrapper: "flex mx-auto flex-wrap",
@@ -676,8 +1031,8 @@ var pageLayout = (0, import_tailwind_variants8.tv)({
676
1031
  });
677
1032
 
678
1033
  // src/components/popover.ts
679
- var import_tailwind_variants9 = require("tailwind-variants");
680
- var popover = (0, import_tailwind_variants9.tv)({
1034
+ var import_tailwind_variants11 = require("tailwind-variants");
1035
+ var popover = (0, import_tailwind_variants11.tv)({
681
1036
  slots: {
682
1037
  content: [
683
1038
  "bg-popover text-popover-foreground z-50 w-72",
@@ -688,8 +1043,8 @@ var popover = (0, import_tailwind_variants9.tv)({
688
1043
  });
689
1044
 
690
1045
  // src/components/spinner.ts
691
- var import_tailwind_variants10 = require("tailwind-variants");
692
- var spinner = (0, import_tailwind_variants10.tv)({
1046
+ var import_tailwind_variants12 = require("tailwind-variants");
1047
+ var spinner = (0, import_tailwind_variants12.tv)({
693
1048
  slots: {
694
1049
  base: "relative inline-flex flex-col gap-2 items-center justify-center",
695
1050
  wrapper: "relative flex",
@@ -806,8 +1161,8 @@ var spinner = (0, import_tailwind_variants10.tv)({
806
1161
  });
807
1162
 
808
1163
  // src/components/tooltip.ts
809
- var import_tailwind_variants11 = require("tailwind-variants");
810
- var tooltip = (0, import_tailwind_variants11.tv)({
1164
+ var import_tailwind_variants13 = require("tailwind-variants");
1165
+ var tooltip = (0, import_tailwind_variants13.tv)({
811
1166
  slots: {
812
1167
  content: [
813
1168
  "bg-primary text-primary-foreground",
@@ -819,8 +1174,10 @@ var tooltip = (0, import_tailwind_variants11.tv)({
819
1174
  });
820
1175
  // Annotate the CommonJS export names for ESM import in node:
821
1176
  0 && (module.exports = {
1177
+ alertDialog,
822
1178
  button,
823
1179
  calendar,
1180
+ chip,
824
1181
  command,
825
1182
  dialog,
826
1183
  drawer,
@@ -1,4 +1,7 @@
1
- import "../chunk-HNTFXPSN.mjs";
1
+ import "../chunk-T4WHBNVG.mjs";
2
+ import {
3
+ dropdownMenu
4
+ } from "../chunk-EXBKQDH5.mjs";
2
5
  import {
3
6
  input,
4
7
  passwordInput
@@ -15,14 +18,20 @@ import {
15
18
  import {
16
19
  tooltip
17
20
  } from "../chunk-SVCFD7RR.mjs";
21
+ import {
22
+ alertDialog
23
+ } from "../chunk-CPEP2RO4.mjs";
18
24
  import {
19
25
  button
20
- } from "../chunk-25CHZW25.mjs";
21
- import "../chunk-U6ONJKJY.mjs";
26
+ } from "../chunk-KE2E5LGH.mjs";
22
27
  import "../chunk-2C5EQ4P3.mjs";
23
28
  import {
24
29
  calendar
25
30
  } from "../chunk-JWF5ABNP.mjs";
31
+ import {
32
+ chip
33
+ } from "../chunk-32L6KXLV.mjs";
34
+ import "../chunk-67PPUTSS.mjs";
26
35
  import {
27
36
  command
28
37
  } from "../chunk-YPHFKGNI.mjs";
@@ -32,12 +41,11 @@ import {
32
41
  import {
33
42
  dialog
34
43
  } from "../chunk-5DF3M5JP.mjs";
35
- import {
36
- dropdownMenu
37
- } from "../chunk-EXBKQDH5.mjs";
38
44
  export {
45
+ alertDialog,
39
46
  button,
40
47
  calendar,
48
+ chip,
41
49
  command,
42
50
  dialog,
43
51
  drawer,