naive-ui 2.25.0 → 2.25.3

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 (567) hide show
  1. package/es/_internal/clear/src/Clear.d.ts +0 -1
  2. package/es/_internal/clear/src/Clear.js +1 -3
  3. package/es/_internal/icons/replaceable.d.ts +1 -1
  4. package/es/_internal/icons/replaceable.js +5 -4
  5. package/es/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
  6. package/es/_internal/scrollbar/src/ScrollBar.js +35 -16
  7. package/es/_internal/select-menu/src/SelectMenu.d.ts +22 -18
  8. package/es/_internal/select-menu/src/SelectMenu.js +13 -10
  9. package/es/_internal/selection/src/Selection.d.ts +31 -26
  10. package/es/_internal/selection/src/Selection.js +79 -68
  11. package/es/_internal/selection/styles/dark.js +3 -3
  12. package/es/_internal/selection/styles/light.d.ts +6 -6
  13. package/es/_internal/selection/styles/light.js +3 -3
  14. package/es/_mixins/index.d.ts +1 -1
  15. package/es/_mixins/index.js +1 -1
  16. package/es/_mixins/use-config.d.ts +6 -3
  17. package/es/_mixins/use-config.js +5 -1
  18. package/es/_mixins/use-css-vars-class.d.ts +6 -2
  19. package/es/_mixins/use-css-vars-class.js +31 -15
  20. package/es/_mixins/use-form-item.d.ts +1 -1
  21. package/es/_utils/css/color-to-class.d.ts +1 -0
  22. package/es/_utils/css/color-to-class.js +3 -0
  23. package/es/_utils/css/format-length.d.ts +2 -2
  24. package/es/_utils/css/format-length.js +1 -2
  25. package/es/_utils/css/index.d.ts +2 -1
  26. package/es/_utils/css/index.js +2 -1
  27. package/es/_utils/index.d.ts +1 -1
  28. package/es/_utils/index.js +1 -1
  29. package/es/_utils/vue/resolve-slot.d.ts +5 -2
  30. package/es/_utils/vue/resolve-slot.js +4 -4
  31. package/es/alert/src/Alert.d.ts +7 -5
  32. package/es/alert/src/Alert.js +36 -21
  33. package/es/anchor/src/AnchorAdapter.js +9 -3
  34. package/es/auto-complete/src/AutoComplete.d.ts +4 -2
  35. package/es/auto-complete/src/AutoComplete.js +28 -15
  36. package/es/avatar/src/Avatar.d.ts +3 -1
  37. package/es/avatar/src/Avatar.js +70 -35
  38. package/es/back-top/src/BackTop.d.ts +12 -49
  39. package/es/back-top/src/BackTop.js +60 -58
  40. package/es/badge/src/Badge.d.ts +16 -41
  41. package/es/badge/src/Badge.js +41 -31
  42. package/es/breadcrumb/src/Breadcrumb.d.ts +3 -1
  43. package/es/breadcrumb/src/Breadcrumb.js +24 -16
  44. package/es/button/src/Button.d.ts +8 -6
  45. package/es/button/src/Button.js +20 -21
  46. package/es/button/styles/index.d.ts +1 -1
  47. package/es/button/styles/index.js +1 -1
  48. package/es/button/styles/rtl.d.ts +2 -5
  49. package/es/button/styles/rtl.js +1 -1
  50. package/es/calendar/src/Calendar.d.ts +3 -1
  51. package/es/calendar/src/Calendar.js +37 -30
  52. package/es/card/src/Card.d.ts +3 -1
  53. package/es/card/src/Card.js +57 -43
  54. package/es/card/styles/index.d.ts +1 -1
  55. package/es/card/styles/index.js +1 -1
  56. package/es/card/styles/rtl.d.ts +2 -5
  57. package/es/card/styles/rtl.js +1 -1
  58. package/es/carousel/src/Carousel.d.ts +3 -1
  59. package/es/carousel/src/Carousel.js +29 -20
  60. package/es/cascader/src/Cascader.d.ts +46 -31
  61. package/es/cascader/src/Cascader.js +53 -31
  62. package/es/cascader/src/CascaderMenu.d.ts +3 -3
  63. package/es/cascader/src/CascaderMenu.js +7 -6
  64. package/es/cascader/src/CascaderOption.d.ts +3 -3
  65. package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
  66. package/es/cascader/src/CascaderSelectMenu.js +2 -1
  67. package/es/cascader/src/CascaderSubmenu.d.ts +4 -3
  68. package/es/cascader/src/interface.d.ts +1 -0
  69. package/es/cascader/styles/light.d.ts +3 -3
  70. package/es/checkbox/src/Checkbox.d.ts +6 -4
  71. package/es/checkbox/src/Checkbox.js +41 -32
  72. package/es/checkbox/src/styles/index.cssr.js +17 -17
  73. package/es/code/src/Code.d.ts +3 -1
  74. package/es/code/src/Code.js +33 -27
  75. package/es/collapse/src/Collapse.d.ts +3 -1
  76. package/es/collapse/src/Collapse.js +24 -16
  77. package/es/color-picker/src/ColorPicker.d.ts +3 -1
  78. package/es/color-picker/src/ColorPicker.js +20 -7
  79. package/es/components.d.ts +1 -0
  80. package/es/components.js +1 -0
  81. package/es/config-provider/src/ConfigProvider.d.ts +4 -4
  82. package/es/config-provider/src/ConfigProvider.js +3 -3
  83. package/es/config-provider/src/internal-interface.d.ts +3 -1
  84. package/es/countdown/src/Countdown.d.ts +0 -3
  85. package/es/countdown/src/Countdown.js +0 -1
  86. package/es/data-table/src/DataTable.d.ts +77 -75
  87. package/es/data-table/src/DataTable.js +54 -48
  88. package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
  89. package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
  90. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
  91. package/es/data-table/src/HeaderButton/SortButton.js +3 -2
  92. package/es/data-table/src/TableParts/Body.d.ts +7 -6
  93. package/es/data-table/src/TableParts/Body.js +4 -2
  94. package/es/data-table/src/TableParts/Cell.d.ts +12 -12
  95. package/es/data-table/src/TableParts/Header.d.ts +6 -6
  96. package/es/data-table/src/interface.d.ts +1 -1
  97. package/es/data-table/src/use-table-data.js +19 -7
  98. package/es/data-table/styles/light.d.ts +3 -3
  99. package/es/date-picker/src/DatePicker.d.ts +1 -0
  100. package/es/date-picker/src/DatePicker.js +2 -2
  101. package/es/date-picker/src/panel/date.d.ts +2 -0
  102. package/es/date-picker/src/panel/datetime.d.ts +2 -0
  103. package/es/date-picker/src/panel/month.d.ts +2 -0
  104. package/es/date-picker/src/panel/panelHeader.d.ts +4 -0
  105. package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
  106. package/es/descriptions/src/Descriptions.d.ts +15 -2
  107. package/es/descriptions/src/Descriptions.js +45 -28
  108. package/es/descriptions/src/styles/index.cssr.js +2 -1
  109. package/es/descriptions/styles/light.d.ts +1 -0
  110. package/es/descriptions/styles/light.js +2 -2
  111. package/es/dialog/src/Dialog.d.ts +7 -5
  112. package/es/dialog/src/Dialog.js +57 -56
  113. package/es/dialog/src/DialogEnvironment.d.ts +5 -5
  114. package/es/dialog/src/DialogEnvironment.js +1 -1
  115. package/es/dialog/src/DialogProvider.d.ts +2 -2
  116. package/es/dialog/src/dialogProps.d.ts +2 -2
  117. package/es/divider/src/Divider.d.ts +3 -1
  118. package/es/divider/src/Divider.js +20 -11
  119. package/es/dynamic-input/src/DynamicInput.js +2 -2
  120. package/es/dynamic-tags/src/DynamicTags.d.ts +7 -5
  121. package/es/dynamic-tags/src/DynamicTags.js +17 -10
  122. package/es/element/src/Element.d.ts +3 -1
  123. package/es/element/src/Element.js +18 -11
  124. package/es/empty/src/Empty.d.ts +3 -1
  125. package/es/empty/src/Empty.js +28 -16
  126. package/es/form/src/FormItem.d.ts +4 -4
  127. package/es/form/src/FormItem.js +1 -2
  128. package/es/form/src/FormItemCol.d.ts +3 -3
  129. package/es/form/src/FormItemGridItem.d.ts +5 -5
  130. package/es/form/src/FormItemRow.d.ts +3 -3
  131. package/es/form/src/utils.d.ts +1 -1
  132. package/es/gradient-text/src/GradientText.d.ts +5 -5
  133. package/es/grid/src/Grid.js +2 -2
  134. package/es/icon-wrapper/src/IconWrapper.js +6 -6
  135. package/es/image/src/Image.d.ts +1 -1
  136. package/es/input/src/Input.d.ts +7 -4
  137. package/es/input/src/Input.js +96 -84
  138. package/es/input/src/styles/input.cssr.js +2 -2
  139. package/es/input-number/src/InputNumber.d.ts +7 -18
  140. package/es/input-number/src/InputNumber.js +79 -20
  141. package/es/layout/src/Layout.d.ts +8 -2
  142. package/es/layout/src/Layout.js +17 -10
  143. package/es/layout/src/LayoutContent.d.ts +4 -1
  144. package/es/layout/src/LayoutFooter.d.ts +3 -1
  145. package/es/layout/src/LayoutFooter.js +28 -19
  146. package/es/layout/src/LayoutHeader.d.ts +3 -1
  147. package/es/layout/src/LayoutHeader.js +28 -19
  148. package/es/layout/src/LayoutSider.d.ts +4 -0
  149. package/es/layout/src/LayoutSider.js +37 -29
  150. package/es/locales/common/deDE.js +13 -15
  151. package/es/locales/common/enGB.d.ts +109 -0
  152. package/es/locales/common/enGB.js +109 -0
  153. package/es/locales/common/eo.d.ts +109 -0
  154. package/es/locales/common/eo.js +109 -0
  155. package/es/locales/common/esAR.js +2 -2
  156. package/es/locales/common/frFR.js +8 -9
  157. package/es/locales/common/plPL.d.ts +3 -0
  158. package/es/locales/common/plPL.js +109 -0
  159. package/es/locales/common/skSK.d.ts +3 -0
  160. package/es/locales/common/skSK.js +110 -0
  161. package/es/locales/date/enGB.d.ts +3 -0
  162. package/es/locales/date/enGB.js +6 -0
  163. package/es/locales/date/eo.d.ts +3 -0
  164. package/es/locales/date/eo.js +6 -0
  165. package/es/locales/date/plPL.d.ts +3 -0
  166. package/es/locales/date/plPL.js +6 -0
  167. package/es/locales/date/skSK.d.ts +3 -0
  168. package/es/locales/date/skSK.js +6 -0
  169. package/es/locales/index.d.ts +8 -0
  170. package/es/locales/index.js +8 -0
  171. package/es/log/src/Log.d.ts +4 -1
  172. package/es/log/src/Log.js +20 -15
  173. package/es/mention/index.d.ts +1 -1
  174. package/es/mention/src/Mention.d.ts +1 -1
  175. package/es/mention/src/interface.d.ts +4 -0
  176. package/es/menu/src/Menu.d.ts +4 -2
  177. package/es/menu/src/Menu.js +68 -63
  178. package/es/modal/src/BodyWrapper.d.ts +7 -6
  179. package/es/modal/src/Modal.d.ts +19 -22
  180. package/es/modal/src/Modal.js +41 -32
  181. package/es/modal/src/presetProps.d.ts +2 -2
  182. package/es/notification/src/Notification.d.ts +4 -4
  183. package/es/notification/src/NotificationEnvironment.d.ts +4 -4
  184. package/es/notification/src/NotificationProvider.d.ts +1 -1
  185. package/es/notification/src/styles/index.cssr.js +6 -5
  186. package/es/page-header/src/PageHeader.d.ts +3 -1
  187. package/es/page-header/src/PageHeader.js +27 -18
  188. package/es/pagination/src/Pagination.d.ts +46 -34
  189. package/es/pagination/src/Pagination.js +59 -52
  190. package/es/pagination/styles/light.d.ts +3 -3
  191. package/es/popover/src/PopoverBody.js +10 -4
  192. package/es/progress/src/Circle.d.ts +19 -3
  193. package/es/progress/src/Circle.js +41 -22
  194. package/es/progress/src/Progress.d.ts +14 -5
  195. package/es/progress/src/Progress.js +45 -25
  196. package/es/progress/src/styles/index.cssr.js +1 -1
  197. package/es/radio/src/Radio.d.ts +3 -1
  198. package/es/radio/src/Radio.js +32 -23
  199. package/es/radio/src/RadioGroup.d.ts +3 -1
  200. package/es/radio/src/RadioGroup.js +31 -22
  201. package/es/rate/src/Rate.d.ts +3 -1
  202. package/es/rate/src/Rate.js +44 -23
  203. package/es/result/src/Result.d.ts +8 -6
  204. package/es/result/src/Result.js +36 -19
  205. package/es/scrollbar/src/ScrollBar.d.ts +12 -1
  206. package/es/scrollbar/src/ScrollBar.js +4 -0
  207. package/es/select/src/Select.d.ts +45 -31
  208. package/es/select/src/Select.js +14 -8
  209. package/es/select/styles/light.d.ts +3 -3
  210. package/es/spin/src/Spin.d.ts +3 -1
  211. package/es/spin/src/Spin.js +31 -21
  212. package/es/statistic/src/Statistic.d.ts +3 -1
  213. package/es/statistic/src/Statistic.js +29 -21
  214. package/es/styles.d.ts +1 -0
  215. package/es/styles.js +1 -0
  216. package/es/switch/src/Switch.d.ts +13 -1
  217. package/es/switch/src/Switch.js +85 -60
  218. package/es/switch/src/styles/index.cssr.js +21 -8
  219. package/es/switch/styles/dark.js +2 -2
  220. package/es/switch/styles/light.d.ts +1 -0
  221. package/es/switch/styles/light.js +2 -2
  222. package/es/table/src/Table.d.ts +3 -1
  223. package/es/table/src/Table.js +40 -29
  224. package/es/table/src/styles/index.cssr.js +1 -1
  225. package/es/tabs/src/Tabs.d.ts +25 -23
  226. package/es/tabs/src/Tabs.js +50 -44
  227. package/es/tabs/src/styles/index.cssr.js +77 -77
  228. package/es/tag/src/Tag.d.ts +7 -5
  229. package/es/tag/src/Tag.js +59 -42
  230. package/es/tag/src/common-props.d.ts +1 -1
  231. package/es/tag/src/styles/index.cssr.js +1 -1
  232. package/es/tag/styles/index.d.ts +1 -1
  233. package/es/tag/styles/index.js +1 -1
  234. package/es/tag/styles/rtl.d.ts +2 -5
  235. package/es/tag/styles/rtl.js +1 -1
  236. package/es/theme-editor/src/ThemeEditor.js +4 -3
  237. package/es/themes/dark.js +3 -1
  238. package/es/themes/light.js +3 -1
  239. package/es/thing/src/Thing.js +10 -3
  240. package/es/time-picker/src/TimePicker.d.ts +4 -0
  241. package/es/timeline/src/TimelineItem.d.ts +4 -4
  242. package/es/transfer/src/TransferList.d.ts +1 -0
  243. package/es/tree/src/Tree.d.ts +1 -0
  244. package/es/tree/src/Tree.js +8 -4
  245. package/es/tree/src/utils.js +1 -1
  246. package/es/tree-select/src/TreeSelect.d.ts +43 -30
  247. package/es/tree-select/src/TreeSelect.js +6 -2
  248. package/es/tree-select/styles/light.d.ts +3 -3
  249. package/es/typography/src/a.d.ts +3 -1
  250. package/es/typography/src/a.js +18 -10
  251. package/es/typography/src/blockquote.d.ts +3 -1
  252. package/es/typography/src/blockquote.js +21 -12
  253. package/es/typography/src/create-header.d.ts +7 -5
  254. package/es/typography/src/create-header.js +25 -16
  255. package/es/typography/src/headers.d.ts +36 -24
  256. package/es/typography/src/hr.d.ts +3 -1
  257. package/es/typography/src/hr.js +18 -10
  258. package/es/typography/src/ol.d.ts +3 -1
  259. package/es/typography/src/ol.js +23 -14
  260. package/es/typography/src/p.d.ts +3 -1
  261. package/es/typography/src/p.js +23 -15
  262. package/es/typography/src/text.d.ts +3 -1
  263. package/es/typography/src/text.js +31 -23
  264. package/es/typography/src/ul.d.ts +3 -1
  265. package/es/typography/src/ul.js +23 -14
  266. package/es/upload/src/UploadFile.d.ts +1 -1
  267. package/es/upload/src/UploadProgress.d.ts +2 -2
  268. package/es/upload/src/interface.d.ts +1 -1
  269. package/es/version.d.ts +1 -1
  270. package/es/version.js +1 -1
  271. package/es/watermark/index.d.ts +2 -0
  272. package/es/watermark/index.js +1 -0
  273. package/es/watermark/src/Watermark.d.ts +285 -0
  274. package/es/watermark/src/Watermark.js +159 -0
  275. package/es/watermark/src/styles/index.cssr.d.ts +2 -0
  276. package/es/watermark/src/styles/index.cssr.js +14 -0
  277. package/es/watermark/styles/dark.d.ts +3 -0
  278. package/es/watermark/styles/dark.js +12 -0
  279. package/es/watermark/styles/index.d.ts +3 -0
  280. package/es/watermark/styles/index.js +2 -0
  281. package/es/watermark/styles/light.d.ts +5 -0
  282. package/es/watermark/styles/light.js +13 -0
  283. package/lib/_internal/clear/src/Clear.d.ts +0 -1
  284. package/lib/_internal/clear/src/Clear.js +0 -2
  285. package/lib/_internal/icons/replaceable.d.ts +1 -1
  286. package/lib/_internal/icons/replaceable.js +4 -3
  287. package/lib/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
  288. package/lib/_internal/scrollbar/src/ScrollBar.js +34 -15
  289. package/lib/_internal/select-menu/src/SelectMenu.d.ts +22 -18
  290. package/lib/_internal/select-menu/src/SelectMenu.js +12 -9
  291. package/lib/_internal/selection/src/Selection.d.ts +31 -26
  292. package/lib/_internal/selection/src/Selection.js +78 -67
  293. package/lib/_internal/selection/styles/dark.js +3 -3
  294. package/lib/_internal/selection/styles/light.d.ts +6 -6
  295. package/lib/_internal/selection/styles/light.js +3 -3
  296. package/lib/_mixins/index.d.ts +1 -1
  297. package/lib/_mixins/index.js +2 -2
  298. package/lib/_mixins/use-config.d.ts +6 -3
  299. package/lib/_mixins/use-config.js +5 -1
  300. package/lib/_mixins/use-css-vars-class.d.ts +6 -2
  301. package/lib/_mixins/use-css-vars-class.js +33 -17
  302. package/lib/_mixins/use-form-item.d.ts +1 -1
  303. package/lib/_utils/css/color-to-class.d.ts +1 -0
  304. package/lib/_utils/css/color-to-class.js +7 -0
  305. package/lib/_utils/css/format-length.d.ts +2 -2
  306. package/lib/_utils/css/format-length.js +2 -1
  307. package/lib/_utils/css/index.d.ts +2 -1
  308. package/lib/_utils/css/index.js +4 -5
  309. package/lib/_utils/index.d.ts +1 -1
  310. package/lib/_utils/index.js +2 -1
  311. package/lib/_utils/vue/resolve-slot.d.ts +5 -2
  312. package/lib/_utils/vue/resolve-slot.js +4 -4
  313. package/lib/alert/src/Alert.d.ts +7 -5
  314. package/lib/alert/src/Alert.js +34 -19
  315. package/lib/anchor/src/AnchorAdapter.js +8 -2
  316. package/lib/auto-complete/src/AutoComplete.d.ts +4 -2
  317. package/lib/auto-complete/src/AutoComplete.js +27 -14
  318. package/lib/avatar/src/Avatar.d.ts +3 -1
  319. package/lib/avatar/src/Avatar.js +68 -33
  320. package/lib/back-top/src/BackTop.d.ts +12 -49
  321. package/lib/back-top/src/BackTop.js +57 -55
  322. package/lib/badge/src/Badge.d.ts +16 -41
  323. package/lib/badge/src/Badge.js +39 -29
  324. package/lib/breadcrumb/src/Breadcrumb.d.ts +3 -1
  325. package/lib/breadcrumb/src/Breadcrumb.js +23 -15
  326. package/lib/button/src/Button.d.ts +8 -6
  327. package/lib/button/src/Button.js +18 -19
  328. package/lib/button/styles/index.d.ts +1 -1
  329. package/lib/button/styles/index.js +1 -1
  330. package/lib/button/styles/rtl.d.ts +2 -5
  331. package/lib/button/styles/rtl.js +2 -1
  332. package/lib/calendar/src/Calendar.d.ts +3 -1
  333. package/lib/calendar/src/Calendar.js +36 -29
  334. package/lib/card/src/Card.d.ts +3 -1
  335. package/lib/card/src/Card.js +55 -41
  336. package/lib/card/styles/index.d.ts +1 -1
  337. package/lib/card/styles/index.js +1 -1
  338. package/lib/card/styles/rtl.d.ts +2 -5
  339. package/lib/card/styles/rtl.js +2 -1
  340. package/lib/carousel/src/Carousel.d.ts +3 -1
  341. package/lib/carousel/src/Carousel.js +27 -18
  342. package/lib/cascader/src/Cascader.d.ts +46 -31
  343. package/lib/cascader/src/Cascader.js +52 -30
  344. package/lib/cascader/src/CascaderMenu.d.ts +3 -3
  345. package/lib/cascader/src/CascaderMenu.js +7 -6
  346. package/lib/cascader/src/CascaderOption.d.ts +3 -3
  347. package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
  348. package/lib/cascader/src/CascaderSelectMenu.js +2 -1
  349. package/lib/cascader/src/CascaderSubmenu.d.ts +4 -3
  350. package/lib/cascader/src/interface.d.ts +1 -0
  351. package/lib/cascader/styles/light.d.ts +3 -3
  352. package/lib/checkbox/src/Checkbox.d.ts +6 -4
  353. package/lib/checkbox/src/Checkbox.js +40 -31
  354. package/lib/checkbox/src/styles/index.cssr.js +17 -17
  355. package/lib/code/src/Code.d.ts +3 -1
  356. package/lib/code/src/Code.js +32 -26
  357. package/lib/collapse/src/Collapse.d.ts +3 -1
  358. package/lib/collapse/src/Collapse.js +23 -15
  359. package/lib/color-picker/src/ColorPicker.d.ts +3 -1
  360. package/lib/color-picker/src/ColorPicker.js +19 -6
  361. package/lib/components.d.ts +1 -0
  362. package/lib/components.js +1 -0
  363. package/lib/config-provider/src/ConfigProvider.d.ts +4 -4
  364. package/lib/config-provider/src/ConfigProvider.js +3 -3
  365. package/lib/config-provider/src/internal-interface.d.ts +3 -1
  366. package/lib/countdown/src/Countdown.d.ts +0 -3
  367. package/lib/countdown/src/Countdown.js +0 -1
  368. package/lib/data-table/src/DataTable.d.ts +77 -75
  369. package/lib/data-table/src/DataTable.js +53 -47
  370. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
  371. package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
  372. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
  373. package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
  374. package/lib/data-table/src/TableParts/Body.d.ts +7 -6
  375. package/lib/data-table/src/TableParts/Body.js +3 -1
  376. package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
  377. package/lib/data-table/src/TableParts/Header.d.ts +6 -6
  378. package/lib/data-table/src/interface.d.ts +1 -1
  379. package/lib/data-table/src/use-table-data.js +19 -7
  380. package/lib/data-table/styles/light.d.ts +3 -3
  381. package/lib/date-picker/src/DatePicker.d.ts +1 -0
  382. package/lib/date-picker/src/DatePicker.js +2 -2
  383. package/lib/date-picker/src/panel/date.d.ts +2 -0
  384. package/lib/date-picker/src/panel/datetime.d.ts +2 -0
  385. package/lib/date-picker/src/panel/month.d.ts +2 -0
  386. package/lib/date-picker/src/panel/panelHeader.d.ts +4 -0
  387. package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
  388. package/lib/descriptions/src/Descriptions.d.ts +15 -2
  389. package/lib/descriptions/src/Descriptions.js +44 -27
  390. package/lib/descriptions/src/styles/index.cssr.js +2 -1
  391. package/lib/descriptions/styles/light.d.ts +1 -0
  392. package/lib/descriptions/styles/light.js +2 -2
  393. package/lib/dialog/src/Dialog.d.ts +7 -5
  394. package/lib/dialog/src/Dialog.js +55 -54
  395. package/lib/dialog/src/DialogEnvironment.d.ts +5 -5
  396. package/lib/dialog/src/DialogEnvironment.js +1 -1
  397. package/lib/dialog/src/DialogProvider.d.ts +2 -2
  398. package/lib/dialog/src/dialogProps.d.ts +2 -2
  399. package/lib/divider/src/Divider.d.ts +3 -1
  400. package/lib/divider/src/Divider.js +19 -10
  401. package/lib/dynamic-input/src/DynamicInput.js +2 -2
  402. package/lib/dynamic-tags/src/DynamicTags.d.ts +7 -5
  403. package/lib/dynamic-tags/src/DynamicTags.js +16 -9
  404. package/lib/element/src/Element.d.ts +3 -1
  405. package/lib/element/src/Element.js +17 -10
  406. package/lib/empty/src/Empty.d.ts +3 -1
  407. package/lib/empty/src/Empty.js +27 -15
  408. package/lib/form/src/FormItem.d.ts +4 -4
  409. package/lib/form/src/FormItem.js +1 -2
  410. package/lib/form/src/FormItemCol.d.ts +3 -3
  411. package/lib/form/src/FormItemGridItem.d.ts +5 -5
  412. package/lib/form/src/FormItemRow.d.ts +3 -3
  413. package/lib/form/src/utils.d.ts +1 -1
  414. package/lib/gradient-text/src/GradientText.d.ts +5 -5
  415. package/lib/grid/src/Grid.js +2 -2
  416. package/lib/icon-wrapper/src/IconWrapper.js +5 -5
  417. package/lib/image/src/Image.d.ts +1 -1
  418. package/lib/input/src/Input.d.ts +7 -4
  419. package/lib/input/src/Input.js +95 -83
  420. package/lib/input/src/styles/input.cssr.js +2 -2
  421. package/lib/input-number/src/InputNumber.d.ts +7 -18
  422. package/lib/input-number/src/InputNumber.js +76 -17
  423. package/lib/layout/src/Layout.d.ts +8 -2
  424. package/lib/layout/src/Layout.js +16 -9
  425. package/lib/layout/src/LayoutContent.d.ts +4 -1
  426. package/lib/layout/src/LayoutFooter.d.ts +3 -1
  427. package/lib/layout/src/LayoutFooter.js +27 -18
  428. package/lib/layout/src/LayoutHeader.d.ts +3 -1
  429. package/lib/layout/src/LayoutHeader.js +27 -18
  430. package/lib/layout/src/LayoutSider.d.ts +4 -0
  431. package/lib/layout/src/LayoutSider.js +36 -28
  432. package/lib/locales/common/deDE.js +13 -15
  433. package/lib/locales/common/enGB.d.ts +109 -0
  434. package/lib/locales/common/enGB.js +111 -0
  435. package/lib/locales/common/eo.d.ts +109 -0
  436. package/lib/locales/common/eo.js +111 -0
  437. package/lib/locales/common/esAR.js +2 -2
  438. package/lib/locales/common/frFR.js +8 -9
  439. package/lib/locales/common/plPL.d.ts +3 -0
  440. package/lib/locales/common/plPL.js +111 -0
  441. package/lib/locales/common/skSK.d.ts +3 -0
  442. package/lib/locales/common/skSK.js +112 -0
  443. package/lib/locales/date/enGB.d.ts +3 -0
  444. package/lib/locales/date/enGB.js +11 -0
  445. package/lib/locales/date/eo.d.ts +3 -0
  446. package/lib/locales/date/eo.js +11 -0
  447. package/lib/locales/date/plPL.d.ts +3 -0
  448. package/lib/locales/date/plPL.js +11 -0
  449. package/lib/locales/date/skSK.d.ts +3 -0
  450. package/lib/locales/date/skSK.js +11 -0
  451. package/lib/locales/index.d.ts +8 -0
  452. package/lib/locales/index.js +17 -1
  453. package/lib/log/src/Log.d.ts +4 -1
  454. package/lib/log/src/Log.js +19 -14
  455. package/lib/mention/index.d.ts +1 -1
  456. package/lib/mention/src/Mention.d.ts +1 -1
  457. package/lib/mention/src/interface.d.ts +4 -0
  458. package/lib/menu/src/Menu.d.ts +4 -2
  459. package/lib/menu/src/Menu.js +67 -62
  460. package/lib/modal/src/BodyWrapper.d.ts +7 -6
  461. package/lib/modal/src/Modal.d.ts +19 -22
  462. package/lib/modal/src/Modal.js +40 -31
  463. package/lib/modal/src/presetProps.d.ts +2 -2
  464. package/lib/notification/src/Notification.d.ts +4 -4
  465. package/lib/notification/src/NotificationEnvironment.d.ts +4 -4
  466. package/lib/notification/src/NotificationProvider.d.ts +1 -1
  467. package/lib/notification/src/styles/index.cssr.js +6 -5
  468. package/lib/page-header/src/PageHeader.d.ts +3 -1
  469. package/lib/page-header/src/PageHeader.js +26 -17
  470. package/lib/pagination/src/Pagination.d.ts +46 -34
  471. package/lib/pagination/src/Pagination.js +58 -51
  472. package/lib/pagination/styles/light.d.ts +3 -3
  473. package/lib/popover/src/PopoverBody.js +9 -3
  474. package/lib/progress/src/Circle.d.ts +19 -3
  475. package/lib/progress/src/Circle.js +40 -21
  476. package/lib/progress/src/Progress.d.ts +14 -5
  477. package/lib/progress/src/Progress.js +44 -24
  478. package/lib/progress/src/styles/index.cssr.js +1 -1
  479. package/lib/radio/src/Radio.d.ts +3 -1
  480. package/lib/radio/src/Radio.js +31 -22
  481. package/lib/radio/src/RadioGroup.d.ts +3 -1
  482. package/lib/radio/src/RadioGroup.js +30 -21
  483. package/lib/rate/src/Rate.d.ts +3 -1
  484. package/lib/rate/src/Rate.js +42 -21
  485. package/lib/result/src/Result.d.ts +8 -6
  486. package/lib/result/src/Result.js +35 -18
  487. package/lib/scrollbar/src/ScrollBar.d.ts +12 -1
  488. package/lib/scrollbar/src/ScrollBar.js +4 -0
  489. package/lib/select/src/Select.d.ts +45 -31
  490. package/lib/select/src/Select.js +14 -8
  491. package/lib/select/styles/light.d.ts +3 -3
  492. package/lib/spin/src/Spin.d.ts +3 -1
  493. package/lib/spin/src/Spin.js +30 -20
  494. package/lib/statistic/src/Statistic.d.ts +3 -1
  495. package/lib/statistic/src/Statistic.js +28 -20
  496. package/lib/styles.d.ts +1 -0
  497. package/lib/styles.js +9 -7
  498. package/lib/switch/src/Switch.d.ts +13 -1
  499. package/lib/switch/src/Switch.js +81 -56
  500. package/lib/switch/src/styles/index.cssr.js +21 -8
  501. package/lib/switch/styles/dark.js +2 -2
  502. package/lib/switch/styles/light.d.ts +1 -0
  503. package/lib/switch/styles/light.js +2 -2
  504. package/lib/table/src/Table.d.ts +3 -1
  505. package/lib/table/src/Table.js +39 -28
  506. package/lib/table/src/styles/index.cssr.js +1 -1
  507. package/lib/tabs/src/Tabs.d.ts +25 -23
  508. package/lib/tabs/src/Tabs.js +48 -42
  509. package/lib/tabs/src/styles/index.cssr.js +77 -77
  510. package/lib/tag/src/Tag.d.ts +7 -5
  511. package/lib/tag/src/Tag.js +57 -40
  512. package/lib/tag/src/common-props.d.ts +1 -1
  513. package/lib/tag/src/styles/index.cssr.js +1 -1
  514. package/lib/tag/styles/index.d.ts +1 -1
  515. package/lib/tag/styles/index.js +1 -1
  516. package/lib/tag/styles/rtl.d.ts +2 -5
  517. package/lib/tag/styles/rtl.js +2 -1
  518. package/lib/theme-editor/src/ThemeEditor.js +2 -1
  519. package/lib/themes/dark.js +3 -1
  520. package/lib/themes/light.js +3 -1
  521. package/lib/thing/src/Thing.js +9 -2
  522. package/lib/time-picker/src/TimePicker.d.ts +4 -0
  523. package/lib/timeline/src/TimelineItem.d.ts +4 -4
  524. package/lib/transfer/src/TransferList.d.ts +1 -0
  525. package/lib/tree/src/Tree.d.ts +1 -0
  526. package/lib/tree/src/Tree.js +8 -4
  527. package/lib/tree/src/utils.js +1 -1
  528. package/lib/tree-select/src/TreeSelect.d.ts +43 -30
  529. package/lib/tree-select/src/TreeSelect.js +6 -2
  530. package/lib/tree-select/styles/light.d.ts +3 -3
  531. package/lib/typography/src/a.d.ts +3 -1
  532. package/lib/typography/src/a.js +17 -9
  533. package/lib/typography/src/blockquote.d.ts +3 -1
  534. package/lib/typography/src/blockquote.js +20 -11
  535. package/lib/typography/src/create-header.d.ts +7 -5
  536. package/lib/typography/src/create-header.js +24 -15
  537. package/lib/typography/src/headers.d.ts +36 -24
  538. package/lib/typography/src/hr.d.ts +3 -1
  539. package/lib/typography/src/hr.js +17 -9
  540. package/lib/typography/src/ol.d.ts +3 -1
  541. package/lib/typography/src/ol.js +22 -13
  542. package/lib/typography/src/p.d.ts +3 -1
  543. package/lib/typography/src/p.js +22 -14
  544. package/lib/typography/src/text.d.ts +3 -1
  545. package/lib/typography/src/text.js +30 -22
  546. package/lib/typography/src/ul.d.ts +3 -1
  547. package/lib/typography/src/ul.js +22 -13
  548. package/lib/upload/src/UploadFile.d.ts +1 -1
  549. package/lib/upload/src/UploadProgress.d.ts +2 -2
  550. package/lib/upload/src/interface.d.ts +1 -1
  551. package/lib/version.d.ts +1 -1
  552. package/lib/version.js +1 -1
  553. package/lib/watermark/index.d.ts +2 -0
  554. package/lib/watermark/index.js +8 -0
  555. package/lib/watermark/src/Watermark.d.ts +285 -0
  556. package/lib/watermark/src/Watermark.js +164 -0
  557. package/lib/watermark/src/styles/index.cssr.d.ts +2 -0
  558. package/lib/watermark/src/styles/index.cssr.js +21 -0
  559. package/lib/watermark/styles/dark.d.ts +3 -0
  560. package/lib/watermark/styles/dark.js +14 -0
  561. package/lib/watermark/styles/index.d.ts +3 -0
  562. package/lib/watermark/styles/index.js +10 -0
  563. package/lib/watermark/styles/light.d.ts +5 -0
  564. package/lib/watermark/styles/light.js +15 -0
  565. package/package.json +9 -10
  566. package/volar.d.ts +1 -0
  567. package/web-types.json +279 -29
