UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

3 lines 2.26 kB
'use client'; import{a as s,c as b}from"./chunk-MIIH4HY3.js";import{a as p}from"./chunk-6S7RPWAM.js";import{a as n}from"./chunk-HTOKQYVM.js";import{b as l}from"./chunk-CMFNILWJ.js";import{b as r}from"./chunk-XYM7TA65.js";import{Border1 as u,ColorBackgroundBodyDark as S,ColorBackgroundBodyWhite as R,ColorTextDark as k,ColorTextLight as c,ShadowBrutal1 as P,ShadowBrutal1Dark as H,ShadowBrutal1Light as T,ShadowBrutal2 as C,ShadowBrutal2Dark as D,ShadowBrutal2Light as N,ShadowNone as z,SizeRadiusS as h}from"@snowball-tech/design-tokens/dist/web/typescript/design-tokens";import{SizeBorder1 as f,SizeSpacing2 as w,SizeSpacingHalf as $,SizeSpacingQuarter as m}from"@snowball-tech/design-tokens/dist/web/typescript/design-tokens-px";import{forwardRef as F}from"react";import q from"lodash/fp/omit";import{jsx as M}from"react/jsx-runtime";var o={"1":"rounded-sm shadow-none","2":"rounded-sm shadow-subtle ml-quarter mb-quarter","3":"rounded-sm shadow-brutal ml-quarter mb-half"},A={light:{"1":o["1"],"2":r(o["2"],"shadow-subtle-light"),"3":r(o["3"],"shadow-brutal-light")},dark:{"1":o["1"],"2":r(o["2"],"shadow-subtle-dark"),"3":r(o["3"],"shadow-brutal-dark")}},d={"1":{borderRadius:h,boxShadow:z},"2":{borderRadius:h,boxShadow:P,marginBottom:m,marginLeft:m},"3":{borderRadius:h,boxShadow:C,marginBottom:$,marginLeft:m}},B={light:{"1":d["1"],"2":{...d["2"],boxShadow:T},"3":{...d["3"],boxShadow:N}},dark:{"1":d["1"],"2":{...d["2"],boxShadow:H},"3":{...d["3"],boxShadow:D}}},E=F(({children:v,element:x="div",elevation:i=b,fullStyle:g=!1,inlineStyle:a=!1,theme:y,...t},L)=>{let e=p(y);return M(n,{ref:L,className:r(`${l}-${s}`,`${l}-${s}--${i}`,!a&&"relative flex flex-col border-1 border-normal p-2",!a&&A[e][i],!a&&(e==="light"?"bg-white text-dark":"bg-body-dark text-light"),t.className),element:x||"div",fullStyle:g,inlineStyle:a,style:a?g?{boxSizing:"border-box",...B[e][i],backgroundColor:e==="light"?R:S,border:u,borderWidth:f,color:e==="light"?k:c,padding:w,...t.style}:{...B[e][i],backgroundColor:e==="light"?void 0:S,border:u,borderWidth:f,color:e==="light"?void 0:c,padding:w,...t.style}:t.style,...q(["className","style"],t),children:v})});E.displayName="Paper";var Y=E;export{A as a,B as b,E as c,Y as d}; //# sourceMappingURL=chunk-262C6VLB.js.map