antdv-next 1.0.0-alpha.5 → 1.0.0-beta.1

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 (208) hide show
  1. package/dist/_util/PurePanel.js +106 -0
  2. package/dist/_util/hooks/useMergeSemantic.js +3 -3
  3. package/dist/_util/styleUtils.js +10 -0
  4. package/dist/alert/Alert.d.ts +3 -3
  5. package/dist/anchor/Anchor.d.ts +3 -3
  6. package/dist/antd.js +113 -105
  7. package/dist/app/App.d.ts +2 -2
  8. package/dist/auto-complete/index.d.ts +4 -3
  9. package/dist/auto-complete/index.js +8 -1
  10. package/dist/avatar/Avatar.d.ts +3 -3
  11. package/dist/avatar/AvatarGroup.d.ts +2 -2
  12. package/dist/badge/Ribbon.d.ts +3 -3
  13. package/dist/badge/ScrollNumber.js +1 -1
  14. package/dist/badge/SingleNumber.js +1 -1
  15. package/dist/badge/index.d.ts +3 -3
  16. package/dist/badge/index.js +5 -3
  17. package/dist/badge/style/index.js +1 -1
  18. package/dist/breadcrumb/Breadcrumb.d.ts +3 -3
  19. package/dist/button/Button.d.ts +3 -3
  20. package/dist/calendar/generateCalendar.d.ts +3 -3
  21. package/dist/calendar/index.d.ts +3 -3
  22. package/dist/calendar/style/index.d.ts +1 -1
  23. package/dist/calendar/style/index.js +1 -1
  24. package/dist/card/Card.d.ts +3 -3
  25. package/dist/card/CardGrid.d.ts +2 -2
  26. package/dist/card/CardMeta.d.ts +3 -3
  27. package/dist/card/style/index.js +11 -2
  28. package/dist/cascader/Panel.d.ts +3 -3
  29. package/dist/cascader/index.d.ts +1 -0
  30. package/dist/cascader/index.js +2 -0
  31. package/dist/checkbox/Checkbox.d.ts +3 -3
  32. package/dist/checkbox/Group.d.ts +3 -3
  33. package/dist/checkbox/style/index.d.ts +1 -1
  34. package/dist/color-picker/ColorPicker.d.ts +4 -4
  35. package/dist/color-picker/ColorPicker.js +11 -0
  36. package/dist/components.d.ts +8 -6
  37. package/dist/config-provider/context.d.ts +2 -1
  38. package/dist/config-provider/context.js +1 -1
  39. package/dist/config-provider/define.d.ts +14 -0
  40. package/dist/config-provider/index.d.ts +3 -3
  41. package/dist/config-provider/index.js +21 -2
  42. package/dist/date-picker/generatePicker/generateRangePicker.js +1 -1
  43. package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -1
  44. package/dist/date-picker/generatePicker/index.d.ts +17 -17
  45. package/dist/date-picker/index.d.ts +29 -27
  46. package/dist/date-picker/index.js +3 -0
  47. package/dist/date-picker/style/panel.js +4 -4
  48. package/dist/descriptions/index.d.ts +3 -3
  49. package/dist/divider/index.d.ts +2 -2
  50. package/dist/drawer/index.d.ts +6 -4
  51. package/dist/drawer/index.js +17 -5
  52. package/dist/drawer/useFocusable.d.ts +10 -0
  53. package/dist/drawer/useFocusable.js +18 -0
  54. package/dist/dropdown/dropdown.d.ts +3 -3
  55. package/dist/dropdown/dropdown.js +7 -0
  56. package/dist/empty/index.d.ts +3 -3
  57. package/dist/flex/index.d.ts +3 -3
  58. package/dist/flex/index.js +1 -1
  59. package/dist/float-button/BackTop.d.ts +3 -3
  60. package/dist/float-button/BackTop.js +4 -1
  61. package/dist/float-button/FloatButton.d.ts +3 -3
  62. package/dist/float-button/FloatButtonGroup.d.ts +3 -3
  63. package/dist/float-button/PurePanel.js +5 -5
  64. package/dist/form/ErrorList.js +4 -7
  65. package/dist/form/Form.d.ts +7 -3
  66. package/dist/form/Form.js +39 -22
  67. package/dist/form/FormItem/ItemHolder.js +0 -1
  68. package/dist/form/FormItem/index.d.ts +5 -5
  69. package/dist/form/FormItem/index.js +48 -29
  70. package/dist/form/FormItemInput.js +17 -19
  71. package/dist/form/utils/valueUtil.js +4 -1
  72. package/dist/grid/col.js +7 -2
  73. package/dist/grid/index.d.ts +2 -2
  74. package/dist/grid/style/index.js +6 -5
  75. package/dist/image/PreviewGroup.d.ts +2 -2
  76. package/dist/image/index.d.ts +7 -4
  77. package/dist/image/index.js +2 -0
  78. package/dist/image/style/index.d.ts +1 -1
  79. package/dist/index.d.ts +12 -9
  80. package/dist/index.js +3 -1
  81. package/dist/input/TextArea.d.ts +3 -3
  82. package/dist/input/index.d.ts +11 -11
  83. package/dist/input/style/index.d.ts +2 -2
  84. package/dist/input-number/index.d.ts +4 -4
  85. package/dist/input-number/index.js +1 -5
  86. package/dist/layout/index.d.ts +6 -6
  87. package/dist/layout/layout.d.ts +2 -2
  88. package/dist/layout/style/sider.js +1 -1
  89. package/dist/masonry/Masonry.d.ts +3 -3
  90. package/dist/mentions/index.d.ts +4 -3
  91. package/dist/mentions/index.js +3 -1
  92. package/dist/menu/MenuDivider.d.ts +2 -2
  93. package/dist/menu/MenuItem.d.ts +3 -3
  94. package/dist/menu/SubMenu.d.ts +3 -3
  95. package/dist/menu/index.d.ts +5 -5
  96. package/dist/menu/style/horizontal.js +1 -1
  97. package/dist/menu/style/index.js +5 -5
  98. package/dist/message/PurePanel.d.ts +2 -2
  99. package/dist/message/useMessage.d.ts +1 -0
  100. package/dist/modal/ConfirmDialog.js +1 -1
  101. package/dist/modal/Modal.d.ts +3 -3
  102. package/dist/modal/Modal.js +17 -6
  103. package/dist/modal/PurePanel.js +305 -0
  104. package/dist/modal/index.js +2 -0
  105. package/dist/modal/interface.d.ts +3 -1
  106. package/dist/notification/PurePanel.d.ts +2 -2
  107. package/dist/notification/PurePanel.js +4 -3
  108. package/dist/notification/style/index.d.ts +1 -1
  109. package/dist/notification/useNotification.d.ts +3 -2
  110. package/dist/notification/useNotification.js +7 -7
  111. package/dist/package.d.ts +34 -0
  112. package/dist/package.js +1 -1
  113. package/dist/pagination/Pagination.d.ts +3 -3
  114. package/dist/popconfirm/PurePanel.d.ts +2 -2
  115. package/dist/popconfirm/PurePanel.js +2 -1
  116. package/dist/popconfirm/index.d.ts +3 -3
  117. package/dist/popover/PurePanel.js +4 -2
  118. package/dist/popover/index.d.ts +9 -6
  119. package/dist/popover/index.js +2 -1
  120. package/dist/progress/progress.d.ts +3 -3
  121. package/dist/qrcode/index.d.ts +3 -3
  122. package/dist/radio/index.d.ts +5 -5
  123. package/dist/radio/radio.d.ts +3 -3
  124. package/dist/radio/style/index.js +1 -1
  125. package/dist/rate/index.d.ts +3 -3
  126. package/dist/rate/style/index.d.ts +1 -1
  127. package/dist/result/index.d.ts +3 -3
  128. package/dist/segmented/index.d.ts +3 -3
  129. package/dist/select/index.d.ts +5 -5
  130. package/dist/select/index.js +3 -1
  131. package/dist/select/style/dropdown.js +1 -1
  132. package/dist/skeleton/Avatar.d.ts +2 -2
  133. package/dist/skeleton/Button.d.ts +2 -2
  134. package/dist/skeleton/Image.d.ts +2 -2
  135. package/dist/skeleton/Input.d.ts +2 -2
  136. package/dist/skeleton/Node.d.ts +3 -3
  137. package/dist/skeleton/Skeleton.d.ts +3 -3
  138. package/dist/skeleton/Skeleton.js +1 -1
  139. package/dist/skeleton/Title.d.ts +1 -2
  140. package/dist/skeleton/Title.js +0 -5
  141. package/dist/slider/index.d.ts +3 -3
  142. package/dist/space/index.d.ts +5 -5
  143. package/dist/spin/index.d.ts +3 -3
  144. package/dist/spin/index.js +7 -6
  145. package/dist/splitter/Splitter.d.ts +3 -3
  146. package/dist/splitter/index.d.ts +2 -2
  147. package/dist/statistic/Statistic.d.ts +3 -3
  148. package/dist/statistic/Timer.d.ts +5 -5
  149. package/dist/statistic/index.d.ts +5 -5
  150. package/dist/steps/index.d.ts +3 -3
  151. package/dist/steps/style/icon.js +1 -1
  152. package/dist/steps/style/inline.js +1 -1
  153. package/dist/steps/style/panel.js +1 -1
  154. package/dist/switch/index.d.ts +3 -3
  155. package/dist/table/Column.d.ts +3 -3
  156. package/dist/table/ColumnGroup.d.ts +3 -3
  157. package/dist/table/InternalTable.js +19 -5
  158. package/dist/table/Table.d.ts +3 -3
  159. package/dist/table/style/index.js +3 -3
  160. package/dist/table/style/radius.js +6 -0
  161. package/dist/table/style/virtual.js +1 -1
  162. package/dist/tabs/TabPane.d.ts +3 -3
  163. package/dist/tabs/index.d.ts +3 -3
  164. package/dist/tag/CheckableTag.d.ts +3 -3
  165. package/dist/tag/CheckableTagGroup.d.ts +3 -3
  166. package/dist/tag/CheckableTagGroup.js +3 -3
  167. package/dist/tag/index.d.ts +3 -3
  168. package/dist/theme/context.d.ts +2 -2
  169. package/dist/theme/index.d.ts +4 -4
  170. package/dist/theme/useToken.d.ts +2 -2
  171. package/dist/theme/useToken.js +1 -1
  172. package/dist/theme/util/genStyleUtils.d.ts +2 -2
  173. package/dist/theme/util/useResetIconStyle.js +1 -1
  174. package/dist/time-picker/index.d.ts +8 -7
  175. package/dist/time-picker/index.js +17 -13
  176. package/dist/timeline/Timeline.d.ts +3 -3
  177. package/dist/tooltip/PurePanel.d.ts +2 -2
  178. package/dist/tooltip/PurePanel.js +10 -6
  179. package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
  180. package/dist/tooltip/index.d.ts +3 -3
  181. package/dist/tour/PurePanel.js +243 -0
  182. package/dist/tour/index.d.ts +3 -3
  183. package/dist/tour/index.js +2 -0
  184. package/dist/transfer/Actions.d.ts +2 -2
  185. package/dist/transfer/Section.d.ts +2 -2
  186. package/dist/transfer/Transfer.d.ts +3 -3
  187. package/dist/transfer/Transfer.js +1 -1
  188. package/dist/transfer/search.d.ts +3 -3
  189. package/dist/tree/DirectoryTree.d.ts +3 -3
  190. package/dist/tree/Tree.d.ts +3 -3
  191. package/dist/tree/style/index.d.ts +1 -1
  192. package/dist/tree-select/index.d.ts +5 -4
  193. package/dist/tree-select/index.js +2 -0
  194. package/dist/typography/Paragraph.d.ts +3 -3
  195. package/dist/typography/Text.d.ts +3 -3
  196. package/dist/typography/Title.d.ts +3 -3
  197. package/dist/typography/Typography.d.ts +3 -3
  198. package/dist/typography/index.d.ts +9 -9
  199. package/dist/upload/Dragger.d.ts +3 -3
  200. package/dist/upload/Upload.d.ts +3 -3
  201. package/dist/upload/Upload.js +15 -1
  202. package/dist/upload/index.d.ts +3 -3
  203. package/dist/upload/interface.d.ts +4 -4
  204. package/dist/watermark/index.d.ts +2 -2
  205. package/global.d.ts +1 -0
  206. package/package.json +49 -15
  207. package/web-tags.json +2452 -1907
  208. package/web-types.json +7148 -5592
