@ray-js/smart-ui 1.2.0 → 1.2.2
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/@types/action-sheet/index.d.ts +6 -2
- package/dist/@types/base/open-type.d.ts +1 -11
- package/dist/@types/button/index.d.ts +2 -1
- package/dist/@types/cell/index.d.ts +1 -1
- package/dist/@types/dialog/dialog.d.ts +7 -1
- package/dist/@types/dialog/index.d.ts +3 -6
- package/dist/@types/divider/index.d.ts +1 -1
- package/dist/@types/field/index.d.ts +3 -3
- package/dist/@types/icon/index.d.ts +2 -1
- package/dist/@types/nav-bar/index.d.ts +1 -1
- package/dist/@types/notice-bar/index.d.ts +1 -7
- package/dist/@types/overlay/index.d.ts +1 -1
- package/dist/@types/search/index.d.ts +2 -1
- package/dist/@types/tab/index.d.ts +1 -1
- package/dist/@types/tabbar/index.d.ts +2 -2
- package/dist/@types/transition/index.d.ts +2 -1
- package/dist/tabbar-item/TabbarItem.d.ts +2 -2
- package/dist/tabbar-item/TabbarItem.js +2 -1
- package/package.json +6 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SmartComponent, SmartEventHandler } from '../base';
|
|
2
2
|
import { SmartTransitionEvents } from '../transition';
|
|
3
|
-
export interface SmartAction
|
|
3
|
+
export interface SmartAction {
|
|
4
4
|
/**
|
|
5
5
|
* 标题
|
|
6
6
|
*/
|
|
@@ -29,6 +29,10 @@ export interface SmartAction extends Omit<SmartOpenTypeCamelCaseProps, 'business
|
|
|
29
29
|
* 为对应列添加额外的 `class` 类名
|
|
30
30
|
*/
|
|
31
31
|
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 业务自定义的 Action 属性
|
|
34
|
+
*/
|
|
35
|
+
[key: string]: any;
|
|
32
36
|
}
|
|
33
37
|
export interface SmartActionSheetProps {
|
|
34
38
|
/**
|
|
@@ -5,15 +5,11 @@ export type WechatOpenType =
|
|
|
5
5
|
*
|
|
6
6
|
* 可以从 `bindcontact` 回调中获得具体信息
|
|
7
7
|
*
|
|
8
|
-
* [具体说明](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html)
|
|
9
|
-
*
|
|
10
8
|
* (*小程序插件中不能使用*)
|
|
11
9
|
*/
|
|
12
10
|
'contact'
|
|
13
11
|
/**
|
|
14
12
|
* 触发用户转发
|
|
15
|
-
*
|
|
16
|
-
* 使用前建议先阅读[使用指引](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#使用指引)
|
|
17
13
|
*/
|
|
18
14
|
| 'share'
|
|
19
15
|
/**
|
|
@@ -21,8 +17,6 @@ export type WechatOpenType =
|
|
|
21
17
|
*
|
|
22
18
|
* 可以从 `bindgetphonenumber` 回调中获取到用户信息
|
|
23
19
|
*
|
|
24
|
-
* [具体说明](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html)
|
|
25
|
-
*
|
|
26
20
|
* (*小程序插件中不能使用*)
|
|
27
21
|
*/
|
|
28
22
|
| 'getPhoneNumber'
|
|
@@ -37,7 +31,7 @@ export type WechatOpenType =
|
|
|
37
31
|
/**
|
|
38
32
|
* 打开 `APP`
|
|
39
33
|
*
|
|
40
|
-
* 以通过 `app-parameter` 属性设定向APP传的参数
|
|
34
|
+
* 以通过 `app-parameter` 属性设定向APP传的参数
|
|
41
35
|
*/
|
|
42
36
|
| 'launchApp'
|
|
43
37
|
/**
|
|
@@ -46,10 +40,6 @@ export type WechatOpenType =
|
|
|
46
40
|
| 'openSetting'
|
|
47
41
|
/**
|
|
48
42
|
* 打开“意见反馈”页面
|
|
49
|
-
*
|
|
50
|
-
* 用户可提交反馈内容并上传[日志](https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.getLogManager.html)
|
|
51
|
-
*
|
|
52
|
-
* 开发者可以登录小程序[管理后台](https://mp.weixin.qq.com)后进入左侧菜单“客服反馈”页面获取到反馈内容
|
|
53
43
|
*/
|
|
54
44
|
| 'feedback'
|
|
55
45
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SmartOpenTypeProps, SmartBaseExternalClassName, SmartBaseLoadingExternalClassName, SmartComponent, SmartEventHandler, SmartTouchEvent } from '../base';
|
|
2
3
|
export interface SmartButtonProps extends SmartOpenTypeProps {
|
|
3
4
|
/** 标识符 */
|
|
@@ -96,7 +97,7 @@ export interface SmartButtonProps extends SmartOpenTypeProps {
|
|
|
96
97
|
/**
|
|
97
98
|
* 自定义样式
|
|
98
99
|
*/
|
|
99
|
-
customStyle?:
|
|
100
|
+
customStyle?: React.CSSProperties;
|
|
100
101
|
}
|
|
101
102
|
export interface SmartButtonEvents {
|
|
102
103
|
/**
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/// <reference types="miniprogram-api-typings" />
|
|
3
3
|
import { SmartDialogProps } from './index';
|
|
4
4
|
type SmartDialogCommonProps = Pick<SmartDialogProps, 'title' | 'width' | 'message' | 'theme' | 'overlay' | 'transition' | 'icon'>;
|
|
5
|
+
type AnyObject = {};
|
|
5
6
|
export type SmartDialogOptions = {
|
|
6
7
|
/**
|
|
7
8
|
* 内容对齐方式
|
|
@@ -116,7 +117,12 @@ export interface SmartDialogInstance {
|
|
|
116
117
|
/**
|
|
117
118
|
* 展示输入确认弹窗
|
|
118
119
|
*/
|
|
119
|
-
input(options: SmartDialogInputOptions): Promise<WechatMiniprogram.Component.
|
|
120
|
+
input(options: SmartDialogInputOptions): Promise<WechatMiniprogram.Component.Instance<{
|
|
121
|
+
/**
|
|
122
|
+
* 输入框的当前值
|
|
123
|
+
*/
|
|
124
|
+
inputValue: string;
|
|
125
|
+
}, AnyObject, AnyObject>>;
|
|
120
126
|
/**
|
|
121
127
|
* 修改默认配置,对所有 `Dialog` 生效
|
|
122
128
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SmartComponent, SmartEventHandler, SmartOpenTypeProps } from '../base';
|
|
2
3
|
export interface SmartDialogProps extends SmartOpenTypeProps {
|
|
3
4
|
/**
|
|
4
5
|
* 是否显示弹窗
|
|
@@ -71,7 +72,7 @@ export interface SmartDialogProps extends SmartOpenTypeProps {
|
|
|
71
72
|
*
|
|
72
73
|
* @default ''
|
|
73
74
|
*/
|
|
74
|
-
customStyle?:
|
|
75
|
+
customStyle?: React.CSSProperties;
|
|
75
76
|
/**
|
|
76
77
|
* 根节点样式类
|
|
77
78
|
*/
|
|
@@ -158,10 +159,6 @@ export interface SmartDialogProps extends SmartOpenTypeProps {
|
|
|
158
159
|
* @default 'scale'
|
|
159
160
|
*/
|
|
160
161
|
transition?: 'fade' | 'scale' | 'none';
|
|
161
|
-
/**
|
|
162
|
-
* 确认按钮的微信开放能力,具体支持可参考 微信官方文档
|
|
163
|
-
*/
|
|
164
|
-
confirmButtonOpenType?: WechatOpenType;
|
|
165
162
|
}
|
|
166
163
|
export interface SmartDialogEvents {
|
|
167
164
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="miniprogram-api-typings" />
|
|
2
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
|
3
3
|
import { TouchPositionDetail, SmartComponent, SmartEventHandler } from '../base';
|
|
4
4
|
export interface SmartFieldProps {
|
|
5
5
|
/**
|
|
@@ -103,11 +103,11 @@ export interface SmartFieldProps {
|
|
|
103
103
|
/**
|
|
104
104
|
* 指定`placeholder`的样式
|
|
105
105
|
*/
|
|
106
|
-
placeholderStyle?:
|
|
106
|
+
placeholderStyle?: React.CSSProperties;
|
|
107
107
|
/**
|
|
108
108
|
* 自定义样式
|
|
109
109
|
*/
|
|
110
|
-
customStyle?:
|
|
110
|
+
customStyle?: React.CSSProperties;
|
|
111
111
|
/**
|
|
112
112
|
* 是否展示右侧箭头并开启点击反馈
|
|
113
113
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
2
3
|
export interface SmartIconProps {
|
|
3
4
|
/**
|
|
@@ -29,7 +30,7 @@ export interface SmartIconProps {
|
|
|
29
30
|
/**
|
|
30
31
|
* 自定义样式
|
|
31
32
|
*/
|
|
32
|
-
customStyle?:
|
|
33
|
+
customStyle?: React.CSSProperties;
|
|
33
34
|
/**
|
|
34
35
|
* 类名前缀
|
|
35
36
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TouchPositionDetail, SmartBaseExternalClassName, SmartComponent, SmartEventHandler, SmartTouchEventHandler
|
|
1
|
+
import { TouchPositionDetail, SmartBaseExternalClassName, SmartComponent, SmartEventHandler, SmartTouchEventHandler } from '../base';
|
|
2
2
|
export interface SmartNoticeBarProps {
|
|
3
3
|
/**
|
|
4
4
|
* 通知栏模式
|
|
@@ -50,12 +50,6 @@ export interface SmartNoticeBarProps {
|
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
52
52
|
wrapable?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* 微信开放能力
|
|
55
|
-
*
|
|
56
|
-
* @default 'navigate'
|
|
57
|
-
*/
|
|
58
|
-
openType?: WechatOpenType;
|
|
59
53
|
}
|
|
60
54
|
export interface SmartNoticeBarEvents {
|
|
61
55
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/// <reference types="miniprogram-api-typings" />
|
|
2
3
|
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
3
4
|
import { SmartFieldEvents } from '../field';
|
|
@@ -98,7 +99,7 @@ export interface SmartSearchProps {
|
|
|
98
99
|
/**
|
|
99
100
|
* 指定占位符的样式
|
|
100
101
|
*/
|
|
101
|
-
placeholderStyle?:
|
|
102
|
+
placeholderStyle?: React.CSSProperties;
|
|
102
103
|
/**
|
|
103
104
|
* 输入框内容对齐方式
|
|
104
105
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="miniprogram-api-typings" />
|
|
2
|
-
import { SmartComponent, SmartEventHandler } from '../base';
|
|
2
|
+
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
3
3
|
export interface SmartTabbarProps {
|
|
4
4
|
/**
|
|
5
5
|
* 当前选中标签的索引
|
|
@@ -65,4 +65,4 @@ export interface SmartTabbarEvents {
|
|
|
65
65
|
*/
|
|
66
66
|
onChange?: SmartEventHandler<number | string>;
|
|
67
67
|
}
|
|
68
|
-
export type SmartTabbar = SmartComponent<SmartTabbarProps, SmartTabbarEvents>;
|
|
68
|
+
export type SmartTabbar = SmartComponent<SmartTabbarProps, SmartTabbarEvents, SmartBaseExternalClassName>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
|
|
2
3
|
export interface SmartTransitionProps {
|
|
3
4
|
/**
|
|
@@ -44,7 +45,7 @@ export interface SmartTransitionProps {
|
|
|
44
45
|
/**
|
|
45
46
|
* 自定义样式
|
|
46
47
|
*/
|
|
47
|
-
customStyle?:
|
|
48
|
+
customStyle?: React.CSSProperties;
|
|
48
49
|
}
|
|
49
50
|
export interface SmartTransitionEvents {
|
|
50
51
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
declare const _default: (props: Record<string, any>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default _default;
|
|
@@ -5,4 +5,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/lib/tabbar-item/index"));
|
|
8
|
-
|
|
8
|
+
var withReactProps_1 = require("../common/withReactProps");
|
|
9
|
+
exports["default"] = (0, withReactProps_1.withReactProps)(index_1["default"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/smart-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"author": "MiniApp Team",
|
|
5
5
|
"description": "轻量、可靠的智能小程序 UI 组件库",
|
|
6
6
|
"scripts": {
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"lodash-es": "^4.17.21",
|
|
38
|
-
"@ray-js/components-ty-slider": "^0.2.44",
|
|
39
37
|
"@ray-js/components-ty-progress-bar": "^0.1.1",
|
|
40
38
|
"@ray-js/components-ty-progress-circle": "^0.1.6",
|
|
41
|
-
"@tuya-miniapp/smart-ui": "^1.2.
|
|
39
|
+
"@tuya-miniapp/smart-ui": "^1.2.2",
|
|
40
|
+
"@ray-js/components-ty-slider": "^0.2.48",
|
|
41
|
+
"lodash-es": "^4.17.21"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@changesets/cli": "^2.27.1",
|
|
45
45
|
"@commitlint/cli": "^7.2.1",
|
|
46
46
|
"@commitlint/config-conventional": "^9.0.1",
|
|
47
|
-
"@tuya-miniapp/icons": "^1.0.0",
|
|
48
47
|
"@ray-js/cli": "^1.5.6",
|
|
49
48
|
"@ray-js/ray": "^1.5.6",
|
|
49
|
+
"@tuya-miniapp/icons": "^1.0.0",
|
|
50
50
|
"@types/fs-extra": "^9.0.13",
|
|
51
51
|
"@types/lodash-es": "^4.17.12",
|
|
52
52
|
"@types/react": "^17.0.25",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"fast-glob": "^3.2.11",
|
|
61
61
|
"fs-extra": "^10.0.1",
|
|
62
62
|
"husky": "^9.0.11",
|
|
63
|
+
"js-base64": "^3.7.7",
|
|
63
64
|
"lint-staged": "^11.1.2",
|
|
64
65
|
"prettier": "^2.6.2",
|
|
65
66
|
"rimraf": "^3.0.2",
|