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
@@ -14,18 +14,22 @@ import { c, cE, cM, cNotM, cB } from '../../../_utils/cssr'; // vars:
14
14
  // --n-text-color
15
15
  // --n-text-color-disabled
16
16
  // --n-label-padding
17
+ // --n-label-line-height
17
18
 
18
19
  export default cB('radio', `
19
- line-height: 1;
20
+ line-height: var(--n-label-line-height);
20
21
  outline: none;
21
22
  position: relative;
22
23
  user-select: none;
23
24
  display: inline-flex;
24
- vertical-align: middle;
25
- align-items: center;
25
+ align-items: flex-start;
26
+ flex-wrap: nowrap;
26
27
  font-size: var(--n-font-size);
27
- `, [cE('dot', `
28
- height: var(--n-radio-size);
28
+ word-break: break-word;
29
+ `, [cE('dot-wrapper', `
30
+ position: relative;
31
+ flex-shrink: 0;
32
+ flex-grow: 0;
29
33
  width: var(--n-radio-size);
30
34
  `), cB('radio-input', `
31
35
  position: absolute;
@@ -39,13 +43,18 @@ export default cB('radio', `
39
43
  z-index: 1;
40
44
  cursor: pointer;
41
45
  `), cE('dot', `
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 0;
49
+ transform: translateY(-50%);
50
+ height: var(--n-radio-size);
51
+ width: var(--n-radio-size);
42
52
  background: var(--n-color);
43
53
  box-shadow: var(--n-box-shadow);
54
+ border-radius: 50%;
44
55
  transition:
45
56
  background-color .3s var(--n-bezier),
46
57
  box-shadow .3s var(--n-bezier);
47
- position: relative;
48
- border-radius: 50%;
49
58
  `, [c('&::before', `
50
59
  content: "";
51
60
  opacity: 0;
@@ -70,7 +79,6 @@ export default cB('radio', `
70
79
  color: var(--n-text-color);
71
80
  padding: var(--n-label-padding);
72
81
  display: inline-block;
73
- white-space: nowrap;
74
82
  transition: color .3s var(--n-bezier);
75
83
  `), cNotM('disabled', `
76
84
  cursor: pointer;
@@ -86,7 +94,6 @@ export default cB('radio', `
86
94
  }, [c('&::before', {
87
95
  backgroundColor: 'var(--n-dot-color-disabled)'
88
96
  }), cM('checked', `
89
- transform: scale(1);
90
97
  opacity: 1;
91
98
  `)]), cE('label', {
92
99
  color: 'var(--n-text-color-disabled)'
@@ -5,8 +5,8 @@ const radioDark = {
5
5
  name: 'Radio',
6
6
  common: commonDark,
7
7
  self(vars) {
8
- const { borderColor, primaryColor, baseColor, textColorDisabled, inputColorDisabled, textColor2, opacityDisabled, borderRadius, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightSmall, heightMedium, heightLarge } = vars;
9
- return Object.assign(Object.assign({}, commonVariables), { buttonHeightSmall: heightSmall, buttonHeightMedium: heightMedium, buttonHeightLarge: heightLarge, fontSizeSmall,
8
+ const { borderColor, primaryColor, baseColor, textColorDisabled, inputColorDisabled, textColor2, opacityDisabled, borderRadius, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightSmall, heightMedium, heightLarge, lineHeight } = vars;
9
+ return Object.assign(Object.assign({}, commonVariables), { labelLineHeight: lineHeight, buttonHeightSmall: heightSmall, buttonHeightMedium: heightMedium, buttonHeightLarge: heightLarge, fontSizeSmall,
10
10
  fontSizeMedium,
11
11
  fontSizeLarge, boxShadow: `inset 0 0 0 1px ${borderColor}`, boxShadowActive: `inset 0 0 0 1px ${primaryColor}`, boxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`, boxShadowHover: `inset 0 0 0 1px ${primaryColor}`, boxShadowDisabled: `inset 0 0 0 1px ${borderColor}`, color: '#0000', colorDisabled: inputColorDisabled, textColor: textColor2, textColorDisabled: textColorDisabled, dotColorActive: primaryColor, dotColorDisabled: borderColor, buttonBorderColor: borderColor, buttonBorderColorActive: primaryColor, buttonBorderColorHover: primaryColor, buttonColor: '#0000', buttonColorActive: primaryColor, buttonTextColor: textColor2, buttonTextColorActive: baseColor, buttonTextColorHover: primaryColor, opacityDisabled: opacityDisabled, buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`, buttonBoxShadowHover: `inset 0 0 0 1px ${primaryColor}`, buttonBoxShadow: 'inset 0 0 0 1px #0000', buttonBorderRadius: borderRadius });
12
12
  }
@@ -1,6 +1,7 @@
1
1
  import type { ThemeCommonVars } from '../../_styles/common';
2
2
  import { Theme } from '../../_mixins/use-theme';
3
3
  declare const self: (vars: ThemeCommonVars) => {
4
+ labelLineHeight: string;
4
5
  buttonHeightSmall: string;
5
6
  buttonHeightMedium: string;
6
7
  buttonHeightLarge: string;
@@ -2,8 +2,8 @@ import { changeColor } from 'seemly';
2
2
  import commonVariables from './_common';
3
3
  import { commonLight } from '../../_styles/common';
4
4
  const self = (vars) => {
5
- const { borderColor, primaryColor, baseColor, textColorDisabled, inputColorDisabled, textColor2, opacityDisabled, borderRadius, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightSmall, heightMedium, heightLarge } = vars;
6
- return Object.assign(Object.assign({}, commonVariables), { buttonHeightSmall: heightSmall, buttonHeightMedium: heightMedium, buttonHeightLarge: heightLarge, fontSizeSmall,
5
+ const { borderColor, primaryColor, baseColor, textColorDisabled, inputColorDisabled, textColor2, opacityDisabled, borderRadius, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightSmall, heightMedium, heightLarge, lineHeight } = vars;
6
+ return Object.assign(Object.assign({}, commonVariables), { labelLineHeight: lineHeight, buttonHeightSmall: heightSmall, buttonHeightMedium: heightMedium, buttonHeightLarge: heightLarge, fontSizeSmall,
7
7
  fontSizeMedium,
8
8
  fontSizeLarge, boxShadow: `inset 0 0 0 1px ${borderColor}`, boxShadowActive: `inset 0 0 0 1px ${primaryColor}`, boxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.2 })}`, boxShadowHover: `inset 0 0 0 1px ${primaryColor}`, boxShadowDisabled: `inset 0 0 0 1px ${borderColor}`, color: baseColor, colorDisabled: inputColorDisabled, textColor: textColor2, textColorDisabled: textColorDisabled, dotColorActive: primaryColor, dotColorDisabled: borderColor, buttonBorderColor: borderColor, buttonBorderColorActive: primaryColor, buttonBorderColorHover: borderColor, buttonColor: baseColor, buttonColorActive: baseColor, buttonTextColor: textColor2, buttonTextColorActive: primaryColor, buttonTextColorHover: primaryColor, opacityDisabled: opacityDisabled, buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`, buttonBoxShadowHover: 'inset 0 0 0 1px #0000', buttonBoxShadow: 'inset 0 0 0 1px #0000', buttonBorderRadius: borderRadius });
9
9
  };
@@ -47,6 +47,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
47
47
  }, any>>>;
48
48
  }, {
49
49
  scrollbarInstRef: import("vue").Ref<{
50
+ $el: HTMLElement;
50
51
  containerRef: HTMLElement | null;
51
52
  contentRef: HTMLElement | null;
52
53
  containerScrollTop: number;
@@ -1292,7 +1292,9 @@ declare const _default: import("vue").DefineComponent<{
1292
1292
  }>;
1293
1293
  cssVars: import("vue").ComputedRef<{
1294
1294
  '--n-menu-box-shadow': string;
1295
- }>;
1295
+ }> | undefined;
1296
+ themeClass: import("vue").Ref<string> | undefined;
1297
+ onRender: (() => void) | undefined;
1296
1298
  focus: () => void;
1297
1299
  blur: () => void;
1298
1300
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -4,7 +4,7 @@ import { createTreeMate } from 'treemate';
4
4
  import { VBinder, VFollower, VTarget } from 'vueuc';
5
5
  import { useIsMounted, useMergedState, useCompitable } from 'vooks';
6
6
  import { clickoutside } from 'vdirs';
7
- import { useTheme, useConfig, useLocale, useFormItem } from '../../_mixins';
7
+ import { useTheme, useConfig, useLocale, useFormItem, useThemeClass } from '../../_mixins';
8
8
  import { call, useAdjustedTo, warnOnce } from '../../_utils';
9
9
  import { NInternalSelectMenu, NInternalSelection } from '../../_internal';
10
10
  import { selectLight } from '../styles';
@@ -567,6 +567,15 @@ export default defineComponent({
567
567
  (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.blur();
568
568
  }
569
569
  };
570
+ const cssVarsRef = computed(() => {
571
+ const { self: { menuBoxShadow } } = themeRef.value;
572
+ return {
573
+ '--n-menu-box-shadow': menuBoxShadow
574
+ };
575
+ });
576
+ const themeClassHandle = inlineThemeDisabled
577
+ ? useThemeClass('select', undefined, cssVarsRef, props)
578
+ : undefined;
570
579
  return Object.assign(Object.assign({}, exposedMethods), { mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, treeMate: treeMateRef, isMounted: useIsMounted(), triggerRef,
571
580
  menuRef, pattern: patternRef, uncontrolledShow: uncontrolledShowRef, mergedShow: mergedShowRef, adjustedTo: useAdjustedTo(props), uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, followerRef, localizedPlaceholder: localizedPlaceholderRef, selectedOption: selectedOptionRef, selectedOptions: selectedOptionsRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, focused: focusedRef, activeWithoutMenuOpen: activeWithoutMenuOpenRef, inlineThemeDisabled,
572
581
  onTriggerInputFocus,
@@ -582,12 +591,7 @@ export default defineComponent({
582
591
  syncPosition,
583
592
  handleMenuAfterLeave,
584
593
  handleMenuClickOutside,
585
- handleMenuScroll, handleMenuKeydown: handleKeydown, handleMenuMousedown, mergedTheme: themeRef, cssVars: computed(() => {
586
- const { self: { menuBoxShadow } } = themeRef.value;
587
- return {
588
- '--n-menu-box-shadow': menuBoxShadow
589
- };
590
- }) });
594
+ handleMenuScroll, handleMenuKeydown: handleKeydown, handleMenuMousedown, mergedTheme: themeRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
591
595
  },
592
596
  render() {
593
597
  return (h("div", { class: `${this.mergedClsPrefix}-select` },
@@ -601,22 +605,26 @@ export default defineComponent({
601
605
  h(VFollower, { ref: "followerRef", show: this.mergedShow, to: this.adjustedTo, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, containerClass: this.namespace, width: this.consistentMenuWidth ? 'target' : undefined, minWidth: "target", placement: this.placement }, {
602
606
  default: () => (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted, onAfterLeave: this.handleMenuAfterLeave }, {
603
607
  default: () => {
604
- var _a, _b;
605
- return (this.mergedShow ||
606
- this.displayDirective === 'show') &&
607
- withDirectives(h(NInternalSelectMenu, Object.assign({}, this.menuProps, { ref: "menuRef", inlineThemeDisabled: this.inlineThemeDisabled, virtualScroll: this.consistentMenuWidth && this.virtualScroll, class: [
608
- `${this.mergedClsPrefix}-select-menu`,
609
- (_a = this.menuProps) === null || _a === void 0 ? void 0 : _a.class
610
- ], clsPrefix: this.mergedClsPrefix, focusable: true, autoPending: true, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
611
- .InternalSelectMenu, treeMate: this.treeMate, multiple: this.multiple, size: 'medium', renderOption: this.renderOption, renderLabel: this.renderLabel, value: this.mergedValue, style: [(_b = this.menuProps) === null || _b === void 0 ? void 0 : _b.style, this.cssVars], onToggle: this.handleToggle, onScroll: this.handleMenuScroll, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeydown: this.handleMenuKeydown, onTabOut: this.handleMenuTabOut, onMousedown: this.handleMenuMousedown, show: this.mergedShow, resetMenuOnOptionsChange: this.resetMenuOnOptionsChange }), {
612
- empty: () => { var _a, _b; return [(_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)]; },
613
- action: () => { var _a, _b; return [(_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)]; }
614
- }), this.displayDirective === 'show'
615
- ? [
616
- [vShow, this.mergedShow],
617
- [clickoutside, this.handleMenuClickOutside]
618
- ]
619
- : [[clickoutside, this.handleMenuClickOutside]]);
608
+ var _a, _b, _c;
609
+ if (!(this.mergedShow ||
610
+ this.displayDirective === 'show')) {
611
+ return null;
612
+ }
613
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
614
+ return withDirectives(h(NInternalSelectMenu, Object.assign({}, this.menuProps, { ref: "menuRef", inlineThemeDisabled: this.inlineThemeDisabled, virtualScroll: this.consistentMenuWidth && this.virtualScroll, class: [
615
+ `${this.mergedClsPrefix}-select-menu`,
616
+ this.themeClass,
617
+ (_b = this.menuProps) === null || _b === void 0 ? void 0 : _b.class
618
+ ], clsPrefix: this.mergedClsPrefix, focusable: true, autoPending: true, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
619
+ .InternalSelectMenu, treeMate: this.treeMate, multiple: this.multiple, size: 'medium', renderOption: this.renderOption, renderLabel: this.renderLabel, value: this.mergedValue, style: [(_c = this.menuProps) === null || _c === void 0 ? void 0 : _c.style, this.cssVars], onToggle: this.handleToggle, onScroll: this.handleMenuScroll, onFocus: this.handleMenuFocus, onBlur: this.handleMenuBlur, onKeydown: this.handleMenuKeydown, onTabOut: this.handleMenuTabOut, onMousedown: this.handleMenuMousedown, show: this.mergedShow, resetMenuOnOptionsChange: this.resetMenuOnOptionsChange }), {
620
+ empty: () => { var _a, _b; return [(_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)]; },
621
+ action: () => { var _a, _b; return [(_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)]; }
622
+ }), this.displayDirective === 'show'
623
+ ? [
624
+ [vShow, this.mergedShow],
625
+ [clickoutside, this.handleMenuClickOutside]
626
+ ]
627
+ : [[clickoutside, this.handleMenuClickOutside]]);
620
628
  }
621
629
  }))
622
630
  })
@@ -311,7 +311,9 @@ declare const _default: import("vue").DefineComponent<{
311
311
  '--n-indicator-box-shadow': string;
312
312
  '--n-indicator-color': string;
313
313
  '--n-indicator-text-color': string;
314
- }>;
314
+ }> | undefined;
315
+ indicatorThemeClass: import("vue").Ref<string> | undefined;
316
+ indicatorOnRender: (() => void) | undefined;
315
317
  cssVars: import("vue").ComputedRef<{
316
318
  '--n-bezier': string;
317
319
  '--n-dot-border': string;
@@ -337,7 +339,9 @@ declare const _default: import("vue").DefineComponent<{
337
339
  '--n-rail-color-hover': string;
338
340
  '--n-rail-height': string;
339
341
  '--n-rail-width-vertical': string;
340
- }>;
342
+ }> | undefined;
343
+ themeClass: import("vue").Ref<string> | undefined;
344
+ onRender: (() => void) | undefined;
341
345
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
342
346
  readonly to: {
343
347
  type: PropType<string | boolean | HTMLElement>;
@@ -2,7 +2,7 @@ import { h, ref, toRef, computed, watch, nextTick, defineComponent, Transition }
2
2
  import { VBinder, VTarget, VFollower } from 'vueuc';
3
3
  import { useIsMounted, useMergedState } from 'vooks';
4
4
  import { on, off } from 'evtd';
5
- import { useTheme, useFormItem, useConfig } from '../../_mixins';
5
+ import { useTheme, useFormItem, useConfig, useThemeClass } from '../../_mixins';
6
6
  import { call, useAdjustedTo } from '../../_utils';
7
7
  import { sliderLight } from '../styles';
8
8
  import { isTouchEvent, useRefs } from './utils';
@@ -35,7 +35,7 @@ export default defineComponent({
35
35
  name: 'Slider',
36
36
  props: sliderProps,
37
37
  setup(props) {
38
- const { mergedClsPrefixRef, namespaceRef } = useConfig(props);
38
+ const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
39
39
  const themeRef = useTheme('Slider', '-slider', style, sliderLight, props, mergedClsPrefixRef);
40
40
  // dom ref
41
41
  const handleRailRef = ref(null);
@@ -417,6 +417,51 @@ export default defineComponent({
417
417
  }
418
418
  void nextTick(syncPosition);
419
419
  });
420
+ const cssVarsRef = computed(() => {
421
+ const { self: { railColor, railColorHover, fillColor, fillColorHover, handleColor, opacityDisabled, dotColor, dotColorModal, handleBoxShadow, handleBoxShadowHover, handleBoxShadowActive, handleBoxShadowFocus, dotBorder, dotBoxShadow, railHeight, railWidthVertical, handleSize, dotHeight, dotWidth, dotBorderRadius, fontSize, dotBorderActive, dotColorPopover }, common: { cubicBezierEaseInOut } } = themeRef.value;
422
+ return {
423
+ '--n-bezier': cubicBezierEaseInOut,
424
+ '--n-dot-border': dotBorder,
425
+ '--n-dot-border-active': dotBorderActive,
426
+ '--n-dot-border-radius': dotBorderRadius,
427
+ '--n-dot-box-shadow': dotBoxShadow,
428
+ '--n-dot-color': dotColor,
429
+ '--n-dot-color-modal': dotColorModal,
430
+ '--n-dot-color-popover': dotColorPopover,
431
+ '--n-dot-height': dotHeight,
432
+ '--n-dot-width': dotWidth,
433
+ '--n-fill-color': fillColor,
434
+ '--n-fill-color-hover': fillColorHover,
435
+ '--n-font-size': fontSize,
436
+ '--n-handle-box-shadow': handleBoxShadow,
437
+ '--n-handle-box-shadow-active': handleBoxShadowActive,
438
+ '--n-handle-box-shadow-focus': handleBoxShadowFocus,
439
+ '--n-handle-box-shadow-hover': handleBoxShadowHover,
440
+ '--n-handle-color': handleColor,
441
+ '--n-handle-size': handleSize,
442
+ '--n-opacity-disabled': opacityDisabled,
443
+ '--n-rail-color': railColor,
444
+ '--n-rail-color-hover': railColorHover,
445
+ '--n-rail-height': railHeight,
446
+ '--n-rail-width-vertical': railWidthVertical
447
+ };
448
+ });
449
+ const themeClassHandle = inlineThemeDisabled
450
+ ? useThemeClass('slider', undefined, cssVarsRef, props)
451
+ : undefined;
452
+ const indicatorCssVarsRef = computed(() => {
453
+ const { self: { fontSize, indicatorColor, indicatorBoxShadow, indicatorTextColor, indicatorBorderRadius } } = themeRef.value;
454
+ return {
455
+ '--n-font-size': fontSize,
456
+ '--n-indicator-border-radius': indicatorBorderRadius,
457
+ '--n-indicator-box-shadow': indicatorBoxShadow,
458
+ '--n-indicator-color': indicatorColor,
459
+ '--n-indicator-text-color': indicatorTextColor
460
+ };
461
+ });
462
+ const indicatorThemeClassHandle = inlineThemeDisabled
463
+ ? useThemeClass('slider-indicator', undefined, indicatorCssVarsRef, props)
464
+ : undefined;
420
465
  return {
421
466
  mergedClsPrefix: mergedClsPrefixRef,
422
467
  namespace: namespaceRef,
@@ -444,51 +489,21 @@ export default defineComponent({
444
489
  handleHandleMouseEnter,
445
490
  handleHandleMouseLeave,
446
491
  handleRailKeyDown,
447
- indicatorCssVars: computed(() => {
448
- const { self: { fontSize, indicatorColor, indicatorBoxShadow, indicatorTextColor, indicatorBorderRadius } } = themeRef.value;
449
- return {
450
- '--n-font-size': fontSize,
451
- '--n-indicator-border-radius': indicatorBorderRadius,
452
- '--n-indicator-box-shadow': indicatorBoxShadow,
453
- '--n-indicator-color': indicatorColor,
454
- '--n-indicator-text-color': indicatorTextColor
455
- };
456
- }),
457
- cssVars: computed(() => {
458
- const { self: { railColor, railColorHover, fillColor, fillColorHover, handleColor, opacityDisabled, dotColor, dotColorModal, handleBoxShadow, handleBoxShadowHover, handleBoxShadowActive, handleBoxShadowFocus, dotBorder, dotBoxShadow, railHeight, railWidthVertical, handleSize, dotHeight, dotWidth, dotBorderRadius, fontSize, dotBorderActive, dotColorPopover }, common: { cubicBezierEaseInOut } } = themeRef.value;
459
- return {
460
- '--n-bezier': cubicBezierEaseInOut,
461
- '--n-dot-border': dotBorder,
462
- '--n-dot-border-active': dotBorderActive,
463
- '--n-dot-border-radius': dotBorderRadius,
464
- '--n-dot-box-shadow': dotBoxShadow,
465
- '--n-dot-color': dotColor,
466
- '--n-dot-color-modal': dotColorModal,
467
- '--n-dot-color-popover': dotColorPopover,
468
- '--n-dot-height': dotHeight,
469
- '--n-dot-width': dotWidth,
470
- '--n-fill-color': fillColor,
471
- '--n-fill-color-hover': fillColorHover,
472
- '--n-font-size': fontSize,
473
- '--n-handle-box-shadow': handleBoxShadow,
474
- '--n-handle-box-shadow-active': handleBoxShadowActive,
475
- '--n-handle-box-shadow-focus': handleBoxShadowFocus,
476
- '--n-handle-box-shadow-hover': handleBoxShadowHover,
477
- '--n-handle-color': handleColor,
478
- '--n-handle-size': handleSize,
479
- '--n-opacity-disabled': opacityDisabled,
480
- '--n-rail-color': railColor,
481
- '--n-rail-color-hover': railColorHover,
482
- '--n-rail-height': railHeight,
483
- '--n-rail-width-vertical': railWidthVertical
484
- };
485
- })
492
+ indicatorCssVars: inlineThemeDisabled ? undefined : indicatorCssVarsRef,
493
+ indicatorThemeClass: indicatorThemeClassHandle === null || indicatorThemeClassHandle === void 0 ? void 0 : indicatorThemeClassHandle.themeClass,
494
+ indicatorOnRender: indicatorThemeClassHandle === null || indicatorThemeClassHandle === void 0 ? void 0 : indicatorThemeClassHandle.onRender,
495
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
496
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
497
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
486
498
  };
487
499
  },
488
500
  render() {
489
- const { mergedClsPrefix, formatTooltip } = this;
501
+ var _a;
502
+ const { mergedClsPrefix, themeClass, formatTooltip } = this;
503
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
490
504
  return (h("div", { class: [
491
505
  `${mergedClsPrefix}-slider`,
506
+ themeClass,
492
507
  {
493
508
  [`${mergedClsPrefix}-slider--disabled`]: this.mergedDisabled,
494
509
  [`${mergedClsPrefix}-slider--active`]: this.activeIndex !== -1,
@@ -501,9 +516,8 @@ export default defineComponent({
501
516
  h("div", { class: `${mergedClsPrefix}-slider-rail__fill`, style: this.fillStyle }),
502
517
  this.marks ? (h("div", { class: [
503
518
  `${mergedClsPrefix}-slider-dots`,
504
- {
505
- [`${mergedClsPrefix}-slider-dots--transition-disabled`]: this.dotTransitionDisabled
506
- }
519
+ this.dotTransitionDisabled &&
520
+ `${mergedClsPrefix}-slider-dots--transition-disabled`
507
521
  ] }, this.markInfos.map((mark) => (h("div", { key: mark.label, class: [
508
522
  `${mergedClsPrefix}-slider-dot`,
509
523
  {
@@ -520,12 +534,21 @@ export default defineComponent({
520
534
  this.tooltip && (h(VFollower, { ref: this.setFollowerRefs(index), show: showTooltip, to: this.adjustedTo, enabled: (this.showTooltip && !this.range) ||
521
535
  this.followerEnabledIndexSet.has(index), teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, placement: this.mergedPlacement, containerClass: this.namespace }, {
522
536
  default: () => (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted, css: this.isSkipCSSDetection(index), onEnter: () => this.followerEnabledIndexSet.add(index), onAfterLeave: () => this.followerEnabledIndexSet.delete(index) }, {
523
- default: () => showTooltip ? (h("div", { class: [
524
- `${mergedClsPrefix}-slider-handle-indicator`,
525
- `${mergedClsPrefix}-slider-handle-indicator--${this.mergedPlacement}`
526
- ], style: this.indicatorCssVars }, typeof formatTooltip === 'function'
527
- ? formatTooltip(value)
528
- : value)) : null
537
+ default: () => {
538
+ var _a;
539
+ if (showTooltip) {
540
+ (_a = this.indicatorOnRender) === null || _a === void 0 ? void 0 : _a.call(this);
541
+ return (h("div", { class: [
542
+ `${mergedClsPrefix}-slider-handle-indicator`,
543
+ this.indicatorThemeClass,
544
+ `${mergedClsPrefix}-slider-handle-indicator--${this.mergedPlacement}`
545
+ ], style: this
546
+ .indicatorCssVars }, typeof formatTooltip === 'function'
547
+ ? formatTooltip(value)
548
+ : value));
549
+ }
550
+ return null;
551
+ }
529
552
  }))
530
553
  }))
531
554
  ]
@@ -38,7 +38,9 @@ declare const _default: import("vue").DefineComponent<{
38
38
  '--n-splitor-color': string;
39
39
  '--n-step-header-font-size': string;
40
40
  '--n-step-header-font-weight': string;
41
- }>;
41
+ }> | undefined;
42
+ themeClass: import("vue").Ref<string>;
43
+ onRender: () => void;
42
44
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
45
  readonly status: PropType<"wait" | "error" | "finish" | "process">;
44
46
  readonly title: StringConstructor;
@@ -3,6 +3,7 @@ import { CheckmarkIcon as FinishedIcon, CloseIcon as ErrorIcon } from '../../_in
3
3
  import { NIconSwitchTransition, NBaseIcon } from '../../_internal';
4
4
  import { createKey, throwError } from '../../_utils';
5
5
  import { stepsInjectionKey } from './Steps';
6
+ import { useConfig, useThemeClass } from '../../_mixins';
6
7
  const stepProps = {
7
8
  status: String,
8
9
  title: String,
@@ -20,6 +21,7 @@ export default defineComponent({
20
21
  const NSteps = inject(stepsInjectionKey, null);
21
22
  if (!NSteps)
22
23
  throwError('step', '`n-step` must be placed inside `n-steps`.');
24
+ const { inlineThemeDisabled } = useConfig();
23
25
  const { props: stepsProps, mergedThemeRef, mergedClsPrefixRef, stepsSlots } = NSteps;
24
26
  const verticalRef = computed(() => {
25
27
  return stepsProps.vertical;
@@ -46,37 +48,47 @@ export default defineComponent({
46
48
  }
47
49
  return 'process';
48
50
  });
51
+ const cssVarsRef = computed(() => {
52
+ const { value: status } = mergedStatusRef;
53
+ const { size } = stepsProps;
54
+ const { common: { cubicBezierEaseInOut }, self: { stepHeaderFontWeight, [createKey('stepHeaderFontSize', size)]: stepHeaderFontSize, [createKey('indicatorIndexFontSize', size)]: indicatorIndexFontSize, [createKey('indicatorSize', size)]: indicatorSize, [createKey('indicatorIconSize', size)]: indicatorIconSize, [createKey('indicatorTextColor', status)]: indicatorTextColor, [createKey('indicatorBorderColor', status)]: indicatorBorderColor, [createKey('headerTextColor', status)]: headerTextColor, [createKey('splitorColor', status)]: splitorColor, [createKey('indicatorColor', status)]: indicatorColor, [createKey('descriptionTextColor', status)]: descriptionTextColor } } = mergedThemeRef.value;
55
+ return {
56
+ '--n-bezier': cubicBezierEaseInOut,
57
+ '--n-description-text-color': descriptionTextColor,
58
+ '--n-header-text-color': headerTextColor,
59
+ '--n-indicator-border-color': indicatorBorderColor,
60
+ '--n-indicator-color': indicatorColor,
61
+ '--n-indicator-icon-size': indicatorIconSize,
62
+ '--n-indicator-index-font-size': indicatorIndexFontSize,
63
+ '--n-indicator-size': indicatorSize,
64
+ '--n-indicator-text-color': indicatorTextColor,
65
+ '--n-splitor-color': splitorColor,
66
+ '--n-step-header-font-size': stepHeaderFontSize,
67
+ '--n-step-header-font-weight': stepHeaderFontWeight
68
+ };
69
+ });
70
+ const themeClassHandle = useThemeClass('step', computed(() => {
71
+ const { value: status } = mergedStatusRef;
72
+ const { size } = stepsProps;
73
+ return `${status[0]}${size[0]}`;
74
+ }), cssVarsRef, stepsProps);
49
75
  return {
50
76
  stepsSlots,
51
77
  mergedClsPrefix: mergedClsPrefixRef,
52
78
  vertical: verticalRef,
53
79
  mergedStatus: mergedStatusRef,
54
- cssVars: computed(() => {
55
- const { value: status } = mergedStatusRef;
56
- const { size } = stepsProps;
57
- const { common: { cubicBezierEaseInOut }, self: { stepHeaderFontWeight, [createKey('stepHeaderFontSize', size)]: stepHeaderFontSize, [createKey('indicatorIndexFontSize', size)]: indicatorIndexFontSize, [createKey('indicatorSize', size)]: indicatorSize, [createKey('indicatorIconSize', size)]: indicatorIconSize, [createKey('indicatorTextColor', status)]: indicatorTextColor, [createKey('indicatorBorderColor', status)]: indicatorBorderColor, [createKey('headerTextColor', status)]: headerTextColor, [createKey('splitorColor', status)]: splitorColor, [createKey('indicatorColor', status)]: indicatorColor, [createKey('descriptionTextColor', status)]: descriptionTextColor } } = mergedThemeRef.value;
58
- return {
59
- '--n-bezier': cubicBezierEaseInOut,
60
- '--n-description-text-color': descriptionTextColor,
61
- '--n-header-text-color': headerTextColor,
62
- '--n-indicator-border-color': indicatorBorderColor,
63
- '--n-indicator-color': indicatorColor,
64
- '--n-indicator-icon-size': indicatorIconSize,
65
- '--n-indicator-index-font-size': indicatorIndexFontSize,
66
- '--n-indicator-size': indicatorSize,
67
- '--n-indicator-text-color': indicatorTextColor,
68
- '--n-splitor-color': splitorColor,
69
- '--n-step-header-font-size': stepHeaderFontSize,
70
- '--n-step-header-font-weight': stepHeaderFontWeight
71
- };
72
- })
80
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
81
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
82
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
73
83
  };
74
84
  },
75
85
  render() {
76
86
  const showDescription = this.description !== undefined || this.$slots.default;
77
- const { mergedClsPrefix } = this;
87
+ const { mergedClsPrefix, onRender } = this;
88
+ onRender === null || onRender === void 0 ? void 0 : onRender();
78
89
  return (h("div", { class: [
79
90
  `${mergedClsPrefix}-step`,
91
+ this.themeClass,
80
92
  showDescription && `${mergedClsPrefix}-step--show-description`
81
93
  ], style: this.cssVars },
82
94
  h("div", { class: `${mergedClsPrefix}-step-indicator` },
package/es/styles.d.ts CHANGED
@@ -9,9 +9,9 @@ export { breadcrumbDark } from './breadcrumb/styles';
9
9
  export { buttonDark, buttonRtl as unstableButtonRtl } from './button/styles';
10
10
  export { cardDark, cardRtl as unstableCardRtl } from './card/styles';
11
11
  export { cascaderDark } from './cascader/styles';
12
- export { checkboxDark } from './checkbox/styles';
12
+ export { checkboxDark, checkboxRtl as unstableCheckboxRtl } from './checkbox/styles';
13
13
  export { codeDark } from './code/styles';
14
- export { collapseDark } from './collapse/styles';
14
+ export { collapseDark, collapseRtl as unstableCollapseRtl } from './collapse/styles';
15
15
  export { dataTableDark } from './data-table/styles';
16
16
  export { datePickerDark } from './date-picker/styles';
17
17
  export { descriptionsDark } from './descriptions/styles';
@@ -26,8 +26,8 @@ export { emptyDark } from './empty/styles';
26
26
  export { formDark } from './form/styles';
27
27
  export { gradientTextDark } from './gradient-text/styles';
28
28
  export { iconDark } from './icon/styles';
29
- export { inputDark } from './input/styles';
30
- export { inputNumberDark } from './input-number/styles';
29
+ export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
30
+ export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
31
31
  export { layoutDark } from './layout/styles';
32
32
  export { listDark } from './list/styles';
33
33
  export { loadingBarDark } from './loading-bar/styles';
package/es/styles.js CHANGED
@@ -9,9 +9,9 @@ export { breadcrumbDark } from './breadcrumb/styles';
9
9
  export { buttonDark, buttonRtl as unstableButtonRtl } from './button/styles';
10
10
  export { cardDark, cardRtl as unstableCardRtl } from './card/styles';
11
11
  export { cascaderDark } from './cascader/styles';
12
- export { checkboxDark } from './checkbox/styles';
12
+ export { checkboxDark, checkboxRtl as unstableCheckboxRtl } from './checkbox/styles';
13
13
  export { codeDark } from './code/styles';
14
- export { collapseDark } from './collapse/styles';
14
+ export { collapseDark, collapseRtl as unstableCollapseRtl } from './collapse/styles';
15
15
  export { dataTableDark } from './data-table/styles';
16
16
  export { datePickerDark } from './date-picker/styles';
17
17
  export { descriptionsDark } from './descriptions/styles';
@@ -26,8 +26,8 @@ export { emptyDark } from './empty/styles';
26
26
  export { formDark } from './form/styles';
27
27
  export { gradientTextDark } from './gradient-text/styles';
28
28
  export { iconDark } from './icon/styles';
29
- export { inputDark } from './input/styles';
30
- export { inputNumberDark } from './input-number/styles';
29
+ export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
30
+ export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
31
31
  export { layoutDark } from './layout/styles';
32
32
  export { listDark } from './list/styles';
33
33
  export { loadingBarDark } from './loading-bar/styles';
@@ -94,6 +94,8 @@ export default cB('tabs', `
94
94
  `)]), cB('tabs-nav-scroll-content', `
95
95
  display: flex;
96
96
  position: relative;
97
+ min-width: 100%;
98
+ width: fit-content;
97
99
  `), cB('tabs-wrapper', `
98
100
  display: inline-flex;
99
101
  flex-wrap: nowrap;
@@ -181,7 +181,7 @@ export default defineComponent({
181
181
  };
182
182
  },
183
183
  render() {
184
- var _a, _b;
184
+ var _a, _b, _c;
185
185
  const { mergedClsPrefix, mergedTheme } = this;
186
186
  return (h("div", { tabindex: 0, class: `${mergedClsPrefix}-time-picker-panel`, onFocusin: this.onFocusin, onFocusout: this.onFocusout, onKeydown: this.onKeydown },
187
187
  h("div", { class: `${mergedClsPrefix}-time-picker-cols` },
@@ -237,9 +237,9 @@ export default defineComponent({
237
237
  h("div", { class: `${mergedClsPrefix}-time-picker-col__padding` })
238
238
  ]
239
239
  }))) : null),
240
- h("div", { class: `${mergedClsPrefix}-time-picker-actions` },
241
- ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.includes('now')) ? (h(NButton, { size: "tiny", theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: this.onNowClick }, { default: () => this.nowText })) : null,
242
- ((_b = this.actions) === null || _b === void 0 ? void 0 : _b.includes('confirm')) ? (h(NButton, { size: "tiny", type: "primary", class: `${mergedClsPrefix}-time-picker-actions__confirm`, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, disabled: this.isValueInvalid, onClick: this.onConfirmClick }, { default: () => this.confirmText })) : null),
240
+ ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) ? (h("div", { class: `${mergedClsPrefix}-time-picker-actions` },
241
+ ((_b = this.actions) === null || _b === void 0 ? void 0 : _b.includes('now')) ? (h(NButton, { size: "tiny", theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: this.onNowClick }, { default: () => this.nowText })) : null,
242
+ ((_c = this.actions) === null || _c === void 0 ? void 0 : _c.includes('confirm')) ? (h(NButton, { size: "tiny", type: "primary", class: `${mergedClsPrefix}-time-picker-actions__confirm`, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, disabled: this.isValueInvalid, onClick: this.onConfirmClick }, { default: () => this.confirmText })) : null)) : null,
243
243
  h(NBaseFocusDetector, { onFocus: this.onFocusDetectorFocus })));
244
244
  }
245
245
  });