@mrshmllw/smores-react 4.0.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. package/README.md +0 -2
  2. package/dist/.gitkeep +0 -0
  3. package/dist/Accordion/Accordion.js +90 -32
  4. package/dist/ActionDropdown/ActionDropdown.js +65 -25
  5. package/dist/ActionDropdown/List.js +8 -6
  6. package/dist/Banner/BannerContainer.js +40 -31
  7. package/dist/Banner/BannerItem.js +112 -54
  8. package/dist/Banner/hooks.js +7 -5
  9. package/dist/Box/Box.js +7 -5
  10. package/dist/BrandCard/BrandCard.js +61 -24
  11. package/dist/Button/Button.js +110 -40
  12. package/dist/Card/Card.js +86 -34
  13. package/dist/CheckBox/CheckBox.js +41 -20
  14. package/dist/CheckBoxGroup/CheckBoxGroup.js +22 -6
  15. package/dist/Chip/Chip.d.ts +1 -1
  16. package/dist/Chip/Chip.js +60 -26
  17. package/dist/CurrencyInput/CurrencyInput.js +89 -50
  18. package/dist/Datepicker/Datepicker.js +130 -83
  19. package/dist/Datepicker/DatesList.js +42 -26
  20. package/dist/Divider/Divider.js +17 -11
  21. package/dist/Dropdown/Dropdown.js +101 -54
  22. package/dist/Emoji/Emoji.js +27 -6
  23. package/dist/Icon/Icon.js +5522 -851
  24. package/dist/IconStrict/IconStrict.js +67 -38
  25. package/dist/IconWrapper/IconWrapper.js +28 -12
  26. package/dist/LabelledText/LabelledText.js +16 -8
  27. package/dist/Link/Link.js +87 -47
  28. package/dist/Loader/Loader.js +38 -12
  29. package/dist/Logo/Logo.js +154 -44
  30. package/dist/Modal/Modal.js +73 -27
  31. package/dist/Modal/useBodyScrollLock.js +23 -19
  32. package/dist/NumberInput/NumberInput.js +125 -78
  33. package/dist/Pagination/Pagination.js +144 -103
  34. package/dist/RadioGroup/RadioElement.js +33 -18
  35. package/dist/RadioGroup/RadioGroup.js +64 -33
  36. package/dist/RadioGroup/RadioItem.js +79 -47
  37. package/dist/RadioGroup/constants.js +3 -2
  38. package/dist/Row/Row.js +68 -27
  39. package/dist/SearchInput/SearchInput.js +102 -45
  40. package/dist/SearchInput/SearchOptions.js +18 -14
  41. package/dist/Snackbar/SnackbarContainer.js +49 -31
  42. package/dist/Snackbar/SnackbarItem.js +37 -17
  43. package/dist/Snackbar/hooks.js +7 -5
  44. package/dist/SupportMessage/SupportMessage.js +79 -52
  45. package/dist/Table/Table.js +73 -50
  46. package/dist/Table/components/RowActions.js +82 -43
  47. package/dist/Table/components/TableHeader.js +40 -7
  48. package/dist/Table/components/TableRow.js +111 -69
  49. package/dist/Table/components/commonComponents.js +31 -46
  50. package/dist/Table/helpers.js +14 -10
  51. package/dist/Tag/Tag.js +28 -9
  52. package/dist/Text/Text.js +53 -33
  53. package/dist/Text/fontMapping.js +19 -17
  54. package/dist/TextInput/TextInput.js +65 -16
  55. package/dist/Textarea/Textarea.js +50 -16
  56. package/dist/Toggle/Toggle.js +32 -16
  57. package/dist/Tooltip/Tooltip.js +202 -178
  58. package/dist/fields/Field/Field.js +7 -5
  59. package/dist/fields/Fieldset/Fieldset.js +21 -5
  60. package/dist/fields/commonFieldTypes.d.ts +1 -1
  61. package/dist/fields/components/CommonInput.js +17 -21
  62. package/dist/fields/components/InternalField.js +77 -29
  63. package/dist/fontStyle.js +5 -3
  64. package/dist/hooks/useClickOutside/index.js +30 -22
  65. package/dist/hooks/useEventListener/index.js +19 -12
  66. package/dist/hooks/useScript/index.js +16 -11
  67. package/dist/hooks/useTimeout/index.js +13 -11
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +49 -43
  70. package/dist/theme.js +87 -57
  71. package/dist/utils/date.js +8 -7
  72. package/dist/utils/debounce.js +13 -18
  73. package/dist/utils/flex.js +47 -30
  74. package/dist/utils/focusOutline.js +8 -4
  75. package/dist/utils/id.js +10 -8
  76. package/dist/utils/isReactElement.js +5 -3
  77. package/dist/utils/measure.js +11 -10
  78. package/dist/utils/responsiveProp.js +16 -17
  79. package/dist/utils/space.js +78 -62
  80. package/dist/utils/useControlledState.js +20 -12
  81. package/dist/utils/visuallyHidden.js +3 -6
  82. package/package.json +17 -16
  83. package/dist/Accordion/Accordion.js.map +0 -1
  84. package/dist/Accordion/Accordion.stories.d.ts +0 -9
  85. package/dist/Accordion/Accordion.stories.js +0 -11
  86. package/dist/Accordion/Accordion.stories.js.map +0 -1
  87. package/dist/Accordion/Collection.d.ts +0 -2
  88. package/dist/Accordion/Collection.js +0 -52
  89. package/dist/Accordion/Collection.js.map +0 -1
  90. package/dist/Accordion/__tests__/Accordion.d.ts +0 -1
  91. package/dist/Accordion/__tests__/Accordion.js +0 -9
  92. package/dist/Accordion/__tests__/Accordion.js.map +0 -1
  93. package/dist/Accordion/index.js +0 -2
  94. package/dist/Accordion/index.js.map +0 -1
  95. package/dist/ActionDropdown/ActionDropdown.js.map +0 -1
  96. package/dist/ActionDropdown/ActionDropdown.stories.d.ts +0 -7
  97. package/dist/ActionDropdown/ActionDropdown.stories.js +0 -13
  98. package/dist/ActionDropdown/ActionDropdown.stories.js.map +0 -1
  99. package/dist/ActionDropdown/Container.d.ts +0 -2
  100. package/dist/ActionDropdown/Container.js +0 -51
  101. package/dist/ActionDropdown/Container.js.map +0 -1
  102. package/dist/ActionDropdown/List.js.map +0 -1
  103. package/dist/ActionDropdown/__tests__/ActionDropdown.d.ts +0 -1
  104. package/dist/ActionDropdown/__tests__/ActionDropdown.js +0 -23
  105. package/dist/ActionDropdown/__tests__/ActionDropdown.js.map +0 -1
  106. package/dist/ActionDropdown/index.js +0 -2
  107. package/dist/ActionDropdown/index.js.map +0 -1
  108. package/dist/Banner/Banner.stories.d.ts +0 -9
  109. package/dist/Banner/Banner.stories.js +0 -86
  110. package/dist/Banner/Banner.stories.js.map +0 -1
  111. package/dist/Banner/BannerContainer.js.map +0 -1
  112. package/dist/Banner/BannerItem.js.map +0 -1
  113. package/dist/Banner/hooks.js.map +0 -1
  114. package/dist/Banner/index.js +0 -3
  115. package/dist/Banner/index.js.map +0 -1
  116. package/dist/Banner/types.js +0 -2
  117. package/dist/Banner/types.js.map +0 -1
  118. package/dist/Box/Box.js.map +0 -1
  119. package/dist/Box/Box.stories.d.ts +0 -7
  120. package/dist/Box/Box.stories.js +0 -38
  121. package/dist/Box/Box.stories.js.map +0 -1
  122. package/dist/Box/__tests__/Box.d.ts +0 -1
  123. package/dist/Box/__tests__/Box.js +0 -9
  124. package/dist/Box/__tests__/Box.js.map +0 -1
  125. package/dist/Box/index.js +0 -2
  126. package/dist/Box/index.js.map +0 -1
  127. package/dist/BrandCard/BrandCard.js.map +0 -1
  128. package/dist/BrandCard/BrandCard.stories.d.ts +0 -11
  129. package/dist/BrandCard/BrandCard.stories.js +0 -54
  130. package/dist/BrandCard/BrandCard.stories.js.map +0 -1
  131. package/dist/BrandCard/__tests__/BrandCard.d.ts +0 -1
  132. package/dist/BrandCard/__tests__/BrandCard.js +0 -9
  133. package/dist/BrandCard/__tests__/BrandCard.js.map +0 -1
  134. package/dist/BrandCard/index.js +0 -2
  135. package/dist/BrandCard/index.js.map +0 -1
  136. package/dist/Button/Button.js.map +0 -1
  137. package/dist/Button/Button.stories.d.ts +0 -16
  138. package/dist/Button/Button.stories.js +0 -28
  139. package/dist/Button/Button.stories.js.map +0 -1
  140. package/dist/Button/Collection.d.ts +0 -4
  141. package/dist/Button/Collection.js +0 -53
  142. package/dist/Button/Collection.js.map +0 -1
  143. package/dist/Button/InteractivePlayground.d.ts +0 -2
  144. package/dist/Button/InteractivePlayground.js +0 -17
  145. package/dist/Button/InteractivePlayground.js.map +0 -1
  146. package/dist/Button/__tests__/Button.d.ts +0 -1
  147. package/dist/Button/__tests__/Button.js +0 -9
  148. package/dist/Button/__tests__/Button.js.map +0 -1
  149. package/dist/Button/index.js +0 -2
  150. package/dist/Button/index.js.map +0 -1
  151. package/dist/Card/Card.js.map +0 -1
  152. package/dist/Card/Card.stories.d.ts +0 -17
  153. package/dist/Card/Card.stories.js +0 -92
  154. package/dist/Card/Card.stories.js.map +0 -1
  155. package/dist/Card/__tests__/Card.d.ts +0 -1
  156. package/dist/Card/__tests__/Card.js +0 -9
  157. package/dist/Card/__tests__/Card.js.map +0 -1
  158. package/dist/Card/index.js +0 -2
  159. package/dist/Card/index.js.map +0 -1
  160. package/dist/CheckBox/CheckBox.js.map +0 -1
  161. package/dist/CheckBox/CheckBox.stories.d.ts +0 -10
  162. package/dist/CheckBox/CheckBox.stories.js +0 -22
  163. package/dist/CheckBox/CheckBox.stories.js.map +0 -1
  164. package/dist/CheckBox/Container.d.ts +0 -2
  165. package/dist/CheckBox/Container.js +0 -7
  166. package/dist/CheckBox/Container.js.map +0 -1
  167. package/dist/CheckBox/__tests__/CheckBox.d.ts +0 -1
  168. package/dist/CheckBox/__tests__/CheckBox.js +0 -8
  169. package/dist/CheckBox/__tests__/CheckBox.js.map +0 -1
  170. package/dist/CheckBox/index.js +0 -2
  171. package/dist/CheckBox/index.js.map +0 -1
  172. package/dist/CheckBoxGroup/CheckBoxGroup.js.map +0 -1
  173. package/dist/CheckBoxGroup/CheckBoxGroup.stories.d.ts +0 -14
  174. package/dist/CheckBoxGroup/CheckBoxGroup.stories.js +0 -40
  175. package/dist/CheckBoxGroup/CheckBoxGroup.stories.js.map +0 -1
  176. package/dist/CheckBoxGroup/index.js +0 -2
  177. package/dist/CheckBoxGroup/index.js.map +0 -1
  178. package/dist/Chip/Chip.js.map +0 -1
  179. package/dist/Chip/Chip.stories.d.ts +0 -16
  180. package/dist/Chip/Chip.stories.js +0 -35
  181. package/dist/Chip/Chip.stories.js.map +0 -1
  182. package/dist/Chip/index.js +0 -2
  183. package/dist/Chip/index.js.map +0 -1
  184. package/dist/CurrencyInput/Collection.d.ts +0 -2
  185. package/dist/CurrencyInput/Collection.js +0 -65
  186. package/dist/CurrencyInput/Collection.js.map +0 -1
  187. package/dist/CurrencyInput/CurrencyInput.js.map +0 -1
  188. package/dist/CurrencyInput/CurrencyInput.stories.d.ts +0 -16
  189. package/dist/CurrencyInput/CurrencyInput.stories.js +0 -33
  190. package/dist/CurrencyInput/CurrencyInput.stories.js.map +0 -1
  191. package/dist/CurrencyInput/Example.d.ts +0 -2
  192. package/dist/CurrencyInput/Example.js +0 -8
  193. package/dist/CurrencyInput/Example.js.map +0 -1
  194. package/dist/CurrencyInput/__tests__/CurrencyInput.d.ts +0 -1
  195. package/dist/CurrencyInput/__tests__/CurrencyInput.js +0 -17
  196. package/dist/CurrencyInput/__tests__/CurrencyInput.js.map +0 -1
  197. package/dist/CurrencyInput/index.js +0 -2
  198. package/dist/CurrencyInput/index.js.map +0 -1
  199. package/dist/Datepicker/Datepicker.js.map +0 -1
  200. package/dist/Datepicker/Datepicker.stories.d.ts +0 -13
  201. package/dist/Datepicker/Datepicker.stories.js +0 -18
  202. package/dist/Datepicker/Datepicker.stories.js.map +0 -1
  203. package/dist/Datepicker/DatesList.js.map +0 -1
  204. package/dist/Datepicker/index.js +0 -2
  205. package/dist/Datepicker/index.js.map +0 -1
  206. package/dist/Datepicker/types.js +0 -2
  207. package/dist/Datepicker/types.js.map +0 -1
  208. package/dist/Divider/Divider.js.map +0 -1
  209. package/dist/Divider/Divier.stories.d.ts +0 -8
  210. package/dist/Divider/Divier.stories.js +0 -10
  211. package/dist/Divider/Divier.stories.js.map +0 -1
  212. package/dist/Divider/index.js +0 -2
  213. package/dist/Divider/index.js.map +0 -1
  214. package/dist/Dropdown/Collection.d.ts +0 -2
  215. package/dist/Dropdown/Collection.js +0 -101
  216. package/dist/Dropdown/Collection.js.map +0 -1
  217. package/dist/Dropdown/Container.d.ts +0 -2
  218. package/dist/Dropdown/Container.js +0 -98
  219. package/dist/Dropdown/Container.js.map +0 -1
  220. package/dist/Dropdown/Dropdown.js.map +0 -1
  221. package/dist/Dropdown/Dropdown.stories.d.ts +0 -15
  222. package/dist/Dropdown/Dropdown.stories.js +0 -54
  223. package/dist/Dropdown/Dropdown.stories.js.map +0 -1
  224. package/dist/Dropdown/index.js +0 -2
  225. package/dist/Dropdown/index.js.map +0 -1
  226. package/dist/Emoji/Emoji.js.map +0 -1
  227. package/dist/Emoji/Emoji.stories.d.ts +0 -8
  228. package/dist/Emoji/Emoji.stories.js +0 -18
  229. package/dist/Emoji/Emoji.stories.js.map +0 -1
  230. package/dist/Emoji/__tests__/Emoji.d.ts +0 -1
  231. package/dist/Emoji/__tests__/Emoji.js +0 -9
  232. package/dist/Emoji/__tests__/Emoji.js.map +0 -1
  233. package/dist/Emoji/index.js +0 -2
  234. package/dist/Emoji/index.js.map +0 -1
  235. package/dist/Icon/Container.d.ts +0 -2
  236. package/dist/Icon/Container.js +0 -638
  237. package/dist/Icon/Container.js.map +0 -1
  238. package/dist/Icon/Icon.js.map +0 -1
  239. package/dist/Icon/Icon.stories.d.ts +0 -9
  240. package/dist/Icon/Icon.stories.js +0 -31
  241. package/dist/Icon/Icon.stories.js.map +0 -1
  242. package/dist/Icon/__tests__/Icon.d.ts +0 -1
  243. package/dist/Icon/__tests__/Icon.js +0 -9
  244. package/dist/Icon/__tests__/Icon.js.map +0 -1
  245. package/dist/Icon/index.js +0 -2
  246. package/dist/Icon/index.js.map +0 -1
  247. package/dist/IconStrict/IconStrict.js.map +0 -1
  248. package/dist/IconStrict/IconStrict.stories.d.ts +0 -11
  249. package/dist/IconStrict/IconStrict.stories.js +0 -33
  250. package/dist/IconStrict/IconStrict.stories.js.map +0 -1
  251. package/dist/IconStrict/__tests__/IconStrict.d.ts +0 -1
  252. package/dist/IconStrict/__tests__/IconStrict.js +0 -9
  253. package/dist/IconStrict/__tests__/IconStrict.js.map +0 -1
  254. package/dist/IconStrict/index.js +0 -2
  255. package/dist/IconStrict/index.js.map +0 -1
  256. package/dist/IconWrapper/IconWrapper.js.map +0 -1
  257. package/dist/IconWrapper/IconWrapper.stories.d.ts +0 -13
  258. package/dist/IconWrapper/IconWrapper.stories.js +0 -45
  259. package/dist/IconWrapper/IconWrapper.stories.js.map +0 -1
  260. package/dist/IconWrapper/__tests__/IconWrapper.d.ts +0 -1
  261. package/dist/IconWrapper/__tests__/IconWrapper.js +0 -19
  262. package/dist/IconWrapper/__tests__/IconWrapper.js.map +0 -1
  263. package/dist/IconWrapper/index.js +0 -2
  264. package/dist/IconWrapper/index.js.map +0 -1
  265. package/dist/LabelledText/LabelledText.js.map +0 -1
  266. package/dist/LabelledText/LabelledText.stories.d.ts +0 -8
  267. package/dist/LabelledText/LabelledText.stories.js +0 -12
  268. package/dist/LabelledText/LabelledText.stories.js.map +0 -1
  269. package/dist/LabelledText/__tests__/LabelledText.d.ts +0 -1
  270. package/dist/LabelledText/__tests__/LabelledText.js +0 -9
  271. package/dist/LabelledText/__tests__/LabelledText.js.map +0 -1
  272. package/dist/LabelledText/index.js +0 -2
  273. package/dist/LabelledText/index.js.map +0 -1
  274. package/dist/Link/Link.js.map +0 -1
  275. package/dist/Link/Link.stories.d.ts +0 -16
  276. package/dist/Link/Link.stories.js +0 -38
  277. package/dist/Link/Link.stories.js.map +0 -1
  278. package/dist/Link/index.js +0 -2
  279. package/dist/Link/index.js.map +0 -1
  280. package/dist/Loader/Loader.js.map +0 -1
  281. package/dist/Loader/Loader.stories.d.ts +0 -9
  282. package/dist/Loader/Loader.stories.js +0 -17
  283. package/dist/Loader/Loader.stories.js.map +0 -1
  284. package/dist/Loader/__tests__/Loader.d.ts +0 -1
  285. package/dist/Loader/__tests__/Loader.js +0 -9
  286. package/dist/Loader/__tests__/Loader.js.map +0 -1
  287. package/dist/Loader/index.js +0 -2
  288. package/dist/Loader/index.js.map +0 -1
  289. package/dist/Logo/Collection.d.ts +0 -4
  290. package/dist/Logo/Collection.js +0 -33
  291. package/dist/Logo/Collection.js.map +0 -1
  292. package/dist/Logo/Logo.js.map +0 -1
  293. package/dist/Logo/Logo.stories.d.ts +0 -13
  294. package/dist/Logo/Logo.stories.js +0 -28
  295. package/dist/Logo/Logo.stories.js.map +0 -1
  296. package/dist/Logo/index.js +0 -2
  297. package/dist/Logo/index.js.map +0 -1
  298. package/dist/Modal/Modal.js.map +0 -1
  299. package/dist/Modal/Modal.stories.d.ts +0 -13
  300. package/dist/Modal/Modal.stories.js +0 -28
  301. package/dist/Modal/Modal.stories.js.map +0 -1
  302. package/dist/Modal/__tests__/Modal.d.ts +0 -1
  303. package/dist/Modal/__tests__/Modal.js +0 -9
  304. package/dist/Modal/__tests__/Modal.js.map +0 -1
  305. package/dist/Modal/index.js +0 -2
  306. package/dist/Modal/index.js.map +0 -1
  307. package/dist/Modal/useBodyScrollLock.js.map +0 -1
  308. package/dist/NumberInput/Collection.d.ts +0 -2
  309. package/dist/NumberInput/Collection.js +0 -97
  310. package/dist/NumberInput/Collection.js.map +0 -1
  311. package/dist/NumberInput/Container.d.ts +0 -2
  312. package/dist/NumberInput/Container.js +0 -10
  313. package/dist/NumberInput/Container.js.map +0 -1
  314. package/dist/NumberInput/NumberInput.js.map +0 -1
  315. package/dist/NumberInput/NumberInput.stories.d.ts +0 -16
  316. package/dist/NumberInput/NumberInput.stories.js +0 -33
  317. package/dist/NumberInput/NumberInput.stories.js.map +0 -1
  318. package/dist/NumberInput/__tests__/NumberInput.d.ts +0 -1
  319. package/dist/NumberInput/__tests__/NumberInput.js +0 -33
  320. package/dist/NumberInput/__tests__/NumberInput.js.map +0 -1
  321. package/dist/NumberInput/index.js +0 -2
  322. package/dist/NumberInput/index.js.map +0 -1
  323. package/dist/Pagination/Pagination.js.map +0 -1
  324. package/dist/Pagination/Pagination.stories.d.ts +0 -14
  325. package/dist/Pagination/Pagination.stories.js +0 -26
  326. package/dist/Pagination/Pagination.stories.js.map +0 -1
  327. package/dist/Pagination/__tests__/Pagination.d.ts +0 -1
  328. package/dist/Pagination/__tests__/Pagination.js +0 -9
  329. package/dist/Pagination/__tests__/Pagination.js.map +0 -1
  330. package/dist/Pagination/index.js +0 -2
  331. package/dist/Pagination/index.js.map +0 -1
  332. package/dist/RadioGroup/RadioElement.js.map +0 -1
  333. package/dist/RadioGroup/RadioGroup.js.map +0 -1
  334. package/dist/RadioGroup/RadioGroup.stories.d.ts +0 -33
  335. package/dist/RadioGroup/RadioGroup.stories.js +0 -76
  336. package/dist/RadioGroup/RadioGroup.stories.js.map +0 -1
  337. package/dist/RadioGroup/RadioItem.js.map +0 -1
  338. package/dist/RadioGroup/constants.js.map +0 -1
  339. package/dist/RadioGroup/index.js +0 -2
  340. package/dist/RadioGroup/index.js.map +0 -1
  341. package/dist/RadioGroup/types.js +0 -2
  342. package/dist/RadioGroup/types.js.map +0 -1
  343. package/dist/Row/Row.js.map +0 -1
  344. package/dist/Row/Row.stories.d.ts +0 -20
  345. package/dist/Row/Row.stories.js +0 -63
  346. package/dist/Row/Row.stories.js.map +0 -1
  347. package/dist/Row/__tests__/Row.d.ts +0 -1
  348. package/dist/Row/__tests__/Row.js +0 -10
  349. package/dist/Row/__tests__/Row.js.map +0 -1
  350. package/dist/Row/index.js +0 -2
  351. package/dist/Row/index.js.map +0 -1
  352. package/dist/SearchInput/Container.d.ts +0 -3
  353. package/dist/SearchInput/Container.js +0 -36
  354. package/dist/SearchInput/Container.js.map +0 -1
  355. package/dist/SearchInput/SearchInput.js.map +0 -1
  356. package/dist/SearchInput/SearchInput.stories.d.ts +0 -9
  357. package/dist/SearchInput/SearchInput.stories.js +0 -16
  358. package/dist/SearchInput/SearchInput.stories.js.map +0 -1
  359. package/dist/SearchInput/SearchOptions.js.map +0 -1
  360. package/dist/SearchInput/index.js +0 -2
  361. package/dist/SearchInput/index.js.map +0 -1
  362. package/dist/Snackbar/Snackbar.stories.d.ts +0 -9
  363. package/dist/Snackbar/Snackbar.stories.js +0 -26
  364. package/dist/Snackbar/Snackbar.stories.js.map +0 -1
  365. package/dist/Snackbar/SnackbarContainer.js.map +0 -1
  366. package/dist/Snackbar/SnackbarItem.js.map +0 -1
  367. package/dist/Snackbar/hooks.js.map +0 -1
  368. package/dist/Snackbar/index.js +0 -3
  369. package/dist/Snackbar/index.js.map +0 -1
  370. package/dist/Snackbar/types.js +0 -2
  371. package/dist/Snackbar/types.js.map +0 -1
  372. package/dist/SupportMessage/Collection.d.ts +0 -2
  373. package/dist/SupportMessage/Collection.js +0 -63
  374. package/dist/SupportMessage/Collection.js.map +0 -1
  375. package/dist/SupportMessage/SupportMessage.js.map +0 -1
  376. package/dist/SupportMessage/SupportMessage.stories.d.ts +0 -11
  377. package/dist/SupportMessage/SupportMessage.stories.js +0 -33
  378. package/dist/SupportMessage/SupportMessage.stories.js.map +0 -1
  379. package/dist/SupportMessage/SupportMessage.test.d.ts +0 -1
  380. package/dist/SupportMessage/SupportMessage.test.js +0 -29
  381. package/dist/SupportMessage/SupportMessage.test.js.map +0 -1
  382. package/dist/SupportMessage/index.js +0 -2
  383. package/dist/SupportMessage/index.js.map +0 -1
  384. package/dist/Table/Table.js.map +0 -1
  385. package/dist/Table/Table.stories.d.ts +0 -21
  386. package/dist/Table/Table.stories.js +0 -173
  387. package/dist/Table/Table.stories.js.map +0 -1
  388. package/dist/Table/components/RowActions.js.map +0 -1
  389. package/dist/Table/components/TableHeader.js.map +0 -1
  390. package/dist/Table/components/TableRow.js.map +0 -1
  391. package/dist/Table/components/commonComponents.js.map +0 -1
  392. package/dist/Table/helpers.js.map +0 -1
  393. package/dist/Table/index.js +0 -3
  394. package/dist/Table/index.js.map +0 -1
  395. package/dist/Table/storyUtils.d.ts +0 -68
  396. package/dist/Table/storyUtils.js +0 -204
  397. package/dist/Table/storyUtils.js.map +0 -1
  398. package/dist/Table/types.js +0 -2
  399. package/dist/Table/types.js.map +0 -1
  400. package/dist/Tag/Collection.d.ts +0 -2
  401. package/dist/Tag/Collection.js +0 -77
  402. package/dist/Tag/Collection.js.map +0 -1
  403. package/dist/Tag/Tag.js.map +0 -1
  404. package/dist/Tag/Tag.stories.d.ts +0 -9
  405. package/dist/Tag/Tag.stories.js +0 -22
  406. package/dist/Tag/Tag.stories.js.map +0 -1
  407. package/dist/Tag/__tests__/Tag.d.ts +0 -1
  408. package/dist/Tag/__tests__/Tag.js +0 -9
  409. package/dist/Tag/__tests__/Tag.js.map +0 -1
  410. package/dist/Tag/index.js +0 -2
  411. package/dist/Tag/index.js.map +0 -1
  412. package/dist/Text/Text.js.map +0 -1
  413. package/dist/Text/Text.stories.d.ts +0 -12
  414. package/dist/Text/Text.stories.js +0 -60
  415. package/dist/Text/Text.stories.js.map +0 -1
  416. package/dist/Text/__tests__/Text.d.ts +0 -1
  417. package/dist/Text/__tests__/Text.js +0 -9
  418. package/dist/Text/__tests__/Text.js.map +0 -1
  419. package/dist/Text/fontMapping.js.map +0 -1
  420. package/dist/Text/index.js +0 -2
  421. package/dist/Text/index.js.map +0 -1
  422. package/dist/TextInput/Collection.d.ts +0 -2
  423. package/dist/TextInput/Collection.js +0 -80
  424. package/dist/TextInput/Collection.js.map +0 -1
  425. package/dist/TextInput/Container.d.ts +0 -2
  426. package/dist/TextInput/Container.js +0 -8
  427. package/dist/TextInput/Container.js.map +0 -1
  428. package/dist/TextInput/TextInput.js.map +0 -1
  429. package/dist/TextInput/TextInput.stories.d.ts +0 -17
  430. package/dist/TextInput/TextInput.stories.js +0 -44
  431. package/dist/TextInput/TextInput.stories.js.map +0 -1
  432. package/dist/TextInput/__tests__/TextInput.d.ts +0 -1
  433. package/dist/TextInput/__tests__/TextInput.js +0 -9
  434. package/dist/TextInput/__tests__/TextInput.js.map +0 -1
  435. package/dist/TextInput/index.js +0 -2
  436. package/dist/TextInput/index.js.map +0 -1
  437. package/dist/Textarea/Container.d.ts +0 -2
  438. package/dist/Textarea/Container.js +0 -8
  439. package/dist/Textarea/Container.js.map +0 -1
  440. package/dist/Textarea/Textarea.js.map +0 -1
  441. package/dist/Textarea/Textarea.stories.d.ts +0 -13
  442. package/dist/Textarea/Textarea.stories.js +0 -66
  443. package/dist/Textarea/Textarea.stories.js.map +0 -1
  444. package/dist/Textarea/index.js +0 -2
  445. package/dist/Textarea/index.js.map +0 -1
  446. package/dist/Toggle/Container.d.ts +0 -2
  447. package/dist/Toggle/Container.js +0 -7
  448. package/dist/Toggle/Container.js.map +0 -1
  449. package/dist/Toggle/Toggle.js.map +0 -1
  450. package/dist/Toggle/Toggle.stories.d.ts +0 -11
  451. package/dist/Toggle/Toggle.stories.js +0 -10
  452. package/dist/Toggle/Toggle.stories.js.map +0 -1
  453. package/dist/Toggle/__tests__/Toggle.d.ts +0 -1
  454. package/dist/Toggle/__tests__/Toggle.js +0 -9
  455. package/dist/Toggle/__tests__/Toggle.js.map +0 -1
  456. package/dist/Toggle/index.js +0 -2
  457. package/dist/Toggle/index.js.map +0 -1
  458. package/dist/Tooltip/Tooltip.js.map +0 -1
  459. package/dist/Tooltip/Tooltip.stories.d.ts +0 -12
  460. package/dist/Tooltip/Tooltip.stories.js +0 -87
  461. package/dist/Tooltip/Tooltip.stories.js.map +0 -1
  462. package/dist/Tooltip/index.js +0 -2
  463. package/dist/Tooltip/index.js.map +0 -1
  464. package/dist/colors.stories.d.ts +0 -7
  465. package/dist/colors.stories.js +0 -100
  466. package/dist/colors.stories.js.map +0 -1
  467. package/dist/fields/Field/Field.js.map +0 -1
  468. package/dist/fields/Field/index.js +0 -2
  469. package/dist/fields/Field/index.js.map +0 -1
  470. package/dist/fields/Fieldset/Fieldset.js.map +0 -1
  471. package/dist/fields/Fieldset/Fieldset.stories.d.ts +0 -11
  472. package/dist/fields/Fieldset/Fieldset.stories.js +0 -34
  473. package/dist/fields/Fieldset/Fieldset.stories.js.map +0 -1
  474. package/dist/fields/Fieldset/index.js +0 -2
  475. package/dist/fields/Fieldset/index.js.map +0 -1
  476. package/dist/fields/commonFieldTypes.js +0 -2
  477. package/dist/fields/commonFieldTypes.js.map +0 -1
  478. package/dist/fields/components/CommonInput.js.map +0 -1
  479. package/dist/fields/components/InternalField.js.map +0 -1
  480. package/dist/fields/components/Placeholder.js +0 -25
  481. package/dist/fields/components/Placeholder.js.map +0 -1
  482. package/dist/fontStyle.js.map +0 -1
  483. package/dist/hooks/index.js +0 -5
  484. package/dist/hooks/index.js.map +0 -1
  485. package/dist/hooks/useClickOutside/index.js.map +0 -1
  486. package/dist/hooks/useClickOutside/useClickOutside.test.js +0 -46
  487. package/dist/hooks/useClickOutside/useClickOutside.test.js.map +0 -1
  488. package/dist/hooks/useEventListener/index.js.map +0 -1
  489. package/dist/hooks/useEventListener/useEventLitener.test.js +0 -36
  490. package/dist/hooks/useEventListener/useEventLitener.test.js.map +0 -1
  491. package/dist/hooks/useScript/index.js.map +0 -1
  492. package/dist/hooks/useScript/useScript.test.js +0 -17
  493. package/dist/hooks/useScript/useScript.test.js.map +0 -1
  494. package/dist/hooks/useTimeout/index.js.map +0 -1
  495. package/dist/index.js.map +0 -1
  496. package/dist/setupTests.d.ts +0 -1
  497. package/dist/setupTests.js +0 -2
  498. package/dist/setupTests.js.map +0 -1
  499. package/dist/theme.js.map +0 -1
  500. package/dist/tokenTest.spec.js +0 -8
  501. package/dist/tokenTest.spec.js.map +0 -1
  502. package/dist/types.js +0 -2
  503. package/dist/types.js.map +0 -1
  504. package/dist/utils/date.js.map +0 -1
  505. package/dist/utils/debounce.js.map +0 -1
  506. package/dist/utils/deprecated.js +0 -30
  507. package/dist/utils/deprecated.js.map +0 -1
  508. package/dist/utils/flex.js.map +0 -1
  509. package/dist/utils/focusOutline.js.map +0 -1
  510. package/dist/utils/id.js.map +0 -1
  511. package/dist/utils/id.test.js +0 -21
  512. package/dist/utils/id.test.js.map +0 -1
  513. package/dist/utils/isReactElement.js.map +0 -1
  514. package/dist/utils/measure.js.map +0 -1
  515. package/dist/utils/noop.js +0 -3
  516. package/dist/utils/noop.js.map +0 -1
  517. package/dist/utils/responsiveProp.js.map +0 -1
  518. package/dist/utils/space.js.map +0 -1
  519. package/dist/utils/useControlledState.js.map +0 -1
  520. package/dist/utils/visuallyHidden.js.map +0 -1
