@uzum-tech/ui 2.0.0-beta.1 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +136 -75
- package/dist/index.mjs +137 -76
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/calendar/src/Calendar.d.ts +3 -0
- package/es/calendar/src/Calendar.mjs +4 -3
- package/es/checkbox/src/Checkbox.mjs +4 -4
- package/es/collapse/src/CollapseItem.mjs +5 -5
- package/es/config-provider/src/ConfigProvider.d.ts +3 -0
- package/es/config-provider/src/ConfigProvider.mjs +26 -12
- package/es/config-provider/src/internal-interface.d.ts +1 -0
- package/es/data-table/src/DataTable.mjs +3 -3
- package/es/date-picker/src/DatePicker.d.ts +3 -0
- package/es/date-picker/src/DatePicker.mjs +2 -0
- package/es/date-picker/src/panel/date.d.ts +2 -0
- package/es/date-picker/src/panel/daterange.d.ts +2 -0
- package/es/date-picker/src/panel/datetime.d.ts +2 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +2 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +4 -0
- package/es/date-picker/src/panel/panelMonthContent.d.ts +2 -0
- package/es/date-picker/src/panel/panelYear.d.ts +4 -0
- package/es/date-picker/src/panel/panelYearContent.d.ts +2 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-calendar.mjs +10 -5
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-dual-calendar.mjs +17 -13
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/es/date-picker/src/panel/use-panel-common.mjs +1 -0
- package/es/date-picker/src/utils.d.ts +4 -4
- package/es/date-picker/src/utils.mjs +4 -4
- package/es/date-picker-v2/src/panel/CalendarPanel.d.ts +0 -1
- package/es/date-picker-v2/src/panel/CalendarPanel.mjs +7 -5
- package/es/date-picker-v2/src/panel/CalendarRangePanel.d.ts +0 -1
- package/es/date-picker-v2/src/panel/CalendarRangePanel.mjs +7 -5
- package/es/date-picker-v2/src/utils.d.ts +1 -1
- package/es/date-picker-v2/src/utils.mjs +1 -1
- package/es/dialog/src/DialogProvider.mjs +4 -3
- package/es/dynamic-input/src/DynamicInput.mjs +9 -7
- package/es/form/src/FormItem.mjs +6 -4
- package/es/grid/src/Grid.mjs +7 -1
- package/es/header/src/HeaderNavigation.d.ts +3 -3292
- package/es/header/src/HeaderNavigation.mjs +3 -2
- package/es/heatmap/src/Heatmap.mjs +4 -3
- package/es/image/src/Image.mjs +3 -4
- package/es/image/src/ImageGroup.d.ts +1 -1
- package/es/image/src/ImageGroup.mjs +5 -6
- package/es/menu/src/Menu.mjs +2 -3
- package/es/message/src/MessageProvider.mjs +4 -3
- package/es/modal/src/ModalProvider.mjs +4 -3
- package/es/notification/src/NotificationProvider.mjs +4 -3
- package/es/time/src/Time.d.ts +3 -0
- package/es/time/src/Time.mjs +3 -1
- package/es/time-picker/src/Panel.mjs +9 -2
- package/es/upload/src/Upload.mjs +10 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/calendar/src/Calendar.d.ts +3 -0
- package/lib/calendar/src/Calendar.js +4 -4
- package/lib/checkbox/src/Checkbox.js +3 -3
- package/lib/collapse/src/CollapseItem.js +3 -3
- package/lib/config-provider/src/ConfigProvider.d.ts +3 -0
- package/lib/config-provider/src/ConfigProvider.js +33 -18
- package/lib/config-provider/src/internal-interface.d.ts +1 -0
- package/lib/data-table/src/DataTable.js +2 -2
- package/lib/date-picker/src/DatePicker.d.ts +3 -0
- package/lib/date-picker/src/DatePicker.js +2 -1
- package/lib/date-picker/src/panel/date.d.ts +2 -0
- package/lib/date-picker/src/panel/daterange.d.ts +2 -0
- package/lib/date-picker/src/panel/datetime.d.ts +2 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +2 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +4 -0
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +2 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +4 -0
- package/lib/date-picker/src/panel/panelYearContent.d.ts +2 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-calendar.js +9 -4
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-dual-calendar.js +17 -13
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/lib/date-picker/src/panel/use-panel-common.js +1 -0
- package/lib/date-picker/src/utils.d.ts +4 -4
- package/lib/date-picker/src/utils.js +4 -4
- package/lib/date-picker-v2/src/panel/CalendarPanel.d.ts +0 -1
- package/lib/date-picker-v2/src/panel/CalendarPanel.js +6 -4
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.d.ts +0 -1
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.js +6 -4
- package/lib/date-picker-v2/src/utils.d.ts +1 -1
- package/lib/date-picker-v2/src/utils.js +1 -1
- package/lib/dialog/src/DialogProvider.js +3 -2
- package/lib/dynamic-input/src/DynamicInput.js +8 -6
- package/lib/form/src/FormItem.js +5 -3
- package/lib/grid/src/Grid.js +8 -1
- package/lib/header/src/HeaderNavigation.d.ts +3 -3292
- package/lib/header/src/HeaderNavigation.js +2 -1
- package/lib/heatmap/src/Heatmap.js +4 -3
- package/lib/image/src/Image.js +2 -3
- package/lib/image/src/ImageGroup.d.ts +1 -1
- package/lib/image/src/ImageGroup.js +4 -5
- package/lib/menu/src/Menu.js +1 -2
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/src/ModalProvider.js +3 -2
- package/lib/notification/src/NotificationProvider.js +3 -2
- package/lib/time/src/Time.d.ts +3 -0
- package/lib/time/src/Time.js +3 -1
- package/lib/time-picker/src/Panel.js +8 -1
- package/lib/upload/src/Upload.js +9 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +30 -30
- package/web-types.json +32 -4
|
@@ -50,10 +50,10 @@ export type DateCommonItem = DateItem | MonthItem | YearItem | QuarterItem;
|
|
|
50
50
|
* Given time to display calendar, given the selected time, given current time,
|
|
51
51
|
* return the date array of display time's month.
|
|
52
52
|
*/
|
|
53
|
-
declare function dateArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number, startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6, strip?: boolean): DateItem[];
|
|
54
|
-
declare function monthArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): MonthItem[];
|
|
55
|
-
declare function quarterArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): QuarterItem[];
|
|
56
|
-
declare function yearArray(valueTs: number | null, currentTs: number, maxDate?: number): YearItem[];
|
|
53
|
+
declare function dateArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number | null, startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6, strip?: boolean): DateItem[];
|
|
54
|
+
declare function monthArray(yearAnchorTs: number, valueTs: number | null, currentTs: number | null): MonthItem[];
|
|
55
|
+
declare function quarterArray(yearAnchorTs: number, valueTs: number | null, currentTs: number | null): QuarterItem[];
|
|
56
|
+
declare function yearArray(valueTs: number | null, currentTs: number | null, maxDate?: number): YearItem[];
|
|
57
57
|
declare function strictParse(string: string, pattern: string, backup: Date, option: {
|
|
58
58
|
locale: UDateLocale['locale'];
|
|
59
59
|
}): Date;
|
|
@@ -51,7 +51,7 @@ function dateItem(time, monthTs, valueTs, currentTs) {
|
|
|
51
51
|
year: getYear(time)
|
|
52
52
|
},
|
|
53
53
|
inCurrentMonth: isSameMonth(time, monthTs),
|
|
54
|
-
isCurrentDate: matchDate(currentTs, time, 'date'),
|
|
54
|
+
isCurrentDate: currentTs !== null && matchDate(currentTs, time, 'date'),
|
|
55
55
|
inSpan,
|
|
56
56
|
startOfSpan,
|
|
57
57
|
endOfSpan,
|
|
@@ -66,7 +66,7 @@ function monthItem(monthTs, valueTs, currentTs) {
|
|
|
66
66
|
month: getMonth(monthTs),
|
|
67
67
|
year: getYear(monthTs)
|
|
68
68
|
},
|
|
69
|
-
isCurrent: isSameMonth(currentTs, monthTs),
|
|
69
|
+
isCurrent: currentTs !== null && isSameMonth(currentTs, monthTs),
|
|
70
70
|
selected: valueTs !== null && matchDate(valueTs, monthTs, 'month'),
|
|
71
71
|
ts: getTime(monthTs)
|
|
72
72
|
};
|
|
@@ -77,7 +77,7 @@ function yearItem(yearTs, valueTs, currentTs) {
|
|
|
77
77
|
dateObject: {
|
|
78
78
|
year: getYear(yearTs)
|
|
79
79
|
},
|
|
80
|
-
isCurrent: isSameYear(currentTs, yearTs),
|
|
80
|
+
isCurrent: currentTs !== null && isSameYear(currentTs, yearTs),
|
|
81
81
|
selected: valueTs !== null && matchDate(valueTs, yearTs, 'year'),
|
|
82
82
|
ts: getTime(yearTs)
|
|
83
83
|
};
|
|
@@ -89,7 +89,7 @@ function quarterItem(quarterTs, valueTs, currentTs) {
|
|
|
89
89
|
quarter: getQuarter(quarterTs),
|
|
90
90
|
year: getYear(quarterTs)
|
|
91
91
|
},
|
|
92
|
-
isCurrent: isSameQuarter(currentTs, quarterTs),
|
|
92
|
+
isCurrent: currentTs !== null && isSameQuarter(currentTs, quarterTs),
|
|
93
93
|
selected: valueTs !== null && matchDate(valueTs, quarterTs, 'quarter'),
|
|
94
94
|
ts: getTime(quarterTs)
|
|
95
95
|
};
|
|
@@ -1765,7 +1765,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1765
1765
|
readonly yPlacement: "left" | "right";
|
|
1766
1766
|
readonly xPlacement: "top" | "bottom";
|
|
1767
1767
|
}> | null>;
|
|
1768
|
-
now: number;
|
|
1769
1768
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1770
1769
|
value: PropType<Value>;
|
|
1771
1770
|
displayYear: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineComponent, h, inject } from 'vue';
|
|
1
|
+
import { computed, defineComponent, h, inject, onMounted, ref } from 'vue';
|
|
2
2
|
import { UBaseIcon, UScrollbar } from "../../../_internal/index.mjs";
|
|
3
3
|
import { ChevronDownIcon } from "../../../_internal/icons/index.mjs";
|
|
4
4
|
import { useCalendarScroll } from "../composables/useCalendarScroll.mjs";
|
|
@@ -59,7 +59,10 @@ export default defineComponent({
|
|
|
59
59
|
locale: loc
|
|
60
60
|
} : undefined;
|
|
61
61
|
});
|
|
62
|
-
const
|
|
62
|
+
const nowRef = ref(null);
|
|
63
|
+
onMounted(() => {
|
|
64
|
+
nowRef.value = Date.now();
|
|
65
|
+
});
|
|
63
66
|
// Используем composable для скролла
|
|
64
67
|
const {
|
|
65
68
|
monthScrollbarRef,
|
|
@@ -120,7 +123,7 @@ export default defineComponent({
|
|
|
120
123
|
year,
|
|
121
124
|
month,
|
|
122
125
|
label: getMonthLabel(month, dateFnsOptions.value),
|
|
123
|
-
dates: generateDatesForMonth(year, month, (_a = props.value) !== null && _a !== void 0 ? _a : null, null,
|
|
126
|
+
dates: generateDatesForMonth(year, month, (_a = props.value) !== null && _a !== void 0 ? _a : null, null, nowRef.value, props.isDateDisabled)
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
129
|
return months;
|
|
@@ -144,8 +147,7 @@ export default defineComponent({
|
|
|
144
147
|
weekdayNamesRef,
|
|
145
148
|
monthScrollbarRef,
|
|
146
149
|
yearScrollbarRef,
|
|
147
|
-
calendarScrollbarRef
|
|
148
|
-
now
|
|
150
|
+
calendarScrollbarRef
|
|
149
151
|
};
|
|
150
152
|
},
|
|
151
153
|
render() {
|
|
@@ -1776,7 +1776,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1776
1776
|
readonly yPlacement: "left" | "right";
|
|
1777
1777
|
readonly xPlacement: "top" | "bottom";
|
|
1778
1778
|
}> | null>;
|
|
1779
|
-
now: number;
|
|
1780
1779
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1781
1780
|
value: {
|
|
1782
1781
|
type: PropType<RangeValue>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineComponent, h, inject } from 'vue';
|
|
1
|
+
import { computed, defineComponent, h, inject, onMounted, ref } from 'vue';
|
|
2
2
|
import { UBaseIcon, UScrollbar } from "../../../_internal/index.mjs";
|
|
3
3
|
import { ChevronDownIcon } from "../../../_internal/icons/index.mjs";
|
|
4
4
|
import { useCalendarScroll } from "../composables/useCalendarScroll.mjs";
|
|
@@ -70,7 +70,10 @@ export default defineComponent({
|
|
|
70
70
|
locale: loc
|
|
71
71
|
} : undefined;
|
|
72
72
|
});
|
|
73
|
-
const
|
|
73
|
+
const nowRef = ref(null);
|
|
74
|
+
onMounted(() => {
|
|
75
|
+
nowRef.value = Date.now();
|
|
76
|
+
});
|
|
74
77
|
// Используем composable для скролла
|
|
75
78
|
const {
|
|
76
79
|
monthScrollbarRef,
|
|
@@ -132,7 +135,7 @@ export default defineComponent({
|
|
|
132
135
|
label: getMonthLabel(month, dateFnsOptions.value),
|
|
133
136
|
dates: generateDatesForMonth(year, month, null,
|
|
134
137
|
// single value не используется для range
|
|
135
|
-
props.value,
|
|
138
|
+
props.value, nowRef.value, props.isDateDisabled)
|
|
136
139
|
});
|
|
137
140
|
}
|
|
138
141
|
return months;
|
|
@@ -156,8 +159,7 @@ export default defineComponent({
|
|
|
156
159
|
weekdayNamesRef,
|
|
157
160
|
monthScrollbarRef,
|
|
158
161
|
yearScrollbarRef,
|
|
159
|
-
calendarScrollbarRef
|
|
160
|
-
now
|
|
162
|
+
calendarScrollbarRef
|
|
161
163
|
};
|
|
162
164
|
},
|
|
163
165
|
render() {
|
|
@@ -3,7 +3,7 @@ import type { DateItem, MonthItem, YearItem } from './interface';
|
|
|
3
3
|
export interface DateFnsOptions {
|
|
4
4
|
locale: Locale;
|
|
5
5
|
}
|
|
6
|
-
export declare function generateDatesForMonth(year: number, month: number, value: number | null, rangeValue: [number, number] | null, now: number, isDateDisabled?: (ts: number) => boolean): DateItem[];
|
|
6
|
+
export declare function generateDatesForMonth(year: number, month: number, value: number | null, rangeValue: [number, number] | null, now: number | null, isDateDisabled?: (ts: number) => boolean): DateItem[];
|
|
7
7
|
export declare function getMonthLabel(month: number, options?: DateFnsOptions): string;
|
|
8
8
|
export declare function getWeekdayNames(options?: DateFnsOptions, dayFormat?: string): string[];
|
|
9
9
|
export declare function generateMonthsForYear(year: number, options?: DateFnsOptions, monthFormat?: string): MonthItem[];
|
|
@@ -43,7 +43,7 @@ export function generateDatesForMonth(year, month, value, rangeValue, now, isDat
|
|
|
43
43
|
month: dayMonth,
|
|
44
44
|
date: dayDate,
|
|
45
45
|
ts,
|
|
46
|
-
isCurrentDate: isSameDay(day, now),
|
|
46
|
+
isCurrentDate: now !== null && isSameDay(day, now),
|
|
47
47
|
isCurrentMonth: isSameMonth(day, date),
|
|
48
48
|
selected,
|
|
49
49
|
inRange,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { createId } from 'seemly';
|
|
2
1
|
import { useClicked, useClickPosition } from 'vooks';
|
|
3
|
-
import { defineComponent, Fragment, h, provide, reactive, ref } from 'vue';
|
|
2
|
+
import { defineComponent, Fragment, h, provide, reactive, ref, useId } from 'vue';
|
|
4
3
|
import { omit } from "../../_utils/index.mjs";
|
|
5
4
|
import { dialogApiInjectionKey, dialogProviderInjectionKey, dialogReactiveListInjectionKey } from "./context.mjs";
|
|
6
5
|
import { UDialogEnvironment } from "./DialogEnvironment.mjs";
|
|
@@ -14,8 +13,10 @@ export const UDialogProvider = defineComponent({
|
|
|
14
13
|
setup() {
|
|
15
14
|
const dialogListRef = ref([]);
|
|
16
15
|
const dialogInstRefs = {};
|
|
16
|
+
const providerId = useId();
|
|
17
|
+
let dialogKeyIndex = 0;
|
|
17
18
|
function create(options = {}) {
|
|
18
|
-
const key =
|
|
19
|
+
const key = `${providerId}-${dialogKeyIndex++}`;
|
|
19
20
|
const dialogReactive = reactive(Object.assign(Object.assign({}, options), {
|
|
20
21
|
key,
|
|
21
22
|
destroy: () => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { createId } from 'seemly';
|
|
2
1
|
import { useMergedState } from 'vooks';
|
|
3
|
-
import { computed, defineComponent, h, inject, isProxy, provide, ref, toRaw, toRef, watchEffect } from 'vue';
|
|
2
|
+
import { computed, defineComponent, h, inject, isProxy, provide, ref, toRaw, toRef, useId, watchEffect } from 'vue';
|
|
4
3
|
import { UBaseIcon } from "../../_internal/index.mjs";
|
|
5
4
|
import { AddIcon, ArrowDownIcon, ArrowUpIcon, RemoveIcon } from "../../_internal/icons/index.mjs";
|
|
6
5
|
import { useConfig, useLocale, useTheme, useThemeClass } from "../../_mixins/index.mjs";
|
|
@@ -14,7 +13,6 @@ import UDynamicInputInputPreset from "./InputPreset.mjs";
|
|
|
14
13
|
import { dynamicInputInjectionKey } from "./interface.mjs";
|
|
15
14
|
import UDynamicInputPairPreset from "./PairPreset.mjs";
|
|
16
15
|
import style from "./styles/index.cssr.mjs";
|
|
17
|
-
const globalDataKeyMap = new WeakMap();
|
|
18
16
|
export const dynamicInputProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
19
17
|
max: Number,
|
|
20
18
|
min: {
|
|
@@ -84,6 +82,9 @@ export default defineComponent({
|
|
|
84
82
|
const uncontrolledValueRef = ref(props.defaultValue);
|
|
85
83
|
const controlledValueRef = toRef(props, 'value');
|
|
86
84
|
const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
|
|
85
|
+
const componentId = useId();
|
|
86
|
+
const localDataKeyMap = new WeakMap();
|
|
87
|
+
let localDataKeyIndex = 0;
|
|
87
88
|
const themeRef = useTheme('DynamicInput', '-dynamic-input', style, dynamicInputLight, props, mergedClsPrefixRef);
|
|
88
89
|
const insertionDisabledRef = computed(() => {
|
|
89
90
|
const {
|
|
@@ -123,9 +124,10 @@ export default defineComponent({
|
|
|
123
124
|
if (value === undefined || value === null) return index;
|
|
124
125
|
if (typeof value !== 'object') return index;
|
|
125
126
|
const rawValue = isProxy(value) ? toRaw(value) : value;
|
|
126
|
-
let key =
|
|
127
|
+
let key = localDataKeyMap.get(rawValue);
|
|
127
128
|
if (key === undefined) {
|
|
128
|
-
|
|
129
|
+
key = `${componentId}-${localDataKeyIndex++}`;
|
|
130
|
+
localDataKeyMap.set(rawValue, key);
|
|
129
131
|
}
|
|
130
132
|
return key;
|
|
131
133
|
}
|
|
@@ -141,9 +143,9 @@ export default defineComponent({
|
|
|
141
143
|
const rawOriginal = isProxy(originalItem) ? toRaw(originalItem) : originalItem;
|
|
142
144
|
const rawNew = isProxy(value) ? toRaw(value) : value;
|
|
143
145
|
// inherit key is value position is not change
|
|
144
|
-
const originalKey =
|
|
146
|
+
const originalKey = localDataKeyMap.get(rawOriginal);
|
|
145
147
|
if (originalKey !== undefined) {
|
|
146
|
-
|
|
148
|
+
localDataKeyMap.set(rawNew, originalKey);
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
151
|
doUpdateValue(newValue);
|
package/es/form/src/FormItem.mjs
CHANGED
|
@@ -27,8 +27,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
27
27
|
};
|
|
28
28
|
import Schema from 'async-validator';
|
|
29
29
|
import { get } from 'lodash-es';
|
|
30
|
-
import {
|
|
31
|
-
import { computed, defineComponent, h, inject, onMounted, provide, ref, toRef, Transition, watch } from 'vue';
|
|
30
|
+
import { computed, defineComponent, h, inject, onMounted, provide, ref, toRef, Transition, useId, watch } from 'vue';
|
|
32
31
|
import { useConfig, useTheme, useThemeClass } from "../../_mixins/index.mjs";
|
|
33
32
|
import { formItemInjectionKey } from "../../_mixins/use-form-item.mjs";
|
|
34
33
|
import { createKey, keysOf, resolveWrappedSlot, useInjectionInstanceCollection, warn } from "../../_utils/index.mjs";
|
|
@@ -129,7 +128,9 @@ export default defineComponent({
|
|
|
129
128
|
mergedRequireMarkPlacement: mergedRequireMarkPlacementRef
|
|
130
129
|
} = formItemMiscRefs;
|
|
131
130
|
const renderExplainsRef = ref([]);
|
|
132
|
-
const
|
|
131
|
+
const feedbackBaseId = useId();
|
|
132
|
+
const feedbackIdIndexRef = ref(0);
|
|
133
|
+
const feedbackIdRef = ref(`${feedbackBaseId}-${feedbackIdIndexRef.value}`);
|
|
133
134
|
const labelElementRef = ref(null);
|
|
134
135
|
const mergedDisabledRef = UForm ? toRef(UForm.props, 'disabled') : ref(false);
|
|
135
136
|
const themeRef = useTheme('Form', '-form-item', style, formLight, props, mergedClsPrefixRef);
|
|
@@ -153,7 +154,8 @@ export default defineComponent({
|
|
|
153
154
|
validationErroredRef.value = false;
|
|
154
155
|
validationWarnedRef.value = false;
|
|
155
156
|
if (props.feedback) {
|
|
156
|
-
|
|
157
|
+
feedbackIdIndexRef.value += 1;
|
|
158
|
+
feedbackIdRef.value = `${feedbackBaseId}-${feedbackIdIndexRef.value}`;
|
|
157
159
|
}
|
|
158
160
|
}
|
|
159
161
|
function handleContentBlur() {
|
package/es/grid/src/Grid.mjs
CHANGED
|
@@ -46,6 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
} = useConfig(props);
|
|
47
47
|
const numRegex = /^\d+$/;
|
|
48
48
|
const widthRef = ref(undefined);
|
|
49
|
+
const mountedRef = ref(false);
|
|
49
50
|
const breakpointsRef = useBreakpoints((mergedBreakpointsRef === null || mergedBreakpointsRef === void 0 ? void 0 : mergedBreakpointsRef.value) || defaultBreakpoints);
|
|
50
51
|
const isResponsiveRef = useMemo(() => {
|
|
51
52
|
if (props.itemResponsive) return true;
|
|
@@ -56,7 +57,11 @@ export default defineComponent({
|
|
|
56
57
|
});
|
|
57
58
|
const responsiveQueryRef = computed(() => {
|
|
58
59
|
if (!isResponsiveRef.value) return undefined;
|
|
59
|
-
|
|
60
|
+
if (props.responsive === 'self') return widthRef.value;
|
|
61
|
+
// `screen` responsiveness depends on client-only media queries. Keep the
|
|
62
|
+
// first SSR and hydration render deterministic, then resolve breakpoints
|
|
63
|
+
// after mount.
|
|
64
|
+
return mountedRef.value ? breakpointsRef.value : undefined;
|
|
60
65
|
});
|
|
61
66
|
const responsiveColsRef = useMemo(() => {
|
|
62
67
|
var _a;
|
|
@@ -81,6 +86,7 @@ export default defineComponent({
|
|
|
81
86
|
const isSsrRef = ref(false);
|
|
82
87
|
const contentElRef = ref();
|
|
83
88
|
onMounted(() => {
|
|
89
|
+
mountedRef.value = true;
|
|
84
90
|
const {
|
|
85
91
|
value: contentEl
|
|
86
92
|
} = contentElRef;
|