digital-rabbit-cl 1.3.2 → 1.3.4
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/digital-rabbit-cl.es.js +991 -891
- package/dist/digital-rabbit-cl.umd.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/types/component-props.d.ts +215 -0
- package/dist/types/component-props.d.ts.map +1 -0
- package/dist/types/css-modules.d.ts +7 -0
- package/dist/types/css-modules.d.ts.map +1 -0
- package/dist/types/jest-dom.d.ts +1 -0
- package/dist/types/jest-dom.d.ts.map +1 -0
- package/dist/types/react-native.d.ts +41 -0
- package/dist/types/react-native.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{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:var(--button-padding-small)}.Button-module__sizeLarge___yeZSH{padding:var(--button-padding-large)}.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:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.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}: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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.Input-module__input___WjT81{background-color:transparent;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:var(--input-padding-small)}.Input-module__sizeLarge___4Boj3{padding:var(--input-padding-large)}.Textarea-module__textarea___Z-y6g{background-color:transparent;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::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeLarge___5a3sf{padding:var(--textarea-padding-large)}.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-style:solid;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:var(--select-padding-small)}.Select-module__sizeLarge___eBA1T{padding:var(--select-padding-large)}.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:.25em;-webkit-user-select:none;user-select:none}.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)}.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, var(--accent-color));color:var(--mobile-nav-color, var(--primary-color));flex-direction:column;font-size:2rem;height:100vh;padding-top:var(--nav-padding-top);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:var(--nav-link-padding);text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, var(--primary-color));color:var(--mobile-nav-active-color, var(--accent-color))}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:var(--nav-button-margin)}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, var(--accent-color))!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}.Stack-module__stack___yUU-B{display:flex;gap:.5em}.Stack-module__vertical___sKTyQ{flex-direction:column;margin-bottom:.5em}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, var(--primary-color))}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, var(--primary-color))}.FeatureGridSection-module__section___wZrbC{padding:var(--section-padding-vertical) 0}.FeatureGridSection-module__grid___iwPJv{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__main___Sw7Pv{flex:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(N,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(N=typeof globalThis<"u"?globalThis:N||self,p(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,p,V){"use strict";const Ve={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverBackgroundColor:o,hoverTextColor:n,outline:i})=>{let l,d,y;i?(l="transparent",d=t,y=t,e&&(l=o||t,d=o||t,y=n||s)):(l=t,d=t,y=s,e&&(l=o||t,d=o||t,y=n||s));let f=1;return r?f=.3:e&&(f=o?1:.75),{backgroundColor:l,borderColor:d,color:y,opacity:f}};function ct(e,r){const t={...e};return we(e)&&we(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];we(o)&&we(n)?t[s]=ct(n,o):o!==void 0&&(t[s]=o)}),t}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const o=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(o)?768:o-1,unit:n}}const t=parseFloat(r[1]),s=r[2];return{maxWidth:t-1,unit:s}}const ut={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Be={colors:ut,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",paddingHorizontal:.35,primary:{textColor:ut.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},dt=V.createContext(Be),Vr=({theme:e,children:r})=>{const t=e?ct(Be,e):Be;return p.jsx(dt.Provider,{value:t,children:r})},T=()=>V.useContext(dt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:y,buttonProps:f={},onClick:m,children:h})=>{const w=T(),[k,_]=V.useState(!1);let z;r?z=r:z=e?w.buttons.textColor:w.buttons.primary.textColor;const A=e||w.colors.primary,$={...Fr({isActive:k,disabled:o,buttonColor:A,textColor:z,hoverBackgroundColor:t,hoverTextColor:s,outline:i}),fontSize:w.fonts.size,borderWidth:w.border.width,borderRadius:w.border.radius,"--button-padding-small":`calc(${w.fonts.rhythm} * ${w.sizes.small.paddingVertical}) calc(${w.fonts.rhythm} * ${w.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${w.fonts.rhythm} * ${w.sizes.large.paddingVertical}) calc(${w.fonts.rhythm} * ${w.buttons.paddingHorizontal})`,...y},C=[Ve.button,n==="small"?Ve.sizeSmall:Ve.sizeLarge,i?Ve.outline:"",d].filter(Boolean).join(" ");return p.jsx("button",{...f,className:C,disabled:o,onClick:m,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),type:l,style:$,children:h})};var ft=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function xr(){if(!ft)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ft(kr)}for(var yt=[],ke=0;ke<256;++ke)yt[ke]=(ke+256).toString(16).substr(1);function Cr(e,r){var t=0,s=yt;return[s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]]].join("")}function mt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||xr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Cr(o)}const Oe={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},zr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{checkboxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},ht={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},$r=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),xe=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:i,labelProps:l})=>{const d=T(),y=d.colors.error,f=t?y:e||d.colors.primary,m=$r({color:f,disabled:r,fontSize:".85em"}),h={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i},w=[ht.label,r?ht.disabled:"",n].filter(Boolean).join(" ");return p.jsx("label",{...l,className:w,htmlFor:s,style:h,children:o})},gt=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:i,id:l,onChange:d,label:y,labelStyle:f,className:m,style:h,divProps:w})=>{const k=T(),_=l||mt(),z=k.colors.error,A=n?z:e||k.colors.primary,F=zr({color:A,checkmarkColor:r,disabled:o,inverted:s}),$=G=>{o||d(G)},C={cursor:F.cursor,fontSize:k.fonts.size,opacity:F.opacity,...h},E={width:"1em"},W={fill:s&&t?F.checkboxColor:"transparent",strokeWidth:"25",stroke:F.checkboxColor},q={stroke:F.checkmarkColor,strokeWidth:"15",fill:"transparent"},R=[Oe.container,m].filter(Boolean).join(" ");return p.jsxs("div",{...w,className:R,style:C,children:[p.jsx("input",{id:_,checked:t,disabled:o,onChange:G=>$({target:{checked:G.target.checked,name:i,type:"checkbox"}}),name:i,style:{display:"none"},type:"checkbox"}),p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>$({target:{checked:!t,name:i,type:"checkbox"}}),style:E,className:Oe.svg,children:[p.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:W}),t&&p.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:q})]}),y&&p.jsx(xe,{htmlFor:_,className:Oe.label,style:{paddingBottom:0,...f},color:F.checkboxColor,disabled:o,error:n,children:y})]})},Er=()=>{const e=T();return V.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),null};var _e=e=>e.type==="checkbox",ce=e=>e instanceof Date,K=e=>e==null;const _t=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&_t(e)&&!ce(e),pt=e=>j(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function U(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Te&&(e instanceof Blob||s))&&(t||j(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=U(e[o]));else return e;return r}var Ce=e=>/^\w*$/.test(e),H=e=>e===void 0,He=e=>Array.isArray(e)?e.filter(Boolean):[],Me=e=>He(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=(Ce(r)?[r]:Me(r)).reduce((o,n)=>K(o)?o:o[n],e);return H(s)||s===e?H(e[r])?t:e[r]:s},X=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=Ce(r)?[r]:Me(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const y=e[l];d=j(y)||Array.isArray(y)?y:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const ze={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},bt=V.createContext(null);bt.displayName="HookFormContext";const je=()=>V.useContext(bt);var St=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==te.all&&(r._proxyFormState[i]=!s||te.all),t&&(t[i]=!0),e[i]}});return o};const Ie=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=V.useState(t._formState),d=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ie(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:y=>{!s&&l({...t._formState,...y})}}),[o,s,n]),V.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),V.useMemo(()=>St(i,t,d.current,!1),[i,t])}var Y=e=>typeof e=="string",Ue=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),We=e=>K(e)||!_t(e);function re(e,r,t=new WeakSet){if(We(e)||We(r))return e===r;if(ce(e)&&ce(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(ce(i)&&ce(l)||j(i)&&j(l)||Array.isArray(i)&&Array.isArray(l)?!re(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=V.useRef(o),y=V.useRef(l),f=V.useRef(void 0),m=V.useRef(t),h=V.useRef(s);y.current=l;const[w,k]=V.useState(()=>{const C=t._getWatch(s,d.current);return y.current?y.current(C):C}),_=V.useCallback(C=>{const E=Ue(s,t._names,C||t._formValues,!1,d.current);return y.current?y.current(E):E},[t._formValues,t._names,s]),z=V.useCallback(C=>{if(!n){const E=Ue(s,t._names,C||t._formValues,!1,d.current);if(y.current){const W=y.current(E);re(W,f.current)||(k(W),f.current=W)}else k(E)}},[t._formValues,t._names,n,s]);Ie(()=>((m.current!==t||!re(h.current,s))&&(m.current=t,h.current=s,z()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:C=>{z(C.values)}})),[t,i,s,z]),V.useEffect(()=>t._removeUnmounted());const A=m.current!==t,F=h.current,$=V.useMemo(()=>{if(n)return null;const C=!A&&!re(F,s);return A||C?_():null},[n,A,s,F,_]);return $!==null?$:w}function Pr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=vt(o._names.array,t),d=V.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),y=Lr({control:o,name:t,defaultValue:d,exact:!0}),f=Dr({control:o,name:t,exact:!0}),m=V.useRef(e),h=V.useRef(void 0),w=V.useRef(o.register(t,{...e.rules,value:y,...X(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const k=V.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(f.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(f.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(f.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(f.validatingFields,t)},error:{enumerable:!0,get:()=>b(f.errors,t)}}),[f,t]),_=V.useCallback($=>w.current.onChange({target:{value:pt($),name:t},type:ze.CHANGE}),[t]),z=V.useCallback(()=>w.current.onBlur({target:{value:b(o._formValues,t),name:t},type:ze.BLUR}),[t,o._formValues]),A=V.useCallback($=>{const C=b(o._fields,t);C&&$&&(C._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:E=>$.setCustomValidity(E),reportValidity:()=>$.reportValidity()})},[o._fields,t]),F=V.useMemo(()=>({name:t,value:y,...X(s)||f.disabled?{disabled:f.disabled||s}:{},onChange:_,onBlur:z,ref:A}),[t,s,f.disabled,_,z,A,y]);return V.useEffect(()=>{const $=o._options.shouldUnregister||n,C=h.current;C&&C!==t&&!l&&o.unregister(C),o.register(t,{...m.current.rules,...X(m.current.disabled)?{disabled:m.current.disabled}:{}});const E=(W,q)=>{const R=b(o._fields,W);R&&R._f&&(R._f.mount=q)};if(E(t,!0),$){const W=U(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,W),H(b(o._formValues,t))&&L(o._formValues,t,W)}return!l&&o.register(t),h.current=t,()=>{(l?$&&!o._state.action:$)?o.unregister(t):E(t,!1)}},[t,o,l,n]),V.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),V.useMemo(()=>({field:F,formState:f,fieldState:k}),[F,f,k])}var qe=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},pe=e=>Array.isArray(e)?e:[e],Ft=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function Vt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&j(o)&&n){const i=Vt(o,n);j(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ge=e=>e.type==="file",se=e=>typeof e=="function",$e=e=>{if(!Te)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},wt=e=>e.type==="select-multiple",Ze=e=>e.type==="radio",Br=e=>Ze(e)||_e(e),Qe=e=>$e(e)&&e.isConnected;function Or(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=H(e)?s++:e[r[s++]];return e}function Tr(e){for(const r in e)if(e.hasOwnProperty(r)&&!H(e[r]))return!1;return!0}function I(e,r){const t=Array.isArray(r)?r:Ce(r)?[r]:Me(r),s=t.length===1?e:Or(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Tr(s))&&I(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(se(e[r]))return!0;return!1};function kt(e){return Array.isArray(e)||j(e)&&!Hr(e)}function Ke(e,r={}){for(const t in e)kt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Ke(e[t],r[t])):H(e[t])||(r[t]=!0);return r}function de(e,r,t){t||(t=Ke(r));for(const s in e)kt(e[s])?H(r)||We(t[s])?t[s]=Ke(e[s],Array.isArray(e[s])?[]:{}):de(e[s],K(r)?{}:r[s],t[s]):t[s]=!re(e[s],r[s]);return t}const xt={value:!1,isValid:!1},Ct={value:!0,isValid:!0};var zt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===""?Ct:{value:e[0].value,isValid:!0}:Ct:xt}return xt},$t=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>H(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const Et={isValid:!1,value:null};var At=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Et):Et;function Nt(e){const r=e.ref;return Ge(r)?r.files:Ze(r)?At(e.refs).value:wt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?zt(e.refs).value:$t(H(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>H(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,Dt=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const Lt="AsyncFunction";var jr=e=>!!e&&!!e.validate&&!!(se(e.validate)&&e.validate.constructor.name===Lt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Lt)),Ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Pt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const be=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(be(l,r))break}else if(j(l)&&be(l,r))break}}};function Bt(e,r,t){const s=b(e,t);if(s||Ce(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return Z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||te.all))},Wr=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),qr=(e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,Gr=(e,r)=>!He(b(e,r)).length&&I(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Ot(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||X(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},Tt=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:y,minLength:f,min:m,max:h,pattern:w,validate:k,name:_,valueAsNumber:z,mount:A}=e._f,F=b(t,_);if(!A||r.has(_))return{};const $=l?l[0]:i,C=D=>{o&&$.reportValidity&&($.setCustomValidity(X(D)?"":D||""),$.reportValidity())},E={},W=Ze(i),q=_e(i),R=W||q,G=(z||Ge(i))&&H(i.value)&&H(F)||$e(i)&&i.value===""||F===""||Array.isArray(F)&&!F.length,ue=qe.bind(null,_,s,E),ne=(D,B,M,Q=ae.maxLength,J=ae.minLength)=>{const ie=D?B:M;E[_]={type:D?Q:J,message:ie,ref:i,...ue(D?Q:J,ie)}};if(n?!Array.isArray(F)||!F.length:d&&(!R&&(G||K(F))||X(F)&&!F||q&&!zt(l).isValid||W&&!At(l).isValid)){const{value:D,message:B}=Y(d)?{value:!!d,message:d}:fe(d);if(D&&(E[_]={type:ae.required,message:B,ref:$,...ue(ae.required,B)},!s))return C(B),E}if(!G&&(!K(m)||!K(h))){let D,B;const M=fe(h),Q=fe(m);if(!K(F)&&!isNaN(F)){const J=i.valueAsNumber||F&&+F;K(M.value)||(D=J>M.value),K(Q.value)||(B=J<Q.value)}else{const J=i.valueAsDate||new Date(F),ie=Le=>new Date(new Date().toDateString()+" "+Le),Fe=i.type=="time",he=i.type=="week";Y(M.value)&&F&&(D=Fe?ie(F)>ie(M.value):he?F>M.value:J>new Date(M.value)),Y(Q.value)&&F&&(B=Fe?ie(F)<ie(Q.value):he?F<Q.value:J<new Date(Q.value))}if((D||B)&&(ne(!!D,M.message,Q.message,ae.max,ae.min),!s))return C(E[_].message),E}if((y||f)&&!G&&(Y(F)||n&&Array.isArray(F))){const D=fe(y),B=fe(f),M=!K(D.value)&&F.length>+D.value,Q=!K(B.value)&&F.length<+B.value;if((M||Q)&&(ne(M,D.message,B.message),!s))return C(E[_].message),E}if(w&&!G&&Y(F)){const{value:D,message:B}=fe(w);if(Ee(D)&&!F.match(D)&&(E[_]={type:ae.pattern,message:B,ref:i,...ue(ae.pattern,B)},!s))return C(B),E}if(k){if(se(k)){const D=await k(F,t),B=Ot(D,$);if(B&&(E[_]={...B,...ue(ae.validate,B.message)},!s))return C(B.message),E}else if(j(k)){let D={};for(const B in k){if(!Z(D)&&!s)break;const M=Ot(await k[B](F,t),$,B);M&&(D={...M,...ue(B,M.message)},C(M.message),s&&(E[_]=D))}if(!Z(D)&&(E[_]={ref:$,...D},!s))return E}}return C(!0),E};const Qr={mode:te.onSubmit,reValidateMode:te.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:se(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=j(r.defaultValues)||j(r.values)?U(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:U(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,y=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const h={array:Ft(),state:Ft()},w=r.criteriaMode===te.all,k=a=>c=>{clearTimeout(y),y=setTimeout(a,c)},_=async a=>{if(!r.disabled&&(f.isValid||m.isValid||a)){const c=r.resolver?Z((await q()).errors):await G(s,!0);c!==t.isValid&&h.state.next({isValid:c})}},z=(a,c)=>{!r.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):I(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},A=(a,c=[],u,S,v=!0,g=!0)=>{if(S&&u&&!r.disabled){if(i.action=!0,g&&Array.isArray(b(s,a))){const x=u(b(s,a),S.argA,S.argB);v&&L(s,a,x)}if(g&&Array.isArray(b(t.errors,a))){const x=u(b(t.errors,a),S.argA,S.argB);v&&L(t.errors,a,x),Gr(t.errors,a)}if((f.touchedFields||m.touchedFields)&&g&&Array.isArray(b(t.touchedFields,a))){const x=u(b(t.touchedFields,a),S.argA,S.argB);v&&L(t.touchedFields,a,x)}(f.dirtyFields||m.dirtyFields)&&(t.dirtyFields=de(o,n)),h.state.next({name:a,isDirty:ne(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},F=(a,c)=>{L(t.errors,a,c),h.state.next({errors:t.errors})},$=a=>{t.errors=a,h.state.next({errors:t.errors,isValid:!1})},C=(a,c,u,S)=>{const v=b(s,a);if(v){const g=b(n,a,H(u)?b(o,a):u);H(g)||S&&S.defaultChecked||c?L(n,a,c?g:Nt(v._f)):M(a,g),i.mount&&_()}},E=(a,c,u,S,v)=>{let g=!1,x=!1;const P={name:a};if(!r.disabled){if(!u||S){(f.isDirty||m.isDirty)&&(x=t.isDirty,t.isDirty=P.isDirty=ne(),g=x!==P.isDirty);const O=re(b(o,a),c);x=!!b(t.dirtyFields,a),O?I(t.dirtyFields,a):L(t.dirtyFields,a,!0),P.dirtyFields=t.dirtyFields,g=g||(f.dirtyFields||m.dirtyFields)&&x!==!O}if(u){const O=b(t.touchedFields,a);O||(L(t.touchedFields,a,u),P.touchedFields=t.touchedFields,g=g||(f.touchedFields||m.touchedFields)&&O!==u)}g&&v&&h.state.next(P)}return g?P:{}},W=(a,c,u,S)=>{const v=b(t.errors,a),g=(f.isValid||m.isValid)&&X(c)&&t.isValid!==c;if(r.delayError&&u?(d=k(()=>F(a,u)),d(r.delayError)):(clearTimeout(y),d=null,u?L(t.errors,a,u):I(t.errors,a)),(u?!re(v,u):v)||!Z(S)||g){const x={...S,...g&&X(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...x},h.state.next(x)}},q=async a=>{z(a,!0);const c=await r.resolver(n,r.context,Mr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return z(a),c},R=async a=>{const{errors:c}=await q(a);if(a)for(const u of a){const S=b(c,u);S?L(t.errors,u,S):I(t.errors,u)}else t.errors=c;return c},G=async(a,c,u={valid:!0})=>{for(const S in a){const v=a[S];if(v){const{_f:g,...x}=v;if(g){const P=l.array.has(g.name),O=v._f&&jr(v._f);O&&f.validatingFields&&z([g.name],!0);const ee=await Tt(v,l.disabled,n,w,r.shouldUseNativeValidation&&!c,P);if(O&&f.validatingFields&&z([g.name]),ee[g.name]&&(u.valid=!1,c))break;!c&&(b(ee,g.name)?P?Zr(t.errors,ee,g.name):L(t.errors,g.name,ee[g.name]):I(t.errors,g.name))}!Z(x)&&await G(x,c,u)}}return u.valid},ue=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Qe(u)):!Qe(c._f.ref))&&ot(a)}l.unMount=new Set},ne=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!re(Le(),o)),D=(a,c,u)=>Ue(a,l,{...i.mount?n:H(c)?o:Y(a)?{[a]:c}:c},u,c),B=a=>He(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),M=(a,c,u={})=>{const S=b(s,a);let v=c;if(S){const g=S._f;g&&(!g.disabled&&L(n,a,$t(c,g)),v=$e(g.ref)&&K(c)?"":c,wt(g.ref)?[...g.ref.options].forEach(x=>x.selected=v.includes(x.value)):g.refs?_e(g.ref)?g.refs.forEach(x=>{(!x.defaultChecked||!x.disabled)&&(Array.isArray(v)?x.checked=!!v.find(P=>P===x.value):x.checked=v===x.value||!!v)}):g.refs.forEach(x=>x.checked=x.value===v):Ge(g.ref)?g.ref.value="":(g.ref.value=v,g.ref.type||h.state.next({name:a,values:U(n)})))}(u.shouldDirty||u.shouldTouch)&&E(a,v,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Q=(a,c,u)=>{for(const S in c){if(!c.hasOwnProperty(S))return;const v=c[S],g=a+"."+S,x=b(s,g);(l.array.has(a)||j(v)||x&&!x._f)&&!ce(v)?Q(g,v,u):M(g,v,u)}},J=(a,c,u={})=>{const S=b(s,a),v=l.array.has(a),g=U(c);L(n,a,g),v?(h.array.next({name:a,values:U(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&h.state.next({name:a,dirtyFields:de(o,n),isDirty:ne(a,g)})):S&&!S._f&&!K(g)?Q(a,g,u):M(a,g,u),Pt(a,l)&&h.state.next({...t,name:a}),h.state.next({name:i.mount?a:void 0,values:U(n)})},ie=async a=>{i.mount=!0;const c=a.target;let u=c.name,S=!0;const v=b(s,u),g=O=>{S=Number.isNaN(O)||ce(O)&&isNaN(O.getTime())||re(O,b(n,u,O))},x=Dt(r.mode),P=Dt(r.reValidateMode);if(v){let O,ee;const Pe=c.type?Nt(v._f):pt(a),le=a.type===ze.BLUR||a.type===ze.FOCUS_OUT,Ms=!Ir(v._f)&&!r.resolver&&!b(t.errors,u)&&!v._f.deps||qr(le,b(t.touchedFields,u),t.isSubmitted,P,x),at=Pt(u,l,le);L(n,u,Pe),le?(!c||!c.readOnly)&&(v._f.onBlur&&v._f.onBlur(a),d&&d(0)):v._f.onChange&&v._f.onChange(a);const lt=E(u,Pe,le),js=!Z(lt)||at;if(!le&&h.state.next({name:u,type:a.type,values:U(n)}),Ms)return(f.isValid||m.isValid)&&(r.mode==="onBlur"?le&&_():le||_()),js&&h.state.next({name:u,...at?{}:lt});if(!le&&at&&h.state.next({...t}),r.resolver){const{errors:br}=await q([u]);if(g(Pe),S){const Is=Bt(t.errors,s,u),Sr=Bt(br,s,Is.name||u);O=Sr.error,u=Sr.name,ee=Z(br)}}else z([u],!0),O=(await Tt(v,l.disabled,n,w,r.shouldUseNativeValidation))[u],z([u]),g(Pe),S&&(O?ee=!1:(f.isValid||m.isValid)&&(ee=await G(s,!0)));S&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&he(v._f.deps),W(u,ee,O,lt))}},Fe=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,S;const v=pe(a);if(r.resolver){const g=await R(H(a)?a:v);u=Z(g),S=a?!v.some(x=>b(g,x)):u}else a?(S=(await Promise.all(v.map(async g=>{const x=b(s,g);return await G(x&&x._f?{[g]:x}:x)}))).every(Boolean),!(!S&&!t.isValid)&&_()):S=u=await G(s);return h.state.next({...!Y(a)||(f.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!S&&be(s,Fe,a?v:l.mount),S},Le=(a,c)=>{let u={...i.mount?n:o};return c&&(u=Vt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),H(a)?u:Y(a)?b(u,a):a.map(S=>b(u,S))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ds=a=>{a&&pe(a).forEach(c=>I(t.errors,c)),h.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const S=(b(s,a,{_f:{}})._f||{}).ref,v=b(t.errors,a)||{},{ref:g,message:x,type:P,...O}=v;L(t.errors,a,{...O,...c,ref:S}),h.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&S&&S.focus&&S.focus()},Ls=(a,c)=>se(a)?h.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>h.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||f,Hs,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Ps=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),ot=(a,c={})=>{for(const u of a?pe(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(I(s,u),I(n,u)),!c.keepError&&I(t.errors,u),!c.keepDirty&&I(t.dirtyFields,u),!c.keepTouched&&I(t.touchedFields,u),!c.keepIsValidating&&I(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&I(o,u);h.state.next({values:U(n)}),h.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&_()},hr=({disabled:a,name:c})=>{(X(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},nt=(a,c={})=>{let u=b(s,a);const S=X(c.disabled)||X(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:X(c.disabled)?c.disabled:r.disabled,name:a}):C(a,!0,c.value),{...S?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:ve(c.min),max:ve(c.max),minLength:ve(c.minLength),maxLength:ve(c.maxLength),pattern:ve(c.pattern)}:{},name:a,onChange:ie,onBlur:ie,ref:v=>{if(v){nt(a,c),u=b(s,a);const g=H(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,x=Br(g),P=u._f.refs||[];if(x?P.find(O=>O===g):g===u._f.ref)return;L(s,a,{_f:{...u._f,...x?{refs:[...P.filter(Qe),g,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:g.type,name:a}}:{ref:g}}}),C(a,!1,void 0,g)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(vt(l.array,a)&&i.action)&&l.unMount.add(a)}}},it=()=>r.shouldFocusError&&be(s,Fe,l.mount),Bs=a=>{X(a)&&(h.state.next({disabled:a}),be(s,(c,u)=>{const S=b(s,u);S&&(c.disabled=S._f.disabled||a,Array.isArray(S._f.refs)&&S._f.refs.forEach(v=>{v.disabled=S._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let S;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let v=U(n);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:g,values:x}=await q();t.errors=g,v=U(x)}else await G(s);if(l.disabled.size)for(const g of l.disabled)I(v,g);if(I(t.errors,"root"),Z(t.errors)){h.state.next({errors:{}});try{await a(v,u)}catch(g){S=g}}else c&&await c({...t.errors},u),it(),setTimeout(it);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!S,submitCount:t.submitCount+1,errors:t.errors}),S)throw S},Os=(a,c={})=>{b(s,a)&&(H(c.defaultValue)?J(a,U(b(o,a))):(J(a,c.defaultValue),L(o,a,U(c.defaultValue))),c.keepTouched||I(t.touchedFields,a),c.keepDirty||(I(t.dirtyFields,a),t.isDirty=c.defaultValue?ne(a,U(b(o,a))):ne()),c.keepError||(I(t.errors,a),f.isValid&&_()),h.state.next({...t}))},_r=(a,c={})=>{const u=a?U(a):o,S=U(u),v=Z(a),g=v?o:S;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const x=new Set([...l.mount,...Object.keys(de(o,n))]);for(const P of Array.from(x))b(t.dirtyFields,P)?L(g,P,b(n,P)):J(P,b(g,P))}else{if(Te&&H(a))for(const x of l.mount){const P=b(s,x);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if($e(O)){const ee=O.closest("form");if(ee){ee.reset();break}}}}if(c.keepFieldsRef)for(const x of l.mount)J(x,b(g,x));else s={}}n=r.shouldUnregister?c.keepDefaultValues?U(o):{}:U(g),h.array.next({values:{...g}}),h.state.next({values:{...g}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(g),i.watch=!!r.shouldUnregister,h.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:v?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!re(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:v?{}:c.keepDirtyValues?c.keepDefaultValues&&n?de(o,n):t.dirtyFields:c.keepDefaultValues&&a?de(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},pr=(a,c)=>_r(se(a)?a(n):a,c),Ts=(a,c={})=>{const u=b(s,a),S=u&&u._f;if(S){const v=S.refs?S.refs[0]:S.ref;v.focus&&(v.focus(),c.shouldSelect&&se(v.select)&&v.select())}},Hs=a=>{t={...t,...a}},vr={control:{register:nt,unregister:ot,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:q,_focusError:it,_getWatch:D,_getDirty:ne,_setValid:_,_setFieldArray:A,_setDisabledField:hr,_setErrors:$,_getFieldArray:B,_reset:_r,_resetDefaultValues:()=>se(r.defaultValues)&&r.defaultValues().then(a=>{pr(a,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:ue,_disableForm:Bs,_subjects:h,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Ps,trigger:he,register:nt,handleSubmit:gr,watch:Ls,setValue:J,getValues:Le,reset:pr,resetField:Os,clearErrors:Ds,unregister:ot,setError:yr,setFocus:Ts,getFieldState:fr};return{...vr,formControl:vr}}function Jr(e={}){const r=V.useRef(void 0),t=V.useRef(void 0),[s,o]=V.useState({isDirty:!1,isValidating:!1,isLoading:se(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:se(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!se(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ie(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),V.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),V.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),V.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),V.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),V.useEffect(()=>{e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),V.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=St(s,n),r.current}const Ht=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Je=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Ht(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Ht(o,t,e))}},Mt=(e,r)=>{r.shouldUseNativeValidation&&Je(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function It(e,r,t){function s(l,d){var y;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(y=l._zod).traits??(y.traits=new Set),l._zod.traits.add(e),r(l,d);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const y=t!=null&&t.Parent?new n:this;s(y,l),(d=y._zod).deferred??(d.deferred=[]);for(const f of y._zod.deferred)f();return y}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,y;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(y=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:y.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Ut(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Wt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ae(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,i,l,d,y;const s={...e,path:e.path??[]};if(!e.message){const f=Ae((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ae((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ae((d=t.customError)==null?void 0:d.call(t,e))??Ae((y=t.localeError)==null?void 0:y.call(t,e))??"Invalid input";s.message=f}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Gt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=It("$ZodError",Gt),Zt=It("$ZodError",Gt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Ut())));throw Wt(l,o==null?void 0:o.callee),l}return i.value})(Zt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Ut())));throw Wt(l,o==null?void 0:o.callee),l}return i.value})(Zt);function Qt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(f){return f.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(f){return f.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function is(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(Qt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Je({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:Mt(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Qt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Je({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:Mt(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Kt=V.createContext(null);function Jt(){const e=V.useContext(Kt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:i,style:l,formProps:d}){const y=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),f=y.handleSubmit(e);return p.jsx(Kt.Provider,{value:y,children:p.jsx("form",{...d,className:i,style:l,onSubmit:f,children:typeof r=="function"?r(y):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Xt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=T(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return p.jsx("div",{...o,className:l,style:i,role:"alert","aria-live":"polite",children:r})},ye={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Yt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:i,labelProps:l,children:d,className:y,style:f,divProps:m})=>{const h=T(),w=[ye.formGroup,r?ye.error:"",e?ye.disabled:"",y].filter(Boolean).join(" "),k={"--form-group-margin-bottom":`calc(${h.fonts.rhythm} * 0.35)`,...f},_=V.Children.map(d,z=>{if(V.isValidElement(z)){const A={};if(e&&z.props.disabled===void 0&&(A.disabled=!0),r&&z.props.error===void 0&&(A.error=!0),o&&z.props.id===void 0&&(A.id=o),Object.keys(A).length>0)return V.cloneElement(z,A)}return z});return p.jsxs("div",{...m,className:w,style:k,children:[n&&p.jsxs(xe,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&p.jsxs("span",{className:ye.required,"aria-label":"required",children:[" ","*"]})]}),p.jsx("div",{className:`${ye.inputWrapper} ${s?ye.indented:""}`,children:_}),r&&i&&p.jsx(Xt,{children:i})]})};function me({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:y}){const{control:f}=Jt(),{field:m,fieldState:{error:h}}=Pr({name:e,control:f,rules:o});return p.jsx(Yt,{label:r,name:e,error:!!h,errorMessage:h==null?void 0:h.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:y,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!h,indent:d})})}const Xe={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),Rt=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,type:d="text",value:y="",onChange:f,onBlur:m,className:h,style:w,inputProps:k})=>{const _=T(),z=_.colors.error,A=r?z:t||_.colors.primary,F=us({color:A,disabled:e,fontSize:_.fonts.size,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--input-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:F.color,fontSize:F.fontSize,opacity:F.opacity,...w},C=[Xe.input,s==="small"?Xe.sizeSmall:Xe.sizeLarge,h].filter(Boolean).join(" ");return p.jsx("input",{...k,className:C,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,type:d,value:y,style:$})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return p.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:h})=>p.jsx(Rt,{...l,name:m,value:d||"",onChange:w=>y(w.target.value),inputProps:{onBlur:f},error:h})})}const Ye={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,rows:d=3,value:y="",onChange:f,onBlur:m,className:h,style:w,textareaProps:k})=>{const _=T(),z=_.colors.error,A=r?z:t||_.colors.primary,F=fs({color:A,disabled:e,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--textarea-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:F.color,fontSize:_.fonts.size,opacity:F.opacity,...w},C=[Ye.textarea,s==="small"?Ye.sizeSmall:Ye.sizeLarge,h].filter(Boolean).join(" ");return p.jsx("textarea",{...k,className:C,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,rows:d,value:y,style:$})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return p.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:h})=>p.jsx(er,{...l,name:m,value:d||"",onChange:w=>y(w.target.value),onBlur:f,error:h})})}const Re={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
|
|
2
|
+
(function(N,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(N=typeof globalThis<"u"?globalThis:N||self,_(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,_,w){"use strict";const Ve={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverBackgroundColor:o,hoverTextColor:n,outline:i})=>{let l,d,y;i?(l="transparent",d=t,y=t,e&&(l=o||t,d=o||t,y=n||s)):(l=t,d=t,y=s,e&&(l=o||t,d=o||t,y=n||s));let f=1;return r?f=.3:e&&(f=o?1:.75),{backgroundColor:l,borderColor:d,color:y,opacity:f}};function dt(e,r){const t={...e};return we(e)&&we(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];we(o)&&we(n)?t[s]=dt(n,o):o!==void 0&&(t[s]=o)}),t}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const o=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(o)?768:o-1,unit:n}}const t=parseFloat(r[1]),s=r[2];return{maxWidth:t-1,unit:s}}const ft={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Oe={colors:ft,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",paddingHorizontal:.35,primary:{textColor:ft.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},yt=w.createContext(Oe),Vr=({theme:e,children:r})=>{const t=e?dt(Oe,e):Oe;return _.jsx(yt.Provider,{value:t,children:r})},T=()=>w.useContext(yt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:y,buttonProps:f={},onClick:m,children:g})=>{const V=T(),[k,h]=w.useState(!1);let x;r?x=r:x=e?V.buttons.textColor:V.buttons.primary.textColor;const E=e||V.colors.primary,z={...Fr({isActive:k,disabled:o,buttonColor:E,textColor:x,hoverBackgroundColor:t,hoverTextColor:s,outline:i}),fontSize:V.fonts.size,borderWidth:V.border.width,borderRadius:V.border.radius,"--button-padding-small":`calc(${V.fonts.rhythm} * ${V.sizes.small.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${V.fonts.rhythm} * ${V.sizes.large.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,...y},$=[Ve.button,n==="small"?Ve.sizeSmall:Ve.sizeLarge,i?Ve.outline:"",d].filter(Boolean).join(" ");return _.jsx("button",{...f,className:$,disabled:o,onClick:m,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),type:l,style:z,children:g})};var mt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function xr(){if(!mt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mt(kr)}for(var ht=[],ke=0;ke<256;++ke)ht[ke]=(ke+256).toString(16).substr(1);function Cr(e,r){var t=0,s=ht;return[s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]]].join("")}function gt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||xr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Cr(o)}const Te={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},$r=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{checkboxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},_t={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},zr=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),xe=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:i,labelProps:l})=>{const d=T(),y=d.colors.error,f=t?y:e||d.colors.primary,m=zr({color:f,disabled:r,fontSize:".85em"}),g={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i},V=[_t.label,r?_t.disabled:"",n].filter(Boolean).join(" ");return _.jsx("label",{...l,className:V,htmlFor:s,style:g,children:o})},Ce=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:i,id:l,onChange:d,label:y,labelStyle:f,className:m,style:g,divProps:V})=>{const k=T(),h=l||gt(),x=k.colors.error,E=n?x:e||k.colors.primary,F=$r({color:E,checkmarkColor:r,disabled:o,inverted:s}),z=q=>{o||d(q)},$={cursor:F.cursor,fontSize:k.fonts.size,opacity:F.opacity,...g},A={width:"1em"},W={fill:s&&t?F.checkboxColor:"transparent",strokeWidth:"25",stroke:F.checkboxColor},G={stroke:F.checkmarkColor,strokeWidth:"15",fill:"transparent"},R=[Te.container,m].filter(Boolean).join(" ");return _.jsxs("div",{...V,className:R,style:$,children:[_.jsx("input",{id:h,checked:t,disabled:o,onChange:q=>z({target:{checked:q.target.checked,name:i,type:"checkbox"}}),name:i,style:{display:"none"},type:"checkbox"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!t,name:i,type:"checkbox"}}),style:A,className:Te.svg,children:[_.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:W}),t&&_.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:G})]}),y&&_.jsx(xe,{htmlFor:h,className:Te.label,style:{paddingBottom:0,...f},color:F.checkboxColor,disabled:o,error:n,children:y})]})},Er=()=>{const e=T();return w.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),null};var _e=e=>e.type==="checkbox",ue=e=>e instanceof Date,K=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&pt(e)&&!ue(e),vt=e=>j(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function U(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(He&&(e instanceof Blob||s))&&(t||j(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=U(e[o]));else return e;return r}var $e=e=>/^\w*$/.test(e),H=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],je=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=($e(r)?[r]:je(r)).reduce((o,n)=>K(o)?o:o[n],e);return H(s)||s===e?H(e[r])?t:e[r]:s},X=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=$e(r)?[r]:je(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const y=e[l];d=j(y)||Array.isArray(y)?y:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const ze={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},St=w.createContext(null);St.displayName="HookFormContext";const Ie=()=>w.useContext(St);var Ft=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==te.all&&(r._proxyFormState[i]=!s||te.all),t&&(t[i]=!0),e[i]}});return o};const Ue=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Dr(e){const r=Ie(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=w.useState(t._formState),d=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ue(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:y=>{!s&&l({...t._formState,...y})}}),[o,s,n]),w.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>Ft(i,t,d.current,!1),[i,t])}var Y=e=>typeof e=="string",We=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),Ge=e=>K(e)||!pt(e);function re(e,r,t=new WeakSet){if(Ge(e)||Ge(r))return e===r;if(ue(e)&&ue(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(ue(i)&&ue(l)||j(i)&&j(l)||Array.isArray(i)&&Array.isArray(l)?!re(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=Ie(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=w.useRef(o),y=w.useRef(l),f=w.useRef(void 0),m=w.useRef(t),g=w.useRef(s);y.current=l;const[V,k]=w.useState(()=>{const $=t._getWatch(s,d.current);return y.current?y.current($):$}),h=w.useCallback($=>{const A=We(s,t._names,$||t._formValues,!1,d.current);return y.current?y.current(A):A},[t._formValues,t._names,s]),x=w.useCallback($=>{if(!n){const A=We(s,t._names,$||t._formValues,!1,d.current);if(y.current){const W=y.current(A);re(W,f.current)||(k(W),f.current=W)}else k(A)}},[t._formValues,t._names,n,s]);Ue(()=>((m.current!==t||!re(g.current,s))&&(m.current=t,g.current=s,x()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:$=>{x($.values)}})),[t,i,s,x]),w.useEffect(()=>t._removeUnmounted());const E=m.current!==t,F=g.current,z=w.useMemo(()=>{if(n)return null;const $=!E&&!re(F,s);return E||$?h():null},[n,E,s,F,h]);return z!==null?z:V}function Pr(e){const r=Ie(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=bt(o._names.array,t),d=w.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),y=Lr({control:o,name:t,defaultValue:d,exact:!0}),f=Dr({control:o,name:t,exact:!0}),m=w.useRef(e),g=w.useRef(void 0),V=w.useRef(o.register(t,{...e.rules,value:y,...X(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const k=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(f.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(f.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(f.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(f.validatingFields,t)},error:{enumerable:!0,get:()=>b(f.errors,t)}}),[f,t]),h=w.useCallback(z=>V.current.onChange({target:{value:vt(z),name:t},type:ze.CHANGE}),[t]),x=w.useCallback(()=>V.current.onBlur({target:{value:b(o._formValues,t),name:t},type:ze.BLUR}),[t,o._formValues]),E=w.useCallback(z=>{const $=b(o._fields,t);$&&z&&($._f.ref={focus:()=>z.focus&&z.focus(),select:()=>z.select&&z.select(),setCustomValidity:A=>z.setCustomValidity(A),reportValidity:()=>z.reportValidity()})},[o._fields,t]),F=w.useMemo(()=>({name:t,value:y,...X(s)||f.disabled?{disabled:f.disabled||s}:{},onChange:h,onBlur:x,ref:E}),[t,s,f.disabled,h,x,E,y]);return w.useEffect(()=>{const z=o._options.shouldUnregister||n,$=g.current;$&&$!==t&&!l&&o.unregister($),o.register(t,{...m.current.rules,...X(m.current.disabled)?{disabled:m.current.disabled}:{}});const A=(W,G)=>{const R=b(o._fields,W);R&&R._f&&(R._f.mount=G)};if(A(t,!0),z){const W=U(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,W),H(b(o._formValues,t))&&L(o._formValues,t,W)}return!l&&o.register(t),g.current=t,()=>{(l?z&&!o._state.action:z)?o.unregister(t):A(t,!1)}},[t,o,l,n]),w.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),w.useMemo(()=>({field:F,formState:f,fieldState:k}),[F,f,k])}var qe=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},pe=e=>Array.isArray(e)?e:[e],Vt=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function wt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&j(o)&&n){const i=wt(o,n);j(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ze=e=>e.type==="file",se=e=>typeof e=="function",Ee=e=>{if(!He)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},kt=e=>e.type==="select-multiple",Qe=e=>e.type==="radio",Br=e=>Qe(e)||_e(e),Ke=e=>Ee(e)&&e.isConnected;function Or(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=H(e)?s++:e[r[s++]];return e}function Tr(e){for(const r in e)if(e.hasOwnProperty(r)&&!H(e[r]))return!1;return!0}function I(e,r){const t=Array.isArray(r)?r:$e(r)?[r]:je(r),s=t.length===1?e:Or(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Tr(s))&&I(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(se(e[r]))return!0;return!1};function xt(e){return Array.isArray(e)||j(e)&&!Hr(e)}function Je(e,r={}){for(const t in e)xt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Je(e[t],r[t])):H(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Je(r));for(const s in e)xt(e[s])?H(r)||Ge(t[s])?t[s]=Je(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],K(r)?{}:r[s],t[s]):t[s]=!re(e[s],r[s]);return t}const Ct={value:!1,isValid:!1},$t={value:!0,isValid:!0};var zt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===""?$t:{value:e[0].value,isValid:!0}:$t:Ct}return Ct},Et=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>H(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const At={isValid:!1,value:null};var Nt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,At):At;function Dt(e){const r=e.ref;return Ze(r)?r.files:Qe(r)?Nt(e.refs).value:kt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?zt(e.refs).value:Et(H(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ae=e=>e instanceof RegExp,ve=e=>H(e)?e:Ae(e)?e.source:j(e)?Ae(e.value)?e.value.source:e.value:e,Lt=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const Pt="AsyncFunction";var jr=e=>!!e&&!!e.validate&&!!(se(e.validate)&&e.validate.constructor.name===Pt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Pt)),Ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Bt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const be=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(be(l,r))break}else if(j(l)&&be(l,r))break}}};function Ot(e,r,t){const s=b(e,t);if(s||$e(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return Z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||te.all))},Wr=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Gr=(e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,qr=(e,r)=>!Me(b(e,r)).length&&I(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Tt(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||X(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var ye=e=>j(e)&&!Ae(e)?e:{value:e,message:""},Ht=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:y,minLength:f,min:m,max:g,pattern:V,validate:k,name:h,valueAsNumber:x,mount:E}=e._f,F=b(t,h);if(!E||r.has(h))return{};const z=l?l[0]:i,$=D=>{o&&z.reportValidity&&(z.setCustomValidity(X(D)?"":D||""),z.reportValidity())},A={},W=Qe(i),G=_e(i),R=W||G,q=(x||Ze(i))&&H(i.value)&&H(F)||Ee(i)&&i.value===""||F===""||Array.isArray(F)&&!F.length,de=qe.bind(null,h,s,A),ne=(D,B,M,Q=ae.maxLength,J=ae.minLength)=>{const ie=D?B:M;A[h]={type:D?Q:J,message:ie,ref:i,...de(D?Q:J,ie)}};if(n?!Array.isArray(F)||!F.length:d&&(!R&&(q||K(F))||X(F)&&!F||G&&!zt(l).isValid||W&&!Nt(l).isValid)){const{value:D,message:B}=Y(d)?{value:!!d,message:d}:ye(d);if(D&&(A[h]={type:ae.required,message:B,ref:z,...de(ae.required,B)},!s))return $(B),A}if(!q&&(!K(m)||!K(g))){let D,B;const M=ye(g),Q=ye(m);if(!K(F)&&!isNaN(F)){const J=i.valueAsNumber||F&&+F;K(M.value)||(D=J>M.value),K(Q.value)||(B=J<Q.value)}else{const J=i.valueAsDate||new Date(F),ie=Pe=>new Date(new Date().toDateString()+" "+Pe),Fe=i.type=="time",he=i.type=="week";Y(M.value)&&F&&(D=Fe?ie(F)>ie(M.value):he?F>M.value:J>new Date(M.value)),Y(Q.value)&&F&&(B=Fe?ie(F)<ie(Q.value):he?F<Q.value:J<new Date(Q.value))}if((D||B)&&(ne(!!D,M.message,Q.message,ae.max,ae.min),!s))return $(A[h].message),A}if((y||f)&&!q&&(Y(F)||n&&Array.isArray(F))){const D=ye(y),B=ye(f),M=!K(D.value)&&F.length>+D.value,Q=!K(B.value)&&F.length<+B.value;if((M||Q)&&(ne(M,D.message,B.message),!s))return $(A[h].message),A}if(V&&!q&&Y(F)){const{value:D,message:B}=ye(V);if(Ae(D)&&!F.match(D)&&(A[h]={type:ae.pattern,message:B,ref:i,...de(ae.pattern,B)},!s))return $(B),A}if(k){if(se(k)){const D=await k(F,t),B=Tt(D,z);if(B&&(A[h]={...B,...de(ae.validate,B.message)},!s))return $(B.message),A}else if(j(k)){let D={};for(const B in k){if(!Z(D)&&!s)break;const M=Tt(await k[B](F,t),z,B);M&&(D={...M,...de(B,M.message)},$(M.message),s&&(A[h]=D))}if(!Z(D)&&(A[h]={ref:z,...D},!s))return A}}return $(!0),A};const Qr={mode:te.onSubmit,reValidateMode:te.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:se(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=j(r.defaultValues)||j(r.values)?U(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:U(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,y=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const g={array:Vt(),state:Vt()},V=r.criteriaMode===te.all,k=a=>c=>{clearTimeout(y),y=setTimeout(a,c)},h=async a=>{if(!r.disabled&&(f.isValid||m.isValid||a)){const c=r.resolver?Z((await G()).errors):await q(s,!0);c!==t.isValid&&g.state.next({isValid:c})}},x=(a,c)=>{!r.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):I(t.validatingFields,u))}),g.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},E=(a,c=[],u,S,v=!0,p=!0)=>{if(S&&u&&!r.disabled){if(i.action=!0,p&&Array.isArray(b(s,a))){const C=u(b(s,a),S.argA,S.argB);v&&L(s,a,C)}if(p&&Array.isArray(b(t.errors,a))){const C=u(b(t.errors,a),S.argA,S.argB);v&&L(t.errors,a,C),qr(t.errors,a)}if((f.touchedFields||m.touchedFields)&&p&&Array.isArray(b(t.touchedFields,a))){const C=u(b(t.touchedFields,a),S.argA,S.argB);v&&L(t.touchedFields,a,C)}(f.dirtyFields||m.dirtyFields)&&(t.dirtyFields=fe(o,n)),g.state.next({name:a,isDirty:ne(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},F=(a,c)=>{L(t.errors,a,c),g.state.next({errors:t.errors})},z=a=>{t.errors=a,g.state.next({errors:t.errors,isValid:!1})},$=(a,c,u,S)=>{const v=b(s,a);if(v){const p=b(n,a,H(u)?b(o,a):u);H(p)||S&&S.defaultChecked||c?L(n,a,c?p:Dt(v._f)):M(a,p),i.mount&&h()}},A=(a,c,u,S,v)=>{let p=!1,C=!1;const P={name:a};if(!r.disabled){if(!u||S){(f.isDirty||m.isDirty)&&(C=t.isDirty,t.isDirty=P.isDirty=ne(),p=C!==P.isDirty);const O=re(b(o,a),c);C=!!b(t.dirtyFields,a),O?I(t.dirtyFields,a):L(t.dirtyFields,a,!0),P.dirtyFields=t.dirtyFields,p=p||(f.dirtyFields||m.dirtyFields)&&C!==!O}if(u){const O=b(t.touchedFields,a);O||(L(t.touchedFields,a,u),P.touchedFields=t.touchedFields,p=p||(f.touchedFields||m.touchedFields)&&O!==u)}p&&v&&g.state.next(P)}return p?P:{}},W=(a,c,u,S)=>{const v=b(t.errors,a),p=(f.isValid||m.isValid)&&X(c)&&t.isValid!==c;if(r.delayError&&u?(d=k(()=>F(a,u)),d(r.delayError)):(clearTimeout(y),d=null,u?L(t.errors,a,u):I(t.errors,a)),(u?!re(v,u):v)||!Z(S)||p){const C={...S,...p&&X(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...C},g.state.next(C)}},G=async a=>{x(a,!0);const c=await r.resolver(n,r.context,Mr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return x(a),c},R=async a=>{const{errors:c}=await G(a);if(a)for(const u of a){const S=b(c,u);S?L(t.errors,u,S):I(t.errors,u)}else t.errors=c;return c},q=async(a,c,u={valid:!0})=>{for(const S in a){const v=a[S];if(v){const{_f:p,...C}=v;if(p){const P=l.array.has(p.name),O=v._f&&jr(v._f);O&&f.validatingFields&&x([p.name],!0);const ee=await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation&&!c,P);if(O&&f.validatingFields&&x([p.name]),ee[p.name]&&(u.valid=!1,c))break;!c&&(b(ee,p.name)?P?Zr(t.errors,ee,p.name):L(t.errors,p.name,ee[p.name]):I(t.errors,p.name))}!Z(C)&&await q(C,c,u)}}return u.valid},de=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Ke(u)):!Ke(c._f.ref))&&it(a)}l.unMount=new Set},ne=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!re(Pe(),o)),D=(a,c,u)=>We(a,l,{...i.mount?n:H(c)?o:Y(a)?{[a]:c}:c},u,c),B=a=>Me(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),M=(a,c,u={})=>{const S=b(s,a);let v=c;if(S){const p=S._f;p&&(!p.disabled&&L(n,a,Et(c,p)),v=Ee(p.ref)&&K(c)?"":c,kt(p.ref)?[...p.ref.options].forEach(C=>C.selected=v.includes(C.value)):p.refs?_e(p.ref)?p.refs.forEach(C=>{(!C.defaultChecked||!C.disabled)&&(Array.isArray(v)?C.checked=!!v.find(P=>P===C.value):C.checked=v===C.value||!!v)}):p.refs.forEach(C=>C.checked=C.value===v):Ze(p.ref)?p.ref.value="":(p.ref.value=v,p.ref.type||g.state.next({name:a,values:U(n)})))}(u.shouldDirty||u.shouldTouch)&&A(a,v,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Q=(a,c,u)=>{for(const S in c){if(!c.hasOwnProperty(S))return;const v=c[S],p=a+"."+S,C=b(s,p);(l.array.has(a)||j(v)||C&&!C._f)&&!ue(v)?Q(p,v,u):M(p,v,u)}},J=(a,c,u={})=>{const S=b(s,a),v=l.array.has(a),p=U(c);L(n,a,p),v?(g.array.next({name:a,values:U(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&g.state.next({name:a,dirtyFields:fe(o,n),isDirty:ne(a,p)})):S&&!S._f&&!K(p)?Q(a,p,u):M(a,p,u),Bt(a,l)&&g.state.next({...t,name:a}),g.state.next({name:i.mount?a:void 0,values:U(n)})},ie=async a=>{i.mount=!0;const c=a.target;let u=c.name,S=!0;const v=b(s,u),p=O=>{S=Number.isNaN(O)||ue(O)&&isNaN(O.getTime())||re(O,b(n,u,O))},C=Lt(r.mode),P=Lt(r.reValidateMode);if(v){let O,ee;const Be=c.type?Dt(v._f):vt(a),ce=a.type===ze.BLUR||a.type===ze.FOCUS_OUT,Is=!Ir(v._f)&&!r.resolver&&!b(t.errors,u)&&!v._f.deps||Gr(ce,b(t.touchedFields,u),t.isSubmitted,P,C),ct=Bt(u,l,ce);L(n,u,Be),ce?(!c||!c.readOnly)&&(v._f.onBlur&&v._f.onBlur(a),d&&d(0)):v._f.onChange&&v._f.onChange(a);const ut=A(u,Be,ce),Us=!Z(ut)||ct;if(!ce&&g.state.next({name:u,type:a.type,values:U(n)}),Is)return(f.isValid||m.isValid)&&(r.mode==="onBlur"?ce&&h():ce||h()),Us&&g.state.next({name:u,...ct?{}:ut});if(!ce&&ct&&g.state.next({...t}),r.resolver){const{errors:br}=await G([u]);if(p(Be),S){const Ws=Ot(t.errors,s,u),Sr=Ot(br,s,Ws.name||u);O=Sr.error,u=Sr.name,ee=Z(br)}}else x([u],!0),O=(await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation))[u],x([u]),p(Be),S&&(O?ee=!1:(f.isValid||m.isValid)&&(ee=await q(s,!0)));S&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&he(v._f.deps),W(u,ee,O,ut))}},Fe=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,S;const v=pe(a);if(r.resolver){const p=await R(H(a)?a:v);u=Z(p),S=a?!v.some(C=>b(p,C)):u}else a?(S=(await Promise.all(v.map(async p=>{const C=b(s,p);return await q(C&&C._f?{[p]:C}:C)}))).every(Boolean),!(!S&&!t.isValid)&&h()):S=u=await q(s);return g.state.next({...!Y(a)||(f.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!S&&be(s,Fe,a?v:l.mount),S},Pe=(a,c)=>{let u={...i.mount?n:o};return c&&(u=wt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),H(a)?u:Y(a)?b(u,a):a.map(S=>b(u,S))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ps=a=>{a&&pe(a).forEach(c=>I(t.errors,c)),g.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const S=(b(s,a,{_f:{}})._f||{}).ref,v=b(t.errors,a)||{},{ref:p,message:C,type:P,...O}=v;L(t.errors,a,{...O,...c,ref:S}),g.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&S&&S.focus&&S.focus()},Bs=(a,c)=>se(a)?g.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>g.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||f,js,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Os=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),it=(a,c={})=>{for(const u of a?pe(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(I(s,u),I(n,u)),!c.keepError&&I(t.errors,u),!c.keepDirty&&I(t.dirtyFields,u),!c.keepTouched&&I(t.touchedFields,u),!c.keepIsValidating&&I(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&I(o,u);g.state.next({values:U(n)}),g.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&h()},hr=({disabled:a,name:c})=>{(X(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},at=(a,c={})=>{let u=b(s,a);const S=X(c.disabled)||X(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:X(c.disabled)?c.disabled:r.disabled,name:a}):$(a,!0,c.value),{...S?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:ve(c.min),max:ve(c.max),minLength:ve(c.minLength),maxLength:ve(c.maxLength),pattern:ve(c.pattern)}:{},name:a,onChange:ie,onBlur:ie,ref:v=>{if(v){at(a,c),u=b(s,a);const p=H(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,C=Br(p),P=u._f.refs||[];if(C?P.find(O=>O===p):p===u._f.ref)return;L(s,a,{_f:{...u._f,...C?{refs:[...P.filter(Ke),p,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:p.type,name:a}}:{ref:p}}}),$(a,!1,void 0,p)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(bt(l.array,a)&&i.action)&&l.unMount.add(a)}}},lt=()=>r.shouldFocusError&&be(s,Fe,l.mount),Ts=a=>{X(a)&&(g.state.next({disabled:a}),be(s,(c,u)=>{const S=b(s,u);S&&(c.disabled=S._f.disabled||a,Array.isArray(S._f.refs)&&S._f.refs.forEach(v=>{v.disabled=S._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let S;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let v=U(n);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:p,values:C}=await G();t.errors=p,v=U(C)}else await q(s);if(l.disabled.size)for(const p of l.disabled)I(v,p);if(I(t.errors,"root"),Z(t.errors)){g.state.next({errors:{}});try{await a(v,u)}catch(p){S=p}}else c&&await c({...t.errors},u),lt(),setTimeout(lt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!S,submitCount:t.submitCount+1,errors:t.errors}),S)throw S},Hs=(a,c={})=>{b(s,a)&&(H(c.defaultValue)?J(a,U(b(o,a))):(J(a,c.defaultValue),L(o,a,U(c.defaultValue))),c.keepTouched||I(t.touchedFields,a),c.keepDirty||(I(t.dirtyFields,a),t.isDirty=c.defaultValue?ne(a,U(b(o,a))):ne()),c.keepError||(I(t.errors,a),f.isValid&&h()),g.state.next({...t}))},_r=(a,c={})=>{const u=a?U(a):o,S=U(u),v=Z(a),p=v?o:S;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const C=new Set([...l.mount,...Object.keys(fe(o,n))]);for(const P of Array.from(C))b(t.dirtyFields,P)?L(p,P,b(n,P)):J(P,b(p,P))}else{if(He&&H(a))for(const C of l.mount){const P=b(s,C);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Ee(O)){const ee=O.closest("form");if(ee){ee.reset();break}}}}if(c.keepFieldsRef)for(const C of l.mount)J(C,b(p,C));else s={}}n=r.shouldUnregister?c.keepDefaultValues?U(o):{}:U(p),g.array.next({values:{...p}}),g.state.next({values:{...p}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(p),i.watch=!!r.shouldUnregister,g.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:v?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!re(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:v?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&a?fe(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},pr=(a,c)=>_r(se(a)?a(n):a,c),Ms=(a,c={})=>{const u=b(s,a),S=u&&u._f;if(S){const v=S.refs?S.refs[0]:S.ref;v.focus&&(v.focus(),c.shouldSelect&&se(v.select)&&v.select())}},js=a=>{t={...t,...a}},vr={control:{register:at,unregister:it,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:G,_focusError:lt,_getWatch:D,_getDirty:ne,_setValid:h,_setFieldArray:E,_setDisabledField:hr,_setErrors:z,_getFieldArray:B,_reset:_r,_resetDefaultValues:()=>se(r.defaultValues)&&r.defaultValues().then(a=>{pr(a,r.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:de,_disableForm:Ts,_subjects:g,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Os,trigger:he,register:at,handleSubmit:gr,watch:Bs,setValue:J,getValues:Pe,reset:pr,resetField:Hs,clearErrors:Ps,unregister:it,setError:yr,setFocus:Ms,getFieldState:fr};return{...vr,formControl:vr}}function Jr(e={}){const r=w.useRef(void 0),t=w.useRef(void 0),[s,o]=w.useState({isDirty:!1,isValidating:!1,isLoading:se(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:se(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!se(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ue(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),w.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),w.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),w.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),w.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),w.useEffect(()=>{e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),w.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=Ft(s,n),r.current}const Mt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Xe=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Mt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Mt(o,t,e))}},jt=(e,r)=>{r.shouldUseNativeValidation&&Xe(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=It(r);return e.some(s=>It(s).match(`^${t}\\.\\d+`))};function It(e){return e.replace(/\]|\[/g,"")}function Ut(e,r,t){function s(l,d){var y;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(y=l._zod).traits??(y.traits=new Set),l._zod.traits.add(e),r(l,d);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const y=t!=null&&t.Parent?new n:this;s(y,l),(d=y._zod).deferred??(d.deferred=[]);for(const f of y._zod.deferred)f();return y}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,y;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(y=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:y.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Wt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Gt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ne(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,i,l,d,y;const s={...e,path:e.path??[]};if(!e.message){const f=Ne((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ne((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ne((d=t.customError)==null?void 0:d.call(t,e))??Ne((y=t.localeError)==null?void 0:y.call(t,e))??"Invalid input";s.message=f}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Zt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=Ut("$ZodError",Zt),Qt=Ut("$ZodError",Zt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt);function Kt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(f){return f.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(f){return f.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function is(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:jt(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:jt(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Jt=w.createContext(null);function Xt(){const e=w.useContext(Jt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:i,style:l,formProps:d}){const y=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),f=y.handleSubmit(e);return _.jsx(Jt.Provider,{value:y,children:_.jsx("form",{...d,className:i,style:l,onSubmit:f,children:typeof r=="function"?r(y):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Yt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=T(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:l,style:i,role:"alert","aria-live":"polite",children:r})},me={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Rt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:i,labelProps:l,children:d,className:y,style:f,divProps:m})=>{const g=T(),V=[me.formGroup,r?me.error:"",e?me.disabled:"",y].filter(Boolean).join(" "),k={"--form-group-margin-bottom":`calc(${g.fonts.rhythm} * 0.35)`,...f},h=w.Children.map(d,x=>{if(w.isValidElement(x)){const E={};if(e&&x.props.disabled===void 0&&(E.disabled=!0),r&&x.props.error===void 0&&(E.error=!0),o&&x.props.id===void 0&&(E.id=o),Object.keys(E).length>0)return w.cloneElement(x,E)}return x});return _.jsxs("div",{...m,className:V,style:k,children:[n&&_.jsxs(xe,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&_.jsxs("span",{className:me.required,"aria-label":"required",children:[" ","*"]})]}),_.jsx("div",{className:`${me.inputWrapper} ${s?me.indented:""}`,children:h}),r&&i&&_.jsx(Yt,{children:i})]})};function le({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:y}){const{control:f}=Xt(),{field:m,fieldState:{error:g}}=Pr({name:e,control:f,rules:o});return _.jsx(Rt,{label:r,name:e,error:!!g,errorMessage:g==null?void 0:g.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:y,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!g,indent:d})})}const Ye={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,type:d="text",value:y="",onChange:f,onBlur:m,className:g,style:V,inputProps:k})=>{const h=T(),x=h.colors.error,E=r?x:t||h.colors.primary,F=us({color:E,disabled:e,fontSize:h.fonts.size,placeholderOpacity:l}),z={"--placeholder-opacity":F.placeholderOpacity,"--input-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:F.fontSize,opacity:F.opacity,...V},$=[Ye.input,s==="small"?Ye.sizeSmall:Ye.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("input",{...k,className:$,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,type:d,value:y,style:z})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(le,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(er,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),inputProps:{onBlur:f},error:g})})}const Re={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,rows:d=3,value:y="",onChange:f,onBlur:m,className:g,style:V,textareaProps:k})=>{const h=T(),x=h.colors.error,E=r?x:t||h.colors.primary,F=fs({color:E,disabled:e,placeholderOpacity:l}),z={"--placeholder-opacity":F.placeholderOpacity,"--textarea-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:h.fonts.size,opacity:F.opacity,...V},$=[Re.textarea,s==="small"?Re.sizeSmall:Re.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("textarea",{...k,className:$,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,rows:d,value:y,style:z})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(le,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(tr,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),onBlur:f,error:g})})}const et={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
4
4
|
<path
|
|
5
5
|
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
fill="transparent"
|
|
15
15
|
/>
|
|
16
16
|
</svg>
|
|
17
|
-
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(i)}")`})(e)}),
|
|
17
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(i)}")`})(e)}),rr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i="",value:l="",onChange:d,onBlur:y,children:f,className:m,style:g,selectProps:V})=>{const k=T(),h=k.colors.error,x=r?h:t||k.colors.primary,E=ms({color:x,disabled:e}),F={"--select-padding-small":`calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * 1.2) calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * 1.4) calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,backgroundImage:E.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:E.borderColor,borderWidth:k.border.width,borderRadius:k.border.radius,color:E.color,cursor:E.cursor,fontSize:k.fonts.size,opacity:E.opacity,...g},z=[et.select,s==="small"?et.sizeSmall:et.sizeLarge,m].filter(Boolean).join(" ");return _.jsxs("select",{...V,className:z,disabled:e,id:o,name:n,onChange:d,onBlur:y,value:l,style:F,children:[i!==""&&_.jsx("option",{disabled:!0,value:"",children:i}),f]})};function hs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:l,...d}){return _.jsx(le,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,onBlur:m,name:g,error:V})=>_.jsx(rr,{...d,name:g,value:y||"",onChange:k=>f(k.target.value),onBlur:m,error:V,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...i}){return _.jsx(le,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:y,error:f})=>_.jsx(Ce,{...i,name:y,checked:!!l,onChange:m=>d(m.target.checked),error:f})})}const tt={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},_s=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),rt=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:i,label:l,labelStyle:d,className:y,style:f,divProps:m})=>{const g=T(),V=n||gt(),k=g.colors.error,h=s?k:e||g.colors.primary,x=_s({color:h,disabled:t}),E=G=>{t||i(G)},F={cursor:x.cursor,fontSize:g.fonts.size,opacity:x.opacity,...f},z={width:"1em"},$={fill:"transparent",strokeWidth:"12.5",stroke:x.radioColor},A={fill:x.radioColor},W=[tt.container,y].filter(Boolean).join(" ");return _.jsxs("div",{...m,className:W,style:F,children:[_.jsx("input",{id:V,checked:r,disabled:t,name:o,onChange:G=>E({target:{checked:G.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>E({target:{checked:!r,name:o,type:"radio"}}),className:tt.svg,style:z,children:[_.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:$}),r&&_.jsx("circle",{cx:"50",cy:"50",r:"25",style:A})]}),l&&_.jsx(xe,{htmlFor:V,className:tt.label,style:{paddingBottom:0,...d},color:x.radioColor,disabled:t,error:s,children:l})]})};function ps({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,value:l,...d}){return _.jsx(le,{name:e,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,name:m,error:g})=>_.jsx(rt,{...d,name:m,checked:y===l,onChange:()=>f(l),error:g,label:r})})}function vs({name:e,label:r,required:t,options:s,disabled:o,className:n,style:i,indent:l=!0}){return _.jsx(le,{name:e,label:r,required:t,disabled:o,className:n,style:i,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:d,onChange:y,name:f,error:m})=>_.jsx(_.Fragment,{children:s.map(g=>_.jsx(rt,{name:f,checked:d===g.value,onChange:()=>y(g.value),label:g.label,disabled:o||g.disabled,error:m},g.value))})})}function bs({name:e,label:r,required:t,options:s,children:o,disabled:n,className:i,style:l,indent:d=!0}){return _.jsx(le,{name:e,label:r,required:t,disabled:n,className:i,style:l,indent:d,labelProps:{style:{marginBottom:".25em"}},children:({value:y,onChange:f,name:m,error:g})=>{const V=Array.isArray(y)?y:[],k=(h,x)=>{f(x?[...V,h]:V.filter(E=>E!==h))};return _.jsx(_.Fragment,{children:s?s.map(h=>_.jsx(Ce,{name:`${m}[]`,checked:V.includes(h.value),onChange:x=>k(h.value,x.target.checked),label:h.label,disabled:n||h.disabled,error:g},h.value)):w.Children.map(o,h=>{if(w.isValidElement(h)&&h.type===Ce){const x=h.props.value||h.props.name;return w.cloneElement(h,{name:`${m}[]`,checked:V.includes(x),onChange:E=>k(x,E.target.checked),error:g||h.props.error,disabled:n||h.props.disabled})}return h})})}})}const Se={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Ss=({compact:e,color:r,visible:t,border:s})=>{const o=T(),n=e?{right:".5em"}:{};return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none",...n}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:i,className:l,style:d})=>{const y=Ss({compact:t,color:e,visible:r,border:n}),f=[Se.hamburger,o?Se.open:"",l].filter(Boolean).join(" ");return _.jsxs("button",{ref:s,className:f,onClick:()=>i(!o),style:{...y,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Fs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{"--header-max-width":r||m.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:y,color:f}},oe=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const i=window.matchMedia(e);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return w.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakpoint:f,children:m,className:g,style:V,headerProps:k})=>{const h=T(),x=f||h.breakpoints.sm,{maxWidth:E,unit:F}=ge(x),z=oe(`(max-width: ${E}${F})`),$=Fs({isSmallScreen:z,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),A=[or.container,g].filter(Boolean).join(" ");return _.jsx("header",{...k,className:or.header,children:_.jsx("div",{className:A,style:{...$,...V},children:m})})},De={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},Vs=({isMobile:e,isCompact:r,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:i})=>{const l=T();return w.useMemo(()=>{const{rhythm:d}=l.fonts;return{...e?{"--mobile-nav-background":t||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":o||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":i||t||l.colors.accent,"--nav-padding-top":`calc(${d} * 3)`,"--nav-link-padding":`calc(${d} * 0.35) calc(${d} * 2)`,"--nav-button-margin":`calc(${d} * 0.5) calc(${d} * 1.4)`}:{}}},[t,s,o,n,i,l.colors.accent,l.colors.primary,l.fonts,e,r])},ws=({mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o,breakpoints:n,children:i,className:l,style:d,navProps:y})=>{const[f,m]=w.useState(!1),g=w.useRef(null),V=w.useRef(null),h={...T().breakpoints,...n},{maxWidth:x,unit:E}=ge(h.md),{maxWidth:F,unit:z}=ge(h.sm),$=oe(`(max-width: ${x}${E})`),A=oe(`(max-width: ${F}${z})`),W=Vs({isMobile:$,isCompact:A,mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o});w.useEffect(()=>{const R=q=>{!V.current||V.current.contains(q.target)||g.current&&g.current.contains(q.target)||m(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[g,V,m]);const G=[De.nav,$?De.navMobile:De.navDesktop,$&&f?De.open:"",l].filter(Boolean).join(" ");return _.jsxs(_.Fragment,{children:[_.jsx(sr,{hamburgerRef:g,visible:$,compact:A,open:f,setOpen:m}),_.jsx("nav",{...y,ref:V,className:G,style:{...W,...d},children:typeof i=="function"?i({setOpen:m}):i})]})},ir=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const i=T(),l=e||i.colors.primary,d=r||i.colors.secondary,y=_.jsx("div",{...t?void 0:n,className:t?void 0:s,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:o,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${d}`}}),f=_.jsxs(_.Fragment,{children:[y,_.jsx("style",{children:`
|
|
18
18
|
@keyframes spin {
|
|
19
19
|
0% { transform: rotate(0deg); }
|
|
20
20
|
100% { transform: rotate(360deg); }
|
|
21
21
|
}
|
|
22
|
-
`})]});return t?
|
|
22
|
+
`})]});return t?_.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:f}):f},ks=({children:e,loadingComponent:r})=>{const[t,s]=w.useState(!1);return w.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?_.jsx(_.Fragment,{children:e}):r||_.jsx(ir,{})},st={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},xs=({direction:e="column",children:r,className:t,style:s,divProps:o})=>{const n=[st.stack,e==="row"?st.horizontal:st.vertical,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:n,style:s,children:r})},ar={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},ot=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,verticalRhythm:f=3,children:m,className:g,style:V,sectionProps:k})=>{const h=T(),x=oe(`(min-width: ${h.breakpoints.sm})`),E={backgroundColor:e,color:r||h.fonts.color,margin:d,...V},F=`calc(${h.fonts.rhythm} * ${f})`,z=x?i||h.layout.padding:l||h.layout.paddingSm,$={"--max-width":t||h.layout.maxWidth,"--min-width":s,"--width":o,"--height":n,"--section-padding":`${F} ${z}`,"--gap":y},A=[ar.section,g].filter(Boolean).join(" ");return _.jsx("section",{...k,className:A,style:E,children:_.jsx("div",{className:ar.innerDiv,style:$,children:m})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},Cs=({isMd:e=!1,isLg:r=!1,theme:t})=>w.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",i="1.125rem";return r?(o=`calc(${s} * 4) 0`,n="3.5rem",i="1.5rem"):e&&(o=`calc(${s} * 3.5) 0`,n="3rem",i="1.25rem"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":i,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),$s=({color:e,breakpoints:r,children:t,className:s,style:o,...n})=>{const i=T(),l=[lr.hero,s].filter(Boolean).join(" "),d=(r==null?void 0:r.md)||i.breakpoints.md,y=(r==null?void 0:r.lg)||i.breakpoints.lg,f=oe(`(min-width: ${d})`),m=oe(`(min-width: ${y})`),g=Cs({isMd:f,isLg:m,theme:i});return _.jsx(ot,{className:l,color:e||i.fonts.color,style:{...g,...o},...n,children:_.jsx("div",{className:lr.content,children:t})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},zs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{maxWidth:r||m.layout.maxWidth,minWidth:t,width:s,height:o,padding:e?n||m.layout.paddingSm:i||m.layout.padding,margin:l,gap:d,backgroundColor:y,color:f||m.fonts.color}},ur=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakPoint:f,children:m,className:g,style:V,footerProps:k})=>{const h=T(),x=f||h.breakpoints.sm,{maxWidth:E,unit:F}=ge(x),z=oe(`(max-width: ${E}${F})`),$=zs({isSmallScreen:z,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),A=[cr.container,g].filter(Boolean).join(" ");return _.jsx("footer",{...k,className:cr.footer,children:_.jsx("div",{className:A,style:{...$,...V},children:m})})},Le={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Es=({isMd:e=!1,theme:r})=>w.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),As=({breakpoint:e,icon:r,title:t,children:s,className:o,style:n,divProps:i})=>{const l=T(),d=[Le.card,o].filter(Boolean).join(" "),y=e||l.breakpoints.md,f=oe(`(min-width: ${y})`),m=Es({isMd:f,theme:l});return _.jsxs("div",{...i,className:d,style:{...m,...n},children:[r&&_.jsx("div",{className:Le.icon,children:r}),_.jsx("h3",{className:Le.title,children:t}),_.jsx("div",{className:Le.content,children:s})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Ns=({columns:e,isMd:r=!1,isLg:t=!1})=>w.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),Ds=({columns:e=3,breakpoints:r,gap:t,children:s,className:o,style:n,...i})=>{const l=T(),d=[dr.section,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||l.breakpoints.md,f=(r==null?void 0:r.lg)||l.breakpoints.lg,m=oe(`(min-width: ${y})`),g=oe(`(min-width: ${f})`),V=Ns({columns:e,isMd:m,isLg:g}),k={"--section-padding-vertical":`calc(${l.fonts.rhythm} * 2)`},h={...V,gap:t,...n};return _.jsx(ot,{className:d,style:k,...i,children:_.jsx("div",{className:dr.grid,style:h,children:s})})},nt={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ls=({header:e,footer:r,children:t,className:s,style:o,divProps:n,mainProps:i})=>{const l=[nt.layoutContainer,s].filter(Boolean).join(" ");return _.jsxs("div",{...n,className:l,style:o,children:[_.jsxs("div",{className:nt.content,children:[e&&_.jsx(nr,{children:e}),_.jsx("main",{...i,className:nt.main,children:t})]}),r&&_.jsx(ur,{children:r})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=Ce,N.FeatureCard=As,N.FeatureGridSection=Ds,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormCheckboxGroup=bs,N.FormError=Yt,N.FormField=le,N.FormGroup=Rt,N.FormInput=ds,N.FormLabel=xe,N.FormRadio=ps,N.FormRadioGroup=vs,N.FormSelect=hs,N.FormTextarea=ys,N.Hamburger=sr,N.Header=nr,N.Hero=$s,N.Input=er,N.LoadingSpinner=ir,N.PageLayout=Ls,N.Radio=rt,N.ResponsiveNav=ws,N.ResponsiveSection=ot,N.Select=rr,N.Stack=xs,N.StyleLoader=ks,N.Textarea=tr,N.ThemeProvider=Vr,N.parseBreakpoint=ge,N.useFormContext=Xt,N.useTheme=T,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Button } from './components/Button';
|
|
2
2
|
export { default as Checkbox } from './components/Checkbox';
|
|
3
3
|
export { default as CSSReset } from './components/CSSReset';
|
|
4
|
-
export { default as Form, FormField, FormInput, FormTextarea, FormSelect, FormCheckbox, FormRadio, useFormContext, } from './components/Form';
|
|
4
|
+
export { default as Form, FormField, FormInput, FormTextarea, FormSelect, FormCheckbox, FormRadio, FormRadioGroup, FormCheckboxGroup, useFormContext, } from './components/Form';
|
|
5
5
|
export { default as FormError } from './components/FormError';
|
|
6
6
|
export { default as FormGroup } from './components/FormGroup';
|
|
7
7
|
export { default as FormLabel } from './components/FormLabel';
|
|
@@ -28,7 +28,7 @@ export type { DeepPartial } from './types/utils';
|
|
|
28
28
|
export type { TypographyProps, ColorProps, BorderProps, LayoutProps, BreakpointProps, StateProps, HoverProps, BaseComponentProps, FormElementProps, TextInputProps, LayoutComponentStyleProps, ElementSpecificProps, SizeVariant, ColorVariant, } from './types/component-props.d.ts';
|
|
29
29
|
export type { ButtonProps } from './components/Button';
|
|
30
30
|
export type { CheckboxProps } from './components/Checkbox';
|
|
31
|
-
export type { FormProps, FormFieldProps, FormInputProps, FormTextareaProps, FormSelectProps, FormCheckboxProps, FormRadioProps, } from './components/Form';
|
|
31
|
+
export type { FormProps, FormFieldProps, FormInputProps, FormTextareaProps, FormSelectProps, FormCheckboxProps, FormRadioProps, FormRadioGroupProps, FormCheckboxGroupProps, RadioOption, CheckboxOption, } from './components/Form';
|
|
32
32
|
export type { FormErrorProps } from './components/FormError';
|
|
33
33
|
export type { FormGroupProps } from './components/FormGroup';
|
|
34
34
|
export type { FormLabelProps } from './components/FormLabel';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ThemeColors, ThemeFonts, ThemeBorder, ThemeBreakpoints, ThemeLayout } from '../theme';
|
|
3
|
+
/**
|
|
4
|
+
* Typography props derived from theme.fonts
|
|
5
|
+
* All properties are optional to allow selective overrides
|
|
6
|
+
*/
|
|
7
|
+
export type TypographyProps = Partial<ThemeFonts>;
|
|
8
|
+
/**
|
|
9
|
+
* Color props derived from theme.colors
|
|
10
|
+
* Includes common aliases for better DX
|
|
11
|
+
*/
|
|
12
|
+
export interface ColorProps extends Partial<ThemeColors> {
|
|
13
|
+
/**
|
|
14
|
+
* Text/foreground color - alias for easier usage
|
|
15
|
+
* Falls back to theme.fonts.color or theme.colors.primary
|
|
16
|
+
*/
|
|
17
|
+
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Background color
|
|
20
|
+
*/
|
|
21
|
+
backgroundColor?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Border props derived from theme.border
|
|
25
|
+
* All properties are optional to allow selective overrides
|
|
26
|
+
*/
|
|
27
|
+
export interface BorderProps extends Partial<ThemeBorder> {
|
|
28
|
+
/**
|
|
29
|
+
* Border color - typically uses theme.colors.primary
|
|
30
|
+
* @example '#ccc', 'currentColor', 'transparent'
|
|
31
|
+
*/
|
|
32
|
+
borderColor?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Breakpoint props derived from theme.breakpoints
|
|
36
|
+
* All properties are optional to allow selective overrides
|
|
37
|
+
*/
|
|
38
|
+
export type BreakpointProps = Partial<ThemeBreakpoints>;
|
|
39
|
+
/**
|
|
40
|
+
* Layout and spacing props derived from theme.layout
|
|
41
|
+
* Includes both layout properties and spacing properties
|
|
42
|
+
* All properties are optional to allow selective overrides
|
|
43
|
+
*/
|
|
44
|
+
export interface LayoutProps extends Partial<ThemeLayout> {
|
|
45
|
+
/**
|
|
46
|
+
* Layout direction for flex/grid containers
|
|
47
|
+
* @example 'row', 'column'
|
|
48
|
+
*/
|
|
49
|
+
direction?: 'row' | 'column';
|
|
50
|
+
/**
|
|
51
|
+
* Minimum width
|
|
52
|
+
* @example '320px', '100%'
|
|
53
|
+
*/
|
|
54
|
+
minWidth?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Width
|
|
57
|
+
* @example '100%', '50vw', 'auto'
|
|
58
|
+
*/
|
|
59
|
+
width?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Height
|
|
62
|
+
* @example '100%', '50vh', 'auto'
|
|
63
|
+
*/
|
|
64
|
+
height?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Margin (all sides or individual)
|
|
67
|
+
* @example '1rem', '10px 20px', '1rem auto'
|
|
68
|
+
*/
|
|
69
|
+
margin?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Gap between flex/grid children
|
|
72
|
+
* @example '1rem', '10px', '0.5rem'
|
|
73
|
+
*/
|
|
74
|
+
gap?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* State props for interactive components
|
|
78
|
+
* These manage component state and are not part of theme
|
|
79
|
+
*/
|
|
80
|
+
export interface StateProps {
|
|
81
|
+
/**
|
|
82
|
+
* Disabled state
|
|
83
|
+
*/
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Error state
|
|
87
|
+
*/
|
|
88
|
+
error?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Loading state
|
|
91
|
+
*/
|
|
92
|
+
loading?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Active/selected state
|
|
95
|
+
*/
|
|
96
|
+
active?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Read-only state
|
|
99
|
+
*/
|
|
100
|
+
readonly?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Hover state props for interactive elements
|
|
104
|
+
* These define hover behavior
|
|
105
|
+
*/
|
|
106
|
+
export interface HoverProps {
|
|
107
|
+
/**
|
|
108
|
+
* Color on hover
|
|
109
|
+
*/
|
|
110
|
+
hoverTextColor?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Background color on hover
|
|
113
|
+
*/
|
|
114
|
+
hoverBackgroundColor?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Border color on hover
|
|
117
|
+
*/
|
|
118
|
+
hoverBorderColor?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Opacity on hover
|
|
121
|
+
* @example 0.8, 1
|
|
122
|
+
*/
|
|
123
|
+
hoverOpacity?: number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Base props that should be available on all components
|
|
127
|
+
*/
|
|
128
|
+
export interface BaseComponentProps {
|
|
129
|
+
/**
|
|
130
|
+
* Custom CSS class name
|
|
131
|
+
*/
|
|
132
|
+
className?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Inline styles (use sparingly, prefer className)
|
|
135
|
+
*/
|
|
136
|
+
style?: React.CSSProperties;
|
|
137
|
+
/**
|
|
138
|
+
* Child elements
|
|
139
|
+
*/
|
|
140
|
+
children?: React.ReactNode;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Common props for form elements (Input, Textarea, Select)
|
|
144
|
+
* Contains HTML attributes shared across form elements
|
|
145
|
+
*/
|
|
146
|
+
export interface FormElementProps {
|
|
147
|
+
/**
|
|
148
|
+
* Element id attribute - used for label associations
|
|
149
|
+
*/
|
|
150
|
+
id?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Element name attribute - used for form submissions
|
|
153
|
+
*/
|
|
154
|
+
name?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the field is required for form submission
|
|
157
|
+
*/
|
|
158
|
+
required?: boolean;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Common props for text-based form inputs (Input, Textarea, Select)
|
|
162
|
+
* Contains value and placeholder-related props
|
|
163
|
+
*/
|
|
164
|
+
export interface TextInputProps {
|
|
165
|
+
/**
|
|
166
|
+
* Placeholder text displayed when empty
|
|
167
|
+
*/
|
|
168
|
+
placeholder?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Placeholder opacity - defaults to 0.3
|
|
171
|
+
* For Select, this affects the placeholder option opacity
|
|
172
|
+
*/
|
|
173
|
+
placeholderOpacity?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Current value of the form element
|
|
176
|
+
*/
|
|
177
|
+
value?: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Composite interface for layout components (Footer, Hero, ResponsiveSection)
|
|
181
|
+
* Combines color, layout, and breakpoint props
|
|
182
|
+
*/
|
|
183
|
+
export interface LayoutComponentStyleProps extends ColorProps, LayoutProps, BreakpointProps {
|
|
184
|
+
/**
|
|
185
|
+
* Vertical rhythm multiplier - uses theme.fonts.rhythm as base
|
|
186
|
+
*/
|
|
187
|
+
verticalRhythm?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Font size for layout text
|
|
190
|
+
*/
|
|
191
|
+
fontSize?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Utility type for extracting HTML attributes for specific elements
|
|
195
|
+
* Use this pattern instead of spreading props on root elements
|
|
196
|
+
*
|
|
197
|
+
* Note: For data-* attributes in tests, use type assertions:
|
|
198
|
+
* { 'data-testid': 'value' } as ElementSpecificProps<T>
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* interface MyComponentProps {
|
|
202
|
+
* divProps?: ElementSpecificProps<HTMLDivElement>;
|
|
203
|
+
* buttonProps?: ElementSpecificProps<HTMLButtonElement>;
|
|
204
|
+
* }
|
|
205
|
+
*/
|
|
206
|
+
export type ElementSpecificProps<T extends HTMLElement> = React.HTMLAttributes<T>;
|
|
207
|
+
/**
|
|
208
|
+
* Standard size variants used across components
|
|
209
|
+
*/
|
|
210
|
+
export type SizeVariant = 'small' | 'default' | 'large';
|
|
211
|
+
/**
|
|
212
|
+
* Standard color variants that map to theme colors
|
|
213
|
+
*/
|
|
214
|
+
export type ColorVariant = 'primary' | 'secondary' | 'accent' | 'error' | 'success' | 'warning';
|
|
215
|
+
//# sourceMappingURL=component-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"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"}
|