antdv-next 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/_util/hooks/useClosable.d.ts +5 -5
  2. package/dist/_util/vueNode.d.ts +2 -2
  3. package/dist/alert/Alert.d.ts +7 -7
  4. package/dist/antd-with-locales.esm.js +13320 -11032
  5. package/dist/antd-with-locales.js +80 -80
  6. package/dist/antd.css +1 -1
  7. package/dist/antd.esm.js +11449 -10208
  8. package/dist/antd.js +74 -74
  9. package/dist/auto-complete/index.d.ts +4 -4
  10. package/dist/avatar/Avatar.d.ts +3 -3
  11. package/dist/badge/Ribbon.d.ts +2 -2
  12. package/dist/badge/index.d.ts +3 -3
  13. package/dist/breadcrumb/Breadcrumb.d.ts +4 -4
  14. package/dist/breadcrumb/BreadcrumbItem.d.ts +4 -4
  15. package/dist/button/Button.d.ts +2 -2
  16. package/dist/button/style/index.js +13 -0
  17. package/dist/calendar/generateCalendar.d.ts +8 -8
  18. package/dist/card/Card.d.ts +9 -9
  19. package/dist/card/CardMeta.d.ts +4 -4
  20. package/dist/carousel/index.d.ts +3 -3
  21. package/dist/cascader/Panel.js +26 -2
  22. package/dist/cascader/index.d.ts +53 -21
  23. package/dist/cascader/index.js +33 -5
  24. package/dist/checkbox/Checkbox.d.ts +1 -1
  25. package/dist/checkbox/Checkbox.js +4 -4
  26. package/dist/checkbox/Group.d.ts +2 -2
  27. package/dist/collapse/Collapse.d.ts +3 -3
  28. package/dist/collapse/CollapsePanel.d.ts +3 -3
  29. package/dist/color-picker/hooks/useModeColor.d.ts +2 -2
  30. package/dist/color-picker/interface.d.ts +2 -2
  31. package/dist/config-provider/context.d.ts +20 -14
  32. package/dist/config-provider/index.js +1 -1
  33. package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -2
  34. package/dist/date-picker/generatePicker/generateRangePicker.js +112 -10
  35. package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -2
  36. package/dist/date-picker/generatePicker/generateSinglePicker.js +101 -11
  37. package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
  38. package/dist/date-picker/util.d.ts +10 -1
  39. package/dist/descriptions/Item.d.ts +3 -3
  40. package/dist/descriptions/hooks/useItems.d.ts +11 -11
  41. package/dist/descriptions/index.d.ts +3 -3
  42. package/dist/descriptions/style/index.js +2 -3
  43. package/dist/drawer/DrawerPanel.d.ts +5 -5
  44. package/dist/empty/index.d.ts +3 -3
  45. package/dist/float-button/FloatButton.d.ts +5 -5
  46. package/dist/float-button/FloatButton.js +1 -1
  47. package/dist/float-button/FloatButtonGroup.d.ts +2 -2
  48. package/dist/form/ErrorList.d.ts +2 -2
  49. package/dist/image/index.d.ts +2 -2
  50. package/dist/input/Input.d.ts +5 -5
  51. package/dist/input/OTP/index.d.ts +2 -2
  52. package/dist/input/Password.d.ts +2 -2
  53. package/dist/input/Search.d.ts +3 -3
  54. package/dist/input/TextArea.js +1 -1
  55. package/dist/input/style/search.js +1 -0
  56. package/dist/input-number/index.d.ts +8 -8
  57. package/dist/input-number/index.js +0 -4
  58. package/dist/layout/layout.js +54 -48
  59. package/dist/locale/ar_EG.js +18 -4
  60. package/dist/locale/az_AZ.js +2 -1
  61. package/dist/locale/bg_BG.js +44 -3
  62. package/dist/locale/bn_BD.js +20 -4
  63. package/dist/locale/by_BY.js +17 -3
  64. package/dist/locale/ca_ES.js +22 -4
  65. package/dist/locale/cs_CZ.js +6 -3
  66. package/dist/locale/da_DK.js +34 -3
  67. package/dist/locale/de_DE.js +14 -4
  68. package/dist/locale/el_GR.js +4 -2
  69. package/dist/locale/en_GB.js +6 -3
  70. package/dist/locale/en_US.js +2 -1
  71. package/dist/locale/es_ES.js +17 -3
  72. package/dist/locale/et_EE.js +17 -3
  73. package/dist/locale/eu_ES.js +8 -4
  74. package/dist/locale/fa_IR.js +2 -1
  75. package/dist/locale/fi_FI.js +35 -4
  76. package/dist/locale/fr_BE.js +20 -3
  77. package/dist/locale/fr_CA.js +20 -3
  78. package/dist/locale/fr_FR.js +20 -3
  79. package/dist/locale/ga_IE.js +24 -5
  80. package/dist/locale/gl_ES.js +36 -5
  81. package/dist/locale/he_IL.js +30 -5
  82. package/dist/locale/hi_IN.js +20 -4
  83. package/dist/locale/hr_HR.js +21 -4
  84. package/dist/locale/hu_HU.js +43 -3
  85. package/dist/locale/hy_AM.js +33 -4
  86. package/dist/locale/id_ID.js +2 -1
  87. package/dist/locale/is_IS.js +44 -3
  88. package/dist/locale/it_IT.js +6 -3
  89. package/dist/locale/ja_JP.js +2 -1
  90. package/dist/locale/ka_GE.js +20 -4
  91. package/dist/locale/kk_KZ.js +22 -5
  92. package/dist/locale/km_KH.js +35 -4
  93. package/dist/locale/kmr_IQ.js +45 -4
  94. package/dist/locale/kn_IN.js +18 -3
  95. package/dist/locale/ko_KR.js +8 -4
  96. package/dist/locale/ku_IQ.js +45 -4
  97. package/dist/locale/lt_LT.js +8 -4
  98. package/dist/locale/lv_LV.js +45 -4
  99. package/dist/locale/mk_MK.js +36 -4
  100. package/dist/locale/ml_IN.js +20 -4
  101. package/dist/locale/mn_MN.js +17 -3
  102. package/dist/locale/mr_IN.js +13 -1
  103. package/dist/locale/ms_MY.js +8 -4
  104. package/dist/locale/my_MM.js +18 -5
  105. package/dist/locale/ne_NP.js +2 -1
  106. package/dist/locale/nl_BE.js +20 -4
  107. package/dist/locale/nl_NL.js +20 -4
  108. package/dist/locale/pl_PL.js +17 -3
  109. package/dist/locale/pt_BR.js +6 -3
  110. package/dist/locale/pt_PT.js +2 -1
  111. package/dist/locale/ro_RO.js +20 -4
  112. package/dist/locale/ru_RU.js +4 -2
  113. package/dist/locale/si_LK.js +17 -3
  114. package/dist/locale/sk_SK.js +17 -3
  115. package/dist/locale/sl_SI.js +45 -4
  116. package/dist/locale/sr_RS.js +20 -4
  117. package/dist/locale/sv_SE.js +14 -4
  118. package/dist/locale/ta_IN.js +23 -5
  119. package/dist/locale/th_TH.js +2 -1
  120. package/dist/locale/tk_TK.js +21 -5
  121. package/dist/locale/tr_TR.js +17 -2
  122. package/dist/locale/uk_UA.js +12 -3
  123. package/dist/locale/ur_PK.js +20 -4
  124. package/dist/locale/uz_UZ.js +14 -4
  125. package/dist/locale/vi_VN.js +2 -1
  126. package/dist/locale/zh_CN.js +2 -1
  127. package/dist/locale/zh_HK.js +4 -2
  128. package/dist/locale/zh_TW.js +4 -2
  129. package/dist/masonry/Masonry.d.ts +18 -10
  130. package/dist/masonry/MasonryItem.d.ts +2 -2
  131. package/dist/mentions/index.d.ts +4 -4
  132. package/dist/mentions/index.js +62 -1
  133. package/dist/menu/MenuItem.d.ts +3 -3
  134. package/dist/menu/MenuItem.js +1 -1
  135. package/dist/menu/MenuItemGroup.d.ts +2 -2
  136. package/dist/menu/OverrideContext.d.ts +2 -2
  137. package/dist/menu/SubMenu.d.ts +2 -2
  138. package/dist/message/PureList.d.ts +3 -1
  139. package/dist/message/PureList.js +4 -0
  140. package/dist/message/interface.d.ts +3 -3
  141. package/dist/modal/ConfirmDialog.d.ts +5 -1
  142. package/dist/modal/ConfirmDialog.js +40 -19
  143. package/dist/modal/Modal.d.ts +12 -3
  144. package/dist/modal/Modal.js +24 -7
  145. package/dist/modal/interface.d.ts +14 -14
  146. package/dist/notification/PureList.d.ts +3 -1
  147. package/dist/notification/PureList.js +4 -0
  148. package/dist/notification/interface.d.ts +8 -8
  149. package/dist/notification/util.d.ts +2 -2
  150. package/dist/package.js +1 -1
  151. package/dist/pagination/Pagination.js +1 -1
  152. package/dist/pagination/interface.d.ts +7 -7
  153. package/dist/pagination/style/index.js +1 -1
  154. package/dist/popconfirm/index.d.ts +6 -6
  155. package/dist/popover/index.d.ts +4 -4
  156. package/dist/radio/radio.js +4 -4
  157. package/dist/radio/radioButton.js +4 -4
  158. package/dist/result/index.d.ts +5 -5
  159. package/dist/segmented/index.d.ts +38 -20
  160. package/dist/segmented/index.js +5 -10
  161. package/dist/select/index.d.ts +4 -4
  162. package/dist/select/style/select-input-customize.js +1 -0
  163. package/dist/slider/index.js +1 -1
  164. package/dist/space/Compact.d.ts +1 -1
  165. package/dist/space/index.d.ts +2 -2
  166. package/dist/spin/index.d.ts +5 -5
  167. package/dist/splitter/SplitBar.js +12 -1
  168. package/dist/splitter/interface.d.ts +6 -6
  169. package/dist/statistic/Statistic.d.ts +4 -4
  170. package/dist/steps/index.d.ts +6 -6
  171. package/dist/style/motion/util.js +2 -2
  172. package/dist/switch/index.d.ts +4 -4
  173. package/dist/switch/index.js +7 -7
  174. package/dist/switch/style/index.js +3 -1
  175. package/dist/table/InternalTable.js +8 -25
  176. package/dist/table/Table.d.ts +20 -9
  177. package/dist/table/hooks/useColumnTitleProps.d.ts +8 -0
  178. package/dist/table/hooks/useColumnTitleProps.js +16 -0
  179. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -1
  180. package/dist/table/hooks/useSpinProps.d.ts +7 -0
  181. package/dist/table/hooks/useSpinProps.js +14 -0
  182. package/dist/table/util.d.ts +5 -2
  183. package/dist/table/util.js +10 -1
  184. package/dist/tabs/index.d.ts +5 -5
  185. package/dist/tag/CheckableTag.d.ts +2 -2
  186. package/dist/tag/index.d.ts +3 -3
  187. package/dist/time-picker/index.d.ts +2 -2
  188. package/dist/time-picker/index.js +211 -19
  189. package/dist/timeline/Timeline.d.ts +9 -9
  190. package/dist/tooltip/PurePanel.js +1 -1
  191. package/dist/tooltip/index.d.ts +3 -3
  192. package/dist/tour/interface.d.ts +4 -4
  193. package/dist/transfer/Actions.d.ts +2 -2
  194. package/dist/transfer/Transfer.d.ts +2 -2
  195. package/dist/transfer/index.d.ts +27 -6
  196. package/dist/transfer/interface.d.ts +17 -17
  197. package/dist/transfer/search.d.ts +2 -2
  198. package/dist/tree/Tree.d.ts +6 -6
  199. package/dist/tree-select/index.d.ts +57 -28
  200. package/dist/tree-select/index.js +4 -3
  201. package/dist/typography/Base/Ellipsis.d.ts +2 -2
  202. package/dist/typography/Editable.d.ts +2 -2
  203. package/dist/typography/interface.d.ts +8 -8
  204. package/dist/upload/UploadList/index.js +1 -1
  205. package/package.json +10 -10
  206. package/web-tags.json +1674 -1662
  207. package/web-types.json +4801 -4762
