@ray-js/smart-ui 1.0.2-beta-2 → 1.0.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.
Files changed (187) hide show
  1. package/dist/@types/action-sheet/index.d.ts +16 -12
  2. package/dist/@types/base/component.d.ts +1 -1
  3. package/dist/@types/base/events.d.ts +4 -4
  4. package/dist/@types/base/external-class-name.d.ts +2 -2
  5. package/dist/@types/base/open-type.d.ts +11 -11
  6. package/dist/@types/battery/index.d.ts +3 -3
  7. package/dist/@types/button/index.d.ts +7 -7
  8. package/dist/@types/calendar/index.d.ts +14 -14
  9. package/dist/@types/cascader/index.d.ts +23 -11
  10. package/dist/@types/cell/index.d.ts +7 -7
  11. package/dist/@types/cell-group/index.d.ts +4 -4
  12. package/dist/@types/checkbox/index.d.ts +9 -9
  13. package/dist/@types/checkbox-group/index.d.ts +5 -5
  14. package/dist/@types/circle/index.d.ts +3 -3
  15. package/dist/@types/col/index.d.ts +4 -4
  16. package/dist/@types/collapse/index.d.ts +10 -10
  17. package/dist/@types/collapse-item/index.d.ts +4 -4
  18. package/dist/@types/config-provider/index.d.ts +3 -3
  19. package/dist/@types/count-down/index.d.ts +8 -8
  20. package/dist/@types/custom-keyboard/index.d.ts +8 -8
  21. package/dist/@types/datetime-picker/index.d.ts +10 -10
  22. package/dist/@types/dialog/dialog.d.ts +22 -22
  23. package/dist/@types/dialog/index.d.ts +7 -7
  24. package/dist/@types/divider/index.d.ts +3 -3
  25. package/dist/@types/dropdown-item/index.d.ts +13 -13
  26. package/dist/@types/dropdown-menu/index.d.ts +3 -3
  27. package/dist/@types/empty/index.d.ts +3 -3
  28. package/dist/@types/field/index.d.ts +20 -20
  29. package/dist/@types/grid/index.d.ts +4 -4
  30. package/dist/@types/grid-item/index.d.ts +8 -8
  31. package/dist/@types/icon/index.d.ts +7 -7
  32. package/dist/@types/image/index.d.ts +10 -10
  33. package/dist/@types/index-anchor/index.d.ts +3 -3
  34. package/dist/@types/index-bar/index.d.ts +6 -6
  35. package/dist/@types/loading/index.d.ts +4 -4
  36. package/dist/@types/nav-bar/index.d.ts +7 -7
  37. package/dist/@types/notice-bar/index.d.ts +7 -7
  38. package/dist/@types/notify/notify.d.ts +5 -5
  39. package/dist/@types/overlay/index.d.ts +6 -6
  40. package/dist/@types/picker/index.d.ts +14 -14
  41. package/dist/@types/popup/index.d.ts +8 -8
  42. package/dist/@types/progress/index.d.ts +4 -4
  43. package/dist/@types/radio/index.d.ts +7 -7
  44. package/dist/@types/radio-group/index.d.ts +6 -6
  45. package/dist/@types/rate/index.d.ts +7 -7
  46. package/dist/@types/row/index.d.ts +4 -4
  47. package/dist/@types/search/index.d.ts +9 -9
  48. package/dist/@types/sidebar/index.d.ts +7 -7
  49. package/dist/@types/sidebar-item/index.d.ts +8 -8
  50. package/dist/@types/skeleton/index.d.ts +3 -3
  51. package/dist/@types/slider/index.d.ts +11 -11
  52. package/dist/@types/stepper/index.d.ts +15 -15
  53. package/dist/@types/steps/index.d.ts +9 -9
  54. package/dist/@types/sticky/index.d.ts +6 -6
  55. package/dist/@types/swipe-cell/index.d.ts +14 -14
  56. package/dist/@types/switch/index.d.ts +7 -7
  57. package/dist/@types/tab/index.d.ts +6 -6
  58. package/dist/@types/tabbar/index.d.ts +6 -6
  59. package/dist/@types/tabbar-item/index.d.ts +4 -4
  60. package/dist/@types/tabs/index.d.ts +13 -13
  61. package/dist/@types/tag/index.d.ts +6 -6
  62. package/dist/@types/toast/index.d.ts +2 -2
  63. package/dist/@types/toast/toast.d.ts +11 -11
  64. package/dist/@types/transition/index.d.ts +11 -11
  65. package/dist/@types/tree-select/index.d.ts +12 -12
  66. package/dist/action-sheet/PropTypes.d.ts +2 -2
  67. package/dist/action-sheet/index.d.ts +2 -2
  68. package/dist/base/index.d.ts +2 -2
  69. package/dist/battery/PropTypes.d.ts +2 -2
  70. package/dist/battery/index.d.ts +2 -2
  71. package/dist/button/PropTypes.d.ts +2 -2
  72. package/dist/button/index.d.ts +2 -2
  73. package/dist/calendar/PropTypes.d.ts +2 -2
  74. package/dist/calendar/index.d.ts +2 -2
  75. package/dist/cascader/PropTypes.d.ts +2 -2
  76. package/dist/cascader/index.d.ts +2 -2
  77. package/dist/cell/PropTypes.d.ts +2 -2
  78. package/dist/cell/index.d.ts +2 -2
  79. package/dist/cell-group/PropTypes.d.ts +2 -2
  80. package/dist/cell-group/index.d.ts +2 -2
  81. package/dist/checkbox/PropTypes.d.ts +2 -2
  82. package/dist/checkbox/index.d.ts +2 -2
  83. package/dist/checkbox-group/PropTypes.d.ts +2 -2
  84. package/dist/checkbox-group/index.d.ts +2 -2
  85. package/dist/circle/PropTypes.d.ts +2 -2
  86. package/dist/col/PropTypes.d.ts +2 -2
  87. package/dist/col/index.d.ts +2 -2
  88. package/dist/collapse/PropTypes.d.ts +2 -2
  89. package/dist/collapse/index.d.ts +2 -2
  90. package/dist/collapse-item/PropTypes.d.ts +2 -2
  91. package/dist/collapse-item/index.d.ts +2 -2
  92. package/dist/common/withReactProps.js +12 -12
  93. package/dist/config-provider/PropTypes.d.ts +2 -2
  94. package/dist/config-provider/index.d.ts +2 -2
  95. package/dist/count-down/PropTypes.d.ts +2 -2
  96. package/dist/count-down/index.d.ts +2 -2
  97. package/dist/custom-keyboard/PropTypes.d.ts +2 -2
  98. package/dist/custom-keyboard/index.d.ts +2 -2
  99. package/dist/datetime-picker/PropTypes.d.ts +2 -2
  100. package/dist/datetime-picker/index.d.ts +2 -2
  101. package/dist/dialog/Dialog.d.ts +2 -2
  102. package/dist/dialog/PropTypes.d.ts +2 -2
  103. package/dist/dialog/index.d.ts +3 -3
  104. package/dist/divider/PropTypes.d.ts +2 -2
  105. package/dist/divider/index.d.ts +2 -2
  106. package/dist/dropdown-item/PropTypes.d.ts +2 -2
  107. package/dist/dropdown-item/index.d.ts +2 -2
  108. package/dist/dropdown-menu/PropTypes.d.ts +2 -2
  109. package/dist/dropdown-menu/index.d.ts +2 -2
  110. package/dist/empty/PropTypes.d.ts +2 -2
  111. package/dist/empty/index.d.ts +2 -2
  112. package/dist/field/PropTypes.d.ts +2 -2
  113. package/dist/field/index.d.ts +2 -2
  114. package/dist/grid/PropTypes.d.ts +2 -2
  115. package/dist/grid/index.d.ts +2 -2
  116. package/dist/grid-item/PropTypes.d.ts +2 -2
  117. package/dist/grid-item/index.d.ts +2 -2
  118. package/dist/icon/PropTypes.d.ts +2 -2
  119. package/dist/icon/index.d.ts +2 -2
  120. package/dist/image/PropTypes.d.ts +2 -2
  121. package/dist/image/index.d.ts +2 -2
  122. package/dist/index-anchor/PropTypes.d.ts +2 -2
  123. package/dist/index-anchor/index.d.ts +2 -2
  124. package/dist/index-bar/PropTypes.d.ts +2 -2
  125. package/dist/index-bar/index.d.ts +2 -2
  126. package/dist/index.d.ts +0 -3
  127. package/dist/index.js +3 -3
  128. package/dist/loading/PropTypes.d.ts +2 -2
  129. package/dist/loading/index.d.ts +2 -2
  130. package/dist/nav-bar/PropTypes.d.ts +2 -2
  131. package/dist/nav-bar/index.d.ts +2 -2
  132. package/dist/notice-bar/PropTypes.d.ts +2 -2
  133. package/dist/notice-bar/index.d.ts +2 -2
  134. package/dist/notify/PropTypes.d.ts +2 -2
  135. package/dist/notify/index.d.ts +2 -2
  136. package/dist/overlay/PropTypes.d.ts +2 -2
  137. package/dist/overlay/index.d.ts +2 -2
  138. package/dist/picker/PropTypes.d.ts +2 -2
  139. package/dist/picker/index.d.ts +2 -2
  140. package/dist/popup/PropTypes.d.ts +2 -2
  141. package/dist/popup/index.d.ts +2 -2
  142. package/dist/radio/PropTypes.d.ts +2 -2
  143. package/dist/radio/index.d.ts +2 -2
  144. package/dist/radio-group/PropTypes.d.ts +2 -2
  145. package/dist/radio-group/index.d.ts +2 -2
  146. package/dist/rate/PropTypes.d.ts +2 -2
  147. package/dist/rate/index.d.ts +2 -2
  148. package/dist/row/PropTypes.d.ts +2 -2
  149. package/dist/row/index.d.ts +2 -2
  150. package/dist/search/PropTypes.d.ts +2 -2
  151. package/dist/search/index.d.ts +2 -2
  152. package/dist/sidebar/PropTypes.d.ts +2 -2
  153. package/dist/sidebar/index.d.ts +2 -2
  154. package/dist/sidebar-item/PropTypes.d.ts +2 -2
  155. package/dist/sidebar-item/index.d.ts +2 -2
  156. package/dist/skeleton/PropTypes.d.ts +2 -2
  157. package/dist/skeleton/index.d.ts +2 -2
  158. package/dist/slider/PropTypes.d.ts +2 -2
  159. package/dist/slider/RangeSlider.d.ts +2 -2
  160. package/dist/slider/index.d.ts +4 -4
  161. package/dist/stepper/PropTypes.d.ts +2 -2
  162. package/dist/stepper/index.d.ts +2 -2
  163. package/dist/steps/PropTypes.d.ts +2 -2
  164. package/dist/steps/index.d.ts +2 -2
  165. package/dist/sticky/PropTypes.d.ts +2 -2
  166. package/dist/sticky/index.d.ts +2 -2
  167. package/dist/swipe-cell/PropTypes.d.ts +2 -2
  168. package/dist/swipe-cell/index.d.ts +2 -2
  169. package/dist/switch/PropTypes.d.ts +2 -2
  170. package/dist/switch/index.d.ts +2 -2
  171. package/dist/tab/PropTypes.d.ts +2 -2
  172. package/dist/tab/index.d.ts +2 -2
  173. package/dist/tabbar/PropTypes.d.ts +2 -2
  174. package/dist/tabbar/index.d.ts +2 -2
  175. package/dist/tabbar-item/PropTypes.d.ts +2 -2
  176. package/dist/tabbar-item/index.d.ts +2 -2
  177. package/dist/tabs/PropTypes.d.ts +2 -2
  178. package/dist/tabs/index.d.ts +2 -2
  179. package/dist/tag/PropTypes.d.ts +2 -2
  180. package/dist/tag/index.d.ts +2 -2
  181. package/dist/toast/PropTypes.d.ts +2 -2
  182. package/dist/toast/index.d.ts +2 -2
  183. package/dist/transition/PropTypes.d.ts +2 -2
  184. package/dist/transition/index.d.ts +2 -2
  185. package/dist/tree-select/PropTypes.d.ts +2 -2
  186. package/dist/tree-select/index.d.ts +2 -2
  187. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { VantOpenTypeCamelCaseProps, VantComponent, VantEventHandler } from '../base';
