@starasia/theme 3.3.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,5 +1,5 @@
1
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";
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
3
  const fe = (e, r) => {
4
4
  if (typeof document > "u")
5
5
  return;
@@ -19,7 +19,7 @@ const fe = (e, r) => {
19
19
  const a = document.createElement("style");
20
20
  return a.id = e, document.head.appendChild(a), a;
21
21
  };
22
- function U(e) {
22
+ function J(e) {
23
23
  let r = e.trim().replace(/^#/, "");
24
24
  r.length === 3 && (r = r.split("").map((s) => s + s).join("")), r.length === 8 && (r = r.slice(0, 6));
25
25
  const a = parseInt(r, 16);
@@ -35,19 +35,19 @@ function ke({ r: e, g: r, b: a }) {
35
35
  }
36
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
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);
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 * 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
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
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;
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 * 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
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
53
  function ge({ r: e, g: r, b: a }) {
@@ -55,21 +55,21 @@ function ge({ r: e, g: r, b: a }) {
55
55
  x(e),
56
56
  x(r),
57
57
  x(a)
58
- ), l = Math.sqrt(c * c + o * o);
58
+ ), t = Math.sqrt(c * c + o * o);
59
59
  let d = Math.atan2(o, c) * 180 / Math.PI;
60
- return d < 0 && (d += 360), { l: s, c: l, h: d };
60
+ return d < 0 && (d += 360), { l: s, c: t, h: d };
61
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;
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
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));
64
+ const s = a * Math.PI / 180, c = (t) => ve(e, t * Math.cos(s), t * Math.sin(s));
65
65
  let o = c(r);
66
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;
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
- o = c(l);
72
+ o = c(t);
73
73
  }
74
74
  return {
75
75
  r: Math.min(1, Math.max(0, B(o.r))),
@@ -82,7 +82,7 @@ function K({ r: e, g: r, b: a }) {
82
82
  return 0.2126 * x(e) + 0.7152 * x(r) + 0.0722 * x(a);
83
83
  }
84
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);
85
+ const a = K(J(e)), s = K(J(r)), c = Math.max(a, s), o = Math.min(a, s);
86
86
  return (c + 0.05) / (o + 0.05);
87
87
  }
88
88
  function Q(e, r = ["#ffffff", "#1e1f21"]) {
@@ -116,22 +116,22 @@ const V = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
116
116
  }
117
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
118
  function q(e, r) {
119
- const { c: a, h: s } = J(e), c = Math.max(...r.C) || 1;
119
+ const { c: a, h: s } = T(e), c = Math.max(...r.C) || 1;
120
120
  return r.L.map(
121
- (o, l) => te({ l: o, c: a * (r.C[l] / c), h: s })
121
+ (o, t) => te({ l: o, c: a * (r.C[t] / c), h: s })
122
122
  );
123
123
  }
