@umami/react-zen 0.249.0 → 0.251.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var accordion = require('@base-ui/react/accordion');
@@ -123,7 +124,7 @@ var paddingMap = {
123
124
  "72": "p-72",
124
125
  "80": "p-80",
125
126
  "96": "p-96",
126
- true: "px-[var(--padding-x-default)] py-[var(--padding-y-default)]"
127
+ true: "px-[var(--zen-padding-x-default)] py-[var(--zen-padding-y-default)]"
127
128
  };
128
129
  var pxMap = {
129
130
  "0": "px-0",
@@ -161,7 +162,7 @@ var pxMap = {
161
162
  "72": "px-72",
162
163
  "80": "px-80",
163
164
  "96": "px-96",
164
- true: "px-[var(--padding-x-default)]"
165
+ true: "px-[var(--zen-padding-x-default)]"
165
166
  };
166
167
  var pyMap = {
167
168
  "0": "py-0",
@@ -199,7 +200,7 @@ var pyMap = {
199
200
  "72": "py-72",
200
201
  "80": "py-80",
201
202
  "96": "py-96",
202
- true: "py-[var(--padding-y-default)]"
203
+ true: "py-[var(--zen-padding-y-default)]"
203
204
  };
204
205
  var ptMap = {
205
206
  "0": "pt-0",
@@ -350,6 +351,7 @@ var plMap = {
350
351
  "96": "pl-96"
351
352
  };
352
353
  var marginMap = {
354
+ auto: "m-auto",
353
355
  "0": "m-0",
354
356
  px: "m-px",
355
357
  "0.5": "m-0.5",
@@ -408,6 +410,7 @@ var marginMap = {
408
410
  "-24": "-m-24"
409
411
  };
410
412
  var mxMap = {
413
+ auto: "mx-auto",
411
414
  "0": "mx-0",
412
415
  px: "mx-px",
413
416
  "0.5": "mx-0.5",
@@ -445,6 +448,7 @@ var mxMap = {
445
448
  "-4": "-mx-4"
446
449
  };
447
450
  var myMap = {
451
+ auto: "my-auto",
448
452
  "0": "my-0",
449
453
  px: "my-px",
450
454
  "0.5": "my-0.5",
@@ -482,6 +486,7 @@ var myMap = {
482
486
  "-4": "-my-4"
483
487
  };
484
488
  var mtMap = {
489
+ auto: "mt-auto",
485
490
  "0": "mt-0",
486
491
  px: "mt-px",
487
492
  "0.5": "mt-0.5",
@@ -519,6 +524,7 @@ var mtMap = {
519
524
  "-4": "-mt-4"
520
525
  };
521
526
  var mrMap = {
527
+ auto: "mr-auto",
522
528
  "0": "mr-0",
523
529
  px: "mr-px",
524
530
  "0.5": "mr-0.5",
@@ -556,6 +562,7 @@ var mrMap = {
556
562
  "-4": "-mr-4"
557
563
  };
558
564
  var mbMap = {
565
+ auto: "mb-auto",
559
566
  "0": "mb-0",
560
567
  px: "mb-px",
561
568
  "0.5": "mb-0.5",
@@ -593,6 +600,7 @@ var mbMap = {
593
600
  "-4": "-mb-4"
594
601
  };
595
602
  var mlMap = {
603
+ auto: "ml-auto",
596
604
  "0": "ml-0",
597
605
  px: "ml-px",
598
606
  "0.5": "ml-0.5",
@@ -665,7 +673,7 @@ var gapMap = {
665
673
  "72": "gap-72",
666
674
  "80": "gap-80",
667
675
  "96": "gap-96",
668
- true: "gap-[var(--gap-default)]"
676
+ true: "gap-[var(--zen-gap-default)]"
669
677
  };
670
678
  var gapXMap = {
671
679
  "0": "gap-x-0",
@@ -692,7 +700,7 @@ var gapXMap = {
692
700
  "24": "gap-x-24",
693
701
  "28": "gap-x-28",
694
702
  "32": "gap-x-32",
695
- true: "gap-x-[var(--gap-default)]"
703
+ true: "gap-x-[var(--zen-gap-default)]"
696
704
  };
697
705
  var gapYMap = {
698
706
  "0": "gap-y-0",
@@ -719,7 +727,7 @@ var gapYMap = {
719
727
  "24": "gap-y-24",
720
728
  "28": "gap-y-28",
721
729
  "32": "gap-y-32",
722
- true: "gap-y-[var(--gap-default)]"
730
+ true: "gap-y-[var(--zen-gap-default)]"
723
731
  };
724
732
  var spaceXMap = {
725
733
  "0": "space-x-0",
@@ -796,33 +804,33 @@ var spaceYMap = {
796
804
  "96": "space-y-96"
797
805
  };
798
806
  var fontSizeMap = {
799
- xs: "text-xs",
800
- sm: "text-sm",
801
- base: "text-base",
802
- lg: "text-lg",
803
- xl: "text-xl",
804
- "2xl": "text-2xl",
805
- "3xl": "text-3xl",
806
- "4xl": "text-4xl",
807
- "5xl": "text-5xl",
808
- "6xl": "text-6xl",
809
- "7xl": "text-7xl",
810
- "8xl": "text-8xl",
811
- "9xl": "text-9xl"
807
+ xs: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]",
808
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
809
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
810
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
811
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
812
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
813
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
814
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
815
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
816
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]",
817
+ "7xl": "text-[length:var(--zen-font-size-7xl)]/[var(--zen-line-height-7xl)]",
818
+ "8xl": "text-[length:var(--zen-font-size-8xl)]/[var(--zen-line-height-8xl)]",
819
+ "9xl": "text-[length:var(--zen-font-size-9xl)]/[var(--zen-line-height-9xl)]"
812
820
  };
813
821
  var headingSizeMap = {
814
- sm: "text-sm",
815
- base: "text-base",
816
- lg: "text-lg",
817
- xl: "text-xl",
818
- "2xl": "text-2xl",
819
- "3xl": "text-3xl",
820
- "4xl": "text-4xl",
821
- "5xl": "text-5xl",
822
- "6xl": "text-6xl",
823
- "7xl": "text-7xl",
824
- "8xl": "text-8xl",
825
- "9xl": "text-9xl"
822
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
823
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
824
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
825
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
826
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
827
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
828
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
829
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
830
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]",
831
+ "7xl": "text-[length:var(--zen-font-size-7xl)]/[var(--zen-line-height-7xl)]",
832
+ "8xl": "text-[length:var(--zen-font-size-8xl)]/[var(--zen-line-height-8xl)]",
833
+ "9xl": "text-[length:var(--zen-font-size-9xl)]/[var(--zen-line-height-9xl)]"
826
834
  };
827
835
  var fontWeightMap = {
828
836
  thin: "font-thin",
@@ -844,7 +852,7 @@ var borderRadiusMap = {
844
852
  "2xl": "rounded-2xl",
845
853
  "3xl": "rounded-3xl",
846
854
  full: "rounded-full",
847
- true: "rounded-[var(--radius-default)]"
855
+ true: "rounded-[var(--zen-radius-default)]"
848
856
  };
849
857
  var borderWidthMap = {
850
858
  sm: "border",
@@ -860,7 +868,7 @@ var shadowMap = {
860
868
  xl: "shadow-xl",
861
869
  "2xl": "shadow-2xl",
862
870
  inner: "shadow-inner",
863
- true: "shadow-[var(--shadow-default)]"
871
+ true: "shadow-[var(--zen-shadow-default)]"
864
872
  };
865
873
  var semanticColorMap = {
866
874
  primary: { text: "text-foreground-primary", bg: "bg-primary" },
@@ -1372,9 +1380,9 @@ function mapBorderColor(value) {
1372
1380
  return "";
1373
1381
  }
1374
1382
  var semanticCssColorValues = {
1375
- primary: "var(--text-primary)",
1376
- muted: "var(--text-muted)",
1377
- disabled: "var(--text-disabled)"
1383
+ primary: "var(--zen-text-primary)",
1384
+ muted: "var(--zen-text-muted)",
1385
+ disabled: "var(--zen-text-disabled)"
1378
1386
  };
1379
1387
  var tailwindColorHex = {
1380
1388
  gray: {
@@ -2225,7 +2233,10 @@ function Accordion({
2225
2233
  value: expandedKeys ? Array.from(expandedKeys) : void 0,
2226
2234
  defaultValue: defaultExpandedKeys ? Array.from(defaultExpandedKeys) : void 0,
2227
2235
  onValueChange: (value) => onExpandedChange?.(new Set(value)),
2228
- className: cn("flex flex-col items-start w-full gap-2 text-base", className),
2236
+ className: cn(
2237
+ "flex flex-col items-start w-full gap-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2238
+ className
2239
+ ),
2229
2240
  children
2230
2241
  }
2231
2242
  );
@@ -2247,7 +2258,7 @@ function AccordionItem({
2247
2258
  disabled: isDisabled,
2248
2259
  className: cn("w-full cursor-pointer group", className),
2249
2260
  children: [
2250
- /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Trigger, { className: "w-full flex items-center justify-between font-bold py-2 px-0", children: [
2261
+ /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "m-0 text-[length:inherit]", children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Trigger, { className: "w-full flex items-center justify-between font-bold py-2 px-0", children: [
2251
2262
  /* @__PURE__ */ jsxRuntime.jsx(Text, { children: trigger }),
2252
2263
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "transition-transform duration-200 group-data-[open]:rotate-90", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronRight, {}) })
2253
2264
  ] }) }),
@@ -2303,11 +2314,11 @@ var button = tailwindVariants.tv({
2303
2314
  ]
2304
2315
  },
2305
2316
  size: {
2306
- xs: "text-sm py-1 px-2",
2307
- sm: "text-base py-1.5 px-2.5",
2308
- md: "text-base py-2 px-3",
2309
- lg: "text-lg py-2.5 px-4",
2310
- xl: "text-xl py-3 px-5"
2317
+ xs: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] py-1 px-2",
2318
+ sm: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-1.5 px-2.5",
2319
+ md: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-2 px-3",
2320
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] py-2.5 px-4",
2321
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)] py-3 px-5"
2311
2322
  }
2312
2323
  },
2313
2324
  defaultVariants: {
@@ -2318,7 +2329,7 @@ var button = tailwindVariants.tv({
2318
2329
  var inputField = tailwindVariants.tv({
2319
2330
  base: [
2320
2331
  "relative flex items-center",
2321
- "text-base rounded border border-edge bg-surface-base shadow-sm",
2332
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] rounded border border-edge bg-surface-base shadow-sm",
2322
2333
  "leading-6 text-foreground-primary transition-colors",
2323
2334
  "focus-within:border-edge-strong",
2324
2335
  "has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
@@ -2337,7 +2348,7 @@ var inputField = tailwindVariants.tv({
2337
2348
  tailwindVariants.tv({
2338
2349
  base: [
2339
2350
  "flex items-center justify-between",
2340
- "gap-3 text-base py-2 px-3 min-w-[120px]",
2351
+ "gap-3 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-2 px-3 min-w-[120px]",
2341
2352
  "cursor-pointer outline-none rounded",
2342
2353
  "text-foreground-primary",
2343
2354
  "hovered:bg-interactive",
@@ -2374,13 +2385,15 @@ tailwindVariants.tv({
2374
2385
  }
2375
2386
  });
2376
2387
  var tooltip = tailwindVariants.tv({
2377
- base: ["bg-surface-inverted text-surface-base text-base px-2 py-1 rounded"]
2388
+ base: [
2389
+ "bg-surface-inverted text-surface-base text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] px-2 py-1 rounded"
2390
+ ]
2378
2391
  });
2379
2392
  var checkbox = tailwindVariants.tv({
2380
2393
  slots: {
2381
2394
  root: [
2382
2395
  "group flex items-center gap-3",
2383
- "text-base cursor-pointer",
2396
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2384
2397
  "disabled:text-foreground-disabled disabled:cursor-default"
2385
2398
  ],
2386
2399
  box: [
@@ -2404,7 +2417,7 @@ var switchVariant = tailwindVariants.tv({
2404
2417
  slots: {
2405
2418
  root: [
2406
2419
  "group flex items-center gap-3",
2407
- "text-base cursor-pointer",
2420
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2408
2421
  "disabled:opacity-50 disabled:cursor-default"
2409
2422
  ],
2410
2423
  track: [
@@ -2427,7 +2440,7 @@ tailwindVariants.tv({
2427
2440
  root: "flex flex-col",
2428
2441
  list: ["flex gap-1 border-b border-edge-muted"],
2429
2442
  tab: [
2430
- "px-4 py-2 text-base font-medium cursor-pointer",
2443
+ "px-4 py-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-medium cursor-pointer",
2431
2444
  "text-foreground-muted outline-none",
2432
2445
  "border-b-2 border-transparent -mb-px",
2433
2446
  "hovered:text-foreground-primary",
@@ -2442,14 +2455,14 @@ tailwindVariants.tv({
2442
2455
  base: "text-foreground-primary",
2443
2456
  variants: {
2444
2457
  size: {
2445
- xs: "text-xs",
2446
- sm: "text-sm",
2447
- base: "text-base",
2448
- lg: "text-lg",
2449
- xl: "text-xl",
2450
- "2xl": "text-2xl",
2451
- "3xl": "text-3xl",
2452
- "4xl": "text-4xl"
2458
+ xs: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]",
2459
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
2460
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2461
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
2462
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
2463
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
2464
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
2465
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]"
2453
2466
  },
2454
2467
  color: {
2455
2468
  default: "",
@@ -2476,15 +2489,15 @@ tailwindVariants.tv({
2476
2489
  base: "font-semibold text-foreground-primary",
2477
2490
  variants: {
2478
2491
  size: {
2479
- sm: "text-sm",
2480
- base: "text-base",
2481
- lg: "text-lg",
2482
- xl: "text-xl",
2483
- "2xl": "text-2xl",
2484
- "3xl": "text-3xl",
2485
- "4xl": "text-4xl",
2486
- "5xl": "text-5xl",
2487
- "6xl": "text-6xl"
2492
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
2493
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2494
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
2495
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
2496
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
2497
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
2498
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
2499
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
2500
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]"
2488
2501
  }
2489
2502
  },
2490
2503
  defaultVariants: {
@@ -2493,7 +2506,7 @@ tailwindVariants.tv({
2493
2506
  });
2494
2507
  var alert = tailwindVariants.tv({
2495
2508
  base: [
2496
- "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-edge-muted px-4 py-3 text-base",
2509
+ "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-edge-muted px-4 py-3 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2497
2510
  "has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
2498
2511
  "[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
2499
2512
  ],
@@ -2526,7 +2539,7 @@ tailwindVariants.tv({
2526
2539
  base: "inline-flex items-center gap-2",
2527
2540
  slots: {
2528
2541
  dot: "w-2 h-2 rounded-full",
2529
- label: "text-base"
2542
+ label: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2530
2543
  },
2531
2544
  variants: {
2532
2545
  color: {
@@ -2546,7 +2559,7 @@ var toast = tailwindVariants.tv({
2546
2559
  "flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
2547
2560
  "bg-surface-overlay",
2548
2561
  "border border-edge-muted",
2549
- "text-base"
2562
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2550
2563
  ],
2551
2564
  variants: {
2552
2565
  variant: {
@@ -2595,8 +2608,8 @@ var badge = tailwindVariants.tv({
2595
2608
  rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
2596
2609
  },
2597
2610
  size: {
2598
- sm: "text-xs px-2 py-0.5",
2599
- md: "text-sm px-2.5 py-0.5"
2611
+ sm: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)] px-2 py-0.5",
2612
+ md: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] px-2.5 py-0.5"
2600
2613
  }
2601
2614
  },
2602
2615
  defaultVariants: {
@@ -2618,11 +2631,26 @@ var avatar = tailwindVariants.tv({
2618
2631
  },
2619
2632
  variants: {
2620
2633
  size: {
2621
- xs: { root: "size-6", fallback: "text-xs" },
2622
- sm: { root: "size-8", fallback: "text-sm" },
2623
- md: { root: "size-10", fallback: "text-base" },
2624
- lg: { root: "size-12", fallback: "text-lg" },
2625
- xl: { root: "size-16", fallback: "text-xl" }
2634
+ xs: {
2635
+ root: "size-6",
2636
+ fallback: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]"
2637
+ },
2638
+ sm: {
2639
+ root: "size-8",
2640
+ fallback: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]"
2641
+ },
2642
+ md: {
2643
+ root: "size-10",
2644
+ fallback: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2645
+ },
2646
+ lg: {
2647
+ root: "size-12",
2648
+ fallback: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]"
2649
+ },
2650
+ xl: {
2651
+ root: "size-16",
2652
+ fallback: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]"
2653
+ }
2626
2654
  }
2627
2655
  },
2628
2656
  defaultVariants: {
@@ -2632,7 +2660,7 @@ var avatar = tailwindVariants.tv({
2632
2660
  var tag = tailwindVariants.tv({
2633
2661
  slots: {
2634
2662
  base: [
2635
- "inline-flex items-center gap-1 px-2 py-0.5 rounded text-sm",
2663
+ "inline-flex items-center gap-1 px-2 py-0.5 rounded text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
2636
2664
  "cursor-default outline-none",
2637
2665
  "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
2638
2666
  ],
@@ -2693,7 +2721,7 @@ var AlertDescription = react.forwardRef(
2693
2721
  ref,
2694
2722
  "data-slot": "alert-description",
2695
2723
  className: cn(
2696
- "col-start-2 grid justify-items-start gap-1 text-base text-foreground-muted [&_p]:leading-relaxed",
2724
+ "col-start-2 grid justify-items-start gap-1 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted [&_p]:leading-relaxed",
2697
2725
  className
2698
2726
  )
2699
2727
  }
@@ -2703,7 +2731,10 @@ AlertDescription.displayName = "AlertDescription";
2703
2731
  function Button({
2704
2732
  variant,
2705
2733
  size = "md",
2706
- render,
2734
+ render: renderProp,
2735
+ href,
2736
+ target,
2737
+ rel,
2707
2738
  preventFocusOnPress: _preventFocusOnPress = true,
2708
2739
  nativeButton,
2709
2740
  isDisabled,
@@ -2715,6 +2746,14 @@ function Button({
2715
2746
  ...props
2716
2747
  }) {
2717
2748
  const buttonClassName = button({ variant, size, className });
2749
+ const render = renderProp ?? (href ? /* @__PURE__ */ jsxRuntime.jsx(
2750
+ "a",
2751
+ {
2752
+ href,
2753
+ target,
2754
+ rel: rel ?? (target === "_blank" ? "noreferrer" : void 0)
2755
+ }
2756
+ ) : void 0);
2718
2757
  const isNativeButton = nativeButton ?? (render === void 0 || react.isValidElement(render) && render.type === "button");
2719
2758
  const handleClick = (event) => {
2720
2759
  onClick?.(event);
@@ -3239,7 +3278,7 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
3239
3278
  ...props,
3240
3279
  "aria-disabled": isDisabled || void 0,
3241
3280
  className: cn(
3242
- "flex items-center text-base gap-3 list-none",
3281
+ "flex items-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3 list-none",
3243
3282
  "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal",
3244
3283
  "[&_a:hover]:text-foreground-primary",
3245
3284
  "last:[&>span]:hidden",
@@ -3296,7 +3335,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
3296
3335
  }
3297
3336
  function ButtonGroupText({ className, render, children, ...props }) {
3298
3337
  const classes = cn(
3299
- "flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-sm font-medium shadow-sm",
3338
+ "flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] font-medium shadow-sm",
3300
3339
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
3301
3340
  className
3302
3341
  );
@@ -3360,7 +3399,18 @@ function Calendar({
3360
3399
  onChange?.(date);
3361
3400
  }
3362
3401
  },
3363
- className: cn("w-fit max-w-full text-base", className),
3402
+ className: cn(
3403
+ "w-fit max-w-full text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
3404
+ // The month grid is a real <table>; host prose styles (docs sites,
3405
+ // CMS themes) often style table/th/td with borders, padding, and
3406
+ // width. Reset them at matching specificity so zen styles hold.
3407
+ "[&_table]:m-0 [&_table]:w-auto [&_table]:border-0 [&_table]:text-[length:inherit]",
3408
+ "[&_th]:border-0 [&_th]:p-0 [&_th]:text-center [&_th]:align-middle",
3409
+ "[&_td]:border-0 [&_td]:p-0 [&_td]:text-center [&_td]:align-middle",
3410
+ "[&_th:first-child]:pl-0 [&_th:last-child]:pr-0",
3411
+ "[&_td:first-child]:pl-0 [&_td:last-child]:pr-0",
3412
+ className
3413
+ ),
3364
3414
  classNames: {
3365
3415
  months: "relative",
3366
3416
  month: "space-y-4",
@@ -3374,7 +3424,7 @@ function Calendar({
3374
3424
  week: "flex mt-1",
3375
3425
  day: "size-12 text-center",
3376
3426
  day_button: "size-12 rounded cursor-pointer outline-none hover:bg-interactive focus-visible:outline-2 focus-visible:outline-focus-ring focus-visible:outline-offset-2",
3377
- selected: "[&>button]:text-primary-foreground [&>button]:bg-primary",
3427
+ selected: "[&>button]:text-primary-foreground [&>button]:bg-primary [&>button:hover]:bg-primary",
3378
3428
  outside: "invisible",
3379
3429
  disabled: "text-foreground-disabled pointer-events-none opacity-50",
3380
3430
  today: "[&>button]:font-bold"
@@ -3643,7 +3693,7 @@ function CollapsibleTrigger({ className, children, ...props }) {
3643
3693
  {
3644
3694
  ...props,
3645
3695
  className: cn(
3646
- "flex items-center gap-2 cursor-pointer outline-none text-base",
3696
+ "flex items-center gap-2 cursor-pointer outline-none text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
3647
3697
  "focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
3648
3698
  "disabled:text-foreground-disabled disabled:cursor-default",
3649
3699
  className
@@ -3794,23 +3844,27 @@ function List({
3794
3844
  if (parent.kind === "combobox") {
3795
3845
  return /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.List, { ...props, id: fieldId, className: classes, style, children });
3796
3846
  }
3797
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3798
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
3799
- /* @__PURE__ */ jsxRuntime.jsx(ListContext.Provider, { value: { kind: "native", selected, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx(
3800
- "div",
3801
- {
3802
- id: fieldId,
3803
- role: "listbox",
3804
- "aria-multiselectable": selectionMode === "multiple" || void 0,
3805
- ...props,
3806
- className: classes,
3807
- style: { ...style, ...getHighlightColor(highlightColor) },
3808
- children: children || renderEmptyState?.({})
3809
- }
3810
- ) })
3811
- ] });
3847
+ const listbox = /* @__PURE__ */ jsxRuntime.jsx(ListContext.Provider, { value: { kind: "native", selected, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx(
3848
+ "div",
3849
+ {
3850
+ id: fieldId,
3851
+ role: "listbox",
3852
+ "aria-multiselectable": selectionMode === "multiple" || void 0,
3853
+ ...props,
3854
+ className: classes,
3855
+ style: { ...style, ...getHighlightColor(highlightColor) },
3856
+ children: children || renderEmptyState?.({})
3857
+ }
3858
+ ) });
3859
+ if (label) {
3860
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
3861
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
3862
+ listbox
3863
+ ] });
3864
+ }
3865
+ return listbox;
3812
3866
  }
3813
- var itemClasses = "text-base flex items-center justify-between px-2 py-1.5 gap-3 min-w-[120px] cursor-pointer outline-none rounded hover:bg-interactive data-[highlighted]:bg-interactive data-[disabled]:text-foreground-disabled data-[selected]:font-semibold";
3867
+ var itemClasses = "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] flex items-center justify-between px-2 py-1.5 gap-3 min-w-[120px] cursor-pointer outline-none rounded hover:bg-interactive data-[highlighted]:bg-interactive data-[disabled]:text-foreground-disabled data-[selected]:font-semibold";
3814
3868
  function ListItem({
3815
3869
  id,
3816
3870
  value,
@@ -3892,18 +3946,18 @@ function ListSection({ title, className, children, ...props }) {
3892
3946
  const { kind } = react.useContext(ListContext);
3893
3947
  if (kind === "select") {
3894
3948
  return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
3895
- title && /* @__PURE__ */ jsxRuntime.jsx(select.Select.GroupLabel, { className: "text-base font-bold px-2 py-1.5", children: title }),
3949
+ title && /* @__PURE__ */ jsxRuntime.jsx(select.Select.GroupLabel, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title }),
3896
3950
  children
3897
3951
  ] });
3898
3952
  }
3899
3953
  if (kind === "combobox") {
3900
3954
  return /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
3901
- title && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.GroupLabel, { className: "text-base font-bold px-2 py-1.5", children: title }),
3955
+ title && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.GroupLabel, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title }),
3902
3956
  children
3903
3957
  ] });
3904
3958
  }
3905
3959
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, role: "group", className: cn("[&:not(:last-child)]:mb-4", className), children: [
3906
- title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-bold px-2 py-1.5", children: title }),
3960
+ title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title }),
3907
3961
  children
3908
3962
  ] });
3909
3963
  }
@@ -3953,7 +4007,7 @@ var InputGroupAddon = react.forwardRef(
3953
4007
  "data-slot": "input-group-addon",
3954
4008
  "data-align": align,
3955
4009
  className: cn(
3956
- "flex h-auto shrink-0 cursor-text items-center justify-center gap-2 py-2 text-sm text-foreground-muted",
4010
+ "flex h-auto shrink-0 cursor-text items-center justify-center gap-2 py-2 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] text-foreground-muted",
3957
4011
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
3958
4012
  addonClasses[align],
3959
4013
  className
@@ -3965,8 +4019,8 @@ var InputGroupAddon = react.forwardRef(
3965
4019
  );
3966
4020
  InputGroupAddon.displayName = "InputGroupAddon";
3967
4021
  var buttonSizeClasses = {
3968
- xs: "h-6 gap-1 rounded px-1.5 py-0 text-sm",
3969
- sm: "h-8 gap-2 rounded px-2 py-0 text-sm",
4022
+ xs: "h-6 gap-1 rounded px-1.5 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
4023
+ sm: "h-8 gap-2 rounded px-2 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
3970
4024
  "icon-xs": "size-6 rounded p-0",
3971
4025
  "icon-sm": "size-8 rounded p-0"
3972
4026
  };
@@ -3998,7 +4052,7 @@ var InputGroupText = react.forwardRef(
3998
4052
  ref,
3999
4053
  "data-slot": "input-group-text",
4000
4054
  className: cn(
4001
- "flex items-center gap-2 text-sm text-foreground-muted [&_svg]:pointer-events-none [&_svg]:size-4",
4055
+ "flex items-center gap-2 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] text-foreground-muted [&_svg]:pointer-events-none [&_svg]:size-4",
4002
4056
  className
4003
4057
  )
4004
4058
  }
@@ -4013,7 +4067,7 @@ var InputGroupInput = react.forwardRef(
4013
4067
  ref,
4014
4068
  "data-slot": "input-group-control",
4015
4069
  className: cn(
4016
- "min-w-0 flex-1 bg-transparent px-3 py-2 text-base outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
4070
+ "min-w-0 flex-1 bg-transparent px-3 py-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
4017
4071
  className
4018
4072
  )
4019
4073
  }
@@ -4027,7 +4081,7 @@ var InputGroupTextarea = react.forwardRef(({ className, ...props }, ref) => /* @
4027
4081
  ref,
4028
4082
  "data-slot": "input-group-control",
4029
4083
  className: cn(
4030
- "min-w-0 w-full flex-1 bg-transparent p-3 text-base outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
4084
+ "min-w-0 w-full flex-1 bg-transparent p-3 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none placeholder:text-foreground-muted disabled:cursor-not-allowed",
4031
4085
  className
4032
4086
  )
4033
4087
  }
@@ -4134,7 +4188,7 @@ function ComboBox({
4134
4188
  disabled: isDisabled,
4135
4189
  onValueChange: onChange,
4136
4190
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
4137
- label && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Label, { className: "text-base font-semibold", children: label }),
4191
+ label && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Label, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-semibold", children: label }),
4138
4192
  /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { render: /* @__PURE__ */ jsxRuntime.jsx(InputGroup, {}), children: [
4139
4193
  /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { placeholder, render: /* @__PURE__ */ jsxRuntime.jsx(InputGroupInput, {}) }),
4140
4194
  /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Trigger, { className: "flex size-6 shrink-0 items-center justify-center rounded text-foreground-muted hover:bg-interactive hover:text-foreground-primary", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { rotate: 90, "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronRight, {}) }) }) })
@@ -4154,7 +4208,7 @@ function ComboBox({
4154
4208
  }
4155
4209
  return item.element ?? /* @__PURE__ */ jsxRuntime.jsx(ListItem, { value: item.value, children: item.label }, item.value);
4156
4210
  } }) }) }) }),
4157
- /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base text-foreground-muted", children: "No items found." }) }) })
4211
+ /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-16 items-center justify-center px-4 py-3 text-center", children: renderEmptyState ? renderEmptyState({}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted", children: "No items found." }) }) })
4158
4212
  ] })
4159
4213
  }
4160
4214
  ) })
@@ -4210,7 +4264,7 @@ function CommandInput({ className, ...props }) {
4210
4264
  {
4211
4265
  ...props,
4212
4266
  className: cn(
4213
- "flex h-11 w-full bg-transparent text-base outline-none",
4267
+ "flex h-11 w-full bg-transparent text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none",
4214
4268
  "placeholder:text-foreground-muted",
4215
4269
  "disabled:cursor-not-allowed disabled:text-foreground-disabled",
4216
4270
  className
@@ -4227,7 +4281,10 @@ function CommandEmpty({ className, ...props }) {
4227
4281
  cmdk.Command.Empty,
4228
4282
  {
4229
4283
  ...props,
4230
- className: cn("py-6 text-center text-base text-foreground-muted", className)
4284
+ className: cn(
4285
+ "py-6 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted",
4286
+ className
4287
+ )
4231
4288
  }
4232
4289
  );
4233
4290
  }
@@ -4239,7 +4296,7 @@ function CommandGroup({ className, ...props }) {
4239
4296
  className: cn(
4240
4297
  "overflow-hidden [&:not(:last-child)]:mb-2",
4241
4298
  "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5",
4242
- "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:text-foreground-muted",
4299
+ "[&_[cmdk-group-heading]]:text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:text-foreground-muted",
4243
4300
  className
4244
4301
  )
4245
4302
  }
@@ -4252,7 +4309,7 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
4252
4309
  ...props,
4253
4310
  disabled: isDisabled,
4254
4311
  className: cn(
4255
- "flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-base",
4312
+ "flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
4256
4313
  "data-[selected=true]:bg-interactive",
4257
4314
  "data-[disabled=true]:text-foreground-disabled data-[disabled=true]:cursor-default",
4258
4315
  className
@@ -4349,6 +4406,7 @@ function TextField({
4349
4406
  ...props
4350
4407
  }) {
4351
4408
  const [inputValue, setInputValue] = react.useState(defaultValue ?? value ?? "");
4409
+ const wasControlled = react.useRef(value !== void 0);
4352
4410
  const handleChange = (event) => {
4353
4411
  const nextValue = event.target.value;
4354
4412
  setInputValue(nextValue);
@@ -4356,68 +4414,75 @@ function TextField({
4356
4414
  };
4357
4415
  react.useEffect(() => {
4358
4416
  if (value !== void 0) {
4417
+ wasControlled.current = true;
4359
4418
  setInputValue(value);
4419
+ } else if (wasControlled.current) {
4420
+ setInputValue(defaultValue ?? "");
4360
4421
  }
4361
- }, [value]);
4422
+ }, [value, defaultValue]);
4362
4423
  const inputClasses = cn(resize && resizeClasses[resize]);
4363
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4364
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
4365
- /* @__PURE__ */ jsxRuntime.jsxs(
4366
- InputGroup,
4367
- {
4368
- variant: variant === "quiet" ? "quiet" : "default",
4369
- className: cn(
4370
- isReadOnly && "focus-within:border-edge",
4371
- isDisabled && "text-foreground-disabled",
4372
- variant === "quiet" && "text-[length:inherit]",
4373
- className
4424
+ const input = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4425
+ InputGroup,
4426
+ {
4427
+ variant: variant === "quiet" ? "quiet" : "default",
4428
+ className: cn(
4429
+ isReadOnly && "focus-within:border-edge",
4430
+ isDisabled && "text-foreground-disabled",
4431
+ variant === "quiet" && "text-[length:inherit]",
4432
+ className
4433
+ ),
4434
+ children: [
4435
+ asTextArea ? /* @__PURE__ */ jsxRuntime.jsx(
4436
+ InputGroupTextarea,
4437
+ {
4438
+ ...props,
4439
+ placeholder,
4440
+ value: inputValue,
4441
+ readOnly: isReadOnly,
4442
+ disabled: isDisabled,
4443
+ className: inputClasses,
4444
+ onChange: handleChange
4445
+ }
4446
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
4447
+ InputGroupInput,
4448
+ {
4449
+ ...props,
4450
+ placeholder,
4451
+ value: inputValue,
4452
+ readOnly: isReadOnly,
4453
+ disabled: isDisabled,
4454
+ className: inputClasses,
4455
+ onChange: handleChange
4456
+ }
4374
4457
  ),
4375
- children: [
4376
- asTextArea ? /* @__PURE__ */ jsxRuntime.jsx(
4377
- InputGroupTextarea,
4378
- {
4379
- ...props,
4380
- placeholder,
4381
- value: inputValue,
4382
- readOnly: isReadOnly,
4383
- disabled: isDisabled,
4384
- className: inputClasses,
4385
- onChange: handleChange
4386
- }
4387
- ) : /* @__PURE__ */ jsxRuntime.jsx(
4388
- InputGroupInput,
4389
- {
4390
- ...props,
4391
- placeholder,
4392
- value: inputValue,
4393
- readOnly: isReadOnly,
4394
- disabled: isDisabled,
4395
- className: inputClasses,
4396
- onChange: handleChange
4397
- }
4398
- ),
4399
- allowCopy && /* @__PURE__ */ jsxRuntime.jsx(
4400
- InputGroupAddon,
4401
- {
4402
- align: asTextArea ? "block-start" : "inline-end",
4403
- className: cn(asTextArea && "justify-end pb-0"),
4404
- children: /* @__PURE__ */ jsxRuntime.jsx(
4405
- CopyButton,
4406
- {
4407
- value: String(inputValue),
4408
- "aria-disabled": !inputValue,
4409
- className: cn(
4410
- "text-foreground-muted hover:text-foreground-primary",
4411
- !inputValue && "text-foreground-disabled"
4412
- )
4413
- }
4414
- )
4415
- }
4416
- )
4417
- ]
4418
- }
4419
- )
4420
- ] });
4458
+ allowCopy && /* @__PURE__ */ jsxRuntime.jsx(
4459
+ InputGroupAddon,
4460
+ {
4461
+ align: asTextArea ? "block-start" : "inline-end",
4462
+ className: cn(asTextArea && "justify-end pb-0"),
4463
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4464
+ CopyButton,
4465
+ {
4466
+ value: String(inputValue),
4467
+ "aria-disabled": !inputValue,
4468
+ className: cn(
4469
+ "text-foreground-muted hover:text-foreground-primary",
4470
+ !inputValue && "text-foreground-disabled"
4471
+ )
4472
+ }
4473
+ )
4474
+ }
4475
+ )
4476
+ ]
4477
+ }
4478
+ ) });
4479
+ if (label) {
4480
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
4481
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
4482
+ input
4483
+ ] });
4484
+ }
4485
+ return input;
4421
4486
  }
4422
4487
  function ConfirmationDialog({
4423
4488
  value,
@@ -4444,7 +4509,7 @@ function ConfirmationDialog({
4444
4509
  paddingY: "2",
4445
4510
  marginY: "2",
4446
4511
  borderRadius: "md",
4447
- className: "font-mono text-base bg-surface-sunken",
4512
+ className: "font-mono text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] bg-surface-sunken",
4448
4513
  children: value
4449
4514
  }
4450
4515
  ),
@@ -4713,7 +4778,17 @@ function Table({
4713
4778
  }),
4714
4779
  [registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
4715
4780
  );
4716
- return /* @__PURE__ */ jsxRuntime.jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsxRuntime.jsx("table", { ...props, className: cn("grid text-base w-full relative", className), children }) });
4781
+ return /* @__PURE__ */ jsxRuntime.jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsxRuntime.jsx(
4782
+ "table",
4783
+ {
4784
+ ...props,
4785
+ className: cn(
4786
+ "grid text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] w-full relative",
4787
+ className
4788
+ ),
4789
+ children
4790
+ }
4791
+ ) });
4717
4792
  }
4718
4793
  function TableHeader({ children, className, style, ...props }) {
4719
4794
  const cols = style?.gridTemplateColumns || gridTemplateColumns;
@@ -4848,34 +4923,55 @@ function DataTable({
4848
4923
  return /* @__PURE__ */ jsxRuntime.jsx(DataCard, { data: items }, `${row.id}-${index}`);
4849
4924
  }) });
4850
4925
  }
4851
- return /* @__PURE__ */ jsxRuntime.jsxs(Table, { ...props, className: cn("relative text-base", className), children: [
4852
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
4853
- if (hidden) {
4854
- return null;
4855
- }
4856
- return /* @__PURE__ */ react.createElement(TableColumn, { ...columnProps, key: id, id }, label);
4857
- }) }),
4858
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row, index) => {
4859
- return (
4860
- // biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
4861
- /* @__PURE__ */ jsxRuntime.jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
4926
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4927
+ Table,
4928
+ {
4929
+ ...props,
4930
+ className: cn(
4931
+ "relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
4932
+ className
4933
+ ),
4934
+ children: [
4935
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
4862
4936
  if (hidden) {
4863
4937
  return null;
4864
4938
  }
4865
- const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
4866
- return /* @__PURE__ */ react.createElement(
4867
- TableCell,
4868
- {
4869
- ...cellProps,
4870
- key: id,
4871
- className: cn("items-center", className2)
4872
- },
4873
- as ? react.createElement(as, {}, value) : value
4939
+ return /* @__PURE__ */ react.createElement(TableColumn, { ...columnProps, key: id, id }, label);
4940
+ }) }),
4941
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row, index) => {
4942
+ return (
4943
+ // biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
4944
+ /* @__PURE__ */ jsxRuntime.jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(
4945
+ ({
4946
+ id,
4947
+ label: _label,
4948
+ width: _width,
4949
+ as,
4950
+ hidden,
4951
+ className: className2,
4952
+ children: children2,
4953
+ ...cellProps
4954
+ }) => {
4955
+ if (hidden) {
4956
+ return null;
4957
+ }
4958
+ const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
4959
+ return /* @__PURE__ */ react.createElement(
4960
+ TableCell,
4961
+ {
4962
+ ...cellProps,
4963
+ key: id,
4964
+ className: cn("items-center", className2)
4965
+ },
4966
+ as ? react.createElement(as, {}, value) : value
4967
+ );
4968
+ }
4969
+ ) }, index)
4874
4970
  );
4875
- }) }, index)
4876
- );
4877
- }) })
4878
- ] });
4971
+ }) })
4972
+ ]
4973
+ }
4974
+ );
4879
4975
  }
