@nutui/nutui-react-taro 2.0.0-alpha.11 → 2.0.0-alpha.13

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 (213) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +1 -3
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/AnimatingNumbers/style/style.css +1 -1
  6. package/dist/esm/AnimatingNumbers.js +99 -5
  7. package/dist/esm/AvatarGroup.js +1 -1
  8. package/dist/esm/Calendar/style/style.css +1 -1
  9. package/dist/esm/Cascader/style/style.css +1 -1
  10. package/dist/esm/CountDown/style/style.css +1 -1
  11. package/dist/esm/CountDown.js +2 -3
  12. package/dist/esm/DatePicker/style/style.css +1 -1
  13. package/dist/esm/Ellipsis/style/style.css +1 -1
  14. package/dist/esm/Ellipsis.js +1 -1
  15. package/dist/esm/ImagePreview/style/style.css +1 -1
  16. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  17. package/dist/esm/Picker/style/style.css +1 -1
  18. package/dist/esm/Popup/style/style.css +1 -1
  19. package/dist/esm/SearchBar/style/style.css +1 -1
  20. package/dist/esm/SearchBar.js +1 -4
  21. package/dist/esm/ShortPassword/style/style.css +1 -1
  22. package/dist/esm/ShortPassword.js +3 -4
  23. package/dist/esm/SideNavBar/style/style.css +1 -1
  24. package/dist/esm/TimeSelect/style/style.css +1 -1
  25. package/dist/esm/Toast/style/style.css +1 -1
  26. package/dist/esm/Toast.js +2 -3
  27. package/dist/esm/TrendArrow/style/style.css +1 -1
  28. package/dist/esm/TrendArrow.js +2 -3
  29. package/dist/esm/Video.js +3 -3
  30. package/dist/esm/VirtualList/style/style.css +1 -1
  31. package/dist/esm/VirtualList.js +2 -2
  32. package/dist/esm/WaterMark.js +2 -3
  33. package/dist/esm/actionsheet.taro-697a594b.js +54 -0
  34. package/dist/esm/{countdown.taro-22200811.js → countdown.taro-c399cc08.js} +17 -10
  35. package/dist/esm/{ellipsis.taro-02765890.js → ellipsis.taro-f423affa.js} +13 -6
  36. package/dist/esm/nutui-react.es.js +18 -18
  37. package/dist/esm/searchbar.taro-09468fff.js +122 -0
  38. package/dist/esm/shortpassword.taro-eabbde1b.js +90 -0
  39. package/dist/esm/toast.taro-b2937e7c.js +171 -0
  40. package/dist/esm/trendarrow.taro-253025d2.js +70 -0
  41. package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
  42. package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  43. package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
  44. package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
  45. package/dist/esm/types/src/packages/animatingnumbers/countup.d.ts +7 -8
  46. package/dist/esm/types/src/packages/animatingnumbers/countup.taro.d.ts +7 -8
  47. package/dist/esm/types/src/packages/animatingnumbers/demo.d.ts +1 -0
  48. package/dist/esm/types/src/packages/animatingnumbers/demo.taro.d.ts +1 -0
  49. package/dist/esm/types/src/packages/animatingnumbers/index.d.ts +1 -0
  50. package/dist/esm/types/src/packages/animatingnumbers/index.taro.d.ts +1 -0
  51. package/dist/{types/packages/avatargroup/avatargroup.d.ts → esm/types/src/packages/avatargroup/avatargroup.taro.d.ts} +1 -1
  52. package/dist/esm/types/src/packages/avatargroup/index.taro.d.ts +1 -1
  53. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
  54. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
  55. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
  56. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
  57. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
  58. package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
  59. package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
  60. package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
  61. package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
  62. package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  63. package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
  64. package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
  65. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
  66. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
  67. package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
  68. package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
  69. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
  70. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  71. package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
  72. package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
  73. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
  74. package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
  75. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
  76. package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +8 -10
  77. package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +8 -10
  78. package/dist/esm/types/src/packages/video/index.d.ts +1 -0
  79. package/dist/esm/types/src/packages/video/index.taro.d.ts +2 -1
  80. package/dist/esm/types/src/packages/video/video.d.ts +5 -9
  81. package/dist/esm/types/src/packages/video/video.taro.d.ts +6 -9
  82. package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
  83. package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
  84. package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
  85. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
  86. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
  87. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  88. package/dist/esm/types/src/packages/watermark/demo.d.ts +0 -1
  89. package/dist/esm/types/src/packages/watermark/demo.taro.d.ts +0 -1
  90. package/dist/esm/types/src/packages/watermark/index.d.ts +1 -0
  91. package/dist/esm/types/src/packages/watermark/index.taro.d.ts +1 -0
  92. package/dist/esm/types/src/packages/watermark/watermark.d.ts +3 -4
  93. package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +3 -4
  94. package/dist/esm/video.taro-2a26d7da.js +37 -0
  95. package/dist/esm/{virtuallist.taro-99f03769.js → virtuallist.taro-97d3403a.js} +27 -30
  96. package/dist/esm/{watermark.taro-cef29c03.js → watermark.taro-e2245bb1.js} +12 -13
  97. package/dist/locales/base.js +1 -1
  98. package/dist/locales/en-US.js +1 -1
  99. package/dist/locales/id-ID.js +1 -1
  100. package/dist/locales/tr-TR.js +10 -2
  101. package/dist/locales/zh-CN.js +1 -1
  102. package/dist/locales/zh-TW.js +1 -1
  103. package/dist/locales/zh-UG.js +1 -1
  104. package/dist/nutui.react.es.js +495 -548
  105. package/dist/nutui.react.umd.js +495 -548
  106. package/dist/packages/actionsheet/actionsheet.scss +26 -73
  107. package/dist/packages/animatingnumbers/countup.scss +0 -21
  108. package/dist/packages/countdown/countdown.scss +2 -0
  109. package/dist/packages/ellipsis/ellipsis.scss +4 -0
  110. package/dist/packages/popup/popup.scss +98 -47
  111. package/dist/packages/searchbar/searchbar.scss +13 -71
  112. package/dist/packages/shortpassword/shortpassword.scss +1 -88
  113. package/dist/packages/toast/toast.scss +20 -7
  114. package/dist/packages/trendarrow/trendarrow.scss +4 -3
  115. package/dist/packages/virtuallist/virtuallist.scss +0 -12
  116. package/dist/style.css +1 -1
  117. package/dist/style.mjs +1 -1
  118. package/dist/styles/variables-jmapp.scss +58 -68
  119. package/dist/styles/variables.scss +32 -61
  120. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +44 -16
  121. package/dist/types/packages/actionsheet/index.taro.d.ts +1 -0
  122. package/dist/types/packages/animate/animate.taro.d.ts +20 -4
  123. package/dist/types/packages/animatingnumbers/countup.taro.d.ts +7 -8
  124. package/dist/types/packages/animatingnumbers/index.taro.d.ts +1 -0
  125. package/dist/types/packages/audio/audio.taro.d.ts +25 -5
  126. package/dist/types/packages/avatar/avatar.taro.d.ts +45 -9
  127. package/dist/types/packages/avatargroup/avatargroup.taro.d.ts +45 -0
  128. package/dist/types/packages/avatargroup/index.taro.d.ts +1 -1
  129. package/dist/types/packages/backtop/backtop.taro.d.ts +20 -4
  130. package/dist/types/packages/badge/badge.taro.d.ts +30 -6
  131. package/dist/types/packages/button/button.taro.d.ts +50 -10
  132. package/dist/types/packages/cascader/cascader.taro.d.ts +80 -16
  133. package/dist/types/packages/cell/cell.taro.d.ts +30 -6
  134. package/dist/types/packages/cellgroup/cellgroup.taro.d.ts +15 -3
  135. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +40 -8
  136. package/dist/types/packages/circleprogress/circleprogress.taro.d.ts +35 -7
  137. package/dist/types/packages/col/col.taro.d.ts +15 -3
  138. package/dist/types/packages/collapse/collapse.taro.d.ts +25 -5
  139. package/dist/types/packages/collapseitem/collapseitem.taro.d.ts +20 -4
  140. package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
  141. package/dist/types/packages/configprovider/configprovider.taro.d.ts +11 -2
  142. package/dist/types/packages/configprovider/index.d.ts +1 -0
  143. package/dist/types/packages/configprovider/index.taro.d.ts +1 -0
  144. package/dist/types/packages/configprovider/types.d.ts +1 -0
  145. package/dist/types/packages/countdown/countdown.taro.d.ts +68 -15
  146. package/dist/types/packages/countdown/index.taro.d.ts +1 -0
  147. package/dist/types/packages/divider/divider.taro.d.ts +10 -2
  148. package/dist/types/packages/drag/drag.taro.d.ts +15 -3
  149. package/dist/types/packages/elevator/elevator.taro.d.ts +45 -9
  150. package/dist/types/packages/ellipsis/ellipsis.taro.d.ts +46 -9
  151. package/dist/types/packages/empty/empty.taro.d.ts +20 -4
  152. package/dist/types/packages/fixednav/fixednav.taro.d.ts +50 -10
  153. package/dist/types/packages/grid/grid.taro.d.ts +35 -7
  154. package/dist/types/packages/griditem/griditem.taro.d.ts +5 -1
  155. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +50 -10
  156. package/dist/types/packages/indicator/indicator.taro.d.ts +15 -3
  157. package/dist/types/packages/input/input.taro.d.ts +100 -20
  158. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +85 -17
  159. package/dist/types/packages/menu/menu.taro.d.ts +20 -4
  160. package/dist/types/packages/menuitem/menuitem.taro.d.ts +35 -7
  161. package/dist/types/packages/noticebar/noticebar.taro.d.ts +60 -12
  162. package/dist/types/packages/notify/notify.taro.d.ts +30 -6
  163. package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +50 -10
  164. package/dist/types/packages/overlay/index.d.ts +3 -0
  165. package/dist/types/packages/overlay/overlay.d.ts +14 -0
  166. package/dist/types/packages/overlay/overlay.taro.d.ts +40 -8
  167. package/dist/types/packages/pagination/pagination.taro.d.ts +55 -11
  168. package/dist/types/packages/picker/picker.taro.d.ts +55 -11
  169. package/dist/types/packages/popup/popup.taro.d.ts +75 -15
  170. package/dist/types/packages/price/price.taro.d.ts +35 -7
  171. package/dist/types/packages/progress/progress.taro.d.ts +35 -7
  172. package/dist/types/packages/pulltorefresh/pulltorefresh.taro.d.ts +55 -11
  173. package/dist/types/packages/radio/radio.taro.d.ts +45 -9
  174. package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +30 -6
  175. package/dist/types/packages/range/range.taro.d.ts +80 -16
  176. package/dist/types/packages/searchbar/index.taro.d.ts +1 -0
  177. package/dist/types/packages/searchbar/searchbar.taro.d.ts +72 -44
  178. package/dist/types/packages/shortpassword/index.taro.d.ts +1 -0
  179. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +89 -24
  180. package/dist/types/packages/skeleton/skeleton.taro.d.ts +35 -7
  181. package/dist/types/packages/step/step.taro.d.ts +20 -4
  182. package/dist/types/packages/steps/steps.taro.d.ts +15 -3
  183. package/dist/types/packages/sticky/sticky.taro.d.ts +25 -5
  184. package/dist/types/packages/swipe/swipe.taro.d.ts +47 -11
  185. package/dist/types/packages/swiper/swiper.taro.d.ts +35 -7
  186. package/dist/types/packages/switch/switch.taro.d.ts +30 -6
  187. package/dist/types/packages/tabbar/tabbar.taro.d.ts +35 -7
  188. package/dist/types/packages/tabbaritem/tabbaritem.taro.d.ts +10 -2
  189. package/dist/types/packages/tabpane/tabpane.taro.d.ts +15 -3
  190. package/dist/types/packages/tabs/tabs.taro.d.ts +60 -12
  191. package/dist/types/packages/textarea/textarea.taro.d.ts +60 -12
  192. package/dist/types/packages/toast/index.taro.d.ts +1 -0
  193. package/dist/types/packages/toast/toast.taro.d.ts +9 -11
  194. package/dist/types/packages/trendarrow/trendarrow.taro.d.ts +57 -15
  195. package/dist/types/packages/uploader/uploader.taro.d.ts +165 -33
  196. package/dist/types/packages/video/index.taro.d.ts +2 -1
  197. package/dist/types/packages/video/video.taro.d.ts +41 -0
  198. package/dist/types/packages/virtuallist/index.taro.d.ts +1 -0
  199. package/dist/types/packages/virtuallist/type.d.ts +0 -17
  200. package/dist/types/packages/virtuallist/utils.d.ts +3 -3
  201. package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +45 -14
  202. package/dist/types/packages/watermark/index.taro.d.ts +1 -0
  203. package/dist/types/packages/watermark/watermark.taro.d.ts +72 -17
  204. package/package.json +1 -1
  205. package/dist/esm/actionsheet.taro-d2217152.js +0 -61
  206. package/dist/esm/animatingnumbers.taro-c2a52dbd.js +0 -103
  207. package/dist/esm/searchbar.taro-37ade36e.js +0 -159
  208. package/dist/esm/shortpassword.taro-f7292032.js +0 -146
  209. package/dist/esm/toast.taro-92c10e1d.js +0 -114
  210. package/dist/esm/trendarrow.taro-0cf43935.js +0 -72
  211. package/dist/esm/video-5d106e33.js +0 -73
  212. package/dist/types/packages/video/video.d.ts +0 -24
  213. /package/dist/esm/{avatargroup-ad5ffb46.js → avatargroup.taro-ad5ffb46.js} +0 -0
