@dropi/ui 0.1.42 → 0.1.44
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/dist/cjs/dropi-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/dropi-accordion.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert-legacy.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert-modal.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert.cjs.entry.js +1 -1
- package/dist/cjs/dropi-avatars.cjs.entry.js +1 -1
- package/dist/cjs/dropi-badge-legacy.cjs.entry.js +1 -1
- package/dist/cjs/dropi-badge.cjs.entry.js +1 -1
- package/dist/cjs/dropi-banner-external.cjs.entry.js +1 -1
- package/dist/cjs/dropi-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/dropi-button.cjs.entry.js +20 -3
- package/dist/cjs/dropi-card-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/dropi-card-product.cjs.entry.js +1 -1
- package/dist/cjs/dropi-card-section.cjs.entry.js +1 -1
- package/dist/cjs/dropi-carousel.cjs.entry.js +1 -1
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/dropi-checkbox.cjs.entry.js +24 -3
- package/dist/cjs/dropi-chips.cjs.entry.js +1 -1
- package/dist/cjs/dropi-city-selector.cjs.entry.js +2 -2
- package/dist/cjs/dropi-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/dropi-country-flags.cjs.entry.js +1 -1
- package/dist/cjs/dropi-country-selector.cjs.entry.js +108 -7
- package/dist/cjs/dropi-date-picker-range.cjs.entry.js +1 -1
- package/dist/cjs/dropi-date-picker.cjs.entry.js +41 -5
- package/dist/cjs/dropi-drawer.cjs.entry.js +2 -2
- package/dist/cjs/dropi-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/dropi-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +1 -1
- package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dropi-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/dropi-icon.cjs.entry.js +1 -1
- package/dist/cjs/dropi-ilustration-icon.cjs.entry.js +1 -1
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +1 -1
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +1 -1
- package/dist/cjs/dropi-input_3.cjs.entry.js +4 -4
- package/dist/cjs/dropi-languages-selector.cjs.entry.js +1 -1
- package/dist/cjs/dropi-logo.cjs.entry.js +1 -1
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +1 -1
- package/dist/cjs/dropi-media-player.cjs.entry.js +1 -1
- package/dist/cjs/dropi-modal.cjs.entry.js +2 -2
- package/dist/cjs/dropi-navbar.cjs.entry.js +1 -1
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +23 -3
- package/dist/cjs/dropi-phone-input.cjs.entry.js +27 -4
- package/dist/cjs/dropi-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dropi-radio-button.cjs.entry.js +19 -2
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/dropi-read-more.cjs.entry.js +1 -1
- package/dist/cjs/dropi-search.cjs.entry.js +1 -1
- package/dist/cjs/dropi-select.cjs.entry.js +3 -3
- package/dist/cjs/dropi-sidebar.cjs.entry.js +1 -1
- 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 +23 -2
- package/dist/cjs/dropi-table.cjs.entry.js +1 -1
- package/dist/cjs/dropi-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dropi-tag-type-product.cjs.entry.js +1 -1
- package/dist/cjs/dropi-text-area.cjs.entry.js +4 -4
- package/dist/cjs/dropi-time-line.cjs.entry.js +1 -1
- package/dist/cjs/dropi-toast.cjs.entry.js +2 -2
- package/dist/cjs/dropi-tooltip-v2.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +1 -1
- package/dist/cjs/index-DydfpGMc.js +2773 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/dropi-button/dropi-button.js +39 -2
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +38 -2
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.css +1 -1
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.css +1 -1
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +140 -5
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +55 -4
- package/dist/collection/components/dropi-drawer/dropi-drawer.css +1 -1
- package/dist/collection/components/dropi-input/dropi-input.js +4 -4
- package/dist/collection/components/dropi-modal/dropi-modal.css +1 -1
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +36 -2
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.css +1 -1
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +39 -2
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +13 -2
- package/dist/collection/components/dropi-select/dropi-select.css +1 -1
- package/dist/collection/components/dropi-select/dropi-select.js +2 -2
- package/dist/collection/components/dropi-switch/dropi-switch.js +37 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +4 -4
- package/dist/collection/components/dropi-toast/dropi-toast.css +1 -1
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.css +1 -1
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.css +1 -1
- package/dist/components/dropi-alert-modal.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-section.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-city-selector.js +1 -1
- package/dist/components/dropi-country-selector.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-file-upload.js +1 -1
- package/dist/components/dropi-input.js +1 -1
- package/dist/components/dropi-modal.js +1 -1
- package/dist/components/dropi-otp-send-code.js +1 -1
- package/dist/components/dropi-phone-input.js +1 -1
- package/dist/components/dropi-radio-button.js +1 -1
- package/dist/components/dropi-search.js +1 -1
- package/dist/components/dropi-select.js +1 -1
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-table.js +1 -1
- package/dist/components/dropi-text-area.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/index.js +1 -1
- package/dist/components/p-BGb7xtJN.js +1 -1
- package/dist/components/p-Bimspdte.js +1 -1
- package/dist/components/p-BmuWhHN-.js +1 -1
- package/dist/components/p-Bw8zPxUl.js +1 -0
- package/dist/components/p-C44-ijf2.js +1 -1
- package/dist/components/p-CCZ6rIo5.js +1 -0
- package/dist/components/p-CKflT57p.js +1 -1
- package/dist/components/p-DFNI0UID.js +1 -1
- package/dist/components/p-Dd1g1gjR.js +1 -0
- package/dist/components/p-Dnx3uXgo.js +1 -0
- package/dist/components/p-HCtk4_Dq.js +1 -1
- package/dist/components/p-Qrac2GRu.js +1 -0
- package/dist/components/p-emzVHCws.js +1 -1
- 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-legacy.entry.js +1 -1
- package/dist/dropi-ui/dropi-alert-modal.entry.js +1 -1
- package/dist/dropi-ui/dropi-alert.entry.js +1 -1
- package/dist/dropi-ui/dropi-avatars.entry.js +1 -1
- package/dist/dropi-ui/dropi-badge-legacy.entry.js +1 -1
- package/dist/dropi-ui/dropi-badge.entry.js +1 -1
- package/dist/dropi-ui/dropi-banner-external.entry.js +1 -1
- package/dist/dropi-ui/dropi-breadcrumb.entry.js +1 -1
- package/dist/dropi-ui/dropi-button.entry.js +20 -3
- package/dist/dropi-ui/dropi-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-card-checkbox.entry.js +1 -1
- package/dist/dropi-ui/dropi-card-product.entry.js +1 -1
- package/dist/dropi-ui/dropi-card-section.entry.js +1 -1
- package/dist/dropi-ui/dropi-carousel.entry.js +1 -1
- package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js +1 -1
- package/dist/dropi-ui/dropi-checkbox.entry.js +24 -3
- package/dist/dropi-ui/dropi-checkbox.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-chips.entry.js +1 -1
- package/dist/dropi-ui/dropi-city-selector.entry.js +2 -2
- package/dist/dropi-ui/dropi-city-selector.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-color-picker.entry.js +1 -1
- package/dist/dropi-ui/dropi-country-flags.entry.js +1 -1
- package/dist/dropi-ui/dropi-country-selector.entry.js +108 -7
- package/dist/dropi-ui/dropi-country-selector.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-date-picker-range.entry.js +1 -1
- package/dist/dropi-ui/dropi-date-picker.entry.js +41 -5
- 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-drawer.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-dropdown.entry.js +1 -1
- 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-icon.entry.js +1 -1
- package/dist/dropi-ui/dropi-ilustration-icon.entry.js +1 -1
- package/dist/dropi-ui/dropi-image-miniature.entry.js +1 -1
- package/dist/dropi-ui/dropi-image-overlay.entry.js +1 -1
- package/dist/dropi-ui/dropi-input.entry.js +4 -4
- package/dist/dropi-ui/dropi-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-languages-selector.entry.js +1 -1
- package/dist/dropi-ui/dropi-logo.entry.js +1 -1
- package/dist/dropi-ui/dropi-lottie-loader.entry.js +1 -1
- package/dist/dropi-ui/dropi-media-player.entry.js +1 -1
- package/dist/dropi-ui/dropi-modal.entry.js +2 -2
- package/dist/dropi-ui/dropi-modal.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-navbar.entry.js +1 -1
- package/dist/dropi-ui/dropi-otp-send-code.entry.js +23 -3
- package/dist/dropi-ui/dropi-otp-send-code.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-paginator.entry.js +1 -1
- package/dist/dropi-ui/dropi-phone-input.entry.js +27 -4
- package/dist/dropi-ui/dropi-phone-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-progress-bar.entry.js +1 -1
- package/dist/dropi-ui/dropi-radio-button.entry.js +19 -2
- package/dist/dropi-ui/dropi-radio-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-radio-selection-list.entry.js +1 -1
- package/dist/dropi-ui/dropi-read-more.entry.js +1 -1
- package/dist/dropi-ui/dropi-search.entry.js +1 -1
- package/dist/dropi-ui/dropi-select.entry.js +3 -3
- package/dist/dropi-ui/dropi-select.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-sidebar.entry.js +1 -1
- package/dist/dropi-ui/dropi-simple-stepper.entry.js +1 -1
- package/dist/dropi-ui/dropi-skeleton.entry.js +1 -1
- package/dist/dropi-ui/dropi-steps.entry.js +1 -1
- package/dist/dropi-ui/dropi-switch.entry.js +23 -2
- package/dist/dropi-ui/dropi-switch.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-table.entry.js +1 -1
- package/dist/dropi-ui/dropi-tabs.entry.js +1 -1
- package/dist/dropi-ui/dropi-tag-type-product.entry.js +1 -1
- package/dist/dropi-ui/dropi-tag.entry.js +1 -1
- package/dist/dropi-ui/dropi-text-area.entry.js +4 -4
- package/dist/dropi-ui/dropi-text-area.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-time-line.entry.js +1 -1
- package/dist/dropi-ui/dropi-toast.entry.js +2 -2
- package/dist/dropi-ui/dropi-toast.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-tooltip-v2.entry.js +2 -2
- package/dist/dropi-ui/dropi-tooltip-v2.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-tooltip.entry.js +2 -2
- package/dist/dropi-ui/dropi-tooltip.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-ui.css +320 -1
- package/dist/dropi-ui/dropi-ui.esm.js +50 -1
- 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-D0Z06C2b.js +4585 -0
- package/dist/dropi-ui/index-D0Z06C2b.js.map +1 -0
- package/dist/dropi-ui/index.esm.js +4 -0
- package/dist/dropi-ui/p-06bdd006.entry.js +1 -1
- package/dist/dropi-ui/p-09462f7b.entry.js +1 -0
- package/dist/dropi-ui/p-0946a1f7.entry.js +1 -1
- package/dist/dropi-ui/p-09cf560a.entry.js +1 -0
- package/dist/dropi-ui/p-0d188f2c.entry.js +1 -1
- package/dist/dropi-ui/p-0f1b13e5.entry.js +1 -1
- package/dist/dropi-ui/p-19031bf8.entry.js +1 -0
- package/dist/dropi-ui/p-1a07b3a6.entry.js +1 -1
- package/dist/dropi-ui/p-1d3d6a32.entry.js +1 -1
- package/dist/dropi-ui/p-2ad8d3c1.entry.js +1 -0
- package/dist/dropi-ui/p-2b5ce062.entry.js +1 -0
- package/dist/dropi-ui/p-369a069e.entry.js +1 -0
- package/dist/dropi-ui/p-372a5023.entry.js +1 -0
- package/dist/dropi-ui/p-378b165b.entry.js +1 -0
- package/dist/dropi-ui/p-393867c2.entry.js +1 -1
- package/dist/dropi-ui/p-3ec6620c.entry.js +1 -0
- package/dist/dropi-ui/p-42a85ce5.entry.js +1 -0
- package/dist/dropi-ui/p-43e21ed8.entry.js +1 -0
- package/dist/dropi-ui/p-51028e22.entry.js +1 -0
- package/dist/dropi-ui/p-510ad065.entry.js +1 -0
- package/dist/dropi-ui/p-532136cc.entry.js +1 -0
- package/dist/dropi-ui/p-5e0da387.entry.js +1 -1
- package/dist/dropi-ui/p-5f5c0a5c.entry.js +1 -0
- package/dist/dropi-ui/p-60901aa7.entry.js +1 -0
- package/dist/dropi-ui/p-62847b6f.entry.js +1 -0
- package/dist/dropi-ui/p-647bab57.entry.js +1 -0
- package/dist/dropi-ui/p-650a7679.entry.js +1 -1
- package/dist/dropi-ui/p-68cae74b.entry.js +1 -0
- package/dist/dropi-ui/p-6a51f80c.entry.js +1 -0
- package/dist/dropi-ui/p-6c45c910.entry.js +1 -0
- package/dist/dropi-ui/p-6ef4affd.entry.js +1 -0
- package/dist/dropi-ui/p-721ef2b1.entry.js +1 -0
- package/dist/dropi-ui/p-72c6e0c4.entry.js +1 -0
- package/dist/dropi-ui/p-7664b8f9.entry.js +1 -0
- package/dist/dropi-ui/p-774aab1a.entry.js +1 -0
- package/dist/dropi-ui/p-7a25f595.entry.js +1 -1
- package/dist/dropi-ui/p-7bc18f39.entry.js +1 -0
- package/dist/dropi-ui/p-7c0f959f.entry.js +1 -1
- package/dist/dropi-ui/p-7c3aa4bc.entry.js +1 -0
- package/dist/dropi-ui/p-7e526178.entry.js +1 -0
- package/dist/dropi-ui/p-7e99d4c4.entry.js +1 -0
- package/dist/dropi-ui/p-7f0f828d.entry.js +1 -1
- package/dist/dropi-ui/p-7fc195ee.entry.js +1 -0
- package/dist/dropi-ui/p-80f0f6e6.entry.js +1 -1
- package/dist/dropi-ui/p-82909f07.entry.js +1 -0
- package/dist/dropi-ui/p-84c63ece.entry.js +1 -0
- package/dist/dropi-ui/p-850b92f0.entry.js +1 -0
- package/dist/dropi-ui/p-85ee6d6a.entry.js +1 -0
- package/dist/dropi-ui/p-8c0ff5e6.entry.js +1 -0
- package/dist/dropi-ui/p-8fc3dbcb.entry.js +1 -1
- package/dist/dropi-ui/p-95808559.entry.js +1 -0
- package/dist/dropi-ui/p-95b7abf3.entry.js +1 -0
- package/dist/dropi-ui/p-96f72e50.entry.js +1 -1
- package/dist/dropi-ui/p-9a569a4e.entry.js +1 -0
- package/dist/dropi-ui/p-9c734a8f.entry.js +1 -0
- package/dist/dropi-ui/p-9c7698ef.entry.js +1 -0
- package/dist/dropi-ui/p-9e62ff06.entry.js +1 -0
- package/dist/dropi-ui/p-B-h7fjQz.js +2 -0
- package/dist/dropi-ui/p-a3b729fe.entry.js +1 -1
- package/dist/dropi-ui/p-a3c3e479.entry.js +1 -0
- package/dist/dropi-ui/p-a470a24a.entry.js +1 -1
- package/dist/dropi-ui/p-aa48e5cb.entry.js +1 -0
- package/dist/dropi-ui/p-af1e778b.entry.js +1 -0
- package/dist/dropi-ui/p-b14f6889.entry.js +1 -0
- package/dist/dropi-ui/p-b2e8c0e2.entry.js +1 -0
- package/dist/dropi-ui/p-b320ca5a.entry.js +1 -0
- package/dist/dropi-ui/p-b605d3d9.entry.js +1 -1
- package/dist/dropi-ui/p-baac546d.entry.js +1 -0
- package/dist/dropi-ui/p-bb6a2bdd.entry.js +1 -0
- package/dist/dropi-ui/p-bbf374d6.entry.js +1 -0
- package/dist/dropi-ui/p-bc6bb893.entry.js +1 -0
- package/dist/dropi-ui/p-bd06eb80.entry.js +1 -0
- package/dist/dropi-ui/p-c08b8995.entry.js +1 -0
- package/dist/dropi-ui/p-c1d5d4ab.entry.js +1 -0
- package/dist/dropi-ui/p-c4e24d47.entry.js +1 -0
- package/dist/dropi-ui/p-c51fcf75.entry.js +1 -1
- package/dist/dropi-ui/p-c6926604.entry.js +1 -0
- package/dist/dropi-ui/p-c8d0727a.entry.js +1 -0
- package/dist/dropi-ui/p-ca90e108.entry.js +1 -1
- package/dist/dropi-ui/p-caa6ba65.entry.js +1 -0
- package/dist/dropi-ui/p-cb4ad8d2.entry.js +1 -0
- package/dist/dropi-ui/p-d1aeb373.entry.js +1 -1
- package/dist/dropi-ui/p-d384f4e9.entry.js +1 -0
- package/dist/dropi-ui/p-d3f3bb91.entry.js +1 -0
- package/dist/dropi-ui/p-d6b3784b.entry.js +1 -0
- package/dist/dropi-ui/p-d886b045.entry.js +1 -0
- package/dist/dropi-ui/p-db71d065.entry.js +1 -0
- package/dist/dropi-ui/p-e1b40bda.entry.js +1 -1
- package/dist/dropi-ui/p-e36d5e9f.entry.js +1 -0
- package/dist/dropi-ui/p-e40db21a.entry.js +1 -0
- package/dist/dropi-ui/p-e53b23dd.entry.js +1 -1
- package/dist/dropi-ui/p-e629fdc7.entry.js +1 -1
- package/dist/dropi-ui/p-e97d3704.entry.js +1 -1
- package/dist/dropi-ui/p-e9a64ecc.entry.js +1 -1
- package/dist/dropi-ui/p-eaa10fe8.entry.js +1 -0
- package/dist/dropi-ui/p-ebaa1574.entry.js +1 -0
- package/dist/dropi-ui/p-ebb81172.entry.js +1 -0
- package/dist/dropi-ui/p-edcf5623.entry.js +1 -1
- package/dist/dropi-ui/p-f1e08f03.entry.js +1 -0
- package/dist/dropi-ui/p-f3f27534.entry.js +1 -0
- package/dist/dropi-ui/p-f426e0fc.entry.js +1 -0
- package/dist/dropi-ui/p-f6ed3cbb.entry.js +1 -0
- package/dist/dropi-ui/p-f9888cea.entry.js +1 -1
- package/dist/dropi-ui/p-fb39dfdc.entry.js +1 -1
- package/dist/dropi-ui/p-fb4856ea.entry.js +1 -0
- package/dist/dropi-ui/p-fea1be78.entry.js +1 -0
- package/dist/dropi-ui/p-ff084c1c.entry.js +1 -0
- package/dist/esm/dropi-accordion-item.entry.js +1 -1
- package/dist/esm/dropi-accordion.entry.js +1 -1
- package/dist/esm/dropi-alert-legacy.entry.js +1 -1
- package/dist/esm/dropi-alert-modal.entry.js +1 -1
- package/dist/esm/dropi-alert.entry.js +1 -1
- package/dist/esm/dropi-avatars.entry.js +1 -1
- package/dist/esm/dropi-badge-legacy.entry.js +1 -1
- package/dist/esm/dropi-badge.entry.js +1 -1
- package/dist/esm/dropi-banner-external.entry.js +1 -1
- package/dist/esm/dropi-breadcrumb.entry.js +1 -1
- package/dist/esm/dropi-button.entry.js +20 -3
- package/dist/esm/dropi-card-checkbox.entry.js +1 -1
- package/dist/esm/dropi-card-product.entry.js +1 -1
- package/dist/esm/dropi-card-section.entry.js +1 -1
- package/dist/esm/dropi-carousel.entry.js +1 -1
- package/dist/esm/dropi-checkbox-selection-list.entry.js +1 -1
- package/dist/esm/dropi-checkbox.entry.js +24 -3
- package/dist/esm/dropi-chips.entry.js +1 -1
- package/dist/esm/dropi-city-selector.entry.js +2 -2
- package/dist/esm/dropi-color-picker.entry.js +1 -1
- package/dist/esm/dropi-country-flags.entry.js +1 -1
- package/dist/esm/dropi-country-selector.entry.js +108 -7
- package/dist/esm/dropi-date-picker-range.entry.js +1 -1
- package/dist/esm/dropi-date-picker.entry.js +41 -5
- package/dist/esm/dropi-drawer.entry.js +2 -2
- package/dist/esm/dropi-dropdown.entry.js +1 -1
- package/dist/esm/dropi-empty-state.entry.js +1 -1
- package/dist/esm/dropi-favorite-button.entry.js +1 -1
- package/dist/esm/dropi-file-upload-progress-bar.entry.js +1 -1
- package/dist/esm/dropi-file-upload.entry.js +1 -1
- package/dist/esm/dropi-icon.entry.js +1 -1
- package/dist/esm/dropi-ilustration-icon.entry.js +1 -1
- package/dist/esm/dropi-image-miniature.entry.js +1 -1
- package/dist/esm/dropi-image-overlay.entry.js +1 -1
- package/dist/esm/dropi-input_3.entry.js +4 -4
- package/dist/esm/dropi-languages-selector.entry.js +1 -1
- package/dist/esm/dropi-logo.entry.js +1 -1
- package/dist/esm/dropi-lottie-loader.entry.js +1 -1
- package/dist/esm/dropi-media-player.entry.js +1 -1
- package/dist/esm/dropi-modal.entry.js +2 -2
- package/dist/esm/dropi-navbar.entry.js +1 -1
- package/dist/esm/dropi-otp-send-code.entry.js +23 -3
- package/dist/esm/dropi-phone-input.entry.js +27 -4
- package/dist/esm/dropi-progress-bar.entry.js +1 -1
- package/dist/esm/dropi-radio-button.entry.js +19 -2
- package/dist/esm/dropi-radio-selection-list.entry.js +1 -1
- package/dist/esm/dropi-read-more.entry.js +1 -1
- package/dist/esm/dropi-search.entry.js +1 -1
- package/dist/esm/dropi-select.entry.js +3 -3
- package/dist/esm/dropi-sidebar.entry.js +1 -1
- 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 +23 -2
- package/dist/esm/dropi-table.entry.js +1 -1
- package/dist/esm/dropi-tabs.entry.js +1 -1
- package/dist/esm/dropi-tag-type-product.entry.js +1 -1
- package/dist/esm/dropi-text-area.entry.js +4 -4
- package/dist/esm/dropi-time-line.entry.js +1 -1
- package/dist/esm/dropi-toast.entry.js +2 -2
- package/dist/esm/dropi-tooltip-v2.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/dropi-youtube-lazy-video.entry.js +1 -1
- package/dist/esm/index-B-h7fjQz.js +2763 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dropi-button/dropi-button.d.ts +4 -0
- package/dist/types/components/dropi-checkbox/dropi-checkbox.d.ts +5 -0
- package/dist/types/components/dropi-country-selector/dropi-country-selector.d.ts +13 -0
- package/dist/types/components/dropi-date-picker/dropi-date-picker.d.ts +6 -0
- package/dist/types/components/dropi-otp-send-code/dropi-otp-send-code.d.ts +3 -0
- package/dist/types/components/dropi-phone-input/dropi-phone-input.d.ts +5 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +3 -0
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +5 -0
- package/dist/types/components.d.ts +120 -4
- package/hydrate/index.js +320 -56
- package/hydrate/index.mjs +320 -56
- package/package.json +3 -2
- package/readme.md +36 -0
- package/scripts/postinstall.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropi-city-selector.entry.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,qqHAAqqH,CAAC;;MC6B7rH,iBAAiB,GAAA,MAAA;;;;;;IAEpB,OAAO,GAAyB,EAAE;;IAEjB,cAAc,GAAiC,EAAE;;IAElE,WAAW,GAAW,uBAAuB;;IAE7C,QAAQ,GAAY,KAAK;;AAGxB,IAAA,oBAAoB;IAEZ,MAAM,GAAY,KAAK;IACvB,QAAQ,GAAwB,EAAE;IAClC,aAAa,GAAgB,EAAE;IAC/B,UAAU,GAAW,EAAE;;AAKxC,IAAA,cAAc,CAAC,CAAa,EAAA;AAC1B,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AACtD,YAAA,IAAI,CAAC,MAAM,GAAG,KAAK;;;AAKvB,IAAA,cAAc,CAAC,GAAyB,EAAA;AACtC,QAAA,IAAI,GAAG,IAAI,IAAI,EAAE;AAAE,YAAA,IAAI,CAAC,aAAa,GAAG,EAAE;YAAE;;QAC5C,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAI,GAAmB;;AAIvF,IAAA,eAAe,CAAC,GAAiC,EAAA;AAC/C,QAAA,IAAI,GAAG,IAAI,IAAI,EAAE;AAAE,YAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;YAAE;;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,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AK,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAC9C,IAAI,EAAC,QAAQ,EAAA,eAAA,EACE,UAAU,EAAA,EAEzB,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,EAAA,EAC/D,UAAU,KACT,CAAA,CAAA,YAAA,EAAA,EAAY,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,EAAA,CAAG,CACrF,CACI,EACP,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,YAAY,EAAA,EAAE,IAAI,CAAC,KAAK,CAAQ,CACxC;SAET,CAAC,CACE,CACP,CAAC,CACE,CACF,CACP,CACG;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-city-selector/dropi-city-selector.css?tag=dropi-city-selector&encapsulation=shadow","src/components/dropi-city-selector/dropi-city-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n position: relative;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n/* ── Wrapper ──────────────────────────────────────────────────────── */\n.city-selector {\n position: relative;\n width: 100%;\n}\n\n/* ── Trigger ──────────────────────────────────────────────────────── */\n.selector-trigger {\n width: 100%;\n min-height: 44px;\n padding: 6px 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: border-color 0.15s;\n}\n\n.selector-trigger:hover:not(:disabled) {\n border-color: var(--Gray-Gray-300, #a3abbf);\n}\n\n.selector-trigger:focus {\n outline: none;\n border-color: var(--Info-Info-500, #50a5f1);\n}\n\n.city-selector--disabled .selector-trigger {\n background: var(--Gray-Gray-50, #f7f8fa);\n border-color: var(--Gray-Gray-100, #e6eaf2);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n/* ── Chips area ───────────────────────────────────────────────────── */\n.chips-area {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n flex: 1;\n min-height: 26px;\n align-items: center;\n}\n\n.placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--Primary-Primary-50, #fff8f0);\n border: 1px solid var(--Primary-Primary-200, #fcd5a8);\n border-radius: var(--Border-1, 4px);\n padding: 2px 6px;\n font-size: var(--font-size-xs, 12px);\n color: var(--Primary-Primary-700, #b85c00);\n}\n\n.chip-remove {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n}\n\n/* ── Dropdown ─────────────────────────────────────────────────────── */\n.dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\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 8px 24px rgba(0, 0, 0, 0.10);\n z-index: 200;\n overflow: hidden;\n}\n\n/* ── Search ───────────────────────────────────────────────────────── */\n.search-wrap {\n padding: 10px 12px;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.search-input {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n outline: none;\n transition: border-color 0.15s;\n}\n\n.search-input:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.search-input::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options list ─────────────────────────────────────────────────── */\n.options-list {\n max-height: 280px;\n overflow-y: auto;\n background: var(--Neutral-White, #ffffff);\n}\n\n/* Scrollbar refinado */\n.options-list::-webkit-scrollbar { width: 6px; }\n.options-list::-webkit-scrollbar-track { background: transparent; }\n.options-list::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n\n/* ── Group label ──────────────────────────────────────────────────── */\n.group-label {\n padding: 14px 16px 8px;\n font-size: var(--font-size-m, 16px);\n font-weight: var(--font-weight-bold, 700);\n color: var(--Gray-Gray-800, #1f2433);\n background: var(--Neutral-White, #ffffff);\n}\n\n/* ── City option ──────────────────────────────────────────────────── */\n.city-option {\n padding: 10px 16px;\n display: flex;\n align-items: center;\n gap: 12px;\n cursor: pointer;\n font-size: var(--font-size-s, 14px);\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Neutral-White, #ffffff);\n transition: background 0.1s;\n user-select: none;\n}\n\n.city-option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n\n.city-option--selected .city-label {\n color: var(--Gray-Gray-800, #1f2433);\n font-weight: var(--font-weight-medium, 500);\n}\n\n/* ── Checkbox visual ──────────────────────────────────────────────── */\n.checkbox {\n width: 22px;\n height: 22px;\n border: 1.5px solid var(--Gray-Gray-300, #c3c9d9);\n border-radius: var(--Border-1, 6px);\n background: var(--Neutral-White, #ffffff);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: border-color 0.15s, background 0.15s;\n}\n\n.checkbox--checked {\n border-color: var(--Primary-Primary-500, #f49a3d);\n background: var(--Primary-Primary-500, #f49a3d);\n}\n\n.city-label {\n flex: 1;\n}\n\n/* ── Empty ────────────────────────────────────────────────────────── */\n.no-results {\n padding: 20px 16px;\n text-align: center;\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen } from '@stencil/core';\n\nexport interface CityOption {\n label: string;\n value: string | number;\n}\n\nexport interface CityGroup {\n label: string;\n value: string;\n items: CityOption[];\n}\n\n/**\n * @component dropi-city-selector\n * Multi-select city picker with grouped options and chip display.\n * Pass options as a JSON string or CityGroup[] array.\n *\n * @example\n * <dropi-city-selector\n * options='[{\"label\":\"Cundinamarca\",\"value\":\"CUN\",\"items\":[{\"label\":\"Bogotá\",\"value\":\"BOG\"}]}]'\n * placeholder=\"Selecciona ciudades\"\n * ></dropi-city-selector>\n */\n@Component({\n tag: 'dropi-city-selector',\n styleUrl: 'dropi-city-selector.css',\n shadow: true,\n})\nexport class DropiCitySelector {\n /** Grouped city options (array or JSON string) */\n @Prop() options: CityGroup[] | string = [];\n /** Currently selected city values */\n @Prop({ mutable: true }) selectedCities: (string | number)[] | string = [];\n /** Placeholder text */\n @Prop() placeholder: string = 'Seleccione una ciudad';\n /** Disable the selector */\n @Prop() disabled: boolean = false;\n\n /** Emitted when selection changes. Detail = selected values array. */\n @Event() selectedCitiesChange: EventEmitter<(string | number)[]>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: (string | number)[] = [];\n @State() private parsedOptions: CityGroup[] = [];\n @State() private searchTerm: string = '';\n\n @Element() el!: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (this.isOpen && !e.composedPath().includes(this.el)) {\n this.isOpen = false;\n }\n }\n\n @Watch('options')\n optionsChanged(val: CityGroup[] | string) {\n if (val == null) { this.parsedOptions = []; return; }\n this.parsedOptions = typeof val === 'string' ? JSON.parse(val) : (val as CityGroup[]);\n }\n\n @Watch('selectedCities')\n selectedChanged(val: (string | number)[] | string) {\n if (val == null) { this.selected = []; return; }\n this.selected = typeof val === 'string' ? JSON.parse(val) : [...(val as (string | number)[])];\n }\n\n componentWillLoad() {\n this.optionsChanged(this.options);\n this.selectedChanged(this.selectedCities);\n }\n\n private get filtered(): CityGroup[] {\n if (!this.searchTerm) return this.parsedOptions;\n const t = this.searchTerm.toLowerCase();\n return this.parsedOptions\n .map(g => ({ ...g, items: g.items.filter(c => c.label.toLowerCase().includes(t)) }))\n .filter(g => g.items.length > 0);\n }\n\n private toggle() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n }\n\n private toggleCity(value: string | number, e: MouseEvent) {\n e.stopPropagation();\n if (this.selected.includes(value)) {\n this.selected = this.selected.filter(v => v !== value);\n } else {\n this.selected = [...this.selected, value];\n }\n this.selectedCitiesChange.emit([...this.selected]);\n }\n\n private removeCity(value: string | number, e: MouseEvent) {\n e.stopPropagation();\n this.selected = this.selected.filter(v => v !== value);\n this.selectedCitiesChange.emit([...this.selected]);\n }\n\n private getLabel(value: string | number): string {\n for (const g of this.parsedOptions) {\n const found = g.items.find(c => c.value == value);\n if (found) return found.label;\n }\n return String(value);\n }\n\n render() {\n const groups = this.filtered;\n\n return (\n <div class={{ 'city-selector': true, 'city-selector--disabled': this.disabled }}>\n\n {/* ── Trigger ─────────────────────────────────────────────── */}\n <button\n type=\"button\"\n class=\"selector-trigger\"\n disabled={this.disabled}\n onClick={() => this.toggle()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen}\n >\n <div class=\"chips-area\">\n {this.selected.length === 0 && (\n <span class=\"placeholder\">{this.placeholder}</span>\n )}\n {this.selected.map(val => (\n <span class=\"chip\" key={String(val)}>\n {this.getLabel(val)}\n <button\n type=\"button\"\n class=\"chip-remove\"\n aria-label=\"Quitar\"\n onClick={(e) => this.removeCity(val, e)}\n >\n <dropi-icon name=\"Close-small\" iconWidth=\"10px\" iconHeight=\"10px\" color=\"Primary-Primary-500\" />\n </button>\n </span>\n ))}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"16px\"\n iconHeight=\"16px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n {/* ── Dropdown ────────────────────────────────────────────── */}\n {this.isOpen && (\n <div class=\"dropdown\" role=\"listbox\">\n\n {/* Search with lupa icon */}\n <div class=\"search-wrap\">\n <div class=\"search-field\">\n <input\n class=\"search-input\"\n type=\"text\"\n placeholder=\"Buscar...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n autoComplete=\"off\"\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </div>\n\n {/* Options list */}\n <div class=\"options-list\">\n {groups.length === 0 && (\n <div class=\"no-results\">Sin resultados</div>\n )}\n {groups.map(group => (\n <div key={group.value} class=\"group\">\n <div class=\"group-label\">{group.label}</div>\n {group.items.map(city => {\n const isSelected = this.selected.includes(city.value);\n return (\n <div\n key={String(city.value)}\n class={{ 'city-option': true, 'city-option--selected': isSelected }}\n onClick={(e) => this.toggleCity(city.value, e)}\n role=\"option\"\n aria-selected={isSelected}\n >\n <span class={{ 'checkbox': true, 'checkbox--checked': isSelected }}>\n {isSelected && (\n <dropi-icon name=\"Check\" iconWidth=\"10px\" iconHeight=\"10px\" color=\"Neutral-White\" />\n )}\n </span>\n <span class=\"city-label\">{city.label}</span>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropi-city-selector.entry.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,qsHAAqsH,CAAC;;MC6B7tH,iBAAiB,GAAA,MAAA;;;;;;IAEpB,OAAO,GAAyB,EAAE;;IAEjB,cAAc,GAAiC,EAAE;;IAElE,WAAW,GAAW,uBAAuB;;IAE7C,QAAQ,GAAY,KAAK;;AAGxB,IAAA,oBAAoB;IAEZ,MAAM,GAAY,KAAK;IACvB,QAAQ,GAAwB,EAAE;IAClC,aAAa,GAAgB,EAAE;IAC/B,UAAU,GAAW,EAAE;;AAK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selector/dropi-city-selector.css?tag=dropi-city-selector&encapsulation=shadow","src/components/dropi-city-selector/dropi-city-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n position: relative;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n/* ── Wrapper ──────────────────────────────────────────────────────── */\n.city-selector {\n position: relative;\n width: 100%;\n}\n\n/* ── Trigger ──────────────────────────────────────────────────────── */\n.selector-trigger {\n width: 100%;\n min-height: 44px;\n padding: 6px 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n transition: border-color 0.15s;\n}\n\n.selector-trigger:hover:not(:disabled) {\n border-color: var(--Gray-Gray-300, #a3abbf);\n}\n\n.selector-trigger:focus {\n outline: none;\n border-color: var(--Info-Info-500, #50a5f1);\n}\n\n.city-selector--disabled .selector-trigger {\n background: var(--Gray-Gray-50, #f7f8fa);\n border-color: var(--Gray-Gray-100, #e6eaf2);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n/* ── Chips area ───────────────────────────────────────────────────── */\n.chips-area {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n flex: 1;\n min-height: 26px;\n align-items: center;\n}\n\n.placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--Primary-Primary-50, #fff8f0);\n border: 1px solid var(--Primary-Primary-200, #fcd5a8);\n border-radius: var(--Border-1, 4px);\n padding: 2px 6px;\n font-size: var(--font-size-xs, 12px);\n color: var(--Primary-Primary-700, #b85c00);\n}\n\n.chip-remove {\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n}\n\n/* ── Dropdown ─────────────────────────────────────────────────────── */\n.dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\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 8px 24px rgba(0, 0, 0, 0.10);\n z-index: var(--dropi-z-index-overlay, 11000);\n overflow: hidden;\n}\n\n/* ── Search ───────────────────────────────────────────────────────── */\n.search-wrap {\n padding: 10px 12px;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.search-input {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n outline: none;\n transition: border-color 0.15s;\n}\n\n.search-input:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.search-input::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options list ─────────────────────────────────────────────────── */\n.options-list {\n max-height: 280px;\n overflow-y: auto;\n background: var(--Neutral-White, #ffffff);\n}\n\n/* Scrollbar refinado */\n.options-list::-webkit-scrollbar { width: 6px; }\n.options-list::-webkit-scrollbar-track { background: transparent; }\n.options-list::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n\n/* ── Group label ──────────────────────────────────────────────────── */\n.group-label {\n padding: 14px 16px 8px;\n font-size: var(--font-size-m, 16px);\n font-weight: var(--font-weight-bold, 700);\n color: var(--Gray-Gray-800, #1f2433);\n background: var(--Neutral-White, #ffffff);\n}\n\n/* ── City option ──────────────────────────────────────────────────── */\n.city-option {\n padding: 10px 16px;\n display: flex;\n align-items: center;\n gap: 12px;\n cursor: pointer;\n font-size: var(--font-size-s, 14px);\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Neutral-White, #ffffff);\n transition: background 0.1s;\n user-select: none;\n}\n\n.city-option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n\n.city-option--selected .city-label {\n color: var(--Gray-Gray-800, #1f2433);\n font-weight: var(--font-weight-medium, 500);\n}\n\n/* ── Checkbox visual ──────────────────────────────────────────────── */\n.checkbox {\n width: 22px;\n height: 22px;\n border: 1.5px solid var(--Gray-Gray-300, #c3c9d9);\n border-radius: var(--Border-1, 6px);\n background: var(--Neutral-White, #ffffff);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: border-color 0.15s, background 0.15s;\n}\n\n.checkbox--checked {\n border-color: var(--Primary-Primary-500, #f49a3d);\n background: var(--Primary-Primary-500, #f49a3d);\n}\n\n.city-label {\n flex: 1;\n}\n\n/* ── Empty ────────────────────────────────────────────────────────── */\n.no-results {\n padding: 20px 16px;\n text-align: center;\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen } from '@stencil/core';\n\nexport interface CityOption {\n label: string;\n value: string | number;\n}\n\nexport interface CityGroup {\n label: string;\n value: string;\n items: CityOption[];\n}\n\n/**\n * @component dropi-city-selector\n * Multi-select city picker with grouped options and chip display.\n * Pass options as a JSON string or CityGroup[] array.\n *\n * @example\n * <dropi-city-selector\n * options='[{\"label\":\"Cundinamarca\",\"value\":\"CUN\",\"items\":[{\"label\":\"Bogotá\",\"value\":\"BOG\"}]}]'\n * placeholder=\"Selecciona ciudades\"\n * ></dropi-city-selector>\n */\n@Component({\n tag: 'dropi-city-selector',\n styleUrl: 'dropi-city-selector.css',\n shadow: true,\n})\nexport class DropiCitySelector {\n /** Grouped city options (array or JSON string) */\n @Prop() options: CityGroup[] | string = [];\n /** Currently selected city values */\n @Prop({ mutable: true }) selectedCities: (string | number)[] | string = [];\n /** Placeholder text */\n @Prop() placeholder: string = 'Seleccione una ciudad';\n /** Disable the selector */\n @Prop() disabled: boolean = false;\n\n /** Emitted when selection changes. Detail = selected values array. */\n @Event() selectedCitiesChange: EventEmitter<(string | number)[]>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: (string | number)[] = [];\n @State() private parsedOptions: CityGroup[] = [];\n @State() private searchTerm: string = '';\n\n @Element() el!: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (this.isOpen && !e.composedPath().includes(this.el)) {\n this.isOpen = false;\n }\n }\n\n @Watch('options')\n optionsChanged(val: CityGroup[] | string) {\n if (val == null) { this.parsedOptions = []; return; }\n this.parsedOptions = typeof val === 'string' ? JSON.parse(val) : (val as CityGroup[]);\n }\n\n @Watch('selectedCities')\n selectedChanged(val: (string | number)[] | string) {\n if (val == null) { this.selected = []; return; }\n this.selected = typeof val === 'string' ? JSON.parse(val) : [...(val as (string | number)[])];\n }\n\n componentWillLoad() {\n this.optionsChanged(this.options);\n this.selectedChanged(this.selectedCities);\n }\n\n private get filtered(): CityGroup[] {\n if (!this.searchTerm) return this.parsedOptions;\n const t = this.searchTerm.toLowerCase();\n return this.parsedOptions\n .map(g => ({ ...g, items: g.items.filter(c => c.label.toLowerCase().includes(t)) }))\n .filter(g => g.items.length > 0);\n }\n\n private toggle() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n }\n\n private toggleCity(value: string | number, e: MouseEvent) {\n e.stopPropagation();\n if (this.selected.includes(value)) {\n this.selected = this.selected.filter(v => v !== value);\n } else {\n this.selected = [...this.selected, value];\n }\n this.selectedCitiesChange.emit([...this.selected]);\n }\n\n private removeCity(value: string | number, e: MouseEvent) {\n e.stopPropagation();\n this.selected = this.selected.filter(v => v !== value);\n this.selectedCitiesChange.emit([...this.selected]);\n }\n\n private getLabel(value: string | number): string {\n for (const g of this.parsedOptions) {\n const found = g.items.find(c => c.value == value);\n if (found) return found.label;\n }\n return String(value);\n }\n\n render() {\n const groups = this.filtered;\n\n return (\n <div class={{ 'city-selector': true, 'city-selector--disabled': this.disabled }}>\n\n {/* ── Trigger ─────────────────────────────────────────────── */}\n <button\n type=\"button\"\n class=\"selector-trigger\"\n disabled={this.disabled}\n onClick={() => this.toggle()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen}\n >\n <div class=\"chips-area\">\n {this.selected.length === 0 && (\n <span class=\"placeholder\">{this.placeholder}</span>\n )}\n {this.selected.map(val => (\n <span class=\"chip\" key={String(val)}>\n {this.getLabel(val)}\n <button\n type=\"button\"\n class=\"chip-remove\"\n aria-label=\"Quitar\"\n onClick={(e) => this.removeCity(val, e)}\n >\n <dropi-icon name=\"Close-small\" iconWidth=\"10px\" iconHeight=\"10px\" color=\"Primary-Primary-500\" />\n </button>\n </span>\n ))}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"16px\"\n iconHeight=\"16px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n {/* ── Dropdown ────────────────────────────────────────────── */}\n {this.isOpen && (\n <div class=\"dropdown\" role=\"listbox\">\n\n {/* Search with lupa icon */}\n <div class=\"search-wrap\">\n <div class=\"search-field\">\n <input\n class=\"search-input\"\n type=\"text\"\n placeholder=\"Buscar...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n autoComplete=\"off\"\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </div>\n\n {/* Options list */}\n <div class=\"options-list\">\n {groups.length === 0 && (\n <div class=\"no-results\">Sin resultados</div>\n )}\n {groups.map(group => (\n <div key={group.value} class=\"group\">\n <div class=\"group-label\">{group.label}</div>\n {group.items.map(city => {\n const isSelected = this.selected.includes(city.value);\n return (\n <div\n key={String(city.value)}\n class={{ 'city-option': true, 'city-option--selected': isSelected }}\n onClick={(e) => this.toggleCity(city.value, e)}\n role=\"option\"\n aria-selected={isSelected}\n >\n <span class={{ 'checkbox': true, 'checkbox--checked': isSelected }}>\n {isSelected && (\n <dropi-icon name=\"Check\" iconWidth=\"10px\" iconHeight=\"10px\" color=\"Neutral-White\" />\n )}\n </span>\n <span class=\"city-label\">{city.label}</span>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-D0Z06C2b.js';
|
|
2
2
|
|
|
3
3
|
const dropiColorPickerCss = () => `:host{display:block}.general-container{position:relative;width:fit-content}.main-input-container{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:center;gap:var(--Size-3);position:relative;width:fit-content}.main-input-container .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;cursor:pointer}.line-color-preview{width:40px;height:40px;border-radius:50%;border:1px solid var(--Gray-Gray-200);display:flex;justify-content:center;align-items:center;padding:5px}.line-color-preview .color-preview{width:100%;height:100%;border-radius:50%;border:1px solid var(--Gray-Gray-200)}.position-right{top:0;left:250px}.position-left{top:0;right:200px}.position-top{bottom:55px}.position-bottom{top:55px}.position-bottom::before{transform:rotate(90deg);left:50%;top:-15px}.position-right::before{left:-6px;top:10px}.position-top::before{transform:rotate(270deg);left:50%;bottom:-15px}.position-left::before{transform:rotate(180deg);right:-9px}.color-picker-container::before{content:'';position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid var(--Neutral-White);z-index:1}.color-picker-container{width:280px;padding:var(--Size-4);background:var(--Neutral-White);border-radius:var(--Size-2);box-shadow:var(--Shadow-large);position:absolute;z-index:100;transform-origin:top left;opacity:0;transition:transform 0.2s ease-out, opacity 0.2s ease-out;pointer-events:none}.color-picker-container .main-color-canvas-container{position:relative;margin-bottom:var(--Size-4);border:1px solid var(--Gray-Gray-200);border-radius:var(--Size-1);display:flex;justify-self:center;align-items:center}.color-picker-container .main-color-canvas-container canvas{display:block;border-radius:var(--Size-1)}.color-picker-container .main-color-canvas-container .color-selector-pointer{position:absolute;width:var(--Size-3);height:var(--Size-3);border:2px solid var(--Neutral-White);border-radius:50%;transform:translate(-6px, -6px);pointer-events:none}.color-picker-container .slider-container{display:flex;flex-direction:column;gap:var(--Size-3)}.color-picker-container .slider-container .slider-group{display:flex;flex-direction:column;gap:var(--Size-1)}.color-picker-container .slider-container .slider-group label{font-size:var(--font-size-xs);color:var(--Gray-Gray-500);font-weight:var(--font-weight-bold)}.color-picker-container .slider-container .slider-group .hue-slider-container,.color-picker-container .slider-container .slider-group .opacity-slider-container{position:relative;height:var(--Size-3);border-radius:var(--Size-4);overflow:hidden}.color-picker-container .slider-container .slider-group .hue-slider-container canvas,.color-picker-container .slider-container .slider-group .opacity-slider-container canvas{display:block;width:100%;height:100%}.color-picker-container .slider-container .slider-group .hue-slider-container .slider-pointer,.color-picker-container .slider-container .slider-group .opacity-slider-container .slider-pointer{position:absolute;top:0;height:var(--Size-3);width:var(--Size-3);background:transparent;border:2px solid var(--Neutral-White);border-radius:50%;pointer-events:none}.color-picker-container.show{transform:scale(1);opacity:1;pointer-events:auto}.color-info .color-label{font-size:var(--font-size-xs);color:var(--Gray-Gray-500);font-weight:var(--font-weight-bold);text-transform:uppercase;margin-bottom:var(--Size-2)}.color-info .color-input{border:1px solid var(--Gray-Gray-200, #ddd);border-radius:var(--Size-1);padding:6px 8px;font-size:var(--font-size-s);width:100%;font-family:monospace;text-transform:uppercase;background-color:var(--Neutral-White, #ffffff);color:var(--Gray-Gray-800, #1f2433);outline:none}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-D0Z06C2b.js';
|
|
2
2
|
|
|
3
3
|
const dropiCountryFlagsCss = () => `:host{display:inline-flex}.flag{max-width:40px;max-height:40px;margin:0;display:flex;align-items:center;justify-content:center}.flag img{width:100%;height:100%;object-fit:cover}.circle{border-radius:50%;overflow:hidden}.rectangle{border-radius:4px;overflow:hidden;max-width:32px !important;max-height:24px !important}`;
|
|
4
4
|
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-D0Z06C2b.js';
|
|
2
2
|
|
|
3
|
-
const dropiCountrySelectorCss = () => `:host{display:block;width:100%;text-align:left}*,*::before,*::after{box-sizing:border-box}.custom-select{position:relative;width:100%}label{display:block;font-size:var(--font-size-xs, 11px);font-weight:var(--font-weight-regular, 400);color:var(--Gray-Gray-600, #475066);margin-bottom:6px}.required{color:var(--Error-Error-500, #ef4444);margin-left:2px}.select-button{width:100%;height:44px;padding:0 12px;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, 14px);font-family:inherit;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;transition:border-color 0.15s ease}.select-button:focus{outline:none;border-color:var(--Info-Info-500, #3b82f6)}.select-button:disabled{border-color:var(--Gray-Gray-200, #c3c9d9);color:var(--Gray-Gray-400, #858ea6);background:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed}.select-button.select-completed{color:var(--Gray-Gray-700, #32394d)}.select-button.select-invalid{border-color:var(--Error-Error-500, #ef4444)}.selected-content{display:flex;align-items:center;gap:8px;overflow:hidden;flex:1}.selected-option{display:flex;align-items:center;gap:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-Gray-700, #32394d);font-size:var(--font-size-s, 14px)}.placeholder-text{color:var(--Gray-Gray-400, #858ea6);font-size:var(--font-size-s, 14px)}.flag-img{border-radius:var(--Border-1, 4px);width:24px;height:24px;object-fit:cover;flex-shrink:0}.select-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--Neutral-White, #ffffff);border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);z-index:
|
|
3
|
+
const dropiCountrySelectorCss = () => `:host{display:block;width:100%;text-align:left}*,*::before,*::after{box-sizing:border-box}.custom-select{position:relative;width:100%}label{display:block;font-size:var(--font-size-xs, 11px);font-weight:var(--font-weight-regular, 400);color:var(--Gray-Gray-600, #475066);margin-bottom:6px}.required{color:var(--Error-Error-500, #ef4444);margin-left:2px}.select-button{width:100%;height:44px;padding:0 12px;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, 14px);font-family:inherit;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;transition:border-color 0.15s ease}.select-button:focus{outline:none;border-color:var(--Info-Info-500, #3b82f6)}.select-button:disabled{border-color:var(--Gray-Gray-200, #c3c9d9);color:var(--Gray-Gray-400, #858ea6);background:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed}.select-button.select-completed{color:var(--Gray-Gray-700, #32394d)}.select-button.select-invalid{border-color:var(--Error-Error-500, #ef4444)}.selected-content{display:flex;align-items:center;gap:8px;overflow:hidden;flex:1}.selected-option{display:flex;align-items:center;gap:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-Gray-700, #32394d);font-size:var(--font-size-s, 14px)}.placeholder-text{color:var(--Gray-Gray-400, #858ea6);font-size:var(--font-size-s, 14px)}.flag-img{border-radius:var(--Border-1, 4px);width:24px;height:24px;object-fit:cover;flex-shrink:0}.select-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--Neutral-White, #ffffff);border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);z-index:var(--dropi-z-index-overlay, 11000);list-style:none;padding:0;margin:0;box-shadow:0 8px 24px rgba(0, 0, 0, 0.10);overflow:hidden;transition:max-height 0.2s ease, opacity 0.2s ease}.select-dropdown.expanded{max-height:300px;opacity:1;overflow-y:auto}.select-dropdown.collapsed{max-height:0;opacity:0;pointer-events:none;border-color:transparent;box-shadow:none}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background:var(--Gray-Gray-200, #c3c9d9);border-radius:4px}.select-dropdown::-webkit-scrollbar-thumb:hover{background:var(--Gray-Gray-300, #a3abbf)}.search-li{padding:10px 12px;position:sticky;top:0;background:var(--Neutral-White, #ffffff);z-index:1;border-bottom:1px solid var(--Gray-Gray-100, #e6eaf2)}.search-field{position:relative;display:flex;align-items:center}.country-search{width:100%;height:36px;padding:0 36px 0 12px;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);outline:none;font-size:var(--font-size-s, 14px);font-family:inherit;color:var(--Gray-Gray-700, #32394d);background:var(--Gray-Gray-50, #f7f8fa);transition:border-color 0.15s, background 0.15s}.country-search:focus{border-color:var(--Info-Info-500, #50a5f1);background:var(--Neutral-White, #ffffff)}.country-search::placeholder{color:var(--Gray-Gray-400, #858ea6)}.search-icon{position:absolute;right:10px;display:flex;align-items:center;pointer-events:none}.option{width:100%;min-height:44px;padding:10px 16px;border:none;background:transparent;text-align:left;color:var(--Gray-Gray-700, #32394d);font-size:var(--font-size-s, 14px);font-family:inherit;cursor:pointer;display:flex;align-items:center;gap:10px;transition:background 0.1s ease;white-space:nowrap}.option:hover{background:var(--Gray-Gray-50, #f7f8fa)}`;
|
|
4
4
|
|
|
5
|
+
const PORTAL_CSS = `
|
|
6
|
+
.select-dropdown {
|
|
7
|
+
background: #ffffff;
|
|
8
|
+
border: 1px solid #c3c9d9;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
list-style: none;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
box-shadow: 0 8px 24px rgba(0,0,0,.10);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: max-height .2s ease, opacity .2s ease;
|
|
16
|
+
font-family: inherit;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
}
|
|
19
|
+
.select-dropdown.expanded { max-height: 300px; opacity: 1; overflow-y: auto; }
|
|
20
|
+
.select-dropdown.collapsed { max-height: 0; opacity: 0; pointer-events: none; border-color: transparent; box-shadow: none; }
|
|
21
|
+
.select-dropdown::-webkit-scrollbar { width: 6px; }
|
|
22
|
+
.select-dropdown::-webkit-scrollbar-track { background: transparent; }
|
|
23
|
+
.select-dropdown::-webkit-scrollbar-thumb { background: #c3c9d9; border-radius: 4px; }
|
|
24
|
+
.search-li { padding: 10px 12px; position: sticky; top: 0; background: #ffffff; z-index: 1; border-bottom: 1px solid #e6eaf2; }
|
|
25
|
+
.search-field { position: relative; display: flex; align-items: center; }
|
|
26
|
+
.country-search { width: 100%; height: 36px; padding: 0 36px 0 12px; border: 1px solid #c3c9d9; border-radius: 8px; outline: none; font-size: 14px; font-family: inherit; color: #32394d; background: #f7f8fa; }
|
|
27
|
+
.country-search:focus { border-color: #50a5f1; background: #ffffff; }
|
|
28
|
+
.country-search::placeholder { color: #858ea6; }
|
|
29
|
+
.search-icon { position: absolute; right: 10px; display: flex; align-items: center; pointer-events: none; }
|
|
30
|
+
.option { width: 100%; min-height: 44px; padding: 10px 16px; border: none; background: transparent; text-align: left; color: #32394d; font-size: 14px; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .1s ease; white-space: nowrap; }
|
|
31
|
+
.option:hover { background: #f7f8fa; }
|
|
32
|
+
.flag-img { border-radius: 4px; width: 24px; height: 24px; object-fit: cover; flex-shrink: 0; }
|
|
33
|
+
`;
|
|
5
34
|
const COUNTRIES = [
|
|
6
35
|
{ name: 'Afghanistan', code: 'AF', codePhone: '93' },
|
|
7
36
|
{ name: 'Albania', code: 'AL', codePhone: '355' },
|
|
@@ -97,7 +126,17 @@ const DropiCountrySelector = class {
|
|
|
97
126
|
constructor(hostRef) {
|
|
98
127
|
registerInstance(this, hostRef);
|
|
99
128
|
this.dropiChange = createEvent(this, "dropiChange", 7);
|
|
129
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
130
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
134
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
135
|
+
}
|
|
100
136
|
}
|
|
137
|
+
internals;
|
|
138
|
+
/** Name for native form submission */
|
|
139
|
+
name = '';
|
|
101
140
|
/** Label above the select */
|
|
102
141
|
label = '';
|
|
103
142
|
/** Placeholder when nothing is selected */
|
|
@@ -119,19 +158,30 @@ const DropiCountrySelector = class {
|
|
|
119
158
|
* When provided, its non-null fields override individual props.
|
|
120
159
|
*/
|
|
121
160
|
selectProperties = null;
|
|
161
|
+
/** When set to "body", the dropdown renders with fixed positioning to escape parent overflow clipping */
|
|
162
|
+
appendTo = '';
|
|
122
163
|
/** Emitted when a country is selected. Detail is the CountryItem. */
|
|
123
164
|
dropiChange;
|
|
124
165
|
isOpen = false;
|
|
125
166
|
selected = null;
|
|
126
167
|
get el() { return getElement(this); }
|
|
168
|
+
buttonRef;
|
|
169
|
+
portalContainer = null;
|
|
170
|
+
portalFocusedSelector = null;
|
|
127
171
|
handleDocClick(e) {
|
|
128
|
-
if (this.isOpen
|
|
129
|
-
|
|
130
|
-
|
|
172
|
+
if (!this.isOpen)
|
|
173
|
+
return;
|
|
174
|
+
const path = e.composedPath();
|
|
175
|
+
if (path.includes(this.el))
|
|
176
|
+
return;
|
|
177
|
+
if (this.portalContainer && path.includes(this.portalContainer))
|
|
178
|
+
return;
|
|
179
|
+
this.isOpen = false;
|
|
131
180
|
}
|
|
132
181
|
searchInputRef;
|
|
133
182
|
currentSelectionChanged(val) {
|
|
134
183
|
this.selected = COUNTRIES.find(c => c.code === val) || null;
|
|
184
|
+
this.internals.setFormValue(val);
|
|
135
185
|
}
|
|
136
186
|
selectPropertiesChanged(val) {
|
|
137
187
|
if (!val)
|
|
@@ -152,6 +202,56 @@ const DropiCountrySelector = class {
|
|
|
152
202
|
this.selectPropertiesChanged(this.selectProperties);
|
|
153
203
|
if (this.currentSelection)
|
|
154
204
|
this.currentSelectionChanged(this.currentSelection);
|
|
205
|
+
this.internals.setFormValue(this.currentSelection ?? '');
|
|
206
|
+
}
|
|
207
|
+
componentDidLoad() {
|
|
208
|
+
if (this.appendTo !== 'body')
|
|
209
|
+
return;
|
|
210
|
+
this.portalContainer = document.createElement('div');
|
|
211
|
+
const style = document.createElement('style');
|
|
212
|
+
style.textContent = PORTAL_CSS;
|
|
213
|
+
this.portalContainer.appendChild(style);
|
|
214
|
+
document.body.appendChild(this.portalContainer);
|
|
215
|
+
}
|
|
216
|
+
disconnectedCallback() {
|
|
217
|
+
this.returnUlToShadow();
|
|
218
|
+
this.portalContainer?.remove();
|
|
219
|
+
this.portalContainer = null;
|
|
220
|
+
}
|
|
221
|
+
componentWillRender() {
|
|
222
|
+
if (!this.portalContainer)
|
|
223
|
+
return;
|
|
224
|
+
const active = document.activeElement;
|
|
225
|
+
if (active && this.portalContainer.contains(active)) {
|
|
226
|
+
this.portalFocusedSelector = '.' + Array.from(active.classList).join('.');
|
|
227
|
+
}
|
|
228
|
+
this.returnUlToShadow();
|
|
229
|
+
}
|
|
230
|
+
componentDidRender() {
|
|
231
|
+
if (!this.portalContainer || !this.buttonRef)
|
|
232
|
+
return;
|
|
233
|
+
const ul = this.el.shadowRoot?.querySelector('ul.select-dropdown');
|
|
234
|
+
if (!ul)
|
|
235
|
+
return;
|
|
236
|
+
const rect = this.buttonRef.getBoundingClientRect();
|
|
237
|
+
ul.style.cssText = `position:fixed;top:${rect.bottom + 4}px;left:${rect.left}px;width:${rect.width}px;z-index:11000;`;
|
|
238
|
+
this.portalContainer.appendChild(ul);
|
|
239
|
+
if (this.portalFocusedSelector) {
|
|
240
|
+
const el = this.portalContainer.querySelector(this.portalFocusedSelector);
|
|
241
|
+
if (el) {
|
|
242
|
+
const len = el.value?.length ?? 0;
|
|
243
|
+
el.focus();
|
|
244
|
+
el.setSelectionRange?.(len, len);
|
|
245
|
+
}
|
|
246
|
+
this.portalFocusedSelector = null;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
returnUlToShadow() {
|
|
250
|
+
if (!this.portalContainer)
|
|
251
|
+
return;
|
|
252
|
+
const ul = this.portalContainer.querySelector('ul.select-dropdown');
|
|
253
|
+
if (ul)
|
|
254
|
+
this.el.shadowRoot?.querySelector('.custom-select')?.appendChild(ul);
|
|
155
255
|
}
|
|
156
256
|
get filtered() {
|
|
157
257
|
if (!this.searchTerm)
|
|
@@ -175,12 +275,13 @@ const DropiCountrySelector = class {
|
|
|
175
275
|
this.dropiChange.emit(country);
|
|
176
276
|
}
|
|
177
277
|
render() {
|
|
178
|
-
return (h("div", { key: '
|
|
278
|
+
return (h("div", { key: '98292dbf6f84139b409cefe4690fb5ce834372c7', class: "custom-select" }, this.label && (h("label", { key: '7dd60d54e701108f7061623a89e8ff29edbb8dc6' }, this.label, this.showObligatory && h("span", { key: '971fd2a900d9ef4740a96145cadc948aab95232a', class: "required" }, "*"))), h("button", { key: '6c0067cfaf920160a4f8c05f59c34f3539540d29', type: "button", ref: (el) => { this.buttonRef = el; }, class: {
|
|
179
279
|
'select-button': true,
|
|
180
280
|
'select-completed': !!this.selected,
|
|
181
281
|
'select-invalid': this.hasError,
|
|
182
|
-
}, disabled: this.disabled, onClick: () => this.open() }, h("div", { key: '
|
|
282
|
+
}, disabled: this.disabled, onClick: () => this.open() }, h("div", { key: 'b28c2c5b0de9b8052bb920a272b9dcc51f4eac6f', class: "selected-content" }, this.selected ? (h("span", { class: "selected-option" }, h("img", { class: "flag-img", src: `https://flagsapi.com/${this.selected.code}/shiny/24.png`, alt: this.selected.name }), this.selected.name)) : (h("span", { class: "placeholder-text" }, this.placeholder))), h("dropi-icon", { key: '2ec568b0ad4efdb3a22ffceb1e85fbc6f1d483e8', name: this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2', iconWidth: "20px", iconHeight: "20px", color: "Gray-Gray-500" })), h("ul", { key: '34f0e5772ebb21e85cb246cbb91196d128d9ca59', class: `select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}` }, h("li", { key: '77cdf81222a7c593f1d54198e2b897468db890a5', class: "search-li" }, h("div", { key: '970723feefd04adf0b113ae63931092f58d0264a', class: "search-field" }, h("input", { key: '294868580087dc1bdb04258ad84672f3d10e7ba7', ref: (el) => { this.searchInputRef = el; }, type: "text", class: "country-search", placeholder: "Buscar pa\u00EDs...", value: this.searchTerm, onInput: (e) => { this.searchTerm = e.target.value; } }), h("span", { key: '02781dc595e568865ab5ae14aeed326b71b36e10', class: "search-icon" }, h("dropi-icon", { key: '0c06d5e5f26d2a2e5ec20967a2ebb9430397f3ea', name: "Search", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" })))), this.filtered.map(country => (h("li", { key: country.code }, h("button", { class: "option", type: "button", onClick: () => this.select(country) }, h("img", { class: "flag-img", src: `https://flagsapi.com/${country.code}/shiny/24.png`, alt: country.name }), country.name))))), this.textHelper && (h("div", { key: 'aae58bc17bbb6953a676818fe02da94b5a4e9f73', class: { 'select-helper': true, 'select-helper-error': this.hasError } }, this.hasError && h("dropi-icon", { key: '7542ef4620499957711079c587f6cb650096f6d3', name: "Warning-circle", iconWidth: "12px", iconHeight: "12px", color: "Error-Error-500" }), h("span", { key: 'ea4c5cedd3b87444a90b4e210f7afa3a318a4832' }, this.textHelper)))));
|
|
183
283
|
}
|
|
284
|
+
static get formAssociated() { return true; }
|
|
184
285
|
static get watchers() { return {
|
|
185
286
|
"currentSelection": [{
|
|
186
287
|
"currentSelectionChanged": 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropi-country-sel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,MAAM,EAAC,KAAK,EAAC,eAAe,EAAA,CAAG,CAChF,CACH,CACH,EACJ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,KACxB,CAAA,CAAA,IAAA,EAAA,EAAI,GAAG,EAAE,OAAO,CAAC,IAAI,EAAA,EACnB,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAA,EACtE,CAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,UAAU,EAChB,GAAG,EAAE,CAAA,qBAAA,EAAwB,OAAO,CAAC,IAAI,CAAA,aAAA,CAAe,EACxD,GAAG,EAAE,OAAO,CAAC,IAAI,EAAA,CACjB,EACD,OAAO,CAAC,IAAI,CACN,CACN,CACN,CAAC,CACC,EACJ,IAAI,CAAC,UAAU,KACd,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EACxE,IAAI,CAAC,QAAQ,IAAI,mEAAY,IAAI,EAAC,gBAAgB,EAAC,SAAS,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAA,CAAG,EACjH,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,UAAU,CAAQ,CAC1B,CACP,CACG;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-country-selector/dropi-country-selector.css?tag=dropi-country-selector&encapsulation=shadow","src/components/dropi-country-selector/dropi-country-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n text-align: left;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.custom-select {\n position: relative;\n width: 100%;\n}\n\n/* ── Label ───────────────────────────────────────────────────────── */\nlabel {\n display: block;\n font-size: var(--font-size-xs, 11px);\n font-weight: var(--font-weight-regular, 400);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 6px;\n}\n\n.required {\n color: var(--Error-Error-500, #ef4444);\n margin-left: 2px;\n}\n\n/* ── Trigger button ──────────────────────────────────────────────── */\n.select-button {\n width: 100%;\n height: 44px;\n padding: 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n color: var(--Gray-Gray-500, #69738c);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-align: left;\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.select-button:focus {\n outline: none;\n border-color: var(--Info-Info-500, #3b82f6);\n}\n\n.select-button:disabled {\n border-color: var(--Gray-Gray-200, #c3c9d9);\n color: var(--Gray-Gray-400, #858ea6);\n background: var(--Gray-Gray-50, #f7f8fa);\n cursor: not-allowed;\n}\n\n.select-button.select-completed {\n color: var(--Gray-Gray-700, #32394d);\n}\n\n.select-button.select-invalid {\n border-color: var(--Error-Error-500, #ef4444);\n}\n\n.selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n flex: 1;\n}\n\n.selected-option {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n}\n\n.placeholder-text {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n/* ── Flag ────────────────────────────────────────────────────────── */\n.flag-img {\n border-radius: var(--Border-1, 4px);\n width: 24px;\n height: 24px;\n object-fit: cover;\n flex-shrink: 0;\n}\n\n/* ── Dropdown ────────────────────────────────────────────────────── */\n.select-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n z-index: 200;\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);\n overflow: hidden;\n transition: max-height 0.2s ease, opacity 0.2s ease;\n}\n\n.select-dropdown.expanded {\n max-height: 300px;\n opacity: 1;\n overflow-y: auto;\n}\n\n.select-dropdown.collapsed {\n max-height: 0;\n opacity: 0;\n pointer-events: none;\n border-color: transparent;\n box-shadow: none;\n}\n\n/* Scrollbar — siempre claro, nunca negro */\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background: var(--Gray-Gray-300, #a3abbf);\n}\n\n/* ── Search ──────────────────────────────────────────────────────── */\n.search-li {\n padding: 10px 12px;\n position: sticky;\n top: 0;\n background: var(--Neutral-White, #ffffff);\n z-index: 1;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.country-search {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n outline: none;\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n transition: border-color 0.15s, background 0.15s;\n}\n\n.country-search:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.country-search::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options ─────────────────────────────────────────────────────── */\n.option {\n width: 100%;\n min-height: 44px;\n padding: 10px 16px;\n border: none;\n background: transparent;\n text-align: left;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background 0.1s ease;\n white-space: nowrap;\n}\n\n.option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen } from '@stencil/core';\n\nexport interface CountryItem {\n name: string;\n code: string;\n codePhone: string;\n}\n\nconst COUNTRIES: CountryItem[] = [\n { name: 'Afghanistan', code: 'AF', codePhone: '93' },\n { name: 'Albania', code: 'AL', codePhone: '355' },\n { name: 'Algeria', code: 'DZ', codePhone: '213' },\n { name: 'Argentina', code: 'AR', codePhone: '54' },\n { name: 'Australia', code: 'AU', codePhone: '61' },\n { name: 'Austria', code: 'AT', codePhone: '43' },\n { name: 'Azerbaijan', code: 'AZ', codePhone: '994' },\n { name: 'Bahamas', code: 'BS', codePhone: '1242' },\n { name: 'Bahrain', code: 'BH', codePhone: '973' },\n { name: 'Bangladesh', code: 'BD', codePhone: '880' },\n { name: 'Belgium', code: 'BE', codePhone: '32' },\n { name: 'Bolivia', code: 'BO', codePhone: '591' },\n { name: 'Brazil', code: 'BR', codePhone: '55' },\n { name: 'Cambodia', code: 'KH', codePhone: '855' },\n { name: 'Canada', code: 'CA', codePhone: '1' },\n { name: 'Chile', code: 'CL', codePhone: '56' },\n { name: 'China', code: 'CN', codePhone: '86' },\n { name: 'Colombia', code: 'CO', codePhone: '57' },\n { name: 'Costa Rica', code: 'CR', codePhone: '506' },\n { name: 'Cuba', code: 'CU', codePhone: '53' },\n { name: 'Czech Republic', code: 'CZ', codePhone: '420' },\n { name: 'Denmark', code: 'DK', codePhone: '45' },\n { name: 'Dominican Republic', code: 'DO', codePhone: '1' },\n { name: 'Ecuador', code: 'EC', codePhone: '593' },\n { name: 'Egypt', code: 'EG', codePhone: '20' },\n { name: 'El Salvador', code: 'SV', codePhone: '503' },\n { name: 'Estonia', code: 'EE', codePhone: '372' },\n { name: 'Ethiopia', code: 'ET', codePhone: '251' },\n { name: 'Finland', code: 'FI', codePhone: '358' },\n { name: 'France', code: 'FR', codePhone: '33' },\n { name: 'Germany', code: 'DE', codePhone: '49' },\n { name: 'Ghana', code: 'GH', codePhone: '233' },\n { name: 'Greece', code: 'GR', codePhone: '30' },\n { name: 'Guatemala', code: 'GT', codePhone: '502' },\n { name: 'Honduras', code: 'HN', codePhone: '504' },\n { name: 'Hong Kong', code: 'HK', codePhone: '852' },\n { name: 'Hungary', code: 'HU', codePhone: '36' },\n { name: 'India', code: 'IN', codePhone: '91' },\n { name: 'Indonesia', code: 'ID', codePhone: '62' },\n { name: 'Iran, Islamic Republic Of', code: 'IR', codePhone: '98' },\n { name: 'Iraq', code: 'IQ', codePhone: '964' },\n { name: 'Ireland', code: 'IE', codePhone: '353' },\n { name: 'Israel', code: 'IL', codePhone: '972' },\n { name: 'Italy', code: 'IT', codePhone: '39' },\n { name: 'Jamaica', code: 'JM', codePhone: '1876' },\n { name: 'Japan', code: 'JP', codePhone: '81' },\n { name: 'Jordan', code: 'JO', codePhone: '962' },\n { name: 'Kazakhstan', code: 'KZ', codePhone: '7' },\n { name: 'Kenya', code: 'KE', codePhone: '254' },\n { name: 'Kuwait', code: 'KW', codePhone: '965' },\n { name: 'Lebanon', code: 'LB', codePhone: '961' },\n { name: 'Malaysia', code: 'MY', codePhone: '60' },\n { name: 'Mexico', code: 'MX', codePhone: '52' },\n { name: 'Morocco', code: 'MA', codePhone: '212' },\n { name: 'Netherlands', code: 'NL', codePhone: '31' },\n { name: 'New Zealand', code: 'NZ', codePhone: '64' },\n { name: 'Nicaragua', code: 'NI', codePhone: '505' },\n { name: 'Nigeria', code: 'NG', codePhone: '234' },\n { name: 'Norway', code: 'NO', codePhone: '47' },\n { name: 'Pakistan', code: 'PK', codePhone: '92' },\n { name: 'Panama', code: 'PA', codePhone: '507' },\n { name: 'Paraguay', code: 'PY', codePhone: '595' },\n { name: 'Peru', code: 'PE', codePhone: '51' },\n { name: 'Philippines', code: 'PH', codePhone: '63' },\n { name: 'Poland', code: 'PL', codePhone: '48' },\n { name: 'Portugal', code: 'PT', codePhone: '351' },\n { name: 'Qatar', code: 'QA', codePhone: '974' },\n { name: 'Romania', code: 'RO', codePhone: '40' },\n { name: 'Russian Federation', code: 'RU', codePhone: '7' },\n { name: 'Saudi Arabia', code: 'SA', codePhone: '966' },\n { name: 'Singapore', code: 'SG', codePhone: '65' },\n { name: 'South Africa', code: 'ZA', codePhone: '27' },\n { name: 'Spain', code: 'ES', codePhone: '34' },\n { name: 'Sri Lanka', code: 'LK', codePhone: '94' },\n { name: 'Sweden', code: 'SE', codePhone: '46' },\n { name: 'Switzerland', code: 'CH', codePhone: '41' },\n { name: 'Taiwan, Province of China', code: 'TW', codePhone: '886' },\n { name: 'Thailand', code: 'TH', codePhone: '66' },\n { name: 'Tunisia', code: 'TN', codePhone: '216' },\n { name: 'Turkey', code: 'TR', codePhone: '90' },\n { name: 'Uganda', code: 'UG', codePhone: '256' },\n { name: 'Ukraine', code: 'UA', codePhone: '380' },\n { name: 'United Arab Emirates', code: 'AE', codePhone: '971' },\n { name: 'United Kingdom', code: 'GB', codePhone: '44' },\n { name: 'United States', code: 'US', codePhone: '1' },\n { name: 'Uruguay', code: 'UY', codePhone: '598' },\n { name: 'Venezuela', code: 'VE', codePhone: '58' },\n { name: 'Viet Nam', code: 'VN', codePhone: '84' },\n { name: 'Zimbabwe', code: 'ZW', codePhone: '263' },\n];\n\n/**\n * @component dropi-country-selector\n * Searchable country dropdown with flag images. Mirrors Angular dropi-country-selector.\n *\n * @example\n * <dropi-country-selector label=\"País\" placeholder=\"Selecciona un país\"></dropi-country-selector>\n */\n@Component({\n tag: 'dropi-country-selector',\n styleUrl: 'dropi-country-selector.css',\n shadow: true,\n})\nexport class DropiCountrySelector {\n /** Label above the select */\n @Prop() label: string = '';\n /** Placeholder when nothing is selected */\n @Prop() placeholder: string = 'Selecciona un país';\n /** Pre-selected country code (ISO 3166-1 alpha-2) */\n @Prop({ mutable: true }) currentSelection: string = '';\n /** Whether the selector is disabled */\n @Prop() disabled: boolean = false;\n /** Show asterisk for required field */\n @Prop() showObligatory: boolean = false;\n /** Show error border */\n @Prop() hasError: boolean = false;\n /** Helper text below the select */\n @Prop() textHelper: string = '';\n /** Search term for filtering (matches Angular `searchTerm`) */\n @Prop({ mutable: true }) searchTerm: string = '';\n /**\n * Convenience object prop — matches Angular `selectProperties: SelectProperties`.\n * When provided, its non-null fields override individual props.\n */\n @Prop() selectProperties: any = null;\n\n /** Emitted when a country is selected. Detail is the CountryItem. */\n @Event() dropiChange: EventEmitter<CountryItem>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: CountryItem | null = null;\n\n @Element() el!: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (this.isOpen && !e.composedPath().includes(this.el)) {\n this.isOpen = false;\n }\n }\n\n private searchInputRef?: HTMLInputElement;\n\n @Watch('currentSelection')\n currentSelectionChanged(val: string) {\n this.selected = COUNTRIES.find(c => c.code === val) || null;\n }\n\n @Watch('selectProperties')\n selectPropertiesChanged(val: any) {\n if (!val) return;\n if (val.label !== undefined) this.label = val.label;\n if (val.placeholder !== undefined) this.placeholder = val.placeholder;\n if (val.showObligatory !== undefined) this.showObligatory = val.showObligatory;\n if (val.textHelper !== undefined) this.textHelper = val.textHelper;\n if (val.hasError !== undefined) this.hasError = val.hasError;\n }\n\n componentWillLoad() {\n if (this.selectProperties) this.selectPropertiesChanged(this.selectProperties);\n if (this.currentSelection) this.currentSelectionChanged(this.currentSelection);\n }\n\n private get filtered(): CountryItem[] {\n if (!this.searchTerm) return COUNTRIES;\n const t = this.searchTerm.toLowerCase();\n return COUNTRIES.filter(c => c.name.toLowerCase().includes(t));\n }\n\n private open() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n setTimeout(() => this.searchInputRef?.focus(), 50);\n }\n }\n\n private select(country: CountryItem) {\n this.selected = country;\n this.isOpen = false;\n this.searchTerm = '';\n this.currentSelection = country.code;\n this.dropiChange.emit(country);\n }\n\n render() {\n return (\n <div class=\"custom-select\">\n {this.label && (\n <label>\n {this.label}\n {this.showObligatory && <span class=\"required\">*</span>}\n </label>\n )}\n\n <button\n type=\"button\"\n class={{\n 'select-button': true,\n 'select-completed': !!this.selected,\n 'select-invalid': this.hasError,\n }}\n disabled={this.disabled}\n onClick={() => this.open()}\n >\n <div class=\"selected-content\">\n {this.selected ? (\n <span class=\"selected-option\">\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${this.selected.code}/shiny/24.png`}\n alt={this.selected.name}\n />\n {this.selected.name}\n </span>\n ) : (\n <span class=\"placeholder-text\">{this.placeholder}</span>\n )}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"20px\"\n iconHeight=\"20px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n <ul class={`select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}`}>\n <li class=\"search-li\">\n <div class=\"search-field\">\n <input\n ref={(el) => { this.searchInputRef = el; }}\n type=\"text\"\n class=\"country-search\"\n placeholder=\"Buscar país...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </li>\n {this.filtered.map(country => (\n <li key={country.code}>\n <button class=\"option\" type=\"button\" onClick={() => this.select(country)}>\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${country.code}/shiny/24.png`}\n alt={country.name}\n />\n {country.name}\n </button>\n </li>\n ))}\n </ul>\n {this.textHelper && (\n <div class={{ 'select-helper': true, 'select-helper-error': this.hasError }}>\n {this.hasError && <dropi-icon name=\"Warning-circle\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Error-Error-500\" />}\n <span>{this.textHelper}</span>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropi-country-selector.entry.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,MAAM,CAAC,uiHAAuiH,CAAC;;ACE/kH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlB;AAQD,MAAM,SAAS,GAAkB;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAChD,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE;IAClD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IACh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,EAAO,IAAI,CAAC,UAAU,CAAQ,CAC1B,CACP,CACG;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-country-selector/dropi-country-selector.css?tag=dropi-country-selector&encapsulation=shadow","src/components/dropi-country-selector/dropi-country-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n text-align: left;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.custom-select {\n position: relative;\n width: 100%;\n}\n\n/* ── Label ───────────────────────────────────────────────────────── */\nlabel {\n display: block;\n font-size: var(--font-size-xs, 11px);\n font-weight: var(--font-weight-regular, 400);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 6px;\n}\n\n.required {\n color: var(--Error-Error-500, #ef4444);\n margin-left: 2px;\n}\n\n/* ── Trigger button ──────────────────────────────────────────────── */\n.select-button {\n width: 100%;\n height: 44px;\n padding: 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n color: var(--Gray-Gray-500, #69738c);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-align: left;\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.select-button:focus {\n outline: none;\n border-color: var(--Info-Info-500, #3b82f6);\n}\n\n.select-button:disabled {\n border-color: var(--Gray-Gray-200, #c3c9d9);\n color: var(--Gray-Gray-400, #858ea6);\n background: var(--Gray-Gray-50, #f7f8fa);\n cursor: not-allowed;\n}\n\n.select-button.select-completed {\n color: var(--Gray-Gray-700, #32394d);\n}\n\n.select-button.select-invalid {\n border-color: var(--Error-Error-500, #ef4444);\n}\n\n.selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n flex: 1;\n}\n\n.selected-option {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n}\n\n.placeholder-text {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n/* ── Flag ────────────────────────────────────────────────────────── */\n.flag-img {\n border-radius: var(--Border-1, 4px);\n width: 24px;\n height: 24px;\n object-fit: cover;\n flex-shrink: 0;\n}\n\n/* ── Dropdown ────────────────────────────────────────────────────── */\n.select-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n z-index: var(--dropi-z-index-overlay, 11000);\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);\n overflow: hidden;\n transition: max-height 0.2s ease, opacity 0.2s ease;\n}\n\n.select-dropdown.expanded {\n max-height: 300px;\n opacity: 1;\n overflow-y: auto;\n}\n\n.select-dropdown.collapsed {\n max-height: 0;\n opacity: 0;\n pointer-events: none;\n border-color: transparent;\n box-shadow: none;\n}\n\n/* Scrollbar — siempre claro, nunca negro */\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background: var(--Gray-Gray-300, #a3abbf);\n}\n\n/* ── Search ──────────────────────────────────────────────────────── */\n.search-li {\n padding: 10px 12px;\n position: sticky;\n top: 0;\n background: var(--Neutral-White, #ffffff);\n z-index: 1;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.country-search {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n outline: none;\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n transition: border-color 0.15s, background 0.15s;\n}\n\n.country-search:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.country-search::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options ─────────────────────────────────────────────────────── */\n.option {\n width: 100%;\n min-height: 44px;\n padding: 10px 16px;\n border: none;\n background: transparent;\n text-align: left;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background 0.1s ease;\n white-space: nowrap;\n}\n\n.option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen, AttachInternals } from '@stencil/core';\n\nconst PORTAL_CSS = `\n.select-dropdown {\n background: #ffffff;\n border: 1px solid #c3c9d9;\n border-radius: 8px;\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0,0,0,.10);\n overflow: hidden;\n transition: max-height .2s ease, opacity .2s ease;\n font-family: inherit;\n font-size: 14px;\n}\n.select-dropdown.expanded { max-height: 300px; opacity: 1; overflow-y: auto; }\n.select-dropdown.collapsed { max-height: 0; opacity: 0; pointer-events: none; border-color: transparent; box-shadow: none; }\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb { background: #c3c9d9; border-radius: 4px; }\n.search-li { padding: 10px 12px; position: sticky; top: 0; background: #ffffff; z-index: 1; border-bottom: 1px solid #e6eaf2; }\n.search-field { position: relative; display: flex; align-items: center; }\n.country-search { width: 100%; height: 36px; padding: 0 36px 0 12px; border: 1px solid #c3c9d9; border-radius: 8px; outline: none; font-size: 14px; font-family: inherit; color: #32394d; background: #f7f8fa; }\n.country-search:focus { border-color: #50a5f1; background: #ffffff; }\n.country-search::placeholder { color: #858ea6; }\n.search-icon { position: absolute; right: 10px; display: flex; align-items: center; pointer-events: none; }\n.option { width: 100%; min-height: 44px; padding: 10px 16px; border: none; background: transparent; text-align: left; color: #32394d; font-size: 14px; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .1s ease; white-space: nowrap; }\n.option:hover { background: #f7f8fa; }\n.flag-img { border-radius: 4px; width: 24px; height: 24px; object-fit: cover; flex-shrink: 0; }\n`;\n\nexport interface CountryItem {\n name: string;\n code: string;\n codePhone: string;\n}\n\nconst COUNTRIES: CountryItem[] = [\n { name: 'Afghanistan', code: 'AF', codePhone: '93' },\n { name: 'Albania', code: 'AL', codePhone: '355' },\n { name: 'Algeria', code: 'DZ', codePhone: '213' },\n { name: 'Argentina', code: 'AR', codePhone: '54' },\n { name: 'Australia', code: 'AU', codePhone: '61' },\n { name: 'Austria', code: 'AT', codePhone: '43' },\n { name: 'Azerbaijan', code: 'AZ', codePhone: '994' },\n { name: 'Bahamas', code: 'BS', codePhone: '1242' },\n { name: 'Bahrain', code: 'BH', codePhone: '973' },\n { name: 'Bangladesh', code: 'BD', codePhone: '880' },\n { name: 'Belgium', code: 'BE', codePhone: '32' },\n { name: 'Bolivia', code: 'BO', codePhone: '591' },\n { name: 'Brazil', code: 'BR', codePhone: '55' },\n { name: 'Cambodia', code: 'KH', codePhone: '855' },\n { name: 'Canada', code: 'CA', codePhone: '1' },\n { name: 'Chile', code: 'CL', codePhone: '56' },\n { name: 'China', code: 'CN', codePhone: '86' },\n { name: 'Colombia', code: 'CO', codePhone: '57' },\n { name: 'Costa Rica', code: 'CR', codePhone: '506' },\n { name: 'Cuba', code: 'CU', codePhone: '53' },\n { name: 'Czech Republic', code: 'CZ', codePhone: '420' },\n { name: 'Denmark', code: 'DK', codePhone: '45' },\n { name: 'Dominican Republic', code: 'DO', codePhone: '1' },\n { name: 'Ecuador', code: 'EC', codePhone: '593' },\n { name: 'Egypt', code: 'EG', codePhone: '20' },\n { name: 'El Salvador', code: 'SV', codePhone: '503' },\n { name: 'Estonia', code: 'EE', codePhone: '372' },\n { name: 'Ethiopia', code: 'ET', codePhone: '251' },\n { name: 'Finland', code: 'FI', codePhone: '358' },\n { name: 'France', code: 'FR', codePhone: '33' },\n { name: 'Germany', code: 'DE', codePhone: '49' },\n { name: 'Ghana', code: 'GH', codePhone: '233' },\n { name: 'Greece', code: 'GR', codePhone: '30' },\n { name: 'Guatemala', code: 'GT', codePhone: '502' },\n { name: 'Honduras', code: 'HN', codePhone: '504' },\n { name: 'Hong Kong', code: 'HK', codePhone: '852' },\n { name: 'Hungary', code: 'HU', codePhone: '36' },\n { name: 'India', code: 'IN', codePhone: '91' },\n { name: 'Indonesia', code: 'ID', codePhone: '62' },\n { name: 'Iran, Islamic Republic Of', code: 'IR', codePhone: '98' },\n { name: 'Iraq', code: 'IQ', codePhone: '964' },\n { name: 'Ireland', code: 'IE', codePhone: '353' },\n { name: 'Israel', code: 'IL', codePhone: '972' },\n { name: 'Italy', code: 'IT', codePhone: '39' },\n { name: 'Jamaica', code: 'JM', codePhone: '1876' },\n { name: 'Japan', code: 'JP', codePhone: '81' },\n { name: 'Jordan', code: 'JO', codePhone: '962' },\n { name: 'Kazakhstan', code: 'KZ', codePhone: '7' },\n { name: 'Kenya', code: 'KE', codePhone: '254' },\n { name: 'Kuwait', code: 'KW', codePhone: '965' },\n { name: 'Lebanon', code: 'LB', codePhone: '961' },\n { name: 'Malaysia', code: 'MY', codePhone: '60' },\n { name: 'Mexico', code: 'MX', codePhone: '52' },\n { name: 'Morocco', code: 'MA', codePhone: '212' },\n { name: 'Netherlands', code: 'NL', codePhone: '31' },\n { name: 'New Zealand', code: 'NZ', codePhone: '64' },\n { name: 'Nicaragua', code: 'NI', codePhone: '505' },\n { name: 'Nigeria', code: 'NG', codePhone: '234' },\n { name: 'Norway', code: 'NO', codePhone: '47' },\n { name: 'Pakistan', code: 'PK', codePhone: '92' },\n { name: 'Panama', code: 'PA', codePhone: '507' },\n { name: 'Paraguay', code: 'PY', codePhone: '595' },\n { name: 'Peru', code: 'PE', codePhone: '51' },\n { name: 'Philippines', code: 'PH', codePhone: '63' },\n { name: 'Poland', code: 'PL', codePhone: '48' },\n { name: 'Portugal', code: 'PT', codePhone: '351' },\n { name: 'Qatar', code: 'QA', codePhone: '974' },\n { name: 'Romania', code: 'RO', codePhone: '40' },\n { name: 'Russian Federation', code: 'RU', codePhone: '7' },\n { name: 'Saudi Arabia', code: 'SA', codePhone: '966' },\n { name: 'Singapore', code: 'SG', codePhone: '65' },\n { name: 'South Africa', code: 'ZA', codePhone: '27' },\n { name: 'Spain', code: 'ES', codePhone: '34' },\n { name: 'Sri Lanka', code: 'LK', codePhone: '94' },\n { name: 'Sweden', code: 'SE', codePhone: '46' },\n { name: 'Switzerland', code: 'CH', codePhone: '41' },\n { name: 'Taiwan, Province of China', code: 'TW', codePhone: '886' },\n { name: 'Thailand', code: 'TH', codePhone: '66' },\n { name: 'Tunisia', code: 'TN', codePhone: '216' },\n { name: 'Turkey', code: 'TR', codePhone: '90' },\n { name: 'Uganda', code: 'UG', codePhone: '256' },\n { name: 'Ukraine', code: 'UA', codePhone: '380' },\n { name: 'United Arab Emirates', code: 'AE', codePhone: '971' },\n { name: 'United Kingdom', code: 'GB', codePhone: '44' },\n { name: 'United States', code: 'US', codePhone: '1' },\n { name: 'Uruguay', code: 'UY', codePhone: '598' },\n { name: 'Venezuela', code: 'VE', codePhone: '58' },\n { name: 'Viet Nam', code: 'VN', codePhone: '84' },\n { name: 'Zimbabwe', code: 'ZW', codePhone: '263' },\n];\n\n/**\n * @component dropi-country-selector\n * Searchable country dropdown with flag images. Mirrors Angular dropi-country-selector.\n *\n * @example\n * <dropi-country-selector label=\"País\" placeholder=\"Selecciona un país\"></dropi-country-selector>\n */\n@Component({\n tag: 'dropi-country-selector',\n styleUrl: 'dropi-country-selector.css',\n shadow: true,\n formAssociated: true,\n})\nexport class DropiCountrySelector {\n @AttachInternals() internals: ElementInternals;\n\n /** Name for native form submission */\n @Prop({ reflect: true }) name: string = '';\n\n /** Label above the select */\n @Prop() label: string = '';\n /** Placeholder when nothing is selected */\n @Prop() placeholder: string = 'Selecciona un país';\n /** Pre-selected country code (ISO 3166-1 alpha-2) */\n @Prop({ mutable: true }) currentSelection: string = '';\n /** Whether the selector is disabled */\n @Prop() disabled: boolean = false;\n /** Show asterisk for required field */\n @Prop() showObligatory: boolean = false;\n /** Show error border */\n @Prop() hasError: boolean = false;\n /** Helper text below the select */\n @Prop() textHelper: string = '';\n /** Search term for filtering (matches Angular `searchTerm`) */\n @Prop({ mutable: true }) searchTerm: string = '';\n /**\n * Convenience object prop — matches Angular `selectProperties: SelectProperties`.\n * When provided, its non-null fields override individual props.\n */\n @Prop() selectProperties: any = null;\n /** When set to \"body\", the dropdown renders with fixed positioning to escape parent overflow clipping */\n @Prop() appendTo: string = '';\n\n /** Emitted when a country is selected. Detail is the CountryItem. */\n @Event() dropiChange: EventEmitter<CountryItem>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: CountryItem | null = null;\n\n @Element() el!: HTMLElement;\n private buttonRef?: HTMLButtonElement;\n private portalContainer: HTMLDivElement | null = null;\n private portalFocusedSelector: string | null = null;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (!this.isOpen) return;\n const path = e.composedPath();\n if (path.includes(this.el)) return;\n if (this.portalContainer && path.includes(this.portalContainer)) return;\n this.isOpen = false;\n }\n\n private searchInputRef?: HTMLInputElement;\n\n @Watch('currentSelection')\n currentSelectionChanged(val: string) {\n this.selected = COUNTRIES.find(c => c.code === val) || null;\n this.internals.setFormValue(val);\n }\n\n\n @Watch('selectProperties')\n selectPropertiesChanged(val: any) {\n if (!val) return;\n if (val.label !== undefined) this.label = val.label;\n if (val.placeholder !== undefined) this.placeholder = val.placeholder;\n if (val.showObligatory !== undefined) this.showObligatory = val.showObligatory;\n if (val.textHelper !== undefined) this.textHelper = val.textHelper;\n if (val.hasError !== undefined) this.hasError = val.hasError;\n }\n\n componentWillLoad() {\n if (this.selectProperties) this.selectPropertiesChanged(this.selectProperties);\n if (this.currentSelection) this.currentSelectionChanged(this.currentSelection);\n this.internals.setFormValue(this.currentSelection ?? '');\n }\n\n\n componentDidLoad() {\n if (this.appendTo !== 'body') return;\n this.portalContainer = document.createElement('div');\n const style = document.createElement('style');\n style.textContent = PORTAL_CSS;\n this.portalContainer.appendChild(style);\n document.body.appendChild(this.portalContainer);\n }\n\n disconnectedCallback() {\n this.returnUlToShadow();\n this.portalContainer?.remove();\n this.portalContainer = null;\n }\n\n componentWillRender() {\n if (!this.portalContainer) return;\n const active = document.activeElement;\n if (active && this.portalContainer.contains(active)) {\n this.portalFocusedSelector = '.' + Array.from((active as HTMLElement).classList).join('.');\n }\n this.returnUlToShadow();\n }\n\n componentDidRender() {\n if (!this.portalContainer || !this.buttonRef) return;\n const ul = this.el.shadowRoot?.querySelector('ul.select-dropdown') as HTMLUListElement;\n if (!ul) return;\n const rect = this.buttonRef.getBoundingClientRect();\n ul.style.cssText = `position:fixed;top:${rect.bottom + 4}px;left:${rect.left}px;width:${rect.width}px;z-index:11000;`;\n this.portalContainer.appendChild(ul);\n if (this.portalFocusedSelector) {\n const el = this.portalContainer.querySelector(this.portalFocusedSelector) as HTMLElement;\n if (el) {\n const len = (el as HTMLInputElement).value?.length ?? 0;\n el.focus();\n (el as HTMLInputElement).setSelectionRange?.(len, len);\n }\n this.portalFocusedSelector = null;\n }\n }\n\n private returnUlToShadow() {\n if (!this.portalContainer) return;\n const ul = this.portalContainer.querySelector('ul.select-dropdown');\n if (ul) this.el.shadowRoot?.querySelector('.custom-select')?.appendChild(ul);\n }\n\n private get filtered(): CountryItem[] {\n if (!this.searchTerm) return COUNTRIES;\n const t = this.searchTerm.toLowerCase();\n return COUNTRIES.filter(c => c.name.toLowerCase().includes(t));\n }\n\n private open() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n setTimeout(() => this.searchInputRef?.focus(), 50);\n }\n }\n\n private select(country: CountryItem) {\n this.selected = country;\n this.isOpen = false;\n this.searchTerm = '';\n this.currentSelection = country.code;\n this.dropiChange.emit(country);\n }\n\n render() {\n return (\n <div class=\"custom-select\">\n {this.label && (\n <label>\n {this.label}\n {this.showObligatory && <span class=\"required\">*</span>}\n </label>\n )}\n\n <button\n type=\"button\"\n ref={(el) => { this.buttonRef = el as HTMLButtonElement; }}\n class={{\n 'select-button': true,\n 'select-completed': !!this.selected,\n 'select-invalid': this.hasError,\n }}\n disabled={this.disabled}\n onClick={() => this.open()}\n >\n <div class=\"selected-content\">\n {this.selected ? (\n <span class=\"selected-option\">\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${this.selected.code}/shiny/24.png`}\n alt={this.selected.name}\n />\n {this.selected.name}\n </span>\n ) : (\n <span class=\"placeholder-text\">{this.placeholder}</span>\n )}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"20px\"\n iconHeight=\"20px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n <ul class={`select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}`}>\n <li class=\"search-li\">\n <div class=\"search-field\">\n <input\n ref={(el) => { this.searchInputRef = el; }}\n type=\"text\"\n class=\"country-search\"\n placeholder=\"Buscar país...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </li>\n {this.filtered.map(country => (\n <li key={country.code}>\n <button class=\"option\" type=\"button\" onClick={() => this.select(country)}>\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${country.code}/shiny/24.png`}\n alt={country.name}\n />\n {country.name}\n </button>\n </li>\n ))}\n </ul>\n {this.textHelper && (\n <div class={{ 'select-helper': true, 'select-helper-error': this.hasError }}>\n {this.hasError && <dropi-icon name=\"Warning-circle\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Error-Error-500\" />}\n <span>{this.textHelper}</span>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, h } from './index-D0Z06C2b.js';
|
|
2
2
|
|
|
3
3
|
const dropiDatePickerRangeCss = () => `:host{display:block;width:100%;max-width:380px}*,*::before,*::after{box-sizing:border-box}.date-picker-range{width:100%;font-family:inherit}.label{font-size:11px;font-weight:var(--font-weight-medium);color:#7b8190;margin-bottom:8px}.inputs-row{display:flex;align-items:flex-end;gap:8px}.input-group{flex:1;display:flex;flex-direction:column;gap:4px}.input-label{font-size:var(--font-size-xs, 11px);color:var(--Gray-Gray-500, #69738c);font-weight:var(--font-weight-medium, 500)}.date-input{width:100%;height:40px;padding:0 10px;border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);color:var(--Gray-Gray-600, #475066);font-size:13px;font-family:inherit;outline:none;cursor:pointer;transition:border-color 0.15s ease}.date-input:focus{border-color:var(--Primary-Primary-500, #f49a3d)}.separator{padding-bottom:8px;color:var(--Gray-Gray-400, #858ea6);font-size:var(--font-size-m)}.shortcuts{display:flex;flex-direction:column;gap:2px;margin-top:10px;border-left:1px solid var(--Gray-Gray-100, #e6eaf2);padding-left:10px}.shortcut-btn{background:transparent;border:none;padding:4px 6px;font-size:13px;font-family:inherit;color:var(--Gray-Gray-700, #32394d);cursor:pointer;text-align:left;border-radius:5px;transition:background 0.1s ease;font-weight:var(--font-weight-regular)}.shortcut-btn:hover{background:var(--Gray-Gray-50, #f5f6f8)}.shortcut-btn.active{background:var(--Gray-Gray-50, #f5f6f8);font-weight:var(--font-weight-semibold)}.warning-box{margin-top:8px;padding:4px 8px;border:1px solid var(--Warning-Warning-400);border-radius:4px;background:var(--Warning-Warning-50)}.warning-message{color:#495057;font-size:var(--font-size-xxs);line-height:16px}@keyframes shimmer{0%{background-position:-468px 0}100%{background-position:468px 0}}.skeleton{height:40px;width:100%;min-width:180px;border-radius:6px;animation:shimmer 1s linear infinite;background:linear-gradient(to right, #f5f6f8 8%, #e3e7ef 28%, #f5f6f8 77%);background-size:800px 104px}@media screen and (max-width: 480px){.inputs-row{flex-direction:column}.separator{display:none}.shortcuts{flex-direction:row;flex-wrap:wrap;border-left:none;padding-left:0;border-top:1px solid var(--Gray-Gray-100, #e6eaf2);padding-top:8px}}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, d as createEvent, a as getElement, h } from './index-D0Z06C2b.js';
|
|
2
2
|
|
|
3
3
|
const dropiDatePickerCss = () => `:host{display:block;width:100%;position:relative}*,*::before,*::after{box-sizing:border-box}.dp-label{display:block;font-size:var(--font-size-xxs, 10px);color:var(--Gray-Gray-600, #475066);margin-bottom:4px}.dp-trigger{width:100%;height:44px;display:flex;align-items:center;gap:var(--Size-2, 8px);padding:0 var(--Size-3, 12px);border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-2, 8px);background:var(--Neutral-White, #ffffff);cursor:pointer;font-family:inherit;transition:border-color 0.2s}.dp-trigger:hover:not(:disabled){border-color:var(--Info-Info-500, #50a5f1)}.dp-trigger--disabled{background:var(--Gray-Gray-50, #f7f8fa);cursor:not-allowed;opacity:0.6}.dp-trigger__value{flex:1;text-align:left;font-size:var(--font-size-xs, 12px);color:var(--Gray-Gray-700, #32394d);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dp-trigger__placeholder{color:var(--Gray-Gray-400, #858ea6)}.dp-popup{position:absolute;top:calc(100% + 8px);left:0;width:320px;background:var(--Neutral-White, #ffffff);border:1px solid var(--Gray-Gray-200, #c3c9d9);border-radius:var(--Border-3, 12px);box-shadow:0 4px 16px rgba(0,0,0,0.08);z-index:300;padding:var(--Size-4, 16px)}.dp-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--Size-4, 16px)}.dp-nav__btn{background:none;border:none;padding:0;cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center;width:32px;height:32px;transition:background 0.15s}.dp-nav__btn:hover{background:var(--Gray-Gray-50, #f7f8fa)}.dp-nav__title{font-size:var(--font-size-s, 14px);font-weight:var(--font-weight-bold, 700);color:var(--Gray-Gray-700, #32394d);display:flex;gap:8px}.dp-grid{display:grid;grid-template-columns:repeat(7, 1fr);row-gap:8px;column-gap:4px}.dp-day-header{font-size:var(--font-size-s, 14px);color:var(--Gray-Gray-700, #32394d);text-align:center;padding:8px 0;font-weight:var(--font-weight-bold, 700)}.dp-cell{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:var(--font-size-xs, 12px);font-family:inherit;border:none;cursor:pointer;background:transparent;color:var(--Gray-Gray-600, #475066);width:100%;position:relative;z-index:1;padding:0}.dp-cell::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:50%;transition:all 0.2s;z-index:-1;background:transparent}.dp-cell::before{content:"";position:absolute;top:0;bottom:0;z-index:-2;border-radius:0;background:transparent}.dp-cell:hover:not(:disabled)::after{background:var(--Gray-Gray-100, #e6eaf2)}.dp-cell--other-month{color:var(--Gray-Gray-300, #a0a9c0)}.dp-cell--today{font-weight:var(--font-weight-bold, 700)}.dp-cell--today::after{background:var(--Gray-Gray-100, #e6eaf2)}.dp-cell--selected{color:var(--Neutral-White, #ffffff);font-weight:var(--font-weight-bold, 700)}.dp-cell--selected::after{background:var(--Orange-orange-500, #f49a3d) !important}.dp-cell--range-start,.dp-cell--range-end{color:var(--Neutral-White, #ffffff);font-weight:var(--font-weight-bold, 700)}.dp-cell--range-start::after,.dp-cell--range-end::after{background:var(--Orange-orange-500, #f49a3d) !important}.dp-cell--in-range{color:var(--Orange-orange-500, #f49a3d);font-weight:var(--font-weight-bold, 700)}.dp-cell--in-range::before{left:-2px;right:-2px;background:var(--Orange-orange-50, #fef5ec)}.dp-cell--range-start::before{left:50%;right:-2px;background:var(--Orange-orange-50, #fef5ec)}.dp-cell--range-end::before{left:-2px;right:50%;background:var(--Orange-orange-50, #fef5ec)}.dp-cell--range-start.dp-cell--range-end::before{background:transparent}.dp-cell--disabled{opacity:0.35;cursor:not-allowed}.dp-footer{display:flex;justify-content:space-between;margin-top:var(--Size-3, 12px);border-top:1px solid var(--Gray-Gray-100, #e6eaf2);padding-top:var(--Size-2, 8px)}.dp-footer__clear,.dp-footer__today{background:none;border:none;padding:4px 8px;font-size:var(--font-size-xxs, 10px);font-family:inherit;cursor:pointer;border-radius:var(--Border-1, 4px);transition:background 0.15s}.dp-footer__clear{color:var(--Gray-Gray-500, #69738c)}.dp-footer__today{color:var(--Orange-orange-500, #f49a3d);font-weight:var(--font-weight-bold, 700)}.dp-footer__clear:hover{background:var(--Gray-Gray-50, #f7f8fa)}.dp-footer__today:hover{background:var(--Orange-orange-50, #fef5ec)}`;
|
|
4
4
|
|
|
@@ -13,13 +13,26 @@ const DropiDatePicker = class {
|
|
|
13
13
|
this.dropiChangeDate = createEvent(this, "dropiChangeDate", 7);
|
|
14
14
|
this.dropiClosePanel = createEvent(this, "dropiClosePanel", 7);
|
|
15
15
|
this.dropiRangeChange = createEvent(this, "dropiRangeChange", 7);
|
|
16
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
17
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
21
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
22
|
+
}
|
|
16
23
|
}
|
|
24
|
+
internals;
|
|
25
|
+
/** Name for native form submission */
|
|
26
|
+
name = '';
|
|
17
27
|
/** Selected date (ISO string, single mode) - matches Angular 'selectedDate' */
|
|
18
28
|
selectedDate = '';
|
|
19
29
|
/** Range start date (ISO string, range mode) */
|
|
20
30
|
startDate = '';
|
|
21
31
|
/** Range end date (ISO string, range mode) */
|
|
22
32
|
endDate = '';
|
|
33
|
+
valueChanged() {
|
|
34
|
+
this.updateFormValue();
|
|
35
|
+
}
|
|
23
36
|
/** Enable range selection - matches Angular selectionMode */
|
|
24
37
|
selectionMode = 'single';
|
|
25
38
|
/** Min selectable date (ISO string) */
|
|
@@ -52,6 +65,17 @@ const DropiDatePicker = class {
|
|
|
52
65
|
dropiClosePanel;
|
|
53
66
|
/** Emitted when range selected */
|
|
54
67
|
dropiRangeChange;
|
|
68
|
+
componentWillLoad() {
|
|
69
|
+
this.updateFormValue();
|
|
70
|
+
}
|
|
71
|
+
updateFormValue() {
|
|
72
|
+
if (this.selectionMode === 'range') {
|
|
73
|
+
this.internals.setFormValue(this.startDate && this.endDate ? `${this.startDate},${this.endDate}` : '');
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.internals.setFormValue(this.selectedDate || '');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
55
79
|
get displayValue() {
|
|
56
80
|
if (this.selectionMode === 'range') {
|
|
57
81
|
if (this.startDate && this.endDate)
|
|
@@ -171,12 +195,12 @@ const DropiDatePicker = class {
|
|
|
171
195
|
render() {
|
|
172
196
|
const days = this.buildDays();
|
|
173
197
|
const today = new Date().toISOString().slice(0, 10);
|
|
174
|
-
return (h("div", { key: '
|
|
198
|
+
return (h("div", { key: '97a96b56b0e8ae551f747bad4a3459a1f4945411', class: "dp-wrap" }, this.label && h("label", { key: 'a1792032ab9ae2dbe574f50b7a537df687eae40c', class: "dp-label" }, this.label), h("button", { key: '4237c2b988f1e9fbaa77dc2a989964216e3fe902', class: {
|
|
175
199
|
'dp-trigger': true,
|
|
176
200
|
'dp-trigger--disabled': this.disabled,
|
|
177
201
|
'dp-trigger--invalid': this.isInvalid,
|
|
178
202
|
'dp-trigger--loading': this.loading
|
|
179
|
-
}, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '
|
|
203
|
+
}, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '39591fedb92b92e6507b564fc8c145711f1a21b1', name: "Calendar", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("span", { key: '305e3f81d64c01603687d53edc59e1d19ef06c3c', class: { 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue } }, this.displayValue || this.placeholder), h("dropi-icon", { key: '13feb346ad7b07a7e2f208e299f62a8261a97655', name: "Arrow-Down-2", iconWidth: "12px", iconHeight: "12px", color: "Gray-Gray-400" })), this.open && (h("div", { key: '4cdf8a69422a0b54d0f7c1a6711a683dab7d1f34', class: "dp-popup" }, h("div", { key: '0c6fb31094003c66c5b471e738dd75e7b865401f', class: "dp-nav" }, h("button", { key: '4fa24f9450cf6c5e888cea374619e14245c0c005', class: "dp-nav__btn", onClick: () => this.prevMonth(), type: "button" }, h("dropi-icon", { key: '2196f85700b252d4f83536f11ed197c083fc45ec', name: "Arrow-Left-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" })), h("span", { key: '01619de7c5218b506f75234745f3184af813a491', class: "dp-nav__title" }, h("span", { key: '8074e7deeb6c102bad7f1911739e785187783a7c' }, MONTHS_ES[this.viewMonth]), h("span", { key: '69e9c3b41361e293a843f911b5bcf4690995d2b4' }, this.viewYear)), h("button", { key: '51c0ad3da96835736170fbf94338fd70c942c3d2', class: "dp-nav__btn", onClick: () => this.nextMonth(), type: "button" }, h("dropi-icon", { key: '24eb4385639c9a71f5312f32b33b36593c2b0259', name: "Arrow-Right-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" }))), h("div", { key: 'c18cecd81af38b3a6f23402501011c09b8b453d7', class: "dp-grid" }, DAYS_ES.map(d => (h("div", { class: "dp-day-header" }, d))), days.map(({ iso, day, currentMonth }) => {
|
|
180
204
|
const isSelected = this.selectionMode !== 'range'
|
|
181
205
|
? iso === this.selectedDate
|
|
182
206
|
: iso === this.startDate || iso === this.endDate;
|
|
@@ -198,12 +222,12 @@ const DropiDatePicker = class {
|
|
|
198
222
|
if (this.selectionMode === 'range' && this.startDate && !this.endDate)
|
|
199
223
|
this.hoverDate = iso;
|
|
200
224
|
}, onMouseLeave: () => this.hoverDate = '' }, day));
|
|
201
|
-
})), h("div", { key: '
|
|
225
|
+
})), h("div", { key: '594f280cb269c32ac3a129401e13b710af1a7c7e', class: "dp-footer" }, h("button", { key: '6028ef84bc17f0d1bb0fd587a991698a8fc69338', class: "dp-footer__clear", type: "button", onClick: () => {
|
|
202
226
|
this.selectedDate = '';
|
|
203
227
|
this.startDate = '';
|
|
204
228
|
this.endDate = '';
|
|
205
229
|
this.open = false;
|
|
206
|
-
} }, "Limpiar"), h("button", { key: '
|
|
230
|
+
} }, "Limpiar"), h("button", { key: 'ab01840a18d657621205d4fba69cc53feb474d11', class: "dp-footer__today", type: "button", onClick: () => {
|
|
207
231
|
if (this.selectionMode !== 'range') {
|
|
208
232
|
this.selectedDate = today;
|
|
209
233
|
this.open = false;
|
|
@@ -215,6 +239,18 @@ const DropiDatePicker = class {
|
|
|
215
239
|
}
|
|
216
240
|
} }, "Hoy"))))));
|
|
217
241
|
}
|
|
242
|
+
static get formAssociated() { return true; }
|
|
243
|
+
static get watchers() { return {
|
|
244
|
+
"selectedDate": [{
|
|
245
|
+
"valueChanged": 0
|
|
246
|
+
}],
|
|
247
|
+
"startDate": [{
|
|
248
|
+
"valueChanged": 0
|
|
249
|
+
}],
|
|
250
|
+
"endDate": [{
|
|
251
|
+
"valueChanged": 0
|
|
252
|
+
}]
|
|
253
|
+
}; }
|
|
218
254
|
};
|
|
219
255
|
DropiDatePicker.style = dropiDatePickerCss();
|
|
220
256
|
|