antdv-next 1.6.0 → 1.7.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 (240) hide show
  1. package/dist/_util/ContextIsolator.js +12 -3
  2. package/dist/_util/hooks/useAllowClear.d.ts +22 -6
  3. package/dist/_util/hooks/useAllowClear.js +24 -6
  4. package/dist/_util/hooks/useClosable.js +1 -1
  5. package/dist/_util/statusUtils.d.ts +1 -1
  6. package/dist/_util/tools.d.ts +3 -1
  7. package/dist/_util/tools.js +6 -1
  8. package/dist/_util/vueNode.d.ts +6 -2
  9. package/dist/alert/Alert.js +4 -1
  10. package/dist/alert/style/index.d.ts +3 -3
  11. package/dist/alert/style/index.js +3 -3
  12. package/dist/antd-with-locales.esm.js +16773 -15780
  13. package/dist/antd-with-locales.js +78 -78
  14. package/dist/antd.css +1 -1
  15. package/dist/antd.esm.js +14353 -14003
  16. package/dist/antd.js +80 -80
  17. package/dist/auto-complete/index.js +1 -0
  18. package/dist/avatar/Avatar.js +2 -4
  19. package/dist/avatar/AvatarContext.d.ts +2 -2
  20. package/dist/border-beam/BorderBeam.d.ts +8 -1
  21. package/dist/border-beam/BorderBeam.js +28 -14
  22. package/dist/border-beam/index.d.ts +2 -2
  23. package/dist/breadcrumb/BreadcrumbItem.js +1 -1
  24. package/dist/card/style/index.js +2 -2
  25. package/dist/cascader/Panel.js +3 -3
  26. package/dist/cascader/index.js +12 -5
  27. package/dist/checkbox/Checkbox.js +6 -4
  28. package/dist/checkbox/Group.d.ts +19 -1
  29. package/dist/checkbox/Group.js +34 -5
  30. package/dist/checkbox/GroupContext.d.ts +3 -0
  31. package/dist/checkbox/index.d.ts +2 -2
  32. package/dist/color-picker/ColorPicker.js +1 -1
  33. package/dist/color-picker/style/input.js +1 -1
  34. package/dist/components.d.ts +1 -1
  35. package/dist/date-picker/generatePicker/generateRangePicker.js +20 -2
  36. package/dist/date-picker/generatePicker/generateSinglePicker.js +20 -2
  37. package/dist/date-picker/generatePicker/interface.d.ts +4 -0
  38. package/dist/date-picker/style/panel.js +1 -1
  39. package/dist/date-picker/style/util.js +1 -1
  40. package/dist/date-picker/util.d.ts +2 -0
  41. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  42. package/dist/descriptions/style/index.js +11 -13
  43. package/dist/divider/style/index.js +1 -1
  44. package/dist/drawer/DrawerPanel.js +1 -1
  45. package/dist/dropdown/dropdown.d.ts +2 -0
  46. package/dist/dropdown/dropdown.js +9 -2
  47. package/dist/dropdown/style/index.js +1 -1
  48. package/dist/form/ErrorList.js +1 -1
  49. package/dist/form/Form.js +1 -1
  50. package/dist/form/FormItem/ItemHolder.js +1 -1
  51. package/dist/form/FormItem/index.js +2 -2
  52. package/dist/form/FormItemInput.js +1 -1
  53. package/dist/form/FormItemLabel.js +1 -1
  54. package/dist/form/hooks/useVariant.js +1 -1
  55. package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
  56. package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
  57. package/dist/index.d.ts +1 -1
  58. package/dist/input/Group.js +1 -1
  59. package/dist/input/Input.d.ts +2 -1
  60. package/dist/input/Input.js +8 -5
  61. package/dist/input/OTP/OTPInput.d.ts +2 -1
  62. package/dist/input/OTP/OTPInput.js +12 -3
  63. package/dist/input/OTP/index.d.ts +3 -1
  64. package/dist/input/OTP/index.js +15 -6
  65. package/dist/input/Password.js +7 -5
  66. package/dist/input/Search.js +4 -2
  67. package/dist/input/TextArea.d.ts +3 -1
  68. package/dist/input/TextArea.js +13 -8
  69. package/dist/input/style/index.js +1 -1
  70. package/dist/input-number/index.d.ts +3 -6
  71. package/dist/input-number/index.js +8 -3
  72. package/dist/input-number/style/index.js +1 -5
  73. package/dist/listy/index.d.ts +1 -1
  74. package/dist/listy/index.js +9 -7
  75. package/dist/listy/interface.d.ts +6 -1
  76. package/dist/listy/style/index.js +4 -2
  77. package/dist/locale/ar_EG.js +9 -0
  78. package/dist/locale/az_AZ.js +9 -0
  79. package/dist/locale/bg_BG.js +9 -0
  80. package/dist/locale/bn_BD.js +9 -0
  81. package/dist/locale/by_BY.js +9 -0
  82. package/dist/locale/ca_ES.js +9 -0
  83. package/dist/locale/cs_CZ.js +9 -0
  84. package/dist/locale/da_DK.js +9 -0
  85. package/dist/locale/de_DE.js +9 -0
  86. package/dist/locale/el_GR.js +9 -0
  87. package/dist/locale/en_GB.js +11 -1
  88. package/dist/locale/en_US.js +11 -1
  89. package/dist/locale/es_ES.js +9 -0
  90. package/dist/locale/et_EE.js +9 -0
  91. package/dist/locale/eu_ES.js +9 -0
  92. package/dist/locale/fa_IR.js +9 -0
  93. package/dist/locale/fi_FI.js +10 -1
  94. package/dist/locale/fr_BE.js +9 -0
  95. package/dist/locale/fr_CA.js +9 -0
  96. package/dist/locale/fr_FR.js +9 -0
  97. package/dist/locale/ga_IE.js +9 -0
  98. package/dist/locale/gl_ES.js +9 -0
  99. package/dist/locale/he_IL.js +9 -0
  100. package/dist/locale/hi_IN.js +9 -0
  101. package/dist/locale/hr_HR.js +9 -0
  102. package/dist/locale/hu_HU.js +9 -0
  103. package/dist/locale/hy_AM.js +9 -0
  104. package/dist/locale/id_ID.js +9 -0
  105. package/dist/locale/index.d.ts +3 -0
  106. package/dist/locale/is_IS.js +9 -0
  107. package/dist/locale/it_IT.js +9 -0
  108. package/dist/locale/ja_JP.js +9 -0
  109. package/dist/locale/ka_GE.js +9 -0
  110. package/dist/locale/kk_KZ.js +9 -0
  111. package/dist/locale/km_KH.js +9 -0
  112. package/dist/locale/kmr_IQ.js +9 -0
  113. package/dist/locale/kn_IN.js +9 -0
  114. package/dist/locale/ko_KR.js +9 -0
  115. package/dist/locale/ku_IQ.js +9 -0
  116. package/dist/locale/lt_LT.js +9 -0
  117. package/dist/locale/lv_LV.js +9 -0
  118. package/dist/locale/mk_MK.js +9 -0
  119. package/dist/locale/ml_IN.js +9 -0
  120. package/dist/locale/mn_MN.js +9 -0
  121. package/dist/locale/mr_IN.js +9 -0
  122. package/dist/locale/ms_MY.js +9 -0
  123. package/dist/locale/my_MM.js +9 -0
  124. package/dist/locale/nb_NO.js +9 -0
  125. package/dist/locale/ne_NP.js +9 -0
  126. package/dist/locale/nl_BE.js +9 -0
  127. package/dist/locale/nl_NL.js +9 -0
  128. package/dist/locale/pl_PL.js +9 -0
  129. package/dist/locale/pt_BR.js +9 -0
  130. package/dist/locale/pt_PT.js +9 -0
  131. package/dist/locale/ro_RO.js +19 -10
  132. package/dist/locale/ru_RU.js +9 -0
  133. package/dist/locale/si_LK.js +9 -0
  134. package/dist/locale/sk_SK.js +9 -0
  135. package/dist/locale/sl_SI.js +9 -0
  136. package/dist/locale/sq_AL.js +9 -0
  137. package/dist/locale/sr_RS.js +9 -0
  138. package/dist/locale/sv_SE.js +9 -0
  139. package/dist/locale/ta_IN.js +10 -1
  140. package/dist/locale/th_TH.js +9 -0
  141. package/dist/locale/tk_TK.js +9 -0
  142. package/dist/locale/tr_TR.js +9 -0
  143. package/dist/locale/uk_UA.js +9 -0
  144. package/dist/locale/ur_PK.js +9 -0
  145. package/dist/locale/useLocale.d.ts +6 -1
  146. package/dist/locale/useLocale.js +12 -1
  147. package/dist/locale/uz_UZ.js +9 -0
  148. package/dist/locale/vi_VN.js +9 -0
  149. package/dist/locale/zh_CN.js +13 -3
  150. package/dist/locale/zh_HK.js +11 -1
  151. package/dist/locale/zh_TW.js +11 -1
  152. package/dist/masonry/Masonry.js +1 -1
  153. package/dist/mentions/index.d.ts +2 -3
  154. package/dist/mentions/index.js +9 -4
  155. package/dist/mentions/style/index.js +1 -1
  156. package/dist/menu/MenuContext.d.ts +2 -0
  157. package/dist/menu/MenuItem.js +23 -6
  158. package/dist/menu/index.js +5 -0
  159. package/dist/menu/menu.d.ts +3 -0
  160. package/dist/menu/menu.js +7 -0
  161. package/dist/modal/ConfirmDialog.js +14 -7
  162. package/dist/notification/PurePanel.js +7 -12
  163. package/dist/notification/interface.d.ts +8 -0
  164. package/dist/notification/style/index.js +1 -1
  165. package/dist/notification/style/placement.js +10 -7
  166. package/dist/notification/useNotification.js +5 -15
  167. package/dist/package.js +1 -1
  168. package/dist/pagination/Pagination.js +2 -2
  169. package/dist/pagination/useShowSizeChanger.d.ts +3 -0
  170. package/dist/pagination/useShowSizeChanger.js +1 -1
  171. package/dist/popconfirm/index.js +5 -5
  172. package/dist/popconfirm/style/index.js +1 -1
  173. package/dist/popover/index.js +1 -1
  174. package/dist/popover/style/index.js +2 -2
  175. package/dist/progress/Circle.js +0 -8
  176. package/dist/progress/Line.js +1 -9
  177. package/dist/progress/Steps.js +0 -8
  178. package/dist/progress/progress.js +2 -14
  179. package/dist/qrcode/index.js +4 -4
  180. package/dist/radio/group.js +40 -7
  181. package/dist/radio/index.d.ts +2 -2
  182. package/dist/radio/interface.d.ts +19 -1
  183. package/dist/radio/radio.js +5 -3
  184. package/dist/result/index.js +3 -3
  185. package/dist/result/noFound.js +120 -140
  186. package/dist/result/serverError.js +132 -147
  187. package/dist/result/unauthorized.js +115 -129
  188. package/dist/segmented/index.js +1 -1
  189. package/dist/select/index.js +10 -3
  190. package/dist/select/style/dropdown.js +1 -1
  191. package/dist/select/style/index.js +2 -2
  192. package/dist/select/style/select-input-multiple.js +1 -1
  193. package/dist/select/usePopupRender.js +4 -1
  194. package/dist/slider/index.d.ts +0 -3
  195. package/dist/slider/index.js +2 -2
  196. package/dist/splitter/SplitBar.js +9 -3
  197. package/dist/splitter/interface.d.ts +5 -1
  198. package/dist/steps/style/index.js +1 -1
  199. package/dist/steps/style/inline.js +1 -1
  200. package/dist/style/motion/collapse.js +4 -10
  201. package/dist/table/ExpandIcon.d.ts +9 -4
  202. package/dist/table/ExpandIcon.js +42 -20
  203. package/dist/table/InternalTable.js +21 -15
  204. package/dist/table/hooks/useLazyKVMap.js +1 -1
  205. package/dist/table/hooks/useSelection.js +54 -9
  206. package/dist/table/interface.d.ts +8 -0
  207. package/dist/table/style/index.js +1 -1
  208. package/dist/table/style/sorter.js +2 -2
  209. package/dist/tabs/index.js +9 -2
  210. package/dist/tabs/style/index.js +1 -1
  211. package/dist/time-picker/index.js +34 -0
  212. package/dist/timeline/Timeline.js +1 -1
  213. package/dist/tooltip/style/index.js +1 -1
  214. package/dist/tour/panelRender.js +3 -2
  215. package/dist/transfer/Section.js +2 -1
  216. package/dist/transfer/Transfer.js +1 -1
  217. package/dist/tree/style/index.js +1 -1
  218. package/dist/tree-select/index.js +14 -8
  219. package/dist/typography/Base/index.js +23 -2
  220. package/dist/typography/Link.js +5 -0
  221. package/dist/typography/Paragraph.js +5 -0
  222. package/dist/typography/Text.js +5 -0
  223. package/dist/typography/Title.js +5 -0
  224. package/dist/typography/hooks/useMergedConfig.js +1 -1
  225. package/dist/typography/interface.d.ts +8 -1
  226. package/dist/typography/style/index.js +2 -1
  227. package/dist/typography/style/mixins.d.ts +2 -1
  228. package/dist/typography/style/mixins.js +26 -3
  229. package/dist/upload/Upload.d.ts +1 -0
  230. package/dist/upload/Upload.js +10 -3
  231. package/dist/upload/UploadList/ListItem.js +8 -3
  232. package/dist/upload/interface.d.ts +1 -0
  233. package/dist/version/token-meta.json +1 -1
  234. package/dist/version/token.json +1 -1
  235. package/dist/watermark/index.js +1 -1
  236. package/package.json +9 -9
  237. package/web-tags.json +74 -14
  238. package/web-types.json +186 -22
  239. package/dist/_util/getAllowClear.d.ts +0 -6
  240. package/dist/_util/getAllowClear.js +0 -11
