@yourdash/uikit 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (533) hide show
  1. package/components/buttonWithIcon/buttonWithIcon.module.scss +1 -1
  2. package/components/buttonWithIcon/buttonWithIcon.tsx +2 -2
  3. package/components/icon/icon.tsx +16 -4
  4. package/components/icon/iconDictionary.ts +285 -566
  5. package/components/icon/icons/accessibility-16.svg +2 -5
  6. package/components/icon/icons/accessibility-inset-16.svg +2 -5
  7. package/components/icon/icons/alert-16.svg +2 -5
  8. package/components/icon/icons/alert-24.svg +2 -5
  9. package/components/icon/icons/alert-fill-12.svg +2 -5
  10. package/components/icon/icons/app-launcher-16.svg +1 -4
  11. package/components/icon/icons/apps-16.svg +2 -5
  12. package/components/icon/icons/archive-16.svg +2 -5
  13. package/components/icon/icons/archive-24.svg +2 -5
  14. package/components/icon/icons/arrow-both-16.svg +2 -5
  15. package/components/icon/icons/arrow-both-24.svg +2 -5
  16. package/components/icon/icons/arrow-down-16.svg +2 -5
  17. package/components/icon/icons/arrow-down-24.svg +2 -5
  18. package/components/icon/icons/arrow-down-left-24.svg +2 -5
  19. package/components/icon/icons/arrow-down-right-24.svg +2 -5
  20. package/components/icon/icons/arrow-left-16.svg +2 -5
  21. package/components/icon/icons/arrow-left-24.svg +2 -5
  22. package/components/icon/icons/arrow-right-16.svg +2 -5
  23. package/components/icon/icons/arrow-right-24.svg +2 -5
  24. package/components/icon/icons/arrow-switch-16.svg +2 -5
  25. package/components/icon/icons/arrow-switch-24.svg +2 -5
  26. package/components/icon/icons/arrow-up-16.svg +2 -5
  27. package/components/icon/icons/arrow-up-24.svg +2 -5
  28. package/components/icon/icons/arrow-up-left-24.svg +2 -5
  29. package/components/icon/icons/arrow-up-right-24.svg +2 -5
  30. package/components/icon/icons/beaker-16.svg +2 -5
  31. package/components/icon/icons/beaker-24.svg +2 -5
  32. package/components/icon/icons/bell-16.svg +2 -5
  33. package/components/icon/icons/bell-24.svg +2 -5
  34. package/components/icon/icons/bell-fill-16.svg +2 -5
  35. package/components/icon/icons/bell-fill-24.svg +2 -5
  36. package/components/icon/icons/bell-slash-16.svg +2 -5
  37. package/components/icon/icons/bell-slash-24.svg +2 -5
  38. package/components/icon/icons/blocked-16.svg +2 -5
  39. package/components/icon/icons/blocked-24.svg +2 -5
  40. package/components/icon/icons/bold-16.svg +2 -5
  41. package/components/icon/icons/bold-24.svg +2 -5
  42. package/components/icon/icons/book-16.svg +2 -5
  43. package/components/icon/icons/book-24.svg +2 -5
  44. package/components/icon/icons/bookmark-16.svg +2 -5
  45. package/components/icon/icons/bookmark-24.svg +2 -5
  46. package/components/icon/icons/bookmark-fill-24.svg +2 -5
  47. package/components/icon/icons/bookmark-slash-16.svg +2 -5
  48. package/components/icon/icons/bookmark-slash-24.svg +2 -5
  49. package/components/icon/icons/bookmark-slash-fill-24.svg +2 -5
  50. package/components/icon/icons/briefcase-16.svg +2 -5
  51. package/components/icon/icons/briefcase-24.svg +2 -5
  52. package/components/icon/icons/broadcast-16.svg +2 -5
  53. package/components/icon/icons/broadcast-24.svg +2 -5
  54. package/components/icon/icons/browser-16.svg +2 -5
  55. package/components/icon/icons/browser-24.svg +2 -5
  56. package/components/icon/icons/bug-16.svg +2 -5
  57. package/components/icon/icons/bug-24.svg +2 -5
  58. package/components/icon/icons/cache-16.svg +2 -5
  59. package/components/icon/icons/calendar-16.svg +2 -5
  60. package/components/icon/icons/calendar-24.svg +2 -5
  61. package/components/icon/icons/check-16.svg +2 -5
  62. package/components/icon/icons/check-24.svg +2 -5
  63. package/components/icon/icons/check-circle-16.svg +2 -5
  64. package/components/icon/icons/check-circle-24.svg +2 -5
  65. package/components/icon/icons/check-circle-fill-12.svg +2 -5
  66. package/components/icon/icons/check-circle-fill-16.svg +2 -5
  67. package/components/icon/icons/check-circle-fill-24.svg +2 -5
  68. package/components/icon/icons/checkbox-16.svg +2 -5
  69. package/components/icon/icons/checkbox-24.svg +2 -5
  70. package/components/icon/icons/checklist-16.svg +2 -5
  71. package/components/icon/icons/checklist-24.svg +2 -5
  72. package/components/icon/icons/chevron-down-16.svg +2 -5
  73. package/components/icon/icons/chevron-down-24.svg +2 -5
  74. package/components/icon/icons/chevron-left-16.svg +2 -5
  75. package/components/icon/icons/chevron-left-24.svg +2 -5
  76. package/components/icon/icons/chevron-right-16.svg +2 -5
  77. package/components/icon/icons/chevron-right-24.svg +2 -5
  78. package/components/icon/icons/chevron-up-16.svg +2 -5
  79. package/components/icon/icons/chevron-up-24.svg +2 -5
  80. package/components/icon/icons/circle-16.svg +2 -5
  81. package/components/icon/icons/circle-24.svg +2 -5
  82. package/components/icon/icons/circle-slash-16.svg +2 -5
  83. package/components/icon/icons/circle-slash-24.svg +2 -5
  84. package/components/icon/icons/clock-16.svg +2 -5
  85. package/components/icon/icons/clock-24.svg +2 -5
  86. package/components/icon/icons/cloud-16.svg +2 -5
  87. package/components/icon/icons/cloud-24.svg +2 -5
  88. package/components/icon/icons/cloud-offline-16.svg +2 -5
  89. package/components/icon/icons/cloud-offline-24.svg +2 -5
  90. package/components/icon/icons/code-16.svg +2 -5
  91. package/components/icon/icons/code-24.svg +2 -5
  92. package/components/icon/icons/code-of-conduct-16.svg +2 -5
  93. package/components/icon/icons/code-of-conduct-24.svg +2 -5
  94. package/components/icon/icons/code-review-16.svg +2 -5
  95. package/components/icon/icons/code-review-24.svg +2 -5
  96. package/components/icon/icons/code-square-16.svg +2 -5
  97. package/components/icon/icons/code-square-24.svg +2 -5
  98. package/components/icon/icons/codescan-16.svg +2 -5
  99. package/components/icon/icons/codescan-24.svg +2 -5
  100. package/components/icon/icons/codescan-checkmark-16.svg +2 -5
  101. package/components/icon/icons/codescan-checkmark-24.svg +2 -5
  102. package/components/icon/icons/codespaces-16.svg +2 -5
  103. package/components/icon/icons/codespaces-24.svg +2 -5
  104. package/components/icon/icons/columns-16.svg +2 -5
  105. package/components/icon/icons/columns-24.svg +2 -5
  106. package/components/icon/icons/command-palette-16.svg +2 -5
  107. package/components/icon/icons/command-palette-24.svg +2 -5
  108. package/components/icon/icons/comment-16.svg +2 -5
  109. package/components/icon/icons/comment-24.svg +2 -5
  110. package/components/icon/icons/comment-discussion-16.svg +2 -5
  111. package/components/icon/icons/comment-discussion-24.svg +2 -5
  112. package/components/icon/icons/commit-24.svg +2 -5
  113. package/components/icon/icons/container-16.svg +2 -5
  114. package/components/icon/icons/container-24.svg +2 -5
  115. package/components/icon/icons/copilot-16.svg +2 -5
  116. package/components/icon/icons/copilot-24.svg +2 -5
  117. package/components/icon/icons/copilot-48.svg +2 -5
  118. package/components/icon/icons/copilot-96.svg +2 -5
  119. package/components/icon/icons/copilot-error-16.svg +2 -5
  120. package/components/icon/icons/copilot-warning-16.svg +2 -5
  121. package/components/icon/icons/copy-16.svg +2 -5
  122. package/components/icon/icons/copy-24.svg +2 -5
  123. package/components/icon/icons/cpu-16.svg +2 -5
  124. package/components/icon/icons/cpu-24.svg +2 -5
  125. package/components/icon/icons/credit-card-16.svg +2 -5
  126. package/components/icon/icons/credit-card-24.svg +2 -5
  127. package/components/icon/icons/cross-reference-16.svg +2 -5
  128. package/components/icon/icons/cross-reference-24.svg +2 -5
  129. package/components/icon/icons/dash-16.svg +2 -5
  130. package/components/icon/icons/dash-24.svg +2 -5
  131. package/components/icon/icons/database-16.svg +2 -5
  132. package/components/icon/icons/database-24.svg +2 -5
  133. package/components/icon/icons/dependabot-16.svg +2 -5
  134. package/components/icon/icons/dependabot-24.svg +2 -5
  135. package/components/icon/icons/desktop-download-16.svg +2 -5
  136. package/components/icon/icons/desktop-download-24.svg +2 -5
  137. package/components/icon/icons/device-camera-16.svg +2 -5
  138. package/components/icon/icons/device-camera-video-16.svg +2 -5
  139. package/components/icon/icons/device-camera-video-24.svg +2 -5
  140. package/components/icon/icons/device-desktop-16.svg +2 -5
  141. package/components/icon/icons/device-desktop-24.svg +2 -5
  142. package/components/icon/icons/device-mobile-16.svg +2 -5
  143. package/components/icon/icons/device-mobile-24.svg +2 -5
  144. package/components/icon/icons/diamond-16.svg +2 -5
  145. package/components/icon/icons/diamond-24.svg +2 -5
  146. package/components/icon/icons/diff-16.svg +2 -5
  147. package/components/icon/icons/diff-24.svg +2 -5
  148. package/components/icon/icons/diff-added-16.svg +2 -5
  149. package/components/icon/icons/diff-ignored-16.svg +2 -5
  150. package/components/icon/icons/diff-modified-16.svg +2 -5
  151. package/components/icon/icons/diff-removed-16.svg +2 -5
  152. package/components/icon/icons/diff-renamed-16.svg +2 -5
  153. package/components/icon/icons/dot-16.svg +2 -5
  154. package/components/icon/icons/dot-24.svg +2 -5
  155. package/components/icon/icons/dot-fill-16.svg +2 -5
  156. package/components/icon/icons/dot-fill-24.svg +2 -5
  157. package/components/icon/icons/download-16.svg +2 -5
  158. package/components/icon/icons/download-24.svg +2 -5
  159. package/components/icon/icons/duplicate-16.svg +2 -5
  160. package/components/icon/icons/duplicate-24.svg +2 -5
  161. package/components/icon/icons/ellipsis-16.svg +2 -5
  162. package/components/icon/icons/eye-16.svg +2 -5
  163. package/components/icon/icons/eye-24.svg +2 -5
  164. package/components/icon/icons/eye-closed-16.svg +2 -5
  165. package/components/icon/icons/eye-closed-24.svg +2 -5
  166. package/components/icon/icons/feed-discussion-16.svg +2 -5
  167. package/components/icon/icons/feed-forked-16.svg +2 -5
  168. package/components/icon/icons/feed-heart-16.svg +2 -5
  169. package/components/icon/icons/feed-merged-16.svg +2 -5
  170. package/components/icon/icons/feed-person-16.svg +2 -5
  171. package/components/icon/icons/feed-repo-16.svg +2 -5
  172. package/components/icon/icons/feed-rocket-16.svg +2 -5
  173. package/components/icon/icons/feed-star-16.svg +2 -5
  174. package/components/icon/icons/feed-tag-16.svg +2 -5
  175. package/components/icon/icons/feed-trophy-16.svg +2 -5
  176. package/components/icon/icons/file-16.svg +2 -5
  177. package/components/icon/icons/file-24.svg +2 -5
  178. package/components/icon/icons/file-added-16.svg +2 -5
  179. package/components/icon/icons/file-badge-16.svg +2 -5
  180. package/components/icon/icons/file-binary-16.svg +2 -5
  181. package/components/icon/icons/file-binary-24.svg +2 -5
  182. package/components/icon/icons/file-code-16.svg +2 -5
  183. package/components/icon/icons/file-code-24.svg +2 -5
  184. package/components/icon/icons/file-diff-16.svg +2 -5
  185. package/components/icon/icons/file-diff-24.svg +2 -5
  186. package/components/icon/icons/file-directory-16.svg +2 -5
  187. package/components/icon/icons/file-directory-24.svg +2 -5
  188. package/components/icon/icons/file-directory-fill-16.svg +2 -5
  189. package/components/icon/icons/file-directory-fill-24.svg +2 -5
  190. package/components/icon/icons/file-directory-open-fill-16.svg +2 -5
  191. package/components/icon/icons/file-media-24.svg +2 -5
  192. package/components/icon/icons/file-moved-16.svg +2 -5
  193. package/components/icon/icons/file-removed-16.svg +2 -5
  194. package/components/icon/icons/file-submodule-16.svg +2 -5
  195. package/components/icon/icons/file-submodule-24.svg +2 -5
  196. package/components/icon/icons/file-symlink-file-16.svg +2 -5
  197. package/components/icon/icons/file-symlink-file-24.svg +2 -5
  198. package/components/icon/icons/file-zip-16.svg +2 -5
  199. package/components/icon/icons/file-zip-24.svg +2 -5
  200. package/components/icon/icons/filter-16.svg +2 -5
  201. package/components/icon/icons/filter-24.svg +2 -5
  202. package/components/icon/icons/flame-16.svg +2 -5
  203. package/components/icon/icons/flame-24.svg +2 -5
  204. package/components/icon/icons/fold-16.svg +2 -5
  205. package/components/icon/icons/fold-24.svg +2 -5
  206. package/components/icon/icons/fold-down-16.svg +2 -5
  207. package/components/icon/icons/fold-down-24.svg +2 -5
  208. package/components/icon/icons/fold-up-16.svg +2 -5
  209. package/components/icon/icons/fold-up-24.svg +2 -5
  210. package/components/icon/icons/gear-16.svg +2 -5
  211. package/components/icon/icons/gear-24.svg +2 -5
  212. package/components/icon/icons/gift-16.svg +2 -5
  213. package/components/icon/icons/gift-24.svg +2 -5
  214. package/components/icon/icons/git-branch-16.svg +2 -5
  215. package/components/icon/icons/git-branch-24.svg +2 -5
  216. package/components/icon/icons/git-commit-16.svg +2 -5
  217. package/components/icon/icons/git-commit-24.svg +2 -5
  218. package/components/icon/icons/git-compare-16.svg +2 -5
  219. package/components/icon/icons/git-compare-24.svg +2 -5
  220. package/components/icon/icons/git-merge-16.svg +2 -5
  221. package/components/icon/icons/git-merge-24.svg +2 -5
  222. package/components/icon/icons/git-merge-queue-16.svg +2 -5
  223. package/components/icon/icons/git-pull-request-16.svg +2 -5
  224. package/components/icon/icons/git-pull-request-24.svg +2 -5
  225. package/components/icon/icons/git-pull-request-closed-16.svg +2 -5
  226. package/components/icon/icons/git-pull-request-closed-24.svg +2 -5
  227. package/components/icon/icons/git-pull-request-draft-16.svg +2 -5
  228. package/components/icon/icons/git-pull-request-draft-24.svg +2 -5
  229. package/components/icon/icons/globe-16.svg +2 -5
  230. package/components/icon/icons/globe-24.svg +2 -5
  231. package/components/icon/icons/grabber-16.svg +2 -5
  232. package/components/icon/icons/grabber-24.svg +2 -5
  233. package/components/icon/icons/graph-16.svg +2 -5
  234. package/components/icon/icons/graph-24.svg +2 -5
  235. package/components/icon/icons/hash-16.svg +2 -5
  236. package/components/icon/icons/hash-24.svg +2 -5
  237. package/components/icon/icons/heading-16.svg +2 -5
  238. package/components/icon/icons/heading-24.svg +2 -5
  239. package/components/icon/icons/heart-16.svg +2 -5
  240. package/components/icon/icons/heart-24.svg +2 -5
  241. package/components/icon/icons/heart-fill-16.svg +2 -5
  242. package/components/icon/icons/heart-fill-24.svg +2 -5
  243. package/components/icon/icons/history-16.svg +2 -5
  244. package/components/icon/icons/history-24.svg +2 -5
  245. package/components/icon/icons/home-16.svg +2 -5
  246. package/components/icon/icons/home-24.svg +2 -5
  247. package/components/icon/icons/home-fill-24.svg +2 -5
  248. package/components/icon/icons/horizontal-rule-16.svg +2 -5
  249. package/components/icon/icons/horizontal-rule-24.svg +2 -5
  250. package/components/icon/icons/hourglass-16.svg +2 -5
  251. package/components/icon/icons/hourglass-24.svg +2 -5
  252. package/components/icon/icons/hubot-16.svg +2 -5
  253. package/components/icon/icons/hubot-24.svg +2 -5
  254. package/components/icon/icons/id-badge-16.svg +2 -5
  255. package/components/icon/icons/image-16.svg +2 -5
  256. package/components/icon/icons/image-24.svg +2 -5
  257. package/components/icon/icons/inbox-16.svg +2 -5
  258. package/components/icon/icons/inbox-24.svg +2 -5
  259. package/components/icon/icons/infinity-16.svg +2 -5
  260. package/components/icon/icons/infinity-24.svg +2 -5
  261. package/components/icon/icons/info-16.svg +2 -5
  262. package/components/icon/icons/info-24.svg +2 -5
  263. package/components/icon/icons/issue-closed-16.svg +2 -5
  264. package/components/icon/icons/issue-closed-24.svg +2 -5
  265. package/components/icon/icons/issue-draft-16.svg +2 -5
  266. package/components/icon/icons/issue-draft-24.svg +2 -5
  267. package/components/icon/icons/issue-opened-16.svg +2 -5
  268. package/components/icon/icons/issue-opened-24.svg +2 -5
  269. package/components/icon/icons/issue-reopened-16.svg +2 -5
  270. package/components/icon/icons/issue-reopened-24.svg +2 -5
  271. package/components/icon/icons/italic-16.svg +2 -5
  272. package/components/icon/icons/italic-24.svg +2 -5
  273. package/components/icon/icons/iterations-16.svg +2 -5
  274. package/components/icon/icons/iterations-24.svg +2 -5
  275. package/components/icon/icons/kebab-horizontal-16.svg +2 -5
  276. package/components/icon/icons/kebab-horizontal-24.svg +2 -5
  277. package/components/icon/icons/key-16.svg +2 -5
  278. package/components/icon/icons/key-24.svg +2 -5
  279. package/components/icon/icons/key-asterisk-16.svg +2 -5
  280. package/components/icon/icons/law-16.svg +2 -5
  281. package/components/icon/icons/law-24.svg +2 -5
  282. package/components/icon/icons/light-bulb-16.svg +2 -5
  283. package/components/icon/icons/light-bulb-24.svg +2 -5
  284. package/components/icon/icons/link-16.svg +2 -5
  285. package/components/icon/icons/link-24.svg +2 -5
  286. package/components/icon/icons/link-external-16.svg +2 -5
  287. package/components/icon/icons/link-external-24.svg +2 -5
  288. package/components/icon/icons/list-ordered-16.svg +2 -5
  289. package/components/icon/icons/list-ordered-24.svg +2 -5
  290. package/components/icon/icons/list-unordered-16.svg +2 -5
  291. package/components/icon/icons/list-unordered-24.svg +2 -5
  292. package/components/icon/icons/location-16.svg +2 -5
  293. package/components/icon/icons/location-24.svg +2 -5
  294. package/components/icon/icons/lock-16.svg +2 -5
  295. package/components/icon/icons/lock-24.svg +2 -5
  296. package/components/icon/icons/log-16.svg +2 -5
  297. package/components/icon/icons/login.svg +1 -4
  298. package/components/icon/icons/logo-gist-16.svg +2 -5
  299. package/components/icon/icons/logo-github-16.svg +2 -5
  300. package/components/icon/icons/logout.svg +1 -4
  301. package/components/icon/icons/mail-16.svg +2 -5
  302. package/components/icon/icons/mail-24.svg +2 -5
  303. package/components/icon/icons/mark-github-16.svg +2 -5
  304. package/components/icon/icons/markdown-16.svg +2 -5
  305. package/components/icon/icons/megaphone-16.svg +2 -5
  306. package/components/icon/icons/megaphone-24.svg +2 -5
  307. package/components/icon/icons/mention-16.svg +2 -5
  308. package/components/icon/icons/mention-24.svg +2 -5
  309. package/components/icon/icons/meter-16.svg +2 -5
  310. package/components/icon/icons/milestone-16.svg +2 -5
  311. package/components/icon/icons/milestone-24.svg +2 -5
  312. package/components/icon/icons/mirror-16.svg +2 -5
  313. package/components/icon/icons/mirror-24.svg +2 -5
  314. package/components/icon/icons/moon-16.svg +2 -5
  315. package/components/icon/icons/moon-24.svg +2 -5
  316. package/components/icon/icons/mortar-board-16.svg +2 -5
  317. package/components/icon/icons/mortar-board-24.svg +2 -5
  318. package/components/icon/icons/multi-select-16.svg +2 -5
  319. package/components/icon/icons/multi-select-24.svg +2 -5
  320. package/components/icon/icons/mute-16.svg +2 -5
  321. package/components/icon/icons/mute-24.svg +2 -5
  322. package/components/icon/icons/no-entry-16.svg +2 -5
  323. package/components/icon/icons/no-entry-24.svg +2 -5
  324. package/components/icon/icons/no-entry-fill-12.svg +2 -5
  325. package/components/icon/icons/north-star-16.svg +2 -5
  326. package/components/icon/icons/north-star-24.svg +2 -5
  327. package/components/icon/icons/note-16.svg +2 -5
  328. package/components/icon/icons/note-24.svg +2 -5
  329. package/components/icon/icons/number-16.svg +2 -5
  330. package/components/icon/icons/number-24.svg +2 -5
  331. package/components/icon/icons/organization-16.svg +2 -5
  332. package/components/icon/icons/organization-24.svg +2 -5
  333. package/components/icon/icons/package-16.svg +2 -5
  334. package/components/icon/icons/package-24.svg +2 -5
  335. package/components/icon/icons/package-dependencies-16.svg +2 -5
  336. package/components/icon/icons/package-dependencies-24.svg +2 -5
  337. package/components/icon/icons/package-dependents-16.svg +2 -5
  338. package/components/icon/icons/package-dependents-24.svg +2 -5
  339. package/components/icon/icons/paintbrush-16.svg +2 -5
  340. package/components/icon/icons/paper-airplane-16.svg +2 -5
  341. package/components/icon/icons/paper-airplane-24.svg +2 -5
  342. package/components/icon/icons/paperclip-16.svg +2 -5
  343. package/components/icon/icons/paperclip-24.svg +2 -5
  344. package/components/icon/icons/paste-16.svg +2 -5
  345. package/components/icon/icons/paste-24.svg +2 -5
  346. package/components/icon/icons/pencil-16.svg +2 -5
  347. package/components/icon/icons/pencil-24.svg +2 -5
  348. package/components/icon/icons/people-16.svg +2 -5
  349. package/components/icon/icons/people-24.svg +2 -5
  350. package/components/icon/icons/person-16.svg +2 -5
  351. package/components/icon/icons/person-24.svg +2 -5
  352. package/components/icon/icons/person-add-16.svg +2 -5
  353. package/components/icon/icons/person-add-24.svg +2 -5
  354. package/components/icon/icons/person-fill-16.svg +2 -5
  355. package/components/icon/icons/person-fill-24.svg +2 -5
  356. package/components/icon/icons/pin-16.svg +2 -5
  357. package/components/icon/icons/pin-24.svg +2 -5
  358. package/components/icon/icons/play-16.svg +2 -5
  359. package/components/icon/icons/play-24.svg +2 -5
  360. package/components/icon/icons/plug-16.svg +2 -5
  361. package/components/icon/icons/plug-24.svg +2 -5
  362. package/components/icon/icons/plus-16.svg +2 -5
  363. package/components/icon/icons/plus-24.svg +2 -5
  364. package/components/icon/icons/plus-circle-16.svg +2 -5
  365. package/components/icon/icons/plus-circle-24.svg +2 -5
  366. package/components/icon/icons/project-16.svg +2 -5
  367. package/components/icon/icons/project-24.svg +2 -5
  368. package/components/icon/icons/pulse-16.svg +2 -5
  369. package/components/icon/icons/pulse-24.svg +2 -5
  370. package/components/icon/icons/question-16.svg +2 -5
  371. package/components/icon/icons/question-24.svg +2 -5
  372. package/components/icon/icons/quote-16.svg +2 -5
  373. package/components/icon/icons/quote-24.svg +2 -5
  374. package/components/icon/icons/reply-16.svg +2 -5
  375. package/components/icon/icons/reply-24.svg +2 -5
  376. package/components/icon/icons/repo-16.svg +2 -5
  377. package/components/icon/icons/repo-24.svg +2 -5
  378. package/components/icon/icons/repo-clone-16.svg +2 -5
  379. package/components/icon/icons/repo-deleted-16.svg +2 -5
  380. package/components/icon/icons/repo-forked-16.svg +2 -5
  381. package/components/icon/icons/repo-forked-24.svg +2 -5
  382. package/components/icon/icons/repo-locked-16.svg +2 -5
  383. package/components/icon/icons/repo-locked-24.svg +2 -5
  384. package/components/icon/icons/repo-pull-16.svg +2 -5
  385. package/components/icon/icons/repo-push-16.svg +2 -5
  386. package/components/icon/icons/repo-push-24.svg +2 -5
  387. package/components/icon/icons/repo-template-16.svg +2 -5
  388. package/components/icon/icons/repo-template-24.svg +2 -5
  389. package/components/icon/icons/report-16.svg +2 -5
  390. package/components/icon/icons/report-24.svg +2 -5
  391. package/components/icon/icons/rocket-16.svg +2 -5
  392. package/components/icon/icons/rocket-24.svg +2 -5
  393. package/components/icon/icons/rows-16.svg +2 -5
  394. package/components/icon/icons/rows-24.svg +2 -5
  395. package/components/icon/icons/rss-16.svg +2 -5
  396. package/components/icon/icons/rss-24.svg +2 -5
  397. package/components/icon/icons/ruby-16.svg +2 -5
  398. package/components/icon/icons/ruby-24.svg +2 -5
  399. package/components/icon/icons/screen-full-16.svg +2 -5
  400. package/components/icon/icons/screen-full-24.svg +2 -5
  401. package/components/icon/icons/screen-normal-16.svg +2 -5
  402. package/components/icon/icons/screen-normal-24.svg +2 -5
  403. package/components/icon/icons/search-16.svg +2 -5
  404. package/components/icon/icons/search-24.svg +2 -5
  405. package/components/icon/icons/server-16.svg +2 -5
  406. package/components/icon/icons/server-24.svg +2 -5
  407. package/components/icon/icons/server-error.svg +1 -4
  408. package/components/icon/icons/share-16.svg +2 -5
  409. package/components/icon/icons/share-24.svg +2 -5
  410. package/components/icon/icons/share-android-16.svg +2 -5
  411. package/components/icon/icons/share-android-24.svg +2 -5
  412. package/components/icon/icons/shield-16.svg +2 -5
  413. package/components/icon/icons/shield-24.svg +2 -5
  414. package/components/icon/icons/shield-check-16.svg +2 -5
  415. package/components/icon/icons/shield-check-24.svg +2 -5
  416. package/components/icon/icons/shield-lock-16.svg +2 -5
  417. package/components/icon/icons/shield-lock-24.svg +2 -5
  418. package/components/icon/icons/shield-slash-16.svg +2 -5
  419. package/components/icon/icons/shield-x-16.svg +2 -5
  420. package/components/icon/icons/shield-x-24.svg +2 -5
  421. package/components/icon/icons/sidebar-collapse-16.svg +2 -5
  422. package/components/icon/icons/sidebar-collapse-24.svg +2 -5
  423. package/components/icon/icons/sidebar-expand-16.svg +2 -5
  424. package/components/icon/icons/sidebar-expand-24.svg +2 -5
  425. package/components/icon/icons/sign-in-16.svg +2 -5
  426. package/components/icon/icons/sign-in-24.svg +2 -5
  427. package/components/icon/icons/sign-out-16.svg +2 -5
  428. package/components/icon/icons/sign-out-24.svg +2 -5
  429. package/components/icon/icons/single-select-16.svg +2 -5
  430. package/components/icon/icons/single-select-24.svg +2 -5
  431. package/components/icon/icons/skip-16.svg +2 -5
  432. package/components/icon/icons/skip-24.svg +2 -5
  433. package/components/icon/icons/sliders-16.svg +2 -5
  434. package/components/icon/icons/smiley-16.svg +2 -5
  435. package/components/icon/icons/smiley-24.svg +2 -5
  436. package/components/icon/icons/sort-asc-16.svg +2 -5
  437. package/components/icon/icons/sort-asc-24.svg +2 -5
  438. package/components/icon/icons/sort-desc-16.svg +2 -5
  439. package/components/icon/icons/sort-desc-24.svg +2 -5
  440. package/components/icon/icons/square-16.svg +2 -5
  441. package/components/icon/icons/square-24.svg +2 -5
  442. package/components/icon/icons/square-fill-16.svg +2 -5
  443. package/components/icon/icons/square-fill-24.svg +2 -5
  444. package/components/icon/icons/squirrel-16.svg +2 -5
  445. package/components/icon/icons/squirrel-24.svg +2 -5
  446. package/components/icon/icons/stack-16.svg +2 -5
  447. package/components/icon/icons/stack-24.svg +2 -5
  448. package/components/icon/icons/star-16.svg +2 -5
  449. package/components/icon/icons/star-24.svg +2 -5
  450. package/components/icon/icons/star-fill-16.svg +2 -5
  451. package/components/icon/icons/star-fill-24.svg +2 -5
  452. package/components/icon/icons/stop-16.svg +2 -5
  453. package/components/icon/icons/stop-24.svg +2 -5
  454. package/components/icon/icons/stopwatch-16.svg +2 -5
  455. package/components/icon/icons/stopwatch-24.svg +2 -5
  456. package/components/icon/icons/store.svg +1 -4
  457. package/components/icon/icons/strikethrough-16.svg +2 -5
  458. package/components/icon/icons/strikethrough-24.svg +2 -5
  459. package/components/icon/icons/sun-16.svg +2 -5
  460. package/components/icon/icons/sun-24.svg +2 -5
  461. package/components/icon/icons/sync-16.svg +2 -5
  462. package/components/icon/icons/sync-24.svg +2 -5
  463. package/components/icon/icons/tab-24.svg +2 -5
  464. package/components/icon/icons/tab-external-16.svg +2 -5
  465. package/components/icon/icons/table-16.svg +2 -5
  466. package/components/icon/icons/table-24.svg +2 -5
  467. package/components/icon/icons/tag-16.svg +2 -5
  468. package/components/icon/icons/tag-24.svg +2 -5
  469. package/components/icon/icons/tasklist-16.svg +2 -5
  470. package/components/icon/icons/tasklist-24.svg +2 -5
  471. package/components/icon/icons/telescope-16.svg +2 -5
  472. package/components/icon/icons/telescope-24.svg +2 -5
  473. package/components/icon/icons/telescope-fill-16.svg +2 -5
  474. package/components/icon/icons/telescope-fill-24.svg +2 -5
  475. package/components/icon/icons/terminal-16.svg +2 -5
  476. package/components/icon/icons/terminal-24.svg +2 -5
  477. package/components/icon/icons/three-bars-16.svg +2 -5
  478. package/components/icon/icons/thumbsdown-16.svg +2 -5
  479. package/components/icon/icons/thumbsdown-24.svg +2 -5
  480. package/components/icon/icons/thumbsup-16.svg +2 -5
  481. package/components/icon/icons/thumbsup-24.svg +2 -5
  482. package/components/icon/icons/tools-16.svg +2 -5
  483. package/components/icon/icons/tools-24.svg +2 -5
  484. package/components/icon/icons/trash-16.svg +2 -5
  485. package/components/icon/icons/trash-24.svg +2 -5
  486. package/components/icon/icons/triangle-down-16.svg +2 -5
  487. package/components/icon/icons/triangle-down-24.svg +2 -5
  488. package/components/icon/icons/triangle-left-16.svg +2 -5
  489. package/components/icon/icons/triangle-left-24.svg +2 -5
  490. package/components/icon/icons/triangle-right-16.svg +2 -5
  491. package/components/icon/icons/triangle-right-24.svg +2 -5
  492. package/components/icon/icons/triangle-up-16.svg +2 -5
  493. package/components/icon/icons/triangle-up-24.svg +2 -5
  494. package/components/icon/icons/trophy-16.svg +2 -5
  495. package/components/icon/icons/trophy-24.svg +2 -5
  496. package/components/icon/icons/typography-16.svg +2 -5
  497. package/components/icon/icons/typography-24.svg +2 -5
  498. package/components/icon/icons/unfold-16.svg +2 -5
  499. package/components/icon/icons/unfold-24.svg +2 -5
  500. package/components/icon/icons/unlock-16.svg +2 -5
  501. package/components/icon/icons/unlock-24.svg +2 -5
  502. package/components/icon/icons/unmute-16.svg +2 -5
  503. package/components/icon/icons/unmute-24.svg +2 -5
  504. package/components/icon/icons/unverified-16.svg +2 -5
  505. package/components/icon/icons/unverified-24.svg +2 -5
  506. package/components/icon/icons/upload-16.svg +2 -5
  507. package/components/icon/icons/upload-24.svg +2 -5
  508. package/components/icon/icons/verified-16.svg +2 -5
  509. package/components/icon/icons/verified-24.svg +2 -5
  510. package/components/icon/icons/versions-16.svg +2 -5
  511. package/components/icon/icons/versions-24.svg +2 -5
  512. package/components/icon/icons/video-16.svg +2 -5
  513. package/components/icon/icons/video-24.svg +2 -5
  514. package/components/icon/icons/webhook-16.svg +2 -5
  515. package/components/icon/icons/workflow-16.svg +2 -5
  516. package/components/icon/icons/workflow-24.svg +2 -5
  517. package/components/icon/icons/x-16.svg +2 -5
  518. package/components/icon/icons/x-24.svg +2 -5
  519. package/components/icon/icons/x-circle-16.svg +2 -5
  520. package/components/icon/icons/x-circle-24.svg +2 -5
  521. package/components/icon/icons/x-circle-fill-12.svg +2 -5
  522. package/components/icon/icons/x-circle-fill-16.svg +2 -5
  523. package/components/icon/icons/x-circle-fill-24.svg +2 -5
  524. package/components/icon/icons/yourdash.svg +1 -4
  525. package/components/icon/icons/zap-16.svg +2 -5
  526. package/components/icon/icons/zap-24.svg +2 -5
  527. package/components/iconButton/iconButton.tsx +1 -1
  528. package/components/image/image.tsx +83 -83
  529. package/components/textInput/textInput.tsx +82 -82
  530. package/package.json +1 -1
  531. package/views/dialog/dialog.tsx +23 -23
  532. package/views/onBoarding/onBoarding.tsx +143 -138
  533. package/views/onBoarding/onBoarding.tsx~ +0 -138
