@xhsreds/reds-rn-next 0.0.1-beta-3 → 0.0.1-beta-2
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/cjs/_chunks/DlurfqjS.js +454 -0
- package/cjs/_chunks/DlurfqjS.js.map +1 -0
- package/cjs/components/Popover/rn/component.js +3 -2
- package/cjs/components/Popover/rn/component.js.map +1 -1
- package/cjs/components/Popover/rn/hook.js +34 -14
- package/cjs/components/Popover/rn/hook.js.map +1 -1
- package/cjs/components/Popover/rn/index.js +24 -12
- package/cjs/components/Popover/rn/index.js.map +1 -1
- package/esm/_chunks/CitVthKE.js +446 -0
- package/esm/_chunks/CitVthKE.js.map +1 -0
- package/esm/_chunks/D5Nu-Cmu.js +458 -0
- package/esm/_chunks/D5Nu-Cmu.js.map +1 -0
- package/esm/_chunks/VnlapvEB.js +446 -0
- package/esm/_chunks/VnlapvEB.js.map +1 -0
- package/esm/components/Button/rn/index.js +1 -1
- package/esm/components/Popover/rn/component.js +4 -3
- package/esm/components/Popover/rn/component.js.map +1 -1
- package/esm/components/Popover/rn/hook.js +36 -16
- package/esm/components/Popover/rn/hook.js.map +1 -1
- package/esm/components/Popover/rn/index.js +27 -15
- package/esm/components/Popover/rn/index.js.map +1 -1
- package/esm/index.rn.js +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _arrayLikeToArray(r, a) {
|
|
4
|
+
(null == a || a > r.length) && (a = r.length);
|
|
5
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
function _arrayWithHoles(r) {
|
|
9
|
+
if (Array.isArray(r)) return r;
|
|
10
|
+
}
|
|
11
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
12
|
+
try {
|
|
13
|
+
var i = n[a](c),
|
|
14
|
+
u = i.value;
|
|
15
|
+
} catch (n) {
|
|
16
|
+
return void e(n);
|
|
17
|
+
}
|
|
18
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
19
|
+
}
|
|
20
|
+
function _asyncToGenerator(n) {
|
|
21
|
+
return function () {
|
|
22
|
+
var t = this,
|
|
23
|
+
e = arguments;
|
|
24
|
+
return new Promise(function (r, o) {
|
|
25
|
+
var a = n.apply(t, e);
|
|
26
|
+
function _next(n) {
|
|
27
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
28
|
+
}
|
|
29
|
+
function _throw(n) {
|
|
30
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
31
|
+
}
|
|
32
|
+
_next(void 0);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function _defineProperty(e, r, t) {
|
|
37
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
38
|
+
value: t,
|
|
39
|
+
enumerable: !0,
|
|
40
|
+
configurable: !0,
|
|
41
|
+
writable: !0
|
|
42
|
+
}) : e[r] = t, e;
|
|
43
|
+
}
|
|
44
|
+
function _iterableToArrayLimit(r, l) {
|
|
45
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
46
|
+
if (null != t) {
|
|
47
|
+
var e,
|
|
48
|
+
n,
|
|
49
|
+
i,
|
|
50
|
+
u,
|
|
51
|
+
a = [],
|
|
52
|
+
f = !0,
|
|
53
|
+
o = !1;
|
|
54
|
+
try {
|
|
55
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
56
|
+
} catch (r) {
|
|
57
|
+
o = !0, n = r;
|
|
58
|
+
} finally {
|
|
59
|
+
try {
|
|
60
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
61
|
+
} finally {
|
|
62
|
+
if (o) throw n;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return a;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function _nonIterableRest() {
|
|
69
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
+
}
|
|
71
|
+
function ownKeys(e, r) {
|
|
72
|
+
var t = Object.keys(e);
|
|
73
|
+
if (Object.getOwnPropertySymbols) {
|
|
74
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
75
|
+
r && (o = o.filter(function (r) {
|
|
76
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
77
|
+
})), t.push.apply(t, o);
|
|
78
|
+
}
|
|
79
|
+
return t;
|
|
80
|
+
}
|
|
81
|
+
function _objectSpread2(e) {
|
|
82
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
83
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
84
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
85
|
+
_defineProperty(e, r, t[r]);
|
|
86
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
87
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return e;
|
|
91
|
+
}
|
|
92
|
+
function _objectWithoutProperties(e, t) {
|
|
93
|
+
if (null == e) return {};
|
|
94
|
+
var o,
|
|
95
|
+
r,
|
|
96
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
97
|
+
if (Object.getOwnPropertySymbols) {
|
|
98
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
99
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
100
|
+
}
|
|
101
|
+
return i;
|
|
102
|
+
}
|
|
103
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
104
|
+
if (null == r) return {};
|
|
105
|
+
var t = {};
|
|
106
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
107
|
+
if (e.indexOf(n) >= 0) continue;
|
|
108
|
+
t[n] = r[n];
|
|
109
|
+
}
|
|
110
|
+
return t;
|
|
111
|
+
}
|
|
112
|
+
function _regeneratorRuntime() {
|
|
113
|
+
_regeneratorRuntime = function () {
|
|
114
|
+
return e;
|
|
115
|
+
};
|
|
116
|
+
var t,
|
|
117
|
+
e = {},
|
|
118
|
+
r = Object.prototype,
|
|
119
|
+
n = r.hasOwnProperty,
|
|
120
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
121
|
+
t[e] = r.value;
|
|
122
|
+
},
|
|
123
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
124
|
+
a = i.iterator || "@@iterator",
|
|
125
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
126
|
+
u = i.toStringTag || "@@toStringTag";
|
|
127
|
+
function define(t, e, r) {
|
|
128
|
+
return Object.defineProperty(t, e, {
|
|
129
|
+
value: r,
|
|
130
|
+
enumerable: !0,
|
|
131
|
+
configurable: !0,
|
|
132
|
+
writable: !0
|
|
133
|
+
}), t[e];
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
define({}, "");
|
|
137
|
+
} catch (t) {
|
|
138
|
+
define = function (t, e, r) {
|
|
139
|
+
return t[e] = r;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function wrap(t, e, r, n) {
|
|
143
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
144
|
+
a = Object.create(i.prototype),
|
|
145
|
+
c = new Context(n || []);
|
|
146
|
+
return o(a, "_invoke", {
|
|
147
|
+
value: makeInvokeMethod(t, r, c)
|
|
148
|
+
}), a;
|
|
149
|
+
}
|
|
150
|
+
function tryCatch(t, e, r) {
|
|
151
|
+
try {
|
|
152
|
+
return {
|
|
153
|
+
type: "normal",
|
|
154
|
+
arg: t.call(e, r)
|
|
155
|
+
};
|
|
156
|
+
} catch (t) {
|
|
157
|
+
return {
|
|
158
|
+
type: "throw",
|
|
159
|
+
arg: t
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
e.wrap = wrap;
|
|
164
|
+
var h = "suspendedStart",
|
|
165
|
+
l = "suspendedYield",
|
|
166
|
+
f = "executing",
|
|
167
|
+
s = "completed",
|
|
168
|
+
y = {};
|
|
169
|
+
function Generator() {}
|
|
170
|
+
function GeneratorFunction() {}
|
|
171
|
+
function GeneratorFunctionPrototype() {}
|
|
172
|
+
var p = {};
|
|
173
|
+
define(p, a, function () {
|
|
174
|
+
return this;
|
|
175
|
+
});
|
|
176
|
+
var d = Object.getPrototypeOf,
|
|
177
|
+
v = d && d(d(values([])));
|
|
178
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
179
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
180
|
+
function defineIteratorMethods(t) {
|
|
181
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
182
|
+
define(t, e, function (t) {
|
|
183
|
+
return this._invoke(e, t);
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function AsyncIterator(t, e) {
|
|
188
|
+
function invoke(r, o, i, a) {
|
|
189
|
+
var c = tryCatch(t[r], t, o);
|
|
190
|
+
if ("throw" !== c.type) {
|
|
191
|
+
var u = c.arg,
|
|
192
|
+
h = u.value;
|
|
193
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
194
|
+
invoke("next", t, i, a);
|
|
195
|
+
}, function (t) {
|
|
196
|
+
invoke("throw", t, i, a);
|
|
197
|
+
}) : e.resolve(h).then(function (t) {
|
|
198
|
+
u.value = t, i(u);
|
|
199
|
+
}, function (t) {
|
|
200
|
+
return invoke("throw", t, i, a);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
a(c.arg);
|
|
204
|
+
}
|
|
205
|
+
var r;
|
|
206
|
+
o(this, "_invoke", {
|
|
207
|
+
value: function (t, n) {
|
|
208
|
+
function callInvokeWithMethodAndArg() {
|
|
209
|
+
return new e(function (e, r) {
|
|
210
|
+
invoke(t, n, e, r);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function makeInvokeMethod(e, r, n) {
|
|
218
|
+
var o = h;
|
|
219
|
+
return function (i, a) {
|
|
220
|
+
if (o === f) throw Error("Generator is already running");
|
|
221
|
+
if (o === s) {
|
|
222
|
+
if ("throw" === i) throw a;
|
|
223
|
+
return {
|
|
224
|
+
value: t,
|
|
225
|
+
done: !0
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
for (n.method = i, n.arg = a;;) {
|
|
229
|
+
var c = n.delegate;
|
|
230
|
+
if (c) {
|
|
231
|
+
var u = maybeInvokeDelegate(c, n);
|
|
232
|
+
if (u) {
|
|
233
|
+
if (u === y) continue;
|
|
234
|
+
return u;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
238
|
+
if (o === h) throw o = s, n.arg;
|
|
239
|
+
n.dispatchException(n.arg);
|
|
240
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
241
|
+
o = f;
|
|
242
|
+
var p = tryCatch(e, r, n);
|
|
243
|
+
if ("normal" === p.type) {
|
|
244
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
245
|
+
return {
|
|
246
|
+
value: p.arg,
|
|
247
|
+
done: n.done
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
function maybeInvokeDelegate(e, r) {
|
|
255
|
+
var n = r.method,
|
|
256
|
+
o = e.iterator[n];
|
|
257
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
258
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
259
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
260
|
+
var a = i.arg;
|
|
261
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
262
|
+
}
|
|
263
|
+
function pushTryEntry(t) {
|
|
264
|
+
var e = {
|
|
265
|
+
tryLoc: t[0]
|
|
266
|
+
};
|
|
267
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
268
|
+
}
|
|
269
|
+
function resetTryEntry(t) {
|
|
270
|
+
var e = t.completion || {};
|
|
271
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
272
|
+
}
|
|
273
|
+
function Context(t) {
|
|
274
|
+
this.tryEntries = [{
|
|
275
|
+
tryLoc: "root"
|
|
276
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
277
|
+
}
|
|
278
|
+
function values(e) {
|
|
279
|
+
if (e || "" === e) {
|
|
280
|
+
var r = e[a];
|
|
281
|
+
if (r) return r.call(e);
|
|
282
|
+
if ("function" == typeof e.next) return e;
|
|
283
|
+
if (!isNaN(e.length)) {
|
|
284
|
+
var o = -1,
|
|
285
|
+
i = function next() {
|
|
286
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
287
|
+
return next.value = t, next.done = !0, next;
|
|
288
|
+
};
|
|
289
|
+
return i.next = i;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
293
|
+
}
|
|
294
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
295
|
+
value: GeneratorFunctionPrototype,
|
|
296
|
+
configurable: !0
|
|
297
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
298
|
+
value: GeneratorFunction,
|
|
299
|
+
configurable: !0
|
|
300
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
301
|
+
var e = "function" == typeof t && t.constructor;
|
|
302
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
303
|
+
}, e.mark = function (t) {
|
|
304
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
305
|
+
}, e.awrap = function (t) {
|
|
306
|
+
return {
|
|
307
|
+
__await: t
|
|
308
|
+
};
|
|
309
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
310
|
+
return this;
|
|
311
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
312
|
+
void 0 === i && (i = Promise);
|
|
313
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
314
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
315
|
+
return t.done ? t.value : a.next();
|
|
316
|
+
});
|
|
317
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
318
|
+
return this;
|
|
319
|
+
}), define(g, "toString", function () {
|
|
320
|
+
return "[object Generator]";
|
|
321
|
+
}), e.keys = function (t) {
|
|
322
|
+
var e = Object(t),
|
|
323
|
+
r = [];
|
|
324
|
+
for (var n in e) r.push(n);
|
|
325
|
+
return r.reverse(), function next() {
|
|
326
|
+
for (; r.length;) {
|
|
327
|
+
var t = r.pop();
|
|
328
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
329
|
+
}
|
|
330
|
+
return next.done = !0, next;
|
|
331
|
+
};
|
|
332
|
+
}, e.values = values, Context.prototype = {
|
|
333
|
+
constructor: Context,
|
|
334
|
+
reset: function (e) {
|
|
335
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
336
|
+
},
|
|
337
|
+
stop: function () {
|
|
338
|
+
this.done = !0;
|
|
339
|
+
var t = this.tryEntries[0].completion;
|
|
340
|
+
if ("throw" === t.type) throw t.arg;
|
|
341
|
+
return this.rval;
|
|
342
|
+
},
|
|
343
|
+
dispatchException: function (e) {
|
|
344
|
+
if (this.done) throw e;
|
|
345
|
+
var r = this;
|
|
346
|
+
function handle(n, o) {
|
|
347
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
348
|
+
}
|
|
349
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
350
|
+
var i = this.tryEntries[o],
|
|
351
|
+
a = i.completion;
|
|
352
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
353
|
+
if (i.tryLoc <= this.prev) {
|
|
354
|
+
var c = n.call(i, "catchLoc"),
|
|
355
|
+
u = n.call(i, "finallyLoc");
|
|
356
|
+
if (c && u) {
|
|
357
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
358
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
359
|
+
} else if (c) {
|
|
360
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
361
|
+
} else {
|
|
362
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
363
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
abrupt: function (t, e) {
|
|
369
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
370
|
+
var o = this.tryEntries[r];
|
|
371
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
372
|
+
var i = o;
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
377
|
+
var a = i ? i.completion : {};
|
|
378
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
379
|
+
},
|
|
380
|
+
complete: function (t, e) {
|
|
381
|
+
if ("throw" === t.type) throw t.arg;
|
|
382
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
383
|
+
},
|
|
384
|
+
finish: function (t) {
|
|
385
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
386
|
+
var r = this.tryEntries[e];
|
|
387
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
catch: function (t) {
|
|
391
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
392
|
+
var r = this.tryEntries[e];
|
|
393
|
+
if (r.tryLoc === t) {
|
|
394
|
+
var n = r.completion;
|
|
395
|
+
if ("throw" === n.type) {
|
|
396
|
+
var o = n.arg;
|
|
397
|
+
resetTryEntry(r);
|
|
398
|
+
}
|
|
399
|
+
return o;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
throw Error("illegal catch attempt");
|
|
403
|
+
},
|
|
404
|
+
delegateYield: function (e, r, n) {
|
|
405
|
+
return this.delegate = {
|
|
406
|
+
iterator: values(e),
|
|
407
|
+
resultName: r,
|
|
408
|
+
nextLoc: n
|
|
409
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
410
|
+
}
|
|
411
|
+
}, e;
|
|
412
|
+
}
|
|
413
|
+
function _slicedToArray(r, e) {
|
|
414
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
415
|
+
}
|
|
416
|
+
function _toPrimitive(t, r) {
|
|
417
|
+
if ("object" != typeof t || !t) return t;
|
|
418
|
+
var e = t[Symbol.toPrimitive];
|
|
419
|
+
if (void 0 !== e) {
|
|
420
|
+
var i = e.call(t, r || "default");
|
|
421
|
+
if ("object" != typeof i) return i;
|
|
422
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
423
|
+
}
|
|
424
|
+
return ("string" === r ? String : Number)(t);
|
|
425
|
+
}
|
|
426
|
+
function _toPropertyKey(t) {
|
|
427
|
+
var i = _toPrimitive(t, "string");
|
|
428
|
+
return "symbol" == typeof i ? i : i + "";
|
|
429
|
+
}
|
|
430
|
+
function _typeof(o) {
|
|
431
|
+
"@babel/helpers - typeof";
|
|
432
|
+
|
|
433
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
434
|
+
return typeof o;
|
|
435
|
+
} : function (o) {
|
|
436
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
437
|
+
}, _typeof(o);
|
|
438
|
+
}
|
|
439
|
+
function _unsupportedIterableToArray(r, a) {
|
|
440
|
+
if (r) {
|
|
441
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
442
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
443
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
exports._asyncToGenerator = _asyncToGenerator;
|
|
448
|
+
exports._defineProperty = _defineProperty;
|
|
449
|
+
exports._objectSpread2 = _objectSpread2;
|
|
450
|
+
exports._objectWithoutProperties = _objectWithoutProperties;
|
|
451
|
+
exports._regeneratorRuntime = _regeneratorRuntime;
|
|
452
|
+
exports._slicedToArray = _slicedToArray;
|
|
453
|
+
exports._typeof = _typeof;
|
|
454
|
+
//# sourceMappingURL=DlurfqjS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DlurfqjS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,11 +10,12 @@ var ModalWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
10
10
|
children = _ref.children,
|
|
11
11
|
setVisible = _ref.setVisible,
|
|
12
12
|
opacity = _ref.opacity;
|
|
13
|
-
if (!needModal) return visible
|
|
13
|
+
if (!needModal) return visible ? children : null;
|
|
14
14
|
return /* @__PURE__ */React.createElement(reactNative.Modal, {
|
|
15
15
|
visible: visible,
|
|
16
16
|
transparent: true,
|
|
17
|
-
ref: ref
|
|
17
|
+
ref: ref,
|
|
18
|
+
collapsable: false
|
|
18
19
|
}, /* @__PURE__ */React.createElement(reactNative.Pressable, {
|
|
19
20
|
onPress: function onPress() {
|
|
20
21
|
return setVisible(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../../../../src/components/Popover/rn/component.tsx"],"sourcesContent":["import React, { ReactNode, forwardRef } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../../../../src/components/Popover/rn/component.tsx"],"sourcesContent":["import React, { ReactNode, forwardRef } from \"react\";\nimport { Modal, View, Pressable } from \"react-native\";\n\nexport const ModalWrapper = forwardRef<\n Modal,\n { needModal?: boolean; visible: boolean; children: ReactNode; setVisible: (value: boolean) => any; opacity?: number }\n>(({ needModal, visible, children, setVisible, opacity }, ref) => {\n if (!needModal) return visible ? children : null;\n return (\n <Modal visible={visible} transparent ref={ref} collapsable={false}>\n <Pressable\n onPress={() => setVisible(false)}\n style={{\n backgroundColor: `rgba(0, 0, 0, ${opacity || 0})`,\n position: \"absolute\",\n height: \"100%\",\n width: \"100%\",\n flex: 1,\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 1000,\n }}\n >\n {children}\n </Pressable>\n </Modal>\n );\n});\n\nexport const Arrow = forwardRef<View, { style: any; color: string }>(({ style, color }, ref) => {\n return (\n <View\n ref={ref}\n style={{\n borderBottomColor: color,\n ...style,\n width: 0,\n height: 0,\n borderTopWidth: 7,\n borderLeftWidth: 7,\n borderRightWidth: 7,\n borderLeftColor: \"transparent\",\n borderRightColor: \"transparent\",\n borderTopColor: \"transparent\",\n borderBottomWidth: 5,\n }}\n ></View>\n );\n});\n"],"names":["ModalWrapper","forwardRef","_ref","ref","needModal","visible","children","setVisible","opacity","Modal","transparent","collapsable","React","createElement","Pressable","onPress","style","backgroundColor","concat","position","height","width","flex","top","bottom","left","right","zIndex","Arrow","_ref2","color","View","_objectSpread","borderBottomColor","borderTopWidth","borderLeftWidth","borderRightWidth","borderLeftColor","borderRightColor","borderTopColor","borderBottomWidth"],"mappings":";;;;;;AAGa,IAAAA,YAAA,gBAAeC,gBAG1B,CAAA,UAAAC,IAAA,EAAwDC,GAAQ,EAAA;AAAA,EAAA,IAA7DC,SAAA,GAAAF,IAAA,CAAAE,SAAA;IAAWC,eAAAA;IAASC,QAAU,GAAAJ,IAAA,CAAVI,QAAU;IAAAC,UAAA,GAAAL,IAAA,CAAAK,UAAA;IAAYC,OAAQ,GAAAN,IAAA,CAARM,OAAQ,CAAA;EACrD,IAAI,CAACJ,SAAA,EAAkB,OAAAC,OAAA,GAAUC,QAAW,GAAA,IAAA,CAAA;AAC5C,EAAA,0CACGG,iBAAM,EAAA;AAAAJ,IAAAA,OAAA,EAAAA,OAAA;AAAkBK,IAAAA,aAAW,IAAC;AAAAP,IAAAA,GAAA,EAAAA,GAAA;AAAUQ,IAAAA,aAAa,KAAA;AAC1D,GAAA,iBAAAC,KAAA,CAAAC,aAAA,CAACC,qBAAA,EAAA;IACCC,OAAA,EAAS,SAAAA,OAAA,GAAA;MAAA,OAAMR,UAAA,CAAW,KAAK,CAAA,CAAA;AAAA,KAAA;AAC/BS,IAAAA,KAAO,EAAA;AACLC,MAAAA,eAAA,mBAAAC,MAAA,CAAkCV,OAAA,IAAW,CAAC,EAAA,GAAA,CAAA;AAC9CW,MAAAA,QAAU,EAAA,UAAA;AACVC,MAAAA,MAAQ,EAAA,MAAA;AACRC,MAAAA,KAAO,EAAA,MAAA;AACPC,MAAAA,IAAM,EAAA,CAAA;AACNC,MAAAA,GAAK,EAAA,CAAA;AACLC,MAAAA,MAAQ,EAAA,CAAA;AACRC,MAAAA,IAAM,EAAA,CAAA;AACNC,MAAAA,KAAO,EAAA,CAAA;AACPC,MAAAA,MAAQ,EAAA,GAAA;AACV,KAAA;GAAA,EAECrB,QACH,CACF,CAAA,CAAA;AAEJ,CAAC,EAAA;AAEM,IAAMsB,qBAAQ3B,gBAAgD,CAAA,UAAA4B,KAAA,EAAmB1B,GAAQ,EAAA;AAAA,EAAA,IAAxBa,KAAO,GAAAa,KAAA,CAAPb,KAAO;IAAAc,KAAA,GAAAD,KAAA,CAAAC,KAAA,CAAA;AAE3E,EAAA,sBAAAlB,KAAA,CAAAC,aAAA,CAACkB,gBAAA,EAAA;AACC5B,IAAAA,GAAA,EAAAA,GAAA;IACAa,KAAO,EAAAgB,wCAAA,CAAAA,wCAAA,CAAA;AACLC,MAAAA,iBAAmB,EAAAH,KAAAA;AAAA,KAAA,EAChBd,KAAA,CAAA,EAAA,EAAA,EAAA;AACHK,MAAAA,KAAO,EAAA,CAAA;AACPD,MAAAA,MAAQ,EAAA,CAAA;AACRc,MAAAA,cAAgB,EAAA,CAAA;AAChBC,MAAAA,eAAiB,EAAA,CAAA;AACjBC,MAAAA,gBAAkB,EAAA,CAAA;AAClBC,MAAAA,eAAiB,EAAA,aAAA;AACjBC,MAAAA,gBAAkB,EAAA,aAAA;AAClBC,MAAAA,cAAgB,EAAA,aAAA;AAChBC,MAAAA,iBAAmB,EAAA,CAAA;AAAA,KAAA,CAAA;AACrB,GACD,CAAA,CAAA;AAEL,CAAC;;;;;"}
|
|
@@ -1355,14 +1355,13 @@ var arrow = function arrow(options, deps) {
|
|
|
1355
1355
|
|
|
1356
1356
|
var _excluded = ["refs", "floatingStyles", "middlewareData", "elements"];
|
|
1357
1357
|
var useFloating = function useFloating(_ref) {
|
|
1358
|
-
var _middlewareData$arrow, _middlewareData$offse, _middlewareData$offse2;
|
|
1358
|
+
var _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$offse, _middlewareData$offse2;
|
|
1359
1359
|
var placement = _ref.placement,
|
|
1360
1360
|
needModal = _ref.needModal;
|
|
1361
|
-
var _useState = React.useState(0),
|
|
1362
|
-
_useState2 = _rollupPluginBabelHelpers._slicedToArray(_useState, 2),
|
|
1363
|
-
floatingHeight = _useState2[0],
|
|
1364
|
-
setfloatingHeight = _useState2[1];
|
|
1365
1361
|
var arrowRef = React.useRef(null);
|
|
1362
|
+
var floatingHeight = React.useRef(0);
|
|
1363
|
+
var referenceX = React.useRef(0);
|
|
1364
|
+
var referenceY = React.useRef(0);
|
|
1366
1365
|
var _useFloatingUI = useFloating$1({
|
|
1367
1366
|
placement: placement,
|
|
1368
1367
|
sameScrollView: !needModal,
|
|
@@ -1382,12 +1381,19 @@ var useFloating = function useFloating(_ref) {
|
|
|
1382
1381
|
middlewareData = _useFloatingUI.middlewareData,
|
|
1383
1382
|
elements = _useFloatingUI.elements,
|
|
1384
1383
|
other = _rollupPluginBabelHelpers._objectWithoutProperties(_useFloatingUI, _excluded);
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1384
|
+
if (elements.reference) {
|
|
1385
|
+
if (!elements.reference.oldmeasure) {
|
|
1386
|
+
elements.reference.oldmeasure = elements.reference.measure.bind(elements.reference);
|
|
1387
|
+
elements.reference.measure = function (fn) {
|
|
1388
|
+
return elements.reference.oldmeasure(function (x, y) {
|
|
1389
|
+
for (var _len = arguments.length, other2 = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1390
|
+
other2[_key - 2] = arguments[_key];
|
|
1391
|
+
}
|
|
1392
|
+
return fn.apply(void 0, [referenceX.current, referenceY.current].concat(other2));
|
|
1393
|
+
});
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1391
1397
|
return _rollupPluginBabelHelpers._objectSpread2({
|
|
1392
1398
|
setFloatingRef: function setFloatingRef(ref) {
|
|
1393
1399
|
return refs.setFloating(ref);
|
|
@@ -1395,16 +1401,30 @@ var useFloating = function useFloating(_ref) {
|
|
|
1395
1401
|
setReferenceRef: function setReferenceRef(ref) {
|
|
1396
1402
|
return refs.setReference(ref);
|
|
1397
1403
|
},
|
|
1404
|
+
// setOffsetParentRef: <T>(ref: T) => refs.setOffsetParent(ref),
|
|
1398
1405
|
setOffsetParentRef: refs.offsetParent,
|
|
1399
1406
|
setArrowRef: arrowRef,
|
|
1407
|
+
onReferenceLayout: function onReferenceLayout(event) {
|
|
1408
|
+
var _event$nativeEvent$la = event.nativeEvent.layout,
|
|
1409
|
+
x = _event$nativeEvent$la.x,
|
|
1410
|
+
y = _event$nativeEvent$la.y;
|
|
1411
|
+
referenceX.current = x;
|
|
1412
|
+
referenceY.current = y;
|
|
1413
|
+
},
|
|
1414
|
+
onFloatingLayout: function onFloatingLayout(event) {
|
|
1415
|
+
var height = event.nativeEvent.layout.height;
|
|
1416
|
+
floatingHeight.current = height;
|
|
1417
|
+
},
|
|
1400
1418
|
refs: refs,
|
|
1401
1419
|
elements: elements,
|
|
1402
1420
|
middlewareData: middlewareData,
|
|
1403
|
-
floatingStyles: floatingStyles,
|
|
1421
|
+
floatingStyles: (floatingStyles.left || floatingStyles.top) && (_middlewareData$arrow = middlewareData.arrow) !== null && _middlewareData$arrow !== void 0 && _middlewareData$arrow.x ? floatingStyles : _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, floatingStyles), {}, {
|
|
1422
|
+
opacity: 0
|
|
1423
|
+
}),
|
|
1404
1424
|
arrowStyles: {
|
|
1405
1425
|
position: "absolute",
|
|
1406
|
-
left: ((_middlewareData$
|
|
1407
|
-
top: (_middlewareData$offse = middlewareData.offset) !== null && _middlewareData$offse !== void 0 && _middlewareData$offse.placement.includes("top") ? floatingHeight : -12,
|
|
1426
|
+
left: ((_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.x) != null ? middlewareData.arrow.x : null,
|
|
1427
|
+
top: (_middlewareData$offse = middlewareData.offset) !== null && _middlewareData$offse !== void 0 && _middlewareData$offse.placement.includes("top") ? floatingHeight.current : -12,
|
|
1408
1428
|
transform: (_middlewareData$offse2 = middlewareData.offset) !== null && _middlewareData$offse2 !== void 0 && _middlewareData$offse2.placement.includes("top") ? "rotate(180deg)" : "rotate(0deg)"
|
|
1409
1429
|
}
|
|
1410
1430
|
}, other);
|