@umami/react-zen 0.249.0 → 0.250.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
@@ -123,7 +123,7 @@ var paddingMap = {
123
123
  "72": "p-72",
124
124
  "80": "p-80",
125
125
  "96": "p-96",
126
- true: "px-[var(--padding-x-default)] py-[var(--padding-y-default)]"
126
+ true: "px-[var(--zen-padding-x-default)] py-[var(--zen-padding-y-default)]"
127
127
  };
128
128
  var pxMap = {
129
129
  "0": "px-0",
@@ -161,7 +161,7 @@ var pxMap = {
161
161
  "72": "px-72",
162
162
  "80": "px-80",
163
163
  "96": "px-96",
164
- true: "px-[var(--padding-x-default)]"
164
+ true: "px-[var(--zen-padding-x-default)]"
165
165
  };
166
166
  var pyMap = {
167
167
  "0": "py-0",
@@ -199,7 +199,7 @@ var pyMap = {
199
199
  "72": "py-72",
200
200
  "80": "py-80",
201
201
  "96": "py-96",
202
- true: "py-[var(--padding-y-default)]"
202
+ true: "py-[var(--zen-padding-y-default)]"
203
203
  };
204
204
  var ptMap = {
205
205
  "0": "pt-0",
@@ -350,6 +350,7 @@ var plMap = {
350
350
  "96": "pl-96"
351
351
  };
352
352
  var marginMap = {
353
+ auto: "m-auto",
353
354
  "0": "m-0",
354
355
  px: "m-px",
355
356
  "0.5": "m-0.5",
@@ -408,6 +409,7 @@ var marginMap = {
408
409
  "-24": "-m-24"
409
410
  };
410
411
  var mxMap = {
412
+ auto: "mx-auto",
411
413
  "0": "mx-0",
412
414
  px: "mx-px",
413
415
  "0.5": "mx-0.5",
@@ -445,6 +447,7 @@ var mxMap = {
445
447
  "-4": "-mx-4"
446
448
  };
447
449
  var myMap = {
450
+ auto: "my-auto",
448
451
  "0": "my-0",
449
452
  px: "my-px",
450
453
  "0.5": "my-0.5",
@@ -482,6 +485,7 @@ var myMap = {
482
485
  "-4": "-my-4"
483
486
  };
484
487
  var mtMap = {
488
+ auto: "mt-auto",
485
489
  "0": "mt-0",
486
490
  px: "mt-px",
487
491
  "0.5": "mt-0.5",
@@ -519,6 +523,7 @@ var mtMap = {
519
523
  "-4": "-mt-4"
520
524
  };
521
525
  var mrMap = {
526
+ auto: "mr-auto",
522
527
  "0": "mr-0",
523
528
  px: "mr-px",
524
529
  "0.5": "mr-0.5",
@@ -556,6 +561,7 @@ var mrMap = {
556
561
  "-4": "-mr-4"
557
562
  };
558
563
  var mbMap = {
564
+ auto: "mb-auto",
559
565
  "0": "mb-0",
560
566
  px: "mb-px",
561
567
  "0.5": "mb-0.5",
@@ -593,6 +599,7 @@ var mbMap = {
593
599
  "-4": "-mb-4"
594
600
  };
595
601
  var mlMap = {
602
+ auto: "ml-auto",
596
603
  "0": "ml-0",
597
604
  px: "ml-px",
598
605
  "0.5": "ml-0.5",
@@ -665,7 +672,7 @@ var gapMap = {
665
672
  "72": "gap-72",
666
673
  "80": "gap-80",
667
674
  "96": "gap-96",
668
- true: "gap-[var(--gap-default)]"
675
+ true: "gap-[var(--zen-gap-default)]"
669
676
  };
670
677
  var gapXMap = {
671
678
  "0": "gap-x-0",
@@ -692,7 +699,7 @@ var gapXMap = {
692
699
  "24": "gap-x-24",
693
700
  "28": "gap-x-28",
694
701
  "32": "gap-x-32",
695
- true: "gap-x-[var(--gap-default)]"
702
+ true: "gap-x-[var(--zen-gap-default)]"
696
703
  };
697
704
  var gapYMap = {
698
705
  "0": "gap-y-0",
@@ -719,7 +726,7 @@ var gapYMap = {
719
726
  "24": "gap-y-24",
720
727
  "28": "gap-y-28",
721
728
  "32": "gap-y-32",
722
- true: "gap-y-[var(--gap-default)]"
729
+ true: "gap-y-[var(--zen-gap-default)]"
723
730
  };
724
731
  var spaceXMap = {
725
732
  "0": "space-x-0",
@@ -796,33 +803,33 @@ var spaceYMap = {
796
803
  "96": "space-y-96"
797
804
  };
798
805
  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"
806
+ xs: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]",
807
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
808
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
809
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
810
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
811
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
812
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
813
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
814
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
815
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]",
816
+ "7xl": "text-[length:var(--zen-font-size-7xl)]/[var(--zen-line-height-7xl)]",
817
+ "8xl": "text-[length:var(--zen-font-size-8xl)]/[var(--zen-line-height-8xl)]",
818
+ "9xl": "text-[length:var(--zen-font-size-9xl)]/[var(--zen-line-height-9xl)]"
812
819
  };
813
820
  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"
821
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
822
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
823
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
824
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
825
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
826
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
827
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
828
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
829
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]",
830
+ "7xl": "text-[length:var(--zen-font-size-7xl)]/[var(--zen-line-height-7xl)]",
831
+ "8xl": "text-[length:var(--zen-font-size-8xl)]/[var(--zen-line-height-8xl)]",
832
+ "9xl": "text-[length:var(--zen-font-size-9xl)]/[var(--zen-line-height-9xl)]"
826
833
  };
827
834
  var fontWeightMap = {
828
835
  thin: "font-thin",
@@ -844,7 +851,7 @@ var borderRadiusMap = {
844
851
  "2xl": "rounded-2xl",
845
852
  "3xl": "rounded-3xl",
846
853
  full: "rounded-full",
847
- true: "rounded-[var(--radius-default)]"
854
+ true: "rounded-[var(--zen-radius-default)]"
848
855
  };
849
856
  var borderWidthMap = {
850
857
  sm: "border",
@@ -860,7 +867,7 @@ var shadowMap = {
860
867
  xl: "shadow-xl",
861
868
  "2xl": "shadow-2xl",
862
869
  inner: "shadow-inner",
863
- true: "shadow-[var(--shadow-default)]"
870
+ true: "shadow-[var(--zen-shadow-default)]"
864
871
  };
865
872
  var semanticColorMap = {
866
873
  primary: { text: "text-foreground-primary", bg: "bg-primary" },
@@ -1372,9 +1379,9 @@ function mapBorderColor(value) {
1372
1379
  return "";
1373
1380
  }
1374
1381
  var semanticCssColorValues = {
1375
- primary: "var(--text-primary)",
1376
- muted: "var(--text-muted)",
1377
- disabled: "var(--text-disabled)"
1382
+ primary: "var(--zen-text-primary)",
1383
+ muted: "var(--zen-text-muted)",
1384
+ disabled: "var(--zen-text-disabled)"
1378
1385
  };
1379
1386
  var tailwindColorHex = {
1380
1387
  gray: {
@@ -2225,7 +2232,10 @@ function Accordion({
2225
2232
  value: expandedKeys ? Array.from(expandedKeys) : void 0,
2226
2233
  defaultValue: defaultExpandedKeys ? Array.from(defaultExpandedKeys) : void 0,
2227
2234
  onValueChange: (value) => onExpandedChange?.(new Set(value)),
2228
- className: cn("flex flex-col items-start w-full gap-2 text-base", className),
2235
+ className: cn(
2236
+ "flex flex-col items-start w-full gap-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2237
+ className
2238
+ ),
2229
2239
  children
2230
2240
  }
2231
2241
  );
@@ -2247,7 +2257,7 @@ function AccordionItem({
2247
2257
  disabled: isDisabled,
2248
2258
  className: cn("w-full cursor-pointer group", className),
2249
2259
  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: [
2260
+ /* @__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
2261
  /* @__PURE__ */ jsxRuntime.jsx(Text, { children: trigger }),
2252
2262
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "transition-transform duration-200 group-data-[open]:rotate-90", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronRight, {}) })
2253
2263
  ] }) }),
@@ -2303,11 +2313,11 @@ var button = tailwindVariants.tv({
2303
2313
  ]
2304
2314
  },
2305
2315
  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"
2316
+ xs: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] py-1 px-2",
2317
+ sm: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-1.5 px-2.5",
2318
+ md: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-2 px-3",
2319
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] py-2.5 px-4",
2320
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)] py-3 px-5"
2311
2321
  }
2312
2322
  },
2313
2323
  defaultVariants: {
@@ -2318,7 +2328,7 @@ var button = tailwindVariants.tv({
2318
2328
  var inputField = tailwindVariants.tv({
2319
2329
  base: [
2320
2330
  "relative flex items-center",
2321
- "text-base rounded border border-edge bg-surface-base shadow-sm",
2331
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] rounded border border-edge bg-surface-base shadow-sm",
2322
2332
  "leading-6 text-foreground-primary transition-colors",
2323
2333
  "focus-within:border-edge-strong",
2324
2334
  "has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
@@ -2337,7 +2347,7 @@ var inputField = tailwindVariants.tv({
2337
2347
  tailwindVariants.tv({
2338
2348
  base: [
2339
2349
  "flex items-center justify-between",
2340
- "gap-3 text-base py-2 px-3 min-w-[120px]",
2350
+ "gap-3 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] py-2 px-3 min-w-[120px]",
2341
2351
  "cursor-pointer outline-none rounded",
2342
2352
  "text-foreground-primary",
2343
2353
  "hovered:bg-interactive",
@@ -2374,13 +2384,15 @@ tailwindVariants.tv({
2374
2384
  }
2375
2385
  });
2376
2386
  var tooltip = tailwindVariants.tv({
2377
- base: ["bg-surface-inverted text-surface-base text-base px-2 py-1 rounded"]
2387
+ base: [
2388
+ "bg-surface-inverted text-surface-base text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] px-2 py-1 rounded"
2389
+ ]
2378
2390
  });
2379
2391
  var checkbox = tailwindVariants.tv({
2380
2392
  slots: {
2381
2393
  root: [
2382
2394
  "group flex items-center gap-3",
2383
- "text-base cursor-pointer",
2395
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2384
2396
  "disabled:text-foreground-disabled disabled:cursor-default"
2385
2397
  ],
2386
2398
  box: [
@@ -2404,7 +2416,7 @@ var switchVariant = tailwindVariants.tv({
2404
2416
  slots: {
2405
2417
  root: [
2406
2418
  "group flex items-center gap-3",
2407
- "text-base cursor-pointer",
2419
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2408
2420
  "disabled:opacity-50 disabled:cursor-default"
2409
2421
  ],
2410
2422
  track: [
@@ -2427,7 +2439,7 @@ tailwindVariants.tv({
2427
2439
  root: "flex flex-col",
2428
2440
  list: ["flex gap-1 border-b border-edge-muted"],
2429
2441
  tab: [
2430
- "px-4 py-2 text-base font-medium cursor-pointer",
2442
+ "px-4 py-2 text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-medium cursor-pointer",
2431
2443
  "text-foreground-muted outline-none",
2432
2444
  "border-b-2 border-transparent -mb-px",
2433
2445
  "hovered:text-foreground-primary",
@@ -2442,14 +2454,14 @@ tailwindVariants.tv({
2442
2454
  base: "text-foreground-primary",
2443
2455
  variants: {
2444
2456
  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"
2457
+ xs: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]",
2458
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
2459
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2460
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
2461
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
2462
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
2463
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
2464
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]"
2453
2465
  },
2454
2466
  color: {
2455
2467
  default: "",
@@ -2476,15 +2488,15 @@ tailwindVariants.tv({
2476
2488
  base: "font-semibold text-foreground-primary",
2477
2489
  variants: {
2478
2490
  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"
2491
+ sm: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
2492
+ base: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
2493
+ lg: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]",
2494
+ xl: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]",
2495
+ "2xl": "text-[length:var(--zen-font-size-2xl)]/[var(--zen-line-height-2xl)]",
2496
+ "3xl": "text-[length:var(--zen-font-size-3xl)]/[var(--zen-line-height-3xl)]",
2497
+ "4xl": "text-[length:var(--zen-font-size-4xl)]/[var(--zen-line-height-4xl)]",
2498
+ "5xl": "text-[length:var(--zen-font-size-5xl)]/[var(--zen-line-height-5xl)]",
2499
+ "6xl": "text-[length:var(--zen-font-size-6xl)]/[var(--zen-line-height-6xl)]"
2488
2500
  }
2489
2501
  },
2490
2502
  defaultVariants: {
@@ -2493,7 +2505,7 @@ tailwindVariants.tv({
2493
2505
  });
2494
2506
  var alert = tailwindVariants.tv({
2495
2507
  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",
2508
+ "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
2509
  "has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
2498
2510
  "[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
2499
2511
  ],
@@ -2526,7 +2538,7 @@ tailwindVariants.tv({
2526
2538
  base: "inline-flex items-center gap-2",
2527
2539
  slots: {
2528
2540
  dot: "w-2 h-2 rounded-full",
2529
- label: "text-base"
2541
+ label: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2530
2542
  },
2531
2543
  variants: {
2532
2544
  color: {
@@ -2546,7 +2558,7 @@ var toast = tailwindVariants.tv({
2546
2558
  "flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
2547
2559
  "bg-surface-overlay",
2548
2560
  "border border-edge-muted",
2549
- "text-base"
2561
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2550
2562
  ],
2551
2563
  variants: {
2552
2564
  variant: {
@@ -2595,8 +2607,8 @@ var badge = tailwindVariants.tv({
2595
2607
  rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
2596
2608
  },
2597
2609
  size: {
2598
- sm: "text-xs px-2 py-0.5",
2599
- md: "text-sm px-2.5 py-0.5"
2610
+ sm: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)] px-2 py-0.5",
2611
+ md: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] px-2.5 py-0.5"
2600
2612
  }
2601
2613
  },
2602
2614
  defaultVariants: {
@@ -2618,11 +2630,26 @@ var avatar = tailwindVariants.tv({
2618
2630
  },
2619
2631
  variants: {
2620
2632
  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" }
2633
+ xs: {
2634
+ root: "size-6",
2635
+ fallback: "text-[length:var(--zen-font-size-xs)]/[var(--zen-line-height-xs)]"
2636
+ },
2637
+ sm: {
2638
+ root: "size-8",
2639
+ fallback: "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]"
2640
+ },
2641
+ md: {
2642
+ root: "size-10",
2643
+ fallback: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2644
+ },
2645
+ lg: {
2646
+ root: "size-12",
2647
+ fallback: "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)]"
2648
+ },
2649
+ xl: {
2650
+ root: "size-16",
2651
+ fallback: "text-[length:var(--zen-font-size-xl)]/[var(--zen-line-height-xl)]"
2652
+ }
2626
2653
  }
2627
2654
  },
2628
2655
  defaultVariants: {
@@ -2632,7 +2659,7 @@ var avatar = tailwindVariants.tv({
2632
2659
  var tag = tailwindVariants.tv({
2633
2660
  slots: {
2634
2661
  base: [
2635
- "inline-flex items-center gap-1 px-2 py-0.5 rounded text-sm",
2662
+ "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
2663
  "cursor-default outline-none",
2637
2664
  "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
2638
2665
  ],
@@ -2693,7 +2720,7 @@ var AlertDescription = react.forwardRef(
2693
2720
  ref,
2694
2721
  "data-slot": "alert-description",
2695
2722
  className: cn(
2696
- "col-start-2 grid justify-items-start gap-1 text-base text-foreground-muted [&_p]:leading-relaxed",
2723
+ "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
2724
  className
2698
2725
  )
2699
2726
  }
@@ -2703,7 +2730,10 @@ AlertDescription.displayName = "AlertDescription";
2703
2730
  function Button({
2704
2731
  variant,
2705
2732
  size = "md",
2706
- render,
2733
+ render: renderProp,
2734
+ href,
2735
+ target,
2736
+ rel,
2707
2737
  preventFocusOnPress: _preventFocusOnPress = true,
2708
2738
  nativeButton,
2709
2739
  isDisabled,
@@ -2715,6 +2745,14 @@ function Button({
2715
2745
  ...props
2716
2746
  }) {
2717
2747
  const buttonClassName = button({ variant, size, className });
2748
+ const render = renderProp ?? (href ? /* @__PURE__ */ jsxRuntime.jsx(
2749
+ "a",
2750
+ {
2751
+ href,
2752
+ target,
2753
+ rel: rel ?? (target === "_blank" ? "noreferrer" : void 0)
2754
+ }
2755
+ ) : void 0);
2718
2756
  const isNativeButton = nativeButton ?? (render === void 0 || react.isValidElement(render) && render.type === "button");
2719
2757
  const handleClick = (event) => {
2720
2758
  onClick?.(event);
@@ -3239,7 +3277,7 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
3239
3277
  ...props,
3240
3278
  "aria-disabled": isDisabled || void 0,
3241
3279
  className: cn(
3242
- "flex items-center text-base gap-3 list-none",
3280
+ "flex items-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3 list-none",
3243
3281
  "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal",
3244
3282
  "[&_a:hover]:text-foreground-primary",
3245
3283
  "last:[&>span]:hidden",
@@ -3296,7 +3334,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
3296
3334
  }
3297
3335
  function ButtonGroupText({ className, render, children, ...props }) {
3298
3336
  const classes = cn(
3299
- "flex items-center gap-2 rounded border border-edge bg-surface-raised px-4 text-sm font-medium shadow-sm",
3337
+ "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
3338
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
3301
3339
  className
3302
3340
  );
@@ -3360,7 +3398,18 @@ function Calendar({
3360
3398
  onChange?.(date);
3361
3399
  }
3362
3400
  },
3363
- className: cn("w-fit max-w-full text-base", className),
3401
+ className: cn(
3402
+ "w-fit max-w-full text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
3403
+ // The month grid is a real <table>; host prose styles (docs sites,
3404
+ // CMS themes) often style table/th/td with borders, padding, and
3405
+ // width. Reset them at matching specificity so zen styles hold.
3406
+ "[&_table]:m-0 [&_table]:w-auto [&_table]:border-0 [&_table]:text-[length:inherit]",
3407
+ "[&_th]:border-0 [&_th]:p-0 [&_th]:text-center [&_th]:align-middle",
3408
+ "[&_td]:border-0 [&_td]:p-0 [&_td]:text-center [&_td]:align-middle",
3409
+ "[&_th:first-child]:pl-0 [&_th:last-child]:pr-0",
3410
+ "[&_td:first-child]:pl-0 [&_td:last-child]:pr-0",
3411
+ className
3412
+ ),
3364
3413
  classNames: {
3365
3414
  months: "relative",
3366
3415
  month: "space-y-4",
@@ -3374,7 +3423,7 @@ function Calendar({
3374
3423
  week: "flex mt-1",
3375
3424
  day: "size-12 text-center",
3376
3425
  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",
3426
+ selected: "[&>button]:text-primary-foreground [&>button]:bg-primary [&>button:hover]:bg-primary",
3378
3427
  outside: "invisible",
3379
3428
  disabled: "text-foreground-disabled pointer-events-none opacity-50",
3380
3429
  today: "[&>button]:font-bold"
@@ -3643,7 +3692,7 @@ function CollapsibleTrigger({ className, children, ...props }) {
3643
3692
  {
3644
3693
  ...props,
3645
3694
  className: cn(
3646
- "flex items-center gap-2 cursor-pointer outline-none text-base",
3695
+ "flex items-center gap-2 cursor-pointer outline-none text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
3647
3696
  "focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
3648
3697
  "disabled:text-foreground-disabled disabled:cursor-default",
3649
3698
  className
@@ -3794,23 +3843,27 @@ function List({
3794
3843
  if (parent.kind === "combobox") {
3795
3844
  return /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.List, { ...props, id: fieldId, className: classes, style, children });
3796
3845
  }
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
- ] });
3846
+ const listbox = /* @__PURE__ */ jsxRuntime.jsx(ListContext.Provider, { value: { kind: "native", selected, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx(
3847
+ "div",
3848
+ {
3849
+ id: fieldId,
3850
+ role: "listbox",
3851
+ "aria-multiselectable": selectionMode === "multiple" || void 0,
3852
+ ...props,
3853
+ className: classes,
3854
+ style: { ...style, ...getHighlightColor(highlightColor) },
3855
+ children: children || renderEmptyState?.({})
3856
+ }
3857
+ ) });
3858
+ if (label) {
3859
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
3860
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
3861
+ listbox
3862
+ ] });
3863
+ }
3864
+ return listbox;
3812
3865
  }
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";
3866
+ 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
3867
  function ListItem({
3815
3868
  id,
3816
3869
  value,
@@ -3892,18 +3945,18 @@ function ListSection({ title, className, children, ...props }) {
3892
3945
  const { kind } = react.useContext(ListContext);
3893
3946
  if (kind === "select") {
3894
3947
  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 }),
3948
+ 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
3949
  children
3897
3950
  ] });
3898
3951
  }
3899
3952
  if (kind === "combobox") {
3900
3953
  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 }),
3954
+ 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
3955
  children
3903
3956
  ] });
3904
3957
  }
3905
3958
  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 }),
3959
+ 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
3960
  children
3908
3961
  ] });
3909
3962
  }
@@ -3953,7 +4006,7 @@ var InputGroupAddon = react.forwardRef(
3953
4006
  "data-slot": "input-group-addon",
3954
4007
  "data-align": align,
3955
4008
  className: cn(
3956
- "flex h-auto shrink-0 cursor-text items-center justify-center gap-2 py-2 text-sm text-foreground-muted",
4009
+ "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
4010
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
3958
4011
  addonClasses[align],
3959
4012
  className
@@ -3965,8 +4018,8 @@ var InputGroupAddon = react.forwardRef(
3965
4018
  );
3966
4019
  InputGroupAddon.displayName = "InputGroupAddon";
3967
4020
  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",
4021
+ xs: "h-6 gap-1 rounded px-1.5 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
4022
+ sm: "h-8 gap-2 rounded px-2 py-0 text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
3970
4023
  "icon-xs": "size-6 rounded p-0",
3971
4024
  "icon-sm": "size-8 rounded p-0"
3972
4025
  };
@@ -3998,7 +4051,7 @@ var InputGroupText = react.forwardRef(
3998
4051
  ref,
3999
4052
  "data-slot": "input-group-text",
4000
4053
  className: cn(
4001
- "flex items-center gap-2 text-sm text-foreground-muted [&_svg]:pointer-events-none [&_svg]:size-4",
4054
+ "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
4055
  className
4003
4056
  )
4004
4057
  }
@@ -4013,7 +4066,7 @@ var InputGroupInput = react.forwardRef(
4013
4066
  ref,
4014
4067
  "data-slot": "input-group-control",
4015
4068
  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",
4069
+ "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
4070
  className
4018
4071
  )
4019
4072
  }
@@ -4027,7 +4080,7 @@ var InputGroupTextarea = react.forwardRef(({ className, ...props }, ref) => /* @
4027
4080
  ref,
4028
4081
  "data-slot": "input-group-control",
4029
4082
  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",
4083
+ "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
4084
  className
4032
4085
  )
4033
4086
  }
@@ -4134,7 +4187,7 @@ function ComboBox({
4134
4187
  disabled: isDisabled,
4135
4188
  onValueChange: onChange,
4136
4189
  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 }),
4190
+ 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
4191
  /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { render: /* @__PURE__ */ jsxRuntime.jsx(InputGroup, {}), children: [
4139
4192
  /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { placeholder, render: /* @__PURE__ */ jsxRuntime.jsx(InputGroupInput, {}) }),
4140
4193
  /* @__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 +4207,7 @@ function ComboBox({
4154
4207
  }
4155
4208
  return item.element ?? /* @__PURE__ */ jsxRuntime.jsx(ListItem, { value: item.value, children: item.label }, item.value);
4156
4209
  } }) }) }) }),
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." }) }) })
4210
+ /* @__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
4211
  ] })
4159
4212
  }
4160
4213
  ) })
@@ -4210,7 +4263,7 @@ function CommandInput({ className, ...props }) {
4210
4263
  {
4211
4264
  ...props,
4212
4265
  className: cn(
4213
- "flex h-11 w-full bg-transparent text-base outline-none",
4266
+ "flex h-11 w-full bg-transparent text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] outline-none",
4214
4267
  "placeholder:text-foreground-muted",
4215
4268
  "disabled:cursor-not-allowed disabled:text-foreground-disabled",
4216
4269
  className
@@ -4227,7 +4280,10 @@ function CommandEmpty({ className, ...props }) {
4227
4280
  cmdk.Command.Empty,
4228
4281
  {
4229
4282
  ...props,
4230
- className: cn("py-6 text-center text-base text-foreground-muted", className)
4283
+ className: cn(
4284
+ "py-6 text-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] text-foreground-muted",
4285
+ className
4286
+ )
4231
4287
  }
4232
4288
  );
4233
4289
  }
@@ -4239,7 +4295,7 @@ function CommandGroup({ className, ...props }) {
4239
4295
  className: cn(
4240
4296
  "overflow-hidden [&:not(:last-child)]:mb-2",
4241
4297
  "[&_[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",
4298
+ "[&_[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
4299
  className
4244
4300
  )
4245
4301
  }
@@ -4252,7 +4308,7 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
4252
4308
  ...props,
4253
4309
  disabled: isDisabled,
4254
4310
  className: cn(
4255
- "flex items-center gap-3 px-2 py-1.5 rounded cursor-pointer outline-none text-base",
4311
+ "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
4312
  "data-[selected=true]:bg-interactive",
4257
4313
  "data-[disabled=true]:text-foreground-disabled data-[disabled=true]:cursor-default",
4258
4314
  className
@@ -4349,6 +4405,7 @@ function TextField({
4349
4405
  ...props
4350
4406
  }) {
4351
4407
  const [inputValue, setInputValue] = react.useState(defaultValue ?? value ?? "");
4408
+ const wasControlled = react.useRef(value !== void 0);
4352
4409
  const handleChange = (event) => {
4353
4410
  const nextValue = event.target.value;
4354
4411
  setInputValue(nextValue);
@@ -4356,68 +4413,75 @@ function TextField({
4356
4413
  };
4357
4414
  react.useEffect(() => {
4358
4415
  if (value !== void 0) {
4416
+ wasControlled.current = true;
4359
4417
  setInputValue(value);
4418
+ } else if (wasControlled.current) {
4419
+ setInputValue(defaultValue ?? "");
4360
4420
  }
4361
- }, [value]);
4421
+ }, [value, defaultValue]);
4362
4422
  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
4423
+ const input = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4424
+ InputGroup,
4425
+ {
4426
+ variant: variant === "quiet" ? "quiet" : "default",
4427
+ className: cn(
4428
+ isReadOnly && "focus-within:border-edge",
4429
+ isDisabled && "text-foreground-disabled",
4430
+ variant === "quiet" && "text-[length:inherit]",
4431
+ className
4432
+ ),
4433
+ children: [
4434
+ asTextArea ? /* @__PURE__ */ jsxRuntime.jsx(
4435
+ InputGroupTextarea,
4436
+ {
4437
+ ...props,
4438
+ placeholder,
4439
+ value: inputValue,
4440
+ readOnly: isReadOnly,
4441
+ disabled: isDisabled,
4442
+ className: inputClasses,
4443
+ onChange: handleChange
4444
+ }
4445
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
4446
+ InputGroupInput,
4447
+ {
4448
+ ...props,
4449
+ placeholder,
4450
+ value: inputValue,
4451
+ readOnly: isReadOnly,
4452
+ disabled: isDisabled,
4453
+ className: inputClasses,
4454
+ onChange: handleChange
4455
+ }
4374
4456
  ),
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
- ] });
4457
+ allowCopy && /* @__PURE__ */ jsxRuntime.jsx(
4458
+ InputGroupAddon,
4459
+ {
4460
+ align: asTextArea ? "block-start" : "inline-end",
4461
+ className: cn(asTextArea && "justify-end pb-0"),
4462
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4463
+ CopyButton,
4464
+ {
4465
+ value: String(inputValue),
4466
+ "aria-disabled": !inputValue,
4467
+ className: cn(
4468
+ "text-foreground-muted hover:text-foreground-primary",
4469
+ !inputValue && "text-foreground-disabled"
4470
+ )
4471
+ }
4472
+ )
4473
+ }
4474
+ )
4475
+ ]
4476
+ }
4477
+ ) });
4478
+ if (label) {
4479
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
4480
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
4481
+ input
4482
+ ] });
4483
+ }
4484
+ return input;
4421
4485
  }
4422
4486
  function ConfirmationDialog({
4423
4487
  value,
@@ -4444,7 +4508,7 @@ function ConfirmationDialog({
4444
4508
  paddingY: "2",
4445
4509
  marginY: "2",
4446
4510
  borderRadius: "md",
4447
- className: "font-mono text-base bg-surface-sunken",
4511
+ className: "font-mono text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] bg-surface-sunken",
4448
4512
  children: value
4449
4513
  }
4450
4514
  ),
@@ -4713,7 +4777,17 @@ function Table({
4713
4777
  }),
4714
4778
  [registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
4715
4779
  );
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 }) });
4780
+ return /* @__PURE__ */ jsxRuntime.jsx(TableSelectionContext.Provider, { value: selection, children: /* @__PURE__ */ jsxRuntime.jsx(
4781
+ "table",
4782
+ {
4783
+ ...props,
4784
+ className: cn(
4785
+ "grid text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] w-full relative",
4786
+ className
4787
+ ),
4788
+ children
4789
+ }
4790
+ ) });
4717
4791
  }
4718
4792
  function TableHeader({ children, className, style, ...props }) {
4719
4793
  const cols = style?.gridTemplateColumns || gridTemplateColumns;
@@ -4848,34 +4922,44 @@ function DataTable({
4848
4922
  return /* @__PURE__ */ jsxRuntime.jsx(DataCard, { data: items }, `${row.id}-${index}`);
4849
4923
  }) });
4850
4924
  }
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 }) => {
4925
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4926
+ Table,
4927
+ {
4928
+ ...props,
4929
+ className: cn(
4930
+ "relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
4931
+ className
4932
+ ),
4933
+ children: [
4934
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
4862
4935
  if (hidden) {
4863
4936
  return null;
4864
4937
  }
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
4938
+ return /* @__PURE__ */ react.createElement(TableColumn, { ...columnProps, key: id, id }, label);
4939
+ }) }),
4940
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row, index) => {
4941
+ return (
4942
+ // biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
4943
+ /* @__PURE__ */ jsxRuntime.jsx(TableRow, { id: String(row.id), style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
4944
+ if (hidden) {
4945
+ return null;
4946
+ }
4947
+ const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
4948
+ return /* @__PURE__ */ react.createElement(
4949
+ TableCell,
4950
+ {
4951
+ ...cellProps,
4952
+ key: id,
4953
+ className: cn("items-center", className2)
4954
+ },
4955
+ as ? react.createElement(as, {}, value) : value
4956
+ );
4957
+ }) }, index)
4874
4958
  );
