antdv-next 1.8.2 → 1.8.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 (82) hide show
  1. package/dist/_util/hooks/useClosable.d.ts +3 -3
  2. package/dist/_util/hooks/useClosable.js +9 -9
  3. package/dist/affix/index.js +2 -7
  4. package/dist/antd-with-locales.esm.js +16050 -15720
  5. package/dist/antd-with-locales.js +79 -79
  6. package/dist/antd.css +1 -1
  7. package/dist/antd.esm.js +13249 -12919
  8. package/dist/antd.js +81 -81
  9. package/dist/badge/index.d.ts +4 -1
  10. package/dist/badge/index.js +4 -4
  11. package/dist/button/buttonHelper.d.ts +1 -1
  12. package/dist/button/style/index.js +8 -2
  13. package/dist/calendar/generateCalendar.js +1 -1
  14. package/dist/checkbox/Checkbox.js +1 -0
  15. package/dist/color-picker/ColorPicker.js +4 -0
  16. package/dist/color-picker/ColorPickerPanel.js +4 -0
  17. package/dist/color-picker/components/ColorSlider.js +12 -4
  18. package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
  19. package/dist/components.d.ts +12 -8
  20. package/dist/components.js +3 -3
  21. package/dist/config-provider/context.d.ts +3 -3
  22. package/dist/config-provider/context.js +3 -3
  23. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  24. package/dist/descriptions/hooks/useRow.js +1 -1
  25. package/dist/form/Form.d.ts +17 -44
  26. package/dist/form/Form.js +54 -5
  27. package/dist/form/FormItem/index.d.ts +3 -3
  28. package/dist/form/context.d.ts +3 -3
  29. package/dist/form/hooks/useForm.d.ts +4 -5
  30. package/dist/form/index.d.ts +29 -3
  31. package/dist/form/index.js +6 -6
  32. package/dist/form/types.d.ts +15 -7
  33. package/dist/image/hooks/usePreviewConfig.d.ts +4 -4
  34. package/dist/image/index.d.ts +5 -5
  35. package/dist/index.d.ts +14 -7
  36. package/dist/index.js +2 -2
  37. package/dist/input-number/style/index.js +3 -2
  38. package/dist/layout/layout.js +2 -3
  39. package/dist/mentions/index.js +2 -1
  40. package/dist/menu/MenuItem.js +1 -1
  41. package/dist/menu/index.d.ts +2 -1
  42. package/dist/menu/index.js +29 -5
  43. package/dist/menu/menu.js +39 -15
  44. package/dist/message/index.js +11 -9
  45. package/dist/modal/confirm.js +2 -3
  46. package/dist/modal/index.d.ts +2 -2
  47. package/dist/modal/interface.d.ts +1 -1
  48. package/dist/modal/useModal/index.js +9 -4
  49. package/dist/notification/index.js +3 -7
  50. package/dist/package.js +1 -1
  51. package/dist/package.json.d.ts +1 -0
  52. package/dist/segmented/style/index.js +3 -2
  53. package/dist/select/index.d.ts +1 -0
  54. package/dist/select/index.js +1 -1
  55. package/dist/skeleton/style/index.js +9 -13
  56. package/dist/slider/SliderTooltip.js +0 -1
  57. package/dist/slider/index.d.ts +2 -0
  58. package/dist/slider/index.js +4 -0
  59. package/dist/statistic/Timer.d.ts +2 -2
  60. package/dist/steps/index.js +2 -1
  61. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  62. package/dist/table/hooks/usePagination.d.ts +1 -2
  63. package/dist/table/hooks/usePagination.js +1 -3
  64. package/dist/table/hooks/useSorter.js +4 -8
  65. package/dist/table/style/index.js +1 -0
  66. package/dist/table/style/size.js +1 -0
  67. package/dist/table/util.d.ts +1 -1
  68. package/dist/tabs/style/index.js +5 -1
  69. package/dist/tag/hooks/useColor.d.ts +1 -1
  70. package/dist/tour/index.js +4 -1
  71. package/dist/transfer/hooks/useSelection.js +2 -1
  72. package/dist/tree/DirectoryTree.js +4 -3
  73. package/dist/tree/utils/dictUtil.js +5 -8
  74. package/dist/typography/Base/index.js +3 -1
  75. package/dist/typography/Base/util.js +2 -1
  76. package/dist/upload/Upload.js +14 -10
  77. package/dist/upload/UploadList/ListItem.js +4 -0
  78. package/dist/version/token.json +1 -1
  79. package/dist/watermark/utils.js +1 -1
  80. package/package.json +40 -39
  81. package/web-tags.json +16 -12
  82. package/web-types.json +32 -18
