@starasia/theme 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/index.es.js CHANGED
@@ -1,828 +1,195 @@
1
- import jr, { createContext as ya, useState as xa, useMemo as Tr, useRef as ma, useEffect as ha, useContext as Ea } from "react";
2
- var or = { exports: {} }, Y = {};
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 $r;
13
- function _a() {
14
- if ($r)
15
- return Y;
16
- $r = 1;
17
- var o = jr, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, c = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function v(g, d, m) {
19
- var x, R = {}, S = null, C = null;
20
- m !== void 0 && (S = "" + m), d.key !== void 0 && (S = "" + d.key), d.ref !== void 0 && (C = d.ref);
21
- for (x in d)
22
- s.call(d, x) && !l.hasOwnProperty(x) && (R[x] = d[x]);
23
- if (g && g.defaultProps)
24
- for (x in d = g.defaultProps, d)
25
- R[x] === void 0 && (R[x] = d[x]);
26
- return { $$typeof: t, type: g, key: S, ref: C, props: R, _owner: c.current };
27
- }
28
- return Y.Fragment = i, Y.jsx = v, Y.jsxs = v, Y;
29
- }
30
- var N = {};
31
- /**
32
- * @license React
33
- * react-jsx-runtime.development.js
34
- *
35
- * Copyright (c) Facebook, Inc. and its affiliates.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */
40
- var Cr;
41
- function Ra() {
42
- return Cr || (Cr = 1, process.env.NODE_ENV !== "production" && function() {
43
- var o = jr, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), g = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), D = Symbol.iterator, L = "@@iterator";
44
- function Ir(r) {
45
- if (r === null || typeof r != "object")
46
- return null;
47
- var a = D && r[D] || r[L];
48
- return typeof a == "function" ? a : null;
49
- }
50
- var j = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
- function h(r) {
52
- {
53
- for (var a = arguments.length, e = new Array(a > 1 ? a - 1 : 0), n = 1; n < a; n++)
54
- e[n - 1] = arguments[n];
55
- Wr("error", r, e);
56
- }
57
- }
58
- function Wr(r, a, e) {
59
- {
60
- var n = j.ReactDebugCurrentFrame, f = n.getStackAddendum();
61
- f !== "" && (a += "%s", e = e.concat([f]));
62
- var p = e.map(function(b) {
63
- return String(b);
64
- });
65
- p.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, p);
66
- }
67
- }
68
- var Yr = !1, Nr = !1, Lr = !1, Mr = !1, Vr = !1, er;
69
- er = Symbol.for("react.module.reference");
70
- function Ur(r) {
71
- return !!(typeof r == "string" || typeof r == "function" || r === s || r === l || Vr || r === c || r === m || r === x || Mr || r === C || Yr || Nr || Lr || typeof r == "object" && r !== null && (r.$$typeof === S || r.$$typeof === R || r.$$typeof === v || r.$$typeof === g || r.$$typeof === d || // This needs to include all possible module reference object
72
- // types supported by any Flight configuration anywhere since
73
- // we don't know which Flight build this will end up being used
74
- // with.
75
- r.$$typeof === er || r.getModuleId !== void 0));
76
- }
77
- function Jr(r, a, e) {
78
- var n = r.displayName;
79
- if (n)
80
- return n;
81
- var f = a.displayName || a.name || "";
82
- return f !== "" ? e + "(" + f + ")" : e;
83
- }
84
- function tr(r) {
85
- return r.displayName || "Context";
86
- }
87
- function $(r) {
88
- if (r == null)
89
- return null;
90
- if (typeof r.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
91
- return r.displayName || r.name || null;
92
- if (typeof r == "string")
93
- return r;
94
- switch (r) {
95
- case s:
96
- return "Fragment";
97
- case i:
98
- return "Portal";
99
- case l:
100
- return "Profiler";
101
- case c:
102
- return "StrictMode";
103
- case m:
104
- return "Suspense";
105
- case x:
106
- return "SuspenseList";
107
- }
108
- if (typeof r == "object")
109
- switch (r.$$typeof) {
110
- case g:
111
- var a = r;
112
- return tr(a) + ".Consumer";
113
- case v:
114
- var e = r;
115
- return tr(e._context) + ".Provider";
116
- case d:
117
- return Jr(r, r.render, "ForwardRef");
118
- case R:
119
- var n = r.displayName || null;
120
- return n !== null ? n : $(r.type) || "Memo";
121
- case S: {
122
- var f = r, p = f._payload, b = f._init;
123
- try {
124
- return $(b(p));
125
- } catch {
126
- return null;
127
- }
128
- }
129
- }
130
- return null;
131
- }
132
- var O = Object.assign, A = 0, ir, sr, nr, cr, lr, ur, br;
133
- function gr() {
134
- }
135
- gr.__reactDisabledLog = !0;
136
- function Br() {
137
- {
138
- if (A === 0) {
139
- ir = console.log, sr = console.info, nr = console.warn, cr = console.error, lr = console.group, ur = console.groupCollapsed, br = console.groupEnd;
140
- var r = {
141
- configurable: !0,
142
- enumerable: !0,
143
- value: gr,
144
- writable: !0
145
- };
146
- Object.defineProperties(console, {
147
- info: r,
148
- log: r,
149
- warn: r,
150
- error: r,
151
- group: r,
152
- groupCollapsed: r,
153
- groupEnd: r
154
- });
155
- }
156
- A++;
157
- }
158
- }
159
- function qr() {
160
- {
161
- if (A--, A === 0) {
162
- var r = {
163
- configurable: !0,
164
- enumerable: !0,
165
- writable: !0
166
- };
167
- Object.defineProperties(console, {
168
- log: O({}, r, {
169
- value: ir
170
- }),
171
- info: O({}, r, {
172
- value: sr
173
- }),
174
- warn: O({}, r, {
175
- value: nr
176
- }),
177
- error: O({}, r, {
178
- value: cr
179
- }),
180
- group: O({}, r, {
181
- value: lr
182
- }),
183
- groupCollapsed: O({}, r, {
184
- value: ur
185
- }),
186
- groupEnd: O({}, r, {
187
- value: br
188
- })
189
- });
190
- }
191
- A < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
- }
193
- }
194
- var q = j.ReactCurrentDispatcher, K;
195
- function M(r, a, e) {
196
- {
197
- if (K === void 0)
198
- try {
199
- throw Error();
200
- } catch (f) {
201
- var n = f.stack.trim().match(/\n( *(at )?)/);
202
- K = n && n[1] || "";
203
- }
204
- return `
205
- ` + K + r;
206
- }
207
- }
208
- var z = !1, V;
209
- {
210
- var Kr = typeof WeakMap == "function" ? WeakMap : Map;
211
- V = new Kr();
212
- }
213
- function fr(r, a) {
214
- if (!r || z)
215
- return "";
216
- {
217
- var e = V.get(r);
218
- if (e !== void 0)
219
- return e;
220
- }
221
- var n;
222
- z = !0;
223
- var f = Error.prepareStackTrace;
224
- Error.prepareStackTrace = void 0;
225
- var p;
226
- p = q.current, q.current = null, Br();
227
- try {
228
- if (a) {
229
- var b = function() {
230
- throw Error();
231
- };
232
- if (Object.defineProperty(b.prototype, "props", {
233
- set: function() {
234
- throw Error();
235
- }
236
- }), typeof Reflect == "object" && Reflect.construct) {
237
- try {
238
- Reflect.construct(b, []);
239
- } catch (_) {
240
- n = _;
241
- }
242
- Reflect.construct(r, [], b);
243
- } else {
244
- try {
245
- b.call();
246
- } catch (_) {
247
- n = _;
248
- }
249
- r.call(b.prototype);
250
- }
251
- } else {
252
- try {
253
- throw Error();
254
- } catch (_) {
255
- n = _;
256
- }
257
- r();
258
- }
259
- } catch (_) {
260
- if (_ && n && typeof _.stack == "string") {
261
- for (var u = _.stack.split(`
262
- `), E = n.stack.split(`
263
- `), w = u.length - 1, y = E.length - 1; w >= 1 && y >= 0 && u[w] !== E[y]; )
264
- y--;
265
- for (; w >= 1 && y >= 0; w--, y--)
266
- if (u[w] !== E[y]) {
267
- if (w !== 1 || y !== 1)
268
- do
269
- if (w--, y--, y < 0 || u[w] !== E[y]) {
270
- var k = `
271
- ` + u[w].replace(" at new ", " at ");
272
- return r.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", r.displayName)), typeof r == "function" && V.set(r, k), k;
273
- }
274
- while (w >= 1 && y >= 0);
275
- break;
276
- }
277
- }
278
- } finally {
279
- z = !1, q.current = p, qr(), Error.prepareStackTrace = f;
280
- }
281
- var F = r ? r.displayName || r.name : "", P = F ? M(F) : "";
282
- return typeof r == "function" && V.set(r, P), P;
283
- }
284
- function zr(r, a, e) {
285
- return fr(r, !1);
286
- }
287
- function Gr(r) {
288
- var a = r.prototype;
289
- return !!(a && a.isReactComponent);
290
- }
291
- function U(r, a, e) {
292
- if (r == null)
293
- return "";
294
- if (typeof r == "function")
295
- return fr(r, Gr(r));
296
- if (typeof r == "string")
297
- return M(r);
298
- switch (r) {
299
- case m:
300
- return M("Suspense");
301
- case x:
302
- return M("SuspenseList");
303
- }
304
- if (typeof r == "object")
305
- switch (r.$$typeof) {
306
- case d:
307
- return zr(r.render);
308
- case R:
309
- return U(r.type, a, e);
310
- case S: {
311
- var n = r, f = n._payload, p = n._init;
312
- try {
313
- return U(p(f), a, e);
314
- } catch {
315
- }
316
- }
317
- }
318
- return "";
319
- }
320
- var I = Object.prototype.hasOwnProperty, vr = {}, dr = j.ReactDebugCurrentFrame;
321
- function J(r) {
322
- if (r) {
323
- var a = r._owner, e = U(r.type, r._source, a ? a.type : null);
324
- dr.setExtraStackFrame(e);
325
- } else
326
- dr.setExtraStackFrame(null);
327
- }
328
- function Hr(r, a, e, n, f) {
329
- {
330
- var p = Function.call.bind(I);
331
- for (var b in r)
332
- if (p(r, b)) {
333
- var u = void 0;
334
- try {
335
- if (typeof r[b] != "function") {
336
- var E = Error((n || "React class") + ": " + e + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
- throw E.name = "Invariant Violation", E;
338
- }
339
- u = r[b](a, b, n, e, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
- } catch (w) {
341
- u = w;
342
- }
343
- u && !(u instanceof Error) && (J(f), h("%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", e, b, typeof u), J(null)), u instanceof Error && !(u.message in vr) && (vr[u.message] = !0, J(f), h("Failed %s type: %s", e, u.message), J(null));
344
- }
345
- }
346
- }
347
- var Xr = Array.isArray;
348
- function G(r) {
349
- return Xr(r);
350
- }
351
- function Zr(r) {
352
- {
353
- var a = typeof Symbol == "function" && Symbol.toStringTag, e = a && r[Symbol.toStringTag] || r.constructor.name || "Object";
354
- return e;
355
- }
356
- }
357
- function Qr(r) {
358
- try {
359
- return pr(r), !1;
360
- } catch {
361
- return !0;
362
- }
363
- }
364
- function pr(r) {
365
- return "" + r;
366
- }
367
- function wr(r) {
368
- if (Qr(r))
369
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Zr(r)), pr(r);
370
- }
371
- var W = j.ReactCurrentOwner, ra = {
372
- key: !0,
373
- ref: !0,
374
- __self: !0,
375
- __source: !0
376
- }, yr, xr, H;
377
- H = {};
378
- function aa(r) {
379
- if (I.call(r, "ref")) {
380
- var a = Object.getOwnPropertyDescriptor(r, "ref").get;
381
- if (a && a.isReactWarning)
382
- return !1;
383
- }
384
- return r.ref !== void 0;
385
- }
386
- function oa(r) {
387
- if (I.call(r, "key")) {
388
- var a = Object.getOwnPropertyDescriptor(r, "key").get;
389
- if (a && a.isReactWarning)
390
- return !1;
391
- }
392
- return r.key !== void 0;
393
- }
394
- function ea(r, a) {
395
- if (typeof r.ref == "string" && W.current && a && W.current.stateNode !== a) {
396
- var e = $(W.current.type);
397
- H[e] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', $(W.current.type), r.ref), H[e] = !0);
398
- }
399
- }
400
- function ta(r, a) {
401
- {
402
- var e = function() {
403
- yr || (yr = !0, h("%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)", a));
404
- };
405
- e.isReactWarning = !0, Object.defineProperty(r, "key", {
406
- get: e,
407
- configurable: !0
408
- });
409
- }
410
- }
411
- function ia(r, a) {
412
- {
413
- var e = function() {
414
- xr || (xr = !0, h("%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)", a));
415
- };
416
- e.isReactWarning = !0, Object.defineProperty(r, "ref", {
417
- get: e,
418
- configurable: !0
419
- });
420
- }
421
- }
422
- var sa = function(r, a, e, n, f, p, b) {
423
- var u = {
424
- // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: t,
426
- // Built-in properties that belong on the element
427
- type: r,
428
- key: a,
429
- ref: e,
430
- props: b,
431
- // Record the component responsible for creating this element.
432
- _owner: p
433
- };
434
- return u._store = {}, Object.defineProperty(u._store, "validated", {
435
- configurable: !1,
436
- enumerable: !1,
437
- writable: !0,
438
- value: !1
439
- }), Object.defineProperty(u, "_self", {
440
- configurable: !1,
441
- enumerable: !1,
442
- writable: !1,
443
- value: n
444
- }), Object.defineProperty(u, "_source", {
445
- configurable: !1,
446
- enumerable: !1,
447
- writable: !1,
448
- value: f
449
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
450
- };
451
- function na(r, a, e, n, f) {
452
- {
453
- var p, b = {}, u = null, E = null;
454
- e !== void 0 && (wr(e), u = "" + e), oa(a) && (wr(a.key), u = "" + a.key), aa(a) && (E = a.ref, ea(a, f));
455
- for (p in a)
456
- I.call(a, p) && !ra.hasOwnProperty(p) && (b[p] = a[p]);
457
- if (r && r.defaultProps) {
458
- var w = r.defaultProps;
459
- for (p in w)
460
- b[p] === void 0 && (b[p] = w[p]);
461
- }
462
- if (u || E) {
463
- var y = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
464
- u && ta(b, y), E && ia(b, y);
465
- }
466
- return sa(r, u, E, f, n, W.current, b);
467
- }
468
- }
469
- var X = j.ReactCurrentOwner, mr = j.ReactDebugCurrentFrame;
470
- function T(r) {
471
- if (r) {
472
- var a = r._owner, e = U(r.type, r._source, a ? a.type : null);
473
- mr.setExtraStackFrame(e);
474
- } else
475
- mr.setExtraStackFrame(null);
476
- }
477
- var Z;
478
- Z = !1;
479
- function Q(r) {
480
- return typeof r == "object" && r !== null && r.$$typeof === t;
481
- }
482
- function hr() {
483
- {
484
- if (X.current) {
485
- var r = $(X.current.type);
486
- if (r)
487
- return `
488
-
489
- Check the render method of \`` + r + "`.";
490
- }
491
- return "";
492
- }
493
- }
494
- function ca(r) {
495
- return "";
496
- }
497
- var Er = {};
498
- function la(r) {
499
- {
500
- var a = hr();
501
- if (!a) {
502
- var e = typeof r == "string" ? r : r.displayName || r.name;
503
- e && (a = `
504
-
505
- Check the top-level render call using <` + e + ">.");
506
- }
507
- return a;
508
- }
509
- }
510
- function _r(r, a) {
511
- {
512
- if (!r._store || r._store.validated || r.key != null)
513
- return;
514
- r._store.validated = !0;
515
- var e = la(a);
516
- if (Er[e])
517
- return;
518
- Er[e] = !0;
519
- var n = "";
520
- r && r._owner && r._owner !== X.current && (n = " It was passed a child from " + $(r._owner.type) + "."), T(r), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', e, n), T(null);
521
- }
522
- }
523
- function Rr(r, a) {
524
- {
525
- if (typeof r != "object")
526
- return;
527
- if (G(r))
528
- for (var e = 0; e < r.length; e++) {
529
- var n = r[e];
530
- Q(n) && _r(n, a);
531
- }
532
- else if (Q(r))
533
- r._store && (r._store.validated = !0);
534
- else if (r) {
535
- var f = Ir(r);
536
- if (typeof f == "function" && f !== r.entries)
537
- for (var p = f.call(r), b; !(b = p.next()).done; )
538
- Q(b.value) && _r(b.value, a);
539
- }
540
- }
541
- }
542
- function ua(r) {
543
- {
544
- var a = r.type;
545
- if (a == null || typeof a == "string")
546
- return;
547
- var e;
548
- if (typeof a == "function")
549
- e = a.propTypes;
550
- else if (typeof a == "object" && (a.$$typeof === d || // Note: Memo only checks outer props here.
551
- // Inner props are checked in the reconciler.
552
- a.$$typeof === R))
553
- e = a.propTypes;
554
- else
555
- return;
556
- if (e) {
557
- var n = $(a);
558
- Hr(e, r.props, "prop", n, r);
559
- } else if (a.PropTypes !== void 0 && !Z) {
560
- Z = !0;
561
- var f = $(a);
562
- h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
563
- }
564
- typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
- }
566
- }
567
- function ba(r) {
568
- {
569
- for (var a = Object.keys(r.props), e = 0; e < a.length; e++) {
570
- var n = a[e];
571
- if (n !== "children" && n !== "key") {
572
- T(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), T(null);
573
- break;
574
- }
575
- }
576
- r.ref !== null && (T(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), T(null));
577
- }
578
- }
579
- var kr = {};
580
- function Sr(r, a, e, n, f, p) {
581
- {
582
- var b = Ur(r);
583
- if (!b) {
584
- var u = "";
585
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
586
- var E = ca();
587
- E ? u += E : u += hr();
588
- var w;
589
- r === null ? w = "null" : G(r) ? w = "array" : r !== void 0 && r.$$typeof === t ? (w = "<" + ($(r.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : w = typeof r, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, u);
590
- }
591
- var y = na(r, a, e, f, p);
592
- if (y == null)
593
- return y;
594
- if (b) {
595
- var k = a.children;
596
- if (k !== void 0)
597
- if (n)
598
- if (G(k)) {
599
- for (var F = 0; F < k.length; F++)
600
- Rr(k[F], r);
601
- Object.freeze && Object.freeze(k);
602
- } else
603
- h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
604
- else
605
- Rr(k, r);
606
- }
607
- if (I.call(a, "key")) {
608
- var P = $(r), _ = Object.keys(a).filter(function(wa) {
609
- return wa !== "key";
610
- }), rr = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
611
- if (!kr[P + rr]) {
612
- var pa = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
613
- h(`A props object containing a "key" prop is being spread into JSX:
614
- let props = %s;
615
- <%s {...props} />
616
- React keys must be passed directly to JSX without using spread:
617
- let props = %s;
618
- <%s key={someKey} {...props} />`, rr, P, pa, P), kr[P + rr] = !0;
619
- }
620
- }
621
- return r === s ? ba(y) : ua(y), y;
622
- }
623
- }
624
- function ga(r, a, e) {
625
- return Sr(r, a, e, !0);
626
- }
627
- function fa(r, a, e) {
628
- return Sr(r, a, e, !1);
629
- }
630
- var va = fa, da = ga;
631
- N.Fragment = s, N.jsx = va, N.jsxs = da;
632
- }()), N;
633
- }
634
- process.env.NODE_ENV === "production" ? or.exports = _a() : or.exports = Ra();
635
- var ka = or.exports;
636
- function Or(o, t = "") {
637
- let i = "";
638
- for (const s in o)
639
- if (Object.hasOwnProperty.call(o, s)) {
640
- const c = o[s];
641
- i += `/* ${s} */
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { createContext as h, useState as j, useMemo as $, useRef as O, useEffect as E, useContext as P } from "react";
3
+ function y(r, a = "") {
4
+ let o = "";
5
+ for (const s in r)
6
+ if (Object.hasOwnProperty.call(r, s)) {
7
+ const t = r[s];
8
+ o += `/* ${s} */
642
9
  `;
643
- for (const l in c)
644
- if (Object.hasOwnProperty.call(c, l)) {
645
- const v = c[l];
646
- i += `--${t}-${s}-${l}: ${v};
10
+ for (const i in t)
11
+ if (Object.hasOwnProperty.call(t, i)) {
12
+ const e = t[i];
13
+ o += `--${a}-${s}-${i}: ${e};
647
14
  `;
648
15
  }
649
16
  }
650
- return i;
17
+ return o;
651
18
  }
652
- function Pr(o, t) {
653
- let i = "";
654
- for (const s in o) {
655
- const c = o[s];
656
- for (const l in c) {
657
- const v = c[l], g = `${t}-${s}-${l}`;
658
- i += `--${g}: ${v};
19
+ function f(r, a) {
20
+ let o = "";
21
+ for (const s in r) {
22
+ const t = r[s];
23
+ for (const i in t) {
24
+ const e = t[i], c = `${a}-${s}-${i}`;
25
+ o += `--${c}: ${e};
659
26
  `;
660
27
  }
661
28
  }
662
- return i;
29
+ return o;
663
30
  }
664
- function Sa(o, t) {
665
- let i = "";
666
- function s(c, l, v = "", g = "", d = "") {
667
- if (d) {
668
- const m = `${v}${d}-${g}-${c}`;
669
- i += `--${m}: ${l};
31
+ function F(r, a) {
32
+ let o = "";
33
+ function s(t, i, e = "", c = "", l = "") {
34
+ if (l) {
35
+ const b = `${e}${l}-${c}-${t}`;
36
+ o += `--${b}: ${i};
670
37
  `;
671
38
  } else {
672
- const m = `${v}${c}-${g}`;
673
- i += `--${m}: ${l};
39
+ const b = `${e}${t}-${c}`;
40
+ o += `--${b}: ${i};
674
41
  `;
675
42
  }
676
43
  }
677
- for (const c in o) {
678
- const l = o[c];
679
- for (const v in l) {
680
- const g = l[v];
681
- if (typeof g == "object")
682
- for (const d in g) {
683
- const m = g[d], x = `${t}-`;
44
+ for (const t in r) {
45
+ const i = r[t];
46
+ for (const e in i) {
47
+ const c = i[e];
48
+ if (typeof c == "object")
49
+ for (const l in c) {
50
+ const b = c[l], n = `${a}-`;
684
51
  s(
685
- v,
686
- m,
687
- x,
688
- c,
689
- d
52
+ e,
53
+ b,
54
+ n,
55
+ t,
56
+ l
690
57
  );
691
58
  }
692
59
  else {
693
- const d = `${t}-`;
694
- s(v, g, d, c);
60
+ const l = `${a}-`;
61
+ s(e, c, l, t);
695
62
  }
696
63
  }
697
64
  }
698
- return i;
65
+ return o;
699
66
  }
700
- function $a(o, t = "") {
701
- let i = "";
702
- function s(c, l, v = "") {
703
- if (typeof l == "object")
704
- for (const g in l) {
705
- const d = l[g], m = `--${v}-${c}-${g}`;
706
- i += `${m}: ${d};
67
+ function N(r, a = "") {
68
+ let o = "";
69
+ function s(t, i, e = "") {
70
+ if (typeof i == "object")
71
+ for (const c in i) {
72
+ const l = i[c], b = `--${e}-${t}-${c}`;
73
+ o += `${b}: ${l};
707
74
  `;
708
75
  }
709
76
  else {
710
- const g = `--${v}-${c}`;
711
- i += `${g}: ${l};
77
+ const c = `--${e}-${t}`;
78
+ o += `${c}: ${i};
712
79
  `;
713
80
  }
714
81
  }
715
- for (const c in o) {
716
- const l = o[c];
717
- if (typeof l == "object")
718
- s(c, l, `${t}`);
82
+ for (const t in r) {
83
+ const i = r[t];
84
+ if (typeof i == "object")
85
+ s(t, i, `${a}`);
719
86
  else {
720
- const v = `--${t}-${c}`;
721
- i += `${v}: ${l};
87
+ const e = `--${a}-${t}`;
88
+ o += `${e}: ${i};
722
89
  `;
723
90
  }
724
91
  }
725
- return i;
92
+ return o;
726
93
  }
727
- function Ca(o, t = "") {
728
- let i = "";
729
- for (const s in o) {
730
- const c = o[s];
731
- for (const l in c) {
732
- const v = `--${t}-${s}-${l}`, g = c[l];
733
- i += `${v}: ${g};
94
+ function M(r, a = "") {
95
+ let o = "";
96
+ for (const s in r) {
97
+ const t = r[s];
98
+ for (const i in t) {
99
+ const e = `--${a}-${s}-${i}`, c = t[i];
100
+ o += `${e}: ${c};
734
101
  `;
735
102
  }
736
103
  }
737
- return i;
104
+ return o;
738
105
  }
739
- function Oa(o, t) {
740
- let i = "";
741
- for (const s in o)
742
- if (Object.hasOwnProperty.call(o, s)) {
743
- const c = o[s];
744
- s === "default" ? i += `--${t}: ${c};
745
- ` : i += `--${t}-${s}: ${c};
106
+ function D(r, a) {
107
+ let o = "";
108
+ for (const s in r)
109
+ if (Object.hasOwnProperty.call(r, s)) {
110
+ const t = r[s];
111
+ s === "default" ? o += `--${a}: ${t};
112
+ ` : o += `--${a}-${s}: ${t};
746
113
  `;
747
114
  }
748
- return i;
115
+ return o;
749
116
  }
750
- const Pa = (o) => {
751
- const t = document.getElementById(o);
752
- if (t)
753
- return t;
754
- const i = document.createElement("style");
755
- return i.id = o, document.head.appendChild(i), i;
117
+ const J = (r) => {
118
+ const a = document.getElementById(r);
119
+ if (a)
120
+ return a;
121
+ const o = document.createElement("style");
122
+ return o.id = r, document.head.appendChild(o), o;
756
123
  };
757
- function Fr(o, t) {
758
- let i = "";
759
- return Object.keys(o).forEach((s) => {
760
- const c = o[s];
761
- if (c && typeof c == "object") {
762
- i += Fr(c, `${t}-${s}`);
124
+ function m(r, a) {
125
+ let o = "";
126
+ return Object.keys(r).forEach((s) => {
127
+ const t = r[s];
128
+ if (t && typeof t == "object") {
129
+ o += m(t, `${a}-${s}`);
763
130
  return;
764
131
  }
765
- i += `${t}-${s}: ${c};
132
+ o += `${a}-${s}: ${t};
766
133
  `;
767
- }), i;
134
+ }), o;
768
135
  }
769
- function ja(o, t) {
770
- let i = "";
771
- return o && (i += Fr(o, t)), i;
136
+ function B(r, a) {
137
+ let o = "";
138
+ return r && (o += m(r, a)), o;
772
139
  }
773
- function Ta(o) {
774
- var x, R, S, C, D, L;
775
- if (!o)
140
+ function H(r) {
141
+ var n, v, d, w, p, x;
142
+ if (!r)
776
143
  return;
777
- const t = (x = o.colors) != null && x.raw ? Pr(
778
- o.colors.raw,
144
+ const a = (n = r.colors) != null && n.raw ? f(
145
+ r.colors.raw,
779
146
  "starasia-ui-raw-color"
780
- ) : "", i = (R = o.colors) != null && R.computed ? Pr(
781
- o.colors.computed,
147
+ ) : "", o = (v = r.colors) != null && v.computed ? f(
148
+ r.colors.computed,
782
149
  "starasia-ui-color"
783
- ) : "", s = (S = o.colors) != null && S.main ? Sa(o.colors.main, "starasia-ui") : "", c = (C = o.colors) != null && C.brand ? Or(o.colors.brand, "starasia-ui-brand") : "", l = (D = o.colors) != null && D.utility ? Or(
784
- o.colors.utility,
150
+ ) : "", s = (d = r.colors) != null && d.main ? F(r.colors.main, "starasia-ui") : "", t = (w = r.colors) != null && w.brand ? y(r.colors.brand, "starasia-ui-brand") : "", i = (p = r.colors) != null && p.utility ? y(
151
+ r.colors.utility,
785
152
  "starasia-ui-utility"
786
- ) : "", v = (L = o.colors) != null && L.text ? Oa(
787
- o.colors.text,
153
+ ) : "", e = (x = r.colors) != null && x.text ? D(
154
+ r.colors.text,
788
155
  "starasia-ui-color-text"
789
- ) : "", g = o.metrics ? $a(o.metrics, "starasia-ui") : "", d = o.font ? Ca(o.font, "starasia-ui") : "", m = o.components ? ja(o.components, "--starasia-ui") : "";
156
+ ) : "", c = r.metrics ? N(r.metrics, "starasia-ui") : "", l = r.font ? M(r.font, "starasia-ui") : "", b = r.components ? B(r.components, "--starasia-ui") : "";
790
157
  return `
791
158
  :root {
159
+ ${a}
160
+ ${o}
161
+ ${s}
792
162
  ${t}
793
163
  ${i}
794
- ${s}
164
+ ${e}
795
165
  ${c}
796
166
  ${l}
797
- ${v}
798
- ${g}
799
- ${d}
800
- ${m}
167
+ ${b}
801
168
  }
802
169
  `;
803
170
  }
804
- const Dr = ya({
171
+ const k = h({
805
172
  theme: void 0,
806
173
  setTheme: () => {
807
174
  }
808
- }), Fa = "starasia-theme-style";
809
- function Na({ value: o, children: t }) {
810
- const [i, s] = xa(o), c = Tr(
811
- () => i ? JSON.stringify(i) : "",
812
- [i]
813
- ), l = ma(Pa(Fa));
814
- ha(() => {
815
- if (c) {
816
- const g = Ta(JSON.parse(c));
817
- g && (l != null && l.current) && (l.current.textContent = g);
818
- }
819
- }, [c]);
820
- const v = (g) => {
821
- g && s(g);
175
+ }), L = "starasia-theme-style";
176
+ function K({ value: r, children: a }) {
177
+ const [o, s] = j(r), t = $(
178
+ () => o ? JSON.stringify(o) : "",
179
+ [o]
180
+ ), i = O(J(L));
181
+ E(() => {
182
+ if (t) {
183
+ const c = H(JSON.parse(t));
184
+ c && (i != null && i.current) && (i.current.textContent = c);
185
+ }
186
+ }, [t]);
187
+ const e = (c) => {
188
+ c && s(c);
822
189
  };
823
- return /* @__PURE__ */ ka.jsx(Dr.Provider, { value: { theme: i, setTheme: v }, children: t });
190
+ return /* @__PURE__ */ C(k.Provider, { value: { theme: o, setTheme: e }, children: a });
824
191
  }
825
- const Da = {
192
+ const V = {
826
193
  raw: {
827
194
  white: {
828
195
  900: "255, 255, 255"
@@ -925,6 +292,12 @@ const Da = {
925
292
  700: "32, 137, 88",
926
293
  800: "24, 103, 66",
927
294
  900: "16, 68, 44"
295
+ },
296
+ brand: {
297
+ default: "74, 106, 148",
298
+ active: "57, 82, 116",
299
+ secondary: "144, 176, 218",
300
+ tertiary: "227, 237, 248"
928
301
  }
929
302
  },
930
303
  computed: {
@@ -1033,19 +406,19 @@ const Da = {
1033
406
  },
1034
407
  main: {
1035
408
  primary: {
1036
- "background-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
409
+ "background-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
1037
410
  "text-color": "rgb(255, 255, 255)",
1038
- "border-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
411
+ "border-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
1039
412
  hover: {
1040
- "background-color": "rgba(var(--starasia-ui-raw-color-blue-700), 0.9)",
1041
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-700), 0.9)",
413
+ "background-color": "rgba(var(--starasia-ui-raw-color-brand-default), 0.9)",
414
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-default), 0.9)",
1042
415
  "text-color": "rgb(255, 255, 255)"
1043
416
  },
1044
417
  active: {
1045
- "background-color": "rgb(var(--starasia-ui-raw-color-blue-800))",
1046
- "border-color": "rgb(var(--starasia-ui-raw-color-blue-800))",
418
+ "background-color": "rgb(var(--starasia-ui-raw-color-brand-active))",
419
+ "border-color": "rgb(var(--starasia-ui-raw-color-brand-active))",
1047
420
  "text-color": "rgb(255, 255, 255)",
1048
- shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 0.28)"
421
+ shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"
1049
422
  },
1050
423
  disable: {
1051
424
  "background-color": "rgba(var(--starasia-ui-raw-color-gray-200), 0.68)",
@@ -1076,41 +449,41 @@ const Da = {
1076
449
  }
1077
450
  },
1078
451
  tertiary: {
1079
- "background-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.21)",
1080
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
1081
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.21)",
452
+ "background-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)",
453
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
454
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)",
1082
455
  hover: {
1083
- "background-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.3)",
1084
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.3)",
1085
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
456
+ "background-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)",
457
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)",
458
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
1086
459
  shadow: "0px 0px 0px -1px #f0f0f0"
1087
460
  },
1088
461
  active: {
1089
- "background-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.46)",
1090
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.46)",
1091
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
1092
- shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 0.28)"
462
+ "background-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)",
463
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)",
464
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
465
+ shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"
1093
466
  },
1094
467
  disable: {
1095
- "background-color": "rgba(var(--starasia-ui-raw-color-blue-200), 0.8)",
1096
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-200), 0.8)",
1097
- "text-color": "rgba(var(--starasia-ui-raw-color-blue-300), 0.5)"
468
+ "background-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)",
469
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)",
470
+ "text-color": "rgba(var(--starasia-ui-raw-color-brand-default), 0.5)"
1098
471
  }
1099
472
  },
1100
473
  quaternary: {
1101
474
  "background-color": "rgba(255, 255, 255, 0)",
1102
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
1103
- "border-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
475
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
476
+ "border-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
1104
477
  hover: {
1105
478
  "background-color": "rgba(255, 255, 255, 0)",
1106
- "border-color": "rgba(var(--starasia-ui-raw-color-blue-700), 0.9)",
1107
- "text-color": "rgba(var(--starasia-ui-raw-color-blue-700), 0.9)"
479
+ "border-color": "rgba(var(--starasia-ui-raw-color-brand-default), 0.9)",
480
+ "text-color": "rgba(var(--starasia-ui-raw-color-brand-default), 0.9)"
1108
481
  },
1109
482
  active: {
1110
483
  "background-color": "rgb(255, 255, 255)",
1111
- "border-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
1112
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
1113
- shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 0.28)"
484
+ "border-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
485
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
486
+ shadow: "0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"
1114
487
  },
1115
488
  disable: {
1116
489
  "background-color": "rgba(255, 255, 255, 0)",
@@ -1120,17 +493,17 @@ const Da = {
1120
493
  },
1121
494
  link: {
1122
495
  "background-color": "rgba(255, 255, 255, 0)",
1123
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))",
496
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))",
1124
497
  "border-color": "rgba(255, 255, 255, 0)",
1125
498
  hover: {
1126
499
  "background-color": "rgba(255, 255, 255, 0)",
1127
500
  "border-color": "rgba(255, 255, 255, 0)",
1128
- "text-color": "rgba(var(--starasia-ui-raw-color-blue-900), 0.9)"
501
+ "text-color": "rgba(var(--starasia-ui-raw-color-brand-active), 0.9)"
1129
502
  },
1130
503
  active: {
1131
504
  "background-color": "rgba(255, 255, 255, 0)",
1132
505
  "border-color": "rgba(255, 255, 255, 0)",
1133
- "text-color": "rgb(var(--starasia-ui-raw-color-blue-700))"
506
+ "text-color": "rgb(var(--starasia-ui-raw-color-brand-default))"
1134
507
  },
1135
508
  disable: {
1136
509
  "background-color": "rgba(255, 255, 255, 0)",
@@ -1204,9 +577,9 @@ const Da = {
1204
577
  },
1205
578
  brand: {
1206
579
  primary: {
1207
- default: "var(--starasia-ui-color-blue-700)",
1208
- secondary: "var(--starasia-ui-color-blue-300)",
1209
- tertiary: "var(--starasia-ui-color-blue-50)"
580
+ default: "rgba(74, 106, 148, 1)",
581
+ secondary: "rgba(144, 176, 218, 1)",
582
+ tertiary: "rgba(227, 237, 248, 1)"
1210
583
  },
1211
584
  secondary: {
1212
585
  default: "var(--starasia-ui-color-pink-700)",
@@ -1253,7 +626,7 @@ const Da = {
1253
626
  tertiary: "rgba(120, 134, 127, 0.1)"
1254
627
  }
1255
628
  }
1256
- }, Aa = {
629
+ }, _ = {
1257
630
  radii: {
1258
631
  none: "0",
1259
632
  xs: "0.25rem",
@@ -1311,7 +684,7 @@ const Da = {
1311
684
  inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
1312
685
  card: "0px 4px 35px 0px rgba(112, 144, 176, 0.25)"
1313
686
  }
1314
- }, Ia = {
687
+ }, q = {
1315
688
  fontSizes: {
1316
689
  xs: "0.625rem",
1317
690
  sm: "0.75rem",
@@ -1351,64 +724,64 @@ const Da = {
1351
724
  relaxed: 1.625,
1352
725
  loose: 2
1353
726
  }
1354
- }, Wa = {
1355
- colors: Da,
1356
- metrics: Aa,
1357
- font: Ia
1358
- }, ar = Wa, Ar = (o, t) => {
1359
- const i = {};
1360
- return Object.keys(o).forEach((s) => {
1361
- if (o != null && o[s] && typeof (o == null ? void 0 : o[s]) == "object") {
1362
- i[s] = {
1363
- ...o == null ? void 0 : o[s],
1364
- ...t == null ? void 0 : t[s],
1365
- ...Ar(o == null ? void 0 : o[s], t == null ? void 0 : t[s])
727
+ }, z = {
728
+ colors: V,
729
+ metrics: _,
730
+ font: q
731
+ }, u = z, S = (r, a) => {
732
+ const o = {};
733
+ return Object.keys(r).forEach((s) => {
734
+ if (r != null && r[s] && typeof (r == null ? void 0 : r[s]) == "object") {
735
+ o[s] = {
736
+ ...r == null ? void 0 : r[s],
737
+ ...a == null ? void 0 : a[s],
738
+ ...S(r == null ? void 0 : r[s], a == null ? void 0 : a[s])
1366
739
  };
1367
740
  return;
1368
741
  }
1369
- i[s] = (t == null ? void 0 : t[s]) || (o == null ? void 0 : o[s]);
1370
- }), i;
742
+ o[s] = (a == null ? void 0 : a[s]) || (r == null ? void 0 : r[s]);
743
+ }), o;
1371
744
  };
1372
- function B() {
1373
- const o = Ea(Dr), t = Tr(
745
+ function g() {
746
+ const r = P(k), a = $(
1374
747
  () => ({
1375
- ...ar,
1376
- ...o.theme,
1377
- ...Ar(ar, o.theme)
748
+ ...u,
749
+ ...r.theme,
750
+ ...S(u, r.theme)
1378
751
  }),
1379
- [o.theme, ar]
752
+ [r.theme, u]
1380
753
  );
1381
- return { ...o, theme: t };
754
+ return { ...r, theme: a };
1382
755
  }
1383
- function La() {
1384
- const { theme: o } = B();
1385
- return o.colors;
756
+ function R() {
757
+ const { theme: r } = g();
758
+ return r.colors;
1386
759
  }
1387
- function Ma() {
1388
- var t;
1389
- const { theme: o } = B();
1390
- return (t = o.metrics) == null ? void 0 : t.spacing;
760
+ function U() {
761
+ var a;
762
+ const { theme: r } = g();
763
+ return (a = r.metrics) == null ? void 0 : a.spacing;
1391
764
  }
1392
- function Va() {
1393
- var t;
1394
- const { theme: o } = B();
1395
- return (t = o.metrics) == null ? void 0 : t.radii;
765
+ function W() {
766
+ var a;
767
+ const { theme: r } = g();
768
+ return (a = r.metrics) == null ? void 0 : a.radii;
1396
769
  }
1397
- function Ua() {
1398
- var t;
1399
- const { theme: o } = B();
1400
- return (t = o == null ? void 0 : o.metrics) == null ? void 0 : t.shadows;
770
+ function Y() {
771
+ var a;
772
+ const { theme: r } = g();
773
+ return (a = r == null ? void 0 : r.metrics) == null ? void 0 : a.shadows;
1401
774
  }
1402
- function Ja(o) {
1403
- return o;
775
+ function G(r) {
776
+ return r;
1404
777
  }
1405
778
  export {
1406
- Dr as ThemeContext,
1407
- Na as ThemeProvider,
1408
- Ja as createTheme,
1409
- La as useColor,
1410
- Va as useRadius,
1411
- Ua as useShadow,
1412
- Ma as useSpacing,
1413
- B as useTheme
779
+ k as ThemeContext,
780
+ K as ThemeProvider,
781
+ G as createTheme,
782
+ R as useColor,
783
+ W as useRadius,
784
+ Y as useShadow,
785
+ U as useSpacing,
786
+ g as useTheme
1414
787
  };