4880
4976
  function DataColumn(_props) {
4881
4977
  return null;
@@ -5028,7 +5124,10 @@ var EmptyTitle = react.forwardRef(
5028
5124
  ...props,
5029
5125
  ref,
5030
5126
  "data-slot": "empty-title",
5031
- className: cn("text-lg font-medium tracking-tight", className)
5127
+ className: cn(
5128
+ "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] font-medium tracking-tight",
5129
+ className
5130
+ )
5032
5131
  }
5033
5132
  )
5034
5133
  );
@@ -5040,7 +5139,7 @@ var EmptyDescription = react.forwardRef(({ className, ...props }, ref) => /* @__
5040
5139
  ref,
5041
5140
  "data-slot": "empty-description",
5042
5141
  className: cn(
5043
- "text-foreground-muted [&>a:hover]:text-foreground-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
5142
+ "text-foreground-muted [&>a:hover]:text-foreground-primary text-[length:var(--zen-font-size-sm)]/relaxed [&>a]:underline [&>a]:underline-offset-4",
5044
5143
  className
5045
5144
  )
5046
5145
  }
@@ -5054,7 +5153,7 @@ var EmptyContent = react.forwardRef(
5054
5153
  ref,
5055
5154
  "data-slot": "empty-content",
5056
5155
  className: cn(
5057
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
5156
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] text-balance",
5058
5157
  className
5059
5158
  )
5060
5159
  }
@@ -5189,7 +5288,10 @@ function Form({
5189
5288
  {
5190
5289
  ...props,
5191
5290
  autoComplete,
5192
- className: cn("flex flex-col relative text-base gap-3", className),
5291
+ className: cn(
5292
+ "flex flex-col relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3",
5293
+ className
5294
+ ),
5193
5295
  onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
5194
5296
  onKeyDown,
5195
5297
  children: typeof children === "function" ? children(formValues) : children
@@ -5263,12 +5365,7 @@ function FormFieldArray({
5263
5365
  children({ ...context, ...fieldProps })
5264
5366
  ] });
5265
5367
  }
5266
- function FormResetButton({
5267
- values = {},
5268
- children,
5269
- onPress,
5270
- ...props
5271
- }) {
5368
+ function FormResetButton({ values, children, onPress, ...props }) {
5272
5369
  const { reset } = reactHookForm.useFormContext();
5273
5370
  const handleReset = (e) => {
5274
5371
  reset(values);
@@ -5712,7 +5809,7 @@ function Kbd({ className, children, ...props }) {
5712
5809
  ...props,
5713
5810
  className: cn(
5714
5811
  "inline-flex items-center justify-center gap-1",
5715
- "text-sm font-mono text-foreground-primary",
5812
+ "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] font-mono text-foreground-primary",
5716
5813
  "px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
5717
5814
  className
5718
5815
  ),
@@ -5836,7 +5933,7 @@ function MenuItem({
5836
5933
  }
5837
5934
  };
5838
5935
  const itemClassName = cn(
5839
- "text-base flex items-center justify-between gap-3 px-2 py-1.5 rounded cursor-pointer outline-none w-full",
5936
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] flex items-center justify-between gap-3 px-2 py-1.5 rounded cursor-pointer outline-none w-full",
5840
5937
  "hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
5841
5938
  "data-[disabled]:text-foreground-disabled",
5842
5939
  "data-[selected]:font-semibold",
@@ -5927,7 +6024,7 @@ function MenuSection({
5927
6024
  const groupStyle = style;
5928
6025
  const body = maxHeight ? /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children }) : children;
5929
6026
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5930
- title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.GroupLabel, { className: "text-base font-bold px-2 py-1.5", children: title }) : primitiveKind === "menu" ? /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.GroupLabel, { className: "text-base font-bold px-2 py-1.5", children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-bold px-2 py-1.5", children: title })),
6027
+ title && (primitiveKind === "context-menu" ? /* @__PURE__ */ jsxRuntime.jsx(contextMenu.ContextMenu.GroupLabel, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title }) : primitiveKind === "menu" ? /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.GroupLabel, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold px-2 py-1.5", children: title })),
5931
6028
  body