@@ -36,7 +36,7 @@ const genInlineStyle = (token) => {
36
36
  },
37
37
  "&-icon": { [`${itemCls}-icon-dot`]: { "&:after": { display: "none" } } },
38
38
  "&-title": {
39
- fontWeight: "normal",
39
+ fontWeight: 400,
40
40
  whiteSpace: "nowrap"
41
41
  },
42
42
  "&-content": { display: "none" }
@@ -1,16 +1,10 @@
1
1
  //#region src/style/motion/collapse.ts
2
2
  const genCollapseMotion = (token) => {
3
3
  const { componentCls, antCls, motionDurationMid, motionEaseInOut } = token;
4
- return { [componentCls]: {
5
- [`${antCls}-motion-collapse-legacy`]: {
6
- overflow: "hidden",
7
- "&-active": { transition: `${["height", "opacity"].map((prop) => `${prop} ${motionDurationMid} ${motionEaseInOut}`).join(", ")} !important` }
8
- },
9
- [`${antCls}-motion-collapse`]: {
10
- overflow: "hidden",
11
- transition: `${["height", "opacity"].map((prop) => `${prop} ${motionDurationMid} ${motionEaseInOut}`).join(", ")} !important`
12
- }
13
- } };
4
+ return { [componentCls]: { [`${antCls}-motion-collapse`]: {
5
+ overflow: "hidden",
6
+ transition: `${["height", "opacity"].map((prop) => `${prop} ${motionDurationMid} ${motionEaseInOut}`).join(", ")} !important`
7
+ } } };
14
8
  };
