@cruk/cruk-react-components 3.5.1 → 4.0.1
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/lib/components/AddressLookup/AddressLookup.stories.d.ts +2 -2
- package/lib/components/AddressLookup/index.d.ts +2 -2
- package/lib/components/AllThemesWrapper.d.ts +3 -3
- package/lib/components/Avatar/Avatar.stories.d.ts +2 -1
- package/lib/components/Avatar/index.d.ts +2 -2
- package/lib/components/Badge/Badge.stories.d.ts +2 -1
- package/lib/components/Badge/index.d.ts +2 -2
- package/lib/components/Button/Button.stories.d.ts +2 -2
- package/lib/components/Button/index.d.ts +2 -2
- package/lib/components/Carousel/Carousel.stories.d.ts +2 -2
- package/lib/components/Carousel/Dots.d.ts +4 -4
- package/lib/components/Carousel/index.d.ts +2 -2
- package/lib/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/lib/components/Checkbox/index.d.ts +2 -2
- package/lib/components/Collapse/Collapse.stories.d.ts +2 -1
- package/lib/components/Collapse/styles.d.ts +3 -3
- package/lib/components/DateField/DateField.stories.d.ts +2 -1
- package/lib/components/DateField/index.d.ts +2 -2
- package/lib/components/DateField/styles.d.ts +1 -0
- package/lib/components/Divider.d.ts +2 -2
- package/lib/components/Footer/Footer.stories.d.ts +3 -2
- package/lib/components/Footer/index.d.ts +2 -2
- package/lib/components/Header/Header.stories.d.ts +3 -2
- package/lib/components/Header/index.d.ts +2 -2
- package/lib/components/Heading/Heading.stories.d.ts +2 -1
- package/lib/components/Heading/index.d.ts +2 -2
- package/lib/components/IconFa/IconFa.stories.d.ts +2 -1
- package/lib/components/IconFa/index.d.ts +2 -1
- package/lib/components/InfoBox/InfoBox.stories.d.ts +1 -1
- package/lib/components/LabelWrapper/index.d.ts +2 -2
- package/lib/components/LabelWrapper/styles.d.ts +6 -1
- package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +2 -1
- package/lib/components/LegendWrapper/index.d.ts +2 -2
- package/lib/components/Link/Link.stories.d.ts +2 -2
- package/lib/components/Link/index.d.ts +2 -2
- package/lib/components/Link/styles.d.ts +3 -6
- package/lib/components/Loader/Loader.stories.d.ts +2 -1
- package/lib/components/Loader/index.d.ts +2 -1
- package/lib/components/Modal/Modal.stories.d.ts +2 -3
- package/lib/components/Modal/index.d.ts +2 -2
- package/lib/components/Modal/styles.d.ts +2 -2
- package/lib/components/Pagination/Pagination.stories.d.ts +2 -1
- package/lib/components/Pagination/index.d.ts +2 -2
- package/lib/components/PopOver/Popover.stories.d.ts +4 -3
- package/lib/components/PopOver/index.d.ts +2 -2
- package/lib/components/ProgressBar/ProgressBar.stories.d.ts +2 -1
- package/lib/components/ProgressBar/index.d.ts +2 -2
- package/lib/components/Radio/Radio.stories.d.ts +2 -2
- package/lib/components/Radio/index.d.ts +2 -2
- package/lib/components/RadioConsent/styles.d.ts +3 -3
- package/lib/components/Text/index.d.ts +3 -1
- package/lib/components/Text/styles.d.ts +2 -0
- package/lib/components/Totaliser/Totaliser.stories.d.ts +2 -1
- package/lib/components/Totaliser/index.d.ts +2 -2
- package/lib/components/Totaliser/styles.d.ts +1 -1
- package/lib/components/UserBlock/UserBlock.stories.d.ts +2 -1
- package/lib/components/UserBlock/index.d.ts +2 -2
- package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
- package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
- package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/commands.js +2 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/commands.js.map +1 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js +2 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js +2 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js.map +1 -1
- package/lib/es/node_modules/react-intersection-observer/index.mjs.js.map +1 -1
- package/lib/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
- package/lib/es/src/components/Avatar/styles.js +1 -1
- package/lib/es/src/components/Button/styles.js +1 -1
- package/lib/es/src/components/Checkbox/index.js +1 -1
- package/lib/es/src/components/Checkbox/styles.js +1 -1
- package/lib/es/src/components/DateField/index.js +1 -1
- package/lib/es/src/components/DateField/styles.js +1 -1
- package/lib/es/src/components/Fontface.js +1 -1
- package/lib/es/src/components/Footer/styles.js +1 -1
- package/lib/es/src/components/GlobalStyle.js +1 -1
- package/lib/es/src/components/Header/styles.js +1 -1
- package/lib/es/src/components/Heading/styles.js +1 -1
- package/lib/es/src/components/LabelWrapper/index.js +1 -1
- package/lib/es/src/components/LabelWrapper/styles.js +1 -1
- package/lib/es/src/components/LegendWrapper/styles.js +1 -1
- package/lib/es/src/components/Link/index.js +1 -1
- package/lib/es/src/components/Link/styles.js +1 -1
- package/lib/es/src/components/Modal/styles.js +1 -1
- package/lib/es/src/components/ProgressBar/styles.js +1 -1
- package/lib/es/src/components/Radio/styles.js +1 -1
- package/lib/es/src/components/RadioConsent/styles.js +1 -1
- package/lib/es/src/components/Select/styles.js +1 -1
- package/lib/es/src/components/Step/styles.js +1 -1
- package/lib/es/src/components/Text/styles.js +1 -1
- package/lib/es/src/components/TextAreaField/styles.js +1 -1
- package/lib/es/src/components/TextField/styles.js +1 -1
- package/lib/es/src/components/UserBlock/index.js +1 -1
- package/lib/es/src/themes/bowelbabe.js +1 -1
- package/lib/es/src/themes/cruk.js +1 -1
- package/lib/es/src/themes/su2c.js +1 -1
- package/lib/types.d.ts +22 -8
- package/package.json +18 -24
- package/lib/docs/Docs.d.ts +0 -2
- package/lib/docs/index.d.ts +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/index.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/index.js.map +0 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js +0 -2
- package/lib/es/node_modules/focus-lock/dist/es2015/setFocus.js.map +0 -1
- package/lib/hocs/MdxProvider.d.ts +0 -6
|
@@ -3,7 +3,7 @@ import { StoryObj } from "@storybook/react";
|
|
|
3
3
|
import AddressLookup from ".";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
7
7
|
apiKey: string;
|
|
8
8
|
countries?: string[] | undefined;
|
|
9
9
|
onAddressSelected: (address: import("..").AddressDataType) => void;
|
|
@@ -17,7 +17,7 @@ declare const _default: {
|
|
|
17
17
|
onAddressError?: ((error: Error) => void) | undefined;
|
|
18
18
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
19
19
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
20
|
-
}, "
|
|
20
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
21
21
|
args: {
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
errorMessage: string;
|
|
@@ -34,7 +34,7 @@ export type AddressLookupProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
34
34
|
* You will need a Loqate api key, the examples below use "MG17-ZD93-FF33-KF13" our development key.
|
|
35
35
|
* This component is generally only used for country codes including "GBR", "GGY", "IMN", "JEY". An example of this behavior is included bellow.
|
|
36
36
|
*/
|
|
37
|
-
declare const AddressLookup: React.ForwardRefExoticComponent<
|
|
37
|
+
declare const AddressLookup: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
38
38
|
/** api key for loqate */
|
|
39
39
|
apiKey: string;
|
|
40
40
|
/** list of countries codes you want the address look up to search within */
|
|
@@ -61,5 +61,5 @@ declare const AddressLookup: React.ForwardRefExoticComponent<Pick<React.InputHTM
|
|
|
61
61
|
onBlur?: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
62
62
|
/** attach a DOM reference variable to your component */
|
|
63
63
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
64
|
-
}, "
|
|
64
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
65
65
|
export default AddressLookup;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { ThemeType } from "../types";
|
|
3
3
|
type TestThemeWrapperProps = {
|
|
4
4
|
theme?: ThemeType;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
export declare const TestThemeWrapper: ({ children, theme, }: TestThemeWrapperProps) => JSX.Element;
|
|
7
|
+
export declare const TestThemeWrapper: ({ children, theme, }: TestThemeWrapperProps) => React.JSX.Element;
|
|
8
8
|
type AllThemesWrapperProps = {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export declare const AllThemesWrapper: ({ children }: AllThemesWrapperProps) => JSX.Element;
|
|
11
|
+
export declare const AllThemesWrapper: ({ children }: AllThemesWrapperProps) => React.JSX.Element;
|
|
12
12
|
export default AllThemesWrapper;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Avatar from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ url, name, size, alt, ...rest }: import(".").AvatarProps) => JSX.Element;
|
|
6
|
+
component: ({ url, name, size, alt, ...rest }: import(".").AvatarProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
name: string;
|
|
8
9
|
size: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImgHTMLAttributes } from "react";
|
|
1
|
+
import React, { ImgHTMLAttributes } from "react";
|
|
2
2
|
export type AvatarProps = ImgHTMLAttributes<HTMLElement> & {
|
|
3
3
|
/** name of user/entity */
|
|
4
4
|
name?: string;
|
|
@@ -11,5 +11,5 @@ export type AvatarProps = ImgHTMLAttributes<HTMLElement> & {
|
|
|
11
11
|
*
|
|
12
12
|
* You can use an avatar to display ownership of an item of content. If you pass a URL of an image that will be displayed otherwise the first letter of the name will be used to display a branded avatar.
|
|
13
13
|
*/
|
|
14
|
-
declare const Avatar: ({ url, name, size, alt, ...rest }: AvatarProps) => JSX.Element;
|
|
14
|
+
declare const Avatar: ({ url, name, size, alt, ...rest }: AvatarProps) => React.JSX.Element;
|
|
15
15
|
export default Avatar;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Badge from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ children, ...rest }: import(".").BadgeProps) => JSX.Element;
|
|
6
|
+
component: ({ children, ...rest }: import(".").BadgeProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
borderColor: string;
|
|
8
9
|
backgroundColor: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { SpaceType } from "../../types";
|
|
3
3
|
export type BadgeProps = {
|
|
4
4
|
/** background colour of badge */
|
|
@@ -25,5 +25,5 @@ at the end of a sentence, link, or button. Unless the context is clear,
|
|
|
25
25
|
consider including additional context with a visually hidden piece of
|
|
26
26
|
additional text.
|
|
27
27
|
*/
|
|
28
|
-
declare const Badge: ({ children, ...rest }: BadgeProps) => JSX.Element;
|
|
28
|
+
declare const Badge: ({ children, ...rest }: BadgeProps) => React.JSX.Element;
|
|
29
29
|
export default Badge;
|
|
@@ -3,7 +3,7 @@ import { StoryObj } from "@storybook/react";
|
|
|
3
3
|
import { Button } from "./";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLElement> & {
|
|
7
7
|
appearance?: import("..").ButtonAppearanceType | undefined;
|
|
8
8
|
full?: boolean | undefined;
|
|
9
9
|
href?: string | undefined;
|
|
@@ -13,7 +13,7 @@ declare const _default: {
|
|
|
13
13
|
isIconButton?: boolean | undefined;
|
|
14
14
|
ref?: React.Ref<HTMLElement> | undefined;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
-
}, "
|
|
16
|
+
}, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
17
17
|
args: {
|
|
18
18
|
appearance: string;
|
|
19
19
|
disabled: boolean;
|
|
@@ -24,7 +24,7 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLElement> & {
|
|
|
24
24
|
*
|
|
25
25
|
* Design system documentation SU2C https://zeroheight.com/79db39f7e/p/22ff0e-button/b/32e1a2
|
|
26
26
|
*/
|
|
27
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
27
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLElement> & {
|
|
28
28
|
/** the look and feel of the button */
|
|
29
29
|
appearance?: ButtonAppearanceType | undefined;
|
|
30
30
|
/** flag to streatch but to 100% width */
|
|
@@ -42,5 +42,5 @@ export declare const Button: React.ForwardRefExoticComponent<Pick<React.ButtonHT
|
|
|
42
42
|
ref?: React.Ref<HTMLElement> | undefined;
|
|
43
43
|
/** Component reference */
|
|
44
44
|
children?: ReactNode;
|
|
45
|
-
},
|
|
45
|
+
}, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
46
46
|
export default Button;
|
|
@@ -3,9 +3,9 @@ import { StoryObj } from "@storybook/react";
|
|
|
3
3
|
import Carousel, { CarouselProps } from ".";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element>;
|
|
6
|
+
component: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => React.JSX.Element>;
|
|
7
7
|
args: {};
|
|
8
|
-
render: (args: CarouselProps) => JSX.Element;
|
|
8
|
+
render: (args: CarouselProps) => React.JSX.Element;
|
|
9
9
|
tags: string[];
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from "react";
|
|
1
|
+
import React, { ButtonHTMLAttributes } from "react";
|
|
2
2
|
type DotProps = {
|
|
3
3
|
count: number;
|
|
4
4
|
currentPosition: number;
|
|
@@ -6,7 +6,7 @@ type DotProps = {
|
|
|
6
6
|
next: () => void;
|
|
7
7
|
previous: () => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const CarouselLeftButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
|
|
10
|
-
export declare const CarouselRightButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
|
|
11
|
-
export declare const Dots: ({ count, currentPosition, scrollToPosition, next, previous, }: DotProps) => JSX.Element;
|
|
9
|
+
export declare const CarouselLeftButton: (props: ButtonHTMLAttributes<HTMLElement>) => React.JSX.Element;
|
|
10
|
+
export declare const CarouselRightButton: (props: ButtonHTMLAttributes<HTMLElement>) => React.JSX.Element;
|
|
11
|
+
export declare const Dots: ({ count, currentPosition, scrollToPosition, next, previous, }: DotProps) => React.JSX.Element;
|
|
12
12
|
export default Dots;
|
|
@@ -15,6 +15,6 @@ export type CarouselProps = {
|
|
|
15
15
|
*
|
|
16
16
|
* Light weight carousel component that works with mouse and touch events, will work with divs and much anything you chuck in children
|
|
17
17
|
*/
|
|
18
|
-
export declare const Carousel: ({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element;
|
|
19
|
-
declare const _default: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element>;
|
|
18
|
+
export declare const Carousel: ({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => React.JSX.Element;
|
|
19
|
+
declare const _default: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => React.JSX.Element>;
|
|
20
20
|
export default _default;
|
|
@@ -3,12 +3,12 @@ import { StoryObj } from "@storybook/react";
|
|
|
3
3
|
import CheckBox from ".";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
7
7
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
8
8
|
hasError?: boolean | undefined;
|
|
9
9
|
errorMessage?: string | undefined;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
-
}, "
|
|
11
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
12
12
|
args: {
|
|
13
13
|
id: string;
|
|
14
14
|
disabled: boolean;
|
|
@@ -12,12 +12,12 @@ export type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
12
12
|
*
|
|
13
13
|
* The value or children becomes the label, if you want an outer label for a checkbox or group of checkboxes please use a LegendWrapper component
|
|
14
14
|
*/
|
|
15
|
-
declare const Checkbox: React.ForwardRefExoticComponent<
|
|
15
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
16
16
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
17
17
|
/** flag for error styling */
|
|
18
18
|
hasError?: boolean | undefined;
|
|
19
19
|
/** error message text */
|
|
20
20
|
errorMessage?: string | undefined;
|
|
21
21
|
children?: ReactNode;
|
|
22
|
-
},
|
|
22
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
23
|
export default Checkbox;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Collapse from ".";
|
|
3
4
|
declare const _default: {
|
|
@@ -6,7 +7,7 @@ declare const _default: {
|
|
|
6
7
|
args: {
|
|
7
8
|
id: string;
|
|
8
9
|
headerTitleText: string;
|
|
9
|
-
children: JSX.Element;
|
|
10
|
+
children: React.JSX.Element;
|
|
10
11
|
};
|
|
11
12
|
tags: string[];
|
|
12
13
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FontSizeType } from "../../types";
|
|
2
2
|
export declare const transitionDurationSeconds = 0.5;
|
|
3
|
-
export declare const FlippingIcon: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, {
|
|
3
|
+
export declare const FlippingIcon: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => import("react").JSX.Element, any, {
|
|
4
4
|
open: boolean;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const DefaultHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
6
|
+
export declare const DefaultHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").ButtonHTMLAttributes<HTMLElement> & {
|
|
7
7
|
appearance?: import("../../types").ButtonAppearanceType | undefined;
|
|
8
8
|
full?: boolean | undefined;
|
|
9
9
|
href?: string | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const DefaultHeader: import("styled-components").StyledComponent<
|
|
|
13
13
|
isIconButton?: boolean | undefined;
|
|
14
14
|
ref?: import("react").Ref<HTMLElement> | undefined;
|
|
15
15
|
children?: import("react").ReactNode;
|
|
16
|
-
}, "
|
|
16
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement>>, any, {
|
|
17
17
|
textColor?: string | undefined;
|
|
18
18
|
textSize?: FontSizeType | undefined;
|
|
19
19
|
textFontFamily?: string | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import DateField from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ label, hintText, day, month, year, dayName, monthName, yearName, dayHasError, monthHasError, yearHasError, errorMessage, onChange, onBlur, onFocus, disabled, required, }: import(".").DateFieldProps) => JSX.Element;
|
|
6
|
+
component: ({ label, hintText, day, month, year, dayName, monthName, yearName, dayHasError, monthHasError, yearHasError, errorMessage, onChange, onBlur, onFocus, disabled, required, }: import(".").DateFieldProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
dayName: string;
|
|
8
9
|
monthName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from "react";
|
|
1
|
+
import React, { InputHTMLAttributes } from "react";
|
|
2
2
|
export type DateFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
3
|
/** label text */
|
|
4
4
|
label: string;
|
|
@@ -28,5 +28,5 @@ export type DateFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
28
28
|
/**
|
|
29
29
|
* To be used in forms entering dates like date of birth which are known dates and would take too long to get to with a date picker
|
|
30
30
|
* */
|
|
31
|
-
declare const DateField: ({ label, hintText, day, month, year, dayName, monthName, yearName, dayHasError, monthHasError, yearHasError, errorMessage, onChange, onBlur, onFocus, disabled, required, }: DateFieldProps) => JSX.Element;
|
|
31
|
+
declare const DateField: ({ label, hintText, day, month, year, dayName, monthName, yearName, dayHasError, monthHasError, yearHasError, errorMessage, onChange, onBlur, onFocus, disabled, required, }: DateFieldProps) => React.JSX.Element;
|
|
32
32
|
export default DateField;
|
|
@@ -3,6 +3,7 @@ type ThemeProps = {
|
|
|
3
3
|
theme: ThemeType;
|
|
4
4
|
};
|
|
5
5
|
export declare const Fieldset: import("styled-components").StyledComponent<"fieldset", any, {}, never>;
|
|
6
|
+
export declare const TextAsLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Text").TextProps>, any, ThemeProps, never>;
|
|
6
7
|
export declare const DateTextFieldWrapper: import("styled-components").StyledComponent<"div", any, ThemeProps, never>;
|
|
7
8
|
export declare const LargeDateTextFieldWrapper: import("styled-components").StyledComponent<"div", any, ThemeProps, never>;
|
|
8
9
|
export declare const ErrorTextWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
type DividerProps = {
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const Divider: ({ children }: DividerProps) => JSX.Element;
|
|
5
|
+
export declare const Divider: ({ children }: DividerProps) => React.JSX.Element;
|
|
6
6
|
export default Divider;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Footer, { FooterProps } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ children, middleSection }: FooterProps) => JSX.Element;
|
|
6
|
-
render: (args: FooterProps) => JSX.Element;
|
|
6
|
+
component: ({ children, middleSection }: FooterProps) => React.JSX.Element;
|
|
7
|
+
render: (args: FooterProps) => React.JSX.Element;
|
|
7
8
|
tags: string[];
|
|
8
9
|
};
|
|
9
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, HTMLAttributes } from "react";
|
|
1
|
+
import React, { ReactNode, HTMLAttributes } from "react";
|
|
2
2
|
export type FooterProps = HTMLAttributes<HTMLElement> & {
|
|
3
3
|
/** used to customise text in middle section, it could also be react element, this is not to be confused with the component children which is primarily for the links in the footer */
|
|
4
4
|
middleSection?: ReactNode;
|
|
@@ -7,5 +7,5 @@ export type FooterProps = HTMLAttributes<HTMLElement> & {
|
|
|
7
7
|
/**
|
|
8
8
|
* There should be only one footer component at the bottom of the body of each page. Links can be passed as children
|
|
9
9
|
* */
|
|
10
|
-
export declare const Footer: ({ children, middleSection }: FooterProps) => JSX.Element;
|
|
10
|
+
export declare const Footer: ({ children, middleSection }: FooterProps) => React.JSX.Element;
|
|
11
11
|
export default Footer;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Header, { HeaderProps } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ isSticky, siteSlogan, logoAltText, logoImageSrc, logoLinkTitle, logoLinkUrl, fullWidth, children, }: HeaderProps) => JSX.Element;
|
|
6
|
+
component: ({ isSticky, siteSlogan, logoAltText, logoImageSrc, logoLinkTitle, logoLinkUrl, fullWidth, children, }: HeaderProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
siteSlogan: string;
|
|
8
|
-
children: JSX.Element;
|
|
9
|
+
children: React.JSX.Element;
|
|
9
10
|
isSticky: boolean;
|
|
10
11
|
fullWidth: boolean;
|
|
11
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
export type HeaderProps = HTMLAttributes<HTMLElement> & {
|
|
3
3
|
/** flag which make header fixed to the top even when scrolling */
|
|
4
4
|
isSticky?: boolean;
|
|
@@ -33,5 +33,5 @@ export type HeaderProps = HTMLAttributes<HTMLElement> & {
|
|
|
33
33
|
* There is a hidden skip link in the header which will only reveals itself on the first tab and to screen readers. This link helps users skip to the main page content, however this will only work with there is an element with an id of 'main' which the developer should create for every page.
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
export declare const Header: ({ isSticky, siteSlogan, logoAltText, logoImageSrc, logoLinkTitle, logoLinkUrl, fullWidth, children, }: HeaderProps) => JSX.Element;
|
|
36
|
+
export declare const Header: ({ isSticky, siteSlogan, logoAltText, logoImageSrc, logoLinkTitle, logoLinkUrl, fullWidth, children, }: HeaderProps) => React.JSX.Element;
|
|
37
37
|
export default Header;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Heading from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ h1, h2, h3, h4, h5, h6, ...props }: import(".").HeadingProps) => JSX.Element;
|
|
6
|
+
component: ({ h1, h2, h3, h4, h5, h6, ...props }: import(".").HeadingProps) => React.JSX.Element;
|
|
6
7
|
args: {};
|
|
7
8
|
tags: string[];
|
|
8
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ElementType } from "react";
|
|
1
|
+
import React, { HTMLAttributes, ElementType } from "react";
|
|
2
2
|
import { SpacingProps } from "../Spacing";
|
|
3
3
|
import { FontSizeType, WordBreakType, OverflowWrapType } from "../../types";
|
|
4
4
|
export type HeadingProps = SpacingProps & HTMLAttributes<HTMLElement> & {
|
|
@@ -28,5 +28,5 @@ Markup headings semantically using the appropriate <h#> level HTML element and
|
|
|
28
28
|
use the corresponding heading class (h1, h2, h3, ....). Write all headings in sentence case. Heading differs from the Text component by using a different font-family and it changes the font size according to the screen width breakpoints.
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
declare const Heading: ({ h1, h2, h3, h4, h5, h6, ...props }: HeadingProps) => JSX.Element;
|
|
31
|
+
declare const Heading: ({ h1, h2, h3, h4, h5, h6, ...props }: HeadingProps) => React.JSX.Element;
|
|
32
32
|
export default Heading;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import { IconFa } from "..";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ faIcon, color, size, ...rest }: import(".").IconFaProps) => JSX.Element;
|
|
6
|
+
component: ({ faIcon, color, size, ...rest }: import(".").IconFaProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
faIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
9
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
|
2
3
|
export type IconFaProps = {
|
|
3
4
|
/** imported icon definition from "@fortawesome/free-solid-svg-icons" or "@fortawesome/free-brands-svg-icons" */
|
|
@@ -12,5 +13,5 @@ export type IconFaProps = {
|
|
|
12
13
|
*
|
|
13
14
|
* This is an svg icon wrapper where a font awesome icon definition can be passed in a long with colour and size
|
|
14
15
|
* */
|
|
15
|
-
declare const IconFa: ({ faIcon, color, size, ...rest }: IconFaProps) => JSX.Element;
|
|
16
|
+
declare const IconFa: ({ faIcon, color, size, ...rest }: IconFaProps) => React.JSX.Element;
|
|
16
17
|
export default IconFa;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LabelHTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import React, { LabelHTMLAttributes, ReactNode } from "react";
|
|
2
2
|
type LabelWrapperProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3
3
|
/** label text */
|
|
4
4
|
label: string;
|
|
@@ -11,7 +11,7 @@ type LabelWrapperProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
};
|
|
13
13
|
export declare const LabelWrapper: {
|
|
14
|
-
({ label, hintText, required, hideRequiredInLabel, children, ...otherHTMLLabelProps }: LabelWrapperProps): JSX.Element;
|
|
14
|
+
({ label, hintText, required, hideRequiredInLabel, children, ...otherHTMLLabelProps }: LabelWrapperProps): React.JSX.Element;
|
|
15
15
|
defaultProps: {
|
|
16
16
|
required: boolean;
|
|
17
17
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ThemeType } from "../../types";
|
|
2
|
-
|
|
2
|
+
type LabelProp = {
|
|
3
|
+
theme: ThemeType;
|
|
4
|
+
};
|
|
5
|
+
export declare const Label: import("styled-components").StyledComponent<"label", any, LabelProp, never>;
|
|
6
|
+
export declare const RequiredText: import("styled-components").StyledComponent<"span", any, LabelProp, never>;
|
|
3
7
|
export declare const LabelText: import("styled-components").StyledComponent<"span", any, {
|
|
4
8
|
hasHintText: boolean;
|
|
5
9
|
theme: ThemeType;
|
|
6
10
|
}, never>;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import LegendWrapper, { LegendWrapperProps } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => JSX.Element;
|
|
6
|
+
component: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => React.JSX.Element;
|
|
6
7
|
args: {
|
|
7
8
|
legendText: string;
|
|
8
9
|
hintText: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
export type LegendWrapperProps = HTMLAttributes<HTMLLegendElement> & {
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
/** legend text */
|
|
@@ -18,5 +18,5 @@ export type LegendWrapperProps = HTMLAttributes<HTMLLegendElement> & {
|
|
|
18
18
|
* hasError and errorMessage props are just props that can be passed into the component.
|
|
19
19
|
* There is no functionality checking if the children are valid/required etc this functionality will be needed to ne added outside of this component.
|
|
20
20
|
*/
|
|
21
|
-
export declare const LegendWrapper: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => JSX.Element;
|
|
21
|
+
export declare const LegendWrapper: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => React.JSX.Element;
|
|
22
22
|
export default LegendWrapper;
|
|
@@ -3,13 +3,13 @@ import { StoryObj } from "@storybook/react";
|
|
|
3
3
|
import Link from ".";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<Omit<React.AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<import("../Text").TextProps, "ref" | "nonce" | "as"> & {
|
|
7
7
|
textHoverColor?: string | undefined;
|
|
8
8
|
appearance?: "primary" | "secondary" | undefined;
|
|
9
9
|
ref?: React.Ref<HTMLElement> | undefined;
|
|
10
10
|
as?: React.ElementType | undefined;
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
-
}, "
|
|
12
|
+
}, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
13
13
|
args: {
|
|
14
14
|
appearance: undefined;
|
|
15
15
|
href: string;
|
|
@@ -22,7 +22,7 @@ export type LinkProps = Omit<AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<
|
|
|
22
22
|
* If you want something that looks like a link but behaves like a button ie. nothing to do with navigation, please consider using Link with as='button'
|
|
23
23
|
*
|
|
24
24
|
* If you want something that looks like a button but behaves like a link ie. it takes the user to a new location, please consider using Button and simply passing it an href, it will automatically turn into a link. */
|
|
25
|
-
export declare const Link: React.ForwardRefExoticComponent<
|
|
25
|
+
export declare const Link: React.ForwardRefExoticComponent<Omit<Omit<React.AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<TextProps, "nonce" | "as" | "ref"> & {
|
|
26
26
|
/** link text hover colour */
|
|
27
27
|
textHoverColor?: string | undefined;
|
|
28
28
|
/** link appearance variant, undefined is a standarding link withing a text block */
|
|
@@ -33,5 +33,5 @@ export declare const Link: React.ForwardRefExoticComponent<Pick<Omit<React.Ancho
|
|
|
33
33
|
as?: React.ElementType | undefined;
|
|
34
34
|
/** Component children */
|
|
35
35
|
children?: ReactNode;
|
|
36
|
-
}, "
|
|
36
|
+
}, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
37
37
|
export default Link;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from "react";
|
|
2
2
|
import { TextProps } from "../Text";
|
|
3
3
|
import { ThemeType } from "../../types";
|
|
4
|
-
type ThemeProp = {
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
};
|
|
7
|
-
export declare const ChevyWithLevee: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, ThemeProp, never>;
|
|
8
4
|
export declare const StyledLink: import("styled-components").StyledComponent<import("react").FunctionComponent<TextProps>, any, AnchorHTMLAttributes<HTMLElement> & import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
|
|
9
5
|
textColor?: string | undefined;
|
|
10
6
|
textAlign?: "left" | "right" | "center" | "justify" | undefined;
|
|
11
7
|
textSize?: import("../../types").FontSizeType | undefined;
|
|
12
|
-
textWeight?: number | undefined;
|
|
8
|
+
textWeight?: string | number | undefined;
|
|
9
|
+
textFontFamily?: string | undefined;
|
|
13
10
|
as?: import("react").ElementType | undefined;
|
|
14
11
|
wordBreak?: import("../../types").WordBreakType | undefined;
|
|
15
12
|
overflowWrap?: import("../../types").OverflowWrapType | undefined;
|
|
@@ -19,4 +16,4 @@ export declare const StyledLink: import("styled-components").StyledComponent<imp
|
|
|
19
16
|
appearance?: "primary" | "secondary" | undefined;
|
|
20
17
|
textHoverColor?: string | undefined;
|
|
21
18
|
}, never>;
|
|
22
|
-
export
|
|
19
|
+
export default StyledLink;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
/**
|
|
2
3
|
*
|
|
3
4
|
* Loaders are used after some user interaction that we assume will take some time to complete. They inform the user that their request is beeing processed and that they should wait.
|
|
4
5
|
*/
|
|
5
|
-
declare const Loader: () => JSX.Element;
|
|
6
|
+
declare const Loader: () => React.JSX.Element;
|
|
6
7
|
export default Loader;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { StoryObj } from "@storybook/react";
|
|
2
3
|
import Modal, { ModalProps } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: ({ modalName, closeFunction, showCloseButton, maxWidth, top, backgroundColor, children, width, margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft, padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft, }: ModalProps) => JSX.Element;
|
|
6
|
+
component: ({ modalName, closeFunction, showCloseButton, maxWidth, top, backgroundColor, children, width, margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft, padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft, }: ModalProps) => React.JSX.Element;
|
|
6
7
|
args: {};
|
|
7
8
|
tags: string[];
|
|
8
9
|
};
|
|
9
10
|
export default _default;
|
|
10
11
|
type Story = StoryObj<typeof Modal>;
|
|
11
12
|
export declare const ModalDefault: Story;
|
|
12
|
-
export declare const ModalSU2C: Story;
|
|
13
|
-
export declare const ModalBowelbabe: Story;
|