@cruk/cruk-react-components 4.2.2 → 5.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 (592) hide show
  1. package/README.md +49 -17
  2. package/lib/components/AddressLookup/AddressLookup.stories.d.ts +1 -15
  3. package/lib/components/AddressLookup/index.d.ts +3 -30
  4. package/lib/components/AddressLookup/styles.d.ts +13 -9
  5. package/lib/components/AllThemesWrapper.d.ts +2 -2
  6. package/lib/components/Avatar/Avatar.stories.d.ts +2 -3
  7. package/lib/components/Avatar/index.d.ts +2 -2
  8. package/lib/components/Avatar/styles.d.ts +3 -3
  9. package/lib/components/Badge/Badge.stories.d.ts +2 -3
  10. package/lib/components/Badge/index.d.ts +4 -4
  11. package/lib/components/Badge/styles.d.ts +7 -7
  12. package/lib/components/Box/Box.stories.d.ts +1 -1
  13. package/lib/components/Box/index.d.ts +7 -6
  14. package/lib/components/Box/styles.d.ts +7 -6
  15. package/lib/components/Button/Button.stories.d.ts +1 -11
  16. package/lib/components/Button/index.d.ts +5 -23
  17. package/lib/components/Button/styles.d.ts +9 -9
  18. package/lib/components/Carousel/Dots.d.ts +1 -1
  19. package/lib/components/Carousel/index.d.ts +1 -1
  20. package/lib/components/Carousel/styles.d.ts +23 -21
  21. package/lib/components/Checkbox/Checkbox.stories.d.ts +2 -7
  22. package/lib/components/Checkbox/index.d.ts +3 -10
  23. package/lib/components/Checkbox/styles.d.ts +7 -7
  24. package/lib/components/Collapse/Collapse.stories.d.ts +1 -1
  25. package/lib/components/Collapse/index.d.ts +3 -3
  26. package/lib/components/Collapse/styles.d.ts +18 -24
  27. package/lib/components/DateField/DateField.stories.d.ts +1 -2
  28. package/lib/components/DateField/index.d.ts +2 -2
  29. package/lib/components/DateField/styles.d.ts +10 -6
  30. package/lib/components/Divider.d.ts +1 -1
  31. package/lib/components/ErrorText/ErrorText.stories.d.ts +1 -2
  32. package/lib/components/ErrorText/index.d.ts +3 -3
  33. package/lib/components/ErrorText/styles.d.ts +4 -2
  34. package/lib/components/Flex.d.ts +7 -2
  35. package/lib/components/Fontface.d.ts +4 -2
  36. package/lib/components/Footer/Footer.stories.d.ts +1 -1
  37. package/lib/components/Footer/index.d.ts +2 -2
  38. package/lib/components/Footer/styles.d.ts +18 -12
  39. package/lib/components/GlobalStyle.d.ts +2 -8
  40. package/lib/components/GlobalStyleNoFontFace.d.ts +2 -8
  41. package/lib/components/Header/Header.stories.d.ts +2 -2
  42. package/lib/components/Header/index.d.ts +2 -2
  43. package/lib/components/Header/styles.d.ts +31 -35
  44. package/lib/components/Heading/Heading.stories.d.ts +1 -2
  45. package/lib/components/Heading/index.d.ts +6 -6
  46. package/lib/components/Heading/styles.d.ts +16 -49
  47. package/lib/components/IconFa/IconFa.stories.d.ts +1 -2
  48. package/lib/components/IconFa/index.d.ts +2 -2
  49. package/lib/components/IconFa/styles.d.ts +7 -4
  50. package/lib/components/InfoBox/InfoBox.stories.d.ts +1 -1
  51. package/lib/components/InfoBox/index.d.ts +3 -3
  52. package/lib/components/InfoBox/styles.d.ts +8 -11
  53. package/lib/components/LabelWrapper/index.d.ts +2 -7
  54. package/lib/components/LabelWrapper/styles.d.ts +9 -7
  55. package/lib/components/LegendWrapper/LegendWrapper.stories.d.ts +2 -3
  56. package/lib/components/LegendWrapper/index.d.ts +2 -2
  57. package/lib/components/LegendWrapper/styles.d.ts +7 -7
  58. package/lib/components/Link/Link.stories.d.ts +1 -7
  59. package/lib/components/Link/index.d.ts +3 -14
  60. package/lib/components/Link/styles.d.ts +10 -17
  61. package/lib/components/Loader/Loader.stories.d.ts +1 -2
  62. package/lib/components/Loader/index.d.ts +1 -1
  63. package/lib/components/Loader/styles.d.ts +3 -3
  64. package/lib/components/Modal/Modal.stories.d.ts +2 -3
  65. package/lib/components/Modal/index.d.ts +3 -3
  66. package/lib/components/Modal/styles.d.ts +17 -24
  67. package/lib/components/Pagination/Pagination.stories.d.ts +1 -2
  68. package/lib/components/Pagination/index.d.ts +2 -2
  69. package/lib/components/Pagination/styles.d.ts +9 -11
  70. package/lib/components/PopOver/Popover.stories.d.ts +2 -2
  71. package/lib/components/PopOver/index.d.ts +3 -3
  72. package/lib/components/PopOver/styles.d.ts +11 -11
  73. package/lib/components/ProgressBar/ProgressBar.stories.d.ts +1 -2
  74. package/lib/components/ProgressBar/index.d.ts +2 -2
  75. package/lib/components/ProgressBar/styles.d.ts +31 -29
  76. package/lib/components/Radio/Radio.stories.d.ts +2 -7
  77. package/lib/components/Radio/index.d.ts +3 -10
  78. package/lib/components/Radio/styles.d.ts +15 -15
  79. package/lib/components/RadioConsent/Radio.stories.d.ts +2 -3
  80. package/lib/components/RadioConsent/index.d.ts +7 -6
  81. package/lib/components/RadioConsent/styles.d.ts +12 -12
  82. package/lib/components/Select/Selelct.stories.d.ts +1 -1
  83. package/lib/components/Select/index.d.ts +3 -3
  84. package/lib/components/Select/styles.d.ts +4 -4
  85. package/lib/components/Spacing/index.d.ts +52 -3
  86. package/lib/components/Step/Step.stories.d.ts +1 -2
  87. package/lib/components/Step/index.d.ts +2 -2
  88. package/lib/components/Step/styles.d.ts +15 -16
  89. package/lib/components/Text/Text.stories.d.ts +1 -1
  90. package/lib/components/Text/index.d.ts +5 -5
  91. package/lib/components/Text/styles.d.ts +12 -22
  92. package/lib/components/TextAreaField/TextAreaField.stories.d.ts +2 -4
  93. package/lib/components/TextAreaField/index.d.ts +3 -3
  94. package/lib/components/TextAreaField/styles.d.ts +4 -4
  95. package/lib/components/TextField/TextField.stories.d.ts +1 -1
  96. package/lib/components/TextField/index.d.ts +2 -2
  97. package/lib/components/TextField/styles.d.ts +15 -11
  98. package/lib/components/ThemeCheatSheet.d.ts +6 -5
  99. package/lib/components/Totaliser/Totaliser.stories.d.ts +1 -2
  100. package/lib/components/Totaliser/index.d.ts +3 -3
  101. package/lib/components/Totaliser/styles.d.ts +26 -18
  102. package/lib/components/UserBlock/UserBlock.stories.d.ts +1 -2
  103. package/lib/components/UserBlock/index.d.ts +2 -2
  104. package/lib/components/UserBlock/styles.d.ts +5 -5
  105. package/lib/components/index.d.ts +41 -41
  106. package/lib/hooks/useEffectBrowser.d.ts +1 -1
  107. package/lib/hooks/useKey.d.ts +3 -3
  108. package/lib/hooks/useLayoutEffectBrowser.d.ts +1 -1
  109. package/lib/hooks/useScrollPosition.d.ts +1 -1
  110. package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
  111. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
  112. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
  113. package/lib/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
  114. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +2 -0
  115. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
  116. package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
  117. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +2 -0
  118. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
  119. package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/toPropertyKey.js +1 -1
  120. package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
  121. package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
  122. package/lib/{es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js → node_modules/@fortawesome/free-solid-svg-icons/index.js} +1 -1
  123. package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +1 -0
  124. package/lib/node_modules/focus-lock/dist/es2015/commands.js +2 -0
  125. package/lib/node_modules/focus-lock/dist/es2015/commands.js.map +1 -0
  126. package/lib/node_modules/focus-lock/dist/es2015/constants.js.map +1 -0
  127. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -0
  128. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -0
  129. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +2 -0
  130. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -0
  131. package/lib/node_modules/focus-lock/dist/es2015/focusables.js +2 -0
  132. package/lib/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -0
  133. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -0
  134. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js +2 -0
  135. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -0
  136. package/lib/node_modules/focus-lock/dist/es2015/sibling.js +2 -0
  137. package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -0
  138. package/lib/node_modules/focus-lock/dist/es2015/solver.js +2 -0
  139. package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -0
  140. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -0
  141. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -0
  142. package/lib/node_modules/focus-lock/dist/es2015/utils/array.js.map +1 -0
  143. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -0
  144. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -0
  145. package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/firstFocus.js +1 -1
  146. package/lib/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +1 -0
  147. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -0
  148. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js +2 -0
  149. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -0
  150. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -0
  151. package/lib/node_modules/focus-lock/dist/es2015/utils/safe.js.map +1 -0
  152. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +2 -0
  153. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -0
  154. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -0
  155. package/lib/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +1 -0
  156. package/lib/node_modules/react-clientside-effect/lib/index.es.js.map +1 -0
  157. package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/Combination.js +1 -1
  158. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -0
  159. package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +1 -0
  160. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +2 -0
  161. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -0
  162. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +2 -0
  163. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -0
  164. package/lib/node_modules/react-focus-lock/dist/es2015/index.js +2 -0
  165. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js +2 -0
  166. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -0
  167. package/lib/node_modules/react-focus-lock/dist/es2015/scope.js +2 -0
  168. package/lib/node_modules/react-focus-lock/dist/es2015/scope.js.map +1 -0
  169. package/lib/node_modules/react-focus-lock/dist/es2015/util.js +2 -0
  170. package/lib/node_modules/react-focus-lock/dist/es2015/util.js.map +1 -0
  171. package/lib/node_modules/react-intersection-observer/dist/index.js +2 -0
  172. package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -0
  173. package/lib/{es/_virtual/_tslib.js → node_modules/tslib/tslib.es6.js} +1 -1
  174. package/lib/node_modules/tslib/tslib.es6.js.map +1 -0
  175. package/lib/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
  176. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +2 -0
  177. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
  178. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
  179. package/lib/node_modules/use-sidecar/dist/es2015/medium.js +2 -0
  180. package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
  181. package/lib/src/components/AddressLookup/index.js +2 -0
  182. package/lib/src/components/AddressLookup/index.js.map +1 -0
  183. package/lib/src/components/AddressLookup/styles.js +2 -0
  184. package/lib/src/components/AddressLookup/styles.js.map +1 -0
  185. package/lib/src/components/Avatar/index.js +2 -0
  186. package/lib/src/components/Avatar/index.js.map +1 -0
  187. package/lib/src/components/Avatar/styles.js +2 -0
  188. package/lib/src/components/Avatar/styles.js.map +1 -0
  189. package/lib/src/components/Badge/index.js +2 -0
  190. package/lib/src/components/Badge/index.js.map +1 -0
  191. package/lib/src/components/Badge/styles.js +2 -0
  192. package/lib/src/components/Badge/styles.js.map +1 -0
  193. package/lib/src/components/Box/index.js +2 -0
  194. package/lib/src/components/Box/index.js.map +1 -0
  195. package/lib/src/components/Box/styles.js +2 -0
  196. package/lib/src/components/Box/styles.js.map +1 -0
  197. package/lib/src/components/Button/index.js +2 -0
  198. package/lib/src/components/Button/index.js.map +1 -0
  199. package/lib/src/components/Button/styles.js +2 -0
  200. package/lib/src/components/Button/styles.js.map +1 -0
  201. package/lib/src/components/Carousel/Dots.js +2 -0
  202. package/lib/src/components/Carousel/Dots.js.map +1 -0
  203. package/lib/src/components/Carousel/index.js +2 -0
  204. package/lib/src/components/Carousel/index.js.map +1 -0
  205. package/lib/src/components/Carousel/styles.js +2 -0
  206. package/lib/src/components/Carousel/styles.js.map +1 -0
  207. package/lib/src/components/Checkbox/index.js +2 -0
  208. package/lib/src/components/Checkbox/index.js.map +1 -0
  209. package/lib/src/components/Checkbox/styles.js +2 -0
  210. package/lib/src/components/Checkbox/styles.js.map +1 -0
  211. package/lib/src/components/Collapse/index.js +2 -0
  212. package/lib/src/components/Collapse/index.js.map +1 -0
  213. package/lib/src/components/Collapse/styles.js +2 -0
  214. package/lib/src/components/Collapse/styles.js.map +1 -0
  215. package/lib/src/components/DateField/index.js +2 -0
  216. package/lib/src/components/DateField/index.js.map +1 -0
  217. package/lib/src/components/DateField/styles.js +2 -0
  218. package/lib/src/components/DateField/styles.js.map +1 -0
  219. package/lib/src/components/Divider.js +2 -0
  220. package/lib/src/components/Divider.js.map +1 -0
  221. package/lib/src/components/ErrorText/index.js +2 -0
  222. package/lib/src/components/ErrorText/index.js.map +1 -0
  223. package/lib/src/components/ErrorText/styles.js +2 -0
  224. package/lib/src/components/ErrorText/styles.js.map +1 -0
  225. package/lib/src/components/Flex.js +2 -0
  226. package/lib/src/components/Flex.js.map +1 -0
  227. package/lib/src/components/Fontface.js +2 -0
  228. package/lib/src/components/Fontface.js.map +1 -0
  229. package/lib/src/components/Footer/index.js +2 -0
  230. package/lib/src/components/Footer/index.js.map +1 -0
  231. package/lib/src/components/Footer/styles.js +2 -0
  232. package/lib/src/components/Footer/styles.js.map +1 -0
  233. package/lib/src/components/GlobalStyle.js +2 -0
  234. package/lib/src/components/GlobalStyle.js.map +1 -0
  235. package/lib/src/components/GlobalStyleNoFontFace.js +2 -0
  236. package/lib/src/components/GlobalStyleNoFontFace.js.map +1 -0
  237. package/lib/src/components/Header/index.js +2 -0
  238. package/lib/src/components/Header/index.js.map +1 -0
  239. package/lib/src/components/Header/styles.js +2 -0
  240. package/lib/src/components/Header/styles.js.map +1 -0
  241. package/lib/src/components/Heading/index.js +2 -0
  242. package/lib/src/components/Heading/index.js.map +1 -0
  243. package/lib/src/components/Heading/styles.js +2 -0
  244. package/lib/src/components/Heading/styles.js.map +1 -0
  245. package/lib/src/components/IconFa/index.js +2 -0
  246. package/lib/src/components/IconFa/index.js.map +1 -0
  247. package/lib/src/components/IconFa/styles.js +2 -0
  248. package/lib/src/components/IconFa/styles.js.map +1 -0
  249. package/lib/src/components/InfoBox/index.js +2 -0
  250. package/lib/src/components/InfoBox/index.js.map +1 -0
  251. package/lib/src/components/InfoBox/styles.js +2 -0
  252. package/lib/src/components/InfoBox/styles.js.map +1 -0
  253. package/lib/src/components/LabelWrapper/index.js +2 -0
  254. package/lib/src/components/LabelWrapper/index.js.map +1 -0
  255. package/lib/src/components/LabelWrapper/styles.js +2 -0
  256. package/lib/src/components/LabelWrapper/styles.js.map +1 -0
  257. package/lib/src/components/LegendWrapper/index.js +2 -0
  258. package/lib/src/components/LegendWrapper/index.js.map +1 -0
  259. package/lib/src/components/LegendWrapper/styles.js +2 -0
  260. package/lib/src/components/LegendWrapper/styles.js.map +1 -0
  261. package/lib/src/components/Link/index.js +2 -0
  262. package/lib/src/components/Link/index.js.map +1 -0
  263. package/lib/src/components/Link/styles.js +2 -0
  264. package/lib/src/components/Link/styles.js.map +1 -0
  265. package/lib/src/components/Loader/index.js +2 -0
  266. package/lib/src/components/Loader/index.js.map +1 -0
  267. package/lib/src/components/Loader/styles.js +2 -0
  268. package/lib/src/components/Loader/styles.js.map +1 -0
  269. package/lib/src/components/Modal/index.js +2 -0
  270. package/lib/src/components/Modal/index.js.map +1 -0
  271. package/lib/src/components/Modal/styles.js +2 -0
  272. package/lib/src/components/Modal/styles.js.map +1 -0
  273. package/lib/src/components/Pagination/index.js +2 -0
  274. package/lib/src/components/Pagination/index.js.map +1 -0
  275. package/lib/src/components/Pagination/styles.js +2 -0
  276. package/lib/src/components/Pagination/styles.js.map +1 -0
  277. package/lib/src/components/PopOver/index.js +2 -0
  278. package/lib/src/components/PopOver/index.js.map +1 -0
  279. package/lib/src/components/PopOver/styles.js +2 -0
  280. package/lib/src/components/PopOver/styles.js.map +1 -0
  281. package/lib/src/components/ProgressBar/index.js +2 -0
  282. package/lib/src/components/ProgressBar/index.js.map +1 -0
  283. package/lib/src/components/ProgressBar/styles.js +2 -0
  284. package/lib/src/components/ProgressBar/styles.js.map +1 -0
  285. package/lib/src/components/Radio/index.js +2 -0
  286. package/lib/src/components/Radio/index.js.map +1 -0
  287. package/lib/src/components/Radio/styles.js +2 -0
  288. package/lib/src/components/Radio/styles.js.map +1 -0
  289. package/lib/src/components/RadioConsent/index.js +2 -0
  290. package/lib/src/components/RadioConsent/index.js.map +1 -0
  291. package/lib/src/components/RadioConsent/styles.js +2 -0
  292. package/lib/src/components/RadioConsent/styles.js.map +1 -0
  293. package/lib/src/components/Select/index.js +2 -0
  294. package/lib/src/components/Select/index.js.map +1 -0
  295. package/lib/src/components/Select/styles.js +2 -0
  296. package/lib/src/components/Select/styles.js.map +1 -0
  297. package/lib/src/components/Spacing/index.js +2 -0
  298. package/lib/src/components/Spacing/index.js.map +1 -0
  299. package/lib/src/components/Step/index.js +2 -0
  300. package/lib/src/components/Step/index.js.map +1 -0
  301. package/lib/src/components/Step/styles.js +2 -0
  302. package/lib/src/components/Step/styles.js.map +1 -0
  303. package/lib/src/components/Text/index.js +2 -0
  304. package/lib/src/components/Text/index.js.map +1 -0
  305. package/lib/src/components/Text/styles.js +2 -0
  306. package/lib/src/components/Text/styles.js.map +1 -0
  307. package/lib/src/components/TextAreaField/index.js +2 -0
  308. package/lib/src/components/TextAreaField/index.js.map +1 -0
  309. package/lib/src/components/TextAreaField/styles.js +2 -0
  310. package/lib/src/components/TextAreaField/styles.js.map +1 -0
  311. package/lib/src/components/TextField/index.js +2 -0
  312. package/lib/src/components/TextField/index.js.map +1 -0
  313. package/lib/src/components/TextField/styles.js +2 -0
  314. package/lib/src/components/TextField/styles.js.map +1 -0
  315. package/lib/src/components/Totaliser/index.js +2 -0
  316. package/lib/src/components/Totaliser/index.js.map +1 -0
  317. package/lib/src/components/Totaliser/styles.js +2 -0
  318. package/lib/src/components/Totaliser/styles.js.map +1 -0
  319. package/lib/src/components/UserBlock/index.js +2 -0
  320. package/lib/src/components/UserBlock/index.js.map +1 -0
  321. package/lib/src/components/UserBlock/styles.js +2 -0
  322. package/lib/src/components/UserBlock/styles.js.map +1 -0
  323. package/lib/src/components/index.js +2 -0
  324. package/lib/src/hooks/useEffectBrowser.js.map +1 -0
  325. package/lib/src/hooks/useKey.js.map +1 -0
  326. package/lib/src/hooks/useLayoutEffectBrowser.js.map +1 -0
  327. package/lib/{es/src → src}/hooks/useScrollPosition.js +1 -1
  328. package/lib/src/hooks/useScrollPosition.js.map +1 -0
  329. package/lib/src/themes/bowelbabe.js +2 -0
  330. package/lib/src/themes/bowelbabe.js.map +1 -0
  331. package/lib/{es/src → src}/themes/cruk.js +1 -1
  332. package/lib/src/themes/cruk.js.map +1 -0
  333. package/lib/src/themes/rfl.js +2 -0
  334. package/lib/src/themes/rfl.js.map +1 -0
  335. package/lib/src/themes/su2c.js +2 -0
  336. package/lib/src/themes/su2c.js.map +1 -0
  337. package/lib/src/utils/Helper.js +2 -0
  338. package/lib/src/utils/Helper.js.map +1 -0
  339. package/lib/{es/src → src}/utils/debounce.js +1 -1
  340. package/lib/src/utils/debounce.js.map +1 -0
  341. package/lib/themes/bowelbabe.d.ts +3 -3
  342. package/lib/themes/cruk.d.ts +3 -3
  343. package/lib/themes/rfl.d.ts +3 -3
  344. package/lib/themes/su2c.d.ts +3 -3
  345. package/lib/types.d.ts +1 -3
  346. package/lib/utils/debounce.d.ts +2 -2
  347. package/package.json +44 -55
  348. package/lib/es/_virtual/_tslib.js.map +0 -1
  349. package/lib/es/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
  350. package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js +0 -2
  351. package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  352. package/lib/es/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
  353. package/lib/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -2
  354. package/lib/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
  355. package/lib/es/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  356. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -2
  357. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
  358. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
  359. package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
  360. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +0 -1
  361. package/lib/es/node_modules/focus-lock/dist/es2015/commands.js +0 -2
  362. package/lib/es/node_modules/focus-lock/dist/es2015/commands.js.map +0 -1
  363. package/lib/es/node_modules/focus-lock/dist/es2015/constants.js.map +0 -1
  364. package/lib/es/node_modules/focus-lock/dist/es2015/focusInside.js.map +0 -1
  365. package/lib/es/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +0 -1
  366. package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js +0 -2
  367. package/lib/es/node_modules/focus-lock/dist/es2015/focusSolver.js.map +0 -1
  368. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js +0 -2
  369. package/lib/es/node_modules/focus-lock/dist/es2015/focusables.js.map +0 -1
  370. package/lib/es/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +0 -1
  371. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js +0 -2
  372. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js.map +0 -1
  373. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +0 -1
  374. package/lib/es/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +0 -1
  375. package/lib/es/node_modules/focus-lock/dist/es2015/utils/array.js.map +0 -1
  376. package/lib/es/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +0 -1
  377. package/lib/es/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +0 -1
  378. package/lib/es/node_modules/focus-lock/dist/es2015/utils/firstFocus.js.map +0 -1
  379. package/lib/es/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +0 -1
  380. package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js +0 -2
  381. package/lib/es/node_modules/focus-lock/dist/es2015/utils/is.js.map +0 -1
  382. package/lib/es/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +0 -1
  383. package/lib/es/node_modules/focus-lock/dist/es2015/utils/safe.js.map +0 -1
  384. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +0 -2
  385. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +0 -1
  386. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +0 -1
  387. package/lib/es/node_modules/focus-lock/dist/es2015/utils/tabbables.js.map +0 -1
  388. package/lib/es/node_modules/react-clientside-effect/lib/index.es.js.map +0 -1
  389. package/lib/es/node_modules/react-focus-lock/dist/es2015/Combination.js.map +0 -1
  390. package/lib/es/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +0 -1
  391. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +0 -2
  392. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +0 -1
  393. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js +0 -2
  394. package/lib/es/node_modules/react-focus-lock/dist/es2015/Trap.js.map +0 -1
  395. package/lib/es/node_modules/react-focus-lock/dist/es2015/index.js +0 -2
  396. package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js +0 -2
  397. package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js.map +0 -1
  398. package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js +0 -2
  399. package/lib/es/node_modules/react-focus-lock/dist/es2015/util.js.map +0 -1
  400. package/lib/es/node_modules/react-intersection-observer/index.mjs.js +0 -2
  401. package/lib/es/node_modules/react-intersection-observer/index.mjs.js.map +0 -1
  402. package/lib/es/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
  403. package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -2
  404. package/lib/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
  405. package/lib/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +0 -1
  406. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js +0 -2
  407. package/lib/es/node_modules/use-sidecar/dist/es2015/medium.js.map +0 -1
  408. package/lib/es/src/components/AddressLookup/index.js +0 -2
  409. package/lib/es/src/components/AddressLookup/styles.js +0 -2
  410. package/lib/es/src/components/AddressLookup/styles.js.map +0 -1
  411. package/lib/es/src/components/Avatar/index.js +0 -2
  412. package/lib/es/src/components/Avatar/index.js.map +0 -1
  413. package/lib/es/src/components/Avatar/styles.js +0 -2
  414. package/lib/es/src/components/Avatar/styles.js.map +0 -1
  415. package/lib/es/src/components/Badge/index.js +0 -2
  416. package/lib/es/src/components/Badge/index.js.map +0 -1
  417. package/lib/es/src/components/Badge/styles.js +0 -2
  418. package/lib/es/src/components/Badge/styles.js.map +0 -1
  419. package/lib/es/src/components/Box/index.js +0 -2
  420. package/lib/es/src/components/Box/index.js.map +0 -1
  421. package/lib/es/src/components/Box/styles.js +0 -2
  422. package/lib/es/src/components/Box/styles.js.map +0 -1
  423. package/lib/es/src/components/Button/index.js +0 -2
  424. package/lib/es/src/components/Button/index.js.map +0 -1
  425. package/lib/es/src/components/Button/styles.js +0 -2
  426. package/lib/es/src/components/Button/styles.js.map +0 -1
  427. package/lib/es/src/components/Carousel/Dots.js +0 -2
  428. package/lib/es/src/components/Carousel/Dots.js.map +0 -1
  429. package/lib/es/src/components/Carousel/index.js +0 -2
  430. package/lib/es/src/components/Carousel/index.js.map +0 -1
  431. package/lib/es/src/components/Carousel/styles.js +0 -2
  432. package/lib/es/src/components/Carousel/styles.js.map +0 -1
  433. package/lib/es/src/components/Checkbox/index.js +0 -2
  434. package/lib/es/src/components/Checkbox/index.js.map +0 -1
  435. package/lib/es/src/components/Checkbox/styles.js +0 -2
  436. package/lib/es/src/components/Checkbox/styles.js.map +0 -1
  437. package/lib/es/src/components/Collapse/index.js +0 -2
  438. package/lib/es/src/components/Collapse/index.js.map +0 -1
  439. package/lib/es/src/components/Collapse/styles.js +0 -2
  440. package/lib/es/src/components/Collapse/styles.js.map +0 -1
  441. package/lib/es/src/components/DateField/index.js +0 -2
  442. package/lib/es/src/components/DateField/index.js.map +0 -1
  443. package/lib/es/src/components/DateField/styles.js +0 -2
  444. package/lib/es/src/components/DateField/styles.js.map +0 -1
  445. package/lib/es/src/components/Divider.js +0 -2
  446. package/lib/es/src/components/Divider.js.map +0 -1
  447. package/lib/es/src/components/ErrorText/index.js +0 -2
  448. package/lib/es/src/components/ErrorText/index.js.map +0 -1
  449. package/lib/es/src/components/ErrorText/styles.js +0 -2
  450. package/lib/es/src/components/ErrorText/styles.js.map +0 -1
  451. package/lib/es/src/components/Flex.js +0 -2
  452. package/lib/es/src/components/Flex.js.map +0 -1
  453. package/lib/es/src/components/Fontface.js +0 -2
  454. package/lib/es/src/components/Fontface.js.map +0 -1
  455. package/lib/es/src/components/Footer/index.js +0 -2
  456. package/lib/es/src/components/Footer/index.js.map +0 -1
  457. package/lib/es/src/components/Footer/styles.js +0 -2
  458. package/lib/es/src/components/Footer/styles.js.map +0 -1
  459. package/lib/es/src/components/GlobalStyle.js +0 -2
  460. package/lib/es/src/components/GlobalStyle.js.map +0 -1
  461. package/lib/es/src/components/GlobalStyleNoFontFace.js +0 -2
  462. package/lib/es/src/components/GlobalStyleNoFontFace.js.map +0 -1
  463. package/lib/es/src/components/Header/index.js +0 -2
  464. package/lib/es/src/components/Header/index.js.map +0 -1
  465. package/lib/es/src/components/Header/styles.js +0 -2
  466. package/lib/es/src/components/Header/styles.js.map +0 -1
  467. package/lib/es/src/components/Heading/index.js +0 -2
  468. package/lib/es/src/components/Heading/index.js.map +0 -1
  469. package/lib/es/src/components/Heading/styles.js +0 -2
  470. package/lib/es/src/components/Heading/styles.js.map +0 -1
  471. package/lib/es/src/components/IconFa/index.js +0 -2
  472. package/lib/es/src/components/IconFa/index.js.map +0 -1
  473. package/lib/es/src/components/IconFa/styles.js +0 -2
  474. package/lib/es/src/components/IconFa/styles.js.map +0 -1
  475. package/lib/es/src/components/InfoBox/index.js +0 -2
  476. package/lib/es/src/components/InfoBox/index.js.map +0 -1
  477. package/lib/es/src/components/InfoBox/styles.js +0 -2
  478. package/lib/es/src/components/InfoBox/styles.js.map +0 -1
  479. package/lib/es/src/components/LabelWrapper/index.js +0 -2
  480. package/lib/es/src/components/LabelWrapper/index.js.map +0 -1
  481. package/lib/es/src/components/LabelWrapper/styles.js +0 -2
  482. package/lib/es/src/components/LabelWrapper/styles.js.map +0 -1
  483. package/lib/es/src/components/LegendWrapper/index.js +0 -2
  484. package/lib/es/src/components/LegendWrapper/index.js.map +0 -1
  485. package/lib/es/src/components/LegendWrapper/styles.js +0 -2
  486. package/lib/es/src/components/LegendWrapper/styles.js.map +0 -1
  487. package/lib/es/src/components/Link/index.js +0 -2
  488. package/lib/es/src/components/Link/index.js.map +0 -1
  489. package/lib/es/src/components/Link/styles.js +0 -2
  490. package/lib/es/src/components/Link/styles.js.map +0 -1
  491. package/lib/es/src/components/Loader/index.js +0 -2
  492. package/lib/es/src/components/Loader/index.js.map +0 -1
  493. package/lib/es/src/components/Loader/styles.js +0 -2
  494. package/lib/es/src/components/Loader/styles.js.map +0 -1
  495. package/lib/es/src/components/Modal/index.js +0 -2
  496. package/lib/es/src/components/Modal/index.js.map +0 -1
  497. package/lib/es/src/components/Modal/styles.js +0 -2
  498. package/lib/es/src/components/Modal/styles.js.map +0 -1
  499. package/lib/es/src/components/Pagination/index.js +0 -2
  500. package/lib/es/src/components/Pagination/index.js.map +0 -1
  501. package/lib/es/src/components/Pagination/styles.js +0 -2
  502. package/lib/es/src/components/Pagination/styles.js.map +0 -1
  503. package/lib/es/src/components/PopOver/index.js +0 -2
  504. package/lib/es/src/components/PopOver/index.js.map +0 -1
  505. package/lib/es/src/components/PopOver/styles.js +0 -2
  506. package/lib/es/src/components/PopOver/styles.js.map +0 -1
  507. package/lib/es/src/components/ProgressBar/index.js +0 -2
  508. package/lib/es/src/components/ProgressBar/index.js.map +0 -1
  509. package/lib/es/src/components/ProgressBar/styles.js +0 -2
  510. package/lib/es/src/components/ProgressBar/styles.js.map +0 -1
  511. package/lib/es/src/components/Radio/index.js +0 -2
  512. package/lib/es/src/components/Radio/index.js.map +0 -1
  513. package/lib/es/src/components/Radio/styles.js +0 -2
  514. package/lib/es/src/components/Radio/styles.js.map +0 -1
  515. package/lib/es/src/components/RadioConsent/index.js +0 -2
  516. package/lib/es/src/components/RadioConsent/index.js.map +0 -1
  517. package/lib/es/src/components/RadioConsent/styles.js +0 -2
  518. package/lib/es/src/components/RadioConsent/styles.js.map +0 -1
  519. package/lib/es/src/components/Select/index.js +0 -2
  520. package/lib/es/src/components/Select/index.js.map +0 -1
  521. package/lib/es/src/components/Select/styles.js +0 -2
  522. package/lib/es/src/components/Select/styles.js.map +0 -1
  523. package/lib/es/src/components/Spacing/index.js +0 -2
  524. package/lib/es/src/components/Spacing/index.js.map +0 -1
  525. package/lib/es/src/components/Step/index.js +0 -2
  526. package/lib/es/src/components/Step/index.js.map +0 -1
  527. package/lib/es/src/components/Step/styles.js +0 -2
  528. package/lib/es/src/components/Step/styles.js.map +0 -1
  529. package/lib/es/src/components/Text/index.js +0 -2
  530. package/lib/es/src/components/Text/index.js.map +0 -1
  531. package/lib/es/src/components/Text/styles.js +0 -2
  532. package/lib/es/src/components/Text/styles.js.map +0 -1
  533. package/lib/es/src/components/TextAreaField/index.js +0 -2
  534. package/lib/es/src/components/TextAreaField/index.js.map +0 -1
  535. package/lib/es/src/components/TextAreaField/styles.js +0 -2
  536. package/lib/es/src/components/TextAreaField/styles.js.map +0 -1
  537. package/lib/es/src/components/TextField/index.js +0 -2
  538. package/lib/es/src/components/TextField/index.js.map +0 -1
  539. package/lib/es/src/components/TextField/styles.js +0 -2
  540. package/lib/es/src/components/TextField/styles.js.map +0 -1
  541. package/lib/es/src/components/Totaliser/index.js +0 -2
  542. package/lib/es/src/components/Totaliser/index.js.map +0 -1
  543. package/lib/es/src/components/Totaliser/styles.js +0 -2
  544. package/lib/es/src/components/Totaliser/styles.js.map +0 -1
  545. package/lib/es/src/components/UserBlock/index.js +0 -2
  546. package/lib/es/src/components/UserBlock/index.js.map +0 -1
  547. package/lib/es/src/components/UserBlock/styles.js +0 -2
  548. package/lib/es/src/components/UserBlock/styles.js.map +0 -1
  549. package/lib/es/src/components/index.js +0 -2
  550. package/lib/es/src/components/index.js.map +0 -1
  551. package/lib/es/src/hooks/useEffectBrowser.js.map +0 -1
  552. package/lib/es/src/hooks/useKey.js.map +0 -1
  553. package/lib/es/src/hooks/useLayoutEffectBrowser.js.map +0 -1
  554. package/lib/es/src/hooks/useScrollPosition.js.map +0 -1
  555. package/lib/es/src/themes/bowelbabe.js +0 -2
  556. package/lib/es/src/themes/bowelbabe.js.map +0 -1
  557. package/lib/es/src/themes/cruk.js.map +0 -1
  558. package/lib/es/src/themes/rfl.js +0 -2
  559. package/lib/es/src/themes/rfl.js.map +0 -1
  560. package/lib/es/src/themes/su2c.js +0 -2
  561. package/lib/es/src/themes/su2c.js.map +0 -1
  562. package/lib/es/src/utils/Helper.js +0 -2
  563. package/lib/es/src/utils/Helper.js.map +0 -1
  564. package/lib/es/src/utils/debounce.js.map +0 -1
  565. /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/defineProperty.js +0 -0
  566. /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/inheritsLoose.js +0 -0
  567. /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -0
  568. /package/lib/{es/node_modules → node_modules}/@babel/runtime/helpers/esm/typeof.js +0 -0
  569. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/constants.js +0 -0
  570. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/focusInside.js +0 -0
  571. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/focusIsHidden.js +0 -0
  572. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/moveFocusInside.js +0 -0
  573. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/DOMutils.js +0 -0
  574. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/all-affected.js +0 -0
  575. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/array.js +0 -0
  576. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/auto-focus.js +0 -0
  577. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/correctFocus.js +0 -0
  578. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/getActiveElement.js +0 -0
  579. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/parenting.js +0 -0
  580. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/safe.js +0 -0
  581. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/tabUtils.js +0 -0
  582. /package/lib/{es/node_modules → node_modules}/focus-lock/dist/es2015/utils/tabbables.js +0 -0
  583. /package/lib/{es/node_modules → node_modules}/react-clientside-effect/lib/index.es.js +0 -0
  584. /package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/FocusGuard.js +0 -0
  585. /package/lib/{es/node_modules → node_modules}/react-focus-lock/dist/es2015/index.js.map +0 -0
  586. /package/lib/{es/node_modules → node_modules}/use-callback-ref/dist/es2015/assignRef.js +0 -0
  587. /package/lib/{es/node_modules → node_modules}/use-callback-ref/dist/es2015/useRef.js +0 -0
  588. /package/lib/{es/src/components/AddressLookup → src/components}/index.js.map +0 -0
  589. /package/lib/{es/src → src}/hooks/useEffectBrowser.js +0 -0
  590. /package/lib/{es/src → src}/hooks/useKey.js +0 -0
  591. /package/lib/{es/src → src}/hooks/useLayoutEffectBrowser.js +0 -0
  592. /package/lib/utils/__tests__/{testHelpers.jest.d.ts → testHelpers.test.d.ts} +0 -0