5932
6029
  ] });
5933
6030
  if (primitiveKind === "context-menu") {
@@ -6014,7 +6111,7 @@ function Meter({
6014
6111
  var NavbarContext = react.createContext({ showArrow: true });
6015
6112
  var triggerClassName = cn(
6016
6113
  "flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
6017
- "text-base font-medium text-foreground-primary bg-transparent border-0",
6114
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-medium text-foreground-primary bg-transparent border-0",
6018
6115
  "hover:bg-interactive data-[popup-open]:bg-interactive",
6019
6116
  "outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
6020
6117
  );
@@ -6152,7 +6249,7 @@ function NumberField({
6152
6249
  numberField.NumberField.Input,
6153
6250
  {
6154
6251
  placeholder,
6155
- className: "w-full min-w-0 text-base text-center tabular-nums bg-transparent py-2 px-3 outline-none placeholder:text-foreground-muted"
6252
+ className: "w-full min-w-0 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-center tabular-nums bg-transparent py-2 px-3 outline-none placeholder:text-foreground-muted"
6156
6253
  }
6157
6254
  ),
6158
6255
  /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Increment, { className: cn(stepperClasses, "border-l border-edge"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Plus, {}) }) })
@@ -6192,7 +6289,7 @@ function OTPField({
6192
6289
  otpField.OTPField.Input,
6193
6290
  {
6194
6291
  className: cn(
6195
- "size-10 text-center text-base rounded border border-edge bg-surface-base shadow-sm",
6292
+ "size-10 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] rounded border border-edge bg-surface-base shadow-sm",
6196
6293
  "text-foreground-primary outline-none transition-colors",
6197
6294
  "focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface-base",
6198
6295
  "data-[filled]:border-edge-strong",
@@ -6392,31 +6489,35 @@ function PasswordField({
6392
6489
  ...props
6393
6490
  }) {
6394
6491
  const [show, setShow] = react.useState(false);
6395
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6396
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6397
- /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className, children: [
6398
- /* @__PURE__ */ jsxRuntime.jsx(
6399
- InputGroupInput,
6400
- {
6401
- "aria-label": "Password",
6402
- ...props,
6403
- type: show ? "text" : "password",
6404
- disabled: isDisabled,
6405
- readOnly: isReadOnly
6406
- }
6407
- ),
6408
- /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6409
- InputGroupButton,
6410
- {
6411
- size: "icon-xs",
6412
- isDisabled,
6413
- "aria-label": show ? "Hide password" : "Show password",
6414
- onClick: () => setShow((state) => !state),
6415
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: show ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlash_default, {}) : /* @__PURE__ */ jsxRuntime.jsx(Eye_default, {}) })
6416
- }
6417
- ) })
6418
- ] })
6492
+ const input = /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className, children: [
6493
+ /* @__PURE__ */ jsxRuntime.jsx(
6494
+ InputGroupInput,
6495
+ {
6496
+ "aria-label": "Password",
6497
+ ...props,
6498
+ type: show ? "text" : "password",
6499
+ disabled: isDisabled,
6500
+ readOnly: isReadOnly
6501
+ }
6502
+ ),
6503
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6504
+ InputGroupButton,
6505
+ {
6506
+ size: "icon-xs",
6507
+ isDisabled,
6508
+ "aria-label": show ? "Hide password" : "Show password",
6509
+ onClick: () => setShow((state) => !state),
6510
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: show ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlash_default, {}) : /* @__PURE__ */ jsxRuntime.jsx(Eye_default, {}) })
6511
+ }
6512
+ ) })
6419
6513
  ] });
