@agilant/toga-blox 1.0.9 → 1.0.11

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 (523) hide show
  1. package/dist/components/Badge/Badge.d.ts +4 -0
  2. package/dist/components/Badge/Badge.js +9 -0
  3. package/dist/components/Badge/Badge.stories.d.ts +7 -0
  4. package/dist/components/Badge/Badge.stories.js +196 -0
  5. package/dist/components/Badge/Badge.test.d.ts +1 -0
  6. package/dist/components/Badge/Badge.test.js +80 -0
  7. package/dist/components/Badge/Badge.types.d.ts +25 -0
  8. package/dist/components/Badge/Badge.types.js +1 -0
  9. package/dist/components/Badge/index.js +2 -0
  10. package/dist/components/Card/Card.d.ts +4 -0
  11. package/dist/components/Card/Card.js +11 -0
  12. package/dist/components/Card/Card.stories.d.ts +12 -0
  13. package/dist/components/Card/Card.stories.js +173 -0
  14. package/dist/components/Card/Card.test.d.ts +1 -0
  15. package/dist/components/Card/Card.test.js +35 -0
  16. package/dist/components/Card/Card.types.d.ts +10 -0
  17. package/dist/components/Card/Card.types.js +1 -0
  18. package/dist/components/Card/DUMMYPRODUCTDATA.json +826 -0
  19. package/dist/components/Card/index.d.ts +3 -0
  20. package/dist/components/Card/templates/CategoryCardTemplate.d.ts +27 -0
  21. package/dist/components/Card/templates/CategoryCardTemplate.js +7 -0
  22. package/dist/components/Card/templates/CompassCardTemplate.d.ts +23 -0
  23. package/dist/components/Card/templates/CompassCardTemplate.js +7 -0
  24. package/dist/components/Card/templates/CounterContentCardTemplate.d.ts +53 -0
  25. package/dist/components/Card/templates/CounterContentCardTemplate.js +46 -0
  26. package/dist/components/Card/templates/HorizontalCardTemplate.d.ts +65 -0
  27. package/dist/components/Card/templates/HorizontalCardTemplate.js +13 -0
  28. package/dist/components/Card/templates/ItemCardTemplate.d.ts +61 -0
  29. package/dist/components/Card/templates/ItemCardTemplate.js +9 -0
  30. package/dist/components/Card/templates/KitContentCardTemplate.d.ts +53 -0
  31. package/dist/components/Card/templates/KitContentCardTemplate.js +9 -0
  32. package/dist/components/Card/templates/ShippingAddressCardTemplate.d.ts +15 -0
  33. package/dist/components/Card/templates/ShippingAddressCardTemplate.js +9 -0
  34. package/dist/components/Card/templates/VerticalCardTemplate.d.ts +61 -0
  35. package/dist/components/Card/templates/VerticalCardTemplate.js +9 -0
  36. package/dist/components/CounterButton/CounterButton.d.ts +4 -0
  37. package/dist/components/CounterButton/CounterButton.js +7 -0
  38. package/dist/components/CounterButton/CounterButton.stories.d.ts +4 -0
  39. package/dist/components/CounterButton/CounterButton.stories.js +69 -0
  40. package/dist/components/CounterButton/CounterButton.types.d.ts +10 -0
  41. package/dist/components/CounterButton/CounterButton.types.js +1 -0
  42. package/dist/components/Description/Description.d.ts +4 -0
  43. package/dist/components/Description/Description.js +5 -0
  44. package/dist/components/Description/Description.stories.d.ts +5 -0
  45. package/dist/components/Description/Description.stories.js +54 -0
  46. package/dist/components/Description/Description.types.d.ts +8 -0
  47. package/dist/components/Description/Description.types.js +1 -0
  48. package/dist/components/DropDownIconButton/DropDownIconButton.d.ts +4 -0
  49. package/dist/components/DropDownIconButton/DropDownIconButton.js +24 -0
  50. package/dist/components/DropDownIconButton/DropDownIconButton.stories.d.ts +6 -0
  51. package/dist/components/DropDownIconButton/DropDownIconButton.stories.js +145 -0
  52. package/dist/components/DropDownIconButton/DropDownIconButton.test.d.ts +1 -0
  53. package/dist/components/DropDownIconButton/DropDownIconButton.test.js +40 -0
  54. package/dist/components/DropDownIconButton/DropDownIconButton.types.d.ts +20 -0
  55. package/dist/components/DropDownIconButton/DropDownIconButton.types.js +1 -0
  56. package/dist/components/DropDownIconButton/index.js +2 -0
  57. package/dist/components/Footer/ContactInfoItem.d.ts +7 -0
  58. package/dist/components/Footer/ContactInfoItem.js +4 -0
  59. package/dist/components/Footer/DUMMYFOOTERDATA.json +132 -0
  60. package/dist/components/Footer/Footer.d.ts +4 -0
  61. package/dist/components/Footer/Footer.js +12 -0
  62. package/dist/components/Footer/Footer.stories.d.ts +7 -0
  63. package/dist/components/Footer/Footer.stories.js +155 -0
  64. package/dist/components/Footer/Footer.test.d.ts +1 -0
  65. package/dist/components/Footer/Footer.test.js +48 -0
  66. package/dist/components/Footer/Footer.types.d.ts +42 -0
  67. package/dist/components/Footer/Footer.types.js +1 -0
  68. package/dist/components/FormButton/FormButton.d.ts +4 -0
  69. package/dist/components/FormButton/FormButton.js +49 -0
  70. package/dist/components/FormButton/FormButton.stories.d.ts +12 -0
  71. package/dist/components/FormButton/FormButton.stories.js +200 -0
  72. package/dist/components/FormButton/FormButton.test.d.ts +1 -0
  73. package/dist/components/FormButton/FormButton.test.js +27 -0
  74. package/dist/components/FormButton/FormButton.types.d.ts +24 -0
  75. package/dist/components/FormButton/FormButton.types.js +1 -0
  76. package/dist/components/FormButton/index.js +2 -0
  77. package/dist/components/GenericList/DUMMYLISTDATA.json +560 -0
  78. package/dist/components/GenericList/GenericList.d.ts +16 -0
  79. package/dist/components/GenericList/GenericList.js +50 -0
  80. package/dist/components/GenericList/GenericList.stories.d.ts +35 -0
  81. package/dist/components/GenericList/GenericList.stories.js +87 -0
  82. package/dist/components/GenericList/GenericList.test.d.ts +1 -0
  83. package/dist/components/GenericList/GenericList.test.js +24 -0
  84. package/dist/components/GenericList/templates/DummyDataList.d.ts +6 -0
  85. package/dist/components/GenericList/templates/DummyDataList.js +6 -0
  86. package/dist/components/GenericList/templates/DynamicIconList.d.ts +32 -0
  87. package/dist/components/GenericList/templates/DynamicIconList.js +7 -0
  88. package/dist/components/GetSupport/GetSupport.d.ts +4 -0
  89. package/dist/components/GetSupport/GetSupport.js +7 -0
  90. package/dist/components/GetSupport/GetSupport.stories.d.ts +5 -0
  91. package/dist/components/GetSupport/GetSupport.stories.js +70 -0
  92. package/dist/components/GetSupport/GetSupport.test.d.ts +1 -0
  93. package/dist/components/GetSupport/GetSupport.test.js +49 -0
  94. package/dist/components/GetSupport/GetSupport.types.d.ts +11 -0
  95. package/dist/components/GetSupport/GetSupport.types.js +1 -0
  96. package/dist/components/HamburgerButton/Hamburger.stories.d.ts +5 -0
  97. package/dist/components/HamburgerButton/Hamburger.stories.js +97 -0
  98. package/dist/components/HamburgerButton/HamburgerButton.d.ts +4 -0
  99. package/dist/components/HamburgerButton/HamburgerButton.js +15 -0
  100. package/dist/components/HamburgerButton/HamburgerButton.types.d.ts +7 -0
  101. package/dist/components/HamburgerButton/HamburgerButton.types.js +1 -0
  102. package/dist/components/HamburgerButton/index.js +2 -0
  103. package/dist/components/Header/DUMMYICONDATA.json +136 -0
  104. package/dist/components/Header/Header.d.ts +4 -0
  105. package/dist/components/Header/Header.js +62 -0
  106. package/dist/components/Header/Header.stories.d.ts +8 -0
  107. package/dist/components/Header/Header.stories.js +225 -0
  108. package/dist/components/Header/Header.test.d.ts +1 -0
  109. package/dist/components/Header/Header.test.js +107 -0
  110. package/dist/components/Header/Header.types.d.ts +40 -0
  111. package/dist/components/Header/Header.types.js +1 -0
  112. package/dist/components/Header/headerContext.d.ts +39 -0
  113. package/dist/components/Header/headerContext.js +44 -0
  114. package/dist/components/Header/index.js +2 -0
  115. package/dist/components/Hero/Hero.d.ts +4 -0
  116. package/dist/components/Hero/Hero.js +21 -0
  117. package/dist/components/Hero/Hero.stories.d.ts +13 -0
  118. package/dist/components/Hero/Hero.stories.js +46 -0
  119. package/dist/components/Hero/Hero.test.d.ts +1 -0
  120. package/dist/components/Hero/Hero.test.js +62 -0
  121. package/dist/components/Hero/Hero.types.d.ts +8 -0
  122. package/dist/components/Hero/Hero.types.js +1 -0
  123. package/dist/components/Hero/index.js +2 -0
  124. package/dist/components/IconButton/IconButton.d.ts +4 -0
  125. package/dist/components/IconButton/IconButton.js +18 -0
  126. package/dist/components/IconButton/IconButton.stories.d.ts +7 -0
  127. package/dist/components/IconButton/IconButton.stories.js +187 -0
  128. package/dist/components/IconButton/IconButton.test.d.ts +1 -0
  129. package/dist/components/IconButton/IconButton.test.js +28 -0
  130. package/dist/components/IconButton/IconButton.types.d.ts +27 -0
  131. package/dist/components/IconButton/IconButton.types.js +1 -0
  132. package/dist/components/IconButton/index.js +2 -0
  133. package/dist/components/Image/Image.d.ts +4 -0
  134. package/dist/components/Image/Image.js +19 -0
  135. package/dist/components/Image/Image.stories.d.ts +14 -0
  136. package/dist/components/Image/Image.stories.js +63 -0
  137. package/dist/components/Image/Image.test.d.ts +1 -0
  138. package/dist/components/Image/Image.test.js +47 -0
  139. package/dist/components/Image/Image.types.d.ts +12 -0
  140. package/dist/components/Image/Image.types.js +1 -0
  141. package/dist/components/Image/index.js +2 -0
  142. package/dist/components/Input/Input.d.ts +4 -0
  143. package/dist/components/Input/Input.js +51 -0
  144. package/dist/components/Input/Input.stories.d.ts +13 -0
  145. package/dist/components/Input/Input.stories.js +364 -0
  146. package/dist/components/Input/Input.test.d.ts +1 -0
  147. package/dist/components/Input/Input.test.js +45 -0
  148. package/dist/components/Input/Input.types.d.ts +36 -0
  149. package/dist/components/Input/Input.types.js +1 -0
  150. package/dist/components/Input/InputMemoTypes.d.ts +2 -0
  151. package/dist/components/Input/InputMemoTypes.js +28 -0
  152. package/dist/components/Input/index.js +2 -0
  153. package/dist/components/MobileMenu/MobileMenu.d.ts +3 -0
  154. package/dist/components/MobileMenu/MobileMenu.js +7 -0
  155. package/dist/components/MobileMenu/MobileMenu.types.d.ts +20 -0
  156. package/dist/components/MobileMenu/MobileMenu.types.js +1 -0
  157. package/dist/components/MobileMenu/index.js +2 -0
  158. package/dist/components/Nav/DUMMYNAVDATA.json +234 -0
  159. package/dist/components/Nav/Nav.d.ts +4 -0
  160. package/dist/components/Nav/Nav.js +31 -0
  161. package/dist/components/Nav/Nav.stories.d.ts +6 -0
  162. package/dist/components/Nav/Nav.stories.js +164 -0
  163. package/dist/components/Nav/Nav.test.d.ts +1 -0
  164. package/dist/components/Nav/Nav.test.js +52 -0
  165. package/dist/components/Nav/Nav.types.d.ts +38 -0
  166. package/dist/components/Nav/Nav.types.js +1 -0
  167. package/dist/components/Nav/index.js +2 -0
  168. package/dist/components/Page/TableDataDummy.d.ts +3 -0
  169. package/dist/components/Page/TableDataDummy.js +5 -0
  170. package/dist/components/Page/ViewPageTemplate.d.ts +3 -0
  171. package/dist/components/Page/ViewPageTemplate.js +5 -0
  172. package/dist/components/Page/ViewPageTemplate.stories.d.ts +8 -0
  173. package/dist/components/Page/ViewPageTemplate.stories.js +73 -0
  174. package/dist/components/Page/ViewPageTemplate.test.d.ts +1 -0
  175. package/dist/components/Page/ViewPageTemplate.test.js +71 -0
  176. package/{src/components/Page/ViewPageTemplate.types.ts → dist/components/Page/ViewPageTemplate.types.d.ts} +2 -3
  177. package/dist/components/Page/ViewPageTemplate.types.js +1 -0
  178. package/dist/components/Page/index.js +2 -0
  179. package/dist/components/PageSection/PageSection.d.ts +4 -0
  180. package/dist/components/PageSection/PageSection.js +5 -0
  181. package/dist/components/PageSection/PageSection.stories.d.ts +6 -0
  182. package/dist/components/PageSection/PageSection.stories.js +40 -0
  183. package/{src/components/PageSection/PageSection.types.ts → dist/components/PageSection/PageSection.types.d.ts} +2 -3
  184. package/dist/components/PageSection/PageSection.types.js +1 -0
  185. package/dist/components/PageSection/PageSections.test.d.ts +1 -0
  186. package/dist/components/PageSection/PageSections.test.js +31 -0
  187. package/dist/components/PageSection/index.js +2 -0
  188. package/dist/components/SearchInput/SearchInput.d.ts +4 -0
  189. package/dist/components/SearchInput/SearchInput.js +17 -0
  190. package/dist/components/SearchInput/SearchInput.stories.d.ts +9 -0
  191. package/dist/components/SearchInput/SearchInput.stories.js +128 -0
  192. package/dist/components/SearchInput/SearchInput.types.d.ts +25 -0
  193. package/dist/components/SearchInput/SearchInput.types.js +1 -0
  194. package/dist/components/Slider/Slider.d.ts +4 -0
  195. package/dist/components/Slider/Slider.js +56 -0
  196. package/dist/components/Slider/Slider.stories.d.ts +6 -0
  197. package/dist/components/Slider/Slider.stories.js +82 -0
  198. package/dist/components/Slider/Slider.types.d.ts +21 -0
  199. package/dist/components/Slider/Slider.types.js +1 -0
  200. package/dist/components/Submenus/AdminSubmenu.d.ts +4 -0
  201. package/dist/components/Submenus/AdminSubmenu.js +5 -0
  202. package/dist/components/Submenus/AlertSubmenu.d.ts +4 -0
  203. package/dist/components/Submenus/AlertSubmenu.js +7 -0
  204. package/dist/components/Submenus/AlertSubmenuItem.d.ts +4 -0
  205. package/dist/components/Submenus/AlertSubmenuItem.js +5 -0
  206. package/dist/components/Submenus/types.d.ts +29 -0
  207. package/dist/components/Submenus/types.js +1 -0
  208. package/dist/components/Text/Text.d.ts +4 -0
  209. package/dist/components/Text/Text.js +12 -0
  210. package/dist/components/Text/Text.stories.d.ts +5 -0
  211. package/dist/components/Text/Text.stories.js +79 -0
  212. package/dist/components/Text/Text.test.d.ts +1 -0
  213. package/dist/components/Text/Text.test.js +31 -0
  214. package/{src/components/Text/Text.types.ts → dist/components/Text/Text.types.d.ts} +6 -8
  215. package/dist/components/Text/Text.types.js +1 -0
  216. package/dist/components/Text/index.js +2 -0
  217. package/dist/components/Toaster/Toaster.d.ts +4 -0
  218. package/dist/components/Toaster/Toaster.js +22 -0
  219. package/dist/components/Toaster/Toaster.stories.d.ts +23 -0
  220. package/dist/components/Toaster/Toaster.stories.js +102 -0
  221. package/dist/components/Toaster/Toaster.test.d.ts +1 -0
  222. package/dist/components/Toaster/Toaster.test.js +47 -0
  223. package/dist/components/Toaster/Toaster.types.d.ts +15 -0
  224. package/dist/components/Toaster/Toaster.types.js +1 -0
  225. package/dist/components/Toaster/index.js +2 -0
  226. package/dist/hoc/index.d.ts +1 -0
  227. package/dist/hoc/styling/withStoryBook.d.ts +6 -0
  228. package/dist/hoc/styling/withStoryBook.js +7 -0
  229. package/dist/main.css +1 -0
  230. package/dist/setupTests.js +1 -0
  231. package/dist/userHoc/index.js +1 -0
  232. package/dist/userHoc/withMemo.d.ts +5 -0
  233. package/dist/userHoc/withMemo.js +6 -0
  234. package/dist/utils/assertTagName.d.ts +3 -0
  235. package/dist/utils/assertTagName.js +6 -0
  236. package/dist/utils/generateAccordionItem.d.ts +15 -0
  237. package/dist/utils/generateAccordionItem.js +22 -0
  238. package/dist/utils/generateFooterContacts.d.ts +14 -0
  239. package/dist/utils/generateFooterContacts.js +19 -0
  240. package/dist/utils/generateNavMenu.d.ts +14 -0
  241. package/dist/utils/generateNavMenu.js +5 -0
  242. package/dist/utils/generateSocialList.d.ts +12 -0
  243. package/dist/utils/generateSocialList.js +4 -0
  244. package/dist/utils/getFontAwesomeIcon.d.ts +2 -0
  245. package/dist/utils/getFontAwesomeIcon.js +19 -0
  246. package/dist/utils/inputValidation.d.ts +6 -0
  247. package/dist/utils/inputValidation.js +12 -0
  248. package/package.json +9 -4
  249. package/.gitattributes +0 -5
  250. package/Dockerfile +0 -9
  251. package/assets/Logo.png +0 -0
  252. package/assets/cable.jpg +0 -0
  253. package/assets/card-1.jpg +0 -0
  254. package/assets/cat-logo.png +0 -0
  255. package/assets/compass-card-image-2.png +0 -0
  256. package/assets/compass-card-image-3.png +0 -0
  257. package/assets/compass-card-image-4.png +0 -0
  258. package/assets/compass-card-image.png +0 -0
  259. package/assets/compass-logo.png +0 -0
  260. package/assets/compass-tech-hero-bg.png +0 -0
  261. package/assets/contact-image.png +0 -0
  262. package/assets/green-laptop.png +0 -0
  263. package/assets/heroImage.png +0 -0
  264. package/assets/item.jpg +0 -0
  265. package/assets/map.png +0 -0
  266. package/assets/placeholder-no-image-available.png +0 -0
  267. package/assets/team.png +0 -0
  268. package/coverage/base.css +0 -224
  269. package/coverage/block-navigation.js +0 -87
  270. package/coverage/clover.xml +0 -953
  271. package/coverage/coverage-final.json +0 -74
  272. package/coverage/favicon.png +0 -0
  273. package/coverage/index.html +0 -551
  274. package/coverage/prettify.css +0 -1
  275. package/coverage/prettify.js +0 -2
  276. package/coverage/sort-arrow-sprite.png +0 -0
  277. package/coverage/sorter.js +0 -196
  278. package/coverage/toga-blox-npm/index.html +0 -131
  279. package/coverage/toga-blox-npm/postcss.config.js.html +0 -103
  280. package/coverage/toga-blox-npm/src/components/Badge/Badge.stories.tsx.html +0 -793
  281. package/coverage/toga-blox-npm/src/components/Badge/Badge.tsx.html +0 -247
  282. package/coverage/toga-blox-npm/src/components/Badge/index.html +0 -131
  283. package/coverage/toga-blox-npm/src/components/Card/Card.stories.tsx.html +0 -787
  284. package/coverage/toga-blox-npm/src/components/Card/Card.tsx.html +0 -163
  285. package/coverage/toga-blox-npm/src/components/Card/index.html +0 -131
  286. package/coverage/toga-blox-npm/src/components/Card/templates/CategoryCardTemplate.tsx.html +0 -343
  287. package/coverage/toga-blox-npm/src/components/Card/templates/CompassCardTemplate.tsx.html +0 -259
  288. package/coverage/toga-blox-npm/src/components/Card/templates/CounterContentCardTemplate.tsx.html +0 -685
  289. package/coverage/toga-blox-npm/src/components/Card/templates/HorizontalCardTemplate.tsx.html +0 -637
  290. package/coverage/toga-blox-npm/src/components/Card/templates/ItemCardTemplate.tsx.html +0 -550
  291. package/coverage/toga-blox-npm/src/components/Card/templates/KitContentCardTemplate.tsx.html +0 -469
  292. package/coverage/toga-blox-npm/src/components/Card/templates/ShippingAddressCardTemplate.tsx.html +0 -418
  293. package/coverage/toga-blox-npm/src/components/Card/templates/VerticalCardTemplate.tsx.html +0 -592
  294. package/coverage/toga-blox-npm/src/components/Card/templates/index.html +0 -221
  295. package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.stories.tsx.html +0 -358
  296. package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.tsx.html +0 -385
  297. package/coverage/toga-blox-npm/src/components/CounterButton/index.html +0 -131
  298. package/coverage/toga-blox-npm/src/components/Description/Description.stories.tsx.html +0 -286
  299. package/coverage/toga-blox-npm/src/components/Description/Description.tsx.html +0 -124
  300. package/coverage/toga-blox-npm/src/components/Description/index.html +0 -131
  301. package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.stories.tsx.html +0 -676
  302. package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.tsx.html +0 -346
  303. package/coverage/toga-blox-npm/src/components/DropDownIconButton/index.html +0 -131
  304. package/coverage/toga-blox-npm/src/components/Footer/ContactInfoItem.tsx.html +0 -139
  305. package/coverage/toga-blox-npm/src/components/Footer/Footer.stories.tsx.html +0 -934
  306. package/coverage/toga-blox-npm/src/components/Footer/Footer.tsx.html +0 -373
  307. package/coverage/toga-blox-npm/src/components/Footer/index.html +0 -146
  308. package/coverage/toga-blox-npm/src/components/FormButton/FormButton.stories.tsx.html +0 -952
  309. package/coverage/toga-blox-npm/src/components/FormButton/FormButton.tsx.html +0 -343
  310. package/coverage/toga-blox-npm/src/components/FormButton/index.html +0 -131
  311. package/coverage/toga-blox-npm/src/components/GenericList/GenericList.stories.tsx.html +0 -376
  312. package/coverage/toga-blox-npm/src/components/GenericList/GenericList.tsx.html +0 -520
  313. package/coverage/toga-blox-npm/src/components/GenericList/index.html +0 -131
  314. package/coverage/toga-blox-npm/src/components/GenericList/templates/DummyDataList.tsx.html +0 -154
  315. package/coverage/toga-blox-npm/src/components/GenericList/templates/DynamicIconList.tsx.html +0 -250
  316. package/coverage/toga-blox-npm/src/components/GenericList/templates/index.html +0 -131
  317. package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.stories.tsx.html +0 -325
  318. package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.tsx.html +0 -262
  319. package/coverage/toga-blox-npm/src/components/GetSupport/index.html +0 -131
  320. package/coverage/toga-blox-npm/src/components/HamburgerButton/Hamburger.stories.tsx.html +0 -760
  321. package/coverage/toga-blox-npm/src/components/HamburgerButton/HamburgerButton.tsx.html +0 -232
  322. package/coverage/toga-blox-npm/src/components/HamburgerButton/index.html +0 -131
  323. package/coverage/toga-blox-npm/src/components/Header/Header.stories.tsx.html +0 -1633
  324. package/coverage/toga-blox-npm/src/components/Header/Header.tsx.html +0 -814
  325. package/coverage/toga-blox-npm/src/components/Header/headerContext.tsx.html +0 -460
  326. package/coverage/toga-blox-npm/src/components/Header/index.html +0 -146
  327. package/coverage/toga-blox-npm/src/components/Hero/Hero.stories.tsx.html +0 -289
  328. package/coverage/toga-blox-npm/src/components/Hero/Hero.tsx.html +0 -259
  329. package/coverage/toga-blox-npm/src/components/Hero/index.html +0 -131
  330. package/coverage/toga-blox-npm/src/components/IconButton/IconButton.stories.tsx.html +0 -673
  331. package/coverage/toga-blox-npm/src/components/IconButton/IconButton.tsx.html +0 -313
  332. package/coverage/toga-blox-npm/src/components/IconButton/index.html +0 -131
  333. package/coverage/toga-blox-npm/src/components/Image/Image.stories.tsx.html +0 -322
  334. package/coverage/toga-blox-npm/src/components/Image/Image.tsx.html +0 -226
  335. package/coverage/toga-blox-npm/src/components/Image/index.html +0 -131
  336. package/coverage/toga-blox-npm/src/components/Input/Input.stories.tsx.html +0 -1621
  337. package/coverage/toga-blox-npm/src/components/Input/Input.tsx.html +0 -568
  338. package/coverage/toga-blox-npm/src/components/Input/InputMemoTypes.tsx.html +0 -181
  339. package/coverage/toga-blox-npm/src/components/Input/index.html +0 -146
  340. package/coverage/toga-blox-npm/src/components/MobileMenu/MobileMenu.tsx.html +0 -208
  341. package/coverage/toga-blox-npm/src/components/MobileMenu/index.html +0 -116
  342. package/coverage/toga-blox-npm/src/components/Nav/Nav.stories.tsx.html +0 -628
  343. package/coverage/toga-blox-npm/src/components/Nav/Nav.tsx.html +0 -622
  344. package/coverage/toga-blox-npm/src/components/Nav/index.html +0 -131
  345. package/coverage/toga-blox-npm/src/components/Page/TableDataDummy.tsx.html +0 -733
  346. package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.stories.tsx.html +0 -1714
  347. package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.tsx.html +0 -115
  348. package/coverage/toga-blox-npm/src/components/Page/index.html +0 -146
  349. package/coverage/toga-blox-npm/src/components/PageSection/PageSection.stories.tsx.html +0 -433
  350. package/coverage/toga-blox-npm/src/components/PageSection/PageSection.tsx.html +0 -121
  351. package/coverage/toga-blox-npm/src/components/PageSection/index.html +0 -131
  352. package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.stories.tsx.html +0 -517
  353. package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.tsx.html +0 -325
  354. package/coverage/toga-blox-npm/src/components/SearchInput/index.html +0 -131
  355. package/coverage/toga-blox-npm/src/components/Slider/Slider.stories.tsx.html +0 -349
  356. package/coverage/toga-blox-npm/src/components/Slider/Slider.tsx.html +0 -502
  357. package/coverage/toga-blox-npm/src/components/Slider/index.html +0 -131
  358. package/coverage/toga-blox-npm/src/components/Submenus/AdminSubmenu.tsx.html +0 -136
  359. package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenu.tsx.html +0 -253
  360. package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenuItem.tsx.html +0 -202
  361. package/coverage/toga-blox-npm/src/components/Submenus/index.html +0 -146
  362. package/coverage/toga-blox-npm/src/components/Text/Text.stories.tsx.html +0 -235
  363. package/coverage/toga-blox-npm/src/components/Text/Text.tsx.html +0 -172
  364. package/coverage/toga-blox-npm/src/components/Text/index.html +0 -131
  365. package/coverage/toga-blox-npm/src/components/Toaster/Toaster.stories.tsx.html +0 -445
  366. package/coverage/toga-blox-npm/src/components/Toaster/Toaster.tsx.html +0 -301
  367. package/coverage/toga-blox-npm/src/components/Toaster/index.html +0 -131
  368. package/coverage/toga-blox-npm/src/hoc/styling/index.html +0 -116
  369. package/coverage/toga-blox-npm/src/hoc/styling/withStoryBook.tsx.html +0 -142
  370. package/coverage/toga-blox-npm/src/userHoc/index.html +0 -116
  371. package/coverage/toga-blox-npm/src/userHoc/withMemo.tsx.html +0 -145
  372. package/coverage/toga-blox-npm/src/utils/assertTagName.tsx.html +0 -106
  373. package/coverage/toga-blox-npm/src/utils/generateAccordionItem.tsx.html +0 -373
  374. package/coverage/toga-blox-npm/src/utils/generateFooterContacts.tsx.html +0 -295
  375. package/coverage/toga-blox-npm/src/utils/generateNavMenu.tsx.html +0 -247
  376. package/coverage/toga-blox-npm/src/utils/generateSocialList.tsx.html +0 -187
  377. package/coverage/toga-blox-npm/src/utils/getFontAwesomeIcon.tsx.html +0 -145
  378. package/coverage/toga-blox-npm/src/utils/index.html +0 -206
  379. package/coverage/toga-blox-npm/src/utils/inputValidation.tsx.html +0 -163
  380. package/coverage/toga-blox-npm/tailwind.config.js.html +0 -205
  381. package/declarations.d.ts +0 -4
  382. package/docker-compose.yml +0 -22
  383. package/global.css +0 -4
  384. package/index.js +0 -4
  385. package/nodemon.json +0 -5
  386. package/postcss.config.js +0 -6
  387. package/src/components/Badge/Badge.stories.tsx +0 -236
  388. package/src/components/Badge/Badge.test.tsx +0 -175
  389. package/src/components/Badge/Badge.tsx +0 -54
  390. package/src/components/Badge/Badge.types.tsx +0 -26
  391. package/src/components/Card/Card.stories.tsx +0 -235
  392. package/src/components/Card/Card.test.tsx +0 -53
  393. package/src/components/Card/Card.tsx +0 -26
  394. package/src/components/Card/Card.types.ts +0 -11
  395. package/src/components/Card/DUMMYPRODUCTDATA.json +0 -826
  396. package/src/components/Card/templates/CategoryCardTemplate.tsx +0 -86
  397. package/src/components/Card/templates/CompassCardTemplate.tsx +0 -58
  398. package/src/components/Card/templates/CounterContentCardTemplate.tsx +0 -200
  399. package/src/components/Card/templates/HorizontalCardTemplate.tsx +0 -184
  400. package/src/components/Card/templates/ItemCardTemplate.tsx +0 -155
  401. package/src/components/Card/templates/KitContentCardTemplate.tsx +0 -128
  402. package/src/components/Card/templates/ShippingAddressCardTemplate.tsx +0 -111
  403. package/src/components/Card/templates/VerticalCardTemplate.tsx +0 -169
  404. package/src/components/CounterButton/CounterButton.stories.tsx +0 -91
  405. package/src/components/CounterButton/CounterButton.tsx +0 -100
  406. package/src/components/CounterButton/CounterButton.types.ts +0 -12
  407. package/src/components/Description/Description.stories.tsx +0 -67
  408. package/src/components/Description/Description.tsx +0 -13
  409. package/src/components/Description/Description.types.ts +0 -9
  410. package/src/components/DropDownIconButton/DropDownIconButton.stories.tsx +0 -197
  411. package/src/components/DropDownIconButton/DropDownIconButton.test.tsx +0 -90
  412. package/src/components/DropDownIconButton/DropDownIconButton.tsx +0 -87
  413. package/src/components/DropDownIconButton/DropDownIconButton.types.ts +0 -21
  414. package/src/components/Footer/ContactInfoItem.tsx +0 -18
  415. package/src/components/Footer/DUMMYFOOTERDATA.json +0 -132
  416. package/src/components/Footer/Footer.stories.tsx +0 -283
  417. package/src/components/Footer/Footer.test.tsx +0 -90
  418. package/src/components/Footer/Footer.tsx +0 -96
  419. package/src/components/Footer/Footer.types.tsx +0 -61
  420. package/src/components/FormButton/FormButton.stories.tsx +0 -289
  421. package/src/components/FormButton/FormButton.test.tsx +0 -73
  422. package/src/components/FormButton/FormButton.tsx +0 -86
  423. package/src/components/FormButton/FormButton.types.ts +0 -27
  424. package/src/components/GenericList/DUMMYLISTDATA.json +0 -560
  425. package/src/components/GenericList/GenericList.stories.tsx +0 -97
  426. package/src/components/GenericList/GenericList.test.tsx +0 -29
  427. package/src/components/GenericList/GenericList.tsx +0 -145
  428. package/src/components/GenericList/templates/DummyDataList.tsx +0 -23
  429. package/src/components/GenericList/templates/DynamicIconList.tsx +0 -55
  430. package/src/components/GetSupport/GetSupport.stories.tsx +0 -80
  431. package/src/components/GetSupport/GetSupport.test.tsx +0 -62
  432. package/src/components/GetSupport/GetSupport.tsx +0 -59
  433. package/src/components/GetSupport/GetSupport.types.ts +0 -11
  434. package/src/components/HamburgerButton/Hamburger.stories.tsx +0 -225
  435. package/src/components/HamburgerButton/HamburgerButton.tsx +0 -49
  436. package/src/components/HamburgerButton/HamburgerButton.types.tsx +0 -7
  437. package/src/components/Header/DUMMYICONDATA.json +0 -136
  438. package/src/components/Header/Header.stories.tsx +0 -516
  439. package/src/components/Header/Header.test.tsx +0 -322
  440. package/src/components/Header/Header.tsx +0 -243
  441. package/src/components/Header/Header.types.ts +0 -52
  442. package/src/components/Header/headerContext.tsx +0 -125
  443. package/src/components/Hero/Hero.stories.tsx +0 -68
  444. package/src/components/Hero/Hero.test.tsx +0 -109
  445. package/src/components/Hero/Hero.tsx +0 -58
  446. package/src/components/Hero/Hero.types.ts +0 -9
  447. package/src/components/IconButton/IconButton.stories.tsx +0 -196
  448. package/src/components/IconButton/IconButton.test.tsx +0 -52
  449. package/src/components/IconButton/IconButton.tsx +0 -76
  450. package/src/components/IconButton/IconButton.types.ts +0 -28
  451. package/src/components/Image/Image.stories.tsx +0 -79
  452. package/src/components/Image/Image.test.tsx +0 -87
  453. package/src/components/Image/Image.tsx +0 -47
  454. package/src/components/Image/Image.types.ts +0 -11
  455. package/src/components/Image/declarations.d.ts +0 -24
  456. package/src/components/Input/Input.stories.tsx +0 -512
  457. package/src/components/Input/Input.test.tsx +0 -89
  458. package/src/components/Input/Input.tsx +0 -161
  459. package/src/components/Input/Input.types.ts +0 -52
  460. package/src/components/Input/InputMemoTypes.tsx +0 -32
  461. package/src/components/MobileMenu/MobileMenu.tsx +0 -41
  462. package/src/components/MobileMenu/MobileMenu.types.tsx +0 -28
  463. package/src/components/Nav/DUMMYNAVDATA.json +0 -234
  464. package/src/components/Nav/Nav.stories.tsx +0 -181
  465. package/src/components/Nav/Nav.test.tsx +0 -89
  466. package/src/components/Nav/Nav.tsx +0 -179
  467. package/src/components/Nav/Nav.types.tsx +0 -47
  468. package/src/components/Page/TableDataDummy.tsx +0 -216
  469. package/src/components/Page/ViewPageTemplate.stories.tsx +0 -543
  470. package/src/components/Page/ViewPageTemplate.test.tsx +0 -361
  471. package/src/components/Page/ViewPageTemplate.tsx +0 -10
  472. package/src/components/PageSection/PageSection.stories.tsx +0 -116
  473. package/src/components/PageSection/PageSection.tsx +0 -12
  474. package/src/components/PageSection/PageSections.test.tsx +0 -89
  475. package/src/components/SearchInput/SearchInput.stories.tsx +0 -144
  476. package/src/components/SearchInput/SearchInput.tsx +0 -81
  477. package/src/components/SearchInput/SearchInput.types.ts +0 -28
  478. package/src/components/Slider/Slider.stories.tsx +0 -88
  479. package/src/components/Slider/Slider.tsx +0 -139
  480. package/src/components/Slider/Slider.types.ts +0 -21
  481. package/src/components/Submenus/AdminSubmenu.tsx +0 -17
  482. package/src/components/Submenus/AlertSubmenu.tsx +0 -56
  483. package/src/components/Submenus/AlertSubmenuItem.tsx +0 -39
  484. package/src/components/Submenus/types.tsx +0 -32
  485. package/src/components/Text/Text.stories.tsx +0 -50
  486. package/src/components/Text/Text.test.tsx +0 -52
  487. package/src/components/Text/Text.tsx +0 -29
  488. package/src/components/Toaster/Toaster.stories.tsx +0 -120
  489. package/src/components/Toaster/Toaster.test.tsx +0 -60
  490. package/src/components/Toaster/Toaster.tsx +0 -72
  491. package/src/components/Toaster/Toaster.types.ts +0 -12
  492. package/src/hoc/styling/withStoryBook.tsx +0 -19
  493. package/src/main.css +0 -3
  494. package/src/userHoc/withMemo.tsx +0 -20
  495. package/src/utils/assertTagName.tsx +0 -7
  496. package/src/utils/generateAccordionItem.tsx +0 -96
  497. package/src/utils/generateFooterContacts.tsx +0 -70
  498. package/src/utils/generateNavMenu.tsx +0 -54
  499. package/src/utils/generateSocialList.tsx +0 -34
  500. package/src/utils/getFontAwesomeIcon.tsx +0 -20
  501. package/src/utils/inputValidation.tsx +0 -26
  502. package/tailwind.config.js +0 -40
  503. package/tsconfig.json +0 -25
  504. package/vite.config.ts +0 -33
  505. /package/{src/components/Badge/index.ts → dist/components/Badge/index.d.ts} +0 -0
  506. /package/{src/components/Card/index.ts → dist/components/Card/index.js} +0 -0
  507. /package/{src/components/DropDownIconButton/index.ts → dist/components/DropDownIconButton/index.d.ts} +0 -0
  508. /package/{src/components/FormButton/index.ts → dist/components/FormButton/index.d.ts} +0 -0
  509. /package/{src/components/HamburgerButton/index.ts → dist/components/HamburgerButton/index.d.ts} +0 -0
  510. /package/{src/components/Header/index.ts → dist/components/Header/index.d.ts} +0 -0
  511. /package/{src/components/Hero/index.ts → dist/components/Hero/index.d.ts} +0 -0
  512. /package/{src/components/IconButton/index.ts → dist/components/IconButton/index.d.ts} +0 -0
  513. /package/{src/components/Image/index.ts → dist/components/Image/index.d.ts} +0 -0
  514. /package/{src/components/Input/index.ts → dist/components/Input/index.d.ts} +0 -0
  515. /package/{src/components/MobileMenu/index.ts → dist/components/MobileMenu/index.d.ts} +0 -0
  516. /package/{src/components/Nav/index.ts → dist/components/Nav/index.d.ts} +0 -0
  517. /package/{src/components/Page/index.ts → dist/components/Page/index.d.ts} +0 -0
  518. /package/{src/components/PageSection/index.ts → dist/components/PageSection/index.d.ts} +0 -0
  519. /package/{src/components/Text/index.ts → dist/components/Text/index.d.ts} +0 -0
  520. /package/{src/components/Toaster/index.ts → dist/components/Toaster/index.d.ts} +0 -0
  521. /package/{src/hoc/index.ts → dist/hoc/index.js} +0 -0
  522. /package/{src/setupTests.ts → dist/setupTests.d.ts} +0 -0
  523. /package/{src/userHoc/index.ts → dist/userHoc/index.d.ts} +0 -0
