@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.
- package/components/buttonWithIcon/buttonWithIcon.module.scss +1 -1
- package/components/buttonWithIcon/buttonWithIcon.tsx +2 -2
- package/components/icon/icon.tsx +16 -4
- package/components/icon/iconDictionary.ts +285 -566
- package/components/icon/icons/accessibility-16.svg +2 -5
- package/components/icon/icons/accessibility-inset-16.svg +2 -5
- package/components/icon/icons/alert-16.svg +2 -5
- package/components/icon/icons/alert-24.svg +2 -5
- package/components/icon/icons/alert-fill-12.svg +2 -5
- package/components/icon/icons/app-launcher-16.svg +1 -4
- package/components/icon/icons/apps-16.svg +2 -5
- package/components/icon/icons/archive-16.svg +2 -5
- package/components/icon/icons/archive-24.svg +2 -5
- package/components/icon/icons/arrow-both-16.svg +2 -5
- package/components/icon/icons/arrow-both-24.svg +2 -5
- package/components/icon/icons/arrow-down-16.svg +2 -5
- package/components/icon/icons/arrow-down-24.svg +2 -5
- package/components/icon/icons/arrow-down-left-24.svg +2 -5
- package/components/icon/icons/arrow-down-right-24.svg +2 -5
- package/components/icon/icons/arrow-left-16.svg +2 -5
- package/components/icon/icons/arrow-left-24.svg +2 -5
- package/components/icon/icons/arrow-right-16.svg +2 -5
- package/components/icon/icons/arrow-right-24.svg +2 -5
- package/components/icon/icons/arrow-switch-16.svg +2 -5
- package/components/icon/icons/arrow-switch-24.svg +2 -5
- package/components/icon/icons/arrow-up-16.svg +2 -5
- package/components/icon/icons/arrow-up-24.svg +2 -5
- package/components/icon/icons/arrow-up-left-24.svg +2 -5
- package/components/icon/icons/arrow-up-right-24.svg +2 -5
- package/components/icon/icons/beaker-16.svg +2 -5
- package/components/icon/icons/beaker-24.svg +2 -5
- package/components/icon/icons/bell-16.svg +2 -5
- package/components/icon/icons/bell-24.svg +2 -5
- package/components/icon/icons/bell-fill-16.svg +2 -5
- package/components/icon/icons/bell-fill-24.svg +2 -5
- package/components/icon/icons/bell-slash-16.svg +2 -5
- package/components/icon/icons/bell-slash-24.svg +2 -5
- package/components/icon/icons/blocked-16.svg +2 -5
- package/components/icon/icons/blocked-24.svg +2 -5
- package/components/icon/icons/bold-16.svg +2 -5
- package/components/icon/icons/bold-24.svg +2 -5
- package/components/icon/icons/book-16.svg +2 -5
- package/components/icon/icons/book-24.svg +2 -5
- package/components/icon/icons/bookmark-16.svg +2 -5
- package/components/icon/icons/bookmark-24.svg +2 -5
- package/components/icon/icons/bookmark-fill-24.svg +2 -5
- package/components/icon/icons/bookmark-slash-16.svg +2 -5
- package/components/icon/icons/bookmark-slash-24.svg +2 -5
- package/components/icon/icons/bookmark-slash-fill-24.svg +2 -5
- package/components/icon/icons/briefcase-16.svg +2 -5
- package/components/icon/icons/briefcase-24.svg +2 -5
- package/components/icon/icons/broadcast-16.svg +2 -5
- package/components/icon/icons/broadcast-24.svg +2 -5
- package/components/icon/icons/browser-16.svg +2 -5
- package/components/icon/icons/browser-24.svg +2 -5
- package/components/icon/icons/bug-16.svg +2 -5
- package/components/icon/icons/bug-24.svg +2 -5
- package/components/icon/icons/cache-16.svg +2 -5
- package/components/icon/icons/calendar-16.svg +2 -5
- package/components/icon/icons/calendar-24.svg +2 -5
- package/components/icon/icons/check-16.svg +2 -5
- package/components/icon/icons/check-24.svg +2 -5
- package/components/icon/icons/check-circle-16.svg +2 -5
- package/components/icon/icons/check-circle-24.svg +2 -5
- package/components/icon/icons/check-circle-fill-12.svg +2 -5
- package/components/icon/icons/check-circle-fill-16.svg +2 -5
- package/components/icon/icons/check-circle-fill-24.svg +2 -5
- package/components/icon/icons/checkbox-16.svg +2 -5
- package/components/icon/icons/checkbox-24.svg +2 -5
- package/components/icon/icons/checklist-16.svg +2 -5
- package/components/icon/icons/checklist-24.svg +2 -5
- package/components/icon/icons/chevron-down-16.svg +2 -5
- package/components/icon/icons/chevron-down-24.svg +2 -5
- package/components/icon/icons/chevron-left-16.svg +2 -5
- package/components/icon/icons/chevron-left-24.svg +2 -5
- package/components/icon/icons/chevron-right-16.svg +2 -5
- package/components/icon/icons/chevron-right-24.svg +2 -5
- package/components/icon/icons/chevron-up-16.svg +2 -5
- package/components/icon/icons/chevron-up-24.svg +2 -5
- package/components/icon/icons/circle-16.svg +2 -5
- package/components/icon/icons/circle-24.svg +2 -5
- package/components/icon/icons/circle-slash-16.svg +2 -5
- package/components/icon/icons/circle-slash-24.svg +2 -5
- package/components/icon/icons/clock-16.svg +2 -5
- package/components/icon/icons/clock-24.svg +2 -5
- package/components/icon/icons/cloud-16.svg +2 -5
- package/components/icon/icons/cloud-24.svg +2 -5
- package/components/icon/icons/cloud-offline-16.svg +2 -5
- package/components/icon/icons/cloud-offline-24.svg +2 -5
- package/components/icon/icons/code-16.svg +2 -5
- package/components/icon/icons/code-24.svg +2 -5
- package/components/icon/icons/code-of-conduct-16.svg +2 -5
- package/components/icon/icons/code-of-conduct-24.svg +2 -5
- package/components/icon/icons/code-review-16.svg +2 -5
- package/components/icon/icons/code-review-24.svg +2 -5
- package/components/icon/icons/code-square-16.svg +2 -5
- package/components/icon/icons/code-square-24.svg +2 -5
- package/components/icon/icons/codescan-16.svg +2 -5
- package/components/icon/icons/codescan-24.svg +2 -5
- package/components/icon/icons/codescan-checkmark-16.svg +2 -5
- package/components/icon/icons/codescan-checkmark-24.svg +2 -5
- package/components/icon/icons/codespaces-16.svg +2 -5
- package/components/icon/icons/codespaces-24.svg +2 -5
- package/components/icon/icons/columns-16.svg +2 -5
- package/components/icon/icons/columns-24.svg +2 -5
- package/components/icon/icons/command-palette-16.svg +2 -5
- package/components/icon/icons/command-palette-24.svg +2 -5
- package/components/icon/icons/comment-16.svg +2 -5
- package/components/icon/icons/comment-24.svg +2 -5
- package/components/icon/icons/comment-discussion-16.svg +2 -5
- package/components/icon/icons/comment-discussion-24.svg +2 -5
- package/components/icon/icons/commit-24.svg +2 -5
- package/components/icon/icons/container-16.svg +2 -5
- package/components/icon/icons/container-24.svg +2 -5
- package/components/icon/icons/copilot-16.svg +2 -5
- package/components/icon/icons/copilot-24.svg +2 -5
- package/components/icon/icons/copilot-48.svg +2 -5
- package/components/icon/icons/copilot-96.svg +2 -5
- package/components/icon/icons/copilot-error-16.svg +2 -5
- package/components/icon/icons/copilot-warning-16.svg +2 -5
- package/components/icon/icons/copy-16.svg +2 -5
- package/components/icon/icons/copy-24.svg +2 -5
- package/components/icon/icons/cpu-16.svg +2 -5
- package/components/icon/icons/cpu-24.svg +2 -5
- package/components/icon/icons/credit-card-16.svg +2 -5
- package/components/icon/icons/credit-card-24.svg +2 -5
- package/components/icon/icons/cross-reference-16.svg +2 -5
- package/components/icon/icons/cross-reference-24.svg +2 -5
- package/components/icon/icons/dash-16.svg +2 -5
- package/components/icon/icons/dash-24.svg +2 -5
- package/components/icon/icons/database-16.svg +2 -5
- package/components/icon/icons/database-24.svg +2 -5
- package/components/icon/icons/dependabot-16.svg +2 -5
- package/components/icon/icons/dependabot-24.svg +2 -5
- package/components/icon/icons/desktop-download-16.svg +2 -5
- package/components/icon/icons/desktop-download-24.svg +2 -5
- package/components/icon/icons/device-camera-16.svg +2 -5
- package/components/icon/icons/device-camera-video-16.svg +2 -5
- package/components/icon/icons/device-camera-video-24.svg +2 -5
- package/components/icon/icons/device-desktop-16.svg +2 -5
- package/components/icon/icons/device-desktop-24.svg +2 -5
- package/components/icon/icons/device-mobile-16.svg +2 -5
- package/components/icon/icons/device-mobile-24.svg +2 -5
- package/components/icon/icons/diamond-16.svg +2 -5
- package/components/icon/icons/diamond-24.svg +2 -5
- package/components/icon/icons/diff-16.svg +2 -5
- package/components/icon/icons/diff-24.svg +2 -5
- package/components/icon/icons/diff-added-16.svg +2 -5
- package/components/icon/icons/diff-ignored-16.svg +2 -5
- package/components/icon/icons/diff-modified-16.svg +2 -5
- package/components/icon/icons/diff-removed-16.svg +2 -5
- package/components/icon/icons/diff-renamed-16.svg +2 -5
- package/components/icon/icons/dot-16.svg +2 -5
- package/components/icon/icons/dot-24.svg +2 -5
- package/components/icon/icons/dot-fill-16.svg +2 -5
- package/components/icon/icons/dot-fill-24.svg +2 -5
- package/components/icon/icons/download-16.svg +2 -5
- package/components/icon/icons/download-24.svg +2 -5
- package/components/icon/icons/duplicate-16.svg +2 -5
- package/components/icon/icons/duplicate-24.svg +2 -5
- package/components/icon/icons/ellipsis-16.svg +2 -5
- package/components/icon/icons/eye-16.svg +2 -5
- package/components/icon/icons/eye-24.svg +2 -5
- package/components/icon/icons/eye-closed-16.svg +2 -5
- package/components/icon/icons/eye-closed-24.svg +2 -5
- package/components/icon/icons/feed-discussion-16.svg +2 -5
- package/components/icon/icons/feed-forked-16.svg +2 -5
- package/components/icon/icons/feed-heart-16.svg +2 -5
- package/components/icon/icons/feed-merged-16.svg +2 -5
- package/components/icon/icons/feed-person-16.svg +2 -5
- package/components/icon/icons/feed-repo-16.svg +2 -5
- package/components/icon/icons/feed-rocket-16.svg +2 -5
- package/components/icon/icons/feed-star-16.svg +2 -5
- package/components/icon/icons/feed-tag-16.svg +2 -5
- package/components/icon/icons/feed-trophy-16.svg +2 -5
- package/components/icon/icons/file-16.svg +2 -5
- package/components/icon/icons/file-24.svg +2 -5
- package/components/icon/icons/file-added-16.svg +2 -5
- package/components/icon/icons/file-badge-16.svg +2 -5
- package/components/icon/icons/file-binary-16.svg +2 -5
- package/components/icon/icons/file-binary-24.svg +2 -5
- package/components/icon/icons/file-code-16.svg +2 -5
- package/components/icon/icons/file-code-24.svg +2 -5
- package/components/icon/icons/file-diff-16.svg +2 -5
- package/components/icon/icons/file-diff-24.svg +2 -5
- package/components/icon/icons/file-directory-16.svg +2 -5
- package/components/icon/icons/file-directory-24.svg +2 -5
- package/components/icon/icons/file-directory-fill-16.svg +2 -5
- package/components/icon/icons/file-directory-fill-24.svg +2 -5
- package/components/icon/icons/file-directory-open-fill-16.svg +2 -5
- package/components/icon/icons/file-media-24.svg +2 -5
- package/components/icon/icons/file-moved-16.svg +2 -5
- package/components/icon/icons/file-removed-16.svg +2 -5
- package/components/icon/icons/file-submodule-16.svg +2 -5
- package/components/icon/icons/file-submodule-24.svg +2 -5
- package/components/icon/icons/file-symlink-file-16.svg +2 -5
- package/components/icon/icons/file-symlink-file-24.svg +2 -5
- package/components/icon/icons/file-zip-16.svg +2 -5
- package/components/icon/icons/file-zip-24.svg +2 -5
- package/components/icon/icons/filter-16.svg +2 -5
- package/components/icon/icons/filter-24.svg +2 -5
- package/components/icon/icons/flame-16.svg +2 -5
- package/components/icon/icons/flame-24.svg +2 -5
- package/components/icon/icons/fold-16.svg +2 -5
- package/components/icon/icons/fold-24.svg +2 -5
- package/components/icon/icons/fold-down-16.svg +2 -5
- package/components/icon/icons/fold-down-24.svg +2 -5
- package/components/icon/icons/fold-up-16.svg +2 -5
- package/components/icon/icons/fold-up-24.svg +2 -5
- package/components/icon/icons/gear-16.svg +2 -5
- package/components/icon/icons/gear-24.svg +2 -5
- package/components/icon/icons/gift-16.svg +2 -5
- package/components/icon/icons/gift-24.svg +2 -5
- package/components/icon/icons/git-branch-16.svg +2 -5
- package/components/icon/icons/git-branch-24.svg +2 -5
- package/components/icon/icons/git-commit-16.svg +2 -5
- package/components/icon/icons/git-commit-24.svg +2 -5
- package/components/icon/icons/git-compare-16.svg +2 -5
- package/components/icon/icons/git-compare-24.svg +2 -5
- package/components/icon/icons/git-merge-16.svg +2 -5
- package/components/icon/icons/git-merge-24.svg +2 -5
- package/components/icon/icons/git-merge-queue-16.svg +2 -5
- package/components/icon/icons/git-pull-request-16.svg +2 -5
- package/components/icon/icons/git-pull-request-24.svg +2 -5
- package/components/icon/icons/git-pull-request-closed-16.svg +2 -5
- package/components/icon/icons/git-pull-request-closed-24.svg +2 -5
- package/components/icon/icons/git-pull-request-draft-16.svg +2 -5
- package/components/icon/icons/git-pull-request-draft-24.svg +2 -5
- package/components/icon/icons/globe-16.svg +2 -5
- package/components/icon/icons/globe-24.svg +2 -5
- package/components/icon/icons/grabber-16.svg +2 -5
- package/components/icon/icons/grabber-24.svg +2 -5
- package/components/icon/icons/graph-16.svg +2 -5
- package/components/icon/icons/graph-24.svg +2 -5
- package/components/icon/icons/hash-16.svg +2 -5
- package/components/icon/icons/hash-24.svg +2 -5
- package/components/icon/icons/heading-16.svg +2 -5
- package/components/icon/icons/heading-24.svg +2 -5
- package/components/icon/icons/heart-16.svg +2 -5
- package/components/icon/icons/heart-24.svg +2 -5
- package/components/icon/icons/heart-fill-16.svg +2 -5
- package/components/icon/icons/heart-fill-24.svg +2 -5
- package/components/icon/icons/history-16.svg +2 -5
- package/components/icon/icons/history-24.svg +2 -5
- package/components/icon/icons/home-16.svg +2 -5
- package/components/icon/icons/home-24.svg +2 -5
- package/components/icon/icons/home-fill-24.svg +2 -5
- package/components/icon/icons/horizontal-rule-16.svg +2 -5
- package/components/icon/icons/horizontal-rule-24.svg +2 -5
- package/components/icon/icons/hourglass-16.svg +2 -5
- package/components/icon/icons/hourglass-24.svg +2 -5
- package/components/icon/icons/hubot-16.svg +2 -5
- package/components/icon/icons/hubot-24.svg +2 -5
- package/components/icon/icons/id-badge-16.svg +2 -5
- package/components/icon/icons/image-16.svg +2 -5
- package/components/icon/icons/image-24.svg +2 -5
- package/components/icon/icons/inbox-16.svg +2 -5
- package/components/icon/icons/inbox-24.svg +2 -5
- package/components/icon/icons/infinity-16.svg +2 -5
- package/components/icon/icons/infinity-24.svg +2 -5
- package/components/icon/icons/info-16.svg +2 -5
- package/components/icon/icons/info-24.svg +2 -5
- package/components/icon/icons/issue-closed-16.svg +2 -5
- package/components/icon/icons/issue-closed-24.svg +2 -5
- package/components/icon/icons/issue-draft-16.svg +2 -5
- package/components/icon/icons/issue-draft-24.svg +2 -5
- package/components/icon/icons/issue-opened-16.svg +2 -5
- package/components/icon/icons/issue-opened-24.svg +2 -5
- package/components/icon/icons/issue-reopened-16.svg +2 -5
- package/components/icon/icons/issue-reopened-24.svg +2 -5
- package/components/icon/icons/italic-16.svg +2 -5
- package/components/icon/icons/italic-24.svg +2 -5
- package/components/icon/icons/iterations-16.svg +2 -5
- package/components/icon/icons/iterations-24.svg +2 -5
- package/components/icon/icons/kebab-horizontal-16.svg +2 -5
- package/components/icon/icons/kebab-horizontal-24.svg +2 -5
- package/components/icon/icons/key-16.svg +2 -5
- package/components/icon/icons/key-24.svg +2 -5
- package/components/icon/icons/key-asterisk-16.svg +2 -5
- package/components/icon/icons/law-16.svg +2 -5
- package/components/icon/icons/law-24.svg +2 -5
- package/components/icon/icons/light-bulb-16.svg +2 -5
- package/components/icon/icons/light-bulb-24.svg +2 -5
- package/components/icon/icons/link-16.svg +2 -5
- package/components/icon/icons/link-24.svg +2 -5
- package/components/icon/icons/link-external-16.svg +2 -5
- package/components/icon/icons/link-external-24.svg +2 -5
- package/components/icon/icons/list-ordered-16.svg +2 -5
- package/components/icon/icons/list-ordered-24.svg +2 -5
- package/components/icon/icons/list-unordered-16.svg +2 -5
- package/components/icon/icons/list-unordered-24.svg +2 -5
- package/components/icon/icons/location-16.svg +2 -5
- package/components/icon/icons/location-24.svg +2 -5
- package/components/icon/icons/lock-16.svg +2 -5
- package/components/icon/icons/lock-24.svg +2 -5
- package/components/icon/icons/log-16.svg +2 -5
- package/components/icon/icons/login.svg +1 -4
- package/components/icon/icons/logo-gist-16.svg +2 -5
- package/components/icon/icons/logo-github-16.svg +2 -5
- package/components/icon/icons/logout.svg +1 -4
- package/components/icon/icons/mail-16.svg +2 -5
- package/components/icon/icons/mail-24.svg +2 -5
- package/components/icon/icons/mark-github-16.svg +2 -5
- package/components/icon/icons/markdown-16.svg +2 -5
- package/components/icon/icons/megaphone-16.svg +2 -5
- package/components/icon/icons/megaphone-24.svg +2 -5
- package/components/icon/icons/mention-16.svg +2 -5
- package/components/icon/icons/mention-24.svg +2 -5
- package/components/icon/icons/meter-16.svg +2 -5
- package/components/icon/icons/milestone-16.svg +2 -5
- package/components/icon/icons/milestone-24.svg +2 -5
- package/components/icon/icons/mirror-16.svg +2 -5
- package/components/icon/icons/mirror-24.svg +2 -5
- package/components/icon/icons/moon-16.svg +2 -5
- package/components/icon/icons/moon-24.svg +2 -5
- package/components/icon/icons/mortar-board-16.svg +2 -5
- package/components/icon/icons/mortar-board-24.svg +2 -5
- package/components/icon/icons/multi-select-16.svg +2 -5
- package/components/icon/icons/multi-select-24.svg +2 -5
- package/components/icon/icons/mute-16.svg +2 -5
- package/components/icon/icons/mute-24.svg +2 -5
- package/components/icon/icons/no-entry-16.svg +2 -5
- package/components/icon/icons/no-entry-24.svg +2 -5
- package/components/icon/icons/no-entry-fill-12.svg +2 -5
- package/components/icon/icons/north-star-16.svg +2 -5
- package/components/icon/icons/north-star-24.svg +2 -5
- package/components/icon/icons/note-16.svg +2 -5
- package/components/icon/icons/note-24.svg +2 -5
- package/components/icon/icons/number-16.svg +2 -5
- package/components/icon/icons/number-24.svg +2 -5
- package/components/icon/icons/organization-16.svg +2 -5
- package/components/icon/icons/organization-24.svg +2 -5
- package/components/icon/icons/package-16.svg +2 -5
- package/components/icon/icons/package-24.svg +2 -5
- package/components/icon/icons/package-dependencies-16.svg +2 -5
- package/components/icon/icons/package-dependencies-24.svg +2 -5
- package/components/icon/icons/package-dependents-16.svg +2 -5
- package/components/icon/icons/package-dependents-24.svg +2 -5
- package/components/icon/icons/paintbrush-16.svg +2 -5
- package/components/icon/icons/paper-airplane-16.svg +2 -5
- package/components/icon/icons/paper-airplane-24.svg +2 -5
- package/components/icon/icons/paperclip-16.svg +2 -5
- package/components/icon/icons/paperclip-24.svg +2 -5
- package/components/icon/icons/paste-16.svg +2 -5
- package/components/icon/icons/paste-24.svg +2 -5
- package/components/icon/icons/pencil-16.svg +2 -5
- package/components/icon/icons/pencil-24.svg +2 -5
- package/components/icon/icons/people-16.svg +2 -5
- package/components/icon/icons/people-24.svg +2 -5
- package/components/icon/icons/person-16.svg +2 -5
- package/components/icon/icons/person-24.svg +2 -5
- package/components/icon/icons/person-add-16.svg +2 -5
- package/components/icon/icons/person-add-24.svg +2 -5
- package/components/icon/icons/person-fill-16.svg +2 -5
- package/components/icon/icons/person-fill-24.svg +2 -5
- package/components/icon/icons/pin-16.svg +2 -5
- package/components/icon/icons/pin-24.svg +2 -5
- package/components/icon/icons/play-16.svg +2 -5
- package/components/icon/icons/play-24.svg +2 -5
- package/components/icon/icons/plug-16.svg +2 -5
- package/components/icon/icons/plug-24.svg +2 -5
- package/components/icon/icons/plus-16.svg +2 -5
- package/components/icon/icons/plus-24.svg +2 -5
- package/components/icon/icons/plus-circle-16.svg +2 -5
- package/components/icon/icons/plus-circle-24.svg +2 -5
- package/components/icon/icons/project-16.svg +2 -5
- package/components/icon/icons/project-24.svg +2 -5
- package/components/icon/icons/pulse-16.svg +2 -5
- package/components/icon/icons/pulse-24.svg +2 -5
- package/components/icon/icons/question-16.svg +2 -5
- package/components/icon/icons/question-24.svg +2 -5
- package/components/icon/icons/quote-16.svg +2 -5
- package/components/icon/icons/quote-24.svg +2 -5
- package/components/icon/icons/reply-16.svg +2 -5
- package/components/icon/icons/reply-24.svg +2 -5
- package/components/icon/icons/repo-16.svg +2 -5
- package/components/icon/icons/repo-24.svg +2 -5
- package/components/icon/icons/repo-clone-16.svg +2 -5
- package/components/icon/icons/repo-deleted-16.svg +2 -5
- package/components/icon/icons/repo-forked-16.svg +2 -5
- package/components/icon/icons/repo-forked-24.svg +2 -5
- package/components/icon/icons/repo-locked-16.svg +2 -5
- package/components/icon/icons/repo-locked-24.svg +2 -5
- package/components/icon/icons/repo-pull-16.svg +2 -5
- package/components/icon/icons/repo-push-16.svg +2 -5
- package/components/icon/icons/repo-push-24.svg +2 -5
- package/components/icon/icons/repo-template-16.svg +2 -5
- package/components/icon/icons/repo-template-24.svg +2 -5
- package/components/icon/icons/report-16.svg +2 -5
- package/components/icon/icons/report-24.svg +2 -5
- package/components/icon/icons/rocket-16.svg +2 -5
- package/components/icon/icons/rocket-24.svg +2 -5
- package/components/icon/icons/rows-16.svg +2 -5
- package/components/icon/icons/rows-24.svg +2 -5
- package/components/icon/icons/rss-16.svg +2 -5
- package/components/icon/icons/rss-24.svg +2 -5
- package/components/icon/icons/ruby-16.svg +2 -5
- package/components/icon/icons/ruby-24.svg +2 -5
- package/components/icon/icons/screen-full-16.svg +2 -5
- package/components/icon/icons/screen-full-24.svg +2 -5
- package/components/icon/icons/screen-normal-16.svg +2 -5
- package/components/icon/icons/screen-normal-24.svg +2 -5
- package/components/icon/icons/search-16.svg +2 -5
- package/components/icon/icons/search-24.svg +2 -5
- package/components/icon/icons/server-16.svg +2 -5
- package/components/icon/icons/server-24.svg +2 -5
- package/components/icon/icons/server-error.svg +1 -4
- package/components/icon/icons/share-16.svg +2 -5
- package/components/icon/icons/share-24.svg +2 -5
- package/components/icon/icons/share-android-16.svg +2 -5
- package/components/icon/icons/share-android-24.svg +2 -5
- package/components/icon/icons/shield-16.svg +2 -5
- package/components/icon/icons/shield-24.svg +2 -5
- package/components/icon/icons/shield-check-16.svg +2 -5
- package/components/icon/icons/shield-check-24.svg +2 -5
- package/components/icon/icons/shield-lock-16.svg +2 -5
- package/components/icon/icons/shield-lock-24.svg +2 -5
- package/components/icon/icons/shield-slash-16.svg +2 -5
- package/components/icon/icons/shield-x-16.svg +2 -5
- package/components/icon/icons/shield-x-24.svg +2 -5
- package/components/icon/icons/sidebar-collapse-16.svg +2 -5
- package/components/icon/icons/sidebar-collapse-24.svg +2 -5
- package/components/icon/icons/sidebar-expand-16.svg +2 -5
- package/components/icon/icons/sidebar-expand-24.svg +2 -5
- package/components/icon/icons/sign-in-16.svg +2 -5
- package/components/icon/icons/sign-in-24.svg +2 -5
- package/components/icon/icons/sign-out-16.svg +2 -5
- package/components/icon/icons/sign-out-24.svg +2 -5
- package/components/icon/icons/single-select-16.svg +2 -5
- package/components/icon/icons/single-select-24.svg +2 -5
- package/components/icon/icons/skip-16.svg +2 -5
- package/components/icon/icons/skip-24.svg +2 -5
- package/components/icon/icons/sliders-16.svg +2 -5
- package/components/icon/icons/smiley-16.svg +2 -5
- package/components/icon/icons/smiley-24.svg +2 -5
- package/components/icon/icons/sort-asc-16.svg +2 -5
- package/components/icon/icons/sort-asc-24.svg +2 -5
- package/components/icon/icons/sort-desc-16.svg +2 -5
- package/components/icon/icons/sort-desc-24.svg +2 -5
- package/components/icon/icons/square-16.svg +2 -5
- package/components/icon/icons/square-24.svg +2 -5
- package/components/icon/icons/square-fill-16.svg +2 -5
- package/components/icon/icons/square-fill-24.svg +2 -5
- package/components/icon/icons/squirrel-16.svg +2 -5
- package/components/icon/icons/squirrel-24.svg +2 -5
- package/components/icon/icons/stack-16.svg +2 -5
- package/components/icon/icons/stack-24.svg +2 -5
- package/components/icon/icons/star-16.svg +2 -5
- package/components/icon/icons/star-24.svg +2 -5
- package/components/icon/icons/star-fill-16.svg +2 -5
- package/components/icon/icons/star-fill-24.svg +2 -5
- package/components/icon/icons/stop-16.svg +2 -5
- package/components/icon/icons/stop-24.svg +2 -5
- package/components/icon/icons/stopwatch-16.svg +2 -5
- package/components/icon/icons/stopwatch-24.svg +2 -5
- package/components/icon/icons/store.svg +1 -4
- package/components/icon/icons/strikethrough-16.svg +2 -5
- package/components/icon/icons/strikethrough-24.svg +2 -5
- package/components/icon/icons/sun-16.svg +2 -5
- package/components/icon/icons/sun-24.svg +2 -5
- package/components/icon/icons/sync-16.svg +2 -5
- package/components/icon/icons/sync-24.svg +2 -5
- package/components/icon/icons/tab-24.svg +2 -5
- package/components/icon/icons/tab-external-16.svg +2 -5
- package/components/icon/icons/table-16.svg +2 -5
- package/components/icon/icons/table-24.svg +2 -5
- package/components/icon/icons/tag-16.svg +2 -5
- package/components/icon/icons/tag-24.svg +2 -5
- package/components/icon/icons/tasklist-16.svg +2 -5
- package/components/icon/icons/tasklist-24.svg +2 -5
- package/components/icon/icons/telescope-16.svg +2 -5
- package/components/icon/icons/telescope-24.svg +2 -5
- package/components/icon/icons/telescope-fill-16.svg +2 -5
- package/components/icon/icons/telescope-fill-24.svg +2 -5
- package/components/icon/icons/terminal-16.svg +2 -5
- package/components/icon/icons/terminal-24.svg +2 -5
- package/components/icon/icons/three-bars-16.svg +2 -5
- package/components/icon/icons/thumbsdown-16.svg +2 -5
- package/components/icon/icons/thumbsdown-24.svg +2 -5
- package/components/icon/icons/thumbsup-16.svg +2 -5
- package/components/icon/icons/thumbsup-24.svg +2 -5
- package/components/icon/icons/tools-16.svg +2 -5
- package/components/icon/icons/tools-24.svg +2 -5
- package/components/icon/icons/trash-16.svg +2 -5
- package/components/icon/icons/trash-24.svg +2 -5
- package/components/icon/icons/triangle-down-16.svg +2 -5
- package/components/icon/icons/triangle-down-24.svg +2 -5
- package/components/icon/icons/triangle-left-16.svg +2 -5
- package/components/icon/icons/triangle-left-24.svg +2 -5
- package/components/icon/icons/triangle-right-16.svg +2 -5
- package/components/icon/icons/triangle-right-24.svg +2 -5
- package/components/icon/icons/triangle-up-16.svg +2 -5
- package/components/icon/icons/triangle-up-24.svg +2 -5
- package/components/icon/icons/trophy-16.svg +2 -5
- package/components/icon/icons/trophy-24.svg +2 -5
- package/components/icon/icons/typography-16.svg +2 -5
- package/components/icon/icons/typography-24.svg +2 -5
- package/components/icon/icons/unfold-16.svg +2 -5
- package/components/icon/icons/unfold-24.svg +2 -5
- package/components/icon/icons/unlock-16.svg +2 -5
- package/components/icon/icons/unlock-24.svg +2 -5
- package/components/icon/icons/unmute-16.svg +2 -5
- package/components/icon/icons/unmute-24.svg +2 -5
- package/components/icon/icons/unverified-16.svg +2 -5
- package/components/icon/icons/unverified-24.svg +2 -5
- package/components/icon/icons/upload-16.svg +2 -5
- package/components/icon/icons/upload-24.svg +2 -5
- package/components/icon/icons/verified-16.svg +2 -5
- package/components/icon/icons/verified-24.svg +2 -5
- package/components/icon/icons/versions-16.svg +2 -5
- package/components/icon/icons/versions-24.svg +2 -5
- package/components/icon/icons/video-16.svg +2 -5
- package/components/icon/icons/video-24.svg +2 -5
- package/components/icon/icons/webhook-16.svg +2 -5
- package/components/icon/icons/workflow-16.svg +2 -5
- package/components/icon/icons/workflow-24.svg +2 -5
- package/components/icon/icons/x-16.svg +2 -5
- package/components/icon/icons/x-24.svg +2 -5
- package/components/icon/icons/x-circle-16.svg +2 -5
- package/components/icon/icons/x-circle-24.svg +2 -5
- package/components/icon/icons/x-circle-fill-12.svg +2 -5
- package/components/icon/icons/x-circle-fill-16.svg +2 -5
- package/components/icon/icons/x-circle-fill-24.svg +2 -5
- package/components/icon/icons/yourdash.svg +1 -4
- package/components/icon/icons/zap-16.svg +2 -5
- package/components/icon/icons/zap-24.svg +2 -5
- package/components/iconButton/iconButton.tsx +1 -1
- package/components/image/image.tsx +83 -83
- package/components/textInput/textInput.tsx +82 -82
- package/package.json +1 -1
- package/views/dialog/dialog.tsx +23 -23
- package/views/onBoarding/onBoarding.tsx +143 -138
- 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
package/views/dialog/dialog.tsx
CHANGED
@@ -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: {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<
|
56
|
-
className={styles.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
break;
|
88
|
-
case "
|
89
|
-
setCurrentPage(
|
90
|
-
break;
|
91
|
-
|
92
|
-
break;
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
break;
|
120
|
-
case "
|
121
|
-
setCurrentPage(
|
122
|
-
break;
|
123
|
-
|
124
|
-
break;
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
}
|
137
|
-
|
138
|
-
|
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;
|