@starasia/theme 3.4.0 → 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/index.es.js +316 -255
- package/dist/index.umd.js +6 -6
- package/dist/theme/basePalette.d.ts +2 -2
- package/dist/theme/buildTheme.d.ts +8 -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 ve = (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 ve = (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,74 +29,74 @@ function I(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, n = Math.cbrt(s),
|
|
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 * n + 0.793617785 *
|
|
41
|
-
a: 1.9779984951 * n - 2.428592205 *
|
|
42
|
-
b: 0.0259040371 * n + 0.7827717662 *
|
|
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, n = s * s * s,
|
|
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 * n - 3.3077115913 *
|
|
49
|
-
g: -1.2684380046 * n + 2.6097574011 *
|
|
50
|
-
b: -0.0041960863 * n - 0.7034186147 *
|
|
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
|
-
|
|
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
58
|
), n = Math.sqrt(c * c + o * o);
|
|
59
|
-
let
|
|
60
|
-
return
|
|
59
|
+
let d = Math.atan2(o, c) * 180 / Math.PI;
|
|
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 = (n) =>
|
|
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
66
|
if (!ee(o)) {
|
|
67
|
-
let n = 0,
|
|
67
|
+
let n = 0, d = r;
|
|
68
68
|
for (let t = 0; t < 20; t++) {
|
|
69
|
-
const
|
|
70
|
-
o = c(
|
|
69
|
+
const b = (n + d) / 2;
|
|
70
|
+
o = c(b), ee(o) ? n = b : d = b;
|
|
71
71
|
}
|
|
72
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
|
-
function
|
|
97
|
-
return
|
|
96
|
+
function de(e) {
|
|
97
|
+
return Q(j(e)) < 0.4;
|
|
98
98
|
}
|
|
99
|
-
const
|
|
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 = {
|
|
100
100
|
brand: {
|
|
101
101
|
L: [0.9434, 0.8816, 0.7612, 0.6375, 0.5179, 0.4415, 0.2695, 0.2429, 0.2155, 0.1878],
|
|
102
102
|
C: [0.0143, 0.031, 0.0645, 0.1017, 0.1394, 0.1429, 0.086, 0.0761, 0.066, 0.0549]
|
|
@@ -117,40 +117,40 @@ const Q = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
|
117
117
|
L: [0.9673, 0.9003, 0.8504, 0.8055, 0.7624, 0.6961, 0.5244, 0.3979, 0.2567, 0.2201],
|
|
118
118
|
C: [0.0205, 0.0679, 0.0991, 0.1284, 0.1495, 0.1346, 0.0998, 0.0731, 0.0415, 0.0332]
|
|
119
119
|
}
|
|
120
|
-
},
|
|
121
|
-
function
|
|
122
|
-
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;
|
|
123
123
|
return r.L.map(
|
|
124
|
-
(o, n) =>
|
|
124
|
+
(o, n) => D({ l: o, c: a * (r.C[n] / c), h: s })
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
function re(e, r) {
|
|
128
|
-
const { c: a, h: s } =
|
|
129
|
-
return r.map((n,
|
|
130
|
-
const t =
|
|
131
|
-
return
|
|
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
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function ae(e, r, a, s, c = 0.018) {
|
|
135
|
-
const o =
|
|
136
|
-
return Array.from({ length: a }, (
|
|
135
|
+
const o = x(e).l, n = x(r).l;
|
|
136
|
+
return Array.from({ length: a }, (d, t) => {
|
|
137
137
|
if (t === 0)
|
|
138
138
|
return e;
|
|
139
139
|
if (t === a - 1)
|
|
140
140
|
return r;
|
|
141
|
-
const
|
|
142
|
-
return
|
|
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 });
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Ze(e, r) {
|
|
146
146
|
let a = e[0], s = 1 / 0;
|
|
147
147
|
for (const c of e) {
|
|
148
|
-
const o = Math.abs(
|
|
148
|
+
const o = Math.abs(x(c).l - r);
|
|
149
149
|
o < s && (s = o, a = c);
|
|
150
150
|
}
|
|
151
151
|
return a;
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const be = [
|
|
154
154
|
{ token: "--sa-text-primary", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
155
155
|
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
156
156
|
{ token: "--sa-text-on-brand", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
@@ -333,7 +333,7 @@ const ie = [
|
|
|
333
333
|
{ token: "--sa-text-on-accent", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
334
334
|
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-700, #a8690b)", scale: "amber" },
|
|
335
335
|
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-500, #f5a524)", scale: "amber" }
|
|
336
|
-
],
|
|
336
|
+
], fe = [
|
|
337
337
|
{ token: "--sa-text-primary", recipe: "var(--sa-color-dark-1100, #e2e3e4)", scale: "dark" },
|
|
338
338
|
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
339
339
|
{ token: "--sa-text-brand", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
@@ -512,33 +512,43 @@ const ie = [
|
|
|
512
512
|
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
513
513
|
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" }
|
|
514
514
|
];
|
|
515
|
-
function
|
|
515
|
+
function $e(e, r) {
|
|
516
516
|
const a = e.match(/var\(--sa-color-([a-z]+)-(\d+),\s*([^)]+)\)/);
|
|
517
517
|
if (!a)
|
|
518
518
|
return e;
|
|
519
519
|
const [, s, c, o] = a, n = r[s];
|
|
520
520
|
if (!n)
|
|
521
521
|
return o.trim();
|
|
522
|
-
const t = (n.length === 12 ?
|
|
522
|
+
const t = (n.length === 12 ? F : T).indexOf(c);
|
|
523
523
|
return t >= 0 ? n[t] : o.trim();
|
|
524
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
|
+
}
|
|
525
529
|
function _e(e) {
|
|
526
|
-
const r = e.base, a =
|
|
530
|
+
const r = e.base, a = de(r), s = x(r), c = D({
|
|
527
531
|
l: a ? 0.96 : 0.22,
|
|
528
532
|
c: Math.min(s.c * 0.5, 0.02),
|
|
529
533
|
h: s.h
|
|
530
|
-
}), o = a ? c : r, n = a ? r : c,
|
|
531
|
-
["error", "success", "info", "warning"].forEach((
|
|
532
|
-
const
|
|
533
|
-
|
|
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]));
|
|
534
538
|
});
|
|
535
|
-
const f = a ?
|
|
536
|
-
for (const
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
|
|
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 };
|
|
540
550
|
}
|
|
541
|
-
const
|
|
551
|
+
const qe = {
|
|
542
552
|
name: "starasia",
|
|
543
553
|
brand: "#1a4fa0",
|
|
544
554
|
neutral: "#7d818a",
|
|
@@ -548,46 +558,46 @@ const Ve = {
|
|
|
548
558
|
warning: "#ed9f30",
|
|
549
559
|
radius: 8,
|
|
550
560
|
font: { body: "Inter" }
|
|
551
|
-
},
|
|
552
|
-
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) {
|
|
553
563
|
s.forEach((c, o) => {
|
|
554
564
|
e[`--sa-color-${r}-${c}`] = a[o];
|
|
555
565
|
});
|
|
556
566
|
}
|
|
557
|
-
function
|
|
567
|
+
function De(e, r = {}) {
|
|
558
568
|
const a = r.as ?? "root";
|
|
559
569
|
if (a === "skin" && !r.name)
|
|
560
570
|
throw new Error('buildTheme: options.name wajib saat as:"skin"');
|
|
561
571
|
const s = a === "skin" ? `[data-skin="${r.name}"]` : r.selector ?? ":root";
|
|
562
572
|
if (e.base)
|
|
563
|
-
return
|
|
564
|
-
const c = r.darkPrimary ?? !0, o = {}, n = {},
|
|
565
|
-
if (
|
|
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) => {
|
|
566
576
|
const u = e[f];
|
|
567
577
|
if (!u)
|
|
568
578
|
return;
|
|
569
|
-
const
|
|
570
|
-
|
|
579
|
+
const k = U(u, P[f]);
|
|
580
|
+
d[f] = k, I(o, f, k, T), t.add(f);
|
|
571
581
|
}), e.neutral) {
|
|
572
|
-
const f = re(e.neutral,
|
|
573
|
-
|
|
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");
|
|
574
584
|
}
|
|
575
|
-
if (
|
|
576
|
-
const f =
|
|
577
|
-
n["--sa-background-brand"] = f, n["--sa-background-brand-hover"] =
|
|
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);
|
|
578
588
|
}
|
|
579
|
-
return { css: a === "skin" ? Ie(s, o, n, t) :
|
|
589
|
+
return { css: a === "skin" ? Ie(s, o, n, t) : Oe(s, o, n), rootTokens: o, darkTokens: n, ramps: d };
|
|
580
590
|
}
|
|
581
|
-
function
|
|
591
|
+
function ue(e, r) {
|
|
582
592
|
var a, s, c;
|
|
583
593
|
if (typeof r.radius == "number") {
|
|
584
594
|
const o = r.radius;
|
|
585
|
-
e["--sa-radii-xs"] = `${
|
|
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`;
|
|
586
596
|
}
|
|
587
|
-
(a = r.font) != null && a.body && (e["--sa-font-family"] = `"${r.font.body}", ${
|
|
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}`);
|
|
588
598
|
}
|
|
589
|
-
function
|
|
590
|
-
const { tokens: a, brand: s, gray: c } = _e({
|
|
599
|
+
function Ne(e, r) {
|
|
600
|
+
const { tokens: a, brand: s, gray: c, isDark: o } = _e({
|
|
591
601
|
base: e.base,
|
|
592
602
|
brand: e.brand,
|
|
593
603
|
error: e.error,
|
|
@@ -595,43 +605,46 @@ function De(e, r) {
|
|
|
595
605
|
info: e.info,
|
|
596
606
|
warning: e.warning
|
|
597
607
|
});
|
|
598
|
-
|
|
599
|
-
const o = `${r},
|
|
608
|
+
ue(a, e);
|
|
609
|
+
const n = o ? "dark" : "light", d = `${r},
|
|
600
610
|
${r}[data-theme="dark"]`;
|
|
601
611
|
return {
|
|
602
|
-
|
|
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 }),
|
|
603
615
|
rootTokens: a,
|
|
604
616
|
darkTokens: {},
|
|
605
|
-
ramps: { brand: s, gray: c }
|
|
617
|
+
ramps: { brand: s, gray: c },
|
|
618
|
+
scheme: n
|
|
606
619
|
};
|
|
607
620
|
}
|
|
608
|
-
function
|
|
621
|
+
function R(e, r) {
|
|
609
622
|
const a = Object.entries(r).map(([s, c]) => ` ${s}: ${c};`);
|
|
610
623
|
return a.length ? `${e} {
|
|
611
624
|
${a.join(`
|
|
612
625
|
`)}
|
|
613
626
|
}` : "";
|
|
614
627
|
}
|
|
615
|
-
function
|
|
628
|
+
function Oe(e, r, a) {
|
|
616
629
|
const s = e === ":root" ? '[data-theme="dark"]' : `${e}[data-theme="dark"], ${e} [data-theme="dark"]`;
|
|
617
|
-
return [
|
|
630
|
+
return [R(e, r), R(s, a)].filter(Boolean).join(`
|
|
618
631
|
|
|
619
632
|
`);
|
|
620
633
|
}
|
|
621
634
|
function Ie(e, r, a, s) {
|
|
622
635
|
const c = {};
|
|
623
|
-
for (const t of
|
|
636
|
+
for (const t of be)
|
|
624
637
|
t.scale && s.has(t.scale) && t.token !== "--sa-text-on-brand" && (c[t.token] = t.recipe);
|
|
625
638
|
const o = { ...r, ...c }, n = {};
|
|
626
|
-
for (const t of
|
|
639
|
+
for (const t of fe)
|
|
627
640
|
(t.scale && s.has(t.scale) || t.token in o) && (n[t.token] = t.recipe);
|
|
628
|
-
const
|
|
629
|
-
return [
|
|
641
|
+
const d = { ...n, ...a };
|
|
642
|
+
return [R(e, o), R(`${e}[data-theme="dark"]`, d)].filter(Boolean).join(`
|
|
630
643
|
|
|
631
644
|
`);
|
|
632
645
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
646
|
+
const N = "sa-theme";
|
|
647
|
+
function B(e = N) {
|
|
635
648
|
try {
|
|
636
649
|
if (typeof localStorage > "u")
|
|
637
650
|
return null;
|
|
@@ -641,7 +654,7 @@ function N(e = L) {
|
|
|
641
654
|
return null;
|
|
642
655
|
}
|
|
643
656
|
}
|
|
644
|
-
function
|
|
657
|
+
function Be(e, r = N) {
|
|
645
658
|
try {
|
|
646
659
|
if (typeof localStorage > "u")
|
|
647
660
|
return;
|
|
@@ -649,7 +662,7 @@ function Oe(e, r = L) {
|
|
|
649
662
|
} catch {
|
|
650
663
|
}
|
|
651
664
|
}
|
|
652
|
-
function
|
|
665
|
+
function je(e = N) {
|
|
653
666
|
try {
|
|
654
667
|
if (typeof localStorage > "u")
|
|
655
668
|
return;
|
|
@@ -657,7 +670,7 @@ function Be(e = L) {
|
|
|
657
670
|
} catch {
|
|
658
671
|
}
|
|
659
672
|
}
|
|
660
|
-
function
|
|
673
|
+
function Te(e) {
|
|
661
674
|
if (e === "system")
|
|
662
675
|
try {
|
|
663
676
|
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -666,19 +679,19 @@ function je(e) {
|
|
|
666
679
|
}
|
|
667
680
|
return e;
|
|
668
681
|
}
|
|
669
|
-
function
|
|
682
|
+
function z(e) {
|
|
670
683
|
if (typeof document > "u")
|
|
671
684
|
return;
|
|
672
685
|
const r = document.documentElement;
|
|
673
|
-
|
|
686
|
+
Te(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
|
|
674
687
|
}
|
|
675
|
-
function
|
|
688
|
+
function ce(e) {
|
|
676
689
|
if (typeof document > "u")
|
|
677
690
|
return;
|
|
678
691
|
const r = document.documentElement;
|
|
679
692
|
e ? r.setAttribute("data-skin", e) : r.removeAttribute("data-skin");
|
|
680
693
|
}
|
|
681
|
-
function
|
|
694
|
+
function er(e = N) {
|
|
682
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){}})();";
|
|
683
696
|
}
|
|
684
697
|
const Fe = {
|
|
@@ -780,7 +793,7 @@ const Fe = {
|
|
|
780
793
|
tertiary: "230, 237, 246"
|
|
781
794
|
}
|
|
782
795
|
}
|
|
783
|
-
},
|
|
796
|
+
}, Pe = {
|
|
784
797
|
radii: {
|
|
785
798
|
none: "0",
|
|
786
799
|
xs: "0.25rem",
|
|
@@ -838,7 +851,7 @@ const Fe = {
|
|
|
838
851
|
inner: "inset 0 2px 4px 0 #0000000d",
|
|
839
852
|
card: "0px 4px 35px 0px #7090b040"
|
|
840
853
|
}
|
|
841
|
-
},
|
|
854
|
+
}, Ue = {
|
|
842
855
|
fontSizes: {
|
|
843
856
|
xs: "0.625rem",
|
|
844
857
|
sm: "0.75rem",
|
|
@@ -878,11 +891,11 @@ const Fe = {
|
|
|
878
891
|
relaxed: 1.625,
|
|
879
892
|
loose: 2
|
|
880
893
|
}
|
|
881
|
-
},
|
|
894
|
+
}, ke = {
|
|
882
895
|
colors: Fe,
|
|
883
|
-
metrics:
|
|
884
|
-
font:
|
|
885
|
-
}, X =
|
|
896
|
+
metrics: Pe,
|
|
897
|
+
font: Ue
|
|
898
|
+
}, X = ve({
|
|
886
899
|
theme: void 0,
|
|
887
900
|
setTheme: () => {
|
|
888
901
|
},
|
|
@@ -895,18 +908,18 @@ const Fe = {
|
|
|
895
908
|
},
|
|
896
909
|
resetTheme: () => {
|
|
897
910
|
}
|
|
898
|
-
}),
|
|
911
|
+
}), He = "sa-theme-style", G = "sa-theme-seed-style";
|
|
899
912
|
function Je(e) {
|
|
900
913
|
const r = e.split(",").map((a) => Number(a.trim()));
|
|
901
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("");
|
|
902
915
|
}
|
|
903
|
-
var
|
|
904
|
-
const
|
|
905
|
-
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) {
|
|
906
919
|
if (!e)
|
|
907
920
|
return "";
|
|
908
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(
|
|
909
|
-
([s, c]) =>
|
|
922
|
+
([s, c]) => ne(c) !== ne(Ye[s])
|
|
910
923
|
).map(([s, c]) => {
|
|
911
924
|
const o = Je(c);
|
|
912
925
|
return o ? ` --sa-color-brand-${s}: ${o};` : "";
|
|
@@ -916,146 +929,146 @@ function Ye(e) {
|
|
|
916
929
|
${a}
|
|
917
930
|
}` : "";
|
|
918
931
|
}
|
|
919
|
-
function
|
|
932
|
+
function rr({
|
|
920
933
|
value: e,
|
|
921
934
|
seed: r,
|
|
922
935
|
persist: a = !0,
|
|
923
|
-
storageKey: s =
|
|
936
|
+
storageKey: s = N,
|
|
924
937
|
manageAttributes: c = !1,
|
|
925
938
|
children: o
|
|
926
939
|
}) {
|
|
927
|
-
const [n,
|
|
940
|
+
const [n, d] = _(e), t = r !== void 0, [b, v] = _(() => {
|
|
928
941
|
if (t)
|
|
929
942
|
return r;
|
|
930
943
|
if (a) {
|
|
931
|
-
const
|
|
932
|
-
if (
|
|
933
|
-
return
|
|
944
|
+
const i = B(s);
|
|
945
|
+
if (i != null && i.seed)
|
|
946
|
+
return i.seed;
|
|
934
947
|
}
|
|
935
948
|
return null;
|
|
936
|
-
}), f = t ? r :
|
|
949
|
+
}), f = t ? r : b, u = K(
|
|
937
950
|
() => f ? JSON.stringify(f) : "",
|
|
938
951
|
[f]
|
|
939
952
|
);
|
|
940
|
-
|
|
953
|
+
O(() => {
|
|
941
954
|
if (typeof document > "u")
|
|
942
955
|
return;
|
|
943
956
|
if (!u) {
|
|
944
|
-
const l = document.getElementById(
|
|
957
|
+
const l = document.getElementById(G);
|
|
945
958
|
l && (l.textContent = "");
|
|
946
959
|
return;
|
|
947
960
|
}
|
|
948
|
-
const { css:
|
|
949
|
-
|
|
950
|
-
}, [u]),
|
|
961
|
+
const { css: i } = De(JSON.parse(u));
|
|
962
|
+
me(i, G);
|
|
963
|
+
}, [u]), O(() => {
|
|
951
964
|
var l;
|
|
952
965
|
if (!c || !a)
|
|
953
966
|
return;
|
|
954
|
-
const
|
|
955
|
-
if (
|
|
956
|
-
const
|
|
957
|
-
return (l =
|
|
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), () => {
|
|
958
971
|
var Z;
|
|
959
|
-
return (Z =
|
|
972
|
+
return (Z = h.removeEventListener) == null ? void 0 : Z.call(h, "change", L);
|
|
960
973
|
};
|
|
961
974
|
}
|
|
962
975
|
}, [c, a, s]);
|
|
963
|
-
const
|
|
976
|
+
const k = K(
|
|
964
977
|
() => n ? JSON.stringify(n) : "",
|
|
965
978
|
[n]
|
|
966
|
-
),
|
|
967
|
-
|
|
968
|
-
var
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
if (!
|
|
979
|
+
), m = ge(null);
|
|
980
|
+
O(() => {
|
|
981
|
+
var h, L;
|
|
982
|
+
m.current || (m.current = ye(He));
|
|
983
|
+
const i = m.current;
|
|
984
|
+
if (!i)
|
|
972
985
|
return;
|
|
973
|
-
const l =
|
|
974
|
-
|
|
975
|
-
}, [
|
|
976
|
-
|
|
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 = "");
|
|
977
990
|
}, []);
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
},
|
|
981
|
-
(
|
|
991
|
+
const S = (i) => {
|
|
992
|
+
i && d(i);
|
|
993
|
+
}, g = $(
|
|
994
|
+
(i) => {
|
|
982
995
|
if (!a)
|
|
983
996
|
return;
|
|
984
|
-
const l =
|
|
985
|
-
|
|
997
|
+
const l = B(s) || {};
|
|
998
|
+
Be({ ...l, ...i }, s);
|
|
986
999
|
},
|
|
987
1000
|
[a, s]
|
|
988
|
-
),
|
|
989
|
-
(
|
|
990
|
-
t || (
|
|
1001
|
+
), p = $(
|
|
1002
|
+
(i) => {
|
|
1003
|
+
t || (v(i), g({ seed: i }));
|
|
991
1004
|
},
|
|
992
|
-
[t,
|
|
993
|
-
),
|
|
994
|
-
(
|
|
995
|
-
|
|
1005
|
+
[t, g]
|
|
1006
|
+
), y = $(
|
|
1007
|
+
(i) => {
|
|
1008
|
+
z(i), g({ mode: i });
|
|
996
1009
|
},
|
|
997
|
-
[
|
|
998
|
-
),
|
|
999
|
-
(
|
|
1000
|
-
|
|
1010
|
+
[g]
|
|
1011
|
+
), A = $(
|
|
1012
|
+
(i) => {
|
|
1013
|
+
ce(i), g({ skin: i });
|
|
1001
1014
|
},
|
|
1002
|
-
[
|
|
1003
|
-
),
|
|
1004
|
-
if (t ||
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1015
|
+
[g]
|
|
1016
|
+
), E = $(() => {
|
|
1017
|
+
if (t || v(null), je(s), typeof document < "u") {
|
|
1018
|
+
const i = document.getElementById(G);
|
|
1019
|
+
i && (i.textContent = "");
|
|
1007
1020
|
}
|
|
1008
1021
|
}, [t, s]);
|
|
1009
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ M(
|
|
1010
1023
|
X.Provider,
|
|
1011
1024
|
{
|
|
1012
1025
|
value: {
|
|
1013
1026
|
theme: n,
|
|
1014
|
-
setTheme:
|
|
1027
|
+
setTheme: S,
|
|
1015
1028
|
seed: f,
|
|
1016
|
-
setSeed:
|
|
1017
|
-
setMode:
|
|
1018
|
-
setSkin:
|
|
1019
|
-
resetTheme:
|
|
1029
|
+
setSeed: p,
|
|
1030
|
+
setMode: y,
|
|
1031
|
+
setSkin: A,
|
|
1032
|
+
resetTheme: E
|
|
1020
1033
|
},
|
|
1021
1034
|
children: o
|
|
1022
1035
|
}
|
|
1023
1036
|
);
|
|
1024
1037
|
}
|
|
1025
|
-
const
|
|
1038
|
+
const Ge = [
|
|
1026
1039
|
{ name: null, label: "Default" },
|
|
1027
1040
|
{ name: "tech", label: "Tech" }
|
|
1028
|
-
],
|
|
1041
|
+
], We = [
|
|
1029
1042
|
{ value: "light", label: "Light" },
|
|
1030
1043
|
{ value: "dark", label: "Dark" },
|
|
1031
1044
|
{ value: "system", label: "System" }
|
|
1032
1045
|
];
|
|
1033
|
-
function
|
|
1034
|
-
skins: e =
|
|
1046
|
+
function ar({
|
|
1047
|
+
skins: e = Ge,
|
|
1035
1048
|
showMode: r = !0,
|
|
1036
1049
|
allowCustom: a = !1,
|
|
1037
1050
|
storageKey: s,
|
|
1038
1051
|
className: c,
|
|
1039
1052
|
style: o
|
|
1040
1053
|
}) {
|
|
1041
|
-
var
|
|
1042
|
-
const { setMode: n, setSkin:
|
|
1043
|
-
(
|
|
1044
|
-
), [u,
|
|
1045
|
-
(
|
|
1046
|
-
), [
|
|
1054
|
+
var i;
|
|
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) => {
|
|
1047
1060
|
f(l), n(l);
|
|
1048
|
-
},
|
|
1049
|
-
|
|
1050
|
-
},
|
|
1051
|
-
|
|
1052
|
-
},
|
|
1061
|
+
}, p = (l) => {
|
|
1062
|
+
k(l), d(l);
|
|
1063
|
+
}, y = (l) => {
|
|
1064
|
+
S(l), t({ brand: l });
|
|
1065
|
+
}, A = {
|
|
1053
1066
|
display: "inline-flex",
|
|
1054
1067
|
gap: 4,
|
|
1055
1068
|
padding: 4,
|
|
1056
1069
|
borderRadius: "var(--sa-radii-md)",
|
|
1057
1070
|
background: "var(--sa-background-neutral)"
|
|
1058
|
-
},
|
|
1071
|
+
}, E = (l) => ({
|
|
1059
1072
|
border: "none",
|
|
1060
1073
|
cursor: "pointer",
|
|
1061
1074
|
fontSize: 12,
|
|
@@ -1072,24 +1085,24 @@ function qe({
|
|
|
1072
1085
|
className: c,
|
|
1073
1086
|
style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...o },
|
|
1074
1087
|
children: [
|
|
1075
|
-
r && /* @__PURE__ */
|
|
1088
|
+
r && /* @__PURE__ */ M("div", { role: "group", "aria-label": "Mode", style: A, children: We.map((l) => /* @__PURE__ */ M(
|
|
1076
1089
|
"button",
|
|
1077
1090
|
{
|
|
1078
1091
|
type: "button",
|
|
1079
|
-
"aria-pressed":
|
|
1080
|
-
style:
|
|
1081
|
-
onClick: () =>
|
|
1092
|
+
"aria-pressed": v === l.value,
|
|
1093
|
+
style: E(v === l.value),
|
|
1094
|
+
onClick: () => g(l.value),
|
|
1082
1095
|
children: l.label
|
|
1083
1096
|
},
|
|
1084
1097
|
l.value
|
|
1085
1098
|
)) }),
|
|
1086
|
-
e.length > 0 && /* @__PURE__ */
|
|
1099
|
+
e.length > 0 && /* @__PURE__ */ M("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((l) => /* @__PURE__ */ M(
|
|
1087
1100
|
"button",
|
|
1088
1101
|
{
|
|
1089
1102
|
type: "button",
|
|
1090
1103
|
"aria-pressed": u === l.name,
|
|
1091
|
-
style:
|
|
1092
|
-
onClick: () =>
|
|
1104
|
+
style: E(u === l.name),
|
|
1105
|
+
onClick: () => p(l.name),
|
|
1093
1106
|
children: l.label
|
|
1094
1107
|
},
|
|
1095
1108
|
l.name ?? "default"
|
|
@@ -1106,12 +1119,12 @@ function qe({
|
|
|
1106
1119
|
},
|
|
1107
1120
|
children: [
|
|
1108
1121
|
"Brand",
|
|
1109
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ M(
|
|
1110
1123
|
"input",
|
|
1111
1124
|
{
|
|
1112
1125
|
type: "color",
|
|
1113
|
-
value:
|
|
1114
|
-
onChange: (l) =>
|
|
1126
|
+
value: m,
|
|
1127
|
+
onChange: (l) => y(l.target.value),
|
|
1115
1128
|
"aria-label": "Custom brand color",
|
|
1116
1129
|
style: {
|
|
1117
1130
|
width: 28,
|
|
@@ -1131,88 +1144,136 @@ function qe({
|
|
|
1131
1144
|
}
|
|
1132
1145
|
);
|
|
1133
1146
|
}
|
|
1134
|
-
const
|
|
1147
|
+
const W = ke, pe = (e, r) => {
|
|
1135
1148
|
const a = {};
|
|
1136
1149
|
return Object.keys(e).forEach((s) => {
|
|
1137
1150
|
if (e != null && e[s] && typeof (e == null ? void 0 : e[s]) == "object") {
|
|
1138
1151
|
a[s] = {
|
|
1139
1152
|
...e == null ? void 0 : e[s],
|
|
1140
1153
|
...r == null ? void 0 : r[s],
|
|
1141
|
-
...
|
|
1154
|
+
...pe(e == null ? void 0 : e[s], r == null ? void 0 : r[s])
|
|
1142
1155
|
};
|
|
1143
1156
|
return;
|
|
1144
1157
|
}
|
|
1145
1158
|
a[s] = (r == null ? void 0 : r[s]) || (e == null ? void 0 : e[s]);
|
|
1146
1159
|
}), a;
|
|
1147
1160
|
};
|
|
1148
|
-
function
|
|
1149
|
-
const e =
|
|
1161
|
+
function H() {
|
|
1162
|
+
const e = ie(X), r = K(
|
|
1150
1163
|
() => ({
|
|
1151
|
-
...
|
|
1164
|
+
...W,
|
|
1152
1165
|
...e.theme,
|
|
1153
|
-
...
|
|
1166
|
+
...pe(W, e.theme)
|
|
1154
1167
|
}),
|
|
1155
|
-
[e.theme,
|
|
1168
|
+
[e.theme, W]
|
|
1156
1169
|
);
|
|
1157
1170
|
return { ...e, theme: r };
|
|
1158
1171
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const { theme: e } =
|
|
1172
|
+
function sr() {
|
|
1173
|
+
const { theme: e } = H();
|
|
1161
1174
|
return e.colors;
|
|
1162
1175
|
}
|
|
1163
|
-
function
|
|
1176
|
+
function or() {
|
|
1164
1177
|
var r;
|
|
1165
|
-
const { theme: e } =
|
|
1178
|
+
const { theme: e } = H();
|
|
1166
1179
|
return (r = e.metrics) == null ? void 0 : r.spacing;
|
|
1167
1180
|
}
|
|
1168
|
-
function
|
|
1181
|
+
function cr() {
|
|
1169
1182
|
var r;
|
|
1170
|
-
const { theme: e } =
|
|
1183
|
+
const { theme: e } = H();
|
|
1171
1184
|
return (r = e.metrics) == null ? void 0 : r.radii;
|
|
1172
1185
|
}
|
|
1173
|
-
function
|
|
1186
|
+
function nr() {
|
|
1174
1187
|
var r;
|
|
1175
|
-
const { theme: e } =
|
|
1188
|
+
const { theme: e } = H();
|
|
1176
1189
|
return (r = e == null ? void 0 : e.metrics) == null ? void 0 : r.shadows;
|
|
1177
1190
|
}
|
|
1178
|
-
function
|
|
1191
|
+
function tr(e) {
|
|
1179
1192
|
return e;
|
|
1180
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
|
+
}));
|
|
1181
1240
|
export {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
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,
|
|
1189
1249
|
X as ThemeContext,
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
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,
|
|
1201
1262
|
re as neutralRamp,
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1263
|
+
D as oklchToHex,
|
|
1264
|
+
Ze as pickByLightness,
|
|
1265
|
+
V as pickTextOn,
|
|
1205
1266
|
ae as rampBetween,
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
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
|
|
1218
1279
|
};
|