antdv-next 1.4.0 → 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 (211) hide show
  1. package/dist/_util/hooks/useClosable.d.ts +5 -5
  2. package/dist/_util/statusUtils.d.ts +1 -1
  3. package/dist/_util/vueNode.d.ts +2 -2
  4. package/dist/alert/Alert.d.ts +7 -7
  5. package/dist/antd-with-locales.esm.js +14139 -11606
  6. package/dist/antd-with-locales.js +79 -79
  7. package/dist/antd.css +1 -1
  8. package/dist/antd.esm.js +12465 -10979
  9. package/dist/antd.js +79 -79
  10. package/dist/auto-complete/index.d.ts +4 -4
  11. package/dist/avatar/Avatar.d.ts +3 -3
  12. package/dist/badge/Ribbon.d.ts +2 -2
  13. package/dist/badge/index.d.ts +3 -3
  14. package/dist/breadcrumb/Breadcrumb.d.ts +4 -4
  15. package/dist/breadcrumb/BreadcrumbItem.d.ts +4 -4
  16. package/dist/button/Button.d.ts +2 -2
  17. package/dist/button/style/index.js +13 -0
  18. package/dist/calendar/generateCalendar.d.ts +8 -8
  19. package/dist/card/Card.d.ts +9 -9
  20. package/dist/card/CardMeta.d.ts +4 -4
  21. package/dist/carousel/index.d.ts +3 -3
  22. package/dist/cascader/Panel.js +26 -2
  23. package/dist/cascader/index.d.ts +53 -21
  24. package/dist/cascader/index.js +33 -5
  25. package/dist/checkbox/Checkbox.d.ts +1 -1
  26. package/dist/checkbox/Checkbox.js +4 -4
  27. package/dist/checkbox/Group.d.ts +2 -2
  28. package/dist/collapse/Collapse.d.ts +3 -3
  29. package/dist/collapse/CollapsePanel.d.ts +3 -3
  30. package/dist/color-picker/hooks/useModeColor.d.ts +2 -2
  31. package/dist/color-picker/interface.d.ts +2 -2
  32. package/dist/config-provider/context.d.ts +20 -14
  33. package/dist/config-provider/index.d.ts +1 -1
  34. package/dist/config-provider/index.js +1 -1
  35. package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -2
  36. package/dist/date-picker/generatePicker/generateRangePicker.js +112 -10
  37. package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -2
  38. package/dist/date-picker/generatePicker/generateSinglePicker.js +101 -11
  39. package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
  40. package/dist/date-picker/util.d.ts +10 -1
  41. package/dist/descriptions/Item.d.ts +3 -3
  42. package/dist/descriptions/hooks/useItems.d.ts +11 -11
  43. package/dist/descriptions/index.d.ts +3 -3
  44. package/dist/descriptions/style/index.js +2 -3
  45. package/dist/drawer/DrawerPanel.d.ts +5 -5
  46. package/dist/empty/index.d.ts +3 -3
  47. package/dist/float-button/FloatButton.d.ts +5 -5
  48. package/dist/float-button/FloatButton.js +1 -1
  49. package/dist/float-button/FloatButtonGroup.d.ts +2 -2
  50. package/dist/form/ErrorList.d.ts +2 -2
  51. package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
  52. package/dist/image/index.d.ts +2 -2
  53. package/dist/input/Input.d.ts +5 -5
  54. package/dist/input/OTP/index.d.ts +2 -2
  55. package/dist/input/Password.d.ts +2 -2
  56. package/dist/input/Search.d.ts +3 -3
  57. package/dist/input/TextArea.js +1 -1
  58. package/dist/input/style/search.js +1 -0
  59. package/dist/input-number/index.d.ts +8 -8
  60. package/dist/input-number/index.js +0 -4
  61. package/dist/layout/layout.js +54 -48
  62. package/dist/locale/ar_EG.js +18 -4
  63. package/dist/locale/az_AZ.js +2 -1
  64. package/dist/locale/bg_BG.js +44 -3
  65. package/dist/locale/bn_BD.js +20 -4
  66. package/dist/locale/by_BY.js +17 -3
  67. package/dist/locale/ca_ES.js +22 -4
  68. package/dist/locale/cs_CZ.js +6 -3
  69. package/dist/locale/da_DK.js +34 -3
  70. package/dist/locale/de_DE.js +14 -4
  71. package/dist/locale/el_GR.js +4 -2
  72. package/dist/locale/en_GB.js +6 -3
  73. package/dist/locale/en_US.js +2 -1
  74. package/dist/locale/es_ES.js +17 -3
  75. package/dist/locale/et_EE.js +17 -3
  76. package/dist/locale/eu_ES.js +8 -4
  77. package/dist/locale/fa_IR.js +2 -1
  78. package/dist/locale/fi_FI.js +35 -4
  79. package/dist/locale/fr_BE.js +20 -3
  80. package/dist/locale/fr_CA.js +20 -3
  81. package/dist/locale/fr_FR.js +20 -3
  82. package/dist/locale/ga_IE.js +24 -5
  83. package/dist/locale/gl_ES.js +36 -5
  84. package/dist/locale/he_IL.js +30 -5
  85. package/dist/locale/hi_IN.js +20 -4
  86. package/dist/locale/hr_HR.js +21 -4
  87. package/dist/locale/hu_HU.js +43 -3
  88. package/dist/locale/hy_AM.js +33 -4
  89. package/dist/locale/id_ID.js +2 -1
  90. package/dist/locale/is_IS.js +44 -3
  91. package/dist/locale/it_IT.js +6 -3
  92. package/dist/locale/ja_JP.js +2 -1
  93. package/dist/locale/ka_GE.js +20 -4
  94. package/dist/locale/kk_KZ.js +22 -5
  95. package/dist/locale/km_KH.js +35 -4
  96. package/dist/locale/kmr_IQ.js +45 -4
  97. package/dist/locale/kn_IN.js +18 -3
  98. package/dist/locale/ko_KR.js +8 -4
  99. package/dist/locale/ku_IQ.js +45 -4
  100. package/dist/locale/lt_LT.js +8 -4
  101. package/dist/locale/lv_LV.js +45 -4
  102. package/dist/locale/mk_MK.js +36 -4
  103. package/dist/locale/ml_IN.js +20 -4
  104. package/dist/locale/mn_MN.js +17 -3
  105. package/dist/locale/mr_IN.js +13 -1
  106. package/dist/locale/ms_MY.js +8 -4
  107. package/dist/locale/my_MM.js +18 -5
  108. package/dist/locale/ne_NP.js +2 -1
  109. package/dist/locale/nl_BE.js +20 -4
  110. package/dist/locale/nl_NL.js +20 -4
  111. package/dist/locale/pl_PL.js +17 -3
  112. package/dist/locale/pt_BR.js +6 -3
  113. package/dist/locale/pt_PT.js +2 -1
  114. package/dist/locale/ro_RO.js +20 -4
  115. package/dist/locale/ru_RU.js +4 -2
  116. package/dist/locale/si_LK.js +17 -3
  117. package/dist/locale/sk_SK.js +17 -3
  118. package/dist/locale/sl_SI.js +45 -4
  119. package/dist/locale/sr_RS.js +20 -4
  120. package/dist/locale/sv_SE.js +14 -4
  121. package/dist/locale/ta_IN.js +23 -5
  122. package/dist/locale/th_TH.js +2 -1
  123. package/dist/locale/tk_TK.js +21 -5
  124. package/dist/locale/tr_TR.js +17 -2
  125. package/dist/locale/uk_UA.js +12 -3
  126. package/dist/locale/ur_PK.js +20 -4
  127. package/dist/locale/uz_UZ.js +14 -4
  128. package/dist/locale/vi_VN.js +2 -1
  129. package/dist/locale/zh_CN.js +2 -1
  130. package/dist/locale/zh_HK.js +4 -2
  131. package/dist/locale/zh_TW.js +4 -2
  132. package/dist/masonry/Masonry.d.ts +18 -10
  133. package/dist/masonry/Masonry.js +4 -4
  134. package/dist/masonry/MasonryItem.d.ts +2 -2
  135. package/dist/mentions/index.d.ts +4 -4
  136. package/dist/mentions/index.js +62 -1
  137. package/dist/menu/MenuItem.d.ts +3 -3
  138. package/dist/menu/MenuItem.js +1 -1
  139. package/dist/menu/MenuItemGroup.d.ts +2 -2
  140. package/dist/menu/OverrideContext.d.ts +2 -2
  141. package/dist/menu/SubMenu.d.ts +2 -2
  142. package/dist/message/PureList.d.ts +3 -1
  143. package/dist/message/PureList.js +4 -0
  144. package/dist/message/interface.d.ts +3 -3
  145. package/dist/modal/ConfirmDialog.d.ts +5 -1
  146. package/dist/modal/ConfirmDialog.js +40 -19
  147. package/dist/modal/Modal.d.ts +12 -3
  148. package/dist/modal/Modal.js +24 -7
  149. package/dist/modal/interface.d.ts +14 -14
  150. package/dist/notification/PureList.d.ts +3 -1
  151. package/dist/notification/PureList.js +4 -0
  152. package/dist/notification/interface.d.ts +8 -8
  153. package/dist/notification/util.d.ts +2 -2
  154. package/dist/package.js +1 -1
  155. package/dist/pagination/Pagination.js +1 -1
  156. package/dist/pagination/interface.d.ts +7 -7
  157. package/dist/pagination/style/index.js +1 -1
  158. package/dist/popconfirm/index.d.ts +6 -6
  159. package/dist/popover/index.d.ts +4 -4
  160. package/dist/radio/radio.js +4 -4
  161. package/dist/radio/radioButton.js +4 -4
  162. package/dist/result/index.d.ts +5 -5
  163. package/dist/segmented/index.d.ts +38 -20
  164. package/dist/segmented/index.js +5 -10
  165. package/dist/select/index.d.ts +4 -4
  166. package/dist/select/style/select-input-customize.js +1 -0
  167. package/dist/slider/index.js +1 -1
  168. package/dist/space/Compact.d.ts +1 -1
  169. package/dist/space/index.d.ts +2 -2
  170. package/dist/spin/index.d.ts +5 -5
  171. package/dist/splitter/SplitBar.js +12 -1
  172. package/dist/splitter/interface.d.ts +6 -6
  173. package/dist/statistic/Statistic.d.ts +4 -4
  174. package/dist/steps/index.d.ts +6 -6
  175. package/dist/style/motion/util.js +2 -2
  176. package/dist/switch/index.d.ts +4 -4
  177. package/dist/switch/index.js +7 -7
  178. package/dist/switch/style/index.js +3 -1
  179. package/dist/table/InternalTable.js +8 -25
  180. package/dist/table/Table.d.ts +20 -9
  181. package/dist/table/hooks/useColumnTitleProps.d.ts +8 -0
  182. package/dist/table/hooks/useColumnTitleProps.js +16 -0
  183. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -1
  184. package/dist/table/hooks/useSpinProps.d.ts +7 -0
  185. package/dist/table/hooks/useSpinProps.js +14 -0
  186. package/dist/table/util.d.ts +5 -2
  187. package/dist/table/util.js +10 -1
  188. package/dist/tabs/index.d.ts +5 -5
  189. package/dist/tag/CheckableTag.d.ts +2 -2
  190. package/dist/tag/index.d.ts +3 -3
  191. package/dist/time-picker/index.d.ts +2 -2
  192. package/dist/time-picker/index.js +211 -19
  193. package/dist/timeline/Timeline.d.ts +9 -9
  194. package/dist/tooltip/PurePanel.js +1 -1
  195. package/dist/tooltip/index.d.ts +3 -3
  196. package/dist/tour/interface.d.ts +4 -4
  197. package/dist/transfer/Actions.d.ts +2 -2
  198. package/dist/transfer/Transfer.d.ts +2 -2
  199. package/dist/transfer/index.d.ts +27 -6
  200. package/dist/transfer/interface.d.ts +17 -17
  201. package/dist/transfer/search.d.ts +2 -2
  202. package/dist/tree/Tree.d.ts +6 -6
  203. package/dist/tree-select/index.d.ts +57 -28
  204. package/dist/tree-select/index.js +4 -3
  205. package/dist/typography/Base/Ellipsis.d.ts +2 -2
  206. package/dist/typography/Editable.d.ts +2 -2
  207. package/dist/typography/interface.d.ts +8 -8
  208. package/dist/upload/UploadList/index.js +1 -1
  209. package/package.json +18 -18
  210. package/web-tags.json +1037 -1025
  211. package/web-types.json +3213 -3174
