trepur_components 1.0.0 → 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 (285) hide show
  1. package/dist/src/lib/components/Accordion/Accordion.stories.js +19 -11
  2. package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -1
  3. package/dist/src/lib/components/Accordion/index.d.ts +1 -2
  4. package/dist/src/lib/components/Accordion/index.js +1 -1
  5. package/dist/src/lib/components/Accordion/index.js.map +1 -1
  6. package/dist/src/lib/components/AlertBar/AlertBar.stories.js +1 -1
  7. package/dist/src/lib/components/AlertBar/AlertBar.stories.js.map +1 -1
  8. package/dist/src/lib/components/AlertBar/index.js +21 -19
  9. package/dist/src/lib/components/AlertBar/index.js.map +1 -1
  10. package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
  11. package/dist/src/lib/components/Breadcrumbs/index.js +8 -10
  12. package/dist/src/lib/components/Breadcrumbs/index.js.map +1 -1
  13. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +1 -1
  14. package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js.map +1 -1
  15. package/dist/src/lib/components/BreadcrumbsBordered/index.d.ts +1 -1
  16. package/dist/src/lib/components/BreadcrumbsBordered/index.js +7 -7
  17. package/dist/src/lib/components/BreadcrumbsBordered/index.js.map +1 -1
  18. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js +2 -2
  19. package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js.map +1 -1
  20. package/dist/src/lib/components/BreadcrumbsItem/index.js +33 -35
  21. package/dist/src/lib/components/BreadcrumbsItem/index.js.map +1 -1
  22. package/dist/src/lib/components/Button/button.stories.js +64 -19
  23. package/dist/src/lib/components/Button/button.stories.js.map +1 -1
  24. package/dist/src/lib/components/Button/index.js +11 -11
  25. package/dist/src/lib/components/Button/index.js.map +1 -1
  26. package/dist/src/lib/components/Card/Card.stories.d.ts +4 -1
  27. package/dist/src/lib/components/Card/Card.stories.js +32 -32
  28. package/dist/src/lib/components/Card/Card.stories.js.map +1 -1
  29. package/dist/src/lib/components/Card/index.d.ts +3 -3
  30. package/dist/src/lib/components/Card/index.js +43 -40
  31. package/dist/src/lib/components/Card/index.js.map +1 -1
  32. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js +3 -3
  33. package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js.map +1 -1
  34. package/dist/src/lib/components/CardWithTopImage/index.js +1 -1
  35. package/dist/src/lib/components/CardWithTopImage/index.js.map +1 -1
  36. package/dist/src/lib/components/Carousel/Carousel.stories.js +12 -12
  37. package/dist/src/lib/components/Carousel/Carousel.stories.js.map +1 -1
  38. package/dist/src/lib/components/Carousel/index.d.ts +6 -8
  39. package/dist/src/lib/components/Carousel/index.js +95 -54
  40. package/dist/src/lib/components/Carousel/index.js.map +1 -1
  41. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js +1 -1
  42. package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js.map +1 -1
  43. package/dist/src/lib/components/ChevronCard/index.js +8 -8
  44. package/dist/src/lib/components/ChevronCard/index.js.map +1 -1
  45. package/dist/src/lib/components/Collapsible/Collapsible.stories.js +5 -3
  46. package/dist/src/lib/components/Collapsible/Collapsible.stories.js.map +1 -1
  47. package/dist/src/lib/components/Collapsible/index.d.ts +1 -1
  48. package/dist/src/lib/components/Collapsible/index.js +22 -22
  49. package/dist/src/lib/components/Collapsible/index.js.map +1 -1
  50. package/dist/src/lib/components/Column/Column.stories.js +42 -8
  51. package/dist/src/lib/components/Column/Column.stories.js.map +1 -1
  52. package/dist/src/lib/components/Column/index.js +2 -2
  53. package/dist/src/lib/components/Column/index.js.map +1 -1
  54. package/dist/src/lib/components/Container/Container.stories.js +1 -1
  55. package/dist/src/lib/components/Container/Container.stories.js.map +1 -1
  56. package/dist/src/lib/components/Container/index.js +1 -1
  57. package/dist/src/lib/components/Container/index.js.map +1 -1
  58. package/dist/src/lib/components/FooterBar/footerBar.stories.js +2 -2
  59. package/dist/src/lib/components/FooterBar/footerBar.stories.js.map +1 -1
  60. package/dist/src/lib/components/FooterBar/index.js +1 -1
  61. package/dist/src/lib/components/FooterBar/index.js.map +1 -1
  62. package/dist/src/lib/components/Form/Form.stories.js +1 -1
  63. package/dist/src/lib/components/Form/Form.stories.js.map +1 -1
  64. package/dist/src/lib/components/Form/index.js +4 -4
  65. package/dist/src/lib/components/Form/index.js.map +1 -1
  66. package/dist/src/lib/components/FyreCard/FyreCard.stories.js +3 -3
  67. package/dist/src/lib/components/FyreCard/FyreCard.stories.js.map +1 -1
  68. package/dist/src/lib/components/FyreCard/index.js +6 -7
  69. package/dist/src/lib/components/FyreCard/index.js.map +1 -1
  70. package/dist/src/lib/components/Greeting/Greeting.stories.js +1 -1
  71. package/dist/src/lib/components/Greeting/Greeting.stories.js.map +1 -1
  72. package/dist/src/lib/components/Greeting/index.js +4 -4
  73. package/dist/src/lib/components/Greeting/index.js.map +1 -1
  74. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +6 -0
  75. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js +46 -0
  76. package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js.map +1 -0
  77. package/dist/src/lib/components/HamburgerIcon/index.d.ts +7 -0
  78. package/dist/src/lib/components/HamburgerIcon/index.js +26 -0
  79. package/dist/src/lib/components/HamburgerIcon/index.js.map +1 -0
  80. package/dist/src/lib/components/Icon/Icon.stories.d.ts +1 -1
  81. package/dist/src/lib/components/Icon/Icon.stories.js +4 -2
  82. package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -1
  83. package/dist/src/lib/components/Icon/index.d.ts +4 -2
  84. package/dist/src/lib/components/Icon/index.js +17 -3
  85. package/dist/src/lib/components/Icon/index.js.map +1 -1
  86. package/dist/src/lib/components/Image/Image.stories.js +2 -2
  87. package/dist/src/lib/components/Image/Image.stories.js.map +1 -1
  88. package/dist/src/lib/components/Image/index.js +3 -3
  89. package/dist/src/lib/components/Image/index.js.map +1 -1
  90. package/dist/src/lib/components/ImageLink/ImageLink.stories.d.ts +4 -1
  91. package/dist/src/lib/components/ImageLink/ImageLink.stories.js +8 -7
  92. package/dist/src/lib/components/ImageLink/ImageLink.stories.js.map +1 -1
  93. package/dist/src/lib/components/ImageLink/index.js +6 -6
  94. package/dist/src/lib/components/ImageLink/index.js.map +1 -1
  95. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +2 -2
  96. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js +5 -3
  97. package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js.map +1 -1
  98. package/dist/src/lib/components/ImageLinkList/index.d.ts +1 -1
  99. package/dist/src/lib/components/ImageLinkList/index.js +3 -3
  100. package/dist/src/lib/components/ImageLinkList/index.js.map +1 -1
  101. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js +5 -3
  102. package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js.map +1 -1
  103. package/dist/src/lib/components/InformationIcon/index.d.ts +1 -1
  104. package/dist/src/lib/components/InformationIcon/index.js +12 -13
  105. package/dist/src/lib/components/InformationIcon/index.js.map +1 -1
  106. package/dist/src/lib/components/Input/Input.stories.js +10 -10
  107. package/dist/src/lib/components/Input/Input.stories.js.map +1 -1
  108. package/dist/src/lib/components/Input/index.d.ts +1 -1
  109. package/dist/src/lib/components/Input/index.js +14 -14
  110. package/dist/src/lib/components/Input/index.js.map +1 -1
  111. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js +1 -1
  112. package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js.map +1 -1
  113. package/dist/src/lib/components/Jumbotron/index.js +1 -1
  114. package/dist/src/lib/components/Jumbotron/index.js.map +1 -1
  115. package/dist/src/lib/components/Nav/Nav.stories.d.ts +6 -0
  116. package/dist/src/lib/components/Nav/Nav.stories.js +12 -12
  117. package/dist/src/lib/components/Nav/Nav.stories.js.map +1 -1
  118. package/dist/src/lib/components/Nav/index.d.ts +2 -2
  119. package/dist/src/lib/components/Nav/index.js +25 -35
  120. package/dist/src/lib/components/Nav/index.js.map +1 -1
  121. package/dist/src/lib/components/NavItem/NavItem.stories.js +1 -1
  122. package/dist/src/lib/components/NavItem/NavItem.stories.js.map +1 -1
  123. package/dist/src/lib/components/NavItem/index.js +2 -2
  124. package/dist/src/lib/components/NavItem/index.js.map +1 -1
  125. package/dist/src/lib/components/NewsCard/NewsCard.stories.js +1 -1
  126. package/dist/src/lib/components/NewsCard/NewsCard.stories.js.map +1 -1
  127. package/dist/src/lib/components/NewsCard/index.js +3 -3
  128. package/dist/src/lib/components/NewsCard/index.js.map +1 -1
  129. package/dist/src/lib/components/Profile/Profile.stories.js +2 -2
  130. package/dist/src/lib/components/Profile/Profile.stories.js.map +1 -1
  131. package/dist/src/lib/components/Profile/index.js +9 -11
  132. package/dist/src/lib/components/Profile/index.js.map +1 -1
  133. package/dist/src/lib/components/Row/Row.stories.js +4 -4
  134. package/dist/src/lib/components/Row/Row.stories.js.map +1 -1
  135. package/dist/src/lib/components/Row/index.js.map +1 -1
  136. package/dist/src/lib/components/Search/Search.stories.js +1 -1
  137. package/dist/src/lib/components/Search/Search.stories.js.map +1 -1
  138. package/dist/src/lib/components/Search/index.js +10 -10
  139. package/dist/src/lib/components/Search/index.js.map +1 -1
  140. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js +9 -9
  141. package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js.map +1 -1
  142. package/dist/src/lib/components/SocialBlock/index.d.ts +2 -2
  143. package/dist/src/lib/components/SocialBlock/index.js +20 -21
  144. package/dist/src/lib/components/SocialBlock/index.js.map +1 -1
  145. package/dist/src/lib/components/StarRating/StarRating.stories.js +1 -1
  146. package/dist/src/lib/components/StarRating/StarRating.stories.js.map +1 -1
  147. package/dist/src/lib/components/StarRating/index.js +3 -3
  148. package/dist/src/lib/components/StarRating/index.js.map +1 -1
  149. package/dist/src/lib/components/Testimonial/Testimonial.stories.js +1 -1
  150. package/dist/src/lib/components/Testimonial/Testimonial.stories.js.map +1 -1
  151. package/dist/src/lib/components/Testimonial/index.js.map +1 -1
  152. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js +2 -2
  153. package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js.map +1 -1
  154. package/dist/src/lib/components/TextAndTitle/index.d.ts +2 -2
  155. package/dist/src/lib/components/TextAndTitle/index.js +55 -64
  156. package/dist/src/lib/components/TextAndTitle/index.js.map +1 -1
  157. package/dist/src/lib/components/TextArea/TextArea.stories.js +3 -3
  158. package/dist/src/lib/components/TextArea/TextArea.stories.js.map +1 -1
  159. package/dist/src/lib/components/TextArea/index.js +4 -3
  160. package/dist/src/lib/components/TextArea/index.js.map +1 -1
  161. package/dist/src/lib/components/Timeline/Timeline.stories.js +12 -13
  162. package/dist/src/lib/components/Timeline/Timeline.stories.js.map +1 -1
  163. package/dist/src/lib/components/Timeline/index.d.ts +1 -1
  164. package/dist/src/lib/components/Timeline/index.js +57 -35
  165. package/dist/src/lib/components/Timeline/index.js.map +1 -1
  166. package/dist/src/lib/components/Tubestops/Tubestops.stories.js +4 -4
  167. package/dist/src/lib/components/Tubestops/Tubestops.stories.js.map +1 -1
  168. package/dist/src/lib/components/Tubestops/index.js +5 -5
  169. package/dist/src/lib/components/Tubestops/index.js.map +1 -1
  170. package/dist/src/lib/components/UserIcon/UserIcon.stories.js.map +1 -1
  171. package/dist/src/lib/components/UserIcon/index.js +5 -6
  172. package/dist/src/lib/components/UserIcon/index.js.map +1 -1
  173. package/dist/src/lib/components/Video/Video.stories.js +1 -1
  174. package/dist/src/lib/components/Video/Video.stories.js.map +1 -1
  175. package/dist/src/lib/components/Video/index.js +2 -2
  176. package/dist/src/lib/components/Video/index.js.map +1 -1
  177. package/dist/src/lib/index.js.map +1 -1
  178. package/dist/src/lib/typography/Fonts.stories.d.ts +2 -2
  179. package/dist/src/lib/typography/Fonts.stories.js +2 -32
  180. package/dist/src/lib/typography/Fonts.stories.js.map +1 -1
  181. package/dist/src/lib/typography/index.d.ts +4 -2
  182. package/dist/src/lib/typography/index.js.map +1 -1
  183. package/dist/src/lib/utils/controls.js.map +1 -1
  184. package/dist/src/lib/utils/theme.d.ts +3 -2
  185. package/dist/src/lib/utils/theme.js +20 -0
  186. package/dist/src/lib/utils/theme.js.map +1 -1
  187. package/dist/tailwind.config.d.ts +1 -0
  188. package/dist/tailwind.config.js +1 -0
  189. package/dist/tailwind.config.js.map +1 -1
  190. package/package.json +2 -1
  191. package/dist/components/Accordion/Accordion.stories.tsx +0 -88
  192. package/dist/components/Accordion/index.tsx +0 -31
  193. package/dist/components/AlertBar/AlertBar.stories.tsx +0 -105
  194. package/dist/components/AlertBar/index.tsx +0 -127
  195. package/dist/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -60
  196. package/dist/components/Breadcrumbs/index.tsx +0 -55
  197. package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +0 -52
  198. package/dist/components/BreadcrumbsBordered/index.tsx +0 -44
  199. package/dist/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +0 -54
  200. package/dist/components/BreadcrumbsItem/index.tsx +0 -151
  201. package/dist/components/Button/button.stories.tsx +0 -148
  202. package/dist/components/Button/index.tsx +0 -91
  203. package/dist/components/Card/Card.stories.tsx +0 -150
  204. package/dist/components/Card/index.tsx +0 -162
  205. package/dist/components/CardWithTopImage/CardWithTopImage.stories.tsx +0 -48
  206. package/dist/components/CardWithTopImage/index.tsx +0 -40
  207. package/dist/components/Carousel/Carousel.stories.tsx +0 -369
  208. package/dist/components/Carousel/index.tsx +0 -267
  209. package/dist/components/ChevronCard/ChevronCard.stories.tsx +0 -21
  210. package/dist/components/ChevronCard/index.tsx +0 -39
  211. package/dist/components/Collapsible/Collapsible.stories.tsx +0 -70
  212. package/dist/components/Collapsible/index.tsx +0 -124
  213. package/dist/components/Column/Column.stories.tsx +0 -82
  214. package/dist/components/Column/index.tsx +0 -114
  215. package/dist/components/Container/Container.stories.tsx +0 -38
  216. package/dist/components/Container/index.tsx +0 -30
  217. package/dist/components/FooterBar/footerBar.stories.tsx +0 -57
  218. package/dist/components/FooterBar/index.tsx +0 -44
  219. package/dist/components/Form/Form.stories.tsx +0 -93
  220. package/dist/components/Form/index.tsx +0 -58
  221. package/dist/components/FyreCard/FyreCard.stories.tsx +0 -29
  222. package/dist/components/FyreCard/index.tsx +0 -46
  223. package/dist/components/Greeting/Greeting.stories.tsx +0 -42
  224. package/dist/components/Greeting/index.tsx +0 -46
  225. package/dist/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -50
  226. package/dist/components/HamburgerIcon/index.tsx +0 -65
  227. package/dist/components/Icon/Icon.stories.tsx +0 -102
  228. package/dist/components/Icon/index.tsx +0 -112
  229. package/dist/components/Image/Image.stories.tsx +0 -88
  230. package/dist/components/Image/index.tsx +0 -113
  231. package/dist/components/ImageLink/ImageLink.stories.tsx +0 -60
  232. package/dist/components/ImageLink/index.tsx +0 -62
  233. package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +0 -32
  234. package/dist/components/ImageLinkList/index.tsx +0 -33
  235. package/dist/components/InformationIcon/InformationIcon.stories.tsx +0 -86
  236. package/dist/components/InformationIcon/index.tsx +0 -84
  237. package/dist/components/Input/Input.stories.tsx +0 -99
  238. package/dist/components/Input/index.tsx +0 -126
  239. package/dist/components/Jumbotron/Jumbotron.stories.tsx +0 -22
  240. package/dist/components/Jumbotron/index.tsx +0 -25
  241. package/dist/components/Nav/Nav.stories.tsx +0 -155
  242. package/dist/components/Nav/index.tsx +0 -180
  243. package/dist/components/NavItem/NavItem.stories.tsx +0 -89
  244. package/dist/components/NavItem/index.tsx +0 -65
  245. package/dist/components/NewsCard/NewsCard.stories.tsx +0 -71
  246. package/dist/components/NewsCard/index.tsx +0 -48
  247. package/dist/components/Profile/Profile.stories.tsx +0 -50
  248. package/dist/components/Profile/index.tsx +0 -87
  249. package/dist/components/Row/Row.stories.tsx +0 -51
  250. package/dist/components/Row/index.tsx +0 -24
  251. package/dist/components/Search/Search.stories.tsx +0 -58
  252. package/dist/components/Search/index.tsx +0 -58
  253. package/dist/components/SocialBlock/SocialBlock.stories.tsx +0 -114
  254. package/dist/components/SocialBlock/index.tsx +0 -161
  255. package/dist/components/StarRating/StarRating.stories.tsx +0 -23
  256. package/dist/components/StarRating/index.tsx +0 -71
  257. package/dist/components/Testimonial/Testimonial.stories.tsx +0 -110
  258. package/dist/components/Testimonial/index.tsx +0 -50
  259. package/dist/components/TextAndTitle/TextAndTitle.stories.tsx +0 -65
  260. package/dist/components/TextAndTitle/index.tsx +0 -257
  261. package/dist/components/TextArea/TextArea.stories.tsx +0 -67
  262. package/dist/components/TextArea/index.tsx +0 -97
  263. package/dist/components/Timeline/Timeline.stories.tsx +0 -100
  264. package/dist/components/Timeline/index.css +0 -133
  265. package/dist/components/Timeline/index.tsx +0 -315
  266. package/dist/components/Tubestops/Tubestops.stories.tsx +0 -66
  267. package/dist/components/Tubestops/index.css +0 -92
  268. package/dist/components/Tubestops/index.tsx +0 -77
  269. package/dist/components/UserIcon/UserIcon.stories.tsx +0 -67
  270. package/dist/components/UserIcon/index.tsx +0 -42
  271. package/dist/components/Video/Video.stories.tsx +0 -23
  272. package/dist/components/Video/index.tsx +0 -49
  273. package/dist/fonts/Sora/OFL.txt +0 -93
  274. package/dist/fonts/Sora/README.txt +0 -70
  275. package/dist/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
  276. package/dist/fonts/Sora/static/Sora-Bold.ttf +0 -0
  277. package/dist/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
  278. package/dist/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
  279. package/dist/fonts/Sora/static/Sora-Light.ttf +0 -0
  280. package/dist/fonts/Sora/static/Sora-Medium.ttf +0 -0
  281. package/dist/fonts/Sora/static/Sora-Regular.ttf +0 -0
  282. package/dist/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
  283. package/dist/fonts/Sora/static/Sora-Thin.ttf +0 -0
  284. package/dist/index.js +0 -272
  285. package/dist/styles/base.css +0 -73