15
9
  //#endregion
16
10
  export { genCollapseMotion as default };
@@ -1,13 +1,18 @@
1
1
  import { AnyObject } from "../_util/type.js";
2
2
  import { TableLocale } from "./interface.js";
3
+ import { ExpandIconComponent } from "@v-c/table";
3
4
  //#region src/table/ExpandIcon.d.ts
4
- interface DefaultExpandIconProps<RecordType = AnyObject> {
5
+ type LegacyRenderExpandIcon<RecordType = AnyObject> = (props: {
5
6
  prefixCls: string;
6
7
  record: RecordType;
7
8
  expanded: boolean;
8
9
  expandable: boolean;
9
10
  onExpand: (record: RecordType, e: MouseEvent) => void;
10
- }
11
- declare function renderExpandIcon(locale: TableLocale): <RecordType extends AnyObject = AnyObject>(props: DefaultExpandIconProps<RecordType>) => import("vue/jsx-runtime").JSX.Element;
11
+ }) => any;
12
+ /**
13
+ * Create a stable expand icon component for `components.ExpandIcon`.
14
+ * Getters are read at render time so the component itself never changes identity.
15
+ */
16
+ declare function createExpandIcon<RecordType extends AnyObject = AnyObject>(getLocale: () => TableLocale, getExpandIcon: () => ExpandIconComponent<RecordType> | undefined, getLegacyRenderExpandIcons: () => (LegacyRenderExpandIcon<RecordType> | undefined)[]): ExpandIconComponent<RecordType>;
12
17
  //#endregion
