antdv-next 1.5.4 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/dist/_util/PurePanel.js +2 -1
  2. package/dist/_util/hooks/useMergeSemantic.js +3 -2
  3. package/dist/_util/statusUtils.d.ts +1 -1
  4. package/dist/_util/styleUtils.d.ts +19 -1
  5. package/dist/_util/styleUtils.js +24 -1
  6. package/dist/_util/vnode/index.js +5 -5
  7. package/dist/_util/warning.d.ts +0 -1
  8. package/dist/affix/index.js +7 -18
  9. package/dist/alert/Alert.js +11 -12
  10. package/dist/anchor/Anchor.d.ts +1 -1
  11. package/dist/anchor/Anchor.js +16 -7
  12. package/dist/anchor/AnchorLink.js +3 -2
  13. package/dist/antd-with-locales.esm.js +17656 -16491
  14. package/dist/antd-with-locales.js +80 -80
  15. package/dist/antd.css +1 -1
  16. package/dist/antd.esm.js +15077 -14114
  17. package/dist/antd.js +81 -81
  18. package/dist/app/App.js +1 -1
  19. package/dist/app/index.js +0 -3
  20. package/dist/auto-complete/index.js +11 -4
  21. package/dist/avatar/Avatar.d.ts +4 -1
  22. package/dist/avatar/Avatar.js +21 -13
  23. package/dist/avatar/AvatarGroup.js +2 -2
  24. package/dist/avatar/index.d.ts +2 -2
  25. package/dist/badge/Ribbon.js +3 -4
  26. package/dist/badge/index.js +11 -9
  27. package/dist/breadcrumb/Breadcrumb.js +6 -3
  28. package/dist/breadcrumb/BreadcrumbItem.js +4 -3
  29. package/dist/breadcrumb/useItemRender.js +5 -8
  30. package/dist/button/Button.js +2 -0
  31. package/dist/card/Card.js +6 -7
  32. package/dist/carousel/index.d.ts +1 -1
  33. package/dist/carousel/index.js +7 -8
  34. package/dist/cascader/Panel.d.ts +1 -0
  35. package/dist/cascader/Panel.js +2 -1
  36. package/dist/cascader/index.d.ts +5 -4
  37. package/dist/cascader/index.js +8 -6
  38. package/dist/checkbox/Checkbox.js +14 -28
  39. package/dist/collapse/Collapse.d.ts +2 -3
  40. package/dist/collapse/Collapse.js +7 -4
  41. package/dist/color-picker/ColorPicker.js +2 -2
  42. package/dist/color-picker/components/ColorClear.d.ts +1 -0
  43. package/dist/color-picker/components/ColorClear.js +14 -4
  44. package/dist/color-picker/components/ColorPresets.js +4 -4
  45. package/dist/color-picker/components/ColorSlider.js +8 -2
  46. package/dist/color-picker/components/ColorTrigger.js +3 -2
  47. package/dist/color-picker/interface.d.ts +0 -2
  48. package/dist/color-picker/style/index.js +5 -6
  49. package/dist/components.d.ts +3 -3
  50. package/dist/config-provider/context.d.ts +2 -5
  51. package/dist/config-provider/index.d.ts +2 -2
  52. package/dist/date-picker/generatePicker/generateRangePicker.d.ts +4 -3
  53. package/dist/date-picker/generatePicker/generateRangePicker.js +3 -1
  54. package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +1 -0
  55. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -1
  56. package/dist/date-picker/generatePicker/index.d.ts +1 -1
  57. package/dist/date-picker/generatePicker/interface.d.ts +0 -2
  58. package/dist/date-picker/generatePicker/useComponents.d.ts +3 -3
  59. package/dist/date-picker/index.d.ts +3 -2
  60. package/dist/date-picker/locale/bn_BD.js +1 -0
  61. package/dist/date-picker/locale/et_EE.js +8 -0
  62. package/dist/date-picker/locale/eu_ES.js +8 -0
  63. package/dist/date-picker/locale/ga_IE.js +1 -0
  64. package/dist/date-picker/locale/is_IS.js +8 -0
  65. package/dist/date-picker/locale/ka_GE.js +1 -0
  66. package/dist/date-picker/locale/kk_KZ.js +1 -0
  67. package/dist/date-picker/locale/km_KH.js +1 -0
  68. package/dist/date-picker/locale/kmr_IQ.js +8 -0
  69. package/dist/date-picker/locale/lv_LV.js +8 -0
  70. package/dist/date-picker/locale/mk_MK.js +8 -0
  71. package/dist/date-picker/locale/ml_IN.js +1 -0
  72. package/dist/date-picker/locale/mn_MN.js +8 -0
  73. package/dist/date-picker/locale/sl_SI.js +8 -0
  74. package/dist/date-picker/locale/ta_IN.js +1 -0
  75. package/dist/date-picker/locale/ur_PK.js +1 -0
  76. package/dist/date-picker/locale/uz_UZ.js +1 -0
  77. package/dist/date-picker/util.d.ts +2 -2
  78. package/dist/descriptions/Row.js +3 -2
  79. package/dist/descriptions/hooks/useItems.d.ts +8 -8
  80. package/dist/descriptions/index.js +6 -3
  81. package/dist/divider/index.d.ts +0 -1
  82. package/dist/drawer/DrawerPanel.js +4 -1
  83. package/dist/drawer/index.d.ts +0 -3
  84. package/dist/drawer/index.js +15 -3
  85. package/dist/dropdown/index.js +0 -3
  86. package/dist/float-button/BackTop.d.ts +4 -2
  87. package/dist/float-button/BackTop.js +12 -4
  88. package/dist/float-button/FloatButton.d.ts +2 -2
  89. package/dist/float-button/FloatButton.js +10 -3
  90. package/dist/float-button/FloatButtonGroup.d.ts +2 -2
  91. package/dist/float-button/FloatButtonGroup.js +10 -3
  92. package/dist/float-button/PurePanel.js +20 -8
  93. package/dist/form/FormItem/index.js +4 -3
  94. package/dist/form/FormItemInput.js +4 -2
  95. package/dist/grid/col.js +1 -1
  96. package/dist/grid/row.js +1 -1
  97. package/dist/image/PreviewGroup.js +7 -5
  98. package/dist/image/hooks/usePreviewConfig.d.ts +9 -9
  99. package/dist/image/hooks/usePreviewConfig.js +1 -1
  100. package/dist/image/index.js +3 -4
  101. package/dist/index.d.ts +3 -3
  102. package/dist/input/Input.d.ts +0 -1
  103. package/dist/input/Input.js +16 -4
  104. package/dist/input/OTP/OTPInput.js +16 -4
  105. package/dist/input/Password.js +12 -3
  106. package/dist/input/Search.js +16 -4
  107. package/dist/input/TextArea.d.ts +0 -1
  108. package/dist/input/TextArea.js +17 -2
  109. package/dist/input/style/index.d.ts +2 -1
  110. package/dist/input/style/index.js +12 -11
  111. package/dist/input/style/variants.js +1 -4
  112. package/dist/input-number/index.d.ts +0 -1
  113. package/dist/input-number/index.js +30 -9
  114. package/dist/input-number/style/index.js +13 -39
  115. package/dist/listy/index.js +13 -8
  116. package/dist/listy/interface.d.ts +2 -2
  117. package/dist/locale/az_AZ.js +4 -0
  118. package/dist/locale/bn_BD.js +4 -0
  119. package/dist/locale/by_BY.js +4 -0
  120. package/dist/locale/eu_ES.js +4 -0
  121. package/dist/locale/ga_IE.js +4 -0
  122. package/dist/locale/hy_AM.js +20 -2
  123. package/dist/locale/is_IS.js +4 -0
  124. package/dist/locale/ka_GE.js +4 -0
  125. package/dist/locale/kk_KZ.js +4 -0
  126. package/dist/locale/km_KH.js +4 -0
  127. package/dist/locale/kmr_IQ.js +4 -0
  128. package/dist/locale/kn_IN.js +4 -0
  129. package/dist/locale/ku_IQ.js +4 -0
  130. package/dist/locale/mk_MK.js +4 -0
  131. package/dist/locale/ml_IN.js +4 -0
  132. package/dist/locale/mn_MN.js +4 -0
  133. package/dist/locale/mr_IN.js +4 -0
  134. package/dist/locale/my_MM.js +4 -0
  135. package/dist/locale/ne_NP.js +4 -0
  136. package/dist/locale/si_LK.js +4 -0
  137. package/dist/locale/sq_AL.js +4 -0
  138. package/dist/locale/ta_IN.js +4 -0
  139. package/dist/locale/tk_TK.js +4 -0
  140. package/dist/locale/ur_PK.js +4 -0
  141. package/dist/locale/uz_UZ.js +4 -0
  142. package/dist/masonry/Masonry.js +9 -1
  143. package/dist/mentions/index.d.ts +1 -1
  144. package/dist/mentions/index.js +7 -3
  145. package/dist/menu/MenuContext.js +4 -1
  146. package/dist/menu/MenuItem.js +2 -2
  147. package/dist/menu/OverrideContext.js +4 -1
  148. package/dist/menu/index.d.ts +2 -2
  149. package/dist/message/PurePanel.js +2 -1
  150. package/dist/message/index.js +14 -9
  151. package/dist/message/interface.d.ts +8 -0
  152. package/dist/message/useMessage.d.ts +1 -1
  153. package/dist/message/useMessage.js +26 -32
  154. package/dist/modal/ConfirmDialog.js +1 -1
  155. package/dist/modal/Modal.js +3 -2
  156. package/dist/modal/PurePanel.js +2 -2
  157. package/dist/modal/interface.d.ts +0 -6
  158. package/dist/modal/shared.js +2 -1
  159. package/dist/notification/PurePanel.d.ts +1 -1
  160. package/dist/notification/PurePanel.js +12 -10
  161. package/dist/notification/index.js +4 -1
  162. package/dist/notification/interface.d.ts +4 -0
  163. package/dist/notification/useNotification.js +19 -21
  164. package/dist/package.js +1 -1
  165. package/dist/pagination/Pagination.js +3 -4
  166. package/dist/popconfirm/index.js +4 -1
  167. package/dist/popover/PurePanel.js +8 -2
  168. package/dist/popover/index.js +4 -1
  169. package/dist/qrcode/QrcodeStatus.js +4 -1
  170. package/dist/qrcode/index.js +2 -1
  171. package/dist/radio/group.js +2 -2
  172. package/dist/radio/radio.js +2 -2
  173. package/dist/rate/index.d.ts +1 -1
  174. package/dist/rate/index.js +1 -5
  175. package/dist/result/index.js +4 -3
  176. package/dist/segmented/index.js +8 -2
  177. package/dist/select/index.d.ts +2 -3
  178. package/dist/select/index.js +2 -2
  179. package/dist/skeleton/Element.js +2 -2
  180. package/dist/slider/SliderTooltip.js +4 -1
  181. package/dist/slider/index.d.ts +1 -0
  182. package/dist/slider/index.js +5 -3
  183. package/dist/space/Compact.d.ts +1 -1
  184. package/dist/spin/index.js +2 -2
  185. package/dist/splitter/Panel.js +12 -3
  186. package/dist/splitter/SplitBar.js +12 -1
  187. package/dist/splitter/Splitter.js +2 -1
  188. package/dist/splitter/hooks/sizeUtil.js +17 -1
  189. package/dist/splitter/interface.d.ts +3 -1
  190. package/dist/splitter/style/index.js +6 -1
  191. package/dist/statistic/Number.js +2 -1
  192. package/dist/statistic/Statistic.js +2 -2
  193. package/dist/steps/index.js +3 -4
  194. package/dist/switch/index.d.ts +0 -2
  195. package/dist/table/Column.d.ts +5 -1
  196. package/dist/table/Column.js +10 -1
  197. package/dist/table/ColumnGroup.js +5 -0
  198. package/dist/table/InternalTable.d.ts +4 -1
  199. package/dist/table/InternalTable.js +28 -18
  200. package/dist/table/Table.js +16 -5
  201. package/dist/table/hooks/useFilter/index.d.ts +3 -1
  202. package/dist/table/hooks/useFilter/index.js +2 -2
  203. package/dist/table/hooks/useSelection.js +7 -3
  204. package/dist/table/interface.d.ts +10 -3
  205. package/dist/table/style/index.js +30 -2
  206. package/dist/table/util.d.ts +1 -1
  207. package/dist/table/utils.js +20 -2
  208. package/dist/tabs/index.d.ts +2 -0
  209. package/dist/tabs/index.js +11 -6
  210. package/dist/tag/CheckableTag.d.ts +0 -3
  211. package/dist/tag/CheckableTagGroup.js +18 -2
  212. package/dist/tag/index.js +2 -1
  213. package/dist/theme/context.d.ts +0 -1
  214. package/dist/theme/util/alias.js +3 -0
  215. package/dist/theme/util/genStyleUtils.d.ts +4 -0
  216. package/dist/time-picker/index.d.ts +8 -3
  217. package/dist/time-picker/index.js +46 -8
  218. package/dist/timeline/TimelineItem.js +4 -1
  219. package/dist/timeline/useItems.js +2 -1
  220. package/dist/tooltip/PurePanel.js +4 -1
  221. package/dist/tooltip/index.d.ts +5 -2
  222. package/dist/tooltip/index.js +4 -1
  223. package/dist/tooltip/style/index.d.ts +0 -1
  224. package/dist/tour/index.js +2 -3
  225. package/dist/tour/interface.d.ts +7 -5
  226. package/dist/tour/panelRender.js +6 -6
  227. package/dist/transfer/ListBody.js +1 -1
  228. package/dist/transfer/Section.js +3 -2
  229. package/dist/transfer/Transfer.js +37 -13
  230. package/dist/transfer/hooks/useSelection.js +1 -1
  231. package/dist/transfer/interface.d.ts +1 -1
  232. package/dist/tree/DirectoryTree.js +2 -1
  233. package/dist/tree/Tree.js +6 -6
  234. package/dist/tree/utils/dictUtil.js +2 -2
  235. package/dist/tree-select/index.d.ts +2 -3
  236. package/dist/tree-select/index.js +16 -8
  237. package/dist/typography/Base/Ellipsis.js +2 -1
  238. package/dist/typography/Base/index.js +6 -3
  239. package/dist/typography/Editable.js +2 -1
  240. package/dist/upload/Dragger.js +2 -4
  241. package/dist/upload/Upload.d.ts +0 -1
  242. package/dist/upload/Upload.js +2 -2
  243. package/dist/upload/UploadList/ListItem.d.ts +1 -0
  244. package/dist/upload/UploadList/ListItem.js +15 -9
  245. package/dist/upload/UploadList/index.js +1 -0
  246. package/dist/upload/interface.d.ts +6 -7
  247. package/dist/version/token.json +1 -1
  248. package/package.json +26 -26
  249. package/web-tags.json +1383 -1377
  250. package/web-types.json +4046 -4165
