@openwarelabs/ui 0.12.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +7 -7
  2. package/dist/components/AspectRatio/AspectRatio.d.cts +7 -0
  3. package/dist/components/AspectRatio/AspectRatio.d.ts +7 -0
  4. package/dist/components/AspectRatio/AspectRatio.types.d.cts +7 -0
  5. package/dist/components/AspectRatio/AspectRatio.types.d.ts +7 -0
  6. package/dist/components/Banner/Banner.d.cts +7 -0
  7. package/dist/components/Banner/Banner.d.ts +7 -0
  8. package/dist/components/Banner/Banner.types.d.cts +44 -0
  9. package/dist/components/Banner/Banner.types.d.ts +44 -0
  10. package/dist/components/Carousel/Carousel.d.cts +9 -0
  11. package/dist/components/Carousel/Carousel.d.ts +9 -0
  12. package/dist/components/Carousel/Carousel.types.d.cts +63 -0
  13. package/dist/components/Carousel/Carousel.types.d.ts +63 -0
  14. package/dist/components/ContextMenu/ContextMenu.d.cts +7 -0
  15. package/dist/components/ContextMenu/ContextMenu.d.ts +7 -0
  16. package/dist/components/ContextMenu/ContextMenu.types.d.cts +32 -0
  17. package/dist/components/ContextMenu/ContextMenu.types.d.ts +32 -0
  18. package/dist/components/DescriptionList/DescriptionList.d.cts +9 -0
  19. package/dist/components/DescriptionList/DescriptionList.d.ts +9 -0
  20. package/dist/components/DescriptionList/DescriptionList.types.d.cts +32 -0
  21. package/dist/components/DescriptionList/DescriptionList.types.d.ts +32 -0
  22. package/dist/components/HoverCard/HoverCard.d.cts +8 -0
  23. package/dist/components/HoverCard/HoverCard.d.ts +8 -0
  24. package/dist/components/HoverCard/HoverCard.types.d.cts +28 -0
  25. package/dist/components/HoverCard/HoverCard.types.d.ts +28 -0
  26. package/dist/components/Image/Image.d.cts +7 -0
  27. package/dist/components/Image/Image.d.ts +7 -0
  28. package/dist/components/Image/Image.types.d.cts +28 -0
  29. package/dist/components/Image/Image.types.d.ts +28 -0
  30. package/dist/components/Menu/Menu.context.d.cts +3 -0
  31. package/dist/components/Menu/Menu.context.d.ts +3 -0
  32. package/dist/components/Menu/Menu.d.cts +4 -34
  33. package/dist/components/Menu/Menu.d.ts +4 -34
  34. package/dist/components/Menu/Menu.types.d.cts +39 -0
  35. package/dist/components/Menu/Menu.types.d.ts +39 -0
  36. package/dist/components/PasswordInput/PasswordInput.d.cts +9 -0
  37. package/dist/components/PasswordInput/PasswordInput.d.ts +9 -0
  38. package/dist/components/PasswordInput/PasswordInput.types.d.cts +47 -0
  39. package/dist/components/PasswordInput/PasswordInput.types.d.ts +47 -0
  40. package/dist/components/PasswordInput/passwordStrength.d.cts +9 -0
  41. package/dist/components/PasswordInput/passwordStrength.d.ts +9 -0
  42. package/dist/components/Rating/Rating.d.cts +8 -0
  43. package/dist/components/Rating/Rating.d.ts +8 -0
  44. package/dist/components/Rating/Rating.types.d.cts +59 -0
  45. package/dist/components/Rating/Rating.types.d.ts +59 -0
  46. package/dist/components/Splitter/Splitter.d.cts +14 -0
  47. package/dist/components/Splitter/Splitter.d.ts +14 -0
  48. package/dist/components/Splitter/Splitter.layout.d.cts +12 -0
  49. package/dist/components/Splitter/Splitter.layout.d.ts +12 -0
  50. package/dist/components/Splitter/Splitter.types.d.cts +69 -0
  51. package/dist/components/Splitter/Splitter.types.d.ts +69 -0
  52. package/dist/components/Table/Table.d.cts +4 -60
  53. package/dist/components/Table/Table.d.ts +4 -60
  54. package/dist/components/Table/Table.types.d.cts +64 -0
  55. package/dist/components/Table/Table.types.d.ts +64 -0
  56. package/dist/components/TagInput/TagInput.d.cts +7 -0
  57. package/dist/components/TagInput/TagInput.d.ts +7 -0
  58. package/dist/components/TagInput/TagInput.types.d.cts +78 -0
  59. package/dist/components/TagInput/TagInput.types.d.ts +78 -0
  60. package/dist/components/Timeline/Timeline.d.cts +6 -0
  61. package/dist/components/Timeline/Timeline.d.ts +6 -0
  62. package/dist/components/Timeline/Timeline.types.d.cts +42 -0
  63. package/dist/components/Timeline/Timeline.types.d.ts +42 -0
  64. package/dist/components/Tour/Tour.d.cts +9 -0
  65. package/dist/components/Tour/Tour.d.ts +9 -0
  66. package/dist/components/Tour/Tour.types.d.cts +119 -0
  67. package/dist/components/Tour/Tour.types.d.ts +119 -0
  68. package/dist/components.css +1630 -124
  69. package/dist/icons.d.cts +6 -0
  70. package/dist/icons.d.ts +6 -0
  71. package/dist/index.cjs +3501 -1357
  72. package/dist/index.cjs.map +4 -4
  73. package/dist/index.d.cts +26 -0
  74. package/dist/index.d.ts +26 -0
  75. package/dist/index.js +3518 -1355
  76. package/dist/index.js.map +4 -4
  77. package/dist/openware-ui.iife.js +9 -8
  78. package/dist/styles.css +1630 -124
  79. package/package.json +1 -1
