@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,270 @@
|
|
|
1
|
+
@import "../../../../tokens.scss";
|
|
2
|
+
.container{
|
|
3
|
+
display: block;
|
|
4
|
+
width: 20px;
|
|
5
|
+
min-height: 50px; /* O una altura definida */
|
|
6
|
+
background-color: #f0f0f0;
|
|
7
|
+
height:20px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
*{
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
font-family: $font-family-01;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tittle-h2{
|
|
16
|
+
padding-top: 2rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.background-color-preview{
|
|
20
|
+
background-color: aqua;
|
|
21
|
+
width: 4rem;
|
|
22
|
+
height: 2rem;
|
|
23
|
+
max-width: 4rem;
|
|
24
|
+
max-height: 2rem;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.content-color-teble{
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
table {
|
|
36
|
+
border-collapse: collapse; /* Combinamos los bordes de las celdas */
|
|
37
|
+
width: 100%; /* Tabla ocupa todo el ancho disponible */
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
th, td {
|
|
41
|
+
padding: 10px;
|
|
42
|
+
border: 1px solid #ddd; /* Opcional: para ver las líneas de la tabla */
|
|
43
|
+
text-align: center; /* Alinea horizontalmente */
|
|
44
|
+
vertical-align: middle; /* Centra verticalmente */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
th {
|
|
48
|
+
background-color: #f2f2f2; /* Fondo gris para encabezados */
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
.cell-content {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center; /* Centra verticalmente dentro del div */
|
|
55
|
+
justify-content: center; /* Opcional: centra horizontalmente */
|
|
56
|
+
height: 100%; /* Asegura que tome el alto de la celda */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cell-content > div {
|
|
60
|
+
padding: 5px 0;
|
|
61
|
+
border-bottom: 1px solid #ccc; /* Líneas horizontales de separación */
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cell-content > div:last-child {
|
|
65
|
+
border-bottom: none; /* Eliminamos la última línea para no tener borde extra */
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.h1 {
|
|
69
|
+
font-size: $font-size-xxxxl;
|
|
70
|
+
line-height: $lineheight-simple;
|
|
71
|
+
font-weight: $font-weight-bold;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.h1Mobile {
|
|
75
|
+
font-size: $font-size-xxxxl;
|
|
76
|
+
line-height: $lineheight-simple;
|
|
77
|
+
font-weight: $font-weight-bold;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.h2 {
|
|
81
|
+
font-size: $font-size-xxxl;
|
|
82
|
+
line-height: $lineheight-simple;
|
|
83
|
+
font-weight: $font-weight-bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.h2Mobile {
|
|
87
|
+
font-size: $font-size-xxxl;
|
|
88
|
+
line-height: $lineheight-simple;
|
|
89
|
+
font-weight: $font-weight-bold;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.h3 {
|
|
93
|
+
font-size: $font-size-xxl;
|
|
94
|
+
line-height: $lineheight-simple;
|
|
95
|
+
font-weight: $font-weight-bold;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.h3Mobile {
|
|
99
|
+
font-size: $font-size-xxl;
|
|
100
|
+
line-height: $lineheight-simple;
|
|
101
|
+
font-weight: $font-weight-bold;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.h4 {
|
|
105
|
+
font-size: $font-size-xl;
|
|
106
|
+
line-height: $lineheight-simple;
|
|
107
|
+
font-weight: $font-weight-bold;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.h4Mobile {
|
|
111
|
+
font-size: $font-size-xl;
|
|
112
|
+
line-height: $lineheight-simple;
|
|
113
|
+
font-weight: $font-weight-bold;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.h5 {
|
|
117
|
+
font-size: $font-size-l;
|
|
118
|
+
line-height: $lineheight-simple;
|
|
119
|
+
font-weight: $font-weight-bold;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.h5Mobile {
|
|
123
|
+
font-size: $font-size-l;
|
|
124
|
+
line-height: $lineheight-simple;
|
|
125
|
+
font-weight: $font-weight-bold;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.labelL {
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
line-height: 110%;
|
|
131
|
+
font-weight: 700;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.labelM {
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
line-height: 110%;
|
|
137
|
+
font-weight: 700;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.labelS {
|
|
141
|
+
font-size: 12px;
|
|
142
|
+
line-height: 110%;
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.xxxxl {
|
|
147
|
+
font-size: $font-size-xxxxl;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.xxxl {
|
|
151
|
+
font-size: $font-size-xxxl;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.xxl {
|
|
155
|
+
font-size: $font-size-xxl;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.xl {
|
|
159
|
+
font-size: $font-size-xl;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.l {
|
|
163
|
+
font-size: $font-size-l;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.m {
|
|
167
|
+
font-size: $font-size-m;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.s {
|
|
171
|
+
font-size: $font-size-s;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.xs {
|
|
175
|
+
font-size: $font-size-xs;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.xxs {
|
|
179
|
+
font-size: $font-size-xxs;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Clases generadas a partir de this.fontWeight */
|
|
183
|
+
.bold {
|
|
184
|
+
font-weight: $font-weight-bold;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.semibold {
|
|
188
|
+
font-weight: $font-weight-semibold;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.medium {
|
|
192
|
+
font-weight: $font-weight-medium;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.regular {
|
|
196
|
+
font-weight: $font-weight-regular;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.light {
|
|
200
|
+
font-weight: $font-weight-light;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Clases generadas a partir de this.fontLineheight */
|
|
204
|
+
.simple {
|
|
205
|
+
line-height: $lineheight-simple;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.large {
|
|
209
|
+
line-height: $lineheight-large;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Clases generadas a partir de this.body */
|
|
213
|
+
.body-l-medium {
|
|
214
|
+
font-size: $font-size-m;
|
|
215
|
+
line-height: $lineheight-large;
|
|
216
|
+
font-weight: $font-weight-medium;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.body-l-regular {
|
|
220
|
+
font-size: $font-size-m;
|
|
221
|
+
line-height: $lineheight-large;
|
|
222
|
+
font-weight: $font-weight-regular;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.body-m-medium {
|
|
226
|
+
font-size: $font-size-s;
|
|
227
|
+
line-height: $lineheight-large;
|
|
228
|
+
font-weight: $font-weight-medium;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.body-m-regular {
|
|
232
|
+
font-size: $font-size-s;
|
|
233
|
+
line-height: $lineheight-large;
|
|
234
|
+
font-weight: $font-weight-regular;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.body-s-medium {
|
|
238
|
+
font-size: $font-size-xs;
|
|
239
|
+
line-height: $lineheight-large;
|
|
240
|
+
font-weight: $font-weight-medium;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.body-s-regular {
|
|
244
|
+
font-size: $font-size-xs;
|
|
245
|
+
line-height: $lineheight-large;
|
|
246
|
+
font-weight: $font-weight-regular;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.caption-m {
|
|
250
|
+
font-size: 12px; /* Equivalente a font-size-xs */
|
|
251
|
+
line-height: 110%; /* Equivalente a lineheight-simple */
|
|
252
|
+
font-weight: 700; /* Equivalente a font-weight-bold */
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Clase para Caption-S */
|
|
256
|
+
.caption-s {
|
|
257
|
+
font-size: 10px; /* Equivalente a font-size-xxs */
|
|
258
|
+
line-height: 110%; /* Equivalente a lineheight-simple */
|
|
259
|
+
font-weight: 700; /* Equivalente a font-weight-bold */
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.darkMode{
|
|
263
|
+
background-color: black;
|
|
264
|
+
color: white;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.darkModeColumn{
|
|
268
|
+
background-color: #2d2c36f7;
|
|
269
|
+
color: white;
|
|
270
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { CommonModule, KeyValue } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { ToastModule } from 'primeng/toast';
|
|
4
|
+
import { MessageService } from 'primeng/api';
|
|
5
|
+
import { PrismHighlightDirective } from '@app/directives/prism-highlight.directive';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'app-tillte-table-documentation',
|
|
9
|
+
templateUrl: './tillte-table-documentation.component.html',
|
|
10
|
+
styleUrls: ['./tillte-table-documentation.component.scss'],
|
|
11
|
+
standalone:true,
|
|
12
|
+
imports:[CommonModule,ToastModule,PrismHighlightDirective],
|
|
13
|
+
providers: [MessageService],
|
|
14
|
+
|
|
15
|
+
})
|
|
16
|
+
export class TillteTableDocumentationComponent implements OnInit {
|
|
17
|
+
@Input() dataTable = []
|
|
18
|
+
@Input() tittle:string = ''
|
|
19
|
+
@Input() description:string = ''
|
|
20
|
+
@Input() type:string = ""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
columns = [];
|
|
26
|
+
rows = [];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
constructor(private messageService: MessageService) { }
|
|
31
|
+
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
this.getColums()
|
|
34
|
+
this.getRows()
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
getColums(){
|
|
40
|
+
if(this.dataTable.length > 0){
|
|
41
|
+
|
|
42
|
+
this.columns = Object.keys(this.dataTable[0])
|
|
43
|
+
console.log(this.columns);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
getRows(){
|
|
49
|
+
|
|
50
|
+
this.dataTable.map(data=>{
|
|
51
|
+
this.rows.push(data)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
originalOrder = (): number => {
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
getPropertiesExceptLast(obj: any): KeyValue<string, any>[] {
|
|
62
|
+
const entries = Object.entries(obj);
|
|
63
|
+
const slicedEntries = entries.slice(0, -1); // Excluye el último par clave-valor
|
|
64
|
+
return slicedEntries.map(([key, value]) => ({ key, value }));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getLastPropertyKey(obj: any) {
|
|
68
|
+
const value = Object.values(obj);
|
|
69
|
+
return value[value.length-1]
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
copyNameColor(icon){
|
|
74
|
+
|
|
75
|
+
const positionLine = icon.indexOf('-')
|
|
76
|
+
console.log(positionLine);
|
|
77
|
+
|
|
78
|
+
let newIcon;
|
|
79
|
+
if(positionLine > 0){
|
|
80
|
+
const prefix = icon.substr(0,positionLine)
|
|
81
|
+
newIcon =`var(--${prefix}-${icon})`
|
|
82
|
+
}else{
|
|
83
|
+
newIcon = `var(--Neutral-${icon})`
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
navigator.clipboard.writeText(newIcon)
|
|
87
|
+
.then(() => {
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
this.messageService.add({
|
|
91
|
+
severity: 'success',
|
|
92
|
+
summary: 'Copiado',
|
|
93
|
+
detail: `El color "${newIcon}" ha sido copiado!`
|
|
94
|
+
});
|
|
95
|
+
})
|
|
96
|
+
.catch(error => {
|
|
97
|
+
this.messageService.add({
|
|
98
|
+
severity: 'error',
|
|
99
|
+
summary: 'Error',
|
|
100
|
+
detail: 'No se pudo copiar el nombre.'
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
copyNameSimple(icon){
|
|
106
|
+
console.log("simple");
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
const newIcon =`var(--${icon})`
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
navigator.clipboard.writeText(newIcon)
|
|
113
|
+
.then(() => {
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
this.messageService.add({
|
|
117
|
+
severity: 'success',
|
|
118
|
+
summary: 'Copiado',
|
|
119
|
+
detail: `El color "${newIcon}" ha sido copiado!`
|
|
120
|
+
});
|
|
121
|
+
})
|
|
122
|
+
.catch(error => {
|
|
123
|
+
this.messageService.add({
|
|
124
|
+
severity: 'error',
|
|
125
|
+
summary: 'Error',
|
|
126
|
+
detail: 'No se pudo copiar el nombre.'
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
copyNameTex(icon){
|
|
132
|
+
|
|
133
|
+
navigator.clipboard.writeText(icon)
|
|
134
|
+
.then(() => {
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
this.messageService.add({
|
|
138
|
+
severity: 'success',
|
|
139
|
+
summary: 'Copiado',
|
|
140
|
+
detail: `El color "${icon}" ha sido copiado!`
|
|
141
|
+
});
|
|
142
|
+
})
|
|
143
|
+
.catch(error => {
|
|
144
|
+
this.messageService.add({
|
|
145
|
+
severity: 'error',
|
|
146
|
+
summary: 'Error',
|
|
147
|
+
detail: 'No se pudo copiar el nombre.'
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="tabs-container">
|
|
2
|
+
<div
|
|
3
|
+
class="custom-tab"
|
|
4
|
+
*ngFor="let tab of configuration"
|
|
5
|
+
[ngClass]="{
|
|
6
|
+
'active-tab': tab.id === activeTab && !tab.disabled,
|
|
7
|
+
'disabled-tab': tab.disabled
|
|
8
|
+
}"
|
|
9
|
+
[class.disabled-tab]="tab.disabled"
|
|
10
|
+
(click)="!tab.disabled && onTabClick(tab)"
|
|
11
|
+
>
|
|
12
|
+
<span>
|
|
13
|
+
<p>{{ tab.label | translate }}</p>
|
|
14
|
+
<dropi-badge
|
|
15
|
+
*ngIf="tab?.counter || tab?.counter === 0"
|
|
16
|
+
type="counter"
|
|
17
|
+
[count]="tab.counter"
|
|
18
|
+
[variant]="tab.id === activeTab ? 'primary' : 'tertiary'"
|
|
19
|
+
/>
|
|
20
|
+
</span>
|
|
21
|
+
|
|
22
|
+
<ng-container *ngIf="showIcon">
|
|
23
|
+
<dropi-badge type="state" [state]="tab.completed ? 'check' : 'pending'" />
|
|
24
|
+
</ng-container>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.tabs-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: nowrap;
|
|
4
|
+
overflow: scroll;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 52px;
|
|
7
|
+
|
|
8
|
+
.custom-tab {
|
|
9
|
+
padding-inline: var(--Size-5);
|
|
10
|
+
padding-block: var(--Size-4);
|
|
11
|
+
background-color: var(--Neutral-White);
|
|
12
|
+
border-bottom: 2px solid var(--Gray-Gray-100);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: var(--Size-4);
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
span {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--Size-2, 8px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
p {
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
color: var(--Gray-Gray-400);
|
|
28
|
+
font-weight: var(--font-weight-bold);
|
|
29
|
+
line-height: 20px;
|
|
30
|
+
text-align: left;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.active-tab {
|
|
35
|
+
background-color: var(--Neutral-White);
|
|
36
|
+
border-bottom: 2px solid var(--Primary-Primary-500);
|
|
37
|
+
|
|
38
|
+
p {
|
|
39
|
+
color: var(--Gray-Gray-600);
|
|
40
|
+
font-weight: var(--font-weight-bold);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// disabled-tab debe ir después de active-tab para tener mayor prioridad
|
|
45
|
+
&.disabled-tab {
|
|
46
|
+
background: #dfe4ed38 !important;
|
|
47
|
+
cursor: not-allowed !important;
|
|
48
|
+
opacity: 0.7;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
|
|
51
|
+
p {
|
|
52
|
+
font-weight: 200 !important;
|
|
53
|
+
color: var(--Gray-Gray-300) !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
::-webkit-scrollbar {
|
|
60
|
+
width: 0px;
|
|
61
|
+
height: 0px;
|
|
62
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { Router, NavigationEnd } from '@angular/router';
|
|
3
|
+
import { TabsComponent } from './tabs.component';
|
|
4
|
+
import { IconComponent } from '../icon/icon.component';
|
|
5
|
+
import { TabProperties } from '@app/utilities/interfaces/ui/tabs.interface';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
8
|
+
|
|
9
|
+
describe('TabsComponent', () => {
|
|
10
|
+
let component: TabsComponent;
|
|
11
|
+
let fixture: ComponentFixture<TabsComponent>;
|
|
12
|
+
let mockRouter: any;
|
|
13
|
+
let routerEventsSubject: Subject<any>;
|
|
14
|
+
|
|
15
|
+
beforeEach(async () => {
|
|
16
|
+
routerEventsSubject = new Subject();
|
|
17
|
+
|
|
18
|
+
mockRouter = {
|
|
19
|
+
url: '/test-route',
|
|
20
|
+
events: routerEventsSubject.asObservable(),
|
|
21
|
+
navigate: jest.fn().mockResolvedValue(true),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Crear el componente directamente sin TestBed para evitar problemas de dependencias
|
|
25
|
+
component = new TabsComponent(mockRouter);
|
|
26
|
+
|
|
27
|
+
// Mock fixture básico
|
|
28
|
+
fixture = {
|
|
29
|
+
componentInstance: component,
|
|
30
|
+
detectChanges: () => {},
|
|
31
|
+
nativeElement: {},
|
|
32
|
+
} as any;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe('Inicialización del componente', () => {
|
|
36
|
+
it('should create', () => {
|
|
37
|
+
expect(component).toBeTruthy();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('should initialize with default values', () => {
|
|
41
|
+
expect(component.configuration).toEqual([]);
|
|
42
|
+
expect(component.showIcon).toBe(false);
|
|
43
|
+
expect(component.activeTab).toBe(0);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('should set active tab by route on init', () => {
|
|
47
|
+
const mockConfig: TabProperties[] = [
|
|
48
|
+
{ id: 0, label: 'Tab 1', route: '/test-route' },
|
|
49
|
+
{ id: 1, label: 'Tab 2', route: '/other-route' },
|
|
50
|
+
];
|
|
51
|
+
component.configuration = mockConfig;
|
|
52
|
+
mockRouter.url = '/test-route';
|
|
53
|
+
|
|
54
|
+
component.ngOnInit();
|
|
55
|
+
|
|
56
|
+
expect(component.activeTab).toBe(0);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
describe('Propiedades de entrada', () => {
|
|
61
|
+
it('should accept configuration array', () => {
|
|
62
|
+
const mockConfig: TabProperties[] = [
|
|
63
|
+
{ id: 0, label: 'Tab 1', route: '/route1' },
|
|
64
|
+
{ id: 1, label: 'Tab 2', route: '/route2' },
|
|
65
|
+
];
|
|
66
|
+
component.configuration = mockConfig;
|
|
67
|
+
|
|
68
|
+
expect(component.configuration).toEqual(mockConfig);
|
|
69
|
+
expect(component.configuration.length).toBe(2);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('should accept showIcon flag', () => {
|
|
73
|
+
component.showIcon = true;
|
|
74
|
+
expect(component.showIcon).toBe(true);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should accept activeTab index', () => {
|
|
78
|
+
component.activeTab = 2;
|
|
79
|
+
expect(component.activeTab).toBe(2);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('should handle tabs with completed status', () => {
|
|
83
|
+
const mockConfig: TabProperties[] = [
|
|
84
|
+
{ id: 0, label: 'Tab 1', route: '/route1', completed: true },
|
|
85
|
+
];
|
|
86
|
+
component.configuration = mockConfig;
|
|
87
|
+
|
|
88
|
+
expect(component.configuration[0].completed).toBe(true);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('should handle tabs with counter', () => {
|
|
92
|
+
const mockConfig: TabProperties[] = [{ id: 0, label: 'Tab 1', route: '/route1', counter: 5 }];
|
|
93
|
+
component.configuration = mockConfig;
|
|
94
|
+
|
|
95
|
+
expect(component.configuration[0].counter).toBe(5);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
describe('Funcionalidad de navegación', () => {
|
|
100
|
+
it('should emit onIndexChanged when tab is clicked', () => {
|
|
101
|
+
const emitSpy = jest.spyOn(component.onIndexChanged, 'emit');
|
|
102
|
+
const mockTab: TabProperties = { id: 1, label: 'Tab 2', route: '' };
|
|
103
|
+
|
|
104
|
+
component.onTabClick(mockTab);
|
|
105
|
+
|
|
106
|
+
expect(emitSpy).toHaveBeenCalledWith(mockTab);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('should navigate to route when tab with route is clicked', () => {
|
|
110
|
+
const mockTab: TabProperties = { id: 0, label: 'Tab 1', route: '/test-route' };
|
|
111
|
+
|
|
112
|
+
component.onTabClick(mockTab);
|
|
113
|
+
|
|
114
|
+
expect(mockRouter.navigate).toHaveBeenCalledWith(['/test-route'], { queryParams: {} });
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('should handle route with query params', () => {
|
|
118
|
+
const mockTab: TabProperties = {
|
|
119
|
+
id: 0,
|
|
120
|
+
label: 'Tab 1',
|
|
121
|
+
route: '/test-route?section=invoice',
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
component.onTabClick(mockTab);
|
|
125
|
+
|
|
126
|
+
expect(mockRouter.navigate).toHaveBeenCalledWith(['/test-route'], {
|
|
127
|
+
queryParams: { section: 'invoice' },
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('should set activeTab when tab without route is clicked', () => {
|
|
132
|
+
const mockTab: TabProperties = { id: 2, label: 'Tab 3' };
|
|
133
|
+
|
|
134
|
+
component.onTabClick(mockTab);
|
|
135
|
+
|
|
136
|
+
expect(component.activeTab).toBe(2);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
describe('Detección de cambios de URL', () => {
|
|
141
|
+
it('should update activeTab on route change', () => {
|
|
142
|
+
const mockConfig: TabProperties[] = [
|
|
143
|
+
{ id: 0, label: 'Tab 1', route: '/route1' },
|
|
144
|
+
{ id: 1, label: 'Tab 2', route: '/route2' },
|
|
145
|
+
];
|
|
146
|
+
component.configuration = mockConfig;
|
|
147
|
+
component.ngOnInit();
|
|
148
|
+
|
|
149
|
+
routerEventsSubject.next(new NavigationEnd(1, '/route2', '/route2'));
|
|
150
|
+
|
|
151
|
+
expect(component.activeTab).toBe(1);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('should set activeTab to 0 if route not found', () => {
|
|
155
|
+
const mockConfig: TabProperties[] = [{ id: 0, label: 'Tab 1', route: '/route1' }];
|
|
156
|
+
component.configuration = mockConfig;
|
|
157
|
+
component.ngOnInit();
|
|
158
|
+
|
|
159
|
+
routerEventsSubject.next(new NavigationEnd(1, '/unknown-route', '/unknown-route'));
|
|
160
|
+
|
|
161
|
+
expect(component.activeTab).toBe(0);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
describe('Ciclo de vida', () => {
|
|
166
|
+
it('should unsubscribe on destroy', () => {
|
|
167
|
+
component.configuration = [{ id: 0, label: 'Tab', route: '/route' }];
|
|
168
|
+
component.ngOnInit();
|
|
169
|
+
|
|
170
|
+
const unsubscribeSpy = jest.spyOn(component['subscriptions'], 'unsubscribe');
|
|
171
|
+
|
|
172
|
+
component.ngOnDestroy();
|
|
173
|
+
|
|
174
|
+
expect(unsubscribeSpy).toHaveBeenCalled();
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
describe('Escenarios de integración', () => {
|
|
179
|
+
it('should work with all features enabled', () => {
|
|
180
|
+
const mockConfig: TabProperties[] = [
|
|
181
|
+
{ id: 0, label: 'Tab 1', route: '/route1', completed: true, counter: 3 },
|
|
182
|
+
{ id: 1, label: 'Tab 2', route: '/route2', completed: false, counter: 5 },
|
|
183
|
+
{ id: 2, label: 'Tab 3', route: '/route3', completed: true },
|
|
184
|
+
];
|
|
185
|
+
component.configuration = mockConfig;
|
|
186
|
+
component.showIcon = true;
|
|
187
|
+
component.activeTab = 1;
|
|
188
|
+
|
|
189
|
+
fixture.detectChanges();
|
|
190
|
+
|
|
191
|
+
expect(component.configuration.length).toBe(3);
|
|
192
|
+
expect(component.showIcon).toBe(true);
|
|
193
|
+
expect(component.activeTab).toBe(1);
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it('should handle tab navigation workflow', () => {
|
|
197
|
+
const mockConfig: TabProperties[] = [
|
|
198
|
+
{ id: 0, label: 'Personal', route: '/settings/personal' },
|
|
199
|
+
{ id: 1, label: 'Security', route: '/settings/security' },
|
|
200
|
+
];
|
|
201
|
+
component.configuration = mockConfig;
|
|
202
|
+
component.ngOnInit();
|
|
203
|
+
|
|
204
|
+
const emitSpy = jest.spyOn(component.onIndexChanged, 'emit');
|
|
205
|
+
|
|
206
|
+
component.onTabClick(mockConfig[1]);
|
|
207
|
+
|
|
208
|
+
expect(emitSpy).toHaveBeenCalledWith(mockConfig[1]);
|
|
209
|
+
expect(mockRouter.navigate).toHaveBeenCalled();
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
});
|