fat-design 0.0.1-beta.20251010161507 → 0.0.1-beta.20251012170705

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 (247) hide show
  1. package/README.md +285 -285
  2. package/index.browser.js +24 -24
  3. package/index.js +3869 -3723
  4. package/index.umd.cjs +23 -23
  5. package/index.umd.js +23 -23
  6. package/libs/config-16.js +7 -7
  7. package/libs/config-17.js +7 -7
  8. package/libs/config-18.js +9 -9
  9. package/libs/config-19.js +9 -9
  10. package/libs/theme/theme-blue1.css +58 -58
  11. package/libs/theme/theme-blue2.css +63 -63
  12. package/libs/theme/theme-blue3.css +73 -73
  13. package/libs/theme/theme-blue4.css +53 -53
  14. package/libs/theme/theme-default.css +60 -60
  15. package/libs/theme/theme-green.css +96 -96
  16. package/libs/theme/theme-green2.css +96 -96
  17. package/libs/theme/theme-orange.css +58 -58
  18. package/libs/theme/theme-pink.css +53 -53
  19. package/libs/theme/theme-purple.css +53 -53
  20. package/libs/theme/theme-red.css +55 -55
  21. package/package.json +2 -2
  22. package/types/0buildTypes/config-provider/constants.d.ts +3 -3
  23. package/types/0buildTypes/config-provider/index.d.ts +4 -4
  24. package/types/0buildTypes/config-provider/v2/consumer.d.ts +3 -3
  25. package/types/0buildTypes/config-provider/v2/context.d.ts +6 -6
  26. package/types/0buildTypes/config-provider/v2/error-boundary.d.ts +27 -27
  27. package/types/0buildTypes/config-provider/v2/functions.d.ts +66 -66
  28. package/types/0buildTypes/config-provider/v2/index.d.ts +36 -37
  29. package/types/0buildTypes/config-provider/v2/provider.d.ts +4 -4
  30. package/types/0buildTypes/config-provider/v2/types.d.ts +22 -22
  31. package/types/0buildTypes/dependencies.d.ts +2 -2
  32. package/types/0buildTypes/empty/empty.d.ts +22 -22
  33. package/types/0buildTypes/empty/index.d.ts +2 -2
  34. package/types/0buildTypes/filter/filter-types.d.ts +21 -21
  35. package/types/0buildTypes/filter/filter.d.ts +10 -10
  36. package/types/0buildTypes/filter/index.d.ts +9 -9
  37. package/types/0buildTypes/form2/deps.d.ts +10 -10
  38. package/types/0buildTypes/form2/form-actions.d.ts +36 -36
  39. package/types/0buildTypes/form2/form-buttons.d.ts +28 -28
  40. package/types/0buildTypes/form2/form-context.d.ts +4 -4
  41. package/types/0buildTypes/form2/form-error.d.ts +3 -3
  42. package/types/0buildTypes/form2/form-item-card.d.ts +4 -4
  43. package/types/0buildTypes/form2/form-item-comp.d.ts +4 -4
  44. package/types/0buildTypes/form2/form-item-label.d.ts +4 -4
  45. package/types/0buildTypes/form2/form-item-preview.d.ts +4 -4
  46. package/types/0buildTypes/form2/form-item.d.ts +7 -7
  47. package/types/0buildTypes/form2/form-layout.d.ts +3 -3
  48. package/types/0buildTypes/form2/form-rules.d.ts +3 -3
  49. package/types/0buildTypes/form2/form-section.d.ts +25 -25
  50. package/types/0buildTypes/form2/form-types.d.ts +395 -395
  51. package/types/0buildTypes/form2/form.d.ts +36 -36
  52. package/types/0buildTypes/form2/helper/buildParams.d.ts +5 -5
  53. package/types/0buildTypes/form2/helper/constants.d.ts +24 -24
  54. package/types/0buildTypes/form2/helper/fixItemProps.d.ts +16 -16
  55. package/types/0buildTypes/form2/helper/fnInheritProps.d.ts +2 -2
  56. package/types/0buildTypes/form2/helper/linkageFormState.d.ts +16 -16
  57. package/types/0buildTypes/form2/helper/useDataSource.d.ts +14 -14
  58. package/types/0buildTypes/form2/helper/useFormChildren.d.ts +5 -5
  59. package/types/0buildTypes/form2/helper/useFormItemState.d.ts +3 -3
  60. package/types/0buildTypes/form2/helper/useGetXProps.d.ts +3 -3
  61. package/types/0buildTypes/form2/index.d.ts +20 -20
  62. package/types/0buildTypes/form2/layout/from-float-layout.d.ts +3 -3
  63. package/types/0buildTypes/hooks/index.d.ts +25 -16
  64. package/types/0buildTypes/hooks/useComparedState.d.ts +2 -0
  65. package/types/0buildTypes/hooks/useCurrentState.d.ts +11 -11
  66. package/types/0buildTypes/hooks/useOnKeyPressSave.d.ts +12 -12
  67. package/types/0buildTypes/hooks/usePersistFn.d.ts +3 -3
  68. package/types/0buildTypes/hooks/usePreciseStore.d.ts +53 -53
  69. package/types/0buildTypes/hooks/useSize.d.ts +6 -6
  70. package/types/0buildTypes/hooks/useUniqueId.d.ts +2 -2
  71. package/types/0buildTypes/hooks/useValueOnChange.d.ts +2 -2
  72. package/types/0buildTypes/image/Image.d.ts +42 -42
  73. package/types/0buildTypes/image/Operations.d.ts +25 -25
  74. package/types/0buildTypes/image/Preview.d.ts +64 -64
  75. package/types/0buildTypes/image/PreviewGroup.d.ts +32 -32
  76. package/types/0buildTypes/image/common.d.ts +2 -2
  77. package/types/0buildTypes/image/context.d.ts +7 -7
  78. package/types/0buildTypes/image/getFixScaleEleTransPosition.d.ts +17 -17
  79. package/types/0buildTypes/image/hooks/useImageTransform.d.ts +28 -28
  80. package/types/0buildTypes/image/hooks/useMouseEvent.d.ts +9 -9
  81. package/types/0buildTypes/image/hooks/usePreviewItems.d.ts +7 -7
  82. package/types/0buildTypes/image/hooks/useRegisterImage.d.ts +2 -2
  83. package/types/0buildTypes/image/hooks/useStatus.d.ts +14 -14
  84. package/types/0buildTypes/image/hooks/useTouchEvent.d.ts +8 -8
  85. package/types/0buildTypes/image/index.d.ts +6 -6
  86. package/types/0buildTypes/image/interface.d.ts +14 -14
  87. package/types/0buildTypes/image/previewConfig.d.ts +4 -4
  88. package/types/0buildTypes/image/util.d.ts +1 -1
  89. package/types/0buildTypes/image/utils/KeyCode.d.ts +23 -23
  90. package/types/0buildTypes/image/utils/addEventListener.d.ts +4 -4
  91. package/types/0buildTypes/image/utils/buildIcons.d.ts +2 -2
  92. package/types/0buildTypes/image/utils/css.d.ts +8 -8
  93. package/types/0buildTypes/image/utils/isEqual.d.ts +8 -8
  94. package/types/0buildTypes/image/utils/raf.d.ts +6 -6
  95. package/types/0buildTypes/image/utils/useEvent.d.ts +1 -1
  96. package/types/0buildTypes/image/utils/useLayoutEffect.d.ts +4 -4
  97. package/types/0buildTypes/image/utils/useMergedState.d.ts +12 -12
  98. package/types/0buildTypes/image/utils/useSafeState.d.ts +14 -14
  99. package/types/0buildTypes/index.d.ts +4 -4
  100. package/types/0buildTypes/libs.d.ts +67 -67
  101. package/types/0buildTypes/nav/group.d.ts +30 -30
  102. package/types/0buildTypes/nav/index.d.ts +4 -4
  103. package/types/0buildTypes/nav/item.d.ts +30 -30
  104. package/types/0buildTypes/nav/nav.d.ts +2 -2
  105. package/types/0buildTypes/nav/popup-item.d.ts +24 -24
  106. package/types/0buildTypes/nav/sub-nav.d.ts +30 -30
  107. package/types/0buildTypes/nav/types.d.ts +375 -375
  108. package/types/0buildTypes/others.d.ts +10 -10
  109. package/types/0buildTypes/pages/deps.d.ts +5 -5
  110. package/types/0buildTypes/pages/detail-page/detail-page-card-form.d.ts +12 -12
  111. package/types/0buildTypes/pages/detail-page/detail-page-form-item.d.ts +9 -9
  112. package/types/0buildTypes/pages/detail-page/detail-page-section.d.ts +19 -19
  113. package/types/0buildTypes/pages/detail-page/detail-page-summary.d.ts +9 -9
  114. package/types/0buildTypes/pages/detail-page/detail-page.d.ts +14 -14
  115. package/types/0buildTypes/pages/detail-page/index.d.ts +2 -2
  116. package/types/0buildTypes/pages/detail-page/types.d.ts +29 -29
  117. package/types/0buildTypes/pages/page-card/types.d.ts +6 -6
  118. package/types/0buildTypes/previews/renderFileImage.d.ts +34 -34
  119. package/types/0buildTypes/query-form/index.d.ts +2 -2
  120. package/types/0buildTypes/query-form/query-form-items.d.ts +3 -3
  121. package/types/0buildTypes/query-form/query-form-layout.d.ts +2 -2
  122. package/types/0buildTypes/query-form/query-form.d.ts +18 -18
  123. package/types/0buildTypes/query-form/types.d.ts +5 -5
  124. package/types/0buildTypes/sortable-list/helpers.d.ts +8 -8
  125. package/types/0buildTypes/sortable-list/hooks.d.ts +24 -24
  126. package/types/0buildTypes/sortable-list/index.d.ts +14 -14
  127. package/types/0buildTypes/sortable-list/sortable-editable-table.d.ts +2 -2
  128. package/types/0buildTypes/sortable-list/sortable-list.d.ts +560 -560
  129. package/types/0buildTypes/sortable-list/sortable-table.d.ts +2 -2
  130. package/types/0buildTypes/sortable-list/types.d.ts +15 -15
  131. package/types/0buildTypes/table-pro/index.d.ts +26 -26
  132. package/types/0buildTypes/table-pro/table-pro.d.ts +17 -17
  133. package/types/0buildTypes/table-pro/types.d.ts +95 -95
  134. package/types/0buildTypes/table-pro/useTablePro.d.ts +10 -10
  135. package/types/0buildTypes/table-pro/utils/formatQueryRes.d.ts +1 -1
  136. package/types/0buildTypes/table-pro/widget/column-setting.d.ts +5 -5
  137. package/types/0buildTypes/table-pro/widget/deps.d.ts +2 -2
  138. package/types/0buildTypes/table-pro/widget/index.d.ts +25 -25
  139. package/types/0buildTypes/table-pro/widget/operations.d.ts +5 -5
  140. package/types/0buildTypes/table-pro/widget/operationsActions.d.ts +2 -2
  141. package/types/0buildTypes/table-pro/widget/renderFormats.d.ts +17 -17
  142. package/types/0buildTypes/table-pro/widget/renderMultiFieldCell.d.ts +4 -4
  143. package/types/0buildTypes/table-pro/widget/renderOperationCell.d.ts +4 -4
  144. package/types/0buildTypes/table-pro/widget/renderToolbar.d.ts +6 -6
  145. package/types/0buildTypes/table-pro/widget/table-utils-types.d.ts +40 -40
  146. package/types/0buildTypes/util/comp.d.ts +16 -16
  147. package/types/0buildTypes/util/component.d.ts +1 -1
  148. package/types/0buildTypes/util/constants.d.ts +4 -4
  149. package/types/0buildTypes/util/dom.d.ts +116 -116
  150. package/types/0buildTypes/util/env.d.ts +7 -7
  151. package/types/0buildTypes/util/func-wrapper.d.ts +1 -1
  152. package/types/0buildTypes/util/func.d.ts +73 -73
  153. package/types/0buildTypes/util/guid.d.ts +11 -11
  154. package/types/0buildTypes/util/isStateEquals.d.ts +4 -4
  155. package/types/0buildTypes/util/localforage.d.ts +11 -11
  156. package/types/0buildTypes/util/log.d.ts +18 -18
  157. package/types/0buildTypes/util/pick-res-data.d.ts +28 -28
  158. package/types/0buildTypes/util/react-dom.d.ts +27 -27
  159. package/types/0buildTypes/util/shallowEqual.d.ts +3 -3
  160. package/types/0buildTypes/util/string.d.ts +32 -32
  161. package/types/0buildTypes/util/tiny-emitter.d.ts +10 -10
  162. package/types/0buildTypes/util/toMap.d.ts +7 -7
  163. package/types/affix/index.d.ts +33 -33
  164. package/types/animate/index.d.ts +80 -80
  165. package/types/avatar/index.d.ts +41 -41
  166. package/types/badge/index.d.ts +38 -38
  167. package/types/balloon/index.d.ts +254 -254
  168. package/types/balloon-confirm/index.d.ts +119 -78
  169. package/types/batch-input/index.d.ts +152 -152
  170. package/types/box/index.d.ts +25 -18
  171. package/types/breadcrumb/index.d.ts +60 -60
  172. package/types/button/index.d.ts +179 -179
  173. package/types/calendar/index.d.ts +76 -76
  174. package/types/card/index.d.ts +147 -147
  175. package/types/cascader/index.d.ts +135 -135
  176. package/types/cascader-select/index.d.ts +230 -230
  177. package/types/checkbox/index.d.ts +175 -175
  178. package/types/collapse/index.d.ts +96 -96
  179. package/types/comments/index.d.ts +278 -278
  180. package/types/config-provider/index.d.ts +3 -3
  181. package/types/date-picker/index.d.ts +123 -123
  182. package/types/dialog/index.d.ts +328 -328
  183. package/types/divider/index.d.ts +21 -21
  184. package/types/drawer/index.d.ts +121 -121
  185. package/types/dropdown/index.d.ts +198 -198
  186. package/types/editable-table/index.d.ts +121 -121
  187. package/types/empty/index.d.ts +78 -78
  188. package/types/field/index.d.ts +33 -33
  189. package/types/filter/index.d.ts +2 -2
  190. package/types/form/index.d.ts +5 -5
  191. package/types/grid/index.d.ts +142 -142
  192. package/types/hooks/index.d.ts +2 -2
  193. package/types/icon/index.d.ts +29 -29
  194. package/types/image/index.d.ts +3 -3
  195. package/types/index.d.ts +69 -69
  196. package/types/input/index.d.ts +458 -458
  197. package/types/list/index.d.ts +69 -69
  198. package/types/loading/index.d.ts +100 -100
  199. package/types/locale/default.d.ts +143 -143
  200. package/types/locale/en-us.d.ts +1 -1
  201. package/types/locale/id-id.d.ts +1 -1
  202. package/types/locale/it-it.d.ts +1 -1
  203. package/types/locale/ja-jp.d.ts +1 -1
  204. package/types/locale/ko-kr.d.ts +1 -1
  205. package/types/locale/ms-my.d.ts +1 -1
  206. package/types/locale/pt-pt.d.ts +1 -1
  207. package/types/locale/th-th.d.ts +1 -1
  208. package/types/locale/vi-vn.d.ts +1 -1
  209. package/types/locale/zh-cn.d.ts +1 -1
  210. package/types/locale/zh-hk.d.ts +1 -1
  211. package/types/locale/zh-tw.d.ts +1 -1
  212. package/types/menu/index.d.ts +336 -336
  213. package/types/menu-button/index.d.ts +100 -100
  214. package/types/message/index.d.ts +165 -165
  215. package/types/nav/index.d.ts +313 -313
  216. package/types/notification/index.d.ts +35 -35
  217. package/types/number-picker/index.d.ts +161 -161
  218. package/types/overlay/index.d.ts +363 -363
  219. package/types/pagination/index.d.ts +115 -115
  220. package/types/paragraph/index.d.ts +23 -23
  221. package/types/progress/index.d.ts +53 -53
  222. package/types/query-form/index.d.ts +3 -3
  223. package/types/radio/index.d.ts +180 -180
  224. package/types/range/index.d.ts +120 -120
  225. package/types/rating/index.d.ts +84 -84
  226. package/types/responsive-grid/index.d.ts +30 -30
  227. package/types/search/index.d.ts +219 -219
  228. package/types/select/index.d.ts +479 -479
  229. package/types/shell/index.d.ts +53 -53
  230. package/types/slider/index.d.ts +172 -172
  231. package/types/sortable-list/index.d.ts +165 -165
  232. package/types/split-button/index.d.ts +134 -134
  233. package/types/step/index.d.ts +108 -108
  234. package/types/switch/index.d.ts +85 -85
  235. package/types/tab/index.d.ts +170 -170
  236. package/types/table/index.d.ts +407 -407
  237. package/types/table-pro/index.d.ts +3 -3
  238. package/types/tag/index.d.ts +142 -142
  239. package/types/time-picker/index.d.ts +193 -193
  240. package/types/timeline/index.d.ts +95 -95
  241. package/types/transfer/index.d.ts +199 -199
  242. package/types/tree/index.d.ts +421 -421
  243. package/types/tree-select/index.d.ts +251 -251
  244. package/types/typography/index.d.ts +28 -28
  245. package/types/upload/index.d.ts +711 -711
  246. package/types/util.d.ts +80 -80
  247. package/types/virtual-list/index.d.ts +44 -44
