@dktunited-techoff/techoff-suite-ui 1.7.11 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/package.json +1 -1
  2. package/src/components/{TsDropdown → TsDropdowns/TsDropdown}/TsDropdown.tsx +5 -5
  3. package/{lib/components → src/components/TsDropdowns}/TsDropdown/__stories__/TsDropdown.stories.mdx +1 -1
  4. package/src/components/{TsDropdown/TsDropdown.css → TsDropdowns/TsDropdownFilter/TsDropdownFilter.css} +24 -55
  5. package/src/components/TsDropdowns/TsDropdownFilter/TsDropdownFilter.tsx +104 -0
  6. package/src/components/TsDropdowns/TsDropdownFilter/TsDropdownFilter.types.ts +8 -0
  7. package/{esm/components/TsDropdown → src/components/TsDropdowns/TsDropdownFilter}/__stories__/TsDropdown.stories.mdx +13 -29
  8. package/src/components/TsIcon/icons/header-techoff-suite.svg +32 -0
  9. package/src/components/TsIcon/icons/index.ts +1 -0
  10. package/src/index.ts +2 -1
  11. package/src/layouts/TsHeader/TsHeader.types.ts +1 -1
  12. package/src/layouts/TsHeader/__stories__/TsHeader.stories.mdx +1 -1
  13. package/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
  14. package/esm/assets/fonts/Roboto-Light.ttf +0 -0
  15. package/esm/components/TsButton/TsButton.css +0 -121
  16. package/esm/components/TsButton/TsButton.d.ts +0 -5
  17. package/esm/components/TsButton/TsButton.js +0 -17
  18. package/esm/components/TsButton/TsButton.js.map +0 -1
  19. package/esm/components/TsButton/TsButton.types.d.ts +0 -9
  20. package/esm/components/TsButton/TsButton.types.js +0 -2
  21. package/esm/components/TsButton/TsButton.types.js.map +0 -1
  22. package/esm/components/TsButton/__stories__/TsButton.stories.mdx +0 -84
  23. package/esm/components/TsCheckbox/TsCheckbox.css +0 -64
  24. package/esm/components/TsCheckbox/TsCheckbox.d.ts +0 -4
  25. package/esm/components/TsCheckbox/TsCheckbox.js +0 -17
  26. package/esm/components/TsCheckbox/TsCheckbox.js.map +0 -1
  27. package/esm/components/TsCheckbox/TsCheckbox.types.d.ts +0 -7
  28. package/esm/components/TsCheckbox/TsCheckbox.types.js +0 -2
  29. package/esm/components/TsCheckbox/TsCheckbox.types.js.map +0 -1
  30. package/esm/components/TsCheckbox/__stories__/TsCheckbox.stories.mdx +0 -56
  31. package/esm/components/TsDropdown/TsDropdown.d.ts +0 -4
  32. package/esm/components/TsDropdown/TsDropdown.js +0 -100
  33. package/esm/components/TsDropdown/TsDropdown.js.map +0 -1
  34. package/esm/components/TsDropdown/TsDropdown.types.d.ts +0 -17
  35. package/esm/components/TsDropdown/TsDropdown.types.js +0 -2
  36. package/esm/components/TsDropdown/TsDropdown.types.js.map +0 -1
  37. package/esm/components/TsDropdown/__stories__/fruits.d.ts +0 -4
  38. package/esm/components/TsDropdown/__stories__/fruits.js +0 -48
  39. package/esm/components/TsDropdown/__stories__/fruits.js.map +0 -1
  40. package/esm/components/TsIcon/TsIcon.css +0 -26
  41. package/esm/components/TsIcon/TsIcon.d.ts +0 -4
  42. package/esm/components/TsIcon/TsIcon.js +0 -12
  43. package/esm/components/TsIcon/TsIcon.js.map +0 -1
  44. package/esm/components/TsIcon/TsIcon.types.d.ts +0 -4
  45. package/esm/components/TsIcon/TsIcon.types.js +0 -2
  46. package/esm/components/TsIcon/TsIcon.types.js.map +0 -1
  47. package/esm/components/TsIcon/__stories__/TsIcon.stories.mdx +0 -89
  48. package/esm/components/TsIcon/icons/add-circle.svg +0 -1
  49. package/esm/components/TsIcon/icons/add.svg +0 -1
  50. package/esm/components/TsIcon/icons/alert-circle-filled.svg +0 -1
  51. package/esm/components/TsIcon/icons/alert-circle.svg +0 -1
  52. package/esm/components/TsIcon/icons/alert-triangle-filled.svg +0 -1
  53. package/esm/components/TsIcon/icons/alert-triangle.svg +0 -1
  54. package/esm/components/TsIcon/icons/arrow-diagonal-collapse.svg +0 -1
  55. package/esm/components/TsIcon/icons/arrow-diagonal-expand.svg +0 -1
  56. package/esm/components/TsIcon/icons/arrow-down.svg +0 -1
  57. package/esm/components/TsIcon/icons/arrow-go-back.svg +0 -1
  58. package/esm/components/TsIcon/icons/arrow-left-right.svg +0 -1
  59. package/esm/components/TsIcon/icons/arrow-left.svg +0 -1
  60. package/esm/components/TsIcon/icons/arrow-right.svg +0 -1
  61. package/esm/components/TsIcon/icons/arrow-up-down.svg +0 -1
  62. package/esm/components/TsIcon/icons/arrow-up.svg +0 -1
  63. package/esm/components/TsIcon/icons/award.svg +0 -1
  64. package/esm/components/TsIcon/icons/check-circle-filled.svg +0 -1
  65. package/esm/components/TsIcon/icons/check-circle-timer.svg +0 -7
  66. package/esm/components/TsIcon/icons/check-circle.svg +0 -1
  67. package/esm/components/TsIcon/icons/check-square-filled.svg +0 -1
  68. package/esm/components/TsIcon/icons/check-square.svg +0 -1
  69. package/esm/components/TsIcon/icons/check.svg +0 -1
  70. package/esm/components/TsIcon/icons/chevron-down.svg +0 -1
  71. package/esm/components/TsIcon/icons/chevron-left.svg +0 -1
  72. package/esm/components/TsIcon/icons/chevron-right.svg +0 -1
  73. package/esm/components/TsIcon/icons/chevron-up.svg +0 -1
  74. package/esm/components/TsIcon/icons/circle.svg +0 -1
  75. package/esm/components/TsIcon/icons/close-circle.svg +0 -1
  76. package/esm/components/TsIcon/icons/close.svg +0 -1
  77. package/esm/components/TsIcon/icons/currency-euro.svg +0 -1
  78. package/esm/components/TsIcon/icons/download.svg +0 -1
  79. package/esm/components/TsIcon/icons/edit.svg +0 -1
  80. package/esm/components/TsIcon/icons/external-link.svg +0 -1
  81. package/esm/components/TsIcon/icons/filter-off.svg +0 -1
  82. package/esm/components/TsIcon/icons/filter.svg +0 -1
  83. package/esm/components/TsIcon/icons/flashlight-off.svg +0 -1
  84. package/esm/components/TsIcon/icons/flashlight.svg +0 -1
  85. package/esm/components/TsIcon/icons/header-bikestudio.svg +0 -32
  86. package/esm/components/TsIcon/icons/header-nsc-helmet.svg +0 -32
  87. package/esm/components/TsIcon/icons/header-opticost.svg +0 -32
  88. package/esm/components/TsIcon/icons/header-repairability.svg +0 -32
  89. package/esm/components/TsIcon/icons/heart-filled.svg +0 -1
  90. package/esm/components/TsIcon/icons/heart.svg +0 -1
  91. package/esm/components/TsIcon/icons/history.svg +0 -1
  92. package/esm/components/TsIcon/icons/home.svg +0 -1
  93. package/esm/components/TsIcon/icons/index.d.ts +0 -3
  94. package/esm/components/TsIcon/icons/index.js +0 -61
  95. package/esm/components/TsIcon/icons/index.js.map +0 -1
  96. package/esm/components/TsIcon/icons/index.ts +0 -60
  97. package/esm/components/TsIcon/icons/link.svg +0 -1
  98. package/esm/components/TsIcon/icons/list-settings.svg +0 -1
  99. package/esm/components/TsIcon/icons/lock.svg +0 -1
  100. package/esm/components/TsIcon/icons/loop-right.svg +0 -1
  101. package/esm/components/TsIcon/icons/percent.svg +0 -1
  102. package/esm/components/TsIcon/icons/question-circle.svg +0 -1
  103. package/esm/components/TsIcon/icons/save.svg +0 -1
  104. package/esm/components/TsIcon/icons/search.svg +0 -1
  105. package/esm/components/TsIcon/icons/seedling-circle.svg +0 -12
  106. package/esm/components/TsIcon/icons/square.svg +0 -1
  107. package/esm/components/TsIcon/icons/timer.svg +0 -1
  108. package/esm/components/TsIcon/icons/tools.svg +0 -1
  109. package/esm/components/TsIcon/icons/user.svg +0 -1
  110. package/esm/components/TsInput/TsInput/TsInput.css +0 -92
  111. package/esm/components/TsInput/TsInput/TsInput.d.ts +0 -4
  112. package/esm/components/TsInput/TsInput/TsInput.js +0 -21
  113. package/esm/components/TsInput/TsInput/TsInput.js.map +0 -1
  114. package/esm/components/TsInput/TsInput/TsInput.tsx +0 -34
  115. package/esm/components/TsInput/TsInput/TsInput.types.d.ts +0 -8
  116. package/esm/components/TsInput/TsInput/TsInput.types.js +0 -2
  117. package/esm/components/TsInput/TsInput/TsInput.types.js.map +0 -1
  118. package/esm/components/TsInput/TsInput/TsInput.types.tsx +0 -9
  119. package/esm/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +0 -77
  120. package/esm/components/TsLoader/TsLoader.css +0 -42
  121. package/esm/components/TsLoader/TsLoader.d.ts +0 -4
  122. package/esm/components/TsLoader/TsLoader.js +0 -6
  123. package/esm/components/TsLoader/TsLoader.js.map +0 -1
  124. package/esm/components/TsLoader/TsLoader.types.d.ts +0 -3
  125. package/esm/components/TsLoader/TsLoader.types.js +0 -2
  126. package/esm/components/TsLoader/TsLoader.types.js.map +0 -1
  127. package/esm/components/TsLoader/__stories__/TsLoader.stories.mdx +0 -30
  128. package/esm/components/TsTabs/TsTabs.css +0 -69
  129. package/esm/components/TsTabs/TsTabs.d.ts +0 -4
  130. package/esm/components/TsTabs/TsTabs.js +0 -30
  131. package/esm/components/TsTabs/TsTabs.js.map +0 -1
  132. package/esm/components/TsTabs/TsTabs.types.d.ts +0 -14
  133. package/esm/components/TsTabs/TsTabs.types.js +0 -2
  134. package/esm/components/TsTabs/TsTabs.types.js.map +0 -1
  135. package/esm/components/TsTabs/__stories__/TsTabs.stories.mdx +0 -50
  136. package/esm/hooks/use-click-outside.d.ts +0 -2
  137. package/esm/hooks/use-click-outside.js +0 -14
  138. package/esm/hooks/use-click-outside.js.map +0 -1
  139. package/esm/index.d.ts +0 -10
  140. package/esm/index.js +0 -11
  141. package/esm/index.js.map +0 -1
  142. package/esm/layouts/TsHeader/TsHeader.css +0 -186
  143. package/esm/layouts/TsHeader/TsHeader.d.ts +0 -4
  144. package/esm/layouts/TsHeader/TsHeader.js +0 -13
  145. package/esm/layouts/TsHeader/TsHeader.js.map +0 -1
  146. package/esm/layouts/TsHeader/TsHeader.types.d.ts +0 -23
  147. package/esm/layouts/TsHeader/TsHeader.types.js +0 -2
  148. package/esm/layouts/TsHeader/TsHeader.types.js.map +0 -1
  149. package/esm/layouts/TsHeader/TsHeaderProfile.d.ts +0 -5
  150. package/esm/layouts/TsHeader/TsHeaderProfile.js +0 -38
  151. package/esm/layouts/TsHeader/TsHeaderProfile.js.map +0 -1
  152. package/esm/layouts/TsHeader/TsHeaderSearch.d.ts +0 -3
  153. package/esm/layouts/TsHeader/TsHeaderSearch.js +0 -58
  154. package/esm/layouts/TsHeader/TsHeaderSearch.js.map +0 -1
  155. package/esm/layouts/TsHeader/__stories__/TsHeader.stories.mdx +0 -71
  156. package/esm/layouts/TsNavigation/TsNavigation.css +0 -72
  157. package/esm/layouts/TsNavigation/TsNavigation.d.ts +0 -7
  158. package/esm/layouts/TsNavigation/TsNavigation.js +0 -29
  159. package/esm/layouts/TsNavigation/TsNavigation.js.map +0 -1
  160. package/esm/layouts/TsNavigation/TsNavigation.types.d.ts +0 -10
  161. package/esm/layouts/TsNavigation/TsNavigation.types.js +0 -2
  162. package/esm/layouts/TsNavigation/TsNavigation.types.js.map +0 -1
  163. package/esm/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +0 -51
  164. package/esm/utils/string.utils.d.ts +0 -1
  165. package/esm/utils/string.utils.js +0 -2
  166. package/esm/utils/string.utils.js.map +0 -1
  167. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  168. package/lib/assets/fonts/Roboto-Light.ttf +0 -0
  169. package/lib/components/TsButton/TsButton.css +0 -121
  170. package/lib/components/TsButton/TsButton.d.ts +0 -5
  171. package/lib/components/TsButton/TsButton.js +0 -21
  172. package/lib/components/TsButton/TsButton.js.map +0 -1
  173. package/lib/components/TsButton/TsButton.types.d.ts +0 -9
  174. package/lib/components/TsButton/TsButton.types.js +0 -3
  175. package/lib/components/TsButton/TsButton.types.js.map +0 -1
  176. package/lib/components/TsButton/__stories__/TsButton.stories.mdx +0 -84
  177. package/lib/components/TsCheckbox/TsCheckbox.css +0 -64
  178. package/lib/components/TsCheckbox/TsCheckbox.d.ts +0 -4
  179. package/lib/components/TsCheckbox/TsCheckbox.js +0 -21
  180. package/lib/components/TsCheckbox/TsCheckbox.js.map +0 -1
  181. package/lib/components/TsCheckbox/TsCheckbox.types.d.ts +0 -7
  182. package/lib/components/TsCheckbox/TsCheckbox.types.js +0 -3
  183. package/lib/components/TsCheckbox/TsCheckbox.types.js.map +0 -1
  184. package/lib/components/TsCheckbox/__stories__/TsCheckbox.stories.mdx +0 -56
  185. package/lib/components/TsDropdown/TsDropdown.css +0 -114
  186. package/lib/components/TsDropdown/TsDropdown.d.ts +0 -4
  187. package/lib/components/TsDropdown/TsDropdown.js +0 -104
  188. package/lib/components/TsDropdown/TsDropdown.js.map +0 -1
  189. package/lib/components/TsDropdown/TsDropdown.types.d.ts +0 -17
  190. package/lib/components/TsDropdown/TsDropdown.types.js +0 -3
  191. package/lib/components/TsDropdown/TsDropdown.types.js.map +0 -1
  192. package/lib/components/TsDropdown/__stories__/fruits.d.ts +0 -4
  193. package/lib/components/TsDropdown/__stories__/fruits.js +0 -51
  194. package/lib/components/TsDropdown/__stories__/fruits.js.map +0 -1
  195. package/lib/components/TsIcon/TsIcon.css +0 -26
  196. package/lib/components/TsIcon/TsIcon.d.ts +0 -4
  197. package/lib/components/TsIcon/TsIcon.js +0 -16
  198. package/lib/components/TsIcon/TsIcon.js.map +0 -1
  199. package/lib/components/TsIcon/TsIcon.types.d.ts +0 -4
  200. package/lib/components/TsIcon/TsIcon.types.js +0 -3
  201. package/lib/components/TsIcon/TsIcon.types.js.map +0 -1
  202. package/lib/components/TsIcon/__stories__/TsIcon.stories.mdx +0 -89
  203. package/lib/components/TsIcon/icons/add-circle.svg +0 -1
  204. package/lib/components/TsIcon/icons/add.svg +0 -1
  205. package/lib/components/TsIcon/icons/alert-circle-filled.svg +0 -1
  206. package/lib/components/TsIcon/icons/alert-circle.svg +0 -1
  207. package/lib/components/TsIcon/icons/alert-triangle-filled.svg +0 -1
  208. package/lib/components/TsIcon/icons/alert-triangle.svg +0 -1
  209. package/lib/components/TsIcon/icons/arrow-diagonal-collapse.svg +0 -1
  210. package/lib/components/TsIcon/icons/arrow-diagonal-expand.svg +0 -1
  211. package/lib/components/TsIcon/icons/arrow-down.svg +0 -1
  212. package/lib/components/TsIcon/icons/arrow-go-back.svg +0 -1
  213. package/lib/components/TsIcon/icons/arrow-left-right.svg +0 -1
  214. package/lib/components/TsIcon/icons/arrow-left.svg +0 -1
  215. package/lib/components/TsIcon/icons/arrow-right.svg +0 -1
  216. package/lib/components/TsIcon/icons/arrow-up-down.svg +0 -1
  217. package/lib/components/TsIcon/icons/arrow-up.svg +0 -1
  218. package/lib/components/TsIcon/icons/award.svg +0 -1
  219. package/lib/components/TsIcon/icons/check-circle-filled.svg +0 -1
  220. package/lib/components/TsIcon/icons/check-circle-timer.svg +0 -7
  221. package/lib/components/TsIcon/icons/check-circle.svg +0 -1
  222. package/lib/components/TsIcon/icons/check-square-filled.svg +0 -1
  223. package/lib/components/TsIcon/icons/check-square.svg +0 -1
  224. package/lib/components/TsIcon/icons/check.svg +0 -1
  225. package/lib/components/TsIcon/icons/chevron-down.svg +0 -1
  226. package/lib/components/TsIcon/icons/chevron-left.svg +0 -1
  227. package/lib/components/TsIcon/icons/chevron-right.svg +0 -1
  228. package/lib/components/TsIcon/icons/chevron-up.svg +0 -1
  229. package/lib/components/TsIcon/icons/circle.svg +0 -1
  230. package/lib/components/TsIcon/icons/close-circle.svg +0 -1
  231. package/lib/components/TsIcon/icons/close.svg +0 -1
  232. package/lib/components/TsIcon/icons/currency-euro.svg +0 -1
  233. package/lib/components/TsIcon/icons/download.svg +0 -1
  234. package/lib/components/TsIcon/icons/edit.svg +0 -1
  235. package/lib/components/TsIcon/icons/external-link.svg +0 -1
  236. package/lib/components/TsIcon/icons/filter-off.svg +0 -1
  237. package/lib/components/TsIcon/icons/filter.svg +0 -1
  238. package/lib/components/TsIcon/icons/flashlight-off.svg +0 -1
  239. package/lib/components/TsIcon/icons/flashlight.svg +0 -1
  240. package/lib/components/TsIcon/icons/header-bikestudio.svg +0 -32
  241. package/lib/components/TsIcon/icons/header-nsc-helmet.svg +0 -32
  242. package/lib/components/TsIcon/icons/header-opticost.svg +0 -32
  243. package/lib/components/TsIcon/icons/header-repairability.svg +0 -32
  244. package/lib/components/TsIcon/icons/heart-filled.svg +0 -1
  245. package/lib/components/TsIcon/icons/heart.svg +0 -1
  246. package/lib/components/TsIcon/icons/history.svg +0 -1
  247. package/lib/components/TsIcon/icons/home.svg +0 -1
  248. package/lib/components/TsIcon/icons/index.d.ts +0 -3
  249. package/lib/components/TsIcon/icons/index.js +0 -64
  250. package/lib/components/TsIcon/icons/index.js.map +0 -1
  251. package/lib/components/TsIcon/icons/index.ts +0 -60
  252. package/lib/components/TsIcon/icons/link.svg +0 -1
  253. package/lib/components/TsIcon/icons/list-settings.svg +0 -1
  254. package/lib/components/TsIcon/icons/lock.svg +0 -1
  255. package/lib/components/TsIcon/icons/loop-right.svg +0 -1
  256. package/lib/components/TsIcon/icons/percent.svg +0 -1
  257. package/lib/components/TsIcon/icons/question-circle.svg +0 -1
  258. package/lib/components/TsIcon/icons/save.svg +0 -1
  259. package/lib/components/TsIcon/icons/search.svg +0 -1
  260. package/lib/components/TsIcon/icons/seedling-circle.svg +0 -12
  261. package/lib/components/TsIcon/icons/square.svg +0 -1
  262. package/lib/components/TsIcon/icons/timer.svg +0 -1
  263. package/lib/components/TsIcon/icons/tools.svg +0 -1
  264. package/lib/components/TsIcon/icons/user.svg +0 -1
  265. package/lib/components/TsInput/TsInput/TsInput.css +0 -92
  266. package/lib/components/TsInput/TsInput/TsInput.d.ts +0 -4
  267. package/lib/components/TsInput/TsInput/TsInput.js +0 -25
  268. package/lib/components/TsInput/TsInput/TsInput.js.map +0 -1
  269. package/lib/components/TsInput/TsInput/TsInput.tsx +0 -34
  270. package/lib/components/TsInput/TsInput/TsInput.types.d.ts +0 -8
  271. package/lib/components/TsInput/TsInput/TsInput.types.js +0 -3
  272. package/lib/components/TsInput/TsInput/TsInput.types.js.map +0 -1
  273. package/lib/components/TsInput/TsInput/TsInput.types.tsx +0 -9
  274. package/lib/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +0 -77
  275. package/lib/components/TsLoader/TsLoader.css +0 -42
  276. package/lib/components/TsLoader/TsLoader.d.ts +0 -4
  277. package/lib/components/TsLoader/TsLoader.js +0 -10
  278. package/lib/components/TsLoader/TsLoader.js.map +0 -1
  279. package/lib/components/TsLoader/TsLoader.types.d.ts +0 -3
  280. package/lib/components/TsLoader/TsLoader.types.js +0 -3
  281. package/lib/components/TsLoader/TsLoader.types.js.map +0 -1
  282. package/lib/components/TsLoader/__stories__/TsLoader.stories.mdx +0 -30
  283. package/lib/components/TsTabs/TsTabs.css +0 -69
  284. package/lib/components/TsTabs/TsTabs.d.ts +0 -4
  285. package/lib/components/TsTabs/TsTabs.js +0 -34
  286. package/lib/components/TsTabs/TsTabs.js.map +0 -1
  287. package/lib/components/TsTabs/TsTabs.types.d.ts +0 -14
  288. package/lib/components/TsTabs/TsTabs.types.js +0 -3
  289. package/lib/components/TsTabs/TsTabs.types.js.map +0 -1
  290. package/lib/components/TsTabs/__stories__/TsTabs.stories.mdx +0 -50
  291. package/lib/hooks/use-click-outside.d.ts +0 -2
  292. package/lib/hooks/use-click-outside.js +0 -18
  293. package/lib/hooks/use-click-outside.js.map +0 -1
  294. package/lib/index.d.ts +0 -10
  295. package/lib/index.js +0 -27
  296. package/lib/index.js.map +0 -1
  297. package/lib/layouts/TsHeader/TsHeader.css +0 -186
  298. package/lib/layouts/TsHeader/TsHeader.d.ts +0 -4
  299. package/lib/layouts/TsHeader/TsHeader.js +0 -17
  300. package/lib/layouts/TsHeader/TsHeader.js.map +0 -1
  301. package/lib/layouts/TsHeader/TsHeader.types.d.ts +0 -23
  302. package/lib/layouts/TsHeader/TsHeader.types.js +0 -3
  303. package/lib/layouts/TsHeader/TsHeader.types.js.map +0 -1
  304. package/lib/layouts/TsHeader/TsHeaderProfile.d.ts +0 -5
  305. package/lib/layouts/TsHeader/TsHeaderProfile.js +0 -43
  306. package/lib/layouts/TsHeader/TsHeaderProfile.js.map +0 -1
  307. package/lib/layouts/TsHeader/TsHeaderSearch.d.ts +0 -3
  308. package/lib/layouts/TsHeader/TsHeaderSearch.js +0 -62
  309. package/lib/layouts/TsHeader/TsHeaderSearch.js.map +0 -1
  310. package/lib/layouts/TsHeader/__stories__/TsHeader.stories.mdx +0 -71
  311. package/lib/layouts/TsNavigation/TsNavigation.css +0 -72
  312. package/lib/layouts/TsNavigation/TsNavigation.d.ts +0 -7
  313. package/lib/layouts/TsNavigation/TsNavigation.js +0 -35
  314. package/lib/layouts/TsNavigation/TsNavigation.js.map +0 -1
  315. package/lib/layouts/TsNavigation/TsNavigation.types.d.ts +0 -10
  316. package/lib/layouts/TsNavigation/TsNavigation.types.js +0 -3
  317. package/lib/layouts/TsNavigation/TsNavigation.types.js.map +0 -1
  318. package/lib/layouts/TsNavigation/__stories__/TsNavigation.stories.mdx +0 -51
  319. package/lib/utils/string.utils.d.ts +0 -1
  320. package/lib/utils/string.utils.js +0 -6
  321. package/lib/utils/string.utils.js.map +0 -1
  322. package/src/components/TsDropdown/__stories__/TsDropdown.stories.mdx +0 -85
  323. package/src/components/TsDropdown/__stories__/fruits.ts +0 -47
  324. /package/{esm/components → src/components/TsDropdowns}/TsDropdown/TsDropdown.css +0 -0
  325. /package/src/components/{TsDropdown → TsDropdowns/TsDropdown}/TsDropdown.types.ts +0 -0
  326. /package/{esm/components → src/components/TsDropdowns}/TsDropdown/__stories__/fruits.ts +0 -0
  327. /package/{lib/components/TsDropdown → src/components/TsDropdowns/TsDropdownFilter}/__stories__/fruits.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dktunited-techoff/techoff-suite-ui",
