@vertz/theme-shadcn 0.2.20 → 0.2.21

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/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  createBadge,
6
6
  createButton,
7
7
  textOpacity
8
- } from "./shared/chunk-qvb3evv2.js";
8
+ } from "./shared/chunk-gzfp8m46.js";
9
9
  import {
10
10
  configureThemeBase
11
11
  } from "./shared/chunk-d2nh1syq.js";
@@ -13,14 +13,15 @@ import {
13
13
  // src/components/alert.ts
14
14
  import { resolveChildren } from "@vertz/ui";
15
15
  function createAlertComponents(alertStyles) {
16
- function Alert({ variant, class: className, children }) {
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 (className) {
23
- classes.push(className);
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: className, children }) {
33
+ function AlertTitle({ className, class: classProp, children }) {
34
+ const effectiveClass = className ?? classProp;
33
35
  const el = document.createElement("h5");
34
- el.className = [alertStyles.title, className].filter(Boolean).join(" ");
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: className, children }) {
42
+ function AlertDescription({ className, class: classProp, children }) {
43
+ const effectiveClass = className ?? classProp;
41
44
  const el = document.createElement("div");
42
- el.className = [alertStyles.description, className].filter(Boolean).join(" ");
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: className, children }) {
57
+ function Avatar({ className, class: classProp, children }) {
58
+ const effectiveClass = className ?? classProp;
55
59
  const el = document.createElement("div");
56
- el.className = [avatarStyles.root, className].filter(Boolean).join(" ");
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({ src, alt, class: className }) {
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, className].filter(Boolean).join(" ");
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: className, children }) {
79
+ function AvatarFallback({ className, class: classProp, children }) {
80
+ const effectiveClass = className ?? classProp;
70
81
  const el = document.createElement("div");
71
- el.className = [avatarStyles.fallback, className].filter(Boolean).join(" ");
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({ color, class: className, children }) {
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 }), className].filter(Boolean).join(" ");
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: className } = props;
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 (className) {
111
- nav.className = [nav.className, className].filter(Boolean).join(" ");
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
- class: className,
180
+ className,
181
+ class: classProp,
162
182
  children,
163
183
  disabled,
164
184
  type,
165
- ...attrs
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 }), className].filter(Boolean).join(" ");
190
+ el.className = [buttonStyles({ intent, size }), effectiveClass].filter(Boolean).join(" ");
170
191
  if (disabled)
171
192
  el.disabled = true;