@@ -10,6 +10,7 @@ import useCSSVarCls_default from "../config-provider/hooks/useCSSVarCls.js";
10
10
  import { ContextIsolator } from "../_util/ContextIsolator.js";
11
11
  import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
12
12
  import { canUseDocElement } from "../_util/styleChecker.js";
13
+ import useFocusable from "../drawer/useFocusable.js";
13
14
  import skeleton_default from "../skeleton/index.js";
14
15
  import { usePanelRef } from "../watermark/context.js";
15
16
  import { Footer, renderCloseIcon } from "./shared.js";
@@ -40,7 +41,7 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
40
41
  "okButtonProps",
41
42
  "mask"
42
43
  ]);
43
- const { mask: modalMask, classes, styles, zIndex: customZIndex, width: widthRef, rootClass: rootClassRef, rootStyle: rootStyleRef, panelRef: panelRefRef } = toPropsRefs(props, "mask", "classes", "styles", "zIndex", "width", "rootClass", "rootStyle", "panelRef");
44
+ const { mask: modalMask, classes, styles, zIndex: customZIndex, width: widthRef, rootClass: rootClassRef, rootStyle: rootStyleRef, panelRef: panelRefRef, focusable, focusTriggerAfterClose } = toPropsRefs(props, "mask", "classes", "styles", "zIndex", "width", "rootClass", "rootStyle", "panelRef", "focusable", "focusTriggerAfterClose");
44
45
  const { modal: modalContext } = useBaseConfig();
