@cruk/cruk-react-components 5.0.7 → 6.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 (359) hide show
  1. package/README.md +20 -7
  2. package/lib/.storybook/main.d.ts +3 -0
  3. package/lib/.storybook/preview.d.ts +3 -0
  4. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
  5. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  6. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +1 -1
  7. package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
  8. package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js +6 -1
  9. package/lib/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +1 -1
  10. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  11. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  12. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +1 -1
  13. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -1
  14. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -1
  15. package/lib/node_modules/focus-lock/dist/es2015/sibling.js +1 -1
  16. package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -1
  17. package/lib/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  18. package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  19. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  20. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js +1 -1
  21. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -1
  22. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
  23. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
  24. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
  25. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
  26. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
  27. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js +1 -1
  28. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
  29. package/lib/node_modules/react-focus-lock/dist/es2015/FocusGuard.js.map +1 -1
  30. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  31. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  32. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  33. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  34. package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -1
  35. package/lib/node_modules/tslib/tslib.es6.js +1 -1
  36. package/lib/node_modules/tslib/tslib.es6.js.map +1 -1
  37. package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  38. package/lib/{components → src/components}/AddressLookup/AddressLookup.stories.d.ts +4 -4
  39. package/lib/{components → src/components}/AddressLookup/index.d.ts +2 -2
  40. package/lib/src/components/AddressLookup/index.js +1 -1
  41. package/lib/src/components/AddressLookup/index.js.map +1 -1
  42. package/lib/src/components/AddressLookup/styles.js +38 -1
  43. package/lib/src/components/AddressLookup/styles.js.map +1 -1
  44. package/lib/{components → src/components}/Avatar/Avatar.stories.d.ts +1 -1
  45. package/lib/src/components/Avatar/index.js +1 -1
  46. package/lib/src/components/Avatar/index.js.map +1 -1
  47. package/lib/src/components/Avatar/styles.js +10 -1
  48. package/lib/src/components/Avatar/styles.js.map +1 -1
  49. package/lib/{components → src/components}/Badge/Badge.stories.d.ts +1 -1
  50. package/lib/src/components/Badge/index.js +1 -1
  51. package/lib/src/components/Badge/index.js.map +1 -1
  52. package/lib/src/components/Badge/styles.js +17 -1
  53. package/lib/src/components/Badge/styles.js.map +1 -1
  54. package/lib/{components → src/components}/Box/Box.stories.d.ts +2 -2
  55. package/lib/{components → src/components}/Box/index.d.ts +1 -1
  56. package/lib/src/components/Box/index.js +1 -1
  57. package/lib/src/components/Box/index.js.map +1 -1
  58. package/lib/src/components/Box/styles.js +13 -1
  59. package/lib/src/components/Box/styles.js.map +1 -1
  60. package/lib/{components → src/components}/Button/Button.stories.d.ts +2 -2
  61. package/lib/{components → src/components}/Button/index.d.ts +1 -1
  62. package/lib/src/components/Button/index.js +1 -1
  63. package/lib/src/components/Button/index.js.map +1 -1
  64. package/lib/src/components/Button/styles.js +108 -1
  65. package/lib/src/components/Button/styles.js.map +1 -1
  66. package/lib/{components → src/components}/Carousel/Carousel.stories.d.ts +2 -2
  67. package/lib/src/components/Carousel/Dots.js +1 -1
  68. package/lib/src/components/Carousel/Dots.js.map +1 -1
  69. package/lib/src/components/Carousel/index.js +1 -1
  70. package/lib/src/components/Carousel/index.js.map +1 -1
  71. package/lib/src/components/Carousel/styles.js +96 -1
  72. package/lib/src/components/Carousel/styles.js.map +1 -1
  73. package/lib/{components → src/components}/Checkbox/Checkbox.stories.d.ts +3 -3
  74. package/lib/{components → src/components}/Checkbox/index.d.ts +3 -3
  75. package/lib/src/components/Checkbox/index.js +1 -1
  76. package/lib/src/components/Checkbox/index.js.map +1 -1
  77. package/lib/src/components/Checkbox/styles.js +105 -1
  78. package/lib/src/components/Checkbox/styles.js.map +1 -1
  79. package/lib/{components → src/components}/Collapse/Collapse.stories.d.ts +1 -1
  80. package/lib/src/components/Collapse/index.js +1 -1
  81. package/lib/src/components/Collapse/index.js.map +1 -1
  82. package/lib/{components → src/components}/Collapse/styles.d.ts +11 -3
  83. package/lib/src/components/Collapse/styles.js +31 -1
  84. package/lib/src/components/Collapse/styles.js.map +1 -1
  85. package/lib/{components → src/components}/DateField/DateField.stories.d.ts +1 -1
  86. package/lib/src/components/DateField/index.js +1 -1
  87. package/lib/src/components/DateField/index.js.map +1 -1
  88. package/lib/{components → src/components}/DateField/styles.d.ts +12 -6
  89. package/lib/src/components/DateField/styles.js +26 -1
  90. package/lib/src/components/DateField/styles.js.map +1 -1
  91. package/lib/src/components/Divider.js +17 -1
  92. package/lib/src/components/Divider.js.map +1 -1
  93. package/lib/{components → src/components}/ErrorText/ErrorText.stories.d.ts +1 -1
  94. package/lib/src/components/ErrorText/index.js +1 -1
  95. package/lib/src/components/ErrorText/index.js.map +1 -1
  96. package/lib/src/components/ErrorText/styles.d.ts +16 -0
  97. package/lib/src/components/ErrorText/styles.js +5 -1
  98. package/lib/src/components/ErrorText/styles.js.map +1 -1
  99. package/lib/src/components/Flex.js +7 -1
  100. package/lib/src/components/Flex.js.map +1 -1
  101. package/lib/src/components/Fontface.js +1 -1
  102. package/lib/src/components/Fontface.js.map +1 -1
  103. package/lib/{components → src/components}/Footer/Footer.stories.d.ts +2 -2
  104. package/lib/src/components/Footer/index.js +1 -1
  105. package/lib/src/components/Footer/index.js.map +1 -1
  106. package/lib/{components → src/components}/Footer/styles.d.ts +3 -9
  107. package/lib/src/components/Footer/styles.js +69 -1
  108. package/lib/src/components/Footer/styles.js.map +1 -1
  109. package/lib/src/components/GlobalStyle.d.ts +2 -0
  110. package/lib/src/components/GlobalStyle.js +37 -1
  111. package/lib/src/components/GlobalStyle.js.map +1 -1
  112. package/lib/src/components/GlobalStyleNoFontFace.d.ts +2 -0
  113. package/lib/src/components/GlobalStyleNoFontFace.js +37 -1
  114. package/lib/src/components/GlobalStyleNoFontFace.js.map +1 -1
  115. package/lib/{components → src/components}/Header/Header.stories.d.ts +1 -1
  116. package/lib/src/components/Header/index.js +1 -1
  117. package/lib/src/components/Header/index.js.map +1 -1
  118. package/lib/src/components/Header/styles.js +109 -1
  119. package/lib/src/components/Header/styles.js.map +1 -1
  120. package/lib/{components → src/components}/Heading/Heading.stories.d.ts +1 -1
  121. package/lib/src/components/Heading/index.js +1 -1
  122. package/lib/src/components/Heading/index.js.map +1 -1
  123. package/lib/src/components/Heading/styles.js +75 -1
  124. package/lib/src/components/Heading/styles.js.map +1 -1
  125. package/lib/{components → src/components}/IconFa/IconFa.stories.d.ts +1 -1
  126. package/lib/src/components/IconFa/index.js +1 -1
  127. package/lib/src/components/IconFa/index.js.map +1 -1
  128. package/lib/src/components/IconFa/styles.js +10 -1
  129. package/lib/src/components/IconFa/styles.js.map +1 -1
  130. package/lib/{components → src/components}/InfoBox/InfoBox.stories.d.ts +2 -2
  131. package/lib/{components → src/components}/InfoBox/index.d.ts +1 -1
  132. package/lib/src/components/InfoBox/index.js +1 -1
  133. package/lib/src/components/InfoBox/index.js.map +1 -1
  134. package/lib/src/components/InfoBox/styles.d.ts +13 -0
  135. package/lib/src/components/InfoBox/styles.js +12 -1
  136. package/lib/src/components/InfoBox/styles.js.map +1 -1
  137. package/lib/src/components/LabelWrapper/index.js +1 -1
  138. package/lib/src/components/LabelWrapper/index.js.map +1 -1
  139. package/lib/src/components/LabelWrapper/styles.js +15 -1
  140. package/lib/src/components/LabelWrapper/styles.js.map +1 -1
  141. package/lib/{components → src/components}/LegendWrapper/LegendWrapper.stories.d.ts +1 -1
  142. package/lib/src/components/LegendWrapper/index.js +1 -1
  143. package/lib/src/components/LegendWrapper/index.js.map +1 -1
  144. package/lib/src/components/LegendWrapper/styles.js +34 -1
  145. package/lib/src/components/LegendWrapper/styles.js.map +1 -1
  146. package/lib/{components → src/components}/Link/Link.stories.d.ts +5 -2
  147. package/lib/{components → src/components}/Link/index.d.ts +4 -1
  148. package/lib/src/components/Link/index.js +1 -1
  149. package/lib/src/components/Link/index.js.map +1 -1
  150. package/lib/src/components/Link/styles.d.ts +20 -0
  151. package/lib/src/components/Link/styles.js +29 -1
  152. package/lib/src/components/Link/styles.js.map +1 -1
  153. package/lib/{components → src/components}/Loader/Loader.stories.d.ts +1 -1
  154. package/lib/src/components/Loader/index.js +1 -1
  155. package/lib/src/components/Loader/index.js.map +1 -1
  156. package/lib/src/components/Loader/styles.js +45 -1
  157. package/lib/src/components/Loader/styles.js.map +1 -1
  158. package/lib/{components → src/components}/Modal/Modal.stories.d.ts +1 -1
  159. package/lib/src/components/Modal/index.js +1 -1
  160. package/lib/src/components/Modal/index.js.map +1 -1
  161. package/lib/src/components/Modal/styles.d.ts +32 -0
  162. package/lib/src/components/Modal/styles.js +59 -1
  163. package/lib/src/components/Modal/styles.js.map +1 -1
  164. package/lib/{components → src/components}/Pagination/Pagination.stories.d.ts +1 -1
  165. package/lib/src/components/Pagination/index.js +1 -1
  166. package/lib/src/components/Pagination/index.js.map +1 -1
  167. package/lib/src/components/Pagination/styles.js +92 -1
  168. package/lib/src/components/Pagination/styles.js.map +1 -1
  169. package/lib/{components → src/components}/PopOver/Popover.stories.d.ts +1 -1
  170. package/lib/src/components/PopOver/index.js +1 -1
  171. package/lib/src/components/PopOver/index.js.map +1 -1
  172. package/lib/src/components/PopOver/styles.js +81 -1
  173. package/lib/src/components/PopOver/styles.js.map +1 -1
  174. package/lib/{components → src/components}/ProgressBar/ProgressBar.stories.d.ts +1 -1
  175. package/lib/src/components/ProgressBar/index.js +1 -1
  176. package/lib/src/components/ProgressBar/index.js.map +1 -1
  177. package/lib/src/components/ProgressBar/styles.js +132 -1
  178. package/lib/src/components/ProgressBar/styles.js.map +1 -1
  179. package/lib/{components → src/components}/Radio/Radio.stories.d.ts +3 -3
  180. package/lib/{components → src/components}/Radio/index.d.ts +3 -3
  181. package/lib/src/components/Radio/index.js +1 -1
  182. package/lib/src/components/Radio/index.js.map +1 -1
  183. package/lib/src/components/Radio/styles.js +125 -1
  184. package/lib/src/components/Radio/styles.js.map +1 -1
  185. package/lib/{components → src/components}/RadioConsent/Radio.stories.d.ts +1 -1
  186. package/lib/src/components/RadioConsent/index.js +1 -1
  187. package/lib/src/components/RadioConsent/index.js.map +1 -1
  188. package/lib/{components → src/components}/RadioConsent/styles.d.ts +6 -3
  189. package/lib/src/components/RadioConsent/styles.js +26 -1
  190. package/lib/src/components/RadioConsent/styles.js.map +1 -1
  191. package/lib/{components → src/components}/Select/Selelct.stories.d.ts +3 -3
  192. package/lib/{components → src/components}/Select/index.d.ts +3 -3
  193. package/lib/src/components/Select/index.js +1 -1
  194. package/lib/src/components/Select/index.js.map +1 -1
  195. package/lib/src/components/Select/styles.js +41 -1
  196. package/lib/src/components/Select/styles.js.map +1 -1
  197. package/lib/src/components/Spacing/index.js +1 -1
  198. package/lib/src/components/Spacing/index.js.map +1 -1
  199. package/lib/{components → src/components}/Step/Step.stories.d.ts +1 -1
  200. package/lib/src/components/Step/index.js +1 -1
  201. package/lib/src/components/Step/index.js.map +1 -1
  202. package/lib/src/components/Step/styles.js +79 -1
  203. package/lib/src/components/Step/styles.js.map +1 -1
  204. package/lib/{components → src/components}/Text/Text.stories.d.ts +2 -2
  205. package/lib/{components → src/components}/Text/index.d.ts +1 -1
  206. package/lib/src/components/Text/index.js +1 -1
  207. package/lib/src/components/Text/index.js.map +1 -1
  208. package/lib/src/components/Text/styles.js +19 -1
  209. package/lib/src/components/Text/styles.js.map +1 -1
  210. package/lib/{components → src/components}/TextAreaField/TextAreaField.stories.d.ts +2 -2
  211. package/lib/{components → src/components}/TextAreaField/index.d.ts +1 -1
  212. package/lib/src/components/TextAreaField/index.js +1 -1
  213. package/lib/src/components/TextAreaField/index.js.map +1 -1
  214. package/lib/src/components/TextAreaField/styles.js +29 -1
  215. package/lib/src/components/TextAreaField/styles.js.map +1 -1
  216. package/lib/{components → src/components}/TextField/TextField.stories.d.ts +2 -2
  217. package/lib/{components → src/components}/TextField/index.d.ts +1 -1
  218. package/lib/src/components/TextField/index.js +1 -1
  219. package/lib/src/components/TextField/index.js.map +1 -1
  220. package/lib/{components → src/components}/TextField/styles.d.ts +2 -6
  221. package/lib/src/components/TextField/styles.js +110 -1
  222. package/lib/src/components/TextField/styles.js.map +1 -1
  223. package/lib/src/components/ThemeCheatSheet.d.ts +7 -0
  224. package/lib/{components → src/components}/Totaliser/Totaliser.stories.d.ts +1 -1
  225. package/lib/src/components/Totaliser/index.js +1 -1
  226. package/lib/src/components/Totaliser/index.js.map +1 -1
  227. package/lib/src/components/Totaliser/styles.js +59 -1
  228. package/lib/src/components/Totaliser/styles.js.map +1 -1
  229. package/lib/{components → src/components}/UserBlock/UserBlock.stories.d.ts +1 -1
  230. package/lib/src/components/UserBlock/index.js +1 -1
  231. package/lib/src/components/UserBlock/index.js.map +1 -1
  232. package/lib/src/components/UserBlock/styles.js +21 -1
  233. package/lib/src/components/UserBlock/styles.js.map +1 -1
  234. package/lib/{hooks → src/hooks}/useEffectBrowser.d.ts +1 -1
  235. package/lib/src/hooks/useEffectBrowser.js +1 -1
  236. package/lib/src/hooks/useEffectBrowser.js.map +1 -1
  237. package/lib/src/hooks/useKey.js +1 -1
  238. package/lib/src/hooks/useKey.js.map +1 -1
  239. package/lib/{hooks → src/hooks}/useLayoutEffectBrowser.d.ts +1 -1
  240. package/lib/src/hooks/useLayoutEffectBrowser.js +1 -1
  241. package/lib/src/hooks/useLayoutEffectBrowser.js.map +1 -1
  242. package/lib/{hooks → src/hooks}/useScrollPosition.d.ts +2 -2
  243. package/lib/src/hooks/useScrollPosition.js +1 -1
  244. package/lib/src/hooks/useScrollPosition.js.map +1 -1
  245. package/lib/src/themes/bowelbabe.js +1 -1
  246. package/lib/src/themes/bowelbabe.js.map +1 -1
  247. package/lib/src/themes/cruk.js +1 -1
  248. package/lib/src/themes/cruk.js.map +1 -1
  249. package/lib/src/themes/rfl.js +1 -1
  250. package/lib/src/themes/rfl.js.map +1 -1
  251. package/lib/src/themes/su2c.js +1 -1
  252. package/lib/src/themes/su2c.js.map +1 -1
  253. package/lib/{types.d.ts → src/types.d.ts} +1 -3
  254. package/lib/src/utils/Helper.js +1 -1
  255. package/lib/src/utils/Helper.js.map +1 -1
  256. package/lib/src/utils/debounce.d.ts +2 -0
  257. package/lib/src/utils/debounce.js +1 -1
  258. package/lib/src/utils/debounce.js.map +1 -1
  259. package/lib/src/utils/themeUtils.js +1 -1
  260. package/lib/src/utils/themeUtils.js.map +1 -1
  261. package/package.json +37 -44
  262. package/lib/components/ErrorText/styles.d.ts +0 -8
  263. package/lib/components/GlobalStyle.d.ts +0 -2
  264. package/lib/components/GlobalStyleNoFontFace.d.ts +0 -2
  265. package/lib/components/InfoBox/styles.d.ts +0 -10
  266. package/lib/components/Link/styles.d.ts +0 -12
  267. package/lib/components/Modal/styles.d.ts +0 -21
  268. package/lib/components/ThemeCheatSheet.d.ts +0 -7
  269. package/lib/utils/debounce.d.ts +0 -2
  270. /package/lib/{components → src/components}/AddressLookup/AddressLookUp.test.cypress.d.ts +0 -0
  271. /package/lib/{components → src/components}/AddressLookup/styles.d.ts +0 -0
  272. /package/lib/{components → src/components}/AllThemesWrapper.d.ts +0 -0
  273. /package/lib/{components → src/components}/Avatar/Avatar.test.cypress.d.ts +0 -0
  274. /package/lib/{components → src/components}/Avatar/index.d.ts +0 -0
  275. /package/lib/{components → src/components}/Avatar/styles.d.ts +0 -0
  276. /package/lib/{components → src/components}/Badge/Badge.test.cypress.d.ts +0 -0
  277. /package/lib/{components → src/components}/Badge/index.d.ts +0 -0
  278. /package/lib/{components → src/components}/Badge/styles.d.ts +0 -0
  279. /package/lib/{components → src/components}/Box/Box.test.cypress.d.ts +0 -0
  280. /package/lib/{components → src/components}/Box/styles.d.ts +0 -0
  281. /package/lib/{components → src/components}/Button/Button.test.cypress.d.ts +0 -0
  282. /package/lib/{components → src/components}/Button/styles.d.ts +0 -0
  283. /package/lib/{components → src/components}/Carousel/Carousel.test.cypress.d.ts +0 -0
  284. /package/lib/{components → src/components}/Carousel/Dots.d.ts +0 -0
  285. /package/lib/{components → src/components}/Carousel/index.d.ts +0 -0
  286. /package/lib/{components → src/components}/Carousel/styles.d.ts +0 -0
  287. /package/lib/{components → src/components}/Checkbox/CheckBox.test.cypress.d.ts +0 -0
  288. /package/lib/{components → src/components}/Checkbox/styles.d.ts +0 -0
  289. /package/lib/{components → src/components}/Collapse/Collapse.test.cypress.d.ts +0 -0
  290. /package/lib/{components → src/components}/Collapse/index.d.ts +0 -0
  291. /package/lib/{components → src/components}/DateField/DateField.test.cypress.d.ts +0 -0
  292. /package/lib/{components → src/components}/DateField/index.d.ts +0 -0
  293. /package/lib/{components → src/components}/Divider.d.ts +0 -0
  294. /package/lib/{components → src/components}/ErrorText/ErrorText.test.cypress.d.ts +0 -0
  295. /package/lib/{components → src/components}/ErrorText/index.d.ts +0 -0
  296. /package/lib/{components → src/components}/Flex.d.ts +0 -0
  297. /package/lib/{components → src/components}/Fontface.d.ts +0 -0
  298. /package/lib/{components → src/components}/Footer/Footer.test.cypress.d.ts +0 -0
  299. /package/lib/{components → src/components}/Footer/index.d.ts +0 -0
  300. /package/lib/{components → src/components}/Header/Header.test.cypress.d.ts +0 -0
  301. /package/lib/{components → src/components}/Header/index.d.ts +0 -0
  302. /package/lib/{components → src/components}/Header/styles.d.ts +0 -0
  303. /package/lib/{components → src/components}/Heading/Heading.test.cypress.d.ts +0 -0
  304. /package/lib/{components → src/components}/Heading/index.d.ts +0 -0
  305. /package/lib/{components → src/components}/Heading/styles.d.ts +0 -0
  306. /package/lib/{components → src/components}/IconFa/IconFa.test.cypress.d.ts +0 -0
  307. /package/lib/{components → src/components}/IconFa/index.d.ts +0 -0
  308. /package/lib/{components → src/components}/IconFa/styles.d.ts +0 -0
  309. /package/lib/{components → src/components}/InfoBox/InfoBox.test.cypress.d.ts +0 -0
  310. /package/lib/{components → src/components}/LabelWrapper/index.d.ts +0 -0
  311. /package/lib/{components → src/components}/LabelWrapper/styles.d.ts +0 -0
  312. /package/lib/{components → src/components}/LegendWrapper/LegendWrapper.test.cypress.d.ts +0 -0
  313. /package/lib/{components → src/components}/LegendWrapper/index.d.ts +0 -0
  314. /package/lib/{components → src/components}/LegendWrapper/styles.d.ts +0 -0
  315. /package/lib/{components → src/components}/Link/Link.test.cypress.d.ts +0 -0
  316. /package/lib/{components → src/components}/Loader/Loader.test.cypress.d.ts +0 -0
  317. /package/lib/{components → src/components}/Loader/index.d.ts +0 -0
  318. /package/lib/{components → src/components}/Loader/styles.d.ts +0 -0
  319. /package/lib/{components → src/components}/Modal/Modal.test.cypress.d.ts +0 -0
  320. /package/lib/{components → src/components}/Modal/index.d.ts +0 -0
  321. /package/lib/{components → src/components}/Pagination/Pagination.test.cypress.d.ts +0 -0
  322. /package/lib/{components → src/components}/Pagination/index.d.ts +0 -0
  323. /package/lib/{components → src/components}/Pagination/styles.d.ts +0 -0
  324. /package/lib/{components → src/components}/PopOver/PopOver.test.cypress.d.ts +0 -0
  325. /package/lib/{components → src/components}/PopOver/index.d.ts +0 -0
  326. /package/lib/{components → src/components}/PopOver/styles.d.ts +0 -0
  327. /package/lib/{components → src/components}/ProgressBar/ProgressBar.test.cypress.d.ts +0 -0
  328. /package/lib/{components → src/components}/ProgressBar/index.d.ts +0 -0
  329. /package/lib/{components → src/components}/ProgressBar/styles.d.ts +0 -0
  330. /package/lib/{components → src/components}/Radio/Radio.test.cypress.d.ts +0 -0
  331. /package/lib/{components → src/components}/Radio/styles.d.ts +0 -0
  332. /package/lib/{components → src/components}/RadioConsent/RadioConsent.test.cypress.d.ts +0 -0
  333. /package/lib/{components → src/components}/RadioConsent/index.d.ts +0 -0
  334. /package/lib/{components → src/components}/Select/Select.test.cypress.d.ts +0 -0
  335. /package/lib/{components → src/components}/Select/styles.d.ts +0 -0
  336. /package/lib/{components → src/components}/Spacing/index.d.ts +0 -0
  337. /package/lib/{components → src/components}/Step/Step.test.cypress.d.ts +0 -0
  338. /package/lib/{components → src/components}/Step/index.d.ts +0 -0
  339. /package/lib/{components → src/components}/Step/styles.d.ts +0 -0
  340. /package/lib/{components → src/components}/Text/Text.test.cypress.d.ts +0 -0
  341. /package/lib/{components → src/components}/Text/styles.d.ts +0 -0
  342. /package/lib/{components → src/components}/TextAreaField/TextAreaField.test.cypress.d.ts +0 -0
  343. /package/lib/{components → src/components}/TextAreaField/styles.d.ts +0 -0
  344. /package/lib/{components → src/components}/TextField/TextField.test.cypress.d.ts +0 -0
  345. /package/lib/{components → src/components}/Totaliser/Totaliser.test.cypress.d.ts +0 -0
  346. /package/lib/{components → src/components}/Totaliser/index.d.ts +0 -0
  347. /package/lib/{components → src/components}/Totaliser/styles.d.ts +0 -0
  348. /package/lib/{components → src/components}/UserBlock/UserBlock.test.cypress.d.ts +0 -0
  349. /package/lib/{components → src/components}/UserBlock/index.d.ts +0 -0
  350. /package/lib/{components → src/components}/UserBlock/styles.d.ts +0 -0
  351. /package/lib/{components → src/components}/index.d.ts +0 -0
  352. /package/lib/{hooks → src/hooks}/useKey.d.ts +0 -0
  353. /package/lib/{themes → src/themes}/bowelbabe.d.ts +0 -0
  354. /package/lib/{themes → src/themes}/cruk.d.ts +0 -0
  355. /package/lib/{themes → src/themes}/rfl.d.ts +0 -0
  356. /package/lib/{themes → src/themes}/su2c.d.ts +0 -0
  357. /package/lib/{utils → src/utils}/Helper.d.ts +0 -0
  358. /package/lib/{utils → src/utils}/__tests__/testHelpers.test.d.ts +0 -0
  359. /package/lib/{utils → src/utils}/themeUtils.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/DateField/index.tsx"],"sourcesContent":["import React, { type InputHTMLAttributes } from \"react\";\n\nimport { useTheme } from \"styled-components\";\nimport { ErrorText } from \"../ErrorText\";\nimport { Text } from \"../Text\";\nimport { TextField } from \"../TextField\";\n\nimport {\n Fieldset,\n DateTextFieldWrapper,\n LargeDateTextFieldWrapper,\n ErrorTextWrapper,\n} from \"./styles\";\nimport { type ThemeType } from \"../../types\";\n\nexport type DateFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n /** label text */\n label: string;\n /** hind text */\n hintText?: string;\n /** day field text value */\n day: string;\n /** month field text value */\n month: string;\n /** year field text value */\n year: string;\n /** name passed to day field input element */\n dayName?: string;\n /** name passed to month field input element */\n monthName?: string;\n /** name passed to year field input element */\n yearName?: string;\n /** flag of error styling on day field */\n dayHasError?: boolean;\n /** flag of error styling on month field */\n monthHasError?: boolean;\n /** flag of error styling on year field */\n yearHasError?: boolean;\n /** error message text */\n errorMessage?: string;\n};\n\n/**\n * To be used in forms entering dates like date of birth which are known dates and would take too long to get to with a date picker\n * */\nexport function DateField({\n label,\n hintText,\n day,\n month,\n year,\n dayName = \"day\",\n monthName = \"month\",\n yearName = \"year\",\n dayHasError,\n monthHasError,\n yearHasError,\n errorMessage,\n onChange = () => {\n // no op\n },\n onBlur = () => {\n // no op\n },\n onFocus = () => {\n // no op\n },\n disabled,\n required,\n}: DateFieldProps) {\n const theme = useTheme();\n const typedTheme = theme as ThemeType;\n return (\n <Fieldset>\n <Text\n as=\"legend\"\n textWeight={typedTheme.typography.fontWeightLabels || 700}\n marginBottom=\"xxs\"\n textFontFamily={typedTheme.typography.fontFamilyLabel}\n >\n {label}\n {!!required && (\n <span\n style={{\n fontWeight: typedTheme.typography.fontWeightBase,\n }}\n >\n {` (required)`}\n </span>\n )}\n </Text>\n {hintText && <Text>{hintText}</Text>}\n <DateTextFieldWrapper>\n <TextField\n label=\"Day\"\n type=\"text\"\n name={dayName}\n required={!!required}\n hideRequiredInLabel\n maxLength={2}\n autoComplete=\"bday-day\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={day}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={dayHasError}\n disabled={disabled}\n />\n </DateTextFieldWrapper>\n <DateTextFieldWrapper>\n <TextField\n label=\"Month\"\n type=\"text\"\n name={monthName}\n required={!!required}\n hideRequiredInLabel\n maxLength={2}\n autoComplete=\"bday-month\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={month}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={monthHasError}\n disabled={disabled}\n />\n </DateTextFieldWrapper>\n <LargeDateTextFieldWrapper>\n <TextField\n label=\"Year\"\n type=\"text\"\n name={yearName}\n required={!!required}\n hideRequiredInLabel\n maxLength={4}\n autoComplete=\"bday-year\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={year}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={yearHasError}\n disabled={disabled}\n />\n </LargeDateTextFieldWrapper>\n {errorMessage && (\n <ErrorTextWrapper>\n <ErrorText marginTop=\"xxs\">{errorMessage}</ErrorText>\n </ErrorTextWrapper>\n )}\n </Fieldset>\n );\n}\n\nexport default DateField;\n"],"names":["DateField","_a","label","hintText","day","month","year","_b","dayName","_c","monthName","_d","yearName","dayHasError","monthHasError","yearHasError","errorMessage","_e","onChange","_f","onBlur","_g","onFocus","disabled","required","typedTheme","useTheme","React","Fieldset","createElement","Text","as","textWeight","typography","fontWeightLabels","marginBottom","textFontFamily","fontFamilyLabel","style","fontWeight","fontWeightBase","DateTextFieldWrapper","TextField","type","name","hideRequiredInLabel","maxLength","autoComplete","pattern","inputMode","value","hasError","LargeDateTextFieldWrapper","ErrorTextWrapper","ErrorText","marginTop"],"mappings":"oUA6CM,SAAUA,EAAUC,OACxBC,EAAKD,EAAAC,MACLC,EAAQF,EAAAE,SACRC,EAAGH,EAAAG,IACHC,EAAKJ,EAAAI,MACLC,EAAIL,EAAAK,KACJC,EAAeN,EAAAO,QAAfA,OAAO,IAAAD,EAAG,MAAKA,EACfE,EAAmBR,EAAAS,UAAnBA,OAAS,IAAAD,EAAG,QAAOA,EACnBE,aAAAC,aAAW,OAAMD,EACjBE,EAAWZ,EAAAY,YACXC,EAAab,EAAAa,cACbC,EAAYd,EAAAc,aACZC,iBACAC,EAAAhB,EAAAiB,SAAAA,OAAW,IAAAD,EAAA,WAEX,EAACA,EACDE,EAEClB,EAAAmB,OAFDA,OAAS,IAAAD,EAAA,WAET,EAACA,EACDE,EAECpB,EAAAqB,QAFDA,OAAU,IAAAD,EAAA,WAEV,IACAE,EAAQtB,EAAAsB,SACRC,EAAQvB,EAAAuB,SAGFC,EADQC,IAEd,OACEC,gBAACC,EAAQ,KACPD,EAACE,cAAAC,EACC,CAAAC,GAAG,SACHC,WAAYP,EAAWQ,WAAWC,kBAAoB,IACtDC,aAAa,MACbC,eAAgBX,EAAWQ,WAAWI,iBAErCnC,IACEsB,GACDG,EAAAE,cAAA,OAAA,CACES,MAAO,CACLC,WAAYd,EAAWQ,WAAWO,iBAGnC,gBAINrC,GAAYwB,EAAAE,cAACC,EAAI,KAAE3B,GACpBwB,EAAAE,cAACY,EAAoB,KACnBd,EAAAE,cAACa,EAAS,CACRxC,MAAM,MACNyC,KAAK,OACLC,KAAMpC,EACNgB,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,WACbC,QAAQ,SACRC,UAAU,UACVC,MAAO9C,EACPc,SAAUA,EACVE,OAAQA,EACRE,QAASA,EACT6B,SAAUtC,EACVU,SAAUA,KAGdI,EAAAE,cAACY,EAAoB,KACnBd,EAAAE,cAACa,EAAS,CACRxC,MAAM,QACNyC,KAAK,OACLC,KAAMlC,EACNc,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,aACbC,QAAQ,SACRC,UAAU,UACVC,MAAO7C,EACPa,SAAUA,EACVE,OAAQA,EACRE,QAASA,EACT6B,SAAUrC,EACVS,SAAUA,KAGdI,EAAAE,cAACuB,EAAyB,KACxBzB,EAAAE,cAACa,EAAS,CACRxC,MAAM,OACNyC,KAAK,OACLC,KAAMhC,EACNY,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,YACbC,QAAQ,SACRC,UAAU,UACVC,MAAO5C,EACPY,SAAUA,EACVE,OAAQA,EACRE,QAASA,EACT6B,SAAUpC,EACVQ,SAAUA,KAGbP,GACCW,EAAAE,cAACwB,EAAgB,KACf1B,EAAAE,cAACyB,EAAS,CAACC,UAAU,OAAOvC,IAKtC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/DateField/index.tsx"],"sourcesContent":["import React, { type InputHTMLAttributes } from \"react\";\n\nimport { useTheme } from \"styled-components\";\nimport { ErrorText } from \"../ErrorText\";\nimport { Text } from \"../Text\";\nimport { TextField } from \"../TextField\";\n\nimport {\n Fieldset,\n DateTextFieldWrapper,\n LargeDateTextFieldWrapper,\n ErrorTextWrapper,\n} from \"./styles\";\nimport { type ThemeType } from \"../../types\";\n\nexport type DateFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n /** label text */\n label: string;\n /** hind text */\n hintText?: string;\n /** day field text value */\n day: string;\n /** month field text value */\n month: string;\n /** year field text value */\n year: string;\n /** name passed to day field input element */\n dayName?: string;\n /** name passed to month field input element */\n monthName?: string;\n /** name passed to year field input element */\n yearName?: string;\n /** flag of error styling on day field */\n dayHasError?: boolean;\n /** flag of error styling on month field */\n monthHasError?: boolean;\n /** flag of error styling on year field */\n yearHasError?: boolean;\n /** error message text */\n errorMessage?: string;\n};\n\n/**\n * To be used in forms entering dates like date of birth which are known dates and would take too long to get to with a date picker\n * */\nexport function DateField({\n label,\n hintText,\n day,\n month,\n year,\n dayName = \"day\",\n monthName = \"month\",\n yearName = \"year\",\n dayHasError,\n monthHasError,\n yearHasError,\n errorMessage,\n onChange = () => {\n // no op\n },\n onBlur = () => {\n // no op\n },\n onFocus = () => {\n // no op\n },\n disabled,\n required,\n}: DateFieldProps) {\n const theme = useTheme();\n const typedTheme = theme as ThemeType;\n return (\n <Fieldset>\n <Text\n as=\"legend\"\n textWeight={typedTheme.typography.fontWeightLabels || 700}\n marginBottom=\"xxs\"\n textFontFamily={typedTheme.typography.fontFamilyLabel}\n >\n {label}\n {!!required && (\n <span\n style={{\n fontWeight: typedTheme.typography.fontWeightBase,\n }}\n >\n {` (required)`}\n </span>\n )}\n </Text>\n {hintText && <Text>{hintText}</Text>}\n <DateTextFieldWrapper>\n <TextField\n label=\"Day\"\n type=\"text\"\n name={dayName}\n required={!!required}\n hideRequiredInLabel\n maxLength={2}\n autoComplete=\"bday-day\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={day}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={dayHasError}\n disabled={disabled}\n />\n </DateTextFieldWrapper>\n <DateTextFieldWrapper>\n <TextField\n label=\"Month\"\n type=\"text\"\n name={monthName}\n required={!!required}\n hideRequiredInLabel\n maxLength={2}\n autoComplete=\"bday-month\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={month}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={monthHasError}\n disabled={disabled}\n />\n </DateTextFieldWrapper>\n <LargeDateTextFieldWrapper>\n <TextField\n label=\"Year\"\n type=\"text\"\n name={yearName}\n required={!!required}\n hideRequiredInLabel\n maxLength={4}\n autoComplete=\"bday-year\"\n pattern=\"[0-9]*\"\n inputMode=\"numeric\"\n value={year}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n hasError={yearHasError}\n disabled={disabled}\n />\n </LargeDateTextFieldWrapper>\n {errorMessage && (\n <ErrorTextWrapper>\n <ErrorText marginTop=\"xxs\">{errorMessage}</ErrorText>\n </ErrorTextWrapper>\n )}\n </Fieldset>\n );\n}\n\nexport default DateField;\n"],"names":["DateField","label","hintText","day","month","year","dayName","monthName","yearName","dayHasError","monthHasError","yearHasError","errorMessage","onChange","onBlur","onFocus","disabled","required","typedTheme","useTheme","React","Fieldset","createElement","Text","as","textWeight","typography","fontWeightLabels","marginBottom","textFontFamily","fontFamilyLabel","style","fontWeight","fontWeightBase","DateTextFieldWrapper","TextField","type","name","hideRequiredInLabel","maxLength","autoComplete","pattern","inputMode","value","hasError","LargeDateTextFieldWrapper","ErrorTextWrapper","ErrorText","marginTop"],"mappings":"6UA6CgBA,GAAUC,MACxBA,EAAKC,SACLA,EAAQC,IACRA,EAAGC,MACHA,EAAKC,KACLA,EAAIC,QACJA,EAAU,MAAKC,UACfA,EAAY,QAAOC,SACnBA,EAAW,OAAMC,YACjBA,EAAWC,cACXA,EAAaC,aACbA,EAAYC,aACZA,EAAYC,SACZA,EAAW,OAEVC,OACDA,EAAS,OAERC,QACDA,EAAU,OAETC,SACDA,EAAQC,SACRA,IAEA,MACMC,EADQC,IAEd,OACEC,gBAACC,EAAQ,KACPD,EAACE,cAAAC,EACC,CAAAC,GAAG,SACHC,WAAYP,EAAWQ,WAAWC,kBAAoB,IACtDC,aAAa,MACbC,eAAgBX,EAAWQ,WAAWI,iBAErC7B,IACEgB,GACDG,EAAAE,cAAA,OAAA,CACES,MAAO,CACLC,WAAYd,EAAWQ,WAAWO,iBAGnC,gBAIN/B,GAAYkB,EAAAE,cAACC,EAAI,KAAErB,GACpBkB,EAAAE,cAACY,EAAoB,KACnBd,EAAAE,cAACa,EAAS,CACRlC,MAAM,MACNmC,KAAK,OACLC,KAAM/B,EACNW,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,WACbC,QAAQ,SACRC,UAAU,UACVC,MAAOxC,EACPU,SAAUA,EACVC,OAAQA,EACRC,QAASA,EACT6B,SAAUnC,EACVO,SAAUA,KAGdI,EAAAE,cAACY,EAAoB,KACnBd,EAAAE,cAACa,EAAS,CACRlC,MAAM,QACNmC,KAAK,OACLC,KAAM9B,EACNU,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,aACbC,QAAQ,SACRC,UAAU,UACVC,MAAOvC,EACPS,SAAUA,EACVC,OAAQA,EACRC,QAASA,EACT6B,SAAUlC,EACVM,SAAUA,KAGdI,EAAAE,cAACuB,EAAyB,KACxBzB,EAAAE,cAACa,EAAS,CACRlC,MAAM,OACNmC,KAAK,OACLC,KAAM7B,EACNS,WAAYA,EACZqB,qBAAmB,EACnBC,UAAW,EACXC,aAAa,YACbC,QAAQ,SACRC,UAAU,UACVC,MAAOtC,EACPQ,SAAUA,EACVC,OAAQA,EACRC,QAASA,EACT6B,SAAUjC,EACVK,SAAUA,KAGbJ,GACCQ,EAAAE,cAACwB,EAAgB,KACf1B,EAAAE,cAACyB,EAAS,CAACC,UAAU,OAAOpC,IAKtC"}