@@ -26,7 +26,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
26
26
  borderHover: string;
27
27
  borderActive: string;
28
28
  borderFocus: string;
29
- boxShadowHover: null;
29
+ boxShadowHover: string;
30
30
  boxShadowActive: string;
31
31
  boxShadowFocus: string;
32
32
  caretColor: string;
@@ -37,7 +37,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
37
37
  borderHoverWarning: string;
38
38
  borderActiveWarning: string;
39
39
  borderFocusWarning: string;
40
- boxShadowHoverWarning: null;
40
+ boxShadowHoverWarning: string;
41
41
  boxShadowActiveWarning: string;
42
42
  boxShadowFocusWarning: string;
43
43
  colorActiveWarning: string;
@@ -46,7 +46,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
46
46
  borderHoverError: string;
47
47
  borderActiveError: string;
48
48
  borderFocusError: string;
49
- boxShadowHoverError: null;
49
+ boxShadowHoverError: string;
50
50
  boxShadowActiveError: string;
51
51
  boxShadowFocusError: string;
52
52
  colorActiveError: string;
@@ -120,7 +120,9 @@ declare const _default: import("vue").DefineComponent<{
120
120
  '--n-size': string;
121
121
  '--n-color': string;
122
122
  '--n-text-color': string;
123
- }>;
123
+ }> | undefined;
124
+ themeClass: import("vue").Ref<string> | undefined;
125
+ onRender: (() => void) | undefined;
124
126
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
125
127
  description: StringConstructor;
