@usefidel/design-system 0.25.1 → 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 +579 -18
- package/dist/index.css +1366 -0
- package/dist/index.d.cts +379 -4
- package/dist/index.d.ts +379 -4
- package/dist/index.js +548 -9
- package/package.json +8 -3
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"). */
|
|
@@ -480,6 +480,10 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
480
480
|
dot?: Tone;
|
|
481
481
|
/** Leading icon, drawn at 14px, e.g. a repository or branch mark. */
|
|
482
482
|
icon?: ReactNode;
|
|
483
|
+
/** Shows a remove button at the end; its label is "Remove <removeLabel>". */
|
|
484
|
+
onRemove?: () => void;
|
|
485
|
+
/** Names the tag for the remove button. Defaults to the text when it is a string. */
|
|
486
|
+
removeLabel?: string;
|
|
483
487
|
children: ReactNode;
|
|
484
488
|
}
|
|
485
489
|
/**
|
|
@@ -487,7 +491,7 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
487
491
|
* optional coloured dot. Measured from Figma "✅Project" comparison-type chip
|
|
488
492
|
* (node 231:59808).
|
|
489
493
|
*/
|
|
490
|
-
declare function Tag({ dot, icon, className, children, ...rest }: TagProps): react.JSX.Element;
|
|
494
|
+
declare function Tag({ dot, icon, onRemove, removeLabel, className, children, ...rest }: TagProps): react.JSX.Element;
|
|
491
495
|
|
|
492
496
|
interface MultiSelectOption {
|
|
493
497
|
value: string;
|
|
@@ -1117,6 +1121,10 @@ declare const AppLayout: typeof AppLayoutRoot & {
|
|
|
1117
1121
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1118
1122
|
title: ReactNode;
|
|
1119
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;
|
|
1120
1128
|
/** Above the title, e.g. "Projects / Flow web app". */
|
|
1121
1129
|
breadcrumb?: ReactNode;
|
|
1122
1130
|
/** The page's one primary action, and any secondary ones. */
|
|
@@ -1125,7 +1133,7 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
1125
1133
|
children?: ReactNode;
|
|
1126
1134
|
}
|
|
1127
1135
|
/** Fidel design-system PageHeader: breadcrumb, title, description and actions at the top of a page. */
|
|
1128
|
-
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;
|
|
1129
1137
|
|
|
1130
1138
|
interface ToastAction {
|
|
1131
1139
|
label: string;
|
|
@@ -1147,4 +1155,371 @@ declare function ToastRegion({ className, children, ...rest }: ToastRegionProps)
|
|
|
1147
1155
|
/** Fidel design-system Toast: a short status message with an optional action. Place it in a ToastRegion. */
|
|
1148
1156
|
declare function Toast({ children, action, onDismiss, duration, className, ...rest }: ToastProps): react.JSX.Element;
|
|
1149
1157
|
|
|
1150
|
-
|
|
1158
|
+
type StepperStepStatus = 'done' | 'current' | 'upcoming';
|
|
1159
|
+
interface StepperStepProps {
|
|
1160
|
+
status: StepperStepStatus;
|
|
1161
|
+
children: ReactNode;
|
|
1162
|
+
}
|
|
1163
|
+
declare function StepperStep(_: StepperStepProps): null;
|
|
1164
|
+
interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
1165
|
+
/** Stepper.Step elements, in order. */
|
|
1166
|
+
children: ReactNode;
|
|
1167
|
+
}
|
|
1168
|
+
/** Fidel design-system Stepper: a numbered row of steps joined by lines, for a multi-step form. */
|
|
1169
|
+
declare function StepperRoot({ className, children, ...rest }: StepperProps): react.JSX.Element;
|
|
1170
|
+
declare const Stepper: typeof StepperRoot & {
|
|
1171
|
+
Step: typeof StepperStep;
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
interface NumberedStepsProps extends HTMLAttributes<HTMLOListElement> {
|
|
1175
|
+
/** NumberedSteps.Item elements, in order. */
|
|
1176
|
+
children: ReactNode;
|
|
1177
|
+
}
|
|
1178
|
+
declare function NumberedStepsRoot({ className, children, ...rest }: NumberedStepsProps): react.JSX.Element;
|
|
1179
|
+
declare function NumberedStepsItem({ className, children, ...rest }: HTMLAttributes<HTMLLIElement>): react.JSX.Element;
|
|
1180
|
+
/** Fidel design-system NumberedSteps: a form laid out as numbered steps joined by a line. */
|
|
1181
|
+
declare const NumberedSteps: typeof NumberedStepsRoot & {
|
|
1182
|
+
Item: typeof NumberedStepsItem;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
interface OptionListProps extends HTMLAttributes<HTMLDivElement> {
|
|
1186
|
+
children: ReactNode;
|
|
1187
|
+
}
|
|
1188
|
+
declare function OptionListRoot({ className, children, ...rest }: OptionListProps): react.JSX.Element;
|
|
1189
|
+
declare function OptionListLabel({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): react.JSX.Element;
|
|
1190
|
+
interface OptionRowProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'title'> {
|
|
1191
|
+
/** @default 'radio' */
|
|
1192
|
+
control?: 'radio' | 'checkbox';
|
|
1193
|
+
title: ReactNode;
|
|
1194
|
+
description?: ReactNode;
|
|
1195
|
+
/** Quiet text or a Badge at the end of the row, e.g. "Recommended" or "main, 3d ago". */
|
|
1196
|
+
meta?: ReactNode;
|
|
1197
|
+
}
|
|
1198
|
+
/** One choice in an OptionList: a radio or checkbox with a title, a second line and optional end content. */
|
|
1199
|
+
declare function OptionRow({ control, title, description, meta, className, checked, disabled, ...rest }: OptionRowProps): react.JSX.Element;
|
|
1200
|
+
/** Fidel design-system OptionList: radio or checkbox rows in one bordered group, with optional group labels. */
|
|
1201
|
+
declare const OptionList: typeof OptionListRoot & {
|
|
1202
|
+
Label: typeof OptionListLabel;
|
|
1203
|
+
Row: typeof OptionRow;
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
interface ChecklistProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1207
|
+
title?: ReactNode;
|
|
1208
|
+
children: ReactNode;
|
|
1209
|
+
}
|
|
1210
|
+
declare function ChecklistRoot({ title, className, children, ...rest }: ChecklistProps): react.JSX.Element;
|
|
1211
|
+
interface ChecklistItemProps {
|
|
1212
|
+
done: boolean;
|
|
1213
|
+
label: ReactNode;
|
|
1214
|
+
/** The chosen value under the label, or a placeholder such as "Not set yet". */
|
|
1215
|
+
value: ReactNode;
|
|
1216
|
+
}
|
|
1217
|
+
declare function ChecklistItem({ done, label, value }: ChecklistItemProps): react.JSX.Element;
|
|
1218
|
+
/** Fidel design-system Checklist: a summary of choices so far, each ticked once set. */
|
|
1219
|
+
declare const Checklist: typeof ChecklistRoot & {
|
|
1220
|
+
Item: typeof ChecklistItem;
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
interface DrawerProps {
|
|
1224
|
+
open: boolean;
|
|
1225
|
+
/** Called on Escape, the close button, or a click on the page behind. */
|
|
1226
|
+
onClose: () => void;
|
|
1227
|
+
title: ReactNode;
|
|
1228
|
+
description?: ReactNode;
|
|
1229
|
+
children?: ReactNode;
|
|
1230
|
+
/** Pinned to the bottom: a summary on the left and the buttons, primary last. */
|
|
1231
|
+
footer?: ReactNode;
|
|
1232
|
+
/** False blocks every way of closing, e.g. while saving. @default true */
|
|
1233
|
+
dismissible?: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Fidel design-system Drawer: a floating panel that slides in from the right over the
|
|
1237
|
+
* page, for picking or editing without leaving it. Traps focus, locks page
|
|
1238
|
+
* scroll and returns focus on close, like Modal.
|
|
1239
|
+
*/
|
|
1240
|
+
declare function Drawer({ open, onClose, title, description, children, footer, dismissible }: DrawerProps): react.ReactPortal | null;
|
|
1241
|
+
|
|
1242
|
+
interface ResourceCardStat {
|
|
1243
|
+
label: ReactNode;
|
|
1244
|
+
value: ReactNode;
|
|
1245
|
+
}
|
|
1246
|
+
interface ResourceCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1247
|
+
/** 16px icon before the title, e.g. a repository mark. */
|
|
1248
|
+
icon?: ReactNode;
|
|
1249
|
+
title: ReactNode;
|
|
1250
|
+
/** Beside the title, e.g. a Tag. */
|
|
1251
|
+
badge?: ReactNode;
|
|
1252
|
+
/** Small lines under the title. */
|
|
1253
|
+
meta?: ReactNode[];
|
|
1254
|
+
stats?: ResourceCardStat[];
|
|
1255
|
+
/** At the end of the card, e.g. a "Manage" button. */
|
|
1256
|
+
action?: ReactNode;
|
|
1257
|
+
/** `add` is the dashed card that invites adding another resource. @default 'default' */
|
|
1258
|
+
variant?: 'default' | 'add';
|
|
1259
|
+
}
|
|
1260
|
+
/** Fidel design-system ResourceCard: one linked thing (a repository, an account) with its numbers and an action. */
|
|
1261
|
+
declare function ResourceCard({ icon, title, badge, meta, stats, action, variant, className, ...rest }: ResourceCardProps): react.JSX.Element;
|
|
1262
|
+
|
|
1263
|
+
interface PageSkeletonProps {
|
|
1264
|
+
/** What's loading, for screen readers. @default 'Loading' */
|
|
1265
|
+
label?: string;
|
|
1266
|
+
children: ReactNode;
|
|
1267
|
+
}
|
|
1268
|
+
/** Fidel design-system PageSkeleton: a page's loading layout, composed from its parts so it matches the page. */
|
|
1269
|
+
declare function PageSkeletonRoot({ label, children }: PageSkeletonProps): react.JSX.Element;
|
|
1270
|
+
interface PageSkeletonHeaderProps {
|
|
1271
|
+
/** Real text when the title is known before data loads, e.g. "Projects". */
|
|
1272
|
+
title?: ReactNode;
|
|
1273
|
+
description?: ReactNode | boolean;
|
|
1274
|
+
breadcrumb?: boolean;
|
|
1275
|
+
action?: boolean;
|
|
1276
|
+
/** Number of tabs under the title. */
|
|
1277
|
+
tabs?: number;
|
|
1278
|
+
}
|
|
1279
|
+
/** The PageHeader with bars where data-driven text will go. */
|
|
1280
|
+
declare function PageSkeletonHeader({ title, description, breadcrumb, action, tabs }: PageSkeletonHeaderProps): react.JSX.Element;
|
|
1281
|
+
/** A search field and filter buttons. */
|
|
1282
|
+
declare function PageSkeletonToolbar({ filters }: {
|
|
1283
|
+
filters?: number;
|
|
1284
|
+
}): react.JSX.Element;
|
|
1285
|
+
/** A bordered table with a header row and `rows` rows of `columns` cells. */
|
|
1286
|
+
declare function PageSkeletonTable({ rows, columns }: {
|
|
1287
|
+
rows?: number;
|
|
1288
|
+
columns?: number;
|
|
1289
|
+
}): react.JSX.Element;
|
|
1290
|
+
/** A grid of cards. */
|
|
1291
|
+
declare function PageSkeletonCards({ count, height, columns }: {
|
|
1292
|
+
count?: number;
|
|
1293
|
+
height?: number;
|
|
1294
|
+
columns?: number;
|
|
1295
|
+
}): react.JSX.Element;
|
|
1296
|
+
/** Labelled fields, one under the other. */
|
|
1297
|
+
declare function PageSkeletonForm({ fields }: {
|
|
1298
|
+
fields?: number;
|
|
1299
|
+
}): react.JSX.Element;
|
|
1300
|
+
/** Main content beside a fixed-width aside, like a form with its summary. */
|
|
1301
|
+
declare function PageSkeletonSplit({ children, aside }: {
|
|
1302
|
+
children: ReactNode;
|
|
1303
|
+
aside: ReactNode;
|
|
1304
|
+
}): react.JSX.Element;
|
|
1305
|
+
declare const PageSkeleton: typeof PageSkeletonRoot & {
|
|
1306
|
+
Header: typeof PageSkeletonHeader;
|
|
1307
|
+
Toolbar: typeof PageSkeletonToolbar;
|
|
1308
|
+
Table: typeof PageSkeletonTable;
|
|
1309
|
+
Cards: typeof PageSkeletonCards;
|
|
1310
|
+
Form: typeof PageSkeletonForm;
|
|
1311
|
+
Split: typeof PageSkeletonSplit;
|
|
1312
|
+
};
|
|
1313
|
+
|
|
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 };
|