@amsterdam/design-system-react 0.9.0 → 0.11.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/index.d.ts CHANGED
@@ -1,5 +1,106 @@
1
1
  import * as react from 'react';
2
- import { PropsWithChildren, HTMLAttributes, InputHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, SelectHTMLAttributes, ButtonHTMLAttributes, TextareaHTMLAttributes, AnchorHTMLAttributes, TableHTMLAttributes, SVGProps, ForwardRefExoticComponent, RefAttributes, ReactNode, DialogHTMLAttributes, ImgHTMLAttributes, BlockquoteHTMLAttributes, OlHTMLAttributes, LiHTMLAttributes, LabelHTMLAttributes } from 'react';
2
+ import { PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, SelectHTMLAttributes, ReactNode, ButtonHTMLAttributes, TextareaHTMLAttributes, TableHTMLAttributes, SVGProps, ForwardRefExoticComponent, RefAttributes, DialogHTMLAttributes, ImgHTMLAttributes, BlockquoteHTMLAttributes, OlHTMLAttributes, LiHTMLAttributes, LabelHTMLAttributes } from 'react';
3
+
4
+ type HeadingProps = {
5
+ /** Changes the text colour for readability on a dark background. */
6
+ inverseColor?: boolean;
7
+ /** The hierarchical level within the document. */
8
+ level?: 1 | 2 | 3 | 4;
9
+ /** Uses larger or smaller text without changing its position in the heading hierarchy. */
10
+ size?: 'level-1' | 'level-2' | 'level-3' | 'level-4' | 'level-5' | 'level-6';
11
+ } & PropsWithChildren<HTMLAttributes<HTMLHeadingElement>>;
12
+ declare const Heading: react.ForwardRefExoticComponent<{
13
+ /** Changes the text colour for readability on a dark background. */
14
+ inverseColor?: boolean;
15
+ /** The hierarchical level within the document. */
16
+ level?: 1 | 2 | 3 | 4;
17
+ /** Uses larger or smaller text without changing its position in the heading hierarchy. */
18
+ size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
19
+ } & HTMLAttributes<HTMLHeadingElement> & {
20
+ children?: react.ReactNode | undefined;
21
+ } & react.RefAttributes<HTMLHeadingElement>>;
22
+
23
+ type FormError = {
24
+ id: string;
25
+ label: string;
26
+ };
27
+ type FormErrorListProps = {
28
+ /**
29
+ * The text following the error count.
30
+ * This is used to show the error count in the document title.
31
+ */
32
+ errorCountLabel?: {
33
+ plural: string;
34
+ singular: string;
35
+ };
36
+ /** The list of error messages to display. */
37
+ errors: FormError[];
38
+ /** Whether the component receives focus on first render */
39
+ focusOnRender?: boolean;
40
+ /** The text for the Heading. */
41
+ heading?: string;
42
+ /**
43
+ * The hierarchical level of the Heading within the document.
44
+ * Note: this intentionally does not change the font size.
45
+ */
46
+ headingLevel?: HeadingProps['level'];
47
+ } & HTMLAttributes<HTMLDivElement>;
48
+ declare const FormErrorList: react.ForwardRefExoticComponent<{
49
+ /**
50
+ * The text following the error count.
51
+ * This is used to show the error count in the document title.
52
+ */
53
+ errorCountLabel?: {
54
+ plural: string;
55
+ singular: string;
56
+ };
57
+ /** The list of error messages to display. */
58
+ errors: FormError[];
59
+ /** Whether the component receives focus on first render */
60
+ focusOnRender?: boolean;
61
+ /** The text for the Heading. */
62
+ heading?: string;
63
+ /**
64
+ * The hierarchical level of the Heading within the document.
65
+ * Note: this intentionally does not change the font size.
66
+ */
67
+ headingLevel?: HeadingProps["level"];
68
+ } & HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
69
+
70
+ type TableOfContentsProps = {
71
+ /** The text for the Heading. */
72
+ heading?: string;
73
+ /**
74
+ * The hierarchical level of the Heading within the document.
75
+ * Note: this intentionally does not change the font size.
76
+ */
77
+ headingLevel?: HeadingProps['level'];
78
+ } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
79
+ declare const TableOfContents: react.ForwardRefExoticComponent<{
80
+ /** The text for the Heading. */
81
+ heading?: string;
82
+ /**
83
+ * The hierarchical level of the Heading within the document.
84
+ * Note: this intentionally does not change the font size.
85
+ */
86
+ headingLevel?: HeadingProps["level"];
87
+ } & HTMLAttributes<HTMLElement> & {
88
+ children?: react.ReactNode | undefined;
89
+ } & react.RefAttributes<HTMLElement>> & {
90
+ Link: react.ForwardRefExoticComponent<{
91
+ label: string;
92
+ } & react.AnchorHTMLAttributes<HTMLAnchorElement> & react.RefAttributes<HTMLAnchorElement>>;
93
+ List: react.ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
94
+ children?: react.ReactNode | undefined;
95
+ } & react.RefAttributes<HTMLUListElement>>;
96
+ };
97
+
98
+ type TableOfContentsLinkProps = {
99
+ /** The text for the link. */
100
+ label: string;
101
+ } & AnchorHTMLAttributes<HTMLAnchorElement>;
102
+
103
+ type TableOfContentsListProps = PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
3
104
 
4
105
  type ErrorMessageProps = {
5
106
  /** An accessible phrase that screen readers announce before the error message. Should translate to something like ‘input error’. */
@@ -7,9 +108,9 @@ type ErrorMessageProps = {
7
108
  } & PropsWithChildren<HTMLAttributes<HTMLParagraphElement>>;
8
109
  declare const ErrorMessage: react.ForwardRefExoticComponent<{
9
110
  /** An accessible phrase that screen readers announce before the error message. Should translate to something like ‘input error’. */
10
- prefix?: string | undefined;
111
+ prefix?: string;
11
112
  } & HTMLAttributes<HTMLParagraphElement> & {
12
- children?: react.ReactNode;
113
+ children?: react.ReactNode | undefined;
13
114
  } & react.RefAttributes<HTMLParagraphElement>>;
14
115
 
15
116
  type FileInputProps = InputHTMLAttributes<HTMLInputElement>;
@@ -21,9 +122,9 @@ type FieldProps = {
21
122
  } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
22
123
  declare const Field: react.ForwardRefExoticComponent<{
23
124
  /** Whether the field has an input with a validation error */
24
- invalid?: boolean | undefined;
125
+ invalid?: boolean;
25
126
  } & HTMLAttributes<HTMLDivElement> & {
26
- children?: react.ReactNode;
127
+ children?: react.ReactNode | undefined;
27
128
  } & react.RefAttributes<HTMLDivElement>>;
28
129
 
29
130
  type SelectOptionGroupProps = OptgroupHTMLAttributes<HTMLOptGroupElement>;
@@ -36,15 +137,15 @@ type SelectProps = {
36
137
  } & PropsWithChildren<Omit<SelectHTMLAttributes<HTMLSelectElement>, 'aria-invalid'>>;
37
138
  declare const Select: react.ForwardRefExoticComponent<{
38
139
  /** Whether the value fails a validation rule. */
39
- invalid?: boolean | undefined;
140
+ invalid?: boolean;
40
141
  } & Omit<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid"> & {
41
- children?: react.ReactNode;
142
+ children?: react.ReactNode | undefined;
42
143
  } & react.RefAttributes<HTMLSelectElement>> & {
43
144
  Option: react.ForwardRefExoticComponent<SelectOptionProps & {
44
- children?: react.ReactNode;
145
+ children?: react.ReactNode | undefined;
45
146
  } & react.RefAttributes<HTMLOptionElement>>;
46
147
  Group: react.ForwardRefExoticComponent<SelectOptionGroupProps & {
47
- children?: react.ReactNode;
148
+ children?: react.ReactNode | undefined;
48
149
  } & react.RefAttributes<HTMLOptGroupElement>>;
49
150
  };
