@uzum-tech/ui 1.10.1 → 1.11.0
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 +1151 -147
- package/dist/index.prod.js +3 -3
- package/es/_internal/index.d.ts +2 -0
- package/es/_internal/index.js +1 -0
- package/es/_internal/safe-top-scrollbar/index.d.ts +2 -0
- package/es/_internal/safe-top-scrollbar/index.js +1 -0
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +356 -0
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.js +708 -0
- package/es/_internal/safe-top-scrollbar/src/styles/index.cssr.d.ts +2 -0
- package/es/_internal/safe-top-scrollbar/src/styles/index.cssr.js +80 -0
- package/es/_internal/safe-top-scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/es/_internal/safe-top-scrollbar/src/styles/rtl.cssr.js +10 -0
- package/es/_internal/safe-top-scrollbar/styles/common.d.ts +7 -0
- package/es/_internal/safe-top-scrollbar/styles/common.js +7 -0
- package/es/_internal/safe-top-scrollbar/styles/dark.d.ts +3 -0
- package/es/_internal/safe-top-scrollbar/styles/dark.js +8 -0
- package/es/_internal/safe-top-scrollbar/styles/index.d.ts +4 -0
- package/es/_internal/safe-top-scrollbar/styles/index.js +3 -0
- package/es/_internal/safe-top-scrollbar/styles/light.d.ts +18 -0
- package/es/_internal/safe-top-scrollbar/styles/light.js +12 -0
- package/es/_internal/safe-top-scrollbar/styles/rtl.d.ts +3 -0
- package/es/_internal/safe-top-scrollbar/styles/rtl.js +6 -0
- package/es/chat/src/Chat.d.ts +14 -1
- package/es/chat/src/Chat.js +5 -0
- package/es/chat/src/ChatParts/ChatAttachment.js +31 -3
- package/es/chat/src/ChatParts/MainArea.js +37 -41
- package/es/chat/src/interface.d.ts +6 -2
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/drawer/src/Drawer.d.ts +18 -0
- package/es/drawer/src/Drawer.js +28 -26
- package/es/drawer/src/DrawerBodyWrapper.d.ts +8 -0
- package/es/drawer/src/DrawerBodyWrapper.js +36 -8
- package/es/safe-top-scrollbar/index.d.ts +2 -0
- package/es/safe-top-scrollbar/index.js +1 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +177 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.js +38 -0
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/index.d.ts +2 -0
- package/lib/_internal/index.js +4 -1
- package/lib/_internal/safe-top-scrollbar/index.d.ts +2 -0
- package/lib/_internal/safe-top-scrollbar/index.js +9 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +356 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.js +714 -0
- package/lib/_internal/safe-top-scrollbar/src/styles/index.cssr.d.ts +2 -0
- package/lib/_internal/safe-top-scrollbar/src/styles/index.cssr.js +85 -0
- package/lib/_internal/safe-top-scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/_internal/safe-top-scrollbar/src/styles/rtl.cssr.js +15 -0
- package/lib/_internal/safe-top-scrollbar/styles/common.d.ts +7 -0
- package/lib/_internal/safe-top-scrollbar/styles/common.js +10 -0
- package/lib/_internal/safe-top-scrollbar/styles/dark.d.ts +3 -0
- package/lib/_internal/safe-top-scrollbar/styles/dark.js +10 -0
- package/lib/_internal/safe-top-scrollbar/styles/index.d.ts +4 -0
- package/lib/_internal/safe-top-scrollbar/styles/index.js +12 -0
- package/lib/_internal/safe-top-scrollbar/styles/light.d.ts +18 -0
- package/lib/_internal/safe-top-scrollbar/styles/light.js +16 -0
- package/lib/_internal/safe-top-scrollbar/styles/rtl.d.ts +3 -0
- package/lib/_internal/safe-top-scrollbar/styles/rtl.js +12 -0
- package/lib/chat/src/Chat.d.ts +14 -1
- package/lib/chat/src/Chat.js +5 -0
- package/lib/chat/src/ChatParts/ChatAttachment.js +30 -2
- package/lib/chat/src/ChatParts/MainArea.js +37 -41
- package/lib/chat/src/interface.d.ts +6 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/drawer/src/Drawer.d.ts +18 -0
- package/lib/drawer/src/Drawer.js +28 -26
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +8 -0
- package/lib/drawer/src/DrawerBodyWrapper.js +36 -8
- package/lib/safe-top-scrollbar/index.d.ts +2 -0
- package/lib/safe-top-scrollbar/index.js +9 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +177 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.js +41 -0
- package/lib/themes/dark.js +5 -0
- package/lib/themes/light.js +5 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +1 -0
- package/web-types.json +58 -2
package/lib/drawer/src/Drawer.js
CHANGED
|
@@ -57,7 +57,11 @@ exports.drawerProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
|
|
|
57
57
|
}, blockScroll: {
|
|
58
58
|
type: Boolean,
|
|
59
59
|
default: true
|
|
60
|
-
}, maxWidth: Number, maxHeight: Number, minWidth: Number, minHeight: Number, resizable: Boolean, fullscreen: Boolean,
|
|
60
|
+
}, maxWidth: Number, maxHeight: Number, minWidth: Number, minHeight: Number, resizable: Boolean, fullscreen: Boolean, defaultWidth: {
|
|
61
|
+
type: [Number, String]
|
|
62
|
+
}, defaultHeight: {
|
|
63
|
+
type: [Number, String]
|
|
64
|
+
}, onUpdateWidth: [Function, Array], onUpdateHeight: [Function, Array], 'onUpdate:width': [Function, Array], 'onUpdate:height': [Function, Array], 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], onAfterEnter: Function, onAfterLeave: Function,
|
|
61
65
|
/** @deprecated */
|
|
62
66
|
drawerStyle: [String, Object],
|
|
63
67
|
/** @deprecated */
|
|
@@ -95,8 +99,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
95
99
|
const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
96
100
|
const isMountedRef = (0, vooks_1.useIsMounted)();
|
|
97
101
|
const themeRef = (0, _mixins_1.useTheme)('Drawer', '-drawer', index_cssr_1.default, styles_1.drawerLight, props, mergedClsPrefixRef);
|
|
98
|
-
const uncontrolledWidthRef = (0, vue_1.ref)(sizesWidth[props.size]);
|
|
99
|
-
const uncontrolledHeightRef = (0, vue_1.ref)(sizesHeight[props.size]);
|
|
102
|
+
const uncontrolledWidthRef = (0, vue_1.ref)(props.defaultWidth || sizesWidth[props.size]);
|
|
103
|
+
const uncontrolledHeightRef = (0, vue_1.ref)(props.defaultHeight || sizesHeight[props.size]);
|
|
100
104
|
const mergedWidthRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'width'), uncontrolledWidthRef);
|
|
101
105
|
const mergedHeightRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'height'), uncontrolledHeightRef);
|
|
102
106
|
const styleWidthRef = (0, vue_1.computed)(() => {
|
|
@@ -115,31 +119,29 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
115
119
|
return '';
|
|
116
120
|
return (0, _utils_1.formatLength)(mergedHeightRef.value);
|
|
117
121
|
});
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
onUpdate = props.onUpdateHeight;
|
|
123
|
-
_onUpdate = props['onUpdate:height'];
|
|
124
|
-
max = props.maxHeight;
|
|
125
|
-
min = props.minHeight;
|
|
126
|
-
_ref = uncontrolledHeightRef;
|
|
122
|
+
const doUpdateWidth = (value) => {
|
|
123
|
+
const { onUpdateWidth, 'onUpdate:width': _onUpdateWidth } = props;
|
|
124
|
+
if (onUpdateWidth) {
|
|
125
|
+
(0, _utils_1.call)(onUpdateWidth, value);
|
|
127
126
|
}
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
if (_onUpdateWidth) {
|
|
128
|
+
(0, _utils_1.call)(_onUpdateWidth, value);
|
|
129
|
+
}
|
|
130
|
+
uncontrolledWidthRef.value = value;
|
|
131
|
+
};
|
|
132
|
+
const doUpdateHeight = (value) => {
|
|
133
|
+
const { onUpdateHeight, 'onUpdate:width': _onUpdateHeight } = props;
|
|
134
|
+
if (onUpdateHeight) {
|
|
135
|
+
(0, _utils_1.call)(onUpdateHeight, value);
|
|
136
|
+
}
|
|
137
|
+
if (_onUpdateHeight) {
|
|
138
|
+
(0, _utils_1.call)(_onUpdateHeight, value);
|
|
139
|
+
}
|
|
140
|
+
uncontrolledHeightRef.value = value;
|
|
137
141
|
};
|
|
138
|
-
const doUpdateWidth = doUpdate.bind(null, false);
|
|
139
|
-
const doUpdateHeight = doUpdate.bind(null, true);
|
|
140
142
|
(0, vue_1.watchEffect)(() => {
|
|
141
|
-
doUpdateWidth(sizesWidth[props.size]);
|
|
142
|
-
doUpdateHeight(sizesHeight[props.size]);
|
|
143
|
+
doUpdateWidth(Number(props.defaultWidth || sizesWidth[props.size]));
|
|
144
|
+
doUpdateHeight(Number(props.defaultHeight || sizesHeight[props.size]));
|
|
143
145
|
});
|
|
144
146
|
const mergedBodyStyleRef = (0, vue_1.computed)(() => {
|
|
145
147
|
return [
|
|
@@ -268,7 +270,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
268
270
|
`${mergedClsPrefix}-drawer-mask--invisible`
|
|
269
271
|
], onClick: this.handleMaskClick })) : null
|
|
270
272
|
})) : null,
|
|
271
|
-
(0, vue_1.h)(DrawerBodyWrapper_1.default, Object.assign({}, this.$attrs, { class: [this.drawerClass, this.$attrs.class], style: [this.mergedBodyStyle, this.$attrs.style], blockScroll: this.blockScroll, contentStyle: this.contentStyle, placement: this.placement, rounded: this.rounded, scrollbarProps: this.scrollbarProps, show: this.show, displayDirective: this.displayDirective, nativeScrollbar: this.nativeScrollbar, onAfterEnter: this.onAfterEnter, onAfterLeave: this.onAfterLeave, trapFocus: this.trapFocus, autoFocus: this.autoFocus, resizable: this.resizable, showMask: this.showMask, onEsc: this.handleEsc, onClickoutside: this.handleMaskClick }), this.$slots)), [[vdirs_1.zindexable, { zIndex: this.zIndex, enabled: this.show }]]);
|
|
273
|
+
(0, vue_1.h)(DrawerBodyWrapper_1.default, Object.assign({}, this.$attrs, { class: [this.drawerClass, this.$attrs.class], style: [this.mergedBodyStyle, this.$attrs.style], blockScroll: this.blockScroll, contentStyle: this.contentStyle, placement: this.placement, rounded: this.rounded, scrollbarProps: this.scrollbarProps, show: this.show, displayDirective: this.displayDirective, nativeScrollbar: this.nativeScrollbar, onAfterEnter: this.onAfterEnter, onAfterLeave: this.onAfterLeave, trapFocus: this.trapFocus, autoFocus: this.autoFocus, resizable: this.resizable, maxHeight: this.maxHeight, minHeight: this.minHeight, maxWidth: this.maxWidth, minWidth: this.minWidth, showMask: this.showMask, onEsc: this.handleEsc, onClickoutside: this.handleMaskClick }), this.$slots)), [[vdirs_1.zindexable, { zIndex: this.zIndex, enabled: this.show }]]);
|
|
272
274
|
}
|
|
273
275
|
}));
|
|
274
276
|
}
|
|
@@ -37,6 +37,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
type: PropType<boolean | "transparent">;
|
|
38
38
|
required: true;
|
|
39
39
|
};
|
|
40
|
+
maxWidth: NumberConstructor;
|
|
41
|
+
maxHeight: NumberConstructor;
|
|
42
|
+
minWidth: NumberConstructor;
|
|
43
|
+
minHeight: NumberConstructor;
|
|
40
44
|
resizable: BooleanConstructor;
|
|
41
45
|
onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
42
46
|
onAfterLeave: PropType<() => void>;
|
|
@@ -148,6 +152,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
152
|
type: PropType<boolean | "transparent">;
|
|
149
153
|
required: true;
|
|
150
154
|
};
|
|
155
|
+
maxWidth: NumberConstructor;
|
|
156
|
+
maxHeight: NumberConstructor;
|
|
157
|
+
minWidth: NumberConstructor;
|
|
158
|
+
minHeight: NumberConstructor;
|
|
151
159
|
resizable: BooleanConstructor;
|
|
152
160
|
onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
153
161
|
onAfterLeave: PropType<() => void>;
|
|
@@ -48,6 +48,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
48
48
|
type: [Boolean, String],
|
|
49
49
|
required: true
|
|
50
50
|
},
|
|
51
|
+
maxWidth: Number,
|
|
52
|
+
maxHeight: Number,
|
|
53
|
+
minWidth: Number,
|
|
54
|
+
minHeight: Number,
|
|
51
55
|
resizable: Boolean,
|
|
52
56
|
onClickoutside: Function,
|
|
53
57
|
onAfterLeave: Function,
|
|
@@ -74,9 +78,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
74
78
|
startPosition = isVertical.value ? e.clientY : e.clientX;
|
|
75
79
|
memoizedBodyStyleCursor = document.body.style.cursor;
|
|
76
80
|
document.body.style.cursor = isVertical.value ? 'ns-resize' : 'ew-resize';
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
document.body.addEventListener('mousemove', handleBodyMousemove);
|
|
82
|
+
document.body.addEventListener('mouseleave', handleBodyMouseleave);
|
|
83
|
+
document.body.addEventListener('mouseup', handleBodyMouseup);
|
|
80
84
|
};
|
|
81
85
|
const handleMouseenterResizeTrigger = () => {
|
|
82
86
|
if (hoverTimerId !== null) {
|
|
@@ -100,13 +104,36 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
100
104
|
isHoverOnResizeTriggerRef.value = false;
|
|
101
105
|
};
|
|
102
106
|
const { doUpdateHeight, doUpdateWidth } = UDrawer;
|
|
103
|
-
const
|
|
107
|
+
const regulateWidth = (size) => {
|
|
108
|
+
const { maxWidth } = props;
|
|
109
|
+
if (maxWidth && size > maxWidth) {
|
|
110
|
+
return maxWidth;
|
|
111
|
+
}
|
|
112
|
+
const { minWidth } = props;
|
|
113
|
+
if (minWidth && size < minWidth) {
|
|
114
|
+
return minWidth;
|
|
115
|
+
}
|
|
116
|
+
return size;
|
|
117
|
+
};
|
|
118
|
+
const regulateHeight = (size) => {
|
|
119
|
+
const { maxHeight } = props;
|
|
120
|
+
if (maxHeight && size > maxHeight) {
|
|
121
|
+
return maxHeight;
|
|
122
|
+
}
|
|
123
|
+
const { minHeight } = props;
|
|
124
|
+
if (minHeight && size < minHeight) {
|
|
125
|
+
return minHeight;
|
|
126
|
+
}
|
|
127
|
+
return size;
|
|
128
|
+
};
|
|
129
|
+
function handleBodyMousemove(e) {
|
|
104
130
|
var _a, _b;
|
|
105
131
|
if (isDraggingRef.value) {
|
|
106
132
|
if (isVertical.value) {
|
|
107
133
|
let height = ((_a = bodyRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
|
|
108
134
|
const increment = startPosition - e.clientY;
|
|
109
135
|
height += props.placement === 'bottom' ? increment : -increment;
|
|
136
|
+
height = regulateHeight(height);
|
|
110
137
|
doUpdateHeight(height);
|
|
111
138
|
startPosition = e.clientY;
|
|
112
139
|
}
|
|
@@ -114,19 +141,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
114
141
|
let width = ((_b = bodyRef.value) === null || _b === void 0 ? void 0 : _b.offsetWidth) || 0;
|
|
115
142
|
const increment = startPosition - e.clientX;
|
|
116
143
|
width += props.placement === 'right' ? increment : -increment;
|
|
144
|
+
width = regulateWidth(width);
|
|
117
145
|
doUpdateWidth(width);
|
|
118
146
|
startPosition = e.clientX;
|
|
119
147
|
}
|
|
120
148
|
}
|
|
121
|
-
}
|
|
149
|
+
}
|
|
122
150
|
const handleBodyMouseup = () => {
|
|
123
151
|
if (isDraggingRef.value) {
|
|
124
152
|
startPosition = 0;
|
|
125
153
|
isDraggingRef.value = false;
|
|
126
154
|
document.body.style.cursor = memoizedBodyStyleCursor;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
155
|
+
document.body.removeEventListener('mousemove', handleBodyMousemove);
|
|
156
|
+
document.body.removeEventListener('mouseup', handleBodyMouseup);
|
|
157
|
+
document.body.removeEventListener('mouseleave', handleBodyMouseleave);
|
|
130
158
|
}
|
|
131
159
|
};
|
|
132
160
|
const handleBodyMouseleave = handleBodyMouseup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.safeTopScrollbarProps = exports.USafeTopScrollbar = void 0;
|
|
7
|
+
var SafeTopScrollbar_1 = require("./src/SafeTopScrollbar");
|
|
8
|
+
Object.defineProperty(exports, "USafeTopScrollbar", { enumerable: true, get: function () { return __importDefault(SafeTopScrollbar_1).default; } });
|
|
9
|
+
Object.defineProperty(exports, "safeTopScrollbarProps", { enumerable: true, get: function () { return SafeTopScrollbar_1.safeTopScrollbarProps; } });
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
export interface ScrollTo {
|
|
4
|
+
(x: number, y: number): void;
|
|
5
|
+
(options: {
|
|
6
|
+
left?: number;
|
|
7
|
+
top?: number;
|
|
8
|
+
behavior?: ScrollBehavior;
|
|
9
|
+
}): void;
|
|
10
|
+
}
|
|
11
|
+
export type ScrollBy = ScrollTo;
|
|
12
|
+
export interface SafeTopScrollbarInst {
|
|
13
|
+
scrollTo: ScrollTo;
|
|
14
|
+
scrollBy: ScrollBy;
|
|
15
|
+
getScrollState: () => {
|
|
16
|
+
scrollHeight: number;
|
|
17
|
+
scrollTop: number;
|
|
18
|
+
clientHeight: number;
|
|
19
|
+
};
|
|
20
|
+
adjustScrollTop: (heightDiff: number) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const safeTopScrollbarProps: {
|
|
23
|
+
readonly trigger: PropType<"none" | "hover">;
|
|
24
|
+
readonly xScrollable: BooleanConstructor;
|
|
25
|
+
readonly onScroll: PropType<(e: Event) => void>;
|
|
26
|
+
readonly size: NumberConstructor;
|
|
27
|
+
readonly theme: PropType<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
28
|
+
height: string;
|
|
29
|
+
width: string;
|
|
30
|
+
borderRadius: string;
|
|
31
|
+
color: string;
|
|
32
|
+
colorHover: string;
|
|
33
|
+
railInsetHorizontalBottom: string;
|
|
34
|
+
railInsetHorizontalTop: string;
|
|
35
|
+
railInsetVerticalRight: string;
|
|
36
|
+
railInsetVerticalLeft: string;
|
|
37
|
+
railColor: string;
|
|
38
|
+
}, any>>;
|
|
39
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
40
|
+
height: string;
|
|
41
|
+
width: string;
|
|
42
|
+
borderRadius: string;
|
|
43
|
+
color: string;
|
|
44
|
+
colorHover: string;
|
|
45
|
+
railInsetHorizontalBottom: string;
|
|
46
|
+
railInsetHorizontalTop: string;
|
|
47
|
+
railInsetVerticalRight: string;
|
|
48
|
+
railInsetVerticalLeft: string;
|
|
49
|
+
railColor: string;
|
|
50
|
+
}, any>>>;
|
|
51
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
52
|
+
height: string;
|
|
53
|
+
width: string;
|
|
54
|
+
borderRadius: string;
|
|
55
|
+
color: string;
|
|
56
|
+
colorHover: string;
|
|
57
|
+
railInsetHorizontalBottom: string;
|
|
58
|
+
railInsetHorizontalTop: string;
|
|
59
|
+
railInsetVerticalRight: string;
|
|
60
|
+
railInsetVerticalLeft: string;
|
|
61
|
+
railColor: string;
|
|
62
|
+
}, any>>>;
|
|
63
|
+
};
|
|
64
|
+
export type SafeTopScrollbarProps = ExtractPublicPropTypes<typeof safeTopScrollbarProps>;
|
|
65
|
+
declare const SafeTopScrollbar: import("vue").DefineComponent<{
|
|
66
|
+
readonly trigger: PropType<"none" | "hover">;
|
|
67
|
+
readonly xScrollable: BooleanConstructor;
|
|
68
|
+
readonly onScroll: PropType<(e: Event) => void>;
|
|
69
|
+
readonly size: NumberConstructor;
|
|
70
|
+
readonly theme: PropType<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
71
|
+
height: string;
|
|
72
|
+
width: string;
|
|
73
|
+
borderRadius: string;
|
|
74
|
+
color: string;
|
|
75
|
+
colorHover: string;
|
|
76
|
+
railInsetHorizontalBottom: string;
|
|
77
|
+
railInsetHorizontalTop: string;
|
|
78
|
+
railInsetVerticalRight: string;
|
|
79
|
+
railInsetVerticalLeft: string;
|
|
80
|
+
railColor: string;
|
|
81
|
+
}, any>>;
|
|
82
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
83
|
+
height: string;
|
|
84
|
+
width: string;
|
|
85
|
+
borderRadius: string;
|
|
86
|
+
color: string;
|
|
87
|
+
colorHover: string;
|
|
88
|
+
railInsetHorizontalBottom: string;
|
|
89
|
+
railInsetHorizontalTop: string;
|
|
90
|
+
railInsetVerticalRight: string;
|
|
91
|
+
railInsetVerticalLeft: string;
|
|
92
|
+
railColor: string;
|
|
93
|
+
}, any>>>;
|
|
94
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
95
|
+
height: string;
|
|
96
|
+
width: string;
|
|
97
|
+
borderRadius: string;
|
|
98
|
+
color: string;
|
|
99
|
+
colorHover: string;
|
|
100
|
+
railInsetHorizontalBottom: string;
|
|
101
|
+
railInsetHorizontalTop: string;
|
|
102
|
+
railInsetVerticalRight: string;
|
|
103
|
+
railInsetVerticalLeft: string;
|
|
104
|
+
railColor: string;
|
|
105
|
+
}, any>>>;
|
|
106
|
+
}, {
|
|
107
|
+
scrollbarInstRef: import("vue").Ref<{
|
|
108
|
+
$el: HTMLElement;
|
|
109
|
+
containerRef: HTMLElement | null;
|
|
110
|
+
contentRef: HTMLElement | null;
|
|
111
|
+
containerScrollTop: number;
|
|
112
|
+
syncUnifiedContainer: () => void;
|
|
113
|
+
scrollTo: import("../../_internal/safe-top-scrollbar/src/SafeTopScrollbar").ScrollTo;
|
|
114
|
+
scrollBy: import("../../_internal/safe-top-scrollbar/src/SafeTopScrollbar").ScrollBy;
|
|
115
|
+
sync: () => void;
|
|
116
|
+
handleMouseEnterWrapper: () => void;
|
|
117
|
+
handleMouseLeaveWrapper: () => void;
|
|
118
|
+
getScrollState: () => {
|
|
119
|
+
scrollHeight: number;
|
|
120
|
+
scrollTop: number;
|
|
121
|
+
clientHeight: number;
|
|
122
|
+
};
|
|
123
|
+
adjustScrollTop: (heightDiff: number) => void;
|
|
124
|
+
} | null>;
|
|
125
|
+
scrollTo: ScrollTo;
|
|
126
|
+
scrollBy: ScrollBy;
|
|
127
|
+
getScrollState: () => {
|
|
128
|
+
scrollHeight: number;
|
|
129
|
+
scrollTop: number;
|
|
130
|
+
clientHeight: number;
|
|
131
|
+
};
|
|
132
|
+
adjustScrollTop: (heightDiff: number) => void;
|
|
133
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
134
|
+
readonly trigger: PropType<"none" | "hover">;
|
|
135
|
+
readonly xScrollable: BooleanConstructor;
|
|
136
|
+
readonly onScroll: PropType<(e: Event) => void>;
|
|
137
|
+
readonly size: NumberConstructor;
|
|
138
|
+
readonly theme: PropType<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
139
|
+
height: string;
|
|
140
|
+
width: string;
|
|
141
|
+
borderRadius: string;
|
|
142
|
+
color: string;
|
|
143
|
+
colorHover: string;
|
|
144
|
+
railInsetHorizontalBottom: string;
|
|
145
|
+
railInsetHorizontalTop: string;
|
|
146
|
+
railInsetVerticalRight: string;
|
|
147
|
+
railInsetVerticalLeft: string;
|
|
148
|
+
railColor: string;
|
|
149
|
+
}, any>>;
|
|
150
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
151
|
+
height: string;
|
|
152
|
+
width: string;
|
|
153
|
+
borderRadius: string;
|
|
154
|
+
color: string;
|
|
155
|
+
colorHover: string;
|
|
156
|
+
railInsetHorizontalBottom: string;
|
|
157
|
+
railInsetHorizontalTop: string;
|
|
158
|
+
railInsetVerticalRight: string;
|
|
159
|
+
railInsetVerticalLeft: string;
|
|
160
|
+
railColor: string;
|
|
161
|
+
}, any>>>;
|
|
162
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"SafeTopScrollbar", {
|
|
163
|
+
height: string;
|
|
164
|
+
width: string;
|
|
165
|
+
borderRadius: string;
|
|
166
|
+
color: string;
|
|
167
|
+
colorHover: string;
|
|
168
|
+
railInsetHorizontalBottom: string;
|
|
169
|
+
railInsetHorizontalTop: string;
|
|
170
|
+
railInsetVerticalRight: string;
|
|
171
|
+
railInsetVerticalLeft: string;
|
|
172
|
+
railColor: string;
|
|
173
|
+
}, any>>>;
|
|
174
|
+
}>>, {
|
|
175
|
+
readonly xScrollable: boolean;
|
|
176
|
+
}, {}>;
|
|
177
|
+
export default SafeTopScrollbar;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.safeTopScrollbarProps = void 0;
|
|
4
|
+
const vue_1 = require("vue");
|
|
5
|
+
const _internal_1 = require("../../_internal");
|
|
6
|
+
const _mixins_1 = require("../../_mixins");
|
|
7
|
+
exports.safeTopScrollbarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { trigger: String, xScrollable: Boolean, onScroll: Function, size: Number });
|
|
8
|
+
const SafeTopScrollbar = (0, vue_1.defineComponent)({
|
|
9
|
+
name: 'SafeTopScrollbar',
|
|
10
|
+
props: exports.safeTopScrollbarProps,
|
|
11
|
+
setup() {
|
|
12
|
+
const scrollbarInstRef = (0, vue_1.ref)(null);
|
|
13
|
+
const exposedMethods = {
|
|
14
|
+
scrollTo: (...args) => {
|
|
15
|
+
var _a;
|
|
16
|
+
(_a = scrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(args[0], args[1]);
|
|
17
|
+
},
|
|
18
|
+
scrollBy: (...args) => {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = scrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollBy(args[0], args[1]);
|
|
21
|
+
},
|
|
22
|
+
getScrollState: () => {
|
|
23
|
+
var _a;
|
|
24
|
+
return (((_a = scrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.getScrollState()) || {
|
|
25
|
+
scrollHeight: 0,
|
|
26
|
+
scrollTop: 0,
|
|
27
|
+
clientHeight: 0
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
adjustScrollTop: (heightDiff) => {
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = scrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.adjustScrollTop(heightDiff);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return Object.assign(Object.assign({}, exposedMethods), { scrollbarInstRef });
|
|
36
|
+
},
|
|
37
|
+
render() {
|
|
38
|
+
return ((0, vue_1.h)(_internal_1.USafeTopScrollbar, Object.assign({ ref: "scrollbarInstRef" }, this.$props), this.$slots));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.default = SafeTopScrollbar;
|
package/lib/themes/dark.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.darkTheme = void 0;
|
|
4
7
|
const common_1 = require("../_styles/common");
|
|
@@ -93,6 +96,7 @@ const styles_88 = require("../styles");
|
|
|
93
96
|
const styles_89 = require("../chat/styles");
|
|
94
97
|
const styles_90 = require("../modal-fullscreen/styles");
|
|
95
98
|
const styles_91 = require("../crop/styles");
|
|
99
|
+
const dark_1 = __importDefault(require("../_internal/safe-top-scrollbar/styles/dark"));
|
|
96
100
|
exports.darkTheme = {
|
|
97
101
|
name: 'dark',
|
|
98
102
|
common: common_1.commonDark,
|
|
@@ -160,6 +164,7 @@ exports.darkTheme = {
|
|
|
160
164
|
Result: styles_59.resultDark,
|
|
161
165
|
Row: styles_60.rowDark,
|
|
162
166
|
Scrollbar: styles_61.scrollbarDark,
|
|
167
|
+
SafeTopScrollbar: dark_1.default,
|
|
163
168
|
Select: styles_62.selectDark,
|
|
164
169
|
Skeleton: styles_63.skeletonDark,
|
|
165
170
|
Slider: styles_64.sliderDark,
|
package/lib/themes/light.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.lightTheme = void 0;
|
|
4
7
|
// The file is for internal usage, do not export it, since all the components
|
|
@@ -95,6 +98,7 @@ const styles_88 = require("../input-otp/styles");
|
|
|
95
98
|
const styles_89 = require("../chat/styles");
|
|
96
99
|
const styles_90 = require("../modal-fullscreen/styles");
|
|
97
100
|
const styles_91 = require("../crop/styles");
|
|
101
|
+
const light_1 = __importDefault(require("../_internal/safe-top-scrollbar/styles/light"));
|
|
98
102
|
exports.lightTheme = {
|
|
99
103
|
name: 'light',
|
|
100
104
|
common: common_1.commonLight,
|
|
@@ -162,6 +166,7 @@ exports.lightTheme = {
|
|
|
162
166
|
Row: styles_60.rowLight,
|
|
163
167
|
Result: styles_59.resultLight,
|
|
164
168
|
Scrollbar: styles_61.scrollbarLight,
|
|
169
|
+
SafeTopScrollbar: light_1.default,
|
|
165
170
|
Skeleton: styles_63.skeletonLight,
|
|
166
171
|
Select: styles_62.selectLight,
|
|
167
172
|
Slider: styles_64.sliderLight,
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.11.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/volar.d.ts
CHANGED
|
@@ -154,6 +154,7 @@ declare module 'vue' {
|
|
|
154
154
|
UModalFullscreen: typeof import('@uzum-tech/ui')['UModalFullscreen']
|
|
155
155
|
UCrop: typeof import('@uzum-tech/ui')['UCrop']
|
|
156
156
|
UTagGroup: typeof import('@uzum-tech/ui')['UTagGroup']
|
|
157
|
+
USafeTopScrollbar: typeof import('@uzum-tech/ui')['USafeTopScrollbar']
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
export {}
|
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": "1.
|
|
5
|
+
"version": "1.11.0",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -2231,7 +2231,14 @@
|
|
|
2231
2231
|
"name": "attachment-upload",
|
|
2232
2232
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/chat",
|
|
2233
2233
|
"type": "(file: File) => Promise<ChatAttachment>",
|
|
2234
|
-
"description": "Callback when a file is uploaded.",
|
|
2234
|
+
"description": "Callback when a file is uploaded. Allows you to upload files to your storage and return the file ID and URL. Invoked automatically when user selects files.",
|
|
2235
|
+
"default": "undefined"
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"name": "attachment-download",
|
|
2239
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/chat",
|
|
2240
|
+
"type": "(attachment: ChatAttachment) => Promise<void>",
|
|
2241
|
+
"description": "Callback when a file download button is clicked. Allows you to download files with custom headers (e.g., authorization). Prevents default download behavior when defined.",
|
|
2235
2242
|
"default": "undefined"
|
|
2236
2243
|
},
|
|
2237
2244
|
{
|
|
@@ -5268,6 +5275,21 @@
|
|
|
5268
5275
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/drawer",
|
|
5269
5276
|
"type": "boolean"
|
|
5270
5277
|
},
|
|
5278
|
+
{
|
|
5279
|
+
"name": "default-width",
|
|
5280
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/drawer",
|
|
5281
|
+
"type": "number | string",
|
|
5282
|
+
"description": "Default width of the drawer, works when placement is `left` and `right`.",
|
|
5283
|
+
"default": "616",
|
|
5284
|
+
"description-sections": {
|
|
5285
|
+
"since": "1.8.3"
|
|
5286
|
+
}
|
|
5287
|
+
},
|
|
5288
|
+
{
|
|
5289
|
+
"name": "default-height",
|
|
5290
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/drawer",
|
|
5291
|
+
"type": "number | string"
|
|
5292
|
+
},
|
|
5271
5293
|
{
|
|
5272
5294
|
"name": "drawer-style",
|
|
5273
5295
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/drawer",
|
|
@@ -12568,6 +12590,40 @@
|
|
|
12568
12590
|
]
|
|
12569
12591
|
}
|
|
12570
12592
|
},
|
|
12593
|
+
{
|
|
12594
|
+
"name": "USafeTopScrollbar",
|
|
12595
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/safe-top-scrollbar",
|
|
12596
|
+
"source": {
|
|
12597
|
+
"symbol": "USafeTopScrollbar"
|
|
12598
|
+
},
|
|
12599
|
+
"slots": [],
|
|
12600
|
+
"attributes": [],
|
|
12601
|
+
"props": [
|
|
12602
|
+
{
|
|
12603
|
+
"name": "trigger",
|
|
12604
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/safe-top-scrollbar",
|
|
12605
|
+
"type": "string"
|
|
12606
|
+
},
|
|
12607
|
+
{
|
|
12608
|
+
"name": "x-scrollable",
|
|
12609
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/safe-top-scrollbar",
|
|
12610
|
+
"type": "boolean"
|
|
12611
|
+
},
|
|
12612
|
+
{
|
|
12613
|
+
"name": "size",
|
|
12614
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/safe-top-scrollbar",
|
|
12615
|
+
"type": "number"
|
|
12616
|
+
}
|
|
12617
|
+
],
|
|
12618
|
+
"js": {
|
|
12619
|
+
"events": [
|
|
12620
|
+
{
|
|
12621
|
+
"name": "scroll",
|
|
12622
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/safe-top-scrollbar"
|
|
12623
|
+
}
|
|
12624
|
+
]
|
|
12625
|
+
}
|
|
12626
|
+
},
|
|
12571
12627
|
{
|
|
12572
12628
|
"name": "USelect",
|
|
12573
12629
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/select",
|