gasp-components 1.0.10 → 1.0.12
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/UploadOutlined-9WKjHsqa.js +878 -0
- package/dist/components/ag-grid-table/index.js +57877 -38314
- package/dist/components/button/index.js +18 -18
- package/dist/components/checklist/checklist-item.js +3 -3
- package/dist/components/checklist/index.js +5 -5
- package/dist/components/date-picker/index.js +9 -5022
- package/dist/components/dragger/index.js +28 -28
- package/dist/components/dropdown/index.js +10 -11
- package/dist/components/form/index.js +8 -9
- package/dist/components/form-item/index.js +10 -10
- package/dist/components/input/index.js +8 -8
- package/dist/components/modal/index.js +18 -20
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/progress/index.js +16 -18
- package/dist/components/progress-circle/index.js +3 -3
- package/dist/components/radio-button/index.js +8 -8
- package/dist/components/result-popup/index.js +13 -14
- package/dist/components/select/index.js +1 -1
- package/dist/components/side-menu/index.js +2 -2
- package/dist/components/side-menu/menu-item.js +4 -6
- package/dist/components/steps/index.js +9 -9
- package/dist/components/table/index.js +16 -9298
- package/dist/components/tabs/index.js +10 -10
- package/dist/components/tabs/tab.js +7 -8
- package/dist/components/tag/index.js +9 -258
- package/dist/components/timeline-horizontal/index.js +7 -7
- package/dist/components/upload/index.js +62 -77
- package/dist/index-WlPrqxgY.js +87 -0
- package/dist/main.js +69 -457
- package/package.json +1 -1
- package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
- package/dist/CheckOutlined-EgxCAgj_.js +0 -16
- package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
- package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
- package/dist/Compact-fdEKV_mF.js +0 -180
- package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
- package/dist/KeyCode-qFRXB1-n.js +0 -517
- package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
- package/dist/Overflow-JFdXKgCr.js +0 -231
- package/dist/PurePanel-hLGnXbul.js +0 -60
- package/dist/SearchOutlined-rJTFGXUi.js +0 -16
- package/dist/TextArea-n3dknzTq.js +0 -716
- package/dist/UploadOutlined-D8jfLEgv.js +0 -27
- package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
- package/dist/button-LN5ZDad8.js +0 -819
- package/dist/collapse-ilv4Tji1.js +0 -20
- package/dist/colors-opGg9oSz.js +0 -25
- package/dist/compact-item-jjuVmDBH.js +0 -61
- package/dist/context-h3WSVDPz.js +0 -2087
- package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
- package/dist/index--6VfGMUo.js +0 -402
- package/dist/index-0mpuHoS5.js +0 -996
- package/dist/index-1KQbTQJ2.js +0 -4405
- package/dist/index-5Uo03BMk.js +0 -681
- package/dist/index-BFgxz47K.js +0 -89
- package/dist/index-D3LMPWyJ.js +0 -1437
- package/dist/index-DVS_nWxv.js +0 -3026
- package/dist/index-ELHBhuK9.js +0 -100
- package/dist/index-Fn8q8B3V.js +0 -107
- package/dist/index-GgkQrebz.js +0 -950
- package/dist/index-L-MzVDcK.js +0 -616
- package/dist/index-M3WnMjiA.js +0 -230
- package/dist/index-NQd_zMf0.js +0 -69
- package/dist/index-ZT64Ec6u.js +0 -267
- package/dist/index-aawDqn9q.js +0 -3337
- package/dist/index-k04G4nlS.js +0 -1416
- package/dist/index-s3u4YBl4.js +0 -8
- package/dist/index-vtDVJV8q.js +0 -19571
- package/dist/isVisible-Qi9l15Ty.js +0 -232
- package/dist/motion-0ToOu81j.js +0 -226
- package/dist/motion-NQme0FJ_.js +0 -32
- package/dist/omit-ylWA0ZLZ.js +0 -10
- package/dist/pickAttrs-zaQzRTqh.js +0 -42
- package/dist/progress-a1_pwKVT.js +0 -722
- package/dist/reactNode-R20zZQk1.js +0 -18
- package/dist/responsiveObserver-V1_1G14X.js +0 -71
- package/dist/roundedArrow-p1Pmd9av.js +0 -64
- package/dist/row-sPFiFm0C.js +0 -230
- package/dist/slide-mFXPRHku.js +0 -265
- package/dist/styleChecker-pZ3k2IiY.js +0 -37
- package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
- package/dist/useClosable-4G12n4Bp.js +0 -15
- package/dist/useLocale-eThlLZJw.js +0 -16
- package/dist/useMergedState-qUafLuUa.js +0 -23
- package/dist/useVariants-s0IcneBD.js +0 -25
- package/dist/zoom-Ps8y0jNW.js +0 -174
package/dist/index--6VfGMUo.js
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { n as U, o as Z, p as ee, q as te, s as re, t as ne, _ as H, v as E, g as ie, w as P, e as oe } from "./index-1KQbTQJ2.js";
|
|
2
|
-
import * as a from "react";
|
|
3
|
-
import { t as se } from "./Compact-fdEKV_mF.js";
|
|
4
|
-
var O = /* @__PURE__ */ a.createContext(null);
|
|
5
|
-
function ae(e) {
|
|
6
|
-
var t = e.children, r = e.onBatchResize, n = a.useRef(0), i = a.useRef([]), o = a.useContext(O), s = a.useCallback(function(c, u, f) {
|
|
7
|
-
n.current += 1;
|
|
8
|
-
var v = n.current;
|
|
9
|
-
i.current.push({
|
|
10
|
-
size: c,
|
|
11
|
-
element: u,
|
|
12
|
-
data: f
|
|
13
|
-
}), Promise.resolve().then(function() {
|
|
14
|
-
v === n.current && (r == null || r(i.current), i.current = []);
|
|
15
|
-
}), o == null || o(c, u, f);
|
|
16
|
-
}, [r, o]);
|
|
17
|
-
return /* @__PURE__ */ a.createElement(O.Provider, {
|
|
18
|
-
value: s
|
|
19
|
-
}, t);
|
|
20
|
-
}
|
|
21
|
-
var I = function() {
|
|
22
|
-
if (typeof Map < "u")
|
|
23
|
-
return Map;
|
|
24
|
-
function e(t, r) {
|
|
25
|
-
var n = -1;
|
|
26
|
-
return t.some(function(i, o) {
|
|
27
|
-
return i[0] === r ? (n = o, !0) : !1;
|
|
28
|
-
}), n;
|
|
29
|
-
}
|
|
30
|
-
return (
|
|
31
|
-
/** @class */
|
|
32
|
-
function() {
|
|
33
|
-
function t() {
|
|
34
|
-
this.__entries__ = [];
|
|
35
|
-
}
|
|
36
|
-
return Object.defineProperty(t.prototype, "size", {
|
|
37
|
-
/**
|
|
38
|
-
* @returns {boolean}
|
|
39
|
-
*/
|
|
40
|
-
get: function() {
|
|
41
|
-
return this.__entries__.length;
|
|
42
|
-
},
|
|
43
|
-
enumerable: !0,
|
|
44
|
-
configurable: !0
|
|
45
|
-
}), t.prototype.get = function(r) {
|
|
46
|
-
var n = e(this.__entries__, r), i = this.__entries__[n];
|
|
47
|
-
return i && i[1];
|
|
48
|
-
}, t.prototype.set = function(r, n) {
|
|
49
|
-
var i = e(this.__entries__, r);
|
|
50
|
-
~i ? this.__entries__[i][1] = n : this.__entries__.push([r, n]);
|
|
51
|
-
}, t.prototype.delete = function(r) {
|
|
52
|
-
var n = this.__entries__, i = e(n, r);
|
|
53
|
-
~i && n.splice(i, 1);
|
|
54
|
-
}, t.prototype.has = function(r) {
|
|
55
|
-
return !!~e(this.__entries__, r);
|
|
56
|
-
}, t.prototype.clear = function() {
|
|
57
|
-
this.__entries__.splice(0);
|
|
58
|
-
}, t.prototype.forEach = function(r, n) {
|
|
59
|
-
n === void 0 && (n = null);
|
|
60
|
-
for (var i = 0, o = this.__entries__; i < o.length; i++) {
|
|
61
|
-
var s = o[i];
|
|
62
|
-
r.call(n, s[1], s[0]);
|
|
63
|
-
}
|
|
64
|
-
}, t;
|
|
65
|
-
}()
|
|
66
|
-
);
|
|
67
|
-
}(), z = typeof window < "u" && typeof document < "u" && window.document === document, m = function() {
|
|
68
|
-
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
69
|
-
}(), ue = function() {
|
|
70
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(m) : function(e) {
|
|
71
|
-
return setTimeout(function() {
|
|
72
|
-
return e(Date.now());
|
|
73
|
-
}, 1e3 / 60);
|
|
74
|
-
};
|
|
75
|
-
}(), ce = 2;
|
|
76
|
-
function fe(e, t) {
|
|
77
|
-
var r = !1, n = !1, i = 0;
|
|
78
|
-
function o() {
|
|
79
|
-
r && (r = !1, e()), n && c();
|
|
80
|
-
}
|
|
81
|
-
function s() {
|
|
82
|
-
ue(o);
|
|
83
|
-
}
|
|
84
|
-
function c() {
|
|
85
|
-
var u = Date.now();
|
|
86
|
-
if (r) {
|
|
87
|
-
if (u - i < ce)
|
|
88
|
-
return;
|
|
89
|
-
n = !0;
|
|
90
|
-
} else
|
|
91
|
-
r = !0, n = !1, setTimeout(s, t);
|
|
92
|
-
i = u;
|
|
93
|
-
}
|
|
94
|
-
return c;
|
|
95
|
-
}
|
|
96
|
-
var he = 20, de = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], ve = typeof MutationObserver < "u", le = (
|
|
97
|
-
/** @class */
|
|
98
|
-
function() {
|
|
99
|
-
function e() {
|
|
100
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = fe(this.refresh.bind(this), he);
|
|
101
|
-
}
|
|
102
|
-
return e.prototype.addObserver = function(t) {
|
|
103
|
-
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
104
|
-
}, e.prototype.removeObserver = function(t) {
|
|
105
|
-
var r = this.observers_, n = r.indexOf(t);
|
|
106
|
-
~n && r.splice(n, 1), !r.length && this.connected_ && this.disconnect_();
|
|
107
|
-
}, e.prototype.refresh = function() {
|
|
108
|
-
var t = this.updateObservers_();
|
|
109
|
-
t && this.refresh();
|
|
110
|
-
}, e.prototype.updateObservers_ = function() {
|
|
111
|
-
var t = this.observers_.filter(function(r) {
|
|
112
|
-
return r.gatherActive(), r.hasActive();
|
|
113
|
-
});
|
|
114
|
-
return t.forEach(function(r) {
|
|
115
|
-
return r.broadcastActive();
|
|
116
|
-
}), t.length > 0;
|
|
117
|
-
}, e.prototype.connect_ = function() {
|
|
118
|
-
!z || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), ve ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
119
|
-
attributes: !0,
|
|
120
|
-
childList: !0,
|
|
121
|
-
characterData: !0,
|
|
122
|
-
subtree: !0
|
|
123
|
-
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
124
|
-
}, e.prototype.disconnect_ = function() {
|
|
125
|
-
!z || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
126
|
-
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
127
|
-
var r = t.propertyName, n = r === void 0 ? "" : r, i = de.some(function(o) {
|
|
128
|
-
return !!~n.indexOf(o);
|
|
129
|
-
});
|
|
130
|
-
i && this.refresh();
|
|
131
|
-
}, e.getInstance = function() {
|
|
132
|
-
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
133
|
-
}, e.instance_ = null, e;
|
|
134
|
-
}()
|
|
135
|
-
), L = function(e, t) {
|
|
136
|
-
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
137
|
-
var i = n[r];
|
|
138
|
-
Object.defineProperty(e, i, {
|
|
139
|
-
value: t[i],
|
|
140
|
-
enumerable: !1,
|
|
141
|
-
writable: !1,
|
|
142
|
-
configurable: !0
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
return e;
|
|
146
|
-
}, p = function(e) {
|
|
147
|
-
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
148
|
-
return t || m;
|
|
149
|
-
}, V = y(0, 0, 0, 0);
|
|
150
|
-
function g(e) {
|
|
151
|
-
return parseFloat(e) || 0;
|
|
152
|
-
}
|
|
153
|
-
function k(e) {
|
|
154
|
-
for (var t = [], r = 1; r < arguments.length; r++)
|
|
155
|
-
t[r - 1] = arguments[r];
|
|
156
|
-
return t.reduce(function(n, i) {
|
|
157
|
-
var o = e["border-" + i + "-width"];
|
|
158
|
-
return n + g(o);
|
|
159
|
-
}, 0);
|
|
160
|
-
}
|
|
161
|
-
function pe(e) {
|
|
162
|
-
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, i = t; n < i.length; n++) {
|
|
163
|
-
var o = i[n], s = e["padding-" + o];
|
|
164
|
-
r[o] = g(s);
|
|
165
|
-
}
|
|
166
|
-
return r;
|
|
167
|
-
}
|
|
168
|
-
function be(e) {
|
|
169
|
-
var t = e.getBBox();
|
|
170
|
-
return y(0, 0, t.width, t.height);
|
|
171
|
-
}
|
|
172
|
-
function _e(e) {
|
|
173
|
-
var t = e.clientWidth, r = e.clientHeight;
|
|
174
|
-
if (!t && !r)
|
|
175
|
-
return V;
|
|
176
|
-
var n = p(e).getComputedStyle(e), i = pe(n), o = i.left + i.right, s = i.top + i.bottom, c = g(n.width), u = g(n.height);
|
|
177
|
-
if (n.boxSizing === "border-box" && (Math.round(c + o) !== t && (c -= k(n, "left", "right") + o), Math.round(u + s) !== r && (u -= k(n, "top", "bottom") + s)), !ge(e)) {
|
|
178
|
-
var f = Math.round(c + o) - t, v = Math.round(u + s) - r;
|
|
179
|
-
Math.abs(f) !== 1 && (c -= f), Math.abs(v) !== 1 && (u -= v);
|
|
180
|
-
}
|
|
181
|
-
return y(i.left, i.top, c, u);
|
|
182
|
-
}
|
|
183
|
-
var me = /* @__PURE__ */ function() {
|
|
184
|
-
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
185
|
-
return e instanceof p(e).SVGGraphicsElement;
|
|
186
|
-
} : function(e) {
|
|
187
|
-
return e instanceof p(e).SVGElement && typeof e.getBBox == "function";
|
|
188
|
-
};
|
|
189
|
-
}();
|
|
190
|
-
function ge(e) {
|
|
191
|
-
return e === p(e).document.documentElement;
|
|
192
|
-
}
|
|
193
|
-
function ye(e) {
|
|
194
|
-
return z ? me(e) ? be(e) : _e(e) : V;
|
|
195
|
-
}
|
|
196
|
-
function Re(e) {
|
|
197
|
-
var t = e.x, r = e.y, n = e.width, i = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
|
|
198
|
-
return L(s, {
|
|
199
|
-
x: t,
|
|
200
|
-
y: r,
|
|
201
|
-
width: n,
|
|
202
|
-
height: i,
|
|
203
|
-
top: r,
|
|
204
|
-
right: t + n,
|
|
205
|
-
bottom: i + r,
|
|
206
|
-
left: t
|
|
207
|
-
}), s;
|
|
208
|
-
}
|
|
209
|
-
function y(e, t, r, n) {
|
|
210
|
-
return { x: e, y: t, width: r, height: n };
|
|
211
|
-
}
|
|
212
|
-
var we = (
|
|
213
|
-
/** @class */
|
|
214
|
-
function() {
|
|
215
|
-
function e(t) {
|
|
216
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = y(0, 0, 0, 0), this.target = t;
|
|
217
|
-
}
|
|
218
|
-
return e.prototype.isActive = function() {
|
|
219
|
-
var t = ye(this.target);
|
|
220
|
-
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
221
|
-
}, e.prototype.broadcastRect = function() {
|
|
222
|
-
var t = this.contentRect_;
|
|
223
|
-
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
224
|
-
}, e;
|
|
225
|
-
}()
|
|
226
|
-
), Ee = (
|
|
227
|
-
/** @class */
|
|
228
|
-
/* @__PURE__ */ function() {
|
|
229
|
-
function e(t, r) {
|
|
230
|
-
var n = Re(r);
|
|
231
|
-
L(this, { target: t, contentRect: n });
|
|
232
|
-
}
|
|
233
|
-
return e;
|
|
234
|
-
}()
|
|
235
|
-
), Oe = (
|
|
236
|
-
/** @class */
|
|
237
|
-
function() {
|
|
238
|
-
function e(t, r, n) {
|
|
239
|
-
if (this.activeObservations_ = [], this.observations_ = new I(), typeof t != "function")
|
|
240
|
-
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
241
|
-
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
242
|
-
}
|
|
243
|
-
return e.prototype.observe = function(t) {
|
|
244
|
-
if (!arguments.length)
|
|
245
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
246
|
-
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
247
|
-
if (!(t instanceof p(t).Element))
|
|
248
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
249
|
-
var r = this.observations_;
|
|
250
|
-
r.has(t) || (r.set(t, new we(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
251
|
-
}
|
|
252
|
-
}, e.prototype.unobserve = function(t) {
|
|
253
|
-
if (!arguments.length)
|
|
254
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
255
|
-
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
256
|
-
if (!(t instanceof p(t).Element))
|
|
257
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
258
|
-
var r = this.observations_;
|
|
259
|
-
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
260
|
-
}
|
|
261
|
-
}, e.prototype.disconnect = function() {
|
|
262
|
-
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
263
|
-
}, e.prototype.gatherActive = function() {
|
|
264
|
-
var t = this;
|
|
265
|
-
this.clearActive(), this.observations_.forEach(function(r) {
|
|
266
|
-
r.isActive() && t.activeObservations_.push(r);
|
|
267
|
-
});
|
|
268
|
-
}, e.prototype.broadcastActive = function() {
|
|
269
|
-
if (this.hasActive()) {
|
|
270
|
-
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
271
|
-
return new Ee(n.target, n.broadcastRect());
|
|
272
|
-
});
|
|
273
|
-
this.callback_.call(t, r, t), this.clearActive();
|
|
274
|
-
}
|
|
275
|
-
}, e.prototype.clearActive = function() {
|
|
276
|
-
this.activeObservations_.splice(0);
|
|
277
|
-
}, e.prototype.hasActive = function() {
|
|
278
|
-
return this.activeObservations_.length > 0;
|
|
279
|
-
}, e;
|
|
280
|
-
}()
|
|
281
|
-
), B = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new I(), j = (
|
|
282
|
-
/** @class */
|
|
283
|
-
/* @__PURE__ */ function() {
|
|
284
|
-
function e(t) {
|
|
285
|
-
if (!(this instanceof e))
|
|
286
|
-
throw new TypeError("Cannot call a class as a function.");
|
|
287
|
-
if (!arguments.length)
|
|
288
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
289
|
-
var r = le.getInstance(), n = new Oe(t, r, this);
|
|
290
|
-
B.set(this, n);
|
|
291
|
-
}
|
|
292
|
-
return e;
|
|
293
|
-
}()
|
|
294
|
-
);
|
|
295
|
-
[
|
|
296
|
-
"observe",
|
|
297
|
-
"unobserve",
|
|
298
|
-
"disconnect"
|
|
299
|
-
].forEach(function(e) {
|
|
300
|
-
j.prototype[e] = function() {
|
|
301
|
-
var t;
|
|
302
|
-
return (t = B.get(this))[e].apply(t, arguments);
|
|
303
|
-
};
|
|
304
|
-
});
|
|
305
|
-
var ze = function() {
|
|
306
|
-
return typeof m.ResizeObserver < "u" ? m.ResizeObserver : j;
|
|
307
|
-
}(), d = /* @__PURE__ */ new Map();
|
|
308
|
-
function F(e) {
|
|
309
|
-
e.forEach(function(t) {
|
|
310
|
-
var r, n = t.target;
|
|
311
|
-
(r = d.get(n)) === null || r === void 0 || r.forEach(function(i) {
|
|
312
|
-
return i(n);
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
var G = new ze(F);
|
|
317
|
-
process.env.NODE_ENV;
|
|
318
|
-
process.env.NODE_ENV;
|
|
319
|
-
function Ce(e, t) {
|
|
320
|
-
d.has(e) || (d.set(e, /* @__PURE__ */ new Set()), G.observe(e)), d.get(e).add(t);
|
|
321
|
-
}
|
|
322
|
-
function Me(e, t) {
|
|
323
|
-
d.has(e) && (d.get(e).delete(t), d.get(e).size || (G.unobserve(e), d.delete(e)));
|
|
324
|
-
}
|
|
325
|
-
var xe = /* @__PURE__ */ function(e) {
|
|
326
|
-
U(r, e);
|
|
327
|
-
var t = Z(r);
|
|
328
|
-
function r() {
|
|
329
|
-
return ee(this, r), t.apply(this, arguments);
|
|
330
|
-
}
|
|
331
|
-
return te(r, [{
|
|
332
|
-
key: "render",
|
|
333
|
-
value: function() {
|
|
334
|
-
return this.props.children;
|
|
335
|
-
}
|
|
336
|
-
}]), r;
|
|
337
|
-
}(a.Component);
|
|
338
|
-
function Ae(e, t) {
|
|
339
|
-
var r = e.children, n = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(O), c = typeof r == "function", u = c ? r(i) : r, f = a.useRef({
|
|
340
|
-
width: -1,
|
|
341
|
-
height: -1,
|
|
342
|
-
offsetWidth: -1,
|
|
343
|
-
offsetHeight: -1
|
|
344
|
-
}), v = !c && /* @__PURE__ */ a.isValidElement(u) && re(u), K = v ? u.ref : null, Y = ne(K, i), C = function() {
|
|
345
|
-
var l;
|
|
346
|
-
return E(i.current) || // Support `nativeElement` format
|
|
347
|
-
(i.current && ie(i.current) === "object" ? E((l = i.current) === null || l === void 0 ? void 0 : l.nativeElement) : null) || E(o.current);
|
|
348
|
-
};
|
|
349
|
-
a.useImperativeHandle(t, function() {
|
|
350
|
-
return C();
|
|
351
|
-
});
|
|
352
|
-
var M = a.useRef(e);
|
|
353
|
-
M.current = e;
|
|
354
|
-
var x = a.useCallback(function(h) {
|
|
355
|
-
var l = M.current, A = l.onResize, X = l.data, D = h.getBoundingClientRect(), R = D.width, w = D.height, b = h.offsetWidth, _ = h.offsetHeight, S = Math.floor(R), N = Math.floor(w);
|
|
356
|
-
if (f.current.width !== S || f.current.height !== N || f.current.offsetWidth !== b || f.current.offsetHeight !== _) {
|
|
357
|
-
var T = {
|
|
358
|
-
width: S,
|
|
359
|
-
height: N,
|
|
360
|
-
offsetWidth: b,
|
|
361
|
-
offsetHeight: _
|
|
362
|
-
};
|
|
363
|
-
f.current = T;
|
|
364
|
-
var J = b === Math.round(R) ? R : b, Q = _ === Math.round(w) ? w : _, W = H(H({}, T), {}, {
|
|
365
|
-
offsetWidth: J,
|
|
366
|
-
offsetHeight: Q
|
|
367
|
-
});
|
|
368
|
-
s == null || s(W, h, X), A && Promise.resolve().then(function() {
|
|
369
|
-
A(W, h);
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
}, []);
|
|
373
|
-
return a.useEffect(function() {
|
|
374
|
-
var h = C();
|
|
375
|
-
return h && !n && Ce(h, x), function() {
|
|
376
|
-
return Me(h, x);
|
|
377
|
-
};
|
|
378
|
-
}, [i.current, n]), /* @__PURE__ */ a.createElement(xe, {
|
|
379
|
-
ref: o
|
|
380
|
-
}, v ? /* @__PURE__ */ a.cloneElement(u, {
|
|
381
|
-
ref: Y
|
|
382
|
-
}) : u);
|
|
383
|
-
}
|
|
384
|
-
var q = /* @__PURE__ */ a.forwardRef(Ae);
|
|
385
|
-
process.env.NODE_ENV !== "production" && (q.displayName = "SingleObserver");
|
|
386
|
-
var De = "rc-observer-key";
|
|
387
|
-
function Se(e, t) {
|
|
388
|
-
var r = e.children, n = typeof r == "function" ? [r] : se(r);
|
|
389
|
-
return process.env.NODE_ENV !== "production" && (n.length > 1 ? P(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : n.length === 0 && P(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), n.map(function(i, o) {
|
|
390
|
-
var s = (i == null ? void 0 : i.key) || "".concat(De, "-").concat(o);
|
|
391
|
-
return /* @__PURE__ */ a.createElement(q, oe({}, e, {
|
|
392
|
-
key: s,
|
|
393
|
-
ref: o === 0 ? t : void 0
|
|
394
|
-
}), i);
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
var $ = /* @__PURE__ */ a.forwardRef(Se);
|
|
398
|
-
process.env.NODE_ENV !== "production" && ($.displayName = "ResizeObserver");
|
|
399
|
-
$.Collection = ae;
|
|
400
|
-
export {
|
|
401
|
-
$ as R
|
|
402
|
-
};
|