50
151
 
@@ -54,19 +155,25 @@ type TimeInputProps = {
54
155
  } & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>;
55
156
  declare const TimeInput: react.ForwardRefExoticComponent<{
56
157
  /** Whether the value fails a validation rule. */
57
- invalid?: boolean | undefined;
158
+ invalid?: boolean;
58
159
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & react.RefAttributes<HTMLInputElement>>;
59
160
 
161
+ declare const dateInputTypes: readonly ["date", "datetime-local"];
162
+ type DateInputType = (typeof dateInputTypes)[number];
60
163
  type DateInputProps = {
61
164
  /** Whether the value fails a validation rule. */
62
165
  invalid?: boolean;
166
+ /** The kind of data that the user should provide. */
167
+ type?: DateInputType;
63
168
  } & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>;
64
169
  declare const DateInput: react.ForwardRefExoticComponent<{
65
170
  /** Whether the value fails a validation rule. */
66
- invalid?: boolean | undefined;
171
+ invalid?: boolean;
172
+ /** The kind of data that the user should provide. */
173
+ type?: DateInputType;
67
174
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & react.RefAttributes<HTMLInputElement>>;
68
175
 
69
- declare const avatarColors: readonly ["blue", "dark-blue", "dark-green", "green", "magenta", "orange", "purple", "red", "yellow"];
176
+ declare const avatarColors: readonly ["black", "blue", "dark-green", "green", "grey-1", "grey-2", "grey-3", "light-blue", "magenta", "orange", "purple", "red", "white", "yellow"];
70
177
  type AvatarColor = (typeof avatarColors)[number];
71
178
  type AvatarProps = {
72
179
  /** The background colour. */
@@ -78,20 +185,20 @@ type AvatarProps = {
78
185
  } & HTMLAttributes<HTMLSpanElement>;
79
186
  declare const Avatar: react.ForwardRefExoticComponent<{
80
187
  /** The background colour. */
81
- color?: "blue" | "dark-blue" | "dark-green" | "green" | "magenta" | "orange" | "purple" | "red" | "yellow" | undefined;
188
+ color?: AvatarColor;
82
189
  /** The url for the user’s image. Its center will be displayed. Should be square and scaled down. */
83
- imageSrc?: string | undefined;
190
+ imageSrc?: string;
84
191
  /** The text content. Should be the user’s initials. The first two characters will be displayed. */
85
192
  label: string;
86
193
  } & HTMLAttributes<HTMLSpanElement> & react.RefAttributes<HTMLSpanElement>>;
87
194
 
88
- type FormFieldCharacterCounterProps = HTMLAttributes<HTMLDivElement> & {
195
+ type CharacterCountProps = HTMLAttributes<HTMLDivElement> & {
89
196
  /** The current length of the field’s value. */
90
197
  length: number;
91
198
  /** The maximum length of the field’s value. */
92
199
  maxLength: number;
93
200
  };
94
- declare const FormFieldCharacterCounter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
201
+ declare const CharacterCount: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
95
202
  /** The current length of the field’s value. */
96
203
  length: number;
97
204
  /** The maximum length of the field’s value. */
@@ -104,15 +211,15 @@ type DescriptionListProps = {
104
211
  } & PropsWithChildren<HTMLAttributes<HTMLDListElement>>;
105
212
  declare const DescriptionList: react.ForwardRefExoticComponent<{
106
213
  /** Changes the text colour for readability on a dark background. */
107
- inverseColor?: boolean | undefined;
214
+ inverseColor?: boolean;
108
215
  } & HTMLAttributes<HTMLDListElement> & {
109
- children?: react.ReactNode;
216
+ children?: react.ReactNode | undefined;
110
217
  } & react.RefAttributes<HTMLDListElement>> & {
111
218
  Term: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
112
- children?: react.ReactNode;
219
+ children?: react.ReactNode | undefined;
113
220
  } & react.RefAttributes<HTMLElement>>;
114
221
  Details: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
115
- children?: react.ReactNode;
222
+ children?: react.ReactNode | undefined;
116
223
  } & react.RefAttributes<HTMLElement>>;
117
224
  };
118
225
 
@@ -120,22 +227,71 @@ type DescriptionListTermProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
120
227
 
121
228
  type DescriptionListDetailsProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
122
229
 
123
- declare const rowGapSizes: Array<string>;
124
- type RowTag = 'article' | 'div' | 'section';
230
+ declare const crossAlignOptions: readonly ["start", "center", "baseline", "end"];
231
+ type CrossAlign = (typeof crossAlignOptions)[number];
232
+ declare const crossAlignOptionsForColumn: ("start" | "center" | "end")[];
233
+ type CrossAlignForColumn = (typeof crossAlignOptionsForColumn)[number];
234
+ declare const mainAlignOptions: readonly ["center", "end", "between", "around", "evenly"];
235
+ type MainAlign = (typeof mainAlignOptions)[number];
236
+
237
+ declare const rowGapSizes: readonly ["none", "extra-small", "small", "large", "extra-large"];
125
238
  type RowGap = (typeof rowGapSizes)[number];
239
+ type RowTag = 'article' | 'div' | 'section';
126
240
  type RowProps = {
127
- /** The HTML element to use. */
241
+ /**
242
+ * The horizontal alignment of the items in the row.
243
+ * @default start
244
+ */
245
+ align?: MainAlign;
246
+ /**
247
+ * The vertical alignment of the items in the row.
248
+ * @default stretch
249
+ */
250
+ alignVertical?: CrossAlign;
251
+ /**
252
+ * The HTML element to use.
253
+ * @default div
254
+ */
128
255
  as?: RowTag;
129
- /** The amount of vertical space between items. */
256
+ /**
257
+ * The amount of space between items.
258
+ * @default medium
259
+ */
130
260
  gap?: RowGap;
261
+ /**
262
+ * Whether items of the row can wrap onto multiple lines.
263
+ * @default false
264
+ */
265
+ wrap?: boolean;
131
266
  } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
132
267
  declare const Row: react.ForwardRefExoticComponent<{
133
- /** The HTML element to use. */
134
- as?: RowTag | undefined;
135
- /** The amount of vertical space between items. */
136
- gap?: string | undefined;
268
+ /**
269
+ * The horizontal alignment of the items in the row.
270
+ * @default start
271
+ */
272
+ align?: MainAlign;
273
+ /**
274
+ * The vertical alignment of the items in the row.
275
+ * @default stretch
276
+ */
277
+ alignVertical?: CrossAlign;
278
+ /**
279
+ * The HTML element to use.
280
+ * @default div
281
+ */
282
+ as?: RowTag;
283
+ /**
284
+ * The amount of space between items.
285
+ * @default medium
286
+ */
287
+ gap?: RowGap;
288
+ /**
289
+ * Whether items of the row can wrap onto multiple lines.
290
+ * @default false
291
+ */
292
+ wrap?: boolean;
137
293
  } & HTMLAttributes<HTMLElement> & {
138
- children?: react.ReactNode;
294
+ children?: react.ReactNode | undefined;
139
295
  } & react.RefAttributes<unknown>>;
140
296
 
141
297
  type RadioProps = {
@@ -144,27 +300,33 @@ type RadioProps = {
144
300
  } & PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>>;
145
301
  declare const Radio: react.ForwardRefExoticComponent<{
146
302
  /** Whether the value fails a validation rule. */
147
- invalid?: boolean | undefined;
303
+ invalid?: boolean;
148
304
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
149
- children?: react.ReactNode;
305
+ children?: react.ReactNode | undefined;
150
306
  } & react.RefAttributes<HTMLInputElement>>;
151
307
 
152
- type TabsProps = PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
153
- declare const Tabs: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
154
- children?: react.ReactNode;
308
+ type TabsProps = {
309
+ /** The number of the active tab. Corresponds to its `tab` value. */
310
+ activeTab?: number;
311
+ } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
312
+ declare const Tabs: react.ForwardRefExoticComponent<{
313
+ /** The number of the active tab. Corresponds to its `tab` value. */
314
+ activeTab?: number;
315
+ } & HTMLAttributes<HTMLDivElement> & {
316
+ children?: ReactNode | undefined;
155
317
  } & react.RefAttributes<HTMLDivElement>> & {
156
318
  Button: react.ForwardRefExoticComponent<{
157
319
  tab: number;
158
320
  } & react.ButtonHTMLAttributes<HTMLButtonElement> & {
159
- children?: react.ReactNode;
321
+ children?: ReactNode | undefined;
160
322
  } & react.RefAttributes<HTMLButtonElement>>;
161
323
  List: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
162
- children?: react.ReactNode;
324
+ children?: ReactNode | undefined;
163
325
  } & react.RefAttributes<HTMLDivElement>>;
164
326
  Panel: react.ForwardRefExoticComponent<{
165
327
  tab: number;
166
328
  } & HTMLAttributes<HTMLDivElement> & {
167
- children?: react.ReactNode;
329
+ children?: ReactNode | undefined;
168
330
  } & react.RefAttributes<HTMLDivElement>>;
169
331
  };
170
332
 
@@ -188,27 +350,59 @@ type TextAreaProps = {
188
350
  } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'aria-invalid'>;
189
351
  declare const TextArea: react.ForwardRefExoticComponent<{
190
352
  /** Whether the value fails a validation rule. */
191
- invalid?: boolean | undefined;
353
+ invalid?: boolean;
192
354
  /** Allows the user to resize the text box. The default is resizing in both directions. */
193
- resize?: "none" | "horizontal" | "vertical" | undefined;
355
+ resize?: "none" | "horizontal" | "vertical";
194
356
  } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "aria-invalid"> & react.RefAttributes<HTMLTextAreaElement>>;
195
357
 
196
- declare const columnGapSizes: Array<string>;
197
- type ColumnTag = 'article' | 'div' | 'section';
358
+ declare const columnGapSizes: readonly ["none", "extra-small", "small", "large", "extra-large"];
198
359
  type ColumnGap = (typeof columnGapSizes)[number];
360
+ type ColumnTag = 'article' | 'div' | 'section';
199
361
  type ColumnProps = {
200
- /** The HTML element to use. */
362
+ /**
363
+ * The vertical alignment of the items in the column.
364
+ * @default start
365
+ */
366
+ align?: MainAlign;
367
+ /**
368
+ * The horizontal alignment of the items in the column.
369
+ * @default stretch
370
+ */
371
+ alignHorizontal?: CrossAlignForColumn;
372
+ /**
373
+ * The HTML element to use.
374
+ * @default div
375
+ */
201
376
  as?: ColumnTag;
202
- /** The amount of vertical space between items. */
377
+ /**
378
+ * The amount of space between items.
379
+ * @default medium
380
+ */
203
381
  gap?: ColumnGap;
204
382
  } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
205
383
  declare const Column: react.ForwardRefExoticComponent<{
206
- /** The HTML element to use. */
207
- as?: ColumnTag | undefined;
208
- /** The amount of vertical space between items. */
209
- gap?: string | undefined;
384
+ /**
385
+ * The vertical alignment of the items in the column.
386
+ * @default start
387
+ */
388
+ align?: MainAlign;
389
+ /**
390
+ * The horizontal alignment of the items in the column.
391
+ * @default stretch
392
+ */
393
+ alignHorizontal?: CrossAlignForColumn;
394
+ /**
395
+ * The HTML element to use.
396
+ * @default div
397
+ */
398
+ as?: ColumnTag;
399
+ /**
400
+ * The amount of space between items.
401
+ * @default medium
402
+ */
403
+ gap?: ColumnGap;
210
404
  } & HTMLAttributes<HTMLElement> & {
211
- children?: react.ReactNode;
405
+ children?: react.ReactNode | undefined;
212
406
  } & react.RefAttributes<unknown>>;
213
407
 
214
408
  type FieldSetProps = PropsWithChildren<HTMLAttributes<HTMLFieldSetElement>> & {
@@ -218,24 +412,24 @@ type FieldSetProps = PropsWithChildren<HTMLAttributes<HTMLFieldSetElement>> & {
218
412
  legend: string;
219
413
  };
220
414
  declare const FieldSet: react.ForwardRefExoticComponent<HTMLAttributes<HTMLFieldSetElement> & {
221
- children?: react.ReactNode;
415
+ children?: react.ReactNode | undefined;
222
416
  } & {
223
417
  /** Whether the field set has an input with a validation error */
224
- invalid?: boolean | undefined;
418
+ invalid?: boolean;
225
419
  /** The text for the caption. */
226
420
  legend: string;
227
421
  } & react.RefAttributes<HTMLFieldSetElement>>;
228
422
 
229
423
  type LinkListProps = PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
230
424
  declare const LinkList: react.ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
231
- children?: react.ReactNode;
425
+ children?: react.ReactNode | undefined;
232
426
  } & react.RefAttributes<HTMLUListElement>> & {
233
427
  Link: react.ForwardRefExoticComponent<{
234
- icon?: Function | undefined;
235
- onBackground?: ("default" | "light" | "dark") | undefined;
236
- size?: "small" | "large" | undefined;
428
+ icon?: Function;
429
+ onBackground?: "default" | "light" | "dark";
430
+ size?: "small" | "large";
237
431
  } & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
238
- children?: react.ReactNode;
432
+ children?: react.ReactNode | undefined;
239
433
  } & react.RefAttributes<HTMLAnchorElement>>;
240
434
  };
241
435
 
@@ -259,44 +453,44 @@ type BadgeProps = {
259
453
  } & HTMLAttributes<HTMLElement>;
260
454
  declare const Badge: react.ForwardRefExoticComponent<{
261
455
  /** The background colour. */
262
- color?: "black" | "blue" | "dark-green" | "green" | "grey-1" | "grey-2" | "grey-3" | "light-blue" | "magenta" | "orange" | "purple" | "red" | "white" | "yellow" | undefined;
456
+ color?: BadgeColor;
263
457
  /** The text content. */
264
458
  label: string | number;
265
459
  } & HTMLAttributes<HTMLElement> & react.RefAttributes<HTMLElement>>;
266
460
 
267
461
  type TableProps = PropsWithChildren<TableHTMLAttributes<HTMLTableElement>>;
268
462
  declare const Table: react.ForwardRefExoticComponent<TableHTMLAttributes<HTMLTableElement> & {
269
- children?: react.ReactNode;
463
+ children?: react.ReactNode | undefined;
270
464
  } & react.RefAttributes<HTMLTableElement>> & {
271
465
  Body: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLTableSectionElement> & {
272
- children?: react.ReactNode;
466
+ children?: react.ReactNode | undefined;
273
467
  } & react.RefAttributes<HTMLTableSectionElement>>;
274
468
  Caption: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLTableCaptionElement> & {
275
- children?: react.ReactNode;
469
+ children?: react.ReactNode | undefined;
276
470
  } & react.RefAttributes<HTMLTableCaptionElement>>;
277
471
  Cell: react.ForwardRefExoticComponent<react.TdHTMLAttributes<HTMLTableCellElement> & {
278
- children?: react.ReactNode;
472
+ children?: react.ReactNode | undefined;
279
473
  } & react.RefAttributes<HTMLTableCellElement>>;
280
474
  Footer: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLTableSectionElement> & {
281
- children?: react.ReactNode;
475
+ children?: react.ReactNode | undefined;
282
476
  } & react.RefAttributes<HTMLTableSectionElement>>;
283
477
  Header: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLTableSectionElement> & {
284
- children?: react.ReactNode;
478
+ children?: react.ReactNode | undefined;
285
479
  } & react.RefAttributes<HTMLTableSectionElement>>;
286
480
  HeaderCell: react.ForwardRefExoticComponent<react.ThHTMLAttributes<HTMLTableCellElement> & {
287
- children?: react.ReactNode;
481
+ children?: react.ReactNode | undefined;
288
482
  } & react.RefAttributes<HTMLTableCellElement>>;
289
483
  Row: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLTableRowElement> & {
290
- children?: react.ReactNode;
484
+ children?: react.ReactNode | undefined;
291
485
  } & react.RefAttributes<HTMLTableRowElement>>;
292
486
  };
293
487
 
294
488
  type MegaMenuProps = PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
295
489
  declare const MegaMenu: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
296
- children?: react.ReactNode;
490
+ children?: react.ReactNode | undefined;
297
491
  } & react.RefAttributes<HTMLDivElement>> & {
298
492
  ListCategory: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
299
- children?: react.ReactNode;
493
+ children?: react.ReactNode | undefined;
300
494
  } & react.RefAttributes<HTMLDivElement>>;
