@ship-it-ui/ui 0.0.3 → 0.0.5
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.cjs +1504 -630
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +436 -28
- package/dist/index.d.ts +436 -28
- package/dist/index.js +1487 -619
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/src/styles/globals.css +26 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
export { ClassValue } from 'clsx';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, LabelHTMLAttributes, FC, SVGAttributes } from 'react';
|
|
4
|
+
import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, Ref, LabelHTMLAttributes, FC, SVGAttributes, MouseEventHandler } from 'react';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
@@ -154,6 +154,7 @@ declare function useTheme(): {
|
|
|
154
154
|
declare const buttonStyles: (props?: ({
|
|
155
155
|
variant?: "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" | "link" | null | undefined;
|
|
156
156
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
157
|
+
density?: "comfortable" | "touch" | null | undefined;
|
|
157
158
|
fullWidth?: boolean | null | undefined;
|
|
158
159
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
159
160
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonStyles> {
|
|
@@ -174,6 +175,7 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
174
175
|
declare const iconButtonStyles: (props?: ({
|
|
175
176
|
variant?: "primary" | "secondary" | "ghost" | "outline" | "destructive" | "success" | null | undefined;
|
|
176
177
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
178
|
+
density?: "comfortable" | "touch" | null | undefined;
|
|
177
179
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
178
180
|
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof iconButtonStyles> {
|
|
179
181
|
/** The glyph or icon node to render. Pure decoration — set `aria-label` for screen readers. */
|
|
@@ -248,6 +250,11 @@ declare const FAB: react.ForwardRefExoticComponent<FABProps & react.RefAttribute
|
|
|
248
250
|
interface CheckboxProps extends Omit<RadixCheckbox.CheckboxProps, 'asChild' | 'children'> {
|
|
249
251
|
/** Optional inline label rendered to the right of the box. */
|
|
250
252
|
label?: ReactNode;
|
|
253
|
+
/**
|
|
254
|
+
* `'comfortable'` (default) renders the desktop checkbox. `'touch'` bumps the
|
|
255
|
+
* box to 22×22 inside a 44pt-min row so the whole label is tappable.
|
|
256
|
+
*/
|
|
257
|
+
density?: 'comfortable' | 'touch';
|
|
251
258
|
}
|
|
252
259
|
/**
|
|
253
260
|
* Tri-state checkbox. Set `checked="indeterminate"` for the dash-mark state used
|
|
@@ -287,6 +294,7 @@ declare function Field({ label, hint, error, required, className, children, ...p
|
|
|
287
294
|
declare const inputWrapperStyles: (props?: ({
|
|
288
295
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
289
296
|
tone?: "default" | "err" | null | undefined;
|
|
297
|
+
density?: "comfortable" | "touch" | null | undefined;
|
|
290
298
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
291
299
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputWrapperStyles> {
|
|
292
300
|
/** Element rendered to the left of the input (an `IconGlyph`, `@`, etc.). */
|
|
@@ -305,6 +313,12 @@ interface SearchInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
305
313
|
shortcut?: string;
|
|
306
314
|
/** Pixel width or any CSS length. Defaults to `360px`. */
|
|
307
315
|
width?: number | string;
|
|
316
|
+
/**
|
|
317
|
+
* `'comfortable'` (default) renders the desktop 36px-tall pill. `'touch'`
|
|
318
|
+
* bumps to 44pt for thumb tapping and removes the kbd shortcut by default
|
|
319
|
+
* (consumers can still pass `shortcut` explicitly).
|
|
320
|
+
*/
|
|
321
|
+
density?: 'comfortable' | 'touch';
|
|
308
322
|
}
|
|
309
323
|
/**
|
|
310
324
|
* The hero search field — taller than a regular Input, with a leading magnifying-glass
|
|
@@ -432,6 +446,11 @@ interface SwitchProps extends Omit<RadixSwitch.SwitchProps, 'asChild' | 'childre
|
|
|
432
446
|
label?: ReactNode;
|
|
433
447
|
/** Visual size. Default `md`. */
|
|
434
448
|
size?: 'sm' | 'md';
|
|
449
|
+
/**
|
|
450
|
+
* `'comfortable'` (default) renders the desktop switch. `'touch'` swaps to the
|
|
451
|
+
* mobile track/thumb dimensions (50×30) for thumb-friendly toggling.
|
|
452
|
+
*/
|
|
453
|
+
density?: 'comfortable' | 'touch';
|
|
435
454
|
}
|
|
436
455
|
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
437
456
|
|
|
@@ -494,6 +513,7 @@ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttri
|
|
|
494
513
|
declare const cardStyles: (props?: ({
|
|
495
514
|
variant?: "ghost" | "default" | "elevated" | null | undefined;
|
|
496
515
|
interactive?: boolean | null | undefined;
|
|
516
|
+
density?: "comfortable" | "touch" | null | undefined;
|
|
497
517
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
498
518
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof cardStyles> {
|
|
499
519
|
/** Render a header row with this title (and optional `actions`). */
|
|
@@ -577,6 +597,11 @@ interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
577
597
|
* Mirrors the `Tag` API — pass `onRemove` and the X is rendered automatically.
|
|
578
598
|
*/
|
|
579
599
|
onRemove?: () => void;
|
|
600
|
+
/**
|
|
601
|
+
* `'comfortable'` (default) renders the desktop chip at 26px tall.
|
|
602
|
+
* `'touch'` swaps to a roomier 32px chip with larger text for mobile filter strips.
|
|
603
|
+
*/
|
|
604
|
+
density?: 'comfortable' | 'touch';
|
|
580
605
|
children: ReactNode;
|
|
581
606
|
}
|
|
582
607
|
/**
|
|
@@ -593,6 +618,37 @@ type KbdProps = HTMLAttributes<HTMLElement>;
|
|
|
593
618
|
*/
|
|
594
619
|
declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttributes<HTMLElement>>;
|
|
595
620
|
|
|
621
|
+
/**
|
|
622
|
+
* ScrollArea — token-styled scrollbar primitive built on
|
|
623
|
+
* `@radix-ui/react-scroll-area`. Wraps a viewport with custom scrollbars that
|
|
624
|
+
* match the design tokens (`--color-text-muted` thumb on `--color-panel-2`
|
|
625
|
+
* track) and behave consistently across platforms.
|
|
626
|
+
*
|
|
627
|
+
* Defaults to `type="hover"` so scrollbars fade in only when the pointer is
|
|
628
|
+
* over the area, matching the system feel without the OS-default chrome.
|
|
629
|
+
*/
|
|
630
|
+
type ScrollAreaType = 'auto' | 'always' | 'scroll' | 'hover';
|
|
631
|
+
interface ScrollAreaProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onScroll' | 'dir'> {
|
|
632
|
+
/** Scrollbar visibility behavior. Default `'hover'`. */
|
|
633
|
+
type?: ScrollAreaType;
|
|
634
|
+
/** Which scrollbars to render. Default `'vertical'`. */
|
|
635
|
+
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
636
|
+
/** Time in ms before scrollbar hides after the last interaction (auto/scroll/hover). */
|
|
637
|
+
scrollHideDelay?: number;
|
|
638
|
+
/** Class applied to the inner viewport rather than the outer root. */
|
|
639
|
+
viewportClassName?: string;
|
|
640
|
+
/**
|
|
641
|
+
* Ref to the inner viewport (the scrollable element). Useful when a consumer
|
|
642
|
+
* wants to drive scroll position imperatively without losing the outer-root
|
|
643
|
+
* ref forwarded as `ref`.
|
|
644
|
+
*/
|
|
645
|
+
viewportRef?: Ref<HTMLDivElement>;
|
|
646
|
+
/** Document direction for RTL handling. */
|
|
647
|
+
dir?: 'ltr' | 'rtl';
|
|
648
|
+
children?: ReactNode;
|
|
649
|
+
}
|
|
650
|
+
declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & react.RefAttributes<HTMLDivElement>>;
|
|
651
|
+
|
|
596
652
|
declare const skeletonStyles: (props?: ({
|
|
597
653
|
shape?: "circle" | "line" | "block" | null | undefined;
|
|
598
654
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -712,19 +768,39 @@ interface DialogProps extends RadixDialog.DialogProps {
|
|
|
712
768
|
}
|
|
713
769
|
declare function Dialog({ title, description, footer, width, children, ...rootProps }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
714
770
|
|
|
715
|
-
type DrawerSide = 'left' | 'right';
|
|
771
|
+
type DrawerSide = 'left' | 'right' | 'bottom';
|
|
716
772
|
interface DrawerProps extends RadixDialog.DialogProps {
|
|
717
773
|
/** Side the drawer slides in from. */
|
|
718
774
|
side?: DrawerSide;
|
|
719
775
|
/** Title rendered in the drawer header (with built-in close button). */
|
|
720
776
|
title?: ReactNode;
|
|
721
|
-
/**
|
|
777
|
+
/**
|
|
778
|
+
* Width override. Defaults to 420 for left/right sides; ignored for `bottom`
|
|
779
|
+
* (a bottom sheet always spans the full viewport width).
|
|
780
|
+
*/
|
|
722
781
|
width?: number | string;
|
|
782
|
+
/**
|
|
783
|
+
* Height override for the `bottom` side. Pass a number (px) or any CSS length
|
|
784
|
+
* (e.g. `'85vh'`). Defaults to `'85vh'` — leaves a 15vh peek of the underlying
|
|
785
|
+
* surface, matching iOS bottom-sheet conventions.
|
|
786
|
+
*/
|
|
787
|
+
height?: number | string;
|
|
788
|
+
/**
|
|
789
|
+
* Show the drag-handle pill at the top of the sheet. Defaults to `true` for
|
|
790
|
+
* `side="bottom"`, ignored for left/right. The handle is visual only — full
|
|
791
|
+
* gesture-driven dismissal is left to consumer code (Radix Dialog already
|
|
792
|
+
* handles ESC, overlay click, and focus trap).
|
|
793
|
+
*/
|
|
794
|
+
handle?: boolean;
|
|
723
795
|
children?: ReactNode;
|
|
724
796
|
}
|
|
725
797
|
/**
|
|
726
798
|
* Side-panel overlay. Same focus-trap + ESC + backdrop semantics as Dialog,
|
|
727
799
|
* just slid in from the side.
|
|
800
|
+
*
|
|
801
|
+
* `side="bottom"` produces a mobile bottom sheet: full-width, rounded top
|
|
802
|
+
* corners (`--radius-m-sheet`), slide-up animation, and an optional drag
|
|
803
|
+
* handle (`handle`, defaults to `true`).
|
|
728
804
|
*/
|
|
729
805
|
declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<HTMLDivElement>>;
|
|
730
806
|
|
|
@@ -1245,6 +1321,136 @@ interface FileChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>
|
|
|
1245
1321
|
}
|
|
1246
1322
|
declare const FileChip: react.ForwardRefExoticComponent<FileChipProps & react.RefAttributes<HTMLDivElement>>;
|
|
1247
1323
|
|
|
1324
|
+
/**
|
|
1325
|
+
* FilterPanel — multi-facet checkbox filter panel. Pass a `facets` array
|
|
1326
|
+
* describing each facet (label, options, optional collapsibility); the panel
|
|
1327
|
+
* renders a header with a reset action, then each facet as a labeled
|
|
1328
|
+
* checkbox group. Selections are emitted as
|
|
1329
|
+
* `Record<facetId, readonly string[]>` and supported in both controlled and
|
|
1330
|
+
* uncontrolled modes — mirroring `Slider` and `NavBar`.
|
|
1331
|
+
*
|
|
1332
|
+
* Reset both invokes the optional `onReset` callback and emits an empty
|
|
1333
|
+
* selection through `onValueChange`, so consumers can drive either signal.
|
|
1334
|
+
*/
|
|
1335
|
+
interface FilterFacetOption {
|
|
1336
|
+
value: string;
|
|
1337
|
+
label: ReactNode;
|
|
1338
|
+
}
|
|
1339
|
+
interface FilterFacet {
|
|
1340
|
+
id: string;
|
|
1341
|
+
label: ReactNode;
|
|
1342
|
+
options: ReadonlyArray<FilterFacetOption>;
|
|
1343
|
+
/** Whether the group can collapse. Default `true`. */
|
|
1344
|
+
collapsible?: boolean;
|
|
1345
|
+
/** Initial open state for collapsible groups. Default `true`. */
|
|
1346
|
+
defaultOpen?: boolean;
|
|
1347
|
+
}
|
|
1348
|
+
type FilterPanelValue = Record<string, ReadonlyArray<string>>;
|
|
1349
|
+
interface FilterPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onReset' | 'defaultValue' | 'title'> {
|
|
1350
|
+
facets: ReadonlyArray<FilterFacet>;
|
|
1351
|
+
/** Controlled selection map keyed by facet id. */
|
|
1352
|
+
value?: FilterPanelValue;
|
|
1353
|
+
/** Uncontrolled initial selection map. Default `{}`. */
|
|
1354
|
+
defaultValue?: FilterPanelValue;
|
|
1355
|
+
/** Fires whenever the selection changes — including reset. */
|
|
1356
|
+
onValueChange?: (next: FilterPanelValue) => void;
|
|
1357
|
+
/** Fired when the reset action is invoked, alongside `onValueChange({})`. */
|
|
1358
|
+
onReset?: () => void;
|
|
1359
|
+
/**
|
|
1360
|
+
* Optional per-option counts shown in a trailing pill. Shape:
|
|
1361
|
+
* `{ [facetId]: { [optionValue]: number } }`.
|
|
1362
|
+
*/
|
|
1363
|
+
counts?: Record<string, Record<string, number>>;
|
|
1364
|
+
/** Override the header title. Default `'Filter'`. */
|
|
1365
|
+
title?: ReactNode;
|
|
1366
|
+
/** Override the reset button label. Default `'Reset'`. */
|
|
1367
|
+
resetLabel?: ReactNode;
|
|
1368
|
+
}
|
|
1369
|
+
declare const FilterPanel: react.ForwardRefExoticComponent<FilterPanelProps & react.RefAttributes<HTMLDivElement>>;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* RadialProgress — circular SVG progress ring. Renders the percent label in the
|
|
1373
|
+
* center by default; pass `children` to override (e.g., a glyph or a count).
|
|
1374
|
+
*
|
|
1375
|
+
* Tones: accent (default) and ok (auto-applied when value === max).
|
|
1376
|
+
*/
|
|
1377
|
+
type RadialTone = 'accent' | 'ok' | 'warn' | 'err';
|
|
1378
|
+
interface RadialProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
1379
|
+
/** Current value, 0..max. */
|
|
1380
|
+
value: number;
|
|
1381
|
+
/** Maximum value. Default 100. */
|
|
1382
|
+
max?: number;
|
|
1383
|
+
/** Pixel size of the SVG. Default 64. */
|
|
1384
|
+
size?: number;
|
|
1385
|
+
/** Stroke width. Default 4. */
|
|
1386
|
+
thickness?: number;
|
|
1387
|
+
/** Color tone. Auto-flips to `ok` on completion unless explicitly set. */
|
|
1388
|
+
tone?: RadialTone;
|
|
1389
|
+
/** Replaces the centered percent label. */
|
|
1390
|
+
children?: ReactNode;
|
|
1391
|
+
/** Accessible label. Falls back to `${pct}%`. */
|
|
1392
|
+
'aria-label'?: string;
|
|
1393
|
+
}
|
|
1394
|
+
declare const RadialProgress: react.ForwardRefExoticComponent<RadialProgressProps & react.RefAttributes<HTMLDivElement>>;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* HealthScore — `RadialProgress` + delta indicator + optional breakdown
|
|
1398
|
+
* tooltip. The shape generalizes recurring product surfaces like service
|
|
1399
|
+
* health, deployment confidence, and graph health.
|
|
1400
|
+
*
|
|
1401
|
+
* Delta sign drives the arrow direction and tone (positive = ok, negative =
|
|
1402
|
+
* err) unless an explicit `tone` is set. When a `breakdown` is supplied, the
|
|
1403
|
+
* score wraps in a `HoverCard` that reveals the per-bucket contributions.
|
|
1404
|
+
*/
|
|
1405
|
+
interface HealthScoreBreakdownEntry {
|
|
1406
|
+
label: ReactNode;
|
|
1407
|
+
value: number;
|
|
1408
|
+
/** Tone for the value text. Defaults to inheriting the parent score tone. */
|
|
1409
|
+
tone?: RadialTone;
|
|
1410
|
+
}
|
|
1411
|
+
interface HealthScoreProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1412
|
+
/** Current value, 0..max. */
|
|
1413
|
+
value: number;
|
|
1414
|
+
/** Maximum value. Default 100. */
|
|
1415
|
+
max?: number;
|
|
1416
|
+
/**
|
|
1417
|
+
* Signed change vs. the previous period. Positive draws an up-arrow + ok
|
|
1418
|
+
* tone, negative draws a down-arrow + err tone. Pass `0` to render a flat
|
|
1419
|
+
* indicator.
|
|
1420
|
+
*/
|
|
1421
|
+
delta?: number;
|
|
1422
|
+
/** Label rendered under the score. */
|
|
1423
|
+
label?: ReactNode;
|
|
1424
|
+
/** Optional per-bucket contributions revealed in a HoverCard. */
|
|
1425
|
+
breakdown?: ReadonlyArray<HealthScoreBreakdownEntry>;
|
|
1426
|
+
/** Pixel size for the RadialProgress. Default 72. */
|
|
1427
|
+
size?: number;
|
|
1428
|
+
/** Color tone for the ring. Auto-derived when omitted. */
|
|
1429
|
+
tone?: RadialTone;
|
|
1430
|
+
/** Accessible label for the score. Defaults to `${pct}% health`. */
|
|
1431
|
+
'aria-label'?: string;
|
|
1432
|
+
}
|
|
1433
|
+
declare const HealthScore: react.ForwardRefExoticComponent<HealthScoreProps & react.RefAttributes<HTMLDivElement>>;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* LargeTitle — iOS-style oversized headline block. Renders an optional eyebrow
|
|
1437
|
+
* (small uppercase mono label) above a 30px headline, with an optional trailing
|
|
1438
|
+
* slot (typically an avatar or icon button) on the right.
|
|
1439
|
+
*
|
|
1440
|
+
* Place at the top of a scrolling screen. Pair with `<Topbar density="touch" />`
|
|
1441
|
+
* for the scroll-revealing pattern: hide the Topbar title until the LargeTitle
|
|
1442
|
+
* scrolls under the bar.
|
|
1443
|
+
*/
|
|
1444
|
+
interface LargeTitleProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1445
|
+
/** Headline text. */
|
|
1446
|
+
title: ReactNode;
|
|
1447
|
+
/** Optional eyebrow label rendered above the title. Small, uppercase, mono. */
|
|
1448
|
+
eyebrow?: ReactNode;
|
|
1449
|
+
/** Optional right-aligned slot (avatar, settings button, etc.). */
|
|
1450
|
+
trailing?: ReactNode;
|
|
1451
|
+
}
|
|
1452
|
+
declare const LargeTitle: react.ForwardRefExoticComponent<LargeTitleProps & react.RefAttributes<HTMLElement>>;
|
|
1453
|
+
|
|
1248
1454
|
/**
|
|
1249
1455
|
* Menubar — desktop-style horizontal menu strip (File, Edit, View, …) built on
|
|
1250
1456
|
* Radix Menubar. Owns ARIA + keyboard semantics; ShipIt owns styling.
|
|
@@ -1321,6 +1527,37 @@ interface NavBarProps extends Omit<HTMLAttributes<HTMLElement>, 'defaultValue' |
|
|
|
1321
1527
|
}
|
|
1322
1528
|
declare const NavBar: react.ForwardRefExoticComponent<NavBarProps & react.RefAttributes<HTMLElement>>;
|
|
1323
1529
|
|
|
1530
|
+
/**
|
|
1531
|
+
* OnboardingChecklist — list of getting-started tasks driven by remote
|
|
1532
|
+
* progress. Each item has a `status` (`pending` / `in-progress` / `done`)
|
|
1533
|
+
* that decides its dot color and label tone, plus an optional `action` slot
|
|
1534
|
+
* (typically a `Button`) rendered on the right.
|
|
1535
|
+
*
|
|
1536
|
+
* The header shows aggregate progress as a `Progress` bar; pass
|
|
1537
|
+
* `progressLabel` to override the default `"{n} of {m} complete"` text.
|
|
1538
|
+
*/
|
|
1539
|
+
type OnboardingItemStatus = 'pending' | 'in-progress' | 'done';
|
|
1540
|
+
interface OnboardingItem {
|
|
1541
|
+
id: string;
|
|
1542
|
+
label: ReactNode;
|
|
1543
|
+
description?: ReactNode;
|
|
1544
|
+
status: OnboardingItemStatus;
|
|
1545
|
+
/** Trailing call-to-action (typically a `Button`). */
|
|
1546
|
+
action?: ReactNode;
|
|
1547
|
+
}
|
|
1548
|
+
interface OnboardingChecklistProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1549
|
+
items: ReadonlyArray<OnboardingItem>;
|
|
1550
|
+
/** Fires when an item row is clicked. The whole row becomes clickable when supplied. */
|
|
1551
|
+
onItemClick?: (id: string) => void;
|
|
1552
|
+
/** Header heading. Default `'Get started'`. */
|
|
1553
|
+
title?: ReactNode;
|
|
1554
|
+
/** Override the progress label rendered next to the bar. */
|
|
1555
|
+
progressLabel?: ReactNode;
|
|
1556
|
+
/** Hide the aggregate progress bar. */
|
|
1557
|
+
hideProgress?: boolean;
|
|
1558
|
+
}
|
|
1559
|
+
declare const OnboardingChecklist: react.ForwardRefExoticComponent<OnboardingChecklistProps & react.RefAttributes<HTMLElement>>;
|
|
1560
|
+
|
|
1324
1561
|
/**
|
|
1325
1562
|
* Pagination — page selector for paginated lists/tables. Renders prev/next
|
|
1326
1563
|
* arrows plus a compact range of numbered pages. Use `siblings` to control how
|
|
@@ -1366,29 +1603,23 @@ interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'>, Va
|
|
|
1366
1603
|
declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
|
|
1367
1604
|
|
|
1368
1605
|
/**
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
1606
|
+
* PullToRefresh — controlled visual indicator for the pull-to-refresh
|
|
1607
|
+
* interaction. Renders the rotating arrow + state label that appears at the
|
|
1608
|
+
* top of a scrolling list as the user pulls.
|
|
1371
1609
|
*
|
|
1372
|
-
*
|
|
1610
|
+
* This is the *visual* primitive only. The gesture (touch tracking, threshold
|
|
1611
|
+
* detection, async refresh) is left to the consumer because that wiring is
|
|
1612
|
+
* app-specific (router refresh, query invalidation, route reload, etc.). Pass
|
|
1613
|
+
* the current `state` and the indicator updates to match.
|
|
1373
1614
|
*/
|
|
1374
|
-
type
|
|
1375
|
-
interface
|
|
1376
|
-
/** Current
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
|
|
1380
|
-
/** Pixel size of the SVG. Default 64. */
|
|
1381
|
-
size?: number;
|
|
1382
|
-
/** Stroke width. Default 4. */
|
|
1383
|
-
thickness?: number;
|
|
1384
|
-
/** Color tone. Auto-flips to `ok` on completion unless explicitly set. */
|
|
1385
|
-
tone?: RadialTone;
|
|
1386
|
-
/** Replaces the centered percent label. */
|
|
1387
|
-
children?: ReactNode;
|
|
1388
|
-
/** Accessible label. Falls back to `${pct}%`. */
|
|
1389
|
-
'aria-label'?: string;
|
|
1615
|
+
type PullToRefreshState = 'idle' | 'pulling' | 'ready' | 'loading';
|
|
1616
|
+
interface PullToRefreshProps extends HTMLAttributes<HTMLDivElement> {
|
|
1617
|
+
/** Current state. Drive this from your gesture handler. */
|
|
1618
|
+
state?: PullToRefreshState;
|
|
1619
|
+
/** Override the default state label. */
|
|
1620
|
+
label?: ReactNode;
|
|
1390
1621
|
}
|
|
1391
|
-
declare const
|
|
1622
|
+
declare const PullToRefresh: react.ForwardRefExoticComponent<PullToRefreshProps & react.RefAttributes<HTMLDivElement>>;
|
|
1392
1623
|
|
|
1393
1624
|
/**
|
|
1394
1625
|
* Sidebar — primary app navigation column. A simple flex column with the
|
|
@@ -1515,6 +1746,43 @@ interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
|
1515
1746
|
}
|
|
1516
1747
|
declare const Stepper: react.ForwardRefExoticComponent<StepperProps & react.RefAttributes<HTMLOListElement>>;
|
|
1517
1748
|
|
|
1749
|
+
/**
|
|
1750
|
+
* TabBar — mobile bottom navigation. Renders an evenly-spaced row of items
|
|
1751
|
+
* (typically 4–5) with optional `elevated` styling for one center action.
|
|
1752
|
+
*
|
|
1753
|
+
* Active state can be controlled (`value` + `onValueChange`) or uncontrolled
|
|
1754
|
+
* (`defaultValue`). The bar sits at the bottom of the screen; pair with
|
|
1755
|
+
* `pb-[env(safe-area-inset-bottom)]` on the surrounding scroll container to
|
|
1756
|
+
* respect the iOS home indicator.
|
|
1757
|
+
*/
|
|
1758
|
+
interface TabBarItem {
|
|
1759
|
+
/** Stable identifier — what `value` / `onValueChange` reference. */
|
|
1760
|
+
id: string;
|
|
1761
|
+
/** Short label rendered under the icon. */
|
|
1762
|
+
label: ReactNode;
|
|
1763
|
+
/** Glyph node — pass an SVG, IconGlyph, or string emoji. */
|
|
1764
|
+
icon: ReactNode;
|
|
1765
|
+
/** Optional unread / count badge rendered top-right of the icon. */
|
|
1766
|
+
badge?: ReactNode;
|
|
1767
|
+
/**
|
|
1768
|
+
* Render this slot as an elevated pill (the center "Ask"-style action). Only
|
|
1769
|
+
* one item should set this true. Disables the active-color treatment for
|
|
1770
|
+
* this slot since it's always the focal action.
|
|
1771
|
+
*/
|
|
1772
|
+
elevated?: boolean;
|
|
1773
|
+
disabled?: boolean;
|
|
1774
|
+
}
|
|
1775
|
+
interface TabBarProps extends Omit<HTMLAttributes<HTMLElement>, 'defaultValue'> {
|
|
1776
|
+
items: TabBarItem[];
|
|
1777
|
+
/** Controlled active item id. */
|
|
1778
|
+
value?: string;
|
|
1779
|
+
/** Uncontrolled initial active item id. */
|
|
1780
|
+
defaultValue?: string;
|
|
1781
|
+
/** Fired when a tab is activated. */
|
|
1782
|
+
onValueChange?: (id: string) => void;
|
|
1783
|
+
}
|
|
1784
|
+
declare const TabBar: react.ForwardRefExoticComponent<TabBarProps & react.RefAttributes<HTMLElement>>;
|
|
1785
|
+
|
|
1518
1786
|
/**
|
|
1519
1787
|
* Tabs — two visual styles built on Radix Tabs.
|
|
1520
1788
|
*
|
|
@@ -1568,17 +1836,90 @@ interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
|
1568
1836
|
declare const TimelineItem: react.ForwardRefExoticComponent<TimelineItemProps & react.RefAttributes<HTMLLIElement>>;
|
|
1569
1837
|
|
|
1570
1838
|
/**
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
*
|
|
1839
|
+
* formatRelative — compact "x ago" / "in x" formatter used by ActivityTimeline
|
|
1840
|
+
* and any other surface that wants to print typed event timestamps. Always
|
|
1841
|
+
* returns a short, ASCII string; if you need locale-aware formatting reach for
|
|
1842
|
+
* `Intl.RelativeTimeFormat` instead.
|
|
1843
|
+
*
|
|
1844
|
+
* The `now` argument is injectable so callers can render deterministically in
|
|
1845
|
+
* tests and during SSR. Invalid or unparseable inputs return an empty string
|
|
1846
|
+
* (note: `0` is a valid timestamp — the Unix epoch — and renders as a real
|
|
1847
|
+
* relative time).
|
|
1848
|
+
*/
|
|
1849
|
+
declare function formatRelative(input: Date | string | number, now?: Date): string;
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* ActivityTimeline — typed-event variant of `Timeline`. Each event carries
|
|
1853
|
+
* an optional `icon`, an `actor` (name + avatar slot), a `title`, an `at`
|
|
1854
|
+
* timestamp formatted relative to `relativeNow`, and an optional `payload`
|
|
1855
|
+
* preview. Tone drives the marker color.
|
|
1856
|
+
*
|
|
1857
|
+
* The component is presentation-only — supply your own data adapter to map
|
|
1858
|
+
* domain events to `ActivityEvent`s.
|
|
1859
|
+
*/
|
|
1860
|
+
interface ActivityActor {
|
|
1861
|
+
name: ReactNode;
|
|
1862
|
+
/** Typically an `<Avatar>` or `<IconGlyph>`. */
|
|
1863
|
+
avatar?: ReactNode;
|
|
1864
|
+
}
|
|
1865
|
+
interface ActivityEvent {
|
|
1866
|
+
id: string;
|
|
1867
|
+
/** Leading icon next to the marker. Often an `<IconGlyph>`. */
|
|
1868
|
+
icon?: ReactNode;
|
|
1869
|
+
actor?: ActivityActor;
|
|
1870
|
+
title: ReactNode;
|
|
1871
|
+
/** Event time. Renders relative to `relativeNow`. */
|
|
1872
|
+
at: Date | string | number;
|
|
1873
|
+
/** Optional inline preview (e.g. a diff snippet or a payload summary). */
|
|
1874
|
+
payload?: ReactNode;
|
|
1875
|
+
/** Marker color tone. Default `accent`. */
|
|
1876
|
+
tone?: TimelineEventTone;
|
|
1877
|
+
}
|
|
1878
|
+
interface ActivityTimelineProps extends HTMLAttributes<HTMLOListElement> {
|
|
1879
|
+
events: ReadonlyArray<ActivityEvent>;
|
|
1880
|
+
/** Reference time for relative formatting. Injectable for tests/SSR. */
|
|
1881
|
+
relativeNow?: Date;
|
|
1882
|
+
}
|
|
1883
|
+
declare const ActivityTimeline: react.ForwardRefExoticComponent<ActivityTimelineProps & react.RefAttributes<HTMLOListElement>>;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Topbar — slim header strip across the top of an app surface.
|
|
1887
|
+
*
|
|
1888
|
+
* Default (`density="comfortable"`) renders the 52px desktop header with a
|
|
1889
|
+
* title on the left and `actions` on the right. Pass `density="touch"` for the
|
|
1890
|
+
* 56px mobile page-header variant that adds an optional `back` button and an
|
|
1891
|
+
* `eyebrow` line (small uppercase mono label) above the title — the same shape
|
|
1892
|
+
* the Mobile Library uses as its in-app nav bar.
|
|
1574
1893
|
*/
|
|
1575
1894
|
interface TopbarProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1576
1895
|
/** Title rendered on the left. */
|
|
1577
1896
|
title?: ReactNode;
|
|
1897
|
+
/**
|
|
1898
|
+
* Eyebrow label rendered above the title (small uppercase mono). Touch density
|
|
1899
|
+
* only — silently ignored on desktop density to avoid two header tiers stacking.
|
|
1900
|
+
*/
|
|
1901
|
+
eyebrow?: ReactNode;
|
|
1578
1902
|
/** Left-of-title slot — typically a logo or breadcrumbs. */
|
|
1579
1903
|
leading?: ReactNode;
|
|
1580
|
-
/**
|
|
1904
|
+
/**
|
|
1905
|
+
* Renders the back-arrow button at the start (before `leading`). Pass
|
|
1906
|
+
* `back={true}` for the declarative form and wire the handler via `onBack`,
|
|
1907
|
+
* or pass `back={handler}` directly. Touch-density only; ignored on
|
|
1908
|
+
* desktop density.
|
|
1909
|
+
*/
|
|
1910
|
+
back?: boolean | MouseEventHandler<HTMLButtonElement>;
|
|
1911
|
+
/**
|
|
1912
|
+
* Handler for the back button when `back={true}`. Ignored when `back` is
|
|
1913
|
+
* itself a function — in that case `back` is the handler.
|
|
1914
|
+
*/
|
|
1915
|
+
onBack?: MouseEventHandler<HTMLButtonElement>;
|
|
1916
|
+
/** Right-side action group. Rendered with `gap-3` (desktop) or `gap-1` (touch). */
|
|
1581
1917
|
actions?: ReactNode;
|
|
1918
|
+
/**
|
|
1919
|
+
* `'comfortable'` (default) → desktop 52px header. `'touch'` → mobile 56px
|
|
1920
|
+
* page-header with optional back button + eyebrow.
|
|
1921
|
+
*/
|
|
1922
|
+
density?: 'comfortable' | 'touch';
|
|
1582
1923
|
}
|
|
1583
1924
|
declare const Topbar: react.ForwardRefExoticComponent<TopbarProps & react.RefAttributes<HTMLElement>>;
|
|
1584
1925
|
|
|
@@ -1609,4 +1950,71 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onSelect'> {
|
|
|
1609
1950
|
}
|
|
1610
1951
|
declare const Tree: react.ForwardRefExoticComponent<TreeProps & react.RefAttributes<HTMLUListElement>>;
|
|
1611
1952
|
|
|
1612
|
-
|
|
1953
|
+
/**
|
|
1954
|
+
* WizardDialog — modal multi-step flow. Composes `Dialog`, `Stepper`, and
|
|
1955
|
+
* Next/Back navigation around a `steps` array. Each step's content can be a
|
|
1956
|
+
* static node or a render function that receives the wizard context, which
|
|
1957
|
+
* is useful for steps that need to read or drive the navigation imperatively.
|
|
1958
|
+
*
|
|
1959
|
+
* `canAdvance` lets a step gate the Next button (e.g. when a form field is
|
|
1960
|
+
* empty). When the last step's Next is clicked, the wizard calls
|
|
1961
|
+
* `onComplete()` and lets the consumer close the dialog from there.
|
|
1962
|
+
*/
|
|
1963
|
+
interface WizardContext {
|
|
1964
|
+
current: number;
|
|
1965
|
+
total: number;
|
|
1966
|
+
goNext: () => void;
|
|
1967
|
+
goBack: () => void;
|
|
1968
|
+
goTo: (index: number) => void;
|
|
1969
|
+
isFirst: boolean;
|
|
1970
|
+
isLast: boolean;
|
|
1971
|
+
}
|
|
1972
|
+
interface WizardStep {
|
|
1973
|
+
/** Stable id. Used as the React key and the Stepper id. */
|
|
1974
|
+
id: string;
|
|
1975
|
+
/** Visible label in the Stepper. */
|
|
1976
|
+
label: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Step body. Pass a node for static content or a function for content that
|
|
1979
|
+
* needs the wizard context (e.g. to disable a Next button from inside).
|
|
1980
|
+
*/
|
|
1981
|
+
content: ReactNode | ((ctx: WizardContext) => ReactNode);
|
|
1982
|
+
/**
|
|
1983
|
+
* Predicate that gates the Next button for this step. Receives the wizard
|
|
1984
|
+
* context. Default: always true (Next is enabled).
|
|
1985
|
+
*/
|
|
1986
|
+
canAdvance?: (ctx: WizardContext) => boolean;
|
|
1987
|
+
}
|
|
1988
|
+
interface WizardDialogProps {
|
|
1989
|
+
/** Controlled open state. */
|
|
1990
|
+
open?: boolean;
|
|
1991
|
+
/** Uncontrolled initial open state. */
|
|
1992
|
+
defaultOpen?: boolean;
|
|
1993
|
+
/** Fires when the dialog open state changes. */
|
|
1994
|
+
onOpenChange?: (open: boolean) => void;
|
|
1995
|
+
/** Ordered list of wizard steps. */
|
|
1996
|
+
steps: ReadonlyArray<WizardStep>;
|
|
1997
|
+
/** Step index to start at. Default 0. */
|
|
1998
|
+
initialStep?: number;
|
|
1999
|
+
/** Fires when Next is clicked on the last step. The consumer typically closes the dialog here. */
|
|
2000
|
+
onComplete?: () => void;
|
|
2001
|
+
/** Dialog title (visible heading). */
|
|
2002
|
+
title?: ReactNode;
|
|
2003
|
+
/** Dialog description (rendered below the title for assistive tech). */
|
|
2004
|
+
description?: ReactNode;
|
|
2005
|
+
/** Pixel max-width of the dialog panel. Default 560. */
|
|
2006
|
+
width?: number | string;
|
|
2007
|
+
/** Override the Next button label. Default `'Next'`. */
|
|
2008
|
+
nextLabel?: ReactNode;
|
|
2009
|
+
/** Override the Next button label on the last step. Default `'Done'`. */
|
|
2010
|
+
completeLabel?: ReactNode;
|
|
2011
|
+
/** Override the Back button label. Default `'Back'`. */
|
|
2012
|
+
backLabel?: ReactNode;
|
|
2013
|
+
/** Optional cancel slot rendered in the footer alongside the navigation. */
|
|
2014
|
+
cancelLabel?: ReactNode;
|
|
2015
|
+
/** Fires when the cancel button is pressed. The consumer typically closes the dialog. */
|
|
2016
|
+
onCancel?: () => void;
|
|
2017
|
+
}
|
|
2018
|
+
declare const WizardDialog: react.ForwardRefExoticComponent<WizardDialogProps & react.RefAttributes<HTMLDivElement>>;
|
|
2019
|
+
|
|
2020
|
+
export { type ActivityActor, type ActivityEvent, ActivityTimeline, type ActivityTimelineProps, 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, type FilterFacet, type FilterFacetOption, FilterPanel, type FilterPanelProps, type FilterPanelValue, HealthScore, type HealthScoreBreakdownEntry, type HealthScoreProps, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardRoot, HoverCardTrigger, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, LargeTitle, type LargeTitleProps, 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, OnboardingChecklist, type OnboardingChecklistProps, type OnboardingItem, type OnboardingItemStatus, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, type PullToRefreshState, RadialProgress, type RadialProgressProps, type RadialTone, Radio, RadioGroup, type RadioGroupProps, type RadioProps, ScrollArea, type ScrollAreaProps, type ScrollAreaType, 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, TabBar, type TabBarItem, type TabBarProps, 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, type WizardContext, WizardDialog, type WizardDialogProps, type WizardStep, badgeStyles, buttonStyles, cardStyles, cn, filterCommandItems, formatRelative, iconButtonStyles, useControllableState, useDisclosure, useEscape, useIsomorphicLayoutEffect, useKeyboardList, useOutsideClick, useTheme, useToast };
|