@@ -1,9 +1,9 @@
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 { SizeType } from "../config-provider/SizeContext.js";
5
5
  import { TooltipProps } from "../tooltip/index.js";
6
- import { App, CSSProperties, SlotsType } from "vue";
6
+ import { App, CSSProperties, PublicProps } from "vue";
7
7
  import { SegmentedLabeledOption as SegmentedLabeledOption$1, SegmentedProps as SegmentedProps$1, SegmentedRawOption, SegmentedValue } from "@v-c/segmented";
8
8
 
9
9
  //#region src/segmented/index.d.ts
@@ -27,15 +27,17 @@ interface SegmentedLabeledOptionWithoutIcon<ValueType = SegmentedValue> extends
27
27
  interface SegmentedLabeledOptionWithIcon<ValueType = SegmentedValue> extends Omit<SegmentedLabeledOption$1<ValueType>, 'label'> {
28
28
  label?: SegmentedLabeledOption$1['label'];
29
29
  /** Set icon for Segmented item */
30
- icon?: VueNode$1;
30
+ icon?: VueNode;
31
31
  tooltip?: string | TooltipProps;
32
32
  }
33
33
  type SegmentedLabeledOption<ValueType = SegmentedValue> = SegmentedLabeledOptionWithIcon<ValueType> | SegmentedLabeledOptionWithoutIcon<ValueType>;
