@dropi/ui-components 1.0.12 → 1.0.13
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/README.md +55 -36
- package/dist/README.md +58 -38
- package/dist/components-source/accordion/accordion-item/accordion-item.component.d.ts +31 -0
- package/dist/components-source/accordion/accordion.component.d.ts +26 -0
- package/dist/components-source/alert/alert.component.d.ts +32 -0
- package/dist/components-source/alert-modal/alert-modal.component.d.ts +78 -0
- package/dist/components-source/alert-validation/alert-validation.component.d.ts +21 -0
- package/dist/components-source/badge/badge.component.d.ts +12 -0
- package/dist/components-source/beta-tag/beta-tag.component.d.ts +5 -0
- package/dist/components-source/breadcrumb/breadcrumb.component.d.ts +11 -0
- package/dist/components-source/card-product/card-product.component.d.ts +204 -0
- package/dist/components-source/card-section/card-section.component.d.ts +31 -0
- package/dist/components-source/checkbox-selection-list/checkbox-selection-list.component.d.ts +26 -0
- package/dist/components-source/city-selector/city-selector.component.d.ts +17 -0
- package/dist/components-source/color-picker/color-picker.component.d.ts +73 -0
- package/dist/components-source/confirm-dialog/confirm-dialog.component.d.ts +10 -0
- package/dist/components-source/country-flags/country-flags.component.d.ts +12 -0
- package/dist/components-source/date-picker/date-picker.component.d.ts +27 -0
- package/dist/components-source/date-picker-range/date-picker-range.component.d.ts +26 -0
- package/dist/components-source/dropi-avatars/dropi-avatars.component.d.ts +11 -0
- package/dist/components-source/dropi-badge/dropi-badge.component.d.ts +29 -0
- package/dist/components-source/dropi-banner-external/dropi-banner-external.component.d.ts +19 -0
- package/dist/components-source/dropi-breadcrumb/dropi-breadcrumb.component.d.ts +22 -0
- package/dist/components-source/dropi-card-checkbox/dropi-card-checkbox.component.d.ts +20 -0
- package/dist/components-source/dropi-carousel/dropi-carousel.component.d.ts +52 -0
- package/dist/components-source/dropi-checkbox/dropi-checkbox.component.d.ts +11 -0
- package/dist/components-source/dropi-chips/dropi-chips.component.d.ts +17 -0
- package/dist/components-source/dropi-country-selector/countries.data.d.ts +6 -0
- package/dist/components-source/dropi-country-selector/dropi-country-selector.component.d.ts +90 -0
- package/dist/components-source/dropi-drawer/dropi-drawer.component.d.ts +20 -0
- package/dist/components-source/dropi-dropdown/dropi-dropdown.component.d.ts +20 -0
- package/dist/components-source/dropi-favorite-button/dropi-favorite-button.component.d.ts +12 -0
- package/dist/components-source/dropi-file-upload/card-view/card-view.component.d.ts +19 -0
- package/dist/components-source/dropi-file-upload/drop-zone/drop-zone.component.d.ts +38 -0
- package/dist/components-source/dropi-file-upload/dropi-file-upload.component.d.ts +18 -0
- package/dist/components-source/dropi-file-upload/file-list/file-list.component.d.ts +39 -0
- package/dist/components-source/dropi-file-upload/grid-view/grid-view.component.d.ts +15 -0
- package/dist/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.d.ts +20 -0
- package/dist/components-source/dropi-image-overlay/dropi-image-overlay.component.d.ts +8 -0
- package/dist/components-source/dropi-languages-selector/dropi-languages-selector.component.d.ts +18 -0
- package/dist/components-source/dropi-logo/dropi-logo.component.d.ts +12 -0
- package/dist/components-source/dropi-modal/dropi-modal.component.d.ts +34 -0
- package/dist/components-source/dropi-modal/p-template.directive.d.ts +9 -0
- package/dist/components-source/dropi-navbar/dropi-navbar.component.d.ts +20 -0
- package/dist/components-source/dropi-paginator/dropi-paginator.component.d.ts +21 -0
- package/dist/components-source/dropi-phone-input/dropi-phone-input.component.d.ts +55 -0
- package/dist/components-source/dropi-radio-button/dropi-radio-button.component.d.ts +17 -0
- package/dist/components-source/dropi-search/dropi-search.component.d.ts +40 -0
- package/dist/components-source/dropi-select/dropi-select.component.d.ts +34 -0
- package/dist/components-source/dropi-skeleton/dropi-skeleton.component.d.ts +14 -0
- package/dist/components-source/dropi-steps/dropi-steps.component.d.ts +64 -0
- package/dist/components-source/dropi-switch/dropi-switch.component.d.ts +11 -0
- package/dist/components-source/dropi-table/dropi-table.component.d.ts +82 -0
- package/dist/components-source/dropi-tag/dropi-tag.component.d.ts +15 -0
- package/dist/components-source/dropi-text-area/dropi-text-area.component.d.ts +14 -0
- package/dist/components-source/dropi-tooltip/dropi-tooltip.component.d.ts +28 -0
- package/dist/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.d.ts +16 -0
- package/dist/components-source/empty/empty.component.d.ts +9 -0
- package/dist/components-source/empty-state/empty-state.component.d.ts +17 -0
- package/dist/components-source/file-upload-progress-bar/file-upload-progress-bar.component.d.ts +30 -0
- package/dist/components-source/index.d.ts +85 -0
- package/dist/components-source/input/input.component.d.ts +33 -0
- package/dist/components-source/lottie-loader/lottie-loader.component.d.ts +9 -0
- package/dist/components-source/otp-send-code/otp-send-code.component.d.ts +83 -0
- package/dist/components-source/radio-selection-list/radio-selection-list.component.d.ts +30 -0
- package/dist/components-source/read-more/read-more.component.d.ts +60 -0
- package/dist/components-source/sidebar/sidebar.component.d.ts +27 -0
- package/dist/components-source/simple-stepper/simple-stepper.component.d.ts +21 -0
- package/dist/components-source/spinner/spinner.component.d.ts +9 -0
- package/dist/components-source/tabs/tabs.component.d.ts +27 -0
- package/dist/components-source/tag-type-product/tag-type-product.component.d.ts +5 -0
- package/dist/components-source/toast/toast.component.d.ts +21 -0
- package/dist/components-source/toggle/input-toggle.component.d.ts +11 -0
- package/dist/components-source/tooltip/tooltip.component.d.ts +15 -0
- package/dist/components-source/vertical-steps/vertical-steps.component.d.ts +27 -0
- package/dist/esm2022/components-source/accordion/accordion-item/accordion-item.component.mjs +51 -0
- package/dist/esm2022/components-source/accordion/accordion.component.mjs +46 -0
- package/dist/esm2022/components-source/alert/alert.component.mjs +114 -0
- package/dist/esm2022/components-source/alert-modal/alert-modal.component.mjs +247 -0
- package/dist/esm2022/components-source/alert-validation/alert-validation.component.mjs +53 -0
- package/dist/esm2022/components-source/badge/badge.component.mjs +23 -0
- package/dist/esm2022/components-source/beta-tag/beta-tag.component.mjs +11 -0
- package/dist/esm2022/components-source/breadcrumb/breadcrumb.component.mjs +26 -0
- package/dist/esm2022/components-source/card-product/card-product.component.mjs +534 -0
- package/dist/esm2022/components-source/card-section/card-section.component.mjs +91 -0
- package/dist/esm2022/components-source/checkbox-selection-list/checkbox-selection-list.component.mjs +79 -0
- package/dist/esm2022/components-source/city-selector/city-selector.component.mjs +53 -0
- package/dist/esm2022/components-source/color-picker/color-picker.component.mjs +320 -0
- package/dist/esm2022/components-source/confirm-dialog/confirm-dialog.component.mjs +27 -0
- package/dist/esm2022/components-source/country-flags/country-flags.component.mjs +27 -0
- package/dist/esm2022/components-source/date-picker/date-picker.component.mjs +73 -0
- package/dist/esm2022/components-source/date-picker-range/date-picker-range.component.mjs +67 -0
- package/dist/esm2022/components-source/dropi-avatars/dropi-avatars.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-badge/dropi-badge.component.mjs +45 -0
- package/dist/esm2022/components-source/dropi-banner-external/dropi-banner-external.component.mjs +39 -0
- package/dist/esm2022/components-source/dropi-breadcrumb/dropi-breadcrumb.component.mjs +45 -0
- package/dist/esm2022/components-source/dropi-card-checkbox/dropi-card-checkbox.component.mjs +53 -0
- package/dist/esm2022/components-source/dropi-carousel/dropi-carousel.component.mjs +243 -0
- package/dist/esm2022/components-source/dropi-checkbox/dropi-checkbox.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-chips/dropi-chips.component.mjs +38 -0
- package/dist/esm2022/components-source/dropi-country-selector/countries.data.mjs +254 -0
- package/dist/esm2022/components-source/dropi-country-selector/dropi-country-selector.component.mjs +183 -0
- package/dist/esm2022/components-source/dropi-drawer/dropi-drawer.component.mjs +69 -0
- package/dist/esm2022/components-source/dropi-dropdown/dropi-dropdown.component.mjs +59 -0
- package/dist/esm2022/components-source/dropi-favorite-button/dropi-favorite-button.component.mjs +33 -0
- package/dist/esm2022/components-source/dropi-file-upload/card-view/card-view.component.mjs +47 -0
- package/dist/esm2022/components-source/dropi-file-upload/drop-zone/drop-zone.component.mjs +115 -0
- package/dist/esm2022/components-source/dropi-file-upload/dropi-file-upload.component.mjs +66 -0
- package/dist/esm2022/components-source/dropi-file-upload/file-list/file-list.component.mjs +95 -0
- package/dist/esm2022/components-source/dropi-file-upload/grid-view/grid-view.component.mjs +37 -0
- package/dist/esm2022/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.mjs +59 -0
- package/dist/esm2022/components-source/dropi-image-overlay/dropi-image-overlay.component.mjs +31 -0
- package/dist/esm2022/components-source/dropi-languages-selector/dropi-languages-selector.component.mjs +38 -0
- package/dist/esm2022/components-source/dropi-logo/dropi-logo.component.mjs +27 -0
- package/dist/esm2022/components-source/dropi-modal/dropi-modal.component.mjs +92 -0
- package/dist/esm2022/components-source/dropi-modal/p-template.directive.mjs +22 -0
- package/dist/esm2022/components-source/dropi-navbar/dropi-navbar.component.mjs +51 -0
- package/dist/esm2022/components-source/dropi-paginator/dropi-paginator.component.mjs +89 -0
- package/dist/esm2022/components-source/dropi-phone-input/dropi-phone-input.component.mjs +155 -0
- package/dist/esm2022/components-source/dropi-radio-button/dropi-radio-button.component.mjs +48 -0
- package/dist/esm2022/components-source/dropi-search/dropi-search.component.mjs +104 -0
- package/dist/esm2022/components-source/dropi-select/dropi-select.component.mjs +96 -0
- package/dist/esm2022/components-source/dropi-skeleton/dropi-skeleton.component.mjs +39 -0
- package/dist/esm2022/components-source/dropi-steps/dropi-steps.component.mjs +97 -0
- package/dist/esm2022/components-source/dropi-switch/dropi-switch.component.mjs +22 -0
- package/dist/esm2022/components-source/dropi-table/dropi-table.component.mjs +333 -0
- package/dist/esm2022/components-source/dropi-tag/dropi-tag.component.mjs +36 -0
- package/dist/esm2022/components-source/dropi-text-area/dropi-text-area.component.mjs +53 -0
- package/dist/esm2022/components-source/dropi-tooltip/dropi-tooltip.component.mjs +78 -0
- package/dist/esm2022/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.mjs +46 -0
- package/dist/esm2022/components-source/empty/empty.component.mjs +18 -0
- package/dist/esm2022/components-source/empty-state/empty-state.component.mjs +62 -0
- package/dist/esm2022/components-source/file-upload-progress-bar/file-upload-progress-bar.component.mjs +91 -0
- package/dist/esm2022/components-source/index.mjs +107 -0
- package/dist/esm2022/components-source/input/input.component.mjs +104 -0
- package/dist/esm2022/components-source/lottie-loader/lottie-loader.component.mjs +25 -0
- package/dist/esm2022/components-source/otp-send-code/otp-send-code.component.mjs +201 -0
- package/dist/esm2022/components-source/radio-selection-list/radio-selection-list.component.mjs +89 -0
- package/dist/esm2022/components-source/read-more/read-more.component.mjs +91 -0
- package/dist/esm2022/components-source/sidebar/sidebar.component.mjs +88 -0
- package/dist/esm2022/components-source/simple-stepper/simple-stepper.component.mjs +60 -0
- package/dist/esm2022/components-source/spinner/spinner.component.mjs +19 -0
- package/dist/esm2022/components-source/tabs/tabs.component.mjs +83 -0
- package/dist/esm2022/components-source/tag-type-product/tag-type-product.component.mjs +11 -0
- package/dist/esm2022/components-source/toast/toast.component.mjs +47 -0
- package/dist/esm2022/components-source/toggle/input-toggle.component.mjs +36 -0
- package/dist/esm2022/components-source/tooltip/tooltip.component.mjs +34 -0
- package/dist/esm2022/components-source/vertical-steps/vertical-steps.component.mjs +75 -0
- package/dist/esm2022/lib/elements-registry.mjs +343 -2
- package/dist/esm2022/utilities/interfaces/ui/dropi-table.interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/input-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/select-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/selection-list-interface.mjs +2 -0
- package/dist/esm2022/utilities/interfaces/ui/upload.model.mjs +5 -0
- package/dist/fesm2022/dropi-ui-components.mjs +5913 -2
- package/dist/fesm2022/dropi-ui-components.mjs.map +1 -1
- package/dist/utilities/interfaces/ui/dropi-table.interface.d.ts +45 -0
- package/dist/utilities/interfaces/ui/input-interface.d.ts +33 -0
- package/dist/utilities/interfaces/ui/select-interface.d.ts +8 -0
- package/dist/utilities/interfaces/ui/selection-list-interface.d.ts +24 -0
- package/dist/utilities/interfaces/ui/upload.model.d.ts +30 -0
- package/package.json +18 -6
- package/src/components-source/alert/alert.component.ts +12 -129
- package/src/components-source/alert-modal/alert-modal.component.ts +84 -114
- package/src/components-source/alert-validation/alert-validation.component.html +8 -0
- package/src/components-source/alert-validation/alert-validation.component.scss +225 -0
- package/src/components-source/alert-validation/alert-validation.component.ts +43 -0
- package/src/components-source/beta-tag/beta-tag.component.html +1 -0
- package/src/components-source/beta-tag/beta-tag.component.scss +26 -0
- package/src/components-source/beta-tag/beta-tag.component.ts +11 -0
- package/src/components-source/breadcrumb/breadcrumb.component.html +13 -5
- package/src/components-source/breadcrumb/breadcrumb.component.scss +8 -1
- package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +26 -26
- package/src/components-source/breadcrumb/breadcrumb.component.ts +10 -12
- package/src/components-source/card-product/card-product.component.spec.ts +9 -9
- package/src/components-source/card-product/card-product.component.stories.ts +2 -2
- package/src/components-source/card-product/card-product.component.ts +294 -818
- package/src/components-source/card-section/card-section.component.html +7 -7
- package/src/components-source/card-section/card-section.component.ts +41 -15
- package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +42 -179
- package/src/components-source/city-selector/city-selector.component.ts +37 -137
- package/src/components-source/confirm-dialog/confirm-dialog.component.html +26 -0
- package/src/components-source/confirm-dialog/confirm-dialog.component.scss +55 -0
- package/src/components-source/confirm-dialog/confirm-dialog.component.ts +22 -0
- package/src/components-source/country-flags/country-flags.component.ts +20 -12
- package/src/components-source/date-picker/date-picker.component.ts +32 -292
- package/src/components-source/date-picker-range/date-picker-range.component.html +15 -7
- package/src/components-source/date-picker-range/date-picker-range.component.ts +42 -235
- package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +24 -185
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +21 -21
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +9 -9
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +41 -23
- package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +12 -12
- package/src/components-source/dropi-chips/dropi-chips.component.ts +22 -87
- package/src/components-source/dropi-country-selector/countries.data.ts +256 -236
- package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +37 -25
- package/src/components-source/dropi-drawer/dropi-drawer.component.ts +91 -78
- package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +44 -47
- package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +33 -53
- package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +52 -123
- package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +38 -294
- package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +62 -43
- package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +23 -22
- package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +6 -2
- package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +16 -71
- package/src/components-source/dropi-modal/dropi-modal.component.ts +56 -372
- package/src/components-source/dropi-navbar/dropi-navbar.component.ts +17 -17
- package/src/components-source/dropi-paginator/dropi-paginator.component.html +18 -7
- package/src/components-source/dropi-paginator/dropi-paginator.component.ts +40 -32
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +78 -79
- package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +29 -85
- package/src/components-source/dropi-search/dropi-search.component.ts +59 -222
- package/src/components-source/dropi-select/dropi-select.component.html +82 -131
- package/src/components-source/dropi-select/dropi-select.component.ts +60 -423
- package/src/components-source/dropi-table/dropi-table.component.html +40 -23
- package/src/components-source/dropi-table/dropi-table.component.ts +130 -374
- package/src/components-source/dropi-tag/dropi-tag.component.ts +20 -90
- package/src/components-source/dropi-text-area/dropi-text-area.component.ts +22 -48
- package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +40 -129
- package/src/components-source/empty/empty.component.html +3 -0
- package/src/components-source/empty/empty.component.scss +0 -0
- package/src/components-source/empty/empty.component.ts +16 -0
- package/src/components-source/empty-state/empty-state.component.ts +47 -19
- package/src/components-source/index.ts +82 -37
- package/src/components-source/input/input.component.html +79 -63
- package/src/components-source/input/input.component.ts +51 -97
- package/src/components-source/lottie-loader/lottie-loader.component.ts +13 -16
- package/src/components-source/otp-send-code/otp-send-code.component.ts +60 -528
- package/src/components-source/radio-selection-list/radio-selection-list.component.ts +36 -97
- package/src/components-source/sidebar/sidebar.component.spec.ts +11 -11
- package/src/components-source/sidebar/sidebar.component.stories.ts +3 -3
- package/src/components-source/sidebar/sidebar.component.ts +51 -47
- package/src/components-source/simple-stepper/simple-stepper.component.ts +20 -35
- package/src/components-source/spinner/spinner.component.html +6 -0
- package/src/components-source/spinner/spinner.component.scss +15 -0
- package/src/components-source/spinner/spinner.component.ts +17 -0
- package/src/components-source/tabs/tabs.component.spec.ts +8 -8
- package/src/components-source/tabs/tabs.component.stories.ts +5 -5
- package/src/components-source/tabs/tabs.component.ts +41 -83
- package/src/components-source/toast/toast.component.ts +40 -46
- package/src/components-source/toggle/input-toggle.component.html +34 -0
- package/src/components-source/toggle/input-toggle.component.scss +0 -0
- package/src/components-source/toggle/input-toggle.component.ts +27 -0
- package/src/components-source/toggle/inputToggleConfig.ts +11 -0
- package/src/components-source/tooltip/tooltip.component.html +22 -11
- package/src/components-source/tooltip/tooltip.component.ts +28 -13
- package/src/components-source/vertical-steps/vertical-steps.component.ts +16 -78
- package/src/lib/elements-registry.ts +413 -1
- package/src/lib/router-stub.ts +7 -0
- package/src/libreria work space.code-workspace +11 -8
- package/src/utilities/interfaces/ui/dropi-table.interface.ts +60 -0
- package/src/utilities/interfaces/ui/input-interface.ts +34 -0
- package/src/utilities/interfaces/ui/select-interface.ts +8 -0
- package/src/utilities/interfaces/ui/selection-list-interface.ts +15 -0
- package/src/utilities/interfaces/ui/upload.model.ts +41 -0
|
@@ -1,102 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
OnInit,
|
|
5
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
6
|
+
} from "@angular/core";
|
|
1
7
|
import { CommonModule } from "@angular/common";
|
|
2
|
-
import { Component, Input, OnInit } from "@angular/core";
|
|
3
|
-
import { IconComponent } from "../icon/icon.component";
|
|
4
|
-
import { trigger, transition, style, animate } from "@angular/animations";
|
|
5
|
-
|
|
6
|
-
export type tagStates =
|
|
7
|
-
| "default"
|
|
8
|
-
| "success"
|
|
9
|
-
| "info"
|
|
10
|
-
| "warning"
|
|
11
|
-
| "error"
|
|
12
|
-
| "legacy";
|
|
13
|
-
export type tagTypes = "primary" | "secondary";
|
|
14
8
|
|
|
15
9
|
@Component({
|
|
16
|
-
selector: "dropi-
|
|
10
|
+
selector: "dropi-tag",
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [CommonModule],
|
|
13
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
17
14
|
templateUrl: "./dropi-tag.component.html",
|
|
18
15
|
styleUrls: ["./dropi-tag.component.scss"],
|
|
19
|
-
standalone: true,
|
|
20
|
-
imports: [CommonModule, IconComponent],
|
|
21
|
-
animations: [
|
|
22
|
-
trigger("fade", [
|
|
23
|
-
transition(":enter", [
|
|
24
|
-
style({ opacity: 0, transform: "scale(0.8)" }),
|
|
25
|
-
animate("200ms ease-out", style({ opacity: 1, transform: "scale(1)" })),
|
|
26
|
-
]),
|
|
27
|
-
transition(":leave", [
|
|
28
|
-
animate(
|
|
29
|
-
"150ms ease-in",
|
|
30
|
-
style({ opacity: 0, transform: "scale(0.8)" }),
|
|
31
|
-
),
|
|
32
|
-
]),
|
|
33
|
-
]),
|
|
34
|
-
],
|
|
35
16
|
})
|
|
36
17
|
export class DropiTagComponent implements OnInit {
|
|
37
|
-
@Input()
|
|
38
|
-
@Input()
|
|
39
|
-
@Input()
|
|
40
|
-
@Input()
|
|
41
|
-
@Input()
|
|
42
|
-
|
|
43
|
-
colorMap: { [key: string]: string } = {
|
|
44
|
-
default: "Primary-Primary",
|
|
45
|
-
success: "Success-Success",
|
|
46
|
-
info: "Info-Info",
|
|
47
|
-
warning: "Warning-Warning",
|
|
48
|
-
error: "Error-Error",
|
|
49
|
-
legacy: "Gray-Gray",
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
fontColor: string;
|
|
53
|
-
|
|
54
|
-
get hasContent(): boolean {
|
|
55
|
-
return !!(this.text && this.text.trim().length > 0);
|
|
56
|
-
}
|
|
18
|
+
@Input() public label: string = "";
|
|
19
|
+
@Input() public text: string = "";
|
|
20
|
+
@Input() public icon: string = "";
|
|
21
|
+
@Input() public showIcon: boolean = false;
|
|
22
|
+
@Input() public fontColor: string = "inherit";
|
|
23
|
+
@Input() public hasContent: boolean = true;
|
|
57
24
|
|
|
58
|
-
|
|
59
|
-
this.setState();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
selectStyle() {
|
|
63
|
-
let stylesTags = {
|
|
64
|
-
primary: {
|
|
65
|
-
bgc: `var(--${this.colorMap[this.state]}-500)`,
|
|
66
|
-
cl: "var(--Neutral-White)",
|
|
67
|
-
},
|
|
68
|
-
secondary: {
|
|
69
|
-
bgc: `var(--${this.colorMap[this.state]}${this.state == "default" || this.state == "legacy" ? "-100" : "-50"})`,
|
|
70
|
-
cl: `var(--${this.colorMap[this.state]}${this.state == "default" ? "-500" : "-700"})`,
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
let styleToApply: {
|
|
75
|
-
"background-color": any;
|
|
76
|
-
"border-radius": any;
|
|
77
|
-
color: any;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
if (stylesTags.hasOwnProperty(this.type)) {
|
|
81
|
-
const selectedStyle = stylesTags[this.type];
|
|
25
|
+
constructor() {}
|
|
82
26
|
|
|
83
|
-
|
|
84
|
-
"background-color": selectedStyle.bgc,
|
|
85
|
-
"border-radius": "var(--Border-5)",
|
|
86
|
-
color: selectedStyle.cl,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
this.fontColor =
|
|
90
|
-
this.type == "primary"
|
|
91
|
-
? "Neutral-White"
|
|
92
|
-
: this.colorMap[this.state] +
|
|
93
|
-
(this.state == "default" ? "-500" : "-700");
|
|
94
|
-
|
|
95
|
-
return styleToApply;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
27
|
+
ngOnInit(): void {}
|
|
98
28
|
|
|
99
|
-
setState() {
|
|
100
|
-
return
|
|
29
|
+
public setState(): any {
|
|
30
|
+
return {};
|
|
101
31
|
}
|
|
102
32
|
}
|
|
@@ -1,50 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
OnInit,
|
|
5
|
+
Inject,
|
|
6
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { CommonModule } from "@angular/common";
|
|
9
|
+
import { Validators, ReactiveFormsModule } from "@angular/forms";
|
|
10
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
11
|
+
import { TextAreaProperties } from "../../utilities/interfaces/ui/input-interface";
|
|
7
12
|
|
|
8
13
|
@Component({
|
|
9
|
-
selector:
|
|
14
|
+
selector: "app-dropi-text-area",
|
|
10
15
|
standalone: true,
|
|
11
|
-
imports: [CommonModule, ReactiveFormsModule, TranslateModule
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
imports: [CommonModule, ReactiveFormsModule, TranslateModule],
|
|
17
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
18
|
+
templateUrl: "./dropi-text-area.component.html",
|
|
19
|
+
styleUrls: ["./dropi-text-area.component.scss"],
|
|
14
20
|
})
|
|
15
21
|
export class DropiTextAreaComponent implements OnInit {
|
|
16
|
-
/**
|
|
17
|
-
* Define las propiedades necesarias para un textArea.
|
|
18
|
-
*
|
|
19
|
-
* Cada campo debe contener las siguientes propiedades:
|
|
20
|
-
* - `formControl`: Control de formulario asociado al campo.
|
|
21
|
-
* - `label`: Texto descriptivo que se mostrará como etiqueta.
|
|
22
|
-
* - `placeholder`: Texto de ejemplo dentro del campo.
|
|
23
|
-
* - `maxLength`: Número máximo de caracteres permitidos.
|
|
24
|
-
*
|
|
25
|
-
* Propiedades opcionales:
|
|
26
|
-
* - `textHelper`: Texto de ayuda que se mostrará debajo del campo.
|
|
27
|
-
* - `id`: Identificador único del campo, personalizado.
|
|
28
|
-
* - `rows`: Número de filas visibles en el área de texto.
|
|
29
|
-
* - `resize`: Indica si el área de texto puede ser redimensionada por el usuario ('none' | 'both' | 'horizontal' | 'vertical').
|
|
30
|
-
* @type {TextAreaProperties}
|
|
31
|
-
*/
|
|
32
22
|
@Input() public textAreaProperties: TextAreaProperties;
|
|
33
|
-
/**
|
|
34
|
-
* Indica si se debe mostrar deshabilitiado el input.
|
|
35
|
-
*
|
|
36
|
-
* Valor por defecto: `false`.
|
|
37
|
-
*
|
|
38
|
-
* @type {boolean}
|
|
39
|
-
*/
|
|
40
23
|
@Input() public disabled: boolean = false;
|
|
41
|
-
/**
|
|
42
|
-
* Indica si se debe mostrar el asterisco de obligatorio basado en si es requerido el formControl
|
|
43
|
-
*
|
|
44
|
-
* Valor por defecto: `false`.
|
|
45
|
-
*
|
|
46
|
-
* @type {boolean}
|
|
47
|
-
*/
|
|
48
24
|
@Input() public showObligatoryAsterisk: boolean = false;
|
|
49
25
|
|
|
50
26
|
ngOnInit() {
|
|
@@ -55,26 +31,24 @@ export class DropiTextAreaComponent implements OnInit {
|
|
|
55
31
|
const control = this.textAreaProperties?.formControl;
|
|
56
32
|
if (!control || !control.validator) return false;
|
|
57
33
|
const validationResult = control.validator({} as any);
|
|
58
|
-
|
|
59
|
-
return !!validationResult?.['required'];
|
|
34
|
+
return !!validationResult?.["required"];
|
|
60
35
|
}
|
|
61
36
|
|
|
62
37
|
validateDisabled() {
|
|
63
38
|
if (this.disabled) {
|
|
64
|
-
this.textAreaProperties
|
|
39
|
+
this.textAreaProperties?.formControl?.disable();
|
|
65
40
|
} else {
|
|
66
|
-
this.textAreaProperties
|
|
41
|
+
this.textAreaProperties?.formControl?.enable();
|
|
67
42
|
}
|
|
68
43
|
}
|
|
69
44
|
|
|
70
45
|
getErrorMessage(): string {
|
|
71
46
|
const control = this.textAreaProperties?.formControl;
|
|
72
|
-
|
|
73
47
|
if (control?.errors) {
|
|
74
|
-
if (control.errors[
|
|
75
|
-
return
|
|
48
|
+
if (control.errors["required"]) {
|
|
49
|
+
return "This field is required";
|
|
76
50
|
}
|
|
77
51
|
}
|
|
78
|
-
return
|
|
52
|
+
return "";
|
|
79
53
|
}
|
|
80
54
|
}
|
|
@@ -2,152 +2,63 @@ import {
|
|
|
2
2
|
Component,
|
|
3
3
|
Input,
|
|
4
4
|
OnInit,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ChangeDetectorRef,
|
|
9
|
-
} from '@angular/core';
|
|
10
|
-
import { CommonModule } from '@angular/common';
|
|
11
|
-
import { IconComponent } from '../icon/icon.component';
|
|
12
|
-
import { animate, style, transition, trigger } from '@angular/animations';
|
|
13
|
-
|
|
14
|
-
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
15
|
-
export type TooltipTrigger = 'hover' | 'click' | 'focus';
|
|
16
|
-
export type ArrowPosition = 'start' | 'center' | 'end';
|
|
5
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
6
|
+
} from "@angular/core";
|
|
7
|
+
import { CommonModule } from "@angular/common";
|
|
17
8
|
|
|
18
9
|
@Component({
|
|
19
|
-
selector:
|
|
10
|
+
selector: "app-dropi-tooltip",
|
|
20
11
|
standalone: true,
|
|
21
|
-
imports: [CommonModule
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
animations: [
|
|
26
|
-
trigger('tooltipAnimation', [
|
|
27
|
-
transition(':enter', [
|
|
28
|
-
style({ opacity: 0 }),
|
|
29
|
-
animate('200ms ease-out', style({ opacity: 1 })),
|
|
30
|
-
]),
|
|
31
|
-
transition(':leave', [animate('150ms ease-in', style({ opacity: 0 }))]),
|
|
32
|
-
]),
|
|
33
|
-
],
|
|
12
|
+
imports: [CommonModule],
|
|
13
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
14
|
+
templateUrl: "./dropi-tooltip.component.html",
|
|
15
|
+
styleUrls: ["./dropi-tooltip.component.scss"],
|
|
34
16
|
})
|
|
35
17
|
export class DropiTooltipComponent implements OnInit {
|
|
36
|
-
@Input() text: string =
|
|
37
|
-
@Input()
|
|
38
|
-
@Input()
|
|
39
|
-
@Input() position:
|
|
40
|
-
@Input() arrowPosition:
|
|
41
|
-
@Input() trigger:
|
|
42
|
-
@Input() disabled: boolean = false;
|
|
43
|
-
@Input() showIcon: boolean = true;
|
|
44
|
-
@Input()
|
|
45
|
-
@Input()
|
|
46
|
-
@Input()
|
|
47
|
-
@Input()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
private cdr: ChangeDetectorRef,
|
|
57
|
-
) {}
|
|
58
|
-
|
|
59
|
-
ngOnInit(): void {}
|
|
60
|
-
|
|
61
|
-
@HostListener('document:click', ['$event'])
|
|
62
|
-
onDocumentClick(event: Event): void {
|
|
63
|
-
if (this.trigger === 'click' && this.isVisible) {
|
|
64
|
-
const target = event.target as HTMLElement;
|
|
65
|
-
if (!this.elementRef.nativeElement.contains(target)) {
|
|
66
|
-
this.hide();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
18
|
+
@Input() public text: string = "";
|
|
19
|
+
@Input() public maxWidth: string = "200px";
|
|
20
|
+
@Input() public minWidth: string = "auto";
|
|
21
|
+
@Input() public position: "top" | "bottom" | "left" | "right" = "top";
|
|
22
|
+
@Input() public arrowPosition: "start" | "center" | "end" = "center";
|
|
23
|
+
@Input() public trigger: "hover" | "click" | "focus" = "hover";
|
|
24
|
+
@Input() public disabled: boolean = false;
|
|
25
|
+
@Input() public showIcon: boolean = true;
|
|
26
|
+
@Input() public iconName: string = "Info";
|
|
27
|
+
@Input() public iconColor: string = "currentColor";
|
|
28
|
+
@Input() public iconSize: string = "24px";
|
|
29
|
+
@Input() public showX: boolean = false;
|
|
30
|
+
|
|
31
|
+
public isVisible: boolean = false;
|
|
32
|
+
public displayContent: string = "";
|
|
33
|
+
|
|
34
|
+
constructor() {}
|
|
35
|
+
|
|
36
|
+
ngOnInit(): void {
|
|
37
|
+
this.displayContent = this.text;
|
|
69
38
|
}
|
|
70
39
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (this.isVisible) {
|
|
74
|
-
this.clearTimeout();
|
|
75
|
-
this.timeoutId = setTimeout(() => {
|
|
76
|
-
this.hide();
|
|
77
|
-
}, 10);
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
}
|
|
40
|
+
public onMouseEnter(): void {
|
|
41
|
+
if (!this.disabled && this.trigger === "hover") this.isVisible = true;
|
|
80
42
|
}
|
|
81
43
|
|
|
82
|
-
|
|
83
|
-
if (this.
|
|
84
|
-
this.clearTimeout();
|
|
85
|
-
this.show();
|
|
44
|
+
public onMouseLeave(): void {
|
|
45
|
+
if (this.trigger === "hover") this.isVisible = false;
|
|
86
46
|
}
|
|
87
47
|
|
|
88
|
-
|
|
89
|
-
if (this.disabled
|
|
90
|
-
|
|
91
|
-
this.timeoutId = setTimeout(() => {
|
|
92
|
-
this.hide();
|
|
93
|
-
}, 10);
|
|
48
|
+
public onClick(): void {
|
|
49
|
+
if (!this.disabled && this.trigger === "click")
|
|
50
|
+
this.isVisible = !this.isVisible;
|
|
94
51
|
}
|
|
95
52
|
|
|
96
|
-
|
|
97
|
-
if (this.disabled
|
|
98
|
-
this.toggle();
|
|
53
|
+
public onFocus(): void {
|
|
54
|
+
if (!this.disabled && this.trigger === "focus") this.isVisible = true;
|
|
99
55
|
}
|
|
100
56
|
|
|
101
|
-
|
|
102
|
-
if (this.
|
|
103
|
-
this.show();
|
|
57
|
+
public onBlur(): void {
|
|
58
|
+
if (this.trigger === "focus") this.isVisible = false;
|
|
104
59
|
}
|
|
105
60
|
|
|
106
|
-
|
|
107
|
-
if (this.disabled || this.trigger !== 'focus') return;
|
|
108
|
-
this.hide();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
onCloseClick(): void {
|
|
112
|
-
this.hide();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
show(): void {
|
|
116
|
-
if (this.disabled || (!this.text.trim() && !this.title.trim() && !this.label.trim())) return;
|
|
117
|
-
this.isVisible = true;
|
|
118
|
-
this.cdr.detectChanges();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
hide(): void {
|
|
61
|
+
public onCloseClick(): void {
|
|
122
62
|
this.isVisible = false;
|
|
123
|
-
this.cdr.detectChanges();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
toggle(): void {
|
|
127
|
-
if (this.isVisible) {
|
|
128
|
-
this.hide();
|
|
129
|
-
} else {
|
|
130
|
-
this.show();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
private clearTimeout(): void {
|
|
135
|
-
if (this.timeoutId) {
|
|
136
|
-
clearTimeout(this.timeoutId);
|
|
137
|
-
this.timeoutId = null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
ngOnDestroy(): void {
|
|
142
|
-
this.clearTimeout();
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Helper para obtener el contenido a mostrar
|
|
146
|
-
get displayContent(): string {
|
|
147
|
-
if (this.text) return this.text;
|
|
148
|
-
if (this.title && this.label) return `<strong>${this.title}</strong><br>${this.label}`;
|
|
149
|
-
if (this.title) return this.title;
|
|
150
|
-
if (this.label) return this.label;
|
|
151
|
-
return '';
|
|
152
63
|
}
|
|
153
64
|
}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-empty',
|
|
6
|
+
templateUrl: './empty.component.html',
|
|
7
|
+
styleUrls: ['./empty.component.scss'],
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [TranslateModule]
|
|
10
|
+
})
|
|
11
|
+
export class EmptyComponent implements OnInit {
|
|
12
|
+
@Input() public text: string = 'No results';
|
|
13
|
+
constructor() {}
|
|
14
|
+
|
|
15
|
+
ngOnInit(): void {}
|
|
16
|
+
}
|
|
@@ -1,31 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
Output,
|
|
7
|
+
Inject,
|
|
8
|
+
CUSTOM_ELEMENTS_SCHEMA,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { ButtonComponent } from "../dropi-button/dropi-button.component";
|
|
12
|
+
import { IconComponent } from "../icon/icon.component";
|
|
13
|
+
import { TranslateModule } from "@ngx-translate/core";
|
|
14
|
+
import { DropiIlustrationIconComponent } from "../dropi-ilustration-icon/dropi-ilustration-icon.component";
|
|
8
15
|
|
|
9
16
|
@Component({
|
|
10
|
-
selector:
|
|
17
|
+
selector: "app-empty-state",
|
|
11
18
|
standalone: true,
|
|
12
|
-
imports: [
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
imports: [
|
|
20
|
+
CommonModule,
|
|
21
|
+
ButtonComponent,
|
|
22
|
+
IconComponent,
|
|
23
|
+
TranslateModule,
|
|
24
|
+
DropiIlustrationIconComponent,
|
|
25
|
+
],
|
|
26
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
27
|
+
templateUrl: "./empty-state.component.html",
|
|
28
|
+
styleUrls: ["./empty-state.component.scss"],
|
|
15
29
|
})
|
|
16
30
|
export class EmptyStateComponent implements OnInit {
|
|
17
|
-
@Input() buttonText: string =
|
|
18
|
-
@Input() description: string =
|
|
19
|
-
@Input() buttonSeverity:
|
|
20
|
-
@Input() title: string =
|
|
31
|
+
@Input() buttonText: string = "";
|
|
32
|
+
@Input() description: string = "";
|
|
33
|
+
@Input() buttonSeverity: "primary" | "secondary" | "tertiary" = "tertiary";
|
|
34
|
+
@Input() title: string = "";
|
|
21
35
|
@Output() buttonClickEvent = new EventEmitter();
|
|
22
|
-
brandName: string;
|
|
23
|
-
@Input() dropiIcon:
|
|
36
|
+
brandName: string = "dropi";
|
|
37
|
+
@Input() dropiIcon:
|
|
38
|
+
| "success"
|
|
39
|
+
| "error"
|
|
40
|
+
| "warning"
|
|
41
|
+
| "info"
|
|
42
|
+
| "default"
|
|
43
|
+
| "loading"
|
|
44
|
+
| "sorry" = "default";
|
|
24
45
|
|
|
46
|
+
constructor(
|
|
47
|
+
@Inject("SettingsService") private readonly settingsService: any,
|
|
48
|
+
) {}
|
|
25
49
|
|
|
26
|
-
constructor(private readonly settingsService: SettingsService) {}
|
|
27
50
|
ngOnInit(): void {
|
|
28
|
-
|
|
51
|
+
try {
|
|
52
|
+
this.brandName =
|
|
53
|
+
this.settingsService?.getBrandInfo()?.name?.toLowerCase() || "dropi";
|
|
54
|
+
} catch (e) {
|
|
55
|
+
this.brandName = "dropi";
|
|
56
|
+
}
|
|
29
57
|
}
|
|
30
58
|
|
|
31
59
|
buttonClick() {
|