@dktunited-techoff/techoff-suite-ui 1.1.0 → 1.2.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 (327) hide show
  1. package/package.json +1 -1
  2. package/src/components/Loader/Loader.css +1 -1
  3. package/src/layouts/Header/Header.tsx +1 -1
  4. package/src/layouts/Header/HeaderSearch.tsx +3 -3
  5. package/src/layouts/Navigation/Navigation.css +4 -4
  6. package/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
  7. package/esm/assets/fonts/Roboto-Light.ttf +0 -0
  8. package/esm/components/Button/Button.css +0 -91
  9. package/esm/components/Button/Button.d.ts +0 -5
  10. package/esm/components/Button/Button.js +0 -17
  11. package/esm/components/Button/Button.js.map +0 -1
  12. package/esm/components/Button/Button.types.d.ts +0 -9
  13. package/esm/components/Button/Button.types.js +0 -2
  14. package/esm/components/Button/Button.types.js.map +0 -1
  15. package/esm/components/Button/__stories__/Button.stories.mdx +0 -74
  16. package/esm/components/Checkbox/Checkbox.css +0 -72
  17. package/esm/components/Checkbox/Checkbox.d.ts +0 -4
  18. package/esm/components/Checkbox/Checkbox.js +0 -18
  19. package/esm/components/Checkbox/Checkbox.js.map +0 -1
  20. package/esm/components/Checkbox/Checkbox.types.d.ts +0 -7
  21. package/esm/components/Checkbox/Checkbox.types.js +0 -2
  22. package/esm/components/Checkbox/Checkbox.types.js.map +0 -1
  23. package/esm/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  24. package/esm/components/Icon/Icon.css +0 -26
  25. package/esm/components/Icon/Icon.d.ts +0 -4
  26. package/esm/components/Icon/Icon.js +0 -12
  27. package/esm/components/Icon/Icon.js.map +0 -1
  28. package/esm/components/Icon/Icon.types.d.ts +0 -4
  29. package/esm/components/Icon/Icon.types.js +0 -2
  30. package/esm/components/Icon/Icon.types.js.map +0 -1
  31. package/esm/components/Icon/__stories__/Icon.stories.mdx +0 -89
  32. package/esm/components/Icon/icons/add-circle.svg +0 -1
  33. package/esm/components/Icon/icons/add.svg +0 -1
  34. package/esm/components/Icon/icons/alert-circle-filled.svg +0 -1
  35. package/esm/components/Icon/icons/alert-circle.svg +0 -1
  36. package/esm/components/Icon/icons/alert-triangle-filled.svg +0 -1
  37. package/esm/components/Icon/icons/alert-triangle.svg +0 -1
  38. package/esm/components/Icon/icons/arrow-diagonal-collapse.svg +0 -1
  39. package/esm/components/Icon/icons/arrow-diagonal-expand.svg +0 -1
  40. package/esm/components/Icon/icons/arrow-down.svg +0 -1
  41. package/esm/components/Icon/icons/arrow-go-back.svg +0 -1
  42. package/esm/components/Icon/icons/arrow-left-right.svg +0 -1
  43. package/esm/components/Icon/icons/arrow-left.svg +0 -1
  44. package/esm/components/Icon/icons/arrow-right.svg +0 -1
  45. package/esm/components/Icon/icons/arrow-up-down.svg +0 -1
  46. package/esm/components/Icon/icons/arrow-up.svg +0 -1
  47. package/esm/components/Icon/icons/award.svg +0 -1
  48. package/esm/components/Icon/icons/check-circle-filled.svg +0 -1
  49. package/esm/components/Icon/icons/check-circle-timer.svg +0 -7
  50. package/esm/components/Icon/icons/check-circle.svg +0 -1
  51. package/esm/components/Icon/icons/check-square-filled.svg +0 -1
  52. package/esm/components/Icon/icons/check-square.svg +0 -1
  53. package/esm/components/Icon/icons/check.svg +0 -1
  54. package/esm/components/Icon/icons/chevron-down.svg +0 -1
  55. package/esm/components/Icon/icons/chevron-left.svg +0 -1
  56. package/esm/components/Icon/icons/chevron-right.svg +0 -1
  57. package/esm/components/Icon/icons/chevron-up.svg +0 -1
  58. package/esm/components/Icon/icons/circle.svg +0 -1
  59. package/esm/components/Icon/icons/close-circle.svg +0 -1
  60. package/esm/components/Icon/icons/close.svg +0 -1
  61. package/esm/components/Icon/icons/currency-euro.svg +0 -1
  62. package/esm/components/Icon/icons/download.svg +0 -1
  63. package/esm/components/Icon/icons/edit.svg +0 -1
  64. package/esm/components/Icon/icons/external-link.svg +0 -1
  65. package/esm/components/Icon/icons/filter-off.svg +0 -1
  66. package/esm/components/Icon/icons/filter.svg +0 -1
  67. package/esm/components/Icon/icons/flashlight-off.svg +0 -1
  68. package/esm/components/Icon/icons/flashlight.svg +0 -1
  69. package/esm/components/Icon/icons/header-bikestudio.svg +0 -32
  70. package/esm/components/Icon/icons/header-nsc-helmet.svg +0 -32
  71. package/esm/components/Icon/icons/header-opticost.svg +0 -32
  72. package/esm/components/Icon/icons/header-repairability.svg +0 -32
  73. package/esm/components/Icon/icons/heart-filled.svg +0 -1
  74. package/esm/components/Icon/icons/heart.svg +0 -1
  75. package/esm/components/Icon/icons/history.svg +0 -1
  76. package/esm/components/Icon/icons/home.svg +0 -1
  77. package/esm/components/Icon/icons/index.d.ts +0 -3
  78. package/esm/components/Icon/icons/index.js +0 -59
  79. package/esm/components/Icon/icons/index.js.map +0 -1
  80. package/esm/components/Icon/icons/index.ts +0 -58
  81. package/esm/components/Icon/icons/link.svg +0 -1
  82. package/esm/components/Icon/icons/list-settings.svg +0 -1
  83. package/esm/components/Icon/icons/lock.svg +0 -1
  84. package/esm/components/Icon/icons/loop-right.svg +0 -1
  85. package/esm/components/Icon/icons/question-circle.svg +0 -1
  86. package/esm/components/Icon/icons/save.svg +0 -1
  87. package/esm/components/Icon/icons/search.svg +0 -1
  88. package/esm/components/Icon/icons/seedling-circle.svg +0 -12
  89. package/esm/components/Icon/icons/square.svg +0 -1
  90. package/esm/components/Icon/icons/tools.svg +0 -1
  91. package/esm/components/Icon/icons/user.svg +0 -1
  92. package/esm/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  93. package/esm/components/Inputs/BooleanInput/BooleanInput.d.ts +0 -4
  94. package/esm/components/Inputs/BooleanInput/BooleanInput.js +0 -13
  95. package/esm/components/Inputs/BooleanInput/BooleanInput.js.map +0 -1
  96. package/esm/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  97. package/esm/components/Inputs/BooleanInput/BooleanInput.types.d.ts +0 -8
  98. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js +0 -2
  99. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js.map +0 -1
  100. package/esm/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  101. package/esm/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  102. package/esm/components/Inputs/Input/Input.css +0 -97
  103. package/esm/components/Inputs/Input/Input.d.ts +0 -4
  104. package/esm/components/Inputs/Input/Input.js +0 -26
  105. package/esm/components/Inputs/Input/Input.js.map +0 -1
  106. package/esm/components/Inputs/Input/Input.tsx +0 -67
  107. package/esm/components/Inputs/Input/Input.types.d.ts +0 -14
  108. package/esm/components/Inputs/Input/Input.types.js +0 -2
  109. package/esm/components/Inputs/Input/Input.types.js.map +0 -1
  110. package/esm/components/Inputs/Input/Input.types.ts +0 -15
  111. package/esm/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  112. package/esm/components/Loader/Loader.css +0 -42
  113. package/esm/components/Loader/Loader.d.ts +0 -4
  114. package/esm/components/Loader/Loader.js +0 -6
  115. package/esm/components/Loader/Loader.js.map +0 -1
  116. package/esm/components/Loader/Loader.types.d.ts +0 -3
  117. package/esm/components/Loader/Loader.types.js +0 -2
  118. package/esm/components/Loader/Loader.types.js.map +0 -1
  119. package/esm/components/Loader/__stories__/Loader.stories.mdx +0 -30
  120. package/esm/components/Select/Select.css +0 -30
  121. package/esm/components/Select/Select.d.ts +0 -4
  122. package/esm/components/Select/Select.js +0 -14
  123. package/esm/components/Select/Select.js.map +0 -1
  124. package/esm/components/Select/Select.types.d.ts +0 -7
  125. package/esm/components/Select/Select.types.js +0 -2
  126. package/esm/components/Select/Select.types.js.map +0 -1
  127. package/esm/components/Select/__stories__/Select.stories.mdx +0 -44
  128. package/esm/hooks/use-click-outside.d.ts +0 -2
  129. package/esm/hooks/use-click-outside.js +0 -14
  130. package/esm/hooks/use-click-outside.js.map +0 -1
  131. package/esm/index.d.ts +0 -11
  132. package/esm/index.js +0 -12
  133. package/esm/index.js.map +0 -1
  134. package/esm/layouts/Header/Header.css +0 -186
  135. package/esm/layouts/Header/Header.d.ts +0 -4
  136. package/esm/layouts/Header/Header.js +0 -14
  137. package/esm/layouts/Header/Header.js.map +0 -1
  138. package/esm/layouts/Header/Header.types.d.ts +0 -23
  139. package/esm/layouts/Header/Header.types.js +0 -2
  140. package/esm/layouts/Header/Header.types.js.map +0 -1
  141. package/esm/layouts/Header/HeaderProfile.d.ts +0 -5
  142. package/esm/layouts/Header/HeaderProfile.js +0 -38
  143. package/esm/layouts/Header/HeaderProfile.js.map +0 -1
  144. package/esm/layouts/Header/HeaderSearch.d.ts +0 -3
  145. package/esm/layouts/Header/HeaderSearch.js +0 -60
  146. package/esm/layouts/Header/HeaderSearch.js.map +0 -1
  147. package/esm/layouts/Header/__stories__/Header.stories.mdx +0 -71
  148. package/esm/layouts/Navigation/Navigation.css +0 -74
  149. package/esm/layouts/Navigation/Navigation.d.ts +0 -7
  150. package/esm/layouts/Navigation/Navigation.js +0 -29
  151. package/esm/layouts/Navigation/Navigation.js.map +0 -1
  152. package/esm/layouts/Navigation/Navigation.types.d.ts +0 -10
  153. package/esm/layouts/Navigation/Navigation.types.js +0 -2
  154. package/esm/layouts/Navigation/Navigation.types.js.map +0 -1
  155. package/esm/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
  156. package/esm/utils/string.utils.d.ts +0 -1
  157. package/esm/utils/string.utils.js +0 -2
  158. package/esm/utils/string.utils.js.map +0 -1
  159. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  160. package/lib/assets/fonts/Roboto-Light.ttf +0 -0
  161. package/lib/components/Button/Button.css +0 -91
  162. package/lib/components/Button/Button.d.ts +0 -5
  163. package/lib/components/Button/Button.js +0 -21
  164. package/lib/components/Button/Button.js.map +0 -1
  165. package/lib/components/Button/Button.types.d.ts +0 -9
  166. package/lib/components/Button/Button.types.js +0 -3
  167. package/lib/components/Button/Button.types.js.map +0 -1
  168. package/lib/components/Button/__stories__/Button.stories.mdx +0 -74
  169. package/lib/components/Checkbox/Checkbox.css +0 -72
  170. package/lib/components/Checkbox/Checkbox.d.ts +0 -4
  171. package/lib/components/Checkbox/Checkbox.js +0 -22
  172. package/lib/components/Checkbox/Checkbox.js.map +0 -1
  173. package/lib/components/Checkbox/Checkbox.types.d.ts +0 -7
  174. package/lib/components/Checkbox/Checkbox.types.js +0 -3
  175. package/lib/components/Checkbox/Checkbox.types.js.map +0 -1
  176. package/lib/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  177. package/lib/components/Icon/Icon.css +0 -26
  178. package/lib/components/Icon/Icon.d.ts +0 -4
  179. package/lib/components/Icon/Icon.js +0 -16
  180. package/lib/components/Icon/Icon.js.map +0 -1
  181. package/lib/components/Icon/Icon.types.d.ts +0 -4
  182. package/lib/components/Icon/Icon.types.js +0 -3
  183. package/lib/components/Icon/Icon.types.js.map +0 -1
  184. package/lib/components/Icon/__stories__/Icon.stories.mdx +0 -89
  185. package/lib/components/Icon/icons/add-circle.svg +0 -1
  186. package/lib/components/Icon/icons/add.svg +0 -1
  187. package/lib/components/Icon/icons/alert-circle-filled.svg +0 -1
  188. package/lib/components/Icon/icons/alert-circle.svg +0 -1
  189. package/lib/components/Icon/icons/alert-triangle-filled.svg +0 -1
  190. package/lib/components/Icon/icons/alert-triangle.svg +0 -1
  191. package/lib/components/Icon/icons/arrow-diagonal-collapse.svg +0 -1
  192. package/lib/components/Icon/icons/arrow-diagonal-expand.svg +0 -1
  193. package/lib/components/Icon/icons/arrow-down.svg +0 -1
  194. package/lib/components/Icon/icons/arrow-go-back.svg +0 -1
  195. package/lib/components/Icon/icons/arrow-left-right.svg +0 -1
  196. package/lib/components/Icon/icons/arrow-left.svg +0 -1
  197. package/lib/components/Icon/icons/arrow-right.svg +0 -1
  198. package/lib/components/Icon/icons/arrow-up-down.svg +0 -1
  199. package/lib/components/Icon/icons/arrow-up.svg +0 -1
  200. package/lib/components/Icon/icons/award.svg +0 -1
  201. package/lib/components/Icon/icons/check-circle-filled.svg +0 -1
  202. package/lib/components/Icon/icons/check-circle-timer.svg +0 -7
  203. package/lib/components/Icon/icons/check-circle.svg +0 -1
  204. package/lib/components/Icon/icons/check-square-filled.svg +0 -1
  205. package/lib/components/Icon/icons/check-square.svg +0 -1
  206. package/lib/components/Icon/icons/check.svg +0 -1
  207. package/lib/components/Icon/icons/chevron-down.svg +0 -1
  208. package/lib/components/Icon/icons/chevron-left.svg +0 -1
  209. package/lib/components/Icon/icons/chevron-right.svg +0 -1
  210. package/lib/components/Icon/icons/chevron-up.svg +0 -1
  211. package/lib/components/Icon/icons/circle.svg +0 -1
  212. package/lib/components/Icon/icons/close-circle.svg +0 -1
  213. package/lib/components/Icon/icons/close.svg +0 -1
  214. package/lib/components/Icon/icons/currency-euro.svg +0 -1
  215. package/lib/components/Icon/icons/download.svg +0 -1
  216. package/lib/components/Icon/icons/edit.svg +0 -1
  217. package/lib/components/Icon/icons/external-link.svg +0 -1
  218. package/lib/components/Icon/icons/filter-off.svg +0 -1
  219. package/lib/components/Icon/icons/filter.svg +0 -1
  220. package/lib/components/Icon/icons/flashlight-off.svg +0 -1
  221. package/lib/components/Icon/icons/flashlight.svg +0 -1
  222. package/lib/components/Icon/icons/header-bikestudio.svg +0 -32
  223. package/lib/components/Icon/icons/header-nsc-helmet.svg +0 -32
  224. package/lib/components/Icon/icons/header-opticost.svg +0 -32
  225. package/lib/components/Icon/icons/header-repairability.svg +0 -32
  226. package/lib/components/Icon/icons/heart-filled.svg +0 -1
  227. package/lib/components/Icon/icons/heart.svg +0 -1
  228. package/lib/components/Icon/icons/history.svg +0 -1
  229. package/lib/components/Icon/icons/home.svg +0 -1
  230. package/lib/components/Icon/icons/index.d.ts +0 -3
  231. package/lib/components/Icon/icons/index.js +0 -62
  232. package/lib/components/Icon/icons/index.js.map +0 -1
  233. package/lib/components/Icon/icons/index.ts +0 -58
  234. package/lib/components/Icon/icons/link.svg +0 -1
  235. package/lib/components/Icon/icons/list-settings.svg +0 -1
  236. package/lib/components/Icon/icons/lock.svg +0 -1
  237. package/lib/components/Icon/icons/loop-right.svg +0 -1
  238. package/lib/components/Icon/icons/question-circle.svg +0 -1
  239. package/lib/components/Icon/icons/save.svg +0 -1
  240. package/lib/components/Icon/icons/search.svg +0 -1
  241. package/lib/components/Icon/icons/seedling-circle.svg +0 -12
  242. package/lib/components/Icon/icons/square.svg +0 -1
  243. package/lib/components/Icon/icons/tools.svg +0 -1
  244. package/lib/components/Icon/icons/user.svg +0 -1
  245. package/lib/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  246. package/lib/components/Inputs/BooleanInput/BooleanInput.d.ts +0 -4
  247. package/lib/components/Inputs/BooleanInput/BooleanInput.js +0 -17
  248. package/lib/components/Inputs/BooleanInput/BooleanInput.js.map +0 -1
  249. package/lib/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  250. package/lib/components/Inputs/BooleanInput/BooleanInput.types.d.ts +0 -8
  251. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js +0 -3
  252. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js.map +0 -1
  253. package/lib/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  254. package/lib/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  255. package/lib/components/Inputs/Input/Input.css +0 -97
  256. package/lib/components/Inputs/Input/Input.d.ts +0 -4
  257. package/lib/components/Inputs/Input/Input.js +0 -30
  258. package/lib/components/Inputs/Input/Input.js.map +0 -1
  259. package/lib/components/Inputs/Input/Input.tsx +0 -67
  260. package/lib/components/Inputs/Input/Input.types.d.ts +0 -14
  261. package/lib/components/Inputs/Input/Input.types.js +0 -3
  262. package/lib/components/Inputs/Input/Input.types.js.map +0 -1
  263. package/lib/components/Inputs/Input/Input.types.ts +0 -15
  264. package/lib/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  265. package/lib/components/Loader/Loader.css +0 -42
  266. package/lib/components/Loader/Loader.d.ts +0 -4
  267. package/lib/components/Loader/Loader.js +0 -10
  268. package/lib/components/Loader/Loader.js.map +0 -1
  269. package/lib/components/Loader/Loader.types.d.ts +0 -3
  270. package/lib/components/Loader/Loader.types.js +0 -3
  271. package/lib/components/Loader/Loader.types.js.map +0 -1
  272. package/lib/components/Loader/__stories__/Loader.stories.mdx +0 -30
  273. package/lib/components/Select/Select.css +0 -30
  274. package/lib/components/Select/Select.d.ts +0 -4
  275. package/lib/components/Select/Select.js +0 -18
  276. package/lib/components/Select/Select.js.map +0 -1
  277. package/lib/components/Select/Select.types.d.ts +0 -7
  278. package/lib/components/Select/Select.types.js +0 -3
  279. package/lib/components/Select/Select.types.js.map +0 -1
  280. package/lib/components/Select/__stories__/Select.stories.mdx +0 -44
  281. package/lib/hooks/use-click-outside.d.ts +0 -2
  282. package/lib/hooks/use-click-outside.js +0 -18
  283. package/lib/hooks/use-click-outside.js.map +0 -1
  284. package/lib/index.d.ts +0 -11
  285. package/lib/index.js +0 -28
  286. package/lib/index.js.map +0 -1
  287. package/lib/layouts/Header/Header.css +0 -186
  288. package/lib/layouts/Header/Header.d.ts +0 -4
  289. package/lib/layouts/Header/Header.js +0 -18
  290. package/lib/layouts/Header/Header.js.map +0 -1
  291. package/lib/layouts/Header/Header.types.d.ts +0 -23
  292. package/lib/layouts/Header/Header.types.js +0 -3
  293. package/lib/layouts/Header/Header.types.js.map +0 -1
  294. package/lib/layouts/Header/HeaderProfile.d.ts +0 -5
  295. package/lib/layouts/Header/HeaderProfile.js +0 -43
  296. package/lib/layouts/Header/HeaderProfile.js.map +0 -1
  297. package/lib/layouts/Header/HeaderSearch.d.ts +0 -3
  298. package/lib/layouts/Header/HeaderSearch.js +0 -64
  299. package/lib/layouts/Header/HeaderSearch.js.map +0 -1
  300. package/lib/layouts/Header/__stories__/Header.stories.mdx +0 -71
  301. package/lib/layouts/Navigation/Navigation.css +0 -74
  302. package/lib/layouts/Navigation/Navigation.d.ts +0 -7
  303. package/lib/layouts/Navigation/Navigation.js +0 -35
  304. package/lib/layouts/Navigation/Navigation.js.map +0 -1
  305. package/lib/layouts/Navigation/Navigation.types.d.ts +0 -10
  306. package/lib/layouts/Navigation/Navigation.types.js +0 -3
  307. package/lib/layouts/Navigation/Navigation.types.js.map +0 -1
  308. package/lib/layouts/Navigation/__stories__/Navigation.stories.mdx +0 -51
  309. package/lib/utils/string.utils.d.ts +0 -1
  310. package/lib/utils/string.utils.js +0 -6
  311. package/lib/utils/string.utils.js.map +0 -1
  312. package/src/components/Checkbox/Checkbox.css +0 -72
  313. package/src/components/Checkbox/Checkbox.tsx +0 -26
  314. package/src/components/Checkbox/Checkbox.types.ts +0 -7
  315. package/src/components/Checkbox/__stories__/Checkbox.stories.mdx +0 -56
  316. package/src/components/Inputs/BooleanInput/BooleanInput.css +0 -58
  317. package/src/components/Inputs/BooleanInput/BooleanInput.tsx +0 -24
  318. package/src/components/Inputs/BooleanInput/BooleanInput.types.ts +0 -8
  319. package/src/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +0 -53
  320. package/src/components/Inputs/Input/Input.css +0 -97
  321. package/src/components/Inputs/Input/Input.tsx +0 -67
  322. package/src/components/Inputs/Input/Input.types.ts +0 -15
  323. package/src/components/Inputs/Input/__stories__/Input.stories.mdx +0 -95
  324. package/src/components/Select/Select.css +0 -30
  325. package/src/components/Select/Select.tsx +0 -21
  326. package/src/components/Select/Select.types.ts +0 -3
  327. package/src/components/Select/__stories__/Select.stories.mdx +0 -44
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HeaderProfile = exports.HeaderProfileItem = void 0;
4
- const React = require("react");
5
- const react_1 = require("react");
6
- const Icon_1 = require("../../components/Icon/Icon");
7
- const use_click_outside_1 = require("../../hooks/use-click-outside");
8
- const string_utils_1 = require("../../utils/string.utils");
9
- const HeaderProfileItem = ({ icon, label, link }) => {
10
- // ########
11
- // Handlers
12
- const handleNavigate = () => window.open(link, '_blank', 'noreferrer');
13
- // #########
14
- // Rendering
15
- return (React.createElement("div", { className: "header-profile-menu-item", onClick: handleNavigate },
16
- React.createElement("div", { className: "header-profile-menu-item-icon" },
17
- React.createElement(Icon_1.Icon, { name: icon, size: "16" })),
18
- React.createElement("div", { className: "header-profile-menu-item-label" }, label),
19
- React.createElement("div", { className: "header-profile-menu-item-icon" },
20
- React.createElement(Icon_1.Icon, { name: "external-link", size: "16" }))));
21
- };
22
- exports.HeaderProfileItem = HeaderProfileItem;
23
- const HeaderProfile = ({ children, firstname, lastname }) => {
24
- const [isOpen, setIsOpen] = (0, react_1.useState)(false);
25
- const ref = (0, use_click_outside_1.useClickOutside)(() => setIsOpen(false));
26
- // #########
27
- // Rendering
28
- return (React.createElement("div", { className: "header-profile-container", ref: ref },
29
- React.createElement("div", { className: "header-profile-dropdown", onClick: () => children && setIsOpen(prev => !prev) },
30
- React.createElement("div", { className: "header-profile-img-container" },
31
- React.createElement("div", { className: "header-profile-img-icon" },
32
- React.createElement(Icon_1.Icon, { name: "user", size: "16" }))),
33
- React.createElement("div", { className: "header-profile-name" },
34
- (0, string_utils_1.capitalize)(firstname),
35
- " ",
36
- lastname.charAt(0).toUpperCase(),
37
- "."),
38
- children && (React.createElement("div", { className: "header-profile-chevron" },
39
- React.createElement(Icon_1.Icon, { name: isOpen ? 'chevron-up' : 'chevron-down', size: "16" })))),
40
- isOpen && React.createElement("div", { className: "header-profile-menu" }, children)));
41
- };
42
- exports.HeaderProfile = HeaderProfile;
43
- //# sourceMappingURL=HeaderProfile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderProfile.js","sourceRoot":"","sources":["../../../src/layouts/Header/HeaderProfile.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAoD;AACpD,qDAAkD;AAClD,qEAAgE;AAChE,2DAAsD;AAG/C,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAA0B,EAAE,EAAE;IACjF,WAAW;IACX,WAAW;IACX,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,MAAM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AC;;gBAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;oBACrD;YAEL,QAAQ,IAAI,CACX,6BAAK,SAAS,EAAC,wBAAwB;gBACrC,oBAAC,WAAI,IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,EAAE,IAAI,EAAC,IAAI,GAAG,CAC5D,CACP,CACG;QAEL,MAAM,IAAI,6BAAK,SAAS,EAAC,qBAAqB,IAAE,QAAQ,CAAO,CAC5D,CACP,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,aAAa,iBA4BxB"}
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { HeaderSearchProps } from './Header.types';
3
- export declare const HeaderSearch: ({ getItemLabel, getItemValue, loadItems, noDataLabel, placeholder, onChange, }: HeaderSearchProps) => React.JSX.Element;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HeaderSearch = void 0;
4
- const React = require("react");
5
- const react_1 = require("react");
6
- const Input_1 = require("../../components/Inputs/Input/Input");
7
- const Loader_1 = require("../../components/Loader/Loader");
8
- const use_click_outside_1 = require("../../hooks/use-click-outside");
9
- const HeaderSearch = ({ getItemLabel, getItemValue, loadItems, noDataLabel, placeholder, onChange, }) => {
10
- const [searchValue, setSearchValue] = (0, react_1.useState)('');
11
- const [items, setItems] = (0, react_1.useState)([]);
12
- const [isLoading, setIsLoading] = (0, react_1.useState)(false);
13
- const [showItems, setShowItems] = (0, react_1.useState)(false);
14
- const ref = (0, use_click_outside_1.useClickOutside)(() => setShowItems(false));
15
- // #######
16
- // Helpers
17
- const getBeforeMatch = (item) => {
18
- const label = getItemLabel(item);
19
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
20
- return label.substring(0, matchStartIndex);
21
- };
22
- const getMatch = (item) => {
23
- const label = getItemLabel(item);
24
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
25
- const matchEndIndex = matchStartIndex + searchValue.length;
26
- return label.substring(matchStartIndex, matchEndIndex);
27
- };
28
- const getAfterMatch = (item) => {
29
- const label = getItemLabel(item);
30
- const matchStartIndex = label.toLowerCase().indexOf(searchValue.toLowerCase());
31
- const matchEndIndex = matchStartIndex + searchValue.length;
32
- return label.substring(matchEndIndex);
33
- };
34
- // ########
35
- // Watchers
36
- (0, react_1.useEffect)(() => {
37
- if (searchValue === '') {
38
- setShowItems(false);
39
- setItems([]);
40
- setIsLoading(false);
41
- }
42
- else {
43
- setShowItems(true);
44
- setIsLoading(true);
45
- loadItems(searchValue)
46
- .then(setItems)
47
- .finally(() => setIsLoading(false));
48
- }
49
- }, [searchValue]);
50
- // #########
51
- // Rendering
52
- return (React.createElement("div", { className: "header-search", ref: ref },
53
- React.createElement(Input_1.Input, { placeholder: placeholder, icon: "search", size: "lg", value: searchValue, variant: "shadow", resetable: true, rounded: true, onChange: setSearchValue, onFocus: () => setShowItems(true) }),
54
- showItems && searchValue !== '' && (React.createElement("div", { className: "header-search-items-container" },
55
- isLoading && (React.createElement("div", { className: "header-search-loading" },
56
- React.createElement(Loader_1.Loader, { size: "sm" }))),
57
- !isLoading && items.length === 0 && React.createElement("div", { className: "header-search-no-items" }, noDataLabel),
58
- !isLoading && items.length > 0 && (React.createElement("div", { className: "header-search-items" }, items.map(item => (React.createElement("div", { className: "header-search-item", onClick: () => onChange(getItemValue(item)) },
59
- getBeforeMatch(item),
60
- React.createElement("span", { className: "header-search-item--match" }, getMatch(item)),
61
- getAfterMatch(item))))))))));
62
- };
63
- exports.HeaderSearch = HeaderSearch;
64
- //# sourceMappingURL=HeaderSearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderSearch.js","sourceRoot":"","sources":["../../../src/layouts/Header/HeaderSearch.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAA4C;AAC5C,+DAA4D;AAC5D,2DAAwD;AACxD,qEAAgE;AAGzD,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,SAAS,IAAI,CACZ,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,oBAAC,eAAM,IAAC,IAAI,EAAC,IAAI,GAAG,CAChB,CACP;YACA,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,6BAAK,SAAS,EAAC,wBAAwB,IAAE,WAAW,CAAO;YAC/F,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACjC,6BAAK,SAAS,EAAC,qBAAqB,IACjC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAC,oBAAoB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC5E,cAAc,CAAC,IAAI,CAAC;gBACrB,8BAAM,SAAS,EAAC,2BAA2B,IAAE,QAAQ,CAAC,IAAI,CAAC,CAAQ;gBAClE,aAAa,CAAC,IAAI,CAAC,CAChB,CACP,CAAC,CACE,CACP,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAzFW,QAAA,YAAY,gBAyFvB"}
@@ -1,71 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Header } from '../Header';
4
- import { HeaderProfile, HeaderProfileItem } from '../HeaderProfile';
5
- import { HeaderSearch } from '../HeaderSearch';
6
- import { Button } from '../../../components/Button/Button';
7
-
8
- <Meta title="Layouts/Header" />
9
-
10
- export const headerArgTypes = {
11
- appName: {
12
- control: 'select',
13
- options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability'],
14
- description: 'Icon of the button.',
15
- },
16
- };
17
-
18
- export const loadItems = () => {
19
- return Promise.resolve([
20
- { id: 1, label: 'Item 1' },
21
- { id: 2, label: 'Item 2' },
22
- { id: 3, label: 'Item 3' },
23
- { id: 4, label: 'Item 4' },
24
- { id: 5, label: 'Item 5' },
25
- { id: 6, label: 'Item 6' },
26
- { id: 7, label: 'Item 7' },
27
- { id: 8, label: 'Item 8' },
28
- { id: 9, label: 'Item 9' },
29
- ]);
30
- };
31
-
32
- # Header
33
-
34
- The header will allow users to quickly find the information they need at a glance but also make some actions. The header is therefore central in the design of each application: it contains all the essential information, obvious shortcuts, which will help boost Deacthlon Techoff brand image.
35
-
36
- ## Overview
37
-
38
- <Canvas>
39
- <Story
40
- name="Overview"
41
- args={{
42
- actions: (
43
- <>
44
- <Button icon="add" size="lg" variant="shadow" rounded />
45
- <HeaderProfile firstname="John" lastname="Doe">
46
- <HeaderProfileItem icon="alert-triangle" label="Contact support" link="" />
47
- <HeaderProfileItem icon="award" label="Trainings" link="" />
48
- </HeaderProfile>
49
- </>
50
- ),
51
- appName: 'repairability',
52
- search: (
53
- <HeaderSearch
54
- getItemLabel={item => item.label}
55
- getItemValue={item => item.id}
56
- loadItems={loadItems}
57
- noDataLabel="No item found."
58
- placeholder="Search something in the application"
59
- onChange={() => {}}
60
- />
61
- ),
62
- }}
63
- argTypes={headerArgTypes}
64
- >
65
- {args => <Header {...args} />}
66
- </Story>
67
- </Canvas>
68
-
69
- ## Props
70
-
71
- <ArgsTable story="Overview" of={Header} />
@@ -1,74 +0,0 @@
1
- .navigation {
2
- display: flex;
3
- align-items: center;
4
- height: 32px;
5
- padding: 0 24px;
6
- }
7
-
8
- /* ############ */
9
- /* BREADCRUMB */
10
- .breadcrumb {
11
- display: flex;
12
- align-items: center;
13
- padding-right: 20px;
14
- }
15
- .breadcrumb-container {
16
- display: flex;
17
- align-items: center;
18
- }
19
- .breadcrumb-chevron {
20
- padding: 0 8px;
21
- color: #00689d;
22
- }
23
- .breadcrumb-item {
24
- display: flex;
25
- align-items: center;
26
- height: 32px;
27
- border-radius: 9999px;
28
- color: #00689d;
29
- }
30
- .breadcrumb-item--highlight {
31
- padding: 0 20px;
32
- box-shadow: 0px 6px 6px 0px #00537d1a;
33
- background: linear-gradient(270.22deg, #007dbc 43.94%, #7ebee0 114.83%);
34
- color: #ffffff;
35
- }
36
- .breadcrumb-item--link {
37
- cursor: pointer;
38
- }
39
- .breadcrumb-item--link:hover {
40
- text-decoration: underline;
41
- }
42
- .breadcrumb-item--icon {
43
- padding-right: 8px;
44
- }
45
-
46
- /* ######### */
47
- /* DIVIDER */
48
- .navigation-divider {
49
- flex: 1;
50
- height: 1px;
51
- margin: 4px 0;
52
- background: #bedeef;
53
- }
54
-
55
- /* ######### */
56
- /* ACTIONS */
57
- .navigation-actions {
58
- /* flex items-center [&>*]:ml-4 */
59
- display: flex;
60
- align-items: center;
61
- }
62
- .navigation-actions > * {
63
- margin-left: 16px;
64
- }
65
-
66
- /* ######### */
67
- /* GLOBALS */
68
- * {
69
- font-size: 14px;
70
- outline: none;
71
- box-sizing: border-box;
72
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
73
- 'Helvetica Neue', sans-serif;
74
- }
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { PropsWithChildren } from 'react';
3
- import { NavigationBreadcrumbItemProps, NavigationProps } from './Navigation.types';
4
- import './Navigation.css';
5
- export declare const NavigationBreadcrumbDivider: () => React.JSX.Element;
6
- export declare const NavigationBreadcrumbItem: ({ children, icon, highlight, onClick, }: PropsWithChildren<NavigationBreadcrumbItemProps>) => React.JSX.Element;
7
- export declare const Navigation: ({ actions, breadcrumbs }: NavigationProps) => React.JSX.Element;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Navigation = exports.NavigationBreadcrumbItem = exports.NavigationBreadcrumbDivider = void 0;
4
- const React = require("react");
5
- const Icon_1 = require("../../components/Icon/Icon");
6
- require("./Navigation.css");
7
- const NavigationBreadcrumbDivider = () => {
8
- // #########
9
- // Rendering
10
- return (React.createElement("div", { className: "breadcrumb-chevron" },
11
- React.createElement(Icon_1.Icon, { name: "chevron-right" })));
12
- };
13
- exports.NavigationBreadcrumbDivider = NavigationBreadcrumbDivider;
14
- const NavigationBreadcrumbItem = ({ children, icon, highlight, onClick, }) => {
15
- // #########
16
- // Rendering
17
- return (React.createElement("div", { className: `
18
- breadcrumb-item
19
- ${highlight ? 'breadcrumb-item--highlight' : ''} ${onClick ? 'breadcrumb-item--link' : ''}
20
- `, onClick: onClick },
21
- icon && (React.createElement("div", { className: "breadcrumb-item--icon" },
22
- React.createElement(Icon_1.Icon, { name: icon, size: "16" }))),
23
- children));
24
- };
25
- exports.NavigationBreadcrumbItem = NavigationBreadcrumbItem;
26
- const Navigation = ({ actions, breadcrumbs }) => {
27
- // #########
28
- // Rendering
29
- return (React.createElement("div", { className: "navigation" },
30
- React.createElement("div", { className: "breadcrumb" }, breadcrumbs),
31
- React.createElement("div", { className: "navigation-divider" }),
32
- React.createElement("div", { className: "navigation-actions" }, actions)));
33
- };
34
- exports.Navigation = Navigation;
35
- //# sourceMappingURL=Navigation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/layouts/Navigation/Navigation.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,qDAAkD;AAElD,4BAA0B;AAEnB,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,oBAAoB;QACjC,oBAAC,WAAI,IAAC,IAAI,EAAC,eAAe,GAAG,CACzB,CACP,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,2BAA2B,+BAQtC;AAEK,MAAM,wBAAwB,GAAG,CAAC,EACvC,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,OAAO,GAC0C,EAAE,EAAE;IACrD,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BACE,SAAS,EAAE;;UAEP,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE;OAC1F,EACD,OAAO,EAAE,OAAO;QAEf,IAAI,IAAI,CACP,6BAAK,SAAS,EAAC,uBAAuB;YACpC,oBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC1B,CACP;QAEA,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,wBAAwB,4BAyBnC;AAEK,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,WAAW,EAAmB,EAAE,EAAE;IACtE,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAC,YAAY;QACzB,6BAAK,SAAS,EAAC,YAAY,IAAE,WAAW,CAAO;QAC/C,6BAAK,SAAS,EAAC,oBAAoB,GAAG;QACtC,6BAAK,SAAS,EAAC,oBAAoB,IAAE,OAAO,CAAO,CAC/C,CACP,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB"}
@@ -1,10 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export type NavigationProps = {
3
- actions?: ReactElement;
4
- breadcrumbs: ReactElement;
5
- };
6
- export type NavigationBreadcrumbItemProps = {
7
- icon?: string;
8
- highlight?: boolean;
9
- onClick?: () => void;
10
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Navigation.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Navigation.types.js","sourceRoot":"","sources":["../../../src/layouts/Navigation/Navigation.types.ts"],"names":[],"mappings":""}
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Navigation, NavigationBreadcrumbItem, NavigationBreadcrumbDivider } from '../Navigation';
4
- import { Button } from '../../../components/Button/Button';
5
- import { icons } from '../../../components/Icon/icons';
6
-
7
- <Meta title="Layouts/Navigation" />
8
-
9
- # Navigation
10
-
11
- Breadcrumbs are an important navigation component that shows content hierarchy. They allow users to be aware of their current location in the hierarchical structure of the application. Breadcrumbs enable users to quickly move up to a parent level. Moreover this navigation component allows user to make some actions.
12
-
13
- ## Overview
14
-
15
- <Canvas>
16
- <Story
17
- name="Overview"
18
- args={{
19
- actions: (
20
- <>
21
- <Button icon="check" onClick={() => {}}>
22
- Action 1
23
- </Button>
24
- <Button icon="add" onClick={() => {}}>
25
- Action 2
26
- </Button>
27
- </>
28
- ),
29
- breadcrumbs: (
30
- <>
31
- <NavigationBreadcrumbItem icon="home" onClick={() => {}}>
32
- Home
33
- </NavigationBreadcrumbItem>
34
- <NavigationBreadcrumbDivider />
35
- <NavigationBreadcrumbItem onClick={() => {}}>Menu Item 1</NavigationBreadcrumbItem>
36
- <NavigationBreadcrumbDivider />
37
- <NavigationBreadcrumbItem highlight>Menu Item 2</NavigationBreadcrumbItem>
38
- </>
39
- )
40
- }}
41
-
42
- >
43
-
44
- {args => <Navigation {...args} />}
45
-
46
- </Story>
47
- </Canvas>
48
-
49
- ## Props
50
-
51
- <ArgsTable story="Overview" of={Navigation} />
@@ -1 +0,0 @@
1
- export declare const capitalize: (str: string) => string;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.capitalize = void 0;
4
- const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
5
- exports.capitalize = capitalize;
6
- //# sourceMappingURL=string.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.utils.js","sourceRoot":"","sources":["../../src/utils/string.utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAAvF,QAAA,UAAU,cAA6E"}
@@ -1,72 +0,0 @@
1
- .checkbox {
2
- display: flex;
3
- align-items: center;
4
- cursor: pointer;
5
- }
6
- /* ########## */
7
- /* DISABLED */
8
- .checkbox--disabled {
9
- cursor: not-allowed;
10
- }
11
- .checkbox--disabled .checkbox-box {
12
- color: #999999;
13
- }
14
- .checkbox--disabled:hover .checkbox-box {
15
- background: transparent;
16
- }
17
- /* ##### */
18
- /* BOX */
19
- .checkbox:hover .checkbox-box {
20
- background: #e7f3f9;
21
- }
22
- .checkbox-box {
23
- position: relative;
24
- display: flex;
25
- align-items: center;
26
- justify-content: center;
27
- width: 24px;
28
- height: 24px;
29
- border-radius: 6px;
30
- color: #007dbc;
31
- transition: all ease 0.3s;
32
- }
33
- .checkbox-box::before {
34
- content: '';
35
- position: absolute;
36
- width: 16px;
37
- height: 16px;
38
- border-radius: 6px;
39
- background: #ffffff;
40
- z-index: 10;
41
- }
42
- .checkbox-box .icon {
43
- z-index: 20;
44
- }
45
-
46
- /* ################# */
47
- /* LABEL / CAPTION */
48
- .checkbox-container {
49
- width: 100%;
50
- margin-left: 4px;
51
- padding: 4px 8px;
52
- border-radius: 6px;
53
- }
54
- .checkbox-container--with-caption .checkbox-label {
55
- color: #007dbc;
56
- font-weight: 700;
57
- }
58
- .checkbox-caption {
59
- color: #404040;
60
- font-size: 12px;
61
- font-style: italic;
62
- }
63
-
64
- /* ######### */
65
- /* GLOBALS */
66
- * {
67
- font-size: 14px;
68
- outline: none;
69
- box-sizing: border-box;
70
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
71
- 'Helvetica Neue', sans-serif;
72
- }
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { Icon } from '../Icon/Icon';
3
- import { CheckboxProps } from './Checkbox.types';
4
- import './Checkbox.css';
5
-
6
- export const Checkbox = ({ caption, label, checked, disabled, onChange }: CheckboxProps) => {
7
- // ########
8
- // Handlers
9
- const handleChange = () => !disabled && onChange(!checked);
10
-
11
- // #########
12
- // Rendering
13
- return (
14
- <div className={`checkbox ${disabled ? 'checkbox--disabled' : ''}`} onClick={handleChange}>
15
- <div className="checkbox-box">
16
- {checked && <Icon name="check-square-filled" />}
17
- {!checked && <Icon name="square" />}
18
- </div>
19
-
20
- <div className={`checkbox-container ${caption ? 'checkbox-container--with-caption' : ''}`}>
21
- <div className="checkbox-label">{label}</div>
22
- {caption && <div className="checkbox-caption">{caption}</div>}
23
- </div>
24
- </div>
25
- );
26
- };
@@ -1,7 +0,0 @@
1
- export type CheckboxProps = {
2
- caption?: string;
3
- label: string;
4
- checked?: boolean;
5
- disabled?: boolean;
6
- onChange: (value: boolean) => void;
7
- };
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Checkbox } from '../Checkbox';
4
-
5
- <Meta title="Components/Checkbox" />
6
-
7
- export const checkboxArgTypes = {
8
- caption: {
9
- control: 'text',
10
- description: 'Caption of the checkbox.',
11
- },
12
- label: {
13
- control: 'text',
14
- description: 'Label of the checkbox.',
15
- },
16
- checked: {
17
- control: 'boolean',
18
- description: 'State of the checkbox.',
19
- table: { defaultValue: { summary: 'false' } },
20
- },
21
- disabled: {
22
- control: 'boolean',
23
- description: 'Enable state of the checkbox.',
24
- table: { defaultValue: { summary: 'false' } },
25
- },
26
- onChange: {
27
- control: 'function',
28
- description: 'The handler called when clicking on the checkbox.',
29
- },
30
- };
31
-
32
- # Checkbox
33
-
34
- Checkboxes are applied when users can select all, several, or none of the options from a given list.
35
-
36
- ## Overview
37
-
38
- <Canvas>
39
- <Story
40
- name="Overview"
41
- args={{
42
- label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
43
- caption:
44
- 'Auctor nisl justo, sed posuere est dignissim nec. Integer ultricies, metus ac imperdiet ullamcorper, est justo viverra nisl, in posuere dui urna eget quam.',
45
- checked: false,
46
- disabled: false,
47
- }}
48
- argTypes={checkboxArgTypes}
49
- >
50
- {args => <Checkbox {...args}>{args.children}</Checkbox>}
51
- </Story>
52
- </Canvas>
53
-
54
- ## Props
55
-
56
- <ArgsTable story="Overview" of={Checkbox} />
@@ -1,58 +0,0 @@
1
- .boolean-input {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
- .boolean-input > label {
6
- display: block;
7
- margin-bottom: 4px;
8
- color: #012b49;
9
- font-weight: 700;
10
- }
11
- .boolean-input-container {
12
- display: flex;
13
- }
14
-
15
- .boolean-input--disabled {
16
- opacity: 0.5;
17
- }
18
- .boolean-input--disabled .boolean-input-content > div {
19
- cursor: not-allowed;
20
- }
21
-
22
- /* ######## */
23
- /* INPUTS */
24
- .boolean-input-content {
25
- display: flex;
26
- height: 32px;
27
- border-radius: 6px;
28
- overflow: hidden;
29
- }
30
- .boolean-input-content > div {
31
- display: flex;
32
- align-items: center;
33
- justify-content: center;
34
- min-width: 44px;
35
- padding: 12px;
36
- background: #e7f3f9;
37
- color: #007dbc;
38
- font-weight: 700;
39
- cursor: pointer;
40
- transition: all ease 0.3s;
41
- }
42
- .boolean-input-content > div:first-child {
43
- border-right: 1px solid #007dbc;
44
- }
45
- .boolean-input-content > .boolean-input--selected {
46
- background: #007dbc;
47
- color: #ffffff;
48
- }
49
-
50
- /* ######### */
51
- /* GLOBALS */
52
- * {
53
- font-size: 14px;
54
- outline: none;
55
- box-sizing: border-box;
56
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
57
- 'Helvetica Neue', sans-serif;
58
- }
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { BooleanInputProps } from './BooleanInput.types';
3
- import './BooleanInput.css';
4
-
5
- export const BooleanInput = ({ label, labelFalse, labelTrue, disabled, value, onChange }: BooleanInputProps) => {
6
- // #########
7
- // Rendering
8
- return (
9
- <div className={`boolean-input ${disabled ? 'boolean-input--disabled' : ''}`}>
10
- {label && <label>{label}</label>}
11
-
12
- <div className="boolean-input-container">
13
- <div className="boolean-input-content">
14
- <div className={value === true ? 'boolean-input--selected' : ''} onClick={() => onChange(true)}>
15
- {labelTrue}
16
- </div>
17
- <div className={value === false ? 'boolean-input--selected' : ''} onClick={() => onChange(false)}>
18
- {labelFalse}
19
- </div>
20
- </div>
21
- </div>
22
- </div>
23
- );
24
- };