@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,22 +1,22 @@
|
|
|
1
|
-
import { SpacingProps } from "../Spacing";
|
|
2
|
-
import { WordBreakType, FontSizeType, ThemeType, ColorKeyType, OverflowWrapType } from "../../types";
|
|
3
|
-
export type TextStyledProps = SpacingProps & {
|
|
4
|
-
textColor?: ColorKeyType;
|
|
5
|
-
textAlign?: "left" | "right" | "center" | "justify";
|
|
6
|
-
textSize?: FontSizeType;
|
|
7
|
-
textWeight?: number;
|
|
8
|
-
as?: any;
|
|
9
|
-
wordBreak?: WordBreakType;
|
|
10
|
-
overflowWrap?: OverflowWrapType;
|
|
11
|
-
theme: ThemeType;
|
|
12
|
-
};
|
|
13
|
-
export declare const TextStyled: import("styled-components").StyledComponent<"p", any, SpacingProps & {
|
|
14
|
-
textColor?: keyof import("../../types").ColorsType | undefined;
|
|
15
|
-
textAlign?: "left" | "right" | "center" | "justify" | undefined;
|
|
16
|
-
textSize?: FontSizeType | undefined;
|
|
17
|
-
textWeight?: number | undefined;
|
|
18
|
-
as?: any;
|
|
19
|
-
wordBreak?: WordBreakType | undefined;
|
|
20
|
-
overflowWrap?: OverflowWrapType | undefined;
|
|
21
|
-
theme: ThemeType;
|
|
22
|
-
}, never>;
|
|
1
|
+
import { SpacingProps } from "../Spacing";
|
|
2
|
+
import { WordBreakType, FontSizeType, ThemeType, ColorKeyType, OverflowWrapType } from "../../types";
|
|
3
|
+
export type TextStyledProps = SpacingProps & {
|
|
4
|
+
textColor?: ColorKeyType;
|
|
5
|
+
textAlign?: "left" | "right" | "center" | "justify";
|
|
6
|
+
textSize?: FontSizeType;
|
|
7
|
+
textWeight?: number;
|
|
8
|
+
as?: any;
|
|
9
|
+
wordBreak?: WordBreakType;
|
|
10
|
+
overflowWrap?: OverflowWrapType;
|
|
11
|
+
theme: ThemeType;
|
|
12
|
+
};
|
|
13
|
+
export declare const TextStyled: import("styled-components").StyledComponent<"p", any, SpacingProps & {
|
|
14
|
+
textColor?: keyof import("../../types").ColorsType | undefined;
|
|
15
|
+
textAlign?: "left" | "right" | "center" | "justify" | undefined;
|
|
16
|
+
textSize?: FontSizeType | undefined;
|
|
17
|
+
textWeight?: number | undefined;
|
|
18
|
+
as?: any;
|
|
19
|
+
wordBreak?: WordBreakType | undefined;
|
|
20
|
+
overflowWrap?: OverflowWrapType | undefined;
|
|
21
|
+
theme: ThemeType;
|
|
22
|
+
}, never>;
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import TextAreaField, { TextAreaFieldProps } from ".";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FunctionComponent<TextAreaFieldProps>;
|
|
7
|
+
args: {
|
|
8
|
+
children: string;
|
|
9
|
+
textColor: string;
|
|
10
|
+
value: undefined;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
hintText: undefined;
|
|
15
|
+
resize: string;
|
|
16
|
+
lineCount: number;
|
|
17
|
+
hasError: boolean;
|
|
18
|
+
errorMessage: undefined;
|
|
19
|
+
};
|
|
20
|
+
tags: string[];
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
type Story = StoryObj<typeof TextAreaField>;
|
|
24
|
+
export declare const TextAreaFieldDefault: Story;
|
|
25
|
+
export declare const TextAreaFieldWithError: Story;
|
|
26
|
+
export declare const TextAreaFieldSU2C: Story;
|
|
27
|
+
export declare const TextAreaFieldWithErrorSU2C: Story;
|
|
28
|
+
export declare const TextAreaFielBowelbabe: Story;
|
|
29
|
+
export declare const TextAreaFieldWithErrorBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode, TextareaHTMLAttributes, Ref } from "react";
|
|
2
|
-
export type TextAreaFieldProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
3
|
-
/** error message text */
|
|
4
|
-
errorMessage?: string;
|
|
5
|
-
/** flag for error styling */
|
|
6
|
-
hasError?: boolean;
|
|
7
|
-
/** hint text */
|
|
8
|
-
hintText?: ReactNode;
|
|
9
|
-
/** label text */
|
|
10
|
-
label: string;
|
|
11
|
-
/** resize behaviour using the resize button on the bottom right of the component */
|
|
12
|
-
resize?: "both" | "vertical" | "horizontal" | "none";
|
|
13
|
-
/** number of visible lines of text before scroll is required this affect the height of the input field */
|
|
14
|
-
lineCount?: number;
|
|
15
|
-
/** react reference to the DOM element sometime used to scroll to or set focus after an error */
|
|
16
|
-
ref?: Ref<HTMLTextAreaElement>;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* TextAreaField lets users enter and edit multiline text.
|
|
20
|
-
*/
|
|
21
|
-
declare const TextField: FunctionComponent<TextAreaFieldProps>;
|
|
22
|
-
export default TextField;
|
|
1
|
+
import { FunctionComponent, ReactNode, TextareaHTMLAttributes, Ref } from "react";
|
|
2
|
+
export type TextAreaFieldProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
3
|
+
/** error message text */
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
/** flag for error styling */
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
/** hint text */
|
|
8
|
+
hintText?: ReactNode;
|
|
9
|
+
/** label text */
|
|
10
|
+
label: string;
|
|
11
|
+
/** resize behaviour using the resize button on the bottom right of the component */
|
|
12
|
+
resize?: "both" | "vertical" | "horizontal" | "none";
|
|
13
|
+
/** number of visible lines of text before scroll is required this affect the height of the input field */
|
|
14
|
+
lineCount?: number;
|
|
15
|
+
/** react reference to the DOM element sometime used to scroll to or set focus after an error */
|
|
16
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* TextAreaField lets users enter and edit multiline text.
|
|
20
|
+
*/
|
|
21
|
+
declare const TextField: FunctionComponent<TextAreaFieldProps>;
|
|
22
|
+
export default TextField;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ThemeType } from "../../types";
|
|
2
|
-
type StyledTextareaProps = {
|
|
3
|
-
hasError: boolean;
|
|
4
|
-
resize: "both" | "vertical" | "horizontal" | "none";
|
|
5
|
-
lineCount: number;
|
|
6
|
-
theme: ThemeType;
|
|
7
|
-
};
|
|
8
|
-
declare const StyledTextArea: import("styled-components").StyledComponent<"textarea", any, StyledTextareaProps, never>;
|
|
9
|
-
export default StyledTextArea;
|
|
10
|
-
export { StyledTextArea };
|
|
1
|
+
import { ThemeType } from "../../types";
|
|
2
|
+
type StyledTextareaProps = {
|
|
3
|
+
hasError: boolean;
|
|
4
|
+
resize: "both" | "vertical" | "horizontal" | "none";
|
|
5
|
+
lineCount: number;
|
|
6
|
+
theme: ThemeType;
|
|
7
|
+
};
|
|
8
|
+
declare const StyledTextArea: import("styled-components").StyledComponent<"textarea", any, StyledTextareaProps, never>;
|
|
9
|
+
export default StyledTextArea;
|
|
10
|
+
export { StyledTextArea };
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import TextField, { TextFieldProps } from ".";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FunctionComponent<TextFieldProps>;
|
|
7
|
+
args: {
|
|
8
|
+
value: undefined;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
required: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
hintText: string;
|
|
13
|
+
hasError: boolean;
|
|
14
|
+
errorMessage: undefined;
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
type Story = StoryObj<typeof TextField>;
|
|
20
|
+
export declare const TextFieldDefault: Story;
|
|
21
|
+
export declare const TextFieldExtraLeft: Story;
|
|
22
|
+
export declare const TextFieldExtraRight: Story;
|
|
23
|
+
export declare const TextFieldWithError: Story;
|
|
24
|
+
export declare const TextFieldSU2C: Story;
|
|
25
|
+
export declare const TextFieldWithErrorSU2C: Story;
|
|
26
|
+
export declare const TextFieldBowelbabe: Story;
|
|
27
|
+
export declare const TextFieldWithErrorBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { FunctionComponent, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
-
export type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
-
/** error message text */
|
|
4
|
-
errorMessage?: string;
|
|
5
|
-
/** custom component/text that appears underneath the input field */
|
|
6
|
-
extraBottom?: ReactNode;
|
|
7
|
-
/** custom component/text that appears to the left of the input field for example prefixes like "£" */
|
|
8
|
-
extraLeft?: ReactNode;
|
|
9
|
-
/** custom component/text that appears to the right of the input field for example a search button */
|
|
10
|
-
extraRight?: ReactNode;
|
|
11
|
-
/** custom component/text that appears above the input field for example a url domain */
|
|
12
|
-
extraTop?: ReactNode;
|
|
13
|
-
/** flag for error styling */
|
|
14
|
-
hasError?: boolean;
|
|
15
|
-
/** flag which controls the whether a cross icon or check icon is displayed to the right of the input field */
|
|
16
|
-
isValid?: boolean;
|
|
17
|
-
/** flag to hide or show the check icon when valid */
|
|
18
|
-
isValidVisible?: boolean;
|
|
19
|
-
/** flag to hide or show the cross icon when invalid */
|
|
20
|
-
isInvalidVisible?: boolean;
|
|
21
|
-
/** hint text */
|
|
22
|
-
hintText?: ReactNode;
|
|
23
|
-
/** label text */
|
|
24
|
-
label: string;
|
|
25
|
-
/** flag to stop (required) appearing in label, useful for compound form components like DateInput */
|
|
26
|
-
hideRequiredInLabel?: boolean;
|
|
27
|
-
/** react reference to the DOM element sometime used to scroll to or set focus after an error */
|
|
28
|
-
ref?: Ref<HTMLInputElement>;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* TextFields let users enter and edit text. For multiline text entry please consider using the TextAreaFieldComponent.
|
|
32
|
-
* */
|
|
33
|
-
declare const TextField: FunctionComponent<TextFieldProps>;
|
|
34
|
-
export default TextField;
|
|
1
|
+
import { FunctionComponent, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
export type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
/** error message text */
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
/** custom component/text that appears underneath the input field */
|
|
6
|
+
extraBottom?: ReactNode;
|
|
7
|
+
/** custom component/text that appears to the left of the input field for example prefixes like "£" */
|
|
8
|
+
extraLeft?: ReactNode;
|
|
9
|
+
/** custom component/text that appears to the right of the input field for example a search button */
|
|
10
|
+
extraRight?: ReactNode;
|
|
11
|
+
/** custom component/text that appears above the input field for example a url domain */
|
|
12
|
+
extraTop?: ReactNode;
|
|
13
|
+
/** flag for error styling */
|
|
14
|
+
hasError?: boolean;
|
|
15
|
+
/** flag which controls the whether a cross icon or check icon is displayed to the right of the input field */
|
|
16
|
+
isValid?: boolean;
|
|
17
|
+
/** flag to hide or show the check icon when valid */
|
|
18
|
+
isValidVisible?: boolean;
|
|
19
|
+
/** flag to hide or show the cross icon when invalid */
|
|
20
|
+
isInvalidVisible?: boolean;
|
|
21
|
+
/** hint text */
|
|
22
|
+
hintText?: ReactNode;
|
|
23
|
+
/** label text */
|
|
24
|
+
label: string;
|
|
25
|
+
/** flag to stop (required) appearing in label, useful for compound form components like DateInput */
|
|
26
|
+
hideRequiredInLabel?: boolean;
|
|
27
|
+
/** react reference to the DOM element sometime used to scroll to or set focus after an error */
|
|
28
|
+
ref?: Ref<HTMLInputElement>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* TextFields let users enter and edit text. For multiline text entry please consider using the TextAreaFieldComponent.
|
|
32
|
+
* */
|
|
33
|
+
declare const TextField: FunctionComponent<TextFieldProps>;
|
|
34
|
+
export default TextField;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ThemeType } from "../../types";
|
|
2
|
-
type ExtraProps = {
|
|
3
|
-
theme: ThemeType;
|
|
4
|
-
};
|
|
5
|
-
type StyledInputProps = {
|
|
6
|
-
hasError: boolean;
|
|
7
|
-
isValid: boolean;
|
|
8
|
-
theme: ThemeType;
|
|
9
|
-
isValidVisible?: boolean;
|
|
10
|
-
isInvalidVisible?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const Extra: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
13
|
-
export declare const ExtraLeft: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
14
|
-
export declare const ExtraRight: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
15
|
-
export declare const ExtraWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
|
-
export declare const StyledInputWrapper: import("styled-components").StyledComponent<"span", any, StyledInputProps, never>;
|
|
17
|
-
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, StyledInputProps, never>;
|
|
18
|
-
export {};
|
|
1
|
+
import { ThemeType } from "../../types";
|
|
2
|
+
type ExtraProps = {
|
|
3
|
+
theme: ThemeType;
|
|
4
|
+
};
|
|
5
|
+
type StyledInputProps = {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
theme: ThemeType;
|
|
9
|
+
isValidVisible?: boolean;
|
|
10
|
+
isInvalidVisible?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Extra: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
13
|
+
export declare const ExtraLeft: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
14
|
+
export declare const ExtraRight: import("styled-components").StyledComponent<"span", any, ExtraProps, never>;
|
|
15
|
+
export declare const ExtraWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
|
+
export declare const StyledInputWrapper: import("styled-components").StyledComponent<"span", any, StyledInputProps, never>;
|
|
17
|
+
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, StyledInputProps, never>;
|
|
18
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<{
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
} & {
|
|
5
|
-
theme?: any;
|
|
6
|
-
}>;
|
|
7
|
-
export default _default;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
} & {
|
|
5
|
+
theme?: any;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TotaliserProps } from ".";
|
|
3
|
-
declare const _default:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import Totaliser, { TotaliserProps } from ".";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ total, additionalAmount, giftAid, target, isCompact, summaryMessage, children, }: TotaliserProps) => JSX.Element;
|
|
6
|
+
args: {
|
|
7
|
+
total: number;
|
|
8
|
+
additionalAmount: number;
|
|
9
|
+
target: number;
|
|
10
|
+
giftAid: number;
|
|
11
|
+
};
|
|
12
|
+
tags: string[];
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
type Story = StoryObj<typeof Totaliser>;
|
|
16
|
+
export declare const TotaliserWithoutTarget: Story;
|
|
17
|
+
export declare const TotaliserTextSummaryMessage: Story;
|
|
18
|
+
export declare const TotaliserTextSummaryMessageAsComponent: Story;
|
|
19
|
+
export declare const TotaliserCompact: Story;
|
|
20
|
+
export declare const TotaliserWithoutTargetSU2C: Story;
|
|
21
|
+
export declare const TotaliserTextSummaryMessageSU2C: Story;
|
|
22
|
+
export declare const TotaliserTextSummaryMessageAsComponentSU2C: Story;
|
|
23
|
+
export declare const TotaliserCompactSU2C: Story;
|
|
24
|
+
export declare const TotaliserWithoutTargetBowelbabe: Story;
|
|
25
|
+
export declare const TotaliserTextSummaryMessageBowelbabe: Story;
|
|
26
|
+
export declare const TotaliserTextSummaryMessageAsComponentBowelbabe: Story;
|
|
27
|
+
export declare const TotaliserCompactBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ReactChild, ReactNode } from "react";
|
|
2
|
-
export type TotaliserProps = {
|
|
3
|
-
/** financial total as a number */
|
|
4
|
-
total: number;
|
|
5
|
-
/** additional donation amount as a number */
|
|
6
|
-
additionalAmount?: number;
|
|
7
|
-
/** git aid total as a number */
|
|
8
|
-
giftAid?: number;
|
|
9
|
-
/** money target as a number */
|
|
10
|
-
target?: number | null;
|
|
11
|
-
/** flag for low height compact appearance */
|
|
12
|
-
isCompact?: boolean;
|
|
13
|
-
/** component for custom summary message underneath total graph only visible if there is a target */
|
|
14
|
-
summaryMessage?: ReactChild;
|
|
15
|
-
/** component children */
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Think Blue Peter, used to display total raised and if target prop is passed will display tercentage of target reached.
|
|
20
|
-
* */
|
|
21
|
-
declare const Totaliser: ({ total, additionalAmount, giftAid, target, isCompact, summaryMessage, children, }: TotaliserProps) => JSX.Element;
|
|
22
|
-
export default Totaliser;
|
|
1
|
+
import { ReactChild, ReactNode } from "react";
|
|
2
|
+
export type TotaliserProps = {
|
|
3
|
+
/** financial total as a number */
|
|
4
|
+
total: number;
|
|
5
|
+
/** additional donation amount as a number */
|
|
6
|
+
additionalAmount?: number;
|
|
7
|
+
/** git aid total as a number */
|
|
8
|
+
giftAid?: number;
|
|
9
|
+
/** money target as a number */
|
|
10
|
+
target?: number | null;
|
|
11
|
+
/** flag for low height compact appearance */
|
|
12
|
+
isCompact?: boolean;
|
|
13
|
+
/** component for custom summary message underneath total graph only visible if there is a target */
|
|
14
|
+
summaryMessage?: ReactChild;
|
|
15
|
+
/** component children */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Think Blue Peter, used to display total raised and if target prop is passed will display tercentage of target reached.
|
|
20
|
+
* */
|
|
21
|
+
declare const Totaliser: ({ total, additionalAmount, giftAid, target, isCompact, summaryMessage, children, }: TotaliserProps) => JSX.Element;
|
|
22
|
+
export default Totaliser;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeType } from "../../types";
|
|
3
|
+
type ThemeProps = {
|
|
4
|
+
theme: ThemeType;
|
|
5
|
+
};
|
|
6
|
+
export declare const BubbleWrapper: import("styled-components").StyledComponent<"div", any, ThemeProps, never>;
|
|
7
|
+
export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
isCompact?: boolean | undefined;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const Total: import("styled-components").StyledComponent<"p", any, ThemeProps, never>;
|
|
11
|
+
export declare const BubbleText: import("styled-components").StyledComponent<"p", any, ThemeProps, never>;
|
|
12
|
+
export declare const GiftAid: import("styled-components").StyledComponent<"p", any, ThemeProps, never>;
|
|
13
|
+
export declare const Summary: import("styled-components").StyledComponent<"span", any, ThemeProps, never>;
|
|
14
|
+
type TotaliserWrapperProps = {
|
|
15
|
+
isCompact: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const TotaliserWrapper: import("styled-components").StyledComponent<"div", any, TotaliserWrapperProps, never>;
|
|
18
|
+
export declare const CompactWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const StyledProgressBar: import("styled-components").StyledComponent<({ percentage, isCircular, circleContents, circleSize, barColor, secondaryBarColor, secondaryPercentage, children, }: import("../ProgressBar").ProgressBarProps) => JSX.Element, any, {}, never>;
|
|
20
|
+
export {};
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UserBlockProps } from ".";
|
|
3
|
-
declare const _default:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import UserBlock, { UserBlockProps } from ".";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ name, avatarName, avatarUrl, extra, size, }: UserBlockProps) => JSX.Element;
|
|
6
|
+
args: {
|
|
7
|
+
name: string;
|
|
8
|
+
size: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
type Story = StoryObj<typeof UserBlock>;
|
|
14
|
+
export declare const UserBlockDefault: Story;
|
|
15
|
+
export declare const UserBlockCustomAvatar: Story;
|
|
16
|
+
export declare const UserBlockWithExtra: Story;
|
|
17
|
+
export declare const UserBlockDefaultSU2C: Story;
|
|
18
|
+
export declare const UserBlockCustomAvatarSU2C: Story;
|
|
19
|
+
export declare const UserBlockWithExtraSU2C: Story;
|
|
20
|
+
export declare const ErrorTextBowelbabe: Story;
|
|
21
|
+
export declare const UserBlockDefaultBowelbabe: Story;
|
|
22
|
+
export declare const UserBlockCustomAvatarBowelbabe: Story;
|
|
23
|
+
export declare const UserBlockWithExtraBowelbabe: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ReactNode, HTMLAttributes } from "react";
|
|
2
|
-
export type UserBlockProps = HTMLAttributes<HTMLElement> & {
|
|
3
|
-
/** name component or text */
|
|
4
|
-
name?: ReactNode;
|
|
5
|
-
/** string name used in avatar component */
|
|
6
|
-
avatarName?: string | null;
|
|
7
|
-
/** avatar image url */
|
|
8
|
-
avatarUrl?: string | null;
|
|
9
|
-
/** extra content component appears underneath name */
|
|
10
|
-
extra?: ReactNode;
|
|
11
|
-
/** size of avatar component */
|
|
12
|
-
size?: "s" | "m" | "l" | "xl";
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Display an avatar with title and subtitle
|
|
16
|
-
*/
|
|
17
|
-
declare const UserBlock: ({ name, avatarName, avatarUrl, extra, size, }: UserBlockProps) => JSX.Element;
|
|
18
|
-
export default UserBlock;
|
|
1
|
+
import { ReactNode, HTMLAttributes } from "react";
|
|
2
|
+
export type UserBlockProps = HTMLAttributes<HTMLElement> & {
|
|
3
|
+
/** name component or text */
|
|
4
|
+
name?: ReactNode;
|
|
5
|
+
/** string name used in avatar component */
|
|
6
|
+
avatarName?: string | null;
|
|
7
|
+
/** avatar image url */
|
|
8
|
+
avatarUrl?: string | null;
|
|
9
|
+
/** extra content component appears underneath name */
|
|
10
|
+
extra?: ReactNode;
|
|
11
|
+
/** size of avatar component */
|
|
12
|
+
size?: "s" | "m" | "l" | "xl";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Display an avatar with title and subtitle
|
|
16
|
+
*/
|
|
17
|
+
declare const UserBlock: ({ name, avatarName, avatarUrl, extra, size, }: UserBlockProps) => JSX.Element;
|
|
18
|
+
export default UserBlock;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ThemeType } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
theme: ThemeType;
|
|
4
|
+
};
|
|
5
|
+
export declare const StyledUserBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const Details: import("styled-components").StyledComponent<"div", any, Props, never>;
|
|
7
|
+
export declare const Name: import("styled-components").StyledComponent<"div", any, Props, never>;
|
|
8
|
+
export declare const Extra: import("styled-components").StyledComponent<"div", any, Props, never>;
|
|
9
|
+
export {};
|