4875
- }) }, index)
4876
- );
4877
- }) })
4878
- ] });
4959
+ }) })
4960
+ ]
4961
+ }
4962
+ );
4879
4963
  }
4880
4964
  function DataColumn(_props) {
4881
4965
  return null;
@@ -5028,7 +5112,10 @@ var EmptyTitle = react.forwardRef(
5028
5112
  ...props,
5029
5113
  ref,
5030
5114
  "data-slot": "empty-title",
5031
- className: cn("text-lg font-medium tracking-tight", className)
5115
+ className: cn(
5116
+ "text-[length:var(--zen-font-size-lg)]/[var(--zen-line-height-lg)] font-medium tracking-tight",
5117
+ className
5118
+ )
5032
5119
  }
5033
5120
  )
5034
5121
  );
@@ -5040,7 +5127,7 @@ var EmptyDescription = react.forwardRef(({ className, ...props }, ref) => /* @__
5040
5127
  ref,
5041
5128
  "data-slot": "empty-description",
5042
5129
  className: cn(
5043
- "text-foreground-muted [&>a:hover]:text-foreground-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
5130
+ "text-foreground-muted [&>a:hover]:text-foreground-primary text-[length:var(--zen-font-size-sm)]/relaxed [&>a]:underline [&>a]:underline-offset-4",
5044
5131
  className
5045
5132
  )
5046
5133
  }
@@ -5054,7 +5141,7 @@ var EmptyContent = react.forwardRef(
5054
5141
  ref,
5055
5142
  "data-slot": "empty-content",
5056
5143
  className: cn(
5057
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
5144
+ "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
5145
  className
5059
5146
  )
5060
5147
  }
@@ -5189,7 +5276,10 @@ function Form({
5189
5276
  {
5190
5277
  ...props,
5191
5278
  autoComplete,
5192
- className: cn("flex flex-col relative text-base gap-3", className),
5279
+ className: cn(
5280
+ "flex flex-col relative text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3",
5281
+ className
5282
+ ),
5193
5283
  onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
5194
5284
  onKeyDown,
5195
5285
  children: typeof children === "function" ? children(formValues) : children
@@ -5263,12 +5353,7 @@ function FormFieldArray({
5263
5353
  children({ ...context, ...fieldProps })
5264
5354
  ] });
5265
5355
  }
5266
- function FormResetButton({
5267
- values = {},
5268
- children,
5269
- onPress,
5270
- ...props
5271
- }) {
5356
+ function FormResetButton({ values, children, onPress, ...props }) {
5272
5357
  const { reset } = reactHookForm.useFormContext();
5273
5358
  const handleReset = (e) => {
5274
5359
  reset(values);
@@ -5712,7 +5797,7 @@ function Kbd({ className, children, ...props }) {
5712
5797
  ...props,
5713
5798
  className: cn(
5714
5799
  "inline-flex items-center justify-center gap-1",
5715
- "text-sm font-mono text-foreground-primary",
5800
+ "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)] font-mono text-foreground-primary",
5716
5801
  "px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
5717
5802
  className
5718
5803
  ),
@@ -5836,7 +5921,7 @@ function MenuItem({
5836
5921
  }
5837
5922
  };
5838
5923
  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",
5924
+ "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
5925
  "hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
5841
5926
  "data-[disabled]:text-foreground-disabled",
5842
5927
  "data-[selected]:font-semibold",
@@ -5927,7 +6012,7 @@ function MenuSection({
5927
6012
  const groupStyle = style;
5928
6013
  const body = maxHeight ? /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children }) : children;
5929
6014
  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 })),
6015
+ 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
6016
  body
5932
6017
  ] });
5933
6018
  if (primitiveKind === "context-menu") {
@@ -6014,7 +6099,7 @@ function Meter({
6014
6099
  var NavbarContext = react.createContext({ showArrow: true });
6015
6100
  var triggerClassName = cn(
6016
6101
  "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",
6102
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] font-medium text-foreground-primary bg-transparent border-0",
6018
6103
  "hover:bg-interactive data-[popup-open]:bg-interactive",
6019
6104
  "outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
6020
6105
  );
@@ -6152,7 +6237,7 @@ function NumberField({
6152
6237
  numberField.NumberField.Input,
6153
6238
  {
6154
6239
  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"
6240
+ 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
6241
  }
6157
6242
  ),
6158
6243
  /* @__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 +6277,7 @@ function OTPField({
6192
6277
  otpField.OTPField.Input,
6193
6278
  {
6194
6279
  className: cn(
6195
- "size-10 text-center text-base rounded border border-edge bg-surface-base shadow-sm",
6280
+ "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
6281
  "text-foreground-primary outline-none transition-colors",
6197
6282
  "focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface-base",
6198
6283
  "data-[filled]:border-edge-strong",
@@ -6392,31 +6477,35 @@ function PasswordField({
6392
6477
  ...props
6393
6478
  }) {
6394
6479
  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
- ] })
6480
+ const input = /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className, children: [
6481
+ /* @__PURE__ */ jsxRuntime.jsx(
6482
+ InputGroupInput,
6483
+ {
6484
+ "aria-label": "Password",
6485
+ ...props,
6486
+ type: show ? "text" : "password",
6487
+ disabled: isDisabled,
6488
+ readOnly: isReadOnly
6489
+ }
6490
+ ),
6491
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6492
+ InputGroupButton,
6493
+ {
6494
+ size: "icon-xs",
6495
+ isDisabled,
6496
+ "aria-label": show ? "Hide password" : "Show password",
6497
+ onClick: () => setShow((state) => !state),
6498
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: show ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlash_default, {}) : /* @__PURE__ */ jsxRuntime.jsx(Eye_default, {}) })
6499
+ }
6500
+ ) })
6419
6501
  ] });