package/README.md CHANGED
@@ -32,6 +32,50 @@ const MyComponent = () => (
32
32
  );
33
33
  ```
34
34
 
35
+ ## Migration from V4 to V5
36
+
37
+ Because Styped Components now manages its own types on stead of relying on the community efforts on the DefinitelyTyped project, you may need to use generics instead of inline prop type definition inside styledComponents componets.
38
+
39
+ ### Before:
40
+
41
+ ```tsx
42
+ export const StyledButton = styled(Button)`
43
+ border-radius: ${({ theme }: StyledButtonProps) => theme.button.borderRadius};
44
+ `;
45
+ ```
46
+
47
+ ### Now:
48
+
49
+ ```tsx
50
+ export const StyledButton = styled(Button)<StyledButtonProps>`
51
+ border-radius: ${({ theme }) => theme.button.borderRadius};
52
+ `;
53
+ ```
54
+
55
+ Styled components 6 also no longer filters out custom props, so to stop a prop bleeding into child components or the underlying html element, prefix the prop name with a $ see size prop in example below:
56
+
57
+ ### Before:
58
+
59
+ ```tsx
60
+ <StyledAvatar
61
+ {...rest}
62
+ size={theme.avatar[size || "m"]}
63
+ src={avatarUrl()}
64
+ alt={alt}
65
+ />
66
+ ```
67
+
68
+ ### Now:
69
+
70
+ ```tsx
71
+ <StyledAvatar
72
+ {...rest}
73
+ $size={theme.avatar[size || "m"]}
74
+ src={avatarUrl()}
75
+ alt={alt}
76
+ />
77
+ ```
78
+
35
79
  ## Migration from V0 to V1
36
80
 
37
81
  1. Find all instances of RadioGroup and change it to the new component name of RadioConsent
@@ -70,11 +114,11 @@ However this isn't as well maintained as the storybook stories and will soon be
70
114
 
71
115
  ## Testing
72
116
 
73
- Jest: Unit testing,
117
+ Node: Unit testing,
74
118
  Cypress: Component function, accessibility
75
119
  Chromatic: Image snapshot comparison service, this happens in CI, people are given access to this service via their Github login.
76
120
 
77
- Run all tests Jest and Cypress
121
+ Run all tests Unit and Cypress
78
122
 
79
123
  ```sh
