aot-ui 0.1.0 → 0.2.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 (300) hide show
  1. package/README.md +26 -20
  2. package/dist-lib/aot-ui.css +1 -1
  3. package/dist-lib/aot-ui.js +30265 -19141
  4. package/dist-lib/index.d.ts +16 -0
  5. package/dist-lib/modules/affix/components/Affix.d.ts +3 -6
  6. package/dist-lib/modules/affix/index.d.ts +1 -1
  7. package/dist-lib/modules/affix/types.d.ts +21 -5
  8. package/dist-lib/modules/alert/components/Alert.d.ts +1 -1
  9. package/dist-lib/modules/alert/index.d.ts +1 -1
  10. package/dist-lib/modules/alert/types.d.ts +39 -2
  11. package/dist-lib/modules/anchor/components/Anchor.d.ts +3 -2
  12. package/dist-lib/modules/anchor/index.d.ts +1 -1
  13. package/dist-lib/modules/anchor/types.d.ts +26 -4
  14. package/dist-lib/modules/arc-progress/components/ArcProgress.d.ts +5 -0
  15. package/dist-lib/modules/arc-progress/constants.d.ts +6 -0
  16. package/dist-lib/modules/arc-progress/index.d.ts +3 -0
  17. package/dist-lib/modules/arc-progress/types.d.ts +22 -0
  18. package/dist-lib/modules/autocomplete/components/Autocomplete.d.ts +2 -2
  19. package/dist-lib/modules/autocomplete/index.d.ts +1 -1
  20. package/dist-lib/modules/autocomplete/types.d.ts +103 -13
  21. package/dist-lib/modules/avatar/components/Avatar.d.ts +1 -1
  22. package/dist-lib/modules/avatar/components/AvatarGroup.d.ts +2 -0
  23. package/dist-lib/modules/avatar/context.d.ts +3 -0
  24. package/dist-lib/modules/avatar/index.d.ts +2 -1
  25. package/dist-lib/modules/avatar/types.d.ts +74 -3
  26. package/dist-lib/modules/back-top/components/BackTop.d.ts +1 -1
  27. package/dist-lib/modules/back-top/types.d.ts +22 -3
  28. package/dist-lib/modules/badge/components/Badge.d.ts +1 -1
  29. package/dist-lib/modules/badge/index.d.ts +1 -1
  30. package/dist-lib/modules/badge/types.d.ts +49 -3
  31. package/dist-lib/modules/border/components/Border.d.ts +5 -0
  32. package/dist-lib/modules/border/constants.d.ts +4 -0
  33. package/dist-lib/modules/border/index.d.ts +3 -0
  34. package/dist-lib/modules/border/types.d.ts +34 -0
  35. package/dist-lib/modules/breadcrumb/components/Breadcrumb.d.ts +1 -1
  36. package/dist-lib/modules/breadcrumb/index.d.ts +1 -1
  37. package/dist-lib/modules/breadcrumb/types.d.ts +30 -2
  38. package/dist-lib/modules/button/components/Button.d.ts +1 -1
  39. package/dist-lib/modules/button/components/ButtonGroup.d.ts +5 -0
  40. package/dist-lib/modules/button/context.d.ts +3 -0
  41. package/dist-lib/modules/button/index.d.ts +2 -1
  42. package/dist-lib/modules/button/types.d.ts +68 -6
  43. package/dist-lib/modules/button-fill/components/ButtonFill.d.ts +6 -0
  44. package/dist-lib/modules/button-fill/constants.d.ts +2 -0
  45. package/dist-lib/modules/button-fill/index.d.ts +3 -0
  46. package/dist-lib/modules/button-fill/types.d.ts +28 -0
  47. package/dist-lib/modules/card/components/Card.d.ts +1 -1
  48. package/dist-lib/modules/card/index.d.ts +1 -1
  49. package/dist-lib/modules/card/types.d.ts +33 -6
  50. package/dist-lib/modules/carousel/components/Carousel.d.ts +2 -2
  51. package/dist-lib/modules/carousel/components/CarouselItem.d.ts +6 -0
  52. package/dist-lib/modules/carousel/index.d.ts +2 -1
  53. package/dist-lib/modules/carousel/types.d.ts +100 -4
  54. package/dist-lib/modules/cascader/components/Cascader.d.ts +2 -2
  55. package/dist-lib/modules/cascader/components/CascaderPanel.d.ts +6 -0
  56. package/dist-lib/modules/cascader/index.d.ts +2 -1
  57. package/dist-lib/modules/cascader/pathUtils.d.ts +14 -2
  58. package/dist-lib/modules/cascader/types.d.ts +186 -17
  59. package/dist-lib/modules/collapse/components/Collapse.d.ts +2 -2
  60. package/dist-lib/modules/collapse/components/CollapseItem.d.ts +6 -0
  61. package/dist-lib/modules/collapse/index.d.ts +2 -1
  62. package/dist-lib/modules/collapse/types.d.ts +57 -7
  63. package/dist-lib/modules/color/components/Color.d.ts +5 -0
  64. package/dist-lib/modules/color/index.d.ts +3 -0
  65. package/dist-lib/modules/color/palette.d.ts +48 -0
  66. package/dist-lib/modules/color/types.d.ts +49 -0
  67. package/dist-lib/modules/color-picker/colorUtils.d.ts +35 -0
  68. package/dist-lib/modules/color-picker/components/ColorPicker.d.ts +2 -2
  69. package/dist-lib/modules/color-picker/components/ColorPickerPanel.d.ts +2 -0
  70. package/dist-lib/modules/color-picker/index.d.ts +2 -1
  71. package/dist-lib/modules/color-picker/types.d.ts +82 -3
  72. package/dist-lib/modules/config-provider/components/ConfigProvider.d.ts +11 -2
  73. package/dist-lib/modules/config-provider/index.d.ts +3 -2
  74. package/dist-lib/modules/config-provider/locale/enUS.d.ts +2 -0
  75. package/dist-lib/modules/config-provider/types.d.ts +93 -5
  76. package/dist-lib/modules/date-picker/components/DatePicker.d.ts +2 -2
  77. package/dist-lib/modules/date-picker/components/DatePickerPanel.d.ts +2 -0
  78. package/dist-lib/modules/date-picker/index.d.ts +2 -1
  79. package/dist-lib/modules/date-picker/types.d.ts +89 -14
  80. package/dist-lib/modules/date-picker/utils.d.ts +17 -0
  81. package/dist-lib/modules/datetime-picker/components/DateTimePicker.d.ts +2 -2
  82. package/dist-lib/modules/datetime-picker/index.d.ts +1 -1
  83. package/dist-lib/modules/datetime-picker/types.d.ts +81 -7
  84. package/dist-lib/modules/datetime-picker/utils.d.ts +5 -1
  85. package/dist-lib/modules/descriptions/components/Descriptions.d.ts +4 -1
  86. package/dist-lib/modules/descriptions/components/DescriptionsItem.d.ts +6 -0
  87. package/dist-lib/modules/descriptions/index.d.ts +2 -1
  88. package/dist-lib/modules/descriptions/types.d.ts +61 -8
  89. package/dist-lib/modules/divider/components/Divider.d.ts +1 -1
  90. package/dist-lib/modules/divider/index.d.ts +1 -1
  91. package/dist-lib/modules/divider/types.d.ts +7 -1
  92. package/dist-lib/modules/download/components/Download.d.ts +2 -0
  93. package/dist-lib/modules/download/constants.d.ts +20 -0
  94. package/dist-lib/modules/download/index.d.ts +3 -0
  95. package/dist-lib/modules/download/resumeStorage.d.ts +12 -0
  96. package/dist-lib/modules/download/types.d.ts +67 -0
  97. package/dist-lib/modules/drawer/components/Drawer.d.ts +1 -3
  98. package/dist-lib/modules/drawer/index.d.ts +1 -1
  99. package/dist-lib/modules/drawer/types.d.ts +55 -4
  100. package/dist-lib/modules/dropdown/components/Dropdown.d.ts +3 -2
  101. package/dist-lib/modules/dropdown/index.d.ts +1 -1
  102. package/dist-lib/modules/dropdown/types.d.ts +49 -3
  103. package/dist-lib/modules/fluid-progress/components/FluidProgress.d.ts +5 -0
  104. package/dist-lib/modules/fluid-progress/constants.d.ts +3 -0
  105. package/dist-lib/modules/fluid-progress/index.d.ts +3 -0
  106. package/dist-lib/modules/fluid-progress/types.d.ts +25 -0
  107. package/dist-lib/modules/form/components/Form.d.ts +2 -2
  108. package/dist-lib/modules/form/index.d.ts +2 -2
  109. package/dist-lib/modules/form/types.d.ts +111 -6
  110. package/dist-lib/modules/form/useForm.d.ts +18 -2
  111. package/dist-lib/modules/fox-progress/components/FoxProgress.d.ts +5 -0
  112. package/dist-lib/modules/fox-progress/constants.d.ts +1 -0
  113. package/dist-lib/modules/fox-progress/index.d.ts +3 -0
  114. package/dist-lib/modules/fox-progress/types.d.ts +19 -0
  115. package/dist-lib/modules/image/components/Image.d.ts +2 -2
  116. package/dist-lib/modules/image/components/ImageLightbox.d.ts +4 -10
  117. package/dist-lib/modules/image/components/ImagePreviewGroup.d.ts +1 -1
  118. package/dist-lib/modules/image/index.d.ts +2 -2
  119. package/dist-lib/modules/image/types.d.ts +145 -22
  120. package/dist-lib/modules/input/components/Input.d.ts +2 -2
  121. package/dist-lib/modules/input/index.d.ts +1 -1
  122. package/dist-lib/modules/input/types.d.ts +70 -5
  123. package/dist-lib/modules/input-number/components/InputNumber.d.ts +2 -2
  124. package/dist-lib/modules/input-number/index.d.ts +1 -1
  125. package/dist-lib/modules/input-number/types.d.ts +74 -5
  126. package/dist-lib/modules/input-otp/components/InputOtp.d.ts +2 -0
  127. package/dist-lib/modules/input-otp/index.d.ts +2 -0
  128. package/dist-lib/modules/input-otp/types.d.ts +67 -0
  129. package/dist-lib/modules/input-tag/components/InputTag.d.ts +2 -0
  130. package/dist-lib/modules/input-tag/index.d.ts +2 -0
  131. package/dist-lib/modules/input-tag/types.d.ts +114 -0
  132. package/dist-lib/modules/layout/components/Layout.d.ts +20 -5
  133. package/dist-lib/modules/layout/components/Row.d.ts +867 -2
  134. package/dist-lib/modules/layout/index.d.ts +1 -1
  135. package/dist-lib/modules/layout/types.d.ts +86 -5
  136. package/dist-lib/modules/link/components/Link.d.ts +1 -1
  137. package/dist-lib/modules/link/index.d.ts +1 -1
  138. package/dist-lib/modules/link/types.d.ts +44 -2
  139. package/dist-lib/modules/liquid-progress/components/LiquidProgress.d.ts +5 -0
  140. package/dist-lib/modules/liquid-progress/constants.d.ts +2 -0
  141. package/dist-lib/modules/liquid-progress/index.d.ts +3 -0
  142. package/dist-lib/modules/liquid-progress/types.d.ts +22 -0
  143. package/dist-lib/modules/mention/components/Mention.d.ts +2 -2
  144. package/dist-lib/modules/mention/index.d.ts +1 -1
  145. package/dist-lib/modules/mention/types.d.ts +105 -5
  146. package/dist-lib/modules/menu/components/Menu.d.ts +1 -1
  147. package/dist-lib/modules/menu/types.d.ts +31 -0
  148. package/dist-lib/modules/message-box/components/MessageBoxView.d.ts +1 -1
  149. package/dist-lib/modules/message-box/index.d.ts +1 -1
  150. package/dist-lib/modules/message-box/types.d.ts +40 -2
  151. package/dist-lib/modules/modal/components/Modal.d.ts +2 -2
  152. package/dist-lib/modules/modal/index.d.ts +1 -1
  153. package/dist-lib/modules/modal/types.d.ts +61 -1
  154. package/dist-lib/modules/notification/components/NotificationProvider.d.ts +1 -1
  155. package/dist-lib/modules/notification/index.d.ts +1 -1
  156. package/dist-lib/modules/notification/types.d.ts +31 -1
  157. package/dist-lib/modules/pagination/components/Pagination.d.ts +4 -1
  158. package/dist-lib/modules/pagination/index.d.ts +1 -1
  159. package/dist-lib/modules/pagination/math.d.ts +2 -3
  160. package/dist-lib/modules/pagination/types.d.ts +76 -16
  161. package/dist-lib/modules/panel-morph/constants.d.ts +2 -1
  162. package/dist-lib/modules/photo-upload/components/PhotoUpload.d.ts +1 -1
  163. package/dist-lib/modules/photo-upload/constants.d.ts +4 -0
  164. package/dist-lib/modules/photo-upload/index.d.ts +1 -0
  165. package/dist-lib/modules/photo-upload/types.d.ts +14 -0
  166. package/dist-lib/modules/popconfirm/components/Popconfirm.d.ts +1 -1
  167. package/dist-lib/modules/popconfirm/types.d.ts +9 -2
  168. package/dist-lib/modules/popover/components/Popover.d.ts +1 -1
  169. package/dist-lib/modules/popover/types.d.ts +12 -2
  170. package/dist-lib/modules/progress/components/Progress.d.ts +4 -1
  171. package/dist-lib/modules/progress/index.d.ts +1 -1
  172. package/dist-lib/modules/progress/types.d.ts +82 -9
  173. package/dist-lib/modules/radio/components/Radio.d.ts +2 -0
  174. package/dist-lib/modules/radio/components/RadioButton.d.ts +5 -0
  175. package/dist-lib/modules/radio/components/RadioGroup.d.ts +1 -1
  176. package/dist-lib/modules/radio/context.d.ts +3 -0
  177. package/dist-lib/modules/radio/index.d.ts +3 -1
  178. package/dist-lib/modules/radio/types.d.ts +100 -5
  179. package/dist-lib/modules/range-picker/components/RangePicker.d.ts +1 -1
  180. package/dist-lib/modules/range-picker/index.d.ts +1 -1
  181. package/dist-lib/modules/range-picker/types.d.ts +29 -2
  182. package/dist-lib/modules/rate/components/Rate.d.ts +2 -2
  183. package/dist-lib/modules/rate/index.d.ts +1 -1
  184. package/dist-lib/modules/rate/types.d.ts +100 -1
  185. package/dist-lib/modules/result/components/Result.d.ts +4 -1
  186. package/dist-lib/modules/result/index.d.ts +1 -1
  187. package/dist-lib/modules/result/types.d.ts +15 -2
  188. package/dist-lib/modules/scrollbar/components/Scrollbar.d.ts +2 -2
  189. package/dist-lib/modules/scrollbar/index.d.ts +1 -1
  190. package/dist-lib/modules/scrollbar/types.d.ts +86 -1
  191. package/dist-lib/modules/search/components/Search.d.ts +2 -0
  192. package/dist-lib/modules/search/index.d.ts +2 -0
  193. package/dist-lib/modules/search/types.d.ts +20 -0
  194. package/dist-lib/modules/segmented/components/Segmented.d.ts +2 -1
  195. package/dist-lib/modules/segmented/index.d.ts +1 -1
  196. package/dist-lib/modules/segmented/types.d.ts +31 -8
  197. package/dist-lib/modules/select/components/Select.d.ts +2 -2
  198. package/dist-lib/modules/select/index.d.ts +1 -1
  199. package/dist-lib/modules/select/types.d.ts +112 -16
  200. package/dist-lib/modules/skeleton/components/Skeleton.d.ts +4 -1
  201. package/dist-lib/modules/skeleton/components/SkeletonItem.d.ts +5 -0
  202. package/dist-lib/modules/skeleton/index.d.ts +2 -1
  203. package/dist-lib/modules/skeleton/types.d.ts +55 -3
  204. package/dist-lib/modules/slider/components/Slider.d.ts +2 -0
  205. package/dist-lib/modules/slider/index.d.ts +3 -2
  206. package/dist-lib/modules/slider/types.d.ts +102 -0
  207. package/dist-lib/modules/space/components/Space.d.ts +1 -1
  208. package/dist-lib/modules/space/index.d.ts +1 -1
  209. package/dist-lib/modules/space/types.d.ts +47 -4
  210. package/dist-lib/modules/spin/components/Spin.d.ts +1 -1
  211. package/dist-lib/modules/spin/components/loadingService.d.ts +44 -0
  212. package/dist-lib/modules/spin/index.d.ts +2 -0
  213. package/dist-lib/modules/spin/types.d.ts +26 -1
  214. package/dist-lib/modules/splash-intro/components/AppSplash.d.ts +25 -0
  215. package/dist-lib/modules/splash-intro/components/SplashIntro.d.ts +38 -0
  216. package/dist-lib/modules/splash-intro/components/SplashLogo.d.ts +2 -0
  217. package/dist-lib/modules/splash-intro/components/SplashStagger.d.ts +14 -0
  218. package/dist-lib/modules/splash-intro/constants.d.ts +8 -0
  219. package/dist-lib/modules/splash-intro/context.d.ts +13 -0
  220. package/dist-lib/modules/splash-intro/index.d.ts +10 -0
  221. package/dist-lib/modules/splash-intro/types.d.ts +4 -0
  222. package/dist-lib/modules/splitter/components/Splitter.d.ts +7 -1
  223. package/dist-lib/modules/splitter/index.d.ts +1 -1
  224. package/dist-lib/modules/splitter/types.d.ts +75 -9
  225. package/dist-lib/modules/statistic/components/Countdown.d.ts +3 -0
  226. package/dist-lib/modules/statistic/components/Statistic.d.ts +3 -2
  227. package/dist-lib/modules/statistic/index.d.ts +2 -1
  228. package/dist-lib/modules/statistic/types.d.ts +28 -3
  229. package/dist-lib/modules/steps/components/Steps.d.ts +1 -1
  230. package/dist-lib/modules/steps/types.d.ts +17 -0
  231. package/dist-lib/modules/storybook-welcome/components/StorybookWelcome.d.ts +1 -1
  232. package/dist-lib/modules/storybook-welcome/types.d.ts +22 -2
  233. package/dist-lib/modules/switch/components/Switch.d.ts +2 -2
  234. package/dist-lib/modules/switch/index.d.ts +1 -1
  235. package/dist-lib/modules/switch/types.d.ts +100 -3
  236. package/dist-lib/modules/table/components/Table.d.ts +6 -2
  237. package/dist-lib/modules/table/index.d.ts +1 -1
  238. package/dist-lib/modules/table/types.d.ts +129 -22
  239. package/dist-lib/modules/table-v2/components/AutoResizer.d.ts +3 -0
  240. package/dist-lib/modules/table-v2/components/TableV2.d.ts +6 -0
  241. package/dist-lib/modules/table-v2/index.d.ts +3 -0
  242. package/dist-lib/modules/table-v2/types.d.ts +161 -0
  243. package/dist-lib/modules/tabs/components/Tabs.d.ts +1 -1
  244. package/dist-lib/modules/tabs/types.d.ts +18 -2
  245. package/dist-lib/modules/tag/components/CheckTag.d.ts +3 -0
  246. package/dist-lib/modules/tag/components/Tag.d.ts +2 -1
  247. package/dist-lib/modules/tag/index.d.ts +2 -1
  248. package/dist-lib/modules/tag/types.d.ts +32 -3
  249. package/dist-lib/modules/text/components/Text.d.ts +2 -0
  250. package/dist-lib/modules/text/index.d.ts +2 -0
  251. package/dist-lib/modules/text/types.d.ts +37 -0
  252. package/dist-lib/modules/thread-expand/components/ThreadExpand.d.ts +1 -1
  253. package/dist-lib/modules/thread-expand/constants.d.ts +28 -0
  254. package/dist-lib/modules/thread-expand/index.d.ts +1 -1
  255. package/dist-lib/modules/thread-expand/types.d.ts +14 -0
  256. package/dist-lib/modules/timeline/components/Timeline.d.ts +2 -1
  257. package/dist-lib/modules/timeline/index.d.ts +1 -1
  258. package/dist-lib/modules/timeline/types.d.ts +35 -1
  259. package/dist-lib/modules/toast/components/ToastProvider.d.ts +1 -1
  260. package/dist-lib/modules/toast/index.d.ts +1 -1
  261. package/dist-lib/modules/toast/types.d.ts +39 -1
  262. package/dist-lib/modules/tooltip/components/Tooltip.d.ts +1 -1
  263. package/dist-lib/modules/tooltip/index.d.ts +1 -1
  264. package/dist-lib/modules/tooltip/types.d.ts +15 -3
  265. package/dist-lib/modules/tour/components/Tour.d.ts +2 -1
  266. package/dist-lib/modules/tour/index.d.ts +1 -1
  267. package/dist-lib/modules/tour/types.d.ts +60 -6
  268. package/dist-lib/modules/transfer/components/Transfer.d.ts +2 -2
  269. package/dist-lib/modules/transfer/components/TransferVirtualBody.d.ts +10 -0
  270. package/dist-lib/modules/transfer/index.d.ts +1 -1
  271. package/dist-lib/modules/transfer/types.d.ts +111 -18
  272. package/dist-lib/modules/transition/components/CollapseTransition.d.ts +5 -0
  273. package/dist-lib/modules/transition/components/Transition.d.ts +6 -0
  274. package/dist-lib/modules/transition/constants.d.ts +9 -0
  275. package/dist-lib/modules/transition/index.d.ts +5 -0
  276. package/dist-lib/modules/transition/types.d.ts +59 -0
  277. package/dist-lib/modules/tree/checkUtils.d.ts +3 -0
  278. package/dist-lib/modules/tree/components/Tree.d.ts +3 -2
  279. package/dist-lib/modules/tree/dragUtils.d.ts +5 -2
  280. package/dist-lib/modules/tree/index.d.ts +1 -1
  281. package/dist-lib/modules/tree/types.d.ts +93 -51
  282. package/dist-lib/modules/tree-select/components/TreeSelect.d.ts +2 -2
  283. package/dist-lib/modules/tree-select/index.d.ts +1 -1
  284. package/dist-lib/modules/tree-select/types.d.ts +85 -13
  285. package/dist-lib/modules/tree-select/utils.d.ts +14 -3
  286. package/dist-lib/modules/tree-v2/components/TreeV2.d.ts +3 -0
  287. package/dist-lib/modules/tree-v2/index.d.ts +2 -0
  288. package/dist-lib/modules/tree-v2/types.d.ts +97 -0
  289. package/dist-lib/modules/tree-v2/utils.d.ts +24 -0
  290. package/dist-lib/modules/typography/components/Typography.d.ts +9 -4
  291. package/dist-lib/modules/typography/constants.d.ts +27 -0
  292. package/dist-lib/modules/typography/index.d.ts +2 -1
  293. package/dist-lib/modules/typography/types.d.ts +14 -0
  294. package/dist-lib/modules/upload/ajaxUpload.d.ts +2 -0
  295. package/dist-lib/modules/upload/chunkUpload.d.ts +6 -0
  296. package/dist-lib/modules/upload/components/Upload.d.ts +2 -2
  297. package/dist-lib/modules/upload/index.d.ts +2 -1
  298. package/dist-lib/modules/upload/resumeStorage.d.ts +16 -0
  299. package/dist-lib/modules/upload/types.d.ts +160 -24
  300. package/package.json +80 -73
