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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject, computed, watch, ref } from 'vue';
|
|
2
|
-
import { addMonths, format, getYear, getMonth, startOfMonth, isValid, startOfSecond, startOfDay, set, getDate, getTime } from 'date-fns/esm';
|
|
3
|
-
import { dateArray, strictParse, yearArray, monthArray, getDefaultTime, pluckValueFromRange } from '../utils';
|
|
2
|
+
import { addMonths, format, getYear, getMonth, startOfMonth, isValid, startOfSecond, startOfDay, set, getDate, getTime, startOfQuarter } from 'date-fns/esm';
|
|
3
|
+
import { dateArray, strictParse, yearArray, monthArray, getDefaultTime, pluckValueFromRange, quarterArray } from '../utils';
|
|
4
4
|
import { usePanelCommon, usePanelCommonProps } from './use-panel-common';
|
|
5
5
|
import { datePickerInjectionKey } from '../interface';
|
|
6
6
|
import { MONTH_ITEM_HEIGHT, START_YEAR } from '../config';
|
|
@@ -113,6 +113,14 @@ function useDualCalendar(props, type) {
|
|
|
113
113
|
const endYearArrayRef = computed(() => {
|
|
114
114
|
return yearArray(pluckValueFromRange(props.value, 'end'), nowRef.value);
|
|
115
115
|
});
|
|
116
|
+
const startQuarterArrayRef = computed(() => {
|
|
117
|
+
const startValue = pluckValueFromRange(props.value, 'start');
|
|
118
|
+
return quarterArray(startValue !== null && startValue !== void 0 ? startValue : Date.now(), startValue, nowRef.value);
|
|
119
|
+
});
|
|
120
|
+
const endQuarterArrayRef = computed(() => {
|
|
121
|
+
const endValue = pluckValueFromRange(props.value, 'end');
|
|
122
|
+
return quarterArray(endValue !== null && endValue !== void 0 ? endValue : Date.now(), endValue, nowRef.value);
|
|
123
|
+
});
|
|
116
124
|
const startMonthArrayRef = computed(() => {
|
|
117
125
|
const startValue = pluckValueFromRange(props.value, 'start');
|
|
118
126
|
return monthArray(startValue !== null && startValue !== void 0 ? startValue : Date.now(), startValue, nowRef.value);
|
|
@@ -541,11 +549,17 @@ function useDualCalendar(props, type) {
|
|
|
541
549
|
function handleColItemClick(dateItem, clickType) {
|
|
542
550
|
const { value } = props;
|
|
543
551
|
const noCurrentValue = !Array.isArray(value);
|
|
544
|
-
const itemTs = dateItem.type === 'year'
|
|
552
|
+
const itemTs = dateItem.type === 'year' && type !== 'yearrange'
|
|
545
553
|
? noCurrentValue
|
|
546
|
-
? set(dateItem.ts, {
|
|
554
|
+
? set(dateItem.ts, {
|
|
555
|
+
month: getMonth(type === 'quarterrange'
|
|
556
|
+
? startOfQuarter(new Date())
|
|
557
|
+
: new Date())
|
|
558
|
+
}).valueOf()
|
|
547
559
|
: set(dateItem.ts, {
|
|
548
|
-
month: getMonth(
|
|
560
|
+
month: getMonth(type === 'quarterrange'
|
|
561
|
+
? startOfQuarter(value[clickType === 'start' ? 0 : 1])
|
|
562
|
+
: value[clickType === 'start' ? 0 : 1])
|
|
549
563
|
}).valueOf()
|
|
550
564
|
: dateItem.ts;
|
|
551
565
|
if (noCurrentValue) {
|
|
@@ -554,6 +568,7 @@ function useDualCalendar(props, type) {
|
|
|
554
568
|
panelCommon.doUpdateValue(nextValue, props.panel);
|
|
555
569
|
justifyColumnsScrollState(nextValue, 'start');
|
|
556
570
|
justifyColumnsScrollState(nextValue, 'end');
|
|
571
|
+
panelCommon.disableTransitionOneTick();
|
|
557
572
|
return;
|
|
558
573
|
}
|
|
559
574
|
const nextValue = [value[0], value[1]];
|
|
@@ -575,6 +590,7 @@ function useDualCalendar(props, type) {
|
|
|
575
590
|
panelCommon.doUpdateValue(nextValue, props.panel);
|
|
576
591
|
switch (type) {
|
|
577
592
|
case 'monthrange':
|
|
593
|
+
case 'quarterrange':
|
|
578
594
|
panelCommon.disableTransitionOneTick();
|
|
579
595
|
if (otherPartsChanged) {
|
|
580
596
|
justifyColumnsScrollState(nextValue, 'start');
|
|
@@ -584,6 +600,10 @@ function useDualCalendar(props, type) {
|
|
|
584
600
|
justifyColumnsScrollState(nextValue, clickType);
|
|
585
601
|
}
|
|
586
602
|
break;
|
|
603
|
+
case 'yearrange':
|
|
604
|
+
panelCommon.disableTransitionOneTick();
|
|
605
|
+
justifyColumnsScrollState(nextValue, 'start');
|
|
606
|
+
justifyColumnsScrollState(nextValue, 'end');
|
|
587
607
|
}
|
|
588
608
|
}
|
|
589
609
|
function handleStartYearVlScroll() {
|
|
@@ -636,7 +656,7 @@ function useDualCalendar(props, type) {
|
|
|
636
656
|
endCalendarNextMonth,
|
|
637
657
|
endCalendarNextYear,
|
|
638
658
|
mergedIsDateDisabled,
|
|
639
|
-
changeStartEndTime, ranges: rangesRef, startCalendarMonth: startCalendarMonthRef, startCalendarYear: startCalendarYearRef, endCalendarMonth: endCalendarMonthRef, endCalendarYear: endCalendarYearRef, weekdays: weekdaysRef, startDateArray: startDateArrayRef, endDateArray: endDateArrayRef, startYearArray: startYearArrayRef, startMonthArray: startMonthArrayRef, endYearArray: endYearArrayRef, endMonthArray: endMonthArrayRef, isSelecting: isSelectingRef, handleRangeShortcutMouseenter,
|
|
659
|
+
changeStartEndTime, ranges: rangesRef, startCalendarMonth: startCalendarMonthRef, startCalendarYear: startCalendarYearRef, endCalendarMonth: endCalendarMonthRef, endCalendarYear: endCalendarYearRef, weekdays: weekdaysRef, startDateArray: startDateArrayRef, endDateArray: endDateArrayRef, startYearArray: startYearArrayRef, startMonthArray: startMonthArrayRef, startQuarterArray: startQuarterArrayRef, endYearArray: endYearArrayRef, endMonthArray: endMonthArrayRef, endQuarterArray: endQuarterArrayRef, isSelecting: isSelectingRef, handleRangeShortcutMouseenter,
|
|
640
660
|
handleRangeShortcutClick }, panelCommon), validation), childComponentRefs), {
|
|
641
661
|
// datetimerangeonly
|
|
642
662
|
startDateDisplayString: startDateInput, endDateInput: endDateInputRef, timePickerSize: panelCommon.timePickerSize, startTimeValue: startTimeValueRef, endTimeValue: endTimeValueRef, datePickerSlots, shortcuts: shortcutsRef, startCalendarDateTime: startCalendarDateTimeRef, endCalendarDateTime: endCalendarDateTimeRef, justifyColumnsScrollState, handleFocusDetectorFocus: panelCommon.handleFocusDetectorFocus, handleStartTimePickerChange,
|
|
@@ -183,6 +183,8 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
183
183
|
calendarLeftPaddingYear: string;
|
|
184
184
|
calendarLeftPaddingQuarter: string;
|
|
185
185
|
calendarLeftPaddingMonthrange: string;
|
|
186
|
+
calendarLeftPaddingQuarterrange: string;
|
|
187
|
+
calendarLeftPaddingYearrange: string;
|
|
186
188
|
calendarRightPaddingDate: string;
|
|
187
189
|
calendarRightPaddingDatetime: string;
|
|
188
190
|
calendarRightPaddingDaterange: string;
|
|
@@ -191,6 +193,8 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
|
|
|
191
193
|
calendarRightPaddingYear: string;
|
|
192
194
|
calendarRightPaddingQuarter: string;
|
|
193
195
|
calendarRightPaddingMonthrange: string;
|
|
196
|
+
calendarRightPaddingQuarterrange: string;
|
|
197
|
+
calendarRightPaddingYearrange: string;
|
|
194
198
|
};
|
|
195
199
|
peers: {
|
|
196
200
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -51,7 +51,7 @@ export interface QuarterItem {
|
|
|
51
51
|
*/
|
|
52
52
|
declare function dateArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number, startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6, strip?: boolean): DateItem[];
|
|
53
53
|
declare function monthArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): MonthItem[];
|
|
54
|
-
declare function quarterArray(
|
|
54
|
+
declare function quarterArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): QuarterItem[];
|
|
55
55
|
declare function yearArray(valueTs: number | null, currentTs: number): YearItem[];
|
|
56
56
|
declare function strictParse(string: string, pattern: string, backup: Date, option: {
|
|
57
57
|
locale: NDateLocale['locale'];
|
|
@@ -145,9 +145,9 @@ function monthArray(yearAnchorTs, valueTs, currentTs) {
|
|
|
145
145
|
}
|
|
146
146
|
return calendarMonths;
|
|
147
147
|
}
|
|
148
|
-
function quarterArray(
|
|
148
|
+
function quarterArray(yearAnchorTs, valueTs, currentTs) {
|
|
149
149
|
const calendarQuarters = [];
|
|
150
|
-
const yearStart = startOfYear(
|
|
150
|
+
const yearStart = startOfYear(yearAnchorTs);
|
|
151
151
|
for (let i = 0; i < 4; i++) {
|
|
152
152
|
calendarQuarters.push(quarterItem(getTime(addQuarters(yearStart, i)), valueTs, currentTs));
|
|
153
153
|
}
|
|
@@ -20,6 +20,8 @@ declare const _default: {
|
|
|
20
20
|
calendarLeftPaddingYear: string;
|
|
21
21
|
calendarLeftPaddingQuarter: string;
|
|
22
22
|
calendarLeftPaddingMonthrange: string;
|
|
23
|
+
calendarLeftPaddingQuarterrange: string;
|
|
24
|
+
calendarLeftPaddingYearrange: string;
|
|
23
25
|
calendarRightPaddingDate: string;
|
|
24
26
|
calendarRightPaddingDatetime: string;
|
|
25
27
|
calendarRightPaddingDaterange: string;
|
|
@@ -28,5 +30,7 @@ declare const _default: {
|
|
|
28
30
|
calendarRightPaddingYear: string;
|
|
29
31
|
calendarRightPaddingQuarter: string;
|
|
30
32
|
calendarRightPaddingMonthrange: string;
|
|
33
|
+
calendarRightPaddingQuarterrange: string;
|
|
34
|
+
calendarRightPaddingYearrange: string;
|
|
31
35
|
};
|
|
32
36
|
export default _default;
|
|
@@ -21,6 +21,8 @@ export default {
|
|
|
21
21
|
calendarLeftPaddingYear: '0',
|
|
22
22
|
calendarLeftPaddingQuarter: '0',
|
|
23
23
|
calendarLeftPaddingMonthrange: '0',
|
|
24
|
+
calendarLeftPaddingQuarterrange: '0',
|
|
25
|
+
calendarLeftPaddingYearrange: '0',
|
|
24
26
|
calendarRightPaddingDate: '6px 12px 4px 12px',
|
|
25
27
|
calendarRightPaddingDatetime: '4px 12px',
|
|
26
28
|
calendarRightPaddingDaterange: '6px 12px 4px 12px',
|
|
@@ -28,5 +30,7 @@ export default {
|
|
|
28
30
|
calendarRightPaddingMonth: '0',
|
|
29
31
|
calendarRightPaddingYear: '0',
|
|
30
32
|
calendarRightPaddingQuarter: '0',
|
|
31
|
-
calendarRightPaddingMonthrange: '0'
|
|
33
|
+
calendarRightPaddingMonthrange: '0',
|
|
34
|
+
calendarRightPaddingQuarterrange: '0',
|
|
35
|
+
calendarRightPaddingYearrange: '0'
|
|
32
36
|
};
|
|
@@ -49,6 +49,8 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
49
49
|
calendarLeftPaddingYear: string;
|
|
50
50
|
calendarLeftPaddingQuarter: string;
|
|
51
51
|
calendarLeftPaddingMonthrange: string;
|
|
52
|
+
calendarLeftPaddingQuarterrange: string;
|
|
53
|
+
calendarLeftPaddingYearrange: string;
|
|
52
54
|
calendarRightPaddingDate: string;
|
|
53
55
|
calendarRightPaddingDatetime: string;
|
|
54
56
|
calendarRightPaddingDaterange: string;
|
|
@@ -57,6 +59,8 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
57
59
|
calendarRightPaddingYear: string;
|
|
58
60
|
calendarRightPaddingQuarter: string;
|
|
59
61
|
calendarRightPaddingMonthrange: string;
|
|
62
|
+
calendarRightPaddingQuarterrange: string;
|
|
63
|
+
calendarRightPaddingYearrange: string;
|
|
60
64
|
};
|
|
61
65
|
export declare type DatePickerThemeVars = ReturnType<typeof self>;
|
|
62
66
|
declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
|
|
@@ -109,6 +113,8 @@ declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
|
|
|
109
113
|
calendarLeftPaddingYear: string;
|
|
110
114
|
calendarLeftPaddingQuarter: string;
|
|
111
115
|
calendarLeftPaddingMonthrange: string;
|
|
116
|
+
calendarLeftPaddingQuarterrange: string;
|
|
117
|
+
calendarLeftPaddingYearrange: string;
|
|
112
118
|
calendarRightPaddingDate: string;
|
|
113
119
|
calendarRightPaddingDatetime: string;
|
|
114
120
|
calendarRightPaddingDaterange: string;
|
|
@@ -117,6 +123,8 @@ declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
|
|
|
117
123
|
calendarRightPaddingYear: string;
|
|
118
124
|
calendarRightPaddingQuarter: string;
|
|
119
125
|
calendarRightPaddingMonthrange: string;
|
|
126
|
+
calendarRightPaddingQuarterrange: string;
|
|
127
|
+
calendarRightPaddingYearrange: string;
|
|
120
128
|
}, {
|
|
121
129
|
Input: import("../../_mixins").Theme<"Input", {
|
|
122
130
|
countTextColor: string;
|
package/es/grid/src/Grid.js
CHANGED
|
@@ -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';
|
|
@@ -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";
|