@umami/react-zen 0.248.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
  ] }) }),
@@ -2268,7 +2278,8 @@ var button = tailwindVariants.tv({
2268
2278
  default: [
2269
2279
  "bg-interactive text-foreground-primary",
2270
2280
  "hover:bg-interactive-hover",
2271
- "pressed:bg-interactive-pressed"
2281
+ "pressed:bg-interactive-pressed",
2282
+ "disabled:text-foreground-disabled"
2272
2283
  ],
2273
2284
  primary: [
2274
2285
  "bg-primary text-primary-foreground",
@@ -2280,23 +2291,33 @@ var button = tailwindVariants.tv({
2280
2291
  "bg-surface-base border-edge shadow-sm text-foreground-primary",
2281
2292
  "hover:border-edge-strong",
2282
2293
  "pressed:bg-surface-raised",
2283
- "disabled:bg-surface-disabled"
2294
+ "disabled:bg-surface-disabled disabled:text-foreground-disabled"
2295
+ ],
2296
+ quiet: [
2297
+ "bg-transparent",
2298
+ "hover:bg-interactive",
2299
+ "pressed:bg-interactive-hover",
2300
+ "disabled:text-foreground-disabled"
2284
2301
  ],
2285
- quiet: ["bg-transparent", "hover:bg-interactive", "pressed:bg-interactive-hover"],
2286
2302
  danger: [
2287
2303
  "bg-status-error text-white",
2288
2304
  "hover:opacity-90",
2289
2305
  "pressed:opacity-80",
2290
2306
  "disabled:opacity-50"
2291
2307
  ],
2292
- zero: ["bg-transparent border-0", "hover:bg-transparent", "pressed:bg-transparent"]
2308
+ zero: [
2309
+ "bg-transparent border-0",
2310
+ "hover:bg-transparent",
2311
+ "pressed:bg-transparent",
2312
+ "disabled:text-foreground-disabled"
2313
+ ]
2293
2314
  },
2294
2315
  size: {
2295
- xs: "text-sm py-1 px-2",
2296
- sm: "text-base py-1.5 px-2.5",
2297
- md: "text-base py-2 px-3",
2298
- lg: "text-lg py-2.5 px-4",
2299
- 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"
2300
2321
  }
2301
2322
  },
2302
2323
  defaultVariants: {
@@ -2307,7 +2328,7 @@ var button = tailwindVariants.tv({
2307
2328
  var inputField = tailwindVariants.tv({
2308
2329
  base: [
2309
2330
  "relative flex items-center",
2310
- "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",
2311
2332
  "leading-6 text-foreground-primary transition-colors",
2312
2333
  "focus-within:border-edge-strong",
2313
2334
  "has-[input:read-only]:bg-surface-raised has-[textarea:read-only]:bg-surface-raised",
@@ -2326,7 +2347,7 @@ var inputField = tailwindVariants.tv({
2326
2347
  tailwindVariants.tv({
2327
2348
  base: [
2328
2349
  "flex items-center justify-between",
2329
- "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]",
2330
2351
  "cursor-pointer outline-none rounded",
2331
2352
  "text-foreground-primary",
2332
2353
  "hovered:bg-interactive",
@@ -2363,13 +2384,15 @@ tailwindVariants.tv({
2363
2384
  }
2364
2385
  });
2365
2386
  var tooltip = tailwindVariants.tv({
2366
- 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
+ ]
2367
2390
  });
2368
2391
  var checkbox = tailwindVariants.tv({
2369
2392
  slots: {
2370
2393
  root: [
2371
2394
  "group flex items-center gap-3",
2372
- "text-base cursor-pointer",
2395
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2373
2396
  "disabled:text-foreground-disabled disabled:cursor-default"
2374
2397
  ],
2375
2398
  box: [
@@ -2393,7 +2416,7 @@ var switchVariant = tailwindVariants.tv({
2393
2416
  slots: {
2394
2417
  root: [
2395
2418
  "group flex items-center gap-3",
2396
- "text-base cursor-pointer",
2419
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] cursor-pointer",
2397
2420
  "disabled:opacity-50 disabled:cursor-default"
2398
2421
  ],
2399
2422
  track: [
@@ -2416,7 +2439,7 @@ tailwindVariants.tv({
2416
2439
  root: "flex flex-col",
2417
2440
  list: ["flex gap-1 border-b border-edge-muted"],
2418
2441
  tab: [
2419
- "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",
2420
2443
  "text-foreground-muted outline-none",
2421
2444
  "border-b-2 border-transparent -mb-px",
2422
2445
  "hovered:text-foreground-primary",
@@ -2431,14 +2454,14 @@ tailwindVariants.tv({
2431
2454
  base: "text-foreground-primary",
2432
2455
  variants: {
2433
2456
  size: {
2434
- xs: "text-xs",
2435
- sm: "text-sm",
2436
- base: "text-base",
2437
- lg: "text-lg",
2438
- xl: "text-xl",
2439
- "2xl": "text-2xl",
2440
- "3xl": "text-3xl",
2441
- "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)]"
2442
2465
  },
2443
2466
  color: {
2444
2467
  default: "",
@@ -2465,15 +2488,15 @@ tailwindVariants.tv({
2465
2488
  base: "font-semibold text-foreground-primary",
2466
2489
  variants: {
2467
2490
  size: {
2468
- sm: "text-sm",
2469
- base: "text-base",
2470
- lg: "text-lg",
2471
- xl: "text-xl",
2472
- "2xl": "text-2xl",
2473
- "3xl": "text-3xl",
2474
- "4xl": "text-4xl",
2475
- "5xl": "text-5xl",
2476
- "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)]"
2477
2500
  }
2478
2501
  },
2479
2502
  defaultVariants: {
@@ -2482,7 +2505,7 @@ tailwindVariants.tv({
2482
2505
  });
2483
2506
  var alert = tailwindVariants.tv({
2484
2507
  base: [
2485
- "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)]",
2486
2509
  "has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3",
2487
2510
  "[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
2488
2511
  ],
@@ -2515,7 +2538,7 @@ tailwindVariants.tv({
2515
2538
  base: "inline-flex items-center gap-2",
2516
2539
  slots: {
2517
2540
  dot: "w-2 h-2 rounded-full",
2518
- label: "text-base"
2541
+ label: "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2519
2542
  },
2520
2543
  variants: {
2521
2544
  color: {
@@ -2535,7 +2558,7 @@ var toast = tailwindVariants.tv({
2535
2558
  "flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg",
2536
2559
  "bg-surface-overlay",
2537
2560
  "border border-edge-muted",
2538
- "text-base"
2561
+ "text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)]"
2539
2562
  ],
2540
2563
  variants: {
2541
2564
  variant: {
@@ -2584,8 +2607,8 @@ var badge = tailwindVariants.tv({
2584
2607
  rose: "bg-rose-50 text-rose-900 dark:bg-rose-500/20 dark:text-rose-100"
2585
2608
  },
2586
2609
  size: {
2587
- sm: "text-xs px-2 py-0.5",
2588
- 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"
2589
2612
  }
2590
2613
  },
2591
2614
  defaultVariants: {
@@ -2607,11 +2630,26 @@ var avatar = tailwindVariants.tv({
2607
2630
  },
2608
2631
  variants: {
2609
2632
  size: {
2610
- xs: { root: "size-6", fallback: "text-xs" },
2611
- sm: { root: "size-8", fallback: "text-sm" },
2612
- md: { root: "size-10", fallback: "text-base" },
2613
- lg: { root: "size-12", fallback: "text-lg" },
2614
- 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
+ }
2615
2653
  }
2616
2654
  },
2617
2655
  defaultVariants: {
@@ -2621,7 +2659,7 @@ var avatar = tailwindVariants.tv({
2621
2659
  var tag = tailwindVariants.tv({
2622
2660
  slots: {
2623
2661
  base: [
2624
- "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)]",
2625
2663
  "cursor-default outline-none",
2626
2664
  "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
2627
2665
  ],
@@ -2682,7 +2720,7 @@ var AlertDescription = react.forwardRef(
2682
2720
  ref,
2683
2721
  "data-slot": "alert-description",
2684
2722
  className: cn(
2685
- "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",
2686
2724
  className
2687
2725
  )
2688
2726
  }
@@ -2692,8 +2730,12 @@ AlertDescription.displayName = "AlertDescription";
2692
2730
  function Button({
2693
2731
  variant,
2694
2732
  size = "md",
2695
- render,
2733
+ render: renderProp,
2734
+ href,
2735
+ target,
2736
+ rel,
2696
2737
  preventFocusOnPress: _preventFocusOnPress = true,
2738
+ nativeButton,
2697
2739
  isDisabled,
2698
2740
  disabled,
2699
2741
  onPress,
@@ -2703,6 +2745,15 @@ function Button({
2703
2745
  ...props
2704
2746
  }) {
2705
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);
2756
+ const isNativeButton = nativeButton ?? (render === void 0 || react.isValidElement(render) && render.type === "button");
2706
2757
  const handleClick = (event) => {
2707
2758
  onClick?.(event);
2708
2759
  if (!event.defaultPrevented) {
@@ -2715,6 +2766,7 @@ function Button({
2715
2766
  ...props,
2716
2767
  "data-slot": "button",
2717
2768
  render,
2769
+ nativeButton: isNativeButton,
2718
2770
  disabled: isDisabled ?? disabled,
2719
2771
  className: buttonClassName,
2720
2772
  onClick: handleClick,
@@ -3225,8 +3277,8 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
3225
3277
  ...props,
3226
3278
  "aria-disabled": isDisabled || void 0,
3227
3279
  className: cn(
3228
- "flex items-center text-base gap-3 list-none",
3229
- "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal [&_a]:p-2",
3280
+ "flex items-center text-[length:var(--zen-font-size-base)]/[var(--zen-line-height-base)] gap-3 list-none",
3281
+ "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal",
3230
3282
  "[&_a:hover]:text-foreground-primary",
3231
3283
  "last:[&>span]:hidden",
3232
3284
  className
@@ -3282,7 +3334,7 @@ function ButtonGroup({ className, orientation = "horizontal", ...props }) {
3282
3334
  }
3283
3335
  function ButtonGroupText({ className, render, children, ...props }) {
3284
3336
  const classes = cn(
3285
- "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",
3286
3338
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
3287
3339
  className
3288
3340
  );
@@ -3346,7 +3398,18 @@ function Calendar({
3346
3398
  onChange?.(date);
3347
3399
  }
3348
3400
  },
3349
- 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
+ ),
3350
3413
  classNames: {
3351
3414
  months: "relative",
3352
3415
  month: "space-y-4",
@@ -3360,7 +3423,7 @@ function Calendar({
3360
3423
  week: "flex mt-1",
3361
3424
  day: "size-12 text-center",
3362
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",
3363
- selected: "[&>button]:text-primary-foreground [&>button]:bg-primary",
3426
+ selected: "[&>button]:text-primary-foreground [&>button]:bg-primary [&>button:hover]:bg-primary",
3364
3427
  outside: "invisible",
3365
3428
  disabled: "text-foreground-disabled pointer-events-none opacity-50",
3366
3429
  today: "[&>button]:font-bold"
@@ -3629,7 +3692,7 @@ function CollapsibleTrigger({ className, children, ...props }) {
3629
3692
  {
3630
3693
  ...props,
3631
3694
  className: cn(
3632
- "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)]",
3633
3696
  "focus-visible:ring-2 focus-visible:ring-focus-ring rounded",
3634
3697
  "disabled:text-foreground-disabled disabled:cursor-default",
3635
3698
  className
@@ -3780,23 +3843,27 @@ function List({
3780
3843
  if (parent.kind === "combobox") {
3781
3844
  return /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.List, { ...props, id: fieldId, className: classes, style, children });
3782
3845
  }
3783
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3784
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
3785
- /* @__PURE__ */ jsxRuntime.jsx(ListContext.Provider, { value: { kind: "native", selected, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx(
3786
- "div",
3787
- {
3788
- id: fieldId,
3789
- role: "listbox",
3790
- "aria-multiselectable": selectionMode === "multiple" || void 0,
3791
- ...props,
3792
- className: classes,
3793
- style: { ...style, ...getHighlightColor(highlightColor) },
3794
- children: children || renderEmptyState?.({})
3795
- }
3796
- ) })
3797
- ] });
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;
3798
3865
  }
3799
- 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";
3800
3867
  function ListItem({
3801
3868
  id,
3802
3869
  value,
@@ -3878,18 +3945,18 @@ function ListSection({ title, className, children, ...props }) {
3878
3945
  const { kind } = react.useContext(ListContext);
3879
3946
  if (kind === "select") {
3880
3947
  return /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
3881
- 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 }),
3882
3949
  children
3883
3950
  ] });
3884
3951
  }
3885
3952
  if (kind === "combobox") {
3886
3953
  return /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Group, { ...props, className: cn("[&:not(:last-child)]:mb-4", className), children: [
3887
- 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 }),
3888
3955
  children
3889
3956
  ] });
3890
3957
  }
3891
3958
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, role: "group", className: cn("[&:not(:last-child)]:mb-4", className), children: [
3892
- 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 }),
3893
3960
  children
3894
3961
  ] });
3895
3962
  }
@@ -3939,7 +4006,7 @@ var InputGroupAddon = react.forwardRef(
3939
4006
  "data-slot": "input-group-addon",
3940
4007
  "data-align": align,
3941
4008
  className: cn(
3942
- "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",
3943
4010
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
3944
4011
  addonClasses[align],
3945
4012
  className
@@ -3951,8 +4018,8 @@ var InputGroupAddon = react.forwardRef(
3951
4018
  );
3952
4019
  InputGroupAddon.displayName = "InputGroupAddon";
3953
4020
  var buttonSizeClasses = {
3954
- xs: "h-6 gap-1 rounded px-1.5 py-0 text-sm",
3955
- 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)]",
3956
4023
  "icon-xs": "size-6 rounded p-0",
3957
4024
  "icon-sm": "size-8 rounded p-0"
3958
4025
  };
@@ -3984,7 +4051,7 @@ var InputGroupText = react.forwardRef(
3984
4051
  ref,
3985
4052
  "data-slot": "input-group-text",
3986
4053
  className: cn(
3987
- "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",
3988
4055
  className
3989
4056
  )
3990
4057
  }
@@ -3999,7 +4066,7 @@ var InputGroupInput = react.forwardRef(
3999
4066
  ref,
4000
4067
  "data-slot": "input-group-control",
4001
4068
  className: cn(
4002
- "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",
4003
4070
  className
4004
4071
  )
4005
4072
  }
@@ -4013,7 +4080,7 @@ var InputGroupTextarea = react.forwardRef(({ className, ...props }, ref) => /* @
4013
4080
  ref,
4014
4081
  "data-slot": "input-group-control",
4015
4082
  className: cn(
4016
- "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",
4017
4084
  className
4018
4085
  )
4019
4086
  }
@@ -4120,7 +4187,7 @@ function ComboBox({
4120
4187
  disabled: isDisabled,
4121
4188
  onValueChange: onChange,
4122
4189
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
4123
- 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 }),
4124
4191
  /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { render: /* @__PURE__ */ jsxRuntime.jsx(InputGroup, {}), children: [
4125
4192
  /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { placeholder, render: /* @__PURE__ */ jsxRuntime.jsx(InputGroupInput, {}) }),
4126
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, {}) }) }) })
@@ -4140,7 +4207,7 @@ function ComboBox({
4140
4207
  }
4141
4208
  return item.element ?? /* @__PURE__ */ jsxRuntime.jsx(ListItem, { value: item.value, children: item.label }, item.value);
4142
4209
  } }) }) }) }),
4143
- /* @__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." }) }) })
4144
4211
  ] })
4145
4212
  }
4146
4213
  ) })
@@ -4196,7 +4263,7 @@ function CommandInput({ className, ...props }) {
4196
4263
  {
4197
4264
  ...props,
4198
4265
  className: cn(
4199
- "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",
4200
4267
  "placeholder:text-foreground-muted",
4201
4268
  "disabled:cursor-not-allowed disabled:text-foreground-disabled",
4202
4269
  className
@@ -4213,7 +4280,10 @@ function CommandEmpty({ className, ...props }) {
4213
4280
  cmdk.Command.Empty,
4214
4281
  {
4215
4282
  ...props,
4216
- 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
+ )
4217
4287
  }
4218
4288
  );
4219
4289
  }
@@ -4225,7 +4295,7 @@ function CommandGroup({ className, ...props }) {
4225
4295
  className: cn(
4226
4296
  "overflow-hidden [&:not(:last-child)]:mb-2",
4227
4297
  "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5",
4228
- "[&_[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",
4229
4299
  className
4230
4300
  )
4231
4301
  }
@@ -4238,7 +4308,7 @@ function CommandItem({ icon, isDisabled, className, children, ...props }) {
4238
4308
  ...props,
4239
4309
  disabled: isDisabled,
4240
4310
  className: cn(
4241
- "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)]",
4242
4312
  "data-[selected=true]:bg-interactive",
4243
4313
  "data-[disabled=true]:text-foreground-disabled data-[disabled=true]:cursor-default",
4244
4314
  className
@@ -4335,6 +4405,7 @@ function TextField({
4335
4405
  ...props
4336
4406
  }) {
4337
4407
  const [inputValue, setInputValue] = react.useState(defaultValue ?? value ?? "");
4408
+ const wasControlled = react.useRef(value !== void 0);
4338
4409
  const handleChange = (event) => {
4339
4410
  const nextValue = event.target.value;
4340
4411
  setInputValue(nextValue);
@@ -4342,68 +4413,75 @@ function TextField({
4342
4413
  };
4343
4414
  react.useEffect(() => {
4344
4415
  if (value !== void 0) {
4416
+ wasControlled.current = true;
4345
4417
  setInputValue(value);
4418
+ } else if (wasControlled.current) {
4419
+ setInputValue(defaultValue ?? "");
4346
4420
  }
4347
- }, [value]);
4421
+ }, [value, defaultValue]);
4348
4422
  const inputClasses = cn(resize && resizeClasses[resize]);
4349
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4350
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
4351
- /* @__PURE__ */ jsxRuntime.jsxs(
4352
- InputGroup,
4353
- {
4354
- variant: variant === "quiet" ? "quiet" : "default",
4355
- className: cn(
4356
- isReadOnly && "focus-within:border-edge",
4357
- isDisabled && "text-foreground-disabled",
4358
- variant === "quiet" && "text-[length:inherit]",
4359
- 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
+ }
4360
4456
  ),
4361
- children: [
4362
- asTextArea ? /* @__PURE__ */ jsxRuntime.jsx(
4363
- InputGroupTextarea,
4364
- {
4365
- ...props,
4366
- placeholder,
4367
- value: inputValue,
4368
- readOnly: isReadOnly,
4369
- disabled: isDisabled,
4370
- className: inputClasses,
4371
- onChange: handleChange
4372
- }
4373
- ) : /* @__PURE__ */ jsxRuntime.jsx(
4374
- InputGroupInput,
4375
- {
4376
- ...props,
4377
- placeholder,
4378
- value: inputValue,
4379
- readOnly: isReadOnly,
4380
- disabled: isDisabled,
4381
- className: inputClasses,
4382
- onChange: handleChange
4383
- }
4384
- ),
4385
- allowCopy && /* @__PURE__ */ jsxRuntime.jsx(
4386
- InputGroupAddon,
4387
- {
4388
- align: asTextArea ? "block-start" : "inline-end",
4389
- className: cn(asTextArea && "justify-end pb-0"),
4390
- children: /* @__PURE__ */ jsxRuntime.jsx(
4391
- CopyButton,
4392
- {
4393
- value: String(inputValue),
4394
- "aria-disabled": !inputValue,
4395
- className: cn(
4396
- "text-foreground-muted hover:text-foreground-primary",
4397
- !inputValue && "text-foreground-disabled"
4398
- )
4399
- }
4400
- )
4401
- }
4402
- )
4403
- ]
4404
- }
4405
- )
4406
- ] });
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;
4407
4485
  }
4408
4486
  function ConfirmationDialog({
4409
4487
  value,
@@ -4430,7 +4508,7 @@ function ConfirmationDialog({
4430
4508
  paddingY: "2",
4431
4509
  marginY: "2",
4432
4510
  borderRadius: "md",
4433
- 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",
4434
4512
  children: value
4435
4513
  }
4436
4514
  ),
@@ -4699,7 +4777,17 @@ function Table({
4699
4777
  }),
4700
4778
  [registerRow, rowKeys, selectedKeys, selectionMode, setAllSelected, setRowSelected]
4701
4779
  );
4702
- 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
+ ) });
4703
4791
  }
4704
4792
  function TableHeader({ children, className, style, ...props }) {
4705
4793
  const cols = style?.gridTemplateColumns || gridTemplateColumns;
@@ -4834,34 +4922,44 @@ function DataTable({
4834
4922
  return /* @__PURE__ */ jsxRuntime.jsx(DataCard, { data: items }, `${row.id}-${index}`);
4835
4923
  }) });
4836
4924
  }
4837
- return /* @__PURE__ */ jsxRuntime.jsxs(Table, { ...props, className: cn("relative text-base", className), children: [
4838
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
4839
- if (hidden) {
4840
- return null;
4841
- }
4842
- return /* @__PURE__ */ react.createElement(TableColumn, { ...columnProps, key: id, id }, label);
4843
- }) }),
4844
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row, index) => {
4845
- return (
4846
- // biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
4847
- /* @__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 }) => {
4848
4935
  if (hidden) {
4849
4936
  return null;
4850
4937
  }
4851
- const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
4852
- return /* @__PURE__ */ react.createElement(
4853
- TableCell,
4854
- {
4855
- ...cellProps,
4856
- key: id,
4857
- className: cn("items-center", className2)
4858
- },
4859
- 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)
4860
4958
  );
4861
- }) }, index)
4862
- );
4863
- }) })
4864
- ] });
4959
+ }) })
4960
+ ]
4961
+ }
4962
+ );
4865
4963
  }
