@kopexa/theme 1.1.0 → 1.3.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.
Files changed (42) hide show
  1. package/dist/chunk-E5AF4JZZ.mjs +167 -0
  2. package/dist/chunk-HQ27V5V4.mjs +11 -0
  3. package/dist/chunk-IL3JFLE2.mjs +114 -0
  4. package/dist/chunk-SVCFD7RR.mjs +16 -0
  5. package/dist/chunk-U6ONJKJY.mjs +31 -0
  6. package/dist/chunk-YPHFKGNI.mjs +23 -0
  7. package/dist/components/button.d.mts +65 -9
  8. package/dist/components/button.d.ts +65 -9
  9. package/dist/components/button.js +177 -18
  10. package/dist/components/button.mjs +3 -1
  11. package/dist/components/command.d.mts +103 -0
  12. package/dist/components/command.d.ts +103 -0
  13. package/dist/components/command.js +47 -0
  14. package/dist/components/command.mjs +6 -0
  15. package/dist/components/index.d.mts +3 -0
  16. package/dist/components/index.d.ts +3 -0
  17. package/dist/components/index.js +334 -25
  18. package/dist/components/index.mjs +17 -3
  19. package/dist/components/spinner.d.mts +274 -0
  20. package/dist/components/spinner.d.ts +274 -0
  21. package/dist/components/spinner.js +138 -0
  22. package/dist/components/spinner.mjs +6 -0
  23. package/dist/components/tooltip.d.mts +31 -0
  24. package/dist/components/tooltip.d.ts +31 -0
  25. package/dist/components/tooltip.js +40 -0
  26. package/dist/components/tooltip.mjs +6 -0
  27. package/dist/index.css +55 -0
  28. package/dist/index.d.mts +3 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +334 -25
  31. package/dist/index.mjs +17 -3
  32. package/dist/utils/classes.d.mts +7 -0
  33. package/dist/utils/classes.d.ts +7 -0
  34. package/dist/utils/classes.js +36 -0
  35. package/dist/utils/classes.mjs +8 -0
  36. package/dist/utils/variants.d.mts +25 -0
  37. package/dist/utils/variants.d.ts +25 -0
  38. package/dist/utils/variants.js +55 -0
  39. package/dist/utils/variants.mjs +6 -0
  40. package/package.json +3 -2
  41. package/dist/chunk-GSHMDS47.mjs +0 -37
  42. /package/dist/{chunk-BFZUC56W.mjs → chunk-QIGSYUIX.mjs} +0 -0
@@ -21,49 +21,231 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var components_exports = {};
22
22
  __export(components_exports, {
23
23
  button: () => button,
24
+ command: () => command,
24
25
  dialog: () => dialog,
25
26
  drawer: () => drawer,
26
- popover: () => popover
27
+ popover: () => popover,
28
+ spinner: () => spinner,
29
+ tooltip: () => tooltip
27
30
  });
28
31
  module.exports = __toCommonJS(components_exports);
29
32
 
30
33
  // src/components/button.ts
31
34
  var import_tailwind_variants = require("tailwind-variants");