@@ -34,11 +34,11 @@ interface UseClosableParams {
34
34
  customCloseIconRender?: (closeIcon: VNodeChild) => VNodeChild;
35
35
  context?: ContextClosable;
36
36
  }
37
- declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<({} | null)[] | readonly [true, import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): import("vue").ComputedRef<({} | null)[] | readonly [true, void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
38
  [key: string]: any;
39
- }>, boolean, {
39
+ }> | null | undefined, boolean, {
40
40
  readonly 'aria-label': any;
41
- }] | undefined>;
41
+ }]>;
42
42
  declare function computeClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>, closeLabel?: string): [closable: boolean, closeIcon: VueNode, closeBtnIsDisabled: boolean, ariaOrDataProps: AriaAttributes & DataAttributes];
43
43
  //#endregion
44
44
  export { BaseContextClosable, ClosableType, ContextClosable, UseClosableParams, computeClosable, useClosable as default, pickClosable };
@@ -78,16 +78,16 @@ function useClosable(propCloseCollection, contextCloseCollection, fallbackCloseC
78
78
  "aria-label": mergedCloseIcon.props?.["aria-label"] ?? contextLocale?.value?.close,
79
79
  ...ariaOrDataProps
80
80
  }) : createVNode("span", mergeProps({ "aria-label": contextLocale?.value?.close }, ariaOrDataProps), [mergedCloseIcon]);
81
- return [
82
- true,
83
- mergedCloseIcon,
84
- closeBtnIsDisabled.value,
85
- {
86
- "aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
87
- ...ariaOrDataProps
88
- }
89
- ];
90
81
  }
82
+ return [
83
+ true,
84
+ mergedCloseIcon,
85
+ closeBtnIsDisabled.value,
86
+ {
87
+ "aria-label": contextLocale?.value?.close ?? localeValues.global?.close,
88
+ ...ariaOrDataProps
89
+ }
90
+ ];
91
91
  });
92
92
  }
93
93
  function computeClosableConfig(closable, closeIcon) {
@@ -20,15 +20,12 @@ const TRIGGER_EVENTS = [
20
20
  function getDefaultTarget() {
21
21
  return typeof window !== "undefined" ? window : null;
22
22
  }
23
- const AFFIX_STATUS_NONE = 0;
24
- const AFFIX_STATUS_PREPARE = 1;
25
23
  const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
26
24
  const configContext = useConfig();
27
25
  const { prefixCls: affixPrefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("affix", props);
28
26
  const lastAffix = shallowRef(false);
29
27
  const affixStyle = shallowRef();
30
28
  const placeholderStyle = shallowRef();
31
- const status = shallowRef(AFFIX_STATUS_NONE);
32
29
  let prevTarget = null;
33
30
  let prevListener = null;
34
31
  const placeholderNodeRef = shallowRef();
@@ -42,10 +39,10 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
42
39
  return offsetBottom === void 0 && offsetTop === void 0 ? 0 : offsetTop;
43
40
  });
44
41
  const measure = () => {
45
- if (status.value !== AFFIX_STATUS_PREPARE || !fixedNodeRef.value || !placeholderNodeRef.value) return;
42
+ if (!fixedNodeRef.value || !placeholderNodeRef.value) return;
46
43
  const targetNode = targetFunc.value();
47
44
  if (targetNode) {
48
- const newState = { status: AFFIX_STATUS_NONE };
45
+ const newState = {};
49
46
  const placeholderRect = getTargetRect(placeholderNodeRef.value);
50
47
  const contentHeight = getTargetRect(contextRef.value || fixedNodeRef.value).height || placeholderRect.height;
51
48
  if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) return;
@@ -66,14 +63,12 @@ const Affix = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, em
66
63
  }
67
64
  newState.lastAffix = !!newState.affixStyle;
68
65
  if (lastAffix.value !== newState.lastAffix) emit("change", newState.lastAffix);
69
- status.value = newState.status;
70
66
  affixStyle.value = newState.affixStyle;
71
67
  placeholderStyle.value = newState.placeholderStyle;
72
68
  lastAffix.value = newState.lastAffix;
73
69
  }
74
70
  };
75
71
  const prepareMeasure = () => {
76
- status.value = AFFIX_STATUS_PREPARE;
77
72
  measure();
78
73
  };
79
74
  const updatePosition = throttleByAnimationFrame(() => {