@dropi/ui 0.1.21 → 0.1.23
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/{esm → dropi-ui}/dropi-accordion-item.entry.js +9 -3
- package/dist/dropi-ui/dropi-accordion-item.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-accordion.entry.js +5 -2
- package/dist/dropi-ui/dropi-accordion.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-alert-legacy.entry.js +4 -1
- package/dist/dropi-ui/dropi-alert-legacy.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-alert-modal.entry.js +6 -3
- package/dist/dropi-ui/dropi-alert-modal.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-alert.entry.js +5 -2
- package/dist/dropi-ui/dropi-alert.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-avatars.entry.js +5 -2
- package/dist/dropi-ui/dropi-avatars.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-badge-legacy.entry.js +5 -2
- package/dist/dropi-ui/dropi-badge-legacy.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-badge.entry.js +5 -2
- package/dist/dropi-ui/dropi-badge.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-banner-external.entry.js +15 -2
- package/dist/dropi-ui/dropi-banner-external.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-breadcrumb.entry.js +5 -2
- package/dist/dropi-ui/dropi-breadcrumb.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-button.entry.js +6 -3
- package/dist/dropi-ui/dropi-button.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-card-checkbox.entry.js +6 -3
- package/dist/dropi-ui/dropi-card-checkbox.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-card-product.entry.js +10 -5
- package/dist/dropi-ui/dropi-card-product.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-card-section.entry.js +6 -3
- package/dist/dropi-ui/dropi-card-section.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-carousel.entry.js +10 -2
- package/dist/dropi-ui/dropi-carousel.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-checkbox-selection-list.entry.js +6 -3
- package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-checkbox.entry.js +6 -3
- package/dist/dropi-ui/dropi-checkbox.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-chips.entry.js +5 -2
- package/dist/dropi-ui/dropi-chips.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-city-selector.entry.js +13 -2
- package/dist/dropi-ui/dropi-city-selector.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-color-picker.entry.js +7 -4
- package/dist/dropi-ui/dropi-color-picker.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-country-flags.entry.js +5 -2
- package/dist/dropi-ui/dropi-country-flags.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-country-selector.entry.js +6 -3
- package/dist/dropi-ui/dropi-country-selector.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-date-picker-range.entry.js +4 -1
- package/dist/dropi-ui/dropi-date-picker-range.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-date-picker.entry.js +8 -5
- package/dist/dropi-ui/dropi-date-picker.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-drawer.entry.js +10 -4
- package/dist/dropi-ui/dropi-drawer.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-dropdown.entry.js +6 -3
- package/dist/dropi-ui/dropi-dropdown.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-empty-state.entry.js +5 -2
- package/dist/dropi-ui/dropi-empty-state.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-favorite-button.entry.js +5 -2
- package/dist/dropi-ui/dropi-favorite-button.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-file-upload-progress-bar.entry.js +7 -2
- package/dist/dropi-ui/dropi-file-upload-progress-bar.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-file-upload.entry.js +9 -5
- package/dist/dropi-ui/dropi-file-upload.entry.js.map +1 -0
- package/dist/dropi-ui/dropi-icon.entry.js +68 -0
- package/dist/dropi-ui/dropi-icon.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-ilustration-icon.entry.js +5 -2
- package/dist/dropi-ui/dropi-ilustration-icon.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-image-miniature.entry.js +5 -2
- package/dist/dropi-ui/dropi-image-miniature.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-image-overlay.entry.js +6 -2
- package/dist/dropi-ui/dropi-image-overlay.entry.js.map +1 -0
- package/dist/{esm/dropi-input_3.entry.js → dropi-ui/dropi-input.entry.js} +13 -135
- package/dist/dropi-ui/dropi-input.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-languages-selector.entry.js +9 -2
- package/dist/dropi-ui/dropi-languages-selector.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-logo.entry.js +15 -2
- package/dist/dropi-ui/dropi-logo.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-lottie-loader.entry.js +4 -1
- package/dist/dropi-ui/dropi-lottie-loader.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-media-player.entry.js +10 -4
- package/dist/dropi-ui/dropi-media-player.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-modal.entry.js +22 -12
- package/dist/dropi-ui/dropi-modal.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-navbar.entry.js +6 -3
- package/dist/dropi-ui/dropi-navbar.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-otp-send-code.entry.js +10 -7
- package/dist/dropi-ui/dropi-otp-send-code.entry.js.map +1 -0
- package/dist/dropi-ui/dropi-paginator.entry.js +70 -0
- package/dist/dropi-ui/dropi-paginator.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-phone-input.entry.js +7 -4
- package/dist/dropi-ui/dropi-phone-input.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-radio-button.entry.js +5 -2
- package/dist/dropi-ui/dropi-radio-button.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-radio-selection-list.entry.js +6 -3
- package/dist/dropi-ui/dropi-radio-selection-list.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-read-more.entry.js +5 -2
- package/dist/dropi-ui/dropi-read-more.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-search.entry.js +6 -3
- package/dist/dropi-ui/dropi-search.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-select.entry.js +9 -2
- package/dist/dropi-ui/dropi-select.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-sidebar.entry.js +5 -2
- package/dist/dropi-ui/dropi-sidebar.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-simple-stepper.entry.js +5 -2
- package/dist/dropi-ui/dropi-simple-stepper.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-skeleton.entry.js +5 -2
- package/dist/dropi-ui/dropi-skeleton.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-steps.entry.js +5 -2
- package/dist/dropi-ui/dropi-steps.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-switch.entry.js +5 -2
- package/dist/dropi-ui/dropi-switch.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-table.entry.js +17 -7
- package/dist/dropi-ui/dropi-table.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-tabs.entry.js +5 -2
- package/dist/dropi-ui/dropi-tabs.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-tag-type-product.entry.js +5 -2
- package/dist/dropi-ui/dropi-tag-type-product.entry.js.map +1 -0
- package/dist/dropi-ui/dropi-tag.entry.js +69 -0
- package/dist/dropi-ui/dropi-tag.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-text-area.entry.js +6 -3
- package/dist/dropi-ui/dropi-text-area.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-time-line.entry.js +5 -2
- package/dist/dropi-ui/dropi-time-line.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-toast.entry.js +9 -5
- package/dist/dropi-ui/dropi-toast.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-tooltip-v2.entry.js +6 -3
- package/dist/dropi-ui/dropi-tooltip-v2.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-tooltip.entry.js +5 -2
- package/dist/dropi-ui/dropi-tooltip.entry.js.map +1 -0
- package/dist/dropi-ui/dropi-ui.css +311 -1
- package/dist/dropi-ui/dropi-ui.esm.js +50 -1
- package/dist/dropi-ui/dropi-ui.esm.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-vertical-steps.entry.js +5 -2
- package/dist/dropi-ui/dropi-vertical-steps.entry.js.map +1 -0
- package/dist/{esm → dropi-ui}/dropi-youtube-lazy-video.entry.js +5 -2
- package/dist/dropi-ui/dropi-youtube-lazy-video.entry.js.map +1 -0
- package/dist/dropi-ui/index-Cvp2LQOM.js +4585 -0
- package/dist/dropi-ui/index-Cvp2LQOM.js.map +1 -0
- package/dist/dropi-ui/index.esm.js +4 -0
- package/dist/dropi-ui/index.esm.js.map +1 -0
- package/dist/types/components/dropi-alert-modal/dropi-alert-modal.d.ts +1 -1
- package/dist/types/components/dropi-banner-external/dropi-banner-external.d.ts +2 -0
- package/dist/types/components/dropi-carousel/dropi-carousel.d.ts +3 -3
- package/dist/types/components/dropi-drawer/dropi-drawer.d.ts +2 -2
- package/dist/types/components/dropi-icon/dropi-icon.d.ts +3 -1
- package/dist/types/components/dropi-image-overlay/dropi-image-overlay.d.ts +1 -1
- package/dist/types/components/dropi-input/dropi-input.d.ts +2 -2
- package/dist/types/components/dropi-logo/dropi-logo.d.ts +2 -0
- package/dist/types/components/dropi-modal/dropi-modal.d.ts +2 -2
- package/dist/types/components/dropi-table/dropi-table.d.ts +2 -0
- package/dist/types/components.d.ts +37 -37
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +30455 -0
- package/hydrate/index.mjs +30445 -0
- package/hydrate/package.json +12 -0
- package/package.json +9 -3
- package/readme.md +45 -13
- package/scripts/setup.js +193 -8
- package/dist/cjs/dropi-accordion-item.cjs.entry.js +0 -54
- package/dist/cjs/dropi-accordion.cjs.entry.js +0 -19
- package/dist/cjs/dropi-alert-legacy.cjs.entry.js +0 -39
- package/dist/cjs/dropi-alert-modal.cjs.entry.js +0 -128
- package/dist/cjs/dropi-alert.cjs.entry.js +0 -64
- package/dist/cjs/dropi-avatars.cjs.entry.js +0 -31
- package/dist/cjs/dropi-badge-legacy.cjs.entry.js +0 -30
- package/dist/cjs/dropi-badge.cjs.entry.js +0 -37
- package/dist/cjs/dropi-banner-external.cjs.entry.js +0 -53
- package/dist/cjs/dropi-breadcrumb.cjs.entry.js +0 -48
- package/dist/cjs/dropi-button.cjs.entry.js +0 -87
- package/dist/cjs/dropi-card-checkbox.cjs.entry.js +0 -48
- package/dist/cjs/dropi-card-product.cjs.entry.js +0 -76
- package/dist/cjs/dropi-card-section.cjs.entry.js +0 -38
- package/dist/cjs/dropi-carousel.cjs.entry.js +0 -148
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +0 -73
- package/dist/cjs/dropi-checkbox.cjs.entry.js +0 -36
- package/dist/cjs/dropi-chips.cjs.entry.js +0 -30
- package/dist/cjs/dropi-city-selector.cjs.entry.js +0 -96
- package/dist/cjs/dropi-color-picker.cjs.entry.js +0 -319
- package/dist/cjs/dropi-country-flags.cjs.entry.js +0 -37
- package/dist/cjs/dropi-country-selector.cjs.entry.js +0 -197
- package/dist/cjs/dropi-date-picker-range.cjs.entry.js +0 -115
- package/dist/cjs/dropi-date-picker.cjs.entry.js +0 -223
- package/dist/cjs/dropi-drawer.cjs.entry.js +0 -76
- package/dist/cjs/dropi-dropdown.cjs.entry.js +0 -65
- package/dist/cjs/dropi-empty-state.cjs.entry.js +0 -36
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +0 -27
- package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +0 -75
- package/dist/cjs/dropi-file-upload.cjs.entry.js +0 -236
- package/dist/cjs/dropi-icon.cjs.entry.js +0 -50
- package/dist/cjs/dropi-ilustration-icon.cjs.entry.js +0 -39
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +0 -44
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +0 -62
- package/dist/cjs/dropi-input_3.cjs.entry.js +0 -390
- package/dist/cjs/dropi-languages-selector.cjs.entry.js +0 -57
- package/dist/cjs/dropi-logo.cjs.entry.js +0 -27
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +0 -27
- package/dist/cjs/dropi-media-player.cjs.entry.js +0 -189
- package/dist/cjs/dropi-modal.cjs.entry.js +0 -135
- package/dist/cjs/dropi-navbar.cjs.entry.js +0 -54
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +0 -92
- package/dist/cjs/dropi-phone-input.cjs.entry.js +0 -197
- package/dist/cjs/dropi-radio-button.cjs.entry.js +0 -47
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +0 -60
- package/dist/cjs/dropi-read-more.cjs.entry.js +0 -40
- package/dist/cjs/dropi-search.cjs.entry.js +0 -124
- package/dist/cjs/dropi-select.cjs.entry.js +0 -378
- package/dist/cjs/dropi-sidebar.cjs.entry.js +0 -78
- package/dist/cjs/dropi-simple-stepper.cjs.entry.js +0 -53
- package/dist/cjs/dropi-skeleton.cjs.entry.js +0 -57
- package/dist/cjs/dropi-steps.cjs.entry.js +0 -52
- package/dist/cjs/dropi-switch.cjs.entry.js +0 -30
- package/dist/cjs/dropi-table.cjs.entry.js +0 -292
- package/dist/cjs/dropi-tabs.cjs.entry.js +0 -51
- package/dist/cjs/dropi-tag-type-product.cjs.entry.js +0 -19
- package/dist/cjs/dropi-text-area.cjs.entry.js +0 -134
- package/dist/cjs/dropi-time-line.cjs.entry.js +0 -34
- package/dist/cjs/dropi-toast.cjs.entry.js +0 -55
- package/dist/cjs/dropi-tooltip-v2.cjs.entry.js +0 -131
- package/dist/cjs/dropi-tooltip.cjs.entry.js +0 -21
- package/dist/cjs/dropi-ui.cjs.js +0 -24
- package/dist/cjs/dropi-vertical-steps.cjs.entry.js +0 -55
- package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +0 -33
- package/dist/cjs/index-077kM98l.js +0 -1746
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -12
- package/dist/collection/assets/icons/symbol/svg/sprite.css.svg +0 -1
- package/dist/collection/collection-manifest.json +0 -77
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.css +0 -45
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.js +0 -172
- package/dist/collection/components/dropi-accordion/dropi-accordion.css +0 -21
- package/dist/collection/components/dropi-accordion/dropi-accordion.js +0 -48
- package/dist/collection/components/dropi-alert/dropi-alert.css +0 -134
- package/dist/collection/components/dropi-alert/dropi-alert.js +0 -371
- package/dist/collection/components/dropi-alert-legacy/dropi-alert-legacy.css +0 -31
- package/dist/collection/components/dropi-alert-legacy/dropi-alert-legacy.js +0 -128
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.css +0 -96
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.js +0 -526
- package/dist/collection/components/dropi-avatars/dropi-avatars.css +0 -55
- package/dist/collection/components/dropi-avatars/dropi-avatars.js +0 -126
- package/dist/collection/components/dropi-badge/dropi-badge.css +0 -41
- package/dist/collection/components/dropi-badge/dropi-badge.js +0 -71
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.css +0 -17
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.js +0 -119
- package/dist/collection/components/dropi-banner-external/dropi-banner-external.css +0 -56
- package/dist/collection/components/dropi-banner-external/dropi-banner-external.js +0 -243
- package/dist/collection/components/dropi-breadcrumb/dropi-breadcrumb.css +0 -69
- package/dist/collection/components/dropi-breadcrumb/dropi-breadcrumb.js +0 -171
- package/dist/collection/components/dropi-button/dropi-button.css +0 -177
- package/dist/collection/components/dropi-button/dropi-button.js +0 -323
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.css +0 -92
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.js +0 -222
- package/dist/collection/components/dropi-card-product/dropi-card-product.css +0 -235
- package/dist/collection/components/dropi-card-product/dropi-card-product.js +0 -384
- package/dist/collection/components/dropi-card-section/dropi-card-section.css +0 -42
- package/dist/collection/components/dropi-card-section/dropi-card-section.js +0 -178
- package/dist/collection/components/dropi-carousel/dropi-carousel.css +0 -148
- package/dist/collection/components/dropi-carousel/dropi-carousel.js +0 -374
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.css +0 -47
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +0 -103
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.css +0 -44
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.js +0 -267
- package/dist/collection/components/dropi-chips/dropi-chips.css +0 -68
- package/dist/collection/components/dropi-chips/dropi-chips.js +0 -169
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.css +0 -218
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.js +0 -234
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.css +0 -210
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.js +0 -393
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.css +0 -30
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.js +0 -129
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.css +0 -211
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +0 -429
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.css +0 -215
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +0 -516
- package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.css +0 -143
- package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.js +0 -327
- package/dist/collection/components/dropi-drawer/dropi-drawer.css +0 -129
- package/dist/collection/components/dropi-drawer/dropi-drawer.js +0 -284
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.css +0 -51
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.js +0 -209
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.css +0 -59
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +0 -222
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.css +0 -24
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +0 -78
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.css +0 -464
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.js +0 -516
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.css +0 -115
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.js +0 -256
- package/dist/collection/components/dropi-icon/dropi-icon.css +0 -21
- package/dist/collection/components/dropi-icon/dropi-icon.js +0 -142
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.css +0 -91
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.js +0 -150
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.css +0 -45
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +0 -150
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.css +0 -127
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.js +0 -155
- package/dist/collection/components/dropi-input/dropi-input.css +0 -185
- package/dist/collection/components/dropi-input/dropi-input.js +0 -806
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.css +0 -79
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.js +0 -154
- package/dist/collection/components/dropi-logo/dropi-logo.css +0 -26
- package/dist/collection/components/dropi-logo/dropi-logo.js +0 -96
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.css +0 -56
- package/dist/collection/components/dropi-lottie-loader/dropi-lottie-loader.js +0 -116
- package/dist/collection/components/dropi-media-player/dropi-media-player.css +0 -320
- package/dist/collection/components/dropi-media-player/dropi-media-player.js +0 -391
- package/dist/collection/components/dropi-modal/dropi-modal.css +0 -140
- package/dist/collection/components/dropi-modal/dropi-modal.js +0 -688
- package/dist/collection/components/dropi-navbar/dropi-navbar.css +0 -166
- package/dist/collection/components/dropi-navbar/dropi-navbar.js +0 -302
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.css +0 -67
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +0 -221
- package/dist/collection/components/dropi-paginator/dropi-paginator.css +0 -103
- package/dist/collection/components/dropi-paginator/dropi-paginator.js +0 -215
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.css +0 -209
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +0 -442
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.css +0 -62
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +0 -174
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.css +0 -64
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.js +0 -259
- package/dist/collection/components/dropi-read-more/dropi-read-more.css +0 -25
- package/dist/collection/components/dropi-read-more/dropi-read-more.js +0 -154
- package/dist/collection/components/dropi-search/dropi-search.css +0 -112
- package/dist/collection/components/dropi-search/dropi-search.js +0 -526
- package/dist/collection/components/dropi-select/dropi-select.css +0 -366
- package/dist/collection/components/dropi-select/dropi-select.js +0 -1014
- package/dist/collection/components/dropi-select/select.types.js +0 -1
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.css +0 -76
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.js +0 -143
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.css +0 -94
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.js +0 -194
- package/dist/collection/components/dropi-skeleton/dropi-skeleton.css +0 -27
- package/dist/collection/components/dropi-skeleton/dropi-skeleton.js +0 -192
- package/dist/collection/components/dropi-steps/dropi-steps.css +0 -95
- package/dist/collection/components/dropi-steps/dropi-steps.js +0 -173
- package/dist/collection/components/dropi-switch/dropi-switch.css +0 -57
- package/dist/collection/components/dropi-switch/dropi-switch.js +0 -96
- package/dist/collection/components/dropi-table/dropi-table.css +0 -540
- package/dist/collection/components/dropi-table/dropi-table.js +0 -966
- package/dist/collection/components/dropi-tabs/dropi-tabs.css +0 -47
- package/dist/collection/components/dropi-tabs/dropi-tabs.js +0 -181
- package/dist/collection/components/dropi-tag/dropi-tag.css +0 -39
- package/dist/collection/components/dropi-tag/dropi-tag.js +0 -190
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.css +0 -14
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.js +0 -48
- package/dist/collection/components/dropi-text-area/dropi-text-area.css +0 -100
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +0 -512
- package/dist/collection/components/dropi-time-line/dropi-time-line.css +0 -108
- package/dist/collection/components/dropi-time-line/dropi-time-line.js +0 -69
- package/dist/collection/components/dropi-toast/dropi-toast.css +0 -63
- package/dist/collection/components/dropi-toast/dropi-toast.js +0 -164
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.css +0 -32
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +0 -70
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.css +0 -67
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.js +0 -468
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.css +0 -95
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.js +0 -167
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.css +0 -73
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.js +0 -110
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/utils.js +0 -3
- package/dist/collection/utils/utils.unit.test.js +0 -16
- package/dist/components/dropi-accordion-item.js +0 -1
- package/dist/components/dropi-accordion.js +0 -1
- package/dist/components/dropi-alert-legacy.js +0 -1
- package/dist/components/dropi-alert-modal.js +0 -1
- package/dist/components/dropi-alert.js +0 -1
- package/dist/components/dropi-avatars.js +0 -1
- package/dist/components/dropi-badge-legacy.js +0 -1
- package/dist/components/dropi-badge.js +0 -1
- package/dist/components/dropi-banner-external.js +0 -1
- package/dist/components/dropi-breadcrumb.js +0 -1
- package/dist/components/dropi-button.js +0 -1
- package/dist/components/dropi-card-checkbox.js +0 -1
- package/dist/components/dropi-card-product.js +0 -1
- package/dist/components/dropi-card-section.js +0 -1
- package/dist/components/dropi-carousel.js +0 -1
- package/dist/components/dropi-checkbox-selection-list.js +0 -1
- package/dist/components/dropi-checkbox.js +0 -1
- package/dist/components/dropi-chips.js +0 -1
- package/dist/components/dropi-city-selector.js +0 -1
- package/dist/components/dropi-color-picker.js +0 -1
- package/dist/components/dropi-country-flags.js +0 -1
- package/dist/components/dropi-country-selector.js +0 -1
- package/dist/components/dropi-date-picker-range.js +0 -1
- package/dist/components/dropi-date-picker.js +0 -1
- package/dist/components/dropi-drawer.js +0 -1
- package/dist/components/dropi-dropdown.js +0 -1
- package/dist/components/dropi-empty-state.js +0 -1
- package/dist/components/dropi-favorite-button.js +0 -1
- package/dist/components/dropi-file-upload-progress-bar.js +0 -1
- package/dist/components/dropi-file-upload.js +0 -1
- package/dist/components/dropi-icon.js +0 -1
- package/dist/components/dropi-ilustration-icon.js +0 -1
- package/dist/components/dropi-image-miniature.js +0 -1
- package/dist/components/dropi-image-overlay.js +0 -1
- package/dist/components/dropi-input.js +0 -1
- package/dist/components/dropi-languages-selector.js +0 -1
- package/dist/components/dropi-logo.js +0 -1
- package/dist/components/dropi-lottie-loader.js +0 -1
- package/dist/components/dropi-media-player.js +0 -1
- package/dist/components/dropi-modal.js +0 -1
- package/dist/components/dropi-navbar.js +0 -1
- package/dist/components/dropi-otp-send-code.js +0 -1
- package/dist/components/dropi-paginator.js +0 -1
- package/dist/components/dropi-phone-input.js +0 -1
- package/dist/components/dropi-radio-button.js +0 -1
- package/dist/components/dropi-radio-selection-list.js +0 -1
- package/dist/components/dropi-read-more.js +0 -1
- package/dist/components/dropi-search.js +0 -1
- package/dist/components/dropi-select.js +0 -1
- package/dist/components/dropi-sidebar.js +0 -1
- package/dist/components/dropi-simple-stepper.js +0 -1
- package/dist/components/dropi-skeleton.js +0 -1
- package/dist/components/dropi-steps.js +0 -1
- package/dist/components/dropi-switch.js +0 -1
- package/dist/components/dropi-table.js +0 -1
- package/dist/components/dropi-tabs.js +0 -1
- package/dist/components/dropi-tag-type-product.js +0 -1
- package/dist/components/dropi-tag.js +0 -1
- package/dist/components/dropi-text-area.js +0 -1
- package/dist/components/dropi-time-line.js +0 -1
- package/dist/components/dropi-toast.js +0 -1
- package/dist/components/dropi-tooltip-v2.js +0 -1
- package/dist/components/dropi-tooltip.js +0 -1
- package/dist/components/dropi-vertical-steps.js +0 -1
- package/dist/components/dropi-youtube-lazy-video.js +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/p-9KLpSviZ.js +0 -1
- package/dist/components/p-BVekazGL.js +0 -1
- package/dist/components/p-BYRcOZS4.js +0 -1
- package/dist/components/p-BuDg1d0S.js +0 -1
- package/dist/components/p-C2paYEIp.js +0 -1
- package/dist/components/p-CDvkvedb.js +0 -1
- package/dist/components/p-CnALA9z_.js +0 -1
- package/dist/components/p-CtzCJQVR.js +0 -1
- package/dist/components/p-CzHupXu8.js +0 -1
- package/dist/components/p-DWzWYR5X.js +0 -1
- package/dist/components/p-D_Y7tuEH.js +0 -1
- package/dist/components/p-DjO9xpVc.js +0 -1
- package/dist/dropi-ui/p-0966c363.entry.js +0 -1
- package/dist/dropi-ui/p-0c541a53.entry.js +0 -1
- package/dist/dropi-ui/p-0cd1fb7a.entry.js +0 -1
- package/dist/dropi-ui/p-0f161461.entry.js +0 -1
- package/dist/dropi-ui/p-10e363a2.entry.js +0 -1
- package/dist/dropi-ui/p-1d4c5364.entry.js +0 -1
- package/dist/dropi-ui/p-2e0623ba.entry.js +0 -1
- package/dist/dropi-ui/p-2e4efb72.entry.js +0 -1
- package/dist/dropi-ui/p-36cdd4fc.entry.js +0 -1
- package/dist/dropi-ui/p-37c86c74.entry.js +0 -1
- package/dist/dropi-ui/p-392654b7.entry.js +0 -1
- package/dist/dropi-ui/p-39904430.entry.js +0 -1
- package/dist/dropi-ui/p-3a3b778f.entry.js +0 -1
- package/dist/dropi-ui/p-3cbe953f.entry.js +0 -1
- package/dist/dropi-ui/p-40b69ccd.entry.js +0 -1
- package/dist/dropi-ui/p-443ed5bd.entry.js +0 -1
- package/dist/dropi-ui/p-475a16f2.entry.js +0 -1
- package/dist/dropi-ui/p-4967b619.entry.js +0 -1
- package/dist/dropi-ui/p-4de83790.entry.js +0 -1
- package/dist/dropi-ui/p-59188dd5.entry.js +0 -1
- package/dist/dropi-ui/p-6178190b.entry.js +0 -1
- package/dist/dropi-ui/p-623759eb.entry.js +0 -1
- package/dist/dropi-ui/p-645da978.entry.js +0 -1
- package/dist/dropi-ui/p-6e727fb0.entry.js +0 -1
- package/dist/dropi-ui/p-7036c073.entry.js +0 -1
- package/dist/dropi-ui/p-710312bd.entry.js +0 -1
- package/dist/dropi-ui/p-74dfe8d1.entry.js +0 -1
- package/dist/dropi-ui/p-770afae3.entry.js +0 -1
- package/dist/dropi-ui/p-7c0bc6dd.entry.js +0 -1
- package/dist/dropi-ui/p-7f8d3642.entry.js +0 -1
- package/dist/dropi-ui/p-7fc02d98.entry.js +0 -1
- package/dist/dropi-ui/p-8188cca4.entry.js +0 -1
- package/dist/dropi-ui/p-858bedcf.entry.js +0 -1
- package/dist/dropi-ui/p-87e9ba6d.entry.js +0 -1
- package/dist/dropi-ui/p-8b4d4d2d.entry.js +0 -1
- package/dist/dropi-ui/p-9062f0de.entry.js +0 -1
- package/dist/dropi-ui/p-925852b1.entry.js +0 -1
- package/dist/dropi-ui/p-99943b7d.entry.js +0 -1
- package/dist/dropi-ui/p-TXz_09YZ.js +0 -2
- package/dist/dropi-ui/p-a1f2383d.entry.js +0 -1
- package/dist/dropi-ui/p-a6939701.entry.js +0 -1
- package/dist/dropi-ui/p-aa8d2aec.entry.js +0 -1
- package/dist/dropi-ui/p-aafaffa3.entry.js +0 -1
- package/dist/dropi-ui/p-ac345a0e.entry.js +0 -1
- package/dist/dropi-ui/p-acfa17ef.entry.js +0 -1
- package/dist/dropi-ui/p-af3691a0.entry.js +0 -1
- package/dist/dropi-ui/p-b207fc92.entry.js +0 -1
- package/dist/dropi-ui/p-ba3ad28e.entry.js +0 -1
- package/dist/dropi-ui/p-bd0ffb4a.entry.js +0 -1
- package/dist/dropi-ui/p-c2e96728.entry.js +0 -1
- package/dist/dropi-ui/p-c664f99f.entry.js +0 -1
- package/dist/dropi-ui/p-c7e3a5e0.entry.js +0 -1
- package/dist/dropi-ui/p-cfc19ca0.entry.js +0 -1
- package/dist/dropi-ui/p-d36a0c37.entry.js +0 -1
- package/dist/dropi-ui/p-dd4c6b40.entry.js +0 -1
- package/dist/dropi-ui/p-e0351b61.entry.js +0 -1
- package/dist/dropi-ui/p-e2361547.entry.js +0 -1
- package/dist/dropi-ui/p-e25b2680.entry.js +0 -1
- package/dist/dropi-ui/p-e6943d7c.entry.js +0 -1
- package/dist/dropi-ui/p-e7b59811.entry.js +0 -1
- package/dist/dropi-ui/p-eac7777f.entry.js +0 -1
- package/dist/dropi-ui/p-ed94b5fe.entry.js +0 -1
- package/dist/dropi-ui/p-f0ddf569.entry.js +0 -1
- package/dist/dropi-ui/p-f95c11f8.entry.js +0 -1
- package/dist/esm/dropi-icon.entry.js +0 -48
- package/dist/esm/dropi-ui.js +0 -20
- package/dist/esm/index-TXz_09YZ.js +0 -1737
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -10
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropi/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Dropi Design System — Web Components for Angular, React and Vue",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -28,10 +28,16 @@
|
|
|
28
28
|
"import": "./dist/dropi-ui/*.js",
|
|
29
29
|
"require": "./dist/dropi-ui/*.js"
|
|
30
30
|
},
|
|
31
|
-
"./dist/dropi-ui/dropi-ui.css": "./dist/dropi-ui/dropi-ui.css"
|
|
31
|
+
"./dist/dropi-ui/dropi-ui.css": "./dist/dropi-ui/dropi-ui.css",
|
|
32
|
+
"./hydrate": {
|
|
33
|
+
"import": "./hydrate/index.mjs",
|
|
34
|
+
"require": "./hydrate/index.js",
|
|
35
|
+
"types": "./hydrate/index.d.ts"
|
|
36
|
+
}
|
|
32
37
|
},
|
|
33
38
|
"files": [
|
|
34
39
|
"dist/",
|
|
40
|
+
"hydrate/",
|
|
35
41
|
"loader/",
|
|
36
42
|
"assets/",
|
|
37
43
|
"skills/",
|
|
@@ -60,7 +66,7 @@
|
|
|
60
66
|
"devDependencies": {
|
|
61
67
|
"@stencil/angular-output-target": "^1.3.0",
|
|
62
68
|
"@stencil/core": "^4.27.1",
|
|
63
|
-
"@stencil/react-output-target": "^1.
|
|
69
|
+
"@stencil/react-output-target": "^1.5.0",
|
|
64
70
|
"@stencil/vitest": "^1.8.3",
|
|
65
71
|
"@stencil/vue-output-target": "^0.13.1",
|
|
66
72
|
"@storybook/addon-docs": "^8.6.18",
|
package/readme.md
CHANGED
|
@@ -10,18 +10,13 @@ Genera componentes reutilizables para Angular, React y Vue desde una única base
|
|
|
10
10
|
|
|
11
11
|
## ⚡ Quick Start (Recomendado)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Ejecuta este comando en la raíz de tu proyecto:
|
|
14
14
|
|
|
15
|
-
### Con IA (Claude / Cursor / Windsurf)
|
|
16
|
-
Si usas un asistente de IA, simplemente dile:
|
|
17
|
-
> **`/install-dropi-ui`** o **"configura dropi-ui en este proyecto"**
|
|
18
|
-
|
|
19
|
-
### Manual (Terminal)
|
|
20
|
-
Ejecuta el siguiente comando en la raíz de tu proyecto:
|
|
21
15
|
```bash
|
|
22
|
-
npx @dropi/ui
|
|
16
|
+
npx @dropi/create-dropi-ui
|
|
23
17
|
```
|
|
24
|
-
|
|
18
|
+
|
|
19
|
+
Detecta tu framework (Angular, React, Next.js), instala las dependencias correctas e inyecta la configuración automáticamente.
|
|
25
20
|
|
|
26
21
|
---
|
|
27
22
|
|
|
@@ -32,13 +27,50 @@ Si prefieres realizar la configuración paso a paso, consulta la [Guía de Integ
|
|
|
32
27
|
### 1. Paquetes
|
|
33
28
|
| Framework | Paquete a instalar |
|
|
34
29
|
|---|---|
|
|
30
|
+
| Angular | `npm install @dropi/ui @dropi/ui-angular` |
|
|
35
31
|
| React | `npm install @dropi/ui @dropi/ui-react` |
|
|
36
|
-
|
|
|
32
|
+
| Next.js SSR | `npm install @dropi/ui @dropi/ui-react && npm install --save-dev @stencil/ssr` |
|
|
37
33
|
|
|
38
34
|
### 2. Estilos e Iconos
|
|
39
|
-
- **CSS**: Importar `@dropi/ui/dist/dropi-ui/dropi-ui.css
|
|
40
|
-
- **
|
|
41
|
-
|
|
35
|
+
- **CSS**: Importar `@dropi/ui/dist/dropi-ui/dropi-ui.css`.
|
|
36
|
+
- **CSS Resets**: Añade este reset para evitar saltos de layout en los iconos:
|
|
37
|
+
`dropi-icon:not(.hydrated) { width: 20px; height: 20px; display: inline-flex; }`
|
|
38
|
+
- **Registro**: No hace falta llamar `defineCustomElements()`.
|
|
39
|
+
- **SSR (Next.js)**: Configurar `next.config.ts` e importar siempre desde `/next`.
|
|
40
|
+
- **Iconos**: El sprite SVG debe estar en `public/assets/icons/symbol/svg/sprite.css.svg`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🚀 Soporte para Next.js (SSR / Zero Flash)
|
|
47
|
+
|
|
48
|
+
Para habilitar el **Server Side Rendering (SSR)** y eliminar cualquier parpadeo visual, sigue estos pasos:
|
|
49
|
+
|
|
50
|
+
### 1. Configuración de Next.js
|
|
51
|
+
Envuelve tu configuración en el plugin `withStencil`:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// next.config.ts
|
|
55
|
+
import withStencil from "@stencil/ssr/next";
|
|
56
|
+
|
|
57
|
+
export default withStencil({
|
|
58
|
+
from: "@dropi/ui-react",
|
|
59
|
+
module: import("@dropi/ui-react/next"),
|
|
60
|
+
hydrateModule: import("@dropi/ui/hydrate"),
|
|
61
|
+
})(nextConfig);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Configuración del Layout (Crítico)
|
|
65
|
+
Añade `suppressHydrationWarning` al `<body>` en `layout.tsx` para evitar que el DevTools o extensiones rompan la hidratación.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<body suppressHydrationWarning>{children}</body>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 3. Uso de Alias para Props Dinámicas
|
|
72
|
+
En componentes con `"use client"` y props dinámicas, usa un alias en el import para evitar flashes:
|
|
73
|
+
`import { DropiButton as Btn } from "@dropi/ui-react/next"`
|
|
42
74
|
|
|
43
75
|
---
|
|
44
76
|
|
package/scripts/setup.js
CHANGED
|
@@ -52,19 +52,36 @@ async function run() {
|
|
|
52
52
|
|
|
53
53
|
// 1. Detección de Framework
|
|
54
54
|
const hasDep = (name) => !!(pkg.dependencies?.[name] || pkg.devDependencies?.[name]);
|
|
55
|
+
const isNextJs = hasDep('next');
|
|
55
56
|
const isAngular = hasDep('@angular/core');
|
|
56
|
-
const isReact = hasDep('react');
|
|
57
|
+
const isReact = hasDep('react') && !isNextJs; // React puro (Vite/CRA), no Next.js
|
|
57
58
|
const isVue = hasDep('vue');
|
|
58
|
-
const framework = isAngular ? 'Angular' : isReact ? 'React' : isVue ? 'Vue' : 'Desconocido';
|
|
59
|
+
const framework = isAngular ? 'Angular' : isNextJs ? 'Next.js' : isReact ? 'React' : isVue ? 'Vue' : 'Desconocido';
|
|
59
60
|
|
|
60
61
|
log(`Entorno detectado: ${framework}`);
|
|
61
62
|
|
|
63
|
+
// Next.js — detectar si usa SSR
|
|
64
|
+
let isNextJsSsr = false;
|
|
65
|
+
if (isNextJs) {
|
|
66
|
+
const nextConfigFiles = ['next.config.ts', 'next.config.js', 'next.config.mjs'];
|
|
67
|
+
const hasStaticExport = nextConfigFiles.some(f => {
|
|
68
|
+
const p = path.join(projectRoot, f);
|
|
69
|
+
if (!fs.existsSync(p)) return false;
|
|
70
|
+
const c = fs.readFileSync(p, 'utf8');
|
|
71
|
+
return c.includes('output') && c.includes('export');
|
|
72
|
+
});
|
|
73
|
+
const hasAppRouter = fs.existsSync(path.join(projectRoot, 'app')) || fs.existsSync(path.join(projectRoot, 'src', 'app'));
|
|
74
|
+
const hasPagesRouter = fs.existsSync(path.join(projectRoot, 'pages')) || fs.existsSync(path.join(projectRoot, 'src', 'pages'));
|
|
75
|
+
isNextJsSsr = (hasAppRouter || hasPagesRouter) && !hasStaticExport;
|
|
76
|
+
log(`Next.js SSR: ${isNextJsSsr ? 'activo' : 'static export (sin SSR)'}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
62
79
|
// 2. Instalación de Dependencias
|
|
63
80
|
const pkgMgr = getPkgMgr();
|
|
64
81
|
const installCmd = pkgMgr === 'yarn' ? 'yarn add' : pkgMgr === 'pnpm' ? 'pnpm add' : 'npm install';
|
|
65
82
|
|
|
66
|
-
if (isReact && !hasDep('@dropi/ui-react')) {
|
|
67
|
-
log(`
|
|
83
|
+
if ((isReact || isNextJs) && !hasDep('@dropi/ui-react')) {
|
|
84
|
+
log(`Instalando @dropi/ui-react...`);
|
|
68
85
|
try {
|
|
69
86
|
execSync(`${installCmd} @dropi/ui-react`, { stdio: 'inherit', cwd: projectRoot });
|
|
70
87
|
log('@dropi/ui-react instalado.', 'ok');
|
|
@@ -73,10 +90,178 @@ async function run() {
|
|
|
73
90
|
}
|
|
74
91
|
}
|
|
75
92
|
|
|
93
|
+
if (isNextJsSsr && !hasDep('@stencil/ssr')) {
|
|
94
|
+
log('Next.js SSR → Instalando @stencil/ssr...');
|
|
95
|
+
try {
|
|
96
|
+
execSync(`${installCmd} --save-dev @stencil/ssr`, { stdio: 'inherit', cwd: projectRoot });
|
|
97
|
+
log('@stencil/ssr instalado.', 'ok');
|
|
98
|
+
} catch (e) {
|
|
99
|
+
log('Error instalando @stencil/ssr. Intenta instalarlo manualmente.', 'warn');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
76
103
|
// 3. Estilos Globales
|
|
77
104
|
const cssImport = "import '@dropi/ui/dist/dropi-ui/dropi-ui.css';";
|
|
78
105
|
let styleTarget = null;
|
|
79
106
|
|
|
107
|
+
// ── Next.js: next.config + globals.css ──────────────────────────────────────
|
|
108
|
+
if (isNextJs) {
|
|
109
|
+
// 3a. next.config — agregar withStencil + transpilePackages
|
|
110
|
+
const nextConfigFiles = ['next.config.ts', 'next.config.js', 'next.config.mjs'];
|
|
111
|
+
const nextConfigFile = nextConfigFiles.find(f => fs.existsSync(path.join(projectRoot, f)));
|
|
112
|
+
|
|
113
|
+
if (isNextJsSsr) {
|
|
114
|
+
if (nextConfigFile) {
|
|
115
|
+
const configPath = path.join(projectRoot, nextConfigFile);
|
|
116
|
+
let cfg = fs.readFileSync(configPath, 'utf8');
|
|
117
|
+
let cfgChanged = false;
|
|
118
|
+
|
|
119
|
+
if (!cfg.includes('withStencil')) {
|
|
120
|
+
// Agregar import de withStencil después del último import existente
|
|
121
|
+
const importLine = "import withStencil from '@stencil/ssr/next';\n";
|
|
122
|
+
const lastImport = [...cfg.matchAll(/^import .+;?\s*$/gm)].pop();
|
|
123
|
+
if (lastImport) {
|
|
124
|
+
const pos = lastImport.index + lastImport[0].length;
|
|
125
|
+
cfg = cfg.slice(0, pos) + '\n' + importLine + cfg.slice(pos);
|
|
126
|
+
} else {
|
|
127
|
+
cfg = importLine + cfg;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Envolver el export default con withStencil
|
|
131
|
+
cfg = cfg.replace(
|
|
132
|
+
/export default (nextConfig|defineNextConfig\([^)]*\));?/,
|
|
133
|
+
`export default withStencil({\n from: '@dropi/ui-react',\n module: import('@dropi/ui-react/next'),\n hydrateModule: import('@dropi/ui/hydrate'),\n})($1);`
|
|
134
|
+
);
|
|
135
|
+
cfgChanged = true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Agregar transpilePackages si no está
|
|
139
|
+
if (!cfg.includes('transpilePackages')) {
|
|
140
|
+
cfg = cfg.replace(
|
|
141
|
+
/(const nextConfig[^=]*=\s*\{)/,
|
|
142
|
+
`$1\n transpilePackages: ['@dropi/ui-react', '@dropi/ui'],`
|
|
143
|
+
);
|
|
144
|
+
cfgChanged = true;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (cfgChanged) {
|
|
148
|
+
fs.writeFileSync(configPath, cfg);
|
|
149
|
+
log(`${nextConfigFile}: configuración SSR aplicada.`, 'ok');
|
|
150
|
+
} else {
|
|
151
|
+
log(`${nextConfigFile}: ya configurado, omitiendo.`, 'info');
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
// Crear next.config.ts desde cero
|
|
155
|
+
const newCfg = `import type { NextConfig } from 'next';
|
|
156
|
+
import withStencil from '@stencil/ssr/next';
|
|
157
|
+
|
|
158
|
+
const nextConfig: NextConfig = {
|
|
159
|
+
transpilePackages: ['@dropi/ui-react', '@dropi/ui'],
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export default withStencil({
|
|
163
|
+
from: '@dropi/ui-react',
|
|
164
|
+
module: import('@dropi/ui-react/next'),
|
|
165
|
+
hydrateModule: import('@dropi/ui/hydrate'),
|
|
166
|
+
})(nextConfig);
|
|
167
|
+
`;
|
|
168
|
+
fs.writeFileSync(path.join(projectRoot, 'next.config.ts'), newCfg);
|
|
169
|
+
log('next.config.ts creado con configuración SSR.', 'ok');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 3b. globals.css — agregar import + CSS resets SSR
|
|
174
|
+
const cssSsrResets = `
|
|
175
|
+
/* dropi-ui.css sets *{text-align:left} — reset shadow DOM hosts */
|
|
176
|
+
[class*="dropi-"], dropi-button, dropi-badge, dropi-icon, dropi-avatar,
|
|
177
|
+
dropi-input, dropi-select, dropi-modal, dropi-toast, dropi-table,
|
|
178
|
+
dropi-skeleton, dropi-chip, dropi-tag, dropi-checkbox, dropi-radio,
|
|
179
|
+
dropi-dropdown, dropi-card-product, dropi-alert, dropi-banner-external,
|
|
180
|
+
dropi-paginator, dropi-date-picker-range, dropi-file-upload,
|
|
181
|
+
dropi-otp-send-code, dropi-phone-input, dropi-media-player,
|
|
182
|
+
dropi-color-picker, dropi-city-selector, dropi-languages-selector,
|
|
183
|
+
dropi-ilustration-icon, dropi-empty-state, dropi-favorite-button,
|
|
184
|
+
dropi-logo, dropi-avatars {
|
|
185
|
+
text-align: initial;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Prevent invisible flash before hydration completes */
|
|
189
|
+
[class*="dropi-"]:not(.hydrated),
|
|
190
|
+
dropi-banner-external:not(.hydrated),
|
|
191
|
+
dropi-logo:not(.hydrated),
|
|
192
|
+
dropi-carousel:not(.hydrated) {
|
|
193
|
+
visibility: inherit !important;
|
|
194
|
+
opacity: 1 !important;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Reserve space for icons before hydration */
|
|
198
|
+
dropi-icon:not(.hydrated) {
|
|
199
|
+
width: 24px;
|
|
200
|
+
height: 24px;
|
|
201
|
+
display: inline-flex;
|
|
202
|
+
}
|
|
203
|
+
`;
|
|
204
|
+
const globalsCssCandidates = [
|
|
205
|
+
path.join(projectRoot, 'src', 'app', 'globals.css'),
|
|
206
|
+
path.join(projectRoot, 'app', 'globals.css'),
|
|
207
|
+
path.join(projectRoot, 'styles', 'globals.css'),
|
|
208
|
+
path.join(projectRoot, 'src', 'styles', 'globals.css'),
|
|
209
|
+
];
|
|
210
|
+
const globalsCssPath = globalsCssCandidates.find(f => fs.existsSync(f));
|
|
211
|
+
|
|
212
|
+
if (globalsCssPath) {
|
|
213
|
+
let css = fs.readFileSync(globalsCssPath, 'utf8');
|
|
214
|
+
let cssChanged = false;
|
|
215
|
+
if (!css.includes('dropi-ui.css')) {
|
|
216
|
+
css = `@import '@dropi/ui/dist/dropi-ui/dropi-ui.css';\n` + css;
|
|
217
|
+
cssChanged = true;
|
|
218
|
+
}
|
|
219
|
+
if (!css.includes('text-align: initial')) {
|
|
220
|
+
css += cssSsrResets;
|
|
221
|
+
cssChanged = true;
|
|
222
|
+
}
|
|
223
|
+
if (cssChanged) {
|
|
224
|
+
fs.writeFileSync(globalsCssPath, css);
|
|
225
|
+
log(`${path.relative(projectRoot, globalsCssPath)}: estilos y resets SSR aplicados.`, 'ok');
|
|
226
|
+
} else {
|
|
227
|
+
log(`${path.relative(projectRoot, globalsCssPath)}: ya configurado, omitiendo.`, 'info');
|
|
228
|
+
}
|
|
229
|
+
} else {
|
|
230
|
+
// Crear globals.css en src/app/ o app/
|
|
231
|
+
const appDir = fs.existsSync(path.join(projectRoot, 'src', 'app'))
|
|
232
|
+
? path.join(projectRoot, 'src', 'app')
|
|
233
|
+
: path.join(projectRoot, 'app');
|
|
234
|
+
if (fs.existsSync(appDir)) {
|
|
235
|
+
const newCss = `@import '@dropi/ui/dist/dropi-ui/dropi-ui.css';\n${cssSsrResets}`;
|
|
236
|
+
const newCssPath = path.join(appDir, 'globals.css');
|
|
237
|
+
fs.writeFileSync(newCssPath, newCss);
|
|
238
|
+
log('globals.css creado con estilos y resets SSR.', 'ok');
|
|
239
|
+
log('Recuerda importarlo en tu layout.tsx: import "./globals.css"', 'warn');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// 3c. Lottie en layout.tsx (App Router) o _document.tsx (Pages Router)
|
|
244
|
+
const layoutCandidates = [
|
|
245
|
+
path.join(projectRoot, 'src', 'app', 'layout.tsx'),
|
|
246
|
+
path.join(projectRoot, 'app', 'layout.tsx'),
|
|
247
|
+
path.join(projectRoot, 'src', 'app', 'layout.jsx'),
|
|
248
|
+
path.join(projectRoot, 'app', 'layout.jsx'),
|
|
249
|
+
];
|
|
250
|
+
const layoutPath = layoutCandidates.find(f => fs.existsSync(f));
|
|
251
|
+
if (layoutPath) {
|
|
252
|
+
let layout = fs.readFileSync(layoutPath, 'utf8');
|
|
253
|
+
if (!layout.includes('lottie-player.js')) {
|
|
254
|
+
// Agregar script antes del cierre de </body>
|
|
255
|
+
layout = layout.replace(
|
|
256
|
+
/(<\/body>)/,
|
|
257
|
+
` {/* lottie-player: needed by DropiAlertModal animations */}\n <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js" async />\n $1`
|
|
258
|
+
);
|
|
259
|
+
fs.writeFileSync(layoutPath, layout);
|
|
260
|
+
log(`${path.relative(projectRoot, layoutPath)}: Lottie script agregado.`, 'ok');
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
80
265
|
if (isAngular) {
|
|
81
266
|
const scssPath = path.join(projectRoot, 'src', 'styles.scss');
|
|
82
267
|
if (fs.existsSync(scssPath)) {
|
|
@@ -161,10 +346,10 @@ async function run() {
|
|
|
161
346
|
// Archivos Lottie
|
|
162
347
|
setupAsset('assets/lottie-files', 'assets/lottie-files');
|
|
163
348
|
|
|
164
|
-
// 6. Lottie Player Script (index.html)
|
|
349
|
+
// 6. Lottie Player Script (index.html — solo React/Vue/Angular, Next.js lo maneja en layout.tsx arriba)
|
|
165
350
|
const lottieScript = '<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>';
|
|
166
351
|
const htmlFiles = ['index.html', 'src/index.html', 'public/index.html'];
|
|
167
|
-
const htmlFile = htmlFiles.find(f => fs.existsSync(path.join(projectRoot, f)));
|
|
352
|
+
const htmlFile = !isNextJs && htmlFiles.find(f => fs.existsSync(path.join(projectRoot, f)));
|
|
168
353
|
|
|
169
354
|
if (htmlFile) {
|
|
170
355
|
const htmlPath = path.join(projectRoot, htmlFile);
|
|
@@ -180,8 +365,8 @@ async function run() {
|
|
|
180
365
|
}
|
|
181
366
|
}
|
|
182
367
|
|
|
183
|
-
// 7. Vite Patch (React/Vue)
|
|
184
|
-
if (isReact || isVue) {
|
|
368
|
+
// 7. Vite Patch (React/Vue — no Next.js)
|
|
369
|
+
if ((isReact || isVue) && !isNextJs) {
|
|
185
370
|
const viteFiles = ['vite.config.ts', 'vite.config.js'];
|
|
186
371
|
const viteFile = viteFiles.find(f => fs.existsSync(path.join(projectRoot, f)));
|
|
187
372
|
if (viteFile) {
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-077kM98l.js');
|
|
4
|
-
|
|
5
|
-
const dropiAccordionItemCss = () => `:host{display:block;border-bottom:1px solid var(--Gray-Gray-100)}.accordion-header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:16px;background:white;border:none;cursor:pointer;text-align:left}.accordion-header-left{display:flex;align-items:center;gap:8px}.accordion-title{font-size:var(--font-size-m);font-weight:var(--font-weight-semibold);color:var(--Gray-Gray-700)}.accordion-chevron{transition:transform 0.3s ease}.accordion-chevron--open{transform:rotate(180deg)}.accordion-body{overflow:hidden;transition:max-height 0.3s ease-out}.accordion-content{padding:0 16px 16px 16px}`;
|
|
6
|
-
|
|
7
|
-
const DropiAccordionItem = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
get el() { return index.getElement(this); }
|
|
12
|
-
/** The title of the item — matches Angular `sectionTitle` */
|
|
13
|
-
sectionTitle = '';
|
|
14
|
-
/** Index of the item — matches Angular `index` */
|
|
15
|
-
index;
|
|
16
|
-
/** Whether the section is expanded */
|
|
17
|
-
open = false;
|
|
18
|
-
/** Disable toggling */
|
|
19
|
-
disabled = false;
|
|
20
|
-
/** Icon name before title */
|
|
21
|
-
preIcon = '';
|
|
22
|
-
contentHeight = '0px';
|
|
23
|
-
contentRef;
|
|
24
|
-
openChanged(val) {
|
|
25
|
-
this.updateHeight(val);
|
|
26
|
-
}
|
|
27
|
-
componentDidLoad() {
|
|
28
|
-
this.updateHeight(this.open);
|
|
29
|
-
}
|
|
30
|
-
updateHeight(open) {
|
|
31
|
-
if (!this.contentRef)
|
|
32
|
-
return;
|
|
33
|
-
this.contentHeight = open ? `${this.contentRef.scrollHeight}px` : '0px';
|
|
34
|
-
}
|
|
35
|
-
handleToggle() {
|
|
36
|
-
if (this.disabled)
|
|
37
|
-
return;
|
|
38
|
-
// Notify parent if needed, or just toggle locally
|
|
39
|
-
this.el.closest('dropi-accordion');
|
|
40
|
-
this.open = !this.open;
|
|
41
|
-
setTimeout(() => this.updateHeight(this.open), 0);
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return (index.h("div", { key: '33564d4efbb73ae0b3ec0195ebf0afed6b2a6cc0', class: { 'accordion-item': true, 'accordion-item--open': this.open, 'accordion-item--disabled': this.disabled } }, index.h("button", { key: '9a7e7cc044027c4d427a712c5ed352991ef622b7', class: "accordion-header", onClick: () => this.handleToggle(), "aria-expanded": String(this.open), disabled: this.disabled }, index.h("span", { key: '17ffa01872142ab9a959104f884ce5cedada33c2', class: "accordion-header-left" }, this.preIcon && index.h("dropi-icon", { key: '8b02d875239d9ebaa42060e5dc1f4f8c6cfd3081', name: this.preIcon, width: "20px", height: "20px", color: "Gray-Gray-600" }), index.h("span", { key: 'effa37d569bfcbc10774ff2a4a7787868cf83937', class: "accordion-title" }, this.sectionTitle)), index.h("span", { key: '743aa0db06415f8b763099b53d234474c82cb8e6', class: { 'accordion-chevron': true, 'accordion-chevron--open': this.open } }, index.h("dropi-icon", { key: '2d66c4087eddaf3f139a063eadcd8b0fb668045d', name: "Dropdown-down", width: "20px", height: "20px", color: "Gray-Gray-500" }))), index.h("div", { key: '4621aafe6d4592830cdaa32672de357c026a0b14', class: "accordion-body", style: { maxHeight: this.contentHeight }, ref: (el) => this.contentRef = el }, index.h("div", { key: '826b3ad470c9444ae2378e266332959f0f9f3529', class: "accordion-content" }, index.h("slot", { key: '8982c5506ecd1ed3ee44190096848ccbf9638b95' })))));
|
|
45
|
-
}
|
|
46
|
-
static get watchers() { return {
|
|
47
|
-
"open": [{
|
|
48
|
-
"openChanged": 0
|
|
49
|
-
}]
|
|
50
|
-
}; }
|
|
51
|
-
};
|
|
52
|
-
DropiAccordionItem.style = dropiAccordionItemCss();
|
|
53
|
-
|
|
54
|
-
exports.dropi_accordion_item = DropiAccordionItem;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-077kM98l.js');
|
|
4
|
-
|
|
5
|
-
const dropiAccordionCss = () => `:host{display:block;width:100%;margin-bottom:-1px}*,*::before,*::after{box-sizing:border-box}.accordion{border-top:1px solid var(--Gray-Gray-100,#e6eaf2);border-bottom:1px solid var(--Gray-Gray-100,#e6eaf2);overflow:hidden}.accordion-header{width:100%;display:flex;align-items:center;justify-content:space-between;padding:var(--Size-4,16px) var(--Size-5,20px);background:transparent;border:none;cursor:pointer;gap:12px;text-align:left}.accordion-header:disabled{cursor:not-allowed;opacity:0.5}.accordion--open .accordion-header{border-bottom:1px solid var(--Gray-Gray-100,#e6eaf2)}.accordion-header-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.accordion-title{font-size:var(--font-size-m, 16px);font-weight:var(--font-weight-bold,700);color:var(--Gray-Gray-600, #475066);line-height:1.4}.accordion-chevron{display:flex;align-items:center;flex-shrink:0;transition:transform 0.22s ease}.accordion-chevron--open{transform:rotate(180deg)}.accordion-body{max-height:0;overflow:hidden;transition:max-height 0.28s ease}.accordion-content{padding:0 var(--Size-5,20px) var(--Size-4,16px);color:var(--Gray-Gray-600,#475066);font-size:var(--font-size-s,12px);line-height:1.6}`;
|
|
6
|
-
|
|
7
|
-
const DropiAccordion = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
/** Allows multiple sections to be open at the same time. If false, only one section can be open. */
|
|
12
|
-
multiple = false;
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h("div", { key: 'b4d44bde9b982a2e11cc074600f9de9424592fde', class: "accordion-container" }, index.h("slot", { key: '631732f3726d81dac4d188542180a1286c69258b' })));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
DropiAccordion.style = dropiAccordionCss();
|
|
18
|
-
|
|
19
|
-
exports.dropi_accordion = DropiAccordion;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-077kM98l.js');
|
|
4
|
-
|
|
5
|
-
const dropiAlertLegacyCss = () => `:host{display:block;margin:10px 0}.alert-legacy{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-radius:var(--Border-2);font-size:var(--font-size-s)}.alert-legacy--success{background:var(--Success-Success-50);color:var(--Success-Success-700);border:1px solid var(--Success-Success-200)}.alert-legacy--error{background:var(--Error-Error-50);color:var(--Error-Error-700);border:1px solid var(--Error-Error-200)}.alert-legacy--warning{background:var(--Warning-Warning-50);color:var(--Warning-Warning-700);border:1px solid var(--Warning-Warning-200)}.alert-legacy--info{background:var(--Info-Info-50);color:var(--Info-Info-700);border:1px solid var(--Info-Info-200)}.alert-legacy__close{background:transparent;border:none;font-size:20px;cursor:pointer;color:currentColor;opacity:0.6}.alert-legacy__close:hover{opacity:1}`;
|
|
6
|
-
|
|
7
|
-
const DropiAlertLegacy = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
/** Visibility toggle */
|
|
12
|
-
visible = false;
|
|
13
|
-
/** Alert message */
|
|
14
|
-
message = '';
|
|
15
|
-
/** Semantic type: success | error | warning | info */
|
|
16
|
-
type = 'success';
|
|
17
|
-
/** Automatically close after timeout */
|
|
18
|
-
autoClose = false;
|
|
19
|
-
timer;
|
|
20
|
-
componentDidLoad() {
|
|
21
|
-
if (this.autoClose && this.visible) {
|
|
22
|
-
this.startTimer();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
startTimer() {
|
|
26
|
-
clearTimeout(this.timer);
|
|
27
|
-
this.timer = setTimeout(() => {
|
|
28
|
-
this.visible = false;
|
|
29
|
-
}, 7000);
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
if (!this.visible)
|
|
33
|
-
return null;
|
|
34
|
-
return (index.h("div", { class: { 'alert-legacy': true, [`alert-legacy--${this.type}`]: true } }, index.h("div", { class: "alert-legacy__content" }, index.h("span", { class: "alert-legacy__message" }, this.message)), index.h("button", { class: "alert-legacy__close", onClick: () => this.visible = false }, "\u00D7")));
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
DropiAlertLegacy.style = dropiAlertLegacyCss();
|
|
38
|
-
|
|
39
|
-
exports.dropi_alert_legacy = DropiAlertLegacy;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-077kM98l.js');
|
|
4
|
-
|
|
5
|
-
const dropiAlertModalCss = () => `:host{display:contents}.body-alert{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--Size-3);width:100%;flex:1;overflow:hidden;padding-bottom:var(--Size-2)}.lottie-img{width:120px;height:120px;overflow:hidden;flex-shrink:0;align-self:center;margin-top:-8px;margin-bottom:var(--Size-2)}.lottie-img lottie-player{display:block;width:120px;height:120px}.lottie-img--loading{width:100%;height:120px;overflow:hidden;display:flex;align-items:center;justify-content:center}.lottie-img--loading lottie-player{width:300px;height:auto;flex-shrink:0}.content-alert{text-align:center;width:100%;display:flex;flex-direction:column;align-items:center}.content-alert h2{color:var(--Gray-Gray-800);font-size:19px;font-weight:var(--font-weight-semibold);margin:0}.content-alert p{color:var(--Gray-Gray-500);font-size:var(--font-size-s);margin-bottom:var(--Size-2);overflow-wrap:anywhere;max-height:100px;overflow:auto}.actions{display:flex;gap:var(--Size-3);width:100%}.actions dropi-button{flex:1;display:flex;justify-content:center}@media (max-width: 768px){.actions{flex-direction:column}.actions dropi-button{width:100%}}`;
|
|
6
|
-
|
|
7
|
-
const DropiAlertModal = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.primaryButtonEvent = index.createEvent(this, "primaryButtonEvent", 7);
|
|
11
|
-
this.secondaryButtonEvent = index.createEvent(this, "secondaryButtonEvent", 7);
|
|
12
|
-
this.modalOpenChange = index.createEvent(this, "modalOpenChange", 7);
|
|
13
|
-
this.onHide = index.createEvent(this, "onHide", 7);
|
|
14
|
-
}
|
|
15
|
-
/** Controls visibility */
|
|
16
|
-
visible = false;
|
|
17
|
-
/** Modal type — determines Lottie animation */
|
|
18
|
-
type = 'question';
|
|
19
|
-
/** Bold title */
|
|
20
|
-
tittle = '';
|
|
21
|
-
/** Body message */
|
|
22
|
-
message = '';
|
|
23
|
-
/** Primary button label */
|
|
24
|
-
primaryButton = 'Accept';
|
|
25
|
-
/** Secondary button label (hidden if empty) */
|
|
26
|
-
secondaryButton = '';
|
|
27
|
-
/** Show loading state with loading.json Lottie */
|
|
28
|
-
loading = false;
|
|
29
|
-
/** Show close icon in header */
|
|
30
|
-
closable = false;
|
|
31
|
-
/** Hide action buttons */
|
|
32
|
-
displayButtons = true;
|
|
33
|
-
/** Loading title */
|
|
34
|
-
loadingTitle = 'Loading';
|
|
35
|
-
/** Loading message */
|
|
36
|
-
loadingMessage = 'Please wait a moment';
|
|
37
|
-
/**
|
|
38
|
-
* When true, primary button does NOT auto-close the modal (matches Angular `isStep`).
|
|
39
|
-
* Useful for step-by-step flows.
|
|
40
|
-
*/
|
|
41
|
-
isStep = false;
|
|
42
|
-
/** Base z-index for the internal modal overlay (matches Angular `baseZIndex`) */
|
|
43
|
-
baseZIndex = 0;
|
|
44
|
-
/**
|
|
45
|
-
* Convenience object prop — matches Angular `params: ModalParams`.
|
|
46
|
-
* Fields: tittle, type, message, primaryButton, secondaryButton, loadingTitle,
|
|
47
|
-
* loadingMessage, closable, displayButtons.
|
|
48
|
-
* When provided, its values override the corresponding individual props.
|
|
49
|
-
*/
|
|
50
|
-
params = null;
|
|
51
|
-
paramsChanged(val) {
|
|
52
|
-
if (!val)
|
|
53
|
-
return;
|
|
54
|
-
if (val.tittle !== undefined)
|
|
55
|
-
this.tittle = val.tittle;
|
|
56
|
-
if (val.type !== undefined)
|
|
57
|
-
this.type = val.type;
|
|
58
|
-
if (val.message !== undefined)
|
|
59
|
-
this.message = val.message;
|
|
60
|
-
if (val.primaryButton !== undefined)
|
|
61
|
-
this.primaryButton = val.primaryButton;
|
|
62
|
-
if (val.secondaryButton !== undefined)
|
|
63
|
-
this.secondaryButton = val.secondaryButton;
|
|
64
|
-
if (val.loadingTitle !== undefined)
|
|
65
|
-
this.loadingTitle = val.loadingTitle;
|
|
66
|
-
if (val.loadingMessage !== undefined)
|
|
67
|
-
this.loadingMessage = val.loadingMessage;
|
|
68
|
-
if (val.closable !== undefined)
|
|
69
|
-
this.closable = val.closable;
|
|
70
|
-
if (val.displayButtons !== undefined)
|
|
71
|
-
this.displayButtons = val.displayButtons;
|
|
72
|
-
}
|
|
73
|
-
/** Emitted when primary button is clicked — matches Angular 'primaryButtonEvent' */
|
|
74
|
-
primaryButtonEvent;
|
|
75
|
-
/** Emitted when secondary button is clicked — matches Angular 'secondaryButtonEvent' */
|
|
76
|
-
secondaryButtonEvent;
|
|
77
|
-
/** Emitted when modal open state changes — matches Angular 'modalOpenChange' */
|
|
78
|
-
modalOpenChange;
|
|
79
|
-
/** Emitted when modal is hidden — matches Angular 'onHide' */
|
|
80
|
-
onHide;
|
|
81
|
-
lottieMap = {
|
|
82
|
-
question: '/assets/lottie-files/question.json',
|
|
83
|
-
warning: '/assets/lottie-files/warning.json',
|
|
84
|
-
success: '/assets/lottie-files/success.json',
|
|
85
|
-
error: '/assets/lottie-files/failure.json',
|
|
86
|
-
loading: '/assets/lottie-files/loading.json',
|
|
87
|
-
};
|
|
88
|
-
componentWillLoad() {
|
|
89
|
-
if (this.params)
|
|
90
|
-
this.paramsChanged(this.params);
|
|
91
|
-
}
|
|
92
|
-
async show() {
|
|
93
|
-
this.visible = true;
|
|
94
|
-
}
|
|
95
|
-
async hide() {
|
|
96
|
-
this.visible = false;
|
|
97
|
-
}
|
|
98
|
-
handlePrimary() {
|
|
99
|
-
this.primaryButtonEvent.emit(true);
|
|
100
|
-
if (!this.isStep) {
|
|
101
|
-
this.visible = false;
|
|
102
|
-
this.modalOpenChange.emit(false);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
handleSecondary() {
|
|
106
|
-
this.secondaryButtonEvent.emit(true);
|
|
107
|
-
this.visible = false;
|
|
108
|
-
this.modalOpenChange.emit(false);
|
|
109
|
-
}
|
|
110
|
-
onModalHide() {
|
|
111
|
-
this.visible = false;
|
|
112
|
-
this.modalOpenChange.emit(false);
|
|
113
|
-
this.onHide.emit();
|
|
114
|
-
}
|
|
115
|
-
render() {
|
|
116
|
-
const lottieKey = this.loading ? 'loading' : this.type;
|
|
117
|
-
const isLottieLoading = lottieKey === 'loading';
|
|
118
|
-
return (index.h("dropi-modal", { key: '42c41a88060c1039af7f85d518d93e9f5e0e8489', visible: this.visible, showHeader: this.closable, showCloseIcon: this.closable, dismissable: false, closeOnEscape: false, showFooter: false, size: "s", onOnHide: () => this.onModalHide() }, index.h("div", { key: 'e62b897c0b6f8c3bee4f3992e003cb88577708f3', class: "body-alert" }, this.lottieMap[lottieKey] && (index.h("div", { key: '0c1551477bcb926dc610f63a08542f3b8fc71a0d', class: `lottie-img${isLottieLoading ? ' lottie-img--loading' : ''}` }, index.h("lottie-player", { key: lottieKey, src: this.lottieMap[lottieKey], background: "transparent", speed: "1", loop: true, autoplay: true }))), index.h("div", { key: 'b03602610b8ff78b4a7d5e0fcaf4e541d9e7ece6', class: "content-alert" }, index.h("h2", { key: 'c50ea63352df03d49ce0811a97ca02f031e654c9' }, this.loading ? this.loadingTitle : this.tittle), index.h("p", { key: '3f699157283cb48eb3948afede7291d965ae7066' }, this.loading ? this.loadingMessage : this.message)), !this.loading && this.displayButtons && (index.h("div", { key: '7d7c4282a726d82117b13ec23db36dd72b1327d5', class: "actions" }, this.secondaryButton && index.h("dropi-button", { key: '1a766fac9daded57f9b8a38ff3f5d43c7217210d', text: this.secondaryButton, severity: "secondary", onClick: () => this.handleSecondary(), fullWidth: true }), index.h("dropi-button", { key: '8c1053db7b35be9c5ceecd9c50a179f99efa9798', text: this.primaryButton, severity: "primary", onClick: () => this.handlePrimary(), fullWidth: true }))))));
|
|
119
|
-
}
|
|
120
|
-
static get watchers() { return {
|
|
121
|
-
"params": [{
|
|
122
|
-
"paramsChanged": 0
|
|
123
|
-
}]
|
|
124
|
-
}; }
|
|
125
|
-
};
|
|
126
|
-
DropiAlertModal.style = dropiAlertModalCss();
|
|
127
|
-
|
|
128
|
-
exports.dropi_alert_modal = DropiAlertModal;
|