naive-ui 2.20.3 → 2.21.0

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 (332) hide show
  1. package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -0
  2. package/es/_internal/selection/src/Selection.d.ts +3 -0
  3. package/es/_internal/suffix/src/Suffix.d.ts +4 -1
  4. package/es/_internal/suffix/src/Suffix.js +4 -1
  5. package/es/_styles/common/dark.js +1 -1
  6. package/es/_styles/common/light.d.ts +3 -0
  7. package/es/_styles/common/light.js +5 -2
  8. package/es/_styles/global/index.cssr.js +9 -4
  9. package/es/_styles/transitions/icon-switch.cssr.js +6 -2
  10. package/es/_utils/naive/extract-public-props.d.ts +1 -1
  11. package/es/alert/src/Alert.d.ts +3 -0
  12. package/es/auto-complete/src/AutoComplete.d.ts +8 -1
  13. package/es/auto-complete/src/AutoComplete.js +2 -2
  14. package/es/avatar/src/Avatar.d.ts +8 -1
  15. package/es/avatar/src/Avatar.js +41 -9
  16. package/es/avatar/src/styles/index.cssr.js +2 -2
  17. package/es/button/src/Button.d.ts +149 -52
  18. package/es/button/src/Button.js +128 -56
  19. package/es/button/src/interface.d.ts +1 -1
  20. package/es/button/styles/dark.js +3 -0
  21. package/es/button/styles/light.d.ts +14 -5
  22. package/es/button/styles/light.js +10 -3
  23. package/es/calendar/src/Calendar.d.ts +143 -50
  24. package/es/calendar/styles/light.d.ts +14 -5
  25. package/es/card/src/Card.d.ts +3 -0
  26. package/es/cascader/src/Cascader.d.ts +3 -0
  27. package/es/cascader/src/CascaderOption.d.ts +3 -0
  28. package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
  29. package/es/cascader/src/CascaderSubmenu.d.ts +3 -0
  30. package/es/checkbox/src/Checkbox.d.ts +8 -5
  31. package/es/checkbox/src/Checkbox.js +3 -3
  32. package/es/collapse/src/Collapse.d.ts +3 -0
  33. package/es/color-picker/src/ColorInputUnit.d.ts +17 -5
  34. package/es/color-picker/src/ColorPicker.d.ts +126 -45
  35. package/es/color-picker/styles/light.d.ts +14 -5
  36. package/es/data-table/src/DataTable.d.ts +183 -51
  37. package/es/data-table/src/DataTable.js +11 -6
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
  40. package/es/data-table/src/TableParts/Body.d.ts +25 -6
  41. package/es/data-table/src/TableParts/Body.js +60 -22
  42. package/es/data-table/src/TableParts/BodyCheckbox.js +1 -1
  43. package/es/data-table/src/TableParts/Cell.d.ts +40 -10
  44. package/es/data-table/src/TableParts/Header.d.ts +20 -5
  45. package/es/data-table/src/TableParts/Header.js +1 -1
  46. package/es/data-table/src/interface.d.ts +4 -1
  47. package/es/data-table/src/styles/index.cssr.js +8 -9
  48. package/es/data-table/styles/light.d.ts +20 -5
  49. package/es/data-table/styles/light.js +3 -3
  50. package/es/date-picker/src/DatePicker.d.ts +298 -105
  51. package/es/date-picker/src/panel/date.d.ts +45 -15
  52. package/es/date-picker/src/panel/daterange.d.ts +45 -15
  53. package/es/date-picker/src/panel/datetime.d.ts +45 -15
  54. package/es/date-picker/src/panel/datetimerange.d.ts +45 -15
  55. package/es/date-picker/src/panel/month.d.ts +45 -15
  56. package/es/date-picker/src/panel/use-calendar.d.ts +45 -15
  57. package/es/date-picker/src/panel/use-dual-calendar.d.ts +45 -15
  58. package/es/date-picker/src/panel/use-panel-common.d.ts +45 -15
  59. package/es/date-picker/styles/light.d.ts +28 -10
  60. package/es/dialog/src/Dialog.d.ts +101 -35
  61. package/es/dialog/styles/light.d.ts +14 -5
  62. package/es/drawer/src/Drawer.d.ts +3 -0
  63. package/es/drawer/src/DrawerBodyWrapper.d.ts +3 -0
  64. package/es/drawer/src/DrawerContent.d.ts +3 -0
  65. package/es/dropdown/index.d.ts +1 -1
  66. package/es/dropdown/src/Dropdown.d.ts +5 -2
  67. package/es/dropdown/src/DropdownGroup.d.ts +2 -3
  68. package/es/dropdown/src/DropdownMenu.d.ts +3 -4
  69. package/es/dropdown/src/DropdownMenu.js +5 -4
  70. package/es/dropdown/src/DropdownOption.d.ts +3 -4
  71. package/es/dropdown/src/DropdownOption.js +2 -2
  72. package/es/dropdown/src/DropdownRenderOption.d.ts +2 -3
  73. package/es/dropdown/src/interface.d.ts +9 -30
  74. package/es/dropdown/src/utils.d.ts +1 -0
  75. package/es/dropdown/src/utils.js +10 -0
  76. package/es/dynamic-input/src/DynamicInput.d.ts +143 -50
  77. package/es/dynamic-input/src/InputPreset.d.ts +17 -5
  78. package/es/dynamic-input/src/PairPreset.d.ts +17 -5
  79. package/es/dynamic-input/styles/light.d.ts +14 -5
  80. package/es/dynamic-tags/src/DynamicTags.d.ts +144 -50
  81. package/es/dynamic-tags/styles/light.d.ts +14 -5
  82. package/es/ellipsis/src/Ellipsis.d.ts +3 -0
  83. package/es/global-style/src/GlobalStyle.js +2 -0
  84. package/es/input/src/Input.d.ts +4 -0
  85. package/es/input/src/Input.js +6 -0
  86. package/es/input/src/interface.d.ts +1 -0
  87. package/es/input-number/src/InputNumber.d.ts +144 -50
  88. package/es/input-number/styles/light.d.ts +14 -5
  89. package/es/layout/src/Layout.d.ts +6 -0
  90. package/es/layout/src/LayoutContent.d.ts +3 -0
  91. package/es/layout/src/LayoutSider.d.ts +3 -0
  92. package/es/log/src/Log.d.ts +3 -0
  93. package/es/mention/src/Mention.d.ts +4 -0
  94. package/es/menu/index.d.ts +1 -1
  95. package/es/menu/src/Menu.d.ts +19 -6
  96. package/es/menu/src/Menu.js +2 -1
  97. package/es/menu/src/MenuDivider.d.ts +2 -0
  98. package/es/menu/src/MenuDivider.js +11 -0
  99. package/es/menu/src/MenuOption.d.ts +8 -1
  100. package/es/menu/src/MenuOptionContent.d.ts +4 -1
  101. package/es/menu/src/Submenu.d.ts +18 -16
  102. package/es/menu/src/interface.d.ts +23 -4
  103. package/es/menu/src/styles/index.cssr.js +6 -1
  104. package/es/menu/src/utils.d.ts +4 -2
  105. package/es/menu/src/utils.js +16 -2
  106. package/es/menu/styles/light.d.ts +2 -0
  107. package/es/menu/styles/light.js +3 -2
  108. package/es/modal/src/BodyWrapper.d.ts +31 -10
  109. package/es/modal/src/Modal.d.ts +168 -60
  110. package/es/modal/styles/light.d.ts +14 -5
  111. package/es/notification/src/NotificationContainer.d.ts +3 -0
  112. package/es/pagination/src/Pagination.d.ts +4 -0
  113. package/es/popconfirm/src/Popconfirm.d.ts +143 -50
  114. package/es/popconfirm/styles/light.d.ts +14 -5
  115. package/es/popselect/src/Popselect.d.ts +3 -0
  116. package/es/popselect/src/PopselectPanel.d.ts +3 -0
  117. package/es/radio/src/Radio.d.ts +3 -0
  118. package/es/radio/src/RadioButton.d.ts +3 -0
  119. package/es/radio/src/use-radio.d.ts +2 -0
  120. package/es/radio/src/use-radio.js +6 -3
  121. package/es/select/src/Select.d.ts +3 -0
  122. package/es/slider/src/Slider.d.ts +70 -91
  123. package/es/slider/src/Slider.js +326 -583
  124. package/es/slider/src/interface.d.ts +1 -1
  125. package/es/slider/src/styles/index.cssr.js +86 -16
  126. package/es/slider/src/utils.d.ts +10 -1
  127. package/es/slider/src/utils.js +9 -0
  128. package/es/slider/styles/_common.d.ts +1 -0
  129. package/es/slider/styles/_common.js +1 -0
  130. package/es/slider/styles/light.d.ts +1 -0
  131. package/es/space/src/Space.js +2 -0
  132. package/es/steps/src/Step.js +1 -1
  133. package/es/table/src/Table.d.ts +35 -0
  134. package/es/table/src/Table.js +8 -4
  135. package/es/table/src/styles/index.cssr.js +1 -1
  136. package/es/table/styles/light.d.ts +3 -0
  137. package/es/table/styles/light.js +2 -2
  138. package/es/tabs/index.d.ts +2 -0
  139. package/es/tabs/index.js +1 -0
  140. package/es/tabs/src/Tab.d.ts +35 -18
  141. package/es/tabs/src/Tab.js +11 -12
  142. package/es/tabs/src/Tabs.js +58 -18
  143. package/es/tag/src/Tag.d.ts +8 -3
  144. package/es/tag/src/Tag.js +10 -2
  145. package/es/tag/src/styles/index.cssr.js +10 -5
  146. package/es/tag/src/styles/rtl.cssr.js +7 -1
  147. package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
  148. package/es/time-picker/src/Panel.d.ts +17 -5
  149. package/es/time-picker/src/TimePicker.d.ts +144 -50
  150. package/es/time-picker/styles/light.d.ts +14 -5
  151. package/es/tooltip/src/Tooltip.d.ts +3 -0
  152. package/es/transfer/src/Transfer.d.ts +143 -50
  153. package/es/transfer/src/TransferFilter.d.ts +17 -5
  154. package/es/transfer/src/TransferList.d.ts +17 -5
  155. package/es/transfer/src/TransferListItem.d.ts +17 -5
  156. package/es/transfer/styles/light.d.ts +14 -5
  157. package/es/tree/src/Tree.d.ts +3 -0
  158. package/es/tree/src/TreeNodeCheckbox.d.ts +3 -0
  159. package/es/tree-select/src/TreeSelect.d.ts +3 -0
  160. package/es/upload/src/Upload.d.ts +143 -50
  161. package/es/upload/src/UploadFile.d.ts +18 -6
  162. package/es/upload/src/UploadProgress.d.ts +17 -5
  163. package/es/upload/styles/light.d.ts +14 -5
  164. package/es/version.d.ts +1 -1
  165. package/es/version.js +1 -1
  166. package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -0
  167. package/lib/_internal/selection/src/Selection.d.ts +3 -0
  168. package/lib/_internal/suffix/src/Suffix.d.ts +4 -1
  169. package/lib/_internal/suffix/src/Suffix.js +4 -1
  170. package/lib/_styles/common/dark.js +1 -1
  171. package/lib/_styles/common/light.d.ts +3 -0
  172. package/lib/_styles/common/light.js +5 -2
  173. package/lib/_styles/global/index.cssr.js +10 -5
  174. package/lib/_styles/transitions/icon-switch.cssr.js +7 -2
  175. package/lib/_utils/naive/extract-public-props.d.ts +1 -1
  176. package/lib/alert/src/Alert.d.ts +3 -0
  177. package/lib/auto-complete/src/AutoComplete.d.ts +8 -1
  178. package/lib/auto-complete/src/AutoComplete.js +2 -2
  179. package/lib/avatar/src/Avatar.d.ts +8 -1
  180. package/lib/avatar/src/Avatar.js +40 -8
  181. package/lib/avatar/src/styles/index.cssr.js +2 -2
  182. package/lib/button/src/Button.d.ts +149 -52
  183. package/lib/button/src/Button.js +126 -54
  184. package/lib/button/src/interface.d.ts +1 -1
  185. package/lib/button/styles/dark.js +3 -0
  186. package/lib/button/styles/light.d.ts +14 -5
  187. package/lib/button/styles/light.js +10 -3
  188. package/lib/calendar/src/Calendar.d.ts +143 -50
  189. package/lib/calendar/styles/light.d.ts +14 -5
  190. package/lib/card/src/Card.d.ts +3 -0
  191. package/lib/cascader/src/Cascader.d.ts +3 -0
  192. package/lib/cascader/src/CascaderOption.d.ts +3 -0
  193. package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
  194. package/lib/cascader/src/CascaderSubmenu.d.ts +3 -0
  195. package/lib/checkbox/src/Checkbox.d.ts +8 -5
  196. package/lib/checkbox/src/Checkbox.js +3 -3
  197. package/lib/collapse/src/Collapse.d.ts +3 -0
  198. package/lib/color-picker/src/ColorInputUnit.d.ts +17 -5
  199. package/lib/color-picker/src/ColorPicker.d.ts +126 -45
  200. package/lib/color-picker/styles/light.d.ts +14 -5
  201. package/lib/data-table/src/DataTable.d.ts +183 -51
  202. package/lib/data-table/src/DataTable.js +11 -6
  203. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
  204. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
  205. package/lib/data-table/src/TableParts/Body.d.ts +25 -6
  206. package/lib/data-table/src/TableParts/Body.js +60 -22
  207. package/lib/data-table/src/TableParts/BodyCheckbox.js +1 -1
  208. package/lib/data-table/src/TableParts/Cell.d.ts +40 -10
  209. package/lib/data-table/src/TableParts/Header.d.ts +20 -5
  210. package/lib/data-table/src/TableParts/Header.js +1 -1
  211. package/lib/data-table/src/interface.d.ts +4 -1
  212. package/lib/data-table/src/styles/index.cssr.js +8 -9
  213. package/lib/data-table/styles/light.d.ts +20 -5
  214. package/lib/data-table/styles/light.js +3 -3
  215. package/lib/date-picker/src/DatePicker.d.ts +298 -105
  216. package/lib/date-picker/src/panel/date.d.ts +45 -15
  217. package/lib/date-picker/src/panel/daterange.d.ts +45 -15
  218. package/lib/date-picker/src/panel/datetime.d.ts +45 -15
  219. package/lib/date-picker/src/panel/datetimerange.d.ts +45 -15
  220. package/lib/date-picker/src/panel/month.d.ts +45 -15
  221. package/lib/date-picker/src/panel/use-calendar.d.ts +45 -15
  222. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +45 -15
  223. package/lib/date-picker/src/panel/use-panel-common.d.ts +45 -15
  224. package/lib/date-picker/styles/light.d.ts +28 -10
  225. package/lib/dialog/src/Dialog.d.ts +101 -35
  226. package/lib/dialog/styles/light.d.ts +14 -5
  227. package/lib/drawer/src/Drawer.d.ts +3 -0
  228. package/lib/drawer/src/DrawerBodyWrapper.d.ts +3 -0
  229. package/lib/drawer/src/DrawerContent.d.ts +3 -0
  230. package/lib/dropdown/index.d.ts +1 -1
  231. package/lib/dropdown/src/Dropdown.d.ts +5 -2
  232. package/lib/dropdown/src/DropdownGroup.d.ts +2 -3
  233. package/lib/dropdown/src/DropdownMenu.d.ts +3 -4
  234. package/lib/dropdown/src/DropdownMenu.js +5 -4
  235. package/lib/dropdown/src/DropdownOption.d.ts +3 -4
  236. package/lib/dropdown/src/DropdownOption.js +1 -1
  237. package/lib/dropdown/src/DropdownRenderOption.d.ts +2 -3
  238. package/lib/dropdown/src/interface.d.ts +9 -30
  239. package/lib/dropdown/src/utils.d.ts +1 -0
  240. package/lib/dropdown/src/utils.js +12 -1
  241. package/lib/dynamic-input/src/DynamicInput.d.ts +143 -50
  242. package/lib/dynamic-input/src/InputPreset.d.ts +17 -5
  243. package/lib/dynamic-input/src/PairPreset.d.ts +17 -5
  244. package/lib/dynamic-input/styles/light.d.ts +14 -5
  245. package/lib/dynamic-tags/src/DynamicTags.d.ts +144 -50
  246. package/lib/dynamic-tags/styles/light.d.ts +14 -5
  247. package/lib/ellipsis/src/Ellipsis.d.ts +3 -0
  248. package/lib/global-style/src/GlobalStyle.js +2 -0
  249. package/lib/input/src/Input.d.ts +4 -0
  250. package/lib/input/src/Input.js +6 -0
  251. package/lib/input/src/interface.d.ts +1 -0
  252. package/lib/input-number/src/InputNumber.d.ts +144 -50
  253. package/lib/input-number/styles/light.d.ts +14 -5
  254. package/lib/layout/src/Layout.d.ts +6 -0
  255. package/lib/layout/src/LayoutContent.d.ts +3 -0
  256. package/lib/layout/src/LayoutSider.d.ts +3 -0
  257. package/lib/log/src/Log.d.ts +3 -0
  258. package/lib/mention/src/Mention.d.ts +4 -0
  259. package/lib/menu/index.d.ts +1 -1
  260. package/lib/menu/src/Menu.d.ts +19 -6
  261. package/lib/menu/src/Menu.js +2 -1
  262. package/lib/menu/src/MenuDivider.d.ts +2 -0
  263. package/lib/menu/src/MenuDivider.js +13 -0
  264. package/lib/menu/src/MenuOption.d.ts +8 -1
  265. package/lib/menu/src/MenuOptionContent.d.ts +4 -1
  266. package/lib/menu/src/Submenu.d.ts +18 -16
  267. package/lib/menu/src/interface.d.ts +23 -4
  268. package/lib/menu/src/styles/index.cssr.js +6 -1
  269. package/lib/menu/src/utils.d.ts +4 -2
  270. package/lib/menu/src/utils.js +22 -3
  271. package/lib/menu/styles/light.d.ts +2 -0
  272. package/lib/menu/styles/light.js +3 -2
  273. package/lib/modal/src/BodyWrapper.d.ts +31 -10
  274. package/lib/modal/src/Modal.d.ts +168 -60
  275. package/lib/modal/styles/light.d.ts +14 -5
  276. package/lib/notification/src/NotificationContainer.d.ts +3 -0
  277. package/lib/pagination/src/Pagination.d.ts +4 -0
  278. package/lib/popconfirm/src/Popconfirm.d.ts +143 -50
  279. package/lib/popconfirm/styles/light.d.ts +14 -5
  280. package/lib/popselect/src/Popselect.d.ts +3 -0
  281. package/lib/popselect/src/PopselectPanel.d.ts +3 -0
  282. package/lib/radio/src/Radio.d.ts +3 -0
  283. package/lib/radio/src/RadioButton.d.ts +3 -0
  284. package/lib/radio/src/use-radio.d.ts +2 -0
  285. package/lib/radio/src/use-radio.js +6 -3
  286. package/lib/select/src/Select.d.ts +3 -0
  287. package/lib/slider/src/Slider.d.ts +70 -91
  288. package/lib/slider/src/Slider.js +324 -581
  289. package/lib/slider/src/interface.d.ts +1 -1
  290. package/lib/slider/src/styles/index.cssr.js +86 -16
  291. package/lib/slider/src/utils.d.ts +10 -1
  292. package/lib/slider/src/utils.js +11 -1
  293. package/lib/slider/styles/_common.d.ts +1 -0
  294. package/lib/slider/styles/_common.js +1 -0
  295. package/lib/slider/styles/light.d.ts +1 -0
  296. package/lib/space/src/Space.js +2 -0
  297. package/lib/steps/src/Step.js +1 -1
  298. package/lib/table/src/Table.d.ts +35 -0
  299. package/lib/table/src/Table.js +8 -4
  300. package/lib/table/src/styles/index.cssr.js +1 -1
  301. package/lib/table/styles/light.d.ts +3 -0
  302. package/lib/table/styles/light.js +2 -2
  303. package/lib/tabs/index.d.ts +2 -0
  304. package/lib/tabs/index.js +3 -1
  305. package/lib/tabs/src/Tab.d.ts +35 -18
  306. package/lib/tabs/src/Tab.js +10 -11
  307. package/lib/tabs/src/Tabs.js +57 -17
  308. package/lib/tag/src/Tag.d.ts +8 -3
  309. package/lib/tag/src/Tag.js +10 -1
  310. package/lib/tag/src/styles/index.cssr.js +10 -5
  311. package/lib/tag/src/styles/rtl.cssr.js +7 -1
  312. package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
  313. package/lib/time-picker/src/Panel.d.ts +17 -5
  314. package/lib/time-picker/src/TimePicker.d.ts +144 -50
  315. package/lib/time-picker/styles/light.d.ts +14 -5
  316. package/lib/tooltip/src/Tooltip.d.ts +3 -0
  317. package/lib/transfer/src/Transfer.d.ts +143 -50
  318. package/lib/transfer/src/TransferFilter.d.ts +17 -5
  319. package/lib/transfer/src/TransferList.d.ts +17 -5
  320. package/lib/transfer/src/TransferListItem.d.ts +17 -5
  321. package/lib/transfer/styles/light.d.ts +14 -5
  322. package/lib/tree/src/Tree.d.ts +3 -0
  323. package/lib/tree/src/TreeNodeCheckbox.d.ts +3 -0
  324. package/lib/tree-select/src/TreeSelect.d.ts +3 -0
  325. package/lib/upload/src/Upload.d.ts +143 -50
  326. package/lib/upload/src/UploadFile.d.ts +18 -6
  327. package/lib/upload/src/UploadProgress.d.ts +17 -5
  328. package/lib/upload/styles/light.d.ts +14 -5
  329. package/lib/version.d.ts +1 -1
  330. package/lib/version.js +1 -1
  331. package/package.json +3 -3
  332. package/web-types.json +146 -9