45
46
  const modalRenderRef = computed(() => slots.modalRender || props.modalRender);
46
47
  const rootPrefixCls = computed(() => getPrefixCls());
@@ -50,6 +51,7 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
50
51
  return [closable?.afterClose, closable?.onClose];
51
52
  });
52
53
  const [mergedMask, maskBlurClassName] = useMergedMask(modalMask, contextMask, prefixCls);
54
+ const mergedFocusable = useFocusable(focusable, mergedMask, focusTriggerAfterClose);
53
55
  const onClose = () => {
54
56
  closableContext.value?.[1]?.();
55
57
  };
@@ -89,7 +91,9 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
89
91
  const mergedProps = computed(() => ({
90
92
  ...props,
91
93
  mask: mergedMask.value,
92
- zIndex: zIndex.value
94
+ zIndex: zIndex.value,
95
+ focusTriggerAfterClose: mergedFocusable.value?.focusTriggerAfterClose,
96
+ focusable: mergedFocusable.value
93
97
  }));
94
98
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes, maskBlurClassName), useToArr(contextStyles, styles), useToProps(mergedProps));
95
99
  const numWidth = computed(() => {
@@ -122,12 +126,12 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
122
126
  [`${prefixCls.value}-wrap-rtl`]: direction.value === "rtl"
123
127
  });
124
128
  const [rawClosable, mergedCloseIcon, closeBtnIsDisabled, ariaProps] = closableIconContext.value;
125
- const [closableAfterclose] = closableContext.value;
129
+ const [closableAfterClose] = closableContext.value;
126
130
  const mergedClosable = rawClosable ? {
127
131
  disabled: closeBtnIsDisabled,
128
132
  closeIcon: mergedCloseIcon,
129
133
  afterClose: () => {
130
- closableAfterclose?.();
134
+ closableAfterClose?.();
131
135
  },
132
136
  ...ariaProps
133
137
  } : false;
@@ -179,7 +183,8 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
179
183
  "destroyOnClose",
180
184
  "mousePosition",
181
185
  "focusTriggerAfterClose",
182
- "panelRef"
186
+ "panelRef",
187
+ "focusable"
183
188
  ]);
184
189
  const titleNode = getSlotPropsFnRun(slots, props, "title");
185
190
  const mergedClassName = clsx(hashId.value, contextClassName.value, className);
@@ -205,7 +210,8 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
205
210
  "onClose": handleCancel,
206
211
  "closable": mergedClosable,
207
212
  "closeIcon": mergedCloseIcon,
208
- "focusTriggerAfterClose": props.focusTriggerAfterClose ?? true,
213
+ "focusTriggerAfterClose": mergedFocusable.value?.focusTriggerAfterClose,
214
+ "focusTrap": mergedFocusable.value?.trap,
209
215
  "transitionName": getTransitionName(rootPrefixCls.value, "zoom", props.transitionName),
210
216
  "maskTransitionName": getTransitionName(rootPrefixCls.value, "fade", props.maskTransitionName),
211
217
  "mask": mergedMask.value,
@@ -443,6 +449,11 @@ const Modal = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
443
449
  required: false,
444
450
  default: void 0
445
451
  },