301
495
  };
302
496
 
@@ -316,21 +510,21 @@ declare const IconButton: react.ForwardRefExoticComponent<{
316
510
  /** The accessible text for the button. Will be announced by screen readers. Should describe the button’s action. */
317
511
  label: string;
318
512
  /** Describes the underlying background colour. Allows the icon to provide visual contrast. */
319
- onBackground?: "light" | "dark" | undefined;
513
+ onBackground?: "light" | "dark";
320
514
  /** The size of the icon. Corresponds with the text levels. */
321
- size?: "level-3" | "level-4" | "level-5" | "level-6" | undefined;
515
+ size?: "level-3" | "level-4" | "level-5" | "level-6";
322
516
  /** The component rendering the icon’s markup. */
323
- svg?: Function | undefined;
517
+ svg?: Function;
324
518
  } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
325
519
 
326
520
  type SkipLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
327
521
  declare const SkipLink: react.ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
328
- children?: react.ReactNode;
522
+ children?: react.ReactNode | undefined;
329
523
  } & react.RefAttributes<HTMLAnchorElement>>;
330
524
 
331
525
  type OverlapProps = PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
332
526
  declare const Overlap: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
333
- children?: react.ReactNode;
527
+ children?: react.ReactNode | undefined;
334
528
  } & react.RefAttributes<HTMLDivElement>>;
