@cruk/cruk-react-components 0.1.5 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +8 -1
  3. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  4. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  5. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  6. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  7. package/lib/cjs/src/components/AddressLookup/index.js +1 -1
  8. package/lib/cjs/src/components/Avatar/README.md.js +1 -1
  9. package/lib/cjs/src/components/Avatar/README.md.js.map +1 -1
  10. package/lib/cjs/src/components/Avatar/index.js +1 -1
  11. package/lib/cjs/src/components/Avatar/styles.js +1 -1
  12. package/lib/cjs/src/components/Badge/styles.js +1 -1
  13. package/lib/cjs/src/components/Box/styles.js +1 -1
  14. package/lib/cjs/src/components/Button/README.md.js +1 -1
  15. package/lib/cjs/src/components/Button/README.md.js.map +1 -1
  16. package/lib/cjs/src/components/Button/index.js +1 -1
  17. package/lib/cjs/src/components/Button/styles.js +1 -1
  18. package/lib/cjs/src/components/Checkbox/README.md.js +1 -1
  19. package/lib/cjs/src/components/Checkbox/README.md.js.map +1 -1
  20. package/lib/cjs/src/components/Checkbox/index.js +1 -1
  21. package/lib/cjs/src/components/Checkbox/styles.js +1 -1
  22. package/lib/cjs/src/components/Collapse/index.js +1 -1
  23. package/lib/cjs/src/components/Collapse/styles.js +1 -1
  24. package/lib/cjs/src/components/Divider.js +1 -1
  25. package/lib/cjs/src/components/ErrorText/index.js +1 -1
  26. package/lib/cjs/src/components/ErrorText/styles.js +1 -1
  27. package/lib/cjs/src/components/Flex.js +1 -1
  28. package/lib/cjs/src/components/Footer/index.js +1 -1
  29. package/lib/cjs/src/components/GlobalStyle.js +1 -1
  30. package/lib/cjs/src/components/Header/index.js +1 -1
  31. package/lib/cjs/src/components/Header/styles.js +1 -1
  32. package/lib/cjs/src/components/Heading/styles.js +1 -1
  33. package/lib/cjs/src/components/Icon/index.js +1 -1
  34. package/lib/cjs/src/components/Icon/styles.js +1 -1
  35. package/lib/cjs/src/components/Link/styles.js +1 -1
  36. package/lib/cjs/src/components/Modal/index.js +1 -1
  37. package/lib/cjs/src/components/Modal/styles.js +1 -1
  38. package/lib/cjs/src/components/Pagination/index.js +1 -1
  39. package/lib/cjs/src/components/Pagination/styles.js +1 -1
  40. package/lib/cjs/src/components/PopOver/README.md.js +1 -1
  41. package/lib/cjs/src/components/PopOver/README.md.js.map +1 -1
  42. package/lib/cjs/src/components/PopOver/index.js +1 -1
  43. package/lib/cjs/src/components/PopOver/styles.js +1 -1
  44. package/lib/cjs/src/components/ProgressBar/index.js +1 -1
  45. package/lib/cjs/src/components/ProgressBar/styles.js +1 -1
  46. package/lib/cjs/src/components/Radio/README.md.js +1 -1
  47. package/lib/cjs/src/components/Radio/README.md.js.map +1 -1
  48. package/lib/cjs/src/components/Radio/index.js +1 -1
  49. package/lib/cjs/src/components/Radio/styles.js +1 -1
  50. package/lib/cjs/src/components/RadioConsent/README.md.js +2 -0
  51. package/lib/cjs/src/components/RadioConsent/README.md.js.map +1 -0
  52. package/lib/cjs/src/components/{RadioGroup → RadioConsent}/index.js +0 -0
  53. package/lib/cjs/src/components/{RadioGroup → RadioConsent}/index.js.map +0 -0
  54. package/lib/cjs/src/components/RadioConsent/styles.js +2 -0
  55. package/lib/cjs/src/components/{RadioGroup → RadioConsent}/styles.js.map +0 -0
  56. package/lib/cjs/src/components/Select/index.js +1 -1
  57. package/lib/cjs/src/components/Select/styles.js +1 -1
  58. package/lib/cjs/src/components/Spacing/index.js +1 -1
  59. package/lib/cjs/src/components/Step/index.js +1 -1
  60. package/lib/cjs/src/components/Step/styles.js +1 -1
  61. package/lib/cjs/src/components/Text/styles.js +1 -1
  62. package/lib/cjs/src/components/TextAreaField/README.md.js +1 -1
  63. package/lib/cjs/src/components/TextAreaField/README.md.js.map +1 -1
  64. package/lib/cjs/src/components/TextAreaField/index.js +1 -1
  65. package/lib/cjs/src/components/TextAreaField/styles.js +1 -1
  66. package/lib/cjs/src/components/TextField/README.md.js +1 -1
  67. package/lib/cjs/src/components/TextField/README.md.js.map +1 -1
  68. package/lib/cjs/src/components/TextField/index.js +1 -1
  69. package/lib/cjs/src/components/TextField/styles.js +1 -1
  70. package/lib/cjs/src/components/Totaliser/README.md.js +1 -1
  71. package/lib/cjs/src/components/Totaliser/README.md.js.map +1 -1
  72. package/lib/cjs/src/components/Totaliser/index.js +1 -1
  73. package/lib/cjs/src/components/Totaliser/styles.js +1 -1
  74. package/lib/cjs/src/components/UserBlock/index.js +1 -1
  75. package/lib/cjs/src/components/index.js +1 -1
  76. package/lib/cjs/src/hooks/useLayoutEffectBrowser.js +1 -1
  77. package/lib/cjs/src/hooks/useScrollPosition.js +1 -1
  78. package/lib/cjs/src/themes/cruk.js +1 -1
  79. package/lib/cjs/src/themes/su2c.js +1 -1
  80. package/lib/cjs/src/utils/Helper.js +1 -1
  81. package/lib/components/AddressLookup/AddressLookup.stories.d.ts +2 -2
  82. package/lib/components/AddressLookup/index.d.ts +3 -3
  83. package/lib/components/AddressLookup/styles.d.ts +2 -2
  84. package/lib/components/Avatar/Avatar.stories.d.ts +2 -2
  85. package/lib/components/Avatar/index.d.ts +3 -3
  86. package/lib/components/Avatar/styles.d.ts +3 -1
  87. package/lib/components/Badge/Badge.stories.d.ts +2 -2
  88. package/lib/components/Badge/index.d.ts +2 -2
  89. package/lib/components/Badge/styles.d.ts +2 -2
  90. package/lib/components/Box/Box.stories.d.ts +2 -2
  91. package/lib/components/Box/index.d.ts +3 -3
  92. package/lib/components/Box/styles.d.ts +8 -7
  93. package/lib/components/Button/Button.stories.d.ts +2 -2
  94. package/lib/components/Button/index.d.ts +5 -3
  95. package/lib/components/Button/styles.d.ts +3 -3
  96. package/lib/components/Checkbox/Checkbox.stories.d.ts +2 -2
  97. package/lib/components/Checkbox/index.d.ts +1 -1
  98. package/lib/components/Checkbox/styles.d.ts +2 -0
  99. package/lib/components/Collapse/Collapse.stories.d.ts +2 -2
  100. package/lib/components/Collapse/index.d.ts +2 -2
  101. package/lib/components/Collapse/styles.d.ts +2 -1
  102. package/lib/components/DateField/DateField.stories.d.ts +2 -2
  103. package/lib/components/DateField/index.d.ts +2 -2
  104. package/lib/components/Divider.d.ts +1 -1
  105. package/lib/components/ErrorText/ErrorText.stories.d.ts +2 -2
  106. package/lib/components/ErrorText/index.d.ts +4 -4
  107. package/lib/components/ErrorText/styles.d.ts +1 -0
  108. package/lib/components/Flex.d.ts +2 -5
  109. package/lib/components/Footer/Footer.stories.d.ts +2 -2
  110. package/lib/components/Footer/index.d.ts +1 -1
  111. package/lib/components/GlobalStyle.d.ts +4 -4
  112. package/lib/components/Header/Header.stories.d.ts +2 -2
  113. package/lib/components/Header/index.d.ts +2 -2
  114. package/lib/components/Heading/Heading.stories.d.ts +2 -2
  115. package/lib/components/Heading/index.d.ts +4 -4
  116. package/lib/components/Heading/styles.d.ts +43 -15
  117. package/lib/components/Icon/Icon.stories.d.ts +2 -2
  118. package/lib/components/Icon/index.d.ts +2 -2
  119. package/lib/components/Icon/styles.d.ts +1 -0
  120. package/lib/components/LabelWrapper/index.d.ts +1 -1
  121. package/lib/components/LabelWrapper/styles.d.ts +1 -1
  122. package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +2 -2
  123. package/lib/components/LegendWrapper/index.d.ts +1 -1
  124. package/lib/components/LegendWrapper/styles.d.ts +3 -3
  125. package/lib/components/Link/Link.stories.d.ts +2 -2
  126. package/lib/components/Link/index.d.ts +4 -4
  127. package/lib/components/Link/styles.d.ts +15 -9
  128. package/lib/components/Loader/Loader.stories.d.ts +1 -1
  129. package/lib/components/Loader/index.d.ts +2 -2
  130. package/lib/components/Modal/Modal.stories.d.ts +2 -2
  131. package/lib/components/Modal/index.d.ts +3 -3
  132. package/lib/components/Pagination/Pagination.stories.d.ts +2 -2
  133. package/lib/components/Pagination/index.d.ts +4 -4
  134. package/lib/components/PopOver/Popover.stories.d.ts +2 -2
  135. package/lib/components/PopOver/index.d.ts +2 -2
  136. package/lib/components/PopOver/styles.d.ts +1 -1
  137. package/lib/components/ProgressBar/ProgressBar.stories.d.ts +2 -2
  138. package/lib/components/ProgressBar/index.d.ts +1 -1
  139. package/lib/components/ProgressBar/styles.d.ts +2 -2
  140. package/lib/components/Radio/Radio.stories.d.ts +2 -2
  141. package/lib/components/Radio/index.d.ts +1 -1
  142. package/lib/components/Radio/styles.d.ts +10 -3
  143. package/lib/components/RadioConsent/Radio.stories.d.ts +6 -0
  144. package/lib/components/RadioConsent/index.d.ts +24 -0
  145. package/lib/components/{RadioGroup → RadioConsent}/styles.d.ts +6 -3
  146. package/lib/components/{RadioGroup → RadioConsent}/test.cypress.d.ts +0 -0
  147. package/lib/components/Select/Selelct.stories.d.ts +2 -2
  148. package/lib/components/Select/index.d.ts +4 -1
  149. package/lib/components/Select/styles.d.ts +4 -3
  150. package/lib/components/Spacing/index.d.ts +1 -1
  151. package/lib/components/Step/Step.stories.d.ts +2 -2
  152. package/lib/components/Step/index.d.ts +1 -1
  153. package/lib/components/TestWrapper.d.ts +2 -2
  154. package/lib/components/Text/Text.stories.d.ts +2 -2
  155. package/lib/components/Text/index.d.ts +4 -4
  156. package/lib/components/Text/styles.d.ts +13 -5
  157. package/lib/components/TextAreaField/TextAreaField.stories.d.ts +2 -2
  158. package/lib/components/TextAreaField/index.d.ts +3 -3
  159. package/lib/components/TextAreaField/styles.d.ts +5 -4
  160. package/lib/components/TextField/TextField.stories.d.ts +2 -2
  161. package/lib/components/TextField/index.d.ts +1 -1
  162. package/lib/components/TextField/styles.d.ts +1 -1
  163. package/lib/components/ThemeCheatSheet.d.ts +4 -6
  164. package/lib/components/Totaliser/Totaliser.stories.d.ts +2 -2
  165. package/lib/components/Totaliser/index.d.ts +1 -1
  166. package/lib/components/Totaliser/styles.d.ts +6 -8
  167. package/lib/components/UserBlock/UserBlock.stories.d.ts +2 -2
  168. package/lib/components/UserBlock/index.d.ts +2 -2
  169. package/lib/components/index.d.ts +65 -65
  170. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  171. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  172. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  173. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  174. package/lib/es/src/components/AddressLookup/index.js +1 -1
  175. package/lib/es/src/components/Avatar/README.md.js +1 -1
  176. package/lib/es/src/components/Avatar/README.md.js.map +1 -1
  177. package/lib/es/src/components/Avatar/index.js +1 -1
  178. package/lib/es/src/components/Avatar/styles.js +1 -1
  179. package/lib/es/src/components/Badge/styles.js +1 -1
  180. package/lib/es/src/components/Box/styles.js +1 -1
  181. package/lib/es/src/components/Button/README.md.js +1 -1
  182. package/lib/es/src/components/Button/README.md.js.map +1 -1
  183. package/lib/es/src/components/Button/index.js +1 -1
  184. package/lib/es/src/components/Button/styles.js +1 -1
  185. package/lib/es/src/components/Checkbox/README.md.js +1 -1
  186. package/lib/es/src/components/Checkbox/README.md.js.map +1 -1
  187. package/lib/es/src/components/Checkbox/index.js +1 -1
  188. package/lib/es/src/components/Checkbox/styles.js +1 -1
  189. package/lib/es/src/components/Collapse/index.js +1 -1
  190. package/lib/es/src/components/Collapse/styles.js +1 -1
  191. package/lib/es/src/components/Divider.js +1 -1
  192. package/lib/es/src/components/ErrorText/index.js +1 -1
  193. package/lib/es/src/components/ErrorText/styles.js +1 -1
  194. package/lib/es/src/components/Flex.js +1 -1
  195. package/lib/es/src/components/Footer/index.js +1 -1
  196. package/lib/es/src/components/GlobalStyle.js +1 -1
  197. package/lib/es/src/components/Header/index.js +1 -1
  198. package/lib/es/src/components/Header/styles.js +1 -1
  199. package/lib/es/src/components/Heading/styles.js +1 -1
  200. package/lib/es/src/components/Icon/index.js +1 -1
  201. package/lib/es/src/components/Icon/styles.js +1 -1
  202. package/lib/es/src/components/Link/styles.js +1 -1
  203. package/lib/es/src/components/Modal/index.js +1 -1
  204. package/lib/es/src/components/Modal/styles.js +1 -1
  205. package/lib/es/src/components/Pagination/index.js +1 -1
  206. package/lib/es/src/components/Pagination/styles.js +1 -1
  207. package/lib/es/src/components/PopOver/README.md.js +1 -1
  208. package/lib/es/src/components/PopOver/README.md.js.map +1 -1
  209. package/lib/es/src/components/PopOver/index.js +1 -1
  210. package/lib/es/src/components/PopOver/styles.js +1 -1
  211. package/lib/es/src/components/ProgressBar/index.js +1 -1
  212. package/lib/es/src/components/ProgressBar/styles.js +1 -1
  213. package/lib/es/src/components/Radio/README.md.js +1 -1
  214. package/lib/es/src/components/Radio/README.md.js.map +1 -1
  215. package/lib/es/src/components/Radio/index.js +1 -1
  216. package/lib/es/src/components/Radio/styles.js +1 -1
  217. package/lib/es/src/components/RadioConsent/README.md.js +2 -0
  218. package/lib/es/src/components/RadioConsent/README.md.js.map +1 -0
  219. package/lib/es/src/components/{RadioGroup → RadioConsent}/index.js +0 -0
  220. package/lib/es/src/components/{RadioGroup → RadioConsent}/index.js.map +0 -0
  221. package/lib/es/src/components/RadioConsent/styles.js +2 -0
  222. package/lib/es/src/components/{RadioGroup → RadioConsent}/styles.js.map +0 -0
  223. package/lib/es/src/components/Select/index.js +1 -1
  224. package/lib/es/src/components/Select/styles.js +1 -1
  225. package/lib/es/src/components/Spacing/index.js +1 -1
  226. package/lib/es/src/components/Step/index.js +1 -1
  227. package/lib/es/src/components/Step/styles.js +1 -1
  228. package/lib/es/src/components/Text/styles.js +1 -1
  229. package/lib/es/src/components/TextAreaField/README.md.js +1 -1
  230. package/lib/es/src/components/TextAreaField/README.md.js.map +1 -1
  231. package/lib/es/src/components/TextAreaField/index.js +1 -1
  232. package/lib/es/src/components/TextAreaField/styles.js +1 -1
  233. package/lib/es/src/components/TextField/README.md.js +1 -1
  234. package/lib/es/src/components/TextField/README.md.js.map +1 -1
  235. package/lib/es/src/components/TextField/index.js +1 -1
  236. package/lib/es/src/components/TextField/styles.js +1 -1
  237. package/lib/es/src/components/Totaliser/README.md.js +1 -1
  238. package/lib/es/src/components/Totaliser/README.md.js.map +1 -1
  239. package/lib/es/src/components/Totaliser/index.js +1 -1
  240. package/lib/es/src/components/Totaliser/styles.js +1 -1
  241. package/lib/es/src/components/UserBlock/index.js +1 -1
  242. package/lib/es/src/components/index.js +1 -1
  243. package/lib/es/src/hooks/useLayoutEffectBrowser.js +1 -1
  244. package/lib/es/src/hooks/useScrollPosition.js +1 -1
  245. package/lib/es/src/themes/cruk.js +1 -1
  246. package/lib/es/src/themes/su2c.js +1 -1
  247. package/lib/es/src/utils/Helper.js +1 -1
  248. package/lib/hocs/MdxProvider.d.ts +1 -1
  249. package/lib/hooks/useEffectBrowser.d.ts +1 -1
  250. package/lib/hooks/useKey.d.ts +2 -2
  251. package/lib/hooks/useLayoutEffectBrowser.d.ts +3 -2
  252. package/lib/hooks/useScrollPosition.d.ts +13 -2
  253. package/lib/themes/cruk.d.ts +1 -1
  254. package/lib/themes/su2c.d.ts +1 -1
  255. package/lib/types.d.ts +14 -14
  256. package/package.json +56 -37
  257. package/lib/cjs/src/components/RadioGroup/README.md.js +0 -2
  258. package/lib/cjs/src/components/RadioGroup/README.md.js.map +0 -1
  259. package/lib/cjs/src/components/RadioGroup/styles.js +0 -2
  260. package/lib/components/RadioGroup/Radio.stories.d.ts +0 -6
  261. package/lib/components/RadioGroup/index.d.ts +0 -24
  262. package/lib/es/src/components/RadioGroup/README.md.js +0 -2
  263. package/lib/es/src/components/RadioGroup/README.md.js.map +0 -1
  264. package/lib/es/src/components/RadioGroup/styles.js +0 -2
  265. package/lib/stories/Button.d.ts +0 -28
  266. package/lib/stories/Header.d.ts +0 -9
  267. package/lib/stories/Header.stories.d.ts +0 -6
  268. package/lib/stories/Page.d.ts +0 -9
  269. package/lib/stories/Page.stories.d.ts +0 -6
