antdv-next 1.4.6 → 1.5.1

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 (193) hide show
  1. package/dist/_util/hooks/useMergeSemantic.d.ts +7 -4
  2. package/dist/_util/hooks/useMergeSemantic.js +8 -3
  3. package/dist/_util/is.d.ts +9 -1
  4. package/dist/_util/is.js +25 -2
  5. package/dist/_util/scrollTo.d.ts +1 -1
  6. package/dist/_util/scrollTo.js +17 -5
  7. package/dist/_util/vueNode.d.ts +6 -2
  8. package/dist/alert/Alert.js +1 -1
  9. package/dist/alert/style/index.d.ts +5 -0
  10. package/dist/alert/style/index.js +2 -1
  11. package/dist/antd-with-locales.esm.js +12939 -12342
  12. package/dist/antd-with-locales.js +80 -80
  13. package/dist/antd.css +1 -1
  14. package/dist/antd.esm.js +10123 -9740
  15. package/dist/antd.js +55 -55
  16. package/dist/app/App.js +2 -1
  17. package/dist/avatar/AvatarGroup.d.ts +4 -1
  18. package/dist/avatar/AvatarGroup.js +6 -4
  19. package/dist/avatar/index.d.ts +2 -2
  20. package/dist/badge/Ribbon.d.ts +4 -1
  21. package/dist/badge/Ribbon.js +11 -11
  22. package/dist/badge/index.d.ts +3 -2
  23. package/dist/badge/index.js +26 -24
  24. package/dist/border-beam/BorderBeam.d.ts +4 -0
  25. package/dist/border-beam/BorderBeam.js +48 -12
  26. package/dist/border-beam/hooks/useBorderSize.d.ts +3 -7
  27. package/dist/border-beam/hooks/useBorderSize.js +31 -25
  28. package/dist/border-beam/style/index.js +13 -12
  29. package/dist/border-beam/util.d.ts +4 -1
  30. package/dist/border-beam/util.js +7 -2
  31. package/dist/breadcrumb/Breadcrumb.d.ts +4 -1
  32. package/dist/breadcrumb/Breadcrumb.js +12 -7
  33. package/dist/breadcrumb/index.d.ts +2 -2
  34. package/dist/button/Button.js +5 -14
  35. package/dist/button/style/index.js +0 -1
  36. package/dist/calendar/generateCalendar.d.ts +4 -1
  37. package/dist/calendar/generateCalendar.js +8 -5
  38. package/dist/calendar/index.d.ts +2 -2
  39. package/dist/calendar/locale/sq_AL.d.ts +2 -0
  40. package/dist/calendar/locale/sq_AL.js +5 -0
  41. package/dist/card/CardGrid.d.ts +4 -1
  42. package/dist/card/CardGrid.js +7 -4
  43. package/dist/card/CardMeta.d.ts +4 -1
  44. package/dist/card/CardMeta.js +5 -3
  45. package/dist/card/index.d.ts +3 -3
  46. package/dist/carousel/index.d.ts +1 -0
  47. package/dist/carousel/index.js +8 -8
  48. package/dist/checkbox/Group.js +3 -3
  49. package/dist/color-picker/ColorPicker.js +4 -7
  50. package/dist/components.d.ts +27 -21
  51. package/dist/components.js +6 -3
  52. package/dist/config-provider/context.d.ts +28 -8
  53. package/dist/config-provider/define.d.ts +4 -1
  54. package/dist/config-provider/index.js +29 -0
  55. package/dist/date-picker/generatePicker/generateRangePicker.js +2 -5
  56. package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -5
  57. package/dist/date-picker/generatePicker/useComponents.d.ts +1 -1
  58. package/dist/date-picker/hooks/useMergedPickerSemantic.d.ts +1 -1
  59. package/dist/date-picker/hooks/useMergedPickerSemantic.js +7 -3
  60. package/dist/date-picker/locale/sq_AL.d.ts +6 -0
  61. package/dist/date-picker/locale/sq_AL.js +72 -0
  62. package/dist/date-picker/locale/zh_TW.js +2 -2
  63. package/dist/date-picker/util.d.ts +2 -2
  64. package/dist/descriptions/hooks/useItems.d.ts +4 -4
  65. package/dist/descriptions/index.d.ts +4 -1
  66. package/dist/descriptions/index.js +5 -2
  67. package/dist/divider/index.d.ts +4 -1
  68. package/dist/divider/index.js +9 -6
  69. package/dist/drawer/DrawerPanel.js +5 -3
  70. package/dist/drawer/index.js +9 -13
  71. package/dist/drawer/style/index.js +1 -0
  72. package/dist/dropdown/dropdown.js +4 -6
  73. package/dist/empty/index.d.ts +4 -1
  74. package/dist/empty/index.js +5 -2
  75. package/dist/float-button/BackTop.d.ts +2 -0
  76. package/dist/float-button/BackTop.js +27 -44
  77. package/dist/float-button/FloatButtonGroup.d.ts +4 -1
  78. package/dist/float-button/FloatButtonGroup.js +5 -4
  79. package/dist/float-button/hooks/useScroll.d.ts +16 -0
  80. package/dist/float-button/hooks/useScroll.js +80 -0
  81. package/dist/float-button/index.d.ts +2 -2
  82. package/dist/float-button/style/button.js +17 -0
  83. package/dist/form/ErrorList.js +2 -2
  84. package/dist/form/FormItem/index.js +23 -24
  85. package/dist/form/context.d.ts +1 -1
  86. package/dist/form/hooks/useVariant.d.ts +2 -2
  87. package/dist/form/hooks/useVariant.js +15 -5
  88. package/dist/form/types.d.ts +11 -3
  89. package/dist/form/utils/validateUtil.js +4 -0
  90. package/dist/image/hooks/usePreviewConfig.d.ts +6 -5
  91. package/dist/image/index.js +8 -9
  92. package/dist/index.d.ts +27 -21
  93. package/dist/index.js +3 -2
  94. package/dist/input/OTP/index.js +6 -3
  95. package/dist/input/Password.js +4 -1
  96. package/dist/input/Search.js +11 -6
  97. package/dist/input/index.d.ts +1 -1
  98. package/dist/input/style/token.js +2 -1
  99. package/dist/input/style/variants.js +1 -1
  100. package/dist/layout/Sider.d.ts +2 -0
  101. package/dist/layout/Sider.js +14 -2
  102. package/dist/listy/index.d.ts +12 -0
  103. package/dist/listy/index.js +119 -0
  104. package/dist/listy/interface.d.ts +21 -0
  105. package/dist/listy/interface.js +1 -0
  106. package/dist/listy/style/index.d.ts +23 -0
  107. package/dist/listy/style/index.js +57 -0
  108. package/dist/locale/sq_AL.d.ts +5 -0
  109. package/dist/locale/sq_AL.js +151 -0
  110. package/dist/locale/zh_TW.js +41 -41
  111. package/dist/masonry/Masonry.js +4 -4
  112. package/dist/mentions/index.d.ts +1 -0
  113. package/dist/mentions/index.js +4 -0
  114. package/dist/message/useMessage.js +4 -4
  115. package/dist/modal/PurePanel.js +4 -7
  116. package/dist/notification/useNotification.js +4 -5
  117. package/dist/package.js +1 -1
  118. package/dist/package.json.d.ts +1 -0
  119. package/dist/pagination/Pagination.js +14 -6
  120. package/dist/pagination/index.d.ts +2 -2
  121. package/dist/pagination/interface.d.ts +20 -3
  122. package/dist/popconfirm/index.js +17 -8
  123. package/dist/popover/PurePanel.js +10 -0
  124. package/dist/popover/index.js +24 -16
  125. package/dist/qrcode/index.d.ts +4 -1
  126. package/dist/qrcode/index.js +16 -13
  127. package/dist/rate/style/index.js +12 -9
  128. package/dist/result/index.d.ts +4 -1
  129. package/dist/result/index.js +7 -4
  130. package/dist/select/style/dropdown.js +4 -0
  131. package/dist/select/style/select-input.js +1 -1
  132. package/dist/select/style/token.js +4 -2
  133. package/dist/skeleton/Skeleton.d.ts +4 -1
  134. package/dist/skeleton/Skeleton.js +10 -4
  135. package/dist/skeleton/index.d.ts +2 -2
  136. package/dist/slider/SliderTooltip.js +5 -0
  137. package/dist/slider/index.d.ts +5 -1
  138. package/dist/slider/index.js +9 -9
  139. package/dist/space/Compact.d.ts +4 -1
  140. package/dist/space/Compact.js +8 -3
  141. package/dist/space/index.d.ts +2 -2
  142. package/dist/space/index.js +3 -3
  143. package/dist/spin/index.d.ts +4 -1
  144. package/dist/spin/index.js +7 -5
  145. package/dist/splitter/SplitBar.js +1 -12
  146. package/dist/splitter/Splitter.d.ts +4 -1
  147. package/dist/splitter/Splitter.js +4 -2
  148. package/dist/splitter/index.d.ts +2 -2
  149. package/dist/splitter/style/index.js +2 -1
  150. package/dist/statistic/Statistic.d.ts +4 -1
  151. package/dist/statistic/index.d.ts +2 -2
  152. package/dist/steps/index.js +6 -8
  153. package/dist/steps/style/index.js +2 -1
  154. package/dist/table/style/virtual.js +4 -0
  155. package/dist/table/util.d.ts +1 -1
  156. package/dist/tag/hooks/useColor.d.ts +1 -1
  157. package/dist/tag/index.js +3 -3
  158. package/dist/theme/interface/components.d.ts +70 -68
  159. package/dist/theme/interface/seeds.d.ts +8 -0
  160. package/dist/theme/themes/seed.js +1 -0
  161. package/dist/theme/util/alias.js +1 -1
  162. package/dist/time-picker/locale/sq_AL.d.ts +5 -0
  163. package/dist/time-picker/locale/sq_AL.js +7 -0
  164. package/dist/timeline/Timeline.js +5 -7
  165. package/dist/tooltip/PurePanel.js +5 -0
  166. package/dist/tooltip/index.d.ts +1 -0
  167. package/dist/tooltip/index.js +27 -13
  168. package/dist/tour/PurePanel.js +0 -8
  169. package/dist/tour/index.js +10 -13
  170. package/dist/tour/interface.d.ts +4 -6
  171. package/dist/tour/panelRender.js +8 -2
  172. package/dist/transfer/Transfer.d.ts +4 -1
  173. package/dist/transfer/Transfer.js +5 -2
  174. package/dist/transfer/index.d.ts +2 -2
  175. package/dist/tree/index.d.ts +3 -2
  176. package/dist/tree/index.js +3 -2
  177. package/dist/tree/style/index.js +4 -0
  178. package/dist/typography/Base/EllipsisTooltip.d.ts +6 -1
  179. package/dist/typography/Base/EllipsisTooltip.js +2 -2
  180. package/dist/typography/Base/index.js +9 -26
  181. package/dist/typography/hooks/useCopyClick.d.ts +1 -1
  182. package/dist/typography/hooks/useCopyClick.js +5 -15
  183. package/dist/upload/Upload.js +7 -9
  184. package/dist/upload/UploadList/ListItem.js +4 -12
  185. package/dist/upload/index.d.ts +2 -2
  186. package/dist/watermark/index.d.ts +4 -1
  187. package/dist/watermark/index.js +2 -1
  188. package/global.d.ts +1 -0
  189. package/package.json +10 -9
  190. package/web-tags.json +1384 -1338
  191. package/web-types.json +4584 -4467
  192. package/dist/slider/useRafLock.d.ts +0 -5
  193. package/dist/slider/useRafLock.js +0 -23