@@ -1,16 +1,22 @@
1
1
  import { type ThemeType } from "../../types";
2
2
  export declare const Fieldset: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
3
- export declare const TextAsLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<Omit<import("../Text").TextProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
4
- ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
3
+ export declare const TextAsLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
4
+ textColor?: string;
5
+ textAlign?: "left" | "right" | "center" | "justify";
6
+ textSize?: import("../../types").FontSizeType;
7
+ textWeight?: number | string;
8
+ textFontFamily?: string;
9
+ as?: import("react").ElementType;
10
+ wordBreak?: import("../../types").WordBreakType;
11
+ overflowWrap?: import("../../types").OverflowWrapType;
12
+ ref?: import("react").Ref<HTMLElement>;
5
13
  }, {
6
14
  theme: ThemeType;
7
- }>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("../Text").TextProps, "ref"> & import("react").RefAttributes<HTMLElement>>, keyof import("react").Component<any, {}, any>>;
15
+ }>> & string & Omit<(props: import("../Text").TextProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
8
16
  export declare const DateTextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
9
17
  theme: ThemeType;
10
18
  }>> & string;
11
- export declare const LargeDateTextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & {
19
+ export declare const LargeDateTextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & {
12
20
  theme: ThemeType;
13
- }, "ref"> & {
14
- ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
15
21
  }, never>> & string;
16
22
  export declare const ErrorTextWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,2 +1,27 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import i from"styled-components";import{Text as o}from"../Text/index.js";var r=i.fieldset(e||(e=n(["\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n"],["\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n"])));i(o)(t||(t=n(["\n font-family: ",";\n"],["\n font-family: ",";\n"])),(function(n){return n.theme.typography.fontFamilyLabel}));var e,t,a,s,b,m=i.div(a||(a=n(["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ",";\n }\n"],["\n display: inline-block;\n width: 60px;\n margin-right: ",";\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ",";\n }\n"])),(function(n){return n.theme.spacing.xs}),(function(n){return n.theme.typography.fontWeightBase})),d=i(m)(s||(s=n(["\n width: 80px;\n"],["\n width: 80px;\n"]))),g=i.div(b||(b=n(["\n clear: left;\n"],["\n clear: left;\n"])));export{m as DateTextFieldWrapper,g as ErrorTextWrapper,r as Fieldset,d as LargeDateTextFieldWrapper};
1
+ import i from"styled-components";import{Text as e}from"../Text/index.js";const o=i.fieldset`
2
+ margin: 0;
3
+ padding: 0;
4
+ border: 0;
5
+ *,
6
+ *:after,
7
+ *:before {
8
+ -webkit-box-sizing: border-box;
9
+ -moz-box-sizing: border-box;
10
+ box-sizing: border-box;
11
+ }
12
+ `;i(e)`
13
+ font-family: ${({theme:i})=>i.typography.fontFamilyLabel};
14
+ `;const t=i.div`
15
+ display: inline-block;
16
+ width: 60px;
17
+ margin-right: ${({theme:i})=>i.spacing.xs};
18
+ span {
19
+ margin-bottom: 0.25rem; // this is smaller than xxs spacing
20
+ font-weight: ${({theme:i})=>i.typography.fontWeightBase};
21
+ }
22
+ `,r=i(t)`
23
+ width: 80px;
24
+ `,n=i.div`
25
+ clear: left;
26
+ `;export{t as DateTextFieldWrapper,n as ErrorTextWrapper,o as Fieldset,r as LargeDateTextFieldWrapper};
2
27
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/DateField/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\nimport Text from \"../Text\";\n\nexport const Fieldset = styled.fieldset`\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n`;\n\nexport const TextAsLabel = styled(Text)<{ theme: ThemeType }>`\n font-family: ${({ theme }) => theme.typography.fontFamilyLabel};\n`;\n\nexport const DateTextFieldWrapper = styled.div<{ theme: ThemeType }>`\n display: inline-block;\n width: 60px;\n margin-right: ${({ theme }) => theme.spacing.xs};\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ${({ theme }) => theme.typography.fontWeightBase};\n }\n`;\n\nexport const LargeDateTextFieldWrapper = styled(DateTextFieldWrapper)`\n width: 80px;\n`;\n\nexport const ErrorTextWrapper = styled.div`\n clear: left;\n`;\n"],"names":["Fieldset","styled","fieldset","templateObject_1","__makeTemplateObject","Text","templateObject_2","_a","theme","typography","fontFamilyLabel","DateTextFieldWrapper","div","templateObject_3","spacing","xs","fontWeightBase","LargeDateTextFieldWrapper","templateObject_4","ErrorTextWrapper","templateObject_5"],"mappings":"yJAIa,IAAAA,EAAWC,EAAOC,SAAQC,IAAAA,EAAAC,EAAA,CAAA,0LAAA,CAAA,6LAaZH,EAAOI,EAAPJ,CAAYK,IAAAA,EAAAF,EAAA,CAAA,oBAAA,OAAA,CAAsB,oBACG,UAA/C,SAACG,GAAc,OAAPA,EAAAC,MAAaC,WAAWC,eAAjB,IAGzB,cAAMC,EAAuBV,EAAOW,IAAyBC,IAAAA,EAAAT,EAAA,CAAA,+DAAA,kGAAA,YAAA,CAAA,+DAGnB,kGAGgB,eAH/C,SAACG,GAAc,OAAPA,EAAAC,MAAaM,QAAQC,EAAd,IAGd,SAACR,GAAc,OAAPA,EAAAC,MAAaC,WAAWO,cAAjB,IAIrBC,EAA4BhB,EAAOU,EAAPV,CAA4BiB,IAAAA,EAAAd,EAAA,CAAA,sBAAA,CAAA,yBAIxDe,EAAmBlB,EAAOW,IAAGQ,IAAAA,EAAAhB,EAAA,CAAA,sBAAA,CAAA"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/DateField/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\nimport Text from \"../Text\";\n\nexport const Fieldset = styled.fieldset`\n margin: 0;\n padding: 0;\n border: 0;\n *,\n *:after,\n *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n`;\n\nexport const TextAsLabel = styled(Text)<{ theme: ThemeType }>`\n font-family: ${({ theme }) => theme.typography.fontFamilyLabel};\n`;\n\nexport const DateTextFieldWrapper = styled.div<{ theme: ThemeType }>`\n display: inline-block;\n width: 60px;\n margin-right: ${({ theme }) => theme.spacing.xs};\n span {\n margin-bottom: 0.25rem; // this is smaller than xxs spacing\n font-weight: ${({ theme }) => theme.typography.fontWeightBase};\n }\n`;\n\nexport const LargeDateTextFieldWrapper = styled(DateTextFieldWrapper)`\n width: 80px;\n`;\n\nexport const ErrorTextWrapper = styled.div`\n clear: left;\n`;\n"],"names":["Fieldset","styled","fieldset","Text","theme","typography","fontFamilyLabel","DateTextFieldWrapper","div","spacing","xs","fontWeightBase","LargeDateTextFieldWrapper","ErrorTextWrapper"],"mappings":"yEAIa,MAAAA,EAAWC,EAAOC,QAAQ;;;;;;;;;;;EAaZD,EAAOE,EAA2B;iBAC5C,EAAGC,WAAYA,EAAMC,WAAWC;EAGpC,MAAAC,EAAuBN,EAAOO,GAAyB;;;kBAGlD,EAAGJ,WAAYA,EAAMK,QAAQC;;;mBAG5B,EAAGN,WAAYA,EAAMC,WAAWM;;EAItCC,EAA4BX,EAAOM,EAAqB;;EAIxDM,EAAmBZ,EAAOO,GAAG;;"}
@@ -1,2 +1,18 @@
1
- import{__makeTemplateObject as n}from"../../node_modules/tslib/tslib.es6.js";import e from"react";import t from"styled-components";var i,o=t.div(i||(i=n(['\n align-items: center;\n display: flex;\n flex-basis: 100%;\n padding-bottom: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n &:before,\n &:after {\n background-color: #333;\n content: "";\n display: inline-block;\n flex-grow: 1;\n height: 1px;\n }\n'],['\n align-items: center;\n display: flex;\n flex-basis: 100%;\n padding-bottom: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n &:before,\n &:after {\n background-color: #333;\n content: "";\n display: inline-block;\n flex-grow: 1;\n height: 1px;\n }\n']))),l=function(n){var t=n.children;return e.createElement(o,null,t)};export{l as Divider,l as default};
1
+ import e from"react";import t from"styled-components";const o=t.div`
2
+ align-items: center;
3
+ display: flex;
4
+ flex-basis: 100%;
5
+ padding-bottom: 10px;
6
+ padding-top: 10px;
7
+ text-align: center;
8
+ width: 100%;
9
+ &:before,
10
+ &:after {
11
+ background-color: #333;
12
+ content: "";
13
+ display: inline-block;
14
+ flex-grow: 1;
15
+ height: 1px;
16
+ }
17
+ `,n=({children:t})=>e.createElement(o,null,t);export{n as Divider,n as default};
2
18
  //# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.js","sources":["../../../src/components/Divider.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nconst StyledDivider = styled.div`\n align-items: center;\n display: flex;\n flex-basis: 100%;\n padding-bottom: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n &:before,\n &:after {\n background-color: #333;\n content: \"\";\n display: inline-block;\n flex-grow: 1;\n height: 1px;\n }\n`;\n\nexport const Divider = ({ children }: { children?: ReactNode }) => (\n <StyledDivider>{children}</StyledDivider>\n);\n\nexport default Divider;\n"],"names":["StyledDivider","styled","div","templateObject_1","__makeTemplateObject","Divider","_a","children","React","createElement"],"mappings":"mIAGA,MAAMA,EAAgBC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,0SAAA,CAAA,6SAkBnBC,EAAU,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAAiC,OACjEC,EAACC,cAAAT,EAAe,KAAAO,EADiD"}