@@ -1,11 +1,17 @@
1
- import { AnchorHTMLAttributes } from 'react';
2
- import { TextProps } from 'src/components/Text';
3
- import { ThemeType } from 'src/types';
1
+ import { AnchorHTMLAttributes } from "react";
2
+ import { TextProps } from "../Text";
3
+ import { ThemeType } from "../../types";
4
4
  export declare const ChevyWithLevee: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Icon").IconProps>, any, {}, never>;
5
- declare type StyledLinkProps = AnchorHTMLAttributes<HTMLElement> & TextProps & {
5
+ export declare const StyledLink: import("styled-components").StyledComponent<import("react").FunctionComponent<TextProps>, any, AnchorHTMLAttributes<HTMLElement> & import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
6
+ textColor?: string | undefined;
7
+ textAlign?: "left" | "right" | "center" | "justify" | undefined;
8
+ textSize?: import("../../types").FontSizeType | undefined;
9
+ textWeight?: number | undefined;
10
+ as?: any;
11
+ wordBreak?: import("../../types").WordBreakType | undefined;
12
+ ref?: import("react").Ref<HTMLElement> | undefined;
13
+ } & {
6
14
  theme: ThemeType;
7
- appearance?: 'primary' | 'secondary';
8
- textHoverColor?: string;
9
- };
10
- export declare const StyledLink: import("styled-components").StyledComponent<import("react").FunctionComponent<TextProps>, any, StyledLinkProps, never>;
11
- export {};
15
+ appearance?: "primary" | "secondary" | undefined;
16
+ textHoverColor?: string | undefined;
17
+ }, never>;
@@ -1,4 +1,4 @@
1
- import { Story, Meta } from '@storybook/react';
1
+ import { Story, Meta } from "@storybook/react";
2
2
  declare const _default: Meta<{}>;