package/dist/app/App.js CHANGED
@@ -41,9 +41,10 @@ const App = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) =>
41
41
  return () => {
42
42
  const { rootClass } = props;
43
43
  const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
44
+ const hasRootProps = Boolean(className || rootClass || style || contextClassName.value || contextStyle.value);
44
45
  const customClassName = clsx(hashId.value, prefixCls.value, className, rootClass, cssVarCls.value, { [`${prefixCls.value}-rtl`]: direction.value === "rtl" });
45
46
  const { component = "div" } = props;
46
- devUseWarning("App")(!(cssVarCls.value && component === false), "usage", "When using cssVar, ensure `component` is assigned a valid Vue component string.");
47
+ devUseWarning("App")(!(cssVarCls.value && component === false && hasRootProps), "usage", "When using cssVar, ensure `component` is assigned a valid Vue component string.");
47
48
  const Component = component === false ? Fragment : component;
48
49
  const rootProps = {
49
50
  ...restAttrs,
@@ -17,6 +17,9 @@ interface AvatarGroupProps extends ComponentBaseProps {
17
17
  size?: AvatarSize;
18
18
  shape?: 'circle' | 'square';
19
19
  }
20
+ interface AvatarGroupRef {
21
+ nativeElement: HTMLDivElement;
22
+ }
20
23
  declare const AvatarGroup: import("vue").DefineSetupFnComponent<AvatarGroupProps, {}, {}, AvatarGroupProps & {}, import("vue").PublicProps>;
21
24
  //#endregion
22
- export { AvatarGroupProps, AvatarGroup as default };
25
+ export { AvatarGroupProps, AvatarGroupRef, AvatarGroup as default };
@@ -5,11 +5,11 @@ import { useAvatarProvider } from "./AvatarContext.js";
5
5
  import style_default from "./style/index.js";
6
6
  import Avatar from "./Avatar.js";
7
7
  import Popover from "../popover/index.js";
8
- import { computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
8
+ import { computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef } from "vue";
9
9
  import { clsx } from "@v-c/util";
10
10
  import { filterEmpty } from "@v-c/util/dist/props-util";
11
11
  //#region src/avatar/AvatarGroup.tsx
12
- const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
12
+ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
13
13
  const { prefixCls, direction } = useComponentBaseConfig("avatar", props);
14
14
  const groupPrefixCls = computed(() => `${prefixCls.value}-group`);
15
15
  const rootCls = useCSSVarCls(prefixCls);
@@ -20,6 +20,8 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =>
20
20
  shape: props.shape
21
21
  };
22
22
  }));
