antdv-next 1.7.0 → 1.8.0

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 (280) hide show
  1. package/dist/_util/hooks/useMergeSemantic.js +2 -2
  2. package/dist/_util/statusUtils.d.ts +1 -1
  3. package/dist/_util/vueNode.d.ts +11 -1
  4. package/dist/_util/vueNode.js +17 -1
  5. package/dist/affix/index.js +12 -9
  6. package/dist/alert/Alert.js +10 -5
  7. package/dist/anchor/Anchor.js +11 -6
  8. package/dist/anchor/style/index.js +2 -3
  9. package/dist/antd-with-locales.esm.js +16938 -18716
  10. package/dist/antd-with-locales.js +79 -86
  11. package/dist/antd.css +1 -1
  12. package/dist/antd.esm.js +15197 -17143
  13. package/dist/antd.js +80 -87
  14. package/dist/auto-complete/index.d.ts +2 -0
  15. package/dist/auto-complete/index.js +28 -23
  16. package/dist/avatar/Avatar.js +1 -1
  17. package/dist/avatar/AvatarContext.d.ts +2 -2
  18. package/dist/avatar/AvatarGroup.js +3 -5
  19. package/dist/badge/style/ribbon.d.ts +1 -0
  20. package/dist/border-beam/style/index.d.ts +1 -0
  21. package/dist/breadcrumb/index.d.ts +8 -1
  22. package/dist/button/Button.js +31 -18
  23. package/dist/button/style/index.d.ts +1 -0
  24. package/dist/calendar/Header.js +4 -4
  25. package/dist/calendar/generateCalendar.d.ts +10 -10
  26. package/dist/calendar/index.d.ts +1 -1
  27. package/dist/card/Card.js +1 -1
  28. package/dist/card/index.d.ts +8 -1
  29. package/dist/card/style/index.js +3 -7
  30. package/dist/carousel/index.js +3 -3
  31. package/dist/cascader/hooks/useIcons.js +3 -2
  32. package/dist/cascader/index.d.ts +9 -1
  33. package/dist/cascader/index.js +42 -34
  34. package/dist/cascader/style/panel.d.ts +1 -0
  35. package/dist/checkbox/Checkbox.js +5 -2
  36. package/dist/checkbox/Group.js +6 -6
  37. package/dist/collapse/Collapse.js +2 -2
  38. package/dist/color-picker/ColorPicker.js +15 -2
  39. package/dist/color-picker/components/ColorSlider.js +2 -2
  40. package/dist/color-picker/interface.d.ts +3 -0
  41. package/dist/color-picker/style/input.js +6 -11
  42. package/dist/components.d.ts +24 -24
  43. package/dist/components.js +1 -2
  44. package/dist/config-provider/context.d.ts +16 -11
  45. package/dist/config-provider/define.d.ts +2 -1
  46. package/dist/config-provider/index.js +9 -0
  47. package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -0
  48. package/dist/date-picker/generatePicker/generateRangePicker.js +23 -15
  49. package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -0
  50. package/dist/date-picker/generatePicker/generateSinglePicker.js +18 -14
  51. package/dist/date-picker/generatePicker/interface.d.ts +17 -5
  52. package/dist/date-picker/generatePicker/useComponents.d.ts +1 -14
  53. package/dist/date-picker/generatePicker/useSuffix.d.ts +12 -0
  54. package/dist/date-picker/generatePicker/useSuffix.js +11 -0
  55. package/dist/date-picker/style/index.d.ts +1 -0
  56. package/dist/date-picker/util.d.ts +1 -1
  57. package/dist/date-picker/util.js +4 -3
  58. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  59. package/dist/descriptions/index.js +2 -2
  60. package/dist/divider/index.js +14 -4
  61. package/dist/drawer/index.js +2 -2
  62. package/dist/dropdown/dropdown.js +6 -6
  63. package/dist/dropdown/style/index.js +0 -6
  64. package/dist/empty/index.js +2 -1
  65. package/dist/empty/style/index.d.ts +1 -0
  66. package/dist/flex/index.js +2 -2
  67. package/dist/float-button/BackTop.js +2 -1
  68. package/dist/float-button/FloatButton.js +2 -2
  69. package/dist/float-button/FloatButtonGroup.js +2 -2
  70. package/dist/float-button/PurePanel.js +5 -5
  71. package/dist/form/Form.js +47 -16
  72. package/dist/form/FormItem/ItemHolder.d.ts +3 -18
  73. package/dist/form/FormItem/StatusProvider.js +2 -1
  74. package/dist/form/FormItem/index.d.ts +1 -0
  75. package/dist/form/FormItem/index.js +22 -9
  76. package/dist/form/FormItemInput.js +3 -4
  77. package/dist/form/FormItemLabel.js +8 -4
  78. package/dist/form/context.d.ts +3 -3
  79. package/dist/form/hooks/useVariant.d.ts +14 -4
  80. package/dist/form/hooks/useVariant.js +24 -13
  81. package/dist/form/interface.d.ts +4 -1
  82. package/dist/form/style/index.js +1 -1
  83. package/dist/grid/hooks/useBreakpoint.js +12 -6
  84. package/dist/image/PreviewGroup.d.ts +9 -2
  85. package/dist/image/PreviewGroup.js +2 -2
  86. package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
  87. package/dist/image/index.d.ts +3 -3
  88. package/dist/image/index.js +3 -3
  89. package/dist/index.d.ts +26 -24
  90. package/dist/index.js +1 -2
  91. package/dist/input/Input.js +4 -4
  92. package/dist/input/OTP/OTPInput.js +31 -30
  93. package/dist/input/OTP/index.js +10 -2
  94. package/dist/input/Password.js +7 -3
  95. package/dist/input/Search.js +5 -5
  96. package/dist/input/TextArea.js +4 -4
  97. package/dist/input/style/index.js +2 -15
  98. package/dist/input/style/otp.d.ts +1 -0
  99. package/dist/input/style/search.d.ts +1 -0
  100. package/dist/input/style/textarea.d.ts +1 -0
  101. package/dist/input-number/index.js +3 -3
  102. package/dist/input-number/style/index.d.ts +1 -0
  103. package/dist/layout/Sider.js +2 -2
  104. package/dist/layout/style/sider.d.ts +1 -0
  105. package/dist/listy/interface.d.ts +23 -4
  106. package/dist/listy/style/index.js +1 -0
  107. package/dist/locale/ar_EG.js +3 -1
  108. package/dist/locale/az_AZ.js +3 -1
  109. package/dist/locale/bg_BG.js +3 -1
  110. package/dist/locale/bn_BD.js +3 -1
  111. package/dist/locale/by_BY.js +3 -1
  112. package/dist/locale/ca_ES.js +3 -1
  113. package/dist/locale/cs_CZ.js +13 -9
  114. package/dist/locale/da_DK.js +3 -1
  115. package/dist/locale/de_DE.js +6 -2
  116. package/dist/locale/el_GR.js +3 -1
  117. package/dist/locale/en_GB.js +3 -1
  118. package/dist/locale/en_US.js +5 -2
  119. package/dist/locale/es_ES.js +3 -1
  120. package/dist/locale/et_EE.js +3 -1
  121. package/dist/locale/eu_ES.js +3 -1
  122. package/dist/locale/fa_IR.js +3 -1
  123. package/dist/locale/fi_FI.js +3 -1
  124. package/dist/locale/fr_BE.js +3 -1
  125. package/dist/locale/fr_CA.js +3 -1
  126. package/dist/locale/fr_FR.js +6 -2
  127. package/dist/locale/ga_IE.js +3 -1
  128. package/dist/locale/gl_ES.js +3 -1
  129. package/dist/locale/he_IL.js +3 -1
  130. package/dist/locale/hi_IN.js +3 -1
  131. package/dist/locale/hr_HR.js +3 -1
  132. package/dist/locale/hu_HU.js +3 -1
  133. package/dist/locale/hy_AM.js +5 -13
  134. package/dist/locale/id_ID.js +3 -1
  135. package/dist/locale/index.d.ts +6 -0
  136. package/dist/locale/is_IS.js +3 -1
  137. package/dist/locale/it_IT.js +6 -2
  138. package/dist/locale/ja_JP.js +3 -1
  139. package/dist/locale/ka_GE.js +3 -1
  140. package/dist/locale/kk_KZ.js +3 -1
  141. package/dist/locale/km_KH.js +3 -1
  142. package/dist/locale/kmr_IQ.js +3 -1
  143. package/dist/locale/kn_IN.js +3 -1
  144. package/dist/locale/ko_KR.js +3 -1
  145. package/dist/locale/ku_IQ.js +3 -1
  146. package/dist/locale/lt_LT.js +3 -1
  147. package/dist/locale/lv_LV.js +3 -1
  148. package/dist/locale/mk_MK.js +3 -1
  149. package/dist/locale/ml_IN.js +3 -1
  150. package/dist/locale/mn_MN.js +3 -1
  151. package/dist/locale/mr_IN.js +3 -1
  152. package/dist/locale/ms_MY.js +3 -1
  153. package/dist/locale/my_MM.js +3 -1
  154. package/dist/locale/nb_NO.js +3 -1
  155. package/dist/locale/ne_NP.js +4 -2
  156. package/dist/locale/nl_BE.js +3 -1
  157. package/dist/locale/nl_NL.js +3 -1
  158. package/dist/locale/pl_PL.js +3 -1
  159. package/dist/locale/pt_BR.js +3 -1
  160. package/dist/locale/pt_PT.js +3 -1
  161. package/dist/locale/ro_RO.js +3 -1
  162. package/dist/locale/ru_RU.js +3 -1
  163. package/dist/locale/si_LK.js +3 -1
  164. package/dist/locale/sk_SK.js +3 -1
  165. package/dist/locale/sl_SI.js +3 -1
  166. package/dist/locale/sq_AL.js +5 -13
  167. package/dist/locale/sr_RS.js +3 -1
  168. package/dist/locale/sv_SE.js +3 -1
  169. package/dist/locale/ta_IN.js +3 -1
  170. package/dist/locale/th_TH.js +3 -1
  171. package/dist/locale/tk_TK.js +3 -1
  172. package/dist/locale/tr_TR.js +3 -1
  173. package/dist/locale/uk_UA.js +3 -1
  174. package/dist/locale/ur_PK.js +3 -1
  175. package/dist/locale/uz_UZ.js +3 -1
  176. package/dist/locale/vi_VN.js +3 -1
  177. package/dist/locale/zh_CN.js +5 -2
  178. package/dist/locale/zh_HK.js +3 -1
  179. package/dist/locale/zh_TW.js +3 -1
  180. package/dist/mentions/index.js +4 -4
  181. package/dist/menu/MenuItem.js +7 -7
  182. package/dist/menu/SubMenu.js +5 -4
  183. package/dist/menu/menu.js +2 -2
  184. package/dist/message/PurePanel.js +2 -2
  185. package/dist/message/style/index.d.ts +1 -0
  186. package/dist/message/style/index.js +2 -1
  187. package/dist/modal/Modal.js +5 -5
  188. package/dist/modal/PurePanel.js +2 -2
  189. package/dist/modal/style/confirm.js +1 -1
  190. package/dist/notification/PurePanel.js +2 -2
  191. package/dist/notification/style/index.d.ts +3 -0
  192. package/dist/notification/style/index.js +4 -5
  193. package/dist/notification/style/placement.js +3 -6
  194. package/dist/package.js +1 -1
  195. package/dist/pagination/Pagination.js +6 -5
  196. package/dist/pagination/index.d.ts +2 -1
  197. package/dist/pagination/interface.d.ts +2 -2
  198. package/dist/pagination/style/index.js +15 -7
  199. package/dist/popconfirm/index.js +4 -3
  200. package/dist/popover/PurePanel.js +2 -2
  201. package/dist/popover/style/index.js +1 -0
  202. package/dist/progress/Circle.js +3 -3
  203. package/dist/progress/Line.js +2 -1
  204. package/dist/progress/progress.js +1 -1
  205. package/dist/qrcode/QrcodeStatus.js +2 -1
  206. package/dist/qrcode/index.js +2 -2
  207. package/dist/qrcode/style/index.js +0 -4
  208. package/dist/radio/radio.js +2 -2
  209. package/dist/rate/index.js +2 -2
  210. package/dist/select/index.d.ts +11 -3
  211. package/dist/select/index.js +55 -38
  212. package/dist/select/style/index.d.ts +1 -0
  213. package/dist/select/useIcons.d.ts +23 -8
  214. package/dist/select/useIcons.js +34 -13
  215. package/dist/select/useShowArrow.d.ts +2 -3
  216. package/dist/select/useShowArrow.js +3 -5
  217. package/dist/skeleton/Paragraph.js +2 -2
  218. package/dist/skeleton/Skeleton.js +2 -2
  219. package/dist/skeleton/Title.js +2 -2
  220. package/dist/slider/index.d.ts +6 -1
  221. package/dist/slider/index.js +7 -5
  222. package/dist/space/Item.d.ts +1 -0
  223. package/dist/space/Item.js +6 -2
  224. package/dist/space/index.d.ts +1 -1
  225. package/dist/space/index.js +1 -0
  226. package/dist/space/style/addon.d.ts +1 -0
  227. package/dist/space/style/compact.d.ts +1 -0
  228. package/dist/space/style/index.js +8 -2
  229. package/dist/spin/Indicator/index.js +5 -1
  230. package/dist/splitter/SplitBar.js +2 -1
  231. package/dist/splitter/Splitter.js +10 -4
  232. package/dist/splitter/interface.d.ts +1 -0
  233. package/dist/statistic/Number.js +7 -1
  234. package/dist/statistic/Statistic.d.ts +3 -0
  235. package/dist/statistic/Statistic.js +2 -1
  236. package/dist/steps/index.js +16 -8
  237. package/dist/switch/index.js +10 -4
  238. package/dist/table/InternalTable.js +22 -7
  239. package/dist/table/hooks/useFilter/index.js +5 -2
  240. package/dist/table/hooks/usePagination.d.ts +2 -1
  241. package/dist/table/hooks/usePagination.js +6 -3
  242. package/dist/table/index.d.ts +2 -2
  243. package/dist/table/util.d.ts +1 -1
  244. package/dist/tabs/index.js +19 -11
  245. package/dist/tabs/style/index.js +2 -6
  246. package/dist/tag/index.d.ts +1 -1
  247. package/dist/tag/index.js +13 -5
  248. package/dist/theme/getDesignToken.js +2 -1
  249. package/dist/theme/index.d.ts +1 -0
  250. package/dist/time-picker/index.d.ts +16 -9
  251. package/dist/time-picker/index.js +31 -84
  252. package/dist/timeline/Timeline.js +16 -10
  253. package/dist/tooltip/PurePanel.js +2 -2
  254. package/dist/tooltip/index.js +3 -6
  255. package/dist/tooltip/style/index.js +1 -1
  256. package/dist/tour/index.js +2 -3
  257. package/dist/tour/panelRender.js +4 -4
  258. package/dist/transfer/Section.js +2 -2
  259. package/dist/tree/DirectoryTree.d.ts +19 -7
  260. package/dist/tree/DirectoryTree.js +2 -2
  261. package/dist/tree/Tree.d.ts +73 -58
  262. package/dist/tree/Tree.js +2 -2
  263. package/dist/tree/index.d.ts +8 -5
  264. package/dist/tree/index.js +4 -3
  265. package/dist/tree/style/index.js +6 -1
  266. package/dist/tree/utils/iconUtil.js +1 -1
  267. package/dist/tree-select/index.d.ts +32 -2
  268. package/dist/tree-select/index.js +75 -75
  269. package/dist/upload/Upload.js +2 -2
  270. package/dist/upload/utils.js +8 -3
  271. package/dist/version/token.json +1 -1
  272. package/dist/watermark/useWatermark.d.ts +1 -7
  273. package/dist/watermark/useWatermark.js +1 -7
  274. package/package.json +20 -20
  275. package/web-tags.json +85 -29
  276. package/web-types.json +242 -157
  277. package/dist/date-picker/generatePicker/SuffixIcon.d.ts +0 -12
  278. package/dist/date-picker/generatePicker/SuffixIcon.js +0 -51
  279. package/dist/form/style/fallbackCmp.d.ts +0 -14
  280. package/dist/form/style/fallbackCmp.js +0 -13
