antdv-next 1.5.0 → 1.5.2

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/hooks/useClosable.d.ts +4 -2
  2. package/dist/_util/hooks/useClosable.js +9 -3
  3. package/dist/_util/hooks/useMergeSemantic.d.ts +7 -4
  4. package/dist/_util/hooks/useMergeSemantic.js +8 -3
  5. package/dist/_util/statusUtils.d.ts +1 -1
  6. package/dist/_util/vueNode.d.ts +2 -6
  7. package/dist/alert/style/index.d.ts +5 -0
  8. package/dist/alert/style/index.js +2 -1
  9. package/dist/anchor/Anchor.js +12 -6
  10. package/dist/antd-with-locales.esm.js +12799 -12587
  11. package/dist/antd-with-locales.js +82 -82
  12. package/dist/antd.css +1 -1
  13. package/dist/antd.esm.js +10540 -10546
  14. package/dist/antd.js +57 -57
  15. package/dist/avatar/AvatarGroup.d.ts +4 -1
  16. package/dist/avatar/AvatarGroup.js +6 -4
  17. package/dist/avatar/index.d.ts +2 -2
  18. package/dist/badge/Ribbon.d.ts +4 -1
  19. package/dist/badge/Ribbon.js +11 -11
  20. package/dist/badge/index.d.ts +3 -2
  21. package/dist/badge/index.js +26 -24
  22. package/dist/border-beam/BorderBeam.d.ts +1 -0
  23. package/dist/border-beam/BorderBeam.js +30 -11
  24. package/dist/border-beam/hooks/useBorderSize.d.ts +3 -7
  25. package/dist/border-beam/hooks/useBorderSize.js +25 -26
  26. package/dist/border-beam/style/index.js +9 -8
  27. package/dist/border-beam/util.d.ts +3 -1
  28. package/dist/border-beam/util.js +4 -1
  29. package/dist/breadcrumb/Breadcrumb.d.ts +4 -1
  30. package/dist/breadcrumb/Breadcrumb.js +12 -7
  31. package/dist/breadcrumb/index.d.ts +2 -2
  32. package/dist/button/Button.js +5 -14
  33. package/dist/button/buttonHelper.d.ts +1 -1
  34. package/dist/button/style/index.js +0 -1
  35. package/dist/calendar/generateCalendar.d.ts +4 -1
  36. package/dist/calendar/generateCalendar.js +8 -5
  37. package/dist/calendar/index.d.ts +2 -2
  38. package/dist/calendar/locale/sq_AL.d.ts +2 -0
  39. package/dist/calendar/locale/sq_AL.js +5 -0
  40. package/dist/card/CardGrid.d.ts +4 -1
  41. package/dist/card/CardGrid.js +7 -4
  42. package/dist/card/CardMeta.d.ts +4 -1
  43. package/dist/card/CardMeta.js +5 -3
  44. package/dist/card/index.d.ts +3 -3
  45. package/dist/carousel/index.d.ts +1 -0
  46. package/dist/carousel/index.js +13 -10
  47. package/dist/collapse/Collapse.js +2 -4
  48. package/dist/color-picker/ColorPicker.js +4 -7
  49. package/dist/color-picker/components/ColorTrigger.js +1 -1
  50. package/dist/color-picker/style/index.js +1 -0
  51. package/dist/components.d.ts +25 -21
  52. package/dist/components.js +4 -3
  53. package/dist/config-provider/context.d.ts +24 -8
  54. package/dist/config-provider/define.d.ts +2 -1
  55. package/dist/config-provider/index.js +10 -0
  56. package/dist/date-picker/generatePicker/generateRangePicker.js +6 -7
  57. package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -5
  58. package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
  59. package/dist/date-picker/hooks/useMergedPickerSemantic.d.ts +1 -1
  60. package/dist/date-picker/hooks/useMergedPickerSemantic.js +7 -3
  61. package/dist/date-picker/locale/sq_AL.d.ts +6 -0
  62. package/dist/date-picker/locale/sq_AL.js +72 -0
  63. package/dist/date-picker/locale/zh_TW.js +2 -2
  64. package/dist/date-picker/util.d.ts +2 -6
  65. package/dist/descriptions/hooks/useItems.d.ts +4 -4
  66. package/dist/descriptions/index.d.ts +4 -1
  67. package/dist/descriptions/index.js +5 -2
  68. package/dist/divider/index.d.ts +4 -1
  69. package/dist/divider/index.js +9 -6
  70. package/dist/drawer/DrawerPanel.js +5 -3
  71. package/dist/drawer/index.js +9 -13
  72. package/dist/drawer/style/index.js +1 -0
  73. package/dist/dropdown/dropdown.js +4 -6
  74. package/dist/empty/index.d.ts +4 -1
  75. package/dist/empty/index.js +5 -2
  76. package/dist/float-button/BackTop.d.ts +2 -0
  77. package/dist/float-button/BackTop.js +25 -43
  78. package/dist/float-button/FloatButtonGroup.d.ts +4 -1
  79. package/dist/float-button/FloatButtonGroup.js +5 -4
  80. package/dist/float-button/hooks/useScroll.d.ts +16 -0
  81. package/dist/float-button/hooks/useScroll.js +80 -0
  82. package/dist/float-button/index.d.ts +2 -2
  83. package/dist/float-button/style/button.js +23 -0
  84. package/dist/form/ErrorList.js +2 -2
  85. package/dist/form/FormItem/ItemHolder.js +1 -1
  86. package/dist/form/FormItem/index.js +26 -28
  87. package/dist/form/context.d.ts +1 -1
  88. package/dist/form/hooks/useVariant.d.ts +2 -2
  89. package/dist/form/hooks/useVariant.js +15 -5
  90. package/dist/form/style/index.js +25 -12
  91. package/dist/form/types.d.ts +11 -3
  92. package/dist/form/utils/validateUtil.js +4 -0
  93. package/dist/image/hooks/usePreviewConfig.d.ts +5 -4
  94. package/dist/image/index.js +8 -9
  95. package/dist/index.d.ts +25 -21
  96. package/dist/index.js +2 -2
  97. package/dist/input/OTP/index.js +6 -3
  98. package/dist/input/Password.js +4 -1
  99. package/dist/input/Search.js +11 -6
  100. package/dist/input/index.d.ts +1 -1
  101. package/dist/input/style/token.js +2 -1
  102. package/dist/input/style/variants.js +1 -1
  103. package/dist/listy/interface.d.ts +3 -2
  104. package/dist/listy/style/index.js +5 -1
  105. package/dist/locale/en_US.js +4 -0
  106. package/dist/locale/index.d.ts +4 -0
  107. package/dist/locale/is_IS.js +1 -1
  108. package/dist/locale/mn_MN.js +1 -1
  109. package/dist/locale/sq_AL.d.ts +5 -0
  110. package/dist/locale/sq_AL.js +151 -0
  111. package/dist/locale/zh_CN.js +4 -0
  112. package/dist/locale/zh_TW.js +41 -41
  113. package/dist/masonry/Masonry.js +4 -4
  114. package/dist/mentions/index.d.ts +1 -0
  115. package/dist/mentions/index.js +4 -0
  116. package/dist/menu/MenuItem.js +12 -2
  117. package/dist/menu/SubMenu.d.ts +1 -1
  118. package/dist/menu/style/vertical.js +2 -6
  119. package/dist/message/useMessage.js +4 -4
  120. package/dist/modal/PurePanel.js +4 -7
  121. package/dist/notification/index.js +2 -1
  122. package/dist/notification/useNotification.js +12 -9
  123. package/dist/package.js +1 -1
  124. package/dist/package.json.d.ts +4 -0
  125. package/dist/pagination/Pagination.js +14 -6
  126. package/dist/pagination/index.d.ts +2 -2
  127. package/dist/pagination/interface.d.ts +20 -3
  128. package/dist/popconfirm/index.js +17 -8
  129. package/dist/popover/PurePanel.js +10 -0
  130. package/dist/popover/index.js +24 -16
  131. package/dist/qrcode/index.d.ts +4 -1
  132. package/dist/qrcode/index.js +16 -13
  133. package/dist/radio/group.js +2 -2
  134. package/dist/rate/style/index.js +12 -9
  135. package/dist/result/index.d.ts +4 -1
  136. package/dist/result/index.js +7 -4
  137. package/dist/select/index.js +1 -1
  138. package/dist/select/style/dropdown.js +4 -0
  139. package/dist/select/style/index.js +1 -1
  140. package/dist/select/style/select-input.js +1 -1
  141. package/dist/select/style/token.js +4 -2
  142. package/dist/select/useIcons.d.ts +2 -6
  143. package/dist/skeleton/Skeleton.d.ts +4 -1
  144. package/dist/skeleton/Skeleton.js +10 -4
  145. package/dist/skeleton/index.d.ts +2 -2
  146. package/dist/slider/SliderTooltip.js +5 -0
  147. package/dist/slider/index.d.ts +5 -1
  148. package/dist/slider/index.js +9 -9
  149. package/dist/space/Compact.d.ts +5 -2
  150. package/dist/space/Compact.js +8 -3
  151. package/dist/space/index.d.ts +2 -2
  152. package/dist/space/index.js +3 -3
  153. package/dist/spin/index.d.ts +4 -1
  154. package/dist/spin/index.js +7 -5
  155. package/dist/splitter/Splitter.d.ts +4 -1
  156. package/dist/splitter/Splitter.js +4 -2
  157. package/dist/splitter/index.d.ts +2 -2
  158. package/dist/splitter/style/index.js +2 -1
  159. package/dist/statistic/Statistic.d.ts +4 -1
  160. package/dist/statistic/index.d.ts +2 -2
  161. package/dist/steps/index.js +6 -8
  162. package/dist/steps/style/index.js +2 -1
  163. package/dist/table/InternalTable.js +5 -4
  164. package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
  165. package/dist/table/style/radius.js +4 -0
  166. package/dist/table/style/virtual.js +4 -0
  167. package/dist/tag/hooks/useColor.d.ts +1 -1
  168. package/dist/tag/index.js +3 -3
  169. package/dist/theme/interface/seeds.d.ts +8 -0
  170. package/dist/theme/themes/seed.js +1 -0
  171. package/dist/theme/util/alias.js +1 -1
  172. package/dist/time-picker/locale/sq_AL.d.ts +5 -0
  173. package/dist/time-picker/locale/sq_AL.js +7 -0
  174. package/dist/timeline/Timeline.js +5 -7
  175. package/dist/tooltip/PurePanel.js +5 -0
  176. package/dist/tooltip/index.d.ts +1 -0
  177. package/dist/tooltip/index.js +27 -13
  178. package/dist/tour/index.js +10 -13
  179. package/dist/tour/panelRender.js +2 -8
  180. package/dist/transfer/ListBody.js +2 -1
  181. package/dist/transfer/ListItem.d.ts +1 -0
  182. package/dist/transfer/ListItem.js +6 -2
  183. package/dist/transfer/Transfer.d.ts +4 -1
  184. package/dist/transfer/Transfer.js +5 -2
  185. package/dist/transfer/index.d.ts +2 -2
  186. package/dist/transfer/search.js +2 -2
  187. package/dist/tree/index.d.ts +3 -2
  188. package/dist/tree/index.js +3 -2
  189. package/dist/tree/style/index.js +4 -0
  190. package/dist/tree/utils/dictUtil.js +3 -2
  191. package/dist/typography/Base/EllipsisTooltip.d.ts +6 -1
  192. package/dist/typography/Base/EllipsisTooltip.js +2 -2
  193. package/dist/typography/Base/index.js +9 -26
  194. package/dist/typography/hooks/useCopyClick.d.ts +1 -1
  195. package/dist/typography/hooks/useCopyClick.js +5 -15
  196. package/dist/upload/Upload.js +7 -9
  197. package/dist/upload/UploadList/ListItem.js +6 -13
  198. package/dist/upload/UploadList/index.js +8 -2
  199. package/dist/upload/index.d.ts +2 -2
  200. package/dist/version/token-meta.json +1 -0
  201. package/dist/version/token.json +1 -0
  202. package/dist/watermark/index.d.ts +4 -1
  203. package/dist/watermark/index.js +2 -1
  204. package/package.json +13 -9
  205. package/web-tags.json +1980 -1947
  206. package/web-types.json +5808 -5730
  207. package/dist/slider/useRafLock.d.ts +0 -5
  208. package/dist/slider/useRafLock.js +0 -23
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.5.0";
2
+ var version = "1.5.2";
3
3
  //#endregion
