@ray-js/smart-ui 1.0.1-beta-2 → 1.0.2-beta-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.
Files changed (40) hide show
  1. package/dist/@types/battery/index.d.ts +5 -5
  2. package/dist/@types/custom-keyboard/index.d.ts +7 -7
  3. package/dist/@types/index.d.ts +0 -9
  4. package/dist/@types/index.js +0 -9
  5. package/dist/@types/picker/index.d.ts +1 -1
  6. package/dist/battery/Battery.d.ts +2 -2
  7. package/dist/battery/Battery.js +2 -1
  8. package/dist/index.d.ts +0 -1
  9. package/dist/index.js +0 -2
  10. package/package.json +4 -4
  11. package/dist/@types/area/index.d.ts +0 -120
  12. package/dist/@types/area/index.js +0 -2
  13. package/dist/@types/card/index.d.ts +0 -92
  14. package/dist/@types/card/index.js +0 -2
  15. package/dist/@types/goods-action/index.d.ts +0 -10
  16. package/dist/@types/goods-action/index.js +0 -2
  17. package/dist/@types/goods-action-button/index.d.ts +0 -67
  18. package/dist/@types/goods-action-button/index.js +0 -2
  19. package/dist/@types/goods-action-icon/index.d.ts +0 -60
  20. package/dist/@types/goods-action-icon/index.js +0 -2
  21. package/dist/@types/panel/index.d.ts +0 -26
  22. package/dist/@types/panel/index.js +0 -2
  23. package/dist/@types/share-sheet/index.d.ts +0 -95
  24. package/dist/@types/share-sheet/index.js +0 -2
  25. package/dist/@types/submit-bar/index.d.ts +0 -86
  26. package/dist/@types/submit-bar/index.js +0 -2
  27. package/dist/@types/uploader/index.d.ts +0 -157
  28. package/dist/@types/uploader/index.js +0 -2
  29. package/dist/area/Area.d.ts +0 -2
  30. package/dist/area/Area.js +0 -8
  31. package/dist/area/PropTypes.d.ts +0 -2
  32. package/dist/area/PropTypes.js +0 -2
  33. package/dist/area/index.d.ts +0 -5
  34. package/dist/area/index.js +0 -24
  35. package/dist/share-sheet/PropTypes.d.ts +0 -2
  36. package/dist/share-sheet/PropTypes.js +0 -2
  37. package/dist/share-sheet/ShareSheet.d.ts +0 -2
  38. package/dist/share-sheet/ShareSheet.js +0 -9
  39. package/dist/share-sheet/index.d.ts +0 -5
  40. package/dist/share-sheet/index.js +0 -24
@@ -29,30 +29,30 @@ export interface VantBatteryProps {
29
29
  *
30
30
  * @default '#70CF98'
31
31
  */
32
- 'high-color'?: string;
32
+ highColor?: string;
33
33
  /**
34
34
  * 电量中的颜色
35
35
  *
36
36
  * @default '#F5A623'
37
37
  */
38
- 'middle-color'?: string;
38
+ middleColor?: string;
39
39
  /**
40
40
  * 电量低的颜色
41
41
  *
42
42
  * @default '#FF4444'
43
43
  */
44
- 'low-color'?: string;
44
+ lowColor?: string;
45
45
  /**
46
46
  * 电量背景色
47
47
  *
48
48
  * @default 'rgba(0, 0, 0, .5)'
49
49
  */
50
- 'background-color'?: string;
50
+ backgroundColor?: string;
51
51
  /**
52
52
  * 电量颜色计算规则回调函数,返回计算后的颜色值即可
53
53
  *
54
54
  * @default null
55
55
  */
56
- 'on-calc-color'?: () => string;
56
+ onCalcColor?: () => string;
57
57
  }
58
58
  export type VantBattery = VantComponent<VantBatteryProps>;
