antdv-next 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/_util/PurePanel.js +1 -1
  2. package/dist/_util/hooks/index.js +1 -1
  3. package/dist/_util/hooks/useClosable.d.ts +3 -3
  4. package/dist/_util/hooks/useClosable.js +9 -9
  5. package/dist/_util/hooks/useZIndex.js +14 -15
  6. package/dist/_util/vueNode.d.ts +6 -2
  7. package/dist/affix/index.js +27 -12
  8. package/dist/alert/Alert.d.ts +2 -2
  9. package/dist/alert/Alert.js +3 -3
  10. package/dist/alert/style/index.js +14 -8
  11. package/dist/anchor/Anchor.js +3 -1
  12. package/dist/antd-with-locales.esm.js +19634 -19203
  13. package/dist/antd-with-locales.js +112 -112
  14. package/dist/antd.css +1 -1
  15. package/dist/antd.esm.js +17697 -17268
  16. package/dist/antd.js +113 -113
  17. package/dist/app/App.js +2 -2
  18. package/dist/auto-complete/index.js +2 -2
  19. package/dist/avatar/Avatar.js +2 -2
  20. package/dist/avatar/AvatarGroup.js +1 -1
  21. package/dist/badge/Ribbon.js +1 -1
  22. package/dist/badge/index.d.ts +4 -1
  23. package/dist/badge/index.js +6 -6
  24. package/dist/border-beam/BorderBeam.js +1 -1
  25. package/dist/breadcrumb/Breadcrumb.js +2 -2
  26. package/dist/button/Button.js +1 -1
  27. package/dist/button/style/index.js +8 -2
  28. package/dist/calendar/generateCalendar.js +3 -3
  29. package/dist/card/Card.js +2 -2
  30. package/dist/card/CardGrid.js +1 -1
  31. package/dist/card/CardMeta.js +1 -1
  32. package/dist/card/style/index.js +2 -2
  33. package/dist/carousel/index.js +2 -2
  34. package/dist/cascader/Panel.js +1 -1
  35. package/dist/cascader/index.js +4 -4
  36. package/dist/checkbox/Checkbox.js +3 -2
  37. package/dist/checkbox/Group.js +1 -1
  38. package/dist/collapse/Collapse.js +2 -2
  39. package/dist/color-picker/ColorPicker.js +6 -2
  40. package/dist/color-picker/ColorPickerPanel.js +4 -0
  41. package/dist/color-picker/components/ColorSlider.js +12 -4
  42. package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
  43. package/dist/components.d.ts +12 -8
  44. package/dist/components.js +3 -3
  45. package/dist/config-provider/context.d.ts +5 -3
  46. package/dist/config-provider/context.js +3 -3
  47. package/dist/config-provider/define.d.ts +5 -1
  48. package/dist/config-provider/index.js +38 -4
  49. package/dist/date-picker/generatePicker/generateRangePicker.js +3 -3
  50. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -3
  51. package/dist/date-picker/hooks/useMergedPickerSemantic.js +1 -1
  52. package/dist/date-picker/style/panel.js +3 -5
  53. package/dist/descriptions/hooks/useItems.d.ts +2 -2
  54. package/dist/descriptions/hooks/useRow.js +1 -1
  55. package/dist/descriptions/index.js +2 -2
  56. package/dist/divider/index.js +1 -1
  57. package/dist/drawer/DrawerPanel.js +1 -1
  58. package/dist/drawer/index.js +3 -3
  59. package/dist/dropdown/dropdown.js +3 -3
  60. package/dist/empty/index.js +2 -1
  61. package/dist/float-button/BackTop.js +2 -2
  62. package/dist/float-button/FloatButton.js +1 -1
  63. package/dist/float-button/FloatButtonGroup.js +2 -2
  64. package/dist/float-button/PurePanel.js +1 -1
  65. package/dist/form/ErrorList.js +1 -1
  66. package/dist/form/Form.d.ts +17 -44
  67. package/dist/form/Form.js +56 -7
  68. package/dist/form/FormItem/ItemHolder.js +3 -3
  69. package/dist/form/FormItem/index.d.ts +3 -3
  70. package/dist/form/FormItem/index.js +1 -1
  71. package/dist/form/FormItemLabel.js +1 -1
  72. package/dist/form/context.d.ts +3 -3
  73. package/dist/form/hooks/useForm.d.ts +4 -5
  74. package/dist/form/hooks/useVariant.js +1 -1
  75. package/dist/form/index.d.ts +29 -3
  76. package/dist/form/index.js +6 -6
  77. package/dist/form/types.d.ts +15 -7
  78. package/dist/grid/col.js +1 -1
  79. package/dist/grid/row.js +1 -1
  80. package/dist/image/PreviewGroup.js +2 -2
  81. package/dist/image/index.d.ts +5 -5
  82. package/dist/image/index.js +9 -5
  83. package/dist/index.d.ts +14 -7
  84. package/dist/index.js +2 -2
  85. package/dist/input/Group.js +2 -2
  86. package/dist/input/Input.js +2 -2
  87. package/dist/input/OTP/OTPInput.js +1 -1
  88. package/dist/input/OTP/index.js +2 -2
  89. package/dist/input/Password.js +1 -1
  90. package/dist/input/Search.js +2 -2
  91. package/dist/input/TextArea.js +2 -2
  92. package/dist/input-number/index.js +3 -3
  93. package/dist/input-number/style/index.js +3 -2
  94. package/dist/layout/Sider.js +2 -2
  95. package/dist/layout/layout.js +2 -3
  96. package/dist/listy/index.js +1 -1
  97. package/dist/locale/id_ID.js +8 -6
  98. package/dist/locale/uz_UZ.js +12 -12
  99. package/dist/masonry/Masonry.js +1 -1
  100. package/dist/mentions/index.js +5 -4
  101. package/dist/menu/MenuDivider.js +1 -1
  102. package/dist/menu/MenuItem.js +1 -1
  103. package/dist/menu/index.d.ts +2 -1
  104. package/dist/menu/index.js +29 -5
  105. package/dist/menu/menu.js +42 -18
  106. package/dist/message/PurePanel.js +2 -2
  107. package/dist/message/index.js +11 -9
  108. package/dist/message/useMessage.js +2 -2
  109. package/dist/modal/ConfirmDialog.js +2 -2
  110. package/dist/modal/Modal.js +4 -4
  111. package/dist/modal/PurePanel.js +1 -1
  112. package/dist/modal/confirm.js +6 -8
  113. package/dist/modal/index.d.ts +2 -2
  114. package/dist/modal/interface.d.ts +1 -1
  115. package/dist/modal/useModal/index.js +9 -4
  116. package/dist/notification/PurePanel.js +2 -2
  117. package/dist/notification/index.js +8 -13
  118. package/dist/notification/useNotification.js +2 -2
  119. package/dist/package.js +1 -1
  120. package/dist/package.json.d.ts +1 -0
  121. package/dist/pagination/Pagination.js +4 -4
  122. package/dist/popconfirm/index.js +2 -2
  123. package/dist/popover/PurePanel.js +2 -2
  124. package/dist/popover/index.js +1 -1
  125. package/dist/progress/progress.js +3 -3
  126. package/dist/qrcode/index.js +3 -3
  127. package/dist/radio/group.js +2 -2
  128. package/dist/radio/radio.js +2 -2
  129. package/dist/rate/index.js +2 -2
  130. package/dist/result/index.js +1 -1
  131. package/dist/segmented/index.js +1 -1
  132. package/dist/segmented/style/index.js +3 -2
  133. package/dist/select/index.d.ts +1 -0
  134. package/dist/select/index.js +5 -5
  135. package/dist/skeleton/Avatar.js +1 -1
  136. package/dist/skeleton/Button.js +1 -1
  137. package/dist/skeleton/Element.js +1 -1
  138. package/dist/skeleton/Input.js +1 -1
  139. package/dist/skeleton/Node.js +1 -1
  140. package/dist/skeleton/Skeleton.js +1 -1
  141. package/dist/skeleton/style/index.js +9 -13
  142. package/dist/slider/SliderTooltip.js +0 -1
  143. package/dist/slider/index.d.ts +2 -0
  144. package/dist/slider/index.js +5 -1
  145. package/dist/space/Addon.js +1 -1
  146. package/dist/space/index.js +1 -1
  147. package/dist/spin/index.js +2 -2
  148. package/dist/splitter/Splitter.js +2 -2
  149. package/dist/statistic/Statistic.js +1 -1
  150. package/dist/statistic/Timer.d.ts +2 -2
  151. package/dist/statistic/Timer.js +1 -1
  152. package/dist/steps/index.js +5 -4
  153. package/dist/switch/index.js +2 -2
  154. package/dist/table/InternalTable.js +10 -4
  155. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
  156. package/dist/table/hooks/usePagination.d.ts +1 -2
  157. package/dist/table/hooks/usePagination.js +1 -3
  158. package/dist/table/hooks/useSelection.js +1 -1
  159. package/dist/table/hooks/useSorter.js +26 -19
  160. package/dist/table/style/index.js +1 -0
  161. package/dist/table/style/size.js +1 -0
  162. package/dist/table/util.d.ts +1 -1
  163. package/dist/tabs/index.js +3 -3
  164. package/dist/tabs/style/index.js +5 -1
  165. package/dist/tag/CheckableTag.js +1 -1
  166. package/dist/tag/CheckableTagGroup.d.ts +0 -1
  167. package/dist/tag/CheckableTagGroup.js +0 -4
  168. package/dist/tag/hooks/useColor.d.ts +1 -1
  169. package/dist/tag/index.js +1 -1
  170. package/dist/theme/themes/dark/index.js +1 -1
  171. package/dist/theme/useToken.js +2 -2
  172. package/dist/timeline/Timeline.js +1 -1
  173. package/dist/timeline/useItems.js +1 -1
  174. package/dist/tooltip/PurePanel.js +1 -1
  175. package/dist/tooltip/index.js +2 -2
  176. package/dist/tour/index.js +5 -2
  177. package/dist/transfer/Section.js +1 -1
  178. package/dist/transfer/Transfer.js +3 -3
  179. package/dist/transfer/hooks/useSelection.js +2 -1
  180. package/dist/tree/DirectoryTree.js +6 -5
  181. package/dist/tree/Tree.js +4 -4
  182. package/dist/tree/utils/dictUtil.js +5 -8
  183. package/dist/tree-select/index.js +4 -4
  184. package/dist/typography/Base/index.js +5 -3
  185. package/dist/typography/Base/util.js +2 -1
  186. package/dist/typography/Editable.js +6 -2
  187. package/dist/typography/Typography.js +1 -1
  188. package/dist/upload/Upload.js +25 -16
  189. package/dist/upload/UploadList/ListItem.js +5 -1
  190. package/dist/upload/UploadList/index.js +19 -12
  191. package/dist/version/token.json +1 -1
  192. package/dist/watermark/index.d.ts +13 -4
  193. package/dist/watermark/index.js +11 -7
  194. package/dist/watermark/useRafDebounce.js +1 -2
  195. package/dist/watermark/utils.js +1 -1
  196. package/package.json +42 -41
  197. package/web-tags.json +22 -14
  198. package/web-types.json +46 -23