@@ -5,13 +5,13 @@ import { filterEmpty } from "@v-c/util/dist/props-util";
5
5
  const Item = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
6
6
  const spaceContext = useSpaceContext();
7
7
  return () => {
8
- const { index, className, classes, styles } = props;
8
+ const { index, className, prefix, classes, styles } = props;
9
9
  const { latestIndex } = spaceContext.value;
10
10
  const children = filterEmpty(slots?.default?.());
11
11
  const separator = filterEmpty(slots?.separator?.());
12
12
  if (children.length === 0) return null;
13
13
  return createVNode(Fragment, null, [createVNode("div", mergeProps({ "class": className }, attrs), [children]), index < latestIndex && !!separator.length && createVNode("span", {
14
- "class": [`${className}-item-separator`, classes.separator],
14
+ "class": [`${prefix}-item-separator`, classes.separator],
15
15
  "style": styles.separator
16
16
  }, [separator])]);
17
17
  };
@@ -24,6 +24,10 @@ const Item = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
24
24
  type: String,
25
25
  required: true
26
26
  },
27
+ prefix: {
28
+ type: String,
29
+ required: true
30
+ },
27
31
  classes: {
28
32
  type: Object,
29
33
  required: true
@@ -28,7 +28,7 @@ interface SpaceProps extends ComponentBaseProps {
28
28
  direction?: Orientation;
29
29
  orientation?: Orientation;
30
30
  vertical?: boolean;
31
- align?: 'start' | 'end' | 'center' | 'baseline';
31
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
32
32
  separator?: VueNode;
33
33
  wrap?: boolean;
34
34
  classes?: SpaceClassNamesType;
@@ -54,6 +54,7 @@ const InternalSpace = /* @__PURE__ */ defineComponent((props, { slots, attrs })
54
54
  if (child !== null && child !== void 0) latestIndex.value = i;
55
55
  const key = child?.key || `${itemClassName}-${i}`;
56
56
  return createVNode(Item, {
57
+ "prefix": prefixCls.value,
57
58
  "className": itemClassName,
58
59
  "classes": mergedClassNames.value,
59
60
  "styles": mergedStyles.value,
@@ -2,6 +2,7 @@ import { SeedToken } from "../../theme/interface/seeds.js";
2
2
  import { AliasToken } from "../../theme/interface/alias.js";
3
3
  import { ComponentTokenMap } from "../../theme/interface/components.js";
4
4
  import "../../theme/interface/index.js";
5
+ import "../../theme/internal.js";
5
6
  //#region src/space/style/addon.d.ts
6
7
  /** Component only token. Which will handle additional calculation of alias token */
7
8
  interface ComponentToken {}
@@ -2,6 +2,7 @@ import { SeedToken } from "../../theme/interface/seeds.js";
2
2
  import { AliasToken } from "../../theme/interface/alias.js";
3
3
  import { ComponentTokenMap } from "../../theme/interface/components.js";
4
4
  import "../../theme/interface/index.js";
5
+ import "../../theme/internal.js";
5
6
  //#region src/space/style/compact.d.ts
6
7
  /** Component only token. Which will handle additional calculation of alias token */
7
8
  interface ComponentToken {}
@@ -8,11 +8,17 @@ const genSpaceStyle = (token) => {
8
8
  "&-rtl": { direction: "rtl" },
9
9
  "&-vertical": { flexDirection: "column" },
10
10
  "&-align": {
11
- flexDirection: "column",
12
11
  "&-center": { alignItems: "center" },
13
12
  "&-start": { alignItems: "flex-start" },
14
13
  "&-end": { alignItems: "flex-end" },
15
- "&-baseline": { alignItems: "baseline" }
14
+ "&-baseline": { alignItems: "baseline" },
15
+ "&-stretch": {
16
+ alignItems: "stretch",
17
+ [`> ${componentCls}-item`]: { display: "flex" },
18
+ [`&${componentCls}-vertical > ${componentCls}-item`]: { flexDirection: "column" },
19
+ [`&${componentCls}-horizontal > ${componentCls}-item > *`]: { height: "100%" },
20
+ [`&${componentCls}-vertical > ${componentCls}-item > *`]: { width: "100%" }
21
+ }
16
22
  },
17
23
  [`${componentCls}-item:empty`]: { display: "none" },
18
24
  [`${componentCls}-item > ${antCls}-badge-not-a-wrapper:only-child`]: { display: "block" }
@@ -1,14 +1,18 @@
1
+ import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
1
2
  import { getSlotPropsFnRun } from "../../_util/tools.js";
2
3
  import { Looper } from "./Looper.js";
3
4
  import { createVNode, defineComponent, isVNode, mergeDefaults, mergeProps } from "vue";
5
+ import { classNames } from "@v-c/util";
4
6
  //#region src/spin/Indicator/index.tsx
5
7
  const Indicator = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
6
8
  return () => {
7
9
  const { prefixCls, percent } = props;
8
10
  const dotClassName = `${prefixCls}-dot`;
9
11
  const indicator = getSlotPropsFnRun(slots, props, "indicator");
12
+ const { style, className } = getAttrStyleAndClass(attrs);
10
13
  if (indicator && isVNode(indicator)) return createVNode(indicator, {
11
- class: dotClassName,
14
+ class: classNames(dotClassName, className),
15
+ style,
12
16
  percent
13
17
  });
14
18
  return createVNode(Looper, mergeProps(attrs, {
@@ -99,7 +99,8 @@ const SplitBar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
99
99
  mousemove: onMouseMove,
100
100
  mouseup: onMouseUp,
101
101
  touchmove: handleTouchMove,
102
- touchend: handleTouchEnd
102
+ touchend: handleTouchEnd,
103
+ touchcancel: handleTouchEnd
103
104
  };
104
105
  for (const [event, handler] of Object.entries(eventHandlerMap)) window.addEventListener(event, handler);
105
106
  onCleanup(() => {
@@ -13,7 +13,7 @@ import SplitBar from "./SplitBar.js";
13
13
  import style_default from "./style/index.js";
14
14
  import { Fragment, computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
15
15
  import { clsx } from "@v-c/util";
16
- import { omit } from "es-toolkit";
16
+ import { omit as omit$1 } from "es-toolkit";
17
17
  import ResizeObserver from "@v-c/resize-observer";
18
18
  //#region src/splitter/Splitter.tsx
19
19
  const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
@@ -86,7 +86,7 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
86
86
  const nativeElementRef = shallowRef();
87
87
  expose({ nativeElement: nativeElementRef });
88
88
  return () => {
89
- const { rootClass, lazy, draggerIcon, collapsible, collapsibleIcon } = props;
89
+ const { rootClass, lazy, draggerIcon, collapsible, collapsibleIcon, destroyOnHidden } = props;
90
90
  const mergedCollapsibleIcon = collapsible?.icon ?? collapsibleIcon;
91
91
  items.value = convertChildrenToItems(slots?.default?.() ?? []);
92
92
  const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
@@ -101,7 +101,7 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
101
101
  "class": containerClassName
102
102
  }), [items.value?.map?.((item, idx) => {
103
103
  const panel = createVNode(InternalPanel, mergeProps({
104
- ...omit(item, ["_$slots"]),
104
+ ...omit$1(item, ["_$slots"]),
105
105
  class: clsx(mergedClassNames.value.panel, item.class),
106
106
  style: {
107
107
  ...mergedStyles.value.panel,
@@ -110,7 +110,8 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
110
110
  }, {
111
111
  "prefixCls": prefixCls.value,
112
112
  "size": panelSizes.value[idx],
113
- "supportMotion": collapsible?.motion && movingIndex.value === void 0
113
+ "supportMotion": collapsible?.motion && movingIndex.value === void 0,
114
+ "destroyOnHidden": item.destroyOnHidden ?? destroyOnHidden
114
115
  }), { default: () => [item._$slots?.default?.()] });
115
116
  let splitBar = null;
116
117
  const resizableInfo = resizableInfos.value[idx];
@@ -181,6 +182,11 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
181
182
  required: false,
182
183
  default: void 0
183
184
  },
185
+ destroyOnHidden: {
186
+ type: Boolean,
187
+ required: false,
188
+ default: void 0
189
+ },
184
190
  draggerIcon: {
185
191
  type: [
186
192
  Function,
@@ -48,6 +48,7 @@ interface SplitterProps extends ComponentBaseProps {
48
48
  layout?: Orientation;
49
49
  orientation?: Orientation;
50
50
  vertical?: boolean;
51
+ destroyOnHidden?: boolean;
51
52
  draggerIcon?: VueNode;
52
53
  /**
53
54
  * Collapse configuration. Set `motion: true` to enable collapse animation.
@@ -1,13 +1,19 @@
1
1
  import { isNumber } from "../_util/is.js";
2
2
  import { createVNode, defineComponent } from "vue";
3
3
  //#region src/statistic/Number.tsx
4
+ const plainNumberFormat = new Intl.NumberFormat("en-US", {
5
+ notation: "standard",
6
+ useGrouping: false,
7
+ maximumSignificantDigits: 21
8
+ });
4
9
  const StatisticNumber = /* @__PURE__ */ defineComponent((props) => {
5
10
  return () => {
6
11
  const { value, formatter, precision, decimalSeparator, groupSeparator = "", prefixCls, className, style } = props;
7
12
  let valueNode;
8
13
  if (typeof formatter === "function") valueNode = formatter(value);
9
14
  else {
10
- const val = String(value);
15
+ const rawValue = String(value);
16
+ const val = isNumber(value) && rawValue.includes("e") ? plainNumberFormat.format(value) : rawValue;
11
17
  const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
12
18
  if (!cells || val === "-") valueNode = val;
13
19
  else {
@@ -50,6 +50,9 @@ interface StatisticSlots {
50
50
  title: () => any;
51
51
  prefix: () => any;
52
52
  suffix: () => any;
53
+ formatter?: (ctx: {
54
+ value: valueType;
55
+ }) => any;
53
56
  }
54
57
  interface InternalStatisticProps extends StatisticProps, StatisticEmitsProps {}
55
58
  interface StatisticEmitsProps {
@@ -29,6 +29,7 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
29
29
  const title = getSlotPropsFnRun(slots, props, "title");
30
30
  const prefix = getSlotPropsFnRun(slots, props, "prefix");
31
31
  const suffix = getSlotPropsFnRun(slots, props, "suffix");
32
+ const mergedFormatter = slots.formatter ? (v) => getSlotPropsFnRun(slots, {}, "formatter", true, { value: v }) : formatter;
32
33
  const cls = classNames(prefixCls.value, { [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, contextClassName.value, attrs.class, rootClass, mergedClassNames.value.root, hashId.value, cssVarCls.value);
33
34
  const restProps = pickAttrs(attrs, {
34
35
  data: true,
@@ -44,7 +45,7 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
44
45
  "decimalSeparator": decimalSeparator,
45
46
  "groupSeparator": groupSeparator,
46
47
  "prefixCls": prefixCls.value,
47
- "formatter": formatter,
48
+ "formatter": mergedFormatter,
48
49
  "precision": precision,
49
50
  "value": value,
50
51
  "className": valueClassNames,
@@ -5,6 +5,7 @@ import { genCssVar } from "../theme/util/genStyleUtils.js";
5
5
  import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
6
6
  import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
7
7
  import InternalTooltip from "../tooltip/index.js";
8
+ import useVariant from "../form/hooks/useVariant.js";
8
9
  import { TARGET_CLS } from "../_util/wave/interface.js";
9
10
  import wave_default from "../_util/wave/index.js";
10
11
  import useBreakpoint from "../grid/hooks/useBreakpoint.js";
@@ -13,9 +14,9 @@ import PanelArrow from "./PanelArrow.js";
13
14
  import ProgressIcon from "./ProgressIcon.js";
14
15
  import style_default from "./style/index.js";
15
16
  import useDisplaySteps from "./useDisplaySteps.js";
16
- import { Fragment, computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps } from "vue";
17
+ import { Fragment, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeDefaults, mergeProps, toRef } from "vue";
17
18
  import { clsx } from "@v-c/util";
18
- import { CheckOutlined } from "@antdv-next/icons";
19
+ import { CheckOutlined, CloseOutlined } from "@antdv-next/icons";
19
20
  import VcSteps from "@v-c/steps";
20
21
  //#region src/steps/index.tsx
21
22
  function _isSlot(s) {
@@ -23,9 +24,14 @@ function _isSlot(s) {
23
24
  }
24
25
  const waveEffectClassNames = { itemIcon: TARGET_CLS };
25
26
  const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
27
+ const instance = getCurrentInstance();
26
28
  const internalContent = useInternalContext();
27
29
  const { direction: rtlDirection, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, rootPrefixCls } = useComponentBaseConfig("steps", props);
28
30
  const { size, items, responsive, type, classes, styles } = toPropsRefs(props, "size", "items", "responsive", "type", "classes", "styles");
31
+ const [mergedVariant] = useVariant("steps", toRef(() => props.variant), {
32
+ variants: ["filled", "outlined"],
33
+ defaultVariant: "filled"
34
+ });
29
35
  const components = computed(() => {
30
36
  return {
31
37
  root: internalContent.value?.rootComponent,
@@ -63,6 +69,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
63
69
  const mergedProps = computed(() => {
64
70
  return {
65
71
  ...props,
72
+ variant: mergedVariant.value,
66
73
  size: mergedSize.value,
67
74
  type: mergedType.value,
68
75
  orientation: mergedOrientation.value,
@@ -84,7 +91,8 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
84
91
  warning(props.maxCount === void 0 || props.maxCount >= 3, "usage", "`maxCount` should be greater than or equal to 3.");
85
92
  }
86
93
  return () => {
87
- const { variant, onChange, offset, ellipsis, rootClass, current: _current, initial: _initial, maxCount: _maxCount, ...restProps } = props;
94
+ const variant = mergedVariant.value;
95
+ const { variant: _variant, onChange, offset, ellipsis, rootClass, classes: _classes, size: _size, type: _type, direction: _direction, labelPlacement: _labelPlacement, progressDot: _progressDot, responsive: _responsive, percent: _percent, current: _current, initial: _initial, maxCount: _maxCount, ...restProps } = props;
88
96
  const { className, restAttrs } = getAttrStyleAndClass(attrs);
89
97
  const iconRender = slots?.iconRender || props?.iconRender;
90
98
  const legacyProgressDotRenderFn = () => {
@@ -103,7 +111,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
103
111
  iconContent = createVNode(CheckOutlined, { "class": `${itemIconCls.value}-finish` }, null);
104
112
  break;
105
113
  case "error":
106
- iconContent = createVNode(CheckOutlined, { "class": `${itemIconCls.value}-error` }, null);
114
+ iconContent = createVNode(CloseOutlined, { "class": `${itemIconCls.value}-error` }, null);
107
115
  break;
108
116
  default: {
109
117
  let numNode = createVNode("span", { "class": `${itemIconCls.value}-number` }, [mappedIndex + 1]);
@@ -139,6 +147,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
139
147
  });
140
148
  return iconNode;
141
149
  };
150
+ const hasChangeListener = !!(props.onChange || instance?.vnode?.props?.["onUpdate:current"]);
142
151
  const itemRender = (itemNode, itemInfo) => {
143
152
  let content = itemNode;
144
153
  const itemContent = getSlotPropsFnRun({}, itemInfo.item, "content");
@@ -148,7 +157,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
148
157
  }, _isSlot(itemNode) ? itemNode : { default: () => [itemNode] });
149
158
  return createVNode(wave_default, {
150
159
  "component": "Steps",
151
- "disabled": itemInfo.item.disabled || !onChange,
160
+ "disabled": itemInfo.item.disabled || !hasChangeListener,
152
161
  "colorSource": variant === "filled" ? "color" : null
153
162
  }, _isSlot(content) ? content : { default: () => [content] });
154
163
  };
@@ -177,13 +186,13 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
177
186
  "initial": 0,
178
187
  "current": mappedDisplayCurrent.value,
179
188
  "items": displayItems.value,
180
- "onChange": (displayCurrent) => {
189
+ "onChange": hasChangeListener ? (displayCurrent) => {
181
190
  const target = displaySteps.value[displayCurrent];
182
191
  const originIndex = target && target.originIndex >= 0 ? target.originIndex : displayCurrent;
183
192
  const next = mergedInitial.value + originIndex;
184
193
  onChange?.(next);
185
194
  emit("update:current", next);
186
- },
195
+ } : void 0,
187
196
  "iconRender": internalIconRender,
188
197
  "itemRender": itemRender,
189
198
  "itemWrapperRender": itemWrapperRender
@@ -287,7 +296,6 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
287
296
  required: false
288
297
  }
289
298
  }, {
290
- variant: "filled",
291
299
  responsive: true,
292
300
  offset: 0,
293
301
  current: 0
@@ -10,7 +10,7 @@ import style_default from "./style/index.js";
10
10
  import { computed, createVNode, defineComponent, mergeProps, shallowRef, watch } from "vue";
11
11
  import { clsx } from "@v-c/util";
12
12
  import { LoadingOutlined } from "@antdv-next/icons";
13
- import { omit } from "es-toolkit/compat";
13
+ import { omit as omit$1 } from "es-toolkit/compat";
14
14
  import VcSwitch from "@v-c/switch";
15
15
  //#region src/switch/index.tsx
16
16
  const keys = [
@@ -31,7 +31,7 @@ const keys = [
31
31
  "checkedChildren",
32
32
  "unCheckedChildren"
33
33
  ];
34
- const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
34
+ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
35
35
  const mergedCheckedValue = computed(() => props.checkedValue ?? true);
36
36
  const mergedUnCheckedValue = computed(() => props.unCheckedValue ?? false);
37
37
  const currentValue = shallowRef(props?.checked ?? props?.value ?? props?.defaultChecked ?? props?.defaultValue ?? mergedUnCheckedValue.value);
@@ -69,6 +69,12 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
69
69
  emit("update:checked", newValue);
70
70
  emit("update:value", newValue);
71
71
  };
72
+ const switchRef = shallowRef();
73
+ expose({
74
+ nativeElement: switchRef,
75
+ focus: () => switchRef.value?.focus?.(),
76
+ blur: () => switchRef.value?.blur?.()
77
+ });
72
78
  return () => {
73
79
  const { loading, rootClass } = props;
74
80
  const checkedChildren = getSlotPropsFnRun(slots, props, "checkedChildren");
@@ -87,11 +93,11 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
87
93
  ...mergedStyles.value.root,
88
94
  ...style
89
95
  };
90
- const restProps = omit(props, keys);
96
+ const restProps = omit$1(props, keys);
91
97
  return createVNode(wave_default, {
92
98
  "component": "Switch",
93
99
  "disabled": mergedDisabled.value
94
- }, { default: () => [createVNode(VcSwitch, mergeProps(restAttrs, restProps, {
100
+ }, { default: () => [createVNode(VcSwitch, mergeProps({ "ref": switchRef }, restAttrs, restProps, {
95
101
  "classNames": mergedClassNames.value,
96
102
  "styles": mergedStyles.value,
97
103
  "checked": isChecked.value,
@@ -30,7 +30,7 @@ import style_default from "./style/index.js";
30
30
  import { convertColumnsToColumnProps } from "./utils.js";
31
31
  import { computed, createVNode, defineComponent, h, inject, isVNode, mergeDefaults, mergeProps, provide, shallowRef, watch, watchEffect } from "vue";
32
32
  import { clsx } from "@v-c/util";
33
- import { omit } from "es-toolkit";
33
+ import { omit as omit$1 } from "es-toolkit";
34
34
  import pickAttrs from "@v-c/util/dist/pickAttrs";
35
35
  import VcTable, { INTERNAL_HOOKS, VirtualTable } from "@v-c/table";
36
36
  //#region src/table/InternalTable.tsx
@@ -111,7 +111,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
111
111
  const matched = new Set(Object.keys(screens.value || {}).filter((m) => screens.value?.[m]));
112
112
  return baseColumns.value.filter((c) => !c.responsive || c.responsive.some((r) => matched.has(r)));
113
113
  });
114
- const tableProps = computed(() => omit(props, [
114
+ const tableProps = computed(() => omit$1(props, [
115
115
  "classes",
116
116
  "styles",
117
117
  "dataSource",
@@ -286,12 +286,12 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
286
286
  };
287
287
  const columnTitleProps = useColumnTitleProps(sorterTitleProps, filters);
288
288
  const transformTitleColumns = computed(() => useTitleColumns(columnTitleProps.value)[0]);
289
- const renderExpandedRow = slots.expandedRowRender ? (record, index, indent, expanded) => getSlotPropsFnRun(slots, props, "expandedRowRender", true, {
289
+ const renderExpandedRow = (record, index, indent, expanded) => getSlotPropsFnRun(slots, props, "expandedRowRender", true, {
290
290
  record,
291
291
  index,
292
292
  indent,
293
293
  expanded
294
- }) : void 0;
294
+ });
295
295
  const renderFilterDropdown = slots.filterDropdown ? (ctx) => getSlotPropsFnRun(slots, props, "filterDropdown", false, ctx) : void 0;
296
296
  const renderFilterIcon = slots.filterIcon ? (ctx) => getSlotPropsFnRun(slots, props, "filterIcon", false, ctx) : void 0;
297
297
  const transformFilterColumns = computed(() => useFilter({
@@ -309,7 +309,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
309
309
  const transformColumns = (innerColumns) => transformTitleColumns.value(transformSelectionColumns(transformFilterColumns.value(transformSorterColumns(innerColumns))));
310
310
  const expandType = computed(() => {
311
311
  if (rawData.value.some((item) => item?.[childrenColumnName.value])) return "nest";
312
- if (renderExpandedRow || mergedExpandable.value.expandedRowRender) return "row";
312
+ if (slots.expandedRowRender || mergedExpandable.value.expandedRowRender) return "row";
313
313
  return null;
314
314
  });
315
315
  if (isDev) devUseWarning("Table").deprecated(!props.expandable?.expandIcon, "expandable.expandIcon", "components.ExpandIcon");
@@ -317,13 +317,28 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
317
317
  const mergedExpandableConfig = computed(() => {
318
318
  const expandable = { ...mergedExpandable.value };
319
319
  expandable.__PARENT_RENDER_ICON__ = expandable.expandIcon;
320
- if (renderExpandedRow) expandable.expandedRowRender = renderExpandedRow;
321
320
  expandable.expandIcon = void 0;
322
321
  if (expandType.value === "nest" && expandable.expandIconColumnIndex === void 0) expandable.expandIconColumnIndex = mergedRowSelection.value ? 1 : 0;
323
322
  else if (expandType.value === "nest" && expandable.expandIconColumnIndex > 0 && mergedRowSelection.value) expandable.expandIconColumnIndex -= 1;
324
323
  if (typeof expandable.indentSize !== "number") expandable.indentSize = typeof props.indentSize === "number" ? props.indentSize : 15;
325
324
  return expandable;
326
325
  });
326
+ let lastExpandableBase;
327
+ let lastExpandableHasSlot = false;
328
+ let lastExpandableConfig;
329
+ const resolveExpandableConfig = () => {
330
+ const base = mergedExpandableConfig.value;
331
+ const hasSlot = !!slots.expandedRowRender;
332
+ if (base !== lastExpandableBase || hasSlot !== lastExpandableHasSlot) {
333
+ lastExpandableBase = base;
334
+ lastExpandableHasSlot = hasSlot;
335
+ lastExpandableConfig = hasSlot ? {
336
+ ...base,
337
+ expandedRowRender: renderExpandedRow
338
+ } : base;
339
+ }
340
+ return lastExpandableConfig;
341
+ };
327
342
  const mergedComponents = computed(() => {
328
343
  let components = props.components;
329
344
  if (hasAriaProps.value) components = {
@@ -419,7 +434,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
419
434
  "emptyText": mergedEmptyNode,
420
435
  "classNames": mergedClassNames.value,
421
436
  "styles": mergedStyles.value,
422
- "expandable": mergedExpandableConfig.value,
437
+ "expandable": resolveExpandableConfig(),
423
438
  "prefixCls": prefixCls.value,
424
439
  "direction": direction.value,
425
440
  "headerCell": slots.headerCell || contextHeaderCell.value || props.headerCell ? renderHeaderCell : void 0,
@@ -83,6 +83,7 @@ function generateFilterInfo(filterStates) {
83
83
  return currentFilters;
84
84
  }
85
85
  function getFilterData(data, filterStates, childrenColumnName) {
86
+ let childrenFiltered = false;
86
87
  return filterStates.reduce((currentData, filterState) => {
87
88
  const { column: { onFilter, filters }, filteredKeys } = filterState;
88
89
  if (onFilter && filteredKeys && filteredKeys.length) {
@@ -96,12 +97,14 @@ function getFilterData(data, filterStates, childrenColumnName) {
96
97
  const stringKey = String(key);
97
98
  return keyMap.get(stringKey) ?? key;
98
99
  });
99
- return currentData.reduce((records, record) => {
100
+ const filteredData = currentData.reduce((records, record) => {
100
101
  const currentRecord = { ...record };
101
- if (currentRecord[childrenColumnName]) currentRecord[childrenColumnName] = getFilterData(currentRecord[childrenColumnName], filterStates, childrenColumnName);
102
+ if (!childrenFiltered && currentRecord[childrenColumnName]) currentRecord[childrenColumnName] = getFilterData(currentRecord[childrenColumnName], filterStates, childrenColumnName);
102
103
  if (realKeys.some((realKey) => onFilter(realKey, currentRecord))) records.push(currentRecord);
103
104
  return records;
104
105
  }, []);
106
+ childrenFiltered = true;
107
+ return filteredData;
105
108
  }
106
109
  return currentData;
107
110
  }, data);
@@ -1,9 +1,10 @@
1
+ import { PaginationOnChangeInfo } from "../../pagination/index.js";
1
2
  import { TablePaginationConfig } from "../interface.js";
2
3
  import { Ref } from "vue";
3
4
  //#region src/table/hooks/usePagination.d.ts
4
5
  declare const DEFAULT_PAGE_SIZE = 10;
5
6
  declare function getPaginationParam(mergedPagination: TablePaginationConfig, pagination?: TablePaginationConfig | boolean): any;
6
7
  type MaybeRef<T> = T | Ref<T>;
7
- declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number) => void, pagination?: MaybeRef<TablePaginationConfig | false>): readonly [import("vue").ComputedRef<TablePaginationConfig>, (current?: number, pageSize?: number) => void];
8
+ declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number, info?: PaginationOnChangeInfo) => void, pagination?: MaybeRef<TablePaginationConfig | false>): readonly [import("vue").ComputedRef<TablePaginationConfig>, (current?: number, pageSize?: number) => void];
8
9
  //#endregion
9
10
  export { DEFAULT_PAGE_SIZE, usePagination as default, getPaginationParam };
@@ -36,10 +36,13 @@ function usePagination(total, onChange, pagination) {
36
36
  pageSize: pageSize || mergedPagination.value.pageSize
37
37
  };
38
38
  };
39
- const onInternalChange = (current, pageSize) => {
40
- if (paginationRef.value && typeof paginationRef.value === "object") paginationRef.value.onChange?.(current, pageSize);
39
+ const onInternalChange = (current, pageSize, info) => {
40
+ if (paginationRef.value && typeof paginationRef.value === "object") if (info) paginationRef.value.onChange?.(current, pageSize, info);
41
+ else paginationRef.value.onChange?.(current, pageSize);
41
42
  refreshPagination(current, pageSize);
42
- onChange(current, pageSize || mergedPagination.value.pageSize || 10);
43
+ const mergedPageSize = pageSize || mergedPagination.value.pageSize || 10;
44
+ if (info) onChange(current, mergedPageSize, info);
45
+ else onChange(current, mergedPageSize);
43
46
  };
44
47
  return [computed(() => {
45
48
  if (paginationRef.value === false) return {};
@@ -1,5 +1,5 @@
1
1
  import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } from "./hooks/useSelection.js";
2
- import { ColumnType, ColumnsType, ExpandType, FilterValue, SortOrder, SorterResult, TableLocale, TablePaginationConfig, TableRowSelection } from "./interface.js";
2
+ import { ColumnType, ColumnsType, ExpandType, FilterDropdownProps, FilterValue, SortOrder, SorterResult, TableLocale, TablePaginationConfig, TableRowSelection } from "./interface.js";
3
3
  import { TableClassNamesType, TableEmits, TableExpose, TableProps, TableSlots, TableStylesType } from "./InternalTable.js";
4
4
  import Column from "./Column.js";
5
5
  import ColumnGroup from "./ColumnGroup.js";
@@ -8,4 +8,4 @@ import { DataIndex, EXPAND_COLUMN, Reference, Summary, SummaryCell, SummaryRow }
8
8
  //#region src/table/index.d.ts
9
9
  declare const _default: ForwardTableType;
10
10
  //#endregion
11
- export { Column, ColumnGroup, type ColumnType, type ColumnsType, type DataIndex, EXPAND_COLUMN, type ExpandType, type FilterValue, type Reference, SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE, type SortOrder, type SorterResult, Summary, SummaryCell, SummaryRow, type TableClassNamesType, type ForwardTableType as TableConstructor, type TableEmits, type TableExpose, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type TableStylesType, _default as default };
11
+ export { Column, ColumnGroup, type ColumnType, type ColumnsType, type DataIndex, EXPAND_COLUMN, type ExpandType, type FilterDropdownProps, type FilterValue, type Reference, SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE, type SortOrder, type SorterResult, Summary, SummaryCell, SummaryRow, type TableClassNamesType, type ForwardTableType as TableConstructor, type TableEmits, type TableExpose, type TableLocale, type TablePaginationConfig, type TableProps, type TableRowSelection, type TableSlots, type TableStylesType, _default as default };
@@ -11,7 +11,7 @@ declare function renderColumnTitle<RecordType extends AnyObject = AnyObject>(tit
11
11
  * Should filter [object Object]
12
12
  */
13
13
  declare function safeColumnTitle<RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>): any;
14
- declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "end" | "start";
14
+ declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "start" | "end" | "center";
15
15
  declare function getPaginationSize(paginationSize: SizeType, mergedSize: SizeType): SizeType;
16
16
  //#endregion
17
17
  export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
@@ -11,7 +11,7 @@ import style_default from "./style/index.js";
11
11
  import { computed, createVNode, defineComponent, mergeProps, shallowRef, toRef } from "vue";
12
12
  import { clsx } from "@v-c/util";
13
13
  import { CloseOutlined, EllipsisOutlined, PlusOutlined } from "@antdv-next/icons";
14
- import { omit } from "es-toolkit";
14
+ import { omit as omit$1 } from "es-toolkit";
15
15
  import VcTabs from "@v-c/tabs";
16
16
  //#region src/tabs/index.tsx
17
17
  const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expose }) => {
@@ -19,7 +19,15 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
19
19
  const more = toRef(props, "more");
20
20
  const popupClassName = toRef(props, "popupClassName");
21
21
  const indicator = toRef(props, "indicator");
22
- const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls, scrollPosition: contextScrollPosition } = useComponentBaseConfig("tabs", props, ["scrollPosition"]);
22
+ const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer, getPrefixCls, scrollPosition: contextScrollPosition, indicator: contextIndicator, indicatorSize: contextIndicatorSize, moreIcon: contextMoreIcon, addIcon: contextAddIcon, removeIcon: contextRemoveIcon, more: contextMore } = useComponentBaseConfig("tabs", props, [
23
+ "scrollPosition",
24
+ "indicator",
25
+ "indicatorSize",
26
+ "moreIcon",
27
+ "addIcon",
28
+ "removeIcon",
29
+ "more"
30
+ ]);
23
31
  const size = useSize(customSize);
24
32
  const mergedScrollPosition = computed(() => props.scrollPosition ?? contextScrollPosition.value);
25
33
  const mergedPlacement = computed(() => {
@@ -44,8 +52,8 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
44
52
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
45
53
  const mergedAnimated = computed(() => useAnimateConfig(prefixCls.value, props.animated));
46
54
  const mergedIndicator = computed(() => ({
47
- align: indicator.value?.align,
48
- size: indicator.value?.size ?? indicatorSize.value
55
+ align: indicator.value?.align ?? contextIndicator.value?.align,
56
+ size: indicator.value?.size ?? indicatorSize.value ?? contextIndicator.value?.size ?? contextIndicatorSize.value
49
57
  }));
50
58
  const tabsRef = shallowRef();
51
59
  expose({ nativeElement: computed(() => tabsRef.value?.$el ?? tabsRef.value ?? null) });
@@ -54,7 +62,7 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
54
62
  warning.deprecated(!popupClassName.value, "popupClassName", "classes.popup");
55
63
  warning.deprecated(!tabPosition.value, "tabPosition", "tabPlacement");
56
64
  warning(!(attrs.onPrevClick || attrs.onNextClick), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.");
57
- warning.deprecated(!indicatorSize.value, "indicatorSize", "indicator");
65
+ warning.deprecated(!(indicatorSize.value || contextIndicatorSize.value), "indicatorSize", "indicator");
58
66
  warning.deprecated(!(props.destroyInactiveTabPane || props.items?.some((item) => "destroyInactiveTabPane" in item)), "destroyInactiveTabPane", "destroyOnHidden");
59
67
  if (more.value) [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach(([deprecatedName, newName]) => {
60
68
  warning.deprecated(!(deprecatedName in more.value), `more.${deprecatedName}`, `more.${newName}`);
@@ -74,9 +82,9 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
74
82
  };
75
83
  return () => {
76
84
  const { className: attrClassName, style: attrStyle, restAttrs } = getAttrStyleAndClass(attrs);
77
- const addIcon = getSlotPropsFnRun(slots, props, "addIcon") ?? createVNode(PlusOutlined, null, null);
78
- const removeIcon = getSlotPropsFnRun(slots, props, "removeIcon") ?? createVNode(CloseOutlined, null, null);
79
- const moreIcon = getSlotPropsFnRun(slots, props, "moreIcon") ?? createVNode(EllipsisOutlined, null, null);
85
+ const addIcon = (getSlotPropsFnRun(slots, props, "addIcon") ?? contextAddIcon.value) || createVNode(PlusOutlined, null, null);
86
+ const removeIcon = getSlotPropsFnRun(slots, props, "removeIcon") ?? contextRemoveIcon.value ?? createVNode(CloseOutlined, null, null);
87
+ const moreIcon = getSlotPropsFnRun(slots, props, "moreIcon");
80
88
  const editableFn = () => {
81
89
  if (type.value !== "editable-card") return;
82
90
  return {
@@ -93,12 +101,12 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
93
101
  const { visible: moreVisible, ...restMoreProps } = more.value ?? {};
94
102
  const legacyMoreProps = more.value && !("open" in more.value) && "visible" in more.value ? { open: moreVisible } : {};
95
103
  if (!rootPrefixCls) return {
96
- icon: moreIcon,
104
+ icon: moreIcon ?? contextMore.value?.icon ?? contextMoreIcon.value ?? createVNode(EllipsisOutlined, null, null),
97
105
  ...restMoreProps,
98
106
  ...legacyMoreProps
99
107
  };
100
108
  return {
101
- icon: moreIcon,
109
+ icon: moreIcon ?? contextMore.value?.icon ?? contextMoreIcon.value ?? createVNode(EllipsisOutlined, null, null),
102
110
  transitionName: `${rootPrefixCls}-slide-up`,
103
111
  ...restMoreProps,
104
112
  ...legacyMoreProps
@@ -106,7 +114,7 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
106
114
  };
107
115
  const mergedMore = mergedMoreFn();
108
116
  const editable = editableFn();
109
- const restProps = omit(props, [
117
+ const restProps = omit$1(props, [
110
118
  "items",
111
119
  "styles",
112
120
  "classes",
@@ -401,7 +401,7 @@ const genTabStyle = (token) => {
401
401
  color: token.colorTextDisabled,
402
402
  cursor: "not-allowed"
403
403
  },
404
- [`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: { "&:focus, &:active": { color: token.colorTextDisabled } },
404
+ [`&${tabCls}-disabled ${tabCls}-btn`]: { "&:focus, &:active": { color: token.colorTextDisabled } },
405
405
  [`& ${tabCls}-remove ${iconCls}`]: {
406
406
  margin: 0,
407
407
  verticalAlign: "middle"
@@ -472,11 +472,7 @@ const genRtlStyle = (token) => {
472
472
  }
473
473
  } } }
474
474
  },
475
- [`${componentCls}-dropdown-rtl`]: { direction: "rtl" },
476
- [`${componentCls}-menu-item`]: { [`${componentCls}-dropdown-rtl`]: { textAlign: {
477
- _skip_check_: true,
478
- value: "right"
479
- } } }
475
+ [`${componentCls}-dropdown-rtl`]: { direction: "rtl" }
480
476
  };
481
477
  };
482
478
  const genTabsStyle = (token) => {