@dropi/ui-components 1.0.0
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/.gitignore +13 -0
- package/CONTRIBUTING.md +188 -0
- package/MIGRATION_STEPS.md +39 -0
- package/PUBLISH_CHECKLIST.md +97 -0
- package/QUICK_START.md +108 -0
- package/README.md +146 -0
- package/jest.config.ts +21 -0
- package/ng-package.json +8 -0
- package/package.json +66 -0
- package/project.json +48 -0
- package/publish.sh +113 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.html +12 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.scss +47 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.spec.ts +122 -0
- package/src/components-source/accordion/accordion-item/accordion-item.component.ts +42 -0
- package/src/components-source/accordion/accordion.component.html +3 -0
- package/src/components-source/accordion/accordion.component.scss +5 -0
- package/src/components-source/accordion/accordion.component.spec.ts +243 -0
- package/src/components-source/accordion/accordion.component.stories.ts +111 -0
- package/src/components-source/accordion/accordion.component.ts +43 -0
- package/src/components-source/alert/alert.component.html +28 -0
- package/src/components-source/alert/alert.component.scss +154 -0
- package/src/components-source/alert/alert.component.spec.ts +185 -0
- package/src/components-source/alert/alert.component.stories.ts +310 -0
- package/src/components-source/alert/alert.component.ts +203 -0
- package/src/components-source/alert-legacy/alert.component.html +21 -0
- package/src/components-source/alert-legacy/alert.component.scss +42 -0
- package/src/components-source/alert-legacy/alert.component.spec.ts +159 -0
- package/src/components-source/alert-legacy/alert.component.ts +33 -0
- package/src/components-source/alert-modal/alert-modal.component.html +124 -0
- package/src/components-source/alert-modal/alert-modal.component.scss +203 -0
- package/src/components-source/alert-modal/alert-modal.component.spec.ts +557 -0
- package/src/components-source/alert-modal/alert-modal.component.stories.ts +295 -0
- package/src/components-source/alert-modal/alert-modal.component.ts +294 -0
- package/src/components-source/alert-modal/services/template-alert-modal.service.ts +75 -0
- package/src/components-source/badge/badge.component.html +49 -0
- package/src/components-source/badge/badge.component.scss +57 -0
- package/src/components-source/badge/badge.component.spec.ts +181 -0
- package/src/components-source/badge/badge.component.ts +21 -0
- package/src/components-source/breadcrumb/breadcrumb.component.html +5 -0
- package/src/components-source/breadcrumb/breadcrumb.component.scss +46 -0
- package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +279 -0
- package/src/components-source/breadcrumb/breadcrumb.component.ts +24 -0
- package/src/components-source/card-product/card-product.component.html +173 -0
- package/src/components-source/card-product/card-product.component.spec.ts +601 -0
- package/src/components-source/card-product/card-product.component.stories.ts +322 -0
- package/src/components-source/card-product/card-product.component.ts +1101 -0
- package/src/components-source/card-section/card-section.component.html +22 -0
- package/src/components-source/card-section/card-section.component.scss +14 -0
- package/src/components-source/card-section/card-section.component.spec.ts +333 -0
- package/src/components-source/card-section/card-section.component.stories.ts +141 -0
- package/src/components-source/card-section/card-section.component.ts +35 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.html +38 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.scss +147 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.spec.ts +555 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.stories.ts +157 -0
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +219 -0
- package/src/components-source/city-selector/city-selector.component.html +22 -0
- package/src/components-source/city-selector/city-selector.component.scss +1 -0
- package/src/components-source/city-selector/city-selector.component.spec.ts +278 -0
- package/src/components-source/city-selector/city-selector.component.stories.ts +200 -0
- package/src/components-source/city-selector/city-selector.component.ts +151 -0
- package/src/components-source/color-picker/color-picker.component.html +54 -0
- package/src/components-source/color-picker/color-picker.component.scss +203 -0
- package/src/components-source/color-picker/color-picker.component.spec.ts +148 -0
- package/src/components-source/color-picker/color-picker.component.stories.ts +70 -0
- package/src/components-source/color-picker/color-picker.component.ts +353 -0
- package/src/components-source/country-flags/country-flags.component.html +10 -0
- package/src/components-source/country-flags/country-flags.component.scss +34 -0
- package/src/components-source/country-flags/country-flags.component.spec.ts +78 -0
- package/src/components-source/country-flags/country-flags.component.ts +18 -0
- package/src/components-source/date-picker/date-picker.component.html +35 -0
- package/src/components-source/date-picker/date-picker.component.scss +388 -0
- package/src/components-source/date-picker/date-picker.component.spec.ts +510 -0
- package/src/components-source/date-picker/date-picker.component.stories.ts +444 -0
- package/src/components-source/date-picker/date-picker.component.ts +313 -0
- package/src/components-source/date-picker/date-picker.stories.spec.ts +150 -0
- package/src/components-source/date-picker-range/date-picker-range.component.html +45 -0
- package/src/components-source/date-picker-range/date-picker-range.component.scss +229 -0
- package/src/components-source/date-picker-range/date-picker-range.component.spec.ts +555 -0
- package/src/components-source/date-picker-range/date-picker-range.component.ts +254 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.html +17 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.scss +58 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.spec.ts +403 -0
- package/src/components-source/dropi-avatars/dropi-avatars.component.ts +24 -0
- package/src/components-source/dropi-badge/dropi-badge.component.html +12 -0
- package/src/components-source/dropi-badge/dropi-badge.component.scss +50 -0
- package/src/components-source/dropi-badge/dropi-badge.component.spec.ts +108 -0
- package/src/components-source/dropi-badge/dropi-badge.component.stories.ts +140 -0
- package/src/components-source/dropi-badge/dropi-badge.component.ts +39 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.html +67 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.scss +46 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.spec.ts +170 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.stories.ts +203 -0
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +204 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +65 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.scss +65 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +125 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +38 -0
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +133 -0
- package/src/components-source/dropi-button/dropi-button.component.html +37 -0
- package/src/components-source/dropi-button/dropi-button.component.scss +266 -0
- package/src/components-source/dropi-button/dropi-button.component.spec.ts +264 -0
- package/src/components-source/dropi-button/dropi-button.component.stories.ts +221 -0
- package/src/components-source/dropi-button/dropi-button.component.ts +82 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.html +24 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.scss +85 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.spec.ts +157 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.stories.ts +209 -0
- package/src/components-source/dropi-card-checkbox/dropi-card-checkbox.component.ts +41 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.html +57 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.scss +156 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.spec.ts +224 -0
- package/src/components-source/dropi-carousel/dropi-carousel.component.ts +266 -0
- package/src/components-source/dropi-carousel/dropi-carousel.stories.ts +365 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.css +39 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.html +18 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.spec.ts +155 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.stories.ts +101 -0
- package/src/components-source/dropi-checkbox/dropi-checkbox.component.ts +25 -0
- package/src/components-source/dropi-chips/dropi-chips.component.html +10 -0
- package/src/components-source/dropi-chips/dropi-chips.component.scss +54 -0
- package/src/components-source/dropi-chips/dropi-chips.component.spec.ts +356 -0
- package/src/components-source/dropi-chips/dropi-chips.component.stories.ts +275 -0
- package/src/components-source/dropi-chips/dropi-chips.component.ts +100 -0
- package/src/components-source/dropi-country-selector/countries.data.ts +239 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.html +59 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.scss +126 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.spec.ts +244 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.stories.ts +117 -0
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +179 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.html +23 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.scss +88 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.spec.ts +84 -0
- package/src/components-source/dropi-drawer/dropi-drawer.component.ts +90 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.html +30 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.scss +58 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.spec.ts +213 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.stories.ts +143 -0
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +53 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.html +23 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.scss +21 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.spec.ts +240 -0
- package/src/components-source/dropi-favorite-button/dropi-favorite-button.component.ts +31 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.html +154 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.scss +118 -0
- package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +72 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.coment.stories.ts +179 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.html +111 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.scss +90 -0
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +172 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.html +42 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.scss +31 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.spec.ts +398 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.stories.ts +139 -0
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +329 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.html +51 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.scss +60 -0
- package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +84 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.html +77 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.scss +85 -0
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +35 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.html +38 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +59 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.spec.ts +214 -0
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.ts +65 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.html +54 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.scss +210 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.spec.ts +145 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +76 -0
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.stories.ts +267 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.html +17 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.scss +82 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.spec.ts +152 -0
- package/src/components-source/dropi-languages-selector/dropi-languages-selector.component.ts +41 -0
- package/src/components-source/dropi-logo/dropi-logo.component.html +3 -0
- package/src/components-source/dropi-logo/dropi-logo.component.scss +20 -0
- package/src/components-source/dropi-logo/dropi-logo.component.spec.ts +274 -0
- package/src/components-source/dropi-logo/dropi-logo.component.ts +24 -0
- package/src/components-source/dropi-modal/dropi-modal-stack.service.ts +75 -0
- package/src/components-source/dropi-modal/dropi-modal.component.html +55 -0
- package/src/components-source/dropi-modal/dropi-modal.component.scss +274 -0
- package/src/components-source/dropi-modal/dropi-modal.component.spec.ts +46 -0
- package/src/components-source/dropi-modal/dropi-modal.component.stories.ts +392 -0
- package/src/components-source/dropi-modal/dropi-modal.component.ts +392 -0
- package/src/components-source/dropi-modal/p-template.directive.ts +11 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.html +41 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.scss +227 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.spec.ts +110 -0
- package/src/components-source/dropi-navbar/dropi-navbar.component.ts +52 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.html +64 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.scss +43 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.spec.ts +285 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.stories.ts +345 -0
- package/src/components-source/dropi-paginator/dropi-paginator.component.ts +85 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +93 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.scss +224 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.spec.ts +376 -0
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +203 -0
- package/src/components-source/dropi-phone-input/numeric-input.directive.ts +17 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.html +8 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.scss +33 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.spec.ts +225 -0
- package/src/components-source/dropi-radio-button/dropi-radio-button.component.ts +48 -0
- package/src/components-source/dropi-search/dropi-search.component.html +124 -0
- package/src/components-source/dropi-search/dropi-search.component.scss +116 -0
- package/src/components-source/dropi-search/dropi-search.component.spec.ts +483 -0
- package/src/components-source/dropi-search/dropi-search.component.stories.ts +267 -0
- package/src/components-source/dropi-search/dropi-search.component.ts +230 -0
- package/src/components-source/dropi-select/dropi-select.component.html +158 -0
- package/src/components-source/dropi-select/dropi-select.component.scss +275 -0
- package/src/components-source/dropi-select/dropi-select.component.spec.ts +386 -0
- package/src/components-source/dropi-select/dropi-select.component.stories.ts +686 -0
- package/src/components-source/dropi-select/dropi-select.component.ts +465 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.html +10 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.scss +28 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.spec.ts +273 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.stories.ts +145 -0
- package/src/components-source/dropi-skeleton/dropi-skeleton.component.ts +30 -0
- package/src/components-source/dropi-steps/dropi-steps.component.html +29 -0
- package/src/components-source/dropi-steps/dropi-steps.component.scss +110 -0
- package/src/components-source/dropi-steps/dropi-steps.component.spec.ts +228 -0
- package/src/components-source/dropi-steps/dropi-steps.component.stories.ts +231 -0
- package/src/components-source/dropi-steps/dropi-steps.component.ts +98 -0
- package/src/components-source/dropi-switch/dropi-switch.component.html +4 -0
- package/src/components-source/dropi-switch/dropi-switch.component.scss +50 -0
- package/src/components-source/dropi-switch/dropi-switch.component.spec.ts +105 -0
- package/src/components-source/dropi-switch/dropi-switch.component.stories.ts +106 -0
- package/src/components-source/dropi-switch/dropi-switch.component.ts +22 -0
- package/src/components-source/dropi-table/dropi-table.component.html +395 -0
- package/src/components-source/dropi-table/dropi-table.component.scss +506 -0
- package/src/components-source/dropi-table/dropi-table.component.spec.ts +578 -0
- package/src/components-source/dropi-table/dropi-table.component.stories.ts +313 -0
- package/src/components-source/dropi-table/dropi-table.component.ts +580 -0
- package/src/components-source/dropi-tag/dropi-tag.component.html +17 -0
- package/src/components-source/dropi-tag/dropi-tag.component.scss +50 -0
- package/src/components-source/dropi-tag/dropi-tag.component.spec.ts +267 -0
- package/src/components-source/dropi-tag/dropi-tag.component.stories.ts +290 -0
- package/src/components-source/dropi-tag/dropi-tag.component.ts +92 -0
- package/src/components-source/dropi-text-area/droip-text-area.component.stories.ts +138 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.html +63 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.scss +106 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.spec.ts +507 -0
- package/src/components-source/dropi-text-area/dropi-text-area.component.ts +80 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.html +70 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.scss +250 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.spec.ts +423 -0
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +153 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.html +20 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.scss +63 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.spec.ts +121 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.ts +43 -0
- package/src/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.stories.ts +125 -0
- package/src/components-source/empty-state/empty-state.component.html +30 -0
- package/src/components-source/empty-state/empty-state.component.scss +76 -0
- package/src/components-source/empty-state/empty-state.component.spec.ts +244 -0
- package/src/components-source/empty-state/empty-state.component.stories.ts +198 -0
- package/src/components-source/empty-state/empty-state.component.ts +34 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.html +81 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.scss +86 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.spec.ts +27 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.stories.ts +149 -0
- package/src/components-source/file-upload-progress-bar/file-upload-progress-bar.component.ts +89 -0
- package/src/components-source/foundations/dropi-border-radius-demo/dropi-border-radius-demo.component.scss +32 -0
- package/src/components-source/foundations/dropi-border-radius-demo/dropi-border-radius-demo.component.ts +17 -0
- package/src/components-source/foundations/foundations.component.html +183 -0
- package/src/components-source/foundations/foundations.component.scss +31 -0
- package/src/components-source/foundations/foundations.component.ts +26 -0
- package/src/components-source/icon/icon-names.const.ts +270 -0
- package/src/components-source/icon/icon.component.html +3 -0
- package/src/components-source/icon/icon.component.scss +4 -0
- package/src/components-source/icon/icon.component.spec.ts +304 -0
- package/src/components-source/icon/icon.component.ts +53 -0
- package/src/components-source/index.ts +89 -0
- package/src/components-source/input/input.component.html +97 -0
- package/src/components-source/input/input.component.scss +149 -0
- package/src/components-source/input/input.component.spec.ts +243 -0
- package/src/components-source/input/input.component.stories.ts +269 -0
- package/src/components-source/input/input.component.ts +119 -0
- package/src/components-source/lottie-loader/lottie-loader.component.html +16 -0
- package/src/components-source/lottie-loader/lottie-loader.component.scss +32 -0
- package/src/components-source/lottie-loader/lottie-loader.component.spec.ts +103 -0
- package/src/components-source/lottie-loader/lottie-loader.component.ts +20 -0
- package/src/components-source/otp-send-code/mock-otp-services.ts +214 -0
- package/src/components-source/otp-send-code/otp-send-code.component.html +151 -0
- package/src/components-source/otp-send-code/otp-send-code.component.scss +156 -0
- package/src/components-source/otp-send-code/otp-send-code.component.spec.ts +419 -0
- package/src/components-source/otp-send-code/otp-send-code.component.stories.ts +190 -0
- package/src/components-source/otp-send-code/otp-send-code.component.ts +659 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.html +107 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.scss +280 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.spec.ts +243 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.stories.ts +313 -0
- package/src/components-source/radio-selection-list/radio-selection-list.component.ts +143 -0
- package/src/components-source/read-more/read-more.component.html +14 -0
- package/src/components-source/read-more/read-more.component.scss +16 -0
- package/src/components-source/read-more/read-more.component.spec.ts +272 -0
- package/src/components-source/read-more/read-more.component.stories.ts +131 -0
- package/src/components-source/read-more/read-more.component.ts +88 -0
- package/src/components-source/sidebar/sidebar.component.html +42 -0
- package/src/components-source/sidebar/sidebar.component.scss +70 -0
- package/src/components-source/sidebar/sidebar.component.spec.ts +354 -0
- package/src/components-source/sidebar/sidebar.component.stories.ts +145 -0
- package/src/components-source/sidebar/sidebar.component.ts +105 -0
- package/src/components-source/simple-stepper/simple-stepper.component.html +17 -0
- package/src/components-source/simple-stepper/simple-stepper.component.scss +117 -0
- package/src/components-source/simple-stepper/simple-stepper.component.spec.ts +348 -0
- package/src/components-source/simple-stepper/simple-stepper.component.stories.ts +104 -0
- package/src/components-source/simple-stepper/simple-stepper.component.ts +69 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.html +192 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.scss +15 -0
- package/src/components-source/storybook-doc-components/avatars-storybook/avatars-storybook.component.ts +17 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.html +22 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/border-radius-storybook/border-radius-storybook.component.ts +54 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.css +81 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.html +143 -0
- package/src/components-source/storybook-doc-components/breakpoints-and-grids-storybook/breakpoints-and-grids-storybook.component.ts +97 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.css +10 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.html +63 -0
- package/src/components-source/storybook-doc-components/colors-storybook/colors-storybook.component.ts +542 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.html +132 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.scss +15 -0
- package/src/components-source/storybook-doc-components/dropi-modal/dropi-modal.component.ts +67 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.html +156 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.scss +13 -0
- package/src/components-source/storybook-doc-components/dropi-toast/dropi-toast.component.ts +55 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.html +99 -0
- package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.ts +19 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.css +82 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.html +111 -0
- package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.ts +196 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-foundations.component.ts +19 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/logo-storybook/logo-storybook.component.html +104 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.css +0 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.html +218 -0
- package/src/components-source/storybook-doc-components/lustration-storybook/lustration-storybook.component.ts +20 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.html +21 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/shadow-storybook/shadow-storybook.component.ts +66 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.html +33 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.scss +0 -0
- package/src/components-source/storybook-doc-components/spacing-storybook/spacing-storybook.component.ts +37 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.html +74 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.scss +103 -0
- package/src/components-source/storybook-doc-components/story-page/story-page.component.ts +424 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.html +35 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.scss +64 -0
- package/src/components-source/storybook-doc-components/template-breakpoint-storybook/template-breakpoint-storybook.component.ts +71 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.html +44 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.scss +270 -0
- package/src/components-source/storybook-doc-components/tillte-table-documentation/tillte-table-documentation.component.ts +153 -0
- package/src/components-source/tabs/tabs.component.html +26 -0
- package/src/components-source/tabs/tabs.component.scss +62 -0
- package/src/components-source/tabs/tabs.component.spec.ts +212 -0
- package/src/components-source/tabs/tabs.component.stories.ts +203 -0
- package/src/components-source/tabs/tabs.component.ts +138 -0
- package/src/components-source/tag-type-product/tag-type-product.component.html +1 -0
- package/src/components-source/tag-type-product/tag-type-product.component.scss +10 -0
- package/src/components-source/tag-type-product/tag-type-product.component.spec.ts +38 -0
- package/src/components-source/tag-type-product/tag-type-product.component.ts +9 -0
- package/src/components-source/toast/toast.component.html +37 -0
- package/src/components-source/toast/toast.component.scss +142 -0
- package/src/components-source/toast/toast.component.spec.ts +368 -0
- package/src/components-source/toast/toast.component.ts +59 -0
- package/src/components-source/toast/toast.stories.ts +69 -0
- package/src/components-source/tooltip/tooltip.component.html +46 -0
- package/src/components-source/tooltip/tooltip.component.scss +44 -0
- package/src/components-source/tooltip/tooltip.component.spec.ts +327 -0
- package/src/components-source/tooltip/tooltip.component.ts +24 -0
- package/src/components-source/ui-dropi.module.ts +125 -0
- package/src/components-source/ui-inventory.json +1138 -0
- package/src/components-source/vertical-steps/vertical-steps.component.html +35 -0
- package/src/components-source/vertical-steps/vertical-steps.component.scss +143 -0
- package/src/components-source/vertical-steps/vertical-steps.component.spec.ts +121 -0
- package/src/components-source/vertical-steps/vertical-steps.component.stories.ts +216 -0
- package/src/components-source/vertical-steps/vertical-steps.component.ts +151 -0
- package/src/index.ts +31 -0
- package/src/lib/bootstrap.ts +28 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.html +1 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.scss +0 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.spec.ts +21 -0
- package/src/lib/dropi-ui-elements/dropi-ui-elements.component.ts +9 -0
- package/src/lib/elements-registry.ts +66 -0
- package/src/lib/elements.module.ts +22 -0
- package/src/styles.scss +152 -0
- package/src/test-setup.ts +6 -0
- package/tsconfig.json +28 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +12 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { ChangeDetectorRef, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { DropiSkeletonComponent } from './dropi-skeleton.component';
|
|
4
|
+
|
|
5
|
+
describe('DropiSkeletonComponent', () => {
|
|
6
|
+
let component: DropiSkeletonComponent;
|
|
7
|
+
let fixture: ComponentFixture<DropiSkeletonComponent>;
|
|
8
|
+
let changeDetectorRef: ChangeDetectorRef;
|
|
9
|
+
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
const mockChangeDetectorRef = {
|
|
12
|
+
detectChanges: jest.fn(),
|
|
13
|
+
markForCheck: jest.fn(),
|
|
14
|
+
detach: jest.fn(),
|
|
15
|
+
reattach: jest.fn(),
|
|
16
|
+
checkNoChanges: jest.fn(),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
await TestBed.configureTestingModule({
|
|
20
|
+
imports: [DropiSkeletonComponent],
|
|
21
|
+
providers: [{ provide: ChangeDetectorRef, useValue: mockChangeDetectorRef }],
|
|
22
|
+
}).compileComponents();
|
|
23
|
+
|
|
24
|
+
fixture = TestBed.createComponent(DropiSkeletonComponent);
|
|
25
|
+
component = fixture.componentInstance;
|
|
26
|
+
changeDetectorRef = TestBed.inject(ChangeDetectorRef);
|
|
27
|
+
fixture.detectChanges();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe('Inicialización del componente', () => {
|
|
31
|
+
it('should create', () => {
|
|
32
|
+
expect(component).toBeTruthy();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should initialize with default values', () => {
|
|
36
|
+
expect(component.width).toBe('');
|
|
37
|
+
expect(component.height).toBe('');
|
|
38
|
+
expect(component.radius).toBe('8px');
|
|
39
|
+
expect(component.baseColor).toBe('#f6f7f8');
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
describe('Propiedades de entrada', () => {
|
|
44
|
+
it('should accept width input', () => {
|
|
45
|
+
component.width = '200px';
|
|
46
|
+
expect(component.width).toBe('200px');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should accept height input', () => {
|
|
50
|
+
component.height = '100px';
|
|
51
|
+
expect(component.height).toBe('100px');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should accept radius input', () => {
|
|
55
|
+
component.radius = '12px';
|
|
56
|
+
expect(component.radius).toBe('12px');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should accept baseColor input', () => {
|
|
60
|
+
component.baseColor = '#ffffff';
|
|
61
|
+
expect(component.baseColor).toBe('#ffffff');
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('backgroundStyle getter', () => {
|
|
66
|
+
it('should generate correct background style with hex color', () => {
|
|
67
|
+
component.baseColor = '#ff0000';
|
|
68
|
+
const expectedStyle = `linear-gradient(
|
|
69
|
+
to right, #ff0000 8%, #e3e7efe7 28%, #ff0000 77%
|
|
70
|
+
)`;
|
|
71
|
+
|
|
72
|
+
expect(component.backgroundStyle).toBe(expectedStyle);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('should generate correct background style with CSS variable', () => {
|
|
76
|
+
component.baseColor = 'primary-color';
|
|
77
|
+
const expectedStyle = `linear-gradient(
|
|
78
|
+
to right, var(--primary-color) 8%, #e3e7efe7 28%, var(--primary-color) 77%
|
|
79
|
+
)`;
|
|
80
|
+
|
|
81
|
+
expect(component.backgroundStyle).toBe(expectedStyle);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('should handle default baseColor', () => {
|
|
85
|
+
// Using default value
|
|
86
|
+
const expectedStyle = `linear-gradient(
|
|
87
|
+
to right, #f6f7f8 8%, #e3e7efe7 28%, #f6f7f8 77%
|
|
88
|
+
)`;
|
|
89
|
+
|
|
90
|
+
expect(component.backgroundStyle).toBe(expectedStyle);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
describe('ngOnChanges', () => {
|
|
95
|
+
it('should call detectChanges when baseColor changes (not first change)', () => {
|
|
96
|
+
// Reset the spy before the test
|
|
97
|
+
jest.clearAllMocks();
|
|
98
|
+
|
|
99
|
+
const changes: any = {
|
|
100
|
+
baseColor: {
|
|
101
|
+
currentValue: '#new-color',
|
|
102
|
+
previousValue: '#old-color',
|
|
103
|
+
firstChange: false,
|
|
104
|
+
isFirstChange: () => false,
|
|
105
|
+
},
|
|
106
|
+
firstChange: false, // Add this property directly
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// Spy on the component's cdRef specifically
|
|
110
|
+
const cdRefSpy = jest.spyOn((component as any).cdRef, 'detectChanges');
|
|
111
|
+
|
|
112
|
+
component.ngOnChanges(changes);
|
|
113
|
+
|
|
114
|
+
expect(cdRefSpy).toHaveBeenCalled();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('should not call detectChanges on first change of baseColor', () => {
|
|
118
|
+
const changes: SimpleChanges = {
|
|
119
|
+
baseColor: {
|
|
120
|
+
currentValue: '#new-color',
|
|
121
|
+
previousValue: undefined,
|
|
122
|
+
firstChange: true,
|
|
123
|
+
isFirstChange: () => true,
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
component.ngOnChanges(changes);
|
|
128
|
+
|
|
129
|
+
expect(changeDetectorRef.detectChanges).not.toHaveBeenCalled();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('should not call detectChanges for other property changes', () => {
|
|
133
|
+
const changes: SimpleChanges = {
|
|
134
|
+
width: {
|
|
135
|
+
currentValue: '200px',
|
|
136
|
+
previousValue: '100px',
|
|
137
|
+
firstChange: false,
|
|
138
|
+
isFirstChange: () => false,
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
component.ngOnChanges(changes);
|
|
143
|
+
|
|
144
|
+
expect(changeDetectorRef.detectChanges).not.toHaveBeenCalled();
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('should handle multiple changes with baseColor not first change', () => {
|
|
148
|
+
// Reset the spy before the test
|
|
149
|
+
jest.clearAllMocks();
|
|
150
|
+
|
|
151
|
+
const changes: any = {
|
|
152
|
+
baseColor: {
|
|
153
|
+
currentValue: '#new-color',
|
|
154
|
+
previousValue: '#old-color',
|
|
155
|
+
firstChange: false,
|
|
156
|
+
isFirstChange: () => false,
|
|
157
|
+
},
|
|
158
|
+
width: {
|
|
159
|
+
currentValue: '200px',
|
|
160
|
+
previousValue: '100px',
|
|
161
|
+
firstChange: false,
|
|
162
|
+
isFirstChange: () => false,
|
|
163
|
+
},
|
|
164
|
+
firstChange: false, // Add this property directly
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// Spy on the component's cdRef specifically
|
|
168
|
+
const cdRefSpy = jest.spyOn((component as any).cdRef, 'detectChanges');
|
|
169
|
+
|
|
170
|
+
component.ngOnChanges(changes);
|
|
171
|
+
|
|
172
|
+
expect(cdRefSpy).toHaveBeenCalled();
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
describe('Renderizado', () => {
|
|
177
|
+
it('should apply width style when provided', () => {
|
|
178
|
+
component.width = '300px';
|
|
179
|
+
fixture.detectChanges();
|
|
180
|
+
|
|
181
|
+
const skeletonElement = fixture.nativeElement.querySelector('.skeleton');
|
|
182
|
+
expect(skeletonElement?.style.width).toBe('300px');
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it('should apply height style when provided', () => {
|
|
186
|
+
component.height = '150px';
|
|
187
|
+
fixture.detectChanges();
|
|
188
|
+
|
|
189
|
+
const skeletonElement = fixture.nativeElement.querySelector('.skeleton');
|
|
190
|
+
expect(skeletonElement?.style.height).toBe('150px');
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it('should apply border-radius style', () => {
|
|
194
|
+
component.radius = '16px';
|
|
195
|
+
fixture.detectChanges();
|
|
196
|
+
|
|
197
|
+
const skeletonElement = fixture.nativeElement.querySelector('.skeleton');
|
|
198
|
+
expect(skeletonElement?.style.borderRadius).toBe('16px');
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
describe('Casos edge', () => {
|
|
203
|
+
it('should handle empty string values', () => {
|
|
204
|
+
component.width = '';
|
|
205
|
+
component.height = '';
|
|
206
|
+
component.radius = '';
|
|
207
|
+
component.baseColor = '';
|
|
208
|
+
|
|
209
|
+
expect(() => component.backgroundStyle).not.toThrow();
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('should handle null values gracefully', () => {
|
|
213
|
+
component.baseColor = null as any;
|
|
214
|
+
|
|
215
|
+
expect(() => component.backgroundStyle).toThrow();
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it('should handle undefined values gracefully', () => {
|
|
219
|
+
component.baseColor = undefined as any;
|
|
220
|
+
|
|
221
|
+
expect(() => component.backgroundStyle).toThrow();
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
describe('Integración completa', () => {
|
|
226
|
+
it('should handle complete skeleton configuration', () => {
|
|
227
|
+
// Set all properties
|
|
228
|
+
component.width = '250px';
|
|
229
|
+
component.height = '120px';
|
|
230
|
+
component.radius = '10px';
|
|
231
|
+
component.baseColor = '#e0e0e0';
|
|
232
|
+
|
|
233
|
+
fixture.detectChanges();
|
|
234
|
+
|
|
235
|
+
// Verify all properties are set correctly
|
|
236
|
+
expect(component.width).toBe('250px');
|
|
237
|
+
expect(component.height).toBe('120px');
|
|
238
|
+
expect(component.radius).toBe('10px');
|
|
239
|
+
expect(component.baseColor).toBe('#e0e0e0');
|
|
240
|
+
|
|
241
|
+
// Verify backgroundStyle is generated correctly
|
|
242
|
+
const expectedStyle = `linear-gradient(
|
|
243
|
+
to right, #e0e0e0 8%, #e3e7efe7 28%, #e0e0e0 77%
|
|
244
|
+
)`;
|
|
245
|
+
expect(component.backgroundStyle).toBe(expectedStyle);
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it('should handle skeleton with CSS variable color', () => {
|
|
249
|
+
component.width = '100%';
|
|
250
|
+
component.height = '40px';
|
|
251
|
+
component.baseColor = 'skeleton-base';
|
|
252
|
+
|
|
253
|
+
fixture.detectChanges();
|
|
254
|
+
|
|
255
|
+
const expectedStyle = `linear-gradient(
|
|
256
|
+
to right, var(--skeleton-base) 8%, #e3e7efe7 28%, var(--skeleton-base) 77%
|
|
257
|
+
)`;
|
|
258
|
+
expect(component.backgroundStyle).toBe(expectedStyle);
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('should handle responsive skeleton', () => {
|
|
262
|
+
component.width = '100%';
|
|
263
|
+
component.height = 'auto';
|
|
264
|
+
component.radius = '4px';
|
|
265
|
+
|
|
266
|
+
fixture.detectChanges();
|
|
267
|
+
|
|
268
|
+
expect(component.width).toBe('100%');
|
|
269
|
+
expect(component.height).toBe('auto');
|
|
270
|
+
expect(component.radius).toBe('4px');
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
|
|
2
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import '@dotlottie/player-component';
|
|
4
|
+
import { action } from '@storybook/addon-actions';
|
|
5
|
+
import { DropiSkeletonComponent } from './dropi-skeleton.component';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* # Skeleton Component
|
|
9
|
+
*
|
|
10
|
+
* A placeholder loading component that mimics content structure while data is being fetched.
|
|
11
|
+
* Skeletons improve perceived performance by showing users the layout before content loads.
|
|
12
|
+
*
|
|
13
|
+
* ## Features
|
|
14
|
+
* - **Customizable dimensions**: Set width, height, and border radius
|
|
15
|
+
* - **Animated**: Subtle shimmer animation indicates loading state
|
|
16
|
+
* - **Flexible**: Adapts to any content shape
|
|
17
|
+
*
|
|
18
|
+
* ## Usage
|
|
19
|
+
* ```html
|
|
20
|
+
* <app-dropi-skeleton
|
|
21
|
+
* width="100%"
|
|
22
|
+
* height="2rem"
|
|
23
|
+
* radius="8px">
|
|
24
|
+
* </app-dropi-skeleton>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
const meta: Meta<DropiSkeletonComponent> = {
|
|
28
|
+
title: 'UI Dropi/Skeleton',
|
|
29
|
+
component: DropiSkeletonComponent,
|
|
30
|
+
tags: ['autodocs'],
|
|
31
|
+
parameters: {
|
|
32
|
+
layout: 'centered',
|
|
33
|
+
docs: {
|
|
34
|
+
description: {
|
|
35
|
+
component: `
|
|
36
|
+
A placeholder loading component that mimics content structure while data is being fetched.
|
|
37
|
+
Skeletons improve perceived performance by showing users the layout before content loads.
|
|
38
|
+
|
|
39
|
+
### Key Features
|
|
40
|
+
- **Customizable dimensions**: Set width, height, and border radius
|
|
41
|
+
- **Animated**: Subtle shimmer animation indicates loading state
|
|
42
|
+
- **Flexible**: Adapts to any content shape
|
|
43
|
+
`,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
decorators: [
|
|
48
|
+
moduleMetadata({
|
|
49
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
argTypes: {
|
|
53
|
+
width: {
|
|
54
|
+
control: 'text',
|
|
55
|
+
description: 'Width of the skeleton element (CSS value)',
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: 'string' },
|
|
58
|
+
defaultValue: { summary: '100%' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
height: {
|
|
62
|
+
control: 'text',
|
|
63
|
+
description: 'Height of the skeleton element (CSS value)',
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: 'string' },
|
|
66
|
+
defaultValue: { summary: '1rem' },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
radius: {
|
|
70
|
+
control: 'text',
|
|
71
|
+
description: 'Border radius of the skeleton element',
|
|
72
|
+
table: {
|
|
73
|
+
type: { summary: 'string' },
|
|
74
|
+
defaultValue: { summary: '4px' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default meta;
|
|
81
|
+
type Story = StoryObj<DropiSkeletonComponent>;
|
|
82
|
+
|
|
83
|
+
/** Default skeleton with standard dimensions */
|
|
84
|
+
export const Default: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
width: '30rem',
|
|
87
|
+
height: '2rem',
|
|
88
|
+
radius: '',
|
|
89
|
+
},
|
|
90
|
+
parameters: {
|
|
91
|
+
docs: {
|
|
92
|
+
description: {
|
|
93
|
+
story: 'Default skeleton with standard dimensions. Use as placeholder for text content.',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Skeleton with rounded corners */
|
|
100
|
+
export const WithRadius: Story = {
|
|
101
|
+
args: {
|
|
102
|
+
width: '30rem',
|
|
103
|
+
height: '2rem',
|
|
104
|
+
radius: '10px',
|
|
105
|
+
},
|
|
106
|
+
parameters: {
|
|
107
|
+
docs: {
|
|
108
|
+
description: {
|
|
109
|
+
story: 'Skeleton with rounded corners. Use for buttons or pill-shaped elements.',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** Skeleton with sharp corners */
|
|
116
|
+
export const NoRadius: Story = {
|
|
117
|
+
args: {
|
|
118
|
+
width: '30rem',
|
|
119
|
+
height: '2rem',
|
|
120
|
+
radius: '0px',
|
|
121
|
+
},
|
|
122
|
+
parameters: {
|
|
123
|
+
docs: {
|
|
124
|
+
description: {
|
|
125
|
+
story: 'Skeleton with sharp corners. Use for rectangular content areas.',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** Skeleton with custom background color */
|
|
132
|
+
export const WithCustomBackgroundColor: Story = {
|
|
133
|
+
args: {
|
|
134
|
+
width: '30rem',
|
|
135
|
+
height: '2rem',
|
|
136
|
+
baseColor: 'Gray-Gray-600',
|
|
137
|
+
},
|
|
138
|
+
parameters: {
|
|
139
|
+
docs: {
|
|
140
|
+
description: {
|
|
141
|
+
story: 'Skeleton with custom background color for different visual contexts.',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { ChangeDetectorRef, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-dropi-skeleton',
|
|
6
|
+
templateUrl: './dropi-skeleton.component.html',
|
|
7
|
+
styleUrls: ['./dropi-skeleton.component.scss'],
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule],
|
|
10
|
+
})
|
|
11
|
+
export class DropiSkeletonComponent implements OnChanges {
|
|
12
|
+
@Input() width: string = '';
|
|
13
|
+
@Input() height: string = '';
|
|
14
|
+
@Input() radius: string = '8px';
|
|
15
|
+
@Input() baseColor: string = '#f6f7f8';
|
|
16
|
+
|
|
17
|
+
constructor(private readonly cdRef: ChangeDetectorRef) {}
|
|
18
|
+
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
20
|
+
if (changes['baseColor'] && !changes.firstChange) this.cdRef.detectChanges();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get backgroundStyle(): string {
|
|
24
|
+
const color = this.baseColor.startsWith('#') ? this.baseColor : `var(--${this.baseColor})`;
|
|
25
|
+
|
|
26
|
+
return `linear-gradient(
|
|
27
|
+
to right, ${color} 8%, #e3e7efe7 28%, ${color} 77%
|
|
28
|
+
)`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<div class="stepper-container">
|
|
2
|
+
<ng-container *ngFor="let step of steps; let i = index">
|
|
3
|
+
<div
|
|
4
|
+
class="step"
|
|
5
|
+
[ngClass]="getStepState(i)"
|
|
6
|
+
[ngStyle]="{ flex: i > 0 && i < steps.length - 1 ? 2 : 1 }"
|
|
7
|
+
>
|
|
8
|
+
<div class="line" *ngIf="i !== 0"></div>
|
|
9
|
+
<div class="circle-container">
|
|
10
|
+
<div class="circle">
|
|
11
|
+
<span class="Label-S" *ngIf="showNumberOfStep">
|
|
12
|
+
{{ i + 1 }}
|
|
13
|
+
</span>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="steps-container">
|
|
17
|
+
<p class="Label-M" *ngIf="step.title">
|
|
18
|
+
{{ step.title | translate }}
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p class="Body-S-Regular" *ngIf="step.description">
|
|
22
|
+
{{ step.description | translate }}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="line" *ngIf="i !== steps.length - 1"></div>
|
|
27
|
+
</div>
|
|
28
|
+
</ng-container>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.stepper-container {
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-wrap: nowrap;
|
|
13
|
+
margin-bottom: var(--Size-4);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.step {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
align-items: center;
|
|
20
|
+
flex-wrap: nowrap;
|
|
21
|
+
|
|
22
|
+
&.focus {
|
|
23
|
+
.circle {
|
|
24
|
+
border-color: var(--Primary-Primary-500, #f49a3d);
|
|
25
|
+
|
|
26
|
+
span {
|
|
27
|
+
color: var(--Primary-Primary-500, #f49a3d);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.line {
|
|
32
|
+
background-color: var(--Primary-Primary-500, #f49a3d);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.step-label {
|
|
36
|
+
color: var(--Gray-Gray-700, #32394d);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.completed {
|
|
41
|
+
.circle {
|
|
42
|
+
background-color: var(--Primary-Primary-500, #f49a3d);
|
|
43
|
+
border-color: var(--Primary-Primary-500, #f49a3d);
|
|
44
|
+
|
|
45
|
+
span {
|
|
46
|
+
color: var(--Neutral-White, #fff);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.line {
|
|
51
|
+
background-color: var(--Primary-Primary-500, #f49a3d);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.step-label {
|
|
55
|
+
color: var(--Gray-Gray-700, #32394d);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.line {
|
|
61
|
+
width: 100%;
|
|
62
|
+
flex: 1;
|
|
63
|
+
height: 2px;
|
|
64
|
+
background-color: var(--Gray-Gray-200, #c3c9d9);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.circle-container {
|
|
68
|
+
position: relative;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.circle {
|
|
76
|
+
width: 24px;
|
|
77
|
+
height: 24px;
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
border: 2px solid var(--Gray-Gray-200);
|
|
80
|
+
background-color: transparent;
|
|
81
|
+
display: grid;
|
|
82
|
+
place-items: center;
|
|
83
|
+
|
|
84
|
+
span {
|
|
85
|
+
color: var(--Gray-Gray-200, #c3c9d9);
|
|
86
|
+
text-align: center;
|
|
87
|
+
line-height: 1;
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.steps-container {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: calc(100% + var(--Size-1));
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
gap: var(--Size-2);
|
|
98
|
+
width: max-content;
|
|
99
|
+
width: 12vw;
|
|
100
|
+
min-width: 100px;
|
|
101
|
+
max-width: 180px;
|
|
102
|
+
text-align: center;
|
|
103
|
+
p {
|
|
104
|
+
margin: 0 !important;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.line.invisible {
|
|
109
|
+
background-color: transparent;
|
|
110
|
+
}
|