@uzum-tech/ui 1.8.2 → 1.9.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 +659 -115
- package/dist/index.prod.js +3 -3
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +119 -17
- package/es/_internal/scrollbar/src/Scrollbar.js +120 -67
- package/es/_internal/scrollbar/src/styles/index.cssr.js +32 -15
- package/es/_internal/scrollbar/styles/common.d.ts +7 -0
- package/es/_internal/scrollbar/styles/common.js +7 -0
- package/es/_internal/scrollbar/styles/light.d.ts +8 -0
- package/es/_internal/scrollbar/styles/light.js +3 -5
- package/es/_internal/select-menu/src/SelectMenu.d.ts +57 -1
- package/es/_internal/select-menu/styles/light.d.ts +8 -0
- package/es/_internal/selection/src/Selection.d.ts +3 -1
- package/es/_internal/selection/src/Selection.js +3 -1
- package/es/_utils/css/index.d.ts +1 -0
- package/es/_utils/css/index.js +1 -0
- package/es/_utils/css/rtl-inset.d.ts +1 -0
- package/es/_utils/css/rtl-inset.js +5 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +88 -0
- package/es/auto-complete/styles/light.d.ts +8 -0
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +168 -0
- package/es/cascader/src/CascaderMenu.d.ts +24 -0
- package/es/cascader/src/CascaderOption.d.ts +24 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +24 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +25 -1
- package/es/cascader/styles/light.d.ts +16 -0
- package/es/chat/src/Chat.d.ts +88 -0
- package/es/chat/src/ChatListItems.d.ts +104 -0
- package/es/chat/src/ChatMessages.d.ts +104 -0
- package/es/chat/styles/dark.d.ts +8 -0
- package/es/chat/styles/light.d.ts +8 -0
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/data-table/src/DataTable.d.ts +184 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +40 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +40 -0
- package/es/data-table/src/TableParts/Body.d.ts +41 -1
- package/es/data-table/src/TableParts/Header.d.ts +40 -0
- package/es/data-table/src/interface.d.ts +72 -0
- package/es/data-table/styles/light.d.ts +24 -0
- package/es/date-picker/src/DatePicker.d.ts +171 -3
- package/es/date-picker/src/panel/date.d.ts +25 -1
- package/es/date-picker/src/panel/daterange.d.ts +26 -2
- package/es/date-picker/src/panel/datetime.d.ts +25 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +26 -2
- package/es/date-picker/src/panel/panelMonth.d.ts +50 -2
- package/es/date-picker/src/panel/panelMonthContent.d.ts +25 -1
- package/es/date-picker/src/panel/panelYear.d.ts +50 -2
- package/es/date-picker/src/panel/panelYearContent.d.ts +25 -1
- package/es/date-picker/src/panel/use-calendar.d.ts +24 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +24 -0
- package/es/date-picker/styles/light.d.ts +16 -0
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/drawer/src/Drawer.d.ts +81 -1
- package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/es/drawer/src/DrawerContent.d.ts +8 -0
- package/es/drawer/styles/light.d.ts +8 -0
- package/es/dropdown/src/Dropdown.d.ts +1 -1
- package/es/infinite-scroll/index.d.ts +2 -0
- package/es/infinite-scroll/index.js +1 -0
- package/es/infinite-scroll/src/InfiniteScroll.d.ts +45 -0
- package/es/infinite-scroll/src/InfiniteScroll.js +78 -0
- package/es/layout/src/Layout.d.ts +112 -0
- package/es/layout/src/LayoutContent.d.ts +56 -0
- package/es/layout/src/LayoutFooter.d.ts +72 -0
- package/es/layout/src/LayoutHeader.d.ts +48 -0
- package/es/layout/src/LayoutSider.d.ts +56 -0
- package/es/layout/styles/light.d.ts +8 -0
- package/es/legacy-transfer/src/Transfer.d.ts +80 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +8 -0
- package/es/legacy-transfer/src/TransferList.d.ts +9 -1
- package/es/legacy-transfer/src/TransferListItem.d.ts +8 -0
- package/es/legacy-transfer/styles/light.d.ts +8 -0
- package/es/log/src/Log.d.ts +80 -0
- package/es/log/styles/light.d.ts +8 -0
- package/es/mention/src/Mention.d.ts +88 -0
- package/es/mention/styles/light.d.ts +8 -0
- package/es/menu/src/Menu.d.ts +1 -1
- package/es/modal/src/BodyWrapper.d.ts +9 -1
- package/es/modal/src/Modal.d.ts +73 -1
- package/es/modal/styles/light.d.ts +8 -0
- package/es/notification/src/NotificationContainer.d.ts +8 -0
- package/es/notification/src/NotificationProvider.d.ts +72 -0
- package/es/notification/styles/light.d.ts +8 -0
- package/es/pagination/src/Pagination.d.ts +176 -0
- package/es/pagination/styles/light.d.ts +16 -0
- package/es/popselect/src/Popselect.d.ts +88 -0
- package/es/popselect/src/PopselectPanel.d.ts +16 -0
- package/es/popselect/styles/light.d.ts +8 -0
- package/es/scrollbar/src/Scrollbar.d.ts +72 -0
- package/es/select/src/Select.d.ts +88 -0
- package/es/select/styles/light.d.ts +8 -0
- package/es/time-picker/src/Panel.d.ts +8 -0
- package/es/time-picker/src/TimePicker.d.ts +80 -0
- package/es/time-picker/styles/light.d.ts +8 -0
- package/es/transfer/src/Transfer.d.ts +80 -0
- package/es/transfer/src/TransferFilter.d.ts +8 -0
- package/es/transfer/src/TransferList.d.ts +9 -1
- package/es/transfer/src/TransferListItem.d.ts +8 -0
- package/es/transfer/styles/light.d.ts +8 -0
- package/es/tree/src/Tree.d.ts +82 -2
- package/es/tree/src/TreeNodeCheckbox.d.ts +8 -0
- package/es/tree/styles/light.d.ts +8 -0
- package/es/tree-select/src/TreeSelect.d.ts +89 -1
- package/es/tree-select/styles/light.d.ts +8 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +1 -0
- package/es/virtual-list/src/VirtualList.d.ts +146 -0
- package/es/virtual-list/src/VirtualList.js +103 -0
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +119 -17
- package/lib/_internal/scrollbar/src/Scrollbar.js +117 -64
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +32 -15
- package/lib/_internal/scrollbar/styles/common.d.ts +7 -0
- package/lib/_internal/scrollbar/styles/common.js +10 -0
- package/lib/_internal/scrollbar/styles/light.d.ts +8 -0
- package/lib/_internal/scrollbar/styles/light.js +3 -5
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +57 -1
- package/lib/_internal/select-menu/styles/light.d.ts +8 -0
- package/lib/_internal/selection/src/Selection.d.ts +3 -1
- package/lib/_internal/selection/src/Selection.js +3 -1
- package/lib/_utils/css/index.d.ts +1 -0
- package/lib/_utils/css/index.js +3 -1
- package/lib/_utils/css/rtl-inset.d.ts +1 -0
- package/lib/_utils/css/rtl-inset.js +8 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +88 -0
- package/lib/auto-complete/styles/light.d.ts +8 -0
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +168 -0
- package/lib/cascader/src/CascaderMenu.d.ts +24 -0
- package/lib/cascader/src/CascaderOption.d.ts +24 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +24 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +25 -1
- package/lib/cascader/styles/light.d.ts +16 -0
- package/lib/chat/src/Chat.d.ts +88 -0
- package/lib/chat/src/ChatListItems.d.ts +104 -0
- package/lib/chat/src/ChatMessages.d.ts +104 -0
- package/lib/chat/styles/dark.d.ts +8 -0
- package/lib/chat/styles/light.d.ts +8 -0
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/data-table/src/DataTable.d.ts +184 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +40 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +40 -0
- package/lib/data-table/src/TableParts/Body.d.ts +41 -1
- package/lib/data-table/src/TableParts/Header.d.ts +40 -0
- package/lib/data-table/src/interface.d.ts +72 -0
- package/lib/data-table/styles/light.d.ts +24 -0
- package/lib/date-picker/src/DatePicker.d.ts +171 -3
- package/lib/date-picker/src/panel/date.d.ts +25 -1
- package/lib/date-picker/src/panel/daterange.d.ts +26 -2
- package/lib/date-picker/src/panel/datetime.d.ts +25 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +26 -2
- package/lib/date-picker/src/panel/panelMonth.d.ts +50 -2
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +25 -1
- package/lib/date-picker/src/panel/panelYear.d.ts +50 -2
- package/lib/date-picker/src/panel/panelYearContent.d.ts +25 -1
- package/lib/date-picker/src/panel/use-calendar.d.ts +24 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +24 -0
- package/lib/date-picker/styles/light.d.ts +16 -0
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/drawer/src/Drawer.d.ts +81 -1
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/lib/drawer/src/DrawerContent.d.ts +8 -0
- package/lib/drawer/styles/light.d.ts +8 -0
- package/lib/dropdown/src/Dropdown.d.ts +1 -1
- package/lib/infinite-scroll/index.d.ts +2 -0
- package/lib/infinite-scroll/index.js +9 -0
- package/lib/infinite-scroll/src/InfiniteScroll.d.ts +45 -0
- package/lib/infinite-scroll/src/InfiniteScroll.js +81 -0
- package/lib/layout/src/Layout.d.ts +112 -0
- package/lib/layout/src/LayoutContent.d.ts +56 -0
- package/lib/layout/src/LayoutFooter.d.ts +72 -0
- package/lib/layout/src/LayoutHeader.d.ts +48 -0
- package/lib/layout/src/LayoutSider.d.ts +56 -0
- package/lib/layout/styles/light.d.ts +8 -0
- package/lib/legacy-transfer/src/Transfer.d.ts +80 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +8 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +9 -1
- package/lib/legacy-transfer/src/TransferListItem.d.ts +8 -0
- package/lib/legacy-transfer/styles/light.d.ts +8 -0
- package/lib/log/src/Log.d.ts +80 -0
- package/lib/log/styles/light.d.ts +8 -0
- package/lib/mention/src/Mention.d.ts +88 -0
- package/lib/mention/styles/light.d.ts +8 -0
- package/lib/menu/src/Menu.d.ts +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +9 -1
- package/lib/modal/src/Modal.d.ts +73 -1
- package/lib/modal/styles/light.d.ts +8 -0
- package/lib/notification/src/NotificationContainer.d.ts +8 -0
- package/lib/notification/src/NotificationProvider.d.ts +72 -0
- package/lib/notification/styles/light.d.ts +8 -0
- package/lib/pagination/src/Pagination.d.ts +176 -0
- package/lib/pagination/styles/light.d.ts +16 -0
- package/lib/popselect/src/Popselect.d.ts +88 -0
- package/lib/popselect/src/PopselectPanel.d.ts +16 -0
- package/lib/popselect/styles/light.d.ts +8 -0
- package/lib/scrollbar/src/Scrollbar.d.ts +72 -0
- package/lib/select/src/Select.d.ts +88 -0
- package/lib/select/styles/light.d.ts +8 -0
- package/lib/time-picker/src/Panel.d.ts +8 -0
- package/lib/time-picker/src/TimePicker.d.ts +80 -0
- package/lib/time-picker/styles/light.d.ts +8 -0
- package/lib/transfer/src/Transfer.d.ts +80 -0
- package/lib/transfer/src/TransferFilter.d.ts +8 -0
- package/lib/transfer/src/TransferList.d.ts +9 -1
- package/lib/transfer/src/TransferListItem.d.ts +8 -0
- package/lib/transfer/styles/light.d.ts +8 -0
- package/lib/tree/src/Tree.d.ts +82 -2
- package/lib/tree/src/TreeNodeCheckbox.d.ts +8 -0
- package/lib/tree/styles/light.d.ts +8 -0
- package/lib/tree-select/src/TreeSelect.d.ts +89 -1
- package/lib/tree-select/styles/light.d.ts +8 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +9 -0
- package/lib/virtual-list/src/VirtualList.d.ts +146 -0
- package/lib/virtual-list/src/VirtualList.js +106 -0
- package/package.json +2 -2
- package/volar.d.ts +1 -0
- package/web-types.json +30 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, PropType } from 'vue';
|
|
2
2
|
import type { ExtractInternalPropTypes, ExtractPublicPropTypes } from '../../../_utils';
|
|
3
3
|
export interface ScrollTo {
|
|
4
4
|
(x: number, y: number): void;
|
|
@@ -48,10 +48,6 @@ export interface ScrollbarInst extends ScrollbarInstMethods {
|
|
|
48
48
|
containerScrollTop: number;
|
|
49
49
|
}
|
|
50
50
|
declare const scrollbarProps: {
|
|
51
|
-
readonly size: {
|
|
52
|
-
readonly type: NumberConstructor;
|
|
53
|
-
readonly default: 5;
|
|
54
|
-
};
|
|
55
51
|
readonly duration: {
|
|
56
52
|
readonly type: NumberConstructor;
|
|
57
53
|
readonly default: 0;
|
|
@@ -71,7 +67,7 @@ declare const scrollbarProps: {
|
|
|
71
67
|
readonly content: PropType<() => HTMLElement | null | undefined>;
|
|
72
68
|
readonly containerClass: StringConstructor;
|
|
73
69
|
readonly containerStyle: PropType<string | CSSProperties>;
|
|
74
|
-
readonly contentClass:
|
|
70
|
+
readonly contentClass: PropType<string | Array<string | undefined>>;
|
|
75
71
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
76
72
|
readonly horizontalRailStyle: PropType<string | CSSProperties>;
|
|
77
73
|
readonly verticalRailStyle: PropType<string | CSSProperties>;
|
|
@@ -80,26 +76,54 @@ declare const scrollbarProps: {
|
|
|
80
76
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
81
77
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
82
78
|
readonly internalHoistYRail: BooleanConstructor;
|
|
79
|
+
readonly yPlacement: {
|
|
80
|
+
readonly type: PropType<"left" | "right">;
|
|
81
|
+
readonly default: "right";
|
|
82
|
+
};
|
|
83
|
+
readonly xPlacement: {
|
|
84
|
+
readonly type: PropType<"top" | "bottom">;
|
|
85
|
+
readonly default: "bottom";
|
|
86
|
+
};
|
|
83
87
|
readonly theme: PropType<import("../../../_mixins").Theme<"Scrollbar", {
|
|
88
|
+
height: string;
|
|
89
|
+
width: string;
|
|
90
|
+
borderRadius: string;
|
|
84
91
|
color: string;
|
|
85
92
|
colorHover: string;
|
|
93
|
+
railInsetHorizontalBottom: string;
|
|
94
|
+
railInsetHorizontalTop: string;
|
|
95
|
+
railInsetVerticalRight: string;
|
|
96
|
+
railInsetVerticalLeft: string;
|
|
97
|
+
railColor: string;
|
|
86
98
|
}, any>>;
|
|
87
99
|
readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
100
|
+
height: string;
|
|
101
|
+
width: string;
|
|
102
|
+
borderRadius: string;
|
|
88
103
|
color: string;
|
|
89
104
|
colorHover: string;
|
|
105
|
+
railInsetHorizontalBottom: string;
|
|
106
|
+
railInsetHorizontalTop: string;
|
|
107
|
+
railInsetVerticalRight: string;
|
|
108
|
+
railInsetVerticalLeft: string;
|
|
109
|
+
railColor: string;
|
|
90
110
|
}, any>>>;
|
|
91
111
|
readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
112
|
+
height: string;
|
|
113
|
+
width: string;
|
|
114
|
+
borderRadius: string;
|
|
92
115
|
color: string;
|
|
93
116
|
colorHover: string;
|
|
117
|
+
railInsetHorizontalBottom: string;
|
|
118
|
+
railInsetHorizontalTop: string;
|
|
119
|
+
railInsetVerticalRight: string;
|
|
120
|
+
railInsetVerticalLeft: string;
|
|
121
|
+
railColor: string;
|
|
94
122
|
}, any>>>;
|
|
95
123
|
};
|
|
96
124
|
export type ScrollbarProps = ExtractPublicPropTypes<typeof scrollbarProps>;
|
|
97
125
|
export type ScrollbarInternalProps = ExtractInternalPropTypes<typeof scrollbarProps>;
|
|
98
126
|
declare const Scrollbar: import("vue").DefineComponent<{
|
|
99
|
-
readonly size: {
|
|
100
|
-
readonly type: NumberConstructor;
|
|
101
|
-
readonly default: 5;
|
|
102
|
-
};
|
|
103
127
|
readonly duration: {
|
|
104
128
|
readonly type: NumberConstructor;
|
|
105
129
|
readonly default: 0;
|
|
@@ -119,7 +143,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
119
143
|
readonly content: PropType<() => HTMLElement | null | undefined>;
|
|
120
144
|
readonly containerClass: StringConstructor;
|
|
121
145
|
readonly containerStyle: PropType<string | CSSProperties>;
|
|
122
|
-
readonly contentClass:
|
|
146
|
+
readonly contentClass: PropType<string | Array<string | undefined>>;
|
|
123
147
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
124
148
|
readonly horizontalRailStyle: PropType<string | CSSProperties>;
|
|
125
149
|
readonly verticalRailStyle: PropType<string | CSSProperties>;
|
|
@@ -128,17 +152,49 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
128
152
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
129
153
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
130
154
|
readonly internalHoistYRail: BooleanConstructor;
|
|
155
|
+
readonly yPlacement: {
|
|
156
|
+
readonly type: PropType<"left" | "right">;
|
|
157
|
+
readonly default: "right";
|
|
158
|
+
};
|
|
159
|
+
readonly xPlacement: {
|
|
160
|
+
readonly type: PropType<"top" | "bottom">;
|
|
161
|
+
readonly default: "bottom";
|
|
162
|
+
};
|
|
131
163
|
readonly theme: PropType<import("../../../_mixins").Theme<"Scrollbar", {
|
|
164
|
+
height: string;
|
|
165
|
+
width: string;
|
|
166
|
+
borderRadius: string;
|
|
132
167
|
color: string;
|
|
133
168
|
colorHover: string;
|
|
169
|
+
railInsetHorizontalBottom: string;
|
|
170
|
+
railInsetHorizontalTop: string;
|
|
171
|
+
railInsetVerticalRight: string;
|
|
172
|
+
railInsetVerticalLeft: string;
|
|
173
|
+
railColor: string;
|
|
134
174
|
}, any>>;
|
|
135
175
|
readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
176
|
+
height: string;
|
|
177
|
+
width: string;
|
|
178
|
+
borderRadius: string;
|
|
136
179
|
color: string;
|
|
137
180
|
colorHover: string;
|
|
181
|
+
railInsetHorizontalBottom: string;
|
|
182
|
+
railInsetHorizontalTop: string;
|
|
183
|
+
railInsetVerticalRight: string;
|
|
184
|
+
railInsetVerticalLeft: string;
|
|
185
|
+
railColor: string;
|
|
138
186
|
}, any>>>;
|
|
139
187
|
readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
188
|
+
height: string;
|
|
189
|
+
width: string;
|
|
190
|
+
borderRadius: string;
|
|
140
191
|
color: string;
|
|
141
192
|
colorHover: string;
|
|
193
|
+
railInsetHorizontalBottom: string;
|
|
194
|
+
railInsetHorizontalTop: string;
|
|
195
|
+
railInsetVerticalRight: string;
|
|
196
|
+
railInsetVerticalLeft: string;
|
|
197
|
+
railColor: string;
|
|
142
198
|
}, any>>>;
|
|
143
199
|
}, {
|
|
144
200
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
@@ -170,6 +226,23 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
170
226
|
'--u-scrollbar-border-radius': string;
|
|
171
227
|
'--u-scrollbar-width': string;
|
|
172
228
|
'--u-scrollbar-height': string;
|
|
229
|
+
'--u-scrollbar-rail-top-horizontal-top': string;
|
|
230
|
+
'--u-scrollbar-rail-right-horizontal-top': string;
|
|
231
|
+
'--u-scrollbar-rail-bottom-horizontal-top': string;
|
|
232
|
+
'--u-scrollbar-rail-left-horizontal-top': string;
|
|
233
|
+
'--u-scrollbar-rail-top-horizontal-bottom': string;
|
|
234
|
+
'--u-scrollbar-rail-right-horizontal-bottom': string;
|
|
235
|
+
'--u-scrollbar-rail-bottom-horizontal-bottom': string;
|
|
236
|
+
'--u-scrollbar-rail-left-horizontal-bottom': string;
|
|
237
|
+
'--u-scrollbar-rail-top-vertical-right': string;
|
|
238
|
+
'--u-scrollbar-rail-right-vertical-right': string;
|
|
239
|
+
'--u-scrollbar-rail-bottom-vertical-right': string;
|
|
240
|
+
'--u-scrollbar-rail-left-vertical-right': string;
|
|
241
|
+
'--u-scrollbar-rail-top-vertical-left': string;
|
|
242
|
+
'--u-scrollbar-rail-right-vertical-left': string;
|
|
243
|
+
'--u-scrollbar-rail-bottom-vertical-left': string;
|
|
244
|
+
'--u-scrollbar-rail-left-vertical-left': string;
|
|
245
|
+
'--u-scrollbar-rail-color': string;
|
|
173
246
|
}> | undefined;
|
|
174
247
|
themeClass: import("vue").Ref<string> | undefined;
|
|
175
248
|
onRender: (() => void) | undefined;
|
|
@@ -180,10 +253,6 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
180
253
|
handleMouseEnterWrapper: () => void;
|
|
181
254
|
handleMouseLeaveWrapper: () => void;
|
|
182
255
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
183
|
-
readonly size: {
|
|
184
|
-
readonly type: NumberConstructor;
|
|
185
|
-
readonly default: 5;
|
|
186
|
-
};
|
|
187
256
|
readonly duration: {
|
|
188
257
|
readonly type: NumberConstructor;
|
|
189
258
|
readonly default: 0;
|
|
@@ -203,7 +272,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
203
272
|
readonly content: PropType<() => HTMLElement | null | undefined>;
|
|
204
273
|
readonly containerClass: StringConstructor;
|
|
205
274
|
readonly containerStyle: PropType<string | CSSProperties>;
|
|
206
|
-
readonly contentClass:
|
|
275
|
+
readonly contentClass: PropType<string | Array<string | undefined>>;
|
|
207
276
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
208
277
|
readonly horizontalRailStyle: PropType<string | CSSProperties>;
|
|
209
278
|
readonly verticalRailStyle: PropType<string | CSSProperties>;
|
|
@@ -212,20 +281,51 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
212
281
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
213
282
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
214
283
|
readonly internalHoistYRail: BooleanConstructor;
|
|
284
|
+
readonly yPlacement: {
|
|
285
|
+
readonly type: PropType<"left" | "right">;
|
|
286
|
+
readonly default: "right";
|
|
287
|
+
};
|
|
288
|
+
readonly xPlacement: {
|
|
289
|
+
readonly type: PropType<"top" | "bottom">;
|
|
290
|
+
readonly default: "bottom";
|
|
291
|
+
};
|
|
215
292
|
readonly theme: PropType<import("../../../_mixins").Theme<"Scrollbar", {
|
|
293
|
+
height: string;
|
|
294
|
+
width: string;
|
|
295
|
+
borderRadius: string;
|
|
216
296
|
color: string;
|
|
217
297
|
colorHover: string;
|
|
298
|
+
railInsetHorizontalBottom: string;
|
|
299
|
+
railInsetHorizontalTop: string;
|
|
300
|
+
railInsetVerticalRight: string;
|
|
301
|
+
railInsetVerticalLeft: string;
|
|
302
|
+
railColor: string;
|
|
218
303
|
}, any>>;
|
|
219
304
|
readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
305
|
+
height: string;
|
|
306
|
+
width: string;
|
|
307
|
+
borderRadius: string;
|
|
220
308
|
color: string;
|
|
221
309
|
colorHover: string;
|
|
310
|
+
railInsetHorizontalBottom: string;
|
|
311
|
+
railInsetHorizontalTop: string;
|
|
312
|
+
railInsetVerticalRight: string;
|
|
313
|
+
railInsetVerticalLeft: string;
|
|
314
|
+
railColor: string;
|
|
222
315
|
}, any>>>;
|
|
223
316
|
readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Scrollbar", {
|
|
317
|
+
height: string;
|
|
318
|
+
width: string;
|
|
319
|
+
borderRadius: string;
|
|
224
320
|
color: string;
|
|
225
321
|
colorHover: string;
|
|
322
|
+
railInsetHorizontalBottom: string;
|
|
323
|
+
railInsetHorizontalTop: string;
|
|
324
|
+
railInsetVerticalRight: string;
|
|
325
|
+
railInsetVerticalLeft: string;
|
|
326
|
+
railColor: string;
|
|
226
327
|
}, any>>>;
|
|
227
328
|
}>>, {
|
|
228
|
-
readonly size: number;
|
|
229
329
|
readonly duration: number;
|
|
230
330
|
readonly scrollable: boolean;
|
|
231
331
|
readonly xScrollable: boolean;
|
|
@@ -233,6 +333,8 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
233
333
|
readonly useUnifiedContainer: boolean;
|
|
234
334
|
readonly triggerDisplayManually: boolean;
|
|
235
335
|
readonly internalHoistYRail: boolean;
|
|
336
|
+
readonly yPlacement: "left" | "right";
|
|
337
|
+
readonly xPlacement: "top" | "bottom";
|
|
236
338
|
}, {}>;
|
|
237
339
|
type NativeScrollbarProps = Omit<HTMLAttributes, keyof ScrollbarInternalProps>;
|
|
238
340
|
type MergedProps = Partial<ScrollbarInternalProps & NativeScrollbarProps>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { VResizeObserver } from 'vueuc';
|
|
1
|
+
import { off, on } from 'evtd';
|
|
2
|
+
import { depx, getPadding, getPreciseEventTarget } from 'seemly';
|
|
4
3
|
import { useIsIos } from 'vooks';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { computed, defineComponent, Fragment, h, mergeProps, onBeforeUnmount, onMounted, ref, Transition, watchEffect } from 'vue';
|
|
5
|
+
import { VResizeObserver } from 'vueuc';
|
|
6
|
+
import { useConfig, useRtl, useTheme, useThemeClass } from '../../../_mixins';
|
|
7
|
+
import { rtlInset, useReactivated, Wrapper } from '../../../_utils';
|
|
8
8
|
import { scrollbarLight } from '../styles';
|
|
9
9
|
import style from './styles/index.cssr';
|
|
10
|
-
const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 5
|
|
13
|
-
}, duration: {
|
|
10
|
+
const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), { duration: {
|
|
14
11
|
type: Number,
|
|
15
12
|
default: 0
|
|
16
13
|
}, scrollable: {
|
|
@@ -21,7 +18,13 @@ const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), { size:
|
|
|
21
18
|
default: 'hover'
|
|
22
19
|
}, useUnifiedContainer: Boolean, triggerDisplayManually: Boolean,
|
|
23
20
|
// If container is set, resize observer won't not attached
|
|
24
|
-
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: String, contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, internalOnUpdateScrollLeft: Function, internalHoistYRail: Boolean
|
|
21
|
+
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, internalOnUpdateScrollLeft: Function, internalHoistYRail: Boolean, yPlacement: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'right'
|
|
24
|
+
}, xPlacement: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'bottom'
|
|
27
|
+
} });
|
|
25
28
|
const Scrollbar = defineComponent({
|
|
26
29
|
name: 'Scrollbar',
|
|
27
30
|
props: scrollbarProps,
|
|
@@ -55,6 +58,7 @@ const Scrollbar = defineComponent({
|
|
|
55
58
|
let memoMouseX = 0;
|
|
56
59
|
let memoMouseY = 0;
|
|
57
60
|
const isIos = useIsIos();
|
|
61
|
+
const themeRef = useTheme('Scrollbar', '-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
|
|
58
62
|
const yBarSizeRef = computed(() => {
|
|
59
63
|
const { value: containerHeight } = containerHeightRef;
|
|
60
64
|
const { value: contentHeight } = contentHeightRef;
|
|
@@ -65,7 +69,8 @@ const Scrollbar = defineComponent({
|
|
|
65
69
|
return 0;
|
|
66
70
|
}
|
|
67
71
|
else {
|
|
68
|
-
return Math.min(containerHeight, (yRailSize * containerHeight) / contentHeight +
|
|
72
|
+
return Math.min(containerHeight, (yRailSize * containerHeight) / contentHeight +
|
|
73
|
+
depx(themeRef.value.self.width) * 1.5);
|
|
69
74
|
}
|
|
70
75
|
});
|
|
71
76
|
const yBarSizePxRef = computed(() => {
|
|
@@ -81,7 +86,8 @@ const Scrollbar = defineComponent({
|
|
|
81
86
|
return 0;
|
|
82
87
|
}
|
|
83
88
|
else {
|
|
84
|
-
return (xRailSize * containerWidth) / contentWidth +
|
|
89
|
+
return ((xRailSize * containerWidth) / contentWidth +
|
|
90
|
+
depx(themeRef.value.self.height) * 1.5);
|
|
85
91
|
}
|
|
86
92
|
});
|
|
87
93
|
const xBarSizePxRef = computed(() => {
|
|
@@ -99,8 +105,9 @@ const Scrollbar = defineComponent({
|
|
|
99
105
|
}
|
|
100
106
|
else {
|
|
101
107
|
const heightDiff = contentHeight - containerHeight;
|
|
102
|
-
if (!heightDiff)
|
|
108
|
+
if (!heightDiff) {
|
|
103
109
|
return 0;
|
|
110
|
+
}
|
|
104
111
|
return ((containerScrollTop / heightDiff) * (yRailSize - yBarSizeRef.value));
|
|
105
112
|
}
|
|
106
113
|
});
|
|
@@ -119,8 +126,9 @@ const Scrollbar = defineComponent({
|
|
|
119
126
|
}
|
|
120
127
|
else {
|
|
121
128
|
const widthDiff = contentWidth - containerWidth;
|
|
122
|
-
if (!widthDiff)
|
|
129
|
+
if (!widthDiff) {
|
|
123
130
|
return 0;
|
|
131
|
+
}
|
|
124
132
|
return ((containerScrollLeft / widthDiff) * (xRailSize - xBarSizeRef.value));
|
|
125
133
|
}
|
|
126
134
|
});
|
|
@@ -151,43 +159,22 @@ const Scrollbar = defineComponent({
|
|
|
151
159
|
});
|
|
152
160
|
const mergedContainerRef = computed(() => {
|
|
153
161
|
const { container } = props;
|
|
154
|
-
if (container)
|
|
162
|
+
if (container) {
|
|
155
163
|
return container();
|
|
164
|
+
}
|
|
156
165
|
return containerRef.value;
|
|
157
166
|
});
|
|
158
167
|
const mergedContentRef = computed(() => {
|
|
159
168
|
const { content } = props;
|
|
160
|
-
if (content)
|
|
169
|
+
if (content) {
|
|
161
170
|
return content();
|
|
162
|
-
return contentRef.value;
|
|
163
|
-
});
|
|
164
|
-
const activateState = useReactivated(() => {
|
|
165
|
-
// Only restore for builtin container & content
|
|
166
|
-
if (!props.container) {
|
|
167
|
-
// remount
|
|
168
|
-
scrollTo({
|
|
169
|
-
top: containerScrollTopRef.value,
|
|
170
|
-
left: containerScrollLeftRef.value
|
|
171
|
-
});
|
|
172
171
|
}
|
|
172
|
+
return contentRef.value;
|
|
173
173
|
});
|
|
174
|
-
// methods
|
|
175
|
-
const handleContentResize = () => {
|
|
176
|
-
if (activateState.isDeactivated)
|
|
177
|
-
return;
|
|
178
|
-
sync();
|
|
179
|
-
};
|
|
180
|
-
const handleContainerResize = (e) => {
|
|
181
|
-
if (activateState.isDeactivated)
|
|
182
|
-
return;
|
|
183
|
-
const { onResize } = props;
|
|
184
|
-
if (onResize)
|
|
185
|
-
onResize(e);
|
|
186
|
-
sync();
|
|
187
|
-
};
|
|
188
174
|
const scrollTo = (options, y) => {
|
|
189
|
-
if (!props.scrollable)
|
|
175
|
+
if (!props.scrollable) {
|
|
190
176
|
return;
|
|
177
|
+
}
|
|
191
178
|
if (typeof options === 'number') {
|
|
192
179
|
scrollToPosition(options, y !== null && y !== void 0 ? y : 0, 0, false, 'auto');
|
|
193
180
|
return;
|
|
@@ -209,12 +196,41 @@ const Scrollbar = defineComponent({
|
|
|
209
196
|
scrollToPosition(0, 0, 0, false, behavior);
|
|
210
197
|
}
|
|
211
198
|
};
|
|
199
|
+
const activateState = useReactivated(() => {
|
|
200
|
+
// Only restore for builtin container & content
|
|
201
|
+
if (!props.container) {
|
|
202
|
+
// remount
|
|
203
|
+
scrollTo({
|
|
204
|
+
top: containerScrollTopRef.value,
|
|
205
|
+
left: containerScrollLeftRef.value
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
// methods
|
|
210
|
+
const handleContentResize = () => {
|
|
211
|
+
if (activateState.isDeactivated) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
sync();
|
|
215
|
+
};
|
|
216
|
+
const handleContainerResize = (e) => {
|
|
217
|
+
if (activateState.isDeactivated) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const { onResize } = props;
|
|
221
|
+
if (onResize) {
|
|
222
|
+
onResize(e);
|
|
223
|
+
}
|
|
224
|
+
sync();
|
|
225
|
+
};
|
|
212
226
|
const scrollBy = (options, y) => {
|
|
213
|
-
if (!props.scrollable)
|
|
227
|
+
if (!props.scrollable) {
|
|
214
228
|
return;
|
|
229
|
+
}
|
|
215
230
|
const { value: container } = mergedContainerRef;
|
|
216
|
-
if (!container)
|
|
231
|
+
if (!container) {
|
|
217
232
|
return;
|
|
233
|
+
}
|
|
218
234
|
if (typeof options === 'object') {
|
|
219
235
|
container.scrollBy(options);
|
|
220
236
|
}
|
|
@@ -224,8 +240,9 @@ const Scrollbar = defineComponent({
|
|
|
224
240
|
};
|
|
225
241
|
function scrollToPosition(left, top, elSize, debounce, behavior) {
|
|
226
242
|
const { value: container } = mergedContainerRef;
|
|
227
|
-
if (!container)
|
|
243
|
+
if (!container) {
|
|
228
244
|
return;
|
|
245
|
+
}
|
|
229
246
|
if (debounce) {
|
|
230
247
|
const { scrollTop, offsetHeight } = container;
|
|
231
248
|
if (top > scrollTop) {
|
|
@@ -290,8 +307,9 @@ const Scrollbar = defineComponent({
|
|
|
290
307
|
}
|
|
291
308
|
function handleScroll(e) {
|
|
292
309
|
const { onScroll } = props;
|
|
293
|
-
if (onScroll)
|
|
310
|
+
if (onScroll) {
|
|
294
311
|
onScroll(e);
|
|
312
|
+
}
|
|
295
313
|
syncScrollState();
|
|
296
314
|
}
|
|
297
315
|
function syncScrollState() {
|
|
@@ -350,8 +368,9 @@ const Scrollbar = defineComponent({
|
|
|
350
368
|
}
|
|
351
369
|
}
|
|
352
370
|
function sync() {
|
|
353
|
-
if (!props.scrollable)
|
|
371
|
+
if (!props.scrollable) {
|
|
354
372
|
return;
|
|
373
|
+
}
|
|
355
374
|
if (props.useUnifiedContainer) {
|
|
356
375
|
syncUnifiedContainer();
|
|
357
376
|
}
|
|
@@ -376,8 +395,9 @@ const Scrollbar = defineComponent({
|
|
|
376
395
|
: e.clientX;
|
|
377
396
|
}
|
|
378
397
|
function handleXScrollMouseMove(e) {
|
|
379
|
-
if (!xBarPressed)
|
|
398
|
+
if (!xBarPressed) {
|
|
380
399
|
return;
|
|
400
|
+
}
|
|
381
401
|
if (xBarVanishTimerId !== undefined) {
|
|
382
402
|
window.clearTimeout(xBarVanishTimerId);
|
|
383
403
|
}
|
|
@@ -387,8 +407,9 @@ const Scrollbar = defineComponent({
|
|
|
387
407
|
const { value: containerWidth } = containerWidthRef;
|
|
388
408
|
const { value: contentWidth } = contentWidthRef;
|
|
389
409
|
const { value: xBarSize } = xBarSizeRef;
|
|
390
|
-
if (containerWidth === null || contentWidth === null)
|
|
410
|
+
if (containerWidth === null || contentWidth === null) {
|
|
391
411
|
return;
|
|
412
|
+
}
|
|
392
413
|
const dX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value)
|
|
393
414
|
? window.innerWidth - e.clientX - memoMouseX
|
|
394
415
|
: e.clientX - memoMouseX;
|
|
@@ -401,8 +422,9 @@ const Scrollbar = defineComponent({
|
|
|
401
422
|
if (container) {
|
|
402
423
|
container.scrollLeft = toScrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);
|
|
403
424
|
const { internalOnUpdateScrollLeft } = props;
|
|
404
|
-
if (internalOnUpdateScrollLeft)
|
|
425
|
+
if (internalOnUpdateScrollLeft) {
|
|
405
426
|
internalOnUpdateScrollLeft(toScrollLeft);
|
|
427
|
+
}
|
|
406
428
|
}
|
|
407
429
|
}
|
|
408
430
|
function handleXScrollMouseUp(e) {
|
|
@@ -426,8 +448,9 @@ const Scrollbar = defineComponent({
|
|
|
426
448
|
memoMouseY = e.clientY;
|
|
427
449
|
}
|
|
428
450
|
function handleYScrollMouseMove(e) {
|
|
429
|
-
if (!yBarPressed)
|
|
451
|
+
if (!yBarPressed) {
|
|
430
452
|
return;
|
|
453
|
+
}
|
|
431
454
|
if (xBarVanishTimerId !== undefined) {
|
|
432
455
|
window.clearTimeout(xBarVanishTimerId);
|
|
433
456
|
}
|
|
@@ -437,8 +460,9 @@ const Scrollbar = defineComponent({
|
|
|
437
460
|
const { value: containerHeight } = containerHeightRef;
|
|
438
461
|
const { value: contentHeight } = contentHeightRef;
|
|
439
462
|
const { value: yBarSize } = yBarSizeRef;
|
|
440
|
-
if (containerHeight === null || contentHeight === null)
|
|
463
|
+
if (containerHeight === null || contentHeight === null) {
|
|
441
464
|
return;
|
|
465
|
+
}
|
|
442
466
|
const dY = e.clientY - memoMouseY;
|
|
443
467
|
const dScrollTop = (dY * (contentHeight - containerHeight)) / (containerHeight - yBarSize);
|
|
444
468
|
const toScrollTopUpperBound = contentHeight - containerHeight;
|
|
@@ -493,8 +517,9 @@ const Scrollbar = defineComponent({
|
|
|
493
517
|
// if you pass inner to scrollbar, you may use a ref inside component
|
|
494
518
|
// however, when scrollbar is mounted, ref is not ready at component
|
|
495
519
|
// you need to init by yourself
|
|
496
|
-
if (props.container)
|
|
520
|
+
if (props.container) {
|
|
497
521
|
return;
|
|
522
|
+
}
|
|
498
523
|
sync();
|
|
499
524
|
});
|
|
500
525
|
onBeforeUnmount(() => {
|
|
@@ -507,16 +532,40 @@ const Scrollbar = defineComponent({
|
|
|
507
532
|
off('mousemove', window, handleYScrollMouseMove, true);
|
|
508
533
|
off('mouseup', window, handleYScrollMouseUp, true);
|
|
509
534
|
});
|
|
510
|
-
const themeRef = useTheme('Scrollbar', '-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
|
|
511
535
|
const cssVarsRef = computed(() => {
|
|
512
|
-
const { common: { cubicBezierEaseInOut
|
|
536
|
+
const { common: { cubicBezierEaseInOut }, self: { color, colorHover, height, width, borderRadius, railInsetHorizontalTop, railInsetHorizontalBottom, railInsetVerticalRight, railInsetVerticalLeft, railColor } } = themeRef.value;
|
|
537
|
+
const { top: railTopHorizontalTop, right: railRightHorizontalTop, bottom: railBottomHorizontalTop, left: railLeftHorizontalTop } = getPadding(railInsetHorizontalTop);
|
|
538
|
+
const { top: railTopHorizontalBottom, right: railRightHorizontalBottom, bottom: railBottomHorizontalBottom, left: railLeftHorizontalBottom } = getPadding(railInsetHorizontalBottom);
|
|
539
|
+
const { top: railTopVerticalRight, right: railRightVerticalRight, bottom: railBottomVerticalRight, left: railLeftVerticalRight } = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value)
|
|
540
|
+
? rtlInset(railInsetVerticalRight)
|
|
541
|
+
: railInsetVerticalRight);
|
|
542
|
+
const { top: railTopVerticalLeft, right: railRightVerticalLeft, bottom: railBottomVerticalLeft, left: railLeftVerticalLeft } = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value)
|
|
543
|
+
? rtlInset(railInsetVerticalLeft)
|
|
544
|
+
: railInsetVerticalLeft);
|
|
513
545
|
return {
|
|
514
546
|
'--u-scrollbar-bezier': cubicBezierEaseInOut,
|
|
515
547
|
'--u-scrollbar-color': color,
|
|
516
548
|
'--u-scrollbar-color-hover': colorHover,
|
|
517
|
-
'--u-scrollbar-border-radius':
|
|
518
|
-
'--u-scrollbar-width':
|
|
519
|
-
'--u-scrollbar-height':
|
|
549
|
+
'--u-scrollbar-border-radius': borderRadius,
|
|
550
|
+
'--u-scrollbar-width': width,
|
|
551
|
+
'--u-scrollbar-height': height,
|
|
552
|
+
'--u-scrollbar-rail-top-horizontal-top': railTopHorizontalTop,
|
|
553
|
+
'--u-scrollbar-rail-right-horizontal-top': railRightHorizontalTop,
|
|
554
|
+
'--u-scrollbar-rail-bottom-horizontal-top': railBottomHorizontalTop,
|
|
555
|
+
'--u-scrollbar-rail-left-horizontal-top': railLeftHorizontalTop,
|
|
556
|
+
'--u-scrollbar-rail-top-horizontal-bottom': railTopHorizontalBottom,
|
|
557
|
+
'--u-scrollbar-rail-right-horizontal-bottom': railRightHorizontalBottom,
|
|
558
|
+
'--u-scrollbar-rail-bottom-horizontal-bottom': railBottomHorizontalBottom,
|
|
559
|
+
'--u-scrollbar-rail-left-horizontal-bottom': railLeftHorizontalBottom,
|
|
560
|
+
'--u-scrollbar-rail-top-vertical-right': railTopVerticalRight,
|
|
561
|
+
'--u-scrollbar-rail-right-vertical-right': railRightVerticalRight,
|
|
562
|
+
'--u-scrollbar-rail-bottom-vertical-right': railBottomVerticalRight,
|
|
563
|
+
'--u-scrollbar-rail-left-vertical-right': railLeftVerticalRight,
|
|
564
|
+
'--u-scrollbar-rail-top-vertical-left': railTopVerticalLeft,
|
|
565
|
+
'--u-scrollbar-rail-right-vertical-left': railRightVerticalLeft,
|
|
566
|
+
'--u-scrollbar-rail-bottom-vertical-left': railBottomVerticalLeft,
|
|
567
|
+
'--u-scrollbar-rail-left-vertical-left': railLeftVerticalLeft,
|
|
568
|
+
'--u-scrollbar-rail-color': railColor
|
|
520
569
|
};
|
|
521
570
|
});
|
|
522
571
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -543,15 +592,18 @@ const Scrollbar = defineComponent({
|
|
|
543
592
|
},
|
|
544
593
|
render() {
|
|
545
594
|
var _a;
|
|
546
|
-
const { $slots, mergedClsPrefix, triggerDisplayManually, rtlEnabled, internalHoistYRail } = this;
|
|
547
|
-
if (!this.scrollable)
|
|
595
|
+
const { $slots, mergedClsPrefix, triggerDisplayManually, rtlEnabled, internalHoistYRail, yPlacement, xPlacement, xScrollable } = this;
|
|
596
|
+
if (!this.scrollable) {
|
|
548
597
|
return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
|
|
598
|
+
}
|
|
549
599
|
const triggerIsNone = this.trigger === 'none';
|
|
550
|
-
const createYRail = (style) => {
|
|
600
|
+
const createYRail = (className, style) => {
|
|
551
601
|
return (h("div", { ref: "yRailRef", class: [
|
|
552
602
|
`${mergedClsPrefix}-scrollbar-rail`,
|
|
553
|
-
`${mergedClsPrefix}-scrollbar-rail--vertical
|
|
554
|
-
|
|
603
|
+
`${mergedClsPrefix}-scrollbar-rail--vertical`,
|
|
604
|
+
`${mergedClsPrefix}-scrollbar-rail--vertical--${yPlacement}`,
|
|
605
|
+
className
|
|
606
|
+
], "data-scrollbar-rail": true, style: [style || '', this.verticalRailStyle], "aria-hidden": true }, h((triggerIsNone ? Wrapper : Transition), triggerIsNone ? null : { name: 'fade-in-transition' }, {
|
|
555
607
|
default: () => this.needYBar && this.isShowYBar && !this.isIos ? (h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: {
|
|
556
608
|
height: this.yBarSizePx,
|
|
557
609
|
top: this.yBarTopPx
|
|
@@ -592,10 +644,11 @@ const Scrollbar = defineComponent({
|
|
|
592
644
|
this.contentClass
|
|
593
645
|
] }, $slots))
|
|
594
646
|
}))),
|
|
595
|
-
internalHoistYRail ? null : createYRail(undefined),
|
|
596
|
-
|
|
647
|
+
internalHoistYRail ? null : createYRail(undefined, undefined),
|
|
648
|
+
xScrollable && (h("div", { ref: "xRailRef", class: [
|
|
597
649
|
`${mergedClsPrefix}-scrollbar-rail`,
|
|
598
|
-
`${mergedClsPrefix}-scrollbar-rail--horizontal
|
|
650
|
+
`${mergedClsPrefix}-scrollbar-rail--horizontal`,
|
|
651
|
+
`${mergedClsPrefix}-scrollbar-rail--horizontal--${xPlacement}`
|
|
599
652
|
], style: this.horizontalRailStyle, "data-scrollbar-rail": true, "aria-hidden": true }, h((triggerIsNone ? Wrapper : Transition), triggerIsNone ? null : { name: 'fade-in-transition' }, {
|
|
600
653
|
default: () => this.needXBar && this.isShowXBar && !this.isIos ? (h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: {
|
|
601
654
|
width: this.xBarSizePx,
|
|
@@ -611,7 +664,7 @@ const Scrollbar = defineComponent({
|
|
|
611
664
|
if (internalHoistYRail) {
|
|
612
665
|
return (h(Fragment, null,
|
|
613
666
|
scrollbarNode,
|
|
614
|
-
createYRail(this.cssVars)));
|
|
667
|
+
createYRail(this.themeClass, this.cssVars)));
|
|
615
668
|
}
|
|
616
669
|
else {
|
|
617
670
|
return scrollbarNode;
|