@@ -1,5 +1,5 @@
1
- import { useBaseConfig } from "../config-provider/context.js";
2
1
  import { normalizeStyle as normalizeStyle$1 } from "./styleUtils.js";
2
+ import { useBaseConfig } from "../config-provider/context.js";
3
3
  import ConfigProvider from "../config-provider/index.js";
4
4
  import { createVNode, defineComponent, mergeProps, shallowRef, useAttrs, useSlots, watch } from "vue";
5
5
  //#region src/_util/PurePanel.tsx
@@ -1,6 +1,6 @@
1
- import { useOrientation } from "./useOrientation.js";
2
1
  import { normalizeMaskConfig, useMergedMask } from "./useMergedMask.js";
3
2
  import { getAttrStyleAndClass, mergeClassNames, mergeStyles, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useSemanticRootStyle, useToArr, useToProps } from "./useMergeSemantic.js";
4
3
  import { useMultipleSelect } from "./useMultipleSelect.js";
4
+ import { useOrientation } from "./useOrientation.js";
5
5
  import { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from "./useZIndex.js";
6
6
  export { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, getAttrStyleAndClass, mergeClassNames, mergeStyles, normalizeMaskConfig, pureAttrs, resolveStyleOrClass, useMergeSemantic, useMergeSemanticNoRef, useMergedMask, useMultipleSelect, useOrientation, useSemanticRootStyle, useToArr, useToProps, useZIndex };
@@ -34,11 +34,11 @@ interface UseClosableParams {
34
34
  customCloseIconRender?: (closeIcon: VNodeChild) => VNodeChild;
35
35
  context?: ContextClosable;
36
36
  }
37
- declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<({} | null)[] | readonly [true, import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<({} | null)[] | readonly [true, void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
38
  [key: string]: any;
39
- }>, boolean, {
39
+ }> | null | undefined, boolean, {
40
40
  readonly 'aria-label': any;
41
- }] | undefined>;
41
+ }]>;
42
42
  declare function computeClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>, closeLabel?: string): [closable: boolean, closeIcon: VueNode, closeBtnIsDisabled: boolean, ariaOrDataProps: AriaAttributes & DataAttributes];
