@ray-js/smart-ui 2.10.1-beta-2 → 2.10.1-beta-3
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/es/action-sheet/ActionSheet.d.ts +5 -2
- package/es/action-sheet/ActionSheet.js +25 -2
- package/es/bottom-sheet/BottomSheet.d.ts +5 -2
- package/es/bottom-sheet/BottomSheet.js +25 -2
- package/es/popup/Popup.js +3 -3
- package/lib/action-sheet/ActionSheet.d.ts +5 -2
- package/lib/action-sheet/ActionSheet.js +36 -1
- package/lib/bottom-sheet/BottomSheet.d.ts +5 -2
- package/lib/bottom-sheet/BottomSheet.js +36 -1
- package/lib/popup/Popup.js +3 -3
- package/package.json +2 -2
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default function ActionSheet({ children, show, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
show: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
13
|
// @ts-ignore
|
|
2
|
-
import
|
|
14
|
+
import ActionSheetMini from '@tuya-miniapp/smart-ui/dist/action-sheet/index';
|
|
15
|
+
import { useEffect, useState } from 'react';
|
|
3
16
|
import { withReactProps } from '../common/withReactProps';
|
|
4
|
-
|
|
17
|
+
const ActionSheetComp = withReactProps(ActionSheetMini);
|
|
18
|
+
export default function ActionSheet(_a) {
|
|
19
|
+
var { children, show } = _a, rest = __rest(_a, ["children", "show"]);
|
|
20
|
+
const [isShowed, setIsShowed] = useState(show);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!show)
|
|
23
|
+
return;
|
|
24
|
+
setIsShowed(show);
|
|
25
|
+
}, [show]);
|
|
26
|
+
return (_jsx(ActionSheetComp, Object.assign({ show: show }, rest, { children: isShowed && children })));
|
|
27
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default function BottomSheet({ children, show, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
show: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
13
|
// @ts-ignore
|
|
2
|
-
import
|
|
14
|
+
import BottomSheetMini from '@tuya-miniapp/smart-ui/dist/bottom-sheet/index';
|
|
15
|
+
import { useEffect, useState } from 'react';
|
|
3
16
|
import { withReactProps } from '../common/withReactProps';
|
|
4
|
-
|
|
17
|
+
const BottomSheetComp = withReactProps(BottomSheetMini);
|
|
18
|
+
export default function BottomSheet(_a) {
|
|
19
|
+
var { children, show } = _a, rest = __rest(_a, ["children", "show"]);
|
|
20
|
+
const [isShowed, setIsShowed] = useState(show);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!show)
|
|
23
|
+
return;
|
|
24
|
+
setIsShowed(show);
|
|
25
|
+
}, [show]);
|
|
26
|
+
return (_jsx(BottomSheetComp, Object.assign({ show: show }, rest, { children: isShowed && children })));
|
|
27
|
+
}
|
package/es/popup/Popup.js
CHANGED
|
@@ -17,11 +17,11 @@ import { withReactProps } from '../common/withReactProps';
|
|
|
17
17
|
const PopupComp = withReactProps(PopupMini);
|
|
18
18
|
export default function Popup(_a) {
|
|
19
19
|
var { children, show } = _a, rest = __rest(_a, ["children", "show"]);
|
|
20
|
-
const [
|
|
20
|
+
const [isShowed, setIsShowed] = useState(show);
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
if (!show)
|
|
23
23
|
return;
|
|
24
|
-
|
|
24
|
+
setIsShowed(show);
|
|
25
25
|
}, [show]);
|
|
26
|
-
return (_jsx(PopupComp, Object.assign({ show: show }, rest, { children:
|
|
26
|
+
return (_jsx(PopupComp, Object.assign({ show: show }, rest, { children: isShowed && children })));
|
|
27
27
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default function ActionSheet({ children, show, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
show: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
2
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
26
|
};
|
|
5
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
29
|
// @ts-ignore
|
|
7
30
|
var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/dist/action-sheet/index"));
|
|
31
|
+
var react_1 = require("react");
|
|
8
32
|
var withReactProps_1 = require("../common/withReactProps");
|
|
9
|
-
|
|
33
|
+
var ActionSheetComp = (0, withReactProps_1.withReactProps)(index_1.default);
|
|
34
|
+
function ActionSheet(_a) {
|
|
35
|
+
var children = _a.children, show = _a.show, rest = __rest(_a, ["children", "show"]);
|
|
36
|
+
var _b = (0, react_1.useState)(show), isShowed = _b[0], setIsShowed = _b[1];
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
38
|
+
if (!show)
|
|
39
|
+
return;
|
|
40
|
+
setIsShowed(show);
|
|
41
|
+
}, [show]);
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(ActionSheetComp, __assign({ show: show }, rest, { children: isShowed && children })));
|
|
43
|
+
}
|
|
44
|
+
exports.default = ActionSheet;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default function BottomSheet({ children, show, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
show: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
2
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
26
|
};
|
|
5
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
29
|
// @ts-ignore
|
|
7
30
|
var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/dist/bottom-sheet/index"));
|
|
31
|
+
var react_1 = require("react");
|
|
8
32
|
var withReactProps_1 = require("../common/withReactProps");
|
|
9
|
-
|
|
33
|
+
var BottomSheetComp = (0, withReactProps_1.withReactProps)(index_1.default);
|
|
34
|
+
function BottomSheet(_a) {
|
|
35
|
+
var children = _a.children, show = _a.show, rest = __rest(_a, ["children", "show"]);
|
|
36
|
+
var _b = (0, react_1.useState)(show), isShowed = _b[0], setIsShowed = _b[1];
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
38
|
+
if (!show)
|
|
39
|
+
return;
|
|
40
|
+
setIsShowed(show);
|
|
41
|
+
}, [show]);
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(BottomSheetComp, __assign({ show: show }, rest, { children: isShowed && children })));
|
|
43
|
+
}
|
|
44
|
+
exports.default = BottomSheet;
|
package/lib/popup/Popup.js
CHANGED
|
@@ -33,12 +33,12 @@ var withReactProps_1 = require("../common/withReactProps");
|
|
|
33
33
|
var PopupComp = (0, withReactProps_1.withReactProps)(index_1.default);
|
|
34
34
|
function Popup(_a) {
|
|
35
35
|
var children = _a.children, show = _a.show, rest = __rest(_a, ["children", "show"]);
|
|
36
|
-
var _b = (0, react_1.useState)(show),
|
|
36
|
+
var _b = (0, react_1.useState)(show), isShowed = _b[0], setIsShowed = _b[1];
|
|
37
37
|
(0, react_1.useEffect)(function () {
|
|
38
38
|
if (!show)
|
|
39
39
|
return;
|
|
40
|
-
|
|
40
|
+
setIsShowed(show);
|
|
41
41
|
}, [show]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(PopupComp, __assign({ show: show }, rest, { children:
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(PopupComp, __assign({ show: show }, rest, { children: isShowed && children })));
|
|
43
43
|
}
|
|
44
44
|
exports.default = Popup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/smart-ui",
|
|
3
|
-
"version": "2.10.1-beta-
|
|
3
|
+
"version": "2.10.1-beta-3",
|
|
4
4
|
"description": "轻量、可靠的智能小程序 UI 组件库",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"syncMiniappData": "node ./build/syncMiniappData.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@ray-js/components-ty-slider": "^0.3.8",
|
|
45
|
-
"@tuya-miniapp/smart-ui": "2.10.1-beta-
|
|
45
|
+
"@tuya-miniapp/smart-ui": "2.10.1-beta-3",
|
|
46
46
|
"lodash-es": "^4.17.21"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|