@@ -5,7 +5,7 @@ import PurePanel from "./PurePanel.js";
5
5
  import PureList from "./PureList.js";
6
6
  import { wrapPromiseFn } from "./util.js";
7
7
  import useMessage, { useInternalMessage } from "./useMessage.js";
8
- import { createVNode, defineComponent, getCurrentInstance, isVNode, onMounted, render, shallowRef, watch } from "vue";
8
+ import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, onMounted, render, shallowRef, watch } from "vue";
9
9
  //#region src/message/index.tsx
10
10
  function _isSlot(s) {
11
11
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
@@ -15,7 +15,7 @@ let taskQueue = [];
15
15
  let defaultGlobalConfig = {};
16
16
  let act = (callback) => callback();
17
17
  function getGlobalContext() {
18
- const { getContainer, duration, rtl, maxCount, top, pauseOnHover } = defaultGlobalConfig;
18
+ const { getContainer, duration, rtl, maxCount, top, pauseOnHover, stack, classes, styles } = defaultGlobalConfig;
19
19
  const mergedContainer = getContainer?.() || document.body;
20
20
  let appContext = defaultGlobalConfig.appContext;
21
21
  const instance = getCurrentInstance();
@@ -28,19 +28,21 @@ function getGlobalContext() {
28
28
  maxCount,
29
29
  top,
30
30
  pauseOnHover,
31
+ stack,
32
+ classes,
33
+ styles,
31
34
  appContext
32
35
  };
33
36
  }
34
37
  const GlobalHolder = /* @__PURE__ */ defineComponent((props, { expose }) => {
35
- const { messageConfig, sync } = props;
38
+ const { sync } = props;
36
39
  const { getPrefixCls } = useBaseConfig();
37
- const prefixCls = defaultGlobalConfig.prefixCls || getPrefixCls("message");
38
40
  const appConfig = useAppConfig();
39
- const [api, holder] = useInternalMessage({
40
- ...messageConfig,
41
- prefixCls,
41
+ const [api, holder] = useInternalMessage(computed(() => ({
42
+ ...props.messageConfig,
43
+ prefixCls: defaultGlobalConfig.prefixCls || getPrefixCls("message"),
42
44
  ...appConfig.message || {}
43
- });
45
+ })));
44
46
  onMounted(() => {
45
47
  sync?.();
46
48
  });
@@ -60,7 +62,10 @@ const GlobalHolder = /* @__PURE__ */ defineComponent((props, { expose }) => {
60
62
  return holder;
61
63
  };
62
64
  }, { props: {
63
- messageConfig: { required: true },
65
+ messageConfig: {
66
+ type: Object,
67
+ required: true
68
+ },
64
69
  sync: {
65
70
  type: Function,
66
71
  required: true
@@ -32,6 +32,14 @@ interface ConfigOptions {
32
32
  transitionName?: string;
33
33
  maxCount?: number;
34
34
  rtl?: boolean;
35
+ /**
36
+ * @descCN 堆叠模式,超过阈值时会将所有消息收起
37
+ * @descEN Stack mode. Messages are collapsed when the threshold is exceeded.
38
+ * @since 1.5.5
39
+ */
40
+ stack?: boolean | {
41
+ threshold?: number;
42
+ };
35
43
  /**
36
44
  * @descCN 悬停时是否暂停计时器
37
45
  * @descEN keep the timer running or not on hover
@@ -5,6 +5,6 @@ type HolderProps = ConfigOptions & {
5
5
  onAllRemoved?: VoidFunction;
6
6
  };
7
7
  declare function useInternalMessage(messageConfig?: MaybeRef<HolderProps>): readonly [MessageInstance, () => import("vue/jsx-runtime").JSX.Element];
8
- declare function useMessage(messageConfig?: ConfigOptions): readonly [MessageInstance, () => import("vue/jsx-runtime").JSX.Element];
8
+ declare function useMessage(messageConfig?: MaybeRef<ConfigOptions>): readonly [MessageInstance, () => import("vue/jsx-runtime").JSX.Element];
9
9
  //#endregion
10
10
  export { useMessage as default, useInternalMessage };
@@ -1,6 +1,6 @@
1
1
  import { devUseWarning } from "../_util/warning.js";
2
2
  import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
3
- import { mergeClassNames, mergeStyles, resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { toPropsRefs } from "../_util/tools.js";
5
5
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
6
6
  import style_default from "./style/index.js";
@@ -16,6 +16,7 @@ function _isSlot(s) {
16
16
  }
17
17
  const DEFAULT_OFFSET = 8;
18
18
  const DEFAULT_DURATION = 3;
19
+ const DEFAULT_STACK_CONFIG = false;
19
20
  const Wrapper = /* @__PURE__ */ defineComponent((props, { slots }) => {
20
21
  const prefixCls = computed(() => props.prefixCls);
21
22
  const rootCls = useCSSVarCls(prefixCls);
@@ -46,10 +47,14 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
46
47
  });
47
48
  const mergedDuration = computed(() => props.duration ?? DEFAULT_DURATION);
48
49
  const mergedPauseOnHover = computed(() => props.pauseOnHover === void 0 ? true : props.pauseOnHover);
50
+ const mergedStack = computed(() => props.stack ?? DEFAULT_STACK_CONFIG);
49
51
  const getStyle = () => getPlacementOffsetStyle(mergedTop.value);
50
52
  const getClassName = () => clsx({ [`${prefixCls.value}-rtl`]: props.rtl ?? direction.value === "rtl" });
51
53
  const getNotificationMotion = () => getMotion(prefixCls.value, props.transitionName);
52
- const [api, holder] = useNotification({
54
+ const mergedProps = computed(() => props);
55
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
56
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClasses, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
57
+ const [api, holder] = useNotification(computed(() => ({
53
58
  prefixCls: prefixCls.value,
54
59
  style: getStyle,
55
60
  className: getClassName,
@@ -60,20 +65,15 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
60
65
  maxCount: props.maxCount,
61
66
  onAllRemoved: props.onAllRemoved,
62
67
  renderNotifications,
63
- pauseOnHover: mergedPauseOnHover.value
64
- });
65
- const mergedProps = computed(() => props);
66
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
67
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClasses, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
68
+ pauseOnHover: mergedPauseOnHover.value,
69
+ stack: mergedStack.value,
70
+ classNames: mergedClassNames.value,
71
+ styles: mergedStyles.value
72
+ })));
68
73
  expose({
69
74
  ...api,
70
75
  prefixCls,
71
- contextClassName,
72
- contextStyle,
73
- contextClasses,
74
- contextStyles,
75
- classNames: mergedClassNames,
76
- styles: mergedStyles
76
+ contextClassName
77
77
  });
78
78
  return () => holder?.();
79
79
  }, {
@@ -107,6 +107,11 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
107
107
  required: false,
108
108
  default: void 0
109
109
  },
110
+ stack: {
111
+ type: [Boolean, Object],
112
+ required: false,
113
+ default: void 0
114
+ },
110
115
  pauseOnHover: {
111
116
  type: Boolean,
112
117
  required: false,
@@ -144,7 +149,7 @@ function useInternalMessage(messageConfig) {
144
149
  fakeResult.then = () => {};
145
150
  return fakeResult;
146
151
  }
147
- const { open: originOpen, prefixCls, contextClassName, contextClasses, contextStyles, classNames: originClassNames, styles: originStyles } = holderRef.value;
152
+ const { open: originOpen, prefixCls, contextClassName } = holderRef.value;
148
153
  const noticePrefixCls = `${prefixCls}-notice`;
149
154
  const { content, icon, type, key, class: className, style, onClose, classes: configClassNames = {}, styles = {}, ...restConfig } = config;
150
155
  let mergedKey = key;
@@ -153,15 +158,11 @@ function useInternalMessage(messageConfig) {
153
158
  mergedKey = `antd-message-${keyIndex}`;
154
159
  }
155
160
  const contextConfig = {
156
- ...messageConfig,
161
+ ...unref(messageConfig),
157
162
  ...config
158
163
  };
159
- const resolvedContextClassNames = resolveStyleOrClass(contextClasses, { props: contextConfig });
160
164
  const semanticClassNames = resolveStyleOrClass(configClassNames, { props: contextConfig });
161
- const resolvedContextStyles = resolveStyleOrClass(contextStyles, { props: contextConfig });
162
165
  const semanticStyles = resolveStyleOrClass(styles, { props: contextConfig });
163
- const mergedClassNames = mergeClassNames(void 0, resolvedContextClassNames, semanticClassNames, originClassNames);
164
- const mergedStyles = mergeStyles(resolvedContextStyles, semanticStyles, originStyles);
165
166
  const iconNode = resolveMessageIcon(prefixCls, icon, type);
166
167
  const typeIconCls = type ? `${noticePrefixCls}-icon-${type}` : void 0;
167
168
  return wrapPromiseFn((resolve) => {
@@ -172,20 +173,13 @@ function useInternalMessage(messageConfig) {
172
173
  icon: iconNode,
173
174
  title: content,
174
175
  classNames: {
175
- wrapper: clsx(type && `${prefixCls}-${type}`, mergedClassNames.wrapper),
176
- icon: clsx(typeIconCls, mergedClassNames.icon),
177
- title: mergedClassNames.title
178
- },
179
- styles: {
180
- wrapper: mergedStyles.wrapper,
181
- icon: mergedStyles.icon,
182
- title: mergedStyles.title
183
- },
184
- class: clsx({ [`${noticePrefixCls}-${type}`]: !!type }, className, contextClassName, mergedClassNames.root),
185
- style: {
186
- ...mergedStyles.root,
187
- ...style
176
+ ...semanticClassNames,
177
+ wrapper: clsx(type && `${prefixCls}-${type}`, semanticClassNames?.wrapper),
178
+ icon: clsx(typeIconCls, semanticClassNames?.icon)
188
179
  },
180
+ styles: semanticStyles,
181
+ class: clsx({ [`${noticePrefixCls}-${type}`]: !!type }, className, contextClassName),
182
+ style,
189
183
  onClose: () => {
190
184
  onClose?.();
191
185
  resolve();
@@ -22,7 +22,7 @@ const CONFIRM_OMIT_SEMANTIC_NAMES = ["body"];
22
22
  const ConfirmContent = /* @__PURE__ */ defineComponent((props) => {
23
23
  if (isDev) {
24
24
  const { icon } = props;
25
- devUseWarning("Modal")(!(typeof icon === "string" && icon?.length > 2), "breaking", `\`icon\` is using VueNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`);
25
+ devUseWarning("Modal")(!(typeof icon === "string" && icon?.length > 2), "breaking", `\`icon\` is using VueNode instead of string naming. Please check \`${icon}\` at https://ant.design/components/icon`);
26
26
  }
27
27
  const mergedType = computed(() => {
28
28
  const { type } = props;
@@ -2,6 +2,7 @@ import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { ContextIsolator } from "../_util/ContextIsolator.js";
4
4
  import { useMergedMask } from "../_util/hooks/useMergedMask.js";
5
+ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
5
6
  import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
6
7
  import { ZIndexProvider } from "../_util/zindexContext.js";
7
8
  import { useZIndex } from "../_util/hooks/useZIndex.js";
@@ -231,9 +232,9 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
231
232
  "scrollLock": props.scrollLock,
232
233
  "className": mergedClassName,
233
234
  "style": {
234
- ...contextStyle.value,
235
+ ...normalizeStyle$1(contextStyle.value) || {},
235
236
  ...responsiveWidthVars.value,
236
- ...attrStyle
237
+ ...normalizeStyle$1(attrStyle) || {}
237
238
  },
238
239
  "classNames": {
239
240
  ...dialogClassNames,
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { getSlotPropsFnRun } from "../_util/tools.js";
4
4
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
5
5
  import { Footer, renderCloseIcon } from "./shared.js";
@@ -20,7 +20,7 @@ var PurePanel_default = withPureRenderTheme(/* @__PURE__ */ defineComponent((pro
20
20
  const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
21
21
  const confirmPrefixCls = computed(() => `${prefixCls.value}-confirm`);
22
22
  return () => {
23
- const { className: attrClassName, restAttrs, style: attrStyle } = getAttrStyleAndClass$1(attrs);
23
+ const { className: attrClassName, restAttrs, style: attrStyle } = getAttrStyleAndClass(attrs);
24
24
  const { type, closable, closeIcon } = props;
25
25
  const footer = getSlotPropsFnRun(slots, props, "footer", false);
26
26
  const title = getSlotPropsFnRun(slots, props, "title", false);
@@ -84,9 +84,6 @@ interface ModalProps extends ModalCommonProps {
84
84
  cancelButtonProps?: ButtonProps;
85
85
  /** @deprecated Please use `destroyOnHidden` instead */
86
86
  destroyOnClose?: boolean;
87
- /**
88
- * @since 5.25.0
89
- */
90
87
  destroyOnHidden?: boolean;
91
88
  wrapClassName?: string;
92
89
  maskTransitionName?: string;
@@ -114,9 +111,6 @@ interface ModalProps extends ModalCommonProps {
114
111
  modalRender?: (node: any) => any;
115
112
  focusTriggerAfterClose?: boolean;
116
113
  mousePosition?: MousePosition;
117
- /**
118
- * @since 5.18.0
119
- */
120
114
  loading?: boolean;
121
115
  focusable?: FocusableConfig;
122
116
  }
@@ -1,5 +1,6 @@
1
1
  import { getSlotPropsFnRun } from "../_util/tools.js";
2
2
  import { DisabledContextProvider } from "../config-provider/DisabledContext.js";
3
+ import { isRenderable } from "../_util/is.js";
3
4
  import useLocale from "../locale/useLocale.js";
4
5
  import { useModalProvider } from "./context.js";
5
6
  import { getConfirmLocale } from "./locale.js";
@@ -13,7 +14,7 @@ function _isSlot(s) {
13
14
  }
14
15
  function renderCloseIcon(prefixCls, closeIcon) {
15
16
  closeIcon = getSlotPropsFnRun({}, { closeIcon }, "closeIcon");
16
- return createVNode("span", { "class": `${prefixCls}-close-x` }, [closeIcon || createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null)]);
17
+ return createVNode("span", { "class": `${prefixCls}-close-x` }, [isRenderable(closeIcon) ? closeIcon : createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null)]);
17
18
  }
18
19
  const Footer = /* @__PURE__ */ defineComponent((props) => {
19
20
  const [locale] = useLocale("Modal", getConfirmLocale());
@@ -19,7 +19,7 @@ interface PureContentProps {
19
19
  }
20
20
  declare const TypeIcon: Record<IconType, any>;
21
21
  declare function resolveIconNode(icon: VueNode | undefined, type: IconType | undefined): VueNode;
22
- declare function getIconWrapperClassName(prefixCls: string, type: IconType | undefined): string;
22
+ declare function getIconWrapperClassName(prefixCls: string, type: IconType | undefined, icon?: VueNode): string;
23
23
  declare const PureContent: import("vue").DefineSetupFnComponent<PureContentProps, {}, {}, PureContentProps & {}, import("vue").PublicProps>;
24
24
  interface PurePanelProps extends Omit<PureContentProps, 'prefixCls' | 'children' | 'classes' | 'styles'> {
25
25
  content?: VueNode;
@@ -1,9 +1,10 @@
1
1
  import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
2
+ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
2
3
  import { pureAttrs, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
4
  import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
4
5
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
6
+ import { isRenderable } from "../_util/is.js";
5
7
  import style_default, { PurePanelStyle } from "./style/index.js";
6
- import isNonNullable from "../_util/isNonNullable.js";
7
8
  import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
8
9
  import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
9
10
  import { clsx } from "@v-c/util";
@@ -13,7 +14,7 @@ import { Notification } from "@v-c/notification";
13
14
  //#region src/notification/PurePanel.tsx
14
15
  function getCloseIcon(prefixCls, closeIcon) {
15
16
  if (closeIcon === null || closeIcon === false) return null;
16
- return closeIcon || createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null);
17
+ return isRenderable(closeIcon) ? closeIcon : createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null);
17
18
  }
18
19
  const TypeIcon = {
19
20
  success: CheckCircleFilled,
@@ -23,18 +24,18 @@ const TypeIcon = {
23
24
  };
24
25
  const typeToIcon = TypeIcon;
25
26
  function resolveIconNode(icon, type) {
26
- if (icon) return icon;
27
+ if (isRenderable(icon)) return icon;
27
28
  if (type && typeToIcon[type]) return createVNode(typeToIcon[type]);
28
29
  return null;
29
30
  }
30
- function getIconWrapperClassName(prefixCls, type) {
31
- return type ? `${prefixCls}-icon-${type}` : "";
31
+ function getIconWrapperClassName(prefixCls, type, icon) {
32
+ return !isRenderable(icon) && type ? `${prefixCls}-icon-${type}` : "";
32
33
  }
33
34
  const PureContent = /* @__PURE__ */ defineComponent((props) => {
34
35
  return () => {
35
36
  const { prefixCls, icon, type, title, description, actions, role = "alert", styles, classes: pureContentCls } = props;
36
37
  let iconNode;
37
- if (icon) iconNode = createVNode("span", {
38
+ if (isRenderable(icon)) iconNode = createVNode("span", {
38
39
  "class": clsx(`${prefixCls}-icon`, pureContentCls.icon),
39
40
  "style": styles.icon
40
41
  }, [icon]);
@@ -43,7 +44,7 @@ const PureContent = /* @__PURE__ */ defineComponent((props) => {
43
44
  style: styles.icon
44
45
  });
45
46
  else iconNode = null;
46
- const hasTitle = isNonNullable(title) && title !== false && title !== "";
47
+ const hasTitle = isRenderable(title);
47
48
  return createVNode("div", {
48
49
  "class": clsx({ [`${prefixCls}-with-icon`]: iconNode }),
49
50
  "role": role
@@ -192,14 +193,15 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
192
193
  const slotIcon = getSlotPropsFnRun(slots, props, "icon");
193
194
  const mergedNcs = mergedClassNames.value;
194
195
  const mergedNss = mergedStyles.value;
195
- const iconNode = resolveIconNode(slotIcon ?? props.icon, props.type);
196
- const iconWrapperClass = clsx(getIconWrapperClassName(noticePrefixCls, props.type), mergedNcs?.icon);
196
+ const mergedIcon = slotIcon ?? props.icon;
197
+ const iconNode = resolveIconNode(mergedIcon, props.type);
198
+ const iconWrapperClass = clsx(getIconWrapperClassName(noticePrefixCls, props.type, mergedIcon), mergedNcs?.icon);
197
199
  return createVNode("div", {
198
200
  "class": clsx(`${noticePrefixCls}-pure-panel`, hashId.value, notificationClassName, cssVarCls.value, rootCls.value, mergedClassNames.value?.root),
199
201
  "style": mergedStyles.value.root
200
202
  }, [createVNode(PurePanelStyle, { "prefixCls": prefixCls.value }, null), createVNode(Notification, mergeProps({ "style": {
201
203
  ...contextStyle.value,
202
- ...style
204
+ ...normalizeStyle$1(style) || {}
203
205
  } }, pureAttrs(attrs), restProps, {
204
206
  "prefixCls": prefixCls.value,
205
207
  "duration": null,
@@ -60,7 +60,10 @@ const GlobalHolder = /* @__PURE__ */ defineComponent((props, { expose }) => {
60
60
  return holder;
61
61
  };
62
62
  }, { props: {
63
- notificationConfig: { required: true },
63
+ notificationConfig: {
64
+ type: Object,
65
+ required: true
66
+ },
64
67
  sync: {
65
68
  type: Function,
66
69
  required: true
@@ -13,6 +13,8 @@ type NotificationPlacement = (typeof NotificationPlacements)[number];
13
13
  type IconType = 'success' | 'info' | 'error' | 'warning';
14
14
  type NotificationSemanticName = keyof NotificationSemanticClassNames & keyof NotificationSemanticStyles;
15
15
  interface NotificationSemanticClassNames {
16
+ list?: string;
17
+ listContent?: string;
16
18
  root?: string;
17
19
  title?: string;
18
20
  description?: string;
@@ -20,6 +22,8 @@ interface NotificationSemanticClassNames {
20
22
  icon?: string;
21
23
  }
22
24
  interface NotificationSemanticStyles {
25
+ list?: CSSProperties;
26
+ listContent?: CSSProperties;
23
27
  root?: CSSProperties;
24
28
  title?: CSSProperties;
25
29
  description?: CSSProperties;
@@ -1,7 +1,7 @@
1
1
  import { devUseWarning } from "../_util/warning.js";
2
2
  import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import useToken from "../theme/useToken.js";
4
- import { mergeClassNames, mergeStyles, resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
+ import { resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
5
5
  import { toPropsRefs } from "../_util/tools.js";
6
6
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
7
7
  import { isRenderable } from "../_util/is.js";
@@ -56,6 +56,9 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
56
56
  };
57
57
  const getClassName = () => clsx({ [`${prefixCls.value}-rtl`]: props.rtl ?? direction.value === "rtl" });
58
58
  const getNotificationMotion = () => getMotion(prefixCls.value);
59
+ const mergedProps = computed(() => props);
60
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
61
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
59
62
  const [api, holder] = useNotification$1(computed(() => ({
60
63
  prefixCls: prefixCls.value,
61
64
  style: getStyle,
@@ -73,17 +76,14 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
73
76
  threshold: typeof props.stack === "object" ? props.stack.threshold : void 0,
74
77
  offset: 8,
75
78
  gap: token.value?.margin
76
- }
79
+ },
80
+ classNames: mergedClassNames.value,
81
+ styles: mergedStyles.value
77
82
  })));
78
- const mergedProps = computed(() => props);
79
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
80
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
81
83
  expose({
82
84
  ...api,
83
85
  prefixCls,
84
86
  notification,
85
- classNames: mergedClassNames,
86
- styles: mergedStyles,
87
87
  closeLabel: computed(() => contextLocale.value?.close ?? localeValues.global?.close ?? "Close")
88
88
  });
89
89
  return () => {
@@ -175,10 +175,10 @@ function useInternalNotification(notificationConfig) {
175
175
  const wrapAPIFn = () => {
176
176
  const open = (config) => {
177
177
  if (!holderRef.value) {
178
- warning(false, "usage", "You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");
178
+ warning(false, "usage", "You are calling notice in render which will not take effect. Please trigger in effect instead.");
179
179
  return;
180
180
  }
181
- const { open: originOpen, prefixCls, notification, classNames: originClassNames, styles: originStyles, closeLabel } = holderRef.value;
181
+ const { open: originOpen, prefixCls, notification, closeLabel } = holderRef.value;
182
182
  const contextClassName = notification?.class || {};
183
183
  const noticePrefixCls = `${prefixCls}-notice`;
184
184
  const { title, description, icon, type, actions, class: className, style, role = "alert", closeIcon, closable, classes: configClassNames = {}, styles = {}, ...restConfig } = config;
@@ -200,10 +200,8 @@ function useInternalNotification(notificationConfig) {
200
200
  } : false;
201
201
  const semanticClassNames = resolveStyleOrClass(configClassNames, { props: config });
202
202
  const semanticStyles = resolveStyleOrClass(styles, { props: config });
203
- const mergedClassNames = mergeClassNames(void 0, originClassNames, semanticClassNames);
204
- const mergedStyles = mergeStyles(originStyles, semanticStyles);
205
203
  const iconNode = resolveIconNode(icon, type);
206
- const iconWrapperClass = clsx(getIconWrapperClassName(noticePrefixCls, type), mergedClassNames.icon);
204
+ const iconWrapperClass = clsx(getIconWrapperClassName(noticePrefixCls, type, icon), semanticClassNames?.icon);
207
205
  return originOpen({
208
206
  placement: unref(notificationConfig)?.placement ?? DEFAULT_PLACEMENT,
209
207
  ...restConfig,
@@ -214,19 +212,19 @@ function useInternalNotification(notificationConfig) {
214
212
  role,
215
213
  classNames: {
216
214
  icon: iconWrapperClass,
217
- title: mergedClassNames.title,
218
- description: mergedClassNames.description,
219
- actions: mergedClassNames.actions
215
+ title: semanticClassNames?.title,
216
+ description: semanticClassNames?.description,
217
+ actions: semanticClassNames?.actions
220
218
  },
221
219
  styles: {
222
- icon: mergedStyles.icon,
223
- title: mergedStyles.title,
224
- description: mergedStyles.description,
225
- actions: mergedStyles.actions
220
+ icon: semanticStyles?.icon,
221
+ title: semanticStyles?.title,
222
+ description: semanticStyles?.description,
223
+ actions: semanticStyles?.actions
226
224
  },
227
- class: clsx({ [`${noticePrefixCls}-${type}`]: type }, { [`${noticePrefixCls}-with-icon`]: !!iconNode }, className, contextClassName, mergedClassNames.root),
225
+ class: clsx({ [`${noticePrefixCls}-${type}`]: type }, { [`${noticePrefixCls}-with-icon`]: !!iconNode }, className, contextClassName, semanticClassNames?.root),
228
226
  style: {
229
- ...mergedStyles.root,
227
+ ...semanticStyles?.root,
230
228
  ...style
231
229
  },
232
230
  closable: mergedClosable
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.5.4";
2
+ var version = "1.5.6";
3
3
  //#endregion
4
4
  export { version };
@@ -2,8 +2,8 @@ import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { useSize } from "../config-provider/hooks/useSize.js";
4
4
  import useToken from "../theme/useToken.js";
5
- import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
6
- import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
+ import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
6
+ import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
7
7
  import useLocale from "../locale/useLocale.js";
8
8
  import useVariant from "../form/hooks/useVariant.js";
9
9
  import Select from "../select/index.js";
@@ -13,7 +13,6 @@ import bordered_default from "./style/bordered.js";
13
13
  import resolveShowSizeChanger from "./useShowSizeChanger.js";
14
14
  import { Fragment, computed, createVNode, defineComponent, h, mergeProps } from "vue";
15
15
  import { clsx } from "@v-c/util";
16
- import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
17
16
  import { DoubleLeftOutlined, DoubleRightOutlined, EllipsisOutlined, LeftOutlined, RightOutlined } from "@antdv-next/icons";
18
17
  import { omit } from "es-toolkit";
19
18
  import VcPagination from "@v-c/pagination";
@@ -32,7 +31,7 @@ const omitKeys = [
32
31
  ];
33
32
  const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
34
33
  const { getPrefixCls, prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, showSizeChanger: contextShowSizeChangerConfig } = useComponentBaseConfig("pagination", props, ["showSizeChanger"]);
35
- const { size, responsive, classes, styles, showSizeChanger } = toPropsRefs$1(props, "size", "responsive", "classes", "styles", "showSizeChanger");
34
+ const { size, responsive, classes, styles, showSizeChanger } = toPropsRefs(props, "size", "responsive", "classes", "styles", "showSizeChanger");
36
35
  const [hashId, cssVarCls] = style_default(prefixCls, prefixCls);
37
36
  const [, token] = useToken();
38
37
  const mergedSize = useSize(size);
@@ -312,7 +312,10 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
312
312
  type: Function,
313
313
  required: false
314
314
  },
315
- motion: { required: false },
315
+ motion: {
316
+ type: Object,
317
+ required: false
318
+ },
316
319
  rootClass: {
317
320
  type: String,
318
321
  required: false
@@ -220,7 +220,10 @@ const RawPurePanel = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
220
220
  type: Function,
221
221
  required: false
222
222
  },
223
- motion: { required: false },
223
+ motion: {
224
+ type: Object,
225
+ required: false
226
+ },
224
227
  rootClass: {
225
228
  type: String,
226
229
  required: false
@@ -373,7 +376,10 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
373
376
  type: Function,
374
377
  required: false
375
378
  },
376
- motion: { required: false },
379
+ motion: {
380
+ type: Object,
381
+ required: false
382
+ },
377
383
  rootClass: {
378
384
  type: String,
379
385
  required: false
@@ -226,7 +226,10 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
226
226
  type: Function,
227
227
  required: false
228
228
  },
229
- motion: { required: false },
229
+ motion: {
230
+ type: Object,
231
+ required: false
232
+ },
230
233
  rootClass: {
231
234
  type: String,
232
235
  required: false
@@ -42,7 +42,10 @@ const QRcodeStatus = /* @__PURE__ */ defineComponent((props) => {
42
42
  type: Function,
43
43
  required: false
44
44
  },
45
- status: { required: true }
45
+ status: {
46
+ type: String,
47
+ required: true
48
+ }
46
49
  } });
47
50
  //#endregion
48
51
  export { QRcodeStatus as default };
@@ -1,6 +1,7 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import useToken from "../theme/useToken.js";
4
+ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
4
5
  import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
5
6
  import { toPropsRefs } from "../_util/tools.js";
6
7
  import useLocale from "../locale/useLocale.js";
@@ -74,7 +75,7 @@ const QRCode = /* @__PURE__ */ defineComponent((props, { emit, attrs, slots, exp
74
75
  const rootStyle = {
75
76
  backgroundColor: bgColor,
76
77
  ...mergedStyles.value?.root,
77
- ...style,
78
+ ...normalizeStyle$1(style) || {},
78
79
  width: _width,
79
80
  height: _height
80
81
  };
@@ -1,7 +1,7 @@
1
1
  import { useOrientation } from "../_util/hooks/useOrientation.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import { useSize } from "../config-provider/hooks/useSize.js";
4
- import { getAttrStyleAndClass as getAttrStyleAndClass$1 } from "../_util/hooks/useMergeSemantic.js";
4
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
5
5
  import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
6
6
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
7
7
  import { checkRenderNode } from "../_util/vueNode.js";
@@ -54,7 +54,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
54
54
  return () => {
55
55
  const { buttonStyle, block, rootClass, id, options, disabled } = props;
56
56
  const children = checkRenderNode(filterEmpty(slots?.default?.() ?? []));
57
- const { className, restAttrs, style } = getAttrStyleAndClass$1(attrs);
57
+ const { className, restAttrs, style } = getAttrStyleAndClass(attrs);
58
58
  const classString = clsx(groupPrefixCls.value, `${groupPrefixCls.value}-${buttonStyle}`, {
59
59
  [`${groupPrefixCls.value}-large`]: mergedSize.value === "large",
60
60
  [`${groupPrefixCls.value}-small`]: mergedSize.value === "small",