UNPKG

@snowball-tech/fractal

Version:

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

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