@kopexa/theme 1.2.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.
- package/dist/chunk-E5AF4JZZ.mjs +167 -0
- package/dist/chunk-HQ27V5V4.mjs +11 -0
- package/dist/chunk-U6ONJKJY.mjs +31 -0
- package/dist/{chunk-EOML76MT.mjs → chunk-YPHFKGNI.mjs} +4 -1
- package/dist/components/button.d.mts +65 -9
- package/dist/components/button.d.ts +65 -9
- package/dist/components/button.js +177 -18
- package/dist/components/button.mjs +3 -1
- package/dist/components/command.d.mts +18 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.js +4 -1
- package/dist/components/command.mjs +1 -1
- package/dist/components/index.js +181 -19
- package/dist/components/index.mjs +4 -2
- package/dist/index.js +181 -19
- package/dist/index.mjs +4 -2
- package/dist/utils/classes.d.mts +7 -0
- package/dist/utils/classes.d.ts +7 -0
- package/dist/utils/classes.js +36 -0
- package/dist/utils/classes.mjs +8 -0
- package/dist/utils/variants.d.mts +25 -0
- package/dist/utils/variants.d.ts +25 -0
- package/dist/utils/variants.js +55 -0
- package/dist/utils/variants.mjs +6 -0
- package/package.json +2 -2
- package/dist/chunk-GSHMDS47.mjs +0 -37
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import {
|
|
2
|
+
focusVisibleClasses
|
|
3
|
+
} from "./chunk-HQ27V5V4.mjs";
|
|
4
|
+
import {
|
|
5
|
+
colorVariants
|
|
6
|
+
} from "./chunk-U6ONJKJY.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/button.ts
|
|
9
|
+
import { tv } from "tailwind-variants";
|
|
10
|
+
var button = tv({
|
|
11
|
+
base: [
|
|
12
|
+
"group relative inline-flex items-center justify-center select-none",
|
|
13
|
+
"box-border appearance-none",
|
|
14
|
+
"whitespace-nowrap min-w-max font-normal subpixel-antialiased",
|
|
15
|
+
"transform-gpu cursor-pointer hover:opacity-80",
|
|
16
|
+
...focusVisibleClasses,
|
|
17
|
+
// shadcn below
|
|
18
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
19
|
+
"shrink-0 [&_svg]:shrink-0",
|
|
20
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
21
|
+
"text-sm font-medium"
|
|
22
|
+
],
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
solid: "shadow-xs",
|
|
26
|
+
ghost: "",
|
|
27
|
+
outline: "border-2 bg-transparent",
|
|
28
|
+
link: ""
|
|
29
|
+
// destructive:
|
|
30
|
+
// "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",
|
|
31
|
+
// outline:
|
|
32
|
+
// "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
33
|
+
// secondary:
|
|
34
|
+
// "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
35
|
+
// ghost:
|
|
36
|
+
// "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
37
|
+
// link: "text-primary underline-offset-4 hover:underline",
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
sm: "px-3 min-w-16 h-8 text-xs gap-2 rounded-sm has-[>svg]:px-2.5",
|
|
41
|
+
md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md has-[>svg]:px-3",
|
|
42
|
+
lg: "px-6 min-w-24 h-12 text-base gap-3 rounded-lg has-[>svg]:px-4"
|
|
43
|
+
},
|
|
44
|
+
color: {
|
|
45
|
+
primary: "",
|
|
46
|
+
secondary: "",
|
|
47
|
+
destructive: "",
|
|
48
|
+
warning: "",
|
|
49
|
+
success: ""
|
|
50
|
+
},
|
|
51
|
+
radius: {},
|
|
52
|
+
fullWidth: {
|
|
53
|
+
true: "w-full"
|
|
54
|
+
},
|
|
55
|
+
isIconOnly: {
|
|
56
|
+
true: "px-0 !gap-0",
|
|
57
|
+
false: "[&>svg]:max-w-[theme(spacing.8)]"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: {
|
|
61
|
+
size: "md",
|
|
62
|
+
variant: "solid",
|
|
63
|
+
color: "primary",
|
|
64
|
+
fullWidth: false,
|
|
65
|
+
isIconOnly: false
|
|
66
|
+
},
|
|
67
|
+
compoundVariants: [
|
|
68
|
+
// primary color
|
|
69
|
+
{
|
|
70
|
+
variant: "solid",
|
|
71
|
+
color: "primary",
|
|
72
|
+
class: colorVariants.solid.primary
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
variant: "solid",
|
|
76
|
+
color: "secondary",
|
|
77
|
+
class: colorVariants.solid.secondary
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
variant: "solid",
|
|
81
|
+
color: "destructive",
|
|
82
|
+
class: colorVariants.solid.destructive
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
variant: "solid",
|
|
86
|
+
color: "warning",
|
|
87
|
+
class: colorVariants.solid.warning
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
variant: "solid",
|
|
91
|
+
color: "success",
|
|
92
|
+
class: colorVariants.solid.success
|
|
93
|
+
},
|
|
94
|
+
// ghost color
|
|
95
|
+
{
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
color: "primary",
|
|
98
|
+
class: colorVariants.ghost.primary
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
color: "secondary",
|
|
103
|
+
class: colorVariants.ghost.secondary
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
variant: "ghost",
|
|
107
|
+
color: "destructive",
|
|
108
|
+
class: colorVariants.ghost.destructive
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
variant: "ghost",
|
|
112
|
+
color: "warning",
|
|
113
|
+
class: colorVariants.ghost.warning
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
variant: "ghost",
|
|
117
|
+
color: "success",
|
|
118
|
+
class: colorVariants.ghost.success
|
|
119
|
+
},
|
|
120
|
+
// outline color
|
|
121
|
+
{
|
|
122
|
+
variant: "outline",
|
|
123
|
+
color: "primary",
|
|
124
|
+
class: colorVariants.outline.primary
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
variant: "outline",
|
|
128
|
+
color: "secondary",
|
|
129
|
+
class: colorVariants.outline.secondary
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
variant: "outline",
|
|
133
|
+
color: "destructive",
|
|
134
|
+
class: colorVariants.outline.destructive
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
variant: "outline",
|
|
138
|
+
color: "warning",
|
|
139
|
+
class: colorVariants.outline.warning
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
variant: "outline",
|
|
143
|
+
color: "success",
|
|
144
|
+
class: colorVariants.outline.success
|
|
145
|
+
},
|
|
146
|
+
// icon
|
|
147
|
+
{
|
|
148
|
+
isIconOnly: true,
|
|
149
|
+
size: "sm",
|
|
150
|
+
class: "min-w-8 w-8 h-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
isIconOnly: true,
|
|
154
|
+
size: "md",
|
|
155
|
+
class: "min-w-10 w-10 h-10 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
isIconOnly: true,
|
|
159
|
+
size: "lg",
|
|
160
|
+
class: "min-w-12 w-12 h-12 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-5"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export {
|
|
166
|
+
button
|
|
167
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/utils/classes.ts
|
|
2
|
+
var focusVisibleClasses = [
|
|
3
|
+
"focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
|
|
4
|
+
//"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
5
|
+
];
|
|
6
|
+
var dataFocusVisibleClasses = ["outline-hidden"];
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
focusVisibleClasses,
|
|
10
|
+
dataFocusVisibleClasses
|
|
11
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/utils/variants.ts
|
|
2
|
+
var solid = {
|
|
3
|
+
primary: "bg-primary text-primary-foreground",
|
|
4
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
5
|
+
destructive: "bg-destructive text-destructive-foreground",
|
|
6
|
+
warning: "bg-warning text-warning-foreground",
|
|
7
|
+
success: "bg-success text-success-foreground"
|
|
8
|
+
};
|
|
9
|
+
var outline = {
|
|
10
|
+
primary: "bg-transparent border-primary text-primary",
|
|
11
|
+
secondary: "bg-transparent border-secondary text-secondary",
|
|
12
|
+
destructive: "bg-transparent border-destructive text-destructive",
|
|
13
|
+
warning: "bg-transparent border-warning text-warning",
|
|
14
|
+
success: "bg-transparent border-success text-success"
|
|
15
|
+
};
|
|
16
|
+
var ghost = {
|
|
17
|
+
primary: "bg-transparent text-primary",
|
|
18
|
+
secondary: "bg-transparent text-secondary",
|
|
19
|
+
destructive: "bg-transparent text-destructive",
|
|
20
|
+
warning: "bg-transparent text-warning",
|
|
21
|
+
success: "bg-transparent text-success"
|
|
22
|
+
};
|
|
23
|
+
var colorVariants = {
|
|
24
|
+
solid,
|
|
25
|
+
ghost,
|
|
26
|
+
outline
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
colorVariants
|
|
31
|
+
};
|
|
@@ -11,7 +11,10 @@ var command = tv({
|
|
|
11
11
|
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",
|
|
12
12
|
separator: "bg-border -mx-1 h-px",
|
|
13
13
|
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",
|
|
14
|
-
shortcut: "text-muted-foreground ml-auto text-xs tracking-widest"
|
|
14
|
+
shortcut: "text-muted-foreground ml-auto text-xs tracking-widest",
|
|
15
|
+
header: "flex flex-col items-start justify-between px-3 py-2 border-b",
|
|
16
|
+
title: "text-sm font-semibold",
|
|
17
|
+
description: "text-xs text-muted-foreground"
|
|
15
18
|
}
|
|
16
19
|
});
|
|
17
20
|
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Solid variant
|
|
6
|
+
* Ergebnis: solid button mit farbe im BG und contrast als foreground
|
|
7
|
+
* - default: solid + primary color
|
|
8
|
+
* - Solid can be combined with colors: primary, secondary, destructive, success, warning
|
|
9
|
+
*
|
|
10
|
+
* Ghost variant
|
|
11
|
+
* Ein Button mit transparentem Background und Color im foreground
|
|
12
|
+
* - default: ghost + primary color
|
|
13
|
+
*
|
|
14
|
+
* Outline variant
|
|
15
|
+
* Ein Button mit transparentem Background und Border in der Color
|
|
16
|
+
* - default: outline + primary color
|
|
17
|
+
*
|
|
18
|
+
* Link variant
|
|
19
|
+
* Link ist transparenter button, mit Color.
|
|
20
|
+
*/
|
|
4
21
|
declare const button: tailwind_variants.TVReturnType<{
|
|
5
22
|
variant: {
|
|
6
23
|
solid: string;
|
|
7
|
-
destructive: string;
|
|
8
|
-
outline: string;
|
|
9
|
-
secondary: string;
|
|
10
24
|
ghost: string;
|
|
25
|
+
outline: string;
|
|
11
26
|
link: string;
|
|
12
27
|
};
|
|
13
28
|
size: {
|
|
@@ -15,13 +30,26 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
15
30
|
md: string;
|
|
16
31
|
lg: string;
|
|
17
32
|
};
|
|
33
|
+
color: {
|
|
34
|
+
primary: string;
|
|
35
|
+
secondary: string;
|
|
36
|
+
destructive: string;
|
|
37
|
+
warning: string;
|
|
38
|
+
success: string;
|
|
39
|
+
};
|
|
40
|
+
radius: {};
|
|
41
|
+
fullWidth: {
|
|
42
|
+
true: string;
|
|
43
|
+
};
|
|
44
|
+
isIconOnly: {
|
|
45
|
+
true: string;
|
|
46
|
+
false: string;
|
|
47
|
+
};
|
|
18
48
|
}, undefined, string[], {
|
|
19
49
|
variant: {
|
|
20
50
|
solid: string;
|
|
21
|
-
destructive: string;
|
|
22
|
-
outline: string;
|
|
23
|
-
secondary: string;
|
|
24
51
|
ghost: string;
|
|
52
|
+
outline: string;
|
|
25
53
|
link: string;
|
|
26
54
|
};
|
|
27
55
|
size: {
|
|
@@ -29,13 +57,26 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
29
57
|
md: string;
|
|
30
58
|
lg: string;
|
|
31
59
|
};
|
|
60
|
+
color: {
|
|
61
|
+
primary: string;
|
|
62
|
+
secondary: string;
|
|
63
|
+
destructive: string;
|
|
64
|
+
warning: string;
|
|
65
|
+
success: string;
|
|
66
|
+
};
|
|
67
|
+
radius: {};
|
|
68
|
+
fullWidth: {
|
|
69
|
+
true: string;
|
|
70
|
+
};
|
|
71
|
+
isIconOnly: {
|
|
72
|
+
true: string;
|
|
73
|
+
false: string;
|
|
74
|
+
};
|
|
32
75
|
}, undefined, tailwind_variants.TVReturnType<{
|
|
33
76
|
variant: {
|
|
34
77
|
solid: string;
|
|
35
|
-
destructive: string;
|
|
36
|
-
outline: string;
|
|
37
|
-
secondary: string;
|
|
38
78
|
ghost: string;
|
|
79
|
+
outline: string;
|
|
39
80
|
link: string;
|
|
40
81
|
};
|
|
41
82
|
size: {
|
|
@@ -43,6 +84,21 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
43
84
|
md: string;
|
|
44
85
|
lg: string;
|
|
45
86
|
};
|
|
87
|
+
color: {
|
|
88
|
+
primary: string;
|
|
89
|
+
secondary: string;
|
|
90
|
+
destructive: string;
|
|
91
|
+
warning: string;
|
|
92
|
+
success: string;
|
|
93
|
+
};
|
|
94
|
+
radius: {};
|
|
95
|
+
fullWidth: {
|
|
96
|
+
true: string;
|
|
97
|
+
};
|
|
98
|
+
isIconOnly: {
|
|
99
|
+
true: string;
|
|
100
|
+
false: string;
|
|
101
|
+
};
|
|
46
102
|
}, undefined, string[], unknown, unknown, undefined>>;
|
|
47
103
|
type ButtonVariantProps = VariantProps<typeof button>;
|
|
48
104
|
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Solid variant
|
|
6
|
+
* Ergebnis: solid button mit farbe im BG und contrast als foreground
|
|
7
|
+
* - default: solid + primary color
|
|
8
|
+
* - Solid can be combined with colors: primary, secondary, destructive, success, warning
|
|
9
|
+
*
|
|
10
|
+
* Ghost variant
|
|
11
|
+
* Ein Button mit transparentem Background und Color im foreground
|
|
12
|
+
* - default: ghost + primary color
|
|
13
|
+
*
|
|
14
|
+
* Outline variant
|
|
15
|
+
* Ein Button mit transparentem Background und Border in der Color
|
|
16
|
+
* - default: outline + primary color
|
|
17
|
+
*
|
|
18
|
+
* Link variant
|
|
19
|
+
* Link ist transparenter button, mit Color.
|
|
20
|
+
*/
|
|
4
21
|
declare const button: tailwind_variants.TVReturnType<{
|
|
5
22
|
variant: {
|
|
6
23
|
solid: string;
|
|
7
|
-
destructive: string;
|
|
8
|
-
outline: string;
|
|
9
|
-
secondary: string;
|
|
10
24
|
ghost: string;
|
|
25
|
+
outline: string;
|
|
11
26
|
link: string;
|
|
12
27
|
};
|
|
13
28
|
size: {
|
|
@@ -15,13 +30,26 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
15
30
|
md: string;
|
|
16
31
|
lg: string;
|
|
17
32
|
};
|
|
33
|
+
color: {
|
|
34
|
+
primary: string;
|
|
35
|
+
secondary: string;
|
|
36
|
+
destructive: string;
|
|
37
|
+
warning: string;
|
|
38
|
+
success: string;
|
|
39
|
+
};
|
|
40
|
+
radius: {};
|
|
41
|
+
fullWidth: {
|
|
42
|
+
true: string;
|
|
43
|
+
};
|
|
44
|
+
isIconOnly: {
|
|
45
|
+
true: string;
|
|
46
|
+
false: string;
|
|
47
|
+
};
|
|
18
48
|
}, undefined, string[], {
|
|
19
49
|
variant: {
|
|
20
50
|
solid: string;
|
|
21
|
-
destructive: string;
|
|
22
|
-
outline: string;
|
|
23
|
-
secondary: string;
|
|
24
51
|
ghost: string;
|
|
52
|
+
outline: string;
|
|
25
53
|
link: string;
|
|
26
54
|
};
|
|
27
55
|
size: {
|
|
@@ -29,13 +57,26 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
29
57
|
md: string;
|
|
30
58
|
lg: string;
|
|
31
59
|
};
|
|
60
|
+
color: {
|
|
61
|
+
primary: string;
|
|
62
|
+
secondary: string;
|
|
63
|
+
destructive: string;
|
|
64
|
+
warning: string;
|
|
65
|
+
success: string;
|
|
66
|
+
};
|
|
67
|
+
radius: {};
|
|
68
|
+
fullWidth: {
|
|
69
|
+
true: string;
|
|
70
|
+
};
|
|
71
|
+
isIconOnly: {
|
|
72
|
+
true: string;
|
|
73
|
+
false: string;
|
|
74
|
+
};
|
|
32
75
|
}, undefined, tailwind_variants.TVReturnType<{
|
|
33
76
|
variant: {
|
|
34
77
|
solid: string;
|
|
35
|
-
destructive: string;
|
|
36
|
-
outline: string;
|
|
37
|
-
secondary: string;
|
|
38
78
|
ghost: string;
|
|
79
|
+
outline: string;
|
|
39
80
|
link: string;
|
|
40
81
|
};
|
|
41
82
|
size: {
|
|
@@ -43,6 +84,21 @@ declare const button: tailwind_variants.TVReturnType<{
|
|
|
43
84
|
md: string;
|
|
44
85
|
lg: string;
|
|
45
86
|
};
|
|
87
|
+
color: {
|
|
88
|
+
primary: string;
|
|
89
|
+
secondary: string;
|
|
90
|
+
destructive: string;
|
|
91
|
+
warning: string;
|
|
92
|
+
success: string;
|
|
93
|
+
};
|
|
94
|
+
radius: {};
|
|
95
|
+
fullWidth: {
|
|
96
|
+
true: string;
|
|
97
|
+
};
|
|
98
|
+
isIconOnly: {
|
|
99
|
+
true: string;
|
|
100
|
+
false: string;
|
|
101
|
+
};
|
|
46
102
|
}, undefined, string[], unknown, unknown, undefined>>;
|
|
47
103
|
type ButtonVariantProps = VariantProps<typeof button>;
|
|
48
104
|
|
|
@@ -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
|
|
30
|
-
"box-border appearance-none
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
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: "
|
|
41
|
-
|
|
42
|
-
outline: "border
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
49
|
-
md: "h-
|
|
50
|
-
lg: "h-
|
|
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
|
-
|
|
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 = {
|