@yourdash/uikit 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/components/box/box.module.scss +21 -21
- package/components/box/box.tsx +22 -22
- package/components/button/button.module.scss +46 -47
- package/components/button/button.tsx +24 -23
- package/components/buttonLink/buttonLink.module.scss +51 -47
- package/components/buttonLink/buttonLink.tsx +27 -26
- package/components/buttonWithIcon/buttonWithIcon.module.scss +56 -0
- package/components/buttonWithIcon/buttonWithIcon.tsx +36 -0
- package/components/card/card.module.scss +78 -78
- package/components/card/card.tsx +64 -61
- package/components/container/container.module.scss +20 -0
- package/components/container/container.tsx +22 -0
- package/components/contextMenu/contextMenu.tsx +55 -55
- package/components/contextMenu/contextMenuRoot.module.scss +31 -31
- package/components/contextMenu/contextMenuRoot.tsx +4 -4
- package/components/contextMenu/contextMenuRootContext.tsx +22 -22
- package/components/flex/flex.module.scss +12 -0
- package/components/flex/flex.tsx +34 -13
- package/components/heading/heading.module.scss +41 -41
- package/components/heading/heading.tsx +27 -27
- package/components/icon/icon.module.scss +26 -26
- package/components/icon/icon.tsx +30 -30
- package/components/icon/iconDictionary.ts +573 -573
- package/components/icon/icons/accessibility-16.svg +8 -8
- package/components/icon/icons/accessibility-inset-16.svg +8 -8
- package/components/icon/icons/alert-16.svg +8 -8
- package/components/icon/icons/alert-24.svg +9 -9
- package/components/icon/icons/alert-fill-12.svg +8 -8
- package/components/icon/icons/app-launcher-16.svg +11 -11
- package/components/icon/icons/apps-16.svg +8 -8
- package/components/icon/icons/archive-16.svg +8 -8
- package/components/icon/icons/archive-24.svg +11 -11
- package/components/icon/icons/arrow-both-16.svg +8 -8
- package/components/icon/icons/arrow-both-24.svg +5 -5
- package/components/icon/icons/arrow-down-16.svg +8 -8
- package/components/icon/icons/arrow-down-24.svg +8 -8
- package/components/icon/icons/arrow-down-left-24.svg +8 -8
- package/components/icon/icons/arrow-down-right-24.svg +8 -8
- package/components/icon/icons/arrow-left-16.svg +8 -8
- package/components/icon/icons/arrow-left-24.svg +8 -8
- package/components/icon/icons/arrow-right-16.svg +8 -8
- package/components/icon/icons/arrow-right-24.svg +8 -8
- package/components/icon/icons/arrow-switch-16.svg +5 -5
- package/components/icon/icons/arrow-switch-24.svg +5 -5
- package/components/icon/icons/arrow-up-16.svg +8 -8
- package/components/icon/icons/arrow-up-24.svg +8 -8
- package/components/icon/icons/arrow-up-left-24.svg +8 -8
- package/components/icon/icons/arrow-up-right-24.svg +8 -8
- package/components/icon/icons/beaker-16.svg +8 -8
- package/components/icon/icons/beaker-24.svg +8 -8
- package/components/icon/icons/bell-16.svg +9 -9
- package/components/icon/icons/bell-24.svg +8 -8
- package/components/icon/icons/bell-fill-16.svg +5 -5
- package/components/icon/icons/bell-fill-24.svg +8 -8
- package/components/icon/icons/bell-slash-16.svg +8 -8
- package/components/icon/icons/bell-slash-24.svg +10 -10
- package/components/icon/icons/blocked-16.svg +8 -8
- package/components/icon/icons/blocked-24.svg +8 -8
- package/components/icon/icons/bold-16.svg +8 -8
- package/components/icon/icons/bold-24.svg +8 -8
- package/components/icon/icons/book-16.svg +8 -8
- package/components/icon/icons/book-24.svg +8 -8
- package/components/icon/icons/bookmark-16.svg +8 -8
- package/components/icon/icons/bookmark-24.svg +8 -8
- package/components/icon/icons/bookmark-fill-24.svg +8 -8
- package/components/icon/icons/bookmark-slash-16.svg +8 -8
- package/components/icon/icons/bookmark-slash-24.svg +9 -9
- package/components/icon/icons/bookmark-slash-fill-24.svg +8 -8
- package/components/icon/icons/briefcase-16.svg +8 -8
- package/components/icon/icons/briefcase-24.svg +8 -8
- package/components/icon/icons/broadcast-16.svg +8 -8
- package/components/icon/icons/broadcast-24.svg +5 -5
- package/components/icon/icons/browser-16.svg +8 -8
- package/components/icon/icons/browser-24.svg +8 -8
- package/components/icon/icons/bug-16.svg +8 -8
- package/components/icon/icons/bug-24.svg +8 -8
- package/components/icon/icons/cache-16.svg +10 -10
- package/components/icon/icons/calendar-16.svg +8 -8
- package/components/icon/icons/calendar-24.svg +8 -8
- package/components/icon/icons/check-16.svg +8 -8
- package/components/icon/icons/check-24.svg +8 -8
- package/components/icon/icons/check-circle-16.svg +8 -8
- package/components/icon/icons/check-circle-24.svg +9 -9
- package/components/icon/icons/check-circle-fill-12.svg +8 -8
- package/components/icon/icons/check-circle-fill-16.svg +8 -8
- package/components/icon/icons/check-circle-fill-24.svg +8 -8
- package/components/icon/icons/checkbox-16.svg +8 -8
- package/components/icon/icons/checkbox-24.svg +9 -9
- package/components/icon/icons/checklist-16.svg +8 -8
- package/components/icon/icons/checklist-24.svg +5 -5
- package/components/icon/icons/chevron-down-16.svg +8 -8
- package/components/icon/icons/chevron-down-24.svg +8 -8
- package/components/icon/icons/chevron-left-16.svg +8 -8
- package/components/icon/icons/chevron-left-24.svg +8 -8
- package/components/icon/icons/chevron-right-16.svg +8 -8
- package/components/icon/icons/chevron-right-24.svg +8 -8
- package/components/icon/icons/chevron-up-16.svg +8 -8
- package/components/icon/icons/chevron-up-24.svg +8 -8
- package/components/icon/icons/circle-16.svg +7 -7
- package/components/icon/icons/circle-24.svg +8 -8
- package/components/icon/icons/circle-slash-16.svg +8 -8
- package/components/icon/icons/circle-slash-24.svg +8 -8
- package/components/icon/icons/clock-16.svg +8 -8
- package/components/icon/icons/clock-24.svg +9 -9
- package/components/icon/icons/cloud-16.svg +8 -8
- package/components/icon/icons/cloud-24.svg +8 -8
- package/components/icon/icons/cloud-offline-16.svg +10 -10
- package/components/icon/icons/cloud-offline-24.svg +10 -10
- package/components/icon/icons/code-16.svg +8 -8
- package/components/icon/icons/code-24.svg +8 -8
- package/components/icon/icons/code-of-conduct-16.svg +8 -8
- package/components/icon/icons/code-of-conduct-24.svg +8 -8
- package/components/icon/icons/code-review-16.svg +8 -8
- package/components/icon/icons/code-review-24.svg +10 -10
- package/components/icon/icons/code-square-16.svg +8 -8
- package/components/icon/icons/code-square-24.svg +10 -10
- package/components/icon/icons/codescan-16.svg +10 -10
- package/components/icon/icons/codescan-24.svg +10 -10
- package/components/icon/icons/codescan-checkmark-16.svg +9 -9
- package/components/icon/icons/codescan-checkmark-24.svg +9 -9
- package/components/icon/icons/codespaces-16.svg +10 -10
- package/components/icon/icons/codespaces-24.svg +10 -10
- package/components/icon/icons/columns-16.svg +8 -8
- package/components/icon/icons/columns-24.svg +8 -8
- package/components/icon/icons/command-palette-16.svg +5 -5
- package/components/icon/icons/command-palette-24.svg +5 -5
- package/components/icon/icons/comment-16.svg +8 -8
- package/components/icon/icons/comment-24.svg +8 -8
- package/components/icon/icons/comment-discussion-16.svg +8 -8
- package/components/icon/icons/comment-discussion-24.svg +10 -10
- package/components/icon/icons/commit-24.svg +9 -9
- package/components/icon/icons/container-16.svg +8 -8
- package/components/icon/icons/container-24.svg +8 -8
- package/components/icon/icons/copilot-16.svg +9 -9
- package/components/icon/icons/copilot-24.svg +9 -9
- package/components/icon/icons/copilot-48.svg +9 -9
- package/components/icon/icons/copilot-96.svg +9 -9
- package/components/icon/icons/copilot-error-16.svg +8 -8
- package/components/icon/icons/copilot-warning-16.svg +10 -10
- package/components/icon/icons/copy-16.svg +10 -10
- package/components/icon/icons/copy-24.svg +10 -10
- package/components/icon/icons/cpu-16.svg +8 -8
- package/components/icon/icons/cpu-24.svg +10 -10
- package/components/icon/icons/credit-card-16.svg +9 -9
- package/components/icon/icons/credit-card-24.svg +9 -9
- package/components/icon/icons/cross-reference-16.svg +8 -8
- package/components/icon/icons/cross-reference-24.svg +5 -5
- package/components/icon/icons/dash-16.svg +7 -7
- package/components/icon/icons/dash-24.svg +7 -7
- package/components/icon/icons/database-16.svg +8 -8
- package/components/icon/icons/database-24.svg +8 -8
- package/components/icon/icons/dependabot-16.svg +9 -9
- package/components/icon/icons/dependabot-24.svg +9 -9
- package/components/icon/icons/desktop-download-16.svg +5 -5
- package/components/icon/icons/desktop-download-24.svg +10 -10
- package/components/icon/icons/device-camera-16.svg +8 -8
- package/components/icon/icons/device-camera-video-16.svg +8 -8
- package/components/icon/icons/device-camera-video-24.svg +8 -8
- package/components/icon/icons/device-desktop-16.svg +8 -8
- package/components/icon/icons/device-desktop-24.svg +8 -8
- package/components/icon/icons/device-mobile-16.svg +8 -8
- package/components/icon/icons/device-mobile-24.svg +9 -9
- package/components/icon/icons/diamond-16.svg +8 -8
- package/components/icon/icons/diamond-24.svg +8 -8
- package/components/icon/icons/diff-16.svg +8 -8
- package/components/icon/icons/diff-24.svg +8 -8
- package/components/icon/icons/diff-added-16.svg +8 -8
- package/components/icon/icons/diff-ignored-16.svg +8 -8
- package/components/icon/icons/diff-modified-16.svg +8 -8
- package/components/icon/icons/diff-removed-16.svg +8 -8
- package/components/icon/icons/diff-renamed-16.svg +8 -8
- package/components/icon/icons/dot-16.svg +7 -7
- package/components/icon/icons/dot-24.svg +7 -7
- package/components/icon/icons/dot-fill-16.svg +7 -7
- package/components/icon/icons/dot-fill-24.svg +5 -5
- package/components/icon/icons/download-16.svg +8 -8
- package/components/icon/icons/download-24.svg +5 -5
- package/components/icon/icons/duplicate-16.svg +11 -11
- package/components/icon/icons/duplicate-24.svg +11 -11
- package/components/icon/icons/ellipsis-16.svg +8 -8
- package/components/icon/icons/ewsgit.svg +14 -14
- package/components/icon/icons/eye-16.svg +8 -8
- package/components/icon/icons/eye-24.svg +9 -9
- package/components/icon/icons/eye-closed-16.svg +8 -8
- package/components/icon/icons/eye-closed-24.svg +10 -10
- package/components/icon/icons/feed-discussion-16.svg +8 -8
- package/components/icon/icons/feed-forked-16.svg +8 -8
- package/components/icon/icons/feed-heart-16.svg +8 -8
- package/components/icon/icons/feed-merged-16.svg +8 -8
- package/components/icon/icons/feed-person-16.svg +8 -8
- package/components/icon/icons/feed-repo-16.svg +8 -8
- package/components/icon/icons/feed-rocket-16.svg +8 -8
- package/components/icon/icons/feed-star-16.svg +8 -8
- package/components/icon/icons/feed-tag-16.svg +9 -9
- package/components/icon/icons/feed-trophy-16.svg +9 -9
- package/components/icon/icons/file-16.svg +8 -8
- package/components/icon/icons/file-24.svg +8 -8
- package/components/icon/icons/file-added-16.svg +8 -8
- package/components/icon/icons/file-badge-16.svg +10 -10
- package/components/icon/icons/file-binary-16.svg +8 -8
- package/components/icon/icons/file-binary-24.svg +11 -11
- package/components/icon/icons/file-code-16.svg +8 -8
- package/components/icon/icons/file-code-24.svg +10 -10
- package/components/icon/icons/file-diff-16.svg +8 -8
- package/components/icon/icons/file-diff-24.svg +10 -10
- package/components/icon/icons/file-directory-16.svg +8 -8
- package/components/icon/icons/file-directory-24.svg +8 -8
- package/components/icon/icons/file-directory-fill-16.svg +5 -5
- package/components/icon/icons/file-directory-fill-24.svg +8 -8
- package/components/icon/icons/file-directory-open-fill-16.svg +5 -5
- package/components/icon/icons/file-media-24.svg +8 -8
- package/components/icon/icons/file-moved-16.svg +5 -5
- package/components/icon/icons/file-removed-16.svg +8 -8
- package/components/icon/icons/file-submodule-16.svg +8 -8
- package/components/icon/icons/file-submodule-24.svg +8 -8
- package/components/icon/icons/file-symlink-file-16.svg +8 -8
- package/components/icon/icons/file-symlink-file-24.svg +8 -8
- package/components/icon/icons/file-zip-16.svg +8 -8
- package/components/icon/icons/file-zip-24.svg +12 -12
- package/components/icon/icons/filter-16.svg +8 -8
- package/components/icon/icons/filter-24.svg +5 -5
- package/components/icon/icons/flame-16.svg +8 -8
- package/components/icon/icons/flame-24.svg +8 -8
- package/components/icon/icons/fold-16.svg +5 -5
- package/components/icon/icons/fold-24.svg +12 -12
- package/components/icon/icons/fold-down-16.svg +5 -5
- package/components/icon/icons/fold-down-24.svg +10 -10
- package/components/icon/icons/fold-up-16.svg +5 -5
- package/components/icon/icons/fold-up-24.svg +10 -10
- package/components/icon/icons/gear-16.svg +8 -8
- package/components/icon/icons/gear-24.svg +9 -9
- package/components/icon/icons/gift-16.svg +8 -8
- package/components/icon/icons/gift-24.svg +8 -8
- package/components/icon/icons/git-branch-16.svg +8 -8
- package/components/icon/icons/git-branch-24.svg +11 -11
- package/components/icon/icons/git-commit-16.svg +8 -8
- package/components/icon/icons/git-commit-24.svg +8 -8
- package/components/icon/icons/git-compare-16.svg +8 -8
- package/components/icon/icons/git-compare-24.svg +11 -11
- package/components/icon/icons/git-merge-16.svg +8 -8
- package/components/icon/icons/git-merge-24.svg +10 -10
- package/components/icon/icons/git-merge-queue-16.svg +10 -10
- package/components/icon/icons/git-pull-request-16.svg +8 -8
- package/components/icon/icons/git-pull-request-24.svg +10 -10
- package/components/icon/icons/git-pull-request-closed-16.svg +8 -8
- package/components/icon/icons/git-pull-request-closed-24.svg +10 -10
- package/components/icon/icons/git-pull-request-draft-16.svg +9 -9
- package/components/icon/icons/git-pull-request-draft-24.svg +9 -9
- package/components/icon/icons/globe-16.svg +8 -8
- package/components/icon/icons/globe-24.svg +8 -8
- package/components/icon/icons/grabber-16.svg +8 -8
- package/components/icon/icons/grabber-24.svg +8 -8
- package/components/icon/icons/graph-16.svg +8 -8
- package/components/icon/icons/graph-24.svg +5 -5
- package/components/icon/icons/hash-16.svg +8 -8
- package/components/icon/icons/hash-24.svg +8 -8
- package/components/icon/icons/heading-16.svg +8 -8
- package/components/icon/icons/heading-24.svg +8 -8
- package/components/icon/icons/heart-16.svg +8 -8
- package/components/icon/icons/heart-24.svg +8 -8
- package/components/icon/icons/heart-fill-16.svg +8 -8
- package/components/icon/icons/heart-fill-24.svg +5 -5
- package/components/icon/icons/history-16.svg +8 -8
- package/components/icon/icons/history-24.svg +5 -5
- package/components/icon/icons/home-16.svg +5 -5
- package/components/icon/icons/home-24.svg +8 -8
- package/components/icon/icons/home-fill-24.svg +5 -5
- package/components/icon/icons/horizontal-rule-16.svg +7 -7
- package/components/icon/icons/horizontal-rule-24.svg +7 -7
- package/components/icon/icons/hourglass-16.svg +8 -8
- package/components/icon/icons/hourglass-24.svg +8 -8
- package/components/icon/icons/hubot-16.svg +8 -8
- package/components/icon/icons/hubot-24.svg +10 -10
- package/components/icon/icons/id-badge-16.svg +10 -10
- package/components/icon/icons/image-16.svg +8 -8
- package/components/icon/icons/image-24.svg +8 -8
- package/components/icon/icons/inbox-16.svg +8 -8
- package/components/icon/icons/inbox-24.svg +8 -8
- package/components/icon/icons/infinity-16.svg +8 -8
- package/components/icon/icons/infinity-24.svg +8 -8
- package/components/icon/icons/info-16.svg +8 -8
- package/components/icon/icons/info-24.svg +10 -10
- package/components/icon/icons/issue-closed-16.svg +8 -8
- package/components/icon/icons/issue-closed-24.svg +9 -9
- package/components/icon/icons/issue-draft-16.svg +8 -8
- package/components/icon/icons/issue-draft-24.svg +8 -8
- package/components/icon/icons/issue-opened-16.svg +8 -8
- package/components/icon/icons/issue-opened-24.svg +8 -8
- package/components/icon/icons/issue-reopened-16.svg +5 -5
- package/components/icon/icons/issue-reopened-24.svg +5 -5
- package/components/icon/icons/italic-16.svg +8 -8
- package/components/icon/icons/italic-24.svg +8 -8
- package/components/icon/icons/iterations-16.svg +5 -5
- package/components/icon/icons/iterations-24.svg +5 -5
- package/components/icon/icons/kebab-horizontal-16.svg +5 -5
- package/components/icon/icons/kebab-horizontal-24.svg +7 -7
- package/components/icon/icons/key-16.svg +8 -8
- package/components/icon/icons/key-24.svg +9 -9
- package/components/icon/icons/key-asterisk-16.svg +10 -10
- package/components/icon/icons/law-16.svg +8 -8
- package/components/icon/icons/law-24.svg +8 -8
- package/components/icon/icons/light-bulb-16.svg +8 -8
- package/components/icon/icons/light-bulb-24.svg +8 -8
- package/components/icon/icons/link-16.svg +8 -8
- package/components/icon/icons/link-24.svg +5 -5
- package/components/icon/icons/link-external-16.svg +8 -8
- package/components/icon/icons/link-external-24.svg +5 -5
- package/components/icon/icons/list-ordered-16.svg +8 -8
- package/components/icon/icons/list-ordered-24.svg +5 -5
- package/components/icon/icons/list-unordered-16.svg +8 -8
- package/components/icon/icons/list-unordered-24.svg +8 -8
- package/components/icon/icons/location-16.svg +8 -8
- package/components/icon/icons/location-24.svg +9 -9
- package/components/icon/icons/lock-16.svg +8 -8
- package/components/icon/icons/lock-24.svg +8 -8
- package/components/icon/icons/log-16.svg +9 -9
- package/components/icon/icons/login.svg +9 -9
- package/components/icon/icons/logo-gist-16.svg +8 -8
- package/components/icon/icons/logo-github-16.svg +8 -8
- package/components/icon/icons/logout.svg +9 -9
- package/components/icon/icons/mail-16.svg +8 -8
- package/components/icon/icons/mail-24.svg +8 -8
- package/components/icon/icons/mark-github-16.svg +8 -8
- package/components/icon/icons/markdown-16.svg +8 -8
- package/components/icon/icons/megaphone-16.svg +13 -13
- package/components/icon/icons/megaphone-24.svg +8 -8
- package/components/icon/icons/mention-16.svg +8 -8
- package/components/icon/icons/mention-24.svg +8 -8
- package/components/icon/icons/meter-16.svg +8 -8
- package/components/icon/icons/milestone-16.svg +8 -8
- package/components/icon/icons/milestone-24.svg +8 -8
- package/components/icon/icons/mirror-16.svg +8 -8
- package/components/icon/icons/mirror-24.svg +8 -8
- package/components/icon/icons/moon-16.svg +8 -8
- package/components/icon/icons/moon-24.svg +8 -8
- package/components/icon/icons/mortar-board-16.svg +8 -8
- package/components/icon/icons/mortar-board-24.svg +8 -8
- package/components/icon/icons/multi-select-16.svg +9 -9
- package/components/icon/icons/multi-select-24.svg +9 -9
- package/components/icon/icons/mute-16.svg +8 -8
- package/components/icon/icons/mute-24.svg +10 -10
- package/components/icon/icons/no-entry-16.svg +8 -8
- package/components/icon/icons/no-entry-24.svg +8 -8
- package/components/icon/icons/no-entry-fill-12.svg +7 -7
- package/components/icon/icons/north-star-16.svg +5 -5
- package/components/icon/icons/north-star-24.svg +5 -5
- package/components/icon/icons/note-16.svg +8 -8
- package/components/icon/icons/note-24.svg +10 -10
- package/components/icon/icons/number-16.svg +8 -8
- package/components/icon/icons/number-24.svg +8 -8
- package/components/icon/icons/organization-16.svg +8 -8
- package/components/icon/icons/organization-24.svg +10 -10
- package/components/icon/icons/package-16.svg +8 -8
- package/components/icon/icons/package-24.svg +8 -8
- package/components/icon/icons/package-dependencies-16.svg +8 -8
- package/components/icon/icons/package-dependencies-24.svg +10 -10
- package/components/icon/icons/package-dependents-16.svg +8 -8
- package/components/icon/icons/package-dependents-24.svg +10 -10
- package/components/icon/icons/paintbrush-16.svg +8 -8
- package/components/icon/icons/paper-airplane-16.svg +8 -8
- package/components/icon/icons/paper-airplane-24.svg +8 -8
- package/components/icon/icons/paperclip-16.svg +8 -8
- package/components/icon/icons/paperclip-24.svg +8 -8
- package/components/icon/icons/paste-16.svg +8 -8
- package/components/icon/icons/paste-24.svg +10 -10
- package/components/icon/icons/pencil-16.svg +8 -8
- package/components/icon/icons/pencil-24.svg +8 -8
- package/components/icon/icons/people-16.svg +8 -8
- package/components/icon/icons/people-24.svg +10 -10
- package/components/icon/icons/person-16.svg +8 -8
- package/components/icon/icons/person-24.svg +8 -8
- package/components/icon/icons/person-add-16.svg +8 -8
- package/components/icon/icons/person-add-24.svg +8 -8
- package/components/icon/icons/person-fill-16.svg +5 -5
- package/components/icon/icons/person-fill-24.svg +5 -5
- package/components/icon/icons/pin-16.svg +8 -8
- package/components/icon/icons/pin-24.svg +8 -8
- package/components/icon/icons/play-16.svg +8 -8
- package/components/icon/icons/play-24.svg +9 -9
- package/components/icon/icons/plug-16.svg +8 -8
- package/components/icon/icons/plug-24.svg +8 -8
- package/components/icon/icons/plus-16.svg +8 -8
- package/components/icon/icons/plus-24.svg +8 -8
- package/components/icon/icons/plus-circle-16.svg +8 -8
- package/components/icon/icons/plus-circle-24.svg +9 -9
- package/components/icon/icons/project-16.svg +8 -8
- package/components/icon/icons/project-24.svg +10 -10
- package/components/icon/icons/pulse-16.svg +8 -8
- package/components/icon/icons/pulse-24.svg +8 -8
- package/components/icon/icons/question-16.svg +8 -8
- package/components/icon/icons/question-24.svg +10 -10
- package/components/icon/icons/quote-16.svg +8 -8
- package/components/icon/icons/quote-24.svg +8 -8
- package/components/icon/icons/reply-16.svg +8 -8
- package/components/icon/icons/reply-24.svg +5 -5
- package/components/icon/icons/repo-16.svg +8 -8
- package/components/icon/icons/repo-24.svg +9 -9
- package/components/icon/icons/repo-clone-16.svg +8 -8
- package/components/icon/icons/repo-deleted-16.svg +5 -5
- package/components/icon/icons/repo-forked-16.svg +8 -8
- package/components/icon/icons/repo-forked-24.svg +11 -11
- package/components/icon/icons/repo-locked-16.svg +10 -10
- package/components/icon/icons/repo-locked-24.svg +10 -10
- package/components/icon/icons/repo-pull-16.svg +8 -8
- package/components/icon/icons/repo-push-16.svg +8 -8
- package/components/icon/icons/repo-push-24.svg +5 -5
- package/components/icon/icons/repo-template-16.svg +8 -8
- package/components/icon/icons/repo-template-24.svg +5 -5
- package/components/icon/icons/report-16.svg +8 -8
- package/components/icon/icons/report-24.svg +8 -8
- package/components/icon/icons/rocket-16.svg +8 -8
- package/components/icon/icons/rocket-24.svg +8 -8
- package/components/icon/icons/rows-16.svg +8 -8
- package/components/icon/icons/rows-24.svg +8 -8
- package/components/icon/icons/rss-16.svg +8 -8
- package/components/icon/icons/rss-24.svg +8 -8
- package/components/icon/icons/ruby-16.svg +8 -8
- package/components/icon/icons/ruby-24.svg +8 -8
- package/components/icon/icons/screen-full-16.svg +8 -8
- package/components/icon/icons/screen-full-24.svg +8 -8
- package/components/icon/icons/screen-normal-16.svg +8 -8
- package/components/icon/icons/screen-normal-24.svg +8 -8
- package/components/icon/icons/search-16.svg +8 -8
- package/components/icon/icons/search-24.svg +8 -8
- package/components/icon/icons/server-16.svg +8 -8
- package/components/icon/icons/server-24.svg +10 -10
- package/components/icon/icons/server-error.svg +8 -8
- package/components/icon/icons/share-16.svg +8 -8
- package/components/icon/icons/share-24.svg +8 -8
- package/components/icon/icons/share-android-16.svg +8 -8
- package/components/icon/icons/share-android-24.svg +8 -8
- package/components/icon/icons/shield-16.svg +8 -8
- package/components/icon/icons/shield-24.svg +9 -9
- package/components/icon/icons/shield-check-16.svg +8 -8
- package/components/icon/icons/shield-check-24.svg +9 -9
- package/components/icon/icons/shield-lock-16.svg +8 -8
- package/components/icon/icons/shield-lock-24.svg +8 -8
- package/components/icon/icons/shield-slash-16.svg +10 -10
- package/components/icon/icons/shield-x-16.svg +8 -8
- package/components/icon/icons/shield-x-24.svg +10 -10
- package/components/icon/icons/sidebar-collapse-16.svg +9 -9
- package/components/icon/icons/sidebar-collapse-24.svg +9 -9
- package/components/icon/icons/sidebar-expand-16.svg +9 -9
- package/components/icon/icons/sidebar-expand-24.svg +9 -9
- package/components/icon/icons/sign-in-16.svg +8 -8
- package/components/icon/icons/sign-in-24.svg +8 -8
- package/components/icon/icons/sign-out-16.svg +8 -8
- package/components/icon/icons/sign-out-24.svg +8 -8
- package/components/icon/icons/single-select-16.svg +9 -9
- package/components/icon/icons/single-select-24.svg +9 -9
- package/components/icon/icons/skip-16.svg +8 -8
- package/components/icon/icons/skip-24.svg +9 -9
- package/components/icon/icons/sliders-16.svg +5 -5
- package/components/icon/icons/smiley-16.svg +8 -8
- package/components/icon/icons/smiley-24.svg +11 -11
- package/components/icon/icons/sort-asc-16.svg +8 -8
- package/components/icon/icons/sort-asc-24.svg +5 -5
- package/components/icon/icons/sort-desc-16.svg +9 -9
- package/components/icon/icons/sort-desc-24.svg +5 -5
- package/components/icon/icons/square-16.svg +8 -8
- package/components/icon/icons/square-24.svg +8 -8
- package/components/icon/icons/square-fill-16.svg +8 -8
- package/components/icon/icons/square-fill-24.svg +8 -8
- package/components/icon/icons/squirrel-16.svg +8 -8
- package/components/icon/icons/squirrel-24.svg +5 -5
- package/components/icon/icons/stack-16.svg +8 -8
- package/components/icon/icons/stack-24.svg +12 -12
- package/components/icon/icons/star-16.svg +8 -8
- package/components/icon/icons/star-24.svg +8 -8
- package/components/icon/icons/star-fill-16.svg +8 -8
- package/components/icon/icons/star-fill-24.svg +8 -8
- package/components/icon/icons/stop-16.svg +8 -8
- package/components/icon/icons/stop-24.svg +9 -9
- package/components/icon/icons/stopwatch-16.svg +8 -8
- package/components/icon/icons/stopwatch-24.svg +8 -8
- package/components/icon/icons/store.svg +10 -10
- package/components/icon/icons/strikethrough-16.svg +8 -8
- package/components/icon/icons/strikethrough-24.svg +8 -8
- package/components/icon/icons/sun-16.svg +8 -8
- package/components/icon/icons/sun-24.svg +8 -8
- package/components/icon/icons/sync-16.svg +8 -8
- package/components/icon/icons/sync-24.svg +5 -5
- package/components/icon/icons/tab-24.svg +5 -5
- package/components/icon/icons/tab-external-16.svg +5 -5
- package/components/icon/icons/table-16.svg +8 -8
- package/components/icon/icons/table-24.svg +8 -8
- package/components/icon/icons/tag-16.svg +8 -8
- package/components/icon/icons/tag-24.svg +9 -9
- package/components/icon/icons/tasklist-16.svg +8 -8
- package/components/icon/icons/tasklist-24.svg +9 -9
- package/components/icon/icons/telescope-16.svg +8 -8
- package/components/icon/icons/telescope-24.svg +10 -10
- package/components/icon/icons/telescope-fill-16.svg +8 -8
- package/components/icon/icons/telescope-fill-24.svg +10 -10
- package/components/icon/icons/terminal-16.svg +8 -8
- package/components/icon/icons/terminal-24.svg +10 -10
- package/components/icon/icons/three-bars-16.svg +8 -8
- package/components/icon/icons/thumbsdown-16.svg +8 -8
- package/components/icon/icons/thumbsdown-24.svg +8 -8
- package/components/icon/icons/thumbsup-16.svg +8 -8
- package/components/icon/icons/thumbsup-24.svg +8 -8
- package/components/icon/icons/tools-16.svg +8 -8
- package/components/icon/icons/tools-24.svg +8 -8
- package/components/icon/icons/trash-16.svg +8 -8
- package/components/icon/icons/trash-24.svg +12 -12
- package/components/icon/icons/triangle-down-16.svg +5 -5
- package/components/icon/icons/triangle-down-24.svg +5 -5
- package/components/icon/icons/triangle-left-16.svg +5 -5
- package/components/icon/icons/triangle-left-24.svg +5 -5
- package/components/icon/icons/triangle-right-16.svg +5 -5
- package/components/icon/icons/triangle-right-24.svg +5 -5
- package/components/icon/icons/triangle-up-16.svg +5 -5
- package/components/icon/icons/triangle-up-24.svg +5 -5
- package/components/icon/icons/trophy-16.svg +8 -8
- package/components/icon/icons/trophy-24.svg +8 -8
- package/components/icon/icons/typography-16.svg +8 -8
- package/components/icon/icons/typography-24.svg +8 -8
- package/components/icon/icons/unfold-16.svg +5 -5
- package/components/icon/icons/unfold-24.svg +11 -11
- package/components/icon/icons/unlock-16.svg +8 -8
- package/components/icon/icons/unlock-24.svg +8 -8
- package/components/icon/icons/unmute-16.svg +8 -8
- package/components/icon/icons/unmute-24.svg +10 -10
- package/components/icon/icons/unverified-16.svg +8 -8
- package/components/icon/icons/unverified-24.svg +10 -10
- package/components/icon/icons/upload-16.svg +8 -8
- package/components/icon/icons/upload-24.svg +8 -8
- package/components/icon/icons/verified-16.svg +8 -8
- package/components/icon/icons/verified-24.svg +9 -9
- package/components/icon/icons/versions-16.svg +8 -8
- package/components/icon/icons/versions-24.svg +8 -8
- package/components/icon/icons/video-16.svg +9 -9
- package/components/icon/icons/video-24.svg +9 -9
- package/components/icon/icons/webhook-16.svg +5 -5
- package/components/icon/icons/workflow-16.svg +8 -8
- package/components/icon/icons/workflow-24.svg +8 -8
- package/components/icon/icons/x-16.svg +8 -8
- package/components/icon/icons/x-24.svg +8 -8
- package/components/icon/icons/x-circle-16.svg +8 -8
- package/components/icon/icons/x-circle-24.svg +10 -10
- package/components/icon/icons/x-circle-fill-12.svg +8 -8
- package/components/icon/icons/x-circle-fill-16.svg +8 -8
- package/components/icon/icons/x-circle-fill-24.svg +8 -8
- package/components/icon/icons/yourdash.svg +64 -64
- package/components/icon/icons/zap-16.svg +8 -8
- package/components/icon/icons/zap-24.svg +8 -8
- package/components/iconButton/iconButton.module.scss +40 -40
- package/components/iconButton/iconButton.tsx +34 -34
- package/components/image/image.module.scss +81 -10
- package/components/image/image.tsx +62 -9
- package/components/link/link.module.scss +32 -32
- package/components/link/link.tsx +21 -21
- package/components/progressBar/progressBar.module.scss +25 -0
- package/components/progressBar/progressBar.tsx +21 -0
- package/components/redirect/redirect.tsx +17 -17
- package/components/separator/separator.module.scss +33 -28
- package/components/separator/separator.tsx +14 -14
- package/components/spinner/spinner.module.scss +93 -93
- package/components/spinner/spinner.tsx +31 -31
- package/components/subtext/subtext.module.scss +17 -17
- package/components/subtext/subtext.tsx +14 -14
- package/components/tag/tag.module.scss +13 -0
- package/components/tag/tag.tsx +21 -0
- package/components/text/text.module.scss +13 -13
- package/components/text/text.tsx +14 -14
- package/components/textButton/textButton.module.scss +30 -30
- package/components/textButton/textButton.tsx +22 -22
- package/components/textInput/textInput.module.scss +52 -52
- package/components/textInput/textInput.tsx +84 -54
- package/components/toast/toast.module.scss +48 -8
- package/components/toast/toast.ts +12 -0
- package/components/toast/toastAction.ts +12 -0
- package/components/toast/toastContext.ts +16 -14
- package/components/toast/toasts.tsx +99 -0
- package/core/decrementLevel.tsx +1 -1
- package/core/incrementLevel.tsx +13 -13
- package/core/level.tsx +27 -27
- package/core/remToPx.ts +8 -0
- package/core/root.tsx +13 -19
- package/core/toast.ts +5 -4
- package/imports.d.ts +81 -0
- package/package.json +19 -51
- package/theme/defaultTheme.module.scss +361 -349
- package/theme/themeValues.scss +49 -46
- package/tsconfig.json +30 -20
- package/utilityComponent/hasBeenShown/hasBeenShown.tsx +47 -0
- package/utilityComponent/onInView/onInView.tsx +83 -0
- package/views/carousel/carousel.module.scss +77 -0
- package/views/carousel/carousel.tsx +138 -0
- package/views/header/header.module.scss +16 -0
- package/views/header/header.tsx +28 -0
- package/views/infiniteScroll/infiniteScroll.module.scss +26 -0
- package/views/infiniteScroll/infiniteScroll.tsx +90 -0
- package/views/navBar/components/navImage/navImage.module.scss +7 -0
- package/views/navBar/components/navImage/navImage.tsx +15 -0
- package/views/navBar/components/navTitle/navTitle.tsx +13 -0
- package/views/navBar/navBar.module.scss +22 -0
- package/views/navBar/navBar.tsx +37 -0
- package/views/onBoarding/onBoarding.module.scss +79 -0
- package/views/onBoarding/onBoarding.tsx +138 -0
- package/views/panAndZoom/panAndZoom.tsx +9 -2
- package/views/sidebar/Sidebar.module.scss +49 -0
- package/views/sidebar/Sidebar.tsx +30 -0
- package/views/sidebar/SidebarContainer.module.scss +22 -0
- package/views/sidebar/SidebarContainer.tsx +38 -0
- package/views/sidebar/SidebarContext.tsx +15 -0
- package/views/sidebar/SidebarToggleButton.tsx +25 -0
- package/components/toast/toast.tsx +0 -65
package/theme/themeValues.scss
CHANGED
@@ -1,46 +1,49 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
-
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
-
*/
|
5
|
-
|
6
|
-
$theme: "--ut";
|
7
|
-
$button: "btn";
|
8
|
-
$hover: "hvr";
|
9
|
-
$active: "atv";
|
10
|
-
$padding: "pdn";
|
11
|
-
$border: "brd";
|
12
|
-
$radius: "rad";
|
13
|
-
$accent: "acn";
|
14
|
-
$subcolor: "scl";
|
15
|
-
$color: "col";
|
16
|
-
$background: "bgn";
|
17
|
-
$gap: "gap";
|
18
|
-
$transition: "
|
19
|
-
$font: "
|
20
|
-
$size: "
|
21
|
-
$weight: "wgt";
|
22
|
-
$family: "fam";
|
23
|
-
$vertical: "
|
24
|
-
$horizontal: "
|
25
|
-
$header: "hed";
|
26
|
-
$separator: "sep";
|
27
|
-
$height: "hei";
|
28
|
-
$
|
29
|
-
$
|
30
|
-
$
|
31
|
-
$
|
32
|
-
$
|
33
|
-
$
|
34
|
-
$
|
35
|
-
$
|
36
|
-
$
|
37
|
-
$
|
38
|
-
|
39
|
-
$
|
40
|
-
|
41
|
-
|
42
|
-
$
|
43
|
-
$
|
44
|
-
$
|
45
|
-
$
|
46
|
-
$
|
1
|
+
/*!
|
2
|
+
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
+
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
+
*/
|
5
|
+
|
6
|
+
$theme: "--ut";
|
7
|
+
$button: "btn";
|
8
|
+
$hover: "hvr";
|
9
|
+
$active: "atv";
|
10
|
+
$padding: "pdn";
|
11
|
+
$border: "brd";
|
12
|
+
$radius: "rad";
|
13
|
+
$accent: "acn";
|
14
|
+
$subcolor: "scl";
|
15
|
+
$color: "col";
|
16
|
+
$background: "bgn";
|
17
|
+
$gap: "gap";
|
18
|
+
$transition: "trans";
|
19
|
+
$font: "font";
|
20
|
+
$size: "size";
|
21
|
+
$weight: "wgt";
|
22
|
+
$family: "fam";
|
23
|
+
$vertical: "vert";
|
24
|
+
$horizontal: "horiz";
|
25
|
+
$header: "hed";
|
26
|
+
$separator: "sep";
|
27
|
+
$height: "hei";
|
28
|
+
$width: "wid";
|
29
|
+
$heading: "hed";
|
30
|
+
$input: "inp";
|
31
|
+
$focus: "foc";
|
32
|
+
$textbutton: "txb";
|
33
|
+
$h1: "he1";
|
34
|
+
$h2: "he2";
|
35
|
+
$h3: "he3";
|
36
|
+
$h4: "he4";
|
37
|
+
$h5: "he5";
|
38
|
+
$h6: "he6";
|
39
|
+
$scrollbar: "scrlbr";
|
40
|
+
|
41
|
+
|
42
|
+
$sizeMobile: 440px;
|
43
|
+
$sizeLargeMobile: 560px;
|
44
|
+
$sizeTablet: 768px;
|
45
|
+
$sizeLargeTablet: 960px;
|
46
|
+
$sizeSmallDesktop: 1200px;
|
47
|
+
$sizeMediumDesktop: 1440px;
|
48
|
+
$sizeLargeDesktop: 1920px;
|
49
|
+
$sizeWideDesktop: 2560px;
|
package/tsconfig.json
CHANGED
@@ -1,20 +1,30 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ESNext",
|
4
|
+
"module": "ESNext",
|
5
|
+
"useDefineForClassFields": true,
|
6
|
+
"lib": [
|
7
|
+
"DOM",
|
8
|
+
"DOM.Iterable",
|
9
|
+
"ESNext"
|
10
|
+
],
|
11
|
+
"allowJs": false,
|
12
|
+
"skipLibCheck": true,
|
13
|
+
"esModuleInterop": false,
|
14
|
+
"allowSyntheticDefaultImports": true,
|
15
|
+
"strict": true,
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
17
|
+
"resolveJsonModule": true,
|
18
|
+
"moduleResolution": "bundler",
|
19
|
+
"allowImportingTsExtensions": true,
|
20
|
+
"isolatedModules": true,
|
21
|
+
"moduleDetection": "force",
|
22
|
+
"noEmit": true,
|
23
|
+
"jsx": "react-jsx"
|
24
|
+
},
|
25
|
+
"include": [
|
26
|
+
"./**/*",
|
27
|
+
"../shared/**/*",
|
28
|
+
"../web"
|
29
|
+
]
|
30
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
+
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { FC, useEffect, useRef, useState } from "react";
|
7
|
+
|
8
|
+
const HasBeenShown: FC<{
|
9
|
+
className?: string;
|
10
|
+
onSeen: () => void;
|
11
|
+
}> = ({ className, onSeen }) => {
|
12
|
+
const [hasBeenSeen, setHasBeenSeen] = useState(false);
|
13
|
+
const ref = useRef<HTMLDivElement>(null);
|
14
|
+
|
15
|
+
useEffect(() => {
|
16
|
+
if (!ref.current) return;
|
17
|
+
|
18
|
+
const current = ref.current;
|
19
|
+
|
20
|
+
const observer = new IntersectionObserver((interaction) => {
|
21
|
+
if (interaction[0].isIntersecting) {
|
22
|
+
onSeen();
|
23
|
+
observer.disconnect();
|
24
|
+
setHasBeenSeen(true);
|
25
|
+
}
|
26
|
+
});
|
27
|
+
|
28
|
+
observer.observe(current);
|
29
|
+
|
30
|
+
return () => {
|
31
|
+
observer.disconnect();
|
32
|
+
};
|
33
|
+
}, []);
|
34
|
+
|
35
|
+
if (hasBeenSeen) {
|
36
|
+
return null;
|
37
|
+
}
|
38
|
+
|
39
|
+
return (
|
40
|
+
<div
|
41
|
+
ref={ref}
|
42
|
+
className={className}
|
43
|
+
/>
|
44
|
+
);
|
45
|
+
};
|
46
|
+
|
47
|
+
export default HasBeenShown;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
+
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { FC, useEffect, useRef } from "react";
|
7
|
+
|
8
|
+
const OnInView: FC<{
|
9
|
+
className?: string;
|
10
|
+
onEnterView?: (direction: "up" | "down" | "left" | "right") => void;
|
11
|
+
onLeaveView?: (direction: "up" | "down" | "left" | "right") => void;
|
12
|
+
}> = ({ className, onEnterView, onLeaveView }) => {
|
13
|
+
const isInView = useRef(false);
|
14
|
+
const ref = useRef<HTMLDivElement>(null);
|
15
|
+
|
16
|
+
useEffect(() => {
|
17
|
+
if (!ref.current) return;
|
18
|
+
|
19
|
+
const current = ref.current;
|
20
|
+
|
21
|
+
const handleScroll = () => {
|
22
|
+
const { top, bottom, left, right } = current.getBoundingClientRect();
|
23
|
+
|
24
|
+
if (!isInView.current) {
|
25
|
+
if (top < 0) {
|
26
|
+
onEnterView?.("up");
|
27
|
+
isInView.current = true;
|
28
|
+
return;
|
29
|
+
} else if (bottom > window.innerHeight) {
|
30
|
+
onEnterView?.("down");
|
31
|
+
isInView.current = true;
|
32
|
+
return;
|
33
|
+
} else if (left < 0) {
|
34
|
+
onEnterView?.("left");
|
35
|
+
isInView.current = true;
|
36
|
+
return;
|
37
|
+
} else if (right > window.innerWidth) {
|
38
|
+
onEnterView?.("right");
|
39
|
+
isInView.current = true;
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
if (top > window.innerHeight) {
|
45
|
+
onLeaveView?.("down");
|
46
|
+
isInView.current = false;
|
47
|
+
return;
|
48
|
+
} else if (bottom < 0) {
|
49
|
+
onLeaveView?.("up");
|
50
|
+
isInView.current = false;
|
51
|
+
return;
|
52
|
+
} else if (left > window.innerWidth) {
|
53
|
+
onLeaveView?.("right");
|
54
|
+
isInView.current = false;
|
55
|
+
return;
|
56
|
+
} else if (right < 0) {
|
57
|
+
onLeaveView?.("left");
|
58
|
+
isInView.current = false;
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
const observer = new IntersectionObserver(() => {
|
64
|
+
handleScroll();
|
65
|
+
});
|
66
|
+
|
67
|
+
observer.observe(current);
|
68
|
+
|
69
|
+
return () => {
|
70
|
+
observer.disconnect();
|
71
|
+
};
|
72
|
+
}, []);
|
73
|
+
|
74
|
+
return (
|
75
|
+
<div
|
76
|
+
ref={ref}
|
77
|
+
style={{ height: 1, width: 1 }}
|
78
|
+
className={className}
|
79
|
+
/>
|
80
|
+
);
|
81
|
+
};
|
82
|
+
|
83
|
+
export default OnInView;
|
@@ -0,0 +1,77 @@
|
|
1
|
+
@import "@yourdash/uikit/theme/themeValues";
|
2
|
+
|
3
|
+
.containerComponent {
|
4
|
+
display: flex;
|
5
|
+
flex-direction: row;
|
6
|
+
max-width: 100%;
|
7
|
+
height: 24rem;
|
8
|
+
position: relative;
|
9
|
+
padding: 0;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.component {
|
14
|
+
display: flex;
|
15
|
+
align-items: center;
|
16
|
+
max-width: 100%;
|
17
|
+
height: 24rem;
|
18
|
+
gap: 0.5rem;
|
19
|
+
padding: var(#{$theme+$padding});
|
20
|
+
flex-direction: row;
|
21
|
+
overflow-x: auto;
|
22
|
+
scroll-snap-type: x mandatory;
|
23
|
+
scroll-snap-stop: always;
|
24
|
+
scrollbar-width: none;
|
25
|
+
padding-bottom: 2.5rem;
|
26
|
+
|
27
|
+
&::-webkit-scrollbar {
|
28
|
+
display: none;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.page {
|
33
|
+
display: flex;
|
34
|
+
width: 80%;
|
35
|
+
height: 100%;
|
36
|
+
flex-shrink: 0;
|
37
|
+
scroll-snap-align: center;
|
38
|
+
|
39
|
+
&:first-of-type {
|
40
|
+
margin-left: calc(20% + var(#{$theme+$gap}));
|
41
|
+
}
|
42
|
+
|
43
|
+
&:last-of-type {
|
44
|
+
margin-right: calc(20% + var(#{$theme+$gap}));
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
.controls {
|
49
|
+
position: absolute;
|
50
|
+
bottom: 0;
|
51
|
+
left: 50%;
|
52
|
+
transform: translateX(-50%);
|
53
|
+
display: flex;
|
54
|
+
flex-direction: row;
|
55
|
+
gap: var(#{$theme+$gap});
|
56
|
+
}
|
57
|
+
|
58
|
+
.indicator {
|
59
|
+
display: flex;
|
60
|
+
flex-direction: row;
|
61
|
+
gap: var(#{$theme+$gap});
|
62
|
+
padding: calc(var(#{$theme+$padding}) / 2);
|
63
|
+
border-radius: var(#{$theme+$radius});
|
64
|
+
|
65
|
+
.pageIndicator {
|
66
|
+
background-color: var(#{$theme+$color});
|
67
|
+
padding: 0.5rem;
|
68
|
+
border-radius: var(#{$theme+$radius});
|
69
|
+
transition: var(#{$theme+$transition});
|
70
|
+
position: relative;
|
71
|
+
|
72
|
+
&.selected {
|
73
|
+
padding-right: 1.5rem;
|
74
|
+
padding-left: 1.5rem;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,138 @@
|
|
1
|
+
import page from "@yourdash/web/src/deprecatedLogin/Page.tsx";
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
3
|
+
import Card from "../../components/card/card.tsx";
|
4
|
+
import Container from "../../components/container/container.tsx";
|
5
|
+
import { UKIcon } from "../../components/icon/iconDictionary.ts";
|
6
|
+
import IconButton from "../../components/iconButton/iconButton.tsx";
|
7
|
+
import styles from "./carousel.module.scss";
|
8
|
+
import clippy from "@yourdash/shared/web/helpers/clippy.ts";
|
9
|
+
|
10
|
+
const Carousel: React.FC<{
|
11
|
+
items: { element: React.ReactElement; id: string }[];
|
12
|
+
className?: string;
|
13
|
+
}> = ({ items, className }) => {
|
14
|
+
const scrollRef = useRef<HTMLDivElement>(null);
|
15
|
+
const [currentPage, setCurrentPage] = useState<number>(0);
|
16
|
+
|
17
|
+
useEffect(() => {
|
18
|
+
const scrollElement = scrollRef.current;
|
19
|
+
|
20
|
+
if (!scrollElement) return;
|
21
|
+
|
22
|
+
console.log(Array.from(scrollElement.children));
|
23
|
+
|
24
|
+
let timer: Timer;
|
25
|
+
let listener = () => {
|
26
|
+
clearTimeout(timer);
|
27
|
+
timer = setTimeout(function () {
|
28
|
+
Array.from(scrollElement.children).forEach((ele: Element, index: number) => {
|
29
|
+
if (
|
30
|
+
Math.abs(
|
31
|
+
ele.getBoundingClientRect().left +
|
32
|
+
ele.getBoundingClientRect().width / 2 -
|
33
|
+
(scrollElement.getBoundingClientRect().left + scrollElement.getBoundingClientRect().width / 2),
|
34
|
+
) <
|
35
|
+
ele.getBoundingClientRect().width / 2
|
36
|
+
) {
|
37
|
+
setCurrentPage(index);
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
});
|
41
|
+
}, 25);
|
42
|
+
};
|
43
|
+
|
44
|
+
scrollElement.addEventListener("scroll", listener);
|
45
|
+
|
46
|
+
return () => {
|
47
|
+
scrollElement.removeEventListener("scroll", listener);
|
48
|
+
clearTimeout(timer);
|
49
|
+
};
|
50
|
+
}, []);
|
51
|
+
|
52
|
+
return (
|
53
|
+
<Container className={clippy(styles.containerComponent, className)}>
|
54
|
+
<div
|
55
|
+
className={styles.component}
|
56
|
+
ref={scrollRef}
|
57
|
+
>
|
58
|
+
{items.map((child) => {
|
59
|
+
return (
|
60
|
+
<div
|
61
|
+
key={child.id}
|
62
|
+
className={styles.page}
|
63
|
+
>
|
64
|
+
{child.element}
|
65
|
+
</div>
|
66
|
+
);
|
67
|
+
})}
|
68
|
+
</div>
|
69
|
+
<div className={styles.controls}>
|
70
|
+
<IconButton
|
71
|
+
accessibleLabel={"previous page"}
|
72
|
+
icon={UKIcon.ChevronLeft}
|
73
|
+
className={styles.pageControl}
|
74
|
+
onClick={() => {
|
75
|
+
const scrollElement = scrollRef.current;
|
76
|
+
|
77
|
+
if (!scrollElement) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
const carouselTargetPage = scrollElement.children[currentPage - 1] as HTMLDivElement;
|
82
|
+
|
83
|
+
if (!carouselTargetPage) {
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
|
87
|
+
carouselTargetPage.scrollIntoView({ behavior: "smooth" });
|
88
|
+
}}
|
89
|
+
/>
|
90
|
+
<Card className={styles.indicator}>
|
91
|
+
{items.map((page, index) => {
|
92
|
+
return (
|
93
|
+
<button
|
94
|
+
key={page.id}
|
95
|
+
className={clippy(styles.pageIndicator, index === currentPage && styles.selected)}
|
96
|
+
onClick={() => {
|
97
|
+
const scrollElement = scrollRef.current;
|
98
|
+
|
99
|
+
if (!scrollElement) {
|
100
|
+
return;
|
101
|
+
}
|
102
|
+
|
103
|
+
scrollElement.scrollIntoView({ behavior: "smooth" });
|
104
|
+
|
105
|
+
const carouselTargetPage = scrollElement.children[index] as HTMLDivElement;
|
106
|
+
|
107
|
+
carouselTargetPage.scrollIntoView({ behavior: "smooth" });
|
108
|
+
}}
|
109
|
+
/>
|
110
|
+
);
|
111
|
+
})}
|
112
|
+
</Card>
|
113
|
+
<IconButton
|
114
|
+
accessibleLabel={"next page"}
|
115
|
+
icon={UKIcon.ChevronRight}
|
116
|
+
className={styles.pageControl}
|
117
|
+
onClick={() => {
|
118
|
+
const scrollElement = scrollRef.current;
|
119
|
+
|
120
|
+
if (!scrollElement) {
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
|
124
|
+
const carouselTargetPage = scrollElement.children[currentPage + 1] as HTMLDivElement;
|
125
|
+
|
126
|
+
if (!carouselTargetPage) {
|
127
|
+
return;
|
128
|
+
}
|
129
|
+
|
130
|
+
carouselTargetPage.scrollIntoView({ behavior: "smooth" });
|
131
|
+
}}
|
132
|
+
/>
|
133
|
+
</div>
|
134
|
+
</Container>
|
135
|
+
);
|
136
|
+
};
|
137
|
+
|
138
|
+
export default Carousel;
|
@@ -0,0 +1,16 @@
|
|
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 "@yourdash/uikit/theme/themeValues";
|
7
|
+
|
8
|
+
.view {
|
9
|
+
width: 100%;
|
10
|
+
display: flex;
|
11
|
+
align-items: center;
|
12
|
+
justify-content: center;
|
13
|
+
padding: var(#{$theme+$padding});
|
14
|
+
padding-top: calc(var(#{$theme+$padding}) * 4);
|
15
|
+
padding-bottom: calc(var(#{$theme+$padding}) * 4);
|
16
|
+
}
|
@@ -0,0 +1,28 @@
|
|
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 Heading from "../../components/heading/heading.tsx";
|
8
|
+
import styles from "./header.module.scss";
|
9
|
+
|
10
|
+
const Header: React.FC<{ backgroundImage?: string; heading: string }> = ({ backgroundImage, heading }) => {
|
11
|
+
return (
|
12
|
+
<>
|
13
|
+
<div
|
14
|
+
className={styles.view}
|
15
|
+
style={
|
16
|
+
backgroundImage ? { backgroundImage: backgroundImage } : { backgroundImage: "linear-gradient(-45deg, #ff8093aa, #ffd264aa)" }
|
17
|
+
}
|
18
|
+
>
|
19
|
+
<Heading
|
20
|
+
level={1}
|
21
|
+
text={heading}
|
22
|
+
/>
|
23
|
+
</div>
|
24
|
+
</>
|
25
|
+
);
|
26
|
+
};
|
27
|
+
|
28
|
+
export default Header;
|
@@ -0,0 +1,26 @@
|
|
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 "@yourdash/uikit/theme/themeValues";
|
7
|
+
|
8
|
+
.component {
|
9
|
+
display: flex;
|
10
|
+
flex-direction: column;
|
11
|
+
width: 100%;
|
12
|
+
height: 100%;
|
13
|
+
gap: 1rem;
|
14
|
+
align-items: center;
|
15
|
+
}
|
16
|
+
|
17
|
+
.items {
|
18
|
+
height: 100%;
|
19
|
+
}
|
20
|
+
|
21
|
+
.endOfItems {
|
22
|
+
text-align: center;
|
23
|
+
padding: var(#{$theme+$padding});
|
24
|
+
gap: var(#{$theme+$gap});
|
25
|
+
width: calc(100% - calc(var(#{$theme+$padding}) * 2));
|
26
|
+
}
|
@@ -0,0 +1,90 @@
|
|
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 React, { useEffect, useState } from "react";
|
8
|
+
import Heading from "../../components/heading/heading.tsx";
|
9
|
+
import Separator from "../../components/separator/separator.tsx";
|
10
|
+
import Text from "../../components/text/text.tsx";
|
11
|
+
import styles from "./infiniteScroll.module.scss";
|
12
|
+
|
13
|
+
const InfiniteScroll: React.FC<{
|
14
|
+
children: React.ReactNode | React.ReactNode[];
|
15
|
+
fetchNextPage: (nextPageNumber: number) => Promise<{ hasAnotherPage?: boolean }>;
|
16
|
+
containerClassName?: string;
|
17
|
+
className?: string;
|
18
|
+
resetState?: string;
|
19
|
+
}> = ({ children, fetchNextPage, containerClassName, className, resetState }) => {
|
20
|
+
const endOfItemsRef = React.useRef<HTMLDivElement>(null);
|
21
|
+
const lastFetchedPage = React.useRef<number>(-1);
|
22
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
23
|
+
const [isLastPage, setIsLastPage] = useState<boolean>(false);
|
24
|
+
|
25
|
+
useEffect(() => {
|
26
|
+
lastFetchedPage.current = -1;
|
27
|
+
setIsLoading(false);
|
28
|
+
setIsLastPage(false);
|
29
|
+
fetchNextPageWrapper();
|
30
|
+
}, [resetState]);
|
31
|
+
|
32
|
+
async function fetchNextPageWrapper() {
|
33
|
+
if (isLoading) return;
|
34
|
+
setIsLoading(true);
|
35
|
+
const { hasAnotherPage } = await fetchNextPage(lastFetchedPage.current + 1);
|
36
|
+
lastFetchedPage.current++;
|
37
|
+
setIsLoading(false);
|
38
|
+
setIsLastPage(hasAnotherPage || false);
|
39
|
+
}
|
40
|
+
|
41
|
+
useEffect(() => {
|
42
|
+
if (!endOfItemsRef.current) return;
|
43
|
+
|
44
|
+
const element: HTMLDivElement = endOfItemsRef.current;
|
45
|
+
|
46
|
+
const observer = new IntersectionObserver((elem) => {
|
47
|
+
console.log("observer update");
|
48
|
+
const isVisible = elem[0].isIntersecting;
|
49
|
+
|
50
|
+
if (isVisible) fetchNextPageWrapper();
|
51
|
+
});
|
52
|
+
|
53
|
+
observer.observe(element);
|
54
|
+
}, []);
|
55
|
+
|
56
|
+
// TODO: Use interaction observer to detect when the last item is shown on the screen and fetch the next page
|
57
|
+
|
58
|
+
return (
|
59
|
+
<div className={clippy(containerClassName, styles.component)}>
|
60
|
+
{/* @ts-ignore */}
|
61
|
+
{children?.length > 0 ? (
|
62
|
+
<div className={clippy(className, styles.items)}>{children}</div>
|
63
|
+
) : (
|
64
|
+
<div className={"text-center"}>
|
65
|
+
<Heading
|
66
|
+
level={1}
|
67
|
+
text={"Whoops."}
|
68
|
+
/>
|
69
|
+
<Separator direction={"column"} />
|
70
|
+
<Text text={"It looks like nothing could be found..."} />
|
71
|
+
</div>
|
72
|
+
)}
|
73
|
+
<div
|
74
|
+
ref={endOfItemsRef}
|
75
|
+
className={styles.endOfItems}
|
76
|
+
>
|
77
|
+
{isLoading && <Text text={"Loading more content"} />}
|
78
|
+
<Separator direction={"column"} />
|
79
|
+
{isLastPage && (
|
80
|
+
<Text
|
81
|
+
text={"No more items to load"}
|
82
|
+
className={styles.endOfItems}
|
83
|
+
/>
|
84
|
+
)}
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
|
90
|
+
export default InfiniteScroll;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import Image from "../../../../components/image/image.tsx";
|
3
|
+
import styles from "./navImage.module.scss";
|
4
|
+
|
5
|
+
const NavImage: React.FC<{ src: string }> = ({ src }) => {
|
6
|
+
return (
|
7
|
+
<Image
|
8
|
+
accessibleLabel=""
|
9
|
+
src={src}
|
10
|
+
className={styles.component}
|
11
|
+
/>
|
12
|
+
);
|
13
|
+
};
|
14
|
+
|
15
|
+
export default NavImage;
|