antdv-next 1.5.4 → 1.5.5

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 (250) hide show
  1. package/dist/_util/PurePanel.js +2 -1
  2. package/dist/_util/hooks/useMergeSemantic.js +3 -2
  3. package/dist/_util/styleUtils.d.ts +19 -1
  4. package/dist/_util/styleUtils.js +24 -1
  5. package/dist/_util/vnode/index.js +5 -5
  6. package/dist/_util/warning.d.ts +0 -1
  7. package/dist/affix/index.js +7 -18
  8. package/dist/alert/Alert.js +11 -12
  9. package/dist/anchor/Anchor.d.ts +1 -1
  10. package/dist/anchor/Anchor.js +16 -7
  11. package/dist/anchor/AnchorLink.js +3 -2
  12. package/dist/antd-with-locales.esm.js +17385 -16357
  13. package/dist/antd-with-locales.js +82 -82
  14. package/dist/antd.css +1 -1
  15. package/dist/antd.esm.js +14426 -13585
  16. package/dist/antd.js +94 -94
  17. package/dist/app/App.js +1 -1
  18. package/dist/app/index.js +0 -3
  19. package/dist/auto-complete/index.js +11 -4
  20. package/dist/avatar/Avatar.d.ts +4 -1
  21. package/dist/avatar/Avatar.js +21 -13
  22. package/dist/avatar/AvatarGroup.js +2 -2
  23. package/dist/avatar/index.d.ts +2 -2
  24. package/dist/badge/Ribbon.js +3 -4
  25. package/dist/badge/index.js +11 -9
  26. package/dist/breadcrumb/Breadcrumb.js +6 -3
  27. package/dist/breadcrumb/BreadcrumbItem.js +4 -3
  28. package/dist/breadcrumb/useItemRender.js +5 -8
  29. package/dist/button/Button.js +2 -0
  30. package/dist/card/Card.js +6 -7
  31. package/dist/carousel/index.d.ts +1 -1
  32. package/dist/carousel/index.js +7 -8
  33. package/dist/cascader/Panel.d.ts +1 -0
  34. package/dist/cascader/Panel.js +2 -1
  35. package/dist/cascader/index.d.ts +5 -4
  36. package/dist/cascader/index.js +8 -6
  37. package/dist/checkbox/Checkbox.js +14 -28
  38. package/dist/collapse/Collapse.d.ts +0 -3
  39. package/dist/collapse/Collapse.js +2 -2
  40. package/dist/color-picker/ColorPicker.js +2 -2
  41. package/dist/color-picker/components/ColorClear.d.ts +1 -0
  42. package/dist/color-picker/components/ColorClear.js +14 -4
  43. package/dist/color-picker/components/ColorPresets.js +4 -4
  44. package/dist/color-picker/components/ColorSlider.js +8 -2
  45. package/dist/color-picker/components/ColorTrigger.js +3 -2
  46. package/dist/color-picker/interface.d.ts +0 -2
  47. package/dist/color-picker/style/index.js +5 -6
  48. package/dist/components.d.ts +2 -2
  49. package/dist/config-provider/context.d.ts +2 -5
  50. package/dist/config-provider/index.d.ts +2 -2
  51. package/dist/date-picker/generatePicker/generateRangePicker.d.ts +4 -3
  52. package/dist/date-picker/generatePicker/generateRangePicker.js +3 -1
  53. package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +1 -0
  54. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -1
  55. package/dist/date-picker/generatePicker/index.d.ts +1 -1
  56. package/dist/date-picker/generatePicker/interface.d.ts +0 -2
  57. package/dist/date-picker/generatePicker/useComponents.d.ts +3 -3
  58. package/dist/date-picker/index.d.ts +3 -2
  59. package/dist/date-picker/locale/bn_BD.js +1 -0
  60. package/dist/date-picker/locale/et_EE.js +8 -0
  61. package/dist/date-picker/locale/eu_ES.js +8 -0
  62. package/dist/date-picker/locale/ga_IE.js +1 -0
  63. package/dist/date-picker/locale/is_IS.js +8 -0
  64. package/dist/date-picker/locale/ka_GE.js +1 -0
  65. package/dist/date-picker/locale/kk_KZ.js +1 -0
  66. package/dist/date-picker/locale/km_KH.js +1 -0
  67. package/dist/date-picker/locale/kmr_IQ.js +8 -0
  68. package/dist/date-picker/locale/lv_LV.js +8 -0
  69. package/dist/date-picker/locale/mk_MK.js +8 -0
  70. package/dist/date-picker/locale/ml_IN.js +1 -0
  71. package/dist/date-picker/locale/mn_MN.js +8 -0
  72. package/dist/date-picker/locale/sl_SI.js +8 -0
  73. package/dist/date-picker/locale/ta_IN.js +1 -0
  74. package/dist/date-picker/locale/ur_PK.js +1 -0
  75. package/dist/date-picker/locale/uz_UZ.js +1 -0
  76. package/dist/descriptions/Row.js +3 -2
  77. package/dist/descriptions/hooks/useItems.d.ts +8 -8
  78. package/dist/descriptions/index.js +6 -3
  79. package/dist/divider/index.d.ts +0 -1
  80. package/dist/drawer/DrawerPanel.js +4 -1
  81. package/dist/drawer/index.d.ts +0 -3
  82. package/dist/drawer/index.js +15 -3
  83. package/dist/dropdown/index.js +0 -3
  84. package/dist/float-button/BackTop.d.ts +4 -2
  85. package/dist/float-button/BackTop.js +12 -4
  86. package/dist/float-button/FloatButton.d.ts +2 -2
  87. package/dist/float-button/FloatButton.js +10 -3
  88. package/dist/float-button/FloatButtonGroup.d.ts +2 -2
  89. package/dist/float-button/FloatButtonGroup.js +10 -3
  90. package/dist/float-button/PurePanel.js +20 -8
  91. package/dist/form/FormItem/index.js +4 -3
  92. package/dist/form/FormItemInput.js +4 -2
  93. package/dist/form/context.d.ts +1 -1
  94. package/dist/form/hooks/useVariant.d.ts +1 -1
  95. package/dist/grid/col.js +1 -1
  96. package/dist/grid/row.js +1 -1
  97. package/dist/image/PreviewGroup.js +7 -5
  98. package/dist/image/hooks/usePreviewConfig.d.ts +5 -5
  99. package/dist/image/hooks/usePreviewConfig.js +1 -1
  100. package/dist/image/index.js +3 -4
  101. package/dist/index.d.ts +2 -2
  102. package/dist/input/Input.d.ts +0 -1
  103. package/dist/input/Input.js +16 -4
  104. package/dist/input/OTP/OTPInput.js +16 -4
  105. package/dist/input/Password.js +12 -3
  106. package/dist/input/Search.js +16 -4
  107. package/dist/input/TextArea.d.ts +0 -1
  108. package/dist/input/TextArea.js +17 -2
  109. package/dist/input/style/index.d.ts +2 -1
  110. package/dist/input/style/index.js +12 -11
  111. package/dist/input/style/variants.js +1 -4
  112. package/dist/input-number/index.d.ts +0 -1
  113. package/dist/input-number/index.js +30 -9
  114. package/dist/input-number/style/index.js +13 -39
  115. package/dist/listy/index.js +13 -8
  116. package/dist/listy/interface.d.ts +2 -2
  117. package/dist/locale/az_AZ.js +4 -0
  118. package/dist/locale/bn_BD.js +4 -0
  119. package/dist/locale/by_BY.js +4 -0
  120. package/dist/locale/eu_ES.js +4 -0
  121. package/dist/locale/ga_IE.js +4 -0
  122. package/dist/locale/hy_AM.js +20 -2
  123. package/dist/locale/is_IS.js +4 -0
  124. package/dist/locale/ka_GE.js +4 -0
  125. package/dist/locale/kk_KZ.js +4 -0
  126. package/dist/locale/km_KH.js +4 -0
  127. package/dist/locale/kmr_IQ.js +4 -0
  128. package/dist/locale/kn_IN.js +4 -0
  129. package/dist/locale/ku_IQ.js +4 -0
  130. package/dist/locale/mk_MK.js +4 -0
  131. package/dist/locale/ml_IN.js +4 -0
  132. package/dist/locale/mn_MN.js +4 -0
  133. package/dist/locale/mr_IN.js +4 -0
  134. package/dist/locale/my_MM.js +4 -0
  135. package/dist/locale/ne_NP.js +4 -0
  136. package/dist/locale/si_LK.js +4 -0
  137. package/dist/locale/sq_AL.js +4 -0
  138. package/dist/locale/ta_IN.js +4 -0
  139. package/dist/locale/tk_TK.js +4 -0
  140. package/dist/locale/ur_PK.js +4 -0
  141. package/dist/locale/uz_UZ.js +4 -0
  142. package/dist/masonry/Masonry.js +9 -1
  143. package/dist/mentions/index.d.ts +1 -1
  144. package/dist/mentions/index.js +7 -3
  145. package/dist/menu/MenuContext.js +4 -1
  146. package/dist/menu/MenuItem.js +2 -2
  147. package/dist/menu/OverrideContext.js +4 -1
  148. package/dist/message/PurePanel.js +2 -1
  149. package/dist/message/index.js +14 -9
  150. package/dist/message/interface.d.ts +8 -0
  151. package/dist/message/useMessage.d.ts +1 -1
  152. package/dist/message/useMessage.js +26 -32
  153. package/dist/modal/ConfirmDialog.js +1 -1
  154. package/dist/modal/Modal.js +3 -2
  155. package/dist/modal/PurePanel.js +2 -2
  156. package/dist/modal/interface.d.ts +0 -6
  157. package/dist/modal/shared.js +2 -1
  158. package/dist/notification/PurePanel.d.ts +1 -1
  159. package/dist/notification/PurePanel.js +12 -10
  160. package/dist/notification/index.js +4 -1
  161. package/dist/notification/interface.d.ts +4 -0
  162. package/dist/notification/useNotification.js +19 -21
  163. package/dist/package.js +1 -1
  164. package/dist/pagination/Pagination.js +3 -4
  165. package/dist/popconfirm/index.js +4 -1
  166. package/dist/popover/PurePanel.js +8 -2
  167. package/dist/popover/index.js +4 -1
  168. package/dist/qrcode/QrcodeStatus.js +4 -1
  169. package/dist/qrcode/index.js +2 -1
  170. package/dist/radio/group.js +2 -2
  171. package/dist/radio/radio.js +2 -2
  172. package/dist/rate/index.d.ts +1 -1
  173. package/dist/rate/index.js +1 -5
  174. package/dist/result/index.js +4 -3
  175. package/dist/segmented/index.js +8 -2
  176. package/dist/select/index.d.ts +2 -3
  177. package/dist/select/index.js +2 -2
  178. package/dist/skeleton/Element.js +2 -2
  179. package/dist/slider/SliderTooltip.js +4 -1
  180. package/dist/slider/index.d.ts +1 -0
  181. package/dist/slider/index.js +5 -3
  182. package/dist/space/Compact.d.ts +1 -1
  183. package/dist/spin/index.js +2 -2
  184. package/dist/splitter/Panel.js +12 -3
  185. package/dist/splitter/SplitBar.js +12 -1
  186. package/dist/splitter/Splitter.js +2 -1
  187. package/dist/splitter/hooks/sizeUtil.js +17 -1
  188. package/dist/splitter/interface.d.ts +3 -1
  189. package/dist/splitter/style/index.js +6 -1
  190. package/dist/statistic/Number.js +2 -1
  191. package/dist/statistic/Statistic.js +2 -2
  192. package/dist/steps/index.js +3 -4
  193. package/dist/switch/index.d.ts +0 -2
  194. package/dist/table/Column.d.ts +5 -1
  195. package/dist/table/Column.js +10 -1
  196. package/dist/table/ColumnGroup.js +5 -0
  197. package/dist/table/InternalTable.d.ts +4 -1
  198. package/dist/table/InternalTable.js +28 -18
  199. package/dist/table/Table.js +16 -5
  200. package/dist/table/hooks/useFilter/index.d.ts +3 -1
  201. package/dist/table/hooks/useFilter/index.js +2 -2
  202. package/dist/table/hooks/useSelection.js +7 -3
  203. package/dist/table/interface.d.ts +10 -3
  204. package/dist/table/style/index.js +30 -2
  205. package/dist/table/util.d.ts +1 -1
  206. package/dist/table/utils.js +20 -2
  207. package/dist/tabs/index.d.ts +2 -0
  208. package/dist/tabs/index.js +11 -6
  209. package/dist/tag/CheckableTag.d.ts +0 -3
  210. package/dist/tag/CheckableTagGroup.js +18 -2
  211. package/dist/tag/hooks/useColor.d.ts +1 -1
  212. package/dist/tag/index.js +2 -1
  213. package/dist/theme/context.d.ts +0 -1
  214. package/dist/theme/util/alias.js +3 -0
  215. package/dist/theme/util/genStyleUtils.d.ts +4 -0
  216. package/dist/time-picker/index.d.ts +8 -3
  217. package/dist/time-picker/index.js +46 -8
  218. package/dist/timeline/TimelineItem.js +4 -1
  219. package/dist/timeline/useItems.js +2 -1
  220. package/dist/tooltip/PurePanel.js +4 -1
  221. package/dist/tooltip/index.d.ts +5 -2
  222. package/dist/tooltip/index.js +4 -1
  223. package/dist/tooltip/style/index.d.ts +0 -1
  224. package/dist/tour/index.js +2 -3
  225. package/dist/tour/interface.d.ts +7 -5
  226. package/dist/tour/panelRender.js +6 -6
  227. package/dist/transfer/ListBody.js +1 -1
  228. package/dist/transfer/Section.js +3 -2
  229. package/dist/transfer/Transfer.js +37 -13
  230. package/dist/transfer/hooks/useSelection.js +1 -1
  231. package/dist/transfer/interface.d.ts +1 -1
  232. package/dist/tree/DirectoryTree.js +2 -1
  233. package/dist/tree/Tree.js +6 -6
  234. package/dist/tree/utils/dictUtil.js +2 -2
  235. package/dist/tree-select/index.d.ts +2 -3
  236. package/dist/tree-select/index.js +16 -8
  237. package/dist/typography/Base/Ellipsis.js +2 -1
  238. package/dist/typography/Base/index.js +6 -3
  239. package/dist/typography/Editable.js +2 -1
  240. package/dist/upload/Dragger.js +2 -4
  241. package/dist/upload/Upload.d.ts +0 -1
  242. package/dist/upload/Upload.js +2 -2
  243. package/dist/upload/UploadList/ListItem.d.ts +1 -0
  244. package/dist/upload/UploadList/ListItem.js +15 -9
  245. package/dist/upload/UploadList/index.js +1 -0
  246. package/dist/upload/interface.d.ts +6 -7
  247. package/dist/version/token.json +1 -1
  248. package/package.json +22 -22
  249. package/web-tags.json +1780 -1774
  250. package/web-types.json +6125 -6244
