@twentyfirstmedia/ui-core 0.5.0 → 0.7.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.
- package/dist/components/admin.d.ts.map +1 -1
- package/dist/components/admin.js +31 -21
- package/dist/components/admin.js.map +1 -1
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +21 -18
- package/dist/components/agents.js.map +1 -1
- package/dist/components/app-chrome.d.ts.map +1 -1
- package/dist/components/app-chrome.js +5 -5
- package/dist/components/app-chrome.js.map +1 -1
- package/dist/components/approvals.d.ts.map +1 -1
- package/dist/components/approvals.js +2 -2
- package/dist/components/approvals.js.map +1 -1
- package/dist/components/building-blocks.d.ts.map +1 -1
- package/dist/components/building-blocks.js +13 -10
- package/dist/components/building-blocks.js.map +1 -1
- package/dist/components/charts.d.ts +2 -2
- package/dist/components/charts.d.ts.map +1 -1
- package/dist/components/charts.js +14 -11
- package/dist/components/charts.js.map +1 -1
- package/dist/components/chat.d.ts +2 -2
- package/dist/components/chat.d.ts.map +1 -1
- package/dist/components/chat.js +22 -18
- package/dist/components/chat.js.map +1 -1
- package/dist/components/commerce.d.ts.map +1 -1
- package/dist/components/commerce.js +20 -16
- package/dist/components/commerce.js.map +1 -1
- package/dist/components/data-display.d.ts +0 -5
- package/dist/components/data-display.d.ts.map +1 -1
- package/dist/components/data-display.js +41 -22
- package/dist/components/data-display.js.map +1 -1
- package/dist/components/data-table.d.ts +2 -2
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +3 -3
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/developer.d.ts.map +1 -1
- package/dist/components/developer.js +7 -6
- package/dist/components/developer.js.map +1 -1
- package/dist/components/feedback.d.ts.map +1 -1
- package/dist/components/feedback.js +5 -4
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/forms.d.ts.map +1 -1
- package/dist/components/forms.js +63 -21
- package/dist/components/forms.js.map +1 -1
- package/dist/components/foundation.d.ts.map +1 -1
- package/dist/components/foundation.js +13 -9
- package/dist/components/foundation.js.map +1 -1
- package/dist/components/household.d.ts +19 -0
- package/dist/components/household.d.ts.map +1 -0
- package/dist/components/household.js +137 -0
- package/dist/components/household.js.map +1 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs.d.ts.map +1 -1
- package/dist/components/inputs.js +33 -8
- package/dist/components/inputs.js.map +1 -1
- package/dist/components/life.d.ts +26 -0
- package/dist/components/life.d.ts.map +1 -0
- package/dist/components/life.js +186 -0
- package/dist/components/life.js.map +1 -0
- package/dist/components/mail.d.ts.map +1 -1
- package/dist/components/mail.js +5 -5
- package/dist/components/mail.js.map +1 -1
- package/dist/components/media.d.ts.map +1 -1
- package/dist/components/media.js +62 -11
- package/dist/components/media.js.map +1 -1
- package/dist/components/navigation.d.ts +3 -1
- package/dist/components/navigation.d.ts.map +1 -1
- package/dist/components/navigation.js +287 -20
- package/dist/components/navigation.js.map +1 -1
- package/dist/components/operations.d.ts.map +1 -1
- package/dist/components/operations.js +10 -10
- package/dist/components/operations.js.map +1 -1
- package/dist/components/overlays.d.ts.map +1 -1
- package/dist/components/overlays.js +2 -2
- package/dist/components/overlays.js.map +1 -1
- package/dist/components/previews.js +2 -2
- package/dist/components/previews.js.map +1 -1
- package/dist/components/primitives.js +2 -2
- package/dist/components/primitives.js.map +1 -1
- package/dist/components/qr-code.d.ts +8 -0
- package/dist/components/qr-code.d.ts.map +1 -0
- package/dist/components/qr-code.js +18 -0
- package/dist/components/qr-code.js.map +1 -0
- package/dist/components/real-estate.d.ts.map +1 -1
- package/dist/components/real-estate.js +5 -5
- package/dist/components/real-estate.js.map +1 -1
- package/dist/components/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor.js +1 -1
- package/dist/components/rich-text-editor.js.map +1 -1
- package/dist/components/select-menu.js +1 -1
- package/dist/components/select-menu.js.map +1 -1
- package/dist/components/shell.d.ts +0 -4
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +100 -7
- package/dist/components/shell.js.map +1 -1
- package/dist/components/site.d.ts.map +1 -1
- package/dist/components/site.js +8 -6
- package/dist/components/site.js.map +1 -1
- package/dist/components/status.d.ts.map +1 -1
- package/dist/components/status.js +2 -2
- package/dist/components/status.js.map +1 -1
- package/dist/components/system.d.ts.map +1 -1
- package/dist/components/system.js +3 -2
- package/dist/components/system.js.map +1 -1
- package/dist/components/types.d.ts +589 -18
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/workspace.d.ts.map +1 -1
- package/dist/components/workspace.js +15 -12
- package/dist/components/workspace.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/qr.d.ts +14 -0
- package/dist/qr.d.ts.map +1 -0
- package/dist/qr.js +298 -0
- package/dist/qr.js.map +1 -0
- package/dist/strings.d.ts +126 -4
- package/dist/strings.d.ts.map +1 -1
- package/dist/strings.js +88 -1
- package/dist/strings.js.map +1 -1
- package/dist/themes.css +15592 -10463
- package/package.json +2 -1
- package/src/components/admin.tsx +66 -23
- package/src/components/agents.tsx +22 -20
- package/src/components/app-chrome.tsx +9 -5
- package/src/components/approvals.tsx +3 -1
- package/src/components/building-blocks.tsx +24 -13
- package/src/components/charts.tsx +17 -12
- package/src/components/chat.tsx +54 -31
- package/src/components/commerce.tsx +58 -24
- package/src/components/data-display.tsx +106 -38
- package/src/components/data-table.tsx +11 -7
- package/src/components/developer.tsx +15 -6
- package/src/components/feedback.tsx +5 -3
- package/src/components/forms.tsx +101 -23
- package/src/components/foundation.tsx +9 -5
- package/src/components/household.tsx +489 -0
- package/src/components/index.ts +32 -1
- package/src/components/inputs.tsx +44 -7
- package/src/components/life.tsx +672 -0
- package/src/components/mail.tsx +7 -3
- package/src/components/media.tsx +88 -16
- package/src/components/navigation.tsx +651 -71
- package/src/components/operations.tsx +17 -8
- package/src/components/overlays.tsx +7 -2
- package/src/components/previews.tsx +2 -2
- package/src/components/primitives.tsx +2 -2
- package/src/components/qr-code.tsx +30 -0
- package/src/components/real-estate.tsx +7 -4
- package/src/components/rich-text-editor.tsx +7 -1
- package/src/components/select-menu.tsx +1 -1
- package/src/components/shell.tsx +237 -11
- package/src/components/site.tsx +18 -4
- package/src/components/status.tsx +2 -0
- package/src/components/system.tsx +3 -2
- package/src/components/types.ts +583 -18
- package/src/components/workspace.tsx +37 -15
- package/src/index.ts +2 -0
- package/src/qr.ts +300 -0
- package/src/strings.ts +297 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, CSSProperties, MouseEvent, ReactNode } from "react";
|
|
1
|
+
import type { ChangeEvent, CSSProperties, ElementType, FocusEvent, InputHTMLAttributes, KeyboardEvent, MouseEvent, ReactNode, Ref } from "react";
|
|
2
2
|
import type { IconName } from "../icons.js";
|
|
3
3
|
import type { ToastOptions } from "../toast-store.js";
|
|
4
4
|
import type { Surface } from "../provider.js";
|
|
@@ -131,9 +131,21 @@ export interface SearchFieldProps extends BaseProps {
|
|
|
131
131
|
placeholder?: string;
|
|
132
132
|
/** Accessible name (default: the placeholder, or "Search"). */
|
|
133
133
|
label?: string;
|
|
134
|
+
/** The key hint, e.g. "⌘K" (hidden on touch screens). */
|
|
134
135
|
shortcut?: string;
|
|
136
|
+
/** ⌘/Ctrl + the hint's last key (K for "⌘K") focuses the field, except while typing elsewhere. */
|
|
137
|
+
bindShortcut?: boolean;
|
|
135
138
|
value?: string;
|
|
139
|
+
defaultValue?: string;
|
|
136
140
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
141
|
+
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
142
|
+
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
143
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
144
|
+
id?: string;
|
|
145
|
+
name?: string;
|
|
146
|
+
autoFocus?: boolean;
|
|
147
|
+
/** For a search with suggestions (combobox): role, aria-controls, aria-activedescendant … */
|
|
148
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
137
149
|
}
|
|
138
150
|
export interface CheckboxProps extends BaseProps {
|
|
139
151
|
name?: string;
|
|
@@ -208,7 +220,10 @@ export interface PanelProps extends BaseProps {
|
|
|
208
220
|
surface?: Surface;
|
|
209
221
|
}
|
|
210
222
|
export interface PageHeaderProps extends BaseProps {
|
|
211
|
-
|
|
223
|
+
/** A breadcrumb above the title (see `Breadcrumb`): labels, or items with `href`/`onClick`. */
|
|
224
|
+
crumbs?: (string | Crumb)[];
|
|
225
|
+
/** The element crumb links render as, e.g. Next.js `Link`. */
|
|
226
|
+
crumbLinkAs?: ElementType;
|
|
212
227
|
title: string;
|
|
213
228
|
subtitle?: string;
|
|
214
229
|
actions?: ReactNode[];
|
|
@@ -219,7 +234,8 @@ export interface NavItem {
|
|
|
219
234
|
count?: number;
|
|
220
235
|
}
|
|
221
236
|
export interface TopBarProps extends BaseProps {
|
|
222
|
-
|
|
237
|
+
/** The product name, or a node (a logo mark with the name). */
|
|
238
|
+
brand?: ReactNode;
|
|
223
239
|
tag?: string;
|
|
224
240
|
items: NavItem[];
|
|
225
241
|
active?: string;
|
|
@@ -242,6 +258,14 @@ export interface RailItem {
|
|
|
242
258
|
export interface SideRailProps extends BaseProps {
|
|
243
259
|
top?: RailItem[];
|
|
244
260
|
bottom?: RailItem[];
|
|
261
|
+
/** Names next to the icons (controlled); every button has a tooltip while collapsed. */
|
|
262
|
+
expanded?: boolean;
|
|
263
|
+
defaultExpanded?: boolean;
|
|
264
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
265
|
+
/** A button at the foot that expands and collapses the rail. */
|
|
266
|
+
toggle?: boolean;
|
|
267
|
+
/** Accessible name of the rail (default "Tools"). */
|
|
268
|
+
label?: string;
|
|
245
269
|
}
|
|
246
270
|
export interface FloatingLayoutProps extends BaseProps {
|
|
247
271
|
/** What the UI floats over, filling the layout: a map, a 3D canvas, a video, a photo. */
|
|
@@ -254,7 +278,23 @@ export interface FloatingLayoutProps extends BaseProps {
|
|
|
254
278
|
end?: ReactNode;
|
|
255
279
|
/** Bar along the bottom edge (dock, playback, a summary). */
|
|
256
280
|
bottom?: ReactNode;
|
|
257
|
-
/**
|
|
281
|
+
/** Controls of the background (zoom, compass, locate) in the free corner above the bottom bar. */
|
|
282
|
+
controls?: ReactNode;
|
|
283
|
+
/** Source notes of the background (map attribution), under `controls`, clear of every slot. */
|
|
284
|
+
attribution?: ReactNode;
|
|
285
|
+
/** Width of the start column (default 320px) and of the end column (default 340px). */
|
|
286
|
+
startWidth?: number | string;
|
|
287
|
+
endWidth?: number | string;
|
|
288
|
+
/**
|
|
289
|
+
* Below 720px of width the end slot becomes a bottom sheet over the background, with a handle
|
|
290
|
+
* that expands and collapses it (default true). `false` stacks it with the others.
|
|
291
|
+
*/
|
|
292
|
+
endSheet?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Height of the layout (default 640). Below 720px of width the slots stack: top, start, end,
|
|
295
|
+
* bottom. The layout sets `--floating-safe-top/-start/-end/-bottom` (px) to the space its
|
|
296
|
+
* slots take, so map libraries can keep their own controls clear of them.
|
|
297
|
+
*/
|
|
258
298
|
height?: number | string;
|
|
259
299
|
/** Glass for every surface in the slots (default) or solid surfaces. */
|
|
260
300
|
surface?: Surface;
|
|
@@ -299,6 +339,11 @@ export interface TableProps extends BaseProps {
|
|
|
299
339
|
columns: TableColumn[];
|
|
300
340
|
rows: Record<string, any>[];
|
|
301
341
|
animate?: boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Cards instead of columns when the table's box is narrow (up to 600px): every row stacks its
|
|
344
|
+
* cells, each with its column label. Without it narrow tables scroll sideways.
|
|
345
|
+
*/
|
|
346
|
+
stack?: boolean;
|
|
302
347
|
}
|
|
303
348
|
export interface ProgressProps extends BaseProps {
|
|
304
349
|
value: number;
|
|
@@ -319,8 +364,21 @@ export interface EmptyStateProps extends BaseProps {
|
|
|
319
364
|
tint?: Tint;
|
|
320
365
|
action?: ReactNode;
|
|
321
366
|
}
|
|
367
|
+
/** A breadcrumb: a plain label, or one with an address or a handler. */
|
|
368
|
+
export interface Crumb {
|
|
369
|
+
label: string;
|
|
370
|
+
href?: string;
|
|
371
|
+
onClick?: () => void;
|
|
372
|
+
}
|
|
322
373
|
export interface BreadcrumbProps extends BaseProps {
|
|
323
|
-
|
|
374
|
+
/** The trail; the last one is the current page. Items with `href` are links, with `onClick` buttons. */
|
|
375
|
+
items: (string | Crumb)[];
|
|
376
|
+
/** The element links render as (default `a`), e.g. Next.js `Link`. */
|
|
377
|
+
linkAs?: ElementType;
|
|
378
|
+
/** Makes every crumb but the last a button; receives its index. */
|
|
379
|
+
onNavigate?: (index: number) => void;
|
|
380
|
+
/** Accessible name of the navigation (default "Breadcrumb"). */
|
|
381
|
+
label?: string;
|
|
324
382
|
}
|
|
325
383
|
export interface PaginationProps extends BaseProps {
|
|
326
384
|
/** Number of pages. */
|
|
@@ -334,10 +392,17 @@ export interface PaginationProps extends BaseProps {
|
|
|
334
392
|
defaultPage?: number;
|
|
335
393
|
/** A page was picked (previous, next or a number); receives the new 1-based page. */
|
|
336
394
|
onChange?: (page: number) => void;
|
|
395
|
+
/** Link mode for server-rendered lists: the address of a page; pages become links. */
|
|
396
|
+
href?: (page: number) => string;
|
|
397
|
+
/** The element links render as (default `a`), e.g. Next.js `Link`. */
|
|
398
|
+
linkAs?: ElementType;
|
|
399
|
+
/** Accessible name of the navigation (default "Pagination"), e.g. "Search results pages". */
|
|
400
|
+
label?: string;
|
|
337
401
|
}
|
|
338
402
|
export interface AppShellProps extends BaseProps {
|
|
339
403
|
active?: string;
|
|
340
|
-
|
|
404
|
+
/** The product name, or a node (a logo mark with the name; collapsed sidebars show it whole). */
|
|
405
|
+
brand?: ReactNode;
|
|
341
406
|
tag?: string;
|
|
342
407
|
nav?: NavItem[];
|
|
343
408
|
user?: {
|
|
@@ -353,6 +418,19 @@ export interface AppShellProps extends BaseProps {
|
|
|
353
418
|
dockItems?: DockProps["items"];
|
|
354
419
|
railTop?: RailItem[];
|
|
355
420
|
railBottom?: RailItem[];
|
|
421
|
+
/**
|
|
422
|
+
* `top` (default): navigation in the top bar, tools in the side rail. `sidebar`: a labelled
|
|
423
|
+
* sidebar on the frame, with groups, nesting and a drawer on phones.
|
|
424
|
+
*/
|
|
425
|
+
navigation?: "top" | "sidebar";
|
|
426
|
+
/** With `navigation="sidebar"`: groups instead of the flat `nav` list. */
|
|
427
|
+
sidebarGroups?: SidebarGroup[];
|
|
428
|
+
/** With `navigation="sidebar"`: more sidebar props (collapsed, storageKey, shortcut, linkAs …). */
|
|
429
|
+
sidebar?: Partial<Omit<SidebarProps, "variant" | "groups">>;
|
|
430
|
+
/** With `navigation="sidebar"`: the workspace switcher at the top instead of the brand. */
|
|
431
|
+
workspaces?: WorkspaceSwitcherProps;
|
|
432
|
+
/** The account menu's entries (with `navigation="sidebar"` at the foot of the sidebar). */
|
|
433
|
+
userMenu?: (MenuItem | "-")[];
|
|
356
434
|
children?: ReactNode;
|
|
357
435
|
}
|
|
358
436
|
export interface StaggerProps extends BaseProps {
|
|
@@ -370,6 +448,8 @@ export interface CountUpProps extends BaseProps {
|
|
|
370
448
|
duration?: number;
|
|
371
449
|
delay?: number;
|
|
372
450
|
className?: string;
|
|
451
|
+
/** `false`: show the value without counting (it is always the value on the server). */
|
|
452
|
+
animate?: boolean;
|
|
373
453
|
}
|
|
374
454
|
export interface ListRowProps extends BaseProps {
|
|
375
455
|
avatar?: string;
|
|
@@ -383,6 +463,18 @@ export interface ListRowProps extends BaseProps {
|
|
|
383
463
|
unread?: boolean;
|
|
384
464
|
active?: boolean;
|
|
385
465
|
onClick?: () => void;
|
|
466
|
+
/** Makes the row a link (with `linkAs` for a router's link). */
|
|
467
|
+
href?: string;
|
|
468
|
+
linkAs?: ElementType;
|
|
469
|
+
/**
|
|
470
|
+
* Buttons of the row's own (rename, remove …), outside the clickable area so nothing interactive
|
|
471
|
+
* is nested. Without `onClick` and `href` the row is not interactive at all.
|
|
472
|
+
*/
|
|
473
|
+
actions?: ReactNode;
|
|
474
|
+
/** Lines the title may take before it ends in an ellipsis (default: it wraps freely). */
|
|
475
|
+
titleLines?: number;
|
|
476
|
+
/** Lines the subtitle may take (default 1); badges and facts wrap within them. */
|
|
477
|
+
subtitleLines?: number;
|
|
386
478
|
}
|
|
387
479
|
export interface TimelineProps extends BaseProps {
|
|
388
480
|
items: {
|
|
@@ -698,6 +790,14 @@ export interface TextFieldProps extends Omit<FormFieldProps, "children"> {
|
|
|
698
790
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
699
791
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
700
792
|
onBlur?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
793
|
+
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
794
|
+
/**
|
|
795
|
+
* An interactive control at the end of the field (an `IconButton`: clear, copy, locate …). Unlike
|
|
796
|
+
* `suffix` it can be clicked, and it stays when the field shows an error or success mark.
|
|
797
|
+
*/
|
|
798
|
+
action?: ReactNode;
|
|
799
|
+
/** For `type="password"`: a button that shows and hides the password (default true). */
|
|
800
|
+
reveal?: boolean;
|
|
701
801
|
}
|
|
702
802
|
export interface RadioGroupProps extends BaseProps {
|
|
703
803
|
label?: string;
|
|
@@ -791,10 +891,18 @@ export interface SliderProps extends BaseProps {
|
|
|
791
891
|
marks?: boolean;
|
|
792
892
|
hint?: string;
|
|
793
893
|
}
|
|
894
|
+
export interface OtpInputHandle {
|
|
895
|
+
/** Empties every cell and focuses the first. */
|
|
896
|
+
reset: () => void;
|
|
897
|
+
}
|
|
794
898
|
export interface OtpInputProps extends BaseProps {
|
|
795
899
|
length?: number;
|
|
796
900
|
onComplete?: (code: string) => void;
|
|
797
901
|
error?: boolean;
|
|
902
|
+
/** Empties the cells when `error` turns on, ready for the next try (default true). */
|
|
903
|
+
clearOnError?: boolean;
|
|
904
|
+
/** `ref.current.reset()` empties the cells on demand. */
|
|
905
|
+
ref?: Ref<OtpInputHandle>;
|
|
798
906
|
label?: string;
|
|
799
907
|
}
|
|
800
908
|
export interface UploadFile {
|
|
@@ -814,9 +922,10 @@ export interface FileDropProps extends BaseProps {
|
|
|
814
922
|
/**
|
|
815
923
|
* The person picked or dropped files: the real `File` objects, after `accept` and `multiple`.
|
|
816
924
|
* Upload them yourself. To show progress, control `files` and set each `progress`; an
|
|
817
|
-
* uncontrolled list shows them with their size only.
|
|
925
|
+
* uncontrolled list shows them with their size only. Return `false` to list none of them, or
|
|
926
|
+
* the files to list (for example after checking their size).
|
|
818
927
|
*/
|
|
819
|
-
onFiles?: (files: File[]) => void;
|
|
928
|
+
onFiles?: (files: File[]) => void | boolean | File[];
|
|
820
929
|
/** Dropped files that do not match `accept` (show an inline Alert). */
|
|
821
930
|
onReject?: (files: File[]) => void;
|
|
822
931
|
/** A listed file was removed or its upload cancelled. */
|
|
@@ -831,6 +940,10 @@ export interface FileDropProps extends BaseProps {
|
|
|
831
940
|
/** Accepted types, as for `<input type="file">` ("image/*,.pdf"); also checked on drop. */
|
|
832
941
|
accept?: string;
|
|
833
942
|
multiple?: boolean;
|
|
943
|
+
/** No picking or dropping; the list stays visible. */
|
|
944
|
+
disabled?: boolean;
|
|
945
|
+
/** Takes part in a surrounding form under this name: the listed files are submitted with it. */
|
|
946
|
+
name?: string;
|
|
834
947
|
}
|
|
835
948
|
export interface TooltipProps extends BaseProps {
|
|
836
949
|
label: ReactNode;
|
|
@@ -998,6 +1111,8 @@ export interface LegendProps extends BaseProps {
|
|
|
998
1111
|
}
|
|
999
1112
|
export interface Source {
|
|
1000
1113
|
title: string;
|
|
1114
|
+
/** More about the source in a tooltip: dataset, publisher, date ("Stand") … */
|
|
1115
|
+
detail?: ReactNode;
|
|
1001
1116
|
icon?: IconName;
|
|
1002
1117
|
url?: string;
|
|
1003
1118
|
onClick?: () => void;
|
|
@@ -1228,6 +1343,11 @@ export interface CheckoutStepsProps extends BaseProps {
|
|
|
1228
1343
|
steps?: string[];
|
|
1229
1344
|
current?: number;
|
|
1230
1345
|
onPick?: (i: number) => void;
|
|
1346
|
+
/**
|
|
1347
|
+
* Numbers only, with the label of the current step (screen readers still hear every label).
|
|
1348
|
+
* Narrow containers (up to 560px) get this on their own.
|
|
1349
|
+
*/
|
|
1350
|
+
compact?: boolean;
|
|
1231
1351
|
}
|
|
1232
1352
|
export interface OrderTimelineProps extends BaseProps {
|
|
1233
1353
|
status: "Placed" | "Paid" | "Packed" | "Shipped" | "Delivered" | "Refunded" | "Cancelled";
|
|
@@ -1236,7 +1356,15 @@ export interface OrderTimelineProps extends BaseProps {
|
|
|
1236
1356
|
export interface PlanCardProps extends BaseProps {
|
|
1237
1357
|
name: string;
|
|
1238
1358
|
text?: string;
|
|
1239
|
-
|
|
1359
|
+
/**
|
|
1360
|
+
* A number is formatted as money (0 = "Free", null = "Let's talk"); any other node is shown as
|
|
1361
|
+
* it is, e.g. a placeholder ("—") or a price the app formatted itself.
|
|
1362
|
+
*/
|
|
1363
|
+
price: number | null | ReactNode;
|
|
1364
|
+
/** Before the price, e.g. "from". */
|
|
1365
|
+
pricePrefix?: ReactNode;
|
|
1366
|
+
/** Under the price: net or gross, billed yearly, VAT note … */
|
|
1367
|
+
priceNote?: ReactNode;
|
|
1240
1368
|
was?: number;
|
|
1241
1369
|
per?: string;
|
|
1242
1370
|
features?: string[];
|
|
@@ -1247,6 +1375,9 @@ export interface PlanCardProps extends BaseProps {
|
|
|
1247
1375
|
/** Disable the button, e.g. while a checkout starts or when the plan cannot be picked. */
|
|
1248
1376
|
disabled?: boolean;
|
|
1249
1377
|
onPick?: () => void;
|
|
1378
|
+
/** The action as a link (checkout or sign-up page), with `linkAs` for a router's link. */
|
|
1379
|
+
href?: string;
|
|
1380
|
+
linkAs?: ElementType;
|
|
1250
1381
|
}
|
|
1251
1382
|
export interface StatusScreenProps extends BaseProps {
|
|
1252
1383
|
code?: "404" | "500" | "403" | "maintenance" | "offline" | string;
|
|
@@ -2010,6 +2141,8 @@ export interface TilePickerProps extends BaseProps {
|
|
|
2010
2141
|
multiple?: boolean;
|
|
2011
2142
|
min?: number;
|
|
2012
2143
|
label?: string;
|
|
2144
|
+
/** `list`: one compact row per option (small picture or icon beside the label), e.g. on phones. */
|
|
2145
|
+
layout?: "grid" | "list";
|
|
2013
2146
|
}
|
|
2014
2147
|
export interface ColorFieldProps extends BaseProps {
|
|
2015
2148
|
label?: ReactNode;
|
|
@@ -2296,6 +2429,8 @@ export interface WorkspaceSwitcherProps extends BaseProps {
|
|
|
2296
2429
|
footer?: ReactNode;
|
|
2297
2430
|
variant?: "frame";
|
|
2298
2431
|
width?: number;
|
|
2432
|
+
/** Only the workspace's mark, its name as the accessible name (a collapsed sidebar). */
|
|
2433
|
+
compact?: boolean;
|
|
2299
2434
|
}
|
|
2300
2435
|
export interface ExportDialogProps extends BaseProps {
|
|
2301
2436
|
open?: boolean;
|
|
@@ -2328,6 +2463,12 @@ export interface ExportDialogProps extends BaseProps {
|
|
|
2328
2463
|
}
|
|
2329
2464
|
export interface TwoFactorSetupProps extends BaseProps {
|
|
2330
2465
|
qr?: ReactNode;
|
|
2466
|
+
/** The otpauth:// link: the kit draws its QR code (instead of `qr`). */
|
|
2467
|
+
qrValue?: string;
|
|
2468
|
+
/** A "Trust this device" checkbox under the code field; a string replaces its label. */
|
|
2469
|
+
trustDevice?: boolean | string;
|
|
2470
|
+
/** The trust checkbox changed. */
|
|
2471
|
+
onTrustChange?: (trusted: boolean) => void;
|
|
2331
2472
|
secret: string;
|
|
2332
2473
|
onVerify?: (code: string) => boolean | Promise<boolean>;
|
|
2333
2474
|
codes?: string[];
|
|
@@ -2373,7 +2514,13 @@ export interface GalleryProps extends BaseProps {
|
|
|
2373
2514
|
loading?: "lazy" | "eager";
|
|
2374
2515
|
/** `referrerPolicy` of every image, e.g. `"no-referrer"` for photos from other hosts. */
|
|
2375
2516
|
referrerPolicy?: ImageReferrerPolicy;
|
|
2517
|
+
/** First image when uncontrolled. */
|
|
2376
2518
|
start?: number;
|
|
2519
|
+
/** The shown image (controlled, 0-based), with `onIndexChange`. */
|
|
2520
|
+
index?: number;
|
|
2521
|
+
onIndexChange?: (index: number) => void;
|
|
2522
|
+
/** Accessible name of the gallery (default "Images"), e.g. the listing's title. */
|
|
2523
|
+
label?: string;
|
|
2377
2524
|
ratio?: string;
|
|
2378
2525
|
thumbs?: boolean;
|
|
2379
2526
|
fullscreen?: boolean;
|
|
@@ -2514,13 +2661,21 @@ export interface CookieConsentProps extends BaseProps {
|
|
|
2514
2661
|
categories?: {
|
|
2515
2662
|
id: string;
|
|
2516
2663
|
label: string;
|
|
2517
|
-
|
|
2664
|
+
/** What the category covers; may hold a link to the details. */
|
|
2665
|
+
text?: ReactNode;
|
|
2518
2666
|
required?: boolean;
|
|
2519
2667
|
default?: boolean;
|
|
2520
2668
|
}[];
|
|
2521
2669
|
onSave?: (choices: Record<string, boolean>) => void;
|
|
2522
2670
|
open?: boolean;
|
|
2523
2671
|
inline?: boolean;
|
|
2672
|
+
/**
|
|
2673
|
+
* "Only necessary" and "Accept all" with the same weight (both secondary buttons), as German
|
|
2674
|
+
* data protection authorities expect on the first layer.
|
|
2675
|
+
*/
|
|
2676
|
+
equalChoice?: boolean;
|
|
2677
|
+
/** Id of the banner (its text is referenced by `aria-describedby`). */
|
|
2678
|
+
id?: string;
|
|
2524
2679
|
}
|
|
2525
2680
|
export interface AnnouncementBarProps extends BaseProps {
|
|
2526
2681
|
children: ReactNode;
|
|
@@ -2588,6 +2743,8 @@ export interface ToggleGroupProps extends BaseProps {
|
|
|
2588
2743
|
/** Accessible name of the group. */
|
|
2589
2744
|
label: string;
|
|
2590
2745
|
size?: "sm" | "md";
|
|
2746
|
+
/** Fills the width and shares it evenly; labels end in an ellipsis when space runs short. */
|
|
2747
|
+
block?: boolean;
|
|
2591
2748
|
}
|
|
2592
2749
|
export interface ButtonGroupProps extends BaseProps {
|
|
2593
2750
|
/** Accessible name of the group. */
|
|
@@ -2667,6 +2824,8 @@ export interface SelectMenuProps extends FieldProps, BaseProps {
|
|
|
2667
2824
|
onChange?: (value: string) => void;
|
|
2668
2825
|
placeholder?: string;
|
|
2669
2826
|
disabled?: boolean;
|
|
2827
|
+
/** `sm`: a compact trigger, e.g. a sort menu next to a heading. */
|
|
2828
|
+
size?: "sm" | "md";
|
|
2670
2829
|
}
|
|
2671
2830
|
export interface MenubarMenu {
|
|
2672
2831
|
label: string;
|
|
@@ -2701,31 +2860,99 @@ export interface NavigationMenuProps extends BaseProps {
|
|
|
2701
2860
|
export interface SidebarItem {
|
|
2702
2861
|
id?: string;
|
|
2703
2862
|
label: string;
|
|
2704
|
-
|
|
2863
|
+
/** Required for pages; options in a filter group usually go without. */
|
|
2864
|
+
icon?: IconName;
|
|
2705
2865
|
count?: number;
|
|
2706
|
-
/**
|
|
2866
|
+
/** A small marker instead of a number: `"dot"` for new activity, or a short word such as "New". */
|
|
2867
|
+
badge?: string;
|
|
2868
|
+
/** Renders the item as a link to this address (with `linkAs` for a router's link, e.g. Next.js `Link`). */
|
|
2869
|
+
href?: string;
|
|
2870
|
+
/** Opens `href` in a new tab and says so. */
|
|
2871
|
+
external?: boolean;
|
|
2872
|
+
disabled?: boolean;
|
|
2873
|
+
/** A menu behind a "…" button on the item (rename, share, remove …). */
|
|
2874
|
+
actions?: (MenuItem | "-")[];
|
|
2875
|
+
/** One level of nested pages, shown when the item is open (as a flyout when the sidebar is collapsed). */
|
|
2707
2876
|
items?: Omit<SidebarItem, "items">[];
|
|
2877
|
+
/**
|
|
2878
|
+
* Makes the item a filter option: a checkbox (or a radio in a group with `select: "single"`)
|
|
2879
|
+
* with its label and `count`, instead of a page.
|
|
2880
|
+
*/
|
|
2881
|
+
checked?: boolean;
|
|
2882
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2708
2883
|
}
|
|
2709
2884
|
export interface SidebarGroup {
|
|
2885
|
+
id?: string;
|
|
2710
2886
|
label?: string;
|
|
2711
|
-
items
|
|
2887
|
+
items?: SidebarItem[];
|
|
2888
|
+
/** Any content instead of (or after) the items: a `RangeSlider`, `DateRangePicker`, chips … */
|
|
2889
|
+
content?: ReactNode;
|
|
2890
|
+
/** For filter options (items with `checked`): `single` makes them radios (one choice per group). */
|
|
2891
|
+
select?: "multiple" | "single";
|
|
2892
|
+
/** The label folds the group open and shut. */
|
|
2893
|
+
collapsible?: boolean;
|
|
2894
|
+
/** For a collapsible group: starts open (default true). */
|
|
2895
|
+
defaultOpen?: boolean;
|
|
2896
|
+
/** A small button next to the label, e.g. "+" to add a project. */
|
|
2897
|
+
action?: {
|
|
2898
|
+
label: string;
|
|
2899
|
+
icon?: IconName;
|
|
2900
|
+
onClick?: () => void;
|
|
2901
|
+
};
|
|
2712
2902
|
}
|
|
2713
2903
|
export interface SidebarProps extends BaseProps {
|
|
2714
2904
|
groups: SidebarGroup[];
|
|
2715
2905
|
/** Id (or label) of the current page. */
|
|
2716
2906
|
current?: string;
|
|
2717
2907
|
onPick?: (id: string) => void;
|
|
2908
|
+
/**
|
|
2909
|
+
* `floating` (default): a card with rounded corners and a shadow. `attached`: full height, flush
|
|
2910
|
+
* with the edge of the screen, divided by a line. `shell`: on the dark frame of `AppShell`.
|
|
2911
|
+
*/
|
|
2912
|
+
variant?: "floating" | "attached" | "shell";
|
|
2718
2913
|
/** Icons only. */
|
|
2719
2914
|
collapsed?: boolean;
|
|
2720
2915
|
defaultCollapsed?: boolean;
|
|
2721
2916
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2722
|
-
/**
|
|
2723
|
-
|
|
2724
|
-
/**
|
|
2725
|
-
|
|
2726
|
-
/**
|
|
2917
|
+
/** Remember the collapsed state in the browser under this key. */
|
|
2918
|
+
storageKey?: string;
|
|
2919
|
+
/** ⌘B (Ctrl+B) collapses and expands the sidebar, except while typing in a field. */
|
|
2920
|
+
shortcut?: boolean;
|
|
2921
|
+
/** The element items with an `href` render as (default `a`), e.g. Next.js `Link`. */
|
|
2922
|
+
linkAs?: ElementType;
|
|
2923
|
+
/** On phones (up to 760px wide): whether the drawer is open (controlled). */
|
|
2924
|
+
mobileOpen?: boolean;
|
|
2925
|
+
onMobileOpenChange?: (open: boolean) => void;
|
|
2926
|
+
/** Top of the sidebar (brand, `WorkspaceSwitcher`); a function gets the collapsed state. */
|
|
2927
|
+
header?: ReactNode | ((state: {
|
|
2928
|
+
collapsed: boolean;
|
|
2929
|
+
}) => ReactNode);
|
|
2930
|
+
/** Bottom of the sidebar (`UserMenu`, settings); a function gets the collapsed state. */
|
|
2931
|
+
footer?: ReactNode | ((state: {
|
|
2932
|
+
collapsed: boolean;
|
|
2933
|
+
}) => ReactNode);
|
|
2934
|
+
/**
|
|
2935
|
+
* `nav` (default) for app navigation. `aside` for filters, settings or other tools beside the
|
|
2936
|
+
* content: a complementary region instead of a navigation landmark.
|
|
2937
|
+
*/
|
|
2938
|
+
as?: "nav" | "aside";
|
|
2939
|
+
/** Offers the collapse button and the icons-only mode (default true; filters usually set false). */
|
|
2940
|
+
collapsible?: boolean;
|
|
2941
|
+
/** Accessible name of the navigation (or the aside). */
|
|
2727
2942
|
label?: string;
|
|
2728
2943
|
}
|
|
2944
|
+
export interface UserMenuProps extends BaseProps {
|
|
2945
|
+
name: string;
|
|
2946
|
+
email?: string;
|
|
2947
|
+
/** Picture URL; initials otherwise. */
|
|
2948
|
+
avatar?: string;
|
|
2949
|
+
/** The menu: profile, settings, sign out … */
|
|
2950
|
+
items?: (MenuItem | "-")[];
|
|
2951
|
+
/** Only the avatar (a collapsed sidebar). */
|
|
2952
|
+
compact?: boolean;
|
|
2953
|
+
/** Where the menu opens (default `top`, for the foot of a sidebar). */
|
|
2954
|
+
side?: "top" | "bottom";
|
|
2955
|
+
}
|
|
2729
2956
|
export interface ResizablePanelsProps extends BaseProps {
|
|
2730
2957
|
panels: ReactNode[];
|
|
2731
2958
|
/** Start sizes in percent (default: equal). */
|
|
@@ -2738,4 +2965,348 @@ export interface ResizablePanelsProps extends BaseProps {
|
|
|
2738
2965
|
/** Accessible names of the panels, used for the resize handles. */
|
|
2739
2966
|
labels?: string[];
|
|
2740
2967
|
}
|
|
2968
|
+
export interface QrCodeProps extends BaseProps {
|
|
2969
|
+
/** The text to encode: an otpauth:// link, a URL … */
|
|
2970
|
+
value: string;
|
|
2971
|
+
/** Error correction: L, M (default), Q or H. */
|
|
2972
|
+
level?: "L" | "M" | "Q" | "H";
|
|
2973
|
+
/** Width and height (default: the width of its container). */
|
|
2974
|
+
size?: number | string;
|
|
2975
|
+
/** Light modules around the code (default 4, the standard quiet zone). */
|
|
2976
|
+
quiet?: number;
|
|
2977
|
+
/** Accessible name (default "QR code"). */
|
|
2978
|
+
label?: string;
|
|
2979
|
+
}
|
|
2980
|
+
export interface Habit {
|
|
2981
|
+
id: string;
|
|
2982
|
+
label: string;
|
|
2983
|
+
icon?: IconName;
|
|
2984
|
+
tint?: Tint;
|
|
2985
|
+
/** One entry per day, oldest first, today last: true done, false missed, null no data. */
|
|
2986
|
+
days: (boolean | null)[];
|
|
2987
|
+
/** Days in a row (shown as "12-day streak"). */
|
|
2988
|
+
streak?: number;
|
|
2989
|
+
/** A short target, e.g. "8 glasses" or "3× a week". */
|
|
2990
|
+
goal?: string;
|
|
2991
|
+
}
|
|
2992
|
+
export interface HabitTrackerProps extends BaseProps {
|
|
2993
|
+
habits: Habit[];
|
|
2994
|
+
/** Labels of the day columns, oldest first (default: weekday initials ending today). */
|
|
2995
|
+
dayLabels?: string[];
|
|
2996
|
+
/** Today's box of a habit was toggled. */
|
|
2997
|
+
onToggle?: (id: string, done: boolean) => void;
|
|
2998
|
+
/** Accessible name of the list (default "Habits"). */
|
|
2999
|
+
label?: string;
|
|
3000
|
+
}
|
|
3001
|
+
export type MoodLevel = 1 | 2 | 3 | 4 | 5;
|
|
3002
|
+
export interface MoodPickerProps extends BaseProps {
|
|
3003
|
+
value?: MoodLevel | null;
|
|
3004
|
+
defaultValue?: MoodLevel | null;
|
|
3005
|
+
onChange?: (mood: MoodLevel) => void;
|
|
3006
|
+
/** The question (default "How are you feeling?"). */
|
|
3007
|
+
label?: ReactNode;
|
|
3008
|
+
/** Words for the five levels, lowest first (default Awful, Low, Okay, Good, Great). */
|
|
3009
|
+
levels?: [string, string, string, string, string];
|
|
3010
|
+
/** Only the faces; the words stay as accessible names. */
|
|
3011
|
+
compact?: boolean;
|
|
3012
|
+
}
|
|
3013
|
+
export interface VitalTileProps extends BaseProps {
|
|
3014
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3015
|
+
surface?: Surface;
|
|
3016
|
+
label: string;
|
|
3017
|
+
value: number;
|
|
3018
|
+
unit?: string;
|
|
3019
|
+
icon?: IconName;
|
|
3020
|
+
/** The healthy range [low, high]; the tile says whether the value is below, in or above it. */
|
|
3021
|
+
normal?: [number, number];
|
|
3022
|
+
/** The whole scale of the band [min, max] (default: the normal range with room on both sides). */
|
|
3023
|
+
scale?: [number, number];
|
|
3024
|
+
/** Recent values, oldest first, drawn as a sparkline. */
|
|
3025
|
+
trend?: number[];
|
|
3026
|
+
/** Under the value: when it was measured, the source … */
|
|
3027
|
+
caption?: ReactNode;
|
|
3028
|
+
/** Digits after the decimal point (default 0). */
|
|
3029
|
+
digits?: number;
|
|
3030
|
+
}
|
|
3031
|
+
export interface ActivityRing {
|
|
3032
|
+
label: string;
|
|
3033
|
+
value: number;
|
|
3034
|
+
goal: number;
|
|
3035
|
+
unit?: string;
|
|
3036
|
+
tint?: Tint;
|
|
3037
|
+
}
|
|
3038
|
+
export interface ActivityRingsProps extends BaseProps {
|
|
3039
|
+
/** Outer ring first. */
|
|
3040
|
+
rings: ActivityRing[];
|
|
3041
|
+
/** Diameter of the rings (default 132). */
|
|
3042
|
+
size?: number;
|
|
3043
|
+
/** Hide the legend beside the rings. */
|
|
3044
|
+
legend?: boolean;
|
|
3045
|
+
/** Accessible name (default "Activity"). */
|
|
3046
|
+
label?: string;
|
|
3047
|
+
}
|
|
3048
|
+
export type SleepStage = "awake" | "rem" | "light" | "deep";
|
|
3049
|
+
export interface SleepSegment {
|
|
3050
|
+
stage: SleepStage;
|
|
3051
|
+
start: Date | string | number;
|
|
3052
|
+
end: Date | string | number;
|
|
3053
|
+
}
|
|
3054
|
+
export interface SleepChartProps extends BaseProps {
|
|
3055
|
+
/** The night in order, from falling asleep to getting up. */
|
|
3056
|
+
segments: SleepSegment[];
|
|
3057
|
+
/** Accessible name (default "Sleep stages"). */
|
|
3058
|
+
label?: string;
|
|
3059
|
+
/** Hide the totals per stage under the chart. */
|
|
3060
|
+
summary?: boolean;
|
|
3061
|
+
}
|
|
3062
|
+
export interface MedicationItem {
|
|
3063
|
+
id: string;
|
|
3064
|
+
name: string;
|
|
3065
|
+
dose?: string;
|
|
3066
|
+
/** When, as shown ("08:00", "With breakfast"). */
|
|
3067
|
+
time: string;
|
|
3068
|
+
/** Set by the app, which knows the clock: default "taken" when `taken`, else "due". */
|
|
3069
|
+
status?: "taken" | "due" | "missed" | "upcoming";
|
|
3070
|
+
taken?: boolean;
|
|
3071
|
+
note?: string;
|
|
3072
|
+
icon?: IconName;
|
|
3073
|
+
}
|
|
3074
|
+
export interface MedicationListProps extends BaseProps {
|
|
3075
|
+
items: MedicationItem[];
|
|
3076
|
+
/** "Mark as taken" was pressed. */
|
|
3077
|
+
onTake?: (id: string) => void;
|
|
3078
|
+
/** Accessible name (default "Medication"). */
|
|
3079
|
+
label?: string;
|
|
3080
|
+
}
|
|
3081
|
+
export interface JournalEntryProps extends BaseProps {
|
|
3082
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3083
|
+
surface?: Surface;
|
|
3084
|
+
date: Date | string | number;
|
|
3085
|
+
title?: string;
|
|
3086
|
+
mood?: MoodLevel;
|
|
3087
|
+
tags?: string[];
|
|
3088
|
+
children?: ReactNode;
|
|
3089
|
+
/** Buttons at the end (edit, share …). */
|
|
3090
|
+
actions?: ReactNode;
|
|
3091
|
+
}
|
|
3092
|
+
export interface GoalCardProps extends BaseProps {
|
|
3093
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3094
|
+
surface?: Surface;
|
|
3095
|
+
title: string;
|
|
3096
|
+
value: number;
|
|
3097
|
+
target: number;
|
|
3098
|
+
/** How to show value and target (default number). */
|
|
3099
|
+
format?: "number" | "money" | "percent";
|
|
3100
|
+
/** Unit after numbers ("km", "books"). */
|
|
3101
|
+
unit?: string;
|
|
3102
|
+
currency?: string;
|
|
3103
|
+
due?: Date | string | number;
|
|
3104
|
+
icon?: IconName;
|
|
3105
|
+
tint?: Tint;
|
|
3106
|
+
milestones?: {
|
|
3107
|
+
label: string;
|
|
3108
|
+
done?: boolean;
|
|
3109
|
+
}[];
|
|
3110
|
+
/** A note under the progress ("€250 a month keeps you on track"). */
|
|
3111
|
+
note?: ReactNode;
|
|
3112
|
+
}
|
|
3113
|
+
export interface InsightCardProps extends BaseProps {
|
|
3114
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3115
|
+
surface?: Surface;
|
|
3116
|
+
title: string;
|
|
3117
|
+
children?: ReactNode;
|
|
3118
|
+
icon?: IconName;
|
|
3119
|
+
tone?: "info" | "success" | "warning" | "highlight";
|
|
3120
|
+
/** Above the title: area and time ("Money · 2 h ago"). */
|
|
3121
|
+
meta?: ReactNode;
|
|
3122
|
+
/** Where the insight comes from, as chips (like chat sources). */
|
|
3123
|
+
sources?: Source[];
|
|
3124
|
+
/** Why the assistant shows it; folded away behind "Why am I seeing this?". */
|
|
3125
|
+
why?: ReactNode;
|
|
3126
|
+
onAccept?: () => void;
|
|
3127
|
+
acceptLabel?: string;
|
|
3128
|
+
onSnooze?: () => void;
|
|
3129
|
+
onDismiss?: () => void;
|
|
3130
|
+
}
|
|
3131
|
+
export interface ConsentScope {
|
|
3132
|
+
id: string;
|
|
3133
|
+
label: string;
|
|
3134
|
+
description?: string;
|
|
3135
|
+
granted: boolean;
|
|
3136
|
+
/** Needed for the connection to work at all: shown, not switchable. */
|
|
3137
|
+
required?: boolean;
|
|
3138
|
+
}
|
|
3139
|
+
export interface ConsentConnector {
|
|
3140
|
+
id: string;
|
|
3141
|
+
name: string;
|
|
3142
|
+
icon?: IconName;
|
|
3143
|
+
/** A logo instead of the icon. */
|
|
3144
|
+
logo?: ReactNode;
|
|
3145
|
+
/** What the assistant uses it for. */
|
|
3146
|
+
purpose?: ReactNode;
|
|
3147
|
+
scopes: ConsentScope[];
|
|
3148
|
+
lastUsed?: Date | string | number;
|
|
3149
|
+
}
|
|
3150
|
+
export interface ConsentListProps extends BaseProps {
|
|
3151
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3152
|
+
surface?: Surface;
|
|
3153
|
+
connectors: ConsentConnector[];
|
|
3154
|
+
onScopeChange?: (connectorId: string, scopeId: string, granted: boolean) => void;
|
|
3155
|
+
onRevoke?: (connectorId: string) => void;
|
|
3156
|
+
/** Accessible name (default "Data access"). */
|
|
3157
|
+
label?: string;
|
|
3158
|
+
}
|
|
3159
|
+
export interface BudgetCategory {
|
|
3160
|
+
id: string;
|
|
3161
|
+
label: string;
|
|
3162
|
+
icon?: IconName;
|
|
3163
|
+
tint?: Tint;
|
|
3164
|
+
spent: number;
|
|
3165
|
+
limit: number;
|
|
3166
|
+
}
|
|
3167
|
+
export interface BudgetListProps extends BaseProps {
|
|
3168
|
+
categories: BudgetCategory[];
|
|
3169
|
+
currency?: string;
|
|
3170
|
+
/** A category was picked (to show its transactions). */
|
|
3171
|
+
onSelect?: (id: string) => void;
|
|
3172
|
+
/** Accessible name (default "Budgets"). */
|
|
3173
|
+
label?: string;
|
|
3174
|
+
}
|
|
3175
|
+
export interface Subscription {
|
|
3176
|
+
id: string;
|
|
3177
|
+
name: string;
|
|
3178
|
+
icon?: IconName;
|
|
3179
|
+
/** A logo instead of the icon. */
|
|
3180
|
+
logo?: ReactNode;
|
|
3181
|
+
amount: number;
|
|
3182
|
+
period: "week" | "month" | "year";
|
|
3183
|
+
/** Next charge. */
|
|
3184
|
+
next?: Date | string | number;
|
|
3185
|
+
status?: "active" | "trial" | "cancelled";
|
|
3186
|
+
category?: string;
|
|
3187
|
+
}
|
|
3188
|
+
export interface SubscriptionListProps extends BaseProps {
|
|
3189
|
+
items: Subscription[];
|
|
3190
|
+
currency?: string;
|
|
3191
|
+
/** "Manage" on a subscription (cancel, change plan …). */
|
|
3192
|
+
onManage?: (id: string) => void;
|
|
3193
|
+
/** Hide the monthly and yearly totals. */
|
|
3194
|
+
totals?: boolean;
|
|
3195
|
+
/** Accessible name (default "Subscriptions"). */
|
|
3196
|
+
label?: string;
|
|
3197
|
+
}
|
|
3198
|
+
export interface NetWorthCardProps extends BaseProps {
|
|
3199
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3200
|
+
surface?: Surface;
|
|
3201
|
+
assets: {
|
|
3202
|
+
label: string;
|
|
3203
|
+
value: number;
|
|
3204
|
+
icon?: IconName;
|
|
3205
|
+
}[];
|
|
3206
|
+
liabilities?: {
|
|
3207
|
+
label: string;
|
|
3208
|
+
value: number;
|
|
3209
|
+
icon?: IconName;
|
|
3210
|
+
}[];
|
|
3211
|
+
/** Net worth over time, oldest first. */
|
|
3212
|
+
history?: number[];
|
|
3213
|
+
/** Change over `changeLabel` (e.g. +1,240 "since October"). */
|
|
3214
|
+
change?: number;
|
|
3215
|
+
changeLabel?: string;
|
|
3216
|
+
currency?: string;
|
|
3217
|
+
title?: string;
|
|
3218
|
+
}
|
|
3219
|
+
export interface DeadlineItem {
|
|
3220
|
+
id: string;
|
|
3221
|
+
title: string;
|
|
3222
|
+
/** What kind: "Contract", "ID card", "Tax" … */
|
|
3223
|
+
kind?: string;
|
|
3224
|
+
icon?: IconName;
|
|
3225
|
+
date: Date | string | number;
|
|
3226
|
+
amount?: number;
|
|
3227
|
+
done?: boolean;
|
|
3228
|
+
note?: string;
|
|
3229
|
+
}
|
|
3230
|
+
export interface DeadlineListProps extends BaseProps {
|
|
3231
|
+
items: DeadlineItem[];
|
|
3232
|
+
/** The day to count from (default: now). Set it for server rendering and stable output. */
|
|
3233
|
+
today?: Date | string | number;
|
|
3234
|
+
/** Days ahead that count as soon (default 14). */
|
|
3235
|
+
soon?: number;
|
|
3236
|
+
currency?: string;
|
|
3237
|
+
onDone?: (id: string) => void;
|
|
3238
|
+
/** Accessible name (default "Deadlines"). */
|
|
3239
|
+
label?: string;
|
|
3240
|
+
}
|
|
3241
|
+
export interface PolicyCardProps extends BaseProps {
|
|
3242
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3243
|
+
surface?: Surface;
|
|
3244
|
+
/** The kind of insurance: "Household contents", "Liability" … */
|
|
3245
|
+
type: string;
|
|
3246
|
+
insurer: string;
|
|
3247
|
+
icon?: IconName;
|
|
3248
|
+
tint?: Tint;
|
|
3249
|
+
policyNumber?: string;
|
|
3250
|
+
/** Show only the last four characters of the policy number. */
|
|
3251
|
+
maskNumber?: boolean;
|
|
3252
|
+
/** Sum insured: a number (money) or text ("unlimited"). */
|
|
3253
|
+
coverage?: number | ReactNode;
|
|
3254
|
+
premium?: {
|
|
3255
|
+
amount: number;
|
|
3256
|
+
period: "month" | "quarter" | "year";
|
|
3257
|
+
};
|
|
3258
|
+
deductible?: number;
|
|
3259
|
+
renews?: Date | string | number;
|
|
3260
|
+
status?: "active" | "pending" | "expiring" | "lapsed";
|
|
3261
|
+
currency?: string;
|
|
3262
|
+
/** Buttons at the foot (documents, report a claim …). */
|
|
3263
|
+
actions?: ReactNode;
|
|
3264
|
+
}
|
|
3265
|
+
export interface CoverageRow {
|
|
3266
|
+
id: string;
|
|
3267
|
+
risk: string;
|
|
3268
|
+
status: "covered" | "partial" | "none";
|
|
3269
|
+
note?: ReactNode;
|
|
3270
|
+
/** Which policy covers it. */
|
|
3271
|
+
policy?: string;
|
|
3272
|
+
}
|
|
3273
|
+
export interface CoverageMatrixProps extends BaseProps {
|
|
3274
|
+
rows: CoverageRow[];
|
|
3275
|
+
/** Accessible name and caption (default "Coverage"). */
|
|
3276
|
+
label?: string;
|
|
3277
|
+
}
|
|
3278
|
+
export interface ClaimStep {
|
|
3279
|
+
label: string;
|
|
3280
|
+
date?: Date | string | number;
|
|
3281
|
+
state: "done" | "current" | "todo" | "failed";
|
|
3282
|
+
note?: ReactNode;
|
|
3283
|
+
}
|
|
3284
|
+
export interface ClaimTimelineProps extends BaseProps {
|
|
3285
|
+
title: string;
|
|
3286
|
+
/** Reference and insurer under the title. */
|
|
3287
|
+
meta?: ReactNode;
|
|
3288
|
+
amount?: number;
|
|
3289
|
+
currency?: string;
|
|
3290
|
+
steps: ClaimStep[];
|
|
3291
|
+
}
|
|
3292
|
+
export interface LifeDocument {
|
|
3293
|
+
id: string;
|
|
3294
|
+
title: string;
|
|
3295
|
+
category?: string;
|
|
3296
|
+
icon?: IconName;
|
|
3297
|
+
holder?: string;
|
|
3298
|
+
expires?: Date | string | number;
|
|
3299
|
+
/** "PDF · 240 KB" */
|
|
3300
|
+
meta?: string;
|
|
3301
|
+
}
|
|
3302
|
+
export interface DocumentListProps extends BaseProps {
|
|
3303
|
+
documents: LifeDocument[];
|
|
3304
|
+
/** The day to count expiry from (default: now). */
|
|
3305
|
+
today?: Date | string | number;
|
|
3306
|
+
/** Days ahead that count as expiring soon (default 60). */
|
|
3307
|
+
soon?: number;
|
|
3308
|
+
onOpen?: (id: string) => void;
|
|
3309
|
+
/** Accessible name (default "Documents"). */
|
|
3310
|
+
label?: string;
|
|
3311
|
+
}
|
|
2741
3312
|
//# sourceMappingURL=types.d.ts.map
|