@usefidel/design-system 0.26.0 → 0.27.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/index.cjs +294 -5
- package/dist/index.css +819 -0
- package/dist/index.d.cts +218 -3
- package/dist/index.d.ts +218 -3
- package/dist/index.js +280 -5
- package/package.json +8 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SVGAttributes, ReactElement, ElementType, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SVGAttributes, ReactElement, ElementType, ComponentPropsWithoutRef, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonVariant = 'primary' | 'outlined' | 'text' | 'neutral' | 'link'
|
|
5
5
|
/** High-contrast near-black, for a page's main create action ("New comparison"). */
|
|
@@ -1121,6 +1121,10 @@ declare const AppLayout: typeof AppLayoutRoot & {
|
|
|
1121
1121
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1122
1122
|
title: ReactNode;
|
|
1123
1123
|
description?: ReactNode;
|
|
1124
|
+
/** Beside the title block, e.g. a 40px logo mark. */
|
|
1125
|
+
leading?: ReactNode;
|
|
1126
|
+
/** A row of facts under the title, e.g. repo, branch and Tags. Wraps. */
|
|
1127
|
+
meta?: ReactNode;
|
|
1124
1128
|
/** Above the title, e.g. "Projects / Flow web app". */
|
|
1125
1129
|
breadcrumb?: ReactNode;
|
|
1126
1130
|
/** The page's one primary action, and any secondary ones. */
|
|
@@ -1129,7 +1133,7 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
1129
1133
|
children?: ReactNode;
|
|
1130
1134
|
}
|
|
1131
1135
|
/** Fidel design-system PageHeader: breadcrumb, title, description and actions at the top of a page. */
|
|
1132
|
-
declare function PageHeader({ title, description, breadcrumb, actions, className, children, ...rest }: PageHeaderProps): react.JSX.Element;
|
|
1136
|
+
declare function PageHeader({ title, description, leading, meta, breadcrumb, actions, className, children, ...rest }: PageHeaderProps): react.JSX.Element;
|
|
1133
1137
|
|
|
1134
1138
|
interface ToastAction {
|
|
1135
1139
|
label: string;
|
|
@@ -1307,4 +1311,215 @@ declare const PageSkeleton: typeof PageSkeletonRoot & {
|
|
|
1307
1311
|
Split: typeof PageSkeletonSplit;
|
|
1308
1312
|
};
|
|
1309
1313
|
|
|
1310
|
-
|
|
1314
|
+
type PreviewCardProps<T extends ElementType = 'div'> = {
|
|
1315
|
+
/** Render as a link, e.g. react-router's `Link`. @default 'div' */
|
|
1316
|
+
as?: T;
|
|
1317
|
+
/** `add` is the dashed card that invites adding another one. @default 'default' */
|
|
1318
|
+
variant?: 'default' | 'add';
|
|
1319
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as'>;
|
|
1320
|
+
declare function PreviewCardRoot<T extends ElementType = 'div'>({ as, variant, className, ...rest }: PreviewCardProps<T>): react.JSX.Element;
|
|
1321
|
+
interface PreviewCardPreviewProps extends HTMLAttributes<HTMLDivElement> {
|
|
1322
|
+
/** A small chip in the top corner naming where the preview comes from. */
|
|
1323
|
+
label?: ReactNode;
|
|
1324
|
+
}
|
|
1325
|
+
declare function PreviewCardPreview({ label, className, children, ...rest }: PreviewCardPreviewProps): react.JSX.Element;
|
|
1326
|
+
interface PreviewCardTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1327
|
+
/** At the end of the title row, e.g. a Tag or "4 variants". */
|
|
1328
|
+
aside?: ReactNode;
|
|
1329
|
+
}
|
|
1330
|
+
declare function PreviewCardTitle({ aside, className, children, ...rest }: PreviewCardTitleProps): react.JSX.Element;
|
|
1331
|
+
/**
|
|
1332
|
+
* Fidel design-system PreviewCard: a picture of a thing over its name, facts
|
|
1333
|
+
* and a footer. Compose `Preview`, `Body` (holding `Title` and `Meta`) and `Footer`.
|
|
1334
|
+
*/
|
|
1335
|
+
declare const PreviewCard: typeof PreviewCardRoot & {
|
|
1336
|
+
Preview: typeof PreviewCardPreview;
|
|
1337
|
+
Body: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1338
|
+
Title: typeof PreviewCardTitle;
|
|
1339
|
+
Meta: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1340
|
+
Footer: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
interface TileProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1344
|
+
/** Small heading in the top corner; pass a link to make it one. */
|
|
1345
|
+
label: ReactNode;
|
|
1346
|
+
/** Beside the label, e.g. a "Reading 3 of 5" Tag. */
|
|
1347
|
+
aside?: ReactNode;
|
|
1348
|
+
}
|
|
1349
|
+
/** Fidel design-system Tile: a quiet labelled panel holding a sample, for a grid of overview tiles. */
|
|
1350
|
+
declare function Tile({ label, aside, className, children, ...rest }: TileProps): react.JSX.Element;
|
|
1351
|
+
|
|
1352
|
+
interface ListCardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1353
|
+
title?: ReactNode;
|
|
1354
|
+
/** A number after the title. */
|
|
1355
|
+
count?: number;
|
|
1356
|
+
/** At the end of the header, e.g. "Step 2 of 4". */
|
|
1357
|
+
aside?: ReactNode;
|
|
1358
|
+
/** A quiet line under the rows. */
|
|
1359
|
+
footer?: ReactNode;
|
|
1360
|
+
}
|
|
1361
|
+
declare function ListCardRoot({ title, count, aside, footer, className, children, ...rest }: ListCardProps): react.JSX.Element;
|
|
1362
|
+
interface ListCardRowProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title'> {
|
|
1363
|
+
/** 16px icon before the text. */
|
|
1364
|
+
icon?: ReactNode;
|
|
1365
|
+
/** Colours the icon. @default 'neutral' */
|
|
1366
|
+
tone?: Tone;
|
|
1367
|
+
title: ReactNode;
|
|
1368
|
+
description?: ReactNode;
|
|
1369
|
+
/** At the end of the row, e.g. a Button, a count or a Tag. */
|
|
1370
|
+
trailing?: ReactNode;
|
|
1371
|
+
/** Dims the row, e.g. a step not reached yet. */
|
|
1372
|
+
muted?: boolean;
|
|
1373
|
+
}
|
|
1374
|
+
declare function ListCardRow({ icon, tone, title, description, trailing, muted, className, ...rest }: ListCardRowProps): react.JSX.Element;
|
|
1375
|
+
/** Fidel design-system ListCard: a bordered card of rows, each with an icon, text and something at the end. */
|
|
1376
|
+
declare const ListCard: typeof ListCardRoot & {
|
|
1377
|
+
Row: typeof ListCardRow;
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
interface DescriptionListItem {
|
|
1381
|
+
label: ReactNode;
|
|
1382
|
+
value: ReactNode;
|
|
1383
|
+
}
|
|
1384
|
+
interface DescriptionListProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1385
|
+
title?: ReactNode;
|
|
1386
|
+
/** At the end of the title row, e.g. a "Setup ›" link. */
|
|
1387
|
+
action?: ReactNode;
|
|
1388
|
+
items?: DescriptionListItem[];
|
|
1389
|
+
/** A quiet note under the items. */
|
|
1390
|
+
note?: ReactNode;
|
|
1391
|
+
}
|
|
1392
|
+
/** Fidel design-system DescriptionList: a titled group of label and value rows, for a side panel. */
|
|
1393
|
+
declare function DescriptionList({ title, action, items, note, className, children, ...rest }: DescriptionListProps): react.JSX.Element;
|
|
1394
|
+
|
|
1395
|
+
interface ColorRampProps extends HTMLAttributes<HTMLDivElement> {
|
|
1396
|
+
/** CSS colours, light to dark or in token order. Pass values you have already validated. */
|
|
1397
|
+
colors: string[];
|
|
1398
|
+
/** Height of the strip: 16, 32 or 64px. @default 'md' */
|
|
1399
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1400
|
+
}
|
|
1401
|
+
/** Fidel design-system ColorRamp: a strip of colour blocks side by side, for a palette at a glance. */
|
|
1402
|
+
declare function ColorRamp({ colors, size, className, ...rest }: ColorRampProps): react.JSX.Element;
|
|
1403
|
+
|
|
1404
|
+
interface SwatchListItem {
|
|
1405
|
+
/** A CSS colour you have already validated, or null when it can't be shown. */
|
|
1406
|
+
color: string | null;
|
|
1407
|
+
name: ReactNode;
|
|
1408
|
+
value: ReactNode;
|
|
1409
|
+
}
|
|
1410
|
+
interface SwatchListProps extends HTMLAttributes<HTMLUListElement> {
|
|
1411
|
+
items: SwatchListItem[];
|
|
1412
|
+
}
|
|
1413
|
+
/** Fidel design-system SwatchList: compact rows of a colour dot, a token name and its value. */
|
|
1414
|
+
declare function SwatchList({ items, className, ...rest }: SwatchListProps): react.JSX.Element;
|
|
1415
|
+
|
|
1416
|
+
interface TypeSpecimenWeight {
|
|
1417
|
+
label: string;
|
|
1418
|
+
weight: number;
|
|
1419
|
+
}
|
|
1420
|
+
interface TypeSpecimenProps extends HTMLAttributes<HTMLElement> {
|
|
1421
|
+
/** Family name to show, e.g. "Rethink Sans". */
|
|
1422
|
+
family: string;
|
|
1423
|
+
/** The CSS font-family to draw the samples in. Pass a value you have already validated. */
|
|
1424
|
+
fontFamily: string;
|
|
1425
|
+
/** The variables that use this family, e.g. Tags for `--font-body`. */
|
|
1426
|
+
tokens?: ReactNode;
|
|
1427
|
+
/** A line set in the family. */
|
|
1428
|
+
sample?: ReactNode;
|
|
1429
|
+
weights?: TypeSpecimenWeight[];
|
|
1430
|
+
/** A quiet note at the bottom, e.g. the fallback stack. */
|
|
1431
|
+
footer?: ReactNode;
|
|
1432
|
+
}
|
|
1433
|
+
/** Fidel design-system TypeSpecimen: one typeface drawn large, with its alphabet and weights. */
|
|
1434
|
+
declare function TypeSpecimen({ family, fontFamily, tokens, sample, weights, footer, className, ...rest }: TypeSpecimenProps): react.JSX.Element;
|
|
1435
|
+
interface TypeSampleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1436
|
+
fontFamily: string;
|
|
1437
|
+
/** Under the glyphs, e.g. "Body and display". */
|
|
1438
|
+
caption?: ReactNode;
|
|
1439
|
+
}
|
|
1440
|
+
/** Fidel design-system TypeSample: a large "Aa" in one typeface with a caption, for overview tiles. */
|
|
1441
|
+
declare function TypeSample({ fontFamily, caption, className, ...rest }: TypeSampleProps): react.JSX.Element;
|
|
1442
|
+
|
|
1443
|
+
declare function TypeScaleRoot({ className, ...rest }: HTMLAttributes<HTMLUListElement>): react.JSX.Element;
|
|
1444
|
+
interface TypeScaleRowProps extends HTMLAttributes<HTMLLIElement> {
|
|
1445
|
+
/** The token, e.g. "text-4xl". Set in mono. */
|
|
1446
|
+
name: ReactNode;
|
|
1447
|
+
/** Under the name, e.g. "36px / 40px". */
|
|
1448
|
+
detail?: ReactNode;
|
|
1449
|
+
/** Size, line height, weight or family to draw the sample with. Pass values you have already validated. */
|
|
1450
|
+
sampleStyle: CSSProperties;
|
|
1451
|
+
/** @default 'Check every pull request' */
|
|
1452
|
+
sample?: ReactNode;
|
|
1453
|
+
}
|
|
1454
|
+
declare function TypeScaleRow({ name, detail, sampleStyle, sample, className, ...rest }: TypeScaleRowProps): react.JSX.Element;
|
|
1455
|
+
/** Fidel design-system TypeScale: one row per text size, each drawn at its real size. */
|
|
1456
|
+
declare const TypeScale: typeof TypeScaleRoot & {
|
|
1457
|
+
Row: typeof TypeScaleRow;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
interface MeasureListItem {
|
|
1461
|
+
name: ReactNode;
|
|
1462
|
+
value: ReactNode;
|
|
1463
|
+
/** The number the bar is drawn from, in any unit shared by every item. */
|
|
1464
|
+
amount: number;
|
|
1465
|
+
}
|
|
1466
|
+
interface MeasureListProps extends HTMLAttributes<HTMLUListElement> {
|
|
1467
|
+
items: MeasureListItem[];
|
|
1468
|
+
/** The amount a full bar stands for. @default the largest amount */
|
|
1469
|
+
max?: number;
|
|
1470
|
+
/** @default 'accent' */
|
|
1471
|
+
tone?: 'accent' | 'neutral';
|
|
1472
|
+
}
|
|
1473
|
+
/** Fidel design-system MeasureList: rows of a token name, its value and a bar to scale, e.g. spacing or durations. */
|
|
1474
|
+
declare function MeasureList({ items, max, tone, className, ...rest }: MeasureListProps): react.JSX.Element;
|
|
1475
|
+
|
|
1476
|
+
interface TokenSampleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1477
|
+
/** What the sample draws: a corner radius or a box shadow. */
|
|
1478
|
+
kind: 'radius' | 'shadow';
|
|
1479
|
+
/** The CSS value to draw. Pass a value you have already validated. */
|
|
1480
|
+
value: string;
|
|
1481
|
+
name: ReactNode;
|
|
1482
|
+
/** Under the name, e.g. "8px" or the shadow as written. */
|
|
1483
|
+
detail?: ReactNode;
|
|
1484
|
+
}
|
|
1485
|
+
/** Fidel design-system TokenSample: a square drawn with one radius or shadow token, over its name and value. */
|
|
1486
|
+
declare function TokenSample({ kind, value, name, detail, className, ...rest }: TokenSampleProps): react.JSX.Element;
|
|
1487
|
+
|
|
1488
|
+
interface EasingCurveProps extends HTMLAttributes<HTMLDivElement> {
|
|
1489
|
+
/** `cubic-bezier(x1, y1, x2, y2)`. Anything else draws a straight line. */
|
|
1490
|
+
value: string;
|
|
1491
|
+
name: ReactNode;
|
|
1492
|
+
}
|
|
1493
|
+
/** Fidel design-system EasingCurve: an easing token drawn as its curve, over its name and value. */
|
|
1494
|
+
declare function EasingCurve({ value, name, className, ...rest }: EasingCurveProps): react.JSX.Element;
|
|
1495
|
+
|
|
1496
|
+
interface FilterChipOption<T extends string> {
|
|
1497
|
+
value: T;
|
|
1498
|
+
label: ReactNode;
|
|
1499
|
+
/** Shown after the label, e.g. how many items match. */
|
|
1500
|
+
count?: number;
|
|
1501
|
+
}
|
|
1502
|
+
interface FilterChipsProps<T extends string> {
|
|
1503
|
+
options: FilterChipOption<T>[];
|
|
1504
|
+
value: T;
|
|
1505
|
+
onChange: (value: T) => void;
|
|
1506
|
+
/** Names the group for screen readers. */
|
|
1507
|
+
'aria-label': string;
|
|
1508
|
+
className?: string;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Fidel design-system FilterChips: a row of pill filters, one selected, each
|
|
1512
|
+
* with a count. A radio group: Arrow keys move and select; Tab leaves it.
|
|
1513
|
+
*/
|
|
1514
|
+
declare function FilterChips<T extends string>({ options, value, onChange, 'aria-label': ariaLabel, className }: FilterChipsProps<T>): react.JSX.Element;
|
|
1515
|
+
|
|
1516
|
+
interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
1517
|
+
value: number;
|
|
1518
|
+
max: number;
|
|
1519
|
+
/** Beside the bar, e.g. "1 of 3 brands on Pro". Also names the meter for screen readers when it is a string. */
|
|
1520
|
+
label: ReactNode;
|
|
1521
|
+
}
|
|
1522
|
+
/** Fidel design-system Meter: a thin bar showing how much of an allowance is used. */
|
|
1523
|
+
declare function Meter({ value, max, label, className, ...rest }: MeterProps): react.JSX.Element;
|
|
1524
|
+
|
|
1525
|
+
export { Accordion, type AccordionProps, AppLayout, type AppLayoutProps, AppNav, type AppNavProps, Avatar, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BrandButton, type BrandButtonProps, type Breakpoint, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Callout, type CalloutProps, type CalloutTone, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Checklist, type ChecklistItemProps, type ChecklistProps, ColorRamp, type ColorRampProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, Divider, type DividerProps, Drawer, type DrawerProps, EasingCurve, type EasingCurveProps, EmptyState, type EmptyStateProps, type FilterChipOption, FilterChips, type FilterChipsProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Input, type InputProps, ListCard, type ListCardProps, type ListCardRowProps, ListLabel, type ListLabelProps, MeasureList, type MeasureListItem, type MeasureListProps, Menu, type MenuDivider, type MenuEntry, type MenuItem, type MenuLabel, type MenuPlacement, type MenuProps, type MenuSearch, Meter, type MeterProps, MismatchCard, type MismatchCardProps, type MismatchProperty, Modal, type ModalProps, type ModalSize, type ModalTone, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberedSteps, type NumberedStepsProps, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PageHeader, type PageHeaderProps, PageSkeleton, type PageSkeletonHeaderProps, type PageSkeletonProps, Pagination, type PaginationProps, PreviewCard, type PreviewCardPreviewProps, type PreviewCardProps, type PreviewCardTitleProps, PricingCard, type PricingCardProps, Radio, RadioCard, type RadioCardProps, type RadioProps, ResourceCard, type ResourceCardProps, type ResourceCardStat, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, SettingsSection, type SettingsSectionProps, Sidebar, type SidebarBrandProps, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSectionProps, type SidebarState, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, type SkeletonShape, Spinner, type SpinnerProps, Split, type SplitProps, StackedCardsIllustration, Stat, type StatProps, StatusDot, type StatusDotProps, type StatusDotStatus, type Step, StepList, type StepListProps, type StepStatus, Stepper, type StepperProps, type StepperStepProps, type StepperStepStatus, Swatch, SwatchList, type SwatchListItem, type SwatchListProps, type SwatchProps, TabNav, type TabNavProps, Table, type TableColumn, type TableProps, Tag, type TagProps, Tile, type TileProps, Toast, type ToastAction, type ToastProps, ToastRegion, type ToastRegionProps, Toggle, type ToggleProps, type ToggleSize, TokenSample, type TokenSampleProps, type Tone, Tooltip, type TooltipProps, type TooltipSide, TypeSample, type TypeSampleProps, TypeScale, type TypeScaleRowProps, TypeSpecimen, type TypeSpecimenProps, type TypeSpecimenWeight, WorkspaceAvatar, WorkspaceSwitcher, type WorkspaceSwitcherProps, breakpoints, useSidebar };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SVGAttributes, ReactElement, ElementType, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SVGAttributes, ReactElement, ElementType, ComponentPropsWithoutRef, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
type ButtonVariant = 'primary' | 'outlined' | 'text' | 'neutral' | 'link'
|
|
5
5
|
/** High-contrast near-black, for a page's main create action ("New comparison"). */
|
|
@@ -1121,6 +1121,10 @@ declare const AppLayout: typeof AppLayoutRoot & {
|
|
|
1121
1121
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1122
1122
|
title: ReactNode;
|
|
1123
1123
|
description?: ReactNode;
|
|
1124
|
+
/** Beside the title block, e.g. a 40px logo mark. */
|
|
1125
|
+
leading?: ReactNode;
|
|
1126
|
+
/** A row of facts under the title, e.g. repo, branch and Tags. Wraps. */
|
|
1127
|
+
meta?: ReactNode;
|
|
1124
1128
|
/** Above the title, e.g. "Projects / Flow web app". */
|
|
1125
1129
|
breadcrumb?: ReactNode;
|
|
1126
1130
|
/** The page's one primary action, and any secondary ones. */
|
|
@@ -1129,7 +1133,7 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
1129
1133
|
children?: ReactNode;
|
|
1130
1134
|
}
|
|
1131
1135
|
/** Fidel design-system PageHeader: breadcrumb, title, description and actions at the top of a page. */
|
|
1132
|
-
declare function PageHeader({ title, description, breadcrumb, actions, className, children, ...rest }: PageHeaderProps): react.JSX.Element;
|
|
1136
|
+
declare function PageHeader({ title, description, leading, meta, breadcrumb, actions, className, children, ...rest }: PageHeaderProps): react.JSX.Element;
|
|
1133
1137
|
|
|
1134
1138
|
interface ToastAction {
|
|
1135
1139
|
label: string;
|
|
@@ -1307,4 +1311,215 @@ declare const PageSkeleton: typeof PageSkeletonRoot & {
|
|
|
1307
1311
|
Split: typeof PageSkeletonSplit;
|
|
1308
1312
|
};
|
|
1309
1313
|
|
|
1310
|
-
|
|
1314
|
+
type PreviewCardProps<T extends ElementType = 'div'> = {
|
|
1315
|
+
/** Render as a link, e.g. react-router's `Link`. @default 'div' */
|
|
1316
|
+
as?: T;
|
|
1317
|
+
/** `add` is the dashed card that invites adding another one. @default 'default' */
|
|
1318
|
+
variant?: 'default' | 'add';
|
|
1319
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as'>;
|
|
1320
|
+
declare function PreviewCardRoot<T extends ElementType = 'div'>({ as, variant, className, ...rest }: PreviewCardProps<T>): react.JSX.Element;
|
|
1321
|
+
interface PreviewCardPreviewProps extends HTMLAttributes<HTMLDivElement> {
|
|
1322
|
+
/** A small chip in the top corner naming where the preview comes from. */
|
|
1323
|
+
label?: ReactNode;
|
|
1324
|
+
}
|
|
1325
|
+
declare function PreviewCardPreview({ label, className, children, ...rest }: PreviewCardPreviewProps): react.JSX.Element;
|
|
1326
|
+
interface PreviewCardTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1327
|
+
/** At the end of the title row, e.g. a Tag or "4 variants". */
|
|
1328
|
+
aside?: ReactNode;
|
|
1329
|
+
}
|
|
1330
|
+
declare function PreviewCardTitle({ aside, className, children, ...rest }: PreviewCardTitleProps): react.JSX.Element;
|
|
1331
|
+
/**
|
|
1332
|
+
* Fidel design-system PreviewCard: a picture of a thing over its name, facts
|
|
1333
|
+
* and a footer. Compose `Preview`, `Body` (holding `Title` and `Meta`) and `Footer`.
|
|
1334
|
+
*/
|
|
1335
|
+
declare const PreviewCard: typeof PreviewCardRoot & {
|
|
1336
|
+
Preview: typeof PreviewCardPreview;
|
|
1337
|
+
Body: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1338
|
+
Title: typeof PreviewCardTitle;
|
|
1339
|
+
Meta: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1340
|
+
Footer: ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
interface TileProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1344
|
+
/** Small heading in the top corner; pass a link to make it one. */
|
|
1345
|
+
label: ReactNode;
|
|
1346
|
+
/** Beside the label, e.g. a "Reading 3 of 5" Tag. */
|
|
1347
|
+
aside?: ReactNode;
|
|
1348
|
+
}
|
|
1349
|
+
/** Fidel design-system Tile: a quiet labelled panel holding a sample, for a grid of overview tiles. */
|
|
1350
|
+
declare function Tile({ label, aside, className, children, ...rest }: TileProps): react.JSX.Element;
|
|
1351
|
+
|
|
1352
|
+
interface ListCardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1353
|
+
title?: ReactNode;
|
|
1354
|
+
/** A number after the title. */
|
|
1355
|
+
count?: number;
|
|
1356
|
+
/** At the end of the header, e.g. "Step 2 of 4". */
|
|
1357
|
+
aside?: ReactNode;
|
|
1358
|
+
/** A quiet line under the rows. */
|
|
1359
|
+
footer?: ReactNode;
|
|
1360
|
+
}
|
|
1361
|
+
declare function ListCardRoot({ title, count, aside, footer, className, children, ...rest }: ListCardProps): react.JSX.Element;
|
|
1362
|
+
interface ListCardRowProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title'> {
|
|
1363
|
+
/** 16px icon before the text. */
|
|
1364
|
+
icon?: ReactNode;
|
|
1365
|
+
/** Colours the icon. @default 'neutral' */
|
|
1366
|
+
tone?: Tone;
|
|
1367
|
+
title: ReactNode;
|
|
1368
|
+
description?: ReactNode;
|
|
1369
|
+
/** At the end of the row, e.g. a Button, a count or a Tag. */
|
|
1370
|
+
trailing?: ReactNode;
|
|
1371
|
+
/** Dims the row, e.g. a step not reached yet. */
|
|
1372
|
+
muted?: boolean;
|
|
1373
|
+
}
|
|
1374
|
+
declare function ListCardRow({ icon, tone, title, description, trailing, muted, className, ...rest }: ListCardRowProps): react.JSX.Element;
|
|
1375
|
+
/** Fidel design-system ListCard: a bordered card of rows, each with an icon, text and something at the end. */
|
|
1376
|
+
declare const ListCard: typeof ListCardRoot & {
|
|
1377
|
+
Row: typeof ListCardRow;
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
interface DescriptionListItem {
|
|
1381
|
+
label: ReactNode;
|
|
1382
|
+
value: ReactNode;
|
|
1383
|
+
}
|
|
1384
|
+
interface DescriptionListProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1385
|
+
title?: ReactNode;
|
|
1386
|
+
/** At the end of the title row, e.g. a "Setup ›" link. */
|
|
1387
|
+
action?: ReactNode;
|
|
1388
|
+
items?: DescriptionListItem[];
|
|
1389
|
+
/** A quiet note under the items. */
|
|
1390
|
+
note?: ReactNode;
|
|
1391
|
+
}
|
|
1392
|
+
/** Fidel design-system DescriptionList: a titled group of label and value rows, for a side panel. */
|
|
1393
|
+
declare function DescriptionList({ title, action, items, note, className, children, ...rest }: DescriptionListProps): react.JSX.Element;
|
|
1394
|
+
|
|
1395
|
+
interface ColorRampProps extends HTMLAttributes<HTMLDivElement> {
|
|
1396
|
+
/** CSS colours, light to dark or in token order. Pass values you have already validated. */
|
|
1397
|
+
colors: string[];
|
|
1398
|
+
/** Height of the strip: 16, 32 or 64px. @default 'md' */
|
|
1399
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1400
|
+
}
|
|
1401
|
+
/** Fidel design-system ColorRamp: a strip of colour blocks side by side, for a palette at a glance. */
|
|
1402
|
+
declare function ColorRamp({ colors, size, className, ...rest }: ColorRampProps): react.JSX.Element;
|
|
1403
|
+
|
|
1404
|
+
interface SwatchListItem {
|
|
1405
|
+
/** A CSS colour you have already validated, or null when it can't be shown. */
|
|
1406
|
+
color: string | null;
|
|
1407
|
+
name: ReactNode;
|
|
1408
|
+
value: ReactNode;
|
|
1409
|
+
}
|
|
1410
|
+
interface SwatchListProps extends HTMLAttributes<HTMLUListElement> {
|
|
1411
|
+
items: SwatchListItem[];
|
|
1412
|
+
}
|
|
1413
|
+
/** Fidel design-system SwatchList: compact rows of a colour dot, a token name and its value. */
|
|
1414
|
+
declare function SwatchList({ items, className, ...rest }: SwatchListProps): react.JSX.Element;
|
|
1415
|
+
|
|
1416
|
+
interface TypeSpecimenWeight {
|
|
1417
|
+
label: string;
|
|
1418
|
+
weight: number;
|
|
1419
|
+
}
|
|
1420
|
+
interface TypeSpecimenProps extends HTMLAttributes<HTMLElement> {
|
|
1421
|
+
/** Family name to show, e.g. "Rethink Sans". */
|
|
1422
|
+
family: string;
|
|
1423
|
+
/** The CSS font-family to draw the samples in. Pass a value you have already validated. */
|
|
1424
|
+
fontFamily: string;
|
|
1425
|
+
/** The variables that use this family, e.g. Tags for `--font-body`. */
|
|
1426
|
+
tokens?: ReactNode;
|
|
1427
|
+
/** A line set in the family. */
|
|
1428
|
+
sample?: ReactNode;
|
|
1429
|
+
weights?: TypeSpecimenWeight[];
|
|
1430
|
+
/** A quiet note at the bottom, e.g. the fallback stack. */
|
|
1431
|
+
footer?: ReactNode;
|
|
1432
|
+
}
|
|
1433
|
+
/** Fidel design-system TypeSpecimen: one typeface drawn large, with its alphabet and weights. */
|
|
1434
|
+
declare function TypeSpecimen({ family, fontFamily, tokens, sample, weights, footer, className, ...rest }: TypeSpecimenProps): react.JSX.Element;
|
|
1435
|
+
interface TypeSampleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1436
|
+
fontFamily: string;
|
|
1437
|
+
/** Under the glyphs, e.g. "Body and display". */
|
|
1438
|
+
caption?: ReactNode;
|
|
1439
|
+
}
|
|
1440
|
+
/** Fidel design-system TypeSample: a large "Aa" in one typeface with a caption, for overview tiles. */
|
|
1441
|
+
declare function TypeSample({ fontFamily, caption, className, ...rest }: TypeSampleProps): react.JSX.Element;
|
|
1442
|
+
|
|
1443
|
+
declare function TypeScaleRoot({ className, ...rest }: HTMLAttributes<HTMLUListElement>): react.JSX.Element;
|
|
1444
|
+
interface TypeScaleRowProps extends HTMLAttributes<HTMLLIElement> {
|
|
1445
|
+
/** The token, e.g. "text-4xl". Set in mono. */
|
|
1446
|
+
name: ReactNode;
|
|
1447
|
+
/** Under the name, e.g. "36px / 40px". */
|
|
1448
|
+
detail?: ReactNode;
|
|
1449
|
+
/** Size, line height, weight or family to draw the sample with. Pass values you have already validated. */
|
|
1450
|
+
sampleStyle: CSSProperties;
|
|
1451
|
+
/** @default 'Check every pull request' */
|
|
1452
|
+
sample?: ReactNode;
|
|
1453
|
+
}
|
|
1454
|
+
declare function TypeScaleRow({ name, detail, sampleStyle, sample, className, ...rest }: TypeScaleRowProps): react.JSX.Element;
|
|
1455
|
+
/** Fidel design-system TypeScale: one row per text size, each drawn at its real size. */
|
|
1456
|
+
declare const TypeScale: typeof TypeScaleRoot & {
|
|
1457
|
+
Row: typeof TypeScaleRow;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
interface MeasureListItem {
|
|
1461
|
+
name: ReactNode;
|
|
1462
|
+
value: ReactNode;
|
|
1463
|
+
/** The number the bar is drawn from, in any unit shared by every item. */
|
|
1464
|
+
amount: number;
|
|
1465
|
+
}
|
|
1466
|
+
interface MeasureListProps extends HTMLAttributes<HTMLUListElement> {
|
|
1467
|
+
items: MeasureListItem[];
|
|
1468
|
+
/** The amount a full bar stands for. @default the largest amount */
|
|
1469
|
+
max?: number;
|
|
1470
|
+
/** @default 'accent' */
|
|
1471
|
+
tone?: 'accent' | 'neutral';
|
|
1472
|
+
}
|
|
1473
|
+
/** Fidel design-system MeasureList: rows of a token name, its value and a bar to scale, e.g. spacing or durations. */
|
|
1474
|
+
declare function MeasureList({ items, max, tone, className, ...rest }: MeasureListProps): react.JSX.Element;
|
|
1475
|
+
|
|
1476
|
+
interface TokenSampleProps extends HTMLAttributes<HTMLDivElement> {
|
|
1477
|
+
/** What the sample draws: a corner radius or a box shadow. */
|
|
1478
|
+
kind: 'radius' | 'shadow';
|
|
1479
|
+
/** The CSS value to draw. Pass a value you have already validated. */
|
|
1480
|
+
value: string;
|
|
1481
|
+
name: ReactNode;
|
|
1482
|
+
/** Under the name, e.g. "8px" or the shadow as written. */
|
|
1483
|
+
detail?: ReactNode;
|
|
1484
|
+
}
|
|
1485
|
+
/** Fidel design-system TokenSample: a square drawn with one radius or shadow token, over its name and value. */
|
|
1486
|
+
declare function TokenSample({ kind, value, name, detail, className, ...rest }: TokenSampleProps): react.JSX.Element;
|
|
1487
|
+
|
|
1488
|
+
interface EasingCurveProps extends HTMLAttributes<HTMLDivElement> {
|
|
1489
|
+
/** `cubic-bezier(x1, y1, x2, y2)`. Anything else draws a straight line. */
|
|
1490
|
+
value: string;
|
|
1491
|
+
name: ReactNode;
|
|
1492
|
+
}
|
|
1493
|
+
/** Fidel design-system EasingCurve: an easing token drawn as its curve, over its name and value. */
|
|
1494
|
+
declare function EasingCurve({ value, name, className, ...rest }: EasingCurveProps): react.JSX.Element;
|
|
1495
|
+
|
|
1496
|
+
interface FilterChipOption<T extends string> {
|
|
1497
|
+
value: T;
|
|
1498
|
+
label: ReactNode;
|
|
1499
|
+
/** Shown after the label, e.g. how many items match. */
|
|
1500
|
+
count?: number;
|
|
1501
|
+
}
|
|
1502
|
+
interface FilterChipsProps<T extends string> {
|
|
1503
|
+
options: FilterChipOption<T>[];
|
|
1504
|
+
value: T;
|
|
1505
|
+
onChange: (value: T) => void;
|
|
1506
|
+
/** Names the group for screen readers. */
|
|
1507
|
+
'aria-label': string;
|
|
1508
|
+
className?: string;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Fidel design-system FilterChips: a row of pill filters, one selected, each
|
|
1512
|
+
* with a count. A radio group: Arrow keys move and select; Tab leaves it.
|
|
1513
|
+
*/
|
|
1514
|
+
declare function FilterChips<T extends string>({ options, value, onChange, 'aria-label': ariaLabel, className }: FilterChipsProps<T>): react.JSX.Element;
|
|
1515
|
+
|
|
1516
|
+
interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
1517
|
+
value: number;
|
|
1518
|
+
max: number;
|
|
1519
|
+
/** Beside the bar, e.g. "1 of 3 brands on Pro". Also names the meter for screen readers when it is a string. */
|
|
1520
|
+
label: ReactNode;
|
|
1521
|
+
}
|
|
1522
|
+
/** Fidel design-system Meter: a thin bar showing how much of an allowance is used. */
|
|
1523
|
+
declare function Meter({ value, max, label, className, ...rest }: MeterProps): react.JSX.Element;
|
|
1524
|
+
|
|
1525
|
+
export { Accordion, type AccordionProps, AppLayout, type AppLayoutProps, AppNav, type AppNavProps, Avatar, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BrandButton, type BrandButtonProps, type Breakpoint, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Callout, type CalloutProps, type CalloutTone, Card, type CardPadding, type CardProps, type CardTone, Checkbox, type CheckboxProps, Checklist, type ChecklistItemProps, type ChecklistProps, ColorRamp, type ColorRampProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, Divider, type DividerProps, Drawer, type DrawerProps, EasingCurve, type EasingCurveProps, EmptyState, type EmptyStateProps, type FilterChipOption, FilterChips, type FilterChipsProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Input, type InputProps, ListCard, type ListCardProps, type ListCardRowProps, ListLabel, type ListLabelProps, MeasureList, type MeasureListItem, type MeasureListProps, Menu, type MenuDivider, type MenuEntry, type MenuItem, type MenuLabel, type MenuPlacement, type MenuProps, type MenuSearch, Meter, type MeterProps, MismatchCard, type MismatchCardProps, type MismatchProperty, Modal, type ModalProps, type ModalSize, type ModalTone, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberedSteps, type NumberedStepsProps, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PageHeader, type PageHeaderProps, PageSkeleton, type PageSkeletonHeaderProps, type PageSkeletonProps, Pagination, type PaginationProps, PreviewCard, type PreviewCardPreviewProps, type PreviewCardProps, type PreviewCardTitleProps, PricingCard, type PricingCardProps, Radio, RadioCard, type RadioCardProps, type RadioProps, ResourceCard, type ResourceCardProps, type ResourceCardStat, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, SettingsSection, type SettingsSectionProps, Sidebar, type SidebarBrandProps, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSectionProps, type SidebarState, Skeleton, SkeletonGroup, type SkeletonGroupProps, type SkeletonProps, type SkeletonShape, Spinner, type SpinnerProps, Split, type SplitProps, StackedCardsIllustration, Stat, type StatProps, StatusDot, type StatusDotProps, type StatusDotStatus, type Step, StepList, type StepListProps, type StepStatus, Stepper, type StepperProps, type StepperStepProps, type StepperStepStatus, Swatch, SwatchList, type SwatchListItem, type SwatchListProps, type SwatchProps, TabNav, type TabNavProps, Table, type TableColumn, type TableProps, Tag, type TagProps, Tile, type TileProps, Toast, type ToastAction, type ToastProps, ToastRegion, type ToastRegionProps, Toggle, type ToggleProps, type ToggleSize, TokenSample, type TokenSampleProps, type Tone, Tooltip, type TooltipProps, type TooltipSide, TypeSample, type TypeSampleProps, TypeScale, type TypeScaleRowProps, TypeSpecimen, type TypeSpecimenProps, type TypeSpecimenWeight, WorkspaceAvatar, WorkspaceSwitcher, type WorkspaceSwitcherProps, breakpoints, useSidebar };
|