126
128
  stroke: StringConstructor;
@@ -2,7 +2,7 @@ import { computed, defineComponent, h, Transition, watchEffect } from 'vue';
2
2
  import { useCompitable } from 'vooks';
3
3
  import { pxfy } from 'seemly';
4
4
  import { NBaseLoading } from '../../_internal';
5
- import { useConfig, useTheme } from '../../_mixins';
5
+ import { useConfig, useTheme, useThemeClass } from '../../_mixins';
6
6
  import { createKey, warnOnce } from '../../_utils';
7
7
  import { spinLight } from '../styles';
8
8
  import style from './styles/index.cssr';
@@ -38,8 +38,29 @@ export default defineComponent({
38
38
  }
39
39
  });
40
40
  }
41
- const { mergedClsPrefixRef } = useConfig(props);
41
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
42
42
  const themeRef = useTheme('Spin', '-spin', style, spinLight, props, mergedClsPrefixRef);
43
+ const cssVarsRef = computed(() => {
44
+ const { size: spinSize } = props;
45
+ const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
46
+ const { opacitySpinning, color, textColor } = self;
47
+ const size = typeof spinSize === 'number'
48
+ ? pxfy(spinSize)
49
+ : self[createKey('size', spinSize)];
50
+ return {
51
+ '--n-bezier': cubicBezierEaseInOut,
52
+ '--n-opacity-spinning': opacitySpinning,
53
+ '--n-size': size,
54
+ '--n-color': color,
55
+ '--n-text-color': textColor
56
+ };
57
+ });
58
+ const themeClassHandle = inlineThemeDisabled
59
+ ? useThemeClass('spin', computed(() => {
60
+ const { size } = props;
61
+ return typeof size === 'number' ? String(size) : size[0];
62
+ }), cssVarsRef, props)
63
+ : undefined;
43
64
  return {
44
65
  mergedClsPrefix: mergedClsPrefixRef,
45
66
  compitableShow: useCompitable(props, ['spinning', 'show']),
@@ -50,37 +71,26 @@ export default defineComponent({
50
71
  const { size } = props;
51
72
  return STROKE_WIDTH[typeof size === 'number' ? 'medium' : size];
52
73
  }),
53
- cssVars: computed(() => {
54
- const { size: spinSize } = props;
55
- const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
56
- const { opacitySpinning, color, textColor } = self;
57
- const size = typeof spinSize === 'number'
58
- ? pxfy(spinSize)
59
- : self[createKey('size', spinSize)];
60
- return {
61
- '--n-bezier': cubicBezierEaseInOut,
62
- '--n-opacity-spinning': opacitySpinning,
63
- '--n-size': size,
64
- '--n-color': color,
65
- '--n-text-color': textColor
66
- };
67
- })
74
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
75
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
76
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
68
77
  };
