@salemcobalt/ui 0.2.0-rc.12 → 0.2.0-rc.14

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @salemcobalt/ui
2
2
 
3
- React 19 components for the Salem Cobalt design system: `Button`, `IconButton`, `Icon` and a shipped icon set, `BroomIcon`, `Badge`, `Card`, `Stack`, `Inline`, `Heading`, `Text`, `Kbd`, `Dialog`, `Tooltip`, `Menu`, `Popover`, `PriorityNav`, `Toolbar`, `Banner`, `Spinner`, `Progress`, `Tabs`, `Input`, `Textarea`, `Select`, `FileInput` and `FilePreviewDialog`, `Checkbox`, `Switch`, `Table` (with row selection), `SelectionBar`, `Toast`, `Stat`, `Chip`, `Disclosure`, `EmptyState`, `Skeleton`. Requires `@salemcobalt/tokens`.
3
+ React 19 components for the Salem Cobalt design system: `Button`, `IconButton`, `Icon` and a shipped icon set, `BroomIcon`, `Badge`, `Card`, `Stack`, `Inline`, `Heading`, `Text`, `Kbd`, `Dialog`, `FullScreenFlow`, `Tooltip`, `Menu`, `Popover`, `PriorityNav`, `Toolbar`, `Banner`, `Spinner`, `Progress`, `Tabs`, `Input`, `Textarea`, `Select`, `FileInput` and `FilePreviewDialog`, `Checkbox`, `Switch`, `Table` (with row selection), `SelectionBar`, `Toast`, `Stat`, `Chip`, `Disclosure`, `EmptyState`, `Skeleton`. Requires `@salemcobalt/tokens`.
4
4
 
5
5
  ```ts
6
6
  import '@salemcobalt/tokens/css'; // custom properties, light + dark
@@ -32,7 +32,8 @@ Styles ship as one stylesheet inside `@layer sc`, so an app's unlayered CSS alwa
32
32
  | `Card` | `variant` outlined · elevated · filled; `padding` none · sm · md · lg; `interactive`; `selected`; `as` or `render` to make it an `a`/`button`/`li`. |
33
33
  | `Stack`, `Inline` | `gap` from the spacing scale (`none` … `4xl`); `align`; `justify`; `as`. `Inline` wraps unless `wrap={false}`. |
34
34
  | `Kbd` | One key per `Kbd`; `Kbd.Group label="Command K"` groups a shortcut with a `+` (or `separator="space"`). |
35
- | `Dialog` | `Root` (`open`, `defaultOpen`, `onOpenChange`, `dismissible`), `Trigger`, `Content` (`size` sm · md · lg, every size clamps to the viewport minus a 16px gutter; `variant="sheet"` becomes a bottom sheet below 640px with a scrolling `Body`), `Title`, `Description`, `Body`, `Actions`, `Close`. Menus, selects and tooltips opened inside render above it. |
35
+ | `Dialog` | `Root` (`open`, `defaultOpen`, `onOpenChange`, `dismissible`, `onRequestClose(reason)`: Esc, backdrop and every `Close` ask instead of closing; close by setting `open`), `Trigger`, `Content` (`size` sm · md · lg, every size clamps to the viewport minus a 16px gutter; `variant="sheet"` becomes a bottom sheet below 640px with a scrolling `Body`; `variant="fullscreen"` covers the viewport, inset 16px from 900px, with a scrolling `Body`), `Title`, `Description`, `Body`, `Actions`, `Close`. Menus, selects and tooltips opened inside render above it. |
36
+ | `FullScreenFlow` | A multi-step takeover on `Dialog variant="fullscreen"` (docs/adr/0006). `Root` (`open` default `true`, required `onRequestClose(reason)` for Esc and the ×, `onNext`/`onBack` for Enter and the arrow keys outside controls, `decoration`), `Header` (`title` names the dialog, `logo`, `compactTitle` below 760px, `status`, `closeLabel`; children: `Progress`), `Progress` (`chapters` `{ label, steps }[]`, `step` counted from 1, `label`; current chapter `aria-current="step"`), `Body`, `Rail` (from 1000px, `footer`) › `RailGroup` (`label`) › `RailItem` (`current`, `done`, `disabled`, `adornment`), `Viewport` (`direction` forward · back; one keyed `Step`), `Step` (`title` an `<h2>` that takes focus, `eyebrow`, `description`, `announcement` for the live region), `Footer` (`back`, `hint`, children; 44px buttons). The app owns the step state; the flow owns motion, focus and announcements. |
36
37
  | `Toolbar` | `Root` (required `aria-label`, `wrap`, `gap`), `Group` (`aria-label`, `gap`), `Separator`, `Spacer`, `Button` (`render={<IconButton … />}` or `render={<Menu.Trigger render={…} />}` so the control joins the roving focus: Tab enters, arrows move, Tab leaves), `Link` (an anchor in the same navigation; `render={<IconButton label render={<a href />} />}` for an icon link). |
37
38
  | `Banner` | `tone` info (default) · success · warning · danger · neutral; `icon` (or `false`); `action` slot; `dismissible` + `onDismiss` (`open` to control); warning and danger are `role="alert"`, the rest `role="status"`. |
38
39
  | `Tabs` | `Root` (`value`, `defaultValue`, `onValueChange`), `List` (required `aria-label`, `fill`), `Tab` (`value`, `icon`, `count`, `disabled`), `Panel` (`value`, `keepMounted`). Arrow keys move, Enter/Space activates. `List variant="segmented"`: a quiet segmented control (sunken track, the active tab raised on `surface-default`, no accent, plain muted counts); `line` stays the default. |
@@ -69,6 +70,48 @@ Styles ship as one stylesheet inside `@layer sc`, so an app's unlayered CSS alwa
69
70
  </Dialog.Root>
70
71
  ```
