antdv-next 1.8.0 → 1.8.2

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 (174) hide show
  1. package/dist/_util/PurePanel.js +1 -1
  2. package/dist/_util/hooks/index.js +1 -1
  3. package/dist/_util/hooks/useZIndex.js +14 -15
  4. package/dist/affix/index.js +25 -5
  5. package/dist/alert/Alert.d.ts +2 -2
  6. package/dist/alert/Alert.js +3 -3
  7. package/dist/alert/style/index.js +14 -8
  8. package/dist/anchor/Anchor.js +3 -1
  9. package/dist/antd-with-locales.esm.js +19221 -16952
  10. package/dist/antd-with-locales.js +114 -111
  11. package/dist/antd.css +1 -1
  12. package/dist/antd.esm.js +19006 -16739
  13. package/dist/antd.js +114 -111
  14. package/dist/app/App.js +2 -2
  15. package/dist/auto-complete/index.js +2 -2
  16. package/dist/avatar/Avatar.js +2 -2
  17. package/dist/avatar/AvatarGroup.js +1 -1
  18. package/dist/badge/Ribbon.js +1 -1
  19. package/dist/badge/index.js +2 -2
  20. package/dist/badge/style/ribbon.d.ts +0 -1
  21. package/dist/border-beam/BorderBeam.js +1 -1
  22. package/dist/border-beam/style/index.d.ts +0 -1
  23. package/dist/breadcrumb/Breadcrumb.js +2 -2
  24. package/dist/button/Button.js +1 -1
  25. package/dist/button/buttonHelper.d.ts +1 -1
  26. package/dist/button/style/index.d.ts +0 -1
  27. package/dist/calendar/generateCalendar.js +2 -2
  28. package/dist/card/Card.js +2 -2
  29. package/dist/card/CardGrid.js +1 -1
  30. package/dist/card/CardMeta.js +1 -1
  31. package/dist/card/style/index.js +2 -2
  32. package/dist/carousel/index.js +2 -2
  33. package/dist/cascader/Panel.js +1 -1
  34. package/dist/cascader/index.js +4 -4
  35. package/dist/cascader/style/panel.d.ts +0 -1
  36. package/dist/checkbox/Checkbox.js +2 -2
  37. package/dist/checkbox/Group.js +1 -1
  38. package/dist/collapse/Collapse.js +2 -2
  39. package/dist/color-picker/ColorPicker.js +2 -2
  40. package/dist/components.d.ts +2 -2
  41. package/dist/config-provider/context.d.ts +2 -0
  42. package/dist/config-provider/define.d.ts +5 -1
  43. package/dist/config-provider/index.js +38 -4
  44. package/dist/date-picker/generatePicker/generateRangePicker.js +3 -3
  45. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -3
  46. package/dist/date-picker/generatePicker/useComponents.js +2 -2
  47. package/dist/date-picker/hooks/useMergedPickerSemantic.js +1 -1
  48. package/dist/date-picker/style/index.d.ts +0 -1
  49. package/dist/date-picker/style/panel.js +14 -13
  50. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  51. package/dist/descriptions/index.js +2 -2
  52. package/dist/divider/index.js +1 -1
  53. package/dist/drawer/DrawerPanel.js +1 -1
  54. package/dist/drawer/index.js +3 -3
  55. package/dist/dropdown/dropdown.js +3 -3
  56. package/dist/empty/index.js +2 -1
  57. package/dist/empty/style/index.d.ts +0 -1
  58. package/dist/float-button/BackTop.js +2 -2
  59. package/dist/float-button/FloatButton.js +1 -1
  60. package/dist/float-button/FloatButtonGroup.js +2 -2
  61. package/dist/float-button/PurePanel.js +1 -1
  62. package/dist/form/ErrorList.js +1 -1
  63. package/dist/form/Form.js +2 -2
  64. package/dist/form/FormItem/ItemHolder.js +3 -3
  65. package/dist/form/FormItem/index.js +1 -1
  66. package/dist/form/FormItemLabel.js +1 -1
  67. package/dist/form/context.d.ts +1 -1
  68. package/dist/form/hooks/useVariant.js +1 -1
  69. package/dist/grid/col.js +1 -1
  70. package/dist/grid/row.js +1 -1
  71. package/dist/image/PreviewGroup.js +2 -2
  72. package/dist/image/hooks/usePreviewConfig.d.ts +6 -6
  73. package/dist/image/index.js +9 -5
  74. package/dist/index.d.ts +2 -2
  75. package/dist/input/Group.js +2 -2
  76. package/dist/input/Input.js +2 -2
  77. package/dist/input/OTP/OTPInput.js +1 -1
  78. package/dist/input/OTP/index.js +2 -2
  79. package/dist/input/Password.js +1 -1
  80. package/dist/input/Search.js +2 -2
  81. package/dist/input/TextArea.js +2 -2
  82. package/dist/input/style/otp.d.ts +0 -1
  83. package/dist/input/style/search.d.ts +0 -1
  84. package/dist/input/style/textarea.d.ts +0 -1
  85. package/dist/input-number/index.js +3 -3
  86. package/dist/input-number/style/index.d.ts +0 -1
  87. package/dist/layout/Sider.js +2 -2
  88. package/dist/layout/style/sider.d.ts +0 -1
  89. package/dist/listy/index.js +1 -1
  90. package/dist/locale/id_ID.js +8 -6
  91. package/dist/locale/uz_UZ.js +12 -12
  92. package/dist/masonry/Masonry.js +1 -1
  93. package/dist/mentions/index.js +3 -3
  94. package/dist/menu/MenuDivider.js +1 -1
  95. package/dist/menu/menu.js +3 -3
  96. package/dist/message/PurePanel.js +2 -2
  97. package/dist/message/style/index.d.ts +0 -1
  98. package/dist/message/useMessage.js +2 -2
  99. package/dist/modal/ConfirmDialog.js +2 -2
  100. package/dist/modal/Modal.js +4 -4
  101. package/dist/modal/PurePanel.js +1 -1
  102. package/dist/modal/confirm.js +5 -6
  103. package/dist/notification/PurePanel.js +2 -2
  104. package/dist/notification/index.js +6 -7
  105. package/dist/notification/useNotification.js +2 -2
  106. package/dist/package.js +1 -1
  107. package/dist/pagination/Pagination.js +4 -4
  108. package/dist/popconfirm/index.js +2 -2
  109. package/dist/popover/PurePanel.js +2 -2
  110. package/dist/popover/index.js +1 -1
  111. package/dist/progress/progress.js +3 -3
  112. package/dist/qrcode/index.js +3 -3
  113. package/dist/radio/group.js +2 -2
  114. package/dist/radio/radio.js +2 -2
  115. package/dist/rate/index.js +2 -2
  116. package/dist/result/index.js +1 -1
  117. package/dist/segmented/index.js +1 -1
  118. package/dist/select/index.js +4 -4
  119. package/dist/select/style/index.d.ts +0 -1
  120. package/dist/skeleton/Avatar.js +1 -1
  121. package/dist/skeleton/Button.js +1 -1
  122. package/dist/skeleton/Element.js +1 -1
  123. package/dist/skeleton/Input.js +1 -1
  124. package/dist/skeleton/Node.js +1 -1
  125. package/dist/skeleton/Skeleton.js +1 -1
  126. package/dist/slider/index.js +1 -1
  127. package/dist/space/Addon.js +1 -1
  128. package/dist/space/index.js +1 -1
  129. package/dist/space/style/addon.d.ts +0 -1
  130. package/dist/space/style/compact.d.ts +0 -1
  131. package/dist/spin/index.js +2 -2
  132. package/dist/splitter/Splitter.js +2 -2
  133. package/dist/statistic/Statistic.js +1 -1
  134. package/dist/statistic/Timer.js +1 -1
  135. package/dist/steps/index.js +3 -3
  136. package/dist/switch/index.js +2 -2
  137. package/dist/table/InternalTable.js +10 -4
  138. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  139. package/dist/table/hooks/useSelection.js +1 -1
  140. package/dist/table/hooks/useSorter.js +22 -11
  141. package/dist/table/style/expand.js +4 -1
  142. package/dist/table/util.d.ts +1 -1
  143. package/dist/tabs/index.js +3 -3
  144. package/dist/tag/CheckableTag.js +1 -1
  145. package/dist/tag/CheckableTagGroup.d.ts +0 -1
  146. package/dist/tag/CheckableTagGroup.js +0 -4
  147. package/dist/tag/hooks/useColor.d.ts +1 -1
  148. package/dist/tag/index.js +1 -1
  149. package/dist/theme/index.d.ts +0 -1
  150. package/dist/theme/themes/dark/index.js +1 -1
  151. package/dist/theme/useToken.js +2 -2
  152. package/dist/timeline/Timeline.js +1 -1
  153. package/dist/timeline/useItems.js +1 -1
  154. package/dist/tooltip/PurePanel.js +1 -1
  155. package/dist/tooltip/index.js +2 -2
  156. package/dist/tour/index.js +1 -1
  157. package/dist/transfer/Section.js +1 -1
  158. package/dist/transfer/Transfer.js +3 -3
  159. package/dist/tree/DirectoryTree.js +2 -2
  160. package/dist/tree/Tree.js +4 -4
  161. package/dist/tree-select/index.js +4 -4
  162. package/dist/typography/Base/index.js +2 -2
  163. package/dist/typography/Editable.js +6 -2
  164. package/dist/typography/Typography.js +1 -1
  165. package/dist/upload/Upload.js +11 -6
  166. package/dist/upload/UploadList/ListItem.js +1 -1
  167. package/dist/upload/UploadList/index.js +19 -12
  168. package/dist/version/token.json +1 -1
  169. package/dist/watermark/index.d.ts +13 -4
  170. package/dist/watermark/index.js +11 -7
  171. package/dist/watermark/useRafDebounce.js +1 -2
  172. package/package.json +10 -10
  173. package/web-tags.json +14 -6
  174. package/web-types.json +29 -12
