antdv-next 1.5.1 → 1.5.3

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 (79) hide show
  1. package/dist/_util/hooks/useClosable.d.ts +4 -2
  2. package/dist/_util/hooks/useClosable.js +9 -3
  3. package/dist/_util/statusUtils.d.ts +1 -1
  4. package/dist/_util/vueNode.d.ts +2 -6
  5. package/dist/anchor/Anchor.js +12 -6
  6. package/dist/antd-with-locales.esm.js +5684 -5361
  7. package/dist/antd-with-locales.js +82 -82
  8. package/dist/antd.css +1 -1
  9. package/dist/antd.esm.js +7613 -7294
  10. package/dist/antd.js +38 -38
  11. package/dist/auto-complete/index.d.ts +1 -1
  12. package/dist/auto-complete/index.js +13 -10
  13. package/dist/breadcrumb/BreadcrumbItem.js +2 -1
  14. package/dist/button/buttonHelper.d.ts +1 -1
  15. package/dist/card/Card.js +5 -4
  16. package/dist/card/CardMeta.js +4 -3
  17. package/dist/carousel/index.js +5 -2
  18. package/dist/checkbox/Checkbox.js +1 -1
  19. package/dist/collapse/Collapse.js +2 -4
  20. package/dist/color-picker/components/ColorTrigger.js +1 -1
  21. package/dist/color-picker/style/index.js +1 -0
  22. package/dist/config-provider/context.d.ts +5 -2
  23. package/dist/date-picker/generatePicker/generateRangePicker.js +4 -2
  24. package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
  25. package/dist/date-picker/util.d.ts +4 -4
  26. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  27. package/dist/float-button/FloatButton.js +2 -1
  28. package/dist/float-button/style/button.js +16 -10
  29. package/dist/form/FormItem/ItemHolder.js +1 -1
  30. package/dist/form/FormItem/index.js +4 -5
  31. package/dist/form/FormItemLabel.js +2 -1
  32. package/dist/form/context.d.ts +1 -1
  33. package/dist/form/hooks/useVariant.d.ts +1 -1
  34. package/dist/form/style/index.js +25 -12
  35. package/dist/grid/row.js +9 -16
  36. package/dist/image/PreviewGroup.js +1 -1
  37. package/dist/listy/style/index.js +5 -1
  38. package/dist/locale/en_US.js +4 -0
  39. package/dist/locale/index.d.ts +4 -0
  40. package/dist/locale/is_IS.js +1 -1
  41. package/dist/locale/mn_MN.js +1 -1
  42. package/dist/locale/zh_CN.js +4 -0
  43. package/dist/menu/MenuItem.js +12 -2
  44. package/dist/menu/SubMenu.d.ts +1 -1
  45. package/dist/menu/style/vertical.js +10 -11
  46. package/dist/notification/index.js +2 -1
  47. package/dist/notification/useNotification.js +8 -4
  48. package/dist/package.js +1 -1
  49. package/dist/package.json.d.ts +4 -0
  50. package/dist/radio/group.js +2 -2
  51. package/dist/segmented/index.js +2 -1
  52. package/dist/select/index.d.ts +2 -2
  53. package/dist/select/index.js +1 -1
  54. package/dist/select/style/index.js +1 -1
  55. package/dist/space/Compact.d.ts +1 -1
  56. package/dist/steps/PanelArrow.js +3 -2
  57. package/dist/table/InternalTable.js +5 -4
  58. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
  59. package/dist/table/hooks/useSorter.js +7 -9
  60. package/dist/table/style/radius.js +4 -0
  61. package/dist/table/util.d.ts +1 -1
  62. package/dist/tag/CheckableTagGroup.d.ts +3 -0
  63. package/dist/tag/CheckableTagGroup.js +2 -2
  64. package/dist/tag/hooks/useColor.d.ts +1 -1
  65. package/dist/tag/index.js +2 -1
  66. package/dist/transfer/ListBody.js +2 -1
  67. package/dist/transfer/ListItem.d.ts +1 -0
  68. package/dist/transfer/ListItem.js +6 -2
  69. package/dist/transfer/Section.js +1 -1
  70. package/dist/transfer/search.js +2 -2
  71. package/dist/tree/utils/dictUtil.js +3 -2
  72. package/dist/upload/UploadList/ListItem.js +2 -1
  73. package/dist/upload/UploadList/index.js +8 -2
  74. package/dist/upload/utils.js +8 -6
  75. package/dist/version/token-meta.json +1 -0
  76. package/dist/version/token.json +1 -0
  77. package/package.json +10 -6
  78. package/web-tags.json +1172 -1168
  79. package/web-types.json +3789 -3806
