@dktunited-techoff/techoff-suite-ui 1.1.0 → 1.3.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 (413) hide show
  1. package/package.json +1 -1
  2. package/{lib/components/Button/Button.css → src/components/TsButton/TsButton.css} +18 -18
  3. package/src/components/TsButton/TsButton.tsx +34 -0
  4. package/src/components/{Button/Button.types.ts → TsButton/TsButton.types.ts} +1 -1
  5. package/{esm/components/Button/__stories__/Button.stories.mdx → src/components/TsButton/__stories__/TsButton.stories.mdx} +4 -4
  6. package/{esm/components/Icon/Icon.css → src/components/TsIcon/TsIcon.css} +4 -4
  7. package/src/components/TsIcon/TsIcon.tsx +13 -0
  8. package/src/components/TsIcon/TsIcon.types.ts +1 -0
  9. package/{lib/components/Icon/__stories__/Icon.stories.mdx → src/components/TsIcon/__stories__/TsIcon.stories.mdx} +4 -4
  10. package/{lib/components/Loader/Loader.css → src/components/TsLoader/TsLoader.css} +5 -5
  11. package/src/components/TsLoader/TsLoader.tsx +7 -0
  12. package/src/components/TsLoader/TsLoader.types.ts +1 -0
  13. package/{lib/components/Loader/__stories__/Loader.stories.mdx → src/components/TsLoader/__stories__/TsLoader.stories.mdx} +3 -3
  14. package/src/index.ts +6 -11
  15. package/{esm/layouts/Header/Header.css → src/layouts/TsHeader/TsHeader.css} +25 -25
  16. package/src/layouts/TsHeader/TsHeader.tsx +20 -0
  17. package/src/layouts/{Header/Header.types.ts → TsHeader/TsHeader.types.ts} +4 -4
  18. package/src/layouts/TsHeader/TsHeaderProfile.tsx +56 -0
  19. package/src/layouts/{Header/HeaderSearch.tsx → TsHeader/TsHeaderSearch.tsx} +15 -15
  20. package/src/layouts/{Header/__stories__/Header.stories.mdx → TsHeader/__stories__/TsHeader.stories.mdx} +12 -12
  21. package/src/layouts/{Navigation/Navigation.css → TsNavigation/TsNavigation.css} +16 -16
  22. package/src/layouts/TsNavigation/TsNavigation.tsx +54 -0
  23. package/src/layouts/TsNavigation/TsNavigation.types.ts +4 -0
  24. package/src/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +51 -0
  25. package/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
  26. package/esm/assets/fonts/Roboto-Light.ttf +0 -0
  27. package/esm/components/Button/Button.css +0 -91
  28. package/esm/components/Button/Button.d.ts +0 -5
  29. package/esm/components/Button/Button.js +0 -17
  30. package/esm/components/Button/Button.js.map +0 -1
  31. package/esm/components/Button/Button.types.d.ts +0 -9
  32. package/esm/components/Button/Button.types.js +0 -2
  33. package/esm/components/Button/Button.types.js.map +0 -1
  34. package/esm/components/Checkbox/Checkbox.css +0 -72
  35. package/esm/components/Checkbox/Checkbox.d.ts +0 -4
  36. package/esm/components/Checkbox/Checkbox.js +0 -18
  37. package/esm/components/Checkbox/Checkbox.js.map +0 -1
  38. package/esm/components/Checkbox/Checkbox.types.d.ts +0 -7
  39. package/esm/components/Checkbox/Checkbox.types.js +0 -2
  40. package/esm/components/Checkbox/Checkbox.types.js.map +0 -1
  41. package/esm/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  42. package/esm/components/Icon/Icon.d.ts +0 -4
  43. package/esm/components/Icon/Icon.js +0 -12
  44. package/esm/components/Icon/Icon.js.map +0 -1
  45. package/esm/components/Icon/Icon.types.d.ts +0 -4
  46. package/esm/components/Icon/Icon.types.js +0 -2
  47. package/esm/components/Icon/Icon.types.js.map +0 -1
  48. package/esm/components/Icon/__stories__/Icon.stories.mdx +0 -89
  49. package/esm/components/Icon/icons/index.d.ts +0 -3
  50. package/esm/components/Icon/icons/index.js +0 -59
  51. package/esm/components/Icon/icons/index.js.map +0 -1
  52. package/esm/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  53. package/esm/components/Inputs/BooleanInput/BooleanInput.d.ts +0 -4
  54. package/esm/components/Inputs/BooleanInput/BooleanInput.js +0 -13
  55. package/esm/components/Inputs/BooleanInput/BooleanInput.js.map +0 -1
  56. package/esm/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  57. package/esm/components/Inputs/BooleanInput/BooleanInput.types.d.ts +0 -8
  58. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js +0 -2
  59. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js.map +0 -1
  60. package/esm/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  61. package/esm/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  62. package/esm/components/Inputs/Input/Input.css +0 -97
  63. package/esm/components/Inputs/Input/Input.d.ts +0 -4
  64. package/esm/components/Inputs/Input/Input.js +0 -26
  65. package/esm/components/Inputs/Input/Input.js.map +0 -1
  66. package/esm/components/Inputs/Input/Input.tsx +0 -67
  67. package/esm/components/Inputs/Input/Input.types.d.ts +0 -14
  68. package/esm/components/Inputs/Input/Input.types.js +0 -2
  69. package/esm/components/Inputs/Input/Input.types.js.map +0 -1
  70. package/esm/components/Inputs/Input/Input.types.ts +0 -15
  71. package/esm/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  72. package/esm/components/Loader/Loader.css +0 -42
  73. package/esm/components/Loader/Loader.d.ts +0 -4
  74. package/esm/components/Loader/Loader.js +0 -6
  75. package/esm/components/Loader/Loader.js.map +0 -1
  76. package/esm/components/Loader/Loader.types.d.ts +0 -3
  77. package/esm/components/Loader/Loader.types.js +0 -2
  78. package/esm/components/Loader/Loader.types.js.map +0 -1
  79. package/esm/components/Loader/__stories__/Loader.stories.mdx +0 -30
  80. package/esm/components/Select/Select.css +0 -30
  81. package/esm/components/Select/Select.d.ts +0 -4
  82. package/esm/components/Select/Select.js +0 -14
  83. package/esm/components/Select/Select.js.map +0 -1
  84. package/esm/components/Select/Select.types.d.ts +0 -7
  85. package/esm/components/Select/Select.types.js +0 -2
  86. package/esm/components/Select/Select.types.js.map +0 -1
  87. package/esm/components/Select/__stories__/Select.stories.mdx +0 -44
  88. package/esm/hooks/use-click-outside.d.ts +0 -2
  89. package/esm/hooks/use-click-outside.js +0 -14
  90. package/esm/hooks/use-click-outside.js.map +0 -1
  91. package/esm/index.d.ts +0 -11
  92. package/esm/index.js +0 -12
  93. package/esm/index.js.map +0 -1
  94. package/esm/layouts/Header/Header.d.ts +0 -4
  95. package/esm/layouts/Header/Header.js +0 -14
  96. package/esm/layouts/Header/Header.js.map +0 -1
  97. package/esm/layouts/Header/Header.types.d.ts +0 -23
  98. package/esm/layouts/Header/Header.types.js +0 -2
  99. package/esm/layouts/Header/Header.types.js.map +0 -1
  100. package/esm/layouts/Header/HeaderProfile.d.ts +0 -5
  101. package/esm/layouts/Header/HeaderProfile.js +0 -38
  102. package/esm/layouts/Header/HeaderProfile.js.map +0 -1
  103. package/esm/layouts/Header/HeaderSearch.d.ts +0 -3
  104. package/esm/layouts/Header/HeaderSearch.js +0 -60
  105. package/esm/layouts/Header/HeaderSearch.js.map +0 -1
  106. package/esm/layouts/Header/__stories__/Header.stories.mdx +0 -71
  107. package/esm/layouts/Navigation/Navigation.css +0 -74
  108. package/esm/layouts/Navigation/Navigation.d.ts +0 -7
  109. package/esm/layouts/Navigation/Navigation.js +0 -29
  110. package/esm/layouts/Navigation/Navigation.js.map +0 -1
  111. package/esm/layouts/Navigation/Navigation.types.d.ts +0 -10
  112. package/esm/layouts/Navigation/Navigation.types.js +0 -2
  113. package/esm/layouts/Navigation/Navigation.types.js.map +0 -1
  114. package/esm/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
  115. package/esm/utils/string.utils.d.ts +0 -1
  116. package/esm/utils/string.utils.js +0 -2
  117. package/esm/utils/string.utils.js.map +0 -1
  118. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  119. package/lib/assets/fonts/Roboto-Light.ttf +0 -0
  120. package/lib/components/Button/Button.d.ts +0 -5
  121. package/lib/components/Button/Button.js +0 -21
  122. package/lib/components/Button/Button.js.map +0 -1
  123. package/lib/components/Button/Button.types.d.ts +0 -9
  124. package/lib/components/Button/Button.types.js +0 -3
  125. package/lib/components/Button/Button.types.js.map +0 -1
  126. package/lib/components/Button/__stories__/Button.stories.mdx +0 -74
  127. package/lib/components/Checkbox/Checkbox.css +0 -72
  128. package/lib/components/Checkbox/Checkbox.d.ts +0 -4
  129. package/lib/components/Checkbox/Checkbox.js +0 -22
  130. package/lib/components/Checkbox/Checkbox.js.map +0 -1
  131. package/lib/components/Checkbox/Checkbox.types.d.ts +0 -7
  132. package/lib/components/Checkbox/Checkbox.types.js +0 -3
  133. package/lib/components/Checkbox/Checkbox.types.js.map +0 -1
  134. package/lib/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  135. package/lib/components/Icon/Icon.css +0 -26
  136. package/lib/components/Icon/Icon.d.ts +0 -4
  137. package/lib/components/Icon/Icon.js +0 -16
  138. package/lib/components/Icon/Icon.js.map +0 -1
  139. package/lib/components/Icon/Icon.types.d.ts +0 -4
  140. package/lib/components/Icon/Icon.types.js +0 -3
  141. package/lib/components/Icon/Icon.types.js.map +0 -1
  142. package/lib/components/Icon/icons/add-circle.svg +0 -1
  143. package/lib/components/Icon/icons/add.svg +0 -1
  144. package/lib/components/Icon/icons/alert-circle-filled.svg +0 -1
  145. package/lib/components/Icon/icons/alert-circle.svg +0 -1
  146. package/lib/components/Icon/icons/alert-triangle-filled.svg +0 -1
  147. package/lib/components/Icon/icons/alert-triangle.svg +0 -1
  148. package/lib/components/Icon/icons/arrow-diagonal-collapse.svg +0 -1
  149. package/lib/components/Icon/icons/arrow-diagonal-expand.svg +0 -1
  150. package/lib/components/Icon/icons/arrow-down.svg +0 -1
  151. package/lib/components/Icon/icons/arrow-go-back.svg +0 -1
  152. package/lib/components/Icon/icons/arrow-left-right.svg +0 -1
  153. package/lib/components/Icon/icons/arrow-left.svg +0 -1
  154. package/lib/components/Icon/icons/arrow-right.svg +0 -1
  155. package/lib/components/Icon/icons/arrow-up-down.svg +0 -1
  156. package/lib/components/Icon/icons/arrow-up.svg +0 -1
  157. package/lib/components/Icon/icons/award.svg +0 -1
  158. package/lib/components/Icon/icons/check-circle-filled.svg +0 -1
  159. package/lib/components/Icon/icons/check-circle-timer.svg +0 -7
  160. package/lib/components/Icon/icons/check-circle.svg +0 -1
  161. package/lib/components/Icon/icons/check-square-filled.svg +0 -1
  162. package/lib/components/Icon/icons/check-square.svg +0 -1
  163. package/lib/components/Icon/icons/check.svg +0 -1
  164. package/lib/components/Icon/icons/chevron-down.svg +0 -1
  165. package/lib/components/Icon/icons/chevron-left.svg +0 -1
  166. package/lib/components/Icon/icons/chevron-right.svg +0 -1
  167. package/lib/components/Icon/icons/chevron-up.svg +0 -1
  168. package/lib/components/Icon/icons/circle.svg +0 -1
  169. package/lib/components/Icon/icons/close-circle.svg +0 -1
  170. package/lib/components/Icon/icons/close.svg +0 -1
  171. package/lib/components/Icon/icons/currency-euro.svg +0 -1
  172. package/lib/components/Icon/icons/download.svg +0 -1
  173. package/lib/components/Icon/icons/edit.svg +0 -1
  174. package/lib/components/Icon/icons/external-link.svg +0 -1
  175. package/lib/components/Icon/icons/filter-off.svg +0 -1
  176. package/lib/components/Icon/icons/filter.svg +0 -1
  177. package/lib/components/Icon/icons/flashlight-off.svg +0 -1
  178. package/lib/components/Icon/icons/flashlight.svg +0 -1
  179. package/lib/components/Icon/icons/header-bikestudio.svg +0 -32
  180. package/lib/components/Icon/icons/header-nsc-helmet.svg +0 -32
  181. package/lib/components/Icon/icons/header-opticost.svg +0 -32
  182. package/lib/components/Icon/icons/header-repairability.svg +0 -32
  183. package/lib/components/Icon/icons/heart-filled.svg +0 -1
  184. package/lib/components/Icon/icons/heart.svg +0 -1
  185. package/lib/components/Icon/icons/history.svg +0 -1
  186. package/lib/components/Icon/icons/home.svg +0 -1
  187. package/lib/components/Icon/icons/index.d.ts +0 -3
  188. package/lib/components/Icon/icons/index.js +0 -62
  189. package/lib/components/Icon/icons/index.js.map +0 -1
  190. package/lib/components/Icon/icons/index.ts +0 -58
  191. package/lib/components/Icon/icons/link.svg +0 -1
  192. package/lib/components/Icon/icons/list-settings.svg +0 -1
  193. package/lib/components/Icon/icons/lock.svg +0 -1
  194. package/lib/components/Icon/icons/loop-right.svg +0 -1
  195. package/lib/components/Icon/icons/question-circle.svg +0 -1
  196. package/lib/components/Icon/icons/save.svg +0 -1
  197. package/lib/components/Icon/icons/search.svg +0 -1
  198. package/lib/components/Icon/icons/seedling-circle.svg +0 -12
  199. package/lib/components/Icon/icons/square.svg +0 -1
  200. package/lib/components/Icon/icons/tools.svg +0 -1
  201. package/lib/components/Icon/icons/user.svg +0 -1
  202. package/lib/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  203. package/lib/components/Inputs/BooleanInput/BooleanInput.d.ts +0 -4
  204. package/lib/components/Inputs/BooleanInput/BooleanInput.js +0 -17
  205. package/lib/components/Inputs/BooleanInput/BooleanInput.js.map +0 -1
  206. package/lib/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  207. package/lib/components/Inputs/BooleanInput/BooleanInput.types.d.ts +0 -8
  208. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js +0 -3
  209. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js.map +0 -1
  210. package/lib/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  211. package/lib/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  212. package/lib/components/Inputs/Input/Input.css +0 -97
  213. package/lib/components/Inputs/Input/Input.d.ts +0 -4
  214. package/lib/components/Inputs/Input/Input.js +0 -30
  215. package/lib/components/Inputs/Input/Input.js.map +0 -1
  216. package/lib/components/Inputs/Input/Input.tsx +0 -67
  217. package/lib/components/Inputs/Input/Input.types.d.ts +0 -14
  218. package/lib/components/Inputs/Input/Input.types.js +0 -3
  219. package/lib/components/Inputs/Input/Input.types.js.map +0 -1
  220. package/lib/components/Inputs/Input/Input.types.ts +0 -15
  221. package/lib/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  222. package/lib/components/Loader/Loader.d.ts +0 -4
  223. package/lib/components/Loader/Loader.js +0 -10
  224. package/lib/components/Loader/Loader.js.map +0 -1
  225. package/lib/components/Loader/Loader.types.d.ts +0 -3
  226. package/lib/components/Loader/Loader.types.js +0 -3
  227. package/lib/components/Loader/Loader.types.js.map +0 -1
  228. package/lib/components/Select/Select.css +0 -30
  229. package/lib/components/Select/Select.d.ts +0 -4
  230. package/lib/components/Select/Select.js +0 -18
  231. package/lib/components/Select/Select.js.map +0 -1
  232. package/lib/components/Select/Select.types.d.ts +0 -7
  233. package/lib/components/Select/Select.types.js +0 -3
  234. package/lib/components/Select/Select.types.js.map +0 -1
  235. package/lib/components/Select/__stories__/Select.stories.mdx +0 -44
  236. package/lib/hooks/use-click-outside.d.ts +0 -2
  237. package/lib/hooks/use-click-outside.js +0 -18
  238. package/lib/hooks/use-click-outside.js.map +0 -1
  239. package/lib/index.d.ts +0 -11
  240. package/lib/index.js +0 -28
  241. package/lib/index.js.map +0 -1
  242. package/lib/layouts/Header/Header.css +0 -186
  243. package/lib/layouts/Header/Header.d.ts +0 -4
  244. package/lib/layouts/Header/Header.js +0 -18
  245. package/lib/layouts/Header/Header.js.map +0 -1
  246. package/lib/layouts/Header/Header.types.d.ts +0 -23
  247. package/lib/layouts/Header/Header.types.js +0 -3
  248. package/lib/layouts/Header/Header.types.js.map +0 -1
  249. package/lib/layouts/Header/HeaderProfile.d.ts +0 -5
  250. package/lib/layouts/Header/HeaderProfile.js +0 -43
  251. package/lib/layouts/Header/HeaderProfile.js.map +0 -1
  252. package/lib/layouts/Header/HeaderSearch.d.ts +0 -3
  253. package/lib/layouts/Header/HeaderSearch.js +0 -64
  254. package/lib/layouts/Header/HeaderSearch.js.map +0 -1
  255. package/lib/layouts/Header/__stories__/Header.stories.mdx +0 -71
  256. package/lib/layouts/Navigation/Navigation.css +0 -74
  257. package/lib/layouts/Navigation/Navigation.d.ts +0 -7
  258. package/lib/layouts/Navigation/Navigation.js +0 -35
  259. package/lib/layouts/Navigation/Navigation.js.map +0 -1
  260. package/lib/layouts/Navigation/Navigation.types.d.ts +0 -10
  261. package/lib/layouts/Navigation/Navigation.types.js +0 -3
  262. package/lib/layouts/Navigation/Navigation.types.js.map +0 -1
  263. package/lib/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
  264. package/lib/utils/string.utils.d.ts +0 -1
  265. package/lib/utils/string.utils.js +0 -6
  266. package/lib/utils/string.utils.js.map +0 -1
  267. package/src/components/Button/Button.css +0 -91
  268. package/src/components/Button/Button.tsx +0 -34
  269. package/src/components/Button/__stories__/Button.stories.mdx +0 -74
  270. package/src/components/Checkbox/Checkbox.css +0 -72
  271. package/src/components/Checkbox/Checkbox.tsx +0 -26
  272. package/src/components/Checkbox/Checkbox.types.ts +0 -7
  273. package/src/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  274. package/src/components/Icon/Icon.css +0 -26
  275. package/src/components/Icon/Icon.tsx +0 -13
  276. package/src/components/Icon/Icon.types.ts +0 -1
  277. package/src/components/Icon/__stories__/Icon.stories.mdx +0 -89
  278. package/src/components/Icon/icons/add-circle.svg +0 -1
  279. package/src/components/Icon/icons/add.svg +0 -1
  280. package/src/components/Icon/icons/alert-circle-filled.svg +0 -1
  281. package/src/components/Icon/icons/alert-circle.svg +0 -1
  282. package/src/components/Icon/icons/alert-triangle-filled.svg +0 -1
  283. package/src/components/Icon/icons/alert-triangle.svg +0 -1
  284. package/src/components/Icon/icons/arrow-diagonal-collapse.svg +0 -1
  285. package/src/components/Icon/icons/arrow-diagonal-expand.svg +0 -1
  286. package/src/components/Icon/icons/arrow-down.svg +0 -1
  287. package/src/components/Icon/icons/arrow-go-back.svg +0 -1
  288. package/src/components/Icon/icons/arrow-left-right.svg +0 -1
  289. package/src/components/Icon/icons/arrow-left.svg +0 -1
  290. package/src/components/Icon/icons/arrow-right.svg +0 -1
  291. package/src/components/Icon/icons/arrow-up-down.svg +0 -1
  292. package/src/components/Icon/icons/arrow-up.svg +0 -1
  293. package/src/components/Icon/icons/award.svg +0 -1
  294. package/src/components/Icon/icons/check-circle-filled.svg +0 -1
  295. package/src/components/Icon/icons/check-circle-timer.svg +0 -7
  296. package/src/components/Icon/icons/check-circle.svg +0 -1
  297. package/src/components/Icon/icons/check-square-filled.svg +0 -1
  298. package/src/components/Icon/icons/check-square.svg +0 -1
  299. package/src/components/Icon/icons/check.svg +0 -1
  300. package/src/components/Icon/icons/chevron-down.svg +0 -1
  301. package/src/components/Icon/icons/chevron-left.svg +0 -1
  302. package/src/components/Icon/icons/chevron-right.svg +0 -1
  303. package/src/components/Icon/icons/chevron-up.svg +0 -1
  304. package/src/components/Icon/icons/circle.svg +0 -1
  305. package/src/components/Icon/icons/close-circle.svg +0 -1
  306. package/src/components/Icon/icons/close.svg +0 -1
  307. package/src/components/Icon/icons/currency-euro.svg +0 -1
  308. package/src/components/Icon/icons/download.svg +0 -1
  309. package/src/components/Icon/icons/edit.svg +0 -1
  310. package/src/components/Icon/icons/external-link.svg +0 -1
  311. package/src/components/Icon/icons/filter-off.svg +0 -1
  312. package/src/components/Icon/icons/filter.svg +0 -1
  313. package/src/components/Icon/icons/flashlight-off.svg +0 -1
  314. package/src/components/Icon/icons/flashlight.svg +0 -1
  315. package/src/components/Icon/icons/header-bikestudio.svg +0 -32
  316. package/src/components/Icon/icons/header-nsc-helmet.svg +0 -32
  317. package/src/components/Icon/icons/header-opticost.svg +0 -32
  318. package/src/components/Icon/icons/header-repairability.svg +0 -32
  319. package/src/components/Icon/icons/heart-filled.svg +0 -1
  320. package/src/components/Icon/icons/heart.svg +0 -1
  321. package/src/components/Icon/icons/history.svg +0 -1
  322. package/src/components/Icon/icons/home.svg +0 -1
  323. package/src/components/Icon/icons/index.ts +0 -58
  324. package/src/components/Icon/icons/link.svg +0 -1
  325. package/src/components/Icon/icons/list-settings.svg +0 -1
  326. package/src/components/Icon/icons/lock.svg +0 -1
  327. package/src/components/Icon/icons/loop-right.svg +0 -1
  328. package/src/components/Icon/icons/question-circle.svg +0 -1
  329. package/src/components/Icon/icons/save.svg +0 -1
  330. package/src/components/Icon/icons/search.svg +0 -1
  331. package/src/components/Icon/icons/seedling-circle.svg +0 -12
  332. package/src/components/Icon/icons/square.svg +0 -1
  333. package/src/components/Icon/icons/tools.svg +0 -1
  334. package/src/components/Icon/icons/user.svg +0 -1
  335. package/src/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  336. package/src/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  337. package/src/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  338. package/src/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  339. package/src/components/Inputs/Input/Input.css +0 -97
  340. package/src/components/Inputs/Input/Input.tsx +0 -67
  341. package/src/components/Inputs/Input/Input.types.ts +0 -15
  342. package/src/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  343. package/src/components/Loader/Loader.css +0 -42
  344. package/src/components/Loader/Loader.tsx +0 -7
  345. package/src/components/Loader/Loader.types.ts +0 -1
  346. package/src/components/Loader/__stories__/Loader.stories.mdx +0 -30
  347. package/src/components/Select/Select.css +0 -30
  348. package/src/components/Select/Select.tsx +0 -21
  349. package/src/components/Select/Select.types.ts +0 -3
  350. package/src/components/Select/__stories__/Select.stories.mdx +0 -44
  351. package/src/layouts/Header/Header.css +0 -186
  352. package/src/layouts/Header/Header.tsx +0 -20
  353. package/src/layouts/Header/HeaderProfile.tsx +0 -56
  354. package/src/layouts/Navigation/Navigation.tsx +0 -54
  355. package/src/layouts/Navigation/Navigation.types.ts +0 -4
  356. package/src/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
  357. /package/{esm/components/Icon → src/components/TsIcon}/icons/add-circle.svg +0 -0
  358. /package/{esm/components/Icon → src/components/TsIcon}/icons/add.svg +0 -0
  359. /package/{esm/components/Icon → src/components/TsIcon}/icons/alert-circle-filled.svg +0 -0
  360. /package/{esm/components/Icon → src/components/TsIcon}/icons/alert-circle.svg +0 -0
  361. /package/{esm/components/Icon → src/components/TsIcon}/icons/alert-triangle-filled.svg +0 -0
  362. /package/{esm/components/Icon → src/components/TsIcon}/icons/alert-triangle.svg +0 -0
  363. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-diagonal-collapse.svg +0 -0
  364. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-diagonal-expand.svg +0 -0
  365. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-down.svg +0 -0
  366. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-go-back.svg +0 -0
  367. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-left-right.svg +0 -0
  368. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-left.svg +0 -0
  369. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-right.svg +0 -0
  370. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-up-down.svg +0 -0
  371. /package/{esm/components/Icon → src/components/TsIcon}/icons/arrow-up.svg +0 -0
  372. /package/{esm/components/Icon → src/components/TsIcon}/icons/award.svg +0 -0
  373. /package/{esm/components/Icon → src/components/TsIcon}/icons/check-circle-filled.svg +0 -0
  374. /package/{esm/components/Icon → src/components/TsIcon}/icons/check-circle-timer.svg +0 -0
  375. /package/{esm/components/Icon → src/components/TsIcon}/icons/check-circle.svg +0 -0
  376. /package/{esm/components/Icon → src/components/TsIcon}/icons/check-square-filled.svg +0 -0
  377. /package/{esm/components/Icon → src/components/TsIcon}/icons/check-square.svg +0 -0
  378. /package/{esm/components/Icon → src/components/TsIcon}/icons/check.svg +0 -0
  379. /package/{esm/components/Icon → src/components/TsIcon}/icons/chevron-down.svg +0 -0
  380. /package/{esm/components/Icon → src/components/TsIcon}/icons/chevron-left.svg +0 -0
  381. /package/{esm/components/Icon → src/components/TsIcon}/icons/chevron-right.svg +0 -0
  382. /package/{esm/components/Icon → src/components/TsIcon}/icons/chevron-up.svg +0 -0
  383. /package/{esm/components/Icon → src/components/TsIcon}/icons/circle.svg +0 -0
  384. /package/{esm/components/Icon → src/components/TsIcon}/icons/close-circle.svg +0 -0
  385. /package/{esm/components/Icon → src/components/TsIcon}/icons/close.svg +0 -0
  386. /package/{esm/components/Icon → src/components/TsIcon}/icons/currency-euro.svg +0 -0
  387. /package/{esm/components/Icon → src/components/TsIcon}/icons/download.svg +0 -0
  388. /package/{esm/components/Icon → src/components/TsIcon}/icons/edit.svg +0 -0
  389. /package/{esm/components/Icon → src/components/TsIcon}/icons/external-link.svg +0 -0
  390. /package/{esm/components/Icon → src/components/TsIcon}/icons/filter-off.svg +0 -0
  391. /package/{esm/components/Icon → src/components/TsIcon}/icons/filter.svg +0 -0
  392. /package/{esm/components/Icon → src/components/TsIcon}/icons/flashlight-off.svg +0 -0
  393. /package/{esm/components/Icon → src/components/TsIcon}/icons/flashlight.svg +0 -0
  394. /package/{esm/components/Icon → src/components/TsIcon}/icons/header-bikestudio.svg +0 -0
  395. /package/{esm/components/Icon → src/components/TsIcon}/icons/header-nsc-helmet.svg +0 -0
  396. /package/{esm/components/Icon → src/components/TsIcon}/icons/header-opticost.svg +0 -0
  397. /package/{esm/components/Icon → src/components/TsIcon}/icons/header-repairability.svg +0 -0
  398. /package/{esm/components/Icon → src/components/TsIcon}/icons/heart-filled.svg +0 -0
  399. /package/{esm/components/Icon → src/components/TsIcon}/icons/heart.svg +0 -0
  400. /package/{esm/components/Icon → src/components/TsIcon}/icons/history.svg +0 -0
  401. /package/{esm/components/Icon → src/components/TsIcon}/icons/home.svg +0 -0
  402. /package/{esm/components/Icon → src/components/TsIcon}/icons/index.ts +0 -0
  403. /package/{esm/components/Icon → src/components/TsIcon}/icons/link.svg +0 -0
  404. /package/{esm/components/Icon → src/components/TsIcon}/icons/list-settings.svg +0 -0
  405. /package/{esm/components/Icon → src/components/TsIcon}/icons/lock.svg +0 -0
  406. /package/{esm/components/Icon → src/components/TsIcon}/icons/loop-right.svg +0 -0
  407. /package/{esm/components/Icon → src/components/TsIcon}/icons/question-circle.svg +0 -0
  408. /package/{esm/components/Icon → src/components/TsIcon}/icons/save.svg +0 -0
  409. /package/{esm/components/Icon → src/components/TsIcon}/icons/search.svg +0 -0
  410. /package/{esm/components/Icon → src/components/TsIcon}/icons/seedling-circle.svg +0 -0
  411. /package/{esm/components/Icon → src/components/TsIcon}/icons/square.svg +0 -0
  412. /package/{esm/components/Icon → src/components/TsIcon}/icons/tools.svg +0 -0
  413. /package/{esm/components/Icon → src/components/TsIcon}/icons/user.svg +0 -0
