@starasia/theme 1.0.3 → 2.0.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.
@@ -112,6 +112,7 @@ declare const _default: {
112
112
  },
113
113
  "computed": {
114
114
  "white": {
115
+ "": "rgba(var(--starasia-ui-raw-color-gray-50), 1)",
115
116
  "900": "rgba(var(--starasia-ui-raw-color-white-900), 1)"
116
117
  },
117
118
  "black": {
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as C } from "react/jsx-runtime";
1
+ import { jsx as S } from "react/jsx-runtime";
2
2
  import { createContext as h, useState as j, useMemo as $, useRef as O, useEffect as E, useContext as P } from "react";
3
3
  function y(r, a = "") {
4
4
  let o = "";
@@ -21,7 +21,7 @@ function f(r, a) {
21
21
  for (const s in r) {
22
22
  const t = r[s];
23
23
  for (const i in t) {
24
- const e = t[i], c = `${a}-${s}-${i}`;
24
+ const e = t[i], c = i ? `${a}-${s}-${i}` : `${a}-${s}`;
25
25
  o += `--${c}: ${e};
26
26
  `;
27
27
  }
@@ -32,12 +32,12 @@ function F(r, a) {
32
32
  let o = "";
33
33
  function s(t, i, e = "", c = "", l = "") {
34
34
  if (l) {
35
- const b = `${e}${l}-${c}-${t}`;
36
- o += `--${b}: ${i};
35
+ const n = `${e}${l}-${c}-${t}`;
36
+ o += `--${n}: ${i};
37
37
  `;
38
38
  } else {
39
- const b = `${e}${t}-${c}`;
40
- o += `--${b}: ${i};
39
+ const n = `${e}${t}-${c}`;
40
+ o += `--${n}: ${i};
41
41
  `;
42
42
  }
43
43
  }
@@ -47,11 +47,11 @@ function F(r, a) {
47
47
  const c = i[e];
48
48
  if (typeof c == "object")
49
49
  for (const l in c) {
50
- const b = c[l], n = `${a}-`;
50
+ const n = c[l], b = `${a}-`;
51
51
  s(
52
52
  e,
53
- b,
54
53
  n,
54
+ b,
55
55
  t,
56
56
  l
57
57
  );
@@ -69,8 +69,8 @@ function N(r, a = "") {
69
69
  function s(t, i, e = "") {
70
70
  if (typeof i == "object")
71
71
  for (const c in i) {
72
- const l = i[c], b = `--${e}-${t}-${c}`;
73
- o += `${b}: ${l};
72
+ const l = i[c], n = `--${e}-${t}-${c}`;
73
+ o += `${n}: ${l};
74
74
  `;
75
75
  }
76
76
  else {
@@ -103,7 +103,7 @@ function M(r, a = "") {
103
103
  }
104
104
  return o;
105
105
  }
106
- function D(r, a) {
106
+ function B(r, a) {
107
107
  let o = "";
108
108
  for (const s in r)
109
109
  if (Object.hasOwnProperty.call(r, s)) {
@@ -114,7 +114,7 @@ function D(r, a) {
114
114
  }
115
115
  return o;
116
116
  }
117
- const J = (r) => {
117
+ const D = (r) => {
118
118
  const a = document.getElementById(r);
119
119
  if (a)
120
120
  return a;
@@ -133,27 +133,27 @@ function m(r, a) {
133
133
  `;
134
134
  }), o;
135
135
  }
136
- function B(r, a) {
136
+ function J(r, a) {
137
137
  let o = "";
138
138
  return r && (o += m(r, a)), o;
139
139
  }
140
140
  function H(r) {
141
- var n, v, d, w, p, x;
141
+ var b, u, g, w, p, x;
142
142
  if (!r)
143
143
  return;
144
- const a = (n = r.colors) != null && n.raw ? f(
144
+ const a = (b = r.colors) != null && b.raw ? f(
145
145
  r.colors.raw,
146
146
  "starasia-ui-raw-color"
147
- ) : "", o = (v = r.colors) != null && v.computed ? f(
147
+ ) : "", o = (u = r.colors) != null && u.computed ? f(
148
148
  r.colors.computed,
149
149
  "starasia-ui-color"
150
- ) : "", s = (d = r.colors) != null && d.main ? F(r.colors.main, "starasia-ui") : "", t = (w = r.colors) != null && w.brand ? y(r.colors.brand, "starasia-ui-brand") : "", i = (p = r.colors) != null && p.utility ? y(
150
+ ) : "", s = (g = r.colors) != null && g.main ? F(r.colors.main, "starasia-ui") : "", t = (w = r.colors) != null && w.brand ? y(r.colors.brand, "starasia-ui-brand") : "", i = (p = r.colors) != null && p.utility ? y(
151
151
  r.colors.utility,
152
152
  "starasia-ui-utility"
153
- ) : "", e = (x = r.colors) != null && x.text ? D(
153
+ ) : "", e = (x = r.colors) != null && x.text ? B(
154
154
  r.colors.text,
155
155
  "starasia-ui-color-text"
156
- ) : "", c = r.metrics ? N(r.metrics, "starasia-ui") : "", l = r.font ? M(r.font, "starasia-ui") : "", b = r.components ? B(r.components, "--starasia-ui") : "";
156
+ ) : "", c = r.metrics ? N(r.metrics, "starasia-ui") : "", l = r.font ? M(r.font, "starasia-ui") : "", n = r.components ? J(r.components, "--starasia-ui") : "";
157
157
  return `
158
158
  :root {
159
159
  ${a}
@@ -164,7 +164,7 @@ function H(r) {
164
164
  ${e}
165
165
  ${c}
166
166
  ${l}
167
- ${b}
167
+ ${n}
168
168
  }
169
169
  `;
170
170
  }
@@ -173,23 +173,45 @@ const k = h({
173
173
  setTheme: () => {
174
174
  }
175
175
  }), L = "starasia-theme-style";
176
- function K({ value: r, children: a }) {
176
+ function V(r) {
177
+ if (!r)
178
+ return "";
179
+ const a = {
180
+ 50: "50",
181
+ 100: "100",
182
+ 200: "200",
183
+ 300: "300",
184
+ 400: "400",
185
+ 500: "500",
186
+ 600: "600",
187
+ 700: "700",
188
+ 800: "800",
189
+ 900: "900"
190
+ }, o = Object.entries(r).filter(([s]) => a[s]).map(([s, t]) => ` --sa-color-brand-${s}: rgb(${t});`).join(`
191
+ `);
192
+ return o ? `:root {
193
+ ${o}
194
+ }` : "";
195
+ }
196
+ function R({ value: r, children: a }) {
177
197
  const [o, s] = j(r), t = $(
178
198
  () => o ? JSON.stringify(o) : "",
179
199
  [o]
180
- ), i = O(J(L));
200
+ ), i = O(D(L));
181
201
  E(() => {
202
+ var c, l;
182
203
  if (t) {
183
- const c = H(JSON.parse(t));
184
- c && (i != null && i.current) && (i.current.textContent = c);
204
+ const n = JSON.parse(t), b = H(n) ?? "", u = V((l = (c = n == null ? void 0 : n.colors) == null ? void 0 : c.raw) == null ? void 0 : l.blue), g = [b, u].filter(Boolean).join(`
205
+ `);
206
+ g && (i != null && i.current) && (i.current.textContent = g);
185
207
  }
186
208
  }, [t]);
187
209
  const e = (c) => {
188
210
  c && s(c);
189
211
  };
190
- return /* @__PURE__ */ C(k.Provider, { value: { theme: o, setTheme: e }, children: a });
212
+ return /* @__PURE__ */ S(k.Provider, { value: { theme: o, setTheme: e }, children: a });
191
213
  }
192
- const V = {
214
+ const _ = {
193
215
  raw: {
194
216
  white: {
195
217
  900: "255, 255, 255"
@@ -302,7 +324,8 @@ const V = {
302
324
  },
303
325
  computed: {
304
326
  white: {
305
- 900: "rgba(var(--starasia-ui-raw-color-white-900), 1)"
327
+ 900: "rgba(var(--starasia-ui-raw-color-white-900), 1)",
328
+ "": "rgba(var(--starasia-ui-raw-color-gray-50), 1)"
306
329
  },
307
330
  black: {
308
331
  900: "rgba(var(--starasia-ui-raw-color-black-900), 1)"
@@ -626,7 +649,7 @@ const V = {
626
649
  tertiary: "rgba(120, 134, 127, 0.1)"
627
650
  }
628
651
  }
629
- }, _ = {
652
+ }, q = {
630
653
  radii: {
631
654
  none: "0",
632
655
  xs: "0.25rem",
@@ -684,7 +707,7 @@ const V = {
684
707
  inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
685
708
  card: "0px 4px 35px 0px rgba(112, 144, 176, 0.25)"
686
709
  }
687
- }, q = {
710
+ }, z = {
688
711
  fontSizes: {
689
712
  xs: "0.625rem",
690
713
  sm: "0.75rem",
@@ -724,64 +747,64 @@ const V = {
724
747
  relaxed: 1.625,
725
748
  loose: 2
726
749
  }
727
- }, z = {
728
- colors: V,
729
- metrics: _,
730
- font: q
731
- }, u = z, S = (r, a) => {
750
+ }, A = {
751
+ colors: _,
752
+ metrics: q,
753
+ font: z
754
+ }, v = A, C = (r, a) => {
732
755
  const o = {};
733
756
  return Object.keys(r).forEach((s) => {
734
757
  if (r != null && r[s] && typeof (r == null ? void 0 : r[s]) == "object") {
735
758
  o[s] = {
736
759
  ...r == null ? void 0 : r[s],
737
760
  ...a == null ? void 0 : a[s],
738
- ...S(r == null ? void 0 : r[s], a == null ? void 0 : a[s])
761
+ ...C(r == null ? void 0 : r[s], a == null ? void 0 : a[s])
739
762
  };
740
763
  return;
741
764
  }
742
765
  o[s] = (a == null ? void 0 : a[s]) || (r == null ? void 0 : r[s]);
743
766
  }), o;
744
767
  };
745
- function g() {
768
+ function d() {
746
769
  const r = P(k), a = $(
747
770
  () => ({
748
- ...u,
771
+ ...v,
749
772
  ...r.theme,
750
- ...S(u, r.theme)
773
+ ...C(v, r.theme)
751
774
  }),
752
- [r.theme, u]
775
+ [r.theme, v]
753
776
  );
754
777
  return { ...r, theme: a };
755
778
  }
756
- function R() {
757
- const { theme: r } = g();
779
+ function U() {
780
+ const { theme: r } = d();
758
781
  return r.colors;
759
782
  }
760
- function U() {
783
+ function W() {
761
784
  var a;
762
- const { theme: r } = g();
785
+ const { theme: r } = d();
763
786
  return (a = r.metrics) == null ? void 0 : a.spacing;
764
787
  }
765
- function W() {
788
+ function Y() {
766
789
  var a;
767
- const { theme: r } = g();
790
+ const { theme: r } = d();
768
791
  return (a = r.metrics) == null ? void 0 : a.radii;
769
792
  }
770
- function Y() {
793
+ function G() {
771
794
  var a;
772
- const { theme: r } = g();
795
+ const { theme: r } = d();
773
796
  return (a = r == null ? void 0 : r.metrics) == null ? void 0 : a.shadows;
774
797
  }
775
- function G(r) {
798
+ function Q(r) {
776
799
  return r;
777
800
  }
778
801
  export {
779
802
  k as ThemeContext,
780
- K as ThemeProvider,
781
- G as createTheme,
782
- R as useColor,
783
- W as useRadius,
784
- Y as useShadow,
785
- U as useSpacing,
786
- g as useTheme
803
+ R as ThemeProvider,
804
+ Q as createTheme,
805
+ U as useColor,
806
+ Y as useRadius,
807
+ G as useShadow,
808
+ W as useSpacing,
809
+ d as useTheme
787
810
  };
package/dist/index.umd.js CHANGED
@@ -1,16 +1,16 @@
1
- (function(l,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],g):(l=typeof globalThis<"u"?globalThis:l||self,g(l["@starasia/theme"]={},l.jsxRuntime,l.React))})(this,function(l,g,u){"use strict";function x(r,a=""){let o="";for(const s in r)if(Object.hasOwnProperty.call(r,s)){const t=r[s];o+=`/* ${s} */
1
+ (function(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l["@starasia/theme"]={},l.jsxRuntime,l.React))})(this,function(l,d,u){"use strict";function f(r,a=""){let o="";for(const s in r)if(Object.hasOwnProperty.call(r,s)){const t=r[s];o+=`/* ${s} */
2
2
  `;for(const i in t)if(Object.hasOwnProperty.call(t,i)){const c=t[i];o+=`--${a}-${s}-${i}: ${c};
3
- `}}return o}function y(r,a){let o="";for(const s in r){const t=r[s];for(const i in t){const c=t[i],e=`${a}-${s}-${i}`;o+=`--${e}: ${c};
3
+ `}}return o}function $(r,a){let o="";for(const s in r){const t=r[s];for(const i in t){const c=t[i],e=i?`${a}-${s}-${i}`:`${a}-${s}`;o+=`--${e}: ${c};
4
4
  `}}return o}function j(r,a){let o="";function s(t,i,c="",e="",n=""){if(n){const b=`${c}${n}-${e}-${t}`;o+=`--${b}: ${i};
5
5
  `}else{const b=`${c}${t}-${e}`;o+=`--${b}: ${i};
6
- `}}for(const t in r){const i=r[t];for(const c in i){const e=i[c];if(typeof e=="object")for(const n in e){const b=e[n],v=`${a}-`;s(c,b,v,t,n)}else{const n=`${a}-`;s(c,e,n,t)}}}return o}function E(r,a=""){let o="";function s(t,i,c=""){if(typeof i=="object")for(const e in i){const n=i[e],b=`--${c}-${t}-${e}`;o+=`${b}: ${n};
6
+ `}}for(const t in r){const i=r[t];for(const c in i){const e=i[c];if(typeof e=="object")for(const n in e){const b=e[n],g=`${a}-`;s(c,b,g,t,n)}else{const n=`${a}-`;s(c,e,n,t)}}}return o}function O(r,a=""){let o="";function s(t,i,c=""){if(typeof i=="object")for(const e in i){const n=i[e],b=`--${c}-${t}-${e}`;o+=`${b}: ${n};
7
7
  `}else{const e=`--${c}-${t}`;o+=`${e}: ${i};
8
8
  `}}for(const t in r){const i=r[t];if(typeof i=="object")s(t,i,`${a}`);else{const c=`--${a}-${t}`;o+=`${c}: ${i};
9
- `}}return o}function O(r,a=""){let o="";for(const s in r){const t=r[s];for(const i in t){const c=`--${a}-${s}-${i}`,e=t[i];o+=`${c}: ${e};
9
+ `}}return o}function E(r,a=""){let o="";for(const s in r){const t=r[s];for(const i in t){const c=`--${a}-${s}-${i}`,e=t[i];o+=`${c}: ${e};
10
10
  `}}return o}function P(r,a){let o="";for(const s in r)if(Object.hasOwnProperty.call(r,s)){const t=r[s];s==="default"?o+=`--${a}: ${t};
11
11
  `:o+=`--${a}-${s}: ${t};
12
- `}return o}const F=r=>{const a=document.getElementById(r);if(a)return a;const o=document.createElement("style");return o.id=r,document.head.appendChild(o),o};function f(r,a){let o="";return Object.keys(r).forEach(s=>{const t=r[s];if(t&&typeof t=="object"){o+=f(t,`${a}-${s}`);return}o+=`${a}-${s}: ${t};
13
- `}),o}function N(r,a){let o="";return r&&(o+=f(r,a)),o}function M(r){var v,$,k,S,h,C;if(!r)return;const a=(v=r.colors)!=null&&v.raw?y(r.colors.raw,"starasia-ui-raw-color"):"",o=($=r.colors)!=null&&$.computed?y(r.colors.computed,"starasia-ui-color"):"",s=(k=r.colors)!=null&&k.main?j(r.colors.main,"starasia-ui"):"",t=(S=r.colors)!=null&&S.brand?x(r.colors.brand,"starasia-ui-brand"):"",i=(h=r.colors)!=null&&h.utility?x(r.colors.utility,"starasia-ui-utility"):"",c=(C=r.colors)!=null&&C.text?P(r.colors.text,"starasia-ui-color-text"):"",e=r.metrics?E(r.metrics,"starasia-ui"):"",n=r.font?O(r.font,"starasia-ui"):"",b=r.components?N(r.components,"--starasia-ui"):"";return`
12
+ `}return o}const F=r=>{const a=document.getElementById(r);if(a)return a;const o=document.createElement("style");return o.id=r,document.head.appendChild(o),o};function m(r,a){let o="";return Object.keys(r).forEach(s=>{const t=r[s];if(t&&typeof t=="object"){o+=m(t,`${a}-${s}`);return}o+=`${a}-${s}: ${t};
13
+ `}),o}function M(r,a){let o="";return r&&(o+=m(r,a)),o}function N(r){var g,p,w,h,S,C;if(!r)return;const a=(g=r.colors)!=null&&g.raw?$(r.colors.raw,"starasia-ui-raw-color"):"",o=(p=r.colors)!=null&&p.computed?$(r.colors.computed,"starasia-ui-color"):"",s=(w=r.colors)!=null&&w.main?j(r.colors.main,"starasia-ui"):"",t=(h=r.colors)!=null&&h.brand?f(r.colors.brand,"starasia-ui-brand"):"",i=(S=r.colors)!=null&&S.utility?f(r.colors.utility,"starasia-ui-utility"):"",c=(C=r.colors)!=null&&C.text?P(r.colors.text,"starasia-ui-color-text"):"",e=r.metrics?O(r.metrics,"starasia-ui"):"",n=r.font?E(r.font,"starasia-ui"):"",b=r.components?M(r.components,"--starasia-ui"):"";return`
14
14
  :root {
15
15
  ${a}
16
16
  ${o}
@@ -22,4 +22,8 @@
22
22
  ${n}
23
23
  ${b}
24
24
  }
25
- `}const w=u.createContext({theme:void 0,setTheme:()=>{}}),D="starasia-theme-style";function R({value:r,children:a}){const[o,s]=u.useState(r),t=u.useMemo(()=>o?JSON.stringify(o):"",[o]),i=u.useRef(F(D));u.useEffect(()=>{if(t){const e=M(JSON.parse(t));e&&(i!=null&&i.current)&&(i.current.textContent=e)}},[t]);const c=e=>{e&&s(e)};return g.jsx(w.Provider,{value:{theme:o,setTheme:c},children:a})}const p={colors:{raw:{white:{900:"255, 255, 255"},black:{900:"0, 0, 0"},blue:{50:"227, 242, 253",100:"187, 222, 251",200:"144, 202, 249",300:"100, 181, 246",400:"66, 165, 245",500:"33, 150, 243",600:"30, 136, 229",700:"25, 118, 210",800:"21, 101, 192",900:"13, 71, 161"},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:"233, 222, 245",100:"212, 189, 235",200:"190, 156, 226",300:"169, 123, 216",400:"147, 90, 207",500:"126, 57, 197",600:"105, 47, 164",700:"84, 38, 131",800:"63, 28, 98",900:"42, 19, 65"},gray:{50:"255, 254, 255",100:"239, 243, 248",200:"201, 206, 204",300:"174, 182, 178",400:"147, 158, 153",500:"120, 134, 127",600:"96, 107, 102",700:"72, 80, 76",800:"48, 53, 51",900:"24, 26, 25"},red:{50:"255, 240, 243",100:"255, 204, 213",200:"255, 179, 193",300:"255, 143, 163",400:"255, 117, 143",500:"255, 77, 109",600:"201, 24, 74",700:"164, 19, 60",800:"128, 15, 47",900:"89, 13, 34"},orange:{50:"250, 246, 224",100:"255, 245, 193",200:"255, 225, 139",300:"255, 203, 105",400:"234, 183, 84",500:"210, 160, 58",600:"179, 130, 10",700:"152, 104, 0",800:"126, 80, 0",900:"97, 52, 0"},aloha:{50:"219, 247, 242",100:"184, 240, 230",200:"149, 232, 218",300:"114, 225, 206",400:"79, 218, 194",500:"44, 210, 182",600:"36, 175, 152",700:"29, 140, 121",800:"22, 105, 91",900:"14, 70, 60"},green:{50:"220, 246, 234",100:"186, 238, 214",200:"151, 230, 193",300:"117, 222, 173",400:"82, 214, 152",500:"48, 206, 132",600:"40, 172, 110",700:"32, 137, 88",800:"24, 103, 66",900:"16, 68, 44"},brand:{default:"74, 106, 148",active:"57, 82, 116",secondary:"144, 176, 218",tertiary:"227, 237, 248"}},computed:{white:{900:"rgba(var(--starasia-ui-raw-color-white-900), 1)"},black:{900:"rgba(var(--starasia-ui-raw-color-black-900), 1)"},blue:{50:"rgba(var(--starasia-ui-raw-color-blue-50), 1)",100:"rgba(var(--starasia-ui-raw-color-blue-100), 1)",200:"rgba(var(--starasia-ui-raw-color-blue-200), 1)",300:"rgba(var(--starasia-ui-raw-color-blue-300), 1)",400:"rgba(var(--starasia-ui-raw-color-blue-400), 1)",500:"rgba(var(--starasia-ui-raw-color-blue-500), 1)",600:"rgba(var(--starasia-ui-raw-color-blue-600), 1)",700:"rgba(var(--starasia-ui-raw-color-blue-700), 1)",800:"rgba(var(--starasia-ui-raw-color-blue-800), 1)",900:"rgba(var(--starasia-ui-raw-color-blue-900), 1)"},pink:{50:"rgba(var(--starasia-ui-raw-color-pink-50), 1)",100:"rgba(var(--starasia-ui-raw-color-pink-100), 1)",200:"rgba(var(--starasia-ui-raw-color-pink-200), 1)",300:"rgba(var(--starasia-ui-raw-color-pink-300), 1)",400:"rgba(var(--starasia-ui-raw-color-pink-400), 1)",500:"rgba(var(--starasia-ui-raw-color-pink-500), 1)",600:"rgba(var(--starasia-ui-raw-color-pink-600), 1)",700:"rgba(var(--starasia-ui-raw-color-pink-700), 1)",800:"rgba(var(--starasia-ui-raw-color-pink-800), 1)",900:"rgba(var(--starasia-ui-raw-color-pink-900), 1)"},purple:{50:"rgba(var(--starasia-ui-raw-color-purple-50), 1)",100:"rgba(var(--starasia-ui-raw-color-purple-100), 1)",200:"rgba(var(--starasia-ui-raw-color-purple-200), 1)",300:"rgba(var(--starasia-ui-raw-color-purple-300), 1)",400:"rgba(var(--starasia-ui-raw-color-purple-400), 1)",500:"rgba(var(--starasia-ui-raw-color-purple-500), 1)",600:"rgba(var(--starasia-ui-raw-color-purple-600), 1)",700:"rgba(var(--starasia-ui-raw-color-purple-700), 1)",800:"rgba(var(--starasia-ui-raw-color-purple-800), 1)",900:"rgba(var(--starasia-ui-raw-color-purple-900), 1)"},gray:{50:"rgba(var(--starasia-ui-raw-color-gray-50), 1)",100:"rgba(var(--starasia-ui-raw-color-gray-100), 1)",200:"rgba(var(--starasia-ui-raw-color-gray-200), 1)",300:"rgba(var(--starasia-ui-raw-color-gray-300), 1)",400:"rgba(var(--starasia-ui-raw-color-gray-400), 1)",500:"rgba(var(--starasia-ui-raw-color-gray-500), 1)",600:"rgba(var(--starasia-ui-raw-color-gray-600), 1)",700:"rgba(var(--starasia-ui-raw-color-gray-700), 1)",800:"rgba(var(--starasia-ui-raw-color-gray-800), 1)",900:"rgba(var(--starasia-ui-raw-color-gray-900), 1)"},red:{50:"rgba(var(--starasia-ui-raw-color-red-50), 1)",100:"rgba(var(--starasia-ui-raw-color-red-100), 1)",200:"rgba(var(--starasia-ui-raw-color-red-200), 1)",300:"rgba(var(--starasia-ui-raw-color-red-300), 1)",400:"rgba(var(--starasia-ui-raw-color-red-400), 1)",500:"rgba(var(--starasia-ui-raw-color-red-500), 1)",600:"rgba(var(--starasia-ui-raw-color-red-600), 1)",700:"rgba(var(--starasia-ui-raw-color-red-700), 1)",800:"rgba(var(--starasia-ui-raw-color-red-800), 1)",900:"rgba(var(--starasia-ui-raw-color-red-900), 1)"},orange:{50:"rgba(var(--starasia-ui-raw-color-orange-50), 1)",100:"rgba(var(--starasia-ui-raw-color-orange-100), 1)",200:"rgba(var(--starasia-ui-raw-color-orange-200), 1)",300:"rgba(var(--starasia-ui-raw-color-orange-300), 1)",400:"rgba(var(--starasia-ui-raw-color-orange-400), 1)",500:"rgba(var(--starasia-ui-raw-color-orange-500), 1)",600:"rgba(var(--starasia-ui-raw-color-orange-600), 1)",700:"rgba(var(--starasia-ui-raw-color-orange-700), 1)",800:"rgba(var(--starasia-ui-raw-color-orange-800), 1)",900:"rgba(var(--starasia-ui-raw-color-orange-900), 1)"},aloha:{50:"rgba(var(--starasia-ui-raw-color-aloha-50), 1)",100:"rgba(var(--starasia-ui-raw-color-aloha-100), 1)",200:"rgba(var(--starasia-ui-raw-color-aloha-200), 1)",300:"rgba(var(--starasia-ui-raw-color-aloha-300), 1)",400:"rgba(var(--starasia-ui-raw-color-aloha-400), 1)",500:"rgba(var(--starasia-ui-raw-color-aloha-500), 1)",600:"rgba(var(--starasia-ui-raw-color-aloha-600), 1)",700:"rgba(var(--starasia-ui-raw-color-aloha-700), 1)",800:"rgba(var(--starasia-ui-raw-color-aloha-800), 1)",900:"rgba(var(--starasia-ui-raw-color-aloha-900), 1)"},green:{50:"rgba(var(--starasia-ui-raw-color-green-50), 1)",100:"rgba(var(--starasia-ui-raw-color-green-100), 1)",200:"rgba(var(--starasia-ui-raw-color-green-200), 1)",300:"rgba(var(--starasia-ui-raw-color-green-300), 1)",400:"rgba(var(--starasia-ui-raw-color-green-400), 1)",500:"rgba(var(--starasia-ui-raw-color-green-500), 1)",600:"rgba(var(--starasia-ui-raw-color-green-600), 1)",700:"rgba(var(--starasia-ui-raw-color-green-700), 1)",800:"rgba(var(--starasia-ui-raw-color-green-800), 1)",900:"rgba(var(--starasia-ui-raw-color-green-900), 1)"}},main:{primary:{"background-color":"rgb(var(--starasia-ui-raw-color-brand-default))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgb(var(--starasia-ui-raw-color-brand-active))","border-color":"rgb(var(--starasia-ui-raw-color-brand-active))","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},secondary:{"background-color":"rgb(var(--starasia-ui-raw-color-gray-50))","text-color":"rgb(72, 80, 76)","border-color":"rgba(120, 134, 127, 0.2)",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-100), 0.9)","border-color":"rgba(120, 134, 127, 0.2)","text-color":"rgb(72, 80, 76)",shadow:"0px 0px 0px -1px #f0f0f0"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.1)","border-color":"rgba(120, 134, 127, 0.2)","text-color":"rgb(72, 80, 76)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-gray-200), 0.28), 0px 0px 0px -1px #f0f0f0"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},tertiary:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px -1px #f0f0f0"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)","text-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.5)"}},quaternary:{"background-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))",hover:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","text-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)"},active:{"background-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},link:{"background-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgba(255, 255, 255, 0)",hover:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgba(var(--starasia-ui-raw-color-brand-active), 0.9)"},active:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))"},disable:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},success:{"background-color":"rgb(var(--starasia-ui-raw-color-green-500))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-green-500))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-green-500), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-green-500), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-green-600), 0.75)","border-color":"rgba(var(--starasia-ui-raw-color-green-600), 0.75)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-green-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-gray-400))","border-color":"rgb(var(--starasia-ui-raw-color-gray-400))","text-color":"rgba(120, 134, 127, 0.62)"}},danger:{"background-color":"rgb(var(--starasia-ui-raw-color-red-600))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-red-600))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-red-600), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-red-600), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-red-800), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-red-800), 0.68)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-red-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-red-300))","border-color":"rgb(var(--starasia-ui-raw-color-red-300))","text-color":"rgba(201, 24, 74, 0.3)"}},warning:{"background-color":"rgb(var(--starasia-ui-raw-color-orange-600))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-orange-600))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-orange-600), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-orange-600), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-orange-800), 0.75)","border-color":"rgba(var(--starasia-ui-raw-color-orange-800), 0.75)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 2px rgba(var(--starasia-ui-raw-color-orange-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-orange-300))","border-color":"rgb(var(--starasia-ui-raw-color-orange-300))","text-color":"rgb(var(--starasia-ui-raw-color-orange-600))"}}},brand:{primary:{default:"rgba(74, 106, 148, 1)",secondary:"rgba(144, 176, 218, 1)",tertiary:"rgba(227, 237, 248, 1)"},secondary:{default:"var(--starasia-ui-color-pink-700)",secondary:"var(--starasia-ui-color-pink-300)",tertiary:"var(--starasia-ui-color-pink-50)"}},text:{default:"var(--starasia-ui-color-gray-900)",secondary:"var(--starasia-ui-color-gray-700)",tertiary:"var(--starasia-ui-color-gray-500)",disable:"var(--starasia-ui-color-gray-200)",white:"var(--starasia-ui-color-white-900)"},utility:{success:{default:"var(--starasia-ui-color-green-600)",secondary:"var(--starasia-ui-color-green-200)",tertiary:"var(--starasia-ui-color-green-50)"},danger:{default:"var(--starasia-ui-color-red-600)",secondary:"var(--starasia-ui-color-red-200)",tertiary:"var(--starasia-ui-color-red-50)"},warning:{default:"var(--starasia-ui-color-orange-600)",secondary:"var(--starasia-ui-color-orange-200)",tertiary:"var(--starasia-ui-color-orange-50)"},information:{default:"var(--starasia-ui-color-blue-600)",secondary:"var(--starasia-ui-color-blue-200)",tertiary:"var(--starasia-ui-color-blue-50)"},dark:{default:"var(--starasia-ui-color-gray-600)",secondary:"var(--starasia-ui-color-gray-200)",tertiary:"var(--starasia-ui-color-gray-50)"},fill:{default:"rgba(120, 134, 127, 0.2)",secondary:"rgba(120, 134, 127, 0.16)",tertiary:"rgba(120, 134, 127, 0.1)"}}},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(--starasia-ui-color-border)"},shadows:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",card:"0px 4px 35px 0px rgba(112, 144, 176, 0.25)"}},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:200,normal:300,medium:400,semibold:500,bold:600,extrabold:700,black:800},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}}},m=(r,a)=>{const o={};return Object.keys(r).forEach(s=>{if(r!=null&&r[s]&&typeof(r==null?void 0:r[s])=="object"){o[s]={...r==null?void 0:r[s],...a==null?void 0:a[s],...m(r==null?void 0:r[s],a==null?void 0:a[s])};return}o[s]=(a==null?void 0:a[s])||(r==null?void 0:r[s])}),o};function d(){const r=u.useContext(w),a=u.useMemo(()=>({...p,...r.theme,...m(p,r.theme)}),[r.theme,p]);return{...r,theme:a}}function q(){const{theme:r}=d();return r.colors}function H(){var a;const{theme:r}=d();return(a=r.metrics)==null?void 0:a.spacing}function J(){var a;const{theme:r}=d();return(a=r.metrics)==null?void 0:a.radii}function L(){var a;const{theme:r}=d();return(a=r==null?void 0:r.metrics)==null?void 0:a.shadows}function _(r){return r}l.ThemeContext=w,l.ThemeProvider=R,l.createTheme=_,l.useColor=q,l.useRadius=J,l.useShadow=L,l.useSpacing=H,l.useTheme=d,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
25
+ `}const x=u.createContext({theme:void 0,setTheme:()=>{}}),D="starasia-theme-style";function R(r){if(!r)return"";const a={50:"50",100:"100",200:"200",300:"300",400:"400",500:"500",600:"600",700:"700",800:"800",900:"900"},o=Object.entries(r).filter(([s])=>a[s]).map(([s,t])=>` --sa-color-brand-${s}: rgb(${t});`).join(`
26
+ `);return o?`:root {
27
+ ${o}
28
+ }`:""}function q({value:r,children:a}){const[o,s]=u.useState(r),t=u.useMemo(()=>o?JSON.stringify(o):"",[o]),i=u.useRef(F(D));u.useEffect(()=>{var e,n;if(t){const b=JSON.parse(t),g=N(b)??"",p=R((n=(e=b==null?void 0:b.colors)==null?void 0:e.raw)==null?void 0:n.blue),w=[g,p].filter(Boolean).join(`
29
+ `);w&&(i!=null&&i.current)&&(i.current.textContent=w)}},[t]);const c=e=>{e&&s(e)};return d.jsx(x.Provider,{value:{theme:o,setTheme:c},children:a})}const y={colors:{raw:{white:{900:"255, 255, 255"},black:{900:"0, 0, 0"},blue:{50:"227, 242, 253",100:"187, 222, 251",200:"144, 202, 249",300:"100, 181, 246",400:"66, 165, 245",500:"33, 150, 243",600:"30, 136, 229",700:"25, 118, 210",800:"21, 101, 192",900:"13, 71, 161"},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:"233, 222, 245",100:"212, 189, 235",200:"190, 156, 226",300:"169, 123, 216",400:"147, 90, 207",500:"126, 57, 197",600:"105, 47, 164",700:"84, 38, 131",800:"63, 28, 98",900:"42, 19, 65"},gray:{50:"255, 254, 255",100:"239, 243, 248",200:"201, 206, 204",300:"174, 182, 178",400:"147, 158, 153",500:"120, 134, 127",600:"96, 107, 102",700:"72, 80, 76",800:"48, 53, 51",900:"24, 26, 25"},red:{50:"255, 240, 243",100:"255, 204, 213",200:"255, 179, 193",300:"255, 143, 163",400:"255, 117, 143",500:"255, 77, 109",600:"201, 24, 74",700:"164, 19, 60",800:"128, 15, 47",900:"89, 13, 34"},orange:{50:"250, 246, 224",100:"255, 245, 193",200:"255, 225, 139",300:"255, 203, 105",400:"234, 183, 84",500:"210, 160, 58",600:"179, 130, 10",700:"152, 104, 0",800:"126, 80, 0",900:"97, 52, 0"},aloha:{50:"219, 247, 242",100:"184, 240, 230",200:"149, 232, 218",300:"114, 225, 206",400:"79, 218, 194",500:"44, 210, 182",600:"36, 175, 152",700:"29, 140, 121",800:"22, 105, 91",900:"14, 70, 60"},green:{50:"220, 246, 234",100:"186, 238, 214",200:"151, 230, 193",300:"117, 222, 173",400:"82, 214, 152",500:"48, 206, 132",600:"40, 172, 110",700:"32, 137, 88",800:"24, 103, 66",900:"16, 68, 44"},brand:{default:"74, 106, 148",active:"57, 82, 116",secondary:"144, 176, 218",tertiary:"227, 237, 248"}},computed:{white:{900:"rgba(var(--starasia-ui-raw-color-white-900), 1)","":"rgba(var(--starasia-ui-raw-color-gray-50), 1)"},black:{900:"rgba(var(--starasia-ui-raw-color-black-900), 1)"},blue:{50:"rgba(var(--starasia-ui-raw-color-blue-50), 1)",100:"rgba(var(--starasia-ui-raw-color-blue-100), 1)",200:"rgba(var(--starasia-ui-raw-color-blue-200), 1)",300:"rgba(var(--starasia-ui-raw-color-blue-300), 1)",400:"rgba(var(--starasia-ui-raw-color-blue-400), 1)",500:"rgba(var(--starasia-ui-raw-color-blue-500), 1)",600:"rgba(var(--starasia-ui-raw-color-blue-600), 1)",700:"rgba(var(--starasia-ui-raw-color-blue-700), 1)",800:"rgba(var(--starasia-ui-raw-color-blue-800), 1)",900:"rgba(var(--starasia-ui-raw-color-blue-900), 1)"},pink:{50:"rgba(var(--starasia-ui-raw-color-pink-50), 1)",100:"rgba(var(--starasia-ui-raw-color-pink-100), 1)",200:"rgba(var(--starasia-ui-raw-color-pink-200), 1)",300:"rgba(var(--starasia-ui-raw-color-pink-300), 1)",400:"rgba(var(--starasia-ui-raw-color-pink-400), 1)",500:"rgba(var(--starasia-ui-raw-color-pink-500), 1)",600:"rgba(var(--starasia-ui-raw-color-pink-600), 1)",700:"rgba(var(--starasia-ui-raw-color-pink-700), 1)",800:"rgba(var(--starasia-ui-raw-color-pink-800), 1)",900:"rgba(var(--starasia-ui-raw-color-pink-900), 1)"},purple:{50:"rgba(var(--starasia-ui-raw-color-purple-50), 1)",100:"rgba(var(--starasia-ui-raw-color-purple-100), 1)",200:"rgba(var(--starasia-ui-raw-color-purple-200), 1)",300:"rgba(var(--starasia-ui-raw-color-purple-300), 1)",400:"rgba(var(--starasia-ui-raw-color-purple-400), 1)",500:"rgba(var(--starasia-ui-raw-color-purple-500), 1)",600:"rgba(var(--starasia-ui-raw-color-purple-600), 1)",700:"rgba(var(--starasia-ui-raw-color-purple-700), 1)",800:"rgba(var(--starasia-ui-raw-color-purple-800), 1)",900:"rgba(var(--starasia-ui-raw-color-purple-900), 1)"},gray:{50:"rgba(var(--starasia-ui-raw-color-gray-50), 1)",100:"rgba(var(--starasia-ui-raw-color-gray-100), 1)",200:"rgba(var(--starasia-ui-raw-color-gray-200), 1)",300:"rgba(var(--starasia-ui-raw-color-gray-300), 1)",400:"rgba(var(--starasia-ui-raw-color-gray-400), 1)",500:"rgba(var(--starasia-ui-raw-color-gray-500), 1)",600:"rgba(var(--starasia-ui-raw-color-gray-600), 1)",700:"rgba(var(--starasia-ui-raw-color-gray-700), 1)",800:"rgba(var(--starasia-ui-raw-color-gray-800), 1)",900:"rgba(var(--starasia-ui-raw-color-gray-900), 1)"},red:{50:"rgba(var(--starasia-ui-raw-color-red-50), 1)",100:"rgba(var(--starasia-ui-raw-color-red-100), 1)",200:"rgba(var(--starasia-ui-raw-color-red-200), 1)",300:"rgba(var(--starasia-ui-raw-color-red-300), 1)",400:"rgba(var(--starasia-ui-raw-color-red-400), 1)",500:"rgba(var(--starasia-ui-raw-color-red-500), 1)",600:"rgba(var(--starasia-ui-raw-color-red-600), 1)",700:"rgba(var(--starasia-ui-raw-color-red-700), 1)",800:"rgba(var(--starasia-ui-raw-color-red-800), 1)",900:"rgba(var(--starasia-ui-raw-color-red-900), 1)"},orange:{50:"rgba(var(--starasia-ui-raw-color-orange-50), 1)",100:"rgba(var(--starasia-ui-raw-color-orange-100), 1)",200:"rgba(var(--starasia-ui-raw-color-orange-200), 1)",300:"rgba(var(--starasia-ui-raw-color-orange-300), 1)",400:"rgba(var(--starasia-ui-raw-color-orange-400), 1)",500:"rgba(var(--starasia-ui-raw-color-orange-500), 1)",600:"rgba(var(--starasia-ui-raw-color-orange-600), 1)",700:"rgba(var(--starasia-ui-raw-color-orange-700), 1)",800:"rgba(var(--starasia-ui-raw-color-orange-800), 1)",900:"rgba(var(--starasia-ui-raw-color-orange-900), 1)"},aloha:{50:"rgba(var(--starasia-ui-raw-color-aloha-50), 1)",100:"rgba(var(--starasia-ui-raw-color-aloha-100), 1)",200:"rgba(var(--starasia-ui-raw-color-aloha-200), 1)",300:"rgba(var(--starasia-ui-raw-color-aloha-300), 1)",400:"rgba(var(--starasia-ui-raw-color-aloha-400), 1)",500:"rgba(var(--starasia-ui-raw-color-aloha-500), 1)",600:"rgba(var(--starasia-ui-raw-color-aloha-600), 1)",700:"rgba(var(--starasia-ui-raw-color-aloha-700), 1)",800:"rgba(var(--starasia-ui-raw-color-aloha-800), 1)",900:"rgba(var(--starasia-ui-raw-color-aloha-900), 1)"},green:{50:"rgba(var(--starasia-ui-raw-color-green-50), 1)",100:"rgba(var(--starasia-ui-raw-color-green-100), 1)",200:"rgba(var(--starasia-ui-raw-color-green-200), 1)",300:"rgba(var(--starasia-ui-raw-color-green-300), 1)",400:"rgba(var(--starasia-ui-raw-color-green-400), 1)",500:"rgba(var(--starasia-ui-raw-color-green-500), 1)",600:"rgba(var(--starasia-ui-raw-color-green-600), 1)",700:"rgba(var(--starasia-ui-raw-color-green-700), 1)",800:"rgba(var(--starasia-ui-raw-color-green-800), 1)",900:"rgba(var(--starasia-ui-raw-color-green-900), 1)"}},main:{primary:{"background-color":"rgb(var(--starasia-ui-raw-color-brand-default))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgb(var(--starasia-ui-raw-color-brand-active))","border-color":"rgb(var(--starasia-ui-raw-color-brand-active))","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},secondary:{"background-color":"rgb(var(--starasia-ui-raw-color-gray-50))","text-color":"rgb(72, 80, 76)","border-color":"rgba(120, 134, 127, 0.2)",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-100), 0.9)","border-color":"rgba(120, 134, 127, 0.2)","text-color":"rgb(72, 80, 76)",shadow:"0px 0px 0px -1px #f0f0f0"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.1)","border-color":"rgba(120, 134, 127, 0.2)","text-color":"rgb(72, 80, 76)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-gray-200), 0.28), 0px 0px 0px -1px #f0f0f0"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-gray-200), 0.68)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},tertiary:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.21)",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.3)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px -1px #f0f0f0"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.46)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)","border-color":"rgba(var(--starasia-ui-raw-color-brand-secondary), 0.5)","text-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.5)"}},quaternary:{"background-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))",hover:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)","text-color":"rgba(var(--starasia-ui-raw-color-brand-default), 0.9)"},active:{"background-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-brand-default))","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-brand-secondary), 0.28)"},disable:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},link:{"background-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))","border-color":"rgba(255, 255, 255, 0)",hover:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgba(var(--starasia-ui-raw-color-brand-active), 0.9)"},active:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-brand-default))"},disable:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(255, 255, 255, 0)","text-color":"rgba(var(--starasia-ui-raw-color-gray-500), 0.62)"}},success:{"background-color":"rgb(var(--starasia-ui-raw-color-green-500))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-green-500))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-green-500), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-green-500), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-green-600), 0.75)","border-color":"rgba(var(--starasia-ui-raw-color-green-600), 0.75)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-green-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-gray-400))","border-color":"rgb(var(--starasia-ui-raw-color-gray-400))","text-color":"rgba(120, 134, 127, 0.62)"}},danger:{"background-color":"rgb(var(--starasia-ui-raw-color-red-600))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-red-600))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-red-600), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-red-600), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-red-800), 0.68)","border-color":"rgba(var(--starasia-ui-raw-color-red-800), 0.68)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-red-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-red-300))","border-color":"rgb(var(--starasia-ui-raw-color-red-300))","text-color":"rgba(201, 24, 74, 0.3)"}},warning:{"background-color":"rgb(var(--starasia-ui-raw-color-orange-600))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-orange-600))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-orange-600), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-orange-600), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-orange-800), 0.75)","border-color":"rgba(var(--starasia-ui-raw-color-orange-800), 0.75)","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 2px rgba(var(--starasia-ui-raw-color-orange-800), 0.28)"},disable:{"background-color":"rgb(var(--starasia-ui-raw-color-orange-300))","border-color":"rgb(var(--starasia-ui-raw-color-orange-300))","text-color":"rgb(var(--starasia-ui-raw-color-orange-600))"}}},brand:{primary:{default:"rgba(74, 106, 148, 1)",secondary:"rgba(144, 176, 218, 1)",tertiary:"rgba(227, 237, 248, 1)"},secondary:{default:"var(--starasia-ui-color-pink-700)",secondary:"var(--starasia-ui-color-pink-300)",tertiary:"var(--starasia-ui-color-pink-50)"}},text:{default:"var(--starasia-ui-color-gray-900)",secondary:"var(--starasia-ui-color-gray-700)",tertiary:"var(--starasia-ui-color-gray-500)",disable:"var(--starasia-ui-color-gray-200)",white:"var(--starasia-ui-color-white-900)"},utility:{success:{default:"var(--starasia-ui-color-green-600)",secondary:"var(--starasia-ui-color-green-200)",tertiary:"var(--starasia-ui-color-green-50)"},danger:{default:"var(--starasia-ui-color-red-600)",secondary:"var(--starasia-ui-color-red-200)",tertiary:"var(--starasia-ui-color-red-50)"},warning:{default:"var(--starasia-ui-color-orange-600)",secondary:"var(--starasia-ui-color-orange-200)",tertiary:"var(--starasia-ui-color-orange-50)"},information:{default:"var(--starasia-ui-color-blue-600)",secondary:"var(--starasia-ui-color-blue-200)",tertiary:"var(--starasia-ui-color-blue-50)"},dark:{default:"var(--starasia-ui-color-gray-600)",secondary:"var(--starasia-ui-color-gray-200)",tertiary:"var(--starasia-ui-color-gray-50)"},fill:{default:"rgba(120, 134, 127, 0.2)",secondary:"rgba(120, 134, 127, 0.16)",tertiary:"rgba(120, 134, 127, 0.1)"}}},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(--starasia-ui-color-border)"},shadows:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",card:"0px 4px 35px 0px rgba(112, 144, 176, 0.25)"}},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:200,normal:300,medium:400,semibold:500,bold:600,extrabold:700,black:800},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}}},k=(r,a)=>{const o={};return Object.keys(r).forEach(s=>{if(r!=null&&r[s]&&typeof(r==null?void 0:r[s])=="object"){o[s]={...r==null?void 0:r[s],...a==null?void 0:a[s],...k(r==null?void 0:r[s],a==null?void 0:a[s])};return}o[s]=(a==null?void 0:a[s])||(r==null?void 0:r[s])}),o};function v(){const r=u.useContext(x),a=u.useMemo(()=>({...y,...r.theme,...k(y,r.theme)}),[r.theme,y]);return{...r,theme:a}}function B(){const{theme:r}=v();return r.colors}function H(){var a;const{theme:r}=v();return(a=r.metrics)==null?void 0:a.spacing}function J(){var a;const{theme:r}=v();return(a=r.metrics)==null?void 0:a.radii}function L(){var a;const{theme:r}=v();return(a=r==null?void 0:r.metrics)==null?void 0:a.shadows}function _(r){return r}l.ThemeContext=x,l.ThemeProvider=q,l.createTheme=_,l.useColor=B,l.useRadius=J,l.useShadow=L,l.useSpacing=H,l.useTheme=v,Object.defineProperty(l,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": "1.0.3",
4
+ "version": "2.0.0",
5
5
  "description": "Theme component for starasia UI",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",