@rockshin/tao-ui 0.0.48 → 0.0.51

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.
Files changed (147) hide show
  1. package/dist/components/affix/affix.js +20 -16
  2. package/dist/components/alert/alert.js +114 -99
  3. package/dist/components/app/app-modals.js +134 -96
  4. package/dist/components/app/app-notices.js +39 -23
  5. package/dist/components/auto-complete/auto-complete.js +21 -7
  6. package/dist/components/avatar/avatar.js +31 -11
  7. package/dist/components/badge/badge.css +1 -1
  8. package/dist/components/badge/badge.js +72 -257
  9. package/dist/components/border-beam/border-beam.js +21 -17
  10. package/dist/components/breadcrumb/breadcrumb.js +178 -159
  11. package/dist/components/button/button.css +9 -1
  12. package/dist/components/button/button.js +61 -53
  13. package/dist/components/calendar/calendar.js +6 -4
  14. package/dist/components/card/card.js +24 -8
  15. package/dist/components/carousel/carousel.d.ts +1 -1
  16. package/dist/components/carousel/carousel.js +105 -68
  17. package/dist/components/cascader/cascader.js +54 -19
  18. package/dist/components/checkbox/checkbox.css +13 -2
  19. package/dist/components/checkbox/checkbox.d.ts +2 -0
  20. package/dist/components/checkbox/checkbox.js +320 -229
  21. package/dist/components/collapse/collapse-panels.d.ts +1 -1
  22. package/dist/components/collapse/collapse-panels.js +122 -113
  23. package/dist/components/collapse/collapse.js +98 -63
  24. package/dist/components/color-picker/color-picker.js +539 -441
  25. package/dist/components/color-picker/color.js +1 -1
  26. package/dist/components/context-menu/context-menu.d.ts +1 -1
  27. package/dist/components/context-menu/context-menu.js +108 -68
  28. package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
  29. package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
  30. package/dist/components/date-picker/calendar/month-grid.js +79 -37
  31. package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
  32. package/dist/components/date-picker/calendar/time-panel.js +94 -89
  33. package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
  34. package/dist/components/date-picker/calendar/year-grid.js +66 -35
  35. package/dist/components/date-picker/date-picker.css +24 -1
  36. package/dist/components/date-picker/date-picker.js +99 -53
  37. package/dist/components/date-picker/presets.d.ts +2 -1
  38. package/dist/components/date-picker/presets.js +27 -24
  39. package/dist/components/date-picker/range-picker.js +308 -153
  40. package/dist/components/descriptions/descriptions.js +7 -3
  41. package/dist/components/divider/divider.css +1 -1
  42. package/dist/components/divider/divider.js +1 -1
  43. package/dist/components/drawer/drawer.js +201 -369
  44. package/dist/components/dropdown/dropdown.d.ts +1 -1
  45. package/dist/components/dropdown/dropdown.js +183 -279
  46. package/dist/components/empty/empty.js +57 -78
  47. package/dist/components/float-button/float-button.d.ts +1 -0
  48. package/dist/components/float-button/float-button.js +47 -30
  49. package/dist/components/form/field-control.d.ts +4 -2
  50. package/dist/components/form/field-control.js +17 -9
  51. package/dist/components/form/form-context.d.ts +8 -2
  52. package/dist/components/form/form-context.js +2 -1
  53. package/dist/components/form/form-item.js +85 -63
  54. package/dist/components/form/use-form.d.ts +2 -1
  55. package/dist/components/form/use-form.js +2 -1
  56. package/dist/components/form-field/form-field-view.d.ts +3 -1
  57. package/dist/components/form-field/form-field-view.js +194 -141
  58. package/dist/components/form-section/form-section.d.ts +1 -1
  59. package/dist/components/form-section/form-section.js +52 -45
  60. package/dist/components/image/image.js +585 -477
  61. package/dist/components/input/base-input.js +8 -9
  62. package/dist/components/input/input-shared.d.ts +5 -2
  63. package/dist/components/input/input-shared.js +42 -18
  64. package/dist/components/input/input.css +1 -0
  65. package/dist/components/input/otp.js +236 -217
  66. package/dist/components/input/password.js +2 -1
  67. package/dist/components/input/search.js +8 -7
  68. package/dist/components/list/list-pagination.js +41 -36
  69. package/dist/components/list/list.js +141 -125
  70. package/dist/components/listy/listy.js +175 -106
  71. package/dist/components/masonry/masonry.js +108 -85
  72. package/dist/components/mentions/mentions.js +12 -3
  73. package/dist/components/menu/menu-render.d.ts +9 -3
  74. package/dist/components/menu/menu-render.js +99 -36
  75. package/dist/components/modal/confirm-dialog.js +10 -4
  76. package/dist/components/modal/confirm.js +3 -7
  77. package/dist/components/modal/index.js +9 -3
  78. package/dist/components/modal/modal.js +390 -365
  79. package/dist/components/pagination/pagination.js +105 -96
  80. package/dist/components/popconfirm/popconfirm.d.ts +1 -1
  81. package/dist/components/popconfirm/popconfirm.js +219 -168
  82. package/dist/components/popover/popover.js +330 -243
  83. package/dist/components/progress/progress.css +2 -2
  84. package/dist/components/progress/progress.js +232 -458
  85. package/dist/components/qr-code/qr-code.js +72 -66
  86. package/dist/components/radio/radio.css +15 -4
  87. package/dist/components/radio/radio.d.ts +2 -1
  88. package/dist/components/radio/radio.js +260 -198
  89. package/dist/components/rate/rate.js +173 -113
  90. package/dist/components/scroll-area/scroll-area.js +241 -211
  91. package/dist/components/segmented/segmented.js +73 -41
  92. package/dist/components/select/mobile-select.d.ts +2 -1
  93. package/dist/components/select/mobile-select.js +24 -13
  94. package/dist/components/select/select-searchable-list.d.ts +2 -1
  95. package/dist/components/select/select-searchable-list.js +2 -3
  96. package/dist/components/select/select.css +3 -2
  97. package/dist/components/select/select.js +49 -25
  98. package/dist/components/select/use-select-selection.d.ts +1 -1
  99. package/dist/components/select/use-select-selection.js +7 -4
  100. package/dist/components/skeleton/skeleton.js +56 -48
  101. package/dist/components/slider/slider.js +87 -212
  102. package/dist/components/sonner/sonner.js +109 -93
  103. package/dist/components/spinner/spinner.js +147 -138
  104. package/dist/components/splitter/splitter.js +222 -159
  105. package/dist/components/statistic/statistic.js +7 -6
  106. package/dist/components/steps/steps.js +88 -81
  107. package/dist/components/steps/use-display-steps.js +1 -1
  108. package/dist/components/switch/switch.js +89 -89
  109. package/dist/components/table/table-filter.js +66 -56
  110. package/dist/components/table/table-icons.d.ts +2 -1
  111. package/dist/components/table/table-icons.js +11 -9
  112. package/dist/components/table/table-model.js +1 -1
  113. package/dist/components/table/table.js +107 -83
  114. package/dist/components/table/use-table-data.d.ts +6 -3
  115. package/dist/components/table/use-table-data.js +166 -130
  116. package/dist/components/tabs/tabs.css +1 -1
  117. package/dist/components/tabs/tabs.js +236 -179
  118. package/dist/components/tag/tag.d.ts +2 -2
  119. package/dist/components/tag/tag.js +111 -108
  120. package/dist/components/textarea/textarea.js +22 -17
  121. package/dist/components/time-picker/time-picker.js +5 -3
  122. package/dist/components/timeline/timeline.css +6 -1
  123. package/dist/components/timeline/timeline.js +21 -11
  124. package/dist/components/tooltip/tooltip.d.ts +2 -2
  125. package/dist/components/tooltip/tooltip.js +123 -233
  126. package/dist/components/tour/tour.css +4 -0
  127. package/dist/components/tour/tour.js +400 -331
  128. package/dist/components/transfer/transfer-list.js +31 -12
  129. package/dist/components/transfer/transfer-parts.js +1 -1
  130. package/dist/components/transfer/transfer-types.d.ts +1 -0
  131. package/dist/components/transfer/transfer.css +5 -0
  132. package/dist/components/transfer/transfer.js +29 -14
  133. package/dist/components/tree/tree-keyboard.d.ts +1 -1
  134. package/dist/components/tree/tree-keyboard.js +5 -3
  135. package/dist/components/tree/tree.js +74 -59
  136. package/dist/components/tree-select/select-engine.d.ts +3 -2
  137. package/dist/components/tree-select/select-engine.js +18 -16
  138. package/dist/components/tree-select/tree-select.js +21 -5
  139. package/dist/components/upload/upload.css +8 -0
  140. package/dist/components/upload/upload.js +160 -72
  141. package/dist/components/watermark/watermark.js +36 -29
  142. package/dist/number-input/use-number-input.js +129 -90
  143. package/dist/number-input/validate.js +32 -5
  144. package/dist/provider/merge-locale.js +12 -9
  145. package/dist/provider/tao-provider.d.ts +3 -1
  146. package/dist/provider/tao-provider.js +123 -86
  147. package/package.json +4 -3