80
124
  npm run test
@@ -92,21 +136,9 @@ Run Cypress headlessly including image snapshots, docker desktop app will need t
92
136
  npm run cypress-headless
93
137
  ```
94
138
 
95
- To run a specific test Cypress headlessly
96
-
97
- ```sh
98
- ARGS="--spec src/components/Modal/test.cypress.tsx" npm run cypress-headless
99
- ```
100
-
101
- To run and update a specific snapshot headlessly
102
-
103
- ```sh
104
- ARGS="--spec src/components/Modal/test.cypress.tsx" npm run cypress-headless:update
105
- ```
106
-
107
- ### Maintaining
139
+ ## Maintaining
108
140
 
109
- ## Dependencies
141
+ ### Dependencies
110
142
 
111
143
  If you update cypress version make sure you update it in the package.json and in the in docker compose file.
112
144
 
@@ -118,7 +150,7 @@ npm run rollup:build-lib
118
150
 
119
151
  and see if it can successfully build the library before running the release script
120
152
 
121
- ## Releases
153
+ ### Releases
122
154
 
123
155
  Please update the version number in the package.json and follow the semver standards for version numbers.
124
156
 
@@ -3,21 +3,7 @@ import { StoryObj } from "@storybook/react";
3
3
  import AddressLookup from ".";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
7
- apiKey: string;
8
- countries?: string[] | undefined;
9
- onAddressSelected: (address: import("..").AddressDataType) => void;
10
- errorMessage?: string | undefined;
11
- hasError?: boolean | undefined;
12
- isValid?: boolean | undefined;
13
- isValidVisible?: boolean | undefined;
14
- isInvalidVisible?: boolean | undefined;
15
- label?: string | undefined;
16
- hintText?: React.ReactNode;
17
- onAddressError?: ((error: Error) => void) | undefined;
18
- onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
19
- ref?: React.Ref<HTMLInputElement> | undefined;
20
- }, "ref"> & React.RefAttributes<HTMLInputElement>>;
6
+ component: React.ForwardRefExoticComponent<Omit<import(".").AddressLookupProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
21
7
  args: {
22
8
  disabled: boolean;
23
9
  errorMessage: string;
@@ -1,5 +1,5 @@
1
- import React, { InputHTMLAttributes, Ref, FocusEvent, ReactNode } from "react";
2
- import { AddressDataType } from "../../types";
1
+ import React, { type InputHTMLAttributes, type Ref, type FocusEvent, type ReactNode } from "react";
2
+ import { type AddressDataType } from "../../types";
3
3
  export type AddressLookupProps = InputHTMLAttributes<HTMLInputElement> & {
4
4
  /** api key for loqate */
5
5
  apiKey: string;
@@ -34,32 +34,5 @@ export type AddressLookupProps = InputHTMLAttributes<HTMLInputElement> & {
34
34
  * You will need a Loqate api key, the examples below use "MG17-ZD93-FF33-KF13" our development key.
35
35
  * This component is generally only used for country codes including "GBR", "GGY", "IMN", "JEY". An example of this behavior is included bellow.
36
36
  */
37
- declare const AddressLookup: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
38
- /** api key for loqate */
39
- apiKey: string;
40
- /** list of countries codes you want the address look up to search within */
41
- countries?: string[] | undefined;
42
- /** callback function which is passed the selected address data */
43
- onAddressSelected: (address: AddressDataType) => void;
44
- /** error message */
45
- errorMessage?: string | undefined;
46
- /** when true a input has a red border */
47
- hasError?: boolean | undefined;
48
- /** flag which effects the check or cross icons to the right of the input */
49
- isValid?: boolean | undefined;
50
- /** flag to hide or show the check icon when valid */
51
- isValidVisible?: boolean | undefined;
52
- /** flag to hide or show the cross icon when invalid */
53
- isInvalidVisible?: boolean | undefined;
54
- /** label text */
55
- label?: string | undefined;
56
- /** hint text text */
57
- hintText?: ReactNode;
58
- /** callback function which is passed the error */
59
- onAddressError?: ((error: Error) => void) | undefined;
60
- /** onBlur handler */
61
- onBlur?: ((e: FocusEvent<HTMLInputElement>) => void) | undefined;
62
- /** attach a DOM reference variable to your component */
63
- ref?: React.Ref<HTMLInputElement> | undefined;
64
- }, "ref"> & React.RefAttributes<HTMLInputElement>>;
37
+ export declare const AddressLookup: React.ForwardRefExoticComponent<Omit<AddressLookupProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
65
38
  export default AddressLookup;
@@ -1,13 +1,17 @@
1
+ import { type ThemeType } from "../../types";
1
2
  interface ListWrapperProps extends React.HTMLProps<HTMLDivElement> {
2
3
  tabIndex?: number;
3
4
  }
4
- export declare const ListWrapper: import("styled-components").StyledComponent<"div", any, ListWrapperProps, never>;
5
- export declare const List: import("styled-components").StyledComponent<"ul", any, {
6
- ref?: import("react").Ref<HTMLUListElement> | undefined;
7
- }, never>;
8
- export declare const ListItem: import("styled-components").StyledComponent<"li", any, {
9
- isActive: boolean;
10
- ref?: import("react").Ref<HTMLLIElement> | undefined;
11
- }, never>;
12
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ type ListProps = {
6
+ theme: ThemeType;
7
+ $isActive?: boolean;
8
+ };
9
+ export declare const ListWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ListWrapperProps>> & string;
10
+ export declare const List: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, ListProps & {
11
+ ref?: React.Ref<HTMLUListElement>;
12
+ }>> & string;
13
+ export declare const ListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, ListProps & {
14
+ ref?: React.Ref<HTMLLIElement>;
15
+ }>> & string;
16
+ export declare const ScreenReaderOnly: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
17
  export {};
@@ -1,5 +1,5 @@
1
- import React, { ReactNode } from "react";
2
- import { ThemeType } from "../types";
1
+ import React, { type ReactNode } from "react";
2
+ import { type ThemeType } from "../types";
3
3
  type TestThemeWrapperProps = {
4
4
  theme?: ThemeType;
5
5
  children?: ReactNode;
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  import { StoryObj } from "@storybook/react";
3
- import Avatar from ".";
2
+ import { Avatar } from ".";
4
3
  declare const _default: {
5
4
  title: string;
6
- component: ({ url, name, size, alt, ...rest }: import(".").AvatarProps) => React.JSX.Element;
5
+ component: typeof Avatar;
7
6
  args: {
8
7
  name: string;
9
8
  size: string;
@@ -1,4 +1,4 @@
1
- import React, { ImgHTMLAttributes } from "react";
1
+ import React, { type ImgHTMLAttributes } from "react";
2
2
  export type AvatarProps = ImgHTMLAttributes<HTMLElement> & {
3
3
  /** name of user/entity */
4
4
  name?: string;
@@ -11,5 +11,5 @@ export type AvatarProps = ImgHTMLAttributes<HTMLElement> & {
11
11
  *
12
12
  * You can use an avatar to display ownership of an item of content. If you pass a URL of an image that will be displayed otherwise the first letter of the name will be used to display a branded avatar.
13
13
  */
14
- declare const Avatar: ({ url, name, size, alt, ...rest }: AvatarProps) => React.JSX.Element;
14
+ export declare function Avatar({ url, name, size, alt, ...rest }: AvatarProps): React.JSX.Element;
15
15
  export default Avatar;
@@ -1,7 +1,7 @@
1
- import { ThemeType } from "../../types";
1
+ import { type ThemeType } from "../../types";
2
2
  type AvatarStyledProps = {
3
- size?: string;
3
+ $size?: string;
4
4
  theme: ThemeType;
5
5
  };
6
- export declare const StyledAvatar: import("styled-components").StyledComponent<"img", any, AvatarStyledProps, never>;
6
+ export declare const StyledAvatar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, AvatarStyledProps>> & string;
7
7
  export default StyledAvatar;
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  import { StoryObj } from "@storybook/react";
3
- import Badge from ".";
2
+ import { Badge } from ".";
4
3
  declare const _default: {
5
4
  title: string;
6
- component: ({ children, ...rest }: import(".").BadgeProps) => React.JSX.Element;
5
+ component: typeof Badge;
7
6
  args: {
8
7
  borderColor: string;
9
8
  backgroundColor: string;
@@ -1,6 +1,6 @@
1
- import React, { ReactNode } from "react";
2
- import { SpaceType } from "../../types";
3
- export type BadgeProps = {
1
+ import React, { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type SpaceType } from "../../types";
3
+ export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
4
4
  /** background colour of badge */
5
5
  backgroundColor?: string;
6
6
  /** border colour of badge */
@@ -25,5 +25,5 @@ at the end of a sentence, link, or button. Unless the context is clear,
25
25
  consider including additional context with a visually hidden piece of
26
26
  additional text.
27
27
  */
28
- declare const Badge: ({ children, ...rest }: BadgeProps) => React.JSX.Element;
28
+ export declare function Badge({ children, size, backgroundColor, borderColor, textColor, ...rest }: BadgeProps): React.JSX.Element;
29
29
  export default Badge;
@@ -1,11 +1,11 @@
1
- import { SpaceType, ThemeType } from "../../types";
1
+ import { type SpaceType, type ThemeType } from "../../types";
2
2
  type StyleBadgeProps = {
3
- backgroundColor?: string;
4
- borderColor?: string;
5
- textColor?: string;
6
- isText?: boolean;
7
- size: SpaceType;
3
+ $backgroundColor?: string;
4
+ $borderColor?: string;
5
+ $textColor?: string;
6
+ $isText?: boolean;
7
+ $size: SpaceType;
8
8
  theme: ThemeType;
9
9
  };
10
- export declare const StyledBadge: import("styled-components").StyledComponent<"span", any, StyleBadgeProps, never>;
10
+ export declare const StyledBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, StyleBadgeProps>> & string;
11
11
  export default StyledBadge;
@@ -3,7 +3,7 @@ import { StoryObj } from "@storybook/react";
3
3
  import Box from ".";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: React.FunctionComponent<import(".").BoxProps>;
6
+ component: React.ForwardRefExoticComponent<Omit<import(".").BoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  args: {};
8
8
  tags: string[];
9
9
  };
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, HTMLAttributes, Ref, ReactNode, ElementType } from "react";
2
- import { SpacingProps } from "../Spacing";
1
+ import React, { type HTMLAttributes, type Ref, type ReactNode, type ElementType } from "react";
2
+ import { type SpacingProps } from "../Spacing";
3
3
  export type BoxProps = SpacingProps & HTMLAttributes<HTMLElement> & {
4
4
  /** background color of box, this will add default padding */
5
5
  backgroundColor?: string;
@@ -10,9 +10,10 @@ export type BoxProps = SpacingProps & HTMLAttributes<HTMLElement> & {
10
10
  as?: ElementType;
11
11
  };
12
12
  /**
13
- * Box is used to wrap other components to add margin and padding. The values will be in the t-shirt sizes specified in the theme sizes.
14
-
15
- The more specific the the target the higher priority the css will have. For example `margin` will be overridden by the `marginVertical` or `marginHorizontal` props. `marginTop`, `marginBottom`, `marginLeft`, `marginRight` will override the the `marginVertical` and `marginHorizontal` props.
13
+ * Box is used to wrap other components to add margin and padding.
14
+ * The values will be in the t-shirt sizes specified in the theme sizes.
15
+ * The more specific the the target the higher priority the css will have.
16
+ * For example `margin` will be overridden by the `marginVertical` or `marginHorizontal` props. `marginTop`, `marginBottom`, `marginLeft`, `marginRight` will override the the `marginVertical` and `marginHorizontal` props.
16
17
  */
17
- declare const Box: FunctionComponent<BoxProps>;
18
+ export declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
19
  export default Box;
@@ -1,8 +1,9 @@
1
- import { SpacingProps } from "../Spacing";
2
- import { ThemeType } from "../../types";
3
- export declare const StyledBox: import("styled-components").StyledComponent<"div", any, SpacingProps & {
4
- backgroundColor?: string | undefined;
5
- css?: string | undefined;
1
+ import { type SpacingPropsInternal } from "../Spacing";
2
+ import { type ThemeType } from "../../types";
3
+ type StyledBoxProps = SpacingPropsInternal & {
4
+ $backgroundColor?: string;
5
+ $css?: string;
6
6
  theme: ThemeType;
7
- }, never>;
7
+ };
8
+ export declare const StyledBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBoxProps>> & string;
8
9
  export default StyledBox;
@@ -3,17 +3,7 @@ import { StoryObj } from "@storybook/react";
3
3
  import { Button } from "./";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLElement> & {
7
- appearance?: import("..").ButtonAppearanceType | undefined;
8
- full?: boolean | undefined;
9
- href?: string | undefined;
10
- size?: "m" | "l" | undefined;
11
- css?: any;
12
- as?: React.ElementType | undefined;
13
- isIconButton?: boolean | undefined;
14
- ref?: React.Ref<HTMLElement> | undefined;
15
- children?: React.ReactNode;
16
- }, "ref"> & React.RefAttributes<HTMLElement>>;
6
+ component: React.ForwardRefExoticComponent<Omit<import("./").ButtonProps, "ref"> & React.RefAttributes<HTMLElement>>;
17
7
  args: {
18
8
  appearance: string;
19
9
  disabled: boolean;
@@ -1,15 +1,15 @@
1
- import React, { ReactNode, ButtonHTMLAttributes, Ref, ElementType } from "react";
2
- import { ButtonAppearanceType } from "../../types";
1
+ import React, { type ReactNode, type ButtonHTMLAttributes, type Ref, type ElementType } from "react";
2
+ import { type ButtonAppearanceType } from "../../types";
3
3
  export type ButtonProps = ButtonHTMLAttributes<HTMLElement> & {
4
4
  /** the look and feel of the button */
5
5
  appearance?: ButtonAppearanceType;
6
- /** flag to streatch but to 100% width */
6
+ /** flag to stretch but to 100% width */
7
7
  full?: boolean;
8
8
  /** this is a url which will convert the button to an anchor tag */
9
9
  href?: string;
10
10
  /** the height of the button, this will add padding not increase text size */
11
11
  size?: "m" | "l";
12
- css?: any;
12
+ css?: unknown;
13
13
  /** styled-components polymorphism where you can use the styling of a button but convert to another element like an anchor tag */
14
14
  as?: ElementType;
15
15
  /** flag to force button into an icon button shape which is square or round */
@@ -24,23 +24,5 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLElement> & {
24
24
  *
25
25
  * Design system documentation SU2C https://zeroheight.com/79db39f7e/p/22ff0e-button/b/32e1a2
26
26
  */
27
- export declare const Button: React.ForwardRefExoticComponent<Omit<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
- }, "ref"> & React.RefAttributes<HTMLElement>>;
27
+ export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLElement>>;
46
28
  export default Button;
@@ -1,15 +1,15 @@
1
- import { ThemeType, ButtonAppearanceType } from "../../types";
2
- export declare const Spacer: import("styled-components").StyledComponent<"span", any, {
1
+ import { type ThemeType, type ButtonAppearanceType } from "../../types";
2
+ export declare const Spacer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
3
3
  theme: ThemeType;
4
- }, never>;
4
+ }>> & string;
5
5
  type StyledButtonProps = {
6
- isIconButton: boolean;
7
- appearance?: ButtonAppearanceType;
8
- full?: boolean;
6
+ $isIconButton: boolean;
7
+ $appearance?: ButtonAppearanceType;
8
+ $full?: boolean;
9
9
  theme: ThemeType;
10
10
  href?: string;
11
- size?: "m" | "l";
12
- css?: string;
11
+ $size?: "m" | "l";
12
+ $css?: string;
13
13
  };
14
- export declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
14
+ export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledButtonProps>> & string;
15
15
  export {};
@@ -1,4 +1,4 @@
1
- import React, { ButtonHTMLAttributes } from "react";
1
+ import React, { type ButtonHTMLAttributes } from "react";
2
2
  type DotProps = {
3
3
  count: number;
4
4
  currentPosition: number;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import React, { type ReactNode } from "react";
2
2
  export type CarouselProps = {
3
3
  /** Index in which the carousel is scrolled to on mount */
4
4
  startPosition?: number;
@@ -1,33 +1,35 @@
1
- import { ThemeType } from "../../types";
2
- export declare const CarouselWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import { type ThemeType } from "../../types";
2
+ import { type ButtonHTMLAttributes } from "react";
3
+ export declare const CarouselWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
4
  type ThemeProps = {
4
5
  theme: ThemeType;
5
6
  };
6
7
  type CarouselScrollAreaProps = {
7
- smoothScrolling: boolean;
8
+ $smoothScrolling: boolean;
8
9
  };
9
10
  type CarouselCardProps = {
10
- onlyChild: boolean;
11
- fullWidthChild: boolean;
11
+ $onlyChild: boolean;
12
+ $fullWidthChild: boolean;
12
13
  };
13
14
  type CarouselCardInnerProps = {
14
- isSelected: boolean;
15
- shrinkUnselectedPages: boolean;
16
- onlyChild: boolean;
17
- fullWidthChild: boolean;
15
+ $isSelected: boolean;
16
+ $shrinkUnselectedPages: boolean;
17
+ $onlyChild: boolean;
18
+ $fullWidthChild: boolean;
18
19
  };
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 & {
20
+ export declare const CarouselScrollArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, CarouselScrollAreaProps>> & string;
21
+ export declare const CarouselCard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, CarouselCardProps>> & string;
22
+ export declare const CarouselCardInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, CarouselCardInnerProps>> & string;
23
+ export declare const ButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
+ export declare const VerticalAlign: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
25
+ type CarouselButtonProps = ThemeProps & ButtonHTMLAttributes<HTMLElement>;
26
+ export declare const CarouselButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, CarouselButtonProps>> & string;
27
+ type DotContainerProps = ThemeProps & {
26
28
  count: number;
27
- }, never>;
28
- export declare const Dot: import("styled-components").StyledComponent<"button", any, {
29
- theme: ThemeType;
29
+ };
30
+ export declare const DotContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, DotContainerProps>> & string;
31
+ export declare const Dot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ThemeProps & {
30
32
  selected: boolean;
31
- }, never>;
32
- export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", any, {}, never>;
33
+ }>> & string;
34
+ export declare const ScreenReaderOnly: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
33
35
  export {};
@@ -1,14 +1,9 @@
1
1
  import React from "react";
2
2
  import { StoryObj } from "@storybook/react";
3
- import CheckBox from ".";
3
+ import CheckBox, { CheckBoxProps } from ".";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement> & {
7
- ref?: React.Ref<HTMLInputElement> | undefined;
8
- hasError?: boolean | undefined;
9
- errorMessage?: string | undefined;
10
- children?: React.ReactNode;
11
- }, "ref"> & React.RefAttributes<HTMLInputElement>>;
6
+ component: React.ForwardRefExoticComponent<Omit<CheckBoxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
12
7
  args: {
13
8
  id: string;
14
9
  disabled: boolean;
@@ -1,6 +1,6 @@
1
- import React, { InputHTMLAttributes, Ref, ReactNode } from "react";
1
+ import React, { type InputHTMLAttributes, type Ref, type ReactNode, type LegacyRef } from "react";
2
2
  export type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {
3
- ref?: Ref<HTMLInputElement>;
3
+ ref?: Ref<HTMLInputElement> | LegacyRef<HTMLInputElement>;
4
4
  /** flag for error styling */
5
5
  hasError?: boolean;
6
6
  /** error message text */
@@ -12,12 +12,5 @@ export type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {
12
12
  *
13
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
14
  */
15
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<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
- }, "ref"> & React.RefAttributes<HTMLInputElement>>;
15
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckBoxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
23
16
  export default Checkbox;
@@ -1,16 +1,16 @@
1
- import { ThemeType } from "../../types";
1
+ import { type ThemeType } from "../../types";
2
2
  type StyledLabelProps = {
3
3
  checked: boolean;
4
4
  disabled: boolean;
5
- hasError: boolean;
5
+ $hasError: boolean;
6
6
  theme: ThemeType;
7
7
  };
8
8
  type ThemeProps = {
9
9
  theme: ThemeType;
10
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>;
11
+ export declare const CheckWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ThemeProps>> & string;
12
+ export declare const Check: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, ThemeProps>> & string;
13
+ export declare const StyledLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, StyledLabelProps>> & string;
14
+ export declare const SelectedBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
15
+ export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, ThemeProps>> & string;
16
16
  export {};
@@ -3,7 +3,7 @@ import { StoryObj } from "@storybook/react";
3
3
  import Collapse from ".";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: ({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: import(".").CollapseProps) => JSX.Element;
6
+ component: typeof Collapse;
7
7
  args: {
8
8
  id: string;
9
9
  headerTitleText: string;
@@ -1,5 +1,5 @@
1
- import { ReactNode, HTMLAttributes } from "react";
2
- import { FontSizeType } from "../../types";
1
+ import React, { type ReactNode, type HTMLAttributes } from "react";
2
+ import { type FontSizeType } from "../../types";
3
3
  export type CollapseProps = HTMLAttributes<HTMLElement> & {
4
4
  /** id is required for a11y reasons as we use aria attributes which depends on an id */
5
5
  id: string;
@@ -25,5 +25,5 @@ export type CollapseProps = HTMLAttributes<HTMLElement> & {
25
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
26
  *
27
27
  */
28
- declare const Collapse: ({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: CollapseProps) => JSX.Element;
28
+ export declare function Collapse({ id, headerTitleText, headerTitleTextColor, headerTitleTextSize, headerTitleTextFontFamily, headerComponent, startOpen, onOpenChange, children, }: CollapseProps): React.JSX.Element;
29
29
  export default Collapse;