@@ -18,7 +18,7 @@ export interface VantCustomKeyboardProps {
18
18
  *
19
19
  * @default 10
20
20
  */
21
- 'digital-base'?: number;
21
+ digitalBase?: number;
22
22
  /**
23
23
  * 是否隐藏零
24
24
  *
@@ -30,37 +30,37 @@ export interface VantCustomKeyboardProps {
30
30
  *
31
31
  * @default '#70CF98'
32
32
  */
33
- 'high-color'?: string;
33
+ highColor?: string;
34
34
  /**
35
35
  * 数字键盘的确认按钮背景色
36
36
  *
37
37
  * @default '#239C8E'
38
38
  */
39
- 'confirm-color'?: string;
39
+ confirmColor?: string;
40
40
  /**
41
41
  * 确认按钮文案
42
42
  *
43
43
  * @default 'Confirm'
44
44
  */
45
- 'confirm-text'?: string;
45
+ confirmText?: string;
46
46
  /**
47
47
  * 输入框容器样式
48
48
  *
49
49
  * @default null
50
50
  */
51
- 'input-container-style'?: React.CSSProperties;
51
+ inputContainerStyle?: React.CSSProperties;
52
52
  /**
53
53
  * 当前值的样式(适用于placeholder样式)
54
54
  *
55
55
  * @default null
56
56
  */
57
- 'value-text-style'?: React.CSSProperties;
57
+ valueTextStyle?: React.CSSProperties;
58
58
  /**
59
59
  * 确认按钮的样式
60
60
  *
61
61
  * @default null
62
62
  */
63
- 'confirm-text-style'?: React.CSSProperties;
63
+ confirmTextStyle?: React.CSSProperties;
64
64
  }
65
65
  export interface VantCustomKeyboardData {
66
66
  /**
@@ -1,9 +1,7 @@
1
1
  export * from './action-sheet';
2
- export * from './area';
3
2
  export * from './base';
4
3
  export * from './button';
5
4
  export * from './calendar';
6
- export * from './card';
7
5
  export * from './cell';
8
6
  export * from './cell-group';
9
7
  export * from './checkbox';
@@ -22,9 +20,6 @@ export * from './dropdown-item';
22
20
  export * from './dropdown-menu';
23
21
  export * from './empty';
24
22
  export * from './field';
25
- export * from './goods-action';
26
- export * from './goods-action-button';
27
- export * from './goods-action-icon';
28
23
  export * from './grid';
29
24
  export * from './grid-item';
30
25
  export * from './icon';
@@ -37,7 +32,6 @@ export * from './notice-bar';
37
32
  export * from './notify';
38
33
  export * from './notify/notify';
39
34
  export * from './overlay';
40
- export * from './panel';
41
35
  export * from './picker';
42
36
  export * from './popup';
43
37
  export * from './progress';
@@ -46,7 +40,6 @@ export * from './radio-group';
46
40
  export * from './rate';
47
41
  export * from './row';
48
42
  export * from './search';
49
- export * from './share-sheet';
50
43
  export * from './sidebar';
51
44
  export * from './sidebar-item';
52
45
  export * from './skeleton';
@@ -54,7 +47,6 @@ export * from './slider';
54
47
  export * from './stepper';
55
48
  export * from './steps';
56
49
  export * from './sticky';
57
- export * from './submit-bar';
58
50
  export * from './swipe-cell';
59
51
  export * from './switch';
60
52
  export * from './tab';
@@ -65,7 +57,6 @@ export * from './tag';
65
57
  export * from './toast/toast';
66
58
  export * from './transition';
67
59
  export * from './tree-select';
68
- export * from './uploader';
69
60
  export * from './cascader';
70
61
  export * from './battery';
71
62
  export * from './custom-keyboard';
@@ -15,11 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  exports.__esModule = true;
17
17
  __exportStar(require("./action-sheet"), exports);
18
- __exportStar(require("./area"), exports);
19
18
  __exportStar(require("./base"), exports);
20
19
  __exportStar(require("./button"), exports);
21
20
  __exportStar(require("./calendar"), exports);
22
- __exportStar(require("./card"), exports);
23
21
  __exportStar(require("./cell"), exports);
24
22
  __exportStar(require("./cell-group"), exports);
25
23
  __exportStar(require("./checkbox"), exports);
@@ -38,9 +36,6 @@ __exportStar(require("./dropdown-item"), exports);
38
36
  __exportStar(require("./dropdown-menu"), exports);
39
37
  __exportStar(require("./empty"), exports);
40
38
  __exportStar(require("./field"), exports);
41
- __exportStar(require("./goods-action"), exports);
42
- __exportStar(require("./goods-action-button"), exports);
43
- __exportStar(require("./goods-action-icon"), exports);
44
39
  __exportStar(require("./grid"), exports);
45
40
  __exportStar(require("./grid-item"), exports);
46
41
  __exportStar(require("./icon"), exports);
@@ -53,7 +48,6 @@ __exportStar(require("./notice-bar"), exports);
53
48
  __exportStar(require("./notify"), exports);
54
49
  __exportStar(require("./notify/notify"), exports);
55
50
  __exportStar(require("./overlay"), exports);
56
- __exportStar(require("./panel"), exports);
57
51
  __exportStar(require("./picker"), exports);
58
52
  __exportStar(require("./popup"), exports);
59
53
  __exportStar(require("./progress"), exports);
@@ -62,7 +56,6 @@ __exportStar(require("./radio-group"), exports);
62
56
  __exportStar(require("./rate"), exports);
63
57
  __exportStar(require("./row"), exports);
64
58
  __exportStar(require("./search"), exports);
65
- __exportStar(require("./share-sheet"), exports);
66
59
  __exportStar(require("./sidebar"), exports);
67
60
  __exportStar(require("./sidebar-item"), exports);
68
61
  __exportStar(require("./skeleton"), exports);
@@ -70,7 +63,6 @@ __exportStar(require("./slider"), exports);
70
63
  __exportStar(require("./stepper"), exports);
71
64
  __exportStar(require("./steps"), exports);
72
65
  __exportStar(require("./sticky"), exports);
73
- __exportStar(require("./submit-bar"), exports);
74
66
  __exportStar(require("./swipe-cell"), exports);
75
67
  __exportStar(require("./switch"), exports);
76
68
  __exportStar(require("./tab"), exports);
@@ -81,7 +73,6 @@ __exportStar(require("./tag"), exports);
81
73
  __exportStar(require("./toast/toast"), exports);
82
74
  __exportStar(require("./transition"), exports);
83
75
  __exportStar(require("./tree-select"), exports);
84
- __exportStar(require("./uploader"), exports);
85
76
  __exportStar(require("./cascader"), exports);
86
77
  __exportStar(require("./battery"), exports);
87
78
  __exportStar(require("./custom-keyboard"), exports);
@@ -101,7 +101,7 @@ export interface VantPickerProps {
101
101
  *
102
102
  * @default 0
103
103
  */
104
- unit?: number;
104
+ unit?: string;
105
105
  }
