@kopexa/theme 1.2.0 → 1.4.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 (36) hide show
  1. package/dist/chunk-E5AF4JZZ.mjs +167 -0
  2. package/dist/chunk-GWY5N4AY.mjs +101 -0
  3. package/dist/chunk-HQ27V5V4.mjs +11 -0
  4. package/dist/chunk-U6ONJKJY.mjs +31 -0
  5. package/dist/{chunk-EOML76MT.mjs → chunk-YPHFKGNI.mjs} +4 -1
  6. package/dist/components/button.d.mts +65 -9
  7. package/dist/components/button.d.ts +65 -9
  8. package/dist/components/button.js +177 -18
  9. package/dist/components/button.mjs +3 -1
  10. package/dist/components/command.d.mts +18 -0
  11. package/dist/components/command.d.ts +18 -0
  12. package/dist/components/command.js +4 -1
  13. package/dist/components/command.mjs +1 -1
  14. package/dist/components/index.d.mts +1 -0
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +287 -25
  17. package/dist/components/index.mjs +12 -6
  18. package/dist/components/page-layout.d.mts +208 -0
  19. package/dist/components/page-layout.d.ts +208 -0
  20. package/dist/components/page-layout.js +125 -0
  21. package/dist/components/page-layout.mjs +6 -0
  22. package/dist/index.d.mts +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +287 -25
  25. package/dist/index.mjs +12 -6
  26. package/dist/utils/classes.d.mts +7 -0
  27. package/dist/utils/classes.d.ts +7 -0
  28. package/dist/utils/classes.js +36 -0
  29. package/dist/utils/classes.mjs +8 -0
  30. package/dist/utils/variants.d.mts +25 -0
  31. package/dist/utils/variants.d.ts +25 -0
  32. package/dist/utils/variants.js +55 -0
  33. package/dist/utils/variants.mjs +6 -0
  34. package/package.json +2 -2
  35. package/dist/chunk-GSHMDS47.mjs +0 -37
  36. /package/dist/{chunk-QIGSYUIX.mjs → chunk-ZKEY52ZF.mjs} +0 -0