@@ -282,6 +282,9 @@ declare const _default: import("vue").DefineComponent<{
282
282
  pressedColor: string;
283
283
  opacityDisabled: string;
284
284
  inputColorDisabled: string;
285
+ buttonColor2: string;
286
+ buttonColor2Hover: string;
287
+ buttonColor2Pressed: string;
285
288
  boxShadow1: string;
286
289
  boxShadow2: string;
287
290
  boxShadow3: string;
@@ -335,6 +335,9 @@ declare const _default: import("vue").DefineComponent<{
335
335
  pressedColor: string;
336
336
  opacityDisabled: string;
337
337
  inputColorDisabled: string;
338
+ buttonColor2: string;
339
+ buttonColor2Hover: string;
340
+ buttonColor2Pressed: string;
338
341
  boxShadow1: string;
339
342
  boxShadow2: string;
340
343
  boxShadow3: string;
@@ -12,7 +12,10 @@ declare const _default: import("vue").DefineComponent<{
12
12
  type: BooleanConstructor;
13
13
  default: undefined;
14
14
  };
15
- loading: BooleanConstructor;
15
+ loading: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
16
19
  onClear: PropType<(e: MouseEvent) => void>;
17
20
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
18
21
  clsPrefix?: unknown;
@@ -18,7 +18,10 @@ export default defineComponent({
18
18
  type: Boolean,
19
19
  default: undefined
20
20
  },
21
- loading: Boolean,
21
+ loading: {
22
+ type: Boolean,
23
+ default: false
24
+ },
22
25
  onClear: Function
23
26
  },
24
27
  setup(props) {
@@ -87,5 +87,5 @@ const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables)
87
87
  // close
88
88
  closeColorHover: overlay(Number(base.alphaClose) * 1.25), closeColor: overlay(Number(base.alphaClose)), closeColorPressed: overlay(Number(base.alphaClose) * 0.8), closeColorDisabled: overlay(base.alpha4),
89
89
  // clear
90
- clearColor: overlay(base.alpha4), clearColorHover: scaleColor(overlay(base.alpha4), { alpha: 1.25 }), clearColorPressed: scaleColor(overlay(base.alpha4), { alpha: 0.8 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: overlay(base.alphaProgressRail), railColor: overlay(base.alphaRail), popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: neutral(base.alphaTag), avatarColor: overlay(base.alphaAvatar), invertedColor: base.neutralBase, inputColor: overlay(base.alphaInput), codeColor: overlay(base.alphaCode), tabColor: overlay(base.alphaTab), actionColor: overlay(base.alphaAction), tableHeaderColor: overlay(base.alphaAction), hoverColor: overlay(base.alphaPending), tableColorHover: overlay(base.alphaTablePending), pressedColor: overlay(base.alphaPressed), opacityDisabled: base.alphaDisabled, inputColorDisabled: overlay(base.alphaDisabledInput), boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
90
+ clearColor: overlay(base.alpha4), clearColorHover: scaleColor(overlay(base.alpha4), { alpha: 1.25 }), clearColorPressed: scaleColor(overlay(base.alpha4), { alpha: 0.8 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: overlay(base.alphaProgressRail), railColor: overlay(base.alphaRail), popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: neutral(base.alphaTag), avatarColor: overlay(base.alphaAvatar), invertedColor: base.neutralBase, inputColor: overlay(base.alphaInput), codeColor: overlay(base.alphaCode), tabColor: overlay(base.alphaTab), actionColor: overlay(base.alphaAction), tableHeaderColor: overlay(base.alphaAction), hoverColor: overlay(base.alphaPending), tableColorHover: overlay(base.alphaTablePending), pressedColor: overlay(base.alphaPressed), opacityDisabled: base.alphaDisabled, inputColorDisabled: overlay(base.alphaDisabledInput), buttonColor2: 'rgba(255, 255, 255, .06)', buttonColor2Hover: 'rgba(255, 255, 255, .09)', buttonColor2Pressed: 'rgba(255, 255, 255, .05)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
91
91
  export default derived;
@@ -70,6 +70,9 @@ declare const derived: {
70
70
  pressedColor: string;
71
71
  opacityDisabled: string;
72
72
  inputColorDisabled: string;
73
+ buttonColor2: string;
74
+ buttonColor2Hover: string;
75
+ buttonColor2Pressed: string;
73
76
  boxShadow1: string;
74
77
  boxShadow2: string;
75
78
  boxShadow3: string;
@@ -80,7 +80,7 @@ const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables)
80
80
  // error color
81
81
  errorColor: base.errorDefault, errorColorHover: base.errorHover, errorColorPressed: base.errorActive, errorColorSuppl: base.errorSuppl,
82
82
  // text color
83
- textColorBase: base.neutralTextBase, textColor1: 'rgb(31, 34, 37)', textColor2: 'rgb(51, 54, 57)', textColor3: 'rgb(158, 164, 170)',
83
+ textColorBase: base.neutralTextBase, textColor1: 'rgb(31, 34, 37)', textColor2: 'rgb(51, 54, 57)', textColor3: 'rgb(118, 124, 130)',
84
84
  // textColor4: neutral(base.alpha4), // disabled, placeholder, icon
85
85
  // textColor5: neutral(base.alpha5),
86
86
  textColorDisabled: neutral(base.alpha4), placeholderColor: neutral(base.alpha4), placeholderColorDisabled: neutral(base.alpha5), iconColor: neutral(base.alpha4), iconColorHover: scaleColor(neutral(base.alpha4), { lightness: 0.75 }), iconColorPressed: scaleColor(neutral(base.alpha4), { lightness: 0.9 }), iconColorDisabled: neutral(base.alpha5), opacity1: base.alpha1, opacity2: base.alpha2, opacity3: base.alpha3, opacity4: base.alpha4, opacity5: base.alpha5, dividerColor: 'rgb(239, 239, 245)', borderColor: 'rgb(224, 224, 230)',
@@ -89,5 +89,8 @@ const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables)
89
89
  // clear
90
90
  clearColor: neutral(base.alpha4), clearColorHover: scaleColor(neutral(base.alpha4), { lightness: 0.75 }), clearColorPressed: scaleColor(neutral(base.alpha4), { lightness: 0.9 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: neutral(base.alphaProgressRail), railColor: 'rgb(219, 219, 223)', popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: 'rgb(250, 250, 252)', avatarColor: neutral(base.alphaAvatar), invertedColor: 'rgb(0, 20, 40)', inputColor: neutral(base.alphaInput), codeColor: 'rgb(244, 244, 248)', tabColor: 'rgb(247, 247, 250)', actionColor: 'rgb(250, 250, 252)', tableHeaderColor: 'rgb(250, 250, 252)', hoverColor: 'rgb(243, 243, 245)',
91
91
  // use color with alpha since it can be nested with header filter & sorter effect
92
- tableColorHover: 'rgba(0, 0, 100, 0.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
92
+ tableColorHover: 'rgba(0, 0, 100, 0.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)',
93
+ // secondary button color
94
+ // can also be used in tertiary button & quaternary button
95
+ buttonColor2: 'rgba(46, 51, 56, .05)', buttonColor2Hover: 'rgba(46, 51, 56, .09)', buttonColor2Pressed: 'rgba(46, 51, 56, .13)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' });
93
96
  export default derived;
@@ -1,5 +1,10 @@
1
1
  import { c } from '../../_utils/cssr';
2
- import commonVariables from '../common/_common'; // All the components need the style
2
+ import commonVariables from '../common/_common';
3
+ const {
4
+ fontSize,
5
+ fontFamily,
6
+ lineHeight
7
+ } = commonVariables; // All the components need the style
3
8
  // It is static and won't be changed in the app's lifetime
4
9
  // If user want to overrides it they need to use `n-global-style` is provided
5
10
  //
@@ -12,9 +17,9 @@ import commonVariables from '../common/_common'; // All the components need the
12
17
 
13
18
  export default c('body', `
14
19
  margin: 0;
15
- font-size: ${commonVariables.fontSize};
16
- font-family: ${commonVariables.fontFamily};
17
- line-height: ${commonVariables.lineHeight};
20
+ font-size: ${fontSize};
21
+ font-family: ${fontFamily};
22
+ line-height: ${lineHeight};
18
23
  -webkit-text-size-adjust: 100%;
19
24
  -webkit-tap-highlight-color: transparent;
20
25
  `, [c('input', `
@@ -1,10 +1,14 @@
1
1
  import { c } from '../../_utils/cssr';
2
2
  import commonVariables from '../common/_common';
3
+ const {
4
+ cubicBezierEaseInOut,
5
+ transformDebounceScale
6
+ } = commonVariables;
3
7
  export default function ({
4
8
  originalTransform = '',
5
9
  left = 0,
6
10
  top = 0,
7
- transition = `all .3s ${commonVariables.cubicBezierEaseInOut} !important`
11
+ transition = `all .3s ${cubicBezierEaseInOut} !important`
8
12
  } = {}) {
9
13
  return [c('&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to', {
10
14
  transform: originalTransform + ' scale(0.75)',
@@ -12,7 +16,7 @@ export default function ({
12
16
  top,
13
17
  opacity: 0
14
18
  }), c('&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from', {
15
- transform: `${commonVariables.transformDebounceScale} ${originalTransform}`,
19
+ transform: `${transformDebounceScale} ${originalTransform}`,
16
20
  left,
17
21
  top,
18
22
  opacity: 1
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
2
  import { useTheme } from '../../_mixins';
3
3
  declare type themePropKeys = keyof typeof useTheme.props;
4
- export declare type ExtractPublicPropTypes<T> = Omit<Partial<ExtractPropTypes<T>>, themePropKeys | Extract<keyof T, `internal${string}`>>;
4
+ export declare type ExtractPublicPropTypes<T> = Omit<Partial<ExtractPropTypes<T>>, Exclude<themePropKeys, 'themeOverrides'> | Extract<keyof T, `internal${string}`>>;
5
5
  export declare type ExtractInternalPropTypes<T> = Partial<ExtractPropTypes<T>>;
6
6
  export {};
@@ -440,6 +440,9 @@ declare const _default: import("vue").DefineComponent<{
440
440
  pressedColor: string;
441
441
  opacityDisabled: string;
442
442
  inputColorDisabled: string;
443
+ buttonColor2: string;
444
+ buttonColor2Hover: string;
445
+ buttonColor2Pressed: string;
443
446
  boxShadow1: string;
444
447
  boxShadow2: string;
445
448
  boxShadow3: string;
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, InputHTMLAttributes } from 'vue';
2
2
  import { TreeNode } from 'treemate';
3
3
  import { MaybeArray } from '../../_utils';
4
4
  import type { ExtractPublicPropTypes } from '../../_utils';
@@ -34,6 +34,7 @@ declare const autoCompleteProps: {
34
34
  readonly blurAfterSelect: BooleanConstructor;
35
35
  readonly clearAfterSelect: BooleanConstructor;
36
36
  readonly getShow: PropType<(inputValue: string) => boolean>;
37
+ readonly inputProps: PropType<InputHTMLAttributes>;
37
38
  readonly size: PropType<"small" | "medium" | "large">;
38
39
  readonly options: {
39
40
  readonly type: PropType<AutoCompleteOptions>;
@@ -430,6 +431,7 @@ declare const _default: import("vue").DefineComponent<{
430
431
  readonly blurAfterSelect: BooleanConstructor;
431
432
  readonly clearAfterSelect: BooleanConstructor;
432
433
  readonly getShow: PropType<(inputValue: string) => boolean>;
434
+ readonly inputProps: PropType<InputHTMLAttributes>;
433
435
  readonly size: PropType<"small" | "medium" | "large">;
434
436
  readonly options: {
435
437
  readonly type: PropType<AutoCompleteOptions>;
@@ -892,6 +894,9 @@ declare const _default: import("vue").DefineComponent<{
892
894
  pressedColor: string;
893
895
  opacityDisabled: string;
894
896
  inputColorDisabled: string;
897
+ buttonColor2: string;
898
+ buttonColor2Hover: string;
899
+ buttonColor2Pressed: string;
895
900
  boxShadow1: string;
896
901
  boxShadow2: string;
897
902
  boxShadow3: string;
@@ -1084,6 +1089,7 @@ declare const _default: import("vue").DefineComponent<{
1084
1089
  readonly blurAfterSelect?: unknown;
1085
1090
  readonly clearAfterSelect?: unknown;
1086
1091
  readonly getShow?: unknown;
1092
+ readonly inputProps?: unknown;
1087
1093
  readonly size?: unknown;
1088
1094
  readonly options?: unknown;
1089
1095
  readonly zIndex?: unknown;
@@ -1463,6 +1469,7 @@ declare const _default: import("vue").DefineComponent<{
1463
1469
  loading?: boolean | undefined;
1464
1470
  bordered?: boolean | undefined;
1465
1471
  clearable?: boolean | undefined;
1472
+ inputProps?: InputHTMLAttributes | undefined;
1466
1473
  "onUpdate:value"?: MaybeArray<OnUpdateValue> | undefined;
1467
1474
  onUpdateValue?: MaybeArray<OnUpdateValue> | undefined;
1468
1475
  getShow?: ((inputValue: string) => boolean) | undefined;
@@ -26,7 +26,7 @@ const autoCompleteProps = Object.assign(Object.assign({}, useTheme.props), { to:
26
26
  }, disabled: {
27
27
  type: Boolean,
28
28
  default: undefined
29
- }, placeholder: String, value: String, blurAfterSelect: Boolean, clearAfterSelect: Boolean, getShow: Function, size: String, options: {
29
+ }, placeholder: String, value: String, blurAfterSelect: Boolean, clearAfterSelect: Boolean, getShow: Function, inputProps: Object, size: String, options: {
30
30
  type: Array,
31
31
  default: () => []
32
32
  }, zIndex: Number, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onSelect: [Function, Array], onBlur: [Function, Array], onFocus: [Function, Array],
@@ -232,7 +232,7 @@ export default defineComponent({
232
232
  });
233
233
  }
234
234
  const { mergedTheme } = this;
235
- return (h(NInput, { theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }));
235
+ return (h(NInput, { theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, inputProps: this.inputProps, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }));
236
236
  }
237
237
  }),
238
238
  h(VFollower, { show: this.active, to: this.adjustedTo, containerClass: this.namespace, zIndex: this.zIndex, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, placement: "bottom-start", width: "target" }, {
@@ -14,6 +14,7 @@ declare const avatarProps: {
14
14
  };
15
15
  readonly round: BooleanConstructor;
16
16
  readonly onError: PropType<(e: Event) => void>;
17
+ readonly fallbackSrc: StringConstructor;
17
18
  readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
18
19
  borderRadius: string;
19
20
  fontSize: string;
@@ -60,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
60
61
  };
61
62
  readonly round: BooleanConstructor;
62
63
  readonly onError: PropType<(e: Event) => void>;
64
+ readonly fallbackSrc: StringConstructor;
63
65
  readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
64
66
  borderRadius: string;
65
67
  fontSize: string;
@@ -93,6 +95,7 @@ declare const _default: import("vue").DefineComponent<{
93
95
  }, {
94
96
  textRef: import("vue").Ref<HTMLElement | null>;
95
97
  selfRef: import("vue").Ref<HTMLElement | null>;
98
+ mergedRoundRef: import("vue").ComputedRef<boolean>;
96
99
  mergedClsPrefix: import("vue").ComputedRef<string>;
97
100
  fitTextTransform: () => void;
98
101
  cssVars: import("vue").ComputedRef<{
@@ -100,8 +103,10 @@ declare const _default: import("vue").DefineComponent<{
100
103
  '--border-radius': string;
101
104
  '--color': string;
102
105
  '--bezier': string;
103
- '--size': string;
106
+ '--merged-size': string;
104
107
  }>;
108
+ hasLoadError: import("vue").Ref<boolean>;
109
+ handleError: (e: Event) => void;
105
110
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
106
111
  readonly size?: unknown;
107
112
  readonly src?: unknown;
@@ -110,6 +115,7 @@ declare const _default: import("vue").DefineComponent<{
110
115
  readonly objectFit?: unknown;
111
116
  readonly round?: unknown;
112
117
  readonly onError?: unknown;
118
+ readonly fallbackSrc?: unknown;
113
119
  readonly theme?: unknown;
114
120
  readonly themeOverrides?: unknown;
115
121
  readonly builtinThemeOverrides?: unknown;
@@ -152,6 +158,7 @@ declare const _default: import("vue").DefineComponent<{
152
158
  heightHuge: string;
153
159
  color: string;
154
160
  }, any>> | undefined;
161
+ fallbackSrc?: string | undefined;
155
162
  }>, {
156
163
  round: boolean;
157
164
  size: number | "small" | "medium" | "large";
@@ -1,5 +1,6 @@
1
- import { h, ref, computed, defineComponent } from 'vue';
1
+ import { h, ref, computed, defineComponent, inject, watch } from 'vue';
2
2
  import { VResizeObserver } from 'vueuc';
3
+ import { tagInjectionKey } from '../../tag/src/Tag';
3
4
  import { useConfig, useTheme } from '../../_mixins';
4
5
  import { avatarLight } from '../styles';
5
6
  import { createKey } from '../../_utils';
@@ -10,12 +11,13 @@ const avatarProps = Object.assign(Object.assign({}, useTheme.props), { size: {
10
11
  }, src: String, circle: Boolean, color: String, objectFit: {
11
12
  type: String,
12
13
  default: 'fill'
13
- }, round: Boolean, onError: Function });
14
+ }, round: Boolean, onError: Function, fallbackSrc: String });
14
15
  export default defineComponent({
15
16
  name: 'Avatar',
16
17
  props: avatarProps,
17
18
  setup(props) {
18
19
  const { mergedClsPrefixRef } = useConfig(props);
20
+ const hasLoadErrorRef = ref(false);
19
21
  let memoedTextHtml = null;
20
22
  const textRef = ref(null);
21
23
  const selfRef = ref(null);
@@ -36,13 +38,31 @@ export default defineComponent({
36
38
  }
37
39
  };
38
40
  const themeRef = useTheme('Avatar', 'Avatar', style, avatarLight, props, mergedClsPrefixRef);
41
+ const TagInjection = inject(tagInjectionKey, null);
42
+ const mergedRoundRef = computed(() => {
43
+ if (props.round || props.circle)
44
+ return true;
45
+ if (TagInjection) {
46
+ return TagInjection.roundRef.value;
47
+ }
48
+ return false;
49
+ });
50
+ const handleError = (e) => {
51
+ hasLoadErrorRef.value = true;
52
+ const { onError } = props;
53
+ if (onError) {
54
+ onError(e);
55
+ }
56
+ };
57
+ watch(() => props.src, () => (hasLoadErrorRef.value = false));
39
58
  return {
40
59
  textRef,
41
60
  selfRef,
61
+ mergedRoundRef,
42
62
  mergedClsPrefix: mergedClsPrefixRef,
43
63
  fitTextTransform,
44
64
  cssVars: computed(() => {
45
- const { size, round, circle } = props;
65
+ const { size } = props;
46
66
  const { self: { borderRadius, fontSize, color }, common: { cubicBezierEaseInOut } } = themeRef.value;
47
67
  let height;
48
68
  if (typeof size === 'number') {
@@ -53,18 +73,30 @@ export default defineComponent({
53
73
  }
54
74
  return {
55
75
  '--font-size': fontSize,
56
- '--border-radius': round || circle ? '50%' : borderRadius,
76
+ '--border-radius': mergedRoundRef.value ? '50%' : borderRadius,
57
77
  '--color': color,
58
78
  '--bezier': cubicBezierEaseInOut,
59
- '--size': height
79
+ '--merged-size': `var(--avatar-size-override, ${height})`
60
80
  };
61
- })
81
+ }),
82
+ hasLoadError: hasLoadErrorRef,
83
+ handleError
62
84
  };
63
85
  },
64
86
  render() {
65
87
  const { $slots, src, mergedClsPrefix } = this;
66
- return (h("span", { ref: "selfRef", class: `${mergedClsPrefix}-avatar`, style: this.cssVars }, !$slots.default && src ? (h("img", { src: src, onError: this.onError, style: { objectFit: this.objectFit } })) : (h(VResizeObserver, { onResize: this.fitTextTransform }, {
67
- default: () => (h("span", { ref: "textRef", class: `${mergedClsPrefix}-avatar__text`, style: { background: this.color } }, $slots))
68
- }))));
88
+ let img;
89
+ if (this.hasLoadError) {
90
+ img = h("img", { src: this.fallbackSrc, style: { objectFit: this.objectFit } });
91
+ }
92
+ else if (!(!$slots.default && src)) {
93
+ img = (h(VResizeObserver, { onResize: this.fitTextTransform }, {
94
+ default: () => (h("span", { ref: "textRef", class: `${mergedClsPrefix}-avatar__text`, style: { background: this.color } }, $slots))
95
+ }));
96
+ }
97
+ else {
98
+ img = (h("img", { src: src, onError: this.handleError, style: { objectFit: this.objectFit } }));
99
+ }
100
+ return (h("span", { ref: "selfRef", class: `${mergedClsPrefix}-avatar`, style: this.cssVars }, img));
69
101
  }
70
102
  });
@@ -6,8 +6,8 @@ import { c, cE, cB } from '../../../_utils/cssr'; // vars:
6
6
  // --size
7
7
 
8
8
  export default cB('avatar', `
9
- width: var(--size);
10
- height: var(--size);
9
+ width: var(--merged-size);
10
+ height: var(--merged-size);
11
11
  color: #FFF;
12
12
  font-size: var(--font-size);
13
13
  display: inline-flex;