@assure-one/design-system 1.31.0 → 1.32.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
@@ -3,7 +3,7 @@ import * as React39 from 'react';
3
3
  import { forwardRef, useId, useRef, useState, useEffect, useCallback, useImperativeHandle, useMemo, createContext, Fragment as Fragment$1, useContext } from 'react';
4
4
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
5
5
  import { clsx } from 'clsx';
6
- import { twMerge } from 'tailwind-merge';
6
+ import { extendTailwindMerge } from 'tailwind-merge';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
9
9
  import { cva } from 'class-variance-authority';
@@ -11,13 +11,13 @@ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
11
11
  import { Slot } from '@radix-ui/react-slot';
12
12
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
13
13
  import { DayPicker } from 'react-day-picker';
14
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
14
+ import { parse, isValid, format, startOfMonth, startOfYear, subYears, endOfMonth, endOfYear, addYears } from 'date-fns';
15
15
  import * as SelectPrimitive from '@radix-ui/react-select';
16
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
16
17
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
17
18
  import { Command } from 'cmdk';
18
19
  import * as DialogPrimitive from '@radix-ui/react-dialog';
19
20
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
20
- import { parse, isValid, format } from 'date-fns';
21
21
  import * as PopoverPrimitive from '@radix-ui/react-popover';
22
22
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
23
23
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
@@ -42,52 +42,52 @@ import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
42
42
  // src/tokens/reference.ts
43
43
  var colors = {
44
44
  /* Surfaces */
45
- bg: "#FDFDFC",
46
- bg2: "#F7F7F5",
47
- bg3: "#F0F0ED",
48
- surface: "#FFFFFF",
49
- surface2: "#FAFAF8",
45
+ bg: "#ffffff",
46
+ bg2: "#f1f3f8",
47
+ bg3: "#e7eaf1",
48
+ surface: "#ffffff",
49
+ surface2: "#f7f8fc",
50
50
  /* Foreground */
51
- fg: "#0A0A0A",
52
- fg2: "#38383B",
53
- fg3: "#6B6B70",
54
- fg4: "#9A9AA0",
55
- fg5: "#C4C4C8",
51
+ fg: "#0a0a0a",
52
+ fg2: "#38383b",
53
+ fg3: "#5f5f64",
54
+ fg4: "#6b6b70",
55
+ fg5: "#9a9aa0",
56
56
  /* Rules */
57
- rule: "#EAEAE6",
58
- ruleSoft: "#F0F0EC",
59
- ruleStrong: "#DADAD4",
57
+ rule: "#e4e7ef",
58
+ ruleSoft: "#eef0f5",
59
+ ruleStrong: "#d3d8e3",
60
60
  /* Accent (cyan) */
61
- accent: "#0066FF",
62
- accent2: "#0052CC",
63
- accentTint: "#E8F0FF",
64
- accentHover: "#005BE6",
65
- accentActive: "#004FCC",
61
+ accent: "#6c42f8",
62
+ accent2: "#5127e8",
63
+ accentTint: "#efeaff",
64
+ accentHover: "#5e35f2",
65
+ accentActive: "#5127e8",
66
66
  /* Pro (purple) */
67
- proBg: "#F4F1FF",
68
- proBgHover: "#EEE9FF",
69
- proBgActive: "#E4DDFF",
70
- proFg: "#6C42F8",
71
- proHover: "#5E35F2",
72
- proActive: "#5127E8",
73
- proDisabled: "#B7A7F3",
74
- proLine: "#7B5BD8",
67
+ proBg: "#f4f1ff",
68
+ proBgHover: "#eee9ff",
69
+ proBgActive: "#e4ddff",
70
+ proFg: "#6c42f8",
71
+ proHover: "#5e35f2",
72
+ proActive: "#5127e8",
73
+ proDisabled: "#b7a7f3",
74
+ proLine: "#7b5bd8",
75
75
  /* Disabled */
76
- fgDisabled: "#A7A7AC",
77
- bgDisabled: "#F3F3F1",
76
+ fgDisabled: "#a7a7ac",
77
+ bgDisabled: "#f3f3f1",
78
78
  /* Status */
79
- successFg: "#1F7A3D",
80
- successBg: "#EAF6EE",
81
- successLine: "#C5E5CF",
82
- warningFg: "#B45F0A",
83
- warningBg: "#FFF3E5",
84
- warningLine: "#F5D5A8",
85
- dangerFg: "#C43838",
86
- dangerBg: "#FBEAEA",
87
- dangerLine: "#ECC5C5",
79
+ successFg: "#1f7a3d",
80
+ successBg: "#eaf6ee",
81
+ successLine: "#c5e5cf",
82
+ warningFg: "#8a4606",
83
+ warningBg: "#fff3e5",
84
+ warningLine: "#f5d5a8",
85
+ dangerFg: "#c43838",
86
+ dangerBg: "#fbeaea",
87
+ dangerLine: "#ecc5c5",
88
88
  /* On-brand */
89
- fgOnAccent: "#FFFFFF",
90
- fgOnPro: "#FFFFFF"
89
+ fgOnAccent: "#ffffff",
90
+ fgOnPro: "#ffffff"
91
91
  };