13
- export { renderExpandIcon as default };
18
+ export { createExpandIcon as default };
@@ -1,25 +1,47 @@
1
- import { createVNode } from "vue";
1
+ import { createVNode, h } from "vue";
2
2
  import { clsx } from "@v-c/util";
3
3
  //#region src/table/ExpandIcon.tsx
4
- function renderExpandIcon(locale) {
5
- return (props) => {
6
- const { prefixCls, onExpand, record, expanded, expandable } = props;
7
- const iconPrefix = `${prefixCls}-row-expand-icon`;
8
- return createVNode("button", {
9
- "type": "button",
10
- "onClick": (e) => {
11
- onExpand(record, e);
12
- e.stopPropagation();
13
- },
14
- "class": clsx(iconPrefix, {
15
- [`${iconPrefix}-spaced`]: !expandable,
16
- [`${iconPrefix}-expanded`]: expandable && expanded,
17
- [`${iconPrefix}-collapsed`]: expandable && !expanded
18
- }),
19
- "aria-label": expanded ? locale.collapse : locale.expand,
20
- "aria-expanded": expanded
21
- }, null);
4
+ function renderInternalExpandIcon(props, locale) {
5
+ const { prefixCls, type, expanded, expandable, onClick } = props;
6
+ const iconPrefix = `${prefixCls}-row-expand-icon`;
7
+ if (type === "all" && !expandable) return createVNode("span", { "class": clsx(iconPrefix, `${iconPrefix}-spaced`) }, null);
8
+ const ariaLabel = type === "all" ? expanded ? locale.collapseAll : locale.expandAll : expanded ? locale.collapse : locale.expand;
9
+ return createVNode("button", {
10
+ "type": "button",
11
+ "onClick": onClick,
12
+ "class": clsx(iconPrefix, {
13
+ [`${iconPrefix}-spaced`]: !expandable,
14
+ [`${iconPrefix}-expanded`]: expandable && expanded,
15
+ [`${iconPrefix}-collapsed`]: expandable && !expanded
16
+ }),
17
+ "aria-label": ariaLabel,
18
+ "aria-expanded": expanded
19
+ }, null);
20
+ }
21
+ /**
22
+ * Create a stable expand icon component for `components.ExpandIcon`.
23
+ * Getters are read at render time so the component itself never changes identity.
24
+ */
25
+ function createExpandIcon(getLocale, getExpandIcon, getLegacyRenderExpandIcons) {
26
+ const MergedExpandIcon = (props) => {
27
+ const ExpandIcon = getExpandIcon();
28
+ if (ExpandIcon) return h(ExpandIcon, props);
29
+ const renderExpandIcon = getLegacyRenderExpandIcons().find(Boolean);
30
+ if (renderExpandIcon && props.type === "row") {
31
+ const { prefixCls, record, expanded, expandable, onClick } = props;
32
+ return renderExpandIcon({
33
+ prefixCls,
34
+ record,
35
+ expanded,
36
+ expandable,
37
+ onExpand: (_record, event) => onClick(event)
38
+ });
39
+ }
40
+ return renderInternalExpandIcon(props, getLocale());
22
41
  };
42
+ MergedExpandIcon.displayName = "TableExpandIcon";
43
+ MergedExpandIcon.inheritAttrs = false;
44
+ return MergedExpandIcon;
23
45
  }
24
46
  //#endregion
25
- export { renderExpandIcon as default };
47
+ export { createExpandIcon as default };
@@ -15,7 +15,7 @@ import useBreakpoint from "../grid/hooks/useBreakpoint.js";
15
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
- import renderExpandIcon from "./ExpandIcon.js";
18
+ import createExpandIcon from "./ExpandIcon.js";
19
19
  import useColumnTitleProps from "./hooks/useColumnTitleProps.js";
20
20
  import useContainerWidth from "./hooks/useContainerWidth.js";
21
21
  import useFilledColumns from "./hooks/useFilledColumns.js";
@@ -56,12 +56,13 @@ function resolvePanelRender(slots, props, key) {
56
56
  if (slots[key] || props[key]) return (data) => getSlotPropsFnRun(slots, props, key, true, data);
57
57
  }
58
58
  const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
59
- const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell, rowKey: contextRowKey, scroll: contextScroll, column: contextColumn } = useComponentBaseConfig("table", props, [
59
+ const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell, rowKey: contextRowKey, scroll: contextScroll, column: contextColumn, expandable: contextExpandable } = useComponentBaseConfig("table", props, [
60
60
  "bodyCell",
61
61
  "headerCell",
62
62
  "rowKey",
63
63
  "scroll",
64
- "column"
64
+ "column",
65
+ "expandable"
65
66
  ]);
66
67
  const configCtx = useConfig();
67
68
  const mergedScroll = computed(() => props.scroll ?? contextScroll.value);
@@ -71,17 +72,6 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
71
72
  ariaProps: ariaProps.value,
72
73
  component: props.components?.header?.table
73
74
  })));
74
- const mergedComponents = computed(() => {
75
- const components = props.components;
76
- if (!hasAriaProps.value) return components;
77
- return {
78
- ...components,
79
- header: {
80
- ...components?.header,
81
- table: HeaderTable
82
- }
83
- };
84
- });
85
75
  const { classes, styles } = toPropsRefs(props, "classes", "styles");
86
76
  const mergedSize = useSize(computed(() => props.size));
