@starasia/theme 3.3.1 → 3.5.0
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/color/oklch.d.ts +2 -0
- package/dist/color/ramp.d.ts +7 -0
- package/dist/index.es.js +387 -258
- package/dist/index.umd.js +6 -5
- package/dist/theme/basePalette.d.ts +30 -0
- package/dist/theme/buildTheme.d.ts +15 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/presets.d.ts +35 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as M, jsxs as q } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as ve, useState as _, useMemo as K, useEffect as O, useRef as ge, useCallback as $, useContext as ie } from "react";
|
|
3
|
+
const me = (e, r) => {
|
|
4
4
|
if (typeof document > "u")
|
|
5
5
|
return;
|
|
6
6
|
const a = document.getElementById(r);
|
|
@@ -10,7 +10,7 @@ const fe = (e, r) => {
|
|
|
10
10
|
const s = document.createElement("style");
|
|
11
11
|
s.id = r, s.textContent = e, document.head.appendChild(s);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, ye = (e) => {
|
|
14
14
|
if (typeof document > "u")
|
|
15
15
|
return null;
|
|
16
16
|
const r = document.getElementById(e);
|
|
@@ -19,7 +19,7 @@ const fe = (e, r) => {
|
|
|
19
19
|
const a = document.createElement("style");
|
|
20
20
|
return a.id = e, document.head.appendChild(a), a;
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function j(e) {
|
|
23
23
|
let r = e.trim().replace(/^#/, "");
|
|
24
24
|
r.length === 3 && (r = r.split("").map((s) => s + s).join("")), r.length === 8 && (r = r.slice(0, 6));
|
|
25
25
|
const a = parseInt(r, 16);
|
|
@@ -29,71 +29,74 @@ function J(e) {
|
|
|
29
29
|
b: (a & 255) / 255
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
return `#${
|
|
32
|
+
const J = (e) => Math.max(0, Math.min(255, Math.round(e * 255))).toString(16).padStart(2, "0");
|
|
33
|
+
function he({ r: e, g: r, b: a }) {
|
|
34
|
+
return `#${J(e)}${J(r)}${J(a)}`;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
function
|
|
38
|
-
const s = 0.4122214708 * e + 0.5363325363 * r + 0.0514459929 * a, c = 0.2119034982 * e + 0.6806995451 * r + 0.1073969566 * a, o = 0.0883024619 * e + 0.2817188376 * r + 0.6299787005 * a,
|
|
36
|
+
const C = (e) => e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4), Y = (e) => e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 1 / 2.4) - 0.055;
|
|
37
|
+
function we(e, r, a) {
|
|
38
|
+
const s = 0.4122214708 * e + 0.5363325363 * r + 0.0514459929 * a, c = 0.2119034982 * e + 0.6806995451 * r + 0.1073969566 * a, o = 0.0883024619 * e + 0.2817188376 * r + 0.6299787005 * a, n = Math.cbrt(s), d = Math.cbrt(c), t = Math.cbrt(o);
|
|
39
39
|
return {
|
|
40
|
-
L: 0.2104542553 *
|
|
41
|
-
a: 1.9779984951 *
|
|
42
|
-
b: 0.0259040371 *
|
|
40
|
+
L: 0.2104542553 * n + 0.793617785 * d - 0.0040720468 * t,
|
|
41
|
+
a: 1.9779984951 * n - 2.428592205 * d + 0.4505937099 * t,
|
|
42
|
+
b: 0.0259040371 * n + 0.7827717662 * d - 0.808675766 * t
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const s = e + 0.3963377774 * r + 0.2158037573 * a, c = e - 0.1055613458 * r - 0.0638541728 * a, o = e - 0.0894841775 * r - 1.291485548 * a,
|
|
45
|
+
function xe(e, r, a) {
|
|
46
|
+
const s = e + 0.3963377774 * r + 0.2158037573 * a, c = e - 0.1055613458 * r - 0.0638541728 * a, o = e - 0.0894841775 * r - 1.291485548 * a, n = s * s * s, d = c * c * c, t = o * o * o;
|
|
47
47
|
return {
|
|
48
|
-
r: 4.0767416621 *
|
|
49
|
-
g: -1.2684380046 *
|
|
50
|
-
b: -0.0041960863 *
|
|
48
|
+
r: 4.0767416621 * n - 3.3077115913 * d + 0.2309699292 * t,
|
|
49
|
+
g: -1.2684380046 * n + 2.6097574011 * d - 0.3413193965 * t,
|
|
50
|
+
b: -0.0041960863 * n - 0.7034186147 * d + 1.707614701 * t
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const { L: s, a: c, b: o } =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
),
|
|
53
|
+
function Se({ r: e, g: r, b: a }) {
|
|
54
|
+
const { L: s, a: c, b: o } = we(
|
|
55
|
+
C(e),
|
|
56
|
+
C(r),
|
|
57
|
+
C(a)
|
|
58
|
+
), n = Math.sqrt(c * c + o * o);
|
|
59
59
|
let d = Math.atan2(o, c) * 180 / Math.PI;
|
|
60
|
-
return d < 0 && (d += 360), { l: s, c:
|
|
60
|
+
return d < 0 && (d += 360), { l: s, c: n, h: d };
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
-
const s = a * Math.PI / 180, c = (
|
|
62
|
+
const x = (e) => Se(j(e)), ee = ({ r: e, g: r, b: a }, s = 1e-4) => e >= -s && e <= 1 + s && r >= -s && r <= 1 + s && a >= -s && a <= 1 + s;
|
|
63
|
+
function Ee({ l: e, c: r, h: a }) {
|
|
64
|
+
const s = a * Math.PI / 180, c = (n) => xe(e, n * Math.cos(s), n * Math.sin(s));
|
|
65
65
|
let o = c(r);
|
|
66
|
-
if (!
|
|
67
|
-
let
|
|
68
|
-
for (let
|
|
69
|
-
const
|
|
70
|
-
o = c(
|
|
66
|
+
if (!ee(o)) {
|
|
67
|
+
let n = 0, d = r;
|
|
68
|
+
for (let t = 0; t < 20; t++) {
|
|
69
|
+
const b = (n + d) / 2;
|
|
70
|
+
o = c(b), ee(o) ? n = b : d = b;
|
|
71
71
|
}
|
|
72
|
-
o = c(
|
|
72
|
+
o = c(n);
|
|
73
73
|
}
|
|
74
74
|
return {
|
|
75
|
-
r: Math.min(1, Math.max(0,
|
|
76
|
-
g: Math.min(1, Math.max(0,
|
|
77
|
-
b: Math.min(1, Math.max(0,
|
|
75
|
+
r: Math.min(1, Math.max(0, Y(o.r))),
|
|
76
|
+
g: Math.min(1, Math.max(0, Y(o.g))),
|
|
77
|
+
b: Math.min(1, Math.max(0, Y(o.b)))
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
return 0.2126 *
|
|
80
|
+
const D = (e) => he(Ee(e));
|
|
81
|
+
function Q({ r: e, g: r, b: a }) {
|
|
82
|
+
return 0.2126 * C(e) + 0.7152 * C(r) + 0.0722 * C(a);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const a =
|
|
84
|
+
function Me(e, r) {
|
|
85
|
+
const a = Q(j(e)), s = Q(j(r)), c = Math.max(a, s), o = Math.min(a, s);
|
|
86
86
|
return (c + 0.05) / (o + 0.05);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function V(e, r = ["#ffffff", "#1e1f21"]) {
|
|
89
89
|
let a = r[0], s = -1;
|
|
90
90
|
for (const c of r) {
|
|
91
|
-
const o =
|
|
91
|
+
const o = Me(e, c);
|
|
92
92
|
o > s && (s = o, a = c);
|
|
93
93
|
}
|
|
94
94
|
return a;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
function de(e) {
|
|
97
|
+
return Q(j(e)) < 0.4;
|
|
98
|
+
}
|
|
99
|
+
const T = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], F = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1100"], P = {
|
|
97
100
|
brand: {
|
|
98
101
|
L: [0.9434, 0.8816, 0.7612, 0.6375, 0.5179, 0.4415, 0.2695, 0.2429, 0.2155, 0.1878],
|
|
99
102
|
C: [0.0143, 0.031, 0.0645, 0.1017, 0.1394, 0.1429, 0.086, 0.0761, 0.066, 0.0549]
|
|
@@ -114,29 +117,40 @@ const V = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
|
114
117
|
L: [0.9673, 0.9003, 0.8504, 0.8055, 0.7624, 0.6961, 0.5244, 0.3979, 0.2567, 0.2201],
|
|
115
118
|
C: [0.0205, 0.0679, 0.0991, 0.1284, 0.1495, 0.1346, 0.0998, 0.0731, 0.0415, 0.0332]
|
|
116
119
|
}
|
|
117
|
-
},
|
|
118
|
-
function
|
|
119
|
-
const { c: a, h: s } =
|
|
120
|
+
}, Ce = [1, 0.9791, 0.9577, 0.9007, 0.7857, 0.6501, 0.6028, 0.5383, 0.4389, 0.36, 0.2856, 0.239], Ae = [0.2127, 0.2401, 0.3133, 0.3673, 0.4198, 0.5093, 0.603, 0.682, 0.7408, 0.8102, 0.8546, 0.9153], Le = 0.02;
|
|
121
|
+
function U(e, r) {
|
|
122
|
+
const { c: a, h: s } = x(e), c = Math.max(...r.C) || 1;
|
|
120
123
|
return r.L.map(
|
|
121
|
-
(o,
|
|
124
|
+
(o, n) => D({ l: o, c: a * (r.C[n] / c), h: s })
|
|
122
125
|
);
|
|
123
126
|
}
|
|
124
|
-
function
|
|
125
|
-
const { c: a, h: s } =
|
|
126
|
-
return r.map((
|
|
127
|
-
const
|
|
128
|
-
return
|
|
127
|
+
function re(e, r) {
|
|
128
|
+
const { c: a, h: s } = x(e), c = Math.min(a, Le), o = r.length;
|
|
129
|
+
return r.map((n, d) => {
|
|
130
|
+
const t = d / (o - 1), b = 1 - Math.abs(2 * t - 1);
|
|
131
|
+
return D({ l: n, c: c * b, h: s });
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function ae(e, r, a, s, c = 0.018) {
|
|
135
|
+
const o = x(e).l, n = x(r).l;
|
|
136
|
+
return Array.from({ length: a }, (d, t) => {
|
|
137
|
+
if (t === 0)
|
|
138
|
+
return e;
|
|
139
|
+
if (t === a - 1)
|
|
140
|
+
return r;
|
|
141
|
+
const b = t / (a - 1), v = o + (n - o) * b, f = 1 - Math.abs(2 * b - 1);
|
|
142
|
+
return D({ l: v, c: c * f, h: s });
|
|
129
143
|
});
|
|
130
144
|
}
|
|
131
|
-
function
|
|
145
|
+
function Ze(e, r) {
|
|
132
146
|
let a = e[0], s = 1 / 0;
|
|
133
147
|
for (const c of e) {
|
|
134
|
-
const o = Math.abs(
|
|
148
|
+
const o = Math.abs(x(c).l - r);
|
|
135
149
|
o < s && (s = o, a = c);
|
|
136
150
|
}
|
|
137
151
|
return a;
|
|
138
152
|
}
|
|
139
|
-
const
|
|
153
|
+
const be = [
|
|
140
154
|
{ token: "--sa-text-primary", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
141
155
|
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
142
156
|
{ token: "--sa-text-on-brand", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
@@ -319,7 +333,7 @@ const Se = [
|
|
|
319
333
|
{ token: "--sa-text-on-accent", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
320
334
|
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-700, #a8690b)", scale: "amber" },
|
|
321
335
|
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-500, #f5a524)", scale: "amber" }
|
|
322
|
-
],
|
|
336
|
+
], fe = [
|
|
323
337
|
{ token: "--sa-text-primary", recipe: "var(--sa-color-dark-1100, #e2e3e4)", scale: "dark" },
|
|
324
338
|
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
325
339
|
{ token: "--sa-text-brand", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
@@ -497,7 +511,44 @@ const Se = [
|
|
|
497
511
|
{ token: "--sa-text-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
498
512
|
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
499
513
|
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" }
|
|
500
|
-
]
|
|
514
|
+
];
|
|
515
|
+
function $e(e, r) {
|
|
516
|
+
const a = e.match(/var\(--sa-color-([a-z]+)-(\d+),\s*([^)]+)\)/);
|
|
517
|
+
if (!a)
|
|
518
|
+
return e;
|
|
519
|
+
const [, s, c, o] = a, n = r[s];
|
|
520
|
+
if (!n)
|
|
521
|
+
return o.trim();
|
|
522
|
+
const t = (n.length === 12 ? F : T).indexOf(c);
|
|
523
|
+
return t >= 0 ? n[t] : o.trim();
|
|
524
|
+
}
|
|
525
|
+
function se(e, r) {
|
|
526
|
+
const a = x(e);
|
|
527
|
+
return D({ ...a, l: Math.min(0.98, Math.max(0.05, a.l + r)) });
|
|
528
|
+
}
|
|
529
|
+
function _e(e) {
|
|
530
|
+
const r = e.base, a = de(r), s = x(r), c = D({
|
|
531
|
+
l: a ? 0.96 : 0.22,
|
|
532
|
+
c: Math.min(s.c * 0.5, 0.02),
|
|
533
|
+
h: s.h
|
|
534
|
+
}), o = a ? c : r, n = a ? r : c, d = ae(o, n, 12, s.h), t = ae(n, o, 12, s.h), b = U(e.brand, P.brand), v = { gray: d, dark: t, brand: b };
|
|
535
|
+
["error", "success", "info", "warning"].forEach((p) => {
|
|
536
|
+
const y = e[p];
|
|
537
|
+
y && (v[p] = U(y, P[p]));
|
|
538
|
+
});
|
|
539
|
+
const f = a ? fe : be, u = {};
|
|
540
|
+
for (const p of f)
|
|
541
|
+
p.token !== "--sa-text-on-brand" && (u[p.token] = $e(p.recipe, v));
|
|
542
|
+
const k = e.brand.toLowerCase(), m = V(k), S = m === "#ffffff" ? -1 : 1;
|
|
543
|
+
u["--sa-background-brand"] = k, u["--sa-background-brand-hover"] = se(k, S * 0.06), u["--sa-background-brand-pressed"] = se(k, S * 0.12), u["--sa-text-on-brand"] = m;
|
|
544
|
+
const g = {};
|
|
545
|
+
for (const [p, y] of Object.entries(v))
|
|
546
|
+
(y.length === 12 ? F : T).forEach((E, i) => {
|
|
547
|
+
g[`--sa-color-${p}-${E}`] = y[i];
|
|
548
|
+
});
|
|
549
|
+
return { tokens: { ...g, ...u }, isDark: a, brand: b, gray: d };
|
|
550
|
+
}
|
|
551
|
+
const qe = {
|
|
501
552
|
name: "starasia",
|
|
502
553
|
brand: "#1a4fa0",
|
|
503
554
|
neutral: "#7d818a",
|
|
@@ -507,65 +558,93 @@ const Se = [
|
|
|
507
558
|
warning: "#ed9f30",
|
|
508
559
|
radius: 8,
|
|
509
560
|
font: { body: "Inter" }
|
|
510
|
-
},
|
|
511
|
-
function
|
|
561
|
+
}, oe = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', Re = 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', w = (e) => Math.round(e * 10) / 10;
|
|
562
|
+
function I(e, r, a, s) {
|
|
512
563
|
s.forEach((c, o) => {
|
|
513
564
|
e[`--sa-color-${r}-${c}`] = a[o];
|
|
514
565
|
});
|
|
515
566
|
}
|
|
516
|
-
function
|
|
517
|
-
var k, p, y;
|
|
567
|
+
function De(e, r = {}) {
|
|
518
568
|
const a = r.as ?? "root";
|
|
519
569
|
if (a === "skin" && !r.name)
|
|
520
570
|
throw new Error('buildTheme: options.name wajib saat as:"skin"');
|
|
521
|
-
const s = a === "skin" ? `[data-skin="${r.name}"]` : r.selector ?? ":root"
|
|
522
|
-
if (
|
|
523
|
-
|
|
524
|
-
|
|
571
|
+
const s = a === "skin" ? `[data-skin="${r.name}"]` : r.selector ?? ":root";
|
|
572
|
+
if (e.base)
|
|
573
|
+
return Ne(e, s);
|
|
574
|
+
const c = r.darkPrimary ?? !0, o = {}, n = {}, d = { brand: [] }, t = /* @__PURE__ */ new Set(["brand"]), b = U(e.brand, P.brand);
|
|
575
|
+
if (d.brand = b, I(o, "brand", b, T), o["--sa-text-on-brand"] = V(b[6]), ["error", "success", "info", "warning"].forEach((f) => {
|
|
576
|
+
const u = e[f];
|
|
577
|
+
if (!u)
|
|
525
578
|
return;
|
|
526
|
-
const
|
|
527
|
-
d[
|
|
579
|
+
const k = U(u, P[f]);
|
|
580
|
+
d[f] = k, I(o, f, k, T), t.add(f);
|
|
528
581
|
}), e.neutral) {
|
|
529
|
-
const
|
|
530
|
-
d.gray =
|
|
582
|
+
const f = re(e.neutral, Ce), u = re(e.neutral, Ae);
|
|
583
|
+
d.gray = f, d.dark = u, I(o, "gray", f, F), I(o, "dark", u, F), t.add("gray"), t.add("dark");
|
|
531
584
|
}
|
|
532
|
-
if (
|
|
533
|
-
const
|
|
534
|
-
|
|
585
|
+
if (ue(o, e), c) {
|
|
586
|
+
const f = b[4];
|
|
587
|
+
n["--sa-background-brand"] = f, n["--sa-background-brand-hover"] = b[3], n["--sa-background-brand-pressed"] = b[5], n["--sa-text-on-brand"] = V(f);
|
|
535
588
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
589
|
+
return { css: a === "skin" ? Ie(s, o, n, t) : Oe(s, o, n), rootTokens: o, darkTokens: n, ramps: d };
|
|
590
|
+
}
|
|
591
|
+
function ue(e, r) {
|
|
592
|
+
var a, s, c;
|
|
593
|
+
if (typeof r.radius == "number") {
|
|
594
|
+
const o = r.radius;
|
|
595
|
+
e["--sa-radii-xs"] = `${w(o * 0.5)}px`, e["--sa-radii-sm"] = `${w(o * 0.75)}px`, e["--sa-radii-md"] = `${w(o)}px`, e["--sa-radii-lg"] = `${w(o * 1.5)}px`, e["--sa-radii-xl"] = `${w(o * 1.75)}px`, e["--sa-radii-2xl"] = `${w(o * 2)}px`, e["--sa-radii-rounded"] = `${w(o)}px`;
|
|
539
596
|
}
|
|
540
|
-
|
|
597
|
+
(a = r.font) != null && a.body && (e["--sa-font-family"] = `"${r.font.body}", ${oe}`), (s = r.font) != null && s.heading && (e["--sa-font-family-heading"] = `"${r.font.heading}", ${oe}`), (c = r.font) != null && c.mono && (e["--sa-font-family-mono"] = `"${r.font.mono}", ${Re}`);
|
|
541
598
|
}
|
|
542
|
-
function
|
|
599
|
+
function Ne(e, r) {
|
|
600
|
+
const { tokens: a, brand: s, gray: c, isDark: o } = _e({
|
|
601
|
+
base: e.base,
|
|
602
|
+
brand: e.brand,
|
|
603
|
+
error: e.error,
|
|
604
|
+
success: e.success,
|
|
605
|
+
info: e.info,
|
|
606
|
+
warning: e.warning
|
|
607
|
+
});
|
|
608
|
+
ue(a, e);
|
|
609
|
+
const n = o ? "dark" : "light", d = `${r},
|
|
610
|
+
${r}[data-theme="dark"]`;
|
|
611
|
+
return {
|
|
612
|
+
// color-scheme → scrollbar & kontrol native browser ikut terang/gelap tema.
|
|
613
|
+
// Bukan token, jadi tidak masuk rootTokens.
|
|
614
|
+
css: R(d, { ...a, "color-scheme": n }),
|
|
615
|
+
rootTokens: a,
|
|
616
|
+
darkTokens: {},
|
|
617
|
+
ramps: { brand: s, gray: c },
|
|
618
|
+
scheme: n
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
function R(e, r) {
|
|
543
622
|
const a = Object.entries(r).map(([s, c]) => ` ${s}: ${c};`);
|
|
544
623
|
return a.length ? `${e} {
|
|
545
624
|
${a.join(`
|
|
546
625
|
`)}
|
|
547
626
|
}` : "";
|
|
548
627
|
}
|
|
549
|
-
function
|
|
628
|
+
function Oe(e, r, a) {
|
|
550
629
|
const s = e === ":root" ? '[data-theme="dark"]' : `${e}[data-theme="dark"], ${e} [data-theme="dark"]`;
|
|
551
|
-
return [
|
|
630
|
+
return [R(e, r), R(s, a)].filter(Boolean).join(`
|
|
552
631
|
|
|
553
632
|
`);
|
|
554
633
|
}
|
|
555
|
-
function
|
|
634
|
+
function Ie(e, r, a, s) {
|
|
556
635
|
const c = {};
|
|
557
|
-
for (const
|
|
558
|
-
|
|
559
|
-
const o = { ...r, ...c },
|
|
560
|
-
for (const
|
|
561
|
-
(
|
|
562
|
-
const d = { ...
|
|
563
|
-
return [
|
|
636
|
+
for (const t of be)
|
|
637
|
+
t.scale && s.has(t.scale) && t.token !== "--sa-text-on-brand" && (c[t.token] = t.recipe);
|
|
638
|
+
const o = { ...r, ...c }, n = {};
|
|
639
|
+
for (const t of fe)
|
|
640
|
+
(t.scale && s.has(t.scale) || t.token in o) && (n[t.token] = t.recipe);
|
|
641
|
+
const d = { ...n, ...a };
|
|
642
|
+
return [R(e, o), R(`${e}[data-theme="dark"]`, d)].filter(Boolean).join(`
|
|
564
643
|
|
|
565
644
|
`);
|
|
566
645
|
}
|
|
567
|
-
const
|
|
568
|
-
function
|
|
646
|
+
const N = "sa-theme";
|
|
647
|
+
function B(e = N) {
|
|
569
648
|
try {
|
|
570
649
|
if (typeof localStorage > "u")
|
|
571
650
|
return null;
|
|
@@ -575,7 +654,7 @@ function R(e = C) {
|
|
|
575
654
|
return null;
|
|
576
655
|
}
|
|
577
656
|
}
|
|
578
|
-
function
|
|
657
|
+
function Be(e, r = N) {
|
|
579
658
|
try {
|
|
580
659
|
if (typeof localStorage > "u")
|
|
581
660
|
return;
|
|
@@ -583,7 +662,7 @@ function _e(e, r = C) {
|
|
|
583
662
|
} catch {
|
|
584
663
|
}
|
|
585
664
|
}
|
|
586
|
-
function
|
|
665
|
+
function je(e = N) {
|
|
587
666
|
try {
|
|
588
667
|
if (typeof localStorage > "u")
|
|
589
668
|
return;
|
|
@@ -591,7 +670,7 @@ function $e(e = C) {
|
|
|
591
670
|
} catch {
|
|
592
671
|
}
|
|
593
672
|
}
|
|
594
|
-
function
|
|
673
|
+
function Te(e) {
|
|
595
674
|
if (e === "system")
|
|
596
675
|
try {
|
|
597
676
|
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -600,22 +679,22 @@ function Re(e) {
|
|
|
600
679
|
}
|
|
601
680
|
return e;
|
|
602
681
|
}
|
|
603
|
-
function
|
|
682
|
+
function z(e) {
|
|
604
683
|
if (typeof document > "u")
|
|
605
684
|
return;
|
|
606
685
|
const r = document.documentElement;
|
|
607
|
-
|
|
686
|
+
Te(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
|
|
608
687
|
}
|
|
609
|
-
function
|
|
688
|
+
function ce(e) {
|
|
610
689
|
if (typeof document > "u")
|
|
611
690
|
return;
|
|
612
691
|
const r = document.documentElement;
|
|
613
692
|
e ? r.setAttribute("data-skin", e) : r.removeAttribute("data-skin");
|
|
614
693
|
}
|
|
615
|
-
function
|
|
694
|
+
function er(e = N) {
|
|
616
695
|
return "(function(){try{var p=JSON.parse(localStorage.getItem(" + JSON.stringify(e) + ")||'{}');var d=document.documentElement;var m=p.mode==='system'?((window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches)?'dark':'light'):p.mode;if(m==='dark')d.setAttribute('data-theme','dark');if(p.skin)d.setAttribute('data-skin',p.skin);}catch(e){}})();";
|
|
617
696
|
}
|
|
618
|
-
const
|
|
697
|
+
const Fe = {
|
|
619
698
|
raw: {
|
|
620
699
|
white: {
|
|
621
700
|
900: "255, 255, 255"
|
|
@@ -714,7 +793,7 @@ const Ne = {
|
|
|
714
793
|
tertiary: "230, 237, 246"
|
|
715
794
|
}
|
|
716
795
|
}
|
|
717
|
-
},
|
|
796
|
+
}, Pe = {
|
|
718
797
|
radii: {
|
|
719
798
|
none: "0",
|
|
720
799
|
xs: "0.25rem",
|
|
@@ -772,7 +851,7 @@ const Ne = {
|
|
|
772
851
|
inner: "inset 0 2px 4px 0 #0000000d",
|
|
773
852
|
card: "0px 4px 35px 0px #7090b040"
|
|
774
853
|
}
|
|
775
|
-
},
|
|
854
|
+
}, Ue = {
|
|
776
855
|
fontSizes: {
|
|
777
856
|
xs: "0.625rem",
|
|
778
857
|
sm: "0.75rem",
|
|
@@ -812,11 +891,11 @@ const Ne = {
|
|
|
812
891
|
relaxed: 1.625,
|
|
813
892
|
loose: 2
|
|
814
893
|
}
|
|
815
|
-
},
|
|
816
|
-
colors:
|
|
817
|
-
metrics:
|
|
818
|
-
font:
|
|
819
|
-
},
|
|
894
|
+
}, ke = {
|
|
895
|
+
colors: Fe,
|
|
896
|
+
metrics: Pe,
|
|
897
|
+
font: Ue
|
|
898
|
+
}, X = ve({
|
|
820
899
|
theme: void 0,
|
|
821
900
|
setTheme: () => {
|
|
822
901
|
},
|
|
@@ -829,20 +908,20 @@ const Ne = {
|
|
|
829
908
|
},
|
|
830
909
|
resetTheme: () => {
|
|
831
910
|
}
|
|
832
|
-
}),
|
|
833
|
-
function
|
|
911
|
+
}), He = "sa-theme-style", G = "sa-theme-seed-style";
|
|
912
|
+
function Je(e) {
|
|
834
913
|
const r = e.split(",").map((a) => Number(a.trim()));
|
|
835
914
|
return r.length !== 3 || r.some((a) => !Number.isFinite(a) || a < 0 || a > 255) ? null : "#" + r.map((a) => Math.round(a).toString(16).padStart(2, "0")).join("");
|
|
836
915
|
}
|
|
837
|
-
var
|
|
838
|
-
const
|
|
839
|
-
function
|
|
916
|
+
var te, le;
|
|
917
|
+
const Ye = ((le = (te = ke.colors) == null ? void 0 : te.raw) == null ? void 0 : le.blue) ?? {}, ne = (e) => (e ?? "").replace(/\s+/g, "");
|
|
918
|
+
function ze(e) {
|
|
840
919
|
if (!e)
|
|
841
920
|
return "";
|
|
842
921
|
const r = /* @__PURE__ */ new Set(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), a = Object.entries(e).filter(([s]) => r.has(s)).filter(
|
|
843
|
-
([s, c]) =>
|
|
922
|
+
([s, c]) => ne(c) !== ne(Ye[s])
|
|
844
923
|
).map(([s, c]) => {
|
|
845
|
-
const o =
|
|
924
|
+
const o = Je(c);
|
|
846
925
|
return o ? ` --sa-color-brand-${s}: ${o};` : "";
|
|
847
926
|
}).filter(Boolean).join(`
|
|
848
927
|
`);
|
|
@@ -850,122 +929,122 @@ function Fe(e) {
|
|
|
850
929
|
${a}
|
|
851
930
|
}` : "";
|
|
852
931
|
}
|
|
853
|
-
function
|
|
932
|
+
function rr({
|
|
854
933
|
value: e,
|
|
855
934
|
seed: r,
|
|
856
935
|
persist: a = !0,
|
|
857
|
-
storageKey: s =
|
|
936
|
+
storageKey: s = N,
|
|
858
937
|
manageAttributes: c = !1,
|
|
859
938
|
children: o
|
|
860
939
|
}) {
|
|
861
|
-
const [
|
|
862
|
-
if (
|
|
940
|
+
const [n, d] = _(e), t = r !== void 0, [b, v] = _(() => {
|
|
941
|
+
if (t)
|
|
863
942
|
return r;
|
|
864
943
|
if (a) {
|
|
865
|
-
const i =
|
|
944
|
+
const i = B(s);
|
|
866
945
|
if (i != null && i.seed)
|
|
867
946
|
return i.seed;
|
|
868
947
|
}
|
|
869
948
|
return null;
|
|
870
|
-
}),
|
|
871
|
-
() =>
|
|
872
|
-
[
|
|
949
|
+
}), f = t ? r : b, u = K(
|
|
950
|
+
() => f ? JSON.stringify(f) : "",
|
|
951
|
+
[f]
|
|
873
952
|
);
|
|
874
|
-
|
|
953
|
+
O(() => {
|
|
875
954
|
if (typeof document > "u")
|
|
876
955
|
return;
|
|
877
|
-
if (!
|
|
878
|
-
const
|
|
879
|
-
|
|
956
|
+
if (!u) {
|
|
957
|
+
const l = document.getElementById(G);
|
|
958
|
+
l && (l.textContent = "");
|
|
880
959
|
return;
|
|
881
960
|
}
|
|
882
|
-
const { css: i } =
|
|
883
|
-
|
|
884
|
-
}, [
|
|
885
|
-
var
|
|
961
|
+
const { css: i } = De(JSON.parse(u));
|
|
962
|
+
me(i, G);
|
|
963
|
+
}, [u]), O(() => {
|
|
964
|
+
var l;
|
|
886
965
|
if (!c || !a)
|
|
887
966
|
return;
|
|
888
|
-
const i =
|
|
889
|
-
if (i && (i.mode &&
|
|
890
|
-
const
|
|
891
|
-
return (
|
|
892
|
-
var
|
|
893
|
-
return (
|
|
967
|
+
const i = B(s);
|
|
968
|
+
if (i && (i.mode && z(i.mode), i.skin !== void 0 && ce(i.skin), i.mode === "system" && typeof window < "u")) {
|
|
969
|
+
const h = window.matchMedia("(prefers-color-scheme: dark)"), L = () => z("system");
|
|
970
|
+
return (l = h.addEventListener) == null || l.call(h, "change", L), () => {
|
|
971
|
+
var Z;
|
|
972
|
+
return (Z = h.removeEventListener) == null ? void 0 : Z.call(h, "change", L);
|
|
894
973
|
};
|
|
895
974
|
}
|
|
896
975
|
}, [c, a, s]);
|
|
897
|
-
const
|
|
898
|
-
() =>
|
|
899
|
-
[
|
|
900
|
-
),
|
|
901
|
-
|
|
902
|
-
var
|
|
903
|
-
|
|
904
|
-
const i =
|
|
976
|
+
const k = K(
|
|
977
|
+
() => n ? JSON.stringify(n) : "",
|
|
978
|
+
[n]
|
|
979
|
+
), m = ge(null);
|
|
980
|
+
O(() => {
|
|
981
|
+
var h, L;
|
|
982
|
+
m.current || (m.current = ye(He));
|
|
983
|
+
const i = m.current;
|
|
905
984
|
if (!i)
|
|
906
985
|
return;
|
|
907
|
-
const
|
|
908
|
-
i.textContent =
|
|
909
|
-
}, [
|
|
910
|
-
|
|
986
|
+
const l = k ? JSON.parse(k) : void 0;
|
|
987
|
+
i.textContent = l ? ze((L = (h = l == null ? void 0 : l.colors) == null ? void 0 : h.raw) == null ? void 0 : L.blue) : "";
|
|
988
|
+
}, [k]), O(() => () => {
|
|
989
|
+
m.current && (m.current.textContent = "");
|
|
911
990
|
}, []);
|
|
912
|
-
const
|
|
991
|
+
const S = (i) => {
|
|
913
992
|
i && d(i);
|
|
914
|
-
},
|
|
993
|
+
}, g = $(
|
|
915
994
|
(i) => {
|
|
916
995
|
if (!a)
|
|
917
996
|
return;
|
|
918
|
-
const
|
|
919
|
-
|
|
997
|
+
const l = B(s) || {};
|
|
998
|
+
Be({ ...l, ...i }, s);
|
|
920
999
|
},
|
|
921
1000
|
[a, s]
|
|
922
|
-
),
|
|
1001
|
+
), p = $(
|
|
923
1002
|
(i) => {
|
|
924
|
-
|
|
1003
|
+
t || (v(i), g({ seed: i }));
|
|
925
1004
|
},
|
|
926
|
-
[
|
|
927
|
-
),
|
|
1005
|
+
[t, g]
|
|
1006
|
+
), y = $(
|
|
928
1007
|
(i) => {
|
|
929
|
-
|
|
1008
|
+
z(i), g({ mode: i });
|
|
930
1009
|
},
|
|
931
|
-
[
|
|
932
|
-
), A =
|
|
1010
|
+
[g]
|
|
1011
|
+
), A = $(
|
|
933
1012
|
(i) => {
|
|
934
|
-
|
|
1013
|
+
ce(i), g({ skin: i });
|
|
935
1014
|
},
|
|
936
|
-
[
|
|
937
|
-
),
|
|
938
|
-
if (
|
|
939
|
-
const i = document.getElementById(
|
|
1015
|
+
[g]
|
|
1016
|
+
), E = $(() => {
|
|
1017
|
+
if (t || v(null), je(s), typeof document < "u") {
|
|
1018
|
+
const i = document.getElementById(G);
|
|
940
1019
|
i && (i.textContent = "");
|
|
941
1020
|
}
|
|
942
|
-
}, [
|
|
943
|
-
return /* @__PURE__ */
|
|
944
|
-
|
|
1021
|
+
}, [t, s]);
|
|
1022
|
+
return /* @__PURE__ */ M(
|
|
1023
|
+
X.Provider,
|
|
945
1024
|
{
|
|
946
1025
|
value: {
|
|
947
|
-
theme:
|
|
948
|
-
setTheme:
|
|
949
|
-
seed:
|
|
950
|
-
setSeed:
|
|
951
|
-
setMode:
|
|
1026
|
+
theme: n,
|
|
1027
|
+
setTheme: S,
|
|
1028
|
+
seed: f,
|
|
1029
|
+
setSeed: p,
|
|
1030
|
+
setMode: y,
|
|
952
1031
|
setSkin: A,
|
|
953
|
-
resetTheme:
|
|
1032
|
+
resetTheme: E
|
|
954
1033
|
},
|
|
955
1034
|
children: o
|
|
956
1035
|
}
|
|
957
1036
|
);
|
|
958
1037
|
}
|
|
959
|
-
const
|
|
1038
|
+
const Ge = [
|
|
960
1039
|
{ name: null, label: "Default" },
|
|
961
1040
|
{ name: "tech", label: "Tech" }
|
|
962
|
-
],
|
|
1041
|
+
], We = [
|
|
963
1042
|
{ value: "light", label: "Light" },
|
|
964
1043
|
{ value: "dark", label: "Dark" },
|
|
965
1044
|
{ value: "system", label: "System" }
|
|
966
1045
|
];
|
|
967
|
-
function
|
|
968
|
-
skins: e =
|
|
1046
|
+
function ar({
|
|
1047
|
+
skins: e = Ge,
|
|
969
1048
|
showMode: r = !0,
|
|
970
1049
|
allowCustom: a = !1,
|
|
971
1050
|
storageKey: s,
|
|
@@ -973,62 +1052,62 @@ function We({
|
|
|
973
1052
|
style: o
|
|
974
1053
|
}) {
|
|
975
1054
|
var i;
|
|
976
|
-
const { setMode:
|
|
977
|
-
(
|
|
978
|
-
), [
|
|
979
|
-
(
|
|
980
|
-
), [
|
|
981
|
-
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
},
|
|
985
|
-
|
|
1055
|
+
const { setMode: n, setSkin: d, setSeed: t } = ie(X), b = typeof window < "u" ? B(s) : null, [v, f] = _(
|
|
1056
|
+
(b == null ? void 0 : b.mode) ?? (typeof document < "u" && document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light")
|
|
1057
|
+
), [u, k] = _(
|
|
1058
|
+
(b == null ? void 0 : b.skin) ?? (typeof document < "u" ? document.documentElement.getAttribute("data-skin") : null)
|
|
1059
|
+
), [m, S] = _(((i = b == null ? void 0 : b.seed) == null ? void 0 : i.brand) ?? "#1a4fa0"), g = (l) => {
|
|
1060
|
+
f(l), n(l);
|
|
1061
|
+
}, p = (l) => {
|
|
1062
|
+
k(l), d(l);
|
|
1063
|
+
}, y = (l) => {
|
|
1064
|
+
S(l), t({ brand: l });
|
|
986
1065
|
}, A = {
|
|
987
1066
|
display: "inline-flex",
|
|
988
1067
|
gap: 4,
|
|
989
1068
|
padding: 4,
|
|
990
1069
|
borderRadius: "var(--sa-radii-md)",
|
|
991
1070
|
background: "var(--sa-background-neutral)"
|
|
992
|
-
},
|
|
1071
|
+
}, E = (l) => ({
|
|
993
1072
|
border: "none",
|
|
994
1073
|
cursor: "pointer",
|
|
995
1074
|
fontSize: 12,
|
|
996
1075
|
fontWeight: 500,
|
|
997
1076
|
padding: "4px 10px",
|
|
998
1077
|
borderRadius: "var(--sa-radii-sm)",
|
|
999
|
-
background:
|
|
1000
|
-
color:
|
|
1001
|
-
boxShadow:
|
|
1078
|
+
background: l ? "var(--sa-background-primary)" : "transparent",
|
|
1079
|
+
color: l ? "var(--sa-text-primary)" : "var(--sa-text-subtle)",
|
|
1080
|
+
boxShadow: l ? "var(--sa-shadow-sm)" : "none"
|
|
1002
1081
|
});
|
|
1003
|
-
return /* @__PURE__ */
|
|
1082
|
+
return /* @__PURE__ */ q(
|
|
1004
1083
|
"div",
|
|
1005
1084
|
{
|
|
1006
1085
|
className: c,
|
|
1007
1086
|
style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...o },
|
|
1008
1087
|
children: [
|
|
1009
|
-
r && /* @__PURE__ */
|
|
1088
|
+
r && /* @__PURE__ */ M("div", { role: "group", "aria-label": "Mode", style: A, children: We.map((l) => /* @__PURE__ */ M(
|
|
1010
1089
|
"button",
|
|
1011
1090
|
{
|
|
1012
1091
|
type: "button",
|
|
1013
|
-
"aria-pressed":
|
|
1014
|
-
style:
|
|
1015
|
-
onClick: () =>
|
|
1016
|
-
children:
|
|
1092
|
+
"aria-pressed": v === l.value,
|
|
1093
|
+
style: E(v === l.value),
|
|
1094
|
+
onClick: () => g(l.value),
|
|
1095
|
+
children: l.label
|
|
1017
1096
|
},
|
|
1018
|
-
|
|
1097
|
+
l.value
|
|
1019
1098
|
)) }),
|
|
1020
|
-
e.length > 0 && /* @__PURE__ */
|
|
1099
|
+
e.length > 0 && /* @__PURE__ */ M("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((l) => /* @__PURE__ */ M(
|
|
1021
1100
|
"button",
|
|
1022
1101
|
{
|
|
1023
1102
|
type: "button",
|
|
1024
|
-
"aria-pressed":
|
|
1025
|
-
style:
|
|
1026
|
-
onClick: () =>
|
|
1027
|
-
children:
|
|
1103
|
+
"aria-pressed": u === l.name,
|
|
1104
|
+
style: E(u === l.name),
|
|
1105
|
+
onClick: () => p(l.name),
|
|
1106
|
+
children: l.label
|
|
1028
1107
|
},
|
|
1029
|
-
|
|
1108
|
+
l.name ?? "default"
|
|
1030
1109
|
)) }),
|
|
1031
|
-
a && /* @__PURE__ */
|
|
1110
|
+
a && /* @__PURE__ */ q(
|
|
1032
1111
|
"label",
|
|
1033
1112
|
{
|
|
1034
1113
|
style: {
|
|
@@ -1040,12 +1119,12 @@ function We({
|
|
|
1040
1119
|
},
|
|
1041
1120
|
children: [
|
|
1042
1121
|
"Brand",
|
|
1043
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ M(
|
|
1044
1123
|
"input",
|
|
1045
1124
|
{
|
|
1046
1125
|
type: "color",
|
|
1047
|
-
value:
|
|
1048
|
-
onChange: (
|
|
1126
|
+
value: m,
|
|
1127
|
+
onChange: (l) => y(l.target.value),
|
|
1049
1128
|
"aria-label": "Custom brand color",
|
|
1050
1129
|
style: {
|
|
1051
1130
|
width: 28,
|
|
@@ -1065,86 +1144,136 @@ function We({
|
|
|
1065
1144
|
}
|
|
1066
1145
|
);
|
|
1067
1146
|
}
|
|
1068
|
-
const
|
|
1147
|
+
const W = ke, pe = (e, r) => {
|
|
1069
1148
|
const a = {};
|
|
1070
1149
|
return Object.keys(e).forEach((s) => {
|
|
1071
1150
|
if (e != null && e[s] && typeof (e == null ? void 0 : e[s]) == "object") {
|
|
1072
1151
|
a[s] = {
|
|
1073
1152
|
...e == null ? void 0 : e[s],
|
|
1074
1153
|
...r == null ? void 0 : r[s],
|
|
1075
|
-
...
|
|
1154
|
+
...pe(e == null ? void 0 : e[s], r == null ? void 0 : r[s])
|
|
1076
1155
|
};
|
|
1077
1156
|
return;
|
|
1078
1157
|
}
|
|
1079
1158
|
a[s] = (r == null ? void 0 : r[s]) || (e == null ? void 0 : e[s]);
|
|
1080
1159
|
}), a;
|
|
1081
1160
|
};
|
|
1082
|
-
function
|
|
1083
|
-
const e =
|
|
1161
|
+
function H() {
|
|
1162
|
+
const e = ie(X), r = K(
|
|
1084
1163
|
() => ({
|
|
1085
|
-
...
|
|
1164
|
+
...W,
|
|
1086
1165
|
...e.theme,
|
|
1087
|
-
...
|
|
1166
|
+
...pe(W, e.theme)
|
|
1088
1167
|
}),
|
|
1089
|
-
[e.theme,
|
|
1168
|
+
[e.theme, W]
|
|
1090
1169
|
);
|
|
1091
1170
|
return { ...e, theme: r };
|
|
1092
1171
|
}
|
|
1093
|
-
function
|
|
1094
|
-
const { theme: e } =
|
|
1172
|
+
function sr() {
|
|
1173
|
+
const { theme: e } = H();
|
|
1095
1174
|
return e.colors;
|
|
1096
1175
|
}
|
|
1097
|
-
function
|
|
1176
|
+
function or() {
|
|
1098
1177
|
var r;
|
|
1099
|
-
const { theme: e } =
|
|
1178
|
+
const { theme: e } = H();
|
|
1100
1179
|
return (r = e.metrics) == null ? void 0 : r.spacing;
|
|
1101
1180
|
}
|
|
1102
|
-
function
|
|
1181
|
+
function cr() {
|
|
1103
1182
|
var r;
|
|
1104
|
-
const { theme: e } =
|
|
1183
|
+
const { theme: e } = H();
|
|
1105
1184
|
return (r = e.metrics) == null ? void 0 : r.radii;
|
|
1106
1185
|
}
|
|
1107
|
-
function
|
|
1186
|
+
function nr() {
|
|
1108
1187
|
var r;
|
|
1109
|
-
const { theme: e } =
|
|
1188
|
+
const { theme: e } = H();
|
|
1110
1189
|
return (r = e == null ? void 0 : e.metrics) == null ? void 0 : r.shadows;
|
|
1111
1190
|
}
|
|
1112
|
-
function
|
|
1191
|
+
function tr(e) {
|
|
1113
1192
|
return e;
|
|
1114
1193
|
}
|
|
1194
|
+
function Ke(e) {
|
|
1195
|
+
return de(e) ? "dark" : "light";
|
|
1196
|
+
}
|
|
1197
|
+
const Qe = [
|
|
1198
|
+
// terang
|
|
1199
|
+
{ name: "light", base: "#ffffff", brand: "#2563eb" },
|
|
1200
|
+
{ name: "cupcake", base: "#faf7f5", brand: "#65c3c8" },
|
|
1201
|
+
{ name: "bumblebee", base: "#ffffff", brand: "#e0a82e" },
|
|
1202
|
+
{ name: "emerald", base: "#ffffff", brand: "#059669" },
|
|
1203
|
+
{ name: "corporate", base: "#ffffff", brand: "#4b6bfb" },
|
|
1204
|
+
{ name: "retro", base: "#e4d8b4", brand: "#e4663f" },
|
|
1205
|
+
{ name: "garden", base: "#e4e4e7", brand: "#15803d" },
|
|
1206
|
+
{ name: "lofi", base: "#ffffff", brand: "#1a1a1a" },
|
|
1207
|
+
{ name: "pastel", base: "#ffffff", brand: "#b58fd1" },
|
|
1208
|
+
{ name: "fantasy", base: "#ffffff", brand: "#a21caf" },
|
|
1209
|
+
{ name: "wireframe", base: "#ffffff", brand: "#6b6b6b" },
|
|
1210
|
+
{ name: "cmyk", base: "#ffffff", brand: "#189ad3", label: "CMYK" },
|
|
1211
|
+
{ name: "autumn", base: "#f2f2f2", brand: "#a0153e" },
|
|
1212
|
+
{ name: "acid", base: "#fafafa", brand: "#d926a9" },
|
|
1213
|
+
{ name: "lemonade", base: "#f8fdef", brand: "#4d8a04" },
|
|
1214
|
+
{ name: "winter", base: "#f4f7fb", brand: "#0369a1" },
|
|
1215
|
+
{ name: "valentine", base: "#fae7f4", brand: "#d8477e" },
|
|
1216
|
+
{ name: "silk", base: "#f7f5f3", brand: "#8a7c9e" },
|
|
1217
|
+
// gelap
|
|
1218
|
+
{ name: "dark", base: "#1d232a", brand: "#605dff" },
|
|
1219
|
+
{ name: "synthwave", base: "#1a103c", brand: "#e779c1" },
|
|
1220
|
+
{ name: "halloween", base: "#1c1410", brand: "#f28c18" },
|
|
1221
|
+
{ name: "forest", base: "#171212", brand: "#1eb854" },
|
|
1222
|
+
{ name: "aqua", base: "#1a3a52", brand: "#09c7d6" },
|
|
1223
|
+
{ name: "luxury", base: "#141414", brand: "#c9a94d" },
|
|
1224
|
+
{ name: "dracula", base: "#282a36", brand: "#bd93f9" },
|
|
1225
|
+
{ name: "business", base: "#1f2328", brand: "#3f7cb5" },
|
|
1226
|
+
{ name: "night", base: "#0f172a", brand: "#38bdf8" },
|
|
1227
|
+
{ name: "coffee", base: "#20161f", brand: "#db924b" },
|
|
1228
|
+
{ name: "dim", base: "#2a303c", brand: "#4ad6a0" },
|
|
1229
|
+
{ name: "nord", base: "#2e3440", brand: "#6a8fc0" },
|
|
1230
|
+
{ name: "sunset", base: "#1b2433", brand: "#ff865b" },
|
|
1231
|
+
{ name: "black", base: "#000000", brand: "#6a6a6a" },
|
|
1232
|
+
{ name: "abyss", base: "#001a1a", brand: "#18c9b4" }
|
|
1233
|
+
], lr = Qe.map((e) => ({
|
|
1234
|
+
name: e.name,
|
|
1235
|
+
label: e.label ?? e.name.charAt(0).toUpperCase() + e.name.slice(1),
|
|
1236
|
+
base: e.base,
|
|
1237
|
+
brand: e.brand,
|
|
1238
|
+
scheme: Ke(e.base)
|
|
1239
|
+
}));
|
|
1115
1240
|
export {
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1241
|
+
N as DEFAULT_STORAGE_KEY,
|
|
1242
|
+
P as LADDERS,
|
|
1243
|
+
Ae as NEUTRAL_LADDER_DARK,
|
|
1244
|
+
Ce as NEUTRAL_LADDER_GRAY,
|
|
1245
|
+
qe as SA_DEFAULT_SEED,
|
|
1246
|
+
T as SCALE_KEYS_10,
|
|
1247
|
+
F as SCALE_KEYS_12,
|
|
1248
|
+
lr as THEME_PRESETS,
|
|
1249
|
+
X as ThemeContext,
|
|
1250
|
+
rr as ThemeProvider,
|
|
1251
|
+
ar as ThemeSwitcher,
|
|
1252
|
+
z as applyMode,
|
|
1253
|
+
ce as applySkin,
|
|
1254
|
+
De as buildTheme,
|
|
1255
|
+
je as clearPref,
|
|
1256
|
+
Me as contrastRatio,
|
|
1257
|
+
tr as createTheme,
|
|
1258
|
+
Ke as getThemeScheme,
|
|
1259
|
+
x as hexToOklch,
|
|
1260
|
+
j as hexToRgb,
|
|
1261
|
+
de as isDarkColor,
|
|
1262
|
+
re as neutralRamp,
|
|
1263
|
+
D as oklchToHex,
|
|
1264
|
+
Ze as pickByLightness,
|
|
1265
|
+
V as pickTextOn,
|
|
1266
|
+
ae as rampBetween,
|
|
1267
|
+
U as rampFromSeed,
|
|
1268
|
+
B as readPref,
|
|
1269
|
+
Te as resolveMode,
|
|
1270
|
+
he as rgbToHex,
|
|
1271
|
+
Se as rgbToOklch,
|
|
1272
|
+
er as themeBootScript,
|
|
1273
|
+
sr as useColor,
|
|
1274
|
+
cr as useRadius,
|
|
1275
|
+
nr as useShadow,
|
|
1276
|
+
or as useSpacing,
|
|
1277
|
+
H as useTheme,
|
|
1278
|
+
Be as writePref
|
|
1150
1279
|
};
|