@starasia/theme 1.0.1 → 1.0.3
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/default.json.d.ts +39 -33
- package/dist/index.es.js +214 -841
- package/dist/index.umd.js +20 -49
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var nr;function Wr(){return nr||(nr=1,process.env.NODE_ENV!=="production"&&function(){var o=k,t=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),g=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),M=Symbol.iterator,U="@@iterator";function Qr(r){if(r===null||typeof r!="object")return null;var a=M&&r[M]||r[U];return typeof a=="function"?a:null}var F=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(r){{for(var a=arguments.length,e=new Array(a>1?a-1:0),n=1;n<a;n++)e[n-1]=arguments[n];ra("error",r,e)}}function ra(r,a,e){{var n=F.ReactDebugCurrentFrame,f=n.getStackAddendum();f!==""&&(a+="%s",e=e.concat([f]));var p=e.map(function(b){return String(b)});p.unshift("Warning: "+a),Function.prototype.apply.call(console[r],console,p)}}var aa=!1,oa=!1,ea=!1,ta=!1,ia=!1,gr;gr=Symbol.for("react.module.reference");function sa(r){return!!(typeof r=="string"||typeof r=="function"||r===s||r===l||ia||r===c||r===m||r===x||ta||r===j||aa||oa||ea||typeof r=="object"&&r!==null&&(r.$$typeof===O||r.$$typeof===S||r.$$typeof===v||r.$$typeof===g||r.$$typeof===d||r.$$typeof===gr||r.getModuleId!==void 0))}function na(r,a,e){var n=r.displayName;if(n)return n;var f=a.displayName||a.name||"";return f!==""?e+"("+f+")":e}function fr(r){return r.displayName||"Context"}function P(r){if(r==null)return null;if(typeof r.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case s:return"Fragment";case i:return"Portal";case l:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case x:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case g:var a=r;return fr(a)+".Consumer";case v:var e=r;return fr(e._context)+".Provider";case d:return na(r,r.render,"ForwardRef");case S:var n=r.displayName||null;return n!==null?n:P(r.type)||"Memo";case O:{var f=r,p=f._payload,b=f._init;try{return P(b(p))}catch{return null}}}return null}var $=Object.assign,L=0,vr,dr,pr,wr,yr,xr,mr;function hr(){}hr.__reactDisabledLog=!0;function ca(){{if(L===0){vr=console.log,dr=console.info,pr=console.warn,wr=console.error,yr=console.group,xr=console.groupCollapsed,mr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:hr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}L++}}function la(){{if(L--,L===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},r,{value:vr}),info:$({},r,{value:dr}),warn:$({},r,{value:pr}),error:$({},r,{value:wr}),group:$({},r,{value:yr}),groupCollapsed:$({},r,{value:xr}),groupEnd:$({},r,{value:mr})})}L<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=F.ReactCurrentDispatcher,Z;function J(r,a,e){{if(Z===void 0)try{throw Error()}catch(f){var n=f.stack.trim().match(/\n( *(at )?)/);Z=n&&n[1]||""}return`
|
|
18
|
-
`+Z+r}}var Q=!1,B;{var ua=typeof WeakMap=="function"?WeakMap:Map;B=new ua}function Er(r,a){if(!r||Q)return"";{var e=B.get(r);if(e!==void 0)return e}var n;Q=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=q.current,q.current=null,ca();try{if(a){var b=function(){throw Error()};if(Object.defineProperty(b.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(b,[])}catch(_){n=_}Reflect.construct(r,[],b)}else{try{b.call()}catch(_){n=_}r.call(b.prototype)}}else{try{throw Error()}catch(_){n=_}r()}}catch(_){if(_&&n&&typeof _.stack=="string"){for(var u=_.stack.split(`
|
|
19
|
-
`),E=n.stack.split(`
|
|
20
|
-
`),w=u.length-1,y=E.length-1;w>=1&&y>=0&&u[w]!==E[y];)y--;for(;w>=1&&y>=0;w--,y--)if(u[w]!==E[y]){if(w!==1||y!==1)do if(w--,y--,y<0||u[w]!==E[y]){var C=`
|
|
21
|
-
`+u[w].replace(" at new "," at ");return r.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",r.displayName)),typeof r=="function"&&B.set(r,C),C}while(w>=1&&y>=0);break}}}finally{Q=!1,q.current=p,la(),Error.prepareStackTrace=f}var A=r?r.displayName||r.name:"",T=A?J(A):"";return typeof r=="function"&&B.set(r,T),T}function ba(r,a,e){return Er(r,!1)}function ga(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function K(r,a,e){if(r==null)return"";if(typeof r=="function")return Er(r,ga(r));if(typeof r=="string")return J(r);switch(r){case m:return J("Suspense");case x:return J("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case d:return ba(r.render);case S:return K(r.type,a,e);case O:{var n=r,f=n._payload,p=n._init;try{return K(p(f),a,e)}catch{}}}return""}var N=Object.prototype.hasOwnProperty,Rr={},_r=F.ReactDebugCurrentFrame;function z(r){if(r){var a=r._owner,e=K(r.type,r._source,a?a.type:null);_r.setExtraStackFrame(e)}else _r.setExtraStackFrame(null)}function fa(r,a,e,n,f){{var p=Function.call.bind(N);for(var b in r)if(p(r,b)){var u=void 0;try{if(typeof r[b]!="function"){var E=Error((n||"React class")+": "+e+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}u=r[b](a,b,n,e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(w){u=w}u&&!(u instanceof Error)&&(z(f),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",e,b,typeof u),z(null)),u instanceof Error&&!(u.message in Rr)&&(Rr[u.message]=!0,z(f),h("Failed %s type: %s",e,u.message),z(null))}}}var va=Array.isArray;function rr(r){return va(r)}function da(r){{var a=typeof Symbol=="function"&&Symbol.toStringTag,e=a&&r[Symbol.toStringTag]||r.constructor.name||"Object";return e}}function pa(r){try{return kr(r),!1}catch{return!0}}function kr(r){return""+r}function Sr(r){if(pa(r))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",da(r)),kr(r)}var V=F.ReactCurrentOwner,wa={key:!0,ref:!0,__self:!0,__source:!0},Cr,Or,ar;ar={};function ya(r){if(N.call(r,"ref")){var a=Object.getOwnPropertyDescriptor(r,"ref").get;if(a&&a.isReactWarning)return!1}return r.ref!==void 0}function xa(r){if(N.call(r,"key")){var a=Object.getOwnPropertyDescriptor(r,"key").get;if(a&&a.isReactWarning)return!1}return r.key!==void 0}function ma(r,a){if(typeof r.ref=="string"&&V.current&&a&&V.current.stateNode!==a){var e=P(V.current.type);ar[e]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(V.current.type),r.ref),ar[e]=!0)}}function ha(r,a){{var e=function(){Cr||(Cr=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};e.isReactWarning=!0,Object.defineProperty(r,"key",{get:e,configurable:!0})}}function Ea(r,a){{var e=function(){Or||(Or=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};e.isReactWarning=!0,Object.defineProperty(r,"ref",{get:e,configurable:!0})}}var Ra=function(r,a,e,n,f,p,b){var u={$$typeof:t,type:r,key:a,ref:e,props:b,_owner:p};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function _a(r,a,e,n,f){{var p,b={},u=null,E=null;e!==void 0&&(Sr(e),u=""+e),xa(a)&&(Sr(a.key),u=""+a.key),ya(a)&&(E=a.ref,ma(a,f));for(p in a)N.call(a,p)&&!wa.hasOwnProperty(p)&&(b[p]=a[p]);if(r&&r.defaultProps){var w=r.defaultProps;for(p in w)b[p]===void 0&&(b[p]=w[p])}if(u||E){var y=typeof r=="function"?r.displayName||r.name||"Unknown":r;u&&ha(b,y),E&&Ea(b,y)}return Ra(r,u,E,f,n,V.current,b)}}var or=F.ReactCurrentOwner,Pr=F.ReactDebugCurrentFrame;function D(r){if(r){var a=r._owner,e=K(r.type,r._source,a?a.type:null);Pr.setExtraStackFrame(e)}else Pr.setExtraStackFrame(null)}var er;er=!1;function tr(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function jr(){{if(or.current){var r=P(or.current.type);if(r)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+r+"`."}return""}}function ka(r){return""}var $r={};function Sa(r){{var a=jr();if(!a){var e=typeof r=="string"?r:r.displayName||r.name;e&&(a=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+e+">.")}return a}}function Tr(r,a){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var e=Sa(a);if($r[e])return;$r[e]=!0;var n="";r&&r._owner&&r._owner!==or.current&&(n=" It was passed a child from "+P(r._owner.type)+"."),D(r),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',e,n),D(null)}}function Fr(r,a){{if(typeof r!="object")return;if(rr(r))for(var e=0;e<r.length;e++){var n=r[e];tr(n)&&Tr(n,a)}else if(tr(r))r._store&&(r._store.validated=!0);else if(r){var f=Qr(r);if(typeof f=="function"&&f!==r.entries)for(var p=f.call(r),b;!(b=p.next()).done;)tr(b.value)&&Tr(b.value,a)}}}function Ca(r){{var a=r.type;if(a==null||typeof a=="string")return;var e;if(typeof a=="function")e=a.propTypes;else if(typeof a=="object"&&(a.$$typeof===d||a.$$typeof===S))e=a.propTypes;else return;if(e){var n=P(a);fa(e,r.props,"prop",n,r)}else if(a.PropTypes!==void 0&&!er){er=!0;var f=P(a);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof a.getDefaultProps=="function"&&!a.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Oa(r){{for(var a=Object.keys(r.props),e=0;e<a.length;e++){var n=a[e];if(n!=="children"&&n!=="key"){D(r),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}r.ref!==null&&(D(r),h("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}var Dr={};function Ar(r,a,e,n,f,p){{var b=sa(r);if(!b){var u="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=ka();E?u+=E:u+=jr();var w;r===null?w="null":rr(r)?w="array":r!==void 0&&r.$$typeof===t?(w="<"+(P(r.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):w=typeof r,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w,u)}var y=_a(r,a,e,f,p);if(y==null)return y;if(b){var C=a.children;if(C!==void 0)if(n)if(rr(C)){for(var A=0;A<C.length;A++)Fr(C[A],r);Object.freeze&&Object.freeze(C)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fr(C,r)}if(N.call(a,"key")){var T=P(r),_=Object.keys(a).filter(function(Da){return Da!=="key"}),ir=_.length>0?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}";if(!Dr[T+ir]){var Fa=_.length>0?"{"+_.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ir,T,Fa,T),Dr[T+ir]=!0}}return r===s?Oa(y):Ca(y),y}}function Pa(r,a,e){return Ar(r,a,e,!0)}function ja(r,a,e){return Ar(r,a,e,!1)}var $a=ja,Ta=Pa;W.Fragment=s,W.jsx=$a,W.jsxs=Ta}()),W}process.env.NODE_ENV==="production"?G.exports=Ir():G.exports=Wr();var Yr=G.exports;function cr(o,t=""){let i="";for(const s in o)if(Object.hasOwnProperty.call(o,s)){const c=o[s];i+=`/* ${s} */
|
|
31
|
-
`;for(const l in c)if(Object.hasOwnProperty.call(c,l)){const v=c[l];i+=`--${t}-${s}-${l}: ${v};
|
|
32
|
-
`}}return i}function lr(o,t){let i="";for(const s in o){const c=o[s];for(const l in c){const v=c[l],g=`${t}-${s}-${l}`;i+=`--${g}: ${v};
|
|
33
|
-
`}}return i}function Mr(o,t){let i="";function s(c,l,v="",g="",d=""){if(d){const m=`${v}${d}-${g}-${c}`;i+=`--${m}: ${l};
|
|
34
|
-
`}else{const m=`${v}${c}-${g}`;i+=`--${m}: ${l};
|
|
35
|
-
`}}for(const c in o){const l=o[c];for(const v in l){const g=l[v];if(typeof g=="object")for(const d in g){const m=g[d],x=`${t}-`;s(v,m,x,c,d)}else{const d=`${t}-`;s(v,g,d,c)}}}return i}function Lr(o,t=""){let i="";function s(c,l,v=""){if(typeof l=="object")for(const g in l){const d=l[g],m=`--${v}-${c}-${g}`;i+=`${m}: ${d};
|
|
36
|
-
`}else{const g=`--${v}-${c}`;i+=`${g}: ${l};
|
|
37
|
-
`}}for(const c in o){const l=o[c];if(typeof l=="object")s(c,l,`${t}`);else{const v=`--${t}-${c}`;i+=`${v}: ${l};
|
|
38
|
-
`}}return i}function Nr(o,t=""){let i="";for(const s in o){const c=o[s];for(const l in c){const v=`--${t}-${s}-${l}`,g=c[l];i+=`${v}: ${g};
|
|
39
|
-
`}}return i}function Vr(o,t){let i="";for(const s in o)if(Object.hasOwnProperty.call(o,s)){const c=o[s];s==="default"?i+=`--${t}: ${c};
|
|
40
|
-
`:i+=`--${t}-${s}: ${c};
|
|
41
|
-
`}return i}const Ur=o=>{const t=document.getElementById(o);if(t)return t;const i=document.createElement("style");return i.id=o,document.head.appendChild(i),i};function ur(o,t){let i="";return Object.keys(o).forEach(s=>{const c=o[s];if(c&&typeof c=="object"){i+=ur(c,`${t}-${s}`);return}i+=`${t}-${s}: ${c};
|
|
42
|
-
`}),i}function Jr(o,t){let i="";return o&&(i+=ur(o,t)),i}function Br(o){var x,S,O,j,M,U;if(!o)return;const t=(x=o.colors)!=null&&x.raw?lr(o.colors.raw,"starasia-ui-raw-color"):"",i=(S=o.colors)!=null&&S.computed?lr(o.colors.computed,"starasia-ui-color"):"",s=(O=o.colors)!=null&&O.main?Mr(o.colors.main,"starasia-ui"):"",c=(j=o.colors)!=null&&j.brand?cr(o.colors.brand,"starasia-ui-brand"):"",l=(M=o.colors)!=null&&M.utility?cr(o.colors.utility,"starasia-ui-utility"):"",v=(U=o.colors)!=null&&U.text?Vr(o.colors.text,"starasia-ui-color-text"):"",g=o.metrics?Lr(o.metrics,"starasia-ui"):"",d=o.font?Nr(o.font,"starasia-ui"):"",m=o.components?Jr(o.components,"--starasia-ui"):"";return`
|
|
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} */
|
|
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};
|
|
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
|
+
`}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};
|
|
7
|
+
`}else{const e=`--${c}-${t}`;o+=`${e}: ${i};
|
|
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};
|
|
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
|
+
`: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`
|
|
43
14
|
:root {
|
|
15
|
+
${a}
|
|
16
|
+
${o}
|
|
17
|
+
${s}
|
|
44
18
|
${t}
|
|
45
19
|
${i}
|
|
46
|
-
${s}
|
|
47
20
|
${c}
|
|
48
|
-
${
|
|
49
|
-
${
|
|
50
|
-
${
|
|
51
|
-
${d}
|
|
52
|
-
${m}
|
|
21
|
+
${e}
|
|
22
|
+
${n}
|
|
23
|
+
${b}
|
|
53
24
|
}
|
|
54
|
-
`}const H=k.createContext({theme:void 0,setTheme:()=>{}}),Kr="starasia-theme-style";function zr({value:o,children:t}){const[i,s]=k.useState(o),c=k.useMemo(()=>i?JSON.stringify(i):"",[i]),l=k.useRef(Ur(Kr));k.useEffect(()=>{if(c){const g=Br(JSON.parse(c));g&&(l!=null&&l.current)&&(l.current.textContent=g)}},[c]);const v=g=>{g&&s(g)};return Yr.jsx(H.Provider,{value:{theme:i,setTheme:v},children:t})}const X={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"}},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-blue-700))","text-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-blue-700))",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-blue-700), 0.9)","border-color":"rgba(var(--starasia-ui-raw-color-blue-700), 0.9)","text-color":"rgb(255, 255, 255)"},active:{"background-color":"rgb(var(--starasia-ui-raw-color-blue-800))","border-color":"rgb(var(--starasia-ui-raw-color-blue-800))","text-color":"rgb(255, 255, 255)",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 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-blue-300), 0.21)","text-color":"rgb(var(--starasia-ui-raw-color-blue-700))","border-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.21)",hover:{"background-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.3)","border-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.3)","text-color":"rgb(var(--starasia-ui-raw-color-blue-700))",shadow:"0px 0px 0px -1px #f0f0f0"},active:{"background-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.46)","border-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.46)","text-color":"rgb(var(--starasia-ui-raw-color-blue-700))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 0.28)"},disable:{"background-color":"rgba(var(--starasia-ui-raw-color-blue-200), 0.8)","border-color":"rgba(var(--starasia-ui-raw-color-blue-200), 0.8)","text-color":"rgba(var(--starasia-ui-raw-color-blue-300), 0.5)"}},quaternary:{"background-color":"rgba(255, 255, 255, 0)","text-color":"rgb(var(--starasia-ui-raw-color-blue-700))","border-color":"rgb(var(--starasia-ui-raw-color-blue-700))",hover:{"background-color":"rgba(255, 255, 255, 0)","border-color":"rgba(var(--starasia-ui-raw-color-blue-700), 0.9)","text-color":"rgba(var(--starasia-ui-raw-color-blue-700), 0.9)"},active:{"background-color":"rgb(255, 255, 255)","border-color":"rgb(var(--starasia-ui-raw-color-blue-700))","text-color":"rgb(var(--starasia-ui-raw-color-blue-700))",shadow:"0px 0px 0px 3px rgba(var(--starasia-ui-raw-color-blue-300), 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-blue-700))","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-blue-900), 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-blue-700))"},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:"var(--starasia-ui-color-blue-700)",secondary:"var(--starasia-ui-color-blue-300)",tertiary:"var(--starasia-ui-color-blue-50)"},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}}},br=(o,t)=>{const i={};return Object.keys(o).forEach(s=>{if(o!=null&&o[s]&&typeof(o==null?void 0:o[s])=="object"){i[s]={...o==null?void 0:o[s],...t==null?void 0:t[s],...br(o==null?void 0:o[s],t==null?void 0:t[s])};return}i[s]=(t==null?void 0:t[s])||(o==null?void 0:o[s])}),i};function Y(){const o=k.useContext(H),t=k.useMemo(()=>({...X,...o.theme,...br(X,o.theme)}),[o.theme,X]);return{...o,theme:t}}function Gr(){const{theme:o}=Y();return o.colors}function Hr(){var t;const{theme:o}=Y();return(t=o.metrics)==null?void 0:t.spacing}function Xr(){var t;const{theme:o}=Y();return(t=o.metrics)==null?void 0:t.radii}function qr(){var t;const{theme:o}=Y();return(t=o==null?void 0:o.metrics)==null?void 0:t.shadows}function Zr(o){return o}R.ThemeContext=H,R.ThemeProvider=zr,R.createTheme=Zr,R.useColor=Gr,R.useRadius=Xr,R.useShadow=qr,R.useSpacing=Hr,R.useTheme=Y,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starasia/theme",
|
|
3
3
|
"author": "Prawito Hudoro",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "Theme component for starasia UI",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@starasia/css": "^1.0.
|
|
44
|
+
"@starasia/css": "^1.0.2"
|
|
45
45
|
}
|
|
46
46
|
}
|