87
77
  const mergedProps = computed(() => {
@@ -322,16 +312,32 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
322
312
  if (renderExpandedRow || mergedExpandable.value.expandedRowRender) return "row";
323
313
  return null;
324
314
  });
315
+ if (isDev) devUseWarning("Table").deprecated(!props.expandable?.expandIcon, "expandable.expandIcon", "components.ExpandIcon");
316
+ const MergedExpandIcon = createExpandIcon(() => mergedLocale.value, () => props.components?.ExpandIcon, () => [mergedExpandable.value.expandIcon, contextExpandable.value?.expandIcon]);
325
317
  const mergedExpandableConfig = computed(() => {
326
318
  const expandable = { ...mergedExpandable.value };
327
319
  expandable.__PARENT_RENDER_ICON__ = expandable.expandIcon;
328
320
  if (renderExpandedRow) expandable.expandedRowRender = renderExpandedRow;
329
- expandable.expandIcon = expandable.expandIcon || renderExpandIcon(mergedLocale.value);
321
+ expandable.expandIcon = void 0;
330
322
  if (expandType.value === "nest" && expandable.expandIconColumnIndex === void 0) expandable.expandIconColumnIndex = mergedRowSelection.value ? 1 : 0;
331
323
  else if (expandType.value === "nest" && expandable.expandIconColumnIndex > 0 && mergedRowSelection.value) expandable.expandIconColumnIndex -= 1;
332
324
  if (typeof expandable.indentSize !== "number") expandable.indentSize = typeof props.indentSize === "number" ? props.indentSize : 15;
333
325
  return expandable;
334
326
  });
327
+ const mergedComponents = computed(() => {
328
+ let components = props.components;
329
+ if (hasAriaProps.value) components = {
330
+ ...components,
331
+ header: {
332
+ ...components?.header,
333
+ table: HeaderTable
334
+ }
335
+ };
336
+ return {
337
+ ...components,
338
+ ExpandIcon: MergedExpandIcon
339
+ };
340
+ });
335
341
  const measureRowRender = (measureRow) => createVNode(TableMeasureRowContextProvider, { "value": true }, { default: () => [createVNode(ConfigProvider, { "getPopupContainer": (node) => node }, _isSlot(measureRow) ? measureRow : { default: () => [measureRow] })] });
336
342
  const onInternalUpdateExpandedRowKeys = (keys) => emit("update:expandedRowKeys", keys);
337
343
  const onInternalResizeColumn = (width, column, columnKey) => emit("resizeColumn", width, column, columnKey);