35
+
36
+ // src/utils/classes.ts
37
+ var focusVisibleClasses = [
38
+ "focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
39
+ //"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
40
+ ];
41
+
42
+ // src/utils/variants.ts
43
+ var solid = {
44
+ primary: "bg-primary text-primary-foreground",
45
+ secondary: "bg-secondary text-secondary-foreground",
46
+ destructive: "bg-destructive text-destructive-foreground",
47
+ warning: "bg-warning text-warning-foreground",
48
+ success: "bg-success text-success-foreground"
49
+ };
50
+ var outline = {
51
+ primary: "bg-transparent border-primary text-primary",
52
+ secondary: "bg-transparent border-secondary text-secondary",
53
+ destructive: "bg-transparent border-destructive text-destructive",
54
+ warning: "bg-transparent border-warning text-warning",
55
+ success: "bg-transparent border-success text-success"
56
+ };
57
+ var ghost = {
58
+ primary: "bg-transparent text-primary",
59
+ secondary: "bg-transparent text-secondary",
60
+ destructive: "bg-transparent text-destructive",
61
+ warning: "bg-transparent text-warning",
62
+ success: "bg-transparent text-success"
63
+ };
64
+ var colorVariants = {
65
+ solid,
66
+ ghost,
67
+ outline
68
+ };
69
+
70
+ // src/components/button.ts
32
71
  var button = (0, import_tailwind_variants.tv)({
33
72
  base: [
34
- "relative inline-flex group items-center justify-center select-none",
35
- "box-border appearance-none min-w-max subpixel-antialiased overflow-hidden cursor-pointer",
36
- "gap-2",
37
- "whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
38
- "shrink-0 [&_svg]:shrink-0 outline-none",
39
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
40
- "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
73
+ "group relative inline-flex items-center justify-center select-none",
74
+ "box-border appearance-none",
75
+ "whitespace-nowrap min-w-max font-normal subpixel-antialiased",
76
+ "transform-gpu cursor-pointer hover:opacity-80",
77
+ ...focusVisibleClasses,
78
+ // shadcn below
79
+ "disabled:pointer-events-none disabled:opacity-50",
80
+ "shrink-0 [&_svg]:shrink-0",
81
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
41
82
  "text-sm font-medium"
42
83
  ],
43
84
  variants: {
44
85
  variant: {
45
- solid: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
46
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
47
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
48
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
49
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
50
- link: "text-primary underline-offset-4 hover:underline"
86
+ solid: "shadow-xs",
87
+ ghost: "",
88
+ outline: "border-2 bg-transparent",
89
+ link: ""
90
+ // destructive:
91
+ // "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
92
+ // outline:
93
+ // "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
94
+ // secondary:
95
+ // "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
96
+ // ghost:
97
+ // "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
98
+ // link: "text-primary underline-offset-4 hover:underline",
51
99
  },
52
100
  size: {
53
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
54
- md: "h-9 px-4 py-2 has-[>svg]:px-3",
55
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4"
101
+ sm: "px-3 min-w-16 h-8 text-xs gap-2 rounded-sm has-[>svg]:px-2.5",
102
+ md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md has-[>svg]:px-3",
103
+ lg: "px-6 min-w-24 h-12 text-base gap-3 rounded-lg has-[>svg]:px-4"
104
+ },
105
+ color: {
106
+ primary: "",
107
+ secondary: "",
108
+ destructive: "",
109
+ warning: "",
110
+ success: ""
111
+ },
112
+ radius: {},
113
+ fullWidth: {
114
+ true: "w-full"
115
+ },
116
+ isIconOnly: {
117
+ true: "px-0 !gap-0",
118
+ false: "[&>svg]:max-w-[theme(spacing.8)]"
56
119
  }
57
120
  },
58
121
  defaultVariants: {
122
+ size: "md",
59
123
  variant: "solid",
60
- size: "sm"
124
+ color: "primary",
125
+ fullWidth: false,
126
+ isIconOnly: false
127
+ },
128
+ compoundVariants: [
129
+ // primary color
130
+ {
131
+ variant: "solid",
132
+ color: "primary",
133
+ class: colorVariants.solid.primary
134
+ },
135
+ {
136
+ variant: "solid",
137
+ color: "secondary",
138
+ class: colorVariants.solid.secondary
139
+ },
140
+ {
141
+ variant: "solid",
142
+ color: "destructive",
143
+ class: colorVariants.solid.destructive
144
+ },
145
+ {
146
+ variant: "solid",
147
+ color: "warning",
148
+ class: colorVariants.solid.warning
149
+ },
150
+ {
151
+ variant: "solid",
152
+ color: "success",
153
+ class: colorVariants.solid.success
154
+ },
155
+ // ghost color
156
+ {
157
+ variant: "ghost",
158
+ color: "primary",
159
+ class: colorVariants.ghost.primary
160
+ },
161
+ {
162
+ variant: "ghost",
163
+ color: "secondary",
164
+ class: colorVariants.ghost.secondary
165
+ },
166
+ {
167
+ variant: "ghost",
168
+ color: "destructive",
169
+ class: colorVariants.ghost.destructive
170
+ },
171
+ {
172
+ variant: "ghost",
173
+ color: "warning",
174
+ class: colorVariants.ghost.warning
175
+ },
176
+ {
177
+ variant: "ghost",
178
+ color: "success",
179
+ class: colorVariants.ghost.success
180
+ },
181
+ // outline color
182
+ {
183
+ variant: "outline",
184
+ color: "primary",
185
+ class: colorVariants.outline.primary
186
+ },
187
+ {
188
+ variant: "outline",
189
+ color: "secondary",
190
+ class: colorVariants.outline.secondary
191
+ },
192
+ {
193
+ variant: "outline",
194
+ color: "destructive",
195
+ class: colorVariants.outline.destructive
196
+ },
197
+ {
198
+ variant: "outline",
199
+ color: "warning",
200
+ class: colorVariants.outline.warning
201
+ },
202
+ {
203
+ variant: "outline",
204
+ color: "success",
205
+ class: colorVariants.outline.success
206
+ },
207
+ // icon
208
+ {
209
+ isIconOnly: true,
210
+ size: "sm",
211
+ class: "min-w-8 w-8 h-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
212
+ },
213
+ {
214
+ isIconOnly: true,
215
+ size: "md",
216
+ class: "min-w-10 w-10 h-10 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
217
+ },
218
+ {
219
+ isIconOnly: true,
220
+ size: "lg",
221
+ class: "min-w-12 w-12 h-12 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-5"
222
+ }
223
+ ]
224
+ });
225
+
226
+ // src/components/command.ts
227
+ var import_tailwind_variants2 = require("tailwind-variants");
228
+ var command = (0, import_tailwind_variants2.tv)({
229
+ slots: {
230
+ root: "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
231
+ inputWrapper: "flex h-9 items-center gap-2 border-b px-3",
232
+ inputIcon: "size-4 shrink-0 opacity-50",
233
+ input: "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
234
+ list: "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
235
+ empty: "py-6 text-center text-sm",
236
+ group: "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
237
+ separator: "bg-border -mx-1 h-px",
238
+ item: "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
239
+ shortcut: "text-muted-foreground ml-auto text-xs tracking-widest",
240
+ header: "flex flex-col items-start justify-between px-3 py-2 border-b",
241
+ title: "text-sm font-semibold",
242
+ description: "text-xs text-muted-foreground"
61
243
  }
62
244
  });