124
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 });
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 Ye(e, r) {
131
+ function Te(e, r) {
132
132
  let a = e[0], s = 1 / 0;
133
133
  for (const c of e) {
134
- const o = Math.abs(J(c).l - r);
134
+ const o = Math.abs(T(c).l - r);
135
135
  o < s && (s = o, a = c);
136
136
  }
137
137
  return a;
@@ -497,7 +497,7 @@ const Se = [
497
497
  { token: "--sa-text-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
498
498
  { token: "--sa-icon-accent", recipe: "var(--sa-color-amber-400, #ffb63f)", scale: "amber" },
499
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 = {
500
+ ], Ye = {
501
501
  name: "starasia",
502
502
  brand: "#1a4fa0",
503
503
  neutral: "#7d818a",
@@ -507,65 +507,65 @@ const Se = [
507
507
  warning: "#ed9f30",
508
508
  radius: 8,
509
509
  font: { body: "Inter" }
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) {
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
512
  s.forEach((c, o) => {
513
513
  e[`--sa-color-${r}-${c}`] = a[o];
514
514
  });
515
515
  }
516
- function Ae(e, r = {}) {
516
+ function Ce(e, r = {}) {
517
517
  var k, p, y;
518
518
  const a = r.as ?? "root";
519
519
  if (a === "skin" && !r.name)
520
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) => {
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
523
  const v = e[b];
524
524
  if (!v)
525
525
  return;
526
526
  const u = q(v, Z[b]);
527
- d[b] = u, R(o, b, u, V), n.add(b);
527
+ d[b] = u, $(o, b, u, V), l.add(b);
528
528
  }), e.neutral) {
529
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");
530
+ d.gray = b, d.dark = v, $(o, "gray", b, X), $(o, "dark", v, X), l.add("gray"), l.add("dark");
531
531
  }
532
532
  if (typeof e.radius == "number") {
533
533
  const b = e.radius;
534
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`;
535
535
  }
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) {
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
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);
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);
539
539
  }
540
- return { css: a === "skin" ? _e(s, o, l, n) : Le(s, o, l), rootTokens: o, darkTokens: l, ramps: d };
540
+ return { css: a === "skin" ? Le(s, o, t, l) : Ae(s, o, t), rootTokens: o, darkTokens: t, ramps: d };
541
541
  }
542
- function D(e, r) {
542
+ function N(e, r) {
543
543
  const a = Object.entries(r).map(([s, c]) => ` ${s}: ${c};`);
544
544
  return a.length ? `${e} {
545
545
  ${a.join(`
546
546
  `)}
547
547
  }` : "";
548
548
  }
549
- function Le(e, r, a) {
549
+ function Ae(e, r, a) {
550
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(`
551
+ return [N(e, r), N(s, a)].filter(Boolean).join(`
552
552
 
553
553
  `);
554
554
  }
555
- function _e(e, r, a, s) {
555
+ function Le(e, r, a, s) {
556
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(`
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(`
564
564
 
565
565
  `);
566
566
  }
567
567
  const C = "sa-theme";
568
- function $(e = C) {
568
+ function R(e = C) {
569
569
  try {
570
570
  if (typeof localStorage > "u")
571
571
  return null;
@@ -575,7 +575,7 @@ function $(e = C) {
575
575
  return null;
576
576
  }
577
577
  }
578
- function Re(e, r = C) {
578
+ function _e(e, r = C) {
579
579
  try {
580
580
  if (typeof localStorage > "u")
581
581
  return;
@@ -591,7 +591,7 @@ function $e(e = C) {
591
591
  } catch {
592
592
  }
593
593
  }
594
- function De(e) {
594
+ function Re(e) {
595
595
  if (e === "system")
596
596
  try {
597
597
  return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
@@ -604,7 +604,7 @@ function F(e) {
604
604
  if (typeof document > "u")
605
605
  return;
606
606
  const r = document.documentElement;
607
- De(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
607
+ Re(e) === "dark" ? r.setAttribute("data-theme", "dark") : r.removeAttribute("data-theme");
608
608
  }
609
609
  function ae(e) {
610
610
  if (typeof document > "u")
@@ -612,7 +612,7 @@ function ae(e) {
612
612
  const r = document.documentElement;
613
613
  e ? r.setAttribute("data-skin", e) : r.removeAttribute("data-skin");
614
614
  }
615
- function Ge(e = C) {
615
+ function ze(e = C) {
616
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
617
  }
618
618
  const Ne = {
@@ -714,7 +714,7 @@ const Ne = {
714
714
  tertiary: "230, 237, 246"
715
715
  }
716
716
  }
717
- }, Ie = {
717
+ }, De = {
718
718
  radii: {
719
719
  none: "0",
720
720
  xs: "0.25rem",
@@ -772,7 +772,7 @@ const Ne = {
772
772
  inner: "inset 0 2px 4px 0 #0000000d",
773
773
  card: "0px 4px 35px 0px #7090b040"
774
774
  }
775
- }, Oe = {
775
+ }, Ie = {
776
776
  fontSizes: {
777
777
  xs: "0.625rem",
778
778
  sm: "0.75rem",
@@ -814,8 +814,8 @@ const Ne = {
814
814
  }
815
815
  }, le = {
816
816
  colors: Ne,
817
- metrics: Ie,
818
- font: Oe
817
+ metrics: De,
818
+ font: Ie
819
819
  }, Y = de({
820
820
  theme: void 0,
821
821
  setTheme: () => {
@@ -829,20 +829,20 @@ const Ne = {
829
829
  },
830
830
  resetTheme: () => {
831
831
  }
832
- }), je = "sa-theme-style", H = "sa-theme-seed-style";
833
- function Be(e) {
832
+ }), Oe = "sa-theme-style", H = "sa-theme-seed-style";
833
+ function je(e) {
834
834
  const r = e.split(",").map((a) => Number(a.trim()));
835
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
836
  }
837
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) {
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
840
  if (!e)
841
841
  return "";
842
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])
843
+ ([s, c]) => se(c) !== se(Be[s])
844
844
  ).map(([s, c]) => {
845
- const o = Be(c);
845
+ const o = je(c);
846
846
  return o ? ` --sa-color-brand-${s}: ${o};` : "";
847
847
  }).filter(Boolean).join(`
848
848
  `);
@@ -850,7 +850,7 @@ function He(e) {
850
850
  ${a}
851
851
  }` : "";
852
852
  }
853
- function We({
853
+ function Ge({
854
854
  value: e,
855
855
  seed: r,
856
856
  persist: a = !0,
@@ -858,16 +858,16 @@ function We({
858
858
  manageAttributes: c = !1,
859
859
  children: o
860
860
  }) {
861
- const [l, d] = M(e), n = r !== void 0, [f, h] = M(() => {
862
- if (n)
861
+ const [t, d] = M(e), l = r !== void 0, [f, h] = M(() => {
862
+ if (l)
863
863
  return r;
864
864
  if (a) {
865
- const i = $(s);
865
+ const i = R(s);
866
866
  if (i != null && i.seed)
867
867
  return i.seed;
868
868
  }
869
869
  return null;
870
- }), k = n ? r : f, p = T(
870
+ }), k = l ? r : f, p = U(
871
871
  () => k ? JSON.stringify(k) : "",
872
872
  [k]
873
873
  );
@@ -875,37 +875,37 @@ function We({
875
875
  if (typeof document > "u")
876
876
  return;
877
877
  if (!p) {
878
- const t = document.getElementById(H);
879
- t && (t.textContent = "");
878
+ const n = document.getElementById(H);
879
+ n && (n.textContent = "");
880
880
  return;
881
881
  }
882
- const { css: i } = Ae(JSON.parse(p));
882
+ const { css: i } = Ce(JSON.parse(p));
883
883
  fe(i, H);
884
884
  }, [p]), _(() => {
885
- var t;
885
+ var n;
886
886
  if (!c || !a)
887
887
  return;
888
- const i = $(s);
888
+ const i = R(s);
889
889
  if (i && (i.mode && F(i.mode), i.skin !== void 0 && ae(i.skin), i.mode === "system" && typeof window < "u")) {
890
890
  const g = window.matchMedia("(prefers-color-scheme: dark)"), S = () => F("system");
891
- return (t = g.addEventListener) == null || t.call(g, "change", S), () => {
891
+ return (n = g.addEventListener) == null || n.call(g, "change", S), () => {
892
892
  var z;
893
893
  return (z = g.removeEventListener) == null ? void 0 : z.call(g, "change", S);
894
894
  };
895
895
  }
896
896
  }, [c, a, s]);
897
- const y = T(
898
- () => l ? JSON.stringify(l) : "",
899
- [l]
897
+ const y = U(
898
+ () => t ? JSON.stringify(t) : "",
899
+ [t]
900
900
  ), b = be(null);
901
901
  _(() => {
902
902
  var g, S;
903
- b.current || (b.current = ue(je));
903
+ b.current || (b.current = ue(Oe));
904
904
  const i = b.current;
905
905
  if (!i)
906
906
  return;
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) : "";
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
909
  }, [y]), _(() => () => {
910
910
  b.current && (b.current.textContent = "");
911
911
  }, []);
@@ -915,15 +915,15 @@ function We({
915
915
  (i) => {
916
916
  if (!a)
917
917
  return;
918
- const t = $(s) || {};
919
- Re({ ...t, ...i }, s);
918
+ const n = R(s) || {};
919
+ _e({ ...n, ...i }, s);
920
920
  },
921
921
  [a, s]
922
922
  ), I = E(
923
923
  (i) => {
924
- n || (h(i), u({ seed: i }));
924
+ l || (h(i), u({ seed: i }));
925
925
  },
926
- [n, u]
926
+ [l, u]
927
927
  ), O = E(
928
928
  (i) => {
929
929
  F(i), u({ mode: i });
@@ -935,16 +935,16 @@ function We({
935
935
  },
936
936
  [u]
937
937
  ), L = E(() => {
938
- if (n || h(null), $e(s), typeof document < "u") {
938
+ if (l || h(null), $e(s), typeof document < "u") {
939
939
  const i = document.getElementById(H);
940
940
  i && (i.textContent = "");
941
941
  }
942
- }, [n, s]);
942
+ }, [l, s]);
943
943
  return /* @__PURE__ */ w(
944
944
  Y.Provider,
945
945
  {
946
946
  value: {
947
- theme: l,
947
+ theme: t,
948
948
  setTheme: v,
949
949
  seed: k,
950
950
  setSeed: I,
@@ -956,16 +956,16 @@ function We({
956
956
  }
957
957
  );
958
958
  }
959
- const Pe = [
959
+ const He = [
960
960
  { name: null, label: "Default" },
961
961
  { name: "tech", label: "Tech" }
962
- ], Te = [
962
+ ], Pe = [
963
963
  { value: "light", label: "Light" },
964
964
  { value: "dark", label: "Dark" },
965
965
  { value: "system", label: "System" }
966
966
  ];
967
- function Ke({
968
- skins: e = Pe,
967
+ function We({
968
+ skins: e = He,
969
969
  showMode: r = !0,
970
970
  allowCustom: a = !1,
971
971
  storageKey: s,
@@ -973,32 +973,32 @@ function Ke({
973
973
  style: o
974
974
  }) {
975
975
  var i;
976
- const { setMode: l, setSkin: d, setSeed: n } = ne(Y), f = typeof window < "u" ? $(s) : null, [h, k] = M(
976
+ const { setMode: t, setSkin: d, setSeed: l } = ne(Y), f = typeof window < "u" ? R(s) : null, [h, k] = M(
977
977
  (f == null ? void 0 : f.mode) ?? (typeof document < "u" && document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light")
978
978
  ), [p, y] = M(
979
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 });
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
986
  }, A = {
987
987
  display: "inline-flex",
988
988
  gap: 4,
989
989
  padding: 4,
990
990
  borderRadius: "var(--sa-radii-md)",
991
991
  background: "var(--sa-background-neutral)"
992
- }, L = (t) => ({
992
+ }, L = (n) => ({
993
993
  border: "none",
994
994
  cursor: "pointer",
995
995
  fontSize: 12,
996
996
  fontWeight: 500,
997
997
  padding: "4px 10px",
998
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"
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"
1002
1002
  });
1003
1003
  return /* @__PURE__ */ G(
1004
1004
  "div",
@@ -1006,27 +1006,27 @@ function Ke({
1006
1006
  className: c,
1007
1007
  style: { display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center", ...o },
1008
1008
  children: [
1009
- r && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Mode", style: A, children: Te.map((t) => /* @__PURE__ */ w(
1009
+ r && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Mode", style: A, children: Pe.map((n) => /* @__PURE__ */ w(
1010
1010
  "button",
1011
1011
  {
1012
1012
  type: "button",
1013
- "aria-pressed": h === t.value,
1014
- style: L(h === t.value),
1015
- onClick: () => u(t.value),
1016
- children: t.label
1013
+ "aria-pressed": h === n.value,
1014
+ style: L(h === n.value),
1015
+ onClick: () => u(n.value),
1016
+ children: n.label
1017
1017
  },
1018
- t.value
1018
+ n.value
1019
1019
  )) }),
1020
- e.length > 0 && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((t) => /* @__PURE__ */ w(
1020
+ e.length > 0 && /* @__PURE__ */ w("div", { role: "group", "aria-label": "Skin", style: A, children: e.map((n) => /* @__PURE__ */ w(
1021
1021
  "button",
1022
1022
  {
1023
1023
  type: "button",
1024
- "aria-pressed": p === t.name,
1025
- style: L(p === t.name),
1026
- onClick: () => I(t.name),
1027
- children: t.label
1024
+ "aria-pressed": p === n.name,
1025
+ style: L(p === n.name),
1026
+ onClick: () => I(n.name),
1027
+ children: n.label
1028
1028
  },
1029
- t.name ?? "default"
1029
+ n.name ?? "default"
1030
1030
  )) }),
1031
1031
  a && /* @__PURE__ */ G(
1032
1032
  "label",
@@ -1045,7 +1045,7 @@ function Ke({
1045
1045
  {
1046
1046
  type: "color",
1047
1047
  value: b,
1048
- onChange: (t) => O(t.target.value),
1048
+ onChange: (n) => O(n.target.value),
1049
1049
  "aria-label": "Custom brand color",
1050
1050
  style: {
1051
1051
  width: 28,
@@ -1079,8 +1079,8 @@ const P = le, ie = (e, r) => {
1079
1079
  a[s] = (r == null ? void 0 : r[s]) || (e == null ? void 0 : e[s]);
1080
1080
  }), a;
1081
1081
  };
1082
- function N() {
1083
- const e = ne(Y), r = T(
1082
+ function D() {
1083
+ const e = ne(Y), r = U(
1084
1084
  () => ({
1085
1085
  ...P,
1086
1086
  ...e.theme,
@@ -1090,26 +1090,26 @@ function N() {
1090
1090
  );
1091
1091
  return { ...e, theme: r };
1092
1092
  }
1093
- function Qe() {
1094
- const { theme: e } = N();
1093
+ function Ke() {
1094
+ const { theme: e } = D();
1095
1095
  return e.colors;
1096
1096
  }
1097
- function Ve() {
1097
+ function Qe() {
1098
1098
  var r;
1099
- const { theme: e } = N();
1099
+ const { theme: e } = D();
1100
1100
  return (r = e.metrics) == null ? void 0 : r.spacing;
1101
1101
  }
1102
- function Xe() {
1102
+ function Ve() {
1103
1103
  var r;
1104
- const { theme: e } = N();
1104
+ const { theme: e } = D();
1105
1105
  return (r = e.metrics) == null ? void 0 : r.radii;
1106
1106
  }
1107
- function Ze() {
1107
+ function Xe() {
1108
1108
  var r;
1109
- const { theme: e } = N();
1109
+ const { theme: e } = D();
1110
1110
  return (r = e == null ? void 0 : e.metrics) == null ? void 0 : r.shadows;
1111
1111
  }
1112
- function qe(e) {
1112
+ function Ze(e) {
1113
1113
  return e;
1114
1114
  }
1115
1115
  export {
@@ -1117,34 +1117,34 @@ export {
1117
1117
  Z as LADDERS,
1118
1118
  we as NEUTRAL_LADDER_DARK,
1119
1119
  he as NEUTRAL_LADDER_GRAY,
1120
- ze as SA_DEFAULT_SEED,
1120
+ Ye as SA_DEFAULT_SEED,
1121
1121
  V as SCALE_KEYS_10,
1122
1122
  X as SCALE_KEYS_12,
1123
1123
  Y as ThemeContext,
1124
- We as ThemeProvider,
1125
- Ke as ThemeSwitcher,
1124
+ Ge as ThemeProvider,
1125
+ We as ThemeSwitcher,
1126
1126
  F as applyMode,
1127
1127
  ae as applySkin,
1128
- Ae as buildTheme,
1128
+ Ce as buildTheme,
1129
1129
  $e as clearPref,
1130
1130
  me as contrastRatio,
1131
- qe as createTheme,
1132
- J as hexToOklch,
1133
- U as hexToRgb,
1131
+ Ze as createTheme,
1132
+ T as hexToOklch,
1133
+ J as hexToRgb,
1134
1134
  ee as neutralRamp,
1135
1135
  te as oklchToHex,
1136
- Ye as pickByLightness,
1136
+ Te as pickByLightness,
1137
1137
  Q as pickTextOn,
1138
1138
  q as rampFromSeed,
1139
- $ as readPref,
1140
- De as resolveMode,
1139
+ R as readPref,
1140
+ Re as resolveMode,
1141
1141
  ke as rgbToHex,
1142
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
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
1150
1150
  };
package/dist/index.umd.js CHANGED
@@ -1,11 +1,11 @@
1
- (function(n,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(n=typeof globalThis<"u"?globalThis:n||self,p(n["@starasia/theme"]={},n.jsxRuntime,n.React))})(this,function(n,p,k){"use strict";var fe,ue;const pe=(e,r)=>{if(typeof document>"u")return;const a=document.getElementById(r);if(a)a.textContent=e;else{const s=document.createElement("style");s.id=r,s.textContent=e,document.head.appendChild(s)}},ve=e=>{if(typeof document>"u")return null;const r=document.getElementById(e);if(r)return r;const a=document.createElement("style");return a.id=e,document.head.appendChild(a),a};function _(e){let r=e.trim().replace(/^#/,"");r.length===3&&(r=r.split("").map(s=>s+s).join("")),r.length===8&&(r=r.slice(0,6));const a=parseInt(r,16);return{r:(a>>16&255)/255,g:(a>>8&255)/255,b:(a&255)/255}}const j=e=>Math.max(0,Math.min(255,Math.round(e*255))).toString(16).padStart(2,"0");function V({r:e,g:r,b:a}){return`#${j(e)}${j(r)}${j(a)}`}const S=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4),B=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055;function ge(e,r,a){const s=.4122214708*e+.5363325363*r+.0514459929*a,c=.2119034982*e+.6806995451*r+.1073969566*a,o=.0883024619*e+.2817188376*r+.6299787005*a,i=Math.cbrt(s),b=Math.cbrt(c),t=Math.cbrt(o);return{L:.2104542553*i+.793617785*b-.0040720468*t,a:1.9779984951*i-2.428592205*b+.4505937099*t,b:.0259040371*i+.7827717662*b-.808675766*t}}function ye(e,r,a){const s=e+.3963377774*r+.2158037573*a,c=e-.1055613458*r-.0638541728*a,o=e-.0894841775*r-1.291485548*a,i=s*s*s,b=c*c*c,t=o*o*o;return{r:4.0767416621*i-3.3077115913*b+.2309699292*t,g:-1.2684380046*i+2.6097574011*b-.3413193965*t,b:-.0041960863*i-.7034186147*b+1.707614701*t}}function X({r:e,g:r,b:a}){const{L:s,a:c,b:o}=ge(S(e),S(r),S(a)),i=Math.sqrt(c*c+o*o);let b=Math.atan2(o,c)*180/Math.PI;return b<0&&(b+=360),{l:s,c:i,h:b}}const R=e=>X(_(e)),Z=({r:e,g:r,b:a},s=1e-4)=>e>=-s&&e<=1+s&&r>=-s&&r<=1+s&&a>=-s&&a<=1+s;function me({l:e,c:r,h:a}){const s=a*Math.PI/180,c=i=>ye(e,i*Math.cos(s),i*Math.sin(s));let o=c(r);if(!Z(o)){let i=0,b=r;for(let t=0;t<20;t++){const u=(i+b)/2;o=c(u),Z(o)?i=u:b=u}o=c(i)}return{r:Math.min(1,Math.max(0,B(o.r))),g:Math.min(1,Math.max(0,B(o.g))),b:Math.min(1,Math.max(0,B(o.b)))}}const P=e=>V(me(e));function ee({r:e,g:r,b:a}){return .2126*S(e)+.7152*S(r)+.0722*S(a)}function re(e,r){const a=ee(_(e)),s=ee(_(r)),c=Math.max(a,s),o=Math.min(a,s);return(c+.05)/(o+.05)}function F(e,r=["#ffffff","#1e1f21"]){let a=r[0],s=-1;for(const c of r){const o=re(e,c);o>s&&(s=o,a=c)}return a}const U=["50","100","200","300","400","500","600","700","800","900"],H=["50","100","200","300","400","500","600","700","800","900","1000","1100"],J={brand:{L:[.9434,.8816,.7612,.6375,.5179,.4415,.2695,.2429,.2155,.1878],C:[.0143,.031,.0645,.1017,.1394,.1429,.086,.0761,.066,.0549]},error:{L:[.9678,.8921,.8422,.7752,.7325,.6785,.54,.4653,.3903,.3073],C:[.0166,.0588,.09,.1362,.169,.2131,.2047,.1753,.1448,.1075]},success:{L:[.9836,.9065,.8635,.8241,.7874,.7549,.6605,.5598,.4572,.3455],C:[.0231,.0626,.0939,.1214,.1468,.1662,.1444,.1203,.0962,.0689]},info:{L:[.9783,.9523,.908,.8431,.7845,.6989,.6232,.5302,.4651,.3061],C:[.0134,.0275,.0604,.1075,.1426,.147,.1432,.1223,.1045,.0663]},warning:{L:[.9673,.9003,.8504,.8055,.7624,.6961,.5244,.3979,.2567,.2201],C:[.0205,.0679,.0991,.1284,.1495,.1346,.0998,.0731,.0415,.0332]}},ae=[1,.9791,.9577,.9007,.7857,.6501,.6028,.5383,.4389,.36,.2856,.239],se=[.2127,.2401,.3133,.3673,.4198,.5093,.603,.682,.7408,.8102,.8546,.9153],he=.02;function Y(e,r){const{c:a,h:s}=R(e),c=Math.max(...r.C)||1;return r.L.map((o,i)=>P({l:o,c:a*(r.C[i]/c),h:s}))}function G(e,r){const{c:a,h:s}=R(e),c=Math.min(a,he),o=r.length;return r.map((i,b)=>{const t=b/(o-1),u=1-Math.abs(2*t-1);return P({l:i,c:c*u,h:s})})}function we(e,r){let a=e[0],s=1/0;for(const c of e){const o=Math.abs(R(c).l-r);o<s&&(s=o,a=c)}return a}const xe=[{token:"--sa-text-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-text-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-on-brand",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-text-brand-bolder",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-text-brand-hover",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-text-brand-pressed",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-text-brand-disable",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-text-error",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-text-error-bolder",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-text-error-hover",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-text-error-pressed",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-text-error-disable",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-text-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-text-success-bolder",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-text-success-hover",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-text-success-pressed",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-text-success-disable",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-text-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-text-info-bolder",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-text-info-hover",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-text-info-pressed",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-text-info-disable",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-text-subtle",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-text-subtlest",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-text-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-text-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-text-disable",recipe:"var(--sa-color-black-alpha-a50, #181a1980)",scale:"black"},{token:"--sa-text-bolder",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-text-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-text-warning-bolder",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-text-warning-hover",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-text-warning-pressed",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-text-warning-disable",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-text-secondary",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-text-secondary-bolder",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-text-secondary-hover",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-text-secondary-pressed",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-text-secondary-disable",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-icon-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-icon-subtle",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-icon-subtlest",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-icon-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-icon-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-icon-disable",recipe:"var(--sa-color-black-alpha-a50, #181a1980)",scale:"black"},{token:"--sa-icon-bolder",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-icon-brand-bolder",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-icon-brand-hover",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-icon-brand-pressed",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-icon-brand-disable",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-icon-error",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-icon-error-bolder",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-icon-error-hover",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-icon-error-pressed",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-icon-error-disable",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-icon-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-icon-success-bolder",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-icon-success-hover",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-icon-success-pressed",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-icon-success-disable",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-icon-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-icon-info-bolder",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-icon-info-hover",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-icon-info-pressed",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-icon-info-disable",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-icon-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-icon-warning-bolder",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-icon-warning-hover",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-icon-warning-pressed",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-icon-warning-disable",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-icon-secondary",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-icon-secondary-bolder",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-icon-secondary-hover",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-icon-secondary-pressed",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-icon-secondary-disable",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-brand-selected",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-icon-error-selected",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-icon-success-selected",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-icon-info-selected",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-icon-warning-selected",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-primary",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-background-primary-inverse",recipe:"var(--sa-color-gray-100, #f8f8f8)",scale:"gray"},{token:"--sa-background-subtle",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-hover",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-background-pressed",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-disable",recipe:"var(--sa-color-black-alpha-a5, #1717170d)",scale:"black"},{token:"--sa-background-overlay",recipe:"var(--sa-color-black-alpha-a45, #00000073)",scale:"black"},{token:"--sa-background-brand",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-background-brand-hover",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-background-brand-pressed",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-background-brand-disable",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-background-brand-subtle",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-background-brand-subtle-hover",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-background-brand-subtle-pressed",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-background-brand-subtlest",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-background-error",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-hover",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-error-pressed",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-disable",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtle",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtle-hover",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-background-error-subtlest",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-background-error-subtlest-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtlest-pressed",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-background-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-background-success-hover",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-success-pressed",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-disable",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtle",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-background-success-subtle-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtlest",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-background-success-subtlest-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtlest-pressed",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-background-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-background-info-hover",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-info-pressed",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-disable",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtle",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-background-info-subtle-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtlest",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-background-info-subtlest-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtlest-pressed",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-background-warning",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-hover",recipe:"var(--sa-color-warning-500, #d18d2c)",scale:"warning"},{token:"--sa-background-warning-pressed",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-disable",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtle",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-background-warning-subtle-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtlest",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-background-warning-subtlest-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtlest-pressed",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-background-neutral",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-background-neutral-hover",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-neutral-pressed",recipe:"var(--sa-color-gray-400, #b7b9be)",scale:"gray"},{token:"--sa-background-secondary",recipe:"var(--sa-color-secondary-500, #001ed2)",scale:"secondary"},{token:"--sa-background-secondary-hover",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-pressed",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-background-secondary-disable",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-background-secondary-subtle",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-border-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-border-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-border-subtle",recipe:"var(--sa-color-black-alpha-a10, #0515241a)",scale:"black"},{token:"--sa-border-bold",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-border-disabled",recipe:"var(--sa-color-black-alpha-a5, #1717170d)",scale:"black"},{token:"--sa-border-focused",recipe:"var(--sa-color-brand-500, #1a4fa0)",scale:"brand"},{token:"--sa-border-input",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-border-selected",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-border-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-border-brand-disable",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-border-danger",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-border-danger-subtle",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-border-danger-disable",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-border-success",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-border-success-subtle",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-border-success-disable",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-border-info",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-border-info-subtle",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-border-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-border-warning-subtle",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-accent-primary",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-accent-subtle",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-accent-success",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-accent-success-subtle",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-accent-danger",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-accent-danger-subtle",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-accent-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-accent-info-subtle",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-accent-warning",recipe:"var(--sa-color-warning-400, #ed9f30)",scale:"warning"},{token:"--sa-accent-warning-subtle",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-accent-brand",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"},{token:"--sa-accent-brand-subtle",recipe:"var(--sa-color-amber-50, #fff8eb)",scale:"amber"},{token:"--sa-background-accent",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"},{token:"--sa-background-accent-hover",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-background-accent-pressed",recipe:"var(--sa-color-amber-600, #d4870f)",scale:"amber"},{token:"--sa-background-accent-subtle",recipe:"var(--sa-color-amber-100, #ffefcc)",scale:"amber"},{token:"--sa-background-accent-subtlest",recipe:"var(--sa-color-amber-50, #fff8eb)",scale:"amber"},{token:"--sa-text-accent",recipe:"var(--sa-color-amber-800, #7a4c0a)",scale:"amber"},{token:"--sa-text-on-accent",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-accent",recipe:"var(--sa-color-amber-700, #a8690b)",scale:"amber"},{token:"--sa-border-accent",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"}],Se=[{token:"--sa-text-primary",recipe:"var(--sa-color-dark-1100, #e2e3e4)",scale:"dark"},{token:"--sa-text-primary-inverse",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-text-brand",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-text-brand-bolder",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-text-brand-hover",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-text-brand-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-text-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-text-error",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-text-error-bolder",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-text-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-text-error-pressed",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-text-error-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-text-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-text-success-bolder",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-text-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-text-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-text-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-text-info",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-text-info-bolder",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-text-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-text-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-text-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-text-subtle",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-text-subtlest",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-text-hover",recipe:"var(--sa-color-dark-400, #4b4d51)",scale:"dark"},{token:"--sa-text-pressed",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-text-disable",recipe:"var(--sa-color-white-alpha-a20, #ceced933)",scale:"white"},{token:"--sa-text-bolder",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-text-warning-bolder",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-text-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-text-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-text-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-text-secondary",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-text-secondary-bolder",recipe:"var(--sa-color-secondary-50, #e6e9fb)",scale:"secondary"},{token:"--sa-text-secondary-hover",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-text-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-text-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-icon-primary",recipe:"var(--sa-color-dark-1100, #e2e3e4)",scale:"dark"},{token:"--sa-icon-primary-inverse",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-subtle",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-icon-subtlest",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-icon-hover",recipe:"var(--sa-color-dark-900, #bfc1c4)",scale:"dark"},{token:"--sa-icon-pressed",recipe:"var(--sa-color-dark-1000, #cecfd2)",scale:"dark"},{token:"--sa-icon-disable",recipe:"var(--sa-color-white-alpha-a50, #e3e4f280)",scale:"white"},{token:"--sa-icon-bolder",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-icon-brand",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-icon-brand-bolder",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-icon-brand-hover",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-icon-brand-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-icon-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-icon-error",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-icon-error-bolder",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-icon-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-icon-error-pressed",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-icon-error-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-icon-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-icon-success-bolder",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-icon-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-icon-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-icon-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-icon-info",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-icon-info-bolder",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-icon-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-icon-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-icon-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-icon-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-icon-warning-bolder",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-icon-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-icon-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-icon-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-icon-secondary",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-secondary-bolder",recipe:"var(--sa-color-secondary-50, #e6e9fb)",scale:"secondary"},{token:"--sa-icon-secondary-hover",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-icon-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-icon-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-icon-brand-selected",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-icon-error-selected",recipe:"var(--sa-color-error-400, #ff758f)",scale:"error"},{token:"--sa-icon-success-selected",recipe:"var(--sa-color-success-400, #52d698)",scale:"success"},{token:"--sa-icon-info-selected",recipe:"var(--sa-color-info-400, #2ccaff)",scale:"info"},{token:"--sa-icon-warning-selected",recipe:"var(--sa-color-warning-400, #ed9f30)",scale:"warning"},{token:"--sa-background-primary",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-background-primary-inverse",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-background-subtle",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-background-hover",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-background-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-background-disable",recipe:"var(--sa-color-white-alpha-a5, #bdbdbd0d)",scale:"white"},{token:"--sa-background-overlay",recipe:"var(--sa-color-black-alpha-a45, #00000073)",scale:"black"},{token:"--sa-background-brand",recipe:"#3b6fe0",scale:null},{token:"--sa-background-brand-hover",recipe:"#5581e8",scale:null},{token:"--sa-background-brand-pressed",recipe:"#2f5ad2",scale:null},{token:"--sa-background-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-background-brand-subtle",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-background-brand-subtle-hover",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-background-brand-subtle-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-background-brand-subtlest",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-background-error",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-pressed",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-background-error-disable",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-background-error-subtle",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-background-error-subtle-hover",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-background-error-subtlest",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-background-error-subtlest-hover",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-subtlest-pressed",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-background-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-subtle",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-background-success-subtle-hover",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-background-success-subtlest",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-background-success-subtlest-hover",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-subtlest-pressed",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-info",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-background-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-subtle",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-background-info-subtle-hover",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-background-info-subtlest",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-background-info-subtlest-hover",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-subtlest-pressed",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-background-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-background-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-subtle",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-background-warning-subtle-hover",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-background-warning-subtlest",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-background-warning-subtlest-hover",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-subtlest-pressed",recipe:"var(--sa-color-warning-500, #d18d2c)",scale:"warning"},{token:"--sa-background-neutral",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-background-neutral-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-background-neutral-pressed",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-background-secondary",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-hover",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-background-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-background-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-subtle",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-border-primary",recipe:"var(--sa-color-white-alpha-a20, #ceced933)",scale:"white"},{token:"--sa-border-primary-inverse",recipe:"var(--sa-color-dark-400, #4b4d51)",scale:"dark"},{token:"--sa-border-subtle",recipe:"var(--sa-color-white-alpha-a10, #bdbdbd1a)",scale:"white"},{token:"--sa-border-bold",recipe:"var(--sa-color-dark-500, #63666b)",scale:"dark"},{token:"--sa-border-disabled",recipe:"var(--sa-color-white-alpha-a5, #bdbdbd0d)",scale:"white"},{token:"--sa-border-focused",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-border-input",recipe:"var(--sa-color-dark-500, #63666b)",scale:"dark"},{token:"--sa-border-selected",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-border-brand",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-border-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-border-danger",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-border-danger-subtle",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-border-danger-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-border-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-border-success-subtle",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-border-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-border-info",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-border-info-subtle",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-border-warning",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-border-warning-subtle",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-accent-primary",recipe:"var(--sa-color-gray-100, #f8f8f8)",scale:"gray"},{token:"--sa-accent-subtle",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-accent-success",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-accent-success-subtle",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-accent-danger",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-accent-danger-subtle",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-accent-info",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-accent-info-subtle",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-accent-warning",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-accent-warning-subtle",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-accent-brand",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-accent-brand-subtle",recipe:"var(--sa-color-amber-900, #4d3008)",scale:"amber"},{token:"--sa-background-accent-subtle",recipe:"var(--sa-color-amber-800, #7a4c0a)",scale:"amber"},{token:"--sa-background-accent-subtlest",recipe:"var(--sa-color-amber-900, #4d3008)",scale:"amber"},{token:"--sa-text-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-icon-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-border-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"}],Ee=["--sa-background-brand","--sa-background-brand-hover","--sa-background-brand-pressed"],Me={name:"starasia",brand:"#1a4fa0",neutral:"#7d818a",error:"#ff4d6d",success:"#30ce84",info:"#00abeb",warning:"#ed9f30",radius:8,font:{body:"Inter"}},oe='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Ae='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',x=e=>Math.round(e*10)/10;function D(e,r,a,s){s.forEach((c,o)=>{e[`--sa-color-${r}-${c}`]=a[o]})}function ce(e,r={}){var g,y,w;const a=r.as??"root";if(a==="skin"&&!r.name)throw new Error('buildTheme: options.name wajib saat as:"skin"');const s=a==="skin"?`[data-skin="${r.name}"]`:r.selector??":root",c=r.darkPrimary??!0,o={},i={},b={brand:[]},t=new Set(["brand"]),u=Y(e.brand,J.brand);if(b.brand=u,D(o,"brand",u,U),o["--sa-text-on-brand"]=F(u[6]),["error","success","info","warning"].forEach(f=>{const m=e[f];if(!m)return;const v=Y(m,J[f]);b[f]=v,D(o,f,v,U),t.add(f)}),e.neutral){const f=G(e.neutral,ae),m=G(e.neutral,se);b.gray=f,b.dark=m,D(o,"gray",f,H),D(o,"dark",m,H),t.add("gray"),t.add("dark")}if(typeof e.radius=="number"){const f=e.radius;o["--sa-radii-xs"]=`${x(f*.5)}px`,o["--sa-radii-sm"]=`${x(f*.75)}px`,o["--sa-radii-md"]=`${x(f)}px`,o["--sa-radii-lg"]=`${x(f*1.5)}px`,o["--sa-radii-xl"]=`${x(f*1.75)}px`,o["--sa-radii-2xl"]=`${x(f*2)}px`,o["--sa-radii-rounded"]=`${x(f)}px`}if((g=e.font)!=null&&g.body&&(o["--sa-font-family"]=`"${e.font.body}", ${oe}`),(y=e.font)!=null&&y.heading&&(o["--sa-font-family-heading"]=`"${e.font.heading}", ${oe}`),(w=e.font)!=null&&w.mono&&(o["--sa-font-family-mono"]=`"${e.font.mono}", ${Ae}`),c){const f=u[4];i["--sa-background-brand"]=f,i["--sa-background-brand-hover"]=u[3],i["--sa-background-brand-pressed"]=u[5],i["--sa-text-on-brand"]=F(f)}return{css:a==="skin"?Le(s,o,i,t):Ce(s,o,i),rootTokens:o,darkTokens:i,ramps:b}}function T(e,r){const a=Object.entries(r).map(([s,c])=>` ${s}: ${c};`);return a.length?`${e} {
1
+ (function(n,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(n=typeof globalThis<"u"?globalThis:n||self,p(n["@starasia/theme"]={},n.jsxRuntime,n.React))})(this,function(n,p,k){"use strict";var fe,ue;const pe=(e,r)=>{if(typeof document>"u")return;const a=document.getElementById(r);if(a)a.textContent=e;else{const s=document.createElement("style");s.id=r,s.textContent=e,document.head.appendChild(s)}},ve=e=>{if(typeof document>"u")return null;const r=document.getElementById(e);if(r)return r;const a=document.createElement("style");return a.id=e,document.head.appendChild(a),a};function _(e){let r=e.trim().replace(/^#/,"");r.length===3&&(r=r.split("").map(s=>s+s).join("")),r.length===8&&(r=r.slice(0,6));const a=parseInt(r,16);return{r:(a>>16&255)/255,g:(a>>8&255)/255,b:(a&255)/255}}const j=e=>Math.max(0,Math.min(255,Math.round(e*255))).toString(16).padStart(2,"0");function V({r:e,g:r,b:a}){return`#${j(e)}${j(r)}${j(a)}`}const S=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4),B=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055;function ge(e,r,a){const s=.4122214708*e+.5363325363*r+.0514459929*a,c=.2119034982*e+.6806995451*r+.1073969566*a,o=.0883024619*e+.2817188376*r+.6299787005*a,l=Math.cbrt(s),b=Math.cbrt(c),i=Math.cbrt(o);return{L:.2104542553*l+.793617785*b-.0040720468*i,a:1.9779984951*l-2.428592205*b+.4505937099*i,b:.0259040371*l+.7827717662*b-.808675766*i}}function ye(e,r,a){const s=e+.3963377774*r+.2158037573*a,c=e-.1055613458*r-.0638541728*a,o=e-.0894841775*r-1.291485548*a,l=s*s*s,b=c*c*c,i=o*o*o;return{r:4.0767416621*l-3.3077115913*b+.2309699292*i,g:-1.2684380046*l+2.6097574011*b-.3413193965*i,b:-.0041960863*l-.7034186147*b+1.707614701*i}}function X({r:e,g:r,b:a}){const{L:s,a:c,b:o}=ge(S(e),S(r),S(a)),l=Math.sqrt(c*c+o*o);let b=Math.atan2(o,c)*180/Math.PI;return b<0&&(b+=360),{l:s,c:l,h:b}}const D=e=>X(_(e)),Z=({r:e,g:r,b:a},s=1e-4)=>e>=-s&&e<=1+s&&r>=-s&&r<=1+s&&a>=-s&&a<=1+s;function me({l:e,c:r,h:a}){const s=a*Math.PI/180,c=l=>ye(e,l*Math.cos(s),l*Math.sin(s));let o=c(r);if(!Z(o)){let l=0,b=r;for(let i=0;i<20;i++){const u=(l+b)/2;o=c(u),Z(o)?l=u:b=u}o=c(l)}return{r:Math.min(1,Math.max(0,B(o.r))),g:Math.min(1,Math.max(0,B(o.g))),b:Math.min(1,Math.max(0,B(o.b)))}}const P=e=>V(me(e));function ee({r:e,g:r,b:a}){return .2126*S(e)+.7152*S(r)+.0722*S(a)}function re(e,r){const a=ee(_(e)),s=ee(_(r)),c=Math.max(a,s),o=Math.min(a,s);return(c+.05)/(o+.05)}function F(e,r=["#ffffff","#1e1f21"]){let a=r[0],s=-1;for(const c of r){const o=re(e,c);o>s&&(s=o,a=c)}return a}const U=["50","100","200","300","400","500","600","700","800","900"],H=["50","100","200","300","400","500","600","700","800","900","1000","1100"],J={brand:{L:[.9434,.8816,.7612,.6375,.5179,.4415,.2695,.2429,.2155,.1878],C:[.0143,.031,.0645,.1017,.1394,.1429,.086,.0761,.066,.0549]},error:{L:[.9678,.8921,.8422,.7752,.7325,.6785,.54,.4653,.3903,.3073],C:[.0166,.0588,.09,.1362,.169,.2131,.2047,.1753,.1448,.1075]},success:{L:[.9836,.9065,.8635,.8241,.7874,.7549,.6605,.5598,.4572,.3455],C:[.0231,.0626,.0939,.1214,.1468,.1662,.1444,.1203,.0962,.0689]},info:{L:[.9783,.9523,.908,.8431,.7845,.6989,.6232,.5302,.4651,.3061],C:[.0134,.0275,.0604,.1075,.1426,.147,.1432,.1223,.1045,.0663]},warning:{L:[.9673,.9003,.8504,.8055,.7624,.6961,.5244,.3979,.2567,.2201],C:[.0205,.0679,.0991,.1284,.1495,.1346,.0998,.0731,.0415,.0332]}},ae=[1,.9791,.9577,.9007,.7857,.6501,.6028,.5383,.4389,.36,.2856,.239],se=[.2127,.2401,.3133,.3673,.4198,.5093,.603,.682,.7408,.8102,.8546,.9153],he=.02;function Y(e,r){const{c:a,h:s}=D(e),c=Math.max(...r.C)||1;return r.L.map((o,l)=>P({l:o,c:a*(r.C[l]/c),h:s}))}function G(e,r){const{c:a,h:s}=D(e),c=Math.min(a,he),o=r.length;return r.map((l,b)=>{const i=b/(o-1),u=1-Math.abs(2*i-1);return P({l,c:c*u,h:s})})}function we(e,r){let a=e[0],s=1/0;for(const c of e){const o=Math.abs(D(c).l-r);o<s&&(s=o,a=c)}return a}const xe=[{token:"--sa-text-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-text-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-on-brand",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-text-brand-bolder",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-text-brand-hover",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-text-brand-pressed",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-text-brand-disable",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-text-error",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-text-error-bolder",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-text-error-hover",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-text-error-pressed",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-text-error-disable",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-text-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-text-success-bolder",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-text-success-hover",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-text-success-pressed",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-text-success-disable",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-text-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-text-info-bolder",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-text-info-hover",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-text-info-pressed",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-text-info-disable",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-text-subtle",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-text-subtlest",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-text-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-text-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-text-disable",recipe:"var(--sa-color-black-alpha-a50, #181a1980)",scale:"black"},{token:"--sa-text-bolder",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-text-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-text-warning-bolder",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-text-warning-hover",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-text-warning-pressed",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-text-warning-disable",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-text-secondary",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-text-secondary-bolder",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-text-secondary-hover",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-text-secondary-pressed",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-text-secondary-disable",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-icon-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-icon-subtle",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-icon-subtlest",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-icon-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-icon-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-icon-disable",recipe:"var(--sa-color-black-alpha-a50, #181a1980)",scale:"black"},{token:"--sa-icon-bolder",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-icon-brand-bolder",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-icon-brand-hover",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-icon-brand-pressed",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-icon-brand-disable",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-icon-error",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-icon-error-bolder",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-icon-error-hover",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-icon-error-pressed",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-icon-error-disable",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-icon-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-icon-success-bolder",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-icon-success-hover",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-icon-success-pressed",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-icon-success-disable",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-icon-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-icon-info-bolder",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-icon-info-hover",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-icon-info-pressed",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-icon-info-disable",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-icon-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-icon-warning-bolder",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-icon-warning-hover",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-icon-warning-pressed",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-icon-warning-disable",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-icon-secondary",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-icon-secondary-bolder",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-icon-secondary-hover",recipe:"var(--sa-color-secondary-900, #00003c)",scale:"secondary"},{token:"--sa-icon-secondary-pressed",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-icon-secondary-disable",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-brand-selected",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-icon-error-selected",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-icon-success-selected",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-icon-info-selected",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-icon-warning-selected",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-primary",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-background-primary-inverse",recipe:"var(--sa-color-gray-100, #f8f8f8)",scale:"gray"},{token:"--sa-background-subtle",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-hover",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-background-pressed",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-disable",recipe:"var(--sa-color-black-alpha-a5, #1717170d)",scale:"black"},{token:"--sa-background-overlay",recipe:"var(--sa-color-black-alpha-a45, #00000073)",scale:"black"},{token:"--sa-background-brand",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-background-brand-hover",recipe:"var(--sa-color-brand-800, #021937)",scale:"brand"},{token:"--sa-background-brand-pressed",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-background-brand-disable",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-background-brand-subtle",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-background-brand-subtle-hover",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-background-brand-subtle-pressed",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-background-brand-subtlest",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-background-error",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-hover",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-error-pressed",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-disable",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtle",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtle-hover",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-background-error-subtlest",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-background-error-subtlest-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-subtlest-pressed",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-background-success",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-background-success-hover",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-success-pressed",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-disable",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtle",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-background-success-subtle-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtlest",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-background-success-subtlest-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-subtlest-pressed",recipe:"var(--sa-color-success-300, #75dead)",scale:"success"},{token:"--sa-background-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-background-info-hover",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-info-pressed",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-disable",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtle",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-background-info-subtle-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtlest",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-background-info-subtlest-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-subtlest-pressed",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-background-warning",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-hover",recipe:"var(--sa-color-warning-500, #d18d2c)",scale:"warning"},{token:"--sa-background-warning-pressed",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-disable",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtle",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-background-warning-subtle-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtlest",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-background-warning-subtlest-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-subtlest-pressed",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-background-neutral",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-background-neutral-hover",recipe:"var(--sa-color-gray-300, #dddee1)",scale:"gray"},{token:"--sa-background-neutral-pressed",recipe:"var(--sa-color-gray-400, #b7b9be)",scale:"gray"},{token:"--sa-background-secondary",recipe:"var(--sa-color-secondary-500, #001ed2)",scale:"secondary"},{token:"--sa-background-secondary-hover",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-pressed",recipe:"var(--sa-color-secondary-700, #001595)",scale:"secondary"},{token:"--sa-background-secondary-disable",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-background-secondary-subtle",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-border-primary",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-border-primary-inverse",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-border-subtle",recipe:"var(--sa-color-black-alpha-a10, #0515241a)",scale:"black"},{token:"--sa-border-bold",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-border-disabled",recipe:"var(--sa-color-black-alpha-a5, #1717170d)",scale:"black"},{token:"--sa-border-focused",recipe:"var(--sa-color-brand-500, #1a4fa0)",scale:"brand"},{token:"--sa-border-input",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-border-selected",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-border-brand",recipe:"var(--sa-color-brand-700, #031f43)",scale:"brand"},{token:"--sa-border-brand-disable",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-border-danger",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-border-danger-subtle",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-border-danger-disable",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-border-success",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-border-success-subtle",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-border-success-disable",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-border-info",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-border-info-subtle",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-border-warning",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-border-warning-subtle",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-accent-primary",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-accent-subtle",recipe:"var(--sa-color-gray-200, #f0f1f2)",scale:"gray"},{token:"--sa-accent-success",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-accent-success-subtle",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-accent-danger",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-accent-danger-subtle",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-accent-info",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-accent-info-subtle",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-accent-warning",recipe:"var(--sa-color-warning-400, #ed9f30)",scale:"warning"},{token:"--sa-accent-warning-subtle",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-accent-brand",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"},{token:"--sa-accent-brand-subtle",recipe:"var(--sa-color-amber-50, #fff8eb)",scale:"amber"},{token:"--sa-background-accent",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"},{token:"--sa-background-accent-hover",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-background-accent-pressed",recipe:"var(--sa-color-amber-600, #d4870f)",scale:"amber"},{token:"--sa-background-accent-subtle",recipe:"var(--sa-color-amber-100, #ffefcc)",scale:"amber"},{token:"--sa-background-accent-subtlest",recipe:"var(--sa-color-amber-50, #fff8eb)",scale:"amber"},{token:"--sa-text-accent",recipe:"var(--sa-color-amber-800, #7a4c0a)",scale:"amber"},{token:"--sa-text-on-accent",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-accent",recipe:"var(--sa-color-amber-700, #a8690b)",scale:"amber"},{token:"--sa-border-accent",recipe:"var(--sa-color-amber-500, #f5a524)",scale:"amber"}],Se=[{token:"--sa-text-primary",recipe:"var(--sa-color-dark-1100, #e2e3e4)",scale:"dark"},{token:"--sa-text-primary-inverse",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-text-brand",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-text-brand-bolder",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-text-brand-hover",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-text-brand-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-text-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-text-error",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-text-error-bolder",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-text-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-text-error-pressed",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-text-error-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-text-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-text-success-bolder",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-text-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-text-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-text-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-text-info",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-text-info-bolder",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-text-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-text-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-text-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-text-subtle",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-text-subtlest",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-text-hover",recipe:"var(--sa-color-dark-400, #4b4d51)",scale:"dark"},{token:"--sa-text-pressed",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-text-disable",recipe:"var(--sa-color-white-alpha-a20, #ceced933)",scale:"white"},{token:"--sa-text-bolder",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-text-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-text-warning-bolder",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-text-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-text-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-text-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-text-secondary",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-text-secondary-bolder",recipe:"var(--sa-color-secondary-50, #e6e9fb)",scale:"secondary"},{token:"--sa-text-secondary-hover",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-text-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-text-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-icon-primary",recipe:"var(--sa-color-dark-1100, #e2e3e4)",scale:"dark"},{token:"--sa-icon-primary-inverse",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-icon-subtle",recipe:"var(--sa-color-gray-500, #8c8f97)",scale:"gray"},{token:"--sa-icon-subtlest",recipe:"var(--sa-color-gray-600, #7d818a)",scale:"gray"},{token:"--sa-icon-hover",recipe:"var(--sa-color-dark-900, #bfc1c4)",scale:"dark"},{token:"--sa-icon-pressed",recipe:"var(--sa-color-dark-1000, #cecfd2)",scale:"dark"},{token:"--sa-icon-disable",recipe:"var(--sa-color-white-alpha-a50, #e3e4f280)",scale:"white"},{token:"--sa-icon-bolder",recipe:"var(--sa-color-gray-50, #ffffff)",scale:"gray"},{token:"--sa-icon-brand",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-icon-brand-bolder",recipe:"var(--sa-color-brand-50, #e6edf6)",scale:"brand"},{token:"--sa-icon-brand-hover",recipe:"var(--sa-color-brand-100, #ccd9ed)",scale:"brand"},{token:"--sa-icon-brand-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-icon-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-icon-error",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-icon-error-bolder",recipe:"var(--sa-color-error-50, #fff0f3)",scale:"error"},{token:"--sa-icon-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-icon-error-pressed",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-icon-error-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-icon-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-icon-success-bolder",recipe:"var(--sa-color-success-50, #ecfff6)",scale:"success"},{token:"--sa-icon-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-icon-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-icon-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-icon-info",recipe:"var(--sa-color-info-300, #75dbff)",scale:"info"},{token:"--sa-icon-info-bolder",recipe:"var(--sa-color-info-50, #effaff)",scale:"info"},{token:"--sa-icon-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-icon-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-icon-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-icon-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-icon-warning-bolder",recipe:"var(--sa-color-warning-50, #fef2e6)",scale:"warning"},{token:"--sa-icon-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-icon-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-icon-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-icon-secondary",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-icon-secondary-bolder",recipe:"var(--sa-color-secondary-50, #e6e9fb)",scale:"secondary"},{token:"--sa-icon-secondary-hover",recipe:"var(--sa-color-secondary-100, #b0b9f1)",scale:"secondary"},{token:"--sa-icon-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-icon-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-icon-brand-selected",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-icon-error-selected",recipe:"var(--sa-color-error-400, #ff758f)",scale:"error"},{token:"--sa-icon-success-selected",recipe:"var(--sa-color-success-400, #52d698)",scale:"success"},{token:"--sa-icon-info-selected",recipe:"var(--sa-color-info-400, #2ccaff)",scale:"info"},{token:"--sa-icon-warning-selected",recipe:"var(--sa-color-warning-400, #ed9f30)",scale:"warning"},{token:"--sa-background-primary",recipe:"var(--sa-color-gray-1100, #1e1f21)",scale:"gray"},{token:"--sa-background-primary-inverse",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-background-subtle",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-background-hover",recipe:"var(--sa-color-gray-1000, #292a2e)",scale:"gray"},{token:"--sa-background-pressed",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-background-disable",recipe:"var(--sa-color-white-alpha-a5, #bdbdbd0d)",scale:"white"},{token:"--sa-background-overlay",recipe:"var(--sa-color-black-alpha-a45, #00000073)",scale:"black"},{token:"--sa-background-brand",recipe:"#3b6fe0",scale:null},{token:"--sa-background-brand-hover",recipe:"#5581e8",scale:null},{token:"--sa-background-brand-pressed",recipe:"#2f5ad2",scale:null},{token:"--sa-background-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-background-brand-subtle",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-background-brand-subtle-hover",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-background-brand-subtle-pressed",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-background-brand-subtlest",recipe:"var(--sa-color-brand-900, #02132b)",scale:"brand"},{token:"--sa-background-error",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-error-hover",recipe:"var(--sa-color-error-100, #ffccd5)",scale:"error"},{token:"--sa-background-error-pressed",recipe:"var(--sa-color-error-300, #ff8fa3)",scale:"error"},{token:"--sa-background-error-disable",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-background-error-subtle",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-background-error-subtle-hover",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-background-error-subtlest",recipe:"var(--sa-color-error-900, #590d22)",scale:"error"},{token:"--sa-background-error-subtlest-hover",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-background-error-subtlest-pressed",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-background-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-success-hover",recipe:"var(--sa-color-success-100, #baeed6)",scale:"success"},{token:"--sa-background-success-pressed",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-background-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-subtle",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-background-success-subtle-hover",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-background-success-subtlest",recipe:"var(--sa-color-success-900, #10442c)",scale:"success"},{token:"--sa-background-success-subtlest-hover",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-background-success-subtlest-pressed",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-background-info",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-info-hover",recipe:"var(--sa-color-info-100, #def3ff)",scale:"info"},{token:"--sa-background-info-pressed",recipe:"var(--sa-color-info-200, #b6eaff)",scale:"info"},{token:"--sa-background-info-disable",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-subtle",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-background-info-subtle-hover",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-background-info-subtlest",recipe:"var(--sa-color-info-900, #04334d)",scale:"info"},{token:"--sa-background-info-subtlest-hover",recipe:"var(--sa-color-info-600, #0090d4)",scale:"info"},{token:"--sa-background-info-subtlest-pressed",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-background-warning",recipe:"var(--sa-color-warning-300, #f1b259)",scale:"warning"},{token:"--sa-background-warning-hover",recipe:"var(--sa-color-warning-100, #f8d9ac)",scale:"warning"},{token:"--sa-background-warning-pressed",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-background-warning-disable",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-subtle",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-background-warning-subtle-hover",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-background-warning-subtlest",recipe:"var(--sa-color-warning-900, #241808)",scale:"warning"},{token:"--sa-background-warning-subtlest-hover",recipe:"var(--sa-color-warning-600, #8e5f1d)",scale:"warning"},{token:"--sa-background-warning-subtlest-pressed",recipe:"var(--sa-color-warning-500, #d18d2c)",scale:"warning"},{token:"--sa-background-neutral",recipe:"var(--sa-color-gray-900, #3b3d42)",scale:"gray"},{token:"--sa-background-neutral-hover",recipe:"var(--sa-color-gray-800, #505258)",scale:"gray"},{token:"--sa-background-neutral-pressed",recipe:"var(--sa-color-gray-700, #6b6e76)",scale:"gray"},{token:"--sa-background-secondary",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-hover",recipe:"var(--sa-color-secondary-300, #5468e1)",scale:"secondary"},{token:"--sa-background-secondary-pressed",recipe:"var(--sa-color-secondary-200, #8a98ea)",scale:"secondary"},{token:"--sa-background-secondary-disable",recipe:"var(--sa-color-secondary-600, #001bbf)",scale:"secondary"},{token:"--sa-background-secondary-subtle",recipe:"var(--sa-color-secondary-800, #001174)",scale:"secondary"},{token:"--sa-border-primary",recipe:"var(--sa-color-white-alpha-a20, #ceced933)",scale:"white"},{token:"--sa-border-primary-inverse",recipe:"var(--sa-color-dark-400, #4b4d51)",scale:"dark"},{token:"--sa-border-subtle",recipe:"var(--sa-color-white-alpha-a10, #bdbdbd1a)",scale:"white"},{token:"--sa-border-bold",recipe:"var(--sa-color-dark-500, #63666b)",scale:"dark"},{token:"--sa-border-disabled",recipe:"var(--sa-color-white-alpha-a5, #bdbdbd0d)",scale:"white"},{token:"--sa-border-focused",recipe:"var(--sa-color-brand-300, #668cc9)",scale:"brand"},{token:"--sa-border-input",recipe:"var(--sa-color-dark-500, #63666b)",scale:"dark"},{token:"--sa-border-selected",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-border-brand",recipe:"var(--sa-color-brand-400, #3366b7)",scale:"brand"},{token:"--sa-border-brand-disable",recipe:"var(--sa-color-brand-600, #04254f)",scale:"brand"},{token:"--sa-border-danger",recipe:"var(--sa-color-error-500, #ff4d6d)",scale:"error"},{token:"--sa-border-danger-subtle",recipe:"var(--sa-color-error-700, #a4133c)",scale:"error"},{token:"--sa-border-danger-disable",recipe:"var(--sa-color-error-600, #c9184a)",scale:"error"},{token:"--sa-border-success",recipe:"var(--sa-color-success-500, #30ce84)",scale:"success"},{token:"--sa-border-success-subtle",recipe:"var(--sa-color-success-700, #208958)",scale:"success"},{token:"--sa-border-success-disable",recipe:"var(--sa-color-success-600, #28ac6e)",scale:"success"},{token:"--sa-border-info",recipe:"var(--sa-color-info-500, #00abeb)",scale:"info"},{token:"--sa-border-info-subtle",recipe:"var(--sa-color-info-700, #0073ab)",scale:"info"},{token:"--sa-border-warning",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-border-warning-subtle",recipe:"var(--sa-color-warning-700, #5f4013)",scale:"warning"},{token:"--sa-accent-primary",recipe:"var(--sa-color-gray-100, #f8f8f8)",scale:"gray"},{token:"--sa-accent-subtle",recipe:"var(--sa-color-dark-200, #303134)",scale:"dark"},{token:"--sa-accent-success",recipe:"var(--sa-color-success-200, #97e6c1)",scale:"success"},{token:"--sa-accent-success-subtle",recipe:"var(--sa-color-success-800, #186742)",scale:"success"},{token:"--sa-accent-danger",recipe:"var(--sa-color-error-200, #ffb3c1)",scale:"error"},{token:"--sa-accent-danger-subtle",recipe:"var(--sa-color-error-800, #800f2f)",scale:"error"},{token:"--sa-accent-info",recipe:"var(--sa-color-brand-200, #99b3db)",scale:"brand"},{token:"--sa-accent-info-subtle",recipe:"var(--sa-color-info-800, #00608d)",scale:"info"},{token:"--sa-accent-warning",recipe:"var(--sa-color-warning-200, #f4c583)",scale:"warning"},{token:"--sa-accent-warning-subtle",recipe:"var(--sa-color-warning-800, #2f200a)",scale:"warning"},{token:"--sa-accent-brand",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-accent-brand-subtle",recipe:"var(--sa-color-amber-900, #4d3008)",scale:"amber"},{token:"--sa-background-accent-subtle",recipe:"var(--sa-color-amber-800, #7a4c0a)",scale:"amber"},{token:"--sa-background-accent-subtlest",recipe:"var(--sa-color-amber-900, #4d3008)",scale:"amber"},{token:"--sa-text-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-icon-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"},{token:"--sa-border-accent",recipe:"var(--sa-color-amber-400, #ffb63f)",scale:"amber"}],Ee={name:"starasia",brand:"#1a4fa0",neutral:"#7d818a",error:"#ff4d6d",success:"#30ce84",info:"#00abeb",warning:"#ed9f30",radius:8,font:{body:"Inter"}},oe='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Me='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',x=e=>Math.round(e*10)/10;function R(e,r,a,s){s.forEach((c,o)=>{e[`--sa-color-${r}-${c}`]=a[o]})}function ce(e,r={}){var g,y,w;const a=r.as??"root";if(a==="skin"&&!r.name)throw new Error('buildTheme: options.name wajib saat as:"skin"');const s=a==="skin"?`[data-skin="${r.name}"]`:r.selector??":root",c=r.darkPrimary??!0,o={},l={},b={brand:[]},i=new Set(["brand"]),u=Y(e.brand,J.brand);if(b.brand=u,R(o,"brand",u,U),o["--sa-text-on-brand"]=F(u[6]),["error","success","info","warning"].forEach(f=>{const m=e[f];if(!m)return;const v=Y(m,J[f]);b[f]=v,R(o,f,v,U),i.add(f)}),e.neutral){const f=G(e.neutral,ae),m=G(e.neutral,se);b.gray=f,b.dark=m,R(o,"gray",f,H),R(o,"dark",m,H),i.add("gray"),i.add("dark")}if(typeof e.radius=="number"){const f=e.radius;o["--sa-radii-xs"]=`${x(f*.5)}px`,o["--sa-radii-sm"]=`${x(f*.75)}px`,o["--sa-radii-md"]=`${x(f)}px`,o["--sa-radii-lg"]=`${x(f*1.5)}px`,o["--sa-radii-xl"]=`${x(f*1.75)}px`,o["--sa-radii-2xl"]=`${x(f*2)}px`,o["--sa-radii-rounded"]=`${x(f)}px`}if((g=e.font)!=null&&g.body&&(o["--sa-font-family"]=`"${e.font.body}", ${oe}`),(y=e.font)!=null&&y.heading&&(o["--sa-font-family-heading"]=`"${e.font.heading}", ${oe}`),(w=e.font)!=null&&w.mono&&(o["--sa-font-family-mono"]=`"${e.font.mono}", ${Me}`),c){const f=u[4];l["--sa-background-brand"]=f,l["--sa-background-brand-hover"]=u[3],l["--sa-background-brand-pressed"]=u[5],l["--sa-text-on-brand"]=F(f)}return{css:a==="skin"?Ae(s,o,l,i):Ce(s,o,l),rootTokens:o,darkTokens:l,ramps:b}}function T(e,r){const a=Object.entries(r).map(([s,c])=>` ${s}: ${c};`);return a.length?`${e} {
2
2
  ${a.join(`
3
3
  `)}
4
4
  }`:""}function Ce(e,r,a){const s=e===":root"?'[data-theme="dark"]':`${e}[data-theme="dark"], ${e} [data-theme="dark"]`;return[T(e,r),T(s,a)].filter(Boolean).join(`
5
5
 
6
- `)}function Le(e,r,a,s){const c={};for(const t of xe)t.scale&&s.has(t.scale)&&t.token!=="--sa-text-on-brand"&&(c[t.token]=t.recipe);const o={};for(const t of Se)t.scale&&s.has(t.scale)&&t.token!=="--sa-text-on-brand"&&!Ee.includes(t.token)&&(o[t.token]=t.recipe);const i={...r,...c},b={...o,...a};return[T(e,i),T(`${e}[data-theme="dark"]`,b)].filter(Boolean).join(`
6
+ `)}function Ae(e,r,a,s){const c={};for(const i of xe)i.scale&&s.has(i.scale)&&i.token!=="--sa-text-on-brand"&&(c[i.token]=i.recipe);const o={...r,...c},l={};for(const i of Se)(i.scale&&s.has(i.scale)||i.token in o)&&(l[i.token]=i.recipe);const b={...l,...a};return[T(e,o),T(`${e}[data-theme="dark"]`,b)].filter(Boolean).join(`
7
7
 
8
- `)}const E="sa-theme";function A(e=E){try{if(typeof localStorage>"u")return null;const r=localStorage.getItem(e);return r?JSON.parse(r):null}catch{return null}}function ne(e,r=E){try{if(typeof localStorage>"u")return;localStorage.setItem(r,JSON.stringify(e))}catch{}}function te(e=E){try{if(typeof localStorage>"u")return;localStorage.removeItem(e)}catch{}}function le(e){if(e==="system")try{return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}return e}function $(e){if(typeof document>"u")return;const r=document.documentElement;le(e)==="dark"?r.setAttribute("data-theme","dark"):r.removeAttribute("data-theme")}function K(e){if(typeof document>"u")return;const r=document.documentElement;e?r.setAttribute("data-skin",e):r.removeAttribute("data-skin")}function _e(e=E){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){}})();"}const ie={colors:{raw:{white:{900:"255, 255, 255"},black:{900:"0, 0, 0"},blue:{50:"230, 237, 246",100:"204, 217, 237",200:"153, 179, 219",300:"102, 140, 201",400:"51, 102, 183",500:"26, 79, 160",600:"4, 37, 79",700:"3, 31, 67",800:"2, 25, 55",900:"2, 19, 43"},pink:{50:"251, 219, 241",100:"248, 183, 228",200:"245, 147, 215",300:"241, 111, 202",400:"238, 75, 189",500:"235, 39, 176",600:"215, 19, 157",700:"179, 16, 131",800:"143, 13, 104",900:"107, 9, 78"},purple:{50:"249, 229, 252",100:"240, 196, 248",200:"230, 162, 244",300:"220, 128, 240",400:"210, 95, 236",500:"200, 61, 232",600:"180, 41, 212",700:"150, 34, 177",800:"120, 27, 142",900:"90, 21, 106"},red:{50:"251, 222, 222",100:"247, 188, 188",200:"243, 153, 153",300:"239, 119, 119",400:"235, 84, 84",500:"231, 50, 50",600:"212, 30, 30",700:"176, 25, 25",800:"141, 20, 20",900:"105, 15, 15"},orange:{50:"253, 235, 217",100:"251, 215, 179",200:"249, 195, 141",300:"247, 175, 103",400:"245, 155, 65",500:"243, 135, 27",600:"224, 116, 8",700:"187, 96, 7",800:"150, 77, 6",900:"112, 58, 4"},yellow:{50:"255, 250, 219",100:"255, 246, 184",200:"255, 241, 149",300:"255, 237, 114",400:"255, 232, 79",500:"255, 228, 44",600:"236, 209, 25",700:"197, 174, 21",800:"157, 139, 17",900:"118, 104, 12"},green:{50:"236, 255, 246",100:"151, 230, 193",200:"117, 222, 173",300:"82, 214, 152",400:"48, 206, 132",500:"40, 172, 110",600:"32, 137, 88",700:"24, 103, 66",800:"16, 68, 44",900:"16, 68, 44"},brand:{default:"4, 37, 79",active:"2, 19, 43",secondary:"153, 179, 219",tertiary:"230, 237, 246"}}},metrics:{radii:{none:"0",xs:"0.25rem",sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"0.875rem","2xl":"1rem",full:"12rem"},spacing:{0:"0rem",1:"0.063rem",2:"0.125rem",4:"0.25rem",6:"0.375rem",8:"0.5rem",10:"0.625rem",12:"0.75rem",14:"0.875rem",16:"1rem",18:"1.125rem",20:"1.25rem",24:"1.5rem",28:"1.75rem",32:"2rem",36:"2.25rem",40:"2.5rem",48:"3rem",64:"4rem",80:"5rem",96:"6rem",128:"8rem",160:"10rem",192:"12rem",224:"14rem",256:"16rem",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"4rem"},border:{default:"1px solid var(--sa-border-subtle, #0b120e24)"},shadows:{sm:"0 1px 2px 0 #0000000d",md:"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",lg:"0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",xl:"0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a","2xl":"0 25px 50px -12px #00000040",inner:"inset 0 2px 4px 0 #0000000d",card:"0px 4px 35px 0px #7090b040"}},font:{fontSizes:{xs:"0.625rem",sm:"0.75rem",md:"0.875rem",lg:"1rem",xl:"1.125rem","2xl":"1.25rem","3xl":"1.5rem","4xl":"2rem","5xl":"2.25rem","6xl":"3rem"},fontWeights:{hairline:100,thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},lineHeights:{3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"1.875rem",9:"2.25rem",10:"2.5rem",none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2}}},N=k.createContext({theme:void 0,setTheme:()=>{},seed:null,setSeed:()=>{},setMode:()=>{},setSkin:()=>{},resetTheme:()=>{}}),Re="sa-theme-style",z="sa-theme-seed-style";function De(e){const r=e.split(",").map(a=>Number(a.trim()));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("")}const Te=((ue=(fe=ie.colors)==null?void 0:fe.raw)==null?void 0:ue.blue)??{},de=e=>(e??"").replace(/\s+/g,"");function $e(e){if(!e)return"";const r=new Set(["50","100","200","300","400","500","600","700","800","900"]),a=Object.entries(e).filter(([s])=>r.has(s)).filter(([s,c])=>de(c)!==de(Te[s])).map(([s,c])=>{const o=De(c);return o?` --sa-color-brand-${s}: ${o};`:""}).filter(Boolean).join(`
8
+ `)}const E="sa-theme";function C(e=E){try{if(typeof localStorage>"u")return null;const r=localStorage.getItem(e);return r?JSON.parse(r):null}catch{return null}}function ne(e,r=E){try{if(typeof localStorage>"u")return;localStorage.setItem(r,JSON.stringify(e))}catch{}}function te(e=E){try{if(typeof localStorage>"u")return;localStorage.removeItem(e)}catch{}}function le(e){if(e==="system")try{return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}return e}function $(e){if(typeof document>"u")return;const r=document.documentElement;le(e)==="dark"?r.setAttribute("data-theme","dark"):r.removeAttribute("data-theme")}function K(e){if(typeof document>"u")return;const r=document.documentElement;e?r.setAttribute("data-skin",e):r.removeAttribute("data-skin")}function Le(e=E){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){}})();"}const ie={colors:{raw:{white:{900:"255, 255, 255"},black:{900:"0, 0, 0"},blue:{50:"230, 237, 246",100:"204, 217, 237",200:"153, 179, 219",300:"102, 140, 201",400:"51, 102, 183",500:"26, 79, 160",600:"4, 37, 79",700:"3, 31, 67",800:"2, 25, 55",900:"2, 19, 43"},pink:{50:"251, 219, 241",100:"248, 183, 228",200:"245, 147, 215",300:"241, 111, 202",400:"238, 75, 189",500:"235, 39, 176",600:"215, 19, 157",700:"179, 16, 131",800:"143, 13, 104",900:"107, 9, 78"},purple:{50:"249, 229, 252",100:"240, 196, 248",200:"230, 162, 244",300:"220, 128, 240",400:"210, 95, 236",500:"200, 61, 232",600:"180, 41, 212",700:"150, 34, 177",800:"120, 27, 142",900:"90, 21, 106"},red:{50:"251, 222, 222",100:"247, 188, 188",200:"243, 153, 153",300:"239, 119, 119",400:"235, 84, 84",500:"231, 50, 50",600:"212, 30, 30",700:"176, 25, 25",800:"141, 20, 20",900:"105, 15, 15"},orange:{50:"253, 235, 217",100:"251, 215, 179",200:"249, 195, 141",300:"247, 175, 103",400:"245, 155, 65",500:"243, 135, 27",600:"224, 116, 8",700:"187, 96, 7",800:"150, 77, 6",900:"112, 58, 4"},yellow:{50:"255, 250, 219",100:"255, 246, 184",200:"255, 241, 149",300:"255, 237, 114",400:"255, 232, 79",500:"255, 228, 44",600:"236, 209, 25",700:"197, 174, 21",800:"157, 139, 17",900:"118, 104, 12"},green:{50:"236, 255, 246",100:"151, 230, 193",200:"117, 222, 173",300:"82, 214, 152",400:"48, 206, 132",500:"40, 172, 110",600:"32, 137, 88",700:"24, 103, 66",800:"16, 68, 44",900:"16, 68, 44"},brand:{default:"4, 37, 79",active:"2, 19, 43",secondary:"153, 179, 219",tertiary:"230, 237, 246"}}},metrics:{radii:{none:"0",xs:"0.25rem",sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"0.875rem","2xl":"1rem",full:"12rem"},spacing:{0:"0rem",1:"0.063rem",2:"0.125rem",4:"0.25rem",6:"0.375rem",8:"0.5rem",10:"0.625rem",12:"0.75rem",14:"0.875rem",16:"1rem",18:"1.125rem",20:"1.25rem",24:"1.5rem",28:"1.75rem",32:"2rem",36:"2.25rem",40:"2.5rem",48:"3rem",64:"4rem",80:"5rem",96:"6rem",128:"8rem",160:"10rem",192:"12rem",224:"14rem",256:"16rem",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"4rem"},border:{default:"1px solid var(--sa-border-subtle, #0b120e24)"},shadows:{sm:"0 1px 2px 0 #0000000d",md:"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",lg:"0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",xl:"0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a","2xl":"0 25px 50px -12px #00000040",inner:"inset 0 2px 4px 0 #0000000d",card:"0px 4px 35px 0px #7090b040"}},font:{fontSizes:{xs:"0.625rem",sm:"0.75rem",md:"0.875rem",lg:"1rem",xl:"1.125rem","2xl":"1.25rem","3xl":"1.5rem","4xl":"2rem","5xl":"2.25rem","6xl":"3rem"},fontWeights:{hairline:100,thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},lineHeights:{3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"1.875rem",9:"2.25rem",10:"2.5rem",none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2}}},O=k.createContext({theme:void 0,setTheme:()=>{},seed:null,setSeed:()=>{},setMode:()=>{},setSkin:()=>{},resetTheme:()=>{}}),_e="sa-theme-style",z="sa-theme-seed-style";function De(e){const r=e.split(",").map(a=>Number(a.trim()));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("")}const Re=((ue=(fe=ie.colors)==null?void 0:fe.raw)==null?void 0:ue.blue)??{},de=e=>(e??"").replace(/\s+/g,"");function Te(e){if(!e)return"";const r=new Set(["50","100","200","300","400","500","600","700","800","900"]),a=Object.entries(e).filter(([s])=>r.has(s)).filter(([s,c])=>de(c)!==de(Re[s])).map(([s,c])=>{const o=De(c);return o?` --sa-color-brand-${s}: ${o};`:""}).filter(Boolean).join(`
9
9
  `);return a?`:root {
10
10
  ${a}
11
- }`:""}function Ne({value:e,seed:r,persist:a=!0,storageKey:s=E,manageAttributes:c=!1,children:o}){const[i,b]=k.useState(e),t=r!==void 0,[u,M]=k.useState(()=>{if(t)return r;if(a){const d=A(s);if(d!=null&&d.seed)return d.seed}return null}),g=t?r:u,y=k.useMemo(()=>g?JSON.stringify(g):"",[g]);k.useEffect(()=>{if(typeof document>"u")return;if(!y){const l=document.getElementById(z);l&&(l.textContent="");return}const{css:d}=ce(JSON.parse(y));pe(d,z)},[y]),k.useEffect(()=>{var l;if(!c||!a)return;const d=A(s);if(d&&(d.mode&&$(d.mode),d.skin!==void 0&&K(d.skin),d.mode==="system"&&typeof window<"u")){const h=window.matchMedia("(prefers-color-scheme: dark)"),L=()=>$("system");return(l=h.addEventListener)==null||l.call(h,"change",L),()=>{var ke;return(ke=h.removeEventListener)==null?void 0:ke.call(h,"change",L)}}},[c,a,s]);const w=k.useMemo(()=>i?JSON.stringify(i):"",[i]),f=k.useRef(null);k.useEffect(()=>{var h,L;f.current||(f.current=ve(Re));const d=f.current;if(!d)return;const l=w?JSON.parse(w):void 0;d.textContent=l?$e((L=(h=l==null?void 0:l.colors)==null?void 0:h.raw)==null?void 0:L.blue):""},[w]),k.useEffect(()=>()=>{f.current&&(f.current.textContent="")},[]);const m=d=>{d&&b(d)},v=k.useCallback(d=>{if(!a)return;const l=A(s)||{};ne({...l,...d},s)},[a,s]),q=k.useCallback(d=>{t||(M(d),v({seed:d}))},[t,v]),Q=k.useCallback(d=>{$(d),v({mode:d})},[v]),O=k.useCallback(d=>{K(d),v({skin:d})},[v]),I=k.useCallback(()=>{if(t||M(null),te(s),typeof document<"u"){const d=document.getElementById(z);d&&(d.textContent="")}},[t,s]);return p.jsx(N.Provider,{value:{theme:i,setTheme:m,seed:g,setSeed:q,setMode:Q,setSkin:O,resetTheme:I},children:o})}const Oe=[{name:null,label:"Default"},{name:"tech",label:"Tech"}],Ie=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function je({skins:e=Oe,showMode:r=!0,allowCustom:a=!1,storageKey:s,className:c,style:o}){var d;const{setMode:i,setSkin:b,setSeed:t}=k.useContext(N),u=typeof window<"u"?A(s):null,[M,g]=k.useState((u==null?void 0:u.mode)??(typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light")),[y,w]=k.useState((u==null?void 0:u.skin)??(typeof document<"u"?document.documentElement.getAttribute("data-skin"):null)),[f,m]=k.useState(((d=u==null?void 0:u.seed)==null?void 0:d.brand)??"#1a4fa0"),v=l=>{g(l),i(l)},q=l=>{w(l),b(l)},Q=l=>{m(l),t({brand:l})},O={display:"inline-flex",gap:4,padding:4,borderRadius:"var(--sa-radii-md)",background:"var(--sa-background-neutral)"},I=l=>({border:"none",cursor:"pointer",fontSize:12,fontWeight:500,padding:"4px 10px",borderRadius:"var(--sa-radii-sm)",background:l?"var(--sa-background-primary)":"transparent",color:l?"var(--sa-text-primary)":"var(--sa-text-subtle)",boxShadow:l?"var(--sa-shadow-sm)":"none"});return p.jsxs("div",{className:c,style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center",...o},children:[r&&p.jsx("div",{role:"group","aria-label":"Mode",style:O,children:Ie.map(l=>p.jsx("button",{type:"button","aria-pressed":M===l.value,style:I(M===l.value),onClick:()=>v(l.value),children:l.label},l.value))}),e.length>0&&p.jsx("div",{role:"group","aria-label":"Skin",style:O,children:e.map(l=>p.jsx("button",{type:"button","aria-pressed":y===l.name,style:I(y===l.name),onClick:()=>q(l.name),children:l.label},l.name??"default"))}),a&&p.jsxs("label",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"var(--sa-text-subtle)"},children:["Brand",p.jsx("input",{type:"color",value:f,onChange:l=>Q(l.target.value),"aria-label":"Custom brand color",style:{width:28,height:28,border:"1px solid var(--sa-border-subtle)",borderRadius:6,background:"none",cursor:"pointer",padding:0}})]})]})}const W=ie,be=(e,r)=>{const a={};return Object.keys(e).forEach(s=>{if(e!=null&&e[s]&&typeof(e==null?void 0:e[s])=="object"){a[s]={...e==null?void 0:e[s],...r==null?void 0:r[s],...be(e==null?void 0:e[s],r==null?void 0:r[s])};return}a[s]=(r==null?void 0:r[s])||(e==null?void 0:e[s])}),a};function C(){const e=k.useContext(N),r=k.useMemo(()=>({...W,...e.theme,...be(W,e.theme)}),[e.theme,W]);return{...e,theme:r}}function Be(){const{theme:e}=C();return e.colors}function Pe(){var r;const{theme:e}=C();return(r=e.metrics)==null?void 0:r.spacing}function Fe(){var r;const{theme:e}=C();return(r=e.metrics)==null?void 0:r.radii}function Ue(){var r;const{theme:e}=C();return(r=e==null?void 0:e.metrics)==null?void 0:r.shadows}function He(e){return e}n.DEFAULT_STORAGE_KEY=E,n.LADDERS=J,n.NEUTRAL_LADDER_DARK=se,n.NEUTRAL_LADDER_GRAY=ae,n.SA_DEFAULT_SEED=Me,n.SCALE_KEYS_10=U,n.SCALE_KEYS_12=H,n.ThemeContext=N,n.ThemeProvider=Ne,n.ThemeSwitcher=je,n.applyMode=$,n.applySkin=K,n.buildTheme=ce,n.clearPref=te,n.contrastRatio=re,n.createTheme=He,n.hexToOklch=R,n.hexToRgb=_,n.neutralRamp=G,n.oklchToHex=P,n.pickByLightness=we,n.pickTextOn=F,n.rampFromSeed=Y,n.readPref=A,n.resolveMode=le,n.rgbToHex=V,n.rgbToOklch=X,n.themeBootScript=_e,n.useColor=Be,n.useRadius=Fe,n.useShadow=Ue,n.useSpacing=Pe,n.useTheme=C,n.writePref=ne,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
11
+ }`:""}function $e({value:e,seed:r,persist:a=!0,storageKey:s=E,manageAttributes:c=!1,children:o}){const[l,b]=k.useState(e),i=r!==void 0,[u,M]=k.useState(()=>{if(i)return r;if(a){const d=C(s);if(d!=null&&d.seed)return d.seed}return null}),g=i?r:u,y=k.useMemo(()=>g?JSON.stringify(g):"",[g]);k.useEffect(()=>{if(typeof document>"u")return;if(!y){const t=document.getElementById(z);t&&(t.textContent="");return}const{css:d}=ce(JSON.parse(y));pe(d,z)},[y]),k.useEffect(()=>{var t;if(!c||!a)return;const d=C(s);if(d&&(d.mode&&$(d.mode),d.skin!==void 0&&K(d.skin),d.mode==="system"&&typeof window<"u")){const h=window.matchMedia("(prefers-color-scheme: dark)"),L=()=>$("system");return(t=h.addEventListener)==null||t.call(h,"change",L),()=>{var ke;return(ke=h.removeEventListener)==null?void 0:ke.call(h,"change",L)}}},[c,a,s]);const w=k.useMemo(()=>l?JSON.stringify(l):"",[l]),f=k.useRef(null);k.useEffect(()=>{var h,L;f.current||(f.current=ve(_e));const d=f.current;if(!d)return;const t=w?JSON.parse(w):void 0;d.textContent=t?Te((L=(h=t==null?void 0:t.colors)==null?void 0:h.raw)==null?void 0:L.blue):""},[w]),k.useEffect(()=>()=>{f.current&&(f.current.textContent="")},[]);const m=d=>{d&&b(d)},v=k.useCallback(d=>{if(!a)return;const t=C(s)||{};ne({...t,...d},s)},[a,s]),q=k.useCallback(d=>{i||(M(d),v({seed:d}))},[i,v]),Q=k.useCallback(d=>{$(d),v({mode:d})},[v]),N=k.useCallback(d=>{K(d),v({skin:d})},[v]),I=k.useCallback(()=>{if(i||M(null),te(s),typeof document<"u"){const d=document.getElementById(z);d&&(d.textContent="")}},[i,s]);return p.jsx(O.Provider,{value:{theme:l,setTheme:m,seed:g,setSeed:q,setMode:Q,setSkin:N,resetTheme:I},children:o})}const Oe=[{name:null,label:"Default"},{name:"tech",label:"Tech"}],Ne=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function Ie({skins:e=Oe,showMode:r=!0,allowCustom:a=!1,storageKey:s,className:c,style:o}){var d;const{setMode:l,setSkin:b,setSeed:i}=k.useContext(O),u=typeof window<"u"?C(s):null,[M,g]=k.useState((u==null?void 0:u.mode)??(typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light")),[y,w]=k.useState((u==null?void 0:u.skin)??(typeof document<"u"?document.documentElement.getAttribute("data-skin"):null)),[f,m]=k.useState(((d=u==null?void 0:u.seed)==null?void 0:d.brand)??"#1a4fa0"),v=t=>{g(t),l(t)},q=t=>{w(t),b(t)},Q=t=>{m(t),i({brand:t})},N={display:"inline-flex",gap:4,padding:4,borderRadius:"var(--sa-radii-md)",background:"var(--sa-background-neutral)"},I=t=>({border:"none",cursor:"pointer",fontSize:12,fontWeight:500,padding:"4px 10px",borderRadius:"var(--sa-radii-sm)",background:t?"var(--sa-background-primary)":"transparent",color:t?"var(--sa-text-primary)":"var(--sa-text-subtle)",boxShadow:t?"var(--sa-shadow-sm)":"none"});return p.jsxs("div",{className:c,style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center",...o},children:[r&&p.jsx("div",{role:"group","aria-label":"Mode",style:N,children:Ne.map(t=>p.jsx("button",{type:"button","aria-pressed":M===t.value,style:I(M===t.value),onClick:()=>v(t.value),children:t.label},t.value))}),e.length>0&&p.jsx("div",{role:"group","aria-label":"Skin",style:N,children:e.map(t=>p.jsx("button",{type:"button","aria-pressed":y===t.name,style:I(y===t.name),onClick:()=>q(t.name),children:t.label},t.name??"default"))}),a&&p.jsxs("label",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"var(--sa-text-subtle)"},children:["Brand",p.jsx("input",{type:"color",value:f,onChange:t=>Q(t.target.value),"aria-label":"Custom brand color",style:{width:28,height:28,border:"1px solid var(--sa-border-subtle)",borderRadius:6,background:"none",cursor:"pointer",padding:0}})]})]})}const W=ie,be=(e,r)=>{const a={};return Object.keys(e).forEach(s=>{if(e!=null&&e[s]&&typeof(e==null?void 0:e[s])=="object"){a[s]={...e==null?void 0:e[s],...r==null?void 0:r[s],...be(e==null?void 0:e[s],r==null?void 0:r[s])};return}a[s]=(r==null?void 0:r[s])||(e==null?void 0:e[s])}),a};function A(){const e=k.useContext(O),r=k.useMemo(()=>({...W,...e.theme,...be(W,e.theme)}),[e.theme,W]);return{...e,theme:r}}function je(){const{theme:e}=A();return e.colors}function Be(){var r;const{theme:e}=A();return(r=e.metrics)==null?void 0:r.spacing}function Pe(){var r;const{theme:e}=A();return(r=e.metrics)==null?void 0:r.radii}function Fe(){var r;const{theme:e}=A();return(r=e==null?void 0:e.metrics)==null?void 0:r.shadows}function Ue(e){return e}n.DEFAULT_STORAGE_KEY=E,n.LADDERS=J,n.NEUTRAL_LADDER_DARK=se,n.NEUTRAL_LADDER_GRAY=ae,n.SA_DEFAULT_SEED=Ee,n.SCALE_KEYS_10=U,n.SCALE_KEYS_12=H,n.ThemeContext=O,n.ThemeProvider=$e,n.ThemeSwitcher=Ie,n.applyMode=$,n.applySkin=K,n.buildTheme=ce,n.clearPref=te,n.contrastRatio=re,n.createTheme=Ue,n.hexToOklch=D,n.hexToRgb=_,n.neutralRamp=G,n.oklchToHex=P,n.pickByLightness=we,n.pickTextOn=F,n.rampFromSeed=Y,n.readPref=C,n.resolveMode=le,n.rgbToHex=V,n.rgbToOklch=X,n.themeBootScript=Le,n.useColor=je,n.useRadius=Pe,n.useShadow=Fe,n.useSpacing=Be,n.useTheme=A,n.writePref=ne,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@starasia/theme",
3
3
  "author": "Prawito Hudoro",
4
- "version": "3.3.0",
4
+ "version": "3.3.1",
5
5
  "description": "Theme component for starasia UI",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",