@vertz/theme-shadcn 0.2.20 → 0.2.22
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/base.js +1 -1
- package/dist/configs.js +1 -1
- package/dist/index.d.ts +629 -304
- package/dist/index.js +1325 -2043
- package/dist/shared/{chunk-d2nh1syq.js → chunk-gjsm05ga.js} +3 -0
- package/dist/shared/{chunk-qvb3evv2.js → chunk-gzfp8m46.js} +22 -27
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -5,22 +5,23 @@ import {
|
|
|
5
5
|
createBadge,
|
|
6
6
|
createButton,
|
|
7
7
|
textOpacity
|
|
8
|
-
} from "./shared/chunk-
|
|
8
|
+
} from "./shared/chunk-gzfp8m46.js";
|
|
9
9
|
import {
|
|
10
10
|
configureThemeBase
|
|
11
|
-
} from "./shared/chunk-
|
|
11
|
+
} from "./shared/chunk-gjsm05ga.js";
|
|
12
12
|
|
|
13
13
|
// src/components/alert.ts
|
|
14
14
|
import { resolveChildren } from "@vertz/ui";
|
|
15
15
|
function createAlertComponents(alertStyles) {
|
|
16
|
-
function Alert({ variant, class:
|
|
16
|
+
function Alert({ variant, className, class: classProp, children }) {
|
|
17
|
+
const effectiveClass = className ?? classProp;
|
|
17
18
|
const el = document.createElement("div");
|
|
18
19
|
const classes = [alertStyles.root];
|
|
19
20
|
if (variant === "destructive") {
|
|
20
21
|
classes.push(alertStyles.destructive);
|
|
21
22
|
}
|
|
22
|
-
if (
|
|
23
|
-
classes.push(
|
|
23
|
+
if (effectiveClass) {
|
|
24
|
+
classes.push(effectiveClass);
|
|
24
25
|
}
|
|
25
26
|
el.className = classes.join(" ");
|
|
26
27
|
el.setAttribute("role", "alert");
|
|
@@ -29,17 +30,19 @@ function createAlertComponents(alertStyles) {
|
|
|
29
30
|
}
|
|
30
31
|
return el;
|
|
31
32
|
}
|
|
32
|
-
function AlertTitle({ class:
|
|
33
|
+
function AlertTitle({ className, class: classProp, children }) {
|
|
34
|
+
const effectiveClass = className ?? classProp;
|
|
33
35
|
const el = document.createElement("h5");
|
|
34
|
-
el.className = [alertStyles.title,
|
|
36
|
+
el.className = [alertStyles.title, effectiveClass].filter(Boolean).join(" ");
|
|
35
37
|
for (const node of resolveChildren(children)) {
|
|
36
38
|
el.appendChild(node);
|
|
37
39
|
}
|
|
38
40
|
return el;
|
|
39
41
|
}
|
|
40
|
-
function AlertDescription({ class:
|
|
42
|
+
function AlertDescription({ className, class: classProp, children }) {
|
|
43
|
+
const effectiveClass = className ?? classProp;
|
|
41
44
|
const el = document.createElement("div");
|
|
42
|
-
el.className = [alertStyles.description,
|
|
45
|
+
el.className = [alertStyles.description, effectiveClass].filter(Boolean).join(" ");
|
|
43
46
|
for (const node of resolveChildren(children)) {
|
|
44
47
|
el.appendChild(node);
|
|
45
48
|
}
|
|
@@ -51,24 +54,32 @@ function createAlertComponents(alertStyles) {
|
|
|
51
54
|
// src/components/avatar.ts
|
|
52
55
|
import { resolveChildren as resolveChildren2 } from "@vertz/ui";
|
|
53
56
|
function createAvatarComponents(avatarStyles) {
|
|
54
|
-
function Avatar({ class:
|
|
57
|
+
function Avatar({ className, class: classProp, children }) {
|
|
58
|
+
const effectiveClass = className ?? classProp;
|
|
55
59
|
const el = document.createElement("div");
|
|
56
|
-
el.className = [avatarStyles.root,
|
|
60
|
+
el.className = [avatarStyles.root, effectiveClass].filter(Boolean).join(" ");
|
|
57
61
|
for (const node of resolveChildren2(children)) {
|
|
58
62
|
el.appendChild(node);
|
|
59
63
|
}
|
|
60
64
|
return el;
|
|
61
65
|
}
|
|
62
|
-
function AvatarImage({
|
|
66
|
+
function AvatarImage({
|
|
67
|
+
src,
|
|
68
|
+
alt,
|
|
69
|
+
className,
|
|
70
|
+
class: classProp
|
|
71
|
+
}) {
|
|
72
|
+
const effectiveClass = className ?? classProp;
|
|
63
73
|
const el = document.createElement("img");
|
|
64
|
-
el.className = [avatarStyles.image,
|
|
74
|
+
el.className = [avatarStyles.image, effectiveClass].filter(Boolean).join(" ");
|
|
65
75
|
el.src = src;
|
|
66
76
|
el.alt = alt;
|
|
67
77
|
return el;
|
|
68
78
|
}
|
|
69
|
-
function AvatarFallback({ class:
|
|
79
|
+
function AvatarFallback({ className, class: classProp, children }) {
|
|
80
|
+
const effectiveClass = className ?? classProp;
|
|
70
81
|
const el = document.createElement("div");
|
|
71
|
-
el.className = [avatarStyles.fallback,
|
|
82
|
+
el.className = [avatarStyles.fallback, effectiveClass].filter(Boolean).join(" ");
|
|
72
83
|
for (const node of resolveChildren2(children)) {
|
|
73
84
|
el.appendChild(node);
|
|
74
85
|
}
|
|
@@ -85,9 +96,15 @@ function createBadgeComponent(badgeStyles) {
|
|
|
85
96
|
green: "background-color: oklch(0.55 0.15 155); color: #fff;",
|
|
86
97
|
yellow: "background-color: oklch(0.75 0.15 85); color: oklch(0.25 0.05 85);"
|
|
87
98
|
};
|
|
88
|
-
return function Badge({
|
|
99
|
+
return function Badge({
|
|
100
|
+
color,
|
|
101
|
+
className,
|
|
102
|
+
class: classProp,
|
|
103
|
+
children
|
|
104
|
+
}) {
|
|
105
|
+
const effectiveClass = className ?? classProp;
|
|
89
106
|
const el = document.createElement("span");
|
|
90
|
-
el.className = [badgeStyles({ color }),
|
|
107
|
+
el.className = [badgeStyles({ color }), effectiveClass].filter(Boolean).join(" ");
|
|
91
108
|
const inlineStyle = color ? colorStyles[color] : undefined;
|
|
92
109
|
if (inlineStyle) {
|
|
93
110
|
el.style.cssText = inlineStyle;
|
|
@@ -102,13 +119,14 @@ function createBadgeComponent(badgeStyles) {
|
|
|
102
119
|
// src/components/breadcrumb.ts
|
|
103
120
|
function createBreadcrumbComponent(styles) {
|
|
104
121
|
return function Breadcrumb(props) {
|
|
105
|
-
const { items, separator = "/", class:
|
|
122
|
+
const { items, separator = "/", className, class: classProp } = props;
|
|
123
|
+
const effectiveClass = className ?? classProp;
|
|
106
124
|
const nav = document.createElement("nav");
|
|
107
125
|
nav.setAttribute("aria-label", "Breadcrumb");
|
|
108
126
|
if (styles.nav)
|
|
109
127
|
nav.className = styles.nav;
|
|
110
|
-
if (
|
|
111
|
-
nav.className = [nav.className,
|
|
128
|
+
if (effectiveClass) {
|
|
129
|
+
nav.className = [nav.className, effectiveClass].filter(Boolean).join(" ");
|
|
112
130
|
}
|
|
113
131
|
const ol = document.createElement("ol");
|
|
114
132
|
ol.className = styles.list;
|
|
@@ -154,31 +172,25 @@ function createBreadcrumbComponent(styles) {
|
|
|
154
172
|
|
|
155
173
|
// src/components/button.ts
|
|
156
174
|
import { resolveChildren as resolveChildren4 } from "@vertz/ui";
|
|
175
|
+
import { applyProps } from "@vertz/ui-primitives/utils";
|
|
157
176
|
function createButtonComponent(buttonStyles) {
|
|
158
177
|
return function Button({
|
|
159
178
|
intent,
|
|
160
179
|
size,
|
|
161
|
-
|
|
180
|
+
className,
|
|
181
|
+
class: classProp,
|
|
162
182
|
children,
|
|
163
183
|
disabled,
|
|
164
184
|
type,
|
|
165
|
-
...
|
|
185
|
+
...rest
|
|
166
186
|
}) {
|
|
187
|
+
const effectiveClass = className ?? classProp;
|
|
167
188
|
const el = document.createElement("button");
|
|
168
189
|
el.type = type ?? "button";
|
|
169
|
-
el.className = [buttonStyles({ intent, size }),
|
|
190
|
+
el.className = [buttonStyles({ intent, size }), effectiveClass].filter(Boolean).join(" ");
|
|
170
191
|
if (disabled)
|
|
171
192
|
el.disabled = true;
|
|
172
|
-
|
|
173
|
-
if (value === undefined || value === null)
|
|
174
|
-
continue;
|
|
175
|
-
if (key.startsWith("on") && typeof value === "function") {
|
|
176
|
-
const event = key[2].toLowerCase() + key.slice(3);
|
|
177
|
-
el.addEventListener(event, value);
|
|
178
|
-
} else {
|
|
179
|
-
el.setAttribute(key, String(value));
|
|
180
|
-
}
|
|
181
|
-
}
|
|
193
|
+
applyProps(el, rest);
|
|
182
194
|
for (const node of resolveChildren4(children)) {
|
|
183
195
|
el.appendChild(node);
|
|
184
196
|
}
|
|
@@ -189,57 +201,68 @@ function createButtonComponent(buttonStyles) {
|
|
|
189
201
|
// src/components/card.ts
|
|
190
202
|
import { resolveChildren as resolveChildren5 } from "@vertz/ui";
|
|
191
203
|
function createCardComponents(cardStyles) {
|
|
192
|
-
function Card({ class:
|
|
204
|
+
function Card({ className, class: classProp, children }) {
|
|
205
|
+
const effectiveClass = className ?? classProp;
|
|
193
206
|
const el = document.createElement("div");
|
|
194
|
-
el.className = [cardStyles.root,
|
|
207
|
+
el.className = [cardStyles.root, effectiveClass].filter(Boolean).join(" ");
|
|
195
208
|
for (const node of resolveChildren5(children)) {
|
|
196
209
|
el.appendChild(node);
|
|
197
210
|
}
|
|
198
211
|
return el;
|
|
199
212
|
}
|
|
200
|
-
function CardHeader({ class:
|
|
213
|
+
function CardHeader({ className, class: classProp, children }) {
|
|
214
|
+
const effectiveClass = className ?? classProp;
|
|
201
215
|
const el = document.createElement("div");
|
|
202
|
-
el.className = [cardStyles.header,
|
|
216
|
+
el.className = [cardStyles.header, effectiveClass].filter(Boolean).join(" ");
|
|
203
217
|
for (const node of resolveChildren5(children)) {
|
|
204
218
|
el.appendChild(node);
|
|
205
219
|
}
|
|
206
220
|
return el;
|
|
207
221
|
}
|
|
208
|
-
function CardTitle({ class:
|
|
222
|
+
function CardTitle({ className, class: classProp, children }) {
|
|
223
|
+
const effectiveClass = className ?? classProp;
|
|
209
224
|
const el = document.createElement("h3");
|
|
210
|
-
el.className = [cardStyles.title,
|
|
225
|
+
el.className = [cardStyles.title, effectiveClass].filter(Boolean).join(" ");
|
|
211
226
|
for (const node of resolveChildren5(children)) {
|
|
212
227
|
el.appendChild(node);
|
|
213
228
|
}
|
|
214
229
|
return el;
|
|
215
230
|
}
|
|
216
|
-
function CardDescription({
|
|
231
|
+
function CardDescription({
|
|
232
|
+
className,
|
|
233
|
+
class: classProp,
|
|
234
|
+
children
|
|
235
|
+
}) {
|
|
236
|
+
const effectiveClass = className ?? classProp;
|
|
217
237
|
const el = document.createElement("p");
|
|
218
|
-
el.className = [cardStyles.description,
|
|
238
|
+
el.className = [cardStyles.description, effectiveClass].filter(Boolean).join(" ");
|
|
219
239
|
for (const node of resolveChildren5(children)) {
|
|
220
240
|
el.appendChild(node);
|
|
221
241
|
}
|
|
222
242
|
return el;
|
|
223
243
|
}
|
|
224
|
-
function CardContent({ class:
|
|
244
|
+
function CardContent({ className, class: classProp, children }) {
|
|
245
|
+
const effectiveClass = className ?? classProp;
|
|
225
246
|
const el = document.createElement("div");
|
|
226
|
-
el.className = [cardStyles.content,
|
|
247
|
+
el.className = [cardStyles.content, effectiveClass].filter(Boolean).join(" ");
|
|
227
248
|
for (const node of resolveChildren5(children)) {
|
|
228
249
|
el.appendChild(node);
|
|
229
250
|
}
|
|
230
251
|
return el;
|
|
231
252
|
}
|
|
232
|
-
function CardFooter({ class:
|
|
253
|
+
function CardFooter({ className, class: classProp, children }) {
|
|
254
|
+
const effectiveClass = className ?? classProp;
|
|
233
255
|
const el = document.createElement("div");
|
|
234
|
-
el.className = [cardStyles.footer,
|
|
256
|
+
el.className = [cardStyles.footer, effectiveClass].filter(Boolean).join(" ");
|
|
235
257
|
for (const node of resolveChildren5(children)) {
|
|
236
258
|
el.appendChild(node);
|
|
237
259
|
}
|
|
238
260
|
return el;
|
|
239
261
|
}
|
|
240
|
-
function CardAction({ class:
|
|
262
|
+
function CardAction({ className, class: classProp, children }) {
|
|
263
|
+
const effectiveClass = className ?? classProp;
|
|
241
264
|
const el = document.createElement("div");
|
|
242
|
-
el.className = [cardStyles.action,
|
|
265
|
+
el.className = [cardStyles.action, effectiveClass].filter(Boolean).join(" ");
|
|
243
266
|
for (const node of resolveChildren5(children)) {
|
|
244
267
|
el.appendChild(node);
|
|
245
268
|
}
|
|
@@ -259,17 +282,19 @@ function createCardComponents(cardStyles) {
|
|
|
259
282
|
// src/components/form-group.ts
|
|
260
283
|
import { resolveChildren as resolveChildren6 } from "@vertz/ui";
|
|
261
284
|
function createFormGroupComponents(formGroupStyles) {
|
|
262
|
-
function FormGroup({ class:
|
|
285
|
+
function FormGroup({ className, class: classProp, children }) {
|
|
286
|
+
const effectiveClass = className ?? classProp;
|
|
263
287
|
const el = document.createElement("div");
|
|
264
|
-
el.className = [formGroupStyles.base,
|
|
288
|
+
el.className = [formGroupStyles.base, effectiveClass].filter(Boolean).join(" ");
|
|
265
289
|
for (const node of resolveChildren6(children)) {
|
|
266
290
|
el.appendChild(node);
|
|
267
291
|
}
|
|
268
292
|
return el;
|
|
269
293
|
}
|
|
270
|
-
function FormError({ class:
|
|
294
|
+
function FormError({ className, class: classProp, children }) {
|
|
295
|
+
const effectiveClass = className ?? classProp;
|
|
271
296
|
const el = document.createElement("span");
|
|
272
|
-
el.className = [formGroupStyles.error,
|
|
297
|
+
el.className = [formGroupStyles.error, effectiveClass].filter(Boolean).join(" ");
|
|
273
298
|
for (const node of resolveChildren6(children)) {
|
|
274
299
|
el.appendChild(node);
|
|
275
300
|
}
|
|
@@ -282,9 +307,11 @@ function createFormGroupComponents(formGroupStyles) {
|
|
|
282
307
|
}
|
|
283
308
|
|
|
284
309
|
// src/components/input.ts
|
|
310
|
+
import { applyProps as applyProps2 } from "@vertz/ui-primitives/utils";
|
|
285
311
|
function createInputComponent(inputStyles) {
|
|
286
312
|
return function Input({
|
|
287
|
-
|
|
313
|
+
className,
|
|
314
|
+
class: classProp,
|
|
288
315
|
name,
|
|
289
316
|
placeholder,
|
|
290
317
|
type,
|
|
@@ -292,8 +319,9 @@ function createInputComponent(inputStyles) {
|
|
|
292
319
|
value,
|
|
293
320
|
...attrs
|
|
294
321
|
}) {
|
|
322
|
+
const effectiveClass = className ?? classProp;
|
|
295
323
|
const el = document.createElement("input");
|
|
296
|
-
el.className = [inputStyles.base,
|
|
324
|
+
el.className = [inputStyles.base, effectiveClass].filter(Boolean).join(" ");
|
|
297
325
|
if (name !== undefined)
|
|
298
326
|
el.name = name;
|
|
299
327
|
if (placeholder !== undefined)
|
|
@@ -304,11 +332,7 @@ function createInputComponent(inputStyles) {
|
|
|
304
332
|
el.disabled = true;
|
|
305
333
|
if (value !== undefined)
|
|
306
334
|
el.value = value;
|
|
307
|
-
|
|
308
|
-
if (val !== undefined && val !== null) {
|
|
309
|
-
el.setAttribute(key, String(val));
|
|
310
|
-
}
|
|
311
|
-
}
|
|
335
|
+
applyProps2(el, attrs);
|
|
312
336
|
return el;
|
|
313
337
|
};
|
|
314
338
|
}
|
|
@@ -317,12 +341,14 @@ function createInputComponent(inputStyles) {
|
|
|
317
341
|
import { resolveChildren as resolveChildren7 } from "@vertz/ui";
|
|
318
342
|
function createLabelComponent(labelStyles) {
|
|
319
343
|
return function Label({
|
|
320
|
-
|
|
344
|
+
className,
|
|
345
|
+
class: classProp,
|
|
321
346
|
for: htmlFor,
|
|
322
347
|
children
|
|
323
348
|
}) {
|
|
349
|
+
const effectiveClass = className ?? classProp;
|
|
324
350
|
const el = document.createElement("label");
|
|
325
|
-
el.className = [labelStyles.base,
|
|
351
|
+
el.className = [labelStyles.base, effectiveClass].filter(Boolean).join(" ");
|
|
326
352
|
if (htmlFor !== undefined)
|
|
327
353
|
el.htmlFor = htmlFor;
|
|
328
354
|
for (const node of resolveChildren7(children)) {
|
|
@@ -335,13 +361,21 @@ function createLabelComponent(labelStyles) {
|
|
|
335
361
|
// src/components/pagination.ts
|
|
336
362
|
function createPaginationComponent(styles) {
|
|
337
363
|
return function Pagination(props) {
|
|
338
|
-
const {
|
|
364
|
+
const {
|
|
365
|
+
currentPage,
|
|
366
|
+
totalPages,
|
|
367
|
+
onPageChange,
|
|
368
|
+
siblingCount = 1,
|
|
369
|
+
className,
|
|
370
|
+
class: classProp
|
|
371
|
+
} = props;
|
|
372
|
+
const effectiveClass = className ?? classProp;
|
|
339
373
|
const nav = document.createElement("nav");
|
|
340
374
|
nav.setAttribute("aria-label", "Pagination");
|
|
341
375
|
if (styles.nav)
|
|
342
376
|
nav.classList.add(styles.nav);
|
|
343
|
-
if (
|
|
344
|
-
nav.classList.add(
|
|
377
|
+
if (effectiveClass)
|
|
378
|
+
nav.classList.add(effectiveClass);
|
|
345
379
|
const ul = document.createElement("ul");
|
|
346
380
|
ul.classList.add(styles.list);
|
|
347
381
|
const prevLi = document.createElement("li");
|
|
@@ -424,597 +458,245 @@ function generatePaginationRange(current, total, siblings) {
|
|
|
424
458
|
}
|
|
425
459
|
|
|
426
460
|
// src/components/primitives/accordion.ts
|
|
427
|
-
import {
|
|
428
|
-
import { Accordion } from "@vertz/ui-primitives";
|
|
461
|
+
import { ComposedAccordion, withStyles } from "@vertz/ui-primitives";
|
|
429
462
|
function createThemedAccordion(styles) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
})
|
|
435
|
-
const el = document.createElement("div");
|
|
436
|
-
el.dataset.slot = "accordion-item";
|
|
437
|
-
el.dataset.value = value;
|
|
438
|
-
el.style.display = "contents";
|
|
439
|
-
if (className)
|
|
440
|
-
el.classList.add(className);
|
|
441
|
-
for (const node of resolveChildren8(children))
|
|
442
|
-
el.appendChild(node);
|
|
443
|
-
return el;
|
|
444
|
-
}
|
|
445
|
-
function AccordionTrigger({ children, class: className }) {
|
|
446
|
-
const el = document.createElement("span");
|
|
447
|
-
el.dataset.slot = "accordion-trigger";
|
|
448
|
-
el.style.display = "contents";
|
|
449
|
-
if (className)
|
|
450
|
-
el.classList.add(className);
|
|
451
|
-
for (const node of resolveChildren8(children))
|
|
452
|
-
el.appendChild(node);
|
|
453
|
-
return el;
|
|
454
|
-
}
|
|
455
|
-
function AccordionContent({ children, class: className }) {
|
|
456
|
-
const el = document.createElement("div");
|
|
457
|
-
el.dataset.slot = "accordion-content";
|
|
458
|
-
el.style.display = "contents";
|
|
459
|
-
if (className)
|
|
460
|
-
el.classList.add(className);
|
|
461
|
-
for (const node of resolveChildren8(children))
|
|
462
|
-
el.appendChild(node);
|
|
463
|
-
return el;
|
|
464
|
-
}
|
|
463
|
+
const StyledAccordion = withStyles(ComposedAccordion, {
|
|
464
|
+
item: styles.item,
|
|
465
|
+
trigger: styles.trigger,
|
|
466
|
+
content: styles.content
|
|
467
|
+
});
|
|
465
468
|
function AccordionRoot({ type, defaultValue, children }) {
|
|
466
|
-
|
|
467
|
-
multiple: type === "multiple",
|
|
468
|
-
defaultValue
|
|
469
|
-
});
|
|
470
|
-
for (const node of resolveChildren8(children)) {
|
|
471
|
-
if (!(node instanceof HTMLElement))
|
|
472
|
-
continue;
|
|
473
|
-
if (node.dataset.slot !== "accordion-item")
|
|
474
|
-
continue;
|
|
475
|
-
const value = node.dataset.value;
|
|
476
|
-
if (!value)
|
|
477
|
-
continue;
|
|
478
|
-
const item = result.Item(value);
|
|
479
|
-
item.item.classList.add(styles.item);
|
|
480
|
-
item.trigger.classList.add(styles.trigger);
|
|
481
|
-
item.content.classList.add(styles.content);
|
|
482
|
-
const inner = document.createElement("div");
|
|
483
|
-
inner.style.cssText = "padding: 0.5rem 0.5rem 1rem;";
|
|
484
|
-
for (const child of Array.from(node.childNodes)) {
|
|
485
|
-
if (!(child instanceof HTMLElement))
|
|
486
|
-
continue;
|
|
487
|
-
const slot = child.dataset.slot;
|
|
488
|
-
if (slot === "accordion-trigger") {
|
|
489
|
-
for (const n of Array.from(child.childNodes)) {
|
|
490
|
-
item.trigger.appendChild(n);
|
|
491
|
-
}
|
|
492
|
-
} else if (slot === "accordion-content") {
|
|
493
|
-
for (const n of Array.from(child.childNodes)) {
|
|
494
|
-
inner.appendChild(n);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
if (inner.childNodes.length > 0)
|
|
499
|
-
item.content.appendChild(inner);
|
|
500
|
-
}
|
|
501
|
-
return result.root;
|
|
469
|
+
return StyledAccordion({ children, type, defaultValue });
|
|
502
470
|
}
|
|
503
|
-
AccordionRoot
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
471
|
+
return Object.assign(AccordionRoot, {
|
|
472
|
+
Item: ComposedAccordion.Item,
|
|
473
|
+
Trigger: ComposedAccordion.Trigger,
|
|
474
|
+
Content: ComposedAccordion.Content
|
|
475
|
+
});
|
|
507
476
|
}
|
|
508
477
|
|
|
509
478
|
// src/components/primitives/alert-dialog.ts
|
|
510
|
-
import {
|
|
511
|
-
import { Dialog } from "@vertz/ui-primitives";
|
|
512
|
-
var idCounter = 0;
|
|
479
|
+
import { ComposedAlertDialog, withStyles as withStyles2 } from "@vertz/ui-primitives";
|
|
513
480
|
function createThemedAlertDialog(styles) {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
const el = document.createElement("div");
|
|
525
|
-
el.dataset.slot = "alertdialog-content";
|
|
526
|
-
el.style.display = "contents";
|
|
527
|
-
for (const node of resolveChildren9(children)) {
|
|
528
|
-
el.appendChild(node);
|
|
529
|
-
}
|
|
530
|
-
return el;
|
|
531
|
-
}
|
|
532
|
-
function AlertDialogTitle({
|
|
533
|
-
children,
|
|
534
|
-
class: className
|
|
535
|
-
}) {
|
|
536
|
-
const el = document.createElement("h2");
|
|
537
|
-
el.classList.add(styles.title);
|
|
538
|
-
if (className)
|
|
539
|
-
el.classList.add(className);
|
|
540
|
-
for (const node of resolveChildren9(children)) {
|
|
541
|
-
el.appendChild(node);
|
|
542
|
-
}
|
|
543
|
-
return el;
|
|
544
|
-
}
|
|
545
|
-
function AlertDialogDescription({
|
|
546
|
-
children,
|
|
547
|
-
class: className
|
|
548
|
-
}) {
|
|
549
|
-
const el = document.createElement("p");
|
|
550
|
-
el.classList.add(styles.description);
|
|
551
|
-
if (className)
|
|
552
|
-
el.classList.add(className);
|
|
553
|
-
for (const node of resolveChildren9(children)) {
|
|
554
|
-
el.appendChild(node);
|
|
555
|
-
}
|
|
556
|
-
return el;
|
|
557
|
-
}
|
|
558
|
-
function AlertDialogFooter({ children, class: className }) {
|
|
559
|
-
const el = document.createElement("div");
|
|
560
|
-
el.classList.add(styles.footer);
|
|
561
|
-
if (className)
|
|
562
|
-
el.classList.add(className);
|
|
563
|
-
for (const node of resolveChildren9(children)) {
|
|
564
|
-
el.appendChild(node);
|
|
565
|
-
}
|
|
566
|
-
return el;
|
|
567
|
-
}
|
|
568
|
-
function AlertDialogCancel({
|
|
569
|
-
children,
|
|
570
|
-
class: className
|
|
571
|
-
}) {
|
|
572
|
-
const el = document.createElement("button");
|
|
573
|
-
el.setAttribute("type", "button");
|
|
574
|
-
el.classList.add(styles.cancel);
|
|
575
|
-
if (className)
|
|
576
|
-
el.classList.add(className);
|
|
577
|
-
for (const node of resolveChildren9(children)) {
|
|
578
|
-
el.appendChild(node);
|
|
579
|
-
}
|
|
580
|
-
return el;
|
|
581
|
-
}
|
|
582
|
-
function AlertDialogAction({
|
|
583
|
-
children,
|
|
584
|
-
class: className
|
|
585
|
-
}) {
|
|
586
|
-
const el = document.createElement("button");
|
|
587
|
-
el.setAttribute("type", "button");
|
|
588
|
-
el.classList.add(styles.action);
|
|
589
|
-
if (className)
|
|
590
|
-
el.classList.add(className);
|
|
591
|
-
for (const node of resolveChildren9(children)) {
|
|
592
|
-
el.appendChild(node);
|
|
593
|
-
}
|
|
594
|
-
return el;
|
|
595
|
-
}
|
|
596
|
-
function AlertDialogRoot({ children, ...options }) {
|
|
597
|
-
const onOpenChangeOrig = options.onOpenChange;
|
|
598
|
-
let userTrigger = null;
|
|
599
|
-
let contentChildren = [];
|
|
600
|
-
for (const node of resolveChildren9(children)) {
|
|
601
|
-
if (!(node instanceof HTMLElement))
|
|
602
|
-
continue;
|
|
603
|
-
const slot = node.dataset.slot;
|
|
604
|
-
if (slot === "alertdialog-trigger") {
|
|
605
|
-
userTrigger = node.firstElementChild ?? node;
|
|
606
|
-
} else if (slot === "alertdialog-content") {
|
|
607
|
-
contentChildren = Array.from(node.childNodes);
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
const primitive = Dialog.Root({
|
|
611
|
-
modal: true,
|
|
612
|
-
...options,
|
|
613
|
-
onOpenChange: (isOpen) => {
|
|
614
|
-
if (userTrigger) {
|
|
615
|
-
userTrigger.setAttribute("aria-expanded", String(isOpen));
|
|
616
|
-
userTrigger.setAttribute("data-state", isOpen ? "open" : "closed");
|
|
617
|
-
}
|
|
618
|
-
onOpenChangeOrig?.(isOpen);
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
|
-
primitive.content.setAttribute("role", "alertdialog");
|
|
622
|
-
primitive.overlay.addEventListener("click", (e) => {
|
|
623
|
-
e.stopImmediatePropagation();
|
|
624
|
-
e.preventDefault();
|
|
625
|
-
}, { capture: true });
|
|
626
|
-
primitive.content.addEventListener("keydown", (e) => {
|
|
627
|
-
if (e.key === "Escape") {
|
|
628
|
-
e.stopImmediatePropagation();
|
|
629
|
-
e.preventDefault();
|
|
630
|
-
}
|
|
631
|
-
}, { capture: true });
|
|
632
|
-
primitive.overlay.classList.add(styles.overlay);
|
|
633
|
-
primitive.content.classList.add(styles.panel);
|
|
634
|
-
const descriptionId = `alertdialog-desc-${++idCounter}`;
|
|
635
|
-
for (const node of contentChildren) {
|
|
636
|
-
primitive.content.appendChild(node);
|
|
637
|
-
}
|
|
638
|
-
const descriptionEl = primitive.content.querySelector(`.${styles.description}`);
|
|
639
|
-
if (descriptionEl) {
|
|
640
|
-
descriptionEl.id = descriptionId;
|
|
641
|
-
primitive.content.setAttribute("aria-describedby", descriptionId);
|
|
642
|
-
}
|
|
643
|
-
const cancelButtons = primitive.content.querySelectorAll(`.${styles.cancel}`);
|
|
644
|
-
for (const btn of cancelButtons) {
|
|
645
|
-
btn.addEventListener("click", () => {
|
|
646
|
-
primitive.hide();
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
const actionButtons = primitive.content.querySelectorAll(`.${styles.action}`);
|
|
650
|
-
for (const btn of actionButtons) {
|
|
651
|
-
btn.addEventListener("click", () => {
|
|
652
|
-
primitive.hide();
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
document.body.appendChild(primitive.overlay);
|
|
656
|
-
document.body.appendChild(primitive.content);
|
|
657
|
-
if (userTrigger) {
|
|
658
|
-
userTrigger.setAttribute("aria-haspopup", "dialog");
|
|
659
|
-
userTrigger.setAttribute("aria-controls", primitive.content.id);
|
|
660
|
-
userTrigger.setAttribute("aria-expanded", String(options.defaultOpen ?? false));
|
|
661
|
-
userTrigger.setAttribute("data-state", options.defaultOpen ? "open" : "closed");
|
|
662
|
-
userTrigger.addEventListener("click", () => {
|
|
663
|
-
if (primitive.state.open.peek()) {
|
|
664
|
-
primitive.hide();
|
|
665
|
-
} else {
|
|
666
|
-
primitive.show();
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
return userTrigger;
|
|
670
|
-
}
|
|
671
|
-
return primitive.trigger;
|
|
672
|
-
}
|
|
673
|
-
AlertDialogRoot.Trigger = AlertDialogTrigger;
|
|
674
|
-
AlertDialogRoot.Content = AlertDialogContent;
|
|
675
|
-
AlertDialogRoot.Title = AlertDialogTitle;
|
|
676
|
-
AlertDialogRoot.Description = AlertDialogDescription;
|
|
677
|
-
AlertDialogRoot.Footer = AlertDialogFooter;
|
|
678
|
-
AlertDialogRoot.Cancel = AlertDialogCancel;
|
|
679
|
-
AlertDialogRoot.Action = AlertDialogAction;
|
|
680
|
-
return AlertDialogRoot;
|
|
481
|
+
return withStyles2(ComposedAlertDialog, {
|
|
482
|
+
overlay: styles.overlay,
|
|
483
|
+
content: styles.panel,
|
|
484
|
+
cancel: styles.cancel,
|
|
485
|
+
action: styles.action,
|
|
486
|
+
title: styles.title,
|
|
487
|
+
description: styles.description,
|
|
488
|
+
footer: styles.footer,
|
|
489
|
+
header: ""
|
|
490
|
+
});
|
|
681
491
|
}
|
|
682
492
|
|
|
683
493
|
// src/components/primitives/calendar.ts
|
|
684
|
-
import {
|
|
494
|
+
import { ComposedCalendar, withStyles as withStyles3 } from "@vertz/ui-primitives";
|
|
685
495
|
function createThemedCalendar(styles) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
td.classList.add(styles.cell);
|
|
699
|
-
}
|
|
700
|
-
for (const btn of result.grid.querySelectorAll("button")) {
|
|
701
|
-
btn.classList.add(styles.dayButton);
|
|
702
|
-
}
|
|
703
|
-
return result;
|
|
496
|
+
const StyledCalendar = withStyles3(ComposedCalendar, {
|
|
497
|
+
root: styles.root,
|
|
498
|
+
header: styles.header,
|
|
499
|
+
title: styles.title,
|
|
500
|
+
navButton: styles.navButton,
|
|
501
|
+
grid: styles.grid,
|
|
502
|
+
headCell: styles.headCell,
|
|
503
|
+
cell: styles.cell,
|
|
504
|
+
dayButton: styles.dayButton
|
|
505
|
+
});
|
|
506
|
+
return function CalendarRoot(props) {
|
|
507
|
+
return StyledCalendar(props);
|
|
704
508
|
};
|
|
705
509
|
}
|
|
706
510
|
|
|
707
511
|
// src/components/primitives/carousel.ts
|
|
708
|
-
import {
|
|
512
|
+
import { ComposedCarousel, withStyles as withStyles4 } from "@vertz/ui-primitives";
|
|
709
513
|
function createThemedCarousel(styles) {
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
514
|
+
const StyledCarousel = withStyles4(ComposedCarousel, {
|
|
515
|
+
root: styles.root,
|
|
516
|
+
viewport: styles.viewport,
|
|
517
|
+
slide: styles.slide,
|
|
518
|
+
prevButton: styles.prevButton,
|
|
519
|
+
nextButton: styles.nextButton
|
|
520
|
+
});
|
|
521
|
+
function CarouselRoot({
|
|
522
|
+
orientation,
|
|
523
|
+
loop,
|
|
524
|
+
defaultIndex,
|
|
525
|
+
onSlideChange,
|
|
526
|
+
children
|
|
527
|
+
}) {
|
|
528
|
+
return StyledCarousel({
|
|
529
|
+
children,
|
|
530
|
+
orientation,
|
|
531
|
+
loop,
|
|
532
|
+
defaultIndex,
|
|
533
|
+
onSlideChange
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
return Object.assign(CarouselRoot, {
|
|
537
|
+
Slide: ComposedCarousel.Slide,
|
|
538
|
+
Previous: ComposedCarousel.Previous,
|
|
539
|
+
Next: ComposedCarousel.Next
|
|
540
|
+
});
|
|
733
541
|
}
|
|
734
542
|
|
|
735
543
|
// src/components/primitives/checkbox.ts
|
|
736
|
-
import {
|
|
737
|
-
function createCheckIcon() {
|
|
738
|
-
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
739
|
-
svg.setAttribute("width", "12");
|
|
740
|
-
svg.setAttribute("height", "12");
|
|
741
|
-
svg.setAttribute("viewBox", "0 0 24 24");
|
|
742
|
-
svg.setAttribute("fill", "none");
|
|
743
|
-
svg.setAttribute("stroke", "currentColor");
|
|
744
|
-
svg.setAttribute("stroke-width", "3");
|
|
745
|
-
svg.setAttribute("stroke-linecap", "round");
|
|
746
|
-
svg.setAttribute("stroke-linejoin", "round");
|
|
747
|
-
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
748
|
-
path.setAttribute("d", "M20 6L9 17l-5-5");
|
|
749
|
-
svg.appendChild(path);
|
|
750
|
-
return svg;
|
|
751
|
-
}
|
|
544
|
+
import { ComposedCheckbox, withStyles as withStyles5 } from "@vertz/ui-primitives";
|
|
752
545
|
function createThemedCheckbox(styles) {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
indicator.setAttribute("data-state", dataState);
|
|
760
|
-
indicator.appendChild(createCheckIcon());
|
|
761
|
-
root.appendChild(indicator);
|
|
762
|
-
const observer = new MutationObserver((mutations) => {
|
|
763
|
-
for (const mutation of mutations) {
|
|
764
|
-
if (mutation.attributeName === "data-state") {
|
|
765
|
-
const newState = root.getAttribute("data-state") ?? "unchecked";
|
|
766
|
-
indicator.setAttribute("data-state", newState);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
observer.observe(root, { attributes: true, attributeFilter: ["data-state"] });
|
|
771
|
-
return root;
|
|
546
|
+
const StyledCheckbox = withStyles5(ComposedCheckbox, {
|
|
547
|
+
root: styles.root,
|
|
548
|
+
indicator: styles.indicator
|
|
549
|
+
});
|
|
550
|
+
return function CheckboxRoot(props) {
|
|
551
|
+
return StyledCheckbox(props);
|
|
772
552
|
};
|
|
773
553
|
}
|
|
774
554
|
|
|
775
|
-
// src/components/primitives/collapsible.
|
|
776
|
-
import {
|
|
555
|
+
// src/components/primitives/collapsible.tsx
|
|
556
|
+
import { ComposedCollapsible } from "@vertz/ui-primitives";
|
|
777
557
|
function createThemedCollapsible(styles) {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
558
|
+
function CollapsibleRoot({
|
|
559
|
+
children,
|
|
560
|
+
defaultOpen,
|
|
561
|
+
disabled,
|
|
562
|
+
onOpenChange
|
|
563
|
+
}) {
|
|
564
|
+
return ComposedCollapsible({
|
|
565
|
+
children,
|
|
566
|
+
defaultOpen,
|
|
567
|
+
disabled,
|
|
568
|
+
onOpenChange,
|
|
569
|
+
classes: {
|
|
570
|
+
content: styles.content
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
return Object.assign(CollapsibleRoot, {
|
|
575
|
+
Trigger: ComposedCollapsible.Trigger,
|
|
576
|
+
Content: ComposedCollapsible.Content
|
|
577
|
+
});
|
|
783
578
|
}
|
|
784
579
|
|
|
785
|
-
// src/components/primitives/command.
|
|
786
|
-
import {
|
|
580
|
+
// src/components/primitives/command.tsx
|
|
581
|
+
import { ComposedCommand, withStyles as withStyles6 } from "@vertz/ui-primitives";
|
|
787
582
|
function createThemedCommand(styles) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
return sep;
|
|
822
|
-
};
|
|
823
|
-
return result;
|
|
824
|
-
};
|
|
583
|
+
const Styled = withStyles6(ComposedCommand, {
|
|
584
|
+
root: styles.root,
|
|
585
|
+
input: styles.input,
|
|
586
|
+
list: styles.list,
|
|
587
|
+
item: styles.item,
|
|
588
|
+
group: styles.group,
|
|
589
|
+
groupHeading: styles.groupHeading,
|
|
590
|
+
separator: styles.separator,
|
|
591
|
+
empty: styles.empty
|
|
592
|
+
});
|
|
593
|
+
function CommandRoot({
|
|
594
|
+
children,
|
|
595
|
+
filter,
|
|
596
|
+
onSelect,
|
|
597
|
+
onInputChange,
|
|
598
|
+
placeholder
|
|
599
|
+
}) {
|
|
600
|
+
return Styled({
|
|
601
|
+
children,
|
|
602
|
+
filter,
|
|
603
|
+
onSelect,
|
|
604
|
+
onInputChange,
|
|
605
|
+
placeholder
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
return Object.assign(CommandRoot, {
|
|
609
|
+
Input: ComposedCommand.Input,
|
|
610
|
+
List: ComposedCommand.List,
|
|
611
|
+
Empty: ComposedCommand.Empty,
|
|
612
|
+
Item: ComposedCommand.Item,
|
|
613
|
+
Group: ComposedCommand.Group,
|
|
614
|
+
Separator: ComposedCommand.Separator
|
|
615
|
+
});
|
|
825
616
|
}
|
|
826
617
|
|
|
827
618
|
// src/components/primitives/context-menu.ts
|
|
828
|
-
import {
|
|
829
|
-
var idCounter2 = 0;
|
|
619
|
+
import { ComposedContextMenu, withStyles as withStyles7 } from "@vertz/ui-primitives";
|
|
830
620
|
function createThemedContextMenu(styles) {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
group.el.classList.add(styles.group);
|
|
850
|
-
const labelEl = document.createElement("div");
|
|
851
|
-
labelEl.id = `ctx-menu-group-label-${++idCounter2}`;
|
|
852
|
-
labelEl.textContent = label;
|
|
853
|
-
labelEl.classList.add(styles.label);
|
|
854
|
-
group.el.removeAttribute("aria-label");
|
|
855
|
-
group.el.setAttribute("aria-labelledby", labelEl.id);
|
|
856
|
-
group.el.prepend(labelEl);
|
|
857
|
-
return {
|
|
858
|
-
el: group.el,
|
|
859
|
-
Item: (value, itemLabel) => {
|
|
860
|
-
const item = group.Item(value, itemLabel);
|
|
861
|
-
item.classList.add(styles.item);
|
|
862
|
-
return item;
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
},
|
|
866
|
-
Separator: () => {
|
|
867
|
-
const sep = result.Separator();
|
|
868
|
-
sep.classList.add(styles.separator);
|
|
869
|
-
return sep;
|
|
870
|
-
},
|
|
871
|
-
Label: (text) => {
|
|
872
|
-
const el = result.Label(text);
|
|
873
|
-
el.classList.add(styles.label);
|
|
874
|
-
return el;
|
|
875
|
-
}
|
|
876
|
-
};
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
// src/components/primitives/date-picker.ts
|
|
881
|
-
import { DatePicker } from "@vertz/ui-primitives";
|
|
882
|
-
function createThemedDatePicker(styles) {
|
|
883
|
-
return function themedDatePicker(options) {
|
|
884
|
-
const result = DatePicker.Root(options);
|
|
885
|
-
result.trigger.classList.add(styles.trigger);
|
|
886
|
-
result.content.classList.add(styles.content);
|
|
887
|
-
return result;
|
|
888
|
-
};
|
|
621
|
+
const Styled = withStyles7(ComposedContextMenu, {
|
|
622
|
+
content: styles.content,
|
|
623
|
+
item: styles.item,
|
|
624
|
+
group: styles.group,
|
|
625
|
+
label: styles.label,
|
|
626
|
+
separator: styles.separator
|
|
627
|
+
});
|
|
628
|
+
function ContextMenuRoot({ children, onSelect }) {
|
|
629
|
+
return Styled({ children, onSelect });
|
|
630
|
+
}
|
|
631
|
+
return Object.assign(ContextMenuRoot, {
|
|
632
|
+
Trigger: ComposedContextMenu.Trigger,
|
|
633
|
+
Content: ComposedContextMenu.Content,
|
|
634
|
+
Item: ComposedContextMenu.Item,
|
|
635
|
+
Group: ComposedContextMenu.Group,
|
|
636
|
+
Label: ComposedContextMenu.Label,
|
|
637
|
+
Separator: ComposedContextMenu.Separator
|
|
638
|
+
});
|
|
889
639
|
}
|
|
890
640
|
|
|
891
|
-
// src/components/primitives/
|
|
892
|
-
import {
|
|
893
|
-
|
|
894
|
-
function
|
|
895
|
-
function DialogTrigger({ children }) {
|
|
896
|
-
const el = document.createElement("span");
|
|
897
|
-
el.dataset.slot = "dialog-trigger";
|
|
898
|
-
el.style.display = "contents";
|
|
899
|
-
for (const node of resolveChildren10(children)) {
|
|
900
|
-
el.appendChild(node);
|
|
901
|
-
}
|
|
902
|
-
return el;
|
|
903
|
-
}
|
|
904
|
-
function DialogContent({ children }) {
|
|
905
|
-
const el = document.createElement("div");
|
|
906
|
-
el.dataset.slot = "dialog-content";
|
|
907
|
-
el.style.display = "contents";
|
|
908
|
-
for (const node of resolveChildren10(children)) {
|
|
909
|
-
el.appendChild(node);
|
|
910
|
-
}
|
|
911
|
-
return el;
|
|
912
|
-
}
|
|
913
|
-
function DialogHeader({ children, class: className }) {
|
|
914
|
-
const el = document.createElement("div");
|
|
915
|
-
el.classList.add(styles.header);
|
|
916
|
-
if (className)
|
|
917
|
-
el.classList.add(className);
|
|
918
|
-
for (const node of resolveChildren10(children)) {
|
|
919
|
-
el.appendChild(node);
|
|
920
|
-
}
|
|
921
|
-
return el;
|
|
922
|
-
}
|
|
923
|
-
function DialogTitle({ children, class: className }) {
|
|
924
|
-
const el = document.createElement("h2");
|
|
925
|
-
el.classList.add(styles.title);
|
|
926
|
-
if (className)
|
|
927
|
-
el.classList.add(className);
|
|
928
|
-
for (const node of resolveChildren10(children)) {
|
|
929
|
-
el.appendChild(node);
|
|
930
|
-
}
|
|
931
|
-
return el;
|
|
932
|
-
}
|
|
933
|
-
function DialogDescription({
|
|
641
|
+
// src/components/primitives/date-picker.tsx
|
|
642
|
+
import { ComposedDatePicker } from "@vertz/ui-primitives";
|
|
643
|
+
function createThemedDatePicker(styles, calendarClasses) {
|
|
644
|
+
function DatePickerRoot({
|
|
934
645
|
children,
|
|
935
|
-
|
|
646
|
+
mode,
|
|
647
|
+
defaultValue,
|
|
648
|
+
defaultMonth,
|
|
649
|
+
minDate,
|
|
650
|
+
maxDate,
|
|
651
|
+
disabled,
|
|
652
|
+
formatDate,
|
|
653
|
+
placeholder,
|
|
654
|
+
onValueChange,
|
|
655
|
+
onOpenChange
|
|
936
656
|
}) {
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
}
|
|
954
|
-
return el;
|
|
955
|
-
}
|
|
956
|
-
function DialogRoot({ children, ...options }) {
|
|
957
|
-
const onOpenChangeOrig = options.onOpenChange;
|
|
958
|
-
let userTrigger = null;
|
|
959
|
-
let contentChildren = [];
|
|
960
|
-
for (const node of resolveChildren10(children)) {
|
|
961
|
-
if (!(node instanceof HTMLElement))
|
|
962
|
-
continue;
|
|
963
|
-
const slot = node.dataset.slot;
|
|
964
|
-
if (slot === "dialog-trigger") {
|
|
965
|
-
userTrigger = node.firstElementChild ?? node;
|
|
966
|
-
} else if (slot === "dialog-content") {
|
|
967
|
-
contentChildren = Array.from(node.childNodes);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
const primitive = Dialog2.Root({
|
|
971
|
-
...options,
|
|
972
|
-
onOpenChange: (isOpen) => {
|
|
973
|
-
if (userTrigger) {
|
|
974
|
-
userTrigger.setAttribute("aria-expanded", String(isOpen));
|
|
975
|
-
userTrigger.setAttribute("data-state", isOpen ? "open" : "closed");
|
|
976
|
-
}
|
|
977
|
-
onOpenChangeOrig?.(isOpen);
|
|
657
|
+
return ComposedDatePicker({
|
|
658
|
+
children,
|
|
659
|
+
mode,
|
|
660
|
+
defaultValue,
|
|
661
|
+
defaultMonth,
|
|
662
|
+
minDate,
|
|
663
|
+
maxDate,
|
|
664
|
+
disabled,
|
|
665
|
+
formatDate,
|
|
666
|
+
placeholder,
|
|
667
|
+
onValueChange,
|
|
668
|
+
onOpenChange,
|
|
669
|
+
classes: {
|
|
670
|
+
trigger: styles.trigger,
|
|
671
|
+
content: styles.content,
|
|
672
|
+
calendar: calendarClasses
|
|
978
673
|
}
|
|
979
674
|
});
|
|
980
|
-
primitive.overlay.classList.add(styles.overlay);
|
|
981
|
-
primitive.content.classList.add(styles.panel);
|
|
982
|
-
primitive.close.classList.add(styles.close);
|
|
983
|
-
primitive.close.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>';
|
|
984
|
-
primitive.close.setAttribute("aria-label", "Close");
|
|
985
|
-
for (const node of contentChildren) {
|
|
986
|
-
primitive.content.appendChild(node);
|
|
987
|
-
}
|
|
988
|
-
primitive.content.appendChild(primitive.close);
|
|
989
|
-
document.body.appendChild(primitive.overlay);
|
|
990
|
-
document.body.appendChild(primitive.content);
|
|
991
|
-
if (userTrigger) {
|
|
992
|
-
userTrigger.setAttribute("aria-haspopup", "dialog");
|
|
993
|
-
userTrigger.setAttribute("aria-controls", primitive.content.id);
|
|
994
|
-
userTrigger.setAttribute("aria-expanded", String(options.defaultOpen ?? false));
|
|
995
|
-
userTrigger.setAttribute("data-state", options.defaultOpen ? "open" : "closed");
|
|
996
|
-
userTrigger.addEventListener("click", () => {
|
|
997
|
-
if (primitive.state.open.peek()) {
|
|
998
|
-
primitive.hide();
|
|
999
|
-
} else {
|
|
1000
|
-
primitive.show();
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1003
|
-
return userTrigger;
|
|
1004
|
-
}
|
|
1005
|
-
return primitive.trigger;
|
|
1006
675
|
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
676
|
+
return Object.assign(DatePickerRoot, {
|
|
677
|
+
Trigger: ComposedDatePicker.Trigger,
|
|
678
|
+
Content: ComposedDatePicker.Content
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// src/components/primitives/dialog.ts
|
|
683
|
+
import { ComposedDialog, withStyles as withStyles8 } from "@vertz/ui-primitives";
|
|
684
|
+
function createThemedDialog(styles) {
|
|
685
|
+
return withStyles8(ComposedDialog, {
|
|
686
|
+
overlay: styles.overlay,
|
|
687
|
+
content: styles.panel,
|
|
688
|
+
close: styles.close,
|
|
689
|
+
header: styles.header,
|
|
690
|
+
title: styles.title,
|
|
691
|
+
description: styles.description,
|
|
692
|
+
footer: styles.footer
|
|
693
|
+
});
|
|
1014
694
|
}
|
|
1015
695
|
|
|
1016
|
-
// src/components/primitives/drawer.
|
|
1017
|
-
import {
|
|
696
|
+
// src/components/primitives/drawer.tsx
|
|
697
|
+
import { __element, __enterChildren, __exitChildren, __insert } from "@vertz/ui/internals";
|
|
698
|
+
import { resolveChildren as resolveChildren8 } from "@vertz/ui";
|
|
699
|
+
import { ComposedSheet } from "@vertz/ui-primitives";
|
|
1018
700
|
var PANEL_CLASS_MAP = {
|
|
1019
701
|
left: "panelLeft",
|
|
1020
702
|
right: "panelRight",
|
|
@@ -1022,557 +704,318 @@ var PANEL_CLASS_MAP = {
|
|
|
1022
704
|
bottom: "panelBottom"
|
|
1023
705
|
};
|
|
1024
706
|
function createThemedDrawer(styles) {
|
|
1025
|
-
|
|
1026
|
-
const
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
return { ...result, handle, description };
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
// src/components/primitives/dropdown-menu.ts
|
|
1045
|
-
import { resolveChildren as resolveChildren11 } from "@vertz/ui";
|
|
1046
|
-
import { Menu } from "@vertz/ui-primitives";
|
|
1047
|
-
var idCounter3 = 0;
|
|
1048
|
-
function createThemedDropdownMenu(styles) {
|
|
1049
|
-
function MenuTrigger({ children }) {
|
|
1050
|
-
const el = document.createElement("span");
|
|
1051
|
-
el.dataset.slot = "menu-trigger";
|
|
1052
|
-
el.style.display = "contents";
|
|
1053
|
-
for (const node of resolveChildren11(children))
|
|
1054
|
-
el.appendChild(node);
|
|
1055
|
-
return el;
|
|
1056
|
-
}
|
|
1057
|
-
function MenuContent({ children }) {
|
|
1058
|
-
const el = document.createElement("div");
|
|
1059
|
-
el.dataset.slot = "menu-content";
|
|
1060
|
-
el.style.display = "contents";
|
|
1061
|
-
for (const node of resolveChildren11(children))
|
|
1062
|
-
el.appendChild(node);
|
|
1063
|
-
return el;
|
|
1064
|
-
}
|
|
1065
|
-
function MenuItem({ value, children, class: className }) {
|
|
1066
|
-
const el = document.createElement("div");
|
|
1067
|
-
el.dataset.slot = "menu-item";
|
|
1068
|
-
el.dataset.value = value;
|
|
1069
|
-
el.style.display = "contents";
|
|
1070
|
-
if (className)
|
|
1071
|
-
el.classList.add(className);
|
|
1072
|
-
for (const node of resolveChildren11(children))
|
|
1073
|
-
el.appendChild(node);
|
|
1074
|
-
return el;
|
|
1075
|
-
}
|
|
1076
|
-
function MenuGroup({
|
|
1077
|
-
label,
|
|
1078
|
-
children,
|
|
1079
|
-
class: className
|
|
1080
|
-
}) {
|
|
1081
|
-
const el = document.createElement("div");
|
|
1082
|
-
el.dataset.slot = "menu-group";
|
|
1083
|
-
el.dataset.label = label;
|
|
1084
|
-
el.style.display = "contents";
|
|
1085
|
-
if (className)
|
|
1086
|
-
el.classList.add(className);
|
|
1087
|
-
for (const node of resolveChildren11(children))
|
|
1088
|
-
el.appendChild(node);
|
|
1089
|
-
return el;
|
|
707
|
+
function DrawerRoot({ children, side, onOpenChange }) {
|
|
708
|
+
const resolvedSide = side ?? "bottom";
|
|
709
|
+
const panelClass = styles[PANEL_CLASS_MAP[resolvedSide]];
|
|
710
|
+
return ComposedSheet({
|
|
711
|
+
children,
|
|
712
|
+
side: resolvedSide,
|
|
713
|
+
onOpenChange,
|
|
714
|
+
classes: {
|
|
715
|
+
overlay: styles.overlay,
|
|
716
|
+
content: panelClass,
|
|
717
|
+
title: styles.title,
|
|
718
|
+
description: styles.description,
|
|
719
|
+
close: styles.close
|
|
720
|
+
}
|
|
721
|
+
});
|
|
1090
722
|
}
|
|
1091
|
-
function
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
723
|
+
function DrawerHeader({ children, className: cls, class: classProp }) {
|
|
724
|
+
const effectiveCls = cls ?? classProp;
|
|
725
|
+
const combined = [styles.header, effectiveCls].filter(Boolean).join(" ");
|
|
726
|
+
const resolved = resolveChildren8(children);
|
|
727
|
+
return (() => {
|
|
728
|
+
const __el0 = __element("div");
|
|
729
|
+
__el0.setAttribute("data-slot", "drawer-header");
|
|
730
|
+
{
|
|
731
|
+
const __v = combined;
|
|
732
|
+
if (__v != null && __v !== false)
|
|
733
|
+
__el0.setAttribute("class", __v === true ? "" : __v);
|
|
734
|
+
}
|
|
735
|
+
__enterChildren(__el0);
|
|
736
|
+
__insert(__el0, resolved);
|
|
737
|
+
__exitChildren();
|
|
738
|
+
return __el0;
|
|
739
|
+
})();
|
|
1100
740
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1104
|
-
|
|
741
|
+
function DrawerFooter({ children, className: cls, class: classProp }) {
|
|
742
|
+
const effectiveCls = cls ?? classProp;
|
|
743
|
+
const combined = [styles.footer, effectiveCls].filter(Boolean).join(" ");
|
|
744
|
+
const resolved = resolveChildren8(children);
|
|
745
|
+
return (() => {
|
|
746
|
+
const __el1 = __element("div");
|
|
747
|
+
__el1.setAttribute("data-slot", "drawer-footer");
|
|
748
|
+
{
|
|
749
|
+
const __v = combined;
|
|
750
|
+
if (__v != null && __v !== false)
|
|
751
|
+
__el1.setAttribute("class", __v === true ? "" : __v);
|
|
752
|
+
}
|
|
753
|
+
__enterChildren(__el1);
|
|
754
|
+
__insert(__el1, resolved);
|
|
755
|
+
__exitChildren();
|
|
756
|
+
return __el1;
|
|
757
|
+
})();
|
|
1105
758
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
} else if (slot === "menu-group") {
|
|
1117
|
-
const groupLabel = node.dataset.label;
|
|
1118
|
-
const group = primitive.Group(groupLabel);
|
|
1119
|
-
group.el.classList.add(styles.group);
|
|
1120
|
-
const labelEl = document.createElement("div");
|
|
1121
|
-
labelEl.id = `menu-group-label-${++idCounter3}`;
|
|
1122
|
-
labelEl.textContent = groupLabel;
|
|
1123
|
-
labelEl.classList.add(styles.label);
|
|
1124
|
-
group.el.removeAttribute("aria-label");
|
|
1125
|
-
group.el.setAttribute("aria-labelledby", labelEl.id);
|
|
1126
|
-
group.el.prepend(labelEl);
|
|
1127
|
-
processItems(Array.from(node.childNodes), primitive, group);
|
|
1128
|
-
} else if (slot === "menu-label") {
|
|
1129
|
-
const labelEl = primitive.Label(node.textContent ?? "");
|
|
1130
|
-
labelEl.classList.add(styles.label);
|
|
1131
|
-
} else if (slot === "menu-separator") {
|
|
1132
|
-
const sep = primitive.Separator();
|
|
1133
|
-
sep.classList.add(styles.separator);
|
|
759
|
+
function DrawerHandle({ className: cls, class: classProp }) {
|
|
760
|
+
const effectiveCls = cls ?? classProp;
|
|
761
|
+
const combined = [styles.handle, effectiveCls].filter(Boolean).join(" ");
|
|
762
|
+
return (() => {
|
|
763
|
+
const __el2 = __element("div");
|
|
764
|
+
__el2.setAttribute("data-slot", "drawer-handle");
|
|
765
|
+
{
|
|
766
|
+
const __v = combined;
|
|
767
|
+
if (__v != null && __v !== false)
|
|
768
|
+
__el2.setAttribute("class", __v === true ? "" : __v);
|
|
1134
769
|
}
|
|
1135
|
-
|
|
770
|
+
return __el2;
|
|
771
|
+
})();
|
|
1136
772
|
}
|
|
773
|
+
return Object.assign(DrawerRoot, {
|
|
774
|
+
Trigger: ComposedSheet.Trigger,
|
|
775
|
+
Content: ComposedSheet.Content,
|
|
776
|
+
Header: DrawerHeader,
|
|
777
|
+
Title: ComposedSheet.Title,
|
|
778
|
+
Description: ComposedSheet.Description,
|
|
779
|
+
Footer: DrawerFooter,
|
|
780
|
+
Handle: DrawerHandle
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
// src/components/primitives/dropdown-menu.ts
|
|
785
|
+
import { ComposedDropdownMenu, withStyles as withStyles9 } from "@vertz/ui-primitives";
|
|
786
|
+
function createThemedDropdownMenu(styles) {
|
|
787
|
+
const Styled = withStyles9(ComposedDropdownMenu, {
|
|
788
|
+
content: styles.content,
|
|
789
|
+
item: styles.item,
|
|
790
|
+
group: styles.group,
|
|
791
|
+
label: styles.label,
|
|
792
|
+
separator: styles.separator
|
|
793
|
+
});
|
|
1137
794
|
function DropdownMenuRoot({
|
|
1138
795
|
children,
|
|
1139
|
-
|
|
1140
|
-
|
|
796
|
+
onSelect,
|
|
797
|
+
onOpenChange
|
|
1141
798
|
}) {
|
|
1142
|
-
|
|
1143
|
-
let contentNodes = [];
|
|
1144
|
-
for (const node of resolveChildren11(children)) {
|
|
1145
|
-
if (!(node instanceof HTMLElement))
|
|
1146
|
-
continue;
|
|
1147
|
-
const slot = node.dataset.slot;
|
|
1148
|
-
if (slot === "menu-trigger") {
|
|
1149
|
-
userTrigger = node.firstElementChild ?? node;
|
|
1150
|
-
} else if (slot === "menu-content") {
|
|
1151
|
-
contentNodes = Array.from(node.childNodes);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
const primitive = Menu.Root({
|
|
1155
|
-
...menuOptions,
|
|
1156
|
-
positioning: {
|
|
1157
|
-
placement: "bottom-start",
|
|
1158
|
-
portal: true,
|
|
1159
|
-
...userTrigger ? { referenceElement: userTrigger } : {}
|
|
1160
|
-
}
|
|
1161
|
-
});
|
|
1162
|
-
primitive.content.classList.add(styles.content);
|
|
1163
|
-
processItems(contentNodes, primitive);
|
|
1164
|
-
const observer = new MutationObserver(() => {
|
|
1165
|
-
const isOpen = primitive.trigger.getAttribute("aria-expanded") === "true";
|
|
1166
|
-
if (userTrigger) {
|
|
1167
|
-
userTrigger.setAttribute("aria-expanded", String(isOpen));
|
|
1168
|
-
userTrigger.setAttribute("data-state", isOpen ? "open" : "closed");
|
|
1169
|
-
}
|
|
1170
|
-
onOpenChangeOrig?.(isOpen);
|
|
1171
|
-
});
|
|
1172
|
-
observer.observe(primitive.trigger, { attributes: true, attributeFilter: ["aria-expanded"] });
|
|
1173
|
-
if (userTrigger) {
|
|
1174
|
-
userTrigger.setAttribute("aria-haspopup", "menu");
|
|
1175
|
-
userTrigger.setAttribute("aria-controls", primitive.content.id);
|
|
1176
|
-
userTrigger.setAttribute("aria-expanded", "false");
|
|
1177
|
-
userTrigger.setAttribute("data-state", "closed");
|
|
1178
|
-
userTrigger.addEventListener("click", () => {
|
|
1179
|
-
primitive.trigger.click();
|
|
1180
|
-
});
|
|
1181
|
-
return userTrigger;
|
|
1182
|
-
}
|
|
1183
|
-
return primitive.trigger;
|
|
799
|
+
return Styled({ children, onSelect, onOpenChange });
|
|
1184
800
|
}
|
|
1185
|
-
DropdownMenuRoot
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
801
|
+
return Object.assign(DropdownMenuRoot, {
|
|
802
|
+
Trigger: ComposedDropdownMenu.Trigger,
|
|
803
|
+
Content: ComposedDropdownMenu.Content,
|
|
804
|
+
Item: ComposedDropdownMenu.Item,
|
|
805
|
+
Group: ComposedDropdownMenu.Group,
|
|
806
|
+
Label: ComposedDropdownMenu.Label,
|
|
807
|
+
Separator: ComposedDropdownMenu.Separator
|
|
808
|
+
});
|
|
1192
809
|
}
|
|
1193
810
|
|
|
1194
|
-
// src/components/primitives/hover-card.
|
|
1195
|
-
import {
|
|
811
|
+
// src/components/primitives/hover-card.tsx
|
|
812
|
+
import { ComposedHoverCard } from "@vertz/ui-primitives";
|
|
1196
813
|
function createThemedHoverCard(styles) {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
814
|
+
function HoverCardRoot({
|
|
815
|
+
children,
|
|
816
|
+
openDelay,
|
|
817
|
+
closeDelay,
|
|
818
|
+
onOpenChange
|
|
819
|
+
}) {
|
|
820
|
+
return ComposedHoverCard({
|
|
821
|
+
children,
|
|
822
|
+
openDelay,
|
|
823
|
+
closeDelay,
|
|
824
|
+
onOpenChange,
|
|
825
|
+
positioning: { placement: "bottom", portal: true },
|
|
826
|
+
classes: {
|
|
827
|
+
content: styles.content
|
|
828
|
+
}
|
|
1201
829
|
});
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
830
|
+
}
|
|
831
|
+
return Object.assign(HoverCardRoot, {
|
|
832
|
+
Trigger: ComposedHoverCard.Trigger,
|
|
833
|
+
Content: ComposedHoverCard.Content
|
|
834
|
+
});
|
|
1205
835
|
}
|
|
1206
836
|
|
|
1207
837
|
// src/components/primitives/menubar.ts
|
|
1208
|
-
import {
|
|
838
|
+
import { ComposedMenubar, withStyles as withStyles10 } from "@vertz/ui-primitives";
|
|
1209
839
|
function createThemedMenubar(styles) {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
item.classList.add(styles.item);
|
|
1232
|
-
return item;
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
|
-
},
|
|
1236
|
-
Separator: () => {
|
|
1237
|
-
const sep = menu.Separator();
|
|
1238
|
-
sep.classList.add(styles.separator);
|
|
1239
|
-
return sep;
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
return {
|
|
1244
|
-
root: result.root,
|
|
1245
|
-
state: result.state,
|
|
1246
|
-
Menu: themedMenu
|
|
1247
|
-
};
|
|
1248
|
-
};
|
|
840
|
+
const Styled = withStyles10(ComposedMenubar, {
|
|
841
|
+
root: styles.root,
|
|
842
|
+
trigger: styles.trigger,
|
|
843
|
+
content: styles.content,
|
|
844
|
+
item: styles.item,
|
|
845
|
+
group: "",
|
|
846
|
+
label: styles.label,
|
|
847
|
+
separator: styles.separator
|
|
848
|
+
});
|
|
849
|
+
function MenubarRoot({ children, onSelect }) {
|
|
850
|
+
return Styled({ children, onSelect });
|
|
851
|
+
}
|
|
852
|
+
return Object.assign(MenubarRoot, {
|
|
853
|
+
Menu: ComposedMenubar.Menu,
|
|
854
|
+
Trigger: ComposedMenubar.Trigger,
|
|
855
|
+
Content: ComposedMenubar.Content,
|
|
856
|
+
Item: ComposedMenubar.Item,
|
|
857
|
+
Group: ComposedMenubar.Group,
|
|
858
|
+
Label: ComposedMenubar.Label,
|
|
859
|
+
Separator: ComposedMenubar.Separator
|
|
860
|
+
});
|
|
1249
861
|
}
|
|
1250
862
|
|
|
1251
|
-
// src/components/primitives/navigation-menu.
|
|
1252
|
-
import {
|
|
863
|
+
// src/components/primitives/navigation-menu.tsx
|
|
864
|
+
import { ComposedNavigationMenu, withStyles as withStyles11 } from "@vertz/ui-primitives";
|
|
1253
865
|
function createThemedNavigationMenu(styles) {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
866
|
+
const Styled = withStyles11(ComposedNavigationMenu, {
|
|
867
|
+
root: styles.root,
|
|
868
|
+
list: styles.list,
|
|
869
|
+
trigger: styles.trigger,
|
|
870
|
+
content: styles.content,
|
|
871
|
+
link: styles.link,
|
|
872
|
+
viewport: styles.viewport
|
|
873
|
+
});
|
|
874
|
+
function NavigationMenuRoot({
|
|
875
|
+
orientation,
|
|
876
|
+
delayOpen,
|
|
877
|
+
delayClose,
|
|
878
|
+
children
|
|
879
|
+
}) {
|
|
880
|
+
return Styled({
|
|
881
|
+
children,
|
|
882
|
+
orientation,
|
|
883
|
+
delayOpen,
|
|
884
|
+
delayClose
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
return Object.assign(NavigationMenuRoot, {
|
|
888
|
+
List: ComposedNavigationMenu.List,
|
|
889
|
+
Item: ComposedNavigationMenu.Item,
|
|
890
|
+
Trigger: ComposedNavigationMenu.Trigger,
|
|
891
|
+
Content: ComposedNavigationMenu.Content,
|
|
892
|
+
Link: ComposedNavigationMenu.Link,
|
|
893
|
+
Viewport: ComposedNavigationMenu.Viewport
|
|
894
|
+
});
|
|
1279
895
|
}
|
|
1280
896
|
|
|
1281
897
|
// src/components/primitives/popover.ts
|
|
1282
|
-
import {
|
|
1283
|
-
import { Popover } from "@vertz/ui-primitives";
|
|
898
|
+
import { ComposedPopover, withStyles as withStyles12 } from "@vertz/ui-primitives";
|
|
1284
899
|
function createThemedPopover(styles) {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
el.appendChild(node);
|
|
1291
|
-
return el;
|
|
1292
|
-
}
|
|
1293
|
-
function PopoverContent({ children, class: className }) {
|
|
1294
|
-
const el = document.createElement("div");
|
|
1295
|
-
el.dataset.slot = "popover-content";
|
|
1296
|
-
el.style.display = "contents";
|
|
1297
|
-
if (className)
|
|
1298
|
-
el.classList.add(className);
|
|
1299
|
-
for (const node of resolveChildren12(children))
|
|
1300
|
-
el.appendChild(node);
|
|
1301
|
-
return el;
|
|
1302
|
-
}
|
|
1303
|
-
function PopoverRoot({ children, ...options }) {
|
|
1304
|
-
const onOpenChangeOrig = options.onOpenChange;
|
|
1305
|
-
let userTrigger = null;
|
|
1306
|
-
let contentChildren = [];
|
|
1307
|
-
for (const node of resolveChildren12(children)) {
|
|
1308
|
-
if (!(node instanceof HTMLElement))
|
|
1309
|
-
continue;
|
|
1310
|
-
const slot = node.dataset.slot;
|
|
1311
|
-
if (slot === "popover-trigger") {
|
|
1312
|
-
userTrigger = node.firstElementChild ?? node;
|
|
1313
|
-
} else if (slot === "popover-content") {
|
|
1314
|
-
contentChildren = Array.from(node.childNodes);
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
const primitive = Popover.Root({
|
|
1318
|
-
...options,
|
|
1319
|
-
positioning: { placement: "bottom-start", portal: true },
|
|
1320
|
-
onOpenChange: (isOpen) => {
|
|
1321
|
-
if (userTrigger) {
|
|
1322
|
-
userTrigger.setAttribute("aria-expanded", String(isOpen));
|
|
1323
|
-
userTrigger.setAttribute("data-state", isOpen ? "open" : "closed");
|
|
1324
|
-
}
|
|
1325
|
-
onOpenChangeOrig?.(isOpen);
|
|
1326
|
-
}
|
|
1327
|
-
});
|
|
1328
|
-
primitive.content.classList.add(styles.content);
|
|
1329
|
-
for (const node of contentChildren) {
|
|
1330
|
-
primitive.content.appendChild(node);
|
|
1331
|
-
}
|
|
1332
|
-
if (userTrigger) {
|
|
1333
|
-
userTrigger.setAttribute("aria-haspopup", "dialog");
|
|
1334
|
-
userTrigger.setAttribute("aria-controls", primitive.content.id);
|
|
1335
|
-
userTrigger.setAttribute("aria-expanded", String(options.defaultOpen ?? false));
|
|
1336
|
-
userTrigger.setAttribute("data-state", options.defaultOpen ? "open" : "closed");
|
|
1337
|
-
userTrigger.addEventListener("click", () => {
|
|
1338
|
-
primitive.trigger.click();
|
|
1339
|
-
});
|
|
1340
|
-
return userTrigger;
|
|
1341
|
-
}
|
|
1342
|
-
return primitive.trigger;
|
|
900
|
+
const StyledPopover = withStyles12(ComposedPopover, {
|
|
901
|
+
content: styles.content
|
|
902
|
+
});
|
|
903
|
+
function PopoverRoot({ children, onOpenChange }) {
|
|
904
|
+
return StyledPopover({ children, onOpenChange });
|
|
1343
905
|
}
|
|
1344
|
-
PopoverRoot
|
|
1345
|
-
|
|
1346
|
-
|
|
906
|
+
return Object.assign(PopoverRoot, {
|
|
907
|
+
Trigger: ComposedPopover.Trigger,
|
|
908
|
+
Content: ComposedPopover.Content
|
|
909
|
+
});
|
|
1347
910
|
}
|
|
1348
911
|
|
|
1349
912
|
// src/components/primitives/progress.ts
|
|
1350
|
-
import {
|
|
913
|
+
import { ComposedProgress } from "@vertz/ui-primitives";
|
|
1351
914
|
function createThemedProgress(styles) {
|
|
1352
|
-
return function
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
return result;
|
|
915
|
+
return function ProgressRoot(props) {
|
|
916
|
+
return ComposedProgress({
|
|
917
|
+
...props,
|
|
918
|
+
classes: { root: styles.root, indicator: styles.indicator }
|
|
919
|
+
});
|
|
1358
920
|
};
|
|
1359
921
|
}
|
|
1360
922
|
|
|
1361
923
|
// src/components/primitives/radio-group.ts
|
|
1362
|
-
import {
|
|
1363
|
-
function createCircleIcon() {
|
|
1364
|
-
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1365
|
-
svg.setAttribute("width", "8");
|
|
1366
|
-
svg.setAttribute("height", "8");
|
|
1367
|
-
svg.setAttribute("viewBox", "0 0 8 8");
|
|
1368
|
-
svg.setAttribute("fill", "currentColor");
|
|
1369
|
-
const circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
1370
|
-
circle.setAttribute("cx", "4");
|
|
1371
|
-
circle.setAttribute("cy", "4");
|
|
1372
|
-
circle.setAttribute("r", "4");
|
|
1373
|
-
svg.appendChild(circle);
|
|
1374
|
-
return svg;
|
|
1375
|
-
}
|
|
924
|
+
import { ComposedRadioGroup, withStyles as withStyles13 } from "@vertz/ui-primitives";
|
|
1376
925
|
function createThemedRadioGroup(styles) {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
const indicator = document.createElement("span");
|
|
1390
|
-
indicator.classList.add(styles.indicator);
|
|
1391
|
-
const dataState = item.getAttribute("data-state") ?? "unchecked";
|
|
1392
|
-
indicator.setAttribute("data-state", dataState);
|
|
1393
|
-
indicator.appendChild(createCircleIcon());
|
|
1394
|
-
item.appendChild(indicator);
|
|
1395
|
-
const observer = new MutationObserver((mutations) => {
|
|
1396
|
-
for (const mutation of mutations) {
|
|
1397
|
-
if (mutation.attributeName === "data-state") {
|
|
1398
|
-
const newState = item.getAttribute("data-state") ?? "unchecked";
|
|
1399
|
-
indicator.setAttribute("data-state", newState);
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
});
|
|
1403
|
-
observer.observe(item, { attributes: true, attributeFilter: ["data-state"] });
|
|
1404
|
-
const wrapper = document.createElement("div");
|
|
1405
|
-
wrapper.style.cssText = "display: flex; align-items: center; gap: 8px; cursor: pointer;";
|
|
1406
|
-
item.remove();
|
|
1407
|
-
wrapper.appendChild(item);
|
|
1408
|
-
if (labelText) {
|
|
1409
|
-
const labelEl = document.createElement("label");
|
|
1410
|
-
labelEl.textContent = labelText;
|
|
1411
|
-
labelEl.style.cssText = "font-size: 0.875rem; color: var(--color-foreground); cursor: pointer;";
|
|
1412
|
-
labelEl.addEventListener("click", () => item.click());
|
|
1413
|
-
wrapper.appendChild(labelEl);
|
|
1414
|
-
}
|
|
1415
|
-
result.root.appendChild(wrapper);
|
|
1416
|
-
return wrapper;
|
|
1417
|
-
}
|
|
1418
|
-
};
|
|
1419
|
-
};
|
|
926
|
+
const StyledRadioGroup = withStyles13(ComposedRadioGroup, {
|
|
927
|
+
root: styles.root,
|
|
928
|
+
item: styles.item,
|
|
929
|
+
indicator: styles.indicator,
|
|
930
|
+
indicatorIcon: styles.indicatorIcon
|
|
931
|
+
});
|
|
932
|
+
function RadioGroupRoot(props) {
|
|
933
|
+
return StyledRadioGroup(props);
|
|
934
|
+
}
|
|
935
|
+
return Object.assign(RadioGroupRoot, {
|
|
936
|
+
Item: ComposedRadioGroup.Item
|
|
937
|
+
});
|
|
1420
938
|
}
|
|
1421
939
|
|
|
1422
|
-
// src/components/primitives/resizable-panel.
|
|
1423
|
-
import {
|
|
940
|
+
// src/components/primitives/resizable-panel.tsx
|
|
941
|
+
import { ComposedResizablePanel } from "@vertz/ui-primitives";
|
|
1424
942
|
function createThemedResizablePanel(styles) {
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
return {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
Handle: () => {
|
|
1439
|
-
const handle = originalHandle();
|
|
1440
|
-
handle.classList.add(styles.handle);
|
|
1441
|
-
return handle;
|
|
943
|
+
function ResizablePanelRoot({
|
|
944
|
+
children,
|
|
945
|
+
orientation,
|
|
946
|
+
onResize
|
|
947
|
+
}) {
|
|
948
|
+
return ComposedResizablePanel({
|
|
949
|
+
children,
|
|
950
|
+
orientation,
|
|
951
|
+
onResize,
|
|
952
|
+
classes: {
|
|
953
|
+
root: styles.root,
|
|
954
|
+
panel: styles.panel,
|
|
955
|
+
handle: styles.handle
|
|
1442
956
|
}
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
return Object.assign(ResizablePanelRoot, {
|
|
960
|
+
Panel: ComposedResizablePanel.Panel,
|
|
961
|
+
Handle: ComposedResizablePanel.Handle
|
|
962
|
+
});
|
|
1445
963
|
}
|
|
1446
964
|
|
|
1447
|
-
// src/components/primitives/scroll-area.
|
|
1448
|
-
import {
|
|
965
|
+
// src/components/primitives/scroll-area.tsx
|
|
966
|
+
import { ComposedScrollArea } from "@vertz/ui-primitives";
|
|
1449
967
|
function createThemedScrollArea(styles) {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
968
|
+
function ScrollAreaRoot({ children, orientation }) {
|
|
969
|
+
return ComposedScrollArea({
|
|
970
|
+
children,
|
|
971
|
+
orientation,
|
|
972
|
+
classes: {
|
|
973
|
+
root: styles.root,
|
|
974
|
+
viewport: styles.viewport,
|
|
975
|
+
scrollbar: styles.scrollbar,
|
|
976
|
+
thumb: styles.thumb
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
return ScrollAreaRoot;
|
|
1460
981
|
}
|
|
1461
982
|
|
|
1462
983
|
// src/components/primitives/select.ts
|
|
1463
|
-
import {
|
|
1464
|
-
import { Select } from "@vertz/ui-primitives";
|
|
1465
|
-
var idCounter4 = 0;
|
|
984
|
+
import { ComposedSelect, withStyles as withStyles14 } from "@vertz/ui-primitives";
|
|
1466
985
|
function createThemedSelect(styles) {
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
el.style.display = "contents";
|
|
1488
|
-
if (className)
|
|
1489
|
-
el.classList.add(className);
|
|
1490
|
-
for (const node of resolveChildren13(children))
|
|
1491
|
-
el.appendChild(node);
|
|
1492
|
-
return el;
|
|
1493
|
-
}
|
|
1494
|
-
function SelectGroup({ label, children, class: className }) {
|
|
1495
|
-
const el = document.createElement("div");
|
|
1496
|
-
el.dataset.slot = "select-group";
|
|
1497
|
-
el.dataset.label = label;
|
|
1498
|
-
el.style.display = "contents";
|
|
1499
|
-
if (className)
|
|
1500
|
-
el.classList.add(className);
|
|
1501
|
-
for (const node of resolveChildren13(children))
|
|
1502
|
-
el.appendChild(node);
|
|
1503
|
-
return el;
|
|
1504
|
-
}
|
|
1505
|
-
function SelectSeparator() {
|
|
1506
|
-
const el = document.createElement("hr");
|
|
1507
|
-
el.dataset.slot = "select-separator";
|
|
1508
|
-
return el;
|
|
1509
|
-
}
|
|
1510
|
-
function processItems(nodes, primitive, parentGroup) {
|
|
1511
|
-
for (const node of nodes) {
|
|
1512
|
-
if (!(node instanceof HTMLElement))
|
|
1513
|
-
continue;
|
|
1514
|
-
const slot = node.dataset.slot;
|
|
1515
|
-
if (slot === "select-item") {
|
|
1516
|
-
const value = node.dataset.value;
|
|
1517
|
-
const label = node.textContent ?? undefined;
|
|
1518
|
-
const item = parentGroup ? parentGroup.Item(value, label) : primitive.Item(value, label);
|
|
1519
|
-
item.classList.add(styles.item);
|
|
1520
|
-
const indicator = document.createElement("span");
|
|
1521
|
-
indicator.classList.add(styles.itemIndicator);
|
|
1522
|
-
indicator.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>';
|
|
1523
|
-
item.appendChild(indicator);
|
|
1524
|
-
} else if (slot === "select-group") {
|
|
1525
|
-
const groupLabel = node.dataset.label;
|
|
1526
|
-
const group = primitive.Group(groupLabel);
|
|
1527
|
-
group.el.classList.add(styles.group);
|
|
1528
|
-
const labelEl = document.createElement("div");
|
|
1529
|
-
labelEl.id = `select-group-label-${++idCounter4}`;
|
|
1530
|
-
labelEl.textContent = groupLabel;
|
|
1531
|
-
labelEl.classList.add(styles.label);
|
|
1532
|
-
group.el.removeAttribute("aria-label");
|
|
1533
|
-
group.el.setAttribute("aria-labelledby", labelEl.id);
|
|
1534
|
-
group.el.prepend(labelEl);
|
|
1535
|
-
processItems(Array.from(node.childNodes), primitive, group);
|
|
1536
|
-
} else if (slot === "select-separator") {
|
|
1537
|
-
const sep = primitive.Separator();
|
|
1538
|
-
sep.classList.add(styles.separator);
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
function SelectRoot({ children, ...options }) {
|
|
1543
|
-
let contentNodes = [];
|
|
1544
|
-
for (const node of resolveChildren13(children)) {
|
|
1545
|
-
if (!(node instanceof HTMLElement))
|
|
1546
|
-
continue;
|
|
1547
|
-
const slot = node.dataset.slot;
|
|
1548
|
-
if (slot === "select-trigger") {} else if (slot === "select-content") {
|
|
1549
|
-
contentNodes = Array.from(node.childNodes);
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
const primitive = Select.Root({
|
|
1553
|
-
...options,
|
|
1554
|
-
positioning: { placement: "bottom-start", portal: true, matchReferenceWidth: true }
|
|
986
|
+
const StyledSelect = withStyles14(ComposedSelect, {
|
|
987
|
+
trigger: styles.trigger,
|
|
988
|
+
content: styles.content,
|
|
989
|
+
item: styles.item,
|
|
990
|
+
itemIndicator: styles.itemIndicator,
|
|
991
|
+
group: styles.group,
|
|
992
|
+
label: styles.label,
|
|
993
|
+
separator: styles.separator
|
|
994
|
+
});
|
|
995
|
+
function SelectRoot({
|
|
996
|
+
defaultValue,
|
|
997
|
+
placeholder,
|
|
998
|
+
onValueChange,
|
|
999
|
+
children
|
|
1000
|
+
}) {
|
|
1001
|
+
return StyledSelect({
|
|
1002
|
+
children,
|
|
1003
|
+
defaultValue,
|
|
1004
|
+
placeholder,
|
|
1005
|
+
onValueChange
|
|
1555
1006
|
});
|
|
1556
|
-
primitive.trigger.classList.add(styles.trigger);
|
|
1557
|
-
primitive.content.classList.add(styles.content);
|
|
1558
|
-
const chevron = document.createElement("span");
|
|
1559
|
-
chevron.style.cssText = "display:flex;align-items:center;opacity:0.5;flex-shrink:0;pointer-events:none;";
|
|
1560
|
-
chevron.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>';
|
|
1561
|
-
primitive.trigger.appendChild(chevron);
|
|
1562
|
-
processItems(contentNodes, primitive);
|
|
1563
|
-
return primitive.trigger;
|
|
1564
1007
|
}
|
|
1565
|
-
SelectRoot
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1008
|
+
return Object.assign(SelectRoot, {
|
|
1009
|
+
Trigger: ComposedSelect.Trigger,
|
|
1010
|
+
Content: ComposedSelect.Content,
|
|
1011
|
+
Item: ComposedSelect.Item,
|
|
1012
|
+
Group: ComposedSelect.Group,
|
|
1013
|
+
Separator: ComposedSelect.Separator
|
|
1014
|
+
});
|
|
1571
1015
|
}
|
|
1572
1016
|
|
|
1573
1017
|
// src/components/primitives/sheet.ts
|
|
1574
|
-
import {
|
|
1575
|
-
import { Dialog as Dialog4 } from "@vertz/ui-primitives";
|
|
1018
|
+
import { ComposedSheet as ComposedSheet2 } from "@vertz/ui-primitives";
|
|
1576
1019
|
var PANEL_CLASS_MAP2 = {
|
|
1577
1020
|
left: "panelLeft",
|
|
1578
1021
|
right: "panelRight",
|
|
@@ -1580,256 +1023,86 @@ var PANEL_CLASS_MAP2 = {
|
|
|
1580
1023
|
bottom: "panelBottom"
|
|
1581
1024
|
};
|
|
1582
1025
|
function createThemedSheet(styles) {
|
|
1583
|
-
function
|
|
1584
|
-
const el = document.createElement("span");
|
|
1585
|
-
el.dataset.slot = "sheet-trigger";
|
|
1586
|
-
el.style.display = "contents";
|
|
1587
|
-
for (const node of resolveChildren14(children)) {
|
|
1588
|
-
el.appendChild(node);
|
|
1589
|
-
}
|
|
1590
|
-
return el;
|
|
1591
|
-
}
|
|
1592
|
-
function SheetContent({ children }) {
|
|
1593
|
-
const el = document.createElement("div");
|
|
1594
|
-
el.dataset.slot = "sheet-content";
|
|
1595
|
-
el.style.display = "contents";
|
|
1596
|
-
for (const node of resolveChildren14(children)) {
|
|
1597
|
-
el.appendChild(node);
|
|
1598
|
-
}
|
|
1599
|
-
return el;
|
|
1600
|
-
}
|
|
1601
|
-
function SheetTitle({ children, class: className }) {
|
|
1602
|
-
const el = document.createElement("h2");
|
|
1603
|
-
el.classList.add(styles.title);
|
|
1604
|
-
if (className)
|
|
1605
|
-
el.classList.add(className);
|
|
1606
|
-
for (const node of resolveChildren14(children)) {
|
|
1607
|
-
el.appendChild(node);
|
|
1608
|
-
}
|
|
1609
|
-
return el;
|
|
1610
|
-
}
|
|
1611
|
-
function SheetDescription({ children, class: className }) {
|
|
1612
|
-
const el = document.createElement("p");
|
|
1613
|
-
el.classList.add(styles.description);
|
|
1614
|
-
if (className)
|
|
1615
|
-
el.classList.add(className);
|
|
1616
|
-
for (const node of resolveChildren14(children)) {
|
|
1617
|
-
el.appendChild(node);
|
|
1618
|
-
}
|
|
1619
|
-
return el;
|
|
1620
|
-
}
|
|
1621
|
-
function SheetClose({ children, class: className }) {
|
|
1622
|
-
const el = document.createElement("button");
|
|
1623
|
-
el.dataset.slot = "sheet-close";
|
|
1624
|
-
el.classList.add(styles.close);
|
|
1625
|
-
if (className)
|
|
1626
|
-
el.classList.add(className);
|
|
1627
|
-
const childNodes = resolveChildren14(children);
|
|
1628
|
-
if (childNodes.length > 0) {
|
|
1629
|
-
for (const node of childNodes) {
|
|
1630
|
-
el.appendChild(node);
|
|
1631
|
-
}
|
|
1632
|
-
} else {
|
|
1633
|
-
el.textContent = "×";
|
|
1634
|
-
}
|
|
1635
|
-
return el;
|
|
1636
|
-
}
|
|
1637
|
-
function SheetRoot({ children, side, ...options }) {
|
|
1026
|
+
function SheetRoot({ children, side, onOpenChange }) {
|
|
1638
1027
|
const resolvedSide = side ?? "right";
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
const primitive = Dialog4.Root({
|
|
1653
|
-
...options,
|
|
1654
|
-
onOpenChange: (isOpen) => {
|
|
1655
|
-
if (userTrigger) {
|
|
1656
|
-
userTrigger.setAttribute("aria-expanded", String(isOpen));
|
|
1657
|
-
userTrigger.setAttribute("data-state", isOpen ? "open" : "closed");
|
|
1658
|
-
}
|
|
1659
|
-
onOpenChangeOrig?.(isOpen);
|
|
1028
|
+
const panelClass = styles[PANEL_CLASS_MAP2[resolvedSide]];
|
|
1029
|
+
return ComposedSheet2({
|
|
1030
|
+
children,
|
|
1031
|
+
side: resolvedSide,
|
|
1032
|
+
onOpenChange,
|
|
1033
|
+
classes: {
|
|
1034
|
+
overlay: styles.overlay,
|
|
1035
|
+
content: panelClass,
|
|
1036
|
+
title: styles.title,
|
|
1037
|
+
description: styles.description,
|
|
1038
|
+
close: styles.close
|
|
1660
1039
|
}
|
|
1661
1040
|
});
|
|
1662
|
-
primitive.overlay.classList.add(styles.overlay);
|
|
1663
|
-
primitive.content.classList.add(styles[PANEL_CLASS_MAP2[resolvedSide]]);
|
|
1664
|
-
primitive.close.classList.add(styles.close);
|
|
1665
|
-
primitive.close.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>';
|
|
1666
|
-
primitive.close.setAttribute("aria-label", "Close");
|
|
1667
|
-
primitive.content.style.top = "";
|
|
1668
|
-
primitive.content.style.left = "";
|
|
1669
|
-
primitive.content.style.transform = "";
|
|
1670
|
-
for (const node of contentChildren) {
|
|
1671
|
-
primitive.content.appendChild(node);
|
|
1672
|
-
}
|
|
1673
|
-
primitive.content.appendChild(primitive.close);
|
|
1674
|
-
document.body.appendChild(primitive.overlay);
|
|
1675
|
-
document.body.appendChild(primitive.content);
|
|
1676
|
-
if (userTrigger) {
|
|
1677
|
-
userTrigger.setAttribute("aria-haspopup", "dialog");
|
|
1678
|
-
userTrigger.setAttribute("aria-controls", primitive.content.id);
|
|
1679
|
-
userTrigger.setAttribute("aria-expanded", String(options.defaultOpen ?? false));
|
|
1680
|
-
userTrigger.setAttribute("data-state", options.defaultOpen ? "open" : "closed");
|
|
1681
|
-
userTrigger.addEventListener("click", () => {
|
|
1682
|
-
if (primitive.state.open.peek()) {
|
|
1683
|
-
primitive.hide();
|
|
1684
|
-
} else {
|
|
1685
|
-
primitive.show();
|
|
1686
|
-
}
|
|
1687
|
-
});
|
|
1688
|
-
return userTrigger;
|
|
1689
|
-
}
|
|
1690
|
-
return primitive.trigger;
|
|
1691
1041
|
}
|
|
1692
|
-
SheetRoot
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1042
|
+
return Object.assign(SheetRoot, {
|
|
1043
|
+
Trigger: ComposedSheet2.Trigger,
|
|
1044
|
+
Content: ComposedSheet2.Content,
|
|
1045
|
+
Title: ComposedSheet2.Title,
|
|
1046
|
+
Description: ComposedSheet2.Description,
|
|
1047
|
+
Close: ComposedSheet2.Close
|
|
1048
|
+
});
|
|
1698
1049
|
}
|
|
1699
1050
|
|
|
1700
1051
|
// src/components/primitives/slider.ts
|
|
1701
|
-
import {
|
|
1052
|
+
import { ComposedSlider } from "@vertz/ui-primitives";
|
|
1702
1053
|
function createThemedSlider(styles) {
|
|
1703
|
-
return function
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1054
|
+
return function SliderRoot(props) {
|
|
1055
|
+
return ComposedSlider({
|
|
1056
|
+
...props,
|
|
1057
|
+
classes: {
|
|
1058
|
+
root: styles.root,
|
|
1059
|
+
track: styles.track,
|
|
1060
|
+
range: styles.range,
|
|
1061
|
+
thumb: styles.thumb
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1713
1064
|
};
|
|
1714
1065
|
}
|
|
1715
1066
|
|
|
1716
1067
|
// src/components/primitives/switch.ts
|
|
1717
|
-
import {
|
|
1068
|
+
import { ComposedSwitch, withStyles as withStyles15 } from "@vertz/ui-primitives";
|
|
1718
1069
|
function createThemedSwitch(styles) {
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
const newState = root.getAttribute("data-state") ?? "unchecked";
|
|
1731
|
-
thumb.setAttribute("data-state", newState);
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
});
|
|
1735
|
-
observer.observe(root, { attributes: true, attributeFilter: ["data-state"] });
|
|
1736
|
-
root.appendChild(thumb);
|
|
1737
|
-
return root;
|
|
1070
|
+
const DefaultSwitch = withStyles15(ComposedSwitch, {
|
|
1071
|
+
root: styles.root,
|
|
1072
|
+
thumb: styles.thumb
|
|
1073
|
+
});
|
|
1074
|
+
const SmSwitch = withStyles15(ComposedSwitch, {
|
|
1075
|
+
root: styles.rootSm,
|
|
1076
|
+
thumb: styles.thumbSm
|
|
1077
|
+
});
|
|
1078
|
+
return function SwitchRoot({ size, ...props }) {
|
|
1079
|
+
const Styled = size === "sm" ? SmSwitch : DefaultSwitch;
|
|
1080
|
+
return Styled(props);
|
|
1738
1081
|
};
|
|
1739
1082
|
}
|
|
1740
1083
|
|
|
1741
1084
|
// src/components/primitives/tabs.ts
|
|
1742
|
-
import {
|
|
1743
|
-
import { Tabs } from "@vertz/ui-primitives";
|
|
1085
|
+
import { ComposedTabs, withStyles as withStyles16 } from "@vertz/ui-primitives";
|
|
1744
1086
|
function createThemedTabs(styles) {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
}
|
|
1755
|
-
function TabsTrigger({ value, children, class: className }) {
|
|
1756
|
-
const el = document.createElement("button");
|
|
1757
|
-
el.setAttribute("type", "button");
|
|
1758
|
-
el.dataset.slot = "tabs-trigger";
|
|
1759
|
-
el.dataset.value = value;
|
|
1760
|
-
if (className)
|
|
1761
|
-
el.classList.add(className);
|
|
1762
|
-
for (const node of resolveChildren15(children))
|
|
1763
|
-
el.appendChild(node);
|
|
1764
|
-
return el;
|
|
1765
|
-
}
|
|
1766
|
-
function TabsContent({ value, children, class: className }) {
|
|
1767
|
-
const el = document.createElement("div");
|
|
1768
|
-
el.dataset.slot = "tabs-content";
|
|
1769
|
-
el.dataset.value = value;
|
|
1770
|
-
el.style.display = "contents";
|
|
1771
|
-
if (className)
|
|
1772
|
-
el.classList.add(className);
|
|
1773
|
-
for (const node of resolveChildren15(children))
|
|
1774
|
-
el.appendChild(node);
|
|
1775
|
-
return el;
|
|
1776
|
-
}
|
|
1087
|
+
const DefaultTabs = withStyles16(ComposedTabs, {
|
|
1088
|
+
list: styles.list,
|
|
1089
|
+
trigger: styles.trigger,
|
|
1090
|
+
panel: styles.panel
|
|
1091
|
+
});
|
|
1092
|
+
const LineTabs = withStyles16(ComposedTabs, {
|
|
1093
|
+
list: styles.listLine,
|
|
1094
|
+
trigger: styles.triggerLine,
|
|
1095
|
+
panel: styles.panel
|
|
1096
|
+
});
|
|
1777
1097
|
function TabsRoot({ defaultValue, variant, children }) {
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1780
|
-
result.list.classList.add(isLine ? styles.listLine : styles.list);
|
|
1781
|
-
const childNodes = resolveChildren15(children);
|
|
1782
|
-
let listSlot = null;
|
|
1783
|
-
const triggerSlots = [];
|
|
1784
|
-
const contentSlots = [];
|
|
1785
|
-
for (const node of childNodes) {
|
|
1786
|
-
if (!(node instanceof HTMLElement))
|
|
1787
|
-
continue;
|
|
1788
|
-
const slot = node.dataset.slot;
|
|
1789
|
-
if (slot === "tabs-list") {
|
|
1790
|
-
listSlot = node;
|
|
1791
|
-
} else if (slot === "tabs-content") {
|
|
1792
|
-
contentSlots.push(node);
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
if (listSlot) {
|
|
1796
|
-
for (const child of Array.from(listSlot.childNodes)) {
|
|
1797
|
-
if (child instanceof HTMLElement && child.dataset.slot === "tabs-trigger") {
|
|
1798
|
-
triggerSlots.push(child);
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
const tabsByValue = new Map;
|
|
1803
|
-
for (const triggerEl of triggerSlots) {
|
|
1804
|
-
const value = triggerEl.dataset.value;
|
|
1805
|
-
if (!value)
|
|
1806
|
-
continue;
|
|
1807
|
-
const tab = result.Tab(value);
|
|
1808
|
-
tabsByValue.set(value, tab);
|
|
1809
|
-
tab.trigger.classList.add(isLine ? styles.triggerLine : styles.trigger);
|
|
1810
|
-
tab.trigger.textContent = "";
|
|
1811
|
-
while (triggerEl.firstChild) {
|
|
1812
|
-
tab.trigger.appendChild(triggerEl.firstChild);
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
for (const contentEl of contentSlots) {
|
|
1816
|
-
const value = contentEl.dataset.value;
|
|
1817
|
-
if (!value)
|
|
1818
|
-
continue;
|
|
1819
|
-
const tab = tabsByValue.get(value);
|
|
1820
|
-
if (!tab)
|
|
1821
|
-
continue;
|
|
1822
|
-
tab.panel.classList.add(styles.panel);
|
|
1823
|
-
while (contentEl.firstChild) {
|
|
1824
|
-
tab.panel.appendChild(contentEl.firstChild);
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
return result.root;
|
|
1098
|
+
const Styled = variant === "line" ? LineTabs : DefaultTabs;
|
|
1099
|
+
return Styled({ children, defaultValue });
|
|
1828
1100
|
}
|
|
1829
|
-
TabsRoot
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1101
|
+
return Object.assign(TabsRoot, {
|
|
1102
|
+
List: ComposedTabs.List,
|
|
1103
|
+
Trigger: ComposedTabs.Trigger,
|
|
1104
|
+
Content: ComposedTabs.Content
|
|
1105
|
+
});
|
|
1833
1106
|
}
|
|
1834
1107
|
|
|
1835
1108
|
// src/components/primitives/toast.ts
|
|
@@ -1849,98 +1122,74 @@ function createThemedToast(styles) {
|
|
|
1849
1122
|
}
|
|
1850
1123
|
|
|
1851
1124
|
// src/components/primitives/toggle.ts
|
|
1852
|
-
import {
|
|
1125
|
+
import { ComposedToggle, withStyles as withStyles17 } from "@vertz/ui-primitives";
|
|
1853
1126
|
function createThemedToggle(styles) {
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1127
|
+
const StyledToggle = withStyles17(ComposedToggle, {
|
|
1128
|
+
root: styles.root
|
|
1129
|
+
});
|
|
1130
|
+
return function ToggleRoot(props) {
|
|
1131
|
+
return StyledToggle(props);
|
|
1858
1132
|
};
|
|
1859
1133
|
}
|
|
1860
1134
|
|
|
1861
|
-
// src/components/primitives/toggle-group.
|
|
1862
|
-
import {
|
|
1135
|
+
// src/components/primitives/toggle-group.tsx
|
|
1136
|
+
import { ComposedToggleGroup, withStyles as withStyles18 } from "@vertz/ui-primitives";
|
|
1863
1137
|
function createThemedToggleGroup(styles) {
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
item.classList.add(styles.item);
|
|
1871
|
-
return item;
|
|
1872
|
-
};
|
|
1873
|
-
return result;
|
|
1874
|
-
};
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
// src/components/primitives/tooltip.ts
|
|
1878
|
-
import { resolveChildren as resolveChildren16 } from "@vertz/ui";
|
|
1879
|
-
import { Tooltip } from "@vertz/ui-primitives";
|
|
1880
|
-
function createThemedTooltip(styles) {
|
|
1881
|
-
function TooltipTrigger({ children }) {
|
|
1882
|
-
const el = document.createElement("span");
|
|
1883
|
-
el.dataset.slot = "tooltip-trigger";
|
|
1884
|
-
el.style.display = "contents";
|
|
1885
|
-
for (const node of resolveChildren16(children))
|
|
1886
|
-
el.appendChild(node);
|
|
1887
|
-
return el;
|
|
1888
|
-
}
|
|
1889
|
-
function TooltipContent({ children, class: className }) {
|
|
1890
|
-
const el = document.createElement("div");
|
|
1891
|
-
el.dataset.slot = "tooltip-content";
|
|
1892
|
-
el.style.display = "contents";
|
|
1893
|
-
if (className)
|
|
1894
|
-
el.classList.add(className);
|
|
1895
|
-
for (const node of resolveChildren16(children))
|
|
1896
|
-
el.appendChild(node);
|
|
1897
|
-
return el;
|
|
1138
|
+
const StyledToggleGroup = withStyles18(ComposedToggleGroup, {
|
|
1139
|
+
root: styles.root,
|
|
1140
|
+
item: styles.item
|
|
1141
|
+
});
|
|
1142
|
+
function ToggleGroupRoot(props) {
|
|
1143
|
+
return StyledToggleGroup(props);
|
|
1898
1144
|
}
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
}
|
|
1912
|
-
const primitive = Tooltip.Root({
|
|
1913
|
-
...options,
|
|
1914
|
-
positioning: { placement: "top", portal: true }
|
|
1915
|
-
});
|
|
1916
|
-
primitive.content.classList.add(styles.content);
|
|
1917
|
-
for (const node of triggerChildren) {
|
|
1918
|
-
primitive.trigger.appendChild(node);
|
|
1919
|
-
}
|
|
1920
|
-
for (const node of contentChildren) {
|
|
1921
|
-
primitive.content.appendChild(node);
|
|
1922
|
-
}
|
|
1923
|
-
return primitive.trigger;
|
|
1145
|
+
return Object.assign(ToggleGroupRoot, {
|
|
1146
|
+
Item: ComposedToggleGroup.Item
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// src/components/primitives/tooltip.ts
|
|
1151
|
+
import { ComposedTooltip, withStyles as withStyles19 } from "@vertz/ui-primitives";
|
|
1152
|
+
function createThemedTooltip(styles) {
|
|
1153
|
+
const StyledTooltip = withStyles19(ComposedTooltip, {
|
|
1154
|
+
content: styles.content
|
|
1155
|
+
});
|
|
1156
|
+
function TooltipRoot({ children, delay }) {
|
|
1157
|
+
return StyledTooltip({ children, delay });
|
|
1924
1158
|
}
|
|
1925
|
-
TooltipRoot
|
|
1926
|
-
|
|
1927
|
-
|
|
1159
|
+
return Object.assign(TooltipRoot, {
|
|
1160
|
+
Trigger: ComposedTooltip.Trigger,
|
|
1161
|
+
Content: ComposedTooltip.Content
|
|
1162
|
+
});
|
|
1928
1163
|
}
|
|
1929
1164
|
|
|
1930
1165
|
// src/components/separator.ts
|
|
1931
1166
|
function createSeparatorComponent(separatorStyles) {
|
|
1932
|
-
return function Separator({
|
|
1167
|
+
return function Separator({
|
|
1168
|
+
orientation = "horizontal",
|
|
1169
|
+
className,
|
|
1170
|
+
class: classProp
|
|
1171
|
+
}) {
|
|
1172
|
+
const effectiveClass = className ?? classProp;
|
|
1173
|
+
const orientationClass = orientation === "vertical" ? separatorStyles.vertical : separatorStyles.horizontal;
|
|
1933
1174
|
const el = document.createElement("hr");
|
|
1934
|
-
el.className = [separatorStyles.base,
|
|
1175
|
+
el.className = [separatorStyles.base, orientationClass, effectiveClass].filter(Boolean).join(" ");
|
|
1176
|
+
el.setAttribute("role", "separator");
|
|
1177
|
+
el.setAttribute("aria-orientation", orientation);
|
|
1935
1178
|
return el;
|
|
1936
1179
|
};
|
|
1937
1180
|
}
|
|
1938
1181
|
|
|
1939
1182
|
// src/components/skeleton.ts
|
|
1940
1183
|
function createSkeletonComponents(skeletonStyles) {
|
|
1941
|
-
function Skeleton({
|
|
1184
|
+
function Skeleton({
|
|
1185
|
+
className,
|
|
1186
|
+
class: classProp,
|
|
1187
|
+
width,
|
|
1188
|
+
height
|
|
1189
|
+
} = {}) {
|
|
1190
|
+
const effectiveClass = className ?? classProp;
|
|
1942
1191
|
const el = document.createElement("div");
|
|
1943
|
-
el.className = [skeletonStyles.base,
|
|
1192
|
+
el.className = [skeletonStyles.base, effectiveClass].filter(Boolean).join(" ");
|
|
1944
1193
|
el.setAttribute("aria-hidden", "true");
|
|
1945
1194
|
if (width)
|
|
1946
1195
|
el.style.width = width;
|
|
@@ -1952,75 +1201,99 @@ function createSkeletonComponents(skeletonStyles) {
|
|
|
1952
1201
|
}
|
|
1953
1202
|
|
|
1954
1203
|
// src/components/table.ts
|
|
1955
|
-
import { resolveChildren as
|
|
1204
|
+
import { resolveChildren as resolveChildren9 } from "@vertz/ui";
|
|
1956
1205
|
function createTableComponents(tableStyles) {
|
|
1957
|
-
function Table({ class:
|
|
1206
|
+
function Table({ className, class: classProp, children }) {
|
|
1207
|
+
const effectiveClass = className ?? classProp;
|
|
1958
1208
|
const wrapper = document.createElement("div");
|
|
1959
1209
|
wrapper.style.position = "relative";
|
|
1960
1210
|
wrapper.style.width = "100%";
|
|
1961
1211
|
wrapper.style.overflowX = "auto";
|
|
1962
1212
|
const table = document.createElement("table");
|
|
1963
1213
|
table.style.borderCollapse = "collapse";
|
|
1964
|
-
table.className = [tableStyles.root,
|
|
1965
|
-
for (const node of
|
|
1214
|
+
table.className = [tableStyles.root, effectiveClass].filter(Boolean).join(" ");
|
|
1215
|
+
for (const node of resolveChildren9(children)) {
|
|
1966
1216
|
table.appendChild(node);
|
|
1967
1217
|
}
|
|
1968
1218
|
wrapper.appendChild(table);
|
|
1969
1219
|
return wrapper;
|
|
1970
1220
|
}
|
|
1971
|
-
function TableHeader({
|
|
1221
|
+
function TableHeader({
|
|
1222
|
+
className,
|
|
1223
|
+
class: classProp,
|
|
1224
|
+
children
|
|
1225
|
+
}) {
|
|
1226
|
+
const effectiveClass = className ?? classProp;
|
|
1972
1227
|
const el = document.createElement("thead");
|
|
1973
|
-
el.className = [tableStyles.header,
|
|
1974
|
-
for (const node of
|
|
1228
|
+
el.className = [tableStyles.header, effectiveClass].filter(Boolean).join(" ");
|
|
1229
|
+
for (const node of resolveChildren9(children)) {
|
|
1975
1230
|
el.appendChild(node);
|
|
1976
1231
|
}
|
|
1977
1232
|
return el;
|
|
1978
1233
|
}
|
|
1979
|
-
function TableBody({
|
|
1234
|
+
function TableBody({
|
|
1235
|
+
className,
|
|
1236
|
+
class: classProp,
|
|
1237
|
+
children
|
|
1238
|
+
}) {
|
|
1239
|
+
const effectiveClass = className ?? classProp;
|
|
1980
1240
|
const el = document.createElement("tbody");
|
|
1981
|
-
el.className = [tableStyles.body,
|
|
1982
|
-
for (const node of
|
|
1241
|
+
el.className = [tableStyles.body, effectiveClass].filter(Boolean).join(" ");
|
|
1242
|
+
for (const node of resolveChildren9(children)) {
|
|
1983
1243
|
el.appendChild(node);
|
|
1984
1244
|
}
|
|
1985
1245
|
return el;
|
|
1986
1246
|
}
|
|
1987
|
-
function TableRow({ class:
|
|
1247
|
+
function TableRow({ className, class: classProp, children }) {
|
|
1248
|
+
const effectiveClass = className ?? classProp;
|
|
1988
1249
|
const el = document.createElement("tr");
|
|
1989
|
-
el.className = [tableStyles.row,
|
|
1990
|
-
for (const node of
|
|
1250
|
+
el.className = [tableStyles.row, effectiveClass].filter(Boolean).join(" ");
|
|
1251
|
+
for (const node of resolveChildren9(children)) {
|
|
1991
1252
|
el.appendChild(node);
|
|
1992
1253
|
}
|
|
1993
1254
|
return el;
|
|
1994
1255
|
}
|
|
1995
|
-
function TableHead({ class:
|
|
1256
|
+
function TableHead({ className, class: classProp, children }) {
|
|
1257
|
+
const effectiveClass = className ?? classProp;
|
|
1996
1258
|
const el = document.createElement("th");
|
|
1997
1259
|
el.scope = "col";
|
|
1998
|
-
el.className = [tableStyles.head,
|
|
1999
|
-
for (const node of
|
|
1260
|
+
el.className = [tableStyles.head, effectiveClass].filter(Boolean).join(" ");
|
|
1261
|
+
for (const node of resolveChildren9(children)) {
|
|
2000
1262
|
el.appendChild(node);
|
|
2001
1263
|
}
|
|
2002
1264
|
return el;
|
|
2003
1265
|
}
|
|
2004
|
-
function TableCell({ class:
|
|
1266
|
+
function TableCell({ className, class: classProp, children }) {
|
|
1267
|
+
const effectiveClass = className ?? classProp;
|
|
2005
1268
|
const el = document.createElement("td");
|
|
2006
|
-
el.className = [tableStyles.cell,
|
|
2007
|
-
for (const node of
|
|
1269
|
+
el.className = [tableStyles.cell, effectiveClass].filter(Boolean).join(" ");
|
|
1270
|
+
for (const node of resolveChildren9(children)) {
|
|
2008
1271
|
el.appendChild(node);
|
|
2009
1272
|
}
|
|
2010
1273
|
return el;
|
|
2011
1274
|
}
|
|
2012
|
-
function TableCaption({
|
|
1275
|
+
function TableCaption({
|
|
1276
|
+
className,
|
|
1277
|
+
class: classProp,
|
|
1278
|
+
children
|
|
1279
|
+
}) {
|
|
1280
|
+
const effectiveClass = className ?? classProp;
|
|
2013
1281
|
const el = document.createElement("caption");
|
|
2014
|
-
el.className = [tableStyles.caption,
|
|
2015
|
-
for (const node of
|
|
1282
|
+
el.className = [tableStyles.caption, effectiveClass].filter(Boolean).join(" ");
|
|
1283
|
+
for (const node of resolveChildren9(children)) {
|
|
2016
1284
|
el.appendChild(node);
|
|
2017
1285
|
}
|
|
2018
1286
|
return el;
|
|
2019
1287
|
}
|
|
2020
|
-
function TableFooter({
|
|
1288
|
+
function TableFooter({
|
|
1289
|
+
className,
|
|
1290
|
+
class: classProp,
|
|
1291
|
+
children
|
|
1292
|
+
}) {
|
|
1293
|
+
const effectiveClass = className ?? classProp;
|
|
2021
1294
|
const el = document.createElement("tfoot");
|
|
2022
|
-
el.className = [tableStyles.footer,
|
|
2023
|
-
for (const node of
|
|
1295
|
+
el.className = [tableStyles.footer, effectiveClass].filter(Boolean).join(" ");
|
|
1296
|
+
for (const node of resolveChildren9(children)) {
|
|
2024
1297
|
el.appendChild(node);
|
|
2025
1298
|
}
|
|
2026
1299
|
return el;
|
|
@@ -2038,9 +1311,11 @@ function createTableComponents(tableStyles) {
|
|
|
2038
1311
|
}
|
|
2039
1312
|
|
|
2040
1313
|
// src/components/textarea.ts
|
|
1314
|
+
import { applyProps as applyProps3 } from "@vertz/ui-primitives/utils";
|
|
2041
1315
|
function createTextareaComponent(textareaStyles) {
|
|
2042
1316
|
return function Textarea({
|
|
2043
|
-
|
|
1317
|
+
className,
|
|
1318
|
+
class: classProp,
|
|
2044
1319
|
name,
|
|
2045
1320
|
placeholder,
|
|
2046
1321
|
disabled,
|
|
@@ -2048,8 +1323,9 @@ function createTextareaComponent(textareaStyles) {
|
|
|
2048
1323
|
rows,
|
|
2049
1324
|
...attrs
|
|
2050
1325
|
}) {
|
|
1326
|
+
const effectiveClass = className ?? classProp;
|
|
2051
1327
|
const el = document.createElement("textarea");
|
|
2052
|
-
el.className = [textareaStyles.base,
|
|
1328
|
+
el.className = [textareaStyles.base, effectiveClass].filter(Boolean).join(" ");
|
|
2053
1329
|
if (name !== undefined)
|
|
2054
1330
|
el.name = name;
|
|
2055
1331
|
if (placeholder !== undefined)
|
|
@@ -2060,11 +1336,7 @@ function createTextareaComponent(textareaStyles) {
|
|
|
2060
1336
|
el.value = value;
|
|
2061
1337
|
if (rows !== undefined)
|
|
2062
1338
|
el.rows = rows;
|
|
2063
|
-
|
|
2064
|
-
if (val !== undefined && val !== null) {
|
|
2065
|
-
el.setAttribute(key, String(val));
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
1339
|
+
applyProps3(el, attrs);
|
|
2068
1340
|
return el;
|
|
2069
1341
|
};
|
|
2070
1342
|
}
|
|
@@ -2092,12 +1364,12 @@ function createAccordionStyles() {
|
|
|
2092
1364
|
"font:medium",
|
|
2093
1365
|
"cursor:pointer",
|
|
2094
1366
|
{
|
|
2095
|
-
"&":
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
"&:hover":
|
|
1367
|
+
"&": {
|
|
1368
|
+
"border-radius": "0.5rem",
|
|
1369
|
+
"padding-top": "0.625rem",
|
|
1370
|
+
"padding-bottom": "0.625rem"
|
|
1371
|
+
},
|
|
1372
|
+
"&:hover": { "text-decoration": "underline" }
|
|
2101
1373
|
}
|
|
2102
1374
|
],
|
|
2103
1375
|
accordionContent: [
|
|
@@ -2108,6 +1380,12 @@ function createAccordionStyles() {
|
|
|
2108
1380
|
},
|
|
2109
1381
|
{
|
|
2110
1382
|
'&[data-state="closed"]': [animationDecl(`${accordionUp} 200ms ease-out forwards`)]
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
'& [data-part="content-inner"]': {
|
|
1386
|
+
"padding-bottom": "1rem",
|
|
1387
|
+
"padding-top": "0"
|
|
1388
|
+
}
|
|
2111
1389
|
}
|
|
2112
1390
|
]
|
|
2113
1391
|
});
|
|
@@ -2136,11 +1414,7 @@ function createAlertStyles() {
|
|
|
2136
1414
|
],
|
|
2137
1415
|
alertDestructive: ["text:destructive", "bg:card"],
|
|
2138
1416
|
alertTitle: ["font:medium", "leading:none", "tracking:tight", "mb:1"],
|
|
2139
|
-
alertDescription: [
|
|
2140
|
-
"text:muted-foreground",
|
|
2141
|
-
"text:sm",
|
|
2142
|
-
{ "&": [{ property: "line-height", value: "1.625" }] }
|
|
2143
|
-
]
|
|
1417
|
+
alertDescription: ["text:muted-foreground", "text:sm", { "&": { "line-height": "1.625" } }]
|
|
2144
1418
|
});
|
|
2145
1419
|
return {
|
|
2146
1420
|
root: s.alertRoot,
|
|
@@ -2156,10 +1430,9 @@ var focusRing = {
|
|
|
2156
1430
|
"&:focus-visible": [
|
|
2157
1431
|
"outline-none",
|
|
2158
1432
|
{
|
|
2159
|
-
|
|
2160
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
1433
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2161
1434
|
},
|
|
2162
|
-
{
|
|
1435
|
+
{ "outline-offset": "2px" }
|
|
2163
1436
|
]
|
|
2164
1437
|
};
|
|
2165
1438
|
function createAlertDialogStyles() {
|
|
@@ -2169,11 +1442,11 @@ function createAlertDialogStyles() {
|
|
|
2169
1442
|
"inset:0",
|
|
2170
1443
|
"z:50",
|
|
2171
1444
|
{
|
|
2172
|
-
"&":
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
1445
|
+
"&": {
|
|
1446
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
1447
|
+
"backdrop-filter": "blur(4px)",
|
|
1448
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
1449
|
+
}
|
|
2177
1450
|
},
|
|
2178
1451
|
{
|
|
2179
1452
|
'&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
|
|
@@ -2183,27 +1456,35 @@ function createAlertDialogStyles() {
|
|
|
2183
1456
|
}
|
|
2184
1457
|
],
|
|
2185
1458
|
alertDialogPanel: [
|
|
2186
|
-
"fixed",
|
|
2187
|
-
"z:50",
|
|
2188
1459
|
"bg:background",
|
|
2189
1460
|
"gap:4",
|
|
2190
1461
|
{
|
|
2191
|
-
"&":
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
1462
|
+
"&": {
|
|
1463
|
+
display: "grid",
|
|
1464
|
+
width: "100%",
|
|
1465
|
+
"max-width": "calc(100% - 2rem)",
|
|
1466
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)",
|
|
1467
|
+
"border-radius": "0.75rem",
|
|
1468
|
+
padding: "1rem",
|
|
1469
|
+
margin: "auto",
|
|
1470
|
+
height: "fit-content",
|
|
1471
|
+
outline: "none",
|
|
1472
|
+
border: "none",
|
|
1473
|
+
"container-type": "inline-size"
|
|
1474
|
+
},
|
|
1475
|
+
"&:not([open])": { display: "none" },
|
|
1476
|
+
"&::backdrop": {
|
|
1477
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
1478
|
+
"backdrop-filter": "blur(4px)",
|
|
1479
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
1480
|
+
},
|
|
1481
|
+
'&[data-state="open"]::backdrop': {
|
|
1482
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
1483
|
+
},
|
|
1484
|
+
'&[data-state="closed"]::backdrop': {
|
|
1485
|
+
animation: "vz-fade-out 100ms ease-out forwards"
|
|
1486
|
+
},
|
|
1487
|
+
"@media (min-width: 640px)": { "max-width": "24rem" }
|
|
2207
1488
|
},
|
|
2208
1489
|
{
|
|
2209
1490
|
'&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
|
|
@@ -2214,10 +1495,10 @@ function createAlertDialogStyles() {
|
|
|
2214
1495
|
],
|
|
2215
1496
|
alertDialogTitle: [
|
|
2216
1497
|
{
|
|
2217
|
-
"&":
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
1498
|
+
"&": {
|
|
1499
|
+
"font-size": "1rem",
|
|
1500
|
+
"font-weight": "500"
|
|
1501
|
+
}
|
|
2221
1502
|
}
|
|
2222
1503
|
],
|
|
2223
1504
|
alertDialogDescription: ["text:sm", "text:muted-foreground"],
|
|
@@ -2225,21 +1506,18 @@ function createAlertDialogStyles() {
|
|
|
2225
1506
|
"flex",
|
|
2226
1507
|
"gap:2",
|
|
2227
1508
|
{
|
|
2228
|
-
"&":
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
{ property: "flex-direction", value: "row" },
|
|
2241
|
-
{ property: "justify-content", value: "flex-end" }
|
|
2242
|
-
]
|
|
1509
|
+
"&": {
|
|
1510
|
+
"flex-direction": "column-reverse",
|
|
1511
|
+
"background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
|
|
1512
|
+
margin: "0 -1rem -1rem -1rem",
|
|
1513
|
+
"border-radius": "0 0 0.75rem 0.75rem",
|
|
1514
|
+
"border-top": "1px solid var(--color-border)",
|
|
1515
|
+
padding: "1rem"
|
|
1516
|
+
},
|
|
1517
|
+
"@container (min-width: 20rem)": {
|
|
1518
|
+
"flex-direction": "row",
|
|
1519
|
+
"justify-content": "flex-end"
|
|
1520
|
+
}
|
|
2243
1521
|
}
|
|
2244
1522
|
],
|
|
2245
1523
|
alertDialogCancel: [
|
|
@@ -2272,7 +1550,7 @@ function createAlertDialogStyles() {
|
|
|
2272
1550
|
"font:medium",
|
|
2273
1551
|
"cursor:pointer",
|
|
2274
1552
|
"transition:colors",
|
|
2275
|
-
{ "&:hover": [{
|
|
1553
|
+
{ "&:hover": [{ opacity: "0.9" }] },
|
|
2276
1554
|
focusRing
|
|
2277
1555
|
]
|
|
2278
1556
|
});
|
|
@@ -2296,10 +1574,10 @@ function createAvatarStyles() {
|
|
|
2296
1574
|
"h:full",
|
|
2297
1575
|
"w:full",
|
|
2298
1576
|
{
|
|
2299
|
-
"&":
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
1577
|
+
"&": {
|
|
1578
|
+
"aspect-ratio": "1 / 1",
|
|
1579
|
+
"object-fit": "cover"
|
|
1580
|
+
}
|
|
2303
1581
|
}
|
|
2304
1582
|
],
|
|
2305
1583
|
avatarFallback: [
|
|
@@ -2317,7 +1595,7 @@ function createAvatarStyles() {
|
|
|
2317
1595
|
avatarRootSm: ["h:6", "w:6"],
|
|
2318
1596
|
avatarRootLg: ["h:10", "w:10"],
|
|
2319
1597
|
avatarRootXl: ["h:12", "w:12"],
|
|
2320
|
-
avatarFallbackSm: [{ "&":
|
|
1598
|
+
avatarFallbackSm: [{ "&": { "font-size": "0.625rem" } }],
|
|
2321
1599
|
avatarFallbackLg: ["text:sm"],
|
|
2322
1600
|
avatarFallbackXl: ["text:base"]
|
|
2323
1601
|
});
|
|
@@ -2368,10 +1646,9 @@ var focusRing2 = {
|
|
|
2368
1646
|
"&:focus-visible": [
|
|
2369
1647
|
"outline-none",
|
|
2370
1648
|
{
|
|
2371
|
-
|
|
2372
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
1649
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2373
1650
|
},
|
|
2374
|
-
{
|
|
1651
|
+
{ "outline-offset": "2px" }
|
|
2375
1652
|
]
|
|
2376
1653
|
};
|
|
2377
1654
|
function createCalendarStyles() {
|
|
@@ -2392,18 +1669,18 @@ function createCalendarStyles() {
|
|
|
2392
1669
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] },
|
|
2393
1670
|
focusRing2,
|
|
2394
1671
|
{
|
|
2395
|
-
"&":
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
1672
|
+
"&": {
|
|
1673
|
+
height: "1.75rem",
|
|
1674
|
+
width: "1.75rem"
|
|
1675
|
+
}
|
|
2399
1676
|
}
|
|
2400
1677
|
],
|
|
2401
1678
|
calendarGrid: [
|
|
2402
1679
|
{
|
|
2403
|
-
"&":
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
1680
|
+
"&": {
|
|
1681
|
+
width: "100%",
|
|
1682
|
+
"border-collapse": "collapse"
|
|
1683
|
+
}
|
|
2407
1684
|
}
|
|
2408
1685
|
],
|
|
2409
1686
|
calendarHeadCell: [
|
|
@@ -2411,18 +1688,18 @@ function createCalendarStyles() {
|
|
|
2411
1688
|
"text:xs",
|
|
2412
1689
|
"font:medium",
|
|
2413
1690
|
{
|
|
2414
|
-
"&":
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
1691
|
+
"&": {
|
|
1692
|
+
width: "2rem",
|
|
1693
|
+
"text-align": "center"
|
|
1694
|
+
}
|
|
2418
1695
|
}
|
|
2419
1696
|
],
|
|
2420
1697
|
calendarCell: [
|
|
2421
1698
|
{
|
|
2422
|
-
"&":
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
1699
|
+
"&": {
|
|
1700
|
+
"text-align": "center",
|
|
1701
|
+
padding: "0"
|
|
1702
|
+
}
|
|
2426
1703
|
}
|
|
2427
1704
|
],
|
|
2428
1705
|
calendarDayButton: [
|
|
@@ -2436,10 +1713,10 @@ function createCalendarStyles() {
|
|
|
2436
1713
|
"transition:colors",
|
|
2437
1714
|
focusRing2,
|
|
2438
1715
|
{
|
|
2439
|
-
"&":
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
1716
|
+
"&": {
|
|
1717
|
+
height: "2rem",
|
|
1718
|
+
width: "2rem"
|
|
1719
|
+
}
|
|
2443
1720
|
},
|
|
2444
1721
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] },
|
|
2445
1722
|
{ '&[aria-selected="true"]': ["bg:primary", "text:primary-foreground"] },
|
|
@@ -2475,23 +1752,20 @@ function createCard() {
|
|
|
2475
1752
|
"py:4",
|
|
2476
1753
|
"text:sm",
|
|
2477
1754
|
{
|
|
2478
|
-
"&":
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
value: "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
|
|
2483
|
-
}
|
|
2484
|
-
]
|
|
1755
|
+
"&": {
|
|
1756
|
+
"border-radius": "0.75rem",
|
|
1757
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
|
|
1758
|
+
}
|
|
2485
1759
|
}
|
|
2486
1760
|
],
|
|
2487
1761
|
cardHeader: ["flex", "flex-col", "gap:1", "px:4"],
|
|
2488
1762
|
cardTitle: [
|
|
2489
1763
|
"font:medium",
|
|
2490
1764
|
{
|
|
2491
|
-
"&":
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
1765
|
+
"&": {
|
|
1766
|
+
"font-size": "1rem",
|
|
1767
|
+
"line-height": "1.375"
|
|
1768
|
+
}
|
|
2495
1769
|
}
|
|
2496
1770
|
],
|
|
2497
1771
|
cardDescription: ["text:sm", "text:muted-foreground"],
|
|
@@ -2504,14 +1778,11 @@ function createCard() {
|
|
|
2504
1778
|
"border-t:1",
|
|
2505
1779
|
"border:border",
|
|
2506
1780
|
{
|
|
2507
|
-
"&":
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
{ property: "border-radius", value: "0 0 0.75rem 0.75rem" },
|
|
2513
|
-
{ property: "margin-bottom", value: "-1rem" }
|
|
2514
|
-
]
|
|
1781
|
+
"&": {
|
|
1782
|
+
"background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
|
|
1783
|
+
"border-radius": "0 0 0.75rem 0.75rem",
|
|
1784
|
+
"margin-bottom": "-1rem"
|
|
1785
|
+
}
|
|
2515
1786
|
}
|
|
2516
1787
|
],
|
|
2517
1788
|
cardAction: ["ml:auto"]
|
|
@@ -2536,11 +1807,11 @@ function createCarouselStyles() {
|
|
|
2536
1807
|
carouselSlide: [
|
|
2537
1808
|
"shrink-0",
|
|
2538
1809
|
{
|
|
2539
|
-
"&":
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
1810
|
+
"&": {
|
|
1811
|
+
"min-width": "0",
|
|
1812
|
+
"flex-grow": "0",
|
|
1813
|
+
"flex-basis": "100%"
|
|
1814
|
+
}
|
|
2544
1815
|
},
|
|
2545
1816
|
{ '&[data-state="inactive"]': ["opacity:0"] },
|
|
2546
1817
|
{ '&[data-state="active"]': ["opacity:1"] }
|
|
@@ -2558,11 +1829,11 @@ function createCarouselStyles() {
|
|
|
2558
1829
|
"justify:center",
|
|
2559
1830
|
"cursor:pointer",
|
|
2560
1831
|
{
|
|
2561
|
-
"&":
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
1832
|
+
"&": {
|
|
1833
|
+
left: "0.5rem",
|
|
1834
|
+
top: "50%",
|
|
1835
|
+
transform: "translateY(-50%)"
|
|
1836
|
+
}
|
|
2566
1837
|
},
|
|
2567
1838
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] },
|
|
2568
1839
|
{ "&:disabled": ["pointer-events-none", "opacity:0.5"] }
|
|
@@ -2580,11 +1851,11 @@ function createCarouselStyles() {
|
|
|
2580
1851
|
"justify:center",
|
|
2581
1852
|
"cursor:pointer",
|
|
2582
1853
|
{
|
|
2583
|
-
"&":
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
1854
|
+
"&": {
|
|
1855
|
+
right: "0.5rem",
|
|
1856
|
+
top: "50%",
|
|
1857
|
+
transform: "translateY(-50%)"
|
|
1858
|
+
}
|
|
2588
1859
|
},
|
|
2589
1860
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] },
|
|
2590
1861
|
{ "&:disabled": ["pointer-events-none", "opacity:0.5"] }
|
|
@@ -2606,8 +1877,7 @@ var focusRing3 = {
|
|
|
2606
1877
|
"outline-none",
|
|
2607
1878
|
"border:ring",
|
|
2608
1879
|
{
|
|
2609
|
-
|
|
2610
|
-
value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
1880
|
+
"box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2611
1881
|
}
|
|
2612
1882
|
]
|
|
2613
1883
|
};
|
|
@@ -2624,9 +1894,7 @@ function createCheckboxStyles() {
|
|
|
2624
1894
|
"border:input",
|
|
2625
1895
|
"cursor:pointer",
|
|
2626
1896
|
"transition:colors",
|
|
2627
|
-
{ "&":
|
|
2628
|
-
{ "&": [{ property: "background", value: "transparent" }] },
|
|
2629
|
-
{ "&": [{ property: "border-radius", value: "4px" }] },
|
|
1897
|
+
{ "&": { padding: "0", background: "transparent", "border-radius": "4px" } },
|
|
2630
1898
|
{ [DARK]: [bgOpacity("input", 30)] },
|
|
2631
1899
|
focusRing3,
|
|
2632
1900
|
{ "&:disabled": ["pointer-events-none", "opacity:0.5"] },
|
|
@@ -2678,10 +1946,9 @@ var focusRing4 = {
|
|
|
2678
1946
|
"&:focus-visible": [
|
|
2679
1947
|
"outline-none",
|
|
2680
1948
|
{
|
|
2681
|
-
|
|
2682
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
1949
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2683
1950
|
},
|
|
2684
|
-
{
|
|
1951
|
+
{ "outline-offset": "2px" }
|
|
2685
1952
|
]
|
|
2686
1953
|
};
|
|
2687
1954
|
function createCommandStyles() {
|
|
@@ -2707,21 +1974,21 @@ function createCommandStyles() {
|
|
|
2707
1974
|
"outline-none",
|
|
2708
1975
|
{ "&::placeholder": ["text:muted-foreground"] },
|
|
2709
1976
|
{
|
|
2710
|
-
"&":
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
1977
|
+
"&": {
|
|
1978
|
+
height: "2.5rem",
|
|
1979
|
+
"border-bottom": "1px solid var(--color-border)"
|
|
1980
|
+
}
|
|
2714
1981
|
},
|
|
2715
1982
|
focusRing4
|
|
2716
1983
|
],
|
|
2717
1984
|
commandList: [
|
|
2718
1985
|
"p:1",
|
|
2719
1986
|
{
|
|
2720
|
-
"&":
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
1987
|
+
"&": {
|
|
1988
|
+
"max-height": "300px",
|
|
1989
|
+
"overflow-y": "auto",
|
|
1990
|
+
"overflow-x": "hidden"
|
|
1991
|
+
}
|
|
2725
1992
|
}
|
|
2726
1993
|
],
|
|
2727
1994
|
commandItem: [
|
|
@@ -2732,10 +1999,10 @@ function createCommandStyles() {
|
|
|
2732
1999
|
"text:sm",
|
|
2733
2000
|
"cursor:pointer",
|
|
2734
2001
|
{
|
|
2735
|
-
"&":
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2002
|
+
"&": {
|
|
2003
|
+
"padding-top": "0.375rem",
|
|
2004
|
+
"padding-bottom": "0.375rem"
|
|
2005
|
+
}
|
|
2739
2006
|
},
|
|
2740
2007
|
{ '&[aria-selected="true"]': ["bg:accent", "text:accent-foreground"] }
|
|
2741
2008
|
],
|
|
@@ -2746,21 +2013,21 @@ function createCommandStyles() {
|
|
|
2746
2013
|
"font:medium",
|
|
2747
2014
|
"text:muted-foreground",
|
|
2748
2015
|
{
|
|
2749
|
-
"&":
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2016
|
+
"&": {
|
|
2017
|
+
"padding-top": "0.375rem",
|
|
2018
|
+
"padding-bottom": "0.375rem"
|
|
2019
|
+
}
|
|
2753
2020
|
}
|
|
2754
2021
|
],
|
|
2755
2022
|
commandSeparator: [
|
|
2756
2023
|
{
|
|
2757
|
-
"&":
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2024
|
+
"&": {
|
|
2025
|
+
"margin-left": "-0.25rem",
|
|
2026
|
+
"margin-right": "-0.25rem",
|
|
2027
|
+
height: "1px",
|
|
2028
|
+
"background-color": "var(--color-border)",
|
|
2029
|
+
border: "none"
|
|
2030
|
+
}
|
|
2764
2031
|
}
|
|
2765
2032
|
],
|
|
2766
2033
|
commandEmpty: ["py:6", "text:center", "text:sm", "text:muted-foreground"]
|
|
@@ -2813,13 +2080,7 @@ function createContextMenuStyles() {
|
|
|
2813
2080
|
],
|
|
2814
2081
|
cmGroup: ["py:1"],
|
|
2815
2082
|
cmLabel: ["px:2", "py:1.5", "text:xs", "font:semibold", "text:muted-foreground"],
|
|
2816
|
-
cmSeparator: [
|
|
2817
|
-
"mx:1",
|
|
2818
|
-
"my:1",
|
|
2819
|
-
"border-t:1",
|
|
2820
|
-
"border:muted",
|
|
2821
|
-
{ "&": [{ property: "height", value: "1px" }] }
|
|
2822
|
-
]
|
|
2083
|
+
cmSeparator: ["mx:1", "my:1", "border-t:1", "border:muted", { "&": { height: "1px" } }]
|
|
2823
2084
|
});
|
|
2824
2085
|
return {
|
|
2825
2086
|
content: s.cmContent,
|
|
@@ -2836,10 +2097,9 @@ var focusRing5 = {
|
|
|
2836
2097
|
"&:focus-visible": [
|
|
2837
2098
|
"outline-none",
|
|
2838
2099
|
{
|
|
2839
|
-
|
|
2840
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2100
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2841
2101
|
},
|
|
2842
|
-
{
|
|
2102
|
+
{ "outline-offset": "2px" }
|
|
2843
2103
|
]
|
|
2844
2104
|
};
|
|
2845
2105
|
function createDatePickerStyles() {
|
|
@@ -2858,11 +2118,11 @@ function createDatePickerStyles() {
|
|
|
2858
2118
|
"transition:colors",
|
|
2859
2119
|
focusRing5,
|
|
2860
2120
|
{
|
|
2861
|
-
"&":
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2121
|
+
"&": {
|
|
2122
|
+
height: "2.5rem",
|
|
2123
|
+
width: "100%",
|
|
2124
|
+
padding: "0.5rem 0.75rem"
|
|
2125
|
+
}
|
|
2866
2126
|
},
|
|
2867
2127
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] },
|
|
2868
2128
|
{ '&[data-placeholder="true"]': ["text:muted-foreground"] }
|
|
@@ -2874,7 +2134,7 @@ function createDatePickerStyles() {
|
|
|
2874
2134
|
"border:1",
|
|
2875
2135
|
"border:border",
|
|
2876
2136
|
"shadow:md",
|
|
2877
|
-
{ "&":
|
|
2137
|
+
{ "&": { padding: "0" } }
|
|
2878
2138
|
]
|
|
2879
2139
|
});
|
|
2880
2140
|
return {
|
|
@@ -2889,10 +2149,9 @@ var focusRing6 = {
|
|
|
2889
2149
|
"&:focus-visible": [
|
|
2890
2150
|
"outline-none",
|
|
2891
2151
|
{
|
|
2892
|
-
|
|
2893
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2152
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2894
2153
|
},
|
|
2895
|
-
{
|
|
2154
|
+
{ "outline-offset": "2px" }
|
|
2896
2155
|
]
|
|
2897
2156
|
};
|
|
2898
2157
|
function createDialogStyles() {
|
|
@@ -2902,11 +2161,11 @@ function createDialogStyles() {
|
|
|
2902
2161
|
"inset:0",
|
|
2903
2162
|
"z:50",
|
|
2904
2163
|
{
|
|
2905
|
-
"&":
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2164
|
+
"&": {
|
|
2165
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
2166
|
+
"backdrop-filter": "blur(4px)",
|
|
2167
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
2168
|
+
}
|
|
2910
2169
|
},
|
|
2911
2170
|
{
|
|
2912
2171
|
'&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
|
|
@@ -2916,29 +2175,36 @@ function createDialogStyles() {
|
|
|
2916
2175
|
}
|
|
2917
2176
|
],
|
|
2918
2177
|
dialogPanel: [
|
|
2919
|
-
"fixed",
|
|
2920
|
-
"z:50",
|
|
2921
2178
|
"bg:background",
|
|
2922
2179
|
"gap:4",
|
|
2923
2180
|
{
|
|
2924
|
-
"&":
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2181
|
+
"&": {
|
|
2182
|
+
display: "grid",
|
|
2183
|
+
width: "100%",
|
|
2184
|
+
"max-width": "calc(100% - 2rem)",
|
|
2185
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)",
|
|
2186
|
+
"border-radius": "0.75rem",
|
|
2187
|
+
padding: "1rem",
|
|
2188
|
+
"font-size": "0.875rem",
|
|
2189
|
+
margin: "auto",
|
|
2190
|
+
height: "fit-content",
|
|
2191
|
+
outline: "none",
|
|
2192
|
+
border: "none",
|
|
2193
|
+
"container-type": "inline-size"
|
|
2194
|
+
},
|
|
2195
|
+
"&:not([open])": { display: "none" },
|
|
2196
|
+
"&::backdrop": {
|
|
2197
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
2198
|
+
"backdrop-filter": "blur(4px)",
|
|
2199
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
2200
|
+
},
|
|
2201
|
+
'&[data-state="open"]::backdrop': {
|
|
2202
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
2203
|
+
},
|
|
2204
|
+
'&[data-state="closed"]::backdrop': {
|
|
2205
|
+
animation: "vz-fade-out 100ms ease-out forwards"
|
|
2206
|
+
},
|
|
2207
|
+
"@media (min-width: 640px)": { "max-width": "24rem" }
|
|
2942
2208
|
},
|
|
2943
2209
|
{
|
|
2944
2210
|
'&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
|
|
@@ -2952,16 +2218,16 @@ function createDialogStyles() {
|
|
|
2952
2218
|
"flex-col",
|
|
2953
2219
|
"gap:2",
|
|
2954
2220
|
{
|
|
2955
|
-
"@media (min-width: 640px)":
|
|
2221
|
+
"@media (min-width: 640px)": { "text-align": "left" }
|
|
2956
2222
|
}
|
|
2957
2223
|
],
|
|
2958
2224
|
dialogTitle: [
|
|
2959
2225
|
{
|
|
2960
|
-
"&":
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2226
|
+
"&": {
|
|
2227
|
+
"font-size": "1rem",
|
|
2228
|
+
"line-height": "1",
|
|
2229
|
+
"font-weight": "500"
|
|
2230
|
+
}
|
|
2965
2231
|
}
|
|
2966
2232
|
],
|
|
2967
2233
|
dialogDescription: ["text:sm", "text:muted-foreground"],
|
|
@@ -2970,23 +2236,23 @@ function createDialogStyles() {
|
|
|
2970
2236
|
"rounded:xs",
|
|
2971
2237
|
"cursor:pointer",
|
|
2972
2238
|
{
|
|
2973
|
-
"&":
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
"&:hover":
|
|
2989
|
-
"&:disabled":
|
|
2239
|
+
"&": {
|
|
2240
|
+
top: "0.5rem",
|
|
2241
|
+
right: "0.5rem",
|
|
2242
|
+
opacity: "0.7",
|
|
2243
|
+
transition: "opacity 150ms",
|
|
2244
|
+
display: "inline-flex",
|
|
2245
|
+
"align-items": "center",
|
|
2246
|
+
"justify-content": "center",
|
|
2247
|
+
width: "1rem",
|
|
2248
|
+
height: "1rem",
|
|
2249
|
+
background: "none",
|
|
2250
|
+
border: "none",
|
|
2251
|
+
color: "currentColor",
|
|
2252
|
+
padding: "0"
|
|
2253
|
+
},
|
|
2254
|
+
"&:hover": { opacity: "1" },
|
|
2255
|
+
"&:disabled": { "pointer-events": "none" }
|
|
2990
2256
|
},
|
|
2991
2257
|
focusRing6
|
|
2992
2258
|
],
|
|
@@ -2994,21 +2260,18 @@ function createDialogStyles() {
|
|
|
2994
2260
|
"flex",
|
|
2995
2261
|
"gap:2",
|
|
2996
2262
|
{
|
|
2997
|
-
"&":
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
{ property: "flex-direction", value: "row" },
|
|
3010
|
-
{ property: "justify-content", value: "flex-end" }
|
|
3011
|
-
]
|
|
2263
|
+
"&": {
|
|
2264
|
+
"flex-direction": "column-reverse",
|
|
2265
|
+
"background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
|
|
2266
|
+
margin: "0 -1rem -1rem -1rem",
|
|
2267
|
+
"border-radius": "0 0 0.75rem 0.75rem",
|
|
2268
|
+
"border-top": "1px solid var(--color-border)",
|
|
2269
|
+
padding: "1rem"
|
|
2270
|
+
},
|
|
2271
|
+
"@container (min-width: 20rem)": {
|
|
2272
|
+
"flex-direction": "row",
|
|
2273
|
+
"justify-content": "flex-end"
|
|
2274
|
+
}
|
|
3012
2275
|
}
|
|
3013
2276
|
]
|
|
3014
2277
|
});
|
|
@@ -3029,10 +2292,9 @@ var focusRing7 = {
|
|
|
3029
2292
|
"&:focus-visible": [
|
|
3030
2293
|
"outline-none",
|
|
3031
2294
|
{
|
|
3032
|
-
|
|
3033
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2295
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3034
2296
|
},
|
|
3035
|
-
{
|
|
2297
|
+
{ "outline-offset": "2px" }
|
|
3036
2298
|
]
|
|
3037
2299
|
};
|
|
3038
2300
|
var PANEL_BASE = [
|
|
@@ -3052,7 +2314,7 @@ function createDrawerStyles() {
|
|
|
3052
2314
|
"inset:0",
|
|
3053
2315
|
"z:50",
|
|
3054
2316
|
{
|
|
3055
|
-
"&":
|
|
2317
|
+
"&": { "background-color": "oklch(0 0 0 / 50%)" }
|
|
3056
2318
|
},
|
|
3057
2319
|
{
|
|
3058
2320
|
'&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
|
|
@@ -3065,12 +2327,12 @@ function createDrawerStyles() {
|
|
|
3065
2327
|
...PANEL_BASE,
|
|
3066
2328
|
"border-r:1",
|
|
3067
2329
|
{
|
|
3068
|
-
"&":
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
2330
|
+
"&": {
|
|
2331
|
+
inset: "0 auto 0 0",
|
|
2332
|
+
width: "75%",
|
|
2333
|
+
"max-width": "24rem",
|
|
2334
|
+
"border-radius": "0 0.75rem 0.75rem 0"
|
|
2335
|
+
}
|
|
3074
2336
|
},
|
|
3075
2337
|
{
|
|
3076
2338
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-left 300ms ease-out forwards")]
|
|
@@ -3083,12 +2345,12 @@ function createDrawerStyles() {
|
|
|
3083
2345
|
...PANEL_BASE,
|
|
3084
2346
|
"border-l:1",
|
|
3085
2347
|
{
|
|
3086
|
-
"&":
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
2348
|
+
"&": {
|
|
2349
|
+
inset: "0 0 0 auto",
|
|
2350
|
+
width: "75%",
|
|
2351
|
+
"max-width": "24rem",
|
|
2352
|
+
"border-radius": "0.75rem 0 0 0.75rem"
|
|
2353
|
+
}
|
|
3092
2354
|
},
|
|
3093
2355
|
{
|
|
3094
2356
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-right 300ms ease-out forwards")]
|
|
@@ -3101,10 +2363,10 @@ function createDrawerStyles() {
|
|
|
3101
2363
|
...PANEL_BASE,
|
|
3102
2364
|
"border-b:1",
|
|
3103
2365
|
{
|
|
3104
|
-
"&":
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
2366
|
+
"&": {
|
|
2367
|
+
inset: "0 0 auto 0",
|
|
2368
|
+
"border-radius": "0 0 0.75rem 0.75rem"
|
|
2369
|
+
}
|
|
3108
2370
|
},
|
|
3109
2371
|
{
|
|
3110
2372
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-top 300ms ease-out forwards")]
|
|
@@ -3117,10 +2379,10 @@ function createDrawerStyles() {
|
|
|
3117
2379
|
...PANEL_BASE,
|
|
3118
2380
|
"border-t:1",
|
|
3119
2381
|
{
|
|
3120
|
-
"&":
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
2382
|
+
"&": {
|
|
2383
|
+
inset: "auto 0 0 0",
|
|
2384
|
+
"border-radius": "0.75rem 0.75rem 0 0"
|
|
2385
|
+
}
|
|
3124
2386
|
},
|
|
3125
2387
|
{
|
|
3126
2388
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 300ms ease-out forwards")]
|
|
@@ -3129,19 +2391,33 @@ function createDrawerStyles() {
|
|
|
3129
2391
|
'&[data-state="closed"]': [animationDecl("vz-slide-out-to-bottom 300ms ease-out forwards")]
|
|
3130
2392
|
}
|
|
3131
2393
|
],
|
|
2394
|
+
drawerHeader: ["flex", "flex-col", "gap:1.5"],
|
|
3132
2395
|
drawerTitle: ["text:lg", "font:semibold", "leading:none", "tracking:tight"],
|
|
3133
2396
|
drawerDescription: ["text:sm", "text:muted-foreground"],
|
|
2397
|
+
drawerFooter: [
|
|
2398
|
+
"flex",
|
|
2399
|
+
"gap:2",
|
|
2400
|
+
{
|
|
2401
|
+
"&": {
|
|
2402
|
+
"flex-direction": "column-reverse"
|
|
2403
|
+
},
|
|
2404
|
+
"@media (min-width: 640px)": {
|
|
2405
|
+
"flex-direction": "row",
|
|
2406
|
+
"justify-content": "flex-end"
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
],
|
|
3134
2410
|
drawerHandle: [
|
|
3135
2411
|
{
|
|
3136
|
-
"&":
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
2412
|
+
"&": {
|
|
2413
|
+
"margin-left": "auto",
|
|
2414
|
+
"margin-right": "auto",
|
|
2415
|
+
"margin-top": "1rem",
|
|
2416
|
+
height: "0.5rem",
|
|
2417
|
+
width: "100px",
|
|
2418
|
+
"border-radius": "9999px",
|
|
2419
|
+
"background-color": "var(--color-muted)"
|
|
2420
|
+
}
|
|
3145
2421
|
}
|
|
3146
2422
|
],
|
|
3147
2423
|
drawerClose: [
|
|
@@ -3160,8 +2436,10 @@ function createDrawerStyles() {
|
|
|
3160
2436
|
panelRight: s.drawerPanelRight,
|
|
3161
2437
|
panelTop: s.drawerPanelTop,
|
|
3162
2438
|
panelBottom: s.drawerPanelBottom,
|
|
2439
|
+
header: s.drawerHeader,
|
|
3163
2440
|
title: s.drawerTitle,
|
|
3164
2441
|
description: s.drawerDescription,
|
|
2442
|
+
footer: s.drawerFooter,
|
|
3165
2443
|
handle: s.drawerHandle,
|
|
3166
2444
|
close: s.drawerClose,
|
|
3167
2445
|
css: s.css
|
|
@@ -3177,15 +2455,13 @@ function createDropdownMenuStyles() {
|
|
|
3177
2455
|
"bg:popover",
|
|
3178
2456
|
"text:popover-foreground",
|
|
3179
2457
|
"rounded:lg",
|
|
2458
|
+
"w:fit",
|
|
3180
2459
|
"p:1",
|
|
3181
2460
|
{
|
|
3182
|
-
"&":
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
},
|
|
3187
|
-
{ property: "min-width", value: "8rem" }
|
|
3188
|
-
]
|
|
2461
|
+
"&": {
|
|
2462
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
2463
|
+
"min-width": "8rem"
|
|
2464
|
+
}
|
|
3189
2465
|
},
|
|
3190
2466
|
{
|
|
3191
2467
|
'&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
|
|
@@ -3214,11 +2490,11 @@ function createDropdownMenuStyles() {
|
|
|
3214
2490
|
"my:1",
|
|
3215
2491
|
"bg:border",
|
|
3216
2492
|
{
|
|
3217
|
-
"&":
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
2493
|
+
"&": {
|
|
2494
|
+
"margin-left": "-0.25rem",
|
|
2495
|
+
"margin-right": "-0.25rem",
|
|
2496
|
+
height: "1px"
|
|
2497
|
+
}
|
|
3222
2498
|
}
|
|
3223
2499
|
]
|
|
3224
2500
|
});
|
|
@@ -3258,7 +2534,7 @@ function createHoverCardStyles() {
|
|
|
3258
2534
|
"shadow:md",
|
|
3259
2535
|
"p:4",
|
|
3260
2536
|
{
|
|
3261
|
-
"&":
|
|
2537
|
+
"&": { width: "16rem" }
|
|
3262
2538
|
},
|
|
3263
2539
|
{
|
|
3264
2540
|
'&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
|
|
@@ -3281,10 +2557,9 @@ function createInput() {
|
|
|
3281
2557
|
"outline-none",
|
|
3282
2558
|
"border:ring",
|
|
3283
2559
|
{
|
|
3284
|
-
|
|
3285
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2560
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3286
2561
|
},
|
|
3287
|
-
{
|
|
2562
|
+
{ "outline-offset": "2px" }
|
|
3288
2563
|
]
|
|
3289
2564
|
};
|
|
3290
2565
|
const s = css19({
|
|
@@ -3297,11 +2572,11 @@ function createInput() {
|
|
|
3297
2572
|
"bg:transparent",
|
|
3298
2573
|
"py:1",
|
|
3299
2574
|
{
|
|
3300
|
-
"&":
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
2575
|
+
"&": {
|
|
2576
|
+
height: "2rem",
|
|
2577
|
+
"padding-left": "0.625rem",
|
|
2578
|
+
"padding-right": "0.625rem"
|
|
2579
|
+
}
|
|
3305
2580
|
},
|
|
3306
2581
|
"text:sm",
|
|
3307
2582
|
"text:foreground",
|
|
@@ -3359,7 +2634,7 @@ function createMenubarStyles() {
|
|
|
3359
2634
|
"border:border",
|
|
3360
2635
|
"bg:background",
|
|
3361
2636
|
"p:1",
|
|
3362
|
-
{ "&":
|
|
2637
|
+
{ "&": { "column-gap": "0.25rem" } }
|
|
3363
2638
|
],
|
|
3364
2639
|
mbTrigger: [
|
|
3365
2640
|
"flex",
|
|
@@ -3407,13 +2682,7 @@ function createMenubarStyles() {
|
|
|
3407
2682
|
{ "&:focus": ["bg:accent", "text:accent-foreground"] },
|
|
3408
2683
|
{ "&[data-disabled]": ["pointer-events-none", "opacity:0.5"] }
|
|
3409
2684
|
],
|
|
3410
|
-
mbSeparator: [
|
|
3411
|
-
"mx:1",
|
|
3412
|
-
"my:1",
|
|
3413
|
-
"border-t:1",
|
|
3414
|
-
"border:muted",
|
|
3415
|
-
{ "&": [{ property: "height", value: "1px" }] }
|
|
3416
|
-
],
|
|
2685
|
+
mbSeparator: ["mx:1", "my:1", "border-t:1", "border:muted", { "&": { height: "1px" } }],
|
|
3417
2686
|
mbLabel: ["px:2", "py:1.5", "text:xs", "font:semibold", "text:muted-foreground"]
|
|
3418
2687
|
});
|
|
3419
2688
|
return {
|
|
@@ -3457,10 +2726,10 @@ function createNavigationMenuStyles() {
|
|
|
3457
2726
|
"shadow:lg",
|
|
3458
2727
|
"text:popover-foreground",
|
|
3459
2728
|
{
|
|
3460
|
-
"&":
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
2729
|
+
"&": {
|
|
2730
|
+
left: "0",
|
|
2731
|
+
top: "100%"
|
|
2732
|
+
}
|
|
3464
2733
|
},
|
|
3465
2734
|
{
|
|
3466
2735
|
'&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
|
|
@@ -3476,7 +2745,7 @@ function createNavigationMenuStyles() {
|
|
|
3476
2745
|
"text:sm",
|
|
3477
2746
|
"leading:none",
|
|
3478
2747
|
{
|
|
3479
|
-
"&":
|
|
2748
|
+
"&": { "text-decoration-line": "none" }
|
|
3480
2749
|
},
|
|
3481
2750
|
{ "&:hover": ["bg:accent", "text:accent-foreground"] }
|
|
3482
2751
|
],
|
|
@@ -3484,10 +2753,10 @@ function createNavigationMenuStyles() {
|
|
|
3484
2753
|
"absolute",
|
|
3485
2754
|
"w:full",
|
|
3486
2755
|
{
|
|
3487
|
-
"&":
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
2756
|
+
"&": {
|
|
2757
|
+
left: "0",
|
|
2758
|
+
top: "100%"
|
|
2759
|
+
}
|
|
3491
2760
|
}
|
|
3492
2761
|
]
|
|
3493
2762
|
});
|
|
@@ -3507,10 +2776,9 @@ var focusRing8 = {
|
|
|
3507
2776
|
"&:focus-visible": [
|
|
3508
2777
|
"outline-none",
|
|
3509
2778
|
{
|
|
3510
|
-
|
|
3511
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2779
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3512
2780
|
},
|
|
3513
|
-
{
|
|
2781
|
+
{ "outline-offset": "2px" }
|
|
3514
2782
|
]
|
|
3515
2783
|
};
|
|
3516
2784
|
function createPaginationStyles() {
|
|
@@ -3573,18 +2841,16 @@ function createPopoverStyles() {
|
|
|
3573
2841
|
"bg:popover",
|
|
3574
2842
|
"text:popover-foreground",
|
|
3575
2843
|
"rounded:lg",
|
|
2844
|
+
"w:fit",
|
|
3576
2845
|
"flex",
|
|
3577
2846
|
"flex-col",
|
|
3578
2847
|
"gap:2.5",
|
|
3579
2848
|
"p:2.5",
|
|
3580
2849
|
"text:sm",
|
|
3581
2850
|
{
|
|
3582
|
-
"&":
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
value: "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
|
|
3586
|
-
}
|
|
3587
|
-
]
|
|
2851
|
+
"&": {
|
|
2852
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
|
|
2853
|
+
}
|
|
3588
2854
|
},
|
|
3589
2855
|
{
|
|
3590
2856
|
'&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
|
|
@@ -3609,14 +2875,9 @@ function createProgressStyles() {
|
|
|
3609
2875
|
"overflow-hidden",
|
|
3610
2876
|
"rounded:full",
|
|
3611
2877
|
"bg:muted",
|
|
3612
|
-
{ "&":
|
|
2878
|
+
{ "&": { height: "0.25rem" } }
|
|
3613
2879
|
],
|
|
3614
|
-
progressIndicator: [
|
|
3615
|
-
"h:full",
|
|
3616
|
-
"w:full",
|
|
3617
|
-
"bg:primary",
|
|
3618
|
-
{ "&": [{ property: "transition", value: "all 150ms" }] }
|
|
3619
|
-
]
|
|
2880
|
+
progressIndicator: ["h:full", "w:full", "bg:primary", { "&": { transition: "all 150ms" } }]
|
|
3620
2881
|
});
|
|
3621
2882
|
return {
|
|
3622
2883
|
root: s.progressRoot,
|
|
@@ -3631,8 +2892,7 @@ var focusRing9 = {
|
|
|
3631
2892
|
"outline-none",
|
|
3632
2893
|
"border:ring",
|
|
3633
2894
|
{
|
|
3634
|
-
|
|
3635
|
-
value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2895
|
+
"box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3636
2896
|
}
|
|
3637
2897
|
]
|
|
3638
2898
|
};
|
|
@@ -3652,11 +2912,11 @@ function createRadioGroupStyles() {
|
|
|
3652
2912
|
"cursor:pointer",
|
|
3653
2913
|
"transition:colors",
|
|
3654
2914
|
{
|
|
3655
|
-
"&":
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
2915
|
+
"&": {
|
|
2916
|
+
"aspect-ratio": "1 / 1",
|
|
2917
|
+
padding: "0",
|
|
2918
|
+
background: "transparent"
|
|
2919
|
+
}
|
|
3660
2920
|
},
|
|
3661
2921
|
{ [DARK]: [bgOpacity("input", 30)] },
|
|
3662
2922
|
focusRing9,
|
|
@@ -3675,7 +2935,7 @@ function createRadioGroupStyles() {
|
|
|
3675
2935
|
"items:center",
|
|
3676
2936
|
"justify:center",
|
|
3677
2937
|
{
|
|
3678
|
-
'&[data-state="unchecked"]': [{
|
|
2938
|
+
'&[data-state="unchecked"]': [{ display: "none" }]
|
|
3679
2939
|
}
|
|
3680
2940
|
],
|
|
3681
2941
|
radioGroupIndicatorIcon: [
|
|
@@ -3684,12 +2944,12 @@ function createRadioGroupStyles() {
|
|
|
3684
2944
|
"w:2",
|
|
3685
2945
|
"bg:primary-foreground",
|
|
3686
2946
|
{
|
|
3687
|
-
"&":
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
2947
|
+
"&": {
|
|
2948
|
+
position: "absolute",
|
|
2949
|
+
top: "50%",
|
|
2950
|
+
left: "50%",
|
|
2951
|
+
transform: "translate(-50%, -50%)"
|
|
2952
|
+
}
|
|
3693
2953
|
}
|
|
3694
2954
|
]
|
|
3695
2955
|
});
|
|
@@ -3707,10 +2967,9 @@ var focusRing10 = {
|
|
|
3707
2967
|
"&:focus-visible": [
|
|
3708
2968
|
"outline-none",
|
|
3709
2969
|
{
|
|
3710
|
-
|
|
3711
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
2970
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3712
2971
|
},
|
|
3713
|
-
{
|
|
2972
|
+
{ "outline-offset": "2px" }
|
|
3714
2973
|
]
|
|
3715
2974
|
};
|
|
3716
2975
|
function createResizablePanelStyles() {
|
|
@@ -3728,22 +2987,16 @@ function createResizablePanelStyles() {
|
|
|
3728
2987
|
"&:hover": ["bg:muted-foreground"]
|
|
3729
2988
|
},
|
|
3730
2989
|
{
|
|
3731
|
-
'&[data-orientation="horizontal"]':
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
value: "col-resize"
|
|
3736
|
-
}
|
|
3737
|
-
]
|
|
2990
|
+
'&[data-orientation="horizontal"]': {
|
|
2991
|
+
width: "1px",
|
|
2992
|
+
cursor: "col-resize"
|
|
2993
|
+
}
|
|
3738
2994
|
},
|
|
3739
2995
|
{
|
|
3740
|
-
'&[data-orientation="vertical"]':
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
value: "row-resize"
|
|
3745
|
-
}
|
|
3746
|
-
]
|
|
2996
|
+
'&[data-orientation="vertical"]': {
|
|
2997
|
+
height: "1px",
|
|
2998
|
+
cursor: "row-resize"
|
|
2999
|
+
}
|
|
3747
3000
|
},
|
|
3748
3001
|
{
|
|
3749
3002
|
'&[data-state="dragging"]': ["bg:primary"]
|
|
@@ -3762,21 +3015,17 @@ import { css as css28 } from "@vertz/ui";
|
|
|
3762
3015
|
function createScrollAreaStyles() {
|
|
3763
3016
|
const s = css28({
|
|
3764
3017
|
scrollAreaRoot: ["relative", "overflow-hidden"],
|
|
3765
|
-
scrollAreaViewport: [
|
|
3766
|
-
"h:full",
|
|
3767
|
-
"w:full",
|
|
3768
|
-
{ "&": [{ property: "border-radius", value: "inherit" }] }
|
|
3769
|
-
],
|
|
3018
|
+
scrollAreaViewport: ["h:full", "w:full", { "&": { "border-radius": "inherit" } }],
|
|
3770
3019
|
scrollAreaScrollbar: [
|
|
3771
3020
|
"flex",
|
|
3772
3021
|
{
|
|
3773
|
-
"&":
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3022
|
+
"&": {
|
|
3023
|
+
"touch-action": "none",
|
|
3024
|
+
"user-select": "none",
|
|
3025
|
+
padding: "1px"
|
|
3026
|
+
}
|
|
3777
3027
|
},
|
|
3778
3028
|
"transition:colors",
|
|
3779
|
-
{ "&": [{ property: "padding", value: "1px" }] },
|
|
3780
3029
|
{
|
|
3781
3030
|
'&[data-orientation="vertical"]': ["h:full", "w:2.5", "border-l:1", "border:transparent"]
|
|
3782
3031
|
},
|
|
@@ -3805,10 +3054,9 @@ var focusRing11 = {
|
|
|
3805
3054
|
"&:focus-visible": [
|
|
3806
3055
|
"outline-none",
|
|
3807
3056
|
{
|
|
3808
|
-
|
|
3809
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3057
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3810
3058
|
},
|
|
3811
|
-
{
|
|
3059
|
+
{ "outline-offset": "2px" }
|
|
3812
3060
|
]
|
|
3813
3061
|
};
|
|
3814
3062
|
function createSelectStyles() {
|
|
@@ -3827,18 +3075,26 @@ function createSelectStyles() {
|
|
|
3827
3075
|
"text:sm",
|
|
3828
3076
|
"cursor:pointer",
|
|
3829
3077
|
{
|
|
3830
|
-
"&":
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3078
|
+
"&": {
|
|
3079
|
+
height: "2rem",
|
|
3080
|
+
"padding-top": "0.5rem",
|
|
3081
|
+
"padding-bottom": "0.5rem",
|
|
3082
|
+
"padding-right": "0.5rem",
|
|
3083
|
+
"padding-left": "0.625rem"
|
|
3084
|
+
}
|
|
3837
3085
|
},
|
|
3838
3086
|
focusRing11,
|
|
3839
3087
|
{ "&:disabled": ["pointer-events-none", "opacity:0.5"] },
|
|
3840
3088
|
{ '&[data-state="open"]': ["border:ring"] },
|
|
3841
|
-
{ [DARK]: [bgOpacity("input", 30)] }
|
|
3089
|
+
{ [DARK]: [bgOpacity("input", 30)] },
|
|
3090
|
+
{
|
|
3091
|
+
'& [data-part="chevron"]': {
|
|
3092
|
+
opacity: "0.5",
|
|
3093
|
+
"flex-shrink": "0",
|
|
3094
|
+
display: "flex",
|
|
3095
|
+
"align-items": "center"
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3842
3098
|
],
|
|
3843
3099
|
selectContent: [
|
|
3844
3100
|
"z:50",
|
|
@@ -3848,13 +3104,10 @@ function createSelectStyles() {
|
|
|
3848
3104
|
"rounded:lg",
|
|
3849
3105
|
"p:1",
|
|
3850
3106
|
{
|
|
3851
|
-
"&":
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
},
|
|
3856
|
-
{ property: "min-width", value: "9rem" }
|
|
3857
|
-
]
|
|
3107
|
+
"&": {
|
|
3108
|
+
"box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
3109
|
+
"min-width": "9rem"
|
|
3110
|
+
}
|
|
3858
3111
|
},
|
|
3859
3112
|
{
|
|
3860
3113
|
'&[data-state="open"][data-side="bottom"]': [
|
|
@@ -3886,10 +3139,10 @@ function createSelectStyles() {
|
|
|
3886
3139
|
"outline-none",
|
|
3887
3140
|
"relative",
|
|
3888
3141
|
{
|
|
3889
|
-
"&":
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3142
|
+
"&": {
|
|
3143
|
+
"padding-right": "2rem",
|
|
3144
|
+
"padding-left": "0.5rem"
|
|
3145
|
+
}
|
|
3893
3146
|
},
|
|
3894
3147
|
{ '&:hover:not([aria-selected="true"])': ["bg:accent", "text:accent-foreground"] },
|
|
3895
3148
|
{ '&:focus:not([aria-selected="true"])': ["bg:accent", "text:accent-foreground"] },
|
|
@@ -3901,15 +3154,15 @@ function createSelectStyles() {
|
|
|
3901
3154
|
"items:center",
|
|
3902
3155
|
"justify:center",
|
|
3903
3156
|
{
|
|
3904
|
-
"&":
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3157
|
+
"&": {
|
|
3158
|
+
right: "0.5rem",
|
|
3159
|
+
width: "0.875rem",
|
|
3160
|
+
height: "0.875rem",
|
|
3161
|
+
display: "none"
|
|
3162
|
+
}
|
|
3910
3163
|
},
|
|
3911
3164
|
{
|
|
3912
|
-
'[aria-selected="true"] > &':
|
|
3165
|
+
'[aria-selected="true"] > &': { display: "flex" }
|
|
3913
3166
|
}
|
|
3914
3167
|
],
|
|
3915
3168
|
selectGroup: ["p:1"],
|
|
@@ -3918,11 +3171,11 @@ function createSelectStyles() {
|
|
|
3918
3171
|
"my:1",
|
|
3919
3172
|
"bg:border",
|
|
3920
3173
|
{
|
|
3921
|
-
"&":
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3174
|
+
"&": {
|
|
3175
|
+
"margin-left": "-0.25rem",
|
|
3176
|
+
"margin-right": "-0.25rem",
|
|
3177
|
+
height: "1px"
|
|
3178
|
+
}
|
|
3926
3179
|
}
|
|
3927
3180
|
],
|
|
3928
3181
|
selectScrollButton: ["flex", "items:center", "justify:center", "py:1", "cursor:default"]
|
|
@@ -3944,13 +3197,13 @@ import { css as css30 } from "@vertz/ui";
|
|
|
3944
3197
|
function createSeparator() {
|
|
3945
3198
|
const s = css30({
|
|
3946
3199
|
separatorBase: ["bg:border", "shrink-0"],
|
|
3947
|
-
separatorHorizontal: ["w:full", { "&":
|
|
3200
|
+
separatorHorizontal: ["w:full", { "&": { height: "1px" } }],
|
|
3948
3201
|
separatorVertical: [
|
|
3949
3202
|
{
|
|
3950
|
-
"&":
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3203
|
+
"&": {
|
|
3204
|
+
height: "100%",
|
|
3205
|
+
width: "1px"
|
|
3206
|
+
}
|
|
3954
3207
|
}
|
|
3955
3208
|
]
|
|
3956
3209
|
});
|
|
@@ -3967,10 +3220,9 @@ var focusRing12 = {
|
|
|
3967
3220
|
"&:focus-visible": [
|
|
3968
3221
|
"outline-none",
|
|
3969
3222
|
{
|
|
3970
|
-
|
|
3971
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3223
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3972
3224
|
},
|
|
3973
|
-
{
|
|
3225
|
+
{ "outline-offset": "2px" }
|
|
3974
3226
|
]
|
|
3975
3227
|
};
|
|
3976
3228
|
var PANEL_BASE2 = [
|
|
@@ -3991,28 +3243,48 @@ function createSheetStyles() {
|
|
|
3991
3243
|
"inset:0",
|
|
3992
3244
|
"z:50",
|
|
3993
3245
|
{
|
|
3994
|
-
"&":
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3246
|
+
"&": {
|
|
3247
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
3248
|
+
"backdrop-filter": "blur(4px)",
|
|
3249
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
3250
|
+
}
|
|
3999
3251
|
},
|
|
4000
3252
|
{
|
|
4001
3253
|
'&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
|
|
4002
3254
|
},
|
|
4003
3255
|
{
|
|
4004
|
-
'&[data-state="closed"]': [
|
|
3256
|
+
'&[data-state="closed"]': [
|
|
3257
|
+
animationDecl("vz-fade-out 100ms ease-out forwards"),
|
|
3258
|
+
{ "pointer-events": "none" }
|
|
3259
|
+
]
|
|
4005
3260
|
}
|
|
4006
3261
|
],
|
|
4007
3262
|
sheetPanelLeft: [
|
|
4008
3263
|
...PANEL_BASE2,
|
|
4009
3264
|
"border-r:1",
|
|
4010
3265
|
{
|
|
4011
|
-
"&":
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
3266
|
+
"&": {
|
|
3267
|
+
inset: "0 auto 0 0",
|
|
3268
|
+
width: "75%",
|
|
3269
|
+
"max-width": "24rem",
|
|
3270
|
+
height: "100dvh",
|
|
3271
|
+
"max-height": "none",
|
|
3272
|
+
margin: "0",
|
|
3273
|
+
outline: "none",
|
|
3274
|
+
border: "none"
|
|
3275
|
+
},
|
|
3276
|
+
"&:not([open])": { display: "none" },
|
|
3277
|
+
"&::backdrop": {
|
|
3278
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
3279
|
+
"backdrop-filter": "blur(4px)",
|
|
3280
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
3281
|
+
},
|
|
3282
|
+
'&[data-state="open"]::backdrop': {
|
|
3283
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
3284
|
+
},
|
|
3285
|
+
'&[data-state="closed"]::backdrop': {
|
|
3286
|
+
animation: "vz-fade-out 300ms ease-out forwards"
|
|
3287
|
+
}
|
|
4016
3288
|
},
|
|
4017
3289
|
{
|
|
4018
3290
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-left 300ms ease-out forwards")]
|
|
@@ -4025,11 +3297,28 @@ function createSheetStyles() {
|
|
|
4025
3297
|
...PANEL_BASE2,
|
|
4026
3298
|
"border-l:1",
|
|
4027
3299
|
{
|
|
4028
|
-
"&":
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
3300
|
+
"&": {
|
|
3301
|
+
inset: "0 0 0 auto",
|
|
3302
|
+
width: "75%",
|
|
3303
|
+
"max-width": "24rem",
|
|
3304
|
+
height: "100dvh",
|
|
3305
|
+
"max-height": "none",
|
|
3306
|
+
margin: "0",
|
|
3307
|
+
outline: "none",
|
|
3308
|
+
border: "none"
|
|
3309
|
+
},
|
|
3310
|
+
"&:not([open])": { display: "none" },
|
|
3311
|
+
"&::backdrop": {
|
|
3312
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
3313
|
+
"backdrop-filter": "blur(4px)",
|
|
3314
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
3315
|
+
},
|
|
3316
|
+
'&[data-state="open"]::backdrop': {
|
|
3317
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
3318
|
+
},
|
|
3319
|
+
'&[data-state="closed"]::backdrop': {
|
|
3320
|
+
animation: "vz-fade-out 300ms ease-out forwards"
|
|
3321
|
+
}
|
|
4033
3322
|
},
|
|
4034
3323
|
{
|
|
4035
3324
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-right 300ms ease-out forwards")]
|
|
@@ -4042,7 +3331,26 @@ function createSheetStyles() {
|
|
|
4042
3331
|
...PANEL_BASE2,
|
|
4043
3332
|
"border-b:1",
|
|
4044
3333
|
{
|
|
4045
|
-
"&":
|
|
3334
|
+
"&": {
|
|
3335
|
+
inset: "0 0 auto 0",
|
|
3336
|
+
width: "100dvw",
|
|
3337
|
+
"max-width": "none",
|
|
3338
|
+
margin: "0",
|
|
3339
|
+
outline: "none",
|
|
3340
|
+
border: "none"
|
|
3341
|
+
},
|
|
3342
|
+
"&:not([open])": { display: "none" },
|
|
3343
|
+
"&::backdrop": {
|
|
3344
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
3345
|
+
"backdrop-filter": "blur(4px)",
|
|
3346
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
3347
|
+
},
|
|
3348
|
+
'&[data-state="open"]::backdrop': {
|
|
3349
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
3350
|
+
},
|
|
3351
|
+
'&[data-state="closed"]::backdrop': {
|
|
3352
|
+
animation: "vz-fade-out 300ms ease-out forwards"
|
|
3353
|
+
}
|
|
4046
3354
|
},
|
|
4047
3355
|
{
|
|
4048
3356
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-top 300ms ease-out forwards")]
|
|
@@ -4055,7 +3363,26 @@ function createSheetStyles() {
|
|
|
4055
3363
|
...PANEL_BASE2,
|
|
4056
3364
|
"border-t:1",
|
|
4057
3365
|
{
|
|
4058
|
-
"&":
|
|
3366
|
+
"&": {
|
|
3367
|
+
inset: "auto 0 0 0",
|
|
3368
|
+
width: "100dvw",
|
|
3369
|
+
"max-width": "none",
|
|
3370
|
+
margin: "0",
|
|
3371
|
+
outline: "none",
|
|
3372
|
+
border: "none"
|
|
3373
|
+
},
|
|
3374
|
+
"&:not([open])": { display: "none" },
|
|
3375
|
+
"&::backdrop": {
|
|
3376
|
+
"background-color": "oklch(0 0 0 / 10%)",
|
|
3377
|
+
"backdrop-filter": "blur(4px)",
|
|
3378
|
+
"-webkit-backdrop-filter": "blur(4px)"
|
|
3379
|
+
},
|
|
3380
|
+
'&[data-state="open"]::backdrop': {
|
|
3381
|
+
animation: "vz-fade-in 100ms ease-out forwards"
|
|
3382
|
+
},
|
|
3383
|
+
'&[data-state="closed"]::backdrop': {
|
|
3384
|
+
animation: "vz-fade-out 300ms ease-out forwards"
|
|
3385
|
+
}
|
|
4059
3386
|
},
|
|
4060
3387
|
{
|
|
4061
3388
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 300ms ease-out forwards")]
|
|
@@ -4071,21 +3398,21 @@ function createSheetStyles() {
|
|
|
4071
3398
|
"rounded:xs",
|
|
4072
3399
|
"cursor:pointer",
|
|
4073
3400
|
{
|
|
4074
|
-
"&":
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
3401
|
+
"&": {
|
|
3402
|
+
top: "0.75rem",
|
|
3403
|
+
right: "0.75rem",
|
|
3404
|
+
opacity: "0.7",
|
|
3405
|
+
transition: "opacity 150ms",
|
|
3406
|
+
display: "inline-flex",
|
|
3407
|
+
"align-items": "center",
|
|
3408
|
+
"justify-content": "center",
|
|
3409
|
+
width: "1rem",
|
|
3410
|
+
height: "1rem",
|
|
3411
|
+
background: "none",
|
|
3412
|
+
border: "none",
|
|
3413
|
+
color: "currentColor",
|
|
3414
|
+
padding: "0"
|
|
3415
|
+
}
|
|
4089
3416
|
},
|
|
4090
3417
|
{ "&:hover": ["opacity:1"] },
|
|
4091
3418
|
focusRing12
|
|
@@ -4111,18 +3438,13 @@ var pulse = keyframes2("vz-skeleton-pulse", {
|
|
|
4111
3438
|
});
|
|
4112
3439
|
function createSkeletonStyles() {
|
|
4113
3440
|
return css32({
|
|
4114
|
-
base: [
|
|
4115
|
-
"bg:muted",
|
|
4116
|
-
"rounded:md",
|
|
4117
|
-
{ "&": [{ property: "animation", value: `${pulse} 2s ease-in-out infinite` }] }
|
|
4118
|
-
]
|
|
3441
|
+
base: ["bg:muted", "rounded:md", { "&": { animation: `${pulse} 2s ease-in-out infinite` } }]
|
|
4119
3442
|
});
|
|
4120
3443
|
}
|
|
4121
3444
|
// src/styles/slider.ts
|
|
4122
3445
|
import { css as css33 } from "@vertz/ui";
|
|
4123
3446
|
var ringStyle = {
|
|
4124
|
-
|
|
4125
|
-
value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3447
|
+
"box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4126
3448
|
};
|
|
4127
3449
|
function createSliderStyles() {
|
|
4128
3450
|
const s = css33({
|
|
@@ -4132,12 +3454,12 @@ function createSliderStyles() {
|
|
|
4132
3454
|
"w:full",
|
|
4133
3455
|
"items:center",
|
|
4134
3456
|
{
|
|
4135
|
-
"&":
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
3457
|
+
"&": {
|
|
3458
|
+
"touch-action": "none",
|
|
3459
|
+
"user-select": "none",
|
|
3460
|
+
height: "20px",
|
|
3461
|
+
cursor: "pointer"
|
|
3462
|
+
}
|
|
4141
3463
|
}
|
|
4142
3464
|
],
|
|
4143
3465
|
sliderTrack: [
|
|
@@ -4146,10 +3468,10 @@ function createSliderStyles() {
|
|
|
4146
3468
|
"rounded:full",
|
|
4147
3469
|
"bg:muted",
|
|
4148
3470
|
{
|
|
4149
|
-
"&":
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
3471
|
+
"&": {
|
|
3472
|
+
height: "0.25rem",
|
|
3473
|
+
overflow: "visible"
|
|
3474
|
+
}
|
|
4153
3475
|
}
|
|
4154
3476
|
],
|
|
4155
3477
|
sliderRange: ["bg:primary"],
|
|
@@ -4162,18 +3484,18 @@ function createSliderStyles() {
|
|
|
4162
3484
|
"border:ring",
|
|
4163
3485
|
"cursor:pointer",
|
|
4164
3486
|
{
|
|
4165
|
-
"&":
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
3487
|
+
"&": {
|
|
3488
|
+
background: "white",
|
|
3489
|
+
transition: "color 150ms, box-shadow 150ms",
|
|
3490
|
+
top: "50%"
|
|
3491
|
+
}
|
|
4170
3492
|
},
|
|
4171
3493
|
{
|
|
4172
|
-
"&::after":
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
3494
|
+
"&::after": {
|
|
3495
|
+
content: '""',
|
|
3496
|
+
position: "absolute",
|
|
3497
|
+
inset: "-0.5rem"
|
|
3498
|
+
}
|
|
4177
3499
|
},
|
|
4178
3500
|
{
|
|
4179
3501
|
"&:hover": ["outline-none", ringStyle]
|
|
@@ -4202,8 +3524,7 @@ var focusRing13 = {
|
|
|
4202
3524
|
"outline-none",
|
|
4203
3525
|
"border:ring",
|
|
4204
3526
|
{
|
|
4205
|
-
|
|
4206
|
-
value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3527
|
+
"box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4207
3528
|
}
|
|
4208
3529
|
]
|
|
4209
3530
|
};
|
|
@@ -4236,37 +3557,24 @@ function createSwitchStyles() {
|
|
|
4236
3557
|
"rounded:full",
|
|
4237
3558
|
"bg:background",
|
|
4238
3559
|
{
|
|
4239
|
-
"&":
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
value: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
4243
|
-
}
|
|
4244
|
-
]
|
|
3560
|
+
"&": {
|
|
3561
|
+
transition: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3562
|
+
}
|
|
4245
3563
|
},
|
|
4246
3564
|
{
|
|
4247
|
-
'&[data-state="unchecked"]': [{
|
|
4248
|
-
'&[data-state="checked"]': [
|
|
4249
|
-
{ property: "transform", value: "translateX(calc(100% - 2px))" }
|
|
4250
|
-
]
|
|
3565
|
+
'&[data-state="unchecked"]': [{ transform: "translateX(0)" }],
|
|
3566
|
+
'&[data-state="checked"]': [{ transform: "translateX(calc(100% - 2px))" }]
|
|
4251
3567
|
},
|
|
4252
3568
|
{
|
|
4253
|
-
'button:active > &[data-state="unchecked"]': [
|
|
4254
|
-
|
|
4255
|
-
{ property: "transform", value: "translateX(0)" }
|
|
4256
|
-
],
|
|
4257
|
-
'button:active > &[data-state="checked"]': [
|
|
4258
|
-
"w:5",
|
|
4259
|
-
{ property: "transform", value: "translateX(0.625rem)" }
|
|
4260
|
-
]
|
|
3569
|
+
'button:active > &[data-state="unchecked"]': ["w:5", { transform: "translateX(0)" }],
|
|
3570
|
+
'button:active > &[data-state="checked"]': ["w:5", { transform: "translateX(0.625rem)" }]
|
|
4261
3571
|
},
|
|
4262
3572
|
{
|
|
4263
|
-
[`${DARK}[data-state="unchecked"]`]: [
|
|
4264
|
-
{ property: "background-color", value: "var(--color-foreground)" }
|
|
4265
|
-
]
|
|
3573
|
+
[`${DARK}[data-state="unchecked"]`]: [{ "background-color": "var(--color-foreground)" }]
|
|
4266
3574
|
},
|
|
4267
3575
|
{
|
|
4268
3576
|
[`${DARK}[data-state="checked"]`]: [
|
|
4269
|
-
{
|
|
3577
|
+
{ "background-color": "var(--color-primary-foreground)" }
|
|
4270
3578
|
]
|
|
4271
3579
|
}
|
|
4272
3580
|
],
|
|
@@ -4297,37 +3605,24 @@ function createSwitchStyles() {
|
|
|
4297
3605
|
"rounded:full",
|
|
4298
3606
|
"bg:background",
|
|
4299
3607
|
{
|
|
4300
|
-
"&":
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
value: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
4304
|
-
}
|
|
4305
|
-
]
|
|
3608
|
+
"&": {
|
|
3609
|
+
transition: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3610
|
+
}
|
|
4306
3611
|
},
|
|
4307
3612
|
{
|
|
4308
|
-
'&[data-state="unchecked"]': [{
|
|
4309
|
-
'&[data-state="checked"]': [
|
|
4310
|
-
{ property: "transform", value: "translateX(calc(100% - 2px))" }
|
|
4311
|
-
]
|
|
3613
|
+
'&[data-state="unchecked"]': [{ transform: "translateX(0)" }],
|
|
3614
|
+
'&[data-state="checked"]': [{ transform: "translateX(calc(100% - 2px))" }]
|
|
4312
3615
|
},
|
|
4313
3616
|
{
|
|
4314
|
-
'button:active > &[data-state="unchecked"]': [
|
|
4315
|
-
|
|
4316
|
-
{ property: "transform", value: "translateX(0)" }
|
|
4317
|
-
],
|
|
4318
|
-
'button:active > &[data-state="checked"]': [
|
|
4319
|
-
"w:3.5",
|
|
4320
|
-
{ property: "transform", value: "translateX(0.5rem)" }
|
|
4321
|
-
]
|
|
3617
|
+
'button:active > &[data-state="unchecked"]': ["w:3.5", { transform: "translateX(0)" }],
|
|
3618
|
+
'button:active > &[data-state="checked"]': ["w:3.5", { transform: "translateX(0.5rem)" }]
|
|
4322
3619
|
},
|
|
4323
3620
|
{
|
|
4324
|
-
[`${DARK}[data-state="unchecked"]`]: [
|
|
4325
|
-
{ property: "background-color", value: "var(--color-foreground)" }
|
|
4326
|
-
]
|
|
3621
|
+
[`${DARK}[data-state="unchecked"]`]: [{ "background-color": "var(--color-foreground)" }]
|
|
4327
3622
|
},
|
|
4328
3623
|
{
|
|
4329
3624
|
[`${DARK}[data-state="checked"]`]: [
|
|
4330
|
-
{
|
|
3625
|
+
{ "background-color": "var(--color-primary-foreground)" }
|
|
4331
3626
|
]
|
|
4332
3627
|
}
|
|
4333
3628
|
]
|
|
@@ -4348,14 +3643,14 @@ function createTableStyles() {
|
|
|
4348
3643
|
"w:full",
|
|
4349
3644
|
"text:sm",
|
|
4350
3645
|
{
|
|
4351
|
-
"&":
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
3646
|
+
"&": {
|
|
3647
|
+
"caption-side": "bottom",
|
|
3648
|
+
"border-collapse": "collapse"
|
|
3649
|
+
}
|
|
4355
3650
|
}
|
|
4356
3651
|
],
|
|
4357
3652
|
tableHeader: [{ "& tr": ["border-b:1", "border:border"] }],
|
|
4358
|
-
tableBody: [{ "& tr:last-child":
|
|
3653
|
+
tableBody: [{ "& tr:last-child": { "border-bottom": "0" } }],
|
|
4359
3654
|
tableRow: [
|
|
4360
3655
|
"border-b:1",
|
|
4361
3656
|
"border:border",
|
|
@@ -4370,24 +3665,20 @@ function createTableStyles() {
|
|
|
4370
3665
|
"text:foreground",
|
|
4371
3666
|
"whitespace-nowrap",
|
|
4372
3667
|
{
|
|
4373
|
-
"&":
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
3668
|
+
"&": {
|
|
3669
|
+
"vertical-align": "middle",
|
|
3670
|
+
height: "2.5rem"
|
|
3671
|
+
}
|
|
4377
3672
|
}
|
|
4378
3673
|
],
|
|
4379
|
-
tableCell: [
|
|
4380
|
-
"p:2",
|
|
4381
|
-
"whitespace-nowrap",
|
|
4382
|
-
{ "&": [{ property: "vertical-align", value: "middle" }] }
|
|
4383
|
-
],
|
|
3674
|
+
tableCell: ["p:2", "whitespace-nowrap", { "&": { "vertical-align": "middle" } }],
|
|
4384
3675
|
tableCaption: ["mt:4", "text:sm", "text:muted-foreground"],
|
|
4385
3676
|
tableFooter: [
|
|
4386
3677
|
"border-t:1",
|
|
4387
3678
|
"border:border",
|
|
4388
3679
|
"font:medium",
|
|
4389
3680
|
{ "&": [bgOpacity("muted", 50)] },
|
|
4390
|
-
{ "&>tr:last-child":
|
|
3681
|
+
{ "&>tr:last-child": { "border-bottom": "0" } }
|
|
4391
3682
|
]
|
|
4392
3683
|
});
|
|
4393
3684
|
return {
|
|
@@ -4414,10 +3705,10 @@ function createTabsStyles() {
|
|
|
4414
3705
|
"bg:muted",
|
|
4415
3706
|
"text:muted-foreground",
|
|
4416
3707
|
{
|
|
4417
|
-
"&":
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
3708
|
+
"&": {
|
|
3709
|
+
padding: "3px",
|
|
3710
|
+
height: "2rem"
|
|
3711
|
+
}
|
|
4421
3712
|
}
|
|
4422
3713
|
],
|
|
4423
3714
|
tabsTrigger: [
|
|
@@ -4431,11 +3722,11 @@ function createTabsStyles() {
|
|
|
4431
3722
|
"cursor:pointer",
|
|
4432
3723
|
"transition:colors",
|
|
4433
3724
|
{
|
|
4434
|
-
"&":
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
3725
|
+
"&": {
|
|
3726
|
+
background: "transparent",
|
|
3727
|
+
padding: "0.125rem 0.375rem",
|
|
3728
|
+
border: "1px solid transparent"
|
|
3729
|
+
}
|
|
4439
3730
|
},
|
|
4440
3731
|
{ '&[data-state="inactive"]': [textOpacity("foreground", 60)] },
|
|
4441
3732
|
{
|
|
@@ -4463,11 +3754,11 @@ function createTabsStyles() {
|
|
|
4463
3754
|
"cursor:pointer",
|
|
4464
3755
|
"border:0",
|
|
4465
3756
|
{
|
|
4466
|
-
"&":
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
3757
|
+
"&": {
|
|
3758
|
+
background: "transparent",
|
|
3759
|
+
"margin-bottom": "-1px",
|
|
3760
|
+
transition: "color 150ms, box-shadow 150ms"
|
|
3761
|
+
}
|
|
4471
3762
|
},
|
|
4472
3763
|
{ '&[data-state="inactive"]': [textOpacity("foreground", 60)] },
|
|
4473
3764
|
{ '&[data-state="inactive"]:hover': [textOpacity("foreground", 80)] },
|
|
@@ -4475,8 +3766,7 @@ function createTabsStyles() {
|
|
|
4475
3766
|
'&[data-state="active"]': [
|
|
4476
3767
|
"text:foreground",
|
|
4477
3768
|
{
|
|
4478
|
-
|
|
4479
|
-
value: "inset 0 -2px 0 0 currentColor"
|
|
3769
|
+
"box-shadow": "inset 0 -2px 0 0 currentColor"
|
|
4480
3770
|
}
|
|
4481
3771
|
]
|
|
4482
3772
|
},
|
|
@@ -4500,10 +3790,9 @@ function createTextarea() {
|
|
|
4500
3790
|
"outline-none",
|
|
4501
3791
|
"border:ring",
|
|
4502
3792
|
{
|
|
4503
|
-
|
|
4504
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3793
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4505
3794
|
},
|
|
4506
|
-
{
|
|
3795
|
+
{ "outline-offset": "2px" }
|
|
4507
3796
|
]
|
|
4508
3797
|
};
|
|
4509
3798
|
const s = css37({
|
|
@@ -4516,20 +3805,16 @@ function createTextarea() {
|
|
|
4516
3805
|
"bg:transparent",
|
|
4517
3806
|
"py:2",
|
|
4518
3807
|
{
|
|
4519
|
-
"&":
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
3808
|
+
"&": {
|
|
3809
|
+
"padding-left": "0.625rem",
|
|
3810
|
+
"padding-right": "0.625rem",
|
|
3811
|
+
"min-height": "60px",
|
|
3812
|
+
"field-sizing": "content"
|
|
3813
|
+
}
|
|
4523
3814
|
},
|
|
4524
3815
|
"text:sm",
|
|
4525
3816
|
"text:foreground",
|
|
4526
3817
|
"transition:colors",
|
|
4527
|
-
{
|
|
4528
|
-
"&": [
|
|
4529
|
-
{ property: "min-height", value: "60px" },
|
|
4530
|
-
{ property: "field-sizing", value: "content" }
|
|
4531
|
-
]
|
|
4532
|
-
},
|
|
4533
3818
|
focusRing14,
|
|
4534
3819
|
{ "&:disabled": ["pointer-events-none", "opacity:0.5"] },
|
|
4535
3820
|
{ [DARK]: [bgOpacity("input", 30)] }
|
|
@@ -4546,10 +3831,9 @@ var focusRing14 = {
|
|
|
4546
3831
|
"&:focus-visible": [
|
|
4547
3832
|
"outline-none",
|
|
4548
3833
|
{
|
|
4549
|
-
|
|
4550
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3834
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4551
3835
|
},
|
|
4552
|
-
{
|
|
3836
|
+
{ "outline-offset": "2px" }
|
|
4553
3837
|
]
|
|
4554
3838
|
};
|
|
4555
3839
|
function createToastStyles() {
|
|
@@ -4562,14 +3846,14 @@ function createToastStyles() {
|
|
|
4562
3846
|
"gap:2",
|
|
4563
3847
|
"p:4",
|
|
4564
3848
|
{
|
|
4565
|
-
"&":
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
3849
|
+
"&": {
|
|
3850
|
+
bottom: "0",
|
|
3851
|
+
right: "0",
|
|
3852
|
+
"max-height": "100vh",
|
|
3853
|
+
width: "420px",
|
|
3854
|
+
"max-width": "100vw",
|
|
3855
|
+
"pointer-events": "none"
|
|
3856
|
+
}
|
|
4573
3857
|
}
|
|
4574
3858
|
],
|
|
4575
3859
|
toastRoot: [
|
|
@@ -4585,7 +3869,7 @@ function createToastStyles() {
|
|
|
4585
3869
|
"p:4",
|
|
4586
3870
|
"shadow:lg",
|
|
4587
3871
|
{
|
|
4588
|
-
"&":
|
|
3872
|
+
"&": { "pointer-events": "auto" }
|
|
4589
3873
|
},
|
|
4590
3874
|
{
|
|
4591
3875
|
'&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 200ms ease-out forwards")]
|
|
@@ -4608,7 +3892,7 @@ function createToastStyles() {
|
|
|
4608
3892
|
"font:medium",
|
|
4609
3893
|
"transition:colors",
|
|
4610
3894
|
"shrink-0",
|
|
4611
|
-
{ "&":
|
|
3895
|
+
{ "&": { height: "2rem" } },
|
|
4612
3896
|
{ "&:hover": ["bg:secondary"] },
|
|
4613
3897
|
focusRing14
|
|
4614
3898
|
],
|
|
@@ -4638,10 +3922,9 @@ var focusRing15 = {
|
|
|
4638
3922
|
"&:focus-visible": [
|
|
4639
3923
|
"outline-none",
|
|
4640
3924
|
{
|
|
4641
|
-
|
|
4642
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3925
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4643
3926
|
},
|
|
4644
|
-
{
|
|
3927
|
+
{ "outline-offset": "2px" }
|
|
4645
3928
|
]
|
|
4646
3929
|
};
|
|
4647
3930
|
function createToggleStyles() {
|
|
@@ -4677,10 +3960,9 @@ var focusRing16 = {
|
|
|
4677
3960
|
"&:focus-visible": [
|
|
4678
3961
|
"outline-none",
|
|
4679
3962
|
{
|
|
4680
|
-
|
|
4681
|
-
value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
3963
|
+
outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
|
|
4682
3964
|
},
|
|
4683
|
-
{
|
|
3965
|
+
{ "outline-offset": "2px" }
|
|
4684
3966
|
]
|
|
4685
3967
|
};
|
|
4686
3968
|
function createToggleGroupStyles() {
|
|
@@ -4725,7 +4007,7 @@ function createTooltipStyles() {
|
|
|
4725
4007
|
"py:1.5",
|
|
4726
4008
|
"text:xs",
|
|
4727
4009
|
{
|
|
4728
|
-
"&":
|
|
4010
|
+
"&": { "white-space": "nowrap" }
|
|
4729
4011
|
},
|
|
4730
4012
|
{
|
|
4731
4013
|
'&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
|
|
@@ -4852,30 +4134,30 @@ function configureTheme(config) {
|
|
|
4852
4134
|
DropdownMenu: createThemedDropdownMenu(dropdownMenuStyles),
|
|
4853
4135
|
Select: createThemedSelect(selectStyles),
|
|
4854
4136
|
Tabs: createThemedTabs(tabsStyles),
|
|
4855
|
-
|
|
4856
|
-
|
|
4137
|
+
Checkbox: createThemedCheckbox(checkboxStyles),
|
|
4138
|
+
Switch: createThemedSwitch(switchStyles),
|
|
4857
4139
|
Popover: createThemedPopover(popoverStyles),
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4140
|
+
Progress: createThemedProgress(progressStyles),
|
|
4141
|
+
RadioGroup: createThemedRadioGroup(radioGroupStyles),
|
|
4142
|
+
Slider: createThemedSlider(sliderStyles),
|
|
4861
4143
|
Accordion: createThemedAccordion(accordionStyles),
|
|
4862
|
-
|
|
4144
|
+
Toast: createThemedToast(toastStyles),
|
|
4863
4145
|
Tooltip: createThemedTooltip(tooltipStyles),
|
|
4864
4146
|
Sheet: createThemedSheet(sheetStyles),
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4147
|
+
Calendar: createThemedCalendar(calendarStyles),
|
|
4148
|
+
Carousel: createThemedCarousel(carouselStyles),
|
|
4149
|
+
Collapsible: createThemedCollapsible(collapsibleStyles),
|
|
4150
|
+
Command: createThemedCommand(commandStyles),
|
|
4151
|
+
ContextMenu: createThemedContextMenu(contextMenuStyles),
|
|
4152
|
+
DatePicker: createThemedDatePicker(datePickerStyles, calendarStyles),
|
|
4153
|
+
Drawer: createThemedDrawer(drawerStyles),
|
|
4154
|
+
HoverCard: createThemedHoverCard(hoverCardStyles),
|
|
4155
|
+
Menubar: createThemedMenubar(menubarStyles),
|
|
4156
|
+
NavigationMenu: createThemedNavigationMenu(navigationMenuStyles),
|
|
4157
|
+
ResizablePanel: createThemedResizablePanel(resizablePanelStyles),
|
|
4158
|
+
ScrollArea: createThemedScrollArea(scrollAreaStyles),
|
|
4159
|
+
Toggle: createThemedToggle(toggleStyles),
|
|
4160
|
+
ToggleGroup: createThemedToggleGroup(toggleGroupStyles)
|
|
4879
4161
|
}
|
|
4880
4162
|
};
|
|
4881
4163
|
return { theme, globals, styles, components };
|