@cfx-dev/ui-components 0.0.6 → 0.0.7
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/{Combination-AG9vHdSx.js → Combination-Dj-a6dCZ.js} +546 -562
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +93 -109
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Select/Select.js +271 -280
- package/dist/extends-Dk_bSU3E.js +13 -0
- package/dist/inheritsLoose-A8WKSWDx.js +11 -0
- package/package.json +2 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { F as k } from "../../Combination-
|
|
3
|
+
import { F as k } from "../../Combination-Dj-a6dCZ.js";
|
|
4
4
|
import { Button as p } from "../Button/Button.js";
|
|
5
5
|
import { I as h } from "../../Icons-B26SczGZ.js";
|
|
6
6
|
import { Interactive as f } from "../Interactive/Interactive.js";
|
|
@@ -1,67 +1,51 @@
|
|
|
1
1
|
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
-
import N, { createElement as k, PureComponent as
|
|
2
|
+
import N, { createElement as k, PureComponent as re } from "react";
|
|
3
|
+
import { _ as ie } from "../../../extends-Dk_bSU3E.js";
|
|
4
|
+
import { _ as ne } from "../../../inheritsLoose-A8WKSWDx.js";
|
|
3
5
|
import { clsx as oe } from "../../../utils/clsx.js";
|
|
4
6
|
import { Scrollable as le } from "./Scrollable.js";
|
|
5
7
|
import { s as se } from "../../../Rail-DoYzqKk4.js";
|
|
6
|
-
function
|
|
7
|
-
return A = Object.assign ? Object.assign.bind() : function(r) {
|
|
8
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
9
|
-
var i = arguments[t];
|
|
10
|
-
for (var l in i)
|
|
11
|
-
({}).hasOwnProperty.call(i, l) && (r[l] = i[l]);
|
|
12
|
-
}
|
|
13
|
-
return r;
|
|
14
|
-
}, A.apply(null, arguments);
|
|
15
|
-
}
|
|
16
|
-
function H(r) {
|
|
8
|
+
function $(r) {
|
|
17
9
|
if (r === void 0)
|
|
18
10
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19
11
|
return r;
|
|
20
12
|
}
|
|
21
|
-
function
|
|
22
|
-
return F = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, l) {
|
|
23
|
-
return i.__proto__ = l, i;
|
|
24
|
-
}, F(r, t);
|
|
25
|
-
}
|
|
26
|
-
function ae(r, t) {
|
|
27
|
-
r.prototype = Object.create(t.prototype), r.prototype.constructor = r, F(r, t);
|
|
28
|
-
}
|
|
29
|
-
var j = Number.isNaN || function(t) {
|
|
13
|
+
var q = Number.isNaN || function(t) {
|
|
30
14
|
return typeof t == "number" && t !== t;
|
|
31
15
|
};
|
|
32
|
-
function
|
|
33
|
-
return !!(r === t ||
|
|
16
|
+
function ae(r, t) {
|
|
17
|
+
return !!(r === t || q(r) && q(t));
|
|
34
18
|
}
|
|
35
|
-
function
|
|
19
|
+
function ce(r, t) {
|
|
36
20
|
if (r.length !== t.length)
|
|
37
21
|
return !1;
|
|
38
22
|
for (var i = 0; i < r.length; i++)
|
|
39
|
-
if (!
|
|
23
|
+
if (!ae(r[i], t[i]))
|
|
40
24
|
return !1;
|
|
41
25
|
return !0;
|
|
42
26
|
}
|
|
43
27
|
function D(r, t) {
|
|
44
|
-
t === void 0 && (t =
|
|
45
|
-
var i, l = [], a,
|
|
28
|
+
t === void 0 && (t = ce);
|
|
29
|
+
var i, l = [], a, I = !1;
|
|
46
30
|
function m() {
|
|
47
31
|
for (var v = [], S = 0; S < arguments.length; S++)
|
|
48
32
|
v[S] = arguments[S];
|
|
49
|
-
return
|
|
33
|
+
return I && i === this && t(v, l) || (a = r.apply(this, v), I = !0, i = this, l = v), a;
|
|
50
34
|
}
|
|
51
35
|
return m;
|
|
52
36
|
}
|
|
53
|
-
var
|
|
37
|
+
var ue = typeof performance == "object" && typeof performance.now == "function", H = ue ? function() {
|
|
54
38
|
return performance.now();
|
|
55
39
|
} : function() {
|
|
56
40
|
return Date.now();
|
|
57
41
|
};
|
|
58
|
-
function
|
|
42
|
+
function K(r) {
|
|
59
43
|
cancelAnimationFrame(r.id);
|
|
60
44
|
}
|
|
61
|
-
function
|
|
62
|
-
var i =
|
|
45
|
+
function de(r, t) {
|
|
46
|
+
var i = H();
|
|
63
47
|
function l() {
|
|
64
|
-
|
|
48
|
+
H() - i >= t ? r.call(null) : a.id = requestAnimationFrame(l);
|
|
65
49
|
}
|
|
66
50
|
var a = {
|
|
67
51
|
id: requestAnimationFrame(l)
|
|
@@ -69,7 +53,7 @@ function fe(r, t) {
|
|
|
69
53
|
return a;
|
|
70
54
|
}
|
|
71
55
|
var L = -1;
|
|
72
|
-
function
|
|
56
|
+
function j(r) {
|
|
73
57
|
if (r === void 0 && (r = !1), L === -1 || r) {
|
|
74
58
|
var t = document.createElement("div"), i = t.style;
|
|
75
59
|
i.width = "50px", i.height = "50px", i.overflow = "scroll", document.body.appendChild(t), L = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -77,7 +61,7 @@ function G(r) {
|
|
|
77
61
|
return L;
|
|
78
62
|
}
|
|
79
63
|
var _ = null;
|
|
80
|
-
function
|
|
64
|
+
function B(r) {
|
|
81
65
|
if (r === void 0 && (r = !1), _ === null || r) {
|
|
82
66
|
var t = document.createElement("div"), i = t.style;
|
|
83
67
|
i.width = "50px", i.height = "50px", i.overflow = "scroll", i.direction = "rtl";
|
|
@@ -87,18 +71,18 @@ function J(r) {
|
|
|
87
71
|
return _;
|
|
88
72
|
}
|
|
89
73
|
process.env.NODE_ENV;
|
|
90
|
-
var
|
|
74
|
+
var fe = 150, he = function(t, i) {
|
|
91
75
|
return t;
|
|
92
76
|
}, P = null, M = null;
|
|
93
77
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (P = /* @__PURE__ */ new WeakSet(), M = /* @__PURE__ */ new WeakSet());
|
|
94
|
-
function
|
|
95
|
-
var t, i = r.getItemOffset, l = r.getEstimatedTotalSize, a = r.getItemSize,
|
|
78
|
+
function pe(r) {
|
|
79
|
+
var t, i = r.getItemOffset, l = r.getEstimatedTotalSize, a = r.getItemSize, I = r.getOffsetForIndexAndAlignment, m = r.getStartIndexForOffset, v = r.getStopIndexForStartIndex, S = r.initInstanceProps, y = r.shouldResetStyleCacheOnItemSizeChange, g = r.validateProps;
|
|
96
80
|
return t = /* @__PURE__ */ function(w) {
|
|
97
|
-
|
|
98
|
-
function
|
|
81
|
+
ne(b, w);
|
|
82
|
+
function b(p) {
|
|
99
83
|
var e;
|
|
100
|
-
return e = w.call(this, p) || this, e._instanceProps = S(e.props,
|
|
101
|
-
instance:
|
|
84
|
+
return e = w.call(this, p) || this, e._instanceProps = S(e.props, $(e)), e._outerRef = void 0, e._resetIsScrollingTimeoutId = null, e.state = {
|
|
85
|
+
instance: $(e),
|
|
102
86
|
isScrolling: !1,
|
|
103
87
|
scrollDirection: "forward",
|
|
104
88
|
scrollOffset: typeof e.props.initialScrollOffset == "number" ? e.props.initialScrollOffset : 0,
|
|
@@ -117,18 +101,18 @@ function me(r) {
|
|
|
117
101
|
scrollUpdateWasRequested: s
|
|
118
102
|
});
|
|
119
103
|
}), e._getItemStyle = void 0, e._getItemStyle = function(n) {
|
|
120
|
-
var o = e.props, s = o.direction, u = o.itemSize, f = o.layout, c = e._getItemStyleCache(
|
|
104
|
+
var o = e.props, s = o.direction, u = o.itemSize, f = o.layout, c = e._getItemStyleCache(y && u, y && f, y && s), d;
|
|
121
105
|
if (c.hasOwnProperty(n))
|
|
122
106
|
d = c[n];
|
|
123
107
|
else {
|
|
124
|
-
var h = i(e.props, n, e._instanceProps),
|
|
108
|
+
var h = i(e.props, n, e._instanceProps), T = a(e.props, n, e._instanceProps), O = s === "horizontal" || f === "horizontal", x = s === "rtl", E = O ? h : 0;
|
|
125
109
|
c[n] = d = {
|
|
126
110
|
position: "absolute",
|
|
127
111
|
left: x ? void 0 : E,
|
|
128
112
|
right: x ? E : void 0,
|
|
129
|
-
top:
|
|
130
|
-
height:
|
|
131
|
-
width:
|
|
113
|
+
top: O ? 0 : h,
|
|
114
|
+
height: O ? "100%" : T,
|
|
115
|
+
width: O ? T : "100%"
|
|
132
116
|
};
|
|
133
117
|
}
|
|
134
118
|
return d;
|
|
@@ -141,7 +125,7 @@ function me(r) {
|
|
|
141
125
|
return null;
|
|
142
126
|
var d = e.props.direction, h = u;
|
|
143
127
|
if (d === "rtl")
|
|
144
|
-
switch (
|
|
128
|
+
switch (B()) {
|
|
145
129
|
case "negative":
|
|
146
130
|
h = -u;
|
|
147
131
|
break;
|
|
@@ -173,7 +157,7 @@ function me(r) {
|
|
|
173
157
|
var o = e.props.outerRef;
|
|
174
158
|
e._outerRef = n, typeof o == "function" ? o(n) : o != null && typeof o == "object" && o.hasOwnProperty("current") && (o.current = n);
|
|
175
159
|
}, e._resetIsScrollingDebounced = function() {
|
|
176
|
-
e._resetIsScrollingTimeoutId !== null &&
|
|
160
|
+
e._resetIsScrollingTimeoutId !== null && K(e._resetIsScrollingTimeoutId), e._resetIsScrollingTimeoutId = de(e._resetIsScrolling, fe);
|
|
177
161
|
}, e._resetIsScrolling = function() {
|
|
178
162
|
e._resetIsScrollingTimeoutId = null, e.setState({
|
|
179
163
|
isScrolling: !1
|
|
@@ -182,11 +166,11 @@ function me(r) {
|
|
|
182
166
|
});
|
|
183
167
|
}, e;
|
|
184
168
|
}
|
|
185
|
-
|
|
186
|
-
return
|
|
169
|
+
b.getDerivedStateFromProps = function(e, n) {
|
|
170
|
+
return me(e, n), g(e), null;
|
|
187
171
|
};
|
|
188
|
-
var
|
|
189
|
-
return
|
|
172
|
+
var z = b.prototype;
|
|
173
|
+
return z.scrollTo = function(e) {
|
|
190
174
|
e = Math.max(0, e), this.setState(function(n) {
|
|
191
175
|
return n.scrollOffset === e ? null : {
|
|
192
176
|
scrollDirection: n.scrollOffset < e ? "forward" : "backward",
|
|
@@ -194,30 +178,30 @@ function me(r) {
|
|
|
194
178
|
scrollUpdateWasRequested: !0
|
|
195
179
|
};
|
|
196
180
|
}, this._resetIsScrollingDebounced);
|
|
197
|
-
},
|
|
181
|
+
}, z.scrollToItem = function(e, n) {
|
|
198
182
|
n === void 0 && (n = "auto");
|
|
199
183
|
var o = this.props, s = o.itemCount, u = o.layout, f = this.state.scrollOffset;
|
|
200
184
|
e = Math.max(0, Math.min(e, s - 1));
|
|
201
185
|
var c = 0;
|
|
202
186
|
if (this._outerRef) {
|
|
203
187
|
var d = this._outerRef;
|
|
204
|
-
u === "vertical" ? c = d.scrollWidth > d.clientWidth ?
|
|
188
|
+
u === "vertical" ? c = d.scrollWidth > d.clientWidth ? j() : 0 : c = d.scrollHeight > d.clientHeight ? j() : 0;
|
|
205
189
|
}
|
|
206
|
-
this.scrollTo(
|
|
207
|
-
},
|
|
190
|
+
this.scrollTo(I(this.props, e, n, f, this._instanceProps, c));
|
|
191
|
+
}, z.componentDidMount = function() {
|
|
208
192
|
var e = this.props, n = e.direction, o = e.initialScrollOffset, s = e.layout;
|
|
209
193
|
if (typeof o == "number" && this._outerRef != null) {
|
|
210
194
|
var u = this._outerRef;
|
|
211
195
|
n === "horizontal" || s === "horizontal" ? u.scrollLeft = o : u.scrollTop = o;
|
|
212
196
|
}
|
|
213
197
|
this._callPropsCallbacks();
|
|
214
|
-
},
|
|
198
|
+
}, z.componentDidUpdate = function() {
|
|
215
199
|
var e = this.props, n = e.direction, o = e.layout, s = this.state, u = s.scrollOffset, f = s.scrollUpdateWasRequested;
|
|
216
200
|
if (f && this._outerRef != null) {
|
|
217
201
|
var c = this._outerRef;
|
|
218
202
|
if (n === "horizontal" || o === "horizontal")
|
|
219
203
|
if (n === "rtl")
|
|
220
|
-
switch (
|
|
204
|
+
switch (B()) {
|
|
221
205
|
case "negative":
|
|
222
206
|
c.scrollLeft = -u;
|
|
223
207
|
break;
|
|
@@ -235,43 +219,43 @@ function me(r) {
|
|
|
235
219
|
c.scrollTop = u;
|
|
236
220
|
}
|
|
237
221
|
this._callPropsCallbacks();
|
|
238
|
-
},
|
|
239
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
240
|
-
},
|
|
241
|
-
var e = this.props, n = e.children, o = e.className, s = e.direction, u = e.height, f = e.innerRef, c = e.innerElementType, d = e.innerTagName, h = e.itemCount,
|
|
222
|
+
}, z.componentWillUnmount = function() {
|
|
223
|
+
this._resetIsScrollingTimeoutId !== null && K(this._resetIsScrollingTimeoutId);
|
|
224
|
+
}, z.render = function() {
|
|
225
|
+
var e = this.props, n = e.children, o = e.className, s = e.direction, u = e.height, f = e.innerRef, c = e.innerElementType, d = e.innerTagName, h = e.itemCount, T = e.itemData, O = e.itemKey, x = O === void 0 ? he : O, E = e.layout, G = e.outerElementType, J = e.outerTagName, Q = e.style, X = e.useIsScrolling, Y = e.width, A = this.state.isScrolling, W = s === "horizontal" || E === "horizontal", Z = W ? this._onScrollHorizontal : this._onScrollVertical, F = this._getRangeToRender(), ee = F[0], te = F[1], V = [];
|
|
242
226
|
if (h > 0)
|
|
243
|
-
for (var C =
|
|
244
|
-
|
|
245
|
-
data:
|
|
246
|
-
key: x(C,
|
|
227
|
+
for (var C = ee; C <= te; C++)
|
|
228
|
+
V.push(k(n, {
|
|
229
|
+
data: T,
|
|
230
|
+
key: x(C, T),
|
|
247
231
|
index: C,
|
|
248
|
-
isScrolling:
|
|
232
|
+
isScrolling: X ? A : void 0,
|
|
249
233
|
style: this._getItemStyle(C)
|
|
250
234
|
}));
|
|
251
|
-
var
|
|
252
|
-
return k(
|
|
235
|
+
var U = l(this.props, this._instanceProps);
|
|
236
|
+
return k(G || J || "div", {
|
|
253
237
|
className: o,
|
|
254
|
-
onScroll:
|
|
238
|
+
onScroll: Z,
|
|
255
239
|
ref: this._outerRefSetter,
|
|
256
|
-
style:
|
|
240
|
+
style: ie({
|
|
257
241
|
position: "relative",
|
|
258
242
|
height: u,
|
|
259
|
-
width:
|
|
243
|
+
width: Y,
|
|
260
244
|
overflow: "auto",
|
|
261
245
|
WebkitOverflowScrolling: "touch",
|
|
262
246
|
willChange: "transform",
|
|
263
247
|
direction: s
|
|
264
|
-
},
|
|
248
|
+
}, Q)
|
|
265
249
|
}, k(c || d || "div", {
|
|
266
|
-
children:
|
|
250
|
+
children: V,
|
|
267
251
|
ref: f,
|
|
268
252
|
style: {
|
|
269
|
-
height: W ? "100%" :
|
|
270
|
-
pointerEvents:
|
|
271
|
-
width: W ?
|
|
253
|
+
height: W ? "100%" : U,
|
|
254
|
+
pointerEvents: A ? "none" : void 0,
|
|
255
|
+
width: W ? U : "100%"
|
|
272
256
|
}
|
|
273
257
|
}));
|
|
274
|
-
},
|
|
258
|
+
}, z._callPropsCallbacks = function() {
|
|
275
259
|
if (typeof this.props.onItemsRendered == "function") {
|
|
276
260
|
var e = this.props.itemCount;
|
|
277
261
|
if (e > 0) {
|
|
@@ -280,17 +264,17 @@ function me(r) {
|
|
|
280
264
|
}
|
|
281
265
|
}
|
|
282
266
|
if (typeof this.props.onScroll == "function") {
|
|
283
|
-
var c = this.state, d = c.scrollDirection, h = c.scrollOffset,
|
|
284
|
-
this._callOnScroll(d, h,
|
|
267
|
+
var c = this.state, d = c.scrollDirection, h = c.scrollOffset, T = c.scrollUpdateWasRequested;
|
|
268
|
+
this._callOnScroll(d, h, T);
|
|
285
269
|
}
|
|
286
|
-
},
|
|
270
|
+
}, z._getRangeToRender = function() {
|
|
287
271
|
var e = this.props, n = e.itemCount, o = e.overscanCount, s = this.state, u = s.isScrolling, f = s.scrollDirection, c = s.scrollOffset;
|
|
288
272
|
if (n === 0)
|
|
289
273
|
return [0, 0, 0, 0];
|
|
290
|
-
var d = m(this.props, c, this._instanceProps), h = v(this.props, d, c, this._instanceProps),
|
|
291
|
-
return [Math.max(0, d -
|
|
292
|
-
},
|
|
293
|
-
}(
|
|
274
|
+
var d = m(this.props, c, this._instanceProps), h = v(this.props, d, c, this._instanceProps), T = !u || f === "backward" ? Math.max(1, o) : 1, O = !u || f === "forward" ? Math.max(1, o) : 1;
|
|
275
|
+
return [Math.max(0, d - T), Math.max(0, Math.min(n - 1, h + O)), d, h];
|
|
276
|
+
}, b;
|
|
277
|
+
}(re), t.defaultProps = {
|
|
294
278
|
direction: "ltr",
|
|
295
279
|
itemData: void 0,
|
|
296
280
|
layout: "vertical",
|
|
@@ -298,8 +282,8 @@ function me(r) {
|
|
|
298
282
|
useIsScrolling: !1
|
|
299
283
|
}, t;
|
|
300
284
|
}
|
|
301
|
-
var
|
|
302
|
-
var l = t.children, a = t.direction,
|
|
285
|
+
var me = function(t, i) {
|
|
286
|
+
var l = t.children, a = t.direction, I = t.height, m = t.layout, v = t.innerTagName, S = t.outerTagName, y = t.width, g = i.instance;
|
|
303
287
|
if (process.env.NODE_ENV !== "production") {
|
|
304
288
|
(v != null || S != null) && M && !M.has(g) && (M.add(g), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
|
|
305
289
|
var w = a === "horizontal" || m === "horizontal";
|
|
@@ -323,12 +307,12 @@ var ve = function(t, i) {
|
|
|
323
307
|
}
|
|
324
308
|
if (l == null)
|
|
325
309
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
|
|
326
|
-
if (w && typeof
|
|
327
|
-
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (
|
|
328
|
-
if (!w && typeof
|
|
329
|
-
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (
|
|
310
|
+
if (w && typeof y != "number")
|
|
311
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (y === null ? "null" : typeof y) + '" was specified.'));
|
|
312
|
+
if (!w && typeof I != "number")
|
|
313
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
|
|
330
314
|
}
|
|
331
|
-
},
|
|
315
|
+
}, ve = /* @__PURE__ */ pe({
|
|
332
316
|
getItemOffset: function(t, i) {
|
|
333
317
|
var l = t.itemSize;
|
|
334
318
|
return i * l;
|
|
@@ -341,8 +325,8 @@ var ve = function(t, i) {
|
|
|
341
325
|
var i = t.itemCount, l = t.itemSize;
|
|
342
326
|
return l * i;
|
|
343
327
|
},
|
|
344
|
-
getOffsetForIndexAndAlignment: function(t, i, l, a,
|
|
345
|
-
var v = t.direction, S = t.height,
|
|
328
|
+
getOffsetForIndexAndAlignment: function(t, i, l, a, I, m) {
|
|
329
|
+
var v = t.direction, S = t.height, y = t.itemCount, g = t.itemSize, w = t.layout, b = t.width, z = v === "horizontal" || w === "horizontal", p = z ? b : S, e = Math.max(0, y * g - p), n = Math.min(e, i * g), o = Math.max(0, i * g - p + g + m);
|
|
346
330
|
switch (l === "smart" && (a >= o - p && a <= n + p ? l = "auto" : l = "center"), l) {
|
|
347
331
|
case "start":
|
|
348
332
|
return n;
|
|
@@ -362,10 +346,10 @@ var ve = function(t, i) {
|
|
|
362
346
|
return Math.max(0, Math.min(l - 1, Math.floor(i / a)));
|
|
363
347
|
},
|
|
364
348
|
getStopIndexForStartIndex: function(t, i, l) {
|
|
365
|
-
var a = t.direction,
|
|
349
|
+
var a = t.direction, I = t.height, m = t.itemCount, v = t.itemSize, S = t.layout, y = t.width, g = a === "horizontal" || S === "horizontal", w = i * v, b = g ? y : I, z = Math.ceil((b + l - w) / v);
|
|
366
350
|
return Math.max(0, Math.min(
|
|
367
351
|
m - 1,
|
|
368
|
-
i +
|
|
352
|
+
i + z - 1
|
|
369
353
|
// -1 is because stop index is inclusive
|
|
370
354
|
));
|
|
371
355
|
},
|
|
@@ -378,7 +362,7 @@ var ve = function(t, i) {
|
|
|
378
362
|
throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
379
363
|
}
|
|
380
364
|
});
|
|
381
|
-
function
|
|
365
|
+
function ge() {
|
|
382
366
|
const [r, t] = N.useState([500, 500]), i = N.useRef(null);
|
|
383
367
|
return N.useEffect(() => {
|
|
384
368
|
const l = () => {
|
|
@@ -392,35 +376,35 @@ function Se() {
|
|
|
392
376
|
};
|
|
393
377
|
}, []), [i, ...r];
|
|
394
378
|
}
|
|
395
|
-
const
|
|
379
|
+
const Se = N.forwardRef(function(t, i) {
|
|
396
380
|
return /* @__PURE__ */ R(le, { scrollerRef: i, ...t });
|
|
397
381
|
});
|
|
398
|
-
function
|
|
382
|
+
function _e(r) {
|
|
399
383
|
const {
|
|
400
384
|
className: t,
|
|
401
385
|
itemCount: i,
|
|
402
386
|
itemHeight: l,
|
|
403
387
|
renderItem: a,
|
|
404
|
-
initialScrollOffset:
|
|
388
|
+
initialScrollOffset: I,
|
|
405
389
|
onScrollUpdate: m
|
|
406
|
-
} = r, v = m ? (w) => m == null ? void 0 : m(w.scrollOffset) : void 0, [S,
|
|
390
|
+
} = r, v = m ? (w) => m == null ? void 0 : m(w.scrollOffset) : void 0, [S, y, g] = ge();
|
|
407
391
|
return /* @__PURE__ */ R("div", { ref: S, className: oe(se.virtual, t), children: /* @__PURE__ */ R(
|
|
408
|
-
|
|
392
|
+
ve,
|
|
409
393
|
{
|
|
410
|
-
outerElementType:
|
|
411
|
-
width:
|
|
394
|
+
outerElementType: Se,
|
|
395
|
+
width: y,
|
|
412
396
|
height: g,
|
|
413
397
|
itemCount: i,
|
|
414
398
|
itemSize: l,
|
|
415
|
-
initialScrollOffset:
|
|
399
|
+
initialScrollOffset: I,
|
|
416
400
|
onScroll: v,
|
|
417
401
|
children: ({
|
|
418
402
|
index: w,
|
|
419
|
-
style:
|
|
420
|
-
}) => /* @__PURE__ */ R("div", { style:
|
|
403
|
+
style: b
|
|
404
|
+
}) => /* @__PURE__ */ R("div", { style: b, children: a(w) })
|
|
421
405
|
}
|
|
422
406
|
) });
|
|
423
407
|
}
|
|
424
408
|
export {
|
|
425
|
-
|
|
409
|
+
_e as VirtualScrollable
|
|
426
410
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { F as s } from "../../Combination-
|
|
3
|
+
import { F as s } from "../../Combination-Dj-a6dCZ.js";
|
|
4
4
|
import { Interactive as i } from "../Interactive/Interactive.js";
|
|
5
5
|
import { clsx as a } from "../../utils/clsx.js";
|
|
6
6
|
import { a as m } from "../../outlet-C4wpavcH.js";
|