@starasia/theme 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,99 +1,99 @@
1
- import { jsx as y, jsxs as z } from "react/jsx-runtime";
2
- import { createContext as d0, useState as v, useMemo as U, useEffect as L, useRef as u0, useCallback as M, useContext as s0 } from "react";
3
- const m0 = (t, e) => {
1
+ import { jsx as w, jsxs as G } from "react/jsx-runtime";
2
+ import { createContext as de, useState as M, useMemo as U, 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 n = document.getElementById(e);
7
- if (n)
8
- n.textContent = t;
6
+ const a = document.getElementById(r);
7
+ if (a)
8
+ a.textContent = e;
9
9
  else {
10
- const r = document.createElement("style");
11
- r.id = e, r.textContent = t, document.head.appendChild(r);
10
+ const s = document.createElement("style");
11
+ s.id = r, s.textContent = e, document.head.appendChild(s);
12
12
  }
13
- }, f0 = (t) => {
13
+ }, ue = (e) => {
14
14
  if (typeof document > "u")
15
15
  return null;
16
- const e = document.getElementById(t);
17
- if (e)
18
- return e;
19
- const n = document.createElement("style");
20
- return n.id = t, document.head.appendChild(n), n;
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 H(t) {
23
- let e = t.trim().replace(/^#/, "");
24
- e.length === 3 && (e = e.split("").map((r) => r + r).join("")), e.length === 8 && (e = e.slice(0, 6));
25
- const n = parseInt(e, 16);
22
+ function J(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: (n >> 16 & 255) / 255,
28
- g: (n >> 8 & 255) / 255,
29
- b: (n & 255) / 255
27
+ r: (a >> 16 & 255) / 255,
28
+ g: (a >> 8 & 255) / 255,
29
+ b: (a & 255) / 255
30
30
  };
31
31
  }
32
- const I = (t) => Math.max(0, Math.min(255, Math.round(t * 255))).toString(16).padStart(2, "0");
33
- function p0({ r: t, g: e, b: n }) {
34
- return `#${I(t)}${I(e)}${I(n)}`;
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 k = (t) => t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4), j = (t) => t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055;
37
- function b0(t, e, n) {
38
- const r = 0.4122214708 * t + 0.5363325363 * e + 0.0514459929 * n, o = 0.2119034982 * t + 0.6806995451 * e + 0.1073969566 * n, a = 0.0883024619 * t + 0.2817188376 * e + 0.6299787005 * n, i = Math.cbrt(r), l = Math.cbrt(o), u = Math.cbrt(a);
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, t = Math.cbrt(s), d = Math.cbrt(c), l = Math.cbrt(o);
39
39
  return {
40
- L: 0.2104542553 * i + 0.793617785 * l - 0.0040720468 * u,
41
- a: 1.9779984951 * i - 2.428592205 * l + 0.4505937099 * u,
42
- b: 0.0259040371 * i + 0.7827717662 * l - 0.808675766 * u
40
+ L: 0.2104542553 * t + 0.793617785 * d - 0.0040720468 * l,
41
+ a: 1.9779984951 * t - 2.428592205 * d + 0.4505937099 * l,
42
+ b: 0.0259040371 * t + 0.7827717662 * d - 0.808675766 * l
43
43
  };
44
44
  }
45
- function h0(t, e, n) {
46
- const r = t + 0.3963377774 * e + 0.2158037573 * n, o = t - 0.1055613458 * e - 0.0638541728 * n, a = t - 0.0894841775 * e - 1.291485548 * n, i = r * r * r, l = o * o * o, u = a * a * a;
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, t = s * s * s, d = c * c * c, l = o * o * o;
47
47
  return {
48
- r: 4.0767416621 * i - 3.3077115913 * l + 0.2309699292 * u,
49
- g: -1.2684380046 * i + 2.6097574011 * l - 0.3413193965 * u,
50
- b: -0.0041960863 * i - 0.7034186147 * l + 1.707614701 * u
48
+ r: 4.0767416621 * t - 3.3077115913 * d + 0.2309699292 * l,
49
+ g: -1.2684380046 * t + 2.6097574011 * d - 0.3413193965 * l,
50
+ b: -0.0041960863 * t - 0.7034186147 * d + 1.707614701 * l
51
51
  };
52
52
  }
53
- function x0({ r: t, g: e, b: n }) {
54
- const { L: r, a: o, b: a } = b0(
55
- k(t),
56
- k(e),
57
- k(n)
58
- ), i = Math.sqrt(o * o + a * a);
59
- let l = Math.atan2(a, o) * 180 / Math.PI;
60
- return l < 0 && (l += 360), { l: r, c: i, h: l };
61
- }
62
- const J = (t) => x0(H(t)), G = ({ r: t, g: e, b: n }, r = 1e-4) => t >= -r && t <= 1 + r && e >= -r && e <= 1 + r && n >= -r && n <= 1 + r;
63
- function g0({ l: t, c: e, h: n }) {
64
- const r = n * Math.PI / 180, o = (i) => h0(t, i * Math.cos(r), i * Math.sin(r));
65
- let a = o(e);
66
- if (!G(a)) {
67
- let i = 0, l = e;
68
- for (let u = 0; u < 20; u++) {
69
- const m = (i + l) / 2;
70
- a = o(m), G(a) ? i = m : l = m;
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
+ ), t = 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: t, h: d };
61
+ }
62
+ const T = (e) => ge(J(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 = (t) => ve(e, t * Math.cos(s), t * Math.sin(s));
65
+ let o = c(r);
66
+ if (!W(o)) {
67
+ let t = 0, d = r;
68
+ for (let l = 0; l < 20; l++) {
69
+ const f = (t + d) / 2;
70
+ o = c(f), W(o) ? t = f : d = f;
71
71
  }
72
- a = o(i);
72
+ o = c(t);
73
73
  }
74
74
  return {
75
- r: Math.min(1, Math.max(0, j(a.r))),
76
- g: Math.min(1, Math.max(0, j(a.g))),
77
- b: Math.min(1, Math.max(0, j(a.b)))
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 c0 = (t) => p0(g0(t));
81
- function W({ r: t, g: e, b: n }) {
82
- return 0.2126 * k(t) + 0.7152 * k(e) + 0.0722 * k(n);
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 S0(t, e) {
85
- const n = W(H(t)), r = W(H(e)), o = Math.max(n, r), a = Math.min(n, r);
86
- return (o + 0.05) / (a + 0.05);
84
+ function me(e, r) {
85
+ const a = K(J(e)), s = K(J(r)), c = Math.max(a, s), o = Math.min(a, s);
86
+ return (c + 0.05) / (o + 0.05);
87
87
  }
88
- function K(t, e = ["#ffffff", "#1e1f21"]) {
89
- let n = e[0], r = -1;
90
- for (const o of e) {
91
- const a = S0(t, o);
92
- a > r && (r = a, n = o);
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 n;
94
+ return a;
95
95
  }
96
- const Q = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], V = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1100"], X = {
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 Q = ["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
- }, y0 = [1, 0.9791, 0.9577, 0.9007, 0.7857, 0.6501, 0.6028, 0.5383, 0.4389, 0.36, 0.2856, 0.239], k0 = [0.2127, 0.2401, 0.3133, 0.3673, 0.4198, 0.5093, 0.603, 0.682, 0.7408, 0.8102, 0.8546, 0.9153], E0 = 0.02;
118
- function Z(t, e) {
119
- const { c: n, h: r } = J(t), o = Math.max(...e.C) || 1;
120
- return e.L.map(
121
- (a, i) => c0({ l: a, c: n * (e.C[i] / o), h: r })
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 } = T(e), c = Math.max(...r.C) || 1;
120
+ return r.L.map(
121
+ (o, t) => te({ l: o, c: a * (r.C[t] / c), h: s })
122
122
  );
123
123
  }
124
- function q(t, e) {
125
- const { c: n, h: r } = J(t), o = Math.min(n, E0), a = e.length;
126
- return e.map((i, l) => {
127
- const u = l / (a - 1), m = 1 - Math.abs(2 * u - 1);
128
- return c0({ l: i, c: o * m, h: r });
124
+ function ee(e, r) {
125
+ const { c: a, h: s } = T(e), c = Math.min(a, xe), o = r.length;
126
+ return r.map((t, d) => {
127
+ const l = d / (o - 1), f = 1 - Math.abs(2 * l - 1);
128
+ return te({ l: t, c: c * f, h: s });
129
129
  });
130
130
  }
131
- function U0(t, e) {
132
- let n = t[0], r = 1 / 0;
133
- for (const o of t) {
134
- const a = Math.abs(J(o).l - e);
135
- a < r && (r = a, n = o);
131
+ function Te(e, r) {
132
+ let a = e[0], s = 1 / 0;
133
+ for (const c of e) {
134
+ const o = Math.abs(T(c).l - r);
135
+ o < s && (s = o, a = c);
136
136
  }
137
- return n;
137
+ return a;
138
138
  }
139
- const H0 = {
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
+ ], Ye = {
140
501
  name: "starasia",
141
502
  brand: "#1a4fa0",
142
503
  neutral: "#7d818a",
@@ -146,100 +507,115 @@ const H0 = {
146
507
  warning: "#ed9f30",
147
508
  radius: 8,
148
509
  font: { body: "Inter" }
149
- }, t0 = '-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"', M0 = 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', S = (t) => Math.round(t * 10) / 10;
150
- function _(t, e, n, r) {
151
- r.forEach((o, a) => {
152
- t[`--sa-color-${e}-${o}`] = n[a];
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"', Me = 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', m = (e) => Math.round(e * 10) / 10;
511
+ function $(e, r, a, s) {
512
+ s.forEach((c, o) => {
513
+ e[`--sa-color-${r}-${c}`] = a[o];
153
514
  });
154
515
  }
155
- function v0(t, e = {}) {
156
- var m, x, b;
157
- const n = e.selector ?? ":root", r = e.darkPrimary ?? !0, o = {}, a = {}, i = { brand: [] }, l = Z(t.brand, X.brand);
158
- if (i.brand = l, _(o, "brand", l, Q), o["--sa-text-on-brand"] = K(l[6]), ["error", "success", "info", "warning"].forEach((d) => {
159
- const f = t[d];
160
- if (!f)
516
+ function Ce(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 = {}, t = {}, d = { brand: [] }, l = /* @__PURE__ */ new Set(["brand"]), f = q(e.brand, Z.brand);
522
+ if (d.brand = f, $(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 p = Z(f, X[d]);
163
- i[d] = p, _(o, d, p, Q);
164
- }), t.neutral) {
165
- const d = q(t.neutral, y0), f = q(t.neutral, k0);
166
- i.gray = d, i.dark = f, _(o, "gray", d, V), _(o, "dark", f, V);
526
+ const u = q(v, Z[b]);
527
+ d[b] = u, $(o, b, u, V), l.add(b);
528
+ }), e.neutral) {
529
+ const b = ee(e.neutral, he), v = ee(e.neutral, we);
530
+ d.gray = b, d.dark = v, $(o, "gray", b, X), $(o, "dark", v, X), l.add("gray"), l.add("dark");
167
531
  }
168
- if (typeof t.radius == "number") {
169
- const d = t.radius;
170
- o["--sa-radii-xs"] = `${S(d * 0.5)}px`, o["--sa-radii-sm"] = `${S(d * 0.75)}px`, o["--sa-radii-md"] = `${S(d)}px`, o["--sa-radii-lg"] = `${S(d * 1.5)}px`, o["--sa-radii-xl"] = `${S(d * 1.75)}px`, o["--sa-radii-2xl"] = `${S(d * 2)}px`, o["--sa-radii-rounded"] = `${S(d)}px`;
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 ((m = t.font) != null && m.body && (o["--sa-font-family"] = `"${t.font.body}", ${t0}`), (x = t.font) != null && x.heading && (o["--sa-font-family-heading"] = `"${t.font.heading}", ${t0}`), (b = t.font) != null && b.mono && (o["--sa-font-family-mono"] = `"${t.font.mono}", ${M0}`), r) {
173
- const d = l[4];
174
- a["--sa-background-brand"] = d, a["--sa-background-brand-hover"] = l[3], a["--sa-background-brand-pressed"] = l[5], a["--sa-text-on-brand"] = K(d);
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}", ${Me}`), c) {
537
+ const b = f[4];
538
+ t["--sa-background-brand"] = b, t["--sa-background-brand-hover"] = f[3], t["--sa-background-brand-pressed"] = f[5], t["--sa-text-on-brand"] = Q(b);
175
539
  }
176
- return { css: C0(n, o, a), rootTokens: o, darkTokens: a, ramps: i };
540
+ return { css: a === "skin" ? Le(s, o, t, l) : Ae(s, o, t), rootTokens: o, darkTokens: t, ramps: d };
177
541
  }
178
- function e0(t, e) {
179
- const n = Object.entries(e).map(([r, o]) => ` ${r}: ${o};`);
180
- return n.length ? `${t} {
181
- ${n.join(`
542
+ function N(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 C0(t, e, n) {
186
- const r = t === ":root" ? '[data-theme="dark"]' : `${t}[data-theme="dark"], ${t} [data-theme="dark"]`;
187
- return [e0(t, e), e0(r, n)].filter(Boolean).join(`
549
+ function Ae(e, r, a) {
550
+ const s = e === ":root" ? '[data-theme="dark"]' : `${e}[data-theme="dark"], ${e} [data-theme="dark"]`;
551
+ return [N(e, r), N(s, a)].filter(Boolean).join(`
552
+
553
+ `);
554
+ }
555
+ function Le(e, r, a, s) {
556
+ const c = {};
557
+ for (const l of Se)
558
+ l.scale && s.has(l.scale) && l.token !== "--sa-text-on-brand" && (c[l.token] = l.recipe);
559
+ const o = { ...r, ...c }, t = {};
560
+ for (const l of Ee)
561
+ (l.scale && s.has(l.scale) || l.token in o) && (t[l.token] = l.recipe);
562
+ const d = { ...t, ...a };
563
+ return [N(e, o), N(`${e}[data-theme="dark"]`, d)].filter(Boolean).join(`
188
564
 
189
565
  `);
190
566
  }
191
567
  const C = "sa-theme";
192
- function $(t = C) {
568
+ function R(e = C) {
193
569
  try {
194
570
  if (typeof localStorage > "u")
195
571
  return null;
196
- const e = localStorage.getItem(t);
197
- return e ? JSON.parse(e) : null;
572
+ const r = localStorage.getItem(e);
573
+ return r ? JSON.parse(r) : null;
198
574
  } catch {
199
575
  return null;
200
576
  }
201
577
  }
202
- function w0(t, e = C) {
578
+ function _e(e, r = C) {
203
579
  try {
204
580
  if (typeof localStorage > "u")
205
581
  return;
206
- localStorage.setItem(e, JSON.stringify(t));
582
+ localStorage.setItem(r, JSON.stringify(e));
207
583
  } catch {
208
584
  }
209
585
  }
210
- function A0(t = C) {
586
+ function $e(e = C) {
211
587
  try {
212
588
  if (typeof localStorage > "u")
213
589
  return;
214
- localStorage.removeItem(t);
590
+ localStorage.removeItem(e);
215
591
  } catch {
216
592
  }
217
593
  }
218
- function L0(t) {
219
- if (t === "system")
594
+ function Re(e) {
595
+ if (e === "system")
220
596
  try {
221
597
  return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
222
598
  } catch {
223
599
  return "light";
224
600
  }
225
- return t;
601
+ return e;
226
602
  }
227
- function B(t) {
603
+ function F(e) {
228
604
  if (typeof document > "u")
229
605
  return;
230
- const e = document.documentElement;
231
- L0(t) === "dark" ? e.setAttribute("data-theme", "dark") : e.removeAttribute("data-theme");
606
+ const r = document.documentElement;
607
+ Re(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
232
608
  }
233
- function n0(t) {
609
+ function ae(e) {
234
610
  if (typeof document > "u")
235
611
  return;
236
- const e = document.documentElement;
237
- t ? e.setAttribute("data-skin", t) : e.removeAttribute("data-skin");
612
+ const r = document.documentElement;
613
+ e ? r.setAttribute("data-skin", e) : r.removeAttribute("data-skin");
238
614
  }
239
- function J0(t = C) {
240
- return "(function(){try{var p=JSON.parse(localStorage.getItem(" + JSON.stringify(t) + ")||'{}');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){}})();";
615
+ function ze(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){}})();";
241
617
  }
242
- const _0 = {
618
+ const Ne = {
243
619
  raw: {
244
620
  white: {
245
621
  900: "255, 255, 255"
@@ -338,7 +714,7 @@ const _0 = {
338
714
  tertiary: "230, 237, 246"
339
715
  }
340
716
  }
341
- }, $0 = {
717
+ }, De = {
342
718
  radii: {
343
719
  none: "0",
344
720
  xs: "0.25rem",
@@ -396,7 +772,7 @@ const _0 = {
396
772
  inner: "inset 0 2px 4px 0 #0000000d",
397
773
  card: "0px 4px 35px 0px #7090b040"
398
774
  }
399
- }, R0 = {
775
+ }, Ie = {
400
776
  fontSizes: {
401
777
  xs: "0.625rem",
402
778
  sm: "0.75rem",
@@ -436,11 +812,11 @@ const _0 = {
436
812
  relaxed: 1.625,
437
813
  loose: 2
438
814
  }
439
- }, i0 = {
440
- colors: _0,
441
- metrics: $0,
442
- font: R0
443
- }, T = d0({
815
+ }, le = {
816
+ colors: Ne,
817
+ metrics: De,
818
+ font: Ie
819
+ }, Y = de({
444
820
  theme: void 0,
445
821
  setTheme: () => {
446
822
  },
@@ -453,206 +829,206 @@ const _0 = {
453
829
  },
454
830
  resetTheme: () => {
455
831
  }
456
- }), D0 = "sa-theme-style", F = "sa-theme-seed-style";
457
- function N0(t) {
458
- const e = t.split(",").map((n) => Number(n.trim()));
459
- return e.length !== 3 || e.some((n) => !Number.isFinite(n) || n < 0 || n > 255) ? null : "#" + e.map((n) => Math.round(n).toString(16).padStart(2, "0")).join("");
460
- }
461
- var o0, a0;
462
- const O0 = ((a0 = (o0 = i0.colors) == null ? void 0 : o0.raw) == null ? void 0 : a0.blue) ?? {}, r0 = (t) => (t ?? "").replace(/\s+/g, "");
463
- function I0(t) {
464
- if (!t)
832
+ }), Oe = "sa-theme-style", H = "sa-theme-seed-style";
833
+ function je(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 Be = ((ce = (oe = le.colors) == null ? void 0 : oe.raw) == null ? void 0 : ce.blue) ?? {}, se = (e) => (e ?? "").replace(/\s+/g, "");
839
+ function Fe(e) {
840
+ if (!e)
465
841
  return "";
466
- const e = /* @__PURE__ */ new Set(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n = Object.entries(t).filter(([r]) => e.has(r)).filter(
467
- ([r, o]) => r0(o) !== r0(O0[r])
468
- ).map(([r, o]) => {
469
- const a = N0(o);
470
- return a ? ` --sa-color-brand-${r}: ${a};` : "";
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(Be[s])
844
+ ).map(([s, c]) => {
845
+ const o = je(c);
846
+ return o ? ` --sa-color-brand-${s}: ${o};` : "";
471
847
  }).filter(Boolean).join(`
472
848
  `);
473
- return n ? `:root {
474
- ${n}
849
+ return a ? `:root {
850
+ ${a}
475
851
  }` : "";
476
852
  }
477
- function T0({
478
- value: t,
479
- seed: e,
480
- persist: n = !0,
481
- storageKey: r = C,
482
- manageAttributes: o = !1,
483
- children: a
853
+ function Ge({
854
+ value: e,
855
+ seed: r,
856
+ persist: a = !0,
857
+ storageKey: s = C,
858
+ manageAttributes: c = !1,
859
+ children: o
484
860
  }) {
485
- const [i, l] = v(t), u = e !== void 0, [m, x] = v(() => {
486
- if (u)
487
- return e;
488
- if (n) {
489
- const c = $(r);
490
- if (c != null && c.seed)
491
- return c.seed;
861
+ const [t, d] = M(e), l = r !== void 0, [f, h] = M(() => {
862
+ if (l)
863
+ return r;
864
+ if (a) {
865
+ const i = R(s);
866
+ if (i != null && i.seed)
867
+ return i.seed;
492
868
  }
493
869
  return null;
494
- }), b = u ? e : m, d = U(
495
- () => b ? JSON.stringify(b) : "",
496
- [b]
870
+ }), k = l ? r : f, p = U(
871
+ () => k ? JSON.stringify(k) : "",
872
+ [k]
497
873
  );
498
- L(() => {
874
+ _(() => {
499
875
  if (typeof document > "u")
500
876
  return;
501
- if (!d) {
502
- const s = document.getElementById(F);
503
- s && (s.textContent = "");
877
+ if (!p) {
878
+ const n = document.getElementById(H);
879
+ n && (n.textContent = "");
504
880
  return;
505
881
  }
506
- const { css: c } = v0(JSON.parse(d));
507
- m0(c, F);
508
- }, [d]), L(() => {
509
- var s;
510
- if (!o || !n)
882
+ const { css: i } = Ce(JSON.parse(p));
883
+ fe(i, H);
884
+ }, [p]), _(() => {
885
+ var n;
886
+ if (!c || !a)
511
887
  return;
512
- const c = $(r);
513
- if (c && (c.mode && B(c.mode), c.skin !== void 0 && n0(c.skin), c.mode === "system" && typeof window < "u")) {
514
- const h = window.matchMedia("(prefers-color-scheme: dark)"), E = () => B("system");
515
- return (s = h.addEventListener) == null || s.call(h, "change", E), () => {
516
- var Y;
517
- return (Y = h.removeEventListener) == null ? void 0 : Y.call(h, "change", E);
888
+ const i = R(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 (n = g.addEventListener) == null || n.call(g, "change", S), () => {
892
+ var z;
893
+ return (z = g.removeEventListener) == null ? void 0 : z.call(g, "change", S);
518
894
  };
519
895
  }
520
- }, [o, n, r]);
521
- const f = U(
522
- () => i ? JSON.stringify(i) : "",
523
- [i]
524
- ), p = u0(null);
525
- L(() => {
526
- var h, E;
527
- p.current || (p.current = f0(D0));
528
- const c = p.current;
529
- if (!c)
896
+ }, [c, a, s]);
897
+ const y = U(
898
+ () => t ? JSON.stringify(t) : "",
899
+ [t]
900
+ ), b = be(null);
901
+ _(() => {
902
+ var g, S;
903
+ b.current || (b.current = ue(Oe));
904
+ const i = b.current;
905
+ if (!i)
530
906
  return;
531
- const s = f ? JSON.parse(f) : void 0;
532
- c.textContent = s ? I0((E = (h = s == null ? void 0 : s.colors) == null ? void 0 : h.raw) == null ? void 0 : E.blue) : "";
533
- }, [f]), L(() => () => {
534
- p.current && (p.current.textContent = "");
907
+ const n = y ? JSON.parse(y) : void 0;
908
+ i.textContent = n ? Fe((S = (g = n == null ? void 0 : n.colors) == null ? void 0 : g.raw) == null ? void 0 : S.blue) : "";
909
+ }, [y]), _(() => () => {
910
+ b.current && (b.current.textContent = "");
535
911
  }, []);
536
- const D = (c) => {
537
- c && l(c);
538
- }, g = M(
539
- (c) => {
540
- if (!n)
912
+ const v = (i) => {
913
+ i && d(i);
914
+ }, u = E(
915
+ (i) => {
916
+ if (!a)
541
917
  return;
542
- const s = $(r) || {};
543
- w0({ ...s, ...c }, r);
918
+ const n = R(s) || {};
919
+ _e({ ...n, ...i }, s);
544
920
  },
545
- [n, r]
546
- ), N = M(
547
- (c) => {
548
- u || (x(c), g({ seed: c }));
921
+ [a, s]
922
+ ), I = E(
923
+ (i) => {
924
+ l || (h(i), u({ seed: i }));
549
925
  },
550
- [u, g]
551
- ), O = M(
552
- (c) => {
553
- B(c), g({ mode: c });
926
+ [l, u]
927
+ ), O = E(
928
+ (i) => {
929
+ F(i), u({ mode: i });
554
930
  },
555
- [g]
556
- ), w = M(
557
- (c) => {
558
- n0(c), g({ skin: c });
931
+ [u]
932
+ ), A = E(
933
+ (i) => {
934
+ ae(i), u({ skin: i });
559
935
  },
560
- [g]
561
- ), A = M(() => {
562
- if (u || x(null), A0(r), typeof document < "u") {
563
- const c = document.getElementById(F);
564
- c && (c.textContent = "");
936
+ [u]
937
+ ), L = E(() => {
938
+ if (l || h(null), $e(s), typeof document < "u") {
939
+ const i = document.getElementById(H);
940
+ i && (i.textContent = "");
565
941
  }
566
- }, [u, r]);
567
- return /* @__PURE__ */ y(
568
- T.Provider,
942
+ }, [l, s]);
943
+ return /* @__PURE__ */ w(
944
+ Y.Provider,
569
945
  {
570
946
  value: {
571
- theme: i,
572
- setTheme: D,
573
- seed: b,
574
- setSeed: N,
947
+ theme: t,
948
+ setTheme: v,
949
+ seed: k,
950
+ setSeed: I,
575
951
  setMode: O,
576
- setSkin: w,
577
- resetTheme: A
952
+ setSkin: A,
953
+ resetTheme: L
578
954
  },
579
- children: a
955
+ children: o
580
956
  }
581
957
  );
582
958
  }
583
- const j0 = [
959
+ const He = [
584
960
  { name: null, label: "Default" },
585
961
  { name: "tech", label: "Tech" }
586
- ], B0 = [
962
+ ], Pe = [
587
963
  { value: "light", label: "Light" },
588
964
  { value: "dark", label: "Dark" },
589
965
  { value: "system", label: "System" }
590
966
  ];
591
- function Y0({
592
- skins: t = j0,
593
- showMode: e = !0,
594
- allowCustom: n = !1,
595
- storageKey: r,
596
- className: o,
597
- style: a
967
+ function We({
968
+ skins: e = He,
969
+ showMode: r = !0,
970
+ allowCustom: a = !1,
971
+ storageKey: s,
972
+ className: c,
973
+ style: o
598
974
  }) {
599
- var c;
600
- const { setMode: i, setSkin: l, setSeed: u } = s0(T), m = typeof window < "u" ? $(r) : null, [x, b] = v(
601
- (m == null ? void 0 : m.mode) ?? (typeof document < "u" && document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light")
602
- ), [d, f] = v(
603
- (m == null ? void 0 : m.skin) ?? (typeof document < "u" ? document.documentElement.getAttribute("data-skin") : null)
604
- ), [p, D] = v(((c = m == null ? void 0 : m.seed) == null ? void 0 : c.brand) ?? "#1a4fa0"), g = (s) => {
605
- b(s), i(s);
606
- }, N = (s) => {
607
- f(s), l(s);
608
- }, O = (s) => {
609
- D(s), u({ brand: s });
610
- }, w = {
975
+ var i;
976
+ const { setMode: t, setSkin: d, setSeed: l } = ne(Y), f = typeof window < "u" ? R(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 = (n) => {
981
+ k(n), t(n);
982
+ }, I = (n) => {
983
+ y(n), d(n);
984
+ }, O = (n) => {
985
+ v(n), l({ brand: n });
986
+ }, A = {
611
987
  display: "inline-flex",
612
988
  gap: 4,
613
989
  padding: 4,
614
990
  borderRadius: "var(--sa-radii-md)",
615
991
  background: "var(--sa-background-neutral)"
616
- }, A = (s) => ({
992
+ }, L = (n) => ({
617
993
  border: "none",
618
994
  cursor: "pointer",
619
995
  fontSize: 12,
620
996
  fontWeight: 500,
621
997
  padding: "4px 10px",
622
998
  borderRadius: "var(--sa-radii-sm)",
623
- background: s ? "var(--sa-background-primary)" : "transparent",
624
- color: s ? "var(--sa-text-primary)" : "var(--sa-text-subtle)",
625
- boxShadow: s ? "var(--sa-shadow-sm)" : "none"
999
+ background: n ? "var(--sa-background-primary)" : "transparent",
1000
+ color: n ? "var(--sa-text-primary)" : "var(--sa-text-subtle)",
1001
+ boxShadow: n ? "var(--sa-shadow-sm)" : "none"
626
1002
  });
627
- return /* @__PURE__ */ z(
1003
+ return /* @__PURE__ */ G(
628
1004
  "div",
629
1005
  {
630
- className: o,
631
- style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...a },
1006
+ className: c,
1007
+ style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...o },
632
1008
  children: [
633
- e && /* @__PURE__ */ y("div", { role: "group", "aria-label": "Mode", style: w, children: B0.map((s) => /* @__PURE__ */ y(
1009
+ r && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Mode", style: A, children: Pe.map((n) => /* @__PURE__ */ w(
634
1010
  "button",
635
1011
  {
636
1012
  type: "button",
637
- "aria-pressed": x === s.value,
638
- style: A(x === s.value),
639
- onClick: () => g(s.value),
640
- children: s.label
1013
+ "aria-pressed": h === n.value,
1014
+ style: L(h === n.value),
1015
+ onClick: () => u(n.value),
1016
+ children: n.label
641
1017
  },
642
- s.value
1018
+ n.value
643
1019
  )) }),
644
- t.length > 0 && /* @__PURE__ */ y("div", { role: "group", "aria-label": "Skin", style: w, children: t.map((s) => /* @__PURE__ */ y(
1020
+ e.length > 0 && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((n) => /* @__PURE__ */ w(
645
1021
  "button",
646
1022
  {
647
1023
  type: "button",
648
- "aria-pressed": d === s.name,
649
- style: A(d === s.name),
650
- onClick: () => N(s.name),
651
- children: s.label
1024
+ "aria-pressed": p === n.name,
1025
+ style: L(p === n.name),
1026
+ onClick: () => I(n.name),
1027
+ children: n.label
652
1028
  },
653
- s.name ?? "default"
1029
+ n.name ?? "default"
654
1030
  )) }),
655
- n && /* @__PURE__ */ z(
1031
+ a && /* @__PURE__ */ G(
656
1032
  "label",
657
1033
  {
658
1034
  style: {
@@ -664,12 +1040,12 @@ function Y0({
664
1040
  },
665
1041
  children: [
666
1042
  "Brand",
667
- /* @__PURE__ */ y(
1043
+ /* @__PURE__ */ w(
668
1044
  "input",
669
1045
  {
670
1046
  type: "color",
671
- value: p,
672
- onChange: (s) => O(s.target.value),
1047
+ value: b,
1048
+ onChange: (n) => O(n.target.value),
673
1049
  "aria-label": "Custom brand color",
674
1050
  style: {
675
1051
  width: 28,
@@ -689,86 +1065,86 @@ function Y0({
689
1065
  }
690
1066
  );
691
1067
  }
692
- const P = i0, l0 = (t, e) => {
693
- const n = {};
694
- return Object.keys(t).forEach((r) => {
695
- if (t != null && t[r] && typeof (t == null ? void 0 : t[r]) == "object") {
696
- n[r] = {
697
- ...t == null ? void 0 : t[r],
698
- ...e == null ? void 0 : e[r],
699
- ...l0(t == null ? void 0 : t[r], e == null ? void 0 : e[r])
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])
700
1076
  };
701
1077
  return;
702
1078
  }
703
- n[r] = (e == null ? void 0 : e[r]) || (t == null ? void 0 : t[r]);
704
- }), n;
1079
+ a[s] = (r == null ? void 0 : r[s]) || (e == null ? void 0 : e[s]);
1080
+ }), a;
705
1081
  };
706
- function R() {
707
- const t = s0(T), e = U(
1082
+ function D() {
1083
+ const e = ne(Y), r = U(
708
1084
  () => ({
709
1085
  ...P,
710
- ...t.theme,
711
- ...l0(P, t.theme)
1086
+ ...e.theme,
1087
+ ...ie(P, e.theme)
712
1088
  }),
713
- [t.theme, P]
1089
+ [e.theme, P]
714
1090
  );
715
- return { ...t, theme: e };
1091
+ return { ...e, theme: r };
716
1092
  }
717
- function z0() {
718
- const { theme: t } = R();
719
- return t.colors;
1093
+ function Ke() {
1094
+ const { theme: e } = D();
1095
+ return e.colors;
720
1096
  }
721
- function G0() {
722
- var e;
723
- const { theme: t } = R();
724
- return (e = t.metrics) == null ? void 0 : e.spacing;
1097
+ function Qe() {
1098
+ var r;
1099
+ const { theme: e } = D();
1100
+ return (r = e.metrics) == null ? void 0 : r.spacing;
725
1101
  }
726
- function W0() {
727
- var e;
728
- const { theme: t } = R();
729
- return (e = t.metrics) == null ? void 0 : e.radii;
1102
+ function Ve() {
1103
+ var r;
1104
+ const { theme: e } = D();
1105
+ return (r = e.metrics) == null ? void 0 : r.radii;
730
1106
  }
731
- function K0() {
732
- var e;
733
- const { theme: t } = R();
734
- return (e = t == null ? void 0 : t.metrics) == null ? void 0 : e.shadows;
1107
+ function Xe() {
1108
+ var r;
1109
+ const { theme: e } = D();
1110
+ return (r = e == null ? void 0 : e.metrics) == null ? void 0 : r.shadows;
735
1111
  }
736
- function Q0(t) {
737
- return t;
1112
+ function Ze(e) {
1113
+ return e;
738
1114
  }
739
1115
  export {
740
1116
  C as DEFAULT_STORAGE_KEY,
741
- X as LADDERS,
742
- k0 as NEUTRAL_LADDER_DARK,
743
- y0 as NEUTRAL_LADDER_GRAY,
744
- H0 as SA_DEFAULT_SEED,
745
- Q as SCALE_KEYS_10,
746
- V as SCALE_KEYS_12,
747
- T as ThemeContext,
748
- T0 as ThemeProvider,
749
- Y0 as ThemeSwitcher,
750
- B as applyMode,
751
- n0 as applySkin,
752
- v0 as buildTheme,
753
- A0 as clearPref,
754
- S0 as contrastRatio,
755
- Q0 as createTheme,
756
- J as hexToOklch,
757
- H as hexToRgb,
758
- q as neutralRamp,
759
- c0 as oklchToHex,
760
- U0 as pickByLightness,
761
- K as pickTextOn,
762
- Z as rampFromSeed,
763
- $ as readPref,
764
- L0 as resolveMode,
765
- p0 as rgbToHex,
766
- x0 as rgbToOklch,
767
- J0 as themeBootScript,
768
- z0 as useColor,
769
- W0 as useRadius,
770
- K0 as useShadow,
771
- G0 as useSpacing,
772
- R as useTheme,
773
- w0 as writePref
1117
+ Z as LADDERS,
1118
+ we as NEUTRAL_LADDER_DARK,
1119
+ he as NEUTRAL_LADDER_GRAY,
1120
+ Ye as SA_DEFAULT_SEED,
1121
+ V as SCALE_KEYS_10,
1122
+ X as SCALE_KEYS_12,
1123
+ Y as ThemeContext,
1124
+ Ge as ThemeProvider,
1125
+ We as ThemeSwitcher,
1126
+ F as applyMode,
1127
+ ae as applySkin,
1128
+ Ce as buildTheme,
1129
+ $e as clearPref,
1130
+ me as contrastRatio,
1131
+ Ze as createTheme,
1132
+ T as hexToOklch,
1133
+ J as hexToRgb,
1134
+ ee as neutralRamp,
1135
+ te as oklchToHex,
1136
+ Te as pickByLightness,
1137
+ Q as pickTextOn,
1138
+ q as rampFromSeed,
1139
+ R as readPref,
1140
+ Re as resolveMode,
1141
+ ke as rgbToHex,
1142
+ ge as rgbToOklch,
1143
+ ze as themeBootScript,
1144
+ Ke as useColor,
1145
+ Ve as useRadius,
1146
+ Xe as useShadow,
1147
+ Qe as useSpacing,
1148
+ D as useTheme,
1149
+ _e as writePref
774
1150
  };