@dktunited-techoff/techoff-suite-ui 0.9.3 → 0.9.5

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 (291) hide show
  1. package/esm/assets/fonts/Montserrat-Medium.ttf +0 -0
  2. package/esm/assets/fonts/Roboto-Light.ttf +0 -0
  3. package/esm/components/Button/Button.css +93 -0
  4. package/esm/components/Button/Button.d.ts +5 -0
  5. package/esm/components/Button/Button.js +17 -0
  6. package/esm/components/Button/Button.js.map +1 -0
  7. package/esm/components/Button/Button.types.d.ts +9 -0
  8. package/esm/components/Button/Button.types.js +2 -0
  9. package/esm/components/Button/Button.types.js.map +1 -0
  10. package/esm/components/Button/__stories__/Button.stories.mdx +74 -0
  11. package/esm/components/Checkbox/Checkbox.css +72 -0
  12. package/esm/components/Checkbox/Checkbox.d.ts +4 -0
  13. package/esm/components/Checkbox/Checkbox.js +18 -0
  14. package/esm/components/Checkbox/Checkbox.js.map +1 -0
  15. package/esm/components/Checkbox/Checkbox.types.d.ts +7 -0
  16. package/esm/components/Checkbox/Checkbox.types.js +2 -0
  17. package/esm/components/Checkbox/Checkbox.types.js.map +1 -0
  18. package/esm/components/Checkbox/__stories__/Checkbox.stories.mdx +56 -0
  19. package/esm/components/Icon/Icon.css +26 -0
  20. package/esm/components/Icon/Icon.d.ts +4 -0
  21. package/esm/components/Icon/Icon.js +12 -0
  22. package/esm/components/Icon/Icon.js.map +1 -0
  23. package/esm/components/Icon/Icon.types.d.ts +4 -0
  24. package/esm/components/Icon/Icon.types.js +2 -0
  25. package/esm/components/Icon/Icon.types.js.map +1 -0
  26. package/esm/components/Icon/__stories__/Icon.stories.mdx +89 -0
  27. package/esm/components/Icon/icons/add-circle.svg +1 -0
  28. package/esm/components/Icon/icons/add.svg +1 -0
  29. package/esm/components/Icon/icons/alert-circle-filled.svg +1 -0
  30. package/esm/components/Icon/icons/alert-circle.svg +1 -0
  31. package/esm/components/Icon/icons/alert-triangle-filled.svg +1 -0
  32. package/esm/components/Icon/icons/alert-triangle.svg +1 -0
  33. package/esm/components/Icon/icons/arrow-diagonal-collapse.svg +1 -0
  34. package/esm/components/Icon/icons/arrow-diagonal-expand.svg +1 -0
  35. package/esm/components/Icon/icons/arrow-down.svg +1 -0
  36. package/esm/components/Icon/icons/arrow-go-back.svg +1 -0
  37. package/esm/components/Icon/icons/arrow-left-right.svg +1 -0
  38. package/esm/components/Icon/icons/arrow-left.svg +1 -0
  39. package/esm/components/Icon/icons/arrow-right.svg +1 -0
  40. package/esm/components/Icon/icons/arrow-up-down.svg +1 -0
  41. package/esm/components/Icon/icons/arrow-up.svg +1 -0
  42. package/esm/components/Icon/icons/check-circle-filled.svg +1 -0
  43. package/esm/components/Icon/icons/check-circle.svg +1 -0
  44. package/esm/components/Icon/icons/check-square-filled.svg +1 -0
  45. package/esm/components/Icon/icons/check-square.svg +1 -0
  46. package/esm/components/Icon/icons/check.svg +1 -0
  47. package/esm/components/Icon/icons/chevron-down.svg +1 -0
  48. package/esm/components/Icon/icons/chevron-left.svg +1 -0
  49. package/esm/components/Icon/icons/chevron-right.svg +1 -0
  50. package/esm/components/Icon/icons/chevron-up.svg +1 -0
  51. package/esm/components/Icon/icons/circle.svg +1 -0
  52. package/esm/components/Icon/icons/close-circle.svg +1 -0
  53. package/esm/components/Icon/icons/close.svg +1 -0
  54. package/esm/components/Icon/icons/currency-euro.svg +1 -0
  55. package/esm/components/Icon/icons/download.svg +1 -0
  56. package/esm/components/Icon/icons/edit.svg +1 -0
  57. package/esm/components/Icon/icons/external-link.svg +1 -0
  58. package/esm/components/Icon/icons/filter-off.svg +1 -0
  59. package/esm/components/Icon/icons/filter.svg +1 -0
  60. package/esm/components/Icon/icons/flashlight-off.svg +1 -0
  61. package/esm/components/Icon/icons/flashlight.svg +1 -0
  62. package/esm/components/Icon/icons/header-bikestudio.svg +32 -0
  63. package/esm/components/Icon/icons/header-nsc-helmet.svg +32 -0
  64. package/esm/components/Icon/icons/header-opticost.svg +32 -0
  65. package/esm/components/Icon/icons/header-repairability.svg +32 -0
  66. package/esm/components/Icon/icons/heart-filled.svg +1 -0
  67. package/esm/components/Icon/icons/heart.svg +1 -0
  68. package/esm/components/Icon/icons/home.svg +1 -0
  69. package/esm/components/Icon/icons/index.d.ts +3 -0
  70. package/esm/components/Icon/icons/index.js +53 -0
  71. package/esm/components/Icon/icons/index.js.map +1 -0
  72. package/esm/components/Icon/icons/index.ts +52 -0
  73. package/esm/components/Icon/icons/link.svg +1 -0
  74. package/esm/components/Icon/icons/list-settings.svg +1 -0
  75. package/esm/components/Icon/icons/lock.svg +1 -0
  76. package/esm/components/Icon/icons/save.svg +1 -0
  77. package/esm/components/Icon/icons/search.svg +1 -0
  78. package/esm/components/Icon/icons/square.svg +1 -0
  79. package/esm/components/Icon/icons/tools.svg +1 -0
  80. package/esm/components/Icon/icons/user.svg +1 -0
  81. package/esm/components/Inputs/BooleanInput/BooleanInput.css +58 -0
  82. package/esm/components/Inputs/BooleanInput/BooleanInput.d.ts +4 -0
  83. package/esm/components/Inputs/BooleanInput/BooleanInput.js +13 -0
  84. package/esm/components/Inputs/BooleanInput/BooleanInput.js.map +1 -0
  85. package/esm/components/Inputs/BooleanInput/BooleanInput.tsx +24 -0
  86. package/esm/components/Inputs/BooleanInput/BooleanInput.types.d.ts +8 -0
  87. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js +2 -0
  88. package/esm/components/Inputs/BooleanInput/BooleanInput.types.js.map +1 -0
  89. package/esm/components/Inputs/BooleanInput/BooleanInput.types.ts +8 -0
  90. package/esm/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +53 -0
  91. package/esm/components/Inputs/TextInput/TextInput.css +58 -0
  92. package/esm/components/Inputs/TextInput/TextInput.d.ts +4 -0
  93. package/esm/components/Inputs/TextInput/TextInput.js +17 -0
  94. package/esm/components/Inputs/TextInput/TextInput.js.map +1 -0
  95. package/esm/components/Inputs/TextInput/TextInput.tsx +46 -0
  96. package/esm/components/Inputs/TextInput/TextInput.types.d.ts +12 -0
  97. package/esm/components/Inputs/TextInput/TextInput.types.js +2 -0
  98. package/esm/components/Inputs/TextInput/TextInput.types.js.map +1 -0
  99. package/esm/components/Inputs/TextInput/TextInput.types.ts +12 -0
  100. package/esm/components/Inputs/TextInput/__stories__/TextInput.stories.mdx +76 -0
  101. package/esm/components/Loader/Loader.css +42 -0
  102. package/esm/components/Loader/Loader.d.ts +4 -0
  103. package/esm/components/Loader/Loader.js +6 -0
  104. package/esm/components/Loader/Loader.js.map +1 -0
  105. package/esm/components/Loader/Loader.types.d.ts +3 -0
  106. package/esm/components/Loader/Loader.types.js +2 -0
  107. package/esm/components/Loader/Loader.types.js.map +1 -0
  108. package/esm/components/Loader/__stories__/Loader.stories.mdx +30 -0
  109. package/esm/components/Select/Select.css +30 -0
  110. package/esm/components/Select/Select.d.ts +4 -0
  111. package/esm/components/Select/Select.js +16 -0
  112. package/esm/components/Select/Select.js.map +1 -0
  113. package/esm/components/Select/Select.types.d.ts +6 -0
  114. package/esm/components/Select/Select.types.js +2 -0
  115. package/esm/components/Select/Select.types.js.map +1 -0
  116. package/esm/components/Select/__stories__/Select.stories.mdx +40 -0
  117. package/esm/hooks/use-click-outside.d.ts +2 -0
  118. package/esm/hooks/use-click-outside.js +14 -0
  119. package/esm/hooks/use-click-outside.js.map +1 -0
  120. package/esm/index.d.ts +10 -0
  121. package/esm/index.js +11 -0
  122. package/esm/index.js.map +1 -0
  123. package/esm/layouts/Header/Header.css +125 -0
  124. package/esm/layouts/Header/Header.d.ts +4 -0
  125. package/esm/layouts/Header/Header.js +14 -0
  126. package/esm/layouts/Header/Header.js.map +1 -0
  127. package/esm/layouts/Header/Header.types.d.ts +10 -0
  128. package/esm/layouts/Header/Header.types.js +2 -0
  129. package/esm/layouts/Header/Header.types.js.map +1 -0
  130. package/esm/layouts/Header/HeaderProfile.d.ts +3 -0
  131. package/esm/layouts/Header/HeaderProfile.js +35 -0
  132. package/esm/layouts/Header/HeaderProfile.js.map +1 -0
  133. package/esm/layouts/Header/__stories__/Header.stories.mdx +41 -0
  134. package/esm/layouts/Navigation/Navigation.css +74 -0
  135. package/esm/layouts/Navigation/Navigation.d.ts +6 -0
  136. package/esm/layouts/Navigation/Navigation.js +27 -0
  137. package/esm/layouts/Navigation/Navigation.js.map +1 -0
  138. package/esm/layouts/Navigation/Navigation.types.d.ts +10 -0
  139. package/esm/layouts/Navigation/Navigation.types.js +2 -0
  140. package/esm/layouts/Navigation/Navigation.types.js.map +1 -0
  141. package/esm/layouts/Navigation/__stories__/Navigation.stories.mdx +45 -0
  142. package/esm/utils/string.utils.d.ts +1 -0
  143. package/esm/utils/string.utils.js +2 -0
  144. package/esm/utils/string.utils.js.map +1 -0
  145. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  146. package/lib/assets/fonts/Roboto-Light.ttf +0 -0
  147. package/lib/components/Button/Button.css +93 -0
  148. package/lib/components/Button/Button.d.ts +5 -0
  149. package/lib/components/Button/Button.js +21 -0
  150. package/lib/components/Button/Button.js.map +1 -0
  151. package/lib/components/Button/Button.types.d.ts +9 -0
  152. package/lib/components/Button/Button.types.js +3 -0
  153. package/lib/components/Button/Button.types.js.map +1 -0
  154. package/lib/components/Button/__stories__/Button.stories.mdx +74 -0
  155. package/lib/components/Checkbox/Checkbox.css +72 -0
  156. package/lib/components/Checkbox/Checkbox.d.ts +4 -0
  157. package/lib/components/Checkbox/Checkbox.js +22 -0
  158. package/lib/components/Checkbox/Checkbox.js.map +1 -0
  159. package/lib/components/Checkbox/Checkbox.types.d.ts +7 -0
  160. package/lib/components/Checkbox/Checkbox.types.js +3 -0
  161. package/lib/components/Checkbox/Checkbox.types.js.map +1 -0
  162. package/lib/components/Checkbox/__stories__/Checkbox.stories.mdx +56 -0
  163. package/lib/components/Icon/Icon.css +26 -0
  164. package/lib/components/Icon/Icon.d.ts +4 -0
  165. package/lib/components/Icon/Icon.js +16 -0
  166. package/lib/components/Icon/Icon.js.map +1 -0
  167. package/lib/components/Icon/Icon.types.d.ts +4 -0
  168. package/lib/components/Icon/Icon.types.js +3 -0
  169. package/lib/components/Icon/Icon.types.js.map +1 -0
  170. package/lib/components/Icon/__stories__/Icon.stories.mdx +89 -0
  171. package/lib/components/Icon/icons/add-circle.svg +1 -0
  172. package/lib/components/Icon/icons/add.svg +1 -0
  173. package/lib/components/Icon/icons/alert-circle-filled.svg +1 -0
  174. package/lib/components/Icon/icons/alert-circle.svg +1 -0
  175. package/lib/components/Icon/icons/alert-triangle-filled.svg +1 -0
  176. package/lib/components/Icon/icons/alert-triangle.svg +1 -0
  177. package/lib/components/Icon/icons/arrow-diagonal-collapse.svg +1 -0
  178. package/lib/components/Icon/icons/arrow-diagonal-expand.svg +1 -0
  179. package/lib/components/Icon/icons/arrow-down.svg +1 -0
  180. package/lib/components/Icon/icons/arrow-go-back.svg +1 -0
  181. package/lib/components/Icon/icons/arrow-left-right.svg +1 -0
  182. package/lib/components/Icon/icons/arrow-left.svg +1 -0
  183. package/lib/components/Icon/icons/arrow-right.svg +1 -0
  184. package/lib/components/Icon/icons/arrow-up-down.svg +1 -0
  185. package/lib/components/Icon/icons/arrow-up.svg +1 -0
  186. package/lib/components/Icon/icons/check-circle-filled.svg +1 -0
  187. package/lib/components/Icon/icons/check-circle.svg +1 -0
  188. package/lib/components/Icon/icons/check-square-filled.svg +1 -0
  189. package/lib/components/Icon/icons/check-square.svg +1 -0
  190. package/lib/components/Icon/icons/check.svg +1 -0
  191. package/lib/components/Icon/icons/chevron-down.svg +1 -0
  192. package/lib/components/Icon/icons/chevron-left.svg +1 -0
  193. package/lib/components/Icon/icons/chevron-right.svg +1 -0
  194. package/lib/components/Icon/icons/chevron-up.svg +1 -0
  195. package/lib/components/Icon/icons/circle.svg +1 -0
  196. package/lib/components/Icon/icons/close-circle.svg +1 -0
  197. package/lib/components/Icon/icons/close.svg +1 -0
  198. package/lib/components/Icon/icons/currency-euro.svg +1 -0
  199. package/lib/components/Icon/icons/download.svg +1 -0
  200. package/lib/components/Icon/icons/edit.svg +1 -0
  201. package/lib/components/Icon/icons/external-link.svg +1 -0
  202. package/lib/components/Icon/icons/filter-off.svg +1 -0
  203. package/lib/components/Icon/icons/filter.svg +1 -0
  204. package/lib/components/Icon/icons/flashlight-off.svg +1 -0
  205. package/lib/components/Icon/icons/flashlight.svg +1 -0
  206. package/lib/components/Icon/icons/header-bikestudio.svg +32 -0
  207. package/lib/components/Icon/icons/header-nsc-helmet.svg +32 -0
  208. package/lib/components/Icon/icons/header-opticost.svg +32 -0
  209. package/lib/components/Icon/icons/header-repairability.svg +32 -0
  210. package/lib/components/Icon/icons/heart-filled.svg +1 -0
  211. package/lib/components/Icon/icons/heart.svg +1 -0
  212. package/lib/components/Icon/icons/home.svg +1 -0
  213. package/lib/components/Icon/icons/index.d.ts +3 -0
  214. package/lib/components/Icon/icons/index.js +56 -0
  215. package/lib/components/Icon/icons/index.js.map +1 -0
  216. package/lib/components/Icon/icons/index.ts +52 -0
  217. package/lib/components/Icon/icons/link.svg +1 -0
  218. package/lib/components/Icon/icons/list-settings.svg +1 -0
  219. package/lib/components/Icon/icons/lock.svg +1 -0
  220. package/lib/components/Icon/icons/save.svg +1 -0
  221. package/lib/components/Icon/icons/search.svg +1 -0
  222. package/lib/components/Icon/icons/square.svg +1 -0
  223. package/lib/components/Icon/icons/tools.svg +1 -0
  224. package/lib/components/Icon/icons/user.svg +1 -0
  225. package/lib/components/Inputs/BooleanInput/BooleanInput.css +58 -0
  226. package/lib/components/Inputs/BooleanInput/BooleanInput.d.ts +4 -0
  227. package/lib/components/Inputs/BooleanInput/BooleanInput.js +17 -0
  228. package/lib/components/Inputs/BooleanInput/BooleanInput.js.map +1 -0
  229. package/lib/components/Inputs/BooleanInput/BooleanInput.tsx +24 -0
  230. package/lib/components/Inputs/BooleanInput/BooleanInput.types.d.ts +8 -0
  231. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js +3 -0
  232. package/lib/components/Inputs/BooleanInput/BooleanInput.types.js.map +1 -0
  233. package/lib/components/Inputs/BooleanInput/BooleanInput.types.ts +8 -0
  234. package/lib/components/Inputs/BooleanInput/__stories__/BooleanInput.stories.mdx +53 -0
  235. package/lib/components/Inputs/TextInput/TextInput.css +58 -0
  236. package/lib/components/Inputs/TextInput/TextInput.d.ts +4 -0
  237. package/lib/components/Inputs/TextInput/TextInput.js +21 -0
  238. package/lib/components/Inputs/TextInput/TextInput.js.map +1 -0
  239. package/lib/components/Inputs/TextInput/TextInput.tsx +46 -0
  240. package/lib/components/Inputs/TextInput/TextInput.types.d.ts +12 -0
  241. package/lib/components/Inputs/TextInput/TextInput.types.js +3 -0
  242. package/lib/components/Inputs/TextInput/TextInput.types.js.map +1 -0
  243. package/lib/components/Inputs/TextInput/TextInput.types.ts +12 -0
  244. package/lib/components/Inputs/TextInput/__stories__/TextInput.stories.mdx +76 -0
  245. package/lib/components/Loader/Loader.css +42 -0
  246. package/lib/components/Loader/Loader.d.ts +4 -0
  247. package/lib/components/Loader/Loader.js +10 -0
  248. package/lib/components/Loader/Loader.js.map +1 -0
  249. package/lib/components/Loader/Loader.types.d.ts +3 -0
  250. package/lib/components/Loader/Loader.types.js +3 -0
  251. package/lib/components/Loader/Loader.types.js.map +1 -0
  252. package/lib/components/Loader/__stories__/Loader.stories.mdx +30 -0
  253. package/lib/components/Select/Select.css +30 -0
  254. package/lib/components/Select/Select.d.ts +4 -0
  255. package/lib/components/Select/Select.js +20 -0
  256. package/lib/components/Select/Select.js.map +1 -0
  257. package/lib/components/Select/Select.types.d.ts +6 -0
  258. package/lib/components/Select/Select.types.js +3 -0
  259. package/lib/components/Select/Select.types.js.map +1 -0
  260. package/lib/components/Select/__stories__/Select.stories.mdx +40 -0
  261. package/lib/hooks/use-click-outside.d.ts +2 -0
  262. package/lib/hooks/use-click-outside.js +18 -0
  263. package/lib/hooks/use-click-outside.js.map +1 -0
  264. package/lib/index.d.ts +10 -0
  265. package/lib/index.js +27 -0
  266. package/lib/index.js.map +1 -0
  267. package/lib/layouts/Header/Header.css +125 -0
  268. package/lib/layouts/Header/Header.d.ts +4 -0
  269. package/lib/layouts/Header/Header.js +18 -0
  270. package/lib/layouts/Header/Header.js.map +1 -0
  271. package/lib/layouts/Header/Header.types.d.ts +10 -0
  272. package/lib/layouts/Header/Header.types.js +3 -0
  273. package/lib/layouts/Header/Header.types.js.map +1 -0
  274. package/lib/layouts/Header/HeaderProfile.d.ts +3 -0
  275. package/lib/layouts/Header/HeaderProfile.js +39 -0
  276. package/lib/layouts/Header/HeaderProfile.js.map +1 -0
  277. package/lib/layouts/Header/__stories__/Header.stories.mdx +41 -0
  278. package/lib/layouts/Navigation/Navigation.css +74 -0
  279. package/lib/layouts/Navigation/Navigation.d.ts +6 -0
  280. package/lib/layouts/Navigation/Navigation.js +32 -0
  281. package/lib/layouts/Navigation/Navigation.js.map +1 -0
  282. package/lib/layouts/Navigation/Navigation.types.d.ts +10 -0
  283. package/lib/layouts/Navigation/Navigation.types.js +3 -0
  284. package/lib/layouts/Navigation/Navigation.types.js.map +1 -0
  285. package/lib/layouts/Navigation/__stories__/Navigation.stories.mdx +45 -0
  286. package/lib/utils/string.utils.d.ts +1 -0
  287. package/lib/utils/string.utils.js +6 -0
  288. package/lib/utils/string.utils.js.map +1 -0
  289. package/package.json +1 -1
  290. package/src/index.ts +1 -0
  291. package/src/layouts/Navigation/Navigation.tsx +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.types.js","sourceRoot":"","sources":["../../../src/layouts/Header/Header.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { HeaderProfileProps } from './Header.types';