43
43
  //#endregion
44
44
  export { BaseContextClosable, ClosableType, ContextClosable, UseClosableParams, computeClosable, useClosable as default, pickClosable };
@@ -78,16 +78,16 @@ function useClosable(propCloseCollection, contextCloseCollection, fallbackCloseC
78
78
  "aria-label": mergedCloseIcon.props?.["aria-label"] ?? contextLocale?.value?.close,
79
79
  ...ariaOrDataProps
80
80
  }) : createVNode("span", mergeProps({ "aria-label": contextLocale?.value?.close }, ariaOrDataProps), [mergedCloseIcon]);
81
- return [
82
- true,
83
- mergedCloseIcon,
84
- closeBtnIsDisabled.value,
85
- {
86
- "aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
87
- ...ariaOrDataProps
88
- }
89
- ];
90
81
  }
82
+ return [
83
+ true,
84
+ mergedCloseIcon,
85
+ closeBtnIsDisabled.value,
86
+ {
87
+ "aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
88
+ ...ariaOrDataProps
89
+ }
90
+ ];
91
91
  });
92
92
  }
93
93
  function computeClosableConfig(closable, closeIcon) {
@@ -1,5 +1,5 @@
1
- import { devUseWarning, isDev } from "../warning.js";
2
1
  import useToken from "../../theme/useToken.js";
2
+ import { devUseWarning, isDev } from "../warning.js";
3
3
  import { useZIndexContext } from "../zindexContext.js";
4
4
  import { computed } from "vue";
5
5
  //#region src/_util/hooks/useZIndex.ts
@@ -34,24 +34,23 @@ function useZIndex(componentType, customZIndex) {
34
34
  const [, token] = useToken();
35
35
  const parentZIndex = useZIndexContext();
36
36
  const isContainer = isContainerType(componentType);
37
- let result;
38
- if (customZIndex?.value !== void 0) result = [customZIndex, customZIndex];
39
- else {
40
- const resIndex = computed(() => {
41
- let zIndex = parentZIndex.value ?? 0;
42
- if (isContainer) zIndex += (parentZIndex.value ? 0 : token.value.zIndexPopupBase) + containerBaseZIndexOffset[componentType];
43
- else zIndex += consumerBaseZIndexOffset[componentType];
44
- return [parentZIndex.value === void 0 ? customZIndex?.value : zIndex, zIndex];
45
- });
46
- result = [computed(() => resIndex.value[0]), computed(() => resIndex.value[1])];
47
- }
37
+ const contextZIndex = computed(() => {
38
+ if (customZIndex?.value !== void 0) return customZIndex.value;
39
+ let zIndex = parentZIndex.value ?? 0;
40
+ if (isContainer) zIndex += (parentZIndex.value ? 0 : token.value.zIndexPopupBase) + containerBaseZIndexOffset[componentType];
41
+ else zIndex += consumerBaseZIndexOffset[componentType];
42
+ return zIndex;
43
+ });
44
+ const zIndex = computed(() => {
45
+ if (customZIndex?.value !== void 0) return customZIndex.value;
46
+ return parentZIndex.value === void 0 ? void 0 : contextZIndex.value;
47
+ });
48
48
  if (isDev) {
49
49
  const warning = devUseWarning(componentType);
50
50
  const maxZIndex = token.value.zIndexPopupBase + CONTAINER_MAX_OFFSET_WITH_CHILDREN;
51
- const currentZIndex = computed(() => result[0]?.value ?? 0);
52
- warning(customZIndex?.value !== void 0 || currentZIndex.value <= maxZIndex, "usage", "`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.");
51
+ warning(customZIndex?.value !== void 0 || (zIndex.value ?? 0) <= maxZIndex, "usage", "`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.");
53
52
  }
54
- return result;
53
+ return [zIndex, contextZIndex];
55
54
  }
56
55
  //#endregion
57
56
  export { CONTAINER_MAX_OFFSET, consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex };
@@ -3,8 +3,12 @@ import { VNodeChild } from "vue";
3
3
  import { isFragment } from "@v-c/util/dist/Children/isFragment";
4
4
  //#region src/_util/vueNode.d.ts
5
5
  type RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | undefined);