@@ -1,86 +0,0 @@
1
- import React from 'react'
2
- import InformationIcon from './index'
3
- import { ComponentStory, ComponentMeta } from '@storybook/react'
4
- import { idAndClassName } from '@utils/controls'
5
-
6
- const componentMeta: ComponentMeta<typeof InformationIcon> = {
7
- title: 'Trepur Components/Rupert Bennett/Atoms/Information Icon',
8
- component: InformationIcon,
9
- argTypes: {
10
- ...idAndClassName,
11
- text: {
12
- type: { name: 'string', required: false },
13
- description: 'The text to display on the component',
14
- table: {
15
- type: { summary: 'string' }
16
- }
17
- },
18
- number: {
19
- type: { name: 'number', required: false },
20
- description: 'The number to display on the component',
21
- table: {
22
- type: { summary: 'number' }
23
- }
24
- },
25
- bordered: {
26
- type: { name: 'boolean', required: false },
27
- description: 'Applies a border to the component',
28
- table: {
29
- type: { summary: 'boolean' }
30
- },
31
- defaultValue: 'false'
32
- },
33
- rounded: {
34
- type: { name: 'boolean', required: false },
35
- description: 'Enabled rounded corners on the component',
36
- table: {
37
- type: { summary: 'boolean' }
38
- },
39
- defaultValue: 'false'
40
- },
41
- withAnimation: {
42
- type: { name: 'boolean', required: false },
43
- description: 'Enabled the counter animation on the component',
44
- table: {
45
- type: { summary: 'boolean' }
46
- },
47
- defaultValue: 'false'
48
- },
49
- iconProps: {
50
- type: { name: 'string', required: false },
51
- description: 'The props to pass to the icon to display on the component',
52
- table: {
53
- type: { summary: 'string' }
54
- }
55
- },
56
- theme: {
57
- type: { name: 'string', required: false },
58
- options: ['dark', 'light'],
59
- description: 'The variant of component to render',
60
- table: { type: { summary: 'light' }, defaultValue: { summary: 'light' } },
61
- defaultValue: 'light',
62
- control: { type: 'radio' }
63
- }
64
- },
65
- args: {
66
- text: 'Projects Completed',
67
- number: 21,
68
- bordered: true,
69
- rounded: true,
70
- withAnimation: true,
71
- theme: 'dark',
72
- iconProps: {
73
- type: 'heart',
74
- size: 2,
75
- className: 'mr-4 mb-8',
76
- colour: 'white',
77
- bgColour: 'primary'
78
- }
79
- }
80
- }
81
-
82
- const Template: ComponentStory<typeof InformationIcon> = (args) => <InformationIcon {...args} />
83
-
84
- export const _InformationIcon = Template.bind({})
85
-
86
- export default componentMeta
@@ -1,84 +0,0 @@
1
- import React, { useEffect, useRef } from 'react'
2
- import Icon, { Props as iconProps } from '@components/Icon'
3
- import classNames from 'classnames'
4
-
5
- export interface Props {
6
- id: string
7
- className?: string
8
- text?: string
9
- number: number
10
- bordered?: boolean
11
- rounded?: boolean
12
- withAnimation?: boolean
13
- iconProps?: iconProps
14
- theme?: 'dark' | 'light'
15
- }
16
-
17
- const InformationIcon = ({
18
- id,
19
- className,
20
- text,
21
- number,
22
- bordered = false,
23
- rounded = false,
24
- withAnimation = false,
25
- iconProps,
26
- theme = 'light'
27
- }: Props): JSX.Element => {
28
- const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary'
29
- const loaded = useRef(false)
30
-
31
- useEffect(() => {
32
- const element = document.getElementById(`${id}_number`)
33
- const observer = new IntersectionObserver((entries, observer) => {
34
- entries.forEach(entry => {
35
- if (entry.intersectionRatio >= 0.1 && !loaded.current) {
36
- loaded.current = true
37
- counterAnimation(
38
- document.getElementById(`${id}_number`), 0, number, 3000)
39
- }
40
- })
41
- }, { threshold: 1 })
42
- ;(element != null) && withAnimation && observer.observe(element)
43
- }, [])
44
-
45
- const wrapperClasses = 'h-96 flex items-center text-center ease-out duration-300'
46
-
47
- const classList = classNames({
48
- border: bordered,
49
- 'rounded-2xl': rounded
50
- },
51
- className,
52
- colours,
53
- 'flex flex-col justify-center w-full h-full items-center ease-out duration-300 text-md lg:text-md hover:text-lg')
54
-
55
- const counterAnimation = (obj: any, start: number, end: number, duration: number): void => {
56
- let startTimestamp: number
57
- const step = (timestamp: number): void => {
58
- startTimestamp = timestamp
59
- const progress = Math.min((timestamp - startTimestamp) / duration, 1)
60
- obj.innerHTML = Math.floor(progress * (end - start) + start)
61
- if (progress < 1) {
62
- window.requestAnimationFrame(step)
63
- }
64
- }
65
- window.requestAnimationFrame(step)
66
- }
67
-
68
- return (
69
- <div
70
- id={id}
71
- className={wrapperClasses}
72
- >
73
- <div className={classList}>
74
- {(iconProps != null) &&
75
- <Icon {...iconProps} />}
76
- {number !== undefined &&
77
- <p>{number}</p>}
78
- <p>{text}</p>
79
- </div>
80
- </div>
81
- )
82
- }
83
-
84
- export default InformationIcon
@@ -1,99 +0,0 @@
1
- import React from 'react'
2
- import Input from './index'
3
- import { ComponentStory, ComponentMeta } from '@storybook/react'
4
-
5
- const componentMeta: ComponentMeta<typeof Input> = {
6
- title: 'Trepur Components/Rupert Bennett/Atoms/Input',
7
- component: Input,
8
- parameters: {},
9
- argTypes: {
10
- id: {
11
- description: 'Defines the id of the component',
12
- table: {
13
- category: '',
14
- type: { summary: 'string' },
15
- defaultValue: { summary: 'undefined' }
16
- }
17
- },
18
- className: {
19
- description: 'Defines any additional classes for the components',
20
- table: {
21
- category: '',
22
- type: { summary: 'string' },
23
- defaultValue: { summary: 'undefined' }
24
- }
25
- },
26
- label: {
27
- description: '',
28
- control: 'text',
29
- table: {
30
- category: ''
31
- }
32
- },
33
- placeholder: {
34
- description: '',
35
- control: 'text',
36
- table: {
37
- category: ''
38
- }
39
- },
40
- bold: {
41
- description: '',
42
- control: 'boolean',
43
- table: {
44
- category: ''
45
- }
46
- },
47
- required: {
48
- description: '',
49
- control: 'boolean',
50
- table: {
51
- category: ''
52
- }
53
- },
54
- hasValidation: {
55
- description: '',
56
- control: 'boolean',
57
- table: {
58
- category: ''
59
- }
60
- },
61
- errors: {
62
- description: '',
63
- control: 'array',
64
- table: {
65
- category: ''
66
- }
67
- },
68
- value: {
69
- description: 'The default value of the input',
70
- control: 'text',
71
- table: {
72
- category: ''
73
- }
74
- },
75
- theme: {
76
- type: { name: 'string', required: false },
77
- options: ['dark', 'light'],
78
- description: 'The variant of button to render',
79
- table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
80
- defaultValue: 'dark',
81
- control: { type: 'radio' }
82
- }
83
- },
84
- args: {
85
- label: 'This is a label',
86
- placeholder: 'This is a placeholder',
87
- errors: [
88
- 'This is an error',
89
- 'This is another error',
90
- 'This is a third error'
91
- ]
92
- }
93
- }
94
-
95
- const Template: ComponentStory<typeof Input> = (args) => <Input {...args} />
96
-
97
- export const _Input = Template.bind({})
98
-
99
- export default componentMeta
@@ -1,126 +0,0 @@
1
- import React from 'react'
2
- import classNames from 'classnames'
3
-
4
- export interface Props {
5
- id?: string
6
- className?: string
7
- labelClasses?: string
8
- inputClasses?: string
9
- autoComplete?: string
10
- disabled?: boolean
11
- formId?: string
12
- height?: string
13
- maxLength?: number
14
- minLength?: number
15
- pattern?: string
16
- required?: boolean
17
- readOnly?: boolean
18
- label?: string
19
- type?: string
20
- name?: string
21
- placeholder?: string
22
- hasValidation?: boolean
23
- bold?: boolean
24
- autoFocus?: boolean
25
- onChange?: (e: any) => void
26
- onBlur?: () => void
27
- onFocus?: () => void
28
- errors?: string[]
29
- value?: string
30
- theme?: 'dark' | 'light'
31
- }
32
-
33
- const Input = ({
34
- id,
35
- className,
36
- labelClasses,
37
- inputClasses,
38
- autoComplete,
39
- disabled,
40
- formId,
41
- height,
42
- maxLength,
43
- minLength,
44
- pattern,
45
- required,
46
- readOnly,
47
- autoFocus,
48
- label,
49
- type,
50
- name,
51
- placeholder,
52
- bold,
53
- onChange,
54
- onBlur,
55
- onFocus,
56
- hasValidation,
57
- errors,
58
- value,
59
- theme
60
- }: Props): JSX.Element => {
61
- const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary'
62
- const classList = classNames(className, colours, 'flex flex-col')
63
-
64
- const labelClassList = classNames({
65
- 'font-bold': bold
66
- }, labelClasses, 'w-auto pb-2')
67
-
68
- const inputClassList = classNames({
69
- }, inputClasses, colours, 'border px-2 py-2 mb-2 rounded-md')
70
-
71
- const newId = id !== undefined ? `-${id}` : ''
72
- return (
73
- <div
74
- id={id}
75
- className={classList}
76
- >
77
- {label !== undefined &&
78
- <label
79
- id={`label${newId}`}
80
- className={labelClassList}
81
- htmlFor={`input${newId}`}
82
- >
83
- <p>
84
- {label}
85
- {required === true &&
86
- <span className='text-red'>*</span>}
87
- </p>
88
- </label>}
89
- <input
90
- id={`input${newId}`}
91
- className={inputClassList}
92
- autoComplete={autoComplete}
93
- disabled={disabled}
94
- form={formId}
95
- height={height}
96
- maxLength={maxLength}
97
- minLength={minLength}
98
- pattern={pattern}
99
- required={required}
100
- readOnly={readOnly}
101
- type={type}
102
- name={name}
103
- value={value}
104
- placeholder={placeholder}
105
- onChange={onChange}
106
- onBlur={onBlur}
107
- onFocus={onFocus}
108
- />
109
- {hasValidation === true &&
110
- <div id={`errors${newId}`}>
111
- {errors?.map((error, i) => {
112
- return (
113
- <p
114
- key={`error_msg_${i + 0}`}
115
- className='text-red text-sm'
116
- >
117
- {error}
118
- </p>
119
- )
120
- })}
121
- </div>}
122
- </div>
123
- )
124
- }
125
-
126
- export default Input
@@ -1,22 +0,0 @@
1
- import React from 'react'
2
- import { idAndClassName } from '@utils/controls'
3
- import Jumbotron from './index'
4
- import { ComponentStory, ComponentMeta } from '@storybook/react'
5
-
6
- const componentMeta: ComponentMeta<typeof Jumbotron> = {
7
- title: 'Trepur Components/Rupert Bennett/Organisms/Jumbotron',
8
- component: Jumbotron,
9
- parameters: {},
10
- argTypes: {
11
- ...idAndClassName
12
- },
13
- args: {
14
- image: 'https://picsum.photos/1500/400'
15
- }
16
- }
17
-
18
- const Template: ComponentStory<typeof Jumbotron> = (args) => <Jumbotron {...args} />
19
-
20
- export const _Jumbotron = Template.bind({})
21
-
22
- export default componentMeta
@@ -1,25 +0,0 @@
1
- import React from 'react'
2
- import classNames from 'classnames'
3
-
4
- export interface Props {
5
- id?: string
6
- className?: string
7
- image?: string
8
- altText?: string
9
- }
10
- const Jumbotron = ({
11
- id,
12
- className,
13
- image,
14
- altText
15
- }: Props): JSX.Element => {
16
- const classList = classNames(className)
17
-
18
- return (
19
- <div id={id} className={classList}>
20
- <img className='w-full object-cover' src={image} alt={altText} />
21
- </div>
22
- )
23
- }
24
-
25
- export default Jumbotron
@@ -1,155 +0,0 @@
1
- import React from 'react'
2
- import Nav from './index'
3
- import { idAndClassName } from '@utils/controls'
4
- import { ComponentStory, ComponentMeta } from '@storybook/react'
5
- import logoDarkTheme from '@assets/images/primary-logo-bold.png'
6
- import logoImage from '@assets/images/secondary-logo-bold.png'
7
-
8
- const navLinks = [
9
- { title: 'Home', href: '/', isActive: true },
10
- { title: 'Resume', href: '/', isActive: false },
11
- { title: 'Contact Me', href: '/', isActive: false }
12
- ]
13
-
14
- const componentMeta: ComponentMeta<typeof Nav> = {
15
- title: 'Trepur Components/Rupert Bennett/Organisms/Nav',
16
- component: Nav,
17
- parameters: {
18
- backgrounds: {
19
- default: 'grey',
20
- values: [
21
- {
22
- name: 'grey',
23
- value: '#f3f3f3'
24
- }
25
- ]
26
- }
27
- },
28
- argTypes: {
29
- ...idAndClassName,
30
- navLinks: {
31
- description: 'An array of nav links to display in the component',
32
- table: {
33
- type: { summary: 'array' }
34
- }
35
- },
36
- asSideBar: {
37
- type: { name: 'boolean', required: false },
38
- description: 'Sets the expanding mechanism to work as a side bar on mobile',
39
- table: {
40
- type: { summary: 'boolean' }
41
- }
42
- },
43
- dropdownNavHeight: {
44
- type: { name: 'string', required: false },
45
- description: 'The distance in which the dropdown should come on mobile',
46
- table: {
47
- type: { summary: 'string' }
48
- }
49
- },
50
- logo: {
51
- type: { name: 'string', required: false },
52
- description: 'The logo to display on the component',
53
- table: {
54
- type: { summary: 'string' }
55
- }
56
- },
57
- logoDarkTheme: {
58
- type: { name: 'string', required: false },
59
- description: 'An optional dark them logo for dark mode',
60
- table: {
61
- type: { summary: 'string' }
62
- }
63
- },
64
- mobileLogo: {
65
- type: { name: 'string', required: false },
66
- description: 'An optional mobile logo for mobile devices',
67
- table: {
68
- type: { summary: 'string' }
69
- }
70
- },
71
- mobileLogoDarkTheme: {
72
- type: { name: 'string', required: false },
73
- description: 'An optional dark them mobile logo for mobile dark mode',
74
- table: {
75
- type: { summary: 'string' }
76
- }
77
- },
78
- logoLink: {
79
- type: { name: 'string', required: false },
80
- description: 'The link to navigate to when clicking on the logo',
81
- table: {
82
- type: { summary: 'string' }
83
- }
84
- },
85
- mobileClasses: {
86
- type: { name: 'string', required: false },
87
- description: '',
88
- table: {
89
- type: { summary: 'string' }
90
- }
91
- },
92
- fixedTop: {
93
- type: { name: 'boolean', required: false },
94
- description: 'Sets the header to fix at the top when true',
95
- table: {
96
- type: { summary: 'boolean' }
97
- }
98
- },
99
- getNavStatus: {
100
- type: { name: 'boolean', required: false },
101
- description: 'Returns the status of the header, opened or closed in mobile',
102
- table: {
103
- type: { summary: 'function' }
104
- }
105
- },
106
- theme: {
107
- type: { name: 'string', required: false },
108
- options: ['dark', 'light'],
109
- description: 'The them to render the component in',
110
- table: {
111
- type: { summary: 'dark' },
112
- defaultValue: { summary: 'dark' }
113
- },
114
- defaultValue: 'dark',
115
- control: { type: 'radio' }
116
- },
117
- text: {
118
- type: { name: 'string', required: false },
119
- description: 'Text to display on the component',
120
- table: {
121
- type: { summary: 'string' }
122
- }
123
- },
124
- textLink: {
125
- type: { name: 'string', required: false },
126
- description: 'A link to navigate to when clicking on the text in the component',
127
- control: 'string',
128
- table: {
129
- category: ''
130
- }
131
- }
132
- },
133
- args: {
134
- logoLink: '/',
135
- navLinks,
136
- asSideBar: true,
137
- dropdownNavHeight: '80',
138
- logo: logoImage,
139
- logoDarkTheme,
140
- mobileLogo: logoImage,
141
- mobileLogoDarkTheme: logoDarkTheme,
142
- fixedTop: true,
143
- theme: 'dark',
144
- text: 'rupertbennett.com',
145
- getNavStatus: (status) => {
146
- console.log(status ? 'open' : 'closed')
147
- }
148
- }
149
- }
150
-
151
- const Template: ComponentStory<typeof Nav> = (args) => <Nav {...args} />
152
-
153
- export const _Nav = Template.bind({})
154
-
155
- export default componentMeta