bkui-vue 2.0.1-beta.60 → 2.0.1-beta.60.fix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -15
- package/dist/index.cjs.js +59 -59
- package/dist/index.esm.js +18048 -18492
- package/dist/index.umd.js +60 -60
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +0 -130
- package/lib/affix/affix.variable.css +1 -262
- package/lib/alert/alert.css +3 -133
- package/lib/alert/alert.d.ts +7 -0
- package/lib/alert/alert.variable.css +1 -262
- package/lib/alert/index.d.ts +15 -0
- package/lib/alert/index.js +6 -6
- package/lib/backtop/backtop.css +3 -133
- package/lib/backtop/backtop.variable.css +4 -395
- package/lib/badge/badge.css +26 -156
- package/lib/badge/badge.variable.css +1 -262
- package/lib/breadcrumb/breadcrumb.css +5 -135
- package/lib/breadcrumb/breadcrumb.variable.css +6 -397
- package/lib/button/button.css +143 -273
- package/lib/button/button.variable.css +1 -262
- package/lib/card/card.css +4 -134
- package/lib/card/card.variable.css +5 -396
- package/lib/cascader/cascader.css +23 -153
- package/lib/cascader/cascader.variable.css +24 -415
- package/lib/cascader/index.js +1 -0
- package/lib/checkbox/checkbox-group.d.ts +16 -0
- package/lib/checkbox/checkbox.css +9 -147
- package/lib/checkbox/checkbox.d.ts +0 -32
- package/lib/checkbox/checkbox.less +0 -12
- package/lib/checkbox/checkbox.variable.css +1 -270
- package/lib/checkbox/index.d.ts +11 -46
- package/lib/checkbox/index.js +4 -9
- package/lib/code-diff/code-diff.css +0 -130
- package/lib/code-diff/code-diff.variable.css +1 -262
- package/lib/collapse/collapse.css +1 -131
- package/lib/collapse/collapse.variable.css +1 -262
- package/lib/collapse-transition/collapse-transition.css +0 -130
- package/lib/collapse-transition/collapse-transition.variable.css +1 -262
- package/lib/color-picker/color-picker.css +0 -130
- package/lib/color-picker/color-picker.variable.css +1 -262
- package/lib/config-provider/config-provider.css +0 -130
- package/lib/config-provider/config-provider.variable.css +1 -262
- package/lib/container/container.css +0 -130
- package/lib/container/container.variable.css +1 -392
- package/lib/date-picker/date-picker.css +17 -147
- package/lib/date-picker/date-picker.d.ts +9 -0
- package/lib/date-picker/date-picker.variable.css +1 -262
- package/lib/date-picker/index.d.ts +19 -0
- package/lib/date-picker/index.js +17 -29
- package/lib/date-picker/panel/time-range.d.ts +9 -0
- package/lib/date-picker/panel/time.d.ts +10 -1
- package/lib/date-picker/props.d.ts +4 -0
- package/lib/date-picker/time-picker.d.ts +9 -0
- package/lib/dialog/dialog.css +8 -138
- package/lib/dialog/dialog.d.ts +5 -16
- package/lib/dialog/dialog.variable.css +9 -400
- package/lib/dialog/index.d.ts +11 -34
- package/lib/dialog/props.d.ts +2 -7
- package/lib/directives/index.js +6 -12
- package/lib/divider/divider.css +3 -133
- package/lib/divider/divider.variable.css +1 -262
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +1 -1
- package/lib/dropdown/dropdown.css +0 -130
- package/lib/dropdown/dropdown.variable.css +1 -392
- package/lib/dropdown/index.d.ts +2 -2
- package/lib/exception/exception.css +0 -130
- package/lib/exception/exception.variable.css +1 -262
- package/lib/fixed-navbar/fixed-navbar.css +4 -134
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -262
- package/lib/form/form-item.d.ts +18 -6
- package/lib/form/form.css +0 -130
- package/lib/form/form.variable.css +1 -262
- package/lib/form/index.d.ts +13 -6
- package/lib/form/index.js +6 -8
- package/lib/image/image-viewer.css +0 -130
- package/lib/image/image-viewer.variable.css +1 -262
- package/lib/image/image.css +0 -130
- package/lib/image/image.variable.css +1 -392
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +5 -3
- package/lib/info-box/info-box.css +4 -134
- package/lib/info-box/info-box.variable.css +1 -262
- package/lib/input/index.js +9 -36
- package/lib/input/input.css +72 -202
- package/lib/input/input.variable.css +73 -464
- package/lib/link/link.css +16 -146
- package/lib/link/link.variable.css +1 -262
- package/lib/loading/loading.css +16 -146
- package/lib/loading/loading.variable.css +17 -408
- package/lib/menu/menu.css +18 -148
- package/lib/menu/menu.variable.css +19 -410
- package/lib/menu/submenu.css +0 -130
- package/lib/menu/submenu.variable.css +1 -262
- package/lib/message/message.css +22 -153
- package/lib/message/message.less +2 -3
- package/lib/message/message.variable.css +2 -264
- package/lib/modal/index.d.ts +13 -41
- package/lib/modal/index.js +18 -33
- package/lib/modal/modal.css +4 -134
- package/lib/modal/modal.d.ts +5 -16
- package/lib/modal/modal.variable.css +5 -396
- package/lib/modal/props.mixin.d.ts +2 -7
- package/lib/navigation/navigation.css +2 -132
- package/lib/navigation/navigation.variable.css +1 -262
- package/lib/notify/notify.css +7 -137
- package/lib/notify/notify.variable.css +1 -262
- package/lib/overflow-title/components/overflow-title.d.ts +7 -0
- package/lib/overflow-title/index.d.ts +15 -0
- package/lib/overflow-title/index.js +1 -0
- package/lib/overflow-title/props.d.ts +3 -0
- package/lib/pagination/index.d.ts +19 -0
- package/lib/pagination/index.js +9 -47
- package/lib/pagination/pagination.css +9 -139
- package/lib/pagination/pagination.d.ts +13 -0
- package/lib/pagination/pagination.less +13 -14
- package/lib/pagination/pagination.variable.css +9 -270
- package/lib/pop-confirm/index.d.ts +32 -0
- package/lib/pop-confirm/index.js +18 -16
- package/lib/pop-confirm/pop-confirm.css +1 -133
- package/lib/pop-confirm/pop-confirm.d.ts +14 -0
- package/lib/pop-confirm/pop-confirm.less +1 -3
- package/lib/pop-confirm/pop-confirm.variable.css +2 -265
- package/lib/pop-confirm/props.d.ts +7 -1
- package/lib/popover/popover.css +0 -130
- package/lib/popover/popover.variable.css +1 -262
- package/lib/process/process.css +13 -143
- package/lib/process/process.variable.css +1 -262
- package/lib/progress/progress.css +4 -134
- package/lib/progress/progress.variable.css +5 -396
- package/lib/radio/index.d.ts +21 -21
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.css +42 -172
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.variable.css +1 -262
- package/lib/rate/rate.css +0 -130
- package/lib/rate/rate.variable.css +1 -262
- package/lib/resize-layout/resize-layout.css +0 -130
- package/lib/resize-layout/resize-layout.variable.css +1 -262
- package/lib/scrollbar/index.d.ts +13 -133
- package/lib/scrollbar/index.js +18444 -1343
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +2 -0
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/index.d.ts +241 -0
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +1 -0
- package/lib/scrollbar/scrollbar.css +75 -0
- package/lib/scrollbar/scrollbar.less +94 -0
- package/lib/{styles/themes/themes.css → scrollbar/scrollbar.variable.css} +76 -2
- package/lib/search-select/index.d.ts +72 -40
- package/lib/search-select/index.js +67 -85
- package/lib/search-select/input.d.ts +4 -5
- package/lib/search-select/search-select.css +33 -163
- package/lib/search-select/search-select.d.ts +39 -15
- package/lib/search-select/search-select.variable.css +34 -425
- package/lib/search-select/selected.d.ts +9 -11
- package/lib/search-select/utils.d.ts +3 -3
- package/lib/select/common.d.ts +2 -2
- package/lib/select/index.d.ts +4 -32
- package/lib/select/index.js +59 -119
- package/lib/select/option.d.ts +5 -4
- package/lib/select/select.css +43 -175
- package/lib/select/select.d.ts +0 -12
- package/lib/select/select.less +4 -7
- package/lib/select/select.variable.css +44 -437
- package/lib/select/type.d.ts +10 -9
- package/lib/shared/index.d.ts +0 -1
- package/lib/shared/index.js +1 -72
- package/lib/sideslider/index.d.ts +11 -34
- package/lib/sideslider/index.js +0 -1
- package/lib/sideslider/sideslider.css +9 -138
- package/lib/sideslider/sideslider.d.ts +5 -16
- package/lib/sideslider/sideslider.less +8 -7
- package/lib/sideslider/sideslider.variable.css +9 -269
- package/lib/slider/slider.css +5 -135
- package/lib/slider/slider.variable.css +1 -262
- package/lib/steps/index.d.ts +18 -3
- package/lib/steps/index.js +1 -0
- package/lib/steps/steps.css +38 -168
- package/lib/steps/steps.d.ts +11 -1
- package/lib/steps/steps.variable.css +1 -262
- package/lib/styles/index.d.ts +0 -1
- package/lib/styles/mixins/animate.css +0 -130
- package/lib/styles/mixins/animate.variable.css +1 -262
- package/lib/styles/mixins/mixins.css +0 -130
- package/lib/styles/mixins/mixins.variable.css +0 -130
- package/lib/styles/mixins/popper.css +0 -130
- package/lib/styles/mixins/popper.variable.css +1 -262
- package/lib/styles/mixins/scroll.css +0 -130
- package/lib/styles/mixins/scroll.variable.css +1 -262
- package/lib/styles/reset.css +0 -130
- package/lib/styles/reset.variable.css +1 -262
- package/lib/styles/themes/themes.less +129 -299
- package/lib/swiper/swiper.css +0 -130
- package/lib/swiper/swiper.variable.css +1 -262
- package/lib/switcher/switcher.css +17 -147
- package/lib/switcher/switcher.variable.css +18 -409
- package/lib/tab/index.d.ts +92 -0
- package/lib/tab/index.js +14 -1
- package/lib/tab/props.d.ts +35 -0
- package/lib/tab/tab-nav.d.ts +45 -2
- package/lib/tab/tab.css +17 -147
- package/lib/tab/tab.d.ts +44 -0
- package/lib/tab/tab.variable.css +1 -262
- package/lib/table/components/table-cell.d.ts +0 -22
- package/lib/table/components/table-column.d.ts +44 -1
- package/lib/table/const.d.ts +2 -15
- package/lib/table/events.d.ts +98 -2
- package/lib/table/index.d.ts +561 -89
- package/lib/table/index.js +3333 -3812
- package/lib/table/plugins/col-group.d.ts +38 -0
- package/lib/table/plugins/head-filter.css +0 -131
- package/lib/table/plugins/head-filter.d.ts +1 -2
- package/lib/table/plugins/head-filter.less +0 -1
- package/lib/table/plugins/head-filter.variable.css +1 -263
- package/lib/table/plugins/head-sort.css +0 -130
- package/lib/table/plugins/head-sort.variable.css +1 -262
- package/lib/table/plugins/settings.css +0 -131
- package/lib/table/plugins/settings.d.ts +16 -0
- package/lib/table/plugins/settings.less +0 -1
- package/lib/table/plugins/settings.variable.css +1 -263
- package/lib/table/plugins/use-active-columns.d.ts +16 -0
- package/lib/table/plugins/use-column-resize.d.ts +35 -0
- package/lib/table/plugins/use-column-template.d.ts +7 -0
- package/lib/table/{hooks → plugins}/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-fixed-column.d.ts +27 -0
- package/lib/table/plugins/use-head-cell.d.ts +7 -0
- package/lib/table/plugins/use-pagination.d.ts +23 -0
- package/lib/table/{hooks → plugins}/use-shift-key.d.ts +2 -4
- package/lib/table/props.d.ts +30 -92
- package/lib/table/table.css +327 -597
- package/lib/table/table.d.ts +181 -47
- package/lib/table/table.less +101 -228
- package/lib/table/table.variable.css +328 -859
- package/lib/table/use-attributes.d.ts +62 -0
- package/lib/table/use-column.d.ts +155 -0
- package/lib/table/use-common.d.ts +1679 -0
- package/lib/table/use-render.d.ts +11 -0
- package/lib/table/utils.d.ts +18 -45
- package/lib/table-column/index.d.ts +132 -3
- package/lib/table-column/index.js +28 -17367
- package/lib/tag/index.js +1 -0
- package/lib/tag/tag.css +6 -136
- package/lib/tag/tag.less +1 -1
- package/lib/tag/tag.variable.css +2 -263
- package/lib/tag-input/index.js +3 -3
- package/lib/tag-input/tag-input.css +18 -148
- package/lib/tag-input/tag-input.d.ts +14 -2
- package/lib/tag-input/tag-input.variable.css +1 -262
- package/lib/time-picker/index.d.ts +19 -0
- package/lib/time-picker/time-picker.css +0 -130
- package/lib/time-picker/time-picker.variable.css +1 -262
- package/lib/timeline/timeline.css +19 -149
- package/lib/timeline/timeline.variable.css +1 -262
- package/lib/transfer/transfer.css +19 -149
- package/lib/transfer/transfer.variable.css +1 -262
- package/lib/tree/constant.d.ts +1 -3
- package/lib/tree/index.d.ts +7 -21
- package/lib/tree/index.js +18 -61
- package/lib/tree/props.d.ts +5 -12
- package/lib/tree/tree.css +78 -242
- package/lib/tree/tree.d.ts +3 -9
- package/lib/tree/tree.variable.css +79 -504
- package/lib/tree/use-node-action.d.ts +9 -10
- package/lib/tree/use-node-async.d.ts +1 -2
- package/lib/tree/use-node-attribute.d.ts +34 -42
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +5 -8
- package/lib/tree/util.d.ts +21 -21
- package/lib/upload/index.d.ts +4 -27
- package/lib/upload/index.js +7 -30
- package/lib/upload/props.d.ts +2 -7
- package/lib/upload/upload.css +27 -157
- package/lib/upload/upload.d.ts +2 -13
- package/lib/upload/upload.type.d.ts +0 -6
- package/lib/upload/upload.variable.css +28 -419
- package/lib/virtual-render/index.d.ts +46 -12
- package/lib/virtual-render/index.js +148 -17469
- package/lib/virtual-render/props.d.ts +9 -2
- package/lib/virtual-render/use-fix-top.d.ts +1 -1
- package/lib/virtual-render/use-scrollbar.d.ts +17 -4
- package/lib/virtual-render/v-virtual-render.d.ts +1 -7
- package/lib/virtual-render/virtual-render.css +69 -225
- package/lib/virtual-render/virtual-render.d.ts +22 -6
- package/lib/virtual-render/virtual-render.less +11 -2
- package/lib/virtual-render/virtual-render.variable.css +70 -487
- package/lib/volar.components.d.ts +0 -2
- package/package.json +1 -1
- package/lib/scrollbar/css/scrollbar.css +0 -239
- package/lib/scrollbar/css/scrollbar.less +0 -139
- package/lib/scrollbar/css/scrollbar.variable.css +0 -499
- package/lib/scrollbar/handlers/click-rail.d.ts +0 -2
- package/lib/scrollbar/handlers/drag-thumb.d.ts +0 -1
- package/lib/scrollbar/handlers/keyboard.d.ts +0 -2
- package/lib/scrollbar/handlers/mouse-wheel.d.ts +0 -2
- package/lib/scrollbar/handlers/touch.d.ts +0 -4
- package/lib/scrollbar/helper/class-names.d.ts +0 -21
- package/lib/scrollbar/helper/css.d.ts +0 -3
- package/lib/scrollbar/helper/dom.d.ts +0 -4
- package/lib/scrollbar/helper/event-manager.d.ts +0 -20
- package/lib/scrollbar/helper/util.d.ts +0 -11
- package/lib/scrollbar/process-scroll-diff.d.ts +0 -1
- package/lib/scrollbar/update-geometry.d.ts +0 -8
- package/lib/shared/frame-throttle.d.ts +0 -15
- package/lib/styles/themes/themes.variable.css +0 -130
- package/lib/table/components/ghost-body.d.ts +0 -2
- package/lib/table/hooks/use-cell.d.ts +0 -20
- package/lib/table/hooks/use-column-resize.d.ts +0 -7
- package/lib/table/hooks/use-column-template.d.ts +0 -5
- package/lib/table/hooks/use-columns.d.ts +0 -69
- package/lib/table/hooks/use-fixed-column.d.ts +0 -10
- package/lib/table/hooks/use-head.d.ts +0 -16
- package/lib/table/hooks/use-layout.d.ts +0 -25
- package/lib/table/hooks/use-pagination.d.ts +0 -16
- package/lib/table/hooks/use-render.d.ts +0 -21
- package/lib/table/hooks/use-rows.d.ts +0 -30
- package/lib/table/hooks/use-settings.d.ts +0 -134
- /package/lib/table/{components → plugins}/body-empty.d.ts +0 -0
- /package/lib/table/{hooks → plugins}/use-observer-resize.d.ts +0 -0
- /package/lib/table/{hooks → plugins}/use-scroll-loading.d.ts +0 -0
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare function getElementWindow(element: Element): Window & typeof globalThis;
|
2
|
+
export declare function getElementDocument(element: Element): Document;
|
3
|
+
export declare function addClasses(el: HTMLElement | null, classes: string): void;
|
4
|
+
export declare function removeClasses(el: HTMLElement | null, classes: string): void;
|
5
|
+
export declare function classNamesToQuery(classNames: string): string;
|
@@ -0,0 +1,241 @@
|
|
1
|
+
import * as helpers from './helpers';
|
2
|
+
interface DebouncedFunc<T extends (...args: any[]) => any> {
|
3
|
+
/**
|
4
|
+
* Call the original function, but applying the debounce rules.
|
5
|
+
*
|
6
|
+
* If the debounced function can be run immediately, this calls it and returns its return
|
7
|
+
* value.
|
8
|
+
*
|
9
|
+
* Otherwise, it returns the return value of the last invocation, or undefined if the debounced
|
10
|
+
* function was not invoked yet.
|
11
|
+
*/
|
12
|
+
(...args: Parameters<T>): ReturnType<T> | undefined;
|
13
|
+
/**
|
14
|
+
* Throw away any pending invocation of the debounced function.
|
15
|
+
*/
|
16
|
+
cancel(): void;
|
17
|
+
/**
|
18
|
+
* If there is a pending invocation of the debounced function, invoke it immediately and return
|
19
|
+
* its return value.
|
20
|
+
*
|
21
|
+
* Otherwise, return the value from the last invocation, or undefined if the debounced function
|
22
|
+
* was never invoked.
|
23
|
+
*/
|
24
|
+
flush(): ReturnType<T> | undefined;
|
25
|
+
}
|
26
|
+
export interface Options {
|
27
|
+
forceVisible: Axis | boolean;
|
28
|
+
clickOnTrack: boolean;
|
29
|
+
scrollbarMinSize: number;
|
30
|
+
scrollbarMaxSize: number;
|
31
|
+
classNames: Partial<ClassNames>;
|
32
|
+
ariaLabel: string;
|
33
|
+
contentNode: HTMLElement | null;
|
34
|
+
delegateYContent: HTMLElement | null;
|
35
|
+
delegateXContent: HTMLElement | null;
|
36
|
+
wrapperNode: HTMLElement | null;
|
37
|
+
autoHide: boolean;
|
38
|
+
useSystemScrollXBehavior?: boolean;
|
39
|
+
useSystemScrollYBehavior?: boolean;
|
40
|
+
scrollDelegate: {
|
41
|
+
scrollHeight?: number;
|
42
|
+
scrollWidth?: number;
|
43
|
+
};
|
44
|
+
onScrollCallback?: (args: {
|
45
|
+
x: number;
|
46
|
+
y: number;
|
47
|
+
}) => void;
|
48
|
+
}
|
49
|
+
export type SimpleBarOptions = Partial<Options>;
|
50
|
+
type ClassNames = {
|
51
|
+
contentEl: string;
|
52
|
+
offset: string;
|
53
|
+
mask: string;
|
54
|
+
wrapper: string;
|
55
|
+
placeholder: string;
|
56
|
+
scrollbar: string;
|
57
|
+
track: string;
|
58
|
+
visible: string;
|
59
|
+
horizontal: string;
|
60
|
+
vertical: string;
|
61
|
+
hover: string;
|
62
|
+
dragging: string;
|
63
|
+
scrolling: string;
|
64
|
+
scrollable: string;
|
65
|
+
mouseEntered: string;
|
66
|
+
};
|
67
|
+
type Axis = 'x' | 'y';
|
68
|
+
type AxisProps = {
|
69
|
+
scrollOffsetAttr: 'scrollLeft' | 'scrollTop';
|
70
|
+
sizeAttr: 'height' | 'width';
|
71
|
+
scrollSizeAttr: 'scrollHeight' | 'scrollWidth';
|
72
|
+
offsetSizeAttr: 'offsetHeight' | 'offsetWidth';
|
73
|
+
offsetAttr: 'left' | 'top';
|
74
|
+
overflowAttr: 'overflowX' | 'overflowY';
|
75
|
+
dragOffset: number;
|
76
|
+
isOverflowing: boolean;
|
77
|
+
forceVisible: boolean;
|
78
|
+
track: {
|
79
|
+
size: any;
|
80
|
+
el: HTMLElement | null;
|
81
|
+
rect: DOMRect | null;
|
82
|
+
isVisible: boolean;
|
83
|
+
};
|
84
|
+
scrollbar: {
|
85
|
+
size: any;
|
86
|
+
el: HTMLElement | null;
|
87
|
+
rect: DOMRect | null;
|
88
|
+
isVisible: boolean;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
type RtlHelpers = {
|
92
|
+
isScrollOriginAtZero: boolean;
|
93
|
+
isScrollingToNegative: boolean;
|
94
|
+
} | null;
|
95
|
+
type DefaultOptions = Options & typeof BkScrollbarCore.defaultOptions;
|
96
|
+
type MouseWheelInstance = {
|
97
|
+
addWheelEvent: (target: HTMLElement) => void;
|
98
|
+
removeWheelEvent: (target: HTMLElement) => void;
|
99
|
+
};
|
100
|
+
export default class BkScrollbarCore {
|
101
|
+
static rtlHelpers: RtlHelpers;
|
102
|
+
static defaultOptions: Options;
|
103
|
+
/**
|
104
|
+
* Static functions
|
105
|
+
*/
|
106
|
+
static helpers: typeof helpers;
|
107
|
+
/**
|
108
|
+
* Helper to fix browsers inconsistency on RTL:
|
109
|
+
* - Firefox inverts the scrollbar initial position
|
110
|
+
* - IE11 inverts both scrollbar position and scrolling offset
|
111
|
+
*/
|
112
|
+
static getRtlHelpers(): {
|
113
|
+
isScrollOriginAtZero: boolean;
|
114
|
+
isScrollingToNegative: boolean;
|
115
|
+
};
|
116
|
+
static getOffset(el: Element): {
|
117
|
+
top: number;
|
118
|
+
left: number;
|
119
|
+
};
|
120
|
+
el: HTMLElement;
|
121
|
+
options: DefaultOptions;
|
122
|
+
classNames: ClassNames;
|
123
|
+
axis: {
|
124
|
+
x: AxisProps;
|
125
|
+
y: AxisProps;
|
126
|
+
};
|
127
|
+
draggedAxis?: Axis;
|
128
|
+
removePreventClickId: null | number;
|
129
|
+
minScrollbarWidth: number;
|
130
|
+
stopScrollDelay: number;
|
131
|
+
isScrolling: boolean;
|
132
|
+
isMouseEntering: boolean;
|
133
|
+
isDragging: boolean;
|
134
|
+
scrollXTicking: boolean;
|
135
|
+
scrollYTicking: boolean;
|
136
|
+
wrapperEl: HTMLElement | null;
|
137
|
+
contentEl: HTMLElement | null;
|
138
|
+
delegateXContent: HTMLElement | null;
|
139
|
+
delegateYContent: HTMLElement | null;
|
140
|
+
rtlHelpers: RtlHelpers;
|
141
|
+
scrollbarWidth: number;
|
142
|
+
resizeObserver: ResizeObserver | null;
|
143
|
+
mutationObserver: MutationObserver | null;
|
144
|
+
elStyles: CSSStyleDeclaration | null;
|
145
|
+
isRtl: boolean | null;
|
146
|
+
mouseX: number;
|
147
|
+
mouseY: number;
|
148
|
+
mouseWheelInstance: MouseWheelInstance;
|
149
|
+
wheelOffsetY: number;
|
150
|
+
wheelOffsetX: number;
|
151
|
+
mouseWeelTimer: any;
|
152
|
+
/**
|
153
|
+
* 最外层滚动容器滚动实际位置缓存器
|
154
|
+
*/
|
155
|
+
wrapperScrollValue: {
|
156
|
+
scrollTop: number;
|
157
|
+
scrollLeft: number;
|
158
|
+
};
|
159
|
+
/**
|
160
|
+
* 模拟滚动条内部缩略滚动器滚动位置缓存器
|
161
|
+
*/
|
162
|
+
wrapperScrollMap: {};
|
163
|
+
onMouseMove: (() => void) | DebouncedFunc<any>;
|
164
|
+
onWindowResize: (() => void) | DebouncedFunc<any>;
|
165
|
+
onStopScrolling: (() => void) | DebouncedFunc<any>;
|
166
|
+
onMouseEntered: (() => void) | DebouncedFunc<any>;
|
167
|
+
onMouseWheel: (() => void) | DebouncedFunc<any>;
|
168
|
+
constructor(element: HTMLElement, options?: Partial<Options>);
|
169
|
+
getScrollbarWidth(): number;
|
170
|
+
init(): void;
|
171
|
+
initDOM(): void;
|
172
|
+
initListeners(): void;
|
173
|
+
getWrapperElScrollSize(attrName: string, target?: HTMLElement): any;
|
174
|
+
recalculate(): void;
|
175
|
+
/**
|
176
|
+
* Calculate scrollbar size
|
177
|
+
*/
|
178
|
+
getScrollbarSize(axis?: Axis): any;
|
179
|
+
positionScrollbar(axis?: Axis): void;
|
180
|
+
toggleTrackVisibility(axis?: Axis): void;
|
181
|
+
showScrollbar(axis?: Axis): void;
|
182
|
+
hideScrollbar(axis?: Axis): void;
|
183
|
+
/**
|
184
|
+
* On scroll event handling
|
185
|
+
*/
|
186
|
+
onScroll: () => void;
|
187
|
+
scrollX: () => void;
|
188
|
+
scrollY: () => void;
|
189
|
+
onMouseEnter: () => void;
|
190
|
+
onMouseMoveForAxis(axis?: Axis): void;
|
191
|
+
onMouseLeave: () => void;
|
192
|
+
onMouseLeaveForAxis(axis?: Axis): void;
|
193
|
+
onPointerEvent: (e: any) => void;
|
194
|
+
/**
|
195
|
+
* on scrollbar handle drag movement starts
|
196
|
+
*/
|
197
|
+
onDragStart(e: any, axis?: Axis): void;
|
198
|
+
/**
|
199
|
+
* Drag scrollbar handle
|
200
|
+
*/
|
201
|
+
drag: (e: any) => void;
|
202
|
+
getPointerPosition: (dragPos: number, axis: Axis) => number;
|
203
|
+
scrollToAxisPosition: (scrollPos: number, axisValue: Axis) => boolean;
|
204
|
+
fixedScrollTo: (axisValue: Axis, resolvedValue: number) => void;
|
205
|
+
/**
|
206
|
+
* End scroll handle drag
|
207
|
+
*/
|
208
|
+
onEndDrag: (e: any) => void;
|
209
|
+
/**
|
210
|
+
* Handler to ignore click events during drag
|
211
|
+
*/
|
212
|
+
preventClick: (e: any) => void;
|
213
|
+
onTrackClick(e: any, axis?: Axis): void;
|
214
|
+
/**
|
215
|
+
* Getter for content element
|
216
|
+
*/
|
217
|
+
getContentElement(): HTMLElement;
|
218
|
+
/**
|
219
|
+
* Getter for original scrolling element
|
220
|
+
*/
|
221
|
+
getScrollElement(): HTMLElement;
|
222
|
+
removeListeners(): void;
|
223
|
+
/**
|
224
|
+
* Remove all listeners from DOM nodes
|
225
|
+
*/
|
226
|
+
unMount(): void;
|
227
|
+
/**
|
228
|
+
* Check if mouse is within bounds
|
229
|
+
*/
|
230
|
+
isWithinBounds(bbox: DOMRect): boolean;
|
231
|
+
/**
|
232
|
+
* Find element children matches query
|
233
|
+
*/
|
234
|
+
findChild(el: any, query: any): any;
|
235
|
+
private mOnMouseWheel;
|
236
|
+
private mOnStopScrolling;
|
237
|
+
private mOnMouseEntered;
|
238
|
+
private mOnMouseMove;
|
239
|
+
private mOnWindowResize;
|
240
|
+
}
|
241
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function scrollbarWidth(): number;
|
@@ -0,0 +1,75 @@
|
|
1
|
+
.bk-scrollbar-wrapper {
|
2
|
+
position: relative;
|
3
|
+
overflow: hidden;
|
4
|
+
}
|
5
|
+
.bk-scrollbar-wrapper .bk-scrollbar-content-el {
|
6
|
+
display: inline-flex;
|
7
|
+
flex-direction: column;
|
8
|
+
width: 100%;
|
9
|
+
}
|
10
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track {
|
11
|
+
z-index: 1;
|
12
|
+
position: absolute;
|
13
|
+
right: 0;
|
14
|
+
bottom: 0;
|
15
|
+
pointer-events: none;
|
16
|
+
overflow: hidden;
|
17
|
+
}
|
18
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover {
|
19
|
+
background-color: #F0F1F5;
|
20
|
+
cursor: pointer;
|
21
|
+
}
|
22
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover .bk-scrollbar::before {
|
23
|
+
background-color: #979BA5;
|
24
|
+
}
|
25
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical {
|
26
|
+
top: 0;
|
27
|
+
width: 8px;
|
28
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
29
|
+
}
|
30
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal {
|
31
|
+
left: 0;
|
32
|
+
height: 8px;
|
33
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
34
|
+
}
|
35
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar {
|
36
|
+
right: auto;
|
37
|
+
left: 0;
|
38
|
+
top: 0;
|
39
|
+
bottom: 0;
|
40
|
+
min-height: 0;
|
41
|
+
min-width: 8px;
|
42
|
+
width: auto;
|
43
|
+
}
|
44
|
+
.bk-scrollbar-wrapper .bk-scrollbar-dragging {
|
45
|
+
pointer-events: none;
|
46
|
+
-webkit-touch-callout: none;
|
47
|
+
-webkit-user-select: none;
|
48
|
+
-khtml-user-select: none;
|
49
|
+
-moz-user-select: none;
|
50
|
+
-ms-user-select: none;
|
51
|
+
user-select: none;
|
52
|
+
}
|
53
|
+
.bk-scrollbar-wrapper .bk-scrollbar {
|
54
|
+
position: absolute;
|
55
|
+
left: 0;
|
56
|
+
right: 0;
|
57
|
+
min-height: 8px;
|
58
|
+
}
|
59
|
+
.bk-scrollbar-wrapper .bk-scrollbar::before {
|
60
|
+
position: absolute;
|
61
|
+
content: '';
|
62
|
+
background: #DCDEE5;
|
63
|
+
border-radius: 6px;
|
64
|
+
left: 1px;
|
65
|
+
right: 1px;
|
66
|
+
top: 1px;
|
67
|
+
bottom: 1px;
|
68
|
+
opacity: 0;
|
69
|
+
transition: opacity 0.2s 0.9s linear;
|
70
|
+
}
|
71
|
+
.bk-scrollbar-wrapper .bk-scrollbar.bk-scrollbar-visible::before {
|
72
|
+
opacity: 0.9;
|
73
|
+
transition-delay: 0s;
|
74
|
+
transition-duration: 0s;
|
75
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
@import '../styles/themes/themes.less';
|
2
|
+
|
3
|
+
.@{bk-prefix}-scrollbar-wrapper {
|
4
|
+
position: relative;
|
5
|
+
overflow: hidden;
|
6
|
+
|
7
|
+
.@{bk-prefix}-scrollbar-content-el {
|
8
|
+
display: inline-flex;
|
9
|
+
flex-direction: column;
|
10
|
+
width: 100%;
|
11
|
+
}
|
12
|
+
|
13
|
+
.@{bk-prefix}-scrollbar-track {
|
14
|
+
z-index: 1;
|
15
|
+
position: absolute;
|
16
|
+
right: 0;
|
17
|
+
bottom: 0;
|
18
|
+
pointer-events: none;
|
19
|
+
overflow: hidden;
|
20
|
+
|
21
|
+
&.@{bk-prefix}-scrollbar-hover {
|
22
|
+
background-color: #F0F1F5;
|
23
|
+
cursor: pointer;
|
24
|
+
|
25
|
+
.@{bk-prefix}-scrollbar {
|
26
|
+
&::before {
|
27
|
+
background-color: #979BA5;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
&.@{bk-prefix}-scrollbar-vertical {
|
33
|
+
top: 0;
|
34
|
+
width: 8px;
|
35
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
36
|
+
}
|
37
|
+
|
38
|
+
&.@{bk-prefix}-scrollbar-horizontal {
|
39
|
+
left: 0;
|
40
|
+
height: 8px;
|
41
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
42
|
+
|
43
|
+
&.@{bk-prefix}-scrollbar {
|
44
|
+
right: auto;
|
45
|
+
left: 0;
|
46
|
+
top: 0;
|
47
|
+
bottom: 0;
|
48
|
+
min-height: 0;
|
49
|
+
min-width: 8px;
|
50
|
+
width: auto;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
.@{bk-prefix}-scrollbar-dragging {
|
57
|
+
pointer-events: none;
|
58
|
+
-webkit-touch-callout: none;
|
59
|
+
-webkit-user-select: none;
|
60
|
+
-khtml-user-select: none;
|
61
|
+
-moz-user-select: none;
|
62
|
+
-ms-user-select: none;
|
63
|
+
user-select: none;
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
.@{bk-prefix}-scrollbar {
|
68
|
+
position: absolute;
|
69
|
+
left: 0;
|
70
|
+
right: 0;
|
71
|
+
min-height: 8px;
|
72
|
+
|
73
|
+
&::before {
|
74
|
+
position: absolute;
|
75
|
+
content: '';
|
76
|
+
background: #DCDEE5;
|
77
|
+
border-radius: 6px;
|
78
|
+
left: 1px;
|
79
|
+
right: 1px;
|
80
|
+
top: 1px;
|
81
|
+
bottom: 1px;
|
82
|
+
opacity: 0;
|
83
|
+
transition: opacity 0.2s 0.9s linear;
|
84
|
+
}
|
85
|
+
|
86
|
+
&.@{bk-prefix}-scrollbar-visible {
|
87
|
+
&::before {
|
88
|
+
opacity: 0.9;
|
89
|
+
transition-delay: 0s;
|
90
|
+
transition-duration: 0s;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
@@ -109,10 +109,9 @@
|
|
109
109
|
--date-picker-dropdown-bg: #fff;
|
110
110
|
--table-bg-color: var(--white-color);
|
111
111
|
--table-border-color: #dcdee5;
|
112
|
-
--table-strip-color: #fafbfd;
|
113
112
|
--table-head-bg-color: #fafbfd;
|
114
113
|
--table-head-font-color: #313238;
|
115
|
-
--table-body-font-color: #
|
114
|
+
--table-body-font-color: #63656E;
|
116
115
|
--table-row-hover-bg-color: #f5f7fa;
|
117
116
|
--table-row-active-bg-color: #f0f1f5;
|
118
117
|
--cascader-panel-border-color: #dcdee5;
|
@@ -128,3 +127,78 @@
|
|
128
127
|
--select-active-color: #e1ecff;
|
129
128
|
--select-hover-color: #f5f7fa;
|
130
129
|
}
|
130
|
+
.bk-scrollbar-wrapper {
|
131
|
+
position: relative;
|
132
|
+
overflow: hidden;
|
133
|
+
}
|
134
|
+
.bk-scrollbar-wrapper .bk-scrollbar-content-el {
|
135
|
+
display: inline-flex;
|
136
|
+
flex-direction: column;
|
137
|
+
width: 100%;
|
138
|
+
}
|
139
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track {
|
140
|
+
z-index: 1;
|
141
|
+
position: absolute;
|
142
|
+
right: 0;
|
143
|
+
bottom: 0;
|
144
|
+
pointer-events: none;
|
145
|
+
overflow: hidden;
|
146
|
+
}
|
147
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover {
|
148
|
+
background-color: #F0F1F5;
|
149
|
+
cursor: pointer;
|
150
|
+
}
|
151
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover .bk-scrollbar::before {
|
152
|
+
background-color: #979BA5;
|
153
|
+
}
|
154
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical {
|
155
|
+
top: 0;
|
156
|
+
width: 8px;
|
157
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
158
|
+
}
|
159
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal {
|
160
|
+
left: 0;
|
161
|
+
height: 8px;
|
162
|
+
transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
|
163
|
+
}
|
164
|
+
.bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar {
|
165
|
+
right: auto;
|
166
|
+
left: 0;
|
167
|
+
top: 0;
|
168
|
+
bottom: 0;
|
169
|
+
min-height: 0;
|
170
|
+
min-width: 8px;
|
171
|
+
width: auto;
|
172
|
+
}
|
173
|
+
.bk-scrollbar-wrapper .bk-scrollbar-dragging {
|
174
|
+
pointer-events: none;
|
175
|
+
-webkit-touch-callout: none;
|
176
|
+
-webkit-user-select: none;
|
177
|
+
-khtml-user-select: none;
|
178
|
+
-moz-user-select: none;
|
179
|
+
-ms-user-select: none;
|
180
|
+
user-select: none;
|
181
|
+
}
|
182
|
+
.bk-scrollbar-wrapper .bk-scrollbar {
|
183
|
+
position: absolute;
|
184
|
+
left: 0;
|
185
|
+
right: 0;
|
186
|
+
min-height: 8px;
|
187
|
+
}
|
188
|
+
.bk-scrollbar-wrapper .bk-scrollbar::before {
|
189
|
+
position: absolute;
|
190
|
+
content: '';
|
191
|
+
background: #DCDEE5;
|
192
|
+
border-radius: 6px;
|
193
|
+
left: 1px;
|
194
|
+
right: 1px;
|
195
|
+
top: 1px;
|
196
|
+
bottom: 1px;
|
197
|
+
opacity: 0;
|
198
|
+
transition: opacity 0.2s 0.9s linear;
|
199
|
+
}
|
200
|
+
.bk-scrollbar-wrapper .bk-scrollbar.bk-scrollbar-visible::before {
|
201
|
+
opacity: 0.9;
|
202
|
+
transition-delay: 0s;
|
203
|
+
transition-duration: 0s;
|
204
|
+
}
|