4866
4964
  function DataColumn(_props) {
4867
4965
  return null;
@@ -5014,7 +5112,10 @@ var EmptyTitle = react.forwardRef(
5014
5112
  ...props,
5015
5113
  ref,
5016
5114
  "data-slot": "empty-title",
5017
- 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
+ )
5018
5119
  }
5019
5120
  )
5020
5121
  );
@@ -5026,7 +5127,7 @@ var EmptyDescription = react.forwardRef(({ className, ...props }, ref) => /* @__
5026
5127
  ref,
5027
5128
  "data-slot": "empty-description",
5028
5129
  className: cn(
5029
- "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",
5030
5131
  className
5031
5132
  )
5032
5133
  }
@@ -5040,7 +5141,7 @@ var EmptyContent = react.forwardRef(
5040
5141
  ref,
5041
5142
  "data-slot": "empty-content",
5042
5143
  className: cn(
5043
- "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",
5044
5145
  className
5045
5146
  )
5046
5147
  }
@@ -5175,7 +5276,10 @@ function Form({
5175
5276
  {
5176
5277
  ...props,
5177
5278
  autoComplete,
5178
- 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
+ ),
5179
5283
  onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
5180
5284
  onKeyDown,
5181
5285
  children: typeof children === "function" ? children(formValues) : children
@@ -5249,12 +5353,7 @@ function FormFieldArray({
5249
5353
  children({ ...context, ...fieldProps })
5250
5354
  ] });
5251
5355
  }
5252
- function FormResetButton({
5253
- values = {},
5254
- children,
5255
- onPress,
5256
- ...props
5257
- }) {
5356
+ function FormResetButton({ values, children, onPress, ...props }) {
5258
5357
  const { reset } = reactHookForm.useFormContext();
5259
5358
  const handleReset = (e) => {
5260
5359
  reset(values);
@@ -5698,7 +5797,7 @@ function Kbd({ className, children, ...props }) {
5698
5797
  ...props,
5699
5798
  className: cn(
5700
5799
  "inline-flex items-center justify-center gap-1",
5701
- "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",
5702
5801
  "px-1.5 py-0.5 rounded border border-edge bg-surface-raised shadow-sm",
5703
5802
  className
5704
5803
  ),
@@ -5787,7 +5886,8 @@ function Menu({
5787
5886
  return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5788
5887
  menu.Menu.Positioner,
5789
5888
  {
5790
- ...inMenubar ? { align: "start", sideOffset: 8 } : {},
5889
+ sideOffset: 4,
5890
+ ...inMenubar ? { align: "start" } : {},
5791
5891
  className: "zen-layer-floating",
5792
5892
  children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Popup, { ...props, className: cn("zen-popover", popupClassName2), children: popupContent })
5793
5893
  }
@@ -5821,7 +5921,7 @@ function MenuItem({
5821
5921
  }
5822
5922
  };
5823
5923
  const itemClassName = cn(
5824
- "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",
5825
5925
  "hover:bg-interactive focus:bg-interactive data-[highlighted]:bg-interactive",
5826
5926
  "data-[disabled]:text-foreground-disabled",
5827
5927
  "data-[selected]:font-semibold",
@@ -5912,7 +6012,7 @@ function MenuSection({
5912
6012
  const groupStyle = style;
5913
6013
  const body = maxHeight ? /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { maxHeight, children }) : children;
5914
6014
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5915
- 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 })),
5916
6016
  body
5917
6017
  ] });
5918
6018
  if (primitiveKind === "context-menu") {
@@ -5951,10 +6051,7 @@ function Menubar({ isDisabled, className, children, ...props }) {
5951
6051
  {
5952
6052
  ...props,
5953
6053
  disabled: isDisabled,
5954
- className: cn(
5955
- "flex items-center gap-1 p-1 rounded-md border border-edge bg-surface-base shadow-sm w-fit",
5956
- className
5957
- ),
6054
+ className: cn("flex items-center gap-1 w-fit", className),
5958
6055
  children
5959
6056
  }
5960
6057
  );
@@ -6002,7 +6099,7 @@ function Meter({
6002
6099
  var NavbarContext = react.createContext({ showArrow: true });
6003
6100
  var triggerClassName = cn(
6004
6101
  "flex items-center gap-1 select-none cursor-pointer rounded-md px-3 py-2",
6005
- "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",
6006
6103
  "hover:bg-interactive data-[popup-open]:bg-interactive",
6007
6104
  "outline-none [&:focus-visible]:outline-2 [&:focus-visible]:outline-offset-1 [&:focus-visible]:outline-focus-ring"
6008
6105
  );
@@ -6140,7 +6237,7 @@ function NumberField({
6140
6237
  numberField.NumberField.Input,
6141
6238
  {
6142
6239
  placeholder,
6143
- 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"
6144
6241
  }
6145
6242
  ),
6146
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, {}) }) })
@@ -6180,7 +6277,7 @@ function OTPField({
6180
6277
  otpField.OTPField.Input,
6181
6278
  {
6182
6279
  className: cn(
6183
- "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",
6184
6281
  "text-foreground-primary outline-none transition-colors",
6185
6282
  "focus:border-edge-strong focus:ring-2 focus:ring-focus-ring focus:ring-offset-1 focus:ring-offset-surface-base",
6186
6283
  "data-[filled]:border-edge-strong",
@@ -6380,31 +6477,35 @@ function PasswordField({
6380
6477
  ...props
6381
6478
  }) {
6382
6479
  const [show, setShow] = react.useState(false);
6383
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6384
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6385
- /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className, children: [
6386
- /* @__PURE__ */ jsxRuntime.jsx(
6387
- InputGroupInput,
6388
- {
6389
- "aria-label": "Password",
6390
- ...props,
6391
- type: show ? "text" : "password",
6392
- disabled: isDisabled,
6393
- readOnly: isReadOnly
6394
- }
6395
- ),
6396
- /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6397
- InputGroupButton,
6398
- {
6399
- size: "icon-xs",
6400
- isDisabled,
6401
- "aria-label": show ? "Hide password" : "Show password",
6402
- onClick: () => setShow((state) => !state),
6403
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: show ? /* @__PURE__ */ jsxRuntime.jsx(EyeSlash_default, {}) : /* @__PURE__ */ jsxRuntime.jsx(Eye_default, {}) })
6404
- }
6405
- ) })
6406
- ] })
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
+ ) })
6407
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;
6408
6509
  }