@@ -6,7 +6,7 @@ function useLazyKVMap(data, childrenColumnName, getRowKey) {
6
6
  const mergedData = unref(data);
7
7
  const mergedChildrenColumnName = unref(childrenColumnName);
8
8
  const mergedGetRowKey = unref(getRowKey);
9
- if (!mapCacheRef.value || mapCacheRef.value.data !== mergedData || mapCacheRef.value.childrenColumnName !== mergedChildrenColumnName || mapCacheRef.value.getRowKey !== mergedGetRowKey) {
9
+ if (mapCacheRef.value.data !== mergedData || mapCacheRef.value.childrenColumnName !== mergedChildrenColumnName || mapCacheRef.value.getRowKey !== mergedGetRowKey) {
10
10
  const kvMap = /* @__PURE__ */ new Map();
11
11
  function dig(records) {
12
12
  records.forEach((record, index) => {
@@ -3,7 +3,7 @@ import { useMultipleSelect } from "../../_util/hooks/useMultipleSelect.js";
3
3
  import Dropdown from "../../dropdown/index.js";
4
4
  import radio_default from "../../radio/index.js";
5
5
  import checkbox_default from "../../checkbox/index.js";
6
- import { computed, createVNode, mergeProps, shallowRef, unref, watch } from "vue";
6
+ import { computed, createVNode, defineComponent, mergeProps, shallowRef, unref, watch } from "vue";
7
7
  import { clsx } from "@v-c/util";
8
8
  import { DownOutlined } from "@antdv-next/icons";
9
9
  import { INTERNAL_COL_DEFINE } from "@v-c/table";
@@ -14,6 +14,48 @@ const SELECTION_ALL = "SELECT_ALL";
14
14
  const SELECTION_INVERT = "SELECT_INVERT";
15
15
  const SELECTION_NONE = "SELECT_NONE";
16
16
  const EMPTY_LIST = [];
17
+ const SelectionMenu = /* @__PURE__ */ defineComponent((props, { emit }) => {
18
+ const open = shallowRef(false);
19
+ const onKeydown = (event) => {
20
+ if (event.key === "Enter" || event.key === " ") {
21
+ event.preventDefault();
22
+ event.currentTarget?.click();
23
+ }
24
+ };
25
+ return () => createVNode(Dropdown, {
26
+ "menu": props.menu,
27
+ "getPopupContainer": props.getPopupContainer,
28
+ "trigger": ["click", "hover"],
29
+ "onOpenChange": (nextOpen) => {
30
+ open.value = nextOpen;
31
+ },
32
+ "onMenuClick": (info) => emit("menuClick", info)
33
+ }, { default: () => [createVNode(DownOutlined, mergeProps({
34
+ "role": "button",
35
+ "aria-label": props.label,
36
+ "aria-haspopup": "menu",
37
+ "aria-expanded": open.value,
38
+ "onKeydown": onKeydown
39
+ }, { "tabIndex": 0 }), null)] });
40
+ }, {
41
+ props: {
42
+ menu: {
43
+ type: Object,
44
+ required: true
45
+ },
46
+ getPopupContainer: {
47
+ type: Function,
48
+ required: false
49
+ },
50
+ label: {
51
+ type: String,
52
+ required: true
53
+ }
54
+ },
55
+ emits: ["menuClick"],
56
+ name: "TableSelectionMenu",
57
+ inheritAttrs: false
58
+ });
17
59
  function flattenData(childrenColumnName, data, list = []) {
18
60
  (data || []).forEach((record) => {
19
61
  list.push(record);
@@ -160,7 +202,7 @@ function useSelection(config, rowSelection) {
160
202
  key: "all",
161
203
  text: tableLocale.value.selectionAll,
162
204
  onSelect() {
163
- setSelectedKeys(data.value.reduce((keys, record, index) => {
205
+ setSelectedKeys(flattenData(childrenColumnName.value, data.value).reduce((keys, record, index) => {
164
206
  const key = getRowKey.value(record, index);
165
207
  if (!isCheckboxDisabled(record) || derivedSelectedKeySet.value.has(key)) keys.push(key);
166
208
  return keys;
@@ -172,7 +214,7 @@ function useSelection(config, rowSelection) {
172
214
  text: tableLocale.value.selectInvert,
173
215
  onSelect() {
174
216
  const keySet = new Set(derivedSelectedKeySet.value);
175
- pageData.value.forEach((record, index) => {
217
+ flattedData.value.forEach((record, index) => {
176
218
  const key = getRowKey.value(record, index);
177
219
  if (!checkboxPropsMap.value.get(key)?.disabled) if (keySet.has(key)) keySet.delete(key);
178
220
  else keySet.add(key);
@@ -191,7 +233,8 @@ function useSelection(config, rowSelection) {
191
233
  onSelect() {
192
234
  selectionConfig.value.onSelectNone?.();
193
235
  setSelectedKeys(Array.from(derivedSelectedKeySet.value).filter((key) => {
194
- return checkboxPropsMap.value.get(key)?.disabled;
236
+ const record = getSelectedRecord(key);
237
+ return record !== void 0 && isCheckboxDisabled(record);
195
238
  }), "none");
196
239
  }
197
240
  };
@@ -231,6 +274,7 @@ function useSelection(config, rowSelection) {
231
274
  setSelectedKeys(keys, "all");
232
275
  updatePrevSelectedIndex(null);
233
276
  };
277
+ const { selectAll, selectRow = "Select row", selectedRow = "Row selected", selectionMenu: selectionMenuLabel = "Selection menu" } = tableLocale.value;
234
278
  let title;
235
279
  let columnTitleCheckbox;
236
280
  if (selectionType.value !== "radio") {
@@ -244,16 +288,17 @@ function useSelection(config, rowSelection) {
244
288
  mergedSelections.value.forEach((selection, index) => {
245
289
  selectionMap.set(selection.key ?? index, selection);
246
290
  });
247
- customizeSelections = createVNode("div", { "class": `${prefixCls.value}-selection-extra` }, [createVNode(Dropdown, {
291
+ customizeSelections = createVNode("div", { "class": `${prefixCls.value}-selection-extra` }, [createVNode(SelectionMenu, {
248
292
  "menu": {
249
293
  getPopupContainer: getPopupContainer.value,
250
294
  items: menuItems
251
295
  },
252
296
  "getPopupContainer": getPopupContainer.value,
297
+ "label": selectionMenuLabel,
253
298
  "onMenuClick": (info) => {
254
299
  selectionMap.get(info?.key)?.onSelect?.(recordKeys);
255
300
  }
256
- }, { default: () => [createVNode("span", null, [createVNode(DownOutlined, null, null)])] })]);
301
+ }, null)]);
257
302
  }
258
303
  const allDisabledData = flattedData.value.map((record, index) => {
259
304
  const key = getRowKey.value(record, index);
@@ -268,7 +313,7 @@ function useSelection(config, rowSelection) {
268
313
  const allDisabledSomeChecked = allDisabled && allDisabledData.some(({ checked }) => checked);
269
314
  const customCheckboxProps = selectionConfig.value.getTitleCheckboxProps?.() || {};
270
315
  const { onChange, disabled } = customCheckboxProps;
271
- columnTitleCheckbox = createVNode(checkbox_default, mergeProps({ "aria-label": customizeSelections ? "Custom selection" : "Select all" }, customCheckboxProps, {
316
+ columnTitleCheckbox = createVNode(checkbox_default, mergeProps({ "aria-label": typeof selectAll === "string" && selectAll ? selectAll : "Select all" }, customCheckboxProps, {
272
317
  "checked": !allDisabled ? !!flattedData.value.length && checkedCurrentAll : allDisabledAndChecked,
273
318
  "indeterminate": !allDisabled ? !checkedCurrentAll && checkedCurrentSome : !allDisabledAndChecked && allDisabledSomeChecked,
274
319
  "onChange": (e) => {
@@ -286,7 +331,7 @@ function useSelection(config, rowSelection) {
286
331
  const checked = keySet.has(key);
287
332
  const checkboxProps = checkboxPropsMap.value.get(key);
288
333
  return {
289
- node: createVNode(radio_default, mergeProps({ "aria-label": `Select row ${index + 1}` }, checkboxProps, {
334
+ node: createVNode(radio_default, mergeProps({ "aria-label": selectRow }, checkboxProps, {
290
335
  "checked": checked,
291
336
  "onClick": (e) => {
292
337
  lastClickEvent = e;
@@ -313,7 +358,7 @@ function useSelection(config, rowSelection) {
313
358
  warning(typeof checkboxProps?.indeterminate !== "boolean", "usage", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.");
314
359
  } else mergedIndeterminate = checkboxProps?.indeterminate ?? indeterminate;
315
360
  return {
316
- node: createVNode(checkbox_default, mergeProps({ "aria-label": checked ? `Row ${index + 1} selected` : `Select row ${index + 1}` }, checkboxProps, {
361
+ node: createVNode(checkbox_default, mergeProps({ "aria-label": checked ? selectedRow : selectRow }, checkboxProps, {
317
362
  "indeterminate": mergedIndeterminate,
318
363
  "checked": checked,
319
364
  "skipGroup": true,
@@ -31,9 +31,17 @@ interface TableLocale {
31
31
  selectNone?: VueNode;
32
32
  selectInvert?: VueNode;
33
33
  selectionAll?: VueNode;
34
+ /** Accessible label for a selectable row. */
35
+ selectRow?: string;
36
+ /** Accessible label for a selected row. */
37
+ selectedRow?: string;
38
+ /** Accessible label for the custom selection menu trigger. */
39
+ selectionMenu?: string;
34
40
  sortTitle?: string;
35
41
  expand?: string;
36
42
  collapse?: string;
43
+ expandAll?: string;
44
+ collapseAll?: string;
37
45
  triggerDesc?: string;
38
46
  triggerAsc?: string;
39
47
  cancelSort?: string;
@@ -25,7 +25,7 @@ const genTableStyle = (token) => {
25
25
  return { [`${componentCls}-wrapper`]: {
26
26
  clear: "both",
27
27
  maxWidth: "100%",
28
- ["--rc-virtual-list-scrollbar-bg"]: token.tableScrollBg,
28
+ ["--vc-virtual-list-scrollbar-bg"]: token.tableScrollBg,
29
29
  ...clearFix(),
30
30
  [componentCls]: {
31
31
  ...resetComponent(token),
@@ -12,8 +12,8 @@ const genSorterStyle = (token) => {
12
12
  },
13
13
  "&:focus-visible": { color: token.colorPrimary },
14
14
  [`
15
- &${componentCls}-cell-fix-left:hover,
16
- &${componentCls}-cell-fix-right:hover
15
+ &${componentCls}-cell-fix-start:hover,
16
+ &${componentCls}-cell-fix-end:hover
17
17
  `]: { background: token.tableFixedHeaderSortActiveBg }
18
18
  },
19
19
  [`${componentCls}-thead th${componentCls}-column-sort`]: {
@@ -56,6 +56,9 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
56
56
  warning(!(attrs.onPrevClick || attrs.onNextClick), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.");
57
57
  warning.deprecated(!indicatorSize.value, "indicatorSize", "indicator");
58
58
  warning.deprecated(!(props.destroyInactiveTabPane || props.items?.some((item) => "destroyInactiveTabPane" in item)), "destroyInactiveTabPane", "destroyOnHidden");
59
+ if (more.value) [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach(([deprecatedName, newName]) => {
60
+ warning.deprecated(!(deprecatedName in more.value), `more.${deprecatedName}`, `more.${newName}`);
61
+ });
59
62
  }
60
63
  const rootCls = useCSSVarCls(prefixCls);
61
64
  const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
@@ -87,14 +90,18 @@ const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emi
87
90
  };
88
91
  const mergedMoreFn = () => {
89
92
  const rootPrefixCls = getPrefixCls();
93
+ const { visible: moreVisible, ...restMoreProps } = more.value ?? {};
94
+ const legacyMoreProps = more.value && !("open" in more.value) && "visible" in more.value ? { open: moreVisible } : {};
90
95
  if (!rootPrefixCls) return {
91
96
  icon: moreIcon,
92
- ...more.value
97
+ ...restMoreProps,
98
+ ...legacyMoreProps
93
99
  };
94
100
  return {
95
101
  icon: moreIcon,
96
102
  transitionName: `${rootPrefixCls}-slide-up`,
97
- ...more.value
103
+ ...restMoreProps,
104
+ ...legacyMoreProps
98
105
  };
99
106
  };
100
107
  const mergedMore = mergedMoreFn();
@@ -114,7 +114,7 @@ const genDropdownStyle = (token) => {
114
114
  margin: 0,
115
115
  padding: `${unit(token.paddingXXS)} ${unit(token.paddingSM)}`,
116
116
  color: token.colorText,
117
- fontWeight: "normal",
117
+ fontWeight: 400,
118
118
  fontSize: token.fontSize,
119
119
  lineHeight: token.lineHeight,
120
120
  cursor: "pointer",
@@ -105,6 +105,10 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
105
105
  type: [Object, Function],
106
106
  required: false
107
107
  },
108
+ autocomplete: {
109
+ type: String,
110
+ required: false
111
+ },
108
112
  id: {
109
113
  type: [String, Object],
110
114
  required: false
@@ -266,6 +270,19 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
266
270
  required: false,
267
271
  default: void 0
268
272
  },
273
+ name: {
274
+ type: String,
275
+ required: false
276
+ },
277
+ required: {
278
+ type: Boolean,
279
+ required: false,
280
+ default: void 0
281
+ },
282
+ autoComplete: {
283
+ type: String,
284
+ required: false
285
+ },
269
286
  order: {
270
287
  type: Boolean,
271
288
  required: false,
@@ -1500,6 +1517,10 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
1500
1517
  type: String,
1501
1518
  required: false
1502
1519
  },
1520
+ autocomplete: {
1521
+ type: String,
1522
+ required: false
1523
+ },
1503
1524
  use12Hours: {
1504
1525
  type: Boolean,
1505
1526
  required: false,
@@ -1665,6 +1686,19 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
1665
1686
  required: false,
1666
1687
  default: void 0
1667
1688
  },
1689
+ name: {
1690
+ type: String,
1691
+ required: false
1692
+ },
1693
+ required: {
1694
+ type: Boolean,
1695
+ required: false,
1696
+ default: void 0
1697
+ },
1698
+ autoComplete: {
1699
+ type: String,
1700
+ required: false
1701
+ },
1668
1702
  order: {
1669
1703
  type: Boolean,
1670
1704
  required: false,
@@ -3,8 +3,8 @@ import { genCssVar } from "../theme/util/genStyleUtils.js";
3
3
  import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
4
  import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
5
5
  import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
6
- import isNonNullable from "../_util/isNonNullable.js";
7
6
  import { resolveSlotsNode } from "../_util/vnode/index.js";
7
+ import isNonNullable from "../_util/isNonNullable.js";
8
8
  import { provideInternalContext } from "../steps/context.js";
9
9
  import Steps from "../steps/index.js";
10
10
  import style_default from "./style/index.js";
@@ -60,7 +60,7 @@ const genTooltipStyle = (token) => {
60
60
  `&-placement-right`,
61
61
  `&-placement-rightTop`,
62
62
  `&-placement-rightBottom`
63
- ].join(",")]: { [`${componentCls}-inner`]: { borderRadius: token.min(tooltipBorderRadius, 8) } },
63
+ ].join(",")]: { [`${componentCls}-container`]: { borderRadius: token.min(tooltipBorderRadius, 8) } },
64
64
  [`${componentCls}-content`]: { position: "relative" },
65
65
  ...genPresetColor(token, (colorKey, { darkColor }) => ({ [`&${componentCls}-${colorKey}`]: {
66
66
  [`${componentCls}-container`]: { backgroundColor: darkColor },
@@ -1,8 +1,8 @@
1
1
  import { getSlotPropsFnRun } from "../_util/tools.js";
2
- import isNonNullable from "../_util/isNonNullable.js";
3
2
  import localeValues from "../locale/en_US.js";
4
3
  import useLocale from "../locale/useLocale.js";
5
4
  import button_default from "../button/index.js";
5
+ import isNonNullable from "../_util/isNonNullable.js";
6
6
  import { Fragment, createVNode, defineComponent, mergeProps } from "vue";
7
7
  import { clsx } from "@v-c/util";
8
8
  import { filterEmpty } from "@v-c/util/dist/props-util";
@@ -17,13 +17,14 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
17
17
  const { prefixCls, total = 1, title, onClose, onPrev, onNext, onFinish, cover, description, nextButtonProps, prevButtonProps, type: stepType, closable, classes = {}, styles = {} } = stepProps;
18
18
  const ariaProps = pickAttrs(closable ?? {}, true);
19
19
  const mergedType = stepType ?? type;
20
+ const resolvedCloseIcon = getSlotPropsFnRun({}, { closeIcon: closable?.closeIcon }, "closeIcon");
20
21
  const mergedCloseIcon = createVNode("button", mergeProps({
21
22
  "type": "button",
22
23
  "onClick": onClose,
23
24
  "class": clsx(`${prefixCls}-close`, classes.close),
24
25
  "style": styles.close,
25
26
  "aria-label": contextLocaleGlobal?.value.close
26
- }, ariaProps), [closable?.closeIcon || createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null)]);
27
+ }, ariaProps), [resolvedCloseIcon || createVNode(CloseOutlined, { "class": `${prefixCls}-close-icon` }, null)]);
27
28
  const isLastStep = current === total - 1;
28
29
  const prevBtnClick = (e) => {
29
30
  onPrev?.();
@@ -1,4 +1,5 @@
1
1
  import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
2
+ import { isRenderable } from "../_util/is.js";
2
3
  import Dropdown from "../dropdown/index.js";
3
4
  import checkbox_default from "../checkbox/index.js";
4
5
  import Search from "./search.js";
@@ -130,7 +131,7 @@ const TransferSection = /* @__PURE__ */ defineComponent((props) => {
130
131
  }, [search, bodyNode]);
131
132
  };
132
133
  const getSelectAllLabel = (selectedCount, totalCount) => {
133
- if (props.selectAllLabel) return typeof props.selectAllLabel === "function" ? props.selectAllLabel({
134
+ if (isRenderable(props.selectAllLabel)) return typeof props.selectAllLabel === "function" ? props.selectAllLabel({
134
135
  selectedCount,
135
136
  totalCount
136
137
  }) : props.selectAllLabel;
@@ -1,4 +1,5 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
+ import { useFormItemInputContext } from "../form/context.js";
2
3
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
4
  import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
5
  import { useMultipleSelect } from "../_util/hooks/useMultipleSelect.js";
@@ -9,7 +10,6 @@ import localeValues from "../locale/en_US.js";
9
10
  import useLocale from "../locale/useLocale.js";
10
11
  import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
11
12
  import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
12
- import { useFormItemInputContext } from "../form/context.js";
13
13
  import Actions from "./Actions.js";
14
14
  import { groupDisabledKeysMap, groupKeysMap } from "../_util/transKeys.js";
15
15
  import TransferSection from "./Section.js";
@@ -43,7 +43,7 @@ function genBaseStyle(prefixCls, token) {
43
43
  const { treeCls, treeNodeCls, treeNodePadding, titleHeight, indentSize, switcherSize, motionDurationMid, nodeSelectedBg, nodeHoverBg, colorTextQuaternary, controlItemBgActiveDisabled } = token;
44
44
  return { [treeCls]: {
45
45
  ...resetComponent(token),
46
- ["--rc-virtual-list-scrollbar-bg"]: token.colorSplit,
46
+ ["--vc-virtual-list-scrollbar-bg"]: token.colorSplit,
47
47
  background: token.colorBgContainer,
48
48
  borderRadius: token.borderRadius,
49
49
  transition: `background-color ${token.motionDurationSlow}`,