@kopexa/theme 0.0.0 → 1.1.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.
@@ -0,0 +1,37 @@
1
+ // src/components/button.ts
2
+ import { tv } from "tailwind-variants";
3
+ var button = tv({
4
+ base: [
5
+ "relative inline-flex group items-center justify-center select-none",
6
+ "box-border appearance-none min-w-max subpixel-antialiased overflow-hidden cursor-pointer",
7
+ "gap-2",
8
+ "whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
9
+ "shrink-0 [&_svg]:shrink-0 outline-none",
10
+ "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",
11
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
12
+ "text-sm font-medium"
13
+ ],
14
+ variants: {
15
+ variant: {
16
+ solid: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
17
+ 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",
18
+ 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",
19
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
20
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
21
+ link: "text-primary underline-offset-4 hover:underline"
22
+ },
23
+ size: {
24
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
25
+ md: "h-9 px-4 py-2 has-[>svg]:px-3",
26
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "solid",
31
+ size: "sm"
32
+ }
33
+ });
34
+
35
+ export {
36
+ button
37
+ };
@@ -0,0 +1,15 @@
1
+ // src/components/popover.ts
2
+ import { tv } from "tailwind-variants";
3
+ var popover = tv({
4
+ slots: {
5
+ content: [
6
+ "bg-popover text-popover-foreground z-50 w-72",
7
+ "origin-(--radix-popover-content-transform-origin)",
8
+ "rounded-md border p-4 shadow-md outline-hidden"
9
+ ]
10
+ }
11
+ });
12
+
13
+ export {
14
+ popover
15
+ };
@@ -0,0 +1,94 @@
1
+ // src/components/dialog.ts
2
+ import { tv } from "tailwind-variants";
3
+ var dialog = tv({
4
+ slots: {
5
+ overlay: ["fixed inset-0 z-50 bg-black/25"],
6
+ content: [
7
+ "bg-background fixed top-[50%] left-[50%] z-50",
8
+ "grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]",
9
+ "gap-4 border shadow-lg",
10
+ // mobile animation vars
11
+ "[--scale-enter:100%]",
12
+ "[--scale-exit:100%]",
13
+ "[--slide-enter:0px]",
14
+ "[--slide-exit:80px]",
15
+ // tablet/desktop animation vars
16
+ "sm:[--scale-enter:100%]",
17
+ "sm:[--scale-exit:103%]",
18
+ "sm:[--slide-enter:0px]",
19
+ "sm:[--slide-exit:0px]"
20
+ ],
21
+ close: [
22
+ "ring-offset-background focus:ring-ring",
23
+ "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
24
+ "absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100",
25
+ "focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
26
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
27
+ ],
28
+ closeTrigger: [],
29
+ header: "flex flex-col gap-1 text-center sm:text-left shrink grow-0 px-6 pt-4",
30
+ footer: "flex flex-col-reverse gap-2 px-6 pt-2 pb-4 sm:flex-row sm:justify-end",
31
+ body: "px-6 py-2 flex-1 overflow-auto",
32
+ title: "text-lg leading-none font-semibold",
33
+ description: "text-muted-foreground text-sm"
34
+ },
35
+ variants: {
36
+ size: {
37
+ xs: {
38
+ content: "sm:max-w-xs"
39
+ },
40
+ sm: {
41
+ content: "sm:max-w-sm"
42
+ },
43
+ md: {
44
+ content: "sm:max-w-md"
45
+ },
46
+ lg: {
47
+ content: "sm:max-w-lg"
48
+ },
49
+ xl: {
50
+ content: "sm:max-w-xl"
51
+ },
52
+ "2xl": {
53
+ content: "sm:max-w-2xl"
54
+ },
55
+ "3xl": {
56
+ content: "sm:max-w-3xl"
57
+ },
58
+ "4xl": {
59
+ content: "sm:max-w-4xl"
60
+ },
61
+ "5xl": {
62
+ content: "sm:max-w-5xl"
63
+ },
64
+ full: {
65
+ content: [
66
+ "my-0 mx:0 sm:mx-0 sm:my-0 max-w-[calc(100%-1rem)] w-full h-[calc(100dvh-1rem)] inset-2",
67
+ "translate-0"
68
+ ]
69
+ }
70
+ },
71
+ placement: { top: {}, bottom: {}, left: {}, right: {} },
72
+ radius: {
73
+ none: "",
74
+ sm: {
75
+ content: "rounded-sm"
76
+ },
77
+ md: {
78
+ content: "rounded-md"
79
+ },
80
+ lg: {
81
+ content: "rounded-lg"
82
+ }
83
+ }
84
+ },
85
+ defaultVariants: {
86
+ size: "md",
87
+ placement: "right",
88
+ radius: "lg"
89
+ }
90
+ });
91
+
92
+ export {
93
+ dialog
94
+ };
@@ -0,0 +1,88 @@
1
+ import {
2
+ dialog
3
+ } from "./chunk-OEVKY5EP.mjs";
4
+
5
+ // src/components/drawer.ts
6
+ import { tv } from "tailwind-variants";
7
+ var drawer = tv({
8
+ slots: {
9
+ overlay: dialog.slots.overlay,
10
+ content: [
11
+ "bg-background fixed z-50 flex flex-col w-full gap-4 shadow-lg max-h-dvh",
12
+ "outline-hidden"
13
+ ],
14
+ close: dialog.slots.close,
15
+ closeTrigger: dialog.slots.closeTrigger,
16
+ header: dialog.slots.header,
17
+ footer: dialog.slots.footer,
18
+ body: dialog.slots.body,
19
+ title: dialog.slots.title,
20
+ description: dialog.slots.description
21
+ },
22
+ variants: {
23
+ size: {
24
+ xs: {
25
+ content: "max-w-xs"
26
+ },
27
+ sm: {
28
+ content: "max-w-sm"
29
+ },
30
+ md: {
31
+ content: "max-w-md"
32
+ },
33
+ lg: {
34
+ content: "max-w-lg"
35
+ },
36
+ xl: {
37
+ content: "max-w-xl"
38
+ },
39
+ "2xl": {
40
+ content: "max-w-2xl"
41
+ },
42
+ "3xl": {
43
+ content: "max-w-3xl"
44
+ },
45
+ "4xl": {
46
+ content: "max-w-4xl"
47
+ },
48
+ "5xl": {
49
+ content: "max-w-5xl"
50
+ },
51
+ "6xl": {
52
+ content: "max-w-6xl"
53
+ },
54
+ full: {
55
+ content: "max-w-full max-h-full h-[calc(100dvh_-_1rem)] inset-2"
56
+ }
57
+ },
58
+ placement: {
59
+ top: {},
60
+ bottom: {},
61
+ left: {},
62
+ right: {
63
+ content: "inset-y-2 me-2 right-0 h-[calc(100%-1rem)] border-l"
64
+ }
65
+ },
66
+ radius: {
67
+ none: "",
68
+ sm: {
69
+ content: "rounded-sm"
70
+ },
71
+ md: {
72
+ content: "rounded-md"
73
+ },
74
+ lg: {
75
+ content: "rounded-lg"
76
+ }
77
+ }
78
+ },
79
+ defaultVariants: {
80
+ placement: "right",
81
+ size: "md",
82
+ radius: "lg"
83
+ }
84
+ });
85
+
86
+ export {
87
+ drawer
88
+ };
@@ -1,14 +1,49 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
2
3
 
3
4
  declare const button: tailwind_variants.TVReturnType<{
4
- variant: {};
5
- size: {};
5
+ variant: {
6
+ solid: string;
7
+ destructive: string;
8
+ outline: string;
9
+ secondary: string;
10
+ ghost: string;
11
+ link: string;
12
+ };
13
+ size: {
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ };
6
18
  }, undefined, string[], {
7
- variant: {};
8
- size: {};
19
+ variant: {
20
+ solid: string;
21
+ destructive: string;
22
+ outline: string;
23
+ secondary: string;
24
+ ghost: string;
25
+ link: string;
26
+ };
27
+ size: {
28
+ sm: string;
29
+ md: string;
30
+ lg: string;
31
+ };
9
32
  }, undefined, tailwind_variants.TVReturnType<{
10
- variant: {};
11
- size: {};
33
+ variant: {
34
+ solid: string;
35
+ destructive: string;
36
+ outline: string;
37
+ secondary: string;
38
+ ghost: string;
39
+ link: string;
40
+ };
41
+ size: {
42
+ sm: string;
43
+ md: string;
44
+ lg: string;
45
+ };
12
46
  }, undefined, string[], unknown, unknown, undefined>>;
47
+ type ButtonVariantProps = VariantProps<typeof button>;
13
48
 
14
- export { button };
49
+ export { type ButtonVariantProps, button };
@@ -1,14 +1,49 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
2
3
 
3
4
  declare const button: tailwind_variants.TVReturnType<{
4
- variant: {};
5
- size: {};
5
+ variant: {
6
+ solid: string;
7
+ destructive: string;
8
+ outline: string;
9
+ secondary: string;
10
+ ghost: string;
11
+ link: string;
12
+ };
13
+ size: {
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ };
6
18
  }, undefined, string[], {
7
- variant: {};
8
- size: {};
19
+ variant: {
20
+ solid: string;
21
+ destructive: string;
22
+ outline: string;
23
+ secondary: string;
24
+ ghost: string;
25
+ link: string;
26
+ };
27
+ size: {
28
+ sm: string;
29
+ md: string;
30
+ lg: string;
31
+ };
9
32
  }, undefined, tailwind_variants.TVReturnType<{
10
- variant: {};
11
- size: {};
33
+ variant: {
34
+ solid: string;
35
+ destructive: string;
36
+ outline: string;
37
+ secondary: string;
38
+ ghost: string;
39
+ link: string;
40
+ };
41
+ size: {
42
+ sm: string;
43
+ md: string;
44
+ lg: string;
45
+ };
12
46
  }, undefined, string[], unknown, unknown, undefined>>;
47
+ type ButtonVariantProps = VariantProps<typeof button>;
13
48
 
14
- export { button };
49
+ export { type ButtonVariantProps, button };
@@ -26,7 +26,9 @@ module.exports = __toCommonJS(button_exports);
26
26
  var import_tailwind_variants = require("tailwind-variants");
27
27
  var button = (0, import_tailwind_variants.tv)({
28
28
  base: [
29
- "inline-flex items-center justify-center gap-2",
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",
30
32
  "whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
31
33
  "shrink-0 [&_svg]:shrink-0 outline-none",
32
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",
@@ -34,10 +36,24 @@ var button = (0, import_tailwind_variants.tv)({
34
36
  "text-sm font-medium"
35
37
  ],
36
38
  variants: {
37
- variant: {},
38
- size: {}
39
+ 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"
46
+ },
47
+ 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"
51
+ }
39
52
  },
40
- defaultVariants: {}
53
+ defaultVariants: {
54
+ variant: "solid",
55
+ size: "sm"
56
+ }
41
57
  });
42
58
  // Annotate the CommonJS export names for ESM import in node:
43
59
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  button
3
- } from "../chunk-74SC7LQR.mjs";
3
+ } from "../chunk-GSHMDS47.mjs";
4
4
  export {
5
5
  button
6
6
  };