6502
+ if (label) {
6503
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
6504
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6505
+ input
6506
+ ] });
6507
+ }
6508
+ return input;
6420
6509
  }
6421
6510
  function ProgressBar({ className, showPercentage, ...props }) {
6422
6511
  return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
@@ -6468,7 +6557,7 @@ function ProgressCircle({
6468
6557
  ]
6469
6558
  }
6470
6559
  ),
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" })
6560
+ 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
6561
  ]
6473
6562
  }
6474
6563
  );
@@ -6508,7 +6597,7 @@ function Radio({ children, className, isDisabled, ...props }) {
6508
6597
  ...props,
6509
6598
  disabled: isDisabled,
6510
6599
  className: cn(
6511
- "radio group flex items-center gap-3 cursor-pointer text-base",
6600
+ "radio group flex items-center gap-3 cursor-pointer text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]",
6512
6601
  "before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
6513
6602
  "before:border before:border-edge-strong before:bg-surface-base before:transition-all before:duration-200",
6514
6603
  "data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
@@ -6576,6 +6665,7 @@ function SearchField({
6576
6665
  ...props
6577
6666
  }) {
6578
6667
  const [search, setSearch] = react.useState(String(value ?? defaultValue));
6668
+ const wasControlled = react.useRef(value !== void 0);
6579
6669
  const searchValue = useDebounce(search, delay);
6580
6670
  const handleChange = (nextValue) => {
6581
6671
  setSearch(nextValue);
@@ -6586,49 +6676,56 @@ function SearchField({
6586
6676
  };
6587
6677
  react.useEffect(() => {
6588
6678
  if (value !== void 0) {
6679
+ wasControlled.current = true;
6589
6680
  setSearch(String(value));
6681
+ } else if (wasControlled.current) {
6682
+ setSearch(String(defaultValue));
6590
6683
  }
6591
- }, [value]);
6684
+ }, [value, defaultValue]);
6592
6685
  react.useEffect(() => {
6593
6686
  if (delay > 0) {
6594
6687
  onSearch?.(searchValue);
6595
6688
  }
6596
6689
  }, [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
- }
6690
+ const input = /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { role: "search", className, children: [
6691
+ /* @__PURE__ */ jsxRuntime.jsx(
6692
+ InputGroupInput,
6693
+ {
6694
+ "aria-label": "Search",
6695
+ ...props,
6696
+ type: "search",
6697
+ placeholder,
6698
+ value: search,
6699
+ className: "[&::-webkit-search-cancel-button]:hidden",
6700
+ onChange: (event) => handleChange(event.target.value),
6701
+ onKeyDown: (event) => {
6702
+ props.onKeyDown?.(event);
6703
+ if (event.key === "Enter") {
6704
+ onSearch?.(search);
6615
6705
  }
6616
6706
  }
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
- ] })
6707
+ }
6708
+ ),
6709
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { color: "muted", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Search, {}) }) }),
6710
+ search && /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6711
+ InputGroupButton,
6712
+ {
6713
+ size: "icon-xs",
6714
+ isDisabled: props.disabled,
6715
+ "aria-label": "Clear search",
6716
+ className: "text-foreground-muted",
6717
+ onClick: () => handleChange(""),
6718
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {}) })
6719
+ }
6720
+ ) })
6631
6721
  ] });
