antdv-next 1.8.2 → 1.8.4

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 (137) hide show
  1. package/dist/_util/hooks/index.d.ts +2 -1
  2. package/dist/_util/hooks/index.js +2 -1
  3. package/dist/_util/hooks/useClosable.d.ts +3 -3
  4. package/dist/_util/hooks/useClosable.js +9 -9
  5. package/dist/_util/hooks/useScopeId.d.ts +7 -0
  6. package/dist/_util/hooks/useScopeId.js +15 -0
  7. package/dist/_util/scrollTo.js +1 -1
  8. package/dist/_util/statusUtils.js +1 -1
  9. package/dist/_util/vueNode.d.ts +2 -6
  10. package/dist/affix/index.js +2 -7
  11. package/dist/anchor/Anchor.js +4 -2
  12. package/dist/antd-with-locales.esm.js +17314 -16799
  13. package/dist/antd-with-locales.js +81 -81
  14. package/dist/antd.css +1 -1
  15. package/dist/antd.esm.js +14978 -14467
  16. package/dist/antd.js +81 -81
  17. package/dist/badge/SingleNumber.js +11 -2
  18. package/dist/badge/index.d.ts +4 -1
  19. package/dist/badge/index.js +4 -4
  20. package/dist/button/buttonHelper.d.ts +1 -1
  21. package/dist/button/style/index.js +8 -2
  22. package/dist/calendar/generateCalendar.d.ts +5 -4
  23. package/dist/calendar/generateCalendar.js +4 -7
  24. package/dist/card/Card.d.ts +4 -1
  25. package/dist/card/Card.js +24 -18
  26. package/dist/card/index.d.ts +2 -2
  27. package/dist/cascader/index.d.ts +5 -2
  28. package/dist/cascader/index.js +10 -7
  29. package/dist/checkbox/Checkbox.js +3 -0
  30. package/dist/checkbox/Group.d.ts +2 -1
  31. package/dist/checkbox/Group.js +3 -7
  32. package/dist/color-picker/ColorPicker.js +4 -0
  33. package/dist/color-picker/ColorPickerPanel.js +4 -0
  34. package/dist/color-picker/components/ColorSlider.js +12 -4
  35. package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
  36. package/dist/components.d.ts +13 -9
  37. package/dist/components.js +3 -3
  38. package/dist/config-provider/context.d.ts +3 -3
  39. package/dist/config-provider/context.js +3 -3
  40. package/dist/date-picker/generatePicker/generateRangePicker.js +4 -5
  41. package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -6
  42. package/dist/descriptions/hooks/useItems.d.ts +6 -6
  43. package/dist/descriptions/hooks/useRow.js +1 -1
  44. package/dist/float-button/FloatButtonGroup.js +3 -1
  45. package/dist/float-button/style/button.js +2 -2
  46. package/dist/form/Form.d.ts +17 -44
  47. package/dist/form/Form.js +54 -5
  48. package/dist/form/FormItem/ItemHolder.js +1 -1
  49. package/dist/form/FormItem/index.d.ts +3 -3
  50. package/dist/form/FormItem/index.js +4 -0
  51. package/dist/form/context.d.ts +3 -3
  52. package/dist/form/hooks/useForm.d.ts +4 -5
  53. package/dist/form/index.d.ts +29 -3
  54. package/dist/form/index.js +6 -6
  55. package/dist/form/types.d.ts +15 -7
  56. package/dist/image/hooks/usePreviewConfig.d.ts +6 -6
  57. package/dist/image/index.d.ts +5 -5
  58. package/dist/index.d.ts +15 -8
  59. package/dist/index.js +2 -2
  60. package/dist/input/Group.d.ts +3 -2
  61. package/dist/input/Group.js +23 -19
  62. package/dist/input/Input.d.ts +8 -1
  63. package/dist/input/Input.js +4 -0
  64. package/dist/input/OTP/OTPInput.js +4 -0
  65. package/dist/input/Password.js +4 -0
  66. package/dist/input/Search.js +4 -0
  67. package/dist/input/TextArea.d.ts +2 -0
  68. package/dist/input/TextArea.js +8 -0
  69. package/dist/input/index.d.ts +2 -2
  70. package/dist/input-number/style/index.js +3 -2
  71. package/dist/layout/layout.js +2 -3
  72. package/dist/listy/index.js +4 -3
  73. package/dist/locale/ko_KR.js +25 -23
  74. package/dist/locale/pt_BR.js +9 -7
  75. package/dist/mentions/index.js +10 -1
  76. package/dist/menu/MenuItem.js +1 -1
  77. package/dist/menu/index.d.ts +2 -1
  78. package/dist/menu/index.js +29 -5
  79. package/dist/menu/menu.js +41 -15
  80. package/dist/message/index.js +11 -9
  81. package/dist/modal/confirm.js +2 -3
  82. package/dist/modal/index.d.ts +2 -2
  83. package/dist/modal/interface.d.ts +1 -1
  84. package/dist/modal/useModal/index.js +9 -4
  85. package/dist/notification/index.js +3 -7
  86. package/dist/package.js +1 -1
  87. package/dist/package.json.d.ts +1 -0
  88. package/dist/pagination/Pagination.js +3 -1
  89. package/dist/radio/group.d.ts +1 -0
  90. package/dist/radio/group.js +2 -5
  91. package/dist/radio/interface.d.ts +1 -1
  92. package/dist/segmented/style/index.js +3 -2
  93. package/dist/select/index.d.ts +1 -0
  94. package/dist/select/index.js +3 -7
  95. package/dist/select/useIcons.d.ts +3 -1
  96. package/dist/select/useIcons.js +5 -2
  97. package/dist/skeleton/style/index.js +9 -13
  98. package/dist/slider/SliderTooltip.js +0 -1
  99. package/dist/slider/index.d.ts +2 -0
  100. package/dist/slider/index.js +4 -0
  101. package/dist/splitter/Splitter.d.ts +2 -3
  102. package/dist/splitter/Splitter.js +18 -34
  103. package/dist/splitter/interface.d.ts +17 -8
  104. package/dist/statistic/Timer.d.ts +2 -2
  105. package/dist/steps/index.js +2 -1
  106. package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
  107. package/dist/table/hooks/usePagination.d.ts +1 -2
  108. package/dist/table/hooks/usePagination.js +1 -3
  109. package/dist/table/hooks/useSorter.js +4 -8
  110. package/dist/table/style/index.js +1 -0
  111. package/dist/table/style/size.js +1 -0
  112. package/dist/tabs/style/index.js +5 -1
  113. package/dist/tag/hooks/useColor.d.ts +1 -1
  114. package/dist/theme/themes/dark/colors.d.ts +2 -1
  115. package/dist/theme/themes/dark/colors.js +19 -3
  116. package/dist/theme/themes/dark/index.js +2 -3
  117. package/dist/tour/index.js +4 -1
  118. package/dist/tour/style/index.js +6 -6
  119. package/dist/transfer/ListItem.js +1 -0
  120. package/dist/transfer/Section.js +1 -0
  121. package/dist/transfer/hooks/useSelection.js +2 -1
  122. package/dist/tree/DirectoryTree.js +11 -6
  123. package/dist/tree/utils/dictUtil.js +5 -8
  124. package/dist/typography/Base/EllipsisTooltip.js +5 -1
  125. package/dist/typography/Base/index.js +11 -8
  126. package/dist/typography/Base/util.js +2 -1
  127. package/dist/upload/Dragger.js +0 -8
  128. package/dist/upload/Upload.d.ts +2 -0
  129. package/dist/upload/Upload.js +23 -22
  130. package/dist/upload/UploadList/ListItem.js +4 -0
  131. package/dist/upload/UploadList/index.js +6 -1
  132. package/dist/upload/interface.d.ts +4 -2
  133. package/dist/version/token.json +1 -1
  134. package/dist/watermark/utils.js +1 -1
  135. package/package.json +44 -43
  136. package/web-tags.json +22 -14
  137. package/web-types.json +64 -31