23
+ const nativeElementRef = shallowRef();
24
+ expose({ nativeElement: nativeElementRef });
23
25
  return () => {
24
26
  const { rootClass, max } = props;
25
27
  const children = filterEmpty(slots?.default?.() ?? []);
@@ -48,12 +50,12 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =>
48
50
  "key": "avatar-popover-key",
49
51
  "destroyOnHidden": true
50
52
  }, popoverProps), { default: () => [createVNode(Avatar, { "style": mergeStyle }, { default: () => [`+${numOfChildren - mergeCount}`] })] }));
51
- return createVNode("div", mergeProps(restAttrs, {
53
+ return createVNode("div", mergeProps({ "ref": nativeElementRef }, restAttrs, {
52
54
  "class": cls,
53
55
  "style": style
54
56
  }), [childrenShow]);
55
57
  }
56
- return createVNode("div", mergeProps(restAttrs, {
58
+ return createVNode("div", mergeProps({ "ref": nativeElementRef }, restAttrs, {
57
59
  "class": cls,
58
60
  "style": style
59
61
  }), [childrenWithProps]);
@@ -1,9 +1,9 @@
1
1
  import Avatar$1, { AvatarEmits, AvatarProps, AvatarSlots } from "./Avatar.js";
2
- import AvatarGroup, { AvatarGroupProps } from "./AvatarGroup.js";
2
+ import AvatarGroup, { AvatarGroupProps, AvatarGroupRef } from "./AvatarGroup.js";
3
3
  //#region src/avatar/index.d.ts
4
4
  type CompoundedComponent = typeof Avatar$1 & {
5
5
  Group: typeof AvatarGroup;
6
6
  };
7
7
  declare const Avatar: CompoundedComponent;
8
8
  //#endregion
9
- export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSlots, Avatar as default };
9
+ export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarSlots, Avatar as default };
@@ -27,10 +27,13 @@ interface RibbonProps extends ComponentBaseProps {
27
27
  classes?: RibbonClassNamesType;
28
28
  styles?: RibbonStylesType;
29
29
  }
30
+ interface RibbonRef {
31
+ nativeElement: HTMLDivElement;
32
+ }
30
33
  interface RibbonSlots {
31
34
  default?: () => any;
32
35
  text?: () => any;
33
36
  }
34
37
  declare const _default: import("vue").DefineSetupFnComponent<RibbonProps, EmptyEmit, SlotsType<RibbonSlots>, RibbonProps, import("vue").PublicProps>;
35
38
  //#endregion
36
- export { RibbonClassNamesType, RibbonProps, RibbonSemanticClassNames, RibbonSemanticName, RibbonSemanticStyles, RibbonSlots, RibbonStylesType, _default as default };
39
+ export { RibbonClassNamesType, RibbonProps, RibbonRef, RibbonSemanticClassNames, RibbonSemanticName, RibbonSemanticStyles, RibbonSlots, RibbonStylesType, _default as default };
@@ -1,12 +1,12 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
4
4
  import { isPresetColor } from "../_util/colors.js";
5
5
  import ribbon_default from "./style/ribbon.js";
6
- import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
6
+ import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
7
7
  import { clsx } from "@v-c/util";
8
8
  import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
9
- var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
9
+ var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
10
10
  const { styles, classes: ribbonClassNames } = toPropsRefs$1(props, "classes", "styles");
11
11
  const { prefixCls, class: contextClassName, style: contextStyle, direction, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("ribbon", props);
12
12
  const wrapperCls = computed(() => `${prefixCls.value}-wrapper`);
@@ -14,10 +14,14 @@ var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
14
14
  const mergedProps = computed(() => {
15
15
  return props;
16
16
  });
17
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, ribbonClassNames), useToArr(contextStyles, styles), useToProps(mergedProps));
17
+ const contextIndicatorStyle = useSemanticRootStyle(contextStyle, "indicator");
18
+ const indicatorStyle = useSemanticRootStyle(computed(() => attrs.style), "indicator");
19
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, ribbonClassNames), useToArr(contextStyles, contextIndicatorStyle, styles, indicatorStyle), useToProps(mergedProps));
20
+ const nativeElementRef = shallowRef();
21
+ expose({ nativeElement: nativeElementRef });
18
22
  return () => {
19
23
  const { placement = "end", color } = props;
20
- const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
24
+ const { className, restAttrs } = getAttrStyleAndClass(attrs);
21
25
  const colorInPreset = isPresetColor(props.color, false);
22
26
  const ribbonCls = clsx(prefixCls.value, `${prefixCls.value}-placement-${placement}`, {
23
27
  [`${prefixCls.value}-rtl`]: direction.value === "rtl",
@@ -32,16 +36,12 @@ var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
32
36
  const textNodes = getSlotPropsFnRun(slots, props, "text");
33
37
  const children = slots.default?.();
34
38
  return createVNode("div", {
39
+ "ref": nativeElementRef,
35
40
  "class": clsx(wrapperCls.value, props.rootClass, hashId.value, cssVarCls.value, mergedClassNames.value?.root),
36
41
  "style": mergedStyles.value?.root
37
42
  }, [children, createVNode("div", mergeProps(restAttrs, {
38
43
  "class": clsx(ribbonCls, hashId.value),
39
- "style": [
40
- colorStyle,
41
- mergedStyles.value?.indicator,
42
- contextStyle.value,
43
- style
44
- ]
44
+ "style": [colorStyle, mergedStyles.value?.indicator]
45
45
  }), [createVNode("span", {
46
46
  "class": clsx(`${prefixCls.value}-content`, mergedClassNames.value.content),
47
47
  "style": mergedStyles.value?.content
@@ -5,7 +5,7 @@ import { PresetColorKey } from "../theme/interface/presetColors.js";
5
5
  import "../theme/interface/index.js";
6
6
  import { SizeType } from "../config-provider/SizeContext.js";
7
7
  import { PresetStatusColorType } from "../_util/colors.js";
8
- import _default, { RibbonProps, RibbonSlots } from "./Ribbon.js";
8
+ import _default, { RibbonProps, RibbonRef, RibbonSlots } from "./Ribbon.js";
9
9
  import { ComponentBaseProps } from "../config-provider/context.js";
10
10
  import { CSSProperties, SlotsType } from "vue";
11
11
  import { LiteralUnion } from "@v-c/util/dist/type";
@@ -51,5 +51,6 @@ declare const Badge: typeof InternalBadge & {
51
51
  };
52
52
  declare const BadgeRibbon: import("vue").DefineSetupFnComponent<RibbonProps, EmptyEmit, SlotsType<RibbonSlots>, RibbonProps, import("vue").PublicProps>;
53
53
  type BadgeRibbonProps = RibbonProps;
54
+ type BadgeRibbonRef = RibbonRef;
54
55
  //#endregion
55
- export { BadgeClassNamesType, BadgeProps, BadgeRibbon, BadgeRibbonProps, BadgeSemanticClassNames, BadgeSemanticName, BadgeSemanticStyles, BadgeSlots, BadgeStylesType, Badge as default };
56
+ export { BadgeClassNamesType, BadgeProps, BadgeRibbon, BadgeRibbonProps, BadgeRibbonRef, BadgeSemanticClassNames, BadgeSemanticName, BadgeSemanticStyles, BadgeSlots, BadgeStylesType, Badge as default };
@@ -1,6 +1,6 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
- import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { clsx as clsx$1, getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
5
  import { isPresetColor } from "../_util/colors.js";
6
6
  import { formatUnit } from "../_util/styleUtils.js";
@@ -19,7 +19,6 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
19
19
  const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, direction, getPrefixCls } = useComponentBaseConfig("badge", props);
20
20
  const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
21
21
  const mergedProps = computed(() => props);
22
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
23
22
  const badgeRef = shallowRef();
24
23
  expose({ badgeRef });
25
24
  const [hashId, cssVarCls] = style_default(prefixCls);
@@ -63,34 +62,37 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
63
62
  watchEffect(() => {
64
63
  if (!isHidden.value) isDotRef.value = showAsDot.value;
65
64
  });
66
- const mergedStyle = computed(() => {
67
- if (!props.offset) return {
68
- ...contextStyle.value,
69
- ...attrs.style
70
- };
65
+ const childrenNodes = computed(() => filterEmpty(slots.default?.() ?? []));
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)));
69
+ const offsetStyle = computed(() => {
70
+ if (!props.offset) return;
71
71
  const horizontalOffset = Number.parseInt(props.offset[0], 10);
72
- const insetInlineEndUnit = formatUnit(direction.value === "rtl" ? horizontalOffset : -horizontalOffset);
73
- const offsetStyle = {
74
- marginTop: formatUnit(props.offset[1]),
75
- insetInlineEnd: insetInlineEndUnit
76
- };
72
+ const insetInlineEnd = direction.value === "rtl" ? horizontalOffset : -horizontalOffset;
77
73
  return {
78
- ...contextStyle.value,
79
- ...offsetStyle,
80
- ...attrs.style
74
+ marginTop: formatUnit(props.offset[1]),
75
+ insetInlineEnd: formatUnit(insetInlineEnd)
81
76
  };
82
77
  });
78
+ const mergedStyle = computed(() => ({
79
+ ...offsetStyle.value,
80
+ ...contextStyle.value,
81
+ ...attrs.style
82
+ }));
83
+ const legacyStyleKey = computed(() => isStatusBadge.value ? "root" : "indicator");
84
+ const contextLegacyStyle = useSemanticRootStyle(contextStyle, legacyStyleKey);
85
+ const componentLegacyStyle = useSemanticRootStyle(computed(() => attrs.style), legacyStyleKey);
86
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextLegacyStyle, styles, componentLegacyStyle), useToProps(mergedProps));
83
87
  const displayCount = computed(() => displayCountRef.value);
84
88
  const isInternalColor = computed(() => isPresetColor(props.color, false));
85
89
  return () => {
86
90
  const { class: attrClass, style: attrStyle, ...restAttrs } = attrs;
87
- const children = filterEmpty(slots.default?.() ?? []);
91
+ const children = childrenNodes.value;
88
92
  let livingCount = countCacheRef.value;
89
93
  if (typeof livingCount === "function") livingCount = livingCount();
90
94
  const fallbackTitleNode = typeof livingCount === "string" || typeof livingCount === "number" ? livingCount : void 0;
91
95
  const titleNode = props.title === null || props.title === false ? void 0 : props.title ?? fallbackTitleNode;
92
- const hasTextSlot = textNodes.value.length > 0;
93
- const showStatusTextNode = !isHidden.value && (hasTextSlot ? true : props.text === 0 ? props.showZero : !!props.text && props.text !== true);
94
96
  const statusCls = clsx$1(mergedClassNames.value.indicator, {
95
97
  [`${prefixCls.value}-status-dot`]: hasStatus.value,
96
98
  [`${prefixCls.value}-status-${props.status}`]: !!props.status,
@@ -107,18 +109,18 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
107
109
  statusStyle.color = props.color;
108
110
  }
109
111
  const renderStatusText = (style) => {
110
- if (!showStatusTextNode) return null;
112
+ if (!showStatusTextNode.value) return null;
111
113
  return createVNode("span", {
112
114
  "class": `${prefixCls.value}-status-text`,
113
115
  "style": style
114
- }, [hasTextSlot ? textNodes.value : props.text]);
116
+ }, [hasTextSlot.value ? textNodes.value : props.text]);
115
117
  };
116
- if (!children.length && hasStatus.value && (showStatusTextNode || hasStatusValue.value || !ignoreCount.value)) {
117
- const statusTextColor = mergedStyle.value?.color;
118
+ if (isStatusBadge.value) {
119
+ const statusTextColor = mergedStyles.value.root?.color;
118
120
  return createVNode("span", mergeProps(restAttrs, {
119
121
  "ref": badgeRef,
120
122
  "class": badgeClassName,
121
- "style": [mergedStyles.value.root, mergedStyle.value]
123
+ "style": [offsetStyle.value, mergedStyles.value.root]
122
124
  }), [createVNode("span", {
123
125
  "class": statusCls,
124
126
  "style": [mergedStyles.value.indicator, statusStyle]
@@ -151,8 +153,8 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
151
153
  "count": displayCount.value,
152
154
  "title": titleNode,
153
155
  "style": [
156
+ offsetStyle.value,
154
157
  mergedStyles.value?.indicator,
155
- mergedStyle.value,
156
158
  scrollNumberStyle
157
159
  ]
158
160
  }, _isSlot(clonedNode) ? clonedNode : { default: () => [clonedNode] }) : null }),
@@ -5,7 +5,11 @@ interface BorderBeamProps {
5
5
  prefixCls?: string;
6
6
  rootClass?: string;
7
7
  color?: BorderBeamColor;
8
+ count?: number;
9
+ duration?: number;
10
+ lineWidth?: number | string;
8
11
  outset?: number | string;
12
+ size?: number | string;
9
13
  }
10
14
  interface BorderBeamSlots {
11
15
  default?: () => any;
@@ -1,14 +1,18 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
2
  import { genCssVar } from "../theme/util/genStyleUtils.js";
3
- import isNonNullable from "../_util/isNonNullable.js";
4
- import useBorderSize from "./hooks/useBorderSize.js";
3
+ import { isNonNullable, isNumber } from "../_util/is.js";
5
4
  import { getBorderBeamGradient } from "./util.js";
5
+ import useBorderSize from "./hooks/useBorderSize.js";
6
6
  import style_default from "./style/index.js";
7
7
  import { Fragment, Teleport, cloneVNode, computed, createVNode, defineComponent, isVNode, 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 { unrefElement } from "@vueuse/core";
11
+ import { unit } from "@antdv-next/cssinjs";
11
12
  //#region src/border-beam/BorderBeam.tsx
13
+ function _isSlot(s) {
14
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
15
+ }
12
16
  function getInset(width) {
13
17
  return typeof width === "string" ? `calc(-1 * ${width})` : `-${width}px`;
14
18
  }
@@ -19,30 +23,46 @@ const BorderBeam = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
19
23
  const [hashId, cssVarCls] = style_default(prefixCls);
20
24
  const varName = computed(() => genCssVar(rootCls.value, "border-beam")[0]);
21
25
  const hostDom = shallowRef(null);
22
- const borderInfo = useBorderSize(hostDom);
26
+ const borderWidth = useBorderSize(hostDom);
23
27
  const beamGradient = computed(() => getBorderBeamGradient(props.color));
28
+ const mergedCount = computed(() => {
29
+ const { count = 1 } = props;
30
+ return isNumber(count) && Number.isFinite(count) && count >= 1 ? Math.floor(count) : 1;
31
+ });
32
+ const mergedDuration = computed(() => {
33
+ const { duration } = props;
34
+ return isNumber(duration) && duration > 0 ? duration : 6;
35
+ });
24
36
  const insetOffset = computed(() => {
25
37
  const { outset } = props;
26
38
  if (isNonNullable(outset)) return getInset(outset);
27
- return borderInfo.value.borderWidth.map(getInset).join(" ");
39
+ return borderWidth.value.map(getInset).join(" ");
28
40
  });
29
41
  const setHostDom = (el) => {
30
42
  hostDom.value = unrefElement(el) ?? null;
31
43
  };
32
44
  return () => {
45
+ let _slot;
46
+ const { duration, lineWidth, size } = props;
33
47
  const children = filterEmpty(slots.default?.() ?? []);
34
- const beamStyle = {
48
+ const count = mergedCount.value;
49
+ const getBeamStyle = (index) => ({
35
50
  ...contextStyle?.value ?? {},
36
51
  ...attrs.style ?? {},
37
52
  ...beamGradient.value && { [varName.value("beam-gradient")]: beamGradient.value },
38
- [varName.value("inset-offset")]: insetOffset.value,
39
- [varName.value("border-radius")]: borderInfo.value.borderRadius
40
- };
41
- const beamNode = hostDom.value ? createVNode(Teleport, { "to": hostDom.value }, { default: () => [createVNode("div", {
53
+ ...isNumber(duration) && duration > 0 && { [varName.value("duration")]: `${duration}s` },
54
+ ...isNonNullable(lineWidth) && { [varName.value("line-width")]: unit(lineWidth) },
55
+ ...isNonNullable(size) && { [varName.value("size")]: unit(size) },
56
+ ...index > 0 && { [varName.value("delay")]: `${-mergedDuration.value * index / count}s` },
57
+ [varName.value("inset-offset")]: insetOffset.value
58
+ });
59
+ const beamCls = clsx(prefixCls.value, contextClassName?.value, props.rootClass, attrs.class, hashId.value, cssVarCls.value);
60
+ const beamNode = hostDom.value ? createVNode(Teleport, { "to": hostDom.value }, _isSlot(_slot = Array.from({ length: count }, (_, index) => createVNode("div", {
61
+ "key": index,
42
62
  "aria-hidden": "true",
43
- "class": clsx(prefixCls.value, contextClassName?.value, props.rootClass, attrs.class, hashId.value, cssVarCls.value),
44
- "style": beamStyle
45
- }, null)] }) : null;
63
+ "class": beamCls,
64
+ "style": getBeamStyle(index)
65
+ }, null))) ? _slot : { default: () => [_slot] }) : null;
46
66
  const renderChild = () => {
47
67
  if (children.length !== 1 || !isVNode(children[0])) return children;
48
68
  const child = children[0];
@@ -64,9 +84,25 @@ const BorderBeam = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
64
84
  type: [String, Array],
65
85
  required: false
66
86
  },
87
+ count: {
88
+ type: Number,
89
+ required: false
90
+ },
91
+ duration: {
92
+ type: Number,
93
+ required: false
94
+ },
95
+ lineWidth: {
96
+ type: [Number, String],
97
+ required: false
98
+ },
67
99
  outset: {
68
100
  type: [Number, String],
69
101
  required: false
102
+ },
103
+ size: {
104
+ type: [Number, String],
105
+ required: false
70
106
  }
71
107
  },
72
108
  name: "ABorderBeam",
@@ -1,10 +1,6 @@
1
+ import { BorderWidth } from "../util.js";
1
2
  import { Ref } from "vue";
2
3
  //#region src/border-beam/hooks/useBorderSize.d.ts
3
- type BorderWidth = readonly [number, number, number, number];
4
- interface BorderInfo {
5
- borderWidth: BorderWidth;
6
- borderRadius: string;
7
- }
8
- declare function useBorderSize(domNode: Ref<HTMLElement | SVGElement | null | undefined>): import("vue").ShallowRef<BorderInfo, BorderInfo>;
4
+ declare function useBorderSize(domNode: Ref<HTMLElement | SVGElement | null | undefined>): import("vue").ShallowRef<BorderWidth, BorderWidth>;
9
5
  //#endregion
10
- export { BorderInfo, BorderWidth, useBorderSize as default };
6
+ export { useBorderSize as default };
@@ -1,40 +1,46 @@
1
+ import { isNumber } from "../../_util/is.js";
2
+ import { isSameBorderWidth } from "../util.js";
1
3
  import { shallowRef, watch } from "vue";
2
4
  //#region src/border-beam/hooks/useBorderSize.ts
3
- const DEFAULT_BORDER_INFO = {
4
- borderWidth: [
5
- 0,
6
- 0,
7
- 0,
8
- 0
9
- ],
10
- borderRadius: "0px"
11
- };
12
- function parseBorderWidth(value) {
13
- const size = Number.parseFloat(value);
14
- return Number.isFinite(size) ? size : 0;
5
+ const DEFAULT_BORDER_WIDTH = [
6
+ 0,
7
+ 0,
8
+ 0,
9
+ 0
10
+ ];
11
+ function normalizeValue(val) {
12
+ const size = Number.parseFloat(val);
13
+ return isNumber(size) ? size : 0;
15
14
  }
16
15
  function useBorderSize(domNode) {
17
- const borderInfo = shallowRef(DEFAULT_BORDER_INFO);
16
+ const borderWidth = shallowRef(DEFAULT_BORDER_WIDTH);
17
+ const setBorderWidth = (next) => {
18
+ if (!isSameBorderWidth(borderWidth.value, next)) borderWidth.value = next;
19
+ };
18
20
  watch(domNode, (node) => {
19
21
  if (!node) {
20
- borderInfo.value = DEFAULT_BORDER_INFO;
22
+ setBorderWidth(DEFAULT_BORDER_WIDTH);
21
23
  return;
22
24
  }
23
- const { borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderRadius } = getComputedStyle(node);
24
- borderInfo.value = {
25
- borderWidth: [
26
- parseBorderWidth(borderTopWidth),
27
- parseBorderWidth(borderRightWidth),
28
- parseBorderWidth(borderBottomWidth),
29
- parseBorderWidth(borderLeftWidth)
30
- ],
31
- borderRadius
32
- };
25
+ let computedStyle;
26
+ try {
27
+ computedStyle = getComputedStyle(node);
28
+ } catch {
29
+ setBorderWidth(DEFAULT_BORDER_WIDTH);
30
+ return;
31
+ }
32
+ const { borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth } = computedStyle;
33
+ setBorderWidth([
34
+ normalizeValue(borderTopWidth),
35
+ normalizeValue(borderRightWidth),
36
+ normalizeValue(borderBottomWidth),
37
+ normalizeValue(borderLeftWidth)
38
+ ]);
33
39
  }, {
34
40
  immediate: true,
35
41
  flush: "post"
36
42
  });
37
- return borderInfo;
43
+ return borderWidth;
38
44
  }
39
45
  //#endregion
40
46
  export { useBorderSize as default };
@@ -1,25 +1,25 @@
1
1
  import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.js";
2
2
  import { genNoMotionRawStyle } from "../../style/motion/util.js";
3
3
  import "../util.js";
4
- import { Keyframes } from "@antdv-next/cssinjs";
4
+ import { Keyframes, unit } from "@antdv-next/cssinjs";
5
5
  //#region src/border-beam/style/index.ts
6
+ const antBorderBeamMove = new Keyframes("antBorderBeamMove", {
7
+ from: { offsetDistance: "0%" },
8
+ to: { offsetDistance: "100%" }
9
+ });
6
10
  const genBorderBeamStyle = (token) => {
7
- const { componentCls, antCls } = token;
11
+ const { componentCls, antCls, colorPrimary, colorPrimaryHover, lineWidth } = token;
8
12
  const [, varRef] = genCssVar(antCls, "border-beam");
9
- const defaultBeamGradient = `linear-gradient(to left, ${token.colorPrimary} 0%, ${token.colorPrimaryHover} 70%, transparent)`;
10
- const antBorderBeamMove = new Keyframes("antBorderBeamMove", {
11
- from: { offsetDistance: "0%" },
12
- to: { offsetDistance: "100%" }
13
- });
13
+ const defaultBeamGradient = `linear-gradient(to left, ${colorPrimary} 0%, ${colorPrimaryHover} 70%, transparent)`;
14
14
  return { [componentCls]: {
15
15
  display: "none",
16
16
  position: "absolute",
17
17
  inset: varRef("inset-offset", "0px"),
18
- borderRadius: varRef("border-radius", "0px"),
18
+ borderRadius: "inherit",
19
19
  zIndex: 1,
20
20
  overflow: "hidden",
21
21
  pointerEvents: "none",
22
- padding: token.lineWidth,
22
+ padding: varRef("line-width", unit(lineWidth)),
23
23
  "@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor))": {
24
24
  WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
25
25
  WebkitMaskComposite: "xor",
@@ -33,16 +33,17 @@ const genBorderBeamStyle = (token) => {
33
33
  position: "absolute",
34
34
  top: 0,
35
35
  left: 0,
36
- width: 100,
36
+ width: varRef("size", "100px"),
37
37
  aspectRatio: "1 / 1",
38
38
  opacity: .95,
39
39
  backgroundImage: varRef("beam-gradient", defaultBeamGradient),
40
40
  offsetAnchor: "90% 50%",
41
41
  offsetDistance: "0%",
42
- offsetPath: "rect(0 auto auto 0 round 100px)",
42
+ offsetPath: `rect(0 auto auto 0 round ${varRef("size", "100px")})`,
43
43
  offsetRotate: "auto",
44
44
  animationName: antBorderBeamMove,
45
- animationDuration: "6s",
45
+ animationDuration: varRef("duration", `6s`),
46
+ animationDelay: varRef("delay", "0s"),
46
47
  animationTimingFunction: "linear",
47
48
  animationIterationCount: "infinite",
48
49
  willChange: "offset-distance"
@@ -5,7 +5,10 @@ interface BorderBeamGradientItem {
5
5
  }
6
6
  type BorderBeamGradient = BorderBeamGradientItem[];
7
7
  type BorderBeamColor = string | BorderBeamGradient;
8
+ type BorderWidth = readonly [number, number, number, number];
9
+ declare const DEFAULT_BORDER_BEAM_DURATION = 6;
8
10
  declare const MAX_BEAM_COLOR_STOP_PERCENT = 70;
9
11
  declare function getBorderBeamGradient(value?: BorderBeamColor): string | undefined;
12
+ declare function isSameBorderWidth(left: BorderWidth, right: BorderWidth): boolean;
10
13
  //#endregion
11
- export { BorderBeamColor, BorderBeamGradient, BorderBeamGradientItem, MAX_BEAM_COLOR_STOP_PERCENT, getBorderBeamGradient };
14
+ export { BorderBeamColor, BorderBeamGradient, BorderBeamGradientItem, BorderWidth, DEFAULT_BORDER_BEAM_DURATION, MAX_BEAM_COLOR_STOP_PERCENT, getBorderBeamGradient, isSameBorderWidth };
@@ -1,10 +1,12 @@
1
+ import { isString } from "../_util/is.js";
1
2
  //#region src/border-beam/util.ts
3
+ const DEFAULT_BORDER_BEAM_DURATION = 6;
2
4
  const MAX_BEAM_COLOR_STOP_PERCENT = 70;
3
5
  function getLinearGradient(...colorStops) {
4
6
  return `linear-gradient(to left, ${colorStops.join(", ")}, transparent)`;
5
7
  }
6
8
  function normalizeBorderBeamColor(value) {
7
- return typeof value === "string" ? [{
9
+ return isString(value) ? [{
8
10
  color: value,
9
11
  percent: 0
10
12
  }] : value ?? [];
@@ -30,5 +32,8 @@ function getBorderBeamGradient(value) {
30
32
  const normalizedStops = normalizeGradientItems(normalizeBorderBeamColor(value));
31
33
  return normalizedStops.length ? getLinearGradient(...normalizedStops.map((item) => `${item.color} ${item.percent}%`)) : void 0;
32
34
  }
35
+ function isSameBorderWidth(left, right) {
36
+ return left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3];
37
+ }
33
38
  //#endregion
34
- export { MAX_BEAM_COLOR_STOP_PERCENT, getBorderBeamGradient };
39
+ export { DEFAULT_BORDER_BEAM_DURATION, MAX_BEAM_COLOR_STOP_PERCENT, getBorderBeamGradient, isSameBorderWidth };
@@ -76,6 +76,9 @@ interface BreadcrumbProps<T extends AnyObject = AnyObject> extends BreadcrumbEmi
76
76
  menu: MenuItem;
77
77
  }) => any;
78
78
  }
79
+ interface BreadcrumbRef {
80
+ nativeElement: HTMLElement;
81
+ }
79
82
  interface BreadcrumbEmits {
80
83
  clickItem: (item: ItemType, event: MouseEvent) => void;
81
84
  [keys: string]: (...args: any[]) => any;
@@ -107,4 +110,4 @@ declare const Breadcrumb: import("vue").DefineSetupFnComponent<BreadcrumbProps<A
107
110
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
108
111
  }, import("vue").PublicProps>;
109
112
  //#endregion
110
- export { BreadcrumbClassNamesType, BreadcrumbEmits, BreadcrumbEmitsProps, _default as BreadcrumbItem, BreadcrumbItemRenderContext, BreadcrumbItemType, BreadcrumbProps, BreadcrumbSemanticClassNames, BreadcrumbSemanticName, BreadcrumbSemanticStyles, _default$1 as BreadcrumbSeparator, BreadcrumbSeparatorType, BreadcrumbSlots, BreadcrumbStylesType, InternalRouteType, ItemType, Breadcrumb as default };
113
+ export { BreadcrumbClassNamesType, BreadcrumbEmits, BreadcrumbEmitsProps, _default as BreadcrumbItem, BreadcrumbItemRenderContext, BreadcrumbItemType, BreadcrumbProps, BreadcrumbRef, BreadcrumbSemanticClassNames, BreadcrumbSemanticName, BreadcrumbSemanticStyles, _default$1 as BreadcrumbSeparator, BreadcrumbSeparatorType, BreadcrumbSlots, BreadcrumbStylesType, InternalRouteType, ItemType, Breadcrumb as default };
@@ -6,7 +6,7 @@ import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
6
6
  import useItemRender from "./useItemRender.js";
7
7
  import BreadcrumbItem, { InternalBreadcrumbItem } from "./BreadcrumbItem.js";
8
8
  import style_default from "./style/index.js";
9
- import { cloneVNode, computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
9
+ import { cloneVNode, computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef } from "vue";
10
10
  import { clsx } from "@v-c/util";
11
11
  import { filterEmpty } from "@v-c/util/dist/props-util";
12
12
  import { DownOutlined } from "@antdv-next/icons";
@@ -23,7 +23,7 @@ function getPath(params, path) {
23
23
  });
24
24
  return mergedPath;
25
25
  }
26
- const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
26
+ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
27
27
  const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, separator: contextSeparator, dropdownIcon: contextDropdownIcon } = useComponentBaseConfig("breadcrumb", props, ["separator", "dropdownIcon"]);
28
28
  const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
29
29
  const mergedSeparator = computed(() => {
@@ -47,6 +47,8 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
47
47
  styles: mergedStyles.value
48
48
  };
49
49
  }));
50
+ const nativeElementRef = shallowRef();
51
+ expose({ nativeElement: nativeElementRef });
50
52
  return () => {
51
53
  const { params = {}, rootClass } = props;
52
54
  const itemRender = slots?.itemRender ? (route, slotParams, routes, paths) => slots.itemRender?.({
@@ -122,12 +124,15 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
122
124
  });
123
125
  }
124
126
  const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
127
+ const breadcrumbClassName = clsx(prefixCls.value, contextClassName.value, { [`${prefixCls}-rtl`]: direction.value === "rtl" }, className, rootClass, mergedClassNames.value?.root, hashId.value, cssVarCls.value);
128
+ const mergedStyle = {
129
+ ...mergedStyles.value?.root,
130
+ ...style
131
+ };
125
132
  return createVNode("nav", mergeProps({
126
- "class": clsx(prefixCls.value, contextClassName.value, { [`${prefixCls}-rtl`]: direction.value === "rtl" }, className, rootClass, mergedClassNames.value?.root, hashId.value, cssVarCls.value),
127
- "style": {
128
- ...mergedStyles.value?.root,
129
- ...style
130
- }
133
+ "ref": nativeElementRef,
134
+ "class": breadcrumbClassName,
135
+ "style": mergedStyle
131
136
  }, restAttrs), [createVNode("ol", null, [crumbs])]);
132
137
  };
133
138
  }, {
@@ -1,4 +1,4 @@
1
1
  import _default, { BreadcrumbItemProps, SeparatorType } from "./BreadcrumbItem.js";
2
2
  import _default$1 from "./BreadcrumbSeparator.js";
3
- import Breadcrumb, { BreadcrumbEmits, BreadcrumbItemRenderContext, BreadcrumbProps, BreadcrumbSlots, ItemType } from "./Breadcrumb.js";
4
- export { type BreadcrumbEmits, _default as BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbItemRenderContext, type ItemType as BreadcrumbItemType, type BreadcrumbProps, _default$1 as BreadcrumbSeparator, type BreadcrumbSlots, type SeparatorType, Breadcrumb as default };
3
+ import Breadcrumb, { BreadcrumbEmits, BreadcrumbItemRenderContext, BreadcrumbProps, BreadcrumbRef, BreadcrumbSlots, ItemType } from "./Breadcrumb.js";
4
+ export { type BreadcrumbEmits, _default as BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbItemRenderContext, type ItemType as BreadcrumbItemType, type BreadcrumbProps, type BreadcrumbRef, _default$1 as BreadcrumbSeparator, type BreadcrumbSlots, type SeparatorType, Breadcrumb as default };