3
+ export declare const HeaderProfile: ({ firstname, lastname, supportLink }: HeaderProfileProps) => React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderProfile = 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 HeaderProfile = ({ firstname, lastname, supportLink }) => {
10
+ const [isOpen, setIsOpen] = (0, react_1.useState)(false);
11
+ const ref = (0, use_click_outside_1.useClickOutside)(() => setIsOpen(false));
12
+ // ########
13
+ // Handlers
14
+ const handleToggleOpen = () => setIsOpen(prev => !prev);
15
+ const handleOpenSupport = () => window.open(supportLink, '_blank', 'noreferrer');
16
+ // #########
17
+ // Rendering
18
+ return (React.createElement("div", { className: "header-profile-container", ref: ref },
19
+ React.createElement("div", { className: "header-profile-dropdown", onClick: handleToggleOpen },
20
+ React.createElement("div", { className: "header-profile-img-container" },
21
+ React.createElement("div", { className: "header-profile-img-icon" },
22
+ React.createElement(Icon_1.Icon, { name: "user", size: "16" }))),
23
+ React.createElement("div", { className: "header-profile-name" },
24
+ (0, string_utils_1.capitalize)(firstname),
25
+ " ",
26
+ lastname.charAt(0).toUpperCase(),
27
+ "."),
28
+ React.createElement("div", { className: "header-profile-chevron" },
29
+ React.createElement(Icon_1.Icon, { name: isOpen ? 'chevron-up' : 'chevron-down', size: "16" }))),
30
+ isOpen && (React.createElement("div", { className: "header-profile-menu" },
31
+ React.createElement("div", { className: "header-profile-menu-item", onClick: handleOpenSupport },
32
+ React.createElement("div", { className: "header-profile-menu-item-icon" },
33
+ React.createElement(Icon_1.Icon, { name: "alert-triangle", size: "16" })),
34
+ React.createElement("div", { className: "header-profile-menu-item-label" }, "Contact support"),
35
+ React.createElement("div", { className: "header-profile-menu-item-icon" },
36
+ React.createElement(Icon_1.Icon, { name: "external-link", size: "16" })))))));
37
+ };
38
+ exports.HeaderProfile = HeaderProfile;
39
+ //# sourceMappingURL=HeaderProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderProfile.js","sourceRoot":"","sources":["../../../src/layouts/Header/HeaderProfile.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAiC;AACjC,qD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AAS,EAAC,0BAA0B,EAAC,OAAO,EAAE,iBAAiB;gBAClE,6BAAK,SAAS,EAAC,+BAA+B;oBAC5C,oBAAC,WAAI,IAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,IAAI,GAAG,CACpC;gBACN,6BAAK,SAAS,EAAC,gCAAgC,sBAAsB;gBACrE,6BAAK,SAAS,EAAC,+BAA+B;oBAC5C,oBAAC,WAAI,IAAC,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,IAAI,GAAG,CACnC,CACF,CACF,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,aAAa,iBA2CxB"}
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
+ import { Header } from '../Header';
4
+ import { HeaderProfile } from '../HeaderProfile';
5
+ import { Button } from '../../../components/Button/Button';
6
+
7
+ <Meta title="Layouts/Header" />
8
+
9
+ export const headerArgTypes = {
10
+ appName: {
11
+ control: 'select',
12
+ options: ['bikestudio', 'nsc-helmet', 'opticost', 'repairability'],
13
+ description: 'Icon of the button.',
14
+ },
15
+ };
16
+
17
+ # Header
18
+
19
+ 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.
20
+
21
+ ## Overview
22
+
23
+ <Canvas>
24
+ <Story
25
+ name="Overview"
26
+ args={{
27
+ actions: [
28
+ <Button icon="add" size="lg" variant="shadow" rounded />,
29
+ <HeaderProfile firstname="John" lastname="Doe" />,
30
+ ],
31
+ appName: 'repairability',
32
+ }}
33
+ argTypes={headerArgTypes}
34
+ >
35
+ {args => <Header {...args} />}
36
+ </Story>
37
+ </Canvas>
38
+
39
+ ## Props
40
+
41
+ <ArgsTable story="Overview" of={Header} />
@@ -0,0 +1,74 @@
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
+ }
@@ -0,0 +1,6 @@
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 NavigationBreadcrumbItem: ({ children, icon, highlight, onClick, }: PropsWithChildren<NavigationBreadcrumbItemProps>) => React.JSX.Element;
6
+ export declare const Navigation: ({ actions, breadcrumbs }: NavigationProps) => React.JSX.Element;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Navigation = exports.NavigationBreadcrumbItem = void 0;
4
+ const React = require("react");
5
+ const react_1 = require("react");
6
+ const Icon_1 = require("../../components/Icon/Icon");
7
+ require("./Navigation.css");
8
+ const NavigationBreadcrumbItem = ({ children, icon, highlight, onClick, }) => {
9
+ // #########
10
+ // Rendering
11
+ return (React.createElement("div", { className: `
12
+ breadcrumb-item
13
+ ${highlight ? 'breadcrumb-item--highlight' : ''} ${onClick ? 'breadcrumb-item--link' : ''}
14
+ `, onClick: onClick },
15
+ icon && (React.createElement("div", { className: "breadcrumb-item--icon" },
16
+ React.createElement(Icon_1.Icon, { name: icon, size: "16" }))),
17
+ children));
18
+ };
19
+ exports.NavigationBreadcrumbItem = NavigationBreadcrumbItem;
20
+ const Navigation = ({ actions, breadcrumbs }) => {
21
+ // #########
22
+ // Rendering
23
+ return (React.createElement("div", { className: "navigation" },
24
+ React.createElement("div", { className: "breadcrumb" }, breadcrumbs.map((breadcrumb, index) => (React.createElement("div", { key: index, className: "breadcrumb-container" },
25
+ breadcrumb,
26
+ index !== breadcrumbs.length - 1 && (React.createElement("div", { className: "breadcrumb-chevron" },
27
+ React.createElement(Icon_1.Icon, { name: "chevron-right" }))))))),
28
+ React.createElement("div", { className: "navigation-divider" }),
29
+ React.createElement("div", { className: "navigation-actions" }, actions?.map((action, index) => (0, react_1.cloneElement)(action, { key: index, ...action.props })))));
30
+ };
31
+ exports.Navigation = Navigation;
32
+ //# sourceMappingURL=Navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/layouts/Navigation/Navigation.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAwD;A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E,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CACnF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,UAAU,cAwBrB"}
@@ -0,0 +1,10 @@
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
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Navigation.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Navigation.types.js","sourceRoot":"","sources":["../../../src/layouts/Navigation/Navigation.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
3
+ import { Navigation, NavigationBreadcrumbItem } 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
+ <Button icon="check" onClick={() => {}}>
21
+ Action 1
22
+ </Button>,
23
+ <Button icon="add" onClick={() => {}}>
24
+ Action 2
25
+ </Button>,
26
+ ],
27
+ breadcrumbs: [
28
+ <NavigationBreadcrumbItem icon="home" onClick={() => {}}>
29
+ Home
30
+ </NavigationBreadcrumbItem>,
31
+ <NavigationBreadcrumbItem onClick={() => {}}>Menu Item 1</NavigationBreadcrumbItem>,
32
+ <NavigationBreadcrumbItem highlight>Menu Item 2</NavigationBreadcrumbItem>
33
+ ]
34
+ }}
35
+
36
+ >
37
+
38
+ {args => <Navigation {...args} />}
39
+
40
+ </Story>
41
+ </Canvas>
42
+
43
+ ## Props
44
+
45
+ <ArgsTable story="Overview" of={Navigation} />
@@ -0,0 +1 @@
1
+ export declare const capitalize: (str: string) => string;
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dktunited-techoff/techoff-suite-ui",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib",
6
6
  "module": "esm/index.js",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from './components/Icon/Icon';
4
4
  export * from './components/Inputs/BooleanInput/BooleanInput';
5
5
  export * from './components/Inputs/TextInput/TextInput';
6
6
  export * from './components/Loader/Loader';
7
+ export * from './components/Select/Select';
7
8
  export * from './layouts/Header/Header';
8
9
  export * from './layouts/Header/HeaderProfile';
9
10
  export * from './layouts/Navigation/Navigation';
@@ -51,7 +51,7 @@ export const Navigation = ({ actions, breadcrumbs }: NavigationProps) => {
51
51
  </div>
52
52
  <div className="navigation-divider" />
53
53
  <div className="navigation-actions">
54
- {actions.map((action, index) => cloneElement(action, { key: index, ...action.props }))}
54
+ {actions?.map((action, index) => cloneElement(action, { key: index, ...action.props }))}
55
55
  </div>
56
56
  </div>
57
57
  );