antdv-next 1.0.0-alpha.4 → 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 (266) 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/_util/tools.js +2 -1
  5. package/dist/_util/wave/WaveEffect.js +6 -1
  6. package/dist/_util/wave/style.js +4 -3
  7. package/dist/affix/index.d.ts +3 -3
  8. package/dist/alert/Alert.d.ts +4 -3
  9. package/dist/alert/Alert.js +1 -1
  10. package/dist/anchor/Anchor.d.ts +5 -5
  11. package/dist/anchor/AnchorLink.js +2 -2
  12. package/dist/anchor/index.d.ts +1 -1
  13. package/dist/antd.js +123 -115
  14. package/dist/app/App.d.ts +2 -2
  15. package/dist/auto-complete/index.d.ts +78 -0
  16. package/dist/auto-complete/index.js +634 -0
  17. package/dist/avatar/Avatar.d.ts +3 -3
  18. package/dist/avatar/AvatarGroup.d.ts +2 -2
  19. package/dist/badge/Ribbon.d.ts +3 -3
  20. package/dist/badge/ScrollNumber.js +1 -1
  21. package/dist/badge/SingleNumber.js +1 -1
  22. package/dist/badge/index.d.ts +3 -3
  23. package/dist/badge/index.js +5 -3
  24. package/dist/badge/style/index.js +1 -1
  25. package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
  26. package/dist/breadcrumb/Breadcrumb.js +0 -8
  27. package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
  28. package/dist/breadcrumb/BreadcrumbItem.js +1 -17
  29. package/dist/breadcrumb/index.d.ts +1 -1
  30. package/dist/button/Button.d.ts +3 -3
  31. package/dist/button/style/variant.js +116 -104
  32. package/dist/calendar/Header.js +1 -1
  33. package/dist/calendar/generateCalendar.d.ts +3 -3
  34. package/dist/calendar/index.d.ts +3 -3
  35. package/dist/calendar/style/index.d.ts +1 -1
  36. package/dist/calendar/style/index.js +1 -1
  37. package/dist/card/Card.d.ts +3 -3
  38. package/dist/card/CardGrid.d.ts +2 -2
  39. package/dist/card/CardMeta.d.ts +3 -3
  40. package/dist/card/style/index.js +11 -2
  41. package/dist/carousel/index.d.ts +3 -3
  42. package/dist/cascader/Panel.d.ts +3 -3
  43. package/dist/cascader/index.d.ts +4 -3
  44. package/dist/cascader/index.js +3 -1
  45. package/dist/checkbox/Checkbox.d.ts +3 -3
  46. package/dist/checkbox/Group.d.ts +3 -3
  47. package/dist/checkbox/style/index.d.ts +1 -1
  48. package/dist/collapse/Collapse.d.ts +3 -3
  49. package/dist/color-picker/ColorPicker.d.ts +3 -3
  50. package/dist/color-picker/ColorPicker.js +13 -2
  51. package/dist/components.d.ts +11 -8
  52. package/dist/components.js +7 -4
  53. package/dist/config-provider/context.d.ts +2 -1
  54. package/dist/config-provider/context.js +3 -3
  55. package/dist/config-provider/define.d.ts +14 -0
  56. package/dist/config-provider/index.d.ts +3 -3
  57. package/dist/config-provider/index.js +21 -2
  58. package/dist/date-picker/generatePicker/generateRangePicker.js +2 -2
  59. package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -2
  60. package/dist/date-picker/generatePicker/index.d.ts +17 -17
  61. package/dist/date-picker/index.d.ts +29 -27
  62. package/dist/date-picker/index.js +3 -0
  63. package/dist/date-picker/style/panel.js +4 -4
  64. package/dist/descriptions/index.d.ts +3 -3
  65. package/dist/divider/index.d.ts +2 -2
  66. package/dist/drawer/index.d.ts +6 -4
  67. package/dist/drawer/index.js +17 -5
  68. package/dist/drawer/useFocusable.d.ts +10 -0
  69. package/dist/drawer/useFocusable.js +18 -0
  70. package/dist/dropdown/dropdown.d.ts +4 -4
  71. package/dist/dropdown/dropdown.js +12 -3
  72. package/dist/empty/index.d.ts +3 -3
  73. package/dist/flex/index.d.ts +3 -3
  74. package/dist/flex/index.js +1 -1
  75. package/dist/float-button/BackTop.d.ts +3 -3
  76. package/dist/float-button/BackTop.js +4 -1
  77. package/dist/float-button/FloatButton.d.ts +3 -3
  78. package/dist/float-button/FloatButtonGroup.d.ts +3 -3
  79. package/dist/float-button/PurePanel.js +5 -5
  80. package/dist/float-button/style/button.js +4 -4
  81. package/dist/float-button/style/group.js +12 -12
  82. package/dist/form/ErrorList.js +4 -7
  83. package/dist/form/Form.d.ts +7 -3
  84. package/dist/form/Form.js +39 -22
  85. package/dist/form/FormItem/ItemHolder.js +0 -1
  86. package/dist/form/FormItem/index.d.ts +5 -5
  87. package/dist/form/FormItem/index.js +48 -29
  88. package/dist/form/FormItemInput.js +17 -19
  89. package/dist/form/style/index.js +3 -2
  90. package/dist/form/utils/valueUtil.js +4 -1
  91. package/dist/grid/col.js +7 -2
  92. package/dist/grid/index.d.ts +2 -2
  93. package/dist/grid/row.d.ts +2 -2
  94. package/dist/grid/style/index.js +7 -5
  95. package/dist/image/PreviewGroup.d.ts +2 -2
  96. package/dist/image/index.d.ts +7 -4
  97. package/dist/image/index.js +2 -0
  98. package/dist/image/style/index.d.ts +1 -1
  99. package/dist/index.d.ts +16 -12
  100. package/dist/index.js +7 -4
  101. package/dist/input/Input.js +1 -1
  102. package/dist/input/OTP/index.js +1 -1
  103. package/dist/input/TextArea.d.ts +3 -3
  104. package/dist/input/TextArea.js +1 -1
  105. package/dist/input/index.d.ts +11 -11
  106. package/dist/input/style/index.d.ts +2 -2
  107. package/dist/input-number/index.d.ts +4 -4
  108. package/dist/input-number/index.js +2 -6
  109. package/dist/input-number/style/index.js +18 -17
  110. package/dist/layout/index.d.ts +6 -6
  111. package/dist/layout/layout.d.ts +2 -2
  112. package/dist/layout/style/sider.js +1 -1
  113. package/dist/masonry/Masonry.d.ts +3 -3
  114. package/dist/masonry/Masonry.js +8 -6
  115. package/dist/mentions/index.d.ts +4 -3
  116. package/dist/mentions/index.js +4 -2
  117. package/dist/mentions/style/index.js +18 -17
  118. package/dist/menu/MenuDivider.d.ts +2 -2
  119. package/dist/menu/MenuItem.d.ts +3 -3
  120. package/dist/menu/index.d.ts +5 -5
  121. package/dist/menu/style/horizontal.js +1 -1
  122. package/dist/menu/style/index.js +5 -5
  123. package/dist/message/PurePanel.d.ts +2 -2
  124. package/dist/message/useMessage.d.ts +1 -0
  125. package/dist/modal/ConfirmDialog.js +1 -1
  126. package/dist/modal/Modal.d.ts +3 -3
  127. package/dist/modal/Modal.js +17 -6
  128. package/dist/modal/PurePanel.js +305 -0
  129. package/dist/modal/index.js +2 -0
  130. package/dist/modal/interface.d.ts +3 -1
  131. package/dist/notification/PurePanel.d.ts +2 -2
  132. package/dist/notification/PurePanel.js +4 -3
  133. package/dist/notification/style/index.d.ts +1 -1
  134. package/dist/notification/useNotification.d.ts +2 -1
  135. package/dist/notification/useNotification.js +7 -7
  136. package/dist/package.d.ts +143 -3
  137. package/dist/package.js +1 -1
  138. package/dist/pagination/Pagination.d.ts +3 -3
  139. package/dist/pagination/Pagination.js +1 -1
  140. package/dist/pagination/style/index.js +61 -50
  141. package/dist/popconfirm/PurePanel.d.ts +2 -2
  142. package/dist/popconfirm/PurePanel.js +2 -1
  143. package/dist/popconfirm/index.d.ts +3 -3
  144. package/dist/popover/PurePanel.js +4 -2
  145. package/dist/popover/index.d.ts +9 -6
  146. package/dist/popover/index.js +2 -1
  147. package/dist/popover/style/index.js +11 -8
  148. package/dist/progress/progress.d.ts +3 -3
  149. package/dist/qrcode/index.d.ts +3 -3
  150. package/dist/radio/index.d.ts +5 -5
  151. package/dist/radio/radio.d.ts +3 -3
  152. package/dist/radio/style/index.js +1 -1
  153. package/dist/rate/index.d.ts +3 -3
  154. package/dist/rate/style/index.d.ts +1 -1
  155. package/dist/result/index.d.ts +3 -3
  156. package/dist/result/noFound.d.ts +2 -2
  157. package/dist/result/serverError.d.ts +2 -2
  158. package/dist/segmented/index.d.ts +3 -3
  159. package/dist/select/index.d.ts +6 -6
  160. package/dist/select/index.js +5 -3
  161. package/dist/select/style/dropdown.js +1 -1
  162. package/dist/select/style/select-input-multiple.js +31 -29
  163. package/dist/select/style/select-input.js +50 -44
  164. package/dist/skeleton/Avatar.d.ts +2 -2
  165. package/dist/skeleton/Button.d.ts +2 -2
  166. package/dist/skeleton/Image.d.ts +2 -2
  167. package/dist/skeleton/Input.d.ts +2 -2
  168. package/dist/skeleton/Node.d.ts +3 -3
  169. package/dist/skeleton/Skeleton.d.ts +3 -3
  170. package/dist/skeleton/Skeleton.js +1 -1
  171. package/dist/skeleton/Title.d.ts +1 -2
  172. package/dist/skeleton/Title.js +0 -5
  173. package/dist/slider/index.d.ts +3 -3
  174. package/dist/space/Compact.d.ts +2 -0
  175. package/dist/space/Compact.js +17 -4
  176. package/dist/space/index.d.ts +5 -5
  177. package/dist/space/style/addon.js +20 -19
  178. package/dist/spin/index.d.ts +3 -3
  179. package/dist/spin/index.js +7 -6
  180. package/dist/splitter/SplitBar.js +9 -2
  181. package/dist/splitter/Splitter.d.ts +3 -3
  182. package/dist/splitter/Splitter.js +2 -1
  183. package/dist/splitter/index.d.ts +2 -2
  184. package/dist/splitter/style/index.js +6 -6
  185. package/dist/statistic/Statistic.d.ts +3 -3
  186. package/dist/statistic/Timer.d.ts +5 -5
  187. package/dist/statistic/index.d.ts +5 -5
  188. package/dist/steps/ProgressIcon.js +9 -2
  189. package/dist/steps/index.d.ts +3 -3
  190. package/dist/steps/index.js +7 -4
  191. package/dist/steps/style/horizontal.js +13 -10
  192. package/dist/steps/style/icon.js +12 -9
  193. package/dist/steps/style/index.js +19 -18
  194. package/dist/steps/style/inline.js +20 -17
  195. package/dist/steps/style/label-placement.js +22 -20
  196. package/dist/steps/style/nav.js +7 -5
  197. package/dist/steps/style/panel.js +34 -32
  198. package/dist/steps/style/progress-dot.js +10 -8
  199. package/dist/steps/style/progress.js +29 -58
  200. package/dist/steps/style/rtl.js +6 -4
  201. package/dist/steps/style/small.js +10 -8
  202. package/dist/steps/style/status.js +124 -121
  203. package/dist/steps/style/util.js +7 -4
  204. package/dist/steps/style/vertical.js +17 -14
  205. package/dist/style/placementArrow.js +7 -5
  206. package/dist/switch/index.d.ts +3 -3
  207. package/dist/table/Column.d.ts +3 -3
  208. package/dist/table/ColumnGroup.d.ts +3 -3
  209. package/dist/table/InternalTable.js +20 -6
  210. package/dist/table/Table.d.ts +3 -3
  211. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  212. package/dist/table/style/index.js +3 -3
  213. package/dist/table/style/radius.js +6 -0
  214. package/dist/table/style/virtual.js +1 -1
  215. package/dist/tabs/TabPane.d.ts +3 -3
  216. package/dist/tabs/index.d.ts +3 -3
  217. package/dist/tag/CheckableTag.d.ts +3 -3
  218. package/dist/tag/CheckableTagGroup.d.ts +3 -3
  219. package/dist/tag/CheckableTagGroup.js +3 -3
  220. package/dist/tag/index.d.ts +3 -3
  221. package/dist/theme/context.d.ts +2 -2
  222. package/dist/theme/index.d.ts +1 -1
  223. package/dist/theme/useToken.d.ts +2 -2
  224. package/dist/theme/useToken.js +1 -1
  225. package/dist/theme/util/genStyleUtils.d.ts +2 -2
  226. package/dist/theme/util/genStyleUtils.js +8 -5
  227. package/dist/theme/util/useResetIconStyle.js +1 -1
  228. package/dist/time-picker/index.d.ts +8 -7
  229. package/dist/time-picker/index.js +17 -13
  230. package/dist/timeline/Timeline.d.ts +3 -3
  231. package/dist/tooltip/PurePanel.d.ts +2 -2
  232. package/dist/tooltip/PurePanel.js +12 -8
  233. package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
  234. package/dist/tooltip/index.d.ts +3 -3
  235. package/dist/tooltip/index.js +2 -3
  236. package/dist/tooltip/style/index.js +10 -8
  237. package/dist/tooltip/util.js +5 -3
  238. package/dist/tour/PurePanel.js +243 -0
  239. package/dist/tour/index.d.ts +3 -3
  240. package/dist/tour/index.js +2 -0
  241. package/dist/tour/style/index.js +5 -4
  242. package/dist/transfer/Actions.d.ts +2 -2
  243. package/dist/transfer/Section.d.ts +2 -2
  244. package/dist/transfer/Transfer.d.ts +3 -3
  245. package/dist/transfer/Transfer.js +2 -2
  246. package/dist/transfer/search.d.ts +3 -3
  247. package/dist/tree/DirectoryTree.d.ts +3 -3
  248. package/dist/tree/Tree.d.ts +3 -3
  249. package/dist/tree/style/index.d.ts +1 -1
  250. package/dist/tree-select/index.d.ts +5 -4
  251. package/dist/tree-select/index.js +3 -1
  252. package/dist/typography/Link.d.ts +3 -3
  253. package/dist/typography/Paragraph.d.ts +3 -3
  254. package/dist/typography/Text.d.ts +3 -3
  255. package/dist/typography/Title.d.ts +3 -3
  256. package/dist/typography/Typography.d.ts +3 -3
  257. package/dist/typography/index.d.ts +9 -9
  258. package/dist/upload/Dragger.d.ts +6 -3
  259. package/dist/upload/Upload.d.ts +3 -3
  260. package/dist/upload/Upload.js +15 -1
  261. package/dist/upload/index.d.ts +6 -3
  262. package/dist/upload/interface.d.ts +4 -4
  263. package/global.d.ts +3 -0
  264. package/package.json +69 -17
  265. package/web-tags.json +5069 -0
  266. package/web-types.json +14335 -0