@@ -1,100 +1,100 @@
1
- /// <reference types="react" />
2
-
3
- import * as React from 'react';
4
- import { Item, Group, Divider, MenuProps } from '../menu';
5
- import CommonProps from '../util';
6
- import { ButtonProps } from '../button';
7
- import { PopupProps } from '../overlay';
8
-
9
- export interface MenuButtonProps extends Omit<ButtonProps, 'onSelect'>, CommonProps {
10
- /**
11
- * 按钮上的文本内容
12
- */
13
- label?: React.ReactNode;
14
-
15
- /**
16
- * 弹层是否与按钮宽度相同
17
- */
18
- autoWidth?: boolean;
19
-
20
- /**
21
- * 弹层触发方式
22
- */
23
- popupTriggerType?: 'click' | 'hover';
24
-
25
- /**
26
- * 弹层容器
27
- */
28
- popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
29
-
30
- /**
31
- * 弹层展开状态
32
- */
33
- visible?: boolean;
34
-
35
- /**
36
- * 弹层默认是否展开
37
- */
38
- defaultVisible?: boolean;
39
-
40
- /**
41
- * 弹层在显示和隐藏触发的事件
42
- */
43
- onVisibleChange?: (visible: boolean, type: string) => void;
44
-
45
- /**
46
- * 弹层自定义样式
47
- */
48
- popupStyle?: React.CSSProperties;
49
-
50
- /**
51
- * 弹层自定义样式类
52
- */
53
- popupClassName?: string;
54
-
55
- /**
56
- * 弹层属性透传
57
- */
58
- popupProps?: PopupProps;
59
-
60
- /**
61
- * 菜单是否跟随滚动
62
- */
63
- followTrigger?: boolean;
64
-
65
- /**
66
- * 默认激活的菜单项(用法同 Menu 非受控)
67
- */
68
- defaultSelectedKeys?: Array<any>;
69
-
70
- /**
71
- * 激活的菜单项(用法同 Menu 受控)
72
- */
73
- selectedKeys?: string | Array<any>;
74
-
75
- /**
76
- * 菜单的选择模式,同 Menu
77
- */
78
- selectMode?: 'single' | 'multiple';
79
-
80
- /**
81
- * 点击菜单项后的回调,同 Menu
82
- */
83
- onItemClick?: (key: string, item: any, event: React.MouseEvent<HTMLElement>) => void;
84
-
85
- /**
86
- * 选择菜单后的回调,同 Menu
87
- */
88
- onSelect?: (selectedKeys: Array<any>, item: any, extra: any) => void;
89
-
90
- /**
91
- * 菜单属性透传
92
- */
93
- menuProps?: MenuProps;
94
- }
95
-
96
- export default class MenuButton extends React.Component<MenuButtonProps, any> {
97
- static Item: typeof Item;
98
- static Group: typeof Group;
99
- static Divider: typeof Divider;
100
- }
1
+ /// <reference types="react" />
2
+
3
+ import * as React from 'react';
4
+ import { Item, Group, Divider, MenuProps } from '../menu';
5
+ import CommonProps from '../util';
6
+ import { ButtonProps } from '../button';
7
+ import { PopupProps } from '../overlay';
8
+
9
+ export interface MenuButtonProps extends Omit<ButtonProps, 'onSelect'>, CommonProps {
10
+ /**
11
+ * 按钮上的文本内容
12
+ */
13
+ label?: React.ReactNode;
14
+
15
+ /**
16
+ * 弹层是否与按钮宽度相同
17
+ */
18
+ autoWidth?: boolean;
19
+
20
+ /**
21
+ * 弹层触发方式
22
+ */
23
+ popupTriggerType?: 'click' | 'hover';
24
+
25
+ /**
26
+ * 弹层容器
27
+ */
28
+ popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
29
+
30
+ /**
31
+ * 弹层展开状态
32
+ */
33
+ visible?: boolean;
34
+
35
+ /**
36
+ * 弹层默认是否展开
37
+ */
38
+ defaultVisible?: boolean;
39
+
40
+ /**
41
+ * 弹层在显示和隐藏触发的事件
42
+ */
43
+ onVisibleChange?: (visible: boolean, type: string) => void;
44
+
45
+ /**
46
+ * 弹层自定义样式
47
+ */
48
+ popupStyle?: React.CSSProperties;
49
+
50
+ /**
51
+ * 弹层自定义样式类
52
+ */
53
+ popupClassName?: string;
54
+
55
+ /**
56
+ * 弹层属性透传
57
+ */
58
+ popupProps?: PopupProps;
59
+
60
+ /**
61
+ * 菜单是否跟随滚动
62
+ */
63
+ followTrigger?: boolean;
64
+
65
+ /**
66
+ * 默认激活的菜单项(用法同 Menu 非受控)
67
+ */
68
+ defaultSelectedKeys?: Array<any>;
69
+
70
+ /**
71
+ * 激活的菜单项(用法同 Menu 受控)
72
+ */
73
+ selectedKeys?: string | Array<any>;
74
+
75
+ /**
76
+ * 菜单的选择模式,同 Menu
77
+ */
78
+ selectMode?: 'single' | 'multiple';
79
+
80
+ /**
81
+ * 点击菜单项后的回调,同 Menu
82
+ */
83
+ onItemClick?: (key: string, item: any, event: React.MouseEvent<HTMLElement>) => void;
84
+
85
+ /**
86
+ * 选择菜单后的回调,同 Menu
87
+ */
88
+ onSelect?: (selectedKeys: Array<any>, item: any, extra: any) => void;
89
+
90
+ /**
91
+ * 菜单属性透传
92
+ */
93
+ menuProps?: MenuProps;
94
+ }
95
+
96
+ export default class MenuButton extends React.Component<MenuButtonProps, any> {
97
+ static Item: typeof Item;
98
+ static Group: typeof Group;
99
+ static Divider: typeof Divider;
100
+ }
@@ -1,165 +1,165 @@
1
- /// <reference types="react" />
2
-
3
- import * as React from 'react';
4
- import CommonProps from '../util';
5
- import { OverlayProps } from '../overlay';
6
- interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
7
- title?: any;
8
- }
9
-
10
- export interface MessageProps extends HTMLAttributesWeak, CommonProps {
11
- /**
12
- * 反馈类型
13
- */
14
- type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading' | 'info';
15
-
16
- /**
17
- * 反馈外观
18
- */
19
- shape?: 'inline' | 'addon' | 'toast';
20
-
21
- /**
22
- * 反馈大小
23
- */
24
- size?: 'medium' | 'large';
25
-
26
- /**
27
- * 标题
28
- */
29
- title?: React.ReactNode;
30
-
31
- /**
32
- * 内容,非函数式调用下使用
33
- */
34
- children?: React.ReactNode;
35
-
36
- /**
37
- * 默认是否显示
38
- */
39
- defaultVisible?: boolean;
40
-
41
- /**
42
- * 当前是否显示
43
- */
44
- visible?: boolean;
45
-
46
- /**
47
- * 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
48
- */
49
- iconType?: string | false;
50
-
51
- /**
52
- * 显示关闭按钮
53
- */
54
- closeable?: boolean;
55
-
56
- /**
57
- * 关闭按钮的回调
58
- */
59
- onClose?: () => void;
60
-
61
- /**
62
- * 关闭之后调用的函数
63
- */
64
- afterClose?: () => void;
65
-
66
- /**
67
- * 是否开启展开收起动画
68
- */
69
- animation?: boolean;
70
- }
71
-
72
- export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'>, CommonProps {
73
- /**
74
- * 反馈类型
75
- */
76
- type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
77
-
78
- /**
79
- * 反馈大小
80
- */
81
- size?: 'medium' | 'large';
82
- /**
83
- * 标题
84
- */
85
- title?: React.ReactNode;
86
-
87
- /**
88
- * 内容,函数式调用下使用
89
- */
90
- content?: React.ReactNode;
91
- /**
92
- * 弹层相对于参照元素的定位, 详见开发指南的[定位部分](#定位)
93
- */
94
- align?: string | boolean;
95
-
96
- /**
97
- * 弹层相对于参照元素定位的微调
98
- */
99
- offset?: Array<any>;
100
- /**
101
- * 是否显示遮罩
102
- */
103
- hasMask?: boolean;
104
-
105
- /**
106
- * 显示持续时间,0表示一直存在,以毫秒为单位
107
- */
108
- duration?: number;
109
-
110
- /**
111
- * 显示关闭按钮
112
- */
113
- closeable?: boolean;
114
-
115
- /**
116
- * 关闭按钮的回调
117
- */
118
- onClose?: () => void;
119
-
120
- /**
121
- * 关闭之后调用的函数
122
- */
123
- afterClose?: () => void;
124
-
125
- /**
126
- * 是否开启展开收起动画
127
- */
128
- animation?: boolean;
129
- /**
130
- * 透传到弹层组件的属性对象
131
- */
132
- overlayProps?: OverlayProps;
133
- }
134
-
135
- type OpenProps = string | React.ReactElement | MessageQuickProps;
136
-
137
-
138
- export interface QuickMsgShowRet {
139
- hide: () => void;
140
- }
141
-
142
- export interface MessageConfigV2 {
143
- top?: number,
144
- maxCount?: number,
145
- duration?: number,
146
- title?: any,
147
- content?: any,
148
- className?: string
149
- }
150
-
151
- export default class Message extends React.Component<MessageProps, any> {
152
- static show(props: OpenProps): QuickMsgShowRet;
153
- static hide();
154
- static destroy();
155
- static success(props: OpenProps): QuickMsgShowRet;
156
- static warning(props: OpenProps): QuickMsgShowRet;
157
- static error(props: OpenProps): QuickMsgShowRet;
158
- static help(props: OpenProps): QuickMsgShowRet;
159
- static loading(props: OpenProps): QuickMsgShowRet;
160
- static notice(props: OpenProps): QuickMsgShowRet;
161
- static info(props: OpenProps): QuickMsgShowRet;
162
- static config(props: MessageConfigV2): void;
163
- static useV1(): void;
164
- static useV2(): void;
165
- }
1
+ /// <reference types="react" />
2
+
3
+ import * as React from 'react';
4
+ import CommonProps from '../util';
5
+ import { OverlayProps } from '../overlay';
6
+ interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
7
+ title?: any;
8
+ }
9
+
10
+ export interface MessageProps extends HTMLAttributesWeak, CommonProps {
11
+ /**
12
+ * 反馈类型
13
+ */
14
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading' | 'info';
15
+
16
+ /**
17
+ * 反馈外观
18
+ */
19
+ shape?: 'inline' | 'addon' | 'toast';
20
+
21
+ /**
22
+ * 反馈大小
23
+ */
24
+ size?: 'medium' | 'large';
25
+
26
+ /**
27
+ * 标题
28
+ */
29
+ title?: React.ReactNode;
30
+
31
+ /**
32
+ * 内容,非函数式调用下使用
33
+ */
34
+ children?: React.ReactNode;
35
+
36
+ /**
37
+ * 默认是否显示
38
+ */
39
+ defaultVisible?: boolean;
40
+
41
+ /**
42
+ * 当前是否显示
43
+ */
44
+ visible?: boolean;
45
+
46
+ /**
47
+ * 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
48
+ */
49
+ iconType?: string | false;
50
+
51
+ /**
52
+ * 显示关闭按钮
53
+ */
54
+ closeable?: boolean;
55
+
56
+ /**
57
+ * 关闭按钮的回调
58
+ */
59
+ onClose?: () => void;
60
+
61
+ /**
62
+ * 关闭之后调用的函数
63
+ */
64
+ afterClose?: () => void;
65
+
66
+ /**
67
+ * 是否开启展开收起动画
68
+ */
69
+ animation?: boolean;
70
+ }
71
+
72
+ export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'>, CommonProps {
73
+ /**
74
+ * 反馈类型
75
+ */
76
+ type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
77
+
78
+ /**
79
+ * 反馈大小
80
+ */
81
+ size?: 'medium' | 'large';
82
+ /**
83
+ * 标题
84
+ */
85
+ title?: React.ReactNode;
86
+
87
+ /**
88
+ * 内容,函数式调用下使用
89
+ */
90
+ content?: React.ReactNode;
91
+ /**
92
+ * 弹层相对于参照元素的定位, 详见开发指南的[定位部分](#定位)
93
+ */
94
+ align?: string | boolean;
95
+
96
+ /**
97
+ * 弹层相对于参照元素定位的微调
98
+ */
99
+ offset?: Array<any>;
100
+ /**
101
+ * 是否显示遮罩
102
+ */
103
+ hasMask?: boolean;
104
+
105
+ /**
106
+ * 显示持续时间,0表示一直存在,以毫秒为单位
107
+ */
108
+ duration?: number;
109
+
110
+ /**
111
+ * 显示关闭按钮
112
+ */
113
+ closeable?: boolean;
114
+
115
+ /**
116
+ * 关闭按钮的回调
117
+ */
118
+ onClose?: () => void;
119
+
120
+ /**
121
+ * 关闭之后调用的函数
122
+ */
123
+ afterClose?: () => void;
124
+
125
+ /**
126
+ * 是否开启展开收起动画
127
+ */
128
+ animation?: boolean;
129
+ /**
130
+ * 透传到弹层组件的属性对象
131
+ */
132
+ overlayProps?: OverlayProps;
133
+ }
134
+
135
+ type OpenProps = string | React.ReactElement | MessageQuickProps;
136
+
137
+
138
+ export interface QuickMsgShowRet {
139
+ hide: () => void;
140
+ }
141
+
142
+ export interface MessageConfigV2 {
143
+ top?: number,
144
+ maxCount?: number,
145
+ duration?: number,
146
+ title?: any,
147
+ content?: any,
148
+ className?: string
149
+ }
150
+
151
+ export default class Message extends React.Component<MessageProps, any> {
152
+ static show(props: OpenProps): QuickMsgShowRet;
153
+ static hide();
154
+ static destroy();
155
+ static success(props: OpenProps): QuickMsgShowRet;
156
+ static warning(props: OpenProps): QuickMsgShowRet;
157
+ static error(props: OpenProps): QuickMsgShowRet;
158
+ static help(props: OpenProps): QuickMsgShowRet;
159
+ static loading(props: OpenProps): QuickMsgShowRet;
160
+ static notice(props: OpenProps): QuickMsgShowRet;
161
+ static info(props: OpenProps): QuickMsgShowRet;
162
+ static config(props: MessageConfigV2): void;
163
+ static useV1(): void;
164
+ static useV2(): void;
165
+ }