@@ -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 };
@@ -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 };
@@ -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";
@@ -23,7 +24,7 @@ const AFFIX_STATUS_NONE = 0;
23
24
  const AFFIX_STATUS_PREPARE = 1;
24
25
  const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
25
26
  const configContext = useConfig();
26
- const affixPrefixCls = computed(() => configContext.value.getPrefixCls("affix", props.prefixCls));
27
+ const { prefixCls: affixPrefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("affix", props);
27
28
  const lastAffix = shallowRef(false);
28
29
  const affixStyle = shallowRef();
29
30
  const placeholderStyle = shallowRef();
@@ -35,6 +36,7 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
35
36
  const contextRef = shallowRef();
36
37
  const timer = shallowRef(null);
37
38
  const targetFunc = computed(() => props.target ?? configContext.value.getTargetContainer ?? getDefaultTarget);
39
+ const resolvedTarget = computed(() => targetFunc.value());
38
40
  const internalOffsetTop = computed(() => {
39
41
  const { offsetTop, offsetBottom } = props;
40
42
  return offsetBottom === void 0 && offsetTop === void 0 ? 0 : offsetTop;
@@ -92,10 +94,18 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
92
94
  });
93
95
  const addListeners = () => {
94
96
  const listenerTarget = targetFunc.value();
97
+ const previousTarget = prevTarget;
98
+ const previousListener = prevListener;
99
+ if (previousListener) {
100
+ TRIGGER_EVENTS.forEach((eventName) => {
101
+ previousTarget?.removeEventListener(eventName, previousListener);
102
+ });
103
+ prevTarget = null;
104
+ prevListener = null;
105
+ }
95
106
  if (!listenerTarget) return;
96
107
  TRIGGER_EVENTS.forEach((eventName) => {
97
- if (prevListener) prevTarget?.removeEventListener(eventName, prevListener);
98
- listenerTarget?.addEventListener(eventName, lazyUpdatePosition);
108
+ listenerTarget.addEventListener(eventName, lazyUpdatePosition);
99
109
  });
100
110
  prevTarget = listenerTarget;
101
111
  prevListener = lazyUpdatePosition;
@@ -123,6 +133,7 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
123
133
  });
124
134
  watch([
125
135
  () => props.target,
136
+ resolvedTarget,
126
137
  affixStyle,
127
138
  lastAffix,
128
139
  () => props.offsetTop,
@@ -136,6 +147,7 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
136
147
  });
137
148
  watch([
138
149
  () => props.target,
150
+ resolvedTarget,
139
151
  () => props.offsetTop,
140
152
  () => props.offsetBottom
141
153
  ], async () => {
@@ -158,7 +170,15 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
158
170
  const _el = unrefElement(el);
159
171
  if (_el) contextRef.value = _el;
160
172
  } });
161
- return createVNode("div", mergeProps(attrs, { "ref": placeholderNodeRef }), [affixStyle.value && createVNode("div", {
173
+ const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
174
+ return createVNode("div", mergeProps(restAttrs, {
175
+ "ref": placeholderNodeRef,
176
+ "class": classNames(className, contextClassName.value),
177
+ "style": {
178
+ ...contextStyle.value,
179
+ ...style
180
+ }
181
+ }), [affixStyle.value && createVNode("div", {
162
182
  "style": placeholderStyle.value,
163
183
  "aria-hidden": "true"
164
184
  }, 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;