@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.
Files changed (254) hide show
  1. package/lib/components/AddressLookup/AddressLookUp.test.cypress.d.ts +1 -1
  2. package/lib/components/AddressLookup/AddressLookup.stories.d.ts +36 -7
  3. package/lib/components/AddressLookup/index.d.ts +61 -61
  4. package/lib/components/AddressLookup/styles.d.ts +14 -14
  5. package/lib/components/Avatar/Avatar.stories.d.ts +33 -20
  6. package/lib/components/Avatar/Avatar.test.cypress.d.ts +1 -1
  7. package/lib/components/Avatar/index.d.ts +15 -15
  8. package/lib/components/Avatar/styles.d.ts +7 -7
  9. package/lib/components/Badge/Badge.stories.d.ts +26 -16
  10. package/lib/components/Badge/Badge.test.cypress.d.ts +1 -1
  11. package/lib/components/Badge/index.d.ts +28 -28
  12. package/lib/components/Badge/styles.d.ts +11 -11
  13. package/lib/components/Box/Box.stories.d.ts +20 -13
  14. package/lib/components/Box/Box.test.cypress.d.ts +1 -1
  15. package/lib/components/Box/index.d.ts +17 -17
  16. package/lib/components/Box/styles.d.ts +8 -8
  17. package/lib/components/Button/Button.stories.d.ts +39 -15
  18. package/lib/components/Button/Button.test.cypress.d.ts +1 -1
  19. package/lib/components/Button/index.d.ts +46 -46
  20. package/lib/components/Button/styles.d.ts +15 -13
  21. package/lib/components/Carousel/Carousel.stories.d.ts +15 -7
  22. package/lib/components/Carousel/Carousel.test.cypress.d.ts +1 -1
  23. package/lib/components/Carousel/Dots.d.ts +12 -12
  24. package/lib/components/Carousel/index.d.ts +20 -20
  25. package/lib/components/Carousel/styles.d.ts +33 -33
  26. package/lib/components/Checkbox/CheckBox.test.cypress.d.ts +1 -1
  27. package/lib/components/Checkbox/Checkbox.stories.d.ts +26 -8
  28. package/lib/components/Checkbox/index.d.ts +23 -23
  29. package/lib/components/Checkbox/styles.d.ts +16 -13
  30. package/lib/components/Collapse/Collapse.stories.d.ts +23 -13
  31. package/lib/components/Collapse/Collapse.test.cypress.d.ts +1 -1
  32. package/lib/components/Collapse/index.d.ts +29 -29
  33. package/lib/components/Collapse/styles.d.ts +26 -26
  34. package/lib/components/DateField/DateField.stories.d.ts +29 -10
  35. package/lib/components/DateField/DateField.test.cypress.d.ts +1 -1
  36. package/lib/components/DateField/index.d.ts +32 -32
  37. package/lib/components/DateField/styles.d.ts +9 -4
  38. package/lib/components/Divider.d.ts +6 -6
  39. package/lib/components/ErrorText/ErrorText.stories.d.ts +16 -7
  40. package/lib/components/ErrorText/ErrorText.test.cypress.d.ts +1 -1
  41. package/lib/components/ErrorText/index.d.ts +13 -13
  42. package/lib/components/ErrorText/styles.d.ts +7 -3
  43. package/lib/components/Flex.d.ts +3 -3
  44. package/lib/components/Fontface.d.ts +2 -2
  45. package/lib/components/Footer/Footer.stories.d.ts +13 -7
  46. package/lib/components/Footer/Footer.test.cypress.d.ts +1 -1
  47. package/lib/components/Footer/index.d.ts +11 -11
  48. package/lib/components/Footer/styles.d.ts +16 -11
  49. package/lib/components/GlobalStyle.d.ts +9 -9
  50. package/lib/components/GlobalStyleNoFontFace.d.ts +9 -9
  51. package/lib/components/Header/Header.stories.d.ts +20 -7
  52. package/lib/components/Header/Header.test.cypress.d.ts +1 -1
  53. package/lib/components/Header/index.d.ts +37 -37
  54. package/lib/components/Header/styles.d.ts +37 -31
  55. package/lib/components/Heading/Heading.stories.d.ts +31 -25
  56. package/lib/components/Heading/Heading.test.cypress.d.ts +1 -1
  57. package/lib/components/Heading/index.d.ts +32 -32
  58. package/lib/components/Heading/styles.d.ts +50 -50
  59. package/lib/components/Icon/Icon.stories.d.ts +15 -6
  60. package/lib/components/Icon/Icon.test.cypress.d.ts +1 -1
  61. package/lib/components/Icon/iconList.d.ts +268 -268
  62. package/lib/components/Icon/index.d.ts +23 -23
  63. package/lib/components/Icon/styles.d.ts +5 -5
  64. package/lib/components/IconFa/IconFa.stories.d.ts +16 -7
  65. package/lib/components/IconFa/IconFa.test.cypress.d.ts +1 -1
  66. package/lib/components/IconFa/index.d.ts +17 -17
  67. package/lib/components/IconFa/styles.d.ts +5 -5
  68. package/lib/components/InfoBox/InfoBox.stories.d.ts +22 -9
  69. package/lib/components/InfoBox/InfoBox.test.cypress.d.ts +1 -1
  70. package/lib/components/InfoBox/index.d.ts +27 -27
  71. package/lib/components/InfoBox/styles.d.ts +14 -14
  72. package/lib/components/LabelWrapper/index.d.ts +19 -19
  73. package/lib/components/LabelWrapper/styles.d.ts +6 -6
  74. package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +21 -11
  75. package/lib/components/LegendWrapper/LegendWrapper.test.cypress.d.ts +1 -1
  76. package/lib/components/LegendWrapper/index.d.ts +22 -22
  77. package/lib/components/LegendWrapper/styles.d.ts +12 -12
  78. package/lib/components/Link/Link.stories.d.ts +33 -14
  79. package/lib/components/Link/Link.test.cypress.d.ts +1 -1
  80. package/lib/components/Link/index.d.ts +37 -37
  81. package/lib/components/Link/styles.d.ts +22 -18
  82. package/lib/components/Loader/Loader.stories.d.ts +13 -6
  83. package/lib/components/Loader/Loader.test.cypress.d.ts +1 -1
  84. package/lib/components/Loader/index.d.ts +7 -7
  85. package/lib/components/Loader/styles.d.ts +7 -2
  86. package/lib/components/Modal/Modal.stories.d.ts +13 -7
  87. package/lib/components/Modal/Modal.test.cypress.d.ts +1 -1
  88. package/lib/components/Modal/index.d.ts +32 -32
  89. package/lib/components/Modal/styles.d.ts +27 -24
  90. package/lib/components/Pagination/Pagination.stories.d.ts +20 -8
  91. package/lib/components/Pagination/Pagination.test.cypress.d.ts +1 -1
  92. package/lib/components/Pagination/index.d.ts +24 -24
  93. package/lib/components/Pagination/styles.d.ts +14 -10
  94. package/lib/components/PopOver/PopOver.test.cypress.d.ts +1 -1
  95. package/lib/components/PopOver/Popover.stories.d.ts +18 -7
  96. package/lib/components/PopOver/index.d.ts +26 -24
  97. package/lib/components/PopOver/styles.d.ts +11 -10
  98. package/lib/components/ProgressBar/ProgressBar.stories.d.ts +19 -10
  99. package/lib/components/ProgressBar/ProgressBar.test.cypress.d.ts +1 -1
  100. package/lib/components/ProgressBar/index.d.ts +24 -24
  101. package/lib/components/ProgressBar/styles.d.ts +30 -30
  102. package/lib/components/Radio/Radio.stories.d.ts +28 -8
  103. package/lib/components/Radio/Radio.test.cypress.d.ts +1 -1
  104. package/lib/components/Radio/index.d.ts +23 -23
  105. package/lib/components/Radio/styles.d.ts +21 -19
  106. package/lib/components/RadioConsent/Radio.stories.d.ts +21 -7
  107. package/lib/components/RadioConsent/RadioConsent.test.cypress.d.ts +1 -1
  108. package/lib/components/RadioConsent/index.d.ts +24 -24
  109. package/lib/components/RadioConsent/styles.d.ts +16 -16
  110. package/lib/components/Select/Select.test.cypress.d.ts +1 -1
  111. package/lib/components/Select/Selelct.stories.d.ts +24 -10
  112. package/lib/components/Select/index.d.ts +21 -21
  113. package/lib/components/Select/styles.d.ts +9 -9
  114. package/lib/components/Spacing/index.d.ts +19 -19
  115. package/lib/components/Step/Step.stories.d.ts +17 -7
  116. package/lib/components/Step/Step.test.cypress.d.ts +1 -1
  117. package/lib/components/Step/index.d.ts +15 -15
  118. package/lib/components/Step/styles.d.ts +17 -13
  119. package/lib/components/TestWrapper.d.ts +12 -12
  120. package/lib/components/Text/Text.stories.d.ts +17 -7
  121. package/lib/components/Text/Text.test.cypress.d.ts +1 -1
  122. package/lib/components/Text/index.d.ts +26 -26
  123. package/lib/components/Text/styles.d.ts +22 -22
  124. package/lib/components/TextAreaField/TextAreaField.stories.d.ts +29 -10
  125. package/lib/components/TextAreaField/TextAreaField.test.cypress.d.ts +1 -1
  126. package/lib/components/TextAreaField/index.d.ts +22 -22
  127. package/lib/components/TextAreaField/styles.d.ts +10 -10
  128. package/lib/components/TextField/TextField.stories.d.ts +27 -12
  129. package/lib/components/TextField/TextField.test.cypress.d.ts +1 -1
  130. package/lib/components/TextField/index.d.ts +34 -34
  131. package/lib/components/TextField/styles.d.ts +18 -18
  132. package/lib/components/ThemeCheatSheet.d.ts +7 -7
  133. package/lib/components/Totaliser/Totaliser.stories.d.ts +27 -19
  134. package/lib/components/Totaliser/Totaliser.test.cypress.d.ts +1 -1
  135. package/lib/components/Totaliser/index.d.ts +22 -22
  136. package/lib/components/Totaliser/styles.d.ts +20 -16
  137. package/lib/components/UserBlock/UserBlock.stories.d.ts +23 -16
  138. package/lib/components/UserBlock/UserBlock.test.cypress.d.ts +1 -1
  139. package/lib/components/UserBlock/index.d.ts +18 -18
  140. package/lib/components/UserBlock/styles.d.ts +9 -4
  141. package/lib/components/index.d.ts +73 -73
  142. package/lib/docs/Docs.d.ts +2 -2
  143. package/lib/docs/index.d.ts +1 -1
  144. package/lib/es/{node_modules/tslib/tslib.es6.js → _virtual/_tslib.js} +1 -1
  145. package/lib/es/_virtual/_tslib.js.map +1 -0
  146. package/lib/es/node_modules/focus-lock/dist/es2015/index.js +1 -1
  147. package/lib/es/node_modules/focus-lock/dist/es2015/index.js.map +1 -1
  148. package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -1
  149. package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js +1 -1
  150. package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
  151. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  152. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  153. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  154. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  155. package/lib/es/node_modules/react-focus-lock/dist/es2015/index.js +1 -1
  156. package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js +1 -1
  157. package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
  158. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js +1 -1
  159. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  160. package/lib/es/src/components/AddressLookup/index.js +1 -1
  161. package/lib/es/src/components/AddressLookup/styles.js +1 -1
  162. package/lib/es/src/components/Avatar/index.js +1 -1
  163. package/lib/es/src/components/Avatar/styles.js +1 -1
  164. package/lib/es/src/components/Badge/index.js +1 -1
  165. package/lib/es/src/components/Badge/styles.js +1 -1
  166. package/lib/es/src/components/Box/index.js +1 -1
  167. package/lib/es/src/components/Box/styles.js +1 -1
  168. package/lib/es/src/components/Button/index.js +1 -1
  169. package/lib/es/src/components/Button/styles.js +1 -1
  170. package/lib/es/src/components/Carousel/Dots.js +1 -1
  171. package/lib/es/src/components/Carousel/styles.js +1 -1
  172. package/lib/es/src/components/Checkbox/index.js +1 -1
  173. package/lib/es/src/components/Checkbox/styles.js +1 -1
  174. package/lib/es/src/components/Collapse/index.js +1 -1
  175. package/lib/es/src/components/Collapse/styles.js +1 -1
  176. package/lib/es/src/components/DateField/styles.js +1 -1
  177. package/lib/es/src/components/Divider.js +1 -1
  178. package/lib/es/src/components/ErrorText/index.js +1 -1
  179. package/lib/es/src/components/ErrorText/styles.js +1 -1
  180. package/lib/es/src/components/Flex.js +1 -1
  181. package/lib/es/src/components/Footer/index.js +1 -1
  182. package/lib/es/src/components/Footer/styles.js +1 -1
  183. package/lib/es/src/components/GlobalStyle.js +1 -1
  184. package/lib/es/src/components/GlobalStyleNoFontFace.js +1 -1
  185. package/lib/es/src/components/Header/index.js +1 -1
  186. package/lib/es/src/components/Header/styles.js +1 -1
  187. package/lib/es/src/components/Heading/index.js +1 -1
  188. package/lib/es/src/components/Heading/styles.js +1 -1
  189. package/lib/es/src/components/Icon/index.js +1 -1
  190. package/lib/es/src/components/Icon/styles.js +1 -1
  191. package/lib/es/src/components/IconFa/index.js +1 -1
  192. package/lib/es/src/components/IconFa/styles.js +1 -1
  193. package/lib/es/src/components/InfoBox/index.js +1 -1
  194. package/lib/es/src/components/InfoBox/styles.js +1 -1
  195. package/lib/es/src/components/LabelWrapper/index.js +1 -1
  196. package/lib/es/src/components/LabelWrapper/styles.js +1 -1
  197. package/lib/es/src/components/LegendWrapper/index.js +1 -1
  198. package/lib/es/src/components/LegendWrapper/styles.js +1 -1
  199. package/lib/es/src/components/Link/index.js +1 -1
  200. package/lib/es/src/components/Link/styles.js +1 -1
  201. package/lib/es/src/components/Loader/index.js +1 -1
  202. package/lib/es/src/components/Loader/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/index.js +1 -1
  214. package/lib/es/src/components/Radio/styles.js +1 -1
  215. package/lib/es/src/components/RadioConsent/index.js +1 -1
  216. package/lib/es/src/components/RadioConsent/styles.js +1 -1
  217. package/lib/es/src/components/Select/index.js +1 -1
  218. package/lib/es/src/components/Select/styles.js +1 -1
  219. package/lib/es/src/components/Step/index.js +1 -1
  220. package/lib/es/src/components/Step/styles.js +1 -1
  221. package/lib/es/src/components/Text/index.js +1 -1
  222. package/lib/es/src/components/Text/styles.js +1 -1
  223. package/lib/es/src/components/TextAreaField/index.js +1 -1
  224. package/lib/es/src/components/TextAreaField/styles.js +1 -1
  225. package/lib/es/src/components/TextField/index.js +1 -1
  226. package/lib/es/src/components/TextField/styles.js +1 -1
  227. package/lib/es/src/components/Totaliser/index.js +1 -1
  228. package/lib/es/src/components/Totaliser/styles.js +1 -1
  229. package/lib/es/src/components/UserBlock/index.js +1 -1
  230. package/lib/es/src/components/UserBlock/styles.js +1 -1
  231. package/lib/es/src/themes/bowelbabe.js +1 -1
  232. package/lib/es/src/themes/su2c.js +1 -1
  233. package/lib/hocs/MdxProvider.d.ts +6 -6
  234. package/lib/hooks/useEffectBrowser.d.ts +3 -3
  235. package/lib/hooks/useKey.d.ts +6 -6
  236. package/lib/hooks/useLayoutEffectBrowser.d.ts +4 -4
  237. package/lib/hooks/useScrollPosition.d.ts +13 -13
  238. package/lib/themes/bowelbabe.d.ts +13 -13
  239. package/lib/themes/cruk.d.ts +13 -13
  240. package/lib/themes/su2c.d.ts +13 -13
  241. package/lib/types.d.ts +232 -232
  242. package/lib/utils/Helper.d.ts +6 -6
  243. package/lib/utils/__tests__/testHelpers.jest.d.ts +1 -1
  244. package/lib/utils/debounce.d.ts +2 -2
  245. package/package.json +21 -15
  246. package/lib/es/node_modules/detect-node-es/esm/node.js +0 -2
  247. package/lib/es/node_modules/detect-node-es/esm/node.js.map +0 -1
  248. package/lib/es/node_modules/react-focus-lock/dist/es2015/AutoFocusInside.js +0 -2
  249. package/lib/es/node_modules/react-focus-lock/dist/es2015/AutoFocusInside.js.map +0 -1
  250. package/lib/es/node_modules/react-focus-lock/dist/es2015/FreeFocusInside.js +0 -2
  251. package/lib/es/node_modules/react-focus-lock/dist/es2015/FreeFocusInside.js.map +0 -1
  252. package/lib/es/node_modules/react-focus-lock/dist/es2015/MoveFocusInside.js +0 -2
  253. package/lib/es/node_modules/react-focus-lock/dist/es2015/MoveFocusInside.js.map +0 -1
  254. package/lib/es/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -1,46 +1,46 @@