3
- "version": "1.7.11",
3
+ "version": "1.8.1",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib",
6
6
  "module": "esm/index.js",
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { TsDropdownProps } from './TsDropdown.types';
4
- import { TsIcon } from '../TsIcon/TsIcon';
5
- import { TsInput } from '../TsInput/TsInput/TsInput';
6
- import { useClickOutside } from '../../hooks/use-click-outside';
7
- import { TsLoader } from '../TsLoader/TsLoader';
4
+ import { TsIcon } from '../../TsIcon/TsIcon';
5
+ import { TsInput } from '../../TsInput/TsInput/TsInput';
6
+ import { useClickOutside } from '../../../hooks/use-click-outside';
7
+ import { TsLoader } from '../../TsLoader/TsLoader';
8
8
  import './TsDropdown.css';
9
9
 
10
- export const TsDropdown = <T extends unknown>({
10
+ export const TsDropdown = <T,>({
11
11
  containerRef,
12
12
  error,
13
13
  label,
@@ -3,7 +3,7 @@ import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
3
  import { TsDropdown } from '../TsDropdown';
4
4
  import { fruits } from './fruits';
5
5
 
6
- <Meta title="Components/Dropdown" />
6
+ <Meta title="Components/Dropdowns/Dropdown" />
7
7
 
8
8
  export const dropdownArgTypes = {
9
9
  error: {
@@ -1,72 +1,37 @@
1
1
  .ts-dropdown-container {
2
2
  position: relative;
3
- width: 100%;
4
3
  }
5
4
  .ts-dropdown-input {
6
5
  display: flex;
7
- align-items: center;
8
- width: 100%;
9
6
  height: 32px;
10
- padding-left: 10px;
11
- border: 1px solid #949494;
7
+ padding-left: 16px;
8
+ padding-right: 12px;
9
+ background: #e1e3f5;
10
+ color: #3643ba;
12
11
  cursor: pointer;
13
12
  }
14
- .ts-dropdown-input--disabled {
15
- background: #fafafa;
16
- cursor: not-allowed;
13
+ .ts-dropdown-input:hover {
14
+ background: #d7daf1;
17
15
  }
18
- .ts-dropdown-input--placeholder {
19
- flex: 1;
20
- color: #7a7a7a;
21
- font-weight: 400;
22
- overflow: hidden;
23
- text-overflow: ellipsis;
24
- white-space: nowrap;
25
- }
26
- .ts-dropdown-input--value {
27
- flex: 1;
28
- font-weight: 600;
29
- overflow: hidden;
30
- text-overflow: ellipsis;
31
- white-space: nowrap;
16
+ .ts-dropdown-label {
17
+ display: flex;
18
+ align-items: center;
19
+ height: 32px;
20
+ margin-right: 2px;
32
21
  }
33
22
  .ts-dropdown-input--chevron {
34
23
  display: flex;
35
24
  align-items: center;
36
25
  justify-content: center;
37
- width: 32px;
38
26
  height: 32px;
39
27
  }
40
- .ts-dropdown-input.ts-dropdown-container--error {
41
- border: 1px solid #e3262f;
42
- }
43
- .ts-dropdown-error {
44
- display: flex;
45
- margin-top: 4px;
46
- color: #e3262f;
47
- }
48
- .ts-dropdown-error--icon {
49
- margin-right: 4px;
50
- }
51
- .ts-dropdown-error--label {
52
- font-size: 12px;
53
- font-weight: 500;
54
- }
55
- /* ####### */
56
- /* LABEL */
57
- .ts-dropdown-label {
58
- padding-bottom: 6px;
59
- }
60
- /* ###### */
61
- /* MENU */
62
28
  .ts-dropdown-menu-container {
63
29
  position: absolute;
64
- top: 60px;
30
+ top: calc(100% + 8px);
65
31
  display: flex;
66
32
  flex-direction: column;
67
- width: 100%;
68
- min-width: 220px;
69
- max-height: 250px;
33
+ width: 320px;
34
+ max-height: 200px;
70
35
  padding: 12px;
71
36
  box-shadow: 0px 8px 9px 0px #1010101a;
72
37
  background: #ffffff;
@@ -75,26 +40,30 @@
75
40
  }
76
41
  .ts-dropdown-search {
77
42
  padding-bottom: 12px;
78
- margin-bottom: 12px;
79
43
  border-bottom: 1px solid #d9dde1;
80
44
  }
81
- .ts-dropdown-menu {
82
- overflow: auto;
83
- }
84
45
  .ts-dropdown-menu-loader {
85
46
  display: flex;
47
+ align-items: center;
86
48
  justify-content: center;
49
+ padding-top: 12px;
87
50
  }
88
51
  .ts-dropdown-menu-error-text {
89
52
  display: flex;
53
+ align-items: center;
90
54
  justify-content: center;
91
- color: #7a7a7a;
55
+ padding-top: 12px;
56
+ color: #687787;
92
57
  font-style: italic;
93
58
  }
59
+ .ts-dropdown-menu {
60
+ padding-top: 12px;
61
+ overflow: auto;
62
+ }
94
63
  .ts-dropdown-menu-item {
95
64
  display: flex;
96
65
  align-items: center;
97
- height: 36px;
66
+ height: 32px;
98
67
  padding: 0 12px;
99
68
  cursor: pointer;
100
69
  }
@@ -0,0 +1,104 @@
1
+ import * as React from 'react';
2
+ import { useEffect, useState } from 'react';
3
+ import { useClickOutside } from '../../../hooks/use-click-outside';
4
+ import { capitalize } from '../../../utils/string.utils';
5
+ import { TsIcon } from '../../TsIcon/TsIcon';
6
+ import { TsInput } from '../../TsInput/TsInput/TsInput';
7
+ import { TsLoader } from '../../TsLoader/TsLoader';
8
+ import { TsDropdownFilterProps } from './TsDropdownFilter.types';
9
+ import './TsDropdownFilter.css';
10
+
11
+ export const TsDropdownFilter = <T,>({
12
+ label,
13
+ searchPlaceholder,
14
+ loadOptions,
15
+ getOptionLabel,
16
+ getOptionValue,
17
+ onChange,
18
+ }: TsDropdownFilterProps<T>) => {
19
+ const [searchValue, setSearchValue] = useState<string>('');
20
+ const [showDropdown, setShowDropdown] = useState<boolean>(false);
21
+ const [items, setItems] = useState<T[]>([]);
22
+ const [loading, setLoading] = useState<boolean>(true);
23
+ const ref = useClickOutside(() => setShowDropdown(false));
24
+
25
+ // ########
26
+ // Fetchers
27
+ const fetchAllItems = () => {
28
+ return loadOptions(searchValue)
29
+ .then(setItems)
30
+ .catch(() => {}); // TODO: Manage fetch ERRORS (Show an error message : 'An error occured, please retry later' or something else)
31
+ };
32
+
33
+ // ########
34
+ // Handlers
35
+ const handleSelectItem = (value: T) => {
36
+ onChange(value);
37
+ setShowDropdown(false);
38
+ };
39
+
40
+ // ########
41
+ // Watchers
42
+ useEffect(() => {
43
+ if (!showDropdown) setSearchValue('');
44
+ }, [showDropdown]);
45
+ useEffect(() => {
46
+ setLoading(true);
47
+
48
+ if (!searchValue) {
49
+ fetchAllItems().finally(() => setLoading(false));
50
+ } else {
51
+ const timeOutId = setTimeout(() => {
52
+ fetchAllItems().finally(() => setLoading(false));
53
+ }, 500);
54
+ return () => clearTimeout(timeOutId);
55
+ }
56
+ }, [searchValue]);
57
+
58
+ // #########
59
+ // Rendering
60
+ return (
61
+ <div className="ts-dropdown-container" ref={ref}>
62
+ <div className="ts-dropdown-input" onClick={() => setShowDropdown(!showDropdown)}>
63
+ <div className="ts-dropdown-label">{label}</div>
64
+ <div className="ts-dropdown-input--chevron">
65
+ <TsIcon name={showDropdown ? 'chevron-up' : 'chevron-down'} />
66
+ </div>
67
+ </div>
68
+
69
+ {showDropdown && (
70
+ <div className="ts-dropdown-menu-container">
71
+ <div className="ts-dropdown-search">
72
+ <TsInput
73
+ icon="search"
74
+ placeholder={searchPlaceholder}
75
+ value={searchValue}
76
+ autoFocus
77
+ onChange={setSearchValue}
78
+ />
79
+ </div>
80
+
81
+ {loading && (
82
+ <div className="ts-dropdown-menu-loader">
83
+ <TsLoader size="sm" />
84
+ </div>
85
+ )}
86
+ {!loading && items.length === 0 && <div className="ts-dropdown-menu-error-text">Nothing found.</div>}
87
+ {!loading && items.length > 0 && (
88
+ <div className="ts-dropdown-menu">
89
+ {items.map(item => (
90
+ <div
91
+ key={getOptionValue(item)}
92
+ className="ts-dropdown-menu-item"
93
+ onClick={() => handleSelectItem(item)}
94
+ >
95
+ {capitalize(getOptionLabel(item))}
96
+ </div>
97
+ ))}
98
+ </div>
99
+ )}
100
+ </div>
101
+ )}
102
+ </div>
103
+ );
104
+ };
@@ -0,0 +1,8 @@
1
+ export type TsDropdownFilterProps<T> = {
2
+ label: string;
3
+ searchPlaceholder?: string;
4
+ loadOptions: (query?: string) => Promise<T[]>;
5
+ getOptionLabel: (item: T) => string;
6
+ getOptionValue: (item: T) => string;
7
+ onChange: (item: T) => void;
8
+ };
@@ -1,37 +1,19 @@
1
1
  import React from 'react';
2
2
  import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { TsDropdown } from '../TsDropdown';
3
+ import { TsDropdownFilter } from '../TsDropdownFilter';
4
4
  import { fruits } from './fruits';
5
5
 
6
- <Meta title="Components/Dropdown" />
6
+ <Meta title="Components/Dropdowns/Dropdown filter" />
7
7
 
8
8
  export const dropdownArgTypes = {
9
- error: {
10
- control: 'text',
11
- description: 'Error of the dropdown.',
12
- },
13
9
  label: {
14
10
  control: 'text',
15
11
  description: 'Label of the dropdown.',
16
12
  },
17
- placeholder: {
18
- control: 'text',
19
- description: 'Placeholder of the dropdown.',
20
- },
21
13
  searchPlaceholder: {
22
14
  control: 'text',
23
15
  description: 'Placeholder of the option search (only for searchable dropdowns).',
24
16
  },
25
- searchable: {
26
- control: 'boolean',
27
- description: 'Enable search on dropdown items.',
28
- table: { defaultValue: { summary: 'false' } },
29
- },
30
- disabled: {
31
- control: 'boolean',
32
- description: 'Enable state of the dropdown.',
33
- table: { defaultValue: { summary: 'false' } },
34
- },
35
17
  getOptionLabel: {
36
18
  control: 'function',
37
19
  description: 'The handler called to get the option label',
@@ -50,9 +32,9 @@ export const dropdownArgTypes = {
50
32
  },
51
33
  };
52
34
 
53
- # Dropdown
35
+ # Dropdown filter
54
36
 
55
- Dropdowns show a list of options that can be used to select, filter or sort content.
37
+ Dropdowns specific to filter a search on page contents.
56
38
 
57
39
  ## Overview
58
40
 
@@ -60,13 +42,15 @@ Dropdowns show a list of options that can be used to select, filter or sort cont
60
42
  <Story
61
43
  name="Overview"
62
44
  args={{
63
- error: '',
64
45
  label: 'Label',
65
- options: fruits,
66
46
  searchPlaceholder: '',
67
- placeholder: 'Select an item',
68
- disabled: false,
69
- searchable: false,
47
+ loadOptions: function ol(search) {
48
+ return Promise.resolve(
49
+ fruits.filter(function om(fruit) {
50
+ return fruit.name.includes(search);
51
+ }),
52
+ );
53
+ },
70
54
  getOptionLabel: function ol(fruit) {
71
55
  return fruit.name;
72
56
  },
@@ -76,10 +60,10 @@ Dropdowns show a list of options that can be used to select, filter or sort cont
76
60
  }}
77
61
  argTypes={dropdownArgTypes}
78
62
  >
79
- {args => <TsDropdown {...args}>{args.children}</TsDropdown>}
63
+ {args => <TsDropdownFilter {...args}>{args.children}</TsDropdownFilter>}
80
64
  </Story>
81
65
  </Canvas>
82
66
 
83
67
  ## Props
84
68
 
85
- <ArgsTable story="Overview" of={TsDropdown} />
69
+ <ArgsTable story="Overview" of={TsDropdownFilter} />
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 27.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 284.1 16.8" style="enable-background:new 0 0 284.1 16.8;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#152C47;}
7
+ .st1{font-family:'Montserrat-Medium';}
8
+ .st2{font-size:24px;}
9
+ .st3{font-family:'Roboto-Light';}
10
+ .st4{font-size:11px;}
11
+ .st5{fill:#020203;}
12
+ .st6{fill:#0D84C5;}
13
+ .st7{fill:#FFFFFF;}
14
+ </style>
15
+ <text transform="matrix(1 0 0 1 -9.570312e-02 16.7998)" class="st0 st1 st2">TECHOFF SUITE</text>
16
+ <text transform="matrix(1 0 0 1 210.3656 16.7998)" class="st3 st4">BY</text>
17
+ <path class="st5" d="M247.4,10.1c-0.5-0.6-1.3-0.9-2.2-0.9c-1.6,0-2.8,1.2-2.8,2.8s1.2,2.8,2.8,2.8c0.9,0,1.7-0.4,2.2-1.1l1.4,1.3
18
+ c-0.9,1.1-2.1,1.7-3.6,1.7c-2.8,0-4.8-2-4.8-4.8s2-4.8,4.8-4.8c1.4,0,2.7,0.5,3.6,1.5L247.4,10.1z"/>
19
+ <polygon class="st5" points="233.4,7.5 239.3,7.5 239.3,9.3 235.4,9.3 235.4,11.2 238.8,11.2 238.8,13 235.4,13 235.4,15 239.3,15
20
+ 239.3,16.8 233.4,16.8 "/>
21
+ <polygon class="st5" points="271.9,7.3 277.4,7.3 277.4,9.2 273.8,9.2 273.8,11.5 276.9,11.5 276.9,13.3 273.8,13.3 273.8,16.7
22
+ 271.9,16.7 "/>
23
+ <polygon class="st5" points="278.5,7.3 284.1,7.3 284.1,9.2 280.5,9.2 280.5,11.5 283.6,11.5 283.6,13.3 280.5,13.3 280.5,16.7
24
+ 278.5,16.7 "/>
25
+ <polygon class="st5" points="255.9,12.8 251.9,12.8 251.9,16.7 250,16.7 250,7.3 251.9,7.3 251.9,10.9 255.9,10.9 255.9,7.3
26
+ 257.9,7.3 257.9,16.7 255.9,16.7 "/>
27
+ <polygon class="st5" points="225.2,7.5 232.3,7.5 232.3,9.4 229.8,9.4 229.8,16.8 227.8,16.8 227.8,9.4 225.2,9.4 "/>
28
+ <polyline class="st5" points="258.3,8.6 260.1,5.8 262.1,5.8 260.3,8.6 258.3,8.6 "/>
29
+ <path class="st5" d="M265.9,7.2c-2.8,0-4.8,2-4.8,4.8s2,4.8,4.8,4.8s4.8-2,4.8-4.8S268.7,7.2,265.9,7.2z"/>
30
+ <polygon class="st6" points="261.8,12.2 267.9,8.6 267.9,15.7 "/>
31
+ <polygon class="st7" points="265.8,16.8 265.7,13.4 262.9,15.2 "/>
32
+ </svg>
@@ -40,6 +40,7 @@ export const icons: { [k: string]: string } = {
40
40
  'header-nsc-helmet': '<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 27.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --><svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 247.3 17" style="enable-background:new 0 0 247.3 17;" xml:space="preserve"><style type="text/css"> .st0{fill:#152C47;} .st1{font-family:\'Montserrat-Medium\';} .st2{font-size:24px;} .st3{font-family:\'Roboto-Light\';} .st4{font-size:11px;} .st5{fill:#020203;} .st6{fill:#0D84C5;} .st7{fill:#FFFFFF;}</style><text transform="matrix(1 0 0 1 -2.52 16.8017)" class="st0 st1 st2">NSC HELMET</text><text transform="matrix(1 0 0 1 173.496 16.8009)" class="st3 st4">BY</text><path class="st5" d="M210.6,10.1c-0.5-0.6-1.3-0.9-2.2-0.9c-1.6,0-2.8,1.2-2.8,2.8s1.2,2.8,2.8,2.8c0.9,0,1.7-0.4,2.2-1.1L212,15 c-0.9,1.1-2.1,1.7-3.6,1.7c-2.8,0-4.8-2-4.8-4.8s2-4.8,4.8-4.8c1.4,0,2.7,0.5,3.6,1.5L210.6,10.1z"/><polygon class="st5" points="196.6,7.5 202.5,7.5 202.5,9.3 198.6,9.3 198.6,11.2 202,11.2 202,13 198.6,13 198.6,15 202.5,15 202.5,16.8 196.6,16.8 "/><polygon class="st5" points="235.1,7.3 240.6,7.3 240.6,9.2 237,9.2 237,11.5 240.1,11.5 240.1,13.3 237,13.3 237,16.7 235.1,16.7 "/><polygon class="st5" points="241.7,7.3 247.3,7.3 247.3,9.2 243.7,9.2 243.7,11.5 246.8,11.5 246.8,13.3 243.7,13.3 243.7,16.7 241.7,16.7 "/><polygon class="st5" points="219.1,12.8 215.1,12.8 215.1,16.7 213.2,16.7 213.2,7.3 215.1,7.3 215.1,10.9 219.1,10.9 219.1,7.3 221.1,7.3 221.1,16.7 219.1,16.7 "/><polygon class="st5" points="188.4,7.5 195.5,7.5 195.5,9.4 193,9.4 193,16.8 191,16.8 191,9.4 188.4,9.4 "/><polyline class="st5" points="221.5,8.6 223.3,5.8 225.3,5.8 223.5,8.6 221.5,8.6 "/><path class="st5" d="M229.1,7.2c-2.8,0-4.8,2-4.8,4.8s2,4.8,4.8,4.8s4.8-2,4.8-4.8S231.9,7.2,229.1,7.2z"/><polygon class="st6" points="225,12.2 231.1,8.6 231.1,15.7 "/><polygon class="st7" points="229,16.8 228.9,13.4 226.1,15.2 "/></svg>',
41
41
  'header-opticost': '<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 27.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --><svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 211.7 17.2" style="enable-background:new 0 0 211.7 17.2;" xml:space="preserve"><style type="text/css"> .st0{fill:#152C47;} .st1{font-family:\'Montserrat-Medium\';} .st2{font-size:24px;} .st3{font-family:\'Roboto-Light\';} .st4{font-size:11px;} .st5{fill:#020203;} .st6{fill:#0D84C5;} .st7{fill:#FFFFFF;}</style><text transform="matrix(1 0 0 1 -1.1519 16.9922)" class="st0 st1 st2">OPTICOST</text><text transform="matrix(1 0 0 1 137.907 16.9861)" class="st3 st4">BY</text><path class="st5" d="M175,10.3c-0.5-0.6-1.3-0.9-2.2-0.9c-1.6,0-2.8,1.2-2.8,2.8s1.2,2.8,2.8,2.8c0.9,0,1.7-0.4,2.2-1.1l1.4,1.3 c-0.9,1.1-2.1,1.7-3.6,1.7c-2.8,0-4.8-2-4.8-4.8s2-4.8,4.8-4.8c1.4,0,2.7,0.5,3.6,1.5L175,10.3z"/><polygon class="st5" points="161,7.7 166.9,7.7 166.9,9.5 163,9.5 163,11.4 166.4,11.4 166.4,13.2 163,13.2 163,15.2 166.9,15.2 166.9,17 161,17 "/><polygon class="st5" points="199.5,7.5 205,7.5 205,9.4 201.4,9.4 201.4,11.7 204.5,11.7 204.5,13.5 201.4,13.5 201.4,16.9 199.5,16.9 "/><polygon class="st5" points="206.1,7.5 211.7,7.5 211.7,9.4 208.1,9.4 208.1,11.7 211.2,11.7 211.2,13.5 208.1,13.5 208.1,16.9 206.1,16.9 "/><polygon class="st5" points="183.5,13 179.5,13 179.5,16.9 177.6,16.9 177.6,7.5 179.5,7.5 179.5,11.1 183.5,11.1 183.5,7.5 185.5,7.5 185.5,16.9 183.5,16.9 "/><polygon class="st5" points="152.8,7.7 159.9,7.7 159.9,9.6 157.4,9.6 157.4,17 155.4,17 155.4,9.6 152.8,9.6 "/><polyline class="st5" points="185.9,8.8 187.7,6 189.7,6 187.9,8.8 185.9,8.8 "/><path class="st5" d="M193.5,7.4c-2.8,0-4.8,2-4.8,4.8s2,4.8,4.8,4.8s4.8-2,4.8-4.8S196.3,7.4,193.5,7.4z"/><polygon class="st6" points="189.4,12.4 195.5,8.8 195.5,15.9 "/><polygon class="st7" points="193.4,17 193.3,13.6 190.5,15.4 "/></svg>',
42
42
  'header-repairability': '<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 27.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --><svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 357.7 16.8" style="enable-background:new 0 0 357.7 16.8;" xml:space="preserve"><style type="text/css"> .st0{fill:#152C47 !important;} .st1{font-family:\'Montserrat-Medium\' !important;} .st2{font-size:24px !important;} .st3{font-family:\'Roboto-Light\' !important;} .st4{font-size:11px !important;} .st5{fill:#020203 !important;} .st6{fill:#0D84C5 !important;} .st7{fill:#FFFFFF !important;}</style><text transform="matrix(1 0 0 1 -2.52 16.7998)" class="st0 st1 st2">REPAIRABILITY INDEX</text><text transform="matrix(1 0 0 1 283.9413 16.7998)" class="st3 st4">BY</text><path class="st5" d="M321,10.1c-0.5-0.6-1.3-0.9-2.2-0.9c-1.6,0-2.8,1.2-2.8,2.8s1.2,2.8,2.8,2.8c0.9,0,1.7-0.4,2.2-1.1l1.4,1.3 c-0.9,1.1-2.1,1.7-3.6,1.7c-2.8,0-4.8-2-4.8-4.8c0-2.8,2-4.8,4.8-4.8c1.4,0,2.7,0.5,3.6,1.5L321,10.1z"/><polygon class="st5" points="307,7.5 312.9,7.5 312.9,9.3 309,9.3 309,11.2 312.4,11.2 312.4,13 309,13 309,15 312.9,15 312.9,16.8 307,16.8 "/><polygon class="st5" points="345.5,7.3 351,7.3 351,9.2 347.4,9.2 347.4,11.5 350.5,11.5 350.5,13.3 347.4,13.3 347.4,16.7 345.5,16.7 "/><polygon class="st5" points="352.1,7.3 357.7,7.3 357.7,9.2 354.1,9.2 354.1,11.5 357.2,11.5 357.2,13.3 354.1,13.3 354.1,16.7 352.1,16.7 "/><polygon class="st5" points="329.5,12.8 325.5,12.8 325.5,16.7 323.6,16.7 323.6,7.3 325.5,7.3 325.5,10.9 329.5,10.9 329.5,7.3 331.5,7.3 331.5,16.7 329.5,16.7 "/><polygon class="st5" points="298.8,7.5 305.9,7.5 305.9,9.4 303.4,9.4 303.4,16.8 301.4,16.8 301.4,9.4 298.8,9.4 "/><polyline class="st5" points="331.9,8.6 333.7,5.8 335.7,5.8 333.9,8.6 331.9,8.6 "/><path class="st5" d="M339.5,7.2c-2.8,0-4.8,2-4.8,4.8s2,4.8,4.8,4.8c2.8,0,4.8-2,4.8-4.8S342.3,7.2,339.5,7.2z"/><polygon class="st6" points="335.4,12.2 341.5,8.6 341.5,15.7 "/><polygon class="st7" points="339.4,16.8 339.3,13.4 336.5,15.2 "/></svg>',
43
+ 'header-techoff-suite': '<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 27.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --><svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 284.1 16.8" style="enable-background:new 0 0 284.1 16.8;" xml:space="preserve"><style type="text/css"> .st0{fill:#152C47;} .st1{font-family:\'Montserrat-Medium\';} .st2{font-size:24px;} .st3{font-family:\'Roboto-Light\';} .st4{font-size:11px;} .st5{fill:#020203;} .st6{fill:#0D84C5;} .st7{fill:#FFFFFF;}</style><text transform="matrix(1 0 0 1 -9.570312e-02 16.7998)" class="st0 st1 st2">TECHOFF SUITE</text><text transform="matrix(1 0 0 1 210.3656 16.7998)" class="st3 st4">BY</text><path class="st5" d="M247.4,10.1c-0.5-0.6-1.3-0.9-2.2-0.9c-1.6,0-2.8,1.2-2.8,2.8s1.2,2.8,2.8,2.8c0.9,0,1.7-0.4,2.2-1.1l1.4,1.3 c-0.9,1.1-2.1,1.7-3.6,1.7c-2.8,0-4.8-2-4.8-4.8s2-4.8,4.8-4.8c1.4,0,2.7,0.5,3.6,1.5L247.4,10.1z"/><polygon class="st5" points="233.4,7.5 239.3,7.5 239.3,9.3 235.4,9.3 235.4,11.2 238.8,11.2 238.8,13 235.4,13 235.4,15 239.3,15 239.3,16.8 233.4,16.8 "/><polygon class="st5" points="271.9,7.3 277.4,7.3 277.4,9.2 273.8,9.2 273.8,11.5 276.9,11.5 276.9,13.3 273.8,13.3 273.8,16.7 271.9,16.7 "/><polygon class="st5" points="278.5,7.3 284.1,7.3 284.1,9.2 280.5,9.2 280.5,11.5 283.6,11.5 283.6,13.3 280.5,13.3 280.5,16.7 278.5,16.7 "/><polygon class="st5" points="255.9,12.8 251.9,12.8 251.9,16.7 250,16.7 250,7.3 251.9,7.3 251.9,10.9 255.9,10.9 255.9,7.3 257.9,7.3 257.9,16.7 255.9,16.7 "/><polygon class="st5" points="225.2,7.5 232.3,7.5 232.3,9.4 229.8,9.4 229.8,16.8 227.8,16.8 227.8,9.4 225.2,9.4 "/><polyline class="st5" points="258.3,8.6 260.1,5.8 262.1,5.8 260.3,8.6 258.3,8.6 "/><path class="st5" d="M265.9,7.2c-2.8,0-4.8,2-4.8,4.8s2,4.8,4.8,4.8s4.8-2,4.8-4.8S268.7,7.2,265.9,7.2z"/><polygon class="st6" points="261.8,12.2 267.9,8.6 267.9,15.7 "/><polygon class="st7" points="265.8,16.8 265.7,13.4 262.9,15.2 "/></svg>',
43
44
  'heart-filled': '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.5 3C19.5376 3 22 5.5 22 9C22 16 14.5 20 12 21.5C9.5 20 2 16 2 9C2 5.5 4.5 3 7.5 3C9.35997 3 11 4 12 5C13 4 14.64 3 16.5 3Z"></path></svg>',
44
45
  'heart': '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.5 3C19.5376 3 22 5.5 22 9C22 16 14.5 20 12 21.5C9.5 20 2 16 2 9C2 5.5 4.5 3 7.5 3C9.35997 3 11 4 12 5C13 4 14.64 3 16.5 3ZM12.9339 18.6038C13.8155 18.0485 14.61 17.4955 15.3549 16.9029C18.3337 14.533 20 11.9435 20 9C20 6.64076 18.463 5 16.5 5C15.4241 5 14.2593 5.56911 13.4142 6.41421L12 7.82843L10.5858 6.41421C9.74068 5.56911 8.5759 5 7.5 5C5.55906 5 4 6.6565 4 9C4 11.9435 5.66627 14.533 8.64514 16.9029C9.39 17.4955 10.1845 18.0485 11.0661 18.6038C11.3646 18.7919 11.6611 18.9729 12 19.1752C12.3389 18.9729 12.6354 18.7919 12.9339 18.6038Z"></path></svg>',
45
46
  'history': '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z"></path></svg>',
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './components/TsButton/TsButton';
2
2
  export * from './components/TsCheckbox/TsCheckbox';
3
- export * from './components/TsDropdown/TsDropdown';
3
+ export * from './components/TsDropdowns/TsDropdown/TsDropdown';
4
+ export * from './components/TsDropdowns/TsDropdownFilter/TsDropdownFilter';
4
5
  export * from './components/TsIcon/TsIcon';
5
6
  export * from './components/TsInput/TsInput/TsInput';
6
7
  export * from './components/TsLoader/TsLoader';
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
2
2
 
3
3
  export type TsHeaderProps = {
4
4
  actions: ReactElement;
5
- appName: 'bikestudio' | 'nsc-helmet' | 'opticost' | 'repairability';
5
+ appName: 'bikestudio' | 'nsc-helmet' | 'opticost' | 'repairability' | 'techoff-suite';
6
6
  search?: ReactElement;
7
7
  };
8
8
  export type TsHeaderProfileItemProps = { icon: string; label: string; link: string };
@@ -10,7 +10,7 @@ import { TsButton } from '../../../components/TsButton/TsButton';
10
10
  export const headerArgTypes = {
11
11
  appName: {
12
12
  control: 'select',
13
- options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability'],
13
+ options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability', 'techoff-suite'],
14
14
  description: 'Icon of the button.',
15
15
  },
16
16
  };
Binary file
@@ -1,121 +0,0 @@
1
- .ts-button {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- border: none;
6
- font-size: 14px;
7
- font-weight: 600;
8
- line-height: 16px;
9
- cursor: pointer;
10
- transition: all ease 0.3s;
11
- }
12
- .ts-button > div {
13
- margin-right: 8px;
14
- }
15
- .ts-button > div:last-child {
16
- margin-right: 0px;
17
- }
18
- button:disabled {
19
- cursor: not-allowed;
20
- }
21
- /* ####### */
22
- /* BLOCK */
23
- .ts-button--block {
24
- width: 100%;
25
- }
26
- /* ####### */
27
- /* SIZES */
28
- .ts-button--md {
29
- height: 32px;
30
- padding: 0 14px;
31
- }
32
- .ts-button--md.ts-button--icon-only {
33
- width: 32px;
34
- padding: 0;
35
- }
36
- .ts-button--lg {
37
- height: 40px;
38
- padding: 0 16px;
39
- }
40
- .ts-button--lg.ts-button--icon-only {
41
- width: 40px;
42
- padding: 0;
43
- }
44
- /* ########## */
45
- /* VARIANTS */
46
- .ts-button--primary:not(:disabled) {
47
- background: #3643ba;
48
- color: #ffffff;
49
- }
50
- .ts-button--primary:not(:disabled):hover {
51
- background: #2e3998;
52
- }
53
- .ts-button--primary:not(:disabled):active {
54
- background: #272f76;
55
- }
56
- .ts-button--primary:disabled {
57
- background: #3643ba61;
58
- color: #ffffff;
59
- }
60
- .ts-button--secondary:not(:disabled) {
61
- background: #ebecf7;
62
- color: #3643ba;
63
- }
64
- .ts-button--secondary:not(:disabled):hover {
65
- background: #e3e3f4;
66
- }
67
- .ts-button--secondary:not(:disabled):active {
68
- background: #d7daf1;
69
- }
70
- .ts-button--secondary:disabled {
71
- background: #3643ba0d;
72
- color: #3643ba80;
73
- }
74
- .ts-button--success:not(:disabled) {
75
- background: #02be8a;
76
- color: #ffffff;
77
- }
78
- .ts-button--success:not(:disabled):hover {
79
- background: #029e73;
80
- }
81
- .ts-button--success:not(:disabled):active {
82
- background: #017f5c;
83
- }
84
- .ts-button--success:disabled {
85
- background: #02be8a61;
86
- color: #ffffff;
87
- }
88
- .ts-button--ghost:not(:disabled) {
89
- background: #ffffff;
90
- color: #3643ba;
91
- }
92
- .ts-button--ghost:not(:disabled):hover {
93
- background: #ebecf7;
94
- }
95
- .ts-button--ghost:not(:disabled):active {
96
- background: #e3e3f4;
97
- }
98
- .ts-button--ghost:disabled {
99
- background: #ffffff61;
100
- color: #1d1d1b61;
101
- }
102
- .ts-button--shadow {
103
- box-shadow: 0px 12px 12px 0px #00537d1a;
104
- background: #ffffff;
105
- color: #4e5d6b;
106
- }
107
- /* ######### */
108
- /* ROUNDED */
109
- .ts-button--rounded {
110
- border-radius: 9999px;
111
- }
112
-
113
- /* ######### */
114
- /* GLOBALS */
115
- * {
116
- font-size: 14px;
117
- outline: none;
118
- box-sizing: border-box;
119
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
120
- 'Helvetica Neue', sans-serif;
121
- }
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { PropsWithChildren } from 'react';
3
- import { TsButtonProps } from './TsButton.types';
4
- import './TsButton.css';
5
- export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded, ...props }: PropsWithChildren<TsButtonProps>) => React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import { TsIcon } from '../TsIcon/TsIcon';
3
- import './TsButton.css';
4
- export const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded, ...props }) => {
5
- // #########
6
- // Rendering
7
- return (React.createElement("button", { className: `
8
- ts-button ts-button--${size} ts-button--${variant}
9
- ${block ? 'ts-button--block' : ''}
10
- ${rounded ? 'ts-button--rounded' : ''}
11
- ${icon && !children ? 'ts-button--icon-only' : ''}
12
- `, ...props },
13
- icon && iconDirection === 'left' && React.createElement(TsIcon, { name: icon, size: "16" }),
14
- children && React.createElement("div", null, children),
15
- icon && iconDirection === 'right' && React.createElement(TsIcon, { name: icon, size: "16" })));
16
- };
17
- //# sourceMappingURL=TsButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACyB,EAAE,EAAE;IACrC,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,gCACE,SAAS,EAAE;+BACc,IAAI,eAAe,OAAO;UAC/C,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;UAC/B,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;UACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;OAClD,KACG,KAAK;QAER,IAAI,IAAI,aAAa,KAAK,MAAM,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG;QACpE,QAAQ,IAAI,iCAAM,QAAQ,CAAO;QACjC,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC/D,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import { ButtonHTMLAttributes } from 'react';
2
- export type TsButtonProps = {
3
- icon?: string;
4
- iconDirection?: 'left' | 'right';
5
- size?: 'md' | 'lg';
6
- variant?: 'primary' | 'secondary' | 'success' | 'ghost' | 'shadow';
7
- block?: boolean;
8
- rounded?: boolean;
9
- } & ButtonHTMLAttributes<HTMLButtonElement>;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TsButton.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TsButton.types.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.types.ts"],"names":[],"mappings":""}