@@ -1,15 +0,0 @@
1
- import { InputHTMLAttributes } from 'react';
2
-
3
- export type InputProps = {
4
- errorLabel?: string;
5
- icon?: string;
6
- label?: string;
7
- size?: 'md' | 'lg';
8
- type?: 'text' | 'number';
9
- value: string;
10
- variant?: 'primary' | 'shadow';
11
- disabled?: boolean;
12
- resetable?: boolean;
13
- rounded?: boolean;
14
- onChange: (value: string) => void;
15
- } & Omit<Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>, 'size'>;
@@ -1,95 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Input } from '../Input';
4
- import { icons } from '../../../Icon/icons';
5
-
6
- <Meta title="Components/Inputs/Input" />
7
-
8
- export const inputArgTypes = {
9
- errorLabel: { control: 'text', description: 'Show error on the input.' },
10
- icon: {
11
- control: 'select',
12
- options: Object.keys(icons),
13
- description: 'Name of an icon.',
14
- },
15
- label: {
16
- control: 'text',
17
- description: 'Label of the input.',
18
- },
19
- placeholder: {
20
- control: 'text',
21
- description: 'Placeholder displayed when the input is empty.',
22
- },
23
- size: {
24
- control: 'inline-radio',
25
- options: ['md', 'lg'],
26
- description: 'Define the size of the input.',
27
- table: { defaultValue: { summary: 'md' } },
28
- },
29
- type: {
30
- control: 'inline-radio',
31
- options: ['text', 'number'],
32
- description: 'Type of the input.',
33
- table: { defaultValue: { summary: 'text' } },
34
- },
35
- value: {
36
- control: 'text',
37
- description: 'Value of the input.',
38
- },
39
- variant: {
40
- control: 'inline-radio',
41
- options: ['primary', 'shadow'],
42
- description: 'Variant of the input.',
43
- table: { defaultValue: { summary: 'primary' } },
44
- },
45
- disabled: {
46
- control: 'boolean',
47
- description: 'Disabled the input',
48
- table: { defaultValue: { summary: 'false' } },
49
- },
50
- resetable: {
51
- control: 'boolean',
52
- description: 'Reset the input value',
53
- table: { defaultValue: { summary: 'false' } },
54
- },
55
- rounded: {
56
- control: 'boolean',
57
- description: 'Rounded the input',
58
- table: { defaultValue: { summary: 'false' } },
59
- },
60
- onChange: {
61
- control: 'function',
62
- description: 'The handler called when the value of the input changes.',
63
- },
64
- };
65
-
66
- # Text Input
67
-
68
- Text input allows the user to enter content and data when the expected user input is a single line of text.
69
-
70
- ## Overview
71
-
72
- <Canvas>
73
- <Story
74
- name="Overview"
75
- args={{
76
- errorLabel: '',
77
- label: 'Label',
78
- placeholder: 'This is a placeholder',
79
- size: 'md',
80
- type: 'text',
81
- value: '',
82
- variant: 'primary',
83
- disabled: false,
84
- resetable: false,
85
- rounded: false,
86
- }}
87
- argTypes={inputArgTypes}
88
- >
89
- {args => <Input type="number" {...args} />}
90
- </Story>
91
- </Canvas>
92
-
93
- ## Props
94
-
95
- <ArgsTable story="Overview" of={Input} />
@@ -1,42 +0,0 @@
1
- @keyframes rotation {
2
- 0% {
3
- transform: rotate(0deg);
4
- }
5
- 100% {
6
- transform: rotate(360deg);
7
- }
8
- }
9
-
10
- .loader {
11
- border: 2px solid;
12
- border-color: #00689d transparent;
13
- border-radius: 50%;
14
- display: inline-block;
15
- box-sizing: border-box;
16
- animation: rotation 1.5s linear infinite;
17
- }
18
-
19
- /* ####### */
20
- /* SIZES */
21
- .loader--sm {
22
- width: 24px;
23
- height: 24px;
24
- }
25
- .loader--md {
26
- width: 32px;
27
- height: 32px;
28
- }
29
- .loader--lg {
30
- width: 44px;
31
- height: 44px;
32
- }
33
-
34
- /* ######### */
35
- /* GLOBALS */
36
- * {
37
- font-size: 14px;
38
- outline: none;
39
- box-sizing: border-box;
40
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
41
- 'Helvetica Neue', sans-serif;
42
- }
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { LoaderProps } from './Loader.types';
3
- import './Loader.css';
4
- export declare const Loader: ({ size }: LoaderProps) => React.JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import './Loader.css';
3
- export const Loader = ({ size = 'md' }) => {
4
- return React.createElement("div", { className: `loader loader--${size}` });
5
- };
6
- //# sourceMappingURL=Loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader.js","sourceRoot":"","sources":["../../../src/components/Loader/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,EAAe,EAAE,EAAE;IACrD,OAAO,6BAAK,SAAS,EAAE,kBAAkB,IAAI,EAAE,GAAI,CAAC;AACtD,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export type LoaderProps = {
2
- size?: 'sm' | 'md' | 'lg';
3
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Loader.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader.types.js","sourceRoot":"","sources":["../../../src/components/Loader/Loader.types.ts"],"names":[],"mappings":""}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Loader } from '../Loader';
4
-
5
- <Meta title="Components/Loader" />
6
-
7
- export const loaderArgTypes = {
8
- size: {
9
- control: 'inline-radio',
10
- options: ['sm', 'md', 'lg'],
11
- description: 'Define the size of the loader.',
12
- table: { defaultValue: { summary: 'md' } },
13
- },
14
- };
15
-
16
- # Loader
17
-
18
- Loader express to user that an action is occuring.
19
-
20
- ## Overview
21
-
22
- <Canvas>
23
- <Story name="Overview" args={{ size: 'md' }} argTypes={loaderArgTypes}>
24
- {args => <Loader {...args}>{args.children}</Loader>}
25
- </Story>
26
- </Canvas>
27
-
28
- ## Props
29
-
30
- <ArgsTable story="Overview" of={Loader} />
@@ -1,30 +0,0 @@
1
- .select-container {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
- .select-container > label {
6
- display: block;
7
- margin-bottom: 4px;
8
- color: #012b49;
9
- font-weight: 700;
10
- }
11
- .select-container > select {
12
- width: 100%;
13
- height: 32px;
14
- padding: 0 40px 0 12px;
15
- border: 1px solid #d4d4d4;
16
- border-radius: 6px;
17
- color: #007dbc;
18
- font-weight: 700;
19
- cursor: pointer;
20
- }
21
-
22
- /* ######### */
23
- /* GLOBALS */
24
- * {
25
- font-size: 14px;
26
- outline: none;
27
- box-sizing: border-box;
28
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
29
- 'Helvetica Neue', sans-serif;
30
- }
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { SelectProps } from './Select.types';
3
- import './Select.css';
4
- export declare const Select: ({ label, value, options, onChange }: SelectProps) => React.JSX.Element;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { cloneElement } from 'react';
3
- import './Select.css';
4
- export const Select = ({ label, value, options, onChange }) => {
5
- // ########
6
- // Handlers
7
- const handleChange = (e) => onChange(e.target.value);
8
- // #########
9
- // Rendering
10
- return (React.createElement("div", { className: "select-container" },
11
- label && React.createElement("label", null, label),
12
- React.createElement("select", { value: value, onChange: handleChange }, options.map((option, index) => cloneElement(option, { key: index, ...option.props })))));
13
- };
14
- //# sourceMappingURL=Select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAe,EAAE,EAAE;IACzE,WAAW;IACX,WAAW;IACX,MAAM,YAAY,GAAG,CAAC,CAAiC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAErF,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,kBAAkB;QAC9B,KAAK,IAAI,mCAAQ,KAAK,CAAS;QAChC,gCAAQ,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,IACzC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAC/E,CACL,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export type SelectProps = {
3
- label?: string;
4
- value: string;
5
- options: ReactElement[];
6
- onChange: (val: string) => void;
7
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Select.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.types.js","sourceRoot":"","sources":["../../../src/components/Select/Select.types.ts"],"names":[],"mappings":""}
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Select } from '../Select';
4
-
5
- <Meta title="Components/Select" />
6
-
7
- export const selectArgTypes = {
8
- label: {
9
- control: 'text',
10
- description: 'Label of the select.',
11
- },
12
- value: {
13
- control: 'text',
14
- description: 'Value of the select.',
15
- },
16
- onChange: {
17
- control: 'function',
18
- description: 'The handler called when the value of the select changes.',
19
- },
20
- };
21
-
22
- # Loader
23
-
24
- Loader express to user that an action is occuring.
25
-
26
- ## Overview
27
-
28
- <Canvas>
29
- <Story
30
- name="Overview"
31
- args={{
32
- label: 'Label',
33
- options: [<option value="orange">Orange</option>, <option value="apple">Apple</option>],
34
- onChange: () => {},
35
- }}
36
- argTypes={selectArgTypes}
37
- >
38
- {args => <Select {...args} />}
39
- </Story>
40
- </Canvas>
41
-
42
- ## Props
43
-
44
- <ArgsTable story="Overview" of={Select} />
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const useClickOutside: (callback: () => void) => import("react").RefObject<HTMLDivElement>;
@@ -1,14 +0,0 @@
1
- import { useEffect, useRef } from 'react';
2
- export const useClickOutside = (callback) => {
3
- const ref = useRef(null);
4
- const handleClickOutside = (event) => {
5
- if (ref.current && !ref.current.contains(event.target))
6
- callback();
7
- };
8
- useEffect(() => {
9
- document.addEventListener('click', handleClickOutside);
10
- return () => document.removeEventListener('click', handleClickOutside);
11
- }, []);
12
- return ref;
13
- };
14
- //# sourceMappingURL=use-click-outside.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-click-outside.js","sourceRoot":"","sources":["../../src/hooks/use-click-outside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAoB,EAAE,EAAE;IACtD,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzC,MAAM,kBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;QAC/C,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC;YAAE,QAAQ,EAAE,CAAC;IAC7E,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;QACvD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IACzE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
package/esm/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './components/Button/Button';
2
- export * from './components/Checkbox/Checkbox';
3
- export * from './components/Icon/Icon';
4
- export * from './components/Inputs/BooleanInput/BooleanInput';
5
- export * from './components/Inputs/Input/Input';
6
- export * from './components/Loader/Loader';
7
- export * from './components/Select/Select';
8
- export * from './layouts/Header/Header';
9
- export * from './layouts/Header/HeaderProfile';
10
- export * from './layouts/Header/HeaderSearch';
11
- export * from './layouts/Navigation/Navigation';
package/esm/index.js DELETED
@@ -1,12 +0,0 @@
1
- export * from './components/Button/Button';
2
- export * from './components/Checkbox/Checkbox';
3
- export * from './components/Icon/Icon';
4
- export * from './components/Inputs/BooleanInput/BooleanInput';
5
- export * from './components/Inputs/Input/Input';
6
- export * from './components/Loader/Loader';
7
- export * from './components/Select/Select';
8
- export * from './layouts/Header/Header';
9
- export * from './layouts/Header/HeaderProfile';
10
- export * from './layouts/Header/HeaderSearch';
11
- export * from './layouts/Navigation/Navigation';
12
- //# sourceMappingURL=index.js.map
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { HeaderProps } from './Header.types';
3
- import './Header.css';
4
- export declare const Header: ({ actions, appName, search }: HeaderProps) => React.JSX.Element;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { icons } from '../../components/Icon/icons';
3
- import './Header.css';
4
- export const Header = ({ actions, appName, search }) => {
5
- // #########
6
- // Rendering
7
- return (React.createElement("header", null,
8
- React.createElement("div", { className: "header-aside" },
9
- React.createElement("div", { className: "header-techoff", dangerouslySetInnerHTML: { __html: icons[`header-${appName}`] } })),
10
- search && React.createElement("div", { className: "header-search-bar" }, search),
11
- React.createElement("div", { className: "header-aside header-right-side" },
12
- React.createElement("div", { className: "header-actions" }, actions))));
13
- };
14
- //# sourceMappingURL=Header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/layouts/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAe,EAAE,EAAE;IAClE,YAAY;IACZ,YAAY;IACZ,OAAO,CACL;QACE,6BAAK,SAAS,EAAC,cAAc;YAC3B,6BAAK,SAAS,EAAC,gBAAgB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,EAAE,GAAI,CAC/F;QACL,MAAM,IAAI,6BAAK,SAAS,EAAC,mBAAmB,IAAE,MAAM,CAAO;QAC5D,6BAAK,SAAS,EAAC,gCAAgC;YAC7C,6BAAK,SAAS,EAAC,gBAAgB,IAAE,OAAO,CAAO,CAC3C,CACC,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export type HeaderProps = {
3
- actions: ReactElement;
4
- appName: 'bikestudio' | 'nsc-helmet' | 'opticost' | 'repairability';
5
- search?: ReactElement;
6
- };
7
- export type HeaderProfileItemProps = {
8
- icon: string;
9
- label: string;
10
- link: string;
11
- };
12
- export type HeaderProfileProps = {
13
- firstname: string;
14
- lastname: string;
15
- };
16
- export type HeaderSearchProps = {
17
- getItemLabel: (e: any) => string;
18
- getItemValue: (e: any) => string;
19
- loadItems: (search?: string) => Promise<any[]>;
20
- noDataLabel?: string;
21
- placeholder?: string;
22
- onChange: (value: string) => void;
23
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Header.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.types.js","sourceRoot":"","sources":["../../../src/layouts/Header/Header.types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { PropsWithChildren } from 'react';
3
- import { HeaderProfileItemProps, HeaderProfileProps } from './Header.types';
4
- export declare const HeaderProfileItem: ({ icon, label, link }: HeaderProfileItemProps) => React.JSX.Element;
5
- export declare const HeaderProfile: ({ children, firstname, lastname }: HeaderProfileProps & PropsWithChildren) => React.JSX.Element;
@@ -1,38 +0,0 @@
1
- import * as React from 'react';
2
- import { useState } from 'react';
3
- import { Icon } from '../../components/Icon/Icon';
4
- import { useClickOutside } from '../../hooks/use-click-outside';
5
- import { capitalize } from '../../utils/string.utils';
6
- export const HeaderProfileItem = ({ icon, label, link }) => {
7
- // ########
8
- // Handlers
9
- const handleNavigate = () => window.open(link, '_blank', 'noreferrer');
10
- // #########
11
- // Rendering
12
- return (React.createElement("div", { className: "header-profile-menu-item", onClick: handleNavigate },
13
- React.createElement("div", { className: "header-profile-menu-item-icon" },
14
- React.createElement(Icon, { name: icon, size: "16" })),
15
- React.createElement("div", { className: "header-profile-menu-item-label" }, label),
16
- React.createElement("div", { className: "header-profile-menu-item-icon" },
17
- React.createElement(Icon, { name: "external-link", size: "16" }))));
18
- };
19
- export const HeaderProfile = ({ children, firstname, lastname }) => {
20
- const [isOpen, setIsOpen] = useState(false);
21
- const ref = useClickOutside(() => setIsOpen(false));
22
- // #########
23
- // Rendering
24
- return (React.createElement("div", { className: "header-profile-container", ref: ref },
25
- React.createElement("div", { className: "header-profile-dropdown", onClick: () => children && setIsOpen(prev => !prev) },
26
- React.createElement("div", { className: "header-profile-img-container" },
27
- React.createElement("div", { className: "header-profile-img-icon" },
28
- React.createElement(Icon, { name: "user", size: "16" }))),
29
- React.createElement("div", { className: "header-profile-name" },
30
- capitalize(firstname),
31
- " ",
32
- lastname.charAt(0).toUpperCase(),
33
- "."),
34
- children && (React.createElement("div", { className: "header-profile-chevron" },
35
- React.createElement(Icon, { name: isOpen ? 'chevron-up' : 'chevron-down', size: "16" })))),
36
- isOpen && React.createElement("div", { className: "header-profile-menu" }, children)));
37
- };
38
- //# sourceMappingURL=HeaderProfile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderProfile.js","sourceRoot":"","sources":["../../../src/layouts/Header/HeaderProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAA0B,EAAE,EAAE;IACjF,WAAW;IACX,WAAW;IACX,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAEvE,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,0BAA0B,EAAC,OAAO,EAAE,cAAc;QAC/D,6BAAK,SAAS,EAAC,+BAA+B;YAC5C,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,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C,qBAAqB,IAAE,QAAQ,CAAO,CAC5D,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { HeaderSearchProps } from './Header.types';
3
- export declare const HeaderSearch: ({ getItemLabel, getItemValue, loadItems, noDataLabel, placeholder, onChange, }: HeaderSearchProps) => React.JSX.Element;
@@ -1,60 +0,0 @@
1
- import * as React from 'react';
2
- import { useEffect, useState } from 'react';
3
- import { Input } from '../../components/Inputs/Input/Input';
4
- import { Loader } from '../../components/Loader/Loader';
5
- import { useClickOutside } from '../../hooks/use-click-outside';
6
- export const HeaderSearch = ({ getItemLabel, getItemValue, loadItems, noDataLabel, placeholder, onChange, }) => {
7
- const [searchValue, setSearchValue] = useState('');
8
- const [items, setItems] = useState([]);
9
- const [isLoading, setIsLoading] = useState(false);
10
- const [showItems, setShowItems] = useState(false);
11
- const ref = useClickOutside(() => setShowItems(false));
12
- // #######
13
- // Helpers
14
- const getBeforeMatch = (item) => {
15
- const label = getItemLabel(item);
16
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
17
- return label.substring(0, matchStartIndex);
18
- };
19
- const getMatch = (item) => {
20
- const label = getItemLabel(item);
21
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
22
- const matchEndIndex = matchStartIndex + searchValue.length;
23
- return label.substring(matchStartIndex, matchEndIndex);
24
- };
25
- const getAfterMatch = (item) => {
26
- const label = getItemLabel(item);
27
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
28
- const matchEndIndex = matchStartIndex + searchValue.length;
29
- return label.substring(matchEndIndex);
30
- };
31
- // ########
32
- // Watchers
33
- useEffect(() => {
34
- if (searchValue === '') {
35
- setShowItems(false);
36
- setItems([]);
37
- setIsLoading(false);
38
- }
39
- else {
40
- setShowItems(true);
41
- setIsLoading(true);
42
- loadItems(searchValue)
43
- .then(setItems)
44
- .finally(() => setIsLoading(false));
45
- }
46
- }, [searchValue]);
47
- // #########
48
- // Rendering
49
- return (React.createElement("div", { className: "header-search", ref: ref },
50
- React.createElement(Input, { placeholder: placeholder, icon: "search", size: "lg", value: searchValue, variant: "shadow", resetable: true, rounded: true, onChange: setSearchValue, onFocus: () => setShowItems(true) }),
51
- showItems && searchValue !== '' && (React.createElement("div", { className: "header-search-items-container" },
52
- isLoading && (React.createElement("div", { className: "header-search-loading" },
53
- React.createElement(Loader, { size: "sm" }))),
54
- !isLoading && items.length === 0 && React.createElement("div", { className: "header-search-no-items" }, noDataLabel),
55
- !isLoading && items.length > 0 && (React.createElement("div", { className: "header-search-items" }, items.map(item => (React.createElement("div", { className: "header-search-item", onClick: () => onChange(getItemValue(item)) },
56
- getBeforeMatch(item),
57
- React.createElement("span", { className: "header-search-item--match" }, getMatch(item)),
58
- getAfterMatch(item))))))))));
59
- };
60
- //# sourceMappingURL=HeaderSearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderSearch.js","sourceRoot":"","sources":["../../../src/layouts/Header/HeaderSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;IAC9C,MAAM,CAAC,SAAS,EAAE,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,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAC,oBAAoB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC5E,cAAc,CAAC,IAAI,CAAC;gBACrB,8BAAM,SAAS,EAAC,2BAA2B,IAAE,QAAQ,CAAC,IAAI,CAAC,CAAQ;gBAClE,aAAa,CAAC,IAAI,CAAC,CAChB,CACP,CAAC,CACE,CACP,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,71 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Header } from '../Header';
4
- import { HeaderProfile, HeaderProfileItem } from '../HeaderProfile';
5
- import { HeaderSearch } from '../HeaderSearch';
6
- import { Button } from '../../../components/Button/Button';
7
-
8
- <Meta title="Layouts/Header" />
9
-
10
- export const headerArgTypes = {
11
- appName: {
12
- control: 'select',
13
- options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability'],
14
- description: 'Icon of the button.',
15
- },
16
- };
17
-
18
- export const loadItems = () => {
19
- return Promise.resolve([
20
- { id: 1, label: 'Item 1' },
21
- { id: 2, label: 'Item 2' },
22
- { id: 3, label: 'Item 3' },
23
- { id: 4, label: 'Item 4' },
24
- { id: 5, label: 'Item 5' },
25
- { id: 6, label: 'Item 6' },
26
- { id: 7, label: 'Item 7' },
27
- { id: 8, label: 'Item 8' },
28
- { id: 9, label: 'Item 9' },
29
- ]);
30
- };
31
-
32
- # Header
33
-
34
- The header will allow users to quickly find the information they need at a glance but also make some actions. The header is therefore central in the design of each application: it contains all the essential information, obvious shortcuts, which will help boost Deacthlon Techoff brand image.
35
-
36
- ## Overview
37
-
38
- <Canvas>
39
- <Story
40
- name="Overview"
41
- args={{
42
- actions: (
43
- <>
44
- <Button icon="add" size="lg" variant="shadow" rounded />
45
- <HeaderProfile firstname="John" lastname="Doe">
46
- <HeaderProfileItem icon="alert-triangle" label="Contact support" link="" />
47
- <HeaderProfileItem icon="award" label="Trainings" link="" />
48
- </HeaderProfile>
49
- </>
50
- ),
51
- appName: 'repairability',
52
- search: (
53
- <HeaderSearch
54
- getItemLabel={item => item.label}
55
- getItemValue={item => item.id}
56
- loadItems={loadItems}
57
- noDataLabel="No item found."
58
- placeholder="Search something in the application"
59
- onChange={() => {}}
60
- />
61
- ),
62
- }}
63
- argTypes={headerArgTypes}
64
- >
65
- {args => <Header {...args} />}
66
- </Story>
67
- </Canvas>
68
-
69
- ## Props
70
-
71
- <ArgsTable story="Overview" of={Header} />