71
72
 
73
+ ```tsx
74
+ // The app owns the step (a machine, the URL); the flow owns motion, focus and announcements.
75
+ <FullScreenFlow.Root onRequestClose={() => setConfirmLeave(true)} onNext={next} onBack={back}>
76
+ <FullScreenFlow.Header
77
+ title="Set up your search"
78
+ compactTitle={`${n} of 10 · ${step.label}`}
79
+ closeLabel="Save and exit"
80
+ >
81
+ <FullScreenFlow.Progress
82
+ chapters={[
83
+ { label: 'You', steps: 3 },
84
+ { label: 'Your search', steps: 4 },
85
+ ]}
86
+ step={n}
87
+ label={`Step ${n} of 10 · ${step.label}`}
88
+ />
89
+ </FullScreenFlow.Header>
90
+ <FullScreenFlow.Body>
91
+ <FullScreenFlow.Rail aria-label="Setup steps">…RailGroup › RailItem…</FullScreenFlow.Rail>
92
+ <FullScreenFlow.Viewport direction={direction}>
93
+ <FullScreenFlow.Step key={step.id} title={step.title} announcement={`Step ${n} of 10, ${step.label}`}>
94
+ …
95
+ </FullScreenFlow.Step>
96
+ </FullScreenFlow.Viewport>
97
+ </FullScreenFlow.Body>
98
+ <FullScreenFlow.Footer
99
+ back={
100
+ <Button variant="ghost" size="lg" onClick={back}>
101
+ Back
102
+ </Button>
103
+ }
104
+ >
105
+ <Button size="lg" onClick={next}>
106
+ Continue
107
+ </Button>
108
+ </FullScreenFlow.Footer>
109
+ <Dialog.Root open={confirmLeave} onOpenChange={setConfirmLeave}>
110
+ …Leave for now? …
111
+ </Dialog.Root>
112
+ </FullScreenFlow.Root>
113
+ ```
114
+
72
115
  ```tsx
73
116
  <Tooltip.Provider>
74
117
  <Inline gap="2xs">
package/dist/index.d.ts CHANGED
@@ -699,7 +699,9 @@ declare const Kbd: typeof KbdBase & {
699
699
  };
700
700
 
701
701
  type DialogSize = 'sm' | 'md' | 'lg';
702
- type DialogVariant = 'dialog' | 'sheet';
702
+ type DialogVariant = 'dialog' | 'sheet' | 'fullscreen';
703
+ /** How a person asked to close: Esc, a press on the backdrop, or a `Dialog.Close`. */
704
+ type DialogCloseRequestReason = 'escape-key' | 'outside-press' | 'close-press';
703
705
  interface DialogRootProps {
704
706
  /** Controlled open state. */
705
707
  open?: boolean | undefined;
@@ -709,10 +711,17 @@ interface DialogRootProps {
709
711
  onOpenChange?: ((open: boolean) => void) | undefined;
710
712
  /** When `false`, Esc and backdrop clicks no longer close the dialog. Default `true`. */
711
713
  dismissible?: boolean | undefined;
714
+ /**
715
+ * When set, the dialog no longer closes itself: Esc, a backdrop press and every `Dialog.Close` call
716
+ * this with the reason instead, and the app closes it by setting `open` to `false` (for example after
717
+ * a "Leave for now?" confirmation). Use with a controlled `open`. `dismissible={false}` still swallows
718
+ * Esc and backdrop presses first.
719
+ */
720
+ onRequestClose?: ((reason: DialogCloseRequestReason) => void) | undefined;
712
721
  children?: ReactNode | undefined;
713
722
  }
714
723
  /** Owns the open state. Wrap a `Dialog.Trigger` and a `Dialog.Content`. */
715
- declare function Root$5({ dismissible, onOpenChange, open, defaultOpen, children }: DialogRootProps): react.JSX.Element;
724
+ declare function Root$6({ dismissible, onOpenChange, onRequestClose, open, defaultOpen, children, }: DialogRootProps): react.JSX.Element;
716
725
  interface DialogContentProps extends Omit<Dialog$1.Popup.Props, 'className'> {
717
726
  /**
718
727
  * Maximum width: `sm` 400px for yes/no, `md` 560px (default) for a short form, `lg` 720px rarely.
@@ -723,6 +732,10 @@ interface DialogContentProps extends Omit<Dialog$1.Popup.Props, 'className'> {
723
732
  * `dialog` (default) centres the popup. `sheet` is the same on wide viewports but below 640px it
724
733
  * becomes a bottom sheet: full width, rounded top, title and actions pinned while `Dialog.Body`
725
734
  * scrolls, padding that clears the home indicator. Use it for forms and pickers opened from a list.
735
+ * `fullscreen` covers the viewport (inset by 16px with a rounded edge from 900px), slides in from the
736
+ * inline end, keeps clear of the safe areas, and lets `Dialog.Body` scroll between a pinned title and
737
+ * actions; `size` is ignored. It is the surface of `FullScreenFlow`. Pair it with `onRequestClose` on
738
+ * the Root when leaving needs a confirmation.
726
739
  */
727
740
  variant?: DialogVariant | undefined;
728
741
  className?: string | undefined;
@@ -744,7 +757,7 @@ interface DialogDescriptionProps extends Omit<Dialog$1.Description.Props, 'class
744
757
  declare function Description$1({ className, ...rest }: DialogDescriptionProps): react.JSX.Element;
745
758
  type DialogBodyProps = ComponentPropsWithRef<'div'>;
746
759
  /** Free content between the description and the actions. In a `sheet` it is the part that scrolls. */
747
- declare function Body$1({ className, ...rest }: DialogBodyProps): react.JSX.Element;
760
+ declare function Body$2({ className, ...rest }: DialogBodyProps): react.JSX.Element;
748
761
  type DialogActionsProps = Omit<InlineProps, 'justify'>;
749
762
  /** Right-aligned row of Buttons. Put the confirming action last. */
750
763
  declare function Actions({ className, ...rest }: DialogActionsProps): react.JSX.Element;
@@ -755,12 +768,12 @@ interface DialogCloseProps extends Omit<Dialog$1.Close.Props, 'className'> {
755
768
  declare function Close$1({ className, children, render, ...rest }: DialogCloseProps): react.JSX.Element;
756
769
  /** A modal that interrupts for a decision or a short form. Built on Base UI's Dialog. */
757
770
  declare const Dialog: {
758
- Root: typeof Root$5;
771
+ Root: typeof Root$6;
759
772
  Trigger: Dialog$1.Trigger;
760
773
  Content: typeof Content$2;
761
774
  Title: typeof Title$1;
762
775
  Description: typeof Description$1;
763
- Body: typeof Body$1;
776
+ Body: typeof Body$2;
764
777
  Actions: typeof Actions;
765
778
  Close: typeof Close$1;
766
779
  };
@@ -964,7 +977,7 @@ interface MenuRootProps {
964
977
  children?: ReactNode | undefined;
965
978
  }
966
979
  /** Owns the open state. Wrap a `Menu.Trigger` and a `Menu.Content`. */
967
- declare function Root$4({ open, defaultOpen, onOpenChange, disabled, modal, children }: MenuRootProps): react.JSX.Element;
980
+ declare function Root$5({ open, defaultOpen, onOpenChange, disabled, modal, children }: MenuRootProps): react.JSX.Element;
968
981
  interface MenuTriggerProps extends Omit<Menu$1.Trigger.Props, 'className'> {
969
982
  className?: string | undefined;
970
983
  }
@@ -1046,7 +1059,7 @@ interface MenuSeparatorProps extends Omit<Menu$1.Separator.Props, 'className'> {
1046
1059
  declare function Separator$1({ className, ...rest }: MenuSeparatorProps): react.JSX.Element;
1047
1060
  /** A dropdown of actions on a trigger, with full keyboard support. Built on Base UI's Menu. */
1048
1061
  declare const Menu: {
1049
- Root: typeof Root$4;
1062
+ Root: typeof Root$5;
1050
1063
  Trigger: typeof Trigger$1;
1051
1064
  Content: typeof Content$1;
1052
1065
  Item: typeof Item;
@@ -1191,7 +1204,7 @@ interface TabsRootProps extends Omit<Tabs$1.Root.Props, 'className' | 'value' |
1191
1204
  className?: string | undefined;
1192
1205
  }
1193
1206
  /** Owns the active tab. Wrap a `Tabs.List` and one `Tabs.Panel` per tab. */
1194
- declare function Root$3({ className, onValueChange, ...rest }: TabsRootProps): react.JSX.Element;
1207
+ declare function Root$4({ className, onValueChange, ...rest }: TabsRootProps): react.JSX.Element;
1195
1208
  type TabsListVariant = 'line' | 'segmented';
1196
1209
  interface TabsListProps extends Omit<Tabs$1.List.Props, 'className'> {
1197
1210
  /** Names the set of tabs for assistive tech: "Inbox sections". */
@@ -1222,7 +1235,7 @@ interface TabsPanelProps extends Omit<Tabs$1.Panel.Props, 'className' | 'value'>
1222
1235
  declare function Panel({ className, ...rest }: TabsPanelProps): react.JSX.Element;
1223
1236
  /** Switches between sections of one view. Built on Base UI's Tabs. */
1224
1237
  declare const Tabs: {
1225
- Root: typeof Root$3;
1238
+ Root: typeof Root$4;
1226
1239
  List: typeof List;
1227
1240
  Tab: typeof Tab;
1228
1241
  Panel: typeof Panel;
@@ -1241,7 +1254,7 @@ interface ToolbarRootProps extends Omit<Toolbar$1.Root.Props, 'className'> {
1241
1254
  * A row of controls with one tab stop: Tab enters, arrow keys move between items, Tab leaves. Put every
1242
1255
  * control through `Toolbar.Button` (`render={<IconButton … />}`) so it joins the roving focus.
1243
1256
  */
1244
- declare function Root$2({ wrap, gap, className, ...rest }: ToolbarRootProps): react.JSX.Element;
1257
+ declare function Root$3({ wrap, gap, className, ...rest }: ToolbarRootProps): react.JSX.Element;
1245
1258
  interface ToolbarGroupProps extends Omit<Toolbar$1.Group.Props, 'className'> {
1246
1259
  /** Names the group: "Playback". */
1247
1260
  'aria-label'?: string | undefined;
@@ -1269,7 +1282,7 @@ interface ToolbarSpacerProps {
1269
1282
  declare function Spacer({ className }: ToolbarSpacerProps): react.JSX.Element;
1270
1283
  /** A horizontal container of controls. Built on Base UI's Toolbar. */
1271
1284
  declare const Toolbar: {
1272
- Root: typeof Root$2;
1285
+ Root: typeof Root$3;
1273
1286
  Group: typeof Group;
1274
1287
  Separator: typeof Separator;
1275
1288
  Button: react.ForwardRefExoticComponent<Omit<_base_ui_react.ToolbarButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
@@ -1337,7 +1350,7 @@ interface ProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
1337
1350
  * Says that something is processing and, when known, how far along it is. Built on Base UI's Progress:
1338
1351
  * `role="progressbar"` with the aria value attributes, or none while indeterminate.
1339
1352
  */
1340
- declare function Progress({ value, max, min, label, valueText, showValue, tone, size, variant, className, ...rest }: ProgressProps): react.JSX.Element;
1353
+ declare function Progress$1({ value, max, min, label, valueText, showValue, tone, size, variant, className, ...rest }: ProgressProps): react.JSX.Element;
1341
1354
 
1342
1355
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
1343
1356
  type HeadingSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
@@ -1721,14 +1734,14 @@ interface TableRootProps extends Omit<ComponentPropsWithRef<'table'>, 'style'> {
1721
1734
  selection?: RowSelection | undefined;
1722
1735
  }
1723
1736
  /** A semantic `<table>` in a horizontally scrolling wrapper. Compose `Table.Head`, `Table.Body`, `Table.Row`, `Table.Header`, `Table.Cell`. */
1724
- declare function Root$1({ stickyHeader, maxHeight, density, divided, layout, wrapperClassName, wrapperStyle, className, style, children, selection, onKeyDown, ...rest }: TableRootProps): react.JSX.Element;
1737
+ declare function Root$2({ stickyHeader, maxHeight, density, divided, layout, wrapperClassName, wrapperStyle, className, style, children, selection, onKeyDown, ...rest }: TableRootProps): react.JSX.Element;
1725
1738
  type TableCaptionProps = ComponentPropsWithRef<'caption'>;
1726
1739
  /** Names the table for assistive tech; visually a muted line above it. */
1727
1740
  declare function Caption({ className, ...rest }: TableCaptionProps): react.JSX.Element;
1728
1741
  type TableHeadProps = ComponentPropsWithRef<'thead'>;
1729
1742
  declare function Head({ className, ...rest }: TableHeadProps): react.JSX.Element;
1730
1743
  type TableBodyProps = ComponentPropsWithRef<'tbody'>;
1731
- declare function Body({ className, ...rest }: TableBodyProps): react.JSX.Element;
1744
+ declare function Body$1({ className, ...rest }: TableBodyProps): react.JSX.Element;
1732
1745
  type TableFootProps = ComponentPropsWithRef<'tfoot'>;
1733
1746
  declare function Foot({ className, ...rest }: TableFootProps): react.JSX.Element;
1734
1747
  interface TableRowProps extends ComponentPropsWithRef<'tr'> {
@@ -1784,19 +1797,19 @@ interface TableHeaderProps extends Omit<ComponentPropsWithRef<'th'>, 'align' | '
1784
1797
  onSort?: ((direction: Exclude<TableSortDirection, 'none'>) => void) | undefined;
1785
1798
  }
1786
1799
  /** A `<th>`; `scope` defaults to `col`, pass `row` for the first cell of a row. */
1787
- declare function Header({ align, numeric, nowrap, truncate, width, sortable, sortDirection, onSort, scope, className, style, children, ...rest }: TableHeaderProps): react.JSX.Element;
1800
+ declare function Header$1({ align, numeric, nowrap, truncate, width, sortable, sortDirection, onSort, scope, className, style, children, ...rest }: TableHeaderProps): react.JSX.Element;
1788
1801
  interface TableCellProps extends Omit<ComponentPropsWithRef<'td'>, 'align' | 'width'>, CellSlots {
1789
1802
  }
1790
1803
  declare function Cell({ align, numeric, nowrap, truncate, width, className, style, ...rest }: TableCellProps): react.JSX.Element;
1791
1804
  /** Rows of records with column headers. Native table elements, so screen readers get rows and columns. */
1792
1805
  declare const Table: {
1793
- Root: typeof Root$1;
1806
+ Root: typeof Root$2;
1794
1807
  Caption: typeof Caption;
1795
1808
  Head: typeof Head;
1796
- Body: typeof Body;
1809
+ Body: typeof Body$1;
1797
1810
  Foot: typeof Foot;
1798
1811
  Row: typeof Row;
1799
- Header: typeof Header;
1812
+ Header: typeof Header$1;
1800
1813
  Cell: typeof Cell;
1801
1814
  SelectionHeader: typeof SelectionHeader;
1802
1815
  SelectionCell: typeof SelectionCell;
@@ -2684,7 +2697,7 @@ interface PopoverRootProps {
2684
2697
  children?: ReactNode | undefined;
2685
2698
  }
2686
2699
  /** Owns the open state. Wrap a `Popover.Trigger` and a `Popover.Content`. */
2687
- declare function Root({ open, defaultOpen, onOpenChange, modal, children }: PopoverRootProps): react.JSX.Element;
2700
+ declare function Root$1({ open, defaultOpen, onOpenChange, modal, children }: PopoverRootProps): react.JSX.Element;
2688
2701
  interface PopoverTriggerProps extends Omit<Popover$1.Trigger.Props, 'className'> {
2689
2702
  className?: string | undefined;
2690
2703
  }
@@ -2723,7 +2736,7 @@ interface PopoverCloseProps extends Omit<Popover$1.Close.Props, 'className'> {
2723
2736
  declare function Close({ className, children, render, ...rest }: PopoverCloseProps): react.JSX.Element;
2724
2737
  /** A non-modal panel anchored to a trigger, for a small form, a status summary or a legend. Built on Base UI's Popover. */
2725
2738
  declare const Popover: {
2726
- Root: typeof Root;
2739
+ Root: typeof Root$1;
2727
2740
  Trigger: typeof Trigger;
2728
2741
  Content: typeof Content;
2729
2742
  Title: typeof Title;
@@ -2746,7 +2759,149 @@ interface BroomIconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'>
2746
2759
  */
2747
2760
  declare function BroomIcon({ sweeping, size, title, className, ...rest }: BroomIconProps): react.JSX.Element;
2748
2761
 
2762
+ /** Which way the flow moved: `forward` slides the new step in from the inline end, `back` from the start. */
2763
+ type FlowDirection = 'forward' | 'back';
2764
+ /** Why the flow asked to close: Esc, or the × in the header. */
2765
+ type FlowCloseRequestReason = 'escape-key' | 'close-press';
2766
+ interface FullScreenFlowRootProps {
2767
+ /** Whether the flow is showing. Default `true`, for a flow that lives on its own route. */
2768
+ open?: boolean | undefined;
2769
+ /**
2770
+ * Esc and the header's × call this instead of closing. Show a leave confirmation (a nested `Dialog`),
2771
+ * then close by setting `open` to `false` or by navigating away. A press on the backdrop does nothing.
2772
+ */
2773
+ onRequestClose: (reason: FlowCloseRequestReason) => void;
2774
+ /** Enter (outside buttons, links, textareas and `[data-flow-keys="local"]`) and the forward arrow key call this. */
2775
+ onNext?: (() => void) | undefined;
2776
+ /** The back arrow key (outside form controls) calls this. */
2777
+ onBack?: (() => void) | undefined;
2778
+ /** A decorative layer behind everything, such as an illustration. Hidden from assistive tech. */
2779
+ decoration?: ReactNode | undefined;
2780
+ className?: string | undefined;
2781
+ /** `Header`, `Body` and `Footer`, in that order. */
2782
+ children?: ReactNode | undefined;
2783
+ }
2784
+ /**
2785
+ * A full-screen modal for a multi-step task, on `Dialog variant="fullscreen"`: focus is trapped, the page
2786
+ * behind is inert, and Esc goes to `onRequestClose`. Holds the polite live region that `Step` announces into.
2787
+ */
2788
+ declare function Root({ open, onRequestClose, onNext, onBack, decoration, className, children, }: FullScreenFlowRootProps): react.JSX.Element;
2789
+ interface FullScreenFlowHeaderProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {
2790
+ /** The flow's name ("Set up your search"). Labels the dialog. */
2791
+ title: ReactNode;
2792
+ /** A small mark before the title. Decorative. */
2793
+ logo?: ReactNode | undefined;
2794
+ /** Shown instead of `title` below 760px, where the progress drops to its own row: "4 of 10 · Roles". */
2795
+ compactTitle?: ReactNode | undefined;
2796
+ /** A status after the progress, such as a "Saved" tick. */
2797
+ status?: ReactNode | undefined;
2798
+ /** Name of the × button, which calls `onRequestClose('close-press')`. Default "Close". */
2799
+ closeLabel?: string | undefined;
2800
+ /** Usually a `FullScreenFlow.Progress`. */
2801
+ children?: ReactNode | undefined;
2802
+ }
2803
+ /** The top bar: logo and title, progress in the middle, a status, and the ×. Pinned; it never scrolls. */
2804
+ declare function Header({ title, logo, compactTitle, status, closeLabel, className, children, ...rest }: FullScreenFlowHeaderProps): react.JSX.Element;
2805
+ /** A chapter of the flow and how many numbered steps it holds. */
2806
+ interface FlowChapter {
2807
+ label: string;
2808
+ steps: number;
2809
+ }
2810
+ interface FullScreenFlowProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
2811
+ /** The chapters in order. Each draws one segment, as wide as its share of the steps. */
2812
+ chapters: readonly FlowChapter[];
2813
+ /**
2814
+ * The current step, counted from 1 across every chapter. `0` is before the first (a welcome screen);
2815
+ * anything past the total fills every segment. The current step counts as half done.
2816
+ */
2817
+ step: number;
2818
+ /** One line above the segments: "Step 4 of 10 · Roles · about 5 min left". Hidden below 760px. */
2819
+ label?: ReactNode | undefined;
2820
+ /** Name of the list of segments. Default "Progress". */
2821
+ listLabel?: string | undefined;
2822
+ }
2823
+ /** Segmented progress, one segment per chapter; the chapter holding the current step has `aria-current="step"`. */
2824
+ declare function Progress({ chapters, step, label, listLabel, className, ...rest }: FullScreenFlowProgressProps): react.JSX.Element;
2825
+ type FullScreenFlowBodyProps = ComponentPropsWithRef<'div'>;
2826
+ /** Between header and footer: a `Rail` (from 1000px) beside the `Viewport`. */
2827
+ declare function Body({ className, ...rest }: FullScreenFlowBodyProps): react.JSX.Element;
2828
+ interface FullScreenFlowRailProps extends ComponentPropsWithRef<'nav'> {
2829
+ /** A note under the steps, such as where answers can be changed later. Hidden on short screens. */
2830
+ footer?: ReactNode | undefined;
2831
+ }
2832
+ /** Every step by chapter, shown from 1000px. Holds `RailGroup`s of `RailItem`s. Named "Steps" unless `aria-label` says otherwise. */
2833
+ declare function Rail({ 'aria-label': ariaLabel, footer, className, children, ...rest }: FullScreenFlowRailProps): react.JSX.Element;
2834
+ interface FullScreenFlowRailGroupProps extends Omit<ComponentPropsWithRef<'div'>, 'title'> {
2835
+ /** The chapter name. */
2836
+ label: ReactNode;
2837
+ }
2838
+ /** One chapter in the rail: its name over a list of `RailItem`s. */
2839
+ declare function RailGroup({ label, className, children, ...rest }: FullScreenFlowRailGroupProps): react.JSX.Element;
2840
+ interface FullScreenFlowRailItemProps extends ComponentPropsWithRef<'button'> {
2841
+ /** The step on screen: `aria-current="step"` and the accent wash. */
2842
+ current?: boolean | undefined;
2843
+ /** Shows a check and adds `doneLabel` for assistive tech. */
2844
+ done?: boolean | undefined;
2845
+ /** Read after the label when `done`. Default "done". */
2846
+ doneLabel?: string | undefined;
2847
+ /** A small icon at the end of the row, e.g. "drafted for you". Give it a `title` if it carries meaning. */
2848
+ adornment?: ReactNode | undefined;
2849
+ }
2850
+ /** A step in the rail. A button: disable the steps not reached yet. */
2851
+ declare function RailItem({ current, done, doneLabel, adornment, type, className, children, ...rest }: FullScreenFlowRailItemProps): react.JSX.Element;
2852
+ interface FullScreenFlowViewportProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'ref'> {
2853
+ /** Which way this change goes. Set it with the step: `back` when the person went back. Default `forward`. */
2854
+ direction?: FlowDirection | undefined;
2855
+ /** Exactly one `FullScreenFlow.Step`, keyed by step: `<FullScreenFlow.Step key={step.id} …>`. */
2856
+ children: ReactElement;
2857
+ }
2858
+ /**
2859
+ * The scrolling area that shows one step. When the child's `key` changes, the old step slides out and the
2860
+ * new one slides in (by `direction`; a short crossfade under reduced motion), the area scrolls to the top,
2861
+ * and the new step's title takes focus and is announced.
2862
+ */
2863
+ declare function Viewport({ direction, className, children, ...rest }: FullScreenFlowViewportProps): react.JSX.Element;
2864
+ interface FullScreenFlowStepProps extends Omit<ComponentPropsWithRef<'section'>, 'title'> {
2865
+ /** The step's heading, an `<h2>` that takes focus (`tabindex="-1"`) when the step arrives. */
2866
+ title: ReactNode;
2867
+ /** A short line above the title: "Your search · Step 4 of 10". */
2868
+ eyebrow?: ReactNode | undefined;
2869
+ /** Why this step is asked, under the title. */
2870
+ description?: ReactNode | undefined;
2871
+ /** What the live region says when the step arrives: "Step 4 of 10, Roles". Defaults to `title` when it is a string. */
2872
+ announcement?: string | undefined;
2873
+ }
2874
+ /** One step: eyebrow, title, description, then its content. Render it inside `Viewport` with a `key`. */
2875
+ declare function Step({ title, eyebrow, description, announcement, className, children, ...rest }: FullScreenFlowStepProps): react.JSX.Element;
2876
+ interface FullScreenFlowFooterProps extends ComponentPropsWithRef<'div'> {
2877
+ /** At the inline start: a Back button. */
2878
+ back?: ReactNode | undefined;
2879
+ /** Before the actions, from 760px: "Press Enter to continue". */
2880
+ hint?: ReactNode | undefined;
2881
+ /** The primary action, at the inline end; stretches below 520px. */
2882
+ children?: ReactNode | undefined;
2883
+ }
2884
+ /** The pinned bottom bar. Buttons in it are at least 44px tall and wide, and it clears the home indicator. */
2885
+ declare function Footer({ back, hint, className, children, ...rest }: FullScreenFlowFooterProps): react.JSX.Element;
2886
+ /**
2887
+ * A full-screen, multi-step flow (onboarding, setup) on `Dialog variant="fullscreen"`:
2888
+ * `Root` › `Header` (with `Progress`) · `Body` (`Rail` › `RailGroup` › `RailItem`, and `Viewport` › `Step`) · `Footer`.
2889
+ * The app owns the state (which step, which direction); this owns the surface, motion, focus and announcements.
2890
+ */
2891
+ declare const FullScreenFlow: {
2892
+ Root: typeof Root;
2893
+ Header: typeof Header;
2894
+ Progress: typeof Progress;
2895
+ Body: typeof Body;
2896
+ Rail: typeof Rail;
2897
+ RailGroup: typeof RailGroup;
2898
+ RailItem: typeof RailItem;
2899
+ Viewport: typeof Viewport;
2900
+ Step: typeof Step;
2901
+ Footer: typeof Footer;
2902
+ };
2903
+
2749
2904
  declare const version = "0.1.1";
2750
2905
 
2751
- export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Badge, Banner, BellIcon, BriefcaseIcon, BroomIcon, Button, CalendarIcon, Card, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, CircleCheckIcon, CircleXIcon, ClockIcon, CopyIcon, Dialog, Disclosure, DocumentIcon, DownloadIcon, EditIcon, EmptyState, ExternalLinkIcon, EyeIcon, FileInput, FilePreviewDialog, FilterIcon, FlagIcon, Heading, Icon, IconButton, InboxIcon, InfoIcon, Inline, Input, Kbd, LinkIcon, MailIcon, MapPinIcon, Menu, MenuIcon, MinusIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, PauseIcon, PlayIcon, PlusIcon, Popover, PriorityNav, Progress, RefreshIcon, SearchIcon, Select, SelectionBar, SettingsIcon, Skeleton, Spinner, Stack, StarIcon, Stat, SunIcon, Switch, Table, Tabs, Text, Textarea, ThumbsDownIcon, ThumbsUpIcon, Toast, Toolbar, Tooltip, TrashIcon, UndoIcon, UserIcon, WarningIcon, XIcon, iconNames, useRowSelection, useToast, version };
2752
- export type { BadgeProps, BadgeSize, BadgeTone, BadgeVariant, BannerProps, BannerTone, BroomIconProps, ButtonProps, ButtonSize, ButtonVariant, CardElement, CardPadding, CardProps, CardVariant, CheckboxProps, ChipProps, ChipSize, ChipTone, ControlSize, DialogActionsProps, DialogBodyProps, DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogRootProps, DialogSize, DialogTitleProps, DialogVariant, DisclosureProps, EmptyStateElement, EmptyStateProps, EmptyStateSize, FieldProps, FileInputProps, FilePreviewDialogProps, HeadingElement, HeadingLevel, HeadingProps, HeadingSize, IconButtonDotTone, IconButtonProps, IconGlyphProps, IconName, IconProps, IconSize, InlineAlign, InlineElement, InlineJustify, InlineProps, InputProps, KbdGroupProps, KbdProps, MenuAlign, MenuCheckboxItemProps, MenuContentProps, MenuGroupProps, MenuItemProps, MenuItemTone, MenuLinkItemProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuSide, MenuTriggerProps, PopoverAlign, PopoverCloseProps, PopoverContentProps, PopoverDescriptionProps, PopoverRootProps, PopoverSide, PopoverTitleProps, PopoverTriggerProps, PriorityNavItem, PriorityNavLinkProps, PriorityNavProps, ProgressProps, ProgressSize, ProgressTone, ProgressVariant, RowSelection, RowSelectionHeaderState, SelectGroup, SelectOption, SelectProps, SelectionBarProps, SkeletonProps, SkeletonVariant, SpacingSize, SpinnerProps, StackAlign, StackElement, StackJustify, StackProps, StatDeltaTone, StatElement, StatProps, StatSize, StatTrend, StatVariant, SwitchProps, TableAlign, TableBodyProps, TableCaptionProps, TableCellProps, TableDensity, TableFootProps, TableHeadProps, TableHeaderProps, TableRootProps, TableRowProps, TableSelectionCellProps, TableSelectionHeaderProps, TableSortDirection, TabsListProps, TabsListVariant, TabsPanelProps, TabsRootProps, TabsTabProps, TextAlign, TextElement, TextProps, TextSize, TextTone, TextWeight, TextareaProps, TextareaVariant, ToastApi, ToastOptions, ToastProviderProps, ToastTone, ToolbarButtonProps, ToolbarGroupProps, ToolbarLinkProps, ToolbarRootProps, ToolbarSeparatorProps, ToolbarSpacerProps, TooltipAlign, TooltipProps, TooltipSide };
2906
+ export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Badge, Banner, BellIcon, BriefcaseIcon, BroomIcon, Button, CalendarIcon, Card, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, CircleCheckIcon, CircleXIcon, ClockIcon, CopyIcon, Dialog, Disclosure, DocumentIcon, DownloadIcon, EditIcon, EmptyState, ExternalLinkIcon, EyeIcon, FileInput, FilePreviewDialog, FilterIcon, FlagIcon, FullScreenFlow, Heading, Icon, IconButton, InboxIcon, InfoIcon, Inline, Input, Kbd, LinkIcon, MailIcon, MapPinIcon, Menu, MenuIcon, MinusIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, PauseIcon, PlayIcon, PlusIcon, Popover, PriorityNav, Progress$1 as Progress, RefreshIcon, SearchIcon, Select, SelectionBar, SettingsIcon, Skeleton, Spinner, Stack, StarIcon, Stat, SunIcon, Switch, Table, Tabs, Text, Textarea, ThumbsDownIcon, ThumbsUpIcon, Toast, Toolbar, Tooltip, TrashIcon, UndoIcon, UserIcon, WarningIcon, XIcon, iconNames, useRowSelection, useToast, version };
2907
+ export type { BadgeProps, BadgeSize, BadgeTone, BadgeVariant, BannerProps, BannerTone, BroomIconProps, ButtonProps, ButtonSize, ButtonVariant, CardElement, CardPadding, CardProps, CardVariant, CheckboxProps, ChipProps, ChipSize, ChipTone, ControlSize, DialogActionsProps, DialogBodyProps, DialogCloseProps, DialogCloseRequestReason, DialogContentProps, DialogDescriptionProps, DialogRootProps, DialogSize, DialogTitleProps, DialogVariant, DisclosureProps, EmptyStateElement, EmptyStateProps, EmptyStateSize, FieldProps, FileInputProps, FilePreviewDialogProps, FlowChapter, FlowCloseRequestReason, FlowDirection, FullScreenFlowBodyProps, FullScreenFlowFooterProps, FullScreenFlowHeaderProps, FullScreenFlowProgressProps, FullScreenFlowRailGroupProps, FullScreenFlowRailItemProps, FullScreenFlowRailProps, FullScreenFlowRootProps, FullScreenFlowStepProps, FullScreenFlowViewportProps, HeadingElement, HeadingLevel, HeadingProps, HeadingSize, IconButtonDotTone, IconButtonProps, IconGlyphProps, IconName, IconProps, IconSize, InlineAlign, InlineElement, InlineJustify, InlineProps, InputProps, KbdGroupProps, KbdProps, MenuAlign, MenuCheckboxItemProps, MenuContentProps, MenuGroupProps, MenuItemProps, MenuItemTone, MenuLinkItemProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuSide, MenuTriggerProps, PopoverAlign, PopoverCloseProps, PopoverContentProps, PopoverDescriptionProps, PopoverRootProps, PopoverSide, PopoverTitleProps, PopoverTriggerProps, PriorityNavItem, PriorityNavLinkProps, PriorityNavProps, ProgressProps, ProgressSize, ProgressTone, ProgressVariant, RowSelection, RowSelectionHeaderState, SelectGroup, SelectOption, SelectProps, SelectionBarProps, SkeletonProps, SkeletonVariant, SpacingSize, SpinnerProps, StackAlign, StackElement, StackJustify, StackProps, StatDeltaTone, StatElement, StatProps, StatSize, StatTrend, StatVariant, SwitchProps, TableAlign, TableBodyProps, TableCaptionProps, TableCellProps, TableDensity, TableFootProps, TableHeadProps, TableHeaderProps, TableRootProps, TableRowProps, TableSelectionCellProps, TableSelectionHeaderProps, TableSortDirection, TabsListProps, TabsListVariant, TabsPanelProps, TabsRootProps, TabsTabProps, TextAlign, TextElement, TextProps, TextSize, TextTone, TextWeight, TextareaProps, TextareaVariant, ToastApi, ToastOptions, ToastProviderProps, ToastTone, ToolbarButtonProps, ToolbarGroupProps, ToolbarLinkProps, ToolbarRootProps, ToolbarSeparatorProps, ToolbarSpacerProps, TooltipAlign, TooltipProps, TooltipSide };