3
3
  export default _default;
4
4
  export declare const LoaderDefault: Story;
@@ -1,7 +1,7 @@
1
- import { FC } from 'react';
1
+ import { FC } from "react";
2
2
  /**
3
3
  *
4
4
  * Loaders are used after some user interaction that we assume will take some time to complete. They inform the user that their request is beeing processed and that they should wait.
5
5
  */
6
- declare const Loader: FC<{}>;
6
+ declare const Loader: FC;
7
7
  export default Loader;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { ModalProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { ModalProps } from ".";
3
3
  declare const _default: Meta<ModalProps>;
4
4
  export default _default;
5
5
  export declare const ModalDefault: Story<ModalProps>;
@@ -1,11 +1,11 @@
1
- import { FC } from 'react';
1
+ import { FC } from "react";
2
2
  export declare type ModalProps = {
3
3
  /** modal name used for aria-label */
4
4
  modalName: string;
5
5
  /** callback function called on modal close */
6
- closeFunction: Function;
6
+ closeFunction: () => void;
7
7
  /** flag to reveal close button with cross in the top right of modal */
8
- showCloseButton?: Boolean;
8
+ showCloseButton?: boolean;
9
9
  /** set max width of modal */
10
10
  maxWidth?: string;
11
11
  /** set space from top of view port that modal appears */
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { PaginationProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { PaginationProps } from ".";
3
3
  declare const _default: Meta<PaginationProps>;
4
4
  export default _default;
5
5
  export declare const PaginationDefault: Story<PaginationProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FunctionComponent } from "react";
2
2
  export declare type PaginationProps = {
3
3
  /** set current page number */
4
4
  current: number;
@@ -6,9 +6,9 @@ export declare type PaginationProps = {
6
6
  items: number;
7
7
  /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */
8
8
  hideLast?: boolean;
9
- /** callback function which is passed the selected page number on click*/
10
- pagerCallback: Function;
11
- /** number of items per page*/
9
+ /** callback function which is passed the selected page number on click */
10
+ pagerCallback: (n: number) => void;
11
+ /** number of items per page */
12
12
  perPage: number;
13
13
  /** the name of the search param in the url that is modified on page click, defaults to 'page' */
14
14
  searchParam?: string;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { PopOverProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { PopOverProps } from ".";
3
3
  declare const _default: Meta<PopOverProps>;
4
4
  export default _default;
5
5
  export declare const PopOverDefault: Story<PopOverProps>;
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { PopOverPositionType } from 'src/types';
1
+ import { FC, ReactNode } from "react";
2
+ import { PopOverPositionType } from "../../types";
3
3
  export declare type PopOverProps = {
4
4
  /** used for aria-label of modal */
5
5
  modalLabel: string;
@@ -1,4 +1,4 @@
1
- import { ThemeType, PopOverPositionType } from 'src/types';
1
+ import { ThemeType, PopOverPositionType } from "../../types";
2
2
  export declare const PopOverWrapper: import("styled-components").StyledComponent<"div", any, {
3
3
  css?: string | undefined;
4
4
  }, never>;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { ProgressBarProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { ProgressBarProps } from ".";
3
3
  declare const _default: Meta<ProgressBarProps>;
4
4
  export default _default;
5
5
  export declare const ProgressBarDefault: Story<ProgressBarProps>;
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode } from 'react';
1
+ import { FC, ReactNode } from "react";
2
2
  export declare type ProgressBarProps = {
3
3
  /** percentage value of the progressbar */
4
4
  percentage: number;
@@ -4,11 +4,11 @@ declare type LineProgressBarProps = {
4
4
  percentage: number;
5
5
  barColor?: string;
6
6
  };
7
- export declare const LineProgressBar: import("styled-components").StyledComponent<"div", any, LineProgressBarProps, never>;
8
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
9
7
  declare type CircularColorFillProps = {
10
8
  barColor?: string;
11
9
  };
10
+ export declare const LineProgressBar: import("styled-components").StyledComponent<"div", any, LineProgressBarProps, never>;
11
+ export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
12
12
  export declare const CircularColorFill: import("styled-components").StyledComponent<"span", any, CircularColorFillProps, never>;
13
13
  export declare const CircularLeft: import("styled-components").StyledComponent<"span", any, {}, never>;
14
14
  export declare const CircularRight: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { RadioProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { RadioProps } from ".";
3
3
  declare const _default: Meta<RadioProps>;
4
4
  export default _default;
5
5
  export declare const RadioDefault: Story<RadioProps>;
@@ -1,4 +1,4 @@
1
- import { FC, InputHTMLAttributes, Ref } from 'react';
1
+ import { FC, InputHTMLAttributes, Ref } from "react";
2
2
  export declare type RadioProps = InputHTMLAttributes<HTMLInputElement> & {
3
3
  ref?: Ref<HTMLInputElement>;
4
4
  /** flag for error styling */
@@ -1,11 +1,18 @@
1
+ import { ThemeType } from "../../types";
2
+ declare type ThemeProp = {
3
+ theme: ThemeType;
4
+ };
1
5
  export declare const CheckWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
6
  export declare const Check: import("styled-components").StyledComponent<"span", any, {}, never>;
3
- declare type StyledLabelProps = {
7
+ declare type CheckedProp = {
4
8
  checked: boolean;
9
+ };
10
+ declare type DisabledProp = {
5
11
  disabled: boolean;
6
- hasError: boolean;
7
12
  };
8
- export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, StyledLabelProps, never>;
13
+ export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, {
14
+ hasError: boolean;
15
+ } & ThemeProp & CheckedProp & DisabledProp, never>;
9
16
  export declare const VerticalAlign: import("styled-components").StyledComponent<"span", any, {}, never>;
10
17
  export declare const SelectedBorder: import("styled-components").StyledComponent<"div", any, {}, never>;
11
18
  export declare const StyledInput: import("styled-components").StyledComponent<"input", any, {}, never>;
@@ -0,0 +1,6 @@
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { RadioConsentProps } from ".";
3
+ declare const _default: Meta<RadioConsentProps>;
4
+ export default _default;
5
+ export declare const RadioDefault: Story<RadioConsentProps>;
6
+ export declare const SU2CRadio: Story<RadioConsentProps>;
@@ -0,0 +1,24 @@
1
+ import React, { FunctionComponent } from "react";
2
+ export declare type RadioConsentProps = {
3
+ /** because each radio has its own label this is the consent group label text */
4
+ legend: string;
5
+ /** array of option for radio constent group where option is the option name and value is the option value */
6
+ attributes: Array<{
7
+ value: string;
8
+ option: string;
9
+ }>;
10
+ /** on change handler callback passed change event */
11
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
12
+ /** set the value of selected option */
13
+ selectedValue?: string;
14
+ /** name of field this is what groups all the options together */
15
+ name: string;
16
+ };
17
+ /**
18
+ *
19
+ * RadioConsent is a component for showing a bunch of yes/no radios predominantly used for notification selections where a unselected state is usefull for analytics.
20
+ *
21
+ * This is always a controlled component that will only change state with the selectedValue prop
22
+ */
23
+ declare const RadioConsent: FunctionComponent<RadioConsentProps>;
24
+ export default RadioConsent;
@@ -1,8 +1,11 @@
1
1
  /// <reference types="react" />
2
- import { ThemeType } from 'src/types';
2
+ import { ThemeType } from "../../types";
3
+ declare type ThemeProp = {
4
+ theme: ThemeType;
5
+ };
3
6
  export declare const StyledRadio: import("styled-components").StyledComponent<import("react").FC<import("../Radio").RadioProps>, any, {
4
7
  numberOfAttributes: number;
5
- theme: ThemeType;
6
- }, never>;
8
+ } & ThemeProp, never>;
7
9
  export declare const StyledLegend: import("styled-components").StyledComponent<"legend", any, {}, never>;
8
10
  export declare const StyledFieldSet: import("styled-components").StyledComponent<"fieldset", any, {}, never>;
11
+ export {};
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { SelectProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { SelectProps } from ".";
3
3
  declare const _default: Meta<SelectProps>;
4
4
  export default _default;
5
5
  export declare const SelectWithLabel: Story<SelectProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode, SelectHTMLAttributes, Ref } from 'react';
1
+ import { FunctionComponent, ReactNode, SelectHTMLAttributes, Ref } from "react";
2
2
  export declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {
3
3
  /** error message text */
4
4
  errorMessage?: string;
@@ -8,11 +8,14 @@ export declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {
8
8
  label: string;
9
9
  /** hind text or custom component */
10
10
  hintText?: ReactNode;
11
+ /** flag to stop (required) appearing in label, useful for compound form components like DateInput */
12
+ hideRequiredInLabel?: boolean;
11
13
  /** react DOM reference of object used scrolling to it with errors etc */
12
14
  ref?: Ref<HTMLSelectElement>;
13
15
  };
14
16
  /**
15
17
  * Select components are used for collecting user provided information from a list of options.
18
+ *
16
19
  */
17
20
  declare const Select: FunctionComponent<SelectProps>;
18
21
  export default Select;
@@ -1,8 +1,9 @@
1
- import { ThemeType } from 'src/types';
1
+ import { ThemeType } from "../../types";
2
2
  declare type StyledSelectProps = {
3
3
  hasError: boolean;
4
4
  errorMessage?: string;
5
5
  theme: ThemeType;
6
6
  };
7
- export declare const StyledSelect: import("styled-components").StyledComponent<"select", any, StyledSelectProps, never>;
8
- export {};
7
+ declare const StyledSelect: import("styled-components").StyledComponent<"select", any, StyledSelectProps, never>;
8
+ export default StyledSelect;
9
+ export { StyledSelect };
@@ -1,4 +1,4 @@
1
- import { SpaceType, ThemeType } from 'src/types';
1
+ import { SpaceType, ThemeType } from "../../types";
2
2
  export declare type SpacingProps = {
3
3
  margin?: SpaceType;
4
4
  marginTop?: SpaceType;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { StepProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { StepProps } from ".";
3
3
  declare const _default: Meta<StepProps>;
4
4
  export default _default;
5
5
  export declare const StepsDefault: Story<StepProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import { FunctionComponent } from "react";
2
2
  export declare type StepProps = {
3
3
  /** current step number */
4
4
  current: number;
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { ThemeType } from 'src/types';
1
+ import { FC } from "react";
2
+ import { ThemeType } from "src/types";
3
3
  declare type TestThemeWrapperProps = {
4
4
  theme?: ThemeType;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { TextProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { TextProps } from ".";
3
3
  declare const _default: Meta<TextProps>;
4
4
  export default _default;
5
5
  export declare const TextDefault: Story;
@@ -1,6 +1,6 @@
1
- import { FunctionComponent, HTMLAttributes, Ref } from 'react';
2
- import { SpacingProps } from 'src/components/Spacing';
3
- import { WordBreakType, FontSizeType, ColorKeyType } from 'src/types';
1
+ import { FunctionComponent, HTMLAttributes, Ref } from "react";
2
+ import { SpacingProps } from "../Spacing";
3
+ import { WordBreakType, FontSizeType, ColorKeyType } from "../../types";
4
4
  /**
5
5
  * Text is to be used as the main paragraph component (or span using as="span"). Using the Text component is preferred to simply adding text to a div and styling that div, this will guarantee we are always using the correct font and default text colour.
6
6
  */
@@ -8,7 +8,7 @@ export declare type TextProps = SpacingProps & HTMLAttributes<HTMLElement> & {
8
8
  /** text colour */
9
9
  textColor?: ColorKeyType | string;
10
10
  /** text horizontal alignment */
11
- textAlign?: 'left' | 'right' | 'center' | 'justify';
11
+ textAlign?: "left" | "right" | "center" | "justify";
12
12
  /** font size FontSizeType t-shirt sizes */
13
13
  textSize?: FontSizeType;
14
14
  /** font weight theme.typography{fontWeightHeavy/fontWeightMedium/fontWeightLight/fontWeightVLight} is better than a random number */
@@ -1,12 +1,20 @@
1
- import { SpacingProps } from 'src/components/Spacing';
2
- import { WordBreakType, FontSizeType, ThemeType } from 'src/types';
1
+ import { SpacingProps } from "../Spacing";
2
+ import { WordBreakType, FontSizeType, ThemeType, ColorKeyType } from "../../types";
3
3
  export declare type TextStyledProps = SpacingProps & {
4
- textColor?: string;
5
- textAlign?: 'left' | 'right' | 'center' | 'justify';
4
+ textColor?: ColorKeyType;
5
+ textAlign?: "left" | "right" | "center" | "justify";
6
6
  textSize?: FontSizeType;
7
7
  textWeight?: number;
8
8
  as?: any;
9
9
  wordBreak?: WordBreakType;
10
10
  theme: ThemeType;
11
11
  };
12
- export declare const TextStyled: import("styled-components").StyledComponent<"p", any, TextStyledProps, never>;
12
+ export declare const TextStyled: import("styled-components").StyledComponent<"p", any, SpacingProps & {
13
+ textColor?: keyof import("../../types").ColorsType | undefined;
14
+ textAlign?: "left" | "right" | "center" | "justify" | undefined;
15
+ textSize?: FontSizeType | undefined;
16
+ textWeight?: number | undefined;
17
+ as?: any;
18
+ wordBreak?: WordBreakType | undefined;
19
+ theme: ThemeType;
20
+ }, never>;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { TextAreaFieldProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { TextAreaFieldProps } from ".";
3
3
  declare const _default: Meta<TextAreaFieldProps>;
4
4
  export default _default;
5
5
  export declare const TextAreaFieldDefault: Story<TextAreaFieldProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode, TextareaHTMLAttributes, Ref } from 'react';
1
+ import { FunctionComponent, ReactNode, TextareaHTMLAttributes, Ref } from "react";
2
2
  export declare type TextAreaFieldProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
3
3
  /** error message text */
4
4
  errorMessage?: string;
@@ -9,8 +9,8 @@ export declare type TextAreaFieldProps = TextareaHTMLAttributes<HTMLTextAreaElem
9
9
  /** label text */
10
10
  label: string;
11
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*/
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
14
  lineCount?: number;
15
15
  /** react reference to the DOM element sometime used to scroll to or set focus after an error */
16
16
  ref?: Ref<HTMLTextAreaElement>;
@@ -1,9 +1,10 @@
1
- import { ThemeType } from 'src/types';
1
+ import { ThemeType } from "../../types";
2
2
  declare type StyledTextareaProps = {
3
3
  hasError: boolean;
4
- resize: 'both' | 'vertical' | 'horizontal' | 'none';
4
+ resize: "both" | "vertical" | "horizontal" | "none";
5
5
  lineCount: number;
6
6
  theme: ThemeType;
7
7
  };
8
- export declare const StyledTextArea: import("styled-components").StyledComponent<"textarea", any, StyledTextareaProps, never>;
9
- export {};
8
+ declare const StyledTextArea: import("styled-components").StyledComponent<"textarea", any, StyledTextareaProps, never>;
9
+ export default StyledTextArea;
10
+ export { StyledTextArea };
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { TextFieldProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { TextFieldProps } from ".";
3
3
  declare const _default: Meta<TextFieldProps>;
4
4
  export default _default;
5
5
  export declare const TextFieldDefault: Story<TextFieldProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, InputHTMLAttributes, ReactNode, Ref } from 'react';
1
+ import { FunctionComponent, InputHTMLAttributes, ReactNode, Ref } from "react";
2
2
  export declare type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
3
3
  /** error message text */
4
4
  errorMessage?: string;
@@ -1,4 +1,4 @@
1
- import { ThemeType } from 'src/types';
1
+ import { ThemeType } from "../../types";
2
2
  declare type ExtraProps = {
3
3
  theme: ThemeType;
4
4
  };
@@ -1,9 +1,7 @@
1
- import React from 'react';
2
- import { ThemeType } from '../types';
3
- declare type Props = {
4
- theme?: ThemeType;
5
- };
6
- declare const _default: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<Props>, "children"> & {
1
+ import React from "react";
2
+ declare const _default: React.ForwardRefExoticComponent<{
3
+ children?: React.ReactNode;
4
+ } & {
7
5
  theme?: any;
8
6
  }>;
9
7
  export default _default;
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { TotaliserProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { TotaliserProps } from ".";
3
3
  declare const _default: Meta<TotaliserProps>;
4
4
  export default _default;
5
5
  export declare const TotaliserWithTarget: Story<TotaliserProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactChild } from 'react';
1
+ import { FunctionComponent, ReactChild } from "react";
2
2
  export declare type TotaliserProps = {
3
3
  /** financial total as a number */
4
4
  total: number;
@@ -1,18 +1,16 @@
1
1
  /// <reference types="react" />
2
- import { ThemeType } from 'src/types';
3
- export declare const DetailWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const BubbleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {
4
+ isCompact?: boolean | undefined;
5
+ }, never>;
5
6
  export declare const Total: import("styled-components").StyledComponent<"p", any, {}, never>;
6
7
  export declare const BubbleText: import("styled-components").StyledComponent<"p", any, {}, never>;
8
+ export declare const GiftAid: import("styled-components").StyledComponent<"p", any, {}, never>;
7
9
  export declare const Summary: import("styled-components").StyledComponent<"div", any, {}, never>;
8
10
  declare type TotaliserWrapperProps = {
9
11
  isCompact: boolean;
10
12
  };
11
13
  export declare const TotaliserWrapper: import("styled-components").StyledComponent<"div", any, TotaliserWrapperProps, never>;
12
14
  export declare const CompactWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- declare type StyledProgressBarProps = {
14
- theme: ThemeType;
15
- isCompact: boolean;
16
- };
17
- export declare const StyledProgressBar: import("styled-components").StyledComponent<import("react").FC<import("../ProgressBar").ProgressBarProps>, any, StyledProgressBarProps, never>;
15
+ export declare const StyledProgressBar: import("styled-components").StyledComponent<import("react").FC<import("../ProgressBar").ProgressBarProps>, any, {}, never>;
18
16
  export {};
@@ -1,5 +1,5 @@
1
- import { Story, Meta } from '@storybook/react';
2
- import { UserBlockProps } from '.';
1
+ import { Story, Meta } from "@storybook/react";
2
+ import { UserBlockProps } from ".";
3
3
  declare const _default: Meta<UserBlockProps>;
4
4
  export default _default;
5
5
  export declare const UserBlockDefault: Story;
@@ -1,4 +1,4 @@
1
- import { FC, ReactNode, HTMLAttributes } from 'react';
1
+ import { FC, ReactNode, HTMLAttributes } from "react";
2
2
  export declare type UserBlockProps = HTMLAttributes<HTMLElement> & {
3
3
  /** name component or text */
4
4
  name?: ReactNode;
@@ -9,7 +9,7 @@ export declare type UserBlockProps = HTMLAttributes<HTMLElement> & {
9
9
  /** extra content component appears underneath name */
10
10
  extra?: ReactNode;
11
11
  /** size of avatar component */
12
- size?: 's' | 'm' | 'l' | 'xl';
12
+ size?: "s" | "m" | "l" | "xl";
13
13
  };
14
14
  /**
15
15
  * Display an avatar with title and subtitle