@@ -24,36 +24,195 @@ __export(button_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(button_exports);
26
26
  var import_tailwind_variants = require("tailwind-variants");
27
+
28
+ // src/utils/classes.ts
29
+ var focusVisibleClasses = [
30
+ "focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
31
+ //"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
32
+ ];
33
+
34
+ // src/utils/variants.ts
35
+ var solid = {
36
+ primary: "bg-primary text-primary-foreground",
37
+ secondary: "bg-secondary text-secondary-foreground",
38
+ destructive: "bg-destructive text-destructive-foreground",
39
+ warning: "bg-warning text-warning-foreground",
40
+ success: "bg-success text-success-foreground"
41
+ };
42
+ var outline = {
43
+ primary: "bg-transparent border-primary text-primary",
44
+ secondary: "bg-transparent border-secondary text-secondary",
45
+ destructive: "bg-transparent border-destructive text-destructive",
46
+ warning: "bg-transparent border-warning text-warning",
47
+ success: "bg-transparent border-success text-success"
48
+ };
49
+ var ghost = {
50
+ primary: "bg-transparent text-primary",
51
+ secondary: "bg-transparent text-secondary",
52
+ destructive: "bg-transparent text-destructive",
53
+ warning: "bg-transparent text-warning",
54
+ success: "bg-transparent text-success"
55
+ };
56
+ var colorVariants = {
57
+ solid,
58
+ ghost,
59
+ outline
60
+ };
61
+
62
+ // src/components/button.ts
27
63
  var button = (0, import_tailwind_variants.tv)({
28
64
  base: [
29
- "relative inline-flex group items-center justify-center select-none",
30
- "box-border appearance-none min-w-max subpixel-antialiased overflow-hidden cursor-pointer",
31
- "gap-2",
32
- "whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
33
- "shrink-0 [&_svg]:shrink-0 outline-none",
34
- "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",
35
- "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
65
+ "group relative inline-flex items-center justify-center select-none",
66
+ "box-border appearance-none",
67
+ "whitespace-nowrap min-w-max font-normal subpixel-antialiased",
68
+ "transform-gpu cursor-pointer hover:opacity-80",
69
+ ...focusVisibleClasses,
70
+ // shadcn below
71
+ "disabled:pointer-events-none disabled:opacity-50",
72
+ "shrink-0 [&_svg]:shrink-0",
73
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
36
74
  "text-sm font-medium"
37
75
  ],
38
76
  variants: {
39
77
  variant: {
40
- solid: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
41
- 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",
42
- 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",
43
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
44
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
45
- link: "text-primary underline-offset-4 hover:underline"
78
+ solid: "shadow-xs",
79
+ ghost: "",
80
+ outline: "border-2 bg-transparent",
81
+ link: ""
82
+ // destructive:
83
+ // "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",
84
+ // outline:
85
+ // "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
86
+ // secondary:
87
+ // "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
88
+ // ghost:
89
+ // "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
90
+ // link: "text-primary underline-offset-4 hover:underline",
46
91
  },
47
92
  size: {
48
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
49
- md: "h-9 px-4 py-2 has-[>svg]:px-3",
50
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4"
93
+ sm: "px-3 min-w-16 h-8 text-xs gap-2 rounded-sm has-[>svg]:px-2.5",
94
+ md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md has-[>svg]:px-3",
95
+ lg: "px-6 min-w-24 h-12 text-base gap-3 rounded-lg has-[>svg]:px-4"
96
+ },
97
+ color: {
98
+ primary: "",
99
+ secondary: "",
100
+ destructive: "",
101
+ warning: "",
102
+ success: ""
103
+ },
104
+ radius: {},
105
+ fullWidth: {
106
+ true: "w-full"
107
+ },
108
+ isIconOnly: {
109
+ true: "px-0 !gap-0",
110
+ false: "[&>svg]:max-w-[theme(spacing.8)]"
51
111
  }
52
112
  },
53
113
  defaultVariants: {
114
+ size: "md",
54
115
  variant: "solid",
55
- size: "sm"
56
- }
116
+ color: "primary",
117
+ fullWidth: false,
118
+ isIconOnly: false
119
+ },
120
+ compoundVariants: [
121
+ // primary color
122
+ {
123
+ variant: "solid",
124
+ color: "primary",
125
+ class: colorVariants.solid.primary
126
+ },
127
+ {
128
+ variant: "solid",
129
+ color: "secondary",
130
+ class: colorVariants.solid.secondary
131
+ },
132
+ {
133
+ variant: "solid",
134
+ color: "destructive",
135
+ class: colorVariants.solid.destructive
136
+ },
137
+ {
138
+ variant: "solid",
139
+ color: "warning",
140
+ class: colorVariants.solid.warning
141
+ },
142
+ {
143
+ variant: "solid",
144
+ color: "success",
145
+ class: colorVariants.solid.success
146
+ },
147
+ // ghost color
148
+ {
149
+ variant: "ghost",
150
+ color: "primary",
151
+ class: colorVariants.ghost.primary
152
+ },
153
+ {
154
+ variant: "ghost",
155
+ color: "secondary",
156
+ class: colorVariants.ghost.secondary
157
+ },
158
+ {
159
+ variant: "ghost",
160
+ color: "destructive",
161
+ class: colorVariants.ghost.destructive
162
+ },
163
+ {
164
+ variant: "ghost",
165
+ color: "warning",
166
+ class: colorVariants.ghost.warning
167
+ },
168
+ {
169
+ variant: "ghost",
170
+ color: "success",
171
+ class: colorVariants.ghost.success
172
+ },
173
+ // outline color
174
+ {
175
+ variant: "outline",
176
+ color: "primary",
177
+ class: colorVariants.outline.primary
178
+ },
179
+ {
180
+ variant: "outline",
181
+ color: "secondary",
182
+ class: colorVariants.outline.secondary
183
+ },
184
+ {
185
+ variant: "outline",
186
+ color: "destructive",
187
+ class: colorVariants.outline.destructive
188
+ },
189
+ {
190
+ variant: "outline",
191
+ color: "warning",
192
+ class: colorVariants.outline.warning
193
+ },
194
+ {
195
+ variant: "outline",
196
+ color: "success",
197
+ class: colorVariants.outline.success
198
+ },
199
+ // icon
200
+ {
201
+ isIconOnly: true,
202
+ size: "sm",
203
+ class: "min-w-8 w-8 h-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
204
+ },
205
+ {
206
+ isIconOnly: true,
207
+ size: "md",
208
+ class: "min-w-10 w-10 h-10 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
209
+ },
210
+ {
211
+ isIconOnly: true,
212
+ size: "lg",
213
+ class: "min-w-12 w-12 h-12 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-5"
214
+ }
215
+ ]
57
216
  });
