trepur_components 0.4.8 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/dist/src/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  2. package/dist/src/lib/components/Accordion/Accordion.stories.js +80 -0
  3. package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -0
  4. package/dist/src/lib/components/Accordion/index.d.ts +8 -0
  5. package/dist/src/lib/components/Accordion/index.js +9 -0
  6. package/dist/src/lib/components/Accordion/index.js.map +1 -0
  7. package/dist/src/lib/components/AlertBar/AlertBar.stories.d.ts +6 -0
  8. package/dist/src/lib/components/AlertBar/AlertBar.stories.js +91 -0
  9. package/dist/src/lib/components/AlertBar/AlertBar.stories.js.map +1 -0
  10. package/dist/src/lib/components/AlertBar/index.d.ts +16 -0
  11. package/dist/src/lib/components/AlertBar/index.js +64 -0
  12. package/dist/src/lib/components/AlertBar/index.js.map +1 -0
  13. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +6 -0
  14. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js +56 -0
  15. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
  16. package/dist/src/lib/components/Breadcrumbs/index.d.ts +11 -0
  17. package/dist/src/lib/components/Breadcrumbs/index.js +20 -0
  18. package/dist/src/lib/components/Breadcrumbs/index.js.map +1 -0
  19. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.d.ts +6 -0
  20. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +45 -0
  21. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js.map +1 -0
  22. package/dist/src/lib/components/BreadcrumbsBordered/index.d.ts +9 -0
  23. package/dist/src/lib/components/BreadcrumbsBordered/index.js +18 -0
  24. package/dist/src/lib/components/BreadcrumbsBordered/index.js.map +1 -0
  25. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.d.ts +6 -0
  26. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js +50 -0
  27. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js.map +1 -0
  28. package/dist/src/lib/components/BreadcrumbsItem/index.d.ts +12 -0
  29. package/dist/src/lib/components/BreadcrumbsItem/index.js +57 -0
  30. package/dist/src/lib/components/BreadcrumbsItem/index.js.map +1 -0
  31. package/dist/src/lib/components/Button/button.stories.d.ts +6 -0
  32. package/dist/src/lib/components/Button/button.stories.js +132 -0
  33. package/dist/src/lib/components/Button/button.stories.js.map +1 -0
  34. package/dist/src/lib/components/Button/index.d.ts +17 -0
  35. package/dist/src/lib/components/Button/index.js +32 -0
  36. package/dist/src/lib/components/Button/index.js.map +1 -0
  37. package/dist/src/lib/components/Card/Card.stories.d.ts +8 -0
  38. package/dist/src/lib/components/Card/Card.stories.js +124 -0
  39. package/dist/src/lib/components/Card/Card.stories.js.map +1 -0
  40. package/dist/src/lib/components/Card/index.d.ts +31 -0
  41. package/dist/src/lib/components/Card/index.js +66 -0
  42. package/dist/src/lib/components/Card/index.js.map +1 -0
  43. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.d.ts +6 -0
  44. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js +40 -0
  45. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js.map +1 -0
  46. package/dist/src/lib/components/CardWithTopImage/index.d.ts +10 -0
  47. package/dist/src/lib/components/CardWithTopImage/index.js +15 -0
  48. package/dist/src/lib/components/CardWithTopImage/index.js.map +1 -0
  49. package/dist/src/lib/components/Carousel/Carousel.stories.d.ts +6 -0
  50. package/dist/src/lib/components/Carousel/Carousel.stories.js +297 -0
  51. package/dist/src/lib/components/Carousel/Carousel.stories.js.map +1 -0
  52. package/dist/src/lib/components/Carousel/index.d.ts +59 -0
  53. package/dist/src/lib/components/Carousel/index.js +122 -0
  54. package/dist/src/lib/components/Carousel/index.js.map +1 -0
  55. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.d.ts +6 -0
  56. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js +14 -0
  57. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js.map +1 -0
  58. package/dist/src/lib/components/ChevronCard/index.d.ts +7 -0
  59. package/dist/src/lib/components/ChevronCard/index.js +20 -0
  60. package/dist/src/lib/components/ChevronCard/index.js.map +1 -0
  61. package/dist/src/lib/components/Collapsible/Collapsible.stories.d.ts +6 -0
  62. package/dist/src/lib/components/Collapsible/Collapsible.stories.js +66 -0
  63. package/dist/src/lib/components/Collapsible/Collapsible.stories.js.map +1 -0
  64. package/dist/src/lib/components/Collapsible/index.d.ts +16 -0
  65. package/dist/src/lib/components/Collapsible/index.js +67 -0
  66. package/dist/src/lib/components/Collapsible/index.js.map +1 -0
  67. package/dist/src/lib/components/Column/Column.stories.d.ts +6 -0
  68. package/dist/src/lib/components/Column/Column.stories.js +64 -0
  69. package/dist/src/lib/components/Column/Column.stories.js.map +1 -0
  70. package/dist/src/lib/components/Column/index.d.ts +12 -0
  71. package/dist/src/lib/components/Column/index.js +83 -0
  72. package/dist/src/lib/components/Column/index.js.map +1 -0
  73. package/dist/src/lib/components/Container/Container.stories.d.ts +6 -0
  74. package/dist/src/lib/components/Container/Container.stories.js +30 -0
  75. package/dist/src/lib/components/Container/Container.stories.js.map +1 -0
  76. package/dist/src/lib/components/Container/index.d.ts +9 -0
  77. package/dist/src/lib/components/Container/index.js +8 -0
  78. package/dist/src/lib/components/Container/index.js.map +1 -0
  79. package/dist/src/lib/components/FooterBar/footerBar.stories.d.ts +6 -0
  80. package/dist/src/lib/components/FooterBar/footerBar.stories.js +48 -0
  81. package/dist/src/lib/components/FooterBar/footerBar.stories.js.map +1 -0
  82. package/dist/src/lib/components/FooterBar/index.d.ts +11 -0
  83. package/dist/src/lib/components/FooterBar/index.js +15 -0
  84. package/dist/src/lib/components/FooterBar/index.js.map +1 -0
  85. package/dist/src/lib/components/Form/Form.stories.d.ts +6 -0
  86. package/dist/src/lib/components/Form/Form.stories.js +82 -0
  87. package/dist/src/lib/components/Form/Form.stories.js.map +1 -0
  88. package/dist/src/lib/components/Form/index.d.ts +16 -0
  89. package/dist/src/lib/components/Form/index.js +19 -0
  90. package/dist/src/lib/components/Form/index.js.map +1 -0
  91. package/dist/src/lib/components/FyreCard/FyreCard.stories.d.ts +6 -0
  92. package/dist/src/lib/components/FyreCard/FyreCard.stories.js +22 -0
  93. package/dist/src/lib/components/FyreCard/FyreCard.stories.js.map +1 -0
  94. package/dist/src/lib/components/FyreCard/index.d.ts +13 -0
  95. package/dist/src/lib/components/FyreCard/index.js +17 -0
  96. package/dist/src/lib/components/FyreCard/index.js.map +1 -0
  97. package/dist/src/lib/components/Greeting/Greeting.stories.d.ts +6 -0
  98. package/dist/src/lib/components/Greeting/Greeting.stories.js +33 -0
  99. package/dist/src/lib/components/Greeting/Greeting.stories.js.map +1 -0
  100. package/dist/src/lib/components/Greeting/index.d.ts +10 -0
  101. package/dist/src/lib/components/Greeting/index.js +23 -0
  102. package/dist/src/lib/components/Greeting/index.js.map +1 -0
  103. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +6 -0
  104. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js +46 -0
  105. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js.map +1 -0
  106. package/dist/src/lib/components/HamburgerIcon/index.d.ts +7 -0
  107. package/dist/src/lib/components/HamburgerIcon/index.js +26 -0
  108. package/dist/src/lib/components/HamburgerIcon/index.js.map +1 -0
  109. package/dist/src/lib/components/Icon/Icon.stories.d.ts +6 -0
  110. package/dist/src/lib/components/Icon/Icon.stories.js +87 -0
  111. package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -0
  112. package/dist/src/lib/components/Icon/index.d.ts +19 -0
  113. package/dist/src/lib/components/Icon/index.js +56 -0
  114. package/dist/src/lib/components/Icon/index.js.map +1 -0
  115. package/dist/src/lib/components/Image/Image.stories.d.ts +6 -0
  116. package/dist/src/lib/components/Image/Image.stories.js +73 -0
  117. package/dist/src/lib/components/Image/Image.stories.js.map +1 -0
  118. package/dist/src/lib/components/Image/index.d.ts +16 -0
  119. package/dist/src/lib/components/Image/index.js +54 -0
  120. package/dist/src/lib/components/Image/index.js.map +1 -0
  121. package/dist/src/lib/components/ImageLink/ImageLink.stories.d.ts +9 -0
  122. package/dist/src/lib/components/ImageLink/ImageLink.stories.js +50 -0
  123. package/dist/src/lib/components/ImageLink/ImageLink.stories.js.map +1 -0
  124. package/dist/src/lib/components/ImageLink/index.d.ts +15 -0
  125. package/dist/src/lib/components/ImageLink/index.js +18 -0
  126. package/dist/src/lib/components/ImageLink/index.js.map +1 -0
  127. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +6 -0
  128. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js +27 -0
  129. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js.map +1 -0
  130. package/dist/src/lib/components/ImageLinkList/index.d.ts +9 -0
  131. package/dist/src/lib/components/ImageLinkList/index.js +11 -0
  132. package/dist/src/lib/components/ImageLinkList/index.js.map +1 -0
  133. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.d.ts +6 -0
  134. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js +73 -0
  135. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js.map +1 -0
  136. package/dist/src/lib/components/InformationIcon/index.d.ts +15 -0
  137. package/dist/src/lib/components/InformationIcon/index.js +45 -0
  138. package/dist/src/lib/components/InformationIcon/index.js.map +1 -0
  139. package/dist/src/lib/components/Input/Input.stories.d.ts +6 -0
  140. package/dist/src/lib/components/Input/Input.stories.js +95 -0
  141. package/dist/src/lib/components/Input/Input.stories.js.map +1 -0
  142. package/dist/src/lib/components/Input/index.d.ts +31 -0
  143. package/dist/src/lib/components/Input/index.js +25 -0
  144. package/dist/src/lib/components/Input/index.js.map +1 -0
  145. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.d.ts +6 -0
  146. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js +16 -0
  147. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js.map +1 -0
  148. package/dist/src/lib/components/Jumbotron/index.d.ts +9 -0
  149. package/dist/src/lib/components/Jumbotron/index.js +9 -0
  150. package/dist/src/lib/components/Jumbotron/index.js.map +1 -0
  151. package/dist/src/lib/components/Nav/Nav.stories.d.ts +6 -0
  152. package/dist/src/lib/components/Nav/Nav.stories.js +134 -0
  153. package/dist/src/lib/components/Nav/Nav.stories.js.map +1 -0
  154. package/dist/src/lib/components/Nav/index.d.ts +22 -0
  155. package/dist/src/lib/components/Nav/index.js +65 -0
  156. package/dist/src/lib/components/Nav/index.js.map +1 -0
  157. package/dist/src/lib/components/NavItem/NavItem.stories.d.ts +6 -0
  158. package/dist/src/lib/components/NavItem/NavItem.stories.js +75 -0
  159. package/dist/src/lib/components/NavItem/NavItem.stories.js.map +1 -0
  160. package/dist/src/lib/components/NavItem/index.d.ts +15 -0
  161. package/dist/src/lib/components/NavItem/index.js +24 -0
  162. package/dist/src/lib/components/NavItem/index.js.map +1 -0
  163. package/dist/src/lib/components/NewsCard/NewsCard.stories.d.ts +6 -0
  164. package/dist/src/lib/components/NewsCard/NewsCard.stories.js +60 -0
  165. package/dist/src/lib/components/NewsCard/NewsCard.stories.js.map +1 -0
  166. package/dist/src/lib/components/NewsCard/index.d.ts +14 -0
  167. package/dist/src/lib/components/NewsCard/index.js +20 -0
  168. package/dist/src/lib/components/NewsCard/index.js.map +1 -0
  169. package/dist/src/lib/components/Profile/Profile.stories.d.ts +6 -0
  170. package/dist/src/lib/components/Profile/Profile.stories.js +41 -0
  171. package/dist/src/lib/components/Profile/Profile.stories.js.map +1 -0
  172. package/dist/src/lib/components/Profile/index.d.ts +18 -0
  173. package/dist/src/lib/components/Profile/index.js +36 -0
  174. package/dist/src/lib/components/Profile/index.js.map +1 -0
  175. package/dist/src/lib/components/Row/Row.stories.d.ts +6 -0
  176. package/dist/src/lib/components/Row/Row.stories.js +37 -0
  177. package/dist/src/lib/components/Row/Row.stories.js.map +1 -0
  178. package/dist/src/lib/components/Row/index.d.ts +8 -0
  179. package/dist/src/lib/components/Row/index.js +8 -0
  180. package/dist/src/lib/components/Row/index.js.map +1 -0
  181. package/dist/src/lib/components/Search/Search.stories.d.ts +6 -0
  182. package/dist/src/lib/components/Search/Search.stories.js +48 -0
  183. package/dist/src/lib/components/Search/Search.stories.js.map +1 -0
  184. package/dist/src/lib/components/Search/index.d.ts +13 -0
  185. package/dist/src/lib/components/Search/index.js +23 -0
  186. package/dist/src/lib/components/Search/index.js.map +1 -0
  187. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.d.ts +6 -0
  188. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js +58 -0
  189. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js.map +1 -0
  190. package/dist/src/lib/components/SocialBlock/index.d.ts +21 -0
  191. package/dist/src/lib/components/SocialBlock/index.js +65 -0
  192. package/dist/src/lib/components/SocialBlock/index.js.map +1 -0
  193. package/dist/src/lib/components/StarRating/StarRating.stories.d.ts +6 -0
  194. package/dist/src/lib/components/StarRating/StarRating.stories.js +17 -0
  195. package/dist/src/lib/components/StarRating/StarRating.stories.js.map +1 -0
  196. package/dist/src/lib/components/StarRating/index.d.ts +9 -0
  197. package/dist/src/lib/components/StarRating/index.js +27 -0
  198. package/dist/src/lib/components/StarRating/index.js.map +1 -0
  199. package/dist/src/lib/components/Testimonial/Testimonial.stories.d.ts +6 -0
  200. package/dist/src/lib/components/Testimonial/Testimonial.stories.js +95 -0
  201. package/dist/src/lib/components/Testimonial/Testimonial.stories.js.map +1 -0
  202. package/dist/src/lib/components/Testimonial/index.d.ts +17 -0
  203. package/dist/src/lib/components/Testimonial/index.js +27 -0
  204. package/dist/src/lib/components/Testimonial/index.js.map +1 -0
  205. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.d.ts +6 -0
  206. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js +63 -0
  207. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js.map +1 -0
  208. package/dist/src/lib/components/TextAndTitle/index.d.ts +26 -0
  209. package/dist/src/lib/components/TextAndTitle/index.js +104 -0
  210. package/dist/src/lib/components/TextAndTitle/index.js.map +1 -0
  211. package/dist/src/lib/components/TextArea/TextArea.stories.d.ts +6 -0
  212. package/dist/src/lib/components/TextArea/TextArea.stories.js +63 -0
  213. package/dist/src/lib/components/TextArea/TextArea.stories.js.map +1 -0
  214. package/dist/src/lib/components/TextArea/index.d.ts +27 -0
  215. package/dist/src/lib/components/TextArea/index.js +19 -0
  216. package/dist/src/lib/components/TextArea/index.js.map +1 -0
  217. package/dist/src/lib/components/Timeline/Timeline.stories.d.ts +6 -0
  218. package/dist/src/lib/components/Timeline/Timeline.stories.js +87 -0
  219. package/dist/src/lib/components/Timeline/Timeline.stories.js.map +1 -0
  220. package/dist/src/lib/components/Timeline/index.d.ts +14 -0
  221. package/dist/src/lib/components/Timeline/index.js +208 -0
  222. package/dist/src/lib/components/Timeline/index.js.map +1 -0
  223. package/dist/src/lib/components/Tubestops/Tubestops.stories.d.ts +6 -0
  224. package/dist/src/lib/components/Tubestops/Tubestops.stories.js +62 -0
  225. package/dist/src/lib/components/Tubestops/Tubestops.stories.js.map +1 -0
  226. package/dist/src/lib/components/Tubestops/index.d.ts +13 -0
  227. package/dist/src/lib/components/Tubestops/index.js +44 -0
  228. package/dist/src/lib/components/Tubestops/index.js.map +1 -0
  229. package/dist/src/lib/components/UserIcon/UserIcon.stories.d.ts +6 -0
  230. package/dist/src/lib/components/UserIcon/UserIcon.stories.js +63 -0
  231. package/dist/src/lib/components/UserIcon/UserIcon.stories.js.map +1 -0
  232. package/dist/src/lib/components/UserIcon/index.d.ts +11 -0
  233. package/dist/src/lib/components/UserIcon/index.js +16 -0
  234. package/dist/src/lib/components/UserIcon/index.js.map +1 -0
  235. package/dist/src/lib/components/Video/Video.stories.d.ts +6 -0
  236. package/dist/src/lib/components/Video/Video.stories.js +17 -0
  237. package/dist/src/lib/components/Video/Video.stories.js.map +1 -0
  238. package/dist/src/lib/components/Video/index.d.ts +17 -0
  239. package/dist/src/lib/components/Video/index.js +9 -0
  240. package/dist/src/lib/components/Video/index.js.map +1 -0
  241. package/dist/src/lib/index.d.ts +39 -0
  242. package/dist/src/lib/index.js +43 -0
  243. package/dist/src/lib/index.js.map +1 -0
  244. package/dist/src/lib/typography/Fonts.stories.d.ts +6 -0
  245. package/dist/src/lib/typography/Fonts.stories.js +12 -0
  246. package/dist/src/lib/typography/Fonts.stories.js.map +1 -0
  247. package/dist/src/lib/typography/index.d.ts +6 -0
  248. package/dist/src/lib/typography/index.js +23 -0
  249. package/dist/src/lib/typography/index.js.map +1 -0
  250. package/dist/src/lib/utils/controls.d.ts +35 -0
  251. package/dist/src/lib/utils/controls.js +21 -0
  252. package/dist/src/lib/utils/controls.js.map +1 -0
  253. package/dist/src/lib/utils/theme.d.ts +3 -0
  254. package/dist/src/lib/utils/theme.js +28 -0
  255. package/dist/src/lib/utils/theme.js.map +1 -0
  256. package/dist/tailwind.config.d.ts +65 -0
  257. package/dist/tailwind.config.js +81 -0
  258. package/dist/tailwind.config.js.map +1 -0
  259. package/package.json +19 -5
  260. package/dist/components/Accordion/index.js +0 -37
  261. package/dist/components/AlertBar/index.js +0 -129
  262. package/dist/components/Breadcrumbs/index.js +0 -66
  263. package/dist/components/BreadcrumbsBordered/index.js +0 -66
  264. package/dist/components/BreadcrumbsItem/index.js +0 -160
  265. package/dist/components/Button/index.js +0 -141
  266. package/dist/components/Card/index.js +0 -151
  267. package/dist/components/CardWithTopImage/index.js +0 -64
  268. package/dist/components/Carousel/index.css +0 -4
  269. package/dist/components/Carousel/index.css.map +0 -1
  270. package/dist/components/Carousel/index.js +0 -185
  271. package/dist/components/ChevronCard/index.js +0 -65
  272. package/dist/components/Collapsible/index.js +0 -158
  273. package/dist/components/Column/index.js +0 -137
  274. package/dist/components/Container/index.js +0 -55
  275. package/dist/components/FooterBar/index.js +0 -60
  276. package/dist/components/Form/index.js +0 -78
  277. package/dist/components/FyreCard/index.js +0 -54
  278. package/dist/components/Greeting/index.js +0 -69
  279. package/dist/components/Icon/index.js +0 -91
  280. package/dist/components/Image/index.js +0 -142
  281. package/dist/components/ImageLink/index.js +0 -61
  282. package/dist/components/ImageLinkList/index.js +0 -45
  283. package/dist/components/InformationIcon/index.js +0 -120
  284. package/dist/components/Input/index.js +0 -112
  285. package/dist/components/Jumbotron/index.js +0 -39
  286. package/dist/components/Nav/index.js +0 -302
  287. package/dist/components/NavItem/index.js +0 -129
  288. package/dist/components/NewsCard/index.js +0 -62
  289. package/dist/components/Profile/index.js +0 -86
  290. package/dist/components/Row/index.js +0 -55
  291. package/dist/components/Search/index.js +0 -60
  292. package/dist/components/SocialBlock/index.js +0 -184
  293. package/dist/components/StarRating/index.js +0 -110
  294. package/dist/components/Testimonial/index.js +0 -70
  295. package/dist/components/TextAndTitle/index.js +0 -283
  296. package/dist/components/TextArea/index.js +0 -97
  297. package/dist/components/Timeline/index.css +0 -133
  298. package/dist/components/Timeline/index.css.map +0 -1
  299. package/dist/components/Timeline/index.js +0 -254
  300. package/dist/components/Tubestops/index.css +0 -92
  301. package/dist/components/Tubestops/index.css.map +0 -1
  302. package/dist/components/Tubestops/index.js +0 -95
  303. package/dist/components/UserIcon/index.js +0 -50
  304. package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css +0 -1831
  305. package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css.map +0 -1
  306. package/dist/components/Video/index.js +0 -67
  307. package/dist/fonts/Sora/OFL.txt +0 -93
  308. package/dist/fonts/Sora/README.txt +0 -70
  309. package/dist/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
  310. package/dist/fonts/Sora/static/Sora-Bold.ttf +0 -0
  311. package/dist/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
  312. package/dist/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
  313. package/dist/fonts/Sora/static/Sora-Light.ttf +0 -0
  314. package/dist/fonts/Sora/static/Sora-Medium.ttf +0 -0
  315. package/dist/fonts/Sora/static/Sora-Regular.ttf +0 -0
  316. package/dist/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
  317. package/dist/fonts/Sora/static/Sora-Thin.ttf +0 -0
  318. package/dist/index.js +0 -311
  319. package/dist/styles/base.css +0 -73