34
34
  type SegmentedOptions<T = SegmentedRawOption> = (T | SegmentedLabeledOption<T>)[];
35
35
  type SegmentedClassNamesType = SemanticClassNamesType<SegmentedProps, SegmentedSemanticClassNames>;
36
36
  type SegmentedStylesType = SemanticStylesType<SegmentedProps, SegmentedSemanticStyles>;
37
- interface SegmentedProps extends Omit<SegmentedProps$1, 'size' | 'options' | 'itemRender' | 'styles' | 'classNames' | 'onChange'>, SegmentedEmitsProps {
38
- options: SegmentedOptions;
37
+ interface SegmentedProps<ValueType extends SegmentedValue = SegmentedValue> extends Omit<SegmentedProps$1, 'size' | 'options' | 'itemRender' | 'styles' | 'classNames' | 'onChange' | 'value' | 'defaultValue'>, SegmentedEmitsProps<ValueType> {
38
+ value?: ValueType;
39
+ defaultValue?: ValueType;
40
+ options: SegmentedOptions<ValueType>;
39
41
  rootClass?: string;
40
42
  /** Option to fit width to its parent's width */
41
43
  block?: boolean;
@@ -46,24 +48,40 @@ interface SegmentedProps extends Omit<SegmentedProps$1, 'size' | 'options' | 'it
46
48
  classes?: SegmentedClassNamesType;
47
49
  styles?: SegmentedStylesType;
48
50
  shape?: 'default' | 'round';
49
- iconRender?: (option: SegmentedLabeledOption) => any;
50
- labelRender?: (option: SegmentedLabeledOption) => any;
51
+ iconRender?: (option: SegmentedLabeledOption<ValueType>) => any;
52
+ labelRender?: (option: SegmentedLabeledOption<ValueType>) => any;
51
53
  }
52
- interface SegmentedEmits {
53
- 'change': (value: SegmentedValue) => void;
54
- 'update:value': (value: SegmentedValue) => void;
54
+ interface SegmentedEmits<ValueType extends SegmentedValue = SegmentedValue> {
55
+ 'change': (value: ValueType) => void;
56
+ 'update:value': (value: ValueType) => void;
55
57
  }
56
- interface SegmentedEmitsProps {
57
- onChange?: SegmentedEmits['change'];
58
- 'onUpdate:value'?: SegmentedEmits['update:value'];
58
+ interface SegmentedEmitsProps<ValueType extends SegmentedValue = SegmentedValue> {
59
+ onChange?: SegmentedEmits<ValueType>['change'];
60
+ 'onUpdate:value'?: SegmentedEmits<ValueType>['update:value'];
59
61
  }
60
- interface SegmentedSlots {
61
- iconRender: (option: SegmentedLabeledOption) => any;
62
- labelRender: (option: SegmentedLabeledOption) => any;
62
+ interface SegmentedSlots<ValueType extends SegmentedValue = SegmentedValue> {
63
+ iconRender: (option: SegmentedLabeledOption<ValueType>) => any;
64
+ labelRender: (option: SegmentedLabeledOption<ValueType>) => any;
63
65
  }
64
- declare const InternalSegmented: import("vue").DefineSetupFnComponent<SegmentedProps, SegmentedEmits, SlotsType<SegmentedSlots>, SegmentedProps, import("vue").PublicProps>;
65
- declare const Segmented: typeof InternalSegmented & {
66
+ interface SegmentedInstance<ValueType extends SegmentedValue = SegmentedValue> {
67
+ $props: SegmentedProps<ValueType> & PublicProps;
68
+ $emit: {
69
+ (event: 'change', value: ValueType): void;
70
+ (event: 'update:value', value: ValueType): void;
71
+ };
72
+ $slots: SegmentedSlots<ValueType>;
73
+ }
74
+ interface SegmentedConstructor {
75
+ new <ValueType extends SegmentedValue = SegmentedValue>(props: SegmentedProps<ValueType>): SegmentedInstance<ValueType>;
76
+ /**
77
+ * Non-generic fallback signature. TypeScript infers from the last overload,
78
+ * so this keeps render-function usage like `h(Segmented, props)` resolvable
79
+ * against Vue's `Constructor<P>` overload of `h` (see #634), while the
80
+ * generic signature above still drives template/Volar inference.
81
+ */
82
+ new (props: SegmentedProps<any>): SegmentedInstance<any>;
66
83
  install: (app: App) => void;
67
- };
84
+ }
85
+ declare const Segmented: SegmentedConstructor;
68
86
  //#endregion
69
- export { SegmentedClassNamesType, SegmentedEmits, SegmentedEmitsProps, SegmentedLabeledOption, SegmentedOptions, SegmentedProps, SegmentedSemanticClassNames, SegmentedSemanticName, SegmentedSemanticStyles, SegmentedSlots, SegmentedStylesType, Segmented as default };
87
+ export { SegmentedClassNamesType, SegmentedConstructor, SegmentedEmits, SegmentedEmitsProps, SegmentedLabeledOption, SegmentedOptions, SegmentedProps, SegmentedSemanticClassNames, SegmentedSemanticName, SegmentedSemanticStyles, SegmentedSlots, SegmentedStylesType, Segmented as default };
@@ -16,7 +16,7 @@ function _isSlot(s) {
16
16
  function isSegmentedLabeledOptionWithIcon(option, iconFromSlot) {
17
17
  return typeof option === "object" && !!(option?.icon || iconFromSlot?.length);
18
18
  }
19
- const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }) => {
19
+ const InternalSegmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }) => {
20
20
  const defaultName = useId();
21
21
  const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("segmented");
22
22
  const { classes, styles, size: customSize, orientation, vertical } = toPropsRefs$1(props, "classes", "styles", "size", "orientation", "vertical");
@@ -88,6 +88,8 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
88
88
  };
89
89
  }, {
90
90
  props: /*@__PURE__*/ mergeDefaults({
91
+ value: { required: false },
92
+ defaultValue: { required: false },
91
93
  options: {
92
94
  type: Array,
93
95
  required: true
@@ -134,14 +136,6 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
134
136
  type: Function,
135
137
  required: false
136
138
  },
137
- defaultValue: {
138
- type: [String, Number],
139
- required: false
140
- },
141
- value: {
142
- type: [String, Number],
143
- required: false
144
- },
145
139
  disabled: {
146
140
  type: Boolean,
147
141
  required: false,
@@ -171,8 +165,9 @@ const Segmented = /* @__PURE__ */ defineComponent((props, { attrs, emit, slots }
171
165
  name: "ASegmented",
172
166
  inheritAttrs: false
173
167
  });
168
+ const Segmented = InternalSegmented;
174
169
  Segmented.install = (app) => {
175
- app.component(Segmented.name, Segmented);
170
+ app.component(InternalSegmented.name, Segmented);
176
171
  };
177
172
  //#endregion
178
173
  export { Segmented as default };
@@ -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 { InputStatus } from "../_util/statusUtils.js";
@@ -12,12 +12,12 @@ type RawValue = string | number;
12
12
  interface LabeledValue {
13
13
  key?: string;
14
14
  value: RawValue;
15
- label: VueNode$1;
15
+ label: VueNode;
16
16
  }
17
17
  type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;
18
18
  interface InternalSelectProps extends ComponentBaseProps, Omit<SelectProps$1, 'mode' | 'classNames' | 'className' | 'style' | 'prefix' | 'styles'> {
19
- prefix?: VueNode$1;
20
- suffixIcon?: VueNode$1;
19
+ prefix?: VueNode;
20
+ suffixIcon?: VueNode;
21
21
  size?: SizeType;
22
22
  disabled?: boolean;
23
23
  mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE' | 'combobox';
@@ -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 };