package/dist/app/App.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { devUseWarning } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
3
4
  import { AppConfigProvider, useAppConfig, useAppContextProvider } from "./context.js";
4
5
  import useMessage from "../message/useMessage.js";
5
6
  import useModal from "../modal/useModal/index.js";
@@ -7,7 +8,6 @@ import useNotification from "../notification/useNotification.js";
7
8
  import style_default from "./style/index.js";
8
9
  import { Fragment, computed, createVNode, defineComponent } from "vue";
9
10
  import { clsx } from "@v-c/util";
10
- import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
11
11
  //#region src/app/App.tsx
12
12
  const App = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
13
13
  const { direction, prefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("app", props);
package/dist/app/index.js CHANGED
@@ -2,9 +2,6 @@ import App$1 from "./App.js";
2
2
  import useApp from "./useApp.js";
3
3
  //#region src/app/index.tsx
4
4
  const App = App$1;
5
- App.install = (app) => {
6
- app.component(App.name, App);
7
- };
8
5
  App.useApp = useApp;
9
6
  //#endregion
10
7
  export { App as default };
@@ -1,10 +1,10 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
5
  import genPurePanel from "../_util/PurePanel.js";
6
6
  import Select from "../select/index.js";
7
- import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps } from "vue";
7
+ import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps, shallowRef } from "vue";
8
8
  import { clsx } from "@v-c/util";