6409
6510
  function ProgressBar({ className, showPercentage, ...props }) {
6410
6511
  return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { ...props, className: cn("flex items-center gap-3 w-full", className), children: [
@@ -6456,7 +6557,7 @@ function ProgressCircle({
6456
6557
  ]
6457
6558
  }
6458
6559
  ),
6459
- 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" })
6460
6561
  ]
6461
6562
  }
6462
6563
  );
@@ -6496,7 +6597,7 @@ function Radio({ children, className, isDisabled, ...props }) {
6496
6597
  ...props,
6497
6598
  disabled: isDisabled,
6498
6599
  className: cn(
6499
- "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)]",
6500
6601
  "before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
6501
6602
  "before:border before:border-edge-strong before:bg-surface-base before:transition-all before:duration-200",
6502
6603
  "data-[checked]:before:border-[6px] data-[checked]:before:border-primary",
@@ -6564,6 +6665,7 @@ function SearchField({
6564
6665
  ...props
6565
6666
  }) {
6566
6667
  const [search, setSearch] = react.useState(String(value ?? defaultValue));
6668
+ const wasControlled = react.useRef(value !== void 0);
6567
6669
  const searchValue = useDebounce(search, delay);
6568
6670
  const handleChange = (nextValue) => {
6569
6671
  setSearch(nextValue);
@@ -6574,49 +6676,56 @@ function SearchField({
6574
6676
  };
6575
6677
  react.useEffect(() => {
6576
6678
  if (value !== void 0) {
6679
+ wasControlled.current = true;
6577
6680
  setSearch(String(value));
6681
+ } else if (wasControlled.current) {
6682
+ setSearch(String(defaultValue));
6578
6683
  }
6579
- }, [value]);
6684
+ }, [value, defaultValue]);
6580
6685
  react.useEffect(() => {
6581
6686
  if (delay > 0) {
6582
6687
  onSearch?.(searchValue);
6583
6688
  }
6584
6689
  }, [searchValue, delay, onSearch]);
6585
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6586
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: props.id, children: label }),
6587
- /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { role: "search", className, children: [
6588
- /* @__PURE__ */ jsxRuntime.jsx(
6589
- InputGroupInput,
6590
- {
6591
- "aria-label": "Search",
6592
- ...props,
6593
- type: "search",
6594
- placeholder,
6595
- value: search,
6596
- className: "[&::-webkit-search-cancel-button]:hidden",
6597
- onChange: (event) => handleChange(event.target.value),
6598
- onKeyDown: (event) => {
6599
- props.onKeyDown?.(event);
6600
- if (event.key === "Enter") {
6601
- onSearch?.(search);
6602
- }
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);
6603
6705
  }
6604
6706
  }
6605
- ),
6606
- /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { color: "muted", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Search, {}) }) }),
6607
- search && /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6608
- InputGroupButton,
6609
- {
6610
- size: "icon-xs",
6611
- isDisabled: props.disabled,
6612
- "aria-label": "Clear search",
6613
- className: "text-foreground-muted",
6614
- onClick: () => handleChange(""),
6615
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, {}) })
6616
- }
6617
- ) })
6618
- ] })
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
+ ) })
6619
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;
6620
6729
  }