@@ -45,12 +45,11 @@ const Basic = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
45
45
  const { prefixCls } = useBaseConfig("layout", props);
46
46
  const [hashId, cssVarCls] = style_default(prefixCls);
47
47
  return () => {
48
- const { suffixCls, tagName, prefixCls: customizePrefixCls } = props;
49
- const prefixWithSuffixCls = suffixCls ? `${prefixCls.value}-${suffixCls}` : prefixCls.value;
48
+ const { suffixCls, tagName, prefixCls: customizePrefixCls, rootClass } = props;
50
49
  const { class: _attrClass, ...restAttrs } = attrs;
51
50
  return createVNode(tagName, {
52
51
  ...restAttrs,
53
- class: classNames(customizePrefixCls || prefixWithSuffixCls, _attrClass, hashId.value, cssVarCls.value)
52
+ class: classNames(customizePrefixCls, suffixCls ? `${prefixCls.value}-${suffixCls}` : prefixCls.value, rootClass, _attrClass, hashId.value, cssVarCls.value)
54
53
  }, slots);
55
54
  };
56
55
  }, {
@@ -9,20 +9,21 @@ import VcListy from "@v-c/listy";
9
9
  //#region src/listy/index.tsx
10
10
  const Listy = /* @__PURE__ */ defineComponent((props, { expose, slots, emit }) => {
11
11
  const listyRef = shallowRef();
12
- const { style, className, restAttrs } = getAttrStyleAndClass(useAttrs());
12
+ const attrs = useAttrs();
13
13
  const { getPrefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, virtual: contextVirtual } = useComponentBaseConfig("listy");
14
14
  const prefixCls = computed(() => getPrefixCls("listy", props.prefixCls));
15
15
  const rootCls = useCSSVarCls(prefixCls);
16
16
  const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
17
17
  const [, token] = useToken();
18
18
  const contextStyleRoot = useSemanticRootStyle(contextStyle);
19
- const styleRoot = useSemanticRootStyle(computed(() => style));
19
+ const styleRoot = useSemanticRootStyle(computed(() => getAttrStyleAndClass(attrs, void 0, props).style));
20
20
  const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, computed(() => props.classes)), useToArr(contextStyles, contextStyleRoot, computed(() => props.styles), styleRoot), useToProps(computed(() => props)));
21
21
  expose({ scrollTo: (config) => {
22
22
  listyRef.value?.scrollTo(config);
23
23
  } });
24
24
  return () => {
25
- const { classes, styles, rootClass, virtual, rowHoverable = true, itemRender = slots.itemRender, ...restProps } = props;
25
+ const { classes, styles, rootClass, virtual, rowHoverable = true, itemRender = slots.itemRender, class: _class, style: _style, ...restProps } = props;
26
+ const { className, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
26
27
  const rootClassNames = clsx(contextClassName.value, mergedClassNames.value.root, rootClass, className, { [`${prefixCls.value}-hoverable`]: rowHoverable }, hashId.value, cssVarCls.value, rootCls.value);
27
28
  const listyToken = {
28
29
  ...token.value,
@@ -3,7 +3,7 @@ import locale$1 from "../date-picker/locale/ko_KR.js";
3
3
  import ko_KR_default from "../calendar/locale/ko_KR.js";
4
4
  import Pagination from "@v-c/pagination/locale/ko_KR";
5
5
  //#region src/locale/ko_KR.ts
6
- const typeTemplate = "${label} 유효하지 않은 ${type}";
6
+ const typeTemplate = "${label}은(는) 유효한 ${type}이(가) 아닙니다";
7
7
  const localeValues = {
8
8
  locale: "ko",
9
9
  Pagination,
@@ -15,7 +15,8 @@ const localeValues = {
15
15
  close: "닫기",
16
16
  sortable: "정렬 가능",
17
17
  show: "표시",
18
- hide: "숨기기"
18
+ hide: "숨기기",
19
+ clear: "지우기"
19
20
  },
20
21
  Table: {
21
22
  filterTitle: "필터 메뉴",
@@ -95,14 +96,14 @@ const localeValues = {
95
96
  Form: {
96
97
  optional: "(선택사항)",
97
98
  defaultValidateMessages: {
98
- default: "필드 유효성 검사 오류 ${label}",
99
- required: "${label} 값을 입력해 주세요",
100
- enum: "${label} [${enum}] 중에 하나여야 합니다",
101
- whitespace: "${label} 비워둘 수 없습니다",
99
+ default: "${label} 필드의 유효성 검사 오류입니다",
100
+ required: "${label}을(를) 입력해 주세요",
101
+ enum: "${label}은(는) [${enum}] 중 하나여야 합니다",
102
+ whitespace: "${label}은(는) 공백일 수 없습니다",
102
103
  date: {
103
- format: "${label} 유효하지 않은 날짜 형식입니다",
104
- parse: "${label} 날짜 형식으로 변환될 수 없습니다",
105
- invalid: "${label} 유효하지 않은 날짜입니다"
104
+ format: "${label}의 날짜 형식이 올바르지 않습니다",
105
+ parse: "${label}을(를) 날짜로 변환할 수 없습니다",
106
+ invalid: "${label}은(는) 유효하지 않은 날짜입니다"
106
107
  },
107
108
  types: {
108
109
  string: typeTemplate,
@@ -120,24 +121,24 @@ const localeValues = {
120
121
  hex: typeTemplate
121
122
  },
122
123
  string: {
123
- len: "${label} ${len}글자여야 합니다",
124
- min: "${label} 적어도 ${min}글자 이상이어야 합니다",
125
- max: "${label} ${max}글자 이하여야 합니다",
126
- range: "${label} ${min}-${max}글자 사이어야 합니다"
124
+ len: "${label}은(는) ${len}자여야 합니다",
125
+ min: "${label}은(는) ${min}자 이상이어야 합니다",
126
+ max: "${label}은(는) ${max}자 이하여야 합니다",
127
+ range: "${label}은(는) ${min}~${max}자 사이여야 합니다"
127
128
  },
128
129
  number: {
129
- len: "${label} 값은 ${len}이어야 합니다",
130
- min: "${label} 최솟값은 ${min}입니다",
131
- max: "${label} 최댓값은 ${max}입니다",
132
- range: "${label} 값은 ${min}-${max} 사이어야 합니다"
130
+ len: "${label}은(는) ${len}과(와) 같아야 합니다",
131
+ min: "${label}은(는) ${min} 이상이어야 합니다",
132
+ max: "${label}은(는) ${max} 이하여야 합니다",
133
+ range: "${label}은(는) ${min}~${max} 사이여야 합니다"
133
134
  },
134
135
  array: {
135
- len: "${len}이어야 합니다 ${label}",
136
- min: "최소 ${min}이어야 합니다 ${label}",
137
- max: "최대 ${max}이어야 합니다 ${label}",
138
- range: "${label} ${min}-${max} 사이어야 합니다"
136
+ len: "${label}은(는) ${len}개여야 합니다",
137
+ min: "${label}은(는) 최소 ${min}개여야 합니다",
138
+ max: "${label}은(는) 최대 ${max}개여야 합니다",
139
+ range: "${label}의 개수는 ${min}~${max}개 사이여야 합니다"
139
140
  },
140
- pattern: { mismatch: "${label} ${pattern} 패턴과 일치하지 않습니다" }
141
+ pattern: { mismatch: "${label}이(가) ${pattern} 패턴과 일치하지 않습니다" }
141
142
  }
142
143
  },
143
144
  QRCode: {
@@ -150,7 +151,8 @@ const localeValues = {
150
151
  transparent: "투명",
151
152
  singleColor: "단색",
152
153
  gradientColor: "그라데이션"
153
- }
154
+ },
155
+ Input: { otpCell: "${total}자 중 ${index}번째 문자" }
154
156
  };
155
157
  //#endregion
156
158
  export { localeValues as default };
@@ -15,7 +15,8 @@ const localeValues = {
15
15
  close: "Fechar",
16
16
  sortable: "classificável",
17
17
  show: "Mostrar",
18
- hide: "Ocultar"
18
+ hide: "Ocultar",
19
+ clear: "Limpar"
19
20
  },
20
21
  Table: {
21
22
  filterTitle: "Menu de Filtro",
@@ -63,7 +64,7 @@ const localeValues = {
63
64
  titles: ["", ""],
64
65
  searchPlaceholder: "Procurar",
65
66
  itemUnit: "item",
66
- itemsUnit: "items",
67
+ itemsUnit: "itens",
67
68
  remove: "Remover",
68
69
  selectCurrent: "Selecionar página atual",
69
70
  removeCurrent: "Remover página atual",
@@ -97,10 +98,10 @@ const localeValues = {
97
98
  defaultValidateMessages: {
98
99
  default: "Erro ${label} na validação de campo",
99
100
  required: "Por favor, insira ${label}",
100
- enum: "${label} deve ser um dos seguinte: [${enum}]",
101
- whitespace: "${label} não pode ser um carácter vazio",
101
+ enum: "${label} deve ser um dos seguintes: [${enum}]",
102
+ whitespace: "${label} não pode ser um caractere vazio",
102
103
  date: {
103
- format: " O formato de data ${label} é inválido",
104
+ format: "O formato de data ${label} é inválido",
104
105
  parse: "${label} não pode ser convertido para uma data",
105
106
  invalid: "${label} é uma data inválida"
106
107
  },
@@ -126,7 +127,7 @@ const localeValues = {
126
127
  range: "${label} deve possuir entre ${min} e ${max} caracteres"
127
128
  },
128
129
  number: {
129
- len: "${label} deve ser igual à ${len}",
130
+ len: "${label} deve ser igual a ${len}",
130
131
  min: "O valor mínimo de ${label} é ${min}",
131
132
  max: "O valor máximo de ${label} é ${max}",
132
133
  range: "${label} deve estar entre ${min} e ${max}"
@@ -150,7 +151,8 @@ const localeValues = {
150
151
  transparent: "Transparente",
151
152
  singleColor: "Único",
152
153
  gradientColor: "Gradiente"
153
- }
154
+ },
155
+ Input: { otpCell: "Caractere ${index} de ${total}" }
154
156
  };
155
157
  //#endregion
156
158
  export { localeValues as default };
@@ -350,6 +350,10 @@ const Mentions = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
350
350
  type: Function,
351
351
  required: false
352
352
  },
353
+ onInput: {
354
+ type: Function,
355
+ required: false
356
+ },
353
357
  maxLength: {
354
358
  type: Number,
355
359
  required: false
@@ -376,6 +380,10 @@ const Mentions = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
376
380
  type: Function,
377
381
  required: false
378
382
  },
383
+ valueModifiers: {
384
+ type: Object,
385
+ required: false
386
+ },
379
387
  changeOnComposing: {
380
388
  type: Boolean,
381
389
  required: false,
@@ -406,7 +414,8 @@ Mentions.install = (app) => {
406
414
  Mentions.getMentions = (value = "", config = {}) => {
407
415
  const { prefix = "@", split = " " } = config;
408
416
  const prefixList = toList(prefix);
409
- return value.split(split).reduce((list, str = "") => {
417
+ const separator = split === " " ? /[ \r\n]+/ : split;
418
+ return value.split(separator).reduce((list, str = "") => {
410
419
  let hitPrefix = null;
411
420
  prefixList.some((prefixStr) => {
412
421
  if (str.slice(0, prefixStr.length) === prefixStr) {
@@ -37,7 +37,7 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
37
37
  "class": clsx(`${prefixCls}-title-content`, firstLevel ? classes?.itemContent : classes?.subMenu?.itemContent, { [`${prefixCls}-title-content-with-extra`]: !!extra || extra === 0 }),
38
38
  "style": firstLevel ? styles?.itemContent : styles?.subMenu?.itemContent
39
39
  }, [children]);
40
- if (!icon || isVNode(firstChild) && firstChild.type === "span") {
40
+ if (!icon) {
41
41
  if (firstChild && inlineCollapsed && firstLevel && typeof label === "string") return createVNode("div", { "class": `${prefixCls}-inline-collapsed-noicon` }, [label.charAt(0)]);
42
42
  }
43
43
  return wrapNode;
@@ -1,6 +1,7 @@
1
1
  import { EmptyEmit } from "../_util/type.js";
2
2
  import MenuItem$1, { MenuItemProps, MenuItemSlots } from "./MenuItem.js";
3
3
  import { ItemType } from "./interface.js";
4
+ import { MenuTheme } from "./MenuContext.js";
4
5
  import { MenuEmits, MenuEmitsProps, MenuProps as MenuProps$2, MenuSlots } from "./menu.js";
5
6
  import MenuItemGroup, { MenuItemGroupProps } from "./MenuItemGroup.js";
6
7
  import SubMenu, { SubMenuProps } from "./SubMenu.js";
@@ -24,4 +25,4 @@ declare const _default: typeof Menu & {
24
25
  Divider: typeof MenuDivider;
25
26
  };
26
27
  //#endregion
27
- export { InternalMenuProps, MenuDivider, type MenuEmits, type MenuInfo, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, MenuItemType, MenuProps, MenuRef, type MenuSlots, type SelectInfo, SubMenu, type SubMenuProps, _default as default };
28
+ export { InternalMenuProps, MenuDivider, type MenuEmits, type MenuInfo, MenuItem, MenuItemGroup, type MenuItemGroupProps, type MenuItemProps, MenuItemType, MenuProps, MenuRef, type MenuSlots, type MenuTheme, type SelectInfo, SubMenu, type SubMenuProps, _default as default };
@@ -95,7 +95,10 @@ const Menu = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expos
95
95
  type: String,
96
96
  required: false
97
97
  },
98
- mode: { required: false },
98
+ mode: {
99
+ type: String,
100
+ required: false
101
+ },
99
102
  inlineCollapsed: {
100
103
  type: Boolean,
101
104
  required: false,
@@ -148,9 +151,27 @@ const Menu = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expos
148
151
  required: false,
149
152
  default: void 0
150
153
  },
151
- triggerSubMenuAction: { required: false },
152
- builtinPlacements: { required: false },
153
- expandIcon: { required: false },
154
+ triggerSubMenuAction: {
155
+ type: String,
156
+ required: false
157
+ },
158
+ builtinPlacements: {
159
+ type: Object,
160
+ required: false
161
+ },
162
+ expandIcon: {
163
+ type: [
164
+ Object,
165
+ Function,
166
+ String,
167
+ Number,
168
+ null,
169
+ Boolean,
170
+ Array
171
+ ],
172
+ required: false,
173
+ default: void 0
174
+ },
154
175
  overflowedIndicator: {
155
176
  type: [
156
177
  Object,
@@ -180,7 +201,10 @@ const Menu = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expos
180
201
  type: Function,
181
202
  required: false
182
203
  },
183
- popupRender: { required: false },
204
+ popupRender: {
205
+ type: Function,
206
+ required: false
207
+ },
184
208
  id: {
185
209
  type: String,
186
210
  required: false
package/dist/menu/menu.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useScopeIdOnElement } from "../_util/hooks/useScopeId.js";
2
3
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
4
  import { devUseWarning, isDev } from "../_util/warning.js";
4
5
  import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
@@ -99,18 +100,19 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
99
100
  styles: mergedStyles.value
100
101
  }));
101
102
  const menuRef = shallowRef();
103
+ useScopeIdOnElement(() => menuRef.value?.list);
102
104
  expose({ menu: menuRef });
103
- return () => {
105
+ function getMergedExpandIcon() {
104
106
  const expandIcon = slots?.expandIcon ?? props?.expandIcon;
105
- const mergedExpandIcon = (props) => {
106
- if (typeof expandIcon === "function" || isEmptyIcon(expandIcon)) return expandIcon || null;
107
- if (typeof overrideObj.value?.expandIcon === "function" || isEmptyIcon(overrideObj.value?.expandIcon)) return overrideObj.value.expandIcon || null;
108
- if (typeof contextExpandIcon.value === "function" || isEmptyIcon(contextExpandIcon.value)) return contextExpandIcon.value || null;
109
- const mergedIcon = expandIcon ?? overrideObj?.value.expandIcon ?? contextExpandIcon.value;
110
- const icon = typeof mergedIcon === "function" ? mergedIcon?.(props) : mergedIcon;
111
- const iconChild = filterEmpty(Array.isArray(icon) ? icon : [icon])[0];
112
- if (isVNode(iconChild)) return createVNode(iconChild, { class: `${prefixCls.value}-submenu-expand-icon` });
113
- };
107
+ if (typeof expandIcon === "function" || isEmptyIcon(expandIcon)) return expandIcon || null;
108
+ if (typeof overrideObj.value?.expandIcon === "function" || isEmptyIcon(overrideObj.value?.expandIcon)) return overrideObj.value.expandIcon || null;
109
+ if (typeof contextExpandIcon.value === "function" || isEmptyIcon(contextExpandIcon.value)) return contextExpandIcon.value || null;
110
+ const mergedIcon = expandIcon ?? overrideObj?.value.expandIcon ?? contextExpandIcon.value;
111
+ const iconChild = filterEmpty(Array.isArray(mergedIcon) ? mergedIcon : [mergedIcon])[0];
112
+ if (isVNode(iconChild)) return createVNode(iconChild, { class: `${prefixCls.value}-submenu-expand-icon` });
113
+ }
114
+ return () => {
115
+ const mergedExpandIcon = getMergedExpandIcon();
114
116
  const _getPopupContainer = props?.getPopupContainer ?? getPopupContainer;
115
117
  const { theme, overflowedIndicatorPopupClassName, rootClass } = props;
116
118
  const passedProps = omit$1(props, omitPropKeys);
@@ -236,7 +238,10 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
236
238
  type: String,
237
239
  required: false
238
240
  },
239
- mode: { required: false },
241
+ mode: {
242
+ type: String,
243
+ required: false
244
+ },
240
245
  inlineCollapsed: {
241
246
  type: Boolean,
242
247
  required: false,
@@ -289,9 +294,27 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
289
294
  required: false,
290
295
  default: void 0
291
296
  },
292
- triggerSubMenuAction: { required: false },
293
- builtinPlacements: { required: false },
294
- expandIcon: { required: false },
297
+ triggerSubMenuAction: {
298
+ type: String,
299
+ required: false
300
+ },
301
+ builtinPlacements: {
302
+ type: Object,
303
+ required: false
304
+ },
305
+ expandIcon: {
306
+ type: [
307
+ Object,
308
+ Function,
309
+ String,
310
+ Number,
311
+ null,
312
+ Boolean,
313
+ Array
314
+ ],
315
+ required: false,
316
+ default: void 0
317
+ },
295
318
  overflowedIndicator: {
296
319
  type: [
297
320
  Object,
@@ -321,7 +344,10 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
321
344
  type: Function,
322
345
  required: false
323
346
  },
324
- popupRender: { required: false },
347
+ popupRender: {
348
+ type: Function,
349
+ required: false
350
+ },
325
351
  id: {
326
352
  type: String,
327
353
  required: false
@@ -5,11 +5,8 @@ import PurePanel from "./PurePanel.js";
5
5
  import PureList from "./PureList.js";
6
6
  import { wrapPromiseFn } from "./util.js";
7
7
  import useMessage, { useInternalMessage } from "./useMessage.js";
8
- import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, onMounted, render, shallowRef, watch } from "vue";
8
+ import { computed, createVNode, defineComponent, getCurrentInstance, onMounted, render, shallowRef, watch } from "vue";
9
9
  //#region src/message/index.tsx
10
- function _isSlot(s) {
11
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
12
- }
13
10
  let message = null;
14
11
  let taskQueue = [];
15
12
  let defaultGlobalConfig = {};
@@ -95,12 +92,11 @@ const GlobalHolderWrapper = /* @__PURE__ */ defineComponent((props) => {
95
92
  "sync": sync,
96
93
  "messageConfig": messageConfig.value
97
94
  }, null);
98
- const configHolderNode = createVNode(ConfigProvider, {
95
+ return createVNode(ConfigProvider, {
99
96
  "prefixCls": global.getRootPrefixCls(),
100
97
  "iconPrefixCls": global.getIconPrefixCls(),
101
98
  "theme": global.theme.value
102
- }, _isSlot(holderNode) ? holderNode : { default: () => [holderNode] });
103
- return global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
99
+ }, { default: () => [global.holderRender ? global.holderRender(holderNode) : holderNode] });
104
100
  };
105
101
  }, { props: { onReady: {
106
102
  type: Function,
@@ -181,7 +177,10 @@ function open(config) {
181
177
  if (closeFn) act(() => {
182
178
  closeFn?.();
183
179
  });
184
- else task.skipped = true;
180
+ else {
181
+ task.skipped = true;
182
+ resolve();
183
+ }
185
184
  };
186
185
  });
187
186
  flushMessageQueue();
@@ -203,7 +202,10 @@ function typeOpen(type, args) {
203
202
  if (closeFn) act(() => {
204
203
  closeFn?.();
205
204
  });
206
- else task.skipped = true;
205
+ else {
206
+ task.skipped = true;
207
+ resolve();
208
+ }
207
209
  };
208
210
  });
209
211
  flushMessageQueue();
@@ -341,13 +341,12 @@ function confirm(config) {
341
341
  iconPrefixCls,
342
342
  theme
343
343
  });
344
- const configHolderNode = createVNode(ConfigProvider, {
344
+ const nextVnode = createVNode(ConfigProvider, {
345
345
  prefixCls: rootPrefixCls,
346
346
  iconPrefixCls,
347
347
  theme,
348
348
  locale: global.locale
349
- }, { default: () => holderNode });
350
- const nextVnode = global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
349
+ }, { default: () => global.holderRender ? global.holderRender(holderNode) : holderNode });
351
350
  nextVnode.appContext = appContext;
352
351
  render(nextVnode, container);
353
352
  }
@@ -1,4 +1,4 @@
1
- import { ModalEmits, ModalSlots } from "./interface.js";
1
+ import { ModalEmits, ModalFuncProps, ModalLocale, ModalSlots } from "./interface.js";
2
2
  import confirm, { modalGlobalConfig } from "./confirm.js";
3
3
  import useModal from "./useModal/index.js";
4
4
  import Modal, { InternalModalProps } from "./Modal.js";
@@ -17,4 +17,4 @@ interface StaticModal {
17
17
  type ModalProps = InternalModalProps;
18
18
  declare const _default: typeof Modal & StaticModal;
19
19
  //#endregion
20
- export { type ModalEmits, ModalProps, type ModalSlots, _default as default, useModal };
20
+ export { type ModalEmits, type ModalFuncProps, type ModalLocale, ModalProps, type ModalSlots, _default as default, useModal };
@@ -42,7 +42,7 @@ interface ModalSemanticStyles {
42
42
  }
43
43
  type ModalClassNamesType = SemanticClassNamesType<ModalProps, ModalSemanticClassNames>;
44
44
  type ModalStylesType = SemanticStylesType<ModalProps, ModalSemanticStyles>;
45
- interface ModalCommonProps extends Omit<DialogProps, 'footer' | 'width' | 'onClose' | 'animation' | 'maskAnimation' | 'transitionName' | 'maskTransitionName' | 'mask' | 'classNames' | 'styles' | 'modalRender' | 'rootStyle' | 'style' | OmitFocusType> {
45
+ interface ModalCommonProps extends Omit<DialogProps, 'footer' | 'width' | 'onClose' | 'animation' | 'maskAnimation' | 'transitionName' | 'maskTransitionName' | 'mask' | 'classNames' | 'styles' | 'modalRender' | 'rootStyle' | 'style' | 'closable' | OmitFocusType> {
46
46
  footer?: VueNode | ((params: {
47
47
  originNode: VueNode;
48
48
  extra: {
@@ -23,7 +23,10 @@ function useModal() {
23
23
  [...actionQueue.value].forEach((action) => action());
24
24
  actionQueue.value = [];
25
25
  }
26
- }, { immediate: true });
26
+ }, {
27
+ immediate: true,
28
+ flush: "post"
29
+ });
27
30
  const getConfirmFunc = (withFunc) => function hookConfirm(config) {
28
31
  uuid += 1;
29
32
  const modalRef = shallowRef();
@@ -58,9 +61,11 @@ function useModal() {
58
61
  if (closePatch) destroyFns.push(closeFunc);
59
62
  return {
60
63
  destroy: () => {
61
- const destroyAction = () => modalRef.value?.destroy();
62
- if (modalRef.value) destroyAction();
63
- else actionQueue.value = [...actionQueue.value, destroyAction];
64
+ if (modalRef.value) modalRef.value.destroy();
65
+ else {
66
+ closeFunc();
67
+ withFunc(config).afterClose?.();
68
+ }
64
69
  },
65
70
  update: (newConfig) => {
66
71
  const updateAction = () => modalRef.value?.update(newConfig);
@@ -4,11 +4,8 @@ import { useAppConfig } from "../app/context.js";
4
4
  import PurePanel from "./PurePanel.js";
5
5
  import PureList from "./PureList.js";
6
6
  import useNotification, { useInternalNotification } from "./useNotification.js";
7
- import { computed, createVNode, defineComponent, getCurrentInstance, isVNode, onMounted, render, shallowRef, watch } from "vue";
7
+ import { computed, createVNode, defineComponent, getCurrentInstance, onMounted, render, shallowRef, watch } from "vue";
8
8
  //#region src/notification/index.tsx
9
- function _isSlot(s) {
10
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
11
- }
12
9
  let notification = null;
13
10
  let taskQueue = [];
14
11
  let defaultGlobalConfig = {};
@@ -92,13 +89,12 @@ const GlobalHolderWrapper = /* @__PURE__ */ defineComponent((props) => {
92
89
  "sync": sync,
93
90
  "notificationConfig": notificationConfig.value
94
91
  }, null);
95
- const configHolderNode = createVNode(ConfigProvider, {
92
+ return createVNode(ConfigProvider, {
96
93
  "prefixCls": global.getRootPrefixCls(),
97
94
  "iconPrefixCls": global.getIconPrefixCls(),
98
95
  "theme": global.theme.value,
99
96
  "locale": globalConfig().locale
100
- }, _isSlot(holderNode) ? holderNode : { default: () => [holderNode] });
101
- return global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
97
+ }, { default: () => [global.holderRender ? global.holderRender(holderNode) : holderNode] });
102
98
  };
103
99
  }, { props: { onReady: {
104
100
  type: Function,
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.8.2";
2
+ var version = "1.8.4";
3
3
  //#endregion
4
4
  export { version };
@@ -130,6 +130,7 @@ declare const _exports: {
130
130
  };
131
131
  scripts: {
132
132
  test: string;
133
+ typecheck: string;
133
134
  build: string;
134
135
  "build:verify": string;
135
136
  "build:p": string;
@@ -1,4 +1,5 @@
1
1
  import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
2
+ import { useScopeIdAttrs } from "../_util/hooks/useScopeId.js";
2
3
  import { useComponentBaseConfig } from "../config-provider/context.js";
3
4
  import useToken from "../theme/useToken.js";
4
5
  import { devUseWarning, isDev } from "../_util/warning.js";
@@ -30,6 +31,7 @@ const omitKeys = [
30
31
  "components"
31
32
  ];
32
33
  const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) => {
34
+ const scopeIdAttrs = useScopeIdAttrs();
33
35
  const { getPrefixCls, prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, showSizeChanger: contextShowSizeChangerConfig } = useComponentBaseConfig("pagination", props, ["showSizeChanger"]);
34
36
  const { size, responsive, classes, styles, showSizeChanger } = toPropsRefs(props, "size", "responsive", "classes", "styles", "showSizeChanger");
35
37
  const [hashId, cssVarCls] = style_default(prefixCls, prefixCls);
@@ -152,7 +154,7 @@ const Pagination = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
152
154
  ...style
153
155
  };
154
156
  const restProps = omit$1(props, omitKeys);
155
- return createVNode(Fragment, null, [token.value.wireframe && createVNode(bordered_default, { "prefixCls": prefixCls.value }, null), createVNode(VcPagination, mergeProps(restProps, restAttrs, {
157
+ return createVNode(Fragment, null, [token.value.wireframe && createVNode(bordered_default, { "prefixCls": prefixCls.value }, null), createVNode(VcPagination, mergeProps(scopeIdAttrs, restProps, restAttrs, {
156
158
  "prefixCls": prefixCls.value,
157
159
  "selectPrefixCls": selectPrefixCls.value,
158
160
  "class": extendedClassName,
@@ -4,6 +4,7 @@ import { SlotsType } from "vue";
4
4
  interface InternalRadioGroupProps extends RadioGroupProps, RadioGroupEmitsProps {}
5
5
  interface RadioGroupEmitsProps {
6
6
  onChange?: RadioGroupEmits['change'];
7
+ 'onUpdate:value'?: RadioGroupEmits['update:value'];
7
8
  onMouseenter?: RadioGroupEmits['mouseenter'];
8
9
  onMouseleave?: RadioGroupEmits['mouseleave'];
9
10
  onFocus?: RadioGroupEmits['focus'];
@@ -30,7 +30,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
30
30
  const onRadioChange = (e) => {
31
31
  const lastValue = value.value;
32
32
  const val = e.target.value;
33
- props?.["onUpdate:value"]?.(val);
33
+ emit("update:value", val);
34
34
  if (val !== lastValue) emit("change", e);
35
35
  if (props.value === void 0) value.value = val;
36
36
  };
@@ -199,10 +199,6 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
199
199
  type: [Object, Function],
200
200
  required: false
201
201
  },
202
- "onUpdate:value": {
203
- type: Function,
204
- required: false
205
- },
206
202
  options: {
207
203
  type: Array,
208
204
  required: false
@@ -221,6 +217,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
221
217
  }),
222
218
  emits: [
223
219
  "change",
220
+ "update:value",
224
221
  "mouseenter",
225
222
  "mouseleave",
226
223
  "focus",
@@ -40,10 +40,10 @@ interface RadioGroupProps extends AbstractCheckboxGroupProps {
40
40
  }) => any;
41
41
  classes?: RadioGroupClassNamesType;
42
42
  styles?: RadioGroupStylesType;
43
- 'onUpdate:value'?: (value: any) => void;
44
43
  }
45
44
  interface RadioGroupEmits {
46
45
  'change': (e: RadioChangeEvent) => void;
46
+ 'update:value': (value: any) => void;
47
47
  'mouseenter': (e: MouseEvent) => void;
48
48
  'mouseleave': (e: MouseEvent) => void;
49
49
  'focus': (e: FocusEvent) => void;
@@ -102,8 +102,9 @@ const genSegmentedStyle = (token) => {
102
102
  ...segmentedTextEllipsisCss
103
103
  },
104
104
  "&-icon + *": { marginInlineStart: token.calc(token.marginSM).div(2).equal() },
105
- "&-icon > svg": {
106
- display: "inline-block",
105
+ "&-icon": {
106
+ display: "inline-flex",
107
+ alignItems: "center",
107
108
  verticalAlign: "middle",
108
109
  marginBlockEnd: "0.2em"
109
110
  },
@@ -147,6 +147,7 @@ interface SelectEmitsProps {
147
147
  }
148
148
  type OptionParams = Parameters<NonNullable<SelectProps$1['optionRender']>>;
149
149
  interface SelectSlots {
150
+ default?: () => any;
150
151
  suffix?: (info: SelectSuffixRenderInfo) => any;
151
152
  /** @deprecated Please use `suffix` slot instead. */
152
153
  suffixIcon?: () => any;