strata-react 0.1.14 → 0.1.16
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 +4 -3
- package/dist/components/checkbox.d.ts +14 -1
- package/dist/components/data-table.d.ts +14 -0
- package/dist/components/data-view.d.ts +24 -2
- package/dist/components/disclosure.d.ts +47 -0
- package/dist/components/selectable-grid.d.ts +29 -0
- package/dist/components/selection.d.ts +39 -2
- package/dist/index.d.ts +7 -5
- package/dist/index.js +561 -139
- package/dist/index.js.map +1 -1
- package/dist/query/index.d.ts +12 -2
- package/dist/{query-CkOrBm3w.js → query-BlPgaCBG.js} +20 -3
- package/dist/{query-CkOrBm3w.js.map → query-BlPgaCBG.js.map} +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,9 +119,10 @@ function KilnRoom() {
|
|
|
119
119
|
| Actions | `Button`, `IconButton`, `RowAction`, `AsyncButton`, `useAsyncAction` | Default is `outline`; one filled button per view; `IconButton` requires `label`; `RowAction` is named for its row ("Withdraw Tom Ellery"); `AsyncButton` keeps one width through idle, pending, done and error, and announces `error` with its retry label; `useAsyncAction` returns `{ phase, run, error }` with a stable `run`, and describes an `HttpError` in a sentence (`describeActionError`, or the product's own `describeError`) |
|
|
120
120
|
| Form | `Field`, `Input`, `Textarea`, `NativeSelect`, `ChoiceGroup`, `Checkbox` | `Field` wires label, hint, error, `aria-describedby`, `aria-invalid`; `Checkbox` requires `label` and is one target with it, and has a mixed state |
|
|
121
121
|
| Status and figures | `Status`, `Metric`, `MetricStrip`, `Meter`, `crossedThreshold`, `CompositionBar` | A status is always a word; figures have no icons or sparklines; `Meter` is a `meter` named for what it measures, with its reading in words ("72% used"), threshold notches, and a `Status` word once a threshold is crossed (each threshold must name its state); `CompositionBar` is a stacked bar over a table naming every part, its amount and share, and names the remainder (`total` needs `restLabel`) |
|
|
122
|
-
| Data | `DataView`, `Load<T>`, `EmptyState`, `Skeleton`, `Thumbnail`, `ThumbnailSkeleton`, `DataTable`, `TableSkeleton`, `VirtualList`, `InfiniteList`, `LineChart` | `DataView` requires skeleton and empty; `Thumbnail` is a remote image in a box of fixed `aspect`, with a skeleton while it loads, the required `missing` words when it fails or `src` is null, required `alt`, and a request only once it nears the screen (`eager` for the first few); tables and lists virtualise from 100 rows; `InfiniteList` loads the next page on approach, with a skeleton for it, a Try again row when it fails and a Show more button for the keyboard; charts label values directly |
|
|
123
|
-
| Selection | `useSelection`, `BulkBar`, `DataTable`'s `selection` (`RowSelection<T>`) | Opt-in checkbox column with "Select all shown" that respects `isSelectable`; the selection drops rows that are gone; `BulkBar` announces the count politely |
|
|
124
|
-
|
|
|
122
|
+
| Data | `DataView`, `Load<T>`, `Stale`, `StaleNotice`, `EmptyState`, `Skeleton`, `Thumbnail`, `ThumbnailSkeleton`, `DataTable`, `TableSkeleton`, `VirtualList`, `InfiniteList`, `LineChart` | `DataView` requires skeleton and empty, and keeps data on screen under a `StaleNotice` (why, how old, Try again) when a refresh fails; `Thumbnail` is a remote image in a box of fixed `aspect`, with a skeleton while it loads, the required `missing` words when it fails or `src` is null, required `alt`, and a request only once it nears the screen (`eager` for the first few); tables and lists virtualise from 100 rows; `InfiniteList` loads the next page on approach, with a skeleton for it, a Try again row when it fails and a Show more button for the keyboard; charts label values directly |
|
|
123
|
+
| Selection | `useSelection`, `BulkBar`, `SelectableGrid`, `DataTable`'s `selection` (`RowSelection<T>`) | Opt-in checkbox column with "Select all shown" that respects `isSelectable`; Shift-click or Shift+Space chooses or clears the run from the last row clicked, in the order shown; `initial` (keys or a test on the row) chooses a row the first time it appears, so it applies to data that loads later; the selection drops rows that are gone; `BulkBar` announces the count politely; `SelectableGrid` is the same selection as a grid of pictures (`renderImage`), each tile one labelled target, virtualised from 100 tiles |
|
|
124
|
+
| Expansion | `Disclosure`, `useExpanded`, `DataTable`'s `expansion` (`RowExpansion<T>`) | Show more of one row in place. The toggle is a button with `aria-expanded`; the body is mounted only while open, so a request inside it runs on first open (unlike `<details>`, which mounts every closed body); `useExpanded({ param })` shares the open keys across a list or table and keeps them in the URL; a table's detail row spans the data columns and is measured when virtualised |
|
|
125
|
+
| Data loading | `StrataQueryProvider`, `createQueryClient`, `useLoad`, `useInfiniteLoad`, `toLoad`, `staleOf`, `fetchJson`, `HttpError` | TanStack Query in, `Load<T>` out; a refetch that fails after a good read stays `ready` with `stale` set, never an error panel; `useInfiniteLoad` works out the cursor itself (after the last item held), merges pages by key and can `dismiss` an item at once |
|
|
125
126
|
| Page and navigation | `AppShell`, `SideNav`, `Breadcrumb`, `Tabs`, `PageHeader`, `LinkCard`, `LinkCardList` | React Router; tab and sort state in the URL; a `LinkCard` is one link named by its title, described by its text and `Status` marks, with the whole card as the target (`to` a route, `href` elsewhere, marked with an arrow) |
|
|
126
127
|
| Keyboard | `useHotkeys`, `KeysLegend`, `Shortcut`, `useActiveItem`, `ActiveList`, `isTypingTarget` | For queues worked from the keyboard; one shortcut list drives the handler and the legend; keys never fire while typing; answering moves focus to the next item |
|
|
127
128
|
| Theme | `ThemeProvider`, `useColorScheme`, `useSystemColorScheme`, `ColorSchemeChoice`, `colorSchemeScript` | System, light or dark; sets `.dark`, persists in localStorage when it can; `ColorSchemeChoice` is a radio list for a settings page, or `compact` icon segments named "Appearance" for an app with no settings page |
|
|
@@ -8,7 +8,20 @@ export type CheckboxProps = Omit<React.ComponentProps<"input">, "type" | "checke
|
|
|
8
8
|
/** A muted second line under a shown label. */
|
|
9
9
|
detail?: string;
|
|
10
10
|
checked: boolean | "mixed";
|
|
11
|
-
|
|
11
|
+
/** Called with the new state, and whether Shift was held (a range click or Shift+Space). */
|
|
12
|
+
onCheckedChange: (checked: boolean, gesture: CheckboxGesture) => void;
|
|
13
|
+
};
|
|
14
|
+
/** How a checkbox was changed: `shiftKey` is true for Shift+click and Shift+Space, which extend a range in a list. */
|
|
15
|
+
export type CheckboxGesture = {
|
|
16
|
+
shiftKey: boolean;
|
|
12
17
|
};
|
|
13
18
|
/** A native checkbox and its label as one target. `label` is required; `hideLabel` keeps it as the accessible name only. */
|
|
14
19
|
export declare function Checkbox({ label, hideLabel, detail, checked, onCheckedChange, className, disabled, ...props }: CheckboxProps): React.JSX.Element;
|
|
20
|
+
/** Notes Shift on the press that leads to a checkbox's change event, which has no modifier keys of its own. */
|
|
21
|
+
export declare function useShiftNote(): {
|
|
22
|
+
handlers: {
|
|
23
|
+
onMouseDown: (e: React.MouseEvent) => undefined;
|
|
24
|
+
onKeyDown: (e: React.KeyboardEvent) => undefined;
|
|
25
|
+
};
|
|
26
|
+
take: () => CheckboxGesture;
|
|
27
|
+
};
|
|
@@ -22,6 +22,18 @@ export type RowSelection<T> = {
|
|
|
22
22
|
/** Rows that cannot be chosen get a disabled checkbox and are left out of select-all. Default: every row. */
|
|
23
23
|
isSelectable?: (row: T) => boolean;
|
|
24
24
|
};
|
|
25
|
+
/** Row expansion for a `DataTable`: the open row keys, how to change them, how to name each toggle, and the detail to show. */
|
|
26
|
+
export type RowExpansion<T> = {
|
|
27
|
+
/** Keys (from `rowKey`) of the open rows. */
|
|
28
|
+
expanded: ReadonlySet<string>;
|
|
29
|
+
onChange: (next: Set<string>) => void;
|
|
30
|
+
/** Names the row's toggle by what it shows: "Pieces in firing 412". Its state is `aria-expanded`, so the name stays the same open or closed. */
|
|
31
|
+
rowLabel: (row: T) => string;
|
|
32
|
+
/** The row's detail, mounted only while it is open. Return an element whose component makes any request, so the request runs on open. */
|
|
33
|
+
detail: (row: T) => React.ReactNode;
|
|
34
|
+
/** Rows with nothing to show get no toggle. Default: every row. */
|
|
35
|
+
isExpandable?: (row: T) => boolean;
|
|
36
|
+
};
|
|
25
37
|
export type Sort = {
|
|
26
38
|
key: string;
|
|
27
39
|
dir: "ascending" | "descending";
|
|
@@ -41,6 +53,8 @@ export type DataTableProps<T> = {
|
|
|
41
53
|
maxHeight?: number;
|
|
42
54
|
/** Adds a checkbox column and "Select all shown". Use only where a `BulkBar` acts on the selection. */
|
|
43
55
|
selection?: RowSelection<T>;
|
|
56
|
+
/** Adds a toggle per row that opens a detail row under it. Spread `useExpanded()` in with a `rowLabel` and `detail`. */
|
|
57
|
+
expansion?: RowExpansion<T>;
|
|
44
58
|
className?: string;
|
|
45
59
|
};
|
|
46
60
|
/** Reads a sort from its URL form (`pieces.desc`). */
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/** Data still shown after a refresh failed: why the refresh failed, when the data was read, and the Try again. */
|
|
3
|
+
export type Stale = {
|
|
4
|
+
/** Why the refresh failed, for a person: the sentence an error panel would have shown. */
|
|
5
|
+
message: string;
|
|
6
|
+
/** When the data on screen was read. */
|
|
7
|
+
readAt: Date;
|
|
8
|
+
/** Fetch again. */
|
|
9
|
+
retry: () => void;
|
|
10
|
+
/** A fetch is on its way (a Try again or the next poll). */
|
|
11
|
+
retrying?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** The state of one remote read, for `DataView`: loading, failed with no data, or ready (and `stale` when a later refresh failed). */
|
|
2
14
|
export type Load<T> = {
|
|
3
15
|
status: "loading";
|
|
4
16
|
} | {
|
|
@@ -8,9 +20,10 @@ export type Load<T> = {
|
|
|
8
20
|
} | {
|
|
9
21
|
status: "ready";
|
|
10
22
|
data: T;
|
|
23
|
+
stale?: Stale;
|
|
11
24
|
};
|
|
12
|
-
/** Every view of remote data: renders `skeleton` while loading, an alert with Try again on error, `empty` when `isEmpty`, else `children(data)
|
|
13
|
-
export declare function DataView<T>({ state, isEmpty, skeleton, empty, children, className, }: {
|
|
25
|
+
/** Every view of remote data: renders `skeleton` while loading, an alert with Try again on error, `empty` when `isEmpty`, else `children(data)`, under a `StaleNotice` when a refresh failed. The skeleton and empty state are required. */
|
|
26
|
+
export declare function DataView<T>({ state, isEmpty, skeleton, empty, children, staleNotice, className, }: {
|
|
14
27
|
state: Load<T>;
|
|
15
28
|
/** When the loaded data counts as empty. For arrays, `(rows) => rows.length === 0`. */
|
|
16
29
|
isEmpty: (data: T) => boolean;
|
|
@@ -19,6 +32,15 @@ export declare function DataView<T>({ state, isEmpty, skeleton, empty, children,
|
|
|
19
32
|
/** What goes here and how to add it. An `EmptyState`, not an illustration. */
|
|
20
33
|
empty: React.ReactNode;
|
|
21
34
|
children: (data: T) => React.ReactNode;
|
|
35
|
+
/** Shown above the data when a refresh failed. Defaults to a `StaleNotice`; pass one with the product's words for what is old ("Readings from 13:50"). */
|
|
36
|
+
staleNotice?: (stale: Stale) => React.ReactNode;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
/** The notice over data whose refresh failed: what happened, how old the data shown is, and Try again. A polite status, not an alert: nothing was lost. */
|
|
40
|
+
export declare function StaleNotice({ stale, shown, className, }: {
|
|
41
|
+
stale: Stale;
|
|
42
|
+
/** What is old, in the product's words, given when it was read ("13:50", or "Sat 13:50" before today). Defaults to "Showing data from 13:50." */
|
|
43
|
+
shown?: (when: string) => React.ReactNode;
|
|
22
44
|
className?: string;
|
|
23
45
|
}): React.JSX.Element;
|
|
24
46
|
/** An empty state that teaches the next action: a title, a sentence and an action. No illustration slot, on purpose. */
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Open and closed disclosure state: controlled with `open` and `onOpenChange`, or uncontrolled from `defaultOpen`. */
|
|
3
|
+
export type DisclosureOpenProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
defaultOpen?: never;
|
|
7
|
+
} | {
|
|
8
|
+
open?: never;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type DisclosureProps = DisclosureOpenProps & {
|
|
13
|
+
/** The always-visible line, and the button's accessible name: text and marks, no controls. */
|
|
14
|
+
summary: React.ReactNode;
|
|
15
|
+
/** Mounted only while open, so a request inside runs when the person opens it. */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/** Controls for the row (a `RowAction`), beside the summary and outside its button. */
|
|
18
|
+
actions?: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Shows more of one thing in place: a button with `aria-expanded` around `summary`, and a body mounted only while open (so a request inside it runs on first open). Controlled with `open`/`onOpenChange` or `useExpanded`, or uncontrolled with `defaultOpen`. */
|
|
22
|
+
export declare function Disclosure({ summary, children, actions, open, defaultOpen, onOpenChange, className }: DisclosureProps): React.JSX.Element;
|
|
23
|
+
/** The disclosure chevron: points right when closed, down when open. Shared with `DataTable`'s row toggle. */
|
|
24
|
+
export declare function Chevron({ open, className }: {
|
|
25
|
+
open: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
/** Which of many disclosures are open, by key: spread into `DataTable`'s `expansion`, or read with `isOpen`/`setOpen` for a list of `Disclosure`s. */
|
|
29
|
+
export type Expanded = {
|
|
30
|
+
/** Keys of the open items. */
|
|
31
|
+
expanded: ReadonlySet<string>;
|
|
32
|
+
/** Replaces the open set. `DataTable` calls this. */
|
|
33
|
+
onChange: (next: Set<string>) => void;
|
|
34
|
+
isOpen: (key: string) => boolean;
|
|
35
|
+
setOpen: (key: string, open: boolean) => void;
|
|
36
|
+
collapseAll: () => void;
|
|
37
|
+
};
|
|
38
|
+
export type ExpandedOptions = {
|
|
39
|
+
/** Keep the open keys in this URL search parameter (`?open=a&open=b`), so an opened row can be linked and survives a reload. Needs a React Router context. */
|
|
40
|
+
param?: string;
|
|
41
|
+
/** Keys open at first. Ignored with `param`: there the URL says what is open, so a link that opens a row carries it. */
|
|
42
|
+
initial?: Iterable<string>;
|
|
43
|
+
/** Opening one closes the others (an accordion). Default false: people compare two rows. */
|
|
44
|
+
single?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** Shared open state for the disclosures of one list or table, optionally kept in the URL (`param`). */
|
|
47
|
+
export declare function useExpanded(options?: ExpandedOptions): Expanded;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RowSelection } from './data-table';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** The frame each picture is drawn in. */
|
|
4
|
+
export type TileAspect = "square" | "portrait" | "landscape";
|
|
5
|
+
/** Smallest tile width: `sm` 96px (dense crops), `md` 144px, `lg` 192px. Tiles grow to fill the row. */
|
|
6
|
+
export type TileSize = "sm" | "md" | "lg";
|
|
7
|
+
export type SelectableGridProps<T> = {
|
|
8
|
+
/** Names the list of tiles (and its scroll region once virtualised). */
|
|
9
|
+
label: string;
|
|
10
|
+
rows: T[];
|
|
11
|
+
rowKey: (row: T) => string;
|
|
12
|
+
/** The picture, drawn to fill a frame of `aspect`. An `<img className="size-full object-cover">` or a `Thumbnail`. */
|
|
13
|
+
renderImage: (row: T) => React.ReactNode;
|
|
14
|
+
/** A short line under the picture (a name, a date, a score). Truncated to one line. */
|
|
15
|
+
detail?: (row: T) => React.ReactNode;
|
|
16
|
+
/** The chosen keys and how to change them, as `DataTable` takes them; `rowLabel` names each tile's box. */
|
|
17
|
+
selection: RowSelection<T>;
|
|
18
|
+
/** Default `square`. `portrait` is 3:4, `landscape` 4:3. */
|
|
19
|
+
aspect?: TileAspect;
|
|
20
|
+
/** Default `md`. */
|
|
21
|
+
tileSize?: TileSize;
|
|
22
|
+
/** Tile count from which only the visible rows of tiles render. Default 100. */
|
|
23
|
+
virtualizeFrom?: number;
|
|
24
|
+
/** Height of the scroll region once virtualised, in px. Default 480. */
|
|
25
|
+
maxHeight?: number;
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
/** A grid of pictures to choose from: each tile one labelled target, "Select all shown", Shift-click ranges, virtualised from `virtualizeFrom` tiles. Pair with `useSelection` and a `BulkBar`. */
|
|
29
|
+
export declare function SelectableGrid<T>({ label, rows, rowKey, renderImage, detail, selection, aspect, tileSize, virtualizeFrom, maxHeight, className, }: SelectableGridProps<T>): React.JSX.Element;
|
|
@@ -1,13 +1,49 @@
|
|
|
1
1
|
import { Format } from '../lib/format';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
/**
|
|
4
|
-
export
|
|
3
|
+
/** Which rows start chosen: their keys, or a test on each row. Either applies to a row the first time it appears. */
|
|
4
|
+
export type InitialSelection<T> = Iterable<string> | ((row: T) => boolean);
|
|
5
|
+
/**
|
|
6
|
+
* Chosen row keys, pruned to the rows that exist, and the calls that change them. Spread into
|
|
7
|
+
* `DataTable`'s or `SelectableGrid`'s `selection` with a `rowLabel`. `initial` (keys, or a test on
|
|
8
|
+
* the row) chooses each row the first time it appears, so a selection seeded from data that loads
|
|
9
|
+
* later, or a next page, still starts right.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useSelection<T>(rows: readonly T[], rowKey: (row: T) => string, initial?: InitialSelection<T>): {
|
|
5
12
|
selected: ReadonlySet<string>;
|
|
6
13
|
selectedRows: T[];
|
|
7
14
|
count: number;
|
|
8
15
|
onChange: (next: Set<string>) => void;
|
|
9
16
|
clear: () => void;
|
|
10
17
|
};
|
|
18
|
+
/** The part of a selection the surfaces drawing it (`DataTable`, `SelectableGrid`) need. */
|
|
19
|
+
type SelectionLike<T> = {
|
|
20
|
+
selected: ReadonlySet<string>;
|
|
21
|
+
onChange: (next: Set<string>) => void;
|
|
22
|
+
isSelectable?: (row: T) => boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Selecting rows of a surface in the order it shows them: one row, a range with Shift, and all
|
|
26
|
+
* shown. Shared by `DataTable` and `SelectableGrid`, so a range and select-all behave the same on
|
|
27
|
+
* both. `rows` are in display order (after sorting) and include rows a virtualised surface has not
|
|
28
|
+
* rendered.
|
|
29
|
+
*
|
|
30
|
+
* A range runs from the last row clicked (the anchor) to this one, over the selectable rows
|
|
31
|
+
* between, and sets them all to this row's new state, as Gmail and Finder do: Shift-clicking an
|
|
32
|
+
* unchosen row chooses the run, Shift-clicking a chosen one clears it. Every click moves the
|
|
33
|
+
* anchor. An anchor that has left the rows (filtered, removed) makes the next Shift-click a plain
|
|
34
|
+
* one.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function useSelectRows<T>(rows: readonly T[], rowKey: (row: T) => string, selection?: SelectionLike<T>): {
|
|
38
|
+
toggle: (key: string, on: boolean, { shiftKey }: {
|
|
39
|
+
shiftKey: boolean;
|
|
40
|
+
}) => void;
|
|
41
|
+
all: {
|
|
42
|
+
checked: boolean | "mixed";
|
|
43
|
+
toggle: () => void;
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
11
47
|
/** The bar for a selection: a polite live count ("2 bookings selected"), the bulk actions, and Clear selection. Renders only the live region while nothing is chosen. */
|
|
12
48
|
export declare function BulkBar({ count, noun, onClear, children, format, className, }: {
|
|
13
49
|
count: number;
|
|
@@ -20,3 +56,4 @@ export declare function BulkBar({ count, noun, onClear, children, format, classN
|
|
|
20
56
|
format?: Format;
|
|
21
57
|
className?: string;
|
|
22
58
|
}): React.JSX.Element;
|
|
59
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { cn, typeSteps } from './lib/utils';
|
|
|
9
9
|
export { createFormat, format, NBSP, toDate, type ByteUnit, type DateFormatter, type DateInput, type Format, type FormatOptions, type NumberFormatter } from './lib/format';
|
|
10
10
|
export type { IconComponent } from './lib/icon';
|
|
11
11
|
export { Button, IconButton, RowAction, buttonVariants, type ButtonProps, type IconButtonProps, type RowActionProps, } from './components/button';
|
|
12
|
-
export { Checkbox, type CheckboxProps } from './components/checkbox';
|
|
12
|
+
export { Checkbox, type CheckboxProps, type CheckboxGesture } from './components/checkbox';
|
|
13
13
|
export { AsyncButton, useAsyncAction, type Phase, type AsyncLabels, type AsyncAction, type AsyncActionOptions } from './components/async-button';
|
|
14
14
|
export { Field, Input, Textarea, NativeSelect, ChoiceGroup, type FieldProps, type Choice } from './components/field';
|
|
15
15
|
export { Status, type Tone } from './components/status';
|
|
@@ -17,10 +17,12 @@ export { Metric, MetricStrip, type MetricProps } from './components/metric';
|
|
|
17
17
|
export { Meter, crossedThreshold, type MeterProps, type MeterThreshold } from './components/meter';
|
|
18
18
|
export { CompositionBar, type CompositionBarProps, type CompositionPart } from './components/composition';
|
|
19
19
|
export { LinkCard, LinkCardList, type LinkCardProps } from './components/link-card';
|
|
20
|
-
export { DataView, EmptyState, Skeleton, type Load } from './components/data-view';
|
|
20
|
+
export { DataView, EmptyState, Skeleton, StaleNotice, type Load, type Stale } from './components/data-view';
|
|
21
21
|
export { Thumbnail, ThumbnailSkeleton, type ThumbnailProps, type AspectRatio } from './components/thumbnail';
|
|
22
|
-
export { DataTable, TableSkeleton, parseSort, serialiseSort, type Column, type Sort, type DataTableProps, type RowSelection, } from './components/data-table';
|
|
23
|
-
export {
|
|
22
|
+
export { DataTable, TableSkeleton, parseSort, serialiseSort, type Column, type Sort, type DataTableProps, type RowSelection, type RowExpansion, } from './components/data-table';
|
|
23
|
+
export { Disclosure, useExpanded, type DisclosureProps, type DisclosureOpenProps, type Expanded, type ExpandedOptions } from './components/disclosure';
|
|
24
|
+
export { BulkBar, useSelection, type InitialSelection } from './components/selection';
|
|
25
|
+
export { SelectableGrid, type SelectableGridProps, type TileAspect, type TileSize, } from './components/selectable-grid';
|
|
24
26
|
export { VirtualList } from './components/virtual-list';
|
|
25
27
|
export { InfiniteList, type InfiniteListProps } from './components/infinite-list';
|
|
26
28
|
export { LineChart, type LineChartProps, type Point } from './components/line-chart';
|
|
@@ -32,5 +34,5 @@ export { Tabs, type TabItem } from './components/tabs';
|
|
|
32
34
|
export { useHotkeys, KeysLegend, isTypingTarget, type Shortcut } from './components/hotkeys';
|
|
33
35
|
export { useActiveItem, ActiveList, type ActiveItem } from './components/active-list';
|
|
34
36
|
export { ThemeProvider, useColorScheme, useSystemColorScheme, ColorSchemeChoice, colorSchemeScript, COLOR_SCHEME_STORAGE_KEY, type ColorScheme, type ColorSchemePreference, type ColorSchemeLabels, type ColorSchemeState, } from './components/theme';
|
|
35
|
-
export { StrataQueryProvider, createQueryClient, toLoad, useLoad, useInfiniteLoad, fetchJson, HttpError, describeHttpError, type DescribeError, type InfiniteLoad, type InfiniteLoadOptions, type More, } from './query';
|
|
37
|
+
export { StrataQueryProvider, createQueryClient, toLoad, staleOf, useLoad, useInfiniteLoad, fetchJson, HttpError, describeHttpError, type DescribeError, type InfiniteLoad, type InfiniteLoadOptions, type More, } from './query';
|
|
36
38
|
export { describeActionError } from './lib/errors';
|