@rockshin/tao-ui 0.0.47 → 0.0.49
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/components/affix/affix.js +20 -16
- package/dist/components/alert/alert.js +114 -99
- package/dist/components/app/app-modals.js +134 -96
- package/dist/components/app/app-notices.js +39 -23
- package/dist/components/auto-complete/auto-complete.js +21 -7
- package/dist/components/avatar/avatar.js +31 -11
- package/dist/components/badge/badge.css +1 -1
- package/dist/components/badge/badge.js +72 -257
- package/dist/components/border-beam/border-beam.js +21 -17
- package/dist/components/breadcrumb/breadcrumb.js +178 -159
- package/dist/components/button/button.js +61 -53
- package/dist/components/calendar/calendar.js +6 -4
- package/dist/components/card/card.js +24 -8
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/carousel.js +105 -68
- package/dist/components/cascader/cascader.js +54 -19
- package/dist/components/checkbox/checkbox.css +13 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +320 -229
- package/dist/components/collapse/collapse-panels.d.ts +1 -1
- package/dist/components/collapse/collapse-panels.js +122 -113
- package/dist/components/collapse/collapse.js +98 -63
- package/dist/components/color-picker/color-picker.js +539 -441
- package/dist/components/color-picker/color.js +1 -1
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +108 -68
- package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
- package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/month-grid.js +79 -37
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
- package/dist/components/date-picker/calendar/time-panel.js +94 -89
- package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/year-grid.js +66 -35
- package/dist/components/date-picker/date-picker.css +24 -1
- package/dist/components/date-picker/date-picker.js +99 -53
- package/dist/components/date-picker/presets.d.ts +2 -1
- package/dist/components/date-picker/presets.js +27 -24
- package/dist/components/date-picker/range-picker.js +308 -153
- package/dist/components/descriptions/descriptions.js +7 -3
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.js +201 -369
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +183 -279
- package/dist/components/empty/empty.js +57 -78
- package/dist/components/float-button/float-button.d.ts +1 -0
- package/dist/components/float-button/float-button.js +47 -30
- package/dist/components/form/field-control.d.ts +4 -2
- package/dist/components/form/field-control.js +17 -9
- package/dist/components/form/form-context.d.ts +8 -2
- package/dist/components/form/form-context.js +2 -1
- package/dist/components/form/form-item.js +85 -63
- package/dist/components/form/form.css +3 -2
- package/dist/components/form/use-form.d.ts +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +194 -141
- package/dist/components/form-section/form-section.d.ts +1 -1
- package/dist/components/form-section/form-section.js +52 -45
- package/dist/components/image/image.js +585 -477
- package/dist/components/input/base-input.js +8 -9
- package/dist/components/input/input-shared.d.ts +5 -2
- package/dist/components/input/input-shared.js +42 -18
- package/dist/components/input/otp.js +236 -217
- package/dist/components/input/password.js +2 -1
- package/dist/components/input/search.js +8 -7
- package/dist/components/list/list-pagination.js +41 -36
- package/dist/components/list/list.js +141 -125
- package/dist/components/listy/listy.js +175 -106
- package/dist/components/masonry/masonry.js +108 -85
- package/dist/components/mentions/mentions.js +12 -3
- package/dist/components/menu/menu-render.d.ts +9 -3
- package/dist/components/menu/menu-render.js +99 -36
- package/dist/components/modal/confirm-dialog.js +10 -4
- package/dist/components/modal/confirm.js +3 -7
- package/dist/components/modal/index.js +9 -3
- package/dist/components/modal/modal.js +390 -365
- package/dist/components/pagination/pagination.js +105 -96
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +219 -168
- package/dist/components/popover/popover.js +330 -243
- package/dist/components/progress/progress.css +2 -2
- package/dist/components/progress/progress.js +232 -458
- package/dist/components/qr-code/qr-code.js +72 -66
- package/dist/components/radio/radio.css +15 -4
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +260 -198
- package/dist/components/rate/rate.js +173 -113
- package/dist/components/scroll-area/scroll-area.js +241 -211
- package/dist/components/segmented/segmented.js +73 -41
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +24 -13
- package/dist/components/select/select-searchable-list.d.ts +2 -1
- package/dist/components/select/select-searchable-list.js +2 -3
- package/dist/components/select/select.js +49 -25
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +7 -4
- package/dist/components/skeleton/skeleton.js +56 -48
- package/dist/components/slider/slider.js +87 -212
- package/dist/components/sonner/sonner.js +109 -93
- package/dist/components/spinner/spinner.js +147 -138
- package/dist/components/splitter/splitter.js +222 -159
- package/dist/components/statistic/statistic.js +7 -6
- package/dist/components/steps/steps.js +88 -81
- package/dist/components/steps/use-display-steps.js +1 -1
- package/dist/components/switch/switch.js +89 -89
- package/dist/components/table/table-filter.js +66 -56
- package/dist/components/table/table-icons.d.ts +2 -1
- package/dist/components/table/table-icons.js +11 -9
- package/dist/components/table/table-model.js +1 -1
- package/dist/components/table/table.js +107 -83
- package/dist/components/table/use-table-data.d.ts +6 -3
- package/dist/components/table/use-table-data.js +166 -130
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.js +236 -179
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +111 -108
- package/dist/components/textarea/textarea.js +22 -17
- package/dist/components/time-picker/time-picker.js +5 -3
- package/dist/components/timeline/timeline.css +6 -1
- package/dist/components/timeline/timeline.js +21 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +123 -233
- package/dist/components/tour/tour.css +4 -0
- package/dist/components/tour/tour.js +400 -331
- package/dist/components/transfer/transfer-list.js +29 -11
- package/dist/components/transfer/transfer-parts.js +1 -1
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +29 -14
- package/dist/components/tree/tree-keyboard.d.ts +1 -1
- package/dist/components/tree/tree-keyboard.js +5 -3
- package/dist/components/tree/tree.js +74 -59
- package/dist/components/tree-select/select-engine.d.ts +3 -2
- package/dist/components/tree-select/select-engine.js +18 -16
- package/dist/components/tree-select/tree-select.js +21 -5
- package/dist/components/upload/upload.css +8 -0
- package/dist/components/upload/upload.js +160 -72
- package/dist/components/watermark/watermark.js +36 -29
- package/dist/number-input/use-number-input.js +129 -90
- package/dist/number-input/validate.js +32 -5
- package/dist/provider/merge-locale.js +12 -9
- package/dist/provider/tao-provider.d.ts +3 -1
- package/dist/provider/tao-provider.js +123 -86
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { getScrollLeft, setScrollLeft } from "../../utils/scroll-left.js";
|
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import "./scroll-area.css";
|
|
8
8
|
function ScrollArea(t0) {
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(84);
|
|
10
10
|
const { children, type: t1, direction: t2, maxHeight, maxWidth, scrollbarSize: t3, scrollbarOffset: t4, scrollShadow: t5, onScroll: onScrollProp, onScrollEnd, scrollEndThreshold: t6, className, style, classNames, styles } = t0;
|
|
11
11
|
const type = void 0 === t1 ? "hover" : t1;
|
|
12
12
|
const direction = void 0 === t2 ? "vertical" : t2;
|
|
@@ -34,8 +34,10 @@ function ScrollArea(t0) {
|
|
|
34
34
|
const [scrollState, setScrollState] = useState(t7);
|
|
35
35
|
const [textDirection, directionRef] = useTaoDirection(void 0, "self");
|
|
36
36
|
const { locale } = useTaoConfig();
|
|
37
|
+
const firedScrollEnd = useRef(false);
|
|
38
|
+
const lastScrollTop = useRef(0);
|
|
37
39
|
let t8;
|
|
38
|
-
if ($[1] !== textDirection) {
|
|
40
|
+
if ($[1] !== direction || $[2] !== scrollEndThreshold || $[3] !== textDirection) {
|
|
39
41
|
t8 = ()=>{
|
|
40
42
|
const el = viewportRef.current;
|
|
41
43
|
if (!el) return;
|
|
@@ -55,83 +57,106 @@ function ScrollArea(t0) {
|
|
|
55
57
|
atLeft: scrollLeft <= 1,
|
|
56
58
|
atRight: scrollLeft + clientWidth >= scrollWidth - 1
|
|
57
59
|
});
|
|
60
|
+
const nearBottom = "horizontal" !== direction && scrollHeight > clientHeight && scrollTop + clientHeight >= scrollHeight - scrollEndThreshold;
|
|
61
|
+
if (!nearBottom) firedScrollEnd.current = false;
|
|
62
|
+
return nearBottom;
|
|
58
63
|
};
|
|
59
|
-
$[1] =
|
|
60
|
-
$[2] =
|
|
61
|
-
|
|
64
|
+
$[1] = direction;
|
|
65
|
+
$[2] = scrollEndThreshold;
|
|
66
|
+
$[3] = textDirection;
|
|
67
|
+
$[4] = t8;
|
|
68
|
+
} else t8 = $[4];
|
|
62
69
|
const updateScrollState = t8;
|
|
63
70
|
let t10;
|
|
64
71
|
let t9;
|
|
65
|
-
if ($[
|
|
72
|
+
if ($[5] !== updateScrollState) {
|
|
66
73
|
t9 = ()=>{
|
|
67
74
|
const el_0 = viewportRef.current;
|
|
68
75
|
if (!el_0) return;
|
|
69
|
-
updateScrollState
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
const observer = new ResizeObserver(updateScrollState);
|
|
77
|
+
const observeContent = ()=>{
|
|
78
|
+
observer.disconnect();
|
|
79
|
+
observer.observe(el_0);
|
|
80
|
+
for (const child of el_0.children)observer.observe(child);
|
|
81
|
+
updateScrollState();
|
|
82
|
+
};
|
|
83
|
+
const mutations = new MutationObserver(observeContent);
|
|
84
|
+
mutations.observe(el_0, {
|
|
85
|
+
childList: true
|
|
86
|
+
});
|
|
87
|
+
observeContent();
|
|
88
|
+
return ()=>{
|
|
89
|
+
mutations.disconnect();
|
|
90
|
+
observer.disconnect();
|
|
91
|
+
};
|
|
74
92
|
};
|
|
75
93
|
t10 = [
|
|
76
94
|
updateScrollState
|
|
77
95
|
];
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
96
|
+
$[5] = updateScrollState;
|
|
97
|
+
$[6] = t10;
|
|
98
|
+
$[7] = t9;
|
|
81
99
|
} else {
|
|
82
|
-
t10 = $[
|
|
83
|
-
t9 = $[
|
|
100
|
+
t10 = $[6];
|
|
101
|
+
t9 = $[7];
|
|
84
102
|
}
|
|
85
103
|
useEffect(t9, t10);
|
|
86
|
-
const firedScrollEnd = useRef(false);
|
|
87
104
|
let t11;
|
|
88
|
-
if ($[
|
|
105
|
+
if ($[8] !== onScrollEnd || $[9] !== onScrollProp || $[10] !== updateScrollState) {
|
|
89
106
|
t11 = (e)=>{
|
|
90
|
-
|
|
107
|
+
const scrollTop_0 = e.currentTarget.scrollTop;
|
|
108
|
+
const movedVertically = scrollTop_0 !== lastScrollTop.current;
|
|
109
|
+
lastScrollTop.current = scrollTop_0;
|
|
110
|
+
const nearBottom_0 = updateScrollState();
|
|
91
111
|
onScrollProp?.(e);
|
|
92
|
-
if (onScrollEnd) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const nearBottom = scrollTop_0 + clientHeight_0 >= scrollHeight_0 - scrollEndThreshold;
|
|
96
|
-
if (nearBottom && !firedScrollEnd.current) {
|
|
97
|
-
firedScrollEnd.current = true;
|
|
98
|
-
onScrollEnd();
|
|
99
|
-
} else if (!nearBottom) firedScrollEnd.current = false;
|
|
112
|
+
if (onScrollEnd && movedVertically && nearBottom_0 && !firedScrollEnd.current) {
|
|
113
|
+
firedScrollEnd.current = true;
|
|
114
|
+
onScrollEnd();
|
|
100
115
|
}
|
|
101
116
|
};
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
|
|
107
|
-
} else t11 = $[10];
|
|
117
|
+
$[8] = onScrollEnd;
|
|
118
|
+
$[9] = onScrollProp;
|
|
119
|
+
$[10] = updateScrollState;
|
|
120
|
+
$[11] = t11;
|
|
121
|
+
} else t11 = $[11];
|
|
108
122
|
const handleScroll = t11;
|
|
109
|
-
const
|
|
123
|
+
const activeDrag = useRef(null);
|
|
110
124
|
let t12;
|
|
111
125
|
let t13;
|
|
112
|
-
if ($[
|
|
113
|
-
t12 = ()=>()=>
|
|
126
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
127
|
+
t12 = ()=>()=>activeDrag.current?.cleanup();
|
|
114
128
|
t13 = [];
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
129
|
+
$[12] = t12;
|
|
130
|
+
$[13] = t13;
|
|
117
131
|
} else {
|
|
118
|
-
t12 = $[
|
|
119
|
-
t13 = $[
|
|
132
|
+
t12 = $[12];
|
|
133
|
+
t13 = $[13];
|
|
120
134
|
}
|
|
121
135
|
useEffect(t12, t13);
|
|
122
136
|
let t14;
|
|
123
|
-
if ($[
|
|
124
|
-
t14 = (
|
|
137
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
138
|
+
t14 = ()=>{
|
|
139
|
+
const drag = activeDrag.current;
|
|
140
|
+
if (drag && !viewportRef.current?.parentElement?.contains(drag.thumb)) drag.cleanup();
|
|
141
|
+
};
|
|
142
|
+
$[14] = t14;
|
|
143
|
+
} else t14 = $[14];
|
|
144
|
+
useEffect(t14);
|
|
145
|
+
let t15;
|
|
146
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
147
|
+
t15 = (axis, e_0)=>{
|
|
148
|
+
if (0 !== e_0.button) return;
|
|
125
149
|
e_0.preventDefault();
|
|
126
150
|
e_0.stopPropagation();
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
151
|
+
activeDrag.current?.cleanup();
|
|
152
|
+
const el_1 = viewportRef.current;
|
|
153
|
+
if (!el_1) return;
|
|
130
154
|
const thumb = e_0.currentTarget;
|
|
155
|
+
const ownerDocument = thumb.ownerDocument;
|
|
131
156
|
const track = thumb.parentElement;
|
|
132
157
|
if (!track) return;
|
|
133
158
|
const pos = "y" === axis ? e_0.clientY : e_0.clientX;
|
|
134
|
-
const scroll = "y" === axis ?
|
|
159
|
+
const scroll = "y" === axis ? el_1.scrollTop : getScrollLeft(el_1);
|
|
135
160
|
const pointerId = e_0.pointerId;
|
|
136
161
|
const handleMove = (ev)=>{
|
|
137
162
|
if (ev.pointerId !== pointerId || !viewportRef.current) return;
|
|
@@ -147,131 +172,136 @@ function ScrollArea(t0) {
|
|
|
147
172
|
else setScrollLeft(vp, nextScroll);
|
|
148
173
|
};
|
|
149
174
|
const cleanup = ()=>{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
175
|
+
ownerDocument.removeEventListener("pointermove", handleMove);
|
|
176
|
+
ownerDocument.removeEventListener("pointerup", handleEnd);
|
|
177
|
+
ownerDocument.removeEventListener("pointercancel", handleEnd);
|
|
178
|
+
activeDrag.current = null;
|
|
154
179
|
};
|
|
155
180
|
const handleEnd = (ev_0)=>{
|
|
156
181
|
if (ev_0.pointerId === pointerId) cleanup();
|
|
157
182
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
183
|
+
activeDrag.current = {
|
|
184
|
+
thumb,
|
|
185
|
+
cleanup
|
|
186
|
+
};
|
|
187
|
+
ownerDocument.addEventListener("pointermove", handleMove);
|
|
188
|
+
ownerDocument.addEventListener("pointerup", handleEnd);
|
|
189
|
+
ownerDocument.addEventListener("pointercancel", handleEnd);
|
|
162
190
|
};
|
|
163
|
-
$[
|
|
164
|
-
} else
|
|
165
|
-
const handleThumbPointerDown =
|
|
166
|
-
let
|
|
167
|
-
if ($[
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
191
|
+
$[15] = t15;
|
|
192
|
+
} else t15 = $[15];
|
|
193
|
+
const handleThumbPointerDown = t15;
|
|
194
|
+
let t16;
|
|
195
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
196
|
+
t16 = (axis_0, e_1)=>{
|
|
197
|
+
const el_2 = viewportRef.current;
|
|
198
|
+
if (!el_2) return;
|
|
171
199
|
if (e_1.target.hasAttribute("data-tao-scroll-thumb")) return;
|
|
172
200
|
const rect = e_1.currentTarget.getBoundingClientRect();
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
|
|
201
|
+
const trackSize = "y" === axis_0 ? rect.height : rect.width;
|
|
202
|
+
if (trackSize <= 0) return;
|
|
203
|
+
const clickPos = ("y" === axis_0 ? e_1.clientY - rect.top : e_1.clientX - rect.left) / trackSize;
|
|
204
|
+
if ("y" === axis_0) el_2.scrollTop = clickPos * (el_2.scrollHeight - el_2.clientHeight);
|
|
205
|
+
else setScrollLeft(el_2, clickPos * (el_2.scrollWidth - el_2.clientWidth));
|
|
176
206
|
};
|
|
177
|
-
$[
|
|
178
|
-
} else
|
|
179
|
-
const handleTrackClick =
|
|
207
|
+
$[16] = t16;
|
|
208
|
+
} else t16 = $[16];
|
|
209
|
+
const handleTrackClick = t16;
|
|
180
210
|
const showVertical = "vertical" === direction || "both" === direction;
|
|
181
211
|
const showHorizontal = "horizontal" === direction || "both" === direction;
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
let
|
|
185
|
-
if ($[
|
|
186
|
-
|
|
187
|
-
maxHeight:
|
|
188
|
-
maxWidth:
|
|
212
|
+
const t17 = maxHeight ?? void 0;
|
|
213
|
+
const t18 = maxWidth ?? void 0;
|
|
214
|
+
let t19;
|
|
215
|
+
if ($[17] !== t17 || $[18] !== t18) {
|
|
216
|
+
t19 = {
|
|
217
|
+
maxHeight: t17,
|
|
218
|
+
maxWidth: t18
|
|
189
219
|
};
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else
|
|
194
|
-
const rootStyle =
|
|
195
|
-
const
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
let
|
|
199
|
-
if ($[
|
|
200
|
-
|
|
201
|
-
overflowY:
|
|
202
|
-
overflowX:
|
|
203
|
-
...
|
|
220
|
+
$[17] = t17;
|
|
221
|
+
$[18] = t18;
|
|
222
|
+
$[19] = t19;
|
|
223
|
+
} else t19 = $[19];
|
|
224
|
+
const rootStyle = t19;
|
|
225
|
+
const t20 = showVertical ? "scroll" : "hidden";
|
|
226
|
+
const t21 = showHorizontal ? "scroll" : "hidden";
|
|
227
|
+
const t22 = styles?.viewport;
|
|
228
|
+
let t23;
|
|
229
|
+
if ($[20] !== t20 || $[21] !== t21 || $[22] !== t22) {
|
|
230
|
+
t23 = {
|
|
231
|
+
overflowY: t20,
|
|
232
|
+
overflowX: t21,
|
|
233
|
+
...t22
|
|
204
234
|
};
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
} else
|
|
210
|
-
const viewportStyle =
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
let
|
|
214
|
-
if ($[
|
|
215
|
-
|
|
216
|
-
"--tao-scrollbar-size":
|
|
217
|
-
"--tao-scrollbar-offset":
|
|
235
|
+
$[20] = t20;
|
|
236
|
+
$[21] = t21;
|
|
237
|
+
$[22] = t22;
|
|
238
|
+
$[23] = t23;
|
|
239
|
+
} else t23 = $[23];
|
|
240
|
+
const viewportStyle = t23;
|
|
241
|
+
const t24 = `${scrollbarSize}px`;
|
|
242
|
+
const t25 = `${scrollbarOffset}px`;
|
|
243
|
+
let t26;
|
|
244
|
+
if ($[24] !== t24 || $[25] !== t25) {
|
|
245
|
+
t26 = {
|
|
246
|
+
"--tao-scrollbar-size": t24,
|
|
247
|
+
"--tao-scrollbar-offset": t25
|
|
218
248
|
};
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
} else
|
|
223
|
-
const scrollbarVars =
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
let
|
|
228
|
-
if ($[
|
|
229
|
-
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
} else
|
|
234
|
-
const
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
249
|
+
$[24] = t24;
|
|
250
|
+
$[25] = t25;
|
|
251
|
+
$[26] = t26;
|
|
252
|
+
} else t26 = $[26];
|
|
253
|
+
const scrollbarVars = t26;
|
|
254
|
+
const t27 = scrollState.hasVertical || void 0;
|
|
255
|
+
const t28 = scrollState.hasHorizontal || void 0;
|
|
256
|
+
const t29 = classNames?.root;
|
|
257
|
+
let t30;
|
|
258
|
+
if ($[27] !== className || $[28] !== t29) {
|
|
259
|
+
t30 = cx(t29, className);
|
|
260
|
+
$[27] = className;
|
|
261
|
+
$[28] = t29;
|
|
262
|
+
$[29] = t30;
|
|
263
|
+
} else t30 = $[29];
|
|
264
|
+
const t31 = styles?.root;
|
|
265
|
+
let t32;
|
|
266
|
+
if ($[30] !== rootStyle || $[31] !== scrollbarVars || $[32] !== style || $[33] !== t31) {
|
|
267
|
+
t32 = {
|
|
238
268
|
...rootStyle,
|
|
239
269
|
...scrollbarVars,
|
|
240
|
-
...
|
|
270
|
+
...t31,
|
|
241
271
|
...style
|
|
242
272
|
};
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else
|
|
249
|
-
const
|
|
250
|
-
let t33;
|
|
251
|
-
if ($[33] !== t32) {
|
|
252
|
-
t33 = cx(t32);
|
|
253
|
-
$[33] = t32;
|
|
254
|
-
$[34] = t33;
|
|
255
|
-
} else t33 = $[34];
|
|
273
|
+
$[30] = rootStyle;
|
|
274
|
+
$[31] = scrollbarVars;
|
|
275
|
+
$[32] = style;
|
|
276
|
+
$[33] = t31;
|
|
277
|
+
$[34] = t32;
|
|
278
|
+
} else t32 = $[34];
|
|
279
|
+
const t33 = classNames?.viewport;
|
|
256
280
|
let t34;
|
|
257
|
-
if ($[35] !==
|
|
258
|
-
t34 =
|
|
281
|
+
if ($[35] !== t33) {
|
|
282
|
+
t34 = cx(t33);
|
|
283
|
+
$[35] = t33;
|
|
284
|
+
$[36] = t34;
|
|
285
|
+
} else t34 = $[36];
|
|
286
|
+
let t35;
|
|
287
|
+
if ($[37] !== children || $[38] !== handleScroll || $[39] !== t34 || $[40] !== viewportStyle) {
|
|
288
|
+
t35 = /*#__PURE__*/ jsx("div", {
|
|
259
289
|
ref: viewportRef,
|
|
260
290
|
"data-tao-scroll-viewport": "",
|
|
261
|
-
className:
|
|
291
|
+
className: t34,
|
|
262
292
|
style: viewportStyle,
|
|
263
293
|
onScroll: handleScroll,
|
|
264
294
|
children: children
|
|
265
295
|
});
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[37] = t33;
|
|
269
|
-
$[38] = viewportStyle;
|
|
296
|
+
$[37] = children;
|
|
297
|
+
$[38] = handleScroll;
|
|
270
298
|
$[39] = t34;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
299
|
+
$[40] = viewportStyle;
|
|
300
|
+
$[41] = t35;
|
|
301
|
+
} else t35 = $[41];
|
|
302
|
+
let t36;
|
|
303
|
+
if ($[42] !== scrollShadow || $[43] !== scrollState.atBottom || $[44] !== scrollState.atTop || $[45] !== showVertical) {
|
|
304
|
+
t36 = scrollShadow && showVertical && /*#__PURE__*/ jsxs(Fragment, {
|
|
275
305
|
children: [
|
|
276
306
|
/*#__PURE__*/ jsx("div", {
|
|
277
307
|
"data-tao-scroll-shadow": "top",
|
|
@@ -283,15 +313,15 @@ function ScrollArea(t0) {
|
|
|
283
313
|
})
|
|
284
314
|
]
|
|
285
315
|
});
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
} else
|
|
292
|
-
let
|
|
293
|
-
if ($[
|
|
294
|
-
|
|
316
|
+
$[42] = scrollShadow;
|
|
317
|
+
$[43] = scrollState.atBottom;
|
|
318
|
+
$[44] = scrollState.atTop;
|
|
319
|
+
$[45] = showVertical;
|
|
320
|
+
$[46] = t36;
|
|
321
|
+
} else t36 = $[46];
|
|
322
|
+
let t37;
|
|
323
|
+
if ($[47] !== scrollShadow || $[48] !== scrollState.atLeft || $[49] !== scrollState.atRight || $[50] !== showHorizontal) {
|
|
324
|
+
t37 = scrollShadow && showHorizontal && /*#__PURE__*/ jsxs(Fragment, {
|
|
295
325
|
children: [
|
|
296
326
|
/*#__PURE__*/ jsx("div", {
|
|
297
327
|
"data-tao-scroll-shadow": "left",
|
|
@@ -303,15 +333,15 @@ function ScrollArea(t0) {
|
|
|
303
333
|
})
|
|
304
334
|
]
|
|
305
335
|
});
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
} else
|
|
312
|
-
let
|
|
313
|
-
if ($[
|
|
314
|
-
|
|
336
|
+
$[47] = scrollShadow;
|
|
337
|
+
$[48] = scrollState.atLeft;
|
|
338
|
+
$[49] = scrollState.atRight;
|
|
339
|
+
$[50] = showHorizontal;
|
|
340
|
+
$[51] = t37;
|
|
341
|
+
} else t37 = $[51];
|
|
342
|
+
let t38;
|
|
343
|
+
if ($[52] !== classNames?.scrollbar || $[53] !== classNames?.thumb || $[54] !== locale || $[55] !== scrollState.hasVertical || $[56] !== scrollState.thumbYOffset || $[57] !== scrollState.thumbYRatio || $[58] !== showVertical || $[59] !== styles?.scrollbar || $[60] !== styles?.thumb) {
|
|
344
|
+
t38 = showVertical && scrollState.hasVertical && /*#__PURE__*/ jsx("button", {
|
|
315
345
|
type: "button",
|
|
316
346
|
"data-tao-scrollbar": "",
|
|
317
347
|
"data-tao-orientation": "vertical",
|
|
@@ -332,20 +362,20 @@ function ScrollArea(t0) {
|
|
|
332
362
|
onPointerDown: (e_3)=>handleThumbPointerDown("y", e_3)
|
|
333
363
|
})
|
|
334
364
|
});
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
} else
|
|
346
|
-
let
|
|
347
|
-
if ($[
|
|
348
|
-
|
|
365
|
+
$[52] = classNames?.scrollbar;
|
|
366
|
+
$[53] = classNames?.thumb;
|
|
367
|
+
$[54] = locale;
|
|
368
|
+
$[55] = scrollState.hasVertical;
|
|
369
|
+
$[56] = scrollState.thumbYOffset;
|
|
370
|
+
$[57] = scrollState.thumbYRatio;
|
|
371
|
+
$[58] = showVertical;
|
|
372
|
+
$[59] = styles?.scrollbar;
|
|
373
|
+
$[60] = styles?.thumb;
|
|
374
|
+
$[61] = t38;
|
|
375
|
+
} else t38 = $[61];
|
|
376
|
+
let t39;
|
|
377
|
+
if ($[62] !== classNames?.scrollbar || $[63] !== classNames?.thumb || $[64] !== locale || $[65] !== scrollState.hasHorizontal || $[66] !== scrollState.thumbXOffset || $[67] !== scrollState.thumbXRatio || $[68] !== showHorizontal || $[69] !== styles?.scrollbar || $[70] !== styles?.thumb) {
|
|
378
|
+
t39 = showHorizontal && scrollState.hasHorizontal && /*#__PURE__*/ jsx("button", {
|
|
349
379
|
type: "button",
|
|
350
380
|
"data-tao-scrollbar": "",
|
|
351
381
|
"data-tao-orientation": "horizontal",
|
|
@@ -366,48 +396,48 @@ function ScrollArea(t0) {
|
|
|
366
396
|
onPointerDown: (e_5)=>handleThumbPointerDown("x", e_5)
|
|
367
397
|
})
|
|
368
398
|
});
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
} else
|
|
380
|
-
let
|
|
381
|
-
if ($[
|
|
382
|
-
|
|
399
|
+
$[62] = classNames?.scrollbar;
|
|
400
|
+
$[63] = classNames?.thumb;
|
|
401
|
+
$[64] = locale;
|
|
402
|
+
$[65] = scrollState.hasHorizontal;
|
|
403
|
+
$[66] = scrollState.thumbXOffset;
|
|
404
|
+
$[67] = scrollState.thumbXRatio;
|
|
405
|
+
$[68] = showHorizontal;
|
|
406
|
+
$[69] = styles?.scrollbar;
|
|
407
|
+
$[70] = styles?.thumb;
|
|
408
|
+
$[71] = t39;
|
|
409
|
+
} else t39 = $[71];
|
|
410
|
+
let t40;
|
|
411
|
+
if ($[72] !== directionRef || $[73] !== t27 || $[74] !== t28 || $[75] !== t30 || $[76] !== t32 || $[77] !== t35 || $[78] !== t36 || $[79] !== t37 || $[80] !== t38 || $[81] !== t39 || $[82] !== type) {
|
|
412
|
+
t40 = /*#__PURE__*/ jsxs("div", {
|
|
383
413
|
ref: directionRef,
|
|
384
414
|
"data-tao-scroll-area": "",
|
|
385
415
|
"data-tao-scroll-type": type,
|
|
386
|
-
"data-tao-has-v":
|
|
387
|
-
"data-tao-has-h":
|
|
388
|
-
className:
|
|
389
|
-
style:
|
|
416
|
+
"data-tao-has-v": t27,
|
|
417
|
+
"data-tao-has-h": t28,
|
|
418
|
+
className: t30,
|
|
419
|
+
style: t32,
|
|
390
420
|
children: [
|
|
391
|
-
t34,
|
|
392
421
|
t35,
|
|
393
422
|
t36,
|
|
394
423
|
t37,
|
|
395
|
-
t38
|
|
424
|
+
t38,
|
|
425
|
+
t39
|
|
396
426
|
]
|
|
397
427
|
});
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[79] = t38;
|
|
408
|
-
$[80] = type;
|
|
428
|
+
$[72] = directionRef;
|
|
429
|
+
$[73] = t27;
|
|
430
|
+
$[74] = t28;
|
|
431
|
+
$[75] = t30;
|
|
432
|
+
$[76] = t32;
|
|
433
|
+
$[77] = t35;
|
|
434
|
+
$[78] = t36;
|
|
435
|
+
$[79] = t37;
|
|
436
|
+
$[80] = t38;
|
|
409
437
|
$[81] = t39;
|
|
410
|
-
|
|
411
|
-
|
|
438
|
+
$[82] = type;
|
|
439
|
+
$[83] = t40;
|
|
440
|
+
} else t40 = $[83];
|
|
441
|
+
return t40;
|
|
412
442
|
}
|
|
413
443
|
export { ScrollArea };
|