@@ -20,6 +20,7 @@ const genSelectInputCustomizeStyle = (token) => {
20
20
  padding: 0,
21
21
  "&-value": { display: "none" }
22
22
  },
23
+ [`&${componentCls}-filled ${componentCls}-content`]: { [`${antCls}-input-filled`]: transparentBackground },
23
24
  [`&${componentCls}-disabled ${componentCls}-content`]: {
24
25
  [disabledCustomizedInputSelector]: transparentBackground,
25
26
  "input[disabled], textarea[disabled]": transparentBackground
@@ -10,7 +10,7 @@ import useRafLock from "./useRafLock.js";
10
10
  import { cloneVNode, computed, createVNode, defineComponent, isVNode, mergeProps, onMounted, onUnmounted, shallowRef } from "vue";
11
11
  import { clsx } from "@v-c/util";
12
12
  import raf from "@v-c/util/dist/raf";
13
- import { omit } from "es-toolkit";
13
+ import { omit } from "es-toolkit/compat";
14
14
  import VcSlider from "@v-c/slider";
15
15
  //#region src/slider/index.tsx
16
16
  function _isSlot(s) {
@@ -19,7 +19,7 @@ interface SpaceCompactItemContextType {
19
19
  declare function useSpaceCompactItemContext(): Ref<SpaceCompactItemContextType | null, SpaceCompactItemContextType | null>;
20
20
  declare function useCompactItemContext(prefixCls: Ref<string>, direction: Ref<DirectionType>): {
21
21
  compactSize: import("vue").ComputedRef<SizeType>;
22
- compactDirection: import("vue").ComputedRef<"vertical" | "horizontal" | undefined>;
22
+ compactDirection: import("vue").ComputedRef<"horizontal" | "vertical" | undefined>;
23
23
  compactItemClassnames: import("vue").ComputedRef<string>;
24
24
  };
25
25
  declare const NoCompactStyle: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
@@ -1,4 +1,4 @@
1
- import { EmptyEmit, VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { EmptyEmit, VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { Orientation } from "../_util/hooks/useOrientation.js";
4
4
  import { SizeType } from "../config-provider/SizeContext.js";
@@ -29,7 +29,7 @@ interface SpaceProps extends ComponentBaseProps {
29
29
  orientation?: Orientation;
30
30
  vertical?: boolean;
31
31
  align?: 'start' | 'end' | 'center' | 'baseline';
32
- separator?: VueNode$1;
32
+ separator?: VueNode;
33
33
  wrap?: boolean;
34
34
  classes?: SpaceClassNamesType;
35
35
  styles?: SpaceStylesType;
@@ -1,4 +1,4 @@
1
- import { EmptyEmit, VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { EmptyEmit, VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { SizeType } from "../config-provider/SizeContext.js";
4
4
  import { ComponentBaseProps } from "../config-provider/context.js";
@@ -39,15 +39,15 @@ interface SpinProps extends ComponentBaseProps {
39
39
  size?: SizeType | 'default';
40
40
  /** Customize description content when Spin has children */
41
41
  /** @deprecated Please use `description` instead */
42
- tip?: VueNode$1;
43
- description?: VueNode$1;
42
+ tip?: VueNode;
43
+ description?: VueNode;
44
44
  /** Specifies a delay in milliseconds for loading state (prevent flush) */
45
45
  delay?: number;
46
46
  /** The className of wrapper when Spin has children */
47
47
  /** @deprecated Please use `classes.root` instead */
48
48
  wrapperClassName?: string;
49
49
  /** React node of the spinning indicator */
50
- indicator?: VueNode$1;
50
+ indicator?: VueNode;
51
51
  /** Display a backdrop with the `Spin` component */
52
52
  fullscreen?: boolean;
53
53
  percent?: number | 'auto';
@@ -63,7 +63,7 @@ interface SpinSlots {
63
63
  }
64
64
  declare const Spin: import("vue").DefineSetupFnComponent<SpinProps, EmptyEmit, SlotsType<SpinSlots>, SpinProps, import("vue").PublicProps>;
65
65
  declare const _default: typeof Spin & {
66
- setDefaultIndicator: (indicator: VueNode$1) => void;
66
+ setDefaultIndicator: (indicator: VueNode) => void;
67
67
  };
68
68
  //#endregion
69
69
  export { SpinClassNamesType, SpinProps, SpinSemanticClassNames, SpinSemanticName, SpinSemanticStyles, SpinSlots, SpinStylesType, _default as default };
@@ -215,7 +215,18 @@ const SplitBar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
215
215
  type: Boolean,
216
216
  required: true
217
217
  },
218
- draggerIcon: { required: false },
218
+ draggerIcon: {
219
+ type: [
220
+ Function,
221
+ String,
222
+ Number,
223
+ null,
224
+ Object,
225
+ Boolean
226
+ ],
227
+ required: false,
228
+ default: void 0
229
+ },
219
230
  collapsibleIcon: {
220
231
  type: Object,
221
232
  required: false
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { Orientation } from "../_util/hooks/useOrientation.js";
4
4
  import { ShowCollapsibleIconMode } from "./SplitBar.js";
@@ -44,22 +44,22 @@ interface SplitterProps extends ComponentBaseProps {
44
44
  layout?: Orientation;
45
45
  orientation?: Orientation;
46
46
  vertical?: boolean;
47
- draggerIcon?: VueNode$1;
47
+ draggerIcon?: VueNode;
48
48
  /**
49
49
  * Collapse configuration. ant-design 6.4.0 PR #57044.
50
50
  */
51
51
  collapsible?: {
52
52
  icon?: {
53
- start?: VueNode$1;
54
- end?: VueNode$1;
53
+ start?: VueNode;
54
+ end?: VueNode;
55
55
  };
56
56
  };
57
57
  /**
58
58
  * @deprecated please use `collapsible.icon`
59
59
  */
60
60
  collapsibleIcon?: {
61
- start?: VueNode$1;
62
- end?: VueNode$1;
61
+ start?: VueNode;
62
+ end?: VueNode;
63
63
  };
64
64
  onDraggerDoubleClick?: (index: number) => void;
65
65
  onResizeStart?: (sizes: number[]) => void;
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { FormatConfig, valueType } from "./utils.js";
4
4
  import { ComponentBaseProps } from "../config-provider/context.js";
@@ -30,9 +30,9 @@ type StatisticRectProps = FormatConfig & ComponentBaseProps & {
30
30
  value?: valueType;
31
31
  valueStyle?: CSSProperties;
32
32
  valueRender?: (node: any) => VNodeChild;
33
- title?: VueNode$1;
34
- prefix?: VueNode$1;
35
- suffix?: VueNode$1;
33
+ title?: VueNode;
34
+ prefix?: VueNode;
35
+ suffix?: VueNode;
36
36
  loading?: boolean;
37
37
  classes?: StatisticClassNamesType;
38
38
  styles?: StatisticStylesType;
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { SizeType } from "../config-provider/SizeContext.js";
4
4
  import { CSSProperties, SlotsType } from "vue";
@@ -44,14 +44,14 @@ interface StepItem {
44
44
  classes?: NonNullable<StepsProps$1['items']>[number]['classNames'];
45
45
  styles?: NonNullable<StepsProps$1['items']>[number]['styles'];
46
46
  /** @deprecated Please use `content` instead */
47
- description?: VueNode$1;
48
- content?: VueNode$1;
49
- icon?: VueNode$1;
47
+ description?: VueNode;
48
+ content?: VueNode;
49
+ icon?: VueNode;
50
50
  onClick?: (e: MouseEvent) => void;
51
51
  status?: 'wait' | 'process' | 'finish' | 'error';
52
52
  disabled?: boolean;
53
- title?: VueNode$1;
54
- subTitle?: VueNode$1;
53
+ title?: VueNode;
54
+ subTitle?: VueNode;
55
55
  }
56
56
  type ProgressDotRender = (params: {
57
57
  iconDot: any;
@@ -1,9 +1,9 @@
1
1
  //#region src/style/motion/util.ts
2
2
  function genNoMotionStyle() {
3
- return { "@media (prefers-reduced-motion: reduce)": {
3
+ return { "@media (prefers-reduced-motion: reduce)": { "&, &::before, &::after": {
4
4
  transition: "none",
5
5
  animation: "none"
6
- } };
6
+ } } };
7
7
  }
8
8
  //#endregion
9
9
  export { genNoMotionStyle };
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { SizeType } from "../config-provider/SizeContext.js";
4
4
  import { ComponentBaseProps } from "../config-provider/context.js";
@@ -20,7 +20,7 @@ interface SwitchSemanticStyles {
20
20
  }
21
21
  type SwitchClassNamesType = SemanticClassNamesType<SwitchProps, SwitchSemanticClassNames>;
22
22
  type SwitchStylesType = SemanticStylesType<SwitchProps, SwitchSemanticStyles>;
23
- type CheckedValueType = string | number | boolean | object;
23
+ type CheckedValueType = boolean | string | number | object;
24
24
  interface SwitchProps extends ComponentBaseProps, SwitchEmitsProps {
25
25
  size?: SwitchSize;
26
26
  checked?: CheckedValueType;
@@ -43,8 +43,8 @@ interface SwitchProps extends ComponentBaseProps, SwitchEmitsProps {
43
43
  * 非选中时的值
44
44
  */
45
45
  unCheckedValue?: CheckedValueType;
46
- checkedChildren?: VueNode$1;
47
- unCheckedChildren?: VueNode$1;
46
+ checkedChildren?: VueNode;
47
+ unCheckedChildren?: VueNode;
48
48
  disabled?: boolean;
49
49
  loading?: boolean;
50
50
  autoFocus?: boolean;
@@ -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";
13
+ import { omit } from "es-toolkit/compat";
14
14
  import VcSwitch from "@v-c/switch";
15
15
  //#region src/switch/index.tsx
16
16
  const keys = [
@@ -114,9 +114,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
114
114
  },
115
115
  checked: {
116
116
  type: [
117
+ Boolean,
117
118
  String,
118
119
  Number,
119
- Boolean,
120
120
  Object
121
121
  ],
122
122
  required: false,
@@ -124,9 +124,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
124
124
  },
125
125
  defaultChecked: {
126
126
  type: [
127
+ Boolean,
127
128
  String,
128
129
  Number,
129
- Boolean,
130
130
  Object
131
131
  ],
132
132
  required: false,
@@ -134,9 +134,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
134
134
  },
135
135
  value: {
136
136
  type: [
137
+ Boolean,
137
138
  String,
138
139
  Number,
139
- Boolean,
140
140
  Object
141
141
  ],
142
142
  required: false,
@@ -144,9 +144,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
144
144
  },
145
145
  defaultValue: {
146
146
  type: [
147
+ Boolean,
147
148
  String,
148
149
  Number,
149
- Boolean,
150
150
  Object
151
151
  ],
152
152
  required: false,
@@ -154,9 +154,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
154
154
  },
155
155
  checkedValue: {
156
156
  type: [
157
+ Boolean,
157
158
  String,
158
159
  Number,
159
- Boolean,
160
160
  Object
161
161
  ],
162
162
  required: false,
@@ -164,9 +164,9 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
164
164
  },
165
165
  unCheckedValue: {
166
166
  type: [
167
+ Boolean,
167
168
  String,
168
169
  Number,
169
- Boolean,
170
170
  Object
171
171
  ],
172
172
  required: false,
@@ -130,7 +130,9 @@ const genSwitchInnerStyle = (token) => {
130
130
  transition: [`padding-inline-start`, `padding-inline-end`].map((prop) => `${prop} ${switchDuration} ease-in-out`).join(", "),
131
131
  ...genNoMotionStyle(),
132
132
  [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
133
- display: "block",
133
+ display: "flex",
134
+ alignItems: "center",
135
+ justifyContent: "center",
134
136
  color: token.colorTextLightSolid,
135
137
  fontSize: token.fontSizeSM,
136
138
  pointerEvents: "none",
@@ -16,12 +16,15 @@ import Spin from "../spin/index.js";
16
16
  import pagination_default from "../pagination/index.js";
17
17
  import useSelection from "./hooks/useSelection.js";
18
18
  import renderExpandIcon from "./ExpandIcon.js";
19
+ import useColumnTitleProps from "./hooks/useColumnTitleProps.js";
19
20
  import useContainerWidth from "./hooks/useContainerWidth.js";
20
21
  import useFilledColumns from "./hooks/useFilledColumns.js";
22
+ import { getPaginationSize, normalizePlacement } from "./util.js";
21
23
  import useFilter, { collectFilterStates, generateFilterInfo, getFilterData, getMergedFilterStates } from "./hooks/useFilter/index.js";
22
24
  import useLazyKVMap from "./hooks/useLazyKVMap.js";
23
25
  import usePagination, { getPaginationParam } from "./hooks/usePagination.js";
24
26
  import useSorter, { getSortData } from "./hooks/useSorter.js";
27
+ import useSpinProps from "./hooks/useSpinProps.js";
25
28
  import useTitleColumns from "./hooks/useTitleColumns.js";
26
29
  import style_default from "./style/index.js";
27
30
  import { convertColumnsToColumnProps } from "./utils.js";
@@ -261,13 +264,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
261
264
  return rootRef.value;
262
265
  }
263
266
  });
264
- const spinProps = computed(() => {
265
- if (typeof props.loading === "boolean") return { spinning: props.loading };
266
- if (typeof props.loading === "object" && props.loading !== null) return {
267
- spinning: true,
268
- ...props.loading
269
- };
270
- });
267
+ const spinProps = useSpinProps(computed(() => props.loading));
271
268
  const mergedVirtual = computed(() => props.virtual ?? contextVirtual.value);
272
269
  const TableComponent = computed(() => mergedVirtual.value ? VirtualTable : VcTable);
273
270
  const listItemHeight = computed(() => {
@@ -295,18 +292,9 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
295
292
  }
296
293
  return node;
297
294
  };
295
+ const columnTitleProps = useColumnTitleProps(sorterTitleProps, filters);
298
296
  return () => {
299
- const columnTitlePropsFn = () => {
300
- const mergedFilters = {};
301
- Object.keys(filters.value).forEach((filterKey) => {
302
- if (filters.value[filterKey] !== null) mergedFilters[filterKey] = filters.value[filterKey];
303
- });
304
- return {
305
- ...sorterTitleProps.value,
306
- filters: mergedFilters
307
- };
308
- };
309
- const [transformTitleColumns] = useTitleColumns(columnTitlePropsFn());
297
+ const [transformTitleColumns] = useTitleColumns(columnTitleProps.value);
310
298
  const renderExpandedRow = slots.expandedRowRender ? (record, index, indent, expanded) => getSlotPropsFnRun(slots, props, "expandedRowRender", true, {
311
299
  record,
312
300
  index,
@@ -355,8 +343,8 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
355
343
  const renderPagination = (placement = "end") => createVNode(pagination_default, mergeProps(mergedPagination.value, {
356
344
  "classes": mergedClassNames.value.pagination,
357
345
  "styles": mergedStyles.value.pagination,
358
- "class": clsx(`${prefixCls.value}-pagination ${prefixCls.value}-pagination-${placement}`, mergedPagination.value.class, mergedPagination.value.className),
359
- "size": mergedPagination.value.size || (mergedSize.value === "small" || mergedSize.value === "middle" || mergedSize.value === "medium" ? "small" : void 0)
346
+ "class": clsx(`${prefixCls.value}-pagination`, `${prefixCls.value}-pagination-${placement}`, mergedPagination.value.class, mergedPagination.value.className),
347
+ "size": getPaginationSize(mergedPagination.value.size, mergedSize.value)
360
348
  }), null);
361
349
  const paginationNodes = (() => {
362
350
  if (props.pagination === false || !mergedPagination.value.total) return {
@@ -367,11 +355,6 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
367
355
  let bottomPaginationNode = null;
368
356
  const { placement, position } = mergedPagination.value;
369
357
  const mergedPlacement = placement ?? position;
370
- const normalizePlacement = (pos) => {
371
- const lowerPos = pos.toLowerCase();
372
- if (lowerPos.includes("center")) return "center";
373
- return lowerPos.includes("left") || lowerPos.includes("start") ? "start" : "end";
374
- };
375
358
  if (Array.isArray(mergedPlacement)) {
376
359
  const [topPos, bottomPos] = ["top", "bottom"].map((dir) => mergedPlacement.find((p) => p.includes(dir)));
377
360
  const isDisable = mergedPlacement.every((p) => `${p}` === "none");
@@ -3,21 +3,32 @@ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } fro
3
3
  import { TableEmits, TableExpose, TableProps as TableProps$1, TableSlots } from "./InternalTable.js";
4
4
  import Column from "./Column.js";
5
5
  import ColumnGroup from "./ColumnGroup.js";
6
+ import { PublicProps } from "vue";
6
7
  import { EXPAND_COLUMN, Summary } from "@v-c/table";
7
8
 
8
9
  //#region src/table/Table.d.ts
9
10
  type TableEmitsProps<RecordType = AnyObject> = { [K in keyof TableEmits<RecordType> as `on${Capitalize<string & K>}`]?: TableEmits<RecordType>[K] };
10
11
  interface InternalTableProps<RecordType = AnyObject> extends TableProps$1<RecordType>, TableEmitsProps<RecordType> {}
12
+ type TableInstance<RecordType = AnyObject> = {
13
+ $props: InternalTableProps<RecordType> & PublicProps;
14
+ $emit: {
15
+ (event: 'change', ...args: Parameters<TableEmits<RecordType>['change']>): void;
16
+ (event: 'update:expandedRowKeys', ...args: Parameters<TableEmits<RecordType>['update:expandedRowKeys']>): void;
17
+ (event: 'scroll', ...args: Parameters<TableEmits<RecordType>['scroll']>): void;
18
+ };
19
+ $slots: TableSlots<RecordType>;
20
+ } & TableExpose;
11
21
  interface ForwardTableType {
12
- new <RecordType = AnyObject>(props: InternalTableProps<RecordType>): {
13
- $props: InternalTableProps<RecordType>;
14
- $emit: {
15
- (event: 'change', ...args: Parameters<TableEmits<RecordType>['change']>): void;
16
- (event: 'update:expandedRowKeys', ...args: Parameters<TableEmits<RecordType>['update:expandedRowKeys']>): void;
17
- (event: 'scroll', ...args: Parameters<TableEmits<RecordType>['scroll']>): void;
18
- };
19
- $slots: TableSlots<RecordType>;
20
- } & TableExpose;
22
+ new <RecordType = AnyObject>(props: InternalTableProps<RecordType>): TableInstance<RecordType>;
23
+ /**
24
+ * Non-generic fallback signature. TypeScript infers from the last overload,
25
+ * so this keeps render-function usage like `h(Table, props)` resolvable
26
+ * against Vue's `Constructor<P>` overload of `h` (see #634), while the
27
+ * generic signature above still drives template/Volar inference.
28
+ * `any` (not `AnyObject`) because record callbacks are contravariant:
29
+ * `TableProps<DataType>` is not assignable to `TableProps<AnyObject>`.
30
+ */
31
+ new (props: InternalTableProps<any>): TableInstance<any>;
21
32
  displayName?: string;
22
33
  SELECTION_COLUMN: typeof SELECTION_COLUMN;
23
34
  EXPAND_COLUMN: typeof EXPAND_COLUMN;
@@ -0,0 +1,8 @@
1
+ import { AnyObject } from "../../_util/type.js";
2
+ import { ColumnTitleProps, FilterValue } from "../interface.js";
3
+ import { ComputedRef, Ref } from "vue";
4
+
5
+ //#region src/table/hooks/useColumnTitleProps.d.ts
6
+ declare function useColumnTitleProps<RecordType extends AnyObject = AnyObject>(sorterTitleProps: Ref<ColumnTitleProps<RecordType>>, filters: Ref<Record<string, FilterValue | null>>): ComputedRef<ColumnTitleProps<RecordType>>;
7
+ //#endregion
8
+ export { useColumnTitleProps as default };
@@ -0,0 +1,16 @@
1
+ import isNonNullable from "../../_util/isNonNullable.js";
2
+ import { computed } from "vue";
3
+ //#region src/table/hooks/useColumnTitleProps.ts
4
+ function getMergedFilters(filters) {
5
+ const mergedFilters = {};
6
+ for (const [key, value] of Object.entries(filters)) if (isNonNullable(value)) mergedFilters[key] = value;
7
+ return mergedFilters;
8
+ }
9
+ function useColumnTitleProps(sorterTitleProps, filters) {
10
+ return computed(() => ({
11
+ ...sorterTitleProps.value,
12
+ filters: getMergedFilters(filters.value)
13
+ }));
14
+ }
15
+ //#endregion
16
+ export { useColumnTitleProps as default };
@@ -108,7 +108,8 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
108
108
  const onSelectKeys = ({ selectedKeys }) => {
109
109
  setFilteredKeysSync(selectedKeys);
110
110
  };
111
- const onCheck = (keys, { node, checked }) => {
111
+ const onCheck = (keys, info) => {
112
+ const { node, checked } = info;
112
113
  if (!props.filterMultiple) onSelectKeys({ selectedKeys: checked && node.key ? [node.key] : [] });
113
114
  else onSelectKeys({ selectedKeys: keys });
114
115
  };
@@ -0,0 +1,7 @@
1
+ import { SpinProps } from "../../spin/index.js";
2
+ import { ComputedRef, Ref } from "vue";
3
+
4
+ //#region src/table/hooks/useSpinProps.d.ts
5
+ declare function useSpinProps(loading: Ref<boolean | SpinProps | undefined>): ComputedRef<SpinProps>;
6
+ //#endregion
7
+ export { useSpinProps as default };
@@ -0,0 +1,14 @@
1
+ import { computed } from "vue";
2
+ //#region src/table/hooks/useSpinProps.ts
3
+ function useSpinProps(loading) {
4
+ return computed(() => {
5
+ if (typeof loading.value === "boolean") return { spinning: loading.value };
6
+ if (typeof loading.value === "object" && loading.value !== null) return {
7
+ spinning: true,
8
+ ...loading.value
9
+ };
10
+ return {};
11
+ });
12
+ }
13
+ //#endregion
14
+ export { useSpinProps as default };
@@ -1,5 +1,6 @@
1
1
  import { AnyObject } from "../_util/type.js";
2
- import { ColumnTitle, ColumnTitleProps, ColumnType, Key } from "./interface.js";
2
+ import { SizeType } from "../config-provider/SizeContext.js";
3
+ import { ColumnTitle, ColumnTitleProps, ColumnType, Key, TablePaginationPlacement, TablePaginationPosition } from "./interface.js";
3
4
 
4
5
  //#region src/table/util.d.ts
5
6
  declare function getColumnKey<RecordType extends AnyObject = AnyObject>(column: ColumnType<RecordType>, defaultKey: string): Key;
@@ -11,5 +12,7 @@ declare function renderColumnTitle<RecordType extends AnyObject = AnyObject>(tit
11
12
  * Should filter [object Object]
12
13
  */
13
14
  declare function safeColumnTitle<RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>): any;
15
+ declare function normalizePlacement(pos: TablePaginationPlacement | TablePaginationPosition): "center" | "end" | "start";
16
+ declare function getPaginationSize(paginationSize: SizeType, mergedSize: SizeType): SizeType;
14
17
  //#endregion
15
- export { getColumnKey, getColumnPos, renderColumnTitle, safeColumnTitle };
18
+ export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
@@ -21,5 +21,14 @@ function safeColumnTitle(title, props) {
21
21
  if (Object.prototype.toString.call(res) === "[object Object]") return "";
22
22
  return res;
23
23
  }
24
+ function normalizePlacement(pos) {
25
+ const lowerPos = pos.toLowerCase();
26
+ if (lowerPos.includes("center")) return "center";
27
+ return lowerPos.includes("left") || lowerPos.includes("start") ? "start" : "end";
28
+ }
29
+ function getPaginationSize(paginationSize, mergedSize) {
30
+ if (paginationSize) return paginationSize;
31
+ if (mergedSize === "small" || mergedSize === "middle" || mergedSize === "medium") return "small";
32
+ }
24
33
  //#endregion
25
- export { getColumnKey, getColumnPos, renderColumnTitle, safeColumnTitle };
34
+ export { getColumnKey, getColumnPos, getPaginationSize, normalizePlacement, renderColumnTitle, safeColumnTitle };
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { SizeType } from "../config-provider/SizeContext.js";
4
4
  import TabPane, { TabPaneProps } from "./TabPane.js";
@@ -44,7 +44,7 @@ interface CompatibilityProps {
44
44
  destroyInactiveTabPane?: boolean;
45
45
  }
46
46
  interface Tab extends Omit<Tab$1, 'children' | 'className'> {
47
- content?: VueNode$1;
47
+ content?: VueNode;
48
48
  class?: string;
49
49
  }
50
50
  interface TabsRef {
@@ -79,10 +79,10 @@ interface TabsEmitsProps {
79
79
  'onUpdate:activeKey'?: TabsEmits['update:activeKey'];
80
80
  }
81
81
  interface TabsProps extends BaseTabsProps, CompatibilityProps, Omit<TabsProps$1, 'editable' | 'items' | 'classNames' | 'className' | 'popupClassName' | 'styles' | 'style' | 'onChange' | 'onTabScroll' | 'onTabClick' | 'renderTabBar'>, TabsEmitsProps {
82
- addIcon?: VueNode$1;
83
- moreIcon?: VueNode$1;
82
+ addIcon?: VueNode;
83
+ moreIcon?: VueNode;
84
84
  more?: MoreProps;
85
- removeIcon?: VueNode$1;
85
+ removeIcon?: VueNode;
86
86
  styles?: TabsStylesType;
87
87
  classes?: TabsClassNamesType;
88
88
  /** @deprecated Please use `classes.popup` instead */
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { ComponentBaseProps } from "../config-provider/context.js";
3
3
  import { SlotsType } from "vue";
4
4
 
@@ -13,7 +13,7 @@ interface CheckableTagProps extends ComponentBaseProps, CheckableTagEmitsProps {
13
13
  /**
14
14
  * @since 5.27.0
15
15
  */
16
- icon?: VueNode$1;
16
+ icon?: VueNode;
17
17
  disabled?: boolean;
18
18
  }
19
19
  interface CheckableTagEmits {
@@ -1,4 +1,4 @@
1
- import { VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { PresetColorType, PresetStatusColorType } from "../_util/colors.js";
4
4
  import { ClosableType } from "../_util/hooks/useClosable.js";
@@ -28,8 +28,8 @@ interface TagProps extends ComponentBaseProps, TagEmitsProps {
28
28
  color?: LiteralUnion<PresetColorType | PresetStatusColorType>;
29
29
  /** Advised to use closeIcon instead. */
30
30
  closable?: ClosableType;
31
- closeIcon?: VueNode$1;
32
- icon?: VueNode$1;
31
+ closeIcon?: VueNode;
32
+ icon?: VueNode;
33
33
  onClick?: (e: MouseEvent) => void;
34
34
  href?: string;
35
35
  target?: string;
@@ -1,4 +1,4 @@
1
- import { AnyObject, VueNode as VueNode$1 } from "../_util/type.js";
1
+ import { AnyObject, VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { InputStatus } from "../_util/statusUtils.js";
4
4
  import { PickerProps as PickerProps$1, RangePickerProps as RangePickerProps$1 } from "../date-picker/generatePicker/interface.js";
@@ -72,7 +72,7 @@ interface TimeRangePickerEmits<DateType = AnyObject> {
72
72
  declare const RangePicker$1: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>, {}, TimeRangePickerProps, import("vue").PublicProps>;
73
73
  type BaseTimePickerProps = Omit<PickerTimeProps<AnyObject>, 'picker' | 'classes' | 'styles' | 'onKeydown'>;
74
74
  interface TimePickerProps extends BaseTimePickerProps, Omit<TimePickerEmitsProps, keyof BaseTimePickerProps> {
75
- addon?: () => VueNode$1;
75
+ addon?: () => VueNode;
76
76
  status?: InputStatus;
77
77
  /** @deprecated Please use `classes.popup` instead */
78
78
  popupClassName?: string;