6621
6730
  function getSelectItemLabel(children, selectedValue) {
6622
6731
  let label;
@@ -6749,7 +6858,7 @@ function Select({
6749
6858
  }
6750
6859
  ),
6751
6860
  isLoading && /* @__PURE__ */ jsxRuntime.jsx(Loading, { className: "py-8", icon: "dots", placement: "center", size: "sm" }),
6752
- !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" }),
6753
6862
  /* @__PURE__ */ jsxRuntime.jsx(ListPrimitiveProvider, { kind: "select", children: /* @__PURE__ */ jsxRuntime.jsx(
6754
6863
  ScrollArea,
6755
6864
  {
@@ -6902,7 +7011,7 @@ function Slider({
6902
7011
  children: [
6903
7012
  /* @__PURE__ */ jsxRuntime.jsxs(Row, { justifyContent: "space-between", alignItems: "center", children: [
6904
7013
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
6905
- 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" })
6906
7015
  ] }),
6907
7016
  /* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Control, { className: "relative h-5 w-full touch-none", children: [
6908
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" }) }),
@@ -6941,10 +7050,22 @@ function StatusDot({ color, variant }) {
6941
7050
  }
6942
7051
  function StatusLight(props) {
6943
7052
  const { color, variant = "inactive", children, className, ...domProps } = props;
6944
- return /* @__PURE__ */ jsxRuntime.jsxs(Row, { ...domProps, alignItems: "center", gap: "2", className, children: [
6945
- /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { color, variant }),
6946
- children
6947
- ] });
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
+ );
6948
7069
  }
6949
7070
  function Switch({
6950
7071
  label,
@@ -6961,7 +7082,7 @@ function Switch({
6961
7082
  const checked = isSelected ?? (typeof value === "boolean" ? value : void 0);
6962
7083
  const styles = switchVariant();
6963
7084
  const fieldId = useFieldId(id);
6964
- return /* @__PURE__ */ jsxRuntime.jsxs(Column, { children: [
7085
+ return /* @__PURE__ */ jsxRuntime.jsxs(Column, { gap: "1", children: [
6965
7086
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
6966
7087
  /* @__PURE__ */ jsxRuntime.jsxs(
6967
7088
  _switch.Switch.Root,
@@ -7026,7 +7147,7 @@ function Tab({ id, value, isDisabled, href, children, className, ...props }) {
7026
7147
  render: href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href }) : void 0,
7027
7148
  nativeButton: !href,
7028
7149
  className: cn(
7029
- "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",
7030
7151
  "hover:text-foreground-primary",
7031
7152
  "data-[active]:text-foreground-primary data-[active]:border-b-primary",
7032
7153
  "data-[disabled]:text-foreground-disabled data-[disabled]:cursor-default",
@@ -7237,27 +7358,31 @@ function Toggle({
7237
7358
  ...props
7238
7359
  }) {
7239
7360
  const labelId = react.useId();
7240
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7241
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7242
- /* @__PURE__ */ jsxRuntime.jsx(
7243
- toggle.Toggle,
7244
- {
7245
- ...props,
7246
- "aria-labelledby": label ? labelId : props["aria-labelledby"],
7247
- pressed: isSelected,
7248
- defaultPressed: defaultSelected,
7249
- disabled: isDisabled,
7250
- onPressedChange: onChange,
7251
- className: cn(
7252
- "flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
7253
- "hover:bg-interactive-hover",
7254
- "data-[pressed]:text-primary-foreground data-[pressed]:bg-primary",
7255
- className
7256
- ),
7257
- children
7258
- }
7259
- )
7260
- ] });
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;
7261
7386
  }
7262
7387
  var ToggleGroupVariantContext = react.createContext(void 0);
7263
7388
  function ToggleGroup({
@@ -7279,25 +7404,29 @@ function ToggleGroup({
7279
7404
  onSelectionChange?.(new Set(keys));
7280
7405
  onChange?.(keys);
7281
7406
  };
7282
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7283
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
7284
- /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
7285
- toggleGroup.ToggleGroup,
7286
- {
7287
- ...props,
7288
- "aria-labelledby": label ? labelId : props["aria-labelledby"],
7289
- value: value || (selectedKeys ? Array.from(selectedKeys) : void 0),
7290
- defaultValue: defaultValue || (defaultSelectedKeys ? Array.from(defaultSelectedKeys) : void 0),
7291
- multiple: selectionMode === "multiple",
7292
- onValueChange: handleChange,
7293
- className: cn(
7294
- "inline-flex bg-surface-base shadow-sm border border-edge rounded overflow-hidden",
7295
- className
7296
- ),
7297
- children
7298
- }
7299
- ) })
7300
- ] });
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;
7301
7430
  }
7302
7431
  function ToggleGroupItem({
7303
7432
  id,