@ship-it-ui/ui 0.0.1 → 0.0.3

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.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ClassValue } from 'clsx';
2
+ export { ClassValue } from 'clsx';
2
3
  import * as react from 'react';
3
- import { KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, FC, SVGAttributes } from 'react';
4
+ import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, LabelHTMLAttributes, FC, SVGAttributes } from 'react';
4
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
6
  import { VariantProps } from 'class-variance-authority';
6
7
  import * as RadixCheckbox from '@radix-ui/react-checkbox';
@@ -44,10 +45,16 @@ interface UseControllableStateProps<T> {
44
45
  /** Change callback fired in both modes whenever the value would change. */
45
46
  onChange?: (value: T) => void;
46
47
  }
47
- declare function useControllableState<T>({ value: controlledValue, defaultValue, onChange, }: UseControllableStateProps<T>): [
48
- T | undefined,
49
- (next: T | ((prev: T | undefined) => T)) => void
50
- ];
48
+ declare function useControllableState<T>(opts: {
49
+ value?: T;
50
+ defaultValue: T;
51
+ onChange?: (next: T) => void;
52
+ }): readonly [T, (next: T | ((prev: T) => T)) => void];
53
+ declare function useControllableState<T>(opts: {
54
+ value?: T;
55
+ defaultValue?: T;
56
+ onChange?: (next: T) => void;
57
+ }): readonly [T | undefined, (next: T | ((prev: T | undefined) => T)) => void];
51
58
 
52
59
  /**
53
60
  * Standardized open/close state for overlays.
@@ -66,9 +73,25 @@ declare function useDisclosure(initial?: boolean): {
66
73
  * Calls `handler` when Escape is pressed while `enabled` is true.
67
74
  * Most overlay components (Dialog, Popover, Drawer) get this for free via Radix,
68
75
  * but custom popovers and inline editors need it.
76
+ *
77
+ * Implementation note: the handler is stored in a ref so an inline
78
+ * `() => doThing()` passed by the consumer doesn't detach/reattach the
79
+ * `keydown` listener every render.
69
80
  */
70
81
  declare function useEscape(handler: () => void, enabled?: boolean): void;
71
82
 
83
+ /**
84
+ * `useLayoutEffect` on the client, `useEffect` on the server.
85
+ *
86
+ * React warns when `useLayoutEffect` runs on the server because there's no
87
+ * DOM to measure. This shim swaps in `useEffect` during SSR and restores
88
+ * `useLayoutEffect` once the bundle is evaluated client-side.
89
+ *
90
+ * Use when you need to measure or synchronously mutate the DOM before
91
+ * paint. Plain `useEffect` is preferred otherwise.
92
+ */
93
+ declare const useIsomorphicLayoutEffect: typeof useEffect;
94
+
72
95
  /**
73
96
  * Keyboard navigation for arrow-key selectable lists (Combobox, CommandPalette,
74
97
  * filtered dropdown bodies). Tracks the highlighted cursor and exposes a
@@ -97,11 +120,13 @@ interface UseKeyboardListResult {
97
120
  declare function useKeyboardList({ count, loop, defaultCursor, onSelect, }: UseKeyboardListOptions): UseKeyboardListResult;
98
121
 
99
122
  /**
100
- * Calls `handler` when a mousedown occurs outside the element referenced by `ref`.
123
+ * Calls `handler` when a pointerdown occurs outside the element referenced by `ref`.
101
124
  *
102
125
  * Pass `enabled=false` to detach (typically while the popover is closed). Listens on
103
- * `mousedown` rather than `click` so the trigger sees the close before its own click
104
- * fires — matches the behavior of most popover libraries.
126
+ * `pointerdown` rather than `click` so the trigger sees the close before its own click
127
+ * fires — matches the behavior of most popover libraries. `pointerdown` is the unified
128
+ * mouse + touch + pen event, so this also works on touch devices (where `mousedown`
129
+ * is not synthesized for taps until after the click).
105
130
  */
106
131
  declare function useOutsideClick<T extends HTMLElement>(ref: RefObject<T | null>, handler: () => void, enabled?: boolean): void;
107
132
 
@@ -147,7 +172,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantPr
147
172
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
148
173
 
149
174
  declare const iconButtonStyles: (props?: ({
150
- variant?: "primary" | "secondary" | "ghost" | "outline" | null | undefined;
175
+ variant?: "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" | null | undefined;
151
176
  size?: "sm" | "md" | "lg" | null | undefined;
152
177
  } & class_variance_authority_types.ClassProp) | undefined) => string;
