@cruk/cruk-react-components 2.0.1 → 3.0.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/lib/components/AddressLookup/AddressLookUp.test.cypress.d.ts +1 -1
- package/lib/components/AddressLookup/AddressLookup.stories.d.ts +36 -7
- package/lib/components/AddressLookup/index.d.ts +61 -61
- package/lib/components/AddressLookup/styles.d.ts +14 -14
- package/lib/components/Avatar/Avatar.stories.d.ts +33 -20
- package/lib/components/Avatar/Avatar.test.cypress.d.ts +1 -1
- package/lib/components/Avatar/index.d.ts +15 -15
- package/lib/components/Avatar/styles.d.ts +7 -7
- package/lib/components/Badge/Badge.stories.d.ts +26 -16
- package/lib/components/Badge/Badge.test.cypress.d.ts +1 -1
- package/lib/components/Badge/index.d.ts +28 -28
- package/lib/components/Badge/styles.d.ts +11 -11
- package/lib/components/Box/Box.stories.d.ts +20 -13
- package/lib/components/Box/Box.test.cypress.d.ts +1 -1
- package/lib/components/Box/index.d.ts +17 -17
- package/lib/components/Box/styles.d.ts +8 -8
- package/lib/components/Button/Button.stories.d.ts +39 -15
- package/lib/components/Button/Button.test.cypress.d.ts +1 -1
- package/lib/components/Button/index.d.ts +46 -46
- package/lib/components/Button/styles.d.ts +15 -13
- package/lib/components/Carousel/Carousel.stories.d.ts +15 -7
- package/lib/components/Carousel/Carousel.test.cypress.d.ts +1 -1
- package/lib/components/Carousel/Dots.d.ts +12 -12
- package/lib/components/Carousel/index.d.ts +20 -20
- package/lib/components/Carousel/styles.d.ts +33 -33
- package/lib/components/Checkbox/CheckBox.test.cypress.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.stories.d.ts +26 -8
- package/lib/components/Checkbox/index.d.ts +23 -23
- package/lib/components/Checkbox/styles.d.ts +16 -13
- package/lib/components/Collapse/Collapse.stories.d.ts +23 -13
- package/lib/components/Collapse/Collapse.test.cypress.d.ts +1 -1
- package/lib/components/Collapse/index.d.ts +29 -29
- package/lib/components/Collapse/styles.d.ts +26 -26
- package/lib/components/DateField/DateField.stories.d.ts +29 -10
- package/lib/components/DateField/DateField.test.cypress.d.ts +1 -1
- package/lib/components/DateField/index.d.ts +32 -32
- package/lib/components/DateField/styles.d.ts +9 -4
- package/lib/components/Divider.d.ts +6 -6
- package/lib/components/ErrorText/ErrorText.stories.d.ts +16 -7
- package/lib/components/ErrorText/ErrorText.test.cypress.d.ts +1 -1
- package/lib/components/ErrorText/index.d.ts +13 -13
- package/lib/components/ErrorText/styles.d.ts +7 -3
- package/lib/components/Flex.d.ts +3 -3
- package/lib/components/Fontface.d.ts +2 -2
- package/lib/components/Footer/Footer.stories.d.ts +13 -7
- package/lib/components/Footer/Footer.test.cypress.d.ts +1 -1
- package/lib/components/Footer/index.d.ts +11 -11
- package/lib/components/Footer/styles.d.ts +16 -11
- package/lib/components/GlobalStyle.d.ts +9 -9
- package/lib/components/GlobalStyleNoFontFace.d.ts +9 -9
- package/lib/components/Header/Header.stories.d.ts +20 -7
- package/lib/components/Header/Header.test.cypress.d.ts +1 -1
- package/lib/components/Header/index.d.ts +37 -37
- package/lib/components/Header/styles.d.ts +37 -31
- package/lib/components/Heading/Heading.stories.d.ts +31 -25
- package/lib/components/Heading/Heading.test.cypress.d.ts +1 -1
- package/lib/components/Heading/index.d.ts +32 -32
- package/lib/components/Heading/styles.d.ts +50 -50
- package/lib/components/Icon/Icon.stories.d.ts +15 -6
- package/lib/components/Icon/Icon.test.cypress.d.ts +1 -1
- package/lib/components/Icon/iconList.d.ts +268 -268
- package/lib/components/Icon/index.d.ts +23 -23
- package/lib/components/Icon/styles.d.ts +5 -5
- package/lib/components/IconFa/IconFa.stories.d.ts +16 -7
- package/lib/components/IconFa/IconFa.test.cypress.d.ts +1 -1
- package/lib/components/IconFa/index.d.ts +17 -17
- package/lib/components/IconFa/styles.d.ts +5 -5
- package/lib/components/InfoBox/InfoBox.stories.d.ts +22 -9
- package/lib/components/InfoBox/InfoBox.test.cypress.d.ts +1 -1
- package/lib/components/InfoBox/index.d.ts +27 -27
- package/lib/components/InfoBox/styles.d.ts +14 -14
- package/lib/components/LabelWrapper/index.d.ts +19 -19
- package/lib/components/LabelWrapper/styles.d.ts +6 -6
- package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +21 -11
- package/lib/components/LegendWrapper/LegendWrapper.test.cypress.d.ts +1 -1
- package/lib/components/LegendWrapper/index.d.ts +22 -22
- package/lib/components/LegendWrapper/styles.d.ts +12 -12
- package/lib/components/Link/Link.stories.d.ts +33 -14
- package/lib/components/Link/Link.test.cypress.d.ts +1 -1
- package/lib/components/Link/index.d.ts +37 -37
- package/lib/components/Link/styles.d.ts +22 -18
- package/lib/components/Loader/Loader.stories.d.ts +13 -6
- package/lib/components/Loader/Loader.test.cypress.d.ts +1 -1
- package/lib/components/Loader/index.d.ts +7 -7
- package/lib/components/Loader/styles.d.ts +7 -2
- package/lib/components/Modal/Modal.stories.d.ts +13 -7
- package/lib/components/Modal/Modal.test.cypress.d.ts +1 -1
- package/lib/components/Modal/index.d.ts +32 -32
- package/lib/components/Modal/styles.d.ts +27 -24
- package/lib/components/Pagination/Pagination.stories.d.ts +20 -8
- package/lib/components/Pagination/Pagination.test.cypress.d.ts +1 -1
- package/lib/components/Pagination/index.d.ts +24 -24
- package/lib/components/Pagination/styles.d.ts +14 -10
- package/lib/components/PopOver/PopOver.test.cypress.d.ts +1 -1
- package/lib/components/PopOver/Popover.stories.d.ts +18 -7
- package/lib/components/PopOver/index.d.ts +26 -24
- package/lib/components/PopOver/styles.d.ts +11 -10
- package/lib/components/ProgressBar/ProgressBar.stories.d.ts +19 -10
- package/lib/components/ProgressBar/ProgressBar.test.cypress.d.ts +1 -1
- package/lib/components/ProgressBar/index.d.ts +24 -24
- package/lib/components/ProgressBar/styles.d.ts +30 -30
- package/lib/components/Radio/Radio.stories.d.ts +28 -8
- package/lib/components/Radio/Radio.test.cypress.d.ts +1 -1
- package/lib/components/Radio/index.d.ts +23 -23
- package/lib/components/Radio/styles.d.ts +21 -19
- package/lib/components/RadioConsent/Radio.stories.d.ts +21 -7
- package/lib/components/RadioConsent/RadioConsent.test.cypress.d.ts +1 -1
- package/lib/components/RadioConsent/index.d.ts +24 -24
- package/lib/components/RadioConsent/styles.d.ts +16 -16
- package/lib/components/Select/Select.test.cypress.d.ts +1 -1
- package/lib/components/Select/Selelct.stories.d.ts +24 -10
- package/lib/components/Select/index.d.ts +21 -21
- package/lib/components/Select/styles.d.ts +9 -9
- package/lib/components/Spacing/index.d.ts +19 -19
- package/lib/components/Step/Step.stories.d.ts +17 -7
- package/lib/components/Step/Step.test.cypress.d.ts +1 -1
- package/lib/components/Step/index.d.ts +15 -15
- package/lib/components/Step/styles.d.ts +17 -13
- package/lib/components/TestWrapper.d.ts +12 -12
- package/lib/components/Text/Text.stories.d.ts +17 -7
- package/lib/components/Text/Text.test.cypress.d.ts +1 -1
- package/lib/components/Text/index.d.ts +26 -26
- package/lib/components/Text/styles.d.ts +22 -22
- package/lib/components/TextAreaField/TextAreaField.stories.d.ts +29 -10
- package/lib/components/TextAreaField/TextAreaField.test.cypress.d.ts +1 -1
- package/lib/components/TextAreaField/index.d.ts +22 -22
- package/lib/components/TextAreaField/styles.d.ts +10 -10
- package/lib/components/TextField/TextField.stories.d.ts +27 -12
- package/lib/components/TextField/TextField.test.cypress.d.ts +1 -1
- package/lib/components/TextField/index.d.ts +34 -34
- package/lib/components/TextField/styles.d.ts +18 -18
- package/lib/components/ThemeCheatSheet.d.ts +7 -7
- package/lib/components/Totaliser/Totaliser.stories.d.ts +27 -19
- package/lib/components/Totaliser/Totaliser.test.cypress.d.ts +1 -1
- package/lib/components/Totaliser/index.d.ts +22 -22
- package/lib/components/Totaliser/styles.d.ts +20 -16
- package/lib/components/UserBlock/UserBlock.stories.d.ts +23 -16
- package/lib/components/UserBlock/UserBlock.test.cypress.d.ts +1 -1
- package/lib/components/UserBlock/index.d.ts +18 -18
- package/lib/components/UserBlock/styles.d.ts +9 -4
- package/lib/components/index.d.ts +73 -73
- package/lib/docs/Docs.d.ts +2 -2
- package/lib/docs/index.d.ts +1 -1
- package/lib/es/{node_modules/tslib/tslib.es6.js → _virtual/_tslib.js} +1 -1
- package/lib/es/_virtual/_tslib.js.map +1 -0
- package/lib/es/node_modules/focus-lock/dist/es2015/index.js +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/index.js.map +1 -1
- package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.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/index.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js +1 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
- package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js +1 -1
- package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/lib/es/src/components/AddressLookup/index.js +1 -1
- package/lib/es/src/components/AddressLookup/styles.js +1 -1
- package/lib/es/src/components/Avatar/index.js +1 -1
- package/lib/es/src/components/Avatar/styles.js +1 -1
- package/lib/es/src/components/Badge/index.js +1 -1
- package/lib/es/src/components/Badge/styles.js +1 -1
- package/lib/es/src/components/Box/index.js +1 -1
- package/lib/es/src/components/Box/styles.js +1 -1
- package/lib/es/src/components/Button/index.js +1 -1
- package/lib/es/src/components/Button/styles.js +1 -1
- package/lib/es/src/components/Carousel/Dots.js +1 -1
- package/lib/es/src/components/Carousel/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/Collapse/index.js +1 -1
- package/lib/es/src/components/Collapse/styles.js +1 -1
- package/lib/es/src/components/DateField/styles.js +1 -1
- package/lib/es/src/components/Divider.js +1 -1
- package/lib/es/src/components/ErrorText/index.js +1 -1
- package/lib/es/src/components/ErrorText/styles.js +1 -1
- package/lib/es/src/components/Flex.js +1 -1
- package/lib/es/src/components/Footer/index.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/GlobalStyleNoFontFace.js +1 -1
- package/lib/es/src/components/Header/index.js +1 -1
- package/lib/es/src/components/Header/styles.js +1 -1
- package/lib/es/src/components/Heading/index.js +1 -1
- package/lib/es/src/components/Heading/styles.js +1 -1
- package/lib/es/src/components/Icon/index.js +1 -1
- package/lib/es/src/components/Icon/styles.js +1 -1
- package/lib/es/src/components/IconFa/index.js +1 -1
- package/lib/es/src/components/IconFa/styles.js +1 -1
- package/lib/es/src/components/InfoBox/index.js +1 -1
- package/lib/es/src/components/InfoBox/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/index.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/Loader/index.js +1 -1
- package/lib/es/src/components/Loader/styles.js +1 -1
- package/lib/es/src/components/Modal/index.js +1 -1
- package/lib/es/src/components/Modal/styles.js +1 -1
- package/lib/es/src/components/Pagination/index.js +1 -1
- package/lib/es/src/components/Pagination/styles.js +1 -1
- package/lib/es/src/components/PopOver/README.md.js +1 -1
- package/lib/es/src/components/PopOver/README.md.js.map +1 -1
- package/lib/es/src/components/PopOver/index.js +1 -1
- package/lib/es/src/components/PopOver/styles.js +1 -1
- package/lib/es/src/components/ProgressBar/index.js +1 -1
- package/lib/es/src/components/ProgressBar/styles.js +1 -1
- package/lib/es/src/components/Radio/index.js +1 -1
- package/lib/es/src/components/Radio/styles.js +1 -1
- package/lib/es/src/components/RadioConsent/index.js +1 -1
- package/lib/es/src/components/RadioConsent/styles.js +1 -1
- package/lib/es/src/components/Select/index.js +1 -1
- package/lib/es/src/components/Select/styles.js +1 -1
- package/lib/es/src/components/Step/index.js +1 -1
- package/lib/es/src/components/Step/styles.js +1 -1
- package/lib/es/src/components/Text/index.js +1 -1
- package/lib/es/src/components/Text/styles.js +1 -1
- package/lib/es/src/components/TextAreaField/index.js +1 -1
- package/lib/es/src/components/TextAreaField/styles.js +1 -1
- package/lib/es/src/components/TextField/index.js +1 -1
- package/lib/es/src/components/TextField/styles.js +1 -1
- package/lib/es/src/components/Totaliser/index.js +1 -1
- package/lib/es/src/components/Totaliser/styles.js +1 -1
- package/lib/es/src/components/UserBlock/index.js +1 -1
- package/lib/es/src/components/UserBlock/styles.js +1 -1
- package/lib/es/src/themes/bowelbabe.js +1 -1
- package/lib/es/src/themes/su2c.js +1 -1
- package/lib/hocs/MdxProvider.d.ts +6 -6
- package/lib/hooks/useEffectBrowser.d.ts +3 -3
- package/lib/hooks/useKey.d.ts +6 -6
- package/lib/hooks/useLayoutEffectBrowser.d.ts +4 -4
- package/lib/hooks/useScrollPosition.d.ts +13 -13
- package/lib/themes/bowelbabe.d.ts +13 -13
- package/lib/themes/cruk.d.ts +13 -13
- package/lib/themes/su2c.d.ts +13 -13
- package/lib/types.d.ts +232 -232
- package/lib/utils/Helper.d.ts +6 -6
- package/lib/utils/__tests__/testHelpers.jest.d.ts +1 -1
- package/lib/utils/debounce.d.ts +2 -2
- package/package.json +21 -15
- package/lib/es/node_modules/detect-node-es/esm/node.js +0 -2
- package/lib/es/node_modules/detect-node-es/esm/node.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/AutoFocusInside.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/AutoFocusInside.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/FreeFocusInside.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/FreeFocusInside.js.map +0 -1
- package/lib/es/node_modules/react-focus-lock/dist/es2015/MoveFocusInside.js +0 -2
- package/lib/es/node_modules/react-focus-lock/dist/es2015/MoveFocusInside.js.map +0 -1
- package/lib/es/node_modules/tslib/tslib.es6.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ICONS } from "./iconList";
|
|
3
|
-
export declare const ICON_NAMES: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
export type IconProps = {
|
|
7
|
-
/** name defines the visible icon */
|
|
8
|
-
name: keyof typeof ICONS;
|
|
9
|
-
/** color of icon, inherits current text colour by default */
|
|
10
|
-
color?: string;
|
|
11
|
-
/** size of ion 1.1em by default */
|
|
12
|
-
size?: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* The Icon component displays an icon glyph as an `<svg>` element.
|
|
16
|
-
*
|
|
17
|
-
* System icons are designed to be simple, modern, friendly, and sometimes quirky.
|
|
18
|
-
* Each icon is reduced to its minimal form, expressing essential characteristics.
|
|
19
|
-
*
|
|
20
|
-
* This component has been deprecated in favour of IconFa which is more tree-shakable
|
|
21
|
-
* */
|
|
22
|
-
declare const Icon: ({ name, color, size, ...rest }: IconProps) => JSX.Element;
|
|
23
|
-
export default Icon;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ICONS } from "./iconList";
|
|
3
|
+
export declare const ICON_NAMES: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
export type IconProps = {
|
|
7
|
+
/** name defines the visible icon */
|
|
8
|
+
name: keyof typeof ICONS;
|
|
9
|
+
/** color of icon, inherits current text colour by default */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** size of ion 1.1em by default */
|
|
12
|
+
size?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The Icon component displays an icon glyph as an `<svg>` element.
|
|
16
|
+
*
|
|
17
|
+
* System icons are designed to be simple, modern, friendly, and sometimes quirky.
|
|
18
|
+
* Each icon is reduced to its minimal form, expressing essential characteristics.
|
|
19
|
+
*
|
|
20
|
+
* This component has been deprecated in favour of IconFa which is more tree-shakable
|
|
21
|
+
* */
|
|
22
|
+
declare const Icon: ({ name, color, size, ...rest }: IconProps) => JSX.Element;
|
|
23
|
+
export default Icon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<"svg", any, {
|
|
2
|
-
color?: string | undefined;
|
|
3
|
-
size?: string | undefined;
|
|
4
|
-
}, never>;
|
|
5
|
-
export default StyledIcon;
|
|
1
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<"svg", any, {
|
|
2
|
+
color?: string | undefined;
|
|
3
|
+
size?: string | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export default StyledIcon;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import { IconFa } from "..";
|
|
3
|
+
import { IconFaProps } from ".";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ faIcon, color, size, ...rest }: IconFaProps) => JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
faIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
type Story = StoryObj<typeof IconFa>;
|
|
14
|
+
export declare const IconFADefault: Story;
|
|
15
|
+
export declare const IconSU2C: Story;
|
|
16
|
+
export declare const IconBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
|
3
|
-
export type IconFaProps = {
|
|
4
|
-
/** imported icon definition from "@fortawesome/free-solid-svg-icons" or "@fortawesome/free-brands-svg-icons" */
|
|
5
|
-
faIcon: IconDefinition;
|
|
6
|
-
/** color of icon, inherits current text colour by default */
|
|
7
|
-
color?: string;
|
|
8
|
-
/** size of ion 1.1em by default */
|
|
9
|
-
size?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The IconFa component (Icon Font Awesome) displays an icon glyph as an `<svg>` element.
|
|
13
|
-
*
|
|
14
|
-
* This is an svg icon wrapper where a font awesome icon definition can be passed in a long with colour and size
|
|
15
|
-
* */
|
|
16
|
-
declare const IconFa: ({ faIcon, color, size, ...rest }: IconFaProps) => JSX.Element;
|
|
17
|
-
export default IconFa;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
|
3
|
+
export type IconFaProps = {
|
|
4
|
+
/** imported icon definition from "@fortawesome/free-solid-svg-icons" or "@fortawesome/free-brands-svg-icons" */
|
|
5
|
+
faIcon: IconDefinition;
|
|
6
|
+
/** color of icon, inherits current text colour by default */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** size of ion 1.1em by default */
|
|
9
|
+
size?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The IconFa component (Icon Font Awesome) displays an icon glyph as an `<svg>` element.
|
|
13
|
+
*
|
|
14
|
+
* This is an svg icon wrapper where a font awesome icon definition can be passed in a long with colour and size
|
|
15
|
+
* */
|
|
16
|
+
declare const IconFa: ({ faIcon, color, size, ...rest }: IconFaProps) => JSX.Element;
|
|
17
|
+
export default IconFa;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<"svg", any, {
|
|
2
|
-
color?: string | undefined;
|
|
3
|
-
size?: string | undefined;
|
|
4
|
-
}, never>;
|
|
5
|
-
export default StyledIcon;
|
|
1
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<"svg", any, {
|
|
2
|
+
color?: string | undefined;
|
|
3
|
+
size?: string | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export default StyledIcon;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import InfoBox, { InfoBoxProps } from ".";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FunctionComponent<InfoBoxProps>;
|
|
7
|
+
args: {
|
|
8
|
+
titleText: string;
|
|
9
|
+
titleTextColor: string;
|
|
10
|
+
descriptionText: string;
|
|
11
|
+
descriptionTextColor: string;
|
|
12
|
+
icon: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
type Story = StoryObj<typeof InfoBox>;
|
|
18
|
+
export declare const InfoBoxDefault: Story;
|
|
19
|
+
export declare const InfoBoxCustomBackground: Story;
|
|
20
|
+
export declare const InfoBoxWithChildren: Story;
|
|
21
|
+
export declare const InfoBoxSU2C: Story;
|
|
22
|
+
export declare const InfoBoxBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { FunctionComponent, HTMLAttributes, Ref, ReactNode, ElementType } from "react";
|
|
2
|
-
import { SpacingProps } from "../Spacing";
|
|
3
|
-
export type InfoBoxProps = SpacingProps & HTMLAttributes<HTMLElement> & {
|
|
4
|
-
/** background color of wrapping element, this will add default padding */
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
-
/** Title text */
|
|
7
|
-
titleText: string;
|
|
8
|
-
/** Title text colour */
|
|
9
|
-
titleTextColor?: string;
|
|
10
|
-
/** Description text */
|
|
11
|
-
descriptionText: string;
|
|
12
|
-
/** Description text colour */
|
|
13
|
-
descriptionTextColor?: string;
|
|
14
|
-
/** Space for extra element underneath description */
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
/** Icon in left column usually 2em squared */
|
|
17
|
-
icon?: ReactNode;
|
|
18
|
-
ref?: Ref<HTMLElement>;
|
|
19
|
-
/** styled-component polymorphic feature so you take the styling of a box and cast the component to be a "span" for example */
|
|
20
|
-
as?: ElementType;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Box is used to wrap other components to add margin and padding. The values will be in the t-shirt sizes specified in the theme sizes.
|
|
1
|
+
import { FunctionComponent, HTMLAttributes, Ref, ReactNode, ElementType } from "react";
|
|
2
|
+
import { SpacingProps } from "../Spacing";
|
|
3
|
+
export type InfoBoxProps = SpacingProps & HTMLAttributes<HTMLElement> & {
|
|
4
|
+
/** background color of wrapping element, this will add default padding */
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
/** Title text */
|
|
7
|
+
titleText: string;
|
|
8
|
+
/** Title text colour */
|
|
9
|
+
titleTextColor?: string;
|
|
10
|
+
/** Description text */
|
|
11
|
+
descriptionText: string;
|
|
12
|
+
/** Description text colour */
|
|
13
|
+
descriptionTextColor?: string;
|
|
14
|
+
/** Space for extra element underneath description */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/** Icon in left column usually 2em squared */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
ref?: Ref<HTMLElement>;
|
|
19
|
+
/** styled-component polymorphic feature so you take the styling of a box and cast the component to be a "span" for example */
|
|
20
|
+
as?: ElementType;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Box is used to wrap other components to add margin and padding. The values will be in the t-shirt sizes specified in the theme sizes.
|
|
24
24
|
|
|
25
|
-
The more specific the the target the higher priority the css will have. For example `margin` will be overridden by the `marginVertical` or `marginHorizontal` props. `marginTop`, `marginBottom`, `marginLeft`, `marginRight` will override the the `marginVertical` and `marginHorizontal` props.
|
|
26
|
-
*/
|
|
27
|
-
declare const InfoBox: FunctionComponent<InfoBoxProps>;
|
|
28
|
-
export default InfoBox;
|
|
25
|
+
The more specific the the target the higher priority the css will have. For example `margin` will be overridden by the `marginVertical` or `marginHorizontal` props. `marginTop`, `marginBottom`, `marginLeft`, `marginRight` will override the the `marginVertical` and `marginHorizontal` props.
|
|
26
|
+
*/
|
|
27
|
+
declare const InfoBox: FunctionComponent<InfoBoxProps>;
|
|
28
|
+
export default InfoBox;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ThemeType } from "../../types";
|
|
3
|
-
import { BoxProps } from "../Box";
|
|
4
|
-
export declare const StyledInfoBox: import("styled-components").StyledComponent<import("react").FunctionComponent<BoxProps>, any, import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
|
|
5
|
-
backgroundColor?: string | undefined;
|
|
6
|
-
css?: string | undefined;
|
|
7
|
-
ref?: import("react").Ref<HTMLDivElement> | undefined;
|
|
8
|
-
children?: import("react").ReactNode;
|
|
9
|
-
as?: import("react").ElementType
|
|
10
|
-
} & {
|
|
11
|
-
css?: string | undefined;
|
|
12
|
-
theme: ThemeType;
|
|
13
|
-
}, never>;
|
|
14
|
-
export default StyledInfoBox;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeType } from "../../types";
|
|
3
|
+
import { BoxProps } from "../Box";
|
|
4
|
+
export declare const StyledInfoBox: import("styled-components").StyledComponent<import("react").FunctionComponent<BoxProps>, any, import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
|
|
5
|
+
backgroundColor?: string | undefined;
|
|
6
|
+
css?: string | undefined;
|
|
7
|
+
ref?: import("react").Ref<HTMLDivElement> | undefined;
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
as?: import("react").ElementType | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
css?: string | undefined;
|
|
12
|
+
theme: ThemeType;
|
|
13
|
+
}, never>;
|
|
14
|
+
export default StyledInfoBox;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { LabelHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
type LabelWrapperProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3
|
-
/** label text */
|
|
4
|
-
label: string;
|
|
5
|
-
/** hint text or react element in it's place */
|
|
6
|
-
hintText?: ReactNode;
|
|
7
|
-
/** when required (required) appears in label */
|
|
8
|
-
required?: boolean;
|
|
9
|
-
/** flag to stop (required) appearing in label, useful for compound form components like DateInput */
|
|
10
|
-
hideRequiredInLabel?: boolean;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
};
|
|
13
|
-
export declare const LabelWrapper: {
|
|
14
|
-
({ label, hintText, required, hideRequiredInLabel, children, ...otherHTMLLabelProps }: LabelWrapperProps): JSX.Element;
|
|
15
|
-
defaultProps: {
|
|
16
|
-
required: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export default LabelWrapper;
|
|
1
|
+
import { LabelHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
type LabelWrapperProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3
|
+
/** label text */
|
|
4
|
+
label: string;
|
|
5
|
+
/** hint text or react element in it's place */
|
|
6
|
+
hintText?: ReactNode;
|
|
7
|
+
/** when required (required) appears in label */
|
|
8
|
+
required?: boolean;
|
|
9
|
+
/** flag to stop (required) appearing in label, useful for compound form components like DateInput */
|
|
10
|
+
hideRequiredInLabel?: boolean;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const LabelWrapper: {
|
|
14
|
+
({ label, hintText, required, hideRequiredInLabel, children, ...otherHTMLLabelProps }: LabelWrapperProps): JSX.Element;
|
|
15
|
+
defaultProps: {
|
|
16
|
+
required: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default LabelWrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ThemeType } from "../../types";
|
|
2
|
-
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
3
|
-
export declare const LabelText: import("styled-components").StyledComponent<"span", any, {
|
|
4
|
-
hasHintText: boolean;
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
}, never>;
|
|
1
|
+
import { ThemeType } from "../../types";
|
|
2
|
+
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
3
|
+
export declare const LabelText: import("styled-components").StyledComponent<"span", any, {
|
|
4
|
+
hasHintText: boolean;
|
|
5
|
+
theme: ThemeType;
|
|
6
|
+
}, never>;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LegendWrapperProps } from ".";
|
|
3
|
-
declare const _default:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import LegendWrapper, { LegendWrapperProps } from ".";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => JSX.Element;
|
|
6
|
+
args: {
|
|
7
|
+
legendText: string;
|
|
8
|
+
hintText: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
type Story = StoryObj<typeof LegendWrapper>;
|
|
14
|
+
export declare const LegendWrapperRadio: Story;
|
|
15
|
+
export declare const LegendWrapperRadioError: Story;
|
|
16
|
+
export declare const LegendWrapperCheckbox: Story;
|
|
17
|
+
export declare const LegendWrapperCheckboxError: Story;
|
|
18
|
+
export declare const LegendWrapperRadioSU2C: Story;
|
|
19
|
+
export declare const LegendWrapperRadioErrorSU2C: Story;
|
|
20
|
+
export declare const LegendWrapperRadioBowelbabe: Story;
|
|
21
|
+
export declare const LegendWrapperRadioErrorBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
export type LegendWrapperProps = HTMLAttributes<HTMLLegendElement> & {
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
/** legend text */
|
|
5
|
-
legendText: string;
|
|
6
|
-
/** error message text */
|
|
7
|
-
errorMessage?: string;
|
|
8
|
-
/** flag for error styling */
|
|
9
|
-
hasError?: boolean;
|
|
10
|
-
/** when required (required) appears in legend */
|
|
11
|
-
required?: boolean;
|
|
12
|
-
/** hint text */
|
|
13
|
-
hintText?: ReactNode;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* LegendWrapper allows the user to add an outer label for a checkbox / group of checkboxes / radio buttons or a group of radio buttons.
|
|
17
|
-
*
|
|
18
|
-
* hasError and errorMessage props are just props that can be passed into the component.
|
|
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
|
-
*/
|
|
21
|
-
export declare const LegendWrapper: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => JSX.Element;
|
|
22
|
-
export default LegendWrapper;
|
|
1
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export type LegendWrapperProps = HTMLAttributes<HTMLLegendElement> & {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
/** legend text */
|
|
5
|
+
legendText: string;
|
|
6
|
+
/** error message text */
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
/** flag for error styling */
|
|
9
|
+
hasError?: boolean;
|
|
10
|
+
/** when required (required) appears in legend */
|
|
11
|
+
required?: boolean;
|
|
12
|
+
/** hint text */
|
|
13
|
+
hintText?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* LegendWrapper allows the user to add an outer label for a checkbox / group of checkboxes / radio buttons or a group of radio buttons.
|
|
17
|
+
*
|
|
18
|
+
* hasError and errorMessage props are just props that can be passed into the component.
|
|
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
|
+
*/
|
|
21
|
+
export declare const LegendWrapper: ({ children, legendText, required, errorMessage, hasError, hintText, ...restOfHTMLAttributes }: LegendWrapperProps) => JSX.Element;
|
|
22
|
+
export default LegendWrapper;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ThemeType } from "../../types";
|
|
2
|
-
type StyledFieldsetProps = {
|
|
3
|
-
hasError?: boolean;
|
|
4
|
-
theme: ThemeType;
|
|
5
|
-
hasHintText?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare const LegendSpan: import("styled-components").StyledComponent<"span", any, {
|
|
8
|
-
hasHintText: boolean;
|
|
9
|
-
theme: ThemeType;
|
|
10
|
-
}, never>;
|
|
11
|
-
export declare const StyledFieldset: import("styled-components").StyledComponent<"fieldset", any, StyledFieldsetProps, never>;
|
|
12
|
-
export {};
|
|
1
|
+
import { ThemeType } from "../../types";
|
|
2
|
+
type StyledFieldsetProps = {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
theme: ThemeType;
|
|
5
|
+
hasHintText?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const LegendSpan: import("styled-components").StyledComponent<"span", any, {
|
|
8
|
+
hasHintText: boolean;
|
|
9
|
+
theme: ThemeType;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const StyledFieldset: import("styled-components").StyledComponent<"fieldset", any, StyledFieldsetProps, never>;
|
|
12
|
+
export {};
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import Link from ".";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<Pick<Omit<React.AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<import("../Text").TextProps, "ref" | "nonce" | "as"> & {
|
|
7
|
+
textHoverColor?: string | undefined;
|
|
8
|
+
appearance?: "primary" | "secondary" | undefined;
|
|
9
|
+
ref?: React.Ref<HTMLElement> | undefined;
|
|
10
|
+
as?: React.ElementType | undefined;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}, "slot" | "style" | "title" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | keyof import("../Spacing").SpacingProps | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | "textSize" | "textAlign" | "textColor" | "wordBreak" | "overflowWrap" | "referrerPolicy" | "appearance" | "href" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "textWeight" | "textHoverColor"> & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
args: {
|
|
14
|
+
appearance: undefined;
|
|
15
|
+
href: string;
|
|
16
|
+
children: string;
|
|
17
|
+
rel: undefined;
|
|
18
|
+
target: undefined;
|
|
19
|
+
};
|
|
20
|
+
tags: string[];
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
type Story = StoryObj<typeof Link>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const Primary: Story;
|
|
26
|
+
export declare const Secondary: Story;
|
|
27
|
+
export declare const WithImage: Story;
|
|
28
|
+
export declare const DefaultSU2C: Story;
|
|
29
|
+
export declare const PrimarySU2C: Story;
|
|
30
|
+
export declare const SecondarySU2C: Story;
|
|
31
|
+
export declare const DefaultBowelbabe: Story;
|
|
32
|
+
export declare const PrimaryBowelbabe: Story;
|
|
33
|
+
export declare const SecondaryBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import React, { AnchorHTMLAttributes, Ref, ElementType, ReactNode } from "react";
|
|
2
|
-
import { TextProps } from "../Text";
|
|
3
|
-
export type LinkProps = Omit<AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<TextProps, "as" | "ref" | "nonce"> & {
|
|
4
|
-
/** link text hover colour */
|
|
5
|
-
textHoverColor?: string;
|
|
6
|
-
/** link appearance variant, undefined is a standarding link withing a text block */
|
|
7
|
-
appearance?: "primary" | "secondary";
|
|
8
|
-
/** styled-components polymorphism where you can use the styling of a link but convert to another element like a button */
|
|
9
|
-
ref?: Ref<HTMLElement>;
|
|
10
|
-
/** styled-component polymorphic feature so you take the styling of a link and cast the component to be a "span" for example */
|
|
11
|
-
as?: ElementType;
|
|
12
|
-
/** Component children */
|
|
13
|
-
children?: ReactNode;
|
|
14
|
-
};
|
|
15
|
-
/** Links are for wrapping plain text or elements to create clickable link.
|
|
16
|
-
* This is to be treated as an anchor tag with the addition of the Text component API.
|
|
17
|
-
* This component contains standard Anchor tag props like 'href' and 'target', but it also contains Text component props like 'textColor' and 'textAlign'.
|
|
18
|
-
*
|
|
19
|
-
* A link should really only be used for navigation to take a user to as new location.
|
|
20
|
-
* The onClick handler can be use for more complicated scenarios.
|
|
21
|
-
*
|
|
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
|
-
*
|
|
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<Pick<Omit<React.AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<TextProps, "nonce" | "as" | "ref"> & {
|
|
26
|
-
/** link text hover colour */
|
|
27
|
-
textHoverColor?: string | undefined;
|
|
28
|
-
/** link appearance variant, undefined is a standarding link withing a text block */
|
|
29
|
-
appearance?: "primary" | "secondary" | undefined;
|
|
30
|
-
/** styled-components polymorphism where you can use the styling of a link but convert to another element like a button */
|
|
31
|
-
ref?: React.Ref<HTMLElement> | undefined;
|
|
32
|
-
/** styled-component polymorphic feature so you take the styling of a link and cast the component to be a "span" for example */
|
|
33
|
-
as?: React.ElementType
|
|
34
|
-
/** Component children */
|
|
35
|
-
children?: ReactNode;
|
|
36
|
-
}, "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | keyof import("../Spacing").SpacingProps | "textColor" | "textAlign" | "textSize" | "textWeight" | "wordBreak" | "overflowWrap" | "textHoverColor" | "appearance"> & React.RefAttributes<HTMLElement>>;
|
|
37
|
-
export default Link;
|
|
1
|
+
import React, { AnchorHTMLAttributes, Ref, ElementType, ReactNode } from "react";
|
|
2
|
+
import { TextProps } from "../Text";
|
|
3
|
+
export type LinkProps = Omit<AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<TextProps, "as" | "ref" | "nonce"> & {
|
|
4
|
+
/** link text hover colour */
|
|
5
|
+
textHoverColor?: string;
|
|
6
|
+
/** link appearance variant, undefined is a standarding link withing a text block */
|
|
7
|
+
appearance?: "primary" | "secondary";
|
|
8
|
+
/** styled-components polymorphism where you can use the styling of a link but convert to another element like a button */
|
|
9
|
+
ref?: Ref<HTMLElement>;
|
|
10
|
+
/** styled-component polymorphic feature so you take the styling of a link and cast the component to be a "span" for example */
|
|
11
|
+
as?: ElementType;
|
|
12
|
+
/** Component children */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/** Links are for wrapping plain text or elements to create clickable link.
|
|
16
|
+
* This is to be treated as an anchor tag with the addition of the Text component API.
|
|
17
|
+
* This component contains standard Anchor tag props like 'href' and 'target', but it also contains Text component props like 'textColor' and 'textAlign'.
|
|
18
|
+
*
|
|
19
|
+
* A link should really only be used for navigation to take a user to as new location.
|
|
20
|
+
* The onClick handler can be use for more complicated scenarios.
|
|
21
|
+
*
|
|
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
|
+
*
|
|
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<Pick<Omit<React.AnchorHTMLAttributes<HTMLElement>, "nonce"> & Omit<TextProps, "nonce" | "as" | "ref"> & {
|
|
26
|
+
/** link text hover colour */
|
|
27
|
+
textHoverColor?: string | undefined;
|
|
28
|
+
/** link appearance variant, undefined is a standarding link withing a text block */
|
|
29
|
+
appearance?: "primary" | "secondary" | undefined;
|
|
30
|
+
/** styled-components polymorphism where you can use the styling of a link but convert to another element like a button */
|
|
31
|
+
ref?: React.Ref<HTMLElement> | undefined;
|
|
32
|
+
/** styled-component polymorphic feature so you take the styling of a link and cast the component to be a "span" for example */
|
|
33
|
+
as?: React.ElementType | undefined;
|
|
34
|
+
/** Component children */
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
}, "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | keyof import("../Spacing").SpacingProps | "textColor" | "textAlign" | "textSize" | "textWeight" | "wordBreak" | "overflowWrap" | "textHoverColor" | "appearance"> & React.RefAttributes<HTMLElement>>;
|
|
37
|
+
export default Link;
|