63
245
 
64
246
  // src/components/dialog.ts
65
- var import_tailwind_variants2 = require("tailwind-variants");
66
- var dialog = (0, import_tailwind_variants2.tv)({
247
+ var import_tailwind_variants3 = require("tailwind-variants");
248
+ var dialog = (0, import_tailwind_variants3.tv)({
67
249
  slots: {
68
250
  overlay: ["fixed inset-0 z-50 bg-black/25"],
69
251
  content: [
@@ -153,8 +335,8 @@ var dialog = (0, import_tailwind_variants2.tv)({
153
335
  });
154
336
 
155
337
  // src/components/drawer.ts
156
- var import_tailwind_variants3 = require("tailwind-variants");
157
- var drawer = (0, import_tailwind_variants3.tv)({
338
+ var import_tailwind_variants4 = require("tailwind-variants");
339
+ var drawer = (0, import_tailwind_variants4.tv)({
158
340
  slots: {
159
341
  overlay: dialog.slots.overlay,
160
342
  content: [
@@ -234,8 +416,8 @@ var drawer = (0, import_tailwind_variants3.tv)({
234
416
  });
235
417
 
236
418
  // src/components/popover.ts
237
- var import_tailwind_variants4 = require("tailwind-variants");
238
- var popover = (0, import_tailwind_variants4.tv)({
419
+ var import_tailwind_variants5 = require("tailwind-variants");
420
+ var popover = (0, import_tailwind_variants5.tv)({
239
421
  slots: {
240
422
  content: [
241
423
  "bg-popover text-popover-foreground z-50 w-72",
@@ -244,10 +426,137 @@ var popover = (0, import_tailwind_variants4.tv)({
244
426
  ]
245
427
  }
246
428
  });
429
+
430
+ // src/components/spinner.ts
431
+ var import_tailwind_variants6 = require("tailwind-variants");
432
+ var spinner = (0, import_tailwind_variants6.tv)({
433
+ slots: {
434
+ base: "relative inline-flex flex-col gap-2 items-center justify-center",
435
+ wrapper: "relative flex",
436
+ label: "text-foreground font-regular",
437
+ circle1: "absolute w-full h-full rounded-full",
438
+ circle2: "absolute w-full h-full rounded-full",
439
+ dots: "relative rounded-full mx-auto"
440
+ },
441
+ variants: {
442
+ size: {
443
+ sm: {
444
+ wrapper: "w-5 h-5",
445
+ circle1: "border-2",
446
+ circle2: "border-2",
447
+ dots: "size-1",
448
+ label: "text-small"
449
+ },
450
+ md: {
451
+ wrapper: "w-8 h-8",
452
+ circle1: "border-3",
453
+ circle2: "border-3",
454
+ dots: "size-1.5",
455
+ label: "text-medium"
456
+ },
457
+ lg: {
458
+ wrapper: "w-10 h-10",
459
+ circle1: "border-3",
460
+ circle2: "border-3",
461
+ dots: "size-2",
462
+ label: "text-large"
463
+ }
464
+ },
465
+ color: {
466
+ current: {
467
+ circle1: "border-b-current",
468
+ circle2: "border-b-current",
469
+ dots: "bg-current",
470
+ spinnerBars: "bg-current"
471
+ },
472
+ white: {
473
+ circle1: "border-b-white",
474
+ circle2: "border-b-white",
475
+ dots: "bg-white",
476
+ spinnerBars: "bg-white"
477
+ },
478
+ primary: {
479
+ circle1: "border-b-primary",
480
+ circle2: "border-b-primary",
481
+ dots: "bg-primary",
482
+ spinnerBars: "bg-primary"
483
+ },
484
+ secondary: {
485
+ circle1: "border-b-secondary",
486
+ circle2: "border-b-secondary",
487
+ dots: "bg-secondary",
488
+ spinnerBars: "bg-secondary"
489
+ },
490
+ success: {
491
+ circle1: "border-b-success",
492
+ circle2: "border-b-success",
493
+ dots: "bg-success",
494
+ spinnerBars: "bg-success"
495
+ },
496
+ warning: {
497
+ circle1: "border-b-warning",
498
+ circle2: "border-b-warning",
499
+ dots: "bg-warning",
500
+ spinnerBars: "bg-warning"
501
+ },
502
+ danger: {
503
+ circle1: "border-b-destructive",
504
+ circle2: "border-b-destructive",
505
+ dots: "bg-destructive",
506
+ spinnerBars: "bg-destructive"
507
+ }
508
+ },
509
+ variant: {
510
+ default: {
511
+ circle1: [
512
+ "animate-spinner-ease-spin",
513
+ "border-solid border-t-transparent border-l-transparent border-r-transparent"
514
+ ],
515
+ circle2: [
516
+ "opacity-75",
517
+ "animate-spinner-linear-spin",
518
+ "border-dotted",
519
+ "border-t-transparent",
520
+ "border-l-transparent",
521
+ "border-r-transparent"
522
+ ]
523
+ },
524
+ wave: {
525
+ wrapper: "translate-y-3/4",
526
+ dots: ["animate-sway", "spinner-dot-animation"]
527
+ },
528
+ dots: {
529
+ wrapper: "translate-y-2/4",
530
+ dots: ["animate-blink", "spinner-dot-blink-animation"]
531
+ }
532
+ }
533
+ },
534
+ defaultVariants: {
535
+ size: "md",
536
+ color: "current",
537
+ variant: "default"
538
+ }
539
+ });
540
+
541
+ // src/components/tooltip.ts
542
+ var import_tailwind_variants7 = require("tailwind-variants");
543
+ var tooltip = (0, import_tailwind_variants7.tv)({
544
+ slots: {
545
+ content: [
546
+ "bg-primary text-primary-foreground",
547
+ "animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
548
+ "z-50 w-fit origin-(--radix-tooltip-content-transform-origin)",
549
+ "rounded-md px-3 py-1.5 text-xs font-medium text-balance"
550
+ ]
551
+ }
552
+ });
247
553
  // Annotate the CommonJS export names for ESM import in node:
248
554
  0 && (module.exports = {
249
555
  button,
556
+ command,
250
557
  dialog,
251
558
  drawer,
252
- popover
559
+ popover,
560
+ spinner,
561
+ tooltip
253
562
  });
@@ -1,7 +1,15 @@
1
- import "../chunk-BFZUC56W.mjs";
1
+ import "../chunk-QIGSYUIX.mjs";
2
+ import {
3
+ tooltip
4
+ } from "../chunk-SVCFD7RR.mjs";
2
5
  import {
3
6
  button
4
- } from "../chunk-GSHMDS47.mjs";
7
+ } from "../chunk-E5AF4JZZ.mjs";
8
+ import "../chunk-HQ27V5V4.mjs";
9
+ import "../chunk-U6ONJKJY.mjs";
10
+ import {
11
+ command
12
+ } from "../chunk-YPHFKGNI.mjs";
5
13
  import {
6
14
  drawer
7
15
  } from "../chunk-V74N5X6Z.mjs";
@@ -11,9 +19,15 @@ import {
11
19
  import {
12
20
  popover
13
21
  } from "../chunk-J35D7RWA.mjs";
22
+ import {
23
+ spinner
24
+ } from "../chunk-IL3JFLE2.mjs";
14
25
  export {
15
26
  button,
27
+ command,
16
28
  dialog,
17
29
  drawer,
18
- popover
30
+ popover,
31
+ spinner,
32
+ tooltip
19
33
  };