153
178
  interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof iconButtonStyles> {
@@ -177,9 +202,15 @@ interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
177
202
  */
178
203
  declare const ButtonGroup: react.ForwardRefExoticComponent<ButtonGroupProps & react.RefAttributes<HTMLDivElement>>;
179
204
 
205
+ /**
206
+ * Variant set supported by `SplitButton`. Mirrors `Button`'s set minus `link` —
207
+ * a split-button "menu" affordance attached to a link variant doesn't compose
208
+ * visually. Use a regular `<Button variant="link" />` instead.
209
+ */
210
+ type SplitButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'success';
180
211
  interface SplitButtonProps extends HTMLAttributes<HTMLDivElement> {
181
212
  /** Visual variant applied to BOTH segments. Defaults to `primary`. */
182
- variant?: ButtonProps['variant'];
213
+ variant?: SplitButtonVariant;
183
214
  /** Size applied to both segments. Defaults to `md`. */
184
215
  size?: ButtonProps['size'];
185
216
  /** Click handler for the main action button. */
@@ -188,6 +219,12 @@ interface SplitButtonProps extends HTMLAttributes<HTMLDivElement> {
188
219
  onMenu?: () => void;
189
220
  /** Disable both segments. */
190
221
  disabled?: boolean;
222
+ /**
223
+ * Accessible label for the trailing menu button. Defaults to
224
+ * `"More actions"`. Override when the menu's purpose is more specific
225
+ * (e.g. `"Deploy options"`) so screen-reader users hear the right intent.
226
+ */
227
+ menuAriaLabel?: string;
191
228
  children: ReactNode;
192
229
  }
193
230
  /**
@@ -249,7 +286,7 @@ declare function Field({ label, hint, error, required, className, children, ...p
249
286
 
250
287
  declare const inputWrapperStyles: (props?: ({
251
288
  size?: "sm" | "md" | "lg" | null | undefined;
252
- tone?: "error" | "default" | null | undefined;
289
+ tone?: "default" | "err" | null | undefined;
253
290
  } & class_variance_authority_types.ClassProp) | undefined) => string;
254
291
  interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputWrapperStyles> {
255
292
  /** Element rendered to the left of the input (an `IconGlyph`, `@`, etc.). */
@@ -354,15 +391,39 @@ interface SelectProps extends Omit<RadixSelect.SelectProps, 'children'> {
354
391
  */
355
392
  declare function Select({ options, placeholder, size, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): react_jsx_runtime.JSX.Element;
356
393
 
357
- interface SliderProps extends Omit<RadixSlider.SliderProps, 'asChild'> {
394
+ interface SliderProps extends Omit<RadixSlider.SliderProps, 'asChild' | 'value' | 'defaultValue' | 'onValueChange'> {
358
395
  /** Show the numeric value to the right of the track. */
359
396
  showValue?: boolean;
360
397
  /** Pixel width or any CSS length. Defaults to `240`. */
361
398
  width?: number | string;
399
+ /**
400
+ * Per-thumb accessible names for multi-thumb (range) sliders. The label at
401
+ * each index is forwarded to the corresponding `<RadixSlider.Thumb>`. When
402
+ * omitted, every thumb falls back to `aria-label`/`aria-labelledby` (or the
403
+ * literal `'Value'` when neither is provided).
404
+ */
405
+ thumbLabels?: ReadonlyArray<string>;
406
+ /**
407
+ * Controlled value. Accepts a scalar for single-thumb sliders or an array
408
+ * for multi-thumb (range) sliders. The shape passed in mirrors the shape
409
+ * passed back to `onValueChange`.
410
+ */
411
+ value?: number | number[];
412
+ /** Uncontrolled initial value. Same scalar/array semantics as `value`. */
413
+ defaultValue?: number | number[];
414
+ /**
415
+ * Fires when the value changes. The argument shape mirrors the input shape:
416
+ * if `value`/`defaultValue` is a scalar, `next` is a scalar; if it's an
417
+ * array, `next` is an array.
418
+ */
419
+ onValueChange?: (next: number | number[]) => void;
362
420
  }
363
421
  /**
364
422
  * Range slider. Built on Radix Slider for keyboard support (arrow keys nudge,
365
423
  * Page Up/Down jumps, Home/End snap to extremes).
424
+ *
425
+ * Pass `aria-label` / `aria-labelledby` to name a single-thumb slider; pass
426
+ * `thumbLabels` to name each thumb in a multi-thumb (range) slider.
366
427
  */
367
428
  declare const Slider: react.ForwardRefExoticComponent<SliderProps & react.RefAttributes<HTMLSpanElement>>;
368
429
 
@@ -375,7 +436,7 @@ interface SwitchProps extends Omit<RadixSwitch.SwitchProps, 'asChild' | 'childre
375
436
  declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
376
437
 
377
438
  declare const textareaStyles: (props?: ({
378
- tone?: "error" | "default" | null | undefined;
439
+ tone?: "default" | "err" | null | undefined;
379
440
  } & class_variance_authority_types.ClassProp) | undefined) => string;
380
441
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaStyles> {
381
442
  /** Error tone shortcut. Sets `aria-invalid` and the error border. */
@@ -419,7 +480,7 @@ interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
419
480
  declare const AvatarGroup: react.ForwardRefExoticComponent<AvatarGroupProps & react.RefAttributes<HTMLDivElement>>;
420
481
 
421
482
  declare const badgeStyles: (props?: ({
422
- variant?: "outline" | "pink" | "purple" | "solid" | "ok" | "warn" | "err" | "neutral" | "accent" | null | undefined;
483
+ variant?: "outline" | "err" | "pink" | "purple" | "solid" | "ok" | "warn" | "accent" | "neutral" | null | undefined;
423
484
  size?: "sm" | "md" | "lg" | null | undefined;
424
485
  } & class_variance_authority_types.ClassProp) | undefined) => string;
425
486
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
@@ -443,6 +504,14 @@ interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, Varia
443
504
  actions?: ReactNode;
444
505
  /** Footer slot rendered with a top divider beneath children. */
445
506
  footer?: ReactNode;
507
+ /**
508
+ * Keyboard activation handler. When provided, Enter/Space on a card with
509
+ * `role="button"` (i.e. `interactive` truthy) calls this instead of
510
+ * synthesizing a fake mouse event for `onClick` — downstream `e.button` /
511
+ * `e.clientX` reads from the synthesized event are `undefined`, so prefer
512
+ * `onActivate` when you need an intent-only callback.
513
+ */
514
+ onActivate?: () => void;
446
515
  }
447
516
  /**
448
517
  * Standard surface for a chunk of content. All cards share the same chrome
@@ -450,8 +519,37 @@ interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, Varia
450
519
  *
451
520
  * Compose with the `<Card title="…" actions={…} footer={…}>` API for simple
452
521
  * cases, or pass children directly for full control.
522
+ *
523
+ * NOTE on `interactive`: a card with `interactive` resolves to
524
+ * `role="button" tabIndex=0`. If the same card also renders interactive
525
+ * children (e.g. via `actions`), screen readers see a button-inside-button —
526
+ * an axe `nested-interactive` violation. For "the whole card is one link"
527
+ * use `<CardLink>` instead. In the actions-present + interactive case we
528
+ * downgrade to a plain `<div>` (and warn in dev) so the assistive-tech tree
529
+ * stays valid.
453
530
  */
454
531
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
532
+ interface CardLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'title'>, VariantProps<typeof cardStyles> {
533
+ /** Destination URL. The whole card becomes a single link to this URL. */
534
+ href: string;
535
+ /** Render a header row with this title. */
536
+ title?: ReactNode;
537
+ /** Description shown under the title (or above children when no title). */
538
+ description?: ReactNode;
539
+ /** Footer slot rendered with a top divider beneath children. */
540
+ footer?: ReactNode;
541
+ }
542
+ /**
543
+ * Whole-card link. Use this when "click anywhere on the card" should
544
+ * navigate — it renders a single `<a>` so assistive tech sees one link
545
+ * (no nested-interactive problem) and the browser handles middle-click,
546
+ * cmd-click, hover preview, etc. without bespoke wiring.
547
+ *
548
+ * Does not accept an `actions` slot: action buttons inside a link are a
549
+ * nested-interactive violation. Put per-card actions next to the card
550
+ * instead, or use the plain `<Card>` for non-link cards.
551
+ */
552
+ declare const CardLink: react.ForwardRefExoticComponent<CardLinkProps & react.RefAttributes<HTMLAnchorElement>>;
455
553
 
456
554
  type StatTrend = 'up' | 'down' | 'flat';
457
555
  interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
@@ -474,8 +572,10 @@ declare const StatCard: react.ForwardRefExoticComponent<StatCardProps & react.Re
474
572
  interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
475
573
  /** Pill-style leading icon (typically a glyph or `@`/`#`). */
476
574
  icon?: ReactNode;
477
- /** Optional remove handler — renders an inset close button. */
478
- removable?: boolean;
575
+ /**
576
+ * Optional remove handler. When provided, renders an inset close button.
577
+ * Mirrors the `Tag` API — pass `onRemove` and the X is rendered automatically.
578
+ */
479
579
  onRemove?: () => void;
480
580
  children: ReactNode;
481
581
  }
@@ -501,8 +601,44 @@ interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typ
501
601
  width?: number | string;
502
602
  /** Height override. Defaults differ by shape: `line` = 14, `block` = 80, `circle` = 40. */
503
603
  height?: number | string;
604
+ /**
605
+ * Render this Skeleton as its own loading announcement (`role="status"`,
606
+ * `aria-busy="true"`, `aria-label="Loading"`). Default `false` — Skeleton is
607
+ * `aria-hidden` so a list of N skeletons does not announce N times. Wrap a
608
+ * group of Skeletons in `<SkeletonGroup>` to get a single aggregate
609
+ * announcement, or set `standalone` when rendering a single isolated
610
+ * Skeleton with no surrounding live region.
611
+ */
612
+ standalone?: boolean;
504
613
  }
614
+ /**
615
+ * Visual placeholder for content that is loading. By default, Skeleton is
616
+ * `aria-hidden` and emits no live-region announcement — wrap one or more
617
+ * Skeletons in `<SkeletonGroup loading>` to get a single "Loading" message
618
+ * for the whole group. For a single isolated Skeleton outside any group,
619
+ * pass `standalone` to restore the per-element `role="status"` semantic.
620
+ */
505
621
  declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
622
+ interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
623
+ /**
624
+ * Optional override for the announcement text. Defaults to `"Loading"`.
625
+ * Pass something more specific (e.g., `"Loading inbox"`) when the context
626
+ * makes it useful.
627
+ */
628
+ label?: string;
629
+ /**
630
+ * When `false`, the group renders as a plain wrapper with no live region —
631
+ * useful when toggling between loading and loaded children inside the same
632
+ * mount. Default `true`.
633
+ */
634
+ loading?: boolean;
635
+ }
636
+ /**
637
+ * Wraps a group of `<Skeleton>` placeholders in a single `role="status"` /
638
+ * `aria-busy="true"` live region so screen readers announce one "Loading"
639
+ * message for the whole group instead of one per Skeleton.
640
+ */
641
+ declare const SkeletonGroup: react.ForwardRefExoticComponent<SkeletonGroupProps & react.RefAttributes<HTMLDivElement>>;
506
642
 
507
643
  type StatusState = 'ok' | 'warn' | 'err' | 'off' | 'sync' | 'accent';
508
644
  interface StatusDotProps extends HTMLAttributes<HTMLSpanElement> {
@@ -600,8 +736,8 @@ interface SheetProps extends RadixDialog.DialogProps {
600
736
  children?: ReactNode;
601
737
  }
602
738
  /**
603
- * Bottom sheet overlay. Slides up from the bottom edge of the viewport, with a
604
- * subtle drag-handle. Useful for quick actions on mobile-leaning surfaces.
739
+ * Bottom sheet overlay. Slides up from the bottom edge of the viewport. Useful
740
+ * for quick actions on mobile-leaning surfaces.
605
741
  */
606
742
  declare const Sheet: react.ForwardRefExoticComponent<SheetProps & react.RefAttributes<HTMLDivElement>>;
607
743
 
@@ -733,36 +869,46 @@ interface TooltipProps {
733
869
  declare function Tooltip({ content, children, side, delayDuration }: TooltipProps): react_jsx_runtime.JSX.Element;
734
870
 
735
871
  /**
736
- * Alert — inline messaging block. Four tones (info / ok / warn / err) with a
872
+ * Alert — inline messaging block. Four tones (accent / ok / warn / err) with a
737
873
  * matching glyph, a left accent rule, and an optional dismiss action.
738
874
  *
739
875
  * For interrupting alerts (errors that need acknowledgment) use AlertDialog.
740
876
  * For transient feedback use Toast.
741
877
  */
742
- type AlertVariant = 'info' | 'ok' | 'warn' | 'err';
878
+ type AlertTone = 'accent' | 'ok' | 'warn' | 'err';
743
879
  declare const alertStyles: (props?: ({
744
- variant?: "ok" | "warn" | "err" | "info" | null | undefined;
880
+ tone?: "err" | "ok" | "warn" | "accent" | null | undefined;
745
881
  } & class_variance_authority_types.ClassProp) | undefined) => string;
746
882
  interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof alertStyles> {
747
883
  /** Bold title text. */
748
884
  title?: ReactNode;
749
885
  /** Body description. */
750
886
  description?: ReactNode;
751
- /** Icon override; defaults to a glyph matched to the variant. */
887
+ /** Icon override; defaults to a glyph matched to the tone. */
752
888
  icon?: ReactNode;
753
889
  /** Optional trailing actions (rendered to the right of the description). */
754
890
  action?: ReactNode;
891
+ /**
892
+ * Aria-live behavior for the alert. Default `'polite'`.
893
+ *
894
+ * Alerts that are part of the initial page render should leave this at the
895
+ * default — `role="alert"` (which is `aria-live="assertive"`) interrupts the
896
+ * screen reader on every page load. Set `'assertive'` only for urgent
897
+ * alerts that appear *after* initial render. Set `'off'` to suppress
898
+ * announcements entirely (still rendered, still has `role="status"`).
899
+ */
900
+ live?: 'off' | 'polite' | 'assertive';
755
901
  }
756
902
  declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
757
903
 
758
904
  /**
759
905
  * Banner — top-of-page notice. Spans the full width of its container, uses a
760
- * tinted background derived from the variant color, and supports `sticky`
906
+ * tinted background derived from the tone color, and supports `sticky`
761
907
  * positioning so it stays at the top of the viewport on scroll.
762
908
  */
763
- type BannerVariant = 'info' | 'ok' | 'warn' | 'err';
909
+ type BannerTone = 'accent' | 'ok' | 'warn' | 'err';
764
910
  declare const bannerStyles: (props?: ({
765
- variant?: "ok" | "warn" | "err" | "info" | null | undefined;
911
+ tone?: "err" | "ok" | "warn" | "accent" | null | undefined;
766
912
  sticky?: boolean | null | undefined;
767
913
  } & class_variance_authority_types.ClassProp) | undefined) => string;
768
914
  interface BannerProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof bannerStyles> {
@@ -770,6 +916,16 @@ interface BannerProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeo
770
916
  icon?: ReactNode;
771
917
  /** Optional trailing action (e.g., a link). Rendered with `ml-auto`. */
772
918
  action?: ReactNode;
919
+ /**
920
+ * Aria-live behavior for the banner. Default `'polite'`.
921
+ *
922
+ * Banners that are part of the initial page render should leave this at the
923
+ * default — `role="alert"` (which is `aria-live="assertive"`) interrupts the
924
+ * screen reader on every page load. Set `'assertive'` only for urgent
925
+ * banners that appear *after* initial render. Set `'off'` to suppress
926
+ * announcements entirely (still rendered, still has `role="status"`).
927
+ */
928
+ live?: 'off' | 'polite' | 'assertive';
773
929
  }
774
930
  declare const Banner: react.ForwardRefExoticComponent<BannerProps & react.RefAttributes<HTMLDivElement>>;
775
931
 
@@ -938,7 +1094,7 @@ interface DataTableProps<T> {
938
1094
  /** Controlled selection. */
939
1095
  selected?: ReadonlySet<string>;
940
1096
  defaultSelected?: ReadonlyArray<string>;
941
- onSelectionChange?: (selection: Set<string>) => void;
1097
+ onSelectionChange?: (selection: ReadonlySet<string>) => void;
942
1098
  /** Rendered when `data` is empty. */
943
1099
  emptyState?: ReactNode;
944
1100
  /** Sticky table header (requires the table to live in a scroll container). */
@@ -951,13 +1107,13 @@ declare function DataTable<T>(props: DataTableProps<T> & {
951
1107
  ref?: Ref<HTMLTableElement>;
952
1108
  }): react_jsx_runtime.JSX.Element;
953
1109
 
954
- interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
955
- /** Currently selected date. */
956
- selected?: Date;
1110
+ interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'defaultValue'> {
1111
+ /** Currently selected date (controlled). */
1112
+ value?: Date;
957
1113
  /** Default selected date (uncontrolled). */
958
- defaultSelected?: Date;
959
- /** Fires with the selected date. */
960
- onSelect?: (date: Date) => void;
1114
+ defaultValue?: Date;
1115
+ /** Fires with the newly selected date. */
1116
+ onValueChange?: (date: Date) => void;
961
1117
  /** Currently visible month (0-indexed) and year. */
962
1118
  month?: number;
963
1119
  year?: number;
@@ -1014,15 +1170,42 @@ interface DotsProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
1014
1170
  }
1015
1171
  declare const Dots: react.ForwardRefExoticComponent<DotsProps & react.RefAttributes<HTMLElement>>;
1016
1172
 
1173
+ /**
1174
+ * Dropzone — drag-and-drop file capture surface with a click-to-browse
1175
+ * fallback. Manages its own drag-over state and forwards file drops to
1176
+ * `onFiles`. Native `<input type="file">` covers keyboard / a11y.
1177
+ */
1178
+ interface DropzoneProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'onDrop' | 'onDragOver' | 'onDragLeave' | 'title'> {
1179
+ /** Fired with the dropped or selected files. */
1180
+ onFiles?: (files: File[]) => void;
1181
+ /** Limit accepted MIME types or extensions. Forwarded to the hidden input + filtered on drop. */
1182
+ accept?: string;
1183
+ /** Allow multiple files. Default true. */
1184
+ multiple?: boolean;
1185
+ /** Heading text. Default "Drop files to ingest". */
1186
+ title?: ReactNode;
1187
+ /** Subtitle / hint text rendered below the title. */
1188
+ description?: ReactNode;
1189
+ /** Glyph at the top of the surface. Default `↥`. */
1190
+ icon?: ReactNode;
1191
+ disabled?: boolean;
1192
+ }
1193
+ declare const Dropzone: react.ForwardRefExoticComponent<DropzoneProps & react.RefAttributes<HTMLLabelElement>>;
1194
+
1017
1195
  /**
1018
1196
  * EmptyState — placeholder for empty lists, no-results states, and error
1019
1197
  * surfaces. A 48×48 icon plate sits above a title + description and an
1020
1198
  * optional action area (button or chip stack).
1199
+ *
1200
+ * Tone controls the icon plate color. Omit `tone` for a neutral plate (the
1201
+ * default for empty lists / no-results); pass `accent | ok | warn | err` to
1202
+ * signal semantic intent (e.g., `err` for sync failures).
1021
1203
  */
1022
1204
  declare const plateStyles: (props?: ({
1023
- tone?: "accent" | "danger" | "muted" | null | undefined;
1205
+ tone?: "err" | "ok" | "warn" | "accent" | "neutral" | null | undefined;
1024
1206
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1025
- interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof plateStyles> {
1207
+ type PlateVariantProps = VariantProps<typeof plateStyles>;
1208
+ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1026
1209
  /** Glyph or icon node shown in the rounded plate. */
1027
1210
  icon?: ReactNode;
1028
1211
  /** Title heading. */
@@ -1036,6 +1219,8 @@ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>,
1036
1219
  label: ReactNode;
1037
1220
  onClick?: () => void;
1038
1221
  }>;
1222
+ /** Semantic tone for the icon plate. Omit for the neutral default. */
1223
+ tone?: Exclude<PlateVariantProps['tone'], 'neutral' | null | undefined> | undefined;
1039
1224
  }
1040
1225
  declare const EmptyState: react.ForwardRefExoticComponent<EmptyStateProps & react.RefAttributes<HTMLDivElement>>;
1041
1226
 
@@ -1081,6 +1266,61 @@ interface MenubarItemProps extends RadixMenubar.MenubarItemProps {
1081
1266
  declare const MenubarItem: react.ForwardRefExoticComponent<MenubarItemProps & react.RefAttributes<HTMLDivElement>>;
1082
1267
  declare const MenubarSeparator: react.ForwardRefExoticComponent<RadixMenubar.MenubarSeparatorProps & react.RefAttributes<HTMLDivElement>>;
1083
1268
 
1269
+ /**
1270
+ * NavBar — primary app navigation. The same component renders either as a
1271
+ * horizontal top bar (`orientation="horizontal"`) or as a vertical side rail
1272
+ * (`orientation="vertical"`); both layouts are driven by the same `items`
1273
+ * tree. Items can carry nested `children` to produce dropdowns on
1274
+ * horizontal and expand-collapse groups on vertical. Below `md` the bar
1275
+ * collapses to a hamburger that opens a Drawer rendering the items
1276
+ * vertically (set `responsive={false}` to opt out).
1277
+ *
1278
+ * Active state can be controlled (`value` + `onValueChange`) or uncontrolled
1279
+ * (`defaultValue`). Items with an `href` render as anchors; otherwise as
1280
+ * buttons that fire `onValueChange`.
1281
+ */
1282
+ interface NavBarItem {
1283
+ /** Stable identifier — what `value` / `onValueChange` reference. */
1284
+ id: string;
1285
+ label: ReactNode;
1286
+ /** Optional left-of-label icon node. */
1287
+ icon?: ReactNode;
1288
+ /** When set, item renders as an `<a>`; otherwise as a `<button>`. */
1289
+ href?: string;
1290
+ /** Trailing badge text. */
1291
+ badge?: ReactNode;
1292
+ disabled?: boolean;
1293
+ /** Nested items — dropdowns on horizontal, expand-groups on vertical. */
1294
+ children?: NavBarItem[];
1295
+ }
1296
+ type NavBarOrientation = 'horizontal' | 'vertical';
1297
+ interface NavBarProps extends Omit<HTMLAttributes<HTMLElement>, 'defaultValue' | 'title'> {
1298
+ /** Layout direction. Default `'horizontal'`. */
1299
+ orientation?: NavBarOrientation;
1300
+ /** Item tree driving the bar. */
1301
+ items: NavBarItem[];
1302
+ /**
1303
+ * Brand / logo slot rendered at the start. When `responsive` is `true`,
1304
+ * `brand` also seeds the mobile Drawer's accessible name, so it should
1305
+ * include text — e.g. `<><Logo /> ShipIt</>` rather than `<Logo />` alone.
1306
+ * Falls back to `'Navigation'` when omitted.
1307
+ */
1308
+ brand?: ReactNode;
1309
+ /** Trailing slot for secondary actions (avatar, settings, theme toggle, …). */
1310
+ actions?: ReactNode;
1311
+ /** Controlled active item id. */
1312
+ value?: string;
1313
+ /** Uncontrolled initial active item id. */
1314
+ defaultValue?: string;
1315
+ /** Fired when an item is activated. */
1316
+ onValueChange?: (id: string) => void;
1317
+ /** Pixel width of the vertical rail. Default 240. */
1318
+ width?: number;
1319
+ /** Collapse to a hamburger drawer below `md`. Default `true`. */
1320
+ responsive?: boolean;
1321
+ }
1322
+ declare const NavBar: react.ForwardRefExoticComponent<NavBarProps & react.RefAttributes<HTMLElement>>;
1323
+
1084
1324
  /**
1085
1325
  * Pagination — page selector for paginated lists/tables. Renders prev/next
1086
1326
  * arrows plus a compact range of numbered pages. Use `siblings` to control how
@@ -1109,7 +1349,7 @@ declare const trackStyles: (props?: ({
1109
1349
  size?: "sm" | "md" | "lg" | null | undefined;
1110
1350
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1111
1351
  declare const fillStyles: (props?: ({
1112
- tone?: "ok" | "warn" | "err" | "accent" | null | undefined;
1352
+ tone?: "err" | "ok" | "warn" | "accent" | null | undefined;
1113
1353
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1114
1354
  interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'>, VariantProps<typeof trackStyles>, VariantProps<typeof fillStyles> {
1115
1355
  /** Numeric progress, 0..max. Ignored when `indeterminate`. */
@@ -1160,7 +1400,7 @@ interface SidebarProps extends HTMLAttributes<HTMLElement> {
1160
1400
  width?: number;
1161
1401
  }
1162
1402
  declare const Sidebar: react.ForwardRefExoticComponent<SidebarProps & react.RefAttributes<HTMLElement>>;
1163
- interface NavItemProps extends HTMLAttributes<HTMLAnchorElement> {
1403
+ type NavItemBaseProps = {
1164
1404
  /** Left-side glyph or icon node. */
1165
1405
  icon?: ReactNode;
1166
1406
  /** Visible label. */
@@ -1169,17 +1409,39 @@ interface NavItemProps extends HTMLAttributes<HTMLAnchorElement> {
1169
1409
  active?: boolean;
1170
1410
  /** Optional trailing badge text. */
1171
1411
  badge?: ReactNode;
1172
- /** Optional href — when omitted, the row is rendered as a button. */
1173
- href?: string;
1174
1412
  /** Disabled / read-only display. */
1175
1413
  disabled?: boolean;
1176
- }
1177
- declare const NavItem: react.ForwardRefExoticComponent<NavItemProps & react.RefAttributes<HTMLAnchorElement>>;
1414
+ };
1415
+ type NavItemProps = NavItemBaseProps & (({
1416
+ href: string;
1417
+ } & Omit<HTMLAttributes<HTMLAnchorElement>, keyof NavItemBaseProps>) | ({
1418
+ href?: undefined;
1419
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof NavItemBaseProps>));
1420
+ declare const NavItem: react.ForwardRefExoticComponent<NavItemProps & react.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
1178
1421
  interface NavSectionProps extends HTMLAttributes<HTMLDivElement> {
1179
1422
  /** Eyebrow heading. Rendered uppercase, mono, dim. */
1180
1423
  label: ReactNode;
1424
+ /** Optional leading glyph or icon node next to the eyebrow. */
1425
+ icon?: ReactNode;
1181
1426
  /** Optional trailing element next to the heading (e.g., a `+` add affordance). */
1182
1427
  action?: ReactNode;
1428
+ /**
1429
+ * When true, the eyebrow becomes a button that toggles the body. The body
1430
+ * is hidden when closed. Default `false` — the eyebrow stays static.
1431
+ */
1432
+ collapsible?: boolean;
1433
+ /** Uncontrolled initial open state. Default `true`. Ignored when `open` is provided. */
1434
+ defaultOpen?: boolean;
1435
+ /** Controlled open state. */
1436
+ open?: boolean;
1437
+ /** Fires when the open state changes. */
1438
+ onOpenChange?: (open: boolean) => void;
1439
+ /**
1440
+ * Pixel indent applied to the body. Useful when this section nests other
1441
+ * sections — the indent visually anchors children to the eyebrow above.
1442
+ * A subtle left rail is drawn alongside the indent. Default `0`.
1443
+ */
1444
+ indent?: number;
1183
1445
  }
1184
1446
  declare const NavSection: react.ForwardRefExoticComponent<NavSectionProps & react.RefAttributes<HTMLDivElement>>;
1185
1447
 
@@ -1209,10 +1471,7 @@ interface SparklineProps extends Omit<SVGAttributes<SVGSVGElement>, 'children' |
1209
1471
  }
1210
1472
  declare const Sparkline: react.ForwardRefExoticComponent<SparklineProps & react.RefAttributes<SVGSVGElement>>;
1211
1473
 
1212
- /**
1213
- * Spinner — circular loading indicator. Three sizes; respects
1214
- * `prefers-reduced-motion` via the global motion override in `tokens.css`.
1215
- */
1474
+ /** Spinner — circular loading indicator. Three sizes. */
1216
1475
  declare const sizes: {
1217
1476
  readonly sm: {
1218
1477
  readonly box: "h-3 w-3";
@@ -1239,13 +1498,22 @@ declare const Spinner: react.ForwardRefExoticComponent<SpinnerProps & react.RefA
1239
1498
  * upcoming state from the `current` index so the consumer just passes labels.
1240
1499
  */
1241
1500
  type StepState = 'done' | 'current' | 'upcoming';
1242
- interface StepperProps extends HTMLAttributes<HTMLDivElement> {
1243
- /** Ordered step labels. */
1244
- steps: ReadonlyArray<string>;
1501
+ /** A step in a Stepper. Pass either a bare string label or a `{ id?, label }` object. */
1502
+ type StepperStep = string | {
1503
+ id?: string;
1504
+ label: string;
1505
+ };
1506
+ interface StepperProps extends HTMLAttributes<HTMLOListElement> {
1507
+ /**
1508
+ * Ordered steps. A step may be either a bare string label or an object
1509
+ * `{ id?, label }`. Use `id` to give React a stable key when two steps
1510
+ * share a label (e.g. ["Plan", "Plan Review"]).
1511
+ */
1512
+ steps: ReadonlyArray<StepperStep>;
1245
1513
  /** Zero-based index of the current step. Steps before are `done`, after are `upcoming`. */
1246
1514
  current: number;
1247
1515
  }
1248
- declare const Stepper: react.ForwardRefExoticComponent<StepperProps & react.RefAttributes<HTMLDivElement>>;
1516
+ declare const Stepper: react.ForwardRefExoticComponent<StepperProps & react.RefAttributes<HTMLOListElement>>;
1249
1517
 
1250
1518
  /**
1251
1519
  * Tabs — two visual styles built on Radix Tabs.
@@ -1314,15 +1582,6 @@ interface TopbarProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
1314
1582
  }
1315
1583
  declare const Topbar: react.ForwardRefExoticComponent<TopbarProps & react.RefAttributes<HTMLElement>>;
1316
1584
 
1317
- /**
1318
- * Tree — recursive expandable list. Pass a nested `items` tree; the component
1319
- * handles expand/collapse and selection state. Both can be uncontrolled
1320
- * (`defaultExpanded` / `defaultSelected`) or controlled (`expanded` /
1321
- * `selected` + change callbacks).
1322
- *
1323
- * Implements the simple `aria-tree` pattern: `role="tree"` on the container,
1324
- * `role="treeitem"` on each row, `aria-level`, `aria-expanded`, `aria-selected`.
1325
- */
1326
1585
  interface TreeItem {
1327
1586
  id: string;
1328
1587
  label: ReactNode;
@@ -1340,14 +1599,14 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onSelect'> {
1340
1599
  /** Default expanded ids (uncontrolled). */
1341
1600
  defaultExpanded?: ReadonlyArray<string>;
1342
1601
  /** Fires with the new expanded set whenever a node toggles. */
1343
- onExpandedChange?: (expanded: Set<string>) => void;
1602
+ onExpandedChange?: (expanded: ReadonlySet<string>) => void;
1344
1603
  /** Controlled selected node id. */
1345
- selected?: string;
1604
+ value?: string;
1346
1605
  /** Default selected (uncontrolled). */
1347
- defaultSelected?: string;
1606
+ defaultValue?: string;
1348
1607
  /** Fires with the selected node id. */
1349
- onSelect?: (id: string) => void;
1608
+ onValueChange?: (id: string) => void;
1350
1609
  }
1351
1610
  declare const Tree: react.ForwardRefExoticComponent<TreeProps & react.RefAttributes<HTMLUListElement>>;
1352
1611
 
1353
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, type AlertDialogProps, AlertDialogRoot, AlertDialogTrigger, type AlertProps, type AlertVariant, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, type BannerVariant, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, ContextMenu, ContextMenuContent, ContextMenuItem, type ContextMenuItemProps, ContextMenuPortal, ContextMenuRoot, ContextMenuSeparator, ContextMenuTrigger, Crumb, type CrumbProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogOverlay, DialogPortal, type DialogProps, DialogRoot, DialogTrigger, Dots, type DotsProps, Drawer, type DrawerProps, type DrawerSide, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FAB, type FABProps, Field, type FieldProps, FileChip, type FileChipProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, MenuCheckboxItem, MenuItem, type MenuItemProps, MenuSeparator, Menubar, MenubarContent, MenubarItem, type MenubarItemProps, MenubarMenu, MenubarSeparator, MenubarTrigger, NavItem, type NavItemProps, NavSection, type NavSectionProps, type NormalizedOption, OTP, type OTPHandle, type OTPProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Progress, type ProgressProps, RadialProgress, type RadialProgressProps, type RadialTone, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectTrigger, SelectValue, Sheet, type SheetProps, Sidebar, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Sparkline, type SparklineProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, StatCard, type StatCardProps, type StatTrend, StatusDot, type StatusDotProps, type StatusState, type StepState, Stepper, type StepperProps, Switch, type SwitchProps, Tab, type TabProps, Tabs, TabsContent, TabsList, type TabsProps, type TabsVariantProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, Timeline, type TimelineEvent, type TimelineEventTone, TimelineItem, type TimelineItemProps, type TimelineProps, ToastCard, type ToastInput, ToastProvider, type ToastVariant, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, Topbar, type TopbarProps, Tree, type TreeItem, type TreeProps, type UseControllableStateProps, type UseKeyboardListOptions, type UseKeyboardListResult, badgeStyles, buttonStyles, cardStyles, cn, filterCommandItems, iconButtonStyles, useControllableState, useDisclosure, useEscape, useKeyboardList, useOutsideClick, useTheme, useToast };
1612
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, type AlertDialogProps, AlertDialogRoot, AlertDialogTrigger, type AlertProps, type AlertTone, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardLink, type CardLinkProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, ContextMenu, ContextMenuContent, ContextMenuItem, type ContextMenuItemProps, ContextMenuPortal, ContextMenuRoot, ContextMenuSeparator, ContextMenuTrigger, Crumb, type CrumbProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogOverlay, DialogPortal, type DialogProps, DialogRoot, DialogTrigger, Dots, type DotsProps, Drawer, type DrawerProps, type DrawerSide, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuTrigger, Dropzone, type DropzoneProps, EmptyState, type EmptyStateProps, FAB, type FABProps, Field, type FieldProps, FileChip, type FileChipProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, MenuCheckboxItem, MenuItem, type MenuItemProps, MenuSeparator, Menubar, MenubarContent, MenubarItem, type MenubarItemProps, MenubarMenu, MenubarSeparator, MenubarTrigger, NavBar, type NavBarItem, type NavBarOrientation, type NavBarProps, NavItem, type NavItemProps, NavSection, type NavSectionProps, type NormalizedOption, OTP, type OTPHandle, type OTPProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Progress, type ProgressProps, RadialProgress, type RadialProgressProps, type RadialTone, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectTrigger, SelectValue, Sheet, type SheetProps, Sidebar, type SidebarProps, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, Slider, type SliderProps, Sparkline, type SparklineProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, StatCard, type StatCardProps, type StatTrend, StatusDot, type StatusDotProps, type StatusState, type StepState, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Tab, type TabProps, Tabs, TabsContent, TabsList, type TabsProps, type TabsVariantProps, Tag, type TagProps, Textarea, type TextareaProps, type Theme, Timeline, type TimelineEvent, type TimelineEventTone, TimelineItem, type TimelineItemProps, type TimelineProps, ToastCard, type ToastInput, ToastProvider, type ToastVariant, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, Topbar, type TopbarProps, Tree, type TreeItem, type TreeProps, type UseControllableStateProps, type UseKeyboardListOptions, type UseKeyboardListResult, badgeStyles, buttonStyles, cardStyles, cn, filterCommandItems, iconButtonStyles, useControllableState, useDisclosure, useEscape, useIsomorphicLayoutEffect, useKeyboardList, useOutsideClick, useTheme, useToast };