@@ -1,3 +1,3 @@
1
1
  export { Layout } from './components/Layout';
2
2
  export { Row, Col } from './components/Row';
3
- export type { ColProps, LayoutAsideProps, LayoutProps, LayoutSectionProps, RowProps, } from './types';
3
+ export type { ColProps, ColSize, LayoutAsideProps, LayoutFooterProps, LayoutHeaderProps, LayoutProps, LayoutSectionProps, RowAlign, RowJustify, RowProps, } from './types';
@@ -1,7 +1,10 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  export type LayoutProps = {
3
3
  children?: ReactNode;
4
- /** Horizontal: Aside beside Main. */
4
+ /**
5
+ * 子元素排列方向。
6
+ * 不传时:含 Header / Footer 则为 vertical,否则 horizontal(对齐 Element Container)。
7
+ */
5
8
  direction?: "vertical" | "horizontal";
6
9
  className?: string;
7
10
  style?: CSSProperties;
@@ -11,25 +14,103 @@ export type LayoutSectionProps = {
11
14
  className?: string;
12
15
  style?: CSSProperties;
13
16
  };
17
+ export type LayoutHeaderProps = LayoutSectionProps & {
18
+ /**
19
+ * 顶栏高度
20
+ * @default "60px"
21
+ */
22
+ height?: number | string;
23
+ };
24
+ export type LayoutFooterProps = LayoutSectionProps & {
25
+ /**
26
+ * 底栏高度
27
+ * @default "60px"
28
+ */
29
+ height?: number | string;
30
+ };
14
31
  export type LayoutAsideProps = LayoutSectionProps & {
32
+ /**
33
+ * 侧栏宽度
34
+ * @default 300
35
+ */
15
36
  width?: number | string;
37
+ /**
38
+ * 是否可折叠(展示折叠控件时由业务配合 collapsed 使用)
39
+ * @default false
40
+ */
16
41
  collapsible?: boolean;
42
+ /** 是否折叠(受控) */
17
43
  collapsed?: boolean;
18
- collapsedWidth?: number;
44
+ /**
45
+ * 折叠后宽度
46
+ * @default 64
47
+ */
48
+ collapsedWidth?: number | string;
49
+ /** 折叠状态变化 */
19
50
  onCollapse?: (collapsed: boolean) => void;
20
51
  };
52
+ export type RowJustify = "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly";
53
+ /** 垂直对齐:兼容 Element top/middle/bottom 与 flex 命名 */
54
+ export type RowAlign = "top" | "middle" | "bottom" | "start" | "center" | "end" | "stretch";
21
55
  export type RowProps = {
22
56
  children?: ReactNode;
57
+ /** 栅格间隔;可为 [水平, 垂直] */
23
58
  gutter?: number | [number, number];
24
- align?: "start" | "center" | "end" | "stretch";
25
- justify?: "start" | "center" | "end" | "space-between" | "space-around";
59
+ /**
60
+ * flex 垂直对齐
61
+ * @default "top"
62
+ */
63
+ align?: RowAlign;
64
+ /**
65
+ * flex 水平排列
66
+ * @default "start"
67
+ */
68
+ justify?: RowJustify;
69
+ /**
70
+ * 是否自动换行
71
+ * @default true
72
+ */
26
73
  wrap?: boolean;
74
+ /**
75
+ * 自定义元素标签
76
+ * @default "div"
77
+ */
78
+ tag?: keyof HTMLElementTagNameMap;
27
79
  className?: string;
80
+ style?: CSSProperties;
81
+ };
82
+ /** 响应式断点下的栅格配置(数字等同 span) */
83
+ export type ColSize = number | {
84
+ span?: number;
85
+ offset?: number;
86
+ push?: number;
87
+ pull?: number;
28
88
  };
29
89
  export type ColProps = {
30
90
  children?: ReactNode;
31
- /** 1–24 grid span. */
91
+ /**
92
+ * 栅格占据列数(0–24;0 时隐藏)
93
+ * @default 24
94
+ */
32
95
  span?: number;
96
+ /** 左侧间隔格数 */
33
97
  offset?: number;
98
+ /** 向右移动格数 */
99
+ push?: number;
100
+ /** 向左移动格数 */
101
+ pull?: number;
102
+ /** <768px */
103
+ xs?: ColSize;
104
+ /** ≥768px */
105
+ sm?: ColSize;
106
+ /** ≥992px */
107
+ md?: ColSize;
108
+ /** ≥1200px */
109
+ lg?: ColSize;
110
+ /** ≥1920px */
111
+ xl?: ColSize;
112
+ /** 自定义元素标签 */
113
+ tag?: keyof HTMLElementTagNameMap;
34
114
  className?: string;
115
+ style?: CSSProperties;
35
116
  };
@@ -1,2 +1,2 @@
1
1
  import { LinkProps } from '../types';
2
- export declare function Link({ children, href, tone, disabled, underline, className, onClick, }: LinkProps): import('react').JSX.Element;
2
+ export declare function Link({ children, href, type, tone, disabled, underline, target, icon, iconPosition, className, "aria-label": ariaLabel, onClick, }: LinkProps): import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { Link } from './components/Link';
2
- export type { LinkProps, LinkTone } from './types';
2
+ export type { LinkProps, LinkType, LinkTone, LinkUnderline, LinkTarget, LinkIconPosition, } from './types';
@@ -1,11 +1,53 @@
1
1
  import { ReactNode } from 'react';
2
- export type LinkTone = "primary" | "neutral" | "danger";
2
+ /** 对齐 Element Plus Link type */
3
+ export type LinkType = "default" | "primary" | "success" | "warning" | "danger" | "info";
4
+ /** @deprecated 请优先使用 type;neutral 等价于 default */
5
+ export type LinkTone = LinkType | "neutral";
6
+ export type LinkUnderline = boolean | "always" | "hover" | "never";
7
+ export type LinkIconPosition = "start" | "end";
8
+ export type LinkTarget = "_self" | "_blank" | "_parent" | "_top" | string;
3
9
  export type LinkProps = {
4
10
  children?: ReactNode;
11
+ /**
12
+ * 原生 href。会直接写到 &lt;a&gt; 上,请自行校验 / 净化,避免 javascript: 等危险协议。
13
+ */
5
14
  href?: string;
15
+ /**
16
+ * 类型(对齐 Element type)
17
+ * @default "default"
18
+ */
19
+ type?: LinkType;
20
+ /**
21
+ * 主题色调;与 type 二选一,type 优先。neutral 映射为 default。
22
+ * @deprecated 优先使用 type
23
+ */
6
24
  tone?: LinkTone;
25
+ /**
26
+ * 是否禁用
27
+ * @default false
28
+ */
7
29
  disabled?: boolean;
8
- underline?: boolean;
30
+ /**
31
+ * 下划线:always / hover / never;布尔 true→always、false→never(兼容旧用法)
32
+ * @default "hover"
33
+ */
34
+ underline?: LinkUnderline;
35
+ /**
36
+ * 同原生 target
37
+ * @default "_self"
38
+ */
39
+ target?: LinkTarget;
40
+ /**
41
+ * 图标节点;默认在文案左侧
42
+ */
43
+ icon?: ReactNode;
44
+ /**
45
+ * 图标位置
46
+ * @default "start"
47
+ */
48
+ iconPosition?: LinkIconPosition;
9
49
  className?: string;
50
+ /** 无障碍名称(图标单独使用时建议传入) */
51
+ "aria-label"?: string;
10
52
  onClick?: () => void;
11
53
  };
@@ -0,0 +1,5 @@
1
+ import { LiquidProgressProps } from '../types';
2
+ /**
3
+ * Liquid tank: water level rises with percent; dual SVG waves drift on the surface.
4
+ */
5
+ export declare function LiquidProgress({ className, percent: percentProp, defaultPercent, size, color, status, showInfo, label, onChange, }: LiquidProgressProps): import('react').JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const LP_DEFAULT_SIZE = 148;
2
+ export declare const LP_DEFAULT_COLOR = "#0ea5e9";
@@ -0,0 +1,3 @@
1
+ export { LiquidProgress } from './components/LiquidProgress';
2
+ export type { LiquidProgressProps, LiquidProgressStatus } from './types';
3
+ export { LP_DEFAULT_SIZE, LP_DEFAULT_COLOR } from './constants';
@@ -0,0 +1,22 @@
1
+ export type LiquidProgressStatus = "normal" | "paused" | "exception";
2
+ export type LiquidProgressProps = {
3
+ className?: string;
4
+ /** 0–100 */
5
+ percent?: number;
6
+ /** 非受控初始值 */
7
+ defaultPercent?: number;
8
+ /** 容器尺寸(px) */
9
+ size?: number;
10
+ /** 水面主色(paused / exception 时会被覆盖) */
11
+ color?: string;
12
+ /**
13
+ * 状态:paused 冻结波浪;exception 失败红液面
14
+ * @default normal
15
+ */
16
+ status?: LiquidProgressStatus;
17
+ /** 是否显示百分比 */
18
+ showInfo?: boolean;
19
+ /** 标签 */
20
+ label?: string;
21
+ onChange?: (percent: number) => void;
22
+ };
@@ -1,2 +1,2 @@
1
- import { MentionProps } from '../types';
2
- export declare function Mention({ value: valueProp, defaultValue, options, placeholder, prefix, disabled, className, onChange, onSelect, onSearch, }: MentionProps): import('react').JSX.Element;
1
+ import { MentionHandle, MentionProps } from '../types';
2
+ export declare const Mention: import('react').ForwardRefExoticComponent<MentionProps & import('react').RefAttributes<MentionHandle>>;
@@ -1,2 +1,2 @@
1
1
  export { Mention } from './components/Mention';
2
- export type { MentionOption, MentionProps } from './types';
2
+ export type { MentionHandle, MentionLabelContext, MentionOption, MentionOptionProps, MentionPlacement, MentionProps, } from './types';
@@ -1,17 +1,117 @@
1
+ import { CSSProperties, FocusEvent, ReactNode } from 'react';
2
+ export type MentionPlacement = "top" | "bottom";
3
+ /** options 字段别名,对齐 Element props */
4
+ export type MentionOptionProps = {
5
+ value?: string;
6
+ label?: string;
7
+ disabled?: string;
8
+ };
1
9
  export type MentionOption = {
2
10
  value: string;
3
11
  label: string;
12
+ disabled?: boolean;
13
+ [key: string]: unknown;
14
+ };
15
+ export type MentionLabelContext = {
16
+ item: MentionOption;
17
+ prefix: string;
18
+ index: number;
19
+ };
20
+ export type MentionHandle = {
21
+ focus: () => void;
22
+ blur: () => void;
23
+ /** 底层 input / textarea */
24
+ input: HTMLInputElement | HTMLTextAreaElement | null;
25
+ dropdownVisible: boolean;
4
26
  };
5
27
  export type MentionProps = {
6
28
  value?: string;
7
29
  defaultValue?: string;
8
- options: MentionOption[];
30
+ /**
31
+ * 提及选项列表
32
+ * @default []
33
+ */
34
+ options?: MentionOption[] | Record<string, unknown>[];
35
+ /**
36
+ * options 字段别名
37
+ * @default { value: "value", label: "label", disabled: "disabled" }
38
+ */
39
+ optionProps?: MentionOptionProps;
40
+ /**
41
+ * 触发前缀;单字符,或多个单字符
42
+ * @default "@"
43
+ */
44
+ prefix?: string | string[];
45
+ /**
46
+ * 用于拆分提及的字符(单字符)
47
+ * @default " "
48
+ */
49
+ split?: string;
50
+ /**
51
+ * 定制筛选;false 时不过滤(全部展示,由外部处理)
52
+ */
53
+ filterOption?: false | ((pattern: string, option: MentionOption) => boolean);
54
+ /**
55
+ * 弹出位置
56
+ * @default "bottom"
57
+ */
58
+ placement?: MentionPlacement;
59
+ /**
60
+ * 下拉是否显示箭头
61
+ * @default false
62
+ */
63
+ showArrow?: boolean;
64
+ /**
65
+ * 下拉面板偏移
66
+ * @default 6
67
+ */
68
+ offset?: number;
69
+ /**
70
+ * 退格时是否整体删除提及
71
+ * @default false
72
+ */
73
+ whole?: boolean;
74
+ /**
75
+ * 自定义整体删除判定;(pattern, text) => boolean
76
+ */
77
+ checkIsWhole?: (pattern: string, text: string) => boolean;
78
+ /**
79
+ * 下拉加载中
80
+ * @default false
81
+ */
82
+ loading?: boolean;
83
+ /**
84
+ * 输入类型
85
+ * @default "text"
86
+ */
87
+ type?: "text" | "textarea";
9
88
  placeholder?: string;
10
- prefix?: string;
11
89
  disabled?: boolean;
90
+ /**
91
+ * FormItem 错误态透传
92
+ */
93
+ error?: string;
94
+ hideErrorText?: boolean;
95
+ rows?: number;
12
96
  className?: string;
97
+ /** 自定义浮层类名(对齐 Element popper-class) */
98
+ popupClassName?: string;
99
+ /** 自定义浮层样式(对齐 Element popper-style) */
100
+ popupStyle?: CSSProperties;
101
+ /** 自定义选项标签 */
102
+ labelRender?: (ctx: MentionLabelContext) => ReactNode;
103
+ /** 自定义 loading 内容 */
104
+ loadingSlot?: ReactNode;
105
+ /** 下拉顶部 */
106
+ header?: ReactNode;
107
+ /** 下拉底部 */
108
+ footer?: ReactNode;
13
109
  onChange?: (value: string) => void;
14
- onSelect?: (option: MentionOption) => void;
15
- /** 提及查询变化时触发(去掉前缀后的关键字) */
16
- onSearch?: (query: string) => void;
110
+ /** 按下触发字段后查询变化 */
111
+ onSearch?: (pattern: string, prefix: string) => void;
112
+ onSelect?: (option: MentionOption, prefix: string) => void;
113
+ /** whole 删除成功时触发 */
114
+ onWholeRemove?: (pattern: string) => void;
115
+ onFocus?: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
116
+ onBlur?: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
17
117
  };
@@ -1,2 +1,2 @@
1
1
  import { MenuProps } from '../types';
2
- export declare function Menu({ items, mode, selectedKeys: selectedKeysProp, defaultSelectedKeys, openKeys: openKeysProp, defaultOpenKeys, collapse, className, onSelect, onOpenChange, }: MenuProps): import('react').JSX.Element;
2
+ export declare function Menu({ items, mode, selectedKeys: selectedKeysProp, defaultSelectedKeys, openKeys: openKeysProp, defaultOpenKeys, collapse, uniqueOpened, ellipsis, ellipsisIcon, router, className, onSelect, onOpenChange, }: MenuProps): import('react').JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { To } from 'react-router-dom';
2
3
  export type MenuItem = {
3
4
  key: string;
4
5
  label: ReactNode;
@@ -6,6 +7,18 @@ export type MenuItem = {
6
7
  icon?: ReactNode;
7
8
  disabled?: boolean;
8
9
  children?: MenuItem[];
10
+ /**
11
+ * 分组标题项:渲染为 MenuItemGroup,children 为组内项
12
+ * @default item
13
+ */
14
+ type?: "item" | "group";
15
+ /**
16
+ * 路由地址;router 模式下优先于 key 作为 navigate 目标
17
+ * (同 Element Menu-Item 的 route / vue-router to)
18
+ */
19
+ route?: To;
20
+ /** 路由跳转时是否 replace(不留历史) */
21
+ replace?: boolean;
9
22
  };
10
23
  export type MenuProps = {
11
24
  items: MenuItem[];
@@ -19,6 +32,24 @@ export type MenuProps = {
19
32
  * @default false
20
33
  */
21
34
  collapse?: boolean;
35
+ /**
36
+ * 是否只保持一个子菜单展开(vertical)
37
+ * @default false
38
+ */
39
+ uniqueOpened?: boolean;
40
+ /**
41
+ * 水平模式是否省略放不下的项到「更多」
42
+ * @default true
43
+ */
44
+ ellipsis?: boolean;
45
+ /** 自定义省略入口图标 / 文案 */
46
+ ellipsisIcon?: ReactNode;
47
+ /**
48
+ * 启用 react-router 模式:选中项用 route ?? key 作为 path 导航;
49
+ * 需包裹在 Router 内。未受控时会按 location 同步选中项。
50
+ * @default false
51
+ */
52
+ router?: boolean;
22
53
  className?: string;
23
54
  onSelect?: (key: string) => void;
24
55
  onOpenChange?: (keys: string[]) => void;
@@ -1,7 +1,7 @@
1
1
  import { MessageBoxOptions, MessageBoxResult } from '../types';
2
2
  type MessageBoxViewProps = {
3
3
  options: MessageBoxOptions;
4
- onResolve: (result: MessageBoxResult) => void;
4
+ onResolve: (result: MessageBoxResult, value?: string) => void;
5
5
  };
6
6
  export declare function MessageBoxView({ options, onResolve }: MessageBoxViewProps): import('react').JSX.Element;
7
7
  export {};
@@ -1,3 +1,3 @@
1
1
  export { MessageBox } from './components/messageBoxApi';
2
2
  export { MessageBoxView } from './components/MessageBoxView';
3
- export type { MessageBoxApi, MessageBoxOptions, MessageBoxResult, MessageBoxTone, } from './types';
3
+ export type { MessageBoxApi, MessageBoxOptions, MessageBoxPromptResult, MessageBoxResult, MessageBoxTone, } from './types';
@@ -1,5 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- export type MessageBoxTone = "info" | "success" | "warning" | "danger";
2
+ export type MessageBoxTone = "primary" | "info" | "success" | "warning" | "danger";
3
+ export type MessageBoxResult = "confirm" | "cancel" | "close";
4
+ export type MessageBoxBeforeClose = (action: MessageBoxResult, done: () => void) => void;
3
5
  export type MessageBoxOptions = {
4
6
  title?: ReactNode;
5
7
  message?: ReactNode;
@@ -10,13 +12,49 @@ export type MessageBoxOptions = {
10
12
  danger?: boolean;
11
13
  tone?: MessageBoxTone;
12
14
  className?: string;
15
+ /** 内容居中 */
16
+ center?: boolean;
17
+ /** 显示输入框(prompt) */
18
+ showInput?: boolean;
19
+ inputPlaceholder?: string;
20
+ inputValue?: string;
21
+ inputType?: string;
22
+ /** 校验正则;不匹配时阻止确认 */
23
+ inputPattern?: RegExp;
24
+ /** 返回 false / 错误文案时阻止确认 */
25
+ inputValidator?: (value: string) => boolean | string;
26
+ inputErrorMessage?: string;
27
+ /**
28
+ * 关闭前回调;调用 done() 后才真正关闭(对齐 Element beforeClose)
29
+ */
30
+ beforeClose?: MessageBoxBeforeClose;
31
+ /**
32
+ * 区分取消按钮与关闭(遮罩 / Esc);为 true 时后者返回 close
33
+ * @default false
34
+ */
35
+ distinguishCancelAndClose?: boolean;
36
+ /** 是否可拖拽 */
37
+ draggable?: boolean;
38
+ /** 拖拽是否允许超出视口 */
39
+ overflow?: boolean;
40
+ /**
41
+ * 将 string message 作为 HTML 渲染。
42
+ * 警告:勿传入用户输入,以免 XSS。
43
+ */
44
+ dangerouslyUseHTMLString?: boolean;
45
+ };
46
+ export type MessageBoxPromptResult = {
47
+ action: MessageBoxResult;
48
+ value: string;
13
49
  };
14
- export type MessageBoxResult = "confirm" | "cancel";
15
50
  export type MessageBoxApi = {
16
51
  confirm: (options?: MessageBoxOptions | string) => Promise<MessageBoxResult>;
17
52
  alert: (options?: MessageBoxOptions | string) => Promise<"confirm">;
53
+ primary: (options?: MessageBoxOptions | string) => Promise<"confirm">;
18
54
  info: (options?: MessageBoxOptions | string) => Promise<"confirm">;
19
55
  success: (options?: MessageBoxOptions | string) => Promise<"confirm">;
20
56
  warning: (options?: MessageBoxOptions | string) => Promise<"confirm">;
21
57
  danger: (options?: MessageBoxOptions | string) => Promise<MessageBoxResult>;
58
+ /** 带输入框的提示框,对齐 Element prompt */
59
+ prompt: (options?: MessageBoxOptions | string) => Promise<MessageBoxPromptResult>;
22
60
  };
@@ -1,6 +1,6 @@
1
- import { ModalProps } from '../types';
1
+ import { ModalHandle, ModalProps } from '../types';
2
2
  /**
3
3
  * Enter/leave both use WAAPI with the same keyframes (enter = leave reversed → 上浮).
4
4
  * Enter only starts after the hidden pose has been painted.
5
5
  */
6
- export declare function Modal({ open, title, children, footer, confirmText, cancelText, onConfirm, onCancel, danger, closeOnMask, keyboard, destroyOnClose, className, "aria-label": ariaLabel, }: ModalProps): import('react').ReactPortal | null;
6
+ export declare const Modal: import('react').ForwardRefExoticComponent<ModalProps & import('react').RefAttributes<ModalHandle>>;
@@ -1,2 +1,2 @@
1
1
  export { Modal } from './components/Modal';
2
- export type { ModalProps } from './types';
2
+ export type { ModalHandle, ModalProps } from './types';
@@ -1,7 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
+ export type ModalBeforeClose = (done: () => void) => void;
2
3
  export type ModalProps = {
3
4
  open: boolean;
4
- title?: string;
5
+ title?: ReactNode;
6
+ /** 自定义标题区(覆盖 title 文案,不移除关闭按钮) */
7
+ header?: ReactNode;
5
8
  children?: ReactNode;
6
9
  /**
7
10
  * 自定义底部;传入 null 隐藏默认按钮区
@@ -13,8 +16,42 @@ export type ModalProps = {
13
16
  onConfirm?: () => void;
14
17
  /** Cancel action — also used for Esc(keyboard 时). */
15
18
  onCancel?: () => void;
19
+ /**
20
+ * 关闭前回调;调用 done() 后才会真正关闭(对齐 Element before-close)
21
+ */
22
+ beforeClose?: ModalBeforeClose;
16
23
  /** When true, confirm button uses danger styling. */
17
24
  danger?: boolean;
25
+ /**
26
+ * 对话框宽度;number 为 px
27
+ * @default 跟随 CSS --modal-width
28
+ */
29
+ width?: number | string;
30
+ /**
31
+ * 是否全屏
32
+ * @default false
33
+ */
34
+ fullscreen?: boolean;
35
+ /**
36
+ * 是否显示右上角关闭按钮
37
+ * @default true
38
+ */
39
+ showClose?: boolean;
40
+ /**
41
+ * 标题与底部是否居中
42
+ * @default false
43
+ */
44
+ center?: boolean;
45
+ /**
46
+ * 是否需要遮罩层
47
+ * @default true
48
+ */
49
+ modal?: boolean;
50
+ /**
51
+ * 遮罩可穿透。modal 须为 false。
52
+ * @default false
53
+ */
54
+ modalPenetrable?: boolean;
18
55
  /**
19
56
  * 点击遮罩是否关闭(触发 onCancel)
20
57
  * @default false
@@ -30,6 +67,29 @@ export type ModalProps = {
30
67
  * @default true
31
68
  */
32
69
  destroyOnClose?: boolean;
70
+ /**
71
+ * 是否水平垂直居中;默认跟随 ConfigProvider.dialog.alignCenter,否则 true
72
+ */
73
+ alignCenter?: boolean;
74
+ /**
75
+ * 是否可拖拽;默认跟随 ConfigProvider.dialog.draggable
76
+ */
77
+ draggable?: boolean;
78
+ /**
79
+ * 拖拽是否允许超出视口;默认跟随 ConfigProvider.dialog.overflow
80
+ */
81
+ overflow?: boolean;
82
+ /**
83
+ * 过渡名称(data-transition);默认跟随 ConfigProvider.dialog.transition
84
+ */
85
+ transition?: string | Record<string, unknown>;
33
86
  className?: string;
34
87
  "aria-label"?: string;
35
88
  };
89
+ /** Modal imperative handle(ref) */
90
+ export type ModalHandle = {
91
+ /** 重置拖拽位置 */
92
+ resetPosition: () => void;
93
+ /** 触发关闭(走 beforeClose) */
94
+ handleClose: () => void;
95
+ };
@@ -1,5 +1,5 @@
1
1
  import { NotificationApi, NotificationProviderProps, NotificationTone } from '../types';
2
- export declare function NotificationProvider({ children, max, className, }: NotificationProviderProps): import('react').JSX.Element;
2
+ export declare function NotificationProvider({ children, max, position, className, }: NotificationProviderProps): import('react').JSX.Element;
3
3
  export declare function useNotification(): NotificationApi;
4
4
  /** Soft helper for typed tone usage in demos. */
5
5
  export declare function toneLabel(tone: NotificationTone): NotificationTone;
@@ -1,2 +1,2 @@
1
1
  export { NotificationProvider, useNotification, } from './components/NotificationProvider';
2
- export type { NotificationApi, NotificationItem, NotificationProviderProps, NotificationShowOptions, NotificationTone, } from './types';
2
+ export type { NotificationApi, NotificationItem, NotificationPosition, NotificationProviderProps, NotificationShowOptions, NotificationTone, } from './types';
@@ -1,25 +1,55 @@
1
1
  import { ReactNode } from 'react';
2
- export type NotificationTone = "info" | "success" | "warning" | "danger";
2
+ export type NotificationTone = "primary" | "info" | "success" | "warning" | "danger";
3
+ export type NotificationPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
4
+ export type NotificationProgressOptions = {
5
+ /** 进度条颜色;默认跟随 tone */
6
+ color?: string;
7
+ };
3
8
  export type NotificationShowOptions = {
4
9
  title?: ReactNode;
5
10
  description?: ReactNode;
6
11
  tone?: NotificationTone;
12
+ /** 毫秒;0 表示不自动关闭 */
7
13
  duration?: number;
14
+ /**
15
+ * 是否显示关闭按钮
16
+ * @default true
17
+ */
18
+ showClose?: boolean;
19
+ position?: NotificationPosition;
20
+ offset?: number;
21
+ /**
22
+ * 显示自动关闭倒计时进度条
23
+ * @default false
24
+ */
25
+ progress?: boolean | NotificationProgressOptions;
26
+ /**
27
+ * 悬停时暂停计时与进度
28
+ * @default true
29
+ */
30
+ pauseOnHover?: boolean;
8
31
  };
9
32
  export type NotificationItem = NotificationShowOptions & {
10
33
  id: string;
11
34
  };
12
35
  export type NotificationApi = {
13
36
  open: (options: NotificationShowOptions) => string;
37
+ primary: (title: ReactNode, description?: ReactNode) => string;
14
38
  success: (title: ReactNode, description?: ReactNode) => string;
15
39
  warning: (title: ReactNode, description?: ReactNode) => string;
16
40
  danger: (title: ReactNode, description?: ReactNode) => string;
17
41
  info: (title: ReactNode, description?: ReactNode) => string;
18
42
  close: (id: string) => void;
19
43
  clear: () => void;
44
+ closeAll: () => void;
20
45
  };
21
46
  export type NotificationProviderProps = {
22
47
  children?: ReactNode;
23
48
  max?: number;
49
+ /**
50
+ * 默认弹出位置
51
+ * @default top-right
52
+ */
53
+ position?: NotificationPosition;
24
54
  className?: string;
25
55
  };