digital-rabbit-cl 1.0.31 → 1.0.34

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.
@@ -1,4 +1,5 @@
1
- (function(h,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(h=typeof globalThis<"u"?globalThis:h||self,l(h.DigitalRabbitCL={},h.jsxRuntime,h.React))})(this,(function(h,l,S){"use strict";const P={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},G=({isActive:e,disabled:t,buttonColor:o="#FFF",textColor:s="#000",hoverColor:r,hoverTextColor:n,outline:c})=>{let a,u,d;c?(a="transparent",u=o,d=o,e&&(a=r||o,u=r||o,d=n||s)):(a=o,u=o,d=s,e&&(a=r||o,u=r||o,d=n||s));let f=1;return t?f=.3:e&&(f=r||c?1:.75),{backgroundColor:a,borderColor:u,color:d,opacity:f}},L={primary:"#FFF",secondary:"#000",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},k={colors:L,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:L.secondary}},borderRadius:"0px",breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},W=S.createContext(k),J=({theme:e={},children:t})=>{var s;const o={...k,...e,colors:{...k.colors,...e.colors},fonts:{...k.fonts,...e.fonts},buttons:{...k.buttons,...e.buttons,primary:{...k.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},breakpoints:{...k.breakpoints,...e.breakpoints},layout:{...k.layout,...e.layout}};return l.jsx(W.Provider,{value:o,children:t})},g=()=>S.useContext(W),K=({color:e,hoverColor:t,hoverTextColor:o,textColor:s,outline:r=!1,size:n,type:c="button",buttonProps:a={},children:u,disabled:d=!1,onClick:f,fontSize:m})=>{const y=g(),[i,p]=S.useState(!1);let _;s?_=s:_=e?y.buttons.textColor:y.buttons.primary.textColor;const b={...G({isActive:i,disabled:d,buttonColor:e||y.colors.primary,textColor:_,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:m||y.fonts.size},v=[P.button,n==="small"?P.sizeSmall:P.sizeDefault,r?P.outline:""].filter(Boolean).join(" ");return l.jsx("button",{className:v,disabled:d,onClick:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),type:c,...a,style:{...b,...a.style},children:u})};var E=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function Y(){if(!E)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(X)}for(var j=[],H=0;H<256;++H)j[H]=(H+256).toString(16).substr(1);function R(e,t){var o=0,s=j;return[s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]]].join("")}function V(e,t,o){var s=t&&o||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var r=e.random||(e.rng||Y)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(var n=0;n<16;++n)t[s+n]=r[n];return t||R(r)}const F={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},ee=({color:e="#000",checkmarkColor:t,disabled:o=!1,inverted:s=!1})=>{let r=e;return t?r=t:s&&(r="white"),{boxColor:e,checkmarkColor:r,cursor:o?"default":"pointer",opacity:o?.3:1}},te=({checked:e=!1,checkmarkColor:t,color:o,disabled:s=!1,fontSize:r,id:n,inverted:c=!1,label:a,labelStyle:u,name:d,onChange:f,style:m,...y})=>{const i=g(),p=n||V(),_=ee({color:o||i.colors.primary,checkmarkColor:t,disabled:s,inverted:c}),z=x=>{s||f(x)},b={cursor:_.cursor,fontSize:r||i.fonts.size,opacity:_.opacity,...m},v={width:r||"1rem"},C={color:_.boxColor,cursor:_.cursor,fontSize:r||"1rem",...u};return l.jsxs("div",{className:F.container,style:b,...y,children:[l.jsx("input",{id:p,checked:e,disabled:s,onChange:x=>z({target:{checked:x.target.checked,name:d,type:"checkbox"}}),name:d,style:{display:"none"},type:"checkbox"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!e,name:d,type:"checkbox"}}),style:v,className:F.svg,children:[l.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:c&&e?_.boxColor:"transparent",strokeWidth:"25",stroke:_.boxColor}}),e&&l.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:_.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),a&&l.jsx("label",{htmlFor:p,className:F.label,style:C,children:a})]})},oe=()=>{const e=g();return S.useLayoutEffect(()=>{const t=document.documentElement;e.fonts&&(e.fonts.fontFamily&&t.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&t.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&t.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&t.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&t.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&t.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&t.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&t.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&t.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&t.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&t.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&t.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&t.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&t.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&t.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&t.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&t.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&t.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&t.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&t.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null},A={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},se=({color:e="#000",disabled:t=!1,fontSize:o=".85em"})=>({color:e,fontSize:o,opacity:t?.5:1,cursor:t?"not-allowed":"default"}),re=({children:e,color:t,disabled:o=!1,fontSize:s,htmlFor:r,style:n,...c})=>{const a=g(),u=se({color:t||a.colors.primary,disabled:o,fontSize:s||".85em"}),d={color:u.color,fontSize:u.fontSize,opacity:u.opacity,cursor:u.cursor,...n},f=[A.label,o?A.disabled:""].filter(Boolean).join(" ");return l.jsx("label",{className:f,htmlFor:r,style:d,...c,children:e})},D={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ne=({color:e="#000",disabled:t=!1,fontSize:o="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:o,opacity:t?.3:1,placeholderOpacity:s}),ae=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,size:a,style:u,type:d="text",value:f="",...m})=>{const y=g(),i=ne({color:e||y.colors.primary,disabled:t,fontSize:o||y.fonts.size,placeholderOpacity:c}),p={"--placeholder-opacity":i.placeholderOpacity,borderColor:i.borderColor,color:i.color,fontSize:i.fontSize,opacity:i.opacity,...u},_=[D.input,a==="small"?D.sizeSmall:D.sizeDefault].filter(Boolean).join(" ");return l.jsx("input",{className:_,disabled:t,name:s,onChange:r,placeholder:n,style:p,type:d,value:f,...m})},M={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},le=({color:e="#000",disabled:t=!1})=>({radioColor:e,cursor:t?"default":"pointer",opacity:t?.3:1}),ce=({checked:e=!1,color:t,disabled:o=!1,fontSize:s,id:r,label:n,labelStyle:c,name:a,onChange:u,style:d,...f})=>{const m=g(),y=r||V(),i=le({color:t||m.colors.primary,disabled:o}),p=x=>{o||u(x)},_={cursor:i.cursor,fontSize:s||m.fonts.size,opacity:i.opacity,...d},z={width:s||m.fonts.size},b={fill:"transparent",strokeWidth:"12.5",stroke:i.radioColor},v={fill:i.radioColor},C={color:i.radioColor,cursor:i.cursor,fontSize:s||m.fonts.size,...c};return l.jsxs("div",{className:M.container,style:_,...f,children:[l.jsx("input",{id:y,checked:e,disabled:o,name:a,onChange:x=>p({target:{checked:x.target.checked,name:a,type:"radio"}}),style:{display:"none"},type:"radio"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>p({target:{checked:!e,name:a,type:"radio"}}),className:M.svg,style:z,children:[l.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:b}),e&&l.jsx("circle",{cx:"50",cy:"50",r:"25",style:v})]}),n&&l.jsx("label",{htmlFor:y,className:M.label,style:C,children:n})]})},I={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},ie=({color:e="#000",disabled:t=!1})=>({color:e,borderColor:e,cursor:t?"default":"pointer",opacity:t?.3:1,backgroundImage:(n=>{const c=`
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:4.25rem;position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.5rem 3rem;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.75rem 2rem}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ (function(f,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],a):(f=typeof globalThis<"u"?globalThis:f||self,a(f.DigitalRabbitCL={},f.jsxRuntime,f.React))})(this,(function(f,a,g){"use strict";const P={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},J=({isActive:e,disabled:t,buttonColor:o="#FFF",textColor:s="#000",hoverColor:r,hoverTextColor:n,outline:c})=>{let l,d,u;c?(l="transparent",d=o,u=o,e&&(l=r||o,d=r||o,u=n||s)):(l=o,d=o,u=s,e&&(l=r||o,d=r||o,u=n||s));let h=1;return t?h=.3:e&&(h=r||c?1:.75),{backgroundColor:l,borderColor:d,color:u,opacity:h}},T={primary:"#FFF",secondary:"#000",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},k={colors:T,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:T.secondary}},borderRadius:"0px",breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},W=g.createContext(k),K=({theme:e={},children:t})=>{var s;const o={...k,...e,colors:{...k.colors,...e.colors},fonts:{...k.fonts,...e.fonts},buttons:{...k.buttons,...e.buttons,primary:{...k.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},breakpoints:{...k.breakpoints,...e.breakpoints},layout:{...k.layout,...e.layout}};return a.jsx(W.Provider,{value:o,children:t})},S=()=>g.useContext(W),X=({color:e,hoverColor:t,hoverTextColor:o,textColor:s,outline:r=!1,size:n,type:c="button",buttonProps:l={},children:d,disabled:u=!1,onClick:h,fontSize:p})=>{const y=S(),[i,m]=g.useState(!1);let _;s?_=s:_=e?y.buttons.textColor:y.buttons.primary.textColor;const b={...J({isActive:i,disabled:u,buttonColor:e||y.colors.primary,textColor:_,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:p||y.fonts.size},v=[P.button,n==="small"?P.sizeSmall:P.sizeDefault,r?P.outline:""].filter(Boolean).join(" ");return a.jsx("button",{className:v,disabled:u,onClick:h,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),type:c,...l,style:{...b,...l.style},children:d})};var E=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Y=new Uint8Array(16);function R(){if(!E)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(Y)}for(var j=[],H=0;H<256;++H)j[H]=(H+256).toString(16).substr(1);function ee(e,t){var o=0,s=j;return[s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]]].join("")}function V(e,t,o){var s=t&&o||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var r=e.random||(e.rng||R)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(var n=0;n<16;++n)t[s+n]=r[n];return t||ee(r)}const F={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},te=({color:e="#000",checkmarkColor:t,disabled:o=!1,inverted:s=!1})=>{let r=e;return t?r=t:s&&(r="white"),{boxColor:e,checkmarkColor:r,cursor:o?"default":"pointer",opacity:o?.3:1}},oe=({checked:e=!1,checkmarkColor:t,color:o,disabled:s=!1,fontSize:r,id:n,inverted:c=!1,label:l,labelStyle:d,name:u,onChange:h,style:p,...y})=>{const i=S(),m=n||V(),_=te({color:o||i.colors.primary,checkmarkColor:t,disabled:s,inverted:c}),z=x=>{s||h(x)},b={cursor:_.cursor,fontSize:r||i.fonts.size,opacity:_.opacity,...p},v={width:r||"1rem"},C={color:_.boxColor,cursor:_.cursor,fontSize:r||"1rem",...d};return a.jsxs("div",{className:F.container,style:b,...y,children:[a.jsx("input",{id:m,checked:e,disabled:s,onChange:x=>z({target:{checked:x.target.checked,name:u,type:"checkbox"}}),name:u,style:{display:"none"},type:"checkbox"}),a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!e,name:u,type:"checkbox"}}),style:v,className:F.svg,children:[a.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:c&&e?_.boxColor:"transparent",strokeWidth:"25",stroke:_.boxColor}}),e&&a.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:_.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),l&&a.jsx("label",{htmlFor:m,className:F.label,style:C,children:l})]})},se=()=>{const e=S();return g.useLayoutEffect(()=>{const t=document.documentElement;e.fonts&&(e.fonts.fontFamily&&t.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&t.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&t.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&t.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&t.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&t.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&t.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&t.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&t.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&t.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&t.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&t.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&t.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&t.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&t.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&t.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&t.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&t.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&t.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&t.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null},A={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},re=({color:e="#000",disabled:t=!1,fontSize:o=".85em"})=>({color:e,fontSize:o,opacity:t?.5:1,cursor:t?"not-allowed":"default"}),ne=({children:e,color:t,disabled:o=!1,fontSize:s,htmlFor:r,style:n,...c})=>{const l=S(),d=re({color:t||l.colors.primary,disabled:o,fontSize:s||".85em"}),u={color:d.color,fontSize:d.fontSize,opacity:d.opacity,cursor:d.cursor,...n},h=[A.label,o?A.disabled:""].filter(Boolean).join(" ");return a.jsx("label",{className:h,htmlFor:r,style:u,...c,children:e})},D={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ae=({color:e="#000",disabled:t=!1,fontSize:o="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:o,opacity:t?.3:1,placeholderOpacity:s}),le=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,size:l,style:d,type:u="text",value:h="",...p})=>{const y=S(),i=ae({color:e||y.colors.primary,disabled:t,fontSize:o||y.fonts.size,placeholderOpacity:c}),m={"--placeholder-opacity":i.placeholderOpacity,borderColor:i.borderColor,color:i.color,fontSize:i.fontSize,opacity:i.opacity,...d},_=[D.input,l==="small"?D.sizeSmall:D.sizeDefault].filter(Boolean).join(" ");return a.jsx("input",{className:_,disabled:t,name:s,onChange:r,placeholder:n,style:m,type:u,value:h,...p})},I={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},ce=({color:e="#000",disabled:t=!1})=>({radioColor:e,cursor:t?"default":"pointer",opacity:t?.3:1}),ie=({checked:e=!1,color:t,disabled:o=!1,fontSize:s,id:r,label:n,labelStyle:c,name:l,onChange:d,style:u,...h})=>{const p=S(),y=r||V(),i=ce({color:t||p.colors.primary,disabled:o}),m=x=>{o||d(x)},_={cursor:i.cursor,fontSize:s||p.fonts.size,opacity:i.opacity,...u},z={width:s||p.fonts.size},b={fill:"transparent",strokeWidth:"12.5",stroke:i.radioColor},v={fill:i.radioColor},C={color:i.radioColor,cursor:i.cursor,fontSize:s||p.fonts.size,...c};return a.jsxs("div",{className:I.container,style:_,...h,children:[a.jsx("input",{id:y,checked:e,disabled:o,name:l,onChange:x=>m({target:{checked:x.target.checked,name:l,type:"radio"}}),style:{display:"none"},type:"radio"}),a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>m({target:{checked:!e,name:l,type:"radio"}}),className:I.svg,style:z,children:[a.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:b}),e&&a.jsx("circle",{cx:"50",cy:"50",r:"25",style:v})]}),n&&a.jsx("label",{htmlFor:y,className:I.label,style:C,children:n})]})},M={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},de=({color:e="#000",disabled:t=!1})=>({color:e,borderColor:e,cursor:t?"default":"pointer",opacity:t?.3:1,backgroundImage:(n=>{const c=`
2
3
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
3
4
  <path
4
5
  d="M 30 42.5 L 50 22.5 L 70 42.5"
@@ -13,9 +14,14 @@
13
14
  fill="transparent"
14
15
  />
15
16
  </svg>
16
- `.trim();return`url("data:image/svg+xml,${encodeURIComponent(c)}")`})(e)}),ue=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:n,placeholder:c="",size:a,style:u,value:d="",...f})=>{const m=g(),y=ie({color:t||m.colors.primary,disabled:o}),i={backgroundImage:y.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:y.borderColor,color:y.color,cursor:y.cursor,fontSize:s||m.fonts.size,opacity:y.opacity,...u},p=[I.select,a==="small"?I.sizeSmall:I.sizeDefault].filter(Boolean).join(" ");return l.jsxs("select",{className:p,disabled:o,name:r,onChange:n,style:i,value:d,...f,children:[c!==""&&l.jsx("option",{disabled:!0,value:"",children:c}),e]})},B={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},de=({color:e="#000",disabled:t=!1,placeholderOpacity:o=.3})=>({color:e,borderColor:e,opacity:t?.3:1,placeholderOpacity:o}),ye=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,rows:a=3,size:u,style:d,value:f="",...m})=>{const y=g(),i=de({color:e||y.colors.primary,disabled:t,placeholderOpacity:c}),p=`textarea-placeholder-${S.useId?S.useId():Math.random().toString(36)}`;S.useEffect(()=>{const b=document.createElement("style");return b.id=p,b.textContent=`
17
- .${p}::placeholder {
17
+ `.trim();return`url("data:image/svg+xml,${encodeURIComponent(c)}")`})(e)}),ue=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:n,placeholder:c="",size:l,style:d,value:u="",...h})=>{const p=S(),y=de({color:t||p.colors.primary,disabled:o}),i={backgroundImage:y.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:y.borderColor,color:y.color,cursor:y.cursor,fontSize:s||p.fonts.size,opacity:y.opacity,...d},m=[M.select,l==="small"?M.sizeSmall:M.sizeDefault].filter(Boolean).join(" ");return a.jsxs("select",{className:m,disabled:o,name:r,onChange:n,style:i,value:u,...h,children:[c!==""&&a.jsx("option",{disabled:!0,value:"",children:c}),e]})},L={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},ye=({color:e="#000",disabled:t=!1,placeholderOpacity:o=.3})=>({color:e,borderColor:e,opacity:t?.3:1,placeholderOpacity:o}),pe=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,rows:l=3,size:d,style:u,value:h="",...p})=>{const y=S(),i=ye({color:e||y.colors.primary,disabled:t,placeholderOpacity:c}),m=`textarea-placeholder-${g.useId?g.useId():Math.random().toString(36)}`;g.useEffect(()=>{const b=document.createElement("style");return b.id=m,b.textContent=`
18
+ .${m}::placeholder {
18
19
  color: inherit;
19
20
  opacity: ${i.placeholderOpacity};
20
21
  }
21
- `,document.head.appendChild(b),()=>{const v=document.getElementById(p);v&&v.remove()}},[p,i.placeholderOpacity]);const _={borderColor:i.borderColor,color:i.color,fontSize:o||y.fonts.size,opacity:i.opacity,...d},z=[B.textarea,u==="small"?B.sizeSmall:B.sizeDefault,p].filter(Boolean).join(" ");return l.jsx("textarea",{className:z,disabled:t,name:s,onChange:r,placeholder:n,rows:a,style:_,value:f,...m})},O={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},me=({isSmallScreen:e=!1,maxWidth:t,paddingSm:o,padding:s,fontSize:r}={})=>{const n=g();return{"--header-max-width":t||n.layout.maxWidth,"--header-padding":e?o||n.layout.wrapperPaddingSm:s||n.layout.wrapperPadding,"--header-font-size":e?"0.75rem":r||n.fonts.size}},T=e=>{const t=typeof window<"u"&&typeof window.matchMedia=="function",o=n=>{if(!t)return()=>{};const c=window.matchMedia(e);return c.addEventListener("change",n),()=>c.removeEventListener("change",n)},s=()=>t?window.matchMedia(e).matches:!1,r=()=>!1;return S.useSyncExternalStore(o,s,r)},pe=({children:e,breakPointSm:t,maxWidth:o,paddingSm:s,padding:r,fontSize:n,style:c={},headerProps:a={},headerRef:u})=>{const d=g(),m=(t||d.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),y=m?parseInt(m[1],10)-1:474,i=m?m[2]:"px",p=T(`(max-width: ${y}${i})`),_=me({isSmallScreen:p,maxWidth:o,paddingSm:s,padding:r,fontSize:n});return l.jsx("header",{ref:u,className:O.header,...a,children:l.jsx("div",{className:O.container,style:{..._,...c},children:e})})},N={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},fe=({isMobile:e,isCompact:t,mobileBackground:o,mobileColor:s,mobileActiveBackground:r,mobileActiveColor:n,mobileButtonHoverColor:c})=>{const a=g();return S.useMemo(()=>({...e?{"--mobile-nav-background":o||a.colors.accent,"--mobile-nav-color":s||a.colors.primary,"--mobile-nav-active-background":r||a.colors.primary,"--mobile-nav-active-color":n||a.colors.accent,"--mobile-nav-button-hover-text-color":c||o||a.colors.accent}:{}}),[o,s,r,n,c,a.colors.accent,a.colors.primary,e,t])},$={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},_e=({compact:e,color:t,visible:o,borderRadius:s})=>{const r=g();return S.useMemo(()=>{const n=e?{right:".5em"}:{};return{"--hamburger-border-radius":s||r.borderRadius||"10px",color:t||"inherit",display:o?"flex":"none",...n}},[t,o,e,s,r.borderRadius])},he=({visible:e,compact:t,color:o,hamburgerRef:s,open:r=!1,setOpen:n,buttonProps:c,borderRadius:a})=>{const u=_e({compact:t,color:o,visible:e,borderRadius:a}),d=[$.hamburger,r?$.open:""].filter(Boolean).join(" ");return l.jsxs("button",{ref:s,className:d,onClick:()=>n(!r),style:u,"aria-label":"Toggle menu","aria-expanded":r,...c,children:[l.jsx("div",{className:$.line}),l.jsx("div",{className:$.line}),l.jsx("div",{className:$.line})]})};function U(e){const o=parseInt(e)-1,s=e.replace(/[0-9]/g,"");return{maxWidth:o,unit:s}}const Se=({breakPointMd:e,breakPointSm:t,children:o,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:a,style:u,navProps:d})=>{const[f,m]=S.useState(!1),y=S.useRef(null),i=S.useRef(null),p=g(),_=e||p.breakpoints.md,z=t||p.breakpoints.sm,{maxWidth:b,unit:v}=U(_),{maxWidth:C,unit:x}=U(z),w=T(`(max-width: ${b}${v})`),q=T(`(max-width: ${C}${x})`),ge=fe({isMobile:w,isCompact:q,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:a});S.useEffect(()=>{w||m(!1)},[w]),S.useEffect(()=>{const Q=Z=>{!i.current||i.current.contains(Z.target)||y.current&&y.current.contains(Z.target)||m(!1)};return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[y,i,m]);const be=[N.nav,w?N.navMobile:N.navDesktop,w&&f?N.open:""].filter(Boolean).join(" ");return l.jsxs(l.Fragment,{children:[l.jsx(he,{hamburgerRef:y,visible:w,compact:q,open:f,setOpen:m}),l.jsx("nav",{ref:i,className:be,style:{...ge,...u},...d,children:typeof o=="function"?o({setOpen:m}):o})]})};h.Button=K,h.CSSReset=oe,h.Checkbox=te,h.FormLabel=re,h.Header=pe,h.Input=ae,h.Radio=ce,h.ResponsiveNav=Se,h.Select=ue,h.Textarea=ye,h.ThemeProvider=J,h.useTheme=g,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
22
+ `,document.head.appendChild(b),()=>{const v=document.getElementById(m);v&&v.remove()}},[m,i.placeholderOpacity]);const _={borderColor:i.borderColor,color:i.color,fontSize:o||y.fonts.size,opacity:i.opacity,...u},z=[L.textarea,d==="small"?L.sizeSmall:L.sizeDefault,m].filter(Boolean).join(" ");return a.jsx("textarea",{className:z,disabled:t,name:s,onChange:r,placeholder:n,rows:l,style:_,value:h,...p})},O={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},me=({isSmallScreen:e=!1,maxWidth:t,paddingSm:o,padding:s,fontSize:r}={})=>{const n=S();return{"--header-max-width":t||n.layout.maxWidth,"--header-padding":e?o||n.layout.wrapperPaddingSm:s||n.layout.wrapperPadding,"--header-font-size":e?"0.75rem":r||n.fonts.size}},B=e=>{const t=typeof window<"u"&&typeof window.matchMedia=="function",o=n=>{if(!t)return()=>{};const c=window.matchMedia(e);return c.addEventListener("change",n),()=>c.removeEventListener("change",n)},s=()=>t?window.matchMedia(e).matches:!1,r=()=>!1;return g.useSyncExternalStore(o,s,r)},fe=({children:e,breakPointSm:t,maxWidth:o,paddingSm:s,padding:r,fontSize:n,style:c={},headerProps:l={},headerRef:d})=>{const u=S(),p=(t||u.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),y=p?parseInt(p[1],10)-1:474,i=p?p[2]:"px",m=B(`(max-width: ${y}${i})`),_=me({isSmallScreen:m,maxWidth:o,paddingSm:s,padding:r,fontSize:n});return a.jsx("header",{ref:d,className:O.header,...l,children:a.jsx("div",{className:O.container,style:{..._,...c},children:e})})},N={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},he=({isMobile:e,isCompact:t,mobileBackground:o,mobileColor:s,mobileActiveBackground:r,mobileActiveColor:n,mobileButtonHoverColor:c})=>{const l=S();return g.useMemo(()=>({...e?{"--mobile-nav-background":o||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":r||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":c||o||l.colors.accent}:{}}),[o,s,r,n,c,l.colors.accent,l.colors.primary,e,t])},$={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},_e=({compact:e,color:t,visible:o,borderRadius:s})=>{const r=S();return g.useMemo(()=>{const n=e?{right:".5em"}:{};return{"--hamburger-border-radius":s||r.borderRadius||"10px",color:t||"inherit",display:o?"flex":"none",...n}},[t,o,e,s,r.borderRadius])},ge=({visible:e,compact:t,color:o,hamburgerRef:s,open:r=!1,setOpen:n,buttonProps:c,borderRadius:l})=>{const d=_e({compact:t,color:o,visible:e,borderRadius:l}),u=[$.hamburger,r?$.open:""].filter(Boolean).join(" ");return a.jsxs("button",{ref:s,className:u,onClick:()=>n(!r),style:d,"aria-label":"Toggle menu","aria-expanded":r,...c,children:[a.jsx("div",{className:$.line}),a.jsx("div",{className:$.line}),a.jsx("div",{className:$.line})]})};function q(e){const o=parseInt(e)-1,s=e.replace(/[0-9]/g,"");return{maxWidth:o,unit:s}}const Se=({breakPointMd:e,breakPointSm:t,children:o,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:l,style:d,navProps:u})=>{const[h,p]=g.useState(!1),y=g.useRef(null),i=g.useRef(null),m=S(),_=e||m.breakpoints.md,z=t||m.breakpoints.sm,{maxWidth:b,unit:v}=q(_),{maxWidth:C,unit:x}=q(z),w=B(`(max-width: ${b}${v})`),Q=B(`(max-width: ${C}${x})`),ve=he({isMobile:w,isCompact:Q,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:l});g.useEffect(()=>{w||p(!1)},[w]),g.useEffect(()=>{const Z=G=>{!i.current||i.current.contains(G.target)||y.current&&y.current.contains(G.target)||p(!1)};return document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[y,i,p]);const ze=[N.nav,w?N.navMobile:N.navDesktop,w&&h?N.open:""].filter(Boolean).join(" ");return a.jsxs(a.Fragment,{children:[a.jsx(ge,{hamburgerRef:y,visible:w,compact:Q,open:h,setOpen:p}),a.jsx("nav",{ref:i,className:ze,style:{...ve,...d},...u,children:typeof o=="function"?o({setOpen:p}):o})]})},U=({size:e=2.5,color:t,innerColor:o,fullScreen:s=!0})=>{const r=S(),n=t||r.colors.primary,c=o||r.colors.secondary,l=a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{border:`0.25em solid ${n}`,borderTop:`0.25em solid ${c}`,borderRadius:"50%",width:`${e}em`,height:`${e}em`,animation:"spin 1s linear infinite"}}),a.jsx("style",{children:`
23
+ @keyframes spin {
24
+ 0% { transform: rotate(0deg); }
25
+ 100% { transform: rotate(360deg); }
26
+ }
27
+ `})]});return s?a.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw"},children:l}):l},be=({children:e,loadingComponent:t})=>{const[o,s]=g.useState(!1);return g.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),o?a.jsx(a.Fragment,{children:e}):t||a.jsx(U,{})};f.Button=X,f.CSSReset=se,f.Checkbox=oe,f.FormLabel=ne,f.Header=fe,f.Input=le,f.LoadingSpinner=U,f.Radio=ie,f.ResponsiveNav=Se,f.Select=ue,f.StyleLoader=be,f.Textarea=pe,f.ThemeProvider=K,f.useTheme=S,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { default as Select } from './components/Select';
8
8
  export { default as Textarea } from './components/Textarea';
9
9
  export { default as Header } from './components/Header';
10
10
  export { default as ResponsiveNav } from './components/ResponsiveNav';
11
+ export { default as StyleLoader } from './components/StyleLoader';
12
+ export { default as LoadingSpinner } from './components/LoadingSpinner';
11
13
  export { ThemeProvider, useTheme } from './theme';
12
14
  export type { Theme, ThemeColors, ThemeFonts, ThemeButtons, ThemeBreakpoints, ThemeLayout, ThemeProviderProps, DeepPartial } from './theme';
13
15
  export type { ButtonProps } from './components/Button';
@@ -19,4 +21,6 @@ export type { SelectProps } from './components/Select';
19
21
  export type { TextareaProps } from './components/Textarea';
20
22
  export type { HeaderProps } from './components/Header';
21
23
  export type { ResponsiveNavProps } from './components/ResponsiveNav';
24
+ export type { StyleLoaderProps } from './components/StyleLoader';
25
+ export type { LoadingSpinnerProps } from './components/LoadingSpinner';
22
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digital-rabbit-cl",
3
- "version": "1.0.31",
3
+ "version": "1.0.34",
4
4
  "dependencies": {
5
5
  "uuid": "^7.0.3"
6
6
  },
@@ -27,8 +27,7 @@
27
27
  "types": "./dist/index.d.ts",
28
28
  "import": "./dist/digital-rabbit-cl.es.js",
29
29
  "require": "./dist/digital-rabbit-cl.umd.js"
30
- },
31
- "./styles": "./dist/digital-rabbit-cl.css"
30
+ }
32
31
  },
33
32
  "files": [
34
33
  "dist"
@@ -1 +0,0 @@
1
- .Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:4.25rem;position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.5rem 3rem;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.75rem 2rem}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}