taro-react-uilib 1.4.21 → 1.4.22-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 (276) hide show
  1. package/dist/components/Checkbox/Group/index.js +1 -1
  2. package/dist/components/Checkbox/Group/index.js.map +1 -1
  3. package/dist/components/Icon/index.js +1 -1
  4. package/dist/components/Icon/index.js.map +1 -1
  5. package/dist/components/Notice/index.js +2 -0
  6. package/dist/components/Notice/index.js.map +1 -0
  7. package/dist/components/Radio/Group/index.js +1 -1
  8. package/dist/components/Radio/Group/index.js.map +1 -1
  9. package/dist/components/src/index.js +1 -1
  10. package/dist/components/src/utils/index.js +1 -1
  11. package/dist/components/src/utils/index.js.map +1 -1
  12. package/dist/index.esm.js +4 -4
  13. package/dist/index.esm.js.map +1 -1
  14. package/dist/index.js +4 -4
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.umd.js +4 -4
  17. package/dist/index.umd.js.map +1 -1
  18. package/dist/styles/components/font/iconfont.ttf +0 -0
  19. package/dist/styles/components/font/iconfont.woff +0 -0
  20. package/dist/styles/components/font/iconfont.woff2 +0 -0
  21. package/dist/styles/components/icon.scss +5 -1
  22. package/dist/styles/components/index.scss +2 -0
  23. package/dist/styles/components/notice.scss +43 -0
  24. package/dist/styles/components/tabnav.scss +97 -0
  25. package/package.json +2 -2
  26. package/types/components/ActionSheet/index.d.ts +43 -44
  27. package/types/components/ActivityIndicator/index.d.ts +12 -13
  28. package/types/components/AmountInput/index.d.ts +25 -26
  29. package/types/components/AmountKeyboard/index.d.ts +35 -36
  30. package/types/components/Animated/Animated.d.ts +11 -12
  31. package/types/components/Animated/Fade/index.d.ts +9 -9
  32. package/types/components/Animated/Scale/index.d.ts +9 -9
  33. package/types/components/Animated/Slide/index.d.ts +11 -11
  34. package/types/components/Animated/index.d.ts +3 -3
  35. package/types/components/Badge/index.d.ts +7 -8
  36. package/types/components/BankCardNumberInput/index.d.ts +47 -48
  37. package/types/components/BankIcon/index.d.ts +8 -9
  38. package/types/components/Button/DotJump.d.ts +7 -7
  39. package/types/components/Button/index.d.ts +29 -30
  40. package/types/components/Captcha/index.d.ts +24 -25
  41. package/types/components/Cell/index.d.ts +29 -30
  42. package/types/components/Checkbox/Group/index.d.ts +23 -23
  43. package/types/components/Checkbox/index.d.ts +28 -29
  44. package/types/components/CheckboxButton/index.d.ts +23 -24
  45. package/types/components/Collapse/index.d.ts +10 -11
  46. package/types/components/Countdown/index.d.ts +10 -11
  47. package/types/components/Dialog/Alert/index.d.ts +26 -26
  48. package/types/components/Dialog/Confirm/index.d.ts +37 -37
  49. package/types/components/Dialog/index.d.ts +11 -11
  50. package/types/components/DialogComponent/index.d.ts +18 -19
  51. package/types/components/DialogRef/index.d.ts +37 -38
  52. package/types/components/Echarts/index.d.ts +5 -5
  53. package/types/components/Echarts/types.d.ts +34 -34
  54. package/types/components/Echarts/weapp/wx-canvas.d.ts +21 -21
  55. package/types/components/Echarts/weapp/wx-touch.d.ts +13 -13
  56. package/types/components/FormInput/index.d.ts +55 -56
  57. package/types/components/IDNumberInput/index.d.ts +39 -40
  58. package/types/components/Icon/index.d.ts +13 -14
  59. package/types/components/Image/index.d.ts +11 -12
  60. package/types/components/LicensePlateInput/Keyboard.d.ts +26 -27
  61. package/types/components/LicensePlateInput/index.d.ts +37 -38
  62. package/types/components/LinkMan/index.d.ts +33 -34
  63. package/types/components/List/index.d.ts +21 -22
  64. package/types/components/Loading/index.d.ts +11 -12
  65. package/types/components/Mask/index.d.ts +9 -10
  66. package/types/components/NavBar/index.d.ts +11 -12
  67. package/types/components/Notice/index.d.ts +13 -0
  68. package/types/components/NumberKeyboard/index.d.ts +24 -25
  69. package/types/components/Page/index.d.ts +21 -22
  70. package/types/components/PasswordInput/index.d.ts +10 -11
  71. package/types/components/Picker/Picker.d.ts +24 -24
  72. package/types/components/Picker/PickerSlot.d.ts +23 -24
  73. package/types/components/Picker/index.d.ts +12 -13
  74. package/types/components/Popup/index.d.ts +10 -11
  75. package/types/components/Progress/index.d.ts +21 -22
  76. package/types/components/ProgressCircle/index.d.ts +13 -14
  77. package/types/components/Radio/Group/index.d.ts +29 -29
  78. package/types/components/Radio/index.d.ts +29 -30
  79. package/types/components/Rank/index.d.ts +13 -14
  80. package/types/components/Result/index.d.ts +23 -24
  81. package/types/components/ScrollView/index.d.ts +11 -11
  82. package/types/components/Space/Item.d.ts +11 -11
  83. package/types/components/Space/config-provider.d.ts +12 -12
  84. package/types/components/Space/index.d.ts +20 -21
  85. package/types/components/Step/Steps/index.d.ts +14 -14
  86. package/types/components/Step/index.d.ts +19 -20
  87. package/types/components/Switch/index.d.ts +11 -12
  88. package/types/components/TabNav/TabNavItem/index.d.ts +8 -0
  89. package/types/components/TabNav/index.d.ts +27 -0
  90. package/types/components/Tabbar/index.d.ts +8 -9
  91. package/types/components/Tabbar/tabbar/TabItem.d.ts +8 -8
  92. package/types/components/Tabbar/tabbar/Tabbar.d.ts +31 -31
  93. package/types/components/ThemeProvider/index.d.ts +30 -30
  94. package/types/components/Toast/Toast.d.ts +19 -20
  95. package/types/components/Toast/index.d.ts +4 -5
  96. package/types/hooks/index.d.ts +2 -2
  97. package/types/hooks/useCustomNavbar.d.ts +6 -6
  98. package/types/hooks/useFirstMountState.d.ts +1 -1
  99. package/types/hooks/useFlexGapSupport.d.ts +2 -2
  100. package/types/hooks/useGenerateId.d.ts +1 -1
  101. package/types/hooks/usePrevious.d.ts +1 -1
  102. package/types/hooks/useRefs.d.ts +1 -1
  103. package/types/hooks/useTouch.d.ts +18 -18
  104. package/types/hooks/useUnMount.d.ts +1 -1
  105. package/types/hooks/useUpdateEffect.d.ts +1 -1
  106. package/types/index.d.ts +44 -43
  107. package/types/types/index.d.ts +5 -5
  108. package/types/utils/index.d.ts +57 -57
  109. package/lib/components/ActionSheet/index.js +0 -67
  110. package/lib/components/ActionSheet/index.js.map +0 -1
  111. package/lib/components/ActivityIndicator/index.js +0 -30
  112. package/lib/components/ActivityIndicator/index.js.map +0 -1
  113. package/lib/components/AmountInput/index.js +0 -53
  114. package/lib/components/AmountInput/index.js.map +0 -1
  115. package/lib/components/AmountKeyboard/index.js +0 -134
  116. package/lib/components/AmountKeyboard/index.js.map +0 -1
  117. package/lib/components/Animated/Animated.js +0 -20
  118. package/lib/components/Animated/Animated.js.map +0 -1
  119. package/lib/components/Animated/Fade/index.js +0 -19
  120. package/lib/components/Animated/Fade/index.js.map +0 -1
  121. package/lib/components/Animated/Scale/index.js +0 -19
  122. package/lib/components/Animated/Scale/index.js.map +0 -1
  123. package/lib/components/Animated/Slide/index.js +0 -19
  124. package/lib/components/Animated/Slide/index.js.map +0 -1
  125. package/lib/components/Animated/index.js +0 -5
  126. package/lib/components/Animated/index.js.map +0 -1
  127. package/lib/components/Badge/index.js +0 -11
  128. package/lib/components/Badge/index.js.map +0 -1
  129. package/lib/components/BankCardNumberInput/index.js +0 -44
  130. package/lib/components/BankCardNumberInput/index.js.map +0 -1
  131. package/lib/components/BankIcon/index.js +0 -12
  132. package/lib/components/BankIcon/index.js.map +0 -1
  133. package/lib/components/Button/DotJump.js +0 -13
  134. package/lib/components/Button/DotJump.js.map +0 -1
  135. package/lib/components/Button/index.js +0 -62
  136. package/lib/components/Button/index.js.map +0 -1
  137. package/lib/components/Captcha/index.js +0 -76
  138. package/lib/components/Captcha/index.js.map +0 -1
  139. package/lib/components/Cell/index.js +0 -29
  140. package/lib/components/Cell/index.js.map +0 -1
  141. package/lib/components/Checkbox/Group/index.js +0 -49
  142. package/lib/components/Checkbox/Group/index.js.map +0 -1
  143. package/lib/components/Checkbox/index.js +0 -55
  144. package/lib/components/Checkbox/index.js.map +0 -1
  145. package/lib/components/CheckboxButton/index.js +0 -30
  146. package/lib/components/CheckboxButton/index.js.map +0 -1
  147. package/lib/components/Collapse/index.js +0 -47
  148. package/lib/components/Collapse/index.js.map +0 -1
  149. package/lib/components/Countdown/index.js +0 -69
  150. package/lib/components/Countdown/index.js.map +0 -1
  151. package/lib/components/Dialog/Alert/index.js +0 -35
  152. package/lib/components/Dialog/Alert/index.js.map +0 -1
  153. package/lib/components/Dialog/Confirm/index.js +0 -41
  154. package/lib/components/Dialog/Confirm/index.js.map +0 -1
  155. package/lib/components/Dialog/index.js +0 -8
  156. package/lib/components/Dialog/index.js.map +0 -1
  157. package/lib/components/DialogComponent/index.js +0 -36
  158. package/lib/components/DialogComponent/index.js.map +0 -1
  159. package/lib/components/DialogRef/index.js +0 -55
  160. package/lib/components/DialogRef/index.js.map +0 -1
  161. package/lib/components/Echarts/index.js +0 -276
  162. package/lib/components/Echarts/index.js.map +0 -1
  163. package/lib/components/Echarts/types.js +0 -2
  164. package/lib/components/Echarts/types.js.map +0 -1
  165. package/lib/components/Echarts/weapp/wx-canvas.js +0 -125
  166. package/lib/components/Echarts/weapp/wx-canvas.js.map +0 -1
  167. package/lib/components/Echarts/weapp/wx-touch.js +0 -75
  168. package/lib/components/Echarts/weapp/wx-touch.js.map +0 -1
  169. package/lib/components/FormInput/index.js +0 -75
  170. package/lib/components/FormInput/index.js.map +0 -1
  171. package/lib/components/IDNumberInput/index.js +0 -37
  172. package/lib/components/IDNumberInput/index.js.map +0 -1
  173. package/lib/components/Icon/index.js +0 -24
  174. package/lib/components/Icon/index.js.map +0 -1
  175. package/lib/components/Image/index.js +0 -48
  176. package/lib/components/Image/index.js.map +0 -1
  177. package/lib/components/LicensePlateInput/Keyboard.js +0 -168
  178. package/lib/components/LicensePlateInput/Keyboard.js.map +0 -1
  179. package/lib/components/LicensePlateInput/index.js +0 -94
  180. package/lib/components/LicensePlateInput/index.js.map +0 -1
  181. package/lib/components/LinkMan/index.js +0 -348
  182. package/lib/components/LinkMan/index.js.map +0 -1
  183. package/lib/components/List/index.js +0 -26
  184. package/lib/components/List/index.js.map +0 -1
  185. package/lib/components/Loading/index.js +0 -18
  186. package/lib/components/Loading/index.js.map +0 -1
  187. package/lib/components/Mask/index.js +0 -17
  188. package/lib/components/Mask/index.js.map +0 -1
  189. package/lib/components/NavBar/index.js +0 -41
  190. package/lib/components/NavBar/index.js.map +0 -1
  191. package/lib/components/NumberKeyboard/index.js +0 -63
  192. package/lib/components/NumberKeyboard/index.js.map +0 -1
  193. package/lib/components/Page/index.js +0 -30
  194. package/lib/components/Page/index.js.map +0 -1
  195. package/lib/components/PasswordInput/index.js +0 -24
  196. package/lib/components/PasswordInput/index.js.map +0 -1
  197. package/lib/components/Picker/Picker.js +0 -205
  198. package/lib/components/Picker/Picker.js.map +0 -1
  199. package/lib/components/Picker/PickerSlot.js +0 -226
  200. package/lib/components/Picker/PickerSlot.js.map +0 -1
  201. package/lib/components/Picker/index.js +0 -33
  202. package/lib/components/Picker/index.js.map +0 -1
  203. package/lib/components/Popup/index.js +0 -60
  204. package/lib/components/Popup/index.js.map +0 -1
  205. package/lib/components/Progress/index.js +0 -29
  206. package/lib/components/Progress/index.js.map +0 -1
  207. package/lib/components/ProgressCircle/index.js +0 -22
  208. package/lib/components/ProgressCircle/index.js.map +0 -1
  209. package/lib/components/Radio/Group/index.js +0 -58
  210. package/lib/components/Radio/Group/index.js.map +0 -1
  211. package/lib/components/Radio/index.js +0 -55
  212. package/lib/components/Radio/index.js.map +0 -1
  213. package/lib/components/Rank/index.js +0 -22
  214. package/lib/components/Rank/index.js.map +0 -1
  215. package/lib/components/Result/index.js +0 -38
  216. package/lib/components/Result/index.js.map +0 -1
  217. package/lib/components/ScrollView/index.js +0 -34
  218. package/lib/components/ScrollView/index.js.map +0 -1
  219. package/lib/components/Space/Item.js +0 -25
  220. package/lib/components/Space/Item.js.map +0 -1
  221. package/lib/components/Space/config-provider.js +0 -8
  222. package/lib/components/Space/config-provider.js.map +0 -1
  223. package/lib/components/Space/index.js +0 -77
  224. package/lib/components/Space/index.js.map +0 -1
  225. package/lib/components/Step/Steps/index.js +0 -33
  226. package/lib/components/Step/Steps/index.js.map +0 -1
  227. package/lib/components/Step/index.js +0 -20
  228. package/lib/components/Step/index.js.map +0 -1
  229. package/lib/components/Switch/index.js +0 -26
  230. package/lib/components/Switch/index.js.map +0 -1
  231. package/lib/components/Tabbar/index.js +0 -7
  232. package/lib/components/Tabbar/index.js.map +0 -1
  233. package/lib/components/Tabbar/tabbar/TabItem.js +0 -9
  234. package/lib/components/Tabbar/tabbar/TabItem.js.map +0 -1
  235. package/lib/components/Tabbar/tabbar/Tabbar.js +0 -87
  236. package/lib/components/Tabbar/tabbar/Tabbar.js.map +0 -1
  237. package/lib/components/ThemeProvider/index.js +0 -32
  238. package/lib/components/ThemeProvider/index.js.map +0 -1
  239. package/lib/components/Toast/Toast.js +0 -38
  240. package/lib/components/Toast/Toast.js.map +0 -1
  241. package/lib/components/Toast/index.js +0 -56
  242. package/lib/components/Toast/index.js.map +0 -1
  243. package/lib/hooks/index.js +0 -17
  244. package/lib/hooks/index.js.map +0 -1
  245. package/lib/hooks/useCustomNavbar.js +0 -24
  246. package/lib/hooks/useCustomNavbar.js.map +0 -1
  247. package/lib/hooks/useFirstMountState.js +0 -10
  248. package/lib/hooks/useFirstMountState.js.map +0 -1
  249. package/lib/hooks/useFlexGapSupport.js +0 -10
  250. package/lib/hooks/useFlexGapSupport.js.map +0 -1
  251. package/lib/hooks/useGenerateId.js +0 -12
  252. package/lib/hooks/useGenerateId.js.map +0 -1
  253. package/lib/hooks/usePrevious.js +0 -9
  254. package/lib/hooks/usePrevious.js.map +0 -1
  255. package/lib/hooks/useRefs.js +0 -13
  256. package/lib/hooks/useRefs.js.map +0 -1
  257. package/lib/hooks/useTouch.js +0 -67
  258. package/lib/hooks/useTouch.js.map +0 -1
  259. package/lib/hooks/useUnMount.js +0 -5
  260. package/lib/hooks/useUnMount.js.map +0 -1
  261. package/lib/hooks/useUpdateEffect.js +0 -12
  262. package/lib/hooks/useUpdateEffect.js.map +0 -1
  263. package/lib/index.js +0 -44
  264. package/lib/index.js.map +0 -1
  265. package/lib/types/index.js +0 -2
  266. package/lib/types/index.js.map +0 -1
  267. package/lib/utils/index.js +0 -320
  268. package/lib/utils/index.js.map +0 -1
  269. package/types/components/BankIcon/bank.d.ts +0 -18
  270. package/types/components/Dialog/Dialog/index.d.ts +0 -19
  271. package/types/components/Dialog/DialogComponent/index.d.ts +0 -19
  272. package/types/components/NumberKeyboard/Key/index.d.ts +0 -8
  273. package/types/components/PickerSlot/index.d.ts +0 -24
  274. package/types/components/Tabbar/components/TabItem.d.ts +0 -9
  275. package/types/components/Tabbar/components/Tabbar.d.ts +0 -30
  276. package/types/components/Theme/index.d.ts +0 -27