9
9
  import { filterEmpty } from "@v-c/util/dist/props-util";
10
10
  import { omit } from "es-toolkit";
@@ -30,10 +30,16 @@ const omitKeys = [
30
30
  "onOpenChange",
31
31
  "onDropdownVisibleChange"
32
32
  ];
33
- const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
33
+ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
34
34
  const { prefixCls } = useComponentBaseConfig("select", props);
35
35
  const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
36
36
  const instance = getCurrentInstance();
37
+ const selectRef = shallowRef();
38
+ expose({
39
+ focus: () => selectRef.value?.focus(),
40
+ blur: () => selectRef.value?.blur(),
41
+ scrollTo: (arg) => selectRef.value?.scrollTo(arg)
42
+ });
37
43
  const mergedOnOpenChange = (open) => {
38
44
  if (instance?.vnode.props?.onOpenChange) emit("openChange", open);
39
45
  else emit("dropdownVisibleChange", open);
@@ -47,7 +53,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
47
53
  });
48
54
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
49
55
  return () => {
50
- const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
56
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
51
57
  const forwardedAttrs = omit(restAttrs, ["onOpenChange", "onDropdownVisibleChange"]);
52
58
  const childNodes = toArray(filterEmpty(slots.default?.() ?? []));
53
59
  const hasSelectOptions = !!childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0]);
@@ -173,6 +179,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
173
179
  emit("search", value);
174
180
  }
