trepur_components 0.4.7 → 1.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 (378) hide show
  1. package/dist/components/Accordion/Accordion.stories.tsx +88 -0
  2. package/dist/components/Accordion/index.tsx +31 -0
  3. package/dist/components/AlertBar/AlertBar.stories.tsx +105 -0
  4. package/dist/components/AlertBar/index.tsx +127 -0
  5. package/dist/components/Breadcrumbs/Breadcrumbs.stories.tsx +60 -0
  6. package/dist/components/Breadcrumbs/index.tsx +55 -0
  7. package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +52 -0
  8. package/dist/components/BreadcrumbsBordered/index.tsx +44 -0
  9. package/dist/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +54 -0
  10. package/dist/components/BreadcrumbsItem/index.tsx +151 -0
  11. package/dist/components/Button/button.stories.tsx +148 -0
  12. package/dist/components/Button/index.tsx +91 -0
  13. package/dist/components/Card/Card.stories.tsx +150 -0
  14. package/dist/components/Card/index.tsx +162 -0
  15. package/dist/components/CardWithTopImage/CardWithTopImage.stories.tsx +48 -0
  16. package/dist/components/CardWithTopImage/index.tsx +40 -0
  17. package/dist/components/Carousel/Carousel.stories.tsx +369 -0
  18. package/dist/components/Carousel/index.tsx +267 -0
  19. package/dist/components/ChevronCard/ChevronCard.stories.tsx +21 -0
  20. package/dist/components/ChevronCard/index.tsx +39 -0
  21. package/dist/components/Collapsible/Collapsible.stories.tsx +70 -0
  22. package/dist/components/Collapsible/index.tsx +124 -0
  23. package/dist/components/Column/Column.stories.tsx +82 -0
  24. package/dist/components/Column/index.tsx +114 -0
  25. package/dist/components/Container/Container.stories.tsx +38 -0
  26. package/dist/components/Container/index.tsx +30 -0
  27. package/dist/components/FooterBar/footerBar.stories.tsx +57 -0
  28. package/dist/components/FooterBar/index.tsx +44 -0
  29. package/dist/components/Form/Form.stories.tsx +93 -0
  30. package/dist/components/Form/index.tsx +58 -0
  31. package/dist/components/FyreCard/FyreCard.stories.tsx +29 -0
  32. package/dist/components/FyreCard/index.tsx +46 -0
  33. package/dist/components/Greeting/Greeting.stories.tsx +42 -0
  34. package/dist/components/Greeting/index.tsx +46 -0
  35. package/dist/components/HamburgerIcon/HamburgerIcon.stories.tsx +50 -0
  36. package/dist/components/HamburgerIcon/index.tsx +65 -0
  37. package/dist/components/Icon/Icon.stories.tsx +102 -0
  38. package/dist/components/Icon/index.tsx +112 -0
  39. package/dist/components/Image/Image.stories.tsx +88 -0
  40. package/dist/components/Image/index.tsx +113 -0
  41. package/dist/components/ImageLink/ImageLink.stories.tsx +60 -0
  42. package/dist/components/ImageLink/index.tsx +62 -0
  43. package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +32 -0
  44. package/dist/components/ImageLinkList/index.tsx +33 -0
  45. package/dist/components/InformationIcon/InformationIcon.stories.tsx +86 -0
  46. package/dist/components/InformationIcon/index.tsx +84 -0
  47. package/dist/components/Input/Input.stories.tsx +99 -0
  48. package/dist/components/Input/index.tsx +126 -0
  49. package/dist/components/Jumbotron/Jumbotron.stories.tsx +22 -0
  50. package/dist/components/Jumbotron/index.tsx +25 -0
  51. package/dist/components/Nav/Nav.stories.tsx +155 -0
  52. package/dist/components/Nav/index.tsx +180 -0
  53. package/dist/components/NavItem/NavItem.stories.tsx +89 -0
  54. package/dist/components/NavItem/index.tsx +65 -0
  55. package/dist/components/NewsCard/NewsCard.stories.tsx +71 -0
  56. package/dist/components/NewsCard/index.tsx +48 -0
  57. package/dist/components/Profile/Profile.stories.tsx +50 -0
  58. package/dist/components/Profile/index.tsx +87 -0
  59. package/dist/components/Row/Row.stories.tsx +51 -0
  60. package/dist/components/Row/index.tsx +24 -0
  61. package/dist/components/Search/Search.stories.tsx +58 -0
  62. package/dist/components/Search/index.tsx +58 -0
  63. package/dist/components/SocialBlock/SocialBlock.stories.tsx +114 -0
  64. package/dist/components/SocialBlock/index.tsx +161 -0
  65. package/dist/components/StarRating/StarRating.stories.tsx +23 -0
  66. package/dist/components/StarRating/index.tsx +71 -0
  67. package/dist/components/Testimonial/Testimonial.stories.tsx +110 -0
  68. package/dist/components/Testimonial/index.tsx +50 -0
  69. package/dist/components/TextAndTitle/TextAndTitle.stories.tsx +65 -0
  70. package/dist/components/TextAndTitle/index.tsx +257 -0
  71. package/dist/components/TextArea/TextArea.stories.tsx +67 -0
  72. package/dist/components/TextArea/index.tsx +97 -0
  73. package/dist/components/Timeline/Timeline.stories.tsx +100 -0
  74. package/dist/components/Timeline/index.tsx +315 -0
  75. package/dist/components/Tubestops/Tubestops.stories.tsx +66 -0
  76. package/dist/components/Tubestops/index.tsx +77 -0
  77. package/dist/components/UserIcon/UserIcon.stories.tsx +67 -0
  78. package/dist/components/UserIcon/index.tsx +42 -0
  79. package/dist/components/Video/Video.stories.tsx +23 -0
  80. package/dist/components/Video/index.tsx +49 -0
  81. package/dist/index.js +0 -39
  82. package/dist/src/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  83. package/dist/src/lib/components/Accordion/Accordion.stories.js +72 -0
  84. package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -0
  85. package/dist/src/lib/components/Accordion/index.d.ts +9 -0
  86. package/dist/src/lib/components/Accordion/index.js +9 -0
  87. package/dist/src/lib/components/Accordion/index.js.map +1 -0
  88. package/dist/src/lib/components/AlertBar/AlertBar.stories.d.ts +6 -0
  89. package/dist/src/lib/components/AlertBar/AlertBar.stories.js +91 -0
  90. package/dist/src/lib/components/AlertBar/AlertBar.stories.js.map +1 -0
  91. package/dist/src/lib/components/AlertBar/index.d.ts +16 -0
  92. package/dist/src/lib/components/AlertBar/index.js +62 -0
  93. package/dist/src/lib/components/AlertBar/index.js.map +1 -0
  94. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +6 -0
  95. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js +56 -0
  96. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
  97. package/dist/src/lib/components/Breadcrumbs/index.d.ts +11 -0
  98. package/dist/src/lib/components/Breadcrumbs/index.js +22 -0
  99. package/dist/src/lib/components/Breadcrumbs/index.js.map +1 -0
  100. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.d.ts +6 -0
  101. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +45 -0
  102. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js.map +1 -0
  103. package/dist/src/lib/components/BreadcrumbsBordered/index.d.ts +9 -0
  104. package/dist/src/lib/components/BreadcrumbsBordered/index.js +18 -0
  105. package/dist/src/lib/components/BreadcrumbsBordered/index.js.map +1 -0
  106. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.d.ts +6 -0
  107. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js +50 -0
  108. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js.map +1 -0
  109. package/dist/src/lib/components/BreadcrumbsItem/index.d.ts +12 -0
  110. package/dist/src/lib/components/BreadcrumbsItem/index.js +59 -0
  111. package/dist/src/lib/components/BreadcrumbsItem/index.js.map +1 -0
  112. package/dist/src/lib/components/Button/button.stories.d.ts +6 -0
  113. package/dist/src/lib/components/Button/button.stories.js +87 -0
  114. package/dist/src/lib/components/Button/button.stories.js.map +1 -0
  115. package/dist/src/lib/components/Button/index.d.ts +17 -0
  116. package/dist/src/lib/components/Button/index.js +32 -0
  117. package/dist/src/lib/components/Button/index.js.map +1 -0
  118. package/dist/src/lib/components/Card/Card.stories.d.ts +5 -0
  119. package/dist/src/lib/components/Card/Card.stories.js +124 -0
  120. package/dist/src/lib/components/Card/Card.stories.js.map +1 -0
  121. package/dist/src/lib/components/Card/index.d.ts +31 -0
  122. package/dist/src/lib/components/Card/index.js +63 -0
  123. package/dist/src/lib/components/Card/index.js.map +1 -0
  124. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.d.ts +6 -0
  125. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js +40 -0
  126. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js.map +1 -0
  127. package/dist/src/lib/components/CardWithTopImage/index.d.ts +10 -0
  128. package/dist/src/lib/components/CardWithTopImage/index.js +15 -0
  129. package/dist/src/lib/components/CardWithTopImage/index.js.map +1 -0
  130. package/dist/src/lib/components/Carousel/Carousel.stories.d.ts +6 -0
  131. package/dist/src/lib/components/Carousel/Carousel.stories.js +297 -0
  132. package/dist/src/lib/components/Carousel/Carousel.stories.js.map +1 -0
  133. package/dist/src/lib/components/Carousel/index.d.ts +61 -0
  134. package/dist/src/lib/components/Carousel/index.js +81 -0
  135. package/dist/src/lib/components/Carousel/index.js.map +1 -0
  136. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.d.ts +6 -0
  137. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js +14 -0
  138. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js.map +1 -0
  139. package/dist/src/lib/components/ChevronCard/index.d.ts +7 -0
  140. package/dist/src/lib/components/ChevronCard/index.js +20 -0
  141. package/dist/src/lib/components/ChevronCard/index.js.map +1 -0
  142. package/dist/src/lib/components/Collapsible/Collapsible.stories.d.ts +6 -0
  143. package/dist/src/lib/components/Collapsible/Collapsible.stories.js +64 -0
  144. package/dist/src/lib/components/Collapsible/Collapsible.stories.js.map +1 -0
  145. package/dist/src/lib/components/Collapsible/index.d.ts +16 -0
  146. package/dist/src/lib/components/Collapsible/index.js +67 -0
  147. package/dist/src/lib/components/Collapsible/index.js.map +1 -0
  148. package/dist/src/lib/components/Column/Column.stories.d.ts +6 -0
  149. package/dist/src/lib/components/Column/Column.stories.js +30 -0
  150. package/dist/src/lib/components/Column/Column.stories.js.map +1 -0
  151. package/dist/src/lib/components/Column/index.d.ts +12 -0
  152. package/dist/src/lib/components/Column/index.js +83 -0
  153. package/dist/src/lib/components/Column/index.js.map +1 -0
  154. package/dist/src/lib/components/Container/Container.stories.d.ts +6 -0
  155. package/dist/src/lib/components/Container/Container.stories.js +30 -0
  156. package/dist/src/lib/components/Container/Container.stories.js.map +1 -0
  157. package/dist/src/lib/components/Container/index.d.ts +9 -0
  158. package/dist/src/lib/components/Container/index.js +8 -0
  159. package/dist/src/lib/components/Container/index.js.map +1 -0
  160. package/dist/src/lib/components/FooterBar/footerBar.stories.d.ts +6 -0
  161. package/dist/src/lib/components/FooterBar/footerBar.stories.js +48 -0
  162. package/dist/src/lib/components/FooterBar/footerBar.stories.js.map +1 -0
  163. package/dist/src/lib/components/FooterBar/index.d.ts +11 -0
  164. package/dist/src/lib/components/FooterBar/index.js +15 -0
  165. package/dist/src/lib/components/FooterBar/index.js.map +1 -0
  166. package/dist/src/lib/components/Form/Form.stories.d.ts +6 -0
  167. package/dist/src/lib/components/Form/Form.stories.js +82 -0
  168. package/dist/src/lib/components/Form/Form.stories.js.map +1 -0
  169. package/dist/src/lib/components/Form/index.d.ts +16 -0
  170. package/dist/src/lib/components/Form/index.js +19 -0
  171. package/dist/src/lib/components/Form/index.js.map +1 -0
  172. package/dist/src/lib/components/FyreCard/FyreCard.stories.d.ts +6 -0
  173. package/dist/src/lib/components/FyreCard/FyreCard.stories.js +22 -0
  174. package/dist/src/lib/components/FyreCard/FyreCard.stories.js.map +1 -0
  175. package/dist/src/lib/components/FyreCard/index.d.ts +13 -0
  176. package/dist/src/lib/components/FyreCard/index.js +18 -0
  177. package/dist/src/lib/components/FyreCard/index.js.map +1 -0
  178. package/dist/src/lib/components/Greeting/Greeting.stories.d.ts +6 -0
  179. package/dist/src/lib/components/Greeting/Greeting.stories.js +33 -0
  180. package/dist/src/lib/components/Greeting/Greeting.stories.js.map +1 -0
  181. package/dist/src/lib/components/Greeting/index.d.ts +10 -0
  182. package/dist/src/lib/components/Greeting/index.js +23 -0
  183. package/dist/src/lib/components/Greeting/index.js.map +1 -0
  184. package/dist/src/lib/components/Icon/Icon.stories.d.ts +6 -0
  185. package/dist/src/lib/components/Icon/Icon.stories.js +85 -0
  186. package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -0
  187. package/dist/src/lib/components/Icon/index.d.ts +17 -0
  188. package/dist/src/lib/components/Icon/index.js +42 -0
  189. package/dist/src/lib/components/Icon/index.js.map +1 -0
  190. package/dist/src/lib/components/Image/Image.stories.d.ts +6 -0
  191. package/dist/src/lib/components/Image/Image.stories.js +73 -0
  192. package/dist/src/lib/components/Image/Image.stories.js.map +1 -0
  193. package/dist/src/lib/components/Image/index.d.ts +16 -0
  194. package/dist/src/lib/components/Image/index.js +54 -0
  195. package/dist/src/lib/components/Image/index.js.map +1 -0
  196. package/dist/src/lib/components/ImageLink/ImageLink.stories.d.ts +6 -0
  197. package/dist/src/lib/components/ImageLink/ImageLink.stories.js +49 -0
  198. package/dist/src/lib/components/ImageLink/ImageLink.stories.js.map +1 -0
  199. package/dist/src/lib/components/ImageLink/index.d.ts +15 -0
  200. package/dist/src/lib/components/ImageLink/index.js +18 -0
  201. package/dist/src/lib/components/ImageLink/index.js.map +1 -0
  202. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +6 -0
  203. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js +25 -0
  204. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js.map +1 -0
  205. package/dist/src/lib/components/ImageLinkList/index.d.ts +9 -0
  206. package/dist/src/lib/components/ImageLinkList/index.js +11 -0
  207. package/dist/src/lib/components/ImageLinkList/index.js.map +1 -0
  208. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.d.ts +6 -0
  209. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js +71 -0
  210. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js.map +1 -0
  211. package/dist/src/lib/components/InformationIcon/index.d.ts +15 -0
  212. package/dist/src/lib/components/InformationIcon/index.js +46 -0
  213. package/dist/src/lib/components/InformationIcon/index.js.map +1 -0
  214. package/dist/src/lib/components/Input/Input.stories.d.ts +6 -0
  215. package/dist/src/lib/components/Input/Input.stories.js +95 -0
  216. package/dist/src/lib/components/Input/Input.stories.js.map +1 -0
  217. package/dist/src/lib/components/Input/index.d.ts +31 -0
  218. package/dist/src/lib/components/Input/index.js +25 -0
  219. package/dist/src/lib/components/Input/index.js.map +1 -0
  220. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.d.ts +6 -0
  221. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js +16 -0
  222. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js.map +1 -0
  223. package/dist/src/lib/components/Jumbotron/index.d.ts +9 -0
  224. package/dist/src/lib/components/Jumbotron/index.js +9 -0
  225. package/dist/src/lib/components/Jumbotron/index.js.map +1 -0
  226. package/dist/src/lib/components/Nav/Nav.stories.js +134 -0
  227. package/dist/src/lib/components/Nav/Nav.stories.js.map +1 -0
  228. package/dist/src/lib/components/Nav/index.d.ts +22 -0
  229. package/dist/src/lib/components/Nav/index.js +75 -0
  230. package/dist/src/lib/components/Nav/index.js.map +1 -0
  231. package/dist/src/lib/components/NavItem/NavItem.stories.d.ts +6 -0
  232. package/dist/src/lib/components/NavItem/NavItem.stories.js +75 -0
  233. package/dist/src/lib/components/NavItem/NavItem.stories.js.map +1 -0
  234. package/dist/src/lib/components/NavItem/index.d.ts +15 -0
  235. package/dist/src/lib/components/NavItem/index.js +24 -0
  236. package/dist/src/lib/components/NavItem/index.js.map +1 -0
  237. package/dist/src/lib/components/NewsCard/NewsCard.stories.d.ts +6 -0
  238. package/dist/src/lib/components/NewsCard/NewsCard.stories.js +60 -0
  239. package/dist/src/lib/components/NewsCard/NewsCard.stories.js.map +1 -0
  240. package/dist/src/lib/components/NewsCard/index.d.ts +14 -0
  241. package/dist/src/lib/components/NewsCard/index.js +20 -0
  242. package/dist/src/lib/components/NewsCard/index.js.map +1 -0
  243. package/dist/src/lib/components/Profile/Profile.stories.d.ts +6 -0
  244. package/dist/src/lib/components/Profile/Profile.stories.js +41 -0
  245. package/dist/src/lib/components/Profile/Profile.stories.js.map +1 -0
  246. package/dist/src/lib/components/Profile/index.d.ts +18 -0
  247. package/dist/src/lib/components/Profile/index.js +38 -0
  248. package/dist/src/lib/components/Profile/index.js.map +1 -0
  249. package/dist/src/lib/components/Row/Row.stories.d.ts +6 -0
  250. package/dist/src/lib/components/Row/Row.stories.js +37 -0
  251. package/dist/src/lib/components/Row/Row.stories.js.map +1 -0
  252. package/dist/src/lib/components/Row/index.d.ts +8 -0
  253. package/dist/src/lib/components/Row/index.js +8 -0
  254. package/dist/src/lib/components/Row/index.js.map +1 -0
  255. package/dist/src/lib/components/Search/Search.stories.d.ts +6 -0
  256. package/dist/src/lib/components/Search/Search.stories.js +48 -0
  257. package/dist/src/lib/components/Search/Search.stories.js.map +1 -0
  258. package/dist/src/lib/components/Search/index.d.ts +13 -0
  259. package/dist/src/lib/components/Search/index.js +23 -0
  260. package/dist/src/lib/components/Search/index.js.map +1 -0
  261. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.d.ts +6 -0
  262. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js +58 -0
  263. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js.map +1 -0
  264. package/dist/src/lib/components/SocialBlock/index.d.ts +21 -0
  265. package/dist/src/lib/components/SocialBlock/index.js +66 -0
  266. package/dist/src/lib/components/SocialBlock/index.js.map +1 -0
  267. package/dist/src/lib/components/StarRating/StarRating.stories.d.ts +6 -0
  268. package/dist/src/lib/components/StarRating/StarRating.stories.js +17 -0
  269. package/dist/src/lib/components/StarRating/StarRating.stories.js.map +1 -0
  270. package/dist/src/lib/components/StarRating/index.d.ts +9 -0
  271. package/dist/src/lib/components/StarRating/index.js +27 -0
  272. package/dist/src/lib/components/StarRating/index.js.map +1 -0
  273. package/dist/src/lib/components/Testimonial/Testimonial.stories.d.ts +6 -0
  274. package/dist/src/lib/components/Testimonial/Testimonial.stories.js +95 -0
  275. package/dist/src/lib/components/Testimonial/Testimonial.stories.js.map +1 -0
  276. package/dist/src/lib/components/Testimonial/index.d.ts +17 -0
  277. package/dist/src/lib/components/Testimonial/index.js +27 -0
  278. package/dist/src/lib/components/Testimonial/index.js.map +1 -0
  279. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.d.ts +6 -0
  280. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js +63 -0
  281. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js.map +1 -0
  282. package/dist/src/lib/components/TextAndTitle/index.d.ts +26 -0
  283. package/dist/src/lib/components/TextAndTitle/index.js +113 -0
  284. package/dist/src/lib/components/TextAndTitle/index.js.map +1 -0
  285. package/dist/src/lib/components/TextArea/TextArea.stories.d.ts +6 -0
  286. package/dist/src/lib/components/TextArea/TextArea.stories.js +63 -0
  287. package/dist/src/lib/components/TextArea/TextArea.stories.js.map +1 -0
  288. package/dist/src/lib/components/TextArea/index.d.ts +27 -0
  289. package/dist/src/lib/components/TextArea/index.js +18 -0
  290. package/dist/src/lib/components/TextArea/index.js.map +1 -0
  291. package/dist/src/lib/components/Timeline/Timeline.stories.d.ts +6 -0
  292. package/dist/src/lib/components/Timeline/Timeline.stories.js +88 -0
  293. package/dist/src/lib/components/Timeline/Timeline.stories.js.map +1 -0
  294. package/dist/src/lib/components/Timeline/index.d.ts +14 -0
  295. package/dist/src/lib/components/Timeline/index.js +186 -0
  296. package/dist/src/lib/components/Timeline/index.js.map +1 -0
  297. package/dist/src/lib/components/Tubestops/Tubestops.stories.d.ts +6 -0
  298. package/dist/src/lib/components/Tubestops/Tubestops.stories.js +62 -0
  299. package/dist/src/lib/components/Tubestops/Tubestops.stories.js.map +1 -0
  300. package/dist/src/lib/components/Tubestops/index.d.ts +13 -0
  301. package/dist/src/lib/components/Tubestops/index.js +44 -0
  302. package/dist/src/lib/components/Tubestops/index.js.map +1 -0
  303. package/dist/src/lib/components/UserIcon/UserIcon.stories.d.ts +6 -0
  304. package/dist/src/lib/components/UserIcon/UserIcon.stories.js +63 -0
  305. package/dist/src/lib/components/UserIcon/UserIcon.stories.js.map +1 -0
  306. package/dist/src/lib/components/UserIcon/index.d.ts +11 -0
  307. package/dist/src/lib/components/UserIcon/index.js +17 -0
  308. package/dist/src/lib/components/UserIcon/index.js.map +1 -0
  309. package/dist/src/lib/components/Video/Video.stories.d.ts +6 -0
  310. package/dist/src/lib/components/Video/Video.stories.js +17 -0
  311. package/dist/src/lib/components/Video/Video.stories.js.map +1 -0
  312. package/dist/src/lib/components/Video/index.d.ts +17 -0
  313. package/dist/src/lib/components/Video/index.js +9 -0
  314. package/dist/src/lib/components/Video/index.js.map +1 -0
  315. package/dist/src/lib/index.d.ts +39 -0
  316. package/dist/src/lib/index.js +43 -0
  317. package/dist/src/lib/index.js.map +1 -0
  318. package/dist/src/lib/typography/Fonts.stories.d.ts +6 -0
  319. package/dist/src/lib/typography/Fonts.stories.js +42 -0
  320. package/dist/src/lib/typography/Fonts.stories.js.map +1 -0
  321. package/dist/src/lib/typography/index.d.ts +4 -0
  322. package/dist/src/lib/typography/index.js +23 -0
  323. package/dist/src/lib/typography/index.js.map +1 -0
  324. package/dist/src/lib/utils/controls.d.ts +35 -0
  325. package/dist/src/lib/utils/controls.js +21 -0
  326. package/dist/src/lib/utils/controls.js.map +1 -0
  327. package/dist/src/lib/utils/theme.d.ts +2 -0
  328. package/dist/src/lib/utils/theme.js +8 -0
  329. package/dist/src/lib/utils/theme.js.map +1 -0
  330. package/dist/tailwind.config.d.ts +64 -0
  331. package/dist/tailwind.config.js +80 -0
  332. package/dist/tailwind.config.js.map +1 -0
  333. package/package.json +18 -5
  334. package/dist/components/Accordion/index.js +0 -37
  335. package/dist/components/AlertBar/index.js +0 -129
  336. package/dist/components/Breadcrumbs/index.js +0 -66
  337. package/dist/components/BreadcrumbsBordered/index.js +0 -66
  338. package/dist/components/BreadcrumbsItem/index.js +0 -160
  339. package/dist/components/Button/index.js +0 -141
  340. package/dist/components/Card/index.js +0 -151
  341. package/dist/components/CardWithTopImage/index.js +0 -64
  342. package/dist/components/Carousel/index.css +0 -4
  343. package/dist/components/Carousel/index.css.map +0 -1
  344. package/dist/components/Carousel/index.js +0 -185
  345. package/dist/components/ChevronCard/index.js +0 -65
  346. package/dist/components/Collapsible/index.js +0 -158
  347. package/dist/components/Column/index.js +0 -137
  348. package/dist/components/Container/index.js +0 -55
  349. package/dist/components/FooterBar/index.js +0 -60
  350. package/dist/components/Form/index.js +0 -78
  351. package/dist/components/FyreCard/index.js +0 -54
  352. package/dist/components/Greeting/index.js +0 -69
  353. package/dist/components/Icon/index.js +0 -91
  354. package/dist/components/Image/index.js +0 -142
  355. package/dist/components/ImageLink/index.js +0 -61
  356. package/dist/components/ImageLinkList/index.js +0 -45
  357. package/dist/components/InformationIcon/index.js +0 -120
  358. package/dist/components/Input/index.js +0 -112
  359. package/dist/components/Jumbotron/index.js +0 -39
  360. package/dist/components/Nav/index.js +0 -302
  361. package/dist/components/NavItem/index.js +0 -129
  362. package/dist/components/NewsCard/index.js +0 -62
  363. package/dist/components/Profile/index.js +0 -86
  364. package/dist/components/Row/index.js +0 -55
  365. package/dist/components/Search/index.js +0 -60
  366. package/dist/components/SocialBlock/index.js +0 -184
  367. package/dist/components/StarRating/index.js +0 -110
  368. package/dist/components/Testimonial/index.js +0 -70
  369. package/dist/components/TextAndTitle/index.js +0 -283
  370. package/dist/components/TextArea/index.js +0 -97
  371. package/dist/components/Timeline/index.css.map +0 -1
  372. package/dist/components/Timeline/index.js +0 -254
  373. package/dist/components/Tubestops/index.css.map +0 -1
  374. package/dist/components/Tubestops/index.js +0 -95
  375. package/dist/components/UserIcon/index.js +0 -50
  376. package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css +0 -1831
  377. package/dist/components/Users/rupertb/Documents/apps/trepur_components/src/lib/styles/base.css.map +0 -1
  378. package/dist/components/Video/index.js +0 -67
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { Props as buttonProps } from '../Button';
3
+ export interface Props {
4
+ id?: string;
5
+ className?: string;
6
+ title?: string;
7
+ text?: string;
8
+ withLiveUpdates?: boolean;
9
+ onSave?: (arr: Array<any>, id: string | undefined) => void;
10
+ saveButtonProps?: buttonProps;
11
+ cancelButtonProps?: buttonProps;
12
+ editTitleClasses?: string;
13
+ editTextClasses?: string;
14
+ editInputClasses?: string;
15
+ buttonWrapperClasses?: string;
16
+ textWrapperClasses?: string;
17
+ socialButtons?: Array<buttonProps>;
18
+ theme: 'light' | 'dark';
19
+ }
20
+ declare const SocialBlock: ({ id, className, title, text, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, editTitleClasses, editTextClasses, editInputClasses, buttonWrapperClasses, textWrapperClasses, socialButtons, theme }: Props) => JSX.Element;
21
+ export default SocialBlock;
@@ -0,0 +1,66 @@
1
+ import React, { useState } from 'react';
2
+ import Input from '../Input';
3
+ import Button from '../Button';
4
+ import classNames from 'classnames';
5
+ const SocialBlock = ({ id, className, title, text, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, editTitleClasses, editTextClasses, editInputClasses, buttonWrapperClasses, textWrapperClasses, socialButtons, theme = 'light' }) => {
6
+ const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary';
7
+ const defaultComponentData = {
8
+ title: {
9
+ text: title,
10
+ },
11
+ text: {
12
+ text: text,
13
+ }
14
+ };
15
+ const [isInEditingMode, setIsInEditingMode] = useState(false);
16
+ const [isHovering, setIsHovering] = useState(false);
17
+ const [componentData, setComponentData] = useState(defaultComponentData);
18
+ const hoverClasses = 'border-dashed border';
19
+ const classList = classNames(className, colours);
20
+ const buttnoWrapperClasslist = classNames({}, `${buttonWrapperClasses} py-4`);
21
+ const hoverClassList = classNames({
22
+ [hoverClasses]: withLiveUpdates && !isInEditingMode && isHovering
23
+ }, textWrapperClasses);
24
+ const toggleEditState = () => {
25
+ withLiveUpdates && setIsInEditingMode(!isInEditingMode);
26
+ };
27
+ const handleButtonSave = () => {
28
+ const arr = [];
29
+ arr.push({ key: 'title', value: componentData.title.text });
30
+ arr.push({ key: 'text', value: componentData.text.text });
31
+ toggleEditState();
32
+ onSave && onSave(arr, id);
33
+ setIsHovering(false);
34
+ };
35
+ const handleButtonCancel = () => {
36
+ toggleEditState();
37
+ setIsHovering(false);
38
+ };
39
+ const handleChange = (e) => {
40
+ let id = e.target.id;
41
+ id = id.split('-')[id.split('-').length - 1];
42
+ setComponentData(Object.assign(Object.assign({}, componentData), { [id]: {
43
+ text: e.target.value
44
+ } }));
45
+ };
46
+ const toggleHoverState = () => {
47
+ withLiveUpdates && setIsHovering(!isHovering);
48
+ };
49
+ return (React.createElement("div", Object.assign({}, (id && { id: id }), { className: classList }), withLiveUpdates && isInEditingMode ?
50
+ React.createElement("div", { className: colours },
51
+ React.createElement(Input, { id: 'title', className: editTitleClasses, inputClasses: editInputClasses, autoFocus: true, value: componentData.title.text, onChange: (e) => handleChange(e), type: "text", theme: theme }),
52
+ React.createElement(Input, { id: 'text', className: editTextClasses, inputClasses: editInputClasses, value: componentData.text.text, onChange: (e) => handleChange(e), type: "text", theme: theme }),
53
+ React.createElement(Button, { className: 'mt-4', onClick: handleButtonSave }, "Save"),
54
+ React.createElement(Button, { className: 'mt-4 ml-4', onClick: handleButtonCancel }, "Cancel"))
55
+ :
56
+ React.createElement(React.Fragment, null,
57
+ React.createElement("div", { onMouseOver: () => toggleHoverState(), onMouseOut: () => toggleHoverState(), onClick: toggleEditState, className: hoverClassList },
58
+ React.createElement("h2", { className: 'text-md sm:text-lg' }, componentData.title.text),
59
+ React.createElement("p", { className: 'pt-4' }, componentData.text.text)),
60
+ React.createElement("div", { className: buttnoWrapperClasslist },
61
+ React.createElement("div", { className: 'flex flex-wrap w-full justify-center' }, socialButtons && socialButtons.map((button, i) => {
62
+ return React.createElement("div", { key: `social_btn_${i + 1}` }, button);
63
+ }))))));
64
+ };
65
+ export default SocialBlock;
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/S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CAAsC,IACpD,aAAa,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAS,EAAE,EAAE;wBACtD,OAAO,6BAAK,GAAG,EAAE,cAAc,CAAC,GAAC,CAAC,EAAE,IAAG,MAAM,CAAO,CAAA;oBACxD,CAAC,CAAC,CACI,CACJ,CACP,CAED,CACT,CAAA;AACL,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import StarRating from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof StarRating>;
5
+ export declare const _StarRating: ComponentStory<({ id, className, stars, size }: import("./index").Props) => JSX.Element>;
6
+ export default componentMeta;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import StarRating from './index';
3
+ import { idAndClassName } from '@utils/controls';
4
+ const componentMeta = {
5
+ title: 'Trepur Components/Other/Atoms/Star Rating',
6
+ component: StarRating,
7
+ parameters: {},
8
+ argTypes: Object.assign({}, idAndClassName),
9
+ args: {
10
+ stars: 3,
11
+ size: 2
12
+ }
13
+ };
14
+ const Template = (args) => React.createElement(StarRating, Object.assign({}, args));
15
+ export const _StarRating = Template.bind({});
16
+ export default componentMeta;
17
+ //# sourceMappingURL=StarRating.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StarRating.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/StarRating/StarRating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,aAAa,GAAqC;IACpD,KAAK,EAAE,2CAA2C;IAClD,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,EAAE;IACd,QAAQ,oBACD,cAAc,CACpB;IACD,IAAI,EAAE;QACF,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;KACV;CACJ,CAAA;AAED,MAAM,QAAQ,GAAsC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,UAAU,oBAAK,IAAI,EAAI,CAAA;AAEtF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE5C,eAAe,aAAa,CAAA"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface Props {
3
+ id: string;
4
+ className: string;
5
+ stars: number;
6
+ size: number;
7
+ }
8
+ declare const StarRating: ({ id, className, stars, size }: Props) => JSX.Element;
9
+ export default StarRating;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import Icon from '../Icon';
3
+ import classNames from 'classnames';
4
+ const StarRating = ({ id, className, stars = 1, size = 1 }) => {
5
+ const classList = classNames({}, `${className} flex`);
6
+ const getStars = () => {
7
+ const starsArr = [];
8
+ for (var i = 0; i < stars; i++) {
9
+ starsArr.push(React.createElement(Icon, { key: `checked_star_${i + 0}`, id: `checked-${i}`, className: 'checked', type: 'star', size: size, colour: 'gold', bgColour: 'white' }));
10
+ }
11
+ return starsArr;
12
+ };
13
+ const getStarsChecked = () => {
14
+ const starsArr = [];
15
+ for (var i = 0; i < 5 - stars; i++) {
16
+ starsArr.push(React.createElement(Icon, { key: `unchecked_star_${i + 0}`, id: `unchecked-${i}`, className: 'unchecked opacity-30 gold', type: 'star', size: size, colour: 'gold', bgColour: 'white' }));
17
+ }
18
+ return starsArr;
19
+ };
20
+ const getAllStars = () => {
21
+ const starArray = [...getStars(), ...getStarsChecked()];
22
+ return starArray;
23
+ };
24
+ return (React.createElement("div", Object.assign({}, (id && { id: id }), { className: classList }), getAllStars()));
25
+ };
26
+ export default StarRating;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/StarRating/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,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C,CAAA;IAED,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,MAAM,SAAS,GAAG,CAAC,GAAG,QAAQ,EAAE,EAAE,GAAG,eAAe,EAAE,CAAC,CAAA;QACvD,OAAO,SAAS,CAAA;IACpB,CAAC,CAAA;IAED,OAAO,CACH,6CACQ,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IACtB,SAAS,EAAE,SAAS,KAEnB,WAAW,EAAE,CACZ,CACT,CAAA;AACL,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import Testimonial from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof Testimonial>;
5
+ export declare const _Testimonial: ComponentStory<({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }: import("./index").Props) => JSX.Element>;
6
+ export default componentMeta;
@@ -0,0 +1,95 @@
1
+ import React from 'react';
2
+ import { idAndClassName } from '@utils/controls';
3
+ import Testimonial from './index';
4
+ const componentMeta = {
5
+ title: 'Trepur Components/Rupert Bennett/Organisms/Testimonial',
6
+ component: Testimonial,
7
+ parameters: {},
8
+ argTypes: Object.assign(Object.assign({}, idAndClassName), { text: {
9
+ description: 'The description to display on the component',
10
+ control: 'text',
11
+ table: {
12
+ type: { summary: 'default' }
13
+ },
14
+ defaultValue: { summary: 'undefined' }
15
+ }, companyName: {
16
+ description: 'The company name to display on the component',
17
+ control: 'text',
18
+ table: {
19
+ type: { summary: 'default' }
20
+ },
21
+ defaultValue: { summary: 'undefined' }
22
+ }, positionStartDate: {
23
+ description: 'The start date to display on the component',
24
+ control: 'text',
25
+ table: {
26
+ type: { summary: 'default' }
27
+ },
28
+ defaultValue: { summary: 'undefined' }
29
+ }, positionEndDate: {
30
+ description: 'The end date to display on the component',
31
+ control: 'text',
32
+ table: {
33
+ type: { summary: 'default' }
34
+ },
35
+ defaultValue: { summary: 'undefined' }
36
+ }, position: {
37
+ description: 'The position to display on the component',
38
+ control: 'text',
39
+ table: {
40
+ type: { summary: 'default' }
41
+ },
42
+ defaultValue: { summary: 'undefined' }
43
+ }, date: {
44
+ description: 'The date of the testimonial to display on the component',
45
+ control: 'text',
46
+ table: {
47
+ type: { summary: 'default' }
48
+ },
49
+ defaultValue: { summary: 'undefined' }
50
+ }, authorsName: {
51
+ description: 'The authors name to display on the component',
52
+ control: 'text',
53
+ table: {
54
+ type: { summary: 'default' }
55
+ },
56
+ defaultValue: { summary: 'undefined' }
57
+ }, authorsPosition: {
58
+ description: 'The authors position to display on the component',
59
+ control: 'text',
60
+ table: {
61
+ type: { summary: 'default' }
62
+ },
63
+ defaultValue: { summary: 'undefined' }
64
+ }, imageProps: {
65
+ type: { name: 'other', value: 'object' },
66
+ description: 'The props to pass to the image to display on the component',
67
+ table: {
68
+ type: {
69
+ summary: 'object'
70
+ },
71
+ defaultValue: { summary: 'undefined' }
72
+ }
73
+ } }),
74
+ args: {
75
+ imageProps: {
76
+ image: 'https://picsum.photos/100/100',
77
+ height: 8,
78
+ width: 8,
79
+ roundedFull: true,
80
+ centerAligned: true
81
+ },
82
+ authorsName: 'Authors Name',
83
+ authorsPosition: 'Authors Position',
84
+ position: 'Position',
85
+ positionEndDate: 'End Date',
86
+ positionStartDate: 'Start Date',
87
+ date: 'Date',
88
+ companyName: 'Company Name',
89
+ text: 'This is some text'
90
+ }
91
+ };
92
+ const Template = (args) => React.createElement(Testimonial, Object.assign({}, args));
93
+ export const _Testimonial = Template.bind({});
94
+ export default componentMeta;
95
+ //# sourceMappingURL=Testimonial.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Testimonial.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Testimonial/Testimonial.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,O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,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE7C,eAAe,aAAa,CAAA"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { Props as imageProps } from '../Image';
3
+ export interface Props {
4
+ id?: string;
5
+ className?: string;
6
+ text?: string;
7
+ imageProps?: imageProps;
8
+ companyName?: string;
9
+ position?: string;
10
+ date?: string;
11
+ positionStartDate?: string;
12
+ positionEndDate?: string;
13
+ authorsName?: string;
14
+ authorsPosition?: string;
15
+ }
16
+ declare const Testimonial: ({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }: Props) => JSX.Element;
17
+ export default Testimonial;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ import Image from '../Image';
4
+ const Testimonial = ({ id, className, text, imageProps, companyName, position, date, positionStartDate, positionEndDate, authorsName, authorsPosition }) => {
5
+ const classList = classNames(className, 'text-center');
6
+ return (React.createElement("div", { id: id, className: classList },
7
+ React.createElement("div", { className: 'mx-auto' },
8
+ React.createElement(Image, Object.assign({}, imageProps))),
9
+ React.createElement("div", null,
10
+ React.createElement("h2", { className: 'text-md md:text-md' },
11
+ companyName,
12
+ " "),
13
+ React.createElement("p", { className: 'text-md md:text-sm' }, position),
14
+ React.createElement("p", null,
15
+ positionStartDate,
16
+ " - ",
17
+ positionEndDate),
18
+ React.createElement("p", null, text),
19
+ React.createElement("p", null,
20
+ authorsName,
21
+ " - ",
22
+ authorsPosition,
23
+ ": ",
24
+ date))));
25
+ };
26
+ export default Testimonial;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Testimonial/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAA8B,MAAM,UAAU,CAAA;AAgBrD,MAAM,WAAW,GAAG,CAAC,EACjB,EAAE,EACF,SAAS,EACT,IAAI,EACJ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,eAAe,EACX,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;IAEtD,OAAO,CACH,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS;QAC7B,6BAAK,SAAS,EAAC,SAAS;YACpB,oBAAC,KAAK,oBAAK,UAAU,EAAI,CACvB;QACN;YACI,4BAAI,SAAS,EAAC,oBAAoB;gBAAE,WAAW;oBAAO;YACtD,2BAAG,SAAS,EAAC,oBAAoB,IAAE,QAAQ,CAAK;YAChD;gBAAI,iBAAiB;;gBAAK,eAAe,CAAK;YAC9C,+BAAI,IAAI,CAAK;YACb;gBAAI,WAAW;;gBAAK,eAAe;;gBAAI,IAAI,CAAK,CAC9C,CACJ,CACT,CAAA;AACL,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import TextAndTitle from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof TextAndTitle>;
5
+ export declare const _TextAndTitle: ComponentStory<React.FC<import("./index").Props>>;
6
+ export default componentMeta;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import TextAndTitle from './index';
3
+ import { action } from '@storybook/addon-actions';
4
+ import Greeting from '../Greeting';
5
+ const componentMeta = {
6
+ title: 'Trepur Components/Rupert Bennett/Organisms/Text And Title',
7
+ component: TextAndTitle,
8
+ argTypes: {
9
+ id: {
10
+ description: 'Defines the id of the component',
11
+ table: {
12
+ category: '',
13
+ type: { summary: 'string' },
14
+ defaultValue: { summary: 'undefined' }
15
+ }
16
+ },
17
+ className: {
18
+ description: 'Defines any additional classes for the components',
19
+ table: {
20
+ category: '',
21
+ type: { summary: 'string' },
22
+ defaultValue: { summary: 'undefined' }
23
+ }
24
+ },
25
+ onSave: {
26
+ type: { name: 'function', required: false },
27
+ description: 'Fires a function when you click save',
28
+ action: 'onClick',
29
+ table: {
30
+ type: {
31
+ summary: 'function'
32
+ },
33
+ defaultValue: { summary: 'undefined' }
34
+ }
35
+ }
36
+ },
37
+ args: {
38
+ children: React.createElement("p", null, "This is a child"),
39
+ editTitleClasses: 'text-md sm:text-lg ',
40
+ editTextClasses: 'break-words',
41
+ editInputClasses: 'border border-black text-black bg-white',
42
+ textLineOne: React.createElement("div", null,
43
+ React.createElement(Greeting, null),
44
+ React.createElement("p", null, "Loremipsumdolorsitamet consectetur adipisicing elit")),
45
+ textLineTwo: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi impedit sed, quis aspernatur voluptate minima vel placeat ipsa amet voluptatem reprehenderit ullam rem cum tempora explicabo veritatis numquam libero asperiores!',
46
+ textLineThree: 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tenetur nihil voluptas ipsum labore? Eligendi et ipsam, repellat culpa porro a animi laudantium molestiae provident facere non tempora odit? Perferendis, assumenda.',
47
+ onSave: action('button-save'),
48
+ withLiveUpdates: true,
49
+ isHorizontal: true,
50
+ saveButtonProps: {
51
+ className: 'mt-4',
52
+ children: 'Save',
53
+ },
54
+ cancelButtonProps: {
55
+ className: 'mt-4 ml-4',
56
+ children: 'Cancel',
57
+ }
58
+ }
59
+ };
60
+ const Template = (args) => React.createElement(TextAndTitle, Object.assign({}, args));
61
+ export const _TextAndTitle = Template.bind({});
62
+ export default componentMeta;
63
+ //# sourceMappingURL=TextAndTitle.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAndTitle.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/TextAndTitle/TextAndTitle.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,YAAY,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE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M;SACnB;QACD,iBAAiB,EAAE;YACf,SAAS,EAAE,WAAW;YACtB,QAAQ,EAAE,QAAQ;SACrB;KACJ;CACJ,CAAA;AAED,MAAM,QAAQ,GAAwC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,YAAY,oBAAK,IAAI,EAAI,CAAC;AAE3F,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE/C,eAAe,aAAa,CAAA"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { Props as buttonProps } from '../Button';
3
+ export interface Props {
4
+ id?: string;
5
+ className?: string;
6
+ titleClasses?: string;
7
+ editTitleClasses?: string;
8
+ editTextClasses?: string;
9
+ editInputClasses?: string;
10
+ textClasses?: string;
11
+ textLineOne?: string | object;
12
+ textLineTwo?: string | object;
13
+ textLineThree?: string | object;
14
+ title?: string;
15
+ titleBold?: boolean;
16
+ textCenter?: boolean;
17
+ titleCenter?: boolean;
18
+ withLiveUpdates?: boolean;
19
+ onSave?: (arr: Array<any>, id: string | undefined) => void;
20
+ saveButtonProps?: buttonProps;
21
+ cancelButtonProps?: buttonProps;
22
+ isHorizontal?: boolean;
23
+ children?: any;
24
+ }
25
+ declare const TextAndTitle: React.FC<Props>;
26
+ export default TextAndTitle;
@@ -0,0 +1,113 @@
1
+ import React, { useState } from 'react';
2
+ import Input from '../Input';
3
+ import Button from '../Button';
4
+ import classNames from 'classnames';
5
+ import TextArea from '../TextArea';
6
+ const TextAndTitle = ({ id, className, titleClasses, editTitleClasses, editTextClasses, editInputClasses, textClasses, textLineOne, textLineTwo, textLineThree, title, titleBold, textCenter, titleCenter, withLiveUpdates, onSave, saveButtonProps, cancelButtonProps, isHorizontal, children }) => {
7
+ var _a;
8
+ const getLineHeight = (id) => {
9
+ const element = document.getElementById(id);
10
+ const divHeight = element === null || element === void 0 ? void 0 : element.offsetHeight;
11
+ const lineHeight = element && parseFloat(getComputedStyle(element).fontSize);
12
+ const pt = element && parseFloat(getComputedStyle(element).paddingTop);
13
+ const pb = element && parseFloat(getComputedStyle(element).paddingBottom);
14
+ const mt = element && parseFloat(getComputedStyle(element).marginTop);
15
+ const mb = element && parseFloat(getComputedStyle(element).marginBottom);
16
+ const bw = element && parseFloat(getComputedStyle(element).borderWidth);
17
+ if (divHeight && mt && mb && pt && pb && bw && lineHeight) {
18
+ const height = divHeight ? divHeight - mt - mb - pt - pb - (bw * 2) : 0;
19
+ if (isHorizontal) {
20
+ return Math.floor(height / lineHeight) - 1;
21
+ }
22
+ return Math.floor(height / lineHeight);
23
+ }
24
+ };
25
+ const defaultComponentData = {
26
+ title: {
27
+ text: title,
28
+ },
29
+ textLineOne: {
30
+ text: textLineOne,
31
+ },
32
+ textLineTwo: {
33
+ text: textLineTwo
34
+ },
35
+ textLineThree: {
36
+ text: textLineThree
37
+ }
38
+ };
39
+ const [isInEditingMode, setIsInEditingMode] = useState(false);
40
+ const [componentData, setComponentData] = useState(defaultComponentData);
41
+ const borderClasses = 'border border-transparent';
42
+ const classList = classNames(`${className} bg-primary text-white`);
43
+ const titleClassList = classNames({
44
+ 'font-bold': titleBold,
45
+ 'text-center': titleCenter,
46
+ [borderClasses]: withLiveUpdates && !isInEditingMode,
47
+ }, `${titleClasses} text-md break-words`);
48
+ const textClassList = classNames({
49
+ 'text-center': textCenter,
50
+ [borderClasses]: withLiveUpdates && !isInEditingMode,
51
+ }, `${textClasses} pt-2 mt-2`);
52
+ const toggleEditState = () => {
53
+ withLiveUpdates &&
54
+ setIsInEditingMode(!isInEditingMode);
55
+ };
56
+ const handleButtonSave = () => {
57
+ const arr = [];
58
+ arr.push({ key: 'title', value: componentData.title.text });
59
+ arr.push({ key: 'textLineOne', value: componentData.textLineOne.text });
60
+ arr.push({ key: 'textLineTwo', value: componentData.textLineTwo.text });
61
+ arr.push({ key: 'textLineThree', value: componentData.textLineThree.text });
62
+ toggleEditState();
63
+ onSave && onSave(arr, id);
64
+ };
65
+ const handleButtonCancel = () => {
66
+ toggleEditState();
67
+ };
68
+ const handleChange = (e) => {
69
+ let id = e.target.id;
70
+ id = id.split('-')[id.split('-').length - 1];
71
+ setComponentData(Object.assign(Object.assign({}, componentData), { [id]: {
72
+ text: e.target.value
73
+ } }));
74
+ };
75
+ const wrapperClassList = classNames({
76
+ 'flex flex-wrap justify-center md:items-center': isHorizontal,
77
+ 'hover:border-black hover:border-dashed': withLiveUpdates && !isInEditingMode
78
+ }, 'border-2 border-transparent');
79
+ const titleWrapperClassList = classNames({
80
+ 'md:w-1/2 md:text-center md:px-8': isHorizontal
81
+ });
82
+ const textWrapperClassList = classNames({
83
+ 'md:w-1/2 md:text-center md:py-8 md:px-8': isHorizontal
84
+ });
85
+ return (React.createElement("div", Object.assign({}, (id && { id: id }), { className: classList }), withLiveUpdates && isInEditingMode ?
86
+ React.createElement(React.Fragment, null,
87
+ React.createElement("div", { className: wrapperClassList },
88
+ React.createElement("div", { className: titleWrapperClassList }, componentData.title.text ?
89
+ React.createElement(Input, { id: 'title', className: editTitleClasses, inputClasses: `${editInputClasses} ${textClassList}`, autoFocus: true, value: (_a = componentData === null || componentData === void 0 ? void 0 : componentData.title) === null || _a === void 0 ? void 0 : _a.text, onChange: (e) => handleChange(e), type: "text" })
90
+ :
91
+ React.createElement("div", null, children)),
92
+ React.createElement("div", { className: textWrapperClassList },
93
+ React.createElement(TextArea, { id: 'textLineOne', className: editTextClasses, textAreaClasses: `${editInputClasses} ${titleClassList} ${isHorizontal ? 'text-center' : ''}`, rows: getLineHeight('textLineOne'), onChange: (e) => handleChange(e) }, componentData.textLineOne.text),
94
+ React.createElement(TextArea, { id: 'textLineOne', className: editTextClasses, textAreaClasses: `${editInputClasses} ${titleClassList} ${isHorizontal ? 'text-center' : ''}`, rows: getLineHeight('textLineOne'), onChange: (e) => handleChange(e) }, componentData.textLineTwo.text),
95
+ React.createElement(TextArea, { id: 'textLineThree', className: editTextClasses, textAreaClasses: `${editInputClasses} ${titleClassList} ${isHorizontal ? 'text-center' : ''}`, rows: getLineHeight('textLineThree'), onChange: (e) => handleChange(e) }, componentData.textLineThree.text))),
96
+ React.createElement(Button, { className: saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.className, onClick: handleButtonSave }, saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.children),
97
+ React.createElement(Button, { className: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, onClick: handleButtonCancel }, cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.children))
98
+ :
99
+ React.createElement("div", { className: wrapperClassList, onClick: toggleEditState },
100
+ React.createElement("div", { className: titleWrapperClassList }, componentData.title.text ?
101
+ React.createElement("h1", { className: titleClassList }, componentData.title.text)
102
+ :
103
+ React.createElement("div", null, children)),
104
+ React.createElement("div", { className: textWrapperClassList },
105
+ !componentData.title.text ?
106
+ React.createElement("h1", { id: 'textLineOne', className: titleClassList }, componentData.textLineOne.text)
107
+ :
108
+ React.createElement("p", { id: 'textLineOne', className: textClassList }, componentData.textLineOne.text),
109
+ React.createElement("div", { id: 'textLineTwo', className: textClassList }, componentData.textLineTwo.text),
110
+ React.createElement("div", { id: 'textLineThree', className: textClassList }, componentData.textLineThree.text)))));
111
+ };
112
+ export default TextAndTitle;
113
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/TextAndTitle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAW,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,MAA+B,MAAM,WAAW,CAAA;AACvD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAyBlC,MAAM,YAAY,GAAoB,CAAC,EACnC,EAAE,EACF,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAA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C,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;wBACxB,4BAAI,EAAE,EAAC,aAAa,EAAC,SAAS,EAAE,cAAc,IACzC,aAAa,CAAC,WAAW,CAAC,IAAI,CAC9B;wBACT,CAAC;4BACG,2BAAG,EAAE,EAAC,aAAa,EAAC,SAAS,EAAE,aAAa,IACvC,aAAa,CAAC,WAAW,CAAC,IAAI,CAC/B;oBAER,6BAAK,EAAE,EAAC,aAAa,EAAC,SAAS,EAAE,aAAa,IACzC,aAAa,CAAC,WAAW,CAAC,IAAI,CAC7B;oBACN,6BAAK,EAAE,EAAC,eAAe,EAAC,SAAS,EAAE,aAAa,IAC3C,aAAa,CAAC,aAAa,CAAC,IAAI,CAC/B,CACJ,CACJ,CAER,CACT,CAAA;AACL,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import TextArea from './index';
3
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ declare const componentMeta: ComponentMeta<typeof TextArea>;
5
+ export declare const _TextArea: ComponentStory<({ id, className, labelClasses, textAreaClasses, label, placeholder, bold, name, disabled, rows, cols, autoFocus, formId, maxLength, readOnly, required, onBlur, onFocus, onChange, withPadding, children, theme }: import("./index").Props) => JSX.Element>;
6
+ export default componentMeta;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import TextArea from './index';
3
+ const componentMeta = {
4
+ title: 'Trepur Components/Rupert Bennett/Atoms/Text Area',
5
+ component: TextArea,
6
+ parameters: {},
7
+ argTypes: {
8
+ id: {
9
+ description: 'Defines the id of the component',
10
+ table: {
11
+ category: '',
12
+ type: { summary: 'string' },
13
+ defaultValue: { summary: 'undefined' }
14
+ }
15
+ },
16
+ className: {
17
+ description: 'Defines any additional classes for the components',
18
+ table: {
19
+ category: '',
20
+ type: { summary: 'string' },
21
+ defaultValue: { summary: 'undefined' }
22
+ }
23
+ },
24
+ label: {
25
+ description: '',
26
+ control: 'text',
27
+ table: {
28
+ category: '',
29
+ }
30
+ },
31
+ placeholder: {
32
+ description: '',
33
+ control: 'text',
34
+ table: {
35
+ category: '',
36
+ }
37
+ },
38
+ bold: {
39
+ description: '',
40
+ control: 'boolean',
41
+ table: {
42
+ category: '',
43
+ }
44
+ },
45
+ theme: {
46
+ type: { name: 'string', required: false },
47
+ options: ['dark', 'light'],
48
+ description: 'The variant of button to render',
49
+ table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
50
+ defaultValue: 'dark',
51
+ control: { type: 'radio' }
52
+ }
53
+ },
54
+ args: {
55
+ label: 'This is a label',
56
+ placeholder: 'This is a text area placeholder',
57
+ withPadding: true
58
+ }
59
+ };
60
+ const Template = (args) => React.createElement(TextArea, Object.assign({}, args));
61
+ export const _TextArea = Template.bind({});
62
+ export default componentMeta;
63
+ //# sourceMappingURL=TextArea.stories.js.map