antdv-next 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/PurePanel.js +1 -1
- package/dist/_util/hooks/index.js +1 -1
- package/dist/_util/hooks/useClosable.d.ts +3 -3
- package/dist/_util/hooks/useClosable.js +9 -9
- package/dist/_util/hooks/useZIndex.js +14 -15
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/affix/index.js +27 -12
- package/dist/alert/Alert.d.ts +2 -2
- package/dist/alert/Alert.js +3 -3
- package/dist/alert/style/index.js +14 -8
- package/dist/anchor/Anchor.js +3 -1
- package/dist/antd-with-locales.esm.js +19634 -19203
- package/dist/antd-with-locales.js +112 -112
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +17697 -17268
- package/dist/antd.js +113 -113
- package/dist/app/App.js +2 -2
- package/dist/auto-complete/index.js +2 -2
- package/dist/avatar/Avatar.js +2 -2
- package/dist/avatar/AvatarGroup.js +1 -1
- package/dist/badge/Ribbon.js +1 -1
- package/dist/badge/index.d.ts +4 -1
- package/dist/badge/index.js +6 -6
- package/dist/border-beam/BorderBeam.js +1 -1
- package/dist/breadcrumb/Breadcrumb.js +2 -2
- package/dist/button/Button.js +1 -1
- package/dist/button/style/index.js +8 -2
- package/dist/calendar/generateCalendar.js +3 -3
- package/dist/card/Card.js +2 -2
- package/dist/card/CardGrid.js +1 -1
- package/dist/card/CardMeta.js +1 -1
- package/dist/card/style/index.js +2 -2
- package/dist/carousel/index.js +2 -2
- package/dist/cascader/Panel.js +1 -1
- package/dist/cascader/index.js +4 -4
- package/dist/checkbox/Checkbox.js +3 -2
- package/dist/checkbox/Group.js +1 -1
- package/dist/collapse/Collapse.js +2 -2
- package/dist/color-picker/ColorPicker.js +6 -2
- package/dist/color-picker/ColorPickerPanel.js +4 -0
- package/dist/color-picker/components/ColorSlider.js +12 -4
- package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
- package/dist/components.d.ts +12 -8
- package/dist/components.js +3 -3
- package/dist/config-provider/context.d.ts +5 -3
- package/dist/config-provider/context.js +3 -3
- package/dist/config-provider/define.d.ts +5 -1
- package/dist/config-provider/index.js +38 -4
- package/dist/date-picker/generatePicker/generateRangePicker.js +3 -3
- package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -3
- package/dist/date-picker/hooks/useMergedPickerSemantic.js +1 -1
- package/dist/date-picker/style/panel.js +3 -5
- package/dist/descriptions/hooks/useItems.d.ts +2 -2
- package/dist/descriptions/hooks/useRow.js +1 -1
- package/dist/descriptions/index.js +2 -2
- package/dist/divider/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +1 -1
- package/dist/drawer/index.js +3 -3
- package/dist/dropdown/dropdown.js +3 -3
- package/dist/empty/index.js +2 -1
- package/dist/float-button/BackTop.js +2 -2
- package/dist/float-button/FloatButton.js +1 -1
- package/dist/float-button/FloatButtonGroup.js +2 -2
- package/dist/float-button/PurePanel.js +1 -1
- package/dist/form/ErrorList.js +1 -1
- package/dist/form/Form.d.ts +17 -44
- package/dist/form/Form.js +56 -7
- package/dist/form/FormItem/ItemHolder.js +3 -3
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/FormItem/index.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useForm.d.ts +4 -5
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/form/index.d.ts +29 -3
- package/dist/form/index.js +6 -6
- package/dist/form/types.d.ts +15 -7
- package/dist/grid/col.js +1 -1
- package/dist/grid/row.js +1 -1
- package/dist/image/PreviewGroup.js +2 -2
- package/dist/image/index.d.ts +5 -5
- package/dist/image/index.js +9 -5
- package/dist/index.d.ts +14 -7
- package/dist/index.js +2 -2
- package/dist/input/Group.js +2 -2
- package/dist/input/Input.js +2 -2
- package/dist/input/OTP/OTPInput.js +1 -1
- package/dist/input/OTP/index.js +2 -2
- package/dist/input/Password.js +1 -1
- package/dist/input/Search.js +2 -2
- package/dist/input/TextArea.js +2 -2
- package/dist/input-number/index.js +3 -3
- package/dist/input-number/style/index.js +3 -2
- package/dist/layout/Sider.js +2 -2
- package/dist/layout/layout.js +2 -3
- package/dist/listy/index.js +1 -1
- package/dist/locale/id_ID.js +8 -6
- package/dist/locale/uz_UZ.js +12 -12
- package/dist/masonry/Masonry.js +1 -1
- package/dist/mentions/index.js +5 -4
- package/dist/menu/MenuDivider.js +1 -1
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/index.d.ts +2 -1
- package/dist/menu/index.js +29 -5
- package/dist/menu/menu.js +42 -18
- package/dist/message/PurePanel.js +2 -2
- package/dist/message/index.js +11 -9
- package/dist/message/useMessage.js +2 -2
- package/dist/modal/ConfirmDialog.js +2 -2
- package/dist/modal/Modal.js +4 -4
- package/dist/modal/PurePanel.js +1 -1
- package/dist/modal/confirm.js +6 -8
- package/dist/modal/index.d.ts +2 -2
- package/dist/modal/interface.d.ts +1 -1
- package/dist/modal/useModal/index.js +9 -4
- package/dist/notification/PurePanel.js +2 -2
- package/dist/notification/index.js +8 -13
- package/dist/notification/useNotification.js +2 -2
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +1 -0
- package/dist/pagination/Pagination.js +4 -4
- package/dist/popconfirm/index.js +2 -2
- package/dist/popover/PurePanel.js +2 -2
- package/dist/popover/index.js +1 -1
- package/dist/progress/progress.js +3 -3
- package/dist/qrcode/index.js +3 -3
- package/dist/radio/group.js +2 -2
- package/dist/radio/radio.js +2 -2
- package/dist/rate/index.js +2 -2
- package/dist/result/index.js +1 -1
- package/dist/segmented/index.js +1 -1
- package/dist/segmented/style/index.js +3 -2
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +5 -5
- package/dist/skeleton/Avatar.js +1 -1
- package/dist/skeleton/Button.js +1 -1
- package/dist/skeleton/Element.js +1 -1
- package/dist/skeleton/Input.js +1 -1
- package/dist/skeleton/Node.js +1 -1
- package/dist/skeleton/Skeleton.js +1 -1
- package/dist/skeleton/style/index.js +9 -13
- package/dist/slider/SliderTooltip.js +0 -1
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +5 -1
- package/dist/space/Addon.js +1 -1
- package/dist/space/index.js +1 -1
- package/dist/spin/index.js +2 -2
- package/dist/splitter/Splitter.js +2 -2
- package/dist/statistic/Statistic.js +1 -1
- package/dist/statistic/Timer.d.ts +2 -2
- package/dist/statistic/Timer.js +1 -1
- package/dist/steps/index.js +5 -4
- package/dist/switch/index.js +2 -2
- package/dist/table/InternalTable.js +10 -4
- package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
- package/dist/table/hooks/usePagination.d.ts +1 -2
- package/dist/table/hooks/usePagination.js +1 -3
- package/dist/table/hooks/useSelection.js +1 -1
- package/dist/table/hooks/useSorter.js +26 -19
- package/dist/table/style/index.js +1 -0
- package/dist/table/style/size.js +1 -0
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/index.js +3 -3
- package/dist/tabs/style/index.js +5 -1
- package/dist/tag/CheckableTag.js +1 -1
- package/dist/tag/CheckableTagGroup.d.ts +0 -1
- package/dist/tag/CheckableTagGroup.js +0 -4
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/theme/themes/dark/index.js +1 -1
- package/dist/theme/useToken.js +2 -2
- package/dist/timeline/Timeline.js +1 -1
- package/dist/timeline/useItems.js +1 -1
- package/dist/tooltip/PurePanel.js +1 -1
- package/dist/tooltip/index.js +2 -2
- package/dist/tour/index.js +5 -2
- package/dist/transfer/Section.js +1 -1
- package/dist/transfer/Transfer.js +3 -3
- package/dist/transfer/hooks/useSelection.js +2 -1
- package/dist/tree/DirectoryTree.js +6 -5
- package/dist/tree/Tree.js +4 -4
- package/dist/tree/utils/dictUtil.js +5 -8
- package/dist/tree-select/index.js +4 -4
- package/dist/typography/Base/index.js +5 -3
- package/dist/typography/Base/util.js +2 -1
- package/dist/typography/Editable.js +6 -2
- package/dist/typography/Typography.js +1 -1
- package/dist/upload/Upload.js +25 -16
- package/dist/upload/UploadList/ListItem.js +5 -1
- package/dist/upload/UploadList/index.js +19 -12
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.d.ts +13 -4
- package/dist/watermark/index.js +11 -7
- package/dist/watermark/useRafDebounce.js +1 -2
- package/dist/watermark/utils.js +1 -1
- package/package.json +42 -41
- package/web-tags.json +22 -14
- package/web-types.json +46 -23
package/dist/layout/layout.js
CHANGED
|
@@ -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
|
|
52
|
+
class: classNames(customizePrefixCls, suffixCls ? `${prefixCls.value}-${suffixCls}` : prefixCls.value, rootClass, _attrClass, hashId.value, cssVarCls.value)
|
|
54
53
|
}, slots);
|
|
55
54
|
};
|
|
56
55
|
}, {
|
package/dist/listy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import useToken from "../theme/useToken.js";
|
|
3
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
|
6
6
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef, useAttrs } from "vue";
|
package/dist/locale/id_ID.js
CHANGED
|
@@ -3,7 +3,7 @@ import locale$1 from "../date-picker/locale/id_ID.js";
|
|
|
3
3
|
import id_ID_default from "../calendar/locale/id_ID.js";
|
|
4
4
|
import Pagination from "@v-c/pagination/locale/id_ID";
|
|
5
5
|
//#region src/locale/id_ID.ts
|
|
6
|
-
const typeTemplate = "${label}
|
|
6
|
+
const typeTemplate = "${label} bukan ${type} yang valid";
|
|
7
7
|
const localeValues = {
|
|
8
8
|
locale: "id",
|
|
9
9
|
Pagination,
|
|
@@ -11,11 +11,12 @@ const localeValues = {
|
|
|
11
11
|
TimePicker: locale,
|
|
12
12
|
Calendar: id_ID_default,
|
|
13
13
|
global: {
|
|
14
|
-
placeholder: "
|
|
14
|
+
placeholder: "Silakan pilih",
|
|
15
15
|
close: "Tutup",
|
|
16
16
|
sortable: "dapat diurutkan",
|
|
17
17
|
show: "Tampilkan",
|
|
18
|
-
hide: "Sembunyikan"
|
|
18
|
+
hide: "Sembunyikan",
|
|
19
|
+
clear: "Hapus"
|
|
19
20
|
},
|
|
20
21
|
Table: {
|
|
21
22
|
filterTitle: "Menu filter",
|
|
@@ -93,7 +94,7 @@ const localeValues = {
|
|
|
93
94
|
nextSlide: "Slide berikutnya"
|
|
94
95
|
},
|
|
95
96
|
Form: {
|
|
96
|
-
optional: "(
|
|
97
|
+
optional: "(opsional)",
|
|
97
98
|
defaultValidateMessages: {
|
|
98
99
|
default: "Kesalahan validasi untuk ${label}",
|
|
99
100
|
required: "Tolong masukkan ${label}",
|
|
@@ -123,7 +124,7 @@ const localeValues = {
|
|
|
123
124
|
len: "${label} harus berupa ${len} karakter",
|
|
124
125
|
min: "${label} harus minimal ${min} karakter",
|
|
125
126
|
max: "${label} harus maksimal ${max} karakter",
|
|
126
|
-
range: "${label} harus
|
|
127
|
+
range: "${label} harus di antara ${min}-${max} karakter"
|
|
127
128
|
},
|
|
128
129
|
number: {
|
|
129
130
|
len: "${label} harus sama dengan ${len}",
|
|
@@ -150,7 +151,8 @@ const localeValues = {
|
|
|
150
151
|
transparent: "Transparan",
|
|
151
152
|
singleColor: "Warna tunggal",
|
|
152
153
|
gradientColor: "Warna gradien"
|
|
153
|
-
}
|
|
154
|
+
},
|
|
155
|
+
Input: { otpCell: "Karakter ${index} dari ${total}" }
|
|
154
156
|
};
|
|
155
157
|
//#endregion
|
|
156
158
|
export { localeValues as default };
|
package/dist/locale/uz_UZ.js
CHANGED
|
@@ -33,16 +33,16 @@ const localeValues = {
|
|
|
33
33
|
selectedRow: "Qator tanlandi",
|
|
34
34
|
selectionMenu: "Tanlash menyusi",
|
|
35
35
|
sortTitle: "Tartiblash",
|
|
36
|
-
expand: "
|
|
37
|
-
collapse: "
|
|
38
|
-
expandAll: "Barcha
|
|
39
|
-
collapseAll: "Barcha
|
|
36
|
+
expand: "Qatorni yoyish",
|
|
37
|
+
collapse: "Qatorni yig'ish",
|
|
38
|
+
expandAll: "Barcha qatorlarni yoyish",
|
|
39
|
+
collapseAll: "Barcha qatorlarni yig'ish",
|
|
40
40
|
triggerDesc: "Kamayish tartibida tartiblash uchun bosing",
|
|
41
41
|
triggerAsc: "O'sish tartibida tartiblash uchun bosing",
|
|
42
|
-
cancelSort: "
|
|
42
|
+
cancelSort: "Tartiblashni bekor qilish uchun bosing"
|
|
43
43
|
},
|
|
44
44
|
Tour: {
|
|
45
|
-
Next: "
|
|
45
|
+
Next: "Keyingi",
|
|
46
46
|
Previous: "Ortga",
|
|
47
47
|
Finish: "Tugatish"
|
|
48
48
|
},
|
|
@@ -65,7 +65,7 @@ const localeValues = {
|
|
|
65
65
|
itemUnit: "elem.",
|
|
66
66
|
itemsUnit: "elem.",
|
|
67
67
|
remove: "Oʻchirish",
|
|
68
|
-
selectAll: "
|
|
68
|
+
selectAll: "Barcha ma'lumotlarni tanlash",
|
|
69
69
|
selectCurrent: "Joriy sahifani tanlash",
|
|
70
70
|
selectInvert: "Tanlovni aylantirish",
|
|
71
71
|
removeAll: "Barcha ma'lumotlarni o'chirish",
|
|
@@ -85,8 +85,8 @@ const localeValues = {
|
|
|
85
85
|
edit: "Tahrirlash",
|
|
86
86
|
copy: "Nusxalash",
|
|
87
87
|
copied: "Nusxalandi",
|
|
88
|
-
expand: "
|
|
89
|
-
collapse: "
|
|
88
|
+
expand: "Yoyish",
|
|
89
|
+
collapse: "Yigʻish"
|
|
90
90
|
},
|
|
91
91
|
Carousel: {
|
|
92
92
|
prevSlide: "Oldingi slayd",
|
|
@@ -102,7 +102,7 @@ const localeValues = {
|
|
|
102
102
|
date: {
|
|
103
103
|
format: "${label} toʻgʻri sana formatida emas",
|
|
104
104
|
parse: "${label} sanaga aylantirilmaydi",
|
|
105
|
-
invalid: "${label}
|
|
105
|
+
invalid: "${label} toʻgʻri sana emas"
|
|
106
106
|
},
|
|
107
107
|
types: {
|
|
108
108
|
string: typeTemplate,
|
|
@@ -121,8 +121,8 @@ const localeValues = {
|
|
|
121
121
|
},
|
|
122
122
|
string: {
|
|
123
123
|
len: "${label}, ${len} ta belgidan iborat boʻlishi kerak",
|
|
124
|
-
min: "${label}
|
|
125
|
-
max: "${label}
|
|
124
|
+
min: "${label} kamida ${min} ta belgidan iborat boʻlishi kerak",
|
|
125
|
+
max: "${label} koʻpi bilan ${max} ta belgidan iborat boʻlishi kerak",
|
|
126
126
|
range: "${label} uzunligi ${min}-${max} belgilar orasida boʻlishi kerak"
|
|
127
127
|
},
|
|
128
128
|
number: {
|
package/dist/masonry/Masonry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
3
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import { responsiveArray } from "../_util/responsiveObserver.js";
|
package/dist/mentions/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
1
3
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
4
|
+
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
2
5
|
import { useFormItemInputContext } from "../form/context.js";
|
|
3
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
4
6
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
5
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
6
|
-
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
7
7
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
8
8
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
9
9
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -406,7 +406,8 @@ Mentions.install = (app) => {
|
|
|
406
406
|
Mentions.getMentions = (value = "", config = {}) => {
|
|
407
407
|
const { prefix = "@", split = " " } = config;
|
|
408
408
|
const prefixList = toList(prefix);
|
|
409
|
-
|
|
409
|
+
const separator = split === " " ? /[ \r\n]+/ : split;
|
|
410
|
+
return value.split(separator).reduce((list, str = "") => {
|
|
410
411
|
let hitPrefix = null;
|
|
411
412
|
prefixList.some((prefixStr) => {
|
|
412
413
|
if (str.slice(0, prefixStr.length) === prefixStr) {
|
package/dist/menu/MenuDivider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { pureAttrs } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { createVNode, defineComponent, mergeProps } from "vue";
|
|
4
4
|
import { clsx } from "@v-c/util";
|
|
5
5
|
import { Divider } from "@v-c/menu";
|
package/dist/menu/MenuItem.js
CHANGED
|
@@ -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
|
|
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;
|
package/dist/menu/index.d.ts
CHANGED
|
@@ -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 };
|
package/dist/menu/index.js
CHANGED
|
@@ -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: {
|
|
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: {
|
|
152
|
-
|
|
153
|
-
|
|
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: {
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
1
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import initCollapseMotion from "../_util/motion.js";
|
|
@@ -13,8 +13,8 @@ import SubMenu$1 from "./SubMenu.js";
|
|
|
13
13
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
14
14
|
import { clsx } from "@v-c/util";
|
|
15
15
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
16
|
-
import { EllipsisOutlined } from "@antdv-next/icons";
|
|
17
16
|
import { omit as omit$1 } from "es-toolkit";
|
|
17
|
+
import { EllipsisOutlined } from "@antdv-next/icons";
|
|
18
18
|
import VcMenu from "@v-c/menu";
|
|
19
19
|
//#region src/menu/menu.tsx
|
|
20
20
|
const omitPropKeys = [
|
|
@@ -100,17 +100,17 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
100
100
|
}));
|
|
101
101
|
const menuRef = shallowRef();
|
|
102
102
|
expose({ menu: menuRef });
|
|
103
|
-
|
|
103
|
+
function getMergedExpandIcon() {
|
|
104
104
|
const expandIcon = slots?.expandIcon ?? props?.expandIcon;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
if (typeof expandIcon === "function" || isEmptyIcon(expandIcon)) return expandIcon || null;
|
|
106
|
+
if (typeof overrideObj.value?.expandIcon === "function" || isEmptyIcon(overrideObj.value?.expandIcon)) return overrideObj.value.expandIcon || null;
|
|
107
|
+
if (typeof contextExpandIcon.value === "function" || isEmptyIcon(contextExpandIcon.value)) return contextExpandIcon.value || null;
|
|
108
|
+
const mergedIcon = expandIcon ?? overrideObj?.value.expandIcon ?? contextExpandIcon.value;
|
|
109
|
+
const iconChild = filterEmpty(Array.isArray(mergedIcon) ? mergedIcon : [mergedIcon])[0];
|
|
110
|
+
if (isVNode(iconChild)) return createVNode(iconChild, { class: `${prefixCls.value}-submenu-expand-icon` });
|
|
111
|
+
}
|
|
112
|
+
return () => {
|
|
113
|
+
const mergedExpandIcon = getMergedExpandIcon();
|
|
114
114
|
const _getPopupContainer = props?.getPopupContainer ?? getPopupContainer;
|
|
115
115
|
const { theme, overflowedIndicatorPopupClassName, rootClass } = props;
|
|
116
116
|
const passedProps = omit$1(props, omitPropKeys);
|
|
@@ -236,7 +236,10 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
236
236
|
type: String,
|
|
237
237
|
required: false
|
|
238
238
|
},
|
|
239
|
-
mode: {
|
|
239
|
+
mode: {
|
|
240
|
+
type: String,
|
|
241
|
+
required: false
|
|
242
|
+
},
|
|
240
243
|
inlineCollapsed: {
|
|
241
244
|
type: Boolean,
|
|
242
245
|
required: false,
|
|
@@ -289,9 +292,27 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
289
292
|
required: false,
|
|
290
293
|
default: void 0
|
|
291
294
|
},
|
|
292
|
-
triggerSubMenuAction: {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
triggerSubMenuAction: {
|
|
296
|
+
type: String,
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
299
|
+
builtinPlacements: {
|
|
300
|
+
type: Object,
|
|
301
|
+
required: false
|
|
302
|
+
},
|
|
303
|
+
expandIcon: {
|
|
304
|
+
type: [
|
|
305
|
+
Object,
|
|
306
|
+
Function,
|
|
307
|
+
String,
|
|
308
|
+
Number,
|
|
309
|
+
null,
|
|
310
|
+
Boolean,
|
|
311
|
+
Array
|
|
312
|
+
],
|
|
313
|
+
required: false,
|
|
314
|
+
default: void 0
|
|
315
|
+
},
|
|
295
316
|
overflowedIndicator: {
|
|
296
317
|
type: [
|
|
297
318
|
Object,
|
|
@@ -321,7 +342,10 @@ const InternalMenu = /* @__PURE__ */ defineComponent((props, { slots, emit, attr
|
|
|
321
342
|
type: Function,
|
|
322
343
|
required: false
|
|
323
344
|
},
|
|
324
|
-
popupRender: {
|
|
345
|
+
popupRender: {
|
|
346
|
+
type: Function,
|
|
347
|
+
required: false
|
|
348
|
+
},
|
|
325
349
|
id: {
|
|
326
350
|
type: String,
|
|
327
351
|
required: false
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { pureAttrs, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
5
|
import { isRenderable } from "../_util/is.js";
|
|
6
6
|
import style_default from "./style/index.js";
|
|
7
7
|
import { Fragment, computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
8
8
|
import { clsx } from "@v-c/util";
|
|
9
|
-
import { CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, InfoCircleFilled, LoadingOutlined } from "@antdv-next/icons";
|
|
10
9
|
import { omit as omit$1 } from "es-toolkit";
|
|
10
|
+
import { CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, InfoCircleFilled, LoadingOutlined } from "@antdv-next/icons";
|
|
11
11
|
import { Notification } from "@v-c/notification";
|
|
12
12
|
//#region src/message/PurePanel.tsx
|
|
13
13
|
const TypeIcon = {
|
package/dist/message/index.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
95
|
+
return createVNode(ConfigProvider, {
|
|
99
96
|
"prefixCls": global.getRootPrefixCls(),
|
|
100
97
|
"iconPrefixCls": global.getIconPrefixCls(),
|
|
101
98
|
"theme": global.theme.value
|
|
102
|
-
},
|
|
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
|
|
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
|
|
205
|
+
else {
|
|
206
|
+
task.skipped = true;
|
|
207
|
+
resolve();
|
|
208
|
+
}
|
|
207
209
|
};
|
|
208
210
|
});
|
|
209
211
|
flushMessageQueue();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { devUseWarning } from "../_util/warning.js";
|
|
2
|
-
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
1
|
import { resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { devUseWarning } from "../_util/warning.js";
|
|
4
4
|
import { toPropsRefs } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import style_default from "./style/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeMaskConfig } from "../_util/hooks/useMergedMask.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import useToken from "../theme/useToken.js";
|
|
4
|
-
import {
|
|
4
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
5
5
|
import "../_util/hooks/useZIndex.js";
|
|
6
6
|
import fallbackProp from "../_util/fallbackProp.js";
|
|
7
7
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
package/dist/modal/Modal.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
-
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
-
import { ContextIsolator } from "../_util/ContextIsolator.js";
|
|
4
1
|
import { useMergedMask } from "../_util/hooks/useMergedMask.js";
|
|
5
2
|
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
6
3
|
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
|
+
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
5
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
7
6
|
import { ZIndexProvider } from "../_util/zindexContext.js";
|
|
8
7
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
8
|
+
import { ContextIsolator } from "../_util/ContextIsolator.js";
|
|
9
9
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
10
10
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
11
11
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
@@ -17,9 +17,9 @@ import { Footer, renderCloseIcon } from "./shared.js";
|
|
|
17
17
|
import style_default from "./style/index.js";
|
|
18
18
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
19
19
|
import { clsx } from "@v-c/util";
|
|
20
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
20
21
|
import { CloseOutlined } from "@antdv-next/icons";
|
|
21
22
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
22
|
-
import { omit as omit$1 } from "es-toolkit";
|
|
23
23
|
import Dialog from "@v-c/dialog";
|
|
24
24
|
//#region src/modal/Modal.tsx
|
|
25
25
|
let mousePosition;
|
package/dist/modal/PurePanel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
4
4
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
5
|
import { Footer, renderCloseIcon } from "./shared.js";
|
package/dist/modal/confirm.js
CHANGED
|
@@ -319,10 +319,12 @@ function confirm(config) {
|
|
|
319
319
|
close,
|
|
320
320
|
open: true
|
|
321
321
|
};
|
|
322
|
+
const stopThemeWatch = watch(() => global.theme.value, () => renderWithProps(currentConfig));
|
|
322
323
|
function destroy(...args) {
|
|
323
324
|
if (args.some((param) => param?.triggerCancel)) config.onCancel?.(() => {}, ...args.slice(1));
|
|
324
325
|
const index = destroyFns.indexOf(close);
|
|
325
326
|
if (index !== -1) destroyFns.splice(index, 1);
|
|
327
|
+
stopThemeWatch();
|
|
326
328
|
render(null, container);
|
|
327
329
|
container.parentNode?.removeChild(container);
|
|
328
330
|
}
|
|
@@ -339,18 +341,14 @@ function confirm(config) {
|
|
|
339
341
|
iconPrefixCls,
|
|
340
342
|
theme
|
|
341
343
|
});
|
|
342
|
-
const
|
|
344
|
+
const nextVnode = createVNode(ConfigProvider, {
|
|
343
345
|
prefixCls: rootPrefixCls,
|
|
344
346
|
iconPrefixCls,
|
|
345
347
|
theme,
|
|
346
348
|
locale: global.locale
|
|
347
|
-
}, { default: () => holderNode });
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
watch(() => global.theme.value, () => {
|
|
351
|
-
vnode.component?.update?.();
|
|
352
|
-
});
|
|
353
|
-
render(vnode, container);
|
|
349
|
+
}, { default: () => global.holderRender ? global.holderRender(holderNode) : holderNode });
|
|
350
|
+
nextVnode.appContext = appContext;
|
|
351
|
+
render(nextVnode, container);
|
|
354
352
|
}
|
|
355
353
|
function close(...args) {
|
|
356
354
|
currentConfig = {
|
package/dist/modal/index.d.ts
CHANGED
|
@@ -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
|
-
}, {
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
3
2
|
import { pureAttrs, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
+
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
4
4
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import { isRenderable } from "../_util/is.js";
|
|
@@ -8,8 +8,8 @@ import style_default, { PurePanelStyle } from "./style/index.js";
|
|
|
8
8
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
9
9
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
10
10
|
import { clsx } from "@v-c/util";
|
|
11
|
-
import { CheckCircleFilled, CloseCircleFilled, CloseOutlined, ExclamationCircleFilled, InfoCircleFilled } from "@antdv-next/icons";
|
|
12
11
|
import { omit as omit$1 } from "es-toolkit";
|
|
12
|
+
import { CheckCircleFilled, CloseCircleFilled, CloseOutlined, ExclamationCircleFilled, InfoCircleFilled } from "@antdv-next/icons";
|
|
13
13
|
import { Notification } from "@v-c/notification";
|
|
14
14
|
//#region src/notification/PurePanel.tsx
|
|
15
15
|
function getCloseIcon(prefixCls, closeIcon) {
|
|
@@ -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 { createVNode, defineComponent, getCurrentInstance,
|
|
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 = {};
|
|
@@ -32,15 +29,14 @@ function getGlobalContext() {
|
|
|
32
29
|
};
|
|
33
30
|
}
|
|
34
31
|
const GlobalHolder = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
35
|
-
const {
|
|
32
|
+
const { sync } = props;
|
|
36
33
|
const { getPrefixCls } = useBaseConfig();
|
|
37
|
-
const prefixCls = defaultGlobalConfig?.prefixCls || getPrefixCls("notification");
|
|
38
34
|
const appConfig = useAppConfig();
|
|
39
|
-
const [api, holder] = useInternalNotification({
|
|
40
|
-
...notificationConfig,
|
|
41
|
-
prefixCls,
|
|
35
|
+
const [api, holder] = useInternalNotification(computed(() => ({
|
|
36
|
+
...props.notificationConfig,
|
|
37
|
+
prefixCls: defaultGlobalConfig?.prefixCls || getPrefixCls("notification"),
|
|
42
38
|
...appConfig.notification || {}
|
|
43
|
-
});
|
|
39
|
+
})));
|
|
44
40
|
onMounted(() => {
|
|
45
41
|
sync?.();
|
|
46
42
|
});
|
|
@@ -93,13 +89,12 @@ const GlobalHolderWrapper = /* @__PURE__ */ defineComponent((props) => {
|
|
|
93
89
|
"sync": sync,
|
|
94
90
|
"notificationConfig": notificationConfig.value
|
|
95
91
|
}, null);
|
|
96
|
-
|
|
92
|
+
return createVNode(ConfigProvider, {
|
|
97
93
|
"prefixCls": global.getRootPrefixCls(),
|
|
98
94
|
"iconPrefixCls": global.getIconPrefixCls(),
|
|
99
95
|
"theme": global.theme.value,
|
|
100
96
|
"locale": globalConfig().locale
|
|
101
|
-
},
|
|
102
|
-
return global.holderRender ? global.holderRender(configHolderNode) : configHolderNode;
|
|
97
|
+
}, { default: () => [global.holderRender ? global.holderRender(holderNode) : holderNode] });
|
|
103
98
|
};
|
|
104
99
|
}, { props: { onReady: {
|
|
105
100
|
type: Function,
|