naive-ui 2.25.3 → 2.25.6

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 (350) hide show
  1. package/es/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
  2. package/es/_internal/select-menu/src/SelectMenu.d.ts +1 -0
  3. package/es/_mixins/use-css-vars-class.js +2 -1
  4. package/es/button/src/styles/button-rtl.cssr.js +2 -2
  5. package/es/cascader/src/Cascader.d.ts +10 -0
  6. package/es/cascader/src/CascaderMenu.d.ts +1 -0
  7. package/es/cascader/src/CascaderOption.d.ts +1 -0
  8. package/es/cascader/src/CascaderSelectMenu.d.ts +1 -0
  9. package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
  10. package/es/cascader/styles/light.d.ts +1 -0
  11. package/es/checkbox/src/Checkbox.d.ts +12 -0
  12. package/es/checkbox/src/Checkbox.js +14 -7
  13. package/es/checkbox/src/styles/index.cssr.js +16 -8
  14. package/es/checkbox/src/styles/rtl.cssr.d.ts +2 -0
  15. package/es/checkbox/src/styles/rtl.cssr.js +4 -0
  16. package/es/checkbox/styles/index.d.ts +1 -0
  17. package/es/checkbox/styles/index.js +1 -0
  18. package/es/checkbox/styles/light.d.ts +1 -0
  19. package/es/checkbox/styles/light.js +2 -2
  20. package/es/checkbox/styles/rtl.d.ts +2 -0
  21. package/es/checkbox/styles/rtl.js +5 -0
  22. package/es/code/src/Code.js +3 -1
  23. package/es/collapse/src/Collapse.d.ts +1 -0
  24. package/es/collapse/src/Collapse.js +9 -2
  25. package/es/collapse/src/CollapseItem.d.ts +1 -0
  26. package/es/collapse/src/CollapseItem.js +8 -3
  27. package/es/collapse/src/styles/rtl.cssr.d.ts +2 -0
  28. package/es/collapse/src/styles/rtl.cssr.js +15 -0
  29. package/es/collapse/styles/index.d.ts +1 -0
  30. package/es/collapse/styles/index.js +1 -0
  31. package/es/collapse/styles/rtl.d.ts +2 -0
  32. package/es/collapse/styles/rtl.js +5 -0
  33. package/es/collapse-transition/src/CollapseTransition.d.ts +3 -1
  34. package/es/collapse-transition/src/CollapseTransition.js +27 -14
  35. package/es/config-provider/src/ConfigProvider.js +6 -0
  36. package/es/config-provider/src/internal-interface.d.ts +1 -0
  37. package/es/data-table/src/DataTable.d.ts +20 -0
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  40. package/es/data-table/src/TableParts/Body.d.ts +3 -0
  41. package/es/data-table/src/TableParts/Cell.d.ts +4 -0
  42. package/es/data-table/src/TableParts/Header.d.ts +2 -0
  43. package/es/data-table/styles/light.d.ts +2 -0
  44. package/es/date-picker/src/DatePicker.d.ts +7 -2
  45. package/es/date-picker/src/DatePicker.js +80 -68
  46. package/es/date-picker/src/panel/date.d.ts +6 -0
  47. package/es/date-picker/src/panel/date.js +7 -2
  48. package/es/date-picker/src/panel/daterange.d.ts +4 -0
  49. package/es/date-picker/src/panel/daterange.js +7 -2
  50. package/es/date-picker/src/panel/datetime.d.ts +6 -0
  51. package/es/date-picker/src/panel/datetime.js +7 -2
  52. package/es/date-picker/src/panel/datetimerange.d.ts +4 -0
  53. package/es/date-picker/src/panel/datetimerange.js +7 -2
  54. package/es/date-picker/src/panel/month.d.ts +6 -0
  55. package/es/date-picker/src/panel/month.js +4 -2
  56. package/es/date-picker/src/panel/panelHeader.d.ts +10 -0
  57. package/es/date-picker/src/panel/use-calendar.d.ts +4 -0
  58. package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  59. package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
  60. package/es/date-picker/src/panel/use-panel-common.js +3 -1
  61. package/es/drawer/src/Drawer.d.ts +3 -1
  62. package/es/drawer/src/Drawer.js +39 -27
  63. package/es/dropdown/src/Dropdown.d.ts +7 -5
  64. package/es/dropdown/src/Dropdown.js +59 -52
  65. package/es/dynamic-input/src/DynamicInput.d.ts +3 -1
  66. package/es/dynamic-input/src/DynamicInput.js +17 -10
  67. package/es/form/src/FormItem.d.ts +3 -1
  68. package/es/form/src/FormItem.js +40 -33
  69. package/es/form/src/FormItemRow.js +1 -1
  70. package/es/gradient-text/src/GradientText.d.ts +3 -1
  71. package/es/gradient-text/src/GradientText.js +23 -15
  72. package/es/icon/src/Icon.d.ts +3 -5
  73. package/es/icon/src/Icon.js +29 -19
  74. package/es/image/src/ImagePreview.d.ts +3 -1
  75. package/es/image/src/ImagePreview.js +28 -15
  76. package/es/input/src/Input.d.ts +4 -1
  77. package/es/input/src/Input.js +27 -6
  78. package/es/input/src/InputGroupLabel.d.ts +3 -1
  79. package/es/input/src/InputGroupLabel.js +26 -19
  80. package/es/input/src/styles/input.cssr.js +1 -0
  81. package/es/input/src/styles/rtl.cssr.d.ts +2 -0
  82. package/es/input/src/styles/rtl.cssr.js +16 -0
  83. package/es/input/styles/index.d.ts +1 -0
  84. package/es/input/styles/index.js +1 -0
  85. package/es/input/styles/rtl.d.ts +2 -0
  86. package/es/input/styles/rtl.js +5 -0
  87. package/es/input-number/src/InputNumber.d.ts +1 -0
  88. package/es/input-number/src/InputNumber.js +8 -3
  89. package/es/input-number/src/styles/rtl.cssr.d.ts +2 -0
  90. package/es/input-number/src/styles/rtl.cssr.js +4 -0
  91. package/es/input-number/styles/index.d.ts +1 -0
  92. package/es/input-number/styles/index.js +1 -0
  93. package/es/input-number/styles/rtl.d.ts +2 -0
  94. package/es/input-number/styles/rtl.js +8 -0
  95. package/es/layout/src/Layout.d.ts +2 -0
  96. package/es/layout/src/LayoutContent.d.ts +1 -0
  97. package/es/layout/src/LayoutSider.d.ts +1 -0
  98. package/es/legacy-grid/src/styles/index.cssr.js +1 -1
  99. package/es/list/src/List.d.ts +3 -1
  100. package/es/list/src/List.js +27 -19
  101. package/es/loading-bar/src/LoadingBar.d.ts +3 -1
  102. package/es/loading-bar/src/LoadingBar.js +29 -15
  103. package/es/log/src/Log.d.ts +1 -0
  104. package/es/mention/src/Mention.d.ts +3 -1
  105. package/es/mention/src/Mention.js +20 -10
  106. package/es/message/src/Message.d.ts +12 -24
  107. package/es/message/src/Message.js +57 -40
  108. package/es/message/src/MessageEnvironment.d.ts +9 -0
  109. package/es/message/src/MessageEnvironment.js +1 -1
  110. package/es/message/src/MessageProvider.d.ts +67 -0
  111. package/es/message/src/MessageProvider.js +3 -0
  112. package/es/message/src/message-props.d.ts +4 -0
  113. package/es/message/src/message-props.js +4 -0
  114. package/es/message/src/styles/index.cssr.js +2 -1
  115. package/es/message/src/types.d.ts +3 -1
  116. package/es/message/styles/light.d.ts +7 -0
  117. package/es/message/styles/light.js +1 -1
  118. package/es/modal/src/BodyWrapper.d.ts +1 -0
  119. package/es/notification/src/Notification.d.ts +3 -1
  120. package/es/notification/src/Notification.js +44 -32
  121. package/es/notification/src/NotificationProvider.d.ts +1 -0
  122. package/es/notification/src/NotificationProvider.js +1 -0
  123. package/es/popconfirm/src/Popconfirm.d.ts +3 -2
  124. package/es/popconfirm/src/Popconfirm.js +2 -1
  125. package/es/popconfirm/src/PopconfirmPanel.d.ts +3 -1
  126. package/es/popconfirm/src/PopconfirmPanel.js +32 -25
  127. package/es/popconfirm/src/interface.d.ts +2 -0
  128. package/es/popover/src/PopoverBody.d.ts +4 -0
  129. package/es/popover/src/PopoverBody.js +3 -2
  130. package/es/popover/src/styles/index.cssr.js +49 -29
  131. package/es/radio/src/Radio.d.ts +7 -0
  132. package/es/radio/src/Radio.js +14 -7
  133. package/es/radio/src/RadioGroup.d.ts +9 -0
  134. package/es/radio/src/styles/radio.cssr.js +16 -9
  135. package/es/radio/styles/dark.js +2 -2
  136. package/es/radio/styles/light.d.ts +1 -0
  137. package/es/radio/styles/light.js +2 -2
  138. package/es/scrollbar/src/ScrollBar.d.ts +1 -0
  139. package/es/select/src/Select.d.ts +3 -1
  140. package/es/select/src/Select.js +31 -23
  141. package/es/slider/src/Slider.d.ts +6 -2
  142. package/es/slider/src/Slider.js +74 -51
  143. package/es/steps/src/Step.d.ts +3 -1
  144. package/es/steps/src/Step.js +32 -20
  145. package/es/styles.d.ts +4 -4
  146. package/es/styles.js +4 -4
  147. package/es/tabs/src/styles/index.cssr.js +2 -0
  148. package/es/time-picker/src/Panel.js +4 -4
  149. package/es/time-picker/src/TimePicker.d.ts +12 -4
  150. package/es/time-picker/src/TimePicker.js +90 -35
  151. package/es/timeline/src/Timeline.d.ts +9 -9
  152. package/es/timeline/src/TimelineItem.d.ts +4 -2
  153. package/es/timeline/src/TimelineItem.js +34 -20
  154. package/es/timeline/styles/_common.d.ts +1 -1
  155. package/es/timeline/styles/_common.js +1 -1
  156. package/es/timeline/styles/light.d.ts +1 -1
  157. package/es/transfer/src/Transfer.d.ts +10 -0
  158. package/es/transfer/src/TransferFilter.d.ts +1 -0
  159. package/es/transfer/src/TransferList.d.ts +2 -0
  160. package/es/transfer/src/TransferListItem.d.ts +1 -0
  161. package/es/transfer/styles/light.d.ts +1 -0
  162. package/es/tree/src/Tree.d.ts +16 -3
  163. package/es/tree/src/Tree.js +50 -28
  164. package/es/tree/src/TreeNodeCheckbox.d.ts +1 -0
  165. package/es/tree/styles/light.d.ts +1 -0
  166. package/es/tree-select/src/TreeSelect.d.ts +23 -10
  167. package/es/tree-select/src/TreeSelect.js +26 -17
  168. package/es/tree-select/styles/light.d.ts +1 -0
  169. package/es/upload/src/Upload.d.ts +3 -1
  170. package/es/upload/src/Upload.js +23 -13
  171. package/es/upload/src/UploadFileList.js +8 -3
  172. package/es/upload/src/interface.d.ts +3 -1
  173. package/es/version.d.ts +1 -1
  174. package/es/version.js +1 -1
  175. package/lib/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
  176. package/lib/_internal/select-menu/src/SelectMenu.d.ts +1 -0
  177. package/lib/_mixins/use-css-vars-class.js +2 -1
  178. package/lib/button/src/styles/button-rtl.cssr.js +2 -2
  179. package/lib/cascader/src/Cascader.d.ts +10 -0
  180. package/lib/cascader/src/CascaderMenu.d.ts +1 -0
  181. package/lib/cascader/src/CascaderOption.d.ts +1 -0
  182. package/lib/cascader/src/CascaderSelectMenu.d.ts +1 -0
  183. package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
  184. package/lib/cascader/styles/light.d.ts +1 -0
  185. package/lib/checkbox/src/Checkbox.d.ts +12 -0
  186. package/lib/checkbox/src/Checkbox.js +14 -7
  187. package/lib/checkbox/src/styles/index.cssr.js +16 -8
  188. package/lib/checkbox/src/styles/rtl.cssr.d.ts +2 -0
  189. package/lib/checkbox/src/styles/rtl.cssr.js +11 -0
  190. package/lib/checkbox/styles/index.d.ts +1 -0
  191. package/lib/checkbox/styles/index.js +3 -1
  192. package/lib/checkbox/styles/light.d.ts +1 -0
  193. package/lib/checkbox/styles/light.js +2 -2
  194. package/lib/checkbox/styles/rtl.d.ts +2 -0
  195. package/lib/checkbox/styles/rtl.js +11 -0
  196. package/lib/code/src/Code.js +3 -1
  197. package/lib/collapse/src/Collapse.d.ts +1 -0
  198. package/lib/collapse/src/Collapse.js +9 -2
  199. package/lib/collapse/src/CollapseItem.d.ts +1 -0
  200. package/lib/collapse/src/CollapseItem.js +7 -2
  201. package/lib/collapse/src/styles/rtl.cssr.d.ts +2 -0
  202. package/lib/collapse/src/styles/rtl.cssr.js +22 -0
  203. package/lib/collapse/styles/index.d.ts +1 -0
  204. package/lib/collapse/styles/index.js +3 -1
  205. package/lib/collapse/styles/rtl.d.ts +2 -0
  206. package/lib/collapse/styles/rtl.js +11 -0
  207. package/lib/collapse-transition/src/CollapseTransition.d.ts +3 -1
  208. package/lib/collapse-transition/src/CollapseTransition.js +26 -13
  209. package/lib/config-provider/src/ConfigProvider.js +6 -0
  210. package/lib/config-provider/src/internal-interface.d.ts +1 -0
  211. package/lib/data-table/src/DataTable.d.ts +20 -0
  212. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
  213. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
  214. package/lib/data-table/src/TableParts/Body.d.ts +3 -0
  215. package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
  216. package/lib/data-table/src/TableParts/Header.d.ts +2 -0
  217. package/lib/data-table/styles/light.d.ts +2 -0
  218. package/lib/date-picker/src/DatePicker.d.ts +7 -2
  219. package/lib/date-picker/src/DatePicker.js +79 -67
  220. package/lib/date-picker/src/panel/date.d.ts +6 -0
  221. package/lib/date-picker/src/panel/date.js +7 -2
  222. package/lib/date-picker/src/panel/daterange.d.ts +4 -0
  223. package/lib/date-picker/src/panel/daterange.js +7 -2
  224. package/lib/date-picker/src/panel/datetime.d.ts +6 -0
  225. package/lib/date-picker/src/panel/datetime.js +7 -2
  226. package/lib/date-picker/src/panel/datetimerange.d.ts +4 -0
  227. package/lib/date-picker/src/panel/datetimerange.js +7 -2
  228. package/lib/date-picker/src/panel/month.d.ts +6 -0
  229. package/lib/date-picker/src/panel/month.js +4 -2
  230. package/lib/date-picker/src/panel/panelHeader.d.ts +10 -0
  231. package/lib/date-picker/src/panel/use-calendar.d.ts +4 -0
  232. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
  233. package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
  234. package/lib/date-picker/src/panel/use-panel-common.js +3 -1
  235. package/lib/drawer/src/Drawer.d.ts +4 -1
  236. package/lib/drawer/src/Drawer.js +38 -26
  237. package/lib/dropdown/src/Dropdown.d.ts +7 -5
  238. package/lib/dropdown/src/Dropdown.js +58 -51
  239. package/lib/dynamic-input/src/DynamicInput.d.ts +3 -1
  240. package/lib/dynamic-input/src/DynamicInput.js +16 -9
  241. package/lib/form/src/FormItem.d.ts +3 -1
  242. package/lib/form/src/FormItem.js +39 -32
  243. package/lib/form/src/FormItemRow.js +1 -1
  244. package/lib/gradient-text/src/GradientText.d.ts +3 -1
  245. package/lib/gradient-text/src/GradientText.js +22 -14
  246. package/lib/icon/src/Icon.d.ts +3 -5
  247. package/lib/icon/src/Icon.js +28 -18
  248. package/lib/image/src/ImagePreview.d.ts +3 -1
  249. package/lib/image/src/ImagePreview.js +27 -14
  250. package/lib/input/src/Input.d.ts +4 -1
  251. package/lib/input/src/Input.js +27 -6
  252. package/lib/input/src/InputGroupLabel.d.ts +3 -1
  253. package/lib/input/src/InputGroupLabel.js +25 -18
  254. package/lib/input/src/styles/input.cssr.js +1 -0
  255. package/lib/input/src/styles/rtl.cssr.d.ts +2 -0
  256. package/lib/input/src/styles/rtl.cssr.js +23 -0
  257. package/lib/input/styles/index.d.ts +1 -0
  258. package/lib/input/styles/index.js +3 -1
  259. package/lib/input/styles/rtl.d.ts +2 -0
  260. package/lib/input/styles/rtl.js +11 -0
  261. package/lib/input-number/src/InputNumber.d.ts +1 -0
  262. package/lib/input-number/src/InputNumber.js +8 -3
  263. package/lib/input-number/src/styles/rtl.cssr.d.ts +2 -0
  264. package/lib/input-number/src/styles/rtl.cssr.js +11 -0
  265. package/lib/input-number/styles/index.d.ts +1 -0
  266. package/lib/input-number/styles/index.js +3 -1
  267. package/lib/input-number/styles/rtl.d.ts +2 -0
  268. package/lib/input-number/styles/rtl.js +14 -0
  269. package/lib/layout/src/Layout.d.ts +2 -0
  270. package/lib/layout/src/LayoutContent.d.ts +1 -0
  271. package/lib/layout/src/LayoutSider.d.ts +1 -0
  272. package/lib/legacy-grid/src/styles/index.cssr.js +1 -1
  273. package/lib/list/src/List.d.ts +3 -1
  274. package/lib/list/src/List.js +26 -18
  275. package/lib/loading-bar/src/LoadingBar.d.ts +3 -1
  276. package/lib/loading-bar/src/LoadingBar.js +28 -14
  277. package/lib/log/src/Log.d.ts +1 -0
  278. package/lib/mention/src/Mention.d.ts +3 -1
  279. package/lib/mention/src/Mention.js +19 -9
  280. package/lib/message/src/Message.d.ts +12 -24
  281. package/lib/message/src/Message.js +56 -39
  282. package/lib/message/src/MessageEnvironment.d.ts +9 -0
  283. package/lib/message/src/MessageEnvironment.js +1 -1
  284. package/lib/message/src/MessageProvider.d.ts +67 -0
  285. package/lib/message/src/MessageProvider.js +3 -0
  286. package/lib/message/src/message-props.d.ts +4 -0
  287. package/lib/message/src/message-props.js +4 -0
  288. package/lib/message/src/styles/index.cssr.js +2 -1
  289. package/lib/message/src/types.d.ts +3 -1
  290. package/lib/message/styles/light.d.ts +7 -0
  291. package/lib/message/styles/light.js +1 -1
  292. package/lib/modal/src/BodyWrapper.d.ts +1 -0
  293. package/lib/notification/src/Notification.d.ts +3 -1
  294. package/lib/notification/src/Notification.js +44 -32
  295. package/lib/notification/src/NotificationProvider.d.ts +1 -0
  296. package/lib/notification/src/NotificationProvider.js +1 -0
  297. package/lib/popconfirm/src/Popconfirm.d.ts +3 -2
  298. package/lib/popconfirm/src/Popconfirm.js +2 -1
  299. package/lib/popconfirm/src/PopconfirmPanel.d.ts +3 -1
  300. package/lib/popconfirm/src/PopconfirmPanel.js +30 -23
  301. package/lib/popconfirm/src/interface.d.ts +2 -0
  302. package/lib/popover/src/PopoverBody.d.ts +4 -0
  303. package/lib/popover/src/PopoverBody.js +3 -2
  304. package/lib/popover/src/styles/index.cssr.js +50 -29
  305. package/lib/radio/src/Radio.d.ts +7 -0
  306. package/lib/radio/src/Radio.js +13 -6
  307. package/lib/radio/src/RadioGroup.d.ts +9 -0
  308. package/lib/radio/src/styles/radio.cssr.js +16 -9
  309. package/lib/radio/styles/dark.js +2 -2
  310. package/lib/radio/styles/light.d.ts +1 -0
  311. package/lib/radio/styles/light.js +2 -2
  312. package/lib/scrollbar/src/ScrollBar.d.ts +1 -0
  313. package/lib/select/src/Select.d.ts +3 -1
  314. package/lib/select/src/Select.js +30 -22
  315. package/lib/slider/src/Slider.d.ts +6 -2
  316. package/lib/slider/src/Slider.js +73 -50
  317. package/lib/steps/src/Step.d.ts +3 -1
  318. package/lib/steps/src/Step.js +32 -20
  319. package/lib/styles.d.ts +4 -4
  320. package/lib/styles.js +6 -2
  321. package/lib/tabs/src/styles/index.cssr.js +2 -0
  322. package/lib/time-picker/src/Panel.js +4 -4
  323. package/lib/time-picker/src/TimePicker.d.ts +12 -4
  324. package/lib/time-picker/src/TimePicker.js +89 -34
  325. package/lib/timeline/src/Timeline.d.ts +9 -9
  326. package/lib/timeline/src/TimelineItem.d.ts +4 -2
  327. package/lib/timeline/src/TimelineItem.js +34 -20
  328. package/lib/timeline/styles/_common.d.ts +1 -1
  329. package/lib/timeline/styles/_common.js +1 -1
  330. package/lib/timeline/styles/light.d.ts +1 -1
  331. package/lib/transfer/src/Transfer.d.ts +10 -0
  332. package/lib/transfer/src/TransferFilter.d.ts +1 -0
  333. package/lib/transfer/src/TransferList.d.ts +2 -0
  334. package/lib/transfer/src/TransferListItem.d.ts +1 -0
  335. package/lib/transfer/styles/light.d.ts +1 -0
  336. package/lib/tree/src/Tree.d.ts +16 -3
  337. package/lib/tree/src/Tree.js +49 -27
  338. package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -0
  339. package/lib/tree/styles/light.d.ts +1 -0
  340. package/lib/tree-select/src/TreeSelect.d.ts +23 -10
  341. package/lib/tree-select/src/TreeSelect.js +25 -16
  342. package/lib/tree-select/styles/light.d.ts +1 -0
  343. package/lib/upload/src/Upload.d.ts +3 -1
  344. package/lib/upload/src/Upload.js +22 -12
  345. package/lib/upload/src/UploadFileList.js +8 -3
  346. package/lib/upload/src/interface.d.ts +3 -1
  347. package/lib/version.d.ts +1 -1
  348. package/lib/version.js +1 -1
  349. package/package.json +2 -2
  350. package/web-types.json +1 -1