452
+ focusable: {
453
+ type: Object,
454
+ required: false,
455
+ default: void 0
456
+ },
446
457
  footer: {
447
458
  type: [
448
459
  Function,
@@ -0,0 +1,305 @@
1
+ import { useComponentBaseConfig } from "../config-provider/context.js";
2
+ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
3
+ import "../_util/hooks/index.js";
4
+ import { getSlotPropsFnRun } from "../_util/tools.js";
5
+ import useCSSVarCls_default from "../config-provider/hooks/useCSSVarCls.js";
6
+ import { Footer, renderCloseIcon } from "./shared.js";
7
+ import style_default from "./style/index.js";
8
+ import { ConfirmContent } from "./ConfirmDialog.js";
9
+ import { withPureRenderTheme } from "../_util/PurePanel.js";
10
+ import { computed, createVNode, defineComponent, mergeProps } from "vue";
11
+ import { clsx } from "@v-c/util";
12
+ import { Panel } from "@v-c/dialog";
13
+
14
+ //#region src/modal/PurePanel.tsx
15
+ const PurePanel = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
16
+ const { getPrefixCls } = useComponentBaseConfig("modal", props, []);
17
+ const prefixCls = computed(() => props.prefixCls || getPrefixCls());
18
+ const rootPrefixCls = computed(() => getPrefixCls(void 0, ""));
19
+ const rootCls = useCSSVarCls_default(rootPrefixCls);
20
+ const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
21
+ const confirmPrefixCls = computed(() => `${prefixCls.value}-confirm`);
22
+ return () => {
23
+ const { className: attrClassName, restAttrs } = getAttrStyleAndClass(attrs);
24
+ const { type, closable, closeIcon, style: attrStyle } = props;
25
+ const footer = getSlotPropsFnRun(slots, props, "footer", false);
26
+ const title = getSlotPropsFnRun(slots, props, "title", false);
27
+ let additionalProps = {};
28
+ if (type) additionalProps = {
29
+ closable: closable ?? false,
30
+ title: "",
31
+ footer: "",
32
+ children: createVNode(ConfirmContent, mergeProps(props, {
33
+ "prefixCls": prefixCls.value,
34
+ "confirmPrefixCls": confirmPrefixCls.value,
35
+ "rootPrefixCls": rootPrefixCls.value,
36
+ "content": slots.default?.()
37
+ }), null)
38
+ };
39
+ else additionalProps = {
40
+ closable: closable ?? true,
41
+ title,
42
+ footer: footer !== null && createVNode(Footer, mergeProps(props, { "footer": footer }), null),
43
+ children: slots.default?.()
44
+ };
45
+ return createVNode(Panel, mergeProps({
46
+ "prefixCls": prefixCls.value,
47
+ "className": clsx(hashId.value, `${prefixCls.value}-pure-panel`, type && confirmPrefixCls.value, type && `${confirmPrefixCls.value}-${type}`, attrClassName, cssVarCls.value, rootCls.value, props.rootClass),
48
+ "animationVisible": true,
49
+ "style": attrStyle
50
+ }, restAttrs, {
51
+ "closeIcon": renderCloseIcon(prefixCls.value, slots.closeIcon || closeIcon),
52
+ "closable": closable,
53
+ "visible": true
54
+ }, additionalProps), { default: () => additionalProps.children });
55
+ };
56
+ }, {
57
+ props: {
58
+ prefixCls: {
59
+ type: String,
60
+ required: false,
61
+ default: void 0
62
+ },
63
+ rootClass: {
64
+ type: String,
65
+ required: false,
66
+ default: void 0
67
+ },
68
+ className: {
69
+ type: String,
70
+ required: false,
71
+ default: void 0
72
+ },
73
+ keyboard: {
74
+ type: Boolean,
75
+ required: false,
76
+ default: void 0
77
+ },
78
+ style: {
79
+ type: Object,
80
+ required: false,
81
+ default: void 0
82
+ },
83
+ rootStyle: {
84
+ type: Object,
85
+ required: false,
86
+ default: void 0
87
+ },
88
+ mask: {
89
+ type: Boolean,
90
+ required: false,
91
+ default: void 0
92
+ },
93
+ children: {
94
+ type: [
95
+ Object,
96
+ Function,
97
+ String,
98
+ Number,
99
+ null,
100
+ Boolean,
101
+ Array
102
+ ],
103
+ required: false,
104
+ default: void 0
105
+ },
106
+ afterClose: {
107
+ type: Function,
108
+ required: false,
109
+ default: void 0
110
+ },
111
+ afterOpenChange: {
112
+ type: Function,
113
+ required: false,
114
+ default: void 0
115
+ },
116
+ onClose: {
117
+ type: Function,
118
+ required: false,
119
+ default: void 0
120
+ },
121
+ closable: {
122
+ type: [Boolean, Object],
123
+ required: false,
124
+ default: void 0
125
+ },
126
+ maskClosable: {
127
+ type: Boolean,
128
+ required: false,
129
+ default: void 0
130
+ },
131
+ destroyOnHidden: {
132
+ type: Boolean,
133
+ required: false,
134
+ default: void 0
135
+ },
136
+ mousePosition: {
137
+ type: [Object, null],
138
+ required: false,
139
+ default: void 0
140
+ },
141
+ title: {
142
+ type: [
143
+ Object,
144
+ Function,
145
+ String,
146
+ Number,
147
+ null,
148
+ Boolean,
149
+ Array
150
+ ],
151
+ required: false,
152
+ default: void 0
153
+ },
154
+ transitionName: {
155
+ type: String,
156
+ required: false,
157
+ default: void 0
158
+ },
159
+ maskTransitionName: {
160
+ type: String,
161
+ required: false,
162
+ default: void 0
163
+ },
164
+ animation: {
165
+ required: false,
166
+ default: void 0
167
+ },
168
+ maskAnimation: {
169
+ required: false,
170
+ default: void 0
171
+ },
172
+ wrapStyle: {
173
+ type: Object,
174
+ required: false,
175
+ default: void 0
176
+ },
177
+ bodyStyle: {
178
+ type: Object,
179
+ required: false,
180
+ default: void 0
181
+ },
182
+ maskStyle: {
183
+ type: Object,
184
+ required: false,
185
+ default: void 0
186
+ },
187
+ wrapClassName: {
188
+ type: String,
189
+ required: false,
190
+ default: void 0
191
+ },
192
+ width: {
193
+ type: [String, Number],
194
+ required: false,
195
+ default: void 0
196
+ },
197
+ height: {
198
+ type: [String, Number],
199
+ required: false,
200
+ default: void 0
201
+ },
202
+ zIndex: {
203
+ type: Number,
204
+ required: false,
205
+ default: void 0
206
+ },
207
+ bodyProps: {
208
+ required: false,
209
+ default: void 0
210
+ },
211
+ maskProps: {
212
+ required: false,
213
+ default: void 0
214
+ },
215
+ rootClassName: {
216
+ type: String,
217
+ required: false,
218
+ default: void 0
219
+ },
220
+ classNames: {
221
+ type: Object,
222
+ required: false,
223
+ default: void 0
224
+ },
225
+ styles: {
226
+ type: Object,
227
+ required: false,
228
+ default: void 0
229
+ },
230
+ wrapProps: {
231
+ required: false,
232
+ default: void 0
233
+ },
234
+ getContainer: {
235
+ type: [
236
+ String,
237
+ Function,
238
+ Boolean
239
+ ],
240
+ required: false,
241
+ skipCheck: true,
242
+ default: void 0
243
+ },
244
+ closeIcon: {
245
+ type: [
246
+ Object,
247
+ Function,
248
+ String,
249
+ Number,
250
+ null,
251
+ Boolean,
252
+ Array
253
+ ],
254
+ required: false,
255
+ default: void 0
256
+ },
257
+ modalRender: {
258
+ type: Function,
259
+ required: false,
260
+ default: void 0
261
+ },
262
+ forceRender: {
263
+ type: Boolean,
264
+ required: false,
265
+ default: void 0
266
+ },
267
+ focusTriggerAfterClose: {
268
+ type: Boolean,
269
+ required: false,
270
+ default: void 0
271
+ },
272
+ focusTrap: {
273
+ type: Boolean,
274
+ required: false,
275
+ default: void 0
276
+ },
277
+ panelRef: {
278
+ required: false,
279
+ default: void 0
280
+ },
281
+ type: {
282
+ type: String,
283
+ required: false,
284
+ default: void 0
285
+ },
286
+ footer: {
287
+ type: [
288
+ Function,
289
+ Boolean,
290
+ String,
291
+ Number,
292
+ null,
293
+ Object
294
+ ],
295
+ required: false,
296
+ default: void 0
297
+ }
298
+ },
299
+ name: "AModalPurePanel",
300
+ inheritAttrs: false
301
+ });
302
+ var PurePanel_default = withPureRenderTheme(PurePanel);
303
+
304
+ //#endregion
305
+ export { PurePanel_default as default };
@@ -1,6 +1,7 @@
1
1
  import Modal_default from "./Modal.js";
