@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dktunited-techoff/techoff-suite-ui",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib",
6
6
  "module": "esm/index.js",
@@ -1,4 +1,4 @@
1
- .button {
1
+ .ts-button {
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -9,74 +9,74 @@
9
9
  cursor: pointer;
10
10
  transition: all ease 0.3s;
11
11
  }
12
- .button > div {
12
+ .ts-button > div {
13
13
  margin-right: 8px;
14
14
  }
15
- .button > div:last-child {
15
+ .ts-button > div:last-child {
16
16
  margin-right: 0px;
17
17
  }
18
18
  /* ####### */
19
19
  /* BLOCK */
20
- .button--block {
20
+ .ts-button--block {
21
21
  width: 100%;
22
22
  }
23
23
  /* ####### */
24
24
  /* SIZES */
25
- .button--md {
25
+ .ts-button--md {
26
26
  height: 32px;
27
27
  padding: 0 14px;
28
28
  }
29
- .button--md.button--icon-only {
29
+ .ts-button--md.ts-button--icon-only {
30
30
  width: 32px;
31
31
  padding: 0;
32
32
  }
33
- .button--lg {
33
+ .ts-button--lg {
34
34
  height: 40px;
35
35
  padding: 0 16px;
36
36
  }
37
- .button--lg.button--icon-only {
37
+ .ts-button--lg.ts-button--icon-only {
38
38
  width: 40px;
39
39
  padding: 0;
40
40
  }
41
41
  /* ########## */
42
42
  /* VARIANTS */
43
- .button--primary {
43
+ .ts-button--primary {
44
44
  background: #3643ba;
45
45
  color: #ffffff;
46
46
  }
47
- /* .button--primary:hover {
47
+ /* .ts-button--primary:hover {
48
48
  background: #00689d;
49
49
  } */
50
- .button--secondary {
50
+ .ts-button--secondary {
51
51
  background: #ebecf7;
52
52
  color: #3643ba;
53
53
  }
54
- /* .button--secondary:hover {
54
+ /* .ts-button--secondary:hover {
55
55
  background: #bedeef;
56
56
  } */
57
- .button--success {
57
+ .ts-button--success {
58
58
  background: #02be8a;
59
59
  color: #ffffff;
60
60
  }
61
- .button--success:hover {
61
+ .ts-button--success:hover {
62
62
  background: #029e73;
63
63
  color: #ffffff;
64
64
  }
65
- .button--ghost {
65
+ .ts-button--ghost {
66
66
  background: #ffffff;
67
67
  color: #1d1d1b;
68
68
  }
69
- .button--ghost:hover {
69
+ .ts-button--ghost:hover {
70
70
  background: #ebecf7;
71
71
  }
72
- .button--shadow {
72
+ .ts-button--shadow {
73
73
  box-shadow: 0px 12px 12px 0px #00537d1a;
74
74
  background: #ffffff;
75
75
  color: #4e5d6b;
76
76
  }
77
77
  /* ######### */
78
78
  /* ROUNDED */
79
- .button--rounded {
79
+ .ts-button--rounded {
80
80
  border-radius: 9999px;
81
81
  }
82
82
 
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+ import { TsIcon } from '../TsIcon/TsIcon';
4
+ import { TsButtonProps } from './TsButton.types';
5
+ import './TsButton.css';
6
+
7
+ export const TsButton = ({
8
+ children,
9
+ icon,
10
+ iconDirection = 'left',
11
+ size = 'md',
12
+ variant = 'primary',
13
+ block,
14
+ rounded,
15
+ onClick,
16
+ }: PropsWithChildren<TsButtonProps>) => {
17
+ // #########
18
+ // Rendering
19
+ return (
20
+ <button
21
+ className={`
22
+ ts-button ts-button--${size} ts-button--${variant}
23
+ ${block ? 'ts-button--block' : ''}
24
+ ${rounded ? 'ts-button--rounded' : ''}
25
+ ${icon && !children ? 'ts-button--icon-only' : ''}
26
+ `}
27
+ onClick={onClick}
28
+ >
29
+ {icon && iconDirection === 'left' && <TsIcon name={icon} size="16" />}
30
+ {children && <div>{children}</div>}
31
+ {icon && iconDirection === 'right' && <TsIcon name={icon} size="16" />}
32
+ </button>
33
+ );
34
+ };
@@ -1,4 +1,4 @@
1
- export type ButtonProps = {
1
+ export type TsButtonProps = {
2
2
  icon?: string;
3
3
  iconDirection?: 'left' | 'right';
4
4
  size?: 'md' | 'lg';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Button } from '../Button';
4
- import { icons } from '../../Icon/icons';
3
+ import { TsButton } from '../TsButton';
4
+ import { icons } from '../../TsIcon/icons';
5
5
 
6
6
  <Meta title="Components/Button" />
7
7
 
@@ -65,10 +65,10 @@ Buttons express what action will occur when the users clicks. Buttons are used t
65
65
  }}
66
66
  argTypes={buttonArgTypes}
67
67
  >
68
- {args => <Button {...args}>{args.children}</Button>}
68
+ {args => <TsButton {...args}>{args.children}</TsButton>}
69
69
  </Story>
70
70
  </Canvas>
71
71
 
72
72
  ## Props
73
73
 
74
- <ArgsTable story="Overview" of={Button} />
74
+ <ArgsTable story="Overview" of={TsButton} />
@@ -1,16 +1,16 @@
1
- .icon--16 {
1
+ .ts-icon--16 {
2
2
  width: 16px;
3
3
  height: 16px;
4
4
  }
5
- .icon--20 {
5
+ .ts-icon--20 {
6
6
  width: 20px;
7
7
  height: 20px;
8
8
  }
9
- .icon--24 {
9
+ .ts-icon--24 {
10
10
  width: 24px;
11
11
  height: 24px;
12
12
  }
13
- .icon svg {
13
+ .ts-icon svg {
14
14
  width: 100%;
15
15
  height: 100%;
16
16
  }
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { TsIconProps } from './TsIcon.types';
3
+ import { icons } from './icons';
4
+ import './TsIcon.css';
5
+
6
+ export const TsIcon = ({ name, size = '20' }: TsIconProps) => {
7
+ const icon = icons[name];
8
+
9
+ // #########
10
+ // Rendering
11
+ if (!icon) return <></>;
12
+ return <div className={`ts-icon ts-icon--${size}`} dangerouslySetInnerHTML={{ __html: icon }} />;
13
+ };
@@ -0,0 +1 @@
1
+ export type TsIconProps = { name: string; size?: '16' | '20' | '24' };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Icon } from '../Icon';
3
+ import { TsIcon } from '../TsIcon';
4
4
  import { icons } from '../icons';
5
5
 
6
6
  <Meta title="Guidelines/Iconography" />
@@ -65,13 +65,13 @@ Icons are visual symbols used to represent ideas, objects or actions. They commu
65
65
 
66
66
  <Canvas>
67
67
  <Story name="Overview" args={{ name: 'heart', size: '20' }} argTypes={iconArgTypes}>
68
- {args => <Icon {...args} />}
68
+ {args => <TsIcon {...args} />}
69
69
  </Story>
70
70
  </Canvas>
71
71
 
72
72
  ## Props
73
73
 
74
- <ArgsTable story="Overview" of={Icon} />
74
+ <ArgsTable story="Overview" of={TsIcon} />
75
75
 
76
76
  ## Icons
77
77
 
@@ -81,7 +81,7 @@ Icons are visual symbols used to represent ideas, objects or actions. They commu
81
81
  .map(icon => (
82
82
  <div className="icon-container" key={icon}>
83
83
  <div className="icon">
84
- <Icon name={icon} />
84
+ <TsIcon name={icon} />
85
85
  </div>
86
86
  <div className="icon-label">{icon}</div>
87
87
  </div>
@@ -7,9 +7,9 @@
7
7
  }
8
8
  }
9
9
 
10
- .loader {
10
+ .ts-loader {
11
11
  border: 2px solid;
12
- border-color: #00689d transparent;
12
+ border-color: #3643ba transparent;
13
13
  border-radius: 50%;
14
14
  display: inline-block;
15
15
  box-sizing: border-box;
@@ -18,15 +18,15 @@
18
18
 
19
19
  /* ####### */
20
20
  /* SIZES */
21
- .loader--sm {
21
+ .ts-loader--sm {
22
22
  width: 24px;
23
23
  height: 24px;
24
24
  }
25
- .loader--md {
25
+ .ts-loader--md {
26
26
  width: 32px;
27
27
  height: 32px;
28
28
  }
29
- .loader--lg {
29
+ .ts-loader--lg {
30
30
  width: 44px;
31
31
  height: 44px;
32
32
  }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { TsLoaderProps } from './TsLoader.types';
3
+ import './TsLoader.css';
4
+
5
+ export const TsLoader = ({ size = 'md' }: TsLoaderProps) => {
6
+ return <div className={`ts-loader ts-loader--${size}`} />;
7
+ };
@@ -0,0 +1 @@
1
+ export type TsLoaderProps = { size?: 'sm' | 'md' | 'lg' };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Loader } from '../Loader';
3
+ import { TsLoader } from '../TsLoader';
4
4
 
5
5
  <Meta title="Components/Loader" />
6
6
 
@@ -21,10 +21,10 @@ Loader express to user that an action is occuring.
21
21
 
22
22
  <Canvas>
23
23
  <Story name="Overview" args={{ size: 'md' }} argTypes={loaderArgTypes}>
24
- {args => <Loader {...args}>{args.children}</Loader>}
24
+ {args => <TsLoader {...args}>{args.children}</TsLoader>}
25
25
  </Story>
26
26
  </Canvas>
27
27
 
28
28
  ## Props
29
29
 
30
- <ArgsTable story="Overview" of={Loader} />
30
+ <ArgsTable story="Overview" of={TsLoader} />
package/src/index.ts CHANGED
@@ -1,11 +1,6 @@
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';
1
+ export * from './components/TsButton/TsButton';
2
+ export * from './components/TsIcon/TsIcon';
3
+ export * from './components/TsLoader/TsLoader';
4
+ export * from './layouts/TsHeader/TsHeader';
5
+ export * from './layouts/TsHeader/TsHeaderProfile';
6
+ export * from './layouts/TsNavigation/TsNavigation';
@@ -17,31 +17,31 @@ header {
17
17
  height: 64px;
18
18
  padding: 0 24px;
19
19
  }
20
- .header-aside {
20
+ .ts-header-aside {
21
21
  display: flex;
22
22
  align-items: center;
23
23
  flex: 1;
24
24
  height: 100%;
25
25
  }
26
- .header-right-side {
26
+ .ts-header-right-side {
27
27
  justify-content: flex-end;
28
28
  }
29
- .header-search-bar {
29
+ .ts-header-search-bar {
30
30
  display: flex;
31
31
  align-items: center;
32
32
  width: 400px;
33
33
  height: 100%;
34
34
  }
35
- .header-actions {
35
+ .ts-header-actions {
36
36
  display: flex;
37
37
  }
38
- .header-actions > * {
38
+ .ts-header-actions > * {
39
39
  margin-left: 12px;
40
40
  }
41
41
 
42
42
  /* ################ */
43
43
  /* HEADER TECHOFF */
44
- .header-techoff {
44
+ .ts-header-techoff {
45
45
  display: flex;
46
46
  height: 18px;
47
47
  margin-left: 4px;
@@ -49,10 +49,10 @@ header {
49
49
 
50
50
  /* ################ */
51
51
  /* HEADER PROFILE */
52
- .header-profile-container {
52
+ .ts-header-profile-container {
53
53
  position: relative;
54
54
  }
55
- .header-profile-dropdown {
55
+ .ts-header-profile-dropdown {
56
56
  display: flex;
57
57
  height: 40px;
58
58
  border-radius: 9999px;
@@ -61,13 +61,13 @@ header {
61
61
  background-color: #ffffff;
62
62
  cursor: pointer;
63
63
  }
64
- .header-profile-img-container {
64
+ .ts-header-profile-img-container {
65
65
  width: 40px;
66
66
  height: 40px;
67
67
  padding: 4px;
68
68
  border-radius: 9999px;
69
69
  }
70
- .header-profile-img-icon {
70
+ .ts-header-profile-img-icon {
71
71
  display: flex;
72
72
  align-items: center;
73
73
  justify-content: center;
@@ -76,14 +76,14 @@ header {
76
76
  border-radius: 9999px;
77
77
  background-color: rgb(229, 229, 229);
78
78
  }
79
- .header-profile-name {
79
+ .ts-header-profile-name {
80
80
  display: flex;
81
81
  flex: 1;
82
82
  align-items: center;
83
83
  padding-left: 4px;
84
84
  padding-right: 16px;
85
85
  }
86
- .header-profile-chevron {
86
+ .ts-header-profile-chevron {
87
87
  display: flex;
88
88
  align-items: center;
89
89
  justify-content: center;
@@ -91,7 +91,7 @@ header {
91
91
  padding-right: 14px;
92
92
  border-radius: 9999px;
93
93
  }
94
- .header-profile-menu {
94
+ .ts-header-profile-menu {
95
95
  position: absolute;
96
96
  right: 0;
97
97
  top: 48px;
@@ -102,35 +102,35 @@ header {
102
102
  background-color: #ffffff;
103
103
  z-index: 10;
104
104
  }
105
- .header-profile-menu-item {
105
+ .ts-header-profile-menu-item {
106
106
  display: flex;
107
107
  align-items: center;
108
108
  height: 36px;
109
109
  border-radius: 6px;
110
110
  cursor: pointer;
111
111
  }
112
- .header-profile-menu-item:hover {
112
+ .ts-header-profile-menu-item:hover {
113
113
  background-color: #e7f3f9;
114
114
  }
115
- .header-profile-menu-item-icon {
115
+ .ts-header-profile-menu-item-icon {
116
116
  display: flex;
117
117
  align-items: center;
118
118
  justify-content: center;
119
119
  width: 36px;
120
120
  height: 36px;
121
121
  }
122
- .header-profile-menu-item-label {
122
+ .ts-header-profile-menu-item-label {
123
123
  flex: 1;
124
124
  padding: 0 2px;
125
125
  }
126
126
 
127
127
  /* ############### */
128
128
  /* HEADER SEARCH */
129
- .header-search {
129
+ .ts-header-search {
130
130
  position: relative;
131
131
  width: 100%;
132
132
  }
133
- .header-search-items-container {
133
+ .ts-header-search-items-container {
134
134
  position: absolute;
135
135
  top: calc(100% + 4px);
136
136
  width: 100%;
@@ -141,13 +141,13 @@ header {
141
141
  overflow-y: auto;
142
142
  z-index: 100;
143
143
  }
144
- .header-search-loading {
144
+ .ts-header-search-loading {
145
145
  display: flex;
146
146
  align-items: center;
147
147
  justify-content: center;
148
148
  height: 40px;
149
149
  }
150
- .header-search-no-items {
150
+ .ts-header-search-no-items {
151
151
  display: flex;
152
152
  align-items: center;
153
153
  justify-content: center;
@@ -155,10 +155,10 @@ header {
155
155
  color: #8c96a2;
156
156
  font-style: italic;
157
157
  }
158
- .header-search-items {
158
+ .ts-header-search-items {
159
159
  padding: 8px;
160
160
  }
161
- .header-search-item {
161
+ .ts-header-search-item {
162
162
  display: flex;
163
163
  align-items: center;
164
164
  height: 32px;
@@ -166,10 +166,10 @@ header {
166
166
  border-radius: 4px;
167
167
  cursor: pointer;
168
168
  }
169
- .header-search-item:hover {
169
+ .ts-header-search-item:hover {
170
170
  background: #e7f3f9;
171
171
  }
172
- .header-search-item--match {
172
+ .ts-header-search-item--match {
173
173
  background: #cce5f2;
174
174
  color: #007dbc;
175
175
  font-weight: 700;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { icons } from '../../components/TsIcon/icons';
3
+ import { TsHeaderProps } from './TsHeader.types';
4
+ import './TsHeader.css';
5
+
6
+ export const TsHeader = ({ actions, appName }: TsHeaderProps) => {
7
+ // #########
8
+ // Rendering
9
+ return (
10
+ <header>
11
+ <div className="ts-header-aside">
12
+ <div className="ts-header-techoff" dangerouslySetInnerHTML={{ __html: icons[`header-${appName}`] }} />
13
+ </div>
14
+ {/* {search && <div className="header-search-bar">{search}</div>} */}
15
+ <div className="ts-header-aside ts-header-right-side">
16
+ <div className="ts-header-actions">{actions}</div>
17
+ </div>
18
+ </header>
19
+ );
20
+ };
@@ -1,13 +1,13 @@
1
1
  import { ReactElement } from 'react';
2
2
 
3
- export type HeaderProps = {
3
+ export type TsHeaderProps = {
4
4
  actions: ReactElement;
5
5
  appName: 'bikestudio' | 'nsc-helmet' | 'opticost' | 'repairability';
6
6
  search?: ReactElement;
7
7
  };
8
- export type HeaderProfileItemProps = { icon: string; label: string; link: string };
9
- export type HeaderProfileProps = { firstname: string; lastname: string };
10
- export type HeaderSearchProps = {
8
+ export type TsHeaderProfileItemProps = { icon: string; label: string; link: string };
9
+ export type TsHeaderProfileProps = { firstname: string; lastname: string };
10
+ export type TsHeaderSearchProps = {
11
11
  getItemLabel: (e: any) => string;
12
12
  getItemValue: (e: any) => string;
13
13
  loadItems: (search?: string) => Promise<any[]>;
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import { PropsWithChildren, useState } from 'react';
3
+ import { TsIcon } from '../../components/TsIcon/TsIcon';
4
+ import { useClickOutside } from '../../hooks/use-click-outside';
5
+ import { capitalize } from '../../utils/string.utils';
6
+ import { TsHeaderProfileItemProps, TsHeaderProfileProps } from './TsHeader.types';
7
+
8
+ export const TsHeaderProfileItem = ({ icon, label, link }: TsHeaderProfileItemProps) => {
9
+ // ########
10
+ // Handlers
11
+ const handleNavigate = () => window.open(link, '_blank', 'noreferrer');
12
+
13
+ // #########
14
+ // Rendering
15
+ return (
16
+ <div className="ts-header-profile-menu-item" onClick={handleNavigate}>
17
+ <div className="ts-header-profile-menu-item-icon">
18
+ <TsIcon name={icon} size="16" />
19
+ </div>
20
+ <div className="ts-header-profile-menu-item-label">{label}</div>
21
+ <div className="ts-header-profile-menu-item-icon">
22
+ <TsIcon name="external-link" size="16" />
23
+ </div>
24
+ </div>
25
+ );
26
+ };
27
+
28
+ export const TsHeaderProfile = ({ children, firstname, lastname }: TsHeaderProfileProps & PropsWithChildren) => {
29
+ const [isOpen, setIsOpen] = useState<boolean>(false);
30
+ const ref = useClickOutside(() => setIsOpen(false));
31
+
32
+ // #########
33
+ // Rendering
34
+ return (
35
+ <div className="ts-header-profile-container" ref={ref}>
36
+ <div className="ts-header-profile-dropdown" onClick={() => children && setIsOpen(prev => !prev)}>
37
+ <div className="ts-header-profile-img-container">
38
+ <div className="ts-header-profile-img-icon">
39
+ <TsIcon name="user" size="16" />
40
+ </div>
41
+ </div>
42
+ <div className="ts-header-profile-name">
43
+ {capitalize(firstname)} {lastname.charAt(0).toUpperCase()}.
44
+ </div>
45
+
46
+ {children && (
47
+ <div className="ts-header-profile-chevron">
48
+ <TsIcon name={isOpen ? 'chevron-up' : 'chevron-down'} size="16" />
49
+ </div>
50
+ )}
51
+ </div>
52
+
53
+ {isOpen && <div className="ts-header-profile-menu">{children}</div>}
54
+ </div>
55
+ );
56
+ };
@@ -1,18 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { useEffect, useState } from 'react';
3
- import { Input } from '../../components/Inputs/Input/Input';
4
- import { Loader } from '../../components/Loader/Loader';
3
+ // import { Input } from '../../components/Inputs/Input/Input';
4
+ import { TsLoader } from '../../components/TsLoader/TsLoader';
5
5
  import { useClickOutside } from '../../hooks/use-click-outside';
6
- import { HeaderSearchProps } from './Header.types';
6
+ import { TsHeaderSearchProps } from './TsHeader.types';
7
7
 
8
- export const HeaderSearch = ({
8
+ export const TsHeaderSearch = ({
9
9
  getItemLabel,
10
10
  getItemValue,
11
11
  loadItems,
12
12
  noDataLabel,
13
13
  placeholder,
14
14
  onChange,
15
- }: HeaderSearchProps) => {
15
+ }: TsHeaderSearchProps) => {
16
16
  const [searchValue, setSearchValue] = useState<string>('');
17
17
  const [items, setItems] = useState<any[]>([]);
18
18
  const [isLoading, setIsLoading] = useState<boolean>(false);
@@ -58,8 +58,8 @@ export const HeaderSearch = ({
58
58
  // #########
59
59
  // Rendering
60
60
  return (
61
- <div className="header-search" ref={ref}>
62
- <Input
61
+ <div className="ts-header-search" ref={ref}>
62
+ {/* <Input
63
63
  placeholder={placeholder}
64
64
  icon="search"
65
65
  size="lg"
@@ -69,22 +69,22 @@ export const HeaderSearch = ({
69
69
  rounded
70
70
  onChange={setSearchValue}
71
71
  onFocus={() => setShowItems(true)}
72
- />
72
+ /> */}
73
73
 
74
74
  {showItems && searchValue !== '' && (
75
- <div className="header-search-items-container">
75
+ <div className="ts-header-search-items-container">
76
76
  {isLoading && (
77
- <div className="header-search-loading">
78
- <Loader size="sm" />
77
+ <div className="ts-header-search-loading">
78
+ <TsLoader size="sm" />
79
79
  </div>
80
80
  )}
81
- {!isLoading && items.length === 0 && <div className="header-search-no-items">{noDataLabel}</div>}
81
+ {!isLoading && items.length === 0 && <div className="ts-header-search-no-items">{noDataLabel}</div>}
82
82
  {!isLoading && items.length > 0 && (
83
- <div className="header-search-items">
83
+ <div className="ts-header-search-items">
84
84
  {items.map(item => (
85
- <div className="header-search-item" onClick={() => onChange(getItemValue(item))}>
85
+ <div className="ts-header-search-item" onClick={() => onChange(getItemValue(item))}>
86
86
  {getBeforeMatch(item)}
87
- <span className="header-search-item--match">{getMatch(item)}</span>
87
+ <span className="ts-header-search-item--match">{getMatch(item)}</span>
88
88
  {getAfterMatch(item)}
89
89
  </div>
90
90
  ))}