naive-ui 2.23.0 → 2.23.1
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/es/_utils/composable/use-houdini.js +10 -7
- package/es/auto-complete/src/AutoComplete.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +4 -4
- package/es/avatar/src/Avatar.d.ts +5 -5
- package/es/avatar/src/Avatar.js +5 -5
- package/es/avatar/src/styles/index.cssr.js +13 -13
- package/es/back-top/src/BackTop.d.ts +13 -13
- package/es/back-top/src/BackTop.js +13 -13
- package/es/back-top/src/styles/index.cssr.js +29 -29
- package/es/data-table/src/TableParts/Cell.js +2 -3
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/date-picker/src/panel/date.d.ts +4 -9
- package/es/date-picker/src/panel/daterange.d.ts +4 -9
- package/es/date-picker/src/panel/datetime.d.ts +4 -9
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -9
- package/es/date-picker/src/panel/month.d.ts +4 -9
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -5
- package/es/date-picker/src/panel/use-calendar.js +6 -5
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -5
- package/es/date-picker/src/panel/use-dual-calendar.js +12 -13
- package/es/date-picker/src/panel/use-panel-common.d.ts +2 -5
- package/es/date-picker/src/panel/use-panel-common.js +2 -6
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/Dialog.js +21 -21
- package/es/dialog/src/styles/index.cssr.js +45 -45
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/es/form/src/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +27 -27
- package/es/form/src/FormItemCol.d.ts +27 -27
- package/es/form/src/FormItemGridItem.d.ts +27 -27
- package/es/form/src/FormItemRow.d.ts +27 -27
- package/es/form/styles/_common.d.ts +0 -3
- package/es/form/styles/_common.js +0 -3
- package/es/form/styles/light.d.ts +3 -3
- package/es/form/styles/light.js +2 -2
- package/es/log/src/Log.d.ts +6 -6
- package/es/log/src/Log.js +6 -6
- package/es/log/src/styles/index.cssr.js +16 -18
- package/es/steps/src/Step.d.ts +12 -12
- package/es/steps/src/Step.js +12 -12
- package/es/steps/src/styles/index.cssr.js +46 -46
- package/es/switch/src/Switch.d.ts +19 -19
- package/es/switch/src/Switch.js +19 -19
- package/es/switch/src/styles/index.cssr.js +57 -57
- package/es/tag/src/Tag.d.ts +26 -26
- package/es/tag/src/Tag.js +26 -26
- package/es/tag/src/styles/index.cssr.js +54 -54
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +17 -17
- package/es/time-picker/src/TimePicker.js +17 -17
- package/es/time-picker/src/styles/index.cssr.js +47 -47
- package/es/timeline/src/TimelineItem.d.ts +12 -12
- package/es/timeline/src/TimelineItem.js +12 -12
- package/es/timeline/src/styles/index.cssr.js +44 -44
- package/es/transfer/src/styles/index.cssr.js +9 -4
- package/es/tree/src/Tree.d.ts +11 -11
- package/es/tree/src/Tree.js +11 -11
- package/es/tree/src/dnd.js +2 -2
- package/es/tree/src/styles/index.cssr.js +33 -33
- package/es/tree-select/src/TreeSelect.d.ts +8 -8
- package/es/tree-select/src/TreeSelect.js +8 -8
- package/es/tree-select/src/styles/index.cssr.js +18 -18
- package/es/upload/src/Upload.js +16 -16
- package/es/upload/src/styles/index.cssr.js +36 -36
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_utils/composable/use-houdini.js +10 -7
- package/lib/auto-complete/src/AutoComplete.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/auto-complete/src/styles/index.cssr.js +4 -4
- package/lib/avatar/src/Avatar.d.ts +5 -5
- package/lib/avatar/src/Avatar.js +5 -5
- package/lib/avatar/src/styles/index.cssr.js +13 -13
- package/lib/back-top/src/BackTop.d.ts +13 -13
- package/lib/back-top/src/BackTop.js +13 -13
- package/lib/back-top/src/styles/index.cssr.js +29 -29
- package/lib/data-table/src/TableParts/Cell.js +2 -3
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +4 -9
- package/lib/date-picker/src/panel/daterange.d.ts +4 -9
- package/lib/date-picker/src/panel/datetime.d.ts +4 -9
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -9
- package/lib/date-picker/src/panel/month.d.ts +4 -9
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -5
- package/lib/date-picker/src/panel/use-calendar.js +6 -5
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -5
- package/lib/date-picker/src/panel/use-dual-calendar.js +12 -13
- package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -5
- package/lib/date-picker/src/panel/use-panel-common.js +2 -6
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/Dialog.js +21 -21
- package/lib/dialog/src/styles/index.cssr.js +45 -45
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/lib/form/src/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +27 -27
- package/lib/form/src/FormItemCol.d.ts +27 -27
- package/lib/form/src/FormItemGridItem.d.ts +27 -27
- package/lib/form/src/FormItemRow.d.ts +27 -27
- package/lib/form/styles/_common.d.ts +0 -3
- package/lib/form/styles/_common.js +0 -3
- package/lib/form/styles/light.d.ts +3 -3
- package/lib/form/styles/light.js +2 -2
- package/lib/log/src/Log.d.ts +6 -6
- package/lib/log/src/Log.js +6 -6
- package/lib/log/src/styles/index.cssr.js +16 -18
- package/lib/steps/src/Step.d.ts +12 -12
- package/lib/steps/src/Step.js +12 -12
- package/lib/steps/src/styles/index.cssr.js +46 -46
- package/lib/switch/src/Switch.d.ts +19 -19
- package/lib/switch/src/Switch.js +19 -19
- package/lib/switch/src/styles/index.cssr.js +57 -57
- package/lib/tag/src/Tag.d.ts +26 -26
- package/lib/tag/src/Tag.js +26 -26
- package/lib/tag/src/styles/index.cssr.js +54 -54
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +17 -17
- package/lib/time-picker/src/TimePicker.js +17 -17
- package/lib/time-picker/src/styles/index.cssr.js +47 -47
- package/lib/timeline/src/TimelineItem.d.ts +12 -12
- package/lib/timeline/src/TimelineItem.js +12 -12
- package/lib/timeline/src/styles/index.cssr.js +44 -44
- package/lib/transfer/src/styles/index.cssr.js +9 -4
- package/lib/tree/src/Tree.d.ts +11 -11
- package/lib/tree/src/Tree.js +11 -11
- package/lib/tree/src/dnd.js +2 -2
- package/lib/tree/src/styles/index.cssr.js +33 -33
- package/lib/tree-select/src/TreeSelect.d.ts +8 -8
- package/lib/tree-select/src/TreeSelect.js +8 -8
- package/lib/tree-select/src/styles/index.cssr.js +18 -18
- package/lib/upload/src/Upload.js +16 -16
- package/lib/upload/src/styles/index.cssr.js +36 -36
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +26 -26
- package/web-types.json +1 -1
|
@@ -4,13 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -1148,21 +1145,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1148
1145
|
} & {
|
|
1149
1146
|
value: import("../interface").Value | null;
|
|
1150
1147
|
active: boolean;
|
|
1151
|
-
dateFormat: string;
|
|
1152
1148
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1153
1149
|
actions: unknown[];
|
|
1154
|
-
timeFormat: string;
|
|
1155
1150
|
} & {
|
|
1151
|
+
dateFormat?: string | undefined;
|
|
1156
1152
|
onTabOut?: Function | undefined;
|
|
1157
1153
|
onClose?: import("../interface").OnClose | undefined;
|
|
1158
1154
|
onConfirm?: Function | undefined;
|
|
1159
1155
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1156
|
+
timeFormat?: string | undefined;
|
|
1160
1157
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1161
1158
|
}>, {
|
|
1162
1159
|
value: import("../interface").Value | null;
|
|
1163
1160
|
active: boolean;
|
|
1164
|
-
dateFormat: string;
|
|
1165
1161
|
actions: unknown[];
|
|
1166
|
-
timeFormat: string;
|
|
1167
1162
|
}>;
|
|
1168
1163
|
export default _default;
|
|
@@ -10,13 +10,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
10
|
readonly default: () => string[];
|
|
11
11
|
};
|
|
12
12
|
active: BooleanConstructor;
|
|
13
|
-
dateFormat:
|
|
14
|
-
readonly type: StringConstructor;
|
|
15
|
-
readonly default: "yyyy-MM-dd";
|
|
16
|
-
};
|
|
13
|
+
dateFormat: StringConstructor;
|
|
17
14
|
timeFormat: {
|
|
18
15
|
readonly type: StringConstructor;
|
|
19
|
-
readonly
|
|
16
|
+
readonly value: "HH:mm:ss";
|
|
20
17
|
};
|
|
21
18
|
value: {
|
|
22
19
|
readonly type: PropType<import("../interface").Value | null>;
|
|
@@ -1158,22 +1155,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1158
1155
|
type: "month" | "year" | "quarter";
|
|
1159
1156
|
value: import("../interface").Value | null;
|
|
1160
1157
|
active: boolean;
|
|
1161
|
-
dateFormat: string;
|
|
1162
1158
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1163
1159
|
actions: string[];
|
|
1164
|
-
timeFormat: string;
|
|
1165
1160
|
} & {
|
|
1161
|
+
dateFormat?: string | undefined;
|
|
1166
1162
|
onTabOut?: Function | undefined;
|
|
1167
1163
|
onClose?: import("../interface").OnClose | undefined;
|
|
1168
1164
|
onConfirm?: Function | undefined;
|
|
1169
1165
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1166
|
+
timeFormat?: string | undefined;
|
|
1170
1167
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1171
1168
|
}>, {
|
|
1172
1169
|
value: import("../interface").Value | null;
|
|
1173
1170
|
active: boolean;
|
|
1174
|
-
dateFormat: string;
|
|
1175
1171
|
actions: string[];
|
|
1176
|
-
timeFormat: string;
|
|
1177
1172
|
}>;
|
|
1178
1173
|
/**
|
|
1179
1174
|
* Month Panel
|
|
@@ -7,13 +7,10 @@ declare const useCalendarProps: {
|
|
|
7
7
|
readonly default: () => string[];
|
|
8
8
|
};
|
|
9
9
|
readonly active: BooleanConstructor;
|
|
10
|
-
readonly dateFormat:
|
|
11
|
-
readonly type: StringConstructor;
|
|
12
|
-
readonly default: "yyyy-MM-dd";
|
|
13
|
-
};
|
|
10
|
+
readonly dateFormat: StringConstructor;
|
|
14
11
|
readonly timeFormat: {
|
|
15
12
|
readonly type: StringConstructor;
|
|
16
|
-
readonly
|
|
13
|
+
readonly value: "HH:mm:ss";
|
|
17
14
|
};
|
|
18
15
|
readonly value: {
|
|
19
16
|
readonly type: PropType<import("../interface").Value | null>;
|
|
@@ -27,9 +27,10 @@ function useCalendar(props, type) {
|
|
|
27
27
|
isMinuteDisabled: isMinuteDisabledRef,
|
|
28
28
|
isSecondDisabled: isSecondDisabledRef
|
|
29
29
|
};
|
|
30
|
+
const mergedDateFormatRef = (0, vue_1.computed)(() => props.dateFormat || localeRef.value.dateFormat);
|
|
30
31
|
const dateInputValueRef = (0, vue_1.ref)(props.value === null || Array.isArray(props.value)
|
|
31
32
|
? ''
|
|
32
|
-
: (0, date_fns_1.format)(props.value,
|
|
33
|
+
: (0, date_fns_1.format)(props.value, mergedDateFormatRef.value));
|
|
33
34
|
const calendarValueRef = (0, vue_1.ref)(props.value === null || Array.isArray(props.value)
|
|
34
35
|
? Date.now()
|
|
35
36
|
: props.value);
|
|
@@ -69,7 +70,7 @@ function useCalendar(props, type) {
|
|
|
69
70
|
});
|
|
70
71
|
(0, vue_1.watch)((0, vue_1.computed)(() => props.value), (value) => {
|
|
71
72
|
if (value !== null && !Array.isArray(value)) {
|
|
72
|
-
dateInputValueRef.value = (0, date_fns_1.format)(value,
|
|
73
|
+
dateInputValueRef.value = (0, date_fns_1.format)(value, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
73
74
|
calendarValueRef.value = value;
|
|
74
75
|
}
|
|
75
76
|
else {
|
|
@@ -94,7 +95,7 @@ function useCalendar(props, type) {
|
|
|
94
95
|
return isDateDisabled(ts);
|
|
95
96
|
}
|
|
96
97
|
function handleDateInput(value) {
|
|
97
|
-
const date = (0, utils_1.strictParse)(value,
|
|
98
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
98
99
|
if ((0, date_fns_1.isValid)(date)) {
|
|
99
100
|
if (props.value === null) {
|
|
100
101
|
panelCommon.doUpdateValue((0, date_fns_1.getTime)(sanitizeValue(Date.now())), false);
|
|
@@ -113,7 +114,7 @@ function useCalendar(props, type) {
|
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
function handleDateInputBlur() {
|
|
116
|
-
const date = (0, utils_1.strictParse)(dateInputValueRef.value,
|
|
117
|
+
const date = (0, utils_1.strictParse)(dateInputValueRef.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
117
118
|
if ((0, date_fns_1.isValid)(date)) {
|
|
118
119
|
if (props.value === null) {
|
|
119
120
|
panelCommon.doUpdateValue((0, date_fns_1.getTime)(sanitizeValue(Date.now())), false);
|
|
@@ -188,7 +189,7 @@ function useCalendar(props, type) {
|
|
|
188
189
|
if (time === undefined) {
|
|
189
190
|
time = props.value;
|
|
190
191
|
}
|
|
191
|
-
dateInputValueRef.value = (0, date_fns_1.format)(time,
|
|
192
|
+
dateInputValueRef.value = (0, date_fns_1.format)(time, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
192
193
|
}
|
|
193
194
|
function handleConfirmClick() {
|
|
194
195
|
if (validation.isDateInvalid.value || validation.isTimeInvalid.value) {
|
|
@@ -7,13 +7,10 @@ declare const useDualCalendarProps: {
|
|
|
7
7
|
readonly default: () => string[];
|
|
8
8
|
};
|
|
9
9
|
readonly active: BooleanConstructor;
|
|
10
|
-
readonly dateFormat:
|
|
11
|
-
readonly type: StringConstructor;
|
|
12
|
-
readonly default: "yyyy-MM-dd";
|
|
13
|
-
};
|
|
10
|
+
readonly dateFormat: StringConstructor;
|
|
14
11
|
readonly timeFormat: {
|
|
15
12
|
readonly type: StringConstructor;
|
|
16
|
-
readonly
|
|
13
|
+
readonly value: "HH:mm:ss";
|
|
17
14
|
};
|
|
18
15
|
readonly value: {
|
|
19
16
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -40,12 +40,13 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
40
40
|
const nowRef = (0, vue_1.ref)(Date.now());
|
|
41
41
|
const isSelectingRef = (0, vue_1.ref)(false);
|
|
42
42
|
const memorizedStartDateTimeRef = (0, vue_1.ref)(0);
|
|
43
|
-
const
|
|
43
|
+
const mergedDateFormatRef = (0, vue_1.computed)(() => props.dateFormat || localeRef.value.dateFormat);
|
|
44
|
+
const { value } = props;
|
|
44
45
|
const startDateInput = (0, vue_1.ref)(Array.isArray(value)
|
|
45
|
-
? (0, date_fns_1.format)(value[0],
|
|
46
|
+
? (0, date_fns_1.format)(value[0], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value)
|
|
46
47
|
: '');
|
|
47
48
|
const endDateInputRef = (0, vue_1.ref)(Array.isArray(value)
|
|
48
|
-
? (0, date_fns_1.format)(value[1],
|
|
49
|
+
? (0, date_fns_1.format)(value[1], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value)
|
|
49
50
|
: '');
|
|
50
51
|
if (Array.isArray(value)) {
|
|
51
52
|
syncCalendarTimeWithValue(value);
|
|
@@ -102,9 +103,8 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
102
103
|
(0, vue_1.watch)((0, vue_1.computed)(() => props.value), (value) => {
|
|
103
104
|
if (value !== null && Array.isArray(value)) {
|
|
104
105
|
const [startMoment, endMoment] = value;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
endDateInputRef.value = (0, date_fns_1.format)(endMoment, dateFormat, panelCommon.dateFnsOptions.value);
|
|
106
|
+
startDateInput.value = (0, date_fns_1.format)(startMoment, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
107
|
+
endDateInputRef.value = (0, date_fns_1.format)(endMoment, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
108
108
|
if (!isSelectingRef.value) {
|
|
109
109
|
syncCalendarTimeWithValue(value);
|
|
110
110
|
}
|
|
@@ -322,7 +322,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
function handleStartDateInput(value) {
|
|
325
|
-
const date = (0, utils_1.strictParse)(value,
|
|
325
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
326
326
|
if ((0, date_fns_1.isValid)(date)) {
|
|
327
327
|
if (!props.value) {
|
|
328
328
|
const newValue = (0, date_fns_1.set)(new Date(), {
|
|
@@ -347,7 +347,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
347
347
|
}
|
|
348
348
|
function handleEndDateInput(value) {
|
|
349
349
|
/** strict check when input */
|
|
350
|
-
const date = (0, utils_1.strictParse)(value,
|
|
350
|
+
const date = (0, utils_1.strictParse)(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
351
351
|
if ((0, date_fns_1.isValid)(date)) {
|
|
352
352
|
if (props.value === null) {
|
|
353
353
|
const newValue = (0, date_fns_1.set)(new Date(), {
|
|
@@ -371,7 +371,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
function handleStartDateInputBlur() {
|
|
374
|
-
const date = (0, utils_1.strictParse)(startDateInput.value,
|
|
374
|
+
const date = (0, utils_1.strictParse)(startDateInput.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
375
375
|
const { value } = props;
|
|
376
376
|
if ((0, date_fns_1.isValid)(date)) {
|
|
377
377
|
if (value === null) {
|
|
@@ -396,7 +396,7 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
function handleEndDateInputBlur() {
|
|
399
|
-
const date = (0, utils_1.strictParse)(endDateInputRef.value,
|
|
399
|
+
const date = (0, utils_1.strictParse)(endDateInputRef.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
400
400
|
const { value } = props;
|
|
401
401
|
if ((0, date_fns_1.isValid)(date)) {
|
|
402
402
|
if (value === null) {
|
|
@@ -429,12 +429,11 @@ function useDualCalendar(props, type = 'datetime') {
|
|
|
429
429
|
endDateInputRef.value = '';
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
|
-
const { dateFormat } = props;
|
|
433
432
|
if (times === undefined) {
|
|
434
433
|
times = value;
|
|
435
434
|
}
|
|
436
|
-
startDateInput.value = (0, date_fns_1.format)(times[0],
|
|
437
|
-
endDateInputRef.value = (0, date_fns_1.format)(times[1],
|
|
435
|
+
startDateInput.value = (0, date_fns_1.format)(times[0], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
436
|
+
endDateInputRef.value = (0, date_fns_1.format)(times[1], mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
438
437
|
}
|
|
439
438
|
function handleStartTimePickerChange(value) {
|
|
440
439
|
if (value === null)
|
|
@@ -2,13 +2,10 @@ import { PropType, ExtractPropTypes } from 'vue';
|
|
|
2
2
|
import { Value, OnPanelUpdateValue, OnClose, Shortcuts, DefaultTime } from '../interface';
|
|
3
3
|
declare const usePanelCommonProps: {
|
|
4
4
|
readonly active: BooleanConstructor;
|
|
5
|
-
readonly dateFormat:
|
|
6
|
-
readonly type: StringConstructor;
|
|
7
|
-
readonly default: "yyyy-MM-dd";
|
|
8
|
-
};
|
|
5
|
+
readonly dateFormat: StringConstructor;
|
|
9
6
|
readonly timeFormat: {
|
|
10
7
|
readonly type: StringConstructor;
|
|
11
|
-
readonly
|
|
8
|
+
readonly value: "HH:mm:ss";
|
|
12
9
|
};
|
|
13
10
|
readonly value: {
|
|
14
11
|
readonly type: PropType<Value | null>;
|
|
@@ -4,17 +4,13 @@ exports.usePanelCommonProps = exports.usePanelCommon = void 0;
|
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const vooks_1 = require("vooks");
|
|
6
6
|
const interface_1 = require("../interface");
|
|
7
|
-
const DATE_FORMAT = 'yyyy-MM-dd';
|
|
8
7
|
const TIME_FORMAT = 'HH:mm:ss';
|
|
9
8
|
const usePanelCommonProps = {
|
|
10
9
|
active: Boolean,
|
|
11
|
-
dateFormat:
|
|
12
|
-
type: String,
|
|
13
|
-
default: DATE_FORMAT
|
|
14
|
-
},
|
|
10
|
+
dateFormat: String,
|
|
15
11
|
timeFormat: {
|
|
16
12
|
type: String,
|
|
17
|
-
|
|
13
|
+
value: TIME_FORMAT
|
|
18
14
|
},
|
|
19
15
|
value: {
|
|
20
16
|
type: [Array, Number],
|
|
@@ -1107,27 +1107,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1107
1107
|
handleNegativeClick: (e: MouseEvent) => void;
|
|
1108
1108
|
handleCloseClick: () => void;
|
|
1109
1109
|
cssVars: import("vue").ComputedRef<{
|
|
1110
|
-
'--font-size': string;
|
|
1111
|
-
'--icon-color': string;
|
|
1112
|
-
'--bezier': string;
|
|
1113
|
-
'--close-margin': string;
|
|
1114
|
-
'--icon-margin': string;
|
|
1115
|
-
'--icon-size': string;
|
|
1116
|
-
'--close-size': string;
|
|
1117
|
-
'--close-color': string;
|
|
1118
|
-
'--close-color-hover': string;
|
|
1119
|
-
'--close-color-pressed': string;
|
|
1120
|
-
'--color': string;
|
|
1121
|
-
'--text-color': string;
|
|
1122
|
-
'--border-radius': string;
|
|
1123
|
-
'--padding': string;
|
|
1124
|
-
'--line-height': string;
|
|
1125
|
-
'--border': string;
|
|
1126
|
-
'--content-margin': string;
|
|
1127
|
-
'--title-font-size': string;
|
|
1128
|
-
'--title-font-weight': string;
|
|
1129
|
-
'--title-text-color': string;
|
|
1130
|
-
'--action-space': string;
|
|
1110
|
+
'--n-font-size': string;
|
|
1111
|
+
'--n-icon-color': string;
|
|
1112
|
+
'--n-bezier': string;
|
|
1113
|
+
'--n-close-margin': string;
|
|
1114
|
+
'--n-icon-margin': string;
|
|
1115
|
+
'--n-icon-size': string;
|
|
1116
|
+
'--n-close-size': string;
|
|
1117
|
+
'--n-close-color': string;
|
|
1118
|
+
'--n-close-color-hover': string;
|
|
1119
|
+
'--n-close-color-pressed': string;
|
|
1120
|
+
'--n-color': string;
|
|
1121
|
+
'--n-text-color': string;
|
|
1122
|
+
'--n-border-radius': string;
|
|
1123
|
+
'--n-padding': string;
|
|
1124
|
+
'--n-line-height': string;
|
|
1125
|
+
'--n-border': string;
|
|
1126
|
+
'--n-content-margin': string;
|
|
1127
|
+
'--n-title-font-size': string;
|
|
1128
|
+
'--n-title-font-weight': string;
|
|
1129
|
+
'--n-title-text-color': string;
|
|
1130
|
+
'--n-action-space': string;
|
|
1131
1131
|
}>;
|
|
1132
1132
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
1133
1133
|
icon?: unknown;
|
package/lib/dialog/src/Dialog.js
CHANGED
|
@@ -89,27 +89,27 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
89
89
|
const { type, iconPlacement } = props;
|
|
90
90
|
const { common: { cubicBezierEaseInOut }, self: { fontSize, lineHeight, border, titleTextColor, textColor, color, closeColor, closeColorHover, closeColorPressed, borderRadius, titleFontWeight, titleFontSize, padding, iconSize, actionSpace, contentMargin, closeSize, [iconPlacement === 'top' ? 'iconMarginIconTop' : 'iconMargin']: iconMargin, [iconPlacement === 'top' ? 'closeMarginIconTop' : 'closeMargin']: closeMargin, [(0, _utils_1.createKey)('iconColor', type)]: iconColor } } = themeRef.value;
|
|
91
91
|
return {
|
|
92
|
-
'--font-size': fontSize,
|
|
93
|
-
'--icon-color': iconColor,
|
|
94
|
-
'--bezier': cubicBezierEaseInOut,
|
|
95
|
-
'--close-margin': closeMargin,
|
|
96
|
-
'--icon-margin': iconMargin,
|
|
97
|
-
'--icon-size': iconSize,
|
|
98
|
-
'--close-size': closeSize,
|
|
99
|
-
'--close-color': closeColor,
|
|
100
|
-
'--close-color-hover': closeColorHover,
|
|
101
|
-
'--close-color-pressed': closeColorPressed,
|
|
102
|
-
'--color': color,
|
|
103
|
-
'--text-color': textColor,
|
|
104
|
-
'--border-radius': borderRadius,
|
|
105
|
-
'--padding': padding,
|
|
106
|
-
'--line-height': lineHeight,
|
|
107
|
-
'--border': border,
|
|
108
|
-
'--content-margin': contentMargin,
|
|
109
|
-
'--title-font-size': titleFontSize,
|
|
110
|
-
'--title-font-weight': titleFontWeight,
|
|
111
|
-
'--title-text-color': titleTextColor,
|
|
112
|
-
'--action-space': actionSpace
|
|
92
|
+
'--n-font-size': fontSize,
|
|
93
|
+
'--n-icon-color': iconColor,
|
|
94
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
95
|
+
'--n-close-margin': closeMargin,
|
|
96
|
+
'--n-icon-margin': iconMargin,
|
|
97
|
+
'--n-icon-size': iconSize,
|
|
98
|
+
'--n-close-size': closeSize,
|
|
99
|
+
'--n-close-color': closeColor,
|
|
100
|
+
'--n-close-color-hover': closeColorHover,
|
|
101
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
102
|
+
'--n-color': color,
|
|
103
|
+
'--n-text-color': textColor,
|
|
104
|
+
'--n-border-radius': borderRadius,
|
|
105
|
+
'--n-padding': padding,
|
|
106
|
+
'--n-line-height': lineHeight,
|
|
107
|
+
'--n-border': border,
|
|
108
|
+
'--n-content-margin': contentMargin,
|
|
109
|
+
'--n-title-font-size': titleFontSize,
|
|
110
|
+
'--n-title-font-weight': titleFontWeight,
|
|
111
|
+
'--n-title-text-color': titleTextColor,
|
|
112
|
+
'--n-action-space': actionSpace
|
|
113
113
|
};
|
|
114
114
|
})
|
|
115
115
|
};
|
|
@@ -5,49 +5,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
8
|
-
// --icon-color
|
|
9
|
-
// --bezier
|
|
10
|
-
// --close-margin
|
|
11
|
-
// --icon-margin
|
|
12
|
-
// --icon-size
|
|
13
|
-
// --close-size
|
|
14
|
-
// --close-color
|
|
15
|
-
// --close-color-hover
|
|
16
|
-
// --close-color-pressed
|
|
17
|
-
// --color
|
|
18
|
-
// --text-color
|
|
19
|
-
// --border-radius
|
|
20
|
-
// --padding
|
|
21
|
-
// --line-height
|
|
22
|
-
// --border
|
|
23
|
-
// --content-margin
|
|
24
|
-
// --title-font-size
|
|
25
|
-
// --title-font-weight
|
|
26
|
-
// --title-text-color
|
|
27
|
-
// --action-space
|
|
8
|
+
// --n-icon-color
|
|
9
|
+
// --n-bezier
|
|
10
|
+
// --n-close-margin
|
|
11
|
+
// --n-icon-margin
|
|
12
|
+
// --n-icon-size
|
|
13
|
+
// --n-close-size
|
|
14
|
+
// --n-close-color
|
|
15
|
+
// --n-close-color-hover
|
|
16
|
+
// --n-close-color-pressed
|
|
17
|
+
// --n-color
|
|
18
|
+
// --n-text-color
|
|
19
|
+
// --n-border-radius
|
|
20
|
+
// --n-padding
|
|
21
|
+
// --n-line-height
|
|
22
|
+
// --n-border
|
|
23
|
+
// --n-content-margin
|
|
24
|
+
// --n-title-font-size
|
|
25
|
+
// --n-title-font-weight
|
|
26
|
+
// --n-title-text-color
|
|
27
|
+
// --n-action-space
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('dialog', `
|
|
31
|
-
line-height: var(--line-height);
|
|
31
|
+
line-height: var(--n-line-height);
|
|
32
32
|
position: relative;
|
|
33
|
-
background: var(--color);
|
|
34
|
-
color: var(--text-color);
|
|
33
|
+
background: var(--n-color);
|
|
34
|
+
color: var(--n-text-color);
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
margin: auto;
|
|
37
|
-
border-radius: var(--border-radius);
|
|
38
|
-
padding: var(--padding);
|
|
37
|
+
border-radius: var(--n-border-radius);
|
|
38
|
+
padding: var(--n-padding);
|
|
39
39
|
transition:
|
|
40
|
-
border-color .3s var(--bezier),
|
|
41
|
-
background-color .3s var(--bezier),
|
|
42
|
-
color .3s var(--bezier);
|
|
40
|
+
border-color .3s var(--n-bezier),
|
|
41
|
+
background-color .3s var(--n-bezier),
|
|
42
|
+
color .3s var(--n-bezier);
|
|
43
43
|
`, [(0, cssr_1.cE)('icon', {
|
|
44
|
-
color: 'var(--icon-color)'
|
|
44
|
+
color: 'var(--n-icon-color)'
|
|
45
45
|
}), (0, cssr_1.cM)('bordered', {
|
|
46
|
-
border: 'var(--border)'
|
|
46
|
+
border: 'var(--n-border)'
|
|
47
47
|
}), (0, cssr_1.cM)('icon-top', [(0, cssr_1.cE)('close', {
|
|
48
|
-
margin: 'var(--close-margin)'
|
|
48
|
+
margin: 'var(--n-close-margin)'
|
|
49
49
|
}), (0, cssr_1.cE)('icon', {
|
|
50
|
-
margin: 'var(--icon-margin)'
|
|
50
|
+
margin: 'var(--n-icon-margin)'
|
|
51
51
|
}), (0, cssr_1.cE)('content', {
|
|
52
52
|
textAlign: 'center'
|
|
53
53
|
}), (0, cssr_1.cE)('title', {
|
|
@@ -55,35 +55,35 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('dialog', `
|
|
|
55
55
|
}), (0, cssr_1.cE)('action', {
|
|
56
56
|
justifyContent: 'center'
|
|
57
57
|
})]), (0, cssr_1.cM)('icon-left', [(0, cssr_1.cE)('icon', {
|
|
58
|
-
margin: 'var(--icon-margin)'
|
|
58
|
+
margin: 'var(--n-icon-margin)'
|
|
59
59
|
})]), (0, cssr_1.cE)('close', `
|
|
60
|
-
font-size: var(--close-size);
|
|
60
|
+
font-size: var(--n-close-size);
|
|
61
61
|
position: absolute;
|
|
62
62
|
right: 0;
|
|
63
63
|
top: 0;
|
|
64
|
-
margin: var(--close-margin);
|
|
65
|
-
transition: .3s color var(--bezier);
|
|
64
|
+
margin: var(--n-close-margin);
|
|
65
|
+
transition: .3s color var(--n-bezier);
|
|
66
66
|
z-index: 1;
|
|
67
67
|
`), (0, cssr_1.cE)('content', `
|
|
68
|
-
font-size: var(--font-size);
|
|
69
|
-
margin: var(--content-margin);
|
|
68
|
+
font-size: var(--n-font-size);
|
|
69
|
+
margin: var(--n-content-margin);
|
|
70
70
|
position: relative;
|
|
71
71
|
word-break: break-word;
|
|
72
72
|
`, [(0, cssr_1.c)('&:last-child', 'margin-bottom: 0;')]), (0, cssr_1.cE)('action', `
|
|
73
73
|
display: flex;
|
|
74
74
|
justify-content: flex-end;
|
|
75
75
|
`, [(0, cssr_1.c)('> *:not(:last-child)', {
|
|
76
|
-
marginRight: 'var(--action-space)'
|
|
76
|
+
marginRight: 'var(--n-action-space)'
|
|
77
77
|
})]), (0, cssr_1.cE)('icon', {
|
|
78
|
-
fontSize: 'var(--icon-size)',
|
|
79
|
-
transition: 'color .3s var(--bezier)'
|
|
78
|
+
fontSize: 'var(--n-icon-size)',
|
|
79
|
+
transition: 'color .3s var(--n-bezier)'
|
|
80
80
|
}), (0, cssr_1.cE)('title', `
|
|
81
|
-
transition: color .3s var(--bezier);
|
|
81
|
+
transition: color .3s var(--n-bezier);
|
|
82
82
|
display: flex;
|
|
83
83
|
align-items: center;
|
|
84
|
-
font-size: var(--title-font-size);
|
|
85
|
-
font-weight: var(--title-font-weight);
|
|
86
|
-
color: var(--title-text-color);
|
|
84
|
+
font-size: var(--n-title-font-size);
|
|
85
|
+
font-weight: var(--n-title-font-weight);
|
|
86
|
+
color: var(--n-title-text-color);
|
|
87
87
|
`), (0, cssr_1.cB)('dialog-icon-container', {
|
|
88
88
|
display: 'flex',
|
|
89
89
|
justifyContent: 'center'
|
|
@@ -2571,7 +2571,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2571
2571
|
};
|
|
2572
2572
|
}>;
|
|
2573
2573
|
cssVars: import("vue").ComputedRef<{
|
|
2574
|
-
'--input-width': string;
|
|
2574
|
+
'--n-input-width': string;
|
|
2575
2575
|
}>;
|
|
2576
2576
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
2577
2577
|
closable?: unknown;
|