2
2
  import destroyFns_default from "./destroyFns.js";
3
3
  import confirm, { modalGlobalConfig, withError, withInfo, withSuccess, withWarn } from "./confirm.js";
4
+ import PurePanel_default from "./PurePanel.js";
4
5
  import useModal from "./useModal/index.js";
5
6
 
6
7
  //#region src/modal/index.tsx
@@ -20,6 +21,7 @@ Modal.install = (app) => {
20
21
  app.component(Modal.name, Modal);
21
22
  };
22
23
  var modal_default = Modal;
24
+ Modal._InternalPanelDoNotUseOrYouWillBeFired = PurePanel_default;
23
25
 
24
26
  //#endregion
25
27
  export { modal_default as default };
@@ -6,6 +6,7 @@ import "../_util/hooks/index.js";
6
6
  import { ClosableType } from "../_util/hooks/useClosable.js";
7
7
  import { ButtonProps, LegacyButtonType } from "../button/Button.js";
8
8
  import "../button/index.js";
9
+ import { FocusableConfig, OmitFocusType } from "../drawer/useFocusable.js";
9
10
  import { DirectionType } from "../config-provider/context.js";
10
11
  import { CSSProperties } from "vue";
11
12
  import { DialogProps } from "@v-c/dialog";
@@ -14,7 +15,7 @@ import { DialogProps } from "@v-c/dialog";
14
15
  type SemanticName = 'root' | 'header' | 'body' | 'footer' | 'container' | 'title' | 'wrapper' | 'mask';
15
16
  type ModalClassNamesType = SemanticClassNamesType<ModalProps, SemanticName>;
16
17
  type ModalStylesType = SemanticStylesType<ModalProps, SemanticName>;
17
- interface ModalCommonProps extends Omit<DialogProps, 'footer' | 'width' | 'onClose' | 'animation' | 'maskAnimation' | 'transitionName' | 'maskTransitionName' | 'mask' | 'classNames' | 'styles' | 'modalRender' | 'rootStyle' | 'style'> {
18
+ interface ModalCommonProps extends Omit<DialogProps, 'footer' | 'width' | 'onClose' | 'animation' | 'maskAnimation' | 'transitionName' | 'maskTransitionName' | 'mask' | 'classNames' | 'styles' | 'modalRender' | 'rootStyle' | 'style' | OmitFocusType> {
18
19
  footer?: VueNode | ((params: {
19
20
  originNode: VueNode;
20
21
  extra: {
@@ -85,6 +86,7 @@ interface ModalProps extends ModalCommonProps {
85
86
  * @since 5.18.0
86
87
  */
87
88
  loading?: boolean;
89
+ focusable?: FocusableConfig;
88
90
  }
89
91
  interface ModalEmits {
90
92
  /** Specify a function that will be called when a user clicks the OK button */
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.js";
2
2
  import { SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
3
  import "../_util/hooks/index.js";
4
4
  import { IconType, NotificationSemantic } from "./interface.js";
5
- import * as vue229 from "vue";
5
+ import * as vue340 from "vue";
6
6
 
7
7
  //#region src/notification/PurePanel.d.ts
8
8
  type PurePanelClassNamesType = SemanticClassNamesType<PurePanelProps, NotificationSemantic>;
@@ -36,6 +36,6 @@ interface PurePanelProps extends Omit<PureContentProps, 'prefixCls' | 'children'
36
36
  onClick?: (event: Event) => void;
37
37
  }
38
38
  /** @private Internal Component. Do not use in your production. */
39
- declare const PurePanel: vue229.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue229.PublicProps>;
39
+ declare const PurePanel: vue340.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue340.PublicProps>;
40
40
  //#endregion
41
41
  export { PurePanel };
@@ -1,7 +1,7 @@
1
1
  import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
2
2
  import { pureAttrs, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import "../_util/hooks/index.js";
4
- import { toPropsRefs } from "../_util/tools.js";
4
+ import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
5
5
  import useCSSVarCls_default from "../config-provider/hooks/useCSSVarCls.js";
6
6
  import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
7
7
  import style_default from "./style/index.js";
@@ -152,7 +152,7 @@ const omitKeys = [
152
152
  "closable"
153
153
  ];
154
154
  /** @private Internal Component. Do not use in your production. */
155
- const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs }) => {
155
+ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
156
156
  const { classes: notificationClassNames, styles } = toPropsRefs(props, "classes", "styles");
157
157
  const { getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("notification", props);
158
158
  const { notification: notificationContext } = useBaseConfig("notification", props);
@@ -184,6 +184,7 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs }) => {
184
184
  const notificationClassName = attrs.class;
185
185
  const style = attrs.style;
186
186
  const restProps = omit(props, omitKeys);
187
+ const actions = getSlotPropsFnRun(slots, props, "actions");
187
188
  return createVNode("div", {
188
189
  "class": clsx(`${noticePrefixCls}-pure-panel`, hashId.value, notificationClassName, cssVarCls.value, rootCls.value, mergedClassNames.value?.root),
189
190
  "style": mergedStyles.value.root
@@ -204,7 +205,7 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs }) => {
204
205
  "type": props.type,
205
206
  "title": props.title,
206
207
  "description": props.description,
207
- "actions": props.actions
208
+ "actions": actions
208
209
  }, null)
209
210
  }), null)]);
210
211
  };