92
92
  var typography = {
93
93
  family: {
@@ -113,17 +113,17 @@ var radii = {
113
113
  full: "9999px"
114
114
  };
115
115
  var shadows = {
116
- quiet: "0 1px 2px rgba(10,10,10,0.03)",
117
- card: "0 12px 28px -16px rgba(10,10,10,0.18), 0 1px 2px rgba(10,10,10,0.04)",
118
- pop: "0 30px 80px -30px rgba(10,10,10,0.18), 0 8px 24px -8px rgba(10,10,10,0.06)",
119
- focusRing: "0 0 0 2px rgba(0, 102, 255, 0.18)"
116
+ quiet: "0 1px 2px rgba(10, 10, 10, 0.03)",
117
+ card: "0 12px 28px -16px rgba(10, 10, 10, 0.18), 0 1px 2px rgba(10, 10, 10, 0.04)",
118
+ pop: "0 30px 80px -30px rgba(10, 10, 10, 0.18), 0 8px 24px -8px rgba(10, 10, 10, 0.06)",
119
+ focusRing: "0 0 0 2px rgba(108, 66, 248, 0.18)"
120
120
  };
121
121
  var overlays = {
122
122
  hover: "rgba(10, 10, 10, 0.03)",
123
123
  active: "rgba(10, 10, 10, 0.05)"
124
124
  };
125
125
  var layout = {
126
- shellSidebarWidth: "256px",
126
+ shellSidebarWidth: "200px",
127
127
  shellHeaderHeight: "56px",
128
128
  contentPad: "32px"
129
129
  };
@@ -144,10 +144,10 @@ var spacing = {
144
144
  180: "180px"
145
145
  };
146
146
  var surfaces = {
147
- bg: "#FDFDFC",
148
- bg2: "#F7F7F5",
149
- surface: "#FFFFFF",
150
- surface2: "#FAFAF8"
147
+ bg: "#ffffff",
148
+ bg2: "#f1f3f8",
149
+ surface: "#ffffff",
150
+ surface2: "#f7f8fc"
151
151
  };
152
152
  var motion = {
153
153
  ease: {
@@ -386,6 +386,29 @@ var systemTokens = {
386
386
  tooltip: "var(--z-tooltip)"
387
387
  }
388
388
  };
389
+ var split = (values) => values.split(" ");
390
+ var DS_RADIUS = split("badges btn buttons card cards general icon input inputs pill");
391
+ var DS_SHADOW = split("card focus focus-ring pop quiet subtle");
392
+ var DS_EASE = split("out-quart");
393
+ var DS_FONT = split("body display");
394
+ var DS_ANIMATE = split("accordion-down accordion-up collapsible-down collapsible-up pulse-soft");
395
+ var isDsShadowVar = (value) => /^\[var\(--shadow-[a-z0-9-]*\)\]$/.test(value);
396
+ var dsMergeConfig = {
397
+ extend: {
398
+ theme: {
399
+ radius: DS_RADIUS,
400
+ shadow: DS_SHADOW,
401
+ ease: DS_EASE,
402
+ font: DS_FONT,
403
+ animate: DS_ANIMATE
404
+ },
405
+ classGroups: {
406
+ shadow: [{ shadow: [isDsShadowVar] }]
407
+ }
408
+ }
409
+ };
410
+ var extendMerge = extendTailwindMerge;
411
+ var twMerge = extendMerge(dsMergeConfig);
389
412
  function cn(...inputs) {
390
413
  return twMerge(clsx(inputs));
391
414
  }
@@ -2454,6 +2477,254 @@ var AccordionContent = React39.forwardRef(function AccordionContent2({ children,
2454
2477
  );
2455
2478
  });
2456
2479
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
2480
+
2481
+ // src/foundation/anatomy/define.ts
2482
+ var ROOT_PART = "root";
2483
+ var NAME_PATTERN = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
2484
+ var registry = /* @__PURE__ */ new Map();
2485
+ function assertName(value, what) {
2486
+ if (!NAME_PATTERN.test(value)) {
2487
+ throw new TypeError(
2488
+ `anatomy: ${what} must be lower-case kebab-case, received ${JSON.stringify(value)}`
2489
+ );
2490
+ }
2491
+ }
2492
+ function defineAnatomy(name, parts) {
2493
+ assertName(name, "component name");
2494
+ if (parts.length === 0) {
2495
+ throw new TypeError(`anatomy: ${name} must declare at least one part`);
2496
+ }
2497
+ const seen = /* @__PURE__ */ new Set();
2498
+ for (const part of parts) {
2499
+ assertName(part, `part name of ${name}`);
2500
+ if (seen.has(part)) {
2501
+ throw new TypeError(`anatomy: ${name} declares the part ${JSON.stringify(part)} twice`);
2502
+ }
2503
+ seen.add(part);
2504
+ }
2505
+ if (registry.has(name)) {
2506
+ throw new TypeError(`anatomy: ${name} is already registered`);
2507
+ }
2508
+ const attr = (part) => part === ROOT_PART ? name : `${name}-${String(part)}`;
2509
+ const anatomy = {
2510
+ name,
2511
+ parts: [...parts],
2512
+ attrs: parts.map((part) => attr(part)),
2513
+ attr,
2514
+ has: (part) => seen.has(part)
2515
+ };
2516
+ registry.set(name, anatomy);
2517
+ return anatomy;
2518
+ }
2519
+
2520
+ // src/foundation/anatomy/slots.ts
2521
+ defineAnatomy("agreement-viewer", ["root"]);
2522
+ defineAnatomy("message-composer", [
2523
+ "root",
2524
+ "header",
2525
+ "chips",
2526
+ "editor",
2527
+ "below-editor",
2528
+ "footer"
2529
+ ]);
2530
+ var buttonAnatomy = defineAnatomy("button", ["root", "icon-start", "icon-end", "spinner"]);
2531
+ var linkButtonAnatomy = defineAnatomy("link-button", ["root", "icon-start", "icon-end"]);
2532
+ var badgeAnatomy = defineAnatomy("badge", ["root", "dot", "icon"]);
2533
+ var inputAnatomy = defineAnatomy("input", [
2534
+ "root",
2535
+ "label",
2536
+ "icon-start",
2537
+ "icon-end",
2538
+ "password-toggle",
2539
+ "error"
2540
+ ]);
2541
+ var textareaAnatomy = defineAnatomy("textarea", ["root", "label", "error", "count"]);
2542
+ var searchInputAnatomy = defineAnatomy("search-input", [
2543
+ "root",
2544
+ "control",
2545
+ "icon",
2546
+ "clear"
2547
+ ]);
2548
+ var selectAnatomy = defineAnatomy("select", [
2549
+ "trigger",
2550
+ "icon",
2551
+ "content",
2552
+ "viewport",
2553
+ "item",
2554
+ "item-indicator",
2555
+ "label",
2556
+ "separator",
2557
+ "scroll-up-button",
2558
+ "scroll-down-button"
2559
+ ]);
2560
+ var checkboxAnatomy = defineAnatomy("checkbox", ["root", "indicator", "label"]);
2561
+ var radioGroupAnatomy = defineAnatomy("radio-group", [
2562
+ "root",
2563
+ "item",
2564
+ "indicator",
2565
+ "label"
2566
+ ]);
2567
+ var switchAnatomy = defineAnatomy("switch", ["root", "thumb", "label"]);
2568
+ var labelAnatomy = defineAnatomy("label", ["root", "required"]);
2569
+ var fileUploadAnatomy = defineAnatomy("file-upload", [
2570
+ "root",
2571
+ "dropzone",
2572
+ "input",
2573
+ "error"
2574
+ ]);
2575
+ var dialogAnatomy = defineAnatomy("dialog", [
2576
+ "overlay",
2577
+ "content",
2578
+ "header",
2579
+ "title",
2580
+ "description",
2581
+ "footer",
2582
+ "close"
2583
+ ]);
2584
+ var alertDialogAnatomy = defineAnatomy("alert-dialog", [
2585
+ "overlay",
2586
+ "content",
2587
+ "header",
2588
+ "title",
2589
+ "description",
2590
+ "footer",
2591
+ "action",
2592
+ "cancel"
2593
+ ]);
2594
+ var sheetAnatomy = defineAnatomy("sheet", [
2595
+ "overlay",
2596
+ "content",
2597
+ "header",
2598
+ "title",
2599
+ "description",
2600
+ "footer",
2601
+ "close"
2602
+ ]);
2603
+ var sideDrawerAnatomy = defineAnatomy("side-drawer", [
2604
+ "overlay",
2605
+ "root",
2606
+ "header",
2607
+ "heading",
2608
+ "subtitle",
2609
+ "close",
2610
+ "body",
2611
+ "footer"
2612
+ ]);
2613
+ var popoverAnatomy = defineAnatomy("popover", ["content"]);
2614
+ var dropdownMenuAnatomy = defineAnatomy("dropdown-menu", [
2615
+ "content",
2616
+ "item",
2617
+ "checkbox-item",
2618
+ "radio-item",
2619
+ "item-indicator",
2620
+ "label",
2621
+ "separator",
2622
+ "shortcut",
2623
+ "sub-trigger",
2624
+ "sub-content"
2625
+ ]);
2626
+ var contextMenuAnatomy = defineAnatomy("context-menu", [
2627
+ "content",
2628
+ "item",
2629
+ "checkbox-item",
2630
+ "radio-item",
2631
+ "item-indicator",
2632
+ "label",
2633
+ "separator",
2634
+ "shortcut",
2635
+ "sub-trigger",
2636
+ "sub-content"
2637
+ ]);
2638
+ var tooltipAnatomy = defineAnatomy("tooltip", ["content"]);
2639
+ var toastAnatomy = defineAnatomy("toast", [
2640
+ "region",
2641
+ "root",
2642
+ "icon",
2643
+ "title",
2644
+ "description",
2645
+ "action",
2646
+ "close"
2647
+ ]);
2648
+ var tableAnatomy = defineAnatomy("table", [
2649
+ "root",
2650
+ "wrapper",
2651
+ "header",
2652
+ "body",
2653
+ "footer",
2654
+ "row",
2655
+ "head",
2656
+ "cell",
2657
+ "caption"
2658
+ ]);
2659
+ var dataTableAnatomy = defineAnatomy("data-table", [
2660
+ "root",
2661
+ "toolbar",
2662
+ "spacer",
2663
+ "results-count",
2664
+ "header",
2665
+ "body",
2666
+ "row",
2667
+ "head",
2668
+ "head-button",
2669
+ "head-indicator",
2670
+ "cell",
2671
+ "checkbox-cell"
2672
+ ]);
2673
+ var paginationAnatomy = defineAnatomy("pagination", [
2674
+ "root",
2675
+ "label",
2676
+ "pages",
2677
+ "previous",
2678
+ "next",
2679
+ "page",
2680
+ "ellipsis"
2681
+ ]);
2682
+ var shellAnatomy = defineAnatomy("shell", ["root", "main", "content"]);
2683
+ var sidebarAnatomy = defineAnatomy("sidebar", [
2684
+ "root",
2685
+ "trigger",
2686
+ "pin",
2687
+ "brand",
2688
+ "brand-text",
2689
+ "section",
2690
+ "section-header",
2691
+ "section-label",
2692
+ "link",
2693
+ "link-label",
2694
+ "link-action",
2695
+ "link-badge",
2696
+ "group",
2697
+ "group-link",
2698
+ "group-trigger",
2699
+ "group-content",
2700
+ "footer",
2701
+ "user",
2702
+ "user-name",
2703
+ "user-subtitle"
2704
+ ]);
2705
+ var sidebarBrandSwitcherAnatomy = defineAnatomy("sidebar-brand-switcher", [
2706
+ "root",
2707
+ "trigger",
2708
+ "icon"
2709
+ ]);
2710
+
2711
+ // src/foundation/anatomy/slot.ts
2712
+ function slot(anatomy, part) {
2713
+ return { "data-slot": anatomy.attr(part) };
2714
+ }
2715
+ var BOOLEAN_STATES = ["disabled", "invalid", "loading", "selected"];
2716
+ var VALUE_STATES = ["state", "size", "variant", "intent", "orientation"];
2717
+ function stateAttributes(input) {
2718
+ const attributes = {};
2719
+ for (const key of BOOLEAN_STATES) {
2720
+ if (input[key]) attributes[`data-${key}`] = "";
2721
+ }
2722
+ for (const key of VALUE_STATES) {
2723
+ const value = input[key];
2724
+ if (value !== void 0) attributes[`data-${key}`] = value;
2725
+ }
2726
+ return attributes;
2727
+ }
2457
2728
  var AlertDialog = AlertDialogPrimitive.Root;
2458
2729
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
2459
2730
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
@@ -2461,6 +2732,7 @@ var AlertDialogOverlay = React39.forwardRef(({ className, ...props }, ref) => /*
2461
2732
  AlertDialogPrimitive.Overlay,
2462
2733
  {
2463
2734
  ref,
2735
+ ...slot(alertDialogAnatomy, "overlay"),
2464
2736
  className: cn(
2465
2737
  "bg-overlay fixed inset-0 z-[var(--z-overlay)] backdrop-blur-[4px]",
2466
2738
  "transition-opacity duration-[var(--duration-overlay)] ease-[var(--ease-out-quart)]",
@@ -2478,6 +2750,7 @@ var AlertDialogContent = React39.forwardRef(({ className, ...props }, ref) => /*
2478
2750
  AlertDialogPrimitive.Content,
2479
2751
  {
2480
2752
  ref,
2753
+ ...slot(alertDialogAnatomy, "content"),
2481
2754
  className: cn(
2482
2755
  "fixed top-1/2 left-1/2 z-[var(--z-modal)] w-full max-w-lg",
2483
2756
  "scrollbar-thin max-h-[calc(100vh-6rem)] overflow-y-auto",
@@ -2494,11 +2767,19 @@ var AlertDialogContent = React39.forwardRef(({ className, ...props }, ref) => /*
2494
2767
  )
2495
2768
  ] }));
2496
2769
  AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
2497
- var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("mb-4 flex flex-col gap-1.5", className), ...props });
2770
+ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
2771
+ "div",
2772
+ {
2773
+ ...slot(alertDialogAnatomy, "header"),
2774
+ className: cn("mb-4 flex flex-col gap-1.5", className),
2775
+ ...props
2776
+ }
2777
+ );
2498
2778
  AlertDialogHeader.displayName = "AlertDialogHeader";
2499
2779
  var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
2500
2780
  "div",
2501
2781
  {
2782
+ ...slot(alertDialogAnatomy, "footer"),
2502
2783
  className: cn(
2503
2784
  "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end",
2504
2785
  className
@@ -2511,6 +2792,7 @@ var AlertDialogTitle = React39.forwardRef(({ className, ...props }, ref) => /* @
2511
2792
  AlertDialogPrimitive.Title,
2512
2793
  {
2513
2794
  ref,
2795
+ ...slot(alertDialogAnatomy, "title"),
2514
2796
  className: cn(
2515
2797
  "font-display text-fg text-base leading-tight font-medium tracking-tight",
2516
2798
  className
@@ -2523,6 +2805,7 @@ var AlertDialogDescription = React39.forwardRef(({ className, ...props }, ref) =
2523
2805
  AlertDialogPrimitive.Description,
2524
2806
  {
2525
2807
  ref,
2808
+ ...slot(alertDialogAnatomy, "description"),
2526
2809
  className: cn("text-fg-3 text-sm", className),
2527
2810
  ...props
2528
2811
  }
@@ -2532,6 +2815,7 @@ var AlertDialogAction = React39.forwardRef(({ className, ...props }, ref) => /*
2532
2815
  AlertDialogPrimitive.Action,
2533
2816
  {
2534
2817
  ref,
2818
+ ...slot(alertDialogAnatomy, "action"),
2535
2819
  className: cn(
2536
2820
  "rounded-btn inline-flex h-10 items-center justify-center px-4 text-sm font-medium whitespace-nowrap",
2537
2821
  "bg-destructive text-destructive-foreground transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -2548,6 +2832,7 @@ var AlertDialogCancel = React39.forwardRef(({ className, children, ...props }, r
2548
2832
  AlertDialogPrimitive.Cancel,
2549
2833
  {
2550
2834
  ref,
2835
+ ...slot(alertDialogAnatomy, "cancel"),
2551
2836
  className: cn(
2552
2837
  "rounded-btn border-rule-strong bg-surface inline-flex h-10 items-center justify-center border px-4 text-sm font-medium whitespace-nowrap",
2553
2838
  "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -2857,8 +3142,27 @@ var Button = forwardRef(function Button2({
2857
3142
  ...props
2858
3143
  }, ref) {
2859
3144
  const Comp = asChild ? Slot : "button";
3145
+ const resolvedVariant = variant ?? "primary";
3146
+ const resolvedSize = size ?? "md";
3147
+ const state = stateAttributes({
3148
+ variant: resolvedVariant,
3149
+ size: resolvedSize,
3150
+ // `asChild` drops `disabled`/`loading` (Slot renders the child's own
3151
+ // element), so the state attribute is not claimed there either.
3152
+ disabled: asChild ? void 0 : disabled || loading
3153
+ });
2860
3154
  if (asChild) {
2861
- return /* @__PURE__ */ jsx(Comp, { ref, className: cn(buttonVariants({ variant, size }), className), ...props, children });
3155
+ return /* @__PURE__ */ jsx(
3156
+ Comp,
3157
+ {
3158
+ ref,
3159
+ ...slot(buttonAnatomy, "root"),
3160
+ ...state,
3161
+ className: cn(buttonVariants({ variant, size }), className),
3162
+ ...props,
3163
+ children
3164
+ }
3165
+ );
2862
3166
  }
2863
3167
  return /* @__PURE__ */ jsxs(
2864
3168
  Comp,
@@ -2867,12 +3171,30 @@ var Button = forwardRef(function Button2({
2867
3171
  disabled: disabled || loading,
2868
3172
  "aria-busy": loading || void 0,
2869
3173
  "data-loading": loading || void 0,
3174
+ ...slot(buttonAnatomy, "root"),
3175
+ ...state,
2870
3176
  className: cn(buttonVariants({ variant, size }), className),
2871
3177
  ...props,
2872
3178
  children: [
2873
- loading ? /* @__PURE__ */ jsx(Spinner, { size: "sm" }) : iconLeft && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", "aria-hidden": "true", children: iconLeft }),
3179
+ loading ? /* @__PURE__ */ jsx(Spinner, { size: "sm", ...slot(buttonAnatomy, "spinner") }) : iconLeft && /* @__PURE__ */ jsx(
3180
+ "span",
3181
+ {
3182
+ ...slot(buttonAnatomy, "icon-start"),
3183
+ className: "inline-flex shrink-0",
3184
+ "aria-hidden": "true",
3185
+ children: iconLeft
3186
+ }
3187
+ ),
2874
3188
  children,
2875
- iconRight && !loading && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", "aria-hidden": "true", children: iconRight })
3189
+ iconRight && !loading && /* @__PURE__ */ jsx(
3190
+ "span",
3191
+ {
3192
+ ...slot(buttonAnatomy, "icon-end"),
3193
+ className: "inline-flex shrink-0",
3194
+ "aria-hidden": "true",
3195
+ children: iconRight
3196
+ }
3197
+ )
2876
3198
  ]
2877
3199
  }
2878
3200
  );
@@ -3184,11 +3506,36 @@ var badgeVariants = cva(
3184
3506
  }
3185
3507
  );
3186
3508
  var Badge = forwardRef(function Badge2({ variant, size, dot, icon, children, className, ...props }, ref) {
3187
- return /* @__PURE__ */ jsxs("span", { ref, className: cn(badgeVariants({ variant, size }), className), ...props, children: [
3188
- dot && /* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current", "aria-hidden": "true" }),
3189
- icon && /* @__PURE__ */ jsx("span", { className: "inline-flex size-3.5 shrink-0", "aria-hidden": "true", children: icon }),
3190
- children
3191
- ] });
3509
+ return /* @__PURE__ */ jsxs(
3510
+ "span",
3511
+ {
3512
+ ref,
3513
+ ...slot(badgeAnatomy, "root"),
3514
+ ...stateAttributes({ variant: variant ?? "default", size: size ?? "sm" }),
3515
+ className: cn(badgeVariants({ variant, size }), className),
3516
+ ...props,
3517
+ children: [
3518
+ dot && /* @__PURE__ */ jsx(
3519
+ "span",
3520
+ {
3521
+ ...slot(badgeAnatomy, "dot"),
3522
+ className: "size-1.5 rounded-full bg-current",
3523
+ "aria-hidden": "true"
3524
+ }
3525
+ ),
3526
+ icon && /* @__PURE__ */ jsx(
3527
+ "span",
3528
+ {
3529
+ ...slot(badgeAnatomy, "icon"),
3530
+ className: "inline-flex size-3.5 shrink-0",
3531
+ "aria-hidden": "true",
3532
+ children: icon
3533
+ }
3534
+ ),
3535
+ children
3536
+ ]
3537
+ }
3538
+ );
3192
3539
  });
3193
3540
  Badge.displayName = "Badge";
3194
3541
  var Blockquote = forwardRef(function Blockquote2({ children, author, role: authorRole, className, ...props }, ref) {
@@ -3332,6 +3679,303 @@ var BreadcrumbSeparator = forwardRef(
3332
3679
  }
3333
3680
  );
3334
3681
  BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
3682
+ var SelectRoot = SelectPrimitive.Root;
3683
+ var SelectGroup = SelectPrimitive.Group;
3684
+ var SelectValue = SelectPrimitive.Value;
3685
+ function useTriggerOpen(node) {
3686
+ const [open, setOpen] = React39.useState(false);
3687
+ React39.useEffect(() => {
3688
+ if (!node) return;
3689
+ const sync = () => setOpen(node.getAttribute("data-state") === "open");
3690
+ sync();
3691
+ const observer = new MutationObserver(sync);
3692
+ observer.observe(node, { attributes: true, attributeFilter: ["data-state"] });
3693
+ return () => observer.disconnect();
3694
+ }, [node]);
3695
+ return open;
3696
+ }
3697
+ var SelectTrigger = React39.forwardRef(({ className, children, tabIndex, ...props }, ref) => {
3698
+ const [node, setNode] = React39.useState(null);
3699
+ const open = useTriggerOpen(node);
3700
+ const composedRef = React39.useCallback(
3701
+ (element) => {
3702
+ setNode(element);
3703
+ if (typeof ref === "function") ref(element);
3704
+ else if (ref) ref.current = element;
3705
+ },
3706
+ [ref]
3707
+ );
3708
+ return /* @__PURE__ */ jsxs(
3709
+ SelectPrimitive.Trigger,
3710
+ {
3711
+ ref: composedRef,
3712
+ tabIndex: open ? -1 : tabIndex,
3713
+ ...slot(selectAnatomy, "trigger"),
3714
+ className: cn(
3715
+ "rounded-input border-rule-strong bg-surface font-body text-fg flex h-9 w-full items-center justify-between gap-2 border px-3 py-2 text-[13px]",
3716
+ "transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
3717
+ "motion-reduce:transition-none",
3718
+ "placeholder:text-fg-4",
3719
+ "focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
3720
+ "disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed",
3721
+ "data-[placeholder]:text-fg-4",
3722
+ "aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
3723
+ "aria-[invalid=true]:focus-visible:[box-shadow:0_0_0_2px_var(--color-danger-bg)]",
3724
+ "[&>span]:line-clamp-1 [&>span]:text-left",
3725
+ className
3726
+ ),
3727
+ ...props,
3728
+ children: [
3729
+ children,
3730
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
3731
+ ChevronDownIcon,
3732
+ {
3733
+ ...slot(selectAnatomy, "icon"),
3734
+ className: "text-fg-3 size-4 shrink-0 transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] data-[state=open]:rotate-180 motion-reduce:transition-none",
3735
+ "aria-hidden": "true"
3736
+ }
3737
+ ) })
3738
+ ]
3739
+ }
3740
+ );
3741
+ });
3742
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
3743
+ var SelectScrollUpButton = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3744
+ SelectPrimitive.ScrollUpButton,
3745
+ {
3746
+ ref,
3747
+ ...slot(selectAnatomy, "scroll-up-button"),
3748
+ className: cn("text-fg-3 flex cursor-default items-center justify-center py-1", className),
3749
+ ...props,
3750
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4", "aria-hidden": "true" })
3751
+ }
3752
+ ));
3753
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
3754
+ var SelectScrollDownButton = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3755
+ SelectPrimitive.ScrollDownButton,
3756
+ {
3757
+ ref,
3758
+ ...slot(selectAnatomy, "scroll-down-button"),
3759
+ className: cn("text-fg-3 flex cursor-default items-center justify-center py-1", className),
3760
+ ...props,
3761
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4", "aria-hidden": "true" })
3762
+ }
3763
+ ));
3764
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
3765
+ var SelectContent = React39.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
3766
+ SelectPrimitive.Content,
3767
+ {
3768
+ ref,
3769
+ position,
3770
+ ...slot(selectAnatomy, "content"),
3771
+ className: cn(
3772
+ "rounded-card border-rule bg-surface text-fg shadow-pop relative z-[var(--z-dropdown)] max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-hidden border",
3773
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
3774
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3775
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
3776
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
3777
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3778
+ "motion-reduce:transition-none",
3779
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
3780
+ className
3781
+ ),
3782
+ ...props,
3783
+ children: [
3784
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
3785
+ /* @__PURE__ */ jsx(
3786
+ SelectPrimitive.Viewport,
3787
+ {
3788
+ ...slot(selectAnatomy, "viewport"),
3789
+ className: cn(
3790
+ "p-1",
3791
+ position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
3792
+ ),
3793
+ children
3794
+ }
3795
+ ),
3796
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
3797
+ ]
3798
+ }
3799
+ ) }));
3800
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
3801
+ var SelectLabel = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3802
+ SelectPrimitive.Label,
3803
+ {
3804
+ ref,
3805
+ ...slot(selectAnatomy, "label"),
3806
+ className: cn(
3807
+ "text-fg-3 px-2 py-1.5 font-mono text-[11px] tracking-wider uppercase",
3808
+ className
3809
+ ),
3810
+ ...props
3811
+ }
3812
+ ));
3813
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
3814
+ var SelectItem = React39.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3815
+ SelectPrimitive.Item,
3816
+ {
3817
+ ref,
3818
+ ...slot(selectAnatomy, "item"),
3819
+ className: cn(
3820
+ "rounded-pill relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-[13px] outline-none select-none",
3821
+ "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
3822
+ "focus:bg-bg-2 focus:text-fg",
3823
+ "data-[state=checked]:bg-brand-bg data-[state=checked]:text-brand",
3824
+ "data-[disabled]:text-fg-disabled data-[disabled]:pointer-events-none",
3825
+ "[&_svg]:size-4 [&_svg]:shrink-0",
3826
+ className
3827
+ ),
3828
+ ...props,
3829
+ children: [
3830
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
3831
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { ...slot(selectAnatomy, "item-indicator"), children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) })
3832
+ ]
3833
+ }
3834
+ ));
3835
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
3836
+ var SelectSeparator = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3837
+ SelectPrimitive.Separator,
3838
+ {
3839
+ ref,
3840
+ ...slot(selectAnatomy, "separator"),
3841
+ className: cn("bg-rule -mx-1 my-1 h-px", className),
3842
+ ...props
3843
+ }
3844
+ ));
3845
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
3846
+ function Select({
3847
+ options,
3848
+ value,
3849
+ defaultValue,
3850
+ onValueChange,
3851
+ placeholder = "Select...",
3852
+ searchable,
3853
+ disabled,
3854
+ name,
3855
+ required,
3856
+ className,
3857
+ triggerClassName,
3858
+ contentClassName,
3859
+ "aria-invalid": ariaInvalid,
3860
+ "aria-label": ariaLabel
3861
+ }) {
3862
+ if (process.env.NODE_ENV !== "production" && searchable) {
3863
+ console.warn(
3864
+ "[Select] `searchable` is not supported by Radix Select. Use <SearchSelect /> for filterable selection."
3865
+ );
3866
+ }
3867
+ return /* @__PURE__ */ jsxs(
3868
+ SelectRoot,
3869
+ {
3870
+ value,
3871
+ defaultValue,
3872
+ onValueChange,
3873
+ disabled,
3874
+ name,
3875
+ required,
3876
+ children: [
3877
+ /* @__PURE__ */ jsx(
3878
+ SelectTrigger,
3879
+ {
3880
+ "aria-invalid": ariaInvalid || void 0,
3881
+ "aria-label": ariaLabel ?? placeholder,
3882
+ className: cn(triggerClassName, className),
3883
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
3884
+ }
3885
+ ),
3886
+ /* @__PURE__ */ jsx(SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, disabled: opt.disabled, children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
3887
+ /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: opt.label }),
3888
+ opt.labelSuffix
3889
+ ] }) }, opt.value)) })
3890
+ ]
3891
+ }
3892
+ );
3893
+ }
3894
+ Select.displayName = "Select";
3895
+ var DEFAULT_YEARS_BACK = 100;
3896
+ var DEFAULT_YEARS_FORWARD = 20;
3897
+ function CalendarDropdown({
3898
+ options = [],
3899
+ value,
3900
+ onChange,
3901
+ disabled,
3902
+ className,
3903
+ "aria-label": ariaLabel
3904
+ }) {
3905
+ const current = value === void 0 || value === null ? void 0 : String(value);
3906
+ const selected = options.find((option) => String(option.value) === current);
3907
+ return /* @__PURE__ */ jsxs(
3908
+ SelectRoot,
3909
+ {
3910
+ value: current,
3911
+ disabled,
3912
+ onValueChange: (next) => {
3913
+ onChange?.({ target: { value: next } });
3914
+ },
3915
+ children: [
3916
+ /* @__PURE__ */ jsx(
3917
+ SelectTrigger,
3918
+ {
3919
+ "aria-label": ariaLabel,
3920
+ className: cn(
3921
+ "h-7 w-auto min-w-0 gap-1 border-transparent bg-transparent px-1.5 py-0",
3922
+ "font-display font-medium",
3923
+ "hover:bg-bg-2",
3924
+ "[&>svg]:size-3.5",
3925
+ className
3926
+ ),
3927
+ children: /* @__PURE__ */ jsx(SelectValue, { children: selected?.label })
3928
+ }
3929
+ ),
3930
+ /* @__PURE__ */ jsx(SelectContent, { align: "center", className: "max-h-64 min-w-[6rem]", children: options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: String(option.value), disabled: option.disabled, children: option.label }, option.value)) })
3931
+ ]
3932
+ }
3933
+ );
3934
+ }
3935
+ function CalendarChevron({
3936
+ orientation,
3937
+ className
3938
+ }) {
3939
+ const Icon3 = orientation === "right" ? ChevronRightIcon : ChevronLeftIcon;
3940
+ return /* @__PURE__ */ jsx(Icon3, { className: cn("text-fg-3 size-4", className), "aria-hidden": "true" });
3941
+ }
3942
+ var CALENDAR_CAPTION_COMPONENTS = {
3943
+ Chevron: CalendarChevron,
3944
+ Dropdown: CalendarDropdown
3945
+ };
3946
+ var NAV_BUTTON = "absolute top-0 inline-flex size-7 items-center justify-center rounded-input text-fg-3 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none hover:bg-bg-2 hover:text-fg focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:text-fg-disabled disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-fg-disabled aria-disabled:pointer-events-none";
3947
+ var CALENDAR_CAPTION_CLASSNAMES = {
3948
+ month: "relative space-y-3",
3949
+ // px-7 keeps the caption clear of the two absolutely-pinned size-7 chevrons.
3950
+ // Font size is applied by each calendar (they own their type scale).
3951
+ month_caption: "flex h-7 items-center justify-center px-7 font-display font-medium text-fg",
3952
+ caption_label: "tabular-nums",
3953
+ // No root-level <nav> with navLayout="around"; the buttons render inline.
3954
+ nav: "contents",
3955
+ button_previous: cn("left-0", NAV_BUTTON),
3956
+ button_next: cn("right-0", NAV_BUTTON),
3957
+ dropdowns: "flex items-center justify-center gap-1",
3958
+ dropdown_root: "relative",
3959
+ months_dropdown: "",
3960
+ years_dropdown: "font-mono tabular-nums"
3961
+ };
3962
+ function resolveCalendarNavRange({
3963
+ minDate,
3964
+ maxDate,
3965
+ selected,
3966
+ today = /* @__PURE__ */ new Date()
3967
+ }) {
3968
+ let startMonth = minDate ? startOfMonth(minDate) : startOfYear(subYears(today, DEFAULT_YEARS_BACK));
3969
+ let endMonth = maxDate ? endOfMonth(maxDate) : endOfYear(addYears(today, DEFAULT_YEARS_FORWARD));
3970
+ const picks = (Array.isArray(selected) ? selected : [selected]).filter(
3971
+ (d) => d instanceof Date && !Number.isNaN(d.getTime())
3972
+ );
3973
+ for (const pick of picks) {
3974
+ if (pick < startMonth) startMonth = startOfMonth(pick);
3975
+ if (pick > endMonth) endMonth = endOfMonth(pick);
3976
+ }
3977
+ return { startMonth, endMonth };
3978
+ }
3335
3979
  var HIGHLIGHT_COLORS = {
3336
3980
  primary: "after:bg-brand",
3337
3981
  success: "after:bg-success-fg",
@@ -3347,6 +3991,11 @@ function Calendar({
3347
3991
  maxDate,
3348
3992
  className,
3349
3993
  classNames,
3994
+ captionLayout = "dropdown",
3995
+ navLayout = "around",
3996
+ startMonth,
3997
+ endMonth,
3998
+ components,
3350
3999
  ...props
3351
4000
  }) {
3352
4001
  const { modifiers, modifiersClassNames } = React39.useMemo(() => {
@@ -3370,6 +4019,10 @@ function Calendar({
3370
4019
  if (minDate) return { before: minDate };
3371
4020
  return { after: maxDate };
3372
4021
  }, [minDate, maxDate]);
4022
+ const navRange = React39.useMemo(
4023
+ () => captionLayout === "label" ? void 0 : resolveCalendarNavRange({ minDate, maxDate, selected }),
4024
+ [captionLayout, minDate, maxDate, selected]
4025
+ );
3373
4026
  return /* @__PURE__ */ jsx(
3374
4027
  DayPicker,
3375
4028
  {
@@ -3382,22 +4035,17 @@ function Calendar({
3382
4035
  modifiers,
3383
4036
  modifiersClassNames,
3384
4037
  showOutsideDays: true,
3385
- components: {
3386
- Chevron: ({ orientation, className: chevClass }) => {
3387
- const Icon3 = orientation === "right" ? ChevronRightIcon : ChevronLeftIcon;
3388
- return /* @__PURE__ */ jsx(Icon3, { className: cn("text-fg-3 size-4", chevClass), "aria-hidden": "true" });
3389
- }
3390
- },
4038
+ captionLayout,
4039
+ navLayout,
4040
+ startMonth: startMonth ?? navRange?.startMonth,
4041
+ endMonth: endMonth ?? navRange?.endMonth,
4042
+ components: { ...CALENDAR_CAPTION_COMPONENTS, ...components },
3391
4043
  className: cn("font-body text-fg select-none", className),
3392
4044
  classNames: {
3393
4045
  root: "p-3 min-w-[280px]",
3394
4046
  months: "flex flex-col gap-4",
3395
- month: "space-y-3",
3396
- month_caption: "flex h-8 items-center justify-center font-display text-[13px] font-medium text-fg",
3397
- caption_label: "tabular-nums",
3398
- nav: "flex items-center justify-between absolute left-3 right-3 top-3",
3399
- button_previous: "inline-flex size-7 items-center justify-center rounded-input text-fg-3 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none hover:bg-bg-2 hover:text-fg focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:text-fg-disabled disabled:pointer-events-none",
3400
- button_next: "inline-flex size-7 items-center justify-center rounded-input text-fg-3 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none hover:bg-bg-2 hover:text-fg focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:text-fg-disabled disabled:pointer-events-none",
4047
+ ...CALENDAR_CAPTION_CLASSNAMES,
4048
+ month_caption: cn(CALENDAR_CAPTION_CLASSNAMES.month_caption, "text-[13px]"),
3401
4049
  month_grid: "w-full border-collapse",
3402
4050
  weekdays: "flex",
3403
4051
  weekday: "flex-1 text-center text-[11px] font-medium uppercase tracking-wide text-fg-4 pb-1",
@@ -3527,237 +4175,67 @@ var CategoryDivider = forwardRef(
3527
4175
  /* @__PURE__ */ jsx(CategoryTag, { label, icon, tone }),
3528
4176
  /* @__PURE__ */ jsx("span", { className: "bg-rule h-px flex-1", "aria-hidden": "true" }),
3529
4177
  count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-fg-3 bg-surface-2 border-rule inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full border px-1.5 text-[11px] font-bold", children: count })
3530
- ] });
3531
- }
3532
- );
3533
- CategoryDivider.displayName = "CategoryDivider";
3534
- var Checkbox = React39.forwardRef(function Checkbox2({
3535
- label,
3536
- indeterminate,
3537
- checked,
3538
- defaultChecked,
3539
- shape = "square",
3540
- className,
3541
- id: providedId,
3542
- ...props
3543
- }, ref) {
3544
- const generatedId = React39.useId();
3545
- const id = providedId ?? generatedId;
3546
- const resolvedChecked = indeterminate ? "indeterminate" : checked;
3547
- return /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
3548
- /* @__PURE__ */ jsx(
3549
- CheckboxPrimitive.Root,
3550
- {
3551
- ref,
3552
- id,
3553
- checked: resolvedChecked,
3554
- defaultChecked,
3555
- className: cn(
3556
- "peer border-rule-strong bg-surface text-brand flex size-4 shrink-0 items-center justify-center border",
3557
- shape === "circle" ? "rounded-full" : "rounded-[4px]",
3558
- microInteractions.selection,
3559
- "hover:border-fg-4",
3560
- "focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
3561
- "data-[state=checked]:border-brand data-[state=checked]:bg-brand-bg",
3562
- "data-[state=indeterminate]:border-brand data-[state=indeterminate]:bg-brand-bg",
3563
- "disabled:bg-bg-disabled disabled:border-rule disabled:text-fg-disabled disabled:cursor-not-allowed",
3564
- "aria-[invalid=true]:border-danger-line",
3565
- className
3566
- ),
3567
- ...props,
3568
- children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: resolvedChecked === "indeterminate" ? /* @__PURE__ */ jsx(MinusIcon, { className: "size-3", strokeWidth: 3, "aria-hidden": "true" }) : shape === "circle" ? /* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "size-3", strokeWidth: 3, "aria-hidden": "true" }) })
3569
- }
3570
- ),
3571
- label && /* @__PURE__ */ jsx(
3572
- "label",
3573
- {
3574
- htmlFor: id,
3575
- className: "text-fg peer-disabled:text-fg-disabled cursor-pointer text-[13px] leading-none select-none peer-disabled:cursor-not-allowed",
3576
- children: label
3577
- }
3578
- )
3579
- ] });
3580
- });
3581
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
3582
- var SelectRoot = SelectPrimitive.Root;
3583
- var SelectGroup = SelectPrimitive.Group;
3584
- var SelectValue = SelectPrimitive.Value;
3585
- var SelectTrigger = React39.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3586
- SelectPrimitive.Trigger,
3587
- {
3588
- ref,
3589
- className: cn(
3590
- "rounded-input border-rule-strong bg-surface font-body text-fg flex h-9 w-full items-center justify-between gap-2 border px-3 py-2 text-[13px]",
3591
- "transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
3592
- "motion-reduce:transition-none",
3593
- "placeholder:text-fg-4",
3594
- "focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
3595
- "disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed",
3596
- "data-[placeholder]:text-fg-4",
3597
- "aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
3598
- "aria-[invalid=true]:focus-visible:[box-shadow:0_0_0_2px_var(--color-danger-bg)]",
3599
- "[&>span]:line-clamp-1 [&>span]:text-left",
3600
- className
3601
- ),
3602
- ...props,
3603
- children: [
3604
- children,
3605
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
3606
- ChevronDownIcon,
3607
- {
3608
- className: "text-fg-3 size-4 shrink-0 transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] data-[state=open]:rotate-180 motion-reduce:transition-none",
3609
- "aria-hidden": "true"
3610
- }
3611
- ) })
3612
- ]
3613
- }
3614
- ));
3615
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
3616
- var SelectScrollUpButton = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3617
- SelectPrimitive.ScrollUpButton,
3618
- {
3619
- ref,
3620
- className: cn("text-fg-3 flex cursor-default items-center justify-center py-1", className),
3621
- ...props,
3622
- children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4", "aria-hidden": "true" })
3623
- }
3624
- ));
3625
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
3626
- var SelectScrollDownButton = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3627
- SelectPrimitive.ScrollDownButton,
3628
- {
3629
- ref,
3630
- className: cn("text-fg-3 flex cursor-default items-center justify-center py-1", className),
3631
- ...props,
3632
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4", "aria-hidden": "true" })
3633
- }
3634
- ));
3635
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
3636
- var SelectContent = React39.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
3637
- SelectPrimitive.Content,
3638
- {
3639
- ref,
3640
- position,
3641
- className: cn(
3642
- "rounded-card border-rule bg-surface text-fg shadow-pop relative z-[var(--z-dropdown)] max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-hidden border",
3643
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
3644
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3645
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
3646
- "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
3647
- "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3648
- "motion-reduce:transition-none",
3649
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
3650
- className
3651
- ),
3652
- ...props,
3653
- children: [
3654
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
3655
- /* @__PURE__ */ jsx(
3656
- SelectPrimitive.Viewport,
3657
- {
3658
- className: cn(
3659
- "p-1",
3660
- position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
3661
- ),
3662
- children
3663
- }
3664
- ),
3665
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
3666
- ]
3667
- }
3668
- ) }));
3669
- SelectContent.displayName = SelectPrimitive.Content.displayName;
3670
- var SelectLabel = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3671
- SelectPrimitive.Label,
3672
- {
3673
- ref,
3674
- className: cn(
3675
- "text-fg-3 px-2 py-1.5 font-mono text-[11px] tracking-wider uppercase",
3676
- className
3677
- ),
3678
- ...props
3679
- }
3680
- ));
3681
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
3682
- var SelectItem = React39.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3683
- SelectPrimitive.Item,
3684
- {
3685
- ref,
3686
- className: cn(
3687
- "rounded-pill relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-[13px] outline-none select-none",
3688
- "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
3689
- "focus:bg-bg-2 focus:text-fg",
3690
- "data-[state=checked]:bg-brand-bg data-[state=checked]:text-brand",
3691
- "data-[disabled]:text-fg-disabled data-[disabled]:pointer-events-none",
3692
- "[&_svg]:size-4 [&_svg]:shrink-0",
3693
- className
3694
- ),
3695
- ...props,
3696
- children: [
3697
- /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
3698
- /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) })
3699
- ]
3700
- }
3701
- ));
3702
- SelectItem.displayName = SelectPrimitive.Item.displayName;
3703
- var SelectSeparator = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3704
- SelectPrimitive.Separator,
3705
- {
3706
- ref,
3707
- className: cn("bg-rule -mx-1 my-1 h-px", className),
3708
- ...props
3709
- }
3710
- ));
3711
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
3712
- function Select({
3713
- options,
3714
- value,
3715
- defaultValue,
3716
- onValueChange,
3717
- placeholder = "Select...",
3718
- searchable,
3719
- disabled,
3720
- name,
3721
- required,
3722
- className,
3723
- triggerClassName,
3724
- contentClassName,
3725
- "aria-invalid": ariaInvalid,
3726
- "aria-label": ariaLabel
3727
- }) {
3728
- if (process.env.NODE_ENV !== "production" && searchable) {
3729
- console.warn(
3730
- "[Select] `searchable` is not supported by Radix Select. Use <SearchSelect /> for filterable selection."
3731
- );
4178
+ ] });
3732
4179
  }