@@ -1,3 +1,4 @@
1
+ import { isNonNullable } from "../../_util/is.js";
1
2
  import { fillFieldNames } from "@v-c/tree";
2
3
  //#region src/tree/utils/dictUtil.ts
3
4
  const RECORD_NONE = 0;
@@ -16,8 +17,8 @@ function traverseNodesKey(treeData, callback, fieldNames) {
16
17
  function calcRangeKeys({ treeData, expandedKeys, startKey, endKey, fieldNames }) {
17
18
  const keys = [];
18
19
  let record = RECORD_NONE;
19
- if (startKey && startKey === endKey) return [startKey];
20
- if (!startKey || !endKey) return [];
20
+ if (!isNonNullable(startKey) || !isNonNullable(endKey)) return [];
21
+ if (startKey === endKey) return [startKey];
21
22
  function matchKey(key) {
22
23
  return key === startKey || key === endKey;
23
24
  }
@@ -88,7 +88,8 @@ const ListItem = /* @__PURE__ */ defineComponent((props, { attrs }) => {
88
88
  "target": "_blank",
89
89
  "rel": "noopener noreferrer",
90
90
  "onClick": (e) => onPreview(file, e),
91
- "title": locale.previewFile
91
+ "title": locale.previewFile,
92
+ "aria-label": locale.previewFile || void 0
92
93
  }, [typeof customPreviewIcon === "function" ? customPreviewIcon(file) : customPreviewIcon || createVNode(EyeOutlined, null, null)]) : null;
93
94
  const pictureCardActions = (listType.value === "picture-card" || listType.value === "picture-circle") && mergedStatus.value !== "uploading" && createVNode("span", { "class": `${prefixCls}-list-item-actions` }, [
94
95
  previewIcon,
@@ -79,7 +79,10 @@ const UploadList = /* @__PURE__ */ defineComponent((props, { slots }) => {
79
79
  if (isVNode(customIcon)) return createVNode(button_default, mergeProps({
80
80
  "type": "text",
81
81
  "size": "small"
82
- }, { title }, {
82
+ }, {
83
+ "title": title,
84
+ "aria-label": title || void 0
85
+ }, {
83
86
  "class": `${actionPrefixCls}-list-item-action`,
84
87
  "disabled": mergedDisabled,
85
88
  "onClick": handleClick,
@@ -88,7 +91,10 @@ const UploadList = /* @__PURE__ */ defineComponent((props, { slots }) => {
88
91
  return createVNode(button_default, mergeProps({
89
92
  "type": "text",
90
93
  "size": "small"
91
- }, { title }, {
94
+ }, {
95
+ "title": title,
96
+ "aria-label": title || void 0
97
+ }, {
92
98
  "class": `${actionPrefixCls}-list-item-action`,
93
99
  "disabled": mergedDisabled,
94
100
  "onClick": handleClick
@@ -52,6 +52,14 @@ function previewImage(file) {
52
52
  resolve("");
53
53
  return;
54
54
  }
55
+ if (file.type.startsWith("image/gif")) {
56
+ const reader = new FileReader();
57
+ reader.onload = () => {
58
+ if (reader.result) resolve(reader.result);
59
+ };
60
+ reader.readAsDataURL(file);
61
+ return;
62
+ }
55
63
  const canvas = document.createElement("canvas");
56
64
  canvas.width = MEASURE_SIZE;
57
65
  canvas.height = MEASURE_SIZE;
@@ -85,12 +93,6 @@ function previewImage(file) {
85
93
  if (reader.result && typeof reader.result === "string") img.src = reader.result;
86
94
  };
87
95
  reader.readAsDataURL(file);
88
- } else if (file.type.startsWith("image/gif")) {
89
- const reader = new FileReader();
90
- reader.onload = () => {
91
- if (reader.result) resolve(reader.result);
92
- };
93
- reader.readAsDataURL(file);
94
96
  } else img.src = window.URL.createObjectURL(file);
95
97
  });
96
98
  }