naive-ui 2.30.6 → 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 +1966 -1277
- package/dist/index.prod.js +2 -2
- package/es/_internal/close/src/Close.js +1 -1
- package/es/button/src/styles/index.cssr.js +3 -0
- 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.js +1 -1
- 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/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/tabs/src/Tabs.js +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/button/src/styles/index.cssr.js +3 -0
- 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.js +1 -1
- 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/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/tabs/src/Tabs.js +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 +1 -1
- package/web-types.json +64 -10
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const viVN = {
|
|
4
|
+
name: 'vi-VN',
|
|
5
|
+
global: {
|
|
6
|
+
undo: 'Hoàn tác',
|
|
7
|
+
redo: 'Làm lại',
|
|
8
|
+
confirm: 'Xác nhận'
|
|
9
|
+
},
|
|
10
|
+
Popconfirm: {
|
|
11
|
+
positiveText: 'Xác nhận',
|
|
12
|
+
negativeText: 'Hủy'
|
|
13
|
+
},
|
|
14
|
+
Cascader: {
|
|
15
|
+
placeholder: 'Vui lòng chọn',
|
|
16
|
+
loading: 'Đang tải',
|
|
17
|
+
loadingRequiredMessage: (label) => `Vui lòng tải tất cả thông tin con của ${label} trước.`
|
|
18
|
+
},
|
|
19
|
+
Time: {
|
|
20
|
+
dateFormat: '',
|
|
21
|
+
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy'
|
|
22
|
+
},
|
|
23
|
+
DatePicker: {
|
|
24
|
+
yearFormat: 'yyyy',
|
|
25
|
+
monthFormat: 'MMM',
|
|
26
|
+
dayFormat: 'eeeeee',
|
|
27
|
+
yearTypeFormat: 'yyyy',
|
|
28
|
+
monthTypeFormat: 'MM-yyyy',
|
|
29
|
+
dateFormat: 'đ-MM-yyyy',
|
|
30
|
+
dateTimeFormat: 'HH:mm:ss dd-MM-yyyy',
|
|
31
|
+
quarterFormat: 'qqq-yyyy',
|
|
32
|
+
clear: 'Xóa',
|
|
33
|
+
now: 'Hôm nay',
|
|
34
|
+
confirm: 'Xác nhận',
|
|
35
|
+
selectTime: 'Chọn giờ',
|
|
36
|
+
selectDate: 'Chọn ngày',
|
|
37
|
+
datePlaceholder: 'Chọn ngày',
|
|
38
|
+
datetimePlaceholder: 'Chọn ngày giờ',
|
|
39
|
+
monthPlaceholder: 'Chọn tháng',
|
|
40
|
+
yearPlaceholder: 'Chọn năm',
|
|
41
|
+
quarterPlaceholder: 'Chọn quý',
|
|
42
|
+
startDatePlaceholder: 'Ngày bắt đầu',
|
|
43
|
+
endDatePlaceholder: 'Ngày kết thúc',
|
|
44
|
+
startDatetimePlaceholder: 'Thời gian bắt đầu',
|
|
45
|
+
endDatetimePlaceholder: 'Thời gian kết thúc',
|
|
46
|
+
startMonthPlaceholder: 'Tháng bắt đầu',
|
|
47
|
+
endMonthPlaceholder: 'Tháng kết thúc',
|
|
48
|
+
monthBeforeYear: true,
|
|
49
|
+
firstDayOfWeek: 0,
|
|
50
|
+
today: 'Hôm nay'
|
|
51
|
+
},
|
|
52
|
+
DataTable: {
|
|
53
|
+
checkTableAll: 'Chọn tất cả có trong bảng',
|
|
54
|
+
uncheckTableAll: 'Bỏ chọn tất cả có trong bảng',
|
|
55
|
+
confirm: 'Xác nhận',
|
|
56
|
+
clear: 'Xóa'
|
|
57
|
+
},
|
|
58
|
+
Transfer: {
|
|
59
|
+
sourceTitle: 'Nguồn',
|
|
60
|
+
targetTitle: 'Đích'
|
|
61
|
+
},
|
|
62
|
+
Empty: {
|
|
63
|
+
description: 'Không có dữ liệu'
|
|
64
|
+
},
|
|
65
|
+
Select: {
|
|
66
|
+
placeholder: 'Vui lòng chọn'
|
|
67
|
+
},
|
|
68
|
+
TimePicker: {
|
|
69
|
+
placeholder: 'Chọn thời gian',
|
|
70
|
+
positiveText: 'OK',
|
|
71
|
+
negativeText: 'Hủy',
|
|
72
|
+
now: 'Hiện tại'
|
|
73
|
+
},
|
|
74
|
+
Pagination: {
|
|
75
|
+
goto: 'Đi đến trang',
|
|
76
|
+
selectionSuffix: 'trang'
|
|
77
|
+
},
|
|
78
|
+
DynamicTags: {
|
|
79
|
+
add: 'Thêm'
|
|
80
|
+
},
|
|
81
|
+
Log: {
|
|
82
|
+
loading: 'Đang tải'
|
|
83
|
+
},
|
|
84
|
+
Input: {
|
|
85
|
+
placeholder: 'Vui lòng nhập'
|
|
86
|
+
},
|
|
87
|
+
InputNumber: {
|
|
88
|
+
placeholder: 'Vui lòng nhập'
|
|
89
|
+
},
|
|
90
|
+
DynamicInput: {
|
|
91
|
+
create: 'Tạo'
|
|
92
|
+
},
|
|
93
|
+
ThemeEditor: {
|
|
94
|
+
title: 'Tùy chỉnh giao diện',
|
|
95
|
+
clearAllVars: 'Xóa tất cả các biến',
|
|
96
|
+
clearSearch: 'Xóa tìm kiếm',
|
|
97
|
+
filterCompName: 'Lọc tên component',
|
|
98
|
+
filterVarName: 'Lọc tên biến',
|
|
99
|
+
import: 'Nhập',
|
|
100
|
+
export: 'Xuất',
|
|
101
|
+
restore: 'Đặt lại mặc định'
|
|
102
|
+
},
|
|
103
|
+
Image: {
|
|
104
|
+
tipPrevious: 'Hình trước (←)',
|
|
105
|
+
tipNext: 'Hình tiếp (→)',
|
|
106
|
+
tipCounterclockwise: 'Counterclockwise',
|
|
107
|
+
tipClockwise: 'Chiều kim đồng hồ',
|
|
108
|
+
tipZoomOut: 'Thu nhỏ',
|
|
109
|
+
tipZoomIn: 'Phóng to',
|
|
110
|
+
tipClose: 'Đóng (Esc)',
|
|
111
|
+
// TODO: translation
|
|
112
|
+
tipOriginalSize: 'Xem kích thớc gốc'
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
exports.default = viVN;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const vi_1 = __importDefault(require("date-fns/locale/vi")); //
|
|
7
|
+
const dateVi = {
|
|
8
|
+
name: 'vi-VN',
|
|
9
|
+
locale: vi_1.default
|
|
10
|
+
};
|
|
11
|
+
exports.default = dateVi;
|
package/lib/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/lib/locales/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createLocale = exports.dateEo = exports.dateThTH = exports.datePtBR = exports.datePlPL = exports.dateEnGB = exports.dateSkSK = exports.dateItIT = exports.dateEsAR = exports.dateFrFR = exports.dateNlNL = exports.dateNbNO = exports.dateDeDE = exports.dateIdID = exports.dateKoKR = exports.dateJaJP = exports.dateUkUA = exports.dateRuRU = exports.dateEnUS = exports.dateZhTW = exports.dateZhCN = exports.eo = exports.thTH = exports.ptBR = exports.plPL = exports.enGB = exports.skSK = exports.itIT = exports.esAR = exports.frFR = exports.nlNL = exports.nbNO = exports.deDE = exports.idID = exports.koKR = exports.jaJP = exports.ukUA = exports.ruRU = exports.enUS = exports.zhTW = exports.zhCN = void 0;
|
|
6
|
+
exports.createLocale = exports.dateViVN = exports.dateEo = exports.dateThTH = exports.datePtBR = exports.datePlPL = exports.dateEnGB = exports.dateSkSK = exports.dateItIT = exports.dateEsAR = exports.dateFrFR = exports.dateNlNL = exports.dateNbNO = exports.dateDeDE = exports.dateIdID = exports.dateKoKR = exports.dateJaJP = exports.dateUkUA = exports.dateRuRU = exports.dateEnUS = exports.dateZhTW = exports.dateZhCN = exports.viVN = exports.eo = exports.thTH = exports.ptBR = exports.plPL = exports.enGB = exports.skSK = exports.itIT = exports.esAR = exports.frFR = exports.nlNL = exports.nbNO = exports.deDE = exports.idID = exports.koKR = exports.jaJP = exports.ukUA = exports.ruRU = exports.enUS = exports.zhTW = exports.zhCN = void 0;
|
|
7
7
|
var zhCN_1 = require("./common/zhCN");
|
|
8
8
|
Object.defineProperty(exports, "zhCN", { enumerable: true, get: function () { return __importDefault(zhCN_1).default; } });
|
|
9
9
|
var zhTW_1 = require("./common/zhTW");
|
|
@@ -44,6 +44,8 @@ var thTH_1 = require("./common/thTH");
|
|
|
44
44
|
Object.defineProperty(exports, "thTH", { enumerable: true, get: function () { return __importDefault(thTH_1).default; } });
|
|
45
45
|
var eo_1 = require("./common/eo");
|
|
46
46
|
Object.defineProperty(exports, "eo", { enumerable: true, get: function () { return __importDefault(eo_1).default; } });
|
|
47
|
+
var viVN_1 = require("./common/viVN");
|
|
48
|
+
Object.defineProperty(exports, "viVN", { enumerable: true, get: function () { return __importDefault(viVN_1).default; } });
|
|
47
49
|
var zhCN_2 = require("./date/zhCN");
|
|
48
50
|
Object.defineProperty(exports, "dateZhCN", { enumerable: true, get: function () { return __importDefault(zhCN_2).default; } });
|
|
49
51
|
var zhTW_2 = require("./date/zhTW");
|
|
@@ -84,5 +86,7 @@ var thTH_2 = require("./date/thTH");
|
|
|
84
86
|
Object.defineProperty(exports, "dateThTH", { enumerable: true, get: function () { return __importDefault(thTH_2).default; } });
|
|
85
87
|
var eo_2 = require("./date/eo");
|
|
86
88
|
Object.defineProperty(exports, "dateEo", { enumerable: true, get: function () { return __importDefault(eo_2).default; } });
|
|
89
|
+
var viVN_2 = require("./date/viVN");
|
|
90
|
+
Object.defineProperty(exports, "dateViVN", { enumerable: true, get: function () { return __importDefault(viVN_2).default; } });
|
|
87
91
|
var index_1 = require("./utils/index");
|
|
88
92
|
Object.defineProperty(exports, "createLocale", { enumerable: true, get: function () { return index_1.createLocale; } });
|
|
@@ -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;
|
|
@@ -46,7 +46,7 @@ exports.Notification = (0, vue_1.defineComponent)({
|
|
|
46
46
|
const { inlineThemeDisabled } = (0, _mixins_1.useConfig)();
|
|
47
47
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
48
48
|
const { type } = props;
|
|
49
|
-
const { self: { color, textColor, closeIconColor, closeIconColorHover, closeIconColorPressed, headerTextColor, descriptionTextColor, actionTextColor, borderRadius, headerFontWeight, boxShadow, lineHeight, fontSize, closeMargin, closeSize, width, padding, closeIconSize, closeBorderRadius, closeColorHover, closeColorPressed, [(0, _utils_1.createKey)('iconColor', type)]: iconColor }, common: { cubicBezierEaseOut, cubicBezierEaseIn, cubicBezierEaseInOut } } = mergedThemeRef.value;
|
|
49
|
+
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, [(0, _utils_1.createKey)('iconColor', type)]: iconColor }, common: { cubicBezierEaseOut, cubicBezierEaseIn, cubicBezierEaseInOut } } = mergedThemeRef.value;
|
|
50
50
|
const { left, right, top, bottom } = (0, seemly_1.getPadding)(padding);
|
|
51
51
|
return {
|
|
52
52
|
'--n-color': color,
|
|
@@ -76,7 +76,10 @@ exports.Notification = (0, vue_1.defineComponent)({
|
|
|
76
76
|
'--n-padding-left': left,
|
|
77
77
|
'--n-padding-right': right,
|
|
78
78
|
'--n-padding-top': top,
|
|
79
|
-
'--n-padding-bottom': bottom
|
|
79
|
+
'--n-padding-bottom': bottom,
|
|
80
|
+
'--n-title-font-size': titleFontSize,
|
|
81
|
+
'--n-meta-font-size': metaFontSize,
|
|
82
|
+
'--n-description-font-size': descriptionFontSize
|
|
80
83
|
};
|
|
81
84
|
});
|
|
82
85
|
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;
|
|
@@ -11,6 +11,9 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
11
11
|
// --n-action-text-color
|
|
12
12
|
// --n-title-text-color
|
|
13
13
|
// --n-title-font-weight
|
|
14
|
+
// --n-title-font-size
|
|
15
|
+
// --n-meta-font-size
|
|
16
|
+
// --n-description-font-size
|
|
14
17
|
// --n-bezier
|
|
15
18
|
// --n-bezier-ease-out
|
|
16
19
|
// --n-bezier-ease-in
|
|
@@ -192,7 +195,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
192
195
|
justify-content: space-between;
|
|
193
196
|
margin-top: 12px;
|
|
194
197
|
`, [(0, cssr_1.cE)('meta', `
|
|
195
|
-
font-size:
|
|
198
|
+
font-size: var(--n-meta-font-size);
|
|
196
199
|
transition: color .3s var(--n-bezier-ease-out);
|
|
197
200
|
color: var(--n-description-text-color);
|
|
198
201
|
`), (0, cssr_1.cE)('action', `
|
|
@@ -201,12 +204,12 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
201
204
|
color: var(--n-action-text-color);
|
|
202
205
|
`)]), (0, cssr_1.cE)('header', `
|
|
203
206
|
font-weight: var(--n-title-font-weight);
|
|
204
|
-
font-size:
|
|
207
|
+
font-size: var(--n-title-font-size);
|
|
205
208
|
transition: color .3s var(--n-bezier-ease-out);
|
|
206
209
|
color: var(--n-title-text-color);
|
|
207
210
|
`), (0, cssr_1.cE)('description', `
|
|
208
211
|
margin-top: 8px;
|
|
209
|
-
font-size:
|
|
212
|
+
font-size: var(--n-description-font-size);
|
|
210
213
|
transition: color .3s var(--n-bezier-ease-out);
|
|
211
214
|
color: var(--n-description-text-color);
|
|
212
215
|
`), (0, cssr_1.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/lib/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";
|
package/lib/select/src/Select.js
CHANGED
|
@@ -137,6 +137,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
137
137
|
return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(compitableOptionsRef.value);
|
|
138
138
|
});
|
|
139
139
|
const resolvedFilterRef = (0, vue_1.computed)(() => {
|
|
140
|
+
const { filter } = props;
|
|
141
|
+
if (filter)
|
|
142
|
+
return filter;
|
|
140
143
|
const { labelField, valueField } = props;
|
|
141
144
|
return (pattern, option) => {
|
|
142
145
|
if (!option)
|
|
@@ -400,7 +403,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
400
403
|
const { value: beingCreatedOptions } = beingCreatedOptionsRef;
|
|
401
404
|
const beingCreatedOption = beingCreatedOptions[0] || null;
|
|
402
405
|
if (beingCreatedOption) {
|
|
403
|
-
createdOptionsRef.value
|
|
406
|
+
const createdOptions = createdOptionsRef.value;
|
|
407
|
+
if (!createdOptions.length) {
|
|
408
|
+
createdOptionsRef.value = [beingCreatedOption];
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
createdOptions.push(beingCreatedOption);
|
|
412
|
+
}
|
|
404
413
|
beingCreatedOptionsRef.value = emptyArray;
|
|
405
414
|
}
|
|
406
415
|
}
|
|
@@ -48,3 +48,4 @@ export interface SelectInst {
|
|
|
48
48
|
}
|
|
49
49
|
export declare type SelectFallbackOption = (value: string & number) => SelectOption;
|
|
50
50
|
export declare type SelectFallbackOptionImpl = (value: string | number) => SelectOption;
|
|
51
|
+
export declare type SelectFilter = (pattern: string, option: SelectOption) => boolean;
|
package/lib/tabs/src/Tabs.js
CHANGED
|
@@ -97,7 +97,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
97
97
|
else {
|
|
98
98
|
barEl.classList.remove(disabledClassName);
|
|
99
99
|
}
|
|
100
|
-
if (barWidth && tabEl.offsetWidth >= barWidth) {
|
|
100
|
+
if (typeof barWidth === 'number' && tabEl.offsetWidth >= barWidth) {
|
|
101
101
|
const offsetDiffLeft = Math.floor((tabEl.offsetWidth - barWidth) / 2) + tabEl.offsetLeft;
|
|
102
102
|
barEl.style.left = `${offsetDiffLeft}px`;
|
|
103
103
|
barEl.style.maxWidth = `${barWidth}px`;
|
package/lib/tree/src/Tree.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const treeSharedProps: {
|
|
|
29
29
|
readonly default: () => never[];
|
|
30
30
|
};
|
|
31
31
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
32
|
+
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
32
33
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
33
34
|
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
34
35
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -78,6 +79,7 @@ declare const treeProps: {
|
|
|
78
79
|
readonly default: () => never[];
|
|
79
80
|
};
|
|
80
81
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
82
|
+
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
81
83
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
82
84
|
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
83
85
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -146,7 +148,6 @@ declare const treeProps: {
|
|
|
146
148
|
readonly renderLabel: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
147
149
|
readonly renderPrefix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
148
150
|
readonly renderSuffix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
149
|
-
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
150
151
|
readonly nodeProps: PropType<TreeNodeProps>;
|
|
151
152
|
readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
|
152
153
|
readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
|
@@ -381,6 +382,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
381
382
|
readonly default: () => never[];
|
|
382
383
|
};
|
|
383
384
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
385
|
+
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
384
386
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
385
387
|
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
386
388
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -449,7 +451,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
449
451
|
readonly renderLabel: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
450
452
|
readonly renderPrefix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
451
453
|
readonly renderSuffix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
452
|
-
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
453
454
|
readonly nodeProps: PropType<TreeNodeProps>;
|
|
454
455
|
readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
|
455
456
|
readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
|
@@ -1156,6 +1157,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1156
1157
|
readonly default: () => never[];
|
|
1157
1158
|
};
|
|
1158
1159
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
1160
|
+
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
1159
1161
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
1160
1162
|
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateKeys>>;
|
|
1161
1163
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<OnUpdateKeys>>;
|
|
@@ -1224,7 +1226,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1224
1226
|
readonly renderLabel: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
1225
1227
|
readonly renderPrefix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
1226
1228
|
readonly renderSuffix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => VNodeChild>;
|
|
1227
|
-
readonly renderSwitcherIcon: PropType<RenderSwitcherIcon>;
|
|
1228
1229
|
readonly nodeProps: PropType<TreeNodeProps>;
|
|
1229
1230
|
readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
|
1230
1231
|
readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
|
package/lib/tree/src/Tree.js
CHANGED
|
@@ -72,6 +72,7 @@ exports.treeSharedProps = {
|
|
|
72
72
|
default: () => []
|
|
73
73
|
},
|
|
74
74
|
indeterminateKeys: Array,
|
|
75
|
+
renderSwitcherIcon: Function,
|
|
75
76
|
onUpdateIndeterminateKeys: [Function, Array],
|
|
76
77
|
'onUpdate:indeterminateKeys': [Function, Array],
|
|
77
78
|
onUpdateExpandedKeys: [Function, Array],
|
|
@@ -110,7 +111,7 @@ const treeProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _m
|
|
|
110
111
|
}, checkboxPlacement: {
|
|
111
112
|
type: String,
|
|
112
113
|
default: 'left'
|
|
113
|
-
}, virtualScroll: Boolean, watchProps: Array, renderLabel: Function, renderPrefix: Function, renderSuffix: Function,
|
|
114
|
+
}, virtualScroll: Boolean, watchProps: Array, renderLabel: Function, renderPrefix: Function, renderSuffix: Function, nodeProps: Function, onDragenter: [Function, Array], onDragleave: [Function, Array], onDragend: [Function, Array], onDragstart: [Function, Array], onDragover: [Function, Array], onDrop: [Function, Array], onUpdateCheckedKeys: [Function, Array], 'onUpdate:checkedKeys': [Function, Array], onUpdateSelectedKeys: [Function, Array], 'onUpdate:selectedKeys': [Function, Array] }), exports.treeSharedProps), {
|
|
114
115
|
// internal props for tree-select
|
|
115
116
|
internalTreeSelect: Boolean, internalScrollable: Boolean, internalScrollablePadding: String,
|
|
116
117
|
// use it to display
|
|
@@ -27,7 +27,7 @@ declare const TreeNode: import("vue").DefineComponent<{
|
|
|
27
27
|
internalScrollable: import("vue").Ref<boolean>;
|
|
28
28
|
draggable: import("vue").Ref<boolean>;
|
|
29
29
|
blockLine: import("vue").Ref<boolean>;
|
|
30
|
-
nodeProps: import("vue").ComputedRef<import("vue").HTMLAttributes | undefined>;
|
|
30
|
+
nodeProps: import("vue").ComputedRef<(import("vue").HTMLAttributes & Record<string, unknown>) | undefined>;
|
|
31
31
|
checkboxFocusable: import("vue").Ref<boolean>;
|
|
32
32
|
droppingPosition: import("vue").Ref<import("./interface").DropPosition | null>;
|
|
33
33
|
droppingOffsetLevel: import("vue").Ref<number>;
|
|
@@ -28,7 +28,7 @@ export declare type RenderPrefix = RenderTreePart;
|
|
|
28
28
|
export declare type RenderSuffix = RenderTreePart;
|
|
29
29
|
export declare type TreeNodeProps = (info: {
|
|
30
30
|
option: TreeOption;
|
|
31
|
-
}) => HTMLAttributes
|
|
31
|
+
}) => HTMLAttributes & Record<string, unknown>;
|
|
32
32
|
export interface TreeDragInfo {
|
|
33
33
|
event: DragEvent;
|
|
34
34
|
node: TreeOption;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as NTreeSelect } from './src/TreeSelect';
|
|
2
2
|
export type { TreeSelectProps } from './src/TreeSelect';
|
|
3
|
-
export type { TreeSelectOption } from './src/interface';
|
|
3
|
+
export type { TreeSelectOption, TreeSelectNodeProps, TreeSelectRenderLabel, TreeSelectRenderPrefix, TreeSelectRenderSuffix, TreeSelectRenderTag } from './src/interface';
|