3733
- return /* @__PURE__ */ jsxs(
3734
- SelectRoot,
3735
- {
3736
- value,
3737
- defaultValue,
3738
- onValueChange,
3739
- disabled,
3740
- name,
3741
- required,
3742
- children: [
3743
- /* @__PURE__ */ jsx(
3744
- SelectTrigger,
4180
+ );
4181
+ CategoryDivider.displayName = "CategoryDivider";
4182
+ var Checkbox = React39.forwardRef(function Checkbox2({
4183
+ label,
4184
+ indeterminate,
4185
+ checked,
4186
+ defaultChecked,
4187
+ shape = "square",
4188
+ className,
4189
+ id: providedId,
4190
+ ...props
4191
+ }, ref) {
4192
+ const generatedId = React39.useId();
4193
+ const id = providedId ?? generatedId;
4194
+ const resolvedChecked = indeterminate ? "indeterminate" : checked;
4195
+ return /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
4196
+ /* @__PURE__ */ jsx(
4197
+ CheckboxPrimitive.Root,
4198
+ {
4199
+ ref,
4200
+ id,
4201
+ checked: resolvedChecked,
4202
+ defaultChecked,
4203
+ ...slot(checkboxAnatomy, "root"),
4204
+ className: cn(
4205
+ "peer border-rule-strong bg-surface text-brand flex size-4 shrink-0 items-center justify-center border",
4206
+ shape === "circle" ? "rounded-full" : "rounded-[4px]",
4207
+ microInteractions.selection,
4208
+ "hover:border-fg-4",
4209
+ "focus-visible:[border-color:var(--focus-ring-border)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
4210
+ "data-[state=checked]:border-brand data-[state=checked]:bg-brand-bg",
4211
+ "data-[state=indeterminate]:border-brand data-[state=indeterminate]:bg-brand-bg",
4212
+ "disabled:bg-bg-disabled disabled:border-rule disabled:text-fg-disabled disabled:cursor-not-allowed",
4213
+ "aria-[invalid=true]:border-danger-line",
4214
+ className
4215
+ ),
4216
+ ...props,
4217
+ children: /* @__PURE__ */ jsx(
4218
+ CheckboxPrimitive.Indicator,
3745
4219
  {
3746
- "aria-invalid": ariaInvalid || void 0,
3747
- "aria-label": ariaLabel ?? placeholder,
3748
- className: cn(triggerClassName, className),
3749
- children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
4220
+ ...slot(checkboxAnatomy, "indicator"),
4221
+ className: "flex items-center justify-center text-current",
4222
+ children: resolvedChecked === "indeterminate" ? /* @__PURE__ */ jsx(MinusIcon, { className: "size-3", strokeWidth: 3, "aria-hidden": "true" }) : shape === "circle" ? /* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "size-3", strokeWidth: 3, "aria-hidden": "true" })
3750
4223
  }
3751
- ),
3752
- /* @__PURE__ */ jsx(SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, disabled: opt.disabled, children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
3753
- /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: opt.label }),
3754
- opt.labelSuffix
3755
- ] }) }, opt.value)) })
3756
- ]
3757
- }
3758
- );
3759
- }
3760
- Select.displayName = "Select";
4224
+ )
4225
+ }
4226
+ ),
4227
+ label && /* @__PURE__ */ jsx(
4228
+ "label",
4229
+ {
4230
+ htmlFor: id,
4231
+ ...slot(checkboxAnatomy, "label"),
4232
+ className: "text-fg peer-disabled:text-fg-disabled cursor-pointer text-[13px] leading-none select-none peer-disabled:cursor-not-allowed",
4233
+ children: label
4234
+ }
4235
+ )
4236
+ ] });
4237
+ });
4238
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
3761
4239
  function ClientSelect({
3762
4240
  clients,
3763
4241
  value,
@@ -3885,6 +4363,7 @@ var DialogOverlay = React39.forwardRef(({ className, ...props }, ref) => /* @__P
3885
4363
  DialogPrimitive.Overlay,
3886
4364
  {
3887
4365
  ref,
4366
+ ...slot(dialogAnatomy, "overlay"),
3888
4367
  className: cn(
3889
4368
  "bg-overlay fixed inset-0 z-[var(--z-overlay)] backdrop-blur-[4px]",
3890
4369
  microInteractions.overlay,
@@ -3907,6 +4386,8 @@ var DialogContent = React39.forwardRef(({ size = "md", showCloseButton = true, c
3907
4386
  DialogPrimitive.Content,
3908
4387
  {
3909
4388
  ref,
4389
+ ...slot(dialogAnatomy, "content"),
4390
+ ...stateAttributes({ size }),
3910
4391
  className: cn(
3911
4392
  "fixed top-1/2 left-1/2 z-[var(--z-modal)] w-full",
3912
4393
  "scrollbar-thin max-h-[calc(100vh-6rem)] overflow-y-auto",
@@ -3925,6 +4406,7 @@ var DialogContent = React39.forwardRef(({ size = "md", showCloseButton = true, c
3925
4406
  showCloseButton && /* @__PURE__ */ jsx(
3926
4407
  DialogPrimitive.Close,
3927
4408
  {
4409
+ ...slot(dialogAnatomy, "close"),
3928
4410
  className: cn(
3929
4411
  "absolute top-4 right-4 inline-flex size-7 items-center justify-center",
3930
4412
  "rounded-icon text-fg-4 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -3941,13 +4423,29 @@ var DialogContent = React39.forwardRef(({ size = "md", showCloseButton = true, c
3941
4423
  )
3942
4424
  ] }));
3943
4425
  DialogContent.displayName = DialogPrimitive.Content.displayName;
3944
- var DialogClose = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Close, { ref, className: cn(className), ...props }));
4426
+ var DialogClose = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4427
+ DialogPrimitive.Close,
4428
+ {
4429
+ ref,
4430
+ ...slot(dialogAnatomy, "close"),
4431
+ className: cn(className),
4432
+ ...props
4433
+ }
4434
+ ));
3945
4435
  DialogClose.displayName = "DialogClose";
3946
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("mb-4 flex flex-col gap-1.5 pr-8", className), ...props });
4436
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
4437
+ "div",
4438
+ {
4439
+ ...slot(dialogAnatomy, "header"),
4440
+ className: cn("mb-4 flex flex-col gap-1.5 pr-8", className),
4441
+ ...props
4442
+ }
4443
+ );
3947
4444
  DialogHeader.displayName = "DialogHeader";
3948
4445
  var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
3949
4446
  "div",
