@sarasanalytics-com/design-system 0.0.41 → 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 +34 -13
- 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 +73 -18
- 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} +13 -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/{styles → src}/styles.css +27 -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/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 -97
- 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 -55
- package/esm2022/sarasanalytics-com-design-system.mjs +0 -5
- package/esm2022/utils/validators.mjs +0 -97
- package/fesm2022/sarasanalytics-com-design-system.mjs +0 -1891
- 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/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 -28
- 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 { CardComponent } from './card.component';
|
|
4
|
+
|
|
5
|
+
describe('CardComponent', () => {
|
|
6
|
+
let component: CardComponent;
|
|
7
|
+
let fixture: ComponentFixture<CardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [CardComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CardComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { ChipsComponent } from '../chips/chips.component';
|
|
4
|
+
import { ChipInterface } from '../../interfaces/chip-interface';
|
|
5
|
+
import { IconComponent } from '../icon/icon.component';
|
|
6
|
+
import { AvatarComponent } from "../avatar/avatar.component";
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'sa-card',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule, ChipsComponent, IconComponent, AvatarComponent],
|
|
12
|
+
templateUrl: './card.component.html',
|
|
13
|
+
styleUrl: './card.component.css'
|
|
14
|
+
})
|
|
15
|
+
export class CardComponent {
|
|
16
|
+
@Input('title') title: string = '';
|
|
17
|
+
@Input('showCardHeader') showCardHeader: boolean = false;
|
|
18
|
+
@Input('showCardBody') showCardBody: boolean = false;
|
|
19
|
+
@Input('showHeaderBodyDivider') showHeaderBodyDivider: boolean = false;
|
|
20
|
+
@Input('showCustomCardBody') showCustomCardBody: boolean = false;
|
|
21
|
+
@Input('customWrapperClass') customWrapperClass: string = '';
|
|
22
|
+
@Input('chip') chip: ChipInterface | null = null;
|
|
23
|
+
@Input('body') body: string = '';
|
|
24
|
+
@Input('avatar') avatar: string = '';
|
|
25
|
+
@Input('image') image: string = '';
|
|
26
|
+
@Input('imageWidth') imageWidth: string = '';
|
|
27
|
+
@Input('avatarSize') avatarSize: string;
|
|
28
|
+
|
|
29
|
+
@Input('icon') icon: string = '';
|
|
30
|
+
@Input('iconSize') iconSize: string;
|
|
31
|
+
|
|
32
|
+
@Input('subtitle') subtitle: string = '';
|
|
33
|
+
@Input('logoIcon') logoIcon: string = '';
|
|
34
|
+
|
|
35
|
+
@Input('width') width: string | number;
|
|
36
|
+
@Input('height') height: string | number;
|
|
37
|
+
@Input('column') column: boolean = false;
|
|
38
|
+
|
|
39
|
+
cardStyles: any = {};
|
|
40
|
+
|
|
41
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
42
|
+
if (changes['width']?.currentValue || changes['height']?.currentValue) {
|
|
43
|
+
this.cardStyles['width'] = typeof changes['width']?.currentValue === 'string' ? changes['width']?.currentValue : changes['width']?.currentValue + '%';
|
|
44
|
+
this.cardStyles['height'] = typeof changes['height']?.currentValue === 'string' ? changes['height']?.currentValue : changes['height']?.currentValue + '%';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.sa-card-title-logo-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: var(--small-8px);
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sa-card-title-logo sa-icon {
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
|
|
12
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
|
|
13
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
|
|
14
|
+
::ng-deep.checkbox-style.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
|
|
15
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
|
|
16
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
|
|
17
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,
|
|
18
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background,
|
|
19
|
+
::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple,
|
|
20
|
+
::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
|
|
21
|
+
::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
|
|
22
|
+
::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
|
|
23
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
|
|
24
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
|
|
25
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
|
|
26
|
+
::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple {
|
|
27
|
+
border-color: var(--primary-500);
|
|
28
|
+
background-color: var(--primary-500);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.checkbox-card {
|
|
32
|
+
display: block;
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.buttons-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Button Wrapper */
|
|
44
|
+
.button-wrapper {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.button-content {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
gap: var(--medium-20px, 20px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.description-container {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: var(--small-12px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.description-style {
|
|
64
|
+
color: var(--text-mediumemphasis, #6D6979);
|
|
65
|
+
font-family: var(--font);
|
|
66
|
+
font-size: var(--small-14px);
|
|
67
|
+
font-style: normal;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
line-height: var(--medium-20px);
|
|
70
|
+
letter-spacing: 0.1px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.description-icon {
|
|
74
|
+
display: flex;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
::ng-deep .sa-card {
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<sa-card [width]="props['width']" [customWrapperClass]="props['customWrapperClass']"
|
|
2
|
+
(click)="!props['disabled'] && onCardClick($event)" [showCardBody]="false" [showCardHeader]="true"
|
|
3
|
+
[showCustomCardBody]="true" class="checkbox-card {{props['isCardSelected'] ? 'card-selected': ''}}"
|
|
4
|
+
[style.width]="props['width']">
|
|
5
|
+
<sa-card-title-header>
|
|
6
|
+
<div class="sa-card-custom-header-container">
|
|
7
|
+
<div class="sa-card-title-logo-container">
|
|
8
|
+
<div class="sa-card-title-logo {{props['disabled'] ? 'disabled-card': ''}}"><sa-icon
|
|
9
|
+
[icon]="props['featureIcon']" customClass="auto-dimensions colored-icon"></sa-icon>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="sa-card-custom-title">{{props['title']}}</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="sa-card-titleIcon">
|
|
14
|
+
<sa-card-title-actions>
|
|
15
|
+
<div class="sa-document-action">
|
|
16
|
+
@if(props['disabled']){
|
|
17
|
+
<sa-icon icon="disabledCheckboxFilled"
|
|
18
|
+
customClass="auto-dimensions disabled-checkbox-icon"></sa-icon>
|
|
19
|
+
}@else{
|
|
20
|
+
<mat-checkbox class="checkbox-style" [formControl]="formControl"
|
|
21
|
+
(click)="onCheckboxClick($event)" [disabled]="props['disabled']"></mat-checkbox>
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
</sa-card-title-actions>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</sa-card-title-header>
|
|
28
|
+
<sa-card-custom-body>
|
|
29
|
+
@if(props['listItems']){
|
|
30
|
+
<lib-list [listData]="props['listItems']" [featuresIcon]="props['listIcon']"></lib-list>
|
|
31
|
+
}@else if(props['showButtons']){
|
|
32
|
+
<div class="buttons-container">
|
|
33
|
+
<ng-container *ngFor="let button of props['showButtons']">
|
|
34
|
+
<ng-container *ngIf="button.type === 'submit'">
|
|
35
|
+
<div class="button-content">
|
|
36
|
+
@if(props['description']){
|
|
37
|
+
@if(props['descriptionIcon']){
|
|
38
|
+
<div class="description-container">
|
|
39
|
+
<sa-icon [icon]="props['descriptionIcon']" customClass="auto-dimensions disabled-icon"
|
|
40
|
+
class="description-icon"></sa-icon>
|
|
41
|
+
<span class="description-style">{{props['description']}}</span>
|
|
42
|
+
</div>
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
<sa-button (click)="actionHandler(button)" [text]="button.label" [type]="button.buttonType"
|
|
46
|
+
[size]="button.size" [state]="button.state" [icon]="button.icon"
|
|
47
|
+
[iconPosition]='button.iconPosition' class="checkbox-card-action-button"
|
|
48
|
+
[buttonIconSize]="button.iconSize"></sa-button>
|
|
49
|
+
</div>
|
|
50
|
+
</ng-container>
|
|
51
|
+
</ng-container>
|
|
52
|
+
</div>
|
|
53
|
+
}
|
|
54
|
+
</sa-card-custom-body>
|
|
55
|
+
</sa-card>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CheckboxCardComponent } from './checkbox-card.component';
|
|
4
|
+
|
|
5
|
+
describe('CheckboxCardComponent', () => {
|
|
6
|
+
let component: CheckboxCardComponent;
|
|
7
|
+
let fixture: ComponentFixture<CheckboxCardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [CheckboxCardComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CheckboxCardComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { CardComponent } from '../card.component';
|
|
3
|
+
import { IconComponent } from '../../icon/icon.component';
|
|
4
|
+
import { ListComponent } from '../../list/list.component';
|
|
5
|
+
import { CardBodyComponent } from '../card-body/card-body.component';
|
|
6
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { CardTitleActionsComponent } from '../card-title-actions/card-title-actions.component';
|
|
9
|
+
import { CardCustomHeaderComponent } from '../card-custom-header/card-custom-header.component';
|
|
10
|
+
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
|
+
import { FieldType } from '@ngx-formly/core';
|
|
12
|
+
import { ButtonComponent } from '../../button/button.component';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'sa-checkbox-card',
|
|
16
|
+
standalone: true,
|
|
17
|
+
imports: [CardComponent, IconComponent, ListComponent, CardBodyComponent, MatCheckboxModule, CommonModule, CardTitleActionsComponent, CardCustomHeaderComponent, FormsModule, ReactiveFormsModule, ButtonComponent],
|
|
18
|
+
templateUrl: './checkbox-card.component.html',
|
|
19
|
+
styleUrl: './checkbox-card.component.css'
|
|
20
|
+
})
|
|
21
|
+
export class CheckboxCardComponent extends FieldType {
|
|
22
|
+
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
// console.log(this)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
onCardClick(event: MouseEvent): void {
|
|
28
|
+
this.props['isCardSelected'] = !this.props['isCardSelected'];
|
|
29
|
+
this.formControl.setValue(!this.formControl.value);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onCheckboxClick(event: Event): void {
|
|
33
|
+
event.stopPropagation();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
override get formControl(): FormControl {
|
|
38
|
+
return super.formControl as FormControl;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
actionHandler(button: any) {
|
|
42
|
+
this.field.props['onButtonClick'](this.field);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.guide-container {
|
|
2
|
+
background-color: var(--structural-white);
|
|
3
|
+
border: 0.0625rem solid var(--grey-100, #eaecf0);
|
|
4
|
+
border-radius: 0.5rem;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
padding: 1.75rem 1.875rem 1.75rem 1.875rem;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 2.25rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.guide-header {
|
|
13
|
+
border-bottom: 0.0625rem solid var(--grey-100, #eaecf0);
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.guide-header h1 {
|
|
18
|
+
font-size: 1.5rem;
|
|
19
|
+
color: var(--text-highemphasis, #1C1B20);
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.guide-content {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: var(--large-42px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.step {
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.guide-header .guide-header-title,
|
|
34
|
+
.step-content .step-title {
|
|
35
|
+
color: var(--text-highemphasis, #1C1B20);
|
|
36
|
+
font-family: var(--font-roboto, 'Roboto');
|
|
37
|
+
font-size: var(--small-16px);
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
line-height: 1.5rem;
|
|
41
|
+
letter-spacing: 0.03125rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.step-content .step-description {
|
|
46
|
+
color: var(--text-lowemphasis, #98A2A3)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.step-indicator {
|
|
50
|
+
margin-right: 1.1575rem;
|
|
51
|
+
margin-top: 0.125rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.step-circle {
|
|
55
|
+
width: 1rem;
|
|
56
|
+
height: 1rem;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
border: 0.25rem solid var(--primary-500);
|
|
59
|
+
margin: 0.125rem auto 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.step-line {
|
|
63
|
+
width: 0.125rem;
|
|
64
|
+
height: calc(100% + 1.75rem);
|
|
65
|
+
background-color: var(--primary-500);
|
|
66
|
+
margin: 0 auto 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.step-content h2 {
|
|
70
|
+
font-size: 1.125rem;
|
|
71
|
+
color: var(--text-highemphasis, #1C1B20);
|
|
72
|
+
margin: 0 0 0.625rem 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.step-content p {
|
|
76
|
+
font-size: 0.875rem;
|
|
77
|
+
color: var(--text-highemphasis, #1C1B20);
|
|
78
|
+
margin: 0;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<div class="guide-container">
|
|
2
|
+
<div class="guide-header">
|
|
3
|
+
<p class="guide-header-title">{{ title }}</p>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="guide-content">
|
|
6
|
+
@for (step of steps; track step; let last = $last) {
|
|
7
|
+
<div class="step">
|
|
8
|
+
<div class="step-indicator">
|
|
9
|
+
<div class="step-circle"></div>
|
|
10
|
+
|
|
11
|
+
@if (!last) {
|
|
12
|
+
<div class="step-line"></div>
|
|
13
|
+
}
|
|
14
|
+
</div>
|
|
15
|
+
<div class="step-content">
|
|
16
|
+
<p class="step-title">{{ step.title }}</p>
|
|
17
|
+
@if (step?.description) {
|
|
18
|
+
<p class="step-description">{{ step.description }}</p>
|
|
19
|
+
}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { GuideCardComponent } from './guide-card.component';
|
|
4
|
+
|
|
5
|
+
describe('GuideCardComponent', () => {
|
|
6
|
+
let component: GuideCardComponent;
|
|
7
|
+
let fixture: ComponentFixture<GuideCardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [GuideCardComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(GuideCardComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { GuideStep } from '../../../interfaces/guide-card-interface';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'sa-guide-card',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [],
|
|
10
|
+
templateUrl: './guide-card.component.html',
|
|
11
|
+
styleUrl: './guide-card.component.css',
|
|
12
|
+
encapsulation: ViewEncapsulation.None
|
|
13
|
+
})
|
|
14
|
+
export class GuideCardComponent {
|
|
15
|
+
@Input() title: string = '';
|
|
16
|
+
@Input() steps: GuideStep[] = []
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* card-carousel.component.css */
|
|
2
|
+
.carousel-container {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.controls {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
margin: 0 0 var(--medium-20px) 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-height: var(--medium-32px);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dots {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
gap: var(--small-4px);
|
|
19
|
+
align-items: center;
|
|
20
|
+
width: 17rem;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.arrow-controls {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
margin-top: var(--small-4px);
|
|
28
|
+
gap: var(--small-12px);
|
|
29
|
+
margin-left: auto;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.arrow-controls sa-icon {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.dot {
|
|
37
|
+
width: var(--small-6px);
|
|
38
|
+
height: var(--small-6px);
|
|
39
|
+
min-width: var(--small-6px);
|
|
40
|
+
min-height: var(--small-6px);
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
background-color: var(--grey-200);
|
|
43
|
+
margin: 0 var(--small-6px);
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dot.active {
|
|
49
|
+
background-color: var(--primary-500);
|
|
50
|
+
width: var(--small-8px);
|
|
51
|
+
height: var(--small-8px);
|
|
52
|
+
min-width: var(--small-8px);
|
|
53
|
+
min-height: var(--small-8px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.brand-logos-container {
|
|
57
|
+
width: 100%; /* Adjust as needed */
|
|
58
|
+
margin-top: var(--medium-32px);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
max-width: 28.9375rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.brand-logos {
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: var(--medium-24px);
|
|
66
|
+
transition: transform 0.3s ease;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.brand-logos sa-icon {
|
|
72
|
+
flex: 0 0 60px;
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
height: var(--medium-32px);
|
|
80
|
+
max-height: var(--medium-32px);
|
|
81
|
+
min-height: var(--medium-32px);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.brand-logos sa-icon.active {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.sa-icon.logo-style > svg {
|
|
89
|
+
width: fit-content;
|
|
90
|
+
height: fit-content;
|
|
91
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- card-carousel.component.html -->
|
|
2
|
+
<div class="carousel-container">
|
|
3
|
+
<div class="carousel-top-wrapper">
|
|
4
|
+
<div class="controls">
|
|
5
|
+
@if (showIndicators) {
|
|
6
|
+
<div class="dots">
|
|
7
|
+
@for (card of cards; track card.id; let i = $index) {
|
|
8
|
+
<span class="dot" [class.active]="i === currentIndex" (click)="selectCard(i)"></span>
|
|
9
|
+
}
|
|
10
|
+
</div>
|
|
11
|
+
}
|
|
12
|
+
@if (showNavigationArrows) {
|
|
13
|
+
<div class="arrow-controls">
|
|
14
|
+
<sa-icon [icon]="'leftChevronCircle'" size="24" (click)="prev()"></sa-icon>
|
|
15
|
+
<sa-icon [icon]="'rightChevronCircle'" size="24" (click)="next()"></sa-icon>
|
|
16
|
+
</div>
|
|
17
|
+
}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="card-container">
|
|
21
|
+
<sa-card [customWrapperClass]="'sa-card-custom-wrapper'" [width]="'24.063rem'" [column]="false"
|
|
22
|
+
[showCardHeader]="true" [showCardBody]="true" [body]="cards[currentIndex].body"
|
|
23
|
+
[showHeaderBodyDivider]="true">
|
|
24
|
+
<sa-card-title-header>
|
|
25
|
+
<div class="sa-card-custom-header-container">
|
|
26
|
+
<sa-icon [icon]="cards[currentIndex].avatarIcon" size="50"></sa-icon>
|
|
27
|
+
<div class="sa-card-title-subtitle-container">
|
|
28
|
+
<div class="sa-card-custom-title">{{ cards[currentIndex].title }}</div>
|
|
29
|
+
<div class="sa-card-subtitle">{{ cards[currentIndex].subtitle }}</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="sa-card-titleIcon">
|
|
32
|
+
<sa-icon [icon]="cards[currentIndex].logoIcon" customClass="logo-style"></sa-icon>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</sa-card-title-header>
|
|
36
|
+
</sa-card>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
@if (showBrandFooter) {
|
|
41
|
+
<div class="brand-logos-container">
|
|
42
|
+
<div class="brand-logos">
|
|
43
|
+
@for (logo of visibleLogos; track $index) {
|
|
44
|
+
<sa-icon [icon]="logo.logoIcon" [class.active]="$index === 1" (click)="selectCard(logo.index)"
|
|
45
|
+
[customClass]="'logo-style'">
|
|
46
|
+
</sa-icon>
|
|
47
|
+
}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CardCarouselComponent } from './card-carousel.component';
|
|
4
|
+
|
|
5
|
+
describe('CardCarouselComponent', () => {
|
|
6
|
+
let component: CardCarouselComponent;
|
|
7
|
+
let fixture: ComponentFixture<CardCarouselComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [CardCarouselComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CardCarouselComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Component, OnInit, Input, OnDestroy, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { CardComponent } from '../card/card.component';
|
|
3
|
+
import { IconComponent } from '../icon/icon.component';
|
|
4
|
+
import { CardCustomHeaderComponent } from '../card/card-custom-header/card-custom-header.component';
|
|
5
|
+
import { CardCarousel } from '../../interfaces/card-carousel-interface';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'sa-card-carousel',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CardComponent, IconComponent, CardCustomHeaderComponent],
|
|
12
|
+
templateUrl: './card-carousel.component.html',
|
|
13
|
+
styleUrl: './card-carousel.component.css',
|
|
14
|
+
encapsulation: ViewEncapsulation.None
|
|
15
|
+
})
|
|
16
|
+
export class CardCarouselComponent implements OnInit, OnDestroy {
|
|
17
|
+
@Input() cards: CardCarousel[] = [];
|
|
18
|
+
@Input() interval: number = 5000;
|
|
19
|
+
@Input() autoPlay: boolean = true;
|
|
20
|
+
@Input() showNavigationArrows: boolean = true;
|
|
21
|
+
@Input() showIndicators: boolean = true;
|
|
22
|
+
@Input() showBrandFooter: boolean = true;
|
|
23
|
+
|
|
24
|
+
visibleLogos: (CardCarousel & { index: number })[] = [];
|
|
25
|
+
|
|
26
|
+
currentIndex: number = 0;
|
|
27
|
+
private timer: any;
|
|
28
|
+
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.updateVisibleLogos();
|
|
31
|
+
if (this.autoPlay) {
|
|
32
|
+
this.startTimer();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ngOnDestroy() {
|
|
37
|
+
this.stopTimer();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
startTimer() {
|
|
42
|
+
this.stopTimer();
|
|
43
|
+
this.timer = setInterval(() => {
|
|
44
|
+
this.next();
|
|
45
|
+
}, this.interval);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
stopTimer() {
|
|
49
|
+
if (this.timer) {
|
|
50
|
+
clearInterval(this.timer);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
resetTimer() {
|
|
55
|
+
clearInterval(this.timer);
|
|
56
|
+
if (this.autoPlay) {
|
|
57
|
+
this.startTimer();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
selectCard(index: number) {
|
|
62
|
+
this.currentIndex = index;
|
|
63
|
+
this.resetTimer();
|
|
64
|
+
this.updateVisibleLogos();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
next() {
|
|
68
|
+
this.currentIndex = (this.currentIndex + 1) % this.cards.length;
|
|
69
|
+
this.resetTimer();
|
|
70
|
+
this.updateVisibleLogos();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
prev() {
|
|
74
|
+
this.currentIndex = (this.currentIndex - 1 + this.cards.length) % this.cards.length;
|
|
75
|
+
this.resetTimer();
|
|
76
|
+
this.updateVisibleLogos();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
updateVisibleLogos() {
|
|
80
|
+
this.visibleLogos = [];
|
|
81
|
+
for (let i = -1; i <= 4; i++) {
|
|
82
|
+
const index = (this.currentIndex + i + this.cards.length) % this.cards.length;
|
|
83
|
+
this.visibleLogos.push({
|
|
84
|
+
...this.cards[index],
|
|
85
|
+
index: index
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|