@berdsk/ui 0.2.1 → 0.2.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/index.js CHANGED
@@ -36,8 +36,12 @@ var $e=Object.create;var xe=Object.defineProperty;var Ue=Object.getOwnPropertyDe
36
36
  .px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
37
37
  .p-0 { padding: 0; }
38
38
  .max-w-7xl { max-width: 80rem; }
39
+ .bottom-full { bottom: 100%; }
40
+ .top-full { top: 100%; }
39
41
  .-translate-y-full { transform: translateY(-100%); }
40
42
  .translate-y-full { transform: translateY(100%); }
43
+ .-top-full { top: -100%; }
44
+ .-bottom-full { bottom: -100%; }
41
45
  .aspect-square { aspect-ratio: 1 / 1; }
42
46
  .cursor-pointer { cursor: pointer; }
43
47
  .cursor-not-allowed { cursor: not-allowed; }
@@ -94,7 +98,7 @@ var $e=Object.create;var xe=Object.defineProperty;var Ue=Object.getOwnPropertyDe
94
98
  * {
95
99
  font-family: var(--berdsk-font-family);
96
100
  }
97
- `},[t]),$r(He.Provider,{value:{theme:t},children:r})},st=()=>I.useContext(He);import{jsx as v,jsxs as oe}from"react/jsx-runtime";var De=({variant:e,color:r="currentColor",className:t,height:o=100,position:s})=>{let a={height:o},n=T("absolute left-0 w-full z-50 pointer-events-none",s==="top"?"top-0":"bottom-0",t),m={wavy:"bottom","wavy-simple":"top",arched:"bottom"},c=s,g=m[e]!==c?{color:r,transform:"scaleY(-1)",transformOrigin:"center"}:{color:r};return oe("div",{className:n,style:a,"aria-hidden":!0,children:[e==="wavy"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:oe("g",{fill:"currentColor",children:[v("path",{d:"M1280 3.4C1050.59 18 1019.4 84.89 734.42 84.89c-320 0-320-84.3-640-84.3C59.4.59 28.2 1.6 0 3.4V140h1280z",fillOpacity:".3"}),v("path",{d:"M0 24.31c43.46-5.69 94.56-9.25 158.42-9.25 320 0 320 89.24 640 89.24 256.13 0 307.28-57.16 481.58-80V140H0z",fillOpacity:".5"}),v("path",{d:"M1280 51.76c-201 12.49-242.43 53.4-513.58 53.4-320 0-320-57-640-57-48.85.01-90.21 1.35-126.42 3.6V140h1280z"})]})}),e==="wavy-simple"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:v("g",{fill:"currentColor",children:v("path",{d:"M320 28C160 28 80 49 0 70V0h1280v70c-80 21-160 42-320 42-320 0-320-84-640-84z"})})}),e==="arched"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:oe("g",{fill:"currentColor",children:[v("path",{d:"M725.29 101.2C325.22 122.48 0 0 0 0v140h1280V0s-154.64 79.92-554.71 101.2z",fillOpacity:".3"}),v("path",{d:"M556.45 119.74C953.41 140 1280 14 1280 14v126H0V0s159.5 99.48 556.45 119.74z",fillOpacity:".5"}),v("path",{d:"M640 140c353.46 0 640-140 640-139v140H0V0s286.54 140 640 140z"})]})})]})},lt=({children:e,as:r="section",fullWidth:t=!1,screenHeight:o=!1,flex:s=!1,centerX:a=!1,centerY:n=!1,className:m="",containerClassName:c="",divisorTop:u,divisorBottom:g,...y})=>{let x=!!o,S=T("relative w-full",o&&"min-h-screen",s&&"flex-1",o&&"flex flex-col",(a||n)&&"flex",a&&(t||x)&&"items-center",n&&(t||x)&&"justify-center",a&&t&&!x&&"justify-center",n&&t&&!x&&"items-center",m),z=T("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl w-full",{"flex-1":o,flex:a||n,"justify-center":a,"items-center":n},c);return oe(r,{className:S,...y,children:[u&&v(De,{position:"top",variant:u.variant,color:u.color,className:u.className,height:u.height}),t?e:v("div",{className:z,children:e}),g&&v(De,{position:"bottom",variant:g.variant,color:g.color,className:g.className,height:g.height})]})};export{Br as Button,Qr as Icon,lt as Section,ot as ThemeProvider,V as defaultTheme,st as useTheme};
101
+ `},[t]),$r(He.Provider,{value:{theme:t},children:r})},st=()=>I.useContext(He);import{jsx as v,jsxs as oe}from"react/jsx-runtime";var De=({variant:e,color:r="currentColor",className:t,height:o=100,position:s})=>{let a={height:o},n=T("absolute left-0 w-full z-50 pointer-events-none",s==="top"?"bottom-full":"top-full",t),m={wavy:"bottom","wavy-simple":"top",arched:"bottom"},c=s==="top"?"bottom":"top",g=m[e]!==c?{color:r,transform:"scaleY(-1)",transformOrigin:"center"}:{color:r};return oe("div",{className:n,style:a,"aria-hidden":!0,children:[e==="wavy"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:oe("g",{fill:"currentColor",children:[v("path",{d:"M1280 3.4C1050.59 18 1019.4 84.89 734.42 84.89c-320 0-320-84.3-640-84.3C59.4.59 28.2 1.6 0 3.4V140h1280z",fillOpacity:".3"}),v("path",{d:"M0 24.31c43.46-5.69 94.56-9.25 158.42-9.25 320 0 320 89.24 640 89.24 256.13 0 307.28-57.16 481.58-80V140H0z",fillOpacity:".5"}),v("path",{d:"M1280 51.76c-201 12.49-242.43 53.4-513.58 53.4-320 0-320-57-640-57-48.85.01-90.21 1.35-126.42 3.6V140h1280z"})]})}),e==="wavy-simple"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:v("g",{fill:"currentColor",children:v("path",{d:"M320 28C160 28 80 49 0 70V0h1280v70c-80 21-160 42-320 42-320 0-320-84-640-84z"})})}),e==="arched"&&v("svg",{width:"100%",height:"100%",viewBox:"0 0 1280 140",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:g,children:oe("g",{fill:"currentColor",children:[v("path",{d:"M725.29 101.2C325.22 122.48 0 0 0 0v140h1280V0s-154.64 79.92-554.71 101.2z",fillOpacity:".3"}),v("path",{d:"M556.45 119.74C953.41 140 1280 14 1280 14v126H0V0s159.5 99.48 556.45 119.74z",fillOpacity:".5"}),v("path",{d:"M640 140c353.46 0 640-140 640-139v140H0V0s286.54 140 640 140z"})]})})]})},lt=({children:e,as:r="section",fullWidth:t=!1,screenHeight:o=!1,flex:s=!1,centerX:a=!1,centerY:n=!1,className:m="",containerClassName:c="",divisorTop:u,divisorBottom:g,...y})=>{let x=!!o,S=T("relative w-full",o&&"min-h-screen",s&&"flex-1",o&&"flex flex-col",(a||n)&&"flex",a&&(t||x)&&"items-center",n&&(t||x)&&"justify-center",a&&t&&!x&&"justify-center",n&&t&&!x&&"items-center",m),z=T("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl w-full",{"flex-1":o,flex:a||n,"justify-center":a,"items-center":n},c);return oe(r,{className:S,...y,children:[u&&v(De,{position:"top",variant:u.variant,color:u.color,className:u.className,height:u.height}),t?e:v("div",{className:z,children:e}),g&&v(De,{position:"bottom",variant:g.variant,color:g.color,className:g.className,height:g.height})]})};export{Br as Button,Qr as Icon,lt as Section,ot as ThemeProvider,V as defaultTheme,st as useTheme};
98
102
  /*! Bundled license information:
99
103
 
100
104
  classnames/index.js: