@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
|
@@ -66,7 +66,7 @@ exports.headerNavigationProps = {
|
|
|
66
66
|
onUpdateMenuValue: [Function, Array],
|
|
67
67
|
onUpdateActiveMenuKey: Function
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
const HeaderNavigation = (0, vue_1.defineComponent)({
|
|
70
70
|
name: 'HeaderNavigation',
|
|
71
71
|
props: exports.headerNavigationProps,
|
|
72
72
|
setup(props) {
|
|
@@ -386,3 +386,4 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
386
386
|
return tabsNode;
|
|
387
387
|
}
|
|
388
388
|
});
|
|
389
|
+
exports.default = HeaderNavigation;
|
|
@@ -20,6 +20,8 @@ const utils_1 = require("./utils");
|
|
|
20
20
|
function transformHeatmapFirstDayOfWeekToDateFns(firstDayOfWeek) {
|
|
21
21
|
return ((firstDayOfWeek + 1) % 7);
|
|
22
22
|
}
|
|
23
|
+
const HEATMAP_LABEL_BASE_DATE = new Date(2024, 0, 1);
|
|
24
|
+
const HEATMAP_LABEL_BASE_YEAR = 2024;
|
|
23
25
|
exports.heatmapProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { activeColors: Array, colorTheme: String, data: Array, loadingData: Object, fillCalendarLeading: Boolean, firstDayOfWeek: {
|
|
24
26
|
type: Number,
|
|
25
27
|
default: 0
|
|
@@ -121,7 +123,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
121
123
|
const weekLabelsRef = (0, vue_1.computed)(() => {
|
|
122
124
|
const { weekdayFormat } = localeRef.value;
|
|
123
125
|
const { locale } = dateLocaleRef.value;
|
|
124
|
-
const baseDate = (0, date_fns_1.startOfWeek)(
|
|
126
|
+
const baseDate = (0, date_fns_1.startOfWeek)(HEATMAP_LABEL_BASE_DATE, {
|
|
125
127
|
weekStartsOn: transformHeatmapFirstDayOfWeekToDateFns(props.firstDayOfWeek)
|
|
126
128
|
});
|
|
127
129
|
return Array.from({ length: 7 }, (_, i) => {
|
|
@@ -134,11 +136,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
134
136
|
const loadingMonthLabelsRef = (0, vue_1.computed)(() => {
|
|
135
137
|
const { monthFormat } = localeRef.value;
|
|
136
138
|
const { locale } = dateLocaleRef.value;
|
|
137
|
-
const currentYear = new Date().getFullYear();
|
|
138
139
|
// for more consistent month label widths
|
|
139
140
|
const colSpans = [5, 4, 5, 4, 5, 4, 5, 4, 4, 5, 4, 4];
|
|
140
141
|
return Array.from({ length: 12 }, (_, i) => {
|
|
141
|
-
const monthDate = new Date(
|
|
142
|
+
const monthDate = new Date(HEATMAP_LABEL_BASE_YEAR, i, 1);
|
|
142
143
|
return {
|
|
143
144
|
name: (0, date_fns_1.format)(monthDate, monthFormat, { locale }),
|
|
144
145
|
colSpan: colSpans[i]
|
package/lib/image/src/Image.js
CHANGED
|
@@ -16,7 +16,6 @@ exports.imageProps = Object.assign({ alt: String, height: [String, Number], imgP
|
|
|
16
16
|
type: String,
|
|
17
17
|
default: 'fill'
|
|
18
18
|
}, previewSrc: String, fallbackSrc: String, width: [String, Number], src: String, previewDisabled: Boolean, loadDescription: String, onError: Function, onLoad: Function }, interface_1.imagePreviewSharedProps);
|
|
19
|
-
let uuid = 0;
|
|
20
19
|
exports.default = (0, vue_1.defineComponent)({
|
|
21
20
|
name: 'Image',
|
|
22
21
|
props: exports.imageProps,
|
|
@@ -32,13 +31,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
32
31
|
return props.previewSrc || props.src;
|
|
33
32
|
});
|
|
34
33
|
const previewShowRef = (0, vue_1.ref)(false);
|
|
35
|
-
const imageId =
|
|
34
|
+
const imageId = `r${(0, vue_1.useId)()}`;
|
|
36
35
|
const showPreview = () => {
|
|
37
36
|
if (props.previewDisabled || showErrorRef.value)
|
|
38
37
|
return;
|
|
39
38
|
if (imageGroupHandle) {
|
|
40
39
|
imageGroupHandle.setThumbnailEl(imageRef.value);
|
|
41
|
-
imageGroupHandle.toggleShow(
|
|
40
|
+
imageGroupHandle.toggleShow(imageId);
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
43
|
const { value: previewInst } = previewInstRef;
|
|
@@ -5,7 +5,7 @@ export declare const imageGroupInjectionKey: import("vue").InjectionKey<ImagePre
|
|
|
5
5
|
groupId: string;
|
|
6
6
|
mergedClsPrefixRef: Ref<string>;
|
|
7
7
|
renderToolbarRef: Ref<ImageRenderToolbar | undefined>;
|
|
8
|
-
registerImageUrl: (id:
|
|
8
|
+
registerImageUrl: (id: string, url: string) => () => void;
|
|
9
9
|
toggleShow: (imageId: string) => void;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const imageGroupProps: {
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.imageGroupProps = exports.imageGroupInjectionKey = void 0;
|
|
7
|
-
const seemly_1 = require("seemly");
|
|
8
7
|
const vooks_1 = require("vooks");
|
|
9
8
|
const vue_1 = require("vue");
|
|
10
9
|
const _mixins_1 = require("../../_mixins");
|
|
@@ -24,7 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
24
23
|
props: exports.imageGroupProps,
|
|
25
24
|
setup(props) {
|
|
26
25
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
27
|
-
const groupId = `c${(0,
|
|
26
|
+
const groupId = `c${(0, vue_1.useId)()}`;
|
|
28
27
|
const previewInstRef = (0, vue_1.ref)(null);
|
|
29
28
|
const uncontrolledShowRef = (0, vue_1.ref)(props.defaultShow);
|
|
30
29
|
const controlledShowRef = (0, vue_1.toRef)(props, 'show');
|
|
@@ -46,12 +45,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
46
45
|
if (props.srcList) {
|
|
47
46
|
(0, _utils_1.throwError)('image-group', '`u-image` can\'t be placed inside `u-image-group` when image group\'s `src-list` prop is set.');
|
|
48
47
|
}
|
|
49
|
-
const sid =
|
|
50
|
-
if (!registeredImageUrlMap.value.has(
|
|
48
|
+
const sid = id;
|
|
49
|
+
if (!registeredImageUrlMap.value.has(sid)) {
|
|
51
50
|
registeredImageUrlMap.value.set(sid, url);
|
|
52
51
|
}
|
|
53
52
|
return function unregisterPreviewUrl() {
|
|
54
|
-
if (
|
|
53
|
+
if (registeredImageUrlMap.value.has(sid)) {
|
|
55
54
|
registeredImageUrlMap.value.delete(sid);
|
|
56
55
|
}
|
|
57
56
|
};
|
package/lib/menu/src/Menu.js
CHANGED
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.menuProps = void 0;
|
|
7
|
-
const seemly_1 = require("seemly");
|
|
8
7
|
const treemate_1 = require("treemate");
|
|
9
8
|
const vooks_1 = require("vooks");
|
|
10
9
|
const vue_1 = require("vue");
|
|
@@ -360,7 +359,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
360
359
|
const themeClassHandle = inlineThemeDisabled
|
|
361
360
|
? (0, _mixins_1.useThemeClass)('menu', (0, vue_1.computed)(() => (props.inverted ? 'a' : 'b')), cssVarsRef, props)
|
|
362
361
|
: undefined;
|
|
363
|
-
const ellipsisNodeId = (0,
|
|
362
|
+
const ellipsisNodeId = (0, vue_1.useId)();
|
|
364
363
|
const overflowRef = (0, vue_1.ref)(null);
|
|
365
364
|
const counterRef = (0, vue_1.ref)(null);
|
|
366
365
|
let isFirstResize = true;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.messageProviderProps = void 0;
|
|
7
|
-
const seemly_1 = require("seemly");
|
|
8
7
|
const vue_1 = require("vue");
|
|
9
8
|
const _mixins_1 = require("../../_mixins");
|
|
10
9
|
const _utils_1 = require("../../_utils");
|
|
@@ -24,6 +23,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
24
23
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
25
24
|
const messageListRef = (0, vue_1.ref)([]);
|
|
26
25
|
const messageRefs = (0, vue_1.ref)({});
|
|
26
|
+
const providerId = (0, vue_1.useId)();
|
|
27
|
+
let messageKeyIndex = 0;
|
|
27
28
|
const api = {
|
|
28
29
|
create(content, options) {
|
|
29
30
|
return create(content, Object.assign({ type: 'default' }, options));
|
|
@@ -51,7 +52,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
51
52
|
});
|
|
52
53
|
(0, vue_1.provide)(context_1.messageApiInjectionKey, api);
|
|
53
54
|
function create(content, options) {
|
|
54
|
-
const key =
|
|
55
|
+
const key = `${providerId}-${messageKeyIndex++}`;
|
|
55
56
|
const messageReactive = (0, vue_1.reactive)(Object.assign(Object.assign({}, options), { content,
|
|
56
57
|
key, destroy: () => {
|
|
57
58
|
var _a;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UModalProvider = exports.modalProviderProps = void 0;
|
|
4
|
-
const seemly_1 = require("seemly");
|
|
5
4
|
const vooks_1 = require("vooks");
|
|
6
5
|
const vue_1 = require("vue");
|
|
7
6
|
const _utils_1 = require("../../_utils");
|
|
@@ -16,8 +15,10 @@ exports.UModalProvider = (0, vue_1.defineComponent)({
|
|
|
16
15
|
setup() {
|
|
17
16
|
const modalListRef = (0, vue_1.ref)([]);
|
|
18
17
|
const modalInstRefs = {};
|
|
18
|
+
const providerId = (0, vue_1.useId)();
|
|
19
|
+
let modalKeyIndex = 0;
|
|
19
20
|
function create(options = {}) {
|
|
20
|
-
const key =
|
|
21
|
+
const key = `${providerId}-${modalKeyIndex++}`;
|
|
21
22
|
const modalReactive = (0, vue_1.reactive)(Object.assign(Object.assign({}, options), { key, destroy: () => {
|
|
22
23
|
var _a;
|
|
23
24
|
(_a = modalInstRefs[`u-modal-${key}`]) === null || _a === void 0 ? void 0 : _a.hide();
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.notificationProviderProps = exports.notificationApiInjectionKey = void 0;
|
|
7
|
-
const seemly_1 = require("seemly");
|
|
8
7
|
const vue_1 = require("vue");
|
|
9
8
|
const _mixins_1 = require("../../_mixins");
|
|
10
9
|
const _utils_1 = require("../../_utils");
|
|
@@ -29,8 +28,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
29
28
|
const notificationListRef = (0, vue_1.ref)([]);
|
|
30
29
|
const notificationRefs = {};
|
|
31
30
|
const leavingKeySet = new Set();
|
|
31
|
+
const providerId = (0, vue_1.useId)();
|
|
32
|
+
let notificationKeyIndex = 0;
|
|
32
33
|
function create(options) {
|
|
33
|
-
const key =
|
|
34
|
+
const key = `${providerId}-${notificationKeyIndex++}`;
|
|
34
35
|
const destroy = () => {
|
|
35
36
|
leavingKeySet.add(key);
|
|
36
37
|
// If you push n + 1 message when max is n, notificationRefs[key] maybe not be set
|
package/lib/time/src/Time.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const timeProps: {
|
|
|
13
13
|
readonly type: PropType<number | Date>;
|
|
14
14
|
readonly default: undefined;
|
|
15
15
|
};
|
|
16
|
+
readonly ssrCurrentTimestamp: NumberConstructor;
|
|
16
17
|
readonly unix: BooleanConstructor;
|
|
17
18
|
readonly format: StringConstructor;
|
|
18
19
|
readonly text: BooleanConstructor;
|
|
@@ -32,6 +33,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
32
33
|
readonly type: PropType<number | Date>;
|
|
33
34
|
readonly default: undefined;
|
|
34
35
|
};
|
|
36
|
+
readonly ssrCurrentTimestamp: NumberConstructor;
|
|
35
37
|
readonly unix: BooleanConstructor;
|
|
36
38
|
readonly format: StringConstructor;
|
|
37
39
|
readonly text: BooleanConstructor;
|
|
@@ -51,6 +53,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
51
53
|
readonly type: PropType<number | Date>;
|
|
52
54
|
readonly default: undefined;
|
|
53
55
|
};
|
|
56
|
+
readonly ssrCurrentTimestamp: NumberConstructor;
|
|
54
57
|
readonly unix: BooleanConstructor;
|
|
55
58
|
readonly format: StringConstructor;
|
|
56
59
|
readonly text: BooleanConstructor;
|
package/lib/time/src/Time.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.timeProps = {
|
|
|
18
18
|
type: [Number, Date],
|
|
19
19
|
default: undefined // the same as `time` prop
|
|
20
20
|
},
|
|
21
|
+
ssrCurrentTimestamp: Number,
|
|
21
22
|
unix: Boolean,
|
|
22
23
|
format: String,
|
|
23
24
|
text: Boolean,
|
|
@@ -27,7 +28,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
27
28
|
name: 'Time',
|
|
28
29
|
props: exports.timeProps,
|
|
29
30
|
setup(props) {
|
|
30
|
-
|
|
31
|
+
var _a;
|
|
32
|
+
const now = (_a = props.ssrCurrentTimestamp) !== null && _a !== void 0 ? _a : Date.now();
|
|
31
33
|
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('Time');
|
|
32
34
|
const mergedFormatRef = (0, vue_1.computed)(() => {
|
|
33
35
|
const { timeZone } = props;
|
|
@@ -91,6 +91,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
91
91
|
props: timePickerPanelProps,
|
|
92
92
|
setup(props) {
|
|
93
93
|
const { mergedThemeRef, mergedClsPrefixRef } = (0, vue_1.inject)(interface_1.timePickerInjectionKey);
|
|
94
|
+
const mountedRef = (0, vue_1.ref)(false);
|
|
95
|
+
(0, vue_1.onMounted)(() => {
|
|
96
|
+
mountedRef.value = true;
|
|
97
|
+
});
|
|
94
98
|
const hoursRef = (0, vue_1.computed)(() => {
|
|
95
99
|
const { isHourDisabled, hours, use12Hours, amPmValue } = props;
|
|
96
100
|
if (!use12Hours) {
|
|
@@ -103,7 +107,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
103
107
|
});
|
|
104
108
|
}
|
|
105
109
|
else {
|
|
106
|
-
|
|
110
|
+
// Keep the initial SSR and hydration render deterministic when there is
|
|
111
|
+
// no selected value yet. After mount we can safely derive AM/PM from
|
|
112
|
+
// the current local time.
|
|
113
|
+
const mergedAmPmValue = amPmValue !== null && amPmValue !== void 0 ? amPmValue : (mountedRef.value ? (0, utils_1.getAmPm)(Date.now()) : 'am');
|
|
107
114
|
return (0, utils_1.getTimeUnits)(utils_1.time.hours, hours, mergedAmPmValue).map((hour) => {
|
|
108
115
|
const hourAs12FormattedNumber = Number(hour);
|
|
109
116
|
const hourAs24FormattedNumber = mergedAmPmValue === 'pm' && hourAs12FormattedNumber !== 12
|
package/lib/upload/src/Upload.js
CHANGED
|
@@ -13,7 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.uploadProps = void 0;
|
|
16
|
-
const seemly_1 = require("seemly");
|
|
17
16
|
const vooks_1 = require("vooks");
|
|
18
17
|
const vue_1 = require("vue");
|
|
19
18
|
const _mixins_1 = require("../../_mixins");
|
|
@@ -89,6 +88,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
89
88
|
name: 'Upload',
|
|
90
89
|
props: exports.uploadProps,
|
|
91
90
|
setup(props) {
|
|
91
|
+
const uploadId = (0, vue_1.useId)();
|
|
92
|
+
const uploadKeyIndexRef = (0, vue_1.ref)(0);
|
|
92
93
|
const { localeRef } = (0, _mixins_1.useLocale)('Upload');
|
|
93
94
|
const { submitImpl, customSubmitImpl } = (0, useUpload_1.useUpload)();
|
|
94
95
|
if (props.abstract && props.listType === 'image-card') {
|
|
@@ -139,6 +140,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
139
140
|
uncontrolledFileListRef.value = files;
|
|
140
141
|
}
|
|
141
142
|
const mergedMultipleRef = (0, vue_1.computed)(() => props.multiple || props.directory);
|
|
143
|
+
function createUploadKey() {
|
|
144
|
+
const key = `${uploadId}-${uploadKeyIndexRef.value}`;
|
|
145
|
+
uploadKeyIndexRef.value += 1;
|
|
146
|
+
return key;
|
|
147
|
+
}
|
|
142
148
|
function handleFileAddition(fileAndEntries, e) {
|
|
143
149
|
if (!fileAndEntries || fileAndEntries.length === 0)
|
|
144
150
|
return;
|
|
@@ -158,11 +164,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
158
164
|
if (max) {
|
|
159
165
|
fileAndEntries = fileAndEntries.slice(0, max - mergedFileListRef.value.length);
|
|
160
166
|
}
|
|
161
|
-
const batchId = (
|
|
167
|
+
const batchId = createUploadKey();
|
|
162
168
|
void Promise.all(fileAndEntries.map((_a) => __awaiter(this, [_a], void 0, function* ({ file, entry }) {
|
|
163
169
|
var _b;
|
|
164
170
|
const fileInfo = {
|
|
165
|
-
id: (
|
|
171
|
+
id: createUploadKey(),
|
|
166
172
|
batchId,
|
|
167
173
|
name: file.name,
|
|
168
174
|
status: 'pending',
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.0-beta.
|
|
1
|
+
declare const _default: "2.0.0-beta.3";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uzum-tech/ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "KapitalLab",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"main": "lib/index.js",
|
|
39
|
-
"module": "es/index.
|
|
39
|
+
"module": "es/index.mjs",
|
|
40
40
|
"unpkg": "dist/index.js",
|
|
41
41
|
"jsdelivr": "dist/index.js",
|
|
42
42
|
"types": "es/index.d.ts",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
},
|
|
88
88
|
"web-types": "./web-types.json",
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"vue": "3.0.0"
|
|
90
|
+
"vue": "^3.0.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@css-render/plugin-bem": "0.15.14",
|
|
94
94
|
"@css-render/vue3-ssr": "0.15.14",
|
|
95
|
-
"@types/lodash": "4.17.
|
|
95
|
+
"@types/lodash": "4.17.24",
|
|
96
96
|
"@types/lodash-es": "4.17.12",
|
|
97
97
|
"@vueuse/core": "13.3.0",
|
|
98
98
|
"async-validator": "4.2.5",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"date-fns": "4.1.0",
|
|
103
103
|
"date-fns-tz": "3.2.0",
|
|
104
104
|
"evtd": "0.2.4",
|
|
105
|
-
"highlight.js": "11.
|
|
106
|
-
"lodash": "4.17.
|
|
107
|
-
"lodash-es": "4.17.
|
|
105
|
+
"highlight.js": "11.11.1",
|
|
106
|
+
"lodash": "4.17.23",
|
|
107
|
+
"lodash-es": "4.17.23",
|
|
108
108
|
"seemly": "0.3.10",
|
|
109
109
|
"treemate": "0.3.11",
|
|
110
110
|
"vdirs": "0.1.8",
|
|
@@ -113,42 +113,42 @@
|
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@antfu/eslint-config": "5.3.0",
|
|
116
|
-
"@babel/core": "7.
|
|
117
|
-
"@babel/generator": "7.
|
|
118
|
-
"@babel/parser": "7.
|
|
119
|
-
"@babel/preset-env": "7.
|
|
120
|
-
"@babel/traverse": "7.
|
|
116
|
+
"@babel/core": "7.29.0",
|
|
117
|
+
"@babel/generator": "7.29.1",
|
|
118
|
+
"@babel/parser": "7.29.2",
|
|
119
|
+
"@babel/preset-env": "7.29.2",
|
|
120
|
+
"@babel/traverse": "7.29.0",
|
|
121
121
|
"@lylajs/web": "2.1.0",
|
|
122
122
|
"@rollup/plugin-babel": "6.0.4",
|
|
123
123
|
"@rollup/plugin-commonjs": "28.0.6",
|
|
124
|
-
"@rollup/plugin-node-resolve": "16.0.
|
|
125
|
-
"@rollup/plugin-replace": "6.0.
|
|
124
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
125
|
+
"@rollup/plugin-replace": "6.0.3",
|
|
126
126
|
"@rollup/plugin-terser": "0.4.4",
|
|
127
127
|
"@types/babel__core": "7.20.5",
|
|
128
128
|
"@types/babel__generator": "7.27.0",
|
|
129
129
|
"@types/babel__traverse": "7.28.0",
|
|
130
|
-
"@types/estree": "1.0.
|
|
130
|
+
"@types/estree": "1.0.8",
|
|
131
131
|
"@types/fs-extra": "11.0.4",
|
|
132
132
|
"@types/node": "24.0.12",
|
|
133
133
|
"@types/superagent": "8.1.9",
|
|
134
134
|
"@vicons/fluent": "0.13.0",
|
|
135
135
|
"@vicons/ionicons4": "0.13.0",
|
|
136
136
|
"@vicons/ionicons5": "0.13.0",
|
|
137
|
-
"@vitejs/plugin-vue": "6.0.
|
|
137
|
+
"@vitejs/plugin-vue": "6.0.5",
|
|
138
138
|
"@vitest/coverage-v8": "3.2.4",
|
|
139
|
-
"@vue/compiler-sfc": "3.5.
|
|
140
|
-
"@vue/server-renderer": "3.5.
|
|
139
|
+
"@vue/compiler-sfc": "3.5.31",
|
|
140
|
+
"@vue/server-renderer": "3.5.31",
|
|
141
141
|
"@vue/test-utils": "2.4.6",
|
|
142
|
-
"autoprefixer": "10.4.
|
|
142
|
+
"autoprefixer": "10.4.27",
|
|
143
143
|
"codesandbox": "2.2.3",
|
|
144
|
-
"cssnano": "7.1.
|
|
144
|
+
"cssnano": "7.1.3",
|
|
145
145
|
"deepmerge": "4.3.1",
|
|
146
146
|
"esbuild": "0.25.10",
|
|
147
147
|
"eslint": "9.39.4",
|
|
148
148
|
"express": "5.1.0",
|
|
149
|
-
"fast-glob": "3.3.
|
|
149
|
+
"fast-glob": "3.3.3",
|
|
150
150
|
"fflate": "0.8.2",
|
|
151
|
-
"fs-extra": "11.3.
|
|
151
|
+
"fs-extra": "11.3.4",
|
|
152
152
|
"grapheme-splitter": "1.0.4",
|
|
153
153
|
"husky": "9.1.7",
|
|
154
154
|
"inquirer": "12.7.0",
|
|
@@ -156,19 +156,19 @@
|
|
|
156
156
|
"katex": "0.16.28",
|
|
157
157
|
"lint-staged": "16.1.6",
|
|
158
158
|
"marked": "12.0.2",
|
|
159
|
-
"prettier": "3.
|
|
160
|
-
"rimraf": "6.
|
|
161
|
-
"rollup": "4.
|
|
159
|
+
"prettier": "3.8.1",
|
|
160
|
+
"rimraf": "6.1.3",
|
|
161
|
+
"rollup": "4.60.0",
|
|
162
162
|
"rollup-plugin-esbuild": "6.2.1",
|
|
163
|
-
"superagent": "10.
|
|
164
|
-
"tsx": "4.
|
|
163
|
+
"superagent": "10.3.0",
|
|
164
|
+
"tsx": "4.21.0",
|
|
165
165
|
"typescript": "5.9.2",
|
|
166
166
|
"vfonts": "0.0.3",
|
|
167
|
-
"vite": "7.
|
|
167
|
+
"vite": "7.1.12",
|
|
168
168
|
"vitest": "3.2.4",
|
|
169
|
-
"vue": "3.5.
|
|
169
|
+
"vue": "3.5.31",
|
|
170
170
|
"vue-router": "4.5.1",
|
|
171
|
-
"vue-tsc": "3.
|
|
171
|
+
"vue-tsc": "3.2.6"
|
|
172
172
|
},
|
|
173
173
|
"pnpm": {
|
|
174
174
|
"overrides": {
|
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@uzum-tech/ui",
|
|
5
|
-
"version": "2.0.0-beta.
|
|
5
|
+
"version": "2.0.0-beta.3",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -1461,6 +1461,11 @@
|
|
|
1461
1461
|
"description": "Validator of the date.",
|
|
1462
1462
|
"default": "undefined"
|
|
1463
1463
|
},
|
|
1464
|
+
{
|
|
1465
|
+
"name": "ssr-current-timestamp",
|
|
1466
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/calendar",
|
|
1467
|
+
"type": "number"
|
|
1468
|
+
},
|
|
1464
1469
|
{
|
|
1465
1470
|
"name": "value",
|
|
1466
1471
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/calendar",
|
|
@@ -3973,17 +3978,30 @@
|
|
|
3973
3978
|
{
|
|
3974
3979
|
"name": "breakpoint-props",
|
|
3975
3980
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/config-provider",
|
|
3976
|
-
"type": "
|
|
3981
|
+
"type": "Record<number, GlobalComponentConfig>",
|
|
3982
|
+
"description": "Responsive global component props. By default they resolve from `window.innerWidth`. In SSR, set `ssr-breakpoint-width` to make the server render deterministic and avoid hydration mismatches.",
|
|
3983
|
+
"default": "undefined"
|
|
3977
3984
|
},
|
|
3978
3985
|
{
|
|
3979
3986
|
"name": "breakpoint-theme-overrides",
|
|
3980
3987
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/config-provider",
|
|
3981
|
-
"type": "
|
|
3988
|
+
"type": "Record<number, ThemeOverrides>",
|
|
3989
|
+
"description": "Responsive theme overrides using the same breakpoint resolution rules as `breakpoint-props`. In SSR, pair them with `ssr-breakpoint-width` if they affect rendered output.",
|
|
3990
|
+
"default": "undefined"
|
|
3982
3991
|
},
|
|
3983
3992
|
{
|
|
3984
3993
|
"name": "breakpoint-mode",
|
|
3985
3994
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/config-provider",
|
|
3986
|
-
"type": "
|
|
3995
|
+
"type": "'mobile-first' | 'desktop-first'",
|
|
3996
|
+
"description": "Controls responsive resolution strategy for `breakpoint-props` and `breakpoint-theme-overrides`. `mobile-first` behaves like min-width breakpoints and inherits from smaller widths. `desktop-first` behaves like max-width breakpoints and inherits from larger widths.",
|
|
3997
|
+
"default": "'desktop-first'"
|
|
3998
|
+
},
|
|
3999
|
+
{
|
|
4000
|
+
"name": "ssr-breakpoint-width",
|
|
4001
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/config-provider",
|
|
4002
|
+
"type": "number",
|
|
4003
|
+
"description": "Explicit width used to resolve `breakpoint-props` and `breakpoint-theme-overrides` during SSR and the first client hydration pass. Useful for avoiding hydration style mismatches in SSR apps.",
|
|
4004
|
+
"default": "undefined"
|
|
3987
4005
|
},
|
|
3988
4006
|
{
|
|
3989
4007
|
"name": "preflight-style-disabled",
|
|
@@ -4961,6 +4979,11 @@
|
|
|
4961
4979
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/date-picker",
|
|
4962
4980
|
"type": "number"
|
|
4963
4981
|
},
|
|
4982
|
+
{
|
|
4983
|
+
"name": "ssr-current-timestamp",
|
|
4984
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/date-picker",
|
|
4985
|
+
"type": "number"
|
|
4986
|
+
},
|
|
4964
4987
|
{
|
|
4965
4988
|
"name": "bind-calendar-months",
|
|
4966
4989
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/date-picker",
|
|
@@ -18106,6 +18129,11 @@
|
|
|
18106
18129
|
"description": "Target time.",
|
|
18107
18130
|
"default": "Date.now()"
|
|
18108
18131
|
},
|
|
18132
|
+
{
|
|
18133
|
+
"name": "ssr-current-timestamp",
|
|
18134
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/time",
|
|
18135
|
+
"type": "number"
|
|
18136
|
+
},
|
|
18109
18137
|
{
|
|
18110
18138
|
"name": "unix",
|
|
18111
18139
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/time",
|