@@ -0,0 +1,364 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Input } from ".";
3
+ import Text from "../Text/Text";
4
+ import { minCharactersRegex } from "../../utils/inputValidation";
5
+ import { withMemo } from "../../userHoc";
6
+ import { arePropsEqual } from "./InputMemoTypes";
7
+ import FormButton from "../FormButton/FormButton";
8
+ import { getFontAwesomeIcon } from "../../utils/getFontAwesomeIcon";
9
+ const MemoizedInput = withMemo(Input, arePropsEqual);
10
+ export default {
11
+ title: "Components/Input",
12
+ component: MemoizedInput,
13
+ argTypes: {
14
+ validateInput: {
15
+ control: "none",
16
+ table: {
17
+ disable: true,
18
+ },
19
+ description: "The function that validates the input.",
20
+ },
21
+ hasValidation: {
22
+ control: "none",
23
+ description: "Whether the input has validation styles turned on.",
24
+ },
25
+ errorMessage: {
26
+ control: "none",
27
+ table: {
28
+ disable: true,
29
+ },
30
+ description: "The error message if the input validation fails.",
31
+ },
32
+ regex: {
33
+ control: "none",
34
+ table: {
35
+ disable: true,
36
+ },
37
+ description: "The regex used to validate the input.",
38
+ },
39
+ inputType: {
40
+ control: "none",
41
+ table: {
42
+ disable: true,
43
+ },
44
+ description: "The type of input.",
45
+ },
46
+ inputWidth: {
47
+ control: "none",
48
+ description: "The width of the input.",
49
+ },
50
+ inputTextSize: {
51
+ control: "none",
52
+ description: "The size of the text in the input.",
53
+ },
54
+ hasPlaceholder: {
55
+ control: "none",
56
+ description: "Whether the input has a placeholder.",
57
+ },
58
+ placeholder: {
59
+ control: "none",
60
+ description: "The text that appears in the input field.",
61
+ },
62
+ hasLeftIcon: {
63
+ control: "none",
64
+ description: "If the input has an icon on the left.",
65
+ },
66
+ leftIcon: {
67
+ control: "none",
68
+ table: {
69
+ disable: true,
70
+ },
71
+ description: "If the input has an icon on the left.",
72
+ },
73
+ hasRightIcon: {
74
+ control: "none",
75
+ description: "If the input has an icon on the right.",
76
+ },
77
+ rightIcon: {
78
+ control: "none",
79
+ table: {
80
+ disable: true,
81
+ },
82
+ description: "If the input has an icon on the left.",
83
+ },
84
+ iconColor: {
85
+ control: "none",
86
+ description: "The color of the icons.",
87
+ },
88
+ iconBackgroundColor: {
89
+ control: "none",
90
+ description: "The background color of the icons.",
91
+ },
92
+ inputShape: {
93
+ control: "none",
94
+ description: "The shape of the input.",
95
+ },
96
+ borderColor: {
97
+ control: "none",
98
+ description: "The border color of the input.",
99
+ },
100
+ successBorder: {
101
+ control: "none",
102
+ description: "The border color when the input validation results in success.",
103
+ },
104
+ errorBorder: {
105
+ control: "none",
106
+ description: "The border color when the input validation results in error.",
107
+ },
108
+ backgroundColor: {
109
+ control: "none",
110
+ description: "The background color of the input.",
111
+ },
112
+ hasButton: {
113
+ control: "none",
114
+ description: "If the input has a button.",
115
+ },
116
+ button: {
117
+ control: "none",
118
+ table: {
119
+ disable: true,
120
+ },
121
+ description: "The button that is displayed on the input.",
122
+ },
123
+ onClick: {
124
+ control: "none",
125
+ table: {
126
+ disable: true,
127
+ },
128
+ },
129
+ label: {
130
+ control: "none",
131
+ table: {
132
+ disable: true,
133
+ },
134
+ },
135
+ labelVisible: {
136
+ control: "none",
137
+ description: "If the input label is visible to all or just screen readers.",
138
+ },
139
+ labelPlacement: {
140
+ control: "none",
141
+ description: "Where the label is placed in relation to the input field.",
142
+ },
143
+ value: {
144
+ control: "none",
145
+ table: {
146
+ disable: true,
147
+ },
148
+ },
149
+ inputName: {
150
+ control: "none",
151
+ table: {
152
+ disable: true,
153
+ },
154
+ },
155
+ onChange: {
156
+ control: "none",
157
+ table: {
158
+ disable: true,
159
+ },
160
+ },
161
+ onButtonClick: {
162
+ control: "none",
163
+ table: {
164
+ disable: true,
165
+ },
166
+ },
167
+ additionalClasses: {
168
+ control: "none",
169
+ table: {
170
+ disable: true,
171
+ },
172
+ },
173
+ },
174
+ tags: ["autodocs"],
175
+ parameters: {
176
+ layout: "centered",
177
+ },
178
+ };
179
+ const Template = (args) => _jsx(MemoizedInput, { ...args });
180
+ export const NoIcons = Template.bind({});
181
+ NoIcons.args = {
182
+ inputType: "search",
183
+ inputName: "search",
184
+ hasValidation: false,
185
+ hasPlaceholder: true,
186
+ placeholder: "Search",
187
+ labelVisible: false,
188
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search", tag: "h2", additionalClasses: "mb-0 pb-0 pr-2" })),
189
+ hasLeftIcon: false,
190
+ hasRightIcon: false,
191
+ leftIcon: getFontAwesomeIcon("search"),
192
+ rightIcon: getFontAwesomeIcon("arrow-right"),
193
+ hasButton: true,
194
+ button: (_jsx(FormButton, { text: "", as: "button", hoverBackground: "hover:bg-green-500", backgroundColor: "bg-green-500", icon: getFontAwesomeIcon("search"), additionalClasses: "items-center px-2 h-full", borderColor: "border-none", hoverFontColor: "hover:text-black", shape: "rounded", onClick: () => alert("Button clicked!") })),
195
+ inputTextSize: "text-md",
196
+ inputWidth: "w-96",
197
+ inputShape: "rounded",
198
+ backgroundColor: "bg-white",
199
+ borderColor: "border-green-500",
200
+ };
201
+ export const LeftIcon = Template.bind({});
202
+ LeftIcon.args = {
203
+ inputType: "text",
204
+ inputName: "search",
205
+ hasValidation: false,
206
+ inputWidth: "w-96",
207
+ inputShape: "rounded",
208
+ backgroundColor: "bg-white",
209
+ borderColor: "border-green-500",
210
+ hasPlaceholder: true,
211
+ placeholder: "Search",
212
+ labelVisible: false,
213
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-2" })),
214
+ hasLeftIcon: true,
215
+ leftIcon: getFontAwesomeIcon("search"),
216
+ iconBackgroundColor: "none",
217
+ hasRightIcon: false,
218
+ iconColor: "text-green-500",
219
+ hasButton: false,
220
+ };
221
+ export const RightIcon = Template.bind({});
222
+ RightIcon.args = {
223
+ inputType: "text",
224
+ inputName: "search",
225
+ hasValidation: false,
226
+ inputWidth: "w-96",
227
+ inputShape: "rounded",
228
+ backgroundColor: "bg-gray-500",
229
+ borderColor: "border-green-500",
230
+ hasPlaceholder: true,
231
+ placeholder: "Search",
232
+ labelVisible: false,
233
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-2" })),
234
+ hasLeftIcon: false,
235
+ hasRightIcon: true,
236
+ rightIcon: getFontAwesomeIcon("arrow-right"),
237
+ iconBackgroundColor: "none",
238
+ hasButton: false,
239
+ };
240
+ export const DualIcons = Template.bind({});
241
+ DualIcons.args = {
242
+ inputType: "text",
243
+ inputName: "search",
244
+ hasValidation: false,
245
+ inputWidth: "w-[40rem]",
246
+ inputShape: "rounded",
247
+ backgroundColor: "bg-white",
248
+ borderColor: "border-green-500",
249
+ placeholder: "Search",
250
+ hasButton: false,
251
+ labelVisible: false,
252
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-2" })),
253
+ hasRightIcon: true,
254
+ hasLeftIcon: true,
255
+ rightIcon: getFontAwesomeIcon("arrow-right"),
256
+ leftIcon: getFontAwesomeIcon("search"),
257
+ iconBackgroundColor: "none",
258
+ };
259
+ export const ButtonWithValidation = Template.bind({});
260
+ ButtonWithValidation.args = {
261
+ inputType: "search",
262
+ inputName: "search",
263
+ hasValidation: true,
264
+ regex: minCharactersRegex,
265
+ errorMessage: "Input must be at least three characters",
266
+ inputWidth: "w-[40rem]",
267
+ inputShape: "rounded",
268
+ backgroundColor: "bg-white",
269
+ borderColor: "border-green-500",
270
+ errorBorder: "border-red-500",
271
+ successBorder: "border-green-500",
272
+ placeholder: "Enter input here...",
273
+ labelVisible: false,
274
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-2" })),
275
+ hasRightIcon: false,
276
+ hasLeftIcon: false,
277
+ hasButton: true,
278
+ button: (_jsx(FormButton, { text: "", as: "button", hoverBackground: "hover:bg-green-500", backgroundColor: "bg-green-500", icon: getFontAwesomeIcon("search"), additionalClasses: "items-center px-2 h-full", borderColor: "border-none", hoverFontColor: "hover:text-black", shape: "rounded", onClick: () => alert("Button clicked!") })),
279
+ };
280
+ export const ButtonWithLeftIcon = Template.bind({});
281
+ ButtonWithLeftIcon.args = {
282
+ inputType: "text",
283
+ inputName: "search",
284
+ hasValidation: false,
285
+ inputWidth: "w-[40rem]",
286
+ inputShape: "rounded",
287
+ backgroundColor: "bg-white",
288
+ borderColor: "border-green-500",
289
+ placeholder: "Search",
290
+ labelVisible: false,
291
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search:", tag: "h2", additionalClasses: "mb-0 pb-2 pl-2" })),
292
+ hasRightIcon: false,
293
+ hasLeftIcon: true,
294
+ leftIcon: getFontAwesomeIcon("search"),
295
+ iconBackgroundColor: "none",
296
+ hasButton: true,
297
+ button: (_jsx(FormButton, { text: "", as: "button", hoverBackground: "hover:bg-green-500", backgroundColor: "bg-green-500", icon: getFontAwesomeIcon("search"), additionalClasses: "items-center px-2 h-full", borderColor: "border-none", hoverFontColor: "hover:text-black", shape: "rounded", onClick: () => alert("Button clicked!") })),
298
+ };
299
+ export const DateInput = Template.bind({});
300
+ DateInput.args = {
301
+ inputType: "date",
302
+ inputName: "birthday",
303
+ hasValidation: true,
304
+ inputWidth: "w-48",
305
+ inputShape: "rounded",
306
+ backgroundColor: "bg-white",
307
+ borderColor: "border-green-500",
308
+ hasPlaceholder: false,
309
+ labelVisible: true,
310
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Date of Birth:", tag: "h2", additionalClasses: "mb-0 pb-1 pl-2" })),
311
+ hasRightIcon: false,
312
+ hasLeftIcon: false,
313
+ hasButton: false,
314
+ };
315
+ export const EmailInput = Template.bind({});
316
+ EmailInput.args = {
317
+ inputType: "email",
318
+ inputName: "email",
319
+ hasValidation: false,
320
+ inputWidth: "w-72",
321
+ inputShape: "rounded",
322
+ backgroundColor: "bg-white",
323
+ borderColor: "border-green-500",
324
+ hasPlaceholder: false,
325
+ labelVisible: true,
326
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Email:", tag: "h2", additionalClasses: "mb-0 pb-1 pl-2" })),
327
+ hasRightIcon: false,
328
+ hasLeftIcon: true,
329
+ leftIcon: getFontAwesomeIcon("envelope"),
330
+ hasButton: false,
331
+ };
332
+ export const NumberInput = Template.bind({});
333
+ NumberInput.args = {
334
+ inputType: "number",
335
+ inputName: "number",
336
+ hasValidation: false,
337
+ inputWidth: "w-36",
338
+ inputShape: "rounded",
339
+ backgroundColor: "bg-white",
340
+ borderColor: "border-green-500",
341
+ hasPlaceholder: false,
342
+ labelVisible: true,
343
+ labelPlacement: "left",
344
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Enter Your Age:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-3" })),
345
+ hasRightIcon: false,
346
+ hasLeftIcon: false,
347
+ hasButton: false,
348
+ };
349
+ export const RangeInput = Template.bind({});
350
+ RangeInput.args = {
351
+ inputType: "range",
352
+ inputName: "number",
353
+ hasValidation: false,
354
+ inputWidth: "w-36",
355
+ backgroundColor: "bg-white",
356
+ borderColor: "border-none",
357
+ hasPlaceholder: false,
358
+ labelVisible: true,
359
+ labelPlacement: "left",
360
+ label: (_jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Select:", tag: "h2", additionalClasses: "mb-0 pb-0 pr-4" })),
361
+ hasRightIcon: false,
362
+ hasLeftIcon: false,
363
+ hasButton: false,
364
+ };
@@ -0,0 +1 @@
1
+ import "../../../dist/main.css";
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "../../../dist/main.css";
3
+ import { render, screen } from "@testing-library/react";
4
+ import { describe, test, expect, beforeEach } from "vitest";
5
+ import Input from "./Input";
6
+ import Text from "../Text/Text";
7
+ import FormButton from "../FormButton/FormButton";
8
+ import { getFontAwesomeIcon } from "../../utils/getFontAwesomeIcon";
9
+ describe("<Input /> with all props", () => {
10
+ beforeEach(() => {
11
+ render(_jsx(Input, { hasValidation: false,
12
+ // LABEL
13
+ label: _jsx(Text, { size: "text-md", color: "text-black", fontFamily: "font-serif", text: "Search for items", tag: "h2", additionalClasses: "mb-0 pb-2 pl-2" }), labelVisible: true, labelPlacement: "left",
14
+ // INPUT DETAILS
15
+ inputName: "search", inputType: "text",
16
+ // PLACEHOLDER
17
+ hasPlaceholder: true, placeholder: "Search for items",
18
+ // ICONS
19
+ hasLeftIcon: false, hasRightIcon: false, iconColor: "black",
20
+ // INPUT STYLES
21
+ inputTextSize: "medium", inputShape: "cornered", borderColor: "green", backgroundColor: "none", inputWidth: "w-96",
22
+ // BUTTON
23
+ hasButton: true, button: _jsx(FormButton, { text: "Submit", as: "button", hoverBackground: "green", backgroundColor: "green", icon: getFontAwesomeIcon("arrow-right"), additionalClasses: "items-center px-4", borderColor: "green", hoverFontColor: "black", shape: "cornered" }) }));
24
+ });
25
+ test("renders Input component", () => {
26
+ expect(screen.getByTestId("input-container")).toBeInTheDocument();
27
+ expect(screen.getByTestId("input-element")).toBeInTheDocument();
28
+ });
29
+ test("renders correct Input label", () => {
30
+ expect(screen.getByTestId("input-label")).toBeInTheDocument();
31
+ expect(screen.getByTestId("input-label")).toHaveTextContent("Search for items");
32
+ });
33
+ test("renders correct button", () => {
34
+ expect(screen.getByTestId("submit-button")).toBeInTheDocument();
35
+ expect(screen.getByTestId("submit-button")).toHaveTextContent("Submit");
36
+ });
37
+ test("contains correct placeholder text", () => {
38
+ const input = screen.getByTestId("input-element");
39
+ expect(input).toHaveAttribute("placeholder", "Search for items");
40
+ });
41
+ test("renders correct border color class", () => {
42
+ const inputElement = screen.getByTestId("input-element");
43
+ expect(inputElement).toHaveClass("border-teal-500");
44
+ });
45
+ });
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ export interface InputTypes {
3
+ onChange?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
4
+ value?: string;
5
+ hasValidation?: boolean;
6
+ validateInput?: (inputValue: string | number, inputType: string) => string;
7
+ hasErrorMessage?: boolean;
8
+ errorMessage?: string;
9
+ regex?: RegExp;
10
+ setControlledState?: (value: string) => void;
11
+ controlledState?: string;
12
+ labelVisible: boolean;
13
+ label: React.ReactNode;
14
+ labelPlacement?: "top" | "left";
15
+ inputType: string;
16
+ inputName: string;
17
+ hasPlaceholder: boolean;
18
+ placeholder: string;
19
+ hasLeftIcon?: boolean;
20
+ hasRightIcon?: boolean;
21
+ leftIcon?: React.ReactNode;
22
+ rightIcon?: React.ReactNode;
23
+ iconColor?: "green" | "blue" | "black" | string;
24
+ iconBackgroundColor?: "green" | "white" | "blue" | "green" | "none" | string;
25
+ inputTextSize?: "small" | "medium" | "large" | string;
26
+ inputWidth?: string;
27
+ inputShape?: "cornered" | "semiRounded" | "rounded" | string;
28
+ borderColor?: "green" | "blue" | "grey" | "black" | "none" | string;
29
+ backgroundColor?: "white" | "blue" | "green" | "none" | string;
30
+ additionalClasses?: string | undefined;
31
+ errorBorder?: "red" | "orange" | string;
32
+ successBorder?: "green" | "blue" | "grey" | "black" | string;
33
+ hasButton?: boolean;
34
+ button?: React.ReactNode;
35
+ onButtonClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
36
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { InputTypes } from ".";
2
+ export declare const arePropsEqual: (prevProps: InputTypes, nextProps: InputTypes) => boolean;
@@ -0,0 +1,28 @@
1
+ export const arePropsEqual = (prevProps, nextProps) => {
2
+ return (prevProps.hasValidation === nextProps.hasValidation &&
3
+ prevProps.errorMessage === nextProps.errorMessage &&
4
+ prevProps.regex === nextProps.regex &&
5
+ prevProps.label === nextProps.label &&
6
+ prevProps.labelVisible === nextProps.labelVisible &&
7
+ prevProps.labelPlacement === nextProps.labelPlacement &&
8
+ prevProps.inputName === nextProps.inputName &&
9
+ prevProps.inputType === nextProps.inputType &&
10
+ prevProps.hasPlaceholder === nextProps.hasPlaceholder &&
11
+ prevProps.placeholder === nextProps.placeholder &&
12
+ prevProps.hasLeftIcon === nextProps.hasLeftIcon &&
13
+ prevProps.hasRightIcon === nextProps.hasRightIcon &&
14
+ prevProps.leftIcon === nextProps.leftIcon &&
15
+ prevProps.rightIcon === nextProps.rightIcon &&
16
+ prevProps.iconColor === nextProps.iconColor &&
17
+ prevProps.iconBackgroundColor === nextProps.iconBackgroundColor &&
18
+ prevProps.inputTextSize === nextProps.inputTextSize &&
19
+ prevProps.inputShape === nextProps.inputShape &&
20
+ prevProps.borderColor === nextProps.borderColor &&
21
+ prevProps.backgroundColor === nextProps.backgroundColor &&
22
+ prevProps.inputWidth === nextProps.inputWidth &&
23
+ prevProps.errorBorder === nextProps.errorBorder &&
24
+ prevProps.successBorder === nextProps.successBorder &&
25
+ prevProps.additionalClasses === nextProps.additionalClasses &&
26
+ prevProps.hasButton === nextProps.hasButton &&
27
+ prevProps.button === nextProps.button);
28
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Input } from "./Input";
2
+ export * from "./Input.types";
@@ -0,0 +1,3 @@
1
+ import { MobileMenuTypes } from "./MobileMenu.types";
2
+ declare const MobileMenu: React.FC<MobileMenuTypes>;
3
+ export default MobileMenu;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useHeaderContext } from "../Header/headerContext";
3
+ const MobileMenu = ({ badge, nav, input, icons, mobileMenuClasses, }) => {
4
+ const { hasMobileIcons, hasMobileNavItems, hasMobileBadge, hasMobileSearchBar, } = useHeaderContext();
5
+ return (_jsxs("nav", { "data-testid": "secondary-nav", "aria-label": "Secondary navigation", className: `flex flex-col justify-start z-[1000] top-0 w-full h-full pt-16 pb-12 px-4 overflow-scroll ${mobileMenuClasses}`, children: [hasMobileNavItems && _jsx("div", { className: "mb-12", children: nav }), hasMobileBadge && (_jsx("div", { className: "flex w-1/2 mb-12 mx-auto", children: badge })), hasMobileIcons && icons && (_jsx("div", { className: "flex justify-around w-full mb-12", children: icons })), hasMobileSearchBar && (_jsx("div", { className: "flex w-full [&:has(:focus-visible)]:ring-2", children: input }))] }));
6
+ };
7
+ export default MobileMenu;
@@ -0,0 +1,20 @@
1
+ export interface MobileMenuTypes {
2
+ onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
3
+ handleNav?: () => void;
4
+ hasSearchBar?: boolean;
5
+ hasNavItems?: boolean;
6
+ hasBadge?: boolean;
7
+ hasIcons?: boolean;
8
+ hasMobileIcons?: boolean;
9
+ hasMobileNavItems?: boolean;
10
+ hasMobileBadge?: boolean;
11
+ hasMobileSearchBar?: boolean;
12
+ mobileMenuClasses?: string;
13
+ hasGlass?: boolean;
14
+ backgroundColor?: string;
15
+ nav?: React.ReactNode;
16
+ badge?: React.ReactNode;
17
+ input?: React.ReactNode;
18
+ icons?: React.ReactNode;
19
+ mobileCloseIcon?: JSX.Element | undefined | null;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from "./MobileMenu";
2
+ export * from "./MobileMenu.types";