@@ -0,0 +1,69 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export type SplitterDirection = "horizontal" | "vertical";
3
+ export interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
4
+ /** SplitterPanels with a SplitterHandle between each pair, straight inside (fragments are fine). */
5
+ children: ReactNode;
6
+ /** `horizontal` puts the panels side by side, `vertical` stacks them.
7
+ * @default "horizontal" */
8
+ direction?: SplitterDirection;
9
+ /** Each panel's size in percent, in order, adding up to 100, when you control it. */
10
+ sizes?: number[];
11
+ /** The sizes at first, when it controls itself. Without it, each panel's `defaultSize` is used, and panels without
12
+ * one share what's left. */
13
+ defaultSizes?: number[];
14
+ /** Called with every panel's size, in percent, as they change: while dragging, on each key press, on collapsing. */
15
+ onSizesChange?(sizes: number[]): void;
16
+ /** Remembers the sizes in localStorage under this name and puts them back next time. Give each splitter its own. */
17
+ autoSaveId?: string;
18
+ }
19
+ export interface SplitterPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "onResize"> {
20
+ children?: ReactNode;
21
+ /** Its size at first, in percent of the splitter. Panels without one share what the others leave. */
22
+ defaultSize?: number;
23
+ /** The smallest it can be dragged, in percent. @default 0 */
24
+ minSize?: number;
25
+ /** The largest it can be dragged, in percent. @default 100 */
26
+ maxSize?: number;
27
+ /** Lets it fold away: dragging well past `minSize`, double-clicking its handle, or Enter on the handle collapses it
28
+ * to `collapsedSize`, and the same expands it again. @default false */
29
+ collapsible?: boolean;
30
+ /** Its size when collapsed, in percent: 0 hides it, more leaves a strip such as a rail of icons. @default 0 */
31
+ collapsedSize?: number;
32
+ /** Called with its new size, in percent, when it changes. */
33
+ onResize?(size: number): void;
34
+ /** Called when it collapses or expands. */
35
+ onCollapsedChange?(collapsed: boolean): void;
36
+ }
37
+ export interface SplitterHandleProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> {
38
+ /** Names the handle for screen readers: say which panel it resizes, such as "Resize sidebar".
39
+ * @default "Resize panels" */
40
+ "aria-label"?: string;
41
+ /** Shows a small grip on the line, so it's easier to see and to catch on a touch screen. @default false */
42
+ grip?: boolean;
43
+ /** Keeps the panels at their sizes: the handle can't be dragged or focused. @default false */
44
+ disabled?: boolean;
45
+ }
46
+ /** A panel's limits, in percent, as the layout maths reads them. Internal. */
47
+ export interface SplitterPanelLimits {
48
+ minSize: number;
49
+ maxSize: number;
50
+ collapsible: boolean;
51
+ collapsedSize: number;
52
+ }
53
+ /** What a Splitter shares with its panels and handles. Internal. */
54
+ export interface SplitterState {
55
+ direction: SplitterDirection;
56
+ sizes: number[];
57
+ limits: SplitterPanelLimits[];
58
+ /** Each panel's element id, for the handles' aria-controls. */
59
+ panelIds: string[];
60
+ /** Moves handle `handle` by `delta` percent; `snap` lets a collapsible panel fold or unfold on the way. */
61
+ move(handle: number, delta: number, snap: boolean, from?: number[]): void;
62
+ /** Collapses or expands the collapsible panel beside the handle. */
63
+ toggle(handle: number): void;
64
+ /** The panels' length along the direction, in pixels, and whether a horizontal splitter runs right to left. */
65
+ measure(): {
66
+ length: number;
67
+ reversed: boolean;
68
+ };
69
+ }
@@ -1,60 +1,4 @@
1
- import { type Key, type ReactNode } from "react";
2
- export interface TableColumn<Row> {
3
- /** Unique; also the row field shown when there's no `render`. */
4
- key: string;
5
- header: ReactNode;
6
- /** Numbers and amounts go at the end, so their digits line up.
7
- * @default "start" */
8
- align?: "start" | "center" | "end";
9
- /** A CSS width, e.g. 120 or "30%". */
10
- width?: number | string;
11
- /** Lets the person sort by this column. */
12
- sortable?: boolean;
13
- /** What the cell shows. Defaults to the row's field named by `key`. */
14
- render?(row: Row): ReactNode;
15
- /** The value sorted by, when it isn't the field itself. */
16
- sortValue?(row: Row): string | number;
17
- }
18
- export interface TableSort {
19
- key: string;
20
- direction: "ascending" | "descending";
21
- }
22
- export interface TableProps<Row> {
23
- columns: Array<TableColumn<Row>>;
24
- rows: Row[];
25
- /** A field name or function giving each row a unique key.
26
- * @default "id" */
27
- rowKey?: keyof Row | ((row: Row) => Key);
28
- /** Describes the table for screen readers; shown above it unless `hideCaption`. */
29
- caption?: ReactNode;
30
- /** @default false */
31
- hideCaption?: boolean;
32
- sort?: TableSort;
33
- defaultSort?: TableSort;
34
- onSortChange?(sort: TableSort): void;
35
- /** Sort the rows yourself (e.g. on a server) and only show the arrows.
36
- * @default false */
37
- manualSort?: boolean;
38
- /** Adds a checkbox column.
39
- * @default "none" */
40
- selectionMode?: "none" | "multiple";
41
- selectedKeys?: Key[];
42
- defaultSelectedKeys?: Key[];
43
- onSelectionChange?(keys: Key[]): void;
44
- /**
45
- * Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
46
- * first column's value when it's text or a number, else "row 3".
47
- */
48
- rowLabel?(row: Row): string;
49
- /** Shown in place of the rows when there are none, such as an EmptyState. */
50
- emptyContent?: ReactNode;
51
- /** `compact` rows are 36px; `comfortable` 44px.
52
- * @default "comfortable" */
53
- density?: "compact" | "comfortable";
54
- /** Keeps the header in view while the table scrolls; use with maxHeight. */
55
- stickyHeader?: boolean;
56
- maxHeight?: number | string;
57
- className?: string;
58
- }
59
- /** Rows of records with sortable columns and optional selection, in a bordered card. */
60
- export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
1
+ import type { TableProps } from "./Table.types.cjs";
2
+ export type { TableColumn, TableProps, TableSort } from "./Table.types.cjs";
3
+ /** Rows of records with sortable columns and optional selection: on a raised panel in a tray, or in a bordered card. */
4
+ export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, variant, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
@@ -1,60 +1,4 @@
1
- import { type Key, type ReactNode } from "react";
2
- export interface TableColumn<Row> {
3
- /** Unique; also the row field shown when there's no `render`. */
4
- key: string;
5
- header: ReactNode;
6
- /** Numbers and amounts go at the end, so their digits line up.
7
- * @default "start" */
8
- align?: "start" | "center" | "end";
9
- /** A CSS width, e.g. 120 or "30%". */
10
- width?: number | string;
11
- /** Lets the person sort by this column. */
12
- sortable?: boolean;
13
- /** What the cell shows. Defaults to the row's field named by `key`. */
14
- render?(row: Row): ReactNode;
15
- /** The value sorted by, when it isn't the field itself. */
16
- sortValue?(row: Row): string | number;
17
- }
18
- export interface TableSort {
19
- key: string;
20
- direction: "ascending" | "descending";
21
- }
22
- export interface TableProps<Row> {
23
- columns: Array<TableColumn<Row>>;
24
- rows: Row[];
25
- /** A field name or function giving each row a unique key.
26
- * @default "id" */
27
- rowKey?: keyof Row | ((row: Row) => Key);
28
- /** Describes the table for screen readers; shown above it unless `hideCaption`. */
29
- caption?: ReactNode;
30
- /** @default false */
31
- hideCaption?: boolean;
32
- sort?: TableSort;
33
- defaultSort?: TableSort;
34
- onSortChange?(sort: TableSort): void;
35
- /** Sort the rows yourself (e.g. on a server) and only show the arrows.
36
- * @default false */
37
- manualSort?: boolean;
38
- /** Adds a checkbox column.
39
- * @default "none" */
40
- selectionMode?: "none" | "multiple";
41
- selectedKeys?: Key[];
42
- defaultSelectedKeys?: Key[];
43
- onSelectionChange?(keys: Key[]): void;
44
- /**
45
- * Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
46
- * first column's value when it's text or a number, else "row 3".
47
- */
48
- rowLabel?(row: Row): string;
49
- /** Shown in place of the rows when there are none, such as an EmptyState. */
50
- emptyContent?: ReactNode;
51
- /** `compact` rows are 36px; `comfortable` 44px.
52
- * @default "comfortable" */
53
- density?: "compact" | "comfortable";
54
- /** Keeps the header in view while the table scrolls; use with maxHeight. */
55
- stickyHeader?: boolean;
56
- maxHeight?: number | string;
57
- className?: string;
58
- }
59
- /** Rows of records with sortable columns and optional selection, in a bordered card. */
60
- export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
1
+ import type { TableProps } from "./Table.types.js";
2
+ export type { TableColumn, TableProps, TableSort } from "./Table.types.js";
3
+ /** Rows of records with sortable columns and optional selection: on a raised panel in a tray, or in a bordered card. */
4
+ export declare function Table<Row extends object>({ columns, rows, rowKey, caption, hideCaption, sort, defaultSort, onSortChange, manualSort, selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange, rowLabel, emptyContent, variant, density, stickyHeader, maxHeight, className, }: TableProps<Row>): import("react").JSX.Element;
@@ -0,0 +1,64 @@
1
+ import type { Key, ReactNode } from "react";
2
+ export interface TableColumn<Row> {
3
+ /** Unique; also the row field shown when there's no `render`. */
4
+ key: string;
5
+ header: ReactNode;
6
+ /** Numbers and amounts go at the end, so their digits line up.
7
+ * @default "start" */
8
+ align?: "start" | "center" | "end";
9
+ /** A CSS width, e.g. 120 or "30%". */
10
+ width?: number | string;
11
+ /** Lets the person sort by this column. */
12
+ sortable?: boolean;
13
+ /** What the cell shows. Defaults to the row's field named by `key`. */
14
+ render?(row: Row): ReactNode;
15
+ /** The value sorted by, when it isn't the field itself. */
16
+ sortValue?(row: Row): string | number;
17
+ }
18
+ export interface TableSort {
19
+ key: string;
20
+ direction: "ascending" | "descending";
21
+ }
22
+ export interface TableProps<Row> {
23
+ columns: Array<TableColumn<Row>>;
24
+ rows: Row[];
25
+ /** A field name or function giving each row a unique key.
26
+ * @default "id" */
27
+ rowKey?: keyof Row | ((row: Row) => Key);
28
+ /** Describes the table for screen readers; shown above it unless `hideCaption`. */
29
+ caption?: ReactNode;
30
+ /** @default false */
31
+ hideCaption?: boolean;
32
+ sort?: TableSort;
33
+ defaultSort?: TableSort;
34
+ onSortChange?(sort: TableSort): void;
35
+ /** Sort the rows yourself (e.g. on a server) and only show the arrows.
36
+ * @default false */
37
+ manualSort?: boolean;
38
+ /** Adds a checkbox column.
39
+ * @default "none" */
40
+ selectionMode?: "none" | "multiple";
41
+ selectedKeys?: Key[];
42
+ defaultSelectedKeys?: Key[];
43
+ onSelectionChange?(keys: Key[]): void;
44
+ /**
45
+ * Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
46
+ * first column's value when it's text or a number, else "row 3".
47
+ */
48
+ rowLabel?(row: Row): string;
49
+ /** Shown in place of the rows when there are none, such as an EmptyState. */
50
+ emptyContent?: ReactNode;
51
+ /**
52
+ * `inset` sets the rows on a raised panel inside a tinted tray, with the header in the tray above them; `plain` is
53
+ * one bordered card with a shaded header row.
54
+ * @default "inset"
55
+ */
56
+ variant?: "inset" | "plain";
57
+ /** `compact` rows are 36px; `comfortable` 44px.
58
+ * @default "comfortable" */
59
+ density?: "compact" | "comfortable";
60
+ /** Keeps the header in view while the table scrolls; use with maxHeight. */
61
+ stickyHeader?: boolean;
62
+ maxHeight?: number | string;
63
+ className?: string;
64
+ }
@@ -0,0 +1,64 @@
1
+ import type { Key, ReactNode } from "react";
2
+ export interface TableColumn<Row> {
3
+ /** Unique; also the row field shown when there's no `render`. */
4
+ key: string;
5
+ header: ReactNode;
6
+ /** Numbers and amounts go at the end, so their digits line up.
7
+ * @default "start" */
8
+ align?: "start" | "center" | "end";
9
+ /** A CSS width, e.g. 120 or "30%". */
10
+ width?: number | string;
11
+ /** Lets the person sort by this column. */
12
+ sortable?: boolean;
13
+ /** What the cell shows. Defaults to the row's field named by `key`. */
14
+ render?(row: Row): ReactNode;
15
+ /** The value sorted by, when it isn't the field itself. */
16
+ sortValue?(row: Row): string | number;
17
+ }
18
+ export interface TableSort {
19
+ key: string;
20
+ direction: "ascending" | "descending";
21
+ }
22
+ export interface TableProps<Row> {
23
+ columns: Array<TableColumn<Row>>;
24
+ rows: Row[];
25
+ /** A field name or function giving each row a unique key.
26
+ * @default "id" */
27
+ rowKey?: keyof Row | ((row: Row) => Key);
28
+ /** Describes the table for screen readers; shown above it unless `hideCaption`. */
29
+ caption?: ReactNode;
30
+ /** @default false */
31
+ hideCaption?: boolean;
32
+ sort?: TableSort;
33
+ defaultSort?: TableSort;
34
+ onSortChange?(sort: TableSort): void;
35
+ /** Sort the rows yourself (e.g. on a server) and only show the arrows.
36
+ * @default false */
37
+ manualSort?: boolean;
38
+ /** Adds a checkbox column.
39
+ * @default "none" */
40
+ selectionMode?: "none" | "multiple";
41
+ selectedKeys?: Key[];
42
+ defaultSelectedKeys?: Key[];
43
+ onSelectionChange?(keys: Key[]): void;
44
+ /**
45
+ * Names a row for its checkbox, read out as "Select …": the person, the file, the project. Defaults to the
46
+ * first column's value when it's text or a number, else "row 3".
47
+ */
48
+ rowLabel?(row: Row): string;
49
+ /** Shown in place of the rows when there are none, such as an EmptyState. */
50
+ emptyContent?: ReactNode;
51
+ /**
52
+ * `inset` sets the rows on a raised panel inside a tinted tray, with the header in the tray above them; `plain` is
53
+ * one bordered card with a shaded header row.
54
+ * @default "inset"
55
+ */
56
+ variant?: "inset" | "plain";
57
+ /** `compact` rows are 36px; `comfortable` 44px.
58
+ * @default "comfortable" */
59
+ density?: "compact" | "comfortable";
60
+ /** Keeps the header in view while the table scrolls; use with maxHeight. */
61
+ stickyHeader?: boolean;
62
+ maxHeight?: number | string;
63
+ className?: string;
64
+ }
@@ -0,0 +1,7 @@
1
+ import type { TagInputProps } from "./TagInput.types.cjs";
2
+ export type { TagInputOption, TagInputProps, TagInputRejectReason } from "./TagInput.types.cjs";
3
+ /**
4
+ * Several values in one field: each shows as a removable tag before the text box. People type a value and press
5
+ * Enter or a comma, or paste a list. With `options`, it suggests values as they type, like Combobox.
6
+ */
7
+ export declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ import type { TagInputProps } from "./TagInput.types.js";
2
+ export type { TagInputOption, TagInputProps, TagInputRejectReason } from "./TagInput.types.js";
3
+ /**
4
+ * Several values in one field: each shows as a removable tag before the text box. People type a value and press
5
+ * Enter or a comma, or paste a list. With `options`, it suggests values as they type, like Combobox.
6
+ */
7
+ export declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,78 @@
1
+ import type { ReactNode } from "react";
2
+ export interface TagInputOption {
3
+ /** What goes in the value when it's picked. */
4
+ value: string;
5
+ /** The text shown in the list and on the tag, and matched as people type. */
6
+ label: string;
7
+ /** A muted line under the label in the list; also matched. */
8
+ description?: ReactNode;
9
+ disabled?: boolean;
10
+ }
11
+ /** Why a value wasn't added: `validate` refused it, it's already there, it isn't one of the options, or the field is full. */
12
+ /** An item in the suggestions: an option, or the one that adds what's typed. Internal. */
13
+ export type TagInputItem = {
14
+ option: TagInputOption;
15
+ } | {
16
+ create: string;
17
+ };
18
+ export type TagInputRejectReason = "invalid" | "duplicate" | "unknown" | "max";
19
+ export interface TagInputProps {
20
+ /** The values, when you control them. */
21
+ value?: string[];
22
+ /** The values at first, when it controls them itself.
23
+ * @default [] */
24
+ defaultValue?: string[];
25
+ /** Called with the new list when a value is added or removed. */
26
+ onChange?(value: string[]): void;
27
+ /** Suggestions shown in a list under the field, filtered by what's typed. Without them, it takes whatever is typed. */
28
+ options?: TagInputOption[];
29
+ /** With `options`, also takes values that aren't among them. Without options, it always does.
30
+ * @default false */
31
+ allowCustom?: boolean;
32
+ /** Checks a typed value before it's added; return false to refuse it. The text stays in the field to fix. */
33
+ validate?(text: string): boolean;
34
+ /** Called when a value isn't added, with the text and why, to show a message. */
35
+ onReject?(text: string, reason: TagInputRejectReason): void;
36
+ /** Keeps a value that's already there (compared ignoring case) instead of refusing it.
37
+ * @default false */
38
+ allowDuplicates?: boolean;
39
+ /** The most values it takes. */
40
+ max?: number;
41
+ /** Keys that add what's typed, besides Enter. A pasted list is split on these and on new lines.
42
+ * @default [","] */
43
+ separators?: string[];
44
+ /** Called as the person types, to load options from a server. */
45
+ onInputChange?(text: string): void;
46
+ /** Shown while there are no values. */
47
+ placeholder?: string;
48
+ /** Shown in the list when nothing matches.
49
+ * @default "No matches" */
50
+ emptyMessage?: ReactNode;
51
+ /** sm 32px for toolbars and settings rows, md 40px in forms; the field grows as tags wrap.
52
+ * @default "md" */
53
+ size?: "sm" | "md";
54
+ /** Shows the field as wrong, like Input. Field sets it when there's an error.
55
+ * @default false */
56
+ isInvalid?: boolean;
57
+ /** @default false */
58
+ disabled?: boolean;
59
+ /** Submits each value under this name, in a hidden input, so a Form or a plain form sends them as a list. */
60
+ name?: string;
61
+ /** The text box's id, which a Field's label points at. */
62
+ id?: string;
63
+ "aria-label"?: string;
64
+ "aria-labelledby"?: string;
65
+ "aria-describedby"?: string;
66
+ /** The words it uses, for other languages. */
67
+ labels?: {
68
+ /** The remove button on a tag, given its text. @default (tag) => `Remove ${tag}` */
69
+ remove?(tag: string): string;
70
+ /** Read out when a value is added. @default (tag) => `Added ${tag}` */
71
+ added?(tag: string): string;
72
+ /** Read out when a value is removed. @default (tag) => `Removed ${tag}` */
73
+ removed?(tag: string): string;
74
+ /** The option that adds what's typed, with `allowCustom` and options. @default (text) => `Add "${text}"` */
75
+ create?(text: string): string;
76
+ };
77
+ className?: string;
78
+ }
@@ -0,0 +1,78 @@
1
+ import type { ReactNode } from "react";
2
+ export interface TagInputOption {
3
+ /** What goes in the value when it's picked. */
4
+ value: string;
5
+ /** The text shown in the list and on the tag, and matched as people type. */
6
+ label: string;
7
+ /** A muted line under the label in the list; also matched. */
8
+ description?: ReactNode;
9
+ disabled?: boolean;
10
+ }
11
+ /** Why a value wasn't added: `validate` refused it, it's already there, it isn't one of the options, or the field is full. */
12
+ /** An item in the suggestions: an option, or the one that adds what's typed. Internal. */
13
+ export type TagInputItem = {
14
+ option: TagInputOption;
15
+ } | {
16
+ create: string;
17
+ };
18
+ export type TagInputRejectReason = "invalid" | "duplicate" | "unknown" | "max";
19
+ export interface TagInputProps {
20
+ /** The values, when you control them. */
21
+ value?: string[];
22
+ /** The values at first, when it controls them itself.
23
+ * @default [] */
24
+ defaultValue?: string[];
25
+ /** Called with the new list when a value is added or removed. */
26
+ onChange?(value: string[]): void;
27
+ /** Suggestions shown in a list under the field, filtered by what's typed. Without them, it takes whatever is typed. */
28
+ options?: TagInputOption[];
29
+ /** With `options`, also takes values that aren't among them. Without options, it always does.
30
+ * @default false */
31
+ allowCustom?: boolean;
32
+ /** Checks a typed value before it's added; return false to refuse it. The text stays in the field to fix. */
33
+ validate?(text: string): boolean;
34
+ /** Called when a value isn't added, with the text and why, to show a message. */
35
+ onReject?(text: string, reason: TagInputRejectReason): void;
36
+ /** Keeps a value that's already there (compared ignoring case) instead of refusing it.
37
+ * @default false */
38
+ allowDuplicates?: boolean;
39
+ /** The most values it takes. */
40
+ max?: number;
41
+ /** Keys that add what's typed, besides Enter. A pasted list is split on these and on new lines.
42
+ * @default [","] */
43
+ separators?: string[];
44
+ /** Called as the person types, to load options from a server. */
45
+ onInputChange?(text: string): void;
46
+ /** Shown while there are no values. */
47
+ placeholder?: string;
48
+ /** Shown in the list when nothing matches.
49
+ * @default "No matches" */
50
+ emptyMessage?: ReactNode;
51
+ /** sm 32px for toolbars and settings rows, md 40px in forms; the field grows as tags wrap.
52
+ * @default "md" */
53
+ size?: "sm" | "md";
54
+ /** Shows the field as wrong, like Input. Field sets it when there's an error.
55
+ * @default false */
56
+ isInvalid?: boolean;
57
+ /** @default false */
58
+ disabled?: boolean;
59
+ /** Submits each value under this name, in a hidden input, so a Form or a plain form sends them as a list. */
60
+ name?: string;
61
+ /** The text box's id, which a Field's label points at. */
62
+ id?: string;
63
+ "aria-label"?: string;
64
+ "aria-labelledby"?: string;
65
+ "aria-describedby"?: string;
66
+ /** The words it uses, for other languages. */
67
+ labels?: {
68
+ /** The remove button on a tag, given its text. @default (tag) => `Remove ${tag}` */
69
+ remove?(tag: string): string;
70
+ /** Read out when a value is added. @default (tag) => `Added ${tag}` */
71
+ added?(tag: string): string;
72
+ /** Read out when a value is removed. @default (tag) => `Removed ${tag}` */
73
+ removed?(tag: string): string;
74
+ /** The option that adds what's typed, with `allowCustom` and options. @default (text) => `Add "${text}"` */
75
+ create?(text: string): string;
76
+ };
77
+ className?: string;
78
+ }
@@ -0,0 +1,6 @@
1
+ import type { TimelineItemProps, TimelineProps } from "./Timeline.types.cjs";
2
+ export type { TimelineItemProps, TimelineProps, TimelineTone } from "./Timeline.types.cjs";
3
+ /** Events down a line, as an ordered list: an activity feed, a changelog or the history of a record. */
4
+ export declare function Timeline({ density, className, children, ...props }: TimelineProps): import("react").JSX.Element;
5
+ /** One event on a Timeline: a marker on the line (a dot, an icon or an avatar), a title, a time and anything under it. */
6
+ export declare function TimelineItem({ title, time, dateTime, tone, icon, avatar, pending, className, children, ...props }: TimelineItemProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { TimelineItemProps, TimelineProps } from "./Timeline.types.js";
2
+ export type { TimelineItemProps, TimelineProps, TimelineTone } from "./Timeline.types.js";
3
+ /** Events down a line, as an ordered list: an activity feed, a changelog or the history of a record. */
4
+ export declare function Timeline({ density, className, children, ...props }: TimelineProps): import("react").JSX.Element;
5
+ /** One event on a Timeline: a marker on the line (a dot, an icon or an avatar), a title, a time and anything under it. */
6
+ export declare function TimelineItem({ title, time, dateTime, tone, icon, avatar, pending, className, children, ...props }: TimelineItemProps): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import type { LiHTMLAttributes, OlHTMLAttributes, ReactNode } from "react";
2
+ /** The colour of an item's dot or icon circle, the same set as Badge and Alert. */
3
+ export type TimelineTone = "neutral" | "brand" | "success" | "warning" | "danger";
4
+ export interface TimelineProps extends OlHTMLAttributes<HTMLOListElement> {
5
+ /**
6
+ * `comfortable` is a changelog or a history: a bold title with the time at the end of its line, and room for a
7
+ * description or a card under it. `compact` is an activity feed: one sentence with the time after it, close
8
+ * together, for 24px avatars.
9
+ * @default "comfortable"
10
+ */
11
+ density?: "compact" | "comfortable";
12
+ /** The events, as `TimelineItem`s, in the order they read: newest first for a feed, oldest first for a plan. */
13
+ children?: ReactNode;
14
+ }
15
+ export interface TimelineItemProps extends Omit<LiHTMLAttributes<HTMLLIElement>, "title"> {
16
+ /** What happened: a heading in a changelog, or the whole sentence in a feed ("Ana merged #42"). */
17
+ title?: ReactNode;
18
+ /** When it happened, as people read it: "2h ago", "14 Oct", "v0.13.0 · 14 Oct". */
19
+ time?: ReactNode;
20
+ /**
21
+ * The machine-readable moment for `time`, such as "2026-10-13T14:32" or "2026-10-13". With it, the time is a
22
+ * `<time>` element that screen readers, search engines and scripts can read.
23
+ */
24
+ dateTime?: string;
25
+ /**
26
+ * The colour of the dot, or of the icon's circle. Brand for something in progress or by an agent, success for
27
+ * something that shipped, warning for something that needs you, danger for something that failed.
28
+ * @default "neutral"
29
+ */
30
+ tone?: TimelineTone;
31
+ /** A 14px icon in a circle in place of the dot, such as a rocket for a deploy. */
32
+ icon?: ReactNode;
33
+ /**
34
+ * An `Avatar` in place of the dot, for who did it. Size it to the timeline: `sm` (24px) when compact, `md` (28px)
35
+ * when comfortable.
36
+ */
37
+ avatar?: ReactNode;
38
+ /** Something that hasn't happened yet: a hollow marker, a muted title and a dashed line into and out of it. */
39
+ pending?: boolean;
40
+ /** More about it under the title: a line of description, a quoted comment, badges, a link. */
41
+ children?: ReactNode;
42
+ }
@@ -0,0 +1,42 @@
1
+ import type { LiHTMLAttributes, OlHTMLAttributes, ReactNode } from "react";
2
+ /** The colour of an item's dot or icon circle, the same set as Badge and Alert. */
3
+ export type TimelineTone = "neutral" | "brand" | "success" | "warning" | "danger";
4
+ export interface TimelineProps extends OlHTMLAttributes<HTMLOListElement> {
5
+ /**
6
+ * `comfortable` is a changelog or a history: a bold title with the time at the end of its line, and room for a
7
+ * description or a card under it. `compact` is an activity feed: one sentence with the time after it, close
8
+ * together, for 24px avatars.
9
+ * @default "comfortable"
10
+ */
11
+ density?: "compact" | "comfortable";
12
+ /** The events, as `TimelineItem`s, in the order they read: newest first for a feed, oldest first for a plan. */
13
+ children?: ReactNode;
14
+ }
15
+ export interface TimelineItemProps extends Omit<LiHTMLAttributes<HTMLLIElement>, "title"> {
16
+ /** What happened: a heading in a changelog, or the whole sentence in a feed ("Ana merged #42"). */
17
+ title?: ReactNode;
18
+ /** When it happened, as people read it: "2h ago", "14 Oct", "v0.13.0 · 14 Oct". */
19
+ time?: ReactNode;
20
+ /**
21
+ * The machine-readable moment for `time`, such as "2026-10-13T14:32" or "2026-10-13". With it, the time is a
22
+ * `<time>` element that screen readers, search engines and scripts can read.
23
+ */
24
+ dateTime?: string;
25
+ /**
26
+ * The colour of the dot, or of the icon's circle. Brand for something in progress or by an agent, success for
27
+ * something that shipped, warning for something that needs you, danger for something that failed.
28
+ * @default "neutral"
29
+ */
30
+ tone?: TimelineTone;
31
+ /** A 14px icon in a circle in place of the dot, such as a rocket for a deploy. */
32
+ icon?: ReactNode;
33
+ /**
34
+ * An `Avatar` in place of the dot, for who did it. Size it to the timeline: `sm` (24px) when compact, `md` (28px)
35
+ * when comfortable.
36
+ */
37
+ avatar?: ReactNode;
38
+ /** Something that hasn't happened yet: a hollow marker, a muted title and a dashed line into and out of it. */
39
+ pending?: boolean;
40
+ /** More about it under the title: a line of description, a quoted comment, badges, a link. */
41
+ children?: ReactNode;
42
+ }
@@ -0,0 +1,9 @@
1
+ import type { CoachmarkProps, TourProps } from "./Tour.types.cjs";
2
+ export type { CoachmarkProps, TourLabels, TourProps, TourStep, TourTarget } from "./Tour.types.cjs";
3
+ /**
4
+ * A guided tour: a card beside each part of the page in turn, with what it's for, Back and Next. Steps without a
5
+ * target show in the middle, for a welcome. It's non-modal, so the page stays usable; `spotlight` dims the rest of it.
6
+ */
7
+ export declare function Tour({ steps, open, defaultOpen, onOpenChange, step, defaultStep, onStepChange, onComplete, onSkip, spotlight, spotlightPadding, width, labels, className, }: TourProps): import("react").JSX.Element | null;
8
+ /** A single hint beside one control, with a button that dismisses it: for pointing out something new. */
9
+ export declare function Coachmark({ target, title, content, open, defaultOpen, onOpenChange, placement, dismissLabel, autoFocus, width, className, }: CoachmarkProps): import("react").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import type { CoachmarkProps, TourProps } from "./Tour.types.js";
2
+ export type { CoachmarkProps, TourLabels, TourProps, TourStep, TourTarget } from "./Tour.types.js";
3
+ /**
4
+ * A guided tour: a card beside each part of the page in turn, with what it's for, Back and Next. Steps without a
5
+ * target show in the middle, for a welcome. It's non-modal, so the page stays usable; `spotlight` dims the rest of it.
6
+ */
7
+ export declare function Tour({ steps, open, defaultOpen, onOpenChange, step, defaultStep, onStepChange, onComplete, onSkip, spotlight, spotlightPadding, width, labels, className, }: TourProps): import("react").JSX.Element | null;
8
+ /** A single hint beside one control, with a button that dismisses it: for pointing out something new. */
9
+ export declare function Coachmark({ target, title, content, open, defaultOpen, onOpenChange, placement, dismissLabel, autoFocus, width, className, }: CoachmarkProps): import("react").JSX.Element | null;