@@ -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(82);
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] = textDirection;
60
- $[2] = t8;
61
- } else t8 = $[2];
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 ($[3] !== updateScrollState) {
72
+ if ($[5] !== updateScrollState) {
66
73
  t9 = ()=>{
67
74
  const el_0 = viewportRef.current;
68
75
  if (!el_0) return;
69
- updateScrollState();
70
- const observer = new ResizeObserver(()=>updateScrollState());
71
- observer.observe(el_0);
72
- if (el_0.firstElementChild) observer.observe(el_0.firstElementChild);
73
- return ()=>observer.disconnect();
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
- $[3] = updateScrollState;
79
- $[4] = t10;
80
- $[5] = t9;
96
+ $[5] = updateScrollState;
97
+ $[6] = t10;
98
+ $[7] = t9;
81
99
  } else {
82
- t10 = $[4];
83
- t9 = $[5];
100
+ t10 = $[6];
101
+ t9 = $[7];
84
102
  }
85
103
  useEffect(t9, t10);
86
- const firedScrollEnd = useRef(false);
87
104
  let t11;
88
- if ($[6] !== onScrollEnd || $[7] !== onScrollProp || $[8] !== scrollEndThreshold || $[9] !== updateScrollState) {
105
+ if ($[8] !== onScrollEnd || $[9] !== onScrollProp || $[10] !== updateScrollState) {
89
106
  t11 = (e)=>{
90
- updateScrollState();
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
- const el_1 = e.currentTarget;
94
- const { scrollTop: scrollTop_0, scrollHeight: scrollHeight_0, clientHeight: clientHeight_0 } = el_1;
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
- $[6] = onScrollEnd;
103
- $[7] = onScrollProp;
104
- $[8] = scrollEndThreshold;
105
- $[9] = updateScrollState;
106
- $[10] = t11;
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 dragCleanup = useRef(null);
123
+ const activeDrag = useRef(null);
110
124
  let t12;
111
125
  let t13;
112
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
113
- t12 = ()=>()=>dragCleanup.current?.();
126
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
127
+ t12 = ()=>()=>activeDrag.current?.cleanup();
114
128
  t13 = [];
115
- $[11] = t12;
116
- $[12] = t13;
129
+ $[12] = t12;
130
+ $[13] = t13;
117
131
  } else {
118
- t12 = $[11];
119
- t13 = $[12];
132
+ t12 = $[12];
133
+ t13 = $[13];
120
134
  }
121
135
  useEffect(t12, t13);
122
136
  let t14;
123
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
124
- t14 = (axis, e_0)=>{
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
- dragCleanup.current?.();
128
- const el_2 = viewportRef.current;
129
- if (!el_2) return;
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 ? el_2.scrollTop : getScrollLeft(el_2);
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
- document.removeEventListener("pointermove", handleMove);
151
- document.removeEventListener("pointerup", handleEnd);
152
- document.removeEventListener("pointercancel", handleEnd);
153
- dragCleanup.current = null;
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
- dragCleanup.current = cleanup;
159
- document.addEventListener("pointermove", handleMove);
160
- document.addEventListener("pointerup", handleEnd);
161
- document.addEventListener("pointercancel", handleEnd);
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
- $[13] = t14;
164
- } else t14 = $[13];
165
- const handleThumbPointerDown = t14;
166
- let t15;
167
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
168
- t15 = (axis_0, e_1)=>{
169
- const el_3 = viewportRef.current;
170
- if (!el_3) return;
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 clickPos = "y" === axis_0 ? (e_1.clientY - rect.top) / rect.height : (e_1.clientX - rect.left) / rect.width;
174
- if ("y" === axis_0) el_3.scrollTop = clickPos * (el_3.scrollHeight - el_3.clientHeight);
175
- else setScrollLeft(el_3, clickPos * (el_3.scrollWidth - el_3.clientWidth));
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
- $[14] = t15;
178
- } else t15 = $[14];
179
- const handleTrackClick = t15;
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 t16 = maxHeight ?? void 0;
183
- const t17 = maxWidth ?? void 0;
184
- let t18;
185
- if ($[15] !== t16 || $[16] !== t17) {
186
- t18 = {
187
- maxHeight: t16,
188
- maxWidth: t17
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
- $[15] = t16;
191
- $[16] = t17;
192
- $[17] = t18;
193
- } else t18 = $[17];
194
- const rootStyle = t18;
195
- const t19 = showVertical ? "scroll" : "hidden";
196
- const t20 = showHorizontal ? "scroll" : "hidden";
197
- const t21 = styles?.viewport;
198
- let t22;
199
- if ($[18] !== t19 || $[19] !== t20 || $[20] !== t21) {
200
- t22 = {
201
- overflowY: t19,
202
- overflowX: t20,
203
- ...t21
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
- $[18] = t19;
206
- $[19] = t20;
207
- $[20] = t21;
208
- $[21] = t22;
209
- } else t22 = $[21];
210
- const viewportStyle = t22;
211
- const t23 = `${scrollbarSize}px`;
212
- const t24 = `${scrollbarOffset}px`;
213
- let t25;
214
- if ($[22] !== t23 || $[23] !== t24) {
215
- t25 = {
216
- "--tao-scrollbar-size": t23,
217
- "--tao-scrollbar-offset": t24
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
- $[22] = t23;
220
- $[23] = t24;
221
- $[24] = t25;
222
- } else t25 = $[24];
223
- const scrollbarVars = t25;
224
- const t26 = scrollState.hasVertical || void 0;
225
- const t27 = scrollState.hasHorizontal || void 0;
226
- const t28 = classNames?.root;
227
- let t29;
228
- if ($[25] !== className || $[26] !== t28) {
229
- t29 = cx(t28, className);
230
- $[25] = className;
231
- $[26] = t28;
232
- $[27] = t29;
233
- } else t29 = $[27];
234
- const t30 = styles?.root;
235
- let t31;
236
- if ($[28] !== rootStyle || $[29] !== scrollbarVars || $[30] !== style || $[31] !== t30) {
237
- t31 = {
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
- ...t30,
270
+ ...t31,
241
271
  ...style
242
272
  };
243
- $[28] = rootStyle;
244
- $[29] = scrollbarVars;
245
- $[30] = style;
246
- $[31] = t30;
247
- $[32] = t31;
248
- } else t31 = $[32];
249
- const t32 = classNames?.viewport;
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] !== children || $[36] !== handleScroll || $[37] !== t33 || $[38] !== viewportStyle) {
258
- t34 = /*#__PURE__*/ jsx("div", {
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: t33,
291
+ className: t34,
262
292
  style: viewportStyle,
263
293
  onScroll: handleScroll,
264
294
  children: children
265
295
  });
266
- $[35] = children;
267
- $[36] = handleScroll;
268
- $[37] = t33;
269
- $[38] = viewportStyle;
296
+ $[37] = children;
297
+ $[38] = handleScroll;
270
298
  $[39] = t34;
271
- } else t34 = $[39];
272
- let t35;
273
- if ($[40] !== scrollShadow || $[41] !== scrollState.atBottom || $[42] !== scrollState.atTop || $[43] !== showVertical) {
274
- t35 = scrollShadow && showVertical && /*#__PURE__*/ jsxs(Fragment, {
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
- $[40] = scrollShadow;
287
- $[41] = scrollState.atBottom;
288
- $[42] = scrollState.atTop;
289
- $[43] = showVertical;
290
- $[44] = t35;
291
- } else t35 = $[44];
292
- let t36;
293
- if ($[45] !== scrollShadow || $[46] !== scrollState.atLeft || $[47] !== scrollState.atRight || $[48] !== showHorizontal) {
294
- t36 = scrollShadow && showHorizontal && /*#__PURE__*/ jsxs(Fragment, {
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
- $[45] = scrollShadow;
307
- $[46] = scrollState.atLeft;
308
- $[47] = scrollState.atRight;
309
- $[48] = showHorizontal;
310
- $[49] = t36;
311
- } else t36 = $[49];
312
- let t37;
313
- if ($[50] !== classNames?.scrollbar || $[51] !== classNames?.thumb || $[52] !== locale || $[53] !== scrollState.hasVertical || $[54] !== scrollState.thumbYOffset || $[55] !== scrollState.thumbYRatio || $[56] !== showVertical || $[57] !== styles?.scrollbar || $[58] !== styles?.thumb) {
314
- t37 = showVertical && scrollState.hasVertical && /*#__PURE__*/ jsx("button", {
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
- $[50] = classNames?.scrollbar;
336
- $[51] = classNames?.thumb;
337
- $[52] = locale;
338
- $[53] = scrollState.hasVertical;
339
- $[54] = scrollState.thumbYOffset;
340
- $[55] = scrollState.thumbYRatio;
341
- $[56] = showVertical;
342
- $[57] = styles?.scrollbar;
343
- $[58] = styles?.thumb;
344
- $[59] = t37;
345
- } else t37 = $[59];
346
- let t38;
347
- if ($[60] !== classNames?.scrollbar || $[61] !== classNames?.thumb || $[62] !== locale || $[63] !== scrollState.hasHorizontal || $[64] !== scrollState.thumbXOffset || $[65] !== scrollState.thumbXRatio || $[66] !== showHorizontal || $[67] !== styles?.scrollbar || $[68] !== styles?.thumb) {
348
- t38 = showHorizontal && scrollState.hasHorizontal && /*#__PURE__*/ jsx("button", {
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
- $[60] = classNames?.scrollbar;
370
- $[61] = classNames?.thumb;
371
- $[62] = locale;
372
- $[63] = scrollState.hasHorizontal;
373
- $[64] = scrollState.thumbXOffset;
374
- $[65] = scrollState.thumbXRatio;
375
- $[66] = showHorizontal;
376
- $[67] = styles?.scrollbar;
377
- $[68] = styles?.thumb;
378
- $[69] = t38;
379
- } else t38 = $[69];
380
- let t39;
381
- if ($[70] !== directionRef || $[71] !== t26 || $[72] !== t27 || $[73] !== t29 || $[74] !== t31 || $[75] !== t34 || $[76] !== t35 || $[77] !== t36 || $[78] !== t37 || $[79] !== t38 || $[80] !== type) {
382
- t39 = /*#__PURE__*/ jsxs("div", {
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": t26,
387
- "data-tao-has-h": t27,
388
- className: t29,
389
- style: t31,
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
- $[70] = directionRef;
399
- $[71] = t26;
400
- $[72] = t27;
401
- $[73] = t29;
402
- $[74] = t31;
403
- $[75] = t34;
404
- $[76] = t35;
405
- $[77] = t36;
406
- $[78] = t37;
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
- } else t39 = $[81];
411
- return t39;
438
+ $[82] = type;
439
+ $[83] = t40;
440
+ } else t40 = $[83];
441
+ return t40;
412
442
  }
413
443
  export { ScrollArea };