172
- for (const [key, value] of Object.entries(attrs)) {
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: className, children }) {
204
+ function Card({ className, class: classProp, children }) {
205
+ const effectiveClass = className ?? classProp;
193
206
  const el = document.createElement("div");
194
- el.className = [cardStyles.root, className].filter(Boolean).join(" ");
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: className, children }) {
213
+ function CardHeader({ className, class: classProp, children }) {
214
+ const effectiveClass = className ?? classProp;
201
215
  const el = document.createElement("div");
202
- el.className = [cardStyles.header, className].filter(Boolean).join(" ");
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: className, children }) {
222
+ function CardTitle({ className, class: classProp, children }) {
223
+ const effectiveClass = className ?? classProp;
209
224
  const el = document.createElement("h3");
210
- el.className = [cardStyles.title, className].filter(Boolean).join(" ");
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({ class: className, children }) {
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, className].filter(Boolean).join(" ");
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: className, children }) {
244
+ function CardContent({ className, class: classProp, children }) {
245
+ const effectiveClass = className ?? classProp;
225
246
  const el = document.createElement("div");
226
- el.className = [cardStyles.content, className].filter(Boolean).join(" ");
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: className, children }) {
253
+ function CardFooter({ className, class: classProp, children }) {
254
+ const effectiveClass = className ?? classProp;
233
255
  const el = document.createElement("div");
234
- el.className = [cardStyles.footer, className].filter(Boolean).join(" ");
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: className, children }) {
262
+ function CardAction({ className, class: classProp, children }) {
263
+ const effectiveClass = className ?? classProp;
241
264
  const el = document.createElement("div");
242
- el.className = [cardStyles.action, className].filter(Boolean).join(" ");
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: className, children }) {
285
+ function FormGroup({ className, class: classProp, children }) {
286
+ const effectiveClass = className ?? classProp;
263
287
  const el = document.createElement("div");
264
- el.className = [formGroupStyles.base, className].filter(Boolean).join(" ");
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: className, children }) {
294
+ function FormError({ className, class: classProp, children }) {
295
+ const effectiveClass = className ?? classProp;
271
296
  const el = document.createElement("span");
272
- el.className = [formGroupStyles.error, className].filter(Boolean).join(" ");
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
- class: className,
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, className].filter(Boolean).join(" ");
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
- for (const [key, val] of Object.entries(attrs)) {
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
- class: className,
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, className].filter(Boolean).join(" ");
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 { currentPage, totalPages, onPageChange, siblingCount = 1, class: className } = props;
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 (className)
344
- nav.classList.add(className);
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,351 +458,118 @@ function generatePaginationRange(current, total, siblings) {
424
458
  }
425
459
 
426
460
  // src/components/primitives/accordion.ts
427
- import { resolveChildren as resolveChildren8 } from "@vertz/ui";
428
- import { Accordion } from "@vertz/ui-primitives";
461
+ import { ComposedAccordion, withStyles } from "@vertz/ui-primitives";
429
462
  function createThemedAccordion(styles) {
430
- function AccordionItem({
431
- value,
432
- children,
433
- class: className
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
- const result = Accordion.Root({
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.Item = AccordionItem;
504
- AccordionRoot.Trigger = AccordionTrigger;
505
- AccordionRoot.Content = AccordionContent;
506
- return AccordionRoot;
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 { resolveChildren as resolveChildren9 } from "@vertz/ui";
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
- function AlertDialogTrigger({ children }) {
515
- const el = document.createElement("span");
516
- el.dataset.slot = "alertdialog-trigger";
517
- el.style.display = "contents";
518
- for (const node of resolveChildren9(children)) {
519
- el.appendChild(node);
520
- }
521
- return el;
522
- }
523
- function AlertDialogContent({ children }) {
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({
481
+ const StyledAlertDialog = 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
+ });
491
+ function AlertDialogRoot({
583
492
  children,
584
- class: className
493
+ onOpenChange,
494
+ onAction
585
495
  }) {
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
- }
496
+ return StyledAlertDialog({
497
+ children,
498
+ onOpenChange,
499
+ onAction
620
500
  });
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
501
  }
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;
502
+ return Object.assign(AlertDialogRoot, {
503
+ Trigger: StyledAlertDialog.Trigger,
504
+ Content: StyledAlertDialog.Content,
505
+ Header: StyledAlertDialog.Header,
506
+ Title: StyledAlertDialog.Title,
507
+ Description: StyledAlertDialog.Description,
508
+ Footer: StyledAlertDialog.Footer,
509
+ Cancel: StyledAlertDialog.Cancel,
510
+ Action: StyledAlertDialog.Action
511
+ });
681
512
  }
682
513
 
683
514
  // src/components/primitives/calendar.ts
684
- import { Calendar } from "@vertz/ui-primitives";
515
+ import { ComposedCalendar, withStyles as withStyles3 } from "@vertz/ui-primitives";
685
516
  function createThemedCalendar(styles) {
686
- return function themedCalendar(options) {
687
- const result = Calendar.Root(options);
688
- result.root.classList.add(styles.root);
689
- result.header.classList.add(styles.header);
690
- result.title.classList.add(styles.title);
691
- result.prevButton.classList.add(styles.navButton);
692
- result.nextButton.classList.add(styles.navButton);
693
- result.grid.classList.add(styles.grid);
694
- for (const th of result.grid.querySelectorAll("th")) {
695
- th.classList.add(styles.headCell);
696
- }
697
- for (const td of result.grid.querySelectorAll("td")) {
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;
517
+ const StyledCalendar = withStyles3(ComposedCalendar, {
518
+ root: styles.root,
519
+ header: styles.header,
520
+ title: styles.title,
521
+ navButton: styles.navButton,
522
+ grid: styles.grid,
523
+ headCell: styles.headCell,
524
+ cell: styles.cell,
525
+ dayButton: styles.dayButton
526
+ });
527
+ return function CalendarRoot(props) {
528
+ return StyledCalendar(props);
704
529
  };
705
530
  }
706
531
 
707
532
  // src/components/primitives/carousel.ts
708
- import { Carousel } from "@vertz/ui-primitives";
533
+ import { ComposedCarousel, withStyles as withStyles4 } from "@vertz/ui-primitives";
709
534
  function createThemedCarousel(styles) {
710
- return function themedCarousel(options) {
711
- const result = Carousel.Root(options);
712
- const originalSlide = result.Slide;
713
- result.root.classList.add(styles.root);
714
- result.viewport.classList.add(styles.viewport);
715
- result.prevButton.classList.add(styles.prevButton);
716
- result.nextButton.classList.add(styles.nextButton);
717
- return {
718
- root: result.root,
719
- viewport: result.viewport,
720
- prevButton: result.prevButton,
721
- nextButton: result.nextButton,
722
- state: result.state,
723
- goTo: result.goTo,
724
- goNext: result.goNext,
725
- goPrev: result.goPrev,
726
- Slide: () => {
727
- const slide = originalSlide();
728
- slide.classList.add(styles.slide);
729
- return slide;
730
- }
731
- };
732
- };
535
+ const StyledCarousel = withStyles4(ComposedCarousel, {
536
+ root: styles.root,
537
+ viewport: styles.viewport,
538
+ slide: styles.slide,
539
+ prevButton: styles.prevButton,
540
+ nextButton: styles.nextButton
541
+ });
542
+ function CarouselRoot({
543
+ orientation,
544
+ loop,
545
+ defaultIndex,
546
+ onSlideChange,
547
+ children
548
+ }) {
549
+ return StyledCarousel({
550
+ children,
551
+ orientation,
552
+ loop,
553
+ defaultIndex,
554
+ onSlideChange
555
+ });
556
+ }
557
+ return Object.assign(CarouselRoot, {
558
+ Slide: ComposedCarousel.Slide,
559
+ Previous: ComposedCarousel.Previous,
560
+ Next: ComposedCarousel.Next
561
+ });
733
562
  }
734
563
 
735
564
  // src/components/primitives/checkbox.ts
736
- import { Checkbox } from "@vertz/ui-primitives";
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
- }
565
+ import { ComposedCheckbox, withStyles as withStyles5 } from "@vertz/ui-primitives";
752
566
  function createThemedCheckbox(styles) {
753
- return function themedCheckbox(options) {
754
- const root = Checkbox.Root(options);
755
- root.classList.add(styles.root);
756
- const indicator = document.createElement("span");
757
- indicator.classList.add(styles.indicator);
758
- const dataState = root.getAttribute("data-state") ?? "unchecked";
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;
567
+ const StyledCheckbox = withStyles5(ComposedCheckbox, {
568
+ root: styles.root,
569
+ indicator: styles.indicator
570
+ });
571
+ return function CheckboxRoot(props) {
572
+ return StyledCheckbox(props);
772
573
  };
773
574
  }
774
575
 
@@ -782,99 +583,65 @@ function createThemedCollapsible(styles) {
782
583
  };
783
584
  }
784
585
 
785
- // src/components/primitives/command.ts
786
- import { Command } from "@vertz/ui-primitives";
586
+ // src/components/primitives/command.tsx
587
+ import { ComposedCommand, withStyles as withStyles6 } from "@vertz/ui-primitives";
787
588
  function createThemedCommand(styles) {
788
- return function themedCommand(options) {
789
- const result = Command.Root(options);
790
- result.root.classList.add(styles.root);
791
- result.input.classList.add(styles.input);
792
- result.list.classList.add(styles.list);
793
- result.empty.classList.add(styles.empty);
794
- const originalItem = result.Item;
795
- const originalGroup = result.Group;
796
- const originalSeparator = result.Separator;
797
- result.Item = (value, label, keywords) => {
798
- const item = originalItem(value, label, keywords);
799
- item.classList.add(styles.item);
800
- return item;
801
- };
802
- result.Group = (label) => {
803
- const group = originalGroup(label);
804
- group.el.classList.add(styles.group);
805
- const labelId = group.el.getAttribute("aria-labelledby") ?? "";
806
- const heading = group.el.querySelector(`#${labelId}`);
807
- if (heading) {
808
- heading.classList.add(styles.groupHeading);
809
- }
810
- const originalGroupItem = group.Item;
811
- group.Item = (value, itemLabel, keywords) => {
812
- const item = originalGroupItem(value, itemLabel, keywords);
813
- item.classList.add(styles.item);
814
- return item;
815
- };
816
- return group;
817
- };
818
- result.Separator = () => {
819
- const sep = originalSeparator();
820
- sep.classList.add(styles.separator);
821
- return sep;
822
- };
823
- return result;
824
- };
589
+ const Styled = withStyles6(ComposedCommand, {
590
+ root: styles.root,
591
+ input: styles.input,
592
+ list: styles.list,
593
+ item: styles.item,
594
+ group: styles.group,
595
+ groupHeading: styles.groupHeading,
596
+ separator: styles.separator,
597
+ empty: styles.empty
598
+ });
599
+ function CommandRoot({
600
+ children,
601
+ filter,
602
+ onSelect,
603
+ onInputChange,
604
+ placeholder
605
+ }) {
606
+ return Styled({
607
+ children,
608
+ filter,
609
+ onSelect,
610
+ onInputChange,
611
+ placeholder
612
+ });
613
+ }
614
+ return Object.assign(CommandRoot, {
615
+ Input: ComposedCommand.Input,
616
+ List: ComposedCommand.List,
617
+ Empty: ComposedCommand.Empty,
618
+ Item: ComposedCommand.Item,
619
+ Group: ComposedCommand.Group,
620
+ Separator: ComposedCommand.Separator
621
+ });
825
622
  }
826
623
 
827
624
  // src/components/primitives/context-menu.ts
828
- import { ContextMenu } from "@vertz/ui-primitives";
829
- var idCounter2 = 0;
625
+ import { ComposedContextMenu, withStyles as withStyles7 } from "@vertz/ui-primitives";
830
626
  function createThemedContextMenu(styles) {
831
- return function themedContextMenu(options) {
832
- const result = ContextMenu.Root({
833
- ...options,
834
- positioning: { strategy: "fixed" }
835
- });
836
- result.content.classList.add(styles.content);
837
- function themedItem(value, label) {
838
- const item = result.Item(value, label);
839
- item.classList.add(styles.item);
840
- return item;
841
- }
842
- return {
843
- trigger: result.trigger,
844
- content: result.content,
845
- state: result.state,
846
- Item: themedItem,
847
- Group: (label) => {
848
- const group = result.Group(label);
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
- };
627
+ const Styled = withStyles7(ComposedContextMenu, {
628
+ content: styles.content,
629
+ item: styles.item,
630
+ group: styles.group,
631
+ label: styles.label,
632
+ separator: styles.separator
633
+ });
634
+ function ContextMenuRoot({ children, onSelect }) {
635
+ return Styled({ children, onSelect });
636
+ }
637
+ return Object.assign(ContextMenuRoot, {
638
+ Trigger: ComposedContextMenu.Trigger,
639
+ Content: ComposedContextMenu.Content,
640
+ Item: ComposedContextMenu.Item,
641
+ Group: ComposedContextMenu.Group,
642
+ Label: ComposedContextMenu.Label,
643
+ Separator: ComposedContextMenu.Separator
644
+ });
878
645
  }
879
646
 
880
647
  // src/components/primitives/date-picker.ts
@@ -889,132 +656,44 @@ function createThemedDatePicker(styles) {
889
656
  }
890
657
 
891
658
  // src/components/primitives/dialog.ts
892
- import { resolveChildren as resolveChildren10 } from "@vertz/ui";
893
- import { Dialog as Dialog2 } from "@vertz/ui-primitives";
659
+ import { ComposedDialog, withStyles as withStyles8 } from "@vertz/ui-primitives";
894
660
  function createThemedDialog(styles) {
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({
934
- children,
935
- class: className
936
- }) {
937
- const el = document.createElement("p");
938
- el.classList.add(styles.description);
939
- if (className)
940
- el.classList.add(className);
941
- for (const node of resolveChildren10(children)) {
942
- el.appendChild(node);
943
- }
944
- return el;
945
- }
946
- function DialogFooter({ children, class: className }) {
947
- const el = document.createElement("div");
948
- el.classList.add(styles.footer);
949
- if (className)
950
- el.classList.add(className);
951
- for (const node of resolveChildren10(children)) {
952
- el.appendChild(node);
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);
978
- }
661
+ const StyledDialog = withStyles8(ComposedDialog, {
662
+ overlay: styles.overlay,
663
+ content: styles.panel,
664
+ close: styles.close,
665
+ header: styles.header,
666
+ title: styles.title,
667
+ description: styles.description,
668
+ footer: styles.footer
669
+ });
670
+ function DialogRoot({ children, onOpenChange }) {
671
+ const closeIcon = document.createElement("button");
672
+ closeIcon.type = "button";
673
+ closeIcon.className = styles.close;
674
+ closeIcon.setAttribute("aria-label", "Close");
675
+ closeIcon.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>';
676
+ return StyledDialog({
677
+ children,
678
+ onOpenChange,
679
+ closeIcon
979
680
  });
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
681
  }
1007
- DialogRoot.Trigger = DialogTrigger;
1008
- DialogRoot.Content = DialogContent;
1009
- DialogRoot.Header = DialogHeader;
1010
- DialogRoot.Title = DialogTitle;
1011
- DialogRoot.Description = DialogDescription;
1012
- DialogRoot.Footer = DialogFooter;
1013
- return DialogRoot;
682
+ return Object.assign(DialogRoot, {
683
+ Trigger: StyledDialog.Trigger,
684
+ Content: StyledDialog.Content,
685
+ Header: StyledDialog.Header,
686
+ Title: StyledDialog.Title,
687
+ Description: StyledDialog.Description,
688
+ Footer: StyledDialog.Footer,
689
+ Close: StyledDialog.Close
690
+ });
1014
691
  }
1015
692
 
1016
- // src/components/primitives/drawer.ts
1017
- import { Dialog as Dialog3 } from "@vertz/ui-primitives";
693
+ // src/components/primitives/drawer.tsx
694
+ import { __element, __enterChildren, __exitChildren, __insert } from "@vertz/ui/internals";
695
+ import { resolveChildren as resolveChildren8 } from "@vertz/ui";
696
+ import { ComposedSheet } from "@vertz/ui-primitives";
1018
697
  var PANEL_CLASS_MAP = {
1019
698
  left: "panelLeft",
1020
699
  right: "panelRight",
@@ -1022,173 +701,108 @@ var PANEL_CLASS_MAP = {
1022
701
  bottom: "panelBottom"
1023
702
  };
1024
703
  function createThemedDrawer(styles) {
1025
- return function themedDrawer(options) {
1026
- const side = options?.side ?? "bottom";
1027
- const result = Dialog3.Root(options);
1028
- result.overlay.classList.add(styles.overlay);
1029
- result.content.classList.add(styles[PANEL_CLASS_MAP[side]]);
1030
- result.title.classList.add(styles.title);
1031
- result.close.classList.add(styles.close);
1032
- const handle = document.createElement("div");
1033
- handle.classList.add(styles.handle);
1034
- result.content.insertBefore(handle, result.content.firstChild);
1035
- const description = document.createElement("p");
1036
- description.classList.add(styles.description);
1037
- const descId = `${result.content.id}-description`;
1038
- description.id = descId;
1039
- result.content.setAttribute("aria-describedby", descId);
1040
- return { ...result, handle, description };
1041
- };
704
+ function DrawerRoot({ children, side, onOpenChange }) {
705
+ const resolvedSide = side ?? "bottom";
706
+ const panelClass = styles[PANEL_CLASS_MAP[resolvedSide]];
707
+ return ComposedSheet({
708
+ children,
709
+ side: resolvedSide,
710
+ onOpenChange,
711
+ classes: {
712
+ overlay: styles.overlay,
713
+ content: panelClass,
714
+ title: styles.title,
715
+ description: styles.description,
716
+ close: styles.close
717
+ }
718
+ });
719
+ }
720
+ function DrawerHeader({ children, className: cls, class: classProp }) {
721
+ const effectiveCls = cls ?? classProp;
722
+ const combined = [styles.header, effectiveCls].filter(Boolean).join(" ");
723
+ const resolved = resolveChildren8(children);
724
+ return (() => {
725
+ const __el0 = __element("div");
726
+ __el0.setAttribute("data-slot", "drawer-header");
727
+ {
728
+ const __v = combined;
729
+ if (__v != null && __v !== false)
730
+ __el0.setAttribute("class", __v === true ? "" : __v);
731
+ }
732
+ __enterChildren(__el0);
733
+ __insert(__el0, resolved);
734
+ __exitChildren();
735
+ return __el0;
736
+ })();
737
+ }
738
+ function DrawerFooter({ children, className: cls, class: classProp }) {
739
+ const effectiveCls = cls ?? classProp;
740
+ const combined = [styles.footer, effectiveCls].filter(Boolean).join(" ");
741
+ const resolved = resolveChildren8(children);
742
+ return (() => {
743
+ const __el1 = __element("div");
744
+ __el1.setAttribute("data-slot", "drawer-footer");
745
+ {
746
+ const __v = combined;
747
+ if (__v != null && __v !== false)
748
+ __el1.setAttribute("class", __v === true ? "" : __v);
749
+ }
750
+ __enterChildren(__el1);
751
+ __insert(__el1, resolved);
752
+ __exitChildren();
753
+ return __el1;
754
+ })();
755
+ }
756
+ function DrawerHandle({ className: cls, class: classProp }) {
757
+ const effectiveCls = cls ?? classProp;
758
+ const combined = [styles.handle, effectiveCls].filter(Boolean).join(" ");
759
+ return (() => {
760
+ const __el2 = __element("div");
761
+ __el2.setAttribute("data-slot", "drawer-handle");
762
+ {
763
+ const __v = combined;
764
+ if (__v != null && __v !== false)
765
+ __el2.setAttribute("class", __v === true ? "" : __v);
766
+ }
767
+ return __el2;
768
+ })();
769
+ }
770
+ return Object.assign(DrawerRoot, {
771
+ Trigger: ComposedSheet.Trigger,
772
+ Content: ComposedSheet.Content,
773
+ Header: DrawerHeader,
774
+ Title: ComposedSheet.Title,
775
+ Description: ComposedSheet.Description,
776
+ Footer: DrawerFooter,
777
+ Handle: DrawerHandle
778
+ });
1042
779
  }
1043
780
 
1044
781
  // 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;
782
+ import { ComposedDropdownMenu, withStyles as withStyles9 } from "@vertz/ui-primitives";
1048
783
  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;
1090
- }
1091
- function MenuLabel({ children, class: className }) {
1092
- const el = document.createElement("div");
1093
- el.dataset.slot = "menu-label";
1094
- el.style.display = "contents";
1095
- if (className)
1096
- el.classList.add(className);
1097
- for (const node of resolveChildren11(children))
1098
- el.appendChild(node);
1099
- return el;
1100
- }
1101
- function MenuSeparator() {
1102
- const el = document.createElement("hr");
1103
- el.dataset.slot = "menu-separator";
1104
- return el;
1105
- }
1106
- function processItems(nodes, primitive, parentGroup) {
1107
- for (const node of nodes) {
1108
- if (!(node instanceof HTMLElement))
1109
- continue;
1110
- const slot = node.dataset.slot;
1111
- if (slot === "menu-item") {
1112
- const value = node.dataset.value;
1113
- const label = node.textContent ?? undefined;
1114
- const item = parentGroup ? parentGroup.Item(value, label) : primitive.Item(value, label);
1115
- item.classList.add(styles.item);
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);
1134
- }
1135
- }
1136
- }
784
+ const Styled = withStyles9(ComposedDropdownMenu, {
785
+ content: styles.content,
786
+ item: styles.item,
787
+ group: styles.group,
788
+ label: styles.label,
789
+ separator: styles.separator
790
+ });
1137
791
  function DropdownMenuRoot({
1138
792
  children,
1139
- onOpenChange: onOpenChangeOrig,
1140
- ...menuOptions
793
+ onSelect,
794
+ onOpenChange
1141
795
  }) {
1142
- let userTrigger = null;
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;
1184
- }
1185
- DropdownMenuRoot.Trigger = MenuTrigger;
1186
- DropdownMenuRoot.Content = MenuContent;
1187
- DropdownMenuRoot.Item = MenuItem;
1188
- DropdownMenuRoot.Group = MenuGroup;
1189
- DropdownMenuRoot.Label = MenuLabel;
1190
- DropdownMenuRoot.Separator = MenuSeparator;
1191
- return DropdownMenuRoot;
796
+ return Styled({ children, onSelect, onOpenChange });
797
+ }
798
+ return Object.assign(DropdownMenuRoot, {
799
+ Trigger: ComposedDropdownMenu.Trigger,
800
+ Content: ComposedDropdownMenu.Content,
801
+ Item: ComposedDropdownMenu.Item,
802
+ Group: ComposedDropdownMenu.Group,
803
+ Label: ComposedDropdownMenu.Label,
804
+ Separator: ComposedDropdownMenu.Separator
805
+ });
1192
806
  }
1193
807
 
1194
808
  // src/components/primitives/hover-card.ts
@@ -1205,218 +819,105 @@ function createThemedHoverCard(styles) {
1205
819
  }
1206
820
 
1207
821
  // src/components/primitives/menubar.ts
1208
- import { Menubar } from "@vertz/ui-primitives";
822
+ import { ComposedMenubar, withStyles as withStyles10 } from "@vertz/ui-primitives";
1209
823
  function createThemedMenubar(styles) {
1210
- return function themedMenubar(options) {
1211
- const result = Menubar.Root(options);
1212
- result.root.classList.add(styles.root);
1213
- function themedMenu(value, label) {
1214
- const menu = result.Menu(value, label);
1215
- menu.trigger.classList.add(styles.trigger);
1216
- menu.content.classList.add(styles.content);
1217
- return {
1218
- trigger: menu.trigger,
1219
- content: menu.content,
1220
- Item: (val, itemLabel) => {
1221
- const item = menu.Item(val, itemLabel);
1222
- item.classList.add(styles.item);
1223
- return item;
1224
- },
1225
- Group: (groupLabel) => {
1226
- const group = menu.Group(groupLabel);
1227
- return {
1228
- el: group.el,
1229
- Item: (val, itemLabel) => {
1230
- const item = group.Item(val, itemLabel);
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
- };
824
+ const Styled = withStyles10(ComposedMenubar, {
825
+ root: styles.root,
826
+ trigger: styles.trigger,
827
+ content: styles.content,
828
+ item: styles.item,
829
+ group: "",
830
+ label: styles.label,
831
+ separator: styles.separator
832
+ });
833
+ function MenubarRoot({ children, onSelect }) {
834
+ return Styled({ children, onSelect });
835
+ }
836
+ return Object.assign(MenubarRoot, {
837
+ Menu: ComposedMenubar.Menu,
838
+ Trigger: ComposedMenubar.Trigger,
839
+ Content: ComposedMenubar.Content,
840
+ Item: ComposedMenubar.Item,
841
+ Group: ComposedMenubar.Group,
842
+ Label: ComposedMenubar.Label,
843
+ Separator: ComposedMenubar.Separator
844
+ });
1249
845
  }
1250
846
 
1251
- // src/components/primitives/navigation-menu.ts
1252
- import { NavigationMenu } from "@vertz/ui-primitives";
847
+ // src/components/primitives/navigation-menu.tsx
848
+ import { ComposedNavigationMenu, withStyles as withStyles11 } from "@vertz/ui-primitives";
1253
849
  function createThemedNavigationMenu(styles) {
1254
- return function themedNavigationMenu(options) {
1255
- const result = NavigationMenu.Root(options);
1256
- const originalItem = result.Item;
1257
- const originalLink = result.Link;
1258
- result.root.classList.add(styles.root);
1259
- result.list.classList.add(styles.list);
1260
- result.viewport.classList.add(styles.viewport);
1261
- return {
1262
- root: result.root,
1263
- list: result.list,
1264
- viewport: result.viewport,
1265
- state: result.state,
1266
- Item: (value, label) => {
1267
- const item = originalItem(value, label);
1268
- item.trigger.classList.add(styles.trigger);
1269
- item.content.classList.add(styles.content);
1270
- return item;
1271
- },
1272
- Link: (href, label) => {
1273
- const link = originalLink(href, label);
1274
- link.classList.add(styles.link);
1275
- return link;
1276
- }
1277
- };
1278
- };
850
+ const Styled = withStyles11(ComposedNavigationMenu, {
851
+ root: styles.root,
852
+ list: styles.list,
853
+ trigger: styles.trigger,
854
+ content: styles.content,
855
+ link: styles.link,
856
+ viewport: styles.viewport
857
+ });
858
+ function NavigationMenuRoot({
859
+ orientation,
860
+ delayOpen,
861
+ delayClose,
862
+ children
863
+ }) {
864
+ return Styled({
865
+ children,
866
+ orientation,
867
+ delayOpen,
868
+ delayClose
869
+ });
870
+ }
871
+ return Object.assign(NavigationMenuRoot, {
872
+ List: ComposedNavigationMenu.List,
873
+ Item: ComposedNavigationMenu.Item,
874
+ Trigger: ComposedNavigationMenu.Trigger,
875
+ Content: ComposedNavigationMenu.Content,
876
+ Link: ComposedNavigationMenu.Link,
877
+ Viewport: ComposedNavigationMenu.Viewport
878
+ });
1279
879
  }
1280
880
 
1281
881
  // src/components/primitives/popover.ts
1282
- import { resolveChildren as resolveChildren12 } from "@vertz/ui";
1283
- import { Popover } from "@vertz/ui-primitives";
882
+ import { ComposedPopover, withStyles as withStyles12 } from "@vertz/ui-primitives";
1284
883
  function createThemedPopover(styles) {
1285
- function PopoverTrigger({ children }) {
1286
- const el = document.createElement("span");
1287
- el.dataset.slot = "popover-trigger";
1288
- el.style.display = "contents";
1289
- for (const node of resolveChildren12(children))
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;
884
+ const StyledPopover = withStyles12(ComposedPopover, {
885
+ content: styles.content
886
+ });
887
+ function PopoverRoot({ children, onOpenChange }) {
888
+ return StyledPopover({ children, onOpenChange });
1343
889
  }
1344
- PopoverRoot.Trigger = PopoverTrigger;
1345
- PopoverRoot.Content = PopoverContent;
1346
- return PopoverRoot;
890
+ return Object.assign(PopoverRoot, {
891
+ Trigger: ComposedPopover.Trigger,
892
+ Content: ComposedPopover.Content
893
+ });
1347
894
  }
1348
895
 
1349
896
  // src/components/primitives/progress.ts
1350
- import { Progress } from "@vertz/ui-primitives";
897
+ import { ComposedProgress } from "@vertz/ui-primitives";
1351
898
  function createThemedProgress(styles) {
1352
- return function themedProgress(options) {
1353
- const result = Progress.Root(options);
1354
- result.root.classList.add(styles.root);
1355
- result.root.style.opacity = "1";
1356
- result.indicator.classList.add(styles.indicator);
1357
- return result;
899
+ return function ProgressRoot(props) {
900
+ return ComposedProgress({
901
+ ...props,
902
+ classes: { root: styles.root, indicator: styles.indicator }
903
+ });
1358
904
  };
1359
905
  }
1360
906
 
1361
907
  // src/components/primitives/radio-group.ts
1362
- import { Radio } from "@vertz/ui-primitives";
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
- }
908
+ import { ComposedRadioGroup, withStyles as withStyles13 } from "@vertz/ui-primitives";
1376
909
  function createThemedRadioGroup(styles) {
1377
- return function themedRadioGroup(options) {
1378
- const result = Radio.Root(options);
1379
- result.root.classList.add(styles.root);
1380
- const originalItem = result.Item;
1381
- return {
1382
- root: result.root,
1383
- state: result.state,
1384
- Item: (value, label) => {
1385
- const item = originalItem(value, label);
1386
- const labelText = item.textContent ?? "";
1387
- item.textContent = "";
1388
- item.classList.add(styles.item);
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
- };
910
+ const StyledRadioGroup = withStyles13(ComposedRadioGroup, {
911
+ root: styles.root,
912
+ item: styles.item,
913
+ indicator: styles.indicator
914
+ });
915
+ function RadioGroupRoot(props) {
916
+ return StyledRadioGroup(props);
917
+ }
918
+ return Object.assign(RadioGroupRoot, {
919
+ Item: ComposedRadioGroup.Item
920
+ });
1420
921
  }
1421
922
 
1422
923
  // src/components/primitives/resizable-panel.ts
@@ -1460,119 +961,41 @@ function createThemedScrollArea(styles) {
1460
961
  }
1461
962
 
1462
963
  // src/components/primitives/select.ts
1463
- import { resolveChildren as resolveChildren13 } from "@vertz/ui";
1464
- import { Select } from "@vertz/ui-primitives";
1465
- var idCounter4 = 0;
964
+ import { ComposedSelect, withStyles as withStyles14 } from "@vertz/ui-primitives";
1466
965
  function createThemedSelect(styles) {
1467
- function SelectTrigger({ children }) {
1468
- const el = document.createElement("span");
1469
- el.dataset.slot = "select-trigger";
1470
- el.style.display = "contents";
1471
- for (const node of resolveChildren13(children))
1472
- el.appendChild(node);
1473
- return el;
1474
- }
1475
- function SelectContent({ children }) {
1476
- const el = document.createElement("div");
1477
- el.dataset.slot = "select-content";
1478
- el.style.display = "contents";
1479
- for (const node of resolveChildren13(children))
1480
- el.appendChild(node);
1481
- return el;
1482
- }
1483
- function SelectItem({ value, children, class: className }) {
1484
- const el = document.createElement("div");
1485
- el.dataset.slot = "select-item";
1486
- el.dataset.value = value;
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 }
966
+ const StyledSelect = withStyles14(ComposedSelect, {
967
+ trigger: styles.trigger,
968
+ content: styles.content,
969
+ item: styles.item,
970
+ itemIndicator: styles.itemIndicator,
971
+ group: styles.group,
972
+ label: styles.label,
973
+ separator: styles.separator
974
+ });
975
+ function SelectRoot({
976
+ defaultValue,
977
+ placeholder,
978
+ onValueChange,
979
+ children
980
+ }) {
981
+ return StyledSelect({
982
+ children,
983
+ defaultValue,
984
+ placeholder,
985
+ onValueChange
1555
986
  });
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
987
  }
1565
- SelectRoot.Trigger = SelectTrigger;
1566
- SelectRoot.Content = SelectContent;
1567
- SelectRoot.Item = SelectItem;
1568
- SelectRoot.Group = SelectGroup;
1569
- SelectRoot.Separator = SelectSeparator;
1570
- return SelectRoot;
988
+ return Object.assign(SelectRoot, {
989
+ Trigger: ComposedSelect.Trigger,
990
+ Content: ComposedSelect.Content,
991
+ Item: ComposedSelect.Item,
992
+ Group: ComposedSelect.Group,
993
+ Separator: ComposedSelect.Separator
994
+ });
1571
995
  }
1572
996
 
1573
997
  // src/components/primitives/sheet.ts
1574
- import { resolveChildren as resolveChildren14 } from "@vertz/ui";
1575
- import { Dialog as Dialog4 } from "@vertz/ui-primitives";
998
+ import { ComposedSheet as ComposedSheet2 } from "@vertz/ui-primitives";
1576
999
  var PANEL_CLASS_MAP2 = {
1577
1000
  left: "panelLeft",
1578
1001
  right: "panelRight",
@@ -1580,256 +1003,86 @@ var PANEL_CLASS_MAP2 = {
1580
1003
  bottom: "panelBottom"
1581
1004
  };
1582
1005
  function createThemedSheet(styles) {
1583
- function SheetTrigger({ children }) {
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 }) {
1006
+ function SheetRoot({ children, side, onOpenChange }) {
1638
1007
  const resolvedSide = side ?? "right";
1639
- const onOpenChangeOrig = options.onOpenChange;
1640
- let userTrigger = null;
1641
- let contentChildren = [];
1642
- for (const node of resolveChildren14(children)) {
1643
- if (!(node instanceof HTMLElement))
1644
- continue;
1645
- const slot = node.dataset.slot;
1646
- if (slot === "sheet-trigger") {
1647
- userTrigger = node.firstElementChild ?? node;
1648
- } else if (slot === "sheet-content") {
1649
- contentChildren = Array.from(node.childNodes);
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);
1008
+ const panelClass = styles[PANEL_CLASS_MAP2[resolvedSide]];
1009
+ return ComposedSheet2({
1010
+ children,
1011
+ side: resolvedSide,
1012
+ onOpenChange,
1013
+ classes: {
1014
+ overlay: styles.overlay,
1015
+ content: panelClass,
1016
+ title: styles.title,
1017
+ description: styles.description,
1018
+ close: styles.close
1660
1019
  }
1661
1020
  });
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
1021
  }
1692
- SheetRoot.Trigger = SheetTrigger;
1693
- SheetRoot.Content = SheetContent;
1694
- SheetRoot.Title = SheetTitle;
1695
- SheetRoot.Description = SheetDescription;
1696
- SheetRoot.Close = SheetClose;
1697
- return SheetRoot;
1022
+ return Object.assign(SheetRoot, {
1023
+ Trigger: ComposedSheet2.Trigger,
1024
+ Content: ComposedSheet2.Content,
1025
+ Title: ComposedSheet2.Title,
1026
+ Description: ComposedSheet2.Description,
1027
+ Close: ComposedSheet2.Close
1028
+ });
1698
1029
  }
1699
1030
 
1700
1031
  // src/components/primitives/slider.ts
1701
- import { Slider } from "@vertz/ui-primitives";
1032
+ import { ComposedSlider } from "@vertz/ui-primitives";
1702
1033
  function createThemedSlider(styles) {
1703
- return function themedSlider(options) {
1704
- const result = Slider.Root(options);
1705
- result.root.classList.add(styles.root);
1706
- result.track.classList.add(styles.track);
1707
- result.thumb.classList.add(styles.thumb);
1708
- const fill = result.track.querySelector('[data-part="fill"]');
1709
- if (fill) {
1710
- fill.style.backgroundColor = "var(--color-primary)";
1711
- }
1712
- return result;
1034
+ return function SliderRoot(props) {
1035
+ return ComposedSlider({
1036
+ ...props,
1037
+ classes: {
1038
+ root: styles.root,
1039
+ track: styles.track,
1040
+ range: styles.range,
1041
+ thumb: styles.thumb
1042
+ }
1043
+ });
1713
1044
  };
1714
1045
  }
1715
1046
 
1716
1047
  // src/components/primitives/switch.ts
1717
- import { Switch } from "@vertz/ui-primitives";
1048
+ import { ComposedSwitch, withStyles as withStyles15 } from "@vertz/ui-primitives";
1718
1049
  function createThemedSwitch(styles) {
1719
- return function themedSwitch(options) {
1720
- const { size, ...primitiveOptions } = options ?? {};
1721
- const root = Switch.Root(primitiveOptions);
1722
- root.classList.add(size === "sm" ? styles.rootSm : styles.root);
1723
- const thumb = document.createElement("span");
1724
- thumb.classList.add(size === "sm" ? styles.thumbSm : styles.thumb);
1725
- const initialState = root.getAttribute("data-state") ?? "unchecked";
1726
- thumb.setAttribute("data-state", initialState);
1727
- const observer = new MutationObserver((mutations) => {
1728
- for (const mutation of mutations) {
1729
- if (mutation.attributeName === "data-state") {
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;
1050
+ const DefaultSwitch = withStyles15(ComposedSwitch, {
1051
+ root: styles.root,
1052
+ thumb: styles.thumb
1053
+ });
1054
+ const SmSwitch = withStyles15(ComposedSwitch, {
1055
+ root: styles.rootSm,
1056
+ thumb: styles.thumbSm
1057
+ });
1058
+ return function SwitchRoot({ size, ...props }) {
1059
+ const Styled = size === "sm" ? SmSwitch : DefaultSwitch;
1060
+ return Styled(props);
1738
1061
  };
1739
1062
  }
1740
1063
 
1741
1064
  // src/components/primitives/tabs.ts
1742
- import { resolveChildren as resolveChildren15 } from "@vertz/ui";
1743
- import { Tabs } from "@vertz/ui-primitives";
1065
+ import { ComposedTabs, withStyles as withStyles16 } from "@vertz/ui-primitives";
1744
1066
  function createThemedTabs(styles) {
1745
- function TabsList({ children, class: className }) {
1746
- const el = document.createElement("div");
1747
- el.dataset.slot = "tabs-list";
1748
- el.style.display = "contents";
1749
- if (className)
1750
- el.classList.add(className);
1751
- for (const node of resolveChildren15(children))
1752
- el.appendChild(node);
1753
- return el;
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
- }
1067
+ const DefaultTabs = withStyles16(ComposedTabs, {
1068
+ list: styles.list,
1069
+ trigger: styles.trigger,
1070
+ panel: styles.panel
1071
+ });
1072
+ const LineTabs = withStyles16(ComposedTabs, {
1073
+ list: styles.listLine,
1074
+ trigger: styles.triggerLine,
1075
+ panel: styles.panel
1076
+ });
1777
1077
  function TabsRoot({ defaultValue, variant, children }) {
1778
- const isLine = variant === "line";
1779
- const result = Tabs.Root({ defaultValue });
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;
1078
+ const Styled = variant === "line" ? LineTabs : DefaultTabs;
1079
+ return Styled({ children, defaultValue });
1828
1080
  }
1829
- TabsRoot.List = TabsList;
1830
- TabsRoot.Trigger = TabsTrigger;
1831
- TabsRoot.Content = TabsContent;
1832
- return TabsRoot;
1081
+ return Object.assign(TabsRoot, {
1082
+ List: ComposedTabs.List,
1083
+ Trigger: ComposedTabs.Trigger,
1084
+ Content: ComposedTabs.Content
1085
+ });
1833
1086
  }
1834
1087
 
1835
1088
  // src/components/primitives/toast.ts
@@ -1849,12 +1102,13 @@ function createThemedToast(styles) {
1849
1102
  }
1850
1103
 
1851
1104
  // src/components/primitives/toggle.ts
1852
- import { Toggle } from "@vertz/ui-primitives";
1105
+ import { ComposedToggle, withStyles as withStyles17 } from "@vertz/ui-primitives";
1853
1106
  function createThemedToggle(styles) {
1854
- return function themedToggle(options) {
1855
- const root = Toggle.Root(options);
1856
- root.classList.add(styles.root);
1857
- return root;
1107
+ const StyledToggle = withStyles17(ComposedToggle, {
1108
+ root: styles.root
1109
+ });
1110
+ return function ToggleRoot(props) {
1111
+ return StyledToggle(props);
1858
1112
  };
1859
1113
  }
1860
1114
 
@@ -1875,72 +1129,41 @@ function createThemedToggleGroup(styles) {
1875
1129
  }
1876
1130
 
1877
1131
  // src/components/primitives/tooltip.ts
1878
- import { resolveChildren as resolveChildren16 } from "@vertz/ui";
1879
- import { Tooltip } from "@vertz/ui-primitives";
1132
+ import { ComposedTooltip, withStyles as withStyles18 } from "@vertz/ui-primitives";
1880
1133
  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;
1898
- }
1899
- function TooltipRoot({ children, ...options }) {
1900
- let triggerChildren = [];
1901
- let contentChildren = [];
1902
- for (const node of resolveChildren16(children)) {
1903
- if (!(node instanceof HTMLElement))
1904
- continue;
1905
- const slot = node.dataset.slot;
1906
- if (slot === "tooltip-trigger") {
1907
- triggerChildren = Array.from(node.childNodes);
1908
- } else if (slot === "tooltip-content") {
1909
- contentChildren = Array.from(node.childNodes);
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;
1134
+ const StyledTooltip = withStyles18(ComposedTooltip, {
1135
+ content: styles.content
1136
+ });
1137
+ function TooltipRoot({ children, delay }) {
1138
+ return StyledTooltip({ children, delay });
1924
1139
  }
1925
- TooltipRoot.Trigger = TooltipTrigger;
1926
- TooltipRoot.Content = TooltipContent;
1927
- return TooltipRoot;
1140
+ return Object.assign(TooltipRoot, {
1141
+ Trigger: ComposedTooltip.Trigger,
1142
+ Content: ComposedTooltip.Content
1143
+ });
1928
1144
  }
1929
1145
 
1930
1146
  // src/components/separator.ts
1931
1147
  function createSeparatorComponent(separatorStyles) {
1932
- return function Separator({ class: className }) {
1148
+ return function Separator({ className, class: classProp }) {
1149
+ const effectiveClass = className ?? classProp;
1933
1150
  const el = document.createElement("hr");
1934
- el.className = [separatorStyles.base, className].filter(Boolean).join(" ");
1151
+ el.className = [separatorStyles.base, effectiveClass].filter(Boolean).join(" ");
1935
1152
  return el;
1936
1153
  };
1937
1154
  }
1938
1155
 
1939
1156
  // src/components/skeleton.ts
1940
1157
  function createSkeletonComponents(skeletonStyles) {
1941
- function Skeleton({ class: className, width, height } = {}) {
1158
+ function Skeleton({
1159
+ className,
1160
+ class: classProp,
1161
+ width,
1162
+ height
1163
+ } = {}) {
1164
+ const effectiveClass = className ?? classProp;
1942
1165
  const el = document.createElement("div");
1943
- el.className = [skeletonStyles.base, className].filter(Boolean).join(" ");
1166
+ el.className = [skeletonStyles.base, effectiveClass].filter(Boolean).join(" ");
1944
1167
  el.setAttribute("aria-hidden", "true");
1945
1168
  if (width)
1946
1169
  el.style.width = width;
@@ -1952,75 +1175,99 @@ function createSkeletonComponents(skeletonStyles) {
1952
1175
  }
1953
1176
 
1954
1177
  // src/components/table.ts
1955
- import { resolveChildren as resolveChildren17 } from "@vertz/ui";
1178
+ import { resolveChildren as resolveChildren9 } from "@vertz/ui";
1956
1179
  function createTableComponents(tableStyles) {
1957
- function Table({ class: className, children }) {
1180
+ function Table({ className, class: classProp, children }) {
1181
+ const effectiveClass = className ?? classProp;
1958
1182
  const wrapper = document.createElement("div");
1959
1183
  wrapper.style.position = "relative";
1960
1184
  wrapper.style.width = "100%";
1961
1185
  wrapper.style.overflowX = "auto";
1962
1186
  const table = document.createElement("table");
1963
1187
  table.style.borderCollapse = "collapse";
1964
- table.className = [tableStyles.root, className].filter(Boolean).join(" ");
1965
- for (const node of resolveChildren17(children)) {
1188
+ table.className = [tableStyles.root, effectiveClass].filter(Boolean).join(" ");
1189
+ for (const node of resolveChildren9(children)) {
1966
1190
  table.appendChild(node);
1967
1191
  }
1968
1192
  wrapper.appendChild(table);
1969
1193
  return wrapper;
1970
1194
  }
1971
- function TableHeader({ class: className, children }) {
1195
+ function TableHeader({
1196
+ className,
1197
+ class: classProp,
1198
+ children
1199
+ }) {
1200
+ const effectiveClass = className ?? classProp;
1972
1201
  const el = document.createElement("thead");
1973
- el.className = [tableStyles.header, className].filter(Boolean).join(" ");
1974
- for (const node of resolveChildren17(children)) {
1202
+ el.className = [tableStyles.header, effectiveClass].filter(Boolean).join(" ");
1203
+ for (const node of resolveChildren9(children)) {
1975
1204
  el.appendChild(node);
1976
1205
  }
1977
1206
  return el;
1978
1207
  }
1979
- function TableBody({ class: className, children }) {
1208
+ function TableBody({
1209
+ className,
1210
+ class: classProp,
1211
+ children
1212
+ }) {
1213
+ const effectiveClass = className ?? classProp;
1980
1214
  const el = document.createElement("tbody");
1981
- el.className = [tableStyles.body, className].filter(Boolean).join(" ");
1982
- for (const node of resolveChildren17(children)) {
1215
+ el.className = [tableStyles.body, effectiveClass].filter(Boolean).join(" ");
1216
+ for (const node of resolveChildren9(children)) {
1983
1217
  el.appendChild(node);
1984
1218
  }
1985
1219
  return el;
1986
1220
  }
1987
- function TableRow({ class: className, children }) {
1221
+ function TableRow({ className, class: classProp, children }) {
1222
+ const effectiveClass = className ?? classProp;
1988
1223
  const el = document.createElement("tr");
1989
- el.className = [tableStyles.row, className].filter(Boolean).join(" ");
1990
- for (const node of resolveChildren17(children)) {
1224
+ el.className = [tableStyles.row, effectiveClass].filter(Boolean).join(" ");
1225
+ for (const node of resolveChildren9(children)) {
1991
1226
  el.appendChild(node);
1992
1227
  }
1993
1228
  return el;
1994
1229
  }
1995
- function TableHead({ class: className, children }) {
1230
+ function TableHead({ className, class: classProp, children }) {
1231
+ const effectiveClass = className ?? classProp;
1996
1232
  const el = document.createElement("th");
1997
1233
  el.scope = "col";
1998
- el.className = [tableStyles.head, className].filter(Boolean).join(" ");
1999
- for (const node of resolveChildren17(children)) {
1234
+ el.className = [tableStyles.head, effectiveClass].filter(Boolean).join(" ");
1235
+ for (const node of resolveChildren9(children)) {
2000
1236
  el.appendChild(node);
2001
1237
  }
2002
1238
  return el;
2003
1239
  }
2004
- function TableCell({ class: className, children }) {
1240
+ function TableCell({ className, class: classProp, children }) {
1241
+ const effectiveClass = className ?? classProp;
2005
1242
  const el = document.createElement("td");
2006
- el.className = [tableStyles.cell, className].filter(Boolean).join(" ");
2007
- for (const node of resolveChildren17(children)) {
1243
+ el.className = [tableStyles.cell, effectiveClass].filter(Boolean).join(" ");
1244
+ for (const node of resolveChildren9(children)) {
2008
1245
  el.appendChild(node);
2009
1246
  }
2010
1247
  return el;
2011
1248
  }
2012
- function TableCaption({ class: className, children }) {
1249
+ function TableCaption({
1250
+ className,
1251
+ class: classProp,
1252
+ children
1253
+ }) {
1254
+ const effectiveClass = className ?? classProp;
2013
1255
  const el = document.createElement("caption");
2014
- el.className = [tableStyles.caption, className].filter(Boolean).join(" ");
2015
- for (const node of resolveChildren17(children)) {
1256
+ el.className = [tableStyles.caption, effectiveClass].filter(Boolean).join(" ");
1257
+ for (const node of resolveChildren9(children)) {
2016
1258
  el.appendChild(node);
2017
1259
  }
2018
1260
  return el;
2019
1261
  }
2020
- function TableFooter({ class: className, children }) {
1262
+ function TableFooter({
1263
+ className,
1264
+ class: classProp,
1265
+ children
1266
+ }) {
1267
+ const effectiveClass = className ?? classProp;
2021
1268
  const el = document.createElement("tfoot");
2022
- el.className = [tableStyles.footer, className].filter(Boolean).join(" ");
2023
- for (const node of resolveChildren17(children)) {
1269
+ el.className = [tableStyles.footer, effectiveClass].filter(Boolean).join(" ");
1270
+ for (const node of resolveChildren9(children)) {
2024
1271
  el.appendChild(node);
2025
1272
  }
2026
1273
  return el;
@@ -2038,9 +1285,11 @@ function createTableComponents(tableStyles) {
2038
1285
  }
2039
1286
 
2040
1287
  // src/components/textarea.ts
1288
+ import { applyProps as applyProps3 } from "@vertz/ui-primitives/utils";
2041
1289
  function createTextareaComponent(textareaStyles) {
2042
1290
  return function Textarea({
2043
- class: className,
1291
+ className,
1292
+ class: classProp,
2044
1293
  name,
2045
1294
  placeholder,
2046
1295
  disabled,
@@ -2048,8 +1297,9 @@ function createTextareaComponent(textareaStyles) {
2048
1297
  rows,
2049
1298
  ...attrs
2050
1299
  }) {
1300
+ const effectiveClass = className ?? classProp;
2051
1301
  const el = document.createElement("textarea");
2052
- el.className = [textareaStyles.base, className].filter(Boolean).join(" ");
1302
+ el.className = [textareaStyles.base, effectiveClass].filter(Boolean).join(" ");
2053
1303
  if (name !== undefined)
2054
1304
  el.name = name;
2055
1305
  if (placeholder !== undefined)
@@ -2060,11 +1310,7 @@ function createTextareaComponent(textareaStyles) {
2060
1310
  el.value = value;
2061
1311
  if (rows !== undefined)
2062
1312
  el.rows = rows;
2063
- for (const [key, val] of Object.entries(attrs)) {
2064
- if (val !== undefined && val !== null) {
2065
- el.setAttribute(key, String(val));
2066
- }
2067
- }
1313
+ applyProps3(el, attrs);
2068
1314
  return el;
2069
1315
  };
2070
1316
  }
@@ -2092,12 +1338,12 @@ function createAccordionStyles() {
2092
1338
  "font:medium",
2093
1339
  "cursor:pointer",
2094
1340
  {
2095
- "&": [
2096
- { property: "border-radius", value: "0.5rem" },
2097
- { property: "padding-top", value: "0.625rem" },
2098
- { property: "padding-bottom", value: "0.625rem" }
2099
- ],
2100
- "&:hover": [{ property: "text-decoration", value: "underline" }]
1341
+ "&": {
1342
+ "border-radius": "0.5rem",
1343
+ "padding-top": "0.625rem",
1344
+ "padding-bottom": "0.625rem"
1345
+ },
1346
+ "&:hover": { "text-decoration": "underline" }
2101
1347
  }
2102
1348
  ],
2103
1349
  accordionContent: [
@@ -2136,11 +1382,7 @@ function createAlertStyles() {
2136
1382
  ],
2137
1383
  alertDestructive: ["text:destructive", "bg:card"],
2138
1384
  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
- ]
1385
+ alertDescription: ["text:muted-foreground", "text:sm", { "&": { "line-height": "1.625" } }]
2144
1386
  });
2145
1387
  return {
2146
1388
  root: s.alertRoot,
@@ -2156,10 +1398,9 @@ var focusRing = {
2156
1398
  "&:focus-visible": [
2157
1399
  "outline-none",
2158
1400
  {
2159
- property: "outline",
2160
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
1401
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2161
1402
  },
2162
- { property: "outline-offset", value: "2px" }
1403
+ { "outline-offset": "2px" }
2163
1404
  ]
2164
1405
  };
2165
1406
  function createAlertDialogStyles() {
@@ -2169,11 +1410,11 @@ function createAlertDialogStyles() {
2169
1410
  "inset:0",
2170
1411
  "z:50",
2171
1412
  {
2172
- "&": [
2173
- { property: "background-color", value: "oklch(0 0 0 / 10%)" },
2174
- { property: "backdrop-filter", value: "blur(4px)" },
2175
- { property: "-webkit-backdrop-filter", value: "blur(4px)" }
2176
- ]
1413
+ "&": {
1414
+ "background-color": "oklch(0 0 0 / 10%)",
1415
+ "backdrop-filter": "blur(4px)",
1416
+ "-webkit-backdrop-filter": "blur(4px)"
1417
+ }
2177
1418
  },
2178
1419
  {
2179
1420
  '&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
@@ -2188,22 +1429,19 @@ function createAlertDialogStyles() {
2188
1429
  "bg:background",
2189
1430
  "gap:4",
2190
1431
  {
2191
- "&": [
2192
- { property: "display", value: "grid" },
2193
- { property: "width", value: "100%" },
2194
- { property: "max-width", value: "calc(100% - 2rem)" },
2195
- {
2196
- property: "box-shadow",
2197
- value: "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
2198
- },
2199
- { property: "border-radius", value: "0.75rem" },
2200
- { property: "padding", value: "1rem" },
2201
- { property: "inset", value: "0" },
2202
- { property: "margin", value: "auto" },
2203
- { property: "height", value: "fit-content" },
2204
- { property: "container-type", value: "inline-size" }
2205
- ],
2206
- "@media (min-width: 640px)": [{ property: "max-width", value: "24rem" }]
1432
+ "&": {
1433
+ display: "grid",
1434
+ width: "100%",
1435
+ "max-width": "calc(100% - 2rem)",
1436
+ "box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)",
1437
+ "border-radius": "0.75rem",
1438
+ padding: "1rem",
1439
+ inset: "0",
1440
+ margin: "auto",
1441
+ height: "fit-content",
1442
+ "container-type": "inline-size"
1443
+ },
1444
+ "@media (min-width: 640px)": { "max-width": "24rem" }
2207
1445
  },
2208
1446
  {
2209
1447
  '&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
@@ -2214,10 +1452,10 @@ function createAlertDialogStyles() {
2214
1452
  ],
2215
1453
  alertDialogTitle: [
2216
1454
  {
2217
- "&": [
2218
- { property: "font-size", value: "1rem" },
2219
- { property: "font-weight", value: "500" }
2220
- ]
1455
+ "&": {
1456
+ "font-size": "1rem",
1457
+ "font-weight": "500"
1458
+ }
2221
1459
  }
2222
1460
  ],
2223
1461
  alertDialogDescription: ["text:sm", "text:muted-foreground"],
@@ -2225,21 +1463,18 @@ function createAlertDialogStyles() {
2225
1463
  "flex",
2226
1464
  "gap:2",
2227
1465
  {
2228
- "&": [
2229
- { property: "flex-direction", value: "column-reverse" },
2230
- {
2231
- property: "background-color",
2232
- value: "color-mix(in oklch, var(--color-muted) 50%, transparent)"
2233
- },
2234
- { property: "margin", value: "0 -1rem -1rem -1rem" },
2235
- { property: "border-radius", value: "0 0 0.75rem 0.75rem" },
2236
- { property: "border-top", value: "1px solid var(--color-border)" },
2237
- { property: "padding", value: "1rem" }
2238
- ],
2239
- "@container (min-width: 20rem)": [
2240
- { property: "flex-direction", value: "row" },
2241
- { property: "justify-content", value: "flex-end" }
2242
- ]
1466
+ "&": {
1467
+ "flex-direction": "column-reverse",
1468
+ "background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
1469
+ margin: "0 -1rem -1rem -1rem",
1470
+ "border-radius": "0 0 0.75rem 0.75rem",
1471
+ "border-top": "1px solid var(--color-border)",
1472
+ padding: "1rem"
1473
+ },
1474
+ "@container (min-width: 20rem)": {
1475
+ "flex-direction": "row",
1476
+ "justify-content": "flex-end"
1477
+ }
2243
1478
  }
2244
1479
  ],
2245
1480
  alertDialogCancel: [
@@ -2272,7 +1507,7 @@ function createAlertDialogStyles() {
2272
1507
  "font:medium",
2273
1508
  "cursor:pointer",
2274
1509
  "transition:colors",
2275
- { "&:hover": [{ property: "opacity", value: "0.9" }] },
1510
+ { "&:hover": [{ opacity: "0.9" }] },
2276
1511
  focusRing
2277
1512
  ]
2278
1513
  });
@@ -2296,10 +1531,10 @@ function createAvatarStyles() {
2296
1531
  "h:full",
2297
1532
  "w:full",
2298
1533
  {
2299
- "&": [
2300
- { property: "aspect-ratio", value: "1 / 1" },
2301
- { property: "object-fit", value: "cover" }
2302
- ]
1534
+ "&": {
1535
+ "aspect-ratio": "1 / 1",
1536
+ "object-fit": "cover"
1537
+ }
2303
1538
  }
2304
1539
  ],
2305
1540
  avatarFallback: [
@@ -2317,7 +1552,7 @@ function createAvatarStyles() {
2317
1552
  avatarRootSm: ["h:6", "w:6"],
2318
1553
  avatarRootLg: ["h:10", "w:10"],
2319
1554
  avatarRootXl: ["h:12", "w:12"],
2320
- avatarFallbackSm: [{ "&": [{ property: "font-size", value: "0.625rem" }] }],
1555
+ avatarFallbackSm: [{ "&": { "font-size": "0.625rem" } }],
2321
1556
  avatarFallbackLg: ["text:sm"],
2322
1557
  avatarFallbackXl: ["text:base"]
2323
1558
  });
@@ -2368,10 +1603,9 @@ var focusRing2 = {
2368
1603
  "&:focus-visible": [
2369
1604
  "outline-none",
2370
1605
  {
2371
- property: "outline",
2372
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
1606
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2373
1607
  },
2374
- { property: "outline-offset", value: "2px" }
1608
+ { "outline-offset": "2px" }
2375
1609
  ]
2376
1610
  };
2377
1611
  function createCalendarStyles() {
@@ -2392,18 +1626,18 @@ function createCalendarStyles() {
2392
1626
  { "&:hover": ["bg:accent", "text:accent-foreground"] },
2393
1627
  focusRing2,
2394
1628
  {
2395
- "&": [
2396
- { property: "height", value: "1.75rem" },
2397
- { property: "width", value: "1.75rem" }
2398
- ]
1629
+ "&": {
1630
+ height: "1.75rem",
1631
+ width: "1.75rem"
1632
+ }
2399
1633
  }
2400
1634
  ],
2401
1635
  calendarGrid: [
2402
1636
  {
2403
- "&": [
2404
- { property: "width", value: "100%" },
2405
- { property: "border-collapse", value: "collapse" }
2406
- ]
1637
+ "&": {
1638
+ width: "100%",
1639
+ "border-collapse": "collapse"
1640
+ }
2407
1641
  }
2408
1642
  ],
2409
1643
  calendarHeadCell: [
@@ -2411,18 +1645,18 @@ function createCalendarStyles() {
2411
1645
  "text:xs",
2412
1646
  "font:medium",
2413
1647
  {
2414
- "&": [
2415
- { property: "width", value: "2rem" },
2416
- { property: "text-align", value: "center" }
2417
- ]
1648
+ "&": {
1649
+ width: "2rem",
1650
+ "text-align": "center"
1651
+ }
2418
1652
  }
2419
1653
  ],
2420
1654
  calendarCell: [
2421
1655
  {
2422
- "&": [
2423
- { property: "text-align", value: "center" },
2424
- { property: "padding", value: "0" }
2425
- ]
1656
+ "&": {
1657
+ "text-align": "center",
1658
+ padding: "0"
1659
+ }
2426
1660
  }
2427
1661
  ],
2428
1662
  calendarDayButton: [
@@ -2436,10 +1670,10 @@ function createCalendarStyles() {
2436
1670
  "transition:colors",
2437
1671
  focusRing2,
2438
1672
  {
2439
- "&": [
2440
- { property: "height", value: "2rem" },
2441
- { property: "width", value: "2rem" }
2442
- ]
1673
+ "&": {
1674
+ height: "2rem",
1675
+ width: "2rem"
1676
+ }
2443
1677
  },
2444
1678
  { "&:hover": ["bg:accent", "text:accent-foreground"] },
2445
1679
  { '&[aria-selected="true"]': ["bg:primary", "text:primary-foreground"] },
@@ -2475,23 +1709,20 @@ function createCard() {
2475
1709
  "py:4",
2476
1710
  "text:sm",
2477
1711
  {
2478
- "&": [
2479
- { property: "border-radius", value: "0.75rem" },
2480
- {
2481
- property: "box-shadow",
2482
- value: "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
2483
- }
2484
- ]
1712
+ "&": {
1713
+ "border-radius": "0.75rem",
1714
+ "box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
1715
+ }
2485
1716
  }
2486
1717
  ],
2487
1718
  cardHeader: ["flex", "flex-col", "gap:1", "px:4"],
2488
1719
  cardTitle: [
2489
1720
  "font:medium",
2490
1721
  {
2491
- "&": [
2492
- { property: "font-size", value: "1rem" },
2493
- { property: "line-height", value: "1.375" }
2494
- ]
1722
+ "&": {
1723
+ "font-size": "1rem",
1724
+ "line-height": "1.375"
1725
+ }
2495
1726
  }
2496
1727
  ],
2497
1728
  cardDescription: ["text:sm", "text:muted-foreground"],
@@ -2504,14 +1735,11 @@ function createCard() {
2504
1735
  "border-t:1",
2505
1736
  "border:border",
2506
1737
  {
2507
- "&": [
2508
- {
2509
- property: "background-color",
2510
- value: "color-mix(in oklch, var(--color-muted) 50%, transparent)"
2511
- },
2512
- { property: "border-radius", value: "0 0 0.75rem 0.75rem" },
2513
- { property: "margin-bottom", value: "-1rem" }
2514
- ]
1738
+ "&": {
1739
+ "background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
1740
+ "border-radius": "0 0 0.75rem 0.75rem",
1741
+ "margin-bottom": "-1rem"
1742
+ }
2515
1743
  }
2516
1744
  ],
2517
1745
  cardAction: ["ml:auto"]
@@ -2536,11 +1764,11 @@ function createCarouselStyles() {
2536
1764
  carouselSlide: [
2537
1765
  "shrink-0",
2538
1766
  {
2539
- "&": [
2540
- { property: "min-width", value: "0" },
2541
- { property: "flex-grow", value: "0" },
2542
- { property: "flex-basis", value: "100%" }
2543
- ]
1767
+ "&": {
1768
+ "min-width": "0",
1769
+ "flex-grow": "0",
1770
+ "flex-basis": "100%"
1771
+ }
2544
1772
  },
2545
1773
  { '&[data-state="inactive"]': ["opacity:0"] },
2546
1774
  { '&[data-state="active"]': ["opacity:1"] }
@@ -2558,11 +1786,11 @@ function createCarouselStyles() {
2558
1786
  "justify:center",
2559
1787
  "cursor:pointer",
2560
1788
  {
2561
- "&": [
2562
- { property: "left", value: "0.5rem" },
2563
- { property: "top", value: "50%" },
2564
- { property: "transform", value: "translateY(-50%)" }
2565
- ]
1789
+ "&": {
1790
+ left: "0.5rem",
1791
+ top: "50%",
1792
+ transform: "translateY(-50%)"
1793
+ }
2566
1794
  },
2567
1795
  { "&:hover": ["bg:accent", "text:accent-foreground"] },
2568
1796
  { "&:disabled": ["pointer-events-none", "opacity:0.5"] }
@@ -2580,11 +1808,11 @@ function createCarouselStyles() {
2580
1808
  "justify:center",
2581
1809
  "cursor:pointer",
2582
1810
  {
2583
- "&": [
2584
- { property: "right", value: "0.5rem" },
2585
- { property: "top", value: "50%" },
2586
- { property: "transform", value: "translateY(-50%)" }
2587
- ]
1811
+ "&": {
1812
+ right: "0.5rem",
1813
+ top: "50%",
1814
+ transform: "translateY(-50%)"
1815
+ }
2588
1816
  },
2589
1817
  { "&:hover": ["bg:accent", "text:accent-foreground"] },
2590
1818
  { "&:disabled": ["pointer-events-none", "opacity:0.5"] }
@@ -2606,8 +1834,7 @@ var focusRing3 = {
2606
1834
  "outline-none",
2607
1835
  "border:ring",
2608
1836
  {
2609
- property: "box-shadow",
2610
- value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
1837
+ "box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
2611
1838
  }
2612
1839
  ]
2613
1840
  };
@@ -2624,9 +1851,7 @@ function createCheckboxStyles() {
2624
1851
  "border:input",
2625
1852
  "cursor:pointer",
2626
1853
  "transition:colors",
2627
- { "&": [{ property: "padding", value: "0" }] },
2628
- { "&": [{ property: "background", value: "transparent" }] },
2629
- { "&": [{ property: "border-radius", value: "4px" }] },
1854
+ { "&": { padding: "0", background: "transparent", "border-radius": "4px" } },
2630
1855
  { [DARK]: [bgOpacity("input", 30)] },
2631
1856
  focusRing3,
2632
1857
  { "&:disabled": ["pointer-events-none", "opacity:0.5"] },
@@ -2678,10 +1903,9 @@ var focusRing4 = {
2678
1903
  "&:focus-visible": [
2679
1904
  "outline-none",
2680
1905
  {
2681
- property: "outline",
2682
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
1906
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2683
1907
  },
2684
- { property: "outline-offset", value: "2px" }
1908
+ { "outline-offset": "2px" }
2685
1909
  ]
2686
1910
  };
2687
1911
  function createCommandStyles() {
@@ -2707,21 +1931,21 @@ function createCommandStyles() {
2707
1931
  "outline-none",
2708
1932
  { "&::placeholder": ["text:muted-foreground"] },
2709
1933
  {
2710
- "&": [
2711
- { property: "height", value: "2.5rem" },
2712
- { property: "border-bottom", value: "1px solid var(--color-border)" }
2713
- ]
1934
+ "&": {
1935
+ height: "2.5rem",
1936
+ "border-bottom": "1px solid var(--color-border)"
1937
+ }
2714
1938
  },
2715
1939
  focusRing4
2716
1940
  ],
2717
1941
  commandList: [
2718
1942
  "p:1",
2719
1943
  {
2720
- "&": [
2721
- { property: "max-height", value: "300px" },
2722
- { property: "overflow-y", value: "auto" },
2723
- { property: "overflow-x", value: "hidden" }
2724
- ]
1944
+ "&": {
1945
+ "max-height": "300px",
1946
+ "overflow-y": "auto",
1947
+ "overflow-x": "hidden"
1948
+ }
2725
1949
  }
2726
1950
  ],
2727
1951
  commandItem: [
@@ -2732,10 +1956,10 @@ function createCommandStyles() {
2732
1956
  "text:sm",
2733
1957
  "cursor:pointer",
2734
1958
  {
2735
- "&": [
2736
- { property: "padding-top", value: "0.375rem" },
2737
- { property: "padding-bottom", value: "0.375rem" }
2738
- ]
1959
+ "&": {
1960
+ "padding-top": "0.375rem",
1961
+ "padding-bottom": "0.375rem"
1962
+ }
2739
1963
  },
2740
1964
  { '&[aria-selected="true"]': ["bg:accent", "text:accent-foreground"] }
2741
1965
  ],
@@ -2746,21 +1970,21 @@ function createCommandStyles() {
2746
1970
  "font:medium",
2747
1971
  "text:muted-foreground",
2748
1972
  {
2749
- "&": [
2750
- { property: "padding-top", value: "0.375rem" },
2751
- { property: "padding-bottom", value: "0.375rem" }
2752
- ]
1973
+ "&": {
1974
+ "padding-top": "0.375rem",
1975
+ "padding-bottom": "0.375rem"
1976
+ }
2753
1977
  }
2754
1978
  ],
2755
1979
  commandSeparator: [
2756
1980
  {
2757
- "&": [
2758
- { property: "margin-left", value: "-0.25rem" },
2759
- { property: "margin-right", value: "-0.25rem" },
2760
- { property: "height", value: "1px" },
2761
- { property: "background-color", value: "var(--color-border)" },
2762
- { property: "border", value: "none" }
2763
- ]
1981
+ "&": {
1982
+ "margin-left": "-0.25rem",
1983
+ "margin-right": "-0.25rem",
1984
+ height: "1px",
1985
+ "background-color": "var(--color-border)",
1986
+ border: "none"
1987
+ }
2764
1988
  }
2765
1989
  ],
2766
1990
  commandEmpty: ["py:6", "text:center", "text:sm", "text:muted-foreground"]
@@ -2813,13 +2037,7 @@ function createContextMenuStyles() {
2813
2037
  ],
2814
2038
  cmGroup: ["py:1"],
2815
2039
  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
- ]
2040
+ cmSeparator: ["mx:1", "my:1", "border-t:1", "border:muted", { "&": { height: "1px" } }]
2823
2041
  });
2824
2042
  return {
2825
2043
  content: s.cmContent,
@@ -2836,10 +2054,9 @@ var focusRing5 = {
2836
2054
  "&:focus-visible": [
2837
2055
  "outline-none",
2838
2056
  {
2839
- property: "outline",
2840
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2057
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2841
2058
  },
2842
- { property: "outline-offset", value: "2px" }
2059
+ { "outline-offset": "2px" }
2843
2060
  ]
2844
2061
  };
2845
2062
  function createDatePickerStyles() {
@@ -2858,11 +2075,11 @@ function createDatePickerStyles() {
2858
2075
  "transition:colors",
2859
2076
  focusRing5,
2860
2077
  {
2861
- "&": [
2862
- { property: "height", value: "2.5rem" },
2863
- { property: "width", value: "100%" },
2864
- { property: "padding", value: "0.5rem 0.75rem" }
2865
- ]
2078
+ "&": {
2079
+ height: "2.5rem",
2080
+ width: "100%",
2081
+ padding: "0.5rem 0.75rem"
2082
+ }
2866
2083
  },
2867
2084
  { "&:hover": ["bg:accent", "text:accent-foreground"] },
2868
2085
  { '&[data-placeholder="true"]': ["text:muted-foreground"] }
@@ -2874,7 +2091,7 @@ function createDatePickerStyles() {
2874
2091
  "border:1",
2875
2092
  "border:border",
2876
2093
  "shadow:md",
2877
- { "&": [{ property: "padding", value: "0" }] }
2094
+ { "&": { padding: "0" } }
2878
2095
  ]
2879
2096
  });
2880
2097
  return {
@@ -2889,10 +2106,9 @@ var focusRing6 = {
2889
2106
  "&:focus-visible": [
2890
2107
  "outline-none",
2891
2108
  {
2892
- property: "outline",
2893
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2109
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2894
2110
  },
2895
- { property: "outline-offset", value: "2px" }
2111
+ { "outline-offset": "2px" }
2896
2112
  ]
2897
2113
  };
2898
2114
  function createDialogStyles() {
@@ -2902,11 +2118,11 @@ function createDialogStyles() {
2902
2118
  "inset:0",
2903
2119
  "z:50",
2904
2120
  {
2905
- "&": [
2906
- { property: "background-color", value: "oklch(0 0 0 / 10%)" },
2907
- { property: "backdrop-filter", value: "blur(4px)" },
2908
- { property: "-webkit-backdrop-filter", value: "blur(4px)" }
2909
- ]
2121
+ "&": {
2122
+ "background-color": "oklch(0 0 0 / 10%)",
2123
+ "backdrop-filter": "blur(4px)",
2124
+ "-webkit-backdrop-filter": "blur(4px)"
2125
+ }
2910
2126
  },
2911
2127
  {
2912
2128
  '&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
@@ -2921,24 +2137,21 @@ function createDialogStyles() {
2921
2137
  "bg:background",
2922
2138
  "gap:4",
2923
2139
  {
2924
- "&": [
2925
- { property: "display", value: "grid" },
2926
- { property: "width", value: "100%" },
2927
- { property: "max-width", value: "calc(100% - 2rem)" },
2928
- {
2929
- property: "box-shadow",
2930
- value: "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)"
2931
- },
2932
- { property: "border-radius", value: "0.75rem" },
2933
- { property: "padding", value: "1rem" },
2934
- { property: "font-size", value: "0.875rem" },
2935
- { property: "inset", value: "0" },
2936
- { property: "margin", value: "auto" },
2937
- { property: "height", value: "fit-content" },
2938
- { property: "outline", value: "none" },
2939
- { property: "container-type", value: "inline-size" }
2940
- ],
2941
- "@media (min-width: 640px)": [{ property: "max-width", value: "24rem" }]
2140
+ "&": {
2141
+ display: "grid",
2142
+ width: "100%",
2143
+ "max-width": "calc(100% - 2rem)",
2144
+ "box-shadow": "0 0 0 1px color-mix(in oklch, var(--color-foreground) 10%, transparent)",
2145
+ "border-radius": "0.75rem",
2146
+ padding: "1rem",
2147
+ "font-size": "0.875rem",
2148
+ inset: "0",
2149
+ margin: "auto",
2150
+ height: "fit-content",
2151
+ outline: "none",
2152
+ "container-type": "inline-size"
2153
+ },
2154
+ "@media (min-width: 640px)": { "max-width": "24rem" }
2942
2155
  },
2943
2156
  {
2944
2157
  '&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
@@ -2952,16 +2165,16 @@ function createDialogStyles() {
2952
2165
  "flex-col",
2953
2166
  "gap:2",
2954
2167
  {
2955
- "@media (min-width: 640px)": [{ property: "text-align", value: "left" }]
2168
+ "@media (min-width: 640px)": { "text-align": "left" }
2956
2169
  }
2957
2170
  ],
2958
2171
  dialogTitle: [
2959
2172
  {
2960
- "&": [
2961
- { property: "font-size", value: "1rem" },
2962
- { property: "line-height", value: "1" },
2963
- { property: "font-weight", value: "500" }
2964
- ]
2173
+ "&": {
2174
+ "font-size": "1rem",
2175
+ "line-height": "1",
2176
+ "font-weight": "500"
2177
+ }
2965
2178
  }
2966
2179
  ],
2967
2180
  dialogDescription: ["text:sm", "text:muted-foreground"],
@@ -2970,23 +2183,23 @@ function createDialogStyles() {
2970
2183
  "rounded:xs",
2971
2184
  "cursor:pointer",
2972
2185
  {
2973
- "&": [
2974
- { property: "top", value: "0.5rem" },
2975
- { property: "right", value: "0.5rem" },
2976
- { property: "opacity", value: "0.7" },
2977
- { property: "transition", value: "opacity 150ms" },
2978
- { property: "display", value: "inline-flex" },
2979
- { property: "align-items", value: "center" },
2980
- { property: "justify-content", value: "center" },
2981
- { property: "width", value: "1rem" },
2982
- { property: "height", value: "1rem" },
2983
- { property: "background", value: "none" },
2984
- { property: "border", value: "none" },
2985
- { property: "color", value: "currentColor" },
2986
- { property: "padding", value: "0" }
2987
- ],
2988
- "&:hover": [{ property: "opacity", value: "1" }],
2989
- "&:disabled": [{ property: "pointer-events", value: "none" }]
2186
+ "&": {
2187
+ top: "0.5rem",
2188
+ right: "0.5rem",
2189
+ opacity: "0.7",
2190
+ transition: "opacity 150ms",
2191
+ display: "inline-flex",
2192
+ "align-items": "center",
2193
+ "justify-content": "center",
2194
+ width: "1rem",
2195
+ height: "1rem",
2196
+ background: "none",
2197
+ border: "none",
2198
+ color: "currentColor",
2199
+ padding: "0"
2200
+ },
2201
+ "&:hover": { opacity: "1" },
2202
+ "&:disabled": { "pointer-events": "none" }
2990
2203
  },
2991
2204
  focusRing6
2992
2205
  ],
@@ -2994,21 +2207,18 @@ function createDialogStyles() {
2994
2207
  "flex",
2995
2208
  "gap:2",
2996
2209
  {
2997
- "&": [
2998
- { property: "flex-direction", value: "column-reverse" },
2999
- {
3000
- property: "background-color",
3001
- value: "color-mix(in oklch, var(--color-muted) 50%, transparent)"
3002
- },
3003
- { property: "margin", value: "0 -1rem -1rem -1rem" },
3004
- { property: "border-radius", value: "0 0 0.75rem 0.75rem" },
3005
- { property: "border-top", value: "1px solid var(--color-border)" },
3006
- { property: "padding", value: "1rem" }
3007
- ],
3008
- "@container (min-width: 20rem)": [
3009
- { property: "flex-direction", value: "row" },
3010
- { property: "justify-content", value: "flex-end" }
3011
- ]
2210
+ "&": {
2211
+ "flex-direction": "column-reverse",
2212
+ "background-color": "color-mix(in oklch, var(--color-muted) 50%, transparent)",
2213
+ margin: "0 -1rem -1rem -1rem",
2214
+ "border-radius": "0 0 0.75rem 0.75rem",
2215
+ "border-top": "1px solid var(--color-border)",
2216
+ padding: "1rem"
2217
+ },
2218
+ "@container (min-width: 20rem)": {
2219
+ "flex-direction": "row",
2220
+ "justify-content": "flex-end"
2221
+ }
3012
2222
  }
3013
2223
  ]
3014
2224
  });
@@ -3029,10 +2239,9 @@ var focusRing7 = {
3029
2239
  "&:focus-visible": [
3030
2240
  "outline-none",
3031
2241
  {
3032
- property: "outline",
3033
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2242
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3034
2243
  },
3035
- { property: "outline-offset", value: "2px" }
2244
+ { "outline-offset": "2px" }
3036
2245
  ]
3037
2246
  };
3038
2247
  var PANEL_BASE = [
@@ -3052,7 +2261,7 @@ function createDrawerStyles() {
3052
2261
  "inset:0",
3053
2262
  "z:50",
3054
2263
  {
3055
- "&": [{ property: "background-color", value: "oklch(0 0 0 / 50%)" }]
2264
+ "&": { "background-color": "oklch(0 0 0 / 50%)" }
3056
2265
  },
3057
2266
  {
3058
2267
  '&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
@@ -3065,12 +2274,12 @@ function createDrawerStyles() {
3065
2274
  ...PANEL_BASE,
3066
2275
  "border-r:1",
3067
2276
  {
3068
- "&": [
3069
- { property: "inset", value: "0 auto 0 0" },
3070
- { property: "width", value: "75%" },
3071
- { property: "max-width", value: "24rem" },
3072
- { property: "border-radius", value: "0 0.75rem 0.75rem 0" }
3073
- ]
2277
+ "&": {
2278
+ inset: "0 auto 0 0",
2279
+ width: "75%",
2280
+ "max-width": "24rem",
2281
+ "border-radius": "0 0.75rem 0.75rem 0"
2282
+ }
3074
2283
  },
3075
2284
  {
3076
2285
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-left 300ms ease-out forwards")]
@@ -3083,12 +2292,12 @@ function createDrawerStyles() {
3083
2292
  ...PANEL_BASE,
3084
2293
  "border-l:1",
3085
2294
  {
3086
- "&": [
3087
- { property: "inset", value: "0 0 0 auto" },
3088
- { property: "width", value: "75%" },
3089
- { property: "max-width", value: "24rem" },
3090
- { property: "border-radius", value: "0.75rem 0 0 0.75rem" }
3091
- ]
2295
+ "&": {
2296
+ inset: "0 0 0 auto",
2297
+ width: "75%",
2298
+ "max-width": "24rem",
2299
+ "border-radius": "0.75rem 0 0 0.75rem"
2300
+ }
3092
2301
  },
3093
2302
  {
3094
2303
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-right 300ms ease-out forwards")]
@@ -3101,10 +2310,10 @@ function createDrawerStyles() {
3101
2310
  ...PANEL_BASE,
3102
2311
  "border-b:1",
3103
2312
  {
3104
- "&": [
3105
- { property: "inset", value: "0 0 auto 0" },
3106
- { property: "border-radius", value: "0 0 0.75rem 0.75rem" }
3107
- ]
2313
+ "&": {
2314
+ inset: "0 0 auto 0",
2315
+ "border-radius": "0 0 0.75rem 0.75rem"
2316
+ }
3108
2317
  },
3109
2318
  {
3110
2319
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-top 300ms ease-out forwards")]
@@ -3117,10 +2326,10 @@ function createDrawerStyles() {
3117
2326
  ...PANEL_BASE,
3118
2327
  "border-t:1",
3119
2328
  {
3120
- "&": [
3121
- { property: "inset", value: "auto 0 0 0" },
3122
- { property: "border-radius", value: "0.75rem 0.75rem 0 0" }
3123
- ]
2329
+ "&": {
2330
+ inset: "auto 0 0 0",
2331
+ "border-radius": "0.75rem 0.75rem 0 0"
2332
+ }
3124
2333
  },
3125
2334
  {
3126
2335
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 300ms ease-out forwards")]
@@ -3129,19 +2338,33 @@ function createDrawerStyles() {
3129
2338
  '&[data-state="closed"]': [animationDecl("vz-slide-out-to-bottom 300ms ease-out forwards")]
3130
2339
  }
3131
2340
  ],
2341
+ drawerHeader: ["flex", "flex-col", "gap:1.5"],
3132
2342
  drawerTitle: ["text:lg", "font:semibold", "leading:none", "tracking:tight"],
3133
2343
  drawerDescription: ["text:sm", "text:muted-foreground"],
2344
+ drawerFooter: [
2345
+ "flex",
2346
+ "gap:2",
2347
+ {
2348
+ "&": {
2349
+ "flex-direction": "column-reverse"
2350
+ },
2351
+ "@media (min-width: 640px)": {
2352
+ "flex-direction": "row",
2353
+ "justify-content": "flex-end"
2354
+ }
2355
+ }
2356
+ ],
3134
2357
  drawerHandle: [
3135
2358
  {
3136
- "&": [
3137
- { property: "margin-left", value: "auto" },
3138
- { property: "margin-right", value: "auto" },
3139
- { property: "margin-top", value: "1rem" },
3140
- { property: "height", value: "0.5rem" },
3141
- { property: "width", value: "100px" },
3142
- { property: "border-radius", value: "9999px" },
3143
- { property: "background-color", value: "var(--color-muted)" }
3144
- ]
2359
+ "&": {
2360
+ "margin-left": "auto",
2361
+ "margin-right": "auto",
2362
+ "margin-top": "1rem",
2363
+ height: "0.5rem",
2364
+ width: "100px",
2365
+ "border-radius": "9999px",
2366
+ "background-color": "var(--color-muted)"
2367
+ }
3145
2368
  }
3146
2369
  ],
3147
2370
  drawerClose: [
@@ -3160,8 +2383,10 @@ function createDrawerStyles() {
3160
2383
  panelRight: s.drawerPanelRight,
3161
2384
  panelTop: s.drawerPanelTop,
3162
2385
  panelBottom: s.drawerPanelBottom,
2386
+ header: s.drawerHeader,
3163
2387
  title: s.drawerTitle,
3164
2388
  description: s.drawerDescription,
2389
+ footer: s.drawerFooter,
3165
2390
  handle: s.drawerHandle,
3166
2391
  close: s.drawerClose,
3167
2392
  css: s.css
@@ -3179,13 +2404,10 @@ function createDropdownMenuStyles() {
3179
2404
  "rounded:lg",
3180
2405
  "p:1",
3181
2406
  {
3182
- "&": [
3183
- {
3184
- property: "box-shadow",
3185
- 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)"
3186
- },
3187
- { property: "min-width", value: "8rem" }
3188
- ]
2407
+ "&": {
2408
+ "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)",
2409
+ "min-width": "8rem"
2410
+ }
3189
2411
  },
3190
2412
  {
3191
2413
  '&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
@@ -3214,11 +2436,11 @@ function createDropdownMenuStyles() {
3214
2436
  "my:1",
3215
2437
  "bg:border",
3216
2438
  {
3217
- "&": [
3218
- { property: "margin-left", value: "-0.25rem" },
3219
- { property: "margin-right", value: "-0.25rem" },
3220
- { property: "height", value: "1px" }
3221
- ]
2439
+ "&": {
2440
+ "margin-left": "-0.25rem",
2441
+ "margin-right": "-0.25rem",
2442
+ height: "1px"
2443
+ }
3222
2444
  }
3223
2445
  ]
3224
2446
  });
@@ -3258,7 +2480,7 @@ function createHoverCardStyles() {
3258
2480
  "shadow:md",
3259
2481
  "p:4",
3260
2482
  {
3261
- "&": [{ property: "width", value: "16rem" }]
2483
+ "&": { width: "16rem" }
3262
2484
  },
3263
2485
  {
3264
2486
  '&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
@@ -3281,10 +2503,9 @@ function createInput() {
3281
2503
  "outline-none",
3282
2504
  "border:ring",
3283
2505
  {
3284
- property: "outline",
3285
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2506
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3286
2507
  },
3287
- { property: "outline-offset", value: "2px" }
2508
+ { "outline-offset": "2px" }
3288
2509
  ]
3289
2510
  };
3290
2511
  const s = css19({
@@ -3297,11 +2518,11 @@ function createInput() {
3297
2518
  "bg:transparent",
3298
2519
  "py:1",
3299
2520
  {
3300
- "&": [
3301
- { property: "height", value: "2rem" },
3302
- { property: "padding-left", value: "0.625rem" },
3303
- { property: "padding-right", value: "0.625rem" }
3304
- ]
2521
+ "&": {
2522
+ height: "2rem",
2523
+ "padding-left": "0.625rem",
2524
+ "padding-right": "0.625rem"
2525
+ }
3305
2526
  },
3306
2527
  "text:sm",
3307
2528
  "text:foreground",
@@ -3359,7 +2580,7 @@ function createMenubarStyles() {
3359
2580
  "border:border",
3360
2581
  "bg:background",
3361
2582
  "p:1",
3362
- { "&": [{ property: "column-gap", value: "0.25rem" }] }
2583
+ { "&": { "column-gap": "0.25rem" } }
3363
2584
  ],
3364
2585
  mbTrigger: [
3365
2586
  "flex",
@@ -3407,13 +2628,7 @@ function createMenubarStyles() {
3407
2628
  { "&:focus": ["bg:accent", "text:accent-foreground"] },
3408
2629
  { "&[data-disabled]": ["pointer-events-none", "opacity:0.5"] }
3409
2630
  ],
3410
- mbSeparator: [
3411
- "mx:1",
3412
- "my:1",
3413
- "border-t:1",
3414
- "border:muted",
3415
- { "&": [{ property: "height", value: "1px" }] }
3416
- ],
2631
+ mbSeparator: ["mx:1", "my:1", "border-t:1", "border:muted", { "&": { height: "1px" } }],
3417
2632
  mbLabel: ["px:2", "py:1.5", "text:xs", "font:semibold", "text:muted-foreground"]
3418
2633
  });
3419
2634
  return {
@@ -3457,10 +2672,10 @@ function createNavigationMenuStyles() {
3457
2672
  "shadow:lg",
3458
2673
  "text:popover-foreground",
3459
2674
  {
3460
- "&": [
3461
- { property: "left", value: "0" },
3462
- { property: "top", value: "100%" }
3463
- ]
2675
+ "&": {
2676
+ left: "0",
2677
+ top: "100%"
2678
+ }
3464
2679
  },
3465
2680
  {
3466
2681
  '&[data-state="open"]': [animationDecl("vz-fade-in 150ms ease-out forwards")]
@@ -3476,7 +2691,7 @@ function createNavigationMenuStyles() {
3476
2691
  "text:sm",
3477
2692
  "leading:none",
3478
2693
  {
3479
- "&": [{ property: "text-decoration-line", value: "none" }]
2694
+ "&": { "text-decoration-line": "none" }
3480
2695
  },
3481
2696
  { "&:hover": ["bg:accent", "text:accent-foreground"] }
3482
2697
  ],
@@ -3484,10 +2699,10 @@ function createNavigationMenuStyles() {
3484
2699
  "absolute",
3485
2700
  "w:full",
3486
2701
  {
3487
- "&": [
3488
- { property: "left", value: "0" },
3489
- { property: "top", value: "100%" }
3490
- ]
2702
+ "&": {
2703
+ left: "0",
2704
+ top: "100%"
2705
+ }
3491
2706
  }
3492
2707
  ]
3493
2708
  });
@@ -3507,10 +2722,9 @@ var focusRing8 = {
3507
2722
  "&:focus-visible": [
3508
2723
  "outline-none",
3509
2724
  {
3510
- property: "outline",
3511
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2725
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3512
2726
  },
3513
- { property: "outline-offset", value: "2px" }
2727
+ { "outline-offset": "2px" }
3514
2728
  ]
3515
2729
  };
3516
2730
  function createPaginationStyles() {
@@ -3579,12 +2793,9 @@ function createPopoverStyles() {
3579
2793
  "p:2.5",
3580
2794
  "text:sm",
3581
2795
  {
3582
- "&": [
3583
- {
3584
- property: "box-shadow",
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
- ]
2796
+ "&": {
2797
+ "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)"
2798
+ }
3588
2799
  },
3589
2800
  {
3590
2801
  '&[data-state="open"]': [animationDecl("vz-zoom-in 100ms ease-out forwards")]
@@ -3609,14 +2820,9 @@ function createProgressStyles() {
3609
2820
  "overflow-hidden",
3610
2821
  "rounded:full",
3611
2822
  "bg:muted",
3612
- { "&": [{ property: "height", value: "0.25rem" }] }
2823
+ { "&": { height: "0.25rem" } }
3613
2824
  ],
3614
- progressIndicator: [
3615
- "h:full",
3616
- "w:full",
3617
- "bg:primary",
3618
- { "&": [{ property: "transition", value: "all 150ms" }] }
3619
- ]
2825
+ progressIndicator: ["h:full", "w:full", "bg:primary", { "&": { transition: "all 150ms" } }]
3620
2826
  });
3621
2827
  return {
3622
2828
  root: s.progressRoot,
@@ -3631,8 +2837,7 @@ var focusRing9 = {
3631
2837
  "outline-none",
3632
2838
  "border:ring",
3633
2839
  {
3634
- property: "box-shadow",
3635
- value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
2840
+ "box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
3636
2841
  }
3637
2842
  ]
3638
2843
  };
@@ -3652,11 +2857,11 @@ function createRadioGroupStyles() {
3652
2857
  "cursor:pointer",
3653
2858
  "transition:colors",
3654
2859
  {
3655
- "&": [
3656
- { property: "aspect-ratio", value: "1 / 1" },
3657
- { property: "padding", value: "0" },
3658
- { property: "background", value: "transparent" }
3659
- ]
2860
+ "&": {
2861
+ "aspect-ratio": "1 / 1",
2862
+ padding: "0",
2863
+ background: "transparent"
2864
+ }
3660
2865
  },
3661
2866
  { [DARK]: [bgOpacity("input", 30)] },
3662
2867
  focusRing9,
@@ -3675,7 +2880,7 @@ function createRadioGroupStyles() {
3675
2880
  "items:center",
3676
2881
  "justify:center",
3677
2882
  {
3678
- '&[data-state="unchecked"]': [{ property: "display", value: "none" }]
2883
+ '&[data-state="unchecked"]': [{ display: "none" }]
3679
2884
  }
3680
2885
  ],
3681
2886
  radioGroupIndicatorIcon: [
@@ -3684,12 +2889,12 @@ function createRadioGroupStyles() {
3684
2889
  "w:2",
3685
2890
  "bg:primary-foreground",
3686
2891
  {
3687
- "&": [
3688
- { property: "position", value: "absolute" },
3689
- { property: "top", value: "50%" },
3690
- { property: "left", value: "50%" },
3691
- { property: "transform", value: "translate(-50%, -50%)" }
3692
- ]
2892
+ "&": {
2893
+ position: "absolute",
2894
+ top: "50%",
2895
+ left: "50%",
2896
+ transform: "translate(-50%, -50%)"
2897
+ }
3693
2898
  }
3694
2899
  ]
3695
2900
  });
@@ -3707,10 +2912,9 @@ var focusRing10 = {
3707
2912
  "&:focus-visible": [
3708
2913
  "outline-none",
3709
2914
  {
3710
- property: "outline",
3711
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
2915
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3712
2916
  },
3713
- { property: "outline-offset", value: "2px" }
2917
+ { "outline-offset": "2px" }
3714
2918
  ]
3715
2919
  };
3716
2920
  function createResizablePanelStyles() {
@@ -3728,22 +2932,16 @@ function createResizablePanelStyles() {
3728
2932
  "&:hover": ["bg:muted-foreground"]
3729
2933
  },
3730
2934
  {
3731
- '&[data-orientation="horizontal"]': [
3732
- { property: "width", value: "1px" },
3733
- {
3734
- property: "cursor",
3735
- value: "col-resize"
3736
- }
3737
- ]
2935
+ '&[data-orientation="horizontal"]': {
2936
+ width: "1px",
2937
+ cursor: "col-resize"
2938
+ }
3738
2939
  },
3739
2940
  {
3740
- '&[data-orientation="vertical"]': [
3741
- { property: "height", value: "1px" },
3742
- {
3743
- property: "cursor",
3744
- value: "row-resize"
3745
- }
3746
- ]
2941
+ '&[data-orientation="vertical"]': {
2942
+ height: "1px",
2943
+ cursor: "row-resize"
2944
+ }
3747
2945
  },
3748
2946
  {
3749
2947
  '&[data-state="dragging"]': ["bg:primary"]
@@ -3762,21 +2960,17 @@ import { css as css28 } from "@vertz/ui";
3762
2960
  function createScrollAreaStyles() {
3763
2961
  const s = css28({
3764
2962
  scrollAreaRoot: ["relative", "overflow-hidden"],
3765
- scrollAreaViewport: [
3766
- "h:full",
3767
- "w:full",
3768
- { "&": [{ property: "border-radius", value: "inherit" }] }
3769
- ],
2963
+ scrollAreaViewport: ["h:full", "w:full", { "&": { "border-radius": "inherit" } }],
3770
2964
  scrollAreaScrollbar: [
3771
2965
  "flex",
3772
2966
  {
3773
- "&": [
3774
- { property: "touch-action", value: "none" },
3775
- { property: "user-select", value: "none" }
3776
- ]
2967
+ "&": {
2968
+ "touch-action": "none",
2969
+ "user-select": "none",
2970
+ padding: "1px"
2971
+ }
3777
2972
  },
3778
2973
  "transition:colors",
3779
- { "&": [{ property: "padding", value: "1px" }] },
3780
2974
  {
3781
2975
  '&[data-orientation="vertical"]': ["h:full", "w:2.5", "border-l:1", "border:transparent"]
3782
2976
  },
@@ -3805,10 +2999,9 @@ var focusRing11 = {
3805
2999
  "&:focus-visible": [
3806
3000
  "outline-none",
3807
3001
  {
3808
- property: "outline",
3809
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3002
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3810
3003
  },
3811
- { property: "outline-offset", value: "2px" }
3004
+ { "outline-offset": "2px" }
3812
3005
  ]
3813
3006
  };
3814
3007
  function createSelectStyles() {
@@ -3827,13 +3020,13 @@ function createSelectStyles() {
3827
3020
  "text:sm",
3828
3021
  "cursor:pointer",
3829
3022
  {
3830
- "&": [
3831
- { property: "height", value: "2rem" },
3832
- { property: "padding-top", value: "0.5rem" },
3833
- { property: "padding-bottom", value: "0.5rem" },
3834
- { property: "padding-right", value: "0.5rem" },
3835
- { property: "padding-left", value: "0.625rem" }
3836
- ]
3023
+ "&": {
3024
+ height: "2rem",
3025
+ "padding-top": "0.5rem",
3026
+ "padding-bottom": "0.5rem",
3027
+ "padding-right": "0.5rem",
3028
+ "padding-left": "0.625rem"
3029
+ }
3837
3030
  },
3838
3031
  focusRing11,
3839
3032
  { "&:disabled": ["pointer-events-none", "opacity:0.5"] },
@@ -3848,13 +3041,10 @@ function createSelectStyles() {
3848
3041
  "rounded:lg",
3849
3042
  "p:1",
3850
3043
  {
3851
- "&": [
3852
- {
3853
- property: "box-shadow",
3854
- 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)"
3855
- },
3856
- { property: "min-width", value: "9rem" }
3857
- ]
3044
+ "&": {
3045
+ "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)",
3046
+ "min-width": "9rem"
3047
+ }
3858
3048
  },
3859
3049
  {
3860
3050
  '&[data-state="open"][data-side="bottom"]': [
@@ -3886,10 +3076,10 @@ function createSelectStyles() {
3886
3076
  "outline-none",
3887
3077
  "relative",
3888
3078
  {
3889
- "&": [
3890
- { property: "padding-right", value: "2rem" },
3891
- { property: "padding-left", value: "0.5rem" }
3892
- ]
3079
+ "&": {
3080
+ "padding-right": "2rem",
3081
+ "padding-left": "0.5rem"
3082
+ }
3893
3083
  },
3894
3084
  { '&:hover:not([aria-selected="true"])': ["bg:accent", "text:accent-foreground"] },
3895
3085
  { '&:focus:not([aria-selected="true"])': ["bg:accent", "text:accent-foreground"] },
@@ -3901,15 +3091,15 @@ function createSelectStyles() {
3901
3091
  "items:center",
3902
3092
  "justify:center",
3903
3093
  {
3904
- "&": [
3905
- { property: "right", value: "0.5rem" },
3906
- { property: "width", value: "0.875rem" },
3907
- { property: "height", value: "0.875rem" },
3908
- { property: "display", value: "none" }
3909
- ]
3094
+ "&": {
3095
+ right: "0.5rem",
3096
+ width: "0.875rem",
3097
+ height: "0.875rem",
3098
+ display: "none"
3099
+ }
3910
3100
  },
3911
3101
  {
3912
- '[aria-selected="true"] > &': [{ property: "display", value: "flex" }]
3102
+ '[aria-selected="true"] > &': { display: "flex" }
3913
3103
  }
3914
3104
  ],
3915
3105
  selectGroup: ["p:1"],
@@ -3918,11 +3108,11 @@ function createSelectStyles() {
3918
3108
  "my:1",
3919
3109
  "bg:border",
3920
3110
  {
3921
- "&": [
3922
- { property: "margin-left", value: "-0.25rem" },
3923
- { property: "margin-right", value: "-0.25rem" },
3924
- { property: "height", value: "1px" }
3925
- ]
3111
+ "&": {
3112
+ "margin-left": "-0.25rem",
3113
+ "margin-right": "-0.25rem",
3114
+ height: "1px"
3115
+ }
3926
3116
  }
3927
3117
  ],
3928
3118
  selectScrollButton: ["flex", "items:center", "justify:center", "py:1", "cursor:default"]
@@ -3944,13 +3134,13 @@ import { css as css30 } from "@vertz/ui";
3944
3134
  function createSeparator() {
3945
3135
  const s = css30({
3946
3136
  separatorBase: ["bg:border", "shrink-0"],
3947
- separatorHorizontal: ["w:full", { "&": [{ property: "height", value: "1px" }] }],
3137
+ separatorHorizontal: ["w:full", { "&": { height: "1px" } }],
3948
3138
  separatorVertical: [
3949
3139
  {
3950
- "&": [
3951
- { property: "height", value: "100%" },
3952
- { property: "width", value: "1px" }
3953
- ]
3140
+ "&": {
3141
+ height: "100%",
3142
+ width: "1px"
3143
+ }
3954
3144
  }
3955
3145
  ]
3956
3146
  });
@@ -3967,10 +3157,9 @@ var focusRing12 = {
3967
3157
  "&:focus-visible": [
3968
3158
  "outline-none",
3969
3159
  {
3970
- property: "outline",
3971
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3160
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3972
3161
  },
3973
- { property: "outline-offset", value: "2px" }
3162
+ { "outline-offset": "2px" }
3974
3163
  ]
3975
3164
  };
3976
3165
  var PANEL_BASE2 = [
@@ -3991,28 +3180,31 @@ function createSheetStyles() {
3991
3180
  "inset:0",
3992
3181
  "z:50",
3993
3182
  {
3994
- "&": [
3995
- { property: "background-color", value: "oklch(0 0 0 / 10%)" },
3996
- { property: "backdrop-filter", value: "blur(4px)" },
3997
- { property: "-webkit-backdrop-filter", value: "blur(4px)" }
3998
- ]
3183
+ "&": {
3184
+ "background-color": "oklch(0 0 0 / 10%)",
3185
+ "backdrop-filter": "blur(4px)",
3186
+ "-webkit-backdrop-filter": "blur(4px)"
3187
+ }
3999
3188
  },
4000
3189
  {
4001
3190
  '&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
4002
3191
  },
4003
3192
  {
4004
- '&[data-state="closed"]': [animationDecl("vz-fade-out 100ms ease-out forwards")]
3193
+ '&[data-state="closed"]': [
3194
+ animationDecl("vz-fade-out 100ms ease-out forwards"),
3195
+ { "pointer-events": "none" }
3196
+ ]
4005
3197
  }
4006
3198
  ],
4007
3199
  sheetPanelLeft: [
4008
3200
  ...PANEL_BASE2,
4009
3201
  "border-r:1",
4010
3202
  {
4011
- "&": [
4012
- { property: "inset", value: "0 auto 0 0" },
4013
- { property: "width", value: "75%" },
4014
- { property: "max-width", value: "24rem" }
4015
- ]
3203
+ "&": {
3204
+ inset: "0 auto 0 0",
3205
+ width: "75%",
3206
+ "max-width": "24rem"
3207
+ }
4016
3208
  },
4017
3209
  {
4018
3210
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-left 300ms ease-out forwards")]
@@ -4025,11 +3217,11 @@ function createSheetStyles() {
4025
3217
  ...PANEL_BASE2,
4026
3218
  "border-l:1",
4027
3219
  {
4028
- "&": [
4029
- { property: "inset", value: "0 0 0 auto" },
4030
- { property: "width", value: "75%" },
4031
- { property: "max-width", value: "24rem" }
4032
- ]
3220
+ "&": {
3221
+ inset: "0 0 0 auto",
3222
+ width: "75%",
3223
+ "max-width": "24rem"
3224
+ }
4033
3225
  },
4034
3226
  {
4035
3227
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-right 300ms ease-out forwards")]
@@ -4042,7 +3234,7 @@ function createSheetStyles() {
4042
3234
  ...PANEL_BASE2,
4043
3235
  "border-b:1",
4044
3236
  {
4045
- "&": [{ property: "inset", value: "0 0 auto 0" }]
3237
+ "&": { inset: "0 0 auto 0" }
4046
3238
  },
4047
3239
  {
4048
3240
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-top 300ms ease-out forwards")]
@@ -4055,7 +3247,7 @@ function createSheetStyles() {
4055
3247
  ...PANEL_BASE2,
4056
3248
  "border-t:1",
4057
3249
  {
4058
- "&": [{ property: "inset", value: "auto 0 0 0" }]
3250
+ "&": { inset: "auto 0 0 0" }
4059
3251
  },
4060
3252
  {
4061
3253
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 300ms ease-out forwards")]
@@ -4071,21 +3263,21 @@ function createSheetStyles() {
4071
3263
  "rounded:xs",
4072
3264
  "cursor:pointer",
4073
3265
  {
4074
- "&": [
4075
- { property: "top", value: "0.75rem" },
4076
- { property: "right", value: "0.75rem" },
4077
- { property: "opacity", value: "0.7" },
4078
- { property: "transition", value: "opacity 150ms" },
4079
- { property: "display", value: "inline-flex" },
4080
- { property: "align-items", value: "center" },
4081
- { property: "justify-content", value: "center" },
4082
- { property: "width", value: "1rem" },
4083
- { property: "height", value: "1rem" },
4084
- { property: "background", value: "none" },
4085
- { property: "border", value: "none" },
4086
- { property: "color", value: "currentColor" },
4087
- { property: "padding", value: "0" }
4088
- ]
3266
+ "&": {
3267
+ top: "0.75rem",
3268
+ right: "0.75rem",
3269
+ opacity: "0.7",
3270
+ transition: "opacity 150ms",
3271
+ display: "inline-flex",
3272
+ "align-items": "center",
3273
+ "justify-content": "center",
3274
+ width: "1rem",
3275
+ height: "1rem",
3276
+ background: "none",
3277
+ border: "none",
3278
+ color: "currentColor",
3279
+ padding: "0"
3280
+ }
4089
3281
  },
4090
3282
  { "&:hover": ["opacity:1"] },
4091
3283
  focusRing12
@@ -4111,18 +3303,13 @@ var pulse = keyframes2("vz-skeleton-pulse", {
4111
3303
  });
4112
3304
  function createSkeletonStyles() {
4113
3305
  return css32({
4114
- base: [
4115
- "bg:muted",
4116
- "rounded:md",
4117
- { "&": [{ property: "animation", value: `${pulse} 2s ease-in-out infinite` }] }
4118
- ]
3306
+ base: ["bg:muted", "rounded:md", { "&": { animation: `${pulse} 2s ease-in-out infinite` } }]
4119
3307
  });
4120
3308
  }
4121
3309
  // src/styles/slider.ts
4122
3310
  import { css as css33 } from "@vertz/ui";
4123
3311
  var ringStyle = {
4124
- property: "box-shadow",
4125
- value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
3312
+ "box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
4126
3313
  };
4127
3314
  function createSliderStyles() {
4128
3315
  const s = css33({
@@ -4132,12 +3319,12 @@ function createSliderStyles() {
4132
3319
  "w:full",
4133
3320
  "items:center",
4134
3321
  {
4135
- "&": [
4136
- { property: "touch-action", value: "none" },
4137
- { property: "user-select", value: "none" },
4138
- { property: "height", value: "20px" },
4139
- { property: "cursor", value: "pointer" }
4140
- ]
3322
+ "&": {
3323
+ "touch-action": "none",
3324
+ "user-select": "none",
3325
+ height: "20px",
3326
+ cursor: "pointer"
3327
+ }
4141
3328
  }
4142
3329
  ],
4143
3330
  sliderTrack: [
@@ -4146,10 +3333,10 @@ function createSliderStyles() {
4146
3333
  "rounded:full",
4147
3334
  "bg:muted",
4148
3335
  {
4149
- "&": [
4150
- { property: "height", value: "0.25rem" },
4151
- { property: "overflow", value: "visible" }
4152
- ]
3336
+ "&": {
3337
+ height: "0.25rem",
3338
+ overflow: "visible"
3339
+ }
4153
3340
  }
4154
3341
  ],
4155
3342
  sliderRange: ["bg:primary"],
@@ -4162,18 +3349,18 @@ function createSliderStyles() {
4162
3349
  "border:ring",
4163
3350
  "cursor:pointer",
4164
3351
  {
4165
- "&": [
4166
- { property: "background", value: "white" },
4167
- { property: "transition", value: "color 150ms, box-shadow 150ms" },
4168
- { property: "top", value: "50%" }
4169
- ]
3352
+ "&": {
3353
+ background: "white",
3354
+ transition: "color 150ms, box-shadow 150ms",
3355
+ top: "50%"
3356
+ }
4170
3357
  },
4171
3358
  {
4172
- "&::after": [
4173
- { property: "content", value: '""' },
4174
- { property: "position", value: "absolute" },
4175
- { property: "inset", value: "-0.5rem" }
4176
- ]
3359
+ "&::after": {
3360
+ content: '""',
3361
+ position: "absolute",
3362
+ inset: "-0.5rem"
3363
+ }
4177
3364
  },
4178
3365
  {
4179
3366
  "&:hover": ["outline-none", ringStyle]
@@ -4202,8 +3389,7 @@ var focusRing13 = {
4202
3389
  "outline-none",
4203
3390
  "border:ring",
4204
3391
  {
4205
- property: "box-shadow",
4206
- value: "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
3392
+ "box-shadow": "0 0 0 3px color-mix(in oklch, var(--color-ring) 50%, transparent)"
4207
3393
  }
4208
3394
  ]
4209
3395
  };
@@ -4236,37 +3422,24 @@ function createSwitchStyles() {
4236
3422
  "rounded:full",
4237
3423
  "bg:background",
4238
3424
  {
4239
- "&": [
4240
- {
4241
- property: "transition",
4242
- value: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
4243
- }
4244
- ]
3425
+ "&": {
3426
+ transition: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
3427
+ }
4245
3428
  },
4246
3429
  {
4247
- '&[data-state="unchecked"]': [{ property: "transform", value: "translateX(0)" }],
4248
- '&[data-state="checked"]': [
4249
- { property: "transform", value: "translateX(calc(100% - 2px))" }
4250
- ]
3430
+ '&[data-state="unchecked"]': [{ transform: "translateX(0)" }],
3431
+ '&[data-state="checked"]': [{ transform: "translateX(calc(100% - 2px))" }]
4251
3432
  },
4252
3433
  {
4253
- 'button:active > &[data-state="unchecked"]': [
4254
- "w:5",
4255
- { property: "transform", value: "translateX(0)" }
4256
- ],
4257
- 'button:active > &[data-state="checked"]': [
4258
- "w:5",
4259
- { property: "transform", value: "translateX(0.625rem)" }
4260
- ]
3434
+ 'button:active > &[data-state="unchecked"]': ["w:5", { transform: "translateX(0)" }],
3435
+ 'button:active > &[data-state="checked"]': ["w:5", { transform: "translateX(0.625rem)" }]
4261
3436
  },
4262
3437
  {
4263
- [`${DARK}[data-state="unchecked"]`]: [
4264
- { property: "background-color", value: "var(--color-foreground)" }
4265
- ]
3438
+ [`${DARK}[data-state="unchecked"]`]: [{ "background-color": "var(--color-foreground)" }]
4266
3439
  },
4267
3440
  {
4268
3441
  [`${DARK}[data-state="checked"]`]: [
4269
- { property: "background-color", value: "var(--color-primary-foreground)" }
3442
+ { "background-color": "var(--color-primary-foreground)" }
4270
3443
  ]
4271
3444
  }
4272
3445
  ],
@@ -4297,37 +3470,24 @@ function createSwitchStyles() {
4297
3470
  "rounded:full",
4298
3471
  "bg:background",
4299
3472
  {
4300
- "&": [
4301
- {
4302
- property: "transition",
4303
- value: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
4304
- }
4305
- ]
3473
+ "&": {
3474
+ transition: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0.4, 0, 0.2, 1)"
3475
+ }
4306
3476
  },
4307
3477
  {
4308
- '&[data-state="unchecked"]': [{ property: "transform", value: "translateX(0)" }],
4309
- '&[data-state="checked"]': [
4310
- { property: "transform", value: "translateX(calc(100% - 2px))" }
4311
- ]
3478
+ '&[data-state="unchecked"]': [{ transform: "translateX(0)" }],
3479
+ '&[data-state="checked"]': [{ transform: "translateX(calc(100% - 2px))" }]
4312
3480
  },
4313
3481
  {
4314
- 'button:active > &[data-state="unchecked"]': [
4315
- "w:3.5",
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
- ]
3482
+ 'button:active > &[data-state="unchecked"]': ["w:3.5", { transform: "translateX(0)" }],
3483
+ 'button:active > &[data-state="checked"]': ["w:3.5", { transform: "translateX(0.5rem)" }]
4322
3484
  },
4323
3485
  {
4324
- [`${DARK}[data-state="unchecked"]`]: [
4325
- { property: "background-color", value: "var(--color-foreground)" }
4326
- ]
3486
+ [`${DARK}[data-state="unchecked"]`]: [{ "background-color": "var(--color-foreground)" }]
4327
3487
  },
4328
3488
  {
4329
3489
  [`${DARK}[data-state="checked"]`]: [
4330
- { property: "background-color", value: "var(--color-primary-foreground)" }
3490
+ { "background-color": "var(--color-primary-foreground)" }
4331
3491
  ]
4332
3492
  }
4333
3493
  ]
@@ -4348,14 +3508,14 @@ function createTableStyles() {
4348
3508
  "w:full",
4349
3509
  "text:sm",
4350
3510
  {
4351
- "&": [
4352
- { property: "caption-side", value: "bottom" },
4353
- { property: "border-collapse", value: "collapse" }
4354
- ]
3511
+ "&": {
3512
+ "caption-side": "bottom",
3513
+ "border-collapse": "collapse"
3514
+ }
4355
3515
  }
4356
3516
  ],
4357
3517
  tableHeader: [{ "& tr": ["border-b:1", "border:border"] }],
4358
- tableBody: [{ "& tr:last-child": [{ property: "border-bottom", value: "0" }] }],
3518
+ tableBody: [{ "& tr:last-child": { "border-bottom": "0" } }],
4359
3519
  tableRow: [
4360
3520
  "border-b:1",
4361
3521
  "border:border",
@@ -4370,24 +3530,20 @@ function createTableStyles() {
4370
3530
  "text:foreground",
4371
3531
  "whitespace-nowrap",
4372
3532
  {
4373
- "&": [
4374
- { property: "vertical-align", value: "middle" },
4375
- { property: "height", value: "2.5rem" }
4376
- ]
3533
+ "&": {
3534
+ "vertical-align": "middle",
3535
+ height: "2.5rem"
3536
+ }
4377
3537
  }
4378
3538
  ],
4379
- tableCell: [
4380
- "p:2",
4381
- "whitespace-nowrap",
4382
- { "&": [{ property: "vertical-align", value: "middle" }] }
4383
- ],
3539
+ tableCell: ["p:2", "whitespace-nowrap", { "&": { "vertical-align": "middle" } }],
4384
3540
  tableCaption: ["mt:4", "text:sm", "text:muted-foreground"],
4385
3541
  tableFooter: [
4386
3542
  "border-t:1",
4387
3543
  "border:border",
4388
3544
  "font:medium",
4389
3545
  { "&": [bgOpacity("muted", 50)] },
4390
- { "&>tr:last-child": [{ property: "border-bottom", value: "0" }] }
3546
+ { "&>tr:last-child": { "border-bottom": "0" } }
4391
3547
  ]
4392
3548
  });
4393
3549
  return {
@@ -4414,10 +3570,10 @@ function createTabsStyles() {
4414
3570
  "bg:muted",
4415
3571
  "text:muted-foreground",
4416
3572
  {
4417
- "&": [
4418
- { property: "padding", value: "3px" },
4419
- { property: "height", value: "2rem" }
4420
- ]
3573
+ "&": {
3574
+ padding: "3px",
3575
+ height: "2rem"
3576
+ }
4421
3577
  }
4422
3578
  ],
4423
3579
  tabsTrigger: [
@@ -4431,11 +3587,11 @@ function createTabsStyles() {
4431
3587
  "cursor:pointer",
4432
3588
  "transition:colors",
4433
3589
  {
4434
- "&": [
4435
- { property: "background", value: "transparent" },
4436
- { property: "padding", value: "0.125rem 0.375rem" },
4437
- { property: "border", value: "1px solid transparent" }
4438
- ]
3590
+ "&": {
3591
+ background: "transparent",
3592
+ padding: "0.125rem 0.375rem",
3593
+ border: "1px solid transparent"
3594
+ }
4439
3595
  },
4440
3596
  { '&[data-state="inactive"]': [textOpacity("foreground", 60)] },
4441
3597
  {
@@ -4463,11 +3619,11 @@ function createTabsStyles() {
4463
3619
  "cursor:pointer",
4464
3620
  "border:0",
4465
3621
  {
4466
- "&": [
4467
- { property: "background", value: "transparent" },
4468
- { property: "margin-bottom", value: "-1px" },
4469
- { property: "transition", value: "color 150ms, box-shadow 150ms" }
4470
- ]
3622
+ "&": {
3623
+ background: "transparent",
3624
+ "margin-bottom": "-1px",
3625
+ transition: "color 150ms, box-shadow 150ms"
3626
+ }
4471
3627
  },
4472
3628
  { '&[data-state="inactive"]': [textOpacity("foreground", 60)] },
4473
3629
  { '&[data-state="inactive"]:hover': [textOpacity("foreground", 80)] },
@@ -4475,8 +3631,7 @@ function createTabsStyles() {
4475
3631
  '&[data-state="active"]': [
4476
3632
  "text:foreground",
4477
3633
  {
4478
- property: "box-shadow",
4479
- value: "inset 0 -2px 0 0 currentColor"
3634
+ "box-shadow": "inset 0 -2px 0 0 currentColor"
4480
3635
  }
4481
3636
  ]
4482
3637
  },
@@ -4500,10 +3655,9 @@ function createTextarea() {
4500
3655
  "outline-none",
4501
3656
  "border:ring",
4502
3657
  {
4503
- property: "outline",
4504
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3658
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
4505
3659
  },
4506
- { property: "outline-offset", value: "2px" }
3660
+ { "outline-offset": "2px" }
4507
3661
  ]
4508
3662
  };
4509
3663
  const s = css37({
@@ -4516,20 +3670,16 @@ function createTextarea() {
4516
3670
  "bg:transparent",
4517
3671
  "py:2",
4518
3672
  {
4519
- "&": [
4520
- { property: "padding-left", value: "0.625rem" },
4521
- { property: "padding-right", value: "0.625rem" }
4522
- ]
3673
+ "&": {
3674
+ "padding-left": "0.625rem",
3675
+ "padding-right": "0.625rem",
3676
+ "min-height": "60px",
3677
+ "field-sizing": "content"
3678
+ }
4523
3679
  },
4524
3680
  "text:sm",
4525
3681
  "text:foreground",
4526
3682
  "transition:colors",
4527
- {
4528
- "&": [
4529
- { property: "min-height", value: "60px" },
4530
- { property: "field-sizing", value: "content" }
4531
- ]
4532
- },
4533
3683
  focusRing14,
4534
3684
  { "&:disabled": ["pointer-events-none", "opacity:0.5"] },
4535
3685
  { [DARK]: [bgOpacity("input", 30)] }
@@ -4546,10 +3696,9 @@ var focusRing14 = {
4546
3696
  "&:focus-visible": [
4547
3697
  "outline-none",
4548
3698
  {
4549
- property: "outline",
4550
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3699
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
4551
3700
  },
4552
- { property: "outline-offset", value: "2px" }
3701
+ { "outline-offset": "2px" }
4553
3702
  ]
4554
3703
  };
4555
3704
  function createToastStyles() {
@@ -4562,14 +3711,14 @@ function createToastStyles() {
4562
3711
  "gap:2",
4563
3712
  "p:4",
4564
3713
  {
4565
- "&": [
4566
- { property: "bottom", value: "0" },
4567
- { property: "right", value: "0" },
4568
- { property: "max-height", value: "100vh" },
4569
- { property: "width", value: "420px" },
4570
- { property: "max-width", value: "100vw" },
4571
- { property: "pointer-events", value: "none" }
4572
- ]
3714
+ "&": {
3715
+ bottom: "0",
3716
+ right: "0",
3717
+ "max-height": "100vh",
3718
+ width: "420px",
3719
+ "max-width": "100vw",
3720
+ "pointer-events": "none"
3721
+ }
4573
3722
  }
4574
3723
  ],
4575
3724
  toastRoot: [
@@ -4585,7 +3734,7 @@ function createToastStyles() {
4585
3734
  "p:4",
4586
3735
  "shadow:lg",
4587
3736
  {
4588
- "&": [{ property: "pointer-events", value: "auto" }]
3737
+ "&": { "pointer-events": "auto" }
4589
3738
  },
4590
3739
  {
4591
3740
  '&[data-state="open"]': [animationDecl("vz-slide-in-from-bottom 200ms ease-out forwards")]
@@ -4608,7 +3757,7 @@ function createToastStyles() {
4608
3757
  "font:medium",
4609
3758
  "transition:colors",
4610
3759
  "shrink-0",
4611
- { "&": [{ property: "height", value: "2rem" }] },
3760
+ { "&": { height: "2rem" } },
4612
3761
  { "&:hover": ["bg:secondary"] },
4613
3762
  focusRing14
4614
3763
  ],
@@ -4638,10 +3787,9 @@ var focusRing15 = {
4638
3787
  "&:focus-visible": [
4639
3788
  "outline-none",
4640
3789
  {
4641
- property: "outline",
4642
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3790
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
4643
3791
  },
4644
- { property: "outline-offset", value: "2px" }
3792
+ { "outline-offset": "2px" }
4645
3793
  ]
4646
3794
  };
4647
3795
  function createToggleStyles() {
@@ -4677,10 +3825,9 @@ var focusRing16 = {
4677
3825
  "&:focus-visible": [
4678
3826
  "outline-none",
4679
3827
  {
4680
- property: "outline",
4681
- value: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
3828
+ outline: "3px solid color-mix(in oklch, var(--color-ring) 50%, transparent)"
4682
3829
  },
4683
- { property: "outline-offset", value: "2px" }
3830
+ { "outline-offset": "2px" }
4684
3831
  ]
4685
3832
  };
4686
3833
  function createToggleGroupStyles() {
@@ -4725,7 +3872,7 @@ function createTooltipStyles() {
4725
3872
  "py:1.5",
4726
3873
  "text:xs",
4727
3874
  {
4728
- "&": [{ property: "white-space", value: "nowrap" }]
3875
+ "&": { "white-space": "nowrap" }
4729
3876
  },
4730
3877
  {
4731
3878
  '&[data-state="open"]': [animationDecl("vz-fade-in 100ms ease-out forwards")]
@@ -4852,29 +3999,29 @@ function configureTheme(config) {
4852
3999
  DropdownMenu: createThemedDropdownMenu(dropdownMenuStyles),
4853
4000
  Select: createThemedSelect(selectStyles),
4854
4001
  Tabs: createThemedTabs(tabsStyles),
4855
- checkbox: createThemedCheckbox(checkboxStyles),
4856
- switch: createThemedSwitch(switchStyles),
4002
+ Checkbox: createThemedCheckbox(checkboxStyles),
4003
+ Switch: createThemedSwitch(switchStyles),
4857
4004
  Popover: createThemedPopover(popoverStyles),
4858
- progress: createThemedProgress(progressStyles),
4859
- radioGroup: createThemedRadioGroup(radioGroupStyles),
4860
- slider: createThemedSlider(sliderStyles),
4005
+ Progress: createThemedProgress(progressStyles),
4006
+ RadioGroup: createThemedRadioGroup(radioGroupStyles),
4007
+ Slider: createThemedSlider(sliderStyles),
4861
4008
  Accordion: createThemedAccordion(accordionStyles),
4862
- toast: createThemedToast(toastStyles),
4009
+ Toast: createThemedToast(toastStyles),
4863
4010
  Tooltip: createThemedTooltip(tooltipStyles),
4864
4011
  Sheet: createThemedSheet(sheetStyles),
4865
- calendar: createThemedCalendar(calendarStyles),
4866
- carousel: createThemedCarousel(carouselStyles),
4012
+ Calendar: createThemedCalendar(calendarStyles),
4013
+ Carousel: createThemedCarousel(carouselStyles),
4867
4014
  collapsible: createThemedCollapsible(collapsibleStyles),
4868
- command: createThemedCommand(commandStyles),
4869
- contextMenu: createThemedContextMenu(contextMenuStyles),
4015
+ Command: createThemedCommand(commandStyles),
4016
+ ContextMenu: createThemedContextMenu(contextMenuStyles),
4870
4017
  datePicker: createThemedDatePicker(datePickerStyles),
4871
- drawer: createThemedDrawer(drawerStyles),
4018
+ Drawer: createThemedDrawer(drawerStyles),
4872
4019
  hoverCard: createThemedHoverCard(hoverCardStyles),
4873
- menubar: createThemedMenubar(menubarStyles),
4874
- navigationMenu: createThemedNavigationMenu(navigationMenuStyles),
4020
+ Menubar: createThemedMenubar(menubarStyles),
4021
+ NavigationMenu: createThemedNavigationMenu(navigationMenuStyles),
4875
4022
  resizablePanel: createThemedResizablePanel(resizablePanelStyles),
4876
4023
  scrollArea: createThemedScrollArea(scrollAreaStyles),
4877
- toggle: createThemedToggle(toggleStyles),
4024
+ Toggle: createThemedToggle(toggleStyles),
4878
4025
  toggleGroup: createThemedToggleGroup(toggleGroupStyles)
4879
4026
  }
4880
4027
  };