@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,18 +1,22 @@
1
- import { AnchorHTMLAttributes } from "react";
2
- import { TextProps } from "../Text";
3
- import { ThemeType } from "../../types";
4
- export declare const ChevyWithLevee: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, {}, never>;
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?: import("react").ElementType<any> | undefined;
11
- wordBreak?: import("../../types").WordBreakType | undefined;
12
- overflowWrap?: import("../../types").OverflowWrapType | undefined;
13
- ref?: import("react").Ref<HTMLElement> | undefined;
14
- } & {
15
- theme: ThemeType;
16
- appearance?: "primary" | "secondary" | undefined;
17
- textHoverColor?: string | undefined;
18
- }, never>;
1
+ import { AnchorHTMLAttributes } from "react";
2
+ import { TextProps } from "../Text";
3
+ import { ThemeType } from "../../types";
4
+ type ThemeProp = {
5
+ theme: ThemeType;
6
+ };
7
+ export declare const ChevyWithLevee: import("styled-components").StyledComponent<({ faIcon, color, size, ...rest }: import("../IconFa").IconFaProps) => JSX.Element, any, ThemeProp, never>;
8
+ export declare const StyledLink: import("styled-components").StyledComponent<import("react").FunctionComponent<TextProps>, any, AnchorHTMLAttributes<HTMLElement> & import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
9
+ textColor?: string | undefined;
10
+ textAlign?: "left" | "right" | "center" | "justify" | undefined;
11
+ textSize?: import("../../types").FontSizeType | undefined;
12
+ textWeight?: number | undefined;
13
+ as?: import("react").ElementType | undefined;
14
+ wordBreak?: import("../../types").WordBreakType | undefined;
15
+ overflowWrap?: import("../../types").OverflowWrapType | undefined;
16
+ ref?: import("react").Ref<HTMLElement> | undefined;
17
+ } & {
18
+ theme: ThemeType;
19
+ appearance?: "primary" | "secondary" | undefined;
20
+ textHoverColor?: string | undefined;
21
+ }, never>;
22
+ export {};
@@ -1,6 +1,13 @@
1
- import { Story, Meta } from "@storybook/react";
2
- declare const _default: Meta<{}>;
3
- export default _default;
4
- export declare const LoaderDefault: Story;
5
- export declare const SU2CLoader: Story;
6
- export declare const BowelbabeLoader: Story;
1
+ import { StoryObj } from "@storybook/react";
2
+ import Loader from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: () => JSX.Element;
6
+ args: {};
7
+ tags: string[];
8
+ };
9
+ export default _default;
10
+ type Story = StoryObj<typeof Loader>;
11
+ export declare const LoaderDefault: Story;
12
+ export declare const LoaderSU2C: Story;
13
+ export declare const LoaderBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- /**
3
- *
4
- * Loaders are used after some user interaction that we assume will take some time to complete. They inform the user that their request is beeing processed and that they should wait.
5
- */
6
- declare const Loader: () => JSX.Element;
7
- export default Loader;
1
+ /// <reference types="react" />
2
+ /**
3
+ *
4
+ * Loaders are used after some user interaction that we assume will take some time to complete. They inform the user that their request is beeing processed and that they should wait.
5
+ */
6
+ declare const Loader: () => JSX.Element;
7
+ export default Loader;
@@ -1,2 +1,7 @@
1
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"p", any, {}, never>;
2
- export declare const Spinner: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import { ThemeType } from "../../types";
2
+ type SpinnerProps = {
3
+ theme: ThemeType;
4
+ };
5
+ export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"p", any, {}, never>;
6
+ export declare const Spinner: import("styled-components").StyledComponent<"div", any, SpinnerProps, never>;
7
+ export {};
@@ -1,7 +1,13 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { ModalProps } from ".";
3
- declare const _default: Meta<ModalProps>;
4
- export default _default;
5
- export declare const ModalDefault: Story<ModalProps>;
6
- export declare const SU2CModal: Story<ModalProps>;
7
- export declare const BowelbabeModal: Story<ModalProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import Modal, { ModalProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ modalName, closeFunction, showCloseButton, maxWidth, top, backgroundColor, children, width, margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft, padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft, }: ModalProps) => JSX.Element;
6
+ args: {};
7
+ tags: string[];
8
+ };
9
+ export default _default;
10
+ type Story = StoryObj<typeof Modal>;
11
+ export declare const ModalDefault: Story;
12
+ export declare const ModalSU2C: Story;
13
+ export declare const ModalBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,32 +1,32 @@
1
- import { ReactNode } from "react";
2
- import { SpacingProps } from "../Spacing";
3
- export type ModalProps = SpacingProps & {
4
- /** modal name used for aria-label */
5
- modalName: string;
6
- /** callback function called on modal close */
7
- closeFunction: () => void;
8
- /** flag to reveal close button with cross in the top right of modal */
9
- showCloseButton?: boolean;
10
- /** set max width of modal */
11
- maxWidth?: string;
12
- /** set space from top of view port that modal appears */
13
- top?: string;
14
- /** background color of dialogue */
15
- backgroundColor?: string;
16
- /** children components */
17
- children?: ReactNode;
18
- /** width of modal */
19
- width?: string;
20
- };
21
- /**
22
- *
23
- * Use a modal to display content over top of the rest of the site which must be interacted with before the user can continue.
24
- * ## How modals work
25
- * - Modals are positioned over everything else in the document and remove scroll from the "body" tag so that modal content scrolls instead.
26
- * - Modals are unmounted when closed.
27
- * - Modal's "trap" focus in them, ensuring the keyboard navigation cycles through the modal, and not the rest of the page.
28
- * ## Accessibility
29
- * - Once the Modal is appeared on the screen, the focus must be within the Modal container which will enable the screen readers to be able to navigate within the Modal. You may wish to hide the close button so that a user must click on another button to confirm a choice before the modal is closed. However closing with the 'ESC' key must always work, so the props which contains the function that allows the modal to close itself 'closeFunction' is always required.
30
- */
31
- declare const Modal: ({ modalName, closeFunction, showCloseButton, maxWidth, top, backgroundColor, children, width, margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft, padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft, }: ModalProps) => JSX.Element;
32
- export default Modal;
1
+ import { ReactNode } from "react";
2
+ import { SpacingProps } from "../Spacing";
3
+ export type ModalProps = SpacingProps & {
4
+ /** modal name used for aria-label */
5
+ modalName: string;
6
+ /** callback function called on modal close */
7
+ closeFunction: () => void;
8
+ /** flag to reveal close button with cross in the top right of modal */
9
+ showCloseButton?: boolean;
10
+ /** set max width of modal */
11
+ maxWidth?: string;
12
+ /** set space from top of view port that modal appears */
13
+ top?: string;
14
+ /** background color of dialogue */
15
+ backgroundColor?: string;
16
+ /** children components */
17
+ children?: ReactNode;
18
+ /** width of modal */
19
+ width?: string;
20
+ };
21
+ /**
22
+ *
23
+ * Use a modal to display content over top of the rest of the site which must be interacted with before the user can continue.
24
+ * ## How modals work
25
+ * - Modals are positioned over everything else in the document and remove scroll from the "body" tag so that modal content scrolls instead.
26
+ * - Modals are unmounted when closed.
27
+ * - Modal's "trap" focus in them, ensuring the keyboard navigation cycles through the modal, and not the rest of the page.
28
+ * ## Accessibility
29
+ * - Once the Modal is appeared on the screen, the focus must be within the Modal container which will enable the screen readers to be able to navigate within the Modal. You may wish to hide the close button so that a user must click on another button to confirm a choice before the modal is closed. However closing with the 'ESC' key must always work, so the props which contains the function that allows the modal to close itself 'closeFunction' is always required.
30
+ */
31
+ declare const Modal: ({ modalName, closeFunction, showCloseButton, maxWidth, top, backgroundColor, children, width, margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft, padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft, }: ModalProps) => JSX.Element;
32
+ export default Modal;
@@ -1,24 +1,27 @@
1
- /// <reference types="react" />
2
- import { ThemeType } from "../../types";
3
- type ContentProps = {
4
- backgroundColor?: string;
5
- theme: ThemeType;
6
- top: string;
7
- width: string;
8
- maxWidth: string;
9
- };
10
- export declare const Background: import("styled-components").StyledComponent<"div", any, {}, never>;
11
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const Content: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Box").BoxProps>, any, ContentProps, never>;
13
- export declare const CloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").ButtonHTMLAttributes<HTMLElement> & {
14
- appearance?: import("../../types").ButtonAppearanceType | undefined;
15
- full?: boolean | undefined;
16
- href?: string | undefined;
17
- size?: "m" | "l" | undefined;
18
- css?: any;
19
- as?: import("react").ElementType<any> | undefined;
20
- isIconButton?: boolean | undefined;
21
- ref?: import("react").Ref<HTMLElement> | undefined;
22
- children?: import("react").ReactNode;
23
- }, "css" | "as" | keyof import("react").ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "size" | "isIconButton"> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
24
- export {};
1
+ /// <reference types="react" />
2
+ import { ThemeType } from "../../types";
3
+ type ThemeProp = {
4
+ theme: ThemeType;
5
+ };
6
+ type ContentProps = {
7
+ backgroundColor?: string;
8
+ theme: ThemeType;
9
+ top: string;
10
+ width: string;
11
+ maxWidth: string;
12
+ };
13
+ export declare const Background: import("styled-components").StyledComponent<"div", any, ThemeProp, never>;
14
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
+ export declare const Content: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Box").BoxProps>, any, ContentProps, never>;
16
+ export declare const CloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").ButtonHTMLAttributes<HTMLElement> & {
17
+ appearance?: import("../../types").ButtonAppearanceType | undefined;
18
+ full?: boolean | undefined;
19
+ href?: string | undefined;
20
+ size?: "m" | "l" | undefined;
21
+ css?: any;
22
+ as?: import("react").ElementType | undefined;
23
+ isIconButton?: boolean | undefined;
24
+ ref?: import("react").Ref<HTMLElement> | undefined;
25
+ children?: import("react").ReactNode;
26
+ }, "css" | "as" | keyof import("react").ButtonHTMLAttributes<HTMLElement> | "appearance" | "full" | "href" | "size" | "isIconButton"> & import("react").RefAttributes<HTMLElement>>, any, ThemeProp, never>;
27
+ export {};
@@ -1,8 +1,20 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { PaginationProps } from ".";
3
- declare const _default: Meta<PaginationProps>;
4
- export default _default;
5
- export declare const PaginationDefault: Story<PaginationProps>;
6
- export declare const PaginationFirstPage: Story<PaginationProps>;
7
- export declare const SU2CPagination: Story<PaginationProps>;
8
- export declare const BowelbabePagination: Story<PaginationProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import Pagination, { PaginationProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ current, items, hideLast, pagerCallback, perPage, searchParam, children, }: PaginationProps) => JSX.Element;
6
+ args: {
7
+ current: number;
8
+ perPage: number;
9
+ items: number;
10
+ pagerCallback: (n: number) => void;
11
+ };
12
+ tags: string[];
13
+ };
14
+ export default _default;
15
+ type Story = StoryObj<typeof Pagination>;
16
+ export declare const PaginationDefault: Story;
17
+ export declare const PaginationFirstPage: Story;
18
+ export declare const PaginationLastPage: Story;
19
+ export declare const ErrorTextSU2C: Story;
20
+ export declare const ErrorTextBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,24 +1,24 @@
1
- import { ReactNode } from "react";
2
- export type PaginationProps = {
3
- /** set current page number */
4
- current: number;
5
- /** total number of pages */
6
- items: number;
7
- /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */
8
- hideLast?: boolean;
9
- /** callback function which is passed the selected page number on click */
10
- pagerCallback: (n: number) => void;
11
- /** number of items per page */
12
- perPage: number;
13
- /** the name of the search param in the url that is modified on page click, defaults to 'page' */
14
- searchParam?: string;
15
- children?: ReactNode;
16
- };
17
- /**
18
- *
19
- * Pagination is used when we are viewing large amounts of data.
20
- Data is split into multiple pages and pagination is used to
21
- easily navigate through these pages.
22
- */
23
- declare const Pagination: ({ current, items, hideLast, pagerCallback, perPage, searchParam, children, }: PaginationProps) => JSX.Element;
24
- export default Pagination;
1
+ import { ReactNode } from "react";
2
+ export type PaginationProps = {
3
+ /** set current page number */
4
+ current: number;
5
+ /** total number of pages */
6
+ items: number;
7
+ /** don't show an ellipsise and then the last page link, usefull for search results where the last page isn't important */
8
+ hideLast?: boolean;
9
+ /** callback function which is passed the selected page number on click */
10
+ pagerCallback: (n: number) => void;
11
+ /** number of items per page */
12
+ perPage: number;
13
+ /** the name of the search param in the url that is modified on page click, defaults to 'page' */
14
+ searchParam?: string;
15
+ children?: ReactNode;
16
+ };
17
+ /**
18
+ *
19
+ * Pagination is used when we are viewing large amounts of data.
20
+ Data is split into multiple pages and pagination is used to
21
+ easily navigate through these pages.
22
+ */
23
+ declare const Pagination: ({ current, items, hideLast, pagerCallback, perPage, searchParam, children, }: PaginationProps) => JSX.Element;
24
+ export default Pagination;
@@ -1,10 +1,14 @@
1
- type PaginationStyledProps = {
2
- active?: boolean;
3
- name?: string;
4
- disabled?: boolean;
5
- };
6
- export declare const PagerWrapper: import("styled-components").StyledComponent<"div", any, PaginationStyledProps, never>;
7
- export declare const PagerList: import("styled-components").StyledComponent<"ul", any, {}, never>;
8
- export declare const PagerLink: import("styled-components").StyledComponent<"a", any, PaginationStyledProps, never>;
9
- export declare const PagerItem: import("styled-components").StyledComponent<"li", any, {}, never>;
10
- export {};
1
+ import { ThemeType } from "../../types";
2
+ type PaginationStyledProps = {
3
+ active?: boolean;
4
+ name?: string;
5
+ disabled?: boolean;
6
+ };
7
+ type ThemeProps = {
8
+ theme: ThemeType;
9
+ };
10
+ export declare const PagerWrapper: import("styled-components").StyledComponent<"div", any, PaginationStyledProps, never>;
11
+ export declare const PagerList: import("styled-components").StyledComponent<"ul", any, {}, never>;
12
+ export declare const PagerLink: import("styled-components").StyledComponent<"a", any, PaginationStyledProps, never>;
13
+ export declare const PagerItem: import("styled-components").StyledComponent<"li", any, ThemeProps, never>;
14
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,7 +1,18 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { PopOverProps } from ".";
3
- declare const _default: Meta<PopOverProps>;
4
- export default _default;
5
- export declare const PopOverDefault: Story<PopOverProps>;
6
- export declare const SU2CPopover: Story<PopOverProps>;
7
- export declare const BowelbabePopover: Story<PopOverProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import PopOver, { PopOverProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ onPopOverIsOpenChange, children, minWidth, maxWidth, position, modalLabel, modalContent, css, full, }: PopOverProps) => JSX.Element;
6
+ args: {
7
+ modalLabel: string;
8
+ minWidth: string;
9
+ modalContent: JSX.Element;
10
+ children: JSX.Element;
11
+ };
12
+ tags: string[];
13
+ };
14
+ export default _default;
15
+ type Story = StoryObj<typeof PopOver>;
16
+ export declare const PopOverDefault: Story;
17
+ export declare const PopOverSU2C: Story;
18
+ export declare const PopOverBowelbabe: Story;
@@ -1,24 +1,26 @@
1
- import { ReactNode } from "react";
2
- import { PopOverPositionType } from "../../types";
3
- export type PopOverProps = {
4
- /** used for aria-label of modal */
5
- modalLabel: string;
6
- /** contents in side the popover modal */
7
- modalContent: ReactNode;
8
- /** position that the popover opens relative to the triggering element, the trigger element is the child of the component */
9
- position?: PopOverPositionType;
10
- css?: string;
11
- /** popover modal max width */
12
- maxWidth?: string;
13
- /** popover modal min width */
14
- minWidth?: string;
15
- /** popover isOpen changed handler */
16
- onPopOverIsOpenChange?: (isOpen: boolean) => void;
17
- children?: ReactNode;
18
- };
19
- /**
20
- * Popover is a non-modal dialog that floats around its disclosure. It's
21
- commonly used for displaying additional rich content on top of something.
22
- */
23
- declare const PopOver: ({ onPopOverIsOpenChange, children, minWidth, maxWidth, position, modalLabel, modalContent, css, }: PopOverProps) => JSX.Element;
24
- export default PopOver;
1
+ import { ReactNode } from "react";
2
+ import { PopOverPositionType } from "../../types";
3
+ export type PopOverProps = {
4
+ /** modalLabel: used for aria-label of modal */
5
+ modalLabel: string;
6
+ /** modalContent: contents in side the popover modal */
7
+ modalContent: ReactNode;
8
+ /** position: position that the popover opens relative to the triggering element, the trigger element is the child of the component */
9
+ position?: PopOverPositionType;
10
+ /** full: enable child button extend full width */
11
+ full?: boolean;
12
+ /** maxWidth: popover modal max width */
13
+ maxWidth?: string;
14
+ /** minWidth: popover modal min width */
15
+ minWidth?: string;
16
+ /** onPopOverIsOpenChange: popover isOpen changed handler */
17
+ onPopOverIsOpenChange?: (isOpen: boolean) => void;
18
+ children?: ReactNode;
19
+ css?: string;
20
+ };
21
+ /**
22
+ * Popover is a non-modal dialog that floats around its disclosure. It's
23
+ commonly used for displaying additional rich content on top of something.
24
+ */
25
+ declare const PopOver: ({ onPopOverIsOpenChange, children, minWidth, maxWidth, position, modalLabel, modalContent, css, full, }: PopOverProps) => JSX.Element;
26
+ export default PopOver;
@@ -1,10 +1,11 @@
1
- import { ThemeType, PopOverPositionType } from "../../types";
2
- export declare const PopOverWrapper: import("styled-components").StyledComponent<"div", any, {
3
- css?: string | undefined;
4
- }, never>;
5
- export declare const PopOverModal: import("styled-components").StyledComponent<"div", any, {
6
- position: PopOverPositionType;
7
- theme?: ThemeType | undefined;
8
- maxWidth: string;
9
- minWidth: string;
10
- }, never>;
1
+ import { ThemeType, PopOverPositionType } from "../../types";
2
+ export declare const PopOverWrapper: import("styled-components").StyledComponent<"div", any, {
3
+ full: boolean;
4
+ css?: string | undefined;
5
+ }, never>;
6
+ export declare const PopOverModal: import("styled-components").StyledComponent<"div", any, {
7
+ position: PopOverPositionType;
8
+ theme?: ThemeType | undefined;
9
+ maxWidth: string;
10
+ minWidth: string;
11
+ }, never>;
@@ -1,10 +1,19 @@
1
- import { Story, Meta } from "@storybook/react";
2
- import { ProgressBarProps } from ".";
3
- declare const _default: Meta<ProgressBarProps>;
4
- export default _default;
5
- export declare const ProgressBarDefault: Story<ProgressBarProps>;
6
- export declare const ProgressBarCircular: Story<ProgressBarProps>;
7
- export declare const SU2CProgressBar: Story<ProgressBarProps>;
8
- export declare const SU2CProgressBarCircular: Story<ProgressBarProps>;
9
- export declare const BowelbabeProgressBar: Story<ProgressBarProps>;
10
- export declare const BowelbabeProgressBarCircular: Story<ProgressBarProps>;
1
+ import { StoryObj } from "@storybook/react";
2
+ import ProgressBar, { ProgressBarProps } from ".";
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ percentage, isCircular, circleContents, circleSize, barColor, secondaryBarColor, secondaryPercentage, children, }: ProgressBarProps) => JSX.Element;
6
+ args: {
7
+ percentage: number;
8
+ secondaryPercentage: number;
9
+ };
10
+ tags: string[];
11
+ };
12
+ export default _default;
13
+ type Story = StoryObj<typeof ProgressBar>;
14
+ export declare const ProgressBarDefault: Story;
15
+ export declare const ProgressBarCircular: Story;
16
+ export declare const ProgressBarSU2C: Story;
17
+ export declare const ProgressBarCircularSU2C: Story;
18
+ export declare const ProgressBarBowelbabe: Story;
19
+ export declare const ProgressBarCircularBowelbabe: Story;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,24 +1,24 @@
1
- import { ReactNode } from "react";
2
- export type ProgressBarProps = {
3
- /** percentage value of the progressbar */
4
- percentage: number;
5
- /** percentage value of a secondary (highter) amount of the progressbar */
6
- secondaryPercentage?: number;
7
- /** flag which converts line bar to donut chart */
8
- isCircular?: boolean;
9
- /** contents inside the donut chart */
10
- circleContents?: ReactNode;
11
- /** diameter of the donut chart */
12
- circleSize?: string;
13
- /** foreground colour of chart bar */
14
- barColor?: string;
15
- /** foreground colour of chart secondary bar */
16
- secondaryBarColor?: string;
17
- children?: ReactNode;
18
- };
19
- /**
20
- * Provide up-to-date feedback on the progress of a workflow or action with
21
- simple yet flexible progress bars.
22
- */
23
- declare const ProgressBar: ({ percentage, isCircular, circleContents, circleSize, barColor, secondaryBarColor, secondaryPercentage, children, }: ProgressBarProps) => JSX.Element;
24
- export default ProgressBar;
1
+ import { ReactNode } from "react";
2
+ export type ProgressBarProps = {
3
+ /** percentage value of the progressbar */
4
+ percentage: number;
5
+ /** percentage value of a secondary (highter) amount of the progressbar */
6
+ secondaryPercentage?: number;
7
+ /** flag which converts line bar to donut chart */
8
+ isCircular?: boolean;
9
+ /** contents inside the donut chart */
10
+ circleContents?: ReactNode;
11
+ /** diameter of the donut chart */
12
+ circleSize?: string;
13
+ /** foreground colour of chart bar */
14
+ barColor?: string;
15
+ /** foreground colour of chart secondary bar */
16
+ secondaryBarColor?: string;
17
+ children?: ReactNode;
18
+ };
19
+ /**
20
+ * Provide up-to-date feedback on the progress of a workflow or action with
21
+ simple yet flexible progress bars.
22
+ */
23
+ declare const ProgressBar: ({ percentage, isCircular, circleContents, circleSize, barColor, secondaryBarColor, secondaryPercentage, children, }: ProgressBarProps) => JSX.Element;
24
+ export default ProgressBar;
@@ -1,30 +1,30 @@
1
- import { ThemeType } from "../../types";
2
- type ThemeProp = {
3
- theme: ThemeType;
4
- };
5
- type LineProgressBarProps = {
6
- percentage: number;
7
- barColor?: string;
8
- isSecondary?: boolean;
9
- };
10
- type LineProgressWrapperProps = {
11
- percentage: number;
12
- secondaryPercentage: number;
13
- };
14
- type CircleWrapperProps = {
15
- circleSize: string;
16
- };
17
- export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const LineProgressBarWrapper: import("styled-components").StyledComponent<"div", any, LineProgressWrapperProps, never>;
19
- export declare const LineProgressBar: import("styled-components").StyledComponent<"div", any, LineProgressBarProps, never>;
20
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
21
- export declare const CircularWrapper: import("styled-components").StyledComponent<"div", any, CircleWrapperProps, never>;
22
- export declare const CircleSvg: import("styled-components").StyledComponent<"svg", any, {}, never>;
23
- export declare const EmptyCircle: import("styled-components").StyledComponent<"circle", any, {}, never>;
24
- export declare const FullCircle: import("styled-components").StyledComponent<"circle", any, ThemeProp & {
25
- strokeDashoffsetInit: number;
26
- barColor?: string | undefined;
27
- isSecondary?: boolean | undefined;
28
- }, never>;
29
- export declare const CircularValue: import("styled-components").StyledComponent<"div", any, {}, never>;
30
- export {};
1
+ import { ThemeType } from "../../types";
2
+ type ThemeProp = {
3
+ theme: ThemeType;
4
+ };
5
+ type LineProgressBarProps = {
6
+ percentage: number;
7
+ barColor?: string;
8
+ isSecondary?: boolean;
9
+ };
10
+ type LineProgressWrapperProps = {
11
+ percentage: number;
12
+ secondaryPercentage: number;
13
+ };
14
+ type CircleWrapperProps = {
15
+ circleSize: string;
16
+ };
17
+ export declare const ProgressBarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
+ export declare const LineProgressBarWrapper: import("styled-components").StyledComponent<"div", any, LineProgressWrapperProps, never>;
19
+ export declare const LineProgressBar: import("styled-components").StyledComponent<"div", any, LineProgressBarProps, never>;
20
+ export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
21
+ export declare const CircularWrapper: import("styled-components").StyledComponent<"div", any, CircleWrapperProps, never>;
22
+ export declare const CircleSvg: import("styled-components").StyledComponent<"svg", any, {}, never>;
23
+ export declare const EmptyCircle: import("styled-components").StyledComponent<"circle", any, ThemeProp, never>;
24
+ export declare const FullCircle: import("styled-components").StyledComponent<"circle", any, ThemeProp & {
25
+ strokeDashoffsetInit: number;
26
+ barColor?: string | undefined;
27
+ isSecondary?: boolean | undefined;
28
+ }, never>;
29
+ export declare const CircularValue: import("styled-components").StyledComponent<"div", any, ThemeProp, never>;
30
+ export {};