@@ -1,2 +1,3 @@
1
1
  import { SearchBar } from './searchbar';
2
+ export type { SearchBarProps } from './searchbar';
2
3
  export default SearchBar;
@@ -1,2 +1,3 @@
1
1
  import { SearchBar } from './searchbar.taro';
2
+ export type { SearchBarProps } from './searchbar.taro';
2
3
  export default SearchBar;
@@ -7,37 +7,20 @@ export interface SearchBarProps extends BasicComponent {
7
7
  placeholder?: string;
8
8
  /** 搜索框形状,可选值为 round */
9
9
  shape?: 'square' | 'round';
10
- /** 自定义class名 */
11
- className?: string;
12
10
  /** 是否禁用输入框 */
13
11
  disabled?: boolean;
14
12
  /** 最大输入长度 */
15
13
  maxLength?: number;
16
14
  /** 是否启用清除图标,点击清除图标后会清空输入框 */
17
15
  clearable?: boolean;
18
- clearSize?: string | number;
19
- /** 搜索框外部背景色 */
20
- background?: string;
21
- /** 搜索框背景色 */
22
- inputBackground?: string;
23
- /** 输入框内容对齐方式 */
24
- align?: string;
25
16
  /** 是否将输入框设为只读状态,只读状态下无法输入内容 */
26
17
  readOnly?: boolean;
27
18
  /** 是否自动聚焦,iOS 系统不支持该属性 */
28
19
  autoFocus?: boolean;
29
- /** 搜索框左侧文本 */
30
- label?: React.ReactNode;
31
- /** 输入框内 左icon */
32
- leftinIcon?: React.ReactNode;
33
- /** 输入框内 右icon */
34
- rightinIcon?: React.ReactNode;
35
- /** 输入框外 左icon */
36
- leftoutIcon?: React.ReactNode;
37
- /** 输入框外 右icon */
38
- rightoutIcon?: React.ReactNode;
39
- /** 取消按钮文字 */
40
- actionText?: React.ReactNode;
20
+ left: React.ReactNode;
21
+ right: React.ReactNode;
22
+ leftIn: React.ReactNode;
23
+ rightIn: React.ReactNode;
41
24
  /** 确定搜索时触发 */
42
25
  onSearch?: (val: string) => void;
43
26
  /** 输入框内容变化时触发 */
@@ -48,17 +31,7 @@ export interface SearchBarProps extends BasicComponent {
48
31
  onBlur?: (value: string, event: Event) => void;
49
32
  /** 点击清除按钮后触发 */
50
33
  onClear?: (event: Event) => void;
51
- /** 点击取消按钮后触发 */
52
- onCancel?: () => void;
53
34
  /** 点击输入区域时触发 */
54
35
  onClickInput?: (event: Event) => void;
55
- /** 点击输入框内左侧图标时触发 */
56
- onClickLeftinIcon?: (value: string, event: Event) => void;
57
- /** 点击输入框外左侧图标时触发 */
58
- onClickLeftoutIcon?: (value: string, event: Event) => void;
59
- /** 点击输入框内右侧图标时触发 */
60
- onClickRightinIcon?: (value: string, event: Event) => void;
61
- /** 点击输入框外右侧图标时触发 */
62
- onClickRightoutIcon?: (value: string, event: Event) => void;
63
36
  }
64
37
  export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
@@ -7,37 +7,20 @@ export interface SearchBarProps extends BasicComponent {
7
7
  placeholder?: string;
8
8
  /** 搜索框形状,可选值为 round */
9
9
  shape?: 'square' | 'round';
10
- /** 自定义class名 */
11
- className?: string;
12
10
  /** 是否禁用输入框 */
13
11
  disabled?: boolean;
14
12
  /** 最大输入长度 */
15
13
  maxLength?: number;
16
14
  /** 是否启用清除图标,点击清除图标后会清空输入框 */
17
15
  clearable?: boolean;
18
- clearSize?: string | number;
19
- /** 搜索框外部背景色 */
20
- background?: string;
21
- /** 搜索框背景色 */
22
- inputBackground?: string;
23
- /** 输入框内容对齐方式 */
24
- align?: string;
25
16
  /** 是否将输入框设为只读状态,只读状态下无法输入内容 */
26
17
  readOnly?: boolean;
27
18
  /** 是否自动聚焦,iOS 系统不支持该属性 */
28
19
  autoFocus?: boolean;
29
- /** 搜索框左侧文本 */
30
- label?: React.ReactNode;
31
- /** 输入框内 左icon */
32
- leftinIcon?: React.ReactNode;
33
- /** 输入框内 右icon */
34
- rightinIcon?: React.ReactNode;
35
- /** 输入框外 左icon */
36
- leftoutIcon?: React.ReactNode;
37
- /** 输入框外 右icon */
38
- rightoutIcon?: React.ReactNode;
39
- /** 取消按钮文字 */
40
- actionText?: React.ReactNode;
20
+ left: React.ReactNode;
21
+ right: React.ReactNode;
22
+ leftIn: React.ReactNode;
23
+ rightIn: React.ReactNode;
41
24
  /** 确定搜索时触发 */
42
25
  onSearch?: (val: string) => void;
43
26
  /** 输入框内容变化时触发 */
@@ -48,17 +31,7 @@ export interface SearchBarProps extends BasicComponent {
48
31
  onBlur?: (value: string, event: Event) => void;
49
32
  /** 点击清除按钮后触发 */
50
33
  onClear?: (event: Event) => void;
51
- /** 点击取消按钮后触发 */
52
- onCancel?: () => void;
53
34
  /** 点击输入区域时触发 */
54
35
  onClickInput?: (event: Event) => void;
55
- /** 点击输入框内左侧图标时触发 */
56
- onClickLeftinIcon?: (value: string, event: Event) => void;
57
- /** 点击输入框外左侧图标时触发 */
58
- onClickLeftoutIcon?: (value: string, event: Event) => void;
59
- /** 点击输入框内右侧图标时触发 */
60
- onClickRightinIcon?: (value: string, event: Event) => void;
61
- /** 点击输入框外右侧图标时触发 */
62
- onClickRightoutIcon?: (value: string, event: Event) => void;
63
36
  }
64
37
  export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
@@ -1,2 +1,3 @@
1
1
  import { ShortPassword } from './shortpassword';
2
+ export type { ShortPasswordProps } from './shortpassword';
2
3
  export default ShortPassword;
@@ -1,2 +1,3 @@
1
1
  import { ShortPassword } from './shortpassword.taro';
2
+ export type { ShortPasswordProps } from './shortpassword.taro';
2
3
  export default ShortPassword;
@@ -1,25 +1,22 @@
1
- import React, { CSSProperties, FunctionComponent } from 'react';
2
- import { BasicComponent } from '@/utils/typings';
3
- export interface ShortPasswordProps extends BasicComponent {
4
- title: string;
5
- description: string;
6
- tips: string;
7
- tipsIcon: React.ReactNode;
8
- iconSize: string | number;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PopupProps } from '../popup/popup';
3
+ export interface ShortPasswordProps extends PopupProps {
4
+ value: string;
9
5
  visible: boolean;
10
- modelValue: string | number;
11
- errorMsg: string;
12
- noButton: boolean;
13
- closeOnClickOverlay: boolean;
14
- length: string | number;
15
- className: string;
16
- style?: CSSProperties;
17
- autoFocus?: boolean;
18
- onChange: (value: string | number) => void;
19
- onOk: (value: string | number) => void;
6
+ plain: boolean;
7
+ title: ReactNode;
8
+ description: ReactNode;
9
+ tips: ReactNode;
10
+ hideFooter: boolean;
11
+ length: number;
12
+ error: ReactNode;
13
+ autoFocus: boolean;
14
+ onFocus: () => void;
15
+ onChange: (value: string) => void;
16
+ onConfirm: (value: string) => void;
20
17
  onCancel: () => void;
21
18
  onClose: () => void;
22
19
  onTips: () => void;
23
- onComplete: (value: string | number) => void;
20
+ onComplete: (value: string) => void;
24
21
  }
25
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
22
+ export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
@@ -1,25 +1,22 @@
1
- import React, { CSSProperties, FunctionComponent } from 'react';
2
- import { BasicComponent } from '@/utils/typings';
3
- export interface ShortPasswordProps extends BasicComponent {
4
- title: string;
5
- description: string;
6
- tips: string;
7
- tipsIcon: React.ReactNode;
8
- iconSize: string | number;
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { PopupProps } from '@/packages/popup/popup.taro';
3
+ export interface ShortPasswordProps extends PopupProps {
4
+ value: string;
9
5
  visible: boolean;
10
- modelValue: string | number;
11
- errorMsg: string;
12
- noButton: boolean;
13
- closeOnClickOverlay: boolean;
14
- length: string | number;
15
- className: string;
16
- style?: CSSProperties;
17
- autoFocus?: boolean;
18
- onChange: (value: string | number) => void;
19
- onOk: (value: string | number) => void;
6
+ plain: boolean;
7
+ title: ReactNode;
8
+ description: ReactNode;
9
+ tips: ReactNode;
10
+ hideFooter: boolean;
11
+ length: number;
12
+ error: ReactNode;
13
+ autoFocus: boolean;
14
+ onFocus: () => void;
15
+ onChange: (value: string) => void;
16
+ onConfirm: (value: string) => void;
20
17
  onCancel: () => void;
21
18
  onClose: () => void;
22
19
  onTips: () => void;
23
- onComplete: (value: string | number) => void;
20
+ onComplete: (value: string) => void;
24
21
  }
25
- export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
22
+ export declare const ShortPassword: FunctionComponent<Partial<ShortPasswordProps>>;
@@ -1,21 +1,16 @@
1
1
  import * as React from 'react';
2
- export interface NotificationProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface NotificationProps extends BasicComponent {
3
4
  id?: string;
4
- style?: React.CSSProperties;
5
- icon: React.ReactNode;
6
- msg: string | React.ReactNode;
7
- bottom: string;
5
+ icon: 'success' | 'fail' | 'loading' | 'warn' | React.ReactNode;
6
+ content: string | React.ReactNode;
8
7
  duration: number;
9
- center: boolean;
10
- type: string;
8
+ position?: 'top' | 'center' | 'bottom';
11
9
  title: string;
12
- customClass: string;
13
10
  size: string | number;
14
- textAlignCenter: boolean;
15
- bgColor: string;
16
- cover: boolean;
17
- coverColor: string;
18
- closeOnClickOverlay: boolean;
11
+ closeOnOverlayClick: boolean;
12
+ contentClassName?: string;
13
+ contentStyle?: React.CSSProperties;
19
14
  onClose: () => void;
20
15
  }
21
16
  export default class Notification extends React.PureComponent<NotificationProps> {
@@ -26,6 +21,7 @@ export default class Notification extends React.PureComponent<NotificationProps>
26
21
  startCloseTimer(): void;
27
22
  clearCloseTimer(): void;
28
23
  clickCover(): void;
24
+ renderIcon(): number | boolean | React.ReactFragment | JSX.Element | null | undefined;
29
25
  componentDidMount(): void;
30
26
  componentWillUnmount(): void;
31
27
  render(): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import Toast from './toast';
2
+ export type { ToastProps, ToastIconType, ToastPositionType } from './toast';
2
3
  export default Toast;
@@ -1,2 +1,3 @@
1
1
  import { Toast } from './toast.taro';
2
+ export type { ToastProps, ToastPositionType } from './toast.taro';
2
3
  export default Toast;
@@ -1,32 +1,25 @@
1
1
  import * as React from 'react';
2
- export interface ToastProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export type ToastPositionType = 'top' | 'bottom' | 'center';
4
+ export type ToastIconType = 'success' | 'fail' | 'loading' | 'warn' | React.ReactNode;
5
+ export interface ToastProps extends BasicComponent {
3
6
  id?: string;
4
- msg: string;
5
- style?: React.CSSProperties;
6
- duration: number;
7
- center: boolean;
8
- type: string;
9
- title: string;
10
- customClass?: string;
11
- bottom: string;
12
- size: string | number;
13
- icon: string | null;
14
- iconSize: string;
15
- textAlignCenter: boolean;
16
- loadingRotate: boolean;
17
- bgColor: string;
18
- onClose: () => void;
19
- cover: boolean;
20
- coverColor: string;
21
- closeOnClickOverlay: boolean;
7
+ duration?: number;
8
+ position?: ToastPositionType;
9
+ title?: string;
10
+ closeOnOverlayClick?: boolean;
11
+ size?: string | number;
12
+ icon?: ToastIconType;
13
+ content?: React.ReactNode;
14
+ onClose?: () => void;
15
+ contentClassName?: string;
16
+ contentStyle?: React.CSSProperties;
22
17
  }
18
+ declare function show(option: ToastProps | string): void;
19
+ declare function config(config: Pick<ToastProps, 'duration' | 'position' | 'closeOnOverlayClick'>): void;
23
20
  declare const _default: {
24
- text(msg: string | React.ReactNode, option?: {}): void;
25
- success(msg: string | React.ReactNode, option?: {}): void;
26
- fail(msg: string | React.ReactNode, option?: {}): void;
27
- loading(msg: string | React.ReactNode, option?: {}): void;
28
- warn(msg: string | React.ReactNode, option?: {}): void;
29
- customIcon(msg: string | React.ReactNode, option?: {}): void;
30
- hide(): void;
21
+ show: typeof show;
22
+ config: typeof config;
23
+ clear(): void;
31
24
  };
32
25
  export default _default;
@@ -1,22 +1,20 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface ToastProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export type ToastPositionType = 'top' | 'bottom' | 'center';
4
+ export interface ToastProps extends BasicComponent {
3
5
  id?: string;
4
- style?: React.CSSProperties;
5
- icon: string | null;
6
+ maskClassName?: string;
7
+ contentClassName?: string;
8
+ contentStyle?: React.CSSProperties;
9
+ icon: string | React.ReactNode;
6
10
  iconSize: string;
7
11
  msg: string | React.ReactNode;
8
- bottom: number | string;
9
12
  duration: number;
10
- center: boolean;
13
+ position?: ToastPositionType;
11
14
  type: string;
12
15
  title: string;
13
- customClass: string;
16
+ closeOnOverlayClick: boolean;
14
17
  size: string | number;
15
- textAlignCenter: boolean;
16
- bgColor: string;
17
- cover: boolean;
18
- coverColor: string;
19
- closeOnClickOverlay: boolean;
20
18
  visible: boolean;
21
19
  onClose: () => void;
22
20
  }
@@ -1,18 +1,16 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface TrendArrowProps {
3
- rate: number;
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface TrendArrowProps extends BasicComponent {
4
+ value: number;
4
5
  digits: number;
5
- showSign: boolean;
6
- showZero: boolean;
6
+ symbol: boolean;
7
+ zero: boolean;
7
8
  arrowLeft: boolean;
8
- syncTextColor: boolean;
9
- textColor: string;
9
+ syncColor: boolean;
10
+ color: string;
10
11
  riseColor: string;
11
12
  dropColor: string;
12
- iconSize: string;
13
- upIcon: React.ReactNode;
13
+ riseIcon: React.ReactNode;
14
14
  downIcon: React.ReactNode;
15
- className: string;
16
- style: React.CSSProperties;
17
15
  }
18
16
  export declare const TrendArrow: FunctionComponent<Partial<TrendArrowProps> & React.HTMLAttributes<HTMLDivElement>>;
@@ -1,18 +1,16 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface TrendArrowProps {
3
- rate: number;
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface TrendArrowProps extends BasicComponent {
4
+ value: number;
4
5
  digits: number;
5
- showSign: boolean;
6
- showZero: boolean;
6
+ symbol: boolean;
7
+ zero: boolean;
7
8
  arrowLeft: boolean;
8
- syncTextColor: boolean;
9
- textColor: string;
9
+ syncColor: boolean;
10
+ color: string;
10
11
  riseColor: string;
11
12
  dropColor: string;
12
- iconSize: string;
13
- upIcon: React.ReactNode;
13
+ riseIcon: React.ReactNode;
14
14
  downIcon: React.ReactNode;
15
- className: string;
16
- style: React.CSSProperties;
17
15
  }
18
16
  export declare const TrendArrow: FunctionComponent<Partial<TrendArrowProps> & React.HTMLAttributes<HTMLDivElement>>;
@@ -1,2 +1,3 @@
1
1
  import { Video } from './video';
2
+ export type { VideoProps } from './video';
2
3
  export default Video;
@@ -1,2 +1,3 @@
1
- import { Video } from './video';
1
+ import { Video } from './video.taro';
2
+ export type { VideoProps } from './video.taro';
2
3
  export default Video;
@@ -1,5 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface VideoProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface VideoProps extends BasicComponent {
3
4
  source: {
4
5
  type: string;
5
6
  src: string;
@@ -12,13 +13,8 @@ export interface VideoProps {
12
13
  playsinline?: boolean;
13
14
  loop?: boolean;
14
15
  };
15
- className: string;
16
- style: React.CSSProperties;
17
- play: (e: HTMLVideoElement) => void;
18
- pause: (e: HTMLVideoElement) => void;
19
- playend: (e: HTMLVideoElement) => void;
20
- onPlay: (e: HTMLVideoElement) => void;
21
- onPause: (e: HTMLVideoElement) => void;
22
- onPlayEnd: (e: HTMLVideoElement) => void;
16
+ onPlay: (element: HTMLVideoElement) => void;
17
+ onPause: (element: HTMLVideoElement) => void;
18
+ onPlayEnd: (element: HTMLVideoElement) => void;
23
19
  }
24
20
  export declare const Video: FunctionComponent<Partial<VideoProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onPause' | 'onPlay'>>;
@@ -1,5 +1,7 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface VideoProps {
2
+ import { BaseEventOrig } from '@tarojs/components';
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export interface VideoProps extends BasicComponent {
3
5
  source: {
4
6
  type: string;
5
7
  src: string;
@@ -12,13 +14,8 @@ export interface VideoProps {
12
14
  playsinline?: boolean;
13
15
  loop?: boolean;
14
16
  };
15
- className: string;
16
- style: React.CSSProperties;
17
- play: (e: HTMLVideoElement) => void;
18
- pause: (e: HTMLVideoElement) => void;
19
- playend: (e: HTMLVideoElement) => void;
20
- onPlay: (e: HTMLVideoElement) => void;
21
- onPause: (e: HTMLVideoElement) => void;
22
- onPlayEnd: (e: HTMLVideoElement) => void;
17
+ onPlay: (event: BaseEventOrig<any>) => void;
18
+ onPause: (event: BaseEventOrig<any>) => void;
19
+ onPlayEnd: (event: BaseEventOrig<any>) => void;
23
20
  }
24
21
  export declare const Video: FunctionComponent<Partial<VideoProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onPause' | 'onPlay'>>;
@@ -1,2 +1,3 @@
1
1
  import { VirtualList } from './virtuallist';
2
+ export type { VirtualListProps } from './virtuallist';
2
3
  export default VirtualList;
@@ -1,2 +1,3 @@
1
1
  import { VirtualList } from './virtuallist.taro';
2
+ export type { VirtualListProps } from './virtuallist.taro';
2
3
  export default VirtualList;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Data = any;
3
2
  export interface VirtualListState {
4
3
  startOffset: number;
@@ -15,20 +14,3 @@ export interface PositionType {
15
14
  left?: number;
16
15
  right: number;
17
16
  }
18
- export interface BasicVirtualListProps {
19
- className?: string;
20
- style?: React.CSSProperties;
21
- sourceData: Array<Data>;
22
- containerSize?: number;
23
- ItemRender?: React.FC<any>;
24
- itemSize?: number;
25
- itemEqualSize?: boolean;
26
- horizontal?: boolean;
27
- overscan?: number;
28
- handleScroll?: (...args: any[]) => any;
29
- onScroll?: (...args: any[]) => any;
30
- key?: string;
31
- locale?: {
32
- [key in string]: string;
33
- };
34
- }
@@ -2,11 +2,11 @@ import { PositionType, Data } from './type';
2
2
  declare const initPositinoCache: (reaItemSize: number, length?: number) => PositionType[];
3
3
  declare const getListTotalSize: (positions: Array<PositionType>, horizontal: true | false) => number;
4
4
  declare const binarySearch: (positionsList: Array<PositionType>, value: number | undefined, horizontal: true | false) => number;
5
- declare const getEndIndex: ({ sourceData, startIndex, visibleCount, itemEqualSize, positions, offSetSize, overscan, sizeKey, }: {
6
- sourceData: Array<Data>;
5
+ declare const getEndIndex: ({ list, startIndex, visibleCount, itemEqual, positions, offSetSize, overscan, sizeKey, }: {
6
+ list: Array<Data>;
7
7
  startIndex: number;
8
8
  visibleCount: number;
9
- itemEqualSize?: boolean | undefined;
9
+ itemEqual?: boolean | undefined;
10
10
  positions: PositionType[];
11
11
  offSetSize: number;
12
12
  overscan: number;
@@ -1,4 +1,15 @@
1
- import { FunctionComponent } from 'react';
2
- import { BasicVirtualListProps } from './type';
3
- export type VirtualListProps = BasicVirtualListProps;
4
- export declare const VirtualList: FunctionComponent<VirtualListProps>;
1
+ import React, { FunctionComponent } from 'react';
2
+ import type { Data } from './type';
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export interface VirtualListProps extends BasicComponent {
5
+ list: Array<Data>;
6
+ containerHeight: number;
7
+ ItemRender: React.FC<any>;
8
+ itemHeight: number;
9
+ itemEqual: boolean;
10
+ direction: 'vertical' | 'horizontal';
11
+ overscan: number;
12
+ onScroll: () => void;
13
+ key: string;
14
+ }
15
+ export declare const VirtualList: FunctionComponent<Partial<VirtualListProps>>;
@@ -1,15 +1,14 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export type VirtualListProps = {
3
- className?: string | any;
4
- style?: React.CSSProperties;
5
- sourceData: any;
6
- containerSize?: number;
7
- ItemRender?: any;
8
- itemEqualSize?: boolean;
9
- itemSize?: number;
10
- overscan?: number;
11
- onScroll?: (...args: any[]) => any;
12
- key?: any;
13
- locale?: any;
14
- };
15
- export declare const VirtualList: FunctionComponent<VirtualListProps & React.HTMLAttributes<HTMLDivElement>>;
2
+ import { Data } from './type';
3
+ import { BasicComponent } from '@/utils/typings';
4
+ export interface VirtualListProps extends BasicComponent {
5
+ list: Array<Data>;
6
+ containerHeight: number;
7
+ ItemRender: React.FC<any>;
8
+ itemHeight: number;
9
+ itemEqual: boolean;
10
+ overscan: number;
11
+ onScroll: () => void;
12
+ key: string;
13
+ }
14
+ export declare const VirtualList: FunctionComponent<Partial<VirtualListProps>>;
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import './demo.scss';
3
2
  declare const WaterMarkDemo: () => JSX.Element;
4
3
  export default WaterMarkDemo;
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import '@/packages/watermark/demo.scss';
3
2
  declare const WaterMarkDemo: () => JSX.Element;
4
3
  export default WaterMarkDemo;
@@ -1,2 +1,3 @@
1
1
  import { WaterMark } from './watermark';
2
+ export type { WaterMarkProps } from './watermark';
2
3
  export default WaterMark;
@@ -1,2 +1,3 @@
1
1
  import { WaterMark } from './watermark.taro';
2
+ export type { WaterMarkProps } from './watermark.taro';
2
3
  export default WaterMark;
@@ -1,9 +1,9 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- export interface WaterMarkProps {
2
+ import { BasicComponent } from '@/utils/typings';
3
+ export interface WaterMarkProps extends BasicComponent {
3
4
  content: string;
4
5
  fullPage: boolean;
5
6
  zIndex: number;
6
- className: string;
7
7
  gapX: number;
8
8
  gapY: number;
9
9
  width: number;
@@ -12,11 +12,10 @@ export interface WaterMarkProps {
12
12
  imageWidth: number;
13
13
  imageHeight: number;
14
14
  rotate: number;
15
- fontColor: string;
15
+ color: string;
16
16
  fontStyle: string;
17
17
  fontFamily: string;
18
18
  fontWeight: string;
19
19
  fontSize: string | number;
20
- style: React.CSSProperties;
21
20
  }
22
21
  export declare const WaterMark: FunctionComponent<Partial<WaterMarkProps> & React.HTMLAttributes<HTMLDivElement>>;