@tarojs/components 4.0.1-alpha.0 → 4.0.1
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/LICENSE +8 -8
- package/README.md +1 -1
- package/dist/cjs/{index-b873e40f.js → index-f6805218.js} +27 -45
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-animation-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-ar-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-aweme-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-channel-live-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-channel-video-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-detail-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-comment-list-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-contact-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-draggable-sheet-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-follow-swan-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-grid-builder-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-grid-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-image-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lifestyle-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-like-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-list-builder-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-list-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-login-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-lottie-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-map-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-match-media-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-nested-scroll-body-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-nested-scroll-header-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-official-account-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-share-element-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-snapshot-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-span-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-sticky-header-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-sticky-section-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -2
- package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tab-item-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +3 -3
- package/dist/cjs/taro-tabs-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-text-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +2 -2
- package/dist/cjs/taro-view-core.cjs.entry.js +3 -3
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/image/style/index.css +1 -1
- package/dist/collection/components/input/style/index.css +1 -1
- package/dist/collection/components/tabbar/style/index.css +1 -1
- package/dist/collection/components/tabbar/tabbar-item.js +1 -1
- package/dist/collection/components/tabbar/tabbar.js +4 -4
- package/dist/collection/components/view/style/index.css +1 -1
- package/dist/components/index2.js +27 -45
- package/dist/components/taro-image-core.js +1 -1
- package/dist/components/taro-input-core.js +1 -1
- package/dist/components/taro-tabbar.js +1 -1
- package/dist/components/taro-view-core.js +1 -1
- package/dist/esm/{index-b9522531.js → index-c3e4004b.js} +27 -45
- package/dist/esm/loader.js +2 -2
- package/dist/esm/taro-ad-core.entry.js +1 -1
- package/dist/esm/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm/taro-animation-video-core.entry.js +1 -1
- package/dist/esm/taro-animation-view-core.entry.js +1 -1
- package/dist/esm/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm/taro-audio-core.entry.js +1 -1
- package/dist/esm/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm/taro-block-core.entry.js +1 -1
- package/dist/esm/taro-button-core.entry.js +2 -2
- package/dist/esm/taro-camera-core.entry.js +1 -1
- package/dist/esm/taro-canvas-core.entry.js +1 -1
- package/dist/esm/taro-channel-live-core.entry.js +1 -1
- package/dist/esm/taro-channel-video-core.entry.js +1 -1
- package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm/taro-comment-list-core.entry.js +1 -1
- package/dist/esm/taro-components.js +2 -2
- package/dist/esm/taro-contact-button-core.entry.js +1 -1
- package/dist/esm/taro-cover-image-core.entry.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +2 -2
- package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm/taro-draggable-sheet-core.entry.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +1 -1
- package/dist/esm/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm/taro-form-core.entry.js +1 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm/taro-grid-builder-core.entry.js +1 -1
- package/dist/esm/taro-grid-view-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +2 -2
- package/dist/esm/taro-image-core.entry.js +3 -3
- package/dist/esm/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +2 -2
- package/dist/esm/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm/taro-label-core.entry.js +1 -1
- package/dist/esm/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm/taro-like-core.entry.js +1 -1
- package/dist/esm/taro-list-builder-core.entry.js +1 -1
- package/dist/esm/taro-list-view-core.entry.js +1 -1
- package/dist/esm/taro-live-player-core.entry.js +1 -1
- package/dist/esm/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm/taro-login-core.entry.js +1 -1
- package/dist/esm/taro-lottie-core.entry.js +1 -1
- package/dist/esm/taro-map-core.entry.js +1 -1
- package/dist/esm/taro-match-media-core.entry.js +1 -1
- package/dist/esm/taro-movable-area-core_2.entry.js +1 -1
- package/dist/esm/taro-native-slot-core.entry.js +1 -1
- package/dist/esm/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm/taro-navigator-core.entry.js +2 -2
- package/dist/esm/taro-nested-scroll-body-core.entry.js +1 -1
- package/dist/esm/taro-nested-scroll-header-core.entry.js +1 -1
- package/dist/esm/taro-official-account-core.entry.js +1 -1
- package/dist/esm/taro-open-container-core.entry.js +1 -1
- package/dist/esm/taro-open-data-core.entry.js +1 -1
- package/dist/esm/taro-page-container-core.entry.js +1 -1
- package/dist/esm/taro-page-meta-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +2 -2
- package/dist/esm/taro-picker-view-column-core_2.entry.js +2 -2
- package/dist/esm/taro-progress-core.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh-core.entry.js +2 -2
- package/dist/esm/taro-radio-core_2.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +1 -1
- package/dist/esm/taro-root-portal-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm/taro-scroll-view-core.entry.js +2 -2
- package/dist/esm/taro-share-element-core.entry.js +1 -1
- package/dist/esm/taro-slider-core.entry.js +1 -1
- package/dist/esm/taro-slot-core.entry.js +1 -1
- package/dist/esm/taro-snapshot-core.entry.js +1 -1
- package/dist/esm/taro-span-core.entry.js +1 -1
- package/dist/esm/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +2 -2
- package/dist/esm/taro-switch-core.entry.js +1 -1
- package/dist/esm/taro-tab-item-core.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +3 -3
- package/dist/esm/taro-tabs-core.entry.js +1 -1
- package/dist/esm/taro-text-core.entry.js +1 -1
- package/dist/esm/taro-textarea-core.entry.js +1 -1
- package/dist/esm/taro-video-control_3.entry.js +2 -2
- package/dist/esm/taro-view-core.entry.js +3 -3
- package/dist/esm/taro-voip-room-core.entry.js +1 -1
- package/dist/esm/taro-web-view-core.entry.js +1 -1
- package/dist/esm-es5/index-c3e4004b.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-animation-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-ar-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-audio-core.entry.js +1 -1
- package/dist/esm-es5/taro-aweme-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-block-core.entry.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-live-core.entry.js +1 -1
- package/dist/esm-es5/taro-channel-video-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-comment-detail-core.entry.js +1 -1
- package/dist/esm-es5/taro-comment-list-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-contact-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
- package/dist/esm-es5/taro-draggable-sheet-core.entry.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -1
- package/dist/esm-es5/taro-follow-swan-core.entry.js +1 -1
- package/dist/esm-es5/taro-form-core.entry.js +1 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-grid-builder-core.entry.js +1 -1
- package/dist/esm-es5/taro-grid-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-inline-payment-panel-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm-es5/taro-label-core.entry.js +1 -1
- package/dist/esm-es5/taro-lifestyle-core.entry.js +1 -1
- package/dist/esm-es5/taro-like-core.entry.js +1 -1
- package/dist/esm-es5/taro-list-builder-core.entry.js +1 -1
- package/dist/esm-es5/taro-list-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm-es5/taro-login-core.entry.js +1 -1
- package/dist/esm-es5/taro-lottie-core.entry.js +1 -1
- package/dist/esm-es5/taro-map-core.entry.js +1 -1
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-area-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-native-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-nested-scroll-body-core.entry.js +1 -1
- package/dist/esm-es5/taro-nested-scroll-header-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-progress-core.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh-core.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-rtc-room-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
- package/dist/esm-es5/taro-slider-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-snapshot-core.entry.js +1 -1
- package/dist/esm-es5/taro-span-core.entry.js +1 -1
- package/dist/esm-es5/taro-sticky-header-core.entry.js +1 -1
- package/dist/esm-es5/taro-sticky-section-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.entry.js +1 -1
- package/dist/esm-es5/taro-tab-item-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-tabs-core.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
- package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
- package/dist/hydrate/index.js +31 -49
- package/dist/taro-components/{p-06adeb65.system.entry.js → p-0044961f.system.entry.js} +1 -1
- package/dist/taro-components/{p-f43f26cf.entry.js → p-0132e803.entry.js} +1 -1
- package/dist/taro-components/{p-fa31b2de.system.entry.js → p-019124ae.system.entry.js} +1 -1
- package/dist/taro-components/{p-5884c108.system.entry.js → p-04f97133.system.entry.js} +1 -1
- package/dist/taro-components/{p-75ded8a0.system.entry.js → p-069ae782.system.entry.js} +1 -1
- package/dist/taro-components/{p-68197378.entry.js → p-0d8a0733.entry.js} +1 -1
- package/dist/taro-components/{p-03dc0283.entry.js → p-0f95be56.entry.js} +1 -1
- package/dist/taro-components/{p-6cc0bcb9.entry.js → p-0fe4660a.entry.js} +1 -1
- package/dist/taro-components/{p-a96f8f60.system.entry.js → p-1087c51a.system.entry.js} +1 -1
- package/dist/taro-components/{p-e5ef41f2.system.entry.js → p-111fadd7.system.entry.js} +1 -1
- package/dist/taro-components/{p-8179438b.system.entry.js → p-11c0dc59.system.entry.js} +1 -1
- package/dist/taro-components/{p-32c0f326.entry.js → p-12b967fd.entry.js} +1 -1
- package/dist/taro-components/{p-dc25fa81.entry.js → p-13bf0192.entry.js} +1 -1
- package/dist/taro-components/{p-f8f2461f.entry.js → p-13e80cf7.entry.js} +1 -1
- package/dist/taro-components/{p-f5f3a111.entry.js → p-15c1ce79.entry.js} +1 -1
- package/dist/taro-components/{p-292470e5.entry.js → p-16705ca9.entry.js} +1 -1
- package/dist/taro-components/{p-07ae6678.system.entry.js → p-194ace03.system.entry.js} +1 -1
- package/dist/taro-components/{p-12582166.entry.js → p-19b04eb7.entry.js} +1 -1
- package/dist/taro-components/{p-d2203687.system.entry.js → p-19b993d8.system.entry.js} +1 -1
- package/dist/taro-components/{p-204996e7.entry.js → p-1acf7537.entry.js} +1 -1
- package/dist/taro-components/{p-156e9634.system.entry.js → p-1d102ddb.system.entry.js} +1 -1
- package/dist/taro-components/p-25636983.entry.js +1 -0
- package/dist/taro-components/{p-402c7f93.entry.js → p-28bc8a48.entry.js} +1 -1
- package/dist/taro-components/{p-c95d2b90.entry.js → p-2d382d0e.entry.js} +1 -1
- package/dist/taro-components/{p-2d537212.entry.js → p-2ebc3182.entry.js} +1 -1
- package/dist/taro-components/p-2ec68968.system.js +7 -0
- package/dist/taro-components/p-2f8ebd28.system.entry.js +1 -0
- package/dist/taro-components/{p-b1f80b6b.entry.js → p-317c4cad.entry.js} +1 -1
- package/dist/taro-components/p-33980e67.entry.js +1 -0
- package/dist/taro-components/{p-5c98f478.entry.js → p-342a2594.entry.js} +1 -1
- package/dist/taro-components/{p-0a64f78c.system.entry.js → p-3430d520.system.entry.js} +1 -1
- package/dist/taro-components/{p-9b6b17c4.system.entry.js → p-34ba9330.system.entry.js} +1 -1
- package/dist/taro-components/{p-9e359fff.system.entry.js → p-36ea0ac1.system.entry.js} +1 -1
- package/dist/taro-components/{p-0ff5a55b.entry.js → p-370cc947.entry.js} +1 -1
- package/dist/taro-components/p-378b504c.entry.js +1 -0
- package/dist/taro-components/{p-2649c7ae.entry.js → p-37bc198d.entry.js} +1 -1
- package/dist/taro-components/{p-f168fffc.entry.js → p-39b3e34d.entry.js} +1 -1
- package/dist/taro-components/{p-c0c567e5.system.entry.js → p-3a0a05fd.system.entry.js} +1 -1
- package/dist/taro-components/{p-855619b6.system.entry.js → p-3a3d40de.system.entry.js} +1 -1
- package/dist/taro-components/{p-84998109.entry.js → p-3d423adc.entry.js} +1 -1
- package/dist/taro-components/p-3e4b5391.system.entry.js +1 -0
- package/dist/taro-components/{p-57b77f17.system.entry.js → p-3eedb8d7.system.entry.js} +1 -1
- package/dist/taro-components/{p-17e72555.entry.js → p-43932446.entry.js} +1 -1
- package/dist/taro-components/{p-6ba08ce0.system.entry.js → p-4621b303.system.entry.js} +1 -1
- package/dist/taro-components/{p-17938fa0.system.entry.js → p-46ccb393.system.entry.js} +1 -1
- package/dist/taro-components/{p-7163d09e.system.js → p-477f8fbd.system.js} +1 -1
- package/dist/taro-components/{p-46a66c43.entry.js → p-4824cc94.entry.js} +1 -1
- package/dist/taro-components/{p-ac2be5f3.entry.js → p-48a84765.entry.js} +1 -1
- package/dist/taro-components/{p-bb67318d.entry.js → p-49e9b2ff.entry.js} +1 -1
- package/dist/taro-components/{p-425d1d69.entry.js → p-4a748c0d.entry.js} +1 -1
- package/dist/taro-components/{p-a9ca8247.system.entry.js → p-4b5f75b9.system.entry.js} +1 -1
- package/dist/taro-components/p-4c30ea10.entry.js +1 -0
- package/dist/taro-components/{p-55e12654.entry.js → p-4e63d3bd.entry.js} +1 -1
- package/dist/taro-components/{p-93a2b2e9.entry.js → p-4fcb258a.entry.js} +1 -1
- package/dist/taro-components/{p-dedf50a9.entry.js → p-4ffae31c.entry.js} +1 -1
- package/dist/taro-components/{p-c7836e2b.entry.js → p-50b21f94.entry.js} +1 -1
- package/dist/taro-components/{p-dcf5747c.system.entry.js → p-5186ab96.system.entry.js} +1 -1
- package/dist/taro-components/p-518a9b73.entry.js +1 -0
- package/dist/taro-components/p-52ad5213.system.entry.js +1 -0
- package/dist/taro-components/{p-5b9aa4b0.system.entry.js → p-55934653.system.entry.js} +1 -1
- package/dist/taro-components/{p-c7d8c076.system.entry.js → p-55e54f2a.system.entry.js} +1 -1
- package/dist/taro-components/{p-ded98693.system.entry.js → p-562eace8.system.entry.js} +1 -1
- package/dist/taro-components/{p-7e054ae7.system.entry.js → p-5a78fbdf.system.entry.js} +1 -1
- package/dist/taro-components/{p-be055537.entry.js → p-5b4de079.entry.js} +1 -1
- package/dist/taro-components/{p-5c156db3.system.entry.js → p-5b86e66b.system.entry.js} +1 -1
- package/dist/taro-components/{p-1eea2828.entry.js → p-5bfdb5f3.entry.js} +1 -1
- package/dist/taro-components/{p-cae6c5d0.system.entry.js → p-5c0f97d3.system.entry.js} +1 -1
- package/dist/taro-components/{p-d5603857.entry.js → p-5dbabb65.entry.js} +1 -1
- package/dist/taro-components/{p-ccbaba23.entry.js → p-5f4c6ca5.entry.js} +1 -1
- package/dist/taro-components/{p-4979e93c.system.entry.js → p-618ee593.system.entry.js} +1 -1
- package/dist/taro-components/{p-02d4d104.entry.js → p-62df5526.entry.js} +1 -1
- package/dist/taro-components/{p-6654374e.system.entry.js → p-66029061.system.entry.js} +1 -1
- package/dist/taro-components/{p-d05eb105.system.entry.js → p-69e70cd5.system.entry.js} +1 -1
- package/dist/taro-components/{p-6b83388c.system.entry.js → p-6c06b440.system.entry.js} +1 -1
- package/dist/taro-components/p-6dd357b9.entry.js +1 -0
- package/dist/taro-components/{p-c677414d.system.entry.js → p-6f1034a6.system.entry.js} +1 -1
- package/dist/taro-components/{p-e681d764.entry.js → p-6f3187bc.entry.js} +1 -1
- package/dist/taro-components/{p-56552c9e.entry.js → p-6f8926e3.entry.js} +1 -1
- package/dist/taro-components/{p-b087ad2a.system.entry.js → p-6ffc9bda.system.entry.js} +1 -1
- package/dist/taro-components/p-751d42cb.entry.js +1 -0
- package/dist/taro-components/{p-3a180dc7.entry.js → p-756aa971.entry.js} +1 -1
- package/dist/taro-components/{p-ff772345.entry.js → p-76c0f443.entry.js} +1 -1
- package/dist/taro-components/p-77e030e9.system.entry.js +1 -0
- package/dist/taro-components/{p-02465454.system.entry.js → p-7b3ce3af.system.entry.js} +1 -1
- package/dist/taro-components/{p-57911e2c.system.entry.js → p-7b80637e.system.entry.js} +1 -1
- package/dist/taro-components/{p-07f27474.entry.js → p-7bc6aa36.entry.js} +1 -1
- package/dist/taro-components/{p-d973d536.entry.js → p-7e3f0837.entry.js} +1 -1
- package/dist/taro-components/{p-047e4bfe.entry.js → p-7f3d9184.entry.js} +1 -1
- package/dist/taro-components/{p-35dec732.entry.js → p-80228985.entry.js} +1 -1
- package/dist/taro-components/{p-cafbb3d9.system.entry.js → p-80fa706c.system.entry.js} +1 -1
- package/dist/taro-components/{p-61a325d2.system.entry.js → p-829157b1.system.entry.js} +1 -1
- package/dist/taro-components/{p-dc08715a.entry.js → p-82c5b9d3.entry.js} +1 -1
- package/dist/taro-components/{p-d73b3a94.system.entry.js → p-82d52f00.system.entry.js} +1 -1
- package/dist/taro-components/{p-2f177716.entry.js → p-87b0d22f.entry.js} +1 -1
- package/dist/taro-components/{p-e2e7bc16.entry.js → p-895982a4.entry.js} +1 -1
- package/dist/taro-components/{p-937a6c36.entry.js → p-8a6e93ed.entry.js} +1 -1
- package/dist/taro-components/{p-0f480c38.system.entry.js → p-8b7e37c9.system.entry.js} +1 -1
- package/dist/taro-components/{p-c8cd6e16.entry.js → p-8bde1f48.entry.js} +1 -1
- package/dist/taro-components/{p-938f9036.system.entry.js → p-90ee19f8.system.entry.js} +1 -1
- package/dist/taro-components/{p-97b09fb4.system.entry.js → p-923aa1c8.system.entry.js} +1 -1
- package/dist/taro-components/{p-bd57edcd.entry.js → p-92b7b545.entry.js} +1 -1
- package/dist/taro-components/{p-fbf13159.system.entry.js → p-93b39a89.system.entry.js} +1 -1
- package/dist/taro-components/{p-3b36196b.system.entry.js → p-970a4199.system.entry.js} +1 -1
- package/dist/taro-components/{p-ba5e7ec4.system.entry.js → p-97177863.system.entry.js} +1 -1
- package/dist/taro-components/{p-b4577a12.system.entry.js → p-99440bcc.system.entry.js} +1 -1
- package/dist/taro-components/p-9f1b0ae1.entry.js +1 -0
- package/dist/taro-components/{p-6282bdee.system.entry.js → p-9f3e0019.system.entry.js} +1 -1
- package/dist/taro-components/{p-f034a433.entry.js → p-a2f848cc.entry.js} +1 -1
- package/dist/taro-components/{p-280795f2.entry.js → p-a6790f39.entry.js} +1 -1
- package/dist/taro-components/{p-083c3147.system.entry.js → p-a997cf7c.system.entry.js} +1 -1
- package/dist/taro-components/{p-6664a2ca.system.entry.js → p-aa11b00c.system.entry.js} +1 -1
- package/dist/taro-components/{p-feb89474.system.entry.js → p-adee7f1b.system.entry.js} +1 -1
- package/dist/taro-components/{p-38b29261.entry.js → p-ae99551a.entry.js} +1 -1
- package/dist/taro-components/{p-27041d86.system.entry.js → p-aed23034.system.entry.js} +1 -1
- package/dist/taro-components/{p-ac714300.system.entry.js → p-b0f12e64.system.entry.js} +1 -1
- package/dist/taro-components/{p-e853a2c8.system.entry.js → p-b259a558.system.entry.js} +1 -1
- package/dist/taro-components/{p-d9884371.entry.js → p-b3129dec.entry.js} +1 -1
- package/dist/taro-components/{p-9f53e26c.system.entry.js → p-b3419d7f.system.entry.js} +1 -1
- package/dist/taro-components/{p-18c039ef.entry.js → p-b4047b11.entry.js} +1 -1
- package/dist/taro-components/{p-ebb1ae64.entry.js → p-b43fa9b0.entry.js} +1 -1
- package/dist/taro-components/{p-e1cce2f1.entry.js → p-b4707cdd.entry.js} +1 -1
- package/dist/taro-components/{p-0fc790c0.system.entry.js → p-b655e854.system.entry.js} +1 -1
- package/dist/taro-components/{p-ac9fb309.system.entry.js → p-b66dfc82.system.entry.js} +1 -1
- package/dist/taro-components/{p-c056d527.system.entry.js → p-ba241824.system.entry.js} +1 -1
- package/dist/taro-components/{p-7ebd4310.entry.js → p-baea6a63.entry.js} +1 -1
- package/dist/taro-components/{p-be1701b2.entry.js → p-c0f16127.entry.js} +1 -1
- package/dist/taro-components/{p-3bfe9260.entry.js → p-c253be9f.entry.js} +1 -1
- package/dist/taro-components/{p-56a82bf3.entry.js → p-c58627f4.entry.js} +1 -1
- package/dist/taro-components/{p-ca6a5916.system.entry.js → p-c863ac7f.system.entry.js} +1 -1
- package/dist/taro-components/{p-443e31ab.system.entry.js → p-cc993977.system.entry.js} +1 -1
- package/dist/taro-components/{p-a25aca16.system.entry.js → p-cee51d71.system.entry.js} +1 -1
- package/dist/taro-components/{p-91ee1f8a.system.entry.js → p-d12b6a84.system.entry.js} +1 -1
- package/dist/taro-components/{p-a50c6736.entry.js → p-d184903b.entry.js} +1 -1
- package/dist/taro-components/{p-26eb2f3f.entry.js → p-d29a59cd.entry.js} +1 -1
- package/dist/taro-components/p-d6bd1a5b.entry.js +1 -0
- package/dist/taro-components/{p-77e82dfa.entry.js → p-da4c4cad.entry.js} +1 -1
- package/dist/taro-components/{p-3cf08137.entry.js → p-dc366f18.entry.js} +1 -1
- package/dist/taro-components/{p-79cad66b.entry.js → p-dde26531.entry.js} +1 -1
- package/dist/taro-components/{p-ddf75d6a.system.entry.js → p-de1d495a.system.entry.js} +1 -1
- package/dist/taro-components/p-de951a46.js +7 -0
- package/dist/taro-components/{p-4523b1c7.entry.js → p-e23769c4.entry.js} +1 -1
- package/dist/taro-components/{p-50849470.system.entry.js → p-e2694a79.system.entry.js} +1 -1
- package/dist/taro-components/{p-8b0c9d3f.entry.js → p-e2a22cd1.entry.js} +1 -1
- package/dist/taro-components/{p-1bd4da3b.system.entry.js → p-e41ed824.system.entry.js} +1 -1
- package/dist/taro-components/{p-ebad862a.system.entry.js → p-e5a80896.system.entry.js} +1 -1
- package/dist/taro-components/{p-75b4c1fc.system.entry.js → p-e5b43c80.system.entry.js} +1 -1
- package/dist/taro-components/{p-17b9f865.system.entry.js → p-e6a2f1bd.system.entry.js} +1 -1
- package/dist/taro-components/{p-078cb65e.entry.js → p-ead6e57b.entry.js} +1 -1
- package/dist/taro-components/{p-d87a68f6.entry.js → p-ebbbdde5.entry.js} +1 -1
- package/dist/taro-components/{p-ba11ef7d.entry.js → p-ec00e517.entry.js} +1 -1
- package/dist/taro-components/p-ec0d8c41.system.entry.js +1 -0
- package/dist/taro-components/p-ed081b3d.entry.js +1 -0
- package/dist/taro-components/{p-4ac48df1.system.entry.js → p-eda34d91.system.entry.js} +1 -1
- package/dist/taro-components/{p-df7c6216.system.entry.js → p-ee9d6467.system.entry.js} +1 -1
- package/dist/taro-components/{p-27d372b4.system.entry.js → p-f0056aca.system.entry.js} +1 -1
- package/dist/taro-components/{p-1c37143a.system.entry.js → p-f470ce9f.system.entry.js} +1 -1
- package/dist/taro-components/{p-c3dc7072.entry.js → p-f662c928.entry.js} +1 -1
- package/dist/taro-components/{p-e3d825d1.system.entry.js → p-f6743078.system.entry.js} +1 -1
- package/dist/taro-components/{p-fe5eefdc.system.entry.js → p-f7198b67.system.entry.js} +1 -1
- package/dist/taro-components/{p-4fad4beb.system.entry.js → p-f782ee74.system.entry.js} +1 -1
- package/dist/taro-components/{p-7ca2d075.system.entry.js → p-f94c0445.system.entry.js} +1 -1
- package/dist/taro-components/p-f9a13a5c.entry.js +1 -0
- package/dist/taro-components/{p-c71d5745.system.entry.js → p-fa9dbb6f.system.entry.js} +1 -1
- package/dist/taro-components/{p-65d11e99.system.entry.js → p-fbb789a4.system.entry.js} +1 -1
- package/dist/taro-components/{p-3293c5d9.system.entry.js → p-fe1dd94f.system.entry.js} +1 -1
- package/dist/taro-components/{p-b4c7bb48.entry.js → p-fe8ee676.entry.js} +1 -1
- package/dist/taro-components/{p-47790dc0.system.entry.js → p-ffaac078.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.js +1 -1
- package/dist/types/components/tabbar/tabbar-item.d.ts +4 -4
- package/dist/types/components/tabbar/tabbar.d.ts +15 -16
- package/dist/types/components.d.ts +3 -2
- package/lib/react/component-lib/index.d.ts +53 -53
- package/lib/react/component-lib/input.d.ts +1 -1
- package/lib/react/component-lib/input.js.map +1 -1
- package/lib/react/component-lib/reactify-wc.d.ts +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +92 -92
- package/lib/react/components.js +0 -2
- package/lib/react/components.js.map +1 -1
- package/lib/react/helper.d.ts +2 -4
- package/lib/react/helper.js.map +1 -1
- package/lib/react/index.d.ts +1 -1
- package/lib/{solid/solid-component-lib/interfaces.d.ts → react/interfaces-f526f1a2.d.ts} +5 -4
- package/lib/react/react-component-lib/createComponent.d.ts +3 -3
- package/lib/react/react-component-lib/createComponent.js +1 -1
- package/lib/react/react-component-lib/createComponent.js.map +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.d.ts +5 -5
- package/lib/react/react-component-lib/createOverlayComponent.js +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/index.d.ts +2 -2
- package/lib/react/react-component-lib/utils/attachProps.d.ts +6 -6
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/react/react-component-lib/utils/case.d.ts +3 -2
- package/lib/react/react-component-lib/utils/index.d.ts +10 -9
- package/lib/react/react-component-lib/utils/index.js.map +1 -1
- package/lib/vue2/component-lib/components.d.ts +111 -0
- package/lib/vue2/component-lib/components.js +74 -0
- package/lib/vue2/component-lib/components.js.map +1 -0
- package/lib/vue2/component-lib/createComponent.d.ts +14 -0
- package/lib/vue2/component-lib/createComponent.js +23 -0
- package/lib/vue2/component-lib/createComponent.js.map +1 -0
- package/lib/vue2/component-lib/createFormsComponent.d.ts +22 -0
- package/lib/vue2/component-lib/createFormsComponent.js +53 -0
- package/lib/vue2/component-lib/createFormsComponent.js.map +1 -0
- package/lib/vue2/component-lib/icon.d.ts +16 -0
- package/lib/vue2/component-lib/icon.js +23 -0
- package/lib/vue2/component-lib/icon.js.map +1 -0
- package/lib/vue2/component-lib/image.d.ts +16 -0
- package/lib/vue2/component-lib/image.js +24 -0
- package/lib/vue2/component-lib/image.js.map +1 -0
- package/lib/vue2/component-lib/index.d.ts +1 -0
- package/lib/vue2/component-lib/index.js +25 -0
- package/lib/vue2/component-lib/index.js.map +1 -0
- package/lib/vue2/component-lib/mixins/listeners.d.ts +6 -0
- package/lib/vue2/component-lib/mixins/listeners.js +14 -0
- package/lib/vue2/component-lib/mixins/listeners.js.map +1 -0
- package/lib/vue2/component-lib/mixins/refs.d.ts +5 -0
- package/lib/vue2/component-lib/mixins/refs.js +53 -0
- package/lib/vue2/component-lib/mixins/refs.js.map +1 -0
- package/lib/vue2/component-lib/picker.d.ts +25 -0
- package/lib/vue2/component-lib/picker.js +41 -0
- package/lib/vue2/component-lib/picker.js.map +1 -0
- package/lib/vue2/component-lib/scroll-view.d.ts +17 -0
- package/lib/vue2/component-lib/scroll-view.js +35 -0
- package/lib/vue2/component-lib/scroll-view.js.map +1 -0
- package/lib/vue2/component-lib/text.d.ts +16 -0
- package/lib/vue2/component-lib/text.js +24 -0
- package/lib/vue2/component-lib/text.js.map +1 -0
- package/lib/vue2/components-loader.d.ts +2 -0
- package/lib/vue2/components-loader.js +21 -0
- package/lib/vue2/components-loader.js.map +1 -0
- package/lib/vue2/components.d.ts +408 -0
- package/lib/vue2/components.js +633 -0
- package/lib/vue2/components.js.map +1 -0
- package/lib/vue2/index.d.ts +1 -0
- package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.7.14/node_modules/vue-fragment/dist/vue-fragment.esm.js +4 -0
- package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.7.14/node_modules/vue-fragment/dist/vue-fragment.esm.js.map +1 -0
- package/lib/vue2/vue-component-lib/utils.d.ts +10 -0
- package/lib/vue2/vue-component-lib/utils.js +51 -0
- package/lib/vue2/vue-component-lib/utils.js.map +1 -0
- package/lib/vue3/component-lib/createComponent.d.ts +2 -1
- package/lib/vue3/component-lib/createFormsComponent.d.ts +2 -1
- package/lib/vue3/component-lib/createFormsComponent.js.map +1 -1
- package/lib/vue3/component-lib/forwardRef.d.ts +2 -1
- package/lib/vue3/component-lib/icon.d.ts +1 -1
- package/lib/vue3/component-lib/image.d.ts +1 -1
- package/lib/vue3/component-lib/index.d.ts +53 -52
- package/lib/vue3/component-lib/scroll-view.d.ts +1 -1
- package/lib/vue3/component-lib/scroll-view.js.map +1 -1
- package/lib/vue3/component-lib/text.d.ts +1 -1
- package/lib/vue3/components-loader.d.ts +2 -1
- package/lib/vue3/components-loader.js.map +1 -1
- package/lib/vue3/components.d.ts +92 -93
- package/lib/vue3/components.js +0 -2
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/index.d.ts +1 -1
- package/lib/vue3/vue-component-lib/utils.d.ts +3 -2
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +24 -29
- package/types/Button.d.ts +5 -5
- package/types/Camera.d.ts +1 -1
- package/types/Checkbox.d.ts +5 -5
- package/types/CoverImage.d.ts +1 -1
- package/types/Form.d.ts +2 -2
- package/types/Icon.d.ts +3 -3
- package/types/Image.d.ts +2 -3
- package/types/Input.d.ts +15 -15
- package/types/Label.d.ts +1 -1
- package/types/ListView.d.ts +1 -1
- package/types/NavigationBar.d.ts +4 -4
- package/types/Navigator.d.ts +1 -1
- package/types/PageMeta.d.ts +7 -7
- package/types/Picker.d.ts +20 -20
- package/types/PickerView.d.ts +1 -1
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +5 -5
- package/types/RadioGroup.d.ts +1 -1
- package/types/ScrollView.d.ts +5 -5
- package/types/Slider.d.ts +14 -14
- package/types/Slot.d.ts +1 -1
- package/types/StickyHeader.d.ts +1 -1
- package/types/StickySection.d.ts +1 -1
- package/types/Swiper.d.ts +9 -9
- package/types/SwiperItem.d.ts +1 -1
- package/types/Switch.d.ts +5 -5
- package/types/Text.d.ts +2 -2
- package/types/Textarea.d.ts +7 -7
- package/types/Video.d.ts +16 -16
- package/types/common.d.ts +2 -7
- package/dist/esm-es5/index-b9522531.js +0 -7
- package/dist/taro-components/p-0f2c1ecc.entry.js +0 -1
- package/dist/taro-components/p-160d710a.js +0 -7
- package/dist/taro-components/p-43367dd1.entry.js +0 -1
- package/dist/taro-components/p-443b9a72.system.js +0 -7
- package/dist/taro-components/p-4a8b4d58.system.entry.js +0 -1
- package/dist/taro-components/p-53e62840.system.entry.js +0 -1
- package/dist/taro-components/p-5f23dc41.system.entry.js +0 -1
- package/dist/taro-components/p-6989c232.entry.js +0 -1
- package/dist/taro-components/p-7e692c70.entry.js +0 -1
- package/dist/taro-components/p-7fdbcf4d.entry.js +0 -1
- package/dist/taro-components/p-93b02321.entry.js +0 -1
- package/dist/taro-components/p-9571836f.entry.js +0 -1
- package/dist/taro-components/p-aabac550.entry.js +0 -1
- package/dist/taro-components/p-ab0e0366.system.entry.js +0 -1
- package/dist/taro-components/p-acb113bd.entry.js +0 -1
- package/dist/taro-components/p-f367a754.entry.js +0 -1
- package/dist/taro-components/p-f9935901.system.entry.js +0 -1
- package/dist/taro-components/p-fab63183.entry.js +0 -1
- package/global.css +0 -1
- package/lib/react/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.18.0_tslib@2.6.2_typescript@5.4.5/node_modules/tslib/tslib.es6.js +0 -373
- package/lib/react/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.18.0_tslib@2.6.2_typescript@5.4.5/node_modules/tslib/tslib.es6.js.map +0 -1
- package/lib/react/react-component-lib/interfaces.d.ts +0 -33
- package/lib/react/react-component-lib/utils/dev.d.ts +0 -6
- package/lib/solid/component-lib/index.d.ts +0 -53
- package/lib/solid/component-lib/index.js +0 -69
- package/lib/solid/component-lib/index.js.map +0 -1
- package/lib/solid/components.d.ts +0 -92
- package/lib/solid/components.js +0 -102
- package/lib/solid/components.js.map +0 -1
- package/lib/solid/helper.d.ts +0 -3
- package/lib/solid/helper.js +0 -7
- package/lib/solid/helper.js.map +0 -1
- package/lib/solid/index.d.ts +0 -1
- package/lib/solid/solid-component-lib/createComponent.d.ts +0 -10
- package/lib/solid/solid-component-lib/createComponent.js +0 -67
- package/lib/solid/solid-component-lib/createComponent.js.map +0 -1
- package/lib/solid/solid-component-lib/index.d.ts +0 -1
- package/lib/solid/solid-component-lib/index.js +0 -2
- package/lib/solid/solid-component-lib/index.js.map +0 -1
- package/lib/solid/solid-component-lib/utils/case.d.ts +0 -3
- package/lib/solid/solid-component-lib/utils/case.js +0 -6
- package/lib/solid/solid-component-lib/utils/case.js.map +0 -1
- package/lib/solid/solid-component-lib/utils/element.d.ts +0 -6
- package/lib/solid/solid-component-lib/utils/element.js +0 -48
- package/lib/solid/solid-component-lib/utils/element.js.map +0 -1
- package/lib/solid/solid-component-lib/utils/index.d.ts +0 -2
- package/lib/solid/solid-component-lib/utils/index.js +0 -3
- package/lib/solid/solid-component-lib/utils/index.js.map +0 -1
- /package/dist/cjs/{index-09efe07d.js → index-5b029707.js} +0 -0
- /package/dist/esm/{index-9924aee9.js → index-ab3c86da.js} +0 -0
- /package/dist/esm-es5/{index-9924aee9.js → index-ab3c86da.js} +0 -0
- /package/dist/taro-components/{p-75d01c60.system.js → p-2b70c348.system.js} +0 -0
- /package/dist/taro-components/{p-e62a1287.js → p-dd7a128d.js} +0 -0
- /package/lib/{solid → vue2}/index.js +0 -0
- /package/lib/{solid → vue2}/index.js.map +0 -0
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/interfaces.ts
|
|
3
3
|
* MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
interface EventEmitter<T = any> {
|
|
6
6
|
emit: (data?: T) => CustomEvent<T>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface StyleReactProps {
|
|
9
9
|
class?: string;
|
|
10
10
|
className?: string;
|
|
11
11
|
style?: {
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface OverlayEventDetail<T = any> {
|
|
16
16
|
data?: T;
|
|
17
17
|
role?: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
interface OverlayInterface {
|
|
20
20
|
el: HTMLElement;
|
|
21
21
|
animated: boolean;
|
|
22
22
|
keyboardClose: boolean;
|
|
@@ -31,3 +31,4 @@ export interface OverlayInterface {
|
|
|
31
31
|
present(): Promise<void>;
|
|
32
32
|
dismiss(data?: any, role?: string): Promise<boolean>;
|
|
33
33
|
}
|
|
34
|
+
export { EventEmitter, StyleReactProps, OverlayEventDetail, OverlayInterface };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
|
|
6
|
+
interface HTMLStencilElement extends HTMLElement {
|
|
7
7
|
componentOnReady(): Promise<this>;
|
|
8
8
|
}
|
|
9
9
|
interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
|
|
10
10
|
forwardedRef: React.RefObject<ElementType>;
|
|
11
11
|
ref?: React.Ref<any>;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
export {};
|
|
13
|
+
declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = any, ExpandedPropsTypes = any>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils/index.js").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
|
|
14
|
+
export { HTMLStencilElement, createReactComponent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __rest } from '
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
2
|
import React, { createElement } from 'react';
|
|
3
3
|
import { mergeRefs, createForwardRef } from './utils/index.js';
|
|
4
4
|
import { dashToPascalCase, camelToDashCase } from './utils/case.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React, { createElement } from 'react'\n\nimport {\n applyUnControlledDefaultValue,\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>\n ref?: React.Ref<any>\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = any,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (!DEPRECATED_ADAPTER_COMPONENT && defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n const displayName = dashToPascalCase(tagName)\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element\n }\n\n // eslint-disable-next-line no-useless-constructor\n constructor (props: StencilReactInternalProps<ElementType>) {\n super(props)\n }\n\n componentDidMount () {\n applyUnControlledDefaultValue(this.componentEl, this.props)\n this.componentDidUpdate(this.props)\n }\n\n componentDidUpdate (prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps)\n }\n\n render () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, forwardedRef, className, ref, style, ...cProps } = this.props\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name]\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase()\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value\n\n if (['string', 'boolean', 'number'].includes(type)) {\n acc[camelToDashCase(name)] = value\n }\n }\n return acc\n }, {} as ExpandedPropsTypes)\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass)\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n // Note(taro): 需处理 string 类型的 style,调整到 manipulatePropsFunction 方法中判断是否需注入 (string 类型在 attachProps 中处理)\n // style\n }\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children)\n }\n\n static get displayName () {\n return displayName\n }\n }\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName)\n}\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,oBAAoB,GAAG,CAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB,EACvB,mBAAgC,KAC9B;AACF,IAAA,IAAI,CAAC,4BAA4B,IAAI,mBAAmB,KAAK,SAAS,EAAE;AACtE,QAAA,mBAAmB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React, { createElement } from 'react'\n\nimport {\n applyUnControlledDefaultValue,\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>\n ref?: React.Ref<any>\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = any,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (!DEPRECATED_ADAPTER_COMPONENT && defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n const displayName = dashToPascalCase(tagName)\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element\n }\n\n // eslint-disable-next-line no-useless-constructor\n constructor (props: StencilReactInternalProps<ElementType>) {\n super(props)\n }\n\n componentDidMount () {\n applyUnControlledDefaultValue(this.componentEl, this.props)\n this.componentDidUpdate(this.props)\n }\n\n componentDidUpdate (prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps)\n }\n\n render () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, forwardedRef, className, ref, style, ...cProps } = this.props\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name]\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase()\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value\n\n if (['string', 'boolean', 'number'].includes(type)) {\n acc[camelToDashCase(name)] = value\n }\n }\n return acc\n }, {} as ExpandedPropsTypes)\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass)\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n // Note(taro): 需处理 string 类型的 style,调整到 manipulatePropsFunction 方法中判断是否需注入 (string 类型在 attachProps 中处理)\n // style\n }\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children)\n }\n\n static get displayName () {\n return displayName\n }\n }\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName)\n}\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,oBAAoB,GAAG,CAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB,EACvB,mBAAgC,KAC9B;AACF,IAAA,IAAI,CAAC,4BAA4B,IAAI,mBAAmB,KAAK,SAAS,EAAE;AACtE,QAAA,mBAAmB,EAAE,CAAA;AACtB,KAAA;AAED,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAC7C,IAAA,MAAM,cAAc,GAAG,cAAc,KAAK,CAAC,SAAiD,CAAA;;AAQ1F,QAAA,WAAA,CAAa,KAA6C,EAAA;YACxD,KAAK,CAAC,KAAK,CAAC,CAAA;AANd,YAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,OAAoB,KAAI;AAC3C,gBAAA,IAAI,CAAC,WAAW,GAAG,OAAO,CAAA;AAC5B,aAAC,CAAA;SAKA;QAED,iBAAiB,GAAA;YACf,6BAA6B,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;AAC3D,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;SACpC;AAED,QAAA,kBAAkB,CAAE,SA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;aACX,EAAE,EAAwB,CAAC,CAAA;AAE5B,YAAA,IAAI,uBAAuB,EAAE;gBAC3B,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;AAC/D,aAAA;AAED,YAAA,MAAM,QAAQ,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,WAAW,CAAA,EAAA,EACd,GAAG,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAGrD,CAAA;AAED;;;;;;AAMG;YACH,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;SAClD;AAED,QAAA,WAAW,WAAW,GAAA;AACpB,YAAA,OAAO,WAAW,CAAA;SACnB;KACF,CAAA;;AAGD,IAAA,IAAI,qBAAqB,EAAE;AACzB,QAAA,cAAc,CAAC,WAAW,GAAG,qBAAqB,CAAA;AACnD,KAAA;AAED,IAAA,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC,CAAA;AAC7E;;;;"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { OverlayEventDetail } from
|
|
7
|
-
import { StencilReactForwardedRef } from
|
|
6
|
+
import { OverlayEventDetail } from "../interfaces-f526f1a2.js";
|
|
7
|
+
import { StencilReactForwardedRef } from "./utils/index.js";
|
|
8
8
|
interface OverlayElement extends HTMLElement {
|
|
9
9
|
present: () => Promise<void>;
|
|
10
10
|
dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
interface ReactOverlayProps {
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
isOpen: boolean;
|
|
15
15
|
onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
@@ -17,9 +17,9 @@ export interface ReactOverlayProps {
|
|
|
17
17
|
onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
18
18
|
onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
|
|
21
21
|
create: (options: any) => Promise<OverlayType>;
|
|
22
22
|
}, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
|
|
23
23
|
forwardedRef?: StencilReactForwardedRef<OverlayType>;
|
|
24
24
|
}> & React.RefAttributes<OverlayType>>;
|
|
25
|
-
export {};
|
|
25
|
+
export { ReactOverlayProps, createOverlayComponent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __rest } from '
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
import { defineCustomElement, setRef } from './utils/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOverlayComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createOverlayComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport { OverlayEventDetail } from './interfaces'\nimport { attachProps, dashToPascalCase, defineCustomElement, setRef, StencilReactForwardedRef } from './utils'\n\ninterface OverlayElement extends HTMLElement {\n present: () => Promise<void>\n dismiss: (data?: any, role?: string | undefined) => Promise<boolean>\n}\n\nexport interface ReactOverlayProps {\n children?: React.ReactNode\n isOpen: boolean\n onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n}\n\nexport const createOverlayComponent = <OverlayComponent extends object, OverlayType extends OverlayElement>(\n tagName: string,\n controller: { create: (options: any) => Promise<OverlayType> },\n customElement?: any\n) => {\n defineCustomElement(tagName, customElement)\n\n const displayName = dashToPascalCase(tagName)\n const didDismissEventName = `on${displayName}DidDismiss`\n const didPresentEventName = `on${displayName}DidPresent`\n const willDismissEventName = `on${displayName}WillDismiss`\n const willPresentEventName = `on${displayName}WillPresent`\n\n type Props = OverlayComponent &\n ReactOverlayProps & {\n forwardedRef?: StencilReactForwardedRef<OverlayType>\n };\n\n let isDismissing = false\n\n class Overlay extends React.Component<Props> {\n overlay?: OverlayType\n el!: HTMLDivElement\n\n constructor (props: Props) {\n super(props)\n if (typeof document !== 'undefined') {\n this.el = document.createElement('div')\n }\n this.handleDismiss = this.handleDismiss.bind(this)\n }\n\n static get displayName () {\n return displayName\n }\n\n componentDidMount () {\n if (this.props.isOpen) {\n this.present()\n }\n }\n\n componentWillUnmount () {\n if (this.overlay) {\n this.overlay.dismiss()\n }\n }\n\n handleDismiss (event: CustomEvent<OverlayEventDetail<any>>) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event)\n }\n setRef(this.props.forwardedRef, null)\n }\n\n shouldComponentUpdate (nextProps: Props) {\n // Check if the overlay component is about to dismiss\n if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {\n isDismissing = true\n }\n\n return true\n }\n\n async componentDidUpdate (prevProps: Props) {\n if (this.overlay) {\n attachProps(this.overlay, this.props, prevProps)\n }\n\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps)\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss()\n isDismissing = false\n\n /**\n * Now that the overlay is dismissed\n * we need to render again so that any\n * inner components will be unmounted\n */\n this.forceUpdate()\n }\n }\n\n async present (prevProps?: Props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, ...cProps } = this.props\n const elementProps = {\n ...cProps,\n ref: this.props.forwardedRef,\n [didDismissEventName]: this.handleDismiss,\n [didPresentEventName]: (e: CustomEvent) => this.props.onDidPresent && this.props.onDidPresent(e),\n [willDismissEventName]: (e: CustomEvent) => this.props.onWillDismiss && this.props.onWillDismiss(e),\n [willPresentEventName]: (e: CustomEvent) => this.props.onWillPresent && this.props.onWillPresent(e),\n }\n\n this.overlay = await controller.create({\n ...elementProps,\n component: this.el,\n componentProps: {},\n })\n\n setRef(this.props.forwardedRef, this.overlay)\n attachProps(this.overlay, elementProps, prevProps)\n\n await this.overlay.present()\n }\n\n render () {\n /**\n * Continue to render the component even when\n * overlay is dismissing otherwise component\n * will be hidden before animation is done.\n */\n return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el)\n }\n }\n\n return React.forwardRef<OverlayType, Props>((props, ref) => {\n // Note: 组件库错误引入 vue 的 ts 类型,导致 ts 报错,这里先忽略\n // @ts-ignore\n return <Overlay {...props} forwardedRef={ref} />\n })\n}\n"],"names":[],"mappings":";;;;;;;AAwBa,MAAA,sBAAsB,GAAG,CACpC,OAAe,EACf,UAA8D,EAC9D,aAAmB,KACjB;AACF,IAAA,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;AAE3C,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAC7C,IAAA,MAAM,mBAAmB,GAAG,CAAK,EAAA,EAAA,WAAW,YAAY,CAAA;AACxD,IAAA,MAAM,mBAAmB,GAAG,CAAK,EAAA,EAAA,WAAW,YAAY,CAAA;AACxD,IAAA,MAAM,oBAAoB,GAAG,CAAK,EAAA,EAAA,WAAW,aAAa,CAAA;AAC1D,IAAA,MAAM,oBAAoB,GAAG,CAAK,EAAA,EAAA,WAAW,aAAa,CAAA;IAO1D,IAAI,YAAY,GAAG,KAAK,CAAA;AAExB,IAAA,MAAM,OAAQ,SAAQ,KAAK,CAAC,SAAgB,CAAA;AAI1C,QAAA,WAAA,CAAa,KAAY,EAAA;YACvB,KAAK,CAAC,KAAK,CAAC,CAAA;AACZ,YAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"createOverlayComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createOverlayComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport { OverlayEventDetail } from './interfaces'\nimport { attachProps, dashToPascalCase, defineCustomElement, setRef, StencilReactForwardedRef } from './utils'\n\ninterface OverlayElement extends HTMLElement {\n present: () => Promise<void>\n dismiss: (data?: any, role?: string | undefined) => Promise<boolean>\n}\n\nexport interface ReactOverlayProps {\n children?: React.ReactNode\n isOpen: boolean\n onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n}\n\nexport const createOverlayComponent = <OverlayComponent extends object, OverlayType extends OverlayElement>(\n tagName: string,\n controller: { create: (options: any) => Promise<OverlayType> },\n customElement?: any\n) => {\n defineCustomElement(tagName, customElement)\n\n const displayName = dashToPascalCase(tagName)\n const didDismissEventName = `on${displayName}DidDismiss`\n const didPresentEventName = `on${displayName}DidPresent`\n const willDismissEventName = `on${displayName}WillDismiss`\n const willPresentEventName = `on${displayName}WillPresent`\n\n type Props = OverlayComponent &\n ReactOverlayProps & {\n forwardedRef?: StencilReactForwardedRef<OverlayType>\n };\n\n let isDismissing = false\n\n class Overlay extends React.Component<Props> {\n overlay?: OverlayType\n el!: HTMLDivElement\n\n constructor (props: Props) {\n super(props)\n if (typeof document !== 'undefined') {\n this.el = document.createElement('div')\n }\n this.handleDismiss = this.handleDismiss.bind(this)\n }\n\n static get displayName () {\n return displayName\n }\n\n componentDidMount () {\n if (this.props.isOpen) {\n this.present()\n }\n }\n\n componentWillUnmount () {\n if (this.overlay) {\n this.overlay.dismiss()\n }\n }\n\n handleDismiss (event: CustomEvent<OverlayEventDetail<any>>) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event)\n }\n setRef(this.props.forwardedRef, null)\n }\n\n shouldComponentUpdate (nextProps: Props) {\n // Check if the overlay component is about to dismiss\n if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {\n isDismissing = true\n }\n\n return true\n }\n\n async componentDidUpdate (prevProps: Props) {\n if (this.overlay) {\n attachProps(this.overlay, this.props, prevProps)\n }\n\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps)\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss()\n isDismissing = false\n\n /**\n * Now that the overlay is dismissed\n * we need to render again so that any\n * inner components will be unmounted\n */\n this.forceUpdate()\n }\n }\n\n async present (prevProps?: Props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, ...cProps } = this.props\n const elementProps = {\n ...cProps,\n ref: this.props.forwardedRef,\n [didDismissEventName]: this.handleDismiss,\n [didPresentEventName]: (e: CustomEvent) => this.props.onDidPresent && this.props.onDidPresent(e),\n [willDismissEventName]: (e: CustomEvent) => this.props.onWillDismiss && this.props.onWillDismiss(e),\n [willPresentEventName]: (e: CustomEvent) => this.props.onWillPresent && this.props.onWillPresent(e),\n }\n\n this.overlay = await controller.create({\n ...elementProps,\n component: this.el,\n componentProps: {},\n })\n\n setRef(this.props.forwardedRef, this.overlay)\n attachProps(this.overlay, elementProps, prevProps)\n\n await this.overlay.present()\n }\n\n render () {\n /**\n * Continue to render the component even when\n * overlay is dismissing otherwise component\n * will be hidden before animation is done.\n */\n return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el)\n }\n }\n\n return React.forwardRef<OverlayType, Props>((props, ref) => {\n // Note: 组件库错误引入 vue 的 ts 类型,导致 ts 报错,这里先忽略\n // @ts-ignore\n return <Overlay {...props} forwardedRef={ref} />\n })\n}\n"],"names":[],"mappings":";;;;;;;AAwBa,MAAA,sBAAsB,GAAG,CACpC,OAAe,EACf,UAA8D,EAC9D,aAAmB,KACjB;AACF,IAAA,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;AAE3C,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAC7C,IAAA,MAAM,mBAAmB,GAAG,CAAK,EAAA,EAAA,WAAW,YAAY,CAAA;AACxD,IAAA,MAAM,mBAAmB,GAAG,CAAK,EAAA,EAAA,WAAW,YAAY,CAAA;AACxD,IAAA,MAAM,oBAAoB,GAAG,CAAK,EAAA,EAAA,WAAW,aAAa,CAAA;AAC1D,IAAA,MAAM,oBAAoB,GAAG,CAAK,EAAA,EAAA,WAAW,aAAa,CAAA;IAO1D,IAAI,YAAY,GAAG,KAAK,CAAA;AAExB,IAAA,MAAM,OAAQ,SAAQ,KAAK,CAAC,SAAgB,CAAA;AAI1C,QAAA,WAAA,CAAa,KAAY,EAAA;YACvB,KAAK,CAAC,KAAK,CAAC,CAAA;AACZ,YAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;AACxC,aAAA;YACD,IAAI,CAA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C,MAAM,iCACjC,YAAY,CAAA,EAAA,EACf,SAAS,EAAE,IAAI,CAAC,EAAE,EAClB,cAAc,EAAE,EAAE,IAClB,CAAA;YAEF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;YAC7C,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,CAAA;AAElD,YAAA,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;SAC7B;QAED,MAAM,GAAA;AACJ;;;;AAIG;AACH,YAAA,OAAO,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;SACtG;AACF,KAAA;IAED,OAAO,KAAK,CAAC,UAAU,CAAqB,CAAC,KAAK,EAAE,GAAG,KAAI;;;QAGzD,OAAO,KAAA,CAAA,aAAA,CAAC,OAAO,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI,CAAA;AAClD,KAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createReactComponent } from
|
|
2
|
-
export { createOverlayComponent } from
|
|
1
|
+
export { createReactComponent } from "./createComponent.js";
|
|
2
|
+
export { createOverlayComponent } from "./createOverlayComponent.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
|
|
2
|
+
declare const isCoveredByReact: (__eventNameSuffix: string) => boolean;
|
|
3
3
|
interface EventCenter {
|
|
4
4
|
[key: string]: EventCenter.EventCallback | undefined;
|
|
5
5
|
}
|
|
@@ -12,7 +12,7 @@ declare namespace EventCenter {
|
|
|
12
12
|
type HTMLElementWithEvents = HTMLElement & {
|
|
13
13
|
__events?: EventCenter;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export {};
|
|
15
|
+
declare const syncEvent: (node: HTMLElementWithEvents, eventName: string, newEventHandler?: (e: Event) => any) => void;
|
|
16
|
+
declare const attachProps: (node: HTMLElementWithEvents, newProps: any, oldProps?: any) => void;
|
|
17
|
+
declare function applyUnControlledDefaultValue(node: HTMLElementWithEvents, props: any): void;
|
|
18
|
+
export { getClassName, isCoveredByReact, syncEvent, attachProps, applyUnControlledDefaultValue };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachProps.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/attachProps.ts"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/attachProps.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport { flushSync, unstable_batchedUpdates } from 'react-dom'\n\nimport { camelToDashCase } from './case'\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s))\n return map\n}\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class\n const oldClassProp: string = oldProps.className || oldProps.class\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList)\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : [])\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : [])\n const finalClassNames: string[] = []\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass)\n incomingPropClasses.delete(currentClass)\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass)\n }\n })\n incomingPropClasses.forEach((s) => finalClassNames.push(s))\n return finalClassNames.join(' ')\n}\n\n// Note(taro): 禁用 react 合成事件抛出 (避免自定义事件属性调用问题, 例如: event.detail.value 等)\nexport const isCoveredByReact = (__eventNameSuffix: string) => false\n\ninterface EventCenter {\n [key: string]: EventCenter.EventCallback | undefined\n}\n\nnamespace EventCenter {\n export interface EventCallback {\n (e: Event): any\n fn?: (e: Event) => any\n }\n}\n\ntype HTMLElementWithEvents = HTMLElement & { __events?: EventCenter }\n\nfunction getComponentName (node: HTMLElement): string {\n return node.tagName.replace(/^TARO-/, '').replace(/-CORE$/, '')\n}\n\nfunction getControlledValue (node: HTMLElement): string | null {\n const componentName = getComponentName(node)\n if (['INPUT', 'TEXTAREA', 'SLIDER', 'PICKER'].includes(componentName)) {\n return 'value'\n } else if (componentName === 'SWITCH') {\n // Radio、Checkbox 受 RadioGroup、CheckboxGroup 控制,不支持受控\n return 'checked'\n } else {\n return null\n }\n}\n\nfunction getPropsAfterReactUpdate (node: HTMLElement): Record<string, any> | null {\n const key = Object.keys(node).find(key => key.includes('__reactProps'))\n if (key) {\n return node[key] as Record<string, any>\n } else {\n return null\n }\n}\n\nfunction finishedEventHandler (node: HTMLElement) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n // 立即执行事件回调中用户可能触发了的 React 更新\n flushSync(() => {})\n\n // 组件在 React 更新后的 React props\n const newProps = getPropsAfterReactUpdate(node)\n if (newProps?.hasOwnProperty(controlledValue) && newProps[controlledValue] !== node[controlledValue]) {\n // 如果 React Props 的 value 和 DOM 上的 value 不一致,以 React Props 为准(受控)\n node[controlledValue] = newProps[controlledValue]\n node.setAttribute(controlledValue, newProps[controlledValue])\n }\n}\n\nexport const syncEvent = (\n node: HTMLElementWithEvents,\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events ||= {}\n const oldEventHandler = eventStore[eventName]\n\n if (!newEventHandler) {\n oldEventHandler && node.removeEventListener(eventName, oldEventHandler)\n } else {\n if (oldEventHandler) {\n if (oldEventHandler.fn === newEventHandler) {\n return\n } else {\n // 删除旧的,绑定新的\n node.removeEventListener(eventName, oldEventHandler)\n }\n }\n\n const listener: EventCenter.EventCallback = eventStore[eventName] = function (e: Event) {\n // React batch event updates\n unstable_batchedUpdates(() => newEventHandler.call(this, e))\n // 控制是否更新受控组件的 value 值\n finishedEventHandler(node)\n }\n listener.fn = newEventHandler\n node.addEventListener(\n eventName,\n listener\n )\n }\n}\n\n// TODO(performace): ReactComponent 已更新了一次,这里手动更新可能存在重复设置属性的问题\nexport const attachProps = (node: HTMLElementWithEvents, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n Object.keys(oldProps).forEach((name) => {\n if (['style', 'children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n // Note: 移除节点上冗余事件、属性\n if (!newProps.hasOwnProperty(name)) {\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc)\n }\n } else {\n (node as any)[name] = null\n node.removeAttribute(camelToDashCase(name))\n }\n }\n })\n // add any classes in className to the class list\n node.className = getClassName(node.classList, newProps, oldProps)\n\n Object.keys(newProps).forEach((name) => {\n /** Note(taro): 优化 style 属性的处理\n * 1. 考虑到兼容旧版本项目,支持使用字符串配置 style 属性,但这并非推荐写法,且不考虑优化在 style 移除时同步删除属性\n * 2. style 属性应当交与前端 UI 框架自行处理,不考虑实现类似于 reactify-wc 的更新策略\n */\n if ((name === 'style' && typeof newProps[name] !== 'string') || ['children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name])\n }\n } else {\n (node as any)[name] = newProps[name]\n const propType = typeof newProps[name]\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name])\n }\n }\n })\n\n // 保证受控组件会被默认绑定一个空事件,用于触发 finishedEventHandler 中的受控逻辑\n const controlledValue = getControlledValue(node)\n if (\n controlledValue &&\n newProps.hasOwnProperty(controlledValue)\n ) {\n const handleChangeEvent = ['INPUT', 'TEXTAREA'].includes(getComponentName(node)) ? 'input' : 'change'\n node.__events ||= {}\n if (!node.__events.hasOwnProperty(handleChangeEvent)) {\n syncEvent(node, handleChangeEvent, function () {})\n }\n }\n }\n}\n\nexport function applyUnControlledDefaultValue (node: HTMLElementWithEvents, props: any) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n const defaultValueName = 'default' + controlledValue.charAt(0).toUpperCase() + controlledValue.slice(1)\n if (!props.hasOwnProperty(controlledValue) && props.hasOwnProperty(defaultValueName)) {\n // 如果是可以受控的表单组件,当没有传入 value/checked 而是传入 defaultValue/defaultChecked 时,把表单值初始化为 defaultValue/defaultChecked\n node[controlledValue] = props[defaultValueName]\n node.setAttribute(controlledValue, props[defaultValueName])\n }\n}\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAKH,MAAM,UAAU,GAAG,CAAC,GAA4B,KAAI;AAClD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;AACrC,IAAA,GAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACvD,IAAA,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAEY,MAAA,YAAY,GAAG,CAAC,SAAuB,EAAE,QAAa,EAAE,QAAa,KAAI;IACpF,MAAM,YAAY,GAAW,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,KAA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C,WAAW,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACvG,IAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE;;QAEpF,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAA;QAC/C,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAA;KAC5D;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"attachProps.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/attachProps.ts"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/attachProps.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport { flushSync, unstable_batchedUpdates } from 'react-dom'\n\nimport { camelToDashCase } from './case'\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s))\n return map\n}\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class\n const oldClassProp: string = oldProps.className || oldProps.class\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList)\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : [])\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : [])\n const finalClassNames: string[] = []\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass)\n incomingPropClasses.delete(currentClass)\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass)\n }\n })\n incomingPropClasses.forEach((s) => finalClassNames.push(s))\n return finalClassNames.join(' ')\n}\n\n// Note(taro): 禁用 react 合成事件抛出 (避免自定义事件属性调用问题, 例如: event.detail.value 等)\nexport const isCoveredByReact = (__eventNameSuffix: string) => false\n\ninterface EventCenter {\n [key: string]: EventCenter.EventCallback | undefined\n}\n\nnamespace EventCenter {\n export interface EventCallback {\n (e: Event): any\n fn?: (e: Event) => any\n }\n}\n\ntype HTMLElementWithEvents = HTMLElement & { __events?: EventCenter }\n\nfunction getComponentName (node: HTMLElement): string {\n return node.tagName.replace(/^TARO-/, '').replace(/-CORE$/, '')\n}\n\nfunction getControlledValue (node: HTMLElement): string | null {\n const componentName = getComponentName(node)\n if (['INPUT', 'TEXTAREA', 'SLIDER', 'PICKER'].includes(componentName)) {\n return 'value'\n } else if (componentName === 'SWITCH') {\n // Radio、Checkbox 受 RadioGroup、CheckboxGroup 控制,不支持受控\n return 'checked'\n } else {\n return null\n }\n}\n\nfunction getPropsAfterReactUpdate (node: HTMLElement): Record<string, any> | null {\n const key = Object.keys(node).find(key => key.includes('__reactProps'))\n if (key) {\n return node[key] as Record<string, any>\n } else {\n return null\n }\n}\n\nfunction finishedEventHandler (node: HTMLElement) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n // 立即执行事件回调中用户可能触发了的 React 更新\n flushSync(() => {})\n\n // 组件在 React 更新后的 React props\n const newProps = getPropsAfterReactUpdate(node)\n if (newProps?.hasOwnProperty(controlledValue) && newProps[controlledValue] !== node[controlledValue]) {\n // 如果 React Props 的 value 和 DOM 上的 value 不一致,以 React Props 为准(受控)\n node[controlledValue] = newProps[controlledValue]\n node.setAttribute(controlledValue, newProps[controlledValue])\n }\n}\n\nexport const syncEvent = (\n node: HTMLElementWithEvents,\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events ||= {}\n const oldEventHandler = eventStore[eventName]\n\n if (!newEventHandler) {\n oldEventHandler && node.removeEventListener(eventName, oldEventHandler)\n } else {\n if (oldEventHandler) {\n if (oldEventHandler.fn === newEventHandler) {\n return\n } else {\n // 删除旧的,绑定新的\n node.removeEventListener(eventName, oldEventHandler)\n }\n }\n\n const listener: EventCenter.EventCallback = eventStore[eventName] = function (e: Event) {\n // React batch event updates\n unstable_batchedUpdates(() => newEventHandler.call(this, e))\n // 控制是否更新受控组件的 value 值\n finishedEventHandler(node)\n }\n listener.fn = newEventHandler\n node.addEventListener(\n eventName,\n listener\n )\n }\n}\n\n// TODO(performace): ReactComponent 已更新了一次,这里手动更新可能存在重复设置属性的问题\nexport const attachProps = (node: HTMLElementWithEvents, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n Object.keys(oldProps).forEach((name) => {\n if (['style', 'children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n // Note: 移除节点上冗余事件、属性\n if (!newProps.hasOwnProperty(name)) {\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc)\n }\n } else {\n (node as any)[name] = null\n node.removeAttribute(camelToDashCase(name))\n }\n }\n })\n // add any classes in className to the class list\n node.className = getClassName(node.classList, newProps, oldProps)\n\n Object.keys(newProps).forEach((name) => {\n /** Note(taro): 优化 style 属性的处理\n * 1. 考虑到兼容旧版本项目,支持使用字符串配置 style 属性,但这并非推荐写法,且不考虑优化在 style 移除时同步删除属性\n * 2. style 属性应当交与前端 UI 框架自行处理,不考虑实现类似于 reactify-wc 的更新策略\n */\n if ((name === 'style' && typeof newProps[name] !== 'string') || ['children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name])\n }\n } else {\n (node as any)[name] = newProps[name]\n const propType = typeof newProps[name]\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name])\n }\n }\n })\n\n // 保证受控组件会被默认绑定一个空事件,用于触发 finishedEventHandler 中的受控逻辑\n const controlledValue = getControlledValue(node)\n if (\n controlledValue &&\n newProps.hasOwnProperty(controlledValue)\n ) {\n const handleChangeEvent = ['INPUT', 'TEXTAREA'].includes(getComponentName(node)) ? 'input' : 'change'\n node.__events ||= {}\n if (!node.__events.hasOwnProperty(handleChangeEvent)) {\n syncEvent(node, handleChangeEvent, function () {})\n }\n }\n }\n}\n\nexport function applyUnControlledDefaultValue (node: HTMLElementWithEvents, props: any) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n const defaultValueName = 'default' + controlledValue.charAt(0).toUpperCase() + controlledValue.slice(1)\n if (!props.hasOwnProperty(controlledValue) && props.hasOwnProperty(defaultValueName)) {\n // 如果是可以受控的表单组件,当没有传入 value/checked 而是传入 defaultValue/defaultChecked 时,把表单值初始化为 defaultValue/defaultChecked\n node[controlledValue] = props[defaultValueName]\n node.setAttribute(controlledValue, props[defaultValueName])\n }\n}\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAKH,MAAM,UAAU,GAAG,CAAC,GAA4B,KAAI;AAClD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;AACrC,IAAA,GAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACvD,IAAA,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAEY,MAAA,YAAY,GAAG,CAAC,SAAuB,EAAE,QAAa,EAAE,QAAa,KAAI;IACpF,MAAM,YAAY,GAAW,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAA;IACjE,MAAM,YAAY,GAAW,QAAQ,CAAC,SAAS,IAAI,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AAI,CAAC,CAAA;;AAGhD,IAAA,IAAI,CAAC,eAAe;QAAE,OAAM;IAE5B,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACvG,IAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE;;QAEpF,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAA;QAC/C,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAC5D,KAAA;AACH;;;;"}
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/case.ts
|
|
3
3
|
* MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
declare const dashToPascalCase: (str: string) => string;
|
|
6
|
+
declare const camelToDashCase: (str: string) => string;
|
|
7
|
+
export { dashToPascalCase, camelToDashCase };
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export * from
|
|
6
|
+
import { StyleReactProps } from "../../interfaces-f526f1a2.js";
|
|
7
|
+
type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
|
|
8
|
+
type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
|
|
9
|
+
declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
|
|
10
|
+
declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
|
|
11
|
+
declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
|
|
12
|
+
declare const defineCustomElement: (tagName: string, customElement: any) => void;
|
|
13
|
+
export { StencilReactExternalProps, StencilReactForwardedRef, setRef, mergeRefs, createForwardRef, defineCustomElement };
|
|
14
|
+
export * from "./attachProps.js";
|
|
15
|
+
export * from "./case.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/index.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/index.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\n\nimport type { StyleReactProps } from '../interfaces'\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\nOmit<React.HTMLAttributes<ElementType>, 'style'> &\nStyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n}\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />\n }\n forwardRef.displayName = displayName\n\n return React.forwardRef(forwardRef)\n}\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement)\n }\n}\n\nexport * from './attachProps'\nexport * from './case'\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;MAYU,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,KAAI;AACpG,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/index.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/index.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\n\nimport type { StyleReactProps } from '../interfaces'\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\nOmit<React.HTMLAttributes<ElementType>, 'style'> &\nStyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n}\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />\n }\n forwardRef.displayName = displayName\n\n return React.forwardRef(forwardRef)\n}\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement)\n }\n}\n\nexport * from './attachProps'\nexport * from './case'\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;MAYU,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,KAAI;AACpG,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,KAAK,CAAC,CAAA;AACX,KAAA;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE;;AAErB,QAAA,GAAmC,CAAC,OAAO,GAAG,KAAK,CAAA;AACrD,KAAA;AACH,EAAC;MAEY,SAAS,GAAG,CACvB,GAAG,IAAoE,KAC7C;IAC1B,OAAO,CAAC,KAAU,KAAI;AACpB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACnB,YAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AACpB,SAAC,CAAC,CAAA;AACJ,KAAC,CAAA;AACH,EAAC;MAEY,gBAAgB,GAAG,CAAwB,cAAmB,EAAE,WAAmB,KAAI;AAClG,IAAA,MAAM,UAAU,GAAG,CACjB,KAAuD,EACvD,GAA0C,KACxC;QACF,OAAO,KAAA,CAAA,aAAA,CAAC,cAAc,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI,CAAA;AACzD,KAAC,CAAA;AACD,IAAA,UAAU,CAAC,WAAW,GAAG,WAAW,CAAA;AAEpC,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AACrC,EAAC;MAEY,mBAAmB,GAAG,CAAC,OAAe,EAAE,aAAkB,KAAI;AACzE,IAAA,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;AACxG,QAAA,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;AAC9C,KAAA;AACH;;;;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
declare const components: (string | (string | {
|
|
2
|
+
type: string;
|
|
3
|
+
component: {
|
|
4
|
+
name: string;
|
|
5
|
+
mixins: ({
|
|
6
|
+
computed: {
|
|
7
|
+
listeners(): any;
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
mounted(): void;
|
|
11
|
+
beforeDestroy(): void;
|
|
12
|
+
})[];
|
|
13
|
+
props: {
|
|
14
|
+
scrollX: BooleanConstructor;
|
|
15
|
+
scrollY: BooleanConstructor;
|
|
16
|
+
};
|
|
17
|
+
render(createElement: any): any;
|
|
18
|
+
};
|
|
19
|
+
})[] | (string | {
|
|
20
|
+
classNames: string[];
|
|
21
|
+
})[] | (string | {
|
|
22
|
+
type: string;
|
|
23
|
+
component: {
|
|
24
|
+
name: string;
|
|
25
|
+
mixins: ({
|
|
26
|
+
computed: {
|
|
27
|
+
listeners(): any;
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
mounted(): void;
|
|
31
|
+
beforeDestroy(): void;
|
|
32
|
+
})[];
|
|
33
|
+
props: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
render(createElement: any): any;
|
|
37
|
+
};
|
|
38
|
+
})[] | (string | {
|
|
39
|
+
type: string;
|
|
40
|
+
component: {
|
|
41
|
+
name: string;
|
|
42
|
+
mixins: ({
|
|
43
|
+
computed: {
|
|
44
|
+
listeners(): any;
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
mounted(): void;
|
|
48
|
+
beforeDestroy(): void;
|
|
49
|
+
})[];
|
|
50
|
+
props: {
|
|
51
|
+
selectable: BooleanConstructor;
|
|
52
|
+
};
|
|
53
|
+
render(createElement: any): any;
|
|
54
|
+
};
|
|
55
|
+
})[] | (string | {
|
|
56
|
+
type: string;
|
|
57
|
+
event: string;
|
|
58
|
+
})[] | (string | {
|
|
59
|
+
type: string;
|
|
60
|
+
component: {
|
|
61
|
+
name: string;
|
|
62
|
+
mixins: ({
|
|
63
|
+
computed: {
|
|
64
|
+
listeners(): any;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
mounted(): void;
|
|
68
|
+
beforeDestroy(): void;
|
|
69
|
+
})[];
|
|
70
|
+
model: {
|
|
71
|
+
event: string;
|
|
72
|
+
};
|
|
73
|
+
props: {
|
|
74
|
+
range: ArrayConstructor;
|
|
75
|
+
rangeKey: StringConstructor;
|
|
76
|
+
value: (ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
77
|
+
};
|
|
78
|
+
mounted(): void;
|
|
79
|
+
watch: {
|
|
80
|
+
value(newVal: any): void;
|
|
81
|
+
};
|
|
82
|
+
render(createElement: any): any;
|
|
83
|
+
};
|
|
84
|
+
})[] | (string | {
|
|
85
|
+
type: string;
|
|
86
|
+
event: string;
|
|
87
|
+
modelValue: string;
|
|
88
|
+
classNames: string[];
|
|
89
|
+
})[] | (string | {
|
|
90
|
+
type: string;
|
|
91
|
+
event: string;
|
|
92
|
+
modelValue: string;
|
|
93
|
+
})[] | (string | {
|
|
94
|
+
type: string;
|
|
95
|
+
component: {
|
|
96
|
+
name: string;
|
|
97
|
+
mixins: ({
|
|
98
|
+
computed: {
|
|
99
|
+
listeners(): any;
|
|
100
|
+
};
|
|
101
|
+
} | {
|
|
102
|
+
mounted(): void;
|
|
103
|
+
beforeDestroy(): void;
|
|
104
|
+
})[];
|
|
105
|
+
props: {
|
|
106
|
+
mode: StringConstructor;
|
|
107
|
+
};
|
|
108
|
+
render(createElement: any): any;
|
|
109
|
+
};
|
|
110
|
+
})[])[];
|
|
111
|
+
export { components as default };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import Icon from './icon.js';
|
|
2
|
+
import Image from './image.js';
|
|
3
|
+
import Picker from './picker.js';
|
|
4
|
+
import ScrollView from './scroll-view.js';
|
|
5
|
+
import Text from './text.js';
|
|
6
|
+
|
|
7
|
+
const components = [
|
|
8
|
+
// 视图容器
|
|
9
|
+
'taro-cover-image',
|
|
10
|
+
'taro-cover-view',
|
|
11
|
+
'taro-match-media',
|
|
12
|
+
'taro-movable-area',
|
|
13
|
+
'taro-movable-view',
|
|
14
|
+
'taro-page-container',
|
|
15
|
+
'taro-root-portal',
|
|
16
|
+
['taro-scroll-view', { type: 'component', component: ScrollView }],
|
|
17
|
+
'taro-share-element',
|
|
18
|
+
'taro-swiper',
|
|
19
|
+
['taro-swiper-item', { classNames: ['swiper-slide'] }],
|
|
20
|
+
'taro-view',
|
|
21
|
+
// 基础内容
|
|
22
|
+
['taro-icon', { type: 'component', component: Icon }],
|
|
23
|
+
['taro-progress', { classNames: ['weui-progress'] }],
|
|
24
|
+
'taro-rich-text',
|
|
25
|
+
['taro-text', { type: 'component', component: Text }],
|
|
26
|
+
// 表单组件
|
|
27
|
+
'taro-button',
|
|
28
|
+
['taro-checkbox', { classNames: ['weui-cells_checkbox'] }],
|
|
29
|
+
'taro-checkbox-group',
|
|
30
|
+
'taro-editor',
|
|
31
|
+
'taro-form',
|
|
32
|
+
['taro-input', { type: 'forms', event: 'input' }],
|
|
33
|
+
'taro-keyboard-accessory',
|
|
34
|
+
'taro-label',
|
|
35
|
+
['taro-picker', { type: 'component', component: Picker }],
|
|
36
|
+
'taro-picker-view',
|
|
37
|
+
'taro-picker-view-column',
|
|
38
|
+
['taro-radio', { classNames: ['weui-cells_checkbox'] }],
|
|
39
|
+
['taro-radio-group', { classNames: ['weui-cells_radiogroup'] }],
|
|
40
|
+
['taro-slider', { type: 'forms', event: 'change', modelValue: 'value', classNames: ['weui-slider-box'] }],
|
|
41
|
+
['taro-switch', { type: 'forms', event: 'change', modelValue: 'checked' }],
|
|
42
|
+
['taro-textarea', { type: 'forms', event: 'input' }],
|
|
43
|
+
// 导航
|
|
44
|
+
'taro-functional-page-navigator',
|
|
45
|
+
'taro-navigator',
|
|
46
|
+
// 媒体组件
|
|
47
|
+
'taro-audio',
|
|
48
|
+
'taro-camera',
|
|
49
|
+
['taro-image', { type: 'component', component: Image }],
|
|
50
|
+
'taro-live-player',
|
|
51
|
+
['taro-video', { classNames: ['taro-video-container'] }],
|
|
52
|
+
'taro-voip-room',
|
|
53
|
+
// 地图
|
|
54
|
+
'taro-map',
|
|
55
|
+
// 画布
|
|
56
|
+
'taro-canvas',
|
|
57
|
+
// 开放能力
|
|
58
|
+
'taro-web-view',
|
|
59
|
+
'taro-ad',
|
|
60
|
+
'taro-ad-custom',
|
|
61
|
+
'taro-official-account',
|
|
62
|
+
'taro-open-data',
|
|
63
|
+
// 导航栏
|
|
64
|
+
'taro-navigation-bar',
|
|
65
|
+
// 页面属性配置节点
|
|
66
|
+
'taro-page-meta',
|
|
67
|
+
// 其他
|
|
68
|
+
'taro-block',
|
|
69
|
+
'taro-custom-wrapper',
|
|
70
|
+
'taro-slot'
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
export { components as default };
|
|
74
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sources":["../../../../taro-components-library-vue2/src/component-lib/components.ts"],"sourcesContent":["import Icon from './icon'\nimport Image from './image'\nimport Picker from './picker'\nimport ScrollView from './scroll-view'\nimport Text from './text'\n\nconst components = [\n // 视图容器\n 'taro-cover-image',\n 'taro-cover-view',\n 'taro-match-media',\n 'taro-movable-area',\n 'taro-movable-view',\n 'taro-page-container',\n 'taro-root-portal',\n ['taro-scroll-view', { type: 'component', component: ScrollView }],\n 'taro-share-element',\n 'taro-swiper',\n ['taro-swiper-item', { classNames: ['swiper-slide'] }],\n 'taro-view',\n\n // 基础内容\n ['taro-icon', { type: 'component', component: Icon }],\n ['taro-progress', { classNames: ['weui-progress'] }],\n 'taro-rich-text',\n ['taro-text', { type: 'component', component: Text }],\n\n // 表单组件\n 'taro-button',\n ['taro-checkbox', { classNames: ['weui-cells_checkbox'] }],\n 'taro-checkbox-group',\n 'taro-editor',\n 'taro-form',\n ['taro-input', { type: 'forms', event: 'input' }],\n 'taro-keyboard-accessory',\n 'taro-label',\n ['taro-picker', { type: 'component', component: Picker }],\n 'taro-picker-view',\n 'taro-picker-view-column',\n ['taro-radio', { classNames: ['weui-cells_checkbox'] }],\n ['taro-radio-group', { classNames: ['weui-cells_radiogroup'] }],\n ['taro-slider', { type: 'forms', event: 'change', modelValue: 'value', classNames: ['weui-slider-box'] }],\n ['taro-switch', { type: 'forms', event: 'change', modelValue: 'checked' }],\n ['taro-textarea', { type: 'forms', event: 'input' }],\n\n // 导航\n 'taro-functional-page-navigator',\n 'taro-navigator',\n\n // 媒体组件\n 'taro-audio',\n 'taro-camera',\n ['taro-image', { type: 'component', component: Image }],\n 'taro-live-player',\n ['taro-video', { classNames: ['taro-video-container'] }],\n 'taro-voip-room',\n\n // 地图\n 'taro-map',\n\n // 画布\n 'taro-canvas',\n\n // 开放能力\n 'taro-web-view',\n 'taro-ad',\n 'taro-ad-custom',\n 'taro-official-account',\n 'taro-open-data',\n\n // 导航栏\n 'taro-navigation-bar',\n\n // 页面属性配置节点\n 'taro-page-meta',\n\n // 其他\n 'taro-block',\n 'taro-custom-wrapper',\n 'taro-slot'\n]\n\nexport default components\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,UAAU,GAAG;;IAEjB,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SA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O,EAAE,CAAC;;IAGpD,gCAAgC;IAChC,gBAAgB;;IAGhB,YAAY;IACZ,aAAa;IACb,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACvD,kBAAkB;IAClB,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,CAAC,sBAAsB,CAAC,EAAE,CAAC;IACxD,gBAAgB;;IAGhB,UAAU;;IAGV,aAAa;;IAGb,eAAe;IACf,SAAS;IACT,gBAAgB;IAChB,uBAAuB;IACvB,gBAAgB;;IAGhB,qBAAqB;;IAGrB,gBAAgB;;IAGhB,YAAY;IACZ,qBAAqB;IACrB,WAAW;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare function createComponent(name: any, classNames?: any[]): {
|
|
2
|
+
name: any;
|
|
3
|
+
mixins: ({
|
|
4
|
+
computed: {
|
|
5
|
+
listeners(): any;
|
|
6
|
+
};
|
|
7
|
+
} | {
|
|
8
|
+
mounted(): void;
|
|
9
|
+
beforeDestroy(): void;
|
|
10
|
+
})[];
|
|
11
|
+
props: string[];
|
|
12
|
+
render(createElement: any): any;
|
|
13
|
+
};
|
|
14
|
+
export { createComponent as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { listeners } from './mixins/listeners.js';
|
|
2
|
+
import { refs } from './mixins/refs.js';
|
|
3
|
+
|
|
4
|
+
function createComponent(name, classNames = []) {
|
|
5
|
+
return {
|
|
6
|
+
name,
|
|
7
|
+
mixins: [listeners, refs],
|
|
8
|
+
props: ['nativeProps'],
|
|
9
|
+
render(createElement) {
|
|
10
|
+
return createElement(`${name}-core`, {
|
|
11
|
+
class: ['hydrated', ...classNames],
|
|
12
|
+
domProps: {
|
|
13
|
+
nativeProps: this.nativeProps
|
|
14
|
+
},
|
|
15
|
+
attrs: this.$attrs,
|
|
16
|
+
on: this.listeners
|
|
17
|
+
}, this.$slots.default);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { createComponent as default };
|
|
23
|
+
//# sourceMappingURL=createComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-vue2/src/component-lib/createComponent.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default function createComponent (name, classNames = []) {\n return {\n name,\n mixins: [listeners, refs],\n props: ['nativeProps'],\n render (createElement) {\n return createElement(`${name}-core`, {\n class: ['hydrated', ...classNames],\n domProps: {\n nativeProps: this.nativeProps\n },\n attrs: this.$attrs,\n on: this.listeners\n }, this.$slots.default)\n }\n }\n}\n"],"names":[],"mappings":";;;AAGwB,SAAA,eAAe,CAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAA;IAC5D,OAAO;QACL,IAAI;AACJ,QAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;QACzB,KAAK,EAAE,CAAC,aAAa,CAAC;AACtB,QAAA,MAAM,CAAE,aAAa,EAAA;AACnB,YAAA,OAAO,aAAa,CAAC,CAAG,EAAA,IAAI,OAAO,EAAE;AACnC,gBAAA,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC;AAClC,gBAAA,QAAQ,EAAE;oBACR,WAAW,EAAE,IAAI,CAAC,WAAW;AAC9B,iBAAA;gBACD,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,EAAE,EAAE,IAAI,CAAC,SAAS;AACnB,aAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACxB;KACF,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare function createFormsComponent(name: any, event: any, modelValue?: string, classNames?: any[]): {
|
|
2
|
+
name: any;
|
|
3
|
+
mixins: ({
|
|
4
|
+
computed: {
|
|
5
|
+
listeners(): any;
|
|
6
|
+
};
|
|
7
|
+
} | {
|
|
8
|
+
mounted(): void;
|
|
9
|
+
beforeDestroy(): void;
|
|
10
|
+
})[];
|
|
11
|
+
model: {
|
|
12
|
+
prop: string;
|
|
13
|
+
event: string;
|
|
14
|
+
};
|
|
15
|
+
props: Record<string, any>;
|
|
16
|
+
methods: {
|
|
17
|
+
input(e: any): void;
|
|
18
|
+
change(e: any): void;
|
|
19
|
+
};
|
|
20
|
+
render(createElement: any): any;
|
|
21
|
+
};
|
|
22
|
+
export { createFormsComponent as default };
|