6722
+ if (label) {
6723
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
6724
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6725
+ input
6726
+ ] });
6727
+ }
6728
+ return input;
6632
6729
  }
6633
6730
  function getSelectItemLabel(children, selectedValue) {
6634
6731
  let label;
@@ -6761,7 +6858,7 @@ function Select({
6761
6858
  }
6762
6859
  ),
6763
6860
  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" }),
6861
+ !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
6862
  /* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsxRuntime.jsx(
6766
6863
  ScrollArea,
6767
6864
  {
@@ -6914,7 +7011,7 @@ function Slider({
6914
7011
  children: [
6915
7012
  /* @__PURE__ */ jsxRuntime.jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
6916
7013
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
6917
- showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-base tabular-nums" })
7014
+ showValue && /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Value, { className: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] tabular-nums" })
6918
7015
  ] }),
6919
7016
  /* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Control, { className: "relative h-5 w-full touch-none", children: [
6920
7017
  /* @__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 +7050,22 @@ function StatusDot({ color, variant }) {
6953
7050
  }
6954
7051
  function StatusLight(props) {
6955
7052
  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
- ] });
7053
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7054
+ Row,
7055
+ {
7056
+ ...domProps,
7057
+ alignItems: "center",
7058
+ gap: "2",
7059
+ className: cn(
7060
+ "text-[length:var(--zen-font-size-sm)]/[var(--zen-line-height-sm)]",
7061
+ className
7062
+ ),
7063
+ children: [
7064
+ /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
7065
+ children
7066
+ ]
7067
+ }
7068
+ );
6960
7069
  }
6961
7070
  function Switch({
6962
7071
  label,
@@ -6973,7 +7082,7 @@ function Switch({
6973
7082
  const checked = isSelected ?? (typeof value === "boolean" ? value : void 0);
6974
7083
  const styles = switchVariant();
6975
7084
  const fieldId = useFieldId(id);
6976
- return /* @__PURE__ */ jsxRuntime.jsxs(Column, { children: [
7085
+ return /* @__PURE__ */ jsxRuntime.jsxs(Column, { gap: "1", children: [
6977
7086
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
6978
7087
  /* @__PURE__ */ jsxRuntime.jsxs(
6979
7088
  _switch.Switch.Root,
@@ -7038,7 +7147,7 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
7038
7147
  render: href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href }) : void 0,
7039
7148
  nativeButton: !href,
7040
7149
  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",
7150
+ "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
7151
  "hover:text-foreground-primary",
7043
7152
  "data-[active]:text-foreground-primary data-[active]:border-b-primary",
7044
7153
  "data-[disabled]:text-foreground-disabled data-[disabled]:cursor-default",
@@ -7249,27 +7358,31 @@ function Toggle({
7249
7358
  ...props
7250
7359
  }) {
7251
7360
  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
- ] });
7361
+ const toggle$1 = /* @__PURE__ */ jsxRuntime.jsx(
7362
+ toggle.Toggle,
7363
+ {
7364
+ ...props,
7365
+ "aria-labelledby": label ? labelId : props["aria-labelledby"],
7366
+ pressed: isSelected,
7367
+ defaultPressed: defaultSelected,
7368
+ disabled: isDisabled,
7369
+ onPressedChange: onChange,
7370
+ className: cn(
7371
+ "flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
7372
+ "hover:bg-interactive-hover",
7373
+ "data-[pressed]:text-primary-foreground data-[pressed]:bg-primary",
7374
+ className
7375
+ ),
7376
+ children
7377
+ }
7378
+ );
7379
+ if (label) {
7380
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
7381
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7382
+ toggle$1
7383
+ ] });
7384
+ }
7385
+ return toggle$1;
7273
7386
  }