58
217
  // Annotate the CommonJS export names for ESM import in node:
59
218
  0 && (module.exports = {
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  button
3
- } from "../chunk-GSHMDS47.mjs";
3
+ } from "../chunk-E5AF4JZZ.mjs";
4
+ import "../chunk-HQ27V5V4.mjs";
5
+ import "../chunk-U6ONJKJY.mjs";
4
6
  export {
5
7
  button
6
8
  };
@@ -14,6 +14,9 @@ declare const command: tailwind_variants.TVReturnType<{
14
14
  separator?: tailwind_variants.ClassValue;
15
15
  item?: tailwind_variants.ClassValue;
16
16
  shortcut?: tailwind_variants.ClassValue;
17
+ header?: tailwind_variants.ClassValue;
18
+ title?: tailwind_variants.ClassValue;
19
+ description?: tailwind_variants.ClassValue;
17
20
  };
18
21
  };
19
22
  } | {
@@ -29,6 +32,9 @@ declare const command: tailwind_variants.TVReturnType<{
29
32
  separator?: tailwind_variants.ClassValue;
30
33
  item?: tailwind_variants.ClassValue;
31
34
  shortcut?: tailwind_variants.ClassValue;
35
+ header?: tailwind_variants.ClassValue;
36
+ title?: tailwind_variants.ClassValue;
37
+ description?: tailwind_variants.ClassValue;
32
38
  };
33
39
  };