6514
+ if (label) {
6515
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
6516
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6517
+ input
6518
+ ] });
6519
+ }
6520
+ return input;
6420
6521
  }
6421
6522
  function ProgressBar({ className, showPercentage, ...props }) {
6422
6523
  return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
@@ -6468,7 +6569,7 @@ function ProgressCircle({
6468
6569
  ]
6469
6570
  }
6470
6571
  ),
6471
- showPercentage && /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Value, { className: "text-base font-bold absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" })
6572
+ showPercentage && /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Value, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-bold absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" })
6472
6573
  ]
6473
6574
  }
6474
6575
  );
@@ -6508,7 +6609,7 @@ function Radio({ children, className, isDisabled, ...props }) {
6508
6609
  ...props,
6509
6610
  disabled: isDisabled,
6510
6611
  className: cn(
6511
- "radio group flex items-center gap-3 cursor-pointer text-base",
6612
+ "radio group flex items-center gap-3 cursor-pointer text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
6512
6613
  "before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
6513
6614
  "before:border before:border-edge-strong before:bg-surface-base before:transition-all before:duration-200",
6514
6615
  "data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
@@ -6576,6 +6677,7 @@ function SearchField({
6576
6677
  ...props
6577
6678
  }) {
6578
6679
  const [search, setSearch] = react.useState(String(value ?? defaultValue));
6680
+ const wasControlled = react.useRef(value !== void 0);
6579
6681
  const searchValue = useDebounce(search, delay);
6580
6682
  const handleChange = (nextValue) => {
6581
6683
  setSearch(nextValue);
@@ -6586,49 +6688,56 @@ function SearchField({
6586
6688
  };
6587
6689
  react.useEffect(() => {
6588
6690
  if (value !== void 0) {
6691
+ wasControlled.current = true;
6589
6692
  setSearch(String(value));
6693
+ } else if (wasControlled.current) {
6694
+ setSearch(String(defaultValue));
6590
6695
  }
6591
- }, [value]);
6696
+ }, [value, defaultValue]);
6592
6697
  react.useEffect(() => {
6593
6698
  if (delay > 0) {
6594
6699
  onSearch?.(searchValue);
6595
6700
  }
6596
6701
  }, [searchValue, delay, onSearch]);
6597
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6598
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6599
- /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { role: "search", className, children: [
6600
- /* @__PURE__ */ jsxRuntime.jsx(
6601
- InputGroupInput,
6602
- {
6603
- "aria-label": "Search",
6604
- ...props,
6605
- type: "search",
6606
- placeholder,
6607
- value: search,
6608
- className: "[&::-webkit-search-cancel-button]:hidden",
6609
- onChange: (event) => handleChange(event.target.value),
6610
- onKeyDown: (event) => {
6611
- props.onKeyDown?.(event);
6612
- if (event.key === "Enter") {
6613
- onSearch?.(search);
6614
- }
6702
+ const input = /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { role: "search", className, children: [
6703
+ /* @__PURE__ */ jsxRuntime.jsx(
6704
+ InputGroupInput,
6705
+ {
6706
+ "aria-label": "Search",
6707
+ ...props,
6708
+ type: "search",
6709
+ placeholder,
6710
+ value: search,
6711
+ className: "[&::-webkit-search-cancel-button]:hidden",
6712
+ onChange: (event) => handleChange(event.target.value),
6713
+ onKeyDown: (event) => {
6714
+ props.onKeyDown?.(event);
6715
+ if (event.key === "Enter") {
6716
+ onSearch?.(search);
6615
6717
  }
6616
6718
  }
6617
- ),
6618
- /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { color: "muted", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Search, {}) }) }),
6619
- search && /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6620
- InputGroupButton,
6621
- {
6622
- size: "icon-xs",
6623
- isDisabled: props.disabled,
6624
- "aria-label": "Clear search",
6625
- className: "text-foreground-muted",
6626
- onClick: () => handleChange(""),
6627
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {}) })
6628
- }
6629
- ) })
6630
- ] })
6719
+ }
6720
+ ),
6721
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { color: "muted", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Search, {}) }) }),
6722
+ search && /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6723
+ InputGroupButton,
6724
+ {
6725
+ size: "icon-xs",
6726
+ isDisabled: props.disabled,
6727
+ "aria-label": "Clear search",
6728
+ className: "text-foreground-muted",
6729
+ onClick: () => handleChange(""),
6730
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {}) })
6731
+ }
6732
+ ) })
6631
6733
  ] });