335
529
 
336
530
  /**
@@ -346,58 +540,64 @@ type LogoProps = {
346
540
  declare const Logo: ForwardRefExoticComponent<Omit<LogoProps, "ref"> & RefAttributes<SVGSVGElement>>;
347
541
 
348
542
  type HeaderProps = {
543
+ /** The name of the application. */
544
+ appName?: string;
545
+ /** The list of menu links. Use a Page Menu here. */
546
+ links?: ReactNode;
349
547
  /** The name of the brand for which to display the logo. */
350
548
  logoBrand?: LogoBrand;
351
549
  /** The url for the link on the logo. */
352
550
  logoLink?: string;
353
551
  /** The accessible text for the link on the logo. */
354
552
  logoLinkTitle?: string;
355
- /** The name of the application. */
356
- title?: string;
357
- /** The list of menu links. Use a Page Menu here. */
358
- links?: ReactNode;
359
553
  /** A button to toggle the visibility of a Mega Menu. */
360
554
  menu?: ReactNode;
361
555
  } & HTMLAttributes<HTMLElement>;
362
556
  declare const Header: react.ForwardRefExoticComponent<{
363
- /** The name of the brand for which to display the logo. */
364
- logoBrand?: LogoBrand | undefined;
365
- /** The url for the link on the logo. */
366
- logoLink?: string | undefined;
367
- /** The accessible text for the link on the logo. */
368
- logoLinkTitle?: string | undefined;
369
557
  /** The name of the application. */
370
- title?: string | undefined;
558
+ appName?: string;
371
559
  /** The list of menu links. Use a Page Menu here. */
372
560
  links?: ReactNode;
561
+ /** The name of the brand for which to display the logo. */
562
+ logoBrand?: LogoBrand;
563
+ /** The url for the link on the logo. */
564
+ logoLink?: string;
565
+ /** The accessible text for the link on the logo. */
566
+ logoLinkTitle?: string;
373
567
  /** A button to toggle the visibility of a Mega Menu. */
374
568
  menu?: ReactNode;
375
569
  } & HTMLAttributes<HTMLElement> & react.RefAttributes<HTMLElement>>;