@@ -16,16 +16,49 @@ const iconMap = {
16
16
  info: (0, vue_1.h)(icons_1.InfoIcon, null),
17
17
  success: (0, vue_1.h)(icons_1.SuccessIcon, null),
18
18
  warning: (0, vue_1.h)(icons_1.WarningIcon, null),
19
- error: (0, vue_1.h)(icons_1.ErrorIcon, null)
19
+ error: (0, vue_1.h)(icons_1.ErrorIcon, null),
20
+ default: null
20
21
  };
21
22
  exports.default = (0, vue_1.defineComponent)({
22
23
  name: 'Message',
23
24
  props: Object.assign(Object.assign({}, message_props_1.messageProps), { render: Function }),
24
25
  setup(props) {
26
+ const { inlineThemeDisabled } = (0, _mixins_1.useConfig)();
25
27
  const { props: messageProviderProps, mergedClsPrefixRef
26
28
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
27
29
  } = (0, vue_1.inject)(context_1.messageProviderInjectionKey);
28
30
  const themeRef = (0, _mixins_1.useTheme)('Message', '-message', index_cssr_1.default, styles_1.messageLight, messageProviderProps, mergedClsPrefixRef);
31
+ const cssVarsRef = (0, vue_1.computed)(() => {
32
+ const { type } = props;
33
+ const { common: { cubicBezierEaseInOut }, self: { padding, margin, maxWidth, iconMargin, closeMargin, closeSize, iconSize, fontSize, lineHeight, borderRadius, iconColorInfo, iconColorSuccess, iconColorWarning, iconColorError, iconColorLoading, [(0, _utils_1.createKey)('textColor', type)]: textColor, [(0, _utils_1.createKey)('boxShadow', type)]: boxShadow, [(0, _utils_1.createKey)('color', type)]: color, [(0, _utils_1.createKey)('closeColor', type)]: closeColor, [(0, _utils_1.createKey)('closeColorPressed', type)]: closeColorPressed, [(0, _utils_1.createKey)('closeColorHover', type)]: closeColorHover } } = themeRef.value;
34
+ return {
35
+ '--n-bezier': cubicBezierEaseInOut,
36
+ '--n-margin': margin,
37
+ '--n-padding': padding,
38
+ '--n-max-width': maxWidth,
39
+ '--n-font-size': fontSize,
40
+ '--n-icon-margin': iconMargin,
41
+ '--n-icon-size': iconSize,
42
+ '--n-close-size': closeSize,
43
+ '--n-close-margin': closeMargin,
44
+ '--n-text-color': textColor,
45
+ '--n-color': color,
46
+ '--n-box-shadow': boxShadow,
47
+ '--n-icon-color-info': iconColorInfo,
48
+ '--n-icon-color-success': iconColorSuccess,
49
+ '--n-icon-color-warning': iconColorWarning,
50
+ '--n-icon-color-error': iconColorError,
51
+ '--n-icon-color-loading': iconColorLoading,
52
+ '--n-close-color': closeColor,
53
+ '--n-close-color-pressed': closeColorPressed,
54
+ '--n-close-color-hover': closeColorHover,
55
+ '--n-line-height': lineHeight,
56
+ '--n-border-radius': borderRadius
57
+ };
58
+ });
59
+ const themeClassHandle = inlineThemeDisabled
60
+ ? (0, _mixins_1.useThemeClass)('message', (0, vue_1.computed)(() => props.type[0]), cssVarsRef, {})
61
+ : undefined;
29
62
  return {
30
63
  mergedClsPrefix: mergedClsPrefixRef,
31
64
  messageProviderProps,
@@ -33,48 +66,29 @@ exports.default = (0, vue_1.defineComponent)({
33
66
  var _a;
34
67
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
35
68
  },
36
- cssVars: (0, vue_1.computed)(() => {
37
- const { type } = props;
38
- const { common: { cubicBezierEaseInOut }, self: { padding, margin, maxWidth, iconMargin, closeMargin, closeSize, iconSize, fontSize, lineHeight, borderRadius, iconColorInfo, iconColorSuccess, iconColorWarning, iconColorError, iconColorLoading, [(0, _utils_1.createKey)('textColor', type)]: textColor, [(0, _utils_1.createKey)('boxShadow', type)]: boxShadow, [(0, _utils_1.createKey)('color', type)]: color, [(0, _utils_1.createKey)('closeColor', type)]: closeColor, [(0, _utils_1.createKey)('closeColorPressed', type)]: closeColorPressed, [(0, _utils_1.createKey)('closeColorHover', type)]: closeColorHover } } = themeRef.value;
39
- return {
40
- '--n-bezier': cubicBezierEaseInOut,
41
- '--n-margin': margin,
42
- '--n-padding': padding,
43
- '--n-max-width': maxWidth,
44
- '--n-font-size': fontSize,
45
- '--n-icon-margin': iconMargin,
46
- '--n-icon-size': iconSize,
47
- '--n-close-size': closeSize,
48
- '--n-close-margin': closeMargin,
49
- '--n-text-color': textColor,
50
- '--n-color': color,
51
- '--n-box-shadow': boxShadow,
52
- '--n-icon-color-info': iconColorInfo,
53
- '--n-icon-color-success': iconColorSuccess,
54
- '--n-icon-color-warning': iconColorWarning,
55
- '--n-icon-color-error': iconColorError,
56
- '--n-icon-color-loading': iconColorLoading,
57
- '--n-close-color': closeColor,
58
- '--n-close-color-pressed': closeColorPressed,
59
- '--n-close-color-hover': closeColorHover,
60
- '--n-line-height': lineHeight,
61
- '--n-border-radius': borderRadius
62
- };
63
- }),
69
+ cssVars: inlineThemeDisabled ? undefined : inlineThemeDisabled,
70
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
71
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
64
72
  placement: messageProviderProps.placement
65
73
  };
66
74
  },
67
75
  render() {
68
- const { render: renderMessage, type, closable, content, mergedClsPrefix, cssVars, icon, handleClose } = this;
69
- return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-message-wrapper`, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave, style: Object.assign({
70
- alignItems: this.placement.startsWith('top')
71
- ? 'flex-start'
72
- : 'flex-end'
73
- }, cssVars) }, renderMessage ? (renderMessage(this.$props)) : ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-message ${mergedClsPrefix}-message--${type}-type` },
74
- (0, vue_1.h)("div", { class: `${mergedClsPrefix}-message__icon ${mergedClsPrefix}-message__icon--${type}-type` },
76
+ const { render: renderMessage, type, closable, content, mergedClsPrefix, cssVars, themeClass, onRender, icon, handleClose, showIcon } = this;
77
+ onRender === null || onRender === void 0 ? void 0 : onRender();
78
+ let iconNode;
79
+ return ((0, vue_1.h)("div", { class: [`${mergedClsPrefix}-message-wrapper`, themeClass], onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave, style: [
80
+ {
81
+ alignItems: this.placement.startsWith('top')
82
+ ? 'flex-start'
83
+ : 'flex-end'
84
+ },
85
+ cssVars
86
+ ] }, renderMessage ? (renderMessage(this.$props)) : ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-message ${mergedClsPrefix}-message--${type}-type` },
87
+ (iconNode = createIconVNode(icon, type, mergedClsPrefix)) &&
88
+ showIcon ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-message__icon ${mergedClsPrefix}-message__icon--${type}-type` },
75
89
  (0, vue_1.h)(_internal_1.NIconSwitchTransition, null, {
76
- default: () => [createIconVNode(icon, type, mergedClsPrefix)]
77
- })),
90
+ default: () => iconNode
91
+ }))) : null,
78
92
  (0, vue_1.h)("div", { class: `${mergedClsPrefix}-message__content` }, (0, _utils_1.render)(content)),