7274
7387
  var ToggleGroupVariantContext = react.createContext(void 0);
7275
7388
  function ToggleGroup({
@@ -7291,25 +7404,29 @@ function ToggleGroup({
7291
7404
  onSelectionChange?.(new Set(keys));
7292
7405
  onChange?.(keys);
7293
7406
  };
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
- ] });
7407
+ const group = /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
7408
+ toggleGroup.ToggleGroup,
7409
+ {
7410
+ ...props,
7411
+ "aria-labelledby": label ? labelId : props["aria-labelledby"],
7412
+ value: value || (selectedKeys ? Array.from(selectedKeys) : void 0),
7413
+ defaultValue: defaultValue || (defaultSelectedKeys ? Array.from(defaultSelectedKeys) : void 0),
7414
+ multiple: selectionMode === "multiple",
7415
+ onValueChange: handleChange,
7416
+ className: cn(
7417
+ "inline-flex bg-surface-base shadow-sm border border-edge rounded overflow-hidden",
7418
+ className
7419
+ ),
7420
+ children
7421
+ }
7422
+ ) });
7423
+ if (label) {
7424
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
7425
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7426
+ group
7427
+ ] });
7428
+ }
7429
+ return group;
7313
7430
  }
7314
7431
  function ToggleGroupItem({
7315
7432
  id,