@dropi/ui 0.1.41 → 0.1.42
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/symbol/svg/sprite.css.svg +1 -1
- package/dist/cjs/dropi-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/dropi-accordion.cjs.entry.js +2 -2
- package/dist/cjs/dropi-alert-legacy.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert-modal.cjs.entry.js +20 -16
- package/dist/cjs/dropi-alert.cjs.entry.js +12 -12
- package/dist/cjs/dropi-avatars.cjs.entry.js +1 -1
- package/dist/cjs/dropi-badge-legacy.cjs.entry.js +2 -2
- package/dist/cjs/dropi-badge.cjs.entry.js +1 -1
- package/dist/cjs/dropi-banner-external.cjs.entry.js +3 -3
- package/dist/cjs/dropi-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/dropi-button.cjs.entry.js +7 -7
- package/dist/cjs/dropi-card-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/dropi-card-product.cjs.entry.js +12 -12
- package/dist/cjs/dropi-card-section.cjs.entry.js +9 -9
- package/dist/cjs/dropi-carousel.cjs.entry.js +8 -8
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +9 -9
- package/dist/cjs/dropi-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/dropi-chips.cjs.entry.js +4 -4
- package/dist/cjs/dropi-city-selector.cjs.entry.js +2 -2
- package/dist/cjs/dropi-color-picker.cjs.entry.js +4 -4
- package/dist/cjs/dropi-country-flags.cjs.entry.js +2 -2
- package/dist/cjs/dropi-country-selector.cjs.entry.js +6 -6
- package/dist/cjs/dropi-date-picker-range.cjs.entry.js +4 -4
- package/dist/cjs/dropi-date-picker.cjs.entry.js +12 -12
- package/dist/cjs/dropi-drawer.cjs.entry.js +4 -4
- package/dist/cjs/dropi-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/dropi-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +3 -3
- package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +5 -5
- package/dist/cjs/dropi-file-upload.cjs.entry.js +3 -3
- package/dist/cjs/dropi-icon.cjs.entry.js +17 -3
- package/dist/cjs/dropi-ilustration-icon.cjs.entry.js +5 -5
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +3 -3
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +2 -2
- package/dist/cjs/dropi-input_3.cjs.entry.js +50 -22
- package/dist/cjs/dropi-languages-selector.cjs.entry.js +4 -4
- package/dist/cjs/dropi-logo.cjs.entry.js +2 -2
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +1 -1
- package/dist/cjs/dropi-media-player.cjs.entry.js +3 -3
- package/dist/cjs/dropi-modal.cjs.entry.js +37 -32
- package/dist/cjs/dropi-navbar.cjs.entry.js +7 -7
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +34 -19
- package/dist/cjs/dropi-phone-input.cjs.entry.js +14 -14
- package/dist/cjs/dropi-progress-bar.cjs.entry.js +43 -0
- package/dist/cjs/dropi-radio-button.cjs.entry.js +5 -5
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +9 -9
- package/dist/cjs/dropi-read-more.cjs.entry.js +2 -2
- package/dist/cjs/dropi-search.cjs.entry.js +21 -21
- package/dist/cjs/dropi-select.cjs.entry.js +50 -22
- package/dist/cjs/dropi-sidebar.cjs.entry.js +6 -6
- package/dist/cjs/dropi-simple-stepper.cjs.entry.js +1 -1
- package/dist/cjs/dropi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/dropi-steps.cjs.entry.js +1 -1
- package/dist/cjs/dropi-switch.cjs.entry.js +5 -5
- package/dist/cjs/dropi-table.cjs.entry.js +38 -30
- package/dist/cjs/dropi-tabs.cjs.entry.js +5 -5
- package/dist/cjs/dropi-tag-type-product.cjs.entry.js +2 -2
- package/dist/cjs/dropi-text-area.cjs.entry.js +7 -7
- package/dist/cjs/dropi-time-line.cjs.entry.js +2 -2
- package/dist/cjs/dropi-toast.cjs.entry.js +2 -2
- package/dist/cjs/dropi-tooltip-v2.cjs.entry.js +3 -3
- package/dist/cjs/dropi-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/dropi-ui.cjs.js +2 -2
- package/dist/cjs/dropi-vertical-steps.cjs.entry.js +3 -3
- package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +2 -2
- package/dist/cjs/index-CEWSDq65.js +2773 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/symbol/svg/sprite.css.svg +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.js +1 -1
- package/dist/collection/components/dropi-accordion/dropi-accordion.js +1 -1
- package/dist/collection/components/dropi-alert/dropi-alert.js +16 -16
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.js +43 -19
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.js +1 -1
- package/dist/collection/components/dropi-button/dropi-button.css +6 -3
- package/dist/collection/components/dropi-button/dropi-button.js +6 -6
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.js +6 -6
- package/dist/collection/components/dropi-card-product/dropi-card-product.js +11 -11
- package/dist/collection/components/dropi-card-section/dropi-card-section.js +10 -10
- package/dist/collection/components/dropi-carousel/dropi-carousel.js +9 -9
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +6 -6
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.js +10 -10
- package/dist/collection/components/dropi-chips/dropi-chips.js +4 -4
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.js +2 -2
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.js +1 -1
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +6 -6
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +12 -12
- package/dist/collection/components/dropi-drawer/dropi-drawer.js +2 -2
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +1 -1
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +1 -1
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.js +1 -1
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.js +1 -1
- package/dist/collection/components/dropi-icon/dropi-icon.css +2 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +35 -1
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.js +4 -4
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +1 -1
- package/dist/collection/components/dropi-input/dropi-input.js +18 -18
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.js +4 -4
- package/dist/collection/components/dropi-logo/dropi-logo.js +1 -1
- package/dist/collection/components/dropi-modal/dropi-modal.css +12 -6
- package/dist/collection/components/dropi-modal/dropi-modal.js +47 -42
- package/dist/collection/components/dropi-navbar/dropi-navbar.js +2 -2
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +54 -18
- package/dist/collection/components/dropi-paginator/dropi-paginator.js +6 -6
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +17 -17
- package/dist/collection/components/dropi-progress-bar/dropi-progress-bar.css +35 -0
- package/dist/collection/components/dropi-progress-bar/dropi-progress-bar.js +168 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +5 -5
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.js +10 -10
- package/dist/collection/components/dropi-read-more/dropi-read-more.js +1 -1
- package/dist/collection/components/dropi-search/dropi-search.js +26 -26
- package/dist/collection/components/dropi-select/dropi-select.css +4 -0
- package/dist/collection/components/dropi-select/dropi-select.js +85 -25
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.js +6 -6
- package/dist/collection/components/dropi-switch/dropi-switch.js +5 -5
- package/dist/collection/components/dropi-table/dropi-table.js +35 -27
- package/dist/collection/components/dropi-tabs/dropi-tabs.js +5 -5
- package/dist/collection/components/dropi-tag/dropi-tag.css +16 -7
- package/dist/collection/components/dropi-tag/dropi-tag.js +55 -1
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.js +1 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +2 -2
- package/dist/collection/components/dropi-time-line/dropi-time-line.js +1 -1
- package/dist/collection/components/dropi-toast/dropi-toast.js +1 -1
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +1 -1
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.js +2 -2
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.js +1 -1
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.js +1 -1
- package/dist/components/dropi-accordion-item.js +1 -1
- package/dist/components/dropi-accordion.js +1 -1
- package/dist/components/dropi-alert-modal.js +1 -1
- package/dist/components/dropi-alert.js +1 -1
- package/dist/components/dropi-badge-legacy.js +1 -1
- package/dist/components/dropi-banner-external.js +1 -1
- package/dist/components/dropi-breadcrumb.js +1 -1
- package/dist/components/dropi-button.js +1 -1
- package/dist/components/dropi-card-checkbox.js +1 -1
- package/dist/components/dropi-card-product.js +1 -1
- package/dist/components/dropi-card-section.js +1 -1
- package/dist/components/dropi-carousel.js +1 -1
- 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.js +1 -1
- package/dist/components/dropi-color-picker.js +1 -1
- package/dist/components/dropi-country-flags.js +1 -1
- package/dist/components/dropi-country-selector.js +1 -1
- package/dist/components/dropi-date-picker-range.js +1 -1
- package/dist/components/dropi-date-picker.js +1 -1
- package/dist/components/dropi-drawer.js +1 -1
- 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.js +1 -1
- package/dist/components/dropi-file-upload.js +1 -1
- package/dist/components/dropi-icon.js +1 -1
- package/dist/components/dropi-ilustration-icon.js +1 -1
- 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.js +1 -1
- package/dist/components/dropi-logo.js +1 -1
- package/dist/components/dropi-media-player.js +1 -1
- package/dist/components/dropi-modal.js +1 -1
- package/dist/components/dropi-navbar.js +1 -1
- package/dist/components/dropi-otp-send-code.js +1 -1
- package/dist/components/dropi-paginator.js +1 -1
- package/dist/components/dropi-phone-input.js +1 -1
- package/dist/components/dropi-progress-bar.d.ts +11 -0
- package/dist/components/dropi-progress-bar.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.js +1 -1
- package/dist/components/dropi-steps.js +1 -1
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-table.js +1 -1
- package/dist/components/dropi-tabs.js +1 -1
- package/dist/components/dropi-tag-type-product.js +1 -1
- 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.js +1 -1
- package/dist/components/dropi-tooltip.js +1 -1
- package/dist/components/dropi-vertical-steps.js +1 -1
- package/dist/components/dropi-youtube-lazy-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-1YjHPRto.js +1 -0
- package/dist/components/p-9CkX3ALN.js +1 -0
- package/dist/components/p-B9-h_ikq.js +1 -0
- package/dist/components/p-B9rJd-Rf.js +1 -0
- package/dist/components/p-BGb7xtJN.js +1 -0
- package/dist/components/p-BHV6BYSS.js +1 -0
- package/dist/components/p-BSB5Ar-y.js +1 -0
- package/dist/components/p-BSHROiHb.js +1 -0
- package/dist/components/p-BT99axEq.js +1 -0
- package/dist/components/p-BVgUVZyu.js +1 -0
- package/dist/components/p-BhRjfHZ3.js +1 -0
- package/dist/components/p-Bimspdte.js +1 -0
- package/dist/components/p-BmuWhHN-.js +1 -0
- package/dist/components/p-BqJ52YOH.js +1 -0
- package/dist/components/p-BrR1YjVi.js +1 -0
- package/dist/components/p-BrnGRyf0.js +1 -0
- package/dist/components/p-BtkDdEAq.js +1 -0
- package/dist/components/p-BvIwy9Yl.js +1 -0
- package/dist/components/p-BzCPv3ND.js +1 -0
- package/dist/components/p-C44-ijf2.js +1 -0
- package/dist/components/p-CHb992Wr.js +1 -0
- package/dist/components/p-CJ4s6SQT.js +1 -0
- package/dist/components/p-CKflT57p.js +1 -0
- package/dist/components/p-CWT7wT9m.js +1 -0
- package/dist/components/p-CWWFRdg7.js +1 -0
- package/dist/components/p-CWwDNt3V.js +1 -0
- package/dist/components/p-CXUiN3Rj.js +1 -0
- package/dist/components/p-C_zOkGR5.js +1 -0
- package/dist/components/p-Cujt3jky.js +1 -0
- package/dist/components/p-D5UeShUa.js +1 -0
- package/dist/components/p-D7GP-lmt.js +1 -0
- package/dist/components/p-DFNI0UID.js +1 -0
- package/dist/components/p-DG5fe-Ke.js +1 -0
- package/dist/components/p-DKWuIsc_.js +1 -0
- package/dist/components/p-DLyzE3Kh.js +1 -0
- package/dist/components/p-DN_IcU8H.js +1 -0
- package/dist/components/p-DON3zW51.js +1 -0
- package/dist/components/p-DQzskhll.js +1 -0
- package/dist/components/p-DYAsdhfM.js +1 -0
- package/dist/components/p-DYYToiO9.js +1 -0
- package/dist/components/p-DehWQyi5.js +1 -0
- package/dist/components/p-DfSe-tBr.js +1 -0
- package/dist/components/p-Dgeh9Yg8.js +1 -0
- package/dist/components/p-DlaiuH5K.js +1 -0
- package/dist/components/p-DvaFep4Y.js +1 -0
- package/dist/components/p-ETg0qC-7.js +1 -0
- package/dist/components/p-HCtk4_Dq.js +1 -0
- package/dist/components/p-QezfyBk4.js +1 -0
- package/dist/components/p-RD09_3LO.js +1 -0
- package/dist/components/p-RQjw5hdz.js +1 -0
- package/dist/components/p-dbZuh0Uq.js +1 -0
- package/dist/components/p-emzVHCws.js +1 -0
- package/dist/components/p-im7kgtnS.js +1 -0
- package/dist/components/p-kC6NU5nP.js +1 -0
- package/dist/components/p-lX2uCKEi.js +1 -0
- package/dist/components/p-ndQSfLKF.js +1 -0
- package/dist/components/p-plWZwD4h.js +1 -0
- package/dist/components/p-t0lkpFmw.js +1 -0
- package/dist/components/p-ujToMKti.js +1 -0
- package/dist/dropi-ui/dropi-accordion-item.entry.js +1 -1
- package/dist/dropi-ui/dropi-accordion.entry.js +1 -1
- package/dist/dropi-ui/dropi-alert-modal.entry.js +19 -15
- package/dist/dropi-ui/dropi-alert-modal.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-alert.entry.js +11 -11
- package/dist/dropi-ui/dropi-alert.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-badge-legacy.entry.js +1 -1
- package/dist/dropi-ui/dropi-button.entry.js +6 -6
- package/dist/dropi-ui/dropi-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-card-checkbox.entry.js +5 -5
- package/dist/dropi-ui/dropi-card-checkbox.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-card-product.entry.js +9 -9
- package/dist/dropi-ui/dropi-card-product.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-card-section.entry.js +8 -8
- package/dist/dropi-ui/dropi-card-section.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-carousel.entry.js +7 -7
- package/dist/dropi-ui/dropi-carousel.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js +8 -8
- package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-checkbox.entry.js +5 -5
- package/dist/dropi-ui/dropi-checkbox.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-chips.entry.js +3 -3
- package/dist/dropi-ui/dropi-chips.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-color-picker.entry.js +2 -2
- package/dist/dropi-ui/dropi-country-flags.entry.js +1 -1
- package/dist/dropi-ui/dropi-country-selector.entry.js +5 -5
- package/dist/dropi-ui/dropi-country-selector.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-date-picker.entry.js +10 -10
- package/dist/dropi-ui/dropi-date-picker.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-drawer.entry.js +2 -2
- package/dist/dropi-ui/dropi-empty-state.entry.js +1 -1
- package/dist/dropi-ui/dropi-favorite-button.entry.js +1 -1
- package/dist/dropi-ui/dropi-file-upload-progress-bar.entry.js +1 -1
- package/dist/dropi-ui/dropi-file-upload.entry.js +1 -1
- package/dist/dropi-ui/dropi-file-upload.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-icon.entry.js +16 -2
- package/dist/dropi-ui/dropi-icon.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-ilustration-icon.entry.js +4 -4
- package/dist/dropi-ui/dropi-ilustration-icon.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-image-miniature.entry.js +1 -1
- package/dist/dropi-ui/dropi-input.entry.js +14 -14
- package/dist/dropi-ui/dropi-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-languages-selector.entry.js +3 -3
- package/dist/dropi-ui/dropi-languages-selector.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-logo.entry.js +1 -1
- package/dist/dropi-ui/dropi-modal.entry.js +36 -31
- package/dist/dropi-ui/dropi-modal.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-navbar.entry.js +2 -2
- package/dist/dropi-ui/dropi-otp-send-code.entry.js +30 -15
- package/dist/dropi-ui/dropi-otp-send-code.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-paginator.entry.js +5 -5
- package/dist/dropi-ui/dropi-paginator.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-phone-input.entry.js +13 -13
- package/dist/dropi-ui/dropi-phone-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-progress-bar.entry.js +44 -0
- package/dist/dropi-ui/dropi-progress-bar.entry.js.map +1 -0
- package/dist/dropi-ui/dropi-radio-button.entry.js +4 -4
- package/dist/dropi-ui/dropi-radio-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-radio-selection-list.entry.js +8 -8
- package/dist/dropi-ui/dropi-radio-selection-list.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-read-more.entry.js +1 -1
- package/dist/dropi-ui/dropi-search.entry.js +20 -20
- package/dist/dropi-ui/dropi-search.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-select.entry.js +49 -21
- package/dist/dropi-ui/dropi-select.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-sidebar.entry.js +5 -5
- package/dist/dropi-ui/dropi-sidebar.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-switch.entry.js +4 -4
- package/dist/dropi-ui/dropi-switch.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-table.entry.js +29 -21
- package/dist/dropi-ui/dropi-table.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-tabs.entry.js +4 -4
- package/dist/dropi-ui/dropi-tabs.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-tag-type-product.entry.js +1 -1
- package/dist/dropi-ui/dropi-tag.entry.js +30 -2
- package/dist/dropi-ui/dropi-tag.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-text-area.entry.js +2 -2
- package/dist/dropi-ui/dropi-time-line.entry.js +1 -1
- package/dist/dropi-ui/dropi-toast.entry.js +1 -1
- package/dist/dropi-ui/dropi-tooltip-v2.entry.js +2 -2
- package/dist/dropi-ui/dropi-tooltip.entry.js +1 -1
- package/dist/dropi-ui/dropi-ui.css +1 -311
- package/dist/dropi-ui/dropi-ui.esm.js +1 -50
- package/dist/dropi-ui/dropi-vertical-steps.entry.js +1 -1
- package/dist/dropi-ui/dropi-youtube-lazy-video.entry.js +1 -1
- package/dist/dropi-ui/index.esm.js +0 -4
- package/dist/dropi-ui/p-019c2c37.entry.js +1 -0
- package/dist/dropi-ui/p-01c57627.entry.js +1 -0
- package/dist/dropi-ui/p-03515548.entry.js +1 -0
- package/dist/dropi-ui/p-0366349e.entry.js +1 -0
- package/dist/dropi-ui/p-06bdd006.entry.js +1 -0
- package/dist/dropi-ui/p-086a6f5f.entry.js +1 -0
- package/dist/dropi-ui/p-088616e6.entry.js +1 -0
- package/dist/dropi-ui/p-08bc8fb2.entry.js +1 -0
- package/dist/dropi-ui/p-0946a1f7.entry.js +1 -0
- package/dist/dropi-ui/p-09aa9a3c.entry.js +1 -0
- package/dist/dropi-ui/p-0a76c15c.entry.js +1 -0
- package/dist/dropi-ui/p-0d188f2c.entry.js +1 -0
- package/dist/dropi-ui/p-0e026afe.entry.js +1 -0
- package/dist/dropi-ui/p-0ef73e45.entry.js +1 -0
- package/dist/dropi-ui/p-0f1b13e5.entry.js +1 -0
- package/dist/dropi-ui/p-1107c210.entry.js +1 -0
- package/dist/dropi-ui/p-13a6dd72.entry.js +1 -0
- package/dist/dropi-ui/p-1558c22f.entry.js +1 -0
- package/dist/dropi-ui/p-16674c7c.entry.js +1 -0
- package/dist/dropi-ui/p-17c53e19.entry.js +1 -0
- package/dist/dropi-ui/p-1ce00757.entry.js +1 -0
- package/dist/dropi-ui/p-229dddb0.entry.js +1 -0
- package/dist/dropi-ui/p-278281d2.entry.js +1 -0
- package/dist/dropi-ui/p-28f960a1.entry.js +1 -0
- package/dist/dropi-ui/p-2d356767.entry.js +1 -0
- package/dist/dropi-ui/p-2f9072e7.entry.js +1 -0
- package/dist/dropi-ui/p-30377b7e.entry.js +1 -0
- package/dist/dropi-ui/p-342eaf9e.entry.js +1 -0
- package/dist/dropi-ui/p-3496cc01.entry.js +1 -0
- package/dist/dropi-ui/p-37bdbadc.entry.js +1 -0
- package/dist/dropi-ui/p-393867c2.entry.js +1 -0
- package/dist/dropi-ui/p-3a28b79c.entry.js +1 -0
- package/dist/dropi-ui/p-3aefce2b.entry.js +1 -0
- package/dist/dropi-ui/p-3f76c680.entry.js +1 -0
- package/dist/dropi-ui/p-488a3113.entry.js +1 -0
- package/dist/dropi-ui/p-497e4eff.entry.js +1 -0
- package/dist/dropi-ui/p-4a72e4c8.entry.js +1 -0
- package/dist/dropi-ui/p-4b169817.entry.js +1 -0
- package/dist/dropi-ui/p-4d31eab8.entry.js +1 -0
- package/dist/dropi-ui/p-508cfd38.entry.js +1 -0
- package/dist/dropi-ui/p-50e851b7.entry.js +1 -0
- package/dist/dropi-ui/p-5730ca4e.entry.js +1 -0
- package/dist/dropi-ui/p-575e1951.entry.js +1 -0
- package/dist/dropi-ui/p-57c3b667.entry.js +1 -0
- package/dist/dropi-ui/p-5c0cd221.entry.js +1 -0
- package/dist/dropi-ui/p-5e0da387.entry.js +1 -0
- package/dist/dropi-ui/p-5eb75ddf.entry.js +1 -0
- package/dist/dropi-ui/p-5f735166.entry.js +1 -0
- package/dist/dropi-ui/p-61f8905c.entry.js +1 -0
- package/dist/dropi-ui/p-648e5340.entry.js +1 -0
- package/dist/dropi-ui/p-66d7d67b.entry.js +1 -0
- package/dist/dropi-ui/p-673a5cfd.entry.js +1 -0
- package/dist/dropi-ui/p-67ba7d35.entry.js +1 -0
- package/dist/dropi-ui/p-692b665a.entry.js +1 -0
- package/dist/dropi-ui/p-69cf66c1.entry.js +1 -0
- package/dist/dropi-ui/p-6a148627.entry.js +1 -0
- package/dist/dropi-ui/p-6b925a36.entry.js +1 -0
- package/dist/dropi-ui/p-6cb6cfe0.entry.js +1 -0
- package/dist/dropi-ui/p-6dbce3d3.entry.js +1 -0
- package/dist/dropi-ui/p-70f75e92.entry.js +1 -0
- package/dist/dropi-ui/p-7140309a.entry.js +1 -0
- package/dist/dropi-ui/p-72ec96d0.entry.js +1 -0
- package/dist/dropi-ui/p-7450d195.entry.js +1 -0
- package/dist/dropi-ui/p-754aed1c.entry.js +1 -0
- package/dist/dropi-ui/p-76fa02a1.entry.js +1 -0
- package/dist/dropi-ui/p-770b0195.entry.js +1 -0
- package/dist/dropi-ui/p-7822b081.entry.js +1 -0
- package/dist/dropi-ui/p-78282471.entry.js +1 -0
- package/dist/dropi-ui/p-78aa7fb3.entry.js +1 -0
- package/dist/dropi-ui/p-7a25f595.entry.js +1 -0
- package/dist/dropi-ui/p-7c0f959f.entry.js +1 -0
- package/dist/dropi-ui/p-7c5ea4c5.entry.js +1 -0
- package/dist/dropi-ui/p-7f02ae47.entry.js +1 -0
- package/dist/dropi-ui/p-7f0f828d.entry.js +1 -0
- package/dist/dropi-ui/p-80f0f6e6.entry.js +1 -0
- package/dist/dropi-ui/p-813678a2.entry.js +1 -0
- package/dist/dropi-ui/p-819d810e.entry.js +1 -0
- package/dist/dropi-ui/p-84019422.entry.js +1 -0
- package/dist/dropi-ui/p-8b8dc399.entry.js +1 -0
- package/dist/dropi-ui/p-8cf27f13.entry.js +1 -0
- package/dist/dropi-ui/p-8d6313c0.entry.js +1 -0
- package/dist/dropi-ui/p-8dbc6bc8.entry.js +1 -0
- package/dist/dropi-ui/p-8fc3dbcb.entry.js +1 -0
- package/dist/dropi-ui/p-90abda79.entry.js +1 -0
- package/dist/dropi-ui/p-928b59e8.entry.js +1 -0
- package/dist/dropi-ui/p-92c9e3c5.entry.js +1 -0
- package/dist/dropi-ui/p-94144382.entry.js +1 -0
- package/dist/dropi-ui/p-94a58087.entry.js +1 -0
- package/dist/dropi-ui/p-9645d628.entry.js +1 -0
- package/dist/dropi-ui/p-96f72e50.entry.js +1 -0
- package/dist/dropi-ui/p-9b288982.entry.js +1 -0
- package/dist/dropi-ui/p-9b55c8ad.entry.js +1 -0
- package/dist/dropi-ui/p-9bcde3a5.entry.js +1 -0
- package/dist/dropi-ui/p-9e8615de.entry.js +1 -0
- package/dist/dropi-ui/p-a0ade2e7.entry.js +1 -0
- package/dist/dropi-ui/p-a2fb4CHk.js +2 -0
- package/dist/dropi-ui/p-a3b729fe.entry.js +1 -0
- package/dist/dropi-ui/p-a3d602fd.entry.js +1 -0
- package/dist/dropi-ui/p-a470a24a.entry.js +1 -0
- package/dist/dropi-ui/p-a50c8339.entry.js +1 -0
- package/dist/dropi-ui/p-a524ef3d.entry.js +1 -0
- package/dist/dropi-ui/p-a62c691f.entry.js +1 -0
- package/dist/dropi-ui/p-a745529a.entry.js +1 -0
- package/dist/dropi-ui/p-a96c54ed.entry.js +1 -0
- package/dist/dropi-ui/p-ab3c52a4.entry.js +1 -0
- package/dist/dropi-ui/p-abd327ed.entry.js +1 -0
- package/dist/dropi-ui/p-ac79e805.entry.js +1 -0
- package/dist/dropi-ui/p-ac9d2149.entry.js +1 -0
- package/dist/dropi-ui/p-ad73631e.entry.js +1 -0
- package/dist/dropi-ui/p-b20f7dde.entry.js +1 -0
- package/dist/dropi-ui/p-b2e7cf4f.entry.js +1 -0
- package/dist/dropi-ui/p-b325f7cf.entry.js +1 -0
- package/dist/dropi-ui/p-b63f5d03.entry.js +1 -0
- package/dist/dropi-ui/p-b7748488.entry.js +1 -0
- package/dist/dropi-ui/p-b8050ef5.entry.js +1 -0
- package/dist/dropi-ui/p-b99fee29.entry.js +1 -0
- package/dist/dropi-ui/p-ba3779a2.entry.js +1 -0
- package/dist/dropi-ui/p-bd0d1a29.entry.js +1 -0
- package/dist/dropi-ui/p-bef43920.entry.js +1 -0
- package/dist/dropi-ui/p-bfd43bdf.entry.js +1 -0
- package/dist/dropi-ui/p-c173db8c.entry.js +1 -0
- package/dist/dropi-ui/p-c218524f.entry.js +1 -0
- package/dist/dropi-ui/p-c4fbbb5a.entry.js +1 -0
- package/dist/dropi-ui/p-c51fcf75.entry.js +1 -0
- package/dist/dropi-ui/p-c662bce3.entry.js +1 -0
- package/dist/dropi-ui/p-c6ac1b6d.entry.js +1 -0
- package/dist/dropi-ui/p-ca2e462a.entry.js +1 -0
- package/dist/dropi-ui/p-ca90e108.entry.js +1 -0
- package/dist/dropi-ui/p-cb87d3c7.entry.js +1 -0
- package/dist/dropi-ui/p-cc954850.entry.js +1 -0
- package/dist/dropi-ui/p-cf7cd408.entry.js +1 -0
- package/dist/dropi-ui/p-d02dfc6a.entry.js +1 -0
- package/dist/dropi-ui/p-d11524ca.entry.js +1 -0
- package/dist/dropi-ui/p-d46f3328.entry.js +1 -0
- package/dist/dropi-ui/p-d693bbb8.entry.js +1 -0
- package/dist/dropi-ui/p-d813969b.entry.js +1 -0
- package/dist/dropi-ui/p-d899d4e1.entry.js +1 -0
- package/dist/dropi-ui/p-da038b5d.entry.js +1 -0
- package/dist/dropi-ui/p-db6af92e.entry.js +1 -0
- package/dist/dropi-ui/p-dc920aff.entry.js +1 -0
- package/dist/dropi-ui/p-e1126498.entry.js +1 -0
- package/dist/dropi-ui/p-e163bf7f.entry.js +1 -0
- package/dist/dropi-ui/p-e1b40bda.entry.js +1 -0
- package/dist/dropi-ui/p-e22a3b45.entry.js +1 -0
- package/dist/dropi-ui/p-e524fed1.entry.js +1 -0
- package/dist/dropi-ui/p-e53b23dd.entry.js +1 -0
- package/dist/dropi-ui/p-e629fdc7.entry.js +1 -0
- package/dist/dropi-ui/p-e97d3704.entry.js +1 -0
- package/dist/dropi-ui/p-e9a64ecc.entry.js +1 -0
- package/dist/dropi-ui/p-ea13bfee.entry.js +1 -0
- package/dist/dropi-ui/p-edcf5623.entry.js +1 -0
- package/dist/dropi-ui/p-edeacd44.entry.js +1 -0
- package/dist/dropi-ui/p-edef4506.entry.js +1 -0
- package/dist/dropi-ui/p-eec49ea3.entry.js +1 -0
- package/dist/dropi-ui/p-f057bd98.entry.js +1 -0
- package/dist/dropi-ui/p-f0893459.entry.js +1 -0
- package/dist/dropi-ui/p-f0ace417.entry.js +1 -0
- package/dist/dropi-ui/p-f23e1df7.entry.js +1 -0
- package/dist/dropi-ui/p-f4bd8568.entry.js +1 -0
- package/dist/dropi-ui/p-f7a605f8.entry.js +1 -0
- package/dist/dropi-ui/p-f7df0f43.entry.js +1 -0
- package/dist/dropi-ui/p-f80fa01d.entry.js +1 -0
- package/dist/dropi-ui/p-f9084a2c.entry.js +1 -0
- package/dist/dropi-ui/p-f9af2041.entry.js +1 -0
- package/dist/dropi-ui/p-f9d05b69.entry.js +1 -0
- package/dist/dropi-ui/p-faa59cd8.entry.js +1 -0
- package/dist/dropi-ui/p-fb39dfdc.entry.js +1 -0
- package/dist/dropi-ui/p-fcba49ca.entry.js +1 -0
- package/dist/dropi-ui/p-fdbdedd0.entry.js +1 -0
- package/dist/dropi-ui/p-fef3673d.entry.js +1 -0
- package/dist/esm/dropi-accordion-item.entry.js +2 -2
- package/dist/esm/dropi-accordion.entry.js +2 -2
- package/dist/esm/dropi-alert-legacy.entry.js +1 -1
- package/dist/esm/dropi-alert-modal.entry.js +20 -16
- package/dist/esm/dropi-alert.entry.js +12 -12
- package/dist/esm/dropi-avatars.entry.js +1 -1
- package/dist/esm/dropi-badge-legacy.entry.js +2 -2
- package/dist/esm/dropi-badge.entry.js +1 -1
- package/dist/esm/dropi-banner-external.entry.js +3 -3
- package/dist/esm/dropi-breadcrumb.entry.js +2 -2
- package/dist/esm/dropi-button.entry.js +7 -7
- package/dist/esm/dropi-card-checkbox.entry.js +6 -6
- package/dist/esm/dropi-card-product.entry.js +12 -12
- package/dist/esm/dropi-card-section.entry.js +9 -9
- package/dist/esm/dropi-carousel.entry.js +8 -8
- package/dist/esm/dropi-checkbox-selection-list.entry.js +9 -9
- package/dist/esm/dropi-checkbox.entry.js +6 -6
- package/dist/esm/dropi-chips.entry.js +4 -4
- package/dist/esm/dropi-city-selector.entry.js +2 -2
- package/dist/esm/dropi-color-picker.entry.js +4 -4
- package/dist/esm/dropi-country-flags.entry.js +2 -2
- package/dist/esm/dropi-country-selector.entry.js +6 -6
- package/dist/esm/dropi-date-picker-range.entry.js +4 -4
- package/dist/esm/dropi-date-picker.entry.js +12 -12
- package/dist/esm/dropi-drawer.entry.js +4 -4
- package/dist/esm/dropi-dropdown.entry.js +2 -2
- package/dist/esm/dropi-empty-state.entry.js +3 -3
- package/dist/esm/dropi-favorite-button.entry.js +3 -3
- package/dist/esm/dropi-file-upload-progress-bar.entry.js +5 -5
- package/dist/esm/dropi-file-upload.entry.js +3 -3
- package/dist/esm/dropi-icon.entry.js +17 -3
- package/dist/esm/dropi-ilustration-icon.entry.js +5 -5
- package/dist/esm/dropi-image-miniature.entry.js +3 -3
- package/dist/esm/dropi-image-overlay.entry.js +2 -2
- package/dist/esm/dropi-input_3.entry.js +50 -22
- package/dist/esm/dropi-languages-selector.entry.js +4 -4
- package/dist/esm/dropi-logo.entry.js +2 -2
- package/dist/esm/dropi-lottie-loader.entry.js +1 -1
- package/dist/esm/dropi-media-player.entry.js +3 -3
- package/dist/esm/dropi-modal.entry.js +37 -32
- package/dist/esm/dropi-navbar.entry.js +7 -7
- package/dist/esm/dropi-otp-send-code.entry.js +34 -19
- package/dist/esm/dropi-phone-input.entry.js +14 -14
- package/dist/esm/dropi-progress-bar.entry.js +41 -0
- package/dist/esm/dropi-radio-button.entry.js +5 -5
- package/dist/esm/dropi-radio-selection-list.entry.js +9 -9
- package/dist/esm/dropi-read-more.entry.js +2 -2
- package/dist/esm/dropi-search.entry.js +21 -21
- package/dist/esm/dropi-select.entry.js +50 -22
- package/dist/esm/dropi-sidebar.entry.js +6 -6
- package/dist/esm/dropi-simple-stepper.entry.js +1 -1
- package/dist/esm/dropi-skeleton.entry.js +1 -1
- package/dist/esm/dropi-steps.entry.js +1 -1
- package/dist/esm/dropi-switch.entry.js +5 -5
- package/dist/esm/dropi-table.entry.js +38 -30
- package/dist/esm/dropi-tabs.entry.js +5 -5
- package/dist/esm/dropi-tag-type-product.entry.js +2 -2
- package/dist/esm/dropi-text-area.entry.js +7 -7
- package/dist/esm/dropi-time-line.entry.js +2 -2
- package/dist/esm/dropi-toast.entry.js +2 -2
- package/dist/esm/dropi-tooltip-v2.entry.js +3 -3
- package/dist/esm/dropi-tooltip.entry.js +2 -2
- package/dist/esm/dropi-ui.js +3 -3
- package/dist/esm/dropi-vertical-steps.entry.js +3 -3
- package/dist/esm/dropi-youtube-lazy-video.entry.js +2 -2
- package/dist/esm/index-a2fb4CHk.js +2763 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dropi-alert/dropi-alert.d.ts +3 -3
- package/dist/types/components/dropi-alert-modal/dropi-alert-modal.d.ts +8 -4
- package/dist/types/components/dropi-button/dropi-button.d.ts +1 -1
- package/dist/types/components/dropi-card-checkbox/dropi-card-checkbox.d.ts +1 -1
- package/dist/types/components/dropi-card-product/dropi-card-product.d.ts +2 -2
- package/dist/types/components/dropi-card-section/dropi-card-section.d.ts +2 -2
- package/dist/types/components/dropi-carousel/dropi-carousel.d.ts +2 -2
- 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 +2 -2
- package/dist/types/components/dropi-chips/dropi-chips.d.ts +1 -1
- package/dist/types/components/dropi-country-selector/dropi-country-selector.d.ts +1 -1
- package/dist/types/components/dropi-date-picker/dropi-date-picker.d.ts +2 -2
- package/dist/types/components/dropi-icon/dropi-icon.d.ts +4 -0
- package/dist/types/components/dropi-input/dropi-input.d.ts +4 -4
- package/dist/types/components/dropi-languages-selector/dropi-languages-selector.d.ts +1 -1
- package/dist/types/components/dropi-modal/dropi-modal.d.ts +9 -8
- package/dist/types/components/dropi-otp-send-code/dropi-otp-send-code.d.ts +7 -3
- package/dist/types/components/dropi-paginator/dropi-paginator.d.ts +1 -1
- package/dist/types/components/dropi-phone-input/dropi-phone-input.d.ts +4 -4
- package/dist/types/components/dropi-progress-bar/dropi-progress-bar.d.ts +16 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +1 -1
- package/dist/types/components/dropi-radio-selection-list/dropi-radio-selection-list.d.ts +2 -2
- package/dist/types/components/dropi-search/dropi-search.d.ts +6 -6
- package/dist/types/components/dropi-select/dropi-select.d.ts +10 -5
- package/dist/types/components/dropi-sidebar/dropi-sidebar.d.ts +1 -1
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +1 -1
- package/dist/types/components/dropi-table/dropi-table.d.ts +6 -6
- package/dist/types/components/dropi-tabs/dropi-tabs.d.ts +1 -1
- package/dist/types/components/dropi-tag/dropi-tag.d.ts +5 -0
- package/dist/types/components.d.ts +303 -167
- package/hydrate/index.js +509 -348
- package/hydrate/index.mjs +509 -348
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ const DropiReadMore = class {
|
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
const showToggle = this.needsTruncation && (this.expanded ? this.showSeeLess : true);
|
|
33
|
-
return (h("div", { key: '
|
|
33
|
+
return (h("div", { key: '6accf9aa0a6f7377c7de6e8cbcb9e2a7ee99573a', class: "read-more" }, h("p", { key: '96e5493df8b065008f9bc45cea1ba768eabfc0a2', class: "read-more__text", style: this.textStyle ? this.textStyle : undefined }, this.displayText, showToggle && (h("button", { key: '195d962715c5c618701c3e86df618289915e3a9b', class: "read-more__toggle", style: this.buttonStyle ? this.buttonStyle : undefined, onClick: () => this.expanded = !this.expanded }, this.expanded ? ' Ver menos' : '... Ver más')))));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
DropiReadMore.style = dropiReadMoreCss();
|
|
@@ -5,12 +5,12 @@ const dropiSearchCss = () => `:host{display:block;width:100%;position:relative}*
|
|
|
5
5
|
const DropiSearch = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
8
|
+
this.dropiInput = createEvent(this, "dropiInput", 7);
|
|
9
|
+
this.dropiBlur = createEvent(this, "dropiBlur", 7);
|
|
10
|
+
this.dropiKeyEnter = createEvent(this, "dropiKeyEnter", 7);
|
|
11
|
+
this.dropiChange = createEvent(this, "dropiChange", 7);
|
|
12
|
+
this.dropiClear = createEvent(this, "dropiClear", 7);
|
|
13
|
+
this.dropiModelChange = createEvent(this, "dropiModelChange", 7);
|
|
14
14
|
}
|
|
15
15
|
/** Visual variant (matches Angular `type`) */
|
|
16
16
|
type = 'default';
|
|
@@ -44,17 +44,17 @@ const DropiSearch = class {
|
|
|
44
44
|
selected = [];
|
|
45
45
|
parsedOptions = [];
|
|
46
46
|
/** Emitted on input change. e.detail = current text */
|
|
47
|
-
|
|
47
|
+
dropiInput;
|
|
48
48
|
/** Emitted on blur */
|
|
49
|
-
|
|
49
|
+
dropiBlur;
|
|
50
50
|
/** Emitted when Enter is pressed. e.detail = current text */
|
|
51
|
-
|
|
51
|
+
dropiKeyEnter;
|
|
52
52
|
/** Emitted on change event of the native input (matches Angular `onChange`) */
|
|
53
|
-
|
|
53
|
+
dropiChange;
|
|
54
54
|
/** Emitted when clear button clicked */
|
|
55
|
-
|
|
55
|
+
dropiClear;
|
|
56
56
|
/** Emitted when selection changes. e.detail = selected items */
|
|
57
|
-
|
|
57
|
+
dropiModelChange;
|
|
58
58
|
optionsChanged(val) {
|
|
59
59
|
this.parsedOptions = typeof val === 'string' ? JSON.parse(val) : (val || []);
|
|
60
60
|
}
|
|
@@ -70,20 +70,20 @@ const DropiSearch = class {
|
|
|
70
70
|
handleInput(e) {
|
|
71
71
|
this.textInput = e.target.value;
|
|
72
72
|
this.open = this.parsedOptions.length > 0;
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
73
|
+
this.dropiInput.emit(this.textInput);
|
|
74
|
+
this.dropiChange.emit(this.textInput);
|
|
75
75
|
}
|
|
76
76
|
handleKeyDown(e) {
|
|
77
77
|
if (e.key === 'Enter')
|
|
78
|
-
this.
|
|
78
|
+
this.dropiKeyEnter.emit(this.textInput);
|
|
79
79
|
if (e.key === 'Escape')
|
|
80
80
|
this.open = false;
|
|
81
81
|
}
|
|
82
82
|
handleClear() {
|
|
83
83
|
this.textInput = '';
|
|
84
84
|
this.open = false;
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
85
|
+
this.dropiClear.emit();
|
|
86
|
+
this.dropiInput.emit('');
|
|
87
87
|
}
|
|
88
88
|
isSelected(opt) {
|
|
89
89
|
return this.selected.some(s => s[this.dataName] === opt[this.dataName]);
|
|
@@ -102,14 +102,14 @@ const DropiSearch = class {
|
|
|
102
102
|
this.selected = [opt];
|
|
103
103
|
this.open = false;
|
|
104
104
|
}
|
|
105
|
-
this.
|
|
105
|
+
this.dropiModelChange.emit(this.selected);
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
108
|
const showDropdown = this.open && this.parsedOptions.length > 0;
|
|
109
|
-
return (h("div", { key: '
|
|
109
|
+
return (h("div", { key: '594b15b4b31044f4a02376dc773ea36da893d773', class: "search-wrap" }, this.label && h("label", { key: '297a989441ad892715b09421f9a53618851c1b52', class: "search-label" }, this.label), h("div", { key: '6bbaf4ea5c1bc6ff831626117fccde647e68ba19', class: `search-input-row search-input-row--${this.type}` }, this.showIcon && h("dropi-icon", { key: 'e94c3a3895a14e950a018023d5d7a281a230abae', class: "search-icon", name: "Search", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("input", { key: '820bf2f4c9ecaf9907aceaaa08bd3fa309606e90', class: "search-input", type: this.typeInput, placeholder: this.placeholder, value: this.textInput, maxLength: this.maxLength, onInput: (e) => this.handleInput(e), onKeyDown: (e) => this.handleKeyDown(e), onFocus: () => {
|
|
110
110
|
if (this.parsedOptions.length)
|
|
111
111
|
this.open = true;
|
|
112
|
-
}, onBlur: () => { setTimeout(() => this.open = false, 150); this.
|
|
112
|
+
}, onBlur: () => { setTimeout(() => this.open = false, 150); this.dropiBlur.emit(); } }), this.showClear && this.textInput && (h("button", { key: 'e2fd7c3d5fee45a83f030589f58d4fee9f3af69c', class: "search-clear", onClick: () => this.handleClear(), "aria-label": "Limpiar" }, h("dropi-icon", { key: 'a530b0adb83d76b205cd2b22792f14229950836e', name: "Close-small", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" })))), showDropdown && (h("div", { key: '8c062d43dccb41c84b2a599ed6d1a5e049a75b65', class: `search-dropdown search-dropdown--${this.position}`, style: { '--dropdown-height': `${this.heightOverlay}px` } }, this.filtered.length === 0 ? (h("div", { class: "search-no-results" }, "Sin resultados")) : (this.filtered.map((opt, i) => (h("div", { class: { 'search-option': true, 'search-option--selected': this.isSelected(opt) }, key: i, onMouseDown: (e) => { e.preventDefault(); this.selectOption(opt); } }, this.multipleSelectModel && h("dropi-checkbox", { checked: this.isSelected(opt) }), h("span", { class: "search-option__label" }, opt[this.dataName])))))))));
|
|
113
113
|
}
|
|
114
114
|
static get watchers() { return {
|
|
115
115
|
"dataToSearch": [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropi-search.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,MAAM,CAAC,uzDAAuzD,CAAC;;MCgBz0D,WAAW,GAAA,MAAA;;;;;;;;;;;IAEd,IAAI,GAAiE,SAAS;;IAE9E,WAAW,GAAW,WAAW;;IAEhB,SAAS,GAAW,EAAE;;IAEvC,SAAS,GAAsB,MAAM;;AAErC,IAAA,SAAS;;IAET,QAAQ,GAAY,IAAI;;IAExB,SAAS,GAAY,IAAI;;IAEzB,YAAY,GAA4B,EAAE;;IAE1C,QAAQ,GAAW,MAAM;;IAEzB,QAAQ,GAAmB,MAAM;;IAEjC,mBAAmB,GAAY,IAAI;;IAEnC,aAAa,GAAW,GAAG;;IAE3B,KAAK,GAAW,EAAE;;IAED,KAAK,GAA4B,EAAE;IAE3C,IAAI,GAAY,KAAK;IACrB,QAAQ,GAAmB,EAAE;IAC7B,aAAa,GAAmB,EAAE;;AAG1C,IAAA,OAAO;;AAEP,IAAA,MAAM;;AAEN,IAAA,UAAU;;AAEV,IAAA,QAAQ;;AAER,IAAA,OAAO;;AAEP,IAAA,WAAW;AAGpB,IAAA,cAAc,CAAC,GAA4B,EAAA;QACzC,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC;;IAG9E,iBA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AS,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,EAAA,CAAG,CACnF,CACV,CACG,EAEL,YAAY,KACX,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,oCAAoC,IAAI,CAAC,QAAQ,CAAA,CAAE,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,CAAA,EAAG,IAAI,CAAC,aAAa,CAAA,EAAA,CAAI,EAAS,EAAA,EAC9H,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,IACzB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,mBAAmB,EAAA,EAAA,gBAAA,CAAqB,KAEnD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,MACvB,CAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,yBAAyB,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EACjF,GAAG,EAAE,CAAC,EACN,WAAW,EAAE,CAAC,CAAC,KAAI,EAAG,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAA,EAElE,IAAI,CAAC,mBAAmB,IAAI,CAAA,CAAA,gBAAA,EAAA,EAAgB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAA,CAAI,EAC9E,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,sBAAsB,IAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAQ,CAC1D,CACP,CAAC,CACH,CACG,CACP,CACG;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-search/dropi-search.css?tag=dropi-search&encapsulation=shadow","src/components/dropi-search/dropi-search.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n position: relative;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.search-label {\n display: block;\n font-size: var(--font-size-xs, 10px);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 4px;\n}\n\n/* ── Input row ──────────────────────────────────────────── */\n.search-input-row {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n}\n\n.search-icon {\n position: absolute;\n left: 10px;\n pointer-events: none;\n z-index: 1;\n}\n\n.search-input {\n width: 100%;\n height: 40px;\n padding: 0 36px 0 34px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n font-size: var(--font-size-s, 12px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n outline: none;\n transition: border-color 0.2s;\n}\n\n.search-input:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n}\n\n.search-input::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-clear {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n z-index: 1;\n}\n\n/* ── Dropdown ───────────────────────────────────────────── */\n.search-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n max-height: var(--dropdown-height, 240px);\n overflow-y: auto;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n z-index: 100;\n}\n\n.search-option {\n display: flex;\n align-items: center;\n gap: var(--Size-2, 8px);\n padding: var(--Size-2, 8px) var(--Size-3, 12px);\n cursor: pointer;\n transition: background 0.15s;\n user-select: none;\n}\n\n.search-option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n\n.search-option--selected {\n background: var(--Primary-Primary-50, #fff5eb);\n}\n\n.search-option__label {\n flex: 1;\n font-size: var(--font-size-s, 12px);\n color: var(--Gray-Gray-700, #32394d);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.search-no-results {\n padding: var(--Size-3, 12px);\n font-size: var(--font-size-s, 12px);\n color: var(--Gray-Gray-400, #858ea6);\n text-align: center;\n}\n","import { Component, Prop, State, Event, EventEmitter, Watch, h } from '@stencil/core';\n\nexport interface SearchOption {\n [key: string]: any;\n}\n\n/**\n * @component dropi-search\n * Text search input with optional dropdown results list.\n * Supports single and multi-select, keyboard navigation, and clear button.\n */\n@Component({\n tag: 'dropi-search',\n styleUrl: 'dropi-search.css',\n shadow: true,\n})\nexport class DropiSearch {\n /** Visual variant (matches Angular `type`) */\n @Prop() type: 'default' | 'dropdown' | 'dropdown-button' | 'default-light' = 'default';\n /** Placeholder text */\n @Prop() placeholder: string = 'Search...';\n /** Controlled input value */\n @Prop({ mutable: true }) textInput: string = '';\n /** HTML input type: text | number (matches Angular `typeInput`) */\n @Prop() typeInput: 'text' | 'number' = 'text';\n /** Max character length */\n @Prop() maxLength: number;\n /** Show the search icon (matches Angular `showIcon`) */\n @Prop() showIcon: boolean = true;\n /** Show clear (×) button when input has text */\n @Prop() showClear: boolean = true;\n /** Data source to filter. Pass as array or JSON string */\n @Prop() dataToSearch: SearchOption[] | string = [];\n /** Property name to display and search */\n @Prop() dataName: string = 'name';\n /** Dropdown open direction: down | top (matches Angular `position`) */\n @Prop() position: 'down' | 'top' = 'down';\n /** Allow multiple selection */\n @Prop() multipleSelectModel: boolean = true;\n /** Max height of dropdown (numeric value) */\n @Prop() heightOverlay: number = 230;\n /** Label shown above the input */\n @Prop() label: string = '';\n /** Controlled selected items array (matches Angular `model`) */\n @Prop({ mutable: true }) model: SearchOption[] | string = [];\n\n @State() private open: boolean = false;\n @State() private selected: SearchOption[] = [];\n @State() private parsedOptions: SearchOption[] = [];\n\n /** Emitted on input change. e.detail = current text */\n @Event() onInput: EventEmitter<string>;\n /** Emitted on blur */\n @Event() onBlur: EventEmitter<void>;\n /** Emitted when Enter is pressed. e.detail = current text */\n @Event() onKeyEnter: EventEmitter<string>;\n /** Emitted on change event of the native input (matches Angular `onChange`) */\n @Event() onChange: EventEmitter<string>;\n /** Emitted when clear button clicked */\n @Event() onClear: EventEmitter<void>;\n /** Emitted when selection changes. e.detail = selected items */\n @Event() modelChange: EventEmitter<SearchOption[]>;\n\n @Watch('dataToSearch')\n optionsChanged(val: SearchOption[] | string) {\n this.parsedOptions = typeof val === 'string' ? JSON.parse(val) : (val || []);\n }\n\n componentWillLoad() {\n this.optionsChanged(this.dataToSearch);\n }\n\n private get filtered(): SearchOption[] {\n if (!this.textInput) return this.parsedOptions;\n const q = this.textInput.toLowerCase();\n return this.parsedOptions.filter(o => String(o[this.dataName] ?? '').toLowerCase().includes(q));\n }\n\n private handleInput(e: InputEvent) {\n this.textInput = (e.target as HTMLInputElement).value;\n this.open = this.parsedOptions.length > 0;\n this.onInput.emit(this.textInput);\n this.onChange.emit(this.textInput);\n }\n\n private handleKeyDown(e: KeyboardEvent) {\n if (e.key === 'Enter') this.onKeyEnter.emit(this.textInput);\n if (e.key === 'Escape') this.open = false;\n }\n\n private handleClear() {\n this.textInput = '';\n this.open = false;\n this.onClear.emit();\n this.onInput.emit('');\n }\n\n private isSelected(opt: SearchOption): boolean {\n return this.selected.some(s => s[this.dataName] === opt[this.dataName]);\n }\n\n private selectOption(opt: SearchOption) {\n if (this.multipleSelectModel) {\n if (this.isSelected(opt)) {\n this.selected = this.selected.filter(s => s[this.dataName] !== opt[this.dataName]);\n } else {\n this.selected = [...this.selected, opt];\n }\n } else {\n this.textInput = opt[this.dataName] ?? '';\n this.selected = [opt];\n this.open = false;\n }\n this.modelChange.emit(this.selected);\n }\n\n render() {\n const showDropdown = this.open && this.parsedOptions.length > 0;\n\n return (\n <div class=\"search-wrap\">\n {this.label && <label class=\"search-label\">{this.label}</label>}\n\n <div class={`search-input-row search-input-row--${this.type}`}>\n {this.showIcon && <dropi-icon class=\"search-icon\" name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />}\n\n <input\n class=\"search-input\"\n type={this.typeInput}\n placeholder={this.placeholder}\n value={this.textInput}\n maxLength={this.maxLength}\n onInput={(e) => this.handleInput(e as InputEvent)}\n onKeyDown={(e) => this.handleKeyDown(e as KeyboardEvent)}\n onFocus={() => { if (this.parsedOptions.length) this.open = true; }}\n onBlur={() => { setTimeout(() => this.open = false, 150); this.onBlur.emit(); }}\n />\n\n {this.showClear && this.textInput && (\n <button class=\"search-clear\" onClick={() => this.handleClear()} aria-label=\"Limpiar\">\n <dropi-icon name=\"Close-small\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </button>\n )}\n </div>\n\n {showDropdown && (\n <div class={`search-dropdown search-dropdown--${this.position}`} style={{ '--dropdown-height': `${this.heightOverlay}px` } as any}>\n {this.filtered.length === 0 ? (\n <div class=\"search-no-results\">Sin resultados</div>\n ) : (\n this.filtered.map((opt, i) => (\n <div\n class={{ 'search-option': true, 'search-option--selected': this.isSelected(opt) }}\n key={i}\n onMouseDown={(e) => { e.preventDefault(); this.selectOption(opt); }}\n >\n {this.multipleSelectModel && <dropi-checkbox checked={this.isSelected(opt)} />}\n <span class=\"search-option__label\">{opt[this.dataName]}</span>\n </div>\n ))\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropi-search.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,MAAM,CAAC,uzDAAuzD,CAAC;;MCgBz0D,WAAW,GAAA,MAAA;;;;;;;;;;;IAEd,IAAI,GAAiE,SAAS;;IAE9E,WAAW,GAAW,WAAW;;IAEhB,SAAS,GAAW,EAAE;;IAEvC,SAAS,GAAsB,MAAM;;AAErC,IAAA,SAAS;;IAET,QAAQ,GAAY,IAAI;;IAExB,SAAS,GAAY,IAAI;;IAEzB,YAAY,GAA4B,EAAE;;IAE1C,QAAQ,GAAW,MAAM;;IAEzB,QAAQ,GAAmB,MAAM;;IAEjC,mBAAmB,GAAY,IAAI;;IAEnC,aAAa,GAAW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,EAAA,EAElE,IAAI,CAAC,mBAAmB,IAAI,CAAA,CAAA,gBAAA,EAAA,EAAgB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAA,CAAI,EAC9E,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,sBAAsB,IAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAQ,CAC1D,CACP,CAAC,CACH,CACG,CACP,CACG;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-search/dropi-search.css?tag=dropi-search&encapsulation=shadow","src/components/dropi-search/dropi-search.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n position: relative;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.search-label {\n display: block;\n font-size: var(--font-size-xs, 10px);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 4px;\n}\n\n/* ── Input row ──────────────────────────────────────────── */\n.search-input-row {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n}\n\n.search-icon {\n position: absolute;\n left: 10px;\n pointer-events: none;\n z-index: 1;\n}\n\n.search-input {\n width: 100%;\n height: 40px;\n padding: 0 36px 0 34px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n font-size: var(--font-size-s, 12px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n outline: none;\n transition: border-color 0.2s;\n}\n\n.search-input:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n}\n\n.search-input::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-clear {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n z-index: 1;\n}\n\n/* ── Dropdown ───────────────────────────────────────────── */\n.search-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n max-height: var(--dropdown-height, 240px);\n overflow-y: auto;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n z-index: 100;\n}\n\n.search-option {\n display: flex;\n align-items: center;\n gap: var(--Size-2, 8px);\n padding: var(--Size-2, 8px) var(--Size-3, 12px);\n cursor: pointer;\n transition: background 0.15s;\n user-select: none;\n}\n\n.search-option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n\n.search-option--selected {\n background: var(--Primary-Primary-50, #fff5eb);\n}\n\n.search-option__label {\n flex: 1;\n font-size: var(--font-size-s, 12px);\n color: var(--Gray-Gray-700, #32394d);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.search-no-results {\n padding: var(--Size-3, 12px);\n font-size: var(--font-size-s, 12px);\n color: var(--Gray-Gray-400, #858ea6);\n text-align: center;\n}\n","import { Component, Prop, State, Event, EventEmitter, Watch, h } from '@stencil/core';\n\nexport interface SearchOption {\n [key: string]: any;\n}\n\n/**\n * @component dropi-search\n * Text search input with optional dropdown results list.\n * Supports single and multi-select, keyboard navigation, and clear button.\n */\n@Component({\n tag: 'dropi-search',\n styleUrl: 'dropi-search.css',\n shadow: true,\n})\nexport class DropiSearch {\n /** Visual variant (matches Angular `type`) */\n @Prop() type: 'default' | 'dropdown' | 'dropdown-button' | 'default-light' = 'default';\n /** Placeholder text */\n @Prop() placeholder: string = 'Search...';\n /** Controlled input value */\n @Prop({ mutable: true }) textInput: string = '';\n /** HTML input type: text | number (matches Angular `typeInput`) */\n @Prop() typeInput: 'text' | 'number' = 'text';\n /** Max character length */\n @Prop() maxLength: number;\n /** Show the search icon (matches Angular `showIcon`) */\n @Prop() showIcon: boolean = true;\n /** Show clear (×) button when input has text */\n @Prop() showClear: boolean = true;\n /** Data source to filter. Pass as array or JSON string */\n @Prop() dataToSearch: SearchOption[] | string = [];\n /** Property name to display and search */\n @Prop() dataName: string = 'name';\n /** Dropdown open direction: down | top (matches Angular `position`) */\n @Prop() position: 'down' | 'top' = 'down';\n /** Allow multiple selection */\n @Prop() multipleSelectModel: boolean = true;\n /** Max height of dropdown (numeric value) */\n @Prop() heightOverlay: number = 230;\n /** Label shown above the input */\n @Prop() label: string = '';\n /** Controlled selected items array (matches Angular `model`) */\n @Prop({ mutable: true }) model: SearchOption[] | string = [];\n\n @State() private open: boolean = false;\n @State() private selected: SearchOption[] = [];\n @State() private parsedOptions: SearchOption[] = [];\n\n /** Emitted on input change. e.detail = current text */\n @Event() dropiInput: EventEmitter<string>;\n /** Emitted on blur */\n @Event() dropiBlur: EventEmitter<void>;\n /** Emitted when Enter is pressed. e.detail = current text */\n @Event() dropiKeyEnter: EventEmitter<string>;\n /** Emitted on change event of the native input (matches Angular `onChange`) */\n @Event() dropiChange: EventEmitter<string>;\n /** Emitted when clear button clicked */\n @Event() dropiClear: EventEmitter<void>;\n /** Emitted when selection changes. e.detail = selected items */\n @Event() dropiModelChange: EventEmitter<SearchOption[]>;\n\n @Watch('dataToSearch')\n optionsChanged(val: SearchOption[] | string) {\n this.parsedOptions = typeof val === 'string' ? JSON.parse(val) : (val || []);\n }\n\n componentWillLoad() {\n this.optionsChanged(this.dataToSearch);\n }\n\n private get filtered(): SearchOption[] {\n if (!this.textInput) return this.parsedOptions;\n const q = this.textInput.toLowerCase();\n return this.parsedOptions.filter(o => String(o[this.dataName] ?? '').toLowerCase().includes(q));\n }\n\n private handleInput(e: InputEvent) {\n this.textInput = (e.target as HTMLInputElement).value;\n this.open = this.parsedOptions.length > 0;\n this.dropiInput.emit(this.textInput);\n this.dropiChange.emit(this.textInput);\n }\n\n private handleKeyDown(e: KeyboardEvent) {\n if (e.key === 'Enter') this.dropiKeyEnter.emit(this.textInput);\n if (e.key === 'Escape') this.open = false;\n }\n\n private handleClear() {\n this.textInput = '';\n this.open = false;\n this.dropiClear.emit();\n this.dropiInput.emit('');\n }\n\n private isSelected(opt: SearchOption): boolean {\n return this.selected.some(s => s[this.dataName] === opt[this.dataName]);\n }\n\n private selectOption(opt: SearchOption) {\n if (this.multipleSelectModel) {\n if (this.isSelected(opt)) {\n this.selected = this.selected.filter(s => s[this.dataName] !== opt[this.dataName]);\n } else {\n this.selected = [...this.selected, opt];\n }\n } else {\n this.textInput = opt[this.dataName] ?? '';\n this.selected = [opt];\n this.open = false;\n }\n this.dropiModelChange.emit(this.selected);\n }\n\n render() {\n const showDropdown = this.open && this.parsedOptions.length > 0;\n\n return (\n <div class=\"search-wrap\">\n {this.label && <label class=\"search-label\">{this.label}</label>}\n\n <div class={`search-input-row search-input-row--${this.type}`}>\n {this.showIcon && <dropi-icon class=\"search-icon\" name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />}\n\n <input\n class=\"search-input\"\n type={this.typeInput}\n placeholder={this.placeholder}\n value={this.textInput}\n maxLength={this.maxLength}\n onInput={(e) => this.handleInput(e as InputEvent)}\n onKeyDown={(e) => this.handleKeyDown(e as KeyboardEvent)}\n onFocus={() => { if (this.parsedOptions.length) this.open = true; }}\n onBlur={() => { setTimeout(() => this.open = false, 150); this.dropiBlur.emit(); }}\n />\n\n {this.showClear && this.textInput && (\n <button class=\"search-clear\" onClick={() => this.handleClear()} aria-label=\"Limpiar\">\n <dropi-icon name=\"Close-small\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </button>\n )}\n </div>\n\n {showDropdown && (\n <div class={`search-dropdown search-dropdown--${this.position}`} style={{ '--dropdown-height': `${this.heightOverlay}px` } as any}>\n {this.filtered.length === 0 ? (\n <div class=\"search-no-results\">Sin resultados</div>\n ) : (\n this.filtered.map((opt, i) => (\n <div\n class={{ 'search-option': true, 'search-option--selected': this.isSelected(opt) }}\n key={i}\n onMouseDown={(e) => { e.preventDefault(); this.selectOption(opt); }}\n >\n {this.multipleSelectModel && <dropi-checkbox checked={this.isSelected(opt)} />}\n <span class=\"search-option__label\">{opt[this.dataName]}</span>\n </div>\n ))\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-Cvp2LQOM.js';
|
|
2
2
|
|
|
3
|
-
const dropiSelectCss = () => `:host{display:block;width:100%;text-align:left}*,*::before,*::after{box-sizing:border-box}.custom-select{position:relative;width:100%}.custom-select label{display:block;font-size:var(--font-size-xs, 10px);font-weight:var(--font-weight-regular, 400);color:var(--Gray-Gray-600, #475066)}.disabled-label{color:var(--Gray-Gray-400, #858ea6) !important}.asterisk{color:var(--Error-Error-500, #f46a6b)}.dropdown-container{display:flex;align-items:center;gap:4px}.left-label{color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-m, 14px);white-space:nowrap}.select-button{box-sizing:border-box;width:100%;height:40px;padding:0 0.75rem;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);color:var(--Gray-Gray-500, #69738c);font-size:var(--font-size-s, 12px);font-family:inherit;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;transition:border-color 0.2s ease;gap:8px}.select-button:focus{outline:none;border-color:var(--Info-Info-500, #50a5f1)}.select-button:disabled{border-color:var(--Gray-Gray-200, #c3c9d9);color:var(--Gray-Gray-400, #858ea6);background-color:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed}.select-completed{border-color:var(--Gray-Gray-400, #858ea6);color:var(--Gray-Gray-600, #475066)}.select-button-error{border-color:var(--Error-Error-500, #f46a6b) !important}.no-border{border:none !important;color:var(--Gray-Gray-600, #475066);padding:var(--Size-4, 16px);background-color:transparent !important;gap:var(--Size-2, 8px)}.no-border:disabled{background-color:transparent !important}.button-content{display:flex;align-items:center;gap:8px;overflow:hidden;flex:1;min-width:0}.elipsis{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-dropdown-overlay{position:fixed;max-height:250px;overflow-y:auto;list-style:none;padding:var(--Size-4, 16px) var(--Size-4, 16px) var(--Size-3, 12px);margin:0;border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);box-shadow:0px 8px 24px rgba(0, 0, 0, 0.12);z-index:9999;animation:dropdown-open 120ms ease-out}@keyframes dropdown-open{from{opacity:0;transform:scaleY(0.95);transform-origin:top}to{opacity:1;transform:scaleY(1);transform-origin:top}}.option{box-sizing:border-box;width:100%;min-height:40px;border-radius:var(--Border-2, 8px);padding:var(--Size-3, 12px) var(--Size-4, 16px);border:none;background:transparent;text-align:left;color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-s, 12px);font-family:inherit;cursor:pointer;display:flex;align-items:center;gap:var(--Size-2, 8px);transition:background 0.15s ease}.option:hover:not(:disabled){background:var(--Gray-Gray-50, #f7f8fa)}.option:disabled,.disabled-option{opacity:0.5;cursor:not-allowed}.option.selected-option:not(.option-radio){background:var(--Primary-Primary-50, #fef8f2);color:var(--Primary-Primary-500, #f49a3d)}.option-group-title{padding:var(--Size-3, 12px) var(--Size-4, 16px);font-size:var(--font-size-s, 12px);font-weight:var(--font-weight-medium, 500);color:var(--Gray-Gray-500, #69738c);list-style:none}.option-group{padding-left:var(--Size-6, 32px)}.sticky-search{position:sticky;top:calc(-1 * var(--Size-4, 16px));background:var(--Neutral-White, #ffffff);z-index:10;margin:calc(-1 * var(--Size-4, 16px)) calc(-1 * var(--Size-4, 16px)) 0;padding:var(--Size-2, 8px) var(--Size-4, 16px);border-bottom:1px solid var(--Gray-Gray-100, #e6eaf2);list-style:none}.search-wrapper{display:flex;align-items:center;gap:8px;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);padding:6px 10px;background:var(--Neutral-White, #ffffff)}.search-input{flex:1;border:none;outline:none;font-size:var(--font-size-s, 12px);font-family:inherit;color:var(--Gray-Gray-700, #32394d);background:transparent}.search-input::placeholder{color:var(--Gray-Gray-400, #858ea6)}.search-clear{background:none;border:none;cursor:pointer;padding:0;display:flex;align-items:center}.multi-checkbox{width:18px;height:18px;min-width:18px;border-radius:var(--Border-1, 4px);border:2px solid var(--Gray-Gray-200, #c3c9d9);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background 0.15s, border-color 0.15s}.multi-checkbox.checked{background:var(--Primary-Primary-500, #f49a3d);border-color:var(--Primary-Primary-500, #f49a3d)}.option-radio{display:flex;align-items:center;gap:12px}.option-radio.selected-option{border-radius:var(--Border-2, 8px);background:var(--Primary-Primary-50, #fef8f2);color:var(--Primary-Primary-500, #f49a3d)}.option-radio.selected-option .option-second-label{color:var(--Primary-Primary-500, #f49a3d)}.radio{width:20px;height:20px;min-width:20px;border-radius:50%;border:2px solid var(--Gray-Gray-200, #c3c9d9);display:flex;align-items:center;justify-content:center;flex-shrink:0}.radio.selected{border-color:var(--Primary-Primary-500, #f49a3d)}.circle{width:12px;height:12px;border-radius:50%;background:var(--Primary-Primary-500, #f49a3d)}.labels-container{display:flex;justify-content:space-between;width:100%;min-width:0}.option-image{width:24px;height:24px;border-radius:60px;object-fit:cover;flex-shrink:0}.small-image{width:20px;height:20px}.option-image-fallback{width:24px;height:24px;border-radius:60px;background:var(--Primary-Primary-500, #f49a3d);color:white;font-size:13px;font-weight:var(--font-weight-bold);display:flex;justify-content:center;align-items:center;flex-shrink:0}.small-image.option-image-fallback{width:20px;height:20px}.option-second-label{color:var(--Gray-Gray-700, #32394d);font-weight:var(--font-weight-bold);white-space:nowrap}.flag-placeholder{font-size:11px;font-weight:var(--font-weight-semibold);color:var(--Gray-Gray-500, #69738c);flex-shrink:0}.select-helper,.select-helper-error{display:flex;gap:var(--Size-1, 4px);align-items:center;margin-top:var(--Size-1, 4px)}.select-helper span{color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-xs, 10px)}.select-helper-error span{color:var(--Error-Error-500, #f46a6b);font-size:var(--font-size-xs, 10px)}.no-results{padding:var(--Size-3, 12px) var(--Size-4, 16px);color:var(--Gray-Gray-400, #858ea6);font-size:var(--font-size-s, 12px);list-style:none;text-align:center}`;
|
|
3
|
+
const dropiSelectCss = () => `:host{display:block;width:100%;text-align:left}*,*::before,*::after{box-sizing:border-box}.custom-select{position:relative;width:100%}.custom-select label{display:block;font-size:var(--font-size-xs, 10px);font-weight:var(--font-weight-regular, 400);color:var(--Gray-Gray-600, #475066)}.disabled-label{color:var(--Gray-Gray-400, #858ea6) !important}.asterisk{color:var(--Error-Error-500, #f46a6b)}.dropdown-container{display:flex;align-items:center;gap:4px}.left-label{color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-m, 14px);white-space:nowrap}.select-button{box-sizing:border-box;width:100%;height:40px;padding:0 0.75rem;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);color:var(--Gray-Gray-500, #69738c);font-size:var(--font-size-s, 12px);font-family:inherit;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;transition:border-color 0.2s ease;gap:8px}.select-button:focus{outline:none;border-color:var(--Info-Info-500, #50a5f1)}.select-button:disabled{border-color:var(--Gray-Gray-200, #c3c9d9);color:var(--Gray-Gray-400, #858ea6);background-color:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed}.select-completed{border-color:var(--Gray-Gray-400, #858ea6);color:var(--Gray-Gray-600, #475066)}.select-button-error{border-color:var(--Error-Error-500, #f46a6b) !important}.no-border{border:none !important;color:var(--Gray-Gray-600, #475066);padding:var(--Size-4, 16px);background-color:transparent !important;gap:var(--Size-2, 8px)}.no-border:disabled{background-color:transparent !important}.button-content{display:flex;align-items:center;gap:8px;overflow:hidden;flex:1;min-width:0}.elipsis{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-dropdown-overlay{position:fixed;max-height:250px;overflow-y:auto;list-style:none;padding:var(--Size-4, 16px) var(--Size-4, 16px) var(--Size-3, 12px);margin:0;border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);box-shadow:0px 8px 24px rgba(0, 0, 0, 0.12);z-index:9999;animation:dropdown-open 120ms ease-out}.select-dropdown-overlay.within-modal{position:absolute}@keyframes dropdown-open{from{opacity:0;transform:scaleY(0.95);transform-origin:top}to{opacity:1;transform:scaleY(1);transform-origin:top}}.option{box-sizing:border-box;width:100%;min-height:40px;border-radius:var(--Border-2, 8px);padding:var(--Size-3, 12px) var(--Size-4, 16px);border:none;background:transparent;text-align:left;color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-s, 12px);font-family:inherit;cursor:pointer;display:flex;align-items:center;gap:var(--Size-2, 8px);transition:background 0.15s ease}.option:hover:not(:disabled){background:var(--Gray-Gray-50, #f7f8fa)}.option:disabled,.disabled-option{opacity:0.5;cursor:not-allowed}.option.selected-option:not(.option-radio){background:var(--Primary-Primary-50, #fef8f2);color:var(--Primary-Primary-500, #f49a3d)}.option-group-title{padding:var(--Size-3, 12px) var(--Size-4, 16px);font-size:var(--font-size-s, 12px);font-weight:var(--font-weight-medium, 500);color:var(--Gray-Gray-500, #69738c);list-style:none}.option-group{padding-left:var(--Size-6, 32px)}.sticky-search{position:sticky;top:calc(-1 * var(--Size-4, 16px));background:var(--Neutral-White, #ffffff);z-index:10;margin:calc(-1 * var(--Size-4, 16px)) calc(-1 * var(--Size-4, 16px)) 0;padding:var(--Size-2, 8px) var(--Size-4, 16px);border-bottom:1px solid var(--Gray-Gray-100, #e6eaf2);list-style:none}.search-wrapper{display:flex;align-items:center;gap:8px;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);padding:6px 10px;background:var(--Neutral-White, #ffffff)}.search-input{flex:1;border:none;outline:none;font-size:var(--font-size-s, 12px);font-family:inherit;color:var(--Gray-Gray-700, #32394d);background:transparent}.search-input::placeholder{color:var(--Gray-Gray-400, #858ea6)}.search-clear{background:none;border:none;cursor:pointer;padding:0;display:flex;align-items:center}.multi-checkbox{width:18px;height:18px;min-width:18px;border-radius:var(--Border-1, 4px);border:2px solid var(--Gray-Gray-200, #c3c9d9);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background 0.15s, border-color 0.15s}.multi-checkbox.checked{background:var(--Primary-Primary-500, #f49a3d);border-color:var(--Primary-Primary-500, #f49a3d)}.option-radio{display:flex;align-items:center;gap:12px}.option-radio.selected-option{border-radius:var(--Border-2, 8px);background:var(--Primary-Primary-50, #fef8f2);color:var(--Primary-Primary-500, #f49a3d)}.option-radio.selected-option .option-second-label{color:var(--Primary-Primary-500, #f49a3d)}.radio{width:20px;height:20px;min-width:20px;border-radius:50%;border:2px solid var(--Gray-Gray-200, #c3c9d9);display:flex;align-items:center;justify-content:center;flex-shrink:0}.radio.selected{border-color:var(--Primary-Primary-500, #f49a3d)}.circle{width:12px;height:12px;border-radius:50%;background:var(--Primary-Primary-500, #f49a3d)}.labels-container{display:flex;justify-content:space-between;width:100%;min-width:0}.option-image{width:24px;height:24px;border-radius:60px;object-fit:cover;flex-shrink:0}.small-image{width:20px;height:20px}.option-image-fallback{width:24px;height:24px;border-radius:60px;background:var(--Primary-Primary-500, #f49a3d);color:white;font-size:13px;font-weight:var(--font-weight-bold);display:flex;justify-content:center;align-items:center;flex-shrink:0}.small-image.option-image-fallback{width:20px;height:20px}.option-second-label{color:var(--Gray-Gray-700, #32394d);font-weight:var(--font-weight-bold);white-space:nowrap}.flag-placeholder{font-size:11px;font-weight:var(--font-weight-semibold);color:var(--Gray-Gray-500, #69738c);flex-shrink:0}.select-helper,.select-helper-error{display:flex;gap:var(--Size-1, 4px);align-items:center;margin-top:var(--Size-1, 4px)}.select-helper span{color:var(--Gray-Gray-600, #475066);font-size:var(--font-size-xs, 10px)}.select-helper-error span{color:var(--Error-Error-500, #f46a6b);font-size:var(--font-size-xs, 10px)}.no-results{padding:var(--Size-3, 12px) var(--Size-4, 16px);color:var(--Gray-Gray-400, #858ea6);font-size:var(--font-size-s, 12px);list-style:none;text-align:center}`;
|
|
4
4
|
|
|
5
5
|
const DropiSelect = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
8
|
+
this.dropiChangeSelect = createEvent(this, "dropiChangeSelect", 7);
|
|
9
|
+
this.dropiClear = createEvent(this, "dropiClear", 7);
|
|
10
|
+
this.dropiSearch = createEvent(this, "dropiSearch", 7);
|
|
11
|
+
this.dropiScrollEnd = createEvent(this, "dropiScrollEnd", 7);
|
|
12
|
+
this.dropiKeyEnter = createEvent(this, "dropiKeyEnter", 7);
|
|
13
13
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
14
14
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
15
15
|
}
|
|
@@ -55,6 +55,8 @@ const DropiSelect = class {
|
|
|
55
55
|
selectedOption = null;
|
|
56
56
|
/** Custom CSS class for the dropdown overlay */
|
|
57
57
|
overlayClass = '';
|
|
58
|
+
/** If true, uses absolute positioning instead of fixed (better for modals with transforms) */
|
|
59
|
+
withinModal = false;
|
|
58
60
|
/**
|
|
59
61
|
* Convenience object prop — matches Angular `selectProperties: SelectProperties`.
|
|
60
62
|
* Fields: label, placeholder, options, showObligatory, textHelper,
|
|
@@ -74,15 +76,15 @@ const DropiSelect = class {
|
|
|
74
76
|
};
|
|
75
77
|
// ── Events ───────────────────────────────────────────────────
|
|
76
78
|
/** Emitted when an option is selected — matches Angular 'onChangeSelect' */
|
|
77
|
-
|
|
79
|
+
dropiChangeSelect;
|
|
78
80
|
/** Emitted when the selection is cleared — matches Angular 'onClear' */
|
|
79
|
-
|
|
81
|
+
dropiClear;
|
|
80
82
|
/** Emitted on search input — matches Angular 'onSearch' */
|
|
81
|
-
|
|
83
|
+
dropiSearch;
|
|
82
84
|
/** Emitted when the list is scrolled to the end — matches Angular 'scrolledToEnd' */
|
|
83
|
-
|
|
85
|
+
dropiScrollEnd;
|
|
84
86
|
/** Emitted on Enter key inside search — matches Angular 'onKeyEnter' */
|
|
85
|
-
|
|
87
|
+
dropiKeyEnter;
|
|
86
88
|
// ── Lifecycle ────────────────────────────────────────────────
|
|
87
89
|
componentWillLoad() {
|
|
88
90
|
if (this.selectProperties)
|
|
@@ -163,13 +165,27 @@ const DropiSelect = class {
|
|
|
163
165
|
this._selectedOption = null;
|
|
164
166
|
this.multiSelected = [];
|
|
165
167
|
this.internals.setFormValue('');
|
|
166
|
-
this.
|
|
168
|
+
this.dropiClear.emit();
|
|
167
169
|
}
|
|
168
170
|
/** Reset multi-select state and show a placeholder label */
|
|
169
171
|
async resetMultiSelect(_placeholder) {
|
|
170
172
|
this.multiSelected = [];
|
|
171
173
|
this.internals.setFormValue('');
|
|
172
174
|
}
|
|
175
|
+
// ── Scroll & Resize listeners ──────────────────────────────
|
|
176
|
+
handleWindowScroll(e) {
|
|
177
|
+
if (!this.isOpen || this.withinModal)
|
|
178
|
+
return;
|
|
179
|
+
// When scroll originates inside shadow DOM, e.target is retargeted to the host element
|
|
180
|
+
if (e.target === this.el)
|
|
181
|
+
return;
|
|
182
|
+
this.closeDropdown();
|
|
183
|
+
}
|
|
184
|
+
handleWindowResize() {
|
|
185
|
+
if (this.isOpen && !this.withinModal) {
|
|
186
|
+
this.closeDropdown();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
173
189
|
// ── Click outside ────────────────────────────────────────────
|
|
174
190
|
handleOutsideClick(e) {
|
|
175
191
|
if (this.isOpen && !e.composedPath().includes(this.el)) {
|
|
@@ -213,8 +229,8 @@ const DropiSelect = class {
|
|
|
213
229
|
return this.placeholder;
|
|
214
230
|
}
|
|
215
231
|
// ── Dropdown positioning ─────────────────────────────────────
|
|
216
|
-
|
|
217
|
-
if (this.
|
|
232
|
+
updateDropdownPosition() {
|
|
233
|
+
if (!this.buttonRef)
|
|
218
234
|
return;
|
|
219
235
|
const rect = this.buttonRef.getBoundingClientRect();
|
|
220
236
|
const viewportHeight = window.innerHeight;
|
|
@@ -228,6 +244,18 @@ const DropiSelect = class {
|
|
|
228
244
|
left: `${rect.left}px`,
|
|
229
245
|
width: `${rect.width}px`,
|
|
230
246
|
};
|
|
247
|
+
}
|
|
248
|
+
openDropdown() {
|
|
249
|
+
if (this.withinModal) {
|
|
250
|
+
this.dropdownStyle = {
|
|
251
|
+
top: `${this.el.offsetHeight}px`,
|
|
252
|
+
left: '0px',
|
|
253
|
+
width: '100%',
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
this.updateDropdownPosition();
|
|
258
|
+
}
|
|
231
259
|
this.isOpen = true;
|
|
232
260
|
if (this.searchEnabled) {
|
|
233
261
|
setTimeout(() => {
|
|
@@ -257,12 +285,12 @@ const DropiSelect = class {
|
|
|
257
285
|
this.multiSelected = [...this.multiSelected, option];
|
|
258
286
|
}
|
|
259
287
|
this.internals.setFormValue(this.multiSelected.map(o => o.id).join(','));
|
|
260
|
-
this.
|
|
288
|
+
this.dropiChangeSelect.emit([...this.multiSelected]);
|
|
261
289
|
}
|
|
262
290
|
else {
|
|
263
291
|
this._selectedOption = option;
|
|
264
292
|
this.internals.setFormValue(String(option.id));
|
|
265
|
-
this.
|
|
293
|
+
this.dropiChangeSelect.emit(option);
|
|
266
294
|
this.closeDropdown();
|
|
267
295
|
}
|
|
268
296
|
}
|
|
@@ -272,7 +300,7 @@ const DropiSelect = class {
|
|
|
272
300
|
// ── Search ───────────────────────────────────────────────────
|
|
273
301
|
handleSearch(term) {
|
|
274
302
|
this.searchTerm = term;
|
|
275
|
-
this.
|
|
303
|
+
this.dropiSearch.emit(term);
|
|
276
304
|
const lower = term.toLowerCase().trim();
|
|
277
305
|
if (!lower) {
|
|
278
306
|
this.filteredOptions = [...this.options];
|
|
@@ -300,7 +328,7 @@ const DropiSelect = class {
|
|
|
300
328
|
this.hasEmittedScrollEnd = false;
|
|
301
329
|
this.lastScrollTop = el.scrollTop;
|
|
302
330
|
if (distFromBottom <= threshold && !this.hasEmittedScrollEnd) {
|
|
303
|
-
this.
|
|
331
|
+
this.dropiScrollEnd.emit();
|
|
304
332
|
this.hasEmittedScrollEnd = true;
|
|
305
333
|
setTimeout(() => { this.hasEmittedScrollEnd = false; }, 1000);
|
|
306
334
|
}
|
|
@@ -348,16 +376,16 @@ const DropiSelect = class {
|
|
|
348
376
|
renderDropdown() {
|
|
349
377
|
if (!this.isOpen)
|
|
350
378
|
return null;
|
|
351
|
-
return (h("ul", { class: `select-dropdown-overlay ${this.overlayClass}`, style: this.dropdownStyle, onScroll: (e) => this.handleScroll(e) }, this.searchEnabled && (h("li", { class: "sticky-search" }, h("div", { class: "search-wrapper" }, h("dropi-icon", { name: "Search", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("input", { class: "search-input", type: "text", placeholder: this.placeHolderSearch, value: this.searchTerm, onInput: (e) => this.handleSearch(e.target.value), onKeyDown: (e) => {
|
|
379
|
+
return (h("ul", { class: `select-dropdown-overlay ${this.overlayClass} ${this.withinModal ? 'within-modal' : ''}`, style: this.dropdownStyle, onScroll: (e) => this.handleScroll(e) }, this.searchEnabled && (h("li", { class: "sticky-search" }, h("div", { class: "search-wrapper" }, h("dropi-icon", { name: "Search", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("input", { class: "search-input", type: "text", placeholder: this.placeHolderSearch, value: this.searchTerm, onInput: (e) => this.handleSearch(e.target.value), onKeyDown: (e) => {
|
|
352
380
|
if (e.key === 'Enter')
|
|
353
|
-
this.
|
|
381
|
+
this.dropiKeyEnter.emit(e);
|
|
354
382
|
} }), this.searchTerm && (h("button", { type: "button", class: "search-clear", onClick: () => this.handleSearch('') }, h("dropi-icon", { name: "Close", iconWidth: "14px", iconHeight: "14px", color: "Gray-Gray-400" })))))), this.isGrouped && this.filteredOptions.map(group => [
|
|
355
383
|
h("li", { class: "option-group-title" }, group.category),
|
|
356
384
|
...group.options.map(opt => (h("li", { key: opt.id }, h("button", { type: "button", class: { option: true, 'option-group': true, 'disabled-option': !!opt.disabled }, disabled: opt.disabled, onClick: () => this.selectOption(opt) }, opt.preIcon && h("dropi-icon", { name: opt.preIcon, iconWidth: "20px", iconHeight: "20px", color: "Gray-Gray-500" }), h("span", { class: "elipsis" }, opt.label))))),
|
|
357
385
|
]), !this.isGrouped && this.filteredOptions.map(opt => this.renderOption(opt)), this.filteredOptions.length === 0 && (h("li", { class: "no-results" }, "Sin resultados"))));
|
|
358
386
|
}
|
|
359
387
|
render() {
|
|
360
|
-
return (h("div", { key: '
|
|
388
|
+
return (h("div", { key: '4f34c329d9993926758230f0e9ca0f8d0e57ef6e', class: "custom-select" }, !this.dropdownType && this.label && (h("label", { key: '743013592658ee415d4a9e3db8ec648472a3428e', class: { 'disabled-label': this.disabled } }, this.label, this.showObligatory && !this.disabled && h("span", { key: '56183248733eb18956664c859c8f7d4057f3fa11', class: "asterisk" }, " *"))), h("div", { key: 'c93f45456478ac5419d542512092e877a04f28b7', class: "dropdown-container" }, this.dropdownType && this.label && (h("div", { key: '0632779b9ba71f1fb91944b54b477999f607a3f5', class: "left-label" }, this.label)), this.renderTrigger()), this.textHelper && !this.hasError && (h("div", { key: '3e57fc2b53715abb9800db573119cf77b0333d37', class: "select-helper" }, h("span", { key: 'baf3d1f0ae4d535acae2a08df8d2079996afdcff' }, this.textHelper))), this.hasError && this.errorText && (h("div", { key: '8b25aae92b9370a02fcfd81f50b98df145d3cb0e', class: "select-helper-error" }, h("dropi-icon", { key: '60643f0b7e54f8533dc9fd7dd17715aec59d851c', name: "Warning-circle", iconWidth: "12px", iconHeight: "12px", color: "Error-Error-500" }), h("span", { key: '35bcdfd3c9825cbac269b1085d4c552df694f33a' }, this.errorText))), this.renderDropdown()));
|
|
361
389
|
}
|
|
362
390
|
static get formAssociated() { return true; }
|
|
363
391
|
static get watchers() { return {
|