79
93
  closable ? ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-message__close`, onClick: handleClose })) : null))));
80
94
  }
@@ -84,8 +98,11 @@ function createIconVNode(icon, type, clsPrefix) {
84
98
  return icon();
85
99
  }
86
100
  else {
101
+ const innerIcon = type === 'loading' ? ((0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: clsPrefix, strokeWidth: 24, scale: 0.85 })) : (iconMap[type]);
102
+ if (!innerIcon)
103
+ return null;
87
104
  return ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: clsPrefix, key: type }, {
88
- default: () => type === 'loading' ? ((0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: clsPrefix, strokeWidth: 24, scale: 0.85 })) : (iconMap[type])
105
+ default: () => innerIcon
89
106
  }));
90
107
  }
91
108
  }
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<{
19
19
  readonly default: "info";
20
20
  };
21
21
  content: PropType<string | number | (() => import("vue").VNodeChild)>;
22
+ showIcon: {
23
+ readonly type: BooleanConstructor;
24
+ readonly default: true;
25
+ };
22
26
  closable: BooleanConstructor;
23
27
  keepAliveOnHover: BooleanConstructor;
24
28
  onClose: PropType<() => void>;
@@ -52,6 +56,10 @@ declare const _default: import("vue").DefineComponent<{
52
56
  readonly default: "info";
53
57
  };
54
58
  content: PropType<string | number | (() => import("vue").VNodeChild)>;
59
+ showIcon: {
60
+ readonly type: BooleanConstructor;
61
+ readonly default: true;
62
+ };
55
63
  closable: BooleanConstructor;
56
64
  keepAliveOnHover: BooleanConstructor;
57
65
  onClose: PropType<() => void>;
@@ -60,6 +68,7 @@ declare const _default: import("vue").DefineComponent<{
60
68
  }>>, {
61
69
  type: import("./types").MessageType;
62
70
  duration: number;
71
+ showIcon: boolean;
63
72
  closable: boolean;
64
73
  keepAliveOnHover: boolean;
65
74
  }>;
@@ -89,7 +89,7 @@ exports.default = (0, vue_1.defineComponent)({
89
89
  render() {
90
90
  return ((0, vue_1.h)(_internal_1.NFadeInExpandTransition, { appear: true, onAfterLeave: this.handleAfterLeave, onLeave: this.onLeave }, {
91
91
  default: () => [
92
- this.show ? ((0, vue_1.h)(Message_1.default, { content: this.content, type: this.type, icon: this.icon, closable: this.closable, onClose: this.handleClose, onMouseenter: this.keepAliveOnHover ? this.handleMouseenter : undefined, onMouseleave: this.keepAliveOnHover ? this.handleMouseleave : undefined })) : null
92
+ this.show ? ((0, vue_1.h)(Message_1.default, { content: this.content, type: this.type, icon: this.icon, showIcon: this.showIcon, closable: this.closable, onClose: this.handleClose, onMouseenter: this.keepAliveOnHover ? this.handleMouseenter : undefined, onMouseleave: this.keepAliveOnHover ? this.handleMouseleave : undefined })) : null
93
93
  ]
94
94
  }));
95
95
  }
@@ -3,6 +3,7 @@ import type { ExtractPublicPropTypes } from '../../_utils';
3
3
  import type { MessageOptions, MessageType } from './types';
4
4
  declare type ContentType = string | (() => VNodeChild);
5
5
  export interface MessageApiInjection {
6
+ create: (content: ContentType, options?: MessageOptions) => MessageReactive;
6
7
  info: (content: ContentType, options?: MessageOptions) => MessageReactive;
7
8
  success: (content: ContentType, options?: MessageOptions) => MessageReactive;
8
9
  warning: (content: ContentType, options?: MessageOptions) => MessageReactive;
@@ -17,6 +18,7 @@ export interface MessageReactive {
17
18
  keepAliveOnHover?: boolean;
18
19
  type: MessageType;
19
20
  icon?: () => VNodeChild;
21
+ showIcon?: boolean;
20
22
  onClose?: () => void;
21
23
  destroy: () => void;
22
24
  }
@@ -36,26 +38,33 @@ declare const messageProviderProps: {
36
38
  closable: BooleanConstructor;
37
39
  containerStyle: PropType<string | CSSProperties>;
38
40
  theme: PropType<import("../../_mixins").Theme<"Message", {
41
+ textColor: string;
39
42
  textColorInfo: string;
40
43
  textColorSuccess: string;
41
44
  textColorError: string;
42
45
  textColorWarning: string;
43
46
  textColorLoading: string;
47
+ color: string;
44
48
  colorInfo: string;
45
49
  colorSuccess: string;
46
50
  colorError: string;
47
51
  colorWarning: string;
48
52
  colorLoading: string;
53
+ boxShadow: string;
49
54
  boxShadowInfo: string;
50
55
  boxShadowSuccess: string;
51
56
  boxShadowError: string;
52
57
  boxShadowWarning: string;
53
58
  boxShadowLoading: string;
59
+ iconColor: string;
54
60
  iconColorInfo: string;
55
61
  iconColorSuccess: string;
56
62
  iconColorWarning: string;
57
63
  iconColorError: string;
58
64
  iconColorLoading: string;
65
+ closeColor: string;
66
+ closeColorHover: string;
67
+ closeColorPressed: string;
59
68
  closeColorInfo: string;
60
69
  closeColorHoverInfo: string;
61
70
  closeColorPressedInfo: string;
@@ -85,26 +94,33 @@ declare const messageProviderProps: {
85
94
  fontSize: string;
86
95
  }, any>>;
87
96
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
97
+ textColor: string;
88
98
  textColorInfo: string;
89
99
  textColorSuccess: string;
90
100
  textColorError: string;
91
101
  textColorWarning: string;
92
102
  textColorLoading: string;
103
+ color: string;
93
104
  colorInfo: string;
94
105
  colorSuccess: string;
95
106
  colorError: string;
96
107
  colorWarning: string;
97
108
  colorLoading: string;
109
+ boxShadow: string;
98
110
  boxShadowInfo: string;
99
111
  boxShadowSuccess: string;
100
112
  boxShadowError: string;
101
113
  boxShadowWarning: string;
102
114
  boxShadowLoading: string;
115
+ iconColor: string;
103
116
  iconColorInfo: string;
104
117
  iconColorSuccess: string;
105
118
  iconColorWarning: string;
106
119
  iconColorError: string;
107
120
  iconColorLoading: string;
121
+ closeColor: string;
122
+ closeColorHover: string;
123
+ closeColorPressed: string;
108
124
  closeColorInfo: string;
109
125
  closeColorHoverInfo: string;
110
126
  closeColorPressedInfo: string;
@@ -134,26 +150,33 @@ declare const messageProviderProps: {
134
150
  fontSize: string;
135
151
  }, any>>>;
136
152
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
153
+ textColor: string;
137
154
  textColorInfo: string;
138
155
  textColorSuccess: string;
139
156
  textColorError: string;
140
157
  textColorWarning: string;
141
158
  textColorLoading: string;
159
+ color: string;
142
160
  colorInfo: string;
143
161
  colorSuccess: string;
144
162
  colorError: string;
145
163
  colorWarning: string;
146
164
  colorLoading: string;
165
+ boxShadow: string;
147
166
  boxShadowInfo: string;
148
167
  boxShadowSuccess: string;
149
168
  boxShadowError: string;
150
169
  boxShadowWarning: string;
151
170
  boxShadowLoading: string;
171
+ iconColor: string;
152
172
  iconColorInfo: string;
153
173
  iconColorSuccess: string;
154
174
  iconColorWarning: string;
155
175
  iconColorError: string;
156
176
  iconColorLoading: string;
177
+ closeColor: string;
178
+ closeColorHover: string;
179
+ closeColorPressed: string;
157
180
  closeColorInfo: string;
158
181
  closeColorHoverInfo: string;
159
182
  closeColorPressedInfo: string;
@@ -200,26 +223,33 @@ declare const _default: import("vue").DefineComponent<{
200
223
  closable: BooleanConstructor;
201
224
  containerStyle: PropType<string | CSSProperties>;
202
225
  theme: PropType<import("../../_mixins").Theme<"Message", {
226
+ textColor: string;
203
227
  textColorInfo: string;
204
228
  textColorSuccess: string;
205
229
  textColorError: string;
206
230
  textColorWarning: string;
207
231
  textColorLoading: string;
232
+ color: string;
208
233
  colorInfo: string;
209
234
  colorSuccess: string;
210
235
  colorError: string;
211
236
  colorWarning: string;
212
237
  colorLoading: string;
238
+ boxShadow: string;
213
239
  boxShadowInfo: string;
214
240
  boxShadowSuccess: string;
215
241
  boxShadowError: string;
216
242
  boxShadowWarning: string;
217
243
  boxShadowLoading: string;
244
+ iconColor: string;
218
245
  iconColorInfo: string;
219
246
  iconColorSuccess: string;
220
247
  iconColorWarning: string;
221
248
  iconColorError: string;
222
249
  iconColorLoading: string;
250
+ closeColor: string;
251
+ closeColorHover: string;
252
+ closeColorPressed: string;
223
253
  closeColorInfo: string;
224
254
  closeColorHoverInfo: string;
225
255
  closeColorPressedInfo: string;
@@ -249,26 +279,33 @@ declare const _default: import("vue").DefineComponent<{
249
279
  fontSize: string;
250
280
  }, any>>;
251
281
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
282
+ textColor: string;
252
283
  textColorInfo: string;
253
284
  textColorSuccess: string;
254
285
  textColorError: string;
255
286
  textColorWarning: string;
256
287
  textColorLoading: string;
288
+ color: string;
257
289
  colorInfo: string;
258
290
  colorSuccess: string;
259
291
  colorError: string;
260
292
  colorWarning: string;
261
293
  colorLoading: string;
294
+ boxShadow: string;
262
295
  boxShadowInfo: string;
263
296
  boxShadowSuccess: string;
264
297
  boxShadowError: string;
265
298
  boxShadowWarning: string;
266
299
  boxShadowLoading: string;
300
+ iconColor: string;
267
301
  iconColorInfo: string;
268
302
  iconColorSuccess: string;
269
303
  iconColorWarning: string;
270
304
  iconColorError: string;
271
305
  iconColorLoading: string;
306
+ closeColor: string;
307
+ closeColorHover: string;
308
+ closeColorPressed: string;
272
309
  closeColorInfo: string;
273
310
  closeColorHoverInfo: string;
274
311
  closeColorPressedInfo: string;
@@ -298,26 +335,33 @@ declare const _default: import("vue").DefineComponent<{
298
335
  fontSize: string;
299
336
  }, any>>>;
300
337
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
338
+ textColor: string;
301
339
  textColorInfo: string;
302
340
  textColorSuccess: string;
303
341
  textColorError: string;
304
342
  textColorWarning: string;
305
343
  textColorLoading: string;
344
+ color: string;
306
345
  colorInfo: string;
307
346
  colorSuccess: string;
308
347
  colorError: string;
309
348
  colorWarning: string;
310
349
  colorLoading: string;
350
+ boxShadow: string;
311
351
  boxShadowInfo: string;
312
352
  boxShadowSuccess: string;
313
353
  boxShadowError: string;
314
354
  boxShadowWarning: string;
315
355
  boxShadowLoading: string;
356
+ iconColor: string;
316
357
  iconColorInfo: string;
317
358
  iconColorSuccess: string;
318
359
  iconColorWarning: string;
319
360
  iconColorError: string;
320
361
  iconColorLoading: string;
362
+ closeColor: string;
363
+ closeColorHover: string;
364
+ closeColorPressed: string;
321
365
  closeColorInfo: string;
322
366
  closeColorHoverInfo: string;
323
367
  closeColorPressedInfo: string;
@@ -358,6 +402,7 @@ declare const _default: import("vue").DefineComponent<{
358
402
  keepAliveOnHover?: boolean | undefined;
359
403
  type: MessageType;
360
404
  icon?: (() => VNodeChild) | undefined;
405
+ showIcon?: boolean | undefined;
361
406
  onClose?: (() => void) | undefined;
362
407
  destroy: () => void;
363
408
  };
@@ -370,6 +415,7 @@ declare const _default: import("vue").DefineComponent<{
370
415
  keepAliveOnHover?: boolean | undefined;
371
416
  type: MessageType;
372
417
  icon?: (() => VNodeChild) | undefined;
418
+ showIcon?: boolean | undefined;
373
419
  onClose?: (() => void) | undefined;
374
420
  destroy: () => void;
375
421
  }[]>;
@@ -389,26 +435,33 @@ declare const _default: import("vue").DefineComponent<{
389
435
  closable: BooleanConstructor;
390
436
  containerStyle: PropType<string | CSSProperties>;
391
437
  theme: PropType<import("../../_mixins").Theme<"Message", {
438
+ textColor: string;
392
439
  textColorInfo: string;
393
440
  textColorSuccess: string;
394
441
  textColorError: string;
395
442
  textColorWarning: string;
396
443
  textColorLoading: string;
444
+ color: string;
397
445
  colorInfo: string;
398
446
  colorSuccess: string;
399
447
  colorError: string;
400
448
  colorWarning: string;
401
449
  colorLoading: string;
450
+ boxShadow: string;
402
451
  boxShadowInfo: string;
403
452
  boxShadowSuccess: string;
404
453
  boxShadowError: string;
405
454
  boxShadowWarning: string;
406
455
  boxShadowLoading: string;
456
+ iconColor: string;
407
457
  iconColorInfo: string;
408
458
  iconColorSuccess: string;
409
459
  iconColorWarning: string;
410
460
  iconColorError: string;
411
461
  iconColorLoading: string;
462
+ closeColor: string;
463
+ closeColorHover: string;
464
+ closeColorPressed: string;
412
465
  closeColorInfo: string;
413
466
  closeColorHoverInfo: string;
414
467
  closeColorPressedInfo: string;
@@ -438,26 +491,33 @@ declare const _default: import("vue").DefineComponent<{
438
491
  fontSize: string;
439
492
  }, any>>;
440
493
  themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
494
+ textColor: string;
441
495
  textColorInfo: string;
442
496
  textColorSuccess: string;
443
497
  textColorError: string;
444
498
  textColorWarning: string;
445
499
  textColorLoading: string;
500
+ color: string;
446
501
  colorInfo: string;
447
502
  colorSuccess: string;
448
503
  colorError: string;
449
504
  colorWarning: string;
450
505
  colorLoading: string;
506
+ boxShadow: string;
451
507
  boxShadowInfo: string;
452
508
  boxShadowSuccess: string;
453
509
  boxShadowError: string;
454
510
  boxShadowWarning: string;
455
511
  boxShadowLoading: string;
512
+ iconColor: string;
456
513
  iconColorInfo: string;
457
514
  iconColorSuccess: string;
458
515
  iconColorWarning: string;
459
516
  iconColorError: string;
460
517
  iconColorLoading: string;
518
+ closeColor: string;
519
+ closeColorHover: string;
520
+ closeColorPressed: string;
461
521
  closeColorInfo: string;
462
522
  closeColorHoverInfo: string;
463
523
  closeColorPressedInfo: string;
@@ -487,26 +547,33 @@ declare const _default: import("vue").DefineComponent<{
487
547
  fontSize: string;
488
548
  }, any>>>;
489
549
  builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Message", {
550
+ textColor: string;
490
551
  textColorInfo: string;
491
552
  textColorSuccess: string;
492
553
  textColorError: string;
493
554
  textColorWarning: string;
494
555
  textColorLoading: string;
556
+ color: string;
495
557
  colorInfo: string;
496
558
  colorSuccess: string;
497
559
  colorError: string;
498
560
  colorWarning: string;
499
561
  colorLoading: string;
562
+ boxShadow: string;
500
563
  boxShadowInfo: string;
501
564
  boxShadowSuccess: string;
502
565
  boxShadowError: string;
503
566
  boxShadowWarning: string;
504
567
  boxShadowLoading: string;
568
+ iconColor: string;
505
569
  iconColorInfo: string;
506
570
  iconColorSuccess: string;
507
571
  iconColorWarning: string;
508
572
  iconColorError: string;
509
573
  iconColorLoading: string;
574
+ closeColor: string;
575
+ closeColorHover: string;
576
+ closeColorPressed: string;
510
577
  closeColorInfo: string;
511
578
  closeColorHoverInfo: string;
512
579
  closeColorPressedInfo: string;
@@ -24,6 +24,9 @@ exports.default = (0, vue_1.defineComponent)({
24
24
  const messageListRef = (0, vue_1.ref)([]);
25
25
  const messageRefs = (0, vue_1.ref)({});
26
26
  const api = {
27
+ create(content, options) {
28
+ return create(content, Object.assign({ type: 'default' }, options));
29
+ },
27
30
  info(content, options) {
28
31
  return create(content, Object.assign(Object.assign({}, options), { type: 'info' }));
29
32
  },
@@ -8,6 +8,10 @@ export declare const messageProps: {
8
8
  readonly default: "info";
9
9
  };
10
10
  readonly content: PropType<string | number | (() => VNodeChild)>;
11
+ readonly showIcon: {
12
+ readonly type: BooleanConstructor;
13
+ readonly default: true;
14
+ };
11
15
  readonly closable: BooleanConstructor;
12
16
  readonly keepAliveOnHover: BooleanConstructor;
13
17
  readonly onClose: PropType<() => void>;
@@ -8,6 +8,10 @@ exports.messageProps = {
8
8
  default: 'info'
9
9
  },
10
10
  content: [String, Number, Function],
11
+ showIcon: {
12
+ type: Boolean,
13
+ default: true
14
+ },
11
15
  closable: Boolean,
12
16
  keepAliveOnHover: Boolean,
13
17
  onClose: Function,
@@ -27,6 +27,7 @@ const fade_in_height_expand_cssr_1 = __importDefault(require("../../../_styles/t
27
27
  // --n-text-color
28
28
  // --n-color
29
29
  // --n-box-shadow
30
+ // --n-icon-color-default
30
31
  // --n-icon-color-info
31
32
  // --n-icon-color-success
32
33
  // --n-icon-color-warning
@@ -82,7 +83,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('message-wrapper', `
82
83
  width: var(--n-icon-size);