package/dist/app/App.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { ComponentBaseProps } from "../config-provider/context.js";
2
2
  import { AppConfig } from "./context.js";
3
- import * as vue279 from "vue";
3
+ import * as vue224 from "vue";
4
4
 
5
5
  //#region src/app/App.d.ts
6
6
  interface AppProps extends ComponentBaseProps, AppConfig {
7
7
  component?: any;
8
8
  }
9
- declare const App$1: vue279.DefineSetupFnComponent<AppProps, {}, {}, AppProps & {}, vue279.PublicProps>;
9
+ declare const App$1: vue224.DefineSetupFnComponent<AppProps, {}, {}, AppProps & {}, vue224.PublicProps>;
10
10
  //#endregion
11
11
  export { App$1 as App, AppProps };
@@ -0,0 +1,78 @@
1
+ import { VueNode } from "../_util/type.js";
2
+ import { SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
3
+ import "../_util/hooks/index.js";
4
+ import { InputStatus } from "../_util/statusUtils.js";
5
+ import { InternalSelectProps } from "../select/index.js";
6
+ import * as vue63 from "vue";
7
+ import { App, CSSProperties, SlotsType } from "vue";
8
+ import { Option as Option$1, SelectProps } from "@v-c/select";
9
+
10
+ //#region src/auto-complete/index.d.ts
11
+ type AutoCompleteSemanticName = 'root' | 'prefix' | 'input' | 'placeholder' | 'content';
12
+ type PopupSemantic = 'root' | 'listItem' | 'list';
13
+ interface DataSourceItemObject {
14
+ value: string;
15
+ text: string;
16
+ }
17
+ type DataSourceItemType = DataSourceItemObject | VueNode;
18
+ type AutoCompleteClassNamesType = SemanticClassNamesType<AutoCompleteProps, AutoCompleteSemanticName, {
19
+ popup?: SemanticClassNames<PopupSemantic>;
20
+ }>;
21
+ type AutoCompleteStylesType = SemanticStylesType<AutoCompleteProps, AutoCompleteSemanticName, {
22
+ popup?: SemanticStyles<PopupSemantic>;
23
+ }>;
24
+ type RcEventKeys = 'onClear' | 'onKeyUp' | 'onKeyDown' | 'onBlur' | 'onClick' | 'onActive' | 'onChange' | 'onDeselect' | 'onInputKeyDown' | 'onMouseDown' | 'onMouseLeave' | 'onMouseEnter' | 'onFocus' | 'onPopupScroll' | 'onPopupVisibleChange' | 'onSelect' | 'onSearch';
25
+ interface AutoCompleteProps extends Omit<InternalSelectProps, 'loading' | 'mode' | 'optionLabelProp' | 'labelInValue' | 'classes' | 'styles' | 'getInputElement' | 'getRawInputElement' | RcEventKeys> {
26
+ /** @deprecated Please use `options` instead */
27
+ dataSource?: DataSourceItemType[];
28
+ status?: InputStatus;
29
+ /** @deprecated Please use `classes.popup.root` instead */
30
+ popupClassName?: string;
31
+ /** @deprecated Please use `classes.popup.root` instead */
32
+ dropdownClassName?: string;
33
+ /** @deprecated Please use `popupMatchSelectWidth` instead */
34
+ dropdownMatchSelectWidth?: boolean | number;
35
+ popupMatchSelectWidth?: boolean | number;
36
+ styles?: AutoCompleteStylesType;
37
+ classes?: AutoCompleteClassNamesType;
38
+ /** @deprecated Please use `popupRender` instead */
39
+ dropdownRender?: (menu: VueNode) => any;
40
+ popupRender?: (menu: VueNode) => any;
41
+ /** @deprecated Please use `styles.popup.root` instead */
42
+ dropdownStyle?: CSSProperties;
43
+ }
44
+ interface AutoCompleteEmits {
45
+ 'openChange': (open: boolean) => void;
46
+ 'dropdownVisibleChange': (open: boolean) => void;
47
+ 'clear': NonNullable<SelectProps['onClear']>;
48
+ 'keydown': NonNullable<SelectProps['onKeyDown']>;
49
+ 'keyup': NonNullable<SelectProps['onKeyUp']>;
50
+ 'blur': NonNullable<SelectProps['onBlur']>;
51
+ 'update:value': (value: any) => void;
52
+ 'click': NonNullable<SelectProps['onClick']>;
53
+ 'active': NonNullable<SelectProps['onActive']>;
54
+ 'change': NonNullable<SelectProps['onChange']>;
55
+ 'deselect': NonNullable<SelectProps['onDeselect']>;
56
+ 'inputKeydown': NonNullable<SelectProps['onInputKeyDown']>;
57
+ 'mousedown': NonNullable<SelectProps['onMouseDown']>;
58
+ 'mouseleave': NonNullable<SelectProps['onMouseLeave']>;
59
+ 'mouseenter': NonNullable<SelectProps['onMouseEnter']>;
60
+ 'focus': NonNullable<SelectProps['onFocus']>;
61
+ 'popupScroll': NonNullable<SelectProps['onPopupScroll']>;
62
+ 'select': NonNullable<SelectProps['onSelect']>;
63
+ 'search': NonNullable<SelectProps['onSearch']>;
64
+ [key: string]: (...args: any[]) => void;
65
+ }
66
+ interface AutoCompleteSlots {
67
+ default?: () => any;
68
+ }
69
+ declare const InternalAutoComplete: vue63.DefineSetupFnComponent<AutoCompleteProps, AutoCompleteEmits, SlotsType<AutoCompleteSlots>, AutoCompleteProps & {
70
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
71
+ }, vue63.PublicProps>;
72
+ declare const AutoComplete: typeof InternalAutoComplete & {
73
+ Option: typeof Option$1;
74
+ install: (app: App) => void;
75
+ _InternalPanelDoNotUseOrYouWillBeFired: any;
76
+ };
77
+ //#endregion
78
+ export { AutoComplete, AutoCompleteClassNamesType, AutoCompleteEmits, AutoCompleteProps, AutoCompleteSlots, AutoCompleteStylesType, DataSourceItemObject, DataSourceItemType, Option$1 as Option };
@@ -0,0 +1,634 @@
1
+ import { useComponentBaseConfig } from "../config-provider/context.js";
2
+ import { getAttrStyleAndClass as getAttrStyleAndClass$1, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
+ import { devUseWarning, isDev } from "../_util/warning.js";
4
+ import "../_util/hooks/index.js";
5
+ import { toPropsRefs } from "../_util/tools.js";
6
+ import PurePanel_default from "../_util/PurePanel.js";
7
+ import select_default from "../select/index.js";
8
+ import { Text, computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
9
+ import { clsx } from "@v-c/util";
10
+ import { filterEmpty } from "@v-c/util/dist/props-util";
11
+ import { omit } from "es-toolkit";
12
+ import { toArray } from "es-toolkit/compat";
13
+ import { Option as Option$1 } from "@v-c/select";
14
+
15
+ //#region src/auto-complete/index.tsx
16
+ function _isSlot(s) {
17
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
18
+ }
19
+ function isSelectOptionOrSelectOptGroup(child) {
20
+ return child?.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
21
+ }
22
+ const omitKeys = [
23
+ "dataSource",
24
+ "dropdownClassName",
25
+ "popupClassName",
26
+ "dropdownMatchSelectWidth",
27
+ "dropdownRender",
28
+ "dropdownStyle",
29
+ "classes",
30
+ "styles",
31
+ "popupRender"
32
+ ];
33
+ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
34
+ const { prefixCls } = useComponentBaseConfig("select", props);
35
+ const { classes, styles } = toPropsRefs(props, "classes", "styles");
36
+ const mergedProps = computed(() => {
37
+ return {
38
+ ...props,
39
+ popupMatchSelectWidth: props.popupMatchSelectWidth ?? props.dropdownMatchSelectWidth,
40
+ popupRender: props.popupRender ?? props.dropdownRender
41
+ };
42
+ });
43
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
44
+ return () => {
45
+ const { className, style, restAttrs } = getAttrStyleAndClass$1(attrs);
46
+ const childNodes = toArray(filterEmpty(slots.default?.() ?? []));
47
+ const hasSelectOptions = !!childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0]);
48
+ let customizeInput;
49
+ if (childNodes.length === 1 && isVNode(childNodes[0]) && childNodes[0].type !== Text && !isSelectOptionOrSelectOptGroup(childNodes[0])) [customizeInput] = childNodes;
50
+ const getInputElement = customizeInput ? () => customizeInput : void 0;
51
+ let optionChildren = [];
52
+ if (hasSelectOptions) optionChildren = childNodes;
53
+ else if (props.dataSource) optionChildren = props.dataSource.map((item) => {
54
+ if (isVNode(item)) return item;
55
+ switch (typeof item) {
56
+ case "string": return createVNode(Option$1, {
57
+ "key": item,
58
+ "value": item
59
+ }, _isSlot(item) ? item : { default: () => [item] });
60
+ case "object": {
61
+ const { value: optionValue, text } = item;
62
+ return createVNode(Option$1, {
63
+ "key": optionValue,
64
+ "value": optionValue
65
+ }, _isSlot(text) ? text : { default: () => [text] });
66
+ }
67
+ default: return null;
68
+ }
69
+ });
70
+ optionChildren = filterEmpty(optionChildren);
71
+ if (isDev) {
72
+ const warning = devUseWarning("AutoComplete");
73
+ warning(!(customizeInput && props.size !== void 0), "usage", "You need to control style self instead of setting `size` when using customize input.");
74
+ Object.entries({
75
+ dropdownMatchSelectWidth: "popupMatchSelectWidth",
76
+ dropdownStyle: "styles.popup.root",
77
+ dropdownClassName: "classes.popup.root",
78
+ popupClassName: "classes.popup.root",
79
+ dropdownRender: "popupRender",
80
+ dataSource: "options"
81
+ }).forEach(([oldProp, newProp]) => {
82
+ warning.deprecated(!props[oldProp], oldProp, newProp);
83
+ });
84
+ }
85
+ const mergedPopupRender = props.popupRender ?? props.dropdownRender;
86
+ const mergedPopupMatchSelectWidth = props.popupMatchSelectWidth ?? props.dropdownMatchSelectWidth;
87
+ const finalClassNames = {
88
+ root: clsx(`${prefixCls.value}-auto-complete`, mergedClassNames.value.root, { [`${prefixCls.value}-customize`]: customizeInput }, className),
89
+ prefix: mergedClassNames.value.prefix,
90
+ input: mergedClassNames.value.input,
91
+ placeholder: mergedClassNames.value.placeholder,
92
+ content: mergedClassNames.value.content,
93
+ popup: {
94
+ root: clsx(props.popupClassName, props.dropdownClassName, mergedClassNames.value.popup?.root),
95
+ list: mergedClassNames.value.popup?.list,
96
+ listItem: mergedClassNames.value.popup?.listItem
97
+ }
98
+ };
99
+ const finalStyles = {
100
+ root: mergedStyles.value.root,
101
+ prefix: mergedStyles.value.prefix,
102
+ input: mergedStyles.value.input,
103
+ placeholder: mergedStyles.value.placeholder,
104
+ content: mergedStyles.value.content,
105
+ popup: {
106
+ root: {
107
+ ...props.dropdownStyle,
108
+ ...mergedStyles.value.popup?.root
109
+ },
110
+ list: mergedStyles.value.popup?.list,
111
+ listItem: mergedStyles.value.popup?.listItem
112
+ }
113
+ };
114
+ return createVNode(select_default, mergeProps(restAttrs, omit(props, omitKeys), {
115
+ onSelect: (...args) => {
116
+ emit("select", ...args);
117
+ },
118
+ onClear: (...args) => {
119
+ emit("clear", ...args);
120
+ },
121
+ onKeydown: (...args) => {
122
+ emit("keydown", ...args);
123
+ },
124
+ onKeyup: (...args) => {
125
+ emit("keyup", ...args);
126
+ },
127
+ onBlur: (...args) => {
128
+ emit("blur", ...args);
129
+ },
130
+ onFocus: (...args) => {
131
+ emit("focus", ...args);
132
+ },
133
+ onClick: (...args) => {
134
+ emit("click", ...args);
135
+ },
136
+ onActive: (...args) => {
137
+ emit("active", ...args);
138
+ },
139
+ onChange: (...args) => {
140
+ emit("change", ...args);
141
+ },
142
+ onDeselect: (...args) => {
143
+ emit("deselect", ...args);
144
+ },
145
+ onInputKeydown: (...args) => {
146
+ emit("inputKeydown", ...args);
147
+ },
148
+ onMousedown: (...args) => {
149
+ emit("mousedown", ...args);
150
+ },
151
+ onMouseleave: (...args) => {
152
+ emit("mouseleave", ...args);
153
+ },
154
+ onMouseenter: (...args) => {
155
+ emit("mouseenter", ...args);
156
+ },
157
+ onPopupScroll: (...args) => {
158
+ emit("popupScroll", ...args);
159
+ },
160
+ onSearch: (...args) => {
161
+ emit("search", ...args);
162
+ },
163
+ onOpenChange: (open) => {
164
+ emit("openChange", open);
165
+ },
166
+ onDropdownVisibleChange: (open) => {
167
+ emit("dropdownVisibleChange", open);
168
+ }
169
+ }, getInputElement ? { getInputElement } : {}, {
170
+ "prefixCls": prefixCls.value,
171
+ "classes": finalClassNames,
172
+ "styles": finalStyles,
173
+ "style": style,
174
+ "popupRender": mergedPopupRender,
175
+ "popupMatchSelectWidth": mergedPopupMatchSelectWidth,
176
+ "mode": select_default.SECRET_COMBOBOX_MODE_DO_NOT_USE,
177
+ "suffixIcon": null
178
+ }, { "onUpdate:value": (value) => emit("update:value", value) }), _isSlot(optionChildren) ? optionChildren : { default: () => [optionChildren] });
179
+ };
180
+ }, {
181
+ emits: [
182
+ "openChange",
183
+ "dropdownVisibleChange",
184
+ "clear",
185
+ "keydown",
186
+ "keyup",
187
+ "blur",
188
+ "update:value",
189
+ "click",
190
+ "active",
191
+ "change",
192
+ "deselect",
193
+ "inputKeydown",
194
+ "mousedown",
195
+ "mouseleave",
196
+ "mouseenter",
197
+ "focus",
198
+ "popupScroll",
199
+ "select",
200
+ "search"
201
+ ],
202
+ props: {
203
+ dataSource: {
204
+ type: Array,
205
+ required: false,
206
+ default: void 0
207
+ },
208
+ status: {
209
+ type: String,
210
+ required: false,
211
+ default: void 0
212
+ },
213
+ popupClassName: {
214
+ type: String,
215
+ required: false,
216
+ default: void 0
217
+ },
218
+ dropdownClassName: {
219
+ type: String,
220
+ required: false,
221
+ default: void 0
222
+ },
223
+ dropdownMatchSelectWidth: {
224
+ type: [Boolean, Number],
225
+ required: false,
226
+ default: void 0
227
+ },
228
+ popupMatchSelectWidth: {
229
+ type: [Boolean, Number],
230
+ required: false,
231
+ default: void 0
232
+ },
233
+ styles: {
234
+ type: [Object, Function],
235
+ required: false,
236
+ default: void 0
237
+ },
238
+ classes: {
239
+ type: [Object, Function],
240
+ required: false,
241
+ default: void 0
242
+ },
243
+ dropdownRender: {
244
+ type: Function,
245
+ required: false,
246
+ default: void 0
247
+ },
248
+ popupRender: {
249
+ type: Function,
250
+ required: false,
251
+ default: void 0
252
+ },
253
+ dropdownStyle: {
254
+ type: Object,
255
+ required: false,
256
+ default: void 0
257
+ },
258
+ prefix: {
259
+ type: [
260
+ Function,
261
+ Boolean,
262
+ String,
263
+ Number,
264
+ null,
265
+ Object
266
+ ],
267
+ required: false,
268
+ default: void 0
269
+ },
270
+ suffixIcon: {
271
+ type: [
272
+ Function,
273
+ Boolean,
274
+ String,
275
+ Number,
276
+ null,
277
+ Object
278
+ ],
279
+ required: false,
280
+ default: void 0
281
+ },
282
+ size: {
283
+ type: [String, null],
284
+ required: false,
285
+ default: void 0
286
+ },
287
+ disabled: {
288
+ type: Boolean,
289
+ required: false,
290
+ default: void 0
291
+ },
292
+ bordered: {
293
+ type: Boolean,
294
+ required: false,
295
+ default: void 0
296
+ },
297
+ showArrow: {
298
+ type: Boolean,
299
+ required: false,
300
+ default: void 0
301
+ },
302
+ variant: {
303
+ type: String,
304
+ required: false,
305
+ default: void 0
306
+ },
307
+ rootClass: {
308
+ type: String,
309
+ required: false,
310
+ default: void 0
311
+ },
312
+ prefixCls: {
313
+ type: String,
314
+ required: false,
315
+ default: void 0
316
+ },
317
+ id: {
318
+ type: String,
319
+ required: false,
320
+ default: void 0
321
+ },
322
+ backfill: {
323
+ type: Boolean,
324
+ required: false,
325
+ default: void 0
326
+ },
327
+ fieldNames: {
328
+ type: Object,
329
+ required: false,
330
+ default: void 0
331
+ },
332
+ showSearch: {
333
+ type: [Boolean, Object],
334
+ required: false,
335
+ default: void 0
336
+ },
337
+ searchValue: {
338
+ type: String,
339
+ required: false,
340
+ default: void 0
341
+ },
342
+ autoClearSearchValue: {
343
+ type: Boolean,
344
+ required: false,
345
+ default: void 0
346
+ },
347
+ filterOption: {
348
+ type: [Boolean, Function],
349
+ required: false,
350
+ default: void 0
351
+ },
352
+ filterSort: {
353
+ type: Function,
354
+ required: false,
355
+ default: void 0
356
+ },
357
+ optionFilterProp: {
358
+ type: String,
359
+ required: false,
360
+ default: void 0
361
+ },
362
+ options: {
363
+ type: Array,
364
+ required: false,
365
+ default: void 0
366
+ },
367
+ optionRender: {
368
+ type: Function,
369
+ required: false,
370
+ default: void 0
371
+ },
372
+ defaultActiveFirstOption: {
373
+ type: Boolean,
374
+ required: false,
375
+ default: void 0
376
+ },
377
+ virtual: {
378
+ type: Boolean,
379
+ required: false,
380
+ default: void 0
381
+ },
382
+ direction: {
383
+ type: String,
384
+ required: false,
385
+ default: void 0
386
+ },
387
+ listHeight: {
388
+ type: Number,
389
+ required: false,
390
+ default: void 0
391
+ },
392
+ listItemHeight: {
393
+ type: Number,
394
+ required: false,
395
+ default: void 0
396
+ },
397
+ labelRender: {
398
+ type: Function,
399
+ required: false,
400
+ default: void 0
401
+ },
402
+ menuItemSelectedIcon: {
403
+ type: [
404
+ Object,
405
+ Function,
406
+ String,
407
+ Number,
408
+ null,
409
+ Boolean,
410
+ Array
411
+ ],
412
+ required: false,
413
+ default: void 0
414
+ },
415
+ value: {
416
+ required: false,
417
+ default: void 0
418
+ },
419
+ defaultValue: {
420
+ required: false,
421
+ default: void 0
422
+ },
423
+ maxCount: {
424
+ type: Number,
425
+ required: false,
426
+ default: void 0
427
+ },
428
+ tagRender: {
429
+ type: Function,
430
+ required: false,
431
+ default: void 0
432
+ },
433
+ autoFocus: {
434
+ type: Boolean,
435
+ required: false,
436
+ default: void 0
437
+ },
438
+ placeholder: {
439
+ type: [
440
+ Object,
441
+ Function,
442
+ String,
443
+ Number,
444
+ null,
445
+ Boolean,
446
+ Array
447
+ ],
448
+ required: false,
449
+ default: void 0
450
+ },
451
+ title: {
452
+ type: String,
453
+ required: false,
454
+ default: void 0
455
+ },
456
+ tabIndex: {
457
+ type: Number,
458
+ required: false,
459
+ default: void 0
460
+ },
461
+ notFoundContent: {
462
+ type: [
463
+ Object,
464
+ Function,
465
+ String,
466
+ Number,
467
+ null,
468
+ Boolean,
469
+ Array
470
+ ],
471
+ required: false,
472
+ default: void 0
473
+ },
474
+ maxLength: {
475
+ type: Number,
476
+ required: false,
477
+ default: void 0
478
+ },
479
+ showScrollBar: {
480
+ type: [Boolean, String],
481
+ required: false,
482
+ default: void 0
483
+ },
484
+ choiceTransitionName: {
485
+ type: String,
486
+ required: false,
487
+ default: void 0
488
+ },
489
+ open: {
490
+ type: Boolean,
491
+ required: false,
492
+ default: void 0
493
+ },
494
+ defaultOpen: {
495
+ type: Boolean,
496
+ required: false,
497
+ default: void 0
498
+ },
499
+ maxTagTextLength: {
500
+ type: Number,
501
+ required: false,
502
+ default: void 0
503
+ },
504
+ maxTagCount: {
505
+ type: [Number, String],
506
+ required: false,
507
+ default: void 0
508
+ },
509
+ maxTagPlaceholder: {
510
+ type: [
511
+ Object,
512
+ Function,
513
+ String,
514
+ Number,
515
+ null,
516
+ Boolean,
517
+ Array
518
+ ],
519
+ required: false,
520
+ default: void 0
521
+ },
522
+ tokenSeparators: {
523
+ type: Array,
524
+ required: false,
525
+ default: void 0
526
+ },
527
+ allowClear: {
528
+ type: [Boolean, Object],
529
+ required: false,
530
+ default: void 0
531
+ },
532
+ suffix: {
533
+ type: [
534
+ Object,
535
+ Function,
536
+ String,
537
+ Number,
538
+ null,
539
+ Boolean,
540
+ Array
541
+ ],
542
+ required: false,
543
+ default: void 0
544
+ },
545
+ clearIcon: {
546
+ type: [
547
+ Object,
548
+ Function,
549
+ String,
550
+ Number,
551
+ null,
552
+ Boolean,
553
+ Array
554
+ ],
555
+ required: false,
556
+ default: void 0
557
+ },
558
+ removeIcon: {
559
+ type: [
560
+ Object,
561
+ Function,
562
+ String,
563
+ Number,
564
+ null,
565
+ Boolean,
566
+ Array
567
+ ],
568
+ required: false,
569
+ default: void 0
570
+ },
571
+ animation: {
572
+ type: String,
573
+ required: false,
574
+ default: void 0
575
+ },
576
+ transitionName: {
577
+ type: String,
578
+ required: false,
579
+ default: void 0
580
+ },
581
+ popupStyle: {
582
+ type: Object,
583
+ required: false,
584
+ default: void 0
585
+ },
586
+ popupAlign: {
587
+ type: Object,
588
+ required: false,
589
+ default: void 0
590
+ },
591
+ placement: {
592
+ type: String,
593
+ required: false,
594
+ default: void 0
595
+ },
596
+ builtinPlacements: {
597
+ type: Object,
598
+ required: false,
599
+ default: void 0
600
+ },
601
+ getPopupContainer: {
602
+ type: Function,
603
+ required: false,
604
+ default: void 0
605
+ },
606
+ showAction: {
607
+ type: Array,
608
+ required: false,
609
+ default: void 0
610
+ },
611
+ components: {
612
+ type: Object,
613
+ required: false,
614
+ default: void 0
615
+ }
616
+ },
617
+ name: "AAutoComplete",
618
+ inheritAttrs: false
619
+ });
620
+ const AutoComplete = InternalAutoComplete;
621
+ /* istanbul ignore next */
622
+ const PurePanel = PurePanel_default(InternalAutoComplete, "popupAlign", (props) => {
623
+ return omit(props, ["visible"]);
624
+ });
625
+ AutoComplete.Option = Option$1;
626
+ AutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
627
+ AutoComplete.install = (app) => {
628
+ app.component(AutoComplete.name, AutoComplete);
629
+ app.component("AAutoCompleteOption", Option$1);
630
+ };
631
+ var auto_complete_default = AutoComplete;
632
+
633
+ //#endregion
634
+ export { Option$1 as Option, auto_complete_default as default };