6734
+ if (label) {
6735
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
6736
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6737
+ input
6738
+ ] });
6739
+ }
6740
+ return input;
6632
6741
  }
6633
6742
  function getSelectItemLabel(children, selectedValue) {
6634
6743
  let label;
@@ -6761,7 +6870,7 @@ function Select({
6761
6870
  }
6762
6871
  ),
6763
6872
  isLoading && /* @__PURE__ */ jsxRuntime.jsx(Loading, { className: "py-8", icon: "dots", placement: "center", size: "sm" }),
6764
- !isLoading && isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-8 text-center text-base text-foreground-muted", children: "No results found" }),
6873
+ !isLoading && isEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-8 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted", children: "No results found" }),
6765
6874
  /* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsxRuntime.jsx(
6766
6875
  ScrollArea,
6767
6876
  {
@@ -6914,7 +7023,7 @@ function Slider({
6914
7023
  children: [
6915
7024
  /* @__PURE__ */ jsxRuntime.jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
6916
7025
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
6917
- showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-base tabular-nums" })
7026
+ showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] tabular-nums" })
6918
7027
  ] }),
6919
7028
  /* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Control, { className: "relative h-5 w-full touch-none", children: [
6920
7029
  /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Track, { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-2 rounded-full bg-interactive overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Indicator, { className: "h-full rounded-full bg-primary" }) }),
@@ -6953,10 +7062,19 @@ function StatusDot({ color, variant }) {
6953
7062
  }
6954
7063
  function StatusLight(props) {
6955
7064
  const { color, variant = "inactive", children, className, ...domProps } = props;
6956
- return /* @__PURE__ */ jsxRuntime.jsxs(Row, { ...domProps, alignItems: "center", gap: "2", className, children: [
6957
- /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
6958
- children
6959
- ] });
7065
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7066
+ Row,
7067
+ {
7068
+ ...domProps,
7069
+ alignItems: "center",
7070
+ gap: "2",
7071
+ className: cn("text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]", className),
7072
+ children: [
7073
+ /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
7074
+ children
7075
+ ]
7076
+ }
7077
+ );
6960
7078
  }
6961
7079
  function Switch({
6962
7080
  label,
@@ -6973,7 +7091,7 @@ function Switch({
6973
7091
  const checked = isSelected ?? (typeof value === "boolean" ? value : void 0);
6974
7092
  const styles = switchVariant();
6975
7093
  const fieldId = useFieldId(id);
6976
- return /* @__PURE__ */ jsxRuntime.jsxs(Column, { children: [
7094
+ return /* @__PURE__ */ jsxRuntime.jsxs(Column, { gap: "1", children: [
6977
7095
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
6978
7096
  /* @__PURE__ */ jsxRuntime.jsxs(
6979
7097
  _switch.Switch.Root,
@@ -7038,7 +7156,7 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
7038
7156
  render: href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href }) : void 0,
7039
7157
  nativeButton: !href,
7040
7158
  className: cn(
7041
- "tab flex items-center justify-center text-base text-foreground-muted py-2 border-b-2 border-transparent select-none -mb-[2px] cursor-pointer outline-none",
7159
+ "tab flex items-center justify-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted py-2 border-b-2 border-transparent select-none -mb-[2px] cursor-pointer outline-none",
7042
7160
  "hover:text-foreground-primary",
7043
7161
  "data-[active]:text-foreground-primary data-[active]:border-b-primary",
7044
7162
  "data-[disabled]:text-foreground-disabled data-[disabled]:cursor-default",
@@ -7249,27 +7367,31 @@ function Toggle({
7249
7367
  ...props
7250
7368
  }) {
7251
7369
  const labelId = react.useId();
7252
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7253
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7254
- /* @__PURE__ */ jsxRuntime.jsx(
7255
- toggle.Toggle,
7256
- {
7257
- ...props,
7258
- "aria-labelledby": label ? labelId : props["aria-labelledby"],
7259
- pressed: isSelected,
7260
- defaultPressed: defaultSelected,
7261
- disabled: isDisabled,
7262
- onPressedChange: onChange,
7263
- className: cn(
7264
- "flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
7265
- "hover:bg-interactive-hover",
7266
- "data-[pressed]:text-primary-foreground data-[pressed]:bg-primary",
7267
- className
7268
- ),
7269
- children
7270
- }
7271
- )
7272
- ] });
7370
+ const toggle$1 = /* @__PURE__ */ jsxRuntime.jsx(
7371
+ toggle.Toggle,
7372
+ {
7373
+ ...props,
7374
+ "aria-labelledby": label ? labelId : props["aria-labelledby"],
7375
+ pressed: isSelected,
7376
+ defaultPressed: defaultSelected,
7377
+ disabled: isDisabled,
7378
+ onPressedChange: onChange,
7379
+ className: cn(
7380
+ "flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
7381
+ "hover:bg-interactive-hover",
7382
+ "data-[pressed]:text-primary-foreground data-[pressed]:bg-primary",
7383
+ className
7384
+ ),
7385
+ children
7386
+ }
7387
+ );
7388
+ if (label) {
7389
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
7390
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7391
+ toggle$1
7392
+ ] });
7393
+ }
7394
+ return toggle$1;
7273
7395
  }
7274
7396
  var ToggleGroupVariantContext = react.createContext(void 0);
7275
7397
  function ToggleGroup({
@@ -7291,25 +7413,29 @@ function ToggleGroup({
7291
7413
  onSelectionChange?.(new Set(keys));
7292
7414
  onChange?.(keys);
7293
7415
  };
7294
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7295
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7296
- /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
7297
- toggleGroup.ToggleGroup,
7298
- {
7299
- ...props,
7300
- "aria-labelledby": label ? labelId : props["aria-labelledby"],
7301
- value: value || (selectedKeys ? Array.from(selectedKeys) : void 0),
7302
- defaultValue: defaultValue || (defaultSelectedKeys ? Array.from(defaultSelectedKeys) : void 0),
7303
- multiple: selectionMode === "multiple",
7304
- onValueChange: handleChange,
7305
- className: cn(
7306
- "inline-flex bg-surface-base shadow-sm border border-edge rounded overflow-hidden",
7307
- className
7308
- ),
7309
- children
7310
- }
7311
- ) })
7312
- ] });
7416
+ const group = /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
7417
+ toggleGroup.ToggleGroup,
7418
+ {
7419
+ ...props,
7420
+ "aria-labelledby": label ? labelId : props["aria-labelledby"],
7421
+ value: value || (selectedKeys ? Array.from(selectedKeys) : void 0),
7422
+ defaultValue: defaultValue || (defaultSelectedKeys ? Array.from(defaultSelectedKeys) : void 0),
7423
+ multiple: selectionMode === "multiple",
7424
+ onValueChange: handleChange,
7425
+ className: cn(
7426
+ "inline-flex bg-surface-base shadow-sm border border-edge rounded overflow-hidden",
7427
+ className
7428
+ ),
7429
+ children
7430
+ }
7431
+ ) });
7432
+ if (label) {
7433
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
7434
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7435
+ group
7436
+ ] });
7437
+ }
7438
+ return group;
7313
7439
  }
7314
7440
  function ToggleGroupItem({
7315
7441
  id,