@dropi/ui 0.1.19 → 0.1.21
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/assets/icons/ilustration/bg-warning.svg +3 -0
- package/assets/icons/ilustration/default.svg +4 -0
- package/assets/icons/ilustration/error.svg +10 -0
- package/assets/icons/ilustration/exclusive.svg +9 -0
- package/assets/icons/ilustration/info.svg +10 -0
- package/assets/icons/ilustration/loading.svg +4 -0
- package/assets/icons/ilustration/love.svg +9 -0
- package/assets/icons/ilustration/premium-new.svg +14 -0
- package/assets/icons/ilustration/premium.svg +5 -0
- package/assets/icons/ilustration/sorry.svg +4 -0
- package/assets/icons/ilustration/success.svg +11 -0
- package/assets/icons/ilustration/verified-new.svg +9 -0
- package/assets/icons/ilustration/verified.svg +4 -0
- package/assets/icons/ilustration/warning.svg +9 -0
- package/assets/lottie-files/loading.json +1 -0
- package/dist/cjs/dropi-accordion-item.cjs.entry.js +54 -0
- package/dist/cjs/dropi-accordion.cjs.entry.js +5 -39
- package/dist/cjs/dropi-alert-legacy.cjs.entry.js +39 -0
- package/dist/cjs/dropi-alert-modal.cjs.entry.js +128 -0
- package/dist/cjs/dropi-alert.cjs.entry.js +21 -15
- package/dist/cjs/dropi-avatars.cjs.entry.js +3 -3
- package/dist/cjs/dropi-badge-legacy.cjs.entry.js +30 -0
- package/dist/cjs/dropi-badge.cjs.entry.js +4 -4
- package/dist/cjs/dropi-banner-external.cjs.entry.js +53 -0
- package/dist/cjs/dropi-breadcrumb.cjs.entry.js +48 -0
- package/dist/cjs/dropi-button.cjs.entry.js +13 -7
- package/dist/cjs/dropi-card-checkbox.cjs.entry.js +48 -0
- package/dist/cjs/dropi-card-product.cjs.entry.js +76 -0
- package/dist/cjs/dropi-card-section.cjs.entry.js +17 -17
- package/dist/cjs/dropi-carousel.cjs.entry.js +148 -0
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +17 -15
- package/dist/cjs/dropi-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/dropi-chips.cjs.entry.js +9 -9
- package/dist/cjs/dropi-city-selector.cjs.entry.js +96 -0
- package/dist/cjs/dropi-color-picker.cjs.entry.js +319 -0
- package/dist/cjs/dropi-country-flags.cjs.entry.js +37 -0
- package/dist/cjs/dropi-country-selector.cjs.entry.js +197 -0
- package/dist/cjs/dropi-date-picker-range.cjs.entry.js +115 -0
- package/dist/cjs/dropi-date-picker.cjs.entry.js +223 -0
- package/dist/cjs/dropi-drawer.cjs.entry.js +76 -0
- package/dist/cjs/dropi-dropdown.cjs.entry.js +22 -15
- package/dist/cjs/dropi-empty-state.cjs.entry.js +16 -15
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +5 -5
- package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +75 -0
- package/dist/cjs/dropi-file-upload.cjs.entry.js +236 -0
- package/dist/cjs/dropi-icon.cjs.entry.js +2 -2
- package/dist/cjs/dropi-ilustration-icon.cjs.entry.js +39 -0
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +3 -3
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +4 -4
- package/dist/cjs/dropi-input_3.cjs.entry.js +390 -0
- package/dist/cjs/dropi-languages-selector.cjs.entry.js +57 -0
- package/dist/cjs/dropi-logo.cjs.entry.js +3 -3
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +7 -7
- package/dist/cjs/dropi-media-player.cjs.entry.js +189 -0
- package/dist/cjs/dropi-modal.cjs.entry.js +36 -14
- package/dist/cjs/dropi-navbar.cjs.entry.js +54 -0
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +10 -10
- package/dist/cjs/dropi-phone-input.cjs.entry.js +197 -0
- package/dist/cjs/dropi-radio-button.cjs.entry.js +7 -7
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +17 -13
- package/dist/cjs/dropi-read-more.cjs.entry.js +8 -4
- package/dist/cjs/dropi-search.cjs.entry.js +52 -38
- package/dist/cjs/dropi-select.cjs.entry.js +98 -55
- package/dist/cjs/dropi-sidebar.cjs.entry.js +78 -0
- package/dist/cjs/dropi-simple-stepper.cjs.entry.js +8 -6
- package/dist/cjs/dropi-skeleton.cjs.entry.js +16 -6
- package/dist/cjs/dropi-steps.cjs.entry.js +6 -4
- package/dist/cjs/dropi-switch.cjs.entry.js +5 -5
- package/dist/cjs/dropi-table.cjs.entry.js +292 -0
- package/dist/cjs/dropi-tabs.cjs.entry.js +13 -11
- package/dist/cjs/dropi-tag-type-product.cjs.entry.js +19 -0
- package/dist/cjs/dropi-text-area.cjs.entry.js +49 -18
- package/dist/cjs/dropi-time-line.cjs.entry.js +3 -3
- package/dist/cjs/dropi-toast.cjs.entry.js +4 -4
- package/dist/cjs/dropi-tooltip-v2.cjs.entry.js +131 -0
- package/dist/cjs/dropi-tooltip.cjs.entry.js +5 -26
- package/dist/cjs/dropi-ui.cjs.js +2 -2
- package/dist/cjs/dropi-vertical-steps.cjs.entry.js +6 -6
- package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +33 -0
- package/dist/cjs/{index-B6R6Ojma.js → index-077kM98l.js} +6 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +30 -2
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.css +45 -0
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.js +172 -0
- package/dist/collection/components/dropi-accordion/dropi-accordion.css +3 -3
- package/dist/collection/components/dropi-accordion/dropi-accordion.js +7 -129
- package/dist/collection/components/dropi-alert/dropi-alert.css +26 -15
- package/dist/collection/components/dropi-alert/dropi-alert.js +87 -21
- package/dist/collection/components/dropi-alert-legacy/dropi-alert-legacy.css +31 -0
- package/dist/collection/components/dropi-alert-legacy/dropi-alert-legacy.js +128 -0
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.css +96 -0
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.js +526 -0
- package/dist/collection/components/dropi-avatars/dropi-avatars.js +3 -3
- package/dist/collection/components/dropi-badge/dropi-badge.css +1 -1
- package/dist/collection/components/dropi-badge/dropi-badge.js +3 -4
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.css +17 -0
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.js +119 -0
- package/dist/collection/components/dropi-banner-external/dropi-banner-external.css +56 -0
- package/dist/collection/components/dropi-banner-external/dropi-banner-external.js +243 -0
- package/dist/collection/components/dropi-breadcrumb/dropi-breadcrumb.css +69 -0
- package/dist/collection/components/dropi-breadcrumb/dropi-breadcrumb.js +171 -0
- package/dist/collection/components/dropi-button/dropi-button.css +21 -19
- package/dist/collection/components/dropi-button/dropi-button.js +53 -7
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.css +92 -0
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.js +222 -0
- package/dist/collection/components/dropi-card-product/dropi-card-product.css +235 -0
- package/dist/collection/components/dropi-card-product/dropi-card-product.js +384 -0
- package/dist/collection/components/dropi-card-section/dropi-card-section.css +2 -2
- package/dist/collection/components/dropi-card-section/dropi-card-section.js +25 -25
- package/dist/collection/components/dropi-carousel/dropi-carousel.css +148 -0
- package/dist/collection/components/dropi-carousel/dropi-carousel.js +374 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +6 -6
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.js +42 -20
- package/dist/collection/components/dropi-chips/dropi-chips.css +2 -0
- package/dist/collection/components/dropi-chips/dropi-chips.js +15 -15
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.css +218 -0
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.js +234 -0
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.css +210 -0
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.js +393 -0
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.css +30 -0
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.js +129 -0
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.css +211 -0
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +429 -0
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.css +215 -0
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +516 -0
- package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.css +143 -0
- package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.js +327 -0
- package/dist/collection/components/dropi-drawer/dropi-drawer.css +129 -0
- package/dist/collection/components/dropi-drawer/dropi-drawer.js +284 -0
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.css +1 -1
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.js +51 -26
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.css +1 -0
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +65 -38
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +5 -5
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.css +464 -0
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.js +516 -0
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.css +115 -0
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.js +256 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +1 -1
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.css +91 -0
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.js +150 -0
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +1 -1
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.css +86 -41
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.js +1 -1
- package/dist/collection/components/dropi-input/dropi-input.css +1 -1
- package/dist/collection/components/dropi-input/dropi-input.js +158 -87
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.css +79 -0
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.js +154 -0
- package/dist/collection/components/dropi-logo/dropi-logo.js +2 -2
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.css +8 -2
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.js +11 -11
- package/dist/collection/components/dropi-media-player/dropi-media-player.css +320 -0
- package/dist/collection/components/dropi-media-player/dropi-media-player.js +391 -0
- package/dist/collection/components/dropi-modal/dropi-modal.css +20 -4
- package/dist/collection/components/dropi-modal/dropi-modal.js +300 -18
- package/dist/collection/components/dropi-navbar/dropi-navbar.css +166 -0
- package/dist/collection/components/dropi-navbar/dropi-navbar.js +302 -0
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.css +17 -10
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +9 -9
- package/dist/collection/components/dropi-paginator/dropi-paginator.css +2 -2
- package/dist/collection/components/dropi-paginator/dropi-paginator.js +51 -99
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.css +209 -0
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +442 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +13 -20
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.css +3 -3
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.js +69 -19
- package/dist/collection/components/dropi-read-more/dropi-read-more.css +5 -8
- package/dist/collection/components/dropi-read-more/dropi-read-more.js +46 -2
- package/dist/collection/components/dropi-search/dropi-search.css +2 -2
- package/dist/collection/components/dropi-search/dropi-search.js +194 -60
- package/dist/collection/components/dropi-select/dropi-select.css +7 -7
- package/dist/collection/components/dropi-select/dropi-select.js +166 -84
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.css +76 -0
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.js +143 -0
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.css +2 -2
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.js +29 -7
- package/dist/collection/components/dropi-skeleton/dropi-skeleton.js +40 -10
- package/dist/collection/components/dropi-steps/dropi-steps.css +3 -3
- package/dist/collection/components/dropi-steps/dropi-steps.js +31 -3
- package/dist/collection/components/dropi-switch/dropi-switch.js +5 -5
- package/dist/collection/components/dropi-table/dropi-table.css +540 -0
- package/dist/collection/components/dropi-table/dropi-table.js +966 -0
- package/dist/collection/components/dropi-tabs/dropi-tabs.css +10 -5
- package/dist/collection/components/dropi-tabs/dropi-tabs.js +35 -13
- package/dist/collection/components/dropi-tag/dropi-tag.css +1 -2
- package/dist/collection/components/dropi-tag/dropi-tag.js +1 -1
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.css +14 -0
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.js +48 -0
- package/dist/collection/components/dropi-text-area/dropi-text-area.css +6 -2
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +87 -32
- package/dist/collection/components/dropi-time-line/dropi-time-line.css +2 -2
- package/dist/collection/components/dropi-time-line/dropi-time-line.js +1 -1
- package/dist/collection/components/dropi-toast/dropi-toast.css +2 -2
- package/dist/collection/components/dropi-toast/dropi-toast.js +3 -3
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.css +28 -63
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +11 -88
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.css +67 -0
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.js +468 -0
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.css +3 -3
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.js +5 -5
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.css +73 -0
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.js +110 -0
- package/dist/components/dropi-accordion-item.d.ts +11 -0
- package/dist/components/dropi-accordion-item.js +1 -0
- package/dist/components/dropi-accordion.js +1 -1
- package/dist/components/dropi-alert-legacy.d.ts +11 -0
- package/dist/components/dropi-alert-legacy.js +1 -0
- package/dist/components/dropi-alert-modal.d.ts +11 -0
- package/dist/components/dropi-alert-modal.js +1 -0
- package/dist/components/dropi-alert.js +1 -1
- package/dist/components/dropi-avatars.js +1 -1
- package/dist/components/dropi-badge-legacy.d.ts +11 -0
- package/dist/components/dropi-badge-legacy.js +1 -0
- package/dist/components/dropi-badge.js +1 -1
- package/dist/components/dropi-banner-external.d.ts +11 -0
- package/dist/components/dropi-banner-external.js +1 -0
- package/dist/components/dropi-breadcrumb.d.ts +11 -0
- package/dist/components/dropi-breadcrumb.js +1 -0
- package/dist/components/dropi-button.js +1 -1
- package/dist/components/dropi-card-checkbox.d.ts +11 -0
- package/dist/components/dropi-card-checkbox.js +1 -0
- package/dist/components/dropi-card-product.d.ts +11 -0
- package/dist/components/dropi-card-product.js +1 -0
- package/dist/components/dropi-card-section.js +1 -1
- package/dist/components/dropi-carousel.d.ts +11 -0
- package/dist/components/dropi-carousel.js +1 -0
- package/dist/components/dropi-checkbox-selection-list.js +1 -1
- package/dist/components/dropi-checkbox.js +1 -1
- package/dist/components/dropi-chips.js +1 -1
- package/dist/components/dropi-city-selector.d.ts +11 -0
- package/dist/components/dropi-city-selector.js +1 -0
- package/dist/components/dropi-color-picker.d.ts +11 -0
- package/dist/components/dropi-color-picker.js +1 -0
- package/dist/components/dropi-country-flags.d.ts +11 -0
- package/dist/components/dropi-country-flags.js +1 -0
- package/dist/components/dropi-country-selector.d.ts +11 -0
- package/dist/components/dropi-country-selector.js +1 -0
- package/dist/components/dropi-date-picker-range.d.ts +11 -0
- package/dist/components/dropi-date-picker-range.js +1 -0
- package/dist/components/dropi-date-picker.d.ts +11 -0
- package/dist/components/dropi-date-picker.js +1 -0
- package/dist/components/dropi-drawer.d.ts +11 -0
- package/dist/components/dropi-drawer.js +1 -0
- package/dist/components/dropi-dropdown.js +1 -1
- package/dist/components/dropi-empty-state.js +1 -1
- package/dist/components/dropi-favorite-button.js +1 -1
- package/dist/components/dropi-file-upload-progress-bar.d.ts +11 -0
- package/dist/components/dropi-file-upload-progress-bar.js +1 -0
- package/dist/components/dropi-file-upload.d.ts +11 -0
- package/dist/components/dropi-file-upload.js +1 -0
- package/dist/components/dropi-icon.js +1 -1
- package/dist/components/dropi-ilustration-icon.d.ts +11 -0
- package/dist/components/dropi-ilustration-icon.js +1 -0
- package/dist/components/dropi-image-miniature.js +1 -1
- package/dist/components/dropi-image-overlay.js +1 -1
- package/dist/components/dropi-input.js +1 -1
- package/dist/components/dropi-languages-selector.d.ts +11 -0
- package/dist/components/dropi-languages-selector.js +1 -0
- package/dist/components/dropi-logo.js +1 -1
- package/dist/components/dropi-lottie-loader.js +1 -1
- package/dist/components/dropi-media-player.d.ts +11 -0
- package/dist/components/dropi-media-player.js +1 -0
- package/dist/components/dropi-modal.js +1 -1
- package/dist/components/dropi-navbar.d.ts +11 -0
- package/dist/components/dropi-navbar.js +1 -0
- package/dist/components/dropi-otp-send-code.js +1 -1
- package/dist/components/dropi-paginator.js +1 -1
- package/dist/components/dropi-phone-input.d.ts +11 -0
- package/dist/components/dropi-phone-input.js +1 -0
- package/dist/components/dropi-radio-button.js +1 -1
- package/dist/components/dropi-radio-selection-list.js +1 -1
- package/dist/components/dropi-read-more.js +1 -1
- package/dist/components/dropi-search.js +1 -1
- package/dist/components/dropi-select.js +1 -1
- package/dist/components/dropi-sidebar.d.ts +11 -0
- package/dist/components/dropi-sidebar.js +1 -0
- package/dist/components/dropi-simple-stepper.js +1 -1
- package/dist/components/dropi-skeleton.js +1 -1
- package/dist/components/dropi-steps.js +1 -1
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-table.d.ts +11 -0
- package/dist/components/dropi-table.js +1 -0
- package/dist/components/dropi-tabs.js +1 -1
- package/dist/components/dropi-tag-type-product.d.ts +11 -0
- package/dist/components/dropi-tag-type-product.js +1 -0
- package/dist/components/dropi-tag.js +1 -1
- package/dist/components/dropi-text-area.js +1 -1
- package/dist/components/dropi-time-line.js +1 -1
- package/dist/components/dropi-toast.js +1 -1
- package/dist/components/dropi-tooltip-v2.d.ts +11 -0
- package/dist/components/dropi-tooltip-v2.js +1 -0
- package/dist/components/dropi-tooltip.js +1 -1
- package/dist/components/dropi-vertical-steps.js +1 -1
- package/dist/components/dropi-youtube-lazy-video.d.ts +11 -0
- package/dist/components/dropi-youtube-lazy-video.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-9KLpSviZ.js +1 -0
- package/dist/components/p-BVekazGL.js +1 -0
- package/dist/components/p-BYRcOZS4.js +1 -0
- package/dist/components/p-BuDg1d0S.js +1 -0
- package/dist/components/p-C2paYEIp.js +1 -0
- package/dist/components/p-CDvkvedb.js +1 -0
- package/dist/components/{p-CPs3fHRc.js → p-CnALA9z_.js} +1 -1
- package/dist/components/p-CtzCJQVR.js +1 -0
- package/dist/components/p-CzHupXu8.js +1 -0
- package/dist/components/p-DWzWYR5X.js +1 -0
- package/dist/components/p-D_Y7tuEH.js +1 -0
- package/dist/components/p-DjO9xpVc.js +1 -0
- package/dist/dropi-ui/dropi-ui.esm.js +1 -1
- package/dist/dropi-ui/p-0966c363.entry.js +1 -0
- package/dist/dropi-ui/p-0c541a53.entry.js +1 -0
- package/dist/dropi-ui/p-0cd1fb7a.entry.js +1 -0
- package/dist/dropi-ui/p-0f161461.entry.js +1 -0
- package/dist/dropi-ui/p-10e363a2.entry.js +1 -0
- package/dist/dropi-ui/p-1d4c5364.entry.js +1 -0
- package/dist/dropi-ui/p-2e0623ba.entry.js +1 -0
- package/dist/dropi-ui/p-2e4efb72.entry.js +1 -0
- package/dist/dropi-ui/p-36cdd4fc.entry.js +1 -0
- package/dist/dropi-ui/{p-c2316d4d.entry.js → p-37c86c74.entry.js} +1 -1
- package/dist/dropi-ui/p-392654b7.entry.js +1 -0
- package/dist/dropi-ui/p-39904430.entry.js +1 -0
- package/dist/dropi-ui/p-3a3b778f.entry.js +1 -0
- package/dist/dropi-ui/p-3cbe953f.entry.js +1 -0
- package/dist/dropi-ui/p-40b69ccd.entry.js +1 -0
- package/dist/dropi-ui/p-443ed5bd.entry.js +1 -0
- package/dist/dropi-ui/p-475a16f2.entry.js +1 -0
- package/dist/dropi-ui/p-4967b619.entry.js +1 -0
- package/dist/dropi-ui/p-4de83790.entry.js +1 -0
- package/dist/dropi-ui/p-59188dd5.entry.js +1 -0
- package/dist/dropi-ui/p-6178190b.entry.js +1 -0
- package/dist/dropi-ui/p-623759eb.entry.js +1 -0
- package/dist/dropi-ui/p-645da978.entry.js +1 -0
- package/dist/dropi-ui/p-6e727fb0.entry.js +1 -0
- package/dist/dropi-ui/p-7036c073.entry.js +1 -0
- package/dist/dropi-ui/p-710312bd.entry.js +1 -0
- package/dist/dropi-ui/p-74dfe8d1.entry.js +1 -0
- package/dist/dropi-ui/p-770afae3.entry.js +1 -0
- package/dist/dropi-ui/p-7c0bc6dd.entry.js +1 -0
- package/dist/dropi-ui/p-7f8d3642.entry.js +1 -0
- package/dist/dropi-ui/p-7fc02d98.entry.js +1 -0
- package/dist/dropi-ui/p-8188cca4.entry.js +1 -0
- package/dist/dropi-ui/p-858bedcf.entry.js +1 -0
- package/dist/dropi-ui/p-87e9ba6d.entry.js +1 -0
- package/dist/dropi-ui/p-8b4d4d2d.entry.js +1 -0
- package/dist/dropi-ui/p-9062f0de.entry.js +1 -0
- package/dist/dropi-ui/p-925852b1.entry.js +1 -0
- package/dist/dropi-ui/{p-724a2aea.entry.js → p-99943b7d.entry.js} +1 -1
- package/dist/dropi-ui/p-TXz_09YZ.js +2 -0
- package/dist/dropi-ui/p-a1f2383d.entry.js +1 -0
- package/dist/dropi-ui/p-a6939701.entry.js +1 -0
- package/dist/dropi-ui/p-aa8d2aec.entry.js +1 -0
- package/dist/dropi-ui/p-aafaffa3.entry.js +1 -0
- package/dist/dropi-ui/{p-30fdd316.entry.js → p-ac345a0e.entry.js} +1 -1
- package/dist/dropi-ui/p-acfa17ef.entry.js +1 -0
- package/dist/dropi-ui/p-af3691a0.entry.js +1 -0
- package/dist/dropi-ui/p-b207fc92.entry.js +1 -0
- package/dist/dropi-ui/p-ba3ad28e.entry.js +1 -0
- package/dist/dropi-ui/p-bd0ffb4a.entry.js +1 -0
- package/dist/dropi-ui/p-c2e96728.entry.js +1 -0
- package/dist/dropi-ui/p-c664f99f.entry.js +1 -0
- package/dist/dropi-ui/p-c7e3a5e0.entry.js +1 -0
- package/dist/dropi-ui/{p-061e1ad4.entry.js → p-cfc19ca0.entry.js} +1 -1
- package/dist/dropi-ui/p-d36a0c37.entry.js +1 -0
- package/dist/dropi-ui/p-dd4c6b40.entry.js +1 -0
- package/dist/dropi-ui/p-e0351b61.entry.js +1 -0
- package/dist/dropi-ui/p-e2361547.entry.js +1 -0
- package/dist/dropi-ui/p-e25b2680.entry.js +1 -0
- package/dist/dropi-ui/p-e6943d7c.entry.js +1 -0
- package/dist/dropi-ui/p-e7b59811.entry.js +1 -0
- package/dist/dropi-ui/p-eac7777f.entry.js +1 -0
- package/dist/dropi-ui/p-ed94b5fe.entry.js +1 -0
- package/dist/dropi-ui/p-f0ddf569.entry.js +1 -0
- package/dist/dropi-ui/p-f95c11f8.entry.js +1 -0
- package/dist/esm/dropi-accordion-item.entry.js +52 -0
- package/dist/esm/dropi-accordion.entry.js +5 -39
- package/dist/esm/dropi-alert-legacy.entry.js +37 -0
- package/dist/esm/dropi-alert-modal.entry.js +126 -0
- package/dist/esm/dropi-alert.entry.js +21 -15
- package/dist/esm/dropi-avatars.entry.js +3 -3
- package/dist/esm/dropi-badge-legacy.entry.js +28 -0
- package/dist/esm/dropi-badge.entry.js +4 -4
- package/dist/esm/dropi-banner-external.entry.js +51 -0
- package/dist/esm/dropi-breadcrumb.entry.js +46 -0
- package/dist/esm/dropi-button.entry.js +13 -7
- package/dist/esm/dropi-card-checkbox.entry.js +46 -0
- package/dist/esm/dropi-card-product.entry.js +74 -0
- package/dist/esm/dropi-card-section.entry.js +17 -17
- package/dist/esm/dropi-carousel.entry.js +146 -0
- package/dist/esm/dropi-checkbox-selection-list.entry.js +17 -15
- package/dist/esm/dropi-checkbox.entry.js +6 -6
- package/dist/esm/dropi-chips.entry.js +9 -9
- package/dist/esm/dropi-city-selector.entry.js +94 -0
- package/dist/esm/dropi-color-picker.entry.js +317 -0
- package/dist/esm/dropi-country-flags.entry.js +35 -0
- package/dist/esm/dropi-country-selector.entry.js +195 -0
- package/dist/esm/dropi-date-picker-range.entry.js +113 -0
- package/dist/esm/dropi-date-picker.entry.js +221 -0
- package/dist/esm/dropi-drawer.entry.js +74 -0
- package/dist/esm/dropi-dropdown.entry.js +22 -15
- package/dist/esm/dropi-empty-state.entry.js +16 -15
- package/dist/esm/dropi-favorite-button.entry.js +5 -5
- package/dist/esm/dropi-file-upload-progress-bar.entry.js +73 -0
- package/dist/esm/dropi-file-upload.entry.js +234 -0
- package/dist/esm/dropi-icon.entry.js +2 -2
- package/dist/esm/dropi-ilustration-icon.entry.js +37 -0
- package/dist/esm/dropi-image-miniature.entry.js +3 -3
- package/dist/esm/dropi-image-overlay.entry.js +4 -4
- package/dist/esm/dropi-input_3.entry.js +386 -0
- package/dist/esm/dropi-languages-selector.entry.js +55 -0
- package/dist/esm/dropi-logo.entry.js +3 -3
- package/dist/esm/dropi-lottie-loader.entry.js +7 -7
- package/dist/esm/dropi-media-player.entry.js +187 -0
- package/dist/esm/dropi-modal.entry.js +36 -14
- package/dist/esm/dropi-navbar.entry.js +52 -0
- package/dist/esm/dropi-otp-send-code.entry.js +10 -10
- package/dist/esm/dropi-phone-input.entry.js +195 -0
- package/dist/esm/dropi-radio-button.entry.js +7 -7
- package/dist/esm/dropi-radio-selection-list.entry.js +17 -13
- package/dist/esm/dropi-read-more.entry.js +8 -4
- package/dist/esm/dropi-search.entry.js +52 -38
- package/dist/esm/dropi-select.entry.js +98 -55
- package/dist/esm/dropi-sidebar.entry.js +76 -0
- package/dist/esm/dropi-simple-stepper.entry.js +8 -6
- package/dist/esm/dropi-skeleton.entry.js +16 -6
- package/dist/esm/dropi-steps.entry.js +6 -4
- package/dist/esm/dropi-switch.entry.js +5 -5
- package/dist/esm/dropi-table.entry.js +290 -0
- package/dist/esm/dropi-tabs.entry.js +13 -11
- package/dist/esm/dropi-tag-type-product.entry.js +17 -0
- package/dist/esm/dropi-text-area.entry.js +49 -18
- package/dist/esm/dropi-time-line.entry.js +3 -3
- package/dist/esm/dropi-toast.entry.js +4 -4
- package/dist/esm/dropi-tooltip-v2.entry.js +129 -0
- package/dist/esm/dropi-tooltip.entry.js +5 -26
- package/dist/esm/dropi-ui.js +3 -3
- package/dist/esm/dropi-vertical-steps.entry.js +6 -6
- package/dist/esm/dropi-youtube-lazy-video.entry.js +31 -0
- package/dist/esm/{index-Twbb5MNM.js → index-TXz_09YZ.js} +6 -3
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dropi-accordion/dropi-accordion-item.d.ts +24 -0
- package/dist/types/components/dropi-accordion/dropi-accordion.d.ts +3 -23
- package/dist/types/components/dropi-alert/dropi-alert.d.ts +9 -3
- package/dist/types/components/dropi-alert-legacy/dropi-alert-legacy.d.ts +18 -0
- package/dist/types/components/dropi-alert-modal/dropi-alert-modal.d.ts +66 -0
- package/dist/types/components/dropi-badge-legacy/dropi-badge-legacy.d.ts +15 -0
- package/dist/types/components/dropi-banner-external/dropi-banner-external.d.ts +36 -0
- package/dist/types/components/dropi-breadcrumb/dropi-breadcrumb.d.ts +31 -0
- package/dist/types/components/dropi-button/dropi-button.d.ts +6 -2
- package/dist/types/components/dropi-card-checkbox/dropi-card-checkbox.d.ts +34 -0
- package/dist/types/components/dropi-card-product/dropi-card-product.d.ts +43 -0
- package/dist/types/components/dropi-card-section/dropi-card-section.d.ts +5 -5
- package/dist/types/components/dropi-carousel/dropi-carousel.d.ts +44 -0
- package/dist/types/components/dropi-checkbox/dropi-checkbox.d.ts +1 -1
- package/dist/types/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.d.ts +7 -5
- package/dist/types/components/dropi-chips/dropi-chips.d.ts +4 -4
- package/dist/types/components/dropi-city-selector/dropi-city-selector.d.ts +48 -0
- package/dist/types/components/dropi-color-picker/dropi-color-picker.d.ts +56 -0
- package/dist/types/components/dropi-country-flags/dropi-country-flags.d.ts +19 -0
- package/dist/types/components/dropi-country-selector/dropi-country-selector.d.ts +50 -0
- package/dist/types/components/dropi-date-picker/dropi-date-picker.d.ts +55 -0
- package/dist/types/components/dropi-date-picker-range/dropi-date-picker-range.d.ts +50 -0
- package/dist/types/components/dropi-drawer/dropi-drawer.d.ts +31 -0
- package/dist/types/components/dropi-dropdown/dropi-dropdown.d.ts +12 -6
- package/dist/types/components/dropi-empty-state/dropi-empty-state.d.ts +12 -10
- package/dist/types/components/dropi-favorite-button/dropi-favorite-button.d.ts +1 -1
- package/dist/types/components/dropi-file-upload/dropi-file-upload.d.ts +76 -0
- package/dist/types/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.d.ts +33 -0
- package/dist/types/components/dropi-ilustration-icon/dropi-ilustration-icon.d.ts +24 -0
- package/dist/types/components/dropi-input/dropi-input.d.ts +28 -18
- package/dist/types/components/dropi-languages-selector/dropi-languages-selector.d.ts +31 -0
- package/dist/types/components/dropi-lottie-loader/dropi-lottie-loader.d.ts +1 -1
- package/dist/types/components/dropi-media-player/dropi-media-player.d.ts +51 -0
- package/dist/types/components/dropi-modal/dropi-modal.d.ts +22 -3
- package/dist/types/components/dropi-navbar/dropi-navbar.d.ts +42 -0
- package/dist/types/components/dropi-otp-send-code/dropi-otp-send-code.d.ts +1 -1
- package/dist/types/components/dropi-paginator/dropi-paginator.d.ts +10 -20
- package/dist/types/components/dropi-phone-input/dropi-phone-input.d.ts +49 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +2 -2
- package/dist/types/components/dropi-radio-selection-list/dropi-radio-selection-list.d.ts +11 -4
- package/dist/types/components/dropi-read-more/dropi-read-more.d.ts +4 -0
- package/dist/types/components/dropi-search/dropi-search.d.ts +24 -12
- package/dist/types/components/dropi-select/dropi-select.d.ts +26 -15
- package/dist/types/components/dropi-sidebar/dropi-sidebar.d.ts +41 -0
- package/dist/types/components/dropi-simple-stepper/dropi-simple-stepper.d.ts +2 -0
- package/dist/types/components/dropi-skeleton/dropi-skeleton.d.ts +4 -1
- package/dist/types/components/dropi-steps/dropi-steps.d.ts +3 -0
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +1 -1
- package/dist/types/components/dropi-table/dropi-table.d.ts +131 -0
- package/dist/types/components/dropi-tabs/dropi-tabs.d.ts +5 -3
- package/dist/types/components/dropi-tag-type-product/dropi-tag-type-product.d.ts +9 -0
- package/dist/types/components/dropi-text-area/dropi-text-area.d.ts +27 -6
- package/dist/types/components/dropi-tooltip/dropi-tooltip.d.ts +3 -17
- package/dist/types/components/dropi-tooltip-v2/dropi-tooltip.d.ts +59 -0
- package/dist/types/components/dropi-vertical-steps/dropi-vertical-steps.d.ts +1 -1
- package/dist/types/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.d.ts +19 -0
- package/dist/types/components.d.ts +4694 -688
- package/dist/types/index.d.ts +1 -0
- package/package.json +25 -3
- package/readme.md +56 -7
- package/scripts/setup.js +121 -23
- package/skills/install-dropi-ui/skill.md +15 -10
- package/dist/cjs/dropi-input.cjs.entry.js +0 -210
- package/dist/cjs/dropi-paginator.cjs.entry.js +0 -91
- package/dist/cjs/dropi-tag.cjs.entry.js +0 -68
- package/dist/components/p-DKXrREI4.js +0 -1
- package/dist/components/p-Ds74ZOlC.js +0 -1
- package/dist/components/p-WZTFyFH2.js +0 -1
- package/dist/dropi-ui/p-0c13dded.entry.js +0 -1
- package/dist/dropi-ui/p-121c8a09.entry.js +0 -1
- package/dist/dropi-ui/p-291a1416.entry.js +0 -1
- package/dist/dropi-ui/p-2cee44f9.entry.js +0 -1
- package/dist/dropi-ui/p-3537ee5a.entry.js +0 -1
- package/dist/dropi-ui/p-3d859657.entry.js +0 -1
- package/dist/dropi-ui/p-433d161d.entry.js +0 -1
- package/dist/dropi-ui/p-4bdfad16.entry.js +0 -1
- package/dist/dropi-ui/p-4ea7d3a7.entry.js +0 -1
- package/dist/dropi-ui/p-51c8ef68.entry.js +0 -1
- package/dist/dropi-ui/p-54780c90.entry.js +0 -1
- package/dist/dropi-ui/p-66deb85e.entry.js +0 -1
- package/dist/dropi-ui/p-68f81080.entry.js +0 -1
- package/dist/dropi-ui/p-74c37688.entry.js +0 -1
- package/dist/dropi-ui/p-7cec1cea.entry.js +0 -1
- package/dist/dropi-ui/p-7daa2677.entry.js +0 -1
- package/dist/dropi-ui/p-8906a68d.entry.js +0 -1
- package/dist/dropi-ui/p-Twbb5MNM.js +0 -2
- package/dist/dropi-ui/p-a4204ece.entry.js +0 -1
- package/dist/dropi-ui/p-a5650d8f.entry.js +0 -1
- package/dist/dropi-ui/p-a9116dbe.entry.js +0 -1
- package/dist/dropi-ui/p-b0d3442e.entry.js +0 -1
- package/dist/dropi-ui/p-b36b819f.entry.js +0 -1
- package/dist/dropi-ui/p-c10cbb8d.entry.js +0 -1
- package/dist/dropi-ui/p-cb5fd7a9.entry.js +0 -1
- package/dist/dropi-ui/p-d1e1b716.entry.js +0 -1
- package/dist/dropi-ui/p-d5ecc394.entry.js +0 -1
- package/dist/dropi-ui/p-db6c9828.entry.js +0 -1
- package/dist/dropi-ui/p-e721127d.entry.js +0 -1
- package/dist/dropi-ui/p-e8557da0.entry.js +0 -1
- package/dist/dropi-ui/p-ebfd4665.entry.js +0 -1
- package/dist/dropi-ui/p-f3cef35a.entry.js +0 -1
- package/dist/dropi-ui/p-f6a69c4e.entry.js +0 -1
- package/dist/dropi-ui/p-ff45e7c8.entry.js +0 -1
- package/dist/esm/dropi-input.entry.js +0 -208
- package/dist/esm/dropi-paginator.entry.js +0 -89
- package/dist/esm/dropi-tag.entry.js +0 -66
package/dist/types/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@
|
|
|
6
6
|
export type * from './components.d.ts';
|
|
7
7
|
export type { BadgeState } from './components/dropi-badge/dropi-badge';
|
|
8
8
|
export type { SelectOption, SelectOptionGroup } from './components/dropi-select/select.types';
|
|
9
|
+
export type { SidebarProperties, SidebarItem } from './components/dropi-sidebar/dropi-sidebar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropi/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Dropi Design System — Web Components for Angular, React and Vue",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,9 +20,14 @@
|
|
|
20
20
|
"types": "./loader/index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"./dist/components/*.js": {
|
|
23
|
+
"types": "./dist/components/*.d.ts",
|
|
23
24
|
"import": "./dist/components/*.js",
|
|
24
25
|
"require": "./dist/components/*.js"
|
|
25
26
|
},
|
|
27
|
+
"./dist/dropi-ui/*.js": {
|
|
28
|
+
"import": "./dist/dropi-ui/*.js",
|
|
29
|
+
"require": "./dist/dropi-ui/*.js"
|
|
30
|
+
},
|
|
26
31
|
"./dist/dropi-ui/dropi-ui.css": "./dist/dropi-ui/dropi-ui.css"
|
|
27
32
|
},
|
|
28
33
|
"files": [
|
|
@@ -35,13 +40,22 @@
|
|
|
35
40
|
"bin": {
|
|
36
41
|
"@dropi/ui": "scripts/setup.js"
|
|
37
42
|
},
|
|
43
|
+
"workspaces": [
|
|
44
|
+
"packages/*"
|
|
45
|
+
],
|
|
38
46
|
"scripts": {
|
|
39
|
-
"build": "stencil build &&
|
|
47
|
+
"build": "stencil build && npm run build --workspace=packages/react && npm run build --workspace=packages/angular",
|
|
48
|
+
"clear:cache": "node -e \"const fs=require('fs');['.stencil','node_modules/.cache'].forEach(p=>{try{fs.rmSync(p,{recursive:true,force:true})}catch(e){}})\"",
|
|
49
|
+
"publish:react": "npm run build && npm publish --workspace=packages/react",
|
|
50
|
+
"dev": "stencil build --dev --watch & npm run watch --workspace=packages/react",
|
|
40
51
|
"start": "stencil build --dev --watch --serve",
|
|
41
52
|
"test": "stencil-test",
|
|
42
53
|
"test:watch": "stencil-test --watch",
|
|
43
54
|
"generate": "stencil generate",
|
|
44
|
-
"postinstall": "node scripts/postinstall.js"
|
|
55
|
+
"postinstall": "node scripts/postinstall.js",
|
|
56
|
+
"storybook": "stencil build && storybook dev -p 6006",
|
|
57
|
+
"storybook:build": "stencil build && storybook build -o storybook-static",
|
|
58
|
+
"storybook:dev": "storybook dev -p 6006"
|
|
45
59
|
},
|
|
46
60
|
"devDependencies": {
|
|
47
61
|
"@stencil/angular-output-target": "^1.3.0",
|
|
@@ -49,8 +63,16 @@
|
|
|
49
63
|
"@stencil/react-output-target": "^1.4.2",
|
|
50
64
|
"@stencil/vitest": "^1.8.3",
|
|
51
65
|
"@stencil/vue-output-target": "^0.13.1",
|
|
66
|
+
"@storybook/addon-docs": "^8.6.18",
|
|
67
|
+
"@storybook/addon-essentials": "^8.6.18",
|
|
68
|
+
"@storybook/blocks": "^8.6.18",
|
|
69
|
+
"@storybook/web-components": "^8.6.18",
|
|
70
|
+
"@storybook/web-components-vite": "^8.6.18",
|
|
52
71
|
"@types/node": "^22.13.5",
|
|
53
72
|
"@vitest/browser-playwright": "^4.0.0",
|
|
73
|
+
"lit": "^3.3.2",
|
|
74
|
+
"lit-html": "^3.3.2",
|
|
75
|
+
"storybook": "^8.6.18",
|
|
54
76
|
"vitest": "^4.0.0"
|
|
55
77
|
},
|
|
56
78
|
"license": "MIT"
|
package/readme.md
CHANGED
|
@@ -42,15 +42,12 @@ Si prefieres realizar la configuración paso a paso, consulta la [Guía de Integ
|
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
|
-
## Cómo pasar props
|
|
45
|
+
## Cómo pasar props
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Hay **dos formas válidas**, ambas funcionan:
|
|
48
48
|
|
|
49
|
+
### Forma 1 — Props individuales (React / Vanilla)
|
|
49
50
|
```tsx
|
|
50
|
-
// ❌ Incorrecto — selectProperties no existe como prop
|
|
51
|
-
<DropiSelect selectProperties={{ label: 'País', placeholder: 'Seleccionar' }} />
|
|
52
|
-
|
|
53
|
-
// ✅ Correcto — cada prop va suelta en el tag
|
|
54
51
|
<DropiSelect
|
|
55
52
|
label="País"
|
|
56
53
|
placeholder="Seleccionar"
|
|
@@ -59,7 +56,21 @@ Cada prop se pasa **directamente en el JSX**, una por una. No existe un prop con
|
|
|
59
56
|
/>
|
|
60
57
|
```
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
### Forma 2 — Objeto de compatibilidad Angular (equivalente al core)
|
|
60
|
+
Los componentes principales aceptan un prop-objeto que replica la API del `@Input()` del core Angular:
|
|
61
|
+
|
|
62
|
+
| Componente | Prop objeto | Equivale al `@Input()` Angular |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `dropi-select` | `[selectProperties]="selectProperties"` | `SelectProperties` |
|
|
65
|
+
| `dropi-input` | `[inputProperties]="inputProperties"` | `InputProperties` |
|
|
66
|
+
| `dropi-text-area` | `[textAreaProperties]="textAreaProperties"` | `TextAreaProperties` |
|
|
67
|
+
| `dropi-alert-modal` | `[params]="params"` | `ModalParams` |
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<!-- Angular — forma idéntica al core -->
|
|
71
|
+
<dropi-select [selectProperties]="selectProperties" (onChangeSelect)="onChange($event)" />
|
|
72
|
+
<dropi-alert-modal [visible]="visible" [params]="params" (primaryButtonEvent)="onPrimary($event)" />
|
|
73
|
+
```
|
|
63
74
|
|
|
64
75
|
> **Intellisense en VSCode:** si al hacer hover sobre un componente no aparecen las props, significa que `@dropi/ui-react` necesita ser compilado (`npm run build` en la carpeta `dropi-ui-react`). Después de cualquier cambio en la librería siempre hay que correr el build.
|
|
65
76
|
|
|
@@ -609,6 +620,44 @@ Burbuja de información al hover.
|
|
|
609
620
|
|
|
610
621
|
---
|
|
611
622
|
|
|
623
|
+
### `<dropi-table>`
|
|
624
|
+
|
|
625
|
+
Tabla de datos con paginación local/backend, ordenación, búsqueda y checkbox de selección.
|
|
626
|
+
|
|
627
|
+
> ⚠️ Las filas van en formato **TypedField** (no objetos planos): `{ name: { type: 'text', value: 'Ana' } }`
|
|
628
|
+
|
|
629
|
+
**Props principales**
|
|
630
|
+
|
|
631
|
+
| Prop | Tipo | Default | Descripción |
|
|
632
|
+
|---|---|---|---|
|
|
633
|
+
| `headers` | `DropiTableColumn[]` | `[]` | Columnas `{ key, label, sortable }` |
|
|
634
|
+
| `data` | `DropiTableRow[]` | `[]` | Filas en formato TypedField |
|
|
635
|
+
| `dropiTableConfiguration` | `DropiTableConfiguration` | `null` | Config: paginación, búsqueda, acciones |
|
|
636
|
+
| `loading` | `boolean` | `false` | Indicador de carga |
|
|
637
|
+
|
|
638
|
+
**Eventos**
|
|
639
|
+
|
|
640
|
+
| Evento | `e.detail` | Cuándo |
|
|
641
|
+
|---|---|---|
|
|
642
|
+
| `rowsSelected` | `DropiTableRow[]` | Checkbox cambia selección |
|
|
643
|
+
| `onSortChange` | `{ column, asc }` | Click en columna ordenable |
|
|
644
|
+
| `onPageChange` | `number` | Cambio de página (backend) |
|
|
645
|
+
| `actionClicked` | `{ row, action }` | Click en acción de fila |
|
|
646
|
+
|
|
647
|
+
**Ejemplo Angular**
|
|
648
|
+
```html
|
|
649
|
+
<dropi-table
|
|
650
|
+
[headers]="headers"
|
|
651
|
+
[data]="data"
|
|
652
|
+
[dropiTableConfiguration]="{ backendPagination: false, showPaginator: true, pageSizeConfiguration: [5, 10, 25] }"
|
|
653
|
+
[loading]="loading"
|
|
654
|
+
(onSortChange)="onSort($event)"
|
|
655
|
+
(rowsSelected)="onSelect($event)"
|
|
656
|
+
/>
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
612
661
|
### `<dropi-modal>`
|
|
613
662
|
|
|
614
663
|
Ventana de diálogo con overlays.
|
package/scripts/setup.js
CHANGED
|
@@ -94,21 +94,31 @@ async function run() {
|
|
|
94
94
|
|
|
95
95
|
if (styleTarget) {
|
|
96
96
|
let content = fs.readFileSync(path.join(projectRoot, styleTarget), 'utf8');
|
|
97
|
+
let changed = false;
|
|
98
|
+
|
|
99
|
+
// Migrar loader antiguo → nuevo bootstrap (si tiene defineCustomElements del loader)
|
|
100
|
+
if (content.includes("from '@dropi/ui/loader'") || content.includes('from "@dropi/ui/loader"')) {
|
|
101
|
+
content = content
|
|
102
|
+
.replace(/\/\/\s*@ts-ignore[^\n]*\n/g, '')
|
|
103
|
+
.replace(/import\s+\{[^}]*defineCustomElements[^}]*\}\s+from\s+['"]@dropi\/ui\/loader['"];?\n?/g, '')
|
|
104
|
+
.replace(/defineCustomElements\([^)]*\);?\n?/g, '');
|
|
105
|
+
log(`Loader antiguo eliminado de ${styleTarget}`, 'ok');
|
|
106
|
+
changed = true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Agregar bootstrap side-effect si no está
|
|
110
|
+
if (!content.includes('dropi-ui.esm.js')) {
|
|
111
|
+
content = `// @ts-ignore\nimport '@dropi/ui/dist/dropi-ui/dropi-ui.esm.js';\n` + content;
|
|
112
|
+
changed = true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Agregar CSS si no está
|
|
97
116
|
if (!content.includes('dropi-ui.css')) {
|
|
98
117
|
content = `${cssImport}\n` + content;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
content = `import { defineCustomElements } from '@dropi/ui/loader';\n` + content;
|
|
104
|
-
if (content.includes('createRoot')) {
|
|
105
|
-
content = content.replace('createRoot', 'defineCustomElements();\ncreateRoot');
|
|
106
|
-
} else {
|
|
107
|
-
content += `\ndefineCustomElements();\n`;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
118
|
+
changed = true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (changed) {
|
|
112
122
|
fs.writeFileSync(path.join(projectRoot, styleTarget), content);
|
|
113
123
|
log(`Configuración aplicada en ${styleTarget}`, 'ok');
|
|
114
124
|
}
|
|
@@ -146,6 +156,8 @@ async function run() {
|
|
|
146
156
|
|
|
147
157
|
// Sprite de iconos
|
|
148
158
|
setupAsset('assets/icons/symbol/svg/sprite.css.svg', 'assets/icons/symbol/svg/sprite.css.svg');
|
|
159
|
+
// Ilustraciones
|
|
160
|
+
setupAsset('assets/icons/ilustration', 'assets/icons/ilustration');
|
|
149
161
|
// Archivos Lottie
|
|
150
162
|
setupAsset('assets/lottie-files', 'assets/lottie-files');
|
|
151
163
|
|
|
@@ -168,16 +180,102 @@ async function run() {
|
|
|
168
180
|
}
|
|
169
181
|
}
|
|
170
182
|
|
|
171
|
-
// 7. Vite Patch (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
// 7. Vite Patch (React/Vue)
|
|
184
|
+
if (isReact || isVue) {
|
|
185
|
+
const viteFiles = ['vite.config.ts', 'vite.config.js'];
|
|
186
|
+
const viteFile = viteFiles.find(f => fs.existsSync(path.join(projectRoot, f)));
|
|
187
|
+
if (viteFile) {
|
|
188
|
+
const isTs = viteFile.endsWith('.ts');
|
|
189
|
+
const existing = fs.readFileSync(path.join(projectRoot, viteFile), 'utf8');
|
|
190
|
+
const alreadyConfigured = existing.includes('dropi-components-stub') || existing.includes('dropiWatchPlugin');
|
|
191
|
+
|
|
192
|
+
if (!alreadyConfigured) {
|
|
193
|
+
// Detectar el import del framework (react o vue)
|
|
194
|
+
const frameworkImport = isReact
|
|
195
|
+
? "import react from \"@vitejs/plugin-react\";"
|
|
196
|
+
: "import vue from \"@vitejs/plugin-vue\";";
|
|
197
|
+
const frameworkPlugin = isReact ? 'react()' : 'vue()';
|
|
198
|
+
|
|
199
|
+
const dropiViteConfig = `import { defineConfig${isTs ? ', type Plugin' : ''} } from "vite";
|
|
200
|
+
${frameworkImport}
|
|
201
|
+
import path from "path";
|
|
202
|
+
import fs from "fs";
|
|
203
|
+
|
|
204
|
+
// Path real del symlink @dropi/ui → garantiza que se usa siempre el código local
|
|
205
|
+
const dropiUiRealPath = (() => {
|
|
206
|
+
try { return fs.realpathSync(path.join(process.cwd(), 'node_modules/@dropi/ui')); }
|
|
207
|
+
catch { return path.join(process.cwd(), 'node_modules/@dropi/ui'); }
|
|
208
|
+
})();
|
|
209
|
+
|
|
210
|
+
// Stub para dist/components/<component>.js cuando no existe (stencil --dev --watch no los genera).
|
|
211
|
+
// El lazy loader de dropi-ui.esm.js registra los componentes con el CSS actualizado.
|
|
212
|
+
const dropiComponentsStubPlugin${isTs ? ': Plugin' : ''} = {
|
|
213
|
+
name: 'dropi-components-stub',
|
|
214
|
+
apply: 'serve',
|
|
215
|
+
enforce: 'pre',
|
|
216
|
+
resolveId(id) {
|
|
217
|
+
let filePath = null;
|
|
218
|
+
if (id.match(/^@dropi\\/ui\\/dist\\/components\\/.+\\.js$/)) {
|
|
219
|
+
filePath = path.join(dropiUiRealPath, id.replace('@dropi/ui', ''));
|
|
220
|
+
} else if (id.endsWith('.js') && id.includes('/dist/components/') && id.includes('dropi')) {
|
|
221
|
+
filePath = id;
|
|
222
|
+
}
|
|
223
|
+
if (filePath && !fs.existsSync(filePath)) {
|
|
224
|
+
return '\\0dropi-stub:' + filePath;
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
load(id) {
|
|
228
|
+
if (id.startsWith('\\0dropi-stub:')) {
|
|
229
|
+
const fileName = id.split('/').pop()?.replace('.js', '') ?? 'DropiUnknown';
|
|
230
|
+
const className = fileName
|
|
231
|
+
.replace(/-([a-z])/g, (_, c) => c.toUpperCase())
|
|
232
|
+
.replace(/^[a-z]/, c => c.toUpperCase());
|
|
233
|
+
return \`export class \${className} extends HTMLElement {} export function defineCustomElement() {}\`;
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// Detecta cambios en dist/ de la librería y fuerza full-reload en el browser.
|
|
239
|
+
const dropiWatchPlugin${isTs ? ': Plugin' : ''} = {
|
|
240
|
+
name: 'dropi-watch',
|
|
241
|
+
apply: 'serve',
|
|
242
|
+
configureServer(server) {
|
|
243
|
+
const distPath = path.join(dropiUiRealPath, 'dist');
|
|
244
|
+
if (fs.existsSync(distPath)) server.watcher.add(distPath);
|
|
245
|
+
},
|
|
246
|
+
handleHotUpdate({ file, server }) {
|
|
247
|
+
if (file.includes('dropi-ui') && file.includes('dist')) {
|
|
248
|
+
for (const [modPath, mods] of server.moduleGraph.fileToModulesMap) {
|
|
249
|
+
if (modPath.includes('dropi-ui') && modPath.includes('dist')) {
|
|
250
|
+
for (const mod of mods) server.moduleGraph.invalidateModule(mod);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
server.ws.send({ type: 'full-reload' });
|
|
254
|
+
return [];
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// https://vite.dev/config/
|
|
260
|
+
export default defineConfig({
|
|
261
|
+
resolve: {
|
|
262
|
+
alias: { '@dropi/ui': dropiUiRealPath },
|
|
263
|
+
},
|
|
264
|
+
optimizeDeps: {
|
|
265
|
+
exclude: ['@dropi/ui', '@dropi/ui-react'],
|
|
266
|
+
},
|
|
267
|
+
server: {
|
|
268
|
+
headers: { 'Cache-Control': 'no-cache, no-store, must-revalidate' },
|
|
269
|
+
fs: { allow: [process.cwd(), dropiUiRealPath] },
|
|
270
|
+
},
|
|
271
|
+
plugins: [${frameworkPlugin}, dropiComponentsStubPlugin, dropiWatchPlugin],
|
|
272
|
+
});
|
|
273
|
+
`;
|
|
274
|
+
fs.writeFileSync(path.join(projectRoot, viteFile), dropiViteConfig);
|
|
275
|
+
log('Vite: configuración completa de @dropi/ui aplicada.', 'ok');
|
|
276
|
+
} else {
|
|
277
|
+
log('Vite: configuración de @dropi/ui ya presente, omitiendo.', 'info');
|
|
278
|
+
}
|
|
181
279
|
}
|
|
182
280
|
}
|
|
183
281
|
|
|
@@ -8,18 +8,23 @@ allowed-tools: Bash, Read, Write, Edit, Glob
|
|
|
8
8
|
|
|
9
9
|
Automatiza la instalación y configuración completa de `@dropi/ui` en el proyecto actual.
|
|
10
10
|
|
|
11
|
-
## REGLA CRÍTICA —
|
|
11
|
+
## REGLA CRÍTICA — Bootstrap con side-effect import
|
|
12
12
|
|
|
13
|
-
Los componentes SIEMPRE deben
|
|
13
|
+
Los componentes SIEMPRE deben inicializarse con el bootstrap de side-effect:
|
|
14
14
|
```ts
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import '@dropi/ui/dist/dropi-ui/dropi-ui.esm.js'
|
|
17
17
|
```
|
|
18
|
-
|
|
18
|
+
Este import auto-registra todos los web components en modo lazy (funciona en dev y prod, sin necesitar un prod build previo).
|
|
19
|
+
|
|
20
|
+
**PROHIBIDO** usar el loader antiguo o importar componentes directamente:
|
|
19
21
|
```ts
|
|
20
|
-
// ❌ NUNCA
|
|
22
|
+
// ❌ NUNCA — solo funciona después de prod build
|
|
23
|
+
import { defineCustomElements } from '@dropi/ui/loader'
|
|
24
|
+
defineCustomElements()
|
|
25
|
+
|
|
26
|
+
// ❌ NUNCA
|
|
21
27
|
import '@dropi/ui/dist/components/dropi-button.js'
|
|
22
|
-
import { DropiButton } from '@dropi/ui/dist/components'
|
|
23
28
|
```
|
|
24
29
|
|
|
25
30
|
---
|
|
@@ -51,15 +56,15 @@ Una vez finalizado el script, verifica que:
|
|
|
51
56
|
> Usa estos pasos solo si el comando anterior no puede ejecutarse por restricciones del entorno.
|
|
52
57
|
|
|
53
58
|
1. **Instalar dependencias**: `npm install @dropi/ui` (y `@dropi/ui-react` si es React).
|
|
54
|
-
2. **Vite Fix**: Agregar `optimizeDeps.exclude: ['@dropi/ui
|
|
59
|
+
2. **Vite Fix**: Agregar `optimizeDeps.exclude: ['@dropi/ui']` en `vite.config`.
|
|
55
60
|
3. **Estilos**: Importar `@dropi/ui/dist/dropi-ui/dropi-ui.css` en el entry point.
|
|
56
|
-
4. **
|
|
61
|
+
4. **Bootstrap**: Agregar el side-effect import `// @ts-ignore\nimport '@dropi/ui/dist/dropi-ui/dropi-ui.esm.js'` antes del render.
|
|
57
62
|
5. **Iconos**: Crear un enlace simbólico del sprite:
|
|
58
63
|
`ln -sf $(pwd)/node_modules/@dropi/ui/assets/icons/symbol/svg/sprite.css.svg public/assets/icons/symbol/svg/sprite.css.svg`
|
|
59
64
|
6. **TS Config**: Asegurar `skipLibCheck: true`.
|
|
60
65
|
7. **Validar**: Ejecutar `npm run build`.
|
|
61
66
|
|
|
62
67
|
## Reglas Críticas
|
|
63
|
-
- **
|
|
68
|
+
- **Bootstrap**: NUNCA usar `@dropi/ui/loader` (solo funciona con prod build). Usar siempre el side-effect import.
|
|
64
69
|
- **Iconos**: El sprite DEBE estar en `public/assets/icons/symbol/svg/sprite.css.svg` para que `<dropi-icon>` funcione.
|
|
65
70
|
- Si el build falla, mostrar el error exacto y resolverlo antes de reportar éxito
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-B6R6Ojma.js');
|
|
4
|
-
|
|
5
|
-
const dropiInputCss = () => `:host{display:block;width:100%}*,*::before,*::after{box-sizing:border-box}.fixed-label-container{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}.input-label{color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-xs, 10px);font-weight:var(--font-weight-regular, 400);text-align:left}.asterisk{color:var(--Error-Error-500, #f46a6b)}.form-group{position:relative;width:100%}.input-container{position:relative}.icon-input{position:absolute;top:10px;left:5px;z-index:1}.icon-input-password{position:absolute;top:10px;right:13px;cursor:pointer;z-index:1}.form-control{box-sizing:border-box;width:100%;padding:var(--Size-2, 8px);border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #fff);font-size:var(--font-size-s, 12px);font-family:inherit;color:var(--Gray-Gray-700, #32394d);transition:border-color 0.3s ease-in-out;height:40px;outline:none;appearance:none;text-align:left}.form-control::placeholder{color:transparent;transition:color 0.2s ease-in-out}.form-control:focus::placeholder,.fixed-label-input::placeholder{color:var(--Gray-Gray-400, #858ea6)}.form-control:focus{border-color:var(--Info-Info-500, #50a5f1)}.form-control-valid{border-color:var(--Gray-Gray-400, #858ea6) !important;color:var(--Gray-Gray-600, #475066)}.form-control-invalid{border-color:var(--Error-Error-500, #f46a6b) !important;color:var(--Gray-Gray-600, #475066)}.form-control:disabled{border-color:var(--Gray-Gray-200, #c3c9d9) !important;color:var(--Gray-Gray-400, #858ea6);background-color:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed}.padding-icon{padding-left:28px}.input-container--has-icon label.label-bottom{left:28px}.input-container--has-icon .form-control:focus+label.label-bottom,.input-container--has-icon .form-control:not(:placeholder-shown)+label.label-bottom{left:0}.text-password{-webkit-text-security:disc;text-security:disc}label.label-bottom{position:absolute;font-weight:var(--font-weight-regular, 400);top:10px;font-size:var(--font-size-s, 12px);color:var(--Gray-Gray-500, #69738c);left:10px;transition:all 0.2s ease-in-out;pointer-events:none;overflow:hidden;width:90%;white-space:nowrap}.form-control:focus+label.label-bottom,.form-control:not(:placeholder-shown)+label.label-bottom{top:-22px;left:0;font-size:var(--font-size-xs, 10px);color:var(--Gray-Gray-600, #475066);width:unset}.form-control:disabled+label.label-bottom{color:var(--Gray-Gray-400, #858ea6)}.form-control-helper{display:flex;position:absolute;top:100%;left:0;gap:4px;align-items:center;margin-top:4px}.form-control-helper span{display:block;color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-xs, 10px)}.invalid-color{color:var(--Error-Error-500, #f46a6b) !important}.disabled-helper{color:var(--Gray-Gray-400, #858ea6) !important}.disabled-helper{color:var(--Gray-Gray-400, #858ea6) !important}`;
|
|
6
|
-
|
|
7
|
-
const DropiInput = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.dropiInput = index.createEvent(this, "dropiInput");
|
|
11
|
-
this.dropiChange = index.createEvent(this, "dropiChange");
|
|
12
|
-
this.dropiFocus = index.createEvent(this, "dropiFocus");
|
|
13
|
-
this.dropiBlur = index.createEvent(this, "dropiBlur");
|
|
14
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
15
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
internals;
|
|
23
|
-
// ── Identification ──────────────────────────────────────────
|
|
24
|
-
/** Input id. Defaults to label value. */
|
|
25
|
-
inputId = '';
|
|
26
|
-
/** Name attribute for native form submission */
|
|
27
|
-
name = '';
|
|
28
|
-
// ── Content ─────────────────────────────────────────────────
|
|
29
|
-
/** Floating or fixed label text */
|
|
30
|
-
label = '';
|
|
31
|
-
/** Placeholder text (visible in fixedLabel mode or on focus) */
|
|
32
|
-
placeholder = ' ';
|
|
33
|
-
/** Current value (controlled) */
|
|
34
|
-
value = '';
|
|
35
|
-
/** Max character length */
|
|
36
|
-
maxlength;
|
|
37
|
-
// ── Behavior ────────────────────────────────────────────────
|
|
38
|
-
/** Disable the input */
|
|
39
|
-
disabled = false;
|
|
40
|
-
/** Mark as required (shows asterisk when showAsterisk is true) */
|
|
41
|
-
required = false;
|
|
42
|
-
/** Show the required asterisk on the label */
|
|
43
|
-
showAsterisk = true;
|
|
44
|
-
/** Show label above the input (fixed), instead of floating inside */
|
|
45
|
-
fixedLabel = false;
|
|
46
|
-
/** Keyboard input mode hint */
|
|
47
|
-
inputMode = 'text';
|
|
48
|
-
// ── Input type modifiers ────────────────────────────────────
|
|
49
|
-
/** Show password visibility toggle (renders as password field) */
|
|
50
|
-
passwordInput = false;
|
|
51
|
-
/** Apply thousand separator formatting (e.g. 1,000,000) */
|
|
52
|
-
moneyFormat = false;
|
|
53
|
-
/** Apply thousand separator without currency symbol */
|
|
54
|
-
thousandSeparator = false;
|
|
55
|
-
/** Only allow numeric characters */
|
|
56
|
-
onlyNumbers = false;
|
|
57
|
-
/** Allow decimal point when onlyNumbers is true */
|
|
58
|
-
allowDecimals = false;
|
|
59
|
-
/** Only allow letter characters */
|
|
60
|
-
onlyLetters = false;
|
|
61
|
-
// ── Icon ────────────────────────────────────────────────────
|
|
62
|
-
/** Icon name shown inside the input (only visible when value is not empty) */
|
|
63
|
-
icon = '';
|
|
64
|
-
/** Color token for the icon */
|
|
65
|
-
iconColor = 'Gray-Gray-400';
|
|
66
|
-
// ── Validation ──────────────────────────────────────────────
|
|
67
|
-
/** Mark the field as invalid (consumer-controlled) */
|
|
68
|
-
invalid = false;
|
|
69
|
-
/** Helper / error text shown below the field */
|
|
70
|
-
helperText = '';
|
|
71
|
-
/** Only show helperText when the field is invalid */
|
|
72
|
-
showHelperOnlyOnError = false;
|
|
73
|
-
// ── Internal state ──────────────────────────────────────────
|
|
74
|
-
showPassword = false;
|
|
75
|
-
touched = false;
|
|
76
|
-
// ── Events ──────────────────────────────────────────────────
|
|
77
|
-
/** Emitted on every keystroke with the current value */
|
|
78
|
-
dropiInput;
|
|
79
|
-
/** Emitted on blur with the final value */
|
|
80
|
-
dropiChange;
|
|
81
|
-
/** Emitted on focus */
|
|
82
|
-
dropiFocus;
|
|
83
|
-
/** Emitted on blur */
|
|
84
|
-
dropiBlur;
|
|
85
|
-
valueChanged(val) {
|
|
86
|
-
this.internals.setFormValue(val);
|
|
87
|
-
}
|
|
88
|
-
disabledChanged(val) {
|
|
89
|
-
this.internals.setValidity(val ? { customError: true } : {}, val ? 'Field is disabled' : '');
|
|
90
|
-
}
|
|
91
|
-
componentWillLoad() {
|
|
92
|
-
this.internals.setFormValue(this.value ?? '');
|
|
93
|
-
}
|
|
94
|
-
// ── Handlers ────────────────────────────────────────────────
|
|
95
|
-
handleInput(e) {
|
|
96
|
-
let val = e.target.value;
|
|
97
|
-
if (this.onlyNumbers)
|
|
98
|
-
val = this.filterNumbers(val);
|
|
99
|
-
if (this.onlyLetters)
|
|
100
|
-
val = this.filterLetters(val);
|
|
101
|
-
if (this.moneyFormat || this.thousandSeparator)
|
|
102
|
-
val = this.formatThousands(val, this.moneyFormat);
|
|
103
|
-
this.value = val;
|
|
104
|
-
this.internals.setFormValue(val);
|
|
105
|
-
this.dropiInput.emit(val);
|
|
106
|
-
}
|
|
107
|
-
handleKeyDown(e) {
|
|
108
|
-
if ((this.onlyNumbers || this.moneyFormat || this.thousandSeparator) && !this.isAllowedNumberKey(e)) {
|
|
109
|
-
e.preventDefault();
|
|
110
|
-
}
|
|
111
|
-
if (this.onlyLetters && !this.isAllowedLetterKey(e)) {
|
|
112
|
-
e.preventDefault();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
handleFocus() {
|
|
116
|
-
this.dropiFocus.emit();
|
|
117
|
-
}
|
|
118
|
-
handleBlur() {
|
|
119
|
-
this.touched = true;
|
|
120
|
-
this.dropiChange.emit(this.value);
|
|
121
|
-
this.dropiBlur.emit();
|
|
122
|
-
}
|
|
123
|
-
togglePassword() {
|
|
124
|
-
if (this.disabled)
|
|
125
|
-
return;
|
|
126
|
-
this.showPassword = !this.showPassword;
|
|
127
|
-
}
|
|
128
|
-
// ── Helpers ─────────────────────────────────────────────────
|
|
129
|
-
filterNumbers(val) {
|
|
130
|
-
const pattern = this.allowDecimals ? /[^0-9.]/g : /[^0-9]/g;
|
|
131
|
-
return val.replace(pattern, '');
|
|
132
|
-
}
|
|
133
|
-
filterLetters(val) {
|
|
134
|
-
return val.replace(/[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ\s]/g, '');
|
|
135
|
-
}
|
|
136
|
-
isAllowedNumberKey(e) {
|
|
137
|
-
const allowed = ['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab', 'Enter', 'Home', 'End'];
|
|
138
|
-
if (allowed.includes(e.key))
|
|
139
|
-
return true;
|
|
140
|
-
if (e.ctrlKey || e.metaKey)
|
|
141
|
-
return true; // copy/paste/select-all
|
|
142
|
-
if (/^[0-9]$/.test(e.key))
|
|
143
|
-
return true;
|
|
144
|
-
if (this.allowDecimals && e.key === '.')
|
|
145
|
-
return true;
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
isAllowedLetterKey(e) {
|
|
149
|
-
const allowed = ['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab', 'Enter', 'Home', 'End', ' '];
|
|
150
|
-
if (allowed.includes(e.key))
|
|
151
|
-
return true;
|
|
152
|
-
if (e.ctrlKey || e.metaKey)
|
|
153
|
-
return true;
|
|
154
|
-
return /^[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ]$/.test(e.key);
|
|
155
|
-
}
|
|
156
|
-
formatThousands(val, withCurrency) {
|
|
157
|
-
const raw = val.replace(/[^0-9.]/g, '');
|
|
158
|
-
const [integer, decimal] = raw.split('.');
|
|
159
|
-
const formatted = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
160
|
-
const result = decimal !== undefined ? `${formatted}.${decimal}` : formatted;
|
|
161
|
-
return withCurrency ? `$${result}` : result;
|
|
162
|
-
}
|
|
163
|
-
// ── Computed ─────────────────────────────────────────────────
|
|
164
|
-
get resolvedId() {
|
|
165
|
-
return this.inputId || this.label;
|
|
166
|
-
}
|
|
167
|
-
get inputType() {
|
|
168
|
-
if (this.passwordInput)
|
|
169
|
-
return this.showPassword ? 'text' : 'password';
|
|
170
|
-
return 'text';
|
|
171
|
-
}
|
|
172
|
-
get showHelper() {
|
|
173
|
-
if (!this.helperText)
|
|
174
|
-
return false;
|
|
175
|
-
if (this.showHelperOnlyOnError)
|
|
176
|
-
return this.invalid && this.touched;
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
get isInvalid() {
|
|
180
|
-
return this.invalid && this.touched;
|
|
181
|
-
}
|
|
182
|
-
// ── Render ───────────────────────────────────────────────────
|
|
183
|
-
render() {
|
|
184
|
-
const showAsterisk = this.required && this.showAsterisk && !this.disabled;
|
|
185
|
-
const showIconInline = !!this.icon;
|
|
186
|
-
return (index.h("div", { key: '444e873dc4175e75a5c85814499e28afb3f80b37', class: { 'fixed-label-container': this.fixedLabel } }, this.fixedLabel && (index.h("div", { key: 'a501500f872b87ad701f5c18e0e3b532005c3fcb', class: "input-label Body-S-Regular" }, this.label, showAsterisk && index.h("span", { key: '1ca3afb47b67cfb61cd8bceb8657c9f061462064', class: "asterisk" }, " *"))), index.h("div", { key: 'eb31110de652f6db7c5fdd747046280b0e81e2b6', class: "form-group" }, index.h("div", { key: 'b0bb2cac1e8d7f20d927437e4ba6327e333d1fdb', class: { 'input-container': true, 'input-container--has-icon': showIconInline } }, showIconInline && (index.h("dropi-icon", { key: '604a369b358b1c95a19cc23dd4bc4f9c77e4b050', class: "icon-input", name: this.icon, color: this.iconColor, width: "20px", height: "20px" })), this.passwordInput && (index.h("dropi-icon", { key: 'b1b3b979d172ada0c3fe616f795c7cd5b2bf45cb', class: "icon-input-password", name: this.showPassword ? 'Eye' : 'Eye-crossed', width: "20px", height: "20px", color: "Gray-Gray-500", onClick: () => this.togglePassword() })), index.h("input", { key: 'b5488711765a12b6e9fea7b0f8d5a23ae95de925', id: this.resolvedId, class: {
|
|
187
|
-
'form-control': true,
|
|
188
|
-
'form-control-valid': !this.isInvalid && this.touched && !!this.value,
|
|
189
|
-
'form-control-invalid': this.isInvalid,
|
|
190
|
-
'padding-icon': showIconInline,
|
|
191
|
-
'text-password': this.passwordInput && !this.showPassword,
|
|
192
|
-
'fixed-label-input': this.fixedLabel,
|
|
193
|
-
}, type: this.inputType, value: this.value, placeholder: this.fixedLabel ? this.placeholder : ' ', disabled: this.disabled, required: this.required, maxLength: this.maxlength, inputMode: this.inputMode, "data-cy": undefined, onInput: (e) => this.handleInput(e), onKeyDown: (e) => this.handleKeyDown(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), !this.fixedLabel && (index.h("label", { key: 'f3008d901c41e6f362977e1232e7597733c4288e', class: "Body-S-Regular label-bottom", htmlFor: this.resolvedId }, this.label, showAsterisk && index.h("span", { key: '1b982a1630f88557380df2f22c0c27bcceebbdc6', class: "asterisk" }, " *"))), this.showHelper && (index.h("div", { key: '30382a8e7beb0a14bb06f8fd25dae3da5371efd3', class: "form-control-helper" }, this.isInvalid && (index.h("dropi-icon", { key: 'a1ef2b7a9a659301cc22c19d5e5f65bd7a595a2c', name: "Warning-circle", width: "12px", height: "12px", color: "Error-Error-500" })), index.h("span", { key: '289250769c59d1ddde821395a9e97368404ca1ab', class: {
|
|
194
|
-
'disabled-helper': this.disabled,
|
|
195
|
-
'invalid-color': this.isInvalid,
|
|
196
|
-
} }, this.helperText)))))));
|
|
197
|
-
}
|
|
198
|
-
static get formAssociated() { return true; }
|
|
199
|
-
static get watchers() { return {
|
|
200
|
-
"value": [{
|
|
201
|
-
"valueChanged": 0
|
|
202
|
-
}],
|
|
203
|
-
"disabled": [{
|
|
204
|
-
"disabledChanged": 0
|
|
205
|
-
}]
|
|
206
|
-
}; }
|
|
207
|
-
};
|
|
208
|
-
DropiInput.style = dropiInputCss();
|
|
209
|
-
|
|
210
|
-
exports.dropi_input = DropiInput;
|