@@ -1,82 +1,82 @@
1
- /*
2
- * Copyright ©2024 Ewsgit<https://ewsgit.uk> and YourDash<https://yourdash.ewsgit.uk> contributors.
3
- * YourDash is licensed under the MIT License. (https://mit.ewsgit.uk)
4
- */
5
-
6
- import clippy from "@yourdash/shared/web/helpers/clippy.ts";
7
- import Icon from "../icon/icon.tsx";
8
- import { UKIcon } from "../icon/iconDictionary.ts";
9
- import styles from "./textInput.module.scss";
10
- import React, { useEffect, useRef, useState } from "react";
11
-
12
- // TODO: maybe remove onEnter for onSubmit
13
-
14
- const TextInputComponent: React.FC<{
15
- onChange?: (value: string) => void;
16
- onSubmit?: (value: string) => void;
17
- placeholder: string;
18
- icon?: UKIcon;
19
- onEnter?: (value: string) => void;
20
- defaultValue?: string;
21
- value?: string;
22
- accessibleName: string;
23
- className?: string;
24
- type?: string;
25
- }> = (props) => {
26
- const ref = useRef<HTMLInputElement>(null);
27
-
28
- const [value, setValue] = useState(props.defaultValue || "");
29
-
30
- useEffect(() => {
31
- if (props.value) setValue(props.value);
32
- }, [props.value]);
33
-
34
- useEffect(() => {
35
- if (!ref.current) return;
36
-
37
- ref.current.value = value;
38
- }, [value]);
39
-
40
- useEffect(() => {
41
- setTimeout(() => {
42
- if (ref.current?.value !== props.defaultValue) {
43
- ref.current?.onkeyup?.({ currentTarget: ref.current } as unknown as KeyboardEvent);
44
- ref.current?.onchange?.({ currentTarget: ref.current } as unknown as Event);
45
- }
46
- }, 200);
47
- }, []);
48
-
49
- return (
50
- <div className={clippy(styles.component, props.className)}>
51
- {props.icon && (
52
- <Icon
53
- className={styles.icon}
54
- icon={props.icon}
55
- />
56
- )}
57
- <input
58
- ref={ref}
59
- type={props.type || "text"}
60
- aria-label={props.accessibleName}
61
- className={clippy(styles.input, !props.icon && styles.noIcon)}
62
- placeholder={props.placeholder}
63
- onKeyUp={(e) => {
64
- setValue(e.currentTarget.value);
65
- props.onChange?.(e.currentTarget.value);
66
- }}
67
- onChange={(e) => props.onSubmit?.(e.currentTarget.value)}
68
- onKeyDown={(e) => {
69
- if (e.key === "Enter") {
70
- e.preventDefault();
71
-
72
- props.onEnter?.(e.currentTarget.value);
73
- }
74
- }}
75
- />
76
- </div>
77
- );
78
- };
79
-
80
- const TextInput = TextInputComponent;
81
-
82
- export default TextInput;
1
+ /*
2
+ * Copyright ©2024 Ewsgit<https://ewsgit.uk> and YourDash<https://yourdash.ewsgit.uk> contributors.
3
+ * YourDash is licensed under the MIT License. (https://mit.ewsgit.uk)
4
+ */
5
+
6
+ import clippy from "@yourdash/shared/web/helpers/clippy.ts";
7
+ import Icon from "../icon/icon.tsx";
8
+ import { UKIcon } from "../icon/iconDictionary.ts";
9
+ import styles from "./textInput.module.scss";
10
+ import React, { useEffect, useRef, useState } from "react";
11
+
12
+ // TODO: maybe remove onEnter for onSubmit
13
+
14
+ const TextInputComponent: React.FC<{
15
+ onChange?: (value: string) => void;
16
+ onSubmit?: (value: string) => void;
17
+ placeholder: string;
18
+ icon?: UKIcon;
19
+ onEnter?: (value: string) => void;
20
+ defaultValue?: string;
21
+ value?: string;
22
+ accessibleName: string;
23
+ className?: string;
24
+ type?: string;
25
+ }> = (props) => {
26
+ const ref = useRef<HTMLInputElement>(null);
27
+
28
+ const [value, setValue] = useState(props.defaultValue || "");
29
+
30
+ useEffect(() => {
31
+ if (props.value) setValue(props.value);
32
+ }, [props.value]);
33
+
34
+ useEffect(() => {
35
+ if (!ref.current) return;
36
+
37
+ ref.current.value = value;
38
+ }, [value]);
39
+
40
+ useEffect(() => {
41
+ setTimeout(() => {
42
+ if (ref.current?.value !== props.defaultValue) {
43
+ ref.current?.onkeyup?.({ currentTarget: ref.current } as unknown as KeyboardEvent);
44
+ ref.current?.onchange?.({ currentTarget: ref.current } as unknown as Event);
45
+ }
46
+ }, 200);
47
+ }, []);
48
+
49
+ return (
50
+ <div className={clippy(styles.component, props.className)}>
51
+ {props.icon && (
52
+ <Icon
53
+ className={styles.icon}
54
+ icon={props.icon}
55
+ />
56
+ )}
57
+ <input
58
+ ref={ref}
59
+ type={props.type || "text"}
60
+ aria-label={props.accessibleName}
61
+ className={clippy(styles.input, !props.icon && styles.noIcon)}
62
+ placeholder={props.placeholder}
63
+ onKeyUp={(e) => {
64
+ setValue(e.currentTarget.value);
65
+ props.onChange?.(e.currentTarget.value);
66
+ }}
67
+ onChange={(e) => props.onSubmit?.(e.currentTarget.value)}
68
+ onKeyDown={(e) => {
69
+ if (e.key === "Enter") {
70
+ e.preventDefault();
71
+
72
+ props.onEnter?.(e.currentTarget.value);
73
+ }
74
+ }}
75
+ />
76
+ </div>
77
+ );
78
+ };
79
+
80
+ const TextInput = TextInputComponent;
81
+
82
+ export default TextInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourdash/uikit",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,23 +1,23 @@
1
- /*
2
- * Copyright ©2024 Ewsgit <https://ewsgit.uk> and YourDash <https://yourdash.ewsgit.uk> contributors.
3
- * YourDash is licensed under the MIT License. (https://mit.ewsgit.uk)
4
- */
5
-
6
- import React from "react";
7
- import Card from "../../components/card/card.tsx";
8
- import styles from "./dialog.module.scss";
9
-
10
- const Dialog: React.FC<{ children: React.ReactNode | React.ReactNode[]; className?: string }> = ({ children, className }) => {
11
- return (
12
- <div className={styles.background}>
13
- <Card
14
- containerClassName={styles.view}
15
- className={className}
16
- >
17
- {children}
18
- </Card>
19
- </div>
20
- );
21
- };
22
-
23
- export default Dialog;
1
+ /*
2
+ * Copyright ©2024 Ewsgit <https://ewsgit.uk> and YourDash <https://yourdash.ewsgit.uk> contributors.
3
+ * YourDash is licensed under the MIT License. (https://mit.ewsgit.uk)
4
+ */
5
+
6
+ import React from "react";
7
+ import Card from "../../components/card/card.tsx";
8
+ import styles from "./dialog.module.scss";
9
+
10
+ const Dialog: React.FC<{ children: React.ReactNode | React.ReactNode[]; className?: string }> = ({ children, className }) => {
11
+ return (
12
+ <div className={styles.background}>
13
+ <Card
14
+ containerClassName={styles.view}
15
+ className={className}
16
+ >
17
+ {children}
18
+ </Card>
19
+ </div>
20
+ );
21
+ };
22
+
23
+ export default Dialog;
@@ -1,138 +1,143 @@
1
- import * as React from "react";
2
- import Card from "../../components/card/card.tsx";
3
- import { UKIcon } from "../../components/icon/iconDictionary.ts";
4
- import IconButton from "../../components/iconButton/iconButton.tsx";
5
- import Image from "../../components/image/image.tsx";
6
- import Heading from "../../components/heading/heading.tsx";
7
- import Text from "../../components/text/text.tsx";
8
- import ButtonWithIcon from "../../components/buttonWithIcon/buttonWithIcon.tsx";
9
- import Button from "../../components/button/button.tsx";
10
- import { Outlet } from "react-router";
11
- import styles from "./onBoarding.module.scss";
12
- import Flex from "../../components/flex/flex.tsx";
13
- import clippy from "@yourdash/shared/web/helpers/clippy.ts";
14
-
15
- const OnBoarding: React.FC<{
16
- meta: { id: string };
17
- pages: {
18
- headerImage: string;
19
- header: string;
20
- body: string;
21
- actions: { label: string; icon?: UKIcon; onClick: () => void; changeTo?: "next" | "previous" | "remain" | "completed" }[];
22
- allowGoBack?: boolean;
23
- }[];
24
- }> = ({ pages, meta }) => {
25
- const [currentPage, setCurrentPage] = React.useState<number>(0);
26
- const page = pages[currentPage];
27
-
28
- if (localStorage.getItem(`yourdash-application-visited-${meta.id}`) || currentPage > pages.length - 1) {
29
- localStorage.setItem(`yourdash-application-visited-${meta.id}`, "true");
30
-
31
- return <Outlet />;
32
- }
33
-
34
- return (
35
- <div className={styles.page}>
36
- <Card
37
- className={styles.card}
38
- containerClassName={styles.cardContainer}
39
- >
40
- {page.allowGoBack && (
41
- <IconButton
42
- className={clippy(styles.goBackButton, "animate__animated animate__fadeInDown")}
43
- accessibleLabel="Go back to the last page"
44
- icon={UKIcon.ChevronLeft}
45
- onClick={() => {
46
- setCurrentPage(currentPage - 1);
47
- }}
48
- />
49
- )}
50
- <Image
51
- className={styles.headerImage}
52
- src={page.headerImage}
53
- accessibleLabel=""
54
- />
55
- <Heading
56
- className={styles.header}
57
- text={page.header}
58
- />
59
- <Text
60
- className={styles.body}
61
- text={page.body}
62
- />
63
- <Flex
64
- className={styles.actions}
65
- direction="row"
66
- >
67
- {page.actions.map((action) => {
68
- if (action.icon) {
69
- return (
70
- <>
71
- <ButtonWithIcon
72
- key={action.label}
73
- className={clippy(styles.action, styles.actionWithIcon, "animate__animated animate__fadeInUp")}
74
- text={action.label}
75
- icon={action.icon}
76
- onClick={() => {
77
- action.onClick();
78
- if (action.changeTo) {
79
- switch (action.changeTo) {
80
- case "next":
81
- setCurrentPage(currentPage + 1);
82
- break;
83
- case "previous":
84
- if (currentPage > 0) setCurrentPage(currentPage - 1);
85
- break;
86
- case "remain":
87
- break;
88
- case "completed":
89
- setCurrentPage(pages.length + 1);
90
- break;
91
- default:
92
- break;
93
- }
94
- }
95
- }}
96
- />
97
- </>
98
- );
99
- }
100
-
101
- return (
102
- <>
103
- <Button
104
- key={action.icon}
105
- className={clippy(styles.action, styles.actionWithoutIcon, "animate__animated animate__fadeInUp")}
106
- text={action.label}
107
- onClick={() => {
108
- action.onClick();
109
-
110
- if (action.changeTo) {
111
- switch (action.changeTo) {
112
- case "next":
113
- setCurrentPage(currentPage + 1);
114
- break;
115
- case "previous":
116
- if (currentPage > 0) setCurrentPage(currentPage - 1);
117
- break;
118
- case "remain":
119
- break;
120
- case "completed":
121
- setCurrentPage(pages.length + 1);
122
- break;
123
- default:
124
- break;
125
- }
126
- }
127
- }}
128
- />
129
- </>
130
- );
131
- })}
132
- </Flex>
133
- </Card>
134
- </div>
135
- );
136
- };
137
-
138
- export default OnBoarding;
1
+ import * as React from "react";
2
+ import Card from "../../components/card/card.tsx";
3
+ import { UKIcon, UKIconType } from "../../components/icon/iconDictionary.ts";
4
+ import IconButton from "../../components/iconButton/iconButton.tsx";
5
+ import Image from "../../components/image/image.tsx";
6
+ import Heading from "../../components/heading/heading.tsx";
7
+ import Text from "../../components/text/text.tsx";
8
+ import ButtonWithIcon from "../../components/buttonWithIcon/buttonWithIcon.tsx";
9
+ import Button from "../../components/button/button.tsx";
10
+ import { Outlet } from "react-router";
11
+ import styles from "./onBoarding.module.scss";
12
+ import Flex from "../../components/flex/flex.tsx";
13
+ import clippy from "@yourdash/shared/web/helpers/clippy.ts";
14
+
15
+ const OnBoarding: React.FC<{
16
+ meta: { id: string };
17
+ pages: {
18
+ headerImage: string;
19
+ header: string;
20
+ body: string;
21
+ actions: {
22
+ label: string;
23
+ icon?: UKIconType;
24
+ onClick: () => void;
25
+ changeTo?: "next" | "previous" | "remain" | "completed";
26
+ }[];
27
+ allowGoBack?: boolean;
28
+ }[];
29
+ }> = ({ pages, meta }) => {
30
+ const [currentPage, setCurrentPage] = React.useState<number>(0);
31
+ const page = pages[currentPage];
32
+
33
+ if (localStorage.getItem(`yourdash-application-visited-${meta.id}`) || currentPage > pages.length - 1) {
34
+ localStorage.setItem(`yourdash-application-visited-${meta.id}`, "true");
35
+
36
+ return <Outlet />;
37
+ }
38
+
39
+ return (
40
+ <div className={styles.page}>
41
+ <Card
42
+ className={styles.card}
43
+ containerClassName={styles.cardContainer}
44
+ >
45
+ {page.allowGoBack && (
46
+ <IconButton
47
+ className={clippy(styles.goBackButton, "animate__animated animate__fadeInDown")}
48
+ accessibleLabel="Go back to the last page"
49
+ icon={UKIcon.ChevronLeft}
50
+ onClick={() => {
51
+ setCurrentPage(currentPage - 1);
52
+ }}
53
+ />
54
+ )}
55
+ <Image
56
+ className={styles.headerImage}
57
+ src={page.headerImage}
58
+ accessibleLabel=""
59
+ />
60
+ <Heading
61
+ className={styles.header}
62
+ text={page.header}
63
+ />
64
+ <Text
65
+ className={styles.body}
66
+ text={page.body}
67
+ />
68
+ <Flex
69
+ className={styles.actions}
70
+ direction="row"
71
+ >
72
+ {page.actions.map((action) => {
73
+ if (action.icon) {
74
+ return (
75
+ <>
76
+ <ButtonWithIcon
77
+ key={action.label}
78
+ className={clippy(styles.action, styles.actionWithIcon, "animate__animated animate__fadeInUp")}
79
+ text={action.label}
80
+ icon={action.icon}
81
+ onClick={() => {
82
+ action.onClick();
83
+ if (action.changeTo) {
84
+ switch (action.changeTo) {
85
+ case "next":
86
+ setCurrentPage(currentPage + 1);
87
+ break;
88
+ case "previous":
89
+ if (currentPage > 0) setCurrentPage(currentPage - 1);
90
+ break;
91
+ case "remain":
92
+ break;
93
+ case "completed":
94
+ setCurrentPage(pages.length + 1);
95
+ break;
96
+ default:
97
+ break;
98
+ }
99
+ }
100
+ }}
101
+ />
102
+ </>
103
+ );
104
+ }
105
+
106
+ return (
107
+ <>
108
+ <Button
109
+ key={action.icon}
110
+ className={clippy(styles.action, styles.actionWithoutIcon, "animate__animated animate__fadeInUp")}
111
+ text={action.label}
112
+ onClick={() => {
113
+ action.onClick();
114
+
115
+ if (action.changeTo) {
116
+ switch (action.changeTo) {
117
+ case "next":
118
+ setCurrentPage(currentPage + 1);
119
+ break;
120
+ case "previous":
121
+ if (currentPage > 0) setCurrentPage(currentPage - 1);
122
+ break;
123
+ case "remain":
124
+ break;
125
+ case "completed":
126
+ setCurrentPage(pages.length + 1);
127
+ break;
128
+ default:
129
+ break;
130
+ }
131
+ }
132
+ }}
133
+ />
134
+ </>
135
+ );
136
+ })}
137
+ </Flex>
138
+ </Card>
139
+ </div>
140
+ );
141
+ };
142
+
143
+ export default OnBoarding;
@@ -1,138 +0,0 @@
1
- import * as React from "react";
2
- import Card from "../../components/card/card.tsx";
3
- import { UKIcon } from "../../components/icon/iconDictionary.ts";
4
- import IconButton from "../../components/iconButton/iconButton.tsx";
5
- import Image from "../../components/image/image.tsx";
6
- import Heading from "../../components/heading/heading.tsx";
7
- import Text from "../../components/text/text.tsx";
8
- import ButtonWithIcon from "../../components/buttonWithIcon/buttonWithIcon.tsx";
9
- import Button from "../../components/button/button.tsx";
10
- import { Outlet } from "react-router";
11
- import styles from "./onBoarding.module.scss";
12
- import Flex from "../../components/flex/flex.tsx";
13
- import clippy from "@yourdash/shared/web/helpers/clippy.ts";
14
-
15
- const OnBoarding: React.FC<{
16
- meta: { id: string };
17
- pages: {
18
- headerImage: string;
19
- header: string;
20
- body: string;
21
- actions: { label: string; icon?: UKIcon; onClick: () => void; changeTo?: "next" | "previous" | "remain" | "completed" }[];
22
- allowGoBack?: boolean;
23
- }[];
24
- }> = ({ pages, meta }) => {
25
- const [currentPage, setCurrentPage] = React.useState<number>(0);
26
- const page = pages[currentPage];
27
-
28
- if (localStorage.getItem(`yourdash-application-visited-${meta.id}`) || currentPage > pages.length - 1) {
29
- localStorage.setItem(`yourdash-application-visited-${meta.id}`, "true");
30
-
31
- return <Outlet />;
32
- }
33
-
34
- return (
35
- <div className={styles.page}>
36
- <Card
37
- className={styles.card}
38
- containerClassName={styles.cardContainer}
39
- >
40
- {page.allowGoBack && (
41
- <IconButton
42
- className={clippy(styles.goBackButton, "animate__animated animate__fadeInDown")}
43
- accessibleLabel="Go back to the last page"
44
- icon={UKIcon.ChevronLeft}
45
- onClick={() => {
46
- setCurrentPage(currentPage - 1);
47
- }}
48
- />
49
- )}
50
- <Image
51
- className={styles.headerImage}
52
- src={page.headerImage}
53
- accessibleLabel=""
54
- />
55
- <Heading
56
- className={styles.header}
57
- text={page.header}
58
- />
59
- <Text
60
- className={styles.body}
61
- text={page.body}
62
- />
63
- <Flex
64
- className={styles.actions}
65
- direction="row"
66
- >
67
- {page.actions.map((action) => {
68
- if (action.icon) {
69
- return (
70
- <>
71
- <ButtonWithIcon
72
- key={action.label}
73
- className={clippy(styles.action, styles.actionWithIcon)}
74
- text={action.label}
75
- icon={action.icon}
76
- onClick={() => {
77
- action.onClick();
78
- if (action.changeTo) {
79
- switch (action.changeTo) {
80
- case "next":
81
- setCurrentPage(currentPage + 1);
82
- break;
83
- case "previous":
84
- if (currentPage > 0) setCurrentPage(currentPage - 1);
85
- break;
86
- case "remain":
87
- break;
88
- case "completed":
89
- setCurrentPage(pages.length + 1);
90
- break;
91
- default:
92
- break;
93
- }
94
- }
95
- }}
96
- />
97
- </>
98
- );
99
- }
100
-
101
- return (
102
- <>
103
- <Button
104
- key={action.icon}
105
- className={clippy(styles.action, styles.actionWithoutIcon, "animate__animated animate__fadeInUp")}
106
- text={action.label}
107
- onClick={() => {
108
- action.onClick();
109
-
110
- if (action.changeTo) {
111
- switch (action.changeTo) {
112
- case "next":
113
- setCurrentPage(currentPage + 1);
114
- break;
115
- case "previous":
116
- if (currentPage > 0) setCurrentPage(currentPage - 1);
117
- break;
118
- case "remain":
119
- break;
120
- case "completed":
121
- setCurrentPage(pages.length + 1);
122
- break;
123
- default:
124
- break;
125
- }
126
- }
127
- }}
128
- />
129
- </>
130
- );
131
- })}
132
- </Flex>
133
- </Card>
134
- </div>
135
- );
136
- };
137
-
138
- export default OnBoarding;