@starasia/badges 1.0.1 → 1.0.3
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 +75 -677
- package/dist/badges.umd.js +49 -55
- package/package.json +1 -1
package/dist/badges.es.js
CHANGED
|
@@ -1,631 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
}()), $;
|
|
1
|
+
import { jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
const l = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
/* info (semantic blue) */
|
|
7
|
+
--starasia-ui-badges-color-info-bg: var(--starasia-ui-color-blue-50, rgba(227, 242, 253, 1));
|
|
8
|
+
--starasia-ui-badges-color-info-text: var(--starasia-ui-color-blue-700, rgba(25, 118, 210, 1));
|
|
9
|
+
--starasia-ui-badges-color-info-border: var(--starasia-ui-color-blue-300, rgba(100, 181, 246, 1));
|
|
10
|
+
/* success */
|
|
11
|
+
--starasia-ui-badges-color-success-bg: var(--starasia-ui-color-green-50, rgba(220, 246, 234, 1));
|
|
12
|
+
--starasia-ui-badges-color-success-text: var(--starasia-ui-color-green-700, rgba(32, 137, 88, 1));
|
|
13
|
+
/* danger */
|
|
14
|
+
--starasia-ui-badges-color-danger-bg: var(--starasia-ui-color-red-50, rgba(255, 240, 243, 1));
|
|
15
|
+
--starasia-ui-badges-color-danger-text: var(--starasia-ui-color-red-700, rgba(164, 19, 60, 1));
|
|
16
|
+
/* warning */
|
|
17
|
+
--starasia-ui-badges-color-warning-bg: var(--starasia-ui-color-orange-50, rgba(250, 246, 224, 1));
|
|
18
|
+
--starasia-ui-badges-color-warning-text: var(--starasia-ui-color-orange-700, rgba(152, 104, 0, 1));
|
|
19
|
+
/* dark */
|
|
20
|
+
--starasia-ui-badges-color-dark-bg: var(--starasia-ui-color-gray-100, rgba(239, 243, 248, 1));
|
|
21
|
+
--starasia-ui-badges-color-dark-text: var(--starasia-ui-color-gray-700, rgba(72, 80, 76, 1));
|
|
22
|
+
/* neutral */
|
|
23
|
+
--starasia-ui-badges-color-neutral-border: var(--starasia-ui-color-gray-50, rgba(249, 250, 251, 1));
|
|
24
|
+
--starasia-ui-badges-color-neutral-bg: var(--starasia-ui-color-purple-50, rgba(233, 222, 245, 1));
|
|
25
|
+
--starasia-ui-badges-color-neutral-text: var(--starasia-ui-color-purple-500, rgba(126, 57, 197, 1));
|
|
625
26
|
}
|
|
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");
|
|
629
27
|
|
|
630
28
|
.starasia-badges {
|
|
631
29
|
display: flex;
|
|
@@ -684,104 +82,104 @@ const ge = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@4
|
|
|
684
82
|
|
|
685
83
|
/* STYLES FOR BADGE VARIANT */
|
|
686
84
|
.starasia-badges-info {
|
|
687
|
-
border-color: var(--starasia-ui-color-
|
|
688
|
-
background: var(--starasia-ui-color-
|
|
689
|
-
color: var(--starasia-ui-color-
|
|
85
|
+
border-color: var(--starasia-ui-badges-color-info-bg);
|
|
86
|
+
background: var(--starasia-ui-badges-color-info-bg);
|
|
87
|
+
color: var(--starasia-ui-badges-color-info-text);
|
|
690
88
|
}
|
|
691
89
|
|
|
692
90
|
.starasia-badges-info.starasia-badges-border {
|
|
693
|
-
border-color: var(--starasia-ui-color-
|
|
91
|
+
border-color: var(--starasia-ui-badges-color-info-border);
|
|
694
92
|
}
|
|
695
93
|
|
|
696
94
|
.starasia-badges-success {
|
|
697
|
-
border-color: var(--starasia-ui-color-
|
|
698
|
-
background: var(--starasia-ui-color-
|
|
699
|
-
color: var(--starasia-ui-color-
|
|
95
|
+
border-color: var(--starasia-ui-badges-color-success-bg);
|
|
96
|
+
background: var(--starasia-ui-badges-color-success-bg);
|
|
97
|
+
color: var(--starasia-ui-badges-color-success-text);
|
|
700
98
|
}
|
|
701
99
|
|
|
702
100
|
.starasia-badges-success.starasia-badges-border {
|
|
703
|
-
border-color: var(--starasia-ui-color-
|
|
101
|
+
border-color: var(--starasia-ui-badges-color-success-text);
|
|
704
102
|
}
|
|
705
103
|
|
|
706
104
|
.starasia-badges-danger {
|
|
707
|
-
border-color: var(--starasia-ui-color-
|
|
708
|
-
background: var(--starasia-ui-color-
|
|
709
|
-
color: var(--starasia-ui-color-
|
|
105
|
+
border-color: var(--starasia-ui-badges-color-danger-bg);
|
|
106
|
+
background: var(--starasia-ui-badges-color-danger-bg);
|
|
107
|
+
color: var(--starasia-ui-badges-color-danger-text);
|
|
710
108
|
}
|
|
711
109
|
|
|
712
110
|
.starasia-badges-danger.starasia-badges-border {
|
|
713
|
-
border-color: var(--starasia-ui-color-
|
|
111
|
+
border-color: var(--starasia-ui-badges-color-danger-text);
|
|
714
112
|
}
|
|
715
113
|
|
|
716
114
|
.starasia-badges-warning {
|
|
717
|
-
border-color: var(--starasia-ui-color-
|
|
718
|
-
background: var(--starasia-ui-color-
|
|
719
|
-
color: var(--starasia-ui-color-
|
|
115
|
+
border-color: var(--starasia-ui-badges-color-warning-bg);
|
|
116
|
+
background: var(--starasia-ui-badges-color-warning-bg);
|
|
117
|
+
color: var(--starasia-ui-badges-color-warning-text);
|
|
720
118
|
}
|
|
721
119
|
|
|
722
120
|
.starasia-badges-warning.starasia-badges-border {
|
|
723
|
-
border-color: var(--starasia-ui-color-
|
|
121
|
+
border-color: var(--starasia-ui-badges-color-warning-text);
|
|
724
122
|
}
|
|
725
123
|
|
|
726
124
|
.starasia-badges-dark {
|
|
727
|
-
border-color: var(--starasia-ui-color-
|
|
728
|
-
background: var(--starasia-ui-color-
|
|
729
|
-
color: var(--starasia-ui-color-
|
|
125
|
+
border-color: var(--starasia-ui-badges-color-dark-bg);
|
|
126
|
+
background: var(--starasia-ui-badges-color-dark-bg);
|
|
127
|
+
color: var(--starasia-ui-badges-color-dark-text);
|
|
730
128
|
}
|
|
731
129
|
|
|
732
130
|
.starasia-badges-dark.starasia-badges-border {
|
|
733
|
-
border-color: var(--starasia-ui-color-
|
|
131
|
+
border-color: var(--starasia-ui-badges-color-dark-text);
|
|
734
132
|
}
|
|
735
133
|
|
|
736
134
|
.starasia-badges-neutral {
|
|
737
|
-
border-color: var(--starasia-ui-color-
|
|
738
|
-
background: var(--starasia-ui-color-
|
|
739
|
-
color: var(--starasia-ui-color-
|
|
135
|
+
border-color: var(--starasia-ui-badges-color-neutral-border);
|
|
136
|
+
background: var(--starasia-ui-badges-color-neutral-bg);
|
|
137
|
+
color: var(--starasia-ui-badges-color-neutral-text);
|
|
740
138
|
}
|
|
741
139
|
|
|
742
140
|
.starasia-badges-neutral.starasia-badges-border {
|
|
743
|
-
border-color: var(--starasia-ui-color-
|
|
141
|
+
border-color: var(--starasia-ui-badges-color-neutral-text);
|
|
744
142
|
}
|
|
745
|
-
`,
|
|
746
|
-
if (!document.getElementById(
|
|
747
|
-
const
|
|
748
|
-
|
|
143
|
+
`, t = "starasia-badges-styles", c = (a) => {
|
|
144
|
+
if (!document.getElementById(t)) {
|
|
145
|
+
const s = document.createElement("style");
|
|
146
|
+
s.id = t, s.textContent = a, document.head.appendChild(s);
|
|
749
147
|
}
|
|
750
148
|
};
|
|
751
|
-
|
|
752
|
-
const
|
|
149
|
+
c(l);
|
|
150
|
+
const n = {
|
|
753
151
|
xs: 14,
|
|
754
152
|
sm: 16,
|
|
755
153
|
md: 18,
|
|
756
154
|
lg: 18
|
|
757
|
-
},
|
|
758
|
-
size:
|
|
759
|
-
variant:
|
|
760
|
-
text:
|
|
761
|
-
LeftIcon:
|
|
762
|
-
RightIcon:
|
|
763
|
-
border:
|
|
764
|
-
corners:
|
|
765
|
-
}) => /* @__PURE__ */
|
|
766
|
-
|
|
767
|
-
width:
|
|
768
|
-
height:
|
|
155
|
+
}, x = ({
|
|
156
|
+
size: a = "md",
|
|
157
|
+
variant: s = "info",
|
|
158
|
+
text: e,
|
|
159
|
+
LeftIcon: i,
|
|
160
|
+
RightIcon: r,
|
|
161
|
+
border: d,
|
|
162
|
+
corners: g = "rounded"
|
|
163
|
+
}) => /* @__PURE__ */ b("div", { className: u(a, s, d, g), children: [
|
|
164
|
+
i ? o.cloneElement(i, {
|
|
165
|
+
width: n[a],
|
|
166
|
+
height: n[a],
|
|
769
167
|
style: {
|
|
770
168
|
color: "inherit"
|
|
771
169
|
}
|
|
772
170
|
}) : null,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
width:
|
|
776
|
-
height:
|
|
171
|
+
e,
|
|
172
|
+
r ? o.cloneElement(r, {
|
|
173
|
+
width: n[a],
|
|
174
|
+
height: n[a],
|
|
777
175
|
style: {
|
|
778
176
|
color: "inherit"
|
|
779
177
|
}
|
|
780
178
|
}) : null
|
|
781
|
-
] }),
|
|
782
|
-
let
|
|
783
|
-
return
|
|
179
|
+
] }), u = (a, s, e, i) => {
|
|
180
|
+
let r = ["starasia-badges"];
|
|
181
|
+
return a && r.push(`starasia-badges-${a}`), s && r.push(`starasia-badges-${s}`), e && r.push("starasia-badges-border"), i === "rounded" ? r.push("starasia-badges-rounded") : r.push("starasia-badges-circular"), r.join(" ");
|
|
784
182
|
};
|
|
785
183
|
export {
|
|
786
|
-
|
|
184
|
+
x as Badges
|
|
787
185
|
};
|
package/dist/badges.umd.js
CHANGED
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.Badges={},r.jsxRuntime,r.React))})(this,function(r,i,d){"use strict";const b=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* info (semantic blue) */
|
|
5
|
+
--starasia-ui-badges-color-info-bg: var(--starasia-ui-color-blue-50, rgba(227, 242, 253, 1));
|
|
6
|
+
--starasia-ui-badges-color-info-text: var(--starasia-ui-color-blue-700, rgba(25, 118, 210, 1));
|
|
7
|
+
--starasia-ui-badges-color-info-border: var(--starasia-ui-color-blue-300, rgba(100, 181, 246, 1));
|
|
8
|
+
/* success */
|
|
9
|
+
--starasia-ui-badges-color-success-bg: var(--starasia-ui-color-green-50, rgba(220, 246, 234, 1));
|
|
10
|
+
--starasia-ui-badges-color-success-text: var(--starasia-ui-color-green-700, rgba(32, 137, 88, 1));
|
|
11
|
+
/* danger */
|
|
12
|
+
--starasia-ui-badges-color-danger-bg: var(--starasia-ui-color-red-50, rgba(255, 240, 243, 1));
|
|
13
|
+
--starasia-ui-badges-color-danger-text: var(--starasia-ui-color-red-700, rgba(164, 19, 60, 1));
|
|
14
|
+
/* warning */
|
|
15
|
+
--starasia-ui-badges-color-warning-bg: var(--starasia-ui-color-orange-50, rgba(250, 246, 224, 1));
|
|
16
|
+
--starasia-ui-badges-color-warning-text: var(--starasia-ui-color-orange-700, rgba(152, 104, 0, 1));
|
|
17
|
+
/* dark */
|
|
18
|
+
--starasia-ui-badges-color-dark-bg: var(--starasia-ui-color-gray-100, rgba(239, 243, 248, 1));
|
|
19
|
+
--starasia-ui-badges-color-dark-text: var(--starasia-ui-color-gray-700, rgba(72, 80, 76, 1));
|
|
20
|
+
/* neutral */
|
|
21
|
+
--starasia-ui-badges-color-neutral-border: var(--starasia-ui-color-gray-50, rgba(249, 250, 251, 1));
|
|
22
|
+
--starasia-ui-badges-color-neutral-bg: var(--starasia-ui-color-purple-50, rgba(233, 222, 245, 1));
|
|
23
|
+
--starasia-ui-badges-color-neutral-text: var(--starasia-ui-color-purple-500, rgba(126, 57, 197, 1));
|
|
24
|
+
}
|
|
31
25
|
|
|
32
26
|
.starasia-badges {
|
|
33
27
|
display: flex;
|
|
@@ -86,62 +80,62 @@ React keys must be passed directly to JSX without using spread:
|
|
|
86
80
|
|
|
87
81
|
/* STYLES FOR BADGE VARIANT */
|
|
88
82
|
.starasia-badges-info {
|
|
89
|
-
border-color: var(--starasia-ui-color-
|
|
90
|
-
background: var(--starasia-ui-color-
|
|
91
|
-
color: var(--starasia-ui-color-
|
|
83
|
+
border-color: var(--starasia-ui-badges-color-info-bg);
|
|
84
|
+
background: var(--starasia-ui-badges-color-info-bg);
|
|
85
|
+
color: var(--starasia-ui-badges-color-info-text);
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
.starasia-badges-info.starasia-badges-border {
|
|
95
|
-
border-color: var(--starasia-ui-color-
|
|
89
|
+
border-color: var(--starasia-ui-badges-color-info-border);
|
|
96
90
|
}
|
|
97
91
|
|
|
98
92
|
.starasia-badges-success {
|
|
99
|
-
border-color: var(--starasia-ui-color-
|
|
100
|
-
background: var(--starasia-ui-color-
|
|
101
|
-
color: var(--starasia-ui-color-
|
|
93
|
+
border-color: var(--starasia-ui-badges-color-success-bg);
|
|
94
|
+
background: var(--starasia-ui-badges-color-success-bg);
|
|
95
|
+
color: var(--starasia-ui-badges-color-success-text);
|
|
102
96
|
}
|
|
103
97
|
|
|
104
98
|
.starasia-badges-success.starasia-badges-border {
|
|
105
|
-
border-color: var(--starasia-ui-color-
|
|
99
|
+
border-color: var(--starasia-ui-badges-color-success-text);
|
|
106
100
|
}
|
|
107
101
|
|
|
108
102
|
.starasia-badges-danger {
|
|
109
|
-
border-color: var(--starasia-ui-color-
|
|
110
|
-
background: var(--starasia-ui-color-
|
|
111
|
-
color: var(--starasia-ui-color-
|
|
103
|
+
border-color: var(--starasia-ui-badges-color-danger-bg);
|
|
104
|
+
background: var(--starasia-ui-badges-color-danger-bg);
|
|
105
|
+
color: var(--starasia-ui-badges-color-danger-text);
|
|
112
106
|
}
|
|
113
107
|
|
|
114
108
|
.starasia-badges-danger.starasia-badges-border {
|
|
115
|
-
border-color: var(--starasia-ui-color-
|
|
109
|
+
border-color: var(--starasia-ui-badges-color-danger-text);
|
|
116
110
|
}
|
|
117
111
|
|
|
118
112
|
.starasia-badges-warning {
|
|
119
|
-
border-color: var(--starasia-ui-color-
|
|
120
|
-
background: var(--starasia-ui-color-
|
|
121
|
-
color: var(--starasia-ui-color-
|
|
113
|
+
border-color: var(--starasia-ui-badges-color-warning-bg);
|
|
114
|
+
background: var(--starasia-ui-badges-color-warning-bg);
|
|
115
|
+
color: var(--starasia-ui-badges-color-warning-text);
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
.starasia-badges-warning.starasia-badges-border {
|
|
125
|
-
border-color: var(--starasia-ui-color-
|
|
119
|
+
border-color: var(--starasia-ui-badges-color-warning-text);
|
|
126
120
|
}
|
|
127
121
|
|
|
128
122
|
.starasia-badges-dark {
|
|
129
|
-
border-color: var(--starasia-ui-color-
|
|
130
|
-
background: var(--starasia-ui-color-
|
|
131
|
-
color: var(--starasia-ui-color-
|
|
123
|
+
border-color: var(--starasia-ui-badges-color-dark-bg);
|
|
124
|
+
background: var(--starasia-ui-badges-color-dark-bg);
|
|
125
|
+
color: var(--starasia-ui-badges-color-dark-text);
|
|
132
126
|
}
|
|
133
127
|
|
|
134
128
|
.starasia-badges-dark.starasia-badges-border {
|
|
135
|
-
border-color: var(--starasia-ui-color-
|
|
129
|
+
border-color: var(--starasia-ui-badges-color-dark-text);
|
|
136
130
|
}
|
|
137
131
|
|
|
138
132
|
.starasia-badges-neutral {
|
|
139
|
-
border-color: var(--starasia-ui-color-
|
|
140
|
-
background: var(--starasia-ui-color-
|
|
141
|
-
color: var(--starasia-ui-color-
|
|
133
|
+
border-color: var(--starasia-ui-badges-color-neutral-border);
|
|
134
|
+
background: var(--starasia-ui-badges-color-neutral-bg);
|
|
135
|
+
color: var(--starasia-ui-badges-color-neutral-text);
|
|
142
136
|
}
|
|
143
137
|
|
|
144
138
|
.starasia-badges-neutral.starasia-badges-border {
|
|
145
|
-
border-color: var(--starasia-ui-color-
|
|
139
|
+
border-color: var(--starasia-ui-badges-color-neutral-text);
|
|
146
140
|
}
|
|
147
|
-
`,
|
|
141
|
+
`,g="starasia-badges-styles";(a=>{if(!document.getElementById(g)){const n=document.createElement("style");n.id=g,n.textContent=a,document.head.appendChild(n)}})(b);const e={xs:14,sm:16,md:18,lg:18},u=({size:a="md",variant:n="info",text:t,LeftIcon:o,RightIcon:s,border:l,corners:p="rounded"})=>i.jsxs("div",{className:c(a,n,l,p),children:[o?d.cloneElement(o,{width:e[a],height:e[a],style:{color:"inherit"}}):null,t,s?d.cloneElement(s,{width:e[a],height:e[a],style:{color:"inherit"}}):null]}),c=(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"})});
|