@@ -1,30 +1,29 @@
1
- import React, { ReactNode } from "react";
2
- import Group from "./Group";
3
- import type { XHComponentCommonProps } from "../../types";
4
- import "./index.scss";
5
- declare type CompoundedComponent = React.ForwardRefExoticComponent<XHRadioProps & React.RefAttributes<HTMLInputElement>> & {
6
- Group: typeof Group;
7
- };
8
- export declare type XHRadioProps = {
9
- onChange?: (check: boolean, value: string | number) => void;
10
- checked?: boolean;
11
- name?: string;
12
- label: string | ReactNode;
13
- size?: number;
14
- circle?: boolean;
15
- align?: "center" | "end";
16
- direction?: "rtl";
17
- justify?: "around" | "between";
18
- value?: string | number;
19
- id?: string;
20
- disabled?: boolean;
21
- style?: React.CSSProperties;
22
- fancy?: boolean;
23
- /**
24
- * 抖音不支持属性选择器
25
- * @description 主要为抖音支持颜色
26
- */
27
- color?: string;
28
- } & XHComponentCommonProps;
29
- declare const Radio: CompoundedComponent;
30
- export default Radio;
1
+ import React, { ReactNode } from "react";
2
+ import Group from "./Group";
3
+ import type { XHComponentCommonProps } from "../../types";
4
+ declare type CompoundedComponent = React.ForwardRefExoticComponent<XHRadioProps & React.RefAttributes<HTMLInputElement>> & {
5
+ Group: typeof Group;
6
+ };
7
+ export declare type XHRadioProps = {
8
+ onChange?: (check: boolean, value: string | number) => void;
9
+ checked?: boolean;
10
+ name?: string;
11
+ label: string | ReactNode;
12
+ size?: number;
13
+ circle?: boolean;
14
+ align?: "center" | "end";
15
+ direction?: "rtl";
16
+ justify?: "around" | "between";
17
+ value?: string | number;
18
+ id?: string;
19
+ disabled?: boolean;
20
+ style?: React.CSSProperties;
21
+ fancy?: boolean;
22
+ /**
23
+ * 抖音不支持属性选择器
24
+ * @description 主要为抖音支持颜色
25
+ */
26
+ color?: string;
27
+ } & XHComponentCommonProps;
28
+ declare const Radio: CompoundedComponent;
29
+ export default Radio;
@@ -1,14 +1,13 @@
1
- import React from "react";
2
- import "./index.scss";
3
- declare type RankProps = {
4
- defalutScore?: number;
5
- onChange: (rank: number) => void;
6
- max?: number;
7
- size?: number;
8
- tip?: string;
9
- style?: React.CSSProperties & {
10
- "--color-primary": string;
11
- };
12
- };
13
- declare const Rank: React.FC<RankProps>;
14
- export default Rank;
1
+ import React from "react";
2
+ declare type RankProps = {
3
+ defalutScore?: number;
4
+ onChange: (rank: number) => void;
5
+ max?: number;
6
+ size?: number;
7
+ tip?: string;
8
+ style?: React.CSSProperties & {
9
+ "--color-primary": string;
10
+ };
11
+ };
12
+ declare const Rank: React.FC<RankProps>;
13
+ export default Rank;
@@ -1,24 +1,23 @@
1
- import React, { ReactNode } from "react";
2
- import { XHComponentCommonProps } from "../../types";
3
- import "./index.scss";
4
- declare const ImageMap: {
5
- success: string;
6
- empty: string;
7
- fail: string;
8
- networkErr: string;
9
- wait: string;
10
- submitted: string;
11
- faceEmpty: string;
12
- };
13
- export declare type ResultStatus = keyof typeof ImageMap;
14
- export declare type ResultProps = {
15
- status: ResultStatus;
16
- title: ReactNode;
17
- desc?: ReactNode;
18
- slot?: ReactNode;
19
- action?: string;
20
- full?: boolean;
21
- onAction?: () => void;
22
- } & XHComponentCommonProps;
23
- declare const Result: React.FC<ResultProps>;
24
- export default Result;
1
+ import React, { ReactNode } from "react";
2
+ import { XHComponentCommonProps } from "../../types";
3
+ declare const ImageMap: {
4
+ success: string;
5
+ empty: string;
6
+ fail: string;
7
+ networkErr: string;
8
+ wait: string;
9
+ submitted: string;
10
+ faceEmpty: string;
11
+ };
12
+ export declare type ResultStatus = keyof typeof ImageMap;
13
+ export declare type ResultProps = {
14
+ status: ResultStatus;
15
+ title: ReactNode;
16
+ desc?: ReactNode;
17
+ slot?: ReactNode;
18
+ action?: string;
19
+ full?: boolean;
20
+ onAction?: () => void;
21
+ } & XHComponentCommonProps;
22
+ declare const Result: React.FC<ResultProps>;
23
+ export default Result;
@@ -1,11 +1,11 @@
1
- import React from "react";
2
- import { XHComponentCommonProps } from "../../types";
3
- export declare type ScrolllViewProps = {
4
- /**试验性组件、暂不支持小程序端,小程序可以用taro提供的 */
5
- direction: "x" | "y";
6
- upperThreshold?: number;
7
- lowerThreshold?: number;
8
- onScrollToLower: () => void;
9
- } & XHComponentCommonProps & React.HTMLAttributes<HTMLDivElement>;
10
- declare const ScrolllView: React.FC<ScrolllViewProps>;
11
- export default ScrolllView;
1
+ import React from "react";
2
+ import { XHComponentCommonProps } from "../../types";
3
+ export declare type ScrolllViewProps = {
4
+ /**试验性组件、暂不支持小程序端,小程序可以用taro提供的 */
5
+ direction: "x" | "y";
6
+ upperThreshold?: number;
7
+ lowerThreshold?: number;
8
+ onScrollToLower: () => void;
9
+ } & XHComponentCommonProps & React.HTMLAttributes<HTMLDivElement>;
10
+ declare const ScrolllView: React.FC<ScrolllViewProps>;
11
+ export default ScrolllView;
@@ -1,11 +1,11 @@
1
- import * as React from "react";
2
- export interface ItemProps {
3
- className: string;
4
- children: React.ReactNode;
5
- index: number;
6
- direction?: "horizontal" | "vertical";
7
- marginDirection: "marginLeft" | "marginRight";
8
- split?: string | React.ReactNode;
9
- wrap?: boolean;
10
- }
11
- export default function Item({ className, direction, index, marginDirection, children, split, wrap, }: ItemProps): JSX.Element | null;
1
+ import * as React from "react";
2
+ export interface ItemProps {
3
+ className: string;
4
+ children: React.ReactNode;
5
+ index: number;
6
+ direction?: "horizontal" | "vertical";
7
+ marginDirection: "marginLeft" | "marginRight";
8
+ split?: string | React.ReactNode;
9
+ wrap?: boolean;
10
+ }
11
+ export default function Item({ className, direction, index, marginDirection, children, split, wrap, }: ItemProps): JSX.Element | null;
@@ -1,12 +1,12 @@
1
- import React from "react";
2
- export declare type DirectionType = "ltr" | "rtl" | undefined;
3
- export declare type SizeType = "small" | "normal" | "large" | undefined;
4
- export interface ConfigConsumerProps {
5
- getPrefixCls: (suffixCls?: string) => string;
6
- direction?: DirectionType;
7
- space?: {
8
- size?: SizeType | number;
9
- };
10
- }
11
- export declare const defaultGetPrefixCls: (suffixCls?: string) => string;
12
- export declare const ConfigContext: React.Context<ConfigConsumerProps>;
1
+ import React from "react";
2
+ export declare type DirectionType = "ltr" | "rtl" | undefined;
3
+ export declare type SizeType = "small" | "normal" | "large" | undefined;
4
+ export interface ConfigConsumerProps {
5
+ getPrefixCls: (suffixCls?: string) => string;
6
+ direction?: DirectionType;
7
+ space?: {
8
+ size?: SizeType | number;
9
+ };
10
+ }
11
+ export declare const defaultGetPrefixCls: (suffixCls?: string) => string;
12
+ export declare const ConfigContext: React.Context<ConfigConsumerProps>;
@@ -1,21 +1,20 @@
1
- import React from "react";
2
- import { SizeType } from "./config-provider";
3
- import type { XHComponentCommonProps } from "../../types";
4
- import "./index.scss";
5
- export declare const SpaceConfigContext: React.Context<import("./config-provider").ConfigConsumerProps>;
6
- export declare type SpaceProps = {
7
- direction?: "horizontal" | "vertical";
8
- align?: "start" | "end" | "center" | "baseline";
9
- size?: SizeType | [SizeType, SizeType];
10
- style?: React.CSSProperties;
11
- split?: React.ReactNode;
12
- wrap?: boolean;
13
- } & XHComponentCommonProps;
14
- export declare const SpaceContext: React.Context<{
15
- latestIndex: number;
16
- horizontalSize: number;
17
- verticalSize: number;
18
- supportFlexGap: boolean;
19
- }>;
20
- declare const XHSpace: React.FC<SpaceProps>;
21
- export default XHSpace;
1
+ import React from "react";
2
+ import { SizeType } from "./config-provider";
3
+ import type { XHComponentCommonProps } from "../../types";
4
+ export declare const SpaceConfigContext: React.Context<import("./config-provider").ConfigConsumerProps>;
5
+ export declare type SpaceProps = {
6
+ direction?: "horizontal" | "vertical";
7
+ align?: "start" | "end" | "center" | "baseline";
8
+ size?: SizeType | [SizeType, SizeType];
9
+ style?: React.CSSProperties;
10
+ split?: React.ReactNode;
11
+ wrap?: boolean;
12
+ } & XHComponentCommonProps;
13
+ export declare const SpaceContext: React.Context<{
14
+ latestIndex: number;
15
+ horizontalSize: number;
16
+ verticalSize: number;
17
+ supportFlexGap: boolean;
18
+ }>;
19
+ declare const XHSpace: React.FC<SpaceProps>;
20
+ export default XHSpace;
@@ -1,14 +1,14 @@
1
- import React, { FC } from "react";
2
- import type { XHComponentCommonProps } from "../../../types";
3
- export declare type StepsProps = {
4
- current?: number;
5
- direction?: "horizontal" | "vertical";
6
- children?: React.ReactNode;
7
- style?: React.CSSProperties & {
8
- "--line-to-next-color"?: string;
9
- "--color-primary"?: string;
10
- };
11
- dashed?: boolean;
12
- } & XHComponentCommonProps;
13
- declare const Steps: FC<StepsProps>;
14
- export default Steps;
1
+ import React, { FC } from "react";
2
+ import type { XHComponentCommonProps } from "../../../types";
3
+ export declare type StepsProps = {
4
+ current?: number;
5
+ direction?: "horizontal" | "vertical";
6
+ children?: React.ReactNode;
7
+ style?: React.CSSProperties & {
8
+ "--line-to-next-color"?: string;
9
+ "--color-primary"?: string;
10
+ };
11
+ dashed?: boolean;
12
+ } & XHComponentCommonProps;
13
+ declare const Steps: FC<StepsProps>;
14
+ export default Steps;
@@ -1,20 +1,19 @@
1
- import React, { ReactNode, ForwardRefExoticComponent } from "react";
2
- import type { XHComponentCommonProps } from "../../types";
3
- import Steps from "./Steps";
4
- import "./index.scss";
5
- export declare type StepProps = {
6
- icon?: string | ReactNode;
7
- title: string | ReactNode;
8
- description?: string | ReactNode;
9
- direction?: "horizontal" | "vertical";
10
- status?: "wait" | "process" | "finish" | "error";
11
- fancy?: boolean;
12
- dashed?: boolean;
13
- style?: React.CSSProperties;
14
- prefix?: ReactNode;
15
- } & XHComponentCommonProps;
16
- export declare type HybridComponent = ForwardRefExoticComponent<StepProps> & {
17
- Steps: typeof Steps;
18
- };
19
- declare const XHStep: HybridComponent;
20
- export default XHStep;
1
+ import React, { ReactNode, ForwardRefExoticComponent } from "react";
2
+ import type { XHComponentCommonProps } from "../../types";
3
+ import Steps from "./Steps";
4
+ export declare type StepProps = {
5
+ icon?: string | ReactNode;
6
+ title: string | ReactNode;
7
+ description?: string | ReactNode;
8
+ direction?: "horizontal" | "vertical";
9
+ status?: "wait" | "process" | "finish" | "error";
10
+ fancy?: boolean;
11
+ dashed?: boolean;
12
+ style?: React.CSSProperties;
13
+ prefix?: ReactNode;
14
+ } & XHComponentCommonProps;
15
+ export declare type HybridComponent = ForwardRefExoticComponent<StepProps> & {
16
+ Steps: typeof Steps;
17
+ };
18
+ declare const XHStep: HybridComponent;
19
+ export default XHStep;
@@ -1,12 +1,11 @@
1
- import React, { ReactNode } from "react";
2
- import "./index.scss";
3
- import { XHComponentCommonProps } from "../../types";
4
- export declare type SwitchProps = {
5
- checked?: boolean;
6
- checkedText?: ReactNode;
7
- uncheckedText?: ReactNode;
8
- onChange?: (checked: boolean) => void;
9
- disabled?: boolean;
10
- } & XHComponentCommonProps;
11
- declare const Switch: React.FC<SwitchProps>;
12
- export default Switch;
1
+ import React, { ReactNode } from "react";
2
+ import { XHComponentCommonProps } from "../../types";
3
+ export declare type SwitchProps = {
4
+ checked?: boolean;
5
+ checkedText?: ReactNode;
6
+ uncheckedText?: ReactNode;
7
+ onChange?: (checked: boolean) => void;
8
+ disabled?: boolean;
9
+ } & XHComponentCommonProps;
10
+ declare const Switch: React.FC<SwitchProps>;
11
+ export default Switch;
@@ -0,0 +1,8 @@
1
+ import { PropsWithChildren, ReactNode } from "react";
2
+ import type { XHComponentCommonProps } from "../../../types";
3
+ export interface TabNavItemProps extends PropsWithChildren<{}>, XHComponentCommonProps {
4
+ children?: ReactNode;
5
+ title: string;
6
+ }
7
+ declare const TabNavItem: (props: TabNavItemProps) => JSX.Element;
8
+ export default TabNavItem;
@@ -0,0 +1,27 @@
1
+ import { FC, ReactNode } from "react";
2
+ import TabNavItem from "./TabNavItem";
3
+ import type { XHComponentCommonProps } from "../../types";
4
+ export interface TabNavProps extends XHComponentCommonProps {
5
+ activeIndex: number;
6
+ onChange?: (index: number) => void;
7
+ children?: ReactNode;
8
+ scrollHeight?: string | number;
9
+ threshold?: number;
10
+ activeClass?: string;
11
+ }
12
+ export declare type TabNavComponent = FC<TabNavProps> & {
13
+ Item: typeof TabNavItem;
14
+ };
15
+ /**
16
+ * TabNav 组件
17
+ * @support h5 目前只支持 h5
18
+ * @example
19
+ * ```tsx
20
+ * <TabNav activeIndex={0}>
21
+ * <TabNav.Item title="标签1">内容1</TabNav.Item>
22
+ * <TabNav.Item title="标签2">内容2</TabNav.Item>
23
+ * </TabNav>
24
+ * ```
25
+ */
26
+ declare const TabNav: TabNavComponent;
27
+ export default TabNav;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
- import { TabProps } from "./tabbar/Tabbar";
3
- import TabBarItem from "./tabbar/TabItem";
4
- import "./index.scss";
5
- export interface TabBarComponent<P = {}> extends React.FC<P> {
6
- Item: typeof TabBarItem;
7
- }
8
- declare const TabBar: TabBarComponent<TabProps>;
9
- export default TabBar;
1
+ /// <reference types="react" />
2
+ import { TabProps } from "./tabbar/Tabbar";
3
+ import TabBarItem from "./tabbar/TabItem";
4
+ export interface TabBarComponent<P = {}> extends React.FC<P> {
5
+ Item: typeof TabBarItem;
6
+ }
7
+ declare const TabBar: TabBarComponent<TabProps>;
8
+ export default TabBar;
@@ -1,8 +1,8 @@
1
- import { PropsWithChildren, ReactNode } from "react";
2
- export interface TabItemProps extends PropsWithChildren<{}> {
3
- title?: string;
4
- TabItemComponent?: ReactNode;
5
- children?: ReactNode;
6
- }
7
- declare const TabItem: (props: TabItemProps) => JSX.Element;
8
- export default TabItem;
1
+ import { PropsWithChildren, ReactNode } from "react";
2
+ export interface TabItemProps extends PropsWithChildren<{}> {
3
+ title?: string;
4
+ TabItemComponent?: ReactNode;
5
+ children?: ReactNode;
6
+ }
7
+ declare const TabItem: (props: TabItemProps) => JSX.Element;
8
+ export default TabItem;
@@ -1,31 +1,31 @@
1
- import { FC, ReactElement, ReactNode } from "react";
2
- import Item from "./TabItem";
3
- /**
4
- * Tab切换
5
- *
6
- * @param children //子组件
7
- * @param animated //是否开启转场动画
8
- * @param selectIndex //默认选中第几个
9
- * @param lineColor //下划线颜色
10
- * @param titleActiveColor //标题选中态颜色
11
- * @param titleInctiveColor //标题默认态颜色
12
- * @param onChange //切换回调事件
13
- * @param content //item公共节点
14
- *
15
- */
16
- export interface TabProps {
17
- children: ReactElement[];
18
- animated?: boolean;
19
- lineColor?: string;
20
- titleActiveColor?: string;
21
- titleInctiveColor?: string;
22
- onChange?: (index: number) => void;
23
- content?: string | ReactNode;
24
- selectIndex: number;
25
- }
26
- export interface TabsComponent<P = {}> extends FC<P> {
27
- Item: typeof Item;
28
- }
29
- declare const XHTabs: TabsComponent<TabProps>;
30
- export default XHTabs;
31
- export declare const TabItem: (props: import("./TabItem").TabItemProps) => JSX.Element;
1
+ import { FC, ReactElement, ReactNode } from "react";
2
+ import Item from "./TabItem";
3
+ /**
4
+ * Tab切换
5
+ *
6
+ * @param children //子组件
7
+ * @param animated //是否开启转场动画
8
+ * @param selectIndex //默认选中第几个
9
+ * @param lineColor //下划线颜色
10
+ * @param titleActiveColor //标题选中态颜色
11
+ * @param titleInctiveColor //标题默认态颜色
12
+ * @param onChange //切换回调事件
13
+ * @param content //item公共节点
14
+ *
15
+ */
16
+ export interface TabProps {
17
+ children: ReactElement[];
18
+ animated?: boolean;
19
+ lineColor?: string;
20
+ titleActiveColor?: string;
21
+ titleInctiveColor?: string;
22
+ onChange?: (index: number) => void;
23
+ content?: string | ReactNode;
24
+ selectIndex: number;
25
+ }
26
+ export interface TabsComponent<P = {}> extends FC<P> {
27
+ Item: typeof Item;
28
+ }
29
+ declare const XHTabs: TabsComponent<TabProps>;
30
+ export default XHTabs;
31
+ export declare const TabItem: (props: import("./TabItem").TabItemProps) => JSX.Element;
@@ -1,30 +1,30 @@
1
- import React, { PropsWithChildren } from "react";
2
- export declare type ThemeValue = {
3
- "--color-primary"?: string;
4
- "--color-primary-dark"?: string;
5
- "--color-primary-reverse"?: string;
6
- "--color-disabled"?: string;
7
- "--color-warning"?: string;
8
- "--color-warning-light"?: string;
9
- "--background-color"?: string;
10
- "--body-background-color"?: string;
11
- "--font-color"?: string;
12
- "--font-color-secondary"?: string;
13
- "--font-color-tertiary"?: string;
14
- "--border-color"?: string;
15
- "--btn-color"?: string;
16
- "--btn-shadow-primary"?: string;
17
- "--mask-color"?: string;
18
- "--btn-color-disabled"?: string;
19
- };
20
- export declare type ThemeProviderProps = {
21
- value: ThemeValue & {
22
- [key: string]: string;
23
- };
24
- scoped?: boolean;
25
- };
26
- export declare const ThemeContext: React.Context<{
27
- [x: string]: string;
28
- }>;
29
- declare const ThemeProvider: React.FC<PropsWithChildren<ThemeProviderProps>>;
30
- export default ThemeProvider;
1
+ import React, { PropsWithChildren } from "react";
2
+ export declare type ThemeValue = {
3
+ "--color-primary"?: string;
4
+ "--color-primary-dark"?: string;
5
+ "--color-primary-reverse"?: string;
6
+ "--color-disabled"?: string;
7
+ "--color-warning"?: string;
8
+ "--color-warning-light"?: string;
9
+ "--background-color"?: string;
10
+ "--body-background-color"?: string;
11
+ "--font-color"?: string;
12
+ "--font-color-secondary"?: string;
13
+ "--font-color-tertiary"?: string;
14
+ "--border-color"?: string;
15
+ "--btn-color"?: string;
16
+ "--btn-shadow-primary"?: string;
17
+ "--mask-color"?: string;
18
+ "--btn-color-disabled"?: string;
19
+ };
20
+ export declare type ThemeProviderProps = {
21
+ value: ThemeValue & {
22
+ [key: string]: string;
23
+ };
24
+ scoped?: boolean;
25
+ };
26
+ export declare const ThemeContext: React.Context<{
27
+ [x: string]: string;
28
+ }>;
29
+ declare const ThemeProvider: React.FC<PropsWithChildren<ThemeProviderProps>>;
30
+ export default ThemeProvider;
@@ -1,20 +1,19 @@
1
- import { FC } from "react";
2
- import { XHComponentCommonProps } from "../../types";
3
- import "./index.scss";
4
- export declare type ToastProps = {
5
- title: string;
6
- duration?: number;
7
- /** 图标
8
- * 可选值:
9
- * - 'success': 显示成功图标,此时 title 文本最多显示 7 个汉字长度;
10
- * - 'error': 显示失败图标,此时 title 文本最多显示 7 个汉字长度;
11
- * - 'loading': 显示加载图标,此时 title 文本最多显示 7 个汉字长度;
12
- * - 'none': 不显示图标,此时 title 文本最多可显示两行 */
13
- icon?: "success" | "error" | "loading" | "none";
14
- /** 自定义图标的本地路径,image 的优先级高于 icon */
15
- image?: string;
16
- /** 是否显示透明蒙层,防止触摸穿透 */
17
- mask?: boolean;
18
- } & XHComponentCommonProps;
19
- declare const ToastCom: FC<ToastProps>;
20
- export default ToastCom;
1
+ import { FC } from "react";
2
+ import { XHComponentCommonProps } from "../../types";
3
+ export declare type ToastProps = {
4
+ title: string;
5
+ duration?: number;
6
+ /** 图标
7
+ * 可选值:
8
+ * - 'success': 显示成功图标,此时 title 文本最多显示 7 个汉字长度;
9
+ * - 'error': 显示失败图标,此时 title 文本最多显示 7 个汉字长度;
10
+ * - 'loading': 显示加载图标,此时 title 文本最多显示 7 个汉字长度;
11
+ * - 'none': 不显示图标,此时 title 文本最多可显示两行 */
12
+ icon?: "success" | "error" | "loading" | "none";
13
+ /** 自定义图标的本地路径,image 的优先级高于 icon */
14
+ image?: string;
15
+ /** 是否显示透明蒙层,防止触摸穿透 */
16
+ mask?: boolean;
17
+ } & XHComponentCommonProps;
18
+ declare const ToastCom: FC<ToastProps>;
19
+ export default ToastCom;
@@ -1,5 +1,4 @@
1
- import { ToastProps } from "./Toast";
2
- import "./index.scss";
3
- declare function Toast(message: string | number, duration?: number): Promise<void>;
4
- declare function Toast(props: ToastProps): Promise<void>;
5
- export default Toast;
1
+ import { ToastProps } from "./Toast";
2
+ declare function Toast(message: string | number, duration?: number): Promise<void>;
3
+ declare function Toast(props: ToastProps): Promise<void>;
4
+ export default Toast;
@@ -1,2 +1,2 @@
1
- export declare const useTaroEnv: () => string;
2
- export declare const useAsyncEffect: (fn: any, deps: any) => Promise<void>;
1
+ export declare const useTaroEnv: () => string;
2
+ export declare const useAsyncEffect: (fn: any, deps: any) => Promise<void>;
@@ -1,6 +1,6 @@
1
- declare const useCustomNavBar: () => {
2
- navBarHeight: number;
3
- statusBar: number;
4
- buttonRight: number;
5
- };
6
- export default useCustomNavBar;
1
+ declare const useCustomNavBar: () => {
2
+ navBarHeight: number;
3
+ statusBar: number;
4
+ buttonRight: number;
5
+ };
6
+ export default useCustomNavBar;
@@ -1 +1 @@
1
- export default function useFirstMountState(): boolean;
1
+ export default function useFirstMountState(): boolean;
@@ -1,2 +1,2 @@
1
- declare const _default: () => boolean;
2
- export default _default;
1
+ declare const _default: () => boolean;
2
+ export default _default;
@@ -1 +1 @@
1
- export default function (id: any, prefix?: string): any;
1
+ export default function (id: any, prefix?: string): any;