@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,132 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<!-- 🧱 Introducción general -->
|
|
3
|
+
<h2>📦 Dropi Modal</h2>
|
|
4
|
+
<p>
|
|
5
|
+
En el <strong>Dropi core</strong> utilizamos el componente <code>p-dialog</code> de PrimeNG como base para la construcción de modales.
|
|
6
|
+
Para asegurar una experiencia visual y funcional consistente, es importante seguir una serie de reglas y estilos personalizados.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p>A continuación se describen las condiciones y buenas prácticas necesarias para implementar correctamente los modales:</p>
|
|
10
|
+
|
|
11
|
+
<ul>
|
|
12
|
+
<li>✅ Utilizar siempre la clase base <code>dropi-dialog</code> para aplicar estilos globales.</li>
|
|
13
|
+
<li>✅ Combinar con clases de tamaño como <code>size-s</code>, <code>size-m</code>, <code>size-l</code>, etc.</li>
|
|
14
|
+
<li>✅ Incluir el <code>footer</code> recomendado con la clase <code>button-container</code> para la correcta alineación de botones.</li>
|
|
15
|
+
<li>❌ No aplicar estilos directamente al componente <code>p-dialog</code>.</li>
|
|
16
|
+
<li>⚠️ No modificar directamente los estilos de PrimeNG sin encapsularlos correctamente.</li>
|
|
17
|
+
</ul>
|
|
18
|
+
|
|
19
|
+
<!-- 🧩 Requisito obligatorio -->
|
|
20
|
+
<h3>🧩 Requisito Obligatorio</h3>
|
|
21
|
+
<p>
|
|
22
|
+
Todo <code>p-dialog</code> personalizado en Dropi debe incluir la clase
|
|
23
|
+
<code>styleClass="dropi-dialog"</code>. Esta clase garantiza estilos consistentes, control de
|
|
24
|
+
dimensiones y adaptación responsive.
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<!-- 📊 Tabla con clases de tamaño -->
|
|
28
|
+
<app-tillte-table-documentation
|
|
29
|
+
[dataTable]="dialogSizeClasses"
|
|
30
|
+
[tittle]="'Clases de Tamaño para Modales'"
|
|
31
|
+
[description]="'Estas clases deben combinarse con dropi-dialog para definir el ancho del modal.'"
|
|
32
|
+
></app-tillte-table-documentation>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
<!-- 📋 Reglas de uso -->
|
|
36
|
+
<h3 style="margin-top: 3rem;">📋 Reglas de Uso</h3>
|
|
37
|
+
<ul>
|
|
38
|
+
<li><strong>✅ SIEMPRE</strong> usa <code>styleClass="dropi-dialog"</code> como clase base.</li>
|
|
39
|
+
<li><strong>✅ COMBÍNALO</strong> con una clase de tamaño como <code>size-s</code>, <code>size-m</code>, <code>size-l</code> o <code>size-xxl</code>.</li>
|
|
40
|
+
<li><strong>❌ NUNCA</strong> apliques estilos directamente al tag <code>p-dialog</code>.</li>
|
|
41
|
+
<li><strong>✅ AGREGA SIEMPRE UN FOOTER</strong> con la clase <code>button-container</code> para asegurar una alineación correcta de los botones.</li>
|
|
42
|
+
</ul>
|
|
43
|
+
|
|
44
|
+
<!-- 💡 Vista con botón y ejemplo -->
|
|
45
|
+
<div class="dialog-preview-block" style="margin-top: 3rem;">
|
|
46
|
+
<h4>🧪 Ejemplo visual por tamaño</h4>
|
|
47
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;">
|
|
48
|
+
<dropi-button text="Size S" (onClick)="openDialog('size-s')"></dropi-button>
|
|
49
|
+
<dropi-button text="Size M" (onClick)="openDialog('size-m')"></dropi-button>
|
|
50
|
+
<dropi-button text="Size L" (onClick)="openDialog('size-l')"></dropi-button>
|
|
51
|
+
<dropi-button text="Size XXL" (onClick)="openDialog('size-xxl')"></dropi-button>
|
|
52
|
+
<dropi-button text="Full width" (onClick)="openDialog('size-full')"></dropi-button>
|
|
53
|
+
<dropi-button text="Con scroll" (onClick)="openDialog('size-m', true)"></dropi-button>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<pre style="margin-top: 1rem;">
|
|
57
|
+
<code appPrismHighlight class="language-html">
|
|
58
|
+
<p-dialog
|
|
59
|
+
[(visible)]="showDialog"
|
|
60
|
+
[modal]="true"
|
|
61
|
+
[closable]="true"
|
|
62
|
+
[dismissableMask]="true"
|
|
63
|
+
[header]="'Ejemplo Size S'"
|
|
64
|
+
styleClass="dropi-dialog size-s"
|
|
65
|
+
>
|
|
66
|
+
<div class="dialog-content">
|
|
67
|
+
<p>Contenido del diálogo...</p>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<ng-template pTemplate="footer">
|
|
71
|
+
<div class="button-container">
|
|
72
|
+
<dropi-button text="Cancelar" (onClick)="showDialog = false"></dropi-button>
|
|
73
|
+
<dropi-button text="Aceptar" (onClick)="showDialog = false"></dropi-button>
|
|
74
|
+
</div>
|
|
75
|
+
</ng-template>
|
|
76
|
+
</p-dialog>
|
|
77
|
+
</code>
|
|
78
|
+
</pre>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<!-- 🦶 Footer recomendado -->
|
|
82
|
+
<h3 style="margin-top: 3rem;">🦶 Footer Recomendado</h3>
|
|
83
|
+
<p>
|
|
84
|
+
Para mantener la alineación y el espaciado consistentes en todos los modales de Dropi,
|
|
85
|
+
<strong>el uso del footer es obligatorio</strong>. Se debe usar un
|
|
86
|
+
<code><ng-template pTemplate="footer"></code> con estructura estándar y la clase
|
|
87
|
+
<code>button-container</code>.
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
<pre>
|
|
91
|
+
<code appPrismHighlight class="language-html">
|
|
92
|
+
<ng-template pTemplate="footer">
|
|
93
|
+
<div class="button-container">
|
|
94
|
+
<dropi-button text="Cancelar" (onClick)="...cancel..."></dropi-button>
|
|
95
|
+
<dropi-button text="Aceptar" (onClick)="...confirm..."></dropi-button>
|
|
96
|
+
</div>
|
|
97
|
+
</ng-template>
|
|
98
|
+
</code>
|
|
99
|
+
</pre>
|
|
100
|
+
|
|
101
|
+
<p>
|
|
102
|
+
La clase <code>button-container</code> junto con el uso de los <code>dropi-button</code> garantiza que los botones estén con la alineación adecuada en cada tamaño.
|
|
103
|
+
</p>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<!-- Diálogo real -->
|
|
107
|
+
<p-dialog
|
|
108
|
+
[(visible)]="showDialog"
|
|
109
|
+
[modal]="true"
|
|
110
|
+
[closable]="true"
|
|
111
|
+
[dismissableMask]="true"
|
|
112
|
+
[header]="'Ejemplo ' + dialogSizeClass +(scroll ? ' con scroll' : '')"
|
|
113
|
+
[styleClass]="'dropi-dialog ' + dialogSizeClass"
|
|
114
|
+
>
|
|
115
|
+
<div class="dialog-content">
|
|
116
|
+
<p *ngIf="!scroll">Este es un ejemplo visual de un diálogo con clase <code>{{ dialogSizeClass }}</code>.</p>
|
|
117
|
+
<div *ngIf="scroll">
|
|
118
|
+
<p >Este es un ejemplo visual de un diálogo con clase <code>{{ dialogSizeClass }}</code> con scroll</p>
|
|
119
|
+
<p *ngFor="let i of [].constructor(10); let idx = index">{{idx +1}}. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Dicta,
|
|
120
|
+
dignissimos voluptates? Perferendis ullam animi ea possimus quia nostrum
|
|
121
|
+
nsequatur dignissimos est. Excepturi vel sapiente tempora, iste molestiae tenetur provident!</p>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<ng-template pTemplate="footer">
|
|
127
|
+
<div class="button-container">
|
|
128
|
+
<dropi-button severity="secondary" text="Cancelar" (onClick)="showDialog = false"></dropi-button>
|
|
129
|
+
<dropi-button text="Aceptar" (onClick)="showDialog = false"></dropi-button>
|
|
130
|
+
</div>
|
|
131
|
+
</ng-template>
|
|
132
|
+
</p-dialog>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
p code,
|
|
2
|
+
li code {
|
|
3
|
+
background-color: #f5f5f5;
|
|
4
|
+
color: #333;
|
|
5
|
+
padding: 0.15em 0.4em;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
font-size: 0.9em;
|
|
8
|
+
font-family: 'Courier New', Courier, monospace;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
}
|
|
11
|
+
.container {
|
|
12
|
+
padding-top: 20px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { PrismHighlightDirective } from '@app/directives/prism-highlight.directive';
|
|
4
|
+
import { TillteTableDocumentationComponent } from '../tillte-table-documentation/tillte-table-documentation.component';
|
|
5
|
+
import { NgPrimeModule } from '@app/ngprime.module';
|
|
6
|
+
import { ButtonComponent } from '@app/ui/dropi-button/dropi-button.component';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'app-dropi-modal',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule , TillteTableDocumentationComponent,PrismHighlightDirective, NgPrimeModule, ButtonComponent],
|
|
12
|
+
templateUrl: './dropi-modal.component.html',
|
|
13
|
+
styleUrls: ['./dropi-modal.component.scss'],
|
|
14
|
+
host: {
|
|
15
|
+
'class': 'dropi-modal-doc'
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
export class DropiModalStoryComponent {
|
|
19
|
+
showModal: boolean = false;
|
|
20
|
+
showSizeSDialog: boolean = false;
|
|
21
|
+
showDialog = false;
|
|
22
|
+
scroll: boolean = true;
|
|
23
|
+
dialogSizeClass: 'size-s' | 'size-m' | 'size-l' | 'size-xxl'| 'size-full' = 'size-s';
|
|
24
|
+
|
|
25
|
+
description = 'Para los modales utilizamos directamente el p-dialog de primeNg, y simplemente aplicamos la clase que se muestra en la tabla de abajo.';
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
dialogSizeClasses = [
|
|
30
|
+
{
|
|
31
|
+
Tamaño: 'Pequeño',
|
|
32
|
+
Clase: 'size-s',
|
|
33
|
+
Descripción: 'Modal pequeño'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
Tamaño: 'Mediano',
|
|
37
|
+
Clase: 'size-m',
|
|
38
|
+
Descripción: 'Modal mediano'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
Tamaño: 'Grande',
|
|
42
|
+
Clase: 'size-l',
|
|
43
|
+
Descripción: 'Modal grande'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
Tamaño: 'Extra grande',
|
|
47
|
+
Clase: 'size-xxl',
|
|
48
|
+
Descripción: 'Modal de pantalla completa'
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
onCancel() {
|
|
52
|
+
this.showModal = false;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onConfirm() {
|
|
56
|
+
this.showModal = false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
openDialog(size: 'size-s' | 'size-m' | 'size-l' | 'size-xxl'| 'size-full', scroll: boolean = false): void {
|
|
60
|
+
this.scroll = scroll;
|
|
61
|
+
this.dialogSizeClass = size;
|
|
62
|
+
this.showDialog = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<h2>📦 Dropi Toast</h2>
|
|
3
|
+
<p>
|
|
4
|
+
En el <strong>Dropi core</strong> utilizamos el componente <code>p-toast</code> de PrimeNG como
|
|
5
|
+
base para la construcción de toasts. Para asegurar una experiencia visual y funcional
|
|
6
|
+
consistente, es importante seguir una serie de reglas y estilos personalizados.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<h3 style="margin-top: 3rem">🧩 ¿Cómo utilizarlo?</h3>
|
|
10
|
+
<p>
|
|
11
|
+
Para utilizar el toast de Dropi <b>no es necesario agregar el componente en el template HTML</b>;
|
|
12
|
+
debes inyectar el servicio <b>ToastService</b> en tu componente y luego, puedes utilizar
|
|
13
|
+
los diferentes métodos para mostrar el toast con ciertos estilos o mensajes personalizados según
|
|
14
|
+
el caso.
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<h3 style="margin-top: 3rem">🛑 Consideraciones</h3>
|
|
18
|
+
<ul>
|
|
19
|
+
<li>No se debe utilizar el componente <code>p-toast</code> de PrimeNG directamente.</li>
|
|
20
|
+
<li>No se debe colocar el componente <code>ToastComponent</code> en el template HTML.</li>
|
|
21
|
+
<li>Por defecto, el toast se cierra automáticamente después de 3 segundos.</li>
|
|
22
|
+
<li>El toast se muestra en la parte superior derecha de la pantalla.</li>
|
|
23
|
+
<li>El toast muestra los íconos según el tipo de toast y basado en si es Dropi o una marca blanca</li>
|
|
24
|
+
</ul>
|
|
25
|
+
|
|
26
|
+
<h3 style="margin-top: 3rem">📋 Tipos de Toast</h3>
|
|
27
|
+
<ul>
|
|
28
|
+
<li>Toast de tipo <code>success</code></li>
|
|
29
|
+
<li>Toast de tipo <code>error</code></li>
|
|
30
|
+
<li>Toast de tipo <code>warning</code></li>
|
|
31
|
+
<li>Toast de tipo <code>info</code></li>
|
|
32
|
+
<li>Toast personalizado</li>
|
|
33
|
+
</ul>
|
|
34
|
+
|
|
35
|
+
<h3 style="margin-top: 3rem">🚀 Signatura de los métodos</h3>
|
|
36
|
+
<pre style="margin-top: 1rem">
|
|
37
|
+
<code appPrismHighlight class="language-typescript" ngNonBindable>
|
|
38
|
+
showError(title: string, description?: string, params?: ToastProps)
|
|
39
|
+
showSuccess(title: string, description?: string, params?: ToastProps)
|
|
40
|
+
showInfo(title: string, description?: string, params?: ToastProps)
|
|
41
|
+
showWarning(title: string, description?: string, params?: ToastProps)
|
|
42
|
+
</code>
|
|
43
|
+
</pre>
|
|
44
|
+
|
|
45
|
+
<div class="dialog-preview-block" style="margin-top: 3rem">
|
|
46
|
+
<h4>🧪 Ejemplo visual por tipo</h4>
|
|
47
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; margin-top: 2rem">
|
|
48
|
+
<dropi-button text="Success" (onClick)="showSuccessToast()" />
|
|
49
|
+
<dropi-button text="Error" (onClick)="showErrorToast()" />
|
|
50
|
+
<dropi-button text="Info" (onClick)="showInfoToast()" />
|
|
51
|
+
<dropi-button text="Warning" (onClick)="showWarningToast()" />
|
|
52
|
+
<dropi-button text="With URL" (onClick)="showToastWithUrl()" />
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<h4 style="margin-top: 3rem">🧪 Ejemplo de uso con el ToastService</h4>
|
|
56
|
+
<pre style="margin-top: 1rem">
|
|
57
|
+
<code appPrismHighlight class="language-typescript" ngNonBindable>
|
|
58
|
+
import { ToastService } from '@app/services/toast.service';
|
|
59
|
+
|
|
60
|
+
export class ExampleComponent implements OnInit {
|
|
61
|
+
constructor(private toastService: ToastService) { }
|
|
62
|
+
|
|
63
|
+
// Toast de tipo success
|
|
64
|
+
this.toastService.showSuccess('Success', 'El proceso se realizó correctamente');
|
|
65
|
+
|
|
66
|
+
// Toast de tipo error
|
|
67
|
+
this.toastService.showError('Error', 'Se ha producido un error inesperado');
|
|
68
|
+
|
|
69
|
+
// Toast de tipo info
|
|
70
|
+
this.toastService.showInfo('Info', 'Se ha realizado una acción');
|
|
71
|
+
|
|
72
|
+
// Toast de tipo warning
|
|
73
|
+
this.toastService.showWarning('Advertencia', 'Se ha producido un problema');
|
|
74
|
+
|
|
75
|
+
// Toast personalizado
|
|
76
|
+
this.toastService.showSuccess('Success', 'El proceso se realizó correctamente', {
|
|
77
|
+
life: 5000,
|
|
78
|
+
link: { url: 'https://dropi.co', text: 'Go to Dropi' }
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
</code>
|
|
82
|
+
</pre>
|
|
83
|
+
|
|
84
|
+
<h4 style="margin-top: 1rem">ℹ️ Props útiles (opcional)</h4>
|
|
85
|
+
<ul>
|
|
86
|
+
<li><code>life</code>: duración en ms (por defecto 3000).</li>
|
|
87
|
+
<li><code>sticky</code>: si es <code>true</code>, permanece hasta cerrar.</li>
|
|
88
|
+
<li><code>closable</code>: muestra botón para cerrar.</li>
|
|
89
|
+
<li><code>link</code>: objeto con <code>url</code> y <code>text</code> para CTA.</li>
|
|
90
|
+
</ul>
|
|
91
|
+
|
|
92
|
+
<h3 style="margin-top: 3rem">⚙️ Parámetros de configuración (ToastProps)</h3>
|
|
93
|
+
<table style="width: 100%; border-collapse: collapse; margin-top: 1rem; margin-bottom: 5rem">
|
|
94
|
+
<thead>
|
|
95
|
+
<tr>
|
|
96
|
+
<th style="text-align: left; padding: 0.5rem; border-bottom: 1px solid #ddd">
|
|
97
|
+
Parámetro
|
|
98
|
+
</th>
|
|
99
|
+
<th style="text-align: left; padding: 0.5rem; border-bottom: 1px solid #ddd">Tipo</th>
|
|
100
|
+
<th style="text-align: left; padding: 0.5rem; border-bottom: 1px solid #ddd">
|
|
101
|
+
Obligatorio
|
|
102
|
+
</th>
|
|
103
|
+
<th style="text-align: left; padding: 0.5rem; border-bottom: 1px solid #ddd">
|
|
104
|
+
Descripción
|
|
105
|
+
</th>
|
|
106
|
+
</tr>
|
|
107
|
+
</thead>
|
|
108
|
+
<tbody>
|
|
109
|
+
<tr>
|
|
110
|
+
<td>summary</td>
|
|
111
|
+
<td>string</td>
|
|
112
|
+
<td>✅ Sí</td>
|
|
113
|
+
<td>Título principal del toast.</td>
|
|
114
|
+
</tr>
|
|
115
|
+
<tr>
|
|
116
|
+
<td>detail</td>
|
|
117
|
+
<td>string</td>
|
|
118
|
+
<td>❌ No</td>
|
|
119
|
+
<td>Texto adicional o descripción.</td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td>severity</td>
|
|
123
|
+
<td>'success' | 'error' | 'info' | 'warn'</td>
|
|
124
|
+
<td>✅ Sí</td>
|
|
125
|
+
<td>Determina el estilo visual del toast.</td>
|
|
126
|
+
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td>life</td>
|
|
129
|
+
<td>number</td>
|
|
130
|
+
<td>❌ No (default: 3000)</td>
|
|
131
|
+
<td>Duración en milisegundos que el toast permanece visible.</td>
|
|
132
|
+
</tr>
|
|
133
|
+
<tr>
|
|
134
|
+
<td>sticky</td>
|
|
135
|
+
<td>boolean</td>
|
|
136
|
+
<td>❌ No</td>
|
|
137
|
+
<td>Si es true, el toast no se cierra automáticamente.</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td>closable</td>
|
|
141
|
+
<td>boolean</td>
|
|
142
|
+
<td>❌ No (default: true)</td>
|
|
143
|
+
<td>Permite cerrar manualmente el toast.</td>
|
|
144
|
+
</tr>
|
|
145
|
+
<tr>
|
|
146
|
+
<td>link</td>
|
|
147
|
+
<td>{ url: string; text: string }</td>
|
|
148
|
+
<td>❌ No</td>
|
|
149
|
+
<td>Agrega un enlace clickeable en el toast.</td>
|
|
150
|
+
</tr>
|
|
151
|
+
</tbody>
|
|
152
|
+
</table>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<app-toast [forceBrandIsDropi]="forceBrandIsDropi" />
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { PrismHighlightDirective } from '@app/directives/prism-highlight.directive';
|
|
4
|
+
import { NgPrimeModule } from '@app/ngprime.module';
|
|
5
|
+
import { ToastComponent } from '@app/ui/toast/toast.component';
|
|
6
|
+
import { ToastService } from '@app/services/toast.service';
|
|
7
|
+
import { ButtonComponent } from '@app/ui/dropi-button/dropi-button.component';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-dropi-toast',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
PrismHighlightDirective,
|
|
15
|
+
NgPrimeModule,
|
|
16
|
+
ToastComponent,
|
|
17
|
+
ButtonComponent,
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './dropi-toast.component.html',
|
|
20
|
+
styleUrls: ['./dropi-toast.component.scss'],
|
|
21
|
+
host: {
|
|
22
|
+
class: 'dropi-toast-doc',
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
export class DropiToastStoryComponent {
|
|
26
|
+
@Input() forceBrandIsDropi: boolean = true;
|
|
27
|
+
|
|
28
|
+
constructor(private readonly toastService: ToastService) {}
|
|
29
|
+
|
|
30
|
+
showSuccessToast() {
|
|
31
|
+
this.toastService.showSuccess('Título', 'Descripción');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
showErrorToast() {
|
|
35
|
+
this.toastService.showError('Título', 'Descripción');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
showInfoToast() {
|
|
39
|
+
this.toastService.showInfo('Título', 'Descripción');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
showWarningToast() {
|
|
43
|
+
this.toastService.showWarning('Título', 'Descripción');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
showToastWithUrl() {
|
|
47
|
+
this.toastService.showSuccess('Título', 'Descripción', {
|
|
48
|
+
life: 5000,
|
|
49
|
+
link: {
|
|
50
|
+
url: 'https://dropi.co',
|
|
51
|
+
text: 'Go to Dropi'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.css
ADDED
|
File without changes
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="es">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Documentación de Country Flags</title>
|
|
7
|
+
<style>
|
|
8
|
+
.flag-example {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
margin: 20px 0;
|
|
12
|
+
}
|
|
13
|
+
.flag-example img {
|
|
14
|
+
width: 50px;
|
|
15
|
+
height: 50px;
|
|
16
|
+
margin-right: 20px;
|
|
17
|
+
}
|
|
18
|
+
.flag-example .code {
|
|
19
|
+
font-family: 'Courier New', Courier, monospace;
|
|
20
|
+
background: #f4f4f4;
|
|
21
|
+
padding: 10px;
|
|
22
|
+
border-radius: 5px;
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
</head>
|
|
27
|
+
<body>
|
|
28
|
+
|
|
29
|
+
<div class="container">
|
|
30
|
+
<h1><code appPrismHighlight><app-country-flags></code></h1>
|
|
31
|
+
|
|
32
|
+
<h2>Descripción</h2>
|
|
33
|
+
<p>El componente <code appPrismHighlight><app-country-flags></code> permite representar banderas de diferentes países en la aplicación con dos estilos disponibles: <strong>círculo</strong> y <strong>rectángulo</strong>.</p>
|
|
34
|
+
|
|
35
|
+
<h2>Uso Básico</h2>
|
|
36
|
+
<pre><code appPrismHighlight><app-country-flags
|
|
37
|
+
[country]="'PAIS'"
|
|
38
|
+
[style]="'estilo'"
|
|
39
|
+
></app-country-flags></code></pre>
|
|
40
|
+
|
|
41
|
+
<h2>Propiedades</h2>
|
|
42
|
+
<table>
|
|
43
|
+
<thead>
|
|
44
|
+
<tr>
|
|
45
|
+
<th>Propiedad</th>
|
|
46
|
+
<th>Tipo</th>
|
|
47
|
+
<th>Descripción</th>
|
|
48
|
+
</tr>
|
|
49
|
+
</thead>
|
|
50
|
+
<tbody>
|
|
51
|
+
<tr>
|
|
52
|
+
<td><code appPrismHighlight>country</code></td>
|
|
53
|
+
<td>string</td>
|
|
54
|
+
<td>El código del país en formato ISO 3166-1 alpha-2 (por ejemplo, 'CO' para Colombia, 'ES' para España).</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr>
|
|
57
|
+
<td><code appPrismHighlight>style</code></td>
|
|
58
|
+
<td>string</td>
|
|
59
|
+
<td>El estilo de la bandera: <code appPrismHighlight>'circle'</code> o <code appPrismHighlight>'rectangle'</code>.</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</tbody>
|
|
62
|
+
</table>
|
|
63
|
+
|
|
64
|
+
<h2>Tipos de Estilos</h2>
|
|
65
|
+
<ul>
|
|
66
|
+
<li><strong>circle</strong>: Muestra la bandera en un círculo.</li>
|
|
67
|
+
<li><strong>rectangle</strong>: Muestra la bandera en un rectángulo.</li>
|
|
68
|
+
</ul>
|
|
69
|
+
|
|
70
|
+
<h2>Ejemplos de Uso</h2>
|
|
71
|
+
|
|
72
|
+
<h3>1. Bandera de Colombia (Estilo Círculo)</h3>
|
|
73
|
+
<div class="flag-example">
|
|
74
|
+
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAACUCAMAAACJORQYAAAAHlBMVEX/zQAAMIfIEC7/0ADivCtkXnMAJooAMYyBI2PGEC916Fa3AAAAf0lEQVR4nO3PUQGCAAAFsaeoQP/CZPD7tgbbAAAAAAAAAAAAAAAAAAAAAAAAAOAfR9Q+UftG7Re1V5R4jXiNeI14jXiNeI14jXiNeI14jXiNeI14jXiNeI14jXiNeE03fkbtitodtXeUeI14jXiNeI14jXiNeI14jXiNeE02/gAy0Hgh8HA5YwAAAABJRU5ErkJggg==" alt="Bandera de Colombia" style="border-radius: 50%;">
|
|
75
|
+
<div class="code">
|
|
76
|
+
<pre><code appPrismHighlight><app-country-flags
|
|
77
|
+
[country]="'CO'"
|
|
78
|
+
[style]="'circle'"
|
|
79
|
+
></app-country-flags></code></pre>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<h3>2. Bandera de España (Estilo Rectángulo)</h3>
|
|
84
|
+
<div class="flag-example">
|
|
85
|
+
<img src="https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Spain.svg" alt="Bandera de España" style="width: 50px; height: 30px;">
|
|
86
|
+
<div class="code">
|
|
87
|
+
<pre><code appPrismHighlight><app-country-flags
|
|
88
|
+
[country]="'ES'"
|
|
89
|
+
[style]="'rectangle'"
|
|
90
|
+
></app-country-flags></code></pre>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
package/src/components-source/storybook-doc-components/flags-storybook/flags-storybook.component.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, OnInit } from '@angular/core';
|
|
3
|
+
import { PrismHighlightDirective } from '@app/directives/prism-highlight.directive';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-flags-storybook',
|
|
7
|
+
templateUrl: './flags-storybook.component.html',
|
|
8
|
+
styleUrls: ['./flags-storybook.component.css'],
|
|
9
|
+
standalone:true,
|
|
10
|
+
imports:[CommonModule,PrismHighlightDirective]
|
|
11
|
+
})
|
|
12
|
+
export class FlagsStorybookComponent implements OnInit {
|
|
13
|
+
|
|
14
|
+
constructor() { }
|
|
15
|
+
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
}
|
package/src/components-source/storybook-doc-components/icons-storybook/icons-storybook.component.css
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
.container{
|
|
7
|
+
padding: 8rem 8rem;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
.container-icons{
|
|
11
|
+
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: repeat(8, 1fr);
|
|
14
|
+
gap: 1rem;
|
|
15
|
+
font-size: small;
|
|
16
|
+
text-align: center;
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.content-icon-list{
|
|
21
|
+
place-items: center;
|
|
22
|
+
align-self: center;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
p{
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* code{
|
|
31
|
+
margin: 1rem 0;
|
|
32
|
+
padding: 1rem;
|
|
33
|
+
background-color: black;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
color: orange;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
} */
|
|
38
|
+
|
|
39
|
+
.icon-table {
|
|
40
|
+
width: 100%;
|
|
41
|
+
border-collapse: collapse;
|
|
42
|
+
margin-top: 10px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.icon-table th, .icon-table td {
|
|
46
|
+
border: 1px solid #ddd;
|
|
47
|
+
padding: 8px;
|
|
48
|
+
text-align: left;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.icon-table th {
|
|
52
|
+
background-color: #f4f4f4;
|
|
53
|
+
font-weight: bold;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.icon-table tr:nth-child(even) {
|
|
57
|
+
background-color: #f9f9f9;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.icon-table tr:hover {
|
|
61
|
+
background-color: #f1f1f1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
img{
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
img:hover{
|
|
69
|
+
transform: scale(1.2);
|
|
70
|
+
}
|
|
71
|
+
.tittleIcon{
|
|
72
|
+
width: 100%;
|
|
73
|
+
text-align: center;
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host {
|
|
78
|
+
display: flex;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
}
|