naive-ui 2.30.4 → 2.30.7
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/README.zh-CN.md +2 -2
- package/dist/index.js +2321 -1375
- package/dist/index.prod.js +2 -2
- package/es/_internal/close/src/Close.js +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.js +1 -2
- package/es/_internal/selection/src/Selection.js +5 -3
- package/es/_utils/dom/index.d.ts +1 -0
- package/es/_utils/dom/index.js +1 -0
- package/es/_utils/dom/is-document.d.ts +1 -0
- package/es/_utils/dom/is-document.js +3 -0
- package/es/_utils/index.d.ts +2 -1
- package/es/_utils/index.js +2 -1
- package/es/_utils/vue/index.d.ts +2 -0
- package/es/_utils/vue/index.js +2 -0
- package/es/_utils/vue/is-node-v-show-false.d.ts +2 -0
- package/es/_utils/vue/is-node-v-show-false.js +6 -0
- package/es/{_internal/scrollbar/src/Wrapper.d.ts → _utils/vue/wrapper.d.ts} +0 -0
- package/es/{_internal/scrollbar/src/Wrapper.js → _utils/vue/wrapper.js} +0 -0
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/back-top/src/BackTop.js +24 -31
- package/es/button/src/styles/index.cssr.js +3 -0
- package/es/color-picker/src/ColorInputUnit.js +1 -1
- package/es/data-table/src/DataTable.d.ts +5 -2
- package/es/data-table/src/DataTable.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +5 -7
- package/es/data-table/src/TableParts/Cell.d.ts +11 -1
- package/es/data-table/src/TableParts/Cell.js +19 -6
- package/es/data-table/src/interface.d.ts +5 -2
- package/es/data-table/src/styles/index.cssr.js +7 -2
- package/es/data-table/src/use-check.js +11 -3
- package/es/date-picker/src/DatePicker.d.ts +40 -0
- package/es/date-picker/src/DatePicker.js +15 -3
- package/es/date-picker/src/config.d.ts +1 -1
- package/es/date-picker/src/panel/date.d.ts +4 -0
- package/es/date-picker/src/panel/daterange.d.ts +7 -1
- package/es/date-picker/src/panel/datetime.d.ts +4 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +7 -1
- package/es/date-picker/src/panel/month.d.ts +4 -0
- package/es/date-picker/src/panel/monthrange.d.ts +11 -5
- package/es/date-picker/src/panel/monthrange.js +13 -7
- package/es/date-picker/src/panel/panelHeader.d.ts +8 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +4 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +9 -3
- package/es/date-picker/src/panel/use-dual-calendar.js +26 -6
- package/es/date-picker/src/panel/use-panel-common.d.ts +4 -0
- package/es/date-picker/src/utils.d.ts +1 -1
- package/es/date-picker/src/utils.js +2 -2
- package/es/date-picker/styles/_common.d.ts +4 -0
- package/es/date-picker/styles/_common.js +5 -1
- package/es/date-picker/styles/light.d.ts +8 -0
- package/es/drawer/src/DrawerBodyWrapper.js +1 -1
- package/es/grid/src/Grid.d.ts +3 -0
- package/es/grid/src/Grid.js +47 -9
- package/es/grid/src/GridItem.js +2 -1
- package/es/image/src/Image.d.ts +10 -0
- package/es/image/src/Image.js +42 -8
- package/es/image/src/utils.d.ts +11 -0
- package/es/image/src/utils.js +81 -0
- package/es/input/src/styles/input-group-label.cssr.js +2 -0
- package/es/locales/common/viVN.d.ts +3 -0
- package/es/locales/common/viVN.js +113 -0
- package/es/locales/date/viVN.d.ts +3 -0
- package/es/locales/date/viVN.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/modal/src/BodyWrapper.d.ts +13 -18
- package/es/modal/src/BodyWrapper.js +38 -33
- package/es/modal/src/Modal.js +12 -7
- package/es/modal/src/styles/index.cssr.js +1 -0
- package/es/notification/src/Notification.d.ts +3 -0
- package/es/notification/src/Notification.js +5 -2
- package/es/notification/src/NotificationContainer.d.ts +3 -0
- package/es/notification/src/NotificationProvider.d.ts +27 -0
- package/es/notification/src/styles/index.cssr.js +6 -3
- package/es/notification/styles/_common.d.ts +3 -0
- package/es/notification/styles/_common.js +4 -1
- package/es/notification/styles/light.d.ts +6 -0
- package/es/select/index.d.ts +1 -1
- package/es/select/src/Select.d.ts +4 -4
- package/es/select/src/Select.js +10 -1
- package/es/select/src/interface.d.ts +1 -0
- package/es/space/src/Space.d.ts +26 -0
- package/es/space/src/Space.js +53 -43
- package/es/tabs/src/Tabs.js +1 -1
- package/es/tooltip/index.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +4 -3
- package/es/tree/src/Tree.js +2 -1
- package/es/tree/src/TreeNode.d.ts +1 -1
- package/es/tree/src/interface.d.ts +1 -1
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +27 -5
- package/es/tree-select/src/TreeSelect.js +19 -3
- package/es/tree-select/src/interface.d.ts +17 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/close/src/Close.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +2 -3
- package/lib/_internal/selection/src/Selection.js +4 -2
- package/lib/_utils/dom/index.d.ts +1 -0
- package/lib/_utils/dom/index.js +5 -0
- package/lib/_utils/dom/is-document.d.ts +1 -0
- package/lib/_utils/dom/is-document.js +7 -0
- package/lib/_utils/index.d.ts +2 -1
- package/lib/_utils/index.js +4 -1
- package/lib/_utils/vue/index.d.ts +2 -0
- package/lib/_utils/vue/index.js +5 -1
- package/lib/_utils/vue/is-node-v-show-false.d.ts +2 -0
- package/lib/_utils/vue/is-node-v-show-false.js +10 -0
- package/lib/{_internal/scrollbar/src/Wrapper.d.ts → _utils/vue/wrapper.d.ts} +0 -0
- package/lib/{_internal/scrollbar/src/Wrapper.js → _utils/vue/wrapper.js} +0 -0
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/back-top/src/BackTop.js +23 -30
- package/lib/button/src/styles/index.cssr.js +3 -0
- package/lib/color-picker/src/ColorInputUnit.js +1 -1
- package/lib/data-table/src/DataTable.d.ts +5 -2
- package/lib/data-table/src/DataTable.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +5 -7
- package/lib/data-table/src/TableParts/Cell.d.ts +11 -1
- package/lib/data-table/src/TableParts/Cell.js +19 -6
- package/lib/data-table/src/interface.d.ts +5 -2
- package/lib/data-table/src/styles/index.cssr.js +7 -2
- package/lib/data-table/src/use-check.js +11 -3
- package/lib/date-picker/src/DatePicker.d.ts +40 -0
- package/lib/date-picker/src/DatePicker.js +15 -3
- package/lib/date-picker/src/config.d.ts +1 -1
- package/lib/date-picker/src/panel/date.d.ts +4 -0
- package/lib/date-picker/src/panel/daterange.d.ts +7 -1
- package/lib/date-picker/src/panel/datetime.d.ts +4 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +7 -1
- package/lib/date-picker/src/panel/month.d.ts +4 -0
- package/lib/date-picker/src/panel/monthrange.d.ts +11 -5
- package/lib/date-picker/src/panel/monthrange.js +13 -7
- package/lib/date-picker/src/panel/panelHeader.d.ts +8 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +4 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +9 -3
- package/lib/date-picker/src/panel/use-dual-calendar.js +24 -4
- package/lib/date-picker/src/panel/use-panel-common.d.ts +4 -0
- package/lib/date-picker/src/utils.d.ts +1 -1
- package/lib/date-picker/src/utils.js +2 -2
- package/lib/date-picker/styles/_common.d.ts +4 -0
- package/lib/date-picker/styles/_common.js +5 -1
- package/lib/date-picker/styles/light.d.ts +8 -0
- package/lib/drawer/src/DrawerBodyWrapper.js +1 -1
- package/lib/grid/src/Grid.d.ts +3 -0
- package/lib/grid/src/Grid.js +45 -7
- package/lib/grid/src/GridItem.js +2 -1
- package/lib/image/src/Image.d.ts +10 -0
- package/lib/image/src/Image.js +41 -7
- package/lib/image/src/utils.d.ts +11 -0
- package/lib/image/src/utils.js +86 -0
- package/lib/input/src/styles/input-group-label.cssr.js +2 -0
- package/lib/locales/common/viVN.d.ts +3 -0
- package/lib/locales/common/viVN.js +115 -0
- package/lib/locales/date/viVN.d.ts +3 -0
- package/lib/locales/date/viVN.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/modal/src/BodyWrapper.d.ts +13 -18
- package/lib/modal/src/BodyWrapper.js +38 -33
- package/lib/modal/src/Modal.js +12 -7
- package/lib/modal/src/styles/index.cssr.js +1 -0
- package/lib/notification/src/Notification.d.ts +3 -0
- package/lib/notification/src/Notification.js +5 -2
- package/lib/notification/src/NotificationContainer.d.ts +3 -0
- package/lib/notification/src/NotificationProvider.d.ts +27 -0
- package/lib/notification/src/styles/index.cssr.js +6 -3
- package/lib/notification/styles/_common.d.ts +3 -0
- package/lib/notification/styles/_common.js +4 -1
- package/lib/notification/styles/light.d.ts +6 -0
- package/lib/select/index.d.ts +1 -1
- package/lib/select/src/Select.d.ts +4 -4
- package/lib/select/src/Select.js +10 -1
- package/lib/select/src/interface.d.ts +1 -0
- package/lib/space/src/Space.d.ts +26 -0
- package/lib/space/src/Space.js +53 -43
- package/lib/tabs/src/Tabs.js +1 -1
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +4 -3
- package/lib/tree/src/Tree.js +2 -1
- package/lib/tree/src/TreeNode.d.ts +1 -1
- package/lib/tree/src/interface.d.ts +1 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +27 -5
- package/lib/tree-select/src/TreeSelect.js +19 -3
- package/lib/tree-select/src/interface.d.ts +17 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/volar.d.ts +0 -1
- package/web-types.json +100 -10
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const viVN = {
|
|
2
|
+
name: 'vi-VN',
|
|
3
|
+
global: {
|
|
4
|
+
undo: 'Hoàn tác',
|
|
5
|
+
redo: 'Làm lại',
|
|
6
|
+
confirm: 'Xác nhận'
|
|
7
|
+
},
|
|
8
|
+
Popconfirm: {
|
|
9
|
+
positiveText: 'Xác nhận',
|
|
10
|
+
negativeText: 'Hủy'
|
|
11
|
+
},
|
|
12
|
+
Cascader: {
|
|
13
|
+
placeholder: 'Vui lòng chọn',
|
|
14
|
+
loading: 'Đang tải',
|
|
15
|
+
loadingRequiredMessage: (label) => `Vui lòng tải tất cả thông tin con của ${label} trước.`
|
|
16
|
+
},
|
|
17
|
+
Time: {
|
|
18
|
+
dateFormat: '',
|
|
19
|
+
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy'
|
|
20
|
+
},
|
|
21
|
+
DatePicker: {
|
|
22
|
+
yearFormat: 'yyyy',
|
|
23
|
+
monthFormat: 'MMM',
|
|
24
|
+
dayFormat: 'eeeeee',
|
|
25
|
+
yearTypeFormat: 'yyyy',
|
|
26
|
+
monthTypeFormat: 'MM-yyyy',
|
|
27
|
+
dateFormat: 'đ-MM-yyyy',
|
|
28
|
+
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy',
|
|
29
|
+
quarterFormat: 'qqq-yyyy',
|
|
30
|
+
clear: 'Xóa',
|
|
31
|
+
now: 'Hôm nay',
|
|
32
|
+
confirm: 'Xác nhận',
|
|
33
|
+
selectTime: 'Chọn giờ',
|
|
34
|
+
selectDate: 'Chọn ngày',
|
|
35
|
+
datePlaceholder: 'Chọn ngày',
|
|
36
|
+
datetimePlaceholder: 'Chọn ngày giờ',
|
|
37
|
+
monthPlaceholder: 'Chọn tháng',
|
|
38
|
+
yearPlaceholder: 'Chọn năm',
|
|
39
|
+
quarterPlaceholder: 'Chọn quý',
|
|
40
|
+
startDatePlaceholder: 'Ngày bắt đầu',
|
|
41
|
+
endDatePlaceholder: 'Ngày kết thúc',
|
|
42
|
+
startDatetimePlaceholder: 'Thời gian bắt đầu',
|
|
43
|
+
endDatetimePlaceholder: 'Thời gian kết thúc',
|
|
44
|
+
startMonthPlaceholder: 'Tháng bắt đầu',
|
|
45
|
+
endMonthPlaceholder: 'Tháng kết thúc',
|
|
46
|
+
monthBeforeYear: true,
|
|
47
|
+
firstDayOfWeek: 0,
|
|
48
|
+
today: 'Hôm nay'
|
|
49
|
+
},
|
|
50
|
+
DataTable: {
|
|
51
|
+
checkTableAll: 'Chọn tất cả có trong bảng',
|
|
52
|
+
uncheckTableAll: 'Bỏ chọn tất cả có trong bảng',
|
|
53
|
+
confirm: 'Xác nhận',
|
|
54
|
+
clear: 'Xóa'
|
|
55
|
+
},
|
|
56
|
+
Transfer: {
|
|
57
|
+
sourceTitle: 'Nguồn',
|
|
58
|
+
targetTitle: 'Đích'
|
|
59
|
+
},
|
|
60
|
+
Empty: {
|
|
61
|
+
description: 'Không có dữ liệu'
|
|
62
|
+
},
|
|
63
|
+
Select: {
|
|
64
|
+
placeholder: 'Vui lòng chọn'
|
|
65
|
+
},
|
|
66
|
+
TimePicker: {
|
|
67
|
+
placeholder: 'Chọn thời gian',
|
|
68
|
+
positiveText: 'OK',
|
|
69
|
+
negativeText: 'Hủy',
|
|
70
|
+
now: 'Hiện tại'
|
|
71
|
+
},
|
|
72
|
+
Pagination: {
|
|
73
|
+
goto: 'Đi đến trang',
|
|
74
|
+
selectionSuffix: 'trang'
|
|
75
|
+
},
|
|
76
|
+
DynamicTags: {
|
|
77
|
+
add: 'Thêm'
|
|
78
|
+
},
|
|
79
|
+
Log: {
|
|
80
|
+
loading: 'Đang tải'
|
|
81
|
+
},
|
|
82
|
+
Input: {
|
|
83
|
+
placeholder: 'Vui lòng nhập'
|
|
84
|
+
},
|
|
85
|
+
InputNumber: {
|
|
86
|
+
placeholder: 'Vui lòng nhập'
|
|
87
|
+
},
|
|
88
|
+
DynamicInput: {
|
|
89
|
+
create: 'Tạo'
|
|
90
|
+
},
|
|
91
|
+
ThemeEditor: {
|
|
92
|
+
title: 'Tùy chỉnh giao diện',
|
|
93
|
+
clearAllVars: 'Xóa tất cả các biến',
|
|
94
|
+
clearSearch: 'Xóa tìm kiếm',
|
|
95
|
+
filterCompName: 'Lọc tên component',
|
|
96
|
+
filterVarName: 'Lọc tên biến',
|
|
97
|
+
import: 'Nhập',
|
|
98
|
+
export: 'Xuất',
|
|
99
|
+
restore: 'Đặt lại mặc định'
|
|
100
|
+
},
|
|
101
|
+
Image: {
|
|
102
|
+
tipPrevious: 'Hình trước (←)',
|
|
103
|
+
tipNext: 'Hình tiếp (→)',
|
|
104
|
+
tipCounterclockwise: 'Counterclockwise',
|
|
105
|
+
tipClockwise: 'Chiều kim đồng hồ',
|
|
106
|
+
tipZoomOut: 'Thu nhỏ',
|
|
107
|
+
tipZoomIn: 'Phóng to',
|
|
108
|
+
tipClose: 'Đóng (Esc)',
|
|
109
|
+
// TODO: translation
|
|
110
|
+
tipOriginalSize: 'Xem kích thớc gốc'
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
export default viVN;
|
package/es/locales/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { default as plPL } from './common/plPL';
|
|
|
18
18
|
export { default as ptBR } from './common/ptBR';
|
|
19
19
|
export { default as thTH } from './common/thTH';
|
|
20
20
|
export { default as eo } from './common/eo';
|
|
21
|
+
export { default as viVN } from './common/viVN';
|
|
21
22
|
export { default as dateZhCN } from './date/zhCN';
|
|
22
23
|
export { default as dateZhTW } from './date/zhTW';
|
|
23
24
|
export { default as dateEnUS } from './date/enUS';
|
|
@@ -38,6 +39,7 @@ export { default as datePlPL } from './date/plPL';
|
|
|
38
39
|
export { default as datePtBR } from './date/ptBR';
|
|
39
40
|
export { default as dateThTH } from './date/thTH';
|
|
40
41
|
export { default as dateEo } from './date/eo';
|
|
42
|
+
export { default as dateViVN } from './date/viVN';
|
|
41
43
|
export type { NLocale } from './common/enUS';
|
|
42
44
|
export type { NDateLocale } from './date/enUS';
|
|
43
45
|
export type { NPartialLocale } from './utils/index';
|
package/es/locales/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { default as plPL } from './common/plPL';
|
|
|
18
18
|
export { default as ptBR } from './common/ptBR';
|
|
19
19
|
export { default as thTH } from './common/thTH';
|
|
20
20
|
export { default as eo } from './common/eo';
|
|
21
|
+
export { default as viVN } from './common/viVN';
|
|
21
22
|
export { default as dateZhCN } from './date/zhCN';
|
|
22
23
|
export { default as dateZhTW } from './date/zhTW';
|
|
23
24
|
export { default as dateEnUS } from './date/enUS';
|
|
@@ -38,4 +39,5 @@ export { default as datePlPL } from './date/plPL';
|
|
|
38
39
|
export { default as datePtBR } from './date/ptBR';
|
|
39
40
|
export { default as dateThTH } from './date/thTH';
|
|
40
41
|
export { default as dateEo } from './date/eo';
|
|
42
|
+
export { default as dateViVN } from './date/viVN';
|
|
41
43
|
export { createLocale } from './utils/index';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { PropType, VNode, ComponentPublicInstance } from 'vue';
|
|
1
|
+
import { PropType, VNode, ComponentPublicInstance, VNodeChild } from 'vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
required: true;
|
|
6
|
-
};
|
|
3
|
+
renderMask: PropType<() => VNodeChild>;
|
|
4
|
+
onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
7
5
|
onBeforeLeave: {
|
|
8
6
|
type: FunctionConstructor;
|
|
9
7
|
required: true;
|
|
@@ -26,12 +24,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
24
|
};
|
|
27
25
|
onAfterEnter: PropType<() => void>;
|
|
28
26
|
onEsc: PropType<(e: KeyboardEvent) => void>;
|
|
29
|
-
icon: PropType<() =>
|
|
27
|
+
icon: PropType<() => VNodeChild>;
|
|
30
28
|
type: {
|
|
31
29
|
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
32
30
|
readonly default: "default";
|
|
33
31
|
};
|
|
34
|
-
title: PropType<string | (() =>
|
|
32
|
+
title: PropType<string | (() => VNodeChild)>;
|
|
35
33
|
closable: {
|
|
36
34
|
readonly type: BooleanConstructor;
|
|
37
35
|
readonly default: true;
|
|
@@ -40,8 +38,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
38
|
positiveText: StringConstructor;
|
|
41
39
|
positiveButtonProps: PropType<import("../..").ButtonProps>;
|
|
42
40
|
negativeButtonProps: PropType<import("../..").ButtonProps>;
|
|
43
|
-
content: PropType<string | (() =>
|
|
44
|
-
action: PropType<() =>
|
|
41
|
+
content: PropType<string | (() => VNodeChild)>;
|
|
42
|
+
action: PropType<() => VNodeChild>;
|
|
45
43
|
showIcon: {
|
|
46
44
|
readonly type: BooleanConstructor;
|
|
47
45
|
readonly default: true;
|
|
@@ -713,7 +711,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
713
711
|
childNodeRef: import("vue").Ref<VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
714
712
|
[key: string]: any;
|
|
715
713
|
}> | null>;
|
|
716
|
-
handleClickOutside: (e: MouseEvent) => void;
|
|
717
714
|
handlePositiveClick: () => void;
|
|
718
715
|
handleNegativeClick: () => void;
|
|
719
716
|
handleCloseClick: () => void;
|
|
@@ -721,10 +718,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
721
718
|
handleBeforeLeave: (el: HTMLElement) => void;
|
|
722
719
|
handleEnter: (el: HTMLElement) => void;
|
|
723
720
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
required: true;
|
|
727
|
-
};
|
|
721
|
+
renderMask: PropType<() => VNodeChild>;
|
|
722
|
+
onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
728
723
|
onBeforeLeave: {
|
|
729
724
|
type: FunctionConstructor;
|
|
730
725
|
required: true;
|
|
@@ -747,12 +742,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
747
742
|
};
|
|
748
743
|
onAfterEnter: PropType<() => void>;
|
|
749
744
|
onEsc: PropType<(e: KeyboardEvent) => void>;
|
|
750
|
-
icon: PropType<() =>
|
|
745
|
+
icon: PropType<() => VNodeChild>;
|
|
751
746
|
type: {
|
|
752
747
|
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
753
748
|
readonly default: "default";
|
|
754
749
|
};
|
|
755
|
-
title: PropType<string | (() =>
|
|
750
|
+
title: PropType<string | (() => VNodeChild)>;
|
|
756
751
|
closable: {
|
|
757
752
|
readonly type: BooleanConstructor;
|
|
758
753
|
readonly default: true;
|
|
@@ -761,8 +756,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
761
756
|
positiveText: StringConstructor;
|
|
762
757
|
positiveButtonProps: PropType<import("../..").ButtonProps>;
|
|
763
758
|
negativeButtonProps: PropType<import("../..").ButtonProps>;
|
|
764
|
-
content: PropType<string | (() =>
|
|
765
|
-
action: PropType<() =>
|
|
759
|
+
content: PropType<string | (() => VNodeChild)>;
|
|
760
|
+
action: PropType<() => VNodeChild>;
|
|
766
761
|
showIcon: {
|
|
767
762
|
readonly type: BooleanConstructor;
|
|
768
763
|
readonly default: true;
|
|
@@ -26,12 +26,9 @@ export default defineComponent({
|
|
|
26
26
|
}, autoFocus: {
|
|
27
27
|
type: Boolean,
|
|
28
28
|
default: true
|
|
29
|
-
}, blockScroll: Boolean }, presetProps), {
|
|
29
|
+
}, blockScroll: Boolean }, presetProps), { renderMask: Function,
|
|
30
30
|
// events
|
|
31
|
-
onClickoutside: {
|
|
32
|
-
type: Function,
|
|
33
|
-
required: true
|
|
34
|
-
}, onBeforeLeave: {
|
|
31
|
+
onClickoutside: Function, onBeforeLeave: {
|
|
35
32
|
type: Function,
|
|
36
33
|
required: true
|
|
37
34
|
}, onAfterLeave: {
|
|
@@ -122,9 +119,6 @@ export default defineComponent({
|
|
|
122
119
|
function handlePositiveClick() {
|
|
123
120
|
props.onPositiveClick();
|
|
124
121
|
}
|
|
125
|
-
function handleClickOutside(e) {
|
|
126
|
-
props.onClickoutside(e);
|
|
127
|
-
}
|
|
128
122
|
const childNodeRef = ref(null);
|
|
129
123
|
watch(childNodeRef, (node) => {
|
|
130
124
|
if (node) {
|
|
@@ -148,7 +142,6 @@ export default defineComponent({
|
|
|
148
142
|
scrollbarRef,
|
|
149
143
|
displayed: displayedRef,
|
|
150
144
|
childNodeRef,
|
|
151
|
-
handleClickOutside,
|
|
152
145
|
handlePositiveClick,
|
|
153
146
|
handleNegativeClick,
|
|
154
147
|
handleCloseClick,
|
|
@@ -158,7 +151,7 @@ export default defineComponent({
|
|
|
158
151
|
};
|
|
159
152
|
},
|
|
160
153
|
render() {
|
|
161
|
-
const { $slots, $attrs, handleEnter, handleAfterLeave, handleBeforeLeave,
|
|
154
|
+
const { $slots, $attrs, handleEnter, handleAfterLeave, handleBeforeLeave, preset, mergedClsPrefix } = this;
|
|
162
155
|
let childNode = null;
|
|
163
156
|
if (!preset) {
|
|
164
157
|
childNode = getFirstSlotVNode($slots);
|
|
@@ -174,29 +167,41 @@ export default defineComponent({
|
|
|
174
167
|
return this.displayDirective === 'show' || this.displayed || this.show
|
|
175
168
|
? withDirectives(h("div", { role: "none", class: `${mergedClsPrefix}-modal-body-wrapper` },
|
|
176
169
|
h(NScrollbar, { ref: "scrollbarRef", theme: this.mergedTheme.peers.Scrollbar, themeOverrides: this.mergedTheme.peerOverrides.Scrollbar, contentClass: `${mergedClsPrefix}-modal-scroll-content` }, {
|
|
177
|
-
default: () =>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
170
|
+
default: () => {
|
|
171
|
+
var _a;
|
|
172
|
+
return [
|
|
173
|
+
(_a = this.renderMask) === null || _a === void 0 ? void 0 : _a.call(this),
|
|
174
|
+
h(VFocusTrap, { disabled: !this.trapFocus, active: this.show, onEsc: this.onEsc, autoFocus: this.autoFocus }, {
|
|
175
|
+
default: () => {
|
|
176
|
+
var _a;
|
|
177
|
+
return (h(Transition, { name: "fade-in-scale-up-transition", appear: (_a = this.appear) !== null && _a !== void 0 ? _a : this.isMounted, onEnter: handleEnter, onAfterEnter: this.onAfterEnter, onAfterLeave: handleAfterLeave, onBeforeLeave: handleBeforeLeave }, {
|
|
178
|
+
default: () => {
|
|
179
|
+
const dirs = [
|
|
180
|
+
[vShow, this.show]
|
|
181
|
+
];
|
|
182
|
+
const { onClickoutside } = this;
|
|
183
|
+
if (onClickoutside) {
|
|
184
|
+
dirs.push([
|
|
185
|
+
clickoutside,
|
|
186
|
+
this.onClickoutside,
|
|
187
|
+
undefined,
|
|
188
|
+
{ capture: true }
|
|
189
|
+
]);
|
|
190
|
+
}
|
|
191
|
+
return withDirectives((this.preset === 'confirm' ||
|
|
192
|
+
this.preset === 'dialog' ? (h(NDialog, Object.assign({}, this.$attrs, { class: [
|
|
193
|
+
`${mergedClsPrefix}-modal`,
|
|
194
|
+
this.$attrs.class
|
|
195
|
+
], ref: "bodyRef", theme: this.mergedTheme.peers.Dialog, themeOverrides: this.mergedTheme.peerOverrides.Dialog }, keep(this.$props, dialogPropKeys), { "aria-modal": "true" }), $slots)) : this.preset === 'card' ? (h(NCard, Object.assign({}, this.$attrs, { ref: "bodyRef", class: [
|
|
196
|
+
`${mergedClsPrefix}-modal`,
|
|
197
|
+
this.$attrs.class
|
|
198
|
+
], theme: this.mergedTheme.peers.Card, themeOverrides: this.mergedTheme.peerOverrides.Card }, keep(this.$props, cardBasePropKeys), { "aria-modal": "true", role: "dialog" }), $slots)) : ((this.childNodeRef = childNode))), dirs);
|
|
199
|
+
}
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
];
|
|
204
|
+
}
|
|
200
205
|
})), [
|
|
201
206
|
[
|
|
202
207
|
vShow,
|
package/es/modal/src/Modal.js
CHANGED
|
@@ -212,19 +212,24 @@ export default defineComponent({
|
|
|
212
212
|
const { mergedClsPrefix } = this;
|
|
213
213
|
return (h(VLazyTeleport, { to: this.to, show: this.show }, {
|
|
214
214
|
default: () => {
|
|
215
|
-
var _a
|
|
215
|
+
var _a;
|
|
216
216
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
217
|
+
const { unstableShowMask } = this;
|
|
217
218
|
return withDirectives(h("div", { role: "none", ref: "containerRef", class: [
|
|
218
219
|
`${mergedClsPrefix}-modal-container`,
|
|
219
220
|
this.themeClass,
|
|
220
221
|
this.namespace
|
|
221
222
|
], style: this.cssVars },
|
|
222
|
-
this.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
223
|
+
h(NModalBodyWrapper, Object.assign({ style: this.overlayStyle }, this.$attrs, { ref: "bodyWrapper", displayDirective: this.displayDirective, show: this.show, preset: this.preset, autoFocus: this.autoFocus, trapFocus: this.trapFocus, blockScroll: this.blockScroll }, this.presetProps, { onEsc: this.handleEsc, onClose: this.handleCloseClick, onNegativeClick: this.handleNegativeClick, onPositiveClick: this.handlePositiveClick, onBeforeLeave: this.handleBeforeLeave, onAfterEnter: this.onAfterEnter, onAfterLeave: this.handleAfterLeave, onClickoutside: unstableShowMask ? undefined : this.handleClickoutside, renderMask: unstableShowMask
|
|
224
|
+
? () => {
|
|
225
|
+
var _a;
|
|
226
|
+
return (h(Transition, { name: "fade-in-transition", key: "mask", appear: (_a = this.internalAppear) !== null && _a !== void 0 ? _a : this.isMounted }, {
|
|
227
|
+
default: () => {
|
|
228
|
+
return this.show ? (h("div", { "aria-hidden": true, ref: "containerRef", class: `${mergedClsPrefix}-modal-mask`, onClick: this.handleClickoutside })) : null;
|
|
229
|
+
}
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
: undefined }), this.$slots)), [
|
|
228
233
|
[
|
|
229
234
|
zindexable,
|
|
230
235
|
{
|
|
@@ -72,6 +72,9 @@ export declare const Notification: import("vue").DefineComponent<{
|
|
|
72
72
|
'--n-padding-right': string;
|
|
73
73
|
'--n-padding-top': string;
|
|
74
74
|
'--n-padding-bottom': string;
|
|
75
|
+
'--n-title-font-size': string;
|
|
76
|
+
'--n-meta-font-size': string;
|
|
77
|
+
'--n-description-font-size': string;
|
|
75
78
|
}> | undefined;
|
|
76
79
|
themeClass: import("vue").Ref<string> | undefined;
|
|
77
80
|
onRender: (() => void) | undefined;
|
|
@@ -43,7 +43,7 @@ export const Notification = defineComponent({
|
|
|
43
43
|
const { inlineThemeDisabled } = useConfig();
|
|
44
44
|
const cssVarsRef = computed(() => {
|
|
45
45
|
const { type } = props;
|
|
46
|
-
const { self: { color, textColor, closeIconColor, closeIconColorHover, closeIconColorPressed, headerTextColor, descriptionTextColor, actionTextColor, borderRadius, headerFontWeight, boxShadow, lineHeight, fontSize, closeMargin, closeSize, width, padding, closeIconSize, closeBorderRadius, closeColorHover, closeColorPressed, [createKey('iconColor', type)]: iconColor }, common: { cubicBezierEaseOut, cubicBezierEaseIn, cubicBezierEaseInOut } } = mergedThemeRef.value;
|
|
46
|
+
const { self: { color, textColor, closeIconColor, closeIconColorHover, closeIconColorPressed, headerTextColor, descriptionTextColor, actionTextColor, borderRadius, headerFontWeight, boxShadow, lineHeight, fontSize, closeMargin, closeSize, width, padding, closeIconSize, closeBorderRadius, closeColorHover, closeColorPressed, titleFontSize, metaFontSize, descriptionFontSize, [createKey('iconColor', type)]: iconColor }, common: { cubicBezierEaseOut, cubicBezierEaseIn, cubicBezierEaseInOut } } = mergedThemeRef.value;
|
|
47
47
|
const { left, right, top, bottom } = getPadding(padding);
|
|
48
48
|
return {
|
|
49
49
|
'--n-color': color,
|
|
@@ -73,7 +73,10 @@ export const Notification = defineComponent({
|
|
|
73
73
|
'--n-padding-left': left,
|
|
74
74
|
'--n-padding-right': right,
|
|
75
75
|
'--n-padding-top': top,
|
|
76
|
-
'--n-padding-bottom': bottom
|
|
76
|
+
'--n-padding-bottom': bottom,
|
|
77
|
+
'--n-title-font-size': titleFontSize,
|
|
78
|
+
'--n-meta-font-size': metaFontSize,
|
|
79
|
+
'--n-description-font-size': descriptionFontSize
|
|
77
80
|
};
|
|
78
81
|
});
|
|
79
82
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -144,6 +144,9 @@ export declare const NotificationContainer: import("vue").DefineComponent<{
|
|
|
144
144
|
closeIconSize: string;
|
|
145
145
|
width: string;
|
|
146
146
|
padding: string;
|
|
147
|
+
titleFontSize: string;
|
|
148
|
+
metaFontSize: string;
|
|
149
|
+
descriptionFontSize: string;
|
|
147
150
|
};
|
|
148
151
|
peers: {
|
|
149
152
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
@@ -75,6 +75,9 @@ declare const notificationProviderProps: {
|
|
|
75
75
|
closeIconSize: string;
|
|
76
76
|
width: string;
|
|
77
77
|
padding: string;
|
|
78
|
+
titleFontSize: string;
|
|
79
|
+
metaFontSize: string;
|
|
80
|
+
descriptionFontSize: string;
|
|
78
81
|
}, {
|
|
79
82
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
80
83
|
color: string;
|
|
@@ -108,6 +111,9 @@ declare const notificationProviderProps: {
|
|
|
108
111
|
closeIconSize: string;
|
|
109
112
|
width: string;
|
|
110
113
|
padding: string;
|
|
114
|
+
titleFontSize: string;
|
|
115
|
+
metaFontSize: string;
|
|
116
|
+
descriptionFontSize: string;
|
|
111
117
|
}, {
|
|
112
118
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
113
119
|
color: string;
|
|
@@ -141,6 +147,9 @@ declare const notificationProviderProps: {
|
|
|
141
147
|
closeIconSize: string;
|
|
142
148
|
width: string;
|
|
143
149
|
padding: string;
|
|
150
|
+
titleFontSize: string;
|
|
151
|
+
metaFontSize: string;
|
|
152
|
+
descriptionFontSize: string;
|
|
144
153
|
}, {
|
|
145
154
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
146
155
|
color: string;
|
|
@@ -188,6 +197,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
188
197
|
closeIconSize: string;
|
|
189
198
|
width: string;
|
|
190
199
|
padding: string;
|
|
200
|
+
titleFontSize: string;
|
|
201
|
+
metaFontSize: string;
|
|
202
|
+
descriptionFontSize: string;
|
|
191
203
|
}, {
|
|
192
204
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
193
205
|
color: string;
|
|
@@ -221,6 +233,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
233
|
closeIconSize: string;
|
|
222
234
|
width: string;
|
|
223
235
|
padding: string;
|
|
236
|
+
titleFontSize: string;
|
|
237
|
+
metaFontSize: string;
|
|
238
|
+
descriptionFontSize: string;
|
|
224
239
|
}, {
|
|
225
240
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
226
241
|
color: string;
|
|
@@ -254,6 +269,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
254
269
|
closeIconSize: string;
|
|
255
270
|
width: string;
|
|
256
271
|
padding: string;
|
|
272
|
+
titleFontSize: string;
|
|
273
|
+
metaFontSize: string;
|
|
274
|
+
descriptionFontSize: string;
|
|
257
275
|
}, {
|
|
258
276
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
259
277
|
color: string;
|
|
@@ -333,6 +351,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
333
351
|
closeIconSize: string;
|
|
334
352
|
width: string;
|
|
335
353
|
padding: string;
|
|
354
|
+
titleFontSize: string;
|
|
355
|
+
metaFontSize: string;
|
|
356
|
+
descriptionFontSize: string;
|
|
336
357
|
}, {
|
|
337
358
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
338
359
|
color: string;
|
|
@@ -366,6 +387,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
366
387
|
closeIconSize: string;
|
|
367
388
|
width: string;
|
|
368
389
|
padding: string;
|
|
390
|
+
titleFontSize: string;
|
|
391
|
+
metaFontSize: string;
|
|
392
|
+
descriptionFontSize: string;
|
|
369
393
|
}, {
|
|
370
394
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
371
395
|
color: string;
|
|
@@ -399,6 +423,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
399
423
|
closeIconSize: string;
|
|
400
424
|
width: string;
|
|
401
425
|
padding: string;
|
|
426
|
+
titleFontSize: string;
|
|
427
|
+
metaFontSize: string;
|
|
428
|
+
descriptionFontSize: string;
|
|
402
429
|
}, {
|
|
403
430
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
404
431
|
color: string;
|
|
@@ -5,6 +5,9 @@ import { c, cB, cE, cM } from '../../../_utils/cssr'; // vars:
|
|
|
5
5
|
// --n-action-text-color
|
|
6
6
|
// --n-title-text-color
|
|
7
7
|
// --n-title-font-weight
|
|
8
|
+
// --n-title-font-size
|
|
9
|
+
// --n-meta-font-size
|
|
10
|
+
// --n-description-font-size
|
|
8
11
|
// --n-bezier
|
|
9
12
|
// --n-bezier-ease-out
|
|
10
13
|
// --n-bezier-ease-in
|
|
@@ -185,7 +188,7 @@ export default c([cB('notification-container', `
|
|
|
185
188
|
justify-content: space-between;
|
|
186
189
|
margin-top: 12px;
|
|
187
190
|
`, [cE('meta', `
|
|
188
|
-
font-size:
|
|
191
|
+
font-size: var(--n-meta-font-size);
|
|
189
192
|
transition: color .3s var(--n-bezier-ease-out);
|
|
190
193
|
color: var(--n-description-text-color);
|
|
191
194
|
`), cE('action', `
|
|
@@ -194,12 +197,12 @@ export default c([cB('notification-container', `
|
|
|
194
197
|
color: var(--n-action-text-color);
|
|
195
198
|
`)]), cE('header', `
|
|
196
199
|
font-weight: var(--n-title-font-weight);
|
|
197
|
-
font-size:
|
|
200
|
+
font-size: var(--n-title-font-size);
|
|
198
201
|
transition: color .3s var(--n-bezier-ease-out);
|
|
199
202
|
color: var(--n-title-text-color);
|
|
200
203
|
`), cE('description', `
|
|
201
204
|
margin-top: 8px;
|
|
202
|
-
font-size:
|
|
205
|
+
font-size: var(--n-description-font-size);
|
|
203
206
|
transition: color .3s var(--n-bezier-ease-out);
|
|
204
207
|
color: var(--n-description-text-color);
|
|
205
208
|
`), cE('content', `
|
|
@@ -26,6 +26,9 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
26
26
|
closeIconSize: string;
|
|
27
27
|
width: string;
|
|
28
28
|
padding: string;
|
|
29
|
+
titleFontSize: string;
|
|
30
|
+
metaFontSize: string;
|
|
31
|
+
descriptionFontSize: string;
|
|
29
32
|
};
|
|
30
33
|
export declare type NotificationThemeVars = ReturnType<typeof self>;
|
|
31
34
|
declare const notificationLight: import("../../_mixins").Theme<"Notification", {
|
|
@@ -55,6 +58,9 @@ declare const notificationLight: import("../../_mixins").Theme<"Notification", {
|
|
|
55
58
|
closeIconSize: string;
|
|
56
59
|
width: string;
|
|
57
60
|
padding: string;
|
|
61
|
+
titleFontSize: string;
|
|
62
|
+
metaFontSize: string;
|
|
63
|
+
descriptionFontSize: string;
|
|
58
64
|
}, {
|
|
59
65
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
60
66
|
color: string;
|
package/es/select/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as NSelect } from './src/Select';
|
|
2
2
|
export type { SelectProps } from './src/Select';
|
|
3
|
-
export type { SelectGroupOption, SelectOption, SelectInst } from './src/interface';
|
|
3
|
+
export type { SelectGroupOption, SelectOption, SelectInst, SelectFilter } from './src/interface';
|
|
4
4
|
export type { RenderLabelImpl as SelectRenderLabel, RenderOptionImpl as SelectRenderOption } from '../_internal/select-menu/src/interface';
|
|
5
5
|
export type { RenderTag as SelectRenderTag } from '../_internal/selection/src/interface';
|
|
@@ -5,7 +5,7 @@ import { RenderLabel, RenderOption } from '../../_internal/select-menu/src/inter
|
|
|
5
5
|
import { RenderTag } from '../../_internal/selection/src/interface';
|
|
6
6
|
import type { FormValidationStatus } from '../../form/src/interface';
|
|
7
7
|
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
8
|
-
import type { SelectMixedOption, SelectOption, SelectGroupOption, SelectIgnoredOption, SelectFallbackOption, OnUpdateValue, Value, Size, ValueAtom, SelectBaseOption } from './interface';
|
|
8
|
+
import type { SelectMixedOption, SelectOption, SelectGroupOption, SelectIgnoredOption, SelectFallbackOption, OnUpdateValue, Value, Size, ValueAtom, SelectBaseOption, SelectFilter } from './interface';
|
|
9
9
|
declare const selectProps: {
|
|
10
10
|
readonly to: {
|
|
11
11
|
type: PropType<string | boolean | HTMLElement>;
|
|
@@ -40,7 +40,7 @@ declare const selectProps: {
|
|
|
40
40
|
};
|
|
41
41
|
readonly remote: BooleanConstructor;
|
|
42
42
|
readonly loading: BooleanConstructor;
|
|
43
|
-
readonly filter: PropType<
|
|
43
|
+
readonly filter: PropType<SelectFilter>;
|
|
44
44
|
readonly placement: {
|
|
45
45
|
readonly type: PropType<FollowerPlacement>;
|
|
46
46
|
readonly default: "bottom-start";
|
|
@@ -527,7 +527,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
527
527
|
};
|
|
528
528
|
readonly remote: BooleanConstructor;
|
|
529
529
|
readonly loading: BooleanConstructor;
|
|
530
|
-
readonly filter: PropType<
|
|
530
|
+
readonly filter: PropType<SelectFilter>;
|
|
531
531
|
readonly placement: {
|
|
532
532
|
readonly type: PropType<FollowerPlacement>;
|
|
533
533
|
readonly default: "bottom-start";
|
|
@@ -1350,7 +1350,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1350
1350
|
};
|
|
1351
1351
|
readonly remote: BooleanConstructor;
|
|
1352
1352
|
readonly loading: BooleanConstructor;
|
|
1353
|
-
readonly filter: PropType<
|
|
1353
|
+
readonly filter: PropType<SelectFilter>;
|
|
1354
1354
|
readonly placement: {
|
|
1355
1355
|
readonly type: PropType<FollowerPlacement>;
|
|
1356
1356
|
readonly default: "bottom-start";
|