83
84
  font-size: var(--n-icon-size);
84
85
  flex-shrink: 0;
85
- `, [['info', 'success', 'warning', 'error', 'loading'].map(type => (0, cssr_1.cM)(`${type}-type`, [(0, cssr_1.c)('> *', `
86
+ `, [['default', 'info', 'success', 'warning', 'error', 'loading'].map(type => (0, cssr_1.cM)(`${type}-type`, [(0, cssr_1.c)('> *', `
86
87
  color: var(--n-icon-color-${type});
87
88
  transition: color .3s var(--n-bezier);
88
89
  `)])), (0, cssr_1.c)('> *', `
@@ -1,14 +1,16 @@
1
1
  import { VNodeChild } from 'vue';
2
2
  import type { MessageSetupProps } from './message-props';
3
- export declare type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';
3
+ export declare type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading' | 'default';
4
4
  export declare type RenderMessageProps = Pick<MessageSetupProps, 'closable' | 'content' | 'icon' | 'onClose' | 'type'>;
5
5
  export declare type MessageRenderMessage = (props: RenderMessageProps) => VNodeChild;
6
6
  export interface MessageOptions {
7
+ type?: MessageType;
7
8
  render?: MessageRenderMessage;
8
9
  duration?: number;
9
10
  closable?: boolean;
10
11
  keepAliveOnHover?: boolean;
11
12
  icon?: () => VNodeChild;
13
+ showIcon?: boolean;
12
14
  onClose?: () => void;
13
15
  onLeave?: () => void;
14
16
  onAfterLeave?: () => void;
@@ -1,26 +1,33 @@
1
1
  import type { ThemeCommonVars } from '../../_styles/common';
2
2
  import { Theme } from '../../_mixins/use-theme';
3
3
  export declare const self: (vars: ThemeCommonVars) => {
4
+ textColor: string;
4
5
  textColorInfo: string;
5
6
  textColorSuccess: string;
6
7
  textColorError: string;
7
8
  textColorWarning: string;
8
9
  textColorLoading: string;
10
+ color: string;
9
11
  colorInfo: string;
10
12
  colorSuccess: string;
11
13
  colorError: string;
12
14
  colorWarning: string;
13
15
  colorLoading: string;
16
+ boxShadow: string;
14
17
  boxShadowInfo: string;
15
18
  boxShadowSuccess: string;
16
19
  boxShadowError: string;
17
20
  boxShadowWarning: string;
18
21
  boxShadowLoading: string;
22
+ iconColor: string;
19
23
  iconColorInfo: string;
20
24
  iconColorSuccess: string;
21
25
  iconColorWarning: string;
22
26
  iconColorError: string;
23
27
  iconColorLoading: string;
28
+ closeColor: string;
29
+ closeColorHover: string;
30
+ closeColorPressed: string;
24
31
  closeColorInfo: string;
25
32
  closeColorHoverInfo: string;
26
33
  closeColorPressedInfo: string;
@@ -8,7 +8,7 @@ const _common_1 = __importDefault(require("./_common"));
8
8
  const common_1 = require("../../_styles/common");
9
9
  const self = (vars) => {
10
10
  const { textColor2, closeColor, closeColorHover, closeColorPressed, infoColor, successColor, errorColor, warningColor, popoverColor, boxShadow2, primaryColor, lineHeight, borderRadius } = vars;
11
- return Object.assign(Object.assign({}, _common_1.default), { textColorInfo: textColor2, textColorSuccess: textColor2, textColorError: textColor2, textColorWarning: textColor2, textColorLoading: textColor2, colorInfo: popoverColor, colorSuccess: popoverColor, colorError: popoverColor, colorWarning: popoverColor, colorLoading: popoverColor, boxShadowInfo: boxShadow2, boxShadowSuccess: boxShadow2, boxShadowError: boxShadow2, boxShadowWarning: boxShadow2, boxShadowLoading: boxShadow2, iconColorInfo: infoColor, iconColorSuccess: successColor, iconColorWarning: warningColor, iconColorError: errorColor, iconColorLoading: primaryColor, closeColorInfo: closeColor, closeColorHoverInfo: closeColorHover, closeColorPressedInfo: closeColorPressed, closeColorSuccess: closeColor, closeColorHoverSuccess: closeColorHover, closeColorPressedSuccess: closeColorPressed, closeColorError: closeColor, closeColorHoverError: closeColorHover, closeColorPressedError: closeColorPressed, closeColorWarning: closeColor, closeColorHoverWarning: closeColorHover, closeColorPressedWarning: closeColorPressed, closeColorLoading: closeColor, closeColorHoverLoading: closeColorHover, closeColorPressedLoading: closeColorPressed, loadingColor: primaryColor, lineHeight,
11
+ return Object.assign(Object.assign({}, _common_1.default), { textColor: textColor2, textColorInfo: textColor2, textColorSuccess: textColor2, textColorError: textColor2, textColorWarning: textColor2, textColorLoading: textColor2, color: popoverColor, colorInfo: popoverColor, colorSuccess: popoverColor, colorError: popoverColor, colorWarning: popoverColor, colorLoading: popoverColor, boxShadow: boxShadow2, boxShadowInfo: boxShadow2, boxShadowSuccess: boxShadow2, boxShadowError: boxShadow2, boxShadowWarning: boxShadow2, boxShadowLoading: boxShadow2, iconColor: textColor2, iconColorInfo: infoColor, iconColorSuccess: successColor, iconColorWarning: warningColor, iconColorError: errorColor, iconColorLoading: primaryColor, closeColor: closeColor, closeColorHover: closeColorHover, closeColorPressed: closeColorPressed, closeColorInfo: closeColor, closeColorHoverInfo: closeColorHover, closeColorPressedInfo: closeColorPressed, closeColorSuccess: closeColor, closeColorHoverSuccess: closeColorHover, closeColorPressedSuccess: closeColorPressed, closeColorError: closeColor, closeColorHoverError: closeColorHover, closeColorPressedError: closeColorPressed, closeColorWarning: closeColor, closeColorHoverWarning: closeColorHover, closeColorPressedWarning: closeColorPressed, closeColorLoading: closeColor, closeColorHoverLoading: closeColorHover, closeColorPressedLoading: closeColorPressed, loadingColor: primaryColor, lineHeight,
12
12
  borderRadius });
13
13
  };
14
14
  exports.self = self;
@@ -685,6 +685,7 @@ declare const _default: import("vue").DefineComponent<{
685
685
  mergedClsPrefix: import("vue").Ref<string>;
686
686
  bodyRef: import("vue").Ref<ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | HTMLElement | null>;
687
687
  scrollbarRef: import("vue").Ref<{
688
+ $el: HTMLElement;
688
689
  containerRef: HTMLElement | null;
689
690
  contentRef: HTMLElement | null;
690
691
  containerScrollTop: number;
@@ -68,7 +68,9 @@ export declare const Notification: import("vue").DefineComponent<{
68
68
  '--n-padding-right': string;
69
69
  '--n-padding-top': string;
70
70
  '--n-padding-bottom': string;
71
- }>;
71
+ }> | undefined;
72
+ themeClass: import("vue").Ref<string> | undefined;
73
+ onRender: (() => void) | undefined;
72
74
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
73
75
  readonly closable: {
74
76
  readonly type: BooleanConstructor;