@cruk/cruk-react-components 6.0.3 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +5 -22
  2. package/lib/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  3. package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  4. package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
  5. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js +1 -1
  6. package/lib/node_modules/focus-lock/dist/es2015/focusInside.js.map +1 -1
  7. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js +1 -1
  8. package/lib/node_modules/focus-lock/dist/es2015/focusIsHidden.js.map +1 -1
  9. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js +1 -1
  10. package/lib/node_modules/focus-lock/dist/es2015/focusSolver.js.map +1 -1
  11. package/lib/node_modules/focus-lock/dist/es2015/focusables.js +1 -1
  12. package/lib/node_modules/focus-lock/dist/es2015/focusables.js.map +1 -1
  13. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js +1 -1
  14. package/lib/node_modules/focus-lock/dist/es2015/moveFocusInside.js.map +1 -1
  15. package/lib/node_modules/focus-lock/dist/es2015/return-focus.js.map +1 -1
  16. package/lib/node_modules/focus-lock/dist/es2015/sibling.js +1 -1
  17. package/lib/node_modules/focus-lock/dist/es2015/sibling.js.map +1 -1
  18. package/lib/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  19. package/lib/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  20. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  21. package/lib/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  22. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js +1 -1
  23. package/lib/node_modules/focus-lock/dist/es2015/utils/all-affected.js.map +1 -1
  24. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js +1 -1
  25. package/lib/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -1
  26. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js +1 -1
  27. package/lib/node_modules/focus-lock/dist/es2015/utils/correctFocus.js.map +1 -1
  28. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js +1 -1
  29. package/lib/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js.map +1 -1
  30. package/lib/node_modules/focus-lock/dist/es2015/utils/is.js.map +1 -1
  31. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js +1 -1
  32. package/lib/node_modules/focus-lock/dist/es2015/utils/parenting.js.map +1 -1
  33. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js +1 -1
  34. package/lib/node_modules/focus-lock/dist/es2015/utils/tabOrder.js.map +1 -1
  35. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js +1 -1
  36. package/lib/node_modules/focus-lock/dist/es2015/utils/tabUtils.js.map +1 -1
  37. package/lib/node_modules/react-clientside-effect/lib/index.es.js +1 -1
  38. package/lib/node_modules/react-clientside-effect/lib/index.es.js.map +1 -1
  39. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js +1 -1
  40. package/lib/node_modules/react-focus-lock/dist/es2015/Combination.js.map +1 -1
  41. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  42. package/lib/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  43. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js +1 -1
  44. package/lib/node_modules/react-focus-lock/dist/es2015/Trap.js.map +1 -1
  45. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js +1 -1
  46. package/lib/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
  47. package/lib/node_modules/react-intersection-observer/dist/index.js +1 -1
  48. package/lib/node_modules/react-intersection-observer/dist/index.js.map +1 -1
  49. package/lib/node_modules/tslib/tslib.es6.js.map +1 -1
  50. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  51. package/lib/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  52. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js +1 -1
  53. package/lib/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  54. package/lib/node_modules/use-sidecar/dist/es2015/medium.js +1 -1
  55. package/lib/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  56. package/lib/playwright/index.d.ts +1 -0
  57. package/lib/playwright/utils.d.ts +19 -0
  58. package/lib/playwright-ct.config.d.ts +2 -0
  59. package/lib/{components → src/components}/AddressLookup/AddressLookup.stories.d.ts +1 -1
  60. package/lib/src/components/AddressLookup/index.js +1 -1
  61. package/lib/src/components/AddressLookup/index.js.map +1 -1
  62. package/lib/src/components/AddressLookup/styles.js +1 -1
  63. package/lib/src/components/AddressLookup/styles.js.map +1 -1
  64. package/lib/{components → src/components}/Avatar/Avatar.stories.d.ts +1 -1
  65. package/lib/src/components/Avatar/index.js.map +1 -1
  66. package/lib/src/components/Avatar/styles.js +1 -1
  67. package/lib/src/components/Avatar/styles.js.map +1 -1
  68. package/lib/{components → src/components}/Badge/Badge.stories.d.ts +1 -1
  69. package/lib/src/components/Badge/index.js.map +1 -1
  70. package/lib/src/components/Badge/styles.js +1 -1
  71. package/lib/src/components/Badge/styles.js.map +1 -1
  72. package/lib/{components → src/components}/Box/Box.stories.d.ts +1 -1
  73. package/lib/src/components/Box/index.js.map +1 -1
  74. package/lib/src/components/Box/styles.js +1 -1
  75. package/lib/src/components/Box/styles.js.map +1 -1
  76. package/lib/{components → src/components}/Button/Button.stories.d.ts +1 -1
  77. package/lib/src/components/Button/index.js +1 -1
  78. package/lib/src/components/Button/index.js.map +1 -1
  79. package/lib/src/components/Button/styles.js +1 -1
  80. package/lib/src/components/Button/styles.js.map +1 -1
  81. package/lib/{components → src/components}/Carousel/Carousel.stories.d.ts +1 -1
  82. package/lib/src/components/Carousel/Dots.js +1 -1
  83. package/lib/src/components/Carousel/Dots.js.map +1 -1
  84. package/lib/src/components/Carousel/index.js +1 -1
  85. package/lib/src/components/Carousel/index.js.map +1 -1
  86. package/lib/src/components/Carousel/styles.js +1 -1
  87. package/lib/src/components/Carousel/styles.js.map +1 -1
  88. package/lib/{components → src/components}/Checkbox/Checkbox.stories.d.ts +1 -1
  89. package/lib/src/components/Checkbox/index.js.map +1 -1
  90. package/lib/src/components/Checkbox/styles.js +1 -1
  91. package/lib/src/components/Checkbox/styles.js.map +1 -1
  92. package/lib/{components → src/components}/Collapse/Collapse.stories.d.ts +1 -1
  93. package/lib/src/components/Collapse/index.js +1 -1
  94. package/lib/src/components/Collapse/index.js.map +1 -1
  95. package/lib/src/components/Collapse/styles.js +1 -1
  96. package/lib/src/components/Collapse/styles.js.map +1 -1
  97. package/lib/{components → src/components}/DateField/DateField.stories.d.ts +1 -1
  98. package/lib/src/components/DateField/index.js +1 -1
  99. package/lib/src/components/DateField/index.js.map +1 -1
  100. package/lib/src/components/DateField/styles.js +1 -1
  101. package/lib/src/components/DateField/styles.js.map +1 -1
  102. package/lib/src/components/Divider.js.map +1 -1
  103. package/lib/{components → src/components}/ErrorText/ErrorText.stories.d.ts +1 -1
  104. package/lib/src/components/ErrorText/index.js.map +1 -1
  105. package/lib/src/components/ErrorText/styles.js +1 -1
  106. package/lib/src/components/ErrorText/styles.js.map +1 -1
  107. package/lib/src/components/Flex.js +1 -1
  108. package/lib/src/components/Flex.js.map +1 -1
  109. package/lib/src/components/Fontface.js +1 -1
  110. package/lib/src/components/Fontface.js.map +1 -1
  111. package/lib/{components → src/components}/Footer/Footer.stories.d.ts +1 -1
  112. package/lib/src/components/Footer/index.js +1 -1
  113. package/lib/src/components/Footer/index.js.map +1 -1
  114. package/lib/src/components/Footer/styles.js +1 -1
  115. package/lib/src/components/Footer/styles.js.map +1 -1
  116. package/lib/src/components/GlobalStyle.d.ts +2 -0
  117. package/lib/src/components/GlobalStyle.js +1 -1
  118. package/lib/src/components/GlobalStyle.js.map +1 -1
  119. package/lib/src/components/GlobalStyleNoFontFace.d.ts +2 -0
  120. package/lib/src/components/GlobalStyleNoFontFace.js +1 -1
  121. package/lib/src/components/GlobalStyleNoFontFace.js.map +1 -1
  122. package/lib/{components → src/components}/Header/Header.stories.d.ts +1 -1
  123. package/lib/src/components/Header/index.js +1 -1
  124. package/lib/src/components/Header/index.js.map +1 -1
  125. package/lib/src/components/Header/styles.js +1 -1
  126. package/lib/src/components/Header/styles.js.map +1 -1
  127. package/lib/{components → src/components}/Heading/Heading.stories.d.ts +1 -1
  128. package/lib/src/components/Heading/index.js.map +1 -1
  129. package/lib/src/components/Heading/styles.js +1 -1
  130. package/lib/src/components/Heading/styles.js.map +1 -1
  131. package/lib/{components → src/components}/IconFa/IconFa.stories.d.ts +1 -1
  132. package/lib/src/components/IconFa/index.js.map +1 -1
  133. package/lib/src/components/IconFa/styles.js +1 -1
  134. package/lib/src/components/IconFa/styles.js.map +1 -1
  135. package/lib/{components → src/components}/InfoBox/InfoBox.stories.d.ts +1 -1
  136. package/lib/src/components/InfoBox/index.js.map +1 -1
  137. package/lib/src/components/InfoBox/styles.js +1 -1
  138. package/lib/src/components/InfoBox/styles.js.map +1 -1
  139. package/lib/{components → src/components}/LabelWrapper/index.d.ts +4 -4
  140. package/lib/src/components/LabelWrapper/index.js +1 -1
  141. package/lib/src/components/LabelWrapper/index.js.map +1 -1
  142. package/lib/{components → src/components}/LabelWrapper/styles.d.ts +1 -1
  143. package/lib/src/components/LabelWrapper/styles.js +1 -1
  144. package/lib/src/components/LabelWrapper/styles.js.map +1 -1
  145. package/lib/{components → src/components}/LegendWrapper/LegendWrapper.stories.d.ts +1 -1
  146. package/lib/{components → src/components}/LegendWrapper/index.d.ts +1 -1
  147. package/lib/src/components/LegendWrapper/index.js +1 -1
  148. package/lib/src/components/LegendWrapper/index.js.map +1 -1
  149. package/lib/src/components/LegendWrapper/styles.js +1 -1
  150. package/lib/src/components/LegendWrapper/styles.js.map +1 -1
  151. package/lib/{components → src/components}/Link/Link.stories.d.ts +1 -1
  152. package/lib/src/components/Link/index.js.map +1 -1
  153. package/lib/src/components/Link/styles.js +1 -1
  154. package/lib/src/components/Link/styles.js.map +1 -1
  155. package/lib/{components → src/components}/Loader/Loader.stories.d.ts +1 -1
  156. package/lib/src/components/Loader/index.js.map +1 -1
  157. package/lib/src/components/Loader/styles.js +1 -1
  158. package/lib/src/components/Loader/styles.js.map +1 -1
  159. package/lib/{components → src/components}/Modal/Modal.stories.d.ts +1 -1
  160. package/lib/src/components/Modal/TestModalWithContent.d.ts +2 -0
  161. package/lib/src/components/Modal/TestModalWithState.d.ts +2 -0
  162. package/lib/src/components/Modal/index.js +1 -1
  163. package/lib/src/components/Modal/index.js.map +1 -1
  164. package/lib/src/components/Modal/styles.js +1 -1
  165. package/lib/src/components/Modal/styles.js.map +1 -1
  166. package/lib/{components → src/components}/Pagination/Pagination.stories.d.ts +1 -1
  167. package/lib/src/components/Pagination/index.js.map +1 -1
  168. package/lib/src/components/Pagination/styles.js +1 -1
  169. package/lib/src/components/Pagination/styles.js.map +1 -1
  170. package/lib/{components → src/components}/PopOver/Popover.stories.d.ts +1 -1
  171. package/lib/src/components/PopOver/TestPopOverWithContent.d.ts +2 -0
  172. package/lib/src/components/PopOver/index.js +1 -1
  173. package/lib/src/components/PopOver/index.js.map +1 -1
  174. package/lib/src/components/PopOver/styles.js +1 -1
  175. package/lib/src/components/PopOver/styles.js.map +1 -1
  176. package/lib/{components → src/components}/ProgressBar/ProgressBar.stories.d.ts +1 -1
  177. package/lib/src/components/ProgressBar/index.js.map +1 -1
  178. package/lib/src/components/ProgressBar/styles.js +1 -1
  179. package/lib/src/components/ProgressBar/styles.js.map +1 -1
  180. package/lib/{components → src/components}/Radio/Radio.stories.d.ts +1 -1
  181. package/lib/src/components/Radio/index.js.map +1 -1
  182. package/lib/src/components/Radio/styles.js +1 -1
  183. package/lib/src/components/Radio/styles.js.map +1 -1
  184. package/lib/{components → src/components}/RadioConsent/Radio.stories.d.ts +1 -1
  185. package/lib/src/components/RadioConsent/index.js +1 -1
  186. package/lib/src/components/RadioConsent/index.js.map +1 -1
  187. package/lib/src/components/RadioConsent/styles.js +1 -1
  188. package/lib/src/components/RadioConsent/styles.js.map +1 -1
  189. package/lib/{components → src/components}/Select/Selelct.stories.d.ts +2 -2
  190. package/lib/{components → src/components}/Select/index.d.ts +3 -3
  191. package/lib/src/components/Select/index.js +1 -1
  192. package/lib/src/components/Select/index.js.map +1 -1
  193. package/lib/src/components/Select/styles.js +1 -1
  194. package/lib/src/components/Select/styles.js.map +1 -1
  195. package/lib/src/components/Spacing/index.js.map +1 -1
  196. package/lib/{components → src/components}/Step/Step.stories.d.ts +1 -1
  197. package/lib/src/components/Step/index.js +1 -1
  198. package/lib/src/components/Step/index.js.map +1 -1
  199. package/lib/src/components/Step/styles.js +1 -1
  200. package/lib/src/components/Step/styles.js.map +1 -1
  201. package/lib/{components → src/components}/Text/Text.stories.d.ts +1 -1
  202. package/lib/src/components/Text/index.js.map +1 -1
  203. package/lib/src/components/Text/styles.js +1 -1
  204. package/lib/src/components/Text/styles.js.map +1 -1
  205. package/lib/{components → src/components}/TextAreaField/TextAreaField.stories.d.ts +1 -1
  206. package/lib/src/components/TextAreaField/index.js.map +1 -1
  207. package/lib/src/components/TextAreaField/styles.js +1 -1
  208. package/lib/src/components/TextAreaField/styles.js.map +1 -1
  209. package/lib/{components → src/components}/TextField/TextField.stories.d.ts +2 -2
  210. package/lib/{components → src/components}/TextField/index.d.ts +3 -3
  211. package/lib/src/components/TextField/index.js +1 -1
  212. package/lib/src/components/TextField/index.js.map +1 -1
  213. package/lib/src/components/TextField/styles.js +1 -1
  214. package/lib/src/components/TextField/styles.js.map +1 -1
  215. package/lib/src/components/ThemeCheatSheet.d.ts +7 -0
  216. package/lib/{components → src/components}/Totaliser/Totaliser.stories.d.ts +1 -1
  217. package/lib/src/components/Totaliser/index.js.map +1 -1
  218. package/lib/src/components/Totaliser/styles.js +1 -1
  219. package/lib/src/components/Totaliser/styles.js.map +1 -1
  220. package/lib/{components → src/components}/UserBlock/UserBlock.stories.d.ts +1 -1
  221. package/lib/src/components/UserBlock/index.js.map +1 -1
  222. package/lib/src/components/UserBlock/styles.js +1 -1
  223. package/lib/src/components/UserBlock/styles.js.map +1 -1
  224. package/lib/src/hooks/useEffectBrowser.js +1 -1
  225. package/lib/src/hooks/useEffectBrowser.js.map +1 -1
  226. package/lib/src/hooks/useKey.js +1 -1
  227. package/lib/src/hooks/useKey.js.map +1 -1
  228. package/lib/src/hooks/useLayoutEffectBrowser.js +1 -1
  229. package/lib/src/hooks/useLayoutEffectBrowser.js.map +1 -1
  230. package/lib/src/hooks/useScrollPosition.js +1 -1
  231. package/lib/src/hooks/useScrollPosition.js.map +1 -1
  232. package/lib/src/themes/bowelbabe.js.map +1 -1
  233. package/lib/src/themes/cruk.js.map +1 -1
  234. package/lib/src/themes/rfl.js.map +1 -1
  235. package/lib/src/themes/su2c.js +1 -1
  236. package/lib/src/themes/su2c.js.map +1 -1
  237. package/lib/src/utils/Helper.js +1 -1
  238. package/lib/src/utils/Helper.js.map +1 -1
  239. package/lib/src/utils/debounce.js +1 -1
  240. package/lib/src/utils/debounce.js.map +1 -1
  241. package/lib/src/utils/themeUtils.js.map +1 -1
  242. package/lib/vite.config.d.ts +2 -0
  243. package/package.json +26 -47
  244. package/lib/components/GlobalStyle.d.ts +0 -2
  245. package/lib/components/GlobalStyleNoFontFace.d.ts +0 -2
  246. package/lib/components/ThemeCheatSheet.d.ts +0 -7
  247. /package/lib/{components/AddressLookup/AddressLookUp.test.cypress.d.ts → src/components/AddressLookup/AddressLookup.spec.d.ts} +0 -0
  248. /package/lib/{components → src/components}/AddressLookup/index.d.ts +0 -0
  249. /package/lib/{components → src/components}/AddressLookup/styles.d.ts +0 -0
  250. /package/lib/{components → src/components}/AllThemesWrapper.d.ts +0 -0
  251. /package/lib/{components/Avatar/Avatar.test.cypress.d.ts → src/components/Avatar/Avatar.spec.d.ts} +0 -0
  252. /package/lib/{components → src/components}/Avatar/index.d.ts +0 -0
  253. /package/lib/{components → src/components}/Avatar/styles.d.ts +0 -0
  254. /package/lib/{components/Badge/Badge.test.cypress.d.ts → src/components/Badge/Badge.spec.d.ts} +0 -0
  255. /package/lib/{components → src/components}/Badge/index.d.ts +0 -0
  256. /package/lib/{components → src/components}/Badge/styles.d.ts +0 -0
  257. /package/lib/{components/Box/Box.test.cypress.d.ts → src/components/Box/Box.spec.d.ts} +0 -0
  258. /package/lib/{components → src/components}/Box/index.d.ts +0 -0
  259. /package/lib/{components → src/components}/Box/styles.d.ts +0 -0
  260. /package/lib/{components/Button/Button.test.cypress.d.ts → src/components/Button/Button.spec.d.ts} +0 -0
  261. /package/lib/{components → src/components}/Button/index.d.ts +0 -0
  262. /package/lib/{components → src/components}/Button/styles.d.ts +0 -0
  263. /package/lib/{components/Carousel/Carousel.test.cypress.d.ts → src/components/Carousel/Carousel.spec.d.ts} +0 -0
  264. /package/lib/{components → src/components}/Carousel/Dots.d.ts +0 -0
  265. /package/lib/{components → src/components}/Carousel/index.d.ts +0 -0
  266. /package/lib/{components → src/components}/Carousel/styles.d.ts +0 -0
  267. /package/lib/{components/Checkbox/CheckBox.test.cypress.d.ts → src/components/Checkbox/Checkbox.spec.d.ts} +0 -0
  268. /package/lib/{components → src/components}/Checkbox/index.d.ts +0 -0
  269. /package/lib/{components → src/components}/Checkbox/styles.d.ts +0 -0
  270. /package/lib/{components/Collapse/Collapse.test.cypress.d.ts → src/components/Collapse/Collapse.spec.d.ts} +0 -0
  271. /package/lib/{components → src/components}/Collapse/index.d.ts +0 -0
  272. /package/lib/{components → src/components}/Collapse/styles.d.ts +0 -0
  273. /package/lib/{components/DateField/DateField.test.cypress.d.ts → src/components/DateField/DateField.spec.d.ts} +0 -0
  274. /package/lib/{components → src/components}/DateField/index.d.ts +0 -0
  275. /package/lib/{components → src/components}/DateField/styles.d.ts +0 -0
  276. /package/lib/{components → src/components}/Divider.d.ts +0 -0
  277. /package/lib/{components/ErrorText/ErrorText.test.cypress.d.ts → src/components/ErrorText/ErrorText.spec.d.ts} +0 -0
  278. /package/lib/{components → src/components}/ErrorText/index.d.ts +0 -0
  279. /package/lib/{components → src/components}/ErrorText/styles.d.ts +0 -0
  280. /package/lib/{components → src/components}/Flex.d.ts +0 -0
  281. /package/lib/{components → src/components}/Fontface.d.ts +0 -0
  282. /package/lib/{components/Footer/Footer.test.cypress.d.ts → src/components/Footer/Footer.spec.d.ts} +0 -0
  283. /package/lib/{components → src/components}/Footer/index.d.ts +0 -0
  284. /package/lib/{components → src/components}/Footer/styles.d.ts +0 -0
  285. /package/lib/{components/Header/Header.test.cypress.d.ts → src/components/Header/Header.spec.d.ts} +0 -0
  286. /package/lib/{components → src/components}/Header/index.d.ts +0 -0
  287. /package/lib/{components → src/components}/Header/styles.d.ts +0 -0
  288. /package/lib/{components/Heading/Heading.test.cypress.d.ts → src/components/Heading/Heading.spec.d.ts} +0 -0
  289. /package/lib/{components → src/components}/Heading/index.d.ts +0 -0
  290. /package/lib/{components → src/components}/Heading/styles.d.ts +0 -0
  291. /package/lib/{components/IconFa/IconFa.test.cypress.d.ts → src/components/IconFa/IconFa.spec.d.ts} +0 -0
  292. /package/lib/{components → src/components}/IconFa/index.d.ts +0 -0
  293. /package/lib/{components → src/components}/IconFa/styles.d.ts +0 -0
  294. /package/lib/{components/InfoBox/InfoBox.test.cypress.d.ts → src/components/InfoBox/InfoBox.spec.d.ts} +0 -0
  295. /package/lib/{components → src/components}/InfoBox/index.d.ts +0 -0
  296. /package/lib/{components → src/components}/InfoBox/styles.d.ts +0 -0
  297. /package/lib/{components/LegendWrapper/LegendWrapper.test.cypress.d.ts → src/components/LegendWrapper/LegendWrapper.spec.d.ts} +0 -0
  298. /package/lib/{components → src/components}/LegendWrapper/styles.d.ts +0 -0
  299. /package/lib/{components/Link/Link.test.cypress.d.ts → src/components/Link/Link.spec.d.ts} +0 -0
  300. /package/lib/{components → src/components}/Link/index.d.ts +0 -0
  301. /package/lib/{components → src/components}/Link/styles.d.ts +0 -0
  302. /package/lib/{components/Loader/Loader.test.cypress.d.ts → src/components/Loader/Loader.spec.d.ts} +0 -0
  303. /package/lib/{components → src/components}/Loader/index.d.ts +0 -0
  304. /package/lib/{components → src/components}/Loader/styles.d.ts +0 -0
  305. /package/lib/{components/Modal/Modal.test.cypress.d.ts → src/components/Modal/Modal.spec.d.ts} +0 -0
  306. /package/lib/{components → src/components}/Modal/index.d.ts +0 -0
  307. /package/lib/{components → src/components}/Modal/styles.d.ts +0 -0
  308. /package/lib/{components/Pagination/Pagination.test.cypress.d.ts → src/components/Pagination/Pagination.spec.d.ts} +0 -0
  309. /package/lib/{components → src/components}/Pagination/index.d.ts +0 -0
  310. /package/lib/{components → src/components}/Pagination/styles.d.ts +0 -0
  311. /package/lib/{components/PopOver/PopOver.test.cypress.d.ts → src/components/PopOver/PopOver.spec.d.ts} +0 -0
  312. /package/lib/{components → src/components}/PopOver/index.d.ts +0 -0
  313. /package/lib/{components → src/components}/PopOver/styles.d.ts +0 -0
  314. /package/lib/{components/ProgressBar/ProgressBar.test.cypress.d.ts → src/components/ProgressBar/ProgressBar.spec.d.ts} +0 -0
  315. /package/lib/{components → src/components}/ProgressBar/index.d.ts +0 -0
  316. /package/lib/{components → src/components}/ProgressBar/styles.d.ts +0 -0
  317. /package/lib/{components/Radio/Radio.test.cypress.d.ts → src/components/Radio/Radio.spec.d.ts} +0 -0
  318. /package/lib/{components → src/components}/Radio/index.d.ts +0 -0
  319. /package/lib/{components → src/components}/Radio/styles.d.ts +0 -0
  320. /package/lib/{components/RadioConsent/RadioConsent.test.cypress.d.ts → src/components/RadioConsent/RadioConsent.spec.d.ts} +0 -0
  321. /package/lib/{components → src/components}/RadioConsent/index.d.ts +0 -0
  322. /package/lib/{components → src/components}/RadioConsent/styles.d.ts +0 -0
  323. /package/lib/{components/Select/Select.test.cypress.d.ts → src/components/Select/Select.spec.d.ts} +0 -0
  324. /package/lib/{components → src/components}/Select/styles.d.ts +0 -0
  325. /package/lib/{components → src/components}/Spacing/index.d.ts +0 -0
  326. /package/lib/{components/Step/Step.test.cypress.d.ts → src/components/Step/Step.spec.d.ts} +0 -0
  327. /package/lib/{components → src/components}/Step/index.d.ts +0 -0
  328. /package/lib/{components → src/components}/Step/styles.d.ts +0 -0
  329. /package/lib/{components/Text/Text.test.cypress.d.ts → src/components/Text/Text.spec.d.ts} +0 -0
  330. /package/lib/{components → src/components}/Text/index.d.ts +0 -0
  331. /package/lib/{components → src/components}/Text/styles.d.ts +0 -0
  332. /package/lib/{components/TextAreaField/TextAreaField.test.cypress.d.ts → src/components/TextAreaField/TextAreaField.spec.d.ts} +0 -0
  333. /package/lib/{components → src/components}/TextAreaField/index.d.ts +0 -0
  334. /package/lib/{components → src/components}/TextAreaField/styles.d.ts +0 -0
  335. /package/lib/{components/TextField/TextField.test.cypress.d.ts → src/components/TextField/TextField.spec.d.ts} +0 -0
  336. /package/lib/{components → src/components}/TextField/styles.d.ts +0 -0
  337. /package/lib/{components/Totaliser/Totaliser.test.cypress.d.ts → src/components/Totaliser/Totaliser.spec.d.ts} +0 -0
  338. /package/lib/{components → src/components}/Totaliser/index.d.ts +0 -0
  339. /package/lib/{components → src/components}/Totaliser/styles.d.ts +0 -0
  340. /package/lib/{components/UserBlock/UserBlock.test.cypress.d.ts → src/components/UserBlock/UserBlock.spec.d.ts} +0 -0
  341. /package/lib/{components → src/components}/UserBlock/index.d.ts +0 -0
  342. /package/lib/{components → src/components}/UserBlock/styles.d.ts +0 -0
  343. /package/lib/{components → src/components}/index.d.ts +0 -0
  344. /package/lib/{hooks → src/hooks}/useEffectBrowser.d.ts +0 -0
  345. /package/lib/{hooks → src/hooks}/useKey.d.ts +0 -0
  346. /package/lib/{hooks → src/hooks}/useLayoutEffectBrowser.d.ts +0 -0
  347. /package/lib/{hooks → src/hooks}/useScrollPosition.d.ts +0 -0
  348. /package/lib/{themes → src/themes}/bowelbabe.d.ts +0 -0
  349. /package/lib/{themes → src/themes}/cruk.d.ts +0 -0
  350. /package/lib/{themes → src/themes}/rfl.d.ts +0 -0
  351. /package/lib/{themes → src/themes}/su2c.d.ts +0 -0
  352. /package/lib/{types.d.ts → src/types.d.ts} +0 -0
  353. /package/lib/{utils → src/utils}/Helper.d.ts +0 -0
  354. /package/lib/{utils → src/utils}/__tests__/testHelpers.test.d.ts +0 -0
  355. /package/lib/{utils → src/utils}/debounce.d.ts +0 -0
  356. /package/lib/{utils → src/utils}/themeUtils.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import e from"styled-components";var o,t,r,i,a,s,l,c,d,p,h=e.div(o||(o=n(["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"],["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"]))),m=e.ul(t||(t=n(["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"],["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"])),(function(n){return n.$smoothScrolling?"smooth":"auto"})),u=e.li(r||(r=n(["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"],["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"])),(function(n){var e=n.$onlyChild,o=n.$fullWidthChild;return e||o?"100%":"80%"})),f=e.div(i||(i=n(["\n transition: transform 0.2s linear;\n transform: ",";\n"],["\n transition: transform 0.2s linear;\n transform: ",";\n"])),(function(n){var e=n.$isSelected,o=n.$shrinkUnselectedPages,t=n.$onlyChild,r=n.$fullWidthChild;return t||e&&o||r?"scale(1)":"scale(0.9)"})),g=e.div(a||(a=n(["\n display: flex;\n justify-content: center;\n"],["\n display: flex;\n justify-content: center;\n"]))),b=e.span(s||(s=n(["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"],["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"]))),x=e.button(l||(l=n(["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"],["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"])),(function(n){var e=n.disabled,o=n.theme;return e?o.colors.disabled:"su2c"===o.name?o.colors.textDark:o.colors.primary}),(function(n){return n.theme.fontSizes.xxxl}),(function(n){return n.disabled?"scale(0.8)":"scale(1)"})),w=e.div(c||(c=n(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"])),(function(n){return n.$count>6?"none":"flex"}),(function(n){return n.theme.breakpoint.tablet}),(function(n){return n.$count>10?"none":"flex"}),(function(n){return n.theme.breakpoint.desktop}),(function(n){return n.$count>20?"none":"flex"})),y=e.button(d||(d=n(["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"],["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"])),(function(n){return n.theme.spacing.xxs}),(function(n){var e=n.theme;return"auto ".concat(e.spacing.xxs)}),(function(n){return n.theme.fontSizes.l}),(function(n){return n.theme.fontSizes.l}),(function(n){var e=n.theme;return"solid 1px ".concat("su2c"===e.name?e.colors.textDark:e.colors.primary)}),(function(n){var e=n.theme;return n.$selected?"".concat("su2c"===e.name?e.colors.textDark:e.colors.primary):e.colors.backgroundLight})),v=e.span(p||(p=n(["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"],["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"])));export{g as ButtonWrapper,x as CarouselButton,u as CarouselCard,f as CarouselCardInner,m as CarouselScrollArea,h as CarouselWrapper,y as Dot,w as DotContainer,v as ScreenReaderOnly,b as VerticalAlign};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import e from"styled-components";var o,t,r,i,a,s,l,c,d,p,h=e.div(o||(o=n(["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"],["\n position: relative;\n width: 100%;\n overflow-y: hidden;\n"]))),m=e.ul(t||(t=n(["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"],["\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ",";\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n"])),function(n){return n.$smoothScrolling?"smooth":"auto"}),u=e.li(r||(r=n(["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"],["\n scroll-snap-align: center;\n display: inline-block;\n width: ",";\n"])),function(n){var e=n.$onlyChild,o=n.$fullWidthChild;return e||o?"100%":"80%"}),f=e.div(i||(i=n(["\n transition: transform 0.2s linear;\n transform: ",";\n"],["\n transition: transform 0.2s linear;\n transform: ",";\n"])),function(n){var e=n.$isSelected,o=n.$shrinkUnselectedPages,t=n.$onlyChild,r=n.$fullWidthChild;return t||e&&o||r?"scale(1)":"scale(0.9)"}),g=e.div(a||(a=n(["\n display: flex;\n justify-content: center;\n"],["\n display: flex;\n justify-content: center;\n"]))),b=e.span(s||(s=n(["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"],["\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n"]))),x=e.button(l||(l=n(["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"],["\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ",";\n font-size: ",";\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ",";\n }\n"])),function(n){var e=n.disabled,o=n.theme;return e?o.colors.disabled:"su2c"===o.name?o.colors.textDark:o.colors.primary},function(n){return n.theme.fontSizes.xxxl},function(n){return n.disabled?"scale(0.8)":"scale(1)"}),w=e.div(c||(c=n(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"],["\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ",";\n\n @media (min-width: ",") {\n display: ",";\n }\n\n @media (min-width: ",") {\n display: ",";\n }\n"])),function(n){return n.$count>6?"none":"flex"},function(n){return n.theme.breakpoint.tablet},function(n){return n.$count>10?"none":"flex"},function(n){return n.theme.breakpoint.desktop},function(n){return n.$count>20?"none":"flex"}),y=e.button(d||(d=n(["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"],["\n border: none;\n outline-offset: ",";\n padding: 0;\n margin: ",";\n width: ",";\n height: ",";\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ",";\n background-color: ",";\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n"])),function(n){return n.theme.spacing.xxs},function(n){var e=n.theme;return"auto ".concat(e.spacing.xxs)},function(n){return n.theme.fontSizes.l},function(n){return n.theme.fontSizes.l},function(n){var e=n.theme;return"solid 1px ".concat("su2c"===e.name?e.colors.textDark:e.colors.primary)},function(n){var e=n.theme;return n.$selected?"".concat("su2c"===e.name?e.colors.textDark:e.colors.primary):e.colors.backgroundLight}),v=e.span(p||(p=n(["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"],["\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n"])));export{g as ButtonWrapper,x as CarouselButton,u as CarouselCard,f as CarouselCardInner,m as CarouselScrollArea,h as CarouselWrapper,y as Dot,w as DotContainer,v as ScreenReaderOnly,b as VerticalAlign};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Carousel/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nexport const CarouselWrapper = styled.div`\n position: relative;\n width: 100%;\n overflow-y: hidden;\n`;\n\nexport const CarouselScrollArea = styled.ul<{\n $smoothScrolling: boolean;\n}>`\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ${({ $smoothScrolling }) =>\n $smoothScrolling ? \"smooth\" : \"auto\"};\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n`;\n\nexport const CarouselCard = styled.li<{\n $onlyChild: boolean;\n $fullWidthChild: boolean;\n}>`\n scroll-snap-align: center;\n display: inline-block;\n width: ${({ $onlyChild, $fullWidthChild }) =>\n $onlyChild || $fullWidthChild ? \"100%\" : \"80%\"};\n`;\n\nexport const CarouselCardInner = styled.div<{\n $isSelected: boolean;\n $shrinkUnselectedPages: boolean;\n $onlyChild: boolean;\n $fullWidthChild: boolean;\n}>`\n transition: transform 0.2s linear;\n transform: ${({\n $isSelected,\n $shrinkUnselectedPages,\n $onlyChild,\n $fullWidthChild,\n }) =>\n $onlyChild || ($isSelected && $shrinkUnselectedPages) || $fullWidthChild\n ? \"scale(1)\"\n : \"scale(0.9)\"};\n`;\n\nexport const ButtonWrapper = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nexport const VerticalAlign = styled.span`\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n`;\n\nexport const CarouselButton = styled.button<{\n disabled: boolean;\n theme: ThemeType;\n}>`\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ${({ disabled, theme }) =>\n disabled\n ? theme.colors.disabled\n : theme.name === \"su2c\"\n ? theme.colors.textDark\n : theme.colors.primary};\n font-size: ${({ theme }) => theme.fontSizes.xxxl};\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ${({ disabled }) => (disabled ? \"scale(0.8)\" : \"scale(1)\")};\n }\n`;\n\nexport const DotContainer = styled.div<{ $count: number; theme: ThemeType }>`\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ${({ $count }) => ($count > 6 ? \"none\" : \"flex\")};\n\n @media (min-width: ${({ theme }) => theme.breakpoint.tablet}) {\n display: ${({ $count }) => ($count > 10 ? \"none\" : \"flex\")};\n }\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n display: ${({ $count }) => ($count > 20 ? \"none\" : \"flex\")};\n }\n`;\n\nexport const Dot = styled.button<{ $selected: boolean; theme: ThemeType }>`\n border: none;\n outline-offset: ${({ theme }) => theme.spacing.xxs};\n padding: 0;\n margin: ${({ theme }) => `auto ${theme.spacing.xxs}`};\n width: ${({ theme }) => theme.fontSizes.l};\n height: ${({ theme }) => theme.fontSizes.l};\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ${({ theme }) =>\n `solid 1px ${\n theme.name === \"su2c\" ? theme.colors.textDark : theme.colors.primary\n }`};\n background-color: ${({ theme, $selected }) =>\n $selected\n ? `${\n theme.name === \"su2c\" ? theme.colors.textDark : theme.colors.primary\n }`\n : theme.colors.backgroundLight};\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n`;\n\n// TODO move to its own component\nexport const ScreenReaderOnly = styled.span`\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["CarouselWrapper","styled","div","templateObject_1","__makeTemplateObject","CarouselScrollArea","ul","templateObject_2","_a","$smoothScrolling","CarouselCard","li","templateObject_3","$onlyChild","$fullWidthChild","CarouselCardInner","templateObject_4","$isSelected","$shrinkUnselectedPages","ButtonWrapper","templateObject_5","VerticalAlign","span","templateObject_6","CarouselButton","button","templateObject_7","disabled","theme","colors","name","textDark","primary","fontSizes","xxxl","DotContainer","$count","breakpoint","tablet","desktop","Dot","templateObject_9","spacing","xxs","l","concat","$selected","backgroundLight","ScreenReaderOnly","templateObject_10"],"mappings":"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"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Carousel/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { type ThemeType } from \"../../types\";\n\nexport const CarouselWrapper = styled.div`\n position: relative;\n width: 100%;\n overflow-y: hidden;\n`;\n\nexport const CarouselScrollArea = styled.ul<{\n $smoothScrolling: boolean;\n}>`\n position: relative;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: ${({ $smoothScrolling }) =>\n $smoothScrolling ? \"smooth\" : \"auto\"};\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 20px;\n margin-bottom: -20px;\n height: 100%;\n`;\n\nexport const CarouselCard = styled.li<{\n $onlyChild: boolean;\n $fullWidthChild: boolean;\n}>`\n scroll-snap-align: center;\n display: inline-block;\n width: ${({ $onlyChild, $fullWidthChild }) =>\n $onlyChild || $fullWidthChild ? \"100%\" : \"80%\"};\n`;\n\nexport const CarouselCardInner = styled.div<{\n $isSelected: boolean;\n $shrinkUnselectedPages: boolean;\n $onlyChild: boolean;\n $fullWidthChild: boolean;\n}>`\n transition: transform 0.2s linear;\n transform: ${({\n $isSelected,\n $shrinkUnselectedPages,\n $onlyChild,\n $fullWidthChild,\n }) =>\n $onlyChild || ($isSelected && $shrinkUnselectedPages) || $fullWidthChild\n ? \"scale(1)\"\n : \"scale(0.9)\"};\n`;\n\nexport const ButtonWrapper = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nexport const VerticalAlign = styled.span`\n display: block;\n margin: auto;\n height: 2rem;\n line-height: 1.75rem;\n`;\n\nexport const CarouselButton = styled.button<{\n disabled: boolean;\n theme: ThemeType;\n}>`\n height: 100%;\n cursor: pointer;\n background-color: rgba(255, 255, 255, 0);\n border: none;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n color: ${({ disabled, theme }) =>\n disabled\n ? theme.colors.disabled\n : theme.name === \"su2c\"\n ? theme.colors.textDark\n : theme.colors.primary};\n font-size: ${({ theme }) => theme.fontSizes.xxxl};\n font-weight: 600;\n transition:\n color 0.3s ease,\n transform 0.3s ease;\n max-width: 3rem;\n padding: 0;\n vertical-align: middle;\n user-select: none;\n\n transform: scale(0.8);\n &:hover {\n transform: ${({ disabled }) => (disabled ? \"scale(0.8)\" : \"scale(1)\")};\n }\n`;\n\nexport const DotContainer = styled.div<{ $count: number; theme: ThemeType }>`\n display: flex;\n flex-direction: row;\n justify-content: center;\n display: ${({ $count }) => ($count > 6 ? \"none\" : \"flex\")};\n\n @media (min-width: ${({ theme }) => theme.breakpoint.tablet}) {\n display: ${({ $count }) => ($count > 10 ? \"none\" : \"flex\")};\n }\n\n @media (min-width: ${({ theme }) => theme.breakpoint.desktop}) {\n display: ${({ $count }) => ($count > 20 ? \"none\" : \"flex\")};\n }\n`;\n\nexport const Dot = styled.button<{ $selected: boolean; theme: ThemeType }>`\n border: none;\n outline-offset: ${({ theme }) => theme.spacing.xxs};\n padding: 0;\n margin: ${({ theme }) => `auto ${theme.spacing.xxs}`};\n width: ${({ theme }) => theme.fontSizes.l};\n height: ${({ theme }) => theme.fontSizes.l};\n border-radius: 50%;\n /* TODO if this makes it into the component library carouselButtonColor should be a theme prop */\n border: ${({ theme }) =>\n `solid 1px ${\n theme.name === \"su2c\" ? theme.colors.textDark : theme.colors.primary\n }`};\n background-color: ${({ theme, $selected }) =>\n $selected\n ? `${\n theme.name === \"su2c\" ? theme.colors.textDark : theme.colors.primary\n }`\n : theme.colors.backgroundLight};\n user-select: none;\n transition:\n background-color 0.3s ease,\n transform 0.3s ease;\n transform: scale(0.8);\n &:hover {\n transform: scale(1);\n }\n`;\n\n// TODO move to its own component\nexport const ScreenReaderOnly = styled.span`\n border: 0px;\n clip: rect(0px, 0px, 0px, 0px);\n height: 1px;\n margin-bottom: -1px;\n margin-right: -1px;\n overflow: hidden;\n padding: 0px;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`;\n"],"names":["CarouselWrapper","styled","div","templateObject_1","__makeTemplateObject","CarouselScrollArea","ul","templateObject_2","_a","$smoothScrolling","CarouselCard","li","templateObject_3","$onlyChild","$fullWidthChild","CarouselCardInner","templateObject_4","$isSelected","$shrinkUnselectedPages","ButtonWrapper","templateObject_5","VerticalAlign","span","templateObject_6","CarouselButton","button","templateObject_7","disabled","theme","colors","name","textDark","primary","fontSizes","xxxl","DotContainer","$count","breakpoint","tablet","desktop","Dot","templateObject_9","spacing","xxs","l","concat","$selected","backgroundLight","ScreenReaderOnly","templateObject_10"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type StoryObj } from "@storybook/react";
