@starasia/theme 3.1.0 → 3.3.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/components/ThemeProvider.d.ts +25 -1
- package/dist/components/ThemeSwitcher.d.ts +28 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/hooks/useTheme.d.ts +5 -0
- package/dist/index.es.js +853 -229
- package/dist/index.umd.js +9 -7
- package/dist/theme/buildTheme.d.ts +11 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/persist.d.ts +31 -0
- package/dist/theme/semanticRecipes.d.ts +20 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as w, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as de, useState as M, useMemo as T, useEffect as _, useRef as be, useCallback as E, useContext as ne } from "react";
|
|
3
|
+
const fe = (e, r) => {
|
|
4
4
|
if (typeof document > "u")
|
|
5
5
|
return;
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
8
|
-
|
|
6
|
+
const a = document.getElementById(r);
|
|
7
|
+
if (a)
|
|
8
|
+
a.textContent = e;
|
|
9
9
|
else {
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const s = document.createElement("style");
|
|
11
|
+
s.id = r, s.textContent = e, document.head.appendChild(s);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, ue = (e) => {
|
|
14
14
|
if (typeof document > "u")
|
|
15
15
|
return null;
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
19
|
-
const
|
|
20
|
-
return
|
|
16
|
+
const r = document.getElementById(e);
|
|
17
|
+
if (r)
|
|
18
|
+
return r;
|
|
19
|
+
const a = document.createElement("style");
|
|
20
|
+
return a.id = e, document.head.appendChild(a), a;
|
|
21
21
|
};
|
|
22
|
-
function
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
const
|
|
22
|
+
function U(e) {
|
|
23
|
+
let r = e.trim().replace(/^#/, "");
|
|
24
|
+
r.length === 3 && (r = r.split("").map((s) => s + s).join("")), r.length === 8 && (r = r.slice(0, 6));
|
|
25
|
+
const a = parseInt(r, 16);
|
|
26
26
|
return {
|
|
27
|
-
r: (
|
|
28
|
-
g: (
|
|
29
|
-
b: (
|
|
27
|
+
r: (a >> 16 & 255) / 255,
|
|
28
|
+
g: (a >> 8 & 255) / 255,
|
|
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 ke({ r: e, g: r, b: a }) {
|
|
34
|
+
return `#${j(e)}${j(r)}${j(a)}`;
|
|
35
35
|
}
|
|
36
|
-
const x = (
|
|
37
|
-
function
|
|
38
|
-
const
|
|
36
|
+
const x = (e) => e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4), B = (e) => e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 1 / 2.4) - 0.055;
|
|
37
|
+
function pe(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, l = Math.cbrt(s), d = Math.cbrt(c), n = Math.cbrt(o);
|
|
39
39
|
return {
|
|
40
|
-
L: 0.2104542553 *
|
|
41
|
-
a: 1.9779984951 *
|
|
42
|
-
b: 0.0259040371 *
|
|
40
|
+
L: 0.2104542553 * l + 0.793617785 * d - 0.0040720468 * n,
|
|
41
|
+
a: 1.9779984951 * l - 2.428592205 * d + 0.4505937099 * n,
|
|
42
|
+
b: 0.0259040371 * l + 0.7827717662 * d - 0.808675766 * n
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
45
|
+
function ve(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, l = s * s * s, d = c * c * c, n = o * o * o;
|
|
47
47
|
return {
|
|
48
|
-
r: 4.0767416621 *
|
|
49
|
-
g: -1.2684380046 *
|
|
50
|
-
b: -0.0041960863 *
|
|
48
|
+
r: 4.0767416621 * l - 3.3077115913 * d + 0.2309699292 * n,
|
|
49
|
+
g: -1.2684380046 * l + 2.6097574011 * d - 0.3413193965 * n,
|
|
50
|
+
b: -0.0041960863 * l - 0.7034186147 * d + 1.707614701 * n
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const { L:
|
|
55
|
-
x(
|
|
56
|
-
x(
|
|
57
|
-
x(
|
|
58
|
-
),
|
|
59
|
-
let
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
if (!
|
|
67
|
-
let
|
|
68
|
-
for (let
|
|
69
|
-
const
|
|
70
|
-
|
|
53
|
+
function ge({ r: e, g: r, b: a }) {
|
|
54
|
+
const { L: s, a: c, b: o } = pe(
|
|
55
|
+
x(e),
|
|
56
|
+
x(r),
|
|
57
|
+
x(a)
|
|
58
|
+
), l = Math.sqrt(c * c + o * o);
|
|
59
|
+
let d = Math.atan2(o, c) * 180 / Math.PI;
|
|
60
|
+
return d < 0 && (d += 360), { l: s, c: l, h: d };
|
|
61
|
+
}
|
|
62
|
+
const J = (e) => ge(U(e)), W = ({ 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 ye({ l: e, c: r, h: a }) {
|
|
64
|
+
const s = a * Math.PI / 180, c = (l) => ve(e, l * Math.cos(s), l * Math.sin(s));
|
|
65
|
+
let o = c(r);
|
|
66
|
+
if (!W(o)) {
|
|
67
|
+
let l = 0, d = r;
|
|
68
|
+
for (let n = 0; n < 20; n++) {
|
|
69
|
+
const f = (l + d) / 2;
|
|
70
|
+
o = c(f), W(o) ? l = f : d = f;
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
o = c(l);
|
|
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, B(o.r))),
|
|
76
|
+
g: Math.min(1, Math.max(0, B(o.g))),
|
|
77
|
+
b: Math.min(1, Math.max(0, B(o.b)))
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
return 0.2126 * x(
|
|
80
|
+
const te = (e) => ke(ye(e));
|
|
81
|
+
function K({ r: e, g: r, b: a }) {
|
|
82
|
+
return 0.2126 * x(e) + 0.7152 * x(r) + 0.0722 * x(a);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return (
|
|
84
|
+
function me(e, r) {
|
|
85
|
+
const a = K(U(e)), s = K(U(r)), c = Math.max(a, s), o = Math.min(a, s);
|
|
86
|
+
return (c + 0.05) / (o + 0.05);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
let
|
|
90
|
-
for (const
|
|
91
|
-
const
|
|
92
|
-
|
|
88
|
+
function Q(e, r = ["#ffffff", "#1e1f21"]) {
|
|
89
|
+
let a = r[0], s = -1;
|
|
90
|
+
for (const c of r) {
|
|
91
|
+
const o = me(e, c);
|
|
92
|
+
o > s && (s = o, a = c);
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return a;
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const V = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], X = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1100"], Z = {
|
|
97
97
|
brand: {
|
|
98
98
|
L: [0.9434, 0.8816, 0.7612, 0.6375, 0.5179, 0.4415, 0.2695, 0.2429, 0.2155, 0.1878],
|
|
99
99
|
C: [0.0143, 0.031, 0.0645, 0.1017, 0.1394, 0.1429, 0.086, 0.0761, 0.066, 0.0549]
|
|
@@ -114,29 +114,390 @@ const D = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
|
|
114
114
|
L: [0.9673, 0.9003, 0.8504, 0.8055, 0.7624, 0.6961, 0.5244, 0.3979, 0.2567, 0.2201],
|
|
115
115
|
C: [0.0205, 0.0679, 0.0991, 0.1284, 0.1495, 0.1346, 0.0998, 0.0731, 0.0415, 0.0332]
|
|
116
116
|
}
|
|
117
|
-
},
|
|
118
|
-
function
|
|
119
|
-
const { c:
|
|
120
|
-
return
|
|
121
|
-
(
|
|
117
|
+
}, he = [1, 0.9791, 0.9577, 0.9007, 0.7857, 0.6501, 0.6028, 0.5383, 0.4389, 0.36, 0.2856, 0.239], we = [0.2127, 0.2401, 0.3133, 0.3673, 0.4198, 0.5093, 0.603, 0.682, 0.7408, 0.8102, 0.8546, 0.9153], xe = 0.02;
|
|
118
|
+
function q(e, r) {
|
|
119
|
+
const { c: a, h: s } = J(e), c = Math.max(...r.C) || 1;
|
|
120
|
+
return r.L.map(
|
|
121
|
+
(o, l) => te({ l: o, c: a * (r.C[l] / c), h: s })
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
const { c:
|
|
126
|
-
return
|
|
127
|
-
const
|
|
128
|
-
return
|
|
124
|
+
function ee(e, r) {
|
|
125
|
+
const { c: a, h: s } = J(e), c = Math.min(a, xe), o = r.length;
|
|
126
|
+
return r.map((l, d) => {
|
|
127
|
+
const n = d / (o - 1), f = 1 - Math.abs(2 * n - 1);
|
|
128
|
+
return te({ l, c: c * f, h: s });
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
let
|
|
133
|
-
for (const
|
|
134
|
-
const
|
|
135
|
-
|
|
131
|
+
function Ye(e, r) {
|
|
132
|
+
let a = e[0], s = 1 / 0;
|
|
133
|
+
for (const c of e) {
|
|
134
|
+
const o = Math.abs(J(c).l - r);
|
|
135
|
+
o < s && (s = o, a = c);
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return a;
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const Se = [
|
|
140
|
+
{ token: "--sa-text-primary", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
141
|
+
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
142
|
+
{ token: "--sa-text-on-brand", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
143
|
+
{ token: "--sa-text-brand", recipe: "var(--sa-color-brand-700, #031f43)", scale: "brand" },
|
|
144
|
+
{ token: "--sa-text-brand-bolder", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
145
|
+
{ token: "--sa-text-brand-hover", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
146
|
+
{ token: "--sa-text-brand-pressed", recipe: "var(--sa-color-brand-800, #021937)", scale: "brand" },
|
|
147
|
+
{ token: "--sa-text-brand-disable", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
148
|
+
{ token: "--sa-text-error", recipe: "var(--sa-color-error-700, #a4133c)", scale: "error" },
|
|
149
|
+
{ token: "--sa-text-error-bolder", recipe: "var(--sa-color-error-900, #590d22)", scale: "error" },
|
|
150
|
+
{ token: "--sa-text-error-hover", recipe: "var(--sa-color-error-900, #590d22)", scale: "error" },
|
|
151
|
+
{ token: "--sa-text-error-pressed", recipe: "var(--sa-color-error-800, #800f2f)", scale: "error" },
|
|
152
|
+
{ token: "--sa-text-error-disable", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
153
|
+
{ token: "--sa-text-success", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
154
|
+
{ token: "--sa-text-success-bolder", recipe: "var(--sa-color-success-900, #10442c)", scale: "success" },
|
|
155
|
+
{ token: "--sa-text-success-hover", recipe: "var(--sa-color-success-900, #10442c)", scale: "success" },
|
|
156
|
+
{ token: "--sa-text-success-pressed", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
157
|
+
{ token: "--sa-text-success-disable", recipe: "var(--sa-color-success-300, #75dead)", scale: "success" },
|
|
158
|
+
{ token: "--sa-text-info", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
159
|
+
{ token: "--sa-text-info-bolder", recipe: "var(--sa-color-info-900, #04334d)", scale: "info" },
|
|
160
|
+
{ token: "--sa-text-info-hover", recipe: "var(--sa-color-info-900, #04334d)", scale: "info" },
|
|
161
|
+
{ token: "--sa-text-info-pressed", recipe: "var(--sa-color-info-800, #00608d)", scale: "info" },
|
|
162
|
+
{ token: "--sa-text-info-disable", recipe: "var(--sa-color-info-300, #75dbff)", scale: "info" },
|
|
163
|
+
{ token: "--sa-text-subtle", recipe: "var(--sa-color-gray-800, #505258)", scale: "gray" },
|
|
164
|
+
{ token: "--sa-text-subtlest", recipe: "var(--sa-color-gray-700, #6b6e76)", scale: "gray" },
|
|
165
|
+
{ token: "--sa-text-hover", recipe: "var(--sa-color-gray-800, #505258)", scale: "gray" },
|
|
166
|
+
{ token: "--sa-text-pressed", recipe: "var(--sa-color-gray-900, #3b3d42)", scale: "gray" },
|
|
167
|
+
{ token: "--sa-text-disable", recipe: "var(--sa-color-black-alpha-a50, #181a1980)", scale: "black" },
|
|
168
|
+
{ token: "--sa-text-bolder", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
169
|
+
{ token: "--sa-text-warning", recipe: "var(--sa-color-warning-700, #5f4013)", scale: "warning" },
|
|
170
|
+
{ token: "--sa-text-warning-bolder", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
171
|
+
{ token: "--sa-text-warning-hover", recipe: "var(--sa-color-warning-900, #241808)", scale: "warning" },
|
|
172
|
+
{ token: "--sa-text-warning-pressed", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
173
|
+
{ token: "--sa-text-warning-disable", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
174
|
+
{ token: "--sa-text-secondary", recipe: "var(--sa-color-secondary-700, #001595)", scale: "secondary" },
|
|
175
|
+
{ token: "--sa-text-secondary-bolder", recipe: "var(--sa-color-secondary-900, #00003c)", scale: "secondary" },
|
|
176
|
+
{ token: "--sa-text-secondary-hover", recipe: "var(--sa-color-secondary-900, #00003c)", scale: "secondary" },
|
|
177
|
+
{ token: "--sa-text-secondary-pressed", recipe: "var(--sa-color-secondary-800, #001174)", scale: "secondary" },
|
|
178
|
+
{ token: "--sa-text-secondary-disable", recipe: "var(--sa-color-secondary-300, #5468e1)", scale: "secondary" },
|
|
179
|
+
{ token: "--sa-icon-primary", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
180
|
+
{ token: "--sa-icon-primary-inverse", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
181
|
+
{ token: "--sa-icon-subtle", recipe: "var(--sa-color-gray-800, #505258)", scale: "gray" },
|
|
182
|
+
{ token: "--sa-icon-subtlest", recipe: "var(--sa-color-gray-700, #6b6e76)", scale: "gray" },
|
|
183
|
+
{ token: "--sa-icon-hover", recipe: "var(--sa-color-gray-800, #505258)", scale: "gray" },
|
|
184
|
+
{ token: "--sa-icon-pressed", recipe: "var(--sa-color-gray-900, #3b3d42)", scale: "gray" },
|
|
185
|
+
{ token: "--sa-icon-disable", recipe: "var(--sa-color-black-alpha-a50, #181a1980)", scale: "black" },
|
|
186
|
+
{ token: "--sa-icon-bolder", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
187
|
+
{ token: "--sa-icon-brand", recipe: "var(--sa-color-brand-700, #031f43)", scale: "brand" },
|
|
188
|
+
{ token: "--sa-icon-brand-bolder", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
189
|
+
{ token: "--sa-icon-brand-hover", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
190
|
+
{ token: "--sa-icon-brand-pressed", recipe: "var(--sa-color-brand-800, #021937)", scale: "brand" },
|
|
191
|
+
{ token: "--sa-icon-brand-disable", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
192
|
+
{ token: "--sa-icon-error", recipe: "var(--sa-color-error-700, #a4133c)", scale: "error" },
|
|
193
|
+
{ token: "--sa-icon-error-bolder", recipe: "var(--sa-color-error-900, #590d22)", scale: "error" },
|
|
194
|
+
{ token: "--sa-icon-error-hover", recipe: "var(--sa-color-error-900, #590d22)", scale: "error" },
|
|
195
|
+
{ token: "--sa-icon-error-pressed", recipe: "var(--sa-color-error-800, #800f2f)", scale: "error" },
|
|
196
|
+
{ token: "--sa-icon-error-disable", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
197
|
+
{ token: "--sa-icon-success", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
198
|
+
{ token: "--sa-icon-success-bolder", recipe: "var(--sa-color-success-900, #10442c)", scale: "success" },
|
|
199
|
+
{ token: "--sa-icon-success-hover", recipe: "var(--sa-color-success-900, #10442c)", scale: "success" },
|
|
200
|
+
{ token: "--sa-icon-success-pressed", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
201
|
+
{ token: "--sa-icon-success-disable", recipe: "var(--sa-color-success-300, #75dead)", scale: "success" },
|
|
202
|
+
{ token: "--sa-icon-info", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
203
|
+
{ token: "--sa-icon-info-bolder", recipe: "var(--sa-color-info-900, #04334d)", scale: "info" },
|
|
204
|
+
{ token: "--sa-icon-info-hover", recipe: "var(--sa-color-info-900, #04334d)", scale: "info" },
|
|
205
|
+
{ token: "--sa-icon-info-pressed", recipe: "var(--sa-color-info-800, #00608d)", scale: "info" },
|
|
206
|
+
{ token: "--sa-icon-info-disable", recipe: "var(--sa-color-info-300, #75dbff)", scale: "info" },
|
|
207
|
+
{ token: "--sa-icon-warning", recipe: "var(--sa-color-warning-700, #5f4013)", scale: "warning" },
|
|
208
|
+
{ token: "--sa-icon-warning-bolder", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
209
|
+
{ token: "--sa-icon-warning-hover", recipe: "var(--sa-color-warning-900, #241808)", scale: "warning" },
|
|
210
|
+
{ token: "--sa-icon-warning-pressed", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
211
|
+
{ token: "--sa-icon-warning-disable", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
212
|
+
{ token: "--sa-icon-secondary", recipe: "var(--sa-color-secondary-700, #001595)", scale: "secondary" },
|
|
213
|
+
{ token: "--sa-icon-secondary-bolder", recipe: "var(--sa-color-secondary-900, #00003c)", scale: "secondary" },
|
|
214
|
+
{ token: "--sa-icon-secondary-hover", recipe: "var(--sa-color-secondary-900, #00003c)", scale: "secondary" },
|
|
215
|
+
{ token: "--sa-icon-secondary-pressed", recipe: "var(--sa-color-secondary-800, #001174)", scale: "secondary" },
|
|
216
|
+
{ token: "--sa-icon-secondary-disable", recipe: "var(--sa-color-secondary-300, #5468e1)", scale: "secondary" },
|
|
217
|
+
{ token: "--sa-icon-brand-selected", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
218
|
+
{ token: "--sa-icon-error-selected", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
219
|
+
{ token: "--sa-icon-success-selected", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
220
|
+
{ token: "--sa-icon-info-selected", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
221
|
+
{ token: "--sa-icon-warning-selected", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
222
|
+
{ token: "--sa-background-primary", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
223
|
+
{ token: "--sa-background-primary-inverse", recipe: "var(--sa-color-gray-100, #f8f8f8)", scale: "gray" },
|
|
224
|
+
{ token: "--sa-background-subtle", recipe: "var(--sa-color-gray-300, #dddee1)", scale: "gray" },
|
|
225
|
+
{ token: "--sa-background-hover", recipe: "var(--sa-color-gray-200, #f0f1f2)", scale: "gray" },
|
|
226
|
+
{ token: "--sa-background-pressed", recipe: "var(--sa-color-gray-300, #dddee1)", scale: "gray" },
|
|
227
|
+
{ token: "--sa-background-disable", recipe: "var(--sa-color-black-alpha-a5, #1717170d)", scale: "black" },
|
|
228
|
+
{ token: "--sa-background-overlay", recipe: "var(--sa-color-black-alpha-a45, #00000073)", scale: "black" },
|
|
229
|
+
{ token: "--sa-background-brand", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
230
|
+
{ token: "--sa-background-brand-hover", recipe: "var(--sa-color-brand-800, #021937)", scale: "brand" },
|
|
231
|
+
{ token: "--sa-background-brand-pressed", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
232
|
+
{ token: "--sa-background-brand-disable", recipe: "var(--sa-color-brand-100, #ccd9ed)", scale: "brand" },
|
|
233
|
+
{ token: "--sa-background-brand-subtle", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
234
|
+
{ token: "--sa-background-brand-subtle-hover", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
235
|
+
{ token: "--sa-background-brand-subtle-pressed", recipe: "var(--sa-color-brand-400, #3366b7)", scale: "brand" },
|
|
236
|
+
{ token: "--sa-background-brand-subtlest", recipe: "var(--sa-color-brand-50, #e6edf6)", scale: "brand" },
|
|
237
|
+
{ token: "--sa-background-error", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
238
|
+
{ token: "--sa-background-error-hover", recipe: "var(--sa-color-error-500, #ff4d6d)", scale: "error" },
|
|
239
|
+
{ token: "--sa-background-error-pressed", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
240
|
+
{ token: "--sa-background-error-disable", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
241
|
+
{ token: "--sa-background-error-subtle", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
242
|
+
{ token: "--sa-background-error-subtle-hover", recipe: "var(--sa-color-error-50, #fff0f3)", scale: "error" },
|
|
243
|
+
{ token: "--sa-background-error-subtlest", recipe: "var(--sa-color-error-50, #fff0f3)", scale: "error" },
|
|
244
|
+
{ token: "--sa-background-error-subtlest-hover", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
245
|
+
{ token: "--sa-background-error-subtlest-pressed", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
246
|
+
{ token: "--sa-background-success", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
247
|
+
{ token: "--sa-background-success-hover", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
248
|
+
{ token: "--sa-background-success-pressed", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
249
|
+
{ token: "--sa-background-success-disable", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
250
|
+
{ token: "--sa-background-success-subtle", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
251
|
+
{ token: "--sa-background-success-subtle-hover", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
252
|
+
{ token: "--sa-background-success-subtlest", recipe: "var(--sa-color-success-50, #ecfff6)", scale: "success" },
|
|
253
|
+
{ token: "--sa-background-success-subtlest-hover", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
254
|
+
{ token: "--sa-background-success-subtlest-pressed", recipe: "var(--sa-color-success-300, #75dead)", scale: "success" },
|
|
255
|
+
{ token: "--sa-background-info", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
256
|
+
{ token: "--sa-background-info-hover", recipe: "var(--sa-color-info-500, #00abeb)", scale: "info" },
|
|
257
|
+
{ token: "--sa-background-info-pressed", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
258
|
+
{ token: "--sa-background-info-disable", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
259
|
+
{ token: "--sa-background-info-subtle", recipe: "var(--sa-color-info-200, #b6eaff)", scale: "info" },
|
|
260
|
+
{ token: "--sa-background-info-subtle-hover", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
261
|
+
{ token: "--sa-background-info-subtlest", recipe: "var(--sa-color-info-50, #effaff)", scale: "info" },
|
|
262
|
+
{ token: "--sa-background-info-subtlest-hover", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
263
|
+
{ token: "--sa-background-info-subtlest-pressed", recipe: "var(--sa-color-info-300, #75dbff)", scale: "info" },
|
|
264
|
+
{ token: "--sa-background-warning", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
265
|
+
{ token: "--sa-background-warning-hover", recipe: "var(--sa-color-warning-500, #d18d2c)", scale: "warning" },
|
|
266
|
+
{ token: "--sa-background-warning-pressed", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
267
|
+
{ token: "--sa-background-warning-disable", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
268
|
+
{ token: "--sa-background-warning-subtle", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
269
|
+
{ token: "--sa-background-warning-subtle-hover", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
270
|
+
{ token: "--sa-background-warning-subtlest", recipe: "var(--sa-color-warning-50, #fef2e6)", scale: "warning" },
|
|
271
|
+
{ token: "--sa-background-warning-subtlest-hover", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
272
|
+
{ token: "--sa-background-warning-subtlest-pressed", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
273
|
+
{ token: "--sa-background-neutral", recipe: "var(--sa-color-gray-200, #f0f1f2)", scale: "gray" },
|
|
274
|
+
{ token: "--sa-background-neutral-hover", recipe: "var(--sa-color-gray-300, #dddee1)", scale: "gray" },
|
|
275
|
+
{ token: "--sa-background-neutral-pressed", recipe: "var(--sa-color-gray-400, #b7b9be)", scale: "gray" },
|
|
276
|
+
{ token: "--sa-background-secondary", recipe: "var(--sa-color-secondary-500, #001ed2)", scale: "secondary" },
|
|
277
|
+
{ token: "--sa-background-secondary-hover", recipe: "var(--sa-color-secondary-600, #001bbf)", scale: "secondary" },
|
|
278
|
+
{ token: "--sa-background-secondary-pressed", recipe: "var(--sa-color-secondary-700, #001595)", scale: "secondary" },
|
|
279
|
+
{ token: "--sa-background-secondary-disable", recipe: "var(--sa-color-secondary-100, #b0b9f1)", scale: "secondary" },
|
|
280
|
+
{ token: "--sa-background-secondary-subtle", recipe: "var(--sa-color-secondary-100, #b0b9f1)", scale: "secondary" },
|
|
281
|
+
{ token: "--sa-border-primary", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
282
|
+
{ token: "--sa-border-primary-inverse", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
283
|
+
{ token: "--sa-border-subtle", recipe: "var(--sa-color-black-alpha-a10, #0515241a)", scale: "black" },
|
|
284
|
+
{ token: "--sa-border-bold", recipe: "var(--sa-color-gray-600, #7d818a)", scale: "gray" },
|
|
285
|
+
{ token: "--sa-border-disabled", recipe: "var(--sa-color-black-alpha-a5, #1717170d)", scale: "black" },
|
|
286
|
+
{ token: "--sa-border-focused", recipe: "var(--sa-color-brand-500, #1a4fa0)", scale: "brand" },
|
|
287
|
+
{ token: "--sa-border-input", recipe: "var(--sa-color-gray-500, #8c8f97)", scale: "gray" },
|
|
288
|
+
{ token: "--sa-border-selected", recipe: "var(--sa-color-brand-700, #031f43)", scale: "brand" },
|
|
289
|
+
{ token: "--sa-border-brand", recipe: "var(--sa-color-brand-700, #031f43)", scale: "brand" },
|
|
290
|
+
{ token: "--sa-border-brand-disable", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
291
|
+
{ token: "--sa-border-danger", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
292
|
+
{ token: "--sa-border-danger-subtle", recipe: "var(--sa-color-error-200, #ffb3c1)", scale: "error" },
|
|
293
|
+
{ token: "--sa-border-danger-disable", recipe: "var(--sa-color-error-200, #ffb3c1)", scale: "error" },
|
|
294
|
+
{ token: "--sa-border-success", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
295
|
+
{ token: "--sa-border-success-subtle", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
296
|
+
{ token: "--sa-border-success-disable", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
297
|
+
{ token: "--sa-border-info", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
298
|
+
{ token: "--sa-border-info-subtle", recipe: "var(--sa-color-info-200, #b6eaff)", scale: "info" },
|
|
299
|
+
{ token: "--sa-border-warning", recipe: "var(--sa-color-warning-700, #5f4013)", scale: "warning" },
|
|
300
|
+
{ token: "--sa-border-warning-subtle", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
301
|
+
{ token: "--sa-accent-primary", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
302
|
+
{ token: "--sa-accent-subtle", recipe: "var(--sa-color-gray-200, #f0f1f2)", scale: "gray" },
|
|
303
|
+
{ token: "--sa-accent-success", recipe: "var(--sa-color-success-700, #208958)", scale: "success" },
|
|
304
|
+
{ token: "--sa-accent-success-subtle", recipe: "var(--sa-color-success-50, #ecfff6)", scale: "success" },
|
|
305
|
+
{ token: "--sa-accent-danger", recipe: "var(--sa-color-error-700, #a4133c)", scale: "error" },
|
|
306
|
+
{ token: "--sa-accent-danger-subtle", recipe: "var(--sa-color-error-50, #fff0f3)", scale: "error" },
|
|
307
|
+
{ token: "--sa-accent-info", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
308
|
+
{ token: "--sa-accent-info-subtle", recipe: "var(--sa-color-info-50, #effaff)", scale: "info" },
|
|
309
|
+
{ token: "--sa-accent-warning", recipe: "var(--sa-color-warning-400, #ed9f30)", scale: "warning" },
|
|
310
|
+
{ token: "--sa-accent-warning-subtle", recipe: "var(--sa-color-warning-50, #fef2e6)", scale: "warning" },
|
|
311
|
+
{ token: "--sa-accent-brand", recipe: "var(--sa-color-amber-500, #f5a524)", scale: "amber" },
|
|
312
|
+
{ token: "--sa-accent-brand-subtle", recipe: "var(--sa-color-amber-50, #fff8eb)", scale: "amber" },
|
|
313
|
+
{ token: "--sa-background-accent", recipe: "var(--sa-color-amber-500, #f5a524)", scale: "amber" },
|
|
314
|
+
{ token: "--sa-background-accent-hover", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
315
|
+
{ token: "--sa-background-accent-pressed", recipe: "var(--sa-color-amber-600, #d4870f)", scale: "amber" },
|
|
316
|
+
{ token: "--sa-background-accent-subtle", recipe: "var(--sa-color-amber-100, #ffefcc)", scale: "amber" },
|
|
317
|
+
{ token: "--sa-background-accent-subtlest", recipe: "var(--sa-color-amber-50, #fff8eb)", scale: "amber" },
|
|
318
|
+
{ token: "--sa-text-accent", recipe: "var(--sa-color-amber-800, #7a4c0a)", scale: "amber" },
|
|
319
|
+
{ token: "--sa-text-on-accent", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
320
|
+
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-700, #a8690b)", scale: "amber" },
|
|
321
|
+
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-500, #f5a524)", scale: "amber" }
|
|
322
|
+
], Ee = [
|
|
323
|
+
{ token: "--sa-text-primary", recipe: "var(--sa-color-dark-1100, #e2e3e4)", scale: "dark" },
|
|
324
|
+
{ token: "--sa-text-primary-inverse", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
325
|
+
{ token: "--sa-text-brand", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
326
|
+
{ token: "--sa-text-brand-bolder", recipe: "var(--sa-color-brand-50, #e6edf6)", scale: "brand" },
|
|
327
|
+
{ token: "--sa-text-brand-hover", recipe: "var(--sa-color-brand-100, #ccd9ed)", scale: "brand" },
|
|
328
|
+
{ token: "--sa-text-brand-pressed", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
329
|
+
{ token: "--sa-text-brand-disable", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
330
|
+
{ token: "--sa-text-error", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
331
|
+
{ token: "--sa-text-error-bolder", recipe: "var(--sa-color-error-50, #fff0f3)", scale: "error" },
|
|
332
|
+
{ token: "--sa-text-error-hover", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
333
|
+
{ token: "--sa-text-error-pressed", recipe: "var(--sa-color-error-200, #ffb3c1)", scale: "error" },
|
|
334
|
+
{ token: "--sa-text-error-disable", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
335
|
+
{ token: "--sa-text-success", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
336
|
+
{ token: "--sa-text-success-bolder", recipe: "var(--sa-color-success-50, #ecfff6)", scale: "success" },
|
|
337
|
+
{ token: "--sa-text-success-hover", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
338
|
+
{ token: "--sa-text-success-pressed", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
339
|
+
{ token: "--sa-text-success-disable", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
340
|
+
{ token: "--sa-text-info", recipe: "var(--sa-color-info-300, #75dbff)", scale: "info" },
|
|
341
|
+
{ token: "--sa-text-info-bolder", recipe: "var(--sa-color-info-50, #effaff)", scale: "info" },
|
|
342
|
+
{ token: "--sa-text-info-hover", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
343
|
+
{ token: "--sa-text-info-pressed", recipe: "var(--sa-color-info-200, #b6eaff)", scale: "info" },
|
|
344
|
+
{ token: "--sa-text-info-disable", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
345
|
+
{ token: "--sa-text-subtle", recipe: "var(--sa-color-gray-500, #8c8f97)", scale: "gray" },
|
|
346
|
+
{ token: "--sa-text-subtlest", recipe: "var(--sa-color-gray-600, #7d818a)", scale: "gray" },
|
|
347
|
+
{ token: "--sa-text-hover", recipe: "var(--sa-color-dark-400, #4b4d51)", scale: "dark" },
|
|
348
|
+
{ token: "--sa-text-pressed", recipe: "var(--sa-color-dark-200, #303134)", scale: "dark" },
|
|
349
|
+
{ token: "--sa-text-disable", recipe: "var(--sa-color-white-alpha-a20, #ceced933)", scale: "white" },
|
|
350
|
+
{ token: "--sa-text-bolder", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
351
|
+
{ token: "--sa-text-warning", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
352
|
+
{ token: "--sa-text-warning-bolder", recipe: "var(--sa-color-warning-50, #fef2e6)", scale: "warning" },
|
|
353
|
+
{ token: "--sa-text-warning-hover", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
354
|
+
{ token: "--sa-text-warning-pressed", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
355
|
+
{ token: "--sa-text-warning-disable", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
356
|
+
{ token: "--sa-text-secondary", recipe: "var(--sa-color-secondary-300, #5468e1)", scale: "secondary" },
|
|
357
|
+
{ token: "--sa-text-secondary-bolder", recipe: "var(--sa-color-secondary-50, #e6e9fb)", scale: "secondary" },
|
|
358
|
+
{ token: "--sa-text-secondary-hover", recipe: "var(--sa-color-secondary-100, #b0b9f1)", scale: "secondary" },
|
|
359
|
+
{ token: "--sa-text-secondary-pressed", recipe: "var(--sa-color-secondary-200, #8a98ea)", scale: "secondary" },
|
|
360
|
+
{ token: "--sa-text-secondary-disable", recipe: "var(--sa-color-secondary-600, #001bbf)", scale: "secondary" },
|
|
361
|
+
{ token: "--sa-icon-primary", recipe: "var(--sa-color-dark-1100, #e2e3e4)", scale: "dark" },
|
|
362
|
+
{ token: "--sa-icon-primary-inverse", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
363
|
+
{ token: "--sa-icon-subtle", recipe: "var(--sa-color-gray-500, #8c8f97)", scale: "gray" },
|
|
364
|
+
{ token: "--sa-icon-subtlest", recipe: "var(--sa-color-gray-600, #7d818a)", scale: "gray" },
|
|
365
|
+
{ token: "--sa-icon-hover", recipe: "var(--sa-color-dark-900, #bfc1c4)", scale: "dark" },
|
|
366
|
+
{ token: "--sa-icon-pressed", recipe: "var(--sa-color-dark-1000, #cecfd2)", scale: "dark" },
|
|
367
|
+
{ token: "--sa-icon-disable", recipe: "var(--sa-color-white-alpha-a50, #e3e4f280)", scale: "white" },
|
|
368
|
+
{ token: "--sa-icon-bolder", recipe: "var(--sa-color-gray-50, #ffffff)", scale: "gray" },
|
|
369
|
+
{ token: "--sa-icon-brand", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
370
|
+
{ token: "--sa-icon-brand-bolder", recipe: "var(--sa-color-brand-50, #e6edf6)", scale: "brand" },
|
|
371
|
+
{ token: "--sa-icon-brand-hover", recipe: "var(--sa-color-brand-100, #ccd9ed)", scale: "brand" },
|
|
372
|
+
{ token: "--sa-icon-brand-pressed", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
373
|
+
{ token: "--sa-icon-brand-disable", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
374
|
+
{ token: "--sa-icon-error", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
375
|
+
{ token: "--sa-icon-error-bolder", recipe: "var(--sa-color-error-50, #fff0f3)", scale: "error" },
|
|
376
|
+
{ token: "--sa-icon-error-hover", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
377
|
+
{ token: "--sa-icon-error-pressed", recipe: "var(--sa-color-error-200, #ffb3c1)", scale: "error" },
|
|
378
|
+
{ token: "--sa-icon-error-disable", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
379
|
+
{ token: "--sa-icon-success", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
380
|
+
{ token: "--sa-icon-success-bolder", recipe: "var(--sa-color-success-50, #ecfff6)", scale: "success" },
|
|
381
|
+
{ token: "--sa-icon-success-hover", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
382
|
+
{ token: "--sa-icon-success-pressed", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
383
|
+
{ token: "--sa-icon-success-disable", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
384
|
+
{ token: "--sa-icon-info", recipe: "var(--sa-color-info-300, #75dbff)", scale: "info" },
|
|
385
|
+
{ token: "--sa-icon-info-bolder", recipe: "var(--sa-color-info-50, #effaff)", scale: "info" },
|
|
386
|
+
{ token: "--sa-icon-info-hover", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
387
|
+
{ token: "--sa-icon-info-pressed", recipe: "var(--sa-color-info-200, #b6eaff)", scale: "info" },
|
|
388
|
+
{ token: "--sa-icon-info-disable", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
389
|
+
{ token: "--sa-icon-warning", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
390
|
+
{ token: "--sa-icon-warning-bolder", recipe: "var(--sa-color-warning-50, #fef2e6)", scale: "warning" },
|
|
391
|
+
{ token: "--sa-icon-warning-hover", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
392
|
+
{ token: "--sa-icon-warning-pressed", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
393
|
+
{ token: "--sa-icon-warning-disable", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
394
|
+
{ token: "--sa-icon-secondary", recipe: "var(--sa-color-secondary-300, #5468e1)", scale: "secondary" },
|
|
395
|
+
{ token: "--sa-icon-secondary-bolder", recipe: "var(--sa-color-secondary-50, #e6e9fb)", scale: "secondary" },
|
|
396
|
+
{ token: "--sa-icon-secondary-hover", recipe: "var(--sa-color-secondary-100, #b0b9f1)", scale: "secondary" },
|
|
397
|
+
{ token: "--sa-icon-secondary-pressed", recipe: "var(--sa-color-secondary-200, #8a98ea)", scale: "secondary" },
|
|
398
|
+
{ token: "--sa-icon-secondary-disable", recipe: "var(--sa-color-secondary-600, #001bbf)", scale: "secondary" },
|
|
399
|
+
{ token: "--sa-icon-brand-selected", recipe: "var(--sa-color-brand-400, #3366b7)", scale: "brand" },
|
|
400
|
+
{ token: "--sa-icon-error-selected", recipe: "var(--sa-color-error-400, #ff758f)", scale: "error" },
|
|
401
|
+
{ token: "--sa-icon-success-selected", recipe: "var(--sa-color-success-400, #52d698)", scale: "success" },
|
|
402
|
+
{ token: "--sa-icon-info-selected", recipe: "var(--sa-color-info-400, #2ccaff)", scale: "info" },
|
|
403
|
+
{ token: "--sa-icon-warning-selected", recipe: "var(--sa-color-warning-400, #ed9f30)", scale: "warning" },
|
|
404
|
+
{ token: "--sa-background-primary", recipe: "var(--sa-color-gray-1100, #1e1f21)", scale: "gray" },
|
|
405
|
+
{ token: "--sa-background-primary-inverse", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
406
|
+
{ token: "--sa-background-subtle", recipe: "var(--sa-color-dark-200, #303134)", scale: "dark" },
|
|
407
|
+
{ token: "--sa-background-hover", recipe: "var(--sa-color-gray-1000, #292a2e)", scale: "gray" },
|
|
408
|
+
{ token: "--sa-background-pressed", recipe: "var(--sa-color-gray-900, #3b3d42)", scale: "gray" },
|
|
409
|
+
{ token: "--sa-background-disable", recipe: "var(--sa-color-white-alpha-a5, #bdbdbd0d)", scale: "white" },
|
|
410
|
+
{ token: "--sa-background-overlay", recipe: "var(--sa-color-black-alpha-a45, #00000073)", scale: "black" },
|
|
411
|
+
{ token: "--sa-background-brand", recipe: "#3b6fe0", scale: null },
|
|
412
|
+
{ token: "--sa-background-brand-hover", recipe: "#5581e8", scale: null },
|
|
413
|
+
{ token: "--sa-background-brand-pressed", recipe: "#2f5ad2", scale: null },
|
|
414
|
+
{ token: "--sa-background-brand-disable", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
415
|
+
{ token: "--sa-background-brand-subtle", recipe: "var(--sa-color-brand-400, #3366b7)", scale: "brand" },
|
|
416
|
+
{ token: "--sa-background-brand-subtle-hover", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
417
|
+
{ token: "--sa-background-brand-subtle-pressed", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
418
|
+
{ token: "--sa-background-brand-subtlest", recipe: "var(--sa-color-brand-900, #02132b)", scale: "brand" },
|
|
419
|
+
{ token: "--sa-background-error", recipe: "var(--sa-color-error-500, #ff4d6d)", scale: "error" },
|
|
420
|
+
{ token: "--sa-background-error-hover", recipe: "var(--sa-color-error-100, #ffccd5)", scale: "error" },
|
|
421
|
+
{ token: "--sa-background-error-pressed", recipe: "var(--sa-color-error-300, #ff8fa3)", scale: "error" },
|
|
422
|
+
{ token: "--sa-background-error-disable", recipe: "var(--sa-color-error-800, #800f2f)", scale: "error" },
|
|
423
|
+
{ token: "--sa-background-error-subtle", recipe: "var(--sa-color-error-800, #800f2f)", scale: "error" },
|
|
424
|
+
{ token: "--sa-background-error-subtle-hover", recipe: "var(--sa-color-error-700, #a4133c)", scale: "error" },
|
|
425
|
+
{ token: "--sa-background-error-subtlest", recipe: "var(--sa-color-error-900, #590d22)", scale: "error" },
|
|
426
|
+
{ token: "--sa-background-error-subtlest-hover", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
427
|
+
{ token: "--sa-background-error-subtlest-pressed", recipe: "var(--sa-color-error-500, #ff4d6d)", scale: "error" },
|
|
428
|
+
{ token: "--sa-background-success", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
429
|
+
{ token: "--sa-background-success-hover", recipe: "var(--sa-color-success-100, #baeed6)", scale: "success" },
|
|
430
|
+
{ token: "--sa-background-success-pressed", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
431
|
+
{ token: "--sa-background-success-disable", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
432
|
+
{ token: "--sa-background-success-subtle", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
433
|
+
{ token: "--sa-background-success-subtle-hover", recipe: "var(--sa-color-success-700, #208958)", scale: "success" },
|
|
434
|
+
{ token: "--sa-background-success-subtlest", recipe: "var(--sa-color-success-900, #10442c)", scale: "success" },
|
|
435
|
+
{ token: "--sa-background-success-subtlest-hover", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
436
|
+
{ token: "--sa-background-success-subtlest-pressed", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
437
|
+
{ token: "--sa-background-info", recipe: "var(--sa-color-info-500, #00abeb)", scale: "info" },
|
|
438
|
+
{ token: "--sa-background-info-hover", recipe: "var(--sa-color-info-100, #def3ff)", scale: "info" },
|
|
439
|
+
{ token: "--sa-background-info-pressed", recipe: "var(--sa-color-info-200, #b6eaff)", scale: "info" },
|
|
440
|
+
{ token: "--sa-background-info-disable", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
441
|
+
{ token: "--sa-background-info-subtle", recipe: "var(--sa-color-info-800, #00608d)", scale: "info" },
|
|
442
|
+
{ token: "--sa-background-info-subtle-hover", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
443
|
+
{ token: "--sa-background-info-subtlest", recipe: "var(--sa-color-info-900, #04334d)", scale: "info" },
|
|
444
|
+
{ token: "--sa-background-info-subtlest-hover", recipe: "var(--sa-color-info-600, #0090d4)", scale: "info" },
|
|
445
|
+
{ token: "--sa-background-info-subtlest-pressed", recipe: "var(--sa-color-info-500, #00abeb)", scale: "info" },
|
|
446
|
+
{ token: "--sa-background-warning", recipe: "var(--sa-color-warning-300, #f1b259)", scale: "warning" },
|
|
447
|
+
{ token: "--sa-background-warning-hover", recipe: "var(--sa-color-warning-100, #f8d9ac)", scale: "warning" },
|
|
448
|
+
{ token: "--sa-background-warning-pressed", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
449
|
+
{ token: "--sa-background-warning-disable", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
450
|
+
{ token: "--sa-background-warning-subtle", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
451
|
+
{ token: "--sa-background-warning-subtle-hover", recipe: "var(--sa-color-warning-700, #5f4013)", scale: "warning" },
|
|
452
|
+
{ token: "--sa-background-warning-subtlest", recipe: "var(--sa-color-warning-900, #241808)", scale: "warning" },
|
|
453
|
+
{ token: "--sa-background-warning-subtlest-hover", recipe: "var(--sa-color-warning-600, #8e5f1d)", scale: "warning" },
|
|
454
|
+
{ token: "--sa-background-warning-subtlest-pressed", recipe: "var(--sa-color-warning-500, #d18d2c)", scale: "warning" },
|
|
455
|
+
{ token: "--sa-background-neutral", recipe: "var(--sa-color-gray-900, #3b3d42)", scale: "gray" },
|
|
456
|
+
{ token: "--sa-background-neutral-hover", recipe: "var(--sa-color-gray-800, #505258)", scale: "gray" },
|
|
457
|
+
{ token: "--sa-background-neutral-pressed", recipe: "var(--sa-color-gray-700, #6b6e76)", scale: "gray" },
|
|
458
|
+
{ token: "--sa-background-secondary", recipe: "var(--sa-color-secondary-600, #001bbf)", scale: "secondary" },
|
|
459
|
+
{ token: "--sa-background-secondary-hover", recipe: "var(--sa-color-secondary-300, #5468e1)", scale: "secondary" },
|
|
460
|
+
{ token: "--sa-background-secondary-pressed", recipe: "var(--sa-color-secondary-200, #8a98ea)", scale: "secondary" },
|
|
461
|
+
{ token: "--sa-background-secondary-disable", recipe: "var(--sa-color-secondary-600, #001bbf)", scale: "secondary" },
|
|
462
|
+
{ token: "--sa-background-secondary-subtle", recipe: "var(--sa-color-secondary-800, #001174)", scale: "secondary" },
|
|
463
|
+
{ token: "--sa-border-primary", recipe: "var(--sa-color-white-alpha-a20, #ceced933)", scale: "white" },
|
|
464
|
+
{ token: "--sa-border-primary-inverse", recipe: "var(--sa-color-dark-400, #4b4d51)", scale: "dark" },
|
|
465
|
+
{ token: "--sa-border-subtle", recipe: "var(--sa-color-white-alpha-a10, #bdbdbd1a)", scale: "white" },
|
|
466
|
+
{ token: "--sa-border-bold", recipe: "var(--sa-color-dark-500, #63666b)", scale: "dark" },
|
|
467
|
+
{ token: "--sa-border-disabled", recipe: "var(--sa-color-white-alpha-a5, #bdbdbd0d)", scale: "white" },
|
|
468
|
+
{ token: "--sa-border-focused", recipe: "var(--sa-color-brand-300, #668cc9)", scale: "brand" },
|
|
469
|
+
{ token: "--sa-border-input", recipe: "var(--sa-color-dark-500, #63666b)", scale: "dark" },
|
|
470
|
+
{ token: "--sa-border-selected", recipe: "var(--sa-color-brand-400, #3366b7)", scale: "brand" },
|
|
471
|
+
{ token: "--sa-border-brand", recipe: "var(--sa-color-brand-400, #3366b7)", scale: "brand" },
|
|
472
|
+
{ token: "--sa-border-brand-disable", recipe: "var(--sa-color-brand-600, #04254f)", scale: "brand" },
|
|
473
|
+
{ token: "--sa-border-danger", recipe: "var(--sa-color-error-500, #ff4d6d)", scale: "error" },
|
|
474
|
+
{ token: "--sa-border-danger-subtle", recipe: "var(--sa-color-error-700, #a4133c)", scale: "error" },
|
|
475
|
+
{ token: "--sa-border-danger-disable", recipe: "var(--sa-color-error-600, #c9184a)", scale: "error" },
|
|
476
|
+
{ token: "--sa-border-success", recipe: "var(--sa-color-success-500, #30ce84)", scale: "success" },
|
|
477
|
+
{ token: "--sa-border-success-subtle", recipe: "var(--sa-color-success-700, #208958)", scale: "success" },
|
|
478
|
+
{ token: "--sa-border-success-disable", recipe: "var(--sa-color-success-600, #28ac6e)", scale: "success" },
|
|
479
|
+
{ token: "--sa-border-info", recipe: "var(--sa-color-info-500, #00abeb)", scale: "info" },
|
|
480
|
+
{ token: "--sa-border-info-subtle", recipe: "var(--sa-color-info-700, #0073ab)", scale: "info" },
|
|
481
|
+
{ token: "--sa-border-warning", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
482
|
+
{ token: "--sa-border-warning-subtle", recipe: "var(--sa-color-warning-700, #5f4013)", scale: "warning" },
|
|
483
|
+
{ token: "--sa-accent-primary", recipe: "var(--sa-color-gray-100, #f8f8f8)", scale: "gray" },
|
|
484
|
+
{ token: "--sa-accent-subtle", recipe: "var(--sa-color-dark-200, #303134)", scale: "dark" },
|
|
485
|
+
{ token: "--sa-accent-success", recipe: "var(--sa-color-success-200, #97e6c1)", scale: "success" },
|
|
486
|
+
{ token: "--sa-accent-success-subtle", recipe: "var(--sa-color-success-800, #186742)", scale: "success" },
|
|
487
|
+
{ token: "--sa-accent-danger", recipe: "var(--sa-color-error-200, #ffb3c1)", scale: "error" },
|
|
488
|
+
{ token: "--sa-accent-danger-subtle", recipe: "var(--sa-color-error-800, #800f2f)", scale: "error" },
|
|
489
|
+
{ token: "--sa-accent-info", recipe: "var(--sa-color-brand-200, #99b3db)", scale: "brand" },
|
|
490
|
+
{ token: "--sa-accent-info-subtle", recipe: "var(--sa-color-info-800, #00608d)", scale: "info" },
|
|
491
|
+
{ token: "--sa-accent-warning", recipe: "var(--sa-color-warning-200, #f4c583)", scale: "warning" },
|
|
492
|
+
{ token: "--sa-accent-warning-subtle", recipe: "var(--sa-color-warning-800, #2f200a)", scale: "warning" },
|
|
493
|
+
{ token: "--sa-accent-brand", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
494
|
+
{ token: "--sa-accent-brand-subtle", recipe: "var(--sa-color-amber-900, #4d3008)", scale: "amber" },
|
|
495
|
+
{ token: "--sa-background-accent-subtle", recipe: "var(--sa-color-amber-800, #7a4c0a)", scale: "amber" },
|
|
496
|
+
{ token: "--sa-background-accent-subtlest", recipe: "var(--sa-color-amber-900, #4d3008)", scale: "amber" },
|
|
497
|
+
{ token: "--sa-text-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
498
|
+
{ token: "--sa-icon-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
|
|
499
|
+
{ token: "--sa-border-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" }
|
|
500
|
+
], Me = ["--sa-background-brand", "--sa-background-brand-hover", "--sa-background-brand-pressed"], ze = {
|
|
140
501
|
name: "starasia",
|
|
141
502
|
brand: "#1a4fa0",
|
|
142
503
|
neutral: "#7d818a",
|
|
@@ -146,49 +507,115 @@ const E0 = {
|
|
|
146
507
|
warning: "#ed9f30",
|
|
147
508
|
radius: 8,
|
|
148
509
|
font: { body: "Inter" }
|
|
149
|
-
},
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
|
|
510
|
+
}, re = '-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"', Ce = 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', m = (e) => Math.round(e * 10) / 10;
|
|
511
|
+
function R(e, r, a, s) {
|
|
512
|
+
s.forEach((c, o) => {
|
|
513
|
+
e[`--sa-color-${r}-${c}`] = a[o];
|
|
153
514
|
});
|
|
154
515
|
}
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
const
|
|
158
|
-
if (a
|
|
159
|
-
|
|
160
|
-
|
|
516
|
+
function Ae(e, r = {}) {
|
|
517
|
+
var k, p, y;
|
|
518
|
+
const a = r.as ?? "root";
|
|
519
|
+
if (a === "skin" && !r.name)
|
|
520
|
+
throw new Error('buildTheme: options.name wajib saat as:"skin"');
|
|
521
|
+
const s = a === "skin" ? `[data-skin="${r.name}"]` : r.selector ?? ":root", c = r.darkPrimary ?? !0, o = {}, l = {}, d = { brand: [] }, n = /* @__PURE__ */ new Set(["brand"]), f = q(e.brand, Z.brand);
|
|
522
|
+
if (d.brand = f, R(o, "brand", f, V), o["--sa-text-on-brand"] = Q(f[6]), ["error", "success", "info", "warning"].forEach((b) => {
|
|
523
|
+
const v = e[b];
|
|
524
|
+
if (!v)
|
|
161
525
|
return;
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
}),
|
|
165
|
-
const
|
|
166
|
-
|
|
526
|
+
const u = q(v, Z[b]);
|
|
527
|
+
d[b] = u, R(o, b, u, V), n.add(b);
|
|
528
|
+
}), e.neutral) {
|
|
529
|
+
const b = ee(e.neutral, he), v = ee(e.neutral, we);
|
|
530
|
+
d.gray = b, d.dark = v, R(o, "gray", b, X), R(o, "dark", v, X), n.add("gray"), n.add("dark");
|
|
167
531
|
}
|
|
168
|
-
if (typeof
|
|
169
|
-
const
|
|
170
|
-
o["--sa-radii-xs"] = `${
|
|
532
|
+
if (typeof e.radius == "number") {
|
|
533
|
+
const b = e.radius;
|
|
534
|
+
o["--sa-radii-xs"] = `${m(b * 0.5)}px`, o["--sa-radii-sm"] = `${m(b * 0.75)}px`, o["--sa-radii-md"] = `${m(b)}px`, o["--sa-radii-lg"] = `${m(b * 1.5)}px`, o["--sa-radii-xl"] = `${m(b * 1.75)}px`, o["--sa-radii-2xl"] = `${m(b * 2)}px`, o["--sa-radii-rounded"] = `${m(b)}px`;
|
|
171
535
|
}
|
|
172
|
-
if ((
|
|
173
|
-
const
|
|
174
|
-
|
|
536
|
+
if ((k = e.font) != null && k.body && (o["--sa-font-family"] = `"${e.font.body}", ${re}`), (p = e.font) != null && p.heading && (o["--sa-font-family-heading"] = `"${e.font.heading}", ${re}`), (y = e.font) != null && y.mono && (o["--sa-font-family-mono"] = `"${e.font.mono}", ${Ce}`), c) {
|
|
537
|
+
const b = f[4];
|
|
538
|
+
l["--sa-background-brand"] = b, l["--sa-background-brand-hover"] = f[3], l["--sa-background-brand-pressed"] = f[5], l["--sa-text-on-brand"] = Q(b);
|
|
175
539
|
}
|
|
176
|
-
return { css:
|
|
540
|
+
return { css: a === "skin" ? _e(s, o, l, n) : Le(s, o, l), rootTokens: o, darkTokens: l, ramps: d };
|
|
177
541
|
}
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return
|
|
181
|
-
${
|
|
542
|
+
function D(e, r) {
|
|
543
|
+
const a = Object.entries(r).map(([s, c]) => ` ${s}: ${c};`);
|
|
544
|
+
return a.length ? `${e} {
|
|
545
|
+
${a.join(`
|
|
182
546
|
`)}
|
|
183
547
|
}` : "";
|
|
184
548
|
}
|
|
185
|
-
function
|
|
186
|
-
const
|
|
187
|
-
return [
|
|
549
|
+
function Le(e, r, a) {
|
|
550
|
+
const s = e === ":root" ? '[data-theme="dark"]' : `${e}[data-theme="dark"], ${e} [data-theme="dark"]`;
|
|
551
|
+
return [D(e, r), D(s, a)].filter(Boolean).join(`
|
|
552
|
+
|
|
553
|
+
`);
|
|
554
|
+
}
|
|
555
|
+
function _e(e, r, a, s) {
|
|
556
|
+
const c = {};
|
|
557
|
+
for (const n of Se)
|
|
558
|
+
n.scale && s.has(n.scale) && n.token !== "--sa-text-on-brand" && (c[n.token] = n.recipe);
|
|
559
|
+
const o = {};
|
|
560
|
+
for (const n of Ee)
|
|
561
|
+
n.scale && s.has(n.scale) && n.token !== "--sa-text-on-brand" && !Me.includes(n.token) && (o[n.token] = n.recipe);
|
|
562
|
+
const l = { ...r, ...c }, d = { ...o, ...a };
|
|
563
|
+
return [D(e, l), D(`${e}[data-theme="dark"]`, d)].filter(Boolean).join(`
|
|
188
564
|
|
|
189
565
|
`);
|
|
190
566
|
}
|
|
191
|
-
const
|
|
567
|
+
const C = "sa-theme";
|
|
568
|
+
function $(e = C) {
|
|
569
|
+
try {
|
|
570
|
+
if (typeof localStorage > "u")
|
|
571
|
+
return null;
|
|
572
|
+
const r = localStorage.getItem(e);
|
|
573
|
+
return r ? JSON.parse(r) : null;
|
|
574
|
+
} catch {
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
function Re(e, r = C) {
|
|
579
|
+
try {
|
|
580
|
+
if (typeof localStorage > "u")
|
|
581
|
+
return;
|
|
582
|
+
localStorage.setItem(r, JSON.stringify(e));
|
|
583
|
+
} catch {
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function $e(e = C) {
|
|
587
|
+
try {
|
|
588
|
+
if (typeof localStorage > "u")
|
|
589
|
+
return;
|
|
590
|
+
localStorage.removeItem(e);
|
|
591
|
+
} catch {
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
function De(e) {
|
|
595
|
+
if (e === "system")
|
|
596
|
+
try {
|
|
597
|
+
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
598
|
+
} catch {
|
|
599
|
+
return "light";
|
|
600
|
+
}
|
|
601
|
+
return e;
|
|
602
|
+
}
|
|
603
|
+
function F(e) {
|
|
604
|
+
if (typeof document > "u")
|
|
605
|
+
return;
|
|
606
|
+
const r = document.documentElement;
|
|
607
|
+
De(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
|
|
608
|
+
}
|
|
609
|
+
function ae(e) {
|
|
610
|
+
if (typeof document > "u")
|
|
611
|
+
return;
|
|
612
|
+
const r = document.documentElement;
|
|
613
|
+
e ? r.setAttribute("data-skin", e) : r.removeAttribute("data-skin");
|
|
614
|
+
}
|
|
615
|
+
function Ge(e = C) {
|
|
616
|
+
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
|
+
}
|
|
618
|
+
const Ne = {
|
|
192
619
|
raw: {
|
|
193
620
|
white: {
|
|
194
621
|
900: "255, 255, 255"
|
|
@@ -287,7 +714,7 @@ const l0 = {
|
|
|
287
714
|
tertiary: "230, 237, 246"
|
|
288
715
|
}
|
|
289
716
|
}
|
|
290
|
-
},
|
|
717
|
+
}, Ie = {
|
|
291
718
|
radii: {
|
|
292
719
|
none: "0",
|
|
293
720
|
xs: "0.25rem",
|
|
@@ -345,7 +772,7 @@ const l0 = {
|
|
|
345
772
|
inner: "inset 0 2px 4px 0 #0000000d",
|
|
346
773
|
card: "0px 4px 35px 0px #7090b040"
|
|
347
774
|
}
|
|
348
|
-
},
|
|
775
|
+
}, Oe = {
|
|
349
776
|
fontSizes: {
|
|
350
777
|
xs: "0.625rem",
|
|
351
778
|
sm: "0.75rem",
|
|
@@ -385,142 +812,339 @@ const l0 = {
|
|
|
385
812
|
relaxed: 1.625,
|
|
386
813
|
loose: 2
|
|
387
814
|
}
|
|
388
|
-
},
|
|
389
|
-
colors:
|
|
390
|
-
metrics:
|
|
391
|
-
font:
|
|
392
|
-
},
|
|
815
|
+
}, le = {
|
|
816
|
+
colors: Ne,
|
|
817
|
+
metrics: Ie,
|
|
818
|
+
font: Oe
|
|
819
|
+
}, Y = de({
|
|
393
820
|
theme: void 0,
|
|
394
821
|
setTheme: () => {
|
|
822
|
+
},
|
|
823
|
+
seed: null,
|
|
824
|
+
setSeed: () => {
|
|
825
|
+
},
|
|
826
|
+
setMode: () => {
|
|
827
|
+
},
|
|
828
|
+
setSkin: () => {
|
|
829
|
+
},
|
|
830
|
+
resetTheme: () => {
|
|
395
831
|
}
|
|
396
|
-
}),
|
|
397
|
-
function
|
|
398
|
-
const
|
|
399
|
-
return
|
|
400
|
-
}
|
|
401
|
-
var
|
|
402
|
-
const
|
|
403
|
-
function
|
|
404
|
-
if (!
|
|
832
|
+
}), je = "sa-theme-style", H = "sa-theme-seed-style";
|
|
833
|
+
function Be(e) {
|
|
834
|
+
const r = e.split(",").map((a) => Number(a.trim()));
|
|
835
|
+
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
|
+
}
|
|
837
|
+
var oe, ce;
|
|
838
|
+
const Fe = ((ce = (oe = le.colors) == null ? void 0 : oe.raw) == null ? void 0 : ce.blue) ?? {}, se = (e) => (e ?? "").replace(/\s+/g, "");
|
|
839
|
+
function He(e) {
|
|
840
|
+
if (!e)
|
|
405
841
|
return "";
|
|
406
|
-
const
|
|
407
|
-
([
|
|
408
|
-
).map(([
|
|
409
|
-
const
|
|
410
|
-
return
|
|
842
|
+
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]) => se(c) !== se(Fe[s])
|
|
844
|
+
).map(([s, c]) => {
|
|
845
|
+
const o = Be(c);
|
|
846
|
+
return o ? ` --sa-color-brand-${s}: ${o};` : "";
|
|
411
847
|
}).filter(Boolean).join(`
|
|
412
848
|
`);
|
|
413
|
-
return
|
|
414
|
-
${
|
|
849
|
+
return a ? `:root {
|
|
850
|
+
${a}
|
|
415
851
|
}` : "";
|
|
416
852
|
}
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
|
|
853
|
+
function We({
|
|
854
|
+
value: e,
|
|
855
|
+
seed: r,
|
|
856
|
+
persist: a = !0,
|
|
857
|
+
storageKey: s = C,
|
|
858
|
+
manageAttributes: c = !1,
|
|
859
|
+
children: o
|
|
860
|
+
}) {
|
|
861
|
+
const [l, d] = M(e), n = r !== void 0, [f, h] = M(() => {
|
|
862
|
+
if (n)
|
|
863
|
+
return r;
|
|
864
|
+
if (a) {
|
|
865
|
+
const i = $(s);
|
|
866
|
+
if (i != null && i.seed)
|
|
867
|
+
return i.seed;
|
|
868
|
+
}
|
|
869
|
+
return null;
|
|
870
|
+
}), k = n ? r : f, p = T(
|
|
871
|
+
() => k ? JSON.stringify(k) : "",
|
|
872
|
+
[k]
|
|
873
|
+
);
|
|
874
|
+
_(() => {
|
|
420
875
|
if (typeof document > "u")
|
|
421
876
|
return;
|
|
422
|
-
if (!
|
|
423
|
-
const
|
|
424
|
-
|
|
877
|
+
if (!p) {
|
|
878
|
+
const t = document.getElementById(H);
|
|
879
|
+
t && (t.textContent = "");
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
const { css: i } = Ae(JSON.parse(p));
|
|
883
|
+
fe(i, H);
|
|
884
|
+
}, [p]), _(() => {
|
|
885
|
+
var t;
|
|
886
|
+
if (!c || !a)
|
|
425
887
|
return;
|
|
888
|
+
const i = $(s);
|
|
889
|
+
if (i && (i.mode && F(i.mode), i.skin !== void 0 && ae(i.skin), i.mode === "system" && typeof window < "u")) {
|
|
890
|
+
const g = window.matchMedia("(prefers-color-scheme: dark)"), S = () => F("system");
|
|
891
|
+
return (t = g.addEventListener) == null || t.call(g, "change", S), () => {
|
|
892
|
+
var z;
|
|
893
|
+
return (z = g.removeEventListener) == null ? void 0 : z.call(g, "change", S);
|
|
894
|
+
};
|
|
426
895
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
g(() => {
|
|
438
|
-
var d, i;
|
|
439
|
-
c.current || (c.current = V(f0));
|
|
440
|
-
const l = c.current;
|
|
441
|
-
if (!l)
|
|
896
|
+
}, [c, a, s]);
|
|
897
|
+
const y = T(
|
|
898
|
+
() => l ? JSON.stringify(l) : "",
|
|
899
|
+
[l]
|
|
900
|
+
), b = be(null);
|
|
901
|
+
_(() => {
|
|
902
|
+
var g, S;
|
|
903
|
+
b.current || (b.current = ue(je));
|
|
904
|
+
const i = b.current;
|
|
905
|
+
if (!i)
|
|
442
906
|
return;
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
}, [
|
|
446
|
-
|
|
907
|
+
const t = y ? JSON.parse(y) : void 0;
|
|
908
|
+
i.textContent = t ? He((S = (g = t == null ? void 0 : t.colors) == null ? void 0 : g.raw) == null ? void 0 : S.blue) : "";
|
|
909
|
+
}, [y]), _(() => () => {
|
|
910
|
+
b.current && (b.current.textContent = "");
|
|
447
911
|
}, []);
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
912
|
+
const v = (i) => {
|
|
913
|
+
i && d(i);
|
|
914
|
+
}, u = E(
|
|
915
|
+
(i) => {
|
|
916
|
+
if (!a)
|
|
917
|
+
return;
|
|
918
|
+
const t = $(s) || {};
|
|
919
|
+
Re({ ...t, ...i }, s);
|
|
920
|
+
},
|
|
921
|
+
[a, s]
|
|
922
|
+
), I = E(
|
|
923
|
+
(i) => {
|
|
924
|
+
n || (h(i), u({ seed: i }));
|
|
925
|
+
},
|
|
926
|
+
[n, u]
|
|
927
|
+
), O = E(
|
|
928
|
+
(i) => {
|
|
929
|
+
F(i), u({ mode: i });
|
|
930
|
+
},
|
|
931
|
+
[u]
|
|
932
|
+
), A = E(
|
|
933
|
+
(i) => {
|
|
934
|
+
ae(i), u({ skin: i });
|
|
935
|
+
},
|
|
936
|
+
[u]
|
|
937
|
+
), L = E(() => {
|
|
938
|
+
if (n || h(null), $e(s), typeof document < "u") {
|
|
939
|
+
const i = document.getElementById(H);
|
|
940
|
+
i && (i.textContent = "");
|
|
941
|
+
}
|
|
942
|
+
}, [n, s]);
|
|
943
|
+
return /* @__PURE__ */ w(
|
|
944
|
+
Y.Provider,
|
|
945
|
+
{
|
|
946
|
+
value: {
|
|
947
|
+
theme: l,
|
|
948
|
+
setTheme: v,
|
|
949
|
+
seed: k,
|
|
950
|
+
setSeed: I,
|
|
951
|
+
setMode: O,
|
|
952
|
+
setSkin: A,
|
|
953
|
+
resetTheme: L
|
|
954
|
+
},
|
|
955
|
+
children: o
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
const Pe = [
|
|
960
|
+
{ name: null, label: "Default" },
|
|
961
|
+
{ name: "tech", label: "Tech" }
|
|
962
|
+
], Te = [
|
|
963
|
+
{ value: "light", label: "Light" },
|
|
964
|
+
{ value: "dark", label: "Dark" },
|
|
965
|
+
{ value: "system", label: "System" }
|
|
966
|
+
];
|
|
967
|
+
function Ke({
|
|
968
|
+
skins: e = Pe,
|
|
969
|
+
showMode: r = !0,
|
|
970
|
+
allowCustom: a = !1,
|
|
971
|
+
storageKey: s,
|
|
972
|
+
className: c,
|
|
973
|
+
style: o
|
|
974
|
+
}) {
|
|
975
|
+
var i;
|
|
976
|
+
const { setMode: l, setSkin: d, setSeed: n } = ne(Y), f = typeof window < "u" ? $(s) : null, [h, k] = M(
|
|
977
|
+
(f == null ? void 0 : f.mode) ?? (typeof document < "u" && document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light")
|
|
978
|
+
), [p, y] = M(
|
|
979
|
+
(f == null ? void 0 : f.skin) ?? (typeof document < "u" ? document.documentElement.getAttribute("data-skin") : null)
|
|
980
|
+
), [b, v] = M(((i = f == null ? void 0 : f.seed) == null ? void 0 : i.brand) ?? "#1a4fa0"), u = (t) => {
|
|
981
|
+
k(t), l(t);
|
|
982
|
+
}, I = (t) => {
|
|
983
|
+
y(t), d(t);
|
|
984
|
+
}, O = (t) => {
|
|
985
|
+
v(t), n({ brand: t });
|
|
986
|
+
}, A = {
|
|
987
|
+
display: "inline-flex",
|
|
988
|
+
gap: 4,
|
|
989
|
+
padding: 4,
|
|
990
|
+
borderRadius: "var(--sa-radii-md)",
|
|
991
|
+
background: "var(--sa-background-neutral)"
|
|
992
|
+
}, L = (t) => ({
|
|
993
|
+
border: "none",
|
|
994
|
+
cursor: "pointer",
|
|
995
|
+
fontSize: 12,
|
|
996
|
+
fontWeight: 500,
|
|
997
|
+
padding: "4px 10px",
|
|
998
|
+
borderRadius: "var(--sa-radii-sm)",
|
|
999
|
+
background: t ? "var(--sa-background-primary)" : "transparent",
|
|
1000
|
+
color: t ? "var(--sa-text-primary)" : "var(--sa-text-subtle)",
|
|
1001
|
+
boxShadow: t ? "var(--sa-shadow-sm)" : "none"
|
|
1002
|
+
});
|
|
1003
|
+
return /* @__PURE__ */ G(
|
|
1004
|
+
"div",
|
|
1005
|
+
{
|
|
1006
|
+
className: c,
|
|
1007
|
+
style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...o },
|
|
1008
|
+
children: [
|
|
1009
|
+
r && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Mode", style: A, children: Te.map((t) => /* @__PURE__ */ w(
|
|
1010
|
+
"button",
|
|
1011
|
+
{
|
|
1012
|
+
type: "button",
|
|
1013
|
+
"aria-pressed": h === t.value,
|
|
1014
|
+
style: L(h === t.value),
|
|
1015
|
+
onClick: () => u(t.value),
|
|
1016
|
+
children: t.label
|
|
1017
|
+
},
|
|
1018
|
+
t.value
|
|
1019
|
+
)) }),
|
|
1020
|
+
e.length > 0 && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((t) => /* @__PURE__ */ w(
|
|
1021
|
+
"button",
|
|
1022
|
+
{
|
|
1023
|
+
type: "button",
|
|
1024
|
+
"aria-pressed": p === t.name,
|
|
1025
|
+
style: L(p === t.name),
|
|
1026
|
+
onClick: () => I(t.name),
|
|
1027
|
+
children: t.label
|
|
1028
|
+
},
|
|
1029
|
+
t.name ?? "default"
|
|
1030
|
+
)) }),
|
|
1031
|
+
a && /* @__PURE__ */ G(
|
|
1032
|
+
"label",
|
|
1033
|
+
{
|
|
1034
|
+
style: {
|
|
1035
|
+
display: "inline-flex",
|
|
1036
|
+
alignItems: "center",
|
|
1037
|
+
gap: 6,
|
|
1038
|
+
fontSize: 12,
|
|
1039
|
+
color: "var(--sa-text-subtle)"
|
|
1040
|
+
},
|
|
1041
|
+
children: [
|
|
1042
|
+
"Brand",
|
|
1043
|
+
/* @__PURE__ */ w(
|
|
1044
|
+
"input",
|
|
1045
|
+
{
|
|
1046
|
+
type: "color",
|
|
1047
|
+
value: b,
|
|
1048
|
+
onChange: (t) => O(t.target.value),
|
|
1049
|
+
"aria-label": "Custom brand color",
|
|
1050
|
+
style: {
|
|
1051
|
+
width: 28,
|
|
1052
|
+
height: 28,
|
|
1053
|
+
border: "1px solid var(--sa-border-subtle)",
|
|
1054
|
+
borderRadius: 6,
|
|
1055
|
+
background: "none",
|
|
1056
|
+
cursor: "pointer",
|
|
1057
|
+
padding: 0
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
)
|
|
1061
|
+
]
|
|
1062
|
+
}
|
|
1063
|
+
)
|
|
1064
|
+
]
|
|
1065
|
+
}
|
|
1066
|
+
);
|
|
1067
|
+
}
|
|
1068
|
+
const P = le, ie = (e, r) => {
|
|
1069
|
+
const a = {};
|
|
1070
|
+
return Object.keys(e).forEach((s) => {
|
|
1071
|
+
if (e != null && e[s] && typeof (e == null ? void 0 : e[s]) == "object") {
|
|
1072
|
+
a[s] = {
|
|
1073
|
+
...e == null ? void 0 : e[s],
|
|
1074
|
+
...r == null ? void 0 : r[s],
|
|
1075
|
+
...ie(e == null ? void 0 : e[s], r == null ? void 0 : r[s])
|
|
461
1076
|
};
|
|
462
1077
|
return;
|
|
463
1078
|
}
|
|
464
|
-
|
|
465
|
-
}),
|
|
1079
|
+
a[s] = (r == null ? void 0 : r[s]) || (e == null ? void 0 : e[s]);
|
|
1080
|
+
}), a;
|
|
466
1081
|
};
|
|
467
|
-
function
|
|
468
|
-
const
|
|
1082
|
+
function N() {
|
|
1083
|
+
const e = ne(Y), r = T(
|
|
469
1084
|
() => ({
|
|
470
|
-
...
|
|
471
|
-
...
|
|
472
|
-
...
|
|
1085
|
+
...P,
|
|
1086
|
+
...e.theme,
|
|
1087
|
+
...ie(P, e.theme)
|
|
473
1088
|
}),
|
|
474
|
-
[
|
|
1089
|
+
[e.theme, P]
|
|
475
1090
|
);
|
|
476
|
-
return { ...
|
|
1091
|
+
return { ...e, theme: r };
|
|
477
1092
|
}
|
|
478
|
-
function
|
|
479
|
-
const { theme:
|
|
480
|
-
return
|
|
1093
|
+
function Qe() {
|
|
1094
|
+
const { theme: e } = N();
|
|
1095
|
+
return e.colors;
|
|
481
1096
|
}
|
|
482
|
-
function
|
|
483
|
-
var
|
|
484
|
-
const { theme:
|
|
485
|
-
return (
|
|
1097
|
+
function Ve() {
|
|
1098
|
+
var r;
|
|
1099
|
+
const { theme: e } = N();
|
|
1100
|
+
return (r = e.metrics) == null ? void 0 : r.spacing;
|
|
486
1101
|
}
|
|
487
|
-
function
|
|
488
|
-
var
|
|
489
|
-
const { theme:
|
|
490
|
-
return (
|
|
1102
|
+
function Xe() {
|
|
1103
|
+
var r;
|
|
1104
|
+
const { theme: e } = N();
|
|
1105
|
+
return (r = e.metrics) == null ? void 0 : r.radii;
|
|
491
1106
|
}
|
|
492
|
-
function
|
|
493
|
-
var
|
|
494
|
-
const { theme:
|
|
495
|
-
return (
|
|
1107
|
+
function Ze() {
|
|
1108
|
+
var r;
|
|
1109
|
+
const { theme: e } = N();
|
|
1110
|
+
return (r = e == null ? void 0 : e.metrics) == null ? void 0 : r.shadows;
|
|
496
1111
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
1112
|
+
function qe(e) {
|
|
1113
|
+
return e;
|
|
499
1114
|
}
|
|
500
1115
|
export {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
1116
|
+
C as DEFAULT_STORAGE_KEY,
|
|
1117
|
+
Z as LADDERS,
|
|
1118
|
+
we as NEUTRAL_LADDER_DARK,
|
|
1119
|
+
he as NEUTRAL_LADDER_GRAY,
|
|
1120
|
+
ze as SA_DEFAULT_SEED,
|
|
1121
|
+
V as SCALE_KEYS_10,
|
|
1122
|
+
X as SCALE_KEYS_12,
|
|
1123
|
+
Y as ThemeContext,
|
|
1124
|
+
We as ThemeProvider,
|
|
1125
|
+
Ke as ThemeSwitcher,
|
|
1126
|
+
F as applyMode,
|
|
1127
|
+
ae as applySkin,
|
|
1128
|
+
Ae as buildTheme,
|
|
1129
|
+
$e as clearPref,
|
|
1130
|
+
me as contrastRatio,
|
|
1131
|
+
qe as createTheme,
|
|
1132
|
+
J as hexToOklch,
|
|
1133
|
+
U as hexToRgb,
|
|
1134
|
+
ee as neutralRamp,
|
|
1135
|
+
te as oklchToHex,
|
|
1136
|
+
Ye as pickByLightness,
|
|
1137
|
+
Q as pickTextOn,
|
|
1138
|
+
q as rampFromSeed,
|
|
1139
|
+
$ as readPref,
|
|
1140
|
+
De as resolveMode,
|
|
1141
|
+
ke as rgbToHex,
|
|
1142
|
+
ge as rgbToOklch,
|
|
1143
|
+
Ge as themeBootScript,
|
|
1144
|
+
Qe as useColor,
|
|
1145
|
+
Xe as useRadius,
|
|
1146
|
+
Ze as useShadow,
|
|
1147
|
+
Ve as useSpacing,
|
|
1148
|
+
N as useTheme,
|
|
1149
|
+
Re as writePref
|
|
526
1150
|
};
|