6
- declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps): VNodeChild;
7
- declare function cloneElement(element: VNodeChild, props?: RenderProps): VNodeChild;
6
+ declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }> | import("vue").VNodeArrayChildren | null;
9
+ declare function cloneElement(element: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }> | import("vue").VNodeArrayChildren | null;
8
12
  /**
9
13
  * 当传入值是 VNode 时返回一个全新的克隆,数组会逐项处理,其余值原样返回。
10
14
  *
@@ -1,5 +1,6 @@
1
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
1
3
  import throttleByAnimationFrame from "../_util/throttleByAnimationFrame.js";
2
- import { useConfig } from "../config-provider/context.js";
3
4
  import style_default from "./style/index.js";
4
5
  import { getFixedBottom, getFixedTop, getTargetRect } from "./utils.js";
5
6
  import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, nextTick, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
@@ -19,15 +20,12 @@ const TRIGGER_EVENTS = [
19
20
  function getDefaultTarget() {
20
21
  return typeof window !== "undefined" ? window : null;
21
22
  }
22
- const AFFIX_STATUS_NONE = 0;
23
- const AFFIX_STATUS_PREPARE = 1;
24
23
  const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
25
24
  const configContext = useConfig();
26
- const affixPrefixCls = computed(() => configContext.value.getPrefixCls("affix", props.prefixCls));
25
+ const { prefixCls: affixPrefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("affix", props);
27
26
  const lastAffix = shallowRef(false);
28
27
  const affixStyle = shallowRef();
29
28
  const placeholderStyle = shallowRef();
30
- const status = shallowRef(AFFIX_STATUS_NONE);
31
29
  let prevTarget = null;
32
30
  let prevListener = null;
33
31
  const placeholderNodeRef = shallowRef();
@@ -35,15 +33,16 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
35
33
  const contextRef = shallowRef();
36
34
  const timer = shallowRef(null);
37
35
  const targetFunc = computed(() => props.target ?? configContext.value.getTargetContainer ?? getDefaultTarget);
36
+ const resolvedTarget = computed(() => targetFunc.value());
38
37
  const internalOffsetTop = computed(() => {
39
38
  const { offsetTop, offsetBottom } = props;
40
39
  return offsetBottom === void 0 && offsetTop === void 0 ? 0 : offsetTop;
41
40
  });
42
41
  const measure = () => {
43
- if (status.value !== AFFIX_STATUS_PREPARE || !fixedNodeRef.value || !placeholderNodeRef.value) return;
42
+ if (!fixedNodeRef.value || !placeholderNodeRef.value) return;
44
43
  const targetNode = targetFunc.value();
45
44
  if (targetNode) {
46
- const newState = { status: AFFIX_STATUS_NONE };
45
+ const newState = {};
47
46
  const placeholderRect = getTargetRect(placeholderNodeRef.value);
48
47
  const contentHeight = getTargetRect(contextRef.value || fixedNodeRef.value).height || placeholderRect.height;
49
48
  if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) return;
@@ -64,14 +63,12 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
64
63
  }
65
64
  newState.lastAffix = !!newState.affixStyle;
66
65
  if (lastAffix.value !== newState.lastAffix) emit("change", newState.lastAffix);
67
- status.value = newState.status;
68
66
  affixStyle.value = newState.affixStyle;
69
67
  placeholderStyle.value = newState.placeholderStyle;
70
68
  lastAffix.value = newState.lastAffix;
71
69
  }
72
70
  };
73
71
  const prepareMeasure = () => {
74
- status.value = AFFIX_STATUS_PREPARE;
75
72
  measure();
76
73
  };
77
74
  const updatePosition = throttleByAnimationFrame(() => {
@@ -92,10 +89,18 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
92
89
  });
93
90
  const addListeners = () => {
94
91
  const listenerTarget = targetFunc.value();
92
+ const previousTarget = prevTarget;
93
+ const previousListener = prevListener;
94
+ if (previousListener) {
95
+ TRIGGER_EVENTS.forEach((eventName) => {
96
+ previousTarget?.removeEventListener(eventName, previousListener);
97
+ });
98
+ prevTarget = null;
99
+ prevListener = null;
100
+ }
95
101
  if (!listenerTarget) return;
96
102
  TRIGGER_EVENTS.forEach((eventName) => {
97
- if (prevListener) prevTarget?.removeEventListener(eventName, prevListener);
98
- listenerTarget?.addEventListener(eventName, lazyUpdatePosition);
103
+ listenerTarget.addEventListener(eventName, lazyUpdatePosition);
99
104
  });
100
105
  prevTarget = listenerTarget;
101
106
  prevListener = lazyUpdatePosition;
@@ -123,6 +128,7 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
123
128
  });
124
129
  watch([
125
130
  () => props.target,
131
+ resolvedTarget,
126
132
  affixStyle,
127
133
  lastAffix,
128
134
  () => props.offsetTop,
@@ -136,6 +142,7 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
136
142
  });
137
143
  watch([
138
144
  () => props.target,
145
+ resolvedTarget,
139
146
  () => props.offsetTop,
140
147
  () => props.offsetBottom
141
148
  ], async () => {
@@ -158,7 +165,15 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
158
165
  const _el = unrefElement(el);
159
166
  if (_el) contextRef.value = _el;
160
167
  } });
161
- return createVNode("div", mergeProps(attrs, { "ref": placeholderNodeRef }), [affixStyle.value && createVNode("div", {
168
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
169
+ return createVNode("div", mergeProps(restAttrs, {
170
+ "ref": placeholderNodeRef,
171
+ "class": classNames(className, contextClassName.value),
172
+ "style": {
173
+ ...contextStyle.value,
174
+ ...style
175
+ }
176
+ }), [affixStyle.value && createVNode("div", {
162
177
  "style": placeholderStyle.value,
163
178
  "aria-hidden": "true"
164
179
  }, null), createVNode("div", {
@@ -37,8 +37,8 @@ interface AlertProps extends ComponentBaseProps, AlertEmitsProps {
37
37
  type?: 'success' | 'info' | 'warning' | 'error';
38
38
  /**
39
39
  * Visual variant. `filled` keeps the existing solid background, `outlined`
40
- * renders with the colored border style introduced in ant-design 6.4.0.
41
- * @default 'filled'
40
+ * renders with the colored border style.
41
+ * @default 'outlined'
42
42
  */