106
106
  export interface VantPickerBaseEventDetail {
107
107
  index: number | number[];
@@ -1,2 +1,2 @@
1
- import Battery from '@tuya-miniapp/smart-ui/lib/battery/index';
2
- export default Battery;
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/battery/index"));
8
- exports["default"] = index_1["default"];
8
+ var withReactProps_1 = require("../common/withReactProps");
9
+ exports["default"] = (0, withReactProps_1.withReactProps)(index_1["default"]);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './action-sheet';
2
- export * from './area';
3
2
  export * from './base';
4
3
  export * from './button';
5
4
  export * from './calendar';
package/dist/index.js CHANGED
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  exports.__esModule = true;
17
17
  __exportStar(require("./action-sheet"), exports);
18
- __exportStar(require("./area"), exports);
19
18
  __exportStar(require("./base"), exports);
20
19
  __exportStar(require("./button"), exports);
21
20
  __exportStar(require("./calendar"), exports);
@@ -56,7 +55,6 @@ __exportStar(require("./radio-group"), exports);
56
55
  __exportStar(require("./rate"), exports);
57
56
  __exportStar(require("./row"), exports);
58
57
  __exportStar(require("./search"), exports);
59
- // export * from './share-sheet';
60
58
  __exportStar(require("./sidebar"), exports);
61
59
  __exportStar(require("./sidebar-item"), exports);
62
60
  __exportStar(require("./skeleton"), exports);
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "1.0.1-beta-2",
3
+ "version": "1.0.2-beta-1",
4
4
  "author": "MiniApp Team",
5
5
  "description": "轻量、可靠的智能小程序 UI 组件库",
6
6
  "scripts": {
7
- "dev": "ts-node scripts/dev.ts",
8
- "build": "rimraf dist && tsc",
7
+ "dev": "tsc -w -p tsconfig.build.json",
8
+ "build": "rimraf dist && tsc -p tsconfig.build.json",
9
9
  "build:tuya": "cd ./example && ray build --target=tuya"
10
10
  },
11
11
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "@ray-js/components-ty-slider": "^0.2.43",
39
39
  "@ray-js/components-ty-progress-bar": "^0.1.1",
40
40
  "@ray-js/components-ty-progress-circle": "^0.1.6",
41
- "@tuya-miniapp/smart-ui": "^0.0.1-beta-1"
41
+ "@tuya-miniapp/smart-ui": "^0.0.1-beta-4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@changesets/cli": "^2.27.1",
@@ -1,120 +0,0 @@
1
- import { VantComponent, VantEventHandler } from '../base';
2
- export interface VantAreaList {
3
- province_list: Record<number, string>;
4
- city_list: Record<number, string>;
5
- county_list: Record<number, string>;
6
- }
7
- export interface VantAreaProps {
8
- /**
9
- * 当前选中的省市区`code`
10
- */
11
- value?: string;
12
- /**
13
- * 顶部栏标题
14
- */
15
- title?: string;
16
- /**
17
- * 省市区数据
18
- */
19
- 'area-list'?: VantAreaList;
20
- /**
21
- * 省市区显示列数,3-省市区,2-省市,1-省
22
- *
23
- * @default 3
24
- */
25
- 'columns-num'?: string | number;
26
- /**
27
- * 列占位提示文字
28
- *
29
- * @default []
30
- */
31
- 'columns-placeholder'?: string[];
32
- /**
33
- * 是否显示加载状态
34
- *
35
- * @default false
36
- */
37
- loading?: boolean;
38
- /**
39
- * 选项高度
40
- *
41
- * @default 44
42
- */
43
- 'item-height'?: number;
44
- /**
45
- * 可见的选项个数
46
- *
47
- * @default 6
48
- */
49
- 'visible-item-count'?: number;
50
- /**
51
- * 确认按钮文字
52
- *
53
- * @default '确认'
54
- */
55
- 'confirm-button-text'?: string;
56
- /**
57
- * 取消按钮文字
58
- *
59
- * @default '取消'
60
- */
61
- 'cancel-button-text'?: string;
62
- /**
63
- * 是否显示顶部栏
64
- *
65
- * @default true
66
- *
67
- * @since `v1.10.3`
68
- */
69
- 'show-toolbar'?: boolean;
70
- }
71
- /**
72
- * 选中列数据
73
- */
74
- export interface VantAreaColumn {
75
- /**
76
- * 被选中的地区编码
77
- */
78
- code: string;
79
- /**
80
- * 被选中的地区名称
81
- */
82
- name: string;
83
- }
84
- /**
85
- * 基础事件详情
86
- */
87
- export interface VantAreaBaseEventDetail {
88
- /**
89
- * 每个数据对应一列选项中被选中项的序号
90
- */
91
- index: number[];
92
- /**
93
- * 每个数据对应一列选项中被选中的数据
94
- */
95
- values: VantAreaColumn[];
96
- }
97
- /**
98
- * `bind:change`事件详情
99
- */
100
- export interface VantAreaChangeEventDetail extends VantAreaBaseEventDetail {
101
- /**
102
- * Picker 实例
103
- */
104
- picker: Record<string, any>;
105
- }
106
- export interface VantAreaEvents {
107
- /**
108
- * 点击右上方完成按钮
109
- */
110
- 'bind:confirm'?: VantEventHandler<VantAreaBaseEventDetail>;
111
- /**
112
- * 点击取消按钮时
113
- */
114
- 'bind:cancel'?: VantEventHandler<VantAreaBaseEventDetail>;
115
- /**
116
- * 选项改变时触发
117
- */
118
- 'bind:change'?: VantEventHandler<VantAreaChangeEventDetail>;
119
- }
120
- export type VantArea = VantComponent<VantAreaProps, VantAreaEvents>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,92 +0,0 @@
1
- import { VantBaseExternalClassName, VantComponent } from '../base';
2
- export interface VantCardProps {
3
- /**
4
- * 左侧图片
5
- */
6
- thumb?: string;
7
- /**
8
- * 左侧图片裁剪、缩放的模式,可选值参考小程序 `image` 组件 `mode` 属性值
9
- *
10
- * @default 'aspectFit'
11
- */
12
- 'thumb-mode'?: string;
13
- /**
14
- * 标题
15
- */
16
- title?: string;
17
- /**
18
- * 描述
19
- */
20
- desc?: string;
21
- /**
22
- * 标签
23
- */
24
- tag?: string;
25
- /**
26
- * 商品数量
27
- */
28
- num?: string | number;
29
- /**
30
- * 商品价格
31
- */
32
- price?: string | number;
33
- /**
34
- * 商品划线原价
35
- */
36
- 'origin-price'?: string | number;
37
- /**
38
- * 内容是否垂直居中
39
- *
40
- * @default false
41
- */
42
- centered?: string;
43
- /**
44
- * 货币符号
45
- *
46
- * @default '¥'
47
- */
48
- currency?: string;
49
- /**
50
- * 点击左侧图片后跳转的链接地址
51
- */
52
- 'thumb-link'?: string;
53
- /**
54
- * 链接跳转类型
55
- *
56
- * @default 'navigateTo'
57
- */
58
- 'link-type'?: 'redirectTo' | 'switchTab' | 'reLaunch';
59
- /**
60
- * 是否开启图片懒加载
61
- *
62
- * @default false
63
- */
64
- 'lazy-load'?: boolean;
65
- }
66
- export interface VantCardExternalClassName extends VantBaseExternalClassName {
67
- /**
68
- * 左侧图片样式类
69
- */
70
- 'thumb-class'?: string;
71
- /**
72
- * 标题样式类
73
- */
74
- 'title-class'?: string;
75
- /**
76
- * 价格样式类
77
- */
78
- 'price-class'?: string;
79
- /**
80
- * 划线原价样式类
81
- */
82
- 'origin-price-class'?: string;
83
- /**
84
- * 描述样式类
85
- */
86
- 'desc-class'?: string;
87
- /**
88
- * 数量样式类
89
- */
90
- 'num-class'?: string;
91
- }
92
- export type VantCard = VantComponent<VantCardProps, {}, VantCardExternalClassName>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,10 +0,0 @@
1
- import { VantComponent } from '../base';
2
- export interface VantGoodsActionProps {
3
- /**
4
- * 是否为 `iPhoneX` 留出底部安全距离
5
- *
6
- * @default true
7
- */
8
- 'safe-area-inset-bottom'?: boolean;
9
- }
10
- export type VantGoodsAction = VantComponent<VantGoodsActionProps>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,67 +0,0 @@
1
- import { VantBaseExternalClassName, VantComponent, VantEventHandler, VantOpenTypeProps, WechatOpenType } from '../base';
2
- export interface VantGoodsActionButtonProps extends Omit<VantOpenTypeProps, 'business-id'> {
3
- /**
4
- * 按钮文字
5
- */
6
- text?: string;
7
- /**
8
- * 按钮颜色,支持传入 `linear-gradient` 渐变色
9
- */
10
- color?: string;
11
- /**
12
- * 点击后跳转的链接地址
13
- */
14
- url?: string;
15
- /**
16
- * 链接跳转类型
17
- *
18
- * @default 'navigateTo'
19
- */
20
- 'link-type'?: 'redirectTo' | 'switchTab' | 'reLaunch';
21
- /**
22
- * 标识符
23
- */
24
- id?: string;
25
- /**
26
- * 是否禁用按钮
27
- *
28
- * @default false
29
- */
30
- disabled?: boolean;
31
- /**
32
- * 是否显示为加载状态
33
- *
34
- * @default false
35
- */
36
- loading?: boolean;
37
- /**
38
- * 微信开放能力,具体支持可参考 微信官方文档
39
- */
40
- 'open-type'?: WechatOpenType;
41
- /**
42
- * 按钮类型
43
- *
44
- * @default 'danger'
45
- */
46
- type?: 'primary' | 'info' | 'warning' | 'danger';
47
- /**
48
- * 是否为朴素按钮
49
- *
50
- * @default false
51
- */
52
- plain?: boolean;
53
- /**
54
- * 按钮尺寸
55
- *
56
- * @default 'normal'
57
- */
58
- size?: 'normal' | 'large' | 'small' | 'mini';
59
- }
60
- export interface VantGoodsActionButtonEvents {
61
- /**
62
- * 按钮点击事件回调
63
- */
64
- 'bind:click': VantEventHandler;
65
- }
66
- export type VantGoodsActionButtonExternalClassName = VantBaseExternalClassName;
67
- export type VantGoodsActionButton = VantComponent<VantGoodsActionButtonProps, VantGoodsActionButtonEvents, VantGoodsActionButtonExternalClassName>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,60 +0,0 @@
1
- import { VantBaseExternalClassName, VantComponent, VantOpenTypeProps, WechatOpenType } from '../base';
2
- export interface VantGoodsActionIconProps extends Omit<VantOpenTypeProps, 'business-id'> {
3
- /**
4
- * 按钮文字
5
- */
6
- text?: string;
7
- /**
8
- * 图标类型,可选值见`icon`组件
9
- */
10
- icon?: string;
11
- /**
12
- * 图标右上角提示信息
13
- */
14
- info?: string | number;
15
- /**
16
- * 点击后跳转的链接地址
17
- */
18
- url?: string;
19
- /**
20
- * 链接跳转类型
21
- *
22
- * @default 'navigateTo'
23
- */
24
- 'link-type'?: 'redirectTo' | 'switchTab' | 'reLaunch';
25
- /**
26
- * 标识符
27
- */
28
- id?: string;
29
- /**
30
- * 是否禁用按钮
31
- *
32
- * @default false
33
- */
34
- disabled?: boolean;
35
- /**
36
- * 是否显示为加载状态
37
- *
38
- * @default false
39
- */
40
- loading?: boolean;
41
- /**
42
- * 微信开放能力,具体支持可参考 微信官方文档
43
- */
44
- 'open-type'?: WechatOpenType;
45
- /**
46
- * 类名前缀
47
- *
48
- * @version `v1.10.1`
49
- *
50
- * @default 'van-icon'
51
- */
52
- 'class-prefix'?: string;
53
- }
54
- export interface VantGoodsActionIconExternalClassName extends VantBaseExternalClassName {
55
- /**
56
- * 文字样式类
57
- */
58
- 'text-class'?: string;
59
- }
60
- export type VantGoodsActionIcon = VantComponent<VantGoodsActionIconProps, {}, VantGoodsActionIconExternalClassName>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,26 +0,0 @@
1
- import { VantBaseExternalClassName, VantComponent } from '../base';
2
- export interface VantPanelProps {
3
- /**
4
- * 标题
5
- */
6
- title?: string;
7
- /**
8
- * 描述
9
- */
10
- desc?: string;
11
- /**
12
- * 状态
13
- */
14
- status?: string;
15
- }
16
- export interface VantPanelExternalClassName extends VantBaseExternalClassName {
17
- /**
18
- * 头部样式类
19
- */
20
- 'header-class'?: string;
21
- /**
22
- * 底部样式类
23
- */
24
- 'footer-class'?: string;
25
- }
26
- export type VantPanel = VantComponent<VantPanelProps, {}, VantPanelExternalClassName>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,95 +0,0 @@
1
- import { VantComponent, VantEventHandler } from '../base';
2
- export interface VantShareSheetOption {
3
- /**
4
- * 分享渠道名称
5
- */
6
- name?: string;
7
- /**
8
- * 分享选项描述
9
- */
10
- description?: string;
11
- /**
12
- * 图标, 支持传入图片 `URL`
13
- *
14
- * 可选项: `'qq' | 'link' | 'weibo' | 'wechat' | 'poster' | 'qrcode' | 'weapp-qrcode' | 'wechat-moments'`
15
- */
16
- icon?: 'qq' | 'link' | 'weibo' | 'wechat' | 'poster' | 'qrcode' | 'weapp-qrcode' | 'wechat-moments' | string;
17
- /**
18
- * 按钮 `open-type`,可用于实现分享功能
19
- */
20
- openType?: 'share';
21
- }
22
- export interface VantShareSheetProps {
23
- /**
24
- * 是否显示分享面板
25
- *
26
- * @default false
27
- */
28
- show?: boolean;
29
- /**
30
- * 分享选项
31
- *
32
- * @default []
33
- */
34
- options?: VantShareSheetOption[];
35
- /**
36
- * 顶部标题
37
- */
38
- title?: string;
39
- /**
40
- * 取消按钮文字
41
- *
42
- * @default '取消'
43
- */
44
- 'cancel-text'?: string;
45
- /**
46
- * 标题下方的辅助描述文字
47
- */
48
- description?: string;
49
- /**
50
- * 动画时长,单位毫秒
51
- *
52
- * @default 300
53
- */
54
- duration?: number | string;
55
- /**
56
- * 是否显示遮罩层
57
- *
58
- * @default true
59
- */
60
- overlay?: boolean;
61
- /**
62
- * 是否在点击遮罩层后关闭
63
- *
64
- * @default true
65
- */
66
- 'close-on-click-overlay'?: boolean;
67
- /**
68
- * 是否开启底部安全区适配
69
- *
70
- * @default true
71
- */
72
- 'safe-area-inset-bottom'?: boolean;
73
- }
74
- export interface VantShareSheetSelectEventDetail extends VantShareSheetOption {
75
- index: number;
76
- }
77
- export interface VantShareSheetEvents {
78
- /**
79
- * 点击分享选项时触发
80
- */
81
- 'bind:select'?: VantEventHandler<VantShareSheetSelectEventDetail>;
82
- /**
83
- * 关闭时触发
84
- */
85
- 'bind:close'?: VantEventHandler;
86
- /**
87
- * 点击取消按钮时触发
88
- */
89
- 'bind:cancel'?: VantEventHandler;
90
- /**
91
- * 点击遮罩层时触发
92
- */
93
- 'bind:click-overlay'?: VantEventHandler;
94
- }
95
- export type VantShareSheet = VantComponent<VantShareSheetProps, VantShareSheetEvents>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,86 +0,0 @@
1
- import { VantBaseExternalClassName, VantComponent, VantTouchEventHandler } from '../base';
2
- export interface VantSubmitBarProps {
3
- /**
4
- * 价格(单位分)
5
- */
6
- price?: number;
7
- /**
8
- * 价格文案
9
- *
10
- * @default '合计:'
11
- */
12
- label?: string;
13
- /**
14
- * 价格右侧文案
15
- */
16
- 'suffix-label'?: string;
17
- /**
18
- * 按钮文字
19
- */
20
- 'button-text'?: string;
21
- /**
22
- * 按钮类型
23
- *
24
- * @default 'danger'
25
- */
26
- 'button-type'?: 'primary' | 'info' | 'warning' | 'danger';
27
- /**
28
- * 提示文案
29
- */
30
- tip?: string | boolean;
31
- /**
32
- * 图标名称或图片链接,可选值见 `Icon` 组件
33
- */
34
- 'tip-icon'?: string;
35
- /**
36
- * 是否禁用按钮
37
- *
38
- * @default false
39
- */
40
- disabled?: boolean;
41
- /**
42
- * 是否显示加载中的按钮
43
- *
44
- * @default false
45
- */
46
- loading?: boolean;
47
- /**
48
- * 货币符号
49
- *
50
- * @default '¥'
51
- */
52
- currency?: string;
53
- /**
54
- * 是否为 iPhoneX 留出底部安全距离
55
- *
56
- * @default true
57
- */
58
- 'safe-area-inset-bottom'?: boolean;
59
- /**
60
- * 价格小数点后位数
61
- *
62
- * @default 2
63
- */
64
- 'decimal-length'?: number;
65
- }
66
- export interface VantSubmitBarEvents {
67
- /**
68
- * 按钮点击事件回调
69
- */
70
- 'bind:submit'?: VantTouchEventHandler;
71
- }
72
- export interface VantSubmitBarExternalClassName extends VantBaseExternalClassName {
73
- /**
74
- * 价格样式类
75
- */
76
- 'price-class'?: string;
77
- /**
78
- * 按钮样式类
79
- */
80
- 'button-class'?: string;
81
- /**
82
- * 订单栏样式类
83
- */
84
- 'bar-class'?: string;
85
- }
86
- export type VantSubmitBar = VantComponent<VantSubmitBarProps, VantSubmitBarEvents, VantSubmitBarExternalClassName>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,157 +0,0 @@
1
- import { VantComponent, VantEventHandler } from '../base';
2
- type VantUploaderPreviewSize = string | number;
3
- export interface VantUploaderProps {
4
- /**
5
- * 标识符,可以在回调函数的第二项参数中获取
6
- */
7
- name?: string | number;
8
- /**
9
- * 接受的文件类型
10
- *
11
- * @default 'image'
12
- */
13
- accept?: 'all' | 'media' | 'image' | 'file' | 'video';
14
- /**
15
- * 所选的图片的尺寸, 当`accept`为`image`类型时设置所选图片的尺寸
16
- *
17
- * @default ['original','compressed']
18
- */
19
- sizeType?: ('original' | 'compressed')[];
20
- /**
21
- * 预览图和上传区域的尺寸,默认单位为`px`
22
- *
23
- * @default '80px'
24
- *
25
- * 数组模式
26
- *
27
- * @since `v1.10.3`
28
- */
29
- 'preview-size'?: VantUploaderPreviewSize | [VantUploaderPreviewSize, VantUploaderPreviewSize];
30
- /**
31
- * 是否在上传完成后展示预览图
32
- *
33
- * @default true
34
- */
35
- 'preview-image'?: boolean;
36
- /**
37
- * 是否在点击预览图后展示全屏图片预览
38
- *
39
- * @default true
40
- */
41
- 'preview-full-image'?: boolean;
42
- /**
43
- * 是否开启图片多选,部分安卓机型不支持
44
- *
45
- * @default false
46
- */
47
- multiple?: boolean;
48
- /**
49
- * 是否禁用文件上传
50
- *
51
- * @default false
52
- */
53
- disabled?: boolean;
54
- /**
55
- * 是否展示文件上传按钮
56
- *
57
- * @default true
58
- */
59
- 'show-upload'?: boolean;
60
- /**
61
- * 是否展示删除按钮
62
- *
63
- * @default true
64
- */
65
- deletable?: boolean;
66
- /**
67
- * 图片或者视频选取模式,当`accept`为`image`类型时设置`capture`可选值为`camera`可以直接调起摄像头
68
- *
69
- * @default ['album','camera']
70
- */
71
- capture?: ('album' | 'camera') | ('album' | 'camera')[];
72
- /**
73
- * 文件大小限制,单位为`byte`
74
- */
75
- 'max-size'?: number;
76
- /**
77
- * 文件上传数量限制
78
- */
79
- 'max-count'?: number;
80
- /**
81
- * 上传区域文字提示
82
- */
83
- 'upload-text'?: string;
84
- /**
85
- * 预览图裁剪模式,可选值参考小程序`image`组件的`mode`属性
86
- *
87
- * @default 'scaleToFill'
88
- */
89
- 'image-fit'?: string;
90
- /**
91
- * 是否开启文件读取前事件
92
- */
93
- 'use-before-read'?: boolean;
94
- /**
95
- * 当`accept`为`video`时生效
96
- */
97
- camera?: 'back' | 'front';
98
- /**
99
- * 当`accept`为`video`时生效,是否压缩视频
100
- *
101
- * @default true
102
- */
103
- compressed?: boolean;
104
- /**
105
- * 当`accept`为 `video` 时生效,拍摄视频最长拍摄时间,单位秒
106
- */
107
- 'max-duration'?: number;
108
- /**
109
- * 上传区域图标,可选值见 `Icon` 组件
110
- *
111
- * @default 'plus'
112
- */
113
- 'upload-icon'?: string;
114
- }
115
- export interface VantUploaderFile {
116
- size: number;
117
- type: string;
118
- url: string;
119
- thumb: string;
120
- duration?: number;
121
- height?: number;
122
- width?: number;
123
- }
124
- export interface VantUploaderIndexDetail {
125
- index: number;
126
- }
127
- export interface VantUploaderBaseReadEventDetail extends VantUploaderIndexDetail {
128
- file: VantUploaderFile;
129
- name: string;
130
- }
131
- export interface VantUploaderBeforeReadEventDetail extends VantUploaderBaseReadEventDetail {
132
- callback: (ok: boolean) => void;
133
- }
134
- export interface VantUploaderEvents {
135
- /**
136
- * 文件读取前,在回调函数中返回 `false` 可终止文件读取,绑定事件的同时需要将`use-before-read`属性设置为`true`
137
- */
138
- 'bind:before-read'?: VantEventHandler<VantUploaderBeforeReadEventDetail>;
139
- /**
140
- * 文件读取完成后触发
141
- */
142
- 'bind:after-read'?: VantEventHandler<VantUploaderBaseReadEventDetail>;
143
- /**
144
- * 文件超出大小限制
145
- */
146
- 'bind:oversize'?: VantEventHandler<VantUploaderBaseReadEventDetail>;
147
- /**
148
- * 点击预览图片
149
- */
150
- 'bind:click-preview'?: VantEventHandler<VantUploaderIndexDetail>;
151
- /**
152
- * 删除图片
153
- */
154
- 'bind:delete'?: VantEventHandler<VantUploaderIndexDetail>;
155
- }
156
- export type VantUploader = VantComponent<VantUploaderProps, VantUploaderEvents>;
157
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,2 +0,0 @@
1
- import Area from '@tuya-miniapp/smart-ui/lib/area/index';
2
- export default Area;
package/dist/area/Area.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- exports.__esModule = true;
6
- // @ts-ignore
7
- var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/lib/area/index"));
8
- exports["default"] = index_1["default"];
@@ -1,2 +0,0 @@
1
- import { VantArea, VantAreaProps, VantAreaList, VantAreaEvents, VantAreaBaseEventDetail, VantAreaChangeEventDetail, VantAreaColumn } from '../@types';
2
- export { VantArea, VantAreaProps, VantAreaList, VantAreaEvents, VantAreaBaseEventDetail, VantAreaChangeEventDetail, VantAreaColumn, };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { VantArea } from './PropTypes';
3
- declare const Area: import("react").FC<VantArea>;
4
- export { Area };
5
- export * from './PropTypes';
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- exports.__esModule = true;
20
- exports.Area = void 0;
21
- var Area_1 = __importDefault(require("./Area"));
22
- var Area = Area_1["default"];
23
- exports.Area = Area;
24
- __exportStar(require("./PropTypes"), exports);
@@ -1,2 +0,0 @@
1
- import { VantShareSheet, VantShareSheetEvents, VantShareSheetOption, VantShareSheetProps, VantShareSheetSelectEventDetail } from '../@types';
2
- export { VantShareSheet, VantShareSheetEvents, VantShareSheetOption, VantShareSheetProps, VantShareSheetSelectEventDetail, };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
@@ -1,2 +0,0 @@
1
- declare const _default: (props: Record<string, any>) => import("react/jsx-runtime").JSX.Element;
2
- export default _default;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- exports.__esModule = true;
6
- // @ts-ignore
7
- var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/lib/share-sheet/index"));
8
- var withReactProps_1 = require("../common/withReactProps");
9
- exports["default"] = (0, withReactProps_1.withReactProps)(index_1["default"]);
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { VantShareSheet } from './PropTypes';
3
- declare const ShareSheet: import("react").FC<VantShareSheet>;
4
- export { ShareSheet };
5
- export * from './PropTypes';
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- exports.__esModule = true;
20
- exports.ShareSheet = void 0;
21
- var ShareSheet_1 = __importDefault(require("./ShareSheet"));
22
- var ShareSheet = ShareSheet_1["default"];
23
- exports.ShareSheet = ShareSheet;
24
- __exportStar(require("./PropTypes"), exports);