69
78
  },
70
79
  render() {
71
- var _a;
80
+ var _a, _b;
72
81
  const { $slots, mergedClsPrefix, description } = this;
73
82
  const rotate = $slots.icon && this.rotate;
74
83
  const descriptionNode = (description || $slots.description) && (h("div", { class: `${mergedClsPrefix}-spin-description` }, description || ((_a = $slots.description) === null || _a === void 0 ? void 0 : _a.call($slots))));
75
- const icon = $slots.icon ? (h("div", { class: `${mergedClsPrefix}-spin-body` },
84
+ const icon = $slots.icon ? (h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] },
76
85
  h("div", { class: [
77
86
  `${mergedClsPrefix}-spin`,
78
87
  rotate && `${mergedClsPrefix}-spin--rotate`
79
88
  ], style: $slots.default ? '' : this.cssVars }, $slots.icon()),
80
- descriptionNode)) : (h("div", { class: `${mergedClsPrefix}-spin-body` },
89
+ descriptionNode)) : (h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] },
81
90
  h(NBaseLoading, { clsPrefix: mergedClsPrefix, style: $slots.default ? '' : this.cssVars, stroke: this.stroke, "stroke-width": this.mergedStrokeWidth, class: `${mergedClsPrefix}-spin` }),
82
91
  descriptionNode));