376
570
 
377
571
  type MarkProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
378
572
  declare const Mark: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
379
- children?: react.ReactNode;
573
+ children?: react.ReactNode | undefined;
380
574
  } & react.RefAttributes<HTMLElement>>;
381
575
 
576
+ declare const textInputTypes: readonly ["email", "tel", "text", "url"];
577
+ type TextInputType = (typeof textInputTypes)[number];
382
578
  type TextInputProps = {
383
579
  /** Whether the value fails a validation rule. */
384
580
  invalid?: boolean;
581
+ /** The kind of data that the user should provide. */
582
+ type?: TextInputType;
385
583
  } & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid'>;
386
584
  declare const TextInput: react.ForwardRefExoticComponent<{
387
585
  /** Whether the value fails a validation rule. */
388
- invalid?: boolean | undefined;
586
+ invalid?: boolean;
587
+ /** The kind of data that the user should provide. */
588
+ type?: TextInputType;
389
589
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid"> & react.RefAttributes<HTMLInputElement>>;
390
590
 
391
591
  type SearchFieldProps = PropsWithChildren<HTMLAttributes<HTMLFormElement>>;
392
592
  declare const SearchField: react.ForwardRefExoticComponent<HTMLAttributes<HTMLFormElement> & {
393
- children?: react.ReactNode;
593
+ children?: react.ReactNode | undefined;
394
594
  } & react.RefAttributes<HTMLFormElement>> & {
395
595
  Button: react.ForwardRefExoticComponent<{
396
- label?: string | undefined;
596
+ label?: string;
397
597
  } & HTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
398
598
  Input: react.ForwardRefExoticComponent<{
399
- invalid?: boolean | undefined;
400
- label?: string | undefined;
599
+ invalid?: boolean;
600
+ label?: string;
401
601
  } & react.InputHTMLAttributes<HTMLInputElement> & react.RefAttributes<HTMLInputElement>>;
402
602
  };
403
603
 
@@ -406,14 +606,18 @@ type DialogProps = {
406
606
  actions?: ReactNode;
407
607
  /** The label for the button that dismisses the Dialog. */
408
608
  closeButtonLabel?: string;
609
+ /** The text for the Heading. */
610
+ heading: string;
409
611
  } & PropsWithChildren<DialogHTMLAttributes<HTMLDialogElement>>;
410
612
  declare const Dialog: react.ForwardRefExoticComponent<{
411
613
  /** The button(s) in the footer. Start with a primary button. */
412
614
  actions?: ReactNode;
413
615
  /** The label for the button that dismisses the Dialog. */
414
- closeButtonLabel?: string | undefined;
616
+ closeButtonLabel?: string;
617
+ /** The text for the Heading. */
618
+ heading: string;
415
619
  } & DialogHTMLAttributes<HTMLDialogElement> & {
416
- children?: ReactNode;
620
+ children?: ReactNode | undefined;
417
621
  } & react.RefAttributes<HTMLDialogElement>>;
418
622
 
419
623
  type ImageProps = {
@@ -422,7 +626,7 @@ type ImageProps = {
422
626
  } & ImgHTMLAttributes<HTMLImageElement>;
423
627
  declare const Image: react.ForwardRefExoticComponent<{
424
628
  /** Whether to display the image exactly as large as its container. This will clip the image if necessary. */
425
- cover?: boolean | undefined;
629
+ cover?: boolean;
426
630
  } & ImgHTMLAttributes<HTMLImageElement> & react.RefAttributes<HTMLImageElement>>;
427
631
 
428
632
  type PaginationProps = {
@@ -445,19 +649,19 @@ type PaginationProps = {
445
649
  } & HTMLAttributes<HTMLElement>;
446
650
  declare const Pagination: react.ForwardRefExoticComponent<{
447
651
  /** The maximum amount of pages shown. Minimum value: 5. */
448
- maxVisiblePages?: number | undefined;
652
+ maxVisiblePages?: number;
449
653
  /** The accessible name for the link to the next page. */
450
- nextAriaLabel?: string | undefined;
654
+ nextAriaLabel?: string;
451
655
  /** The label for the link to the next page. */
452
- nextLabel?: string | undefined;
656
+ nextLabel?: string;
453
657
  /** A function to run when the page number changes. */
454
- onPageChange?: ((page: number) => void) | undefined;
658
+ onPageChange?: (page: number) => void;
455
659
  /** The current page number. */
456
- page?: number | undefined;
660
+ page?: number;
457
661
  /** The accessible name for the link to the previous page. */
458
- previousAriaLabel?: string | undefined;
662
+ previousAriaLabel?: string;
459
663
  /** The label for the link to the previous page. */
460
- previousLabel?: string | undefined;
664
+ previousLabel?: string;
461
665
  /** The total amount of pages. */
462
666
  totalPages: number;
463
667
  } & HTMLAttributes<HTMLElement> & react.RefAttributes<HTMLElement>>;
@@ -471,16 +675,16 @@ type ScreenProps = {
471
675
  } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
472
676
  declare const Screen: react.ForwardRefExoticComponent<{
473
677
  /** Whether the screen should stretch to the full height of the viewport. */
474
- fullHeight?: boolean | undefined;
678
+ fullHeight?: boolean;
475
679
  /** The maximum width of the screen. */
476
- maxWidth?: ScreenMaxWidth | undefined;
680
+ maxWidth?: ScreenMaxWidth;
477
681
  } & HTMLAttributes<HTMLDivElement> & {
478
- children?: react.ReactNode;
682
+ children?: react.ReactNode | undefined;
479
683
  } & react.RefAttributes<HTMLDivElement>>;
480
684
 
481
685
  type SwitchProps = PropsWithChildren<InputHTMLAttributes<HTMLInputElement>>;
482
686
  declare const Switch: react.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
483
- children?: react.ReactNode;
687
+ children?: react.ReactNode | undefined;
484
688
  } & react.RefAttributes<HTMLInputElement>>;
485
689
 
486
690
  declare const spotlightColors: readonly ["blue", "dark-blue", "dark-green", "green", "magenta", "orange", "purple", "yellow"];
@@ -493,24 +697,24 @@ type SpotlightProps = {
493
697
  } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
494
698
  declare const Spotlight: react.ForwardRefExoticComponent<{
495
699
  /** The HTML element to use. */
496
- as?: "article" | "aside" | "div" | "footer" | "section" | undefined;
700
+ as?: "article" | "aside" | "div" | "footer" | "section";
497
701
  /** The background colour. */
498
- color?: "blue" | "dark-blue" | "dark-green" | "green" | "magenta" | "orange" | "purple" | "yellow" | undefined;
702
+ color?: SpotlightColor;
499
703
  } & HTMLAttributes<HTMLElement> & {
500
- children?: react.ReactNode;
704
+ children?: react.ReactNode | undefined;
501
705
  } & react.RefAttributes<unknown>>;
502
706
 
503
707
  type CardProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
504
708
  declare const Card: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
505
- children?: react.ReactNode;
709
+ children?: react.ReactNode | undefined;
506
710
  } & react.RefAttributes<HTMLElement>> & {
507
711
  HeadingGroup: react.ForwardRefExoticComponent<{
508
712
  tagline: string;
509
713
  } & HTMLAttributes<HTMLElement> & {
510
- children?: react.ReactNode;
714
+ children?: react.ReactNode | undefined;
511
715
  } & react.RefAttributes<HTMLElement>>;
512
716
  Link: react.ForwardRefExoticComponent<react.AnchorHTMLAttributes<HTMLAnchorElement> & {
513
- children?: react.ReactNode;
717
+ children?: react.ReactNode | undefined;
514
718
  } & react.RefAttributes<HTMLAnchorElement>>;
515
719
  };
516
720
 
@@ -521,56 +725,41 @@ type CardHeadingGroupProps = {
521
725
 
522
726
  type CardLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
523
727
 
524
- type HeadingLevel = 1 | 2 | 3 | 4;
525
- type HeadingSize = 'level-1' | 'level-2' | 'level-3' | 'level-4' | 'level-5' | 'level-6';
526
- type HeadingProps = {
527
- /** Changes the text colour for readability on a dark background. */
528
- inverseColor?: boolean;
529
- /** The hierarchical level within the document. */
530
- level?: HeadingLevel;
531
- /** Uses larger or smaller text without changing its position in the heading hierarchy. */
532
- size?: HeadingSize;
533
- } & PropsWithChildren<HTMLAttributes<HTMLHeadingElement>>;
534
- declare const Heading: react.ForwardRefExoticComponent<{
535
- /** Changes the text colour for readability on a dark background. */
536
- inverseColor?: boolean | undefined;
537
- /** The hierarchical level within the document. */
538
- level?: HeadingLevel | undefined;
539
- /** Uses larger or smaller text without changing its position in the heading hierarchy. */
540
- size?: HeadingSize | undefined;
541
- } & HTMLAttributes<HTMLHeadingElement> & {
542
- children?: react.ReactNode;
543
- } & react.RefAttributes<HTMLHeadingElement>>;
544
-
545
728
  type AlertProps = {
546
729
  /** Whether the user can dismiss the Alert. Adds a button to its top right. */
547
730
  closeable?: boolean;
548
731
  /** The label for the button that dismisses the Alert. */
549
732
  closeButtonLabel?: string;
550
- /** The hierarchical level of the Alert’s heading within the document. */
733
+ /** The text for the Heading. */
734
+ heading?: string;
735
+ /**
736
+ * The hierarchical level of the Heading within the document.
737
+ * Note: this intentionally does not change the font size.
738
+ */
551
739
  headingLevel?: HeadingProps['level'];
552
740
  /** A function to run when dismissing. */
553
741
  onClose?: () => void;
554
742
  /** The significance of the message conveyed. */
555
743
  severity?: 'error' | 'info' | 'success' | 'warning';
556
- /** The text for the Heading. */
557
- title?: string;
558
744
  } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
559
745
  declare const Alert: react.ForwardRefExoticComponent<{
560
746
  /** Whether the user can dismiss the Alert. Adds a button to its top right. */
561
- closeable?: boolean | undefined;
747
+ closeable?: boolean;
562
748
  /** The label for the button that dismisses the Alert. */
563
- closeButtonLabel?: string | undefined;
564
- /** The hierarchical level of the Alert’s heading within the document. */
565
- headingLevel?: HeadingProps['level'];
749
+ closeButtonLabel?: string;
750
+ /** The text for the Heading. */
751
+ heading?: string;
752
+ /**
753
+ * The hierarchical level of the Heading within the document.
754
+ * Note: this intentionally does not change the font size.
755
+ */
756
+ headingLevel?: HeadingProps["level"];
566
757
  /** A function to run when dismissing. */
567
- onClose?: (() => void) | undefined;
758
+ onClose?: () => void;
568
759
  /** The significance of the message conveyed. */
569
- severity?: "error" | "info" | "success" | "warning" | undefined;
570
- /** The text for the Heading. */
571
- title?: string | undefined;
760
+ severity?: "error" | "info" | "success" | "warning";
572
761
  } & HTMLAttributes<HTMLDivElement> & {
573
- children?: react.ReactNode;
762
+ children?: react.ReactNode | undefined;
574
763
  } & react.RefAttributes<HTMLDivElement>>;
575
764
 
576
765
  type Ratio = 'x-tall' | 'tall' | 'square' | 'wide' | 'x-wide' | '2x-wide';
@@ -580,24 +769,20 @@ type AspectRatioProps = {
580
769
  } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
581
770
  declare const AspectRatio: react.ForwardRefExoticComponent<{
582
771
  /** The dimensions. */
583
- ratio?: Ratio | undefined;
772
+ ratio?: Ratio;
584
773
  } & HTMLAttributes<HTMLDivElement> & {
585
- children?: react.ReactNode;
774
+ children?: react.ReactNode | undefined;
586
775
  } & react.RefAttributes<HTMLDivElement>>;
587
776
 
588
- declare const VisuallyHidden: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
589
- children?: react.ReactNode;
590
- } & react.RefAttributes<HTMLElement>>;
591
-
592
777
  type FooterProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
593
778
  declare const Footer: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
594
- children?: react.ReactNode;
779
+ children?: react.ReactNode | undefined;
595
780
  } & react.RefAttributes<HTMLElement>> & {
596
781
  Bottom: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
597
- children?: react.ReactNode;
782
+ children?: react.ReactNode | undefined;
598
783
  } & react.RefAttributes<HTMLDivElement>>;