@@ -0,0 +1,191 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+
4
+ declare const dialog: tailwind_variants.TVReturnType<{
5
+ size: {
6
+ xs: {
7
+ content: string;
8
+ };
9
+ sm: {
10
+ content: string;
11
+ };
12
+ md: {
13
+ content: string;
14
+ };
15
+ lg: {
16
+ content: string;
17
+ };
18
+ xl: {
19
+ content: string;
20
+ };
21
+ "2xl": {
22
+ content: string;
23
+ };
24
+ "3xl": {
25
+ content: string;
26
+ };
27
+ "4xl": {
28
+ content: string;
29
+ };
30
+ "5xl": {
31
+ content: string;
32
+ };
33
+ full: {
34
+ content: string[];
35
+ };
36
+ };
37
+ placement: {
38
+ top: {};
39
+ bottom: {};
40
+ left: {};
41
+ right: {};
42
+ };
43
+ radius: {
44
+ none: string;
45
+ sm: {
46
+ content: string;
47
+ };
48
+ md: {
49
+ content: string;
50
+ };
51
+ lg: {
52
+ content: string;
53
+ };
54
+ };
55
+ }, {
56
+ overlay: string[];
57
+ content: string[];
58
+ close: string[];
59
+ closeTrigger: never[];
60
+ header: string;
61
+ footer: string;
62
+ body: string;
63
+ title: string;
64
+ description: string;
65
+ }, undefined, {
66
+ size: {
67
+ xs: {
68
+ content: string;
69
+ };
70
+ sm: {
71
+ content: string;
72
+ };
73
+ md: {
74
+ content: string;
75
+ };
76
+ lg: {
77
+ content: string;
78
+ };
79
+ xl: {
80
+ content: string;
81
+ };
82
+ "2xl": {
83
+ content: string;
84
+ };
85
+ "3xl": {
86
+ content: string;
87
+ };
88
+ "4xl": {
89
+ content: string;
90
+ };
91
+ "5xl": {
92
+ content: string;
93
+ };
94
+ full: {
95
+ content: string[];
96
+ };
97
+ };
98
+ placement: {
99
+ top: {};
100
+ bottom: {};
101
+ left: {};
102
+ right: {};
103
+ };
104
+ radius: {
105
+ none: string;
106
+ sm: {
107
+ content: string;
108
+ };
109
+ md: {
110
+ content: string;
111
+ };
112
+ lg: {
113
+ content: string;
114
+ };
115
+ };
116
+ }, {
117
+ overlay: string[];
118
+ content: string[];
119
+ close: string[];
120
+ closeTrigger: never[];
121
+ header: string;
122
+ footer: string;
123
+ body: string;
124
+ title: string;
125
+ description: string;
126
+ }, tailwind_variants.TVReturnType<{
127
+ size: {
128
+ xs: {
129
+ content: string;
130
+ };
131
+ sm: {
132
+ content: string;
133
+ };
134
+ md: {
135
+ content: string;
136
+ };
137
+ lg: {
138
+ content: string;
139
+ };
140
+ xl: {
141
+ content: string;
142
+ };
143
+ "2xl": {
144
+ content: string;
145
+ };
146
+ "3xl": {
147
+ content: string;
148
+ };
149
+ "4xl": {
150
+ content: string;
151
+ };
152
+ "5xl": {
153
+ content: string;
154
+ };
155
+ full: {
156
+ content: string[];
157
+ };
158
+ };
159
+ placement: {
160
+ top: {};
161
+ bottom: {};
162
+ left: {};
163
+ right: {};
164
+ };
165
+ radius: {
166
+ none: string;
167
+ sm: {
168
+ content: string;
169
+ };
170
+ md: {
171
+ content: string;
172
+ };
173
+ lg: {
174
+ content: string;
175
+ };
176
+ };
177
+ }, {
178
+ overlay: string[];
179
+ content: string[];
180
+ close: string[];
181
+ closeTrigger: never[];
182
+ header: string;
183
+ footer: string;
184
+ body: string;
185
+ title: string;
186
+ description: string;
187
+ }, undefined, unknown, unknown, undefined>>;
188
+ type DialogVariantProps = VariantProps<typeof dialog>;
189
+ type DialogSlots = keyof ReturnType<typeof dialog>;
190
+
191
+ export { type DialogSlots, type DialogVariantProps, dialog };