43
43
  variant?: AlertVariant;
44
44
  /** Whether Alert can be closed */
@@ -1,7 +1,7 @@
1
- import { useComponentBaseConfig } from "../config-provider/context.js";
2
1
  import { getAttrStyleAndClass, pureAttrs, useMergeSemanticNoRef } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
4
- import { isRenderable } from "../_util/is.js";
4
+ import { isPlainObject, isRenderable } from "../_util/is.js";
5
5
  import useVariant from "../form/hooks/useVariant.js";
6
6
  import style_default from "./style/index.js";
7
7
  import { Transition, computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef, toRef } from "vue";
@@ -191,7 +191,7 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expo
191
191
  const { className, style } = getAttrStyleAndClass(attrs);
192
192
  const isClosableFn = () => {
193
193
  const closeIcon = getSlotPropsFnRun(slots, props, "closeIcon");
194
- if (typeof closable === "object") return true;
194
+ if (isPlainObject(closable)) return true;
195
195
  if (typeof closable === "boolean") return closable;
196
196
  const closeIconNode = typeof closeIcon === "function" ? filterEmpty(closeIcon()) : closeIcon;
197
197
  if (Array.isArray(closeIconNode) && closeIconNode.length > 0) return true;
@@ -2,15 +2,14 @@ import { genFocusStyle, resetComponent } from "../../style/index.js";
2
2
  import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
3
3
  import { unit } from "@antdv-next/cssinjs";
4
4
  //#region src/alert/style/index.ts
5
- function genAlertTypeStyle(bgColor, borderColor, iconColor, token, alertCls) {
5
+ function genAlertTypeStyle(bgColor, iconColor, alertCls) {
6
6
  return {
7
7
  background: bgColor,
8
- border: `${unit(token.lineWidth)} ${token.lineType} ${borderColor}`,
9
8
  [`${alertCls}-icon`]: { color: iconColor }
10
9
  };
11
10
  }
12
11
  const genBaseStyle = (token) => {
13
- const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, motionEaseInOutCirc, containerBorderRadius, withDescriptionIconSize, colorText, colorTextHeading, withDescriptionPadding, defaultPadding } = token;
12
+ const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, motionEaseInOutCirc, containerBorderRadius, withDescriptionIconSize, colorText, colorTextHeading, withDescriptionPadding, defaultPadding, lineWidth, lineType, colorSuccessBorder, colorWarningBorder, colorErrorBorder, colorInfoBorder } = token;
14
13
  return { [componentCls]: {
15
14
  ...resetComponent(token),
16
15
  position: "relative",
@@ -19,6 +18,13 @@ const genBaseStyle = (token) => {
19
18
  padding: defaultPadding,
20
19
  wordWrap: "break-word",
21
20
  borderRadius: containerBorderRadius,
21
+ borderWidth: unit(lineWidth),
22
+ borderStyle: lineType,
23
+ [`&${componentCls}-success`]: { borderColor: colorSuccessBorder },
24
+ [`&${componentCls}-info`]: { borderColor: colorInfoBorder },
25
+ [`&${componentCls}-warning`]: { borderColor: colorWarningBorder },
26
+ [`&${componentCls}-error`]: { borderColor: colorErrorBorder },
27
+ [`&${componentCls}-filled`]: { borderColor: "transparent" },
22
28
  [`&${componentCls}-rtl`]: { direction: "rtl" },
23
29
  [`${componentCls}-section`]: {
24
30
  flex: 1,
@@ -79,13 +85,13 @@ const genBaseStyle = (token) => {
79
85
  } };
80
86
  };
81
87
  const genTypeStyle = (token) => {
82
- const { componentCls, colorSuccess, colorSuccessBorder, colorSuccessBg, colorWarning, colorWarningBorder, colorWarningBg, colorError, colorErrorBorder, colorErrorBg, colorInfo, colorInfoBorder, colorInfoBg } = token;
88
+ const { componentCls, colorSuccess, colorSuccessBg, colorWarning, colorWarningBg, colorError, colorErrorBg, colorInfo, colorInfoBg } = token;
83
89
  return { [componentCls]: {
84
- "&-success": genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),
85
- "&-info": genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),
86
- "&-warning": genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),
90
+ "&-success": genAlertTypeStyle(colorSuccessBg, colorSuccess, componentCls),
91
+ "&-info": genAlertTypeStyle(colorInfoBg, colorInfo, componentCls),
92
+ "&-warning": genAlertTypeStyle(colorWarningBg, colorWarning, componentCls),
87
93
  "&-error": {
88
- ...genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls),
94
+ ...genAlertTypeStyle(colorErrorBg, colorError, componentCls),
89
95
  [`${componentCls}-description > pre`]: {
90
96
  margin: 0,
91
97
  padding: 0
@@ -1,5 +1,5 @@
1
- import { useComponentBaseConfig } from "../config-provider/context.js";
2
1
  import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { clsx as clsx$1, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
4
4
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
5
5
  import { Affix } from "../affix/index.js";
@@ -134,9 +134,11 @@ const Anchor = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
134
134
  const container = getCurrentContainer();
135
135
  let y = getScroll(container) + getOffsetTop(targetElement, container);
136
136
  y -= linkTargetOffset ?? (targetOffset !== void 0 ? targetOffset : offsetTop || 0);
137
+ const prefersReducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)");
137
138
  animatingRef.value = true;
138
139
  scrollRequestIdRef.value = scrollTo(y, {
139
140
  getContainer: getCurrentContainer,
141
+ duration: prefersReducedMotion?.matches ? 0 : void 0,
140
142
  callback() {
141
143
  animatingRef.value = false;
142
144
  scrollRequestIdRef.value = null;