1
+ {"version":3,"file":"Divider.js","sources":["../../../src/components/Divider.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nconst StyledDivider = styled.div`\n align-items: center;\n display: flex;\n flex-basis: 100%;\n padding-bottom: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n &:before,\n &:after {\n background-color: #333;\n content: \"\";\n display: inline-block;\n flex-grow: 1;\n height: 1px;\n }\n`;\n\nexport const Divider = ({ children }: { children?: ReactNode }) => (\n <StyledDivider>{children}</StyledDivider>\n);\n\nexport default Divider;\n"],"names":["StyledDivider","styled","div","Divider","children","React","createElement"],"mappings":"sDAGA,MAAMA,EAAgBC,EAAOC,GAAG;;;;;;;;;;;;;;;;EAkBnBC,EAAU,EAAGC,cACxBC,EAACC,cAAAN,OAAeI"}
@@ -1,4 +1,4 @@
1
- import { StoryObj } from "@storybook/react";
1
+ import { type StoryObj } from "@storybook/react";
2
2
  import ErrorText from ".";
3
3
  declare const _default: {
4
4
  title: string;
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as o}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{useTheme as t}from"styled-components";import{faTriangleExclamation as s}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";import{crukTheme as m}from"../../themes/cruk.js";import{StyledErrorText as n}from"./styles.js";import{IconFa as i}from"../IconFa/index.js";import{Box as a}from"../Box/index.js";function l(l){var d=l.children,f=l.as,p=void 0===f?"span":f,c=e(l,["children","as"]),u=t(),x=o(o({},m),u),h="string"==typeof d&&d.length;return r.createElement(n,o({forwardedAs:p},c,{theme:x,role:"alert"}),h?r.createElement(a,{as:"span",marginRight:"xxs"},r.createElement(i,{faIcon:s,size:"1em"})):null,d)}export{l as ErrorText,l as default};
1
+ import e from"react";import{useTheme as o}from"styled-components";import{faTriangleExclamation as r}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";import{crukTheme as t}from"../../themes/cruk.js";import{StyledErrorText as s}from"./styles.js";import{IconFa as m}from"../IconFa/index.js";import{Box as n}from"../Box/index.js";function i({children:i,as:a="span",...f}){const l=o(),c={...t,...l},p="string"==typeof i&&i.length;return e.createElement(s,{forwardedAs:a,...f,theme:c,role:"alert"},p?e.createElement(n,{as:"span",marginRight:"xxs"},e.createElement(m,{faIcon:r,size:"1em"})):null,i)}export{i as ErrorText,i as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ErrorText/index.tsx"],"sourcesContent":["import React, { type HTMLAttributes } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport { faTriangleExclamation } from \"@fortawesome/free-solid-svg-icons\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { type SpacingProps } from \"../Spacing\";\nimport { StyledErrorText } from \"./styles\";\nimport { IconFa } from \"../IconFa\";\nimport { Box } from \"../Box\";\n\nexport type ErrorTextProps = SpacingProps &\n HTMLAttributes<HTMLElement> & {\n as?: React.ElementType;\n };\n\n/**\n *\n * To be used in forms for inline validation. Applies styling and accessibility attribute so that it will be read by screen readers.\n *\n * Please be aware that some input components already have this component built in and can be passed an \"errorMessage\" prop\n */\nexport function ErrorText({ children, as = \"span\", ...props }: ErrorTextProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const shouldShowIcon = typeof children === \"string\" && children.length;\n return (\n <StyledErrorText forwardedAs={as} {...props} theme={theme} role=\"alert\">\n {shouldShowIcon ? (\n <Box as=\"span\" marginRight=\"xxs\">\n <IconFa faIcon={faTriangleExclamation} size=\"1em\" />\n </Box>\n ) : null}\n {children}\n </StyledErrorText>\n );\n}\n\nexport default ErrorText;\n"],"names":["ErrorText","_a","children","_b","as","props","__rest","foundTheme","useTheme","theme","__assign","defaultTheme","shouldShowIcon","length","React","createElement","StyledErrorText","forwardedAs","role","Box","marginRight","IconFa","faIcon","faTriangleExclamation","size"],"mappings":"4aAqBM,SAAUA,EAAUC,GAAE,IAAAC,EAAQD,EAAAC,SAAEC,EAAAF,EAAAG,GAAAA,OAAK,IAAAD,EAAA,OAAMA,EAAKE,EAAKC,EAAAL,EAAjC,mBAClBM,EAAaC,IACbC,EACDC,EAAAA,EAAA,CAAA,EAAAC,GACAJ,GAGCK,EAAqC,iBAAbV,GAAyBA,EAASW,OAChE,OACEC,EAACC,cAAAC,EAAgBN,EAAA,CAAAO,YAAab,GAAQC,EAAK,CAAEI,MAAOA,EAAOS,KAAK,UAC7DN,EACCE,EAACC,cAAAI,EAAI,CAAAf,GAAG,OAAOgB,YAAY,OACzBN,EAAAC,cAACM,EAAM,CAACC,OAAQC,EAAuBC,KAAK,SAE5C,KACHtB,EAGP"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ErrorText/index.tsx"],"sourcesContent":["import React, { type HTMLAttributes } from \"react\";\nimport { useTheme } from \"styled-components\";\n\nimport { faTriangleExclamation } from \"@fortawesome/free-solid-svg-icons\";\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { type SpacingProps } from \"../Spacing\";\nimport { StyledErrorText } from \"./styles\";\nimport { IconFa } from \"../IconFa\";\nimport { Box } from \"../Box\";\n\nexport type ErrorTextProps = SpacingProps &\n HTMLAttributes<HTMLElement> & {\n as?: React.ElementType;\n };\n\n/**\n *\n * To be used in forms for inline validation. Applies styling and accessibility attribute so that it will be read by screen readers.\n *\n * Please be aware that some input components already have this component built in and can be passed an \"errorMessage\" prop\n */\nexport function ErrorText({ children, as = \"span\", ...props }: ErrorTextProps) {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const shouldShowIcon = typeof children === \"string\" && children.length;\n return (\n <StyledErrorText forwardedAs={as} {...props} theme={theme} role=\"alert\">\n {shouldShowIcon ? (\n <Box as=\"span\" marginRight=\"xxs\">\n <IconFa faIcon={faTriangleExclamation} size=\"1em\" />\n </Box>\n ) : null}\n {children}\n </StyledErrorText>\n );\n}\n\nexport default ErrorText;\n"],"names":["ErrorText","children","as","props","foundTheme","useTheme","theme","defaultTheme","shouldShowIcon","length","React","createElement","StyledErrorText","forwardedAs","role","Box","marginRight","IconFa","faIcon","faTriangleExclamation","size"],"mappings":"4VAqBgB,SAAAA,GAAUC,SAAEA,EAAQC,GAAEA,EAAK,UAAWC,IACpD,MAAMC,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAGCI,EAAqC,iBAAbP,GAAyBA,EAASQ,OAChE,OACEC,EAACC,cAAAC,EAAgB,CAAAC,YAAaX,KAAQC,EAAOG,MAAOA,EAAOQ,KAAK,SAC7DN,EACCE,EAACC,cAAAI,EAAI,CAAAb,GAAG,OAAOc,YAAY,OACzBN,EAAAC,cAACM,EAAM,CAACC,OAAQC,EAAuBC,KAAK,SAE5C,KACHnB,EAGP"}
@@ -0,0 +1,16 @@
1
+ import { type ThemeType } from "../../types";
2
+ type ThemeProps = {
3
+ theme: ThemeType;
4
+ };
5
+ export declare const StyledErrorText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Spacing").SpacingProps & import("react").HTMLAttributes<HTMLElement> & {
6
+ textColor?: string;
7
+ textAlign?: "left" | "right" | "center" | "justify";
8
+ textSize?: import("../../types").FontSizeType;
9
+ textWeight?: number | string;
10
+ textFontFamily?: string;
11
+ as?: import("react").ElementType;
12
+ wordBreak?: import("../../types").WordBreakType;
13
+ overflowWrap?: import("../../types").OverflowWrapType;
14
+ ref?: import("react").Ref<HTMLElement>;
15
+ }, ThemeProps>> & string & Omit<(props: import("../Text").TextProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
16
+ export default StyledErrorText;
@@ -1,2 +1,6 @@
1
- import{__makeTemplateObject as o}from"../../../node_modules/tslib/tslib.es6.js";import n from"styled-components";import{Text as t}from"../Text/index.js";var e,r=n(t)(e||(e=o(["\n display: inline-block;\n color: ",";\n font-weight: ",";\n"],["\n display: inline-block;\n color: ",";\n font-weight: ",";\n"])),(function(o){return o.theme.colors.textError}),(function(o){return o.theme.typography.fontWeightHeavy}));export{r as StyledErrorText,r as default};
1
+ import o from"styled-components";import{Text as t}from"../Text/index.js";const e=o(t)`
2
+ display: inline-block;
3
+ color: ${({theme:o})=>o.colors.textError};
4
+ font-weight: ${({theme:o})=>o.typography.fontWeightHeavy};
5
+ `;export{e as StyledErrorText,e as default};
2
6
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/ErrorText/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport Text from \"../Text\";\nimport { type ThemeType } from \"../../types\";\n\ntype ThemeProps = {\n theme: ThemeType;\n};\nexport const StyledErrorText = styled(Text)<ThemeProps>`\n display: inline-block;\n color: ${({ theme }) => theme.colors.textError};\n font-weight: ${({ theme }) => theme.typography.fontWeightHeavy};\n`;\n\nexport default StyledErrorText;\n"],"names":["StyledErrorText","styled","Text","templateObject_1","__makeTemplateObject","_a","theme","colors","textError","typography","fontWeightHeavy"],"mappings":"yJAOa,MAAAA,EAAkBC,EAAOC,EAAPD,CAAwBE,IAAAA,EAAAC,EAAA,CAAA,wCAAA,qBAAA,OAAA,CAAA,wCAEP,qBACgB,UADrD,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,SAAb,IACT,SAACH,GAAc,OAAPA,EAAAC,MAAaG,WAAWC,eAAjB"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/ErrorText/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport Text from \"../Text\";\nimport { type ThemeType } from \"../../types\";\n\ntype ThemeProps = {\n theme: ThemeType;\n};\nexport const StyledErrorText = styled(Text)<ThemeProps>`\n display: inline-block;\n color: ${({ theme }) => theme.colors.textError};\n font-weight: ${({ theme }) => theme.typography.fontWeightHeavy};\n`;\n\nexport default StyledErrorText;\n"],"names":["StyledErrorText","styled","Text","theme","colors","textError","typography","fontWeightHeavy"],"mappings":"+EAOaA,EAAkBC,EAAOC,EAAiB;;WAE5C,EAAGC,WAAYA,EAAMC,OAAOC;iBACtB,EAAGF,WAAYA,EAAMG,WAAWC;"}
@@ -1,2 +1,8 @@
1
- import{__makeTemplateObject as e,__assign as n}from"../../node_modules/tslib/tslib.es6.js";import t from"react";import i from"styled-components";import{spacing as r,spacingPropsToSpacingPropsInternal as m}from"./Spacing/index.js";var o,a=i.div(o||(o=e(["\n display: block;\n @media (min-width: ",") {\n display: flex;\n }\n ","\n"],["\n display: block;\n @media (min-width: ",") {\n display: flex;\n }\n ","\n"])),(function(e){return e.theme.breakpoint.tablet}),(function(e){return r(e,e.theme)}));function l(e){var i=m(e);return t.createElement(a,n({theme:e.theme},i))}export{l as Flex,l as default};
1
+ import e from"react";import t from"styled-components";import{spacing as m,spacingPropsToSpacingPropsInternal as o}from"./Spacing/index.js";const i=t.div`
2
+ display: block;
3
+ @media (min-width: ${({theme:e})=>e.breakpoint.tablet}) {
4
+ display: flex;
5
+ }
6
+ ${e=>m(e,e.theme)}
7
+ `;function n(t){const m=o(t);return e.createElement(i,{theme:t.theme,...m})}export{n as Flex,n as default};
2
8
  //# sourceMappingURL=Flex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.js","sources":["../../../src/components/Flex.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\nimport {\n spacing,\n type SpacingPropsInternal,\n spacingPropsToSpacingPropsInternal,\n type SpacingProps,\n} from \"./Spacing\";\nimport { type ThemeType } from \"../types\";\n\ntype StyledProps = SpacingPropsInternal & {\n theme: ThemeType;\n};\n\nconst FlexStyled = styled.div<StyledProps>`\n display: block;\n @media (min-width: ${({ theme }) => theme.breakpoint.tablet}) {\n display: flex;\n }\n ${(props) => spacing(props, props.theme as ThemeType)}\n`;\n\ntype Props = SpacingProps & {\n theme: ThemeType;\n};\nexport function Flex(props: Props) {\n const spacingProps = spacingPropsToSpacingPropsInternal(props);\n\n return <FlexStyled theme={props.theme} {...spacingProps} />;\n}\n\nexport default Flex;\n"],"names":["FlexStyled","styled","div","templateObject_1","__makeTemplateObject","_a","theme","breakpoint","tablet","props","spacing","Flex","spacingProps","spacingPropsToSpacingPropsInternal","React","createElement","__assign"],"mappings":"sOAcA,MAAMA,EAAaC,EAAOC,IAAGC,IAAAA,EAAAC,EAAA,CAAA,6CAAA,mCAAA,MAAA,CAAa,6CAEmB,mCAGN,SAHhC,SAACC,GAAc,OAAPA,EAAAC,MAAaC,WAAWC,MAAjB,IAGlC,SAACC,GAAU,OAAAC,EAAQD,EAAOA,EAAMH,UAM9B,SAAUK,EAAKF,GACnB,IAAMG,EAAeC,EAAmCJ,GAExD,OAAOK,EAAAC,cAACf,EAAUgB,EAAA,CAACV,MAAOG,EAAMH,OAAWM,GAC7C"}
