@oaknational/oak-components 0.0.27

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.
@@ -0,0 +1,1120 @@
1
+ import * as styled_components from 'styled-components';
2
+ import { CSSProperties as CSSProperties$1 } from 'styled-components';
3
+ import * as React$1 from 'react';
4
+ import React__default, { CSSProperties, MouseEventHandler, ElementType, ComponentPropsWithoutRef, FC, ReactNode, FocusEvent, DetailedHTMLProps, InputHTMLAttributes, ChangeEventHandler } from 'react';
5
+ import * as Image from 'next/image';
6
+ import Image__default, { ImageProps as ImageProps$1 } from 'next/image';
7
+ import * as next_dist_shared_lib_get_img_props from 'next/dist/shared/lib/get-img-props';
8
+ import * as _cloudinary_util_url_loader_dist_schema_UX7RRFIR from '@cloudinary-util/url-loader/dist/schema-UX7RRFIR';
9
+ import { CldImage } from 'next-cloudinary';
10
+
11
+ declare const oakColorTokens: {
12
+ white: string;
13
+ grey10: string;
14
+ grey20: string;
15
+ grey30: string;
16
+ grey40: string;
17
+ grey50: string;
18
+ grey60: string;
19
+ grey70: string;
20
+ black: string;
21
+ oakGreen: string;
22
+ mint: string;
23
+ mint30: string;
24
+ mint50: string;
25
+ mint110: string;
26
+ aqua: string;
27
+ aqua30: string;
28
+ aqua50: string;
29
+ aqua110: string;
30
+ lavender: string;
31
+ lavender30: string;
32
+ lavender50: string;
33
+ lavender110: string;
34
+ pink: string;
35
+ pink30: string;
36
+ pink50: string;
37
+ pink110: string;
38
+ lemon: string;
39
+ lemon30: string;
40
+ lemon50: string;
41
+ lemon110: string;
42
+ amber: string;
43
+ amber30: string;
44
+ amber50: string;
45
+ red: string;
46
+ red30: string;
47
+ red50: string;
48
+ navy: string;
49
+ navy110: string;
50
+ navy120: string;
51
+ blue: string;
52
+ magenta: string;
53
+ purple: string;
54
+ teal: string;
55
+ transparent: string;
56
+ };
57
+ type OakColorToken = keyof typeof oakColorTokens;
58
+ declare const oakUiRoleTokens: readonly ["text-primary", "text-subdued", "text-error", "text-disabled", "text-link-active", "text-link-hover", "text-link-visited", "text-link-pressed", "text-inverted", "text-success", "text-warning", "bg-primary", "bg-neutral", "bg-neutral-stronger", "bg-btn-primary", "bg-btn-primary-hover", "bg-btn-primary-disabled", "bg-btn-secondary", "bg-btn-secondary-hover", "bg-btn-secondary-disabled", "bg-icon", "bg-icon-hover", "bg-decorative1-main", "bg-decorative1-subdued", "bg-decorative1-very-subdued", "bg-decorative2-main", "bg-decorative2-subdued", "bg-decorative2-very-subdued", "bg-decorative3-main", "bg-decorative3-subdued", "bg-decorative3-very-subdued", "bg-decorative4-main", "bg-decorative4-subdued", "bg-decorative4-very-subdued", "bg-decorative5-main", "bg-decorative5-subdued", "bg-decorative5-very-subdued", "bg-correct", "bg-incorrect", "icon-main", "icon-inverted", "icon-disabled", "icon-brand", "icon-success", "icon-error", "icon-warning", "border-primary", "border-inverted", "border-neutral", "border-brand", "border-success", "border-error", "border-warning", "border-decorative1", "border-decorative1-stronger", "border-decorative2", "border-decorative2-stronger", "border-decorative3", "border-decorative3-stronger", "border-decorative4", "border-decorative4-stronger", "border-decorative5", "border-decorative5-stronger", "border-decorative6", "border-decorative6-stronger", "transparent"];
59
+ type OakUiRoleToken = (typeof oakUiRoleTokens)[number];
60
+ type UiRoleMap = Record<OakUiRoleToken, OakColorToken | null | undefined>;
61
+ type OakCombinedColorToken = OakColorToken | OakUiRoleToken;
62
+
63
+ type OakTheme = {
64
+ name: string;
65
+ uiColors: UiRoleMap;
66
+ };
67
+
68
+ type ResponsiveValues<Value> = (Value | null) | (Value | null)[];
69
+
70
+ declare const oakAllSpacingTokens: {
71
+ "all-spacing-0": number;
72
+ "all-spacing-1": number;
73
+ "all-spacing-2": number;
74
+ "all-spacing-3": number;
75
+ "all-spacing-4": number;
76
+ "all-spacing-5": number;
77
+ "all-spacing-6": number;
78
+ "all-spacing-7": number;
79
+ "all-spacing-8": number;
80
+ "all-spacing-9": number;
81
+ "all-spacing-10": number;
82
+ "all-spacing-11": number;
83
+ "all-spacing-12": number;
84
+ "all-spacing-13": number;
85
+ "all-spacing-14": number;
86
+ "all-spacing-15": number;
87
+ "all-spacing-16": number;
88
+ "all-spacing-17": number;
89
+ "all-spacing-18": number;
90
+ "all-spacing-19": number;
91
+ "all-spacing-20": number;
92
+ "all-spacing-21": number;
93
+ "all-spacing-22": number;
94
+ "all-spacing-23": number;
95
+ "all-spacing-24": number;
96
+ };
97
+ type OakAllSpacingToken = keyof typeof oakAllSpacingTokens;
98
+ declare const oakInnerPaddingTokens: {
99
+ "inner-padding-none": string;
100
+ "inner-padding-ssx": string;
101
+ "inner-padding-xs": string;
102
+ "inner-padding-s": string;
103
+ "inner-padding-m": string;
104
+ "inner-padding-l": string;
105
+ "inner-padding-xl": string;
106
+ };
107
+ type OakInnerPaddingToken = keyof typeof oakInnerPaddingTokens;
108
+ declare const oakSpaceBetweenTokens: {
109
+ "space-between-none": string;
110
+ "space-between-sssx": string;
111
+ "space-between-ssx": string;
112
+ "space-between-xs": string;
113
+ "space-between-s": string;
114
+ "space-between-m": string;
115
+ "space-between-m2": string;
116
+ "space-between-l": string;
117
+ "space-between-xl": string;
118
+ "space-between-xxl": string;
119
+ "space-between-xxxl": string;
120
+ };
121
+ type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;
122
+ type AdditionalSpacingTypes = "100%" | 0 | "100vh" | "100vw" | "auto" | "fit-content" | "inherit" | "initial" | "unset";
123
+ type OakCombinedSpacingToken = OakAllSpacingToken | OakInnerPaddingToken | OakSpaceBetweenToken | AdditionalSpacingTypes;
124
+
125
+ type PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;
126
+ type PaddingStyleProps = {
127
+ $pa?: PaddingValues;
128
+ $ph?: PaddingValues;
129
+ $pv?: PaddingValues;
130
+ $pl?: PaddingValues;
131
+ $pr?: PaddingValues;
132
+ $pt?: PaddingValues;
133
+ $pb?: PaddingValues;
134
+ };
135
+ type MarginValue = "auto" | OakSpaceBetweenToken | null | undefined;
136
+ type MarginValues = ResponsiveValues<MarginValue>;
137
+ type MarginStyleProps = {
138
+ $ma?: MarginValues;
139
+ $mh?: MarginValues;
140
+ $mv?: MarginValues;
141
+ $ml?: MarginValues;
142
+ $mr?: MarginValues;
143
+ $mt?: MarginValues;
144
+ $mb?: MarginValues;
145
+ };
146
+ type SpacingStyleProps = PaddingStyleProps & MarginStyleProps;
147
+
148
+ type ColorToken = ResponsiveValues<OakCombinedColorToken | null>;
149
+ type ColorStyleProps = {
150
+ $color?: ColorToken;
151
+ $background?: ColorToken;
152
+ };
153
+
154
+ type PositionSpacing = OakAllSpacingToken | OakSpaceBetweenToken | null | undefined;
155
+ type PositionStyleProps = {
156
+ $position?: ResponsiveValues<CSSProperties["position"]>;
157
+ $top?: ResponsiveValues<PositionSpacing>;
158
+ $right?: ResponsiveValues<PositionSpacing>;
159
+ $bottom?: ResponsiveValues<PositionSpacing>;
160
+ $left?: ResponsiveValues<PositionSpacing>;
161
+ $overflow?: ResponsiveValues<CSSProperties["overflow"]>;
162
+ $overflowX?: ResponsiveValues<CSSProperties["overflowX"]>;
163
+ $overflowY?: ResponsiveValues<CSSProperties["overflowY"]>;
164
+ $objectFit?: ResponsiveValues<CSSProperties["objectFit"]>;
165
+ $pointerEvents?: ResponsiveValues<CSSProperties["pointerEvents"]>;
166
+ $visibility?: ResponsiveValues<CSSProperties["visibility"]>;
167
+ };
168
+
169
+ type SizeValues = ResponsiveValues<OakCombinedSpacingToken | null | undefined>;
170
+ type SizeStyleProps = {
171
+ $width?: SizeValues;
172
+ $minWidth?: SizeValues;
173
+ $maxWidth?: SizeValues;
174
+ $height?: SizeValues;
175
+ $minHeight?: SizeValues;
176
+ $maxHeight?: SizeValues;
177
+ };
178
+
179
+ declare const oakBorderWidthTokens: {
180
+ "border-solid-none": number;
181
+ "border-solid-s": number;
182
+ "border-solid-m": number;
183
+ "border-solid-l": number;
184
+ "border-solid-xl": number;
185
+ };
186
+ declare const oakBorderRadiusTokens: {
187
+ "border-radius-square": number;
188
+ "border-radius-xs": number;
189
+ "border-radius-s": number;
190
+ "border-radius-m": number;
191
+ "border-radius-m2": number;
192
+ "border-radius-l": number;
193
+ "border-radius-xl": number;
194
+ "border-radius-circle": number;
195
+ };
196
+ type OakBorderRadiusToken = keyof typeof oakBorderRadiusTokens;
197
+ type OakBorderWidthToken = keyof typeof oakBorderWidthTokens;
198
+
199
+ type BorderWidth = ResponsiveValues<OakBorderWidthToken>;
200
+ type _BorderStyleProps = ResponsiveValues<CSSProperties$1["borderStyle"]>;
201
+ type BorderColorProps = ResponsiveValues<OakUiRoleToken | OakColorToken>;
202
+ type BorderRadiusProps = ResponsiveValues<OakBorderRadiusToken>;
203
+ type BorderStyleProps = {
204
+ $ba?: BorderWidth;
205
+ $bt?: BorderWidth;
206
+ $br?: BorderWidth;
207
+ $bb?: BorderWidth;
208
+ $bl?: BorderWidth;
209
+ $bh?: BorderWidth;
210
+ $bv?: BorderWidth;
211
+ $borderStyle?: _BorderStyleProps;
212
+ $borderColor?: BorderColorProps;
213
+ $borderRadius?: BorderRadiusProps;
214
+ $btlr?: BorderRadiusProps;
215
+ $btrr?: BorderRadiusProps;
216
+ $bblr?: BorderRadiusProps;
217
+ $bbrr?: BorderRadiusProps;
218
+ $btr?: BorderRadiusProps;
219
+ $bbr?: BorderRadiusProps;
220
+ };
221
+
222
+ type DisplayStyleProps = {
223
+ $display?: ResponsiveValues<CSSProperties["display"]>;
224
+ };
225
+
226
+ declare const oakDropShadowTokens: {
227
+ "drop-shadow-standard": string;
228
+ "drop-shadow-lemon": string;
229
+ "drop-shadow-wide-lemon": string;
230
+ "drop-shadow-centered-lemon": string;
231
+ "drop-shadow-grey": string;
232
+ "drop-shadow-centered-grey": string;
233
+ };
234
+ type OakDropShadowToken = keyof typeof oakDropShadowTokens;
235
+
236
+ type DropShadowStyleProps = {
237
+ $dropShadow?: ResponsiveValues<OakDropShadowToken>;
238
+ };
239
+
240
+ declare const oakOpacityTokens: {
241
+ transparent: number;
242
+ "semi-transparent": number;
243
+ "semi-opaque": number;
244
+ opaque: number;
245
+ };
246
+ type OakOpacityToken = keyof typeof oakOpacityTokens;
247
+
248
+ type OpacityStyleProps = {
249
+ $opacity?: ResponsiveValues<OakOpacityToken>;
250
+ };
251
+
252
+ type TransformStyleProps = {
253
+ $transform?: ResponsiveValues<CSSProperties$1["transform"] | null>;
254
+ $transformOrigin?: ResponsiveValues<CSSProperties$1["transformOrigin"] | null>;
255
+ };
256
+
257
+ declare const oakTransitionTokens: {
258
+ "standard-ease": string;
259
+ "standard-transform": string;
260
+ };
261
+ type OakTransitionToken = keyof typeof oakTransitionTokens;
262
+
263
+ type Transition = OakTransitionToken;
264
+ type TransitionStyleProps = {
265
+ $transition?: ResponsiveValues<Transition>;
266
+ };
267
+
268
+ declare const oakFontSizeTokens: {
269
+ "font-size-1": number;
270
+ "font-size-2": number;
271
+ "font-size-3": number;
272
+ "font-size-4": number;
273
+ "font-size-5": number;
274
+ "font-size-6": number;
275
+ "font-size-7": number;
276
+ "font-size-8": number;
277
+ "font-size-9": number;
278
+ "font-size-10": number;
279
+ };
280
+ type OakFontSizeToken = keyof typeof oakFontSizeTokens;
281
+ declare const fontWeights: readonly [300, 400, 600, 700];
282
+ type FontWeight = (typeof fontWeights)[number];
283
+ declare const lineHeights: readonly [16, 20, 24, 28, 32, 40, 48, 56, 64];
284
+ type LineHeight = (typeof lineHeights)[number];
285
+ declare const letterSpacings: readonly ["0.0115rem", "-0.005rem"];
286
+ type LetterSpacing = (typeof letterSpacings)[number];
287
+ type FontParameters = readonly [
288
+ OakFontSizeToken,
289
+ LineHeight,
290
+ FontWeight,
291
+ LetterSpacing
292
+ ];
293
+ declare const oakFontTokens: Record<string, FontParameters>;
294
+ type OakFontToken = keyof typeof oakFontTokens;
295
+ declare const oakTextDecorations: readonly ["underline", "overline", "line-through", "none"];
296
+ declare const oakWhiteSpaces: readonly ["normal", "nowrap", "pre", "pre-wrap", "pre-line", "break-spaces"];
297
+ declare const oakWordWraps: readonly ["normal", "break-word", "initial", "inherit"];
298
+ declare const oakTextOverflows: readonly ["clip", "ellipsis"];
299
+ type OakTextDecoration = (typeof oakTextDecorations)[number];
300
+ type OakWhiteSpace = (typeof oakWhiteSpaces)[number];
301
+ type OakWordWrap = (typeof oakWordWraps)[number];
302
+ type OakTextOverflow = (typeof oakTextOverflows)[number];
303
+
304
+ type TypographyStyleProps = {
305
+ $font?: ResponsiveValues<OakFontToken>;
306
+ $textDecoration?: ResponsiveValues<OakTextDecoration>;
307
+ $textAlign?: ResponsiveValues<CSSProperties$1["textAlign"]>;
308
+ $whiteSpace?: ResponsiveValues<OakWhiteSpace>;
309
+ $wordWrap?: ResponsiveValues<OakWordWrap>;
310
+ $textOverflow?: ResponsiveValues<OakTextOverflow>;
311
+ };
312
+
313
+ declare const oakZIndexTokens: {
314
+ readonly behind: -1;
315
+ readonly neutral: 0;
316
+ readonly "in-front": 1;
317
+ readonly "mobile-filters": 2;
318
+ readonly "fixed-header": 100;
319
+ readonly "modal-close-button": 150;
320
+ readonly "modal-dialog": 300;
321
+ };
322
+ type OakZIndexToken = keyof typeof oakZIndexTokens | null;
323
+
324
+ type ZIndexStyleProps = {
325
+ $zIndex?: ResponsiveValues<OakZIndexToken>;
326
+ };
327
+
328
+ type HTMLProps$1 = {
329
+ onClick?: MouseEventHandler;
330
+ };
331
+ type OakBoxProps = {
332
+ children?: React.ReactNode;
333
+ } & PositionStyleProps & SizeStyleProps & SpacingStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & HTMLProps$1;
334
+ declare const oakBoxCss: styled_components.FlattenInterpolation<styled_components.ThemedStyledProps<OakBoxProps, styled_components.DefaultTheme>>;
335
+ declare const OakBox: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
336
+ children?: React.ReactNode;
337
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & HTMLProps$1, never>;
338
+
339
+ type FlexStyleProps = {
340
+ $flexDirection?: ResponsiveValues<CSSProperties["flexDirection"]>;
341
+ $flexWrap?: ResponsiveValues<CSSProperties["flexWrap"]>;
342
+ $alignItems?: ResponsiveValues<CSSProperties["alignItems"]>;
343
+ $alignContent?: ResponsiveValues<CSSProperties["alignContent"]>;
344
+ $justifyContent?: ResponsiveValues<CSSProperties["justifyContent"]>;
345
+ $alignSelf?: ResponsiveValues<CSSProperties["alignSelf"]>;
346
+ $flexGrow?: ResponsiveValues<CSSProperties["flexGrow"]>;
347
+ $flexShrink?: ResponsiveValues<CSSProperties["flexShrink"]>;
348
+ $order?: ResponsiveValues<CSSProperties["order"]>;
349
+ $flexBasis?: ResponsiveValues<OakAllSpacingToken | OakSpaceBetweenToken | null | undefined>;
350
+ $gap?: ResponsiveValues<OakAllSpacingToken | OakSpaceBetweenToken | null | undefined>;
351
+ $columnGap?: ResponsiveValues<OakAllSpacingToken | OakSpaceBetweenToken | null | undefined>;
352
+ $rowGap?: ResponsiveValues<OakAllSpacingToken | OakSpaceBetweenToken | null | undefined>;
353
+ };
354
+
355
+ type OakFlexProps = FlexStyleProps & OakBoxProps;
356
+ /**
357
+ * Flex sets `display: flex;` and exposes various flex props, along with Box
358
+ * props.
359
+ *
360
+ * ## Usage
361
+ * Before adding props to this component, think about whether it makes sense
362
+ * to add it to Box instead, as this component extends that.
363
+ */
364
+ declare const OakFlex: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
365
+ children?: React$1.ReactNode;
366
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
367
+ onClick?: React$1.MouseEventHandler | undefined;
368
+ } & FlexStyleProps, never>;
369
+
370
+ type OakSpanProps = ColorStyleProps & OpacityStyleProps & MarginStyleProps & PaddingStyleProps & BorderStyleProps & TypographyStyleProps;
371
+ /**
372
+ * Span renders a `span` (inline text) component, exposing all the typography props.
373
+ * ## Usage
374
+ * Use this component when you want to apply styles to a piece of inline text.
375
+ */
376
+ declare const OakSpan: styled_components.StyledComponent<"span", styled_components.DefaultTheme, ColorStyleProps & OpacityStyleProps & MarginStyleProps & PaddingStyleProps & BorderStyleProps & TypographyStyleProps, never>;
377
+
378
+ /**
379
+ *
380
+ * Inherit everything from OakBox, but change the element to a form.
381
+ *
382
+ */
383
+ declare const OakForm: styled_components.StyledComponent<"form", styled_components.DefaultTheme, {
384
+ children?: React$1.ReactNode;
385
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
386
+ onClick?: React$1.MouseEventHandler | undefined;
387
+ }, never>;
388
+ type OakFormProps = OakBoxProps;
389
+
390
+ type ColorFilterToken = ResponsiveValues<OakCombinedColorToken | null>;
391
+ type ColorFilterStyleProps = {
392
+ $colorFilter?: ColorFilterToken;
393
+ };
394
+
395
+ type HTMLProps = {
396
+ onClick?: MouseEventHandler;
397
+ };
398
+ type OakImageProps<C extends ElementType = typeof Image__default> = Omit<ImageProps$1, "placeholder"> & OakBoxProps & ColorFilterStyleProps & HTMLProps & {
399
+ as?: C;
400
+ /**
401
+ * The placeholder to use while the image is loading
402
+ *
403
+ * Defaults to `oak` which is a placeholder containing the Oak logo
404
+ * also accepts the same options as next/image */
405
+ placeholder?: ImageProps$1["placeholder"] | "oak";
406
+ /**
407
+ * Additional props forwarded to the underlying `Image` component `as`
408
+ */
409
+ imageProps?: Partial<ComponentPropsWithoutRef<C>>;
410
+ };
411
+ /**
412
+ * OakImage is a wrapper round next/image which adds convenience style
413
+ * props to the api
414
+ */
415
+ declare const OakImage: <C extends React__default.ElementType = React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref" | "width" | "height" | "alt" | "src" | "loading" | "srcSet"> & {
416
+ src: string | next_dist_shared_lib_get_img_props.StaticImport;
417
+ alt: string;
418
+ /**
419
+ * The placeholder to use while the image is loading
420
+ *
421
+ * Defaults to `oak` which is a placeholder containing the Oak logo
422
+ * also accepts the same options as next/image */
423
+ width?: number | `${number}` | undefined;
424
+ height?: number | `${number}` | undefined;
425
+ fill?: boolean | undefined;
426
+ loader?: Image.ImageLoader | undefined;
427
+ quality?: number | `${number}` | undefined;
428
+ priority?: boolean | undefined;
429
+ loading?: "eager" | "lazy" | undefined;
430
+ placeholder?: next_dist_shared_lib_get_img_props.PlaceholderValue | undefined;
431
+ blurDataURL?: string | undefined;
432
+ unoptimized?: boolean | undefined;
433
+ onLoadingComplete?: next_dist_shared_lib_get_img_props.OnLoadingComplete | undefined;
434
+ layout?: string | undefined;
435
+ objectFit?: string | undefined;
436
+ objectPosition?: string | undefined;
437
+ lazyBoundary?: string | undefined;
438
+ lazyRoot?: string | undefined;
439
+ } & React__default.RefAttributes<HTMLImageElement | null>>>({ ...props }: OakImageProps<C>) => React__default.JSX.Element;
440
+
441
+ type OakTypographyProps = OakBoxProps & TypographyStyleProps;
442
+ /**
443
+ * The Typography component sets a typography style context from which children
444
+ * inherit style properties through the cascade.
445
+ * ## Usage
446
+ * This should be the primary component to set a typography context.
447
+ * Use this component whenever you want to style blocks of 'body' text.
448
+ */
449
+ declare const OakTypography: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
450
+ children?: React$1.ReactNode;
451
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
452
+ onClick?: React$1.MouseEventHandler | undefined;
453
+ }, never>;
454
+
455
+ declare const oakHeadingTags: readonly ["div", "h1", "h2", "h3", "h4", "h5", "h6"];
456
+ type OakHeadingTag = (typeof oakHeadingTags)[number];
457
+ type OakHeadingTagProps = {
458
+ children?: React__default.ReactNode;
459
+ id?: string;
460
+ tag: OakHeadingTag;
461
+ ariaLabel?: string;
462
+ ariaHidden?: boolean;
463
+ };
464
+ declare const HeadingTagComponent: FC<OakHeadingTagProps>;
465
+ type OakHeadingProps = TypographyStyleProps & OakHeadingTagProps & ColorStyleProps & OpacityStyleProps & MarginStyleProps;
466
+ declare const OakHeading: styled_components.StyledComponent<React__default.FC<OakHeadingTagProps>, styled_components.DefaultTheme, TypographyStyleProps & OakHeadingTagProps & ColorStyleProps & OpacityStyleProps & MarginStyleProps, never>;
467
+
468
+ type OakPProps = MarginStyleProps & TypographyStyleProps & ColorStyleProps;
469
+ /**
470
+ * Styled `p` (paragraph) component.
471
+ * ## Usage
472
+ * In general, using a `p` as a descendant of `<Body>` should suffice.
473
+ * However, if you want different styles for a particular paragraph,
474
+ * you can use this component to apply additional styles.
475
+ */
476
+ declare const OakP: styled_components.StyledComponent<"p", styled_components.DefaultTheme, MarginStyleProps & TypographyStyleProps & ColorStyleProps, never>;
477
+
478
+ type OakULProps = OakBoxProps & {
479
+ $reset?: boolean;
480
+ };
481
+ /**
482
+ * Styled `ul` (unordered list) component.
483
+ *
484
+ * ## Usage
485
+ *
486
+ * Resets browser spacing and other styles, accepts BoxProps' style props.
487
+ *
488
+ * */
489
+ declare const OakUL: styled_components.StyledComponent<"ul", styled_components.DefaultTheme, {
490
+ children?: React$1.ReactNode;
491
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
492
+ onClick?: React$1.MouseEventHandler | undefined;
493
+ } & {
494
+ $reset?: boolean | undefined;
495
+ }, never>;
496
+
497
+ type OakOLProps = MarginStyleProps & ColorStyleProps & TypographyStyleProps;
498
+ /**
499
+ * Styled `ol` (ordered list) component.
500
+ *
501
+ * ## Usage
502
+ *
503
+ * Use where we have an ordered list to ensure numbers are styled
504
+ *
505
+ * */
506
+ declare const OakOL: styled_components.StyledComponent<"ol", styled_components.DefaultTheme, MarginStyleProps & ColorStyleProps & TypographyStyleProps, never>;
507
+
508
+ type ListStyleProps = {
509
+ $listStyle?: ResponsiveValues<CSSProperties$1["listStyle"]>;
510
+ };
511
+
512
+ type OakLIProps = OakFlexProps & TypographyStyleProps & ListStyleProps & DisplayStyleProps;
513
+ /**
514
+ * Styled `li` (list item) component.
515
+ *
516
+ * ## Usage
517
+ *
518
+ * Places where we directly want to style a list item
519
+ *
520
+ **/
521
+ declare const OakLI: styled_components.StyledComponent<"li", styled_components.DefaultTheme, FlexStyleProps & {
522
+ children?: React$1.ReactNode;
523
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
524
+ onClick?: React$1.MouseEventHandler | undefined;
525
+ } & ListStyleProps, never>;
526
+
527
+ type OakLabelProps = TypographyStyleProps & ColorStyleProps;
528
+ /**
529
+ * Label renders a `label` element, exposing all the typography props.
530
+ * ## Usage
531
+ * Use this component when you want to apply styles to a label, likely within
532
+ * a form.
533
+ */
534
+ declare const OakLabel: styled_components.StyledComponent<"label", styled_components.DefaultTheme, TypographyStyleProps & ColorStyleProps, never>;
535
+
536
+ declare const oakIconNames: readonly ["home", "send", "rocket", "video", "edit", "hamburger", "cross", "bell", "twitter", "worksheet", "facebook", "share", "arrow-right", "worksheet-3", "chevron-right", "save", "quiz-3", "chevron-down", "linkedin", "magic-carpet", "books", "supervision-level", "quiz-white", "arrow-left", "additional-material", "slide-deck-3", "sign-language", "external", "equipment-required", "chevron-left", "download", "search", "chevron-up", "go", "copyright", "arrow-down", "project", "quiz", "slide-deck", "content-guidance", "tick", "instagram", "dot", "dot-png", "warning", "lightbulb", "lightbulb-yellow", "intro"];
537
+ type OakIconName = (typeof oakIconNames)[number];
538
+ type OakIconProps = Omit<OakImageProps, "alt" | "src"> & {
539
+ iconName: OakIconName;
540
+ alt?: string;
541
+ };
542
+ declare const OakIcon: (props: OakIconProps) => React__default.JSX.Element;
543
+
544
+ declare const oakDefaultTheme: OakTheme;
545
+
546
+ type OakGridProps = OakBoxProps & {
547
+ $rg?: ResponsiveValues<OakCombinedSpacingToken>;
548
+ $cg?: ResponsiveValues<OakCombinedSpacingToken>;
549
+ $gridAutoRows?: ResponsiveValues<"1fr">;
550
+ $gridTemplateAreas?: ResponsiveValues<string>;
551
+ $gridTemplateColumns?: ResponsiveValues<string>;
552
+ };
553
+ declare const OakGrid: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
554
+ children?: React$1.ReactNode;
555
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
556
+ onClick?: React$1.MouseEventHandler | undefined;
557
+ } & {
558
+ $rg?: ResponsiveValues<OakCombinedSpacingToken> | undefined;
559
+ $cg?: ResponsiveValues<OakCombinedSpacingToken> | undefined;
560
+ $gridAutoRows?: ResponsiveValues<"1fr"> | undefined;
561
+ $gridTemplateAreas?: ResponsiveValues<string> | undefined;
562
+ $gridTemplateColumns?: ResponsiveValues<string> | undefined;
563
+ }, never>;
564
+
565
+ type ColRowSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
566
+ type OakGridAreaProps = {
567
+ /**
568
+ * Determines the number of columns the element should span.
569
+ */
570
+ $colSpan: ResponsiveValues<ColRowSpan>;
571
+ /**
572
+ * Determines the number of rows the element should span.
573
+ */
574
+ $rowSpan?: ResponsiveValues<ColRowSpan>;
575
+ $order?: ResponsiveValues<number>;
576
+ /**
577
+ * The start column of the element.
578
+ */
579
+ $colStart?: ResponsiveValues<ColRowSpan>;
580
+ $colEnd?: ResponsiveValues<ColRowSpan>;
581
+ /**
582
+ * The start row of the element.
583
+ */
584
+ $rowStart?: ResponsiveValues<ColRowSpan>;
585
+ } & SpacingStyleProps;
586
+ /**
587
+ *
588
+ * OakGridArea is a flex container that should be used inside OakGrid.
589
+ *
590
+ * - There is no nesting of OakGridAreas
591
+ * - Column and row arrangements are achieved through $colSpan, $rowSpan, $colStart, $colEnd, $rowStart, $rowEnd
592
+ *
593
+ */
594
+ declare const OakGridArea: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
595
+ children?: React$1.ReactNode;
596
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
597
+ onClick?: React$1.MouseEventHandler | undefined;
598
+ } & FlexStyleProps & {
599
+ /**
600
+ * Determines the number of columns the element should span.
601
+ */
602
+ $colSpan: ResponsiveValues<ColRowSpan>;
603
+ /**
604
+ * Determines the number of rows the element should span.
605
+ */
606
+ $rowSpan?: ResponsiveValues<ColRowSpan> | undefined;
607
+ $order?: ResponsiveValues<number> | undefined;
608
+ /**
609
+ * The start column of the element.
610
+ */
611
+ $colStart?: ResponsiveValues<ColRowSpan> | undefined;
612
+ $colEnd?: ResponsiveValues<ColRowSpan> | undefined;
613
+ /**
614
+ * The start row of the element.
615
+ */
616
+ $rowStart?: ResponsiveValues<ColRowSpan> | undefined;
617
+ }, never>;
618
+
619
+ type OakThemeProviderProps = {
620
+ theme: OakTheme;
621
+ children: React__default.ReactNode;
622
+ };
623
+ declare const OakThemeProvider: ({ theme, children, }: OakThemeProviderProps) => React__default.JSX.Element;
624
+
625
+ declare const OakMaxWidth: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
626
+ children?: React$1.ReactNode;
627
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
628
+ onClick?: React$1.MouseEventHandler | undefined;
629
+ } & FlexStyleProps, never>;
630
+
631
+ type OakCloudinaryImageProps = Omit<OakImageProps<typeof CldImage>, "src" | "imageProps"> & {
632
+ /**
633
+ * The cloudinary image id or the full cloudinary URL
634
+ *
635
+ * Usually in the format `v1234567890/image.jpg`
636
+ */
637
+ cloudinaryId: string;
638
+ };
639
+ /**
640
+ * Provides a Cloudinary config to all descendent `OakCloudinaryImage` elements.
641
+ *
642
+ * See https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters
643
+ * for documentation of the config object.
644
+ */
645
+ declare const OakCloudinaryConfigProvider: React__default.Provider<_cloudinary_util_url_loader_dist_schema_UX7RRFIR.g | undefined>;
646
+ /**
647
+ * OakCloudinaryImage wraps OakImage providing responsive images from Cloudinary
648
+ * based on the `sizes` prop.
649
+ *
650
+ * Cloudinary cloud name can be set globally with `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME` or a config
651
+ * can be passed with `OakCloudinaryConfigProvider`.
652
+ */
653
+ declare const OakCloudinaryImage: ({ cloudinaryId, unoptimized, ...props }: OakCloudinaryImageProps) => React__default.JSX.Element;
654
+
655
+ type OakFieldErrorProps = {
656
+ children?: React__default.ReactNode;
657
+ };
658
+ declare const OakFieldError: (props: OakFieldErrorProps) => React__default.JSX.Element | null;
659
+
660
+ type OakLoadingSpinnerProps = Pick<SizeStyleProps, "$width"> & ColorStyleProps & {
661
+ loaderColor?: OakCombinedColorToken;
662
+ };
663
+ declare const OakLoadingSpinner: (props: OakLoadingSpinnerProps) => React__default.JSX.Element;
664
+
665
+ type StyledButtonProps = TypographyStyleProps & SpacingStyleProps & ColorStyleProps & DisplayStyleProps & BorderStyleProps & DropShadowStyleProps & {
666
+ isLoading?: boolean;
667
+ };
668
+ type InternalButtonProps = StyledButtonProps & {
669
+ onClick?: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
670
+ onHovered?: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;
671
+ children?: React__default.ReactNode;
672
+ className?: string;
673
+ disabled?: boolean;
674
+ "data-testid"?: string;
675
+ type?: "button" | "submit" | "reset";
676
+ form?: string;
677
+ };
678
+
679
+ type InternalRectButtonProps = Omit<InternalButtonProps, "$pa" | "$ph" | "$pv" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color"> & {
680
+ iconName?: OakIconName;
681
+ isTrailingIcon?: boolean;
682
+ defaultTextColor: OakCombinedColorToken;
683
+ defaultBackground: OakCombinedColorToken;
684
+ defaultBorderColor: OakCombinedColorToken;
685
+ hoverTextColor: OakCombinedColorToken;
686
+ hoverBackground: OakCombinedColorToken;
687
+ hoverBorderColor: OakCombinedColorToken;
688
+ disabledBackground: OakCombinedColorToken;
689
+ disabledBorderColor: OakCombinedColorToken;
690
+ disabledTextColor: OakCombinedColorToken;
691
+ width?: SizeStyleProps["$width"];
692
+ maxWidth?: SizeStyleProps["$maxWidth"];
693
+ } & PositionStyleProps;
694
+
695
+ type OakPrimaryButtonProps = Pick<InternalRectButtonProps, "children" | "className" | "data-testid" | "onClick" | "onHovered" | "disabled" | "isLoading" | "iconName" | "isTrailingIcon" | "type" | "width" | "maxWidth" | "form">;
696
+ declare const OakPrimaryButton: (props: OakPrimaryButtonProps) => React__default.JSX.Element;
697
+
698
+ type OakSecondaryButtonProps = Pick<InternalRectButtonProps, "children" | "className" | "data-testid" | "onClick" | "onHovered" | "disabled" | "isLoading" | "iconName" | "isTrailingIcon" | "type" | "width" | "maxWidth" | "form">;
699
+ declare const OakSecondaryButton: (props: OakSecondaryButtonProps) => React__default.JSX.Element;
700
+
701
+ type ImageProps = OakImageProps & {
702
+ iconName?: undefined;
703
+ };
704
+ type IconProps = OakIconProps & {
705
+ src?: undefined;
706
+ };
707
+ type OakRoundIconProps = IconProps | ImageProps;
708
+ /**
709
+ * A wrapper around `OakIcon` which applies a rounded background.
710
+ * Supports either an icon name or an image src
711
+ */
712
+ declare const OakRoundIcon: ({ $background, $borderRadius, $width, $height, $pa, className, ...rest }: OakRoundIconProps) => React__default.JSX.Element;
713
+
714
+ type OakTertiaryButtonProps = InternalButtonProps & {
715
+ iconBackground?: OakRoundIconProps["$background"];
716
+ iconColorFilter?: OakRoundIconProps["$colorFilter"];
717
+ isTrailingIcon?: boolean;
718
+ iconName?: OakIconName;
719
+ };
720
+ /**
721
+ * An implementation of InternalRoundButton, its a subtle button with no border and a round icon.
722
+ */
723
+ declare const OakTertiaryButton: ({ isTrailingIcon, iconName, children, disabled, ...props }: OakTertiaryButtonProps) => React__default.JSX.Element;
724
+
725
+ type RadioButtonLabelProps = {
726
+ $labelAlignItems?: FlexStyleProps["$alignItems"];
727
+ $labelGap?: FlexStyleProps["$gap"];
728
+ disabled?: boolean;
729
+ } & OakLabelProps;
730
+ type OakRadioButtonProps = {
731
+ id: string;
732
+ label: ReactNode;
733
+ value: string;
734
+ tabIndex?: number;
735
+ "data-testid"?: string;
736
+ disabled?: boolean;
737
+ /**
738
+ * Allows the focus ring to be disabled. This is useful when focus is indicated
739
+ * by other means, such as a border or background color change.
740
+ */
741
+ disableFocusRing?: boolean;
742
+ /**
743
+ * Allows the size of the radio button to be customized.
744
+ */
745
+ radioOuterSize?: OakAllSpacingToken;
746
+ /**
747
+ * Allows the size of the inner "checked" circle of the radio button to be customized.
748
+ */
749
+ radioInnerSize?: OakAllSpacingToken;
750
+ /**
751
+ * Allows the width of the radio button border to be customized.
752
+ */
753
+ radioBorderWidth?: OakBorderWidthToken;
754
+ /**
755
+ * Allows the width of the radio button border to be customized when the radio button is checked.
756
+ */
757
+ checkedRadioBorderWidth?: OakBorderWidthToken;
758
+ } & OakBoxProps & RadioButtonLabelProps;
759
+ declare const OakRadioButton: React__default.ForwardRefExoticComponent<{
760
+ id: string;
761
+ label: ReactNode;
762
+ value: string;
763
+ tabIndex?: number | undefined;
764
+ "data-testid"?: string | undefined;
765
+ disabled?: boolean | undefined;
766
+ /**
767
+ * Allows the focus ring to be disabled. This is useful when focus is indicated
768
+ * by other means, such as a border or background color change.
769
+ */
770
+ disableFocusRing?: boolean | undefined;
771
+ /**
772
+ * Allows the size of the radio button to be customized.
773
+ */
774
+ radioOuterSize?: "all-spacing-0" | "all-spacing-1" | "all-spacing-2" | "all-spacing-3" | "all-spacing-4" | "all-spacing-5" | "all-spacing-6" | "all-spacing-7" | "all-spacing-9" | "all-spacing-10" | "all-spacing-12" | "all-spacing-13" | "all-spacing-8" | "all-spacing-11" | "all-spacing-14" | "all-spacing-15" | "all-spacing-16" | "all-spacing-17" | "all-spacing-18" | "all-spacing-19" | "all-spacing-20" | "all-spacing-21" | "all-spacing-22" | "all-spacing-23" | "all-spacing-24" | undefined;
775
+ /**
776
+ * Allows the size of the inner "checked" circle of the radio button to be customized.
777
+ */
778
+ radioInnerSize?: "all-spacing-0" | "all-spacing-1" | "all-spacing-2" | "all-spacing-3" | "all-spacing-4" | "all-spacing-5" | "all-spacing-6" | "all-spacing-7" | "all-spacing-9" | "all-spacing-10" | "all-spacing-12" | "all-spacing-13" | "all-spacing-8" | "all-spacing-11" | "all-spacing-14" | "all-spacing-15" | "all-spacing-16" | "all-spacing-17" | "all-spacing-18" | "all-spacing-19" | "all-spacing-20" | "all-spacing-21" | "all-spacing-22" | "all-spacing-23" | "all-spacing-24" | undefined;
779
+ /**
780
+ * Allows the width of the radio button border to be customized.
781
+ */
782
+ radioBorderWidth?: "border-solid-none" | "border-solid-s" | "border-solid-m" | "border-solid-l" | "border-solid-xl" | undefined;
783
+ /**
784
+ * Allows the width of the radio button border to be customized when the radio button is checked.
785
+ */
786
+ checkedRadioBorderWidth?: "border-solid-none" | "border-solid-s" | "border-solid-m" | "border-solid-l" | "border-solid-xl" | undefined;
787
+ } & {
788
+ children?: React__default.ReactNode;
789
+ } & PositionStyleProps & SizeStyleProps & PaddingStyleProps & MarginStyleProps & ColorStyleProps & BorderStyleProps & DisplayStyleProps & DropShadowStyleProps & OpacityStyleProps & TransformStyleProps & TransitionStyleProps & TypographyStyleProps & ZIndexStyleProps & {
790
+ onClick?: React__default.MouseEventHandler | undefined;
791
+ } & {
792
+ $labelAlignItems?: FlexStyleProps["$alignItems"];
793
+ $labelGap?: FlexStyleProps["$gap"];
794
+ disabled?: boolean | undefined;
795
+ } & React__default.RefAttributes<HTMLInputElement>>;
796
+
797
+ type OakRadioGroupProps = {
798
+ label?: string;
799
+ name: string;
800
+ disabled?: boolean;
801
+ children: React__default.ReactNode;
802
+ onChange?: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
803
+ /**
804
+ * Sets the value of the radio group
805
+ * for use as a controlled component
806
+ */
807
+ value?: string;
808
+ /**
809
+ * Sets the initial value of the radio group
810
+ * for use as an uncontrolled component
811
+ */
812
+ defaultValue?: string;
813
+ } & Pick<TypographyStyleProps, "$font"> & ColorStyleProps & Pick<FlexStyleProps, "$flexDirection" | "$alignItems" | "$gap">;
814
+ declare const OakRadioGroup: (props: OakRadioGroupProps) => React__default.JSX.Element;
815
+
816
+ /**
817
+ *
818
+ * These components can be used with InternalCheckBoxWrapper which allows for customisable icons
819
+ *
820
+ * Several flavours of checkbox are created here:
821
+ * - Default
822
+ * - Hover decorations
823
+ * - Focus decorations
824
+ * - Hover + Focus decorations
825
+ *
826
+ * As they are styled components they can be further customised in implementation. Alternatively additional
827
+ * components can be created here.
828
+ *
829
+ */
830
+ type BaseCheckBoxProps = {
831
+ id: string;
832
+ disabled?: boolean;
833
+ value: string;
834
+ defaultChecked?: boolean;
835
+ onHovered?: (value: string, id: string, duration: number) => void;
836
+ onChange?: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
837
+ onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
838
+ onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
839
+ "data-testid"?: string;
840
+ };
841
+
842
+ type InternalCheckBoxLabelProps = {
843
+ labelAlignItems?: FlexStyleProps["$alignItems"];
844
+ labelGap?: FlexStyleProps["$gap"];
845
+ disabled?: boolean;
846
+ "data-testid"?: string;
847
+ } & OakLabelProps;
848
+
849
+ type OakCheckBoxProps = BaseCheckBoxProps & {
850
+ checkboxSize?: OakAllSpacingToken;
851
+ checkboxBorder?: OakBorderWidthToken;
852
+ checkboxBorderRadius?: OakBorderRadiusToken;
853
+ checkedIcon?: React__default.JSX.Element;
854
+ checkedBackgroundFill?: boolean;
855
+ hoverBorderRadius?: OakBorderRadiusToken;
856
+ iconPadding?: OakInnerPaddingToken;
857
+ defaultColor?: OakCombinedColorToken;
858
+ disabledColor?: OakCombinedColorToken;
859
+ displayValue?: string;
860
+ } & InternalCheckBoxLabelProps;
861
+ declare const OakCheckBox: (props: OakCheckBoxProps) => React__default.JSX.Element;
862
+
863
+ type StyledInputProps = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & SpacingStyleProps & SizeStyleProps;
864
+ type InternalTextInputProps = Omit<StyledInputProps, "placeholder"> & {
865
+ /**
866
+ * A textual hint or example to display before a value has been entered
867
+ */
868
+ placeholder?: string;
869
+ /**
870
+ * Fired only when the input is focused for the first time
871
+ */
872
+ onInitialFocus?: (e: FocusEvent<HTMLInputElement>) => void;
873
+ };
874
+
875
+ type OakTextInputProps = {
876
+ /**
877
+ * Disables user input and updates the appearance accordingly.
878
+ */
879
+ disabled?: boolean;
880
+ /**
881
+ * Makes the input read-only. Preventing the user from changing the value.
882
+ */
883
+ readOnly?: boolean;
884
+ /**
885
+ * Sets the value. Use this in controlled components;
886
+ */
887
+ value?: string;
888
+ /**
889
+ * Sets the initial value. Use this for an uncontrolled component;
890
+ */
891
+ defaultValue?: string;
892
+ /**
893
+ * Used to target the input element in tests.
894
+ */
895
+ "data-testid"?: string;
896
+ onChange?: ChangeEventHandler<HTMLInputElement>;
897
+ /**
898
+ * Alters the appearance of the input field to indicate whether the input is valid or invalid.
899
+ */
900
+ validity?: "valid" | "invalid";
901
+ /**
902
+ * Adds an icon to the input
903
+ *
904
+ * Defaults to the start of the input
905
+ */
906
+ iconName?: OakIconName;
907
+ /**
908
+ * Position the icon at the end of the input
909
+ */
910
+ isTrailingIcon?: boolean;
911
+ iconColor?: OakCombinedColorToken;
912
+ validBorderColor?: OakCombinedColorToken;
913
+ invalidBorderColor?: OakCombinedColorToken;
914
+ validIconColor?: OakCombinedColorToken;
915
+ invalidIconColor?: OakCombinedColorToken;
916
+ color?: OakCombinedColorToken;
917
+ hoverBackground?: OakCombinedColorToken;
918
+ background?: OakCombinedColorToken;
919
+ borderColor?: OakCombinedColorToken;
920
+ focusRingDropShadows?: OakDropShadowToken[];
921
+ disabledBackgroundColor?: OakCombinedColorToken;
922
+ readOnlyBorderColor?: OakCombinedColorToken;
923
+ disabledColor?: OakCombinedColorToken;
924
+ readOnlyColor?: OakCombinedColorToken;
925
+ width?: SizeStyleProps["$width"];
926
+ maxWidth?: SizeStyleProps["$maxWidth"];
927
+ iconAlt?: string;
928
+ } & InternalTextInputProps;
929
+ /**
930
+ * Default input which can be extended to create specialised inputs.
931
+ */
932
+ declare const OakTextInput: ({ type, borderColor, readOnlyBorderColor, focusRingDropShadows, background, hoverBackground, disabledBackgroundColor, color, disabledColor, readOnlyColor, validity, iconColor, validBorderColor, invalidBorderColor, validIconColor, invalidIconColor, iconName, iconAlt, isTrailingIcon, width, maxWidth, ...props }: OakTextInputProps) => React__default.JSX.Element;
933
+
934
+ type InternalTooltipProps = OakFlexProps & {
935
+ isOpen: boolean;
936
+ tooltip: ReactNode;
937
+ children?: ReactNode;
938
+ };
939
+
940
+ /**
941
+ * A tooltip with oven-ready styling
942
+ */
943
+ declare const OakTooltip: ({ ...props }: Pick<InternalTooltipProps, "isOpen" | "tooltip" | "children">) => React__default.JSX.Element;
944
+
945
+ type OakBackLinkProps<C extends ElementType> = {
946
+ as?: C;
947
+ label?: string;
948
+ } & ComponentPropsWithoutRef<C>;
949
+ /**
950
+ * Used to navigate the user back to the previous page in the app.
951
+ *
952
+ * Polymorphic rendering as any HTML element or component using `as` — defaults to `a`.
953
+ *
954
+ * E.g.
955
+ *
956
+ * * Default (Anchor) `<OakBackLink href="https://www.thenational.academy/" />`
957
+ * * Button `<OakBackLink as="button" onClick={() => goBack(-1)} />`
958
+ */
959
+ declare const OakBackLink: <C extends React__default.ElementType = "a">({ as, label, ...props }: OakBackLinkProps<C>) => React__default.JSX.Element;
960
+
961
+ type OakBulletListProps = {
962
+ listItems: string[];
963
+ } & OakSpanProps;
964
+ declare const OakBulletList: (props: OakBulletListProps) => React__default.JSX.Element;
965
+
966
+ type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, "defaultChecked"> & {
967
+ feedback?: "correct" | "incorrect" | null;
968
+ image?: React__default.JSX.Element;
969
+ innerRef?: React__default.RefObject<HTMLInputElement>;
970
+ displayValue?: string;
971
+ };
972
+ declare const OakQuizCheckBox: (props: OakQuizCheckBoxProps) => React__default.JSX.Element;
973
+
974
+ type OakQuizTextInputProps = Omit<OakTextInputProps, "validity" | "iconName" | "iconAlt" | "isTrailingIcon"> & {
975
+ /**
976
+ * Alters the appearance of the input to indicate whether or not a correct answer was given.
977
+ * Also sets the input to read-only.
978
+ */
979
+ feedback?: "correct" | "incorrect" | null;
980
+ };
981
+ declare const OakQuizTextInput: ({ feedback, readOnly, ...props }: OakQuizTextInputProps) => React__default.JSX.Element;
982
+
983
+ type OakQuizRadioButtonProps = OakRadioButtonProps & {
984
+ feedback?: "correct" | "incorrect" | null;
985
+ image?: JSX.Element;
986
+ };
987
+ declare const OakQuizRadioButton: (props: OakQuizRadioButtonProps) => React__default.JSX.Element;
988
+
989
+ type OakQuizHintProps = {
990
+ /**
991
+ * Some content to give as a hint to answer a question
992
+ */
993
+ hint: ReactNode;
994
+ };
995
+ /**
996
+ * Presents a button which will show a hint when clicked
997
+ */
998
+ declare const OakQuizHint: ({ hint }: OakQuizHintProps) => React__default.JSX.Element;
999
+
1000
+ type OakQuizFeedbackProps = {
1001
+ /**
1002
+ * Feedback for an answer
1003
+ * `partially-correct` can be used to feedback on a multi-answer MCQ where some
1004
+ * correct options were not selected and/or some incorrect answers were selected
1005
+ */
1006
+ feedback: "correct" | "incorrect" | "partially-correct";
1007
+ /**
1008
+ * Some additional content to present with the feedback.
1009
+ * This is likely the correct answer(s) to the question or some praise.
1010
+ *
1011
+ * Only displayed when `feedback` has been applied.
1012
+ */
1013
+ answerFeedback?: ReactNode;
1014
+ };
1015
+ /**
1016
+ * Gives feedback after a question has been answered
1017
+ */
1018
+ declare const OakQuizFeedback: ({ feedback, answerFeedback, }: OakQuizFeedbackProps) => React__default.JSX.Element;
1019
+
1020
+ type OakLessonBottomNavProps = {
1021
+ children?: ReactNode;
1022
+ feedback?: OakQuizFeedbackProps["feedback"] | null;
1023
+ answerFeedback?: OakQuizFeedbackProps["answerFeedback"];
1024
+ hint?: OakQuizHintProps["hint"];
1025
+ };
1026
+ /**
1027
+ * Renders feedback for an answer and onward navigation buttons to continue the lesson
1028
+ */
1029
+ declare const OakLessonBottomNav: ({ hint, feedback, answerFeedback, children, }: OakLessonBottomNavProps) => React__default.JSX.Element;
1030
+
1031
+ type LessonSectionName$1 = "intro" | "starter-quiz" | "video" | "exit-quiz";
1032
+ type OakLessonTopNavProps = {
1033
+ lessonSectionName: LessonSectionName$1;
1034
+ /**
1035
+ * Slot to render `OakBackLink` or similar
1036
+ */
1037
+ backLinkSlot: ReactNode;
1038
+ heading: ReactNode;
1039
+ /**
1040
+ * Displayed at the mobile breakpoint where the counter is not rendered.
1041
+ * Provides alternative content for the counter/progress in the lesson.
1042
+ */
1043
+ mobileSummary: ReactNode;
1044
+ /**
1045
+ * Slot to render `OakQuizCounter` or similar
1046
+ */
1047
+ counterSlot?: ReactNode;
1048
+ };
1049
+ /**
1050
+ * Controls for navigating back and displaying progress in a lesson
1051
+ */
1052
+ declare const OakLessonTopNav: ({ lessonSectionName, backLinkSlot, counterSlot, heading, mobileSummary, }: OakLessonTopNavProps) => React__default.JSX.Element;
1053
+
1054
+ type OakQuizCounterProps = {
1055
+ counter: number;
1056
+ total: number;
1057
+ };
1058
+ declare const OakQuizCounter: (props: OakQuizCounterProps) => React__default.JSX.Element;
1059
+
1060
+ type LessonSectionName = "overview" | "intro" | "starter-quiz" | "video" | "exit-quiz" | "review";
1061
+ type OakLessonLayoutProps = {
1062
+ lessonSectionName: LessonSectionName;
1063
+ topNavSlot: ReactNode;
1064
+ bottomNavSlot: ReactNode;
1065
+ children: ReactNode;
1066
+ };
1067
+ /**
1068
+ * Provides overall page layout and colours for the sections of a lesson.
1069
+ */
1070
+ declare const OakLessonLayout: ({ lessonSectionName, topNavSlot, bottomNavSlot, children, }: OakLessonLayoutProps) => React__default.JSX.Element;
1071
+
1072
+ type OakHintButtonProps = {
1073
+ isOpen: boolean;
1074
+ onClick?: MouseEventHandler;
1075
+ isLoading?: boolean;
1076
+ disabled?: boolean;
1077
+ };
1078
+ declare const OakHintButton: (props: OakHintButtonProps) => React__default.JSX.Element;
1079
+
1080
+ type BaseOakLessonNavItemProps<C extends ElementType> = {
1081
+ as?: C;
1082
+ /**
1083
+ * Disable the section preventing navigation to it.
1084
+ */
1085
+ disabled?: boolean;
1086
+ } & ComponentPropsWithoutRef<C>;
1087
+ type QuizSectionProps = {
1088
+ lessonSectionName: "starter-quiz" | "exit-quiz";
1089
+ /**
1090
+ * The number of questions in the quiz
1091
+ */
1092
+ numQuestions: number;
1093
+ /**
1094
+ * The number of questions answered correctly
1095
+ */
1096
+ grade: number;
1097
+ };
1098
+ type VideoSectionProps = {
1099
+ lessonSectionName: "video";
1100
+ /**
1101
+ * The length of the video in minutes
1102
+ */
1103
+ videoLength: number;
1104
+ };
1105
+ type IntroSectionProps = {
1106
+ lessonSectionName: "intro";
1107
+ };
1108
+ type SectionProps = {
1109
+ /**
1110
+ * Denotes the progress in the lesson section
1111
+ */
1112
+ progress: "not-started" | "in-progress" | "complete";
1113
+ } & (IntroSectionProps | QuizSectionProps | VideoSectionProps);
1114
+ type OakLessonNavItemProps<C extends ElementType> = BaseOakLessonNavItemProps<C> & SectionProps;
1115
+ /**
1116
+ * Enables navigation to the given section of a lesson as well as displaying current progress
1117
+ */
1118
+ declare const OakLessonNavItem: <C extends React__default.ElementType = "a">(props: OakLessonNavItemProps<C>) => React__default.JSX.Element;
1119
+
1120
+ export { HeadingTagComponent, type OakAllSpacingToken, OakBackLink, type OakBackLinkProps, type OakBorderRadiusToken, type OakBorderWidthToken, OakBox, type OakBoxProps, OakBulletList, type OakBulletListProps, OakCheckBox, type OakCheckBoxProps, OakCloudinaryConfigProvider, OakCloudinaryImage, type OakCloudinaryImageProps, type OakColorToken, type OakCombinedColorToken, type OakCombinedSpacingToken, type OakDropShadowToken, OakFieldError, type OakFieldErrorProps, OakFlex, type OakFlexProps, type OakFontSizeToken, type OakFontToken, OakForm, type OakFormProps, OakGrid, OakGridArea, type OakGridAreaProps, type OakGridProps, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, type OakInnerPaddingToken, OakLI, type OakLIProps, OakLabel, type OakLabelProps, OakLessonBottomNav, type OakLessonBottomNavProps, OakLessonLayout, type OakLessonLayoutProps, OakLessonNavItem, type OakLessonNavItemProps, OakLessonTopNav, type OakLessonTopNavProps, OakLoadingSpinner, type OakLoadingSpinnerProps, OakMaxWidth, OakOL, type OakOLProps, type OakOpacityToken, OakP, type OakPProps, OakPrimaryButton, type OakPrimaryButtonProps, OakQuizCheckBox, type OakQuizCheckBoxProps, OakQuizCounter, type OakQuizCounterProps, OakQuizFeedback, type OakQuizFeedbackProps, OakQuizHint, type OakQuizHintProps, OakQuizRadioButton, type OakQuizRadioButtonProps, OakQuizTextInput, OakRadioButton, OakRadioGroup, OakRoundIcon, type OakRoundIconProps, OakSecondaryButton, type OakSecondaryButtonProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakTertiaryButton, OakTextInput, type OakTextInputProps, type OakTheme, OakThemeProvider, type OakThemeProviderProps, OakTooltip, type OakTransitionToken, OakTypography, type OakTypographyProps, OakUL, type OakULProps, type OakUiRoleToken, oakAllSpacingTokens, oakBorderRadiusTokens, oakBorderWidthTokens, oakBoxCss, oakColorTokens, oakDefaultTheme, oakDropShadowTokens, oakFontSizeTokens, oakFontTokens, oakHeadingTags, oakIconNames, oakInnerPaddingTokens, oakOpacityTokens, oakSpaceBetweenTokens, oakTransitionTokens, oakUiRoleTokens };