@usefidel/design-system 0.15.0 → 0.17.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/fidel.manifest.json +2 -2
- package/dist/icons.cjs +66 -0
- package/dist/icons.d.cts +21 -0
- package/dist/icons.d.ts +21 -0
- package/dist/icons.js +57 -0
- package/dist/index.cjs +501 -121
- package/dist/index.css +628 -0
- package/dist/index.d.cts +184 -2
- package/dist/index.d.ts +184 -2
- package/dist/index.js +490 -121
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonVariant = 'primary' | 'outlined' | 'text' | 'neutral' | 'link'
|
|
5
|
+
/** High-contrast near-black, for a page's main create action ("New comparison"). */
|
|
6
|
+
| 'dark'
|
|
5
7
|
/** Final confirm of a destructive action ("Delete my account"). */
|
|
6
8
|
| 'danger'
|
|
7
9
|
/** Starts a destructive action ("Delete account", "Remove"). */
|
|
@@ -24,6 +26,25 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
24
26
|
*/
|
|
25
27
|
declare function Button({ variant, size, leftIcon, rightIcon, type, className, children, ...rest }: ButtonProps): react.JSX.Element;
|
|
26
28
|
|
|
29
|
+
interface ButtonLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
30
|
+
/** Where the link goes. */
|
|
31
|
+
href: string;
|
|
32
|
+
/** Visual style. @default 'primary' */
|
|
33
|
+
variant?: ButtonVariant;
|
|
34
|
+
/** Size step. @default 'medium' */
|
|
35
|
+
size?: ButtonSize;
|
|
36
|
+
/** Optional leading icon (rendered in a 20px slot). */
|
|
37
|
+
leftIcon?: ReactNode;
|
|
38
|
+
/** Optional trailing icon (rendered in a 20px slot). */
|
|
39
|
+
rightIcon?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A link that looks like a Button. Use it when the action navigates (to a
|
|
43
|
+
* page or another site) rather than doing something on this page, so the
|
|
44
|
+
* browser keeps link behaviour: open in a new tab, copy link, status bar URL.
|
|
45
|
+
*/
|
|
46
|
+
declare function ButtonLink({ variant, size, leftIcon, rightIcon, className, children, ...rest }: ButtonLinkProps): react.JSX.Element;
|
|
47
|
+
|
|
27
48
|
interface MismatchProperty {
|
|
28
49
|
/** Property label, e.g. "color", "font-size". */
|
|
29
50
|
label: string;
|
|
@@ -421,4 +442,165 @@ interface SplitProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
421
442
|
*/
|
|
422
443
|
declare function Split({ aside, children, asideWidth, sticky, collapseBelow, className, style, ...rest }: SplitProps): react.JSX.Element;
|
|
423
444
|
|
|
424
|
-
|
|
445
|
+
/** Semantic colour roles shared by status components (Badge, Tag, MultiSelect dots). */
|
|
446
|
+
type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
447
|
+
|
|
448
|
+
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
449
|
+
/** Colour role. @default 'neutral' */
|
|
450
|
+
tone?: Tone;
|
|
451
|
+
/** Leading icon, drawn at 12px. */
|
|
452
|
+
icon?: ReactNode;
|
|
453
|
+
children: ReactNode;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Fidel design-system Badge: a tinted pill naming a state ("Checking",
|
|
457
|
+
* "Checked", "Failed to run"). Measured from Figma "✅Project" status-badge
|
|
458
|
+
* (node 231:59799).
|
|
459
|
+
*/
|
|
460
|
+
declare function Badge({ tone, icon, className, children, ...rest }: BadgeProps): react.JSX.Element;
|
|
461
|
+
|
|
462
|
+
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
463
|
+
/** Colour of the leading dot. Leave out for no dot. */
|
|
464
|
+
dot?: Tone;
|
|
465
|
+
children: ReactNode;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Fidel design-system Tag: a quiet bordered label for a category, with an
|
|
469
|
+
* optional coloured dot. Measured from Figma "✅Project" comparison-type chip
|
|
470
|
+
* (node 231:59808).
|
|
471
|
+
*/
|
|
472
|
+
declare function Tag({ dot, className, children, ...rest }: TagProps): react.JSX.Element;
|
|
473
|
+
|
|
474
|
+
interface MultiSelectOption {
|
|
475
|
+
value: string;
|
|
476
|
+
label: string;
|
|
477
|
+
/** Coloured dot before the label. */
|
|
478
|
+
dot?: Tone;
|
|
479
|
+
/** Trailing count, e.g. how many results the option would show. */
|
|
480
|
+
count?: number;
|
|
481
|
+
disabled?: boolean;
|
|
482
|
+
}
|
|
483
|
+
interface MultiSelectProps {
|
|
484
|
+
/** Trigger text, e.g. "Status". Also the list's accessible name. */
|
|
485
|
+
label: string;
|
|
486
|
+
options: MultiSelectOption[];
|
|
487
|
+
/** Selected values. An empty list means nothing is ticked. */
|
|
488
|
+
value: string[];
|
|
489
|
+
onChange: (value: string[]) => void;
|
|
490
|
+
disabled?: boolean;
|
|
491
|
+
selectAllLabel?: string;
|
|
492
|
+
clearLabel?: string;
|
|
493
|
+
id?: string;
|
|
494
|
+
className?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Fidel design-system MultiSelect: a filter menu of checkbox options, each
|
|
498
|
+
* with an optional dot and count, and Select all / Clear in the footer. The
|
|
499
|
+
* trigger shows "n/m" once anything is ticked. Keyboard: Enter/Space/↓ open;
|
|
500
|
+
* ↑/↓/Home/End move; Enter/Space toggle; Esc closes. Measured from Figma
|
|
501
|
+
* "✅Project" filter Select (node 231:60682).
|
|
502
|
+
*/
|
|
503
|
+
declare function MultiSelect({ label, options, value, onChange, disabled, selectAllLabel, clearLabel, id, className, }: MultiSelectProps): react.JSX.Element;
|
|
504
|
+
|
|
505
|
+
interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
506
|
+
/** Keyboard hint shown at the end while the field is empty, e.g. "/". */
|
|
507
|
+
shortcut?: string;
|
|
508
|
+
/** Class for the wrapper; `className` goes on the input. */
|
|
509
|
+
containerClassName?: string;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Fidel design-system SearchInput: a 44px search field with a leading
|
|
513
|
+
* magnifier. Measured from Figma "✅Project" toolbar search (node 231:59687).
|
|
514
|
+
*/
|
|
515
|
+
declare const SearchInput: react.ForwardRefExoticComponent<SearchInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
516
|
+
|
|
517
|
+
interface PaginationProps {
|
|
518
|
+
/** Current page, 1-based. */
|
|
519
|
+
page: number;
|
|
520
|
+
pageCount: number;
|
|
521
|
+
onPageChange: (page: number) => void;
|
|
522
|
+
/** With `pageSize`, adds "Showing 1–20 of 45" (full variant only). */
|
|
523
|
+
total?: number;
|
|
524
|
+
pageSize?: number;
|
|
525
|
+
/** full: range text + page numbers. compact: "Page 2 of 3" between arrows. @default 'full' */
|
|
526
|
+
variant?: 'full' | 'compact';
|
|
527
|
+
className?: string;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Fidel design-system Pagination. Renders nothing when there is one page.
|
|
531
|
+
*/
|
|
532
|
+
declare function Pagination({ page, pageCount, onPageChange, total, pageSize, variant, className }: PaginationProps): react.JSX.Element | null;
|
|
533
|
+
|
|
534
|
+
interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
535
|
+
/** Picture above the title, e.g. <StackedCardsIllustration />. */
|
|
536
|
+
illustration?: ReactNode;
|
|
537
|
+
title: ReactNode;
|
|
538
|
+
description?: ReactNode;
|
|
539
|
+
/** Primary action, usually a Button. */
|
|
540
|
+
action?: ReactNode;
|
|
541
|
+
/** Secondary line under the action, e.g. a help link. */
|
|
542
|
+
footer?: ReactNode;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Fidel design-system EmptyState: a centred illustration, title, description,
|
|
546
|
+
* action and footer, for a list or page with nothing in it yet. Measured from
|
|
547
|
+
* Figma "✅Project" Empty State Container (node 231:59661).
|
|
548
|
+
*/
|
|
549
|
+
declare function EmptyState({ illustration, title, description, action, footer, className, ...rest }: EmptyStateProps): react.JSX.Element;
|
|
550
|
+
/**
|
|
551
|
+
* Two tilted cards with a search badge: "nothing found yet". Drawn from the
|
|
552
|
+
* Figma "Stacked Cards" layers (node 80:49887), 240×160.
|
|
553
|
+
*/
|
|
554
|
+
declare function StackedCardsIllustration({ className }: {
|
|
555
|
+
className?: string;
|
|
556
|
+
}): react.JSX.Element;
|
|
557
|
+
|
|
558
|
+
/** Colour role. `accent` is the brand tint, for a prompt to act (an upgrade, a next step). */
|
|
559
|
+
type CalloutTone = Tone | 'accent';
|
|
560
|
+
interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
561
|
+
/** Colour role. @default 'neutral' */
|
|
562
|
+
tone?: CalloutTone;
|
|
563
|
+
/** Leading icon, drawn at 16px in a 32px tile. */
|
|
564
|
+
icon?: ReactNode;
|
|
565
|
+
/** One-line heading. */
|
|
566
|
+
title: ReactNode;
|
|
567
|
+
/** Shown after the title, e.g. a Badge. */
|
|
568
|
+
titleAside?: ReactNode;
|
|
569
|
+
/** Supporting text under the title. */
|
|
570
|
+
children?: ReactNode;
|
|
571
|
+
/** Trailing action(s), e.g. a ButtonLink. Moves under the text on phones. */
|
|
572
|
+
action?: ReactNode;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Fidel design-system Callout: a tinted row that tells the reader something
|
|
576
|
+
* about the page they are on and, optionally, what to do about it.
|
|
577
|
+
*/
|
|
578
|
+
declare function Callout({ tone, icon, title, titleAside, children, action, className, ...rest }: CalloutProps): react.JSX.Element;
|
|
579
|
+
|
|
580
|
+
type SkeletonShape = 'rect' | 'text' | 'circle';
|
|
581
|
+
interface SkeletonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
582
|
+
/** rect: a block. text: line(s) at text height. circle: an avatar or icon. @default 'rect' */
|
|
583
|
+
shape?: SkeletonShape;
|
|
584
|
+
/** CSS width; a number is px. Text defaults to 100%, circle to its height. */
|
|
585
|
+
width?: number | string;
|
|
586
|
+
/** CSS height; a number is px. Text defaults to one line (1em). @default 16 for rect and circle */
|
|
587
|
+
height?: number | string;
|
|
588
|
+
/** Text only: how many lines. The last of several is shorter, as text usually is. @default 1 */
|
|
589
|
+
lines?: number;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Fidel design-system Skeleton: a placeholder shape that pulses while content
|
|
593
|
+
* loads. Pages compose these into the shape of what's coming (rows, cards,
|
|
594
|
+
* headers). Purely visual and hidden from assistive tech; wrap a layout in
|
|
595
|
+
* SkeletonGroup so it's announced once as loading.
|
|
596
|
+
*/
|
|
597
|
+
declare function Skeleton({ shape, width, height, lines, className, style, ...rest }: SkeletonProps): react.JSX.Element;
|
|
598
|
+
interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
599
|
+
/** What's loading, for screen readers. @default 'Loading' */
|
|
600
|
+
label?: string;
|
|
601
|
+
children: ReactNode;
|
|
602
|
+
}
|
|
603
|
+
/** Wraps a skeleton layout and announces it once as loading (role="status"). */
|
|
604
|
+
declare function SkeletonGroup({ label, className, children, ...rest }: SkeletonGroupProps): react.JSX.Element;
|
|
605
|
+
|
|
606
|
+
export { AppNav, type AppNavProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type Breakpoint, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Callout, type CalloutProps, type CalloutTone, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, EmptyState, type EmptyStateProps, MismatchCard, type MismatchCardProps, type MismatchProperty, Modal, type ModalProps, type ModalSize, type ModalTone, MultiSelect, type MultiSelectOption, type MultiSelectProps, Pagination, type PaginationProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, SettingsSection, type SettingsSectionProps, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, type SkeletonShape, Split, type SplitProps, StackedCardsIllustration, TabNav, type TabNavProps, Tag, type TagProps, Toggle, type ToggleProps, type ToggleSize, type Tone, breakpoints };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonVariant = 'primary' | 'outlined' | 'text' | 'neutral' | 'link'
|
|
5
|
+
/** High-contrast near-black, for a page's main create action ("New comparison"). */
|
|
6
|
+
| 'dark'
|
|
5
7
|
/** Final confirm of a destructive action ("Delete my account"). */
|
|
6
8
|
| 'danger'
|
|
7
9
|
/** Starts a destructive action ("Delete account", "Remove"). */
|
|
@@ -24,6 +26,25 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
24
26
|
*/
|
|
25
27
|
declare function Button({ variant, size, leftIcon, rightIcon, type, className, children, ...rest }: ButtonProps): react.JSX.Element;
|
|
26
28
|
|
|
29
|
+
interface ButtonLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
30
|
+
/** Where the link goes. */
|
|
31
|
+
href: string;
|
|
32
|
+
/** Visual style. @default 'primary' */
|
|
33
|
+
variant?: ButtonVariant;
|
|
34
|
+
/** Size step. @default 'medium' */
|
|
35
|
+
size?: ButtonSize;
|
|
36
|
+
/** Optional leading icon (rendered in a 20px slot). */
|
|
37
|
+
leftIcon?: ReactNode;
|
|
38
|
+
/** Optional trailing icon (rendered in a 20px slot). */
|
|
39
|
+
rightIcon?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A link that looks like a Button. Use it when the action navigates (to a
|
|
43
|
+
* page or another site) rather than doing something on this page, so the
|
|
44
|
+
* browser keeps link behaviour: open in a new tab, copy link, status bar URL.
|
|
45
|
+
*/
|
|
46
|
+
declare function ButtonLink({ variant, size, leftIcon, rightIcon, className, children, ...rest }: ButtonLinkProps): react.JSX.Element;
|
|
47
|
+
|
|
27
48
|
interface MismatchProperty {
|
|
28
49
|
/** Property label, e.g. "color", "font-size". */
|
|
29
50
|
label: string;
|
|
@@ -421,4 +442,165 @@ interface SplitProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
421
442
|
*/
|
|
422
443
|
declare function Split({ aside, children, asideWidth, sticky, collapseBelow, className, style, ...rest }: SplitProps): react.JSX.Element;
|
|
423
444
|
|
|
424
|
-
|
|
445
|
+
/** Semantic colour roles shared by status components (Badge, Tag, MultiSelect dots). */
|
|
446
|
+
type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
447
|
+
|
|
448
|
+
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
449
|
+
/** Colour role. @default 'neutral' */
|
|
450
|
+
tone?: Tone;
|
|
451
|
+
/** Leading icon, drawn at 12px. */
|
|
452
|
+
icon?: ReactNode;
|
|
453
|
+
children: ReactNode;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Fidel design-system Badge: a tinted pill naming a state ("Checking",
|
|
457
|
+
* "Checked", "Failed to run"). Measured from Figma "✅Project" status-badge
|
|
458
|
+
* (node 231:59799).
|
|
459
|
+
*/
|
|
460
|
+
declare function Badge({ tone, icon, className, children, ...rest }: BadgeProps): react.JSX.Element;
|
|
461
|
+
|
|
462
|
+
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
463
|
+
/** Colour of the leading dot. Leave out for no dot. */
|
|
464
|
+
dot?: Tone;
|
|
465
|
+
children: ReactNode;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Fidel design-system Tag: a quiet bordered label for a category, with an
|
|
469
|
+
* optional coloured dot. Measured from Figma "✅Project" comparison-type chip
|
|
470
|
+
* (node 231:59808).
|
|
471
|
+
*/
|
|
472
|
+
declare function Tag({ dot, className, children, ...rest }: TagProps): react.JSX.Element;
|
|
473
|
+
|
|
474
|
+
interface MultiSelectOption {
|
|
475
|
+
value: string;
|
|
476
|
+
label: string;
|
|
477
|
+
/** Coloured dot before the label. */
|
|
478
|
+
dot?: Tone;
|
|
479
|
+
/** Trailing count, e.g. how many results the option would show. */
|
|
480
|
+
count?: number;
|
|
481
|
+
disabled?: boolean;
|
|
482
|
+
}
|
|
483
|
+
interface MultiSelectProps {
|
|
484
|
+
/** Trigger text, e.g. "Status". Also the list's accessible name. */
|
|
485
|
+
label: string;
|
|
486
|
+
options: MultiSelectOption[];
|
|
487
|
+
/** Selected values. An empty list means nothing is ticked. */
|
|
488
|
+
value: string[];
|
|
489
|
+
onChange: (value: string[]) => void;
|
|
490
|
+
disabled?: boolean;
|
|
491
|
+
selectAllLabel?: string;
|
|
492
|
+
clearLabel?: string;
|
|
493
|
+
id?: string;
|
|
494
|
+
className?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Fidel design-system MultiSelect: a filter menu of checkbox options, each
|
|
498
|
+
* with an optional dot and count, and Select all / Clear in the footer. The
|
|
499
|
+
* trigger shows "n/m" once anything is ticked. Keyboard: Enter/Space/↓ open;
|
|
500
|
+
* ↑/↓/Home/End move; Enter/Space toggle; Esc closes. Measured from Figma
|
|
501
|
+
* "✅Project" filter Select (node 231:60682).
|
|
502
|
+
*/
|
|
503
|
+
declare function MultiSelect({ label, options, value, onChange, disabled, selectAllLabel, clearLabel, id, className, }: MultiSelectProps): react.JSX.Element;
|
|
504
|
+
|
|
505
|
+
interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
506
|
+
/** Keyboard hint shown at the end while the field is empty, e.g. "/". */
|
|
507
|
+
shortcut?: string;
|
|
508
|
+
/** Class for the wrapper; `className` goes on the input. */
|
|
509
|
+
containerClassName?: string;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Fidel design-system SearchInput: a 44px search field with a leading
|
|
513
|
+
* magnifier. Measured from Figma "✅Project" toolbar search (node 231:59687).
|
|
514
|
+
*/
|
|
515
|
+
declare const SearchInput: react.ForwardRefExoticComponent<SearchInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
516
|
+
|
|
517
|
+
interface PaginationProps {
|
|
518
|
+
/** Current page, 1-based. */
|
|
519
|
+
page: number;
|
|
520
|
+
pageCount: number;
|
|
521
|
+
onPageChange: (page: number) => void;
|
|
522
|
+
/** With `pageSize`, adds "Showing 1–20 of 45" (full variant only). */
|
|
523
|
+
total?: number;
|
|
524
|
+
pageSize?: number;
|
|
525
|
+
/** full: range text + page numbers. compact: "Page 2 of 3" between arrows. @default 'full' */
|
|
526
|
+
variant?: 'full' | 'compact';
|
|
527
|
+
className?: string;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Fidel design-system Pagination. Renders nothing when there is one page.
|
|
531
|
+
*/
|
|
532
|
+
declare function Pagination({ page, pageCount, onPageChange, total, pageSize, variant, className }: PaginationProps): react.JSX.Element | null;
|
|
533
|
+
|
|
534
|
+
interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
535
|
+
/** Picture above the title, e.g. <StackedCardsIllustration />. */
|
|
536
|
+
illustration?: ReactNode;
|
|
537
|
+
title: ReactNode;
|
|
538
|
+
description?: ReactNode;
|
|
539
|
+
/** Primary action, usually a Button. */
|
|
540
|
+
action?: ReactNode;
|
|
541
|
+
/** Secondary line under the action, e.g. a help link. */
|
|
542
|
+
footer?: ReactNode;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Fidel design-system EmptyState: a centred illustration, title, description,
|
|
546
|
+
* action and footer, for a list or page with nothing in it yet. Measured from
|
|
547
|
+
* Figma "✅Project" Empty State Container (node 231:59661).
|
|
548
|
+
*/
|
|
549
|
+
declare function EmptyState({ illustration, title, description, action, footer, className, ...rest }: EmptyStateProps): react.JSX.Element;
|
|
550
|
+
/**
|
|
551
|
+
* Two tilted cards with a search badge: "nothing found yet". Drawn from the
|
|
552
|
+
* Figma "Stacked Cards" layers (node 80:49887), 240×160.
|
|
553
|
+
*/
|
|
554
|
+
declare function StackedCardsIllustration({ className }: {
|
|
555
|
+
className?: string;
|
|
556
|
+
}): react.JSX.Element;
|
|
557
|
+
|
|
558
|
+
/** Colour role. `accent` is the brand tint, for a prompt to act (an upgrade, a next step). */
|
|
559
|
+
type CalloutTone = Tone | 'accent';
|
|
560
|
+
interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
561
|
+
/** Colour role. @default 'neutral' */
|
|
562
|
+
tone?: CalloutTone;
|
|
563
|
+
/** Leading icon, drawn at 16px in a 32px tile. */
|
|
564
|
+
icon?: ReactNode;
|
|
565
|
+
/** One-line heading. */
|
|
566
|
+
title: ReactNode;
|
|
567
|
+
/** Shown after the title, e.g. a Badge. */
|
|
568
|
+
titleAside?: ReactNode;
|
|
569
|
+
/** Supporting text under the title. */
|
|
570
|
+
children?: ReactNode;
|
|
571
|
+
/** Trailing action(s), e.g. a ButtonLink. Moves under the text on phones. */
|
|
572
|
+
action?: ReactNode;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Fidel design-system Callout: a tinted row that tells the reader something
|
|
576
|
+
* about the page they are on and, optionally, what to do about it.
|
|
577
|
+
*/
|
|
578
|
+
declare function Callout({ tone, icon, title, titleAside, children, action, className, ...rest }: CalloutProps): react.JSX.Element;
|
|
579
|
+
|
|
580
|
+
type SkeletonShape = 'rect' | 'text' | 'circle';
|
|
581
|
+
interface SkeletonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
582
|
+
/** rect: a block. text: line(s) at text height. circle: an avatar or icon. @default 'rect' */
|
|
583
|
+
shape?: SkeletonShape;
|
|
584
|
+
/** CSS width; a number is px. Text defaults to 100%, circle to its height. */
|
|
585
|
+
width?: number | string;
|
|
586
|
+
/** CSS height; a number is px. Text defaults to one line (1em). @default 16 for rect and circle */
|
|
587
|
+
height?: number | string;
|
|
588
|
+
/** Text only: how many lines. The last of several is shorter, as text usually is. @default 1 */
|
|
589
|
+
lines?: number;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Fidel design-system Skeleton: a placeholder shape that pulses while content
|
|
593
|
+
* loads. Pages compose these into the shape of what's coming (rows, cards,
|
|
594
|
+
* headers). Purely visual and hidden from assistive tech; wrap a layout in
|
|
595
|
+
* SkeletonGroup so it's announced once as loading.
|
|
596
|
+
*/
|
|
597
|
+
declare function Skeleton({ shape, width, height, lines, className, style, ...rest }: SkeletonProps): react.JSX.Element;
|
|
598
|
+
interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
599
|
+
/** What's loading, for screen readers. @default 'Loading' */
|
|
600
|
+
label?: string;
|
|
601
|
+
children: ReactNode;
|
|
602
|
+
}
|
|
603
|
+
/** Wraps a skeleton layout and announces it once as loading (role="status"). */
|
|
604
|
+
declare function SkeletonGroup({ label, className, children, ...rest }: SkeletonGroupProps): react.JSX.Element;
|
|
605
|
+
|
|
606
|
+
export { AppNav, type AppNavProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type Breakpoint, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Callout, type CalloutProps, type CalloutTone, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, EmptyState, type EmptyStateProps, MismatchCard, type MismatchCardProps, type MismatchProperty, Modal, type ModalProps, type ModalSize, type ModalTone, MultiSelect, type MultiSelectOption, type MultiSelectProps, Pagination, type PaginationProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, SettingsSection, type SettingsSectionProps, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, type SkeletonShape, Split, type SplitProps, StackedCardsIllustration, TabNav, type TabNavProps, Tag, type TagProps, Toggle, type ToggleProps, type ToggleSize, type Tone, breakpoints };
|