@@ -0,0 +1,57 @@
1
+ import React, { useState } from 'react';
2
+ import classNames from 'classnames';
3
+ const BreadcrumbsItem = ({ id, className, name, link, href, type, firstItem }) => {
4
+ const [isHovering, setIsHovering] = useState(false);
5
+ const topArrowClasses = 'top-0';
6
+ const bottomArrowClasses = 'bottom-0';
7
+ const textClassList = 'text-center pt-1';
8
+ const liClassList = 'list-none';
9
+ const classList = classNames(className, 'item');
10
+ const itemClassList = classNames({
11
+ 'hover:underline': type === 'link',
12
+ 'mb-0': isHovering
13
+ }, 'bc-item relative px-4 h-8');
14
+ const backArrowsClasses = 'absolute w-0 h-0 bg-transparent border-l-transparent';
15
+ const frontArrowClasses = 'absolute top-0 w-0 h-0 border-t';
16
+ const frontArrow = (React.createElement("span", { style: {
17
+ borderTop: '17px solid transparent',
18
+ borderBottom: '15px solid transparent',
19
+ borderLeft: '16px solid',
20
+ right: '-16px'
21
+ }, className: frontArrowClasses }));
22
+ const backArrows = (React.createElement(React.Fragment, null,
23
+ React.createElement("span", { style: {
24
+ borderTop: '17px solid',
25
+ borderBottom: '18px solid transparent',
26
+ borderLeft: '17px solid transparent',
27
+ left: '-17px',
28
+ // '-webkit-transform': 'scaleY(-1)',
29
+ transform: 'scaleY(-1)'
30
+ }, className: `${backArrowsClasses} ${bottomArrowClasses}` }),
31
+ React.createElement("span", { style: {
32
+ borderTop: '18px solid',
33
+ borderBottom: '17px solid transparent',
34
+ borderLeft: '17px solid transparent',
35
+ left: '-17px'
36
+ }, className: `${backArrowsClasses} ${topArrowClasses}` })));
37
+ const renderWithFrontArrow = (React.createElement("div", { className: itemClassList },
38
+ React.createElement("p", { className: textClassList },
39
+ name,
40
+ frontArrow)));
41
+ const renderWithBackArrows = (React.createElement("div", { className: itemClassList },
42
+ React.createElement("p", { className: textClassList },
43
+ backArrows,
44
+ name,
45
+ frontArrow)));
46
+ return (React.createElement("div", { id: id, className: classList }, type === 'link'
47
+ ? (firstItem === true
48
+ ? (React.createElement("a", { onMouseOver: () => setIsHovering(true), onMouseOut: () => setIsHovering(false), href: href },
49
+ React.createElement("li", { className: liClassList }, renderWithFrontArrow)))
50
+ : (React.createElement("a", { onMouseOver: () => setIsHovering(true), onMouseOut: () => setIsHovering(false), href: href },
51
+ React.createElement("li", { className: liClassList }, renderWithBackArrows))))
52
+ : (firstItem === true
53
+ ? (React.createElement("li", { className: liClassList, onMouseOver: () => setIsHovering(true), onMouseOut: () => setIsHovering(false) }, renderWithFrontArrow))
54
+ : (React.createElement("li", { className: liClassList, onMouseOver: () => setIsHovering(true), onMouseOut: () => setIsHovering(false) }, renderWithBackArrows)))));
55
+ };
56
+ export default BreadcrumbsItem;
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/BreadcrumbsItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,UAAU,MAAM,YAAY,CAAA;AAYnC,MAAM,eAAe,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,SAAS,EACH,EAAe,EAAE;IACvB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACnD,MAAM,eAAe,GAAG,OAAO,CAAA;IAC/B,MAAM,kBAAk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;QAC3B,2BAAG,SAAS,EAAE,aAAa;YACxB,UAAU;YACV,IAAI;YACJ,UAAU,CACT,CACA,CACP,CAAA;IAED,OAAO,CACL,6BACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,IAEnB,IAAI,KAAK,MAAM;QACd,CAAC,CAAC,CACE,SAAS,KAAK,IAAI;YAChB,CAAC,CAAC,CACA,2BACE,WAAW,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EACtC,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACtC,IAAI,EAAE,IAAI;gBAEV,4BAAI,SAAS,EAAE,WAAW,IACvB,oBAAoB,CAClB,CACH,CACH;YACH,CAAC,CAAC,CACA,2BACE,WAAW,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EACtC,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACtC,IAAI,EAAE,IAAI;gBAEV,4BAAI,SAAS,EAAE,WAAW,IACvB,oBAAoB,CAClB,CACH,CACH,CACN;QACH,CAAC,CAAC,CACE,SAAS,KAAK,IAAI;YAChB,CAAC,CAAC,CACA,4BACE,SAAS,EAAE,WAAW,EACtB,WAAW,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EACtC,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,IAErC,oBAAoB,CAClB,CACJ;YACH,CAAC,CAAC,CACA,4BACE,SAAS,EAAE,WAAW,EACtB,WAAW,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EACtC,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,IAErC,oBAAoB,CAClB,CACJ,CACN,CACD,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import Button from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof Button>;
5
+ export declare const _Button: ComponentStory<({ id, className, onClick, hoverText, variant, type, href, rounded, disabled, isLoading, openInNewTab, children }: import("./index").Props) => JSX.Element>;
6
+ export default componentMeta;
@@ -0,0 +1,132 @@
1
+ import React from 'react';
2
+ import Button from './index';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { idAndClassName } from '../../utils/controls';
5
+ const componentMeta = {
6
+ title: 'Trepur Components/Rupert Bennett/Atoms/Button',
7
+ component: Button,
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component: 'A Button which can either be internal, external or social as well as a standard design or a slide design.'
12
+ }
13
+ }
14
+ },
15
+ argTypes: Object.assign(Object.assign({}, idAndClassName), { onClick: {
16
+ type: { name: 'function', required: false },
17
+ description: 'The action to perform when clicking on the component',
18
+ action: 'onClick',
19
+ table: {
20
+ type: {
21
+ summary: 'function'
22
+ },
23
+ defaultValue: { summary: 'undefined' }
24
+ }
25
+ }, hoverText: {
26
+ type: {
27
+ name: 'string',
28
+ required: false
29
+ },
30
+ description: 'The text to display when hovering on the component',
31
+ table: {
32
+ type: {
33
+ summary: 'string'
34
+ },
35
+ defaultValue: {
36
+ summary: 'undefined'
37
+ }
38
+ }
39
+ }, variant: {
40
+ type: {
41
+ name: 'string', required: false
42
+ },
43
+ options: ['primary', 'secondary'],
44
+ description: 'The variant of button to render',
45
+ table: {
46
+ type: {
47
+ summary: 'primary'
48
+ },
49
+ defaultValue: {
50
+ summary: 'primary'
51
+ }
52
+ },
53
+ defaultValue: 'primary',
54
+ control: {
55
+ type: 'radio'
56
+ }
57
+ }, type: {
58
+ type: {
59
+ name: 'string',
60
+ required: false
61
+ },
62
+ options: ['default', 'social', 'icon'],
63
+ description: 'The type of button to render',
64
+ table: {
65
+ type: {
66
+ summary: 'default'
67
+ },
68
+ defaultValue: {
69
+ summary: 'default'
70
+ }
71
+ },
72
+ defaultValue: 'default',
73
+ control: { type: 'radio' }
74
+ }, href: {
75
+ type: { name: 'string', required: false },
76
+ description: 'The link attached to the component',
77
+ table: {
78
+ type: {
79
+ summary: 'default'
80
+ },
81
+ defaultValue: {
82
+ summary: 'undefined'
83
+ }
84
+ }
85
+ }, rounded: {
86
+ type: {
87
+ name: 'boolean',
88
+ required: false
89
+ },
90
+ description: 'rounds the borders when true',
91
+ defaultValue: 'true'
92
+ }, disabled: {
93
+ type: {
94
+ name: 'boolean',
95
+ required: false
96
+ },
97
+ description: 'Can the carousel be dragged or not'
98
+ }, isLoading: {
99
+ type: {
100
+ name: 'boolean',
101
+ required: false
102
+ },
103
+ table: {
104
+ defaultValue: {
105
+ summary: 'false'
106
+ }
107
+ },
108
+ description: 'Toggles the loading state of the compnent'
109
+ }, openInNewTab: {
110
+ type: { name: 'boolean', required: false },
111
+ description: 'Opens the link in a new tab when set to true',
112
+ defaultValue: 'false'
113
+ }, children: {
114
+ type: { name: 'other', value: 'string | React.ReactNode' },
115
+ description: 'The child elements to show in the component',
116
+ table: {
117
+ type: {
118
+ summary: 'Array'
119
+ },
120
+ defaultValue: { summary: 'undefined' }
121
+ }
122
+ } }),
123
+ args: {
124
+ children: 'This is a button',
125
+ rounded: true,
126
+ onClick: action('button clicked')
127
+ }
128
+ };
129
+ const Template = (args) => React.createElement(Button, Object.assign({}, args));
130
+ export const _Button = Template.bind({});
131
+ export default componentMeta;
132
+ //# sourceMappingURL=button.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Button/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,+CAA+C;IACtD,SAAS,EAAE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AO,EAAE,WAAW,EAAE;aACvC;SACF,GACF;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,kBAAkB;QAC5B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC;KAClC;CACF,CAAA;AAED,MAAM,QAAQ,GAAkC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,MAAM,oBAAK,IAAI,EAAI,CAAA;AAE9E,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAExC,eAAe,aAAa,CAAA"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface Props {
3
+ id?: string;
4
+ className?: string;
5
+ onClick?: React.MouseEventHandler;
6
+ hoverText?: string;
7
+ variant?: 'primary' | 'secondary';
8
+ type?: 'social' | 'icon' | 'default';
9
+ href?: string;
10
+ rounded?: boolean;
11
+ disabled?: boolean;
12
+ isLoading?: boolean;
13
+ openInNewTab?: boolean;
14
+ children?: any;
15
+ }
16
+ declare const Button: ({ id, className, onClick, hoverText, variant, type, href, rounded, disabled, isLoading, openInNewTab, children }: Props) => JSX.Element;
17
+ export default Button;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import Icon from '../Icon';
3
+ import classNames from 'classnames';
4
+ const Button = ({ id, className, onClick, hoverText, variant = 'primary', type = 'default', href, rounded = true, disabled = false, isLoading = false, openInNewTab = false, children }) => {
5
+ const padding = classNames({
6
+ 'px-1 py-1': type === 'social',
7
+ 'px-3': type === 'icon',
8
+ 'px-8': type !== 'social' && type !== 'icon'
9
+ }, 'py-2');
10
+ const loadingClasses = classNames({
11
+ invisible: !isLoading
12
+ }, 'absolute left-2/4 top-1/4 -ml-2');
13
+ const classList = classNames({
14
+ 'bg-primary text-white border-white': variant === 'primary',
15
+ 'hover:bg-white hover:text-primary hover:border-primary': !disabled && variant === 'primary',
16
+ 'bg-white text-primary border-primary': variant === 'secondary',
17
+ 'hover:bg-primary hover:text-white hover:border-primary': !disabled && variant === 'secondary',
18
+ 'opacity-50': disabled,
19
+ 'rounded-lg': rounded,
20
+ 'rounded-none': !rounded
21
+ }, className, padding, 'group border-2 transition-backgroundColor duration-500 transform');
22
+ const loadingIcon = (React.createElement(Icon, { size: 1, type: 'spinner', animation: 'pulse', colour: 'white', bgColour: 'primary' }));
23
+ return (React.createElement("a", Object.assign({ className: 'group' }, (openInNewTab && { target: '_blank' }), { href: href }),
24
+ React.createElement("button", Object.assign({ id: id, className: classList, "aria-busy": isLoading }, ((onClick != null) &&
25
+ { onClick }), (disabled &&
26
+ { disabled })),
27
+ React.createElement("div", { className: classNames({ invisible: isLoading }) }, children),
28
+ isLoading &&
29
+ React.createElement("div", { className: loadingClasses }, loadingIcon))));
30
+ };
31
+ export default Button;
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OAAO,UAAU,MAAM,YAAY,CAAA;AAiBnC,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,IAAI,EACJ,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,YAAY,GAAG,KAAK,EACpB,QAAQ,EACF,EAAe,EAAE;IACvB,MAAM,OAAO,GAAG,UAAU,CAAC;QACzB,WAAW,EAAE,IAAI,KAAK,QAAQ;QAC9B,MAAM,EAAE,IAAI,KAAK,MAAM;QACvB,MAAM,EAAE,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,MAAM;KAC7C,EAAE,MAAM,CAAC,CAAA;IAEV,MAAM,cAAc,GAAG,UAAU,CAAC;QAChC,SAAS,EAAE,CAAC,SAAS;KACtB,EAAE,iCAAiC,CAAC,CAAA;IAErC,MAAM,SAAS,GAAG,UAAU,CAAC;QAC3B,oCAAoC,EAAE,OAAO,KAAK,SAAS;QAC3D,wDAAwD,EAAE,CAAC,QAAQ,IAAI,OAAO,KAAK,SAAS;QAC5F,sCAAsC,EAAE,OAAO,KAAK,WAAW;QAC/D,wDAAwD,EAAE,CAAC,QAAQ,IAAI,OAAO,KAAK,WAAW;QAC9F,YAAY,EAAE,QAAQ;QACtB,YAAY,EAAE,OAAO;QACrB,cAAc,EAAE,CAAC,OAAO;KACzB,EAAE,SAAS,EAAE,OAAO,EAAE,kEAAkE,CAAC,CAAA;IAE1F,MAAM,WAAW,GAAG,CAClB,oBAAC,IAAI,IACH,IAAI,EAAE,CAAC,EACP,IAAI,EAAC,SAAS,EACd,SAAS,EAAC,OAAO,EACjB,MAAM,EAAC,OAAO,EACd,QAAQ,EAAC,SAAS,GAClB,CACH,CAAA;IAED,OAAO,CACL,yCACE,SAAS,EAAC,OAAO,IACb,CAAC,YAAY,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAC1C,IAAI,EAAE,IAAI;QAEV,8CACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,eACT,SAAS,IAChB,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC;YACV,EAAE,OAAO,EAAE,CAAC,EACpB,CAAC,QAAQ;YACD,EAAE,QAAQ,EAAE,CAAC;YAEzB,6BAAK,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,IACjD,QAAQ,CACL;YACL,SAAS;gBACR,6BAAK,SAAS,EAAE,cAAc,IAC3B,WAAW,CACR,CACD,CACP,CACL,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import Card from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof Card>;
5
+ export declare const _ImageCard: ComponentStory<React.FC<import("./index").Props>>;
6
+ export declare const _VideoCard: ComponentStory<React.FC<import("./index").Props>>;
7
+ export declare const _ProductCard: ComponentStory<React.FC<import("./index").Props>>;
8
+ export default componentMeta;
@@ -0,0 +1,124 @@
1
+ import React from 'react';
2
+ import Card from './index';
3
+ import { idAndClassName } from '../../utils/controls';
4
+ import Icon from '../Icon';
5
+ const componentMeta = {
6
+ title: 'Trepur Components/Rupert Bennett/Organisms/Card',
7
+ component: Card,
8
+ argTypes: Object.assign(Object.assign({}, idAndClassName), { title: {
9
+ description: '',
10
+ table: {
11
+ category: 'Card'
12
+ }
13
+ }, image: {
14
+ description: '',
15
+ table: {
16
+ category: 'Card'
17
+ }
18
+ }, subTitle: {
19
+ description: '',
20
+ table: {
21
+ category: 'Card'
22
+ }
23
+ }, description: {
24
+ description: '',
25
+ table: {
26
+ category: 'Card'
27
+ }
28
+ }, extraText: {
29
+ description: '',
30
+ table: {
31
+ category: 'Card'
32
+ }
33
+ }, imageBelowTitle: {
34
+ description: '',
35
+ table: {
36
+ category: 'Card'
37
+ }
38
+ }, bordered: {
39
+ description: '',
40
+ table: {
41
+ category: 'Card'
42
+ }
43
+ }, rounded: {
44
+ description: '',
45
+ table: {
46
+ category: 'Card'
47
+ }
48
+ }, hasCta: {
49
+ description: '',
50
+ table: {
51
+ category: 'Card'
52
+ }
53
+ }, titleLeft: {
54
+ description: '',
55
+ table: {
56
+ category: 'Card'
57
+ }
58
+ }, titleRight: {
59
+ description: '',
60
+ table: {
61
+ category: 'Card'
62
+ }
63
+ }, titleBold: {
64
+ description: '',
65
+ table: {
66
+ category: 'Card'
67
+ }
68
+ } }),
69
+ args: {
70
+ subTitle: 'This is a subtitle',
71
+ description: 'This is a description paragraph',
72
+ extraText: 'This is another paragraph',
73
+ rounded: true,
74
+ bordered: true,
75
+ hasCta: true,
76
+ iconButtonProps: {
77
+ type: 'icon',
78
+ href: '/',
79
+ className: 'mt-8',
80
+ children: React.createElement(Icon, { type: 'heart', hollow: false })
81
+ },
82
+ cardButtonProps: {
83
+ children: (React.createElement("div", { className: 'flex' },
84
+ React.createElement(Icon, { type: 'heart' }),
85
+ React.createElement("p", null, "buttonText"),
86
+ React.createElement(Icon, { type: 'heart' }))),
87
+ disabled: false,
88
+ hoverText: 'buttonHoverText',
89
+ href: 'buttonUrl',
90
+ rounded: true
91
+ },
92
+ button2Props: {
93
+ className: 'ml-2 w-full mt-8',
94
+ children: 'Add to basket',
95
+ rounded: false,
96
+ disabled: false
97
+ }
98
+ }
99
+ };
100
+ const Template = (args) => React.createElement(Card, Object.assign({}, args));
101
+ export const _ImageCard = Template.bind({});
102
+ _ImageCard.args = {
103
+ title: 'This is a title',
104
+ image: 'https://picsum.photos/500/300'
105
+ };
106
+ export const _VideoCard = Template.bind({});
107
+ _VideoCard.args = {
108
+ title: 'This is a title',
109
+ videoProps: {
110
+ mp4File: '/',
111
+ withControls: true,
112
+ autoPlay: true
113
+ }
114
+ };
115
+ export const _ProductCard = Template.bind({});
116
+ _ProductCard.args = {
117
+ image: 'https://picsum.photos/500/300',
118
+ subTitle: 'Product name',
119
+ description: 'Product description',
120
+ extraText: '£123.45',
121
+ onHover: true
122
+ };
123
+ export default componentMeta;
124
+ //# sourceMappingURL=Card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Card/Card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAA;AAGnC,MAAM,aAAa,GAA+B;IAChD,KAAK,EAAE,iDAAiD;IACxD,SAAS,EAAE,IAAI;IACf,QAAQ,kCACH,cAAc,KACjB,KAAK,EAAE;YACL,WAAW,EAAE,EAAE;YACf,KAAK,EAA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GAAG;IAClB,KAAK,EAAE,+BAA+B;IACtC,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,qBAAqB;IAClC,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,IAAI;CACd,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { Props as buttonProps } from '../Button';
3
+ import { Props as videoProps } from '../Video';
4
+ export interface Props {
5
+ id?: string;
6
+ className?: string;
7
+ title?: string;
8
+ image?: string;
9
+ subTitle?: string;
10
+ description?: string;
11
+ extraText?: string;
12
+ hasCta?: boolean;
13
+ imageBelowTitle?: boolean;
14
+ titleLeft?: boolean;
15
+ titleRight?: boolean;
16
+ titleBold?: boolean;
17
+ imageClass?: string;
18
+ subTitleClass?: string;
19
+ extraTextClass?: string;
20
+ descriptionClass?: string;
21
+ altText?: string;
22
+ rounded?: boolean;
23
+ bordered?: boolean;
24
+ videoProps?: videoProps;
25
+ onHover?: boolean;
26
+ iconButtonProps?: buttonProps;
27
+ cardButtonProps?: buttonProps;
28
+ button2Props?: buttonProps;
29
+ }
30
+ declare const Card: React.FC<Props>;
31
+ export default Card;
@@ -0,0 +1,66 @@
1
+ import React, { useState } from 'react';
2
+ import classNames from 'classnames';
3
+ import Button from '../Button';
4
+ import Video from '../Video';
5
+ const Card = ({ id, className, title, image, subTitle, description, extraText, hasCta, imageBelowTitle, titleLeft = false, titleRight = false, titleBold = false, imageClass, subTitleClass, extraTextClass, descriptionClass, altText, rounded, bordered, videoProps, onHover = false, iconButtonProps, cardButtonProps, button2Props }) => {
6
+ const [showHoverButtons, setShowHoverButtons] = useState(false);
7
+ const orderClass = classNames({ 'order-first': imageBelowTitle });
8
+ const btnClass = 'w-full p-3';
9
+ const border = classNames({ 'border border-grey border-opacity-100:': bordered });
10
+ const cardTitleFont = classNames({ 'font-bold': titleBold });
11
+ const cardTitlePosition = classNames({
12
+ 'text-left': titleLeft,
13
+ 'text-right': titleRight,
14
+ 'text-center': !titleLeft && !titleRight
15
+ });
16
+ const roundedImage = classNames({ 'rounded-t-lg': rounded });
17
+ const roundedCard = classNames({ 'rounded-lg': rounded });
18
+ const contentWrapperClass = 'px-3 order-3';
19
+ const titleWrapperClass = classNames(orderClass, 'pt-3');
20
+ const cardTitleClasses = classNames({
21
+ [cardTitlePosition]: true
22
+ }, cardTitleFont, 'font-medium text-md text-grey');
23
+ const cardSubTitleClassList = classNames(subTitleClass, 'font-light text-sm text-grey');
24
+ const cardDescriptionClassList = classNames(descriptionClass, 'font-extraLight text-xs text-light-grey');
25
+ const classList = classNames(className, border, roundedCard, 'flex flex-col');
26
+ const imageClassList = classNames(roundedImage, imageClass, 'w-full object-cover h-full');
27
+ const cardExtraTextClassList = classNames({
28
+ 'pb-4': hasCta === false
29
+ }, extraTextClass, 'w-full object-cover h-full font-extraLight text-xs text-light-grey');
30
+ const imageWrapperClassList = classNames({
31
+ 'order-2': imageBelowTitle === true,
32
+ [roundedImage]: imageBelowTitle === false,
33
+ 'order-1': imageBelowTitle === false
34
+ }, 'h-64 overflow-hidden object-cover');
35
+ const toggleHover = (isHovering) => {
36
+ onHover && setShowHoverButtons(!!isHovering);
37
+ };
38
+ return (React.createElement("div", { id: id, className: classList, onMouseEnter: () => toggleHover(true), onMouseLeave: () => toggleHover(false) },
39
+ React.createElement("div", { className: 'card-content flex flex-1 flex-col' },
40
+ (videoProps === null || videoProps === void 0 ? void 0 : videoProps.mp4File) !== undefined || (videoProps === null || videoProps === void 0 ? void 0 : videoProps.webmFile) !== undefined || (videoProps === null || videoProps === void 0 ? void 0 : videoProps.ogvFile) !== undefined
41
+ ? (React.createElement("div", { className: imageWrapperClassList },
42
+ React.createElement(Video, Object.assign({}, videoProps))))
43
+ : (image !== undefined &&
44
+ React.createElement("div", { className: imageWrapperClassList },
45
+ React.createElement("img", { className: imageClassList, src: image, alt: altText }))),
46
+ !showHoverButtons
47
+ ? (React.createElement(React.Fragment, null,
48
+ React.createElement("div", { className: imageBelowTitle !== undefined ? 'order-1' : 'order-3' }, title !== undefined &&
49
+ React.createElement("div", { className: titleWrapperClass },
50
+ React.createElement("h3", { className: cardTitleClasses }, title))),
51
+ React.createElement("div", { className: contentWrapperClass },
52
+ subTitle !== undefined &&
53
+ React.createElement("h4", { className: cardSubTitleClassList }, subTitle),
54
+ description !== undefined &&
55
+ React.createElement("p", { className: cardDescriptionClassList }, description),
56
+ extraText !== undefined &&
57
+ React.createElement("p", { className: cardExtraTextClassList }, extraText))))
58
+ : (React.createElement("div", { className: 'flex p-2 order-last h-24' },
59
+ React.createElement(Button, Object.assign({}, iconButtonProps), iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children),
60
+ React.createElement(Button, Object.assign({}, button2Props), button2Props === null || button2Props === void 0 ? void 0 : button2Props.children)))),
61
+ (cardButtonProps != null) &&
62
+ React.createElement("div", { className: btnClass },
63
+ React.createElement(Button, Object.assign({}, cardButtonProps), cardButtonProps.children))));
64
+ };
65
+ export default Card;
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAgC,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAA8B,MAAM,mBAAmB,CAAA;AA6B9D,MAAM,IAAI,GAAoB,CAAC,EAC7B,EAAE,EACF,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,MAAM,EACN,eAAe,EACf,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,OAAO,GAAG,KAAK,EACf,eAA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SAAS,EAAE,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAClE,KAAK,KAAK,SAAS;wBAClB,6BAAK,SAAS,EAAE,iBAAiB;4BAC/B,4BAAI,SAAS,EAAE,gBAAgB,IAAG,KAAK,CAAM,CACzC,CACJ;oBACN,6BAAK,SAAS,EAAE,mBAAmB;wBAChC,QAAQ,KAAK,SAAS;4BACrB,4BAAI,SAAS,EAAE,qBAAqB,IACjC,QAAQ,CACN;wBACN,WAAW,KAAK,SAAS;4BACxB,2BAAG,SAAS,EAAE,wBAAwB,IACnC,WAAW,CACV;wBACL,SAAS,KAAK,SAAS;4BACtB,2BAAG,SAAS,EAAE,sBAAsB,IACjC,SAAS,CACR,CACF,CACL,CACF;gBACH,CAAC,CAAC,CACA,6BAAK,SAAS,EAAC,0BAA0B;oBACvC,oBAAC,MAAM,oBAAK,eAAe,GACxB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,QAAQ,CACnB;oBACT,oBAAC,MAAM,oBAAK,YAAY,GACrB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAChB,CACL,CAAC,CACP;QACL,CAAC,eAAe,IAAI,IAAI,CAAC;YACxB,6BAAK,SAAS,EAAE,QAAQ;gBACtB,oBAAC,MAAM,oBAAK,eAAe,GACxB,eAAe,CAAC,QAAQ,CAClB,CACL,CACJ,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import CardWithTopImage from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof CardWithTopImage>;
5
+ export declare const _CardWithTopImage: ComponentStory<({ id, className, children, imageProps }: import("./index").Props) => JSX.Element>;
6
+ export default componentMeta;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import CardWithTopImage from './index';
3
+ import logo from '@assets/images/primary-logo.png';
4
+ import { idAndClassName } from '../../utils/controls';
5
+ const componentMeta = {
6
+ title: 'Trepur Components/Rupert Bennett/Organisms/Card With Top Image',
7
+ component: CardWithTopImage,
8
+ argTypes: Object.assign(Object.assign({}, idAndClassName), { children: {
9
+ type: { name: 'other', value: 'string | React.ReactNode' },
10
+ description: 'The child elements to show in the component',
11
+ table: {
12
+ type: {
13
+ summary: 'Array'
14
+ },
15
+ defaultValue: { summary: 'undefined' }
16
+ }
17
+ }, imageProps: {
18
+ type: { name: 'other', value: 'object' },
19
+ description: 'The props to pass to the image on the component',
20
+ table: {
21
+ type: {
22
+ summary: 'object'
23
+ },
24
+ defaultValue: { summary: 'undefined' }
25
+ }
26
+ } }),
27
+ args: {
28
+ imageProps: {
29
+ image: logo,
30
+ roundedFull: true,
31
+ width: 4,
32
+ height: 4
33
+ },
34
+ children: [React.createElement("p", { key: '1' }, "This is a child"), React.createElement("p", { key: '2' }, "This is another child")]
35
+ }
36
+ };
37
+ const Template = (args) => React.createElement(CardWithTopImage, Object.assign({}, args));
38
+ export const _CardWithTopImage = Template.bind({});
39
+ export default componentMeta;
40
+ //# sourceMappingURL=CardWithTopImage.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWithTopImage.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/CardWithTopImage/CardWithTopImage.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,gBAAgB,MAAM,SAAS,CAAA;AACtC,OAAO,IAAI,MAAM,iCAAiC,CAAA;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,aAAa,GAA2C;IAC5D,KAAK,EAAE,gEAAgE;IACvE,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,kCACH,cAAc,KACjB,QAAQ,EAAE;YACR,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,0BAA0B,EAAE;YAC1D,WAAW,EAAE,6CAA6C;YAC1D,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,OAAO;iBACjB;gBACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF,EACD,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;YACxC,WAAW,EAAE,iDAAiD;YAC9D,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;gBACD,YAAY,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;aACvC;SACF,GACF;IACD,IAAI,EAAE;QACJ,UAAU,EAAE;YACV,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;SACV;QACD,QAAQ,EAAE,CAAC,2BAAG,GAAG,EAAC,GAAG,sBAAoB,EAAE,2BAAG,GAAG,EAAC,GAAG,4BAA0B,CAAC;KACjF;CACF,CAAA;AAED,MAAM,QAAQ,GAA4C,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,IAAI,EAAI,CAAA;AAElG,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAElD,eAAe,aAAa,CAAA"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Props as imageProps } from '../Image';
3
+ export interface Props {
4
+ id?: string;
5
+ className?: string;
6
+ children?: any;
7
+ imageProps?: imageProps;
8
+ }
9
+ declare const CardWithTopImage: ({ id, className, children, imageProps }: Props) => JSX.Element;
10
+ export default CardWithTopImage;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import Image from '../Image';
3
+ import classNames from 'classnames';
4
+ const CardWithTopImage = ({ id, className, children, imageProps }) => {
5
+ const wrapperClassList = classNames('rounded-full mx-auto max-w-max bg-white p-4');
6
+ const contentClassList = 'pt-12 px-4 h-auto pb-16 -mt-12 bg-white';
7
+ return (React.createElement("div", { style: {
8
+ filter: 'drop-shadow(0 4px 8px rgb(154, 154, 154))'
9
+ }, id: id, className: className },
10
+ React.createElement("div", { className: wrapperClassList },
11
+ React.createElement(Image, Object.assign({}, imageProps))),
12
+ React.createElement("div", { className: contentClassList }, children)));
13
+ };
14
+ export default CardWithTopImage;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/CardWithTopImage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAA8B,MAAM,mBAAmB,CAAA;AAC9D,OAAO,UAAU,MAAM,YAAY,CAAA;AASnC,MAAM,gBAAgB,GAAG,CAAC,EACxB,EAAE,EACF,SAAS,EACT,QAAQ,EACR,UAAU,EACJ,EAAe,EAAE;IACvB,MAAM,gBAAgB,GAAG,UAAU,CAAC,6CAA6C,CAAC,CAAA;IAElF,MAAM,gBAAgB,GAAG,yCAAyC,CAAA;IAElE,OAAO,CACL,6BACE,KAAK,EAAE;YACL,MAAM,EAAE,2CAA2C;SACpD,EACD,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS;QAEpB,6BAAK,SAAS,EAAE,gBAAgB;YAC9B,oBAAC,KAAK,oBAAK,UAAU,EAAI,CACrB;QACN,6BAAK,SAAS,EAAE,gBAAgB,IAC7B,QAAQ,CACL,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import Carousel from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof Carousel>;
5
+ export declare const _Carousel: ComponentStory<React.FC<import("./index").Props>>;
6
+ export default componentMeta;