@@ -1,6 +1,6 @@
1
1
  import "../../theme/internal.js";
2
- import "vue";
3
2
  import { CSSObject } from "@antdv-next/cssinjs";
3
+ import "vue";
4
4
 
5
5
  //#region src/notification/style/index.d.ts
6
6
  /** Component only token. Which will handle additional calculation of alias token */
@@ -1,8 +1,9 @@
1
1
  import { NotificationConfig, NotificationInstance } from "./interface.js";
2
- import * as vue_jsx_runtime1 from "vue/jsx-runtime";
2
+ import { MaybeRef } from "@v-c/util/dist/type";
3
+ import * as vue_jsx_runtime10 from "vue/jsx-runtime";
3
4
 
4
5
  //#region src/notification/useNotification.d.ts
5
6
 
6
- declare function useNotification(notificationConfig?: NotificationConfig): readonly [NotificationInstance, () => vue_jsx_runtime1.JSX.Element];
7
+ declare function useNotification(notificationConfig?: MaybeRef<NotificationConfig>): readonly [NotificationInstance, () => vue_jsx_runtime10.JSX.Element];
7
8
  //#endregion
8
9
  export { useNotification };
@@ -10,7 +10,7 @@ import { computeClosable, pickClosable } from "../_util/hooks/useClosable.js";
10
10
  import style_default from "./style/index.js";
11
11
  import { PureContent, getCloseIcon } from "./PurePanel.js";
12
12
  import { getCloseIconConfig, getMotion, getPlacementStyle } from "./util.js";
13
- import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef } from "vue";
13
+ import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef, unref } from "vue";
14
14
  import { clsx } from "@v-c/util";
15
15
  import { useNotification, useNotificationProvider } from "@v-c/notification";
16
16
 
@@ -60,7 +60,7 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
60
60
  };
61
61
  const getClassName = () => clsx({ [`${prefixCls.value}-rtl`]: props.rtl ?? direction.value === "rtl" });
62
62
  const getNotificationMotion = () => getMotion(prefixCls.value);