2
- import { VantTransitionEvents } from '../transition';
3
- export interface VantAction extends Omit<VantOpenTypeCamelCaseProps, 'businessId'> {
1
+ import { SmartOpenTypeCamelCaseProps, SmartComponent, SmartEventHandler } from '../base';
2
+ import { SmartTransitionEvents } from '../transition';
3
+ export interface SmartAction extends Omit<SmartOpenTypeCamelCaseProps, 'businessId'> {
4
4
  /**
5
5
  * 标题
6
6
  */
@@ -30,7 +30,7 @@ export interface VantAction extends Omit<VantOpenTypeCamelCaseProps, 'businessId
30
30
  */
31
31
  className?: string;
32
32
  }
33
- export interface VantActionSheetProps {
33
+ export interface SmartActionSheetProps {
34
34
  /**
35
35
  * 是否显示动作面板
36
36
  */
@@ -40,7 +40,7 @@ export interface VantActionSheetProps {
40
40
  *
41
41
  * @default []
42
42
  */
43
- actions?: VantAction[];
43
+ actions?: SmartAction[];
44
44
  /**
45
45
  * 标题
46
46
  */
@@ -55,6 +55,10 @@ export interface VantActionSheetProps {
55
55
  * @default 100
56
56
  */
57
57
  zIndex?: number;
58
+ /**
59
+ * 列表选项中 icon 的选中态颜色, 默认跟随 App 主题色 `--app-M1`
60
+ */
61
+ activeColor?: string;
58
62
  /**
59
63
  * 取消按钮文字
60
64
  */
@@ -90,26 +94,26 @@ export interface VantActionSheetProps {
90
94
  */
91
95
  safeAreaInsetBottom?: boolean;
92
96
  }
93
- export interface VantActionSheetEvents extends VantTransitionEvents {
97
+ export interface SmartActionSheetEvents extends SmartTransitionEvents {
94
98
  /**
95
99
  * 选中选项时触发,禁用或加载状态下不会触发
96
100
  */
97
- onSelect?: VantEventHandler<VantAction>;
101
+ onSelect?: SmartEventHandler<SmartAction>;
98
102
  /**
99
103
  * 关闭时触发
100
104
  */
101
- onClose?: VantEventHandler;
105
+ onClose?: SmartEventHandler;
102
106
  /**
103
107
  * 取消按钮点击时触发
104
108
  */
105
- onCancel?: VantEventHandler;
109
+ onCancel?: SmartEventHandler;
106
110
  /**
107
111
  * 确认按钮点击时触发
108
112
  */
109
- onConfirm?: VantEventHandler;
113
+ onConfirm?: SmartEventHandler;
110
114
  /**
111
115
  * 点击遮罩层时触发
112
116
  */
113
- onClickOverlay?: VantEventHandler;
117
+ onClickOverlay?: SmartEventHandler;
114
118
  }
115
- export type VantActionSheet = VantComponent<VantActionSheetProps, VantActionSheetEvents>;
119
+ export type SmartActionSheet = SmartComponent<SmartActionSheetProps, SmartActionSheetEvents>;
@@ -8,4 +8,4 @@ export interface ComponentBase {
8
8
  */
9
9
  className?: string;
10
10
  }
11
- export type VantComponent<Props = {}, Events = {}, EC = {}, Slot = {}> = ComponentBase & Props & Events & EC & Slot;
11
+ export type SmartComponent<Props = {}, Events = {}, EC = {}, Slot = {}> = ComponentBase & Props & Events & EC & Slot;
@@ -2,22 +2,22 @@
2
2
  /**
3
3
  * 普通事件类型
4
4
  */
5
- export interface VantEvent<Detail = unknown> extends WechatMiniprogram.BaseEvent {
5
+ export interface SmartEvent<Detail = unknown> extends WechatMiniprogram.BaseEvent {
6
6
  detail: Detail;
7
7
  }
8
8
  /**
9
9
  * 触摸事件类型
10
10
  */
11
- export interface VantTouchEvent<Detail = unknown> extends Omit<WechatMiniprogram.TouchEvent, 'detail'>, VantEvent<Detail> {
11
+ export interface SmartTouchEvent<Detail = unknown> extends Omit<WechatMiniprogram.TouchEvent, 'detail'>, SmartEvent<Detail> {
12
12
  }
13
13
  /**
14
14
  * 普通事件处理类型
15
15
  */
16
- export type VantEventHandler<Detail = unknown> = (event: VantEvent<Detail>) => void;
16
+ export type SmartEventHandler<Detail = unknown> = (event: SmartEvent<Detail>) => void;
17
17
  /**
18
18
  * Touch 事件处理类型
19
19
  */
20
- export type VantTouchEventHandler<Detail = unknown> = (event: VantTouchEvent<Detail>) => void;
20
+ export type SmartTouchEventHandler<Detail = unknown> = (event: SmartTouchEvent<Detail>) => void;
21
21
  /**
22
22
  * 触摸坐标详情
23
23
  */
@@ -1,10 +1,10 @@
1
- export interface VantBaseExternalClassName {
1
+ export interface SmartBaseExternalClassName {
2
2
  /**
3
3
  * 根节点样式类
4
4
  */
5
5
  customClass?: string;
6
6
  }
7
- export interface VantBaseLoadingExternalClassName {
7
+ export interface SmartBaseLoadingExternalClassName {
8
8
  /**
9
9
  * 加载样式类
10
10
  */
@@ -56,7 +56,7 @@ export type WechatOpenType =
56
56
  * 获取用户头像,可以从 `bindchooseavatar` 回调中获取到头像信息
57
57
  */
58
58
  | 'chooseAvatar';
59
- export interface VantOpenTypeProps {
59
+ export interface SmartOpenTypeProps {
60
60
  /**
61
61
  * 打开 `APP` 时,向 `APP` 传递的参数
62
62
  *
@@ -122,17 +122,17 @@ export interface VantOpenTypeProps {
122
122
  */
123
123
  showMessageCard?: string;
124
124
  }
125
- export interface VantOpenTypeCamelCaseProps {
126
- appParameter?: VantOpenTypeProps['appParameter'];
127
- lang?: VantOpenTypeProps['lang'];
128
- sessionFrom?: VantOpenTypeProps['sessionFrom'];
129
- businessId?: VantOpenTypeProps['businessId'];
130
- sendMessageTitle?: VantOpenTypeProps['sendMessageTitle'];
131
- sendMessagePath?: VantOpenTypeProps['sendMessagePath'];
132
- sendMessageImg?: VantOpenTypeProps['sendMessageImg'];
133
- showMessageCard?: VantOpenTypeProps['showMessageCard'];
125
+ export interface SmartOpenTypeCamelCaseProps {
126
+ appParameter?: SmartOpenTypeProps['appParameter'];
127
+ lang?: SmartOpenTypeProps['lang'];
128
+ sessionFrom?: SmartOpenTypeProps['sessionFrom'];
129
+ businessId?: SmartOpenTypeProps['businessId'];
130
+ sendMessageTitle?: SmartOpenTypeProps['sendMessageTitle'];
131
+ sendMessagePath?: SmartOpenTypeProps['sendMessagePath'];
132
+ sendMessageImg?: SmartOpenTypeProps['sendMessageImg'];
133
+ showMessageCard?: SmartOpenTypeProps['showMessageCard'];
134
134
  }
135
- export interface VantOpenTypeEvents {
135
+ export interface SmartOpenTypeEvents {
136
136
  /**
137
137
  * 用户点击该按钮时,会返回获取到的用户信息,
138
138
  * 从返回参数的`detail`中获取到的值同`wx.getUserInfo`
@@ -1,5 +1,5 @@
1
- import { VantComponent } from '../base';
2
- export interface VantBatteryProps {
1
+ import { SmartComponent } from '../base';
2
+ export interface SmartBatteryProps {
3
3
  /**
4
4
  * 横向展示还是竖向展示
5
5
  *
@@ -55,4 +55,4 @@ export interface VantBatteryProps {
55
55
  */
56
56
  onCalcColor?: () => string;
57
57
  }
58
- export type VantBattery = VantComponent<VantBatteryProps>;
58
+ export type SmartBattery = SmartComponent<SmartBatteryProps>;
@@ -1,5 +1,5 @@
1
- import { VantOpenTypeProps, VantBaseExternalClassName, VantBaseLoadingExternalClassName, VantComponent, VantEventHandler, VantTouchEvent } from '../base';
2
- export interface VantButtonProps extends VantOpenTypeProps {
1
+ import { SmartOpenTypeProps, SmartBaseExternalClassName, SmartBaseLoadingExternalClassName, SmartComponent, SmartEventHandler, SmartTouchEvent } from '../base';
2
+ export interface SmartButtonProps extends SmartOpenTypeProps {
3
3
  /** 标识符 */
4
4
  id?: string;
5
5
  /**
@@ -32,7 +32,7 @@ export interface VantButtonProps extends VantOpenTypeProps {
32
32
  rightIcon?: string;
33
33
  /**
34
34
  * 图标类名前缀,同`Icon`组件的`classPrefix`属性
35
- * @default 'van-icon'
35
+ * @default 'smart-icon'
36
36
  */
37
37
  classPrefix?: string;
38
38
  /**
@@ -98,12 +98,12 @@ export interface VantButtonProps extends VantOpenTypeProps {
98
98
  */
99
99
  customStyle?: string;
100
100
  }
101
- export interface VantButtonEvents {
101
+ export interface SmartButtonEvents {
102
102
  /**
103
103
  * 点击按钮,且按钮状态不为加载或禁用时触发
104
104
  */
105
- onClick?: VantEventHandler<VantTouchEvent>;
105
+ onClick?: SmartEventHandler<SmartTouchEvent>;
106
106
  }
107
- export interface VantButtonExternalClassName extends VantBaseExternalClassName, VantBaseLoadingExternalClassName {
107
+ export interface SmartButtonExternalClassName extends SmartBaseExternalClassName, SmartBaseLoadingExternalClassName {
108
108
  }
109
- export type VantButton = VantComponent<VantButtonProps, VantButtonEvents, VantButtonExternalClassName>;
109
+ export type SmartButton = SmartComponent<SmartButtonProps, SmartButtonEvents, SmartButtonExternalClassName>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="miniprogram-api-typings" />
3
- import { VantComponent, VantEventHandler } from '../base';
3
+ import { SmartComponent, SmartEventHandler } from '../base';
4
4
  export interface Day {
5
5
  /**
6
6
  * 日期对应的 Date 对象
@@ -37,7 +37,7 @@ export interface Day {
37
37
  footer?: React.ReactNode;
38
38
  };
39
39
  }
40
- export interface VantCalendarPoppableProps {
40
+ export interface SmartCalendarPoppableProps {
41
41
  /**
42
42
  * 当`Canlendar`的`poppable`为`true`时有效
43
43
  *
@@ -79,7 +79,7 @@ export interface VantCalendarPoppableProps {
79
79
  */
80
80
  safeAreaInsetBottom?: boolean;
81
81
  }
82
- export interface VantCalendarRangeProps {
82
+ export interface SmartCalendarRangeProps {
83
83
  /**
84
84
  * `Calendar`的`type`为`range`时有效
85
85
  *
@@ -111,7 +111,7 @@ export interface VantCalendarRangeProps {
111
111
  */
112
112
  allowSameDay?: boolean;
113
113
  }
114
- export interface VantCalendarProps extends VantCalendarRangeProps, VantCalendarPoppableProps {
114
+ export interface SmartCalendarProps extends SmartCalendarRangeProps, SmartCalendarPoppableProps {
115
115
  /**
116
116
  * 选择类型
117
117
  *
@@ -221,39 +221,39 @@ export interface VantCalendarProps extends VantCalendarRangeProps, VantCalendarP
221
221
  */
222
222
  readonly?: boolean;
223
223
  }
224
- export interface VantCalendarEvents {
224
+ export interface SmartCalendarEvents {
225
225
  /**
226
226
  * 点击任意日期时触发
227
227
  */
228
- onSelect?: VantEventHandler<Date | Date[]>;
228
+ onSelect?: SmartEventHandler<Date | Date[]>;
229
229
  /**
230
230
  * 当`Calendar`的`type`为`multiple`时,点击已选中的日期时触发
231
231
  */
232
- onUnselect?: VantEventHandler<Date>;
232
+ onUnselect?: SmartEventHandler<Date>;
233
233
  /**
234
234
  * 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发
235
235
  */
236
- onConfirm?: VantEventHandler<Date | Date[]>;
236
+ onConfirm?: SmartEventHandler<Date | Date[]>;
237
237
  /**
238
238
  * 打开弹出层时触发
239
239
  */
240
- onOpen?: VantEventHandler;
240
+ onOpen?: SmartEventHandler;
241
241
  /**
242
242
  * 关闭弹出层时触发
243
243
  */
244
- onClose?: VantEventHandler;
244
+ onClose?: SmartEventHandler;
245
245
  /**
246
246
  * 打开弹出层且动画结束后触发
247
247
  */
248
- onOpened?: VantEventHandler;
248
+ onOpened?: SmartEventHandler;
249
249
  /**
250
250
  * 关闭弹出层且动画结束后触发
251
251
  */
252
- onClosed?: VantEventHandler;
252
+ onClosed?: SmartEventHandler;
253
253
  /**
254
254
  * 范围选择超过最多可选天数时触发
255
255
  */
256
- onOverRange?: VantEventHandler;
256
+ onOverRange?: SmartEventHandler;
257
257
  /**
258
258
  * 点击日历副标题时触发
259
259
  *
@@ -261,4 +261,4 @@ export interface VantCalendarEvents {
261
261
  */
262
262
  onClickSubtitle?: (e: WechatMiniprogram.CustomEvent<WechatMiniprogram.TouchEvent>) => void;
263
263
  }
264
- export type VantCalendar = VantComponent<VantCalendarProps, VantCalendarEvents>;
264
+ export type SmartCalendar = SmartComponent<SmartCalendarProps, SmartCalendarEvents>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { VantComponent, VantEventHandler } from '../base';
2
+ import { SmartComponent, SmartEventHandler } from '../base';
3
3
  export interface CascaderOption {
4
4
  /**
5
5
  * 选项文字
@@ -26,7 +26,7 @@ export interface CascaderOption {
26
26
  */
27
27
  className?: string;
28
28
  }
29
- export interface VantCascaderProps {
29
+ export interface SmartCascaderProps {
30
30
  /**
31
31
  * 顶部标题
32
32
  */
@@ -83,8 +83,20 @@ export interface VantCascaderProps {
83
83
  * @default false
84
84
  */
85
85
  useTitleSlot?: boolean;
86
+ /**
87
+ * 是否省略过长的标题文字
88
+ *
89
+ * @default true
90
+ */
91
+ ellipsis?: boolean;
92
+ /**
93
+ * 滚动阈值,标签数量超过阈值且总宽度超过标签栏宽度时开始横向滚动
94
+ *
95
+ * @default 5
96
+ */
97
+ swipeThreshold?: number;
86
98
  }
87
- export interface VantCascaderData {
99
+ export interface SmartCascaderData {
88
100
  /**
89
101
  * 当前操作选中的值
90
102
  *
@@ -99,7 +111,7 @@ export interface VantCascaderData {
99
111
  */
100
112
  tabIndex: number;
101
113
  }
102
- export interface VantCascaderTabData {
114
+ export interface SmartCascaderTabData {
103
115
  /**
104
116
  * 当前点击标签的文字
105
117
  *
@@ -110,25 +122,25 @@ export interface VantCascaderTabData {
110
122
  */
111
123
  tabIndex: number;
112
124
  }
113
- export interface VantCascaderEvents {
125
+ export interface SmartCascaderEvents {
114
126
  /**
115
127
  * 点击单元格时触发
116
128
  */
117
- onChange?: VantEventHandler<VantCascaderData>;
129
+ onChange?: SmartEventHandler<SmartCascaderData>;
118
130
  /**
119
131
  * 全部选项选择完成后触发
120
132
  */
121
- onFinish?: VantEventHandler<VantCascaderData>;
133
+ onFinish?: SmartEventHandler<SmartCascaderData>;
122
134
  /**
123
135
  * 点击关闭图标时触发
124
136
  */
125
- onClose?: VantEventHandler<null>;
137
+ onClose?: SmartEventHandler<null>;
126
138
  /**
127
139
  * 点击标签时触发
128
140
  */
129
- onClickTab?: VantEventHandler<VantCascaderTabData>;
141
+ onClickTab?: SmartEventHandler<SmartCascaderTabData>;
130
142
  }
131
- export interface VantCascaderSlot {
143
+ export interface SmartCascaderSlot {
132
144
  slot?: {
133
145
  /**
134
146
  * 自定义标题,当 useTitleSlot 属性为 true 时生效
@@ -136,4 +148,4 @@ export interface VantCascaderSlot {
136
148
  title?: React.ReactNode;
137
149
  };
138
150
  }
139
- export type VantCascader = VantComponent<VantCascaderProps, VantCascaderEvents, VantCascaderSlot>;
151
+ export type SmartCascader = SmartComponent<SmartCascaderProps, SmartCascaderEvents, SmartCascaderSlot>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TouchPositionDetail, VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
3
- export interface VantCellProps {
2
+ import { TouchPositionDetail, SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
3
+ export interface SmartCellProps {
4
4
  /**
5
5
  * 左侧图标名称或图片链接,可选值见 Icon 组件
6
6
  */
@@ -78,13 +78,13 @@ export interface VantCellProps {
78
78
  */
79
79
  titleStyle?: string;
80
80
  }
81
- export interface VantCellEvents {
81
+ export interface SmartCellEvents {
82
82
  /**
83
83
  * 点击单元格时触发
84
84
  */
85
- onClick?: VantEventHandler<TouchPositionDetail>;
85
+ onClick?: SmartEventHandler<TouchPositionDetail>;
86
86
  }
87
- export interface VantCellExternalClassName extends VantBaseExternalClassName {
87
+ export interface SmartCellExternalClassName extends SmartBaseExternalClassName {
88
88
  /**
89
89
  * 标题样式类
90
90
  */
@@ -98,7 +98,7 @@ export interface VantCellExternalClassName extends VantBaseExternalClassName {
98
98
  */
99
99
  valueClass?: string;
100
100
  }
101
- export interface VantCellSlot {
101
+ export interface SmartCellSlot {
102
102
  /**
103
103
  * 自定义 value 显示内容,如果设置了 value 属性则不生效
104
104
  */
@@ -125,4 +125,4 @@ export interface VantCellSlot {
125
125
  rightIcon?: React.ReactNode;
126
126
  };
127
127
  }
128
- export type VantCell = VantComponent<VantCellProps, VantCellEvents, VantCellExternalClassName, VantCellSlot>;
128
+ export type SmartCell = SmartComponent<SmartCellProps, SmartCellEvents, SmartCellExternalClassName, SmartCellSlot>;
@@ -1,5 +1,5 @@
1
- import { VantBaseExternalClassName, VantComponent } from '../base';
2
- export interface VantCellGroupProps {
1
+ import { SmartBaseExternalClassName, SmartComponent } from '../base';
2
+ export interface SmartCellGroupProps {
3
3
  /**
4
4
  * 分组标题
5
5
  */
@@ -17,5 +17,5 @@ export interface VantCellGroupProps {
17
17
  */
18
18
  border?: boolean;
19
19
  }
20
- export type VantCellGroupExternalClassName = VantBaseExternalClassName;
21
- export type VantCellGroup = VantComponent<VantCellGroupProps, {}, VantCellGroupExternalClassName>;
20
+ export type SmartCellGroupExternalClassName = SmartBaseExternalClassName;
21
+ export type SmartCellGroup = SmartComponent<SmartCellGroupProps, {}, SmartCellGroupExternalClassName>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="miniprogram-api-typings" />
2
- import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
2
+ import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
3
3
  interface OtherProps {
4
4
  /**
5
5
  * 形状
@@ -50,28 +50,28 @@ interface OtherProps {
50
50
  */
51
51
  iconSize?: string | number;
52
52
  }
53
- interface VantCheckboxPropsWithName extends OtherProps {
53
+ interface SmartCheckboxPropsWithName extends OtherProps {
54
54
  name: string;
55
55
  dataName: string;
56
56
  }
57
- interface VantCheckboxPropsWithoutName extends OtherProps {
57
+ interface SmartCheckboxPropsWithoutName extends OtherProps {
58
58
  name?: never;
59
59
  dataName?: string;
60
60
  }
61
- export type VantCheckboxProps = VantCheckboxPropsWithName | VantCheckboxPropsWithoutName;
61
+ export type SmartCheckboxProps = SmartCheckboxPropsWithName | SmartCheckboxPropsWithoutName;
62
62
  /**
63
63
  * @deprecated
64
64
  */
65
- export interface VantCheckboxChangeEvent extends WechatMiniprogram.BaseEvent {
65
+ export interface SmartCheckboxChangeEvent extends WechatMiniprogram.BaseEvent {
66
66
  detail: boolean;
67
67
  }
68
- export interface VantCheckboxEvents {
68
+ export interface SmartCheckboxEvents {
69
69
  /**
70
70
  * 当绑定值变化时触发的事件
71
71
  */
72
- onChange?: VantEventHandler<boolean>;
72
+ onChange?: SmartEventHandler<boolean>;
73
73
  }
74
- export interface VantCheckboxExternalClassName extends VantBaseExternalClassName {
74
+ export interface SmartCheckboxExternalClassName extends SmartBaseExternalClassName {
75
75
  /**
76
76
  * 图标样式类
77
77
  */
@@ -81,5 +81,5 @@ export interface VantCheckboxExternalClassName extends VantBaseExternalClassName
81
81
  */
82
82
  labelClass?: string;
83
83
  }
84
- export type VantCheckbox = VantComponent<VantCheckboxProps, VantCheckboxEvents, VantCheckboxExternalClassName>;
84
+ export type SmartCheckbox = SmartComponent<SmartCheckboxProps, SmartCheckboxEvents, SmartCheckboxExternalClassName>;
85
85
  export {};
@@ -1,5 +1,5 @@
1
- import { VantComponent, VantEventHandler } from '../base';
2
- export interface VantCheckboxGroupProps {
1
+ import { SmartComponent, SmartEventHandler } from '../base';
2
+ export interface SmartCheckboxGroupProps {
3
3
  /**
4
4
  * 在表单内提交时的标识符
5
5
  */
@@ -29,10 +29,10 @@ export interface VantCheckboxGroupProps {
29
29
  */
30
30
  direction?: 'horizontal' | 'vertical';
31
31
  }
32
- export interface VantCheckboxGroupEvents {
32
+ export interface SmartCheckboxGroupEvents {
33
33
  /**
34
34
  * 当绑定值变化时触发的事件
35
35
  */
36
- onChange?: VantEventHandler<string[]>;
36
+ onChange?: SmartEventHandler<string[]>;
37
37
  }
38
- export type VantCheckboxGroup = VantComponent<VantCheckboxGroupProps, VantCheckboxGroupEvents>;
38
+ export type SmartCheckboxGroup = SmartComponent<SmartCheckboxGroupProps, SmartCheckboxGroupEvents>;
@@ -1,5 +1,5 @@
1
- import { VantComponent } from '../base';
2
- export interface VantCircleProps {
1
+ import { SmartComponent } from '../base';
2
+ export interface SmartCircleProps {
3
3
  /**
4
4
  * 目标进度
5
5
  *
@@ -55,4 +55,4 @@ export interface VantCircleProps {
55
55
  */
56
56
  clockwise?: boolean;
57
57
  }
58
- export type VantCircle = VantComponent<VantCircleProps>;
58
+ export type SmartCircle = SmartComponent<SmartCircleProps>;
@@ -1,5 +1,5 @@
1
- import { VantBaseExternalClassName, VantComponent } from '../base';
2
- export interface VantColProps {
1
+ import { SmartBaseExternalClassName, SmartComponent } from '../base';
2
+ export interface SmartColProps {
3
3
  /**
4
4
  * 列元素宽度
5
5
  */
@@ -9,5 +9,5 @@ export interface VantColProps {
9
9
  */
10
10
  offset?: string | number;
11
11
  }
12
- export type VantColExternalClassName = VantBaseExternalClassName;
13
- export type VantCol = VantComponent<VantColProps, {}, VantColExternalClassName>;
12
+ export type SmartColExternalClassName = SmartBaseExternalClassName;
13
+ export type SmartCol = SmartComponent<SmartColProps, {}, SmartColExternalClassName>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="miniprogram-api-typings" />
2
- import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
3
- export interface VantCollapseProps {
2
+ import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
3
+ export interface SmartCollapseProps {
4
4
  /**
5
5
  * 当前展开面板的 `name`
6
6
  *
@@ -25,7 +25,7 @@ export interface VantCollapseProps {
25
25
  /**
26
26
  * @deprecated
27
27
  */
28
- export interface VantCollapseBaseEvent extends WechatMiniprogram.BaseEvent {
28
+ export interface SmartCollapseBaseEvent extends WechatMiniprogram.BaseEvent {
29
29
  /**
30
30
  * 当前打开的面板 name
31
31
  */
@@ -34,7 +34,7 @@ export interface VantCollapseBaseEvent extends WechatMiniprogram.BaseEvent {
34
34
  /**
35
35
  * @deprecated
36
36
  */
37
- export interface VantCollapseChangeEvent extends WechatMiniprogram.BaseEvent {
37
+ export interface SmartCollapseChangeEvent extends WechatMiniprogram.BaseEvent {
38
38
  /**
39
39
  * 手风琴模式时,为 name
40
40
  *
@@ -42,19 +42,19 @@ export interface VantCollapseChangeEvent extends WechatMiniprogram.BaseEvent {
42
42
  */
43
43
  detail: string | string[];
44
44
  }
45
- export interface VantCollapseEvents {
45
+ export interface SmartCollapseEvents {
46
46
  /**
47
47
  * 切换面板时触发
48
48
  */
49
- onChange?: VantEventHandler<string | string[]>;
49
+ onChange?: SmartEventHandler<string | string[]>;
50
50
  /**
51
51
  * 展开面板时触发
52
52
  */
53
- onOpen?: VantEventHandler<string>;
53
+ onOpen?: SmartEventHandler<string>;
54
54
  /**
55
55
  * 关闭面板时触发
56
56
  */
57
- onClose?: VantEventHandler<string>;
57
+ onClose?: SmartEventHandler<string>;
58
58
  }
59
- export type VantCollapseExternalClassName = VantBaseExternalClassName;
60
- export type VantCollapse = VantComponent<VantCollapseProps, VantCollapseEvents, VantCollapseExternalClassName>;
59
+ export type SmartCollapseExternalClassName = SmartBaseExternalClassName;
60
+ export type SmartCollapse = SmartComponent<SmartCollapseProps, SmartCollapseEvents, SmartCollapseExternalClassName>;
@@ -1,5 +1,5 @@
1
- import { VantBaseExternalClassName, VantComponent } from '../base';
2
- export interface VantCollapseItemProps {
1
+ import { SmartBaseExternalClassName, SmartComponent } from '../base';
2
+ export interface SmartCollapseItemProps {
3
3
  /**
4
4
  * 唯一标识符,默认为索引值
5
5
  *
@@ -53,10 +53,10 @@ export interface VantCollapseItemProps {
53
53
  */
54
54
  size?: 'large';
55
55
  }
56
- export interface VantCollapseItemExternalClassName extends VantBaseExternalClassName {
56
+ export interface SmartCollapseItemExternalClassName extends SmartBaseExternalClassName {
57
57
  /**
58
58
  * 内容样式类
59
59
  */
60
60
  contentClass?: string;
61
61
  }
62
- export type VantCollapseItem = VantComponent<VantCollapseItemProps, {}, VantCollapseItemExternalClassName>;
62
+ export type SmartCollapseItem = SmartComponent<SmartCollapseItemProps, {}, SmartCollapseItemExternalClassName>;
@@ -1,9 +1,9 @@
1
- import { VantComponent } from '../base';
1
+ import { SmartComponent } from '../base';
2
2
  import { ThemeVars } from './theme-vars';
3
- export interface VantConfigProviderProps {
3
+ export interface SmartConfigProviderProps {
4
4
  /**
5
5
  * 自定义主题变量
6
6
  */
7
7
  themeVars?: Partial<ThemeVars>;
8
8
  }
9
- export type VantConfigProvider = VantComponent<VantConfigProviderProps>;
9
+ export type SmartConfigProvider = SmartComponent<SmartConfigProviderProps>;