2 lines
2 KiB
JavaScript
2 lines
2 KiB
JavaScript
import{p as r,f as v,a as g}from"./props-b4vEeO_8.js";import{J as T,G as j,B as w,I as d,k as m,N as h}from"./runtime-C3rQLW--.js";import{s as x}from"./snippet-C5kbqVpq.js";import{s as C}from"./style-DvJ3IcV1.js";import{f as _,d as O,l as V}from"./flatten-CQmJgKju.js";function a(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function l(e,...i){if(!i.length)return e;const n=i.shift();if(a(e)&&a(n))for(const t in n)a(n[t])?(e[t]||Object.assign(e,{[t]:{}}),l(e[t],n[t])):Object.assign(e,{[t]:n[t]});return l(e,...i)}const c={light:V,dark:O};var A=v('<div class="theme"><div class="theme-client-override" style="display: contents;"><!></div></div>');function B(e,i){w(i,!0);let n=r(i,"theme",19,()=>({})),t=r(i,"base",3,"light"),p=h(()=>l({},c[t()]||c.light,n())),f=h(()=>Object.entries(_({theme:m(p)})).map(([k,b])=>`--${k}: ${b};`).join(" "));var s=A();let o;var y=d(s),u=d(y);x(u,()=>i.children),T(()=>o=C(s,m(f),o,{display:"contents"})),g(e,s),j()}B.__docgen={data:[{name:"theme",visibility:"public",description:`Custom theme object. Can be a partial theme with just
|
|
what you want to change.`,keywords:[],kind:"let",type:{kind:"union",type:[{kind:"type",type:"object",text:"CustomThemeConfig"},{kind:"type",type:"object",text:"ThemeConfig"}],text:"CustomThemeConfig | ThemeConfig"},static:!1,readonly:!1,defaultValue:"{}"},{name:"base",visibility:"public",description:"Base theme is one of `light` or `dark` and will be merged\nwith your custom theme to fill in any values you don't\nexplicitly set.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"light",text:'"light"'},{kind:"const",type:"string",value:"dark",text:'"dark"'}],text:'"light" | "dark"'},static:!1,readonly:!1,defaultValue:'"light"'},{name:"children",visibility:"public",description:"Content wrapped inside `Theme`",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1}],name:"Theme.svelte"};export{B as T,c as t};
|