@kopexa/theme 1.5.0 → 1.5.2

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.
@@ -21,8 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var components_exports = {};
22
22
  __export(components_exports, {
23
23
  alertDialog: () => alertDialog,
24
+ avatar: () => avatar,
24
25
  button: () => button,
25
26
  calendar: () => calendar,
27
+ card: () => card,
26
28
  chip: () => chip,
27
29
  command: () => command,
28
30
  dialog: () => dialog,
@@ -51,7 +53,7 @@ var alertDialog = (0, import_tailwind_variants.tv)({
51
53
  }
52
54
  });
53
55
 
54
- // src/components/button.ts
56
+ // src/components/avatar.ts
55
57
  var import_tailwind_variants2 = require("tailwind-variants");
56
58
 
57
59
  // src/utils/classes.ts
@@ -62,6 +64,13 @@ var focusVisibleClasses = [
62
64
  var focusWithinClasses = [
63
65
  "focus-within:outline-2 focus-within:outline-ring focus-within:outline-offset-2"
64
66
  ];
67
+ var translateCenterClasses = [
68
+ "absolute",
69
+ "top-1/2",
70
+ "left-1/2",
71
+ "-translate-x-1/2",
72
+ "-translate-y-1/2"
73
+ ];
65
74
 
66
75
  // src/utils/variants.ts
67
76
  var solid = {
@@ -113,8 +122,169 @@ var colorVariants = {
113
122
  faded
114
123
  };
115
124
 
125
+ // src/components/avatar.ts
126
+ var avatar = (0, import_tailwind_variants2.tv)({
127
+ slots: {
128
+ root: [
129
+ "flex",
130
+ "relative",
131
+ "justify-center",
132
+ "items-center",
133
+ "box-border",
134
+ "overflow-hidden",
135
+ "align-middle",
136
+ "text-white",
137
+ "z-0",
138
+ // focus ring
139
+ ...focusVisibleClasses
140
+ ],
141
+ img: [
142
+ "flex",
143
+ "object-cover",
144
+ "w-full",
145
+ "h-full",
146
+ "transition-opacity",
147
+ "!duration-500",
148
+ "opacity-0",
149
+ "data-[status=loaded]:opacity-100"
150
+ ],
151
+ fallback: [
152
+ ...translateCenterClasses,
153
+ "flex",
154
+ "items-center",
155
+ "justify-center"
156
+ ],
157
+ name: [
158
+ ...translateCenterClasses,
159
+ "font-normal",
160
+ "text-center",
161
+ "text-inherit"
162
+ ],
163
+ icon: [
164
+ ...translateCenterClasses,
165
+ "flex",
166
+ "items-center",
167
+ "justify-center",
168
+ "text-inherit",
169
+ "w-full",
170
+ "h-full",
171
+ "opacity-30"
172
+ ]
173
+ },
174
+ variants: {
175
+ size: {
176
+ sm: {
177
+ root: "w-8 h-8 text-tiny"
178
+ },
179
+ md: {
180
+ root: "w-10 h-10 text-tiny"
181
+ },
182
+ lg: {
183
+ root: "w-14 h-14 text-small"
184
+ }
185
+ },
186
+ color: {
187
+ default: {
188
+ root: colorVariants.solid.default
189
+ },
190
+ primary: {
191
+ root: colorVariants.solid.primary
192
+ },
193
+ secondary: {
194
+ root: colorVariants.solid.secondary
195
+ },
196
+ success: {
197
+ root: colorVariants.solid.success
198
+ },
199
+ warning: {
200
+ root: colorVariants.solid.warning
201
+ },
202
+ destructive: {
203
+ root: colorVariants.solid.destructive
204
+ }
205
+ },
206
+ radius: {
207
+ none: {
208
+ root: "rounded-none"
209
+ },
210
+ sm: {
211
+ root: "rounded-sm"
212
+ },
213
+ md: {
214
+ root: "rounded-md"
215
+ },
216
+ lg: {
217
+ root: "rounded-lg"
218
+ },
219
+ full: {
220
+ root: "rounded-full"
221
+ }
222
+ },
223
+ isBordered: {
224
+ true: {
225
+ root: "ring-2 ring-offset-2 ring-offset-background"
226
+ }
227
+ },
228
+ isDisabled: {
229
+ true: {
230
+ root: "opacity-50"
231
+ }
232
+ }
233
+ },
234
+ defaultVariants: {
235
+ size: "md",
236
+ radius: "full",
237
+ color: "default"
238
+ },
239
+ compoundVariants: [
240
+ {
241
+ color: "default",
242
+ isBordered: true,
243
+ class: {
244
+ root: "ring-default"
245
+ }
246
+ },
247
+ {
248
+ color: "primary",
249
+ isBordered: true,
250
+ class: {
251
+ root: "ring-primary"
252
+ }
253
+ },
254
+ {
255
+ color: "secondary",
256
+ isBordered: true,
257
+ class: {
258
+ root: "ring-secondary"
259
+ }
260
+ },
261
+ {
262
+ color: "success",
263
+ isBordered: true,
264
+ class: {
265
+ root: "ring-success"
266
+ }
267
+ },
268
+ {
269
+ color: "warning",
270
+ isBordered: true,
271
+ class: {
272
+ root: "ring-warning"
273
+ }
274
+ },
275
+ {
276
+ color: "destructive",
277
+ isBordered: true,
278
+ class: {
279
+ root: "ring-destructive"
280
+ }
281
+ }
282
+ ]
283
+ });
284
+
116
285
  // src/components/button.ts
117
- var button = (0, import_tailwind_variants2.tv)({
286
+ var import_tailwind_variants3 = require("tailwind-variants");
287
+ var button = (0, import_tailwind_variants3.tv)({
118
288
  base: [
119
289
  "group relative inline-flex items-center justify-center select-none",
120
290
  "box-border appearance-none",
@@ -261,8 +431,8 @@ var button = (0, import_tailwind_variants2.tv)({
261
431
  });
262
432
 
263
433
  // src/components/calendar.ts
264
- var import_tailwind_variants3 = require("tailwind-variants");
265
- var calendar = (0, import_tailwind_variants3.tv)({
434
+ var import_tailwind_variants4 = require("tailwind-variants");
435
+ var calendar = (0, import_tailwind_variants4.tv)({
266
436
  slots: {
267
437
  base: [
268
438
  "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
@@ -313,9 +483,128 @@ var calendar = (0, import_tailwind_variants3.tv)({
313
483
  }
314
484
  });
315
485
 
486
+ // src/components/card.ts
487
+ var import_tailwind_variants5 = require("tailwind-variants");
488
+ var card = (0, import_tailwind_variants5.tv)({
489
+ slots: {
490
+ root: [
491
+ "flex flex-col relative overflow-hidden h-auto outline-hidden text-card-foreground bg-card box-border",
492
+ "border-2 border-transparent"
493
+ ],
494
+ header: [
495
+ "flex",
496
+ "p-3",
497
+ "z-10",
498
+ "w-full",
499
+ "justify-start",
500
+ "items-center",
501
+ "shrink-0",
502
+ "overflow-inherit",
503
+ "color-inherit",
504
+ "subpixel-antialiased"
505
+ ],
506
+ body: [
507
+ "relative",
508
+ "flex",
509
+ "flex-1",
510
+ "w-full",
511
+ "p-3",
512
+ "flex-auto",
513
+ "flex-col",
514
+ "place-content-inherit",
515
+ "align-items-inherit",
516
+ "h-auto",
517
+ "break-words",
518
+ "text-left",
519
+ "overflow-y-auto",
520
+ "subpixel-antialiased"
521
+ ],
522
+ footer: [
523
+ "p-3",
524
+ "h-auto",
525
+ "flex",
526
+ "w-full",
527
+ "items-center",
528
+ "overflow-hidden",
529
+ "color-inherit",
530
+ "subpixel-antialiased"
531
+ ]
532
+ },
533
+ variants: {
534
+ shadow: {
535
+ none: {
536
+ root: "shadow-none"
537
+ },
538
+ sm: {
539
+ root: "shadow-sm"
540
+ },
541
+ md: {
542
+ root: "shadow-md"
543
+ },
544
+ lg: {
545
+ root: "shadow-lg"
546
+ }
547
+ },
548
+ radius: {
549
+ none: {
550
+ root: "rounded-none",
551
+ header: "rounded-none",
552
+ footer: "rounded-none"
553
+ },
554
+ sm: {
555
+ root: "rounded-sm",
556
+ header: "rounded-t-sm",
557
+ footer: "rounded-b-sm"
558
+ },
559
+ md: {
560
+ root: "rounded-md",
561
+ header: "rounded-t-md",
562
+ footer: "rounded-b-md"
563
+ },
564
+ lg: {
565
+ root: "rounded-lg",
566
+ header: "rounded-t-lg",
567
+ footer: "rounded-b-lg"
568
+ }
569
+ },
570
+ fullWidth: {
571
+ true: {
572
+ root: "w-full"
573
+ }
574
+ },
575
+ isHoverable: {
576
+ true: {
577
+ root: "hover:shadow-xl hover:-translate-y-1 transition-all duration-300 hover:border-primary-600"
578
+ }
579
+ },
580
+ isPressable: {
581
+ true: { root: "cursor-pointer" }
582
+ },
583
+ isBlurred: {
584
+ true: {
585
+ root: ["bg-card/80", "backdrop-blur-md", "backdrop-saturate-150"]
586
+ }
587
+ },
588
+ isDisabled: {
589
+ true: {
590
+ root: "opacity-50 cursor-not-allowed pointer-events-none"
591
+ }
592
+ }
593
+ },
594
+ defaultVariants: {
595
+ radius: "lg",
596
+ shadow: "md",
597
+ fullWidth: false,
598
+ isHoverable: false,
599
+ isPressable: false,
600
+ isBlurred: false,
601
+ isDisabled: false
602
+ }
603
+ });
604
+
316
605
  // src/components/chip.ts
317
- var import_tailwind_variants4 = require("tailwind-variants");
318
- var chip = (0, import_tailwind_variants4.tv)({
606
+ var import_tailwind_variants6 = require("tailwind-variants");
607
+ var chip = (0, import_tailwind_variants6.tv)({
319
608
  slots: {
320
609
  root: [
321
610
  "relative",
@@ -631,8 +920,8 @@ var chip = (0, import_tailwind_variants4.tv)({
631
920
  });
632
921
 
633
922
  // src/components/command.ts
634
- var import_tailwind_variants5 = require("tailwind-variants");
635
- var command = (0, import_tailwind_variants5.tv)({
923
+ var import_tailwind_variants7 = require("tailwind-variants");
924
+ var command = (0, import_tailwind_variants7.tv)({
636
925
  slots: {
637
926
  root: "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
638
927
  inputWrapper: "flex h-9 items-center gap-2 border-b px-3",
@@ -651,8 +940,8 @@ var command = (0, import_tailwind_variants5.tv)({
651
940
  });
652
941
 
653
942
  // src/components/dialog.ts
654
- var import_tailwind_variants6 = require("tailwind-variants");
655
- var dialog = (0, import_tailwind_variants6.tv)({
943
+ var import_tailwind_variants8 = require("tailwind-variants");
944
+ var dialog = (0, import_tailwind_variants8.tv)({
656
945
  slots: {
657
946
  overlay: ["fixed inset-0 z-50 bg-black/25"],
658
947
  content: [
@@ -743,8 +1032,8 @@ var dialog = (0, import_tailwind_variants6.tv)({
743
1032
  });
744
1033
 
745
1034
  // src/components/drawer.ts
746
- var import_tailwind_variants7 = require("tailwind-variants");
747
- var drawer = (0, import_tailwind_variants7.tv)({
1035
+ var import_tailwind_variants9 = require("tailwind-variants");
1036
+ var drawer = (0, import_tailwind_variants9.tv)({
748
1037
  slots: {
749
1038
  overlay: dialog.slots.overlay,
750
1039
  content: [
@@ -824,8 +1113,8 @@ var drawer = (0, import_tailwind_variants7.tv)({
824
1113
  });
825
1114
 
826
1115
  // src/components/dropdown-menu.ts
827
- var import_tailwind_variants8 = require("tailwind-variants");
828
- var dropdownMenu = (0, import_tailwind_variants8.tv)({
1116
+ var import_tailwind_variants10 = require("tailwind-variants");
1117
+ var dropdownMenu = (0, import_tailwind_variants10.tv)({
829
1118
  slots: {
830
1119
  root: "",
831
1120
  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",
@@ -845,14 +1134,14 @@ var dropdownMenu = (0, import_tailwind_variants8.tv)({
845
1134
  });
846
1135
 
847
1136
  // src/components/input.ts
848
- var import_tailwind_variants9 = require("tailwind-variants");
849
- var passwordInput = (0, import_tailwind_variants9.tv)({
1137
+ var import_tailwind_variants11 = require("tailwind-variants");
1138
+ var passwordInput = (0, import_tailwind_variants11.tv)({
850
1139
  slots: {
851
1140
  button: "focus:outline-hidden",
852
1141
  icon: "pointer-events-none text-muted-foreground"
853
1142
  }
854
1143
  });
855
- var input = (0, import_tailwind_variants9.tv)({
1144
+ var input = (0, import_tailwind_variants11.tv)({
856
1145
  base: [],
857
1146
  slots: {
858
1147
  inputWrapper: [
@@ -933,8 +1222,8 @@ var input = (0, import_tailwind_variants9.tv)({
933
1222
  });
934
1223
 
935
1224
  // src/components/page-layout.ts
936
- var import_tailwind_variants10 = require("tailwind-variants");
937
- var pageLayout = (0, import_tailwind_variants10.tv)({
1225
+ var import_tailwind_variants12 = require("tailwind-variants");
1226
+ var pageLayout = (0, import_tailwind_variants12.tv)({
938
1227
  slots: {
939
1228
  root: "",
940
1229
  wrapper: "flex mx-auto flex-wrap",
@@ -1031,8 +1320,8 @@ var pageLayout = (0, import_tailwind_variants10.tv)({
1031
1320
  });
1032
1321
 
1033
1322
  // src/components/popover.ts
1034
- var import_tailwind_variants11 = require("tailwind-variants");
1035
- var popover = (0, import_tailwind_variants11.tv)({
1323
+ var import_tailwind_variants13 = require("tailwind-variants");
1324
+ var popover = (0, import_tailwind_variants13.tv)({
1036
1325
  slots: {
1037
1326
  content: [
1038
1327
  "bg-popover text-popover-foreground z-50 w-72",
@@ -1043,8 +1332,8 @@ var popover = (0, import_tailwind_variants11.tv)({
1043
1332
  });
1044
1333
 
1045
1334
  // src/components/spinner.ts
1046
- var import_tailwind_variants12 = require("tailwind-variants");
1047
- var spinner = (0, import_tailwind_variants12.tv)({
1335
+ var import_tailwind_variants14 = require("tailwind-variants");
1336
+ var spinner = (0, import_tailwind_variants14.tv)({
1048
1337
  slots: {
1049
1338
  base: "relative inline-flex flex-col gap-2 items-center justify-center",
1050
1339
  wrapper: "relative flex",
@@ -1161,8 +1450,8 @@ var spinner = (0, import_tailwind_variants12.tv)({
1161
1450
  });
1162
1451
 
1163
1452
  // src/components/tooltip.ts
1164
- var import_tailwind_variants13 = require("tailwind-variants");
1165
- var tooltip = (0, import_tailwind_variants13.tv)({
1453
+ var import_tailwind_variants15 = require("tailwind-variants");
1454
+ var tooltip = (0, import_tailwind_variants15.tv)({
1166
1455
  slots: {
1167
1456
  content: [
1168
1457
  "bg-primary text-primary-foreground",
@@ -1175,8 +1464,10 @@ var tooltip = (0, import_tailwind_variants13.tv)({
1175
1464
  // Annotate the CommonJS export names for ESM import in node:
1176
1465
  0 && (module.exports = {
1177
1466
  alertDialog,
1467
+ avatar,
1178
1468
  button,
1179
1469
  calendar,
1470
+ card,
1180
1471
  chip,
1181
1472
  command,
1182
1473
  dialog,
@@ -1,11 +1,20 @@
1
- import "../chunk-T4WHBNVG.mjs";
1
+ import "../chunk-PWBTAIYS.mjs";
2
+ import {
3
+ tooltip
4
+ } from "../chunk-SVCFD7RR.mjs";
5
+ import {
6
+ drawer
7
+ } from "../chunk-UI2M2MFB.mjs";
8
+ import {
9
+ dialog
10
+ } from "../chunk-5DF3M5JP.mjs";
2
11
  import {
3
12
  dropdownMenu
4
13
  } from "../chunk-EXBKQDH5.mjs";
5
14
  import {
6
15
  input,
7
16
  passwordInput
8
- } from "../chunk-PQSL3W26.mjs";
17
+ } from "../chunk-7CM52H5K.mjs";
9
18
  import {
10
19
  pageLayout
11
20
  } from "../chunk-GQV7INYX.mjs";
@@ -15,19 +24,22 @@ import {
15
24
  import {
16
25
  spinner
17
26
  } from "../chunk-4UDOCFU5.mjs";
18
- import {
19
- tooltip
20
- } from "../chunk-SVCFD7RR.mjs";
21
27
  import {
22
28
  alertDialog
23
29
  } from "../chunk-CPEP2RO4.mjs";
30
+ import {
31
+ avatar
32
+ } from "../chunk-Q5DCJR2X.mjs";
24
33
  import {
25
34
  button
26
- } from "../chunk-KE2E5LGH.mjs";
27
- import "../chunk-2C5EQ4P3.mjs";
35
+ } from "../chunk-BIRJNNEY.mjs";
36
+ import "../chunk-25L2JS6A.mjs";
28
37
  import {
29
38
  calendar
30
39
  } from "../chunk-JWF5ABNP.mjs";
40
+ import {
41
+ card
42
+ } from "../chunk-4VKJFW6Y.mjs";
31
43
  import {
32
44
  chip
33
45
  } from "../chunk-32L6KXLV.mjs";
@@ -35,16 +47,12 @@ import "../chunk-67PPUTSS.mjs";
35
47
  import {
36
48
  command
37
49
  } from "../chunk-YPHFKGNI.mjs";
38
- import {
39
- drawer
40
- } from "../chunk-UI2M2MFB.mjs";
41
- import {
42
- dialog
43
- } from "../chunk-5DF3M5JP.mjs";
44
50
  export {
45
51
  alertDialog,
52
+ avatar,
46
53
  button,
47
54
  calendar,
55
+ card,
48
56
  chip,
49
57
  command,
50
58
  dialog,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  input,
3
3
  passwordInput
4
- } from "../chunk-PQSL3W26.mjs";
5
- import "../chunk-2C5EQ4P3.mjs";
4
+ } from "../chunk-7CM52H5K.mjs";
5
+ import "../chunk-25L2JS6A.mjs";
6
6
  export {
7
7
  input,
8
8
  passwordInput
package/dist/index.css CHANGED
@@ -46,9 +46,9 @@
46
46
  }
47
47
 
48
48
  .dark {
49
- --background: oklch(0.145 0 0);
50
- --foreground: oklch(0.985 0 0);
51
- --card: oklch(0.145 0 0);
49
+ --background: var(--color-primary-950);
50
+ --foreground: var(--color-white);
51
+ --card: var(--color-primary-900);
52
52
  --card-foreground: oklch(0.985 0 0);
53
53
  --popover: oklch(0.145 0 0);
54
54
  --popover-foreground: oklch(0.985 0 0);
@@ -86,7 +86,7 @@
86
86
  --sidebar-ring: oklch(0.439 0 0);
87
87
  }
88
88
 
89
- @theme inline {
89
+ @theme {
90
90
  --color-primary-50: oklch(96.58% 0.016 262.77);
91
91
  --color-primary-100: oklch(92.21% 0.037 262.15);
92
92
  --color-primary-200: oklch(84.55% 0.074 259.28);
package/dist/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { TV, VariantProps } from 'tailwind-variants';
2
2
  export { AlertDialogSlots, AlertDialogVariants, alertDialog } from './components/alert-dialog.mjs';
3
+ export { AvatarSlots, AvatarVariantProps, avatar } from './components/avatar.mjs';
3
4
  export { ButtonVariantProps, button } from './components/button.mjs';
4
5
  export { CalendarVariantProps, calendar } from './components/calendar.mjs';
6
+ export { CardSlots, CardVariantProps, card } from './components/card.mjs';
5
7
  export { ChipSlots, ChipVariantProps, chip } from './components/chip.mjs';
6
8
  export { CommandVariants, command } from './components/command.mjs';
7
9
  export { DialogSlots, DialogVariantProps, dialog } from './components/dialog.mjs';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { TV, VariantProps } from 'tailwind-variants';
2
2
  export { AlertDialogSlots, AlertDialogVariants, alertDialog } from './components/alert-dialog.js';
3
+ export { AvatarSlots, AvatarVariantProps, avatar } from './components/avatar.js';
3
4
  export { ButtonVariantProps, button } from './components/button.js';
4
5
  export { CalendarVariantProps, calendar } from './components/calendar.js';
6
+ export { CardSlots, CardVariantProps, card } from './components/card.js';
5
7
  export { ChipSlots, ChipVariantProps, chip } from './components/chip.js';
6
8
  export { CommandVariants, command } from './components/command.js';
7
9
  export { DialogSlots, DialogVariantProps, dialog } from './components/dialog.js';