34
40
  } | {}, {
@@ -42,6 +48,9 @@ declare const command: tailwind_variants.TVReturnType<{
42
48
  separator: string;
43
49
  item: string;
44
50
  shortcut: string;
51
+ header: string;
52
+ title: string;
53
+ description: string;
45
54
  }, undefined, {
46
55
  [key: string]: {
47
56
  [key: string]: tailwind_variants.ClassValue | {
@@ -55,6 +64,9 @@ declare const command: tailwind_variants.TVReturnType<{
55
64
  separator?: tailwind_variants.ClassValue;
56
65
  item?: tailwind_variants.ClassValue;
57
66
  shortcut?: tailwind_variants.ClassValue;
67
+ header?: tailwind_variants.ClassValue;
68
+ title?: tailwind_variants.ClassValue;
69
+ description?: tailwind_variants.ClassValue;
58
70
  };
59
71
  };
60
72
  } | {}, {
@@ -68,6 +80,9 @@ declare const command: tailwind_variants.TVReturnType<{
68
80
  separator: string;
69
81
  item: string;
70
82
  shortcut: string;
83
+ header: string;
84
+ title: string;
85
+ description: string;
71
86
  }, tailwind_variants.TVReturnType<unknown, {
72
87
  root: string;
73
88
  inputWrapper: string;
@@ -79,6 +94,9 @@ declare const command: tailwind_variants.TVReturnType<{
79
94
  separator: string;
80
95
  item: string;
81
96
  shortcut: string;
97
+ header: string;
98
+ title: string;
99
+ description: string;
82
100
  }, undefined, unknown, unknown, undefined>>;
83
101
  type CommandVariants = VariantProps<typeof command>;
84
102
 
@@ -14,6 +14,9 @@ declare const command: tailwind_variants.TVReturnType<{
14
14
  separator?: tailwind_variants.ClassValue;
15
15
  item?: tailwind_variants.ClassValue;
16
16
  shortcut?: tailwind_variants.ClassValue;
17
+ header?: tailwind_variants.ClassValue;
18
+ title?: tailwind_variants.ClassValue;
19
+ description?: tailwind_variants.ClassValue;
17
20
  };
18
21
  };
19
22
  } | {
@@ -29,6 +32,9 @@ declare const command: tailwind_variants.TVReturnType<{
29
32
  separator?: tailwind_variants.ClassValue;
30
33
  item?: tailwind_variants.ClassValue;
31
34
  shortcut?: tailwind_variants.ClassValue;
35
+ header?: tailwind_variants.ClassValue;
36
+ title?: tailwind_variants.ClassValue;
37
+ description?: tailwind_variants.ClassValue;
32
38
  };
33
39
  };
34
40
  } | {}, {
@@ -42,6 +48,9 @@ declare const command: tailwind_variants.TVReturnType<{
42
48
  separator: string;
43
49
  item: string;
44
50
  shortcut: string;
51
+ header: string;
52
+ title: string;
53
+ description: string;
45
54
  }, undefined, {
46
55
  [key: string]: {
47
56
  [key: string]: tailwind_variants.ClassValue | {
@@ -55,6 +64,9 @@ declare const command: tailwind_variants.TVReturnType<{
55
64
  separator?: tailwind_variants.ClassValue;
56
65
  item?: tailwind_variants.ClassValue;
57
66
  shortcut?: tailwind_variants.ClassValue;
67
+ header?: tailwind_variants.ClassValue;
68
+ title?: tailwind_variants.ClassValue;
69
+ description?: tailwind_variants.ClassValue;
58
70
  };
59
71
  };
60
72
  } | {}, {
@@ -68,6 +80,9 @@ declare const command: tailwind_variants.TVReturnType<{
68
80
  separator: string;
69
81
  item: string;
70
82
  shortcut: string;
83
+ header: string;
84
+ title: string;
85
+ description: string;
71
86
  }, tailwind_variants.TVReturnType<unknown, {
72
87
  root: string;
73
88
  inputWrapper: string;
@@ -79,6 +94,9 @@ declare const command: tailwind_variants.TVReturnType<{
79
94
  separator: string;
80
95
  item: string;
81
96
  shortcut: string;
97
+ header: string;
98
+ title: string;
99
+ description: string;
82
100
  }, undefined, unknown, unknown, undefined>>;
83
101
  type CommandVariants = VariantProps<typeof command>;
84
102
 
@@ -35,7 +35,10 @@ var command = (0, import_tailwind_variants.tv)({
35
35
  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",
36
36
  separator: "bg-border -mx-1 h-px",
37
37
  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",
38
- shortcut: "text-muted-foreground ml-auto text-xs tracking-widest"
38
+ shortcut: "text-muted-foreground ml-auto text-xs tracking-widest",
39
+ header: "flex flex-col items-start justify-between px-3 py-2 border-b",
40
+ title: "text-sm font-semibold",
41
+ description: "text-xs text-muted-foreground"
39
42
  }
40
43
  });
41
44
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  command
3
- } from "../chunk-EOML76MT.mjs";
3
+ } from "../chunk-YPHFKGNI.mjs";
4
4
  export {
5
5
  command
6
6
  };
@@ -2,6 +2,7 @@ export { ButtonVariantProps, button } from './button.mjs';
2
2
  export { CommandVariants, command } from './command.mjs';
3
3
  export { DialogSlots, DialogVariantProps, dialog } from './dialog.mjs';
4
4
  export { DrawerVariantProps, drawer } from './drawer.mjs';
5
+ export { PageLayoutVariantProps, pageLayout } from './page-layout.mjs';
5
6
  export { PopoverVariants, popover } from './popover.mjs';
6
7
  export { SpinnerVariants, spinner } from './spinner.mjs';
7
8
  export { TooltipVariants, tooltip } from './tooltip.mjs';
@@ -2,6 +2,7 @@ export { ButtonVariantProps, button } from './button.js';
2
2
  export { CommandVariants, command } from './command.js';
3
3
  export { DialogSlots, DialogVariantProps, dialog } from './dialog.js';
4
4
  export { DrawerVariantProps, drawer } from './drawer.js';
5
+ export { PageLayoutVariantProps, pageLayout } from './page-layout.js';
5
6
  export { PopoverVariants, popover } from './popover.js';
6
7
  export { SpinnerVariants, spinner } from './spinner.js';
7
8
  export { TooltipVariants, tooltip } from './tooltip.js';