@kopexa/theme 0.0.0 → 1.0.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-GSHMDS47.mjs +37 -0
- package/dist/chunk-J35D7RWA.mjs +15 -0
- package/dist/chunk-OEVKY5EP.mjs +94 -0
- package/dist/chunk-V74N5X6Z.mjs +88 -0
- package/dist/components/button.d.mts +42 -7
- package/dist/components/button.d.ts +42 -7
- package/dist/components/button.js +20 -4
- package/dist/components/button.mjs +1 -1
- package/dist/components/dialog.d.mts +191 -0
- package/dist/components/dialog.d.ts +191 -0
- package/dist/components/dialog.js +118 -0
- package/dist/components/dialog.mjs +6 -0
- package/dist/components/drawer.d.mts +205 -0
- package/dist/components/drawer.d.ts +205 -0
- package/dist/components/drawer.js +201 -0
- package/dist/components/drawer.mjs +7 -0
- package/dist/components/index.d.mts +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +212 -6
- package/dist/components/index.mjs +15 -3
- package/dist/components/popover.d.mts +31 -0
- package/dist/components/popover.d.ts +31 -0
- package/dist/components/popover.js +39 -0
- package/dist/components/popover.mjs +6 -0
- package/dist/index.css +6 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +212 -6
- package/dist/index.mjs +15 -3
- package/package.json +2 -2
- package/dist/chunk-74SC7LQR.mjs +0 -21
- /package/dist/{chunk-BJZMR7WC.mjs → chunk-BFZUC56W.mjs} +0 -0
package/dist/index.js
CHANGED
|
@@ -20,7 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
button: () => button
|
|
23
|
+
button: () => button,
|
|
24
|
+
dialog: () => dialog,
|
|
25
|
+
drawer: () => drawer,
|
|
26
|
+
popover: () => popover
|
|
24
27
|
});
|
|
25
28
|
module.exports = __toCommonJS(index_exports);
|
|
26
29
|
|
|
@@ -28,7 +31,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
28
31
|
var import_tailwind_variants = require("tailwind-variants");
|
|
29
32
|
var button = (0, import_tailwind_variants.tv)({
|
|
30
33
|
base: [
|
|
31
|
-
"inline-flex items-center justify-center
|
|
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",
|
|
32
37
|
"whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
|
|
33
38
|
"shrink-0 [&_svg]:shrink-0 outline-none",
|
|
34
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",
|
|
@@ -36,12 +41,213 @@ var button = (0, import_tailwind_variants.tv)({
|
|
|
36
41
|
"text-sm font-medium"
|
|
37
42
|
],
|
|
38
43
|
variants: {
|
|
39
|
-
variant: {
|
|
40
|
-
|
|
44
|
+
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"
|
|
51
|
+
},
|
|
52
|
+
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"
|
|
56
|
+
}
|
|
41
57
|
},
|
|
42
|
-
defaultVariants: {
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "solid",
|
|
60
|
+
size: "sm"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// src/components/dialog.ts
|
|
65
|
+
var import_tailwind_variants2 = require("tailwind-variants");
|
|
66
|
+
var dialog = (0, import_tailwind_variants2.tv)({
|
|
67
|
+
slots: {
|
|
68
|
+
overlay: ["fixed inset-0 z-50 bg-black/25"],
|
|
69
|
+
content: [
|
|
70
|
+
"bg-background fixed top-[50%] left-[50%] z-50",
|
|
71
|
+
"grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]",
|
|
72
|
+
"gap-4 border shadow-lg",
|
|
73
|
+
// mobile animation vars
|
|
74
|
+
"[--scale-enter:100%]",
|
|
75
|
+
"[--scale-exit:100%]",
|
|
76
|
+
"[--slide-enter:0px]",
|
|
77
|
+
"[--slide-exit:80px]",
|
|
78
|
+
// tablet/desktop animation vars
|
|
79
|
+
"sm:[--scale-enter:100%]",
|
|
80
|
+
"sm:[--scale-exit:103%]",
|
|
81
|
+
"sm:[--slide-enter:0px]",
|
|
82
|
+
"sm:[--slide-exit:0px]"
|
|
83
|
+
],
|
|
84
|
+
close: [
|
|
85
|
+
"ring-offset-background focus:ring-ring",
|
|
86
|
+
"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
87
|
+
"absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100",
|
|
88
|
+
"focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
89
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
90
|
+
],
|
|
91
|
+
closeTrigger: [],
|
|
92
|
+
header: "flex flex-col gap-1 text-center sm:text-left shrink grow-0 px-6 pt-4",
|
|
93
|
+
footer: "flex flex-col-reverse gap-2 px-6 pt-2 pb-4 sm:flex-row sm:justify-end",
|
|
94
|
+
body: "px-6 py-2 flex-1 overflow-auto",
|
|
95
|
+
title: "text-lg leading-none font-semibold",
|
|
96
|
+
description: "text-muted-foreground text-sm"
|
|
97
|
+
},
|
|
98
|
+
variants: {
|
|
99
|
+
size: {
|
|
100
|
+
xs: {
|
|
101
|
+
content: "sm:max-w-xs"
|
|
102
|
+
},
|
|
103
|
+
sm: {
|
|
104
|
+
content: "sm:max-w-sm"
|
|
105
|
+
},
|
|
106
|
+
md: {
|
|
107
|
+
content: "sm:max-w-md"
|
|
108
|
+
},
|
|
109
|
+
lg: {
|
|
110
|
+
content: "sm:max-w-lg"
|
|
111
|
+
},
|
|
112
|
+
xl: {
|
|
113
|
+
content: "sm:max-w-xl"
|
|
114
|
+
},
|
|
115
|
+
"2xl": {
|
|
116
|
+
content: "sm:max-w-2xl"
|
|
117
|
+
},
|
|
118
|
+
"3xl": {
|
|
119
|
+
content: "sm:max-w-3xl"
|
|
120
|
+
},
|
|
121
|
+
"4xl": {
|
|
122
|
+
content: "sm:max-w-4xl"
|
|
123
|
+
},
|
|
124
|
+
"5xl": {
|
|
125
|
+
content: "sm:max-w-5xl"
|
|
126
|
+
},
|
|
127
|
+
full: {
|
|
128
|
+
content: [
|
|
129
|
+
"my-0 mx:0 sm:mx-0 sm:my-0 max-w-[calc(100%-1rem)] w-full h-[calc(100dvh-1rem)] inset-2",
|
|
130
|
+
"translate-0"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
placement: { top: {}, bottom: {}, left: {}, right: {} },
|
|
135
|
+
radius: {
|
|
136
|
+
none: "",
|
|
137
|
+
sm: {
|
|
138
|
+
content: "rounded-sm"
|
|
139
|
+
},
|
|
140
|
+
md: {
|
|
141
|
+
content: "rounded-md"
|
|
142
|
+
},
|
|
143
|
+
lg: {
|
|
144
|
+
content: "rounded-lg"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
defaultVariants: {
|
|
149
|
+
size: "md",
|
|
150
|
+
placement: "right",
|
|
151
|
+
radius: "lg"
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// src/components/drawer.ts
|
|
156
|
+
var import_tailwind_variants3 = require("tailwind-variants");
|
|
157
|
+
var drawer = (0, import_tailwind_variants3.tv)({
|
|
158
|
+
slots: {
|
|
159
|
+
overlay: dialog.slots.overlay,
|
|
160
|
+
content: [
|
|
161
|
+
"bg-background fixed z-50 flex flex-col w-full gap-4 shadow-lg max-h-dvh",
|
|
162
|
+
"outline-hidden"
|
|
163
|
+
],
|
|
164
|
+
close: dialog.slots.close,
|
|
165
|
+
closeTrigger: dialog.slots.closeTrigger,
|
|
166
|
+
header: dialog.slots.header,
|
|
167
|
+
footer: dialog.slots.footer,
|
|
168
|
+
body: dialog.slots.body,
|
|
169
|
+
title: dialog.slots.title,
|
|
170
|
+
description: dialog.slots.description
|
|
171
|
+
},
|
|
172
|
+
variants: {
|
|
173
|
+
size: {
|
|
174
|
+
xs: {
|
|
175
|
+
content: "max-w-xs"
|
|
176
|
+
},
|
|
177
|
+
sm: {
|
|
178
|
+
content: "max-w-sm"
|
|
179
|
+
},
|
|
180
|
+
md: {
|
|
181
|
+
content: "max-w-md"
|
|
182
|
+
},
|
|
183
|
+
lg: {
|
|
184
|
+
content: "max-w-lg"
|
|
185
|
+
},
|
|
186
|
+
xl: {
|
|
187
|
+
content: "max-w-xl"
|
|
188
|
+
},
|
|
189
|
+
"2xl": {
|
|
190
|
+
content: "max-w-2xl"
|
|
191
|
+
},
|
|
192
|
+
"3xl": {
|
|
193
|
+
content: "max-w-3xl"
|
|
194
|
+
},
|
|
195
|
+
"4xl": {
|
|
196
|
+
content: "max-w-4xl"
|
|
197
|
+
},
|
|
198
|
+
"5xl": {
|
|
199
|
+
content: "max-w-5xl"
|
|
200
|
+
},
|
|
201
|
+
"6xl": {
|
|
202
|
+
content: "max-w-6xl"
|
|
203
|
+
},
|
|
204
|
+
full: {
|
|
205
|
+
content: "max-w-full max-h-full h-[calc(100dvh_-_1rem)] inset-2"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
placement: {
|
|
209
|
+
top: {},
|
|
210
|
+
bottom: {},
|
|
211
|
+
left: {},
|
|
212
|
+
right: {
|
|
213
|
+
content: "inset-y-2 me-2 right-0 h-[calc(100%-1rem)] border-l"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
radius: {
|
|
217
|
+
none: "",
|
|
218
|
+
sm: {
|
|
219
|
+
content: "rounded-sm"
|
|
220
|
+
},
|
|
221
|
+
md: {
|
|
222
|
+
content: "rounded-md"
|
|
223
|
+
},
|
|
224
|
+
lg: {
|
|
225
|
+
content: "rounded-lg"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
defaultVariants: {
|
|
230
|
+
placement: "right",
|
|
231
|
+
size: "md",
|
|
232
|
+
radius: "lg"
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// src/components/popover.ts
|
|
237
|
+
var import_tailwind_variants4 = require("tailwind-variants");
|
|
238
|
+
var popover = (0, import_tailwind_variants4.tv)({
|
|
239
|
+
slots: {
|
|
240
|
+
content: [
|
|
241
|
+
"bg-popover text-popover-foreground z-50 w-72",
|
|
242
|
+
"origin-(--radix-popover-content-transform-origin)",
|
|
243
|
+
"rounded-md border p-4 shadow-md outline-hidden"
|
|
244
|
+
]
|
|
245
|
+
}
|
|
43
246
|
});
|
|
44
247
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
248
|
0 && (module.exports = {
|
|
46
|
-
button
|
|
249
|
+
button,
|
|
250
|
+
dialog,
|
|
251
|
+
drawer,
|
|
252
|
+
popover
|
|
47
253
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-BFZUC56W.mjs";
|
|
2
2
|
import {
|
|
3
3
|
button
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GSHMDS47.mjs";
|
|
5
|
+
import {
|
|
6
|
+
drawer
|
|
7
|
+
} from "./chunk-V74N5X6Z.mjs";
|
|
8
|
+
import {
|
|
9
|
+
dialog
|
|
10
|
+
} from "./chunk-OEVKY5EP.mjs";
|
|
11
|
+
import {
|
|
12
|
+
popover
|
|
13
|
+
} from "./chunk-J35D7RWA.mjs";
|
|
5
14
|
export {
|
|
6
|
-
button
|
|
15
|
+
button,
|
|
16
|
+
dialog,
|
|
17
|
+
drawer,
|
|
18
|
+
popover
|
|
7
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "The default theme for Kopexa components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"flat": "^6.0.1",
|
|
45
45
|
"tailwind-merge": "3.3.1",
|
|
46
46
|
"tailwind-variants": "1.0.0",
|
|
47
|
-
"@kopexa/shared-utils": "
|
|
47
|
+
"@kopexa/shared-utils": "1.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"tailwindcss": ">=4.0.0"
|
package/dist/chunk-74SC7LQR.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/components/button.ts
|
|
2
|
-
import { tv } from "tailwind-variants";
|
|
3
|
-
var button = tv({
|
|
4
|
-
base: [
|
|
5
|
-
"inline-flex items-center justify-center gap-2",
|
|
6
|
-
"whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50",
|
|
7
|
-
"shrink-0 [&_svg]:shrink-0 outline-none",
|
|
8
|
-
"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",
|
|
9
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
10
|
-
"text-sm font-medium"
|
|
11
|
-
],
|
|
12
|
-
variants: {
|
|
13
|
-
variant: {},
|
|
14
|
-
size: {}
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
button
|
|
21
|
-
};
|
|
File without changes
|