83
- return $slots.default ? (h("div", { class: `${mergedClsPrefix}-spin-container`, style: this.cssVars },
92
+ (_b = this.onRender) === null || _b === void 0 ? void 0 : _b.call(this);
93
+ return $slots.default ? (h("div", { class: [`${mergedClsPrefix}-spin-container`, this.themeClass], style: this.cssVars },
84
94
  h("div", { class: [
85
95
  `${mergedClsPrefix}-spin-content`,
86
96
  this.compitableShow && `${mergedClsPrefix}-spin-content--spinning`
@@ -74,7 +74,9 @@ declare const _default: import("vue").DefineComponent<{
74
74
  '--n-value-prefix-text-color': string;
75
75
  '--n-value-suffix-text-color': string;
76
76
  '--n-value-text-color': string;
77
- }>;
77
+ }> | undefined;
78
+ themeClass: import("vue").Ref<string> | undefined;
79
+ onRender: (() => void) | undefined;
78
80
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
79
81
  tabularNums: BooleanConstructor;
80
82
  label: StringConstructor;
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed, h } from 'vue';
2
- import { useConfig, useTheme } from '../../_mixins';
2
+ import { useConfig, useTheme, useThemeClass } from '../../_mixins';
3
+ import { resolveWrappedSlot } from '../../_utils';
3
4
  import { statisticLight } from '../styles';
4
5
  import style from './styles/index.cssr';
5
6
  const statisticProps = Object.assign(Object.assign({}, useTheme.props), { tabularNums: Boolean, label: String, value: [String, Number] });
@@ -7,35 +8,42 @@ export default defineComponent({
7
8
  name: 'Statistic',
8
9
  props: statisticProps,
9
10
  setup(props) {
10
- const { mergedClsPrefixRef } = useConfig(props);
11
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
11
12
  const themeRef = useTheme('Statistic', '-statistic', style, statisticLight, props, mergedClsPrefixRef);
13
+ const cssVarsRef = computed(() => {
14
+ const { self: { labelFontWeight, valueFontWeight, valuePrefixTextColor, labelTextColor, valueSuffixTextColor, valueTextColor, labelFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
15
+ return {
16
+ '--n-bezier': cubicBezierEaseInOut,
17
+ '--n-label-font-size': labelFontSize,
18
+ '--n-label-font-weight': labelFontWeight,
19
+ '--n-label-text-color': labelTextColor,
20
+ '--n-value-font-weight': valueFontWeight,
21
+ '--n-value-prefix-text-color': valuePrefixTextColor,
22
+ '--n-value-suffix-text-color': valueSuffixTextColor,
23
+ '--n-value-text-color': valueTextColor
24
+ };
25
+ });
26
+ const themeClassHandle = inlineThemeDisabled
27
+ ? useThemeClass('statistic', undefined, cssVarsRef, props)
28
+ : undefined;
12
29
  return {
13
30
  mergedClsPrefix: mergedClsPrefixRef,
14
- cssVars: computed(() => {
15
- const { self: { labelFontWeight, valueFontWeight, valuePrefixTextColor, labelTextColor, valueSuffixTextColor, valueTextColor, labelFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
16
- return {
17
- '--n-bezier': cubicBezierEaseInOut,
18
- '--n-label-font-size': labelFontSize,
19
- '--n-label-font-weight': labelFontWeight,
20
- '--n-label-text-color': labelTextColor,
21
- '--n-value-font-weight': valueFontWeight,
22
- '--n-value-prefix-text-color': valuePrefixTextColor,
23
- '--n-value-suffix-text-color': valueSuffixTextColor,
24
- '--n-value-text-color': valueTextColor
25
- };
26
- })
31
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
32
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
33
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
27
34
  };
28
35
  },
29
36
  render() {
30
37
  var _a;
31
- const { $slots, mergedClsPrefix } = this;
32
- return (h("div", { class: `${mergedClsPrefix}-statistic`, style: this.cssVars },
33
- h("div", { class: `${mergedClsPrefix}-statistic__label` }, this.label || ((_a = $slots.label) === null || _a === void 0 ? void 0 : _a.call($slots))),
38
+ const { mergedClsPrefix, $slots: { default: defaultSlot, label: labelSlot, prefix: prefixSlot, suffix: suffixSlot } } = this;
39
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
40
+ return (h("div", { class: [`${mergedClsPrefix}-statistic`, this.themeClass], style: this.cssVars },
41
+ resolveWrappedSlot(labelSlot, (children) => (h("div", { class: `${mergedClsPrefix}-statistic__label` }, this.label || children))),
34
42
  h("div", { class: `${mergedClsPrefix}-statistic-value`, style: {
35
43
  fontVariantNumeric: this.tabularNums ? 'tabular-nums' : ''
36
44
  } },
37
- $slots.prefix ? (h("span", { class: `${mergedClsPrefix}-statistic-value__prefix` }, $slots.prefix())) : null,
38
- this.value !== undefined ? (h("span", { class: `${mergedClsPrefix}-statistic-value__content` }, this.value)) : (h("span", { class: `${mergedClsPrefix}-statistic-value__content` }, $slots)),
39
- $slots.suffix ? (h("span", { class: `${mergedClsPrefix}-statistic-value__suffix` }, $slots.suffix())) : null)));
45
+ resolveWrappedSlot(prefixSlot, (children) => children && (h("span", { class: `${mergedClsPrefix}-statistic-value__prefix` }, children))),
46
+ this.value !== undefined ? (h("span", { class: `${mergedClsPrefix}-statistic-value__content` }, this.value)) : (resolveWrappedSlot(defaultSlot, (children) => children && (h("span", { class: `${mergedClsPrefix}-statistic-value__content` }, children)))),
47
+ resolveWrappedSlot(suffixSlot, (children) => children && (h("span", { class: `${mergedClsPrefix}-statistic-value__suffix` }, children))))));
40
48
  }
41
49
  });
package/es/styles.d.ts CHANGED
@@ -65,6 +65,7 @@ export { treeDark } from './tree/styles';
65
65
  export { treeSelectDark } from './tree-select/styles';
66
66
  export { typographyDark } from './typography/styles';
67
67
  export { uploadDark } from './upload/styles';
68
+ export { watermarkDark } from './watermark/styles';
68
69
  export { scrollbarDark } from './_internal/scrollbar/styles';
69
70
  export { internalSelectMenuDark } from './_internal/select-menu/styles';
70
71
  export { internalSelectionDark } from './_internal/selection/styles';
package/es/styles.js CHANGED
@@ -65,6 +65,7 @@ export { treeDark } from './tree/styles';
65
65
  export { treeSelectDark } from './tree-select/styles';
66
66
  export { typographyDark } from './typography/styles';
67
67
  export { uploadDark } from './upload/styles';
68
+ export { watermarkDark } from './watermark/styles';
68
69
  // danger zone, internal styles
69
70
  export { scrollbarDark } from './_internal/scrollbar/styles';
70
71
  export { internalSelectMenuDark } from './_internal/select-menu/styles';
@@ -40,6 +40,7 @@ declare const switchProps: {
40
40
  /** @deprecated */
41
41
  readonly onChange: PropType<MaybeArray<OnUpdateValue> | undefined>;
42
42
  readonly theme: PropType<import("../../_mixins").Theme<"Switch", {
43
+ iconColor: string;
43
44
  textColor: string;
44
45
  loadingColor: string;
45
46
  opacityDisabled: string;
@@ -71,6 +72,7 @@ declare const switchProps: {
71
72
  railWidthLarge: string;
72
73
  }, any>>;
73
74
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
75
+ iconColor: string;
74
76
  textColor: string;
75
77
  loadingColor: string;
76
78
  opacityDisabled: string;
@@ -102,6 +104,7 @@ declare const switchProps: {
102
104
  railWidthLarge: string;
103
105
  }, any>>>;
104
106
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
107
+ iconColor: string;
105
108
  textColor: string;
106
109
  loadingColor: string;
107
110
  opacityDisabled: string;
@@ -173,6 +176,7 @@ declare const _default: import("vue").DefineComponent<{
173
176
  /** @deprecated */
174
177
  readonly onChange: PropType<MaybeArray<OnUpdateValue> | undefined>;
175
178
  readonly theme: PropType<import("../../_mixins").Theme<"Switch", {
179
+ iconColor: string;
176
180
  textColor: string;
177
181
  loadingColor: string;
178
182
  opacityDisabled: string;
@@ -204,6 +208,7 @@ declare const _default: import("vue").DefineComponent<{
204
208
  railWidthLarge: string;
205
209
  }, any>>;
206
210
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
211
+ iconColor: string;
207
212
  textColor: string;
208
213
  loadingColor: string;
209
214
  opacityDisabled: string;
@@ -235,6 +240,7 @@ declare const _default: import("vue").DefineComponent<{
235
240
  railWidthLarge: string;
236
241
  }, any>>>;
237
242
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
243
+ iconColor: string;
238
244
  textColor: string;
239
245
  loadingColor: string;
240
246
  opacityDisabled: string;
@@ -297,7 +303,10 @@ declare const _default: import("vue").DefineComponent<{
297
303
  '--n-box-shadow-focus': string;
298
304
  '--n-loading-color': string;
299
305
  '--n-text-color': string;
300
- }>;
306
+ '--n-icon-color': string;
307
+ }> | undefined;
308
+ themeClass: import("vue").Ref<string> | undefined;
309
+ onRender: (() => void) | undefined;
301
310
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
302
311
  readonly size: {
303
312
  readonly type: PropType<"small" | "medium" | "large">;
@@ -337,6 +346,7 @@ declare const _default: import("vue").DefineComponent<{
337
346
  /** @deprecated */
338
347
  readonly onChange: PropType<MaybeArray<OnUpdateValue> | undefined>;
339
348
  readonly theme: PropType<import("../../_mixins").Theme<"Switch", {
349
+ iconColor: string;
340
350
  textColor: string;
341
351
  loadingColor: string;
342
352
  opacityDisabled: string;
@@ -368,6 +378,7 @@ declare const _default: import("vue").DefineComponent<{
368
378
  railWidthLarge: string;
369
379
  }, any>>;
370
380
  readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
381
+ iconColor: string;
371
382
  textColor: string;
372
383
  loadingColor: string;
373
384
  opacityDisabled: string;
@@ -399,6 +410,7 @@ declare const _default: import("vue").DefineComponent<{
399
410
  railWidthLarge: string;
400
411
  }, any>>>;
401
412
  readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Switch", {
413
+ iconColor: string;
402
414
  textColor: string;
403
415
  loadingColor: string;
404
416
  opacityDisabled: string;
@@ -1,9 +1,9 @@
1
- import { h, ref, toRef, defineComponent, computed, Transition, watchEffect } from 'vue';
1
+ import { h, ref, toRef, defineComponent, computed, watchEffect } from 'vue';
2
2
  import { depx, pxfy } from 'seemly';
3
3
  import { useMergedState } from 'vooks';
4
- import { useConfig, useFormItem, useTheme } from '../../_mixins';
5
- import { NBaseLoading } from '../../_internal';
6
- import { call, createKey, warnOnce } from '../../_utils';
4
+ import { useConfig, useFormItem, useTheme, useThemeClass } from '../../_mixins';
5
+ import { NBaseLoading, NIconSwitchTransition } from '../../_internal';
6
+ import { call, createKey, warnOnce, isSlotEmpty, resolveWrappedSlot } from '../../_utils';
7
7
  import { switchLight } from '../styles';
8
8
  import style from './styles/index.cssr';
9
9
  const switchProps = Object.assign(Object.assign({}, useTheme.props), { size: {
@@ -41,7 +41,7 @@ export default defineComponent({
41
41
  }
42
42
  });
43
43
  }
44
- const { mergedClsPrefixRef } = useConfig(props);
44
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
45
45
  const themeRef = useTheme('Switch', '-switch', style, switchLight, props, mergedClsPrefixRef);
46
46
  const formItem = useFormItem(props);
47
47
  const { mergedSizeRef, mergedDisabledRef } = formItem;
@@ -81,15 +81,13 @@ export default defineComponent({
81
81
  nTriggerFormBlur();
82
82
  }
83
83
  function handleClick() {
84
- if (props.loading)
84
+ if (props.loading || mergedDisabledRef.value)
85
85
  return;
86
- if (!mergedDisabledRef.value) {
87
- if (mergedValueRef.value !== props.checkedValue) {
88
- doUpdateValue(props.checkedValue);
89
- }
90
- else {
91
- doUpdateValue(props.uncheckedValue);
92
- }
86
+ if (mergedValueRef.value !== props.checkedValue) {
87
+ doUpdateValue(props.checkedValue);
88
+ }
89
+ else {
90
+ doUpdateValue(props.uncheckedValue);
93
91
  }
94
92
  }
95
93
  function handleFocus() {
@@ -102,21 +100,62 @@ export default defineComponent({
102
100
  pressedRef.value = false;
103
101
  }
104
102
  function handleKeyup(e) {
105
- if (props.loading)
103
+ if (props.loading || mergedDisabledRef.value)
106
104
  return;
107
105
  if (e.code === 'Space') {
108
- doUpdateValue(!mergedValueRef.value);
106
+ if (mergedValueRef.value !== props.checkedValue) {
107
+ doUpdateValue(props.checkedValue);
108
+ }
109
+ else {
110
+ doUpdateValue(props.uncheckedValue);
111
+ }
109
112
  pressedRef.value = false;
110
113
  }
111
114
  }
112
115
  function handleKeydown(e) {
113
- if (props.loading)
116
+ if (props.loading || mergedDisabledRef.value)
114
117
  return;
115
118
  if (e.code === 'Space') {
116
119
  e.preventDefault();
117
120
  pressedRef.value = true;
118
121
  }
119
122
  }
123
+ const cssVarsRef = computed(() => {
124
+ const { value: size } = mergedSizeRef;
125
+ const { self: { opacityDisabled, railColor, railColorActive, buttonBoxShadow, buttonColor, boxShadowFocus, loadingColor, textColor, iconColor, [createKey('buttonHeight', size)]: buttonHeight, [createKey('buttonWidth', size)]: buttonWidth, [createKey('buttonWidthPressed', size)]: buttonWidthPressed, [createKey('railHeight', size)]: railHeight, [createKey('railWidth', size)]: railWidth, [createKey('railBorderRadius', size)]: railBorderRadius, [createKey('buttonBorderRadius', size)]: buttonBorderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
126
+ const offset = pxfy((depx(railHeight) - depx(buttonHeight)) / 2);
127
+ const height = pxfy(Math.max(depx(railHeight), depx(buttonHeight)));
128
+ const width = depx(railHeight) > depx(buttonHeight)
129
+ ? railWidth
130
+ : pxfy(depx(railWidth) + depx(buttonHeight) - depx(railHeight));
131
+ return {
132
+ '--n-bezier': cubicBezierEaseInOut,
133
+ '--n-button-border-radius': buttonBorderRadius,
134
+ '--n-button-box-shadow': buttonBoxShadow,
135
+ '--n-button-color': buttonColor,
136
+ '--n-button-width': buttonWidth,
137
+ '--n-button-width-pressed': buttonWidthPressed,
138
+ '--n-button-height': buttonHeight,
139
+ '--n-height': height,
140
+ '--n-offset': offset,
141
+ '--n-opacity-disabled': opacityDisabled,
142
+ '--n-rail-border-radius': railBorderRadius,
143
+ '--n-rail-color': railColor,
144
+ '--n-rail-color-active': railColorActive,
145
+ '--n-rail-height': railHeight,
146
+ '--n-rail-width': railWidth,
147
+ '--n-width': width,
148
+ '--n-box-shadow-focus': boxShadowFocus,
149
+ '--n-loading-color': loadingColor,
150
+ '--n-text-color': textColor,
151
+ '--n-icon-color': iconColor
152
+ };
153
+ });
154
+ const themeClassHandle = inlineThemeDisabled
155
+ ? useThemeClass('switch', computed(() => {
156
+ return mergedSizeRef.value[0];
157
+ }), cssVarsRef, props)
158
+ : undefined;
120
159
  return {
121
160
  handleClick,
122
161
  handleBlur,
@@ -129,43 +168,22 @@ export default defineComponent({
129
168
  mergedValue: mergedValueRef,
130
169
  checked: checkedRef,
131
170
  mergedDisabled: mergedDisabledRef,
132
- cssVars: computed(() => {
133
- const { value: size } = mergedSizeRef;
134
- const { self: { opacityDisabled, railColor, railColorActive, buttonBoxShadow, buttonColor, boxShadowFocus, loadingColor, textColor, [createKey('buttonHeight', size)]: buttonHeight, [createKey('buttonWidth', size)]: buttonWidth, [createKey('buttonWidthPressed', size)]: buttonWidthPressed, [createKey('railHeight', size)]: railHeight, [createKey('railWidth', size)]: railWidth, [createKey('railBorderRadius', size)]: railBorderRadius, [createKey('buttonBorderRadius', size)]: buttonBorderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
135
- const offset = pxfy((depx(railHeight) - depx(buttonHeight)) / 2);
136
- const height = pxfy(Math.max(depx(railHeight), depx(buttonHeight)));
137
- const width = depx(railHeight) > depx(buttonHeight)
138
- ? railWidth
139
- : pxfy(depx(railWidth) + depx(buttonHeight) - depx(railHeight));
140
- return {
141
- '--n-bezier': cubicBezierEaseInOut,
142
- '--n-button-border-radius': buttonBorderRadius,
143
- '--n-button-box-shadow': buttonBoxShadow,
144
- '--n-button-color': buttonColor,
145
- '--n-button-width': buttonWidth,
146
- '--n-button-width-pressed': buttonWidthPressed,
147
- '--n-button-height': buttonHeight,
148
- '--n-height': height,
149
- '--n-offset': offset,
150
- '--n-opacity-disabled': opacityDisabled,
151
- '--n-rail-border-radius': railBorderRadius,
152
- '--n-rail-color': railColor,
153
- '--n-rail-color-active': railColorActive,
154
- '--n-rail-height': railHeight,
155
- '--n-rail-width': railWidth,
156
- '--n-width': width,
157
- '--n-box-shadow-focus': boxShadowFocus,
158
- '--n-loading-color': loadingColor,
159
- '--n-text-color': textColor
160
- };
161
- })
171
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
172
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
173
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
162
174
  };
163
175
  },
164
176
  render() {
165
- const { mergedClsPrefix, mergedDisabled, checked, mergedRailStyle, $slots } = this;
166
- const { checked: checkedSlot, unchecked: uncheckedSlot } = $slots;
177
+ const { mergedClsPrefix, mergedDisabled, checked, mergedRailStyle, onRender, $slots } = this;
178
+ onRender === null || onRender === void 0 ? void 0 : onRender();
179
+ const { checked: checkedSlot, unchecked: uncheckedSlot, icon: iconSlot, 'checked-icon': checkedIconSlot, 'unchecked-icon': uncheckedIconSlot } = $slots;
180
+ const hasIcon = !(isSlotEmpty(iconSlot) &&
181
+ isSlotEmpty(checkedIconSlot) &&
182
+ isSlotEmpty(uncheckedIconSlot));
167
183
  return (h("div", { role: "switch", "aria-checked": checked, class: [
168
184
  `${mergedClsPrefix}-switch`,
185
+ this.themeClass,
186
+ hasIcon && `${mergedClsPrefix}-switch--icon`,
169
187
  checked && `${mergedClsPrefix}-switch--active`,
170
188
  mergedDisabled && `${mergedClsPrefix}-switch--disabled`,
171
189
  this.round && `${mergedClsPrefix}-switch--round`,
@@ -173,18 +191,25 @@ export default defineComponent({
173
191
  this.pressed && `${mergedClsPrefix}-switch--pressed`
174
192
  ], tabindex: !this.mergedDisabled ? 0 : undefined, style: this.cssVars, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown },
175
193
  h("div", { class: `${mergedClsPrefix}-switch__rail`, "aria-hidden": "true", style: mergedRailStyle },
176
- (checkedSlot || uncheckedSlot) && (h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-switch__children-placeholder` },
177
- h("div", { class: `${mergedClsPrefix}-switch__rail-placeholder` },
178
- h("div", { class: `${mergedClsPrefix}-switch__button-placeholder` }), checkedSlot === null || checkedSlot === void 0 ? void 0 :
179
- checkedSlot()),
180
- h("div", { class: `${mergedClsPrefix}-switch__rail-placeholder` },
181
- h("div", { class: `${mergedClsPrefix}-switch__button-placeholder` }), uncheckedSlot === null || uncheckedSlot === void 0 ? void 0 :
182
- uncheckedSlot()))),
194
+ resolveWrappedSlot(checkedSlot, (checkedSlotChildren) => resolveWrappedSlot(uncheckedSlot, (uncheckedSlotChildren) => {
195
+ if (checkedSlotChildren || uncheckedSlotChildren) {
196
+ return (h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-switch__children-placeholder` },
197
+ h("div", { class: `${mergedClsPrefix}-switch__rail-placeholder` },
198
+ h("div", { class: `${mergedClsPrefix}-switch__button-placeholder` }),
199
+ checkedSlotChildren),
200
+ h("div", { class: `${mergedClsPrefix}-switch__rail-placeholder` },
201
+ h("div", { class: `${mergedClsPrefix}-switch__button-placeholder` }),
202
+ uncheckedSlotChildren)));
203
+ }
204
+ return null;
205
+ })),
183
206
  h("div", { class: `${mergedClsPrefix}-switch__button` },
184
- h(Transition, { name: "fade-in-scale-up-transition" }, {
185
- default: () => this.loading ? (h(NBaseLoading, { key: "loading", clsPrefix: mergedClsPrefix, strokeWidth: 20 })) : null
186
- }),
187
- checkedSlot && (h("div", { key: "checked", class: `${mergedClsPrefix}-switch__checked` }, checkedSlot())),
188
- uncheckedSlot && (h("div", { key: "unchecked", class: `${mergedClsPrefix}-switch__unchecked` }, uncheckedSlot()))))));
207
+ resolveWrappedSlot(iconSlot, (icon) => resolveWrappedSlot(checkedIconSlot, (checkedIcon) => resolveWrappedSlot(uncheckedIconSlot, (uncheckedIcon) => {
208
+ return (h(NIconSwitchTransition, null, {
209
+ default: () => this.loading ? (h(NBaseLoading, { key: "loading", clsPrefix: mergedClsPrefix, strokeWidth: 20 })) : this.checked && (checkedIcon || icon) ? (h("div", { class: `${mergedClsPrefix}-switch__button-icon`, key: checkedIcon ? 'checked-icon' : 'icon' }, checkedIcon || icon)) : !this.checked && (uncheckedIcon || icon) ? (h("div", { class: `${mergedClsPrefix}-switch__button-icon`, key: uncheckedIcon ? 'unchecked-icon' : 'icon' }, uncheckedIcon || icon)) : null
210
+ }));
211
+ }))),
212
+ resolveWrappedSlot(checkedSlot, (children) => children && (h("div", { key: "checked", class: `${mergedClsPrefix}-switch__checked` }, children))),
213
+ resolveWrappedSlot(uncheckedSlot, (children) => children && (h("div", { key: "unchecked", class: `${mergedClsPrefix}-switch__unchecked` }, children)))))));
189
214
  }
190
215
  });
@@ -1,4 +1,4 @@
1
- import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-up.cssr';
1
+ import iconSwitchTransition from '../../../_styles/transitions/icon-switch.cssr';
2
2
  import { c, cB, cE, cM, cNotM } from '../../../_utils/cssr'; // vars:
3
3
  // --n-bezier
4
4
  // --n-button-border-radius
@@ -17,6 +17,7 @@ import { c, cB, cE, cM, cNotM } from '../../../_utils/cssr'; // vars:
17
17
  // --n-box-shadow-focus
18
18
  // --n-loading-color
19
19
  // --n-text-color
20
+ // --n-icon-color
20
21
 
21
22
  export default cB('switch', `
22
23
  height: var(--n-height);
@@ -48,7 +49,7 @@ export default cB('switch', `
48
49
  font-size: calc(var(--n-button-width) - 4px);
49
50
  color: var(--n-loading-color);
50
51
  transition: color .3s var(--n-bezier);
51
- `, [fadeInScaleUpTransition({
52
+ `, [iconSwitchTransition({
52
53
  originalTransform: 'translateX(-50%) translateY(-50%)'
53
54
  })]), cE('checked, unchecked', `
54
55
  transition: color .3s var(--n-bezier);
@@ -74,7 +75,7 @@ export default cB('switch', `
74
75
  borderRadius: 'calc(var(--n-rail-height) / 2)'
75
76
  }, [cE('button', {
76
77
  borderRadius: 'calc(var(--n-button-height) / 2)'
77
- })])]), cNotM('disabled', [cM('pressed', [cE('rail', [cE('button', {
78
+ })])]), cNotM('disabled', [cNotM('icon', [cM('pressed', [cE('rail', [cE('button', {
78
79
  maxWidth: 'var(--n-button-width-pressed)'
79
80
  })])]), cE('rail', [c('&:active', [cE('button', {
80
81
  maxWidth: 'var(--n-button-width-pressed)'
@@ -82,7 +83,7 @@ export default cB('switch', `
82
83
  left: 'calc(100% - var(--n-offset) - var(--n-button-width-pressed))'
83
84
  })])]), cE('rail', [c('&:active', [cE('button', {
84
85
  left: 'calc(100% - var(--n-offset) - var(--n-button-width-pressed))'
85
- })])])])]), cM('active', [cE('rail', [cE('button', {
86
+ })])])])])]), cM('active', [cE('rail', [cE('button', {
86
87
  left: 'calc(100% - (var(--n-rail-height) + var(--n-button-width)) / 2)'
87
88
  })])]), cE('rail', `
88
89
  overflow: hidden;
@@ -95,7 +96,21 @@ export default cB('switch', `
95
96
  background .3s var(--n-bezier),
96
97
  box-shadow .3s var(--n-bezier);
97
98
  background-color: var(--n-rail-color);
98
- `, [cE('button', `
99
+ `, [cE('button-icon', `
100
+ color: var(--n-icon-color);
101
+ transition: color .3s var(--n-bezier);
102
+ font-size: calc(var(--n-button-height) - 4px);
103
+ position: absolute;
104
+ left: 0;
105
+ right: 0;
106
+ top: 0;
107
+ bottom: 0;
108
+ display: flex;
109
+ justify-content: center;
110
+ align-items: center;
111
+ line-height: 1;
112
+ `, [iconSwitchTransition()]), cE('button', `
113
+ align-items: center;
99
114
  top: var(--n-offset);
100
115
  left: var(--n-offset);
101
116
  height: var(--n-button-width);
@@ -114,9 +129,7 @@ export default cB('switch', `
114
129
  opacity .3s var(--n-bezier),
115
130
  max-width .3s var(--n-bezier),
116
131
  box-shadow .3s var(--n-bezier);
117
- `)]), cM('active', [cE('rail', {
118
- backgroundColor: 'var(--n-rail-color-active)'
119
- })]), cM('disabled', [cE('rail', `
132
+ `)]), cM('active', [cE('rail', 'background-color: var(--n-rail-color-active);')]), cM('disabled', [cE('rail', `
120
133
  cursor: not-allowed;
121
134
  opacity: .5;
122
135
  `)]), cM('loading', [cE('rail', `
@@ -5,9 +5,9 @@ const switchDark = {
5
5
  name: 'Switch',
6
6
  common: commonDark,
7
7
  self(vars) {
8
- const { primaryColorSuppl, opacityDisabled, borderRadius, primaryColor, textColor2 } = vars;
8
+ const { primaryColorSuppl, opacityDisabled, borderRadius, primaryColor, textColor2, baseColor } = vars;
9
9
  const railOverlayColor = 'rgba(255, 255, 255, .20)';
10
- return Object.assign(Object.assign({}, commonVars), { textColor: textColor2, loadingColor: primaryColorSuppl, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColorSuppl, buttonBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, { alpha: 0.3 })}` });
10
+ return Object.assign(Object.assign({}, commonVars), { iconColor: baseColor, textColor: textColor2, loadingColor: primaryColorSuppl, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColorSuppl, buttonBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, { alpha: 0.3 })}` });
11
11
  }
12
12
  };
13
13
  export default switchDark;
@@ -1,6 +1,7 @@
1
1
  import type { ThemeCommonVars } from '../../_styles/common';
2
2
  import type { Theme } from '../../_mixins';
3
3
  declare const self: (vars: ThemeCommonVars) => {
4
+ iconColor: string;
4
5
  textColor: string;
5
6
  loadingColor: string;
6
7
  opacityDisabled: string;
@@ -2,9 +2,9 @@ import { changeColor } from 'seemly';
2
2
  import commonVars from './_common';
3
3
  import { commonLight } from '../../_styles/common';
4
4
  const self = (vars) => {
5
- const { primaryColor, opacityDisabled, borderRadius } = vars;
5
+ const { primaryColor, opacityDisabled, borderRadius, textColor3 } = vars;
6
6
  const railOverlayColor = 'rgba(0, 0, 0, .14)';
7
- return Object.assign(Object.assign({}, commonVars), { textColor: 'white', loadingColor: primaryColor, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColor, buttonBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, { alpha: 0.2 })}` });
7
+ return Object.assign(Object.assign({}, commonVars), { iconColor: textColor3, textColor: 'white', loadingColor: primaryColor, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColor, buttonBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, { alpha: 0.2 })}` });
8
8
  };
9
9
  const switchLight = {
10
10
  name: 'Switch',