2
+ import { type StoryObj } from "@storybook/react-vite";
3
3
  import CheckBox, { type CheckBoxProps } from ".";
4
4
  declare const _default: {
5
5
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Checkbox/index.tsx"],"sourcesContent":["import React, {\n type InputHTMLAttributes,\n type Ref,\n type ReactNode,\n} from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { ErrorText } from \"../ErrorText\";\nimport { IconFa } from \"../IconFa\";\n\nimport {\n StyledLabel,\n StyledInput,\n CheckWrapper,\n Check,\n SelectedBorder,\n} from \"./styles\";\n\nexport type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {\n ref?: Ref<HTMLInputElement>;\n /** flag for error styling */\n hasError?: boolean;\n /** error message text */\n errorMessage?: string;\n children?: ReactNode;\n};\n\n/**\n * Checkboxes allow the user to select one or more items.\n *\n * The value or children becomes the label, if you want an outer label for a checkbox or group of checkboxes please use a LegendWrapper component\n */\nexport const Checkbox = (props: CheckBoxProps) => {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const { children, hasError, errorMessage, ref, ...rest } = props;\n\n return (\n <ThemeProvider theme={theme}>\n <StyledLabel\n $hasError={hasError || !!errorMessage || false}\n $checked={props.checked || props.defaultChecked || false}\n $disabled={props.disabled || false}\n >\n <StyledInput\n {...rest}\n disabled={props.disabled || false}\n type=\"checkbox\"\n ref={ref}\n aria-describedby={\n !!props.id && !!errorMessage ? `${props.id}-error` : undefined\n }\n />\n <SelectedBorder />\n {children || props.value}\n {theme.utilities.useDefaultFromControls ? null : (\n <CheckWrapper>\n <Check>\n <IconFa faIcon={faCheck} color=\"check\" size=\"1.25em\" />\n </Check>\n </CheckWrapper>\n )}\n </StyledLabel>\n {!!errorMessage && (\n <ErrorText\n marginTop=\"xxs\"\n id={props.id ? `${props.id}-error` : undefined}\n >\n {errorMessage}\n </ErrorText>\n )}\n </ThemeProvider>\n );\n};\n\nexport default Checkbox;\n"],"names":["Checkbox","props","foundTheme","useTheme","theme","__assign","defaultTheme","children","hasError","errorMessage","ref","rest","__rest","React","createElement","ThemeProvider","StyledLabel","$hasError","$checked","checked","defaultChecked","disabled","StyledInput","type","id","concat","undefined","SelectedBorder","value","utilities","useDefaultFromControls","CheckWrapper","Check","IconFa","faIcon","faCheck","color","size","ErrorText","marginTop"],"mappings":"2fAkCO,IAAMA,EAAW,SAACC,GACvB,IAAMC,EAAaC,IACbC,EACDC,EAAAA,EAAA,CAAA,EAAAC,GACAJ,GAGGK,EAAmDN,EAA3CM,SAAEC,EAAyCP,EAAKO,SAApCC,EAA+BR,eAAjBS,EAAiBT,EAAdS,IAAKC,EAAIC,EAAKX,EAArD,CAAkD,WAAA,WAAA,eAAA,QAExD,OACEY,EAACC,cAAAC,EAAc,CAAAX,MAAOA,GACpBS,EAACC,cAAAE,EACY,CAAAC,UAAAT,KAAcC,IAAgB,EAAKS,SACpCjB,EAAMkB,SAAWlB,EAAMmB,iBAAkB,YACxCnB,EAAMoB,WAAY,GAE7BR,EAAAC,cAACQ,EACKjB,EAAA,CAAA,EAAAM,GACJU,SAAUpB,EAAMoB,WAAY,EAC5BE,KAAK,WACLb,IAAKA,EAAG,mBAEJT,EAAMuB,IAAQf,EAAe,GAAGgB,OAAAxB,EAAMuB,GAAE,eAAWE,KAGzDb,EAAAC,cAACa,EAAiB,MACjBpB,GAAYN,EAAM2B,MAClBxB,EAAMyB,UAAUC,uBAAyB,KACxCjB,gBAACkB,EAAY,KACXlB,EAAAC,cAACkB,EAAK,KACJnB,EAAAC,cAACmB,EAAO,CAAAC,OAAQC,EAASC,MAAM,QAAQC,KAAK,gBAKjD5B,GACDI,gBAACyB,EAAS,CACRC,UAAU,MACVf,GAAIvB,EAAMuB,GAAK,GAAGC,OAAAxB,EAAMuB,kBAAaE,GAEpCjB,GAKX"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Checkbox/index.tsx"],"sourcesContent":["import React, {\n type InputHTMLAttributes,\n type Ref,\n type ReactNode,\n} from \"react\";\nimport { useTheme, ThemeProvider } from \"styled-components\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { ErrorText } from \"../ErrorText\";\nimport { IconFa } from \"../IconFa\";\n\nimport {\n StyledLabel,\n StyledInput,\n CheckWrapper,\n Check,\n SelectedBorder,\n} from \"./styles\";\n\nexport type CheckBoxProps = InputHTMLAttributes<HTMLInputElement> & {\n ref?: Ref<HTMLInputElement>;\n /** flag for error styling */\n hasError?: boolean;\n /** error message text */\n errorMessage?: string;\n children?: ReactNode;\n};\n\n/**\n * Checkboxes allow the user to select one or more items.\n *\n * The value or children becomes the label, if you want an outer label for a checkbox or group of checkboxes please use a LegendWrapper component\n */\nexport const Checkbox = (props: CheckBoxProps) => {\n const foundTheme = useTheme();\n const theme = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const { children, hasError, errorMessage, ref, ...rest } = props;\n\n return (\n <ThemeProvider theme={theme}>\n <StyledLabel\n $hasError={hasError || !!errorMessage || false}\n $checked={props.checked || props.defaultChecked || false}\n $disabled={props.disabled || false}\n >\n <StyledInput\n {...rest}\n disabled={props.disabled || false}\n type=\"checkbox\"\n ref={ref}\n aria-describedby={\n !!props.id && !!errorMessage ? `${props.id}-error` : undefined\n }\n />\n <SelectedBorder />\n {children || props.value}\n {theme.utilities.useDefaultFromControls ? null : (\n <CheckWrapper>\n <Check>\n <IconFa faIcon={faCheck} color=\"check\" size=\"1.25em\" />\n </Check>\n </CheckWrapper>\n )}\n </StyledLabel>\n {!!errorMessage && (\n <ErrorText\n marginTop=\"xxs\"\n id={props.id ? `${props.id}-error` : undefined}\n >\n {errorMessage}\n </ErrorText>\n )}\n </ThemeProvider>\n );\n};\n\nexport default Checkbox;\n"],"names":["Checkbox","props","foundTheme","useTheme","theme","__assign","defaultTheme","children","hasError","errorMessage","ref","rest","__rest","React","createElement","ThemeProvider","StyledLabel","$hasError","$checked","checked","defaultChecked","disabled","StyledInput","type","id","concat","undefined","SelectedBorder","value","utilities","useDefaultFromControls","CheckWrapper","Check","IconFa","faIcon","faCheck","color","size","ErrorText","marginTop"],"mappings":"2fAkCO,IAAMA,EAAW,SAACC,GACvB,IAAMC,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGGK,EAAmDN,EAAKM,SAA9CC,EAAyCP,EAAKO,SAApCC,EAA+BR,eAAjBS,EAAiBT,EAAKS,IAAdC,EAAIC,EAAKX,EAArD,CAAA,WAAA,WAAA,eAAA,QAEN,OACEY,EAAAC,cAACC,EAAa,CAACX,MAAOA,GACpBS,EAAAC,cAACE,EAAW,CAAAC,UACCT,KAAcC,IAAgB,EAAKS,SACpCjB,EAAMkB,SAAWlB,EAAMmB,iBAAkB,YACxCnB,EAAMoB,WAAY,GAE7BR,EAAAC,cAACQ,EAAWjB,EAAA,CAAA,EACNM,GACJU,SAAUpB,EAAMoB,WAAY,EAC5BE,KAAK,WACLb,IAAKA,EAAG,mBAEJT,EAAMuB,IAAQf,EAAe,GAAAgB,OAAGxB,EAAMuB,GAAE,eAAWE,KAGzDb,EAAAC,cAACa,EAAc,MACdpB,GAAYN,EAAM2B,MAClBxB,EAAMyB,UAAUC,uBAAyB,KACxCjB,gBAACkB,EAAY,KACXlB,EAAAC,cAACkB,EAAK,KACJnB,EAAAC,cAACmB,EAAM,CAACC,OAAQC,EAASC,MAAM,QAAQC,KAAK,gBAKjD5B,GACDI,gBAACyB,EAAS,CACRC,UAAU,MACVf,GAAIvB,EAAMuB,GAAK,GAAAC,OAAGxB,EAAMuB,kBAAaE,GAEpCjB,GAKX"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as t}from"styled-components";var i,e,r,s,a,l,c,d,p="1.5rem",h=o.div(i||(i=n(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),p,p,p,(function(n){return n.theme.spacing.xs})),u=o.span(e||(e=n(["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),(function(n){return n.theme.colors.selectionBorder}),p,p),b=o.label(s||(s=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"])),(function(n){return n.theme.typography.lineHeight}),(function(n){return n.theme.typography.fontSizeBase}),(function(n){return n.theme.typography.fontFamilyBase}),(function(n){return n.theme.colors.backgroundLight}),(function(n){return n.$disabled?"not-allowed":"pointer"}),(function(n){var o=n.theme;return n.$disabled?o.colors.disabled:o.colors.textDark}),(function(n){var o=n.theme;return"calc( (".concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m," calc( (").concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.xl)}),h,u,(function(n){var o=n.theme;return n.$disabled&&o.colors.disabled}),(function(o){var i=o.theme,e=o.$disabled,s=o.$checked,a=o.$hasError;return i.utilities.useDefaultFromControls?null:t(r||(r=n(["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ",";\n }\n "],["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ",";\n }\n "])),h,u,"2px",e?i.colors.disabled:a?i.colors.danger:s?i.colors.check:i.colors.inputBorder,h,u,"2px",e?i.colors.disabled:i.colours)})),f=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),g=o.input(d||(d=n(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),(function(o){var i=o.theme;return i.utilities.useDefaultFromControls?t(l||(l=n(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),i.spacing.s):t(c||(c=n(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),i.spacing.xxs,f,i.colors.inputBorder,h)}));export{u as Check,h as CheckWrapper,f as SelectedBorder,g as StyledInput,b as StyledLabel};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o,{css as t}from"styled-components";var i,e,r,s,a,l,c,d,p="1.5rem",h=o.div(i||(i=n(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),p,p,p,function(n){return n.theme.spacing.xs}),u=o.span(e||(e=n(["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 2px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),function(n){return n.theme.colors.selectionBorder},p,p),b=o.label(s||(s=n(["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"],["\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ",";\n font-size: ",";\n font-family: ",";\n\n background-color: ",";\n position: relative;\n\n cursor: ",";\n display: block;\n\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n ","\n"])),function(n){return n.theme.typography.lineHeight},function(n){return n.theme.typography.fontSizeBase},function(n){return n.theme.typography.fontFamilyBase},function(n){return n.theme.colors.backgroundLight},function(n){return n.$disabled?"not-allowed":"pointer"},function(n){var o=n.theme;return n.$disabled?o.colors.disabled:o.colors.textDark},function(n){var o=n.theme;return"calc( (".concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m," calc( (").concat("3em"," - ( ").concat(o.utilities.inputBorderWidth," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.xl)},h,u,function(n){var o=n.theme;return n.$disabled&&o.colors.disabled},function(o){var i=o.theme,e=o.$disabled,s=o.$checked,a=o.$hasError;return i.utilities.useDefaultFromControls?null:t(r||(r=n(["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ","\n "],["\n min-height: 2rem;\n\n "," "," {\n border: solid ","\n ",";\n }\n\n &:hover "," "," {\n border: solid ","\n ","\n "])),h,u,"2px",e?i.colors.disabled:a?i.colors.danger:s?i.colors.check:i.colors.inputBorder,h,u,"2px",e?i.colors.disabled:a?i.colors.danger:s?i.colors.check:i.colors.inputBorder)}),f=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),g=o.input(d||(d=n(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),function(o){var i=o.theme;return i.utilities.useDefaultFromControls?t(l||(l=n(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),i.spacing.s):t(c||(c=n(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),i.spacing.xxs,f,i.colors.inputBorder,h)});export{u as Check,h as CheckWrapper,f as SelectedBorder,g as StyledInput,b as StyledLabel};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Checkbox/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst CHECK_BOX_SIZE = \"1.5rem\";\nconst BUTTON_HEIGHT = \"3em\";\nconst BORDER_THICKNESS = \"2px\";\n\nexport const CheckWrapper = styled.div<{\n theme: ThemeType;\n}>`\n display: inline-block;\n height: ${CHECK_BOX_SIZE};\n width: ${CHECK_BOX_SIZE};\n position: absolute;\n top: calc(50% - (${CHECK_BOX_SIZE} / 2));\n left: ${({\n theme: {\n spacing: { xs },\n },\n }) => xs};\n`;\n\nexport const Check = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n position: relative;\n border: 2px solid ${({ theme }) => theme.colors.selectionBorder};\n height: ${CHECK_BOX_SIZE};\n width: ${CHECK_BOX_SIZE};\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n`;\n\nexport const StyledLabel = styled.label<{\n $checked: boolean;\n $disabled: boolean;\n $hasError: boolean;\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-size: ${({ theme }) => theme.typography.fontSizeBase};\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n position: relative;\n\n cursor: ${({ $disabled }) => ($disabled ? \"not-allowed\" : \"pointer\")};\n display: block;\n\n color: ${({ theme, $disabled }) =>\n $disabled ? theme.colors.disabled : theme.colors.textDark};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xl}`};\n &:focus ~ ${CheckWrapper} ${Check} {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ${({ theme, $disabled }) => $disabled && theme.colors.disabled};\n }\n }\n\n ${({ theme, $disabled, $checked, $hasError }) =>\n theme.utilities.useDefaultFromControls\n ? null\n : css`\n min-height: 2rem;\n\n ${CheckWrapper} ${Check} {\n border: solid ${BORDER_THICKNESS}\n ${$disabled\n ? theme.colors.disabled\n : $hasError\n ? theme.colors.danger\n : $checked\n ? theme.colors.check\n : theme.colors.inputBorder};\n }\n\n &:hover ${CheckWrapper} ${Check} {\n border: solid ${BORDER_THICKNESS}\n ${$disabled ? theme.colors.disabled : theme.colours};\n }\n `}\n`;\n\nexport const SelectedBorder = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n`;\n\n// TODO when we get rid of bootstrap remove !important.\nexport const StyledInput = styled.input<{\n theme: ThemeType;\n}>`\n margin-right: 5px !important;\n\n ${({ theme }) =>\n theme.utilities.useDefaultFromControls\n ? css`\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ${theme.spacing.s};\n `\n : css`\n /* This hides the original input */\n position: absolute;\n left: ${theme.spacing.xxs};\n opacity: 0;\n\n &:focus ~ ${SelectedBorder} {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ${theme.colors.inputBorder};\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ ${CheckWrapper} svg path {\n transform: rotateY(0deg);\n }\n `}\n`;\n"],"names":["CHECK_BOX_SIZE","CheckWrapper","styled","div","templateObject_1","__makeTemplateObject","_a","theme","spacing","xs","Check","span","templateObject_2","colors","selectionBorder","StyledLabel","label","templateObject_4","typography","lineHeight","fontSizeBase","fontFamilyBase","backgroundLight","$disabled","disabled","textDark","concat","utilities","inputBorderWidth","m","xl","$checked","$hasError","useDefaultFromControls","css","templateObject_3","danger","check","inputBorder","colours","SelectedBorder","templateObject_5","StyledInput","input","templateObject_8","templateObject_6","s","templateObject_7","xxs"],"mappings":"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"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Checkbox/styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { type ThemeType } from \"../../types\";\n\nconst CHECK_BOX_SIZE = \"1.5rem\";\nconst BUTTON_HEIGHT = \"3em\";\nconst BORDER_THICKNESS = \"2px\";\n\nexport const CheckWrapper = styled.div<{\n theme: ThemeType;\n}>`\n display: inline-block;\n height: ${CHECK_BOX_SIZE};\n width: ${CHECK_BOX_SIZE};\n position: absolute;\n top: calc(50% - (${CHECK_BOX_SIZE} / 2));\n left: ${({\n theme: {\n spacing: { xs },\n },\n }) => xs};\n`;\n\nexport const Check = styled.span<{\n theme: ThemeType;\n}>`\n display: block;\n position: relative;\n border: 2px solid ${({ theme }) => theme.colors.selectionBorder};\n height: ${CHECK_BOX_SIZE};\n width: ${CHECK_BOX_SIZE};\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n`;\n\nexport const StyledLabel = styled.label<{\n $checked: boolean;\n $disabled: boolean;\n $hasError: boolean;\n theme: ThemeType;\n}>`\n box-sizing: border-box;\n *,\n *:after,\n *:before {\n box-sizing: border-box;\n }\n line-height: ${({ theme }) => theme.typography.lineHeight};\n font-size: ${({ theme }) => theme.typography.fontSizeBase};\n font-family: ${({ theme }) => theme.typography.fontFamilyBase};\n\n background-color: ${({ theme }) => theme.colors.backgroundLight};\n position: relative;\n\n cursor: ${({ $disabled }) => ($disabled ? \"not-allowed\" : \"pointer\")};\n display: block;\n\n color: ${({ theme, $disabled }) =>\n $disabled ? theme.colors.disabled : theme.colors.textDark};\n padding: ${({ theme }) =>\n `calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.m} calc( (${BUTTON_HEIGHT} - ( ${theme.utilities.inputBorderWidth} * 2) - ${theme.typography.lineHeight} ) / 2) ${theme.spacing.xl}`};\n &:focus ~ ${CheckWrapper} ${Check} {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n svg {\n path {\n fill: ${({ theme, $disabled }) => $disabled && theme.colors.disabled};\n }\n }\n\n ${({ theme, $disabled, $checked, $hasError }) =>\n theme.utilities.useDefaultFromControls\n ? null\n : css`\n min-height: 2rem;\n\n ${CheckWrapper} ${Check} {\n border: solid ${BORDER_THICKNESS}\n ${\n $disabled\n ? theme.colors.disabled\n : $hasError\n ? theme.colors.danger\n : $checked\n ? theme.colors.check\n : theme.colors.inputBorder\n };\n }\n\n &:hover ${CheckWrapper} ${Check} {\n border: solid ${BORDER_THICKNESS}\n ${\n $disabled\n ? theme.colors.disabled\n : $hasError\n ? theme.colors.danger\n : $checked\n ? theme.colors.check\n : theme.colors.inputBorder\n }\n `}\n`;\n\nexport const SelectedBorder = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n`;\n\n// TODO when we get rid of bootstrap remove !important.\nexport const StyledInput = styled.input<{\n theme: ThemeType;\n}>`\n margin-right: 5px !important;\n\n ${({ theme }) =>\n theme.utilities.useDefaultFromControls\n ? css`\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ${theme.spacing.s};\n `\n : css`\n /* This hides the original input */\n position: absolute;\n left: ${theme.spacing.xxs};\n opacity: 0;\n\n &:focus ~ ${SelectedBorder} {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ${theme.colors.inputBorder};\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ ${CheckWrapper} svg path {\n transform: rotateY(0deg);\n }\n `}\n`;\n"],"names":["CHECK_BOX_SIZE","CheckWrapper","styled","div","templateObject_1","__makeTemplateObject","_a","theme","spacing","xs","Check","span","templateObject_2","colors","selectionBorder","StyledLabel","label","templateObject_4","typography","lineHeight","fontSizeBase","fontFamilyBase","backgroundLight","$disabled","disabled","textDark","concat","utilities","inputBorderWidth","m","xl","$checked","$hasError","useDefaultFromControls","css","templateObject_3","danger","check","inputBorder","SelectedBorder","templateObject_5","StyledInput","input","templateObject_8","templateObject_6","s","templateObject_7","xxs"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type StoryObj } from "@storybook/react";
2
+ import { type StoryObj } from "@storybook/react-vite";
3
3
  import Collapse from ".";
4
4
  declare const _default: {
5
5
  title: string;
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useRef as r,useEffect as o}from"react";import{useTheme as a}from"styled-components";import{faChevronDown as i}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";import{crukTheme as l}from"../../themes/cruk.js";import{IconFa as c}from"../IconFa/index.js";import{CustomHeader as d,DefaultHeader as m,FlippingIcon as u,CollapseContent as s,transitionDurationSeconds as p}from"./styles.js";function f(f){var h=f.id,x=f.headerTitleText,y=f.headerTitleTextColor,T=f.headerTitleTextSize,b=f.headerTitleTextFontFamily,v=f.headerComponent,E=f.startOpen,k=f.onOpenChange,C=f.children,$=n(E||!1),g=$[0],j=$[1],F=n(E?"initial":"0"),S=F[0],I=F[1],w=r(null),z=r(null),D=a(),H=e(e({},l),D),O=function(){var e=w.current;(null==z?void 0:z.current)&&clearTimeout(null==z?void 0:z.current);var t=!g;j(t),null!==e&&I("".concat(e.scrollHeight,"px")),!1===t?setTimeout((function(){return I("0")}),10):z.current=setTimeout((function(){return I("initial")}),1e3*p),void 0!==k&&k(t)};return o((function(){j(E||!1),I(E?"initial":"0")}),[E]),t.createElement("div",{id:h},v?t.createElement(d,{theme:H,"aria-controls":"".concat(h,"-header"),"aria-expanded":g,id:"".concat(h,"-header"),onClick:O,"aria-disabled":!1,"aria-label":x,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),O())},role:"button",tabIndex:0},v):t.createElement(m,{"aria-controls":"".concat(h,"-header"),"aria-expanded":g,id:"".concat(h,"-header"),onClick:O,theme:H,type:"button",appearance:"tertiary",$textColor:y,$textSize:T,$textFontFamily:b},x,t.createElement(u,{$open:g},t.createElement(c,{faIcon:i}))),t.createElement(s,{theme:H,id:"".concat(h,"-content"),ref:w,role:"region","aria-hidden":!g,"aria-labelledby":"".concat(h,"-header"),$contentHeight:S,$openStatus:g},C))}export{f as Collapse,f as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useRef as r,useEffect as o}from"react";import{useTheme as a}from"styled-components";import{faChevronDown as i}from"../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";import{crukTheme as l}from"../../themes/cruk.js";import{IconFa as c}from"../IconFa/index.js";import{CustomHeader as d,DefaultHeader as m,FlippingIcon as u,CollapseContent as s,transitionDurationSeconds as p}from"./styles.js";function f(f){var h=f.id,x=f.headerTitleText,y=f.headerTitleTextColor,T=f.headerTitleTextSize,b=f.headerTitleTextFontFamily,v=f.headerComponent,E=f.startOpen,k=f.onOpenChange,C=f.children,$=n(E||!1),g=$[0],j=$[1],F=n(E?"initial":"0"),S=F[0],I=F[1],w=r(null),z=r(null),D=a(),H=e(e({},l),D),O=function(){var e=w.current;(null==z?void 0:z.current)&&clearTimeout(null==z?void 0:z.current);var t=!g;j(t),null!==e&&I("".concat(e.scrollHeight,"px")),!1===t?setTimeout(function(){return I("0")},10):z.current=setTimeout(function(){return I("initial")},1e3*p),void 0!==k&&k(t)};return o(function(){j(E||!1),I(E?"initial":"0")},[E]),t.createElement("div",{id:h},v?t.createElement(d,{theme:H,"aria-controls":"".concat(h,"-header"),"aria-expanded":g,id:"".concat(h,"-header"),onClick:O,"aria-disabled":!1,"aria-label":x,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),O())},role:"button",tabIndex:0},v):t.createElement(m,{"aria-controls":"".concat(h,"-header"),"aria-expanded":g,id:"".concat(h,"-header"),onClick:O,theme:H,type:"button",appearance:"tertiary",$textColor:y,$textSize:T,$textFontFamily:b},x,t.createElement(u,{$open:g},t.createElement(c,{faIcon:i}))),t.createElement(s,{theme:H,id:"".concat(h,"-content"),ref:w,role:"region","aria-hidden":!g,"aria-labelledby":"".concat(h,"-header"),$contentHeight:S,$openStatus:g},C))}export{f as Collapse,f as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Collapse/index.tsx"],"sourcesContent":["import React, {\n useState,\n useRef,\n type KeyboardEvent,\n type ReactNode,\n useEffect,\n type HTMLAttributes,\n} from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { IconFa } from \"../IconFa\";\n\nimport { type FontSizeType, type ThemeType } from \"../../types\";\nimport {\n CustomHeader,\n DefaultHeader,\n FlippingIcon,\n CollapseContent,\n transitionDurationSeconds,\n} from \"./styles\";\n\nexport type CollapseProps = HTMLAttributes<HTMLElement> & {\n /** id is required for a11y reasons as we use aria attributes which depends on an id */\n id: string;\n /** text of collapse header, even if there is a custom header component this prop is still used for aria attributes */\n headerTitleText: string;\n /** collapse header text colour */\n headerTitleTextColor?: string;\n /** collapse header text size */\n headerTitleTextSize?: FontSizeType;\n /** collapse header font family */\n headerTitleTextFontFamily?: string;\n /** custom collapse header component */\n headerComponent?: ReactNode;\n /** flag to indicate */\n startOpen?: boolean;\n /** callback function that is passed isOpen flag */\n onOpenChange?: (isOpen: boolean) => void;\n /** children */\n children?: ReactNode;\n};\n\n/**\n *\n * Use a collapse component to show and hide content. It has a default view; however, it can be overwritten by passing a custom component as a prop.\n *\n */\nexport function Collapse({\n id,\n headerTitleText,\n headerTitleTextColor,\n headerTitleTextSize,\n headerTitleTextFontFamily,\n headerComponent,\n startOpen,\n onOpenChange,\n children,\n}: CollapseProps) {\n const [openStatus, setOpenStatus] = useState(startOpen || false);\n const [contentHeight, setContentHeight] = useState(\n startOpen ? \"initial\" : \"0\",\n );\n const content = useRef<HTMLDivElement>(null);\n const transitionTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const foundTheme = useTheme();\n const theme: ThemeType = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const toggleCollapse = () => {\n const { current } = content;\n if (transitionTimer?.current) clearTimeout(transitionTimer?.current);\n const newOpenState = !openStatus;\n setOpenStatus(newOpenState);\n\n if (current !== null) {\n setContentHeight(`${current.scrollHeight}px`);\n }\n\n if (newOpenState === false) {\n // Allow height to be rendered before setting to 0 for animation.\n setTimeout(() => setContentHeight(\"0\"), 10);\n } else {\n transitionTimer.current = setTimeout(\n () => setContentHeight(\"initial\"),\n transitionDurationSeconds * 1000,\n );\n }\n if (onOpenChange !== undefined) {\n onOpenChange(newOpenState);\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === \"Enter\" ||\n event.key === \" \" ||\n event.key === \"Spacebar\"\n ) {\n event.preventDefault();\n toggleCollapse();\n }\n };\n\n useEffect(() => {\n setOpenStatus(startOpen || false);\n // if start open changes then we want to set the height without animation\n if (startOpen) {\n setContentHeight(\"initial\");\n } else {\n setContentHeight(\"0\");\n }\n }, [startOpen]);\n\n return (\n <div id={id}>\n {headerComponent ? (\n <CustomHeader\n theme={theme}\n aria-controls={`${id}-header`}\n aria-expanded={openStatus}\n id={`${id}-header`}\n onClick={toggleCollapse}\n aria-disabled={false}\n aria-label={headerTitleText}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n >\n {headerComponent}\n </CustomHeader>\n ) : (\n <DefaultHeader\n aria-controls={`${id}-header`}\n aria-expanded={openStatus}\n id={`${id}-header`}\n onClick={toggleCollapse}\n theme={theme}\n type=\"button\"\n appearance=\"tertiary\"\n $textColor={headerTitleTextColor}\n $textSize={headerTitleTextSize}\n $textFontFamily={headerTitleTextFontFamily}\n >\n {headerTitleText}\n <FlippingIcon $open={openStatus}>\n <IconFa faIcon={faChevronDown} />\n </FlippingIcon>\n </DefaultHeader>\n )}\n <CollapseContent\n theme={theme}\n id={`${id}-content`}\n ref={content}\n role=\"region\"\n aria-hidden={!openStatus}\n aria-labelledby={`${id}-header`}\n $contentHeight={contentHeight}\n $openStatus={openStatus}\n >\n {children}\n </CollapseContent>\n </div>\n );\n}\n\nexport default Collapse;\n"],"names":["Collapse","_a","id","headerTitleText","headerTitleTextColor","headerTitleTextSize","headerTitleTextFontFamily","headerComponent","startOpen","onOpenChange","children","_b","useState","openStatus","setOpenStatus","_c","contentHeight","setContentHeight","content","useRef","transitionTimer","foundTheme","useTheme","theme","__assign","defaultTheme","toggleCollapse","current","clearTimeout","newOpenState","concat","scrollHeight","setTimeout","transitionDurationSeconds","undefined","useEffect","React","createElement","CustomHeader","onClick","onKeyDown","event","key","preventDefault","role","tabIndex","DefaultHeader","type","appearance","$textColor","$textSize","FlippingIcon","IconFa","faIcon","faChevronDown","CollapseContent","ref","$contentHeight","$openStatus"],"mappings":"kfAiDM,SAAUA,EAASC,OACvBC,EAAED,EAAAC,GACFC,EAAeF,EAAAE,gBACfC,EAAoBH,EAAAG,qBACpBC,EAAmBJ,EAAAI,oBACnBC,8BACAC,EAAeN,EAAAM,gBACfC,EAASP,EAAAO,UACTC,EAAYR,EAAAQ,aACZC,EAAQT,EAAAS,SAEFC,EAA8BC,EAASJ,IAAa,GAAnDK,EAAUF,EAAA,GAAEG,OACbC,EAAoCH,EACxCJ,EAAY,UAAY,KADnBQ,OAAeC,OAGhBC,EAAUC,EAAuB,MACjCC,EAAkBD,EAA6C,MAC/DE,EAAaC,IACbC,EACDC,EAAAA,EAAA,CAAA,EAAAC,GACAJ,GAGCK,EAAiB,WACb,IAAAC,EAAYT,EAAOS,SACvBP,aAAA,EAAAA,EAAiBO,UAASC,aAAaR,eAAAA,EAAiBO,SAC5D,IAAME,GAAgBhB,EACtBC,EAAce,GAEE,OAAZF,GACFV,EAAiB,GAAGa,OAAAH,EAAQI,aAAY,QAGrB,IAAjBF,EAEFG,YAAW,WAAM,OAAAf,EAAiB,IAAI,GAAE,IAExCG,EAAgBO,QAAUK,YACxB,WAAM,OAAAf,EAAiB,aACK,IAA5BgB,QAGiBC,IAAjBzB,GACFA,EAAaoB,EAEhB,EAuBD,OAVAM,GAAU,WACRrB,EAAcN,IAAa,GAGzBS,EADET,EACe,UAEA,IAErB,GAAG,CAACA,IAGF4B,EAAAC,cAAA,MAAA,CAAKnC,GAAIA,GACNK,EACC6B,EAACC,cAAAC,GACCf,MAAOA,EAAK,gBACG,UAAGrB,EAAE,2BACLW,EACfX,GAAI,GAAA4B,OAAG5B,EAAE,WACTqC,QAASb,EACM,iBAAA,eACHvB,EACZqC,UAhCc,SAACC,GAEL,UAAdA,EAAMC,KACQ,MAAdD,EAAMC,KACQ,aAAdD,EAAMC,MAEND,EAAME,iBACNjB,IAEH,EAwBOkB,KAAK,SACLC,SAAU,GAETtC,GAGH6B,gBAACU,EAAa,CAAA,gBACG,GAAGhB,OAAA5B,aACH,gBAAAW,EACfX,GAAI,UAAGA,EAAE,WACTqC,QAASb,EACTH,MAAOA,EACPwB,KAAK,SACLC,WAAW,WAAUC,WACT7C,EACD8C,UAAA7C,kBACMC,GAEhBH,EACDiC,EAACC,cAAAc,SAAoBtC,GACnBuB,EAACC,cAAAe,GAAOC,OAAQC,MAItBlB,EAAAC,cAACkB,EAAe,CACdhC,MAAOA,EACPrB,GAAI,GAAA4B,OAAG5B,EAAY,YACnBsD,IAAKtC,EACL0B,KAAK,wBACS/B,EACG,kBAAA,GAAAiB,OAAG5B,EAAW,WAAAuD,eACfzC,EAAa0C,YAChB7C,GAEZH,GAIT"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Collapse/index.tsx"],"sourcesContent":["import React, {\n useState,\n useRef,\n type KeyboardEvent,\n type ReactNode,\n useEffect,\n type HTMLAttributes,\n} from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\nimport { crukTheme as defaultTheme } from \"../../themes/cruk\";\nimport { IconFa } from \"../IconFa\";\n\nimport { type FontSizeType, type ThemeType } from \"../../types\";\nimport {\n CustomHeader,\n DefaultHeader,\n FlippingIcon,\n CollapseContent,\n transitionDurationSeconds,\n} from \"./styles\";\n\nexport type CollapseProps = HTMLAttributes<HTMLElement> & {\n /** id is required for a11y reasons as we use aria attributes which depends on an id */\n id: string;\n /** text of collapse header, even if there is a custom header component this prop is still used for aria attributes */\n headerTitleText: string;\n /** collapse header text colour */\n headerTitleTextColor?: string;\n /** collapse header text size */\n headerTitleTextSize?: FontSizeType;\n /** collapse header font family */\n headerTitleTextFontFamily?: string;\n /** custom collapse header component */\n headerComponent?: ReactNode;\n /** flag to indicate */\n startOpen?: boolean;\n /** callback function that is passed isOpen flag */\n onOpenChange?: (isOpen: boolean) => void;\n /** children */\n children?: ReactNode;\n};\n\n/**\n *\n * Use a collapse component to show and hide content. It has a default view; however, it can be overwritten by passing a custom component as a prop.\n *\n */\nexport function Collapse({\n id,\n headerTitleText,\n headerTitleTextColor,\n headerTitleTextSize,\n headerTitleTextFontFamily,\n headerComponent,\n startOpen,\n onOpenChange,\n children,\n}: CollapseProps) {\n const [openStatus, setOpenStatus] = useState(startOpen || false);\n const [contentHeight, setContentHeight] = useState(\n startOpen ? \"initial\" : \"0\",\n );\n const content = useRef<HTMLDivElement>(null);\n const transitionTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const foundTheme = useTheme();\n const theme: ThemeType = {\n ...defaultTheme,\n ...foundTheme,\n };\n\n const toggleCollapse = () => {\n const { current } = content;\n if (transitionTimer?.current) clearTimeout(transitionTimer?.current);\n const newOpenState = !openStatus;\n setOpenStatus(newOpenState);\n\n if (current !== null) {\n setContentHeight(`${current.scrollHeight}px`);\n }\n\n if (newOpenState === false) {\n // Allow height to be rendered before setting to 0 for animation.\n setTimeout(() => setContentHeight(\"0\"), 10);\n } else {\n transitionTimer.current = setTimeout(\n () => setContentHeight(\"initial\"),\n transitionDurationSeconds * 1000,\n );\n }\n if (onOpenChange !== undefined) {\n onOpenChange(newOpenState);\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === \"Enter\" ||\n event.key === \" \" ||\n event.key === \"Spacebar\"\n ) {\n event.preventDefault();\n toggleCollapse();\n }\n };\n\n useEffect(() => {\n setOpenStatus(startOpen || false);\n // if start open changes then we want to set the height without animation\n if (startOpen) {\n setContentHeight(\"initial\");\n } else {\n setContentHeight(\"0\");\n }\n }, [startOpen]);\n\n return (\n <div id={id}>\n {headerComponent ? (\n <CustomHeader\n theme={theme}\n aria-controls={`${id}-header`}\n aria-expanded={openStatus}\n id={`${id}-header`}\n onClick={toggleCollapse}\n aria-disabled={false}\n aria-label={headerTitleText}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n >\n {headerComponent}\n </CustomHeader>\n ) : (\n <DefaultHeader\n aria-controls={`${id}-header`}\n aria-expanded={openStatus}\n id={`${id}-header`}\n onClick={toggleCollapse}\n theme={theme}\n type=\"button\"\n appearance=\"tertiary\"\n $textColor={headerTitleTextColor}\n $textSize={headerTitleTextSize}\n $textFontFamily={headerTitleTextFontFamily}\n >\n {headerTitleText}\n <FlippingIcon $open={openStatus}>\n <IconFa faIcon={faChevronDown} />\n </FlippingIcon>\n </DefaultHeader>\n )}\n <CollapseContent\n theme={theme}\n id={`${id}-content`}\n ref={content}\n role=\"region\"\n aria-hidden={!openStatus}\n aria-labelledby={`${id}-header`}\n $contentHeight={contentHeight}\n $openStatus={openStatus}\n >\n {children}\n </CollapseContent>\n </div>\n );\n}\n\nexport default Collapse;\n"],"names":["Collapse","_a","id","headerTitleText","headerTitleTextColor","headerTitleTextSize","headerTitleTextFontFamily","headerComponent","startOpen","onOpenChange","children","_b","useState","openStatus","setOpenStatus","_c","contentHeight","setContentHeight","content","useRef","transitionTimer","foundTheme","useTheme","theme","__assign","defaultTheme","toggleCollapse","current","clearTimeout","newOpenState","concat","scrollHeight","setTimeout","transitionDurationSeconds","undefined","useEffect","React","createElement","CustomHeader","onClick","onKeyDown","event","key","preventDefault","role","tabIndex","DefaultHeader","type","appearance","$textColor","$textSize","FlippingIcon","IconFa","faIcon","faChevronDown","CollapseContent","ref","$contentHeight","$openStatus"],"mappings":"kfAiDM,SAAUA,EAASC,OACvBC,EAAED,EAAAC,GACFC,EAAeF,EAAAE,gBACfC,EAAoBH,EAAAG,qBACpBC,EAAmBJ,EAAAI,oBACnBC,8BACAC,EAAeN,EAAAM,gBACfC,EAASP,EAAAO,UACTC,EAAYR,EAAAQ,aACZC,EAAQT,EAAAS,SAEFC,EAA8BC,EAASJ,IAAa,GAAnDK,EAAUF,EAAA,GAAEG,OACbC,EAAoCH,EACxCJ,EAAY,UAAY,KADnBQ,OAAeC,OAGhBC,EAAUC,EAAuB,MACjCC,EAAkBD,EAA6C,MAC/DE,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGCK,EAAiB,WACb,IAAAC,EAAYT,EAAOS,SACvBP,aAAe,EAAfA,EAAiBO,UAASC,aAAaR,eAAAA,EAAiBO,SAC5D,IAAME,GAAgBhB,EACtBC,EAAce,GAEE,OAAZF,GACFV,EAAiB,GAAAa,OAAGH,EAAQI,aAAY,QAGrB,IAAjBF,EAEFG,WAAW,WAAM,OAAAf,EAAiB,IAAI,EAAE,IAExCG,EAAgBO,QAAUK,WACxB,WAAM,OAAAf,EAAiB,YACK,IAA5BgB,QAGiBC,IAAjBzB,GACFA,EAAaoB,EAEjB,EAuBA,OAVAM,EAAU,WACRrB,EAAcN,IAAa,GAGzBS,EADET,EACe,UAEA,IAErB,EAAG,CAACA,IAGF4B,EAAAC,cAAA,MAAA,CAAKnC,GAAIA,GACNK,EACC6B,EAAAC,cAACC,GACCf,MAAOA,EAAK,gBACG,UAAGrB,EAAE,2BACLW,EACfX,GAAI,GAAA4B,OAAG5B,EAAE,WACTqC,QAASb,EAAc,iBACR,eACHvB,EACZqC,UAhCc,SAACC,GAEL,UAAdA,EAAMC,KACQ,MAAdD,EAAMC,KACQ,aAAdD,EAAMC,MAEND,EAAME,iBACNjB,IAEJ,EAwBQkB,KAAK,SACLC,SAAU,GAETtC,GAGH6B,gBAACU,EAAa,CAAA,gBACG,GAAAhB,OAAG5B,aAAW,gBACdW,EACfX,GAAI,UAAGA,EAAE,WACTqC,QAASb,EACTH,MAAOA,EACPwB,KAAK,SACLC,WAAW,WAAUC,WACT7C,EAAoB8C,UACrB7C,kBACMC,GAEhBH,EACDiC,EAAAC,cAACc,SAAoBtC,GACnBuB,EAAAC,cAACe,GAAOC,OAAQC,MAItBlB,EAAAC,cAACkB,EAAe,CACdhC,MAAOA,EACPrB,GAAI,GAAA4B,OAAG5B,EAAE,YACTsD,IAAKtC,EACL0B,KAAK,wBACS/B,EAAU,kBACP,GAAAiB,OAAG5B,EAAE,WAASuD,eACfzC,EAAa0C,YAChB7C,GAEZH,GAIT"}
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o from"styled-components";import{Button as t}from"../Button/index.js";var i,e,r,a,l=.5,s=o.span(i||(i=n(["\n display: inline-block;\n transform: ",";\n transition-duration: ","s;\n"],["\n display: inline-block;\n transform: ",";\n transition-duration: ","s;\n"])),(function(n){return n.$open?"translateY(0.1em) scaleY(-1)":"initial"}),.5),f=o(t)(e||(e=n(["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ",";\n }\n"],["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ",";\n }\n"])),(function(n){var o=n.theme,t=n.$textColor;return t&&void 0!==o.colors[t]?o.colors[t]:t||o.colors.collapseHeaderColor}),(function(n){var o=n.theme,t=o.fontSizes,i=o.fontSizes.m,e=n.$textSize;return e?t[e]:i}),(function(n){var o=n.theme;return n.$textFontFamily||o.typography.fontFamilyBase}),(function(n){var o=n.theme.colors,t=n.$textColor;return t&&void 0!==o[t]?o[t]:t||o.collapseHeaderColor})),m=o.div(r||(r=n(["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"],["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"])),.5,(function(n){return n.$contentHeight}),(function(n){return n.$openStatus?"visible":"hidden"})),c=o.div(a||(a=n(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));export{m as CollapseContent,c as CustomHeader,f as DefaultHeader,s as FlippingIcon,l as transitionDurationSeconds};
1
+ import{__makeTemplateObject as n}from"../../../node_modules/tslib/tslib.es6.js";import o from"styled-components";import{Button as t}from"../Button/index.js";var i,e,r,a,l=.5,s=o.span(i||(i=n(["\n display: inline-block;\n transform: ",";\n transition-duration: ","s;\n"],["\n display: inline-block;\n transform: ",";\n transition-duration: ","s;\n"])),function(n){return n.$open?"translateY(0.1em) scaleY(-1)":"initial"},.5),f=o(t)(e||(e=n(["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ",";\n }\n"],["\n display: flex;\n color: ",";\n font-size: ",";\n font-family: ",";\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ",";\n }\n"])),function(n){var o=n.theme,t=n.$textColor;return t&&void 0!==o.colors[t]?o.colors[t]:t||o.colors.collapseHeaderColor},function(n){var o=n.theme,t=o.fontSizes,i=o.fontSizes.m,e=n.$textSize;return e?t[e]:i},function(n){var o=n.theme;return n.$textFontFamily||o.typography.fontFamilyBase},function(n){var o=n.theme.colors,t=n.$textColor;return t&&void 0!==o[t]?o[t]:t||o.collapseHeaderColor}),m=o.div(r||(r=n(["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"],["\n margin: 0;\n transition: ","s ease;\n height: ",";\n visibility: ",";\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n"])),.5,function(n){return n.$contentHeight},function(n){return n.$openStatus?"visible":"hidden"}),c=o.div(a||(a=n(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));export{m as CollapseContent,c as CustomHeader,f as DefaultHeader,s as FlippingIcon,l as transitionDurationSeconds};
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Collapse/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport {\n type FontSizeType,\n type ThemeType,\n type ColorKeyType,\n} from \"../../types\";\nimport Button from \"../Button\";\n\nexport const transitionDurationSeconds = 0.5;\n\nexport const FlippingIcon = styled.span<{ $open: boolean }>`\n display: inline-block;\n transform: ${({ $open }) =>\n $open ? \"translateY(0.1em) scaleY(-1)\" : \"initial\"};\n transition-duration: ${transitionDurationSeconds}s;\n`;\n\nexport const DefaultHeader = styled(Button)<{\n theme: ThemeType;\n $textColor?: string;\n $textSize?: FontSizeType;\n $textFontFamily?: string;\n}>`\n display: flex;\n color: ${({ theme, $textColor }) =>\n !!$textColor &&\n typeof theme.colors[$textColor as ColorKeyType] !== \"undefined\"\n ? theme.colors[$textColor as ColorKeyType]\n : $textColor || theme.colors.collapseHeaderColor};\n font-size: ${({\n theme: {\n fontSizes,\n fontSizes: { m },\n },\n $textSize,\n }) => ($textSize ? fontSizes[$textSize] : m)};\n font-family: ${({ theme, $textFontFamily }) =>\n $textFontFamily || theme.typography.fontFamilyBase};\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ${({ theme: { colors }, $textColor }) =>\n $textColor && typeof colors[$textColor as ColorKeyType] !== \"undefined\"\n ? colors[$textColor as ColorKeyType]\n : $textColor || colors.collapseHeaderColor};\n }\n`;\n\nexport const CollapseContent = styled.div<{\n $contentHeight: string;\n $openStatus: boolean;\n}>`\n margin: 0;\n transition: ${transitionDurationSeconds}s ease;\n height: ${({ $contentHeight }: { $contentHeight: string }) => $contentHeight};\n visibility: ${({ $openStatus }: { $openStatus: boolean }) =>\n $openStatus ? \"visible\" : \"hidden\"};\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n`;\n\nexport const CustomHeader = styled.div`\n cursor: pointer;\n`;\n"],"names":["transitionDurationSeconds","FlippingIcon","styled","span","templateObject_1","__makeTemplateObject","_a","$open","DefaultHeader","Button","templateObject_2","theme","$textColor","colors","collapseHeaderColor","_b","fontSizes","m","$textSize","$textFontFamily","typography","fontFamilyBase","CollapseContent","div","templateObject_3","$contentHeight","$openStatus","CustomHeader","templateObject_4"],"mappings":"6JASO,YAAMA,EAA4B,GAE5BC,EAAeC,EAAOC,KAAwBC,IAAAA,EAAAC,EAAA,CAAA,4CAAA,6BAAA,QAAA,CAAA,4CAGL,6BACJ,WAFnC,SAACC,GACZ,OADmBA,EAAAC,MACX,+BAAiC,SAAzC,GALqC,IAS5BC,EAAgBN,EAAOO,EAAPP,CAK3BQ,IAAAA,EAAAL,EAAA,CAAA,gCAAA,mBAAA,qBAAA,+KAAA,YAAA,CAAA,gCAMoD,mBAOR,qBAEQ,+KAYJ,eAzBvC,SAACC,OAAEK,EAAKL,EAAAK,MAAEC,EAAUN,EAAAM,WAC3B,OAAEA,QACkD,IAA7CD,EAAME,OAAOD,GAChBD,EAAME,OAAOD,GACbA,GAAcD,EAAME,OAAOC,mBAH/B,IAIW,SAACR,OACZS,EAGCT,EAAAK,MAFCK,EAASD,EAAAC,UACIC,EAACF,EAAAC,UAAAC,EAEhBC,EAASZ,EAAAY,UACL,OAACA,EAAYF,EAAUE,GAAaD,CAApC,IACS,SAACX,OAAEK,EAAKL,EAAAK,MACrB,OADsCL,EAAAa,iBACnBR,EAAMS,WAAWC,cAApC,IASS,SAACf,OAAWO,EAAMP,EAAAK,MAAAE,OAAID,EAAUN,EAAAM,WACvC,OAAAA,QAA4D,IAAvCC,EAAOD,GACxBC,EAAOD,GACPA,GAAcC,EAAOC,mBAFzB,IAMOQ,EAAkBpB,EAAOqB,IAGpCC,IAAAA,EAAAnB,EAAA,CAAA,iCAAA,sBAAA,oBAAA,gEAAA,CAAA,iCAEuC,sBACqC,oBAExC,kEArDG,IAmD7B,SAACC,GAAmD,OAAnCA,EAAAmB,cAAmC,IAChD,SAACnB,GACb,OAD0BA,EAAAoB,YACZ,UAAY,QAA1B,IAOSC,EAAezB,EAAOqB,IAAGK,IAAAA,EAAAvB,EAAA,CAAA,0BAAA,CAAA"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Collapse/styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport {\n type FontSizeType,\n type ThemeType,\n type ColorKeyType,\n} from \"../../types\";\nimport Button from \"../Button\";\n\nexport const transitionDurationSeconds = 0.5;\n\nexport const FlippingIcon = styled.span<{ $open: boolean }>`\n display: inline-block;\n transform: ${({ $open }) =>\n $open ? \"translateY(0.1em) scaleY(-1)\" : \"initial\"};\n transition-duration: ${transitionDurationSeconds}s;\n`;\n\nexport const DefaultHeader = styled(Button)<{\n theme: ThemeType;\n $textColor?: string;\n $textSize?: FontSizeType;\n $textFontFamily?: string;\n}>`\n display: flex;\n color: ${({ theme, $textColor }) =>\n !!$textColor &&\n typeof theme.colors[$textColor as ColorKeyType] !== \"undefined\"\n ? theme.colors[$textColor as ColorKeyType]\n : $textColor || theme.colors.collapseHeaderColor};\n font-size: ${({\n theme: {\n fontSizes,\n fontSizes: { m },\n },\n $textSize,\n }) => ($textSize ? fontSizes[$textSize] : m)};\n font-family: ${({ theme, $textFontFamily }) =>\n $textFontFamily || theme.typography.fontFamilyBase};\n font-weight: normal;\n margin-bottom: 0;\n height: initial;\n text-decoration: none;\n text-align: left;\n border-radius: 0;\n &:hover,\n &:focus {\n color: ${({ theme: { colors }, $textColor }) =>\n $textColor && typeof colors[$textColor as ColorKeyType] !== \"undefined\"\n ? colors[$textColor as ColorKeyType]\n : $textColor || colors.collapseHeaderColor};\n }\n`;\n\nexport const CollapseContent = styled.div<{\n $contentHeight: string;\n $openStatus: boolean;\n}>`\n margin: 0;\n transition: ${transitionDurationSeconds}s ease;\n height: ${({ $contentHeight }: { $contentHeight: string }) => $contentHeight};\n visibility: ${({ $openStatus }: { $openStatus: boolean }) =>\n $openStatus ? \"visible\" : \"hidden\"};\n overflow: hidden;\n & > p {\n margin-top: 0;\n }\n`;\n\nexport const CustomHeader = styled.div`\n cursor: pointer;\n`;\n"],"names":["transitionDurationSeconds","FlippingIcon","styled","span","templateObject_1","__makeTemplateObject","_a","$open","DefaultHeader","Button","templateObject_2","theme","$textColor","colors","collapseHeaderColor","_b","fontSizes","m","$textSize","$textFontFamily","typography","fontFamilyBase","CollapseContent","div","templateObject_3","$contentHeight","$openStatus","CustomHeader","templateObject_4"],"mappings":"6JASO,YAAMA,EAA4B,GAE5BC,EAAeC,EAAOC,KAAIC,IAAAA,EAAAC,EAAA,CAAA,4CAAA,6BAAA,QAAA,CAAoB,4CAGL,6BACJ,UAFnC,SAACC,GACZ,OADmBA,EAAAC,MACX,+BAAiC,SAAzC,EALqC,IAS5BC,EAAgBN,EAAOO,EAAPP,CAAcQ,IAAAA,EAAAL,EAAA,CAAA,gCAAA,mBAAA,qBAAA,+KAAA,YAAA,CAKzC,gCAMoD,mBAOR,qBAEQ,+KAYJ,cAzBvC,SAACC,OAAEK,EAAKL,EAAAK,MAAEC,EAAUN,EAAAM,WAC3B,OAAEA,QACkD,IAA7CD,EAAME,OAAOD,GAChBD,EAAME,OAAOD,GACbA,GAAcD,EAAME,OAAOC,mBAH/B,EAIW,SAACR,OACZS,EAAAT,EAAAK,MACEK,EAASD,EAAAC,UACIC,EAACF,EAAAC,UAAAC,EAEhBC,EAASZ,EAAAY,UACL,OAACA,EAAYF,EAAUE,GAAaD,CAApC,EACS,SAACX,OAAEK,EAAKL,EAAAK,MACrB,OADsCL,EAAAa,iBACnBR,EAAMS,WAAWC,cAApC,EASS,SAACf,OAAWO,EAAMP,EAAAK,MAAAE,OAAID,EAAUN,EAAAM,WACvC,OAAAA,QAA4D,IAAvCC,EAAOD,GACxBC,EAAOD,GACPA,GAAcC,EAAOC,mBAFzB,GAMOQ,EAAkBpB,EAAOqB,IAAGC,IAAAA,EAAAnB,EAAA,CAAA,iCAAA,sBAAA,oBAAA,gEAAA,CAGvC,iCAEuC,sBACqC,oBAExC,kEArDG,GAmD7B,SAACC,GAAmD,OAAnCA,EAAAmB,cAAmC,EAChD,SAACnB,GACb,OAD0BA,EAAAoB,YACZ,UAAY,QAA1B,GAOSC,EAAezB,EAAOqB,IAAGK,IAAAA,EAAAvB,EAAA,CAAA,0BAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type StoryObj } from "@storybook/react";
1
+ import { type StoryObj } from "@storybook/react-vite";
2
2
  import DateField from ".";
3
3
  declare const _default: {
4
4
  title: string;
@@ -1,2 +1,2 @@
1
- import e from"react";import{useTheme as t}from"styled-components";import{ErrorText as r}from"../ErrorText/index.js";import{Text as a}from"../Text/index.js";import{TextField as n}from"../TextField/index.js";import{Fieldset as o,DateTextFieldWrapper as l,LargeDateTextFieldWrapper as i,ErrorTextWrapper as m}from"./styles.js";function d(d){var u=d.label,s=d.hintText,p=d.day,y=d.month,h=d.year,c=d.dayName,x=void 0===c?"day":c,E=d.monthName,g=void 0===E?"month":E,b=d.yearName,f=void 0===b?"year":b,v=d.dayHasError,q=d.monthHasError,F=d.yearHasError,L=d.errorMessage,C=d.onChange,B=void 0===C?function(){}:C,M=d.onBlur,T=void 0===M?function(){}:M,j=d.onFocus,W=void 0===j?function(){}:j,H=d.disabled,I=d.required,N=t();return e.createElement(o,null,e.createElement(a,{as:"legend",textWeight:N.typography.fontWeightLabels||700,marginBottom:"xxs",textFontFamily:N.typography.fontFamilyLabel},u,!!I&&e.createElement("span",{style:{fontWeight:N.typography.fontWeightBase}}," (required)")),s&&e.createElement(a,null,s),e.createElement(l,null,e.createElement(n,{label:"Day",type:"text",name:x,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-day",pattern:"[0-9]*",inputMode:"numeric",value:p,onChange:B,onBlur:T,onFocus:W,hasError:v,disabled:H})),e.createElement(l,null,e.createElement(n,{label:"Month",type:"text",name:g,required:!!I,hideRequiredInLabel:!0,maxLength:2,autoComplete:"bday-month",pattern:"[0-9]*",inputMode:"numeric",value:y,onChange:B,onBlur:T,onFocus:W,hasError:q,disabled:H})),e.createElement(i,null,e.createElement(n,{label:"Year",type:"text",name:f,required:!!I,hideRequiredInLabel:!0,maxLength:4,autoComplete:"bday-year",pattern:"[0-9]*",inputMode:"numeric",value:h,onChange:B,onBlur:T,onFocus:W,hasError:F,disabled:H})),L&&e.createElement(m,null,e.createElement(r,{marginTop:"xxs"},L)))}export{d as DateField,d as default};
1
+ import e from"react";import{useTheme as t}from"styled-components";import{ErrorText as n}from"../ErrorText/index.js";import{Text as a}from"../Text/index.js";import{TextField as r}from"../TextField/index.js";import{Fieldset as o,DateTextFieldWrapper as l,LargeDateTextFieldWrapper as i,ErrorTextWrapper as m}from"./styles.js";function d(d){var u=d.label,s=d.hintText,p=d.day,c=d.month,y=d.year,h=d.dayName,x=void 0===h?"day":h,E=d.monthName,g=void 0===E?"month":E,b=d.yearName,f=void 0===b?"year":b,v=d.dayHasError,F=d.monthHasError,L=d.yearHasError,q=d.errorMessage,C=d.onChange,B=void 0===C?function(){}:C,I=d.onBlur,M=void 0===I?function(){}:I,T=d.onFocus,j=void 0===T?function(){}:T,W=d.disabled,H=d.required,N=t();return e.createElement(o,null,e.createElement(a,{as:"legend",textWeight:N.typography.fontWeightLabels||700,marginBottom:"xxs",textFontFamily:N.typography.fontFamilyLabel},u,!H&&e.createElement("span",{style:{fontWeight:N.typography.fontWeightBase}}," (optional)")),s&&e.createElement(a,null,s),e.createElement(l,null,e.createElement(r,{label:"Day",type:"text",name:x,required:!!H,hideRequiredIndicationInLabel:!0,maxLength:2,autoComplete:"bday-day",pattern:"[0-9]*",inputMode:"numeric",value:p,onChange:B,onBlur:M,onFocus:j,hasError:v,disabled:W})),e.createElement(l,null,e.createElement(r,{label:"Month",type:"text",name:g,required:!!H,hideRequiredIndicationInLabel:!0,maxLength:2,autoComplete:"bday-month",pattern:"[0-9]*",inputMode:"numeric",value:c,onChange:B,onBlur:M,onFocus:j,hasError:F,disabled:W})),e.createElement(i,null,e.createElement(r,{label:"Year",type:"text",name:f,required:!!H,hideRequiredIndicationInLabel:!0,maxLength:4,autoComplete:"bday-year",pattern:"[0-9]*",inputMode:"numeric",value:y,onChange:B,onBlur:M,onFocus:j,hasError:L,disabled:W})),q&&e.createElement(m,null,e.createElement(n,{marginTop:"xxs"},q)))}export{d as DateField,d as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -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 {` (optional)`}\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 hideRequiredIndicationInLabel\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 hideRequiredIndicationInLabel\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 hideRequiredIndicationInLabel\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","hideRequiredIndicationInLabel","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,EAAAN,EAAAO,QAAAA,OAAO,IAAAD,EAAG,MAAKA,EACfE,EAAAR,EAAAS,UAAAA,OAAS,IAAAD,EAAG,QAAOA,EACnBE,aAAAC,aAAW,OAAMD,EACjBE,EAAWZ,EAAAY,YACXC,EAAab,EAAAa,cACbC,EAAYd,EAAAc,aACZC,iBACAC,EAAAhB,EAAAiB,SAAAA,OAAQ,IAAAD,EAAG,WAEX,EAACA,EACDE,EAAAlB,EAAAmB,OAAAA,OAAM,IAAAD,EAAG,WAET,EAACA,EACDE,EAAApB,EAAAqB,QAAAA,OAAO,IAAAD,EAAG,WAEV,IACAE,EAAQtB,EAAAsB,SACRC,EAAQvB,EAAAuB,SAGFC,EADQC,IAEd,OACEC,gBAACC,EAAQ,KACPD,EAAAE,cAACC,EAAI,CACHC,GAAG,SACHC,WAAYP,EAAWQ,WAAWC,kBAAoB,IACtDC,aAAa,MACbC,eAAgBX,EAAWQ,WAAWI,iBAErCnC,GACCsB,GACAG,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,+BAA6B,EAC7BC,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,+BAA6B,EAC7BC,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,+BAA6B,EAC7BC,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,2 +1,2 @@
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{__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};
2
2
  //# 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","templateObject_1","__makeTemplateObject","Text","templateObject_2","_a","theme","typography","fontFamilyLabel","DateTextFieldWrapper","div","templateObject_3","spacing","xs","fontWeightBase","LargeDateTextFieldWrapper","templateObject_4","ErrorTextWrapper","templateObject_5"],"mappings":"yJAIO,IAAMA,EAAWC,EAAOC,SAAQC,IAAAA,EAAAC,EAAA,CAAA,0LAAA,CAAA,6LAaZH,EAAOI,EAAPJ,CAAYK,IAAAA,EAAAF,EAAA,CAAA,oBAAA,OAAA,CAAsB,oBACG,SAA/C,SAACG,GAAc,OAAPA,EAAAC,MAAaC,WAAWC,eAAjB,GAGzB,cAAMC,EAAuBV,EAAOW,IAAGC,IAAAA,EAAAT,EAAA,CAAA,+DAAA,kGAAA,YAAA,CAAsB,+DAGnB,kGAGgB,cAH/C,SAACG,GAAc,OAAPA,EAAAC,MAAaM,QAAQC,EAAd,EAGd,SAACR,GAAc,OAAPA,EAAAC,MAAaC,WAAWO,cAAjB,GAIrBC,EAA4BhB,EAAOU,EAAPV,CAA4BiB,IAAAA,EAAAd,EAAA,CAAA,sBAAA,CAAA,yBAIxDe,EAAmBlB,EAAOW,IAAGQ,IAAAA,EAAAhB,EAAA,CAAA,sBAAA,CAAA"}
@@ -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","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,EAAAC,cAACT,EAAa,KAAEO,EADiD"}
@@ -1,4 +1,4 @@
1
- import { type StoryObj } from "@storybook/react";
1
+ import { type StoryObj } from "@storybook/react-vite";
2
2
  import ErrorText from ".";
3
3
  declare const _default: {
4
4
  title: string;
@@ -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","_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,OAAE,IAAAD,EAAG,OAAMA,EAAKE,EAAKC,EAAAL,EAAjC,mBAClBM,EAAaC,IACbC,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGCK,EAAqC,iBAAbV,GAAyBA,EAASW,OAChE,OACEC,EAAAC,cAACC,EAAeN,EAAA,CAACO,YAAab,GAAQC,EAAK,CAAEI,MAAOA,EAAOS,KAAK,UAC7DN,EACCE,EAAAC,cAACI,EAAG,CAACf,GAAG,OAAOgB,YAAY,OACzBN,EAAAC,cAACM,EAAM,CAACC,OAAQC,EAAuBC,KAAK,SAE5C,KACHtB,EAGP"}
@@ -1,2 +1,2 @@
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{__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};
2
2
  //# 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","templateObject_1","__makeTemplateObject","_a","theme","colors","textError","typography","fontWeightHeavy"],"mappings":"yJAOO,MAAMA,EAAkBC,EAAOC,EAAPD,CAAYE,IAAAA,EAAAC,EAAA,CAAA,wCAAA,qBAAA,OAAA,CAAY,wCAEP,qBACgB,SADrD,SAACC,GAAc,OAAPA,EAAAC,MAAaC,OAAOC,SAAb,EACT,SAACH,GAAc,OAAPA,EAAAC,MAAaG,WAAWC,eAAjB"}
@@ -1,2 +1,2 @@
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{__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};
2
2
  //# 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","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,QAHhC,SAACC,GAAc,OAAPA,EAAAC,MAAaC,WAAWC,MAAjB,EAGlC,SAACC,GAAU,OAAAC,EAAQD,EAAOA,EAAMH,SAM9B,SAAUK,EAAKF,GACnB,IAAMG,EAAeC,EAAmCJ,GAExD,OAAOK,EAAAC,cAACf,EAAUgB,EAAA,CAACV,MAAOG,EAAMH,OAAWM,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 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};
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","concat","family","urlWoff2","urlWoff","fontWeight","join","Fontface","crukTheme","typography","rflTheme","su2cTheme","bowelbabeTheme"],"mappings":"gMAOO,IAAMA,EAAmB,SAACC,GAC/B,OAAAA,EACGC,IACC,SAACC,GAAS,MAAA,kDAAAC,OAESD,EAAKE,OAAM,sBAAAD,QAExBD,eAAAA,EAAMG,UAAW,QAAAF,OAAQD,EAAKG,gCAA+B,IAAEF,OAC5DD,EAAKI,UAAaJ,aAAI,EAAJA,EAAMG,UAAW,KAAO,2BAC7CH,aAAI,EAAJA,EAAMI,SAAU,QAAAH,OAAQD,EAAKI,QAAO,sBAAsB,GAAE,8BAAAH,OAC/CD,EAAKK,YAAc,SAAQ,yFAI7C,GAEFC,KAAK,GAfR,EAiBWC,EAAW,KAAAN,OACtBJ,EAAiBW,EAAUC,WAAWX,aAAY,MAAAG,OAClDJ,EAAiBa,EAASD,WAAWX,0BACrCD,EAAiBc,EAAUF,WAAWX,0BACtCD,EAAiBe,EAAeH,WAAWX"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type StoryObj } from "@storybook/react";
2
+ import { type StoryObj } from "@storybook/react-vite";
3
3
  import Footer, { type FooterProps } from ".";
4
4
  declare const _default: {
5
5
  title: string;
@@ -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{__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};
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","_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,EAAKC,EAAAA,EAAA,CAAA,EACNC,GACAJ,GAGL,OACEH,EAAAQ,cAACC,EAAa,CAACJ,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,EAAAQ,cAACc,gBAAqB,gBACpBtB,EAAAQ,cAACe,EAAQ,KACNxB,EAAWyB,OACRzB,EAAW0B,IAAI,SAACC,EAAOC,GACrB,IAAMC,EAAgB,aAAAC,OAAaF,GACnC,OAAO3B,EAAAQ,cAACsB,EAAQ,CAACC,IAAKH,GAAgBF,EACxC,GACA,QAKV1B,EAAAQ,cAACwB,EAAa,KACXlC,EAC0B,iBAAlBA,EACLE,EAAAQ,cAACyB,EAAI,CAACC,SAAS,KAAKpC,GAEpBE,EAAAQ,cAAAR,EAAAmC,SAAA,KAAGrC,GAGLE,EAAAQ,cAACyB,GAAKC,SAAS,KAAK7B,EAAMY,WAAWmB,iBAIzCpC,EAAAQ,cAAC6B,EAAoB,KACnBrC,EAAAQ,cAAC8B,EAAa,KACZtC,EAAAQ,cAACyB,GAAKM,GAAG,OAAOL,SAAS,KAAG,kBAG5BlC,EAAAQ,cAACyB,GAAKM,GAAG,OAAOL,SAAS,KAAG,UAG5BlC,EAAAQ,cAACyB,EAAI,CAACM,GAAG,OAAOL,SAAS,KAAG,eAS1C"}
@@ -1,2 +1,2 @@
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{__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};
2
2
  //# sourceMappingURL=styles.js.map