599
784
  Top: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
600
- children?: react.ReactNode;
785
+ children?: react.ReactNode | undefined;
601
786
  } & react.RefAttributes<HTMLDivElement>>;
602
787
  };
603
788
 
@@ -613,16 +798,16 @@ type PageMenuProps = {
613
798
  } & PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
614
799
  declare const PageMenu: react.ForwardRefExoticComponent<{
615
800
  /** Whether the items align to the end margin. Set to `true` if the Page Menu itself does so. */
616
- alignEnd?: boolean | undefined;
801
+ alignEnd?: boolean;
617
802
  /** Whether menu items should wrap if they don’t fit on a single row. */
618
- wrap?: boolean | undefined;
803
+ wrap?: boolean;
619
804
  } & HTMLAttributes<HTMLUListElement> & {
620
- children?: react.ReactNode;
805
+ children?: react.ReactNode | undefined;
621
806
  } & react.RefAttributes<HTMLUListElement>> & {
622
807
  Link: react.ForwardRefExoticComponent<{
623
- icon?: Function | undefined;
808
+ icon?: Function;
624
809
  } & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
625
- children?: react.ReactNode;
810
+ children?: react.ReactNode | undefined;
626
811
  } & react.RefAttributes<HTMLAnchorElement>>;
627
812
  };
