@tarojs/components 3.6.0-canary.4 → 3.6.0-canary.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
- package/dist/collection/components/swiper/swiper.js +20 -0
- package/dist/collection/components/swiper/swiper.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +2 -0
- package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-components.js.map +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/react/component-lib/input.js +2 -2
- package/dist/react/component-lib/reactify-wc.js +13 -13
- package/dist/react/helper.js +1 -1
- package/dist/react/react-component-lib/createComponent.js +10 -10
- package/dist/react/react-component-lib/createOverlayComponent.js +18 -16
- package/dist/react/react-component-lib/utils/attachProps.js +1 -1
- package/dist/react/react-component-lib/utils/index.js +7 -6
- package/dist/taro-components/{p-1cd1c507.system.entry.js → p-6831f7b1.system.entry.js} +2 -2
- package/dist/taro-components/p-6831f7b1.system.entry.js.map +1 -0
- package/dist/taro-components/p-cb17d8bd.system.js +1 -1
- package/dist/taro-components/p-cb17d8bd.system.js.map +1 -1
- package/dist/taro-components/{p-a2aab820.entry.js → p-d388c097.entry.js} +2 -2
- package/dist/taro-components/p-d388c097.entry.js.map +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.esm.js.map +1 -1
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/vue2/component-lib/createComponent.js +1 -1
- package/dist/vue2/component-lib/createFormsComponent.js +2 -2
- package/dist/vue2/component-lib/index.js +1 -1
- package/dist/vue2/component-lib/mixins/listeners.js +1 -1
- package/dist/vue2/component-lib/mixins/refs.js +1 -1
- package/dist/vue2/component-lib/picker.js +1 -1
- package/dist/vue2/component-lib/scroll-view.js +1 -1
- package/dist/vue2/components.js +3 -2
- package/dist/vue2/index.js +2 -2
- package/dist/vue2/vue-component-lib/utils.js +2 -2
- package/dist/vue3/component-lib/createComponent.js +1 -1
- package/dist/vue3/component-lib/createFormsComponent.js +3 -3
- package/dist/vue3/components.js +1 -1
- package/dist/vue3/index.js +1 -1
- package/dist/vue3/vue-component-lib/utils.js +3 -3
- package/package.json +4 -4
- package/types/Ad.d.ts +1 -1
- package/types/Audio.d.ts +1 -1
- package/types/Button.d.ts +1 -1
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +1 -1
- package/types/Checkbox.d.ts +1 -1
- package/types/CheckboxGroup.d.ts +1 -1
- package/types/CoverImage.d.ts +1 -1
- package/types/CoverView.d.ts +102 -4
- package/types/CustomWrapper.d.ts +1 -1
- package/types/Form.d.ts +1 -1
- package/types/Icon.d.ts +1 -1
- package/types/Image.d.ts +1 -1
- package/types/Input.d.ts +71 -8
- package/types/LivePlayer.d.ts +1 -1
- package/types/LivePusher.d.ts +1 -1
- package/types/Lottie.d.ts +0 -6
- package/types/Map.d.ts +1 -1
- package/types/MatchMedia.d.ts +1 -1
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +17 -17
- package/types/Navigator.d.ts +1 -1
- package/types/OpenData.d.ts +1 -1
- package/types/PageContainer.d.ts +28 -18
- package/types/PageMeta.d.ts +1 -1
- package/types/Picker.d.ts +1 -1
- package/types/PickerView.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +1 -1
- package/types/RadioGroup.d.ts +1 -1
- package/types/RootPortal.d.ts +11 -2
- package/types/ScrollView.d.ts +1 -1
- package/types/ShareElement.d.ts +20 -10
- package/types/Slider.d.ts +1 -1
- package/types/Swiper.d.ts +13 -1
- package/types/SwiperItem.d.ts +3 -2
- package/types/Switch.d.ts +1 -1
- package/types/Text.d.ts +1 -1
- package/types/Textarea.d.ts +7 -1
- package/types/Video.d.ts +7 -1
- package/types/View.d.ts +1 -1
- package/types/WebView.d.ts +1 -1
- package/types/index.vue3.d.ts +268 -259
- package/dist/taro-components/p-1cd1c507.system.entry.js.map +0 -1
- package/dist/taro-components/p-a2aab820.entry.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import reactifyWc from './reactify-wc';
|
|
4
4
|
var Input = reactifyWc('taro-input-core');
|
|
5
5
|
var h = React.createElement; // eslint-disable-next-line react/display-name
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default React.forwardRef(function (props, ref) {
|
|
8
8
|
var args = _objectSpread({}, props);
|
|
9
9
|
|
|
10
10
|
if (args.hasOwnProperty('focus')) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
2
|
-
import _slicedToArray from "
|
|
3
|
-
import _typeof from "
|
|
4
|
-
import _classCallCheck from "
|
|
5
|
-
import _createClass from "
|
|
6
|
-
import _assertThisInitialized from "
|
|
7
|
-
import _inherits from "
|
|
8
|
-
import _createSuper from "
|
|
9
|
-
import _defineProperty from "
|
|
10
|
-
import _toConsumableArray from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* https://github.com/BBKolton/reactify-wc/
|
|
@@ -154,7 +154,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
154
154
|
_defineProperty(_assertThisInitialized(_this), "ref", void 0);
|
|
155
155
|
|
|
156
156
|
_this.eventHandlers = [];
|
|
157
|
-
_this.ref =
|
|
157
|
+
_this.ref = createRef();
|
|
158
158
|
return _this;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -225,7 +225,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
225
225
|
ref: this.ref
|
|
226
226
|
};
|
|
227
227
|
if (dangerouslySetInnerHTML) props.dangerouslySetInnerHTML = dangerouslySetInnerHTML;
|
|
228
|
-
return
|
|
228
|
+
return createElement(WC, props, children);
|
|
229
229
|
}
|
|
230
230
|
}]);
|
|
231
231
|
|
|
@@ -233,7 +233,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
233
233
|
}(React.Component); // eslint-disable-next-line react/display-name
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
return
|
|
236
|
+
return React.forwardRef(function (props, ref) {
|
|
237
237
|
return h(Index, _objectSpread(_objectSpread({}, props), {}, {
|
|
238
238
|
forwardRef: ref
|
|
239
239
|
}));
|
package/dist/react/helper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
export var manipulatePropsFunction = function manipulatePropsFunction(originalProps) {
|
|
3
3
|
var propsToPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4
4
|
var dangerouslySetInnerHTML = originalProps.dangerouslySetInnerHTML;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
2
|
-
import _typeof from "
|
|
3
|
-
import _objectWithoutProperties from "
|
|
4
|
-
import _classCallCheck from "
|
|
5
|
-
import _createClass from "
|
|
6
|
-
import _assertThisInitialized from "
|
|
7
|
-
import _inherits from "
|
|
8
|
-
import _createSuper from "
|
|
9
|
-
import _defineProperty from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
var _excluded = ["children", "forwardedRef", "style", "className", "ref"];
|
|
11
11
|
import React, { createElement } from 'react';
|
|
12
12
|
import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
|
|
@@ -98,7 +98,7 @@ export var createReactComponent = function createReactComponent(tagName, ReactCo
|
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
return
|
|
101
|
+
return createElement(tagName, newProps, children);
|
|
102
102
|
}
|
|
103
103
|
}], [{
|
|
104
104
|
key: "displayName",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
7
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
8
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
11
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
12
|
var _excluded = ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"];
|
|
12
13
|
import React from 'react';
|
|
13
14
|
import ReactDOM from 'react-dom';
|
|
14
15
|
import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
export var createOverlayComponent = function createOverlayComponent(tagName, controller, customElement) {
|
|
17
17
|
defineCustomElement(tagName, customElement);
|
|
18
18
|
var displayName = dashToPascalCase(tagName);
|
|
@@ -185,7 +185,7 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
185
185
|
* overlay is dismissing otherwise component
|
|
186
186
|
* will be hidden before animation is done.
|
|
187
187
|
*/
|
|
188
|
-
return
|
|
188
|
+
return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
|
|
189
189
|
}
|
|
190
190
|
}], [{
|
|
191
191
|
key: "displayName",
|
|
@@ -197,9 +197,11 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
197
197
|
return Overlay;
|
|
198
198
|
}(React.Component);
|
|
199
199
|
|
|
200
|
-
return
|
|
201
|
-
return
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
return React.forwardRef(function (props, ref) {
|
|
201
|
+
return h(Overlay, _mergeJSXProps([{}, props, {
|
|
202
|
+
"attrs": {
|
|
203
|
+
"forwardedRef": ref
|
|
204
|
+
}
|
|
205
|
+
}]));
|
|
204
206
|
});
|
|
205
207
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _typeof from "
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
2
|
import { camelToDashCase } from './case';
|
|
3
3
|
export var attachProps = function attachProps(node, newProps) {
|
|
4
4
|
var oldProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
export var setRef = function setRef(ref, value) {
|
|
5
4
|
if (typeof ref === 'function') {
|
|
6
5
|
ref(value);
|
|
@@ -22,13 +21,15 @@ export var mergeRefs = function mergeRefs() {
|
|
|
22
21
|
};
|
|
23
22
|
export var createForwardRef = function createForwardRef(ReactComponent, displayName) {
|
|
24
23
|
var forwardRef = function forwardRef(props, ref) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return h(ReactComponent, _mergeJSXProps([{}, props, {
|
|
25
|
+
"attrs": {
|
|
26
|
+
"forwardedRef": ref
|
|
27
|
+
}
|
|
28
|
+
}]));
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
forwardRef.displayName = displayName;
|
|
31
|
-
return
|
|
32
|
+
return React.forwardRef(forwardRef);
|
|
32
33
|
};
|
|
33
34
|
export var defineCustomElement = function defineCustomElement(tagName, customElement) {
|
|
34
35
|
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|