@sarasanalytics-com/design-system 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -0
- package/.eslintrc.json +23 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/manager.ts +17 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.ts +66 -0
- package/.storybook/tsconfig.doc.json +10 -0
- package/.storybook/tsconfig.json +11 -0
- package/.storybook/typings.d.ts +4 -0
- package/.vscode/extensions.json +7 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/settings.json +13 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +45 -24
- package/angular.json +195 -0
- package/build-storybook.log +45 -0
- package/documentation.json +0 -0
- package/generate-public-api.js +59 -0
- package/package.json +74 -19
- package/projects/component-library/README.md +24 -0
- package/projects/component-library/ng-package.json +8 -0
- package/projects/component-library/package.json +12 -0
- package/projects/component-library/src/interfaces/avatar-interface.ts +6 -0
- package/projects/component-library/src/interfaces/button-interface.ts +37 -0
- package/{interfaces/card-carousel-interface.d.ts → projects/component-library/src/interfaces/card-carousel-interface.ts} +2 -1
- package/projects/component-library/src/interfaces/chip-interface.ts +11 -0
- package/projects/component-library/src/interfaces/grid-interface.ts +24 -0
- package/projects/component-library/src/interfaces/icon-interface.ts +21 -0
- package/projects/component-library/src/interfaces/select-interface.ts +20 -0
- package/projects/component-library/src/interfaces/tab-interface.ts +6 -0
- package/{interfaces/toast-interface.d.ts → projects/component-library/src/interfaces/toast-interface.ts} +1 -1
- package/projects/component-library/src/lib/accordion/accordion.component.css +188 -0
- package/projects/component-library/src/lib/accordion/accordion.component.html +151 -0
- package/projects/component-library/src/lib/accordion/accordion.component.spec.ts +23 -0
- package/projects/component-library/src/lib/accordion/accordion.component.ts +129 -0
- package/projects/component-library/src/lib/avatar/avatar.component.css +48 -0
- package/projects/component-library/src/lib/avatar/avatar.component.html +5 -0
- package/projects/component-library/src/lib/avatar/avatar.component.spec.ts +23 -0
- package/projects/component-library/src/lib/avatar/avatar.component.ts +50 -0
- package/projects/component-library/src/lib/button/button.component.css +145 -0
- package/projects/component-library/src/lib/button/button.component.html +25 -0
- package/projects/component-library/src/lib/button/button.component.spec.ts +23 -0
- package/projects/component-library/src/lib/button/button.component.ts +82 -0
- package/projects/component-library/src/lib/calendar-header/calendar-header.component.css +67 -0
- package/projects/component-library/src/lib/calendar-header/calendar-header.component.html +20 -0
- package/projects/component-library/src/lib/calendar-header/calendar-header.component.spec.ts +23 -0
- package/projects/component-library/src/lib/calendar-header/calendar-header.component.ts +191 -0
- package/projects/component-library/src/lib/card/card-body/card-body.component.css +0 -0
- package/projects/component-library/src/lib/card/card-body/card-body.component.html +1 -0
- package/projects/component-library/src/lib/card/card-body/card-body.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card-body/card-body.component.ts +12 -0
- package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.css +70 -0
- package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.html +1 -0
- package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.ts +13 -0
- package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.css +4 -0
- package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.html +3 -0
- package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.ts +12 -0
- package/projects/component-library/src/lib/card/card-icon/card-icon.component.css +0 -0
- package/projects/component-library/src/lib/card/card-icon/card-icon.component.html +1 -0
- package/projects/component-library/src/lib/card/card-icon/card-icon.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card-icon/card-icon.component.ts +12 -0
- package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.css +3 -0
- package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.html +1 -0
- package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.ts +12 -0
- package/projects/component-library/src/lib/card/card.component.css +149 -0
- package/projects/component-library/src/lib/card/card.component.html +46 -0
- package/projects/component-library/src/lib/card/card.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/card.component.ts +47 -0
- package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.css +79 -0
- package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.html +55 -0
- package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.ts +44 -0
- package/projects/component-library/src/lib/card/guide-card/guide-card.component.css +80 -0
- package/projects/component-library/src/lib/card/guide-card/guide-card.component.html +24 -0
- package/projects/component-library/src/lib/card/guide-card/guide-card.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card/guide-card/guide-card.component.ts +19 -0
- package/projects/component-library/src/lib/card-carousel/card-carousel.component.css +91 -0
- package/projects/component-library/src/lib/card-carousel/card-carousel.component.html +54 -0
- package/projects/component-library/src/lib/card-carousel/card-carousel.component.spec.ts +23 -0
- package/projects/component-library/src/lib/card-carousel/card-carousel.component.ts +89 -0
- package/projects/component-library/src/lib/checkbox/checkbox.component.css +79 -0
- package/projects/component-library/src/lib/checkbox/checkbox.component.html +27 -0
- package/projects/component-library/src/lib/checkbox/checkbox.component.spec.ts +23 -0
- package/projects/component-library/src/lib/checkbox/checkbox.component.ts +38 -0
- package/projects/component-library/src/lib/chips/chips.component.css +129 -0
- package/projects/component-library/src/lib/chips/chips.component.html +17 -0
- package/projects/component-library/src/lib/chips/chips.component.spec.ts +23 -0
- package/projects/component-library/src/lib/chips/chips.component.ts +54 -0
- package/projects/component-library/src/lib/component-library.component.spec.ts +23 -0
- package/projects/component-library/src/lib/component-library.component.ts +16 -0
- package/projects/component-library/src/lib/component-library.service.spec.ts +16 -0
- package/projects/component-library/src/lib/component-library.service.ts +9 -0
- package/projects/component-library/src/lib/datepicker/datepicker.component.css +33 -0
- package/projects/component-library/src/lib/datepicker/datepicker.component.html +11 -0
- package/projects/component-library/src/lib/datepicker/datepicker.component.spec.ts +23 -0
- package/projects/component-library/src/lib/datepicker/datepicker.component.ts +36 -0
- package/projects/component-library/src/lib/form-input/form-input.component.css +164 -0
- package/projects/component-library/src/lib/form-input/form-input.component.html +55 -0
- package/projects/component-library/src/lib/form-input/form-input.component.spec.ts +23 -0
- package/projects/component-library/src/lib/form-input/form-input.component.ts +282 -0
- package/projects/component-library/src/lib/form-select/form-select.component.css +158 -0
- package/projects/component-library/src/lib/form-select/form-select.component.html +38 -0
- package/projects/component-library/src/lib/form-select/form-select.component.spec.ts +23 -0
- package/projects/component-library/src/lib/form-select/form-select.component.ts +72 -0
- package/projects/component-library/src/lib/grid-cell/grid-cell.component.css +78 -0
- package/projects/component-library/src/lib/grid-cell/grid-cell.component.html +31 -0
- package/projects/component-library/src/lib/grid-cell/grid-cell.component.spec.ts +23 -0
- package/projects/component-library/src/lib/grid-cell/grid-cell.component.ts +89 -0
- package/projects/component-library/src/lib/header/header.component.css +62 -0
- package/projects/component-library/src/lib/header/header.component.html +23 -0
- package/projects/component-library/src/lib/header/header.component.spec.ts +23 -0
- package/projects/component-library/src/lib/header/header.component.ts +28 -0
- package/projects/component-library/src/lib/icon/icon.component.css +65 -0
- package/projects/component-library/src/lib/icon/icon.component.html +9 -0
- package/projects/component-library/src/lib/icon/icon.component.ts +64 -0
- package/projects/component-library/src/lib/icon/icon.service.ts +26 -0
- package/projects/component-library/src/lib/left-nav/left-nav.component.css +109 -0
- package/projects/component-library/src/lib/left-nav/left-nav.component.html +51 -0
- package/projects/component-library/src/lib/left-nav/left-nav.component.spec.ts +23 -0
- package/projects/component-library/src/lib/left-nav/left-nav.component.ts +180 -0
- package/projects/component-library/src/lib/list/list.component.css +28 -0
- package/projects/component-library/src/lib/list/list.component.html +10 -0
- package/projects/component-library/src/lib/list/list.component.spec.ts +23 -0
- package/projects/component-library/src/lib/list/list.component.ts +15 -0
- package/projects/component-library/src/lib/message-banner/message-banner.component.css +52 -0
- package/projects/component-library/src/lib/message-banner/message-banner.component.html +15 -0
- package/projects/component-library/src/lib/message-banner/message-banner.component.spec.ts +23 -0
- package/projects/component-library/src/lib/message-banner/message-banner.component.ts +31 -0
- package/projects/component-library/src/lib/page-layout/page-layout.component.css +76 -0
- package/projects/component-library/src/lib/page-layout/page-layout.component.html +30 -0
- package/projects/component-library/src/lib/page-layout/page-layout.component.spec.ts +23 -0
- package/projects/component-library/src/lib/page-layout/page-layout.component.ts +14 -0
- package/projects/component-library/src/lib/progress-bar/progress-bar.component.css +30 -0
- package/projects/component-library/src/lib/progress-bar/progress-bar.component.html +4 -0
- package/projects/component-library/src/lib/progress-bar/progress-bar.component.spec.ts +23 -0
- package/projects/component-library/src/lib/progress-bar/progress-bar.component.ts +24 -0
- package/projects/component-library/src/lib/radio-button/radio-button.component.css +128 -0
- package/projects/component-library/src/lib/radio-button/radio-button.component.html +28 -0
- package/projects/component-library/src/lib/radio-button/radio-button.component.spec.ts +23 -0
- package/projects/component-library/src/lib/radio-button/radio-button.component.ts +35 -0
- package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.css +118 -0
- package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.html +11 -0
- package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.spec.ts +23 -0
- package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.ts +74 -0
- package/projects/component-library/src/lib/spinner/spinner.component.css +41 -0
- package/projects/component-library/src/lib/spinner/spinner.component.html +1 -0
- package/projects/component-library/src/lib/spinner/spinner.component.spec.ts +23 -0
- package/projects/component-library/src/lib/spinner/spinner.component.ts +15 -0
- package/projects/component-library/src/lib/stepper/stepper.component.css +96 -0
- package/projects/component-library/src/lib/stepper/stepper.component.html +14 -0
- package/projects/component-library/src/lib/stepper/stepper.component.spec.ts +23 -0
- package/projects/component-library/src/lib/stepper/stepper.component.ts +61 -0
- package/projects/component-library/src/lib/tabs/tabs.component.css +100 -0
- package/projects/component-library/src/lib/tabs/tabs.component.html +16 -0
- package/projects/component-library/src/lib/tabs/tabs.component.spec.ts +23 -0
- package/projects/component-library/src/lib/tabs/tabs.component.ts +37 -0
- package/projects/component-library/src/lib/toast/toast.component.css +115 -0
- package/projects/component-library/src/lib/toast/toast.component.html +29 -0
- package/projects/component-library/src/lib/toast/toast.component.spec.ts +23 -0
- package/projects/component-library/src/lib/toast/toast.component.ts +87 -0
- package/projects/component-library/src/lib/tool-tip/tool-tip.component.css +144 -0
- package/projects/component-library/src/lib/tool-tip/tool-tip.component.html +31 -0
- package/projects/component-library/src/lib/tool-tip/tool-tip.component.spec.ts +23 -0
- package/projects/component-library/src/lib/tool-tip/tool-tip.component.ts +37 -0
- package/{public-api.d.ts → projects/component-library/src/public-api.ts} +12 -0
- package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.css +0 -0
- package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.html +22 -0
- package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.spec.ts +23 -0
- package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.ts +13 -0
- package/projects/component-library/src/utils/validators.ts +100 -0
- package/projects/component-library/tsconfig.lib.json +14 -0
- package/projects/component-library/tsconfig.lib.prod.json +10 -0
- package/projects/component-library/tsconfig.spec.json +14 -0
- package/sarasanalytics-com-design-system-0.0.21.tgz +0 -0
- package/src/Saras-logo.svg +15 -0
- package/src/app/app.component.css +82 -0
- package/src/app/app.component.html +663 -0
- package/src/app/app.component.spec.ts +29 -0
- package/src/app/app.component.ts +1341 -0
- package/src/app/app.config.ts +56 -0
- package/src/app/app.routes.ts +3 -0
- package/src/app/data.ts +52 -0
- package/src/app/kitchen-sink/kitchen-sink.component.css +30 -0
- package/src/app/kitchen-sink/kitchen-sink.component.html +7 -0
- package/src/app/kitchen-sink/kitchen-sink.component.spec.ts +23 -0
- package/src/app/kitchen-sink/kitchen-sink.component.ts +92 -0
- package/src/assets/.gitkeep +0 -0
- package/src/assets/analysis.svg +1 -0
- package/src/assets/arrowRightOutlined.svg +1 -0
- package/src/assets/avatar.svg +1 -0
- package/src/assets/bpn.svg +1 -0
- package/src/assets/businessStatsFilled.svg +1 -0
- package/src/assets/channelkey.svg +1 -0
- package/src/assets/chatHelpOutlined.svg +1 -0
- package/src/assets/checkCircleFilled.svg +1 -0
- package/src/assets/checkCircleOutlined.svg +1 -0
- package/src/assets/checkOutlined.svg +1 -0
- package/src/assets/circleFilled.svg +1 -0
- package/src/assets/closeBlueOutlined.svg +1 -0
- package/src/assets/closeCircleFilled.svg +1 -0
- package/src/assets/closeOutlined.svg +1 -0
- package/src/assets/dataonavatar.svg +1 -0
- package/src/assets/datonAvatar.png +0 -0
- package/src/assets/desktopSpeakerOutlined.svg +1 -0
- package/src/assets/disabledCheckboxFilled.svg +1 -0
- package/src/assets/doubleDownOutlined.svg +1 -0
- package/src/assets/downChevronOutlined.svg +3 -0
- package/src/assets/downOutlined.svg +1 -0
- package/src/assets/errorCircleOutlined.svg +1 -0
- package/src/assets/errorCrossOutlined.svg +3 -0
- package/src/assets/eyeFilled.svg +1 -0
- package/src/assets/eyeOff.svg +3 -0
- package/src/assets/eyeOutlined.svg +1 -0
- package/src/assets/formDetailsOutlined.svg +1 -0
- package/src/assets/gridViewOutlined.svg +1 -0
- package/src/assets/headsetOutlined.svg +3 -0
- package/src/assets/homeOutlined.svg +1 -0
- package/src/assets/icons/analysis1.svg +1 -0
- package/src/assets/infoCircleOutlined.svg +3 -0
- package/src/assets/infoTriangleFilled.svg +1 -0
- package/src/assets/infoTriangleOutlined.svg +1 -0
- package/src/assets/innosupps.svg +1 -0
- package/src/assets/leftChevronCircle.svg +2 -0
- package/src/assets/locationOutlined.svg +1 -0
- package/src/assets/loginDashboard.png +0 -0
- package/src/assets/mailOutlined.svg +1 -0
- package/src/assets/multiConnectionHub.svg +1 -0
- package/src/assets/murad.svg +1 -0
- package/src/assets/personOutlined.svg +1 -0
- package/src/assets/pricingIcon.svg +3 -0
- package/src/assets/rightChevronCircle.svg +1 -0
- package/src/assets/rightChevronOutlined.svg +1 -0
- package/src/assets/sarasFullLogo.svg +13 -0
- package/src/assets/sarasWhite.svg +1 -0
- package/src/assets/settingsOutlined.svg +1 -0
- package/src/assets/sourcesOutlined.svg +1 -0
- package/src/assets/tabDesktopArrowClockwiseOutlined.svg +1 -0
- package/src/assets/targetScanOutlined.svg +1 -0
- package/src/assets/timerOutlined.svg +5 -0
- package/src/assets/upwardTriangleFilled.svg +1 -0
- package/src/custom-theme.scss +37 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +23 -0
- package/src/main.ts +6 -0
- package/src/stories/GettingStarted.mdx +233 -0
- package/src/stories/KitchenSink.stories.ts +109 -0
- package/src/stories/accordion.stories.ts +234 -0
- package/src/stories/avatar.stories.ts +45 -0
- package/src/stories/card-carousel.stories.ts +136 -0
- package/src/stories/card.stories.ts +242 -0
- package/src/stories/checkbox.stories.ts +238 -0
- package/src/stories/chips.stories.ts +61 -0
- package/src/stories/custom-button.stories.ts +89 -0
- package/src/stories/datepicker.stories.ts +78 -0
- package/src/stories/form-input.stories.ts +166 -0
- package/src/stories/gridCell.stories.ts +234 -0
- package/src/stories/header.stories.ts +61 -0
- package/src/stories/icon.stories.ts +65 -0
- package/src/stories/leftnav.stories.ts +67 -0
- package/src/stories/message-banner.stories.ts +116 -0
- package/src/stories/page-layout.stories.ts +200 -0
- package/src/stories/progress-bar.stories.ts +40 -0
- package/src/stories/radio-button.stories.ts +80 -0
- package/src/stories/scrolling-card.stories.ts +36 -0
- package/src/stories/selectInput.stories.ts +176 -0
- package/src/stories/stepper.stories.ts +92 -0
- package/src/stories/tabs.stories.ts +97 -0
- package/src/stories/toast.stories.ts +74 -0
- package/src/stories/tool-tip.stories.ts +45 -0
- package/src/styles.css +388 -0
- package/src/svg.d.ts +1 -0
- package/tsconfig.app.json +14 -0
- package/tsconfig.json +42 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/interfaces/avatar-interface.mjs +0 -2
- package/esm2022/interfaces/button-interface.mjs +0 -10
- package/esm2022/interfaces/card-carousel-interface.mjs +0 -2
- package/esm2022/interfaces/chip-interface.mjs +0 -2
- package/esm2022/interfaces/grid-interface.mjs +0 -2
- package/esm2022/interfaces/guide-card-interface.mjs +0 -2
- package/esm2022/interfaces/icon-interface.mjs +0 -16
- package/esm2022/interfaces/message-banner.mjs +0 -2
- package/esm2022/interfaces/option-interface.mjs +0 -2
- package/esm2022/interfaces/select-interface.mjs +0 -2
- package/esm2022/interfaces/tab-interface.mjs +0 -2
- package/esm2022/interfaces/toast-interface.mjs +0 -2
- package/esm2022/lib/accordion/accordion.component.mjs +0 -115
- package/esm2022/lib/avatar/avatar.component.mjs +0 -56
- package/esm2022/lib/button/button.component.mjs +0 -100
- package/esm2022/lib/calendar-header/calendar-header.component.mjs +0 -168
- package/esm2022/lib/card/card-body/card-body.component.mjs +0 -11
- package/esm2022/lib/card/card-custom-header/card-custom-header.component.mjs +0 -11
- package/esm2022/lib/card/card-footer-actions/card-footer-actions.component.mjs +0 -11
- package/esm2022/lib/card/card-icon/card-icon.component.mjs +0 -11
- package/esm2022/lib/card/card-title-actions/card-title-actions.component.mjs +0 -11
- package/esm2022/lib/card/card.component.mjs +0 -111
- package/esm2022/lib/card/checkbox-card/checkbox-card.component.mjs +0 -41
- package/esm2022/lib/card/guide-card/guide-card.component.mjs +0 -19
- package/esm2022/lib/card-carousel/card-carousel.component.mjs +0 -87
- package/esm2022/lib/checkbox/checkbox.component.mjs +0 -38
- package/esm2022/lib/chips/chips.component.mjs +0 -62
- package/esm2022/lib/component-library.component.mjs +0 -19
- package/esm2022/lib/component-library.service.mjs +0 -14
- package/esm2022/lib/datepicker/datepicker.component.mjs +0 -40
- package/esm2022/lib/form-input/form-input.component.mjs +0 -219
- package/esm2022/lib/form-select/form-select.component.mjs +0 -77
- package/esm2022/lib/grid-cell/grid-cell.component.mjs +0 -84
- package/esm2022/lib/header/header.component.mjs +0 -37
- package/esm2022/lib/icon/icon.component.mjs +0 -73
- package/esm2022/lib/icon/icon.service.mjs +0 -28
- package/esm2022/lib/left-nav/left-nav.component.mjs +0 -146
- package/esm2022/lib/list/list.component.mjs +0 -23
- package/esm2022/lib/message-banner/message-banner.component.mjs +0 -43
- package/esm2022/lib/page-layout/page-layout.component.mjs +0 -21
- package/esm2022/lib/progress-bar/progress-bar.component.mjs +0 -29
- package/esm2022/lib/radio-button/radio-button.component.mjs +0 -33
- package/esm2022/lib/scrolling-cards/scrolling-cards.component.mjs +0 -59
- package/esm2022/lib/spinner/spinner.component.mjs +0 -22
- package/esm2022/lib/stepper/stepper.component.mjs +0 -64
- package/esm2022/lib/tabs/tabs.component.mjs +0 -38
- package/esm2022/lib/toast/toast.component.mjs +0 -100
- package/esm2022/lib/tool-tip/tool-tip.component.mjs +0 -41
- package/esm2022/public-api.mjs +0 -56
- package/esm2022/sarasanalytics-com-design-system.mjs +0 -5
- package/esm2022/utils/validators.mjs +0 -97
- package/fesm2022/sarasanalytics-com-design-system.mjs +0 -2001
- package/fesm2022/sarasanalytics-com-design-system.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/interfaces/avatar-interface.d.ts +0 -6
- package/interfaces/button-interface.d.ts +0 -22
- package/interfaces/chip-interface.d.ts +0 -11
- package/interfaces/grid-interface.d.ts +0 -24
- package/interfaces/icon-interface.d.ts +0 -4
- package/interfaces/select-interface.d.ts +0 -20
- package/interfaces/tab-interface.d.ts +0 -6
- package/lib/accordion/accordion.component.d.ts +0 -25
- package/lib/avatar/avatar.component.d.ts +0 -18
- package/lib/button/button.component.d.ts +0 -32
- package/lib/calendar-header/calendar-header.component.d.ts +0 -31
- package/lib/card/card-body/card-body.component.d.ts +0 -5
- package/lib/card/card-custom-header/card-custom-header.component.d.ts +0 -5
- package/lib/card/card-footer-actions/card-footer-actions.component.d.ts +0 -5
- package/lib/card/card-icon/card-icon.component.d.ts +0 -5
- package/lib/card/card-title-actions/card-title-actions.component.d.ts +0 -5
- package/lib/card/card.component.d.ts +0 -31
- package/lib/card/checkbox-card/checkbox-card.component.d.ts +0 -12
- package/lib/card/guide-card/guide-card.component.d.ts +0 -8
- package/lib/card-carousel/card-carousel.component.d.ts +0 -27
- package/lib/checkbox/checkbox.component.d.ts +0 -9
- package/lib/chips/chips.component.d.ts +0 -22
- package/lib/component-library.component.d.ts +0 -5
- package/lib/component-library.service.d.ts +0 -6
- package/lib/datepicker/datepicker.component.d.ts +0 -9
- package/lib/form-input/form-input.component.d.ts +0 -67
- package/lib/form-select/form-select.component.d.ts +0 -18
- package/lib/grid-cell/grid-cell.component.d.ts +0 -20
- package/lib/header/header.component.d.ts +0 -14
- package/lib/icon/icon.component.d.ts +0 -24
- package/lib/icon/icon.service.d.ts +0 -12
- package/lib/left-nav/left-nav.component.d.ts +0 -47
- package/lib/list/list.component.d.ts +0 -10
- package/lib/message-banner/message-banner.component.d.ts +0 -19
- package/lib/page-layout/page-layout.component.d.ts +0 -8
- package/lib/progress-bar/progress-bar.component.d.ts +0 -13
- package/lib/radio-button/radio-button.component.d.ts +0 -12
- package/lib/scrolling-cards/scrolling-cards.component.d.ts +0 -36
- package/lib/spinner/spinner.component.d.ts +0 -7
- package/lib/stepper/stepper.component.d.ts +0 -17
- package/lib/tabs/tabs.component.d.ts +0 -15
- package/lib/toast/toast.component.d.ts +0 -33
- package/lib/tool-tip/tool-tip.component.d.ts +0 -15
- package/utils/validators.d.ts +0 -6
- /package/{interfaces/guide-card-interface.d.ts → projects/component-library/src/interfaces/guide-card-interface.ts} +0 -0
- /package/{interfaces/message-banner.d.ts → projects/component-library/src/interfaces/message-banner.ts} +0 -0
- /package/{interfaces/option-interface.d.ts → projects/component-library/src/interfaces/option-interface.ts} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { PageLayoutComponent } from './page-layout.component';
|
|
4
|
+
|
|
5
|
+
describe('PageLayoutComponent', () => {
|
|
6
|
+
let component: PageLayoutComponent;
|
|
7
|
+
let fixture: ComponentFixture<PageLayoutComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [PageLayoutComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(PageLayoutComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'sa-page-layout',
|
|
5
|
+
standalone: true,
|
|
6
|
+
imports: [],
|
|
7
|
+
templateUrl: './page-layout.component.html',
|
|
8
|
+
styleUrl: './page-layout.component.css'
|
|
9
|
+
})
|
|
10
|
+
export class PageLayoutComponent {
|
|
11
|
+
@Input() showRightContent: boolean = false;
|
|
12
|
+
@Input() showFooterContent: boolean = false;
|
|
13
|
+
@Input() showProgressBarContent;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.progress-bar {
|
|
2
|
+
height: var(--dynamic-height, 8px);
|
|
3
|
+
border-radius: var(--dynamic-border-radius, 20px);
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
--mdc-linear-progress-active-indicator-color: var(--primary-500, #7F56D9);
|
|
7
|
+
--mdc-linear-progress-track-color: white;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::ng-deep .progress-bar .mdc-linear-progress__primary-bar {
|
|
11
|
+
background-color: var(--mdc-linear-progress-active-indicator-color);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
::ng-deep .progress-bar .mdc-linear-progress__bar {
|
|
15
|
+
height: var(--dynamic-height, 8px);
|
|
16
|
+
border-radius: var(--dynamic-border-radius, 20px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
::ng-deep .progress-bar .mdc-linear-progress__bar-inner {
|
|
20
|
+
border-top-style: none;
|
|
21
|
+
border-radius: var(--dynamic-border-radius, 20px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
::ng-deep .progress-bar .mdc-linear-progress__secondary-bar {
|
|
25
|
+
background-color: var(--mdc-linear-progress-track-color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
::ng-deep .progress-bar .mdc-linear-progress__buffer-bar {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ProgressBarComponent } from './progress-bar.component';
|
|
4
|
+
|
|
5
|
+
describe('ProgressBarComponent', () => {
|
|
6
|
+
let component: ProgressBarComponent;
|
|
7
|
+
let fixture: ComponentFixture<ProgressBarComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ProgressBarComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ProgressBarComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
3
|
+
import { NgStyle } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'sa-progress-bar',
|
|
8
|
+
standalone: true,
|
|
9
|
+
templateUrl: './progress-bar.component.html',
|
|
10
|
+
styleUrl: './progress-bar.component.css',
|
|
11
|
+
imports: [MatProgressBarModule, NgStyle],
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export class ProgressBarComponent implements OnInit {
|
|
15
|
+
@Input() progressValue: number = 10;
|
|
16
|
+
@Input() borderRadius: string = '10px';
|
|
17
|
+
@Input() height: string = '8px';
|
|
18
|
+
|
|
19
|
+
constructor(private el: ElementRef, private renderer: Renderer2) { }
|
|
20
|
+
|
|
21
|
+
ngOnInit(): void {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.radio-group-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 20px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.radio-group-container .mat-mdc-radio-group {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--small-8px, 8px);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.radio-group-container.column .mat-mdc-radio-group {
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
::ng-deep.radio-group-container .mdc-form-field,
|
|
21
|
+
::ng-deep.radio-group-container .mdc-form-field.mat-internal-form-field {
|
|
22
|
+
border-radius: var(--large-64px, 64px);
|
|
23
|
+
border: 1px solid var(--grey-100, #EAECF0);
|
|
24
|
+
padding: 0 1.75rem 0 0.75rem;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
display: flex;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,
|
|
30
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,
|
|
31
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,
|
|
32
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,
|
|
33
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,
|
|
34
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,
|
|
35
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,
|
|
36
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,
|
|
37
|
+
::ng-deep .radio-group-container .mat-mdc-radio-checked .mdc-form-field,
|
|
38
|
+
::ng-deep .radio-group-container .mat-mdc-radio-checked .mdc-form-field.mat-internal-form-field {
|
|
39
|
+
border-color: var(--primary-500);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* for radio button size */
|
|
43
|
+
::ng-deep .radio-group-container .mdc-radio__background {
|
|
44
|
+
height: 1rem;
|
|
45
|
+
width: 1rem;
|
|
46
|
+
top: 0.125rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::ng-deep .radio-group-container .mat-radio-outer-circle {
|
|
50
|
+
height: 0.625rem;
|
|
51
|
+
width: 0.625rem;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
::ng-deep .radio-group-container .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle {
|
|
56
|
+
transform: scale(0.4);
|
|
57
|
+
top: -2px;
|
|
58
|
+
left: -2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* end */
|
|
62
|
+
|
|
63
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio .mdc-radio__background::before {
|
|
64
|
+
background-color: #FFF;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
::ng-deep .radio-group-container .radio-box:hover {
|
|
68
|
+
border-radius: var(--large-64px);
|
|
69
|
+
background: var(--structural-neutral1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
::ng-deep .radio-group-container .mdc-label {
|
|
73
|
+
padding-left: 0;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
color: var(--text-highemphasis, #1C1B20);
|
|
76
|
+
font-family: var(--font);
|
|
77
|
+
font-size: 0.875rem;
|
|
78
|
+
font-style: normal;
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
line-height: 1.25rem;
|
|
81
|
+
letter-spacing: 0.25px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
::ng-deep .radio-group-container .radio-box {
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle {
|
|
89
|
+
border-color: var(--icon-grey1, #757575);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio {
|
|
93
|
+
padding: var(--small-8px) var(--small-8px) var(--small-8px) var(--small-12px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
::ng-deep .radio-group-container .mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle {
|
|
97
|
+
border-width: 1.5px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
::ng-deep .radio-group-container .mat-mdc-radio-checked .mdc-label {
|
|
101
|
+
color: var(--primary-500);
|
|
102
|
+
font-family: var(--font);
|
|
103
|
+
font-size: 0.875rem;
|
|
104
|
+
font-style: normal;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
letter-spacing: 0.15px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
::ng-deep .radio-group-container .mdc-label {
|
|
110
|
+
color: var(--Text-High-Emphasis, #1C1B20);
|
|
111
|
+
font-family: var(--font);
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
line-height: 1.25rem;
|
|
114
|
+
letter-spacing: 0.25px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.title-container {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
gap: var(--small-8px);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
.radio-group-container .form-field {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: var(--small-8px);
|
|
128
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="radio-group-container" [ngClass]="[props['column'] ? 'column' : '']">
|
|
2
|
+
<div class="title-container">
|
|
3
|
+
@if(props['label']){
|
|
4
|
+
<div class="form-field-title">
|
|
5
|
+
<span>{{ props['label'] }}</span>
|
|
6
|
+
</div>
|
|
7
|
+
}
|
|
8
|
+
@if(props['description']){
|
|
9
|
+
<div class="form-field-description">
|
|
10
|
+
<span>{{ props['description'] }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-field">
|
|
15
|
+
<mat-radio-group [formControl]="formControl" name="radioButtons">
|
|
16
|
+
<div *ngFor="let option of options$ | async" class="radio-box" (click)="selectRadio(option.value, radio)">
|
|
17
|
+
<mat-radio-button [disableRipple]="true" #radio [value]="option.value">
|
|
18
|
+
{{ option.label }}
|
|
19
|
+
</mat-radio-button>
|
|
20
|
+
</div>
|
|
21
|
+
</mat-radio-group>
|
|
22
|
+
</div>
|
|
23
|
+
@if(props['helpText']){
|
|
24
|
+
<div class="form-field-helpText">
|
|
25
|
+
<span>{{ props['helpText'] }}</span>
|
|
26
|
+
</div>
|
|
27
|
+
}
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { RadioButtonComponent } from './radio-button.component';
|
|
4
|
+
|
|
5
|
+
describe('RadioButtonComponent', () => {
|
|
6
|
+
let component: RadioButtonComponent;
|
|
7
|
+
let fixture: ComponentFixture<RadioButtonComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [RadioButtonComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(RadioButtonComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { MatRadioButton, MatRadioModule } from '@angular/material/radio';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { FieldType } from '@ngx-formly/core';
|
|
6
|
+
import { isObservable, of } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'sa-radio-button',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [MatRadioButton, MatRadioModule, CommonModule, FormsModule, ReactiveFormsModule],
|
|
12
|
+
templateUrl: './radio-button.component.html',
|
|
13
|
+
styleUrl: './radio-button.component.css'
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export class RadioButtonComponent extends FieldType {
|
|
17
|
+
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
// console.log(this)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get options$() {
|
|
23
|
+
const options = this.props?.options;
|
|
24
|
+
return isObservable(options) ? options : of(options || []);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override get formControl(): FormControl {
|
|
28
|
+
return super.formControl as FormControl;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
selectRadio(value: any, radio: MatRadioButton): void {
|
|
32
|
+
this.formControl.setValue(value);
|
|
33
|
+
radio.checked = true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.scrolling-cards-container {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
width: fit-content;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.scrolling-cards-container.vertical {
|
|
9
|
+
height: 100%;
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.scrolling-cards-container.vertical::before,
|
|
14
|
+
.scrolling-cards-container.vertical::after {
|
|
15
|
+
content: "";
|
|
16
|
+
position: absolute;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: var(--medium-36px);
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.scrolling-cards-container.vertical::before {
|
|
23
|
+
background: rgb(251, 250, 255);
|
|
24
|
+
background: -moz-linear-gradient(180deg, var(--structural-primarytint) 10%, rgba(255, 255, 255, 0.12) 100%);
|
|
25
|
+
background: -webkit-linear-gradient(180deg, var(--structural-primarytint) 10%, rgba(255, 255, 255, 0.12) 100%);
|
|
26
|
+
background: linear-gradient(180deg, var(--structural-primarytint) 10%, rgba(255, 255, 255, 0.12) 100%);
|
|
27
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="var(--structural-primarytint)", endColorstr="#ffffff", GradientType=1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.scrolling-cards-container.vertical::after {
|
|
31
|
+
bottom: 0;
|
|
32
|
+
background: rgb(251,250,255);
|
|
33
|
+
background: -moz-linear-gradient(360deg, var(--structural-primarytint) 10%, rgba(255,255,255,0.12) 100%);
|
|
34
|
+
background: -webkit-linear-gradient(360deg, var(--structural-primarytint) 10%, rgba(255,255,255,0.12) 100%);
|
|
35
|
+
background: linear-gradient(360deg, var(--structural-primarytint) 10%, rgba(255,255,255,0.12) 100%);
|
|
36
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="var(--structural-primarytint)",endColorstr="#ffffff",GradientType=1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.card-container {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: var(--small-16px);
|
|
42
|
+
animation-duration: var(--scroll-duration, 30s);
|
|
43
|
+
/* animation-timing-function: linear(-0.25 54.94%, 1.2 63.4%); */
|
|
44
|
+
animation-timing-function: linear;
|
|
45
|
+
|
|
46
|
+
animation-iteration-count: infinite;
|
|
47
|
+
animation-direction: var(--scroll-direction, normal);
|
|
48
|
+
width: fit-content;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.card-container.vertical {
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
animation-name: scroll-vertical;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.card-container.horizontal {
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
animation-name: scroll-horizontal;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* @keyframes scroll-vertical {
|
|
62
|
+
0% {
|
|
63
|
+
transform: translateY(0);
|
|
64
|
+
}
|
|
65
|
+
100% {
|
|
66
|
+
transform: translateY(-50%);
|
|
67
|
+
}
|
|
68
|
+
} */
|
|
69
|
+
|
|
70
|
+
@keyframes scroll-vertical {
|
|
71
|
+
0% {
|
|
72
|
+
transform: translateY(0);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
100% {
|
|
76
|
+
transform: translateY(calc(-50% - var(--small-16px)));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* @keyframes scroll-horizontal {
|
|
81
|
+
0% {
|
|
82
|
+
transform: translateX(0);
|
|
83
|
+
}
|
|
84
|
+
100% {
|
|
85
|
+
transform: translateX(-50%);
|
|
86
|
+
}
|
|
87
|
+
} */
|
|
88
|
+
|
|
89
|
+
@keyframes scroll-horizontal {
|
|
90
|
+
0% {
|
|
91
|
+
transform: translateX(0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
100% {
|
|
95
|
+
transform: translateX(calc(-50% - var(--small-16px)));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
sa-card {
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.card-container.vertical {
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
animation-name: scroll-vertical;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes scroll-continuous {
|
|
109
|
+
0% {
|
|
110
|
+
transform: translateX(100%);
|
|
111
|
+
/* Start from the right edge */
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
100% {
|
|
115
|
+
transform: translateX(-100%);
|
|
116
|
+
/* Move completely to the left */
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="scrolling-cards-container {{this.isVertical ? 'vertical': 'horizontal'}}" (mouseenter)="pauseScroll()"
|
|
2
|
+
(mouseleave)="resumeScroll()">
|
|
3
|
+
<div #cardContainer class="card-container">
|
|
4
|
+
@for (card of displayCards; track card.title) {
|
|
5
|
+
<sa-card [title]="card.title" [body]="card.body" [icon]="card.icon" [iconSize]="'54'"
|
|
6
|
+
[customWrapperClass]="'sa-card-secondary-wrapper'" [width]="'24.063rem'" [column]="false"
|
|
7
|
+
[showCardBody]="true">
|
|
8
|
+
</sa-card>
|
|
9
|
+
}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ScrollingCardsComponent } from './scrolling-cards.component';
|
|
4
|
+
|
|
5
|
+
describe('ScrollingCardsComponent', () => {
|
|
6
|
+
let component: ScrollingCardsComponent;
|
|
7
|
+
let fixture: ComponentFixture<ScrollingCardsComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ScrollingCardsComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ScrollingCardsComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Component, Input, OnInit, AfterViewInit, ViewChild, ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { CardComponent } from '../card/card.component';
|
|
3
|
+
import { IconService } from '../icon/icon.service';
|
|
4
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
5
|
+
|
|
6
|
+
interface CardData {
|
|
7
|
+
title: string;
|
|
8
|
+
body: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
iconSize?: string;
|
|
11
|
+
customWrapperClass?: string;
|
|
12
|
+
width?: string;
|
|
13
|
+
column?: string;
|
|
14
|
+
showCardBody?: boolean;
|
|
15
|
+
showCardHeader?: boolean;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
logoIcon?: string;
|
|
18
|
+
avatar?: string;
|
|
19
|
+
avatarIcon?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
selector: 'sa-scrolling-cards',
|
|
24
|
+
standalone: true,
|
|
25
|
+
imports: [HttpClientModule, CardComponent],
|
|
26
|
+
providers: [IconService],
|
|
27
|
+
templateUrl: './scrolling-cards.component.html',
|
|
28
|
+
styleUrl: './scrolling-cards.component.css'
|
|
29
|
+
})
|
|
30
|
+
export class ScrollingCardsComponent implements OnInit, AfterViewInit {
|
|
31
|
+
@Input({ required: true }) cards: CardData[] = [];
|
|
32
|
+
@Input() duration: number = 10;
|
|
33
|
+
@Input() direction: 'up' | 'down' | 'left' | 'right' = 'up';
|
|
34
|
+
@ViewChild('cardContainer') cardContainer!: ElementRef;
|
|
35
|
+
|
|
36
|
+
displayCards: CardData[] = [];
|
|
37
|
+
animationPaused = false;
|
|
38
|
+
isVertical: boolean;
|
|
39
|
+
|
|
40
|
+
constructor(private cdr: ChangeDetectorRef) { }
|
|
41
|
+
|
|
42
|
+
ngOnInit() {
|
|
43
|
+
this.displayCards = [...this.cards, ...this.cards];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ngAfterViewInit() {
|
|
47
|
+
this.setAnimationProperties();
|
|
48
|
+
this.cdr.detectChanges();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
setAnimationProperties() {
|
|
52
|
+
if (!this.cardContainer) return;
|
|
53
|
+
|
|
54
|
+
const container = this.cardContainer.nativeElement;
|
|
55
|
+
this.isVertical = this.direction === 'up' || this.direction === 'down';
|
|
56
|
+
const containerSize = this.isVertical ? container.scrollHeight : container.scrollWidth;
|
|
57
|
+
const duration = containerSize / this.duration;
|
|
58
|
+
|
|
59
|
+
container.style.setProperty('--scroll-duration', `${duration}s`);
|
|
60
|
+
container.style.setProperty('--scroll-direction', this.direction === 'down' || this.direction === 'right' ? 'reverse' : 'normal');
|
|
61
|
+
container.classList.toggle('vertical', this.isVertical);
|
|
62
|
+
container.classList.toggle('horizontal', !this.isVertical);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
pauseScroll() {
|
|
66
|
+
this.animationPaused = true;
|
|
67
|
+
this.cardContainer.nativeElement.style.animationPlayState = 'paused';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
resumeScroll() {
|
|
71
|
+
this.animationPaused = false;
|
|
72
|
+
this.cardContainer.nativeElement.style.animationPlayState = 'running';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.sa-spinner {
|
|
2
|
+
width: 1em;
|
|
3
|
+
height: 1em;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
position: relative;
|
|
7
|
+
border: 2px solid var(--primary-500);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
animation: rotation 1s linear infinite;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.sa-spinner::after {
|
|
13
|
+
content: '';
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
position: absolute;
|
|
16
|
+
left: 0.1em;
|
|
17
|
+
top: 0.1em;
|
|
18
|
+
border: 2px solid var(--primary-500);
|
|
19
|
+
width: 0.25em;
|
|
20
|
+
height: 0.25em;
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sa-spinner.default,
|
|
25
|
+
.sa-spinner.default::after {
|
|
26
|
+
border-color: #fff
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes rotation {
|
|
30
|
+
0% {
|
|
31
|
+
transform: rotate(0deg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
100% {
|
|
35
|
+
transform: rotate(360deg);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host {
|
|
40
|
+
display: inherit;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="sa-spinner" [ngClass]="default ? 'default' : ''" [ngStyle]="{'fontSize': size+'px'}"></span>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SpinnerComponent } from './spinner.component';
|
|
4
|
+
|
|
5
|
+
describe('SpinnerComponent', () => {
|
|
6
|
+
let component: SpinnerComponent;
|
|
7
|
+
let fixture: ComponentFixture<SpinnerComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [SpinnerComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SpinnerComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sa-spinner',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [CommonModule],
|
|
8
|
+
templateUrl: './spinner.component.html',
|
|
9
|
+
styleUrl: './spinner.component.css'
|
|
10
|
+
})
|
|
11
|
+
export class SpinnerComponent {
|
|
12
|
+
@Input('default') default: boolean = false;
|
|
13
|
+
@Input('size') size: any;
|
|
14
|
+
|
|
15
|
+
}
|