628
813
 
@@ -643,9 +828,9 @@ type BlockquoteProps = {
643
828
  } & PropsWithChildren<BlockquoteHTMLAttributes<HTMLQuoteElement>>;
644
829
  declare const Blockquote: react.ForwardRefExoticComponent<{
645
830
  /** Changes the text colour for readability on a dark background. */
646
- inverseColor?: boolean | undefined;
831
+ inverseColor?: boolean;
647
832
  } & BlockquoteHTMLAttributes<HTMLQuoteElement> & {
648
- children?: react.ReactNode;
833
+ children?: react.ReactNode | undefined;
649
834
  } & react.RefAttributes<HTMLQuoteElement>>;
650
835
 
651
836
  type CheckboxProps = {
@@ -656,11 +841,11 @@ type CheckboxProps = {
656
841
  } & PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>>;
657
842
  declare const Checkbox: react.ForwardRefExoticComponent<{
658
843
  /** Whether the value fails a validation rule. */
659
- invalid?: boolean | undefined;
844
+ invalid?: boolean;
660
845
  /** Allows being neither checked nor unchecked. */
661
- indeterminate?: boolean | undefined;
846
+ indeterminate?: boolean;
662
847
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
663
- children?: react.ReactNode;
848
+ children?: react.ReactNode | undefined;
664
849
  } & react.RefAttributes<HTMLInputElement>>;
665
850
 
666
851
  type PageHeadingProps = {
@@ -669,9 +854,9 @@ type PageHeadingProps = {
669
854
  } & PropsWithChildren<HTMLAttributes<HTMLHeadingElement>>;
670
855
  declare const PageHeading: react.ForwardRefExoticComponent<{
671
856
  /** Changes the text colour for readability on a dark background. */
672
- inverseColor?: boolean | undefined;
857
+ inverseColor?: boolean;
673
858
  } & HTMLAttributes<HTMLHeadingElement> & {
674
- children?: react.ReactNode;
859
+ children?: react.ReactNode | undefined;
675
860
  } & react.RefAttributes<HTMLHeadingElement>>;
676
861
 
677
862
  type OrderedListProps = {
@@ -684,16 +869,16 @@ type OrderedListProps = {
684
869
  } & PropsWithChildren<OlHTMLAttributes<HTMLOListElement>>;
685
870
  declare const OrderedList: react.ForwardRefExoticComponent<{
686
871
  /** Changes the text colour for readability on a dark background. */
687
- inverseColor?: boolean | undefined;
872
+ inverseColor?: boolean;
688
873
  /** Whether the list items show a marker. */
689
- markers?: boolean | undefined;
874
+ markers?: boolean;
690
875
  /** The size of the text. */
691
- size?: "small" | undefined;
876
+ size?: "small";
692
877
  } & OlHTMLAttributes<HTMLOListElement> & {
693
- children?: react.ReactNode;
878
+ children?: react.ReactNode | undefined;
694
879
  } & react.RefAttributes<HTMLOListElement>> & {
695
880
  Item: react.ForwardRefExoticComponent<react.LiHTMLAttributes<HTMLLIElement> & {
696
- children?: react.ReactNode;
881
+ children?: react.ReactNode | undefined;
697
882
  } & react.RefAttributes<HTMLLIElement>>;
698
883
  };
699
884
 
@@ -703,7 +888,7 @@ type BreadcrumbLinkProps = AnchorHTMLAttributes<HTMLAnchorElement>;
703
888
 
704
889
  type BreadcrumbProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
705
890
  declare const Breadcrumb: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
706
- children?: react.ReactNode;
891
+ children?: react.ReactNode | undefined;
707
892
  } & react.RefAttributes<HTMLElement>> & {
708
893
  Link: react.ForwardRefExoticComponent<BreadcrumbLinkProps & react.RefAttributes<HTMLAnchorElement>>;
709
894
  };
@@ -718,9 +903,9 @@ type LinkProps = {
718
903
  } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'placeholder'>;
719
904
  declare const Link: react.ForwardRefExoticComponent<{
720
905
  /** Describes the underlying background colour. Allows the text to provide visual contrast. */
721
- onBackground?: LinkOnBackground | undefined;
906
+ onBackground?: LinkOnBackground;
722
907
  /** Whether the link is inline or stands alone. */
723
- variant?: LinkVariant | undefined;
908
+ variant?: LinkVariant;
724
909
  } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "placeholder"> & react.RefAttributes<HTMLAnchorElement>>;
725
910
 
726
911
  type ButtonProps = {
@@ -729,9 +914,9 @@ type ButtonProps = {
729
914
  } & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>;
730
915
  declare const Button: react.ForwardRefExoticComponent<{
731
916
  /** The level of prominence. Use a primary button only once per page or section. */
732
- variant?: "primary" | "secondary" | "tertiary" | undefined;
917
+ variant?: "primary" | "secondary" | "tertiary";
733
918
  } & ButtonHTMLAttributes<HTMLButtonElement> & {
734
- children?: react.ReactNode;
919
+ children?: react.ReactNode | undefined;
735
920
  } & react.RefAttributes<HTMLButtonElement>>;
736
921
 
737
922
  type ParagraphProps = {
@@ -742,15 +927,15 @@ type ParagraphProps = {
742
927
  } & PropsWithChildren<HTMLAttributes<HTMLParagraphElement>>;
743
928
  declare const Paragraph: react.ForwardRefExoticComponent<{
744
929
  /** Changes the text colour for readability on a dark background. */
745
- inverseColor?: boolean | undefined;
930
+ inverseColor?: boolean;
746
931
  /** The size of the text. */
747
- size?: "small" | "large" | undefined;
932
+ size?: "small" | "large";
748
933
  } & HTMLAttributes<HTMLParagraphElement> & {
749
- children?: react.ReactNode;
934
+ children?: react.ReactNode | undefined;
750
935
  } & react.RefAttributes<HTMLParagraphElement>>;
751
936
 
752
937
  declare const Label: react.ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & {
753
- children?: react.ReactNode;
938
+ children?: react.ReactNode | undefined;
754
939
  } & react.RefAttributes<HTMLLabelElement>>;
755
940
 
756
941
  type UnorderedListProps = {
@@ -763,16 +948,16 @@ type UnorderedListProps = {
763
948
  } & PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
764
949
  declare const UnorderedList: react.ForwardRefExoticComponent<{
765
950
  /** Changes the text colour for readability on a dark background. */
766
- inverseColor?: boolean | undefined;
951
+ inverseColor?: boolean;
767
952
  /** Whether the list items show a marker. */
768
- markers?: boolean | undefined;
953
+ markers?: boolean;
769
954
  /** The size of the text. */
770
- size?: "small" | undefined;
955
+ size?: "small";
771
956
  } & HTMLAttributes<HTMLUListElement> & {
772
- children?: react.ReactNode;
957
+ children?: react.ReactNode | undefined;
773
958
  } & react.RefAttributes<HTMLUListElement>> & {
774
959
  Item: react.ForwardRefExoticComponent<react.LiHTMLAttributes<HTMLLIElement> & {
775
- children?: react.ReactNode;
960
+ children?: react.ReactNode | undefined;
776
961
  } & react.RefAttributes<HTMLLIElement>>;
777
962
  };
778
963
 
@@ -788,32 +973,32 @@ type IconProps = {
788
973
  } & HTMLAttributes<HTMLSpanElement>;
789
974
  declare const Icon: react.ForwardRefExoticComponent<{
790
975
  /** The size of the icon. Corresponds with the text levels. */
791
- size?: "level-3" | "level-4" | "level-5" | "level-6" | undefined;
976
+ size?: "level-3" | "level-4" | "level-5" | "level-6";
792
977
  /** Whether the icon container should be made square. */
793
- square?: boolean | undefined;
978
+ square?: boolean;
794
979
  /** The component rendering the icon’s markup. */
795
980
  svg: Function;
796
981
  } & HTMLAttributes<HTMLSpanElement> & react.RefAttributes<HTMLElement>>;
797
982
 
798
983
  type AccordionProps = {
799
984
  /** The hierarchical level of the Accordion Section heading(s) within the document. */
800
- headingLevel: HeadingLevel;
985
+ headingLevel: HeadingProps['level'];
801
986
  /** The HTML element to use for each Accordion Section. */
802
987
  sectionAs?: 'div' | 'section';
803
988
  } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
804
989
  declare const Accordion: react.ForwardRefExoticComponent<{
805
990
  /** The hierarchical level of the Accordion Section heading(s) within the document. */
806
- headingLevel: HeadingLevel;
991
+ headingLevel: HeadingProps["level"];
807
992
  /** The HTML element to use for each Accordion Section. */
808
- sectionAs?: "div" | "section" | undefined;
993
+ sectionAs?: "div" | "section";
809
994
  } & HTMLAttributes<HTMLDivElement> & {
810
- children?: react.ReactNode;
995
+ children?: react.ReactNode | undefined;
811
996
  } & react.RefAttributes<HTMLDivElement>> & {
812
997
  Section: react.ForwardRefExoticComponent<{
813
998
  label: string;
814
- expanded?: boolean | undefined;
999
+ expanded?: boolean;
815
1000
  } & HTMLAttributes<HTMLElement> & {
816
- children?: react.ReactNode;
1001
+ children?: react.ReactNode | undefined;
817
1002
  } & react.RefAttributes<HTMLDivElement>>;
818
1003
  };
819
1004
 
@@ -868,4 +1053,4 @@ declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttribu
868
1053
  Cell: react.ForwardRefExoticComponent<GridCellProps & react.RefAttributes<unknown>>;
869
1054
  };
870
1055
 
871
- export { Accordion, type AccordionProps, type AccordionSectionProps, Alert, type AlertProps, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardHeadingGroupProps, type CardLinkProps, type CardProps, Checkbox, type CheckboxProps, Column, type ColumnProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListDetailsProps, type DescriptionListProps, type DescriptionListTermProps, Dialog, type DialogProps, ErrorMessage, type ErrorMessageProps, Field, type FieldProps, FieldSet, type FieldSetProps, FileInput, type FileInputProps, Footer, type FooterBottomProps, type FooterProps, type FooterTopProps, FormFieldCharacterCounter, type FormFieldCharacterCounterProps, Grid, type GridCellProps, type GridColumnNumber, type GridColumnNumbers, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconProps, Image, type ImageProps, Label, Link, LinkList, type LinkListLinkProps, type LinkListProps, type LinkProps, Logo, type LogoBrand, type LogoProps, Mark, type MarkProps, MegaMenu, type MegaMenuListCategoryProps, type MegaMenuProps, OrderedList, type OrderedListItemProps, type OrderedListProps, Overlap, type OverlapProps, PageHeading, type PageHeadingProps, PageMenu, type PageMenuLinkProps, type PageMenuProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Radio, type RadioProps, type Ratio, Row, type RowProps, Screen, type ScreenProps, SearchField, type SearchFieldProps, Select, type SelectOptionProps, type SelectProps, SkipLink, type SkipLinkProps, Spotlight, type SpotlightProps, Switch, type SwitchProps, Table, type TableProps, Tabs, type TabsButtonProps, type TabsListProps, type TabsPanelProps, type TabsProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TimeInput, type TimeInputProps, TopTaskLink, UnorderedList, type UnorderedListItemProps, type UnorderedListProps, VisuallyHidden };
1056
+ export { Accordion, type AccordionProps, type AccordionSectionProps, Alert, type AlertProps, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardHeadingGroupProps, type CardLinkProps, type CardProps, CharacterCount, type CharacterCountProps, Checkbox, type CheckboxProps, Column, type ColumnProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListDetailsProps, type DescriptionListProps, type DescriptionListTermProps, Dialog, type DialogProps, ErrorMessage, type ErrorMessageProps, Field, type FieldProps, FieldSet, type FieldSetProps, FileInput, type FileInputProps, Footer, type FooterBottomProps, type FooterProps, type FooterTopProps, type FormError, FormErrorList, type FormErrorListProps, Grid, type GridCellProps, type GridColumnNumber, type GridColumnNumbers, type GridProps, Header, type HeaderProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconProps, Image, type ImageProps, Label, Link, LinkList, type LinkListLinkProps, type LinkListProps, type LinkProps, Logo, type LogoBrand, type LogoProps, Mark, type MarkProps, MegaMenu, type MegaMenuListCategoryProps, type MegaMenuProps, OrderedList, type OrderedListItemProps, type OrderedListProps, Overlap, type OverlapProps, PageHeading, type PageHeadingProps, PageMenu, type PageMenuLinkProps, type PageMenuProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Radio, type RadioProps, type Ratio, Row, type RowProps, Screen, type ScreenProps, SearchField, type SearchFieldProps, Select, type SelectOptionProps, type SelectProps, SkipLink, type SkipLinkProps, Spotlight, type SpotlightProps, Switch, type SwitchProps, Table, TableOfContents, type TableOfContentsLinkProps, type TableOfContentsListProps, type TableOfContentsProps, type TableProps, Tabs, type TabsButtonProps, type TabsListProps, type TabsPanelProps, type TabsProps, TextArea, type TextAreaProps, TextInput, type TextInputProps, TimeInput, type TimeInputProps, TopTaskLink, UnorderedList, type UnorderedListItemProps, type UnorderedListProps };