@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,8 +0,0 @@
1
- export type BooleanInputProps = {
2
- label?: string;
3
- labelFalse: string;
4
- labelTrue: string;
5
- disabled?: boolean;
6
- value?: boolean;
7
- onChange: (value: boolean) => void;
8
- };
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { BooleanInput } from '../BooleanInput';
4
-
5
- <Meta title="Components/Inputs/BooleanInput" />
6
-
7
- export const inputArgType = {
8
- label: {
9
- control: 'text',
10
- description: 'Label of the input.',
11
- },
12
- labelFalse: {
13
- control: 'text',
14
- description: 'Label of the FALSE value.',
15
- },
16
- labelTrue: {
17
- control: 'text',
18
- description: 'Label of the TRUE value.',
19
- },
20
- disabled: {
21
- control: 'boolean',
22
- description: 'Enable state of the input.',
23
- table: { defaultValue: { summary: 'false' } },
24
- },
25
- value: {
26
- control: 'boolean',
27
- description: 'Value of the input (can be undefined).',
28
- },
29
- onChange: {
30
- control: 'function',
31
- description: 'The handler called when clicking on input.',
32
- },
33
- };
34
-
35
- # Boolean Input
36
-
37
- The Boolean input is used to quickly switch between two possible states. It is commonly used for "yes/no" switches. The input can in some cases have a 3rd state, EMPTY.
38
-
39
- ## Overview
40
-
41
- <Canvas>
42
- <Story
43
- name="Overview"
44
- args={{ label: 'Label', labelFalse: 'No', labelTrue: 'Yes', disabled: false }}
45
- argTypes={inputArgType}
46
- >
47
- {args => <BooleanInput {...args} />}
48
- </Story>
49
- </Canvas>
50
-
51
- ## Props
52
-
53
- <ArgsTable story="Overview" of={BooleanInput} />
@@ -1,97 +0,0 @@
1
- .input {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
- input[type='number'] {
6
- -moz-appearance: textfield;
7
- }
8
- input[type='number']::-webkit-inner-spin-button,
9
- input[type='number']::-webkit-outer-spin-button {
10
- -webkit-appearance: none;
11
- margin: 0;
12
- }
13
- .input > label {
14
- display: block;
15
- margin-bottom: 4px;
16
- color: #012b49;
17
- font-weight: 700;
18
- }
19
- .input--disabled {
20
- opacity: 0.5;
21
- }
22
- .input--disabled .boolean-input-container > div {
23
- cursor: not-allowed;
24
- }
25
- .input-container {
26
- position: relative;
27
- }
28
- .input-container > input {
29
- width: 100%;
30
- padding: 0 16px;
31
- border-radius: 6px;
32
- background: #ffffff;
33
- color: #007dbc;
34
- font-weight: 700;
35
- }
36
- .input-container > input::placeholder {
37
- font-weight: 400;
38
- }
39
- .input-container > .input-icon-container {
40
- position: absolute;
41
- top: 50%;
42
- right: 12px;
43
- display: flex;
44
- color: #4e5d6b;
45
- transform: translateY(-50%);
46
- }
47
- .input-container > .input-icon-container > * {
48
- margin-left: 8px;
49
- }
50
- .input--error {
51
- display: flex;
52
- align-items: center;
53
- color: #ed6a5e;
54
- font-size: 12px;
55
- font-weight: 600;
56
- }
57
- .input--error-label {
58
- margin-left: 4px;
59
- }
60
- .input-container--error > input {
61
- border: 2px solid #ed6a5e;
62
- }
63
-
64
- /* ########## */
65
- /* VARIANTS */
66
- .input-primary .input-container > input {
67
- border: 1px solid #d4d4d4;
68
- }
69
- .input-shadow .input-container > input {
70
- border: 0;
71
- box-shadow: 0px 12px 12px 0px #00537d1a;
72
- }
73
-
74
- /* ###### */
75
- /* SIZE */
76
- .input-md .input-container > input {
77
- height: 32px;
78
- }
79
- .input-lg .input-container > input {
80
- height: 40px;
81
- }
82
-
83
- /* ######### */
84
- /* ROUNDED */
85
- .input--rounded .input-container > input {
86
- border-radius: 9999px;
87
- }
88
-
89
- /* ######### */
90
- /* GLOBALS */
91
- * {
92
- font-size: 14px;
93
- outline: none;
94
- box-sizing: border-box;
95
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
96
- 'Helvetica Neue', sans-serif;
97
- }
@@ -1,67 +0,0 @@
1
- import * as React from 'react';
2
- import { ChangeEvent } from 'react';
3
- import { Icon } from '../../Icon/Icon';
4
- import { InputProps } from './Input.types';
5
- import './Input.css';
6
-
7
- export const Input = ({
8
- errorLabel,
9
- icon,
10
- label,
11
- size = 'md',
12
- type = 'text',
13
- value,
14
- variant = 'primary',
15
- disabled,
16
- resetable,
17
- rounded,
18
- onChange,
19
- ...props
20
- }: InputProps) => {
21
- // ########
22
- // Handlers
23
- const handleChange = (e: ChangeEvent<HTMLInputElement>) => onChange(e.target.value);
24
-
25
- // #########
26
- // Rendering
27
- return (
28
- <div
29
- className={`
30
- input input-${variant} input-${size}
31
- ${disabled ? 'input--disabled' : ''}
32
- ${rounded ? 'input--rounded' : ''}
33
- `}
34
- >
35
- {label && <label>{label}</label>}
36
-
37
- <div className={`input-container ${errorLabel ? 'input-container--error' : ''}`}>
38
- <input
39
- style={{ paddingRight: icon && resetable ? '58px' : icon || resetable ? '36px' : '16px' }}
40
- type={type}
41
- value={value}
42
- disabled={disabled}
43
- onChange={handleChange}
44
- {...props}
45
- />
46
-
47
- {(icon || resetable) && (
48
- <div className="input-icon-container">
49
- {resetable && (
50
- <div style={{ cursor: 'pointer' }} onClick={() => onChange('')}>
51
- <Icon name="close" size="16" />
52
- </div>
53
- )}
54
- {icon && <Icon name={icon} size="16" />}
55
- </div>
56
- )}
57
- </div>
58
-
59
- {errorLabel && (
60
- <div className="input--error">
61
- <Icon name="alert-circle-filled" />
62
- <div className="input--error-label">{errorLabel}</div>
63
- </div>
64
- )}
65
- </div>
66
- );
67
- };
@@ -1,15 +0,0 @@
1
- import { InputHTMLAttributes } from 'react';
2
-
3
- export type InputProps = {
4
- errorLabel?: string;
5
- icon?: string;
6
- label?: string;
7
- size?: 'md' | 'lg';
8
- type?: 'text' | 'number';
9
- value: string;
10
- variant?: 'primary' | 'shadow';
11
- disabled?: boolean;
12
- resetable?: boolean;
13
- rounded?: boolean;
14
- onChange: (value: string) => void;
15
- } & Omit<Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>, 'size'>;
@@ -1,95 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Input } from '../Input';
4
- import { icons } from '../../../Icon/icons';
5
-
6
- <Meta title="Components/Inputs/Input" />
7
-
8
- export const inputArgTypes = {
9
- errorLabel: { control: 'text', description: 'Show error on the input.' },
10
- icon: {
11
- control: 'select',
12
- options: Object.keys(icons),
13
- description: 'Name of an icon.',
14
- },
15
- label: {
16
- control: 'text',
17
- description: 'Label of the input.',
18
- },
19
- placeholder: {
20
- control: 'text',
21
- description: 'Placeholder displayed when the input is empty.',
22
- },
23
- size: {
24
- control: 'inline-radio',
25
- options: ['md', 'lg'],
26
- description: 'Define the size of the input.',
27
- table: { defaultValue: { summary: 'md' } },
28
- },
29
- type: {
30
- control: 'inline-radio',
31
- options: ['text', 'number'],
32
- description: 'Type of the input.',
33
- table: { defaultValue: { summary: 'text' } },
34
- },
35
- value: {
36
- control: 'text',
37
- description: 'Value of the input.',
38
- },
39
- variant: {
40
- control: 'inline-radio',
41
- options: ['primary', 'shadow'],
42
- description: 'Variant of the input.',
43
- table: { defaultValue: { summary: 'primary' } },
44
- },
45
- disabled: {
46
- control: 'boolean',
47
- description: 'Disabled the input',
48
- table: { defaultValue: { summary: 'false' } },
49
- },
50
- resetable: {
51
- control: 'boolean',
52
- description: 'Reset the input value',
53
- table: { defaultValue: { summary: 'false' } },
54
- },
55
- rounded: {
56
- control: 'boolean',
57
- description: 'Rounded the input',
58
- table: { defaultValue: { summary: 'false' } },
59
- },
60
- onChange: {
61
- control: 'function',
62
- description: 'The handler called when the value of the input changes.',
63
- },
64
- };
65
-
66
- # Text Input
67
-
68
- Text input allows the user to enter content and data when the expected user input is a single line of text.
69
-
70
- ## Overview
71
-
72
- <Canvas>
73
- <Story
74
- name="Overview"
75
- args={{
76
- errorLabel: '',
77
- label: 'Label',
78
- placeholder: 'This is a placeholder',
79
- size: 'md',
80
- type: 'text',
81
- value: '',
82
- variant: 'primary',
83
- disabled: false,
84
- resetable: false,
85
- rounded: false,
86
- }}
87
- argTypes={inputArgTypes}
88
- >
89
- {args => <Input type="number" {...args} />}
90
- </Story>
91
- </Canvas>
92
-
93
- ## Props
94
-
95
- <ArgsTable story="Overview" of={Input} />
@@ -1,30 +0,0 @@
1
- .select-container {
2
- display: flex;
3
- flex-direction: column;
4
- }
5
- .select-container > label {
6
- display: block;
7
- margin-bottom: 4px;
8
- color: #012b49;
9
- font-weight: 700;
10
- }
11
- .select-container > select {
12
- width: 100%;
13
- height: 32px;
14
- padding: 0 40px 0 12px;
15
- border: 1px solid #d4d4d4;
16
- border-radius: 6px;
17
- color: #007dbc;
18
- font-weight: 700;
19
- cursor: pointer;
20
- }
21
-
22
- /* ######### */
23
- /* GLOBALS */
24
- * {
25
- font-size: 14px;
26
- outline: none;
27
- box-sizing: border-box;
28
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
29
- 'Helvetica Neue', sans-serif;
30
- }
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { ChangeEvent, cloneElement } from 'react';
3
- import { SelectProps } from './Select.types';
4
- import './Select.css';
5
-
6
- export const Select = ({ label, value, options, onChange }: SelectProps) => {
7
- // ########
8
- // Handlers
9
- const handleChange = (e: ChangeEvent<HTMLSelectElement>) => onChange(e.target.value);
10
-
11
- // #########
12
- // Rendering
13
- return (
14
- <div className="select-container">
15
- {label && <label>{label}</label>}
16
- <select value={value} onChange={handleChange}>
17
- {options.map((option, index) => cloneElement(option, { key: index, ...option.props }))}
18
- </select>
19
- </div>
20
- );
21
- };
@@ -1,3 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- export type SelectProps = { label?: string; value: string; options: ReactElement[]; onChange: (val: string) => void };
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
- import { Select } from '../Select';
4
-
5
- <Meta title="Components/Select" />
6
-
7
- export const selectArgTypes = {
8
- label: {
9
- control: 'text',
10
- description: 'Label of the select.',
11
- },
12
- value: {
13
- control: 'text',
14
- description: 'Value of the select.',
15
- },
16
- onChange: {
17
- control: 'function',
18
- description: 'The handler called when the value of the select changes.',
19
- },
20
- };
21
-
22
- # Loader
23
-
24
- Loader express to user that an action is occuring.
25
-
26
- ## Overview
27
-
28
- <Canvas>
29
- <Story
30
- name="Overview"
31
- args={{
32
- label: 'Label',
33
- options: [<option value="orange">Orange</option>, <option value="apple">Apple</option>],
34
- onChange: () => {},
35
- }}
36
- argTypes={selectArgTypes}
37
- >
38
- {args => <Select {...args} />}
39
- </Story>
40
- </Canvas>
41
-
42
- ## Props
43
-
44
- <ArgsTable story="Overview" of={Select} />