1
- import React, { ReactNode, ButtonHTMLAttributes, Ref, ElementType } from "react";
2
- import { ButtonAppearanceType } from "../../types";
3
- export type Props = ButtonHTMLAttributes<HTMLElement> & {
4
- /** the look and feel of the button */
5
- appearance?: ButtonAppearanceType;
6
- /** flag to streatch but to 100% width */
7
- full?: boolean;
8
- /** this is a url which will convert the button to an anchor tag */
9
- href?: string;
10
- /** the height of the button, this will add padding not increase text size */
11
- size?: "m" | "l";
12
- css?: any;
13
- /** styled-components polymorphism where you can use the styling of a button but convert to another element like an anchor tag */
14
- as?: ElementType;
15
- /** flag to force button into an icon button shape which is square or round */
16
- isIconButton?: boolean;
17
- /** Element reference */
18
- ref?: Ref<HTMLElement>;
19
- /** Component reference */
20
- children?: ReactNode;
21
- };
22
- /**
23
- * Design system documentation CRUK https://zeroheight.com/23de8a59a/p/180ef6-buttons/b/32e1a2
24
- *
25
- * Design system documentation SU2C https://zeroheight.com/79db39f7e/p/22ff0e-button/b/32e1a2
26
- */
27
- export declare const Button: React.ForwardRefExoticComponent<Pick<React.ButtonHTMLAttributes<HTMLElement> & {
28
- /** the look and feel of the button */
29
- appearance?: ButtonAppearanceType | undefined;
30
- /** flag to streatch but to 100% width */
31
- full?: boolean | undefined;
32
- /** this is a url which will convert the button to an anchor tag */
33
- href?: string | undefined;
34
- /** the height of the button, this will add padding not increase text size */
35
- size?: "m" | "l" | undefined;
36
- css?: any;
37
- /** styled-components polymorphism where you can use the styling of a button but convert to another element like an anchor tag */
38
- as?: React.ElementType<any> | undefined;
39
- /** flag to force button into an icon button shape which is square or round */
40
- isIconButton?: boolean | undefined;
41
- /** Element reference */
42
- ref?: React.Ref<HTMLElement> | undefined;
43
- /** Component reference */
44
- children?: ReactNode;
45
- }, keyof React.ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "size" | "css" | "as" | "isIconButton"> & React.RefAttributes<HTMLElement>>;
46
- export default Button;
1
+ import React, { ReactNode, ButtonHTMLAttributes, Ref, ElementType } from "react";
2
+ import { ButtonAppearanceType } from "../../types";
3
+ export type ButtonProps = ButtonHTMLAttributes<HTMLElement> & {
4
+ /** the look and feel of the button */
5
+ appearance?: ButtonAppearanceType;
6
+ /** flag to streatch but to 100% width */
7
+ full?: boolean;
8
+ /** this is a url which will convert the button to an anchor tag */
9
+ href?: string;
10
+ /** the height of the button, this will add padding not increase text size */
11
+ size?: "m" | "l";
12
+ css?: any;
13
+ /** styled-components polymorphism where you can use the styling of a button but convert to another element like an anchor tag */
14
+ as?: ElementType;
15
+ /** flag to force button into an icon button shape which is square or round */
16
+ isIconButton?: boolean;
17
+ /** Element reference */
18
+ ref?: Ref<HTMLElement>;
19
+ /** Component reference */
20
+ children?: ReactNode;
21
+ };
22
+ /**
23
+ * Design system documentation CRUK https://zeroheight.com/23de8a59a/p/180ef6-buttons/b/32e1a2
24
+ *
25
+ * Design system documentation SU2C https://zeroheight.com/79db39f7e/p/22ff0e-button/b/32e1a2
26
+ */
27
+ export declare const Button: React.ForwardRefExoticComponent<Pick<React.ButtonHTMLAttributes<HTMLElement> & {
28
+ /** the look and feel of the button */
29
+ appearance?: ButtonAppearanceType | undefined;
30
+ /** flag to streatch but to 100% width */
31
+ full?: boolean | undefined;
32
+ /** this is a url which will convert the button to an anchor tag */
33
+ href?: string | undefined;
34
+ /** the height of the button, this will add padding not increase text size */
35
+ size?: "m" | "l" | undefined;
36
+ css?: any;
37
+ /** styled-components polymorphism where you can use the styling of a button but convert to another element like an anchor tag */
38
+ as?: React.ElementType | undefined;
39
+ /** flag to force button into an icon button shape which is square or round */
40
+ isIconButton?: boolean | undefined;
41
+ /** Element reference */
42
+ ref?: React.Ref<HTMLElement> | undefined;
43
+ /** Component reference */
44
+ children?: ReactNode;
45
+ }, keyof React.ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "size" | "css" | "as" | "isIconButton"> & React.RefAttributes<HTMLElement>>;
46
+ export default Button;
@@ -1,13 +1,15 @@
1
- import { ThemeType, ButtonAppearanceType } from "../../types";
2
- export declare const Spacer: import("styled-components").StyledComponent<"span", any, {}, never>;
3
- type StyledButtonProps = {
4
- isIconButton: boolean;
5
- appearance?: ButtonAppearanceType;
6
- full?: boolean;
7
- theme: ThemeType;
8
- href?: string;
9
- size?: "m" | "l";
10
- css?: string;
11
- };
12
- export declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
13
- export {};
1
+ import { ThemeType, ButtonAppearanceType } from "../../types";
2
+ export declare const Spacer: import("styled-components").StyledComponent<"span", any, {
3
+ theme: ThemeType;
4
+ }, never>;
5
+ type StyledButtonProps = {
6
+ isIconButton: boolean;
7
+ appearance?: ButtonAppearanceType;
8
+ full?: boolean;
9
+ theme: ThemeType;
10
+ href?: string;
11
+ size?: "m" | "l";
12
+ css?: string;
13
+ };
14
+ export declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
15
+ export {};
@@ -1,7 +1,15 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { CarouselProps } from ".";
3
- declare const _default: Meta<CarouselProps>;
4
- export default _default;
5
- export declare const CarouselDefault: Story;
6
- export declare const SU2CCarousel: Story;
7
- export declare const BowelbabeCarousel: Story;
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react";
3
+ import Carousel, { CarouselProps } from ".";
4
+ declare const _default: {
5
+ title: string;
6
+ component: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element>;
7
+ args: {};
8
+ render: (args: CarouselProps) => JSX.Element;
9
+ tags: string[];
10
+ };
11
+ export default _default;
12
+ type Story = StoryObj<typeof Carousel>;
13
+ export declare const Default: Story;
14
+ export declare const CarouselSU2C: Story;
15
+ export declare const CarouselBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,12 +1,12 @@
1
- import { ButtonHTMLAttributes } from "react";
2
- type DotProps = {
3
- count: number;
4
- currentPosition: number;
5
- scrollToPosition: (to: number) => void;
6
- next: () => void;
7
- previous: () => void;
8
- };
9
- export declare const CarouselLeftButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
10
- export declare const CarouselRightButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
11
- export declare const Dots: ({ count, currentPosition, scrollToPosition, next, previous, }: DotProps) => JSX.Element;
12
- export default Dots;
1
+ import { ButtonHTMLAttributes } from "react";
2
+ type DotProps = {
3
+ count: number;
4
+ currentPosition: number;
5
+ scrollToPosition: (to: number) => void;
6
+ next: () => void;
7
+ previous: () => void;
8
+ };
9
+ export declare const CarouselLeftButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
10
+ export declare const CarouselRightButton: (props: ButtonHTMLAttributes<HTMLElement>) => JSX.Element;
11
+ export declare const Dots: ({ count, currentPosition, scrollToPosition, next, previous, }: DotProps) => JSX.Element;
12
+ export default Dots;
@@ -1,20 +1,20 @@
1
- import React, { ReactNode } from "react";
2
- export type CarouselProps = {
3
- /** Index in which the carousel is scrolled to on mount */
4
- startPosition?: number;
5
- /** call back for on position changed first prop is the possition */
6
- onPositionChanged?: (position: number) => void;
7
- /** show item left and right of current smaller than current item */
8
- shrinkUnselectedPages?: boolean;
9
- /** childrent item of the carousel */
10
- children?: ReactNode;
11
- /** set carousel image to full width of parent */
12
- fullWidthChild?: boolean;
13
- };
14
- /**
15
- *
16
- * Light weight carousel component that works with mouse and touch events, will work with divs and much anything you chuck in children
17
- */
18
- export declare const Carousel: ({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element;
19
- declare const _default: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element>;
20
- export default _default;
1
+ import React, { ReactNode } from "react";
2
+ export type CarouselProps = {
3
+ /** Index in which the carousel is scrolled to on mount */
4
+ startPosition?: number;
5
+ /** call back for on position changed first prop is the possition */
6
+ onPositionChanged?: (position: number) => void;
7
+ /** show item left and right of current smaller than current item */
8
+ shrinkUnselectedPages?: boolean;
9
+ /** childrent item of the carousel */
10
+ children?: ReactNode;
11
+ /** set carousel image to full width of parent */
12
+ fullWidthChild?: boolean;
13
+ };
14
+ /**
15
+ *
16
+ * Light weight carousel component that works with mouse and touch events, will work with divs and much anything you chuck in children
17
+ */
18
+ export declare const Carousel: ({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element;
19
+ declare const _default: React.MemoExoticComponent<({ startPosition, children, onPositionChanged, shrinkUnselectedPages, fullWidthChild, }: CarouselProps) => JSX.Element>;
20
+ export default _default;
@@ -1,33 +1,33 @@
1
- import { ThemeType } from "../../types";
2
- export declare const CarouselWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- type ThemeProps = {
4
- theme: ThemeType;
5
- };
6
- type CarouselScrollAreaProps = {
7
- smoothScrolling: boolean;
8
- };
9
- type CarouselCardProps = {
10
- onlyChild: boolean;
11
- fullWidthChild: boolean;
12
- };
13
- type CarouselCardInnerProps = {
14
- isSelected: boolean;
15
- shrinkUnselectedPages: boolean;
16
- onlyChild: boolean;
17
- fullWidthChild: boolean;
18
- };
19
- export declare const CarouselScrollArea: import("styled-components").StyledComponent<"ul", any, CarouselScrollAreaProps, never>;
20
- export declare const CarouselCard: import("styled-components").StyledComponent<"li", any, CarouselCardProps, never>;
21
- export declare const CarouselCardInner: import("styled-components").StyledComponent<"div", any, CarouselCardInnerProps, never>;
22
- export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
23
- export declare const VerticalAlign: import("styled-components").StyledComponent<"span", any, {}, never>;
24
- export declare const CarouselButton: import("styled-components").StyledComponent<"button", any, {}, never>;
25
- export declare const DotContainer: import("styled-components").StyledComponent<"div", any, ThemeProps & {
26
- count: number;
27
- }, never>;
28
- export declare const Dot: import("styled-components").StyledComponent<"button", any, {
29
- theme: ThemeType;
30
- selected: boolean;
31
- }, never>;
32
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
33
- export {};
1
+ import { ThemeType } from "../../types";
2
+ export declare const CarouselWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ type ThemeProps = {
4
+ theme: ThemeType;
5
+ };
6
+ type CarouselScrollAreaProps = {
7
+ smoothScrolling: boolean;
8
+ };
9
+ type CarouselCardProps = {
10
+ onlyChild: boolean;
11
+ fullWidthChild: boolean;
12
+ };
13
+ type CarouselCardInnerProps = {
14
+ isSelected: boolean;
15
+ shrinkUnselectedPages: boolean;
16
+ onlyChild: boolean;
17
+ fullWidthChild: boolean;
18
+ };
19
+ export declare const CarouselScrollArea: import("styled-components").StyledComponent<"ul", any, CarouselScrollAreaProps, never>;
20
+ export declare const CarouselCard: import("styled-components").StyledComponent<"li", any, CarouselCardProps, never>;
21
+ export declare const CarouselCardInner: import("styled-components").StyledComponent<"div", any, CarouselCardInnerProps, never>;
22
+ export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
23
+ export declare const VerticalAlign: import("styled-components").StyledComponent<"span", any, {}, never>;
24
+ export declare const CarouselButton: import("styled-components").StyledComponent<"button", any, {}, never>;
25
+ export declare const DotContainer: import("styled-components").StyledComponent<"div", any, ThemeProps & {
26
+ count: number;
27
+ }, never>;
28
+ export declare const Dot: import("styled-components").StyledComponent<"button", any, {
29
+ theme: ThemeType;
30
+ selected: boolean;
31
+ }, never>;
32
+ export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
33
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,8 +1,26 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { CheckBoxProps } from ".";
3
- declare const _default: Meta<CheckBoxProps>;
4
- export default _default;
5
- export declare const CheckboxDefault: Story;
6
- export declare const CheckboxDefaultError: Story;
7
- export declare const SU2CCheckbox: Story;
8
- export declare const BowelbabeCheckbox: Story;
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react";
3
+ import CheckBox from ".";
4
+ declare const _default: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement> & {
7
+ ref?: React.Ref<HTMLInputElement> | undefined;
8
+ hasError?: boolean | undefined;
9
+ errorMessage?: string | undefined;
10
+ children?: React.ReactNode;
11
+ }, "errorMessage" | "hasError" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
12
+ args: {
13
+ id: string;
14
+ disabled: boolean;
15
+ value: string;
16
+ hasError: boolean;
17
+ errorMessage: string;
18
+ };
19
+ tags: string[];
20
+ };
21
+ export default _default;
22
+ type Story = StoryObj<typeof CheckBox>;
23
+ export declare const Default: Story;
24
+ export declare const CheckboxDefaultError: Story;
25
+ export declare const CheckBoxSU2C: Story;
26
+ export declare const CheckBoxBowelbabe: Story;
@@ -1,23 +1,23 @@
1
- import React, { InputHTMLAttributes, Ref, ReactNode } from "react";
2
- export type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {
3
- ref?: Ref<HTMLInputElement>;
4
- /** flag for error styling */
5
- hasError?: boolean;
6
- /** error message text */
7
- errorMessage?: string;
8
- children?: ReactNode;
9
- };
10
- /**
11
- * Checkboxes allow the user to select one or more items.
12
- *
13
- * The value or children becomes the label, if you want an outer label for a checkbox or group of checkboxes please use a LegendWrapper component
14
- */
15
- declare const Checkbox: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement> & {
16
- ref?: React.Ref<HTMLInputElement> | undefined;
17
- /** flag for error styling */
18
- hasError?: boolean | undefined;
19
- /** error message text */
20
- errorMessage?: string | undefined;
21
- children?: ReactNode;
22
- }, keyof React.InputHTMLAttributes<HTMLInputElement> | "hasError" | "errorMessage"> & React.RefAttributes<HTMLInputElement>>;
23
- export default Checkbox;
1
+ import React, { InputHTMLAttributes, Ref, ReactNode } from "react";
2
+ export type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {
3
+ ref?: Ref<HTMLInputElement>;
4
+ /** flag for error styling */
5
+ hasError?: boolean;
6
+ /** error message text */
7
+ errorMessage?: string;
8
+ children?: ReactNode;
9
+ };
10
+ /**
11
+ * Checkboxes allow the user to select one or more items.
12
+ *
13
+ * The value or children becomes the label, if you want an outer label for a checkbox or group of checkboxes please use a LegendWrapper component
14
+ */
15
+ declare const Checkbox: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement> & {
16
+ ref?: React.Ref<HTMLInputElement> | undefined;
17
+ /** flag for error styling */
18
+ hasError?: boolean | undefined;
19
+ /** error message text */
20
+ errorMessage?: string | undefined;
21
+ children?: ReactNode;
22
+ }, keyof React.InputHTMLAttributes<HTMLInputElement> | "hasError" | "errorMessage"> & React.RefAttributes<HTMLInputElement>>;
23
+ export default Checkbox;
@@ -1,13 +1,16 @@
1
- import { ThemeType } from "../../types";
2
- type StyledLabelProps = {
3
- checked: boolean;
4
- disabled: boolean;
5
- hasError: boolean;
6
- theme: ThemeType;
7
- };
8
- export declare const CheckWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
- export declare const Check: import("styled-components").StyledComponent<"span", any, {}, never>;
10
- export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, StyledLabelProps, never>;
11
- export declare const SelectedBorder: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const StyledInput: import("styled-components").StyledComponent<"input", any, {}, never>;
13
- export {};
1
+ import { ThemeType } from "../../types";
2
+ type StyledLabelProps = {
3
+ checked: boolean;
4
+ disabled: boolean;
5
+ hasError: boolean;
6
+ theme: ThemeType;
7
+ };
8
+ type ThemeProps = {
9
+ theme: ThemeType;
10
+ };
11
+ export declare const CheckWrapper: import("styled-components").StyledComponent<"div", any, ThemeProps, never>;
12
+ export declare const Check: import("styled-components").StyledComponent<"span", any, ThemeProps, never>;
13
+ export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, StyledLabelProps, never>;
14
+ export declare const SelectedBorder: import("styled-components").StyledComponent<"div", any, {}, never>;
15
+ export declare const StyledInput: import("styled-components").StyledComponent<"input", any, ThemeProps, never>;
16
+ export {};
@@ -1,13 +1,23 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { CollapseProps } from ".";
3
- declare const _default: Meta<CollapseProps>;
4
- export default _default;
5
- export declare const CollapseWithTextHeader: Story<CollapseProps>;
6
- export declare const CollapseWithModifiedText: Story<CollapseProps>;
7
- export declare const CollapseWitCustomHeader: Story<CollapseProps>;
8
- export declare const SU2CCollapseWithTextHeader: Story<CollapseProps>;
9
- export declare const SU2CCollapseWithModifiedText: Story<CollapseProps>;
10
- export declare const SU2CCollapseWitCustomHeader: Story<CollapseProps>;
11
- export declare const BowelbabeCollapseWithTextHeader: Story<CollapseProps>;
12
- export declare const BowelbabeCollapseWithModifiedText: Story<CollapseProps>;
13
- export declare const BowelbabeCollapseWitCustomHeader: Story<CollapseProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import Collapse, { CollapseProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: CollapseProps) => JSX.Element;
6
+ args: {
7
+ id: string;
8
+ headerTitleText: string;
9
+ children: JSX.Element;
10
+ };
11
+ tags: string[];
12
+ };
13
+ export default _default;
14
+ type Story = StoryObj<typeof Collapse>;
15
+ export declare const CollapseWithTextHeader: Story;
16
+ export declare const CollapseWithModifiedText: Story;
17
+ export declare const CollapseWitCustomHeader: Story;
18
+ export declare const CollapseWithTextHeaderSU2C: Story;
19
+ export declare const CollapseWithModifiedTextSU2C: Story;
20
+ export declare const CollapseWitCustomHeaderSU2C: Story;
21
+ export declare const CollapseWithTextHeaderBowelbabe: Story;
22
+ export declare const CollapseWithModifiedTextBowelbabe: Story;
23
+ export declare const CollapseWitCustomHeaderBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,29 +1,29 @@
1
- import { ReactNode, HTMLAttributes } from "react";
2
- import { FontSizeType } from "../../types";
3
- export type CollapseProps = HTMLAttributes<HTMLElement> & {
4
- /** id is required for a11y reasons as we use aria attributes which depends on an id */
5
- id: string;
6
- /** text of collapse header, even if there is a custom header component this prop is still used for aria attributes */
7
- headerTitleText: string;
8
- /** collapse header text colour */
9
- headerTitleTextColor?: string;
10
- /** collapse header text size */
11
- headerTitleTextSize?: FontSizeType;
12
- /** collapse header font family */
13
- headerTitleTextFontFamily?: string;
14
- /** custom collapse header component */
15
- headerComponent?: ReactNode;
16
- /** flag to indicate */
17
- startOpen?: boolean;
18
- /** callback function that is passed isOpen flag */
19
- onOpenChange?: (isOpen: boolean) => void;
20
- /** children */
21
- children?: ReactNode;
22
- };
23
- /**
24
- *
25
- * Use a collapse component to show and hide content. It has a default view; however, it can be overwritten by passing a custom component as a prop.
26
- *
27
- */
28
- declare const Collapse: ({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: CollapseProps) => JSX.Element;
29
- export default Collapse;
1
+ import { ReactNode, HTMLAttributes } from "react";
2
+ import { FontSizeType } from "../../types";
3
+ export type CollapseProps = HTMLAttributes<HTMLElement> & {
4
+ /** id is required for a11y reasons as we use aria attributes which depends on an id */
5
+ id: string;
6
+ /** text of collapse header, even if there is a custom header component this prop is still used for aria attributes */
7
+ headerTitleText: string;
8
+ /** collapse header text colour */
9
+ headerTitleTextColor?: string;
10
+ /** collapse header text size */
11
+ headerTitleTextSize?: FontSizeType;
12
+ /** collapse header font family */
13
+ headerTitleTextFontFamily?: string;
14
+ /** custom collapse header component */
15
+ headerComponent?: ReactNode;
16
+ /** flag to indicate */
17
+ startOpen?: boolean;
18
+ /** callback function that is passed isOpen flag */
19
+ onOpenChange?: (isOpen: boolean) => void;
20
+ /** children */
21
+ children?: ReactNode;
22
+ };
23
+ /**
24
+ *
25
+ * Use a collapse component to show and hide content. It has a default view; however, it can be overwritten by passing a custom component as a prop.
26
+ *
27
+ */
28
+ declare const Collapse: ({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: CollapseProps) => JSX.Element;
29
+ export default Collapse;
@@ -1,26 +1,26 @@
1
- /// <reference types="react" />
2
- import { FontSizeType } from "../../types";
3
- export declare const transitionDurationSeconds = 0.5;
4
- export declare const FlippingIcon: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, {
5
- open: boolean;
6
- }, never>;
7
- export declare const DefaultHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").ButtonHTMLAttributes<HTMLElement> & {
8
- appearance?: import("../../types").ButtonAppearanceType | undefined;
9
- full?: boolean | undefined;
10
- href?: string | undefined;
11
- size?: "m" | "l" | undefined;
12
- css?: any;
13
- as?: import("react").ElementType<any> | undefined;
14
- isIconButton?: boolean | undefined;
15
- ref?: import("react").Ref<HTMLElement> | undefined;
16
- children?: import("react").ReactNode;
17
- }, "size" | keyof import("react").ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "css" | "as" | "isIconButton"> & import("react").RefAttributes<HTMLElement>>, any, {
18
- textColor?: string | undefined;
19
- textSize?: FontSizeType | undefined;
20
- textFontFamily?: string | undefined;
21
- }, never>;
22
- export declare const CollapseContent: import("styled-components").StyledComponent<"div", any, {
23
- contentHeight: string;
24
- openStatus: boolean;
25
- }, never>;
26
- export declare const CustomHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ /// <reference types="react" />
2
+ import { FontSizeType } from "../../types";
3
+ export declare const transitionDurationSeconds = 0.5;
4
+ export declare const FlippingIcon: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, {
5
+ open: boolean;
6
+ }, never>;
7
+ export declare const DefaultHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").ButtonHTMLAttributes<HTMLElement> & {
8
+ appearance?: import("../../types").ButtonAppearanceType | undefined;
9
+ full?: boolean | undefined;
10
+ href?: string | undefined;
11
+ size?: "m" | "l" | undefined;
12
+ css?: any;
13
+ as?: import("react").ElementType | undefined;
14
+ isIconButton?: boolean | undefined;
15
+ ref?: import("react").Ref<HTMLElement> | undefined;
16
+ children?: import("react").ReactNode;
17
+ }, "size" | keyof import("react").ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "css" | "as" | "isIconButton"> & import("react").RefAttributes<HTMLElement>>, any, {
18
+ textColor?: string | undefined;
19
+ textSize?: FontSizeType | undefined;
20
+ textFontFamily?: string | undefined;
21
+ }, never>;
22
+ export declare const CollapseContent: import("styled-components").StyledComponent<"div", any, {
23
+ contentHeight: string;
24
+ openStatus: boolean;
25
+ }, never>;
26
+ export declare const CustomHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,10 +1,29 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { DateFieldProps } from ".";
3
- declare const _default: Meta<DateFieldProps>;
4
- export default _default;
5
- export declare const DateFieldWithLabel: Story<DateFieldProps>;
6
- export declare const DateFieldWithError: Story<DateFieldProps>;
7
- export declare const SU2CDateFieldWithLabel: Story<DateFieldProps>;
8
- export declare const SU2CDateFieldWithError: Story<DateFieldProps>;
9
- export declare const BowelbabeDateFieldWithLabel: Story<DateFieldProps>;
10
- export declare const BowelbabeDateFieldWithError: Story<DateFieldProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import DateField, { DateFieldProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ label, hintText, day, month, year, dayName, monthName, yearName, dayHasError, monthHasError, yearHasError, errorMessage, onChange, onBlur, onFocus, disabled, required, }: DateFieldProps) => JSX.Element;
6
+ args: {
7
+ dayName: string;
8
+ monthName: string;
9
+ yearName: string;
10
+ label: string;
11
+ hintText: string;
12
+ onChange: () => void;
13
+ onBlur: () => void;
14
+ onFocus: () => void;
15
+ disabled: boolean;
16
+ required: boolean;
17
+ dayHasError: boolean;
18
+ monthHasError: boolean;
19
+ yearHasError: boolean;
20
+ errorMessage: string;
21
+ };
22
+ tags: string[];
23
+ };
24
+ export default _default;
25
+ type Story = StoryObj<typeof DateField>;
26
+ export declare const Default: Story;
27
+ export declare const DateFieldWithError: Story;
28
+ export declare const DateFieldSU2C: Story;
29
+ export declare const DateFieldBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};