175
181
  }, getInputElement ? { getInputElement } : {}, {
182
+ "ref": selectRef,
176
183
  "prefixCls": prefixCls.value,
177
184
  "classes": finalClassNames,
178
185
  "styles": finalStyles,
@@ -34,6 +34,9 @@ interface AvatarSlots {
34
34
  src: () => any;
35
35
  default: () => any;
36
36
  }
37
+ interface AvatarRef {
38
+ nativeElement: HTMLSpanElement;
39
+ }
37
40
  declare const Avatar: import("vue").DefineSetupFnComponent<AvatarProps, AvatarEmits, SlotsType<AvatarSlots>, AvatarProps, import("vue").PublicProps>;
38
41
  //#endregion
39
- export { AvatarEmits, AvatarEmitsProps, AvatarProps, AvatarSlots, Avatar as default };
42
+ export { AvatarEmits, AvatarEmitsProps, AvatarProps, AvatarRef, AvatarSlots, Avatar as default };
@@ -1,8 +1,10 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
2
  import { useSize } from "../config-provider/hooks/useSize.js";
3
- import { getAttrStyleAndClass as getAttrStyleAndClass$1 } from "../_util/hooks/useMergeSemantic.js";
3
+ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
4
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
4
5
  import { getSlotPropsFnRun } from "../_util/tools.js";
5
6
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
7
+ import { isRenderable } from "../_util/is.js";
6
8
  import { responsiveArray } from "../_util/responsiveObserver.js";
7
9
  import useBreakpoint from "../grid/hooks/useBreakpoint.js";
8
10
  import { useAvatarContext } from "./AvatarContext.js";
@@ -12,12 +14,13 @@ import { clsx } from "@v-c/util";
12
14
  import { filterEmpty } from "@v-c/util/dist/props-util";
13
15
  import ResizeObserver from "@v-c/resize-observer";
14
16
  //#region src/avatar/Avatar.tsx
15
- const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
17
+ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
16
18
  const scale = shallowRef(1);
17
19
  const mounted = shallowRef(false);
18
20
  const isImgExist = shallowRef(true);
19
21
  const avatarNodeRef = shallowRef();
20
22
  const avatarChildrenRef = shallowRef();
23
+ expose({ nativeElement: avatarNodeRef });
21
24
  const { class: contextClassName, style: contextStyle, prefixCls } = useComponentBaseConfig("avatar", props);
22
25
  const avatarCtx = useAvatarContext();
23
26
  const setScaleParam = () => {
@@ -32,6 +35,10 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
32
35
  onMounted(() => {
33
36
  mounted.value = true;
34
37
  });
38
+ watch(() => [props.src, props.srcSet], () => {
39
+ isImgExist.value = true;
40
+ scale.value = 1;
41
+ }, { immediate: true });
35
42
  watch(() => props.gap, async () => {
36
43
  await nextTick();
37
44
  setScaleParam();
@@ -39,6 +46,9 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
39
46
  const handleImgLoadError = () => {
40
47
  if (props.onError?.() !== false) isImgExist.value = false;
41
48
  };
49
+ const handleClick = (e) => {
50
+ emit("click", e);
51
+ };
42
52
  const size = useSize((ctxSize) => props?.size ?? avatarCtx.value?.size ?? ctxSize ?? "medium");
43
53
  const screens = useBreakpoint(computed(() => {
44
54
  return Object.keys(typeof size.value === "object" ? size.value || {} : {}).some((key) => responsiveArray.includes(key));
@@ -48,6 +58,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
48
58
  return () => {
49
59
  const children = filterEmpty(slots?.default?.() ?? []);
50
60
  const icon = getSlotPropsFnRun(slots, props, "icon");
61
+ const hasIcon = isRenderable(icon);
51
62
  const { shape, rootClass, draggable, srcSet, crossOrigin, alt } = props;
52
63
  const responsiveSizeStyleFn = () => {
53
64
  if (typeof size.value !== "object") return {};
@@ -56,7 +67,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
56
67
  return currentSize ? {
57
68
  width: `${currentSize}px`,
58
69
  height: `${currentSize}px`,
59
- fontSize: currentSize && (icon || children.length) ? `${currentSize / 2}px` : "18px"
70
+ fontSize: currentSize && (hasIcon || children.length) ? `${currentSize / 2}px` : "18px"
60
71
  } : {};
61
72
  };
62
73
  const responsiveSizeStyle = responsiveSizeStyleFn();
@@ -65,21 +76,17 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
65
76
  [`${prefixCls.value}-sm`]: size.value === "small"
66
77
  });
67
78
  const src = getSlotPropsFnRun(slots, props, "src");
68
- if (src) {
69
- isImgExist.value = true;
70
- scale.value = 1;
71
- }
72
79
  const hasImageElement = isVNode(src);
73
80
  const mergedShape = shape || avatarCtx?.value?.shape || "circle";
74
- const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
81
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
75
82
  const classString = clsx(prefixCls.value, sizeCls, contextClassName.value, `${prefixCls.value}-${mergedShape}`, {
76
83
  [`${prefixCls.value}-image`]: hasImageElement || src && isImgExist.value,
77
- [`${prefixCls.value}-icon`]: !!icon
84
+ [`${prefixCls.value}-icon`]: hasIcon
78
85
  }, cssVarCls.value, rootCls.value, className, rootClass, hashId.value);
79
86
  const sizeStyle = typeof size.value === "number" ? {
80
87
  width: `${size.value}px`,
81
88
  height: `${size.value}px`,
82
- fontSize: icon ? `${size.value / 2}px` : "18px"
89
+ fontSize: hasIcon ? `${size.value / 2}px` : "18px"
83
90
  } : {};
84
91
  let childrenToRender;
85
92
  if (typeof src === "string" && isImgExist.value) childrenToRender = createVNode("img", {
@@ -91,7 +98,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
91
98
  "crossorigin": crossOrigin
92
99
  }, null);
93
100
  else if (hasImageElement) childrenToRender = src;
94
- else if (icon) childrenToRender = icon;
101
+ else if (hasIcon) childrenToRender = icon;
95
102
  else if (mounted.value || scale.value !== 1) {
96
103
  const transformString = `scale(${scale.value})`;
97
104
  const childrenStyle = {
@@ -113,10 +120,11 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
113
120
  "style": {
114
121
  ...sizeStyle,
115
122
  ...responsiveSizeStyle,
116
- ...contextStyle.value,
117
- ...style
123
+ ...normalizeStyle$1(contextStyle.value) || {},
124
+ ...normalizeStyle$1(style) || {}
118
125
  },
119
126
  "class": classString,
127
+ "onClick": handleClick,
120
128
  "ref": avatarNodeRef
121
129
  }), [childrenToRender]);
122
130
  };
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { getAttrStyleAndClass as getAttrStyleAndClass$1 } from "../_util/hooks/useMergeSemantic.js";
2
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
3
3
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
4
4
  import { useAvatarProvider } from "./AvatarContext.js";
5
5
  import style_default from "./style/index.js";
@@ -25,7 +25,7 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, expo
25
25
  return () => {
26
26
  const { rootClass, max } = props;
27
27
  const children = filterEmpty(slots?.default?.() ?? []);
28
- const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
28
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
29
29
  const cls = clsx(groupPrefixCls.value, { [`${groupPrefixCls.value}-rtl`]: direction.value === "rtl" }, cssVarCls.value, rootCls.value, className, rootClass, hashId.value);
30
30
  const childrenWithProps = children.map((child, index) => {
31
31
  if (isVNode(child)) return createVNode(child, { key: `avatar-key-${index}` });
@@ -1,4 +1,4 @@
1
- import Avatar$1, { AvatarEmits, AvatarProps, AvatarSlots } from "./Avatar.js";
1
+ import Avatar$1, { AvatarEmits, AvatarProps, AvatarRef, AvatarSlots } from "./Avatar.js";
2
2
  import AvatarGroup, { AvatarGroupProps, AvatarGroupRef } from "./AvatarGroup.js";
3
3
  //#region src/avatar/index.d.ts
4
4
  type CompoundedComponent = typeof Avatar$1 & {
@@ -6,4 +6,4 @@ type CompoundedComponent = typeof Avatar$1 & {
6
6
  };
7
7
  declare const Avatar: CompoundedComponent;
8
8
  //#endregion
9
- export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarSlots, Avatar as default };
9
+ export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarRef, type AvatarSlots, Avatar as default };
@@ -1,13 +1,12 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
- import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
2
+ import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
4
4
  import { isPresetColor } from "../_util/colors.js";
5
5
  import ribbon_default from "./style/ribbon.js";
6
6
  import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
7
7
  import { clsx } from "@v-c/util";
8
- import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
9
8
  var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
10
- const { styles, classes: ribbonClassNames } = toPropsRefs$1(props, "classes", "styles");
9
+ const { styles, classes: ribbonClassNames } = toPropsRefs(props, "classes", "styles");
11
10
  const { prefixCls, class: contextClassName, style: contextStyle, direction, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("ribbon", props);
12
11
  const wrapperCls = computed(() => `${prefixCls.value}-wrapper`);
13
12
  const [hashId, cssVarCls] = ribbon_default(prefixCls, wrapperCls);
@@ -1,9 +1,10 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
+ import { formatUnit } from "../_util/styleUtils.js";
3
4
  import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
5
  import { clsx as clsx$1, getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
6
  import { isPresetColor } from "../_util/colors.js";
6
- import { formatUnit } from "../_util/styleUtils.js";
7
+ import { isRenderable } from "../_util/is.js";
7
8
  import style_default from "./style/index.js";
8
9
  import Ribbon_default from "./Ribbon.js";
9
10
  import ScrollNumber_default from "./ScrollNumber.js";
@@ -47,8 +48,7 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
47
48
  const showAsDot = computed(() => props.dot && !isZero.value);
48
49
  const mergedCount = computed(() => showAsDot.value ? "" : numberedDisplayCount.value);
49
50
  const isHidden = computed(() => {
50
- const textEmpty = textNodes.value.length === 0 && (props.text === void 0 || props.text === null || props.text === "");
51
- return ((mergedCount.value === null || mergedCount.value === void 0 || mergedCount.value === "") && countNodes.value.length === 0 || isZero.value && !props.showZero) && !showAsDot.value && textEmpty;
51
+ return (!isRenderable(mergedCount.value) && countNodes.value.length === 0 && !isRenderable(props.text) && textNodes.value.length === 0 || isZero.value && !props.showZero) && !showAsDot.value;
52
52
  });
53
53
  const displayCountRef = shallowRef(mergedCount.value);
54
54
  const countCacheRef = shallowRef(props.count ?? null);
@@ -64,15 +64,14 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
64
64
  });
65
65
  const childrenNodes = computed(() => filterEmpty(slots.default?.() ?? []));
66
66
  const hasTextSlot = computed(() => textNodes.value.length > 0);
67
- const showStatusTextNode = computed(() => !isHidden.value && (hasTextSlot.value ? true : props.text === 0 ? props.showZero : !!props.text && props.text !== true));
68
- const isStatusBadge = computed(() => Boolean(!childrenNodes.value.length && hasStatus.value && (showStatusTextNode.value || hasStatusValue.value || !ignoreCount.value)));
67
+ const showStatusTextNode = computed(() => !isHidden.value && (hasTextSlot.value || (props.text === 0 ? props.showZero : !!props.text && props.text !== true)));
68
+ const isStatusBadge = computed(() => Boolean(!childrenNodes.value.length && hasStatus.value && (hasTextSlot.value || !!props.text || hasStatusValue.value || !ignoreCount.value)));
69
69
  const offsetStyle = computed(() => {
70
70
  if (!props.offset) return;
71
- const horizontalOffset = Number.parseInt(props.offset[0], 10);
72
- const insetInlineEnd = direction.value === "rtl" ? horizontalOffset : -horizontalOffset;
71
+ const horizontalOffset = Number.parseFloat(props.offset[0]);
73
72
  return {
74
73
  marginTop: formatUnit(props.offset[1]),
75
- insetInlineEnd: formatUnit(insetInlineEnd)
74
+ insetInlineEnd: formatUnit(-horizontalOffset)
76
75
  };
77
76
  });
78
77
  const mergedStyle = computed(() => ({
@@ -197,7 +196,10 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
197
196
  type: String,
198
197
  required: false
199
198
  },
200
- color: { required: false },
199
+ color: {
200
+ type: [String, Object],
201
+ required: false
202
+ },
201
203
  text: {
202
204
  type: [
203
205
  Function,
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
4
4
  import { useBreadcrumbProvider } from "./BreadcrumbContext.js";
5
5
  import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
@@ -124,7 +124,7 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
124
124
  });
125
125
  });
126
126
  }
127
- const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
127
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
128
128
  const breadcrumbClassName = clsx(prefixCls.value, contextClassName.value, { [`${prefixCls}-rtl`]: direction.value === "rtl" }, className, rootClass, mergedClassNames.value?.root, hashId.value, cssVarCls.value);
129
129
  const mergedStyle = {
130
130
  ...mergedStyles.value?.root,
@@ -142,7 +142,10 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
142
142
  type: String,
143
143
  required: false
144
144
  },
145
- params: { required: false },
145
+ params: {
146
+ type: Object,
147
+ required: false
148
+ },
146
149
  separator: { required: false },
147
150
  rootClass: {
148
151
  type: String,
@@ -27,7 +27,7 @@ const InternalBreadcrumbItem = /* @__PURE__ */ defineComponent((props, { slots }
27
27
  mergeDropDownProps.menu = {
28
28
  ...menuProps,
29
29
  items: items?.map(({ key, title, label, path, ...itemProps }, index) => {
30
- let mergedLabel = getSlotPropsFnRun({ label: title }, { label }, "label");
30
+ let mergedLabel = getSlotPropsFnRun({}, { label: isNonNullable(label) ? label : title }, "label");
31
31
  if (path) {
32
32
  (function() {
33
33
  return mergedLabel;
@@ -47,13 +47,14 @@ const InternalBreadcrumbItem = /* @__PURE__ */ defineComponent((props, { slots }
47
47
  return breadcrumbItem;
48
48
  };
49
49
  return () => {
50
- const { separator = "/", prefixCls } = props;
50
+ const { separator = "/", prefixCls, onClick } = props;
51
51
  const children = checkRenderNode(filterEmpty(slots?.default?.() ?? []));
52
52
  const { classes: mergedClassNames, styles: mergedStyles } = breadcrumbContext.value;
53
53
  const link = renderBreadcrumbNode(children);
54
54
  if (isNonNullable(link)) return createVNode(Fragment, null, [createVNode("li", {
55
55
  "class": clsx(`${prefixCls}-item`, mergedClassNames?.item),
56
- "style": mergedStyles?.item
56
+ "style": mergedStyles?.item,
57
+ "onClick": onClick
57
58
  }, [link]), isRenderable(separator) && createVNode(BreadcrumbSeparator, null, _isSlot(separator) ? separator : { default: () => [separator] })]);
58
59
  return null;
59
60
  };
@@ -17,14 +17,11 @@ function getBreadcrumbName(route, params, titleRender, index) {
17
17
  }
18
18
  function renderItem(prefixCls, item, children, href) {
19
19
  if (children === null || children === void 0) return null;
20
- const { class: className, onClick, ...restItem } = item;
21
- const passedProps = {
22
- ...pickAttrs(restItem, {
23
- data: true,
24
- aria: true
25
- }),
26
- onClick
27
- };
20
+ const { class: className, ...restItem } = item;
21
+ const passedProps = { ...pickAttrs(restItem, {
22
+ data: true,
23
+ aria: true
24
+ }) };
28
25
  if (href !== void 0) return createVNode("a", mergeProps(passedProps, {
29
26
  "class": clsx(`${prefixCls}-link`, className),
30
27
  "href": href
@@ -65,7 +65,9 @@ const InternalCompoundedButton = /* @__PURE__ */ defineComponent((props, { slots
65
65
  if (danger) return ["danger", colorVariantPair[1]];
66
66
  return colorVariantPair;
67
67
  }
68
+ if (variant === "solid") return ["primary", variant];
68
69
  if (contextColor?.value && contextVariant?.value) return [contextColor.value, contextVariant.value];
70
+ if (contextVariant?.value === "solid") return ["primary", contextVariant.value];
69
71
  return ["default", "outlined"];
70
72
  });
71
73
  const mergedColorVariant = computed(() => {
package/dist/card/Card.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { useSize } from "../config-provider/hooks/useSize.js";
4
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
+ import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
5
5
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
6
6
  import { isRenderable } from "../_util/is.js";
7
7
  import skeleton_default from "../skeleton/index.js";
@@ -55,7 +55,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
55
55
  return {
56
56
  ...props,
57
57
  size: mergedSize.value,
58
- variant: customVariant.value
58
+ variant: variant.value
59
59
  };
60
60
  });
61
61
  const contextStyleRoot = useSemanticRootStyle(contextStyle);
@@ -77,8 +77,8 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
77
77
  };
78
78
  const [hashId, cssVarCls] = style_default(prefixCls);
79
79
  return () => {
80
- const { activeTabKey, tabProps, defaultActiveTabKey, tabBarExtraContent, tabList, headStyle, bodyStyle, loading, rootClass, hoverable, type } = props;
81
- const { style, className, restAttrs } = getAttrStyleAndClass$1(attrs);
80
+ const { activeTabKey, tabProps, defaultActiveTabKey, tabList, headStyle, bodyStyle, loading, rootClass, hoverable, type } = props;
81
+ const { style, className, restAttrs } = getAttrStyleAndClass(attrs);
82
82
  const children = filterEmpty(slots?.default?.() ?? []);
83
83
  const title = getSlotPropsFnRun(slots, props, "title");
84
84
  const extra = getSlotPropsFnRun(slots, props, "extra");
@@ -93,11 +93,10 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
93
93
  "title": false
94
94
  }, _isSlot(children) ? children : { default: () => [children] });
95
95
  const hasActiveTabKey = activeTabKey !== void 0;
96
- const tabBarExtraContentSlot = typeof tabBarExtraContent === "object" && tabBarExtraContent ? tabBarExtraContent : getSlotPropsFnRun(slots, props, "tabBarExtraContent");
97
96
  const extraProps = {
98
97
  ...tabProps,
99
98
  [hasActiveTabKey ? "activeKey" : "defaultActiveKey"]: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,
100
- tabBarExtraContent: tabBarExtraContentSlot
99
+ tabBarExtraContent: getSlotPropsFnRun(slots, props, "tabBarExtraContent")
101
100
  };
102
101
  let head;
103
102
  const tabSize = mergedSize.value === "small" ? mergedSize.value : "large";
@@ -105,7 +104,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
105
104
  contentRender: slots?.tabContentRender,
106
105
  labelRender: slots?.tabLabelRender
107
106
  };
108
- const tabs = tabList ? createVNode(Tabs, mergeProps({ "size": tabSize }, extraProps, { "class": `${prefixCls.value}-head-size` }, { "onUpdate:activeKey": (key) => {
107
+ const tabs = tabList ? createVNode(Tabs, mergeProps({ "size": tabSize }, extraProps, { "class": `${prefixCls.value}-head-tabs` }, { "onUpdate:activeKey": (key) => {
109
108
  onTabChange(key);
110
109
  } }, { "items": tabList.map(({ tab, ...item }) => {
111
110
  return {
@@ -5,7 +5,7 @@ import { SlickProps } from "@v-c/slick";
5
5
  //#region src/carousel/index.d.ts
6
6
  type CarouselEffect = 'scrollx' | 'fade';
7
7
  type DotPlacement = 'top' | 'bottom' | 'start' | 'end';
8
- interface CarouselProps extends Omit<SlickProps, 'prevArrow' | 'nextArrow' | 'dots' | 'className' | 'style' | 'dotsClass' | 'autoplay' | 'onInit' | 'onReInit' | 'onEdge' | 'onSwipe' | 'onLazyLoad' | 'onLazyLoadError'>, ComponentBaseProps, CarouselEmitsProps {
8
+ interface CarouselProps extends Omit<SlickProps, 'prevArrow' | 'nextArrow' | 'dots' | 'className' | 'style' | 'dotsClass' | 'autoplay' | 'verticalSwiping' | 'onInit' | 'onReInit' | 'onEdge' | 'onSwipe' | 'onLazyLoad' | 'onLazyLoadError'>, ComponentBaseProps, CarouselEmitsProps {
9
9
  effect?: CarouselEffect;
10
10
  id?: string;
11
11
  slickGoTo?: number;
@@ -1,6 +1,6 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
- import { getAttrStyleAndClass as getAttrStyleAndClass$1 } from "../_util/hooks/useMergeSemantic.js";
3
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { getSlotPropsFnRun } from "../_util/tools.js";
5
5
  import localeValues from "../locale/en_US.js";
6
6
  import useLocale from "../locale/useLocale.js";
@@ -30,6 +30,7 @@ const omitKeys = [
30
30
  "autoplaySpeed",
31
31
  "rtl"
32
32
  ];
33
+ const ignoredAttrKeys = ["verticalSwiping", "vertical-swiping"];
33
34
  const dotsClass = "slick-dots";
34
35
  const ArrowButton = /* @__PURE__ */ defineComponent((_, { slots, attrs }) => {
35
36
  return () => {
@@ -113,7 +114,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
113
114
  const otherProps = omit(props, omitKeys);
114
115
  const enableDots = !!dots;
115
116
  const dsClass = clsx(dotsClass, `${dotsClass}-${mergedDotPlacement.value}`, typeof dots === "boolean" ? false : dots?.class);
116
- const { className: customClassName, style, restAttrs } = getAttrStyleAndClass$1(attrs);
117
+ const { className: customClassName, style, restAttrs } = getAttrStyleAndClass(attrs);
117
118
  const newProps = {
118
119
  vertical: mergedVertical.value,
119
120
  className: clsx(customClassName, contextClassName.value),
@@ -125,6 +126,9 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
125
126
  ...otherProps
126
127
  };
127
128
  if (newProps.effect === "fade") newProps.fade = true;
129
+ delete newProps.effect;
130
+ delete newProps.prefixCls;
131
+ delete newProps.slickGoTo;
128
132
  const className = clsx(prefixCls.value, {
129
133
  [`${prefixCls.value}-rtl`]: isRTL.value,
130
134
  [`${prefixCls.value}-vertical`]: newProps.vertical
@@ -135,7 +139,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
135
139
  if (count.value !== childNodes.length) count.value = childNodes.length;
136
140
  const prevArrow = getSlotPropsFnRun(slots, props, "prevArrow");
137
141
  const nextArrow = getSlotPropsFnRun(slots, props, "nextArrow");
138
- return createVNode("div", mergeProps({ "ref": nativeElementRef }, restAttrs, {
142
+ return createVNode("div", mergeProps({ "ref": nativeElementRef }, omit(restAttrs, ignoredAttrKeys), {
139
143
  "class": className,
140
144
  "id": id,
141
145
  "style": dotDurationStyle
@@ -393,11 +397,6 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
393
397
  required: false,
394
398
  default: void 0
395
399
  },
396
- verticalSwiping: {
397
- type: Boolean,
398
- required: false,
399
- default: void 0
400
- },
401
400
  asNavFor: {
402
401
  type: [Object, null],
403
402
  required: false
@@ -14,6 +14,7 @@ interface CascaderPanelEmitsProps {
14
14
  }
15
15
  interface CascaderPanelSlots {
16
16
  expandIcon?: () => any;
17
+ loadingIcon?: () => any;
17
18
  notFoundContent?: () => any;
18
19
  optionRender?: (option: DefaultOptionType) => any;
19
20
  }
@@ -31,11 +31,12 @@ const CascaderPanel = /* @__PURE__ */ defineComponent((props, { attrs, emit, slo
31
31
  const { rootClass, multiple, optionRender, expandIcon, prefixCls: _prefixCls, direction: _direction, loadingIcon, ...rest } = props;
32
32
  const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
33
33
  const customExpandIcon = getSlotPropsFnRun(slots, props, "expandIcon", false) ?? expandIcon;
34
+ const customLoadingIcon = getSlotPropsFnRun(slots, props, "loadingIcon", false) ?? loadingIcon;
34
35
  const { expandIcon: mergedExpandIcon, loadingIcon: mergedLoadingIcon } = useIcons({
35
36
  contextExpandIcon: contextExpandIcon.value,
36
37
  contextLoadingIcon: contextLoadingIcon.value,
37
38
  expandIcon: customExpandIcon,
38
- loadingIcon,
39
+ loadingIcon: customLoadingIcon,
39
40
  isRtl: isRtl.value
40
41
  });
41
42
  const checkable = useCheckable(cascaderPrefixCls.value, multiple);
@@ -58,20 +58,20 @@ interface CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType
58
58
  options?: OptionType[];
59
59
  status?: InputStatus;
60
60
  rootClass?: string;
61
- /** @deprecated Please use `classNames.popup.root` instead */
61
+ /** @deprecated Please use `classes.popup.root` instead */
62
62
  popupClassName?: string;
63
- /** @deprecated Please use `classNames.popup.root` instead */
63
+ /** @deprecated Please use `classes.popup.root` instead */
64
64
  dropdownClassName?: string;
65
65
  /** @deprecated Please use `styles.popup.root` instead */
66
66
  dropdownStyle?: CSSProperties;
67
67
  /** @deprecated Please use `popupRender` instead */
68
68
  dropdownRender?: (menu: VNode) => VNodeChild;
69
69
  popupRender?: (menu: VNode) => VNodeChild;
70
- /** @deprecated Please use `popupMenuColumnStyle` instead */
70
+ /** @deprecated Please use `styles.popup.listItem` instead */
71
71
  dropdownMenuColumnStyle?: CSSProperties;
72
+ /** @deprecated Please use `styles.popup.listItem` instead */
72
73
  popupMenuColumnStyle?: CSSProperties;
73
74
  /**
74
- * @since 5.13.0
75
75
  * @default "outlined"
76
76
  */
77
77
  variant?: Variant;
@@ -88,6 +88,7 @@ interface CascaderSlots<OptionType extends DefaultOptionType = DefaultOptionType
88
88
  }) => any;
89
89
  optionRender?: (option: OptionType) => any;
90
90
  expandIcon?: () => any;
91
+ loadingIcon?: () => any;
91
92
  default?: () => any;
92
93
  }
93
94
  interface CascaderEmits<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> {
@@ -105,11 +105,12 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
105
105
  if (isDev) {
106
106
  const warning = devUseWarning("Cascader");
107
107
  Object.entries({
108
- popupClassName: "classNames.popup.root",
109
- dropdownClassName: "classNames.popup.root",
108
+ popupClassName: "classes.popup.root",
109
+ dropdownClassName: "classes.popup.root",
110
110
  dropdownStyle: "styles.popup.root",
111
111
  dropdownRender: "popupRender",
112
- dropdownMenuColumnStyle: "popupMenuColumnStyle",
112
+ dropdownMenuColumnStyle: "styles.popup.listItem",
113
+ popupMenuColumnStyle: "styles.popup.listItem",
113
114
  bordered: "variant"
114
115
  }).forEach(([oldProp, newProp]) => {
115
116
  warning.deprecated(!(props[oldProp] !== void 0), oldProp, newProp);
@@ -160,7 +161,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
160
161
  blur: () => cascaderRef.value?.blur?.()
161
162
  });
162
163
  return () => {
163
- const { popupClassName, dropdownClassName, rootClass, dropdownRender, popupRender, dropdownMenuColumnStyle, popupMenuColumnStyle, showArrow, allowClear, expandIcon, transitionName, choiceTransitionName, builtinPlacements, getPopupContainer, displayRender, optionRender, multiple, prefixCls: _prefixCls, direction: _direction, size: _size, disabled: _disabled, status: _status, bordered: _bordered, variant: _variant, classes: _classes, styles: _styles, ...rest } = props;
164
+ const { popupClassName, dropdownClassName, rootClass, dropdownRender, popupRender, dropdownMenuColumnStyle, popupMenuColumnStyle, showArrow, allowClear, expandIcon, loadingIcon, transitionName, choiceTransitionName, builtinPlacements, getPopupContainer, displayRender, optionRender, multiple, prefixCls: _prefixCls, direction: _direction, size: _size, disabled: _disabled, status: _status, bordered: _bordered, variant: _variant, classes: _classes, styles: _styles, popupStyle: _popupStyle, dropdownStyle: _dropdownStyle, ...rest } = props;
164
165
  const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
165
166
  const mergedSuffixIcon = getSlotPropsFnRun(slots, props, "suffixIcon", false) ?? contextSuffixIcon.value;
166
167
  const showSuffixIcon = useShowArrow(mergedSuffixIcon, showArrow);
@@ -173,7 +174,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
173
174
  showSuffixIcon,
174
175
  suffixIcon: mergedSuffixIcon,
175
176
  removeIcon: rest.removeIcon ?? contextRemoveIcon.value,
176
- clearIcon: rest.allowClear && typeof rest.allowClear === "object" && rest.allowClear.clearIcon || contextClearIcon.value,
177
+ clearIcon: rest.clearIcon ?? contextClearIcon.value,
177
178
  prefixCls: prefixCls.value,
178
179
  componentName: "Cascader"
179
180
  });
@@ -181,11 +182,12 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
181
182
  const mergedPopupRender = usePopupRender((slots.popupRender ?? popupRender) || dropdownRender);
182
183
  const mergedPopupMenuColumnStyle = popupMenuColumnStyle ?? dropdownMenuColumnStyle;
183
184
  const customExpandIcon = getSlotPropsFnRun(slots, props, "expandIcon", false) ?? expandIcon;
185
+ const customLoadingIcon = getSlotPropsFnRun(slots, props, "loadingIcon", false) ?? loadingIcon;
184
186
  const { expandIcon: mergedExpandIcon, loadingIcon: mergedLoadingIcon } = useIcons$1({
185
187
  contextExpandIcon: contextExpandIcon.value,
186
188
  contextLoadingIcon: contextLoadingIcon.value,
187
189
  expandIcon: customExpandIcon,
188
- loadingIcon: void 0,
190
+ loadingIcon: customLoadingIcon,
189
191
  isRtl: isRtl.value
190
192
  });
191
193
  const checkable = useCheckable(cascaderPrefixCls.value, multiple);