@starasia/badges 1.0.1 → 1.0.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/dist/badges.es.js +29 -654
- package/dist/badges.umd.js +2 -31
- package/package.json +6 -6
package/dist/badges.es.js
CHANGED
|
@@ -1,631 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var Tr;
|
|
13
|
-
function fe() {
|
|
14
|
-
if (Tr) return I;
|
|
15
|
-
Tr = 1;
|
|
16
|
-
var v = U, g = Symbol.for("react.element"), R = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, p = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
-
function x(S, c, P) {
|
|
18
|
-
var h, E = {}, T = null, Y = null;
|
|
19
|
-
P !== void 0 && (T = "" + P), c.key !== void 0 && (T = "" + c.key), c.ref !== void 0 && (Y = c.ref);
|
|
20
|
-
for (h in c) y.call(c, h) && !C.hasOwnProperty(h) && (E[h] = c[h]);
|
|
21
|
-
if (S && S.defaultProps) for (h in c = S.defaultProps, c) E[h] === void 0 && (E[h] = c[h]);
|
|
22
|
-
return { $$typeof: g, type: S, key: T, ref: Y, props: E, _owner: p.current };
|
|
23
|
-
}
|
|
24
|
-
return I.Fragment = R, I.jsx = x, I.jsxs = x, I;
|
|
25
|
-
}
|
|
26
|
-
var $ = {};
|
|
27
|
-
/**
|
|
28
|
-
* @license React
|
|
29
|
-
* react-jsx-runtime.development.js
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
36
|
-
var Or;
|
|
37
|
-
function de() {
|
|
38
|
-
return Or || (Or = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var v = U, g = Symbol.for("react.element"), R = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), S = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, Cr = "@@iterator";
|
|
40
|
-
function Pr(r) {
|
|
41
|
-
if (r === null || typeof r != "object")
|
|
42
|
-
return null;
|
|
43
|
-
var e = Q && r[Q] || r[Cr];
|
|
44
|
-
return typeof e == "function" ? e : null;
|
|
45
|
-
}
|
|
46
|
-
var j = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
-
function f(r) {
|
|
48
|
-
{
|
|
49
|
-
for (var e = arguments.length, a = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
50
|
-
a[n - 1] = arguments[n];
|
|
51
|
-
jr("error", r, a);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function jr(r, e, a) {
|
|
55
|
-
{
|
|
56
|
-
var n = j.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
57
|
-
s !== "" && (e += "%s", a = a.concat([s]));
|
|
58
|
-
var o = a.map(function(i) {
|
|
59
|
-
return String(i);
|
|
60
|
-
});
|
|
61
|
-
o.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, o);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
var kr = !1, Dr = !1, Ar = !1, Fr = !1, Ir = !1, rr;
|
|
65
|
-
rr = Symbol.for("react.module.reference");
|
|
66
|
-
function $r(r) {
|
|
67
|
-
return !!(typeof r == "string" || typeof r == "function" || r === y || r === C || Ir || r === p || r === P || r === h || Fr || r === Y || kr || Dr || Ar || typeof r == "object" && r !== null && (r.$$typeof === T || r.$$typeof === E || r.$$typeof === x || r.$$typeof === S || r.$$typeof === c || // This needs to include all possible module reference object
|
|
68
|
-
// types supported by any Flight configuration anywhere since
|
|
69
|
-
// we don't know which Flight build this will end up being used
|
|
70
|
-
// with.
|
|
71
|
-
r.$$typeof === rr || r.getModuleId !== void 0));
|
|
72
|
-
}
|
|
73
|
-
function Yr(r, e, a) {
|
|
74
|
-
var n = r.displayName;
|
|
75
|
-
if (n)
|
|
76
|
-
return n;
|
|
77
|
-
var s = e.displayName || e.name || "";
|
|
78
|
-
return s !== "" ? a + "(" + s + ")" : a;
|
|
79
|
-
}
|
|
80
|
-
function er(r) {
|
|
81
|
-
return r.displayName || "Context";
|
|
82
|
-
}
|
|
83
|
-
function _(r) {
|
|
84
|
-
if (r == null)
|
|
85
|
-
return null;
|
|
86
|
-
if (typeof r.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
87
|
-
return r.displayName || r.name || null;
|
|
88
|
-
if (typeof r == "string")
|
|
89
|
-
return r;
|
|
90
|
-
switch (r) {
|
|
91
|
-
case y:
|
|
92
|
-
return "Fragment";
|
|
93
|
-
case R:
|
|
94
|
-
return "Portal";
|
|
95
|
-
case C:
|
|
96
|
-
return "Profiler";
|
|
97
|
-
case p:
|
|
98
|
-
return "StrictMode";
|
|
99
|
-
case P:
|
|
100
|
-
return "Suspense";
|
|
101
|
-
case h:
|
|
102
|
-
return "SuspenseList";
|
|
103
|
-
}
|
|
104
|
-
if (typeof r == "object")
|
|
105
|
-
switch (r.$$typeof) {
|
|
106
|
-
case S:
|
|
107
|
-
var e = r;
|
|
108
|
-
return er(e) + ".Consumer";
|
|
109
|
-
case x:
|
|
110
|
-
var a = r;
|
|
111
|
-
return er(a._context) + ".Provider";
|
|
112
|
-
case c:
|
|
113
|
-
return Yr(r, r.render, "ForwardRef");
|
|
114
|
-
case E:
|
|
115
|
-
var n = r.displayName || null;
|
|
116
|
-
return n !== null ? n : _(r.type) || "Memo";
|
|
117
|
-
case T: {
|
|
118
|
-
var s = r, o = s._payload, i = s._init;
|
|
119
|
-
try {
|
|
120
|
-
return _(i(o));
|
|
121
|
-
} catch {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
var O = Object.assign, A = 0, ar, nr, tr, ir, sr, or, ur;
|
|
129
|
-
function lr() {
|
|
130
|
-
}
|
|
131
|
-
lr.__reactDisabledLog = !0;
|
|
132
|
-
function Wr() {
|
|
133
|
-
{
|
|
134
|
-
if (A === 0) {
|
|
135
|
-
ar = console.log, nr = console.info, tr = console.warn, ir = console.error, sr = console.group, or = console.groupCollapsed, ur = console.groupEnd;
|
|
136
|
-
var r = {
|
|
137
|
-
configurable: !0,
|
|
138
|
-
enumerable: !0,
|
|
139
|
-
value: lr,
|
|
140
|
-
writable: !0
|
|
141
|
-
};
|
|
142
|
-
Object.defineProperties(console, {
|
|
143
|
-
info: r,
|
|
144
|
-
log: r,
|
|
145
|
-
warn: r,
|
|
146
|
-
error: r,
|
|
147
|
-
group: r,
|
|
148
|
-
groupCollapsed: r,
|
|
149
|
-
groupEnd: r
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
A++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function Lr() {
|
|
156
|
-
{
|
|
157
|
-
if (A--, A === 0) {
|
|
158
|
-
var r = {
|
|
159
|
-
configurable: !0,
|
|
160
|
-
enumerable: !0,
|
|
161
|
-
writable: !0
|
|
162
|
-
};
|
|
163
|
-
Object.defineProperties(console, {
|
|
164
|
-
log: O({}, r, {
|
|
165
|
-
value: ar
|
|
166
|
-
}),
|
|
167
|
-
info: O({}, r, {
|
|
168
|
-
value: nr
|
|
169
|
-
}),
|
|
170
|
-
warn: O({}, r, {
|
|
171
|
-
value: tr
|
|
172
|
-
}),
|
|
173
|
-
error: O({}, r, {
|
|
174
|
-
value: ir
|
|
175
|
-
}),
|
|
176
|
-
group: O({}, r, {
|
|
177
|
-
value: sr
|
|
178
|
-
}),
|
|
179
|
-
groupCollapsed: O({}, r, {
|
|
180
|
-
value: or
|
|
181
|
-
}),
|
|
182
|
-
groupEnd: O({}, r, {
|
|
183
|
-
value: ur
|
|
184
|
-
})
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
A < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
var B = j.ReactCurrentDispatcher, z;
|
|
191
|
-
function W(r, e, a) {
|
|
192
|
-
{
|
|
193
|
-
if (z === void 0)
|
|
194
|
-
try {
|
|
195
|
-
throw Error();
|
|
196
|
-
} catch (s) {
|
|
197
|
-
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
z = n && n[1] || "";
|
|
199
|
-
}
|
|
200
|
-
return `
|
|
201
|
-
` + z + r;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
var J = !1, L;
|
|
205
|
-
{
|
|
206
|
-
var Vr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
L = new Vr();
|
|
208
|
-
}
|
|
209
|
-
function cr(r, e) {
|
|
210
|
-
if (!r || J)
|
|
211
|
-
return "";
|
|
212
|
-
{
|
|
213
|
-
var a = L.get(r);
|
|
214
|
-
if (a !== void 0)
|
|
215
|
-
return a;
|
|
216
|
-
}
|
|
217
|
-
var n;
|
|
218
|
-
J = !0;
|
|
219
|
-
var s = Error.prepareStackTrace;
|
|
220
|
-
Error.prepareStackTrace = void 0;
|
|
221
|
-
var o;
|
|
222
|
-
o = B.current, B.current = null, Wr();
|
|
223
|
-
try {
|
|
224
|
-
if (e) {
|
|
225
|
-
var i = function() {
|
|
226
|
-
throw Error();
|
|
227
|
-
};
|
|
228
|
-
if (Object.defineProperty(i.prototype, "props", {
|
|
229
|
-
set: function() {
|
|
230
|
-
throw Error();
|
|
231
|
-
}
|
|
232
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
|
-
try {
|
|
234
|
-
Reflect.construct(i, []);
|
|
235
|
-
} catch (b) {
|
|
236
|
-
n = b;
|
|
237
|
-
}
|
|
238
|
-
Reflect.construct(r, [], i);
|
|
239
|
-
} else {
|
|
240
|
-
try {
|
|
241
|
-
i.call();
|
|
242
|
-
} catch (b) {
|
|
243
|
-
n = b;
|
|
244
|
-
}
|
|
245
|
-
r.call(i.prototype);
|
|
246
|
-
}
|
|
247
|
-
} else {
|
|
248
|
-
try {
|
|
249
|
-
throw Error();
|
|
250
|
-
} catch (b) {
|
|
251
|
-
n = b;
|
|
252
|
-
}
|
|
253
|
-
r();
|
|
254
|
-
}
|
|
255
|
-
} catch (b) {
|
|
256
|
-
if (b && n && typeof b.stack == "string") {
|
|
257
|
-
for (var t = b.stack.split(`
|
|
258
|
-
`), d = n.stack.split(`
|
|
259
|
-
`), u = t.length - 1, l = d.length - 1; u >= 1 && l >= 0 && t[u] !== d[l]; )
|
|
260
|
-
l--;
|
|
261
|
-
for (; u >= 1 && l >= 0; u--, l--)
|
|
262
|
-
if (t[u] !== d[l]) {
|
|
263
|
-
if (u !== 1 || l !== 1)
|
|
264
|
-
do
|
|
265
|
-
if (u--, l--, l < 0 || t[u] !== d[l]) {
|
|
266
|
-
var m = `
|
|
267
|
-
` + t[u].replace(" at new ", " at ");
|
|
268
|
-
return r.displayName && m.includes("<anonymous>") && (m = m.replace("<anonymous>", r.displayName)), typeof r == "function" && L.set(r, m), m;
|
|
269
|
-
}
|
|
270
|
-
while (u >= 1 && l >= 0);
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
} finally {
|
|
275
|
-
J = !1, B.current = o, Lr(), Error.prepareStackTrace = s;
|
|
276
|
-
}
|
|
277
|
-
var D = r ? r.displayName || r.name : "", w = D ? W(D) : "";
|
|
278
|
-
return typeof r == "function" && L.set(r, w), w;
|
|
279
|
-
}
|
|
280
|
-
function Mr(r, e, a) {
|
|
281
|
-
return cr(r, !1);
|
|
282
|
-
}
|
|
283
|
-
function Nr(r) {
|
|
284
|
-
var e = r.prototype;
|
|
285
|
-
return !!(e && e.isReactComponent);
|
|
286
|
-
}
|
|
287
|
-
function V(r, e, a) {
|
|
288
|
-
if (r == null)
|
|
289
|
-
return "";
|
|
290
|
-
if (typeof r == "function")
|
|
291
|
-
return cr(r, Nr(r));
|
|
292
|
-
if (typeof r == "string")
|
|
293
|
-
return W(r);
|
|
294
|
-
switch (r) {
|
|
295
|
-
case P:
|
|
296
|
-
return W("Suspense");
|
|
297
|
-
case h:
|
|
298
|
-
return W("SuspenseList");
|
|
299
|
-
}
|
|
300
|
-
if (typeof r == "object")
|
|
301
|
-
switch (r.$$typeof) {
|
|
302
|
-
case c:
|
|
303
|
-
return Mr(r.render);
|
|
304
|
-
case E:
|
|
305
|
-
return V(r.type, e, a);
|
|
306
|
-
case T: {
|
|
307
|
-
var n = r, s = n._payload, o = n._init;
|
|
308
|
-
try {
|
|
309
|
-
return V(o(s), e, a);
|
|
310
|
-
} catch {
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return "";
|
|
315
|
-
}
|
|
316
|
-
var F = Object.prototype.hasOwnProperty, fr = {}, dr = j.ReactDebugCurrentFrame;
|
|
317
|
-
function M(r) {
|
|
318
|
-
if (r) {
|
|
319
|
-
var e = r._owner, a = V(r.type, r._source, e ? e.type : null);
|
|
320
|
-
dr.setExtraStackFrame(a);
|
|
321
|
-
} else
|
|
322
|
-
dr.setExtraStackFrame(null);
|
|
323
|
-
}
|
|
324
|
-
function Ur(r, e, a, n, s) {
|
|
325
|
-
{
|
|
326
|
-
var o = Function.call.bind(F);
|
|
327
|
-
for (var i in r)
|
|
328
|
-
if (o(r, i)) {
|
|
329
|
-
var t = void 0;
|
|
330
|
-
try {
|
|
331
|
-
if (typeof r[i] != "function") {
|
|
332
|
-
var d = Error((n || "React class") + ": " + a + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
-
throw d.name = "Invariant Violation", d;
|
|
334
|
-
}
|
|
335
|
-
t = r[i](e, i, n, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (u) {
|
|
337
|
-
t = u;
|
|
338
|
-
}
|
|
339
|
-
t && !(t instanceof Error) && (M(s), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", a, i, typeof t), M(null)), t instanceof Error && !(t.message in fr) && (fr[t.message] = !0, M(s), f("Failed %s type: %s", a, t.message), M(null));
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
var Br = Array.isArray;
|
|
344
|
-
function q(r) {
|
|
345
|
-
return Br(r);
|
|
346
|
-
}
|
|
347
|
-
function zr(r) {
|
|
348
|
-
{
|
|
349
|
-
var e = typeof Symbol == "function" && Symbol.toStringTag, a = e && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
350
|
-
return a;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function Jr(r) {
|
|
354
|
-
try {
|
|
355
|
-
return vr(r), !1;
|
|
356
|
-
} catch {
|
|
357
|
-
return !0;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
function vr(r) {
|
|
361
|
-
return "" + r;
|
|
362
|
-
}
|
|
363
|
-
function gr(r) {
|
|
364
|
-
if (Jr(r))
|
|
365
|
-
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zr(r)), vr(r);
|
|
366
|
-
}
|
|
367
|
-
var pr = j.ReactCurrentOwner, qr = {
|
|
368
|
-
key: !0,
|
|
369
|
-
ref: !0,
|
|
370
|
-
__self: !0,
|
|
371
|
-
__source: !0
|
|
372
|
-
}, br, hr;
|
|
373
|
-
function Gr(r) {
|
|
374
|
-
if (F.call(r, "ref")) {
|
|
375
|
-
var e = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
376
|
-
if (e && e.isReactWarning)
|
|
377
|
-
return !1;
|
|
378
|
-
}
|
|
379
|
-
return r.ref !== void 0;
|
|
380
|
-
}
|
|
381
|
-
function Kr(r) {
|
|
382
|
-
if (F.call(r, "key")) {
|
|
383
|
-
var e = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
384
|
-
if (e && e.isReactWarning)
|
|
385
|
-
return !1;
|
|
386
|
-
}
|
|
387
|
-
return r.key !== void 0;
|
|
388
|
-
}
|
|
389
|
-
function Xr(r, e) {
|
|
390
|
-
typeof r.ref == "string" && pr.current;
|
|
391
|
-
}
|
|
392
|
-
function Hr(r, e) {
|
|
393
|
-
{
|
|
394
|
-
var a = function() {
|
|
395
|
-
br || (br = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
|
|
396
|
-
};
|
|
397
|
-
a.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
398
|
-
get: a,
|
|
399
|
-
configurable: !0
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
function Zr(r, e) {
|
|
404
|
-
{
|
|
405
|
-
var a = function() {
|
|
406
|
-
hr || (hr = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
|
|
407
|
-
};
|
|
408
|
-
a.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
409
|
-
get: a,
|
|
410
|
-
configurable: !0
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
var Qr = function(r, e, a, n, s, o, i) {
|
|
415
|
-
var t = {
|
|
416
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof: g,
|
|
418
|
-
// Built-in properties that belong on the element
|
|
419
|
-
type: r,
|
|
420
|
-
key: e,
|
|
421
|
-
ref: a,
|
|
422
|
-
props: i,
|
|
423
|
-
// Record the component responsible for creating this element.
|
|
424
|
-
_owner: o
|
|
425
|
-
};
|
|
426
|
-
return t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
427
|
-
configurable: !1,
|
|
428
|
-
enumerable: !1,
|
|
429
|
-
writable: !0,
|
|
430
|
-
value: !1
|
|
431
|
-
}), Object.defineProperty(t, "_self", {
|
|
432
|
-
configurable: !1,
|
|
433
|
-
enumerable: !1,
|
|
434
|
-
writable: !1,
|
|
435
|
-
value: n
|
|
436
|
-
}), Object.defineProperty(t, "_source", {
|
|
437
|
-
configurable: !1,
|
|
438
|
-
enumerable: !1,
|
|
439
|
-
writable: !1,
|
|
440
|
-
value: s
|
|
441
|
-
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
442
|
-
};
|
|
443
|
-
function re(r, e, a, n, s) {
|
|
444
|
-
{
|
|
445
|
-
var o, i = {}, t = null, d = null;
|
|
446
|
-
a !== void 0 && (gr(a), t = "" + a), Kr(e) && (gr(e.key), t = "" + e.key), Gr(e) && (d = e.ref, Xr(e, s));
|
|
447
|
-
for (o in e)
|
|
448
|
-
F.call(e, o) && !qr.hasOwnProperty(o) && (i[o] = e[o]);
|
|
449
|
-
if (r && r.defaultProps) {
|
|
450
|
-
var u = r.defaultProps;
|
|
451
|
-
for (o in u)
|
|
452
|
-
i[o] === void 0 && (i[o] = u[o]);
|
|
453
|
-
}
|
|
454
|
-
if (t || d) {
|
|
455
|
-
var l = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
456
|
-
t && Hr(i, l), d && Zr(i, l);
|
|
457
|
-
}
|
|
458
|
-
return Qr(r, t, d, s, n, pr.current, i);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
var G = j.ReactCurrentOwner, mr = j.ReactDebugCurrentFrame;
|
|
462
|
-
function k(r) {
|
|
463
|
-
if (r) {
|
|
464
|
-
var e = r._owner, a = V(r.type, r._source, e ? e.type : null);
|
|
465
|
-
mr.setExtraStackFrame(a);
|
|
466
|
-
} else
|
|
467
|
-
mr.setExtraStackFrame(null);
|
|
468
|
-
}
|
|
469
|
-
var K;
|
|
470
|
-
K = !1;
|
|
471
|
-
function X(r) {
|
|
472
|
-
return typeof r == "object" && r !== null && r.$$typeof === g;
|
|
473
|
-
}
|
|
474
|
-
function yr() {
|
|
475
|
-
{
|
|
476
|
-
if (G.current) {
|
|
477
|
-
var r = _(G.current.type);
|
|
478
|
-
if (r)
|
|
479
|
-
return `
|
|
480
|
-
|
|
481
|
-
Check the render method of \`` + r + "`.";
|
|
482
|
-
}
|
|
483
|
-
return "";
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
function ee(r) {
|
|
487
|
-
return "";
|
|
488
|
-
}
|
|
489
|
-
var Er = {};
|
|
490
|
-
function ae(r) {
|
|
491
|
-
{
|
|
492
|
-
var e = yr();
|
|
493
|
-
if (!e) {
|
|
494
|
-
var a = typeof r == "string" ? r : r.displayName || r.name;
|
|
495
|
-
a && (e = `
|
|
496
|
-
|
|
497
|
-
Check the top-level render call using <` + a + ">.");
|
|
498
|
-
}
|
|
499
|
-
return e;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
function _r(r, e) {
|
|
503
|
-
{
|
|
504
|
-
if (!r._store || r._store.validated || r.key != null)
|
|
505
|
-
return;
|
|
506
|
-
r._store.validated = !0;
|
|
507
|
-
var a = ae(e);
|
|
508
|
-
if (Er[a])
|
|
509
|
-
return;
|
|
510
|
-
Er[a] = !0;
|
|
511
|
-
var n = "";
|
|
512
|
-
r && r._owner && r._owner !== G.current && (n = " It was passed a child from " + _(r._owner.type) + "."), k(r), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, n), k(null);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
function Rr(r, e) {
|
|
516
|
-
{
|
|
517
|
-
if (typeof r != "object")
|
|
518
|
-
return;
|
|
519
|
-
if (q(r))
|
|
520
|
-
for (var a = 0; a < r.length; a++) {
|
|
521
|
-
var n = r[a];
|
|
522
|
-
X(n) && _r(n, e);
|
|
523
|
-
}
|
|
524
|
-
else if (X(r))
|
|
525
|
-
r._store && (r._store.validated = !0);
|
|
526
|
-
else if (r) {
|
|
527
|
-
var s = Pr(r);
|
|
528
|
-
if (typeof s == "function" && s !== r.entries)
|
|
529
|
-
for (var o = s.call(r), i; !(i = o.next()).done; )
|
|
530
|
-
X(i.value) && _r(i.value, e);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
function ne(r) {
|
|
535
|
-
{
|
|
536
|
-
var e = r.type;
|
|
537
|
-
if (e == null || typeof e == "string")
|
|
538
|
-
return;
|
|
539
|
-
var a;
|
|
540
|
-
if (typeof e == "function")
|
|
541
|
-
a = e.propTypes;
|
|
542
|
-
else if (typeof e == "object" && (e.$$typeof === c || // Note: Memo only checks outer props here.
|
|
543
|
-
// Inner props are checked in the reconciler.
|
|
544
|
-
e.$$typeof === E))
|
|
545
|
-
a = e.propTypes;
|
|
546
|
-
else
|
|
547
|
-
return;
|
|
548
|
-
if (a) {
|
|
549
|
-
var n = _(e);
|
|
550
|
-
Ur(a, r.props, "prop", n, r);
|
|
551
|
-
} else if (e.PropTypes !== void 0 && !K) {
|
|
552
|
-
K = !0;
|
|
553
|
-
var s = _(e);
|
|
554
|
-
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
555
|
-
}
|
|
556
|
-
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
function te(r) {
|
|
560
|
-
{
|
|
561
|
-
for (var e = Object.keys(r.props), a = 0; a < e.length; a++) {
|
|
562
|
-
var n = e[a];
|
|
563
|
-
if (n !== "children" && n !== "key") {
|
|
564
|
-
k(r), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
r.ref !== null && (k(r), f("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
var xr = {};
|
|
572
|
-
function Sr(r, e, a, n, s, o) {
|
|
573
|
-
{
|
|
574
|
-
var i = $r(r);
|
|
575
|
-
if (!i) {
|
|
576
|
-
var t = "";
|
|
577
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (t += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
-
var d = ee();
|
|
579
|
-
d ? t += d : t += yr();
|
|
580
|
-
var u;
|
|
581
|
-
r === null ? u = "null" : q(r) ? u = "array" : r !== void 0 && r.$$typeof === g ? (u = "<" + (_(r.type) || "Unknown") + " />", t = " Did you accidentally export a JSX literal instead of a component?") : u = typeof r, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, t);
|
|
582
|
-
}
|
|
583
|
-
var l = re(r, e, a, s, o);
|
|
584
|
-
if (l == null)
|
|
585
|
-
return l;
|
|
586
|
-
if (i) {
|
|
587
|
-
var m = e.children;
|
|
588
|
-
if (m !== void 0)
|
|
589
|
-
if (n)
|
|
590
|
-
if (q(m)) {
|
|
591
|
-
for (var D = 0; D < m.length; D++)
|
|
592
|
-
Rr(m[D], r);
|
|
593
|
-
Object.freeze && Object.freeze(m);
|
|
594
|
-
} else
|
|
595
|
-
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
|
-
else
|
|
597
|
-
Rr(m, r);
|
|
598
|
-
}
|
|
599
|
-
if (F.call(e, "key")) {
|
|
600
|
-
var w = _(r), b = Object.keys(e).filter(function(ce) {
|
|
601
|
-
return ce !== "key";
|
|
602
|
-
}), H = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
-
if (!xr[w + H]) {
|
|
604
|
-
var le = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
|
|
605
|
-
f(`A props object containing a "key" prop is being spread into JSX:
|
|
606
|
-
let props = %s;
|
|
607
|
-
<%s {...props} />
|
|
608
|
-
React keys must be passed directly to JSX without using spread:
|
|
609
|
-
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`, H, w, le, w), xr[w + H] = !0;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return r === y ? te(l) : ne(l), l;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
function ie(r, e, a) {
|
|
617
|
-
return Sr(r, e, a, !0);
|
|
618
|
-
}
|
|
619
|
-
function se(r, e, a) {
|
|
620
|
-
return Sr(r, e, a, !1);
|
|
621
|
-
}
|
|
622
|
-
var oe = se, ue = ie;
|
|
623
|
-
$.Fragment = y, $.jsx = oe, $.jsxs = ue;
|
|
624
|
-
}()), $;
|
|
625
|
-
}
|
|
626
|
-
process.env.NODE_ENV === "production" ? Z.exports = fe() : Z.exports = de();
|
|
627
|
-
var ve = Z.exports;
|
|
628
|
-
const ge = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
1
|
+
import { jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
const g = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
629
4
|
|
|
630
5
|
.starasia-badges {
|
|
631
6
|
display: flex;
|
|
@@ -742,46 +117,46 @@ const ge = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@4
|
|
|
742
117
|
.starasia-badges-neutral.starasia-badges-border {
|
|
743
118
|
border-color: var(--starasia-ui-color-purple-500, #7e39c5);
|
|
744
119
|
}
|
|
745
|
-
`,
|
|
746
|
-
if (!document.getElementById(
|
|
747
|
-
const
|
|
748
|
-
|
|
120
|
+
`, t = "starasia-badges-styles", u = (a) => {
|
|
121
|
+
if (!document.getElementById(t)) {
|
|
122
|
+
const s = document.createElement("style");
|
|
123
|
+
s.id = t, s.textContent = a, document.head.appendChild(s);
|
|
749
124
|
}
|
|
750
125
|
};
|
|
751
|
-
|
|
752
|
-
const
|
|
126
|
+
u(g);
|
|
127
|
+
const i = {
|
|
753
128
|
xs: 14,
|
|
754
129
|
sm: 16,
|
|
755
130
|
md: 18,
|
|
756
131
|
lg: 18
|
|
757
|
-
},
|
|
758
|
-
size:
|
|
759
|
-
variant:
|
|
760
|
-
text:
|
|
761
|
-
LeftIcon:
|
|
762
|
-
RightIcon:
|
|
763
|
-
border:
|
|
764
|
-
corners:
|
|
765
|
-
}) => /* @__PURE__ */
|
|
766
|
-
|
|
767
|
-
width:
|
|
768
|
-
height:
|
|
132
|
+
}, v = ({
|
|
133
|
+
size: a = "md",
|
|
134
|
+
variant: s = "info",
|
|
135
|
+
text: e,
|
|
136
|
+
LeftIcon: n,
|
|
137
|
+
RightIcon: r,
|
|
138
|
+
border: d,
|
|
139
|
+
corners: l = "rounded"
|
|
140
|
+
}) => /* @__PURE__ */ c("div", { className: b(a, s, d, l), children: [
|
|
141
|
+
n ? o.cloneElement(n, {
|
|
142
|
+
width: i[a],
|
|
143
|
+
height: i[a],
|
|
769
144
|
style: {
|
|
770
145
|
color: "inherit"
|
|
771
146
|
}
|
|
772
147
|
}) : null,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
width:
|
|
776
|
-
height:
|
|
148
|
+
e,
|
|
149
|
+
r ? o.cloneElement(r, {
|
|
150
|
+
width: i[a],
|
|
151
|
+
height: i[a],
|
|
777
152
|
style: {
|
|
778
153
|
color: "inherit"
|
|
779
154
|
}
|
|
780
155
|
}) : null
|
|
781
|
-
] }),
|
|
782
|
-
let
|
|
783
|
-
return
|
|
156
|
+
] }), b = (a, s, e, n) => {
|
|
157
|
+
let r = ["starasia-badges"];
|
|
158
|
+
return a && r.push(`starasia-badges-${a}`), s && r.push(`starasia-badges-${s}`), e && r.push("starasia-badges-border"), n === "rounded" ? r.push("starasia-badges-rounded") : r.push("starasia-badges-circular"), r.join(" ");
|
|
784
159
|
};
|
|
785
160
|
export {
|
|
786
|
-
|
|
161
|
+
v as Badges
|
|
787
162
|
};
|
package/dist/badges.umd.js
CHANGED
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var rr;function Cr(){if(rr)return I;rr=1;var v=R,p=Symbol.for("react.element"),S=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,g=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function T(O,c,k){var h,E={},w=null,V=null;k!==void 0&&(w=""+k),c.key!==void 0&&(w=""+c.key),c.ref!==void 0&&(V=c.ref);for(h in c)y.call(c,h)&&!j.hasOwnProperty(h)&&(E[h]=c[h]);if(O&&O.defaultProps)for(h in c=O.defaultProps,c)E[h]===void 0&&(E[h]=c[h]);return{$$typeof:p,type:O,key:w,ref:V,props:E,_owner:g.current}}return I.Fragment=S,I.jsx=T,I.jsxs=T,I}var Y={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var er;function jr(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){var v=R,p=Symbol.for("react.element"),S=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),O=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),nr=Symbol.iterator,Ir="@@iterator";function Yr(r){if(r===null||typeof r!="object")return null;var e=nr&&r[nr]||r[Ir];return typeof e=="function"?e:null}var D=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(r){{for(var e=arguments.length,a=new Array(e>1?e-1:0),n=1;n<e;n++)a[n-1]=arguments[n];Wr("error",r,a)}}function Wr(r,e,a){{var n=D.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(e+="%s",a=a.concat([s]));var o=a.map(function(i){return String(i)});o.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,o)}}var $r=!1,Lr=!1,Vr=!1,Mr=!1,Nr=!1,tr;tr=Symbol.for("react.module.reference");function Ur(r){return!!(typeof r=="string"||typeof r=="function"||r===y||r===j||Nr||r===g||r===k||r===h||Mr||r===V||$r||Lr||Vr||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===E||r.$$typeof===T||r.$$typeof===O||r.$$typeof===c||r.$$typeof===tr||r.getModuleId!==void 0))}function Br(r,e,a){var n=r.displayName;if(n)return n;var s=e.displayName||e.name||"";return s!==""?a+"("+s+")":a}function ir(r){return r.displayName||"Context"}function _(r){if(r==null)return null;if(typeof r.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case y:return"Fragment";case S:return"Portal";case j:return"Profiler";case g:return"StrictMode";case k:return"Suspense";case h:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case O:var e=r;return ir(e)+".Consumer";case T:var a=r;return ir(a._context)+".Provider";case c:return Br(r,r.render,"ForwardRef");case E:var n=r.displayName||null;return n!==null?n:_(r.type)||"Memo";case w:{var s=r,o=s._payload,i=s._init;try{return _(i(o))}catch{return null}}}return null}var P=Object.assign,W=0,sr,or,ur,lr,cr,fr,dr;function vr(){}vr.__reactDisabledLog=!0;function zr(){{if(W===0){sr=console.log,or=console.info,ur=console.warn,lr=console.error,cr=console.group,fr=console.groupCollapsed,dr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:vr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}W++}}function Jr(){{if(W--,W===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},r,{value:sr}),info:P({},r,{value:or}),warn:P({},r,{value:ur}),error:P({},r,{value:lr}),group:P({},r,{value:cr}),groupCollapsed:P({},r,{value:fr}),groupEnd:P({},r,{value:dr})})}W<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=D.ReactCurrentDispatcher,G;function M(r,e,a){{if(G===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);G=n&&n[1]||""}return`
|
|
18
|
-
`+G+r}}var K=!1,N;{var Gr=typeof WeakMap=="function"?WeakMap:Map;N=new Gr}function pr(r,e){if(!r||K)return"";{var a=N.get(r);if(a!==void 0)return a}var n;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var o;o=J.current,J.current=null,zr();try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(b){n=b}Reflect.construct(r,[],i)}else{try{i.call()}catch(b){n=b}r.call(i.prototype)}}else{try{throw Error()}catch(b){n=b}r()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var t=b.stack.split(`
|
|
19
|
-
`),d=n.stack.split(`
|
|
20
|
-
`),u=t.length-1,l=d.length-1;u>=1&&l>=0&&t[u]!==d[l];)l--;for(;u>=1&&l>=0;u--,l--)if(t[u]!==d[l]){if(u!==1||l!==1)do if(u--,l--,l<0||t[u]!==d[l]){var m=`
|
|
21
|
-
`+t[u].replace(" at new "," at ");return r.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",r.displayName)),typeof r=="function"&&N.set(r,m),m}while(u>=1&&l>=0);break}}}finally{K=!1,J.current=o,Jr(),Error.prepareStackTrace=s}var F=r?r.displayName||r.name:"",C=F?M(F):"";return typeof r=="function"&&N.set(r,C),C}function Kr(r,e,a){return pr(r,!1)}function qr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function U(r,e,a){if(r==null)return"";if(typeof r=="function")return pr(r,qr(r));if(typeof r=="string")return M(r);switch(r){case k:return M("Suspense");case h:return M("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case c:return Kr(r.render);case E:return U(r.type,e,a);case w:{var n=r,s=n._payload,o=n._init;try{return U(o(s),e,a)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,gr={},br=D.ReactDebugCurrentFrame;function B(r){if(r){var e=r._owner,a=U(r.type,r._source,e?e.type:null);br.setExtraStackFrame(a)}else br.setExtraStackFrame(null)}function Xr(r,e,a,n,s){{var o=Function.call.bind($);for(var i in r)if(o(r,i)){var t=void 0;try{if(typeof r[i]!="function"){var d=Error((n||"React class")+": "+a+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}t=r[i](e,i,n,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){t=u}t&&!(t instanceof Error)&&(B(s),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",a,i,typeof t),B(null)),t instanceof Error&&!(t.message in gr)&&(gr[t.message]=!0,B(s),f("Failed %s type: %s",a,t.message),B(null))}}}var Hr=Array.isArray;function q(r){return Hr(r)}function Zr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,a=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return a}}function Qr(r){try{return hr(r),!1}catch{return!0}}function hr(r){return""+r}function mr(r){if(Qr(r))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Zr(r)),hr(r)}var yr=D.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0},Er,Rr;function ee(r){if($.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function ae(r){if($.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function ne(r,e){typeof r.ref=="string"&&yr.current}function te(r,e){{var a=function(){Er||(Er=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};a.isReactWarning=!0,Object.defineProperty(r,"key",{get:a,configurable:!0})}}function ie(r,e){{var a=function(){Rr||(Rr=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};a.isReactWarning=!0,Object.defineProperty(r,"ref",{get:a,configurable:!0})}}var se=function(r,e,a,n,s,o,i){var t={$$typeof:p,type:r,key:e,ref:a,props:i,_owner:o};return t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t};function oe(r,e,a,n,s){{var o,i={},t=null,d=null;a!==void 0&&(mr(a),t=""+a),ae(e)&&(mr(e.key),t=""+e.key),ee(e)&&(d=e.ref,ne(e,s));for(o in e)$.call(e,o)&&!re.hasOwnProperty(o)&&(i[o]=e[o]);if(r&&r.defaultProps){var u=r.defaultProps;for(o in u)i[o]===void 0&&(i[o]=u[o])}if(t||d){var l=typeof r=="function"?r.displayName||r.name||"Unknown":r;t&&te(i,l),d&&ie(i,l)}return se(r,t,d,s,n,yr.current,i)}}var X=D.ReactCurrentOwner,_r=D.ReactDebugCurrentFrame;function A(r){if(r){var e=r._owner,a=U(r.type,r._source,e?e.type:null);_r.setExtraStackFrame(a)}else _r.setExtraStackFrame(null)}var H;H=!1;function Z(r){return typeof r=="object"&&r!==null&&r.$$typeof===p}function xr(){{if(X.current){var r=_(X.current.type);if(r)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+r+"`."}return""}}function ue(r){return""}var Sr={};function le(r){{var e=xr();if(!e){var a=typeof r=="string"?r:r.displayName||r.name;a&&(e=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+a+">.")}return e}}function Tr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var a=le(e);if(Sr[a])return;Sr[a]=!0;var n="";r&&r._owner&&r._owner!==X.current&&(n=" It was passed a child from "+_(r._owner.type)+"."),A(r),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,n),A(null)}}function Or(r,e){{if(typeof r!="object")return;if(q(r))for(var a=0;a<r.length;a++){var n=r[a];Z(n)&&Tr(n,e)}else if(Z(r))r._store&&(r._store.validated=!0);else if(r){var s=Yr(r);if(typeof s=="function"&&s!==r.entries)for(var o=s.call(r),i;!(i=o.next()).done;)Z(i.value)&&Tr(i.value,e)}}}function ce(r){{var e=r.type;if(e==null||typeof e=="string")return;var a;if(typeof e=="function")a=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===c||e.$$typeof===E))a=e.propTypes;else return;if(a){var n=_(e);Xr(a,r.props,"prop",n,r)}else if(e.PropTypes!==void 0&&!H){H=!0;var s=_(e);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(r){{for(var e=Object.keys(r.props),a=0;a<e.length;a++){var n=e[a];if(n!=="children"&&n!=="key"){A(r),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}r.ref!==null&&(A(r),f("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var wr={};function Pr(r,e,a,n,s,o){{var i=Ur(r);if(!i){var t="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=ue();d?t+=d:t+=xr();var u;r===null?u="null":q(r)?u="array":r!==void 0&&r.$$typeof===p?(u="<"+(_(r.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):u=typeof r,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,t)}var l=oe(r,e,a,s,o);if(l==null)return l;if(i){var m=e.children;if(m!==void 0)if(n)if(q(m)){for(var F=0;F<m.length;F++)Or(m[F],r);Object.freeze&&Object.freeze(m)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Or(m,r)}if($.call(e,"key")){var C=_(r),b=Object.keys(e).filter(function(he){return he!=="key"}),Q=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!wr[C+Q]){var be=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Q,C,be,C),wr[C+Q]=!0}}return r===y?fe(l):ce(l),l}}function de(r,e,a){return Pr(r,e,a,!0)}function ve(r,e,a){return Pr(r,e,a,!1)}var pe=ve,ge=de;Y.Fragment=y,Y.jsx=pe,Y.jsxs=ge}()),Y}process.env.NODE_ENV==="production"?z.exports=Cr():z.exports=jr();var kr=z.exports;const Dr=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.Badges={},r.jsxRuntime,r.React))})(this,function(r,e,d){"use strict";const l=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
31
2
|
|
|
32
3
|
.starasia-badges {
|
|
33
4
|
display: flex;
|
|
@@ -144,4 +115,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
144
115
|
.starasia-badges-neutral.starasia-badges-border {
|
|
145
116
|
border-color: var(--starasia-ui-color-purple-500, #7e39c5);
|
|
146
117
|
}
|
|
147
|
-
`,
|
|
118
|
+
`,c="starasia-badges-styles";(a=>{if(!document.getElementById(c)){const n=document.createElement("style");n.id=c,n.textContent=a,document.head.appendChild(n)}})(l);const i={xs:14,sm:16,md:18,lg:18},u=({size:a="md",variant:n="info",text:t,LeftIcon:o,RightIcon:s,border:b,corners:f="rounded"})=>e.jsxs("div",{className:g(a,n,b,f),children:[o?d.cloneElement(o,{width:i[a],height:i[a],style:{color:"inherit"}}):null,t,s?d.cloneElement(s,{width:i[a],height:i[a],style:{color:"inherit"}}):null]}),g=(a,n,t,o)=>{let s=["starasia-badges"];return a&&s.push(`starasia-badges-${a}`),n&&s.push(`starasia-badges-${n}`),t&&s.push("starasia-badges-border"),o==="rounded"?s.push("starasia-badges-rounded"):s.push("starasia-badges-circular"),s.join(" ")};r.Badges=u,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starasia/badges",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Badges component for starasia UI",
|
|
5
5
|
"author": "Prawito Hudoro",
|
|
6
6
|
"main": "dist/badges.umd.js",
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
"dist/*.map",
|
|
13
13
|
"dist/*.css"
|
|
14
14
|
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"dev": "vite --config vite.config.ts --port 3000",
|
|
17
|
-
"build": "vite build --config vite.config.ts"
|
|
18
|
-
},
|
|
19
15
|
"keywords": [],
|
|
20
16
|
"license": "ISC",
|
|
21
17
|
"type": "module",
|
|
@@ -37,5 +33,9 @@
|
|
|
37
33
|
"react-dom": "^18.2.0",
|
|
38
34
|
"@types/react": "^18.2.55",
|
|
39
35
|
"@types/react-dom": "^18.2.19"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "vite --config vite.config.ts --port 3000",
|
|
39
|
+
"build": "vite build --config vite.config.ts"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|