@starasia/theme 3.4.0 → 3.6.0

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