@twentyfirstmedia/elements 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/custom-elements.json +3717 -215
- package/dist/elements.d.ts +634 -19
- package/dist/elements.global.js +24 -24
- package/dist/elements.js +24 -24
- package/dist/vscode.html-custom-data.json +1081 -38
- package/package.json +2 -2
package/dist/elements.d.ts
CHANGED
|
@@ -295,9 +295,21 @@ export interface SearchFieldProps extends BaseProps {
|
|
|
295
295
|
placeholder?: string;
|
|
296
296
|
/** Accessible name (default: the placeholder, or "Search"). */
|
|
297
297
|
label?: string;
|
|
298
|
+
/** The key hint, e.g. "⌘K" (hidden on touch screens). */
|
|
298
299
|
shortcut?: string;
|
|
300
|
+
/** ⌘/Ctrl + the hint's last key (K for "⌘K") focuses the field, except while typing elsewhere. */
|
|
301
|
+
bindShortcut?: boolean;
|
|
299
302
|
value?: string;
|
|
303
|
+
defaultValue?: string;
|
|
300
304
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
305
|
+
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
306
|
+
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
307
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
308
|
+
id?: string;
|
|
309
|
+
name?: string;
|
|
310
|
+
autoFocus?: boolean;
|
|
311
|
+
/** For a search with suggestions (combobox): role, aria-controls, aria-activedescendant … */
|
|
312
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
301
313
|
}
|
|
302
314
|
export interface CheckboxProps extends BaseProps {
|
|
303
315
|
name?: string;
|
|
@@ -372,7 +384,10 @@ export interface PanelProps extends BaseProps {
|
|
|
372
384
|
surface?: Surface;
|
|
373
385
|
}
|
|
374
386
|
export interface PageHeaderProps extends BaseProps {
|
|
375
|
-
|
|
387
|
+
/** A breadcrumb above the title (see `Breadcrumb`): labels, or items with `href`/`onClick`. */
|
|
388
|
+
crumbs?: (string | Crumb)[];
|
|
389
|
+
/** The element crumb links render as, e.g. Next.js `Link`. */
|
|
390
|
+
crumbLinkAs?: ElementType;
|
|
376
391
|
title: string;
|
|
377
392
|
subtitle?: string;
|
|
378
393
|
actions?: ReactNode[];
|
|
@@ -383,7 +398,8 @@ export interface NavItem {
|
|
|
383
398
|
count?: number;
|
|
384
399
|
}
|
|
385
400
|
export interface TopBarProps extends BaseProps {
|
|
386
|
-
|
|
401
|
+
/** The product name, or a node (a logo mark with the name). */
|
|
402
|
+
brand?: ReactNode;
|
|
387
403
|
tag?: string;
|
|
388
404
|
items: NavItem[];
|
|
389
405
|
active?: string;
|
|
@@ -403,6 +419,14 @@ export interface RailItem {
|
|
|
403
419
|
export interface SideRailProps extends BaseProps {
|
|
404
420
|
top?: RailItem[];
|
|
405
421
|
bottom?: RailItem[];
|
|
422
|
+
/** Names next to the icons (controlled); every button has a tooltip while collapsed. */
|
|
423
|
+
expanded?: boolean;
|
|
424
|
+
defaultExpanded?: boolean;
|
|
425
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
426
|
+
/** A button at the foot that expands and collapses the rail. */
|
|
427
|
+
toggle?: boolean;
|
|
428
|
+
/** Accessible name of the rail (default "Tools"). */
|
|
429
|
+
label?: string;
|
|
406
430
|
}
|
|
407
431
|
export interface FloatingLayoutProps extends BaseProps {
|
|
408
432
|
/** What the UI floats over, filling the layout: a map, a 3D canvas, a video, a photo. */
|
|
@@ -415,7 +439,23 @@ export interface FloatingLayoutProps extends BaseProps {
|
|
|
415
439
|
end?: ReactNode;
|
|
416
440
|
/** Bar along the bottom edge (dock, playback, a summary). */
|
|
417
441
|
bottom?: ReactNode;
|
|
418
|
-
/**
|
|
442
|
+
/** Controls of the background (zoom, compass, locate) in the free corner above the bottom bar. */
|
|
443
|
+
controls?: ReactNode;
|
|
444
|
+
/** Source notes of the background (map attribution), under `controls`, clear of every slot. */
|
|
445
|
+
attribution?: ReactNode;
|
|
446
|
+
/** Width of the start column (default 320px) and of the end column (default 340px). */
|
|
447
|
+
startWidth?: number | string;
|
|
448
|
+
endWidth?: number | string;
|
|
449
|
+
/**
|
|
450
|
+
* Below 720px of width the end slot becomes a bottom sheet over the background, with a handle
|
|
451
|
+
* that expands and collapses it (default true). `false` stacks it with the others.
|
|
452
|
+
*/
|
|
453
|
+
endSheet?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Height of the layout (default 640). Below 720px of width the slots stack: top, start, end,
|
|
456
|
+
* bottom. The layout sets `--floating-safe-top/-start/-end/-bottom` (px) to the space its
|
|
457
|
+
* slots take, so map libraries can keep their own controls clear of them.
|
|
458
|
+
*/
|
|
419
459
|
height?: number | string;
|
|
420
460
|
/** Glass for every surface in the slots (default) or solid surfaces. */
|
|
421
461
|
surface?: Surface;
|
|
@@ -462,6 +502,11 @@ export interface TableProps extends BaseProps {
|
|
|
462
502
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- rows are app data
|
|
463
503
|
rows: Record<string, any>[];
|
|
464
504
|
animate?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Cards instead of columns when the table's box is narrow (up to 600px): every row stacks its
|
|
507
|
+
* cells, each with its column label. Without it narrow tables scroll sideways.
|
|
508
|
+
*/
|
|
509
|
+
stack?: boolean;
|
|
465
510
|
}
|
|
466
511
|
export interface ProgressProps extends BaseProps {
|
|
467
512
|
value: number;
|
|
@@ -482,8 +527,21 @@ export interface EmptyStateProps extends BaseProps {
|
|
|
482
527
|
tint?: Tint;
|
|
483
528
|
action?: ReactNode;
|
|
484
529
|
}
|
|
530
|
+
/** A breadcrumb: a plain label, or one with an address or a handler. */
|
|
531
|
+
export interface Crumb {
|
|
532
|
+
label: string;
|
|
533
|
+
href?: string;
|
|
534
|
+
onClick?: () => void;
|
|
535
|
+
}
|
|
485
536
|
export interface BreadcrumbProps extends BaseProps {
|
|
486
|
-
|
|
537
|
+
/** The trail; the last one is the current page. Items with `href` are links, with `onClick` buttons. */
|
|
538
|
+
items: (string | Crumb)[];
|
|
539
|
+
/** The element links render as (default `a`), e.g. Next.js `Link`. */
|
|
540
|
+
linkAs?: ElementType;
|
|
541
|
+
/** Makes every crumb but the last a button; receives its index. */
|
|
542
|
+
onNavigate?: (index: number) => void;
|
|
543
|
+
/** Accessible name of the navigation (default "Breadcrumb"). */
|
|
544
|
+
label?: string;
|
|
487
545
|
}
|
|
488
546
|
export interface PaginationProps extends BaseProps {
|
|
489
547
|
/** Number of pages. */
|
|
@@ -497,10 +555,17 @@ export interface PaginationProps extends BaseProps {
|
|
|
497
555
|
defaultPage?: number;
|
|
498
556
|
/** A page was picked (previous, next or a number); receives the new 1-based page. */
|
|
499
557
|
onChange?: (page: number) => void;
|
|
558
|
+
/** Link mode for server-rendered lists: the address of a page; pages become links. */
|
|
559
|
+
href?: (page: number) => string;
|
|
560
|
+
/** The element links render as (default `a`), e.g. Next.js `Link`. */
|
|
561
|
+
linkAs?: ElementType;
|
|
562
|
+
/** Accessible name of the navigation (default "Pagination"), e.g. "Search results pages". */
|
|
563
|
+
label?: string;
|
|
500
564
|
}
|
|
501
565
|
export interface AppShellProps extends BaseProps {
|
|
502
566
|
active?: string;
|
|
503
|
-
|
|
567
|
+
/** The product name, or a node (a logo mark with the name; collapsed sidebars show it whole). */
|
|
568
|
+
brand?: ReactNode;
|
|
504
569
|
tag?: string;
|
|
505
570
|
nav?: NavItem[];
|
|
506
571
|
user?: { name: string; email?: string };
|
|
@@ -513,6 +578,19 @@ export interface AppShellProps extends BaseProps {
|
|
|
513
578
|
dockItems?: DockProps["items"];
|
|
514
579
|
railTop?: RailItem[];
|
|
515
580
|
railBottom?: RailItem[];
|
|
581
|
+
/**
|
|
582
|
+
* `top` (default): navigation in the top bar, tools in the side rail. `sidebar`: a labelled
|
|
583
|
+
* sidebar on the frame, with groups, nesting and a drawer on phones.
|
|
584
|
+
*/
|
|
585
|
+
navigation?: "top" | "sidebar";
|
|
586
|
+
/** With `navigation="sidebar"`: groups instead of the flat `nav` list. */
|
|
587
|
+
sidebarGroups?: SidebarGroup[];
|
|
588
|
+
/** With `navigation="sidebar"`: more sidebar props (collapsed, storageKey, shortcut, linkAs …). */
|
|
589
|
+
sidebar?: Partial<Omit<SidebarProps, "variant" | "groups">>;
|
|
590
|
+
/** With `navigation="sidebar"`: the workspace switcher at the top instead of the brand. */
|
|
591
|
+
workspaces?: WorkspaceSwitcherProps;
|
|
592
|
+
/** The account menu's entries (with `navigation="sidebar"` at the foot of the sidebar). */
|
|
593
|
+
userMenu?: (MenuItem | "-")[];
|
|
516
594
|
children?: ReactNode;
|
|
517
595
|
}
|
|
518
596
|
export interface StaggerProps extends BaseProps {
|
|
@@ -530,6 +608,8 @@ export interface CountUpProps extends BaseProps {
|
|
|
530
608
|
duration?: number;
|
|
531
609
|
delay?: number;
|
|
532
610
|
className?: string;
|
|
611
|
+
/** `false`: show the value without counting (it is always the value on the server). */
|
|
612
|
+
animate?: boolean;
|
|
533
613
|
}
|
|
534
614
|
export interface ListRowProps extends BaseProps {
|
|
535
615
|
avatar?: string;
|
|
@@ -543,6 +623,18 @@ export interface ListRowProps extends BaseProps {
|
|
|
543
623
|
unread?: boolean;
|
|
544
624
|
active?: boolean;
|
|
545
625
|
onClick?: () => void;
|
|
626
|
+
/** Makes the row a link (with `linkAs` for a router's link). */
|
|
627
|
+
href?: string;
|
|
628
|
+
linkAs?: ElementType;
|
|
629
|
+
/**
|
|
630
|
+
* Buttons of the row's own (rename, remove …), outside the clickable area so nothing interactive
|
|
631
|
+
* is nested. Without `onClick` and `href` the row is not interactive at all.
|
|
632
|
+
*/
|
|
633
|
+
actions?: ReactNode;
|
|
634
|
+
/** Lines the title may take before it ends in an ellipsis (default: it wraps freely). */
|
|
635
|
+
titleLines?: number;
|
|
636
|
+
/** Lines the subtitle may take (default 1); badges and facts wrap within them. */
|
|
637
|
+
subtitleLines?: number;
|
|
546
638
|
}
|
|
547
639
|
export interface TimelineProps extends BaseProps {
|
|
548
640
|
items: {
|
|
@@ -831,6 +923,14 @@ export interface TextFieldProps extends Omit<FormFieldProps, "children"> {
|
|
|
831
923
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
832
924
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
833
925
|
onBlur?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
926
|
+
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
927
|
+
/**
|
|
928
|
+
* An interactive control at the end of the field (an `IconButton`: clear, copy, locate …). Unlike
|
|
929
|
+
* `suffix` it can be clicked, and it stays when the field shows an error or success mark.
|
|
930
|
+
*/
|
|
931
|
+
action?: ReactNode;
|
|
932
|
+
/** For `type="password"`: a button that shows and hides the password (default true). */
|
|
933
|
+
reveal?: boolean;
|
|
834
934
|
}
|
|
835
935
|
export interface RadioGroupProps extends BaseProps {
|
|
836
936
|
label?: string;
|
|
@@ -924,10 +1024,18 @@ export interface SliderProps extends BaseProps {
|
|
|
924
1024
|
marks?: boolean;
|
|
925
1025
|
hint?: string;
|
|
926
1026
|
}
|
|
1027
|
+
export interface OtpInputHandle {
|
|
1028
|
+
/** Empties every cell and focuses the first. */
|
|
1029
|
+
reset: () => void;
|
|
1030
|
+
}
|
|
927
1031
|
export interface OtpInputProps extends BaseProps {
|
|
928
1032
|
length?: number;
|
|
929
1033
|
onComplete?: (code: string) => void;
|
|
930
1034
|
error?: boolean;
|
|
1035
|
+
/** Empties the cells when `error` turns on, ready for the next try (default true). */
|
|
1036
|
+
clearOnError?: boolean;
|
|
1037
|
+
/** `ref.current.reset()` empties the cells on demand. */
|
|
1038
|
+
ref?: Ref<OtpInputHandle>;
|
|
931
1039
|
label?: string;
|
|
932
1040
|
}
|
|
933
1041
|
export interface UploadFile {
|
|
@@ -947,9 +1055,10 @@ export interface FileDropProps extends BaseProps {
|
|
|
947
1055
|
/**
|
|
948
1056
|
* The person picked or dropped files: the real `File` objects, after `accept` and `multiple`.
|
|
949
1057
|
* Upload them yourself. To show progress, control `files` and set each `progress`; an
|
|
950
|
-
* uncontrolled list shows them with their size only.
|
|
1058
|
+
* uncontrolled list shows them with their size only. Return `false` to list none of them, or
|
|
1059
|
+
* the files to list (for example after checking their size).
|
|
951
1060
|
*/
|
|
952
|
-
onFiles?: (files: File[]) => void;
|
|
1061
|
+
onFiles?: (files: File[]) => void | boolean | File[];
|
|
953
1062
|
/** Dropped files that do not match `accept` (show an inline Alert). */
|
|
954
1063
|
onReject?: (files: File[]) => void;
|
|
955
1064
|
/** A listed file was removed or its upload cancelled. */
|
|
@@ -964,6 +1073,10 @@ export interface FileDropProps extends BaseProps {
|
|
|
964
1073
|
/** Accepted types, as for `<input type="file">` ("image/*,.pdf"); also checked on drop. */
|
|
965
1074
|
accept?: string;
|
|
966
1075
|
multiple?: boolean;
|
|
1076
|
+
/** No picking or dropping; the list stays visible. */
|
|
1077
|
+
disabled?: boolean;
|
|
1078
|
+
/** Takes part in a surrounding form under this name: the listed files are submitted with it. */
|
|
1079
|
+
name?: string;
|
|
967
1080
|
}
|
|
968
1081
|
export interface TooltipProps extends BaseProps {
|
|
969
1082
|
label: ReactNode;
|
|
@@ -1120,6 +1233,8 @@ export interface LegendProps extends BaseProps {
|
|
|
1120
1233
|
/* ── Kit 3: AI chat & agents ── */
|
|
1121
1234
|
export interface Source {
|
|
1122
1235
|
title: string;
|
|
1236
|
+
/** More about the source in a tooltip: dataset, publisher, date ("Stand") … */
|
|
1237
|
+
detail?: ReactNode;
|
|
1123
1238
|
icon?: IconName;
|
|
1124
1239
|
url?: string;
|
|
1125
1240
|
onClick?: () => void;
|
|
@@ -1333,6 +1448,11 @@ export interface CheckoutStepsProps extends BaseProps {
|
|
|
1333
1448
|
steps?: string[];
|
|
1334
1449
|
current?: number;
|
|
1335
1450
|
onPick?: (i: number) => void;
|
|
1451
|
+
/**
|
|
1452
|
+
* Numbers only, with the label of the current step (screen readers still hear every label).
|
|
1453
|
+
* Narrow containers (up to 560px) get this on their own.
|
|
1454
|
+
*/
|
|
1455
|
+
compact?: boolean;
|
|
1336
1456
|
}
|
|
1337
1457
|
export interface OrderTimelineProps extends BaseProps {
|
|
1338
1458
|
status: "Placed" | "Paid" | "Packed" | "Shipped" | "Delivered" | "Refunded" | "Cancelled";
|
|
@@ -1341,7 +1461,15 @@ export interface OrderTimelineProps extends BaseProps {
|
|
|
1341
1461
|
export interface PlanCardProps extends BaseProps {
|
|
1342
1462
|
name: string;
|
|
1343
1463
|
text?: string;
|
|
1344
|
-
|
|
1464
|
+
/**
|
|
1465
|
+
* A number is formatted as money (0 = "Free", null = "Let's talk"); any other node is shown as
|
|
1466
|
+
* it is, e.g. a placeholder ("—") or a price the app formatted itself.
|
|
1467
|
+
*/
|
|
1468
|
+
price: number | null | ReactNode;
|
|
1469
|
+
/** Before the price, e.g. "from". */
|
|
1470
|
+
pricePrefix?: ReactNode;
|
|
1471
|
+
/** Under the price: net or gross, billed yearly, VAT note … */
|
|
1472
|
+
priceNote?: ReactNode;
|
|
1345
1473
|
was?: number;
|
|
1346
1474
|
per?: string;
|
|
1347
1475
|
features?: string[];
|
|
@@ -1352,6 +1480,9 @@ export interface PlanCardProps extends BaseProps {
|
|
|
1352
1480
|
/** Disable the button, e.g. while a checkout starts or when the plan cannot be picked. */
|
|
1353
1481
|
disabled?: boolean;
|
|
1354
1482
|
onPick?: () => void;
|
|
1483
|
+
/** The action as a link (checkout or sign-up page), with `linkAs` for a router's link. */
|
|
1484
|
+
href?: string;
|
|
1485
|
+
linkAs?: ElementType;
|
|
1355
1486
|
}
|
|
1356
1487
|
|
|
1357
1488
|
/* ── Kit 3: system screens ── */
|
|
@@ -2043,6 +2174,8 @@ export interface TilePickerProps extends BaseProps {
|
|
|
2043
2174
|
multiple?: boolean;
|
|
2044
2175
|
min?: number;
|
|
2045
2176
|
label?: string;
|
|
2177
|
+
/** `list`: one compact row per option (small picture or icon beside the label), e.g. on phones. */
|
|
2178
|
+
layout?: "grid" | "list";
|
|
2046
2179
|
}
|
|
2047
2180
|
export interface ColorFieldProps extends BaseProps {
|
|
2048
2181
|
label?: ReactNode;
|
|
@@ -2292,6 +2425,8 @@ export interface WorkspaceSwitcherProps extends BaseProps {
|
|
|
2292
2425
|
footer?: ReactNode;
|
|
2293
2426
|
variant?: "frame";
|
|
2294
2427
|
width?: number;
|
|
2428
|
+
/** Only the workspace's mark, its name as the accessible name (a collapsed sidebar). */
|
|
2429
|
+
compact?: boolean;
|
|
2295
2430
|
}
|
|
2296
2431
|
export interface ExportDialogProps extends BaseProps {
|
|
2297
2432
|
open?: boolean;
|
|
@@ -2316,6 +2451,12 @@ export interface ExportDialogProps extends BaseProps {
|
|
|
2316
2451
|
}
|
|
2317
2452
|
export interface TwoFactorSetupProps extends BaseProps {
|
|
2318
2453
|
qr?: ReactNode;
|
|
2454
|
+
/** The otpauth:// link: the kit draws its QR code (instead of `qr`). */
|
|
2455
|
+
qrValue?: string;
|
|
2456
|
+
/** A "Trust this device" checkbox under the code field; a string replaces its label. */
|
|
2457
|
+
trustDevice?: boolean | string;
|
|
2458
|
+
/** The trust checkbox changed. */
|
|
2459
|
+
onTrustChange?: (trusted: boolean) => void;
|
|
2319
2460
|
secret: string;
|
|
2320
2461
|
onVerify?: (code: string) => boolean | Promise<boolean>;
|
|
2321
2462
|
codes?: string[];
|
|
@@ -2372,7 +2513,13 @@ export interface GalleryProps extends BaseProps {
|
|
|
2372
2513
|
loading?: "lazy" | "eager";
|
|
2373
2514
|
/** `referrerPolicy` of every image, e.g. `"no-referrer"` for photos from other hosts. */
|
|
2374
2515
|
referrerPolicy?: ImageReferrerPolicy;
|
|
2516
|
+
/** First image when uncontrolled. */
|
|
2375
2517
|
start?: number;
|
|
2518
|
+
/** The shown image (controlled, 0-based), with `onIndexChange`. */
|
|
2519
|
+
index?: number;
|
|
2520
|
+
onIndexChange?: (index: number) => void;
|
|
2521
|
+
/** Accessible name of the gallery (default "Images"), e.g. the listing's title. */
|
|
2522
|
+
label?: string;
|
|
2376
2523
|
ratio?: string;
|
|
2377
2524
|
thumbs?: boolean;
|
|
2378
2525
|
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;
|
|
@@ -2590,6 +2745,8 @@ export interface ToggleGroupProps extends BaseProps {
|
|
|
2590
2745
|
/** Accessible name of the group. */
|
|
2591
2746
|
label: string;
|
|
2592
2747
|
size?: "sm" | "md";
|
|
2748
|
+
/** Fills the width and shares it evenly; labels end in an ellipsis when space runs short. */
|
|
2749
|
+
block?: boolean;
|
|
2593
2750
|
}
|
|
2594
2751
|
export interface ButtonGroupProps extends BaseProps {
|
|
2595
2752
|
/** Accessible name of the group. */
|
|
@@ -2673,6 +2830,8 @@ export interface SelectMenuProps extends FieldProps, BaseProps {
|
|
|
2673
2830
|
onChange?: (value: string) => void;
|
|
2674
2831
|
placeholder?: string;
|
|
2675
2832
|
disabled?: boolean;
|
|
2833
|
+
/** `sm`: a compact trigger, e.g. a sort menu next to a heading. */
|
|
2834
|
+
size?: "sm" | "md";
|
|
2676
2835
|
}
|
|
2677
2836
|
|
|
2678
2837
|
/* ── Navigation ── */
|
|
@@ -2709,31 +2868,91 @@ export interface NavigationMenuProps extends BaseProps {
|
|
|
2709
2868
|
export interface SidebarItem {
|
|
2710
2869
|
id?: string;
|
|
2711
2870
|
label: string;
|
|
2712
|
-
|
|
2871
|
+
/** Required for pages; options in a filter group usually go without. */
|
|
2872
|
+
icon?: IconName;
|
|
2713
2873
|
count?: number;
|
|
2714
|
-
/**
|
|
2874
|
+
/** A small marker instead of a number: `"dot"` for new activity, or a short word such as "New". */
|
|
2875
|
+
badge?: string;
|
|
2876
|
+
/** Renders the item as a link to this address (with `linkAs` for a router's link, e.g. Next.js `Link`). */
|
|
2877
|
+
href?: string;
|
|
2878
|
+
/** Opens `href` in a new tab and says so. */
|
|
2879
|
+
external?: boolean;
|
|
2880
|
+
disabled?: boolean;
|
|
2881
|
+
/** A menu behind a "…" button on the item (rename, share, remove …). */
|
|
2882
|
+
actions?: (MenuItem | "-")[];
|
|
2883
|
+
/** One level of nested pages, shown when the item is open (as a flyout when the sidebar is collapsed). */
|
|
2715
2884
|
items?: Omit<SidebarItem, "items">[];
|
|
2885
|
+
/**
|
|
2886
|
+
* Makes the item a filter option: a checkbox (or a radio in a group with `select: "single"`)
|
|
2887
|
+
* with its label and `count`, instead of a page.
|
|
2888
|
+
*/
|
|
2889
|
+
checked?: boolean;
|
|
2890
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2716
2891
|
}
|
|
2717
2892
|
export interface SidebarGroup {
|
|
2893
|
+
id?: string;
|
|
2718
2894
|
label?: string;
|
|
2719
|
-
items
|
|
2895
|
+
items?: SidebarItem[];
|
|
2896
|
+
/** Any content instead of (or after) the items: a `RangeSlider`, `DateRangePicker`, chips … */
|
|
2897
|
+
content?: ReactNode;
|
|
2898
|
+
/** For filter options (items with `checked`): `single` makes them radios (one choice per group). */
|
|
2899
|
+
select?: "multiple" | "single";
|
|
2900
|
+
/** The label folds the group open and shut. */
|
|
2901
|
+
collapsible?: boolean;
|
|
2902
|
+
/** For a collapsible group: starts open (default true). */
|
|
2903
|
+
defaultOpen?: boolean;
|
|
2904
|
+
/** A small button next to the label, e.g. "+" to add a project. */
|
|
2905
|
+
action?: { label: string; icon?: IconName; onClick?: () => void };
|
|
2720
2906
|
}
|
|
2721
2907
|
export interface SidebarProps extends BaseProps {
|
|
2722
2908
|
groups: SidebarGroup[];
|
|
2723
2909
|
/** Id (or label) of the current page. */
|
|
2724
2910
|
current?: string;
|
|
2725
2911
|
onPick?: (id: string) => void;
|
|
2912
|
+
/**
|
|
2913
|
+
* `floating` (default): a card with rounded corners and a shadow. `attached`: full height, flush
|
|
2914
|
+
* with the edge of the screen, divided by a line. `shell`: on the dark frame of `AppShell`.
|
|
2915
|
+
*/
|
|
2916
|
+
variant?: "floating" | "attached" | "shell";
|
|
2726
2917
|
/** Icons only. */
|
|
2727
2918
|
collapsed?: boolean;
|
|
2728
2919
|
defaultCollapsed?: boolean;
|
|
2729
2920
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2730
|
-
/**
|
|
2731
|
-
|
|
2732
|
-
/**
|
|
2733
|
-
|
|
2734
|
-
/**
|
|
2921
|
+
/** Remember the collapsed state in the browser under this key. */
|
|
2922
|
+
storageKey?: string;
|
|
2923
|
+
/** ⌘B (Ctrl+B) collapses and expands the sidebar, except while typing in a field. */
|
|
2924
|
+
shortcut?: boolean;
|
|
2925
|
+
/** The element items with an `href` render as (default `a`), e.g. Next.js `Link`. */
|
|
2926
|
+
linkAs?: ElementType;
|
|
2927
|
+
/** On phones (up to 760px wide): whether the drawer is open (controlled). */
|
|
2928
|
+
mobileOpen?: boolean;
|
|
2929
|
+
onMobileOpenChange?: (open: boolean) => void;
|
|
2930
|
+
/** Top of the sidebar (brand, `WorkspaceSwitcher`); a function gets the collapsed state. */
|
|
2931
|
+
header?: ReactNode | ((state: { collapsed: boolean }) => ReactNode);
|
|
2932
|
+
/** Bottom of the sidebar (`UserMenu`, settings); a function gets the collapsed state. */
|
|
2933
|
+
footer?: ReactNode | ((state: { collapsed: boolean }) => 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). */
|
|
2735
2942
|
label?: string;
|
|
2736
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
|
+
}
|
|
2737
2956
|
|
|
2738
2957
|
/* ── ResizablePanels ── */
|
|
2739
2958
|
export interface ResizablePanelsProps extends BaseProps {
|
|
@@ -2749,6 +2968,342 @@ export interface ResizablePanelsProps extends BaseProps {
|
|
|
2749
2968
|
labels?: string[];
|
|
2750
2969
|
}
|
|
2751
2970
|
|
|
2971
|
+
/* ── QrCode ── */
|
|
2972
|
+
export interface QrCodeProps extends BaseProps {
|
|
2973
|
+
/** The text to encode: an otpauth:// link, a URL … */
|
|
2974
|
+
value: string;
|
|
2975
|
+
/** Error correction: L, M (default), Q or H. */
|
|
2976
|
+
level?: "L" | "M" | "Q" | "H";
|
|
2977
|
+
/** Width and height (default: the width of its container). */
|
|
2978
|
+
size?: number | string;
|
|
2979
|
+
/** Light modules around the code (default 4, the standard quiet zone). */
|
|
2980
|
+
quiet?: number;
|
|
2981
|
+
/** Accessible name (default "QR code"). */
|
|
2982
|
+
label?: string;
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
/* ── Life: wellbeing, health, goals, AI insights, consent ── */
|
|
2986
|
+
export interface Habit {
|
|
2987
|
+
id: string;
|
|
2988
|
+
label: string;
|
|
2989
|
+
icon?: IconName;
|
|
2990
|
+
tint?: Tint;
|
|
2991
|
+
/** One entry per day, oldest first, today last: true done, false missed, null no data. */
|
|
2992
|
+
days: (boolean | null)[];
|
|
2993
|
+
/** Days in a row (shown as "12-day streak"). */
|
|
2994
|
+
streak?: number;
|
|
2995
|
+
/** A short target, e.g. "8 glasses" or "3× a week". */
|
|
2996
|
+
goal?: string;
|
|
2997
|
+
}
|
|
2998
|
+
export interface HabitTrackerProps extends BaseProps {
|
|
2999
|
+
habits: Habit[];
|
|
3000
|
+
/** Labels of the day columns, oldest first (default: weekday initials ending today). */
|
|
3001
|
+
dayLabels?: string[];
|
|
3002
|
+
/** Today's box of a habit was toggled. */
|
|
3003
|
+
onToggle?: (id: string, done: boolean) => void;
|
|
3004
|
+
/** Accessible name of the list (default "Habits"). */
|
|
3005
|
+
label?: string;
|
|
3006
|
+
}
|
|
3007
|
+
export type MoodLevel = 1 | 2 | 3 | 4 | 5;
|
|
3008
|
+
export interface MoodPickerProps extends BaseProps {
|
|
3009
|
+
value?: MoodLevel | null;
|
|
3010
|
+
defaultValue?: MoodLevel | null;
|
|
3011
|
+
onChange?: (mood: MoodLevel) => void;
|
|
3012
|
+
/** The question (default "How are you feeling?"). */
|
|
3013
|
+
label?: ReactNode;
|
|
3014
|
+
/** Words for the five levels, lowest first (default Awful, Low, Okay, Good, Great). */
|
|
3015
|
+
levels?: [string, string, string, string, string];
|
|
3016
|
+
/** Only the faces; the words stay as accessible names. */
|
|
3017
|
+
compact?: boolean;
|
|
3018
|
+
}
|
|
3019
|
+
export interface VitalTileProps extends BaseProps {
|
|
3020
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3021
|
+
surface?: Surface;
|
|
3022
|
+
label: string;
|
|
3023
|
+
value: number;
|
|
3024
|
+
unit?: string;
|
|
3025
|
+
icon?: IconName;
|
|
3026
|
+
/** The healthy range [low, high]; the tile says whether the value is below, in or above it. */
|
|
3027
|
+
normal?: [number, number];
|
|
3028
|
+
/** The whole scale of the band [min, max] (default: the normal range with room on both sides). */
|
|
3029
|
+
scale?: [number, number];
|
|
3030
|
+
/** Recent values, oldest first, drawn as a sparkline. */
|
|
3031
|
+
trend?: number[];
|
|
3032
|
+
/** Under the value: when it was measured, the source … */
|
|
3033
|
+
caption?: ReactNode;
|
|
3034
|
+
/** Digits after the decimal point (default 0). */
|
|
3035
|
+
digits?: number;
|
|
3036
|
+
}
|
|
3037
|
+
export interface ActivityRing {
|
|
3038
|
+
label: string;
|
|
3039
|
+
value: number;
|
|
3040
|
+
goal: number;
|
|
3041
|
+
unit?: string;
|
|
3042
|
+
tint?: Tint;
|
|
3043
|
+
}
|
|
3044
|
+
export interface ActivityRingsProps extends BaseProps {
|
|
3045
|
+
/** Outer ring first. */
|
|
3046
|
+
rings: ActivityRing[];
|
|
3047
|
+
/** Diameter of the rings (default 132). */
|
|
3048
|
+
size?: number;
|
|
3049
|
+
/** Hide the legend beside the rings. */
|
|
3050
|
+
legend?: boolean;
|
|
3051
|
+
/** Accessible name (default "Activity"). */
|
|
3052
|
+
label?: string;
|
|
3053
|
+
}
|
|
3054
|
+
export type SleepStage = "awake" | "rem" | "light" | "deep";
|
|
3055
|
+
export interface SleepSegment {
|
|
3056
|
+
stage: SleepStage;
|
|
3057
|
+
start: Date | string | number;
|
|
3058
|
+
end: Date | string | number;
|
|
3059
|
+
}
|
|
3060
|
+
export interface SleepChartProps extends BaseProps {
|
|
3061
|
+
/** The night in order, from falling asleep to getting up. */
|
|
3062
|
+
segments: SleepSegment[];
|
|
3063
|
+
/** Accessible name (default "Sleep stages"). */
|
|
3064
|
+
label?: string;
|
|
3065
|
+
/** Hide the totals per stage under the chart. */
|
|
3066
|
+
summary?: boolean;
|
|
3067
|
+
}
|
|
3068
|
+
export interface MedicationItem {
|
|
3069
|
+
id: string;
|
|
3070
|
+
name: string;
|
|
3071
|
+
dose?: string;
|
|
3072
|
+
/** When, as shown ("08:00", "With breakfast"). */
|
|
3073
|
+
time: string;
|
|
3074
|
+
/** Set by the app, which knows the clock: default "taken" when `taken`, else "due". */
|
|
3075
|
+
status?: "taken" | "due" | "missed" | "upcoming";
|
|
3076
|
+
taken?: boolean;
|
|
3077
|
+
note?: string;
|
|
3078
|
+
icon?: IconName;
|
|
3079
|
+
}
|
|
3080
|
+
export interface MedicationListProps extends BaseProps {
|
|
3081
|
+
items: MedicationItem[];
|
|
3082
|
+
/** "Mark as taken" was pressed. */
|
|
3083
|
+
onTake?: (id: string) => void;
|
|
3084
|
+
/** Accessible name (default "Medication"). */
|
|
3085
|
+
label?: string;
|
|
3086
|
+
}
|
|
3087
|
+
export interface JournalEntryProps extends BaseProps {
|
|
3088
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3089
|
+
surface?: Surface;
|
|
3090
|
+
date: Date | string | number;
|
|
3091
|
+
title?: string;
|
|
3092
|
+
mood?: MoodLevel;
|
|
3093
|
+
tags?: string[];
|
|
3094
|
+
children?: ReactNode;
|
|
3095
|
+
/** Buttons at the end (edit, share …). */
|
|
3096
|
+
actions?: ReactNode;
|
|
3097
|
+
}
|
|
3098
|
+
export interface GoalCardProps extends BaseProps {
|
|
3099
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3100
|
+
surface?: Surface;
|
|
3101
|
+
title: string;
|
|
3102
|
+
value: number;
|
|
3103
|
+
target: number;
|
|
3104
|
+
/** How to show value and target (default number). */
|
|
3105
|
+
format?: "number" | "money" | "percent";
|
|
3106
|
+
/** Unit after numbers ("km", "books"). */
|
|
3107
|
+
unit?: string;
|
|
3108
|
+
currency?: string;
|
|
3109
|
+
due?: Date | string | number;
|
|
3110
|
+
icon?: IconName;
|
|
3111
|
+
tint?: Tint;
|
|
3112
|
+
milestones?: { label: string; done?: boolean }[];
|
|
3113
|
+
/** A note under the progress ("€250 a month keeps you on track"). */
|
|
3114
|
+
note?: ReactNode;
|
|
3115
|
+
}
|
|
3116
|
+
export interface InsightCardProps extends BaseProps {
|
|
3117
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3118
|
+
surface?: Surface;
|
|
3119
|
+
title: string;
|
|
3120
|
+
children?: ReactNode;
|
|
3121
|
+
icon?: IconName;
|
|
3122
|
+
tone?: "info" | "success" | "warning" | "highlight";
|
|
3123
|
+
/** Above the title: area and time ("Money · 2 h ago"). */
|
|
3124
|
+
meta?: ReactNode;
|
|
3125
|
+
/** Where the insight comes from, as chips (like chat sources). */
|
|
3126
|
+
sources?: Source[];
|
|
3127
|
+
/** Why the assistant shows it; folded away behind "Why am I seeing this?". */
|
|
3128
|
+
why?: ReactNode;
|
|
3129
|
+
onAccept?: () => void;
|
|
3130
|
+
acceptLabel?: string;
|
|
3131
|
+
onSnooze?: () => void;
|
|
3132
|
+
onDismiss?: () => void;
|
|
3133
|
+
}
|
|
3134
|
+
export interface ConsentScope {
|
|
3135
|
+
id: string;
|
|
3136
|
+
label: string;
|
|
3137
|
+
description?: string;
|
|
3138
|
+
granted: boolean;
|
|
3139
|
+
/** Needed for the connection to work at all: shown, not switchable. */
|
|
3140
|
+
required?: boolean;
|
|
3141
|
+
}
|
|
3142
|
+
export interface ConsentConnector {
|
|
3143
|
+
id: string;
|
|
3144
|
+
name: string;
|
|
3145
|
+
icon?: IconName;
|
|
3146
|
+
/** A logo instead of the icon. */
|
|
3147
|
+
logo?: ReactNode;
|
|
3148
|
+
/** What the assistant uses it for. */
|
|
3149
|
+
purpose?: ReactNode;
|
|
3150
|
+
scopes: ConsentScope[];
|
|
3151
|
+
lastUsed?: Date | string | number;
|
|
3152
|
+
}
|
|
3153
|
+
export interface ConsentListProps extends BaseProps {
|
|
3154
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3155
|
+
surface?: Surface;
|
|
3156
|
+
connectors: ConsentConnector[];
|
|
3157
|
+
onScopeChange?: (connectorId: string, scopeId: string, granted: boolean) => void;
|
|
3158
|
+
onRevoke?: (connectorId: string) => void;
|
|
3159
|
+
/** Accessible name (default "Data access"). */
|
|
3160
|
+
label?: string;
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
/* ── Life: money, insurance, deadlines, documents ── */
|
|
3164
|
+
export interface BudgetCategory {
|
|
3165
|
+
id: string;
|
|
3166
|
+
label: string;
|
|
3167
|
+
icon?: IconName;
|
|
3168
|
+
tint?: Tint;
|
|
3169
|
+
spent: number;
|
|
3170
|
+
limit: number;
|
|
3171
|
+
}
|
|
3172
|
+
export interface BudgetListProps extends BaseProps {
|
|
3173
|
+
categories: BudgetCategory[];
|
|
3174
|
+
currency?: string;
|
|
3175
|
+
/** A category was picked (to show its transactions). */
|
|
3176
|
+
onSelect?: (id: string) => void;
|
|
3177
|
+
/** Accessible name (default "Budgets"). */
|
|
3178
|
+
label?: string;
|
|
3179
|
+
}
|
|
3180
|
+
export interface Subscription {
|
|
3181
|
+
id: string;
|
|
3182
|
+
name: string;
|
|
3183
|
+
icon?: IconName;
|
|
3184
|
+
/** A logo instead of the icon. */
|
|
3185
|
+
logo?: ReactNode;
|
|
3186
|
+
amount: number;
|
|
3187
|
+
period: "week" | "month" | "year";
|
|
3188
|
+
/** Next charge. */
|
|
3189
|
+
next?: Date | string | number;
|
|
3190
|
+
status?: "active" | "trial" | "cancelled";
|
|
3191
|
+
category?: string;
|
|
3192
|
+
}
|
|
3193
|
+
export interface SubscriptionListProps extends BaseProps {
|
|
3194
|
+
items: Subscription[];
|
|
3195
|
+
currency?: string;
|
|
3196
|
+
/** "Manage" on a subscription (cancel, change plan …). */
|
|
3197
|
+
onManage?: (id: string) => void;
|
|
3198
|
+
/** Hide the monthly and yearly totals. */
|
|
3199
|
+
totals?: boolean;
|
|
3200
|
+
/** Accessible name (default "Subscriptions"). */
|
|
3201
|
+
label?: string;
|
|
3202
|
+
}
|
|
3203
|
+
export interface NetWorthCardProps extends BaseProps {
|
|
3204
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3205
|
+
surface?: Surface;
|
|
3206
|
+
assets: { label: string; value: number; icon?: IconName }[];
|
|
3207
|
+
liabilities?: { label: string; value: number; icon?: IconName }[];
|
|
3208
|
+
/** Net worth over time, oldest first. */
|
|
3209
|
+
history?: number[];
|
|
3210
|
+
/** Change over `changeLabel` (e.g. +1,240 "since October"). */
|
|
3211
|
+
change?: number;
|
|
3212
|
+
changeLabel?: string;
|
|
3213
|
+
currency?: string;
|
|
3214
|
+
title?: string;
|
|
3215
|
+
}
|
|
3216
|
+
export interface DeadlineItem {
|
|
3217
|
+
id: string;
|
|
3218
|
+
title: string;
|
|
3219
|
+
/** What kind: "Contract", "ID card", "Tax" … */
|
|
3220
|
+
kind?: string;
|
|
3221
|
+
icon?: IconName;
|
|
3222
|
+
date: Date | string | number;
|
|
3223
|
+
amount?: number;
|
|
3224
|
+
done?: boolean;
|
|
3225
|
+
note?: string;
|
|
3226
|
+
}
|
|
3227
|
+
export interface DeadlineListProps extends BaseProps {
|
|
3228
|
+
items: DeadlineItem[];
|
|
3229
|
+
/** The day to count from (default: now). Set it for server rendering and stable output. */
|
|
3230
|
+
today?: Date | string | number;
|
|
3231
|
+
/** Days ahead that count as soon (default 14). */
|
|
3232
|
+
soon?: number;
|
|
3233
|
+
currency?: string;
|
|
3234
|
+
onDone?: (id: string) => void;
|
|
3235
|
+
/** Accessible name (default "Deadlines"). */
|
|
3236
|
+
label?: string;
|
|
3237
|
+
}
|
|
3238
|
+
export interface PolicyCardProps extends BaseProps {
|
|
3239
|
+
/** `"glass"`: translucent glass over a backdrop (`Ambient`, a photo, a map); `"solid"` opts out inside a glass `UIProvider`. */
|
|
3240
|
+
surface?: Surface;
|
|
3241
|
+
/** The kind of insurance: "Household contents", "Liability" … */
|
|
3242
|
+
type: string;
|
|
3243
|
+
insurer: string;
|
|
3244
|
+
icon?: IconName;
|
|
3245
|
+
tint?: Tint;
|
|
3246
|
+
policyNumber?: string;
|
|
3247
|
+
/** Show only the last four characters of the policy number. */
|
|
3248
|
+
maskNumber?: boolean;
|
|
3249
|
+
/** Sum insured: a number (money) or text ("unlimited"). */
|
|
3250
|
+
coverage?: number | ReactNode;
|
|
3251
|
+
premium?: { amount: number; period: "month" | "quarter" | "year" };
|
|
3252
|
+
deductible?: number;
|
|
3253
|
+
renews?: Date | string | number;
|
|
3254
|
+
status?: "active" | "pending" | "expiring" | "lapsed";
|
|
3255
|
+
currency?: string;
|
|
3256
|
+
/** Buttons at the foot (documents, report a claim …). */
|
|
3257
|
+
actions?: ReactNode;
|
|
3258
|
+
}
|
|
3259
|
+
export interface CoverageRow {
|
|
3260
|
+
id: string;
|
|
3261
|
+
risk: string;
|
|
3262
|
+
status: "covered" | "partial" | "none";
|
|
3263
|
+
note?: ReactNode;
|
|
3264
|
+
/** Which policy covers it. */
|
|
3265
|
+
policy?: string;
|
|
3266
|
+
}
|
|
3267
|
+
export interface CoverageMatrixProps extends BaseProps {
|
|
3268
|
+
rows: CoverageRow[];
|
|
3269
|
+
/** Accessible name and caption (default "Coverage"). */
|
|
3270
|
+
label?: string;
|
|
3271
|
+
}
|
|
3272
|
+
export interface ClaimStep {
|
|
3273
|
+
label: string;
|
|
3274
|
+
date?: Date | string | number;
|
|
3275
|
+
state: "done" | "current" | "todo" | "failed";
|
|
3276
|
+
note?: ReactNode;
|
|
3277
|
+
}
|
|
3278
|
+
export interface ClaimTimelineProps extends BaseProps {
|
|
3279
|
+
title: string;
|
|
3280
|
+
/** Reference and insurer under the title. */
|
|
3281
|
+
meta?: ReactNode;
|
|
3282
|
+
amount?: number;
|
|
3283
|
+
currency?: string;
|
|
3284
|
+
steps: ClaimStep[];
|
|
3285
|
+
}
|
|
3286
|
+
export interface LifeDocument {
|
|
3287
|
+
id: string;
|
|
3288
|
+
title: string;
|
|
3289
|
+
category?: string;
|
|
3290
|
+
icon?: IconName;
|
|
3291
|
+
holder?: string;
|
|
3292
|
+
expires?: Date | string | number;
|
|
3293
|
+
/** "PDF · 240 KB" */
|
|
3294
|
+
meta?: string;
|
|
3295
|
+
}
|
|
3296
|
+
export interface DocumentListProps extends BaseProps {
|
|
3297
|
+
documents: LifeDocument[];
|
|
3298
|
+
/** The day to count expiry from (default: now). */
|
|
3299
|
+
today?: Date | string | number;
|
|
3300
|
+
/** Days ahead that count as expiring soon (default 60). */
|
|
3301
|
+
soon?: number;
|
|
3302
|
+
onOpen?: (id: string) => void;
|
|
3303
|
+
/** Accessible name (default "Documents"). */
|
|
3304
|
+
label?: string;
|
|
3305
|
+
}
|
|
3306
|
+
|
|
2752
3307
|
export interface IconProps {
|
|
2753
3308
|
name: IconName;
|
|
2754
3309
|
/** Pixel size (default 16; 14 in chips and badges, 20 in navigation). */
|
|
@@ -2810,6 +3365,44 @@ export type TfExportDialogElement = TfElement<ExportDialogProps>;
|
|
|
2810
3365
|
export type TfTwoFactorSetupElement = TfElement<TwoFactorSetupProps>;
|
|
2811
3366
|
/** `<tf-color-field>`: The ColorField component as a custom element. */
|
|
2812
3367
|
export type TfColorFieldElement = TfElement<ColorFieldProps>;
|
|
3368
|
+
/** `<tf-qr-code>`: A QR code drawn as SVG and encoded on the device, so the text (a sign-in secret, an invite link) never goes to a service. */
|
|
3369
|
+
export type TfQrCodeElement = TfElement<QrCodeProps>;
|
|
3370
|
+
/** `<tf-habit-tracker>`: Habits with their last days as a row of marks: done, missed or no entry, today's mark a toggle. */
|
|
3371
|
+
export type TfHabitTrackerElement = TfElement<HabitTrackerProps>;
|
|
3372
|
+
/** `<tf-mood-picker>`: A five-step mood scale with faces and words, as a radio group. */
|
|
3373
|
+
export type TfMoodPickerElement = TfElement<MoodPickerProps>;
|
|
3374
|
+
/** `<tf-vital-tile>`: One health value with its healthy range: the value, a band with the normal zone and a marker, a status in words (in range, below, above) and an optional trend. */
|
|
3375
|
+
export type TfVitalTileElement = TfElement<VitalTileProps>;
|
|
3376
|
+
/** `<tf-activity-rings>`: Concentric progress rings for daily goals (move, exercise, stand, steps, water) with a legend. */
|
|
3377
|
+
export type TfActivityRingsElement = TfElement<ActivityRingsProps>;
|
|
3378
|
+
/** `<tf-sleep-chart>`: A night as sleep stages over time, one lane per stage (awake, REM, light, deep), with the time asleep and the time per stage. */
|
|
3379
|
+
export type TfSleepChartElement = TfElement<SleepChartProps>;
|
|
3380
|
+
/** `<tf-medication-list>`: Today's doses in order, each with its time, name, dose, a status in words and a "taken" button. */
|
|
3381
|
+
export type TfMedicationListElement = TfElement<MedicationListProps>;
|
|
3382
|
+
/** `<tf-journal-entry>`: A journal or diary entry: the date, the mood of the day, a title, the text and tags, with room for actions such as edit or share. */
|
|
3383
|
+
export type TfJournalEntryElement = TfElement<JournalEntryProps>;
|
|
3384
|
+
/** `<tf-goal-card>`: A goal with its progress toward a target, a due date, milestones and a note. */
|
|
3385
|
+
export type TfGoalCardElement = TfElement<GoalCardProps>;
|
|
3386
|
+
/** `<tf-insight-card>`: Something the assistant noticed: what, where it comes from, why it is shown and what to do. */
|
|
3387
|
+
export type TfInsightCardElement = TfElement<InsightCardProps>;
|
|
3388
|
+
/** `<tf-consent-list>`: What each connected source lets the assistant read or do: one card per source with its purpose, last use and a switch per scope, plus "Revoke access". */
|
|
3389
|
+
export type TfConsentListElement = TfElement<ConsentListProps>;
|
|
3390
|
+
/** `<tf-budget-list>`: Spending per category against its limit: spent and limit, a bar, and what is left or over in words. */
|
|
3391
|
+
export type TfBudgetListElement = TfElement<BudgetListProps>;
|
|
3392
|
+
/** `<tf-subscription-list>`: Recurring payments with their next charge, trial and cancelled states, and what they cost together a month and a year. */
|
|
3393
|
+
export type TfSubscriptionListElement = TfElement<SubscriptionListProps>;
|
|
3394
|
+
/** `<tf-net-worth-card>`: What you own minus what you owe: the total, its change and trend, and the assets and liabilities behind it. */
|
|
3395
|
+
export type TfNetWorthCardElement = TfElement<NetWorthCardProps>;
|
|
3396
|
+
/** `<tf-deadline-list>`: Bills, renewals, notice periods and expiring documents in date order, each with "Today", "In 12 days" or "Overdue by 3 days" in words. */
|
|
3397
|
+
export type TfDeadlineListElement = TfElement<DeadlineListProps>;
|
|
3398
|
+
/** `<tf-policy-card>`: One insurance policy: type and insurer, sum insured, premium, deductible, policy number, renewal date and status (active, pending, expiring, lapsed), with room for actions. */
|
|
3399
|
+
export type TfPolicyCardElement = TfElement<PolicyCardProps>;
|
|
3400
|
+
/** `<tf-coverage-matrix>`: Life risks and whether a policy covers them: covered, partly or not covered, with the policy and a note, and a count of each above the table. */
|
|
3401
|
+
export type TfCoverageMatrixElement = TfElement<CoverageMatrixProps>;
|
|
3402
|
+
/** `<tf-claim-timeline>`: An insurance claim from report to payout: steps that are done, current, still to come or failed, with dates and notes, and the amount claimed. */
|
|
3403
|
+
export type TfClaimTimelineElement = TfElement<ClaimTimelineProps>;
|
|
3404
|
+
/** `<tf-document-list>`: Important papers (IDs, contracts, policies, certificates) with category, holder and expiry: "Expired", "Expires in 19 days" or "Valid until May 2031". */
|
|
3405
|
+
export type TfDocumentListElement = TfElement<DocumentListProps>;
|
|
2813
3406
|
/** `<tf-agent-card>`: One agent at a glance (AgentCard) and everything about it beside a chat (AgentDetails). */
|
|
2814
3407
|
export type TfAgentCardElement = TfElement<AgentCardProps>;
|
|
2815
3408
|
/** `<tf-agent-details>`: The AgentDetails component as a custom element. */
|
|
@@ -2897,7 +3490,7 @@ export type TfRichTextElement = TfElement<RichTextProps>;
|
|
|
2897
3490
|
/** `<tf-code-block>`: The CodeBlock component as a custom element. */
|
|
2898
3491
|
export type TfCodeBlockElement = TfElement<CodeBlockProps>;
|
|
2899
3492
|
/** `<tf-typing-dots>`: The TypingDots component as a custom element. */
|
|
2900
|
-
export type TfTypingDotsElement = TfElement<{
|
|
3493
|
+
export type TfTypingDotsElement = TfElement<{}>;
|
|
2901
3494
|
/** `<tf-agent-mark>`: The AgentMark component as a custom element. */
|
|
2902
3495
|
export type TfAgentMarkElement = TfElement<AgentMarkProps>;
|
|
2903
3496
|
/** `<tf-chat-message>`: One turn in a conversation with an agent: user bubble on the right, agent reply as rich text on the left. */
|
|
@@ -3086,8 +3679,10 @@ export type TfPaginationElement = TfElement<PaginationProps>;
|
|
|
3086
3679
|
export type TfMenubarElement = TfElement<MenubarProps>;
|
|
3087
3680
|
/** `<tf-navigation-menu>`: Site navigation for marketing pages: plain links and items that open a panel of links with icons and descriptions, optionally with a highlighted card. */
|
|
3088
3681
|
export type TfNavigationMenuElement = TfElement<NavigationMenuProps>;
|
|
3089
|
-
/** `<tf-sidebar>`: App navigation down the side: groups with headings, counts, one level of nested pages and a collapsed mode with icons only. */
|
|
3682
|
+
/** `<tf-sidebar>`: App navigation down the side: groups with headings, counts and badges, one level of nested pages, links, item menus and a collapsed mode with icons only. */
|
|
3090
3683
|
export type TfSidebarElement = TfElement<SidebarProps>;
|
|
3684
|
+
/** `<tf-user-menu>`: The signed-in account at the foot of a sidebar: avatar, name and email, opening a menu with profile, settings and sign-out. */
|
|
3685
|
+
export type TfUserMenuElement = TfElement<UserMenuProps>;
|
|
3091
3686
|
/** `<tf-connection-card>`: Connected services and the live connection: ConnectionCard and ConnectionBanner. */
|
|
3092
3687
|
export type TfConnectionCardElement = TfElement<ConnectionCardProps>;
|
|
3093
3688
|
/** `<tf-connection-banner>`: The ConnectionBanner component as a custom element. */
|
|
@@ -3221,6 +3816,25 @@ declare global {
|
|
|
3221
3816
|
"tf-export-dialog": TfExportDialogElement;
|
|
3222
3817
|
"tf-two-factor-setup": TfTwoFactorSetupElement;
|
|
3223
3818
|
"tf-color-field": TfColorFieldElement;
|
|
3819
|
+
"tf-qr-code": TfQrCodeElement;
|
|
3820
|
+
"tf-habit-tracker": TfHabitTrackerElement;
|
|
3821
|
+
"tf-mood-picker": TfMoodPickerElement;
|
|
3822
|
+
"tf-vital-tile": TfVitalTileElement;
|
|
3823
|
+
"tf-activity-rings": TfActivityRingsElement;
|
|
3824
|
+
"tf-sleep-chart": TfSleepChartElement;
|
|
3825
|
+
"tf-medication-list": TfMedicationListElement;
|
|
3826
|
+
"tf-journal-entry": TfJournalEntryElement;
|
|
3827
|
+
"tf-goal-card": TfGoalCardElement;
|
|
3828
|
+
"tf-insight-card": TfInsightCardElement;
|
|
3829
|
+
"tf-consent-list": TfConsentListElement;
|
|
3830
|
+
"tf-budget-list": TfBudgetListElement;
|
|
3831
|
+
"tf-subscription-list": TfSubscriptionListElement;
|
|
3832
|
+
"tf-net-worth-card": TfNetWorthCardElement;
|
|
3833
|
+
"tf-deadline-list": TfDeadlineListElement;
|
|
3834
|
+
"tf-policy-card": TfPolicyCardElement;
|
|
3835
|
+
"tf-coverage-matrix": TfCoverageMatrixElement;
|
|
3836
|
+
"tf-claim-timeline": TfClaimTimelineElement;
|
|
3837
|
+
"tf-document-list": TfDocumentListElement;
|
|
3224
3838
|
"tf-agent-card": TfAgentCardElement;
|
|
3225
3839
|
"tf-agent-details": TfAgentDetailsElement;
|
|
3226
3840
|
"tf-chat-list": TfChatListElement;
|
|
@@ -3360,6 +3974,7 @@ declare global {
|
|
|
3360
3974
|
"tf-menubar": TfMenubarElement;
|
|
3361
3975
|
"tf-navigation-menu": TfNavigationMenuElement;
|
|
3362
3976
|
"tf-sidebar": TfSidebarElement;
|
|
3977
|
+
"tf-user-menu": TfUserMenuElement;
|
|
3363
3978
|
"tf-connection-card": TfConnectionCardElement;
|
|
3364
3979
|
"tf-connection-banner": TfConnectionBannerElement;
|
|
3365
3980
|
"tf-server-card": TfServerCardElement;
|