3950
4447
  {
4448
+ ...slot(dialogAnatomy, "footer"),
3951
4449
  className: cn(
3952
4450
  "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end",
3953
4451
  className
@@ -3960,6 +4458,7 @@ var DialogTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
3960
4458
  DialogPrimitive.Title,
3961
4459
  {
3962
4460
  ref,
4461
+ ...slot(dialogAnatomy, "title"),
3963
4462
  className: cn(
3964
4463
  "font-display text-fg text-base leading-tight font-medium tracking-tight",
3965
4464
  className
@@ -3972,6 +4471,7 @@ var DialogDescription = React39.forwardRef(({ className, ...props }, ref) => /*
3972
4471
  DialogPrimitive.Description,
3973
4472
  {
3974
4473
  ref,
4474
+ ...slot(dialogAnatomy, "description"),
3975
4475
  className: cn("text-fg-3 text-sm", className),
3976
4476
  ...props
3977
4477
  }
@@ -4229,6 +4729,7 @@ var ContextMenuSubTrigger = React39.forwardRef(({ className, inset, children, ..
4229
4729
  ContextMenuPrimitive.SubTrigger,
4230
4730
  {
4231
4731
  ref,
4732
+ ...slot(contextMenuAnatomy, "sub-trigger"),
4232
4733
  className: cn(
4233
4734
  "rounded-pill flex cursor-default items-center gap-2 px-2 py-1.5 text-sm outline-none select-none",
4234
4735
  "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -4256,6 +4757,7 @@ var ContextMenuSubContent = React39.forwardRef(({ className, ...props }, ref) =>
4256
4757
  ContextMenuPrimitive.SubContent,
4257
4758
  {
4258
4759
  ref,
4760
+ ...slot(contextMenuAnatomy, "sub-content"),
4259
4761
  className: cn(
4260
4762
  "rounded-card border-rule bg-surface text-fg shadow-pop z-[var(--z-dropdown)] min-w-[8rem] overflow-hidden border p-1",
4261
4763
  "transition-[opacity,transform] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
@@ -4273,6 +4775,7 @@ var ContextMenuContent = React39.forwardRef(({ className, ...props }, ref) => /*
4273
4775
  ContextMenuPrimitive.Content,
4274
4776
  {
4275
4777
  ref,
4778
+ ...slot(contextMenuAnatomy, "content"),
4276
4779
  className: cn(
4277
4780
  "rounded-card border-rule bg-surface text-fg shadow-pop z-[var(--z-dropdown)] min-w-[10rem] overflow-hidden border p-1",
4278
4781
  "transition-[opacity,transform] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
@@ -4289,6 +4792,7 @@ var ContextMenuItem = React39.forwardRef(({ className, destructive, inset, ...pr
4289
4792
  ContextMenuPrimitive.Item,
4290
4793
  {
4291
4794
  ref,
4795
+ ...slot(contextMenuAnatomy, "item"),
4292
4796
  className: cn(
4293
4797
  "rounded-pill relative flex cursor-default items-center gap-2 px-2 py-1.5 text-sm outline-none select-none",
4294
4798
  "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -4307,6 +4811,7 @@ var ContextMenuCheckboxItem = React39.forwardRef(({ className, children, checked
4307
4811
  ContextMenuPrimitive.CheckboxItem,
4308
4812
  {
4309
4813
  ref,
4814
+ ...slot(contextMenuAnatomy, "checkbox-item"),
4310
4815
  checked,
4311
4816
  className: cn(
4312
4817
  "rounded-pill relative flex cursor-default items-center gap-2 py-1.5 pr-2 pl-8 text-sm outline-none select-none",
@@ -4317,7 +4822,7 @@ var ContextMenuCheckboxItem = React39.forwardRef(({ className, children, checked
4317
4822
  ),
4318
4823
  ...props,
4319
4824
  children: [
4320
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) }),
4825
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { ...slot(contextMenuAnatomy, "item-indicator"), children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) }),
4321
4826
  children
4322
4827
  ]
4323
4828
  }
@@ -4327,6 +4832,7 @@ var ContextMenuRadioItem = React39.forwardRef(({ className, children, ...props }
4327
4832
  ContextMenuPrimitive.RadioItem,
4328
4833
  {
4329
4834
  ref,
4835
+ ...slot(contextMenuAnatomy, "radio-item"),
4330
4836
  className: cn(
4331
4837
  "rounded-pill relative flex cursor-default items-center gap-2 py-1.5 pr-2 pl-8 text-sm outline-none select-none",
4332
4838
  "text-fg-2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -4336,7 +4842,7 @@ var ContextMenuRadioItem = React39.forwardRef(({ className, children, ...props }
4336
4842
  ),
4337
4843
  ...props,
4338
4844
  children: [
4339
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current", "aria-hidden": "true" }) }) }),
4845
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { ...slot(contextMenuAnatomy, "item-indicator"), children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current", "aria-hidden": "true" }) }) }),
4340
4846
  children
4341
4847
  ]
4342
4848
  }
@@ -4346,6 +4852,7 @@ var ContextMenuLabel = React39.forwardRef(({ className, inset, ...props }, ref)
4346
4852
  ContextMenuPrimitive.Label,
4347
4853
  {
4348
4854
  ref,
4855
+ ...slot(contextMenuAnatomy, "label"),
4349
4856
  className: cn(
4350
4857
  "text-fg-3 px-2 py-1.5 font-mono text-[11px] tracking-wider uppercase",
4351
4858
  inset && "pl-8",
@@ -4359,6 +4866,7 @@ var ContextMenuSeparator = React39.forwardRef(({ className, ...props }, ref) =>
4359
4866
  ContextMenuPrimitive.Separator,
4360
4867
  {
4361
4868
  ref,
4869
+ ...slot(contextMenuAnatomy, "separator"),
4362
4870
  className: cn("bg-rule -mx-1 my-1 h-px", className),
4363
4871
  ...props
4364
4872
  }
@@ -4457,6 +4965,7 @@ var PopoverContent = React39.forwardRef(({ className, align = "center", side = "
4457
4965
  align,
4458
4966
  side,
4459
4967
  sideOffset,
4968
+ ...slot(popoverAnatomy, "content"),
4460
4969
  className: cn(
4461
4970
  "rounded-card border-rule bg-surface text-fg shadow-pop z-[var(--z-dropdown)] w-72 border p-4 outline-none",
4462
4971
  microInteractions.overlay,
@@ -4574,7 +5083,9 @@ var DatePicker = forwardRef(function DatePicker2({
4574
5083
  "aria-label": ariaLabel,
4575
5084
  picker = "day",
4576
5085
  formatLabel,
4577
- iconPosition = "right"
5086
+ iconPosition = "right",
5087
+ captionLayout = "dropdown",
5088
+ inputClassName
4578
5089
  }, ref) {
4579
5090
  const isYearMode = picker === "year";
4580
5091
  const hasCustomYearLabel = isYearMode && !!formatLabel;
@@ -4695,7 +5206,8 @@ var DatePicker = forwardRef(function DatePicker2({
4695
5206
  "disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-not-allowed",
4696
5207
  "aria-[invalid=true]:border-danger-line aria-[invalid=true]:focus-visible:border-danger-fg",
4697
5208
  "aria-[invalid=true]:focus-visible:[box-shadow:0_0_0_2px_var(--color-danger-bg)]",
4698
- hasCustomYearLabel && "cursor-pointer"
5209
+ hasCustomYearLabel && "cursor-pointer",
5210
+ inputClassName
4699
5211
  )
4700
5212
  }
4701
5213
  ),
@@ -4744,6 +5256,7 @@ var DatePicker = forwardRef(function DatePicker2({
4744
5256
  minDate,
4745
5257
  maxDate,
4746
5258
  defaultMonth: selectedDate ?? minDate ?? void 0,
5259
+ captionLayout,
4747
5260
  autoFocus: true
4748
5261
  }
4749
5262
  )
@@ -4772,7 +5285,8 @@ var DateRangePicker = forwardRef(
4772
5285
  min,
4773
5286
  max,
4774
5287
  iconPosition = "right",
4775
- "aria-label": ariaLabel
5288
+ "aria-label": ariaLabel,
5289
+ captionLayout = "dropdown"
4776
5290
  }, ref) {
4777
5291
  const generatedId = useId();
4778
5292
  const id = providedId ?? generatedId;
@@ -4831,6 +5345,14 @@ var DateRangePicker = forwardRef(
4831
5345
  to: isoToDate(current.to ?? "")
4832
5346
  };
4833
5347
  const selectedRange = draftRange ?? committedRange;
5348
+ const navRange = useMemo(
5349
+ () => captionLayout === "label" ? void 0 : resolveCalendarNavRange({
5350
+ minDate,
5351
+ maxDate,
5352
+ selected: [selectedRange.from, selectedRange.to]
5353
+ }),
5354
+ [captionLayout, minDate, maxDate, selectedRange.from, selectedRange.to]
5355
+ );
4834
5356
  const disabledMatcher = (() => {
4835
5357
  if (!minDate && !maxDate) return void 0;
4836
5358
  if (minDate && maxDate) return [{ before: minDate }, { after: maxDate }];
@@ -4907,38 +5429,25 @@ var DateRangePicker = forwardRef(
4907
5429
  mode: "range",
4908
5430
  numberOfMonths: 2,
4909
5431
  navLayout: "around",
5432
+ captionLayout,
5433
+ startMonth: navRange?.startMonth,
5434
+ endMonth: navRange?.endMonth,
4910
5435
  selected: selectedRange.from ? { from: selectedRange.from, to: selectedRange.to } : void 0,
4911
5436
  onSelect: handleCalendarSelect,
4912
5437
  disabled: disabledMatcher,
4913
5438
  showOutsideDays: true,
4914
5439
  autoFocus: true,
4915
5440
  defaultMonth: selectedRange.from ?? minDate ?? void 0,
4916
- components: {
4917
- Chevron: ({ orientation, className: chevClass }) => {
4918
- const Icon3 = orientation === "right" ? ChevronRightIcon : ChevronLeftIcon;
4919
- return /* @__PURE__ */ jsx(Icon3, { className: cn("text-fg-3 size-4", chevClass), "aria-hidden": "true" });
4920
- }
4921
- },
5441
+ components: CALENDAR_CAPTION_COMPONENTS,
4922
5442
  className: "font-body text-fg select-none",
4923
5443
  classNames: {
4924
5444
  root: "p-3",
4925
5445
  months: "flex flex-col gap-6 sm:flex-row sm:gap-4",
4926
- month: "relative space-y-3 w-[16rem] flex-none",
4927
- // With navLayout="around", the chevron buttons live inside
4928
- // the caption row, one on each side of the month title.
4929
- // The caption row distributes them via space-between so
4930
- // each chevron stays in its natural inline flow — no
4931
- // absolute positioning gymnastics.
4932
- month_caption: "flex h-7 items-center justify-center font-display text-[13px] font-medium text-fg",
4933
- caption_label: "tabular-nums",
4934
- nav: "contents",
4935
- // navLayout="around" renders Prev as a sibling BEFORE the
4936
- // left month's caption, and Next as a sibling AFTER the
4937
- // right month's caption. Absolute-position each so they
4938
- // sit at their own month's top corners without disturbing
4939
- // the centered caption row.
4940
- button_previous: "absolute left-0 top-0 z-10 inline-flex size-7 items-center justify-center rounded-input text-fg-3 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none hover:bg-bg-2 hover:text-fg focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:text-fg-disabled disabled:pointer-events-none",
4941
- button_next: "absolute right-0 top-0 z-10 inline-flex size-7 items-center justify-center rounded-input text-fg-3 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none hover:bg-bg-2 hover:text-fg focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:text-fg-disabled disabled:pointer-events-none",
5446
+ ...CALENDAR_CAPTION_CLASSNAMES,
5447
+ // Two side-by-side months; each keeps the shared relative
5448
+ // caption/nav contract and a fixed width.
5449
+ month: cn(CALENDAR_CAPTION_CLASSNAMES.month, "w-[16rem] flex-none"),
5450
+ month_caption: cn(CALENDAR_CAPTION_CLASSNAMES.month_caption, "text-[13px]"),
4942
5451
  month_grid: "w-full border-collapse",
4943
5452
  weekdays: "flex",
4944
5453
  weekday: "flex-1 text-center text-[11px] font-medium uppercase tracking-wide text-fg-4 pb-1",
@@ -5201,6 +5710,7 @@ var DropdownMenuSubTrigger = React39.forwardRef(({ className, inset, children, .
5201
5710
  DropdownMenuPrimitive.SubTrigger,
5202
5711
  {
5203
5712
  ref,
5713
+ ...slot(dropdownMenuAnatomy, "sub-trigger"),
5204
5714
  className: cn(
5205
5715
  "rounded-pill flex cursor-default items-center gap-2 px-2 py-1.5 text-sm outline-none select-none",
5206
5716
  "text-menu-item-fg transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -5228,6 +5738,7 @@ var DropdownMenuSubContent = React39.forwardRef(({ className, ...props }, ref) =
5228
5738
  DropdownMenuPrimitive.SubContent,
5229
5739
  {
5230
5740
  ref,
5741
+ ...slot(dropdownMenuAnatomy, "sub-content"),
5231
5742
  className: cn(
5232
5743
  "rounded-card border-menu-border bg-menu-bg text-menu-fg shadow-pop z-[var(--z-dropdown)] min-w-[8rem] overflow-hidden border p-1",
5233
5744
  "transition-[opacity,transform] duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
@@ -5245,6 +5756,7 @@ var DropdownMenuContent = React39.forwardRef(({ className, sideOffset = 6, align
5245
5756
  DropdownMenuPrimitive.Content,
5246
5757
  {
5247
5758
  ref,
5759
+ ...slot(dropdownMenuAnatomy, "content"),
5248
5760
  sideOffset,
5249
5761
  align,
5250
5762
  className: cn(
@@ -5263,6 +5775,7 @@ var DropdownMenuItem = React39.forwardRef(({ className, destructive, inset, ...p
5263
5775
  DropdownMenuPrimitive.Item,
5264
5776
  {
5265
5777
  ref,
5778
+ ...slot(dropdownMenuAnatomy, "item"),
5266
5779
  className: cn(
5267
5780
  "rounded-pill relative flex cursor-default items-center gap-2 px-2 py-1.5 text-sm outline-none select-none",
5268
5781
  "text-menu-item-fg transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -5281,6 +5794,7 @@ var DropdownMenuCheckboxItem = React39.forwardRef(({ className, children, checke
5281
5794
  DropdownMenuPrimitive.CheckboxItem,
5282
5795
  {
5283
5796
  ref,
5797
+ ...slot(dropdownMenuAnatomy, "checkbox-item"),
5284
5798
  checked,
5285
5799
  className: cn(
5286
5800
  "rounded-pill relative flex cursor-default items-center gap-2 py-1.5 pr-2 pl-8 text-sm outline-none select-none",
@@ -5291,7 +5805,7 @@ var DropdownMenuCheckboxItem = React39.forwardRef(({ className, children, checke
5291
5805
  ),
5292
5806
  ...props,
5293
5807
  children: [
5294
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) }),
5808
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { ...slot(dropdownMenuAnatomy, "item-indicator"), children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": "true" }) }) }),
5295
5809
  children
5296
5810
  ]
5297
5811
  }
@@ -5301,6 +5815,7 @@ var DropdownMenuRadioItem = React39.forwardRef(({ className, children, ...props
5301
5815
  DropdownMenuPrimitive.RadioItem,
5302
5816
  {
5303
5817
  ref,
5818
+ ...slot(dropdownMenuAnatomy, "radio-item"),
5304
5819
  className: cn(
5305
5820
  "rounded-pill relative flex cursor-default items-center gap-2 py-1.5 pr-2 pl-8 text-sm outline-none select-none",
5306
5821
  "text-menu-item-fg transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -5310,7 +5825,7 @@ var DropdownMenuRadioItem = React39.forwardRef(({ className, children, ...props
5310
5825
  ),
5311
5826
  ...props,
5312
5827
  children: [
5313
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current", "aria-hidden": "true" }) }) }),
5828
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { ...slot(dropdownMenuAnatomy, "item-indicator"), children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current", "aria-hidden": "true" }) }) }),
5314
5829
  children
5315
5830
  ]
5316
5831
  }
@@ -5320,6 +5835,7 @@ var DropdownMenuLabel = React39.forwardRef(({ className, inset, ...props }, ref)
5320
5835
  DropdownMenuPrimitive.Label,
5321
5836
  {
5322
5837
  ref,
5838
+ ...slot(dropdownMenuAnatomy, "label"),
5323
5839
  className: cn(
5324
5840
  "text-menu-label-fg px-2 py-1.5 font-mono text-[11px] tracking-wider uppercase",
5325
5841
  inset && "pl-8",
@@ -5333,6 +5849,7 @@ var DropdownMenuSeparator = React39.forwardRef(({ className, ...props }, ref) =>
5333
5849
  DropdownMenuPrimitive.Separator,
5334
5850
  {
5335
5851
  ref,
5852
+ ...slot(dropdownMenuAnatomy, "separator"),
5336
5853
  className: cn("bg-menu-border -mx-1 my-1 h-px", className),
5337
5854
  ...props
5338
5855
  }
@@ -5341,6 +5858,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
5341
5858
  var DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx(
5342
5859
  "span",
5343
5860
  {
5861
+ ...slot(dropdownMenuAnatomy, "shortcut"),
5344
5862
  className: cn("text-menu-shortcut-fg ml-auto font-mono text-[11px] tracking-wider", className),
5345
5863
  ...props
5346
5864
  }
@@ -5424,6 +5942,7 @@ function FileUpload({
5424
5942
  const inputId = useId();
5425
5943
  const [isDragOver, setIsDragOver] = useState(false);
5426
5944
  const [error, setError] = useState(null);
5945
+ const wrapperOwnsFocus = props.tabIndex !== void 0 || props.role !== void 0;
5427
5946
  const validateFiles = useCallback(
5428
5947
  (files) => {
5429
5948
  setError(null);
@@ -5460,78 +5979,105 @@ function FileUpload({
5460
5979
  if (disabled) return;
5461
5980
  handleFiles(e.dataTransfer.files);
5462
5981
  }
5463
- return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), ...props, children: [
5464
- /* @__PURE__ */ jsxs(
5465
- "label",
5466
- {
5467
- htmlFor: inputId,
5468
- onDragOver: (e) => {
5469
- e.preventDefault();
5470
- if (!disabled) setIsDragOver(true);
5471
- },
5472
- onDragLeave: () => setIsDragOver(false),
5473
- onDrop: handleDrop,
5474
- className: cn(
5475
- "flex flex-col items-center justify-center gap-2",
5476
- "rounded-card border-rule-strong bg-surface border border-dashed",
5477
- "font-body p-8 text-center",
5478
- "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
5479
- "motion-reduce:transition-none",
5480
- // Hover (when not disabled)
5481
- !disabled && "hover:border-brand-line hover:bg-brand-bg/40",
5482
- // Drag-over → Pro purple highlight
5483
- isDragOver && "border-brand-line bg-brand-bg",
5484
- disabled && "border-rule bg-bg-disabled text-fg-disabled cursor-not-allowed",
5485
- !disabled && "cursor-pointer"
5486
- ),
5487
- children: [
5488
- /* @__PURE__ */ jsx(
5489
- "input",
5490
- {
5491
- ref: inputRef,
5492
- id: inputId,
5493
- type: "file",
5494
- accept,
5495
- multiple,
5496
- onChange: (e) => {
5497
- if (e.target.files) handleFiles(e.target.files);
5498
- e.target.value = "";
5499
- },
5500
- className: "fixed -top-[9999px] -left-[9999px] opacity-0",
5501
- disabled,
5502
- tabIndex: -1
5503
- }
5504
- ),
5505
- children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
5506
- /* @__PURE__ */ jsx(
5507
- "div",
5508
- {
5509
- className: cn(
5510
- "rounded-icon flex size-10 items-center justify-center transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
5511
- isDragOver ? "bg-brand text-fg-on-brand" : "bg-brand-bg text-brand"
5512
- ),
5513
- "aria-hidden": "true",
5514
- children: /* @__PURE__ */ jsx(UploadIcon, { className: "size-5" })
5515
- }
5982
+ return /* @__PURE__ */ jsxs(
5983
+ "div",
5984
+ {
5985
+ ...slot(fileUploadAnatomy, "root"),
5986
+ ...stateAttributes({ disabled, invalid: !!error }),
5987
+ className: cn("w-full", className),
5988
+ ...props,
5989
+ children: [
5990
+ /* @__PURE__ */ jsxs(
5991
+ "label",
5992
+ {
5993
+ htmlFor: inputId,
5994
+ ...slot(fileUploadAnatomy, "dropzone"),
5995
+ ...stateAttributes({ disabled, state: isDragOver ? "drag-over" : void 0 }),
5996
+ onDragOver: (e) => {
5997
+ e.preventDefault();
5998
+ if (!disabled) setIsDragOver(true);
5999
+ },
6000
+ onDragLeave: () => setIsDragOver(false),
6001
+ onDrop: handleDrop,
6002
+ className: cn(
6003
+ "flex flex-col items-center justify-center gap-2",
6004
+ "rounded-card border-rule-strong bg-surface border border-dashed",
6005
+ "font-body p-8 text-center",
6006
+ "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)]",
6007
+ "motion-reduce:transition-none",
6008
+ // Hover (when not disabled)
6009
+ !disabled && "hover:border-brand-line hover:bg-brand-bg/40",
6010
+ // Drag-over → Pro purple highlight
6011
+ isDragOver && "border-brand-line bg-brand-bg",
6012
+ disabled && "border-rule bg-bg-disabled text-fg-disabled cursor-not-allowed",
6013
+ !disabled && "cursor-pointer",
6014
+ // Keyboard focus lands on the (visually hidden) file input.
6015
+ "has-[input:focus-visible]:[box-shadow:var(--shadow-focus-ring)]"
5516
6016
  ),
5517
- /* @__PURE__ */ jsxs("div", { className: "text-fg-3 text-sm", children: [
5518
- /* @__PURE__ */ jsx("span", { className: "text-fg font-medium", children: "Click to upload" }),
5519
- " or drag and drop"
5520
- ] }),
5521
- accept && /* @__PURE__ */ jsxs("p", { className: "text-fg-4 font-mono text-[10.5px]", children: [
5522
- "Accepted: ",
5523
- accept
5524
- ] }),
5525
- maxSize && /* @__PURE__ */ jsxs("p", { className: "text-fg-4 font-mono text-[10.5px]", children: [
5526
- "Max size: ",
5527
- formatBytes(maxSize)
5528
- ] })
5529
- ] })
5530
- ]
5531
- }
5532
- ),
5533
- error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-danger-fg mt-2 text-sm", children: error })
5534
- ] });
6017
+ children: [
6018
+ /* @__PURE__ */ jsx(
6019
+ "input",
6020
+ {
6021
+ ref: inputRef,
6022
+ id: inputId,
6023
+ type: "file",
6024
+ ...slot(fileUploadAnatomy, "input"),
6025
+ accept,
6026
+ multiple,
6027
+ onChange: (e) => {
6028
+ if (e.target.files) handleFiles(e.target.files);
6029
+ e.target.value = "";
6030
+ },
6031
+ className: "fixed -top-[9999px] -left-[9999px] opacity-0",
6032
+ onKeyDown: (e) => {
6033
+ if (e.key !== "Enter" && e.key !== " ") return;
6034
+ e.preventDefault();
6035
+ e.currentTarget.click();
6036
+ },
6037
+ disabled,
6038
+ tabIndex: wrapperOwnsFocus ? -1 : void 0
6039
+ }
6040
+ ),
6041
+ children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
6042
+ /* @__PURE__ */ jsx(
6043
+ "div",
6044
+ {
6045
+ className: cn(
6046
+ "rounded-icon flex size-10 items-center justify-center transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
6047
+ isDragOver ? "bg-brand text-fg-on-brand" : "bg-brand-bg text-brand"
6048
+ ),
6049
+ "aria-hidden": "true",
6050
+ children: /* @__PURE__ */ jsx(UploadIcon, { className: "size-5" })
6051
+ }
6052
+ ),
6053
+ /* @__PURE__ */ jsxs("div", { className: "text-fg-3 text-sm", children: [
6054
+ /* @__PURE__ */ jsx("span", { className: "text-fg font-medium", children: "Click to upload" }),
6055
+ " or drag and drop"
6056
+ ] }),
6057
+ accept && /* @__PURE__ */ jsxs("p", { className: "text-fg-4 font-mono text-[10.5px]", children: [
6058
+ "Accepted: ",
6059
+ accept
6060
+ ] }),
6061
+ maxSize && /* @__PURE__ */ jsxs("p", { className: "text-fg-4 font-mono text-[10.5px]", children: [
6062
+ "Max size: ",
6063
+ formatBytes(maxSize)
6064
+ ] })
6065
+ ] })
6066
+ ]
6067
+ }
6068
+ ),
6069
+ error && /* @__PURE__ */ jsx(
6070
+ "p",
6071
+ {
6072
+ role: "alert",
6073
+ ...slot(fileUploadAnatomy, "error"),
6074
+ className: "text-danger-fg mt-2 text-sm",
6075
+ children: error
6076
+ }
6077
+ )
6078
+ ]
6079
+ }
6080
+ );
5535
6081
  }
5536
6082
  function formatBytes(bytes) {
5537
6083
  if (bytes < 1024) return `${bytes} B`;
@@ -5688,6 +6234,7 @@ var Input = forwardRef(function Input2({
5688
6234
  className,
5689
6235
  id: providedId,
5690
6236
  placeholder,
6237
+ onWheel,
5691
6238
  ...props
5692
6239
  }, ref) {
5693
6240
  const generatedId = useId();
@@ -5698,12 +6245,25 @@ var Input = forwardRef(function Input2({
5698
6245
  const inputType = isPassword && showPassword ? "text" : type;
5699
6246
  const isFloating = !!floatingLabel && !!label;
5700
6247
  const resolvedPlaceholder = isFloating ? placeholder ?? " " : placeholder;
6248
+ const handleWheel = inputType === "number" ? (event) => {
6249
+ onWheel?.(event);
6250
+ if (!event.defaultPrevented) event.currentTarget.blur();
6251
+ } : onWheel;
5701
6252
  return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
5702
- label && !isFloating && /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-fg mb-1.5 block text-[13px] leading-none font-medium", children: label }),
6253
+ label && !isFloating && /* @__PURE__ */ jsx(
6254
+ "label",
6255
+ {
6256
+ htmlFor: id,
6257
+ ...slot(inputAnatomy, "label"),
6258
+ className: "text-fg mb-1.5 block text-[13px] leading-none font-medium",
6259
+ children: label
6260
+ }
6261
+ ),
5703
6262
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
5704
6263
  prefixIcon && /* @__PURE__ */ jsx(
5705
6264
  "span",
5706
6265
  {
6266
+ ...slot(inputAnatomy, "icon-start"),
5707
6267
  className: "text-fg-4 pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 [&>svg]:size-4",
5708
6268
  "aria-hidden": "true",
5709
6269
  children: prefixIcon
@@ -5718,13 +6278,21 @@ var Input = forwardRef(function Input2({
5718
6278
  placeholder: resolvedPlaceholder,
5719
6279
  "aria-invalid": !!error || void 0,
5720
6280
  "aria-describedby": error ? errorId : void 0,
6281
+ ...slot(inputAnatomy, "root"),
6282
+ ...stateAttributes({
6283
+ variant: variant ?? "default",
6284
+ size: inputSize ?? "md",
6285
+ disabled: props.disabled,
6286
+ invalid: !!error
6287
+ }),
5721
6288
  className: cn(
5722
6289
  inputVariants({ variant, inputSize }),
5723
6290
  prefixIcon && "pl-9",
5724
6291
  (suffixIcon || isPassword) && "pr-9",
5725
- isFloating && "peer placeholder:text-transparent focus:placeholder:text-fg-4",
6292
+ isFloating && "peer focus:placeholder:text-fg-4 placeholder:text-transparent",
5726
6293
  className
5727
6294
  ),
6295
+ onWheel: handleWheel,
5728
6296
  ...props
5729
6297
  }
5730
6298
  ),
@@ -5734,6 +6302,7 @@ var Input = forwardRef(function Input2({
5734
6302
  "label",
5735
6303
  {
5736
6304
  htmlFor: id,
6305
+ ...slot(inputAnatomy, "label"),
5737
6306
  className: cn(
5738
6307
  "pointer-events-none absolute left-3 origin-left px-1 leading-none",
5739
6308
  "bg-surface text-fg-4",
@@ -5759,6 +6328,7 @@ var Input = forwardRef(function Input2({
5759
6328
  {
5760
6329
  type: "button",
5761
6330
  onClick: () => setShowPassword((prev) => !prev),
6331
+ ...slot(inputAnatomy, "password-toggle"),
5762
6332
  className: "text-fg-4 hover:text-fg absolute top-1/2 right-2.5 -translate-y-1/2 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none motion-reduce:transition-none",
5763
6333
  "aria-label": showPassword ? "Hide password" : "Show password",
5764
6334
  children: showPassword ? /* @__PURE__ */ jsx(EyeOffIcon, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(EyeIcon, { className: "size-4", "aria-hidden": "true" })
@@ -5767,13 +6337,23 @@ var Input = forwardRef(function Input2({
5767
6337
  suffixIcon && !isPassword && /* @__PURE__ */ jsx(
5768
6338
  "span",
5769
6339
  {
6340
+ ...slot(inputAnatomy, "icon-end"),
5770
6341
  className: "text-fg-4 pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 [&>svg]:size-4",
5771
6342
  "aria-hidden": "true",
5772
6343
  children: suffixIcon
5773
6344
  }
5774
6345
  )
5775
6346
  ] }),
5776
- error && /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-danger-fg mt-1.5 text-xs", children: error })
6347
+ error && /* @__PURE__ */ jsx(
6348
+ "p",
6349
+ {
6350
+ id: errorId,
6351
+ role: "alert",
6352
+ ...slot(inputAnatomy, "error"),
6353
+ className: "text-danger-fg mt-1.5 text-xs",
6354
+ children: error
6355
+ }
6356
+ )
5777
6357
  ] });
5778
6358
  });
5779
6359
  Input.displayName = "Input";
@@ -5856,10 +6436,27 @@ var labelVariants = cva(
5856
6436
  );
5857
6437
  var Label4 = React39.forwardRef(
5858
6438
  function Label5({ children, required, className, ...props }, ref) {
5859
- return /* @__PURE__ */ jsxs(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props, children: [
5860
- children,
5861
- required && /* @__PURE__ */ jsx("span", { className: "text-danger-fg ml-0.5", "aria-hidden": "true", children: "*" })
5862
- ] });
6439
+ return /* @__PURE__ */ jsxs(
6440
+ LabelPrimitive.Root,
6441
+ {
6442
+ ref,
6443
+ ...slot(labelAnatomy, "root"),
6444
+ className: cn(labelVariants(), className),
6445
+ ...props,
6446
+ children: [
6447
+ children,
6448
+ required && /* @__PURE__ */ jsx(
6449
+ "span",
6450
+ {
6451
+ ...slot(labelAnatomy, "required"),
6452
+ className: "text-danger-fg ml-0.5",
6453
+ "aria-hidden": "true",
6454
+ children: "*"
6455
+ }
6456
+ )
6457
+ ]
6458
+ }
6459
+ );
5863
6460
  }
5864
6461
  );
5865
6462
  Label4.displayName = LabelPrimitive.Root.displayName;
@@ -5877,10 +6474,27 @@ var LinkButton = forwardRef(function LinkButton2({
5877
6474
  ...props
5878
6475
  }, ref) {
5879
6476
  const classes = cn(buttonVariants({ variant, size }), className);
6477
+ const root = { ...slot(linkButtonAnatomy, "root"), ...stateAttributes({ variant, size }) };
5880
6478
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
5881
- iconLeft && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", "aria-hidden": "true", children: iconLeft }),
6479
+ iconLeft && /* @__PURE__ */ jsx(
6480
+ "span",
6481
+ {
6482
+ ...slot(linkButtonAnatomy, "icon-start"),
6483
+ className: "inline-flex shrink-0",
6484
+ "aria-hidden": "true",
6485
+ children: iconLeft
6486
+ }
6487
+ ),
5882
6488
  children,
5883
- iconRight && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", "aria-hidden": "true", children: iconRight })
6489
+ iconRight && /* @__PURE__ */ jsx(
6490
+ "span",
6491
+ {
6492
+ ...slot(linkButtonAnatomy, "icon-end"),
6493
+ className: "inline-flex shrink-0",
6494
+ "aria-hidden": "true",
6495
+ children: iconRight
6496
+ }
6497
+ )
5884
6498
  ] });
5885
6499
  if (external) {
5886
6500
  const safeRel = rel ?? (target === "_blank" ? "noopener noreferrer" : void 0);
@@ -5889,6 +6503,7 @@ var LinkButton = forwardRef(function LinkButton2({
5889
6503
  {
5890
6504
  ref,
5891
6505
  href,
6506
+ ...root,
5892
6507
  className: classes,
5893
6508
  target,
5894
6509
  rel: safeRel,
@@ -5897,7 +6512,7 @@ var LinkButton = forwardRef(function LinkButton2({
5897
6512
  }
5898
6513
  );
5899
6514
  }
5900
- return /* @__PURE__ */ jsx(Link, { ref, href, className: classes, target, rel, ...props, children: content });
6515
+ return /* @__PURE__ */ jsx(Link, { ref, href, ...root, className: classes, target, rel, ...props, children: content });
5901
6516
  });
5902
6517
  LinkButton.displayName = "LinkButton";
5903
6518
  var Skeleton = forwardRef(function Skeleton2({ className, ...props }, ref) {
@@ -6400,7 +7015,7 @@ function OTPInput({
6400
7015
  "has-[:disabled]:[&_[aria-hidden=true]]:border-rule",
6401
7016
  "has-[:disabled]:[&_[aria-hidden=true]]:text-fg-disabled"
6402
7017
  ),
6403
- render: ({ slots }) => /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2.5", role: "group", "aria-label": "One-time password", children: slots.map((slot, idx) => /* @__PURE__ */ jsx(OTPSlot, { ...slot, hasError: !!error }, idx)) })
7018
+ render: ({ slots }) => /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2.5", role: "group", "aria-label": "One-time password", children: slots.map((slot2, idx) => /* @__PURE__ */ jsx(OTPSlot, { ...slot2, hasError: !!error }, idx)) })
6404
7019
  }
6405
7020
  ),
6406
7021
  error && /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-danger-fg text-center text-xs", children: error })
@@ -6454,7 +7069,7 @@ function getPageNumbers(current, total, siblings) {
6454
7069
  }
6455
7070
  return [1, "ellipsis", ...range(leftSibling, rightSibling), "ellipsis", total];
6456
7071
  }
6457
- var NAV_BUTTON = cn(
7072
+ var NAV_BUTTON2 = cn(
6458
7073
  "inline-flex size-7 items-center justify-center rounded-btn text-fg-3",
6459
7074
  "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
6460
7075
  "hover:bg-bg-2 hover:text-fg",
@@ -6492,18 +7107,28 @@ var Pagination = forwardRef(function Pagination2({
6492
7107
  {
6493
7108
  ref,
6494
7109
  "aria-label": `Pagination, page ${currentPage} of ${totalPages}`,
7110
+ ...slot(paginationAnatomy, "root"),
6495
7111
  className: cn("flex items-center justify-between gap-4", className),
6496
7112
  ...props,
6497
7113
  children: [
6498
- /* @__PURE__ */ jsx("span", { className: "text-fg-4 shrink-0 font-mono text-[11px] tracking-[0.02em] tabular-nums", children: contextLabel }),
6499
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
7114
+ /* @__PURE__ */ jsx(
7115
+ "span",
7116
+ {
7117
+ ...slot(paginationAnatomy, "label"),
7118
+ className: "text-fg-4 shrink-0 font-mono text-[11px] tracking-[0.02em] tabular-nums",
7119
+ children: contextLabel
7120
+ }
7121
+ ),
7122
+ /* @__PURE__ */ jsxs("div", { ...slot(paginationAnatomy, "pages"), className: "flex items-center gap-0.5", children: [
6500
7123
  /* @__PURE__ */ jsx(
6501
7124
  "button",
6502
7125
  {
6503
7126
  type: "button",
6504
7127
  onClick: () => onPageChange(currentPage - 1),
6505
7128
  disabled: currentPage <= 1,
6506
- className: NAV_BUTTON,
7129
+ ...slot(paginationAnatomy, "previous"),
7130
+ ...stateAttributes({ disabled: currentPage <= 1 }),
7131
+ className: NAV_BUTTON2,
6507
7132
  "aria-label": "Previous page",
6508
7133
  children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-3.5", "aria-hidden": "true" })
6509
7134
  }
@@ -6512,6 +7137,7 @@ var Pagination = forwardRef(function Pagination2({
6512
7137
  (page, i) => page === "ellipsis" ? /* @__PURE__ */ jsx(
6513
7138
  "span",
6514
7139
  {
7140
+ ...slot(paginationAnatomy, "ellipsis"),
6515
7141
  className: "text-fg-5 flex h-7 w-5 items-center justify-center select-none",
6516
7142
  "aria-hidden": "true",
6517
7143
  children: /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-3.5" })
@@ -6523,6 +7149,8 @@ var Pagination = forwardRef(function Pagination2({
6523
7149
  type: "button",
6524
7150
  onClick: () => onPageChange(page),
6525
7151
  "aria-current": page === currentPage ? "page" : void 0,
7152
+ ...slot(paginationAnatomy, "page"),
7153
+ ...stateAttributes({ selected: page === currentPage }),
6526
7154
  className: cn(
6527
7155
  PAGE_BUTTON_BASE,
6528
7156
  page === currentPage ? "bg-accent-tint text-accent-2 border border-[color:var(--color-accent-tint)]" : "text-fg-3 hover:bg-bg-2 hover:text-fg"
@@ -6538,7 +7166,9 @@ var Pagination = forwardRef(function Pagination2({
6538
7166
  type: "button",
6539
7167
  onClick: () => onPageChange(currentPage + 1),
6540
7168
  disabled: currentPage >= totalPages,
6541
- className: NAV_BUTTON,
7169
+ ...slot(paginationAnatomy, "next"),
7170
+ ...stateAttributes({ disabled: currentPage >= totalPages }),
7171
+ className: NAV_BUTTON2,
6542
7172
  "aria-label": "Next page",
6543
7173
  children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5", "aria-hidden": "true" })
6544
7174
  }
@@ -7342,7 +7972,15 @@ var ProgressRing = forwardRef(function ProgressRing2({ value, max = 100, size =
7342
7972
  });
7343
7973
  ProgressRing.displayName = "ProgressRing";
7344
7974
  var RadioGroup3 = React39.forwardRef(function RadioGroup4({ className, ...props }, ref) {
7345
- return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { ref, className: cn("grid gap-2", className), ...props });
7975
+ return /* @__PURE__ */ jsx(
7976
+ RadioGroupPrimitive.Root,
7977
+ {
7978
+ ref,
7979
+ ...slot(radioGroupAnatomy, "root"),
7980
+ className: cn("grid gap-2", className),
7981
+ ...props
7982
+ }
7983
+ );
7346
7984
  });
7347
7985
  RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
7348
7986
  var RadioGroupItem = React39.forwardRef(function RadioGroupItem2({ className, label, id: providedId, ...props }, ref) {
@@ -7353,6 +7991,7 @@ var RadioGroupItem = React39.forwardRef(function RadioGroupItem2({ className, la
7353
7991
  {
7354
7992
  ref,
7355
7993
  id,
7994
+ ...slot(radioGroupAnatomy, "item"),
7356
7995
  className: cn(
7357
7996
  "peer border-rule-strong bg-surface text-brand aspect-square size-4 shrink-0 rounded-full border",
7358
7997
  microInteractions.selection,
@@ -7364,7 +8003,14 @@ var RadioGroupItem = React39.forwardRef(function RadioGroupItem2({ className, la
7364
8003
  className
7365
8004
  ),
7366
8005
  ...props,
7367
- children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-brand text-brand size-2", "aria-hidden": "true" }) })
8006
+ children: /* @__PURE__ */ jsx(
8007
+ RadioGroupPrimitive.Indicator,
8008
+ {
8009
+ ...slot(radioGroupAnatomy, "indicator"),
8010
+ className: "flex items-center justify-center",
8011
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-brand text-brand size-2", "aria-hidden": "true" })
8012
+ }
8013
+ )
7368
8014
  }
7369
8015
  );
7370
8016
  if (!label) return root;
@@ -7374,6 +8020,7 @@ var RadioGroupItem = React39.forwardRef(function RadioGroupItem2({ className, la
7374
8020
  "label",
7375
8021
  {
7376
8022
  htmlFor: id,
8023
+ ...slot(radioGroupAnatomy, "label"),
7377
8024
  className: "text-fg peer-disabled:text-fg-disabled cursor-pointer text-[13px] leading-none select-none peer-disabled:cursor-not-allowed",
7378
8025
  children: label
7379
8026
  }
@@ -7441,6 +8088,7 @@ var SheetOverlay = React39.forwardRef(({ className, ...props }, ref) => /* @__PU
7441
8088
  DialogPrimitive.Overlay,
7442
8089
  {
7443
8090
  ref,
8091
+ ...slot(sheetAnatomy, "overlay"),
7444
8092
  className: cn(
7445
8093
  "bg-overlay fixed inset-0 z-[var(--z-overlay)] backdrop-blur-[4px]",
7446
8094
  "transition-opacity duration-[var(--duration-overlay)] ease-[var(--ease-out-quart)]",
@@ -7502,6 +8150,8 @@ var SheetContent = React39.forwardRef(
7502
8150
  DialogPrimitive.Content,
7503
8151
  {
7504
8152
  ref,
8153
+ ...slot(sheetAnatomy, "content"),
8154
+ ...stateAttributes({ size: width }),
7505
8155
  className: cn(sheetVariants({ side: resolvedSide }), widthClass, className),
7506
8156
  style: widthStyle,
7507
8157
  ...props,
@@ -7510,6 +8160,7 @@ var SheetContent = React39.forwardRef(
7510
8160
  showCloseButton && /* @__PURE__ */ jsx(
7511
8161
  DialogPrimitive.Close,
7512
8162
  {
8163
+ ...slot(sheetAnatomy, "close"),
7513
8164
  className: cn(
7514
8165
  "absolute top-4 right-4 inline-flex size-7 items-center justify-center",
7515
8166
  "rounded-icon text-fg-4 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -7528,11 +8179,19 @@ var SheetContent = React39.forwardRef(
7528
8179
  }
7529
8180
  );
7530
8181
  SheetContent.displayName = DialogPrimitive.Content.displayName;
7531
- var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 p-6 pr-12 pb-0", className), ...props });
8182
+ var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
8183
+ "div",
8184
+ {
8185
+ ...slot(sheetAnatomy, "header"),
8186
+ className: cn("flex flex-col gap-1.5 p-6 pr-12 pb-0", className),
8187
+ ...props
8188
+ }
8189
+ );
7532
8190
  SheetHeader.displayName = "SheetHeader";
7533
8191
  var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
7534
8192
  "div",
7535
8193
  {
8194
+ ...slot(sheetAnatomy, "footer"),
7536
8195
  className: cn(
7537
8196
  "border-rule mt-auto flex flex-col-reverse gap-2 border-t p-6 sm:flex-row sm:items-center sm:justify-end",
7538
8197
  className
@@ -7545,6 +8204,7 @@ var SheetTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE
7545
8204
  DialogPrimitive.Title,
7546
8205
  {
7547
8206
  ref,
8207
+ ...slot(sheetAnatomy, "title"),
7548
8208
  className: cn(
7549
8209
  "font-display text-fg text-base leading-tight font-medium tracking-tight",
7550
8210
  className
@@ -7553,7 +8213,15 @@ var SheetTitle = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE
7553
8213
  }
7554
8214
  ));
7555
8215
  SheetTitle.displayName = DialogPrimitive.Title.displayName;
7556
- var SheetDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-fg-3 text-sm", className), ...props }));
8216
+ var SheetDescription = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8217
+ DialogPrimitive.Description,
8218
+ {
8219
+ ref,
8220
+ ...slot(sheetAnatomy, "description"),
8221
+ className: cn("text-fg-3 text-sm", className),
8222
+ ...props
8223
+ }
8224
+ ));
7557
8225
  SheetDescription.displayName = DialogPrimitive.Description.displayName;
7558
8226
  var MOBILE_QUERY = "(max-width: 639.98px)";
7559
8227
  function useIsMobile() {
@@ -7759,48 +8427,59 @@ var SearchInput = React39.forwardRef(
7759
8427
  const iconLeftClass = isCompact ? "left-2.5" : "left-3";
7760
8428
  const iconRightClass = isCompact ? "right-2" : isComfortable ? "right-3" : "right-2.5";
7761
8429
  const iconSizeClass = isCompact ? "size-3.5" : "size-4";
7762
- return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", className), children: [
7763
- /* @__PURE__ */ jsx(
7764
- SearchIcon,
7765
- {
7766
- className: cn(
7767
- "text-fg-4 pointer-events-none absolute top-1/2 -translate-y-1/2",
7768
- iconLeftClass,
7769
- iconSizeClass
7770
- ),
7771
- "aria-hidden": "true"
7772
- }
7773
- ),
7774
- /* @__PURE__ */ jsx(
7775
- "input",
7776
- {
7777
- ref,
7778
- type: "search",
7779
- value,
7780
- onChange: (e) => onValueChange(e.target.value),
7781
- placeholder,
7782
- disabled,
7783
- className: cn(searchInputVariants({ inputSize })),
7784
- ...props
7785
- }
7786
- ),
7787
- value && !disabled && /* @__PURE__ */ jsx(
7788
- "button",
7789
- {
7790
- type: "button",
7791
- onClick: () => onValueChange(""),
7792
- className: cn(
7793
- "rounded-pill text-fg-4 absolute top-1/2 -translate-y-1/2 p-0.5",
7794
- microInteractions.control,
7795
- "hover:text-fg",
7796
- "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
7797
- iconRightClass
8430
+ return /* @__PURE__ */ jsxs(
8431
+ "div",
8432
+ {
8433
+ ...slot(searchInputAnatomy, "root"),
8434
+ ...stateAttributes({ size: sz, disabled }),
8435
+ className: cn("relative w-full", className),
8436
+ children: [
8437
+ /* @__PURE__ */ jsx(
8438
+ SearchIcon,
8439
+ {
8440
+ ...slot(searchInputAnatomy, "icon"),
8441
+ className: cn(
8442
+ "text-fg-4 pointer-events-none absolute top-1/2 -translate-y-1/2",
8443
+ iconLeftClass,
8444
+ iconSizeClass
8445
+ ),
8446
+ "aria-hidden": "true"
8447
+ }
7798
8448
  ),
7799
- "aria-label": "Clear search",
7800
- children: /* @__PURE__ */ jsx(XIcon, { className: iconSizeClass, "aria-hidden": "true" })
7801
- }
7802
- )
7803
- ] });
8449
+ /* @__PURE__ */ jsx(
8450
+ "input",
8451
+ {
8452
+ ref,
8453
+ type: "search",
8454
+ value,
8455
+ onChange: (e) => onValueChange(e.target.value),
8456
+ placeholder,
8457
+ disabled,
8458
+ ...slot(searchInputAnatomy, "control"),
8459
+ className: cn(searchInputVariants({ inputSize })),
8460
+ ...props
8461
+ }
8462
+ ),
8463
+ value && !disabled && /* @__PURE__ */ jsx(
8464
+ "button",
8465
+ {
8466
+ type: "button",
8467
+ onClick: () => onValueChange(""),
8468
+ ...slot(searchInputAnatomy, "clear"),
8469
+ className: cn(
8470
+ "rounded-pill text-fg-4 absolute top-1/2 -translate-y-1/2 p-0.5",
8471
+ microInteractions.control,
8472
+ "hover:text-fg",
8473
+ "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
8474
+ iconRightClass
8475
+ ),
8476
+ "aria-label": "Clear search",
8477
+ children: /* @__PURE__ */ jsx(XIcon, { className: iconSizeClass, "aria-hidden": "true" })
8478
+ }
8479
+ )
8480
+ ]
8481
+ }
8482
+ );
7804
8483
  }
7805
8484
  );
7806
8485
  SearchInput.displayName = "SearchInput";
@@ -7908,20 +8587,39 @@ function SearchSelect({
7908
8587
  }
7909
8588
  }, [onCreate, trimmedSearch]);
7910
8589
  const inputRef = React39.useRef(null);
8590
+ const listRef = React39.useRef(null);
7911
8591
  const listboxId = React39.useId();
7912
- const setInputRef = React39.useCallback((node) => {
7913
- inputRef.current = node;
7914
- node?.removeAttribute("aria-labelledby");
7915
- node?.setAttribute("aria-controls", listboxId);
7916
- node?.removeAttribute("aria-activedescendant");
8592
+ const syncInputRelationships = React39.useCallback(() => {
8593
+ const input = inputRef.current;
8594
+ if (!input) return;
8595
+ input.removeAttribute("aria-labelledby");
8596
+ input.removeAttribute("aria-activedescendant");
8597
+ const controls = listRef.current?.id || listboxId;
8598
+ if (controls && input.ownerDocument.getElementById(controls)) {
8599
+ input.setAttribute("aria-controls", controls);
8600
+ } else {
8601
+ input.removeAttribute("aria-controls");
8602
+ }
7917
8603
  }, [listboxId]);
8604
+ const setInputRef = React39.useCallback(
8605
+ (node) => {
8606
+ inputRef.current = node;
8607
+ syncInputRelationships();
8608
+ },
8609
+ [syncInputRelationships]
8610
+ );
8611
+ const setListRef = React39.useCallback(
8612
+ (node) => {
8613
+ listRef.current = node;
8614
+ syncInputRelationships();
8615
+ },
8616
+ [syncInputRelationships]
8617
+ );
7918
8618
  const singleValue = closeOnSelect ? selected[0] ?? null : null;
7919
8619
  const showValue = singleValue !== null && !open;
7920
8620
  const popoverOpen = open && !disabled;
7921
8621
  React39.useEffect(() => {
7922
- inputRef.current?.removeAttribute("aria-labelledby");
7923
- inputRef.current?.setAttribute("aria-controls", listboxId);
7924
- inputRef.current?.removeAttribute("aria-activedescendant");
8622
+ syncInputRelationships();
7925
8623
  });
7926
8624
  React39.useEffect(() => {
7927
8625
  if (open && closeOnSelect) {
@@ -8082,7 +8780,6 @@ function SearchSelect({
8082
8780
  },
8083
8781
  placeholder,
8084
8782
  "aria-label": placeholder,
8085
- "aria-controls": listboxId,
8086
8783
  disabled,
8087
8784
  className: cn(
8088
8785
  "font-body text-fg flex-1 bg-transparent py-2 pr-3 pl-9 text-[13px] outline-none",
@@ -8131,7 +8828,7 @@ function SearchSelect({
8131
8828
  /* @__PURE__ */ jsxs(
8132
8829
  Command.List,
8133
8830
  {
8134
- id: listboxId,
8831
+ ref: setListRef,
8135
8832
  className: cn(
8136
8833
  // No top padding: a sticky group heading pins at top-0, so any
8137
8834
  // top padding would leave a strip above it where the previous
@@ -8435,6 +9132,7 @@ function SideDrawer({
8435
9132
  /* @__PURE__ */ jsx(
8436
9133
  DialogPrimitive.Overlay,
8437
9134
  {
9135
+ ...slot(sideDrawerAnatomy, "overlay"),
8438
9136
  className: cn(
8439
9137
  "bg-overlay fixed inset-0 z-[var(--z-overlay)] backdrop-blur-[4px]",
8440
9138
  "transition-opacity duration-[var(--duration-overlay)] ease-[var(--ease-out-quart)]",
@@ -8446,6 +9144,8 @@ function SideDrawer({
8446
9144
  /* @__PURE__ */ jsxs(
8447
9145
  DialogPrimitive.Content,
8448
9146
  {
9147
+ ...slot(sideDrawerAnatomy, "root"),
9148
+ ...stateAttributes({ size: width }),
8449
9149
  className: cn(sideDrawerVariants({ side, width })),
8450
9150
  "aria-describedby": void 0,
8451
9151
  children: [
@@ -8459,35 +9159,58 @@ function SideDrawer({
8459
9159
  );
8460
9160
  }
8461
9161
  function SideDrawerHeader({ title, subtitle, onClose, className }) {
8462
- return /* @__PURE__ */ jsx("div", { className: cn("border-rule bg-surface shrink-0 border-b px-6 py-4", className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
8463
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
8464
- /* @__PURE__ */ jsx("h2", { className: "font-display text-fg line-clamp-1 text-base leading-tight font-medium tracking-tight", children: title }),
8465
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-fg-3 mt-1 text-sm", children: subtitle })
8466
- ] }),
8467
- onClose && /* @__PURE__ */ jsx(
8468
- "button",
8469
- {
8470
- type: "button",
8471
- onClick: onClose,
8472
- className: cn(
8473
- "inline-flex size-7 shrink-0 items-center justify-center",
8474
- "rounded-icon text-fg-4 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
8475
- "hover:bg-overlay-hover hover:text-fg",
8476
- "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none"
8477
- ),
8478
- "aria-label": "Close",
8479
- children: /* @__PURE__ */ jsx(XIcon, { className: "size-4", "aria-hidden": "true" })
8480
- }
8481
- )
8482
- ] }) });
9162
+ return /* @__PURE__ */ jsx(
9163
+ "div",
9164
+ {
9165
+ ...slot(sideDrawerAnatomy, "header"),
9166
+ className: cn("border-rule bg-surface shrink-0 border-b px-6 py-4", className),
9167
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
9168
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
9169
+ /* @__PURE__ */ jsx(
9170
+ "h2",
9171
+ {
9172
+ ...slot(sideDrawerAnatomy, "heading"),
9173
+ className: "font-display text-fg line-clamp-1 text-base leading-tight font-medium tracking-tight",
9174
+ children: title
9175
+ }
9176
+ ),
9177
+ subtitle && /* @__PURE__ */ jsx("p", { ...slot(sideDrawerAnatomy, "subtitle"), className: "text-fg-3 mt-1 text-sm", children: subtitle })
9178
+ ] }),
9179
+ onClose && /* @__PURE__ */ jsx(
9180
+ "button",
9181
+ {
9182
+ type: "button",
9183
+ onClick: onClose,
9184
+ ...slot(sideDrawerAnatomy, "close"),
9185
+ className: cn(
9186
+ "inline-flex size-7 shrink-0 items-center justify-center",
9187
+ "rounded-icon text-fg-4 transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
9188
+ "hover:bg-overlay-hover hover:text-fg",
9189
+ "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none"
9190
+ ),
9191
+ "aria-label": "Close",
9192
+ children: /* @__PURE__ */ jsx(XIcon, { className: "size-4", "aria-hidden": "true" })
9193
+ }
9194
+ )
9195
+ ] })
9196
+ }
9197
+ );
8483
9198
  }
8484
9199
  function SideDrawerBody({ children, className }) {
8485
- return /* @__PURE__ */ jsx("div", { className: cn("scrollbar-thin flex-1 overflow-y-auto px-6 py-4", className), children });
9200
+ return /* @__PURE__ */ jsx(
9201
+ "div",
9202
+ {
9203
+ ...slot(sideDrawerAnatomy, "body"),
9204
+ className: cn("scrollbar-thin flex-1 overflow-y-auto px-6 py-4", className),
9205
+ children
9206
+ }
9207
+ );
8486
9208
  }
8487
9209
  function SideDrawerFooter({ children, className }) {
8488
9210
  return /* @__PURE__ */ jsx(
8489
9211
  "div",
8490
9212
  {
9213
+ ...slot(sideDrawerAnatomy, "footer"),
8491
9214
  className: cn(
8492
9215
  "border-rule bg-surface shrink-0 border-t px-6 py-4",
8493
9216
  "flex items-center justify-end gap-3",
@@ -9485,9 +10208,17 @@ var Switch = React39.forwardRef(
9485
10208
  {
9486
10209
  ref,
9487
10210
  id,
10211
+ ...slot(switchAnatomy, "root"),
10212
+ ...stateAttributes({ size: size ?? "md" }),
9488
10213
  className: cn(switchVariants({ size }), className),
9489
10214
  ...props,
9490
- children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: cn(switchThumbVariants({ size })) })
10215
+ children: /* @__PURE__ */ jsx(
10216
+ SwitchPrimitive.Thumb,
10217
+ {
10218
+ ...slot(switchAnatomy, "thumb"),
10219
+ className: cn(switchThumbVariants({ size }))
10220
+ }
10221
+ )
9491
10222
  }
9492
10223
  );
9493
10224
  if (!label) return root;
@@ -9497,6 +10228,7 @@ var Switch = React39.forwardRef(
9497
10228
  "label",
9498
10229
  {
9499
10230
  htmlFor: id,
10231
+ ...slot(switchAnatomy, "label"),
9500
10232
  className: "text-fg peer-disabled:text-fg-disabled cursor-pointer text-[13px] leading-none select-none peer-disabled:cursor-not-allowed",
9501
10233
  children: label
9502
10234
  }
@@ -9509,6 +10241,7 @@ var Table = forwardRef(function Table2({ className, wrapperClassName, ...props }
9509
10241
  return /* @__PURE__ */ jsx(
9510
10242
  "div",
9511
10243
  {
10244
+ ...slot(tableAnatomy, "wrapper"),
9512
10245
  className: cn(
9513
10246
  "rounded-card border-rule-strong bg-surface w-full overflow-x-auto border shadow-quiet",
9514
10247
  wrapperClassName
@@ -9517,6 +10250,7 @@ var Table = forwardRef(function Table2({ className, wrapperClassName, ...props }
9517
10250
  "table",
9518
10251
  {
9519
10252
  ref,
10253
+ ...slot(tableAnatomy, "root"),
9520
10254
  className: cn("w-full caption-bottom border-collapse text-sm", className),
9521
10255
  ...props
9522
10256
  }
@@ -9527,12 +10261,28 @@ var Table = forwardRef(function Table2({ className, wrapperClassName, ...props }
9527
10261
  Table.displayName = "Table";
9528
10262
  var TableHeader = forwardRef(
9529
10263
  function TableHeader2({ className, ...props }, ref) {
9530
- return /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-rule [&_tr]:border-b", className), ...props });
10264
+ return /* @__PURE__ */ jsx(
10265
+ "thead",
10266
+ {
10267
+ ref,
10268
+ ...slot(tableAnatomy, "header"),
10269
+ className: cn("[&_tr]:border-rule [&_tr]:border-b", className),
10270
+ ...props
10271
+ }
10272
+ );
9531
10273
  }
9532
10274
  );
9533
10275
  TableHeader.displayName = "TableHeader";
9534
10276
  var TableBody = forwardRef(function TableBody2({ className, ...props }, ref) {
9535
- return /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props });
10277
+ return /* @__PURE__ */ jsx(
10278
+ "tbody",
10279
+ {
10280
+ ref,
10281
+ ...slot(tableAnatomy, "body"),
10282
+ className: cn("[&_tr:last-child]:border-0", className),
10283
+ ...props
10284
+ }
10285
+ );
9536
10286
  });
9537
10287
  TableBody.displayName = "TableBody";
9538
10288
  var TableFooter = forwardRef(
@@ -9541,6 +10291,7 @@ var TableFooter = forwardRef(
9541
10291
  "tfoot",
9542
10292
  {
9543
10293
  ref,
10294
+ ...slot(tableAnatomy, "footer"),
9544
10295
  className: cn(
9545
10296
  "border-rule bg-surface-2 border-t font-medium [&>tr]:last:border-b-0",
9546
10297
  className
@@ -9556,6 +10307,7 @@ var TableRow = forwardRef(function TableRow2({ className, ...props }, ref) {
9556
10307
  "tr",
9557
10308
  {
9558
10309
  ref,
10310
+ ...slot(tableAnatomy, "row"),
9559
10311
  className: cn(
9560
10312
  "border-rule-soft border-b transition-colors duration-[var(--duration-instant)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
9561
10313
  // G15 compound: selected wins over hover; selected+hover uses the
@@ -9574,6 +10326,7 @@ var TableHead = forwardRef(function TableHead2({ className, ...props }, ref) {
9574
10326
  "th",
9575
10327
  {
9576
10328
  ref,
10329
+ ...slot(tableAnatomy, "head"),
9577
10330
  className: cn(
9578
10331
  // Sentence-case column labels in the body font (Plus Jakarta Sans),
9579
10332
  // quiet gray — not mono uppercase eyebrows.
@@ -9594,6 +10347,7 @@ var TableCell = forwardRef(function TableCell2({ className, ...props }, ref) {
9594
10347
  "td",
9595
10348
  {
9596
10349
  ref,
10350
+ ...slot(tableAnatomy, "cell"),
9597
10351
  className: cn(
9598
10352
  // 13px, fg-2, soft 1px row divider, tabular nums; airier vertical
9599
10353
  // rhythm (py-3) for the taller rows in the catalog layout.
@@ -9608,7 +10362,15 @@ var TableCell = forwardRef(function TableCell2({ className, ...props }, ref) {
9608
10362
  TableCell.displayName = "TableCell";
9609
10363
  var TableCaption = forwardRef(
9610
10364
  function TableCaption2({ className, ...props }, ref) {
9611
- return /* @__PURE__ */ jsx("caption", { ref, className: cn("text-fg-3 mt-3 text-sm", className), ...props });
10365
+ return /* @__PURE__ */ jsx(
10366
+ "caption",
10367
+ {
10368
+ ref,
10369
+ ...slot(tableAnatomy, "caption"),
10370
+ className: cn("text-fg-3 mt-3 text-sm", className),
10371
+ ...props
10372
+ }
10373
+ );
9612
10374
  }
9613
10375
  );
9614
10376
  TableCaption.displayName = "TableCaption";
@@ -9810,7 +10572,15 @@ var Textarea = forwardRef(function Textarea2({
9810
10572
  }, [value, adjustHeight]);
9811
10573
  const currentLength = typeof value === "string" ? value.length : typeof defaultValue === "string" ? defaultValue.length : 0;
9812
10574
  return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
9813
- label && /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-fg mb-1.5 block text-[13px] leading-none font-medium", children: label }),
10575
+ label && /* @__PURE__ */ jsx(
10576
+ "label",
10577
+ {
10578
+ htmlFor: id,
10579
+ ...slot(textareaAnatomy, "label"),
10580
+ className: "text-fg mb-1.5 block text-[13px] leading-none font-medium",
10581
+ children: label
10582
+ }
10583
+ ),
9814
10584
  /* @__PURE__ */ jsx(
9815
10585
  "textarea",
9816
10586
  {
@@ -9821,6 +10591,13 @@ var Textarea = forwardRef(function Textarea2({
9821
10591
  maxLength,
9822
10592
  "aria-invalid": !!error || void 0,
9823
10593
  "aria-describedby": error ? errorId : void 0,
10594
+ ...slot(textareaAnatomy, "root"),
10595
+ ...stateAttributes({
10596
+ variant: variant ?? "default",
10597
+ size: inputSize ?? "md",
10598
+ disabled: props.disabled,
10599
+ invalid: !!error
10600
+ }),
9824
10601
  onChange: (e) => {
9825
10602
  onChange?.(e);
9826
10603
  adjustHeight();
@@ -9834,12 +10611,28 @@ var Textarea = forwardRef(function Textarea2({
9834
10611
  }
9835
10612
  ),
9836
10613
  (error || showCount && maxLength) && /* @__PURE__ */ jsxs("div", { className: "mt-1.5 flex items-center justify-between gap-2", children: [
9837
- error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-danger-fg text-xs", children: error }) : /* @__PURE__ */ jsx("span", {}),
9838
- showCount && maxLength && /* @__PURE__ */ jsxs("span", { className: "text-fg-4 ml-auto font-mono text-[11px]", children: [
9839
- currentLength,
9840
- "/",
9841
- maxLength
9842
- ] })
10614
+ error ? /* @__PURE__ */ jsx(
10615
+ "p",
10616
+ {
10617
+ id: errorId,
10618
+ role: "alert",
10619
+ ...slot(textareaAnatomy, "error"),
10620
+ className: "text-danger-fg text-xs",
10621
+ children: error
10622
+ }
10623
+ ) : /* @__PURE__ */ jsx("span", {}),
10624
+ showCount && maxLength && /* @__PURE__ */ jsxs(
10625
+ "span",
10626
+ {
10627
+ ...slot(textareaAnatomy, "count"),
10628
+ className: "text-fg-4 ml-auto font-mono text-[11px]",
10629
+ children: [
10630
+ currentLength,
10631
+ "/",
10632
+ maxLength
10633
+ ]
10634
+ }
10635
+ )
9843
10636
  ] })
9844
10637
  ] });
9845
10638
  });
@@ -9912,6 +10705,7 @@ function ToastProvider({ children }) {
9912
10705
  /* @__PURE__ */ jsx(
9913
10706
  "div",
9914
10707
  {
10708
+ ...slot(toastAnatomy, "region"),
9915
10709
  className: "pointer-events-none fixed top-4 right-4 z-[var(--z-toast)] flex flex-col gap-2",
9916
10710
  role: "region",
9917
10711
  "aria-live": "polite",
@@ -10035,6 +10829,8 @@ function ToastItem({ toast, onDismiss }) {
10035
10829
  role: hasContent ? "group" : isError ? "alert" : "status",
10036
10830
  "aria-atomic": hasContent ? void 0 : true,
10037
10831
  "data-state": exiting ? "closed" : "open",
10832
+ ...slot(toastAnatomy, "root"),
10833
+ ...stateAttributes({ variant: toast.variant ?? "default" }),
10038
10834
  onPointerEnter: () => setPaused(true),
10039
10835
  onPointerLeave: () => {
10040
10836
  if (!dragRef.current) setPaused(false);
@@ -10071,6 +10867,7 @@ function ToastItem({ toast, onDismiss }) {
10071
10867
  /* @__PURE__ */ jsx(
10072
10868
  "span",
10073
10869
  {
10870
+ ...slot(toastAnatomy, "icon"),
10074
10871
  className: cn(
10075
10872
  // Same-hue inset ring gives the tinted chip a crafted edge instead
10076
10873
  // of a flat fill — definition without a heavy border.
@@ -10088,8 +10885,22 @@ function ToastItem({ toast, onDismiss }) {
10088
10885
  }
10089
10886
  ),
10090
10887
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
10091
- toast.title && /* @__PURE__ */ jsx("p", { className: "text-fg text-sm leading-tight font-semibold", children: toast.title }),
10092
- toast.description && /* @__PURE__ */ jsx("p", { className: "text-fg-3 mt-0.5 text-sm leading-snug", children: toast.description }),
10888
+ toast.title && /* @__PURE__ */ jsx(
10889
+ "p",
10890
+ {
10891
+ ...slot(toastAnatomy, "title"),
10892
+ className: "text-fg text-sm leading-tight font-semibold",
10893
+ children: toast.title
10894
+ }
10895
+ ),
10896
+ toast.description && /* @__PURE__ */ jsx(
10897
+ "p",
10898
+ {
10899
+ ...slot(toastAnatomy, "description"),
10900
+ className: "text-fg-3 mt-0.5 text-sm leading-snug",
10901
+ children: toast.description
10902
+ }
10903
+ ),
10093
10904
  toast.action && /* @__PURE__ */ jsx(
10094
10905
  "button",
10095
10906
  {
@@ -10098,6 +10909,7 @@ function ToastItem({ toast, onDismiss }) {
10098
10909
  toast.action?.onClick();
10099
10910
  close();
10100
10911
  },
10912
+ ...slot(toastAnatomy, "action"),
10101
10913
  className: cn(
10102
10914
  "text-brand mt-2 text-sm font-semibold",
10103
10915
  "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] hover:underline motion-reduce:transition-none",
@@ -10112,6 +10924,7 @@ function ToastItem({ toast, onDismiss }) {
10112
10924
  {
10113
10925
  type: "button",
10114
10926
  onClick: close,
10927
+ ...slot(toastAnatomy, "close"),
10115
10928
  className: cn(
10116
10929
  // size-7 click target with a -m-1 offset so the glyph keeps its
10117
10930
  // top-right optical position while the hit area (and ring) grow.
@@ -10234,6 +11047,7 @@ var TooltipContent = React39.forwardRef(({ className, sideOffset = 6, ...props }
10234
11047
  {
10235
11048
  ref,
10236
11049
  sideOffset,
11050
+ ...slot(tooltipAnatomy, "content"),
10237
11051
  className: cn(
10238
11052
  "rounded-input border-rule-strong bg-surface z-[var(--z-tooltip)] max-w-xs border px-2.5 py-1.5",
10239
11053
  "font-body text-fg shadow-pop text-xs leading-tight",
@@ -13784,7 +14598,15 @@ var NewMenu = forwardRef(function NewMenu2({ actions, groups, triggerLabel = "Ne
13784
14598
  });
13785
14599
  NewMenu.displayName = "NewMenu";
13786
14600
  var Shell = forwardRef(function Shell2({ className, ...props }, ref) {
13787
- return /* @__PURE__ */ jsx("div", { ref, className: cn("bg-bg flex h-dvh w-full", className), ...props });
14601
+ return /* @__PURE__ */ jsx(
14602
+ "div",
14603
+ {
14604
+ ref,
14605
+ ...slot(shellAnatomy, "root"),
14606
+ className: cn("bg-bg flex h-dvh w-full", className),
14607
+ ...props
14608
+ }
14609
+ );
13788
14610
  });
13789
14611
  Shell.displayName = "Shell";
13790
14612
  var Main = forwardRef(function Main2({ className, ...props }, ref) {
@@ -13792,6 +14614,7 @@ var Main = forwardRef(function Main2({ className, ...props }, ref) {
13792
14614
  "main",
13793
14615
  {
13794
14616
  ref,
14617
+ ...slot(shellAnatomy, "main"),
13795
14618
  className: cn("flex min-w-0 flex-1 flex-col overflow-hidden", className),
13796
14619
  ...props
13797
14620
  }
@@ -13811,6 +14634,7 @@ var Content16 = forwardRef(function Content17({ padTop, padBottom, className, st
13811
14634
  role: "region",
13812
14635
  "aria-label": "Page content",
13813
14636
  tabIndex: 0,
14637
+ ...slot(shellAnatomy, "content"),
13814
14638
  className: cn("flex-1 overflow-y-auto p-[var(--content-pad)]", className),
13815
14639
  style: paddingStyle,
13816
14640
  ...props
@@ -13994,6 +14818,7 @@ var Sidebar = React39.forwardRef(function Sidebar2({
13994
14818
  "data-labels": labelsHidden ? "hide" : "show",
13995
14819
  "data-collapsible": collapsible ? "true" : void 0,
13996
14820
  "data-variant": variant,
14821
+ ...slot(sidebarAnatomy, "root"),
13997
14822
  onMouseEnter: handleEnter,
13998
14823
  onMouseLeave: handleLeave,
13999
14824
  style: { width: effectiveWidth, ...style },
@@ -14053,6 +14878,7 @@ var SidebarTrigger = React39.forwardRef(
14053
14878
  onClick?.(e);
14054
14879
  if (!e.defaultPrevented) toggle();
14055
14880
  },
14881
+ ...slot(sidebarAnatomy, "trigger"),
14056
14882
  className: cn(
14057
14883
  "inline-flex size-7 shrink-0 items-center justify-center rounded-md",
14058
14884
  "text-fg-3 hover:bg-bg-3 hover:text-fg",
@@ -14099,6 +14925,8 @@ var SidebarPinButton = React39.forwardRef(
14099
14925
  onClick?.(e);
14100
14926
  if (!e.defaultPrevented) setState(isPinned ? "rail" : "expanded");
14101
14927
  },
14928
+ ...slot(sidebarAnatomy, "pin"),
14929
+ ...stateAttributes({ selected: isPinned }),
14102
14930
  className: cn(
14103
14931
  "inline-flex size-7 shrink-0 items-center justify-center rounded-md",
14104
14932
  "text-fg-4 hover:bg-bg-3 hover:text-fg aria-pressed:text-fg",
@@ -14155,6 +14983,7 @@ var SidebarBrand = React39.forwardRef(
14155
14983
  "div",
14156
14984
  {
14157
14985
  ref,
14986
+ ...slot(sidebarAnatomy, "brand"),
14158
14987
  className: cn(
14159
14988
  "flex min-w-0 items-center gap-2 px-2.5 pt-1 pb-4",
14160
14989
  className
@@ -14172,6 +15001,7 @@ var SidebarBrandText = React39.forwardRef(
14172
15001
  {
14173
15002
  ref,
14174
15003
  "aria-hidden": "false",
15004
+ ...slot(sidebarAnatomy, "brand-text"),
14175
15005
  className: cn(
14176
15006
  // line-clamp-1 (not `truncate`) so multi-word wordmarks clip at a
14177
15007
  // word boundary instead of mid-word when the rail is narrow.
@@ -14209,6 +15039,7 @@ var SidebarSection = React39.forwardRef(
14209
15039
  ref,
14210
15040
  role: ariaLabel ? "group" : void 0,
14211
15041
  "aria-label": ariaLabel,
15042
+ ...slot(sidebarAnatomy, "section"),
14212
15043
  className: cn(
14213
15044
  "mb-4",
14214
15045
  // In rail, the visible section labels disappear and the only
@@ -14223,6 +15054,7 @@ var SidebarSection = React39.forwardRef(
14223
15054
  label != null && /* @__PURE__ */ jsx(
14224
15055
  "div",
14225
15056
  {
15057
+ ...slot(sidebarAnatomy, "section-header"),
14226
15058
  className: cn(
14227
15059
  "mb-1 flex items-center justify-between px-2.5 py-1",
14228
15060
  "transition-opacity duration-[var(--motion-duration-spatial)] ease-[var(--motion-ease-move)] motion-reduce:transition-none",
@@ -14232,6 +15064,7 @@ var SidebarSection = React39.forwardRef(
14232
15064
  children: /* @__PURE__ */ jsx(
14233
15065
  "span",
14234
15066
  {
15067
+ ...slot(sidebarAnatomy, "section-label"),
14235
15068
  className: cn(
14236
15069
  "font-mono text-[11px] tracking-[0.14em] uppercase",
14237
15070
  tone === "muted" ? "text-fg-3" : "text-brand"
@@ -14273,6 +15106,7 @@ var SidebarLink = React39.forwardRef(
14273
15106
  "data-active": active ? "true" : void 0,
14274
15107
  "aria-current": active ? "page" : void 0,
14275
15108
  "aria-label": accessibleLabel,
15109
+ ...slot(sidebarAnatomy, "link"),
14276
15110
  className: cn(
14277
15111
  "group/link relative mb-px flex items-center gap-2.5 rounded-md px-2.5 py-1.5",
14278
15112
  "text-fg-2 text-[13px] font-normal no-underline",
@@ -14312,6 +15146,7 @@ var SidebarLink = React39.forwardRef(
14312
15146
  /* @__PURE__ */ jsx(
14313
15147
  "span",
14314
15148
  {
15149
+ ...slot(sidebarAnatomy, "link-label"),
14315
15150
  className: cn(
14316
15151
  // Flex row so a trailing <SidebarLinkBadge> (ml-auto) aligns
14317
15152
  // to the right edge with a gap from the label, instead of
@@ -14343,6 +15178,7 @@ var SidebarLinkLabel = React39.forwardRef(
14343
15178
  "span",
14344
15179
  {
14345
15180
  ref,
15181
+ ...slot(sidebarAnatomy, "link-label"),
14346
15182
  className: cn(
14347
15183
  // line-clamp-1 (not `truncate`) so multi-word labels clip at a
14348
15184
  // word boundary; collapses cleanly with the rail-mode max-width
@@ -14368,6 +15204,7 @@ var SidebarLinkAction = React39.forwardRef(
14368
15204
  "span",
14369
15205
  {
14370
15206
  ref,
15207
+ ...slot(sidebarAnatomy, "link-action"),
14371
15208
  className: cn(
14372
15209
  "transition-opacity duration-[var(--motion-duration-spatial)] ease-[var(--motion-ease-move)] motion-reduce:transition-none",
14373
15210
  "opacity-100",
@@ -14396,7 +15233,15 @@ var sidebarLinkBadgeVariants = cva(
14396
15233
  );
14397
15234
  var SidebarLinkBadge = React39.forwardRef(
14398
15235
  function SidebarLinkBadge2({ tone, className, ...props }, ref) {
14399
- return /* @__PURE__ */ jsx("span", { ref, className: cn(sidebarLinkBadgeVariants({ tone }), className), ...props });
15236
+ return /* @__PURE__ */ jsx(
15237
+ "span",
15238
+ {
15239
+ ref,
15240
+ ...slot(sidebarAnatomy, "link-badge"),
15241
+ className: cn(sidebarLinkBadgeVariants({ tone }), className),
15242
+ ...props
15243
+ }
15244
+ );
14400
15245
  }
14401
15246
  );
14402
15247
  SidebarLinkBadge.displayName = "SidebarLinkBadge";
@@ -14467,6 +15312,7 @@ var SidebarLinkGroup = React39.forwardRef(
14467
15312
  const labelSpan = /* @__PURE__ */ jsx(
14468
15313
  "span",
14469
15314
  {
15315
+ ...slot(sidebarAnatomy, "link-label"),
14470
15316
  className: cn(
14471
15317
  // line-clamp-1 (not `truncate`) so multi-word labels clip at a
14472
15318
  // word boundary; collapses cleanly with the rail-mode max-width
@@ -14479,60 +15325,73 @@ var SidebarLinkGroup = React39.forwardRef(
14479
15325
  children: label
14480
15326
  }
14481
15327
  );
14482
- return /* @__PURE__ */ jsx("div", { ref, className: cn("mb-px", className), ...props, children: /* @__PURE__ */ jsxs(Collapsible, { open, onOpenChange: setOpen, children: [
14483
- /* @__PURE__ */ jsxs("div", { className: "flex items-stretch", children: [
14484
- /* @__PURE__ */ jsxs(
14485
- "a",
14486
- {
14487
- href,
14488
- "data-active": active ? "true" : void 0,
14489
- "aria-current": active ? "page" : void 0,
14490
- "aria-label": getTextContent(label) || void 0,
14491
- onClick: handleBodyClick,
14492
- className: bodyClassName,
14493
- children: [
14494
- icon,
14495
- labelSpan
14496
- ]
14497
- }
14498
- ),
14499
- /* @__PURE__ */ jsx(
14500
- "button",
14501
- {
14502
- type: "button",
14503
- "aria-expanded": open,
14504
- "aria-controls": contentId,
14505
- "aria-label": open ? "Collapse section" : "Expand section",
14506
- onClick: handleChevronClick,
14507
- className: cn(
14508
- "ml-px inline-flex size-7 shrink-0 items-center justify-center rounded-md",
14509
- "text-fg-4 hover:bg-bg-3 hover:text-fg-2",
14510
- "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
14511
- "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
14512
- "[&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:transition-transform [&_svg]:duration-[var(--duration-fast)] [&_svg]:ease-[var(--ease-out-quart)] motion-reduce:[&_svg]:transition-none",
14513
- // Hide in rail — content tree is hidden too, so the
14514
- // affordance has nothing to control.
14515
- "group-data-[labels=hide]/sidebar:hidden"
15328
+ return /* @__PURE__ */ jsx(
15329
+ "div",
15330
+ {
15331
+ ref,
15332
+ ...slot(sidebarAnatomy, "group"),
15333
+ ...stateAttributes({ state: open ? "open" : "closed" }),
15334
+ className: cn("mb-px", className),
15335
+ ...props,
15336
+ children: /* @__PURE__ */ jsxs(Collapsible, { open, onOpenChange: setOpen, children: [
15337
+ /* @__PURE__ */ jsxs("div", { className: "flex items-stretch", children: [
15338
+ /* @__PURE__ */ jsxs(
15339
+ "a",
15340
+ {
15341
+ href,
15342
+ "data-active": active ? "true" : void 0,
15343
+ "aria-current": active ? "page" : void 0,
15344
+ "aria-label": getTextContent(label) || void 0,
15345
+ onClick: handleBodyClick,
15346
+ ...slot(sidebarAnatomy, "group-link"),
15347
+ className: bodyClassName,
15348
+ children: [
15349
+ icon,
15350
+ labelSpan
15351
+ ]
15352
+ }
14516
15353
  ),
14517
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: open ? "" : "-rotate-90" })
14518
- }
14519
- )
14520
- ] }),
14521
- /* @__PURE__ */ jsx(
14522
- CollapsibleContent,
14523
- {
14524
- id: contentId,
14525
- className: cn(
14526
- // Indent column + connecting rule. Children render as
14527
- // standard <SidebarLink>s and keep their own active-rail
14528
- // indicator, which lands flush at the indented column's
14529
- // left edge.
14530
- "group-data-[labels=hide]/sidebar:hidden"
14531
- ),
14532
- children: /* @__PURE__ */ jsx("div", { className: "border-rule mt-px ml-[18px] border-l pl-2", children })
14533
- }
14534
- )
14535
- ] }) });
15354
+ /* @__PURE__ */ jsx(
15355
+ "button",
15356
+ {
15357
+ type: "button",
15358
+ "aria-expanded": open,
15359
+ "aria-controls": contentId,
15360
+ "aria-label": open ? "Collapse section" : "Expand section",
15361
+ onClick: handleChevronClick,
15362
+ ...slot(sidebarAnatomy, "group-trigger"),
15363
+ className: cn(
15364
+ "ml-px inline-flex size-7 shrink-0 items-center justify-center rounded-md",
15365
+ "text-fg-4 hover:bg-bg-3 hover:text-fg-2",
15366
+ "transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
15367
+ "focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none",
15368
+ "[&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:transition-transform [&_svg]:duration-[var(--duration-fast)] [&_svg]:ease-[var(--ease-out-quart)] motion-reduce:[&_svg]:transition-none",
15369
+ // Hide in rail content tree is hidden too, so the
15370
+ // affordance has nothing to control.
15371
+ "group-data-[labels=hide]/sidebar:hidden"
15372
+ ),
15373
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: open ? "" : "-rotate-90" })
15374
+ }
15375
+ )
15376
+ ] }),
15377
+ /* @__PURE__ */ jsx(
15378
+ CollapsibleContent,
15379
+ {
15380
+ id: contentId,
15381
+ ...slot(sidebarAnatomy, "group-content"),
15382
+ className: cn(
15383
+ // Indent column + connecting rule. Children render as
15384
+ // standard <SidebarLink>s and keep their own active-rail
15385
+ // indicator, which lands flush at the indented column's
15386
+ // left edge.
15387
+ "group-data-[labels=hide]/sidebar:hidden"
15388
+ ),
15389
+ children: /* @__PURE__ */ jsx("div", { className: "border-rule mt-px ml-[18px] border-l pl-2", children })
15390
+ }
15391
+ )
15392
+ ] })
15393
+ }
15394
+ );
14536
15395
  }
14537
15396
  );
14538
15397
  SidebarLinkGroup.displayName = "SidebarLinkGroup";
@@ -14542,6 +15401,7 @@ var SidebarFooter = React39.forwardRef(
14542
15401
  "div",
14543
15402
  {
14544
15403
  ref,
15404
+ ...slot(sidebarAnatomy, "footer"),
14545
15405
  className: cn(
14546
15406
  "border-rule mt-auto flex items-center gap-2.5 border-t px-2 pt-2.5 pb-1",
14547
15407
  "text-fg-3 text-xs",
@@ -14554,24 +15414,47 @@ var SidebarFooter = React39.forwardRef(
14554
15414
  );
14555
15415
  SidebarFooter.displayName = "SidebarFooter";
14556
15416
  var SidebarUser = React39.forwardRef(function SidebarUser2({ name, subtitle, avatarSrc, className, ...props }, ref) {
14557
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex min-w-0 items-center gap-2.5", className), ...props, children: [
14558
- /* @__PURE__ */ jsx(Avatar, { size: "sm", variant: "branded", name, src: avatarSrc ?? void 0 }),
14559
- /* @__PURE__ */ jsxs(
14560
- "div",
14561
- {
14562
- className: cn(
14563
- "min-w-0 leading-tight",
14564
- "transition-[opacity,max-width] duration-[var(--motion-duration-spatial)] ease-[var(--motion-ease-move)] motion-reduce:transition-none",
14565
- "max-w-full opacity-100",
14566
- "group-data-[labels=hide]/sidebar:max-w-0 group-data-[labels=hide]/sidebar:opacity-0 group-data-[labels=hide]/sidebar:invisible"
14567
- ),
14568
- children: [
14569
- /* @__PURE__ */ jsx("div", { className: "text-fg line-clamp-1 text-[13px] font-medium", children: name }),
14570
- subtitle != null && /* @__PURE__ */ jsx("div", { className: "text-fg-4 line-clamp-1 font-mono text-[10.5px]", children: subtitle })
14571
- ]
14572
- }
14573
- )
14574
- ] });
15417
+ return /* @__PURE__ */ jsxs(
15418
+ "div",
15419
+ {
15420
+ ref,
15421
+ ...slot(sidebarAnatomy, "user"),
15422
+ className: cn("flex min-w-0 items-center gap-2.5", className),
15423
+ ...props,
15424
+ children: [
15425
+ /* @__PURE__ */ jsx(Avatar, { size: "sm", variant: "branded", name, src: avatarSrc ?? void 0 }),
15426
+ /* @__PURE__ */ jsxs(
15427
+ "div",
15428
+ {
15429
+ className: cn(
15430
+ "min-w-0 leading-tight",
15431
+ "transition-[opacity,max-width] duration-[var(--motion-duration-spatial)] ease-[var(--motion-ease-move)] motion-reduce:transition-none",
15432
+ "max-w-full opacity-100",
15433
+ "group-data-[labels=hide]/sidebar:max-w-0 group-data-[labels=hide]/sidebar:opacity-0 group-data-[labels=hide]/sidebar:invisible"
15434
+ ),
15435
+ children: [
15436
+ /* @__PURE__ */ jsx(
15437
+ "div",
15438
+ {
15439
+ ...slot(sidebarAnatomy, "user-name"),
15440
+ className: "text-fg line-clamp-1 text-[13px] font-medium",
15441
+ children: name
15442
+ }
15443
+ ),
15444
+ subtitle != null && /* @__PURE__ */ jsx(
15445
+ "div",
15446
+ {
15447
+ ...slot(sidebarAnatomy, "user-subtitle"),
15448
+ className: "text-fg-4 line-clamp-1 font-mono text-[10.5px]",
15449
+ children: subtitle
15450
+ }
15451
+ )
15452
+ ]
15453
+ }
15454
+ )
15455
+ ]
15456
+ }
15457
+ );
14575
15458
  });
14576
15459
  SidebarUser.displayName = "SidebarUser";
14577
15460
  var SidebarBrandSwitcher = React39.forwardRef(
@@ -14608,6 +15491,7 @@ var SidebarBrandSwitcher = React39.forwardRef(
14608
15491
  "div",
14609
15492
  {
14610
15493
  ref,
15494
+ ...slot(sidebarBrandSwitcherAnatomy, "root"),
14611
15495
  className: cn("flex min-w-0 items-center gap-2 px-2.5 pt-1 pb-4", className),
14612
15496
  children: [
14613
15497
  /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
@@ -14615,6 +15499,7 @@ var SidebarBrandSwitcher = React39.forwardRef(
14615
15499
  DropdownMenuTrigger,
14616
15500
  {
14617
15501
  "aria-label": triggerLabel,
15502
+ ...slot(sidebarBrandSwitcherAnatomy, "trigger"),
14618
15503
  className: cn(
14619
15504
  // Negative left margin pulls the trigger's hover-bg toward
14620
15505
  // the column edge while the inner padding holds the brand
@@ -14632,6 +15517,7 @@ var SidebarBrandSwitcher = React39.forwardRef(
14632
15517
  /* @__PURE__ */ jsx(
14633
15518
  ChevronDownIcon,
14634
15519
  {
15520
+ ...slot(sidebarBrandSwitcherAnatomy, "icon"),
14635
15521
  className: cn(
14636
15522
  "ml-auto size-3.5 shrink-0 text-fg-4",
14637
15523
  "transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
@@ -15186,6 +16072,7 @@ var DataTable = forwardRef(function DataTable2({ withToolbar, className, childre
15186
16072
  {
15187
16073
  ref,
15188
16074
  "data-with-toolbar": withToolbar ? "true" : void 0,
16075
+ ...slot(dataTableAnatomy, "root"),
15189
16076
  className: cn(
15190
16077
  // Outer frame on the whole component: a single visible border +
15191
16078
  // quiet shadow wrapping the toolbar (if any) and the table as one
@@ -15207,6 +16094,7 @@ var DataTableToolbar = forwardRef(
15207
16094
  "div",
15208
16095
  {
15209
16096
  ref,
16097
+ ...slot(dataTableAnatomy, "toolbar"),
15210
16098
  className: cn(
15211
16099
  "flex items-center gap-2 px-3 py-2.5",
15212
16100
  "border-rule bg-surface border-b",
@@ -15237,7 +16125,16 @@ var DataTableSearch = forwardRef(
15237
16125
  DataTableSearch.displayName = "DataTableSearch";
15238
16126
  var DataTableSpacer = forwardRef(
15239
16127
  function DataTableSpacer2({ className, ...props }, ref) {
15240
- return /* @__PURE__ */ jsx("span", { ref, "aria-hidden": "true", className: cn("flex-1", className), ...props });
16128
+ return /* @__PURE__ */ jsx(
16129
+ "span",
16130
+ {
16131
+ ref,
16132
+ "aria-hidden": "true",
16133
+ ...slot(dataTableAnatomy, "spacer"),
16134
+ className: cn("flex-1", className),
16135
+ ...props
16136
+ }
16137
+ );
15241
16138
  }
15242
16139
  );
15243
16140
  DataTableSpacer.displayName = "DataTableSpacer";
@@ -15247,6 +16144,7 @@ var DataTableResultsCount = forwardRef(
15247
16144
  "span",
15248
16145
  {
15249
16146
  ref,
16147
+ ...slot(dataTableAnatomy, "results-count"),
15250
16148
  className: cn(
15251
16149
  "text-fg-4 mr-1 shrink-0 font-sans text-[11px] whitespace-nowrap tabular-nums",
15252
16150
  className
@@ -15264,13 +16162,29 @@ var DataTableResultsCount = forwardRef(
15264
16162
  DataTableResultsCount.displayName = "DataTableResultsCount";
15265
16163
  var DataTableHead = forwardRef(
15266
16164
  function DataTableHead2({ className, ...props }, ref) {
15267
- return /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-rule [&_tr]:border-b", className), ...props });
16165
+ return /* @__PURE__ */ jsx(
16166
+ "thead",
16167
+ {
16168
+ ref,
16169
+ ...slot(dataTableAnatomy, "header"),
16170
+ className: cn("[&_tr]:border-rule [&_tr]:border-b", className),
16171
+ ...props
16172
+ }
16173
+ );
15268
16174
  }
15269
16175
  );
15270
16176
  DataTableHead.displayName = "DataTableHead";
15271
16177
  var DataTableBody = forwardRef(
15272
16178
  function DataTableBody2({ className, ...props }, ref) {
15273
- return /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props });
16179
+ return /* @__PURE__ */ jsx(
16180
+ "tbody",
16181
+ {
16182
+ ref,
16183
+ ...slot(dataTableAnatomy, "body"),
16184
+ className: cn("[&_tr:last-child]:border-0", className),
16185
+ ...props
16186
+ }
16187
+ );
15274
16188
  }
15275
16189
  );
15276
16190
  DataTableBody.displayName = "DataTableBody";
@@ -15281,6 +16195,7 @@ var DataTableRow = forwardRef(
15281
16195
  {
15282
16196
  ref,
15283
16197
  "data-state": selected ? "selected" : void 0,
16198
+ ...slot(dataTableAnatomy, "row"),
15284
16199
  className: cn(
15285
16200
  "border-rule-soft border-b",
15286
16201
  microInteractions.selection,
@@ -15321,6 +16236,7 @@ var DataTableHeader = forwardRef(
15321
16236
  "span",
15322
16237
  {
15323
16238
  "aria-hidden": "true",
16239
+ ...slot(dataTableAnatomy, "head-indicator"),
15324
16240
  className: cn(
15325
16241
  "text-fg-5 ml-1 inline-flex shrink-0 items-center justify-center",
15326
16242
  currentSort && "text-fg-3"
@@ -15335,6 +16251,8 @@ var DataTableHeader = forwardRef(
15335
16251
  ref,
15336
16252
  scope: "col",
15337
16253
  "aria-sort": ariaSort,
16254
+ ...slot(dataTableAnatomy, "head"),
16255
+ ...stateAttributes({ state: currentSort ?? void 0 }),
15338
16256
  className: cn(
15339
16257
  "h-11 px-4 py-2.5 text-left align-middle whitespace-nowrap",
15340
16258
  "font-sans text-[14px] font-medium tracking-normal normal-case",
@@ -15349,6 +16267,7 @@ var DataTableHeader = forwardRef(
15349
16267
  {
15350
16268
  type: "button",
15351
16269
  onClick: handleClick,
16270
+ ...slot(dataTableAnatomy, "head-button"),
15352
16271
  className: cn(
15353
16272
  "-mx-1 -my-1 inline-flex items-center gap-1 rounded-[4px] px-1 py-1",
15354
16273
  "font-sans text-[14px] font-medium tracking-normal normal-case",
@@ -15374,6 +16293,7 @@ var DataTableCell = forwardRef(
15374
16293
  "td",
15375
16294
  {
15376
16295
  ref,
16296
+ ...slot(dataTableAnatomy, "cell"),
15377
16297
  className: cn(
15378
16298
  cellBase,
15379
16299
  "text-fg-2 text-[13px]",
@@ -15392,6 +16312,8 @@ var DataTableCellName = forwardRef(
15392
16312
  "td",
15393
16313
  {
15394
16314
  ref,
16315
+ ...slot(dataTableAnatomy, "cell"),
16316
+ ...stateAttributes({ variant: "name" }),
15395
16317
  className: cn(cellBase, "font-display text-fg text-[13px] font-medium", className),
15396
16318
  ...props
15397
16319
  }
@@ -15405,6 +16327,8 @@ var DataTableCellMono = forwardRef(
15405
16327
  "td",
15406
16328
  {
15407
16329
  ref,
16330
+ ...slot(dataTableAnatomy, "cell"),
16331
+ ...stateAttributes({ variant: "mono" }),
15408
16332
  className: cn(cellBase, "font-sans text-fg-2 text-[13px] tabular-nums", className),
15409
16333
  style,
15410
16334
  ...props
@@ -15419,6 +16343,8 @@ var DataTableCellId = forwardRef(
15419
16343
  "td",
15420
16344
  {
15421
16345
  ref,
16346
+ ...slot(dataTableAnatomy, "cell"),
16347
+ ...stateAttributes({ variant: "id" }),
15422
16348
  className: cn(cellBase, "font-sans text-fg-4 text-xs tabular-nums", className),
15423
16349
  style,
15424
16350
  ...props
@@ -15444,6 +16370,8 @@ var DataTableCellDue = forwardRef(
15444
16370
  {
15445
16371
  ref,
15446
16372
  "data-due-state": ariaState,
16373
+ ...slot(dataTableAnatomy, "cell"),
16374
+ ...stateAttributes({ variant: "due" }),
15447
16375
  className: cn(cellBase, "font-sans text-[13px] tabular-nums", tone, className),
15448
16376
  style,
15449
16377
  ...props,
@@ -15469,6 +16397,7 @@ var DataTableCheckbox = forwardRef(
15469
16397
  Cell,
15470
16398
  {
15471
16399
  ref,
16400
+ ...slot(dataTableAnatomy, "checkbox-cell"),
15472
16401
  className: cn(
15473
16402
  "w-8 px-4 py-3 pr-0 align-middle",
15474
16403
  asHeader && "bg-surface-2 border-rule h-11 border-b",