@@ -1,23 +1,59 @@
1
- import React from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import styled from 'styled-components';
3
- import { theme } from '../theme';
4
- import { Box } from '../Box';
5
- import { Text } from '../Text';
6
- export const BrandCard = ({ title, body, visual, visualHeight = '', alignVisual, visualBottom, tag, buttonAction, fallbackStyle = false, bgColour = 'matcha', maxWidth = '', ...otherProps }) => {
7
- return (React.createElement(Container, { maxWidth: maxWidth, visual: visual, fallbackStyle: fallbackStyle, bgColor: bgColour, ...otherProps },
8
- tag && React.createElement(TagWrapper, null, tag),
9
- visual && !visualBottom && (React.createElement(VisualWrapper, { visualHeight: visualHeight },
10
- React.createElement(Visual, { visualUrl: visual, visualHeight: visualHeight, alignVisual: alignVisual }))),
11
- React.createElement(Box, { flex: true, alignItems: "center", justifyContent: "space-between", mt: "16px" },
12
- React.createElement(Box, { flex: true, alignItems: "center" },
13
- React.createElement(Box, null,
14
- title && (React.createElement(Text, { typo: "hero-alternate", color: "liquorice" }, title)),
15
- body && (React.createElement(Text, { typo: "body-regular", color: "liquorice" }, body))))),
16
- buttonAction && React.createElement(Box, { mt: "16px" }, buttonAction),
17
- visual && visualBottom && (React.createElement(VisualWrapper, { visualHeight: visualHeight, mt: "16px" },
18
- React.createElement(Visual, { visualUrl: visual, visualHeight: visualHeight, alignVisual: alignVisual })))));
3
+ import { theme } from '../theme.js';
4
+ import { Box } from '../Box/Box.js';
5
+ import { Text } from '../Text/Text.js';
6
+
7
+ const BrandCard = ({
8
+ title,
9
+ body,
10
+ visual,
11
+ visualHeight = "",
12
+ alignVisual,
13
+ visualBottom,
14
+ tag,
15
+ buttonAction,
16
+ fallbackStyle = false,
17
+ bgColour = "matcha",
18
+ maxWidth = "",
19
+ ...otherProps
20
+ }) => {
21
+ return /* @__PURE__ */ jsxs(
22
+ Container,
23
+ {
24
+ maxWidth,
25
+ visual,
26
+ fallbackStyle,
27
+ bgColor: bgColour,
28
+ ...otherProps,
29
+ children: [
30
+ tag && /* @__PURE__ */ jsx(TagWrapper, { children: tag }),
31
+ visual && !visualBottom && /* @__PURE__ */ jsx(VisualWrapper, { visualHeight, children: /* @__PURE__ */ jsx(
32
+ Visual,
33
+ {
34
+ visualUrl: visual,
35
+ visualHeight,
36
+ alignVisual
37
+ }
38
+ ) }),
39
+ /* @__PURE__ */ jsx(Box, { flex: true, alignItems: "center", justifyContent: "space-between", mt: "16px", children: /* @__PURE__ */ jsx(Box, { flex: true, alignItems: "center", children: /* @__PURE__ */ jsxs(Box, { children: [
40
+ title && /* @__PURE__ */ jsx(Text, { typo: "hero-alternate", color: "liquorice", children: title }),
41
+ body && /* @__PURE__ */ jsx(Text, { typo: "body-regular", color: "liquorice", children: body })
42
+ ] }) }) }),
43
+ buttonAction && /* @__PURE__ */ jsx(Box, { mt: "16px", children: buttonAction }),
44
+ visual && visualBottom && /* @__PURE__ */ jsx(VisualWrapper, { visualHeight, mt: "16px", children: /* @__PURE__ */ jsx(
45
+ Visual,
46
+ {
47
+ visualUrl: visual,
48
+ visualHeight,
49
+ alignVisual
50
+ }
51
+ ) })
52
+ ]
53
+ }
54
+ );
19
55
  };
20
- const Container = styled(Box) `
56
+ const Container = styled(Box)`
21
57
  background: ${({ fallbackStyle, bgColor }) => fallbackStyle ? theme.colors.cream : theme.colors[bgColor]};
22
58
  box-sizing: border-box;
23
59
  border-radius: 16px 16px 0px 0px;
@@ -26,23 +62,24 @@ const Container = styled(Box) `
26
62
  position: relative;
27
63
  overflow: hidden;
28
64
  `;
29
- const TagWrapper = styled(Box) `
65
+ const TagWrapper = styled(Box)`
30
66
  position: absolute;
31
67
  top: 16px;
32
68
  right: 16px;
33
69
  `;
34
- const VisualWrapper = styled(Box) `
70
+ const VisualWrapper = styled(Box)`
35
71
  width: 100%;
36
72
 
37
73
  ${({ visualHeight }) => visualHeight && `height: ${visualHeight};`}
38
74
  `;
39
- const Visual = styled(Box) `
75
+ const Visual = styled(Box)`
40
76
  width: 100%;
41
77
  background-image: url('${(p) => p.visualUrl}');
42
78
  background-size: contain;
43
79
  background-repeat: no-repeat;
44
- background-position: ${({ alignVisual }) => alignVisual ? alignVisual : 'left'};
80
+ background-position: ${({ alignVisual }) => alignVisual ? alignVisual : "left"};
45
81
 
46
- ${({ visualHeight }) => visualHeight ? `height: ${visualHeight};` : 'padding-top: 100%;'}
82
+ ${({ visualHeight }) => visualHeight ? `height: ${visualHeight};` : "padding-top: 100%;"}
47
83
  `;
48
- //# sourceMappingURL=BrandCard.js.map
84
+
85
+ export { BrandCard };
@@ -1,22 +1,93 @@
1
- import React, { forwardRef } from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
2
3
  import styled, { css } from 'styled-components';
3
- import { Box } from '../Box';
4
- import { Icon as IconComponent } from '../Icon';
5
- import { Loader } from '../Loader';
6
- import { theme } from '../theme';
7
- import { focusOutlineStyle } from '../utils/focusOutline';
8
- export const Button = forwardRef((props, ref) => {
9
- const { children, id, className = '', disabled = false, handleClick, loading = false, primary = false, secondary = false, fallbackStyle = false, textBtn = false, smallButton = false, icon = '', trailingIcon = false, forcedWidth = '', form, type, ...otherProps } = props;
10
- return (React.createElement(Container, { as: "button", id: id, className: className, disabled: disabled || loading, onClick: handleClick, "$loading": loading, primary: primary, secondary: secondary, fallbackStyle: fallbackStyle, textBtn: textBtn, smallButton: smallButton, icon: icon, trailingIcon: trailingIcon, forcedWidth: forcedWidth, ...(form ? { form } : {}), type: type, ...otherProps, ref: ref },
11
- loading && (React.createElement(LoaderContainer, null,
12
- React.createElement(Loader, { color: 'liquorice', height: "16" }))),
13
- React.createElement(ContentContainer, { icon: icon, "$loading": loading },
14
- !trailingIcon && icon && (React.createElement(IconContainer, { trailingIcon: trailingIcon, render: icon, size: smallButton ? 16 : 24, color: 'liquorice' })),
15
- React.createElement(ChildrenContainer, { className: "childrenContainer" }, children),
16
- trailingIcon && icon && textBtn && (React.createElement(IconContainer, { trailingIcon: trailingIcon, render: icon, size: smallButton ? 16 : 24, color: 'liquorice', className: "iconContainer" })))));
4
+ import { Box } from '../Box/Box.js';
5
+ import { Icon } from '../Icon/Icon.js';
6
+ import { Loader } from '../Loader/Loader.js';
7
+ import { theme } from '../theme.js';
8
+ import { focusOutlineStyle } from '../utils/focusOutline.js';
9
+
10
+ const Button = forwardRef((props, ref) => {
11
+ const {
12
+ children,
13
+ id,
14
+ className = "",
15
+ disabled = false,
16
+ handleClick,
17
+ loading = false,
18
+ primary = false,
19
+ secondary = false,
20
+ fallbackStyle = false,
21
+ textBtn = false,
22
+ smallButton = false,
23
+ icon,
24
+ trailingIcon = false,
25
+ forcedWidth = "",
26
+ form,
27
+ type,
28
+ ...otherProps
29
+ } = props;
30
+ return /* @__PURE__ */ jsxs(
31
+ Container,
32
+ {
33
+ as: "button",
34
+ id,
35
+ className,
36
+ disabled: disabled || loading,
37
+ onClick: handleClick,
38
+ $loading: loading,
39
+ primary,
40
+ secondary,
41
+ fallbackStyle,
42
+ textBtn,
43
+ smallButton,
44
+ icon,
45
+ trailingIcon,
46
+ forcedWidth,
47
+ ...form ? { form } : {},
48
+ type,
49
+ ...otherProps,
50
+ ref,
51
+ children: [
52
+ loading && /* @__PURE__ */ jsx(LoaderContainer, { children: /* @__PURE__ */ jsx(Loader, { color: "liquorice", height: "16" }) }),
53
+ /* @__PURE__ */ jsxs(ContentContainer, { icon, $loading: loading, children: [
54
+ !trailingIcon && icon && /* @__PURE__ */ jsx(
55
+ IconContainer,
56
+ {
57
+ trailingIcon,
58
+ render: icon,
59
+ size: smallButton ? 16 : 24,
60
+ color: "liquorice"
61
+ }
62
+ ),
63
+ /* @__PURE__ */ jsx(ChildrenContainer, { className: "childrenContainer", children }),
64
+ trailingIcon && icon && textBtn && /* @__PURE__ */ jsx(
65
+ IconContainer,
66
+ {
67
+ trailingIcon,
68
+ render: icon,
69
+ size: smallButton ? 16 : 24,
70
+ color: "liquorice",
71
+ className: "iconContainer"
72
+ }
73
+ )
74
+ ] })
75
+ ]
76
+ }
77
+ );
17
78
  });
18
- Button.displayName = 'Button';
19
- const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedWidth, fallbackStyle, textBtn, smallButton, }) => css `
79
+ Button.displayName = "Button";
80
+ const Container = styled(Box)(
81
+ ({
82
+ disabled,
83
+ $loading,
84
+ primary,
85
+ secondary,
86
+ forcedWidth,
87
+ fallbackStyle,
88
+ textBtn,
89
+ smallButton
90
+ }) => css`
20
91
  position: relative;
21
92
  background-color: ${theme.colors.marshmallowPink};
22
93
  box-shadow: none;
@@ -25,16 +96,15 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
25
96
  outline: none;
26
97
  border-radius: 10000px;
27
98
  font-weight: ${theme.font.weight.medium};
28
- cursor: ${disabled || $loading ? 'not-allowed' : 'pointer'};
99
+ cursor: ${disabled || $loading ? "not-allowed" : "pointer"};
29
100
  line-height: 100%;
30
101
  font-size: 16px;
31
- opacity: ${disabled ? '0.5' : '1'};
32
- width: ${forcedWidth ? forcedWidth : 'auto'};
102
+ opacity: ${disabled ? "0.5" : "1"};
103
+ width: ${forcedWidth ? forcedWidth : "auto"};
33
104
 
34
105
  ${focusOutlineStyle}
35
106
 
36
- ${primary &&
37
- css `
107
+ ${primary && css`
38
108
  color: ${theme.colors.liquorice};
39
109
 
40
110
  &:hover {
@@ -44,8 +114,7 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
44
114
  background-color: ${theme.colors.lollipop};
45
115
  }
46
116
  `}
47
- ${secondary &&
48
- css `
117
+ ${secondary && css`
49
118
  background-color: ${theme.colors.oatmeal};
50
119
 
51
120
  &:hover {
@@ -55,8 +124,7 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
55
124
  background-color: ${theme.colors.custard};
56
125
  }
57
126
  `}
58
- ${fallbackStyle &&
59
- css `
127
+ ${fallbackStyle && css`
60
128
  background-color: ${theme.colors.cream};
61
129
 
62
130
  &:hover {
@@ -66,8 +134,7 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
66
134
  background-color: ${theme.colors.mascarpone};
67
135
  }
68
136
  `}
69
- ${smallButton &&
70
- css `
137
+ ${smallButton && css`
71
138
  padding: 0 10px;
72
139
  min-width: 54px;
73
140
  font-size: 14px;
@@ -80,8 +147,7 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
80
147
  margin: 0 5px 0 0;
81
148
  }
82
149
  `}
83
- ${textBtn &&
84
- css `
150
+ ${textBtn && css`
85
151
  background-color: transparent;
86
152
  padding: 0;
87
153
  border-radius: 0;
@@ -95,8 +161,9 @@ const Container = styled(Box)(({ disabled, $loading, primary, secondary, forcedW
95
161
  color: ${theme.colors.sesame};
96
162
  }
97
163
  `}
98
- `);
99
- const LoaderContainer = styled.div `
164
+ `
165
+ );
166
+ const LoaderContainer = styled.div`
100
167
  position: absolute;
101
168
  top: 0;
102
169
  bottom: 0;
@@ -106,17 +173,20 @@ const LoaderContainer = styled.div `
106
173
  align-items: center;
107
174
  justify-content: center;
108
175
  `;
109
- const ContentContainer = styled.div `
176
+ const ContentContainer = styled.div`
110
177
  display: flex;
111
178
  align-items: center;
112
- justify-content: ${({ icon }) => (icon ? 'space-evenly' : 'center')};
113
- opacity: ${({ $loading }) => ($loading ? '0' : '1')};
179
+ justify-content: ${({ icon }) => icon ? "space-evenly" : "center"};
180
+ opacity: ${({ $loading }) => $loading ? "0" : "1"};
114
181
  `;
115
- const IconContainer = styled(IconComponent)(({ trailingIcon }) => css `
116
- margin: ${trailingIcon ? '0 0 0 10px' : '0 10px 0 0'};
117
- `);
118
- const ChildrenContainer = styled.div `
182
+ const IconContainer = styled(Icon)(
183
+ ({ trailingIcon }) => css`
184
+ margin: ${trailingIcon ? "0 0 0 10px" : "0 10px 0 0"};
185
+ `
186
+ );
187
+ const ChildrenContainer = styled.div`
119
188
  padding: 16px 0;
120
189
  flex-grow: 1;
121
190
  `;
122
- //# sourceMappingURL=Button.js.map
191
+
192
+ export { Button };
package/dist/Card/Card.js CHANGED
@@ -1,30 +1,79 @@
1
- import React from 'react';
2
- import styled, { css } from 'styled-components';
3
- import { theme } from '../theme';
4
- import { Box } from '../Box';
5
- import { Icon } from '../Icon';
6
- import { Text } from '../Text';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
2
  import { darken } from 'polished';
8
- import { focusOutlineStyle } from '../utils/focusOutline';
9
- export const Card = ({ children, leadingIcon, title, body, visual, tag, cardOnClickAction, rightAction, buttonAction, fallbackStyle = false, visualHeight = '', className = '', maxWidth = '', marginX = '', marginY = '', narrow = false, wide = false, ...otherProps }) => {
10
- const addChildMargin = (!!leadingIcon || !!title || !!body) && children;
11
- const isNotClickable = !cardOnClickAction;
12
- return (React.createElement(Container, { className: className, maxWidth: maxWidth, marginX: marginX, marginY: marginY, narrow: narrow, wide: wide, visual: visual, fallbackStyle: fallbackStyle, isNotClickable: isNotClickable, onClick: cardOnClickAction, tabIndex: isNotClickable ? undefined : 0, ...otherProps },
13
- tag && visual && React.createElement(TagWrapper, null, tag),
14
- visual && (React.createElement(VisualWrapper, { visualHeight: visualHeight },
15
- React.createElement(Visual, { visualUrl: visual, visualHeight: visualHeight }))),
16
- React.createElement(Box, { p: visual ? '16px' : { custom: '0px' } },
17
- React.createElement(Box, { flex: true, alignItems: "center", justifyContent: "space-between" },
18
- React.createElement(Box, { flex: true, alignItems: "center" },
19
- leadingIcon && (React.createElement(Icon, { mr: "12px", render: leadingIcon, size: 24, color: "liquorice" })),
20
- React.createElement(Box, null,
21
- title && (React.createElement(Text, { typo: "headline-regular", color: "liquorice" }, title)),
22
- body && (React.createElement(Text, { typo: "body-regular", color: "sesame" }, body)))),
23
- rightAction && rightAction),
24
- React.createElement(Box, { mt: addChildMargin ? '16px' : { custom: '0px' } }, children),
25
- buttonAction && React.createElement(Box, { mt: "16px" }, buttonAction))));
3
+ import styled, { css } from 'styled-components';
4
+ import { Box } from '../Box/Box.js';
5
+ import { Icon } from '../Icon/Icon.js';
6
+ import { Text } from '../Text/Text.js';
7
+ import { theme } from '../theme.js';
8
+ import { focusOutlineStyle } from '../utils/focusOutline.js';
9
+
10
+ const Card = ({
11
+ children,
12
+ leadingIcon,
13
+ title,
14
+ body,
15
+ visual,
16
+ tag,
17
+ cardOnClickAction,
18
+ rightAction,
19
+ buttonAction,
20
+ fallbackStyle = false,
21
+ visualHeight = "",
22
+ className = "",
23
+ maxWidth = "",
24
+ marginX = "",
25
+ marginY = "",
26
+ narrow = false,
27
+ wide = false,
28
+ ...otherProps
29
+ }) => {
30
+ const addChildMargin = (!!leadingIcon || !!title || !!body) && children;
31
+ const isNotClickable = !cardOnClickAction;
32
+ return /* @__PURE__ */ jsxs(
33
+ Container,
34
+ {
35
+ className,
36
+ maxWidth,
37
+ marginX,
38
+ marginY,
39
+ narrow,
40
+ wide,
41
+ visual,
42
+ fallbackStyle,
43
+ isNotClickable,
44
+ onClick: cardOnClickAction,
45
+ tabIndex: isNotClickable ? void 0 : 0,
46
+ ...otherProps,
47
+ children: [
48
+ tag && visual && /* @__PURE__ */ jsx(TagWrapper, { children: tag }),
49
+ visual && /* @__PURE__ */ jsx(VisualWrapper, { visualHeight, children: /* @__PURE__ */ jsx(Visual, { visualUrl: visual, visualHeight }) }),
50
+ /* @__PURE__ */ jsxs(Box, { p: visual ? "16px" : { custom: "0px" }, children: [
51
+ /* @__PURE__ */ jsxs(Box, { flex: true, alignItems: "center", justifyContent: "space-between", children: [
52
+ /* @__PURE__ */ jsxs(Box, { flex: true, alignItems: "center", children: [
53
+ leadingIcon && /* @__PURE__ */ jsx(
54
+ Icon,
55
+ {
56
+ mr: "12px",
57
+ render: leadingIcon,
58
+ size: 24,
59
+ color: "liquorice"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ jsxs(Box, { children: [
63
+ title && /* @__PURE__ */ jsx(Text, { typo: "headline-regular", color: "liquorice", children: title }),
64
+ body && /* @__PURE__ */ jsx(Text, { typo: "body-regular", color: "sesame", children: body })
65
+ ] })
66
+ ] }),
67
+ rightAction && rightAction
68
+ ] }),
69
+ /* @__PURE__ */ jsx(Box, { mt: addChildMargin ? "16px" : { custom: "0px" }, children }),
70
+ buttonAction && /* @__PURE__ */ jsx(Box, { mt: "16px", children: buttonAction })
71
+ ] })
72
+ ]
73
+ }
74
+ );
26
75
  };
27
- const Container = styled(Box) `
76
+ const Container = styled(Box)`
28
77
  background: ${({ fallbackStyle }) => fallbackStyle ? theme.colors.cream : theme.colors.custard};
29
78
  box-sizing: border-box;
30
79
  border-radius: 16px;
@@ -35,38 +84,41 @@ const Container = styled(Box) `
35
84
  margin-bottom: ${(p) => p.marginY};
36
85
  margin-left: ${(p) => p.marginX};
37
86
 
38
- padding: ${({ visual }) => (visual ? '0px' : '16px')};
87
+ padding: ${({ visual }) => visual ? "0px" : "16px"};
39
88
  position: relative;
40
89
  overflow: hidden;
41
90
 
42
- ${({ isNotClickable, fallbackStyle }) => !isNotClickable &&
43
- css `
91
+ ${({ isNotClickable, fallbackStyle }) => !isNotClickable && css`
44
92
  cursor: pointer;
45
93
  &:hover {
46
- background: ${darken(0.1, fallbackStyle ? theme.colors.cream : theme.colors.custard)};
94
+ background: ${darken(
95
+ 0.1,
96
+ fallbackStyle ? theme.colors.cream : theme.colors.custard
97
+ )};
47
98
  }
48
99
 
49
100
  ${focusOutlineStyle}
50
101
  `};
51
102
  `;
52
- const TagWrapper = styled(Box) `
103
+ const TagWrapper = styled(Box)`
53
104
  position: absolute;
54
105
  top: 12px;
55
106
  right: 12px;
56
107
  `;
57
- const VisualWrapper = styled(Box) `
108
+ const VisualWrapper = styled(Box)`
58
109
  width: 100%;
59
110
  margin-top: -16px;
60
111
 
61
112
  ${({ visualHeight }) => visualHeight && `height: ${visualHeight};`}
62
113
  `;
63
- const Visual = styled(Box) `
114
+ const Visual = styled(Box)`
64
115
  width: 100%;
65
116
  background-image: url('${(p) => p.visualUrl}');
66
117
  background-size: cover;
67
118
  background-repeat: no-repeat;
68
119
  background-position: center;
69
120
 
70
- ${({ visualHeight }) => visualHeight ? `height: ${visualHeight};` : 'padding-top: 100%;'}
121
+ ${({ visualHeight }) => visualHeight ? `height: ${visualHeight};` : "padding-top: 100%;"}
71
122
  `;
72
- //# sourceMappingURL=Card.js.map
123
+
124
+ export { Card };
@@ -1,26 +1,46 @@
1
- import React, { forwardRef } from 'react';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
2
3
  import styled from 'styled-components';
3
- import { focusOutline } from '../utils/focusOutline';
4
- import { Text } from '../Text';
5
- import { theme } from '../theme';
6
- import { useUniqueId } from '../utils/id';
7
- export const CheckBox = forwardRef(function CheckBox({ id: idProp, checked, children, toggle, error, errorMsg }, ref) {
4
+ import { focusOutline } from '../utils/focusOutline.js';
5
+ import { Text } from '../Text/Text.js';
6
+ import { theme } from '../theme.js';
7
+ import { useUniqueId } from '../utils/id.js';
8
+
9
+ const CheckBox = forwardRef(
10
+ function CheckBox2({ id: idProp, checked, children, toggle, error, errorMsg }, ref) {
8
11
  const id = useUniqueId(idProp);
9
- return (React.createElement(React.Fragment, null,
10
- React.createElement(BoxContainer, { id: id },
11
- React.createElement(Text, { tag: "span", typo: "base", color: error ? 'strawberry' : 'liquorice' }, children),
12
- React.createElement("input", { ref: ref, type: "checkbox", checked: checked, onChange: toggle }),
13
- React.createElement(Checkmark, { error: error })),
14
- error && errorMsg && React.createElement(ErrorBox, null, errorMsg)));
15
- });
16
- const Checkmark = styled.span `
12
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
13
+ /* @__PURE__ */ jsxs(BoxContainer, { id, children: [
14
+ /* @__PURE__ */ jsx(
15
+ Text,
16
+ {
17
+ tag: "span",
18
+ typo: "base",
19
+ color: error ? "strawberry" : "liquorice",
20
+ children
21
+ }
22
+ ),
23
+ /* @__PURE__ */ jsx(
24
+ "input",
25
+ {
26
+ ref,
27
+ type: "checkbox",
28
+ checked,
29
+ onChange: toggle
30
+ }
31
+ ),
32
+ /* @__PURE__ */ jsx(Checkmark, { error })
33
+ ] }),
34
+ error && errorMsg && /* @__PURE__ */ jsx(ErrorBox, { children: errorMsg })
35
+ ] });
36
+ }
37
+ );
38
+ const Checkmark = styled.span`
17
39
  position: absolute;
18
40
  left: 0;
19
41
  width: 24px;
20
42
  height: 24px;
21
- border: ${({ error }) => error
22
- ? `solid 2px ${theme.colors.strawberry}`
23
- : `solid 2px ${theme.colors.liquorice}`};
43
+ border: ${({ error }) => error ? `solid 2px ${theme.colors.strawberry}` : `solid 2px ${theme.colors.liquorice}`};
24
44
  box-sizing: border-box;
25
45
  border-radius: 1px;
26
46
 
@@ -54,7 +74,7 @@ const Checkmark = styled.span `
54
74
  transform: rotate(43deg);
55
75
  }
56
76
  `;
57
- const BoxContainer = styled.label `
77
+ const BoxContainer = styled.label`
58
78
  position: relative;
59
79
  display: flex;
60
80
  align-items: flex-start;
@@ -99,9 +119,10 @@ const BoxContainer = styled.label `
99
119
  border-radius: 6px;
100
120
  }
101
121
  `;
102
- const ErrorBox = styled.span `
122
+ const ErrorBox = styled.span`
103
123
  padding-top: 8px;
104
124
  font-size: 12px;
105
125
  color: ${theme.colors.strawberry};
106
126
  `;
107
- //# sourceMappingURL=CheckBox.js.map
127
+
128
+ export { CheckBox };
@@ -1,11 +1,27 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import styled from 'styled-components';
3
- import { Box } from '../Box';
4
- import { CheckBox } from '../CheckBox';
5
- export const CheckBoxGroup = ({ list, onToggle, ...marginProps }) => (React.createElement(Container, null, list.map((item) => (React.createElement(CheckBox, { key: item.id, id: String(item.id), checked: item.checked, toggle: () => onToggle(item.id), ...marginProps }, item.label)))));
6
- const Container = styled(Box) `
3
+ import { Box } from '../Box/Box.js';
4
+ import { CheckBox } from '../CheckBox/CheckBox.js';
5
+
6
+ const CheckBoxGroup = ({
7
+ list,
8
+ onToggle,
9
+ ...marginProps
10
+ }) => /* @__PURE__ */ jsx(Container, { children: list.map((item) => /* @__PURE__ */ jsx(
11
+ CheckBox,
12
+ {
13
+ id: String(item.id),
14
+ checked: item.checked,
15
+ toggle: () => onToggle(item.id),
16
+ ...marginProps,
17
+ children: item.label
18
+ },
19
+ item.id
20
+ )) });
21
+ const Container = styled(Box)`
7
22
  display: flex;
8
23
  flex-direction: column;
9
24
  gap: 16px;
10
25
  `;
11
- //# sourceMappingURL=CheckBoxGroup.js.map
26
+
27
+ export { CheckBoxGroup };
@@ -1,4 +1,4 @@
1
- import React, { FC, ReactNode, ButtonHTMLAttributes } from 'react';
1
+ import React, { ButtonHTMLAttributes, FC, ReactNode } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
3
  type Props = {
4
4
  children: ReactNode;