1
+ {"version":3,"file":"Flex.js","sources":["../../../src/components/Flex.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\nimport {\n spacing,\n type SpacingPropsInternal,\n spacingPropsToSpacingPropsInternal,\n type SpacingProps,\n} from \"./Spacing\";\nimport { type ThemeType } from \"../types\";\n\ntype StyledProps = SpacingPropsInternal & {\n theme: ThemeType;\n};\n\nconst FlexStyled = styled.div<StyledProps>`\n display: block;\n @media (min-width: ${({ theme }) => theme.breakpoint.tablet}) {\n display: flex;\n }\n ${(props) => spacing(props, props.theme as ThemeType)}\n`;\n\ntype Props = SpacingProps & {\n theme: ThemeType;\n};\nexport function Flex(props: Props) {\n const spacingProps = spacingPropsToSpacingPropsInternal(props);\n\n return <FlexStyled theme={props.theme} {...spacingProps} />;\n}\n\nexport default Flex;\n"],"names":["FlexStyled","styled","div","theme","breakpoint","tablet","props","spacing","Flex","spacingProps","spacingPropsToSpacingPropsInternal","React","createElement"],"mappings":"2IAcA,MAAMA,EAAaC,EAAOC,GAAgB;;uBAEnB,EAAGC,WAAYA,EAAMC,WAAWC;;;IAGlDC,GAAUC,EAAQD,EAAOA,EAAMH;EAM9B,SAAUK,EAAKF,GACnB,MAAMG,EAAeC,EAAmCJ,GAExD,OAAOK,EAAAC,cAACZ,EAAU,CAACG,MAAOG,EAAMH,SAAWM,GAC7C"}
@@ -1,2 +1,2 @@
1
- import{crukTheme as o}from"../themes/cruk.js";import{rflTheme as t}from"../themes/rfl.js";import{su2cTheme as n}from"../themes/su2c.js";import{bowelbabeTheme as f}from"../themes/bowelbabe.js";var c=function(o){return o.map((function(o){return"\n @font-face {\n font-family: ".concat(o.family,";\n src: ").concat((null==o?void 0:o.urlWoff2)?'url("'.concat(o.urlWoff2,"\") format('woff2')"):"").concat(o.urlWoff&&(null==o?void 0:o.urlWoff2)?", ":"","\n ").concat((null==o?void 0:o.urlWoff)?'url("'.concat(o.urlWoff,"\") format('woff')"):"",";\n font-weight: ").concat(o.fontWeight||"normal",";\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")},r="\n".concat(c(o.typography.customFonts),"\n").concat(c(t.typography.customFonts),"\n").concat(c(n.typography.customFonts),"\n").concat(c(f.typography.customFonts),"\n");export{r as Fontface,c as buildCustomFonts,r as default};
1
+ import{crukTheme as o}from"../themes/cruk.js";import{rflTheme as f}from"../themes/rfl.js";import{su2cTheme as t}from"../themes/su2c.js";import{bowelbabeTheme as n}from"../themes/bowelbabe.js";const r=o=>o.map((o=>`\n @font-face {\n font-family: ${o.family};\n src: ${o?.urlWoff2?`url("${o.urlWoff2}") format('woff2')`:""}${o.urlWoff&&o?.urlWoff2?", ":""}\n ${o?.urlWoff?`url("${o.urlWoff}") format('woff')`:""};\n font-weight: ${o.fontWeight||"normal"};\n font-style: normal;\n font-display: fallback;\n }\n `)).join(""),m=`\n${r(o.typography.customFonts)}\n${r(f.typography.customFonts)}\n${r(t.typography.customFonts)}\n${r(n.typography.customFonts)}\n`;export{m as Fontface,r as buildCustomFonts,m as default};
2
2
  //# sourceMappingURL=Fontface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fontface.js","sources":["../../../src/components/Fontface.ts"],"sourcesContent":["import { type CustomFontType } from \"../types\";\nimport { crukTheme } from \"../themes/cruk\";\nimport { rflTheme } from \"../themes/rfl\";\nimport { su2cTheme } from \"../themes/su2c\";\nimport { bowelbabeTheme } from \"../themes/bowelbabe\";\n\n// font-display fall back to stop font's flickering on SSR rehydration\nexport const buildCustomFonts = (customFonts: CustomFontType[]) =>\n customFonts\n .map(\n (font) => `\n @font-face {\n font-family: ${font.family};\n src: ${\n font?.urlWoff2 ? `url(\"${font.urlWoff2}\") format('woff2')` : \"\"\n }${!!font.urlWoff && !!font?.urlWoff2 ? \", \" : \"\"}\n ${font?.urlWoff ? `url(\"${font.urlWoff}\") format('woff')` : \"\"};\n font-weight: ${font.fontWeight || \"normal\"};\n font-style: normal;\n font-display: fallback;\n }\n `,\n )\n .join(\"\");\n\nexport const Fontface = `\n${buildCustomFonts(crukTheme.typography.customFonts)}\n${buildCustomFonts(rflTheme.typography.customFonts)}\n${buildCustomFonts(su2cTheme.typography.customFonts)}\n${buildCustomFonts(bowelbabeTheme.typography.customFonts)}\n`;\n\nexport default Fontface;\n"],"names":["buildCustomFonts","customFonts","map","font","concat","family","urlWoff2","urlWoff","fontWeight","join","Fontface","crukTheme","typography","rflTheme","su2cTheme","bowelbabeTheme"],"mappings":"gMAOO,IAAMA,EAAmB,SAACC,GAC/B,OAAAA,EACGC,KACC,SAACC,GAAS,MAAA,kDAAAC,OAESD,EAAKE,OAElB,sBAAAD,QAAAD,eAAAA,EAAMG,UAAW,QAAAF,OAAQD,EAAKG,gCAA+B,IAAEF,OAC5DD,EAAKI,UAAaJ,aAAA,EAAAA,EAAMG,UAAW,KAAO,2BAC7CH,aAAI,EAAJA,EAAMI,SAAU,QAAQH,OAAAD,EAAKI,QAAO,sBAAsB,GAC7C,8BAAAH,OAAAD,EAAKK,YAAc,SAIrC,yFAAA,IAEFC,KAAK,GAfR,EAiBWC,EAAW,KACtBN,OAAAJ,EAAiBW,EAAUC,WAAWX,aAAY,MAAAG,OAClDJ,EAAiBa,EAASD,WAAWX,0BACrCD,EAAiBc,EAAUF,WAAWX,0BACtCD,EAAiBe,EAAeH,WAAWX"}
1
+ {"version":3,"file":"Fontface.js","sources":["../../../src/components/Fontface.ts"],"sourcesContent":["import { type CustomFontType } from \"../types\";\nimport { crukTheme } from \"../themes/cruk\";\nimport { rflTheme } from \"../themes/rfl\";\nimport { su2cTheme } from \"../themes/su2c\";\nimport { bowelbabeTheme } from \"../themes/bowelbabe\";\n\n// font-display fall back to stop font's flickering on SSR rehydration\nexport const buildCustomFonts = (customFonts: CustomFontType[]) =>\n customFonts\n .map(\n (font) => `\n @font-face {\n font-family: ${font.family};\n src: ${\n font?.urlWoff2 ? `url(\"${font.urlWoff2}\") format('woff2')` : \"\"\n }${!!font.urlWoff && !!font?.urlWoff2 ? \", \" : \"\"}\n ${font?.urlWoff ? `url(\"${font.urlWoff}\") format('woff')` : \"\"};\n font-weight: ${font.fontWeight || \"normal\"};\n font-style: normal;\n font-display: fallback;\n }\n `,\n )\n .join(\"\");\n\nexport const Fontface = `\n${buildCustomFonts(crukTheme.typography.customFonts)}\n${buildCustomFonts(rflTheme.typography.customFonts)}\n${buildCustomFonts(su2cTheme.typography.customFonts)}\n${buildCustomFonts(bowelbabeTheme.typography.customFonts)}\n`;\n\nexport default Fontface;\n"],"names":["buildCustomFonts","customFonts","map","font","family","urlWoff2","urlWoff","fontWeight","join","Fontface","crukTheme","typography","rflTheme","su2cTheme","bowelbabeTheme"],"mappings":"sMAOaA,EAAoBC,GAC/BA,EACGC,KACEC,GAAS,kDAESA,EAAKC,2BAElBD,GAAME,SAAW,QAAQF,EAAKE,6BAA+B,KAC1DF,EAAKG,SAAaH,GAAME,SAAW,KAAO,iBAC7CF,GAAMG,QAAU,QAAQH,EAAKG,2BAA6B,+BAC7CH,EAAKI,YAAc,mGAMvCC,KAAK,IAEGC,EAAW,KACtBT,EAAiBU,EAAUC,WAAWV,iBACtCD,EAAiBY,EAASD,WAAWV,iBACrCD,EAAiBa,EAAUF,WAAWV,iBACtCD,EAAiBc,EAAeH,WAAWV"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { StoryObj } from "@storybook/react";
3
- import Footer, { FooterProps } from ".";
2
+ import { type StoryObj } from "@storybook/react";
3
+ import Footer, { type FooterProps } from ".";
4
4
  declare const _default: {
5
5
  title: string;
6
6
  component: typeof Footer;
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{useTheme as n,ThemeProvider as l}from"styled-components";import{crukTheme as r}from"../../themes/cruk.js";import{Text as o}from"../Text/index.js";import{StyledFooter as a,FooterContentWrapper as m,FooterSectionLogo as i,StyledRegulatorLogo as s,FooterSectionLinks as c,StyledNav as E,StyledUL as f,StyledLI as u,FooterSection as p,FooterSectionAddress as d,StyledAddress as g}from"./styles.js";function x(x){var h=x.children,S=x.middleSection,y=t.Children.toArray(h),z=n(),C=e(e({},r),z);return t.createElement(l,{theme:C},t.createElement(a,null,t.createElement(m,null,t.createElement(i,null,t.createElement(s,{width:130,height:40,alt:C.siteConfig.footerLogoAlt||"",src:C.siteConfig.footerLogoSrc||""})),t.createElement(c,null,t.createElement(E,{"aria-label":"footer links"},t.createElement(f,null,y.length?y.map((function(e,n){var l="footerLink".concat(n);return t.createElement(u,{key:l},e)})):null))),t.createElement(p,null,S?"string"==typeof S?t.createElement(o,{textSize:"s"},S):t.createElement(t.Fragment,null,S):t.createElement(o,{textSize:"s"},C.siteConfig.footerCopyText)),t.createElement(d,null,t.createElement(g,null,t.createElement(o,{as:"span",textSize:"s"},"2 Redman Place"),t.createElement(o,{as:"span",textSize:"s"},"London"),t.createElement(o,{as:"span",textSize:"s"},"E20 1JQ"))))))}export{x as Footer,x as default};
1
+ import e from"react";import{useTheme as t,ThemeProvider as n}from"styled-components";import{crukTheme as l}from"../../themes/cruk.js";import{Text as r}from"../Text/index.js";import{StyledFooter as o,FooterContentWrapper as a,FooterSectionLogo as m,StyledRegulatorLogo as c,FooterSectionLinks as i,StyledNav as s,StyledUL as E,StyledLI as f,FooterSection as u,FooterSectionAddress as p,StyledAddress as d}from"./styles.js";function g({children:g,middleSection:x}){const h=e.Children.toArray(g),S=t(),y={...l,...S};return e.createElement(n,{theme:y},e.createElement(o,null,e.createElement(a,null,e.createElement(m,null,e.createElement(c,{width:130,height:40,alt:y.siteConfig.footerLogoAlt||"",src:y.siteConfig.footerLogoSrc||""})),e.createElement(i,null,e.createElement(s,{"aria-label":"footer links"},e.createElement(E,null,h.length?h.map(((t,n)=>{const l=`footerLink${n}`;return e.createElement(f,{key:l},t)})):null))),e.createElement(u,null,x?"string"==typeof x?e.createElement(r,{textSize:"s"},x):e.createElement(e.Fragment,null,x):e.createElement(r,{textSize:"s"},y.siteConfig.footerCopyText)),e.createElement(p,null,e.createElement(d,null,e.createElement(r,{as:"span",textSize:"s"},"2 Redman Place"),e.createElement(r,{as:"span",textSize:"s"},"London"),e.createElement(r,{as:"span",textSize:"s"},"E20 1JQ"))))))}export{g as Footer,g as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Footer/index.tsx"],"sourcesContent":["import React, { type ReactNode, type HTMLAttributes } from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Text } from \"../Text\";\n\nimport {\n StyledFooter,\n FooterContentWrapper,\n FooterSectionLogo,\n FooterSection,\n FooterSectionAddress,\n StyledAddress,\n StyledRegulatorLogo,\n FooterSectionLinks,\n StyledNav,\n StyledUL,\n StyledLI,\n} from \"./styles\";\n\nexport type FooterProps = HTMLAttributes<HTMLElement> & {\n /** used to customise text in middle section, it could also be react element, this is not to be confused with the component children which is primarily for the links in the footer */\n middleSection?: ReactNode;\n children?: ReactNode;\n};\n\n/**\n * There should be only one footer component at the bottom of the body of each page. Links can be passed as children\n * */\nexport function Footer({ children, middleSection }: FooterProps) {\n const childArray = React.Children.toArray(children);\n\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n return (\n <ThemeProvider theme={theme}>\n <StyledFooter>\n <FooterContentWrapper>\n <FooterSectionLogo>\n <StyledRegulatorLogo\n width={130}\n height={40}\n alt={theme.siteConfig.footerLogoAlt || \"\"}\n src={theme.siteConfig.footerLogoSrc || \"\"}\n />\n </FooterSectionLogo>\n <FooterSectionLinks>\n <StyledNav aria-label=\"footer links\">\n <StyledUL>\n {childArray.length\n ? childArray.map((child, index) => {\n const footerLinkKey = `footerLink${index}`;\n return <StyledLI key={footerLinkKey}>{child}</StyledLI>;\n })\n : null}\n </StyledUL>\n </StyledNav>\n </FooterSectionLinks>\n\n <FooterSection>\n {middleSection ? (\n typeof middleSection === \"string\" ? (\n <Text textSize=\"s\">{middleSection}</Text>\n ) : (\n <>{middleSection}</>\n )\n ) : (\n <Text textSize=\"s\">{theme.siteConfig.footerCopyText}</Text>\n )}\n </FooterSection>\n\n <FooterSectionAddress>\n <StyledAddress>\n <Text as=\"span\" textSize=\"s\">\n 2 Redman Place\n </Text>\n <Text as=\"span\" textSize=\"s\">\n London\n </Text>\n <Text as=\"span\" textSize=\"s\">\n E20 1JQ\n </Text>\n </StyledAddress>\n </FooterSectionAddress>\n </FooterContentWrapper>\n </StyledFooter>\n </ThemeProvider>\n );\n}\n\nexport default Footer;\n"],"names":["Footer","_a","children","middleSection","childArray","React","Children","toArray","foundTheme","useTheme","theme","__assign","defaultTheme","createElement","ThemeProvider","StyledFooter","FooterContentWrapper","FooterSectionLogo","StyledRegulatorLogo","width","height","alt","siteConfig","footerLogoAlt","src","footerLogoSrc","FooterSectionLinks","StyledNav","StyledUL","length","map","child","index","footerLinkKey","concat","StyledLI","key","FooterSection","Text","textSize","Fragment","footerCopyText","FooterSectionAddress","StyledAddress","as"],"mappings":"0eA6BM,SAAUA,EAAOC,OAAEC,EAAQD,EAAAC,SAAEC,EAAaF,EAAAE,cACxCC,EAAaC,EAAMC,SAASC,QAAQL,GAEpCM,EAAaC,IACbC,EACDC,EAAAA,EAAA,CAAA,EAAAC,GACAJ,GAGL,OACEH,EAACQ,cAAAC,EAAc,CAAAJ,MAAOA,GACpBL,EAAAQ,cAACE,EAAY,KACXV,EAAAQ,cAACG,EAAoB,KACnBX,EAAAQ,cAACI,EAAiB,KAChBZ,EAAAQ,cAACK,EAAmB,CAClBC,MAAO,IACPC,OAAQ,GACRC,IAAKX,EAAMY,WAAWC,eAAiB,GACvCC,IAAKd,EAAMY,WAAWG,eAAiB,MAG3CpB,EAAAQ,cAACa,EAAkB,KACjBrB,EAACQ,cAAAc,gBAAqB,gBACpBtB,EAAAQ,cAACe,EAAQ,KACNxB,EAAWyB,OACRzB,EAAW0B,KAAI,SAACC,EAAOC,GACrB,IAAMC,EAAgB,aAAaC,OAAAF,GACnC,OAAO3B,EAAAQ,cAACsB,EAAS,CAAAC,IAAKH,GAAgBF,EACvC,IACD,QAKV1B,EAACQ,cAAAwB,EACE,KAAAlC,EAC0B,iBAAlBA,EACLE,EAACQ,cAAAyB,EAAK,CAAAC,SAAS,KAAKpC,GAEpBE,EAAGQ,cAAAR,EAAAmC,SAAA,KAAArC,GAGLE,EAACQ,cAAAyB,GAAKC,SAAS,KAAK7B,EAAMY,WAAWmB,iBAIzCpC,EAAAQ,cAAC6B,EAAoB,KACnBrC,EAAAQ,cAAC8B,EAAa,KACZtC,EAACQ,cAAAyB,GAAKM,GAAG,OAAOL,SAAS,KAElB,kBACPlC,EAACQ,cAAAyB,GAAKM,GAAG,OAAOL,SAAS,KAElB,UACPlC,EAAAQ,cAACyB,EAAK,CAAAM,GAAG,OAAOL,SAAS,KAAG,eAS1C"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Footer/index.tsx"],"sourcesContent":["import React, { type ReactNode, type HTMLAttributes } from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { Text } from \"../Text\";\n\nimport {\n StyledFooter,\n FooterContentWrapper,\n FooterSectionLogo,\n FooterSection,\n FooterSectionAddress,\n StyledAddress,\n StyledRegulatorLogo,\n FooterSectionLinks,\n StyledNav,\n StyledUL,\n StyledLI,\n} from \"./styles\";\n\nexport type FooterProps = HTMLAttributes<HTMLElement> & {\n /** used to customise text in middle section, it could also be react element, this is not to be confused with the component children which is primarily for the links in the footer */\n middleSection?: ReactNode;\n children?: ReactNode;\n};\n\n/**\n * There should be only one footer component at the bottom of the body of each page. Links can be passed as children\n * */\nexport function Footer({ children, middleSection }: FooterProps) {\n const childArray = React.Children.toArray(children);\n\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n return (\n <ThemeProvider theme={theme}>\n <StyledFooter>\n <FooterContentWrapper>\n <FooterSectionLogo>\n <StyledRegulatorLogo\n width={130}\n height={40}\n alt={theme.siteConfig.footerLogoAlt || \"\"}\n src={theme.siteConfig.footerLogoSrc || \"\"}\n />\n </FooterSectionLogo>\n <FooterSectionLinks>\n <StyledNav aria-label=\"footer links\">\n <StyledUL>\n {childArray.length\n ? childArray.map((child, index) => {\n const footerLinkKey = `footerLink${index}`;\n return <StyledLI key={footerLinkKey}>{child}</StyledLI>;\n })\n : null}\n </StyledUL>\n </StyledNav>\n </FooterSectionLinks>\n\n <FooterSection>\n {middleSection ? (\n typeof middleSection === \"string\" ? (\n <Text textSize=\"s\">{middleSection}</Text>\n ) : (\n <>{middleSection}</>\n )\n ) : (\n <Text textSize=\"s\">{theme.siteConfig.footerCopyText}</Text>\n )}\n </FooterSection>\n\n <FooterSectionAddress>\n <StyledAddress>\n <Text as=\"span\" textSize=\"s\">\n 2 Redman Place\n </Text>\n <Text as=\"span\" textSize=\"s\">\n London\n </Text>\n <Text as=\"span\" textSize=\"s\">\n E20 1JQ\n </Text>\n </StyledAddress>\n </FooterSectionAddress>\n </FooterContentWrapper>\n </StyledFooter>\n </ThemeProvider>\n );\n}\n\nexport default Footer;\n"],"names":["Footer","children","middleSection","childArray","React","Children","toArray","foundTheme","useTheme","theme","defaultTheme","createElement","ThemeProvider","StyledFooter","FooterContentWrapper","FooterSectionLogo","StyledRegulatorLogo","width","height","alt","siteConfig","footerLogoAlt","src","footerLogoSrc","FooterSectionLinks","StyledNav","StyledUL","length","map","child","index","footerLinkKey","StyledLI","key","FooterSection","Text","textSize","Fragment","footerCopyText","FooterSectionAddress","StyledAddress","as"],"mappings":"+aA6BgBA,GAAOC,SAAEA,EAAQC,cAAEA,IACjC,MAAMC,EAAaC,EAAMC,SAASC,QAAQL,GAEpCM,EAAaC,IACbC,EAAQ,IACTC,KACAH,GAGL,OACEH,EAACO,cAAAC,EAAc,CAAAH,MAAOA,GACpBL,EAAAO,cAACE,EAAY,KACXT,EAAAO,cAACG,EAAoB,KACnBV,EAAAO,cAACI,EAAiB,KAChBX,EAAAO,cAACK,EAAmB,CAClBC,MAAO,IACPC,OAAQ,GACRC,IAAKV,EAAMW,WAAWC,eAAiB,GACvCC,IAAKb,EAAMW,WAAWG,eAAiB,MAG3CnB,EAAAO,cAACa,EAAkB,KACjBpB,EAACO,cAAAc,gBAAqB,gBACpBrB,EAAAO,cAACe,EAAQ,KACNvB,EAAWwB,OACRxB,EAAWyB,KAAI,CAACC,EAAOC,KACrB,MAAMC,EAAgB,aAAaD,IACnC,OAAO1B,EAAAO,cAACqB,EAAS,CAAAC,IAAKF,GAAgBF,EAAiB,IAEzD,QAKVzB,EAACO,cAAAuB,EACE,KAAAhC,EAC0B,iBAAlBA,EACLE,EAACO,cAAAwB,EAAK,CAAAC,SAAS,KAAKlC,GAEpBE,EAAGO,cAAAP,EAAAiC,SAAA,KAAAnC,GAGLE,EAACO,cAAAwB,GAAKC,SAAS,KAAK3B,EAAMW,WAAWkB,iBAIzClC,EAAAO,cAAC4B,EAAoB,KACnBnC,EAAAO,cAAC6B,EAAa,KACZpC,EAACO,cAAAwB,GAAKM,GAAG,OAAOL,SAAS,KAElB,kBACPhC,EAACO,cAAAwB,GAAKM,GAAG,OAAOL,SAAS,KAElB,UACPhC,EAAAO,cAACwB,EAAK,CAAAM,GAAG,OAAOL,SAAS,KAAG,eAS1C"}
@@ -5,18 +5,12 @@ type ThemeProps = {
5
5
  export declare const StyledFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, ThemeProps>> & string;
6
6
  export declare const FooterContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ThemeProps>> & string;
7
7
  export declare const FooterSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ThemeProps>> & string;
8
- export declare const FooterSectionLogo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, "ref"> & {
9
- ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
- }, never>> & string;
11
- export declare const FooterSectionLinks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, "ref"> & {
12
- ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
- }, never>> & string;
8
+ export declare const FooterSectionLogo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, never>> & string;
9
+ export declare const FooterSectionLinks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, never>> & string;
14
10
  export declare const StyledNav: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, ThemeProps>> & string;
15
11
  export declare const StyledUL: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
16
12
  export declare const StyledLI: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, ThemeProps>> & string;
17
- export declare const FooterSectionAddress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, "ref"> & {
18
- ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
19
- }, never>> & string;
13
+ export declare const FooterSectionAddress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "theme"> & ThemeProps, never>> & string;
20
14
  export declare const StyledRegulatorLogo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
21
15
  export declare const StyledAddress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
22
16
  export {};
@@ -1,2 +1,70 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import i from"styled-components";var t,e,o,l,d,a,r,s,p,f,c,h=i.footer(t||(t=n(["\n ",";\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"],["\n ",";\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ",";\n"])),(function(n){return n.theme.colors.inputBorder}),(function(n){return n.theme.colors.footerBackground})),m=i.div(e||(e=n(["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"],["\n max-width: ",";\n display: block;\n margin: 0 auto;\n\n @media (min-width: ",") {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n"])),(function(n){return n.theme.utilities.contentMaxWidth}),(function(n){return n.theme.breakpoint.desktop})),u=i.div(o||(o=n(["\n box-sizing: border-box;\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"],["\n box-sizing: border-box;\n display: inline-block;\n padding: ",";\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n"])),(function(n){return n.theme.spacing.xs})),x=i(u)(l||(l=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 140px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),b=i(u)(d||(d=n(["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"],["\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ",") {\n flex: 0 0 170px;\n width: auto;\n }\n"])),(function(n){return n.theme.breakpoint.desktop})),g=i.nav(a||(a=n(["\n display: flex;\n flex-direction: column;\n a {\n font-size: ",";\n font-weight: ",";\n }\n"],["\n display: flex;\n flex-direction: column;\n a {\n font-size: ",";\n font-weight: ",";\n }\n"])),(function(n){return n.theme.fontSizes.s}),(function(n){return n.theme.typography.fontWeightLinks})),y=i.ul(r||(r=n(["\n padding: 0;\n margin: 0;\n"],["\n padding: 0;\n margin: 0;\n"]))),w=i.li(s||(s=n(["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"],["\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ",";\n"])),(function(n){return n.theme.spacing.xxs})),k=i(u)(p||(p=n(["\n flex: 0 0 150px;\n"],["\n flex: 0 0 150px;\n"]))),v=i.img(f||(f=n(["\n height: 40px;\n width: auto;\n"],["\n height: 40px;\n width: auto;\n"]))),z=i.address(c||(c=n(["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"],["\n display: flex;\n flex-direction: column;\n font-style: normal;\n"])));export{m as FooterContentWrapper,u as FooterSection,k as FooterSectionAddress,b as FooterSectionLinks,x as FooterSectionLogo,z as StyledAddress,h as StyledFooter,w as StyledLI,g as StyledNav,v as StyledRegulatorLogo,y as StyledUL};
1
+ import e from"styled-components";const i=e.footer`
2
+ ${({theme:e})=>e.colors.inputBorder};
3
+ box-sizing: border-box;
4
+ display: block;
5
+ position: relative;
6
+ width: 100%;
7
+ background-color: ${({theme:e})=>e.colors.footerBackground};
8
+ `,t=e.div`
9
+ max-width: ${({theme:e})=>e.utilities.contentMaxWidth};
10
+ display: block;
11
+ margin: 0 auto;
12
+
13
+ @media (min-width: ${({theme:e})=>e.breakpoint.desktop}) {
14
+ display: flex;
15
+ flex-direction: row;
16
+ justify-content: space-between;
17
+ }
18
+ `,o=e.div`
19
+ box-sizing: border-box;
20
+ display: inline-block;
21
+ padding: ${({theme:e})=>e.spacing.xs};
22
+ position: relative;
23
+ width: 100%;
24
+ flex: 0 1 auto;
25
+ `,d=e(o)`
26
+ width: 50%;
27
+ display: block;
28
+ float: left;
29
+
30
+ @media (min-width: ${({theme:e})=>e.breakpoint.desktop}) {
31
+ flex: 0 0 140px;
32
+ width: auto;
33
+ }
34
+ `,n=e(o)`
35
+ width: 50%;
36
+ display: block;
37
+ float: left;
38
+
39
+ @media (min-width: ${({theme:e})=>e.breakpoint.desktop}) {
40
+ flex: 0 0 170px;
41
+ width: auto;
42
+ }
43
+ `,l=e.nav`
44
+ display: flex;
45
+ flex-direction: column;
46
+ a {
47
+ font-size: ${({theme:e})=>e.fontSizes.s};
48
+ font-weight: ${({theme:{typography:{fontWeightLinks:e}}})=>e};
49
+ }
50
+ `,a=e.ul`
51
+ padding: 0;
52
+ margin: 0;
53
+ `,s=e.li`
54
+ list-style-type: none;
55
+ display: block;
56
+ padding: 0;
57
+ margin: 0;
58
+ line-height: 1;
59
+ padding-bottom: ${({theme:{spacing:{xxs:e}}})=>e};
60
+ `,p=e(o)`
61
+ flex: 0 0 150px;
62
+ `,r=e.img`
63
+ height: 40px;
64
+ width: auto;
65
+ `,h=e.address`
66
+ display: flex;
67
+ flex-direction: column;
68
+ font-style: normal;
69
+ `;export{t as FooterContentWrapper,o as FooterSection,p as FooterSectionAddress,n as FooterSectionLinks,d as FooterSectionLogo,h as StyledAddress,i as StyledFooter,s as StyledLI,l as StyledNav,r as StyledRegulatorLogo,a as StyledUL};
2
70
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Footer/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype ThemeProps = {\n theme: ThemeType;\n};\nexport const StyledFooter = styled.footer<ThemeProps>`\n ${({ theme }) => theme.colors.inputBorder};\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.footerBackground};\n`;\n\nexport const FooterContentWrapper = styled.div<ThemeProps>`\n max-width: ${({ theme }) => theme.utilities.contentMaxWidth};\n display: block;\n margin: 0 auto;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n`;\n\nexport const FooterSection = styled.div<ThemeProps>`\n box-sizing: border-box;\n display: inline-block;\n padding: ${({ theme }) => theme.spacing.xs};\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n`;\n\nexport const FooterSectionLogo = styled(FooterSection)`\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n flex: 0 0 140px;\n width: auto;\n }\n`;\n\n// TODO: I'm assuming here that the links have fixed width here with a flex basis\n// and the company info expands to fill the gap but it could be the other way round\nexport const FooterSectionLinks = styled(FooterSection)`\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n flex: 0 0 170px;\n width: auto;\n }\n`;\n\nexport const StyledNav = styled.nav<ThemeProps>`\n display: flex;\n flex-direction: column;\n a {\n font-size: ${({ theme }) => theme.fontSizes.s};\n font-weight: ${({\n theme: {\n typography: { fontWeightLinks },\n },\n }: ThemeProps) => fontWeightLinks};\n }\n`;\n\nexport const StyledUL = styled.ul`\n padding: 0;\n margin: 0;\n`;\n\nexport const StyledLI = styled.li<ThemeProps>`\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ${({\n theme: {\n spacing: { xxs },\n },\n }) => xxs};\n`;\n\nexport const FooterSectionAddress = styled(FooterSection)`\n flex: 0 0 150px;\n`;\n\nexport const StyledRegulatorLogo = styled.img`\n height: 40px;\n width: auto;\n`;\n\nexport const StyledAddress = styled.address`\n display: flex;\n flex-direction: column;\n font-style: normal;\n`;\n"],"names":["StyledFooter","styled","footer","templateObject_1","__makeTemplateObject","_a","theme","colors","inputBorder","footerBackground","FooterContentWrapper","div","templateObject_2","utilities","contentMaxWidth","breakpoint","desktop","FooterSection","templateObject_3","spacing","xs","FooterSectionLogo","templateObject_4","FooterSectionLinks","templateObject_5","StyledNav","nav","templateObject_6","fontSizes","s","typography","fontWeightLinks","StyledUL","ul","templateObject_7","StyledLI","li","templateObject_8","xxs","FooterSectionAddress","templateObject_9","StyledRegulatorLogo","img","templateObject_10","StyledAddress","address","templateObject_11"],"mappings":"iHAMO,0BAAMA,EAAeC,EAAOC,OAAkBC,IAAAA,EAAAC,EAAA,CAAA,OAAA,+GAAA,OAAA,CAAA,OACV,+GAKuB,UAL9D,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,WAAb,IAKG,SAACH,GAAc,OAAPA,EAAAC,MAAaC,OAAOE,gBAAb,IAGxBC,EAAuBT,EAAOU,IAAeC,IAAAA,EAAAR,EAAA,CAAA,kBAAA,mEAAA,iGAAA,CAAA,kBACG,mEAIC,oGAJ/C,SAACC,GAAc,OAAPA,EAAAC,MAAaO,UAAUC,eAAhB,IAIP,SAACT,GAAc,OAAPA,EAAAC,MAAaS,WAAWC,OAAjB,IAOzBC,EAAgBhB,EAAOU,IAAGO,IAAAA,EAAAd,EAAA,CAAA,qEAAA,iEAAA,CAAY,qEAGP,oEAA/B,SAACC,GAAc,OAAPA,EAAAC,MAAaa,QAAQC,EAAd,IAMfC,EAAoBpB,EAAOgB,EAAPhB,CAAqBqB,IAAAA,EAAAlB,EAAA,CAAA,8EAAA,sDAAA,CAAA,8EAKQ,yDAAvC,SAACC,GAAc,OAAPA,EAAAC,MAAaS,WAAWC,OAAjB,IAQzBO,EAAqBtB,EAAOgB,EAAPhB,CAAqBuB,IAAAA,EAAApB,EAAA,CAAA,8EAAA,sDAAA,CAAA,8EAKO,yDAAvC,SAACC,GAAc,OAAPA,EAAAC,MAAaS,WAAWC,OAAjB,IAMzBS,EAAYxB,EAAOyB,IAAeC,IAAAA,EAAAvB,EAAA,CAAA,wEAAA,uBAAA,YAAA,CAAA,wEAIE,uBAKZ,eALpB,SAACC,GAAc,OAAPA,EAAAC,MAAasB,UAAUC,CAAhB,IACb,SAACxB,GAIE,OAFeA,EAAAC,MAAAwB,WAAAC,eAEf,IAITC,EAAW/B,EAAOgC,GAAEC,IAAAA,EAAA9B,EAAA,CAAA,mCAAA,CAAA,sCAKpB+B,EAAWlC,EAAOmC,GAAEC,IAAAA,EAAAjC,EAAA,CAAA,oHAAA,OAAA,CAAY,oHAUlC,UAJS,SAACC,GAIb,OAFYA,EAAAC,MAAAa,QAAAmB,GAEZ,IAGKC,EAAuBtC,EAAOgB,EAAPhB,CAAqBuC,IAAAA,EAAApC,EAAA,CAAA,0BAAA,CAAA,6BAI5CqC,EAAsBxC,EAAOyC,IAAGC,IAAAA,EAAAvC,EAAA,CAAA,uCAAA,CAAA,0CAKhCwC,EAAgB3C,EAAO4C,QAAOC,IAAAA,EAAA1C,EAAA,CAAA,0EAAA,CAAA"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Footer/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\ntype ThemeProps = {\n theme: ThemeType;\n};\nexport const StyledFooter = styled.footer<ThemeProps>`\n ${({ theme }) => theme.colors.inputBorder};\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.footerBackground};\n`;\n\nexport const FooterContentWrapper = styled.div<ThemeProps>`\n max-width: ${({ theme }) => theme.utilities.contentMaxWidth};\n display: block;\n margin: 0 auto;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n`;\n\nexport const FooterSection = styled.div<ThemeProps>`\n box-sizing: border-box;\n display: inline-block;\n padding: ${({ theme }) => theme.spacing.xs};\n position: relative;\n width: 100%;\n flex: 0 1 auto;\n`;\n\nexport const FooterSectionLogo = styled(FooterSection)`\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n flex: 0 0 140px;\n width: auto;\n }\n`;\n\n// TODO: I'm assuming here that the links have fixed width here with a flex basis\n// and the company info expands to fill the gap but it could be the other way round\nexport const FooterSectionLinks = styled(FooterSection)`\n width: 50%;\n display: block;\n float: left;\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n flex: 0 0 170px;\n width: auto;\n }\n`;\n\nexport const StyledNav = styled.nav<ThemeProps>`\n display: flex;\n flex-direction: column;\n a {\n font-size: ${({ theme }) => theme.fontSizes.s};\n font-weight: ${({\n theme: {\n typography: { fontWeightLinks },\n },\n }: ThemeProps) => fontWeightLinks};\n }\n`;\n\nexport const StyledUL = styled.ul`\n padding: 0;\n margin: 0;\n`;\n\nexport const StyledLI = styled.li<ThemeProps>`\n list-style-type: none;\n display: block;\n padding: 0;\n margin: 0;\n line-height: 1;\n padding-bottom: ${({\n theme: {\n spacing: { xxs },\n },\n }) => xxs};\n`;\n\nexport const FooterSectionAddress = styled(FooterSection)`\n flex: 0 0 150px;\n`;\n\nexport const StyledRegulatorLogo = styled.img`\n height: 40px;\n width: auto;\n`;\n\nexport const StyledAddress = styled.address`\n display: flex;\n flex-direction: column;\n font-style: normal;\n`;\n"],"names":["StyledFooter","styled","footer","theme","colors","inputBorder","footerBackground","FooterContentWrapper","div","utilities","contentMaxWidth","breakpoint","desktop","FooterSection","spacing","xs","FooterSectionLogo","FooterSectionLinks","StyledNav","nav","fontSizes","s","typography","fontWeightLinks","StyledUL","ul","StyledLI","li","xxs","FooterSectionAddress","StyledRegulatorLogo","img","StyledAddress","address"],"mappings":"iCAMa,MAAAA,EAAeC,EAAOC,MAAkB;IACjD,EAAGC,WAAYA,EAAMC,OAAOC;;;;;sBAKV,EAAGF,WAAYA,EAAMC,OAAOE;EAGrCC,EAAuBN,EAAOO,GAAe;eAC3C,EAAGL,WAAYA,EAAMM,UAAUC;;;;uBAIvB,EAAGP,WAAYA,EAAMQ,WAAWC;;;;;EAO1CC,EAAgBZ,EAAOO,GAAe;;;aAGtC,EAAGL,WAAYA,EAAMW,QAAQC;;;;EAM7BC,EAAoBf,EAAOY,EAAc;;;;;uBAK/B,EAAGV,WAAYA,EAAMQ,WAAWC;;;;EAQ1CK,EAAqBhB,EAAOY,EAAc;;;;;uBAKhC,EAAGV,WAAYA,EAAMQ,WAAWC;;;;EAM1CM,EAAYjB,EAAOkB,GAAe;;;;iBAI9B,EAAGhB,WAAYA,EAAMiB,UAAUC;mBAC7B,EACblB,OACEmB,YAAcC,uBAEAA;;EAITC,EAAWvB,EAAOwB,EAAE;;;EAKpBC,EAAWzB,EAAO0B,EAAc;;;;;;oBAMzB,EAChBxB,OACEW,SAAWc,WAETA;EAGKC,EAAuB5B,EAAOY,EAAc;;EAI5CiB,EAAsB7B,EAAO8B,GAAG;;;EAKhCC,EAAgB/B,EAAOgC,OAAO;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare const GlobalStyle: import("react").ForwardRefExoticComponent<Omit<JSX.LibraryManagedAttributes<T, import("styled-components").ExecutionProps>, "ref"> & import("react").RefAttributes<import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>>> & {};
2
+ export default GlobalStyle;
@@ -1,2 +1,38 @@
1
- import{__makeTemplateObject as n,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{withTheme as t,createGlobalStyle as e}from"styled-components";import{crukTheme as i}from"../themes/cruk.js";var r,a=t(e(r||(r=n(["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"],["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"])),(function(n){var t,e=o(o({},i),n.theme);return"\n ".concat((t=e.typography.customFonts,t.map((function(n){return"\n @font-face {\n font-family: ".concat(n.family,";\n src: ").concat((null==n?void 0:n.urlWoff2)?'url("'.concat(n.urlWoff2,"\") format('woff2')"):"").concat(n.urlWoff&&(null==n?void 0:n.urlWoff2)?", ":"","\n ").concat((null==n?void 0:n.urlWoff)?'url("'.concat(n.urlWoff,"\") format('woff')"):"",";\n font-weight: ").concat(null==n?void 0:n.fontWeight,";\n font-style: normal;\n font-display: fallback;\n }\n ")})).join("")),"\n html {\n font-size: ").concat(e.typography.fontSizeBase,";\n font-family: ").concat(e.typography.fontFamilyBase,";\n line-height: ").concat(e.typography.lineHeight,";\n }\n body {\n background-color: ").concat(e.colors.backgroundMidLight,";\n color: ").concat(e.colors.textDark,";\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n ")})));a.defaultProps={theme:i};export{a as GlobalStyle,a as default};
1
+ import{withTheme as o,createGlobalStyle as t}from"styled-components";import{crukTheme as n}from"../themes/cruk.js";const e=o(t`
2
+ ${o=>{const t={...n,...o.theme};return`\n ${e=t.typography.customFonts,e.map((o=>`\n @font-face {\n font-family: ${o.family};\n src: ${o?.urlWoff2?`url("${o.urlWoff2}") format('woff2')`:""}${o.urlWoff&&o?.urlWoff2?", ":""}\n ${o?.urlWoff?`url("${o.urlWoff}") format('woff')`:""};\n font-weight: ${o?.fontWeight};\n font-style: normal;\n font-display: fallback;\n }\n `)).join("")}\n html {\n font-size: ${t.typography.fontSizeBase};\n font-family: ${t.typography.fontFamilyBase};\n line-height: ${t.typography.lineHeight};\n }\n body {\n background-color: ${t.colors.backgroundMidLight};\n color: ${t.colors.textDark};\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n `;var e}}
3
+ *, *:after, *:before {
4
+ -webkit-box-sizing: border-box;
5
+ -moz-box-sizing: border-box;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ @media (prefers-reduced-motion: reduce) {
10
+ *, *:after, *:before {
11
+ animation-play-state: paused !important;
12
+ animation-direction: reverse !important;
13
+ transition: none !important;
14
+ scroll-behavior: auto !important;
15
+ }
16
+ }
17
+
18
+ table, td, th {
19
+ border-spacing: 0;
20
+ border: 1px solid #ccc;
21
+ padding: 10px;
22
+ }
23
+ .no-focus-outline a:focus,
24
+ .no-focus-outline button:focus {
25
+ outline: none;
26
+ }
27
+ img {
28
+ width: 100%;
29
+ height: auto;
30
+ }
31
+ section {
32
+ width: 100%;
33
+ }
34
+ button {
35
+ font-size: 1em;
36
+ }
37
+ `);export{e as GlobalStyle,e as default};
2
38
  //# sourceMappingURL=GlobalStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalStyle.js","sources":["../../../src/components/GlobalStyle.tsx"],"sourcesContent":["import { createGlobalStyle, withTheme } from \"styled-components\";\nimport { type CustomFontType } from \"../types\";\nimport { crukTheme as defaultTheme } from \"../themes/cruk\";\n\n// font-display fall back to stop font's flickering on SSR rehydration\nconst buildCustomFonts = (customFonts: CustomFontType[]) =>\n customFonts\n .map(\n (font) => `\n @font-face {\n font-family: ${font.family};\n src: ${\n font?.urlWoff2 ? `url(\"${font.urlWoff2}\") format('woff2')` : \"\"\n }${!!font.urlWoff && !!font?.urlWoff2 ? \", \" : \"\"}\n ${font?.urlWoff ? `url(\"${font.urlWoff}\") format('woff')` : \"\"};\n font-weight: ${font?.fontWeight};\n font-style: normal;\n font-display: fallback;\n }\n `,\n )\n .join(\"\");\n\nexport const GlobalStyle = withTheme(createGlobalStyle`\n ${(props) => {\n const theme = {\n ...defaultTheme,\n ...props.theme,\n };\n return `\n ${buildCustomFonts(theme.typography.customFonts)}\n html {\n font-size: ${theme.typography.fontSizeBase};\n font-family: ${theme.typography.fontFamilyBase};\n line-height: ${theme.typography.lineHeight};\n }\n body {\n background-color: ${theme.colors.backgroundMidLight};\n color: ${theme.colors.textDark};\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n `;\n }}\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n`);\n\nGlobalStyle.defaultProps = {\n theme: defaultTheme,\n};\n\nexport default GlobalStyle;\n"],"names":["GlobalStyle","withTheme","createGlobalStyle","templateObject_1","__makeTemplateObject","props","customFonts","theme","defaultTheme","typography","map","font","concat","family","urlWoff2","urlWoff","fontWeight","join","fontSizeBase","fontFamilyBase","lineHeight","colors","backgroundMidLight","textDark","defaultProps"],"mappings":"8MAKA,MAkBaA,EAAcC,EAAUC,EAAiBC,IAAAA,EAAAC,EAAA,CAAA,OAAA,4sBAAA,CAAA,OAwBnD,+sBAvBC,SAACC,GACD,IApBsBC,EAoBhBC,SACDC,GACAH,EAAME,OAEX,MAAO,mBAxBeD,EAyBDC,EAAME,WAAWH,YAxBxCA,EACGI,KACC,SAACC,GAAS,MAAA,kDAAAC,OAESD,EAAKE,qCAElBF,aAAI,EAAJA,EAAMG,UAAW,QAAQF,OAAAD,EAAKG,SAAQ,uBAAuB,IAC5DF,OAAED,EAAKI,UAAaJ,aAAI,EAAJA,EAAMG,UAAW,KAAO,GAC7C,gBAAAF,QAAAD,eAAAA,EAAMI,SAAU,QAAAH,OAAQD,EAAKI,8BAA6B,GAAE,8BAAAH,OAC/CD,eAAAA,EAAMK,WAIxB,yFAAA,IAEFC,KAAK,KAWW,uCAAAL,OAAAL,EAAME,WAAWS,aACf,4BAAAN,OAAAL,EAAME,WAAWU,eAAc,4BAAAP,OAC/BL,EAAME,WAAWW,WAAU,wDAAAR,OAGtBL,EAAMc,OAAOC,gDACxBf,EAAMc,OAAOE,sNAS5B,KAqCFvB,EAAYwB,aAAe,CACzBjB,MAAOC"}
1
+ {"version":3,"file":"GlobalStyle.js","sources":["../../../src/components/GlobalStyle.tsx"],"sourcesContent":["import { createGlobalStyle, withTheme } from \"styled-components\";\nimport { type CustomFontType } from \"../types\";\nimport { crukTheme as defaultTheme } from \"../themes/cruk\";\n\n// font-display fall back to stop font's flickering on SSR rehydration\nconst buildCustomFonts = (customFonts: CustomFontType[]) =>\n customFonts\n .map(\n (font) => `\n @font-face {\n font-family: ${font.family};\n src: ${\n font?.urlWoff2 ? `url(\"${font.urlWoff2}\") format('woff2')` : \"\"\n }${!!font.urlWoff && !!font?.urlWoff2 ? \", \" : \"\"}\n ${font?.urlWoff ? `url(\"${font.urlWoff}\") format('woff')` : \"\"};\n font-weight: ${font?.fontWeight};\n font-style: normal;\n font-display: fallback;\n }\n `,\n )\n .join(\"\");\n\nexport const GlobalStyle = withTheme(createGlobalStyle`\n ${(props) => {\n const theme = {\n ...defaultTheme,\n ...props.theme,\n };\n return `\n ${buildCustomFonts(theme.typography.customFonts)}\n html {\n font-size: ${theme.typography.fontSizeBase};\n font-family: ${theme.typography.fontFamilyBase};\n line-height: ${theme.typography.lineHeight};\n }\n body {\n background-color: ${theme.colors.backgroundMidLight};\n color: ${theme.colors.textDark};\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n `;\n }}\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n`);\n\nexport default GlobalStyle;\n"],"names":["GlobalStyle","withTheme","createGlobalStyle","props","theme","defaultTheme","customFonts","typography","map","font","family","urlWoff2","urlWoff","fontWeight","join","fontSizeBase","fontFamilyBase","lineHeight","colors","backgroundMidLight","textDark"],"mappings":"mHAKA,MAkBaA,EAAcC,EAAUC,CAAiB;IACjDC,IACD,MAAMC,EAAQ,IACTC,KACAF,EAAMC,OAEX,MAAO,WAxBeE,EAyBDF,EAAMG,WAAWD,YAxBxCA,EACGE,KACEC,GAAS,kDAESA,EAAKC,2BAElBD,GAAME,SAAW,QAAQF,EAAKE,6BAA+B,KAC1DF,EAAKG,SAAaH,GAAME,SAAW,KAAO,iBAC7CF,GAAMG,QAAU,QAAQH,EAAKG,2BAA6B,+BAC7CH,GAAMI,qGAM1BC,KAAK,yCAWWV,EAAMG,WAAWQ,uCACfX,EAAMG,WAAWS,yCACjBZ,EAAMG,WAAWU,iEAGZb,EAAMc,OAAOC,uCACxBf,EAAMc,OAAOE,qNAjCL,IAACd,CAyCrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare const GlobalStyleNoFontFace: import("react").ForwardRefExoticComponent<Omit<JSX.LibraryManagedAttributes<T, import("styled-components").ExecutionProps>, "ref"> & import("react").RefAttributes<import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>>> & {};
2
+ export default GlobalStyleNoFontFace;
@@ -1,2 +1,38 @@
1
- import{__makeTemplateObject as n,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{withTheme as t,createGlobalStyle as e}from"styled-components";import{crukTheme as i}from"../themes/cruk.js";var r,a=t(e(r||(r=n(["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"],["\n ","\n *, *:after, *:before {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n \n @media (prefers-reduced-motion: reduce) {\n *, *:after, *:before {\n animation-play-state: paused !important;\n animation-direction: reverse !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n }\n\n table, td, th {\n border-spacing: 0;\n border: 1px solid #ccc;\n padding: 10px;\n }\n .no-focus-outline a:focus,\n .no-focus-outline button:focus {\n outline: none;\n }\n img {\n width: 100%;\n height: auto;\n }\n section {\n width: 100%;\n }\n button {\n font-size: 1em;\n }\n"])),(function(n){var t=o(o({},i),n.theme);return"\n html {\n font-size: ".concat(t.typography.fontSizeBase,";\n font-family: ").concat(t.typography.fontFamilyBase,";\n line-height: ").concat(t.typography.lineHeight,";\n }\n body {\n background-color: ").concat(t.colors.backgroundMidLight,";\n color: ").concat(t.colors.textDark,";\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n ")})));a.defaultProps={theme:i};export{a as GlobalStyleNoFontFace,a as default};
1
+ import{withTheme as o,createGlobalStyle as t}from"styled-components";import{crukTheme as e}from"../themes/cruk.js";const n=o(t`
2
+ ${o=>{const t={...e,...o.theme};return`\n html {\n font-size: ${t.typography.fontSizeBase};\n font-family: ${t.typography.fontFamilyBase};\n line-height: ${t.typography.lineHeight};\n }\n body {\n background-color: ${t.colors.backgroundMidLight};\n color: ${t.colors.textDark};\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: 100%;\n }\n `}}
3
+ *, *:after, *:before {
4
+ -webkit-box-sizing: border-box;
5
+ -moz-box-sizing: border-box;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ @media (prefers-reduced-motion: reduce) {
10
+ *, *:after, *:before {
11
+ animation-play-state: paused !important;
12
+ animation-direction: reverse !important;
13
+ transition: none !important;
14
+ scroll-behavior: auto !important;
15
+ }
16
+ }
17
+
18
+ table, td, th {
19
+ border-spacing: 0;
20
+ border: 1px solid #ccc;
21
+ padding: 10px;
22
+ }
23
+ .no-focus-outline a:focus,
24
+ .no-focus-outline button:focus {
25
+ outline: none;
26
+ }
27
+ img {
28
+ width: 100%;
29
+ height: auto;
30
+ }
31
+ section {
32
+ width: 100%;
33
+ }
34
+ button {
35
+ font-size: 1em;
36
+ }
37
+ `);export{n as GlobalStyleNoFontFace,n as default};
2
38
  //# sourceMappingURL=GlobalStyleNoFontFace.js.map