4
4
  export { version };
@@ -21,6 +21,10 @@ declare const _exports: {
21
21
  import: string;
22
22
  default: string;
23
23
  };
24
+ "./version/token.json": string;
25
+ "./version/token-meta.json": string;
26
+ "./dist/version/token.json": string;
27
+ "./dist/version/token-meta.json": string;
24
28
  "./dist/*": {
25
29
  types: string[];
26
30
  import: string[];
@@ -11,7 +11,7 @@ import useBreakpoint from "../grid/hooks/useBreakpoint.js";
11
11
  import style_default from "./style/index.js";
12
12
  import bordered_default from "./style/bordered.js";
13
13
  import resolveShowSizeChanger from "./useShowSizeChanger.js";
14
- import { Fragment, computed, createVNode, defineComponent, mergeProps } from "vue";
14
+ import { Fragment, computed, createVNode, defineComponent, h, mergeProps } from "vue";
15
15
  import { clsx } from "@v-c/util";
16
16
  import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
17
17
  import { DoubleLeftOutlined, DoubleRightOutlined, EllipsisOutlined, LeftOutlined, RightOutlined } from "@antdv-next/icons";
@@ -27,7 +27,8 @@ const omitKeys = [
27
27
  "styles",
28
28
  "showSizeChanger",
29
29
  "pageSizeOptions",
30
- "selectComponentClass"
30
+ "selectComponentClass",
31
+ "components"
31
32
  ];
32
33
  const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
33
34
  const { getPrefixCls, prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, showSizeChanger: contextShowSizeChangerConfig } = useComponentBaseConfig("pagination", props, ["showSizeChanger"]);
@@ -59,6 +60,13 @@ const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
59
60
  const mergedPageSizeOptions = computed(() => props.pageSizeOptions?.map((option) => Number(option)));
60
61
  const sizeChangerRender = (info) => {
61
62
  const { disabled, size: pageSize, onSizeChange, "aria-label": ariaLabel, className: sizeChangerClassName, options } = info;
63
+ const SizeChangerComponent = props.components?.sizeChanger;
64
+ if (SizeChangerComponent) return h(SizeChangerComponent, {
65
+ "value": pageSize,
66
+ "disabled": !!disabled,
67
+ "onChange": onSizeChange,
68
+ "class": sizeChangerClassName
69
+ });
62
70
  const selectProps = mergedShowSizeChangerSelectProps.value ?? {};
63
71
  const propSelectClass = selectProps.class ?? selectProps.className;
64
72
  const propSelectOnChange = selectProps.onChange;
@@ -189,6 +197,10 @@ const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
189
197
  type: String,
190
198
  required: false
191
199
  },
200
+ components: {
201
+ type: Object,
202
+ required: false
203
+ },
192
204
  showSizeChanger: {
193
205
  type: [Boolean, Object],
194
206
  required: false,
@@ -308,10 +320,6 @@ const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
308
320
  type: String,
309
321
  required: false
310
322
  },
311
- sizeChangerRender: {
312
- type: Function,
313
- required: false
314
- },
315
323
  showLessItems: {
316
324
  type: Boolean,
317
325
  required: false,
@@ -1,6 +1,6 @@
1
- import { PaginationClassNamesType, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationSlots, PaginationStylesType } from "./interface.js";
1
+ import { PaginationClassNamesType, PaginationComponents, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationSizeChangerProps, PaginationSlots, PaginationStylesType } from "./interface.js";
2
2
  import Pagination, { InternalPaginationProps } from "./Pagination.js";
3
3
  //#region src/pagination/index.d.ts
4
4
  type PaginationProps = InternalPaginationProps;
5
5
  //#endregion
6
- export { type PaginationClassNamesType, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, PaginationProps, type PaginationSlots, type PaginationStylesType, Pagination as default };
6
+ export { type PaginationClassNamesType, type PaginationComponents, type PaginationConfig, type PaginationEmits, type PaginationLocale, type PaginationPosition, PaginationProps, type PaginationSizeChangerProps, type PaginationSlots, type PaginationStylesType, Pagination as default };
@@ -3,7 +3,7 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
3
3
  import "../_util/hooks/index.js";
4
4
  import { SizeType } from "../config-provider/SizeContext.js";
5
5
  import { SelectProps } from "../select/index.js";
6
- import { CSSProperties } from "vue";
6
+ import { CSSProperties, Component } from "vue";
7
7
  import { PaginationProps as PaginationProps$1 } from "@v-c/pagination";
8
8
  //#region src/pagination/interface.d.ts
9
9
  interface PaginationLocale {
@@ -31,7 +31,23 @@ interface PaginationSemanticStyles {
31
31
  }
32
32
  type PaginationClassNamesType = SemanticClassNamesType<PaginationProps, PaginationSemanticClassNames>;
33
33
  type PaginationStylesType = SemanticStylesType<PaginationProps, PaginationSemanticStyles>;
34
- interface PaginationProps extends Omit<PaginationProps$1, 'className' | 'style' | 'classNames' | 'styles' | 'locale' | 'showSizeChanger' | 'pageSizeOptions' | 'prevIcon' | 'nextIcon' | 'jumpPrevIcon' | 'jumpNextIcon' | 'onChange' | 'onShowSizeChange'> {
34
+ interface PaginationSizeChangerProps {
35
+ /** Current `pageSize` */
36
+ value: number;
37
+ /** Whether the pagination is disabled */
38
+ disabled: boolean;
39
+ /**
40
+ * Emitted as the `change` event when the user picks another page size.
41
+ * Also accepted as an `onChange` prop.
42
+ */
43
+ onChange?: (value: number) => void;
44
+ /** Injected through attrs, `ant-pagination-options-size-changer` */
45
+ class?: string;
46
+ }
47
+ interface PaginationComponents {
48
+ sizeChanger?: Component<PaginationSizeChangerProps>;
49
+ }
50
+ interface PaginationProps extends Omit<PaginationProps$1, 'className' | 'style' | 'classNames' | 'styles' | 'locale' | 'showSizeChanger' | 'pageSizeOptions' | 'prevIcon' | 'nextIcon' | 'jumpPrevIcon' | 'jumpNextIcon' | 'sizeChangerRender' | 'onChange' | 'onShowSizeChange'> {
35
51
  showQuickJumper?: boolean | {
36
52
  goButton?: VueNode;
37
53
  };
@@ -39,6 +55,7 @@ interface PaginationProps extends Omit<PaginationProps$1, 'className' | 'style'
39
55
  responsive?: boolean;
40
56
  totalBoundaryShowSizeChanger?: number;
41
57
  rootClass?: string;
58
+ components?: PaginationComponents;
42
59
  showSizeChanger?: boolean | SelectProps;
43
60
  pageSizeOptions?: (string | number)[];
44
61
  classes?: PaginationClassNamesType;
@@ -77,4 +94,4 @@ interface PaginationSlots {
77
94
  jumpNextIcon?: () => any;
78
95
  }
79
96
  //#endregion
80
- export { PaginationClassNamesType, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationProps, PaginationSemanticClassNames, PaginationSemanticName, PaginationSemanticStyles, PaginationSlots, PaginationStylesType, SemanticName };
97
+ export { PaginationClassNamesType, PaginationComponents, PaginationConfig, PaginationEmits, PaginationLocale, PaginationPosition, PaginationProps, PaginationSemanticClassNames, PaginationSemanticName, PaginationSemanticStyles, PaginationSizeChangerProps, PaginationSlots, PaginationStylesType, SemanticName };
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1, useLiveListener } from "../_util/tools.js";
4
4
  import useMergedArrow from "../tooltip/hooks/useMergedArrow.js";
5
5
  import Popover from "../popover/index.js";
@@ -29,11 +29,18 @@ const OMITTED_PROP_KEYS = [
29
29
  ];
30
30
  const defaultIcon = createVNode(ExclamationCircleFilled, null, null);
31
31
  const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
32
- const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, prefixCls } = useComponentBaseConfig("popconfirm", props, ["arrow", "trigger"]);
32
+ const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, mouseEnterDelay: contextMouseEnterDelay, mouseLeaveDelay: contextMouseLeaveDelay, prefixCls } = useComponentBaseConfig("popconfirm", props, [
33
+ "arrow",
34
+ "trigger",
35
+ "mouseEnterDelay",
36
+ "mouseLeaveDelay"
37
+ ]);
33
38
  const { arrow: arrowProp, classes, styles } = toPropsRefs$1(props, "arrow", "classes", "styles");
34
39
  const [hashId, cssVarCls] = style_default(prefixCls);
35
40
  const mergedArrow = useMergedArrow(arrowProp, contextArrow);
36
41
  const mergedTrigger = computed(() => props?.trigger ?? contextTrigger.value ?? "click");
42
+ const mergedMouseEnterDelay = computed(() => props?.mouseEnterDelay ?? contextMouseEnterDelay.value ?? .1);
43
+ const mergedMouseLeaveDelay = computed(() => props?.mouseLeaveDelay ?? contextMouseLeaveDelay.value ?? .1);
37
44
  const popoverRef = shallowRef();
38
45
  const open = shallowRef(props.open ?? props.defaultOpen ?? false);
39
46
  watch(() => props.open, (val, prevVal) => {
@@ -67,9 +74,12 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
67
74
  });
68
75
  const mergedProps = computed(() => ({
69
76
  ...props,
70
- trigger: mergedTrigger.value
77
+ trigger: mergedTrigger.value,
78
+ mouseEnterDelay: mergedMouseEnterDelay.value,
79
+ mouseLeaveDelay: mergedMouseLeaveDelay.value
71
80
  }));
72
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
81
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
82
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
73
83
  const rootClassNames = computed(() => clsx(prefixCls.value, hashId.value, cssVarCls.value, contextClassName.value, mergedClassNames.value.root));
74
84
  return () => {
75
85
  const titleNode = getSlotPropsFnRun(slots, props, "title") ?? props.title;
@@ -98,6 +108,8 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
98
108
  }, null);
99
109
  return createVNode(Popover, mergeProps(attrs, removeUndefined(restProps), {
100
110
  "trigger": mergedTrigger.value,
111
+ "mouseEnterDelay": mergedMouseEnterDelay.value,
112
+ "mouseLeaveDelay": mergedMouseLeaveDelay.value,
101
113
  "ref": popoverRef,
102
114
  "open": open.value,
103
115
  "arrow": mergedArrow.value,
@@ -109,10 +121,7 @@ const Popconfirm = /* @__PURE__ */ defineComponent((props, { slots, attrs, expos
109
121
  arrow: mergedClassNames.value.arrow
110
122
  },
111
123
  "styles": {
112
- root: {
113
- ...mergedStyles.value.root,
114
- ...contextStyle.value
115
- },
124
+ root: mergedStyles.value.root,
116
125
  container: mergedStyles.value.container,
117
126
  arrow: mergedStyles.value.arrow
118
127
  }
@@ -177,6 +177,11 @@ const RawPurePanel = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
177
177
  required: false,
178
178
  default: void 0
179
179
  },
180
+ disabled: {
181
+ type: Boolean,
182
+ required: false,
183
+ default: void 0
184
+ },
180
185
  getPopupContainer: {
181
186
  type: Function,
182
187
  required: false
@@ -325,6 +330,11 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
325
330
  required: false,
326
331
  default: void 0
327
332
  },
333
+ disabled: {
334
+ type: Boolean,
335
+ required: false,
336
+ default: void 0
337
+ },
328
338
  getPopupContainer: {
329
339
  type: Function,
330
340
  required: false
@@ -1,5 +1,5 @@
1
1
  import { useComponentBaseConfig } from "../config-provider/context.js";
2
- import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
3
3
  import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
4
4
  import useMergedArrow from "../tooltip/hooks/useMergedArrow.js";
5
5
  import InternalTooltip from "../tooltip/index.js";
@@ -13,12 +13,19 @@ import { getTransitionName } from "@v-c/util/dist/utils/transition";
13
13
  import KeyCode from "@v-c/util/dist/KeyCode";
14
14
  //#region src/popover/index.tsx
15
15
  const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
16
- const { getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, prefixCls } = useComponentBaseConfig("popover", props, ["arrow", "trigger"]);
16
+ const { getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger, mouseEnterDelay: contextMouseEnterDelay, mouseLeaveDelay: contextMouseLeaveDelay, prefixCls } = useComponentBaseConfig("popover", props, [
17
+ "arrow",
18
+ "trigger",
19
+ "mouseEnterDelay",
20
+ "mouseLeaveDelay"
21
+ ]);
17
22
  const { arrow: popoverArrow, classes, styles } = toPropsRefs$1(props, "arrow", "classes", "styles");
18
23
  const rootCls = computed(() => getPrefixCls());
19
24
  const [hashId, cssVarCls] = style_default(prefixCls);
20
25
  const mergedArrow = useMergedArrow(popoverArrow, contextArrow);
21
26
  const mergedTrigger = computed(() => props?.trigger ?? contextTrigger.value ?? "hover");
27
+ const mergedMouseEnterDelay = computed(() => props?.mouseEnterDelay ?? contextMouseEnterDelay.value ?? .1);
28
+ const mergedMouseLeaveDelay = computed(() => props?.mouseLeaveDelay ?? contextMouseLeaveDelay.value ?? .1);
22
29
  const popoverRef = shallowRef();
23
30
  const forceAlign = () => {
24
31
  popoverRef.value?.forceAlign?.();
@@ -30,9 +37,12 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
30
37
  });
31
38
  const mergedProps = computed(() => ({
32
39
  ...props,
33
- trigger: mergedTrigger.value
40
+ trigger: mergedTrigger.value,
41
+ mouseEnterDelay: mergedMouseEnterDelay.value,
42
+ mouseLeaveDelay: mergedMouseLeaveDelay.value
34
43
  }));
35
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
44
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
45
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
36
46
  const open = shallowRef(props?.open ?? props?.defaultOpen ?? false);
37
47
  watch(() => props.open, (val, prevVal) => {
38
48
  if (val !== void 0) open.value = val;
@@ -51,7 +61,7 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
51
61
  };
52
62
  return () => {
53
63
  const children = filterEmpty(slots?.default?.() ?? [])?.[0];
54
- const { placement, mouseLeaveDelay, mouseEnterDelay, motion, ...restProps } = props;
64
+ const { placement, mouseLeaveDelay: _mouseLeaveDelay, mouseEnterDelay: _mouseEnterDelay, motion, ...restProps } = props;
55
65
  const titleNode = getSlotPropsFnRun(slots, props, "title");
56
66
  const contentNode = getSlotPropsFnRun(slots, props, "content");
57
67
  const rootClassNames = clsx(hashId.value, cssVarCls.value, contextClassName.value, mergedClassNames.value.root);
@@ -60,8 +70,8 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
60
70
  "arrow": mergedArrow.value,
61
71
  "placement": placement,
62
72
  "trigger": mergedTrigger.value,
63
- "mouseLeaveDelay": mouseLeaveDelay,
64
- "mouseEnterDelay": mouseEnterDelay
73
+ "mouseLeaveDelay": mergedMouseLeaveDelay.value,
74
+ "mouseEnterDelay": mergedMouseEnterDelay.value
65
75
  }, removeUndefined(restProps), {
66
76
  "prefixCls": prefixCls.value,
67
77
  "classes": {
@@ -70,10 +80,7 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
70
80
  arrow: mergedClassNames.value?.arrow
71
81
  },
72
82
  "styles": {
73
- root: {
74
- ...mergedStyles.value?.root,
75
- ...contextStyle.value
76
- },
83
+ root: mergedStyles.value?.root,
77
84
  container: mergedStyles.value?.container,
78
85
  arrow: mergedStyles.value?.arrow
79
86
  },
@@ -176,6 +183,11 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
176
183
  required: false,
177
184
  default: void 0
178
185
  },
186
+ disabled: {
187
+ type: Boolean,
188
+ required: false,
189
+ default: void 0
190
+ },
179
191
  getPopupContainer: {
180
192
  type: Function,
181
193
  required: false
@@ -223,11 +235,7 @@ const Popover = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose,
223
235
  type: String,
224
236
  required: false
225
237
  }
226
- }, {
227
- placement: "top",
228
- mouseEnterDelay: .1,
229
- mouseLeaveDelay: .1
230
- }),
238
+ }, { placement: "top" }),
231
239
  emits: ["openChange", "update:open"],
232
240
  name: "APopover",
233
241
  inheritAttrs: false
@@ -5,7 +5,10 @@ interface InternalQRCodeProps extends QRCodeProps$1, QRCodeEmitsProps {}
5
5
  interface QRCodeEmitsProps {
6
6
  onRefresh?: QRCodeEmits['refresh'];
7
7
  }
8
+ interface QRCodeRef {
9
+ nativeElement: HTMLDivElement;
10
+ }
8
11
  declare const QRCode: import("vue").DefineSetupFnComponent<InternalQRCodeProps, QRCodeEmits, SlotsType<QRCodeSlots>, InternalQRCodeProps, import("vue").PublicProps>;
9
12
  type QRCodeProps = InternalQRCodeProps;
10
13
  //#endregion
11
- export { InternalQRCodeProps, type QRCodeEmits, QRCodeEmitsProps, QRCodeProps, QRCode as default };
14
+ export { InternalQRCodeProps, type QRCodeEmits, QRCodeEmitsProps, QRCodeProps, QRCodeRef, QRCode as default };
@@ -1,18 +1,18 @@
1
1
  import { devUseWarning, isDev } from "../_util/warning.js";
2
2
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
3
  import useToken from "../theme/useToken.js";
4
- import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
4
+ import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
5
5
  import { toPropsRefs } from "../_util/tools.js";
6
6
  import useLocale from "../locale/useLocale.js";
7
7
  import QRcodeStatus from "./QrcodeStatus.js";
8
8
  import style_default from "./style/index.js";
9
- import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
9
+ import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
10
10
  import { classNames } from "@v-c/util";
11
11
  import { omit } from "es-toolkit";
12
12
  import pickAttrs from "@v-c/util/dist/pickAttrs";
13
13
  import { QRCodeCanvas, QRCodeSVG } from "@v-c/qrcode";
14
14
  //#region src/qrcode/index.tsx
15
- const QRCode = /* @__PURE__ */ defineComponent((props, { emit, attrs, slots }) => {
15
+ const QRCode = /* @__PURE__ */ defineComponent((props, { emit, attrs, slots, expose }) => {
16
16
  const { prefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("qrcode", props);
17
17
  const { styles, classes } = toPropsRefs(props, "styles", "classes");
18
18
  const [hashId, cssVarCls] = style_default(prefixCls);
@@ -34,7 +34,10 @@ const QRCode = /* @__PURE__ */ defineComponent((props, { emit, attrs, slots }) =
34
34
  const mergedProps = computed(() => {
35
35
  return props;
36
36
  });
37
- const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
37
+ const contextStyleRoot = useSemanticRootStyle(contextStyle);
38
+ const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
39
+ const nativeElementRef = shallowRef();
40
+ expose({ nativeElement: nativeElementRef });
38
41
  return () => {
39
42
  const { type, value, size, errorLevel, bgColor, icon, boostLevel, bordered, rootClass, status, marginSize } = props;
40
43
  const statusRender = slots?.statusRender ?? props?.statusRender;
@@ -68,16 +71,16 @@ const QRCode = /* @__PURE__ */ defineComponent((props, { emit, attrs, slots }) =
68
71
  let _height = style?.height ?? size;
69
72
  if (typeof _width === "number") _width = `${_width}px`;
70
73
  if (typeof _height === "number") _height = `${_height}px`;
71
- return createVNode("div", mergeProps(restProps, {
74
+ const rootStyle = {
75
+ backgroundColor: bgColor,
76
+ ...mergedStyles.value?.root,
77
+ ...style,
78
+ width: _width,
79
+ height: _height
80
+ };
81
+ return createVNode("div", mergeProps({ "ref": nativeElementRef }, restProps, {
72
82
  "class": mergedCls,
73
- "style": {
74
- backgroundColor: bgColor,
75
- ...mergedStyles.value?.root,
76
- ...contextStyle.value,
77
- ...style,
78
- width: _width,
79
- height: _height
80
- }
83
+ "style": rootStyle
81
84
  }), [status !== "active" && createVNode("div", {
82
85
  "class": [`${prefixCls.value}-cover`, mergedClassNames.value.cover],
83
86
  "style": mergedStyles.value.cover
@@ -84,7 +84,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
84
84
  item: option,
85
85
  index
86
86
  }) : option.label;
87
- return createVNode(InternalRadio, {
87
+ return createVNode(InternalRadio, mergeProps({
88
88
  "key": `radio-group-value-options-${option.value}`,
89
89
  "prefixCls": prefixCls.value,
90
90
  "disabled": option.disabled || disabled,
@@ -95,7 +95,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
95
95
  "class": option.class,
96
96
  "id": option.id,
97
97
  "required": option.required
98
- }, _isSlot(_label) ? _label : { default: () => [_label] });
98
+ }, { onChange: option.onChange }), _isSlot(_label) ? _label : { default: () => [_label] });
99
99
  });
100
100
  return createVNode("div", mergeProps(pickAttrs(restAttrs, {
101
101
  aria: true,
@@ -16,7 +16,7 @@ const genRateStarStyle = (token) => {
16
16
  "&:hover": { transform: token.starHoverScale },
17
17
  "&:focus": { outline: 0 },
18
18
  "&:focus-visible": {
19
- outline: `${unit(token.lineWidth)} dashed ${token.starColor}`,
19
+ outline: `${unit(token.lineWidthFocus)} dashed ${token.starColor}`,
20
20
  transform: token.starHoverScale
21
21
  }
22
22
  },
@@ -61,14 +61,17 @@ const genRateStyle = (token) => {
61
61
  ...genRateRtlStyle(token)
62
62
  } };
63
63
  };
64
- const prepareComponentToken = (token) => ({
65
- starColor: token.yellow6,
66
- starSize: token.controlHeight * .625,
67
- starSizeSM: token.controlHeightSM * .625,
68
- starSizeLG: token.controlHeightLG * .625,
69
- starHoverScale: "scale(1.1)",
70
- starBg: token.colorFillContent
71
- });
64
+ const prepareComponentToken = (token) => {
65
+ return {
66
+ lineWidthFocus: token.lineWidthFocus === 0 ? 0 : token.lineWidth,
67
+ starColor: token.yellow6,
68
+ starSize: token.controlHeight * .625,
69
+ starSizeSM: token.controlHeightSM * .625,
70
+ starSizeLG: token.controlHeightLG * .625,
71
+ starHoverScale: "scale(1.1)",
72
+ starBg: token.colorFillContent
73
+ };
74
+ };
72
75
  var style_default = genStyleHooks("Rate", (token) => {
73
76
  const rateToken = mergeToken(token, {});
74
77
  return genRateStyle(rateToken);
@@ -43,6 +43,9 @@ interface ResultProps extends ComponentBaseProps {
43
43
  classes?: ResultClassNamesType;
44
44
  styles?: ResultStylesType;
45
45
  }
46
+ interface ResultRef {
47
+ nativeElement: HTMLDivElement;
48
+ }
46
49
  interface ResultSlots {
47
50
  icon?: () => any;
48
51
  title?: () => any;
@@ -57,4 +60,4 @@ declare const _default: typeof Result & {
57
60
  PRESENTED_IMAGE_500: (typeof ExceptionMap)["500"];
58
61
  };
59
62
  //#endregion
60
- export { ExceptionMap, ExceptionStatusType, IconMap, ResultClassNamesType, ResultProps, ResultSemanticClassNames, ResultSemanticName, ResultSemanticStyles, ResultSlots, ResultStatusType, ResultStylesType, _default as default };
63
+ export { ExceptionMap, ExceptionStatusType, IconMap, ResultClassNamesType, ResultProps, ResultRef, ResultSemanticClassNames, ResultSemanticName, ResultSemanticStyles, ResultSlots, ResultStatusType, ResultStylesType, _default as default };
@@ -5,7 +5,7 @@ import NoFound from "./noFound.js";
5
5
  import ServerError from "./serverError.js";
6
6
  import style_default from "./style/index.js";
7
7
  import Unauthorized from "./unauthorized.js";
8
- import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
8
+ import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
9
9
  import { classNames } from "@v-c/util";
10
10
  import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
11
11
  import { CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, WarningFilled } from "@antdv-next/icons";
@@ -73,13 +73,15 @@ const Extra = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
73
73
  } }, { extra: void 0 }),
74
74
  inheritAttrs: false
75
75
  });
76
- const Result = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
76
+ const Result = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
77
77
  const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("result", props);
78
78
  const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
79
79
  const [hashId, cssVarCls] = style_default(prefixCls);
80
80
  const mergedProps = computed(() => props);
81
81
  const contextStyleRoot = useSemanticRootStyle(contextStyle);
82
82
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
83
+ const nativeElementRef = shallowRef();
84
+ expose({ nativeElement: nativeElementRef });
83
85
  return () => {
84
86
  const { status, rootClass } = props;
85
87
  const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
@@ -95,10 +97,11 @@ const Result = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
95
97
  const extraClassNames = clsx$1(`${prefixCls.value}-extra`, mergedClassNames.value.extra);
96
98
  const bodyClassNames = clsx$1(`${prefixCls.value}-body`, mergedClassNames.value.body);
97
99
  const iconClassNames = clsx$1(`${prefixCls.value}-icon`, { [`${prefixCls.value}-image`]: ExceptionStatus.includes(`${status}`) }, mergedClassNames.value.icon);
98
- return createVNode("div", mergeProps(pickAttrs(restAttrs, {
100
+ const restProps = pickAttrs(restAttrs, {
99
101
  aria: true,
100
102
  data: true
101
- }), {
103
+ });
104
+ return createVNode("div", mergeProps({ "ref": nativeElementRef }, restProps, {
102
105
  "class": rootClassNames,
103
106
  "style": rootStyles
104
107
  }), [
@@ -414,7 +414,7 @@ const Select = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, at
414
414
  required: false
415
415
  },
416
416
  optionFilterProp: {
417
- type: String,
417
+ type: [String, Array],
418
418
  required: false
419
419
  },
420
420
  optionLabelProp: {
@@ -55,6 +55,10 @@ const genSingleStyle = (token) => {
55
55
  ${slideUpLeaveActive}${dropdownPlacementCls}topRight
56
56
  `]: { animationName: slideDownOut },
57
57
  "&-hidden": { display: "none" },
58
+ [`${componentCls}-dropdown-list-scrollbar`]: {
59
+ cursor: "pointer",
60
+ "&:hover": { backgroundColor: token.colorFillQuaternary }
61
+ },
58
62
  [selectItemCls]: {
59
63
  ...genItemStyle(token),
60
64
  cursor: "pointer",
@@ -14,7 +14,7 @@ const genBaseStyle = (token) => {
14
14
  opacity: 0,
15
15
  pointerEvents: "none"
16
16
  },
17
- [`&${componentCls}-allow-clear:not(${componentCls}-show-arrow) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
17
+ [`&${componentCls}-allow-clear:not(${componentCls}-show-arrow):not(${componentCls}-customize) ${componentCls}-content`]: { marginInlineEnd: token.showArrowPaddingInlineEnd }
18
18
  };
19
19
  return {
20
20
  [componentCls]: {
@@ -53,7 +53,7 @@ function genSelectInputVariantStyle(token, variant, colors, errorColors = {}, wa
53
53
  }
54
54
  function genSelectInputFocusVisibleStyle(token, outlineColor) {
55
55
  return {
56
- outline: `${unit(token.lineWidth)} ${token.lineType} ${outlineColor}`,
56
+ outline: `${unit(token.lineWidthFocus)} ${token.lineType} ${outlineColor}`,
57
57
  outlineOffset: unit(token.calc(token.lineWidth).mul(-1).equal()),
58
58
  transition: [`outline-offset`, `outline`].map((prop) => `${prop} 0s`).join(", ")
59
59
  };
@@ -1,13 +1,15 @@
1
1
  //#region src/select/style/token.ts
2
2
  const prepareComponentToken = (token) => {
3
- const { fontSize, lineHeight, lineWidth, controlHeight, controlHeightSM, controlHeightLG, paddingXXS, controlPaddingHorizontal, zIndexPopupBase, colorText, fontWeightStrong, controlItemBgActive, controlItemBgHover, colorBgContainer, colorFillSecondary, colorBgContainerDisabled, colorTextDisabled, colorPrimaryHover, colorPrimary, controlOutline } = token;
3
+ const { fontSize, lineHeight, lineWidth, lineWidthFocus, controlHeight, controlHeightSM, controlHeightLG, paddingXXS, controlPaddingHorizontal, zIndexPopupBase, colorText, fontWeightStrong, controlItemBgActive, controlItemBgHover, colorBgContainer, colorFillSecondary, colorBgContainerDisabled, colorTextDisabled, colorPrimaryHover, colorPrimary, controlOutline } = token;
4
4
  const dblPaddingXXS = paddingXXS * 2;
5
5
  const dblLineWidth = lineWidth * 2;
6
6
  const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
7
7
  const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
8
8
  const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
9
+ const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
9
10
  return {
10
- INTERNAL_FIXED_ITEM_MARGIN: Math.floor(paddingXXS / 2),
11
+ lineWidthFocus: lineWidthFocus === 0 ? 0 : lineWidth,
12
+ INTERNAL_FIXED_ITEM_MARGIN,
11
13
  zIndexPopup: zIndexPopupBase + 50,
12
14
  optionSelectedColor: colorText,
13
15
  optionSelectedFontWeight: fontWeightStrong,
@@ -21,12 +21,8 @@ declare function useIcons({ suffixIcon, clearIcon, menuItemSelectedIcon, removeI
21
21
  open: boolean;
22
22
  showSearch: boolean;
23
23
  }) => import("vue/jsx-runtime").JSX.Element | null) | null;
24
- itemIcon: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
25
- [key: string]: any;
26
- }> | RenderNodeFn<any[]> | null;
27
- removeIcon: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
28
- [key: string]: any;
29
- }> | RenderNodeFn<any[]> | null;
24
+ itemIcon: string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null;
25
+ removeIcon: string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null;
30
26
  };
31
27
  //#endregion
32
28
  export { useIcons as default };
@@ -41,6 +41,9 @@ interface SkeletonProps extends ComponentBaseProps {
41
41
  classes?: SkeletonClassNamesType;
42
42
  styles?: SkeletonStylesType;
43
43
  }
44
+ interface SkeletonRef {
45
+ nativeElement: HTMLDivElement | null;
46
+ }
44
47
  interface SkeletonSlots {
45
48
  default?: () => any;
46
49
  }
@@ -54,4 +57,4 @@ type SkeletonType = typeof Skeleton & {
54
57
  };
55
58
  declare const SkeletonWithSubComponents: SkeletonType;
56
59
  //#endregion
57
- export { SkeletonAvatar, SkeletonButton, SkeletonClassNamesType, SkeletonImage, SkeletonInput, SkeletonNode, SkeletonProps, SkeletonSemanticClassNames, SkeletonSemanticName, SkeletonSemanticStyles, SkeletonSlots, SkeletonStylesType, SkeletonType, SkeletonWithSubComponents as default };
60
+ export { SkeletonAvatar, SkeletonButton, SkeletonClassNamesType, SkeletonImage, SkeletonInput, SkeletonNode, SkeletonProps, SkeletonRef, SkeletonSemanticClassNames, SkeletonSemanticName, SkeletonSemanticStyles, SkeletonSlots, SkeletonStylesType, SkeletonType, SkeletonWithSubComponents as default };
@@ -10,7 +10,7 @@ import SkeletonImage from "./Image.js";
10
10
  import SkeletonInput from "./Input.js";
11
11
  import Paragraph from "./Paragraph.js";
12
12
  import Title from "./Title.js";
13
- import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
13
+ import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
14
14
  import { classNames } from "@v-c/util";
15
15
  import { omit } from "es-toolkit";
16
16
  //#region src/skeleton/Skeleton.tsx
@@ -40,13 +40,15 @@ function getParagraphBasicProps(hasAvatar, hasTitle) {
40
40
  else basicProps.rows = 2;
41
41
  return basicProps;
42
42
  }
43
- const Skeleton = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
43
+ const Skeleton = /* @__PURE__ */ defineComponent((props, { attrs, slots, expose }) => {
44
44
  const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("skeleton", props);
45
45
  const [hashId, cssVarCls] = style_default(prefixCls);
46
46
  const { classes, styles } = toPropsRefs(props, "classes", "styles");
47
47
  const mergedProps = computed(() => props);
48
48
  const contextStyleRoot = useSemanticRootStyle(contextStyle);
49
49
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
50
+ const nativeElementRef = shallowRef(null);
51
+ expose({ nativeElement: nativeElementRef });
50
52
  return () => {
51
53
  const { loading, rootClass, avatar = false, title = true, paragraph = true, active, round } = props;
52
54
  if (loading || loading === void 0) {
@@ -90,12 +92,16 @@ const Skeleton = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
90
92
  "style": mergedStyles.value.section
91
93
  }, [$title, paragraphNode]);
92
94
  }
93
- return createVNode("div", mergeProps({ "class": classNames(prefixCls.value, {
95
+ const cls = classNames(prefixCls.value, {
94
96
  [`${prefixCls.value}-with-avatar`]: hasAvatar,
95
97
  [`${prefixCls.value}-active`]: active,
96
98
  [`${prefixCls.value}-rtl`]: direction.value === "rtl",
97
99
  [`${prefixCls.value}-round`]: round
98
- }, mergedClassNames.value.root, contextClassName.value, attrs?.class, rootClass, hashId.value, cssVarCls.value) }, omit(attrs, ["class", "style"]), { "style": [mergedStyles.value.root, attrs?.style] }), [avatarNode, contentNode]);
100
+ }, mergedClassNames.value.root, contextClassName.value, attrs?.class, rootClass, hashId.value, cssVarCls.value);
101
+ return createVNode("div", mergeProps({
102
+ "ref": nativeElementRef,
103
+ "class": cls
104
+ }, omit(attrs, ["class", "style"]), { "style": [mergedStyles.value.root, attrs?.style] }), [avatarNode, contentNode]);
99
105
  }
100
106
  return slots.default?.() ?? null;
101
107
  };