63
- const [api, holder] = useNotification({
63
+ const [api, holder] = useNotification(computed(() => ({
64
64
  prefixCls: prefixCls.value,
65
65
  style: getStyle,
66
66
  className: getClassName,
@@ -78,7 +78,7 @@ const Holder = /* @__PURE__ */ defineComponent((props, { expose }) => {
78
78
  offset: 8,
79
79
  gap: token.value?.margin
80
80
  }
81
- });
81
+ })));
82
82
  const mergedProps = computed(() => props);
83
83
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
84
84
  expose({
@@ -195,9 +195,9 @@ function useInternalNotification(notificationConfig) {
195
195
  const { title, description, icon, type, actions, class: className, style, role = "alert", closeIcon, closable, classes: configClassNames = {}, styles = {},...restConfig } = config;
196
196
  const mergedTitle = title;
197
197
  const mergedActions = actions;
198
- const realCloseIcon = getCloseIcon(noticePrefixCls, getCloseIconConfig(closeIcon, notificationConfig, notification));
198
+ const realCloseIcon = getCloseIcon(noticePrefixCls, getCloseIconConfig(closeIcon, unref(notificationConfig), notification));
199
199
  const [rawClosable, mergedCloseIcon, , ariaProps] = computeClosable(pickClosable(computed(() => ({
200
- ...notificationConfig || {},
200
+ ...unref(notificationConfig) || {},
201
201
  ...config
202
202
  }))), pickClosable(notificationContext), computed(() => ({
203
203
  closable: true,
@@ -213,7 +213,7 @@ function useInternalNotification(notificationConfig) {
213
213
  const mergedClassNames = mergeClassNames(void 0, originClassNames, semanticClassNames);
214
214
  const mergedStyles = mergeStyles(originStyles, semanticStyles);
215
215
  return originOpen({
216
- placement: notificationConfig?.placement ?? DEFAULT_PLACEMENT,
216
+ placement: unref(notificationConfig)?.placement ?? DEFAULT_PLACEMENT,
217
217
  ...restConfig,
218
218
  content: createVNode(PureContent, {
219
219
  "prefixCls": noticePrefixCls,
@@ -257,7 +257,7 @@ function useInternalNotification(notificationConfig) {
257
257
  return clone;
258
258
  };
259
259
  const holderContext = () => {
260
- return createVNode(Holder, mergeProps({ "key": "notificaion-holder" }, notificationConfig, { "ref": holderRef }), null);
260
+ return createVNode(Holder, mergeProps({ "key": "notificaion-holder" }, unref(notificationConfig), { "ref": holderRef }), null);
261
261
  };
262
262
  return [wrapAPIFn(), holderContext];
263
263
  }
package/dist/package.d.ts CHANGED
@@ -30,6 +30,36 @@ declare const _exports: {
30
30
  import: string;
31
31
  default: string;
32
32
  };
33
+ "./date-picker/*": {
34
+ types: string;
35
+ import: string;
36
+ default: string;
37
+ };
38
+ "./date-picker/locale/*": {
39
+ types: string;
40
+ import: string;
41
+ default: string;
42
+ };
43
+ "./time-picker/*": {
44
+ types: string;
45
+ import: string;
46
+ default: string;
47
+ };
48
+ "./time-picker/locale/*": {
49
+ types: string;
50
+ import: string;
51
+ default: string;
52
+ };
53
+ "./date-picker/generate": {
54
+ types: string;
55
+ import: string;
56
+ default: string;
57
+ };
58
+ "./date-picker/generate/*": {
59
+ types: string;
60
+ import: string;
61
+ default: string;
62
+ };
33
63
  "./global.d.ts": string;
34
64
  "./global": string;
35
65
  "./dist/reset.css": string;
@@ -102,9 +132,13 @@ declare const _exports: {
102
132
  defu: string;
103
133
  "es-toolkit": string;
104
134
  "scroll-into-view-if-needed": string;
135
+ "throttle-debounce": string;
105
136
  };
106
137
  "web-types": string;
107
138
  browserslist: string[];
139
+ devDependencies: {
140
+ "@types/throttle-debounce": string;
141
+ };
108
142
  };
109
143
  declare let _version2: typeof _exports["version"];
110
144
  //#endregion
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.0.0-alpha.5";
2
+ var version = "1.0.0-beta.1";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1,10 +1,10 @@
1
1
  import { PaginationEmits, PaginationProps, PaginationSlots } from "./interface.js";
2
- import * as vue363 from "vue";
2
+ import * as vue365 from "vue";
3
3
  import { SlotsType } from "vue";
4
4
 
5
5
  //#region src/pagination/Pagination.d.ts
6
- declare const Pagination: vue363.DefineSetupFnComponent<PaginationProps, PaginationEmits, SlotsType<PaginationSlots>, PaginationProps & {
6
+ declare const Pagination: vue365.DefineSetupFnComponent<PaginationProps, PaginationEmits, SlotsType<PaginationSlots>, PaginationProps & {
7
7
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
8
- }, vue363.PublicProps>;
8
+ }, vue365.PublicProps>;
9
9
  //#endregion
10
10
  export { Pagination };
@@ -2,7 +2,7 @@ import { SemanticClassNames, SemanticStyles } from "../_util/hooks/useMergeSeman
2
2
  import "../_util/hooks/index.js";
3
3
  import { PopoverSemanticName } from "../popover/index.js";
4
4
  import { PopconfirmProps } from "./index.js";
5
- import * as vue13 from "vue";
5
+ import * as vue57 from "vue";
6
6
  import { CSSProperties } from "vue";
7
7
 
8
8
  //#region src/popconfirm/PurePanel.d.ts
@@ -23,6 +23,6 @@ interface PurePanelProps extends Omit<OverlayProps, 'prefixCls'>, Pick<Popconfir
23
23
  class?: string;
24
24
  style?: CSSProperties;
25
25
  }
26
- declare const PurePanel: vue13.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue13.PublicProps>;
26
+ declare const PurePanel: vue57.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue57.PublicProps>;
27
27
  //#endregion
28
28
  export { PopconfirmLocale, PurePanel };
@@ -7,6 +7,7 @@ import PurePanel_default from "../popover/PurePanel.js";
7
7
  import style_default from "./style/index.js";
8
8
  import { computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
9
9
  import { clsx } from "@v-c/util";
10
+ import { ExclamationCircleFilled } from "@antdv-next/icons";
10
11
 
11
12
  //#region src/popconfirm/PurePanel.tsx
12
13
  function _isSlot(s) {
@@ -17,7 +18,7 @@ const Overlay = /* @__PURE__ */ defineComponent((props) => {
17
18
  const btnPrefixCls = computed(() => config.value?.getPrefixCls?.("btn") ?? "ant-btn");
18
19
  const [contextLocale] = useLocale_default("Popconfirm", en_US_default.Popconfirm);
19
20
  return () => {
20
- const { prefixCls, icon, title, description, cancelText, okText, okType = "primary", okButtonProps, cancelButtonProps, showCancel = true, close, onConfirm, onCancel, onPopupClick, classes, styles } = props;
21
+ const { prefixCls, icon = createVNode(ExclamationCircleFilled, null, null), title, description, cancelText, okText, okType = "primary", okButtonProps, cancelButtonProps, showCancel = true, close, onConfirm, onCancel, onPopupClick, classes, styles } = props;
21
22
  const cancelButtonAttrs = {
22
23
  size: "small",
23
24
  ...cancelButtonProps ?? {}