@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,274 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dropi-modal-root {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dropi-modal-root--open {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
pointer-events: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dropi-modal-root--closing {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dropi-modal-close {
|
|
26
|
+
margin-left: auto;
|
|
27
|
+
border: 0;
|
|
28
|
+
background: transparent;
|
|
29
|
+
font-size: 24px;
|
|
30
|
+
line-height: 1;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
color: inherit;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ------------------ Estilos del panel (sin PrimeNG) ------------------ */
|
|
36
|
+
|
|
37
|
+
.dropi-modal__mask {
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
pointer-events: auto;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition-property: opacity;
|
|
43
|
+
transition-timing-function: ease;
|
|
44
|
+
background: #060b10a8;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropi-modal-root--open .dropi-modal__mask {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dropi-modal-root--closing .dropi-modal__mask {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dropi-modal__panel {
|
|
56
|
+
position: relative;
|
|
57
|
+
pointer-events: auto;
|
|
58
|
+
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transform: translateY(16px) scale(0.92);
|
|
61
|
+
transition-property: opacity, transform;
|
|
62
|
+
transition-timing-function: ease;
|
|
63
|
+
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
border-radius: var(--Border-2, 8px);
|
|
67
|
+
background: var(--White, #fff);
|
|
68
|
+
box-shadow: 0px 0px 60px 0px rgba(0, 0, 0, 0.06);
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
padding: var(--Size-6, 32px);
|
|
71
|
+
gap: var(--Size-5, 32px);
|
|
72
|
+
max-height: calc(100vh - 60px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dropi-modal-root--open .dropi-modal__panel {
|
|
76
|
+
opacity: 1;
|
|
77
|
+
transform: translateY(0) scale(1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dropi-modal-root--closing .dropi-modal__panel {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: translateY(-12px) scale(1.06);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dropi-modal__header {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: var(--Size-1, 4px);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.dropi-modal__title {
|
|
92
|
+
color: var(--Gray-700, #32394d);
|
|
93
|
+
font-size: var(--Size-5);
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
line-height: 110%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.dropi-modal__content {
|
|
99
|
+
padding: 0px 8px 0px 0px;
|
|
100
|
+
overflow: auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Scroll WebKit */
|
|
104
|
+
.dropi-modal__content::-webkit-scrollbar {
|
|
105
|
+
width: 4px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dropi-modal__content::-webkit-scrollbar-track {
|
|
109
|
+
background: var(--Gray-Gray-50, #f7f8fa);
|
|
110
|
+
border-radius: 16px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dropi-modal__content::-webkit-scrollbar-thumb {
|
|
114
|
+
background: var(--Gray-Gray-300, #a3abbf);
|
|
115
|
+
border-radius: 16px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.dropi-modal__content::-webkit-scrollbar-thumb:hover {
|
|
119
|
+
background: var(--Gray-Gray-500, #69738c);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Scroll Firefox */
|
|
123
|
+
.dropi-modal__content {
|
|
124
|
+
scrollbar-width: thin;
|
|
125
|
+
scrollbar-color: var(--Gray-Gray-300, #a3abbf) var(--Gray-Gray-50, #f7f8fa);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.dropi-modal__content--sidebar {
|
|
129
|
+
height: 100%;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.dropi-modal__footer {
|
|
133
|
+
display: flex;
|
|
134
|
+
justify-content: flex-end;
|
|
135
|
+
align-items: flex-start;
|
|
136
|
+
gap: var(--Size-1, 4px);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dropi-modal__footer .button-container {
|
|
140
|
+
display: grid;
|
|
141
|
+
grid-template-columns: 1fr 1fr;
|
|
142
|
+
gap: var(--Size-4);
|
|
143
|
+
min-width: 470px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.dropi-modal__footer .button-container .btn {
|
|
147
|
+
width: 100%;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Tamaños (compatibles con clases existentes) */
|
|
151
|
+
.dropi-modal__panel.size-full {
|
|
152
|
+
min-height: 100vh;
|
|
153
|
+
width: 100%;
|
|
154
|
+
height: 100%;
|
|
155
|
+
max-height: 100vh;
|
|
156
|
+
border-radius: 0 !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.dropi-modal__panel.size-xxl {
|
|
160
|
+
width: calc(100% - 60px);
|
|
161
|
+
max-width: 1520px;
|
|
162
|
+
height: calc(100vh - 120px);
|
|
163
|
+
max-height: 900px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.dropi-modal__panel.size-l {
|
|
167
|
+
width: 1137px;
|
|
168
|
+
// height: 754px;
|
|
169
|
+
max-width: 1137px;
|
|
170
|
+
max-height: 754px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.dropi-modal__panel.size-m {
|
|
174
|
+
max-width: 550px;
|
|
175
|
+
width: 550px;
|
|
176
|
+
// height: 786px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.dropi-modal__panel.size-m .dropi-modal__footer {
|
|
180
|
+
justify-content: center;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.dropi-modal__panel.size-m .dropi-modal__footer .button-container {
|
|
184
|
+
width: 100%;
|
|
185
|
+
min-width: unset !important;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dropi-modal__panel.size-s {
|
|
189
|
+
width: 454px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dropi-modal__panel.size-s .dropi-modal__footer {
|
|
193
|
+
justify-content: center;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dropi-modal__panel.size-s .dropi-modal__footer .button-container {
|
|
197
|
+
width: 100%;
|
|
198
|
+
min-width: unset !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (max-width: 599px) {
|
|
202
|
+
.dropi-modal__panel {
|
|
203
|
+
padding: 20px;
|
|
204
|
+
width: 100% !important;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.dropi-modal__panel:not(.size-s) {
|
|
208
|
+
border-radius: 0 !important;
|
|
209
|
+
height: 100% !important;
|
|
210
|
+
max-height: unset !important;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.dropi-modal__footer {
|
|
214
|
+
justify-content: center;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.dropi-modal__footer .button-container {
|
|
218
|
+
width: 100%;
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-direction: column-reverse;
|
|
221
|
+
gap: var(--Size-4);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dropi-modal__panel.size-s {
|
|
225
|
+
margin: 0 20px !important;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* ------------------ Posiciones (para sidebars) ------------------ */
|
|
230
|
+
|
|
231
|
+
.dropi-modal-root--right {
|
|
232
|
+
align-items: stretch;
|
|
233
|
+
justify-content: flex-end;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.dropi-modal-root--right .dropi-modal__panel {
|
|
237
|
+
height: 100vh;
|
|
238
|
+
max-height: 100vh;
|
|
239
|
+
padding: 0;
|
|
240
|
+
border-radius: 0;
|
|
241
|
+
gap: 0;
|
|
242
|
+
opacity: 1;
|
|
243
|
+
transform: translateX(100%);
|
|
244
|
+
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dropi-modal-root--open.dropi-modal-root--right .dropi-modal__panel {
|
|
248
|
+
transform: translateX(0);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.dropi-modal-root--closing.dropi-modal-root--right .dropi-modal__panel {
|
|
252
|
+
transform: translateX(100%);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Tamaño de sidebar 50vw */
|
|
256
|
+
.dropi-modal-root--right .dropi-modal__panel.size-sidebar-half {
|
|
257
|
+
width: 50vw;
|
|
258
|
+
min-width: 600px;
|
|
259
|
+
box-shadow: -10px 0 40px 0 rgba(0, 0, 0, 0.15);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@media (max-width: 768px) {
|
|
263
|
+
.dropi-modal-root--right .dropi-modal__panel.size-sidebar-half {
|
|
264
|
+
width: 100vw;
|
|
265
|
+
min-width: unset;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@media (prefers-reduced-motion: reduce) {
|
|
270
|
+
.dropi-modal__mask,
|
|
271
|
+
.dropi-modal__panel {
|
|
272
|
+
transition: none !important;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { TestBed } from '@angular/core/testing';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
import { DropiModalComponent } from './dropi-modal.component';
|
|
6
|
+
import { PTemplateDirective } from './p-template.directive';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [DropiModalComponent, PTemplateDirective],
|
|
11
|
+
template: `
|
|
12
|
+
<dropi-modal
|
|
13
|
+
[(visible)]="visible"
|
|
14
|
+
[modal]="true"
|
|
15
|
+
[showHeader]="false"
|
|
16
|
+
styleClass="dropi-dialog size-s"
|
|
17
|
+
>
|
|
18
|
+
<ng-template pTemplate="content">
|
|
19
|
+
<div data-testid="content">Contenido</div>
|
|
20
|
+
</ng-template>
|
|
21
|
+
</dropi-modal>
|
|
22
|
+
`,
|
|
23
|
+
})
|
|
24
|
+
class HostComponent {
|
|
25
|
+
visible = true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe('DropiModalComponent', () => {
|
|
29
|
+
it('renders mask and content when visible', async () => {
|
|
30
|
+
await TestBed.configureTestingModule({
|
|
31
|
+
imports: [HostComponent],
|
|
32
|
+
}).compileComponents();
|
|
33
|
+
|
|
34
|
+
const fixture = TestBed.createComponent(HostComponent);
|
|
35
|
+
fixture.detectChanges();
|
|
36
|
+
|
|
37
|
+
// El modal se adjunta al body via CDK Overlay (microtask).
|
|
38
|
+
await new Promise((r) => setTimeout(r));
|
|
39
|
+
fixture.detectChanges();
|
|
40
|
+
|
|
41
|
+
const doc = TestBed.inject(DOCUMENT);
|
|
42
|
+
|
|
43
|
+
expect(doc.querySelector('.dropi-modal__mask')).toBeTruthy();
|
|
44
|
+
expect(doc.querySelector('[data-testid="content"]')?.textContent).toContain('Contenido');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Dropi Modal component stories for Storybook
|
|
3
|
+
* @description Overlay-based modal and drawer component (no PrimeNG)
|
|
4
|
+
*/
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { Component, Input } from '@angular/core';
|
|
7
|
+
import { type Meta, type StoryObj, moduleMetadata } from '@storybook/angular';
|
|
8
|
+
|
|
9
|
+
import { DropiModalComponent } from './dropi-modal.component';
|
|
10
|
+
import { PTemplateDirective } from './p-template.directive';
|
|
11
|
+
import { ButtonComponent } from '../dropi-button/dropi-button.component';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'dropi-modal-story-host',
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [CommonModule, DropiModalComponent, PTemplateDirective, ButtonComponent],
|
|
17
|
+
template: `
|
|
18
|
+
<div style="padding: 24px; display: flex; gap: 12px; align-items: center;">
|
|
19
|
+
<dropi-button
|
|
20
|
+
text="Open Modal"
|
|
21
|
+
severity="primary"
|
|
22
|
+
size="normal"
|
|
23
|
+
(onClick)="visible = true"
|
|
24
|
+
></dropi-button>
|
|
25
|
+
<span style="color: var(--Gray-500);">Visible: {{ visible }}</span>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<dropi-modal
|
|
29
|
+
[visible]="visible"
|
|
30
|
+
(visibleChange)="visible = $event"
|
|
31
|
+
[modal]="modal"
|
|
32
|
+
[dismissableMask]="dismissableMask"
|
|
33
|
+
[dismissible]="dismissible"
|
|
34
|
+
[closeOnEscape]="closeOnEscape"
|
|
35
|
+
[blockScroll]="blockScroll"
|
|
36
|
+
[autoZIndex]="autoZIndex"
|
|
37
|
+
[baseZIndex]="baseZIndex"
|
|
38
|
+
[transitionOptions]="transitionOptions"
|
|
39
|
+
[position]="position"
|
|
40
|
+
[showHeader]="showHeader"
|
|
41
|
+
[header]="header"
|
|
42
|
+
[showCloseIcon]="showCloseIcon"
|
|
43
|
+
[closable]="closable"
|
|
44
|
+
[draggable]="draggable"
|
|
45
|
+
[resizable]="resizable"
|
|
46
|
+
[styleClass]="styleClass"
|
|
47
|
+
(onShow)="onShow?.()"
|
|
48
|
+
(onHide)="onHide?.()"
|
|
49
|
+
>
|
|
50
|
+
<ng-template pTemplate="content">
|
|
51
|
+
<div style="min-width: 320px;">
|
|
52
|
+
<p style="margin: 0 0 12px; color: var(--Gray-700);">
|
|
53
|
+
This content is rendered in an overlay attached to <code>document.body</code>.
|
|
54
|
+
</p>
|
|
55
|
+
<p style="margin: 0; color: var(--Gray-500);">
|
|
56
|
+
Click the mask (if enabled) or press <kbd>Esc</kbd> to close.
|
|
57
|
+
</p>
|
|
58
|
+
</div>
|
|
59
|
+
</ng-template>
|
|
60
|
+
|
|
61
|
+
<ng-template pTemplate="footer">
|
|
62
|
+
<div style="display: flex; gap: 12px; justify-content: flex-end; width: 100%;">
|
|
63
|
+
<dropi-button
|
|
64
|
+
text="Cancel"
|
|
65
|
+
severity="secondary"
|
|
66
|
+
size="normal"
|
|
67
|
+
(onClick)="visible = false"
|
|
68
|
+
></dropi-button>
|
|
69
|
+
<dropi-button
|
|
70
|
+
text="Confirm"
|
|
71
|
+
severity="primary"
|
|
72
|
+
size="normal"
|
|
73
|
+
(onClick)="visible = false"
|
|
74
|
+
></dropi-button>
|
|
75
|
+
</div>
|
|
76
|
+
</ng-template>
|
|
77
|
+
</dropi-modal>
|
|
78
|
+
`,
|
|
79
|
+
})
|
|
80
|
+
class DropiModalStoryHostComponent {
|
|
81
|
+
visible = true;
|
|
82
|
+
|
|
83
|
+
// Inputs
|
|
84
|
+
@Input() modal = true;
|
|
85
|
+
@Input() dismissableMask = true;
|
|
86
|
+
@Input() dismissible = true;
|
|
87
|
+
@Input() closeOnEscape = true;
|
|
88
|
+
@Input() blockScroll = true;
|
|
89
|
+
@Input() autoZIndex = true;
|
|
90
|
+
@Input() baseZIndex = 1100;
|
|
91
|
+
@Input() transitionOptions = '0.15s';
|
|
92
|
+
@Input() position: 'center' | 'right' | 'left' | 'top' | 'bottom' = 'center';
|
|
93
|
+
@Input() showHeader = true;
|
|
94
|
+
@Input() header: string | null = 'Dropi Modal';
|
|
95
|
+
@Input() showCloseIcon = true;
|
|
96
|
+
@Input() closable = true;
|
|
97
|
+
@Input() draggable = false;
|
|
98
|
+
@Input() resizable = false;
|
|
99
|
+
@Input() styleClass: string | null = 'size-s';
|
|
100
|
+
|
|
101
|
+
// Events (storybook actions)
|
|
102
|
+
@Input() onShow?: () => void;
|
|
103
|
+
@Input() onHide?: () => void;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const meta: Meta<DropiModalComponent> = {
|
|
107
|
+
title: 'UI Dropi/Dropi Modal',
|
|
108
|
+
component: DropiModalComponent,
|
|
109
|
+
tags: ['autodocs'],
|
|
110
|
+
decorators: [
|
|
111
|
+
moduleMetadata({
|
|
112
|
+
imports: [DropiModalStoryHostComponent],
|
|
113
|
+
}),
|
|
114
|
+
],
|
|
115
|
+
parameters: {
|
|
116
|
+
layout: 'fullscreen',
|
|
117
|
+
backgrounds: {
|
|
118
|
+
default: 'light',
|
|
119
|
+
},
|
|
120
|
+
docs: {
|
|
121
|
+
description: {
|
|
122
|
+
component: `
|
|
123
|
+
An overlay-based modal component built with Angular CDK Overlay.
|
|
124
|
+
|
|
125
|
+
## Key Features
|
|
126
|
+
- **Appended to body**: Renders inside an overlay attached to document.body
|
|
127
|
+
- **Mask + dismiss**: Supports mask click and Escape key closing
|
|
128
|
+
- **Drawer support**: Use position="right" (or left/top/bottom) for sidebar-like layouts
|
|
129
|
+
- **PrimeNG-like API**: Compatible inputs/outputs such as visible, visibleChange, dismissableMask, and baseZIndex
|
|
130
|
+
- **Smooth animations**: Uses double requestAnimationFrame for reliable open/close animations
|
|
131
|
+
- **Configurable timing**: Use transitionOptions to control animation duration (e.g., '300ms')
|
|
132
|
+
|
|
133
|
+
## Animation Classes
|
|
134
|
+
The component applies CSS classes for animation states:
|
|
135
|
+
- \`.dropi-modal-root--open\`: Applied when modal is visible
|
|
136
|
+
- \`.dropi-modal-root--closing\`: Applied during close animation
|
|
137
|
+
|
|
138
|
+
## Usage
|
|
139
|
+
~~~html
|
|
140
|
+
<dropi-modal
|
|
141
|
+
[(visible)]="visible"
|
|
142
|
+
[modal]="true"
|
|
143
|
+
styleClass="size-m"
|
|
144
|
+
transitionOptions="300ms"
|
|
145
|
+
(onHide)="onModalClosed()">
|
|
146
|
+
<ng-template pTemplate="header">My Header</ng-template>
|
|
147
|
+
<ng-template pTemplate="content">My Content</ng-template>
|
|
148
|
+
<ng-template pTemplate="footer">My Footer</ng-template>
|
|
149
|
+
</dropi-modal>
|
|
150
|
+
~~~
|
|
151
|
+
`,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
argTypes: {
|
|
156
|
+
visible: {
|
|
157
|
+
control: 'boolean',
|
|
158
|
+
description: 'Controls modal visibility',
|
|
159
|
+
table: {
|
|
160
|
+
type: { summary: 'boolean' },
|
|
161
|
+
defaultValue: { summary: 'false' },
|
|
162
|
+
category: 'State',
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
modal: {
|
|
166
|
+
control: 'boolean',
|
|
167
|
+
description: 'When true, renders a mask behind the panel',
|
|
168
|
+
table: {
|
|
169
|
+
type: { summary: 'boolean' },
|
|
170
|
+
defaultValue: { summary: 'true' },
|
|
171
|
+
category: 'Behavior',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
dismissableMask: {
|
|
175
|
+
control: 'boolean',
|
|
176
|
+
description: 'Allows closing when the mask is clicked',
|
|
177
|
+
table: {
|
|
178
|
+
type: { summary: 'boolean' },
|
|
179
|
+
defaultValue: { summary: 'true' },
|
|
180
|
+
category: 'Behavior',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
dismissible: {
|
|
184
|
+
control: 'boolean',
|
|
185
|
+
description: 'Allows dismiss interactions (mask click / escape)',
|
|
186
|
+
table: {
|
|
187
|
+
type: { summary: 'boolean' },
|
|
188
|
+
defaultValue: { summary: 'true' },
|
|
189
|
+
category: 'Behavior',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
closeOnEscape: {
|
|
193
|
+
control: 'boolean',
|
|
194
|
+
description: 'Closes the modal when pressing Escape',
|
|
195
|
+
table: {
|
|
196
|
+
type: { summary: 'boolean' },
|
|
197
|
+
defaultValue: { summary: 'true' },
|
|
198
|
+
category: 'Behavior',
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
blockScroll: {
|
|
202
|
+
control: 'boolean',
|
|
203
|
+
description: 'Locks page scroll while visible',
|
|
204
|
+
table: {
|
|
205
|
+
type: { summary: 'boolean' },
|
|
206
|
+
defaultValue: { summary: 'true' },
|
|
207
|
+
category: 'Behavior',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
autoZIndex: {
|
|
211
|
+
control: 'boolean',
|
|
212
|
+
description: 'Manages stacking order automatically',
|
|
213
|
+
table: {
|
|
214
|
+
type: { summary: 'boolean' },
|
|
215
|
+
defaultValue: { summary: 'true' },
|
|
216
|
+
category: 'Behavior',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
baseZIndex: {
|
|
220
|
+
control: 'number',
|
|
221
|
+
description: 'Base z-index used for mask/panel',
|
|
222
|
+
table: {
|
|
223
|
+
type: { summary: 'number' },
|
|
224
|
+
defaultValue: { summary: '1100' },
|
|
225
|
+
category: 'Behavior',
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
transitionOptions: {
|
|
229
|
+
control: 'text',
|
|
230
|
+
description: 'CSS transition duration (e.g. "0.15s" or "150ms")',
|
|
231
|
+
table: {
|
|
232
|
+
type: { summary: 'string' },
|
|
233
|
+
defaultValue: { summary: '0.15s' },
|
|
234
|
+
category: 'Behavior',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
position: {
|
|
238
|
+
control: 'select',
|
|
239
|
+
options: ['center', 'right', 'left', 'top', 'bottom'],
|
|
240
|
+
description: 'Panel placement. Use right for drawers/sidebars.',
|
|
241
|
+
table: {
|
|
242
|
+
type: { summary: "'center' | 'right' | 'left' | 'top' | 'bottom'" },
|
|
243
|
+
defaultValue: { summary: 'center' },
|
|
244
|
+
category: 'Behavior',
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
showHeader: {
|
|
248
|
+
control: 'boolean',
|
|
249
|
+
description: 'Shows the header area',
|
|
250
|
+
table: {
|
|
251
|
+
type: { summary: 'boolean' },
|
|
252
|
+
defaultValue: { summary: 'true' },
|
|
253
|
+
category: 'Appearance',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
header: {
|
|
257
|
+
control: 'text',
|
|
258
|
+
description: 'Text header (used when no header template is provided)',
|
|
259
|
+
table: {
|
|
260
|
+
type: { summary: 'string | null' },
|
|
261
|
+
defaultValue: { summary: 'null' },
|
|
262
|
+
category: 'Appearance',
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
showCloseIcon: {
|
|
266
|
+
control: 'boolean',
|
|
267
|
+
description: 'Shows the close icon in the header',
|
|
268
|
+
table: {
|
|
269
|
+
type: { summary: 'boolean' },
|
|
270
|
+
defaultValue: { summary: 'true' },
|
|
271
|
+
category: 'Appearance',
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
closable: {
|
|
275
|
+
control: 'boolean',
|
|
276
|
+
description: 'PrimeNG-compatible alias for showing the close icon',
|
|
277
|
+
table: {
|
|
278
|
+
type: { summary: 'boolean' },
|
|
279
|
+
defaultValue: { summary: 'true' },
|
|
280
|
+
category: 'Appearance',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
draggable: {
|
|
284
|
+
control: 'boolean',
|
|
285
|
+
description: 'PrimeNG-compatible no-op (kept for API parity)',
|
|
286
|
+
table: {
|
|
287
|
+
type: { summary: 'boolean' },
|
|
288
|
+
defaultValue: { summary: 'false' },
|
|
289
|
+
category: 'Behavior',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
resizable: {
|
|
293
|
+
control: 'boolean',
|
|
294
|
+
description: 'PrimeNG-compatible no-op (kept for API parity)',
|
|
295
|
+
table: {
|
|
296
|
+
type: { summary: 'boolean' },
|
|
297
|
+
defaultValue: { summary: 'false' },
|
|
298
|
+
category: 'Behavior',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
styleClass: {
|
|
302
|
+
control: 'text',
|
|
303
|
+
description: 'Additional classes applied to the panel (e.g. "size-m")',
|
|
304
|
+
table: {
|
|
305
|
+
type: { summary: 'string | null' },
|
|
306
|
+
defaultValue: { summary: 'null' },
|
|
307
|
+
category: 'Appearance',
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
visibleChange: {
|
|
311
|
+
action: 'visibleChange',
|
|
312
|
+
description: 'Emitted when visibility changes',
|
|
313
|
+
table: { category: 'Events' },
|
|
314
|
+
},
|
|
315
|
+
onShow: {
|
|
316
|
+
action: 'onShow',
|
|
317
|
+
description: 'Emitted after opening',
|
|
318
|
+
table: { category: 'Events' },
|
|
319
|
+
},
|
|
320
|
+
onHide: {
|
|
321
|
+
action: 'onHide',
|
|
322
|
+
description: 'Emitted after closing',
|
|
323
|
+
table: { category: 'Events' },
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export default meta;
|
|
329
|
+
type Story = StoryObj<DropiModalComponent>;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Centered modal with mask and header.
|
|
333
|
+
*/
|
|
334
|
+
export const Centered: Story = {
|
|
335
|
+
render: (args) => ({
|
|
336
|
+
props: {
|
|
337
|
+
...args,
|
|
338
|
+
},
|
|
339
|
+
template: `<dropi-modal-story-host
|
|
340
|
+
[modal]="modal"
|
|
341
|
+
[dismissableMask]="dismissableMask"
|
|
342
|
+
[dismissible]="dismissible"
|
|
343
|
+
[closeOnEscape]="closeOnEscape"
|
|
344
|
+
[blockScroll]="blockScroll"
|
|
345
|
+
[autoZIndex]="autoZIndex"
|
|
346
|
+
[baseZIndex]="baseZIndex"
|
|
347
|
+
[transitionOptions]="transitionOptions"
|
|
348
|
+
[position]="position"
|
|
349
|
+
[showHeader]="showHeader"
|
|
350
|
+
[header]="header"
|
|
351
|
+
[showCloseIcon]="showCloseIcon"
|
|
352
|
+
[closable]="closable"
|
|
353
|
+
[draggable]="draggable"
|
|
354
|
+
[resizable]="resizable"
|
|
355
|
+
[styleClass]="styleClass"
|
|
356
|
+
[onShow]="onShow"
|
|
357
|
+
[onHide]="onHide"
|
|
358
|
+
></dropi-modal-story-host>`,
|
|
359
|
+
}),
|
|
360
|
+
args: {
|
|
361
|
+
modal: true,
|
|
362
|
+
dismissableMask: true,
|
|
363
|
+
dismissible: true,
|
|
364
|
+
closeOnEscape: true,
|
|
365
|
+
blockScroll: true,
|
|
366
|
+
autoZIndex: true,
|
|
367
|
+
baseZIndex: 1100,
|
|
368
|
+
transitionOptions: '0.15s',
|
|
369
|
+
position: 'center',
|
|
370
|
+
showHeader: true,
|
|
371
|
+
header: 'Dropi Modal',
|
|
372
|
+
showCloseIcon: true,
|
|
373
|
+
closable: true,
|
|
374
|
+
draggable: false,
|
|
375
|
+
resizable: false,
|
|
376
|
+
styleClass: 'size-s',
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Drawer variant using position="right".
|
|
382
|
+
*/
|
|
383
|
+
export const RightDrawer: Story = {
|
|
384
|
+
...Centered,
|
|
385
|
+
args: {
|
|
386
|
+
...(Centered.args as any),
|
|
387
|
+
position: 'right',
|
|
388
|
+
showHeader: true,
|
|
389
|
+
header: 'Add products',
|
|
390
|
+
styleClass: 'add-products-sidebar',
|
|
391
|
+
},
|
|
392
|
+
};
|