digital-rabbit-cl 2.1.2 → 2.2.0
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/components/{NavItem/NavItem.d.ts → NavDropdown/NavDropdown.d.ts} +7 -5
- package/dist/components/NavDropdown/NavDropdown.d.ts.map +1 -0
- package/dist/components/NavDropdown/index.d.ts +3 -0
- package/dist/components/NavDropdown/index.d.ts.map +1 -0
- package/dist/components/NavLink/NavLink.d.ts +25 -0
- package/dist/components/NavLink/NavLink.d.ts.map +1 -0
- package/dist/components/NavLink/index.d.ts +5 -0
- package/dist/components/NavLink/index.d.ts.map +1 -0
- package/dist/components/NavLink/useNavLinkStyles.d.ts +18 -0
- package/dist/components/NavLink/useNavLinkStyles.d.ts.map +1 -0
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +5 -5
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -1
- package/dist/components/ResponsiveNav/useResponsiveNavStyles.d.ts +3 -4
- package/dist/components/ResponsiveNav/useResponsiveNavStyles.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +1048 -1036
- package/dist/digital-rabbit-cl.umd.js +4 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/NavItem/NavItem.d.ts.map +0 -1
- package/dist/components/NavItem/index.d.ts +0 -3
- package/dist/components/NavItem/index.d.ts.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
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:relative;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:12.5%;position:relative;transform-origin:1px;transition:all .3s linear;width:100%}.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);position:relative}.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{flex-direction:column;font-size:2rem;min-height:100%;text-align:left;text-transform:uppercase;overflow-x:hidden}.ResponsiveNav-module__navHeader___Me8bB{height:3.5em;flex-shrink:0}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE .ResponsiveNav-module__navHeader___Me8bB{height:3em}.ResponsiveNav-module__navMobile___h795P>a{padding:.35em 2em;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>a{padding:.25em 1.5em}.ResponsiveNav-module__navMobile___h795P>a.active{background:var(--mobile-active-bg);color:var(--mobile-active-color)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.5em 1.4em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>button{margin:.35em 1em}.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:var(--desktop-hover-opacity)}.Popover-module__triggerWrapper___dZpf6{display:inline-block}.Popover-module__popup___JAvrb{max-height:60vh;min-width:120px;overflow:auto}.Popover-module__panelOverlay___1xDU5{top:0;right:0;bottom:0;left:0;pointer-events:none;position:fixed;z-index:1000}.Popover-module__panelOverlayVisible___BgtIQ{pointer-events:auto}.Popover-module__backdrop___e8qHL{top:0;right:0;bottom:0;left:0;position:absolute;transition:background-color .3s ease}.Popover-module__panel___eUJ2E{bottom:0;overflow-y:auto;padding:1rem;position:absolute;top:0;transition:transform .3s ease-in-out}.Popover-module__panelLeft___9nSLp{left:0;transform:translate(-100%)}.Popover-module__panelRight___OrQfl{right:0;transform:translate(100%)}.Popover-module__panelOpen___hhvV-{transform:translate(0)}.Popover-module__panelCloseButton___kALaN{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;height:1.5rem;justify-content:center;padding:0;position:absolute;right:1rem;top:1rem;width:1.5rem}.Popover-module__panelCloseButton___kALaN:hover{opacity:.7}.NavItem-module__trigger___og97w{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;font-family:inherit;font-size:inherit;font-weight:700;gap:.375rem;padding:0;text-decoration:none}.NavItem-module__trigger___og97w:hover,.NavItem-module__triggerOpen___7lIFg{opacity:var(--desktop-hover-opacity, .5)}.NavItem-module__chevron___awf4c{align-items:center;display:inline-flex;transition:transform .2s ease}.NavItem-module__chevronOpen___ZtUGj{transform:rotate(180deg)}.Modal-module__backdrop___GVUh4{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1em}.Modal-module__modal___aD7aP{padding:1em;position:relative;display:flex;flex-direction:column;gap:1em;max-height:90vh;box-shadow:0 10px 40px #0003;outline:none}.Modal-module__header___ILG9i{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.Modal-module__title___A5OeE{margin:0;font-size:1.5rem;font-weight:600;flex:1}.Modal-module__closeButton___3LpSf{background:none;border:none;cursor:pointer;padding:0;width:1.75em;height:1.75em;display:flex;align-items:center;justify-content:center;color:inherit;margin-left:auto;opacity:.6;transition:opacity .2s,transform .2s;flex-shrink:0}.Modal-module__closeButton___3LpSf svg{display:block;flex-shrink:0}.Modal-module__content___dWO-B{overflow-y:auto;flex:1}.Modal-module__actions___hY6zi{flex-shrink:0}@media (max-width: calc(var(--breakpoint-md) - 1px)){.Modal-module__backdrop___GVUh4{padding:.5em}.Modal-module__header___ILG9i,.Modal-module__content___dWO-B,.Modal-module__actions___hY6zi{padding:1rem}.Modal-module__title___A5OeE{font-size:1.25em}}.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)}})();
|
|
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:relative;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:12.5%;position:relative;transform-origin:1px;transition:all .3s linear;width:100%}.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);position:relative}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__navMobile___h795P{flex-direction:column;font-size:2rem;min-height:100%;text-align:left;text-transform:uppercase;overflow-x:hidden}.ResponsiveNav-module__navHeader___Me8bB{height:3.5em;flex-shrink:0}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE .ResponsiveNav-module__navHeader___Me8bB{height:3em}.ResponsiveNav-module__navMobile___h795P>a{padding:.35em 2em;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>a{padding:.25em 1.5em}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.5em 1.4em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>button{margin:.35em 1em}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.Popover-module__triggerWrapper___dZpf6{display:inline-block}.Popover-module__popup___JAvrb{max-height:60vh;min-width:120px;overflow:auto}.Popover-module__panelOverlay___1xDU5{top:0;right:0;bottom:0;left:0;pointer-events:none;position:fixed;z-index:1000}.Popover-module__panelOverlayVisible___BgtIQ{pointer-events:auto}.Popover-module__backdrop___e8qHL{top:0;right:0;bottom:0;left:0;position:absolute;transition:background-color .3s ease}.Popover-module__panel___eUJ2E{bottom:0;overflow-y:auto;padding:1rem;position:absolute;top:0;transition:transform .3s ease-in-out}.Popover-module__panelLeft___9nSLp{left:0;transform:translate(-100%)}.Popover-module__panelRight___OrQfl{right:0;transform:translate(100%)}.Popover-module__panelOpen___hhvV-{transform:translate(0)}.Popover-module__panelCloseButton___kALaN{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;height:1.5rem;justify-content:center;padding:0;position:absolute;right:1rem;top:1rem;width:1.5rem}.Popover-module__panelCloseButton___kALaN:hover{opacity:.7}.NavDropdown-module__trigger___1PQZp{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;font-family:inherit;font-size:inherit;gap:.375rem;padding:0}.NavDropdown-module__chevron___ZLAV7{align-items:center;display:inline-flex;transition:transform .2s ease}.NavDropdown-module__chevronOpen___9mgjr{transform:rotate(180deg)}.Modal-module__backdrop___GVUh4{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1em}.Modal-module__modal___aD7aP{padding:1em;position:relative;display:flex;flex-direction:column;gap:1em;max-height:90vh;box-shadow:0 10px 40px #0003;outline:none}.Modal-module__header___ILG9i{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.Modal-module__title___A5OeE{margin:0;font-size:1.5rem;font-weight:600;flex:1}.Modal-module__closeButton___3LpSf{background:none;border:none;cursor:pointer;padding:0;width:1.75em;height:1.75em;display:flex;align-items:center;justify-content:center;color:inherit;margin-left:auto;opacity:.6;transition:opacity .2s,transform .2s;flex-shrink:0}.Modal-module__closeButton___3LpSf svg{display:block;flex-shrink:0}.Modal-module__content___dWO-B{overflow-y:auto;flex:1}.Modal-module__actions___hY6zi{flex-shrink:0}@media (max-width: calc(var(--breakpoint-md) - 1px)){.Modal-module__backdrop___GVUh4{padding:.5em}.Modal-module__header___ILG9i,.Modal-module__content___dWO-B,.Modal-module__actions___hY6zi{padding:1rem}.Modal-module__title___A5OeE{font-size:1.25em}}.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
2
|
import { jsx as _, jsxs as W, Fragment as we } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import k, { createContext as dt, useContext as Yt, useState as ue, useLayoutEffect as Rr, useSyncExternalStore as Dr, useEffect as ce, useCallback as ke, useRef as Ee, useMemo as je } from "react";
|
|
4
4
|
import { createPortal as st } from "react-dom";
|
|
5
|
-
const Or = "Button-module__button___2ZuB7",
|
|
5
|
+
const Or = "Button-module__button___2ZuB7", Hr = "Button-module__sizeSmall___DRT8P", jr = "Button-module__sizeLarge___yeZSH", Le = {
|
|
6
6
|
button: Or,
|
|
7
|
-
sizeSmall:
|
|
8
|
-
sizeLarge:
|
|
9
|
-
},
|
|
7
|
+
sizeSmall: Hr,
|
|
8
|
+
sizeLarge: jr
|
|
9
|
+
}, Tr = ({
|
|
10
10
|
isActive: e,
|
|
11
11
|
disabled: r,
|
|
12
12
|
color: t,
|
|
@@ -15,13 +15,13 @@ const Or = "Button-module__button___2ZuB7", Dr = "Button-module__sizeSmall___DRT
|
|
|
15
15
|
outline: n,
|
|
16
16
|
theme: a
|
|
17
17
|
}) => {
|
|
18
|
-
const i = t || a.colors.primary,
|
|
19
|
-
let u,
|
|
20
|
-
n ? (u = "transparent",
|
|
18
|
+
const i = t || a.colors.primary, f = a.buttons.textColor;
|
|
19
|
+
let u, d, h;
|
|
20
|
+
n ? (u = "transparent", d = i, h = i, e && (u = o || i, d = o || i, h = s || f)) : (u = i, d = i, h = f, e && (u = o || i, d = o || i, h = s || f));
|
|
21
21
|
let m = 1;
|
|
22
22
|
return r ? m = 0.3 : e && !o && (m = 0.75), {
|
|
23
23
|
backgroundColor: u,
|
|
24
|
-
borderColor:
|
|
24
|
+
borderColor: d,
|
|
25
25
|
color: h,
|
|
26
26
|
opacity: m
|
|
27
27
|
};
|
|
@@ -39,7 +39,7 @@ function er(e, r) {
|
|
|
39
39
|
function Pe(e) {
|
|
40
40
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ze(e) {
|
|
43
43
|
const r = e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);
|
|
44
44
|
if (!r) {
|
|
45
45
|
const s = parseInt(e, 10), n = e.replace(/[0-9.]/g, "") || "px";
|
|
@@ -54,7 +54,7 @@ function Ee(e) {
|
|
|
54
54
|
unit: o
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const Ze = {
|
|
58
58
|
primary: "#000",
|
|
59
59
|
secondary: "#FFF",
|
|
60
60
|
accent: "#4381C1",
|
|
@@ -62,7 +62,7 @@ const Qe = {
|
|
|
62
62
|
success: "#008000",
|
|
63
63
|
warning: "#FFEB3B"
|
|
64
64
|
}, nt = {
|
|
65
|
-
colors:
|
|
65
|
+
colors: Ze,
|
|
66
66
|
fonts: {
|
|
67
67
|
color: "#000",
|
|
68
68
|
lineHeight: 1.5,
|
|
@@ -81,7 +81,7 @@ const Qe = {
|
|
|
81
81
|
textColor: "#FFF",
|
|
82
82
|
paddingHorizontal: 0.35,
|
|
83
83
|
primary: {
|
|
84
|
-
textColor:
|
|
84
|
+
textColor: Ze.secondary
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
inputs: {
|
|
@@ -111,14 +111,14 @@ const Qe = {
|
|
|
111
111
|
padding: "1rem"
|
|
112
112
|
},
|
|
113
113
|
modal: {
|
|
114
|
-
backgroundColor:
|
|
114
|
+
backgroundColor: Ze.secondary,
|
|
115
115
|
backdropColor: "rgba(0, 0, 0, 0.5)",
|
|
116
116
|
boxShadow: "0 10px 40px rgba(0, 0, 0, 0.2)"
|
|
117
117
|
}
|
|
118
|
-
}, tr = dt(nt),
|
|
118
|
+
}, tr = dt(nt), Fn = ({ theme: e, children: r }) => {
|
|
119
119
|
const t = e ? er(nt, e) : nt;
|
|
120
120
|
return /* @__PURE__ */ _(tr.Provider, { value: t, children: r });
|
|
121
|
-
}, j = () => Yt(tr),
|
|
121
|
+
}, j = () => Yt(tr), Ir = ({
|
|
122
122
|
// Core styling
|
|
123
123
|
color: e,
|
|
124
124
|
hoverColor: r,
|
|
@@ -130,14 +130,14 @@ const Qe = {
|
|
|
130
130
|
type: a = "button",
|
|
131
131
|
// Standard React props
|
|
132
132
|
className: i,
|
|
133
|
-
style:
|
|
133
|
+
style: f,
|
|
134
134
|
buttonProps: u = {},
|
|
135
|
-
onClick:
|
|
135
|
+
onClick: d,
|
|
136
136
|
children: h
|
|
137
137
|
}) => {
|
|
138
|
-
const m = j(), [
|
|
139
|
-
...
|
|
140
|
-
isActive:
|
|
138
|
+
const m = j(), [F, w] = ue(!1), C = {
|
|
139
|
+
...Tr({
|
|
140
|
+
isActive: F,
|
|
141
141
|
disabled: o,
|
|
142
142
|
color: e,
|
|
143
143
|
hoverColor: r,
|
|
@@ -150,12 +150,12 @@ const Qe = {
|
|
|
150
150
|
borderRadius: m.border.radius,
|
|
151
151
|
"--button-padding-small": `calc(${m.fonts.rhythm} * ${m.sizes.small.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,
|
|
152
152
|
"--button-padding-large": `calc(${m.fonts.rhythm} * ${m.sizes.large.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,
|
|
153
|
-
...
|
|
153
|
+
...f
|
|
154
154
|
// Top-level style overrides
|
|
155
155
|
}, $ = [
|
|
156
|
-
|
|
157
|
-
s === "small" ?
|
|
158
|
-
n ?
|
|
156
|
+
Le.button,
|
|
157
|
+
s === "small" ? Le.sizeSmall : Le.sizeLarge,
|
|
158
|
+
n ? Le.outline : "",
|
|
159
159
|
i
|
|
160
160
|
].filter(Boolean).join(" ");
|
|
161
161
|
return /* @__PURE__ */ _(
|
|
@@ -164,42 +164,42 @@ const Qe = {
|
|
|
164
164
|
...u,
|
|
165
165
|
className: $,
|
|
166
166
|
disabled: o,
|
|
167
|
-
onClick:
|
|
167
|
+
onClick: d,
|
|
168
168
|
onMouseEnter: () => w(!0),
|
|
169
169
|
onMouseLeave: () => w(!1),
|
|
170
170
|
type: a,
|
|
171
|
-
style:
|
|
171
|
+
style: C,
|
|
172
172
|
children: h
|
|
173
173
|
}
|
|
174
174
|
);
|
|
175
175
|
};
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
if (!
|
|
176
|
+
var Nt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Wr = new Uint8Array(16);
|
|
177
|
+
function Ur() {
|
|
178
|
+
if (!Nt)
|
|
179
179
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
180
|
-
return
|
|
180
|
+
return Nt(Wr);
|
|
181
181
|
}
|
|
182
182
|
var rr = [];
|
|
183
|
-
for (var
|
|
184
|
-
rr[
|
|
185
|
-
function
|
|
183
|
+
for (var Be = 0; Be < 256; ++Be)
|
|
184
|
+
rr[Be] = (Be + 256).toString(16).substr(1);
|
|
185
|
+
function qr(e, r) {
|
|
186
186
|
var t = 0, o = rr;
|
|
187
187
|
return [o[e[t++]], o[e[t++]], o[e[t++]], o[e[t++]], "-", o[e[t++]], o[e[t++]], "-", o[e[t++]], o[e[t++]], "-", o[e[t++]], o[e[t++]], "-", o[e[t++]], o[e[t++]], o[e[t++]], o[e[t++]], o[e[t++]], o[e[t++]]].join("");
|
|
188
188
|
}
|
|
189
189
|
function or(e, r, t) {
|
|
190
190
|
var o = r && t || 0;
|
|
191
191
|
typeof e == "string" && (r = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
192
|
-
var s = e.random || (e.rng ||
|
|
192
|
+
var s = e.random || (e.rng || Ur)();
|
|
193
193
|
if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, r)
|
|
194
194
|
for (var n = 0; n < 16; ++n)
|
|
195
195
|
r[o + n] = s[n];
|
|
196
|
-
return r ||
|
|
196
|
+
return r || qr(s);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
199
|
-
container:
|
|
200
|
-
svg:
|
|
201
|
-
label:
|
|
202
|
-
},
|
|
198
|
+
const Gr = "Checkbox-module__container___aV9qz", Zr = "Checkbox-module__svg___kkluC", Qr = "Checkbox-module__label___cwRtI", Qe = {
|
|
199
|
+
container: Gr,
|
|
200
|
+
svg: Zr,
|
|
201
|
+
label: Qr
|
|
202
|
+
}, Kr = ({
|
|
203
203
|
color: e = "#000",
|
|
204
204
|
checkmarkColor: r,
|
|
205
205
|
disabled: t = !1,
|
|
@@ -212,10 +212,10 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
212
212
|
cursor: t ? "default" : "pointer",
|
|
213
213
|
opacity: t ? 0.3 : 1
|
|
214
214
|
};
|
|
215
|
-
},
|
|
216
|
-
label:
|
|
217
|
-
disabled:
|
|
218
|
-
},
|
|
215
|
+
}, Jr = "FormLabel-module__label___0M-fo", Xr = "FormLabel-module__disabled___ktIFp", At = {
|
|
216
|
+
label: Jr,
|
|
217
|
+
disabled: Xr
|
|
218
|
+
}, Yr = ({
|
|
219
219
|
color: e = "#000",
|
|
220
220
|
disabled: r = !1,
|
|
221
221
|
fontSize: t = ".85em"
|
|
@@ -240,20 +240,20 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
240
240
|
// Element-specific props
|
|
241
241
|
labelProps: i
|
|
242
242
|
}) => {
|
|
243
|
-
const
|
|
244
|
-
color:
|
|
243
|
+
const f = j(), u = f.colors.error, d = t ? u : e || f.colors.primary, h = Yr({
|
|
244
|
+
color: d,
|
|
245
245
|
disabled: r,
|
|
246
246
|
fontSize: ".85em"
|
|
247
247
|
}), m = {
|
|
248
|
-
"--form-label-padding-bottom": `calc(${
|
|
248
|
+
"--form-label-padding-bottom": `calc(${f.fonts.rhythm} * 0.17)`,
|
|
249
249
|
color: h.color,
|
|
250
250
|
fontSize: h.fontSize,
|
|
251
251
|
opacity: h.opacity,
|
|
252
252
|
cursor: h.cursor,
|
|
253
253
|
...a
|
|
254
254
|
// Top level style prop overrides
|
|
255
|
-
},
|
|
256
|
-
return /* @__PURE__ */ _("label", { ...i, className:
|
|
255
|
+
}, F = [At.label, r ? At.disabled : "", n].filter(Boolean).join(" ");
|
|
256
|
+
return /* @__PURE__ */ _("label", { ...i, className: F, htmlFor: o, style: m, children: s });
|
|
257
257
|
}, at = ({
|
|
258
258
|
// Color props
|
|
259
259
|
color: e,
|
|
@@ -266,47 +266,47 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
266
266
|
// Form props
|
|
267
267
|
name: a,
|
|
268
268
|
id: i,
|
|
269
|
-
onChange:
|
|
269
|
+
onChange: f,
|
|
270
270
|
label: u,
|
|
271
|
-
labelStyle:
|
|
271
|
+
labelStyle: d,
|
|
272
272
|
// Style overrides
|
|
273
273
|
className: h,
|
|
274
274
|
style: m,
|
|
275
275
|
// Element-specific props
|
|
276
|
-
divProps:
|
|
276
|
+
divProps: F
|
|
277
277
|
}) => {
|
|
278
|
-
const w = j(),
|
|
278
|
+
const w = j(), p = i || or(), C = w.colors.error, $ = n ? C : e || w.colors.primary, v = Kr({
|
|
279
279
|
color: $,
|
|
280
280
|
checkmarkColor: r,
|
|
281
281
|
disabled: s,
|
|
282
282
|
inverted: o
|
|
283
|
-
}),
|
|
284
|
-
s ||
|
|
285
|
-
},
|
|
283
|
+
}), E = (A) => {
|
|
284
|
+
s || f(A);
|
|
285
|
+
}, z = {
|
|
286
286
|
cursor: v.cursor,
|
|
287
287
|
fontSize: w.fonts.size,
|
|
288
288
|
opacity: v.opacity,
|
|
289
289
|
...m
|
|
290
290
|
// Top-level style prop overrides
|
|
291
|
-
},
|
|
291
|
+
}, N = {
|
|
292
292
|
width: "1em"
|
|
293
|
-
},
|
|
293
|
+
}, O = {
|
|
294
294
|
fill: o && t ? v.checkboxColor : "transparent",
|
|
295
295
|
strokeWidth: "25",
|
|
296
296
|
stroke: v.checkboxColor
|
|
297
|
-
},
|
|
297
|
+
}, B = {
|
|
298
298
|
stroke: v.checkmarkColor,
|
|
299
299
|
strokeWidth: "15",
|
|
300
300
|
fill: "transparent"
|
|
301
|
-
}, Q = [
|
|
302
|
-
return /* @__PURE__ */ W("div", { ...
|
|
301
|
+
}, Q = [Qe.container, h].filter(Boolean).join(" ");
|
|
302
|
+
return /* @__PURE__ */ W("div", { ...F, className: Q, style: z, children: [
|
|
303
303
|
/* @__PURE__ */ _(
|
|
304
304
|
"input",
|
|
305
305
|
{
|
|
306
|
-
id:
|
|
306
|
+
id: p,
|
|
307
307
|
checked: t,
|
|
308
308
|
disabled: s,
|
|
309
|
-
onChange: (
|
|
309
|
+
onChange: (A) => E({ target: { checked: A.target.checked, name: a, type: "checkbox" } }),
|
|
310
310
|
name: a,
|
|
311
311
|
style: { display: "none" },
|
|
312
312
|
type: "checkbox"
|
|
@@ -317,21 +317,21 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
317
317
|
{
|
|
318
318
|
xmlns: "http://www.w3.org/2000/svg",
|
|
319
319
|
viewBox: "0 0 100 100",
|
|
320
|
-
onClick: () =>
|
|
321
|
-
style:
|
|
322
|
-
className:
|
|
320
|
+
onClick: () => E({ target: { checked: !t, name: a, type: "checkbox" } }),
|
|
321
|
+
style: N,
|
|
322
|
+
className: Qe.svg,
|
|
323
323
|
children: [
|
|
324
|
-
/* @__PURE__ */ _("rect", { x: "0", y: "0", height: "100", width: "100", style:
|
|
325
|
-
t && /* @__PURE__ */ _("path", { d: "M 25 45 L 45 65 L 75 30", style:
|
|
324
|
+
/* @__PURE__ */ _("rect", { x: "0", y: "0", height: "100", width: "100", style: O }),
|
|
325
|
+
t && /* @__PURE__ */ _("path", { d: "M 25 45 L 45 65 L 75 30", style: B })
|
|
326
326
|
]
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
329
|
u && /* @__PURE__ */ _(
|
|
330
330
|
ft,
|
|
331
331
|
{
|
|
332
|
-
htmlFor:
|
|
333
|
-
className:
|
|
334
|
-
style: { paddingBottom: 0, ...
|
|
332
|
+
htmlFor: p,
|
|
333
|
+
className: Qe.label,
|
|
334
|
+
style: { paddingBottom: 0, ...d },
|
|
335
335
|
color: v.checkboxColor,
|
|
336
336
|
disabled: s,
|
|
337
337
|
error: n,
|
|
@@ -339,7 +339,7 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
339
339
|
}
|
|
340
340
|
)
|
|
341
341
|
] });
|
|
342
|
-
},
|
|
342
|
+
}, Vn = () => {
|
|
343
343
|
const e = j();
|
|
344
344
|
return Rr(() => {
|
|
345
345
|
const r = document.documentElement;
|
|
@@ -348,7 +348,7 @@ const qr = "Checkbox-module__container___aV9qz", Gr = "Checkbox-module__svg___kk
|
|
|
348
348
|
};
|
|
349
349
|
var $e = (e) => e.type === "checkbox", he = (e) => e instanceof Date, Y = (e) => e == null;
|
|
350
350
|
const sr = (e) => typeof e == "object";
|
|
351
|
-
var q = (e) => !Y(e) && !Array.isArray(e) && sr(e) && !he(e), nr = (e) => q(e) && e.target ? $e(e.target) ? e.target.checked : e.target.value : e,
|
|
351
|
+
var q = (e) => !Y(e) && !Array.isArray(e) && sr(e) && !he(e), nr = (e) => q(e) && e.target ? $e(e.target) ? e.target.checked : e.target.value : e, eo = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, ar = (e, r) => e.has(eo(r)), to = (e) => {
|
|
352
352
|
const r = e.constructor && e.constructor.prototype;
|
|
353
353
|
return q(r) && r.hasOwnProperty("isPrototypeOf");
|
|
354
354
|
}, mt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -358,7 +358,7 @@ function Z(e) {
|
|
|
358
358
|
if (e instanceof Date)
|
|
359
359
|
r = new Date(e);
|
|
360
360
|
else if (!(mt && (e instanceof Blob || o)) && (t || q(e)))
|
|
361
|
-
if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !
|
|
361
|
+
if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !to(e))
|
|
362
362
|
r = e;
|
|
363
363
|
else
|
|
364
364
|
for (const s in e)
|
|
@@ -367,24 +367,24 @@ function Z(e) {
|
|
|
367
367
|
return e;
|
|
368
368
|
return r;
|
|
369
369
|
}
|
|
370
|
-
var
|
|
370
|
+
var Te = (e) => /^\w*$/.test(e), I = (e) => e === void 0, yt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ht = (e) => yt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), S = (e, r, t) => {
|
|
371
371
|
if (!r || !q(e))
|
|
372
372
|
return t;
|
|
373
|
-
const o = (
|
|
373
|
+
const o = (Te(r) ? [r] : ht(r)).reduce((s, n) => Y(s) ? s : s[n], e);
|
|
374
374
|
return I(o) || o === e ? I(e[r]) ? t : e[r] : o;
|
|
375
|
-
}, te = (e) => typeof e == "boolean",
|
|
375
|
+
}, te = (e) => typeof e == "boolean", D = (e, r, t) => {
|
|
376
376
|
let o = -1;
|
|
377
|
-
const s =
|
|
377
|
+
const s = Te(r) ? [r] : ht(r), n = s.length, a = n - 1;
|
|
378
378
|
for (; ++o < n; ) {
|
|
379
379
|
const i = s[o];
|
|
380
|
-
let
|
|
380
|
+
let f = t;
|
|
381
381
|
if (o !== a) {
|
|
382
382
|
const u = e[i];
|
|
383
|
-
|
|
383
|
+
f = q(u) || Array.isArray(u) ? u : isNaN(+s[o + 1]) ? {} : [];
|
|
384
384
|
}
|
|
385
385
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
386
386
|
return;
|
|
387
|
-
e[i] =
|
|
387
|
+
e[i] = f, e = e[i];
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
const De = {
|
|
@@ -397,7 +397,7 @@ const De = {
|
|
|
397
397
|
onSubmit: "onSubmit",
|
|
398
398
|
onTouched: "onTouched",
|
|
399
399
|
all: "all"
|
|
400
|
-
},
|
|
400
|
+
}, de = {
|
|
401
401
|
max: "max",
|
|
402
402
|
min: "min",
|
|
403
403
|
maxLength: "maxLength",
|
|
@@ -405,9 +405,9 @@ const De = {
|
|
|
405
405
|
pattern: "pattern",
|
|
406
406
|
required: "required",
|
|
407
407
|
validate: "validate"
|
|
408
|
-
}, ir =
|
|
408
|
+
}, ir = k.createContext(null);
|
|
409
409
|
ir.displayName = "HookFormContext";
|
|
410
|
-
const
|
|
410
|
+
const pt = () => k.useContext(ir);
|
|
411
411
|
var lr = (e, r, t, o = !0) => {
|
|
412
412
|
const s = {
|
|
413
413
|
defaultValues: r._defaultValues
|
|
@@ -421,9 +421,9 @@ var lr = (e, r, t, o = !0) => {
|
|
|
421
421
|
});
|
|
422
422
|
return s;
|
|
423
423
|
};
|
|
424
|
-
const _t = typeof window < "u" ?
|
|
425
|
-
function
|
|
426
|
-
const r =
|
|
424
|
+
const _t = typeof window < "u" ? k.useLayoutEffect : k.useEffect;
|
|
425
|
+
function ro(e) {
|
|
426
|
+
const r = pt(), { control: t = r.control, disabled: o, name: s, exact: n } = e || {}, [a, i] = k.useState(t._formState), f = k.useRef({
|
|
427
427
|
isDirty: !1,
|
|
428
428
|
isLoading: !1,
|
|
429
429
|
dirtyFields: !1,
|
|
@@ -435,7 +435,7 @@ function to(e) {
|
|
|
435
435
|
});
|
|
436
436
|
return _t(() => t._subscribe({
|
|
437
437
|
name: s,
|
|
438
|
-
formState:
|
|
438
|
+
formState: f.current,
|
|
439
439
|
exact: n,
|
|
440
440
|
callback: (u) => {
|
|
441
441
|
!o && i({
|
|
@@ -443,9 +443,9 @@ function to(e) {
|
|
|
443
443
|
...u
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
}), [s, o, n]),
|
|
447
|
-
|
|
448
|
-
}, [t]),
|
|
446
|
+
}), [s, o, n]), k.useEffect(() => {
|
|
447
|
+
f.current.isValid && t._setValid(!0);
|
|
448
|
+
}, [t]), k.useMemo(() => lr(a, t, f.current, !1), [a, t]);
|
|
449
449
|
}
|
|
450
450
|
var re = (e) => typeof e == "string", it = (e, r, t, o, s) => re(e) ? (o && r.watch.add(e), S(t, e, s)) : Array.isArray(e) ? e.map((n) => (o && r.watch.add(n), S(t, n))) : (o && (r.watchAll = !0), t), lt = (e) => Y(e) || !sr(e);
|
|
451
451
|
function ne(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
@@ -471,143 +471,143 @@ function ne(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
471
471
|
}
|
|
472
472
|
return !0;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
const r =
|
|
474
|
+
function oo(e) {
|
|
475
|
+
const r = pt(), { control: t = r.control, name: o, defaultValue: s, disabled: n, exact: a, compute: i } = e || {}, f = k.useRef(s), u = k.useRef(i), d = k.useRef(void 0), h = k.useRef(t), m = k.useRef(o);
|
|
476
476
|
u.current = i;
|
|
477
|
-
const [
|
|
478
|
-
const
|
|
479
|
-
return u.current ? u.current(
|
|
480
|
-
}),
|
|
481
|
-
const
|
|
482
|
-
return u.current ? u.current(
|
|
483
|
-
}, [t._formValues, t._names, o]),
|
|
477
|
+
const [F, w] = k.useState(() => {
|
|
478
|
+
const z = t._getWatch(o, f.current);
|
|
479
|
+
return u.current ? u.current(z) : z;
|
|
480
|
+
}), p = k.useCallback((z) => {
|
|
481
|
+
const N = it(o, t._names, z || t._formValues, !1, f.current);
|
|
482
|
+
return u.current ? u.current(N) : N;
|
|
483
|
+
}, [t._formValues, t._names, o]), C = k.useCallback((z) => {
|
|
484
484
|
if (!n) {
|
|
485
|
-
const
|
|
485
|
+
const N = it(o, t._names, z || t._formValues, !1, f.current);
|
|
486
486
|
if (u.current) {
|
|
487
|
-
const
|
|
488
|
-
ne(
|
|
487
|
+
const O = u.current(N);
|
|
488
|
+
ne(O, d.current) || (w(O), d.current = O);
|
|
489
489
|
} else
|
|
490
|
-
w(
|
|
490
|
+
w(N);
|
|
491
491
|
}
|
|
492
492
|
}, [t._formValues, t._names, n, o]);
|
|
493
|
-
_t(() => ((h.current !== t || !ne(m.current, o)) && (h.current = t, m.current = o,
|
|
493
|
+
_t(() => ((h.current !== t || !ne(m.current, o)) && (h.current = t, m.current = o, C()), t._subscribe({
|
|
494
494
|
name: o,
|
|
495
495
|
formState: {
|
|
496
496
|
values: !0
|
|
497
497
|
},
|
|
498
498
|
exact: a,
|
|
499
|
-
callback: (
|
|
500
|
-
|
|
499
|
+
callback: (z) => {
|
|
500
|
+
C(z.values);
|
|
501
501
|
}
|
|
502
|
-
})), [t, a, o,
|
|
503
|
-
const $ = h.current !== t, v = m.current,
|
|
502
|
+
})), [t, a, o, C]), k.useEffect(() => t._removeUnmounted());
|
|
503
|
+
const $ = h.current !== t, v = m.current, E = k.useMemo(() => {
|
|
504
504
|
if (n)
|
|
505
505
|
return null;
|
|
506
|
-
const
|
|
507
|
-
return $ ||
|
|
508
|
-
}, [n, $, o, v,
|
|
509
|
-
return
|
|
506
|
+
const z = !$ && !ne(v, o);
|
|
507
|
+
return $ || z ? p() : null;
|
|
508
|
+
}, [n, $, o, v, p]);
|
|
509
|
+
return E !== null ? E : F;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
const r =
|
|
511
|
+
function so(e) {
|
|
512
|
+
const r = pt(), { name: t, disabled: o, control: s = r.control, shouldUnregister: n, defaultValue: a } = e, i = ar(s._names.array, t), f = k.useMemo(() => S(s._formValues, t, S(s._defaultValues, t, a)), [s, t, a]), u = oo({
|
|
513
513
|
control: s,
|
|
514
514
|
name: t,
|
|
515
|
-
defaultValue:
|
|
515
|
+
defaultValue: f,
|
|
516
516
|
exact: !0
|
|
517
|
-
}),
|
|
517
|
+
}), d = ro({
|
|
518
518
|
control: s,
|
|
519
519
|
name: t,
|
|
520
520
|
exact: !0
|
|
521
|
-
}), h =
|
|
521
|
+
}), h = k.useRef(e), m = k.useRef(void 0), F = k.useRef(s.register(t, {
|
|
522
522
|
...e.rules,
|
|
523
523
|
value: u,
|
|
524
524
|
...te(e.disabled) ? { disabled: e.disabled } : {}
|
|
525
525
|
}));
|
|
526
526
|
h.current = e;
|
|
527
|
-
const w =
|
|
527
|
+
const w = k.useMemo(() => Object.defineProperties({}, {
|
|
528
528
|
invalid: {
|
|
529
529
|
enumerable: !0,
|
|
530
|
-
get: () => !!S(
|
|
530
|
+
get: () => !!S(d.errors, t)
|
|
531
531
|
},
|
|
532
532
|
isDirty: {
|
|
533
533
|
enumerable: !0,
|
|
534
|
-
get: () => !!S(
|
|
534
|
+
get: () => !!S(d.dirtyFields, t)
|
|
535
535
|
},
|
|
536
536
|
isTouched: {
|
|
537
537
|
enumerable: !0,
|
|
538
|
-
get: () => !!S(
|
|
538
|
+
get: () => !!S(d.touchedFields, t)
|
|
539
539
|
},
|
|
540
540
|
isValidating: {
|
|
541
541
|
enumerable: !0,
|
|
542
|
-
get: () => !!S(
|
|
542
|
+
get: () => !!S(d.validatingFields, t)
|
|
543
543
|
},
|
|
544
544
|
error: {
|
|
545
545
|
enumerable: !0,
|
|
546
|
-
get: () => S(
|
|
546
|
+
get: () => S(d.errors, t)
|
|
547
547
|
}
|
|
548
|
-
}), [
|
|
548
|
+
}), [d, t]), p = k.useCallback((E) => F.current.onChange({
|
|
549
549
|
target: {
|
|
550
|
-
value: nr(
|
|
550
|
+
value: nr(E),
|
|
551
551
|
name: t
|
|
552
552
|
},
|
|
553
553
|
type: De.CHANGE
|
|
554
|
-
}), [t]),
|
|
554
|
+
}), [t]), C = k.useCallback(() => F.current.onBlur({
|
|
555
555
|
target: {
|
|
556
556
|
value: S(s._formValues, t),
|
|
557
557
|
name: t
|
|
558
558
|
},
|
|
559
559
|
type: De.BLUR
|
|
560
|
-
}), [t, s._formValues]), $ =
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
focus: () =>
|
|
564
|
-
select: () =>
|
|
565
|
-
setCustomValidity: (
|
|
566
|
-
reportValidity: () =>
|
|
560
|
+
}), [t, s._formValues]), $ = k.useCallback((E) => {
|
|
561
|
+
const z = S(s._fields, t);
|
|
562
|
+
z && E && (z._f.ref = {
|
|
563
|
+
focus: () => E.focus && E.focus(),
|
|
564
|
+
select: () => E.select && E.select(),
|
|
565
|
+
setCustomValidity: (N) => E.setCustomValidity(N),
|
|
566
|
+
reportValidity: () => E.reportValidity()
|
|
567
567
|
});
|
|
568
|
-
}, [s._fields, t]), v =
|
|
568
|
+
}, [s._fields, t]), v = k.useMemo(() => ({
|
|
569
569
|
name: t,
|
|
570
570
|
value: u,
|
|
571
|
-
...te(o) ||
|
|
572
|
-
onChange:
|
|
573
|
-
onBlur:
|
|
571
|
+
...te(o) || d.disabled ? { disabled: d.disabled || o } : {},
|
|
572
|
+
onChange: p,
|
|
573
|
+
onBlur: C,
|
|
574
574
|
ref: $
|
|
575
|
-
}), [t, o,
|
|
576
|
-
return
|
|
577
|
-
const
|
|
578
|
-
|
|
575
|
+
}), [t, o, d.disabled, p, C, $, u]);
|
|
576
|
+
return k.useEffect(() => {
|
|
577
|
+
const E = s._options.shouldUnregister || n, z = m.current;
|
|
578
|
+
z && z !== t && !i && s.unregister(z), s.register(t, {
|
|
579
579
|
...h.current.rules,
|
|
580
580
|
...te(h.current.disabled) ? { disabled: h.current.disabled } : {}
|
|
581
581
|
});
|
|
582
|
-
const
|
|
583
|
-
const Q = S(s._fields,
|
|
584
|
-
Q && Q._f && (Q._f.mount =
|
|
582
|
+
const N = (O, B) => {
|
|
583
|
+
const Q = S(s._fields, O);
|
|
584
|
+
Q && Q._f && (Q._f.mount = B);
|
|
585
585
|
};
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
|
|
586
|
+
if (N(t, !0), E) {
|
|
587
|
+
const O = Z(S(s._options.defaultValues, t, h.current.defaultValue));
|
|
588
|
+
D(s._defaultValues, t, O), I(S(s._formValues, t)) && D(s._formValues, t, O);
|
|
589
589
|
}
|
|
590
590
|
return !i && s.register(t), m.current = t, () => {
|
|
591
|
-
(i ?
|
|
591
|
+
(i ? E && !s._state.action : E) ? s.unregister(t) : N(t, !1);
|
|
592
592
|
};
|
|
593
|
-
}, [t, s, i, n]),
|
|
593
|
+
}, [t, s, i, n]), k.useEffect(() => {
|
|
594
594
|
s._setDisabledField({
|
|
595
595
|
disabled: o,
|
|
596
596
|
name: t
|
|
597
597
|
});
|
|
598
|
-
}, [o, t, s]),
|
|
598
|
+
}, [o, t, s]), k.useMemo(() => ({
|
|
599
599
|
field: v,
|
|
600
|
-
formState:
|
|
600
|
+
formState: d,
|
|
601
601
|
fieldState: w
|
|
602
|
-
}), [v,
|
|
602
|
+
}), [v, d, w]);
|
|
603
603
|
}
|
|
604
|
-
var
|
|
604
|
+
var gt = (e, r, t, o, s) => r ? {
|
|
605
605
|
...t[e],
|
|
606
606
|
types: {
|
|
607
607
|
...t[e] && t[e].types ? t[e].types : {},
|
|
608
608
|
[o]: s || !0
|
|
609
609
|
}
|
|
610
|
-
} : {}, Fe = (e) => Array.isArray(e) ? e : [e],
|
|
610
|
+
} : {}, Fe = (e) => Array.isArray(e) ? e : [e], Lt = () => {
|
|
611
611
|
let e = [];
|
|
612
612
|
return {
|
|
613
613
|
get observers() {
|
|
@@ -639,37 +639,37 @@ function cr(e, r) {
|
|
|
639
639
|
}
|
|
640
640
|
return t;
|
|
641
641
|
}
|
|
642
|
-
var
|
|
642
|
+
var X = (e) => q(e) && !Object.keys(e).length, vt = (e) => e.type === "file", ae = (e) => typeof e == "function", Oe = (e) => {
|
|
643
643
|
if (!mt)
|
|
644
644
|
return !1;
|
|
645
645
|
const r = e ? e.ownerDocument : 0;
|
|
646
646
|
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
647
|
-
}, ur = (e) => e.type === "select-multiple", bt = (e) => e.type === "radio",
|
|
648
|
-
function
|
|
647
|
+
}, ur = (e) => e.type === "select-multiple", bt = (e) => e.type === "radio", no = (e) => bt(e) || $e(e), Ke = (e) => Oe(e) && e.isConnected;
|
|
648
|
+
function ao(e, r) {
|
|
649
649
|
const t = r.slice(0, -1).length;
|
|
650
650
|
let o = 0;
|
|
651
651
|
for (; o < t; )
|
|
652
652
|
e = I(e) ? o++ : e[r[o++]];
|
|
653
653
|
return e;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function io(e) {
|
|
656
656
|
for (const r in e)
|
|
657
657
|
if (e.hasOwnProperty(r) && !I(e[r]))
|
|
658
658
|
return !1;
|
|
659
659
|
return !0;
|
|
660
660
|
}
|
|
661
661
|
function U(e, r) {
|
|
662
|
-
const t = Array.isArray(r) ? r :
|
|
663
|
-
return o && delete o[n], s !== 0 && (q(o) &&
|
|
662
|
+
const t = Array.isArray(r) ? r : Te(r) ? [r] : ht(r), o = t.length === 1 ? e : ao(e, t), s = t.length - 1, n = t[s];
|
|
663
|
+
return o && delete o[n], s !== 0 && (q(o) && X(o) || Array.isArray(o) && io(o)) && U(e, t.slice(0, -1)), e;
|
|
664
664
|
}
|
|
665
|
-
var
|
|
665
|
+
var lo = (e) => {
|
|
666
666
|
for (const r in e)
|
|
667
667
|
if (ae(e[r]))
|
|
668
668
|
return !0;
|
|
669
669
|
return !1;
|
|
670
670
|
};
|
|
671
671
|
function dr(e) {
|
|
672
|
-
return Array.isArray(e) || q(e) && !
|
|
672
|
+
return Array.isArray(e) || q(e) && !lo(e);
|
|
673
673
|
}
|
|
674
674
|
function ct(e, r = {}) {
|
|
675
675
|
for (const t in e)
|
|
@@ -685,7 +685,7 @@ function be(e, r, t) {
|
|
|
685
685
|
const Pt = {
|
|
686
686
|
value: !1,
|
|
687
687
|
isValid: !1
|
|
688
|
-
},
|
|
688
|
+
}, Bt = { value: !0, isValid: !0 };
|
|
689
689
|
var fr = (e) => {
|
|
690
690
|
if (Array.isArray(e)) {
|
|
691
691
|
if (e.length > 1) {
|
|
@@ -694,28 +694,28 @@ var fr = (e) => {
|
|
|
694
694
|
}
|
|
695
695
|
return e[0].checked && !e[0].disabled ? (
|
|
696
696
|
// @ts-expect-error expected to work in the browser
|
|
697
|
-
e[0].attributes && !I(e[0].attributes.value) ? I(e[0].value) || e[0].value === "" ?
|
|
697
|
+
e[0].attributes && !I(e[0].attributes.value) ? I(e[0].value) || e[0].value === "" ? Bt : { value: e[0].value, isValid: !0 } : Bt
|
|
698
698
|
) : Pt;
|
|
699
699
|
}
|
|
700
700
|
return Pt;
|
|
701
701
|
}, mr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: o }) => I(e) ? e : r ? e === "" ? NaN : e && +e : t && re(e) ? new Date(e) : o ? o(e) : e;
|
|
702
|
-
const
|
|
702
|
+
const Mt = {
|
|
703
703
|
isValid: !1,
|
|
704
704
|
value: null
|
|
705
705
|
};
|
|
706
706
|
var yr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
707
707
|
isValid: !0,
|
|
708
708
|
value: t.value
|
|
709
|
-
} : r,
|
|
710
|
-
function
|
|
709
|
+
} : r, Mt) : Mt;
|
|
710
|
+
function Rt(e) {
|
|
711
711
|
const r = e.ref;
|
|
712
712
|
return vt(r) ? r.files : bt(r) ? yr(e.refs).value : ur(r) ? [...r.selectedOptions].map(({ value: t }) => t) : $e(r) ? fr(e.refs).value : mr(I(r.value) ? e.ref.value : r.value, e);
|
|
713
713
|
}
|
|
714
|
-
var
|
|
714
|
+
var co = (e, r, t, o) => {
|
|
715
715
|
const s = {};
|
|
716
716
|
for (const n of e) {
|
|
717
717
|
const a = S(r, n);
|
|
718
|
-
a &&
|
|
718
|
+
a && D(s, n, a._f);
|
|
719
719
|
}
|
|
720
720
|
return {
|
|
721
721
|
criteriaMode: t,
|
|
@@ -723,15 +723,15 @@ var lo = (e, r, t, o) => {
|
|
|
723
723
|
fields: s,
|
|
724
724
|
shouldUseNativeValidation: o
|
|
725
725
|
};
|
|
726
|
-
},
|
|
726
|
+
}, He = (e) => e instanceof RegExp, xe = (e) => I(e) ? e : He(e) ? e.source : q(e) ? He(e.value) ? e.value.source : e.value : e, Dt = (e) => ({
|
|
727
727
|
isOnSubmit: !e || e === se.onSubmit,
|
|
728
728
|
isOnBlur: e === se.onBlur,
|
|
729
729
|
isOnChange: e === se.onChange,
|
|
730
730
|
isOnAll: e === se.all,
|
|
731
731
|
isOnTouch: e === se.onTouched
|
|
732
732
|
});
|
|
733
|
-
const
|
|
734
|
-
var
|
|
733
|
+
const Ot = "AsyncFunction";
|
|
734
|
+
var uo = (e) => !!e && !!e.validate && !!(ae(e.validate) && e.validate.constructor.name === Ot || q(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Ot)), fo = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ht = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((o) => e.startsWith(o) && /^\.\w+/.test(e.slice(o.length))));
|
|
735
735
|
const Ve = (e, r, t, o) => {
|
|
736
736
|
for (const s of t || Object.keys(e)) {
|
|
737
737
|
const n = S(e, s);
|
|
@@ -751,7 +751,7 @@ const Ve = (e, r, t, o) => {
|
|
|
751
751
|
};
|
|
752
752
|
function jt(e, r, t) {
|
|
753
753
|
const o = S(e, t);
|
|
754
|
-
if (o ||
|
|
754
|
+
if (o || Te(t))
|
|
755
755
|
return {
|
|
756
756
|
error: o,
|
|
757
757
|
name: t
|
|
@@ -777,13 +777,13 @@ function jt(e, r, t) {
|
|
|
777
777
|
name: t
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
var
|
|
780
|
+
var mo = (e, r, t, o) => {
|
|
781
781
|
t(e);
|
|
782
782
|
const { name: s, ...n } = e;
|
|
783
|
-
return
|
|
784
|
-
},
|
|
783
|
+
return X(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((a) => r[a] === (!o || se.all));
|
|
784
|
+
}, yo = (e, r, t) => !e || !r || e === r || Fe(e).some((o) => o && (t ? o === r : o.startsWith(r) || r.startsWith(o))), ho = (e, r, t, o, s) => s.isOnAll ? !1 : !t && s.isOnTouch ? !(r || e) : (t ? o.isOnBlur : s.isOnBlur) ? !e : (t ? o.isOnChange : s.isOnChange) ? e : !0, po = (e, r) => !yt(S(e, r)).length && U(e, r), _o = (e, r, t) => {
|
|
785
785
|
const o = Fe(S(e, t));
|
|
786
|
-
return
|
|
786
|
+
return D(o, "root", r[t]), D(e, t, o), e;
|
|
787
787
|
};
|
|
788
788
|
function Tt(e, r, t = "validate") {
|
|
789
789
|
if (re(e) || Array.isArray(e) && e.every(re) || te(e) && !e)
|
|
@@ -793,98 +793,98 @@ function Tt(e, r, t = "validate") {
|
|
|
793
793
|
ref: r
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
|
-
var
|
|
796
|
+
var ge = (e) => q(e) && !He(e) ? e : {
|
|
797
797
|
value: e,
|
|
798
798
|
message: ""
|
|
799
799
|
}, It = async (e, r, t, o, s, n) => {
|
|
800
|
-
const { ref: a, refs: i, required:
|
|
801
|
-
if (!$ || r.has(
|
|
800
|
+
const { ref: a, refs: i, required: f, maxLength: u, minLength: d, min: h, max: m, pattern: F, validate: w, name: p, valueAsNumber: C, mount: $ } = e._f, v = S(t, p);
|
|
801
|
+
if (!$ || r.has(p))
|
|
802
802
|
return {};
|
|
803
|
-
const
|
|
804
|
-
s &&
|
|
805
|
-
},
|
|
806
|
-
const ee =
|
|
807
|
-
|
|
808
|
-
type:
|
|
803
|
+
const E = i ? i[0] : a, z = (L) => {
|
|
804
|
+
s && E.reportValidity && (E.setCustomValidity(te(L) ? "" : L || ""), E.reportValidity());
|
|
805
|
+
}, N = {}, O = bt(a), B = $e(a), Q = O || B, A = (C || vt(a)) && I(a.value) && I(v) || Oe(a) && a.value === "" || v === "" || Array.isArray(v) && !v.length, K = gt.bind(null, p, o, N), J = (L, P, T, M = de.maxLength, G = de.minLength) => {
|
|
806
|
+
const ee = L ? P : T;
|
|
807
|
+
N[p] = {
|
|
808
|
+
type: L ? M : G,
|
|
809
809
|
message: ee,
|
|
810
810
|
ref: a,
|
|
811
|
-
...K(
|
|
811
|
+
...K(L ? M : G, ee)
|
|
812
812
|
};
|
|
813
813
|
};
|
|
814
|
-
if (n ? !Array.isArray(v) || !v.length :
|
|
815
|
-
const { value:
|
|
816
|
-
if (
|
|
817
|
-
type:
|
|
814
|
+
if (n ? !Array.isArray(v) || !v.length : f && (!Q && (A || Y(v)) || te(v) && !v || B && !fr(i).isValid || O && !yr(i).isValid)) {
|
|
815
|
+
const { value: L, message: P } = re(f) ? { value: !!f, message: f } : ge(f);
|
|
816
|
+
if (L && (N[p] = {
|
|
817
|
+
type: de.required,
|
|
818
818
|
message: P,
|
|
819
|
-
ref:
|
|
820
|
-
...K(
|
|
819
|
+
ref: E,
|
|
820
|
+
...K(de.required, P)
|
|
821
821
|
}, !o))
|
|
822
|
-
return
|
|
822
|
+
return z(P), N;
|
|
823
823
|
}
|
|
824
|
-
if (!
|
|
825
|
-
let
|
|
826
|
-
const T =
|
|
824
|
+
if (!A && (!Y(h) || !Y(m))) {
|
|
825
|
+
let L, P;
|
|
826
|
+
const T = ge(m), M = ge(h);
|
|
827
827
|
if (!Y(v) && !isNaN(v)) {
|
|
828
828
|
const G = a.valueAsNumber || v && +v;
|
|
829
|
-
Y(T.value) || (
|
|
829
|
+
Y(T.value) || (L = G > T.value), Y(M.value) || (P = G < M.value);
|
|
830
830
|
} else {
|
|
831
|
-
const G = a.valueAsDate || new Date(v), ee = (
|
|
832
|
-
re(T.value) && v && (
|
|
831
|
+
const G = a.valueAsDate || new Date(v), ee = (Ne) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Ne), fe = a.type == "time", _e = a.type == "week";
|
|
832
|
+
re(T.value) && v && (L = fe ? ee(v) > ee(T.value) : _e ? v > T.value : G > new Date(T.value)), re(M.value) && v && (P = fe ? ee(v) < ee(M.value) : _e ? v < M.value : G < new Date(M.value));
|
|
833
833
|
}
|
|
834
|
-
if ((
|
|
835
|
-
return
|
|
834
|
+
if ((L || P) && (J(!!L, T.message, M.message, de.max, de.min), !o))
|
|
835
|
+
return z(N[p].message), N;
|
|
836
836
|
}
|
|
837
|
-
if ((u ||
|
|
838
|
-
const
|
|
839
|
-
if ((T ||
|
|
840
|
-
return
|
|
837
|
+
if ((u || d) && !A && (re(v) || n && Array.isArray(v))) {
|
|
838
|
+
const L = ge(u), P = ge(d), T = !Y(L.value) && v.length > +L.value, M = !Y(P.value) && v.length < +P.value;
|
|
839
|
+
if ((T || M) && (J(T, L.message, P.message), !o))
|
|
840
|
+
return z(N[p].message), N;
|
|
841
841
|
}
|
|
842
|
-
if (
|
|
843
|
-
const { value:
|
|
844
|
-
if (
|
|
845
|
-
type:
|
|
842
|
+
if (F && !A && re(v)) {
|
|
843
|
+
const { value: L, message: P } = ge(F);
|
|
844
|
+
if (He(L) && !v.match(L) && (N[p] = {
|
|
845
|
+
type: de.pattern,
|
|
846
846
|
message: P,
|
|
847
847
|
ref: a,
|
|
848
|
-
...K(
|
|
848
|
+
...K(de.pattern, P)
|
|
849
849
|
}, !o))
|
|
850
|
-
return
|
|
850
|
+
return z(P), N;
|
|
851
851
|
}
|
|
852
852
|
if (w) {
|
|
853
853
|
if (ae(w)) {
|
|
854
|
-
const
|
|
855
|
-
if (P && (
|
|
854
|
+
const L = await w(v, t), P = Tt(L, E);
|
|
855
|
+
if (P && (N[p] = {
|
|
856
856
|
...P,
|
|
857
|
-
...K(
|
|
857
|
+
...K(de.validate, P.message)
|
|
858
858
|
}, !o))
|
|
859
|
-
return
|
|
859
|
+
return z(P.message), N;
|
|
860
860
|
} else if (q(w)) {
|
|
861
|
-
let
|
|
861
|
+
let L = {};
|
|
862
862
|
for (const P in w) {
|
|
863
|
-
if (!
|
|
863
|
+
if (!X(L) && !o)
|
|
864
864
|
break;
|
|
865
|
-
const T = Tt(await w[P](v, t),
|
|
866
|
-
T && (
|
|
865
|
+
const T = Tt(await w[P](v, t), E, P);
|
|
866
|
+
T && (L = {
|
|
867
867
|
...T,
|
|
868
868
|
...K(P, T.message)
|
|
869
|
-
},
|
|
869
|
+
}, z(T.message), o && (N[p] = L));
|
|
870
870
|
}
|
|
871
|
-
if (!
|
|
872
|
-
ref:
|
|
873
|
-
...
|
|
871
|
+
if (!X(L) && (N[p] = {
|
|
872
|
+
ref: E,
|
|
873
|
+
...L
|
|
874
874
|
}, !o))
|
|
875
|
-
return
|
|
875
|
+
return N;
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
return
|
|
878
|
+
return z(!0), N;
|
|
879
879
|
};
|
|
880
|
-
const
|
|
880
|
+
const go = {
|
|
881
881
|
mode: se.onSubmit,
|
|
882
882
|
reValidateMode: se.onChange,
|
|
883
883
|
shouldFocusError: !0
|
|
884
884
|
};
|
|
885
|
-
function
|
|
885
|
+
function vo(e = {}) {
|
|
886
886
|
let r = {
|
|
887
|
-
...
|
|
887
|
+
...go,
|
|
888
888
|
...e
|
|
889
889
|
}, t = {
|
|
890
890
|
submitCount: 0,
|
|
@@ -911,8 +911,8 @@ function po(e = {}) {
|
|
|
911
911
|
unMount: /* @__PURE__ */ new Set(),
|
|
912
912
|
array: /* @__PURE__ */ new Set(),
|
|
913
913
|
watch: /* @__PURE__ */ new Set()
|
|
914
|
-
},
|
|
915
|
-
const
|
|
914
|
+
}, f, u = 0;
|
|
915
|
+
const d = {
|
|
916
916
|
isDirty: !1,
|
|
917
917
|
dirtyFields: !1,
|
|
918
918
|
validatingFields: !1,
|
|
@@ -922,248 +922,248 @@ function po(e = {}) {
|
|
|
922
922
|
errors: !1
|
|
923
923
|
};
|
|
924
924
|
let h = {
|
|
925
|
-
...
|
|
925
|
+
...d
|
|
926
926
|
};
|
|
927
927
|
const m = {
|
|
928
|
-
array:
|
|
929
|
-
state:
|
|
930
|
-
},
|
|
928
|
+
array: Lt(),
|
|
929
|
+
state: Lt()
|
|
930
|
+
}, F = r.criteriaMode === se.all, w = (l) => (c) => {
|
|
931
931
|
clearTimeout(u), u = setTimeout(l, c);
|
|
932
|
-
},
|
|
933
|
-
if (!r.disabled && (
|
|
934
|
-
const c = r.resolver ?
|
|
932
|
+
}, p = async (l) => {
|
|
933
|
+
if (!r.disabled && (d.isValid || h.isValid || l)) {
|
|
934
|
+
const c = r.resolver ? X((await B()).errors) : await A(o, !0);
|
|
935
935
|
c !== t.isValid && m.state.next({
|
|
936
936
|
isValid: c
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
|
-
},
|
|
940
|
-
!r.disabled && (
|
|
941
|
-
y && (c ?
|
|
939
|
+
}, C = (l, c) => {
|
|
940
|
+
!r.disabled && (d.isValidating || d.validatingFields || h.isValidating || h.validatingFields) && ((l || Array.from(i.mount)).forEach((y) => {
|
|
941
|
+
y && (c ? D(t.validatingFields, y, c) : U(t.validatingFields, y));
|
|
942
942
|
}), m.state.next({
|
|
943
943
|
validatingFields: t.validatingFields,
|
|
944
|
-
isValidating: !
|
|
944
|
+
isValidating: !X(t.validatingFields)
|
|
945
945
|
}));
|
|
946
|
-
}, $ = (l, c = [], y,
|
|
947
|
-
if (
|
|
948
|
-
if (a.action = !0,
|
|
949
|
-
const
|
|
950
|
-
b &&
|
|
946
|
+
}, $ = (l, c = [], y, x, b = !0, g = !0) => {
|
|
947
|
+
if (x && y && !r.disabled) {
|
|
948
|
+
if (a.action = !0, g && Array.isArray(S(o, l))) {
|
|
949
|
+
const V = y(S(o, l), x.argA, x.argB);
|
|
950
|
+
b && D(o, l, V);
|
|
951
951
|
}
|
|
952
|
-
if (
|
|
953
|
-
const
|
|
954
|
-
b &&
|
|
952
|
+
if (g && Array.isArray(S(t.errors, l))) {
|
|
953
|
+
const V = y(S(t.errors, l), x.argA, x.argB);
|
|
954
|
+
b && D(t.errors, l, V), po(t.errors, l);
|
|
955
955
|
}
|
|
956
|
-
if ((
|
|
957
|
-
const
|
|
958
|
-
b &&
|
|
956
|
+
if ((d.touchedFields || h.touchedFields) && g && Array.isArray(S(t.touchedFields, l))) {
|
|
957
|
+
const V = y(S(t.touchedFields, l), x.argA, x.argB);
|
|
958
|
+
b && D(t.touchedFields, l, V);
|
|
959
959
|
}
|
|
960
|
-
(
|
|
960
|
+
(d.dirtyFields || h.dirtyFields) && (t.dirtyFields = be(s, n)), m.state.next({
|
|
961
961
|
name: l,
|
|
962
|
-
isDirty:
|
|
962
|
+
isDirty: J(l, c),
|
|
963
963
|
dirtyFields: t.dirtyFields,
|
|
964
964
|
errors: t.errors,
|
|
965
965
|
isValid: t.isValid
|
|
966
966
|
});
|
|
967
967
|
} else
|
|
968
|
-
|
|
968
|
+
D(n, l, c);
|
|
969
969
|
}, v = (l, c) => {
|
|
970
|
-
|
|
970
|
+
D(t.errors, l, c), m.state.next({
|
|
971
971
|
errors: t.errors
|
|
972
972
|
});
|
|
973
|
-
},
|
|
973
|
+
}, E = (l) => {
|
|
974
974
|
t.errors = l, m.state.next({
|
|
975
975
|
errors: t.errors,
|
|
976
976
|
isValid: !1
|
|
977
977
|
});
|
|
978
|
-
},
|
|
978
|
+
}, z = (l, c, y, x) => {
|
|
979
979
|
const b = S(o, l);
|
|
980
980
|
if (b) {
|
|
981
|
-
const
|
|
982
|
-
I(
|
|
981
|
+
const g = S(n, l, I(y) ? S(s, l) : y);
|
|
982
|
+
I(g) || x && x.defaultChecked || c ? D(n, l, c ? g : Rt(b._f)) : T(l, g), a.mount && p();
|
|
983
983
|
}
|
|
984
|
-
},
|
|
985
|
-
let
|
|
986
|
-
const
|
|
984
|
+
}, N = (l, c, y, x, b) => {
|
|
985
|
+
let g = !1, V = !1;
|
|
986
|
+
const R = {
|
|
987
987
|
name: l
|
|
988
988
|
};
|
|
989
989
|
if (!r.disabled) {
|
|
990
|
-
if (!y ||
|
|
991
|
-
(
|
|
990
|
+
if (!y || x) {
|
|
991
|
+
(d.isDirty || h.isDirty) && (V = t.isDirty, t.isDirty = R.isDirty = J(), g = V !== R.isDirty);
|
|
992
992
|
const H = ne(S(s, l), c);
|
|
993
|
-
|
|
993
|
+
V = !!S(t.dirtyFields, l), H ? U(t.dirtyFields, l) : D(t.dirtyFields, l, !0), R.dirtyFields = t.dirtyFields, g = g || (d.dirtyFields || h.dirtyFields) && V !== !H;
|
|
994
994
|
}
|
|
995
995
|
if (y) {
|
|
996
996
|
const H = S(t.touchedFields, l);
|
|
997
|
-
H || (
|
|
997
|
+
H || (D(t.touchedFields, l, y), R.touchedFields = t.touchedFields, g = g || (d.touchedFields || h.touchedFields) && H !== y);
|
|
998
998
|
}
|
|
999
|
-
|
|
999
|
+
g && b && m.state.next(R);
|
|
1000
1000
|
}
|
|
1001
|
-
return
|
|
1002
|
-
},
|
|
1003
|
-
const b = S(t.errors, l),
|
|
1004
|
-
if (r.delayError && y ? (
|
|
1005
|
-
const
|
|
1006
|
-
...
|
|
1007
|
-
...
|
|
1001
|
+
return g ? R : {};
|
|
1002
|
+
}, O = (l, c, y, x) => {
|
|
1003
|
+
const b = S(t.errors, l), g = (d.isValid || h.isValid) && te(c) && t.isValid !== c;
|
|
1004
|
+
if (r.delayError && y ? (f = w(() => v(l, y)), f(r.delayError)) : (clearTimeout(u), f = null, y ? D(t.errors, l, y) : U(t.errors, l)), (y ? !ne(b, y) : b) || !X(x) || g) {
|
|
1005
|
+
const V = {
|
|
1006
|
+
...x,
|
|
1007
|
+
...g && te(c) ? { isValid: c } : {},
|
|
1008
1008
|
errors: t.errors,
|
|
1009
1009
|
name: l
|
|
1010
1010
|
};
|
|
1011
1011
|
t = {
|
|
1012
1012
|
...t,
|
|
1013
|
-
...
|
|
1014
|
-
}, m.state.next(
|
|
1013
|
+
...V
|
|
1014
|
+
}, m.state.next(V);
|
|
1015
1015
|
}
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1018
|
-
const c = await r.resolver(n, r.context,
|
|
1019
|
-
return
|
|
1016
|
+
}, B = async (l) => {
|
|
1017
|
+
C(l, !0);
|
|
1018
|
+
const c = await r.resolver(n, r.context, co(l || i.mount, o, r.criteriaMode, r.shouldUseNativeValidation));
|
|
1019
|
+
return C(l), c;
|
|
1020
1020
|
}, Q = async (l) => {
|
|
1021
|
-
const { errors: c } = await
|
|
1021
|
+
const { errors: c } = await B(l);
|
|
1022
1022
|
if (l)
|
|
1023
1023
|
for (const y of l) {
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1024
|
+
const x = S(c, y);
|
|
1025
|
+
x ? D(t.errors, y, x) : U(t.errors, y);
|
|
1026
1026
|
}
|
|
1027
1027
|
else
|
|
1028
1028
|
t.errors = c;
|
|
1029
1029
|
return c;
|
|
1030
|
-
},
|
|
1030
|
+
}, A = async (l, c, y = {
|
|
1031
1031
|
valid: !0
|
|
1032
1032
|
}) => {
|
|
1033
|
-
for (const
|
|
1034
|
-
const b = l[
|
|
1033
|
+
for (const x in l) {
|
|
1034
|
+
const b = l[x];
|
|
1035
1035
|
if (b) {
|
|
1036
|
-
const { _f:
|
|
1037
|
-
if (
|
|
1038
|
-
const
|
|
1039
|
-
H &&
|
|
1040
|
-
const oe = await It(b, i.disabled, n,
|
|
1041
|
-
if (H &&
|
|
1036
|
+
const { _f: g, ...V } = b;
|
|
1037
|
+
if (g) {
|
|
1038
|
+
const R = i.array.has(g.name), H = b._f && uo(b._f);
|
|
1039
|
+
H && d.validatingFields && C([g.name], !0);
|
|
1040
|
+
const oe = await It(b, i.disabled, n, F, r.shouldUseNativeValidation && !c, R);
|
|
1041
|
+
if (H && d.validatingFields && C([g.name]), oe[g.name] && (y.valid = !1, c))
|
|
1042
1042
|
break;
|
|
1043
|
-
!c && (S(oe,
|
|
1043
|
+
!c && (S(oe, g.name) ? R ? _o(t.errors, oe, g.name) : D(t.errors, g.name, oe[g.name]) : U(t.errors, g.name));
|
|
1044
1044
|
}
|
|
1045
|
-
!
|
|
1045
|
+
!X(V) && await A(V, c, y);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
return y.valid;
|
|
1049
1049
|
}, K = () => {
|
|
1050
1050
|
for (const l of i.unMount) {
|
|
1051
1051
|
const c = S(o, l);
|
|
1052
|
-
c && (c._f.refs ? c._f.refs.every((y) => !
|
|
1052
|
+
c && (c._f.refs ? c._f.refs.every((y) => !Ke(y)) : !Ke(c._f.ref)) && Ie(l);
|
|
1053
1053
|
}
|
|
1054
1054
|
i.unMount = /* @__PURE__ */ new Set();
|
|
1055
|
-
},
|
|
1055
|
+
}, J = (l, c) => !r.disabled && (l && c && D(n, l, c), !ne(Ne(), s)), L = (l, c, y) => it(l, i, {
|
|
1056
1056
|
...a.mount ? n : I(c) ? s : re(l) ? { [l]: c } : c
|
|
1057
1057
|
}, y, c), P = (l) => yt(S(a.mount ? n : s, l, r.shouldUnregister ? S(s, l, []) : [])), T = (l, c, y = {}) => {
|
|
1058
|
-
const
|
|
1058
|
+
const x = S(o, l);
|
|
1059
1059
|
let b = c;
|
|
1060
|
-
if (
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
-
(!
|
|
1064
|
-
}) :
|
|
1060
|
+
if (x) {
|
|
1061
|
+
const g = x._f;
|
|
1062
|
+
g && (!g.disabled && D(n, l, mr(c, g)), b = Oe(g.ref) && Y(c) ? "" : c, ur(g.ref) ? [...g.ref.options].forEach((V) => V.selected = b.includes(V.value)) : g.refs ? $e(g.ref) ? g.refs.forEach((V) => {
|
|
1063
|
+
(!V.defaultChecked || !V.disabled) && (Array.isArray(b) ? V.checked = !!b.find((R) => R === V.value) : V.checked = b === V.value || !!b);
|
|
1064
|
+
}) : g.refs.forEach((V) => V.checked = V.value === b) : vt(g.ref) ? g.ref.value = "" : (g.ref.value = b, g.ref.type || m.state.next({
|
|
1065
1065
|
name: l,
|
|
1066
1066
|
values: Z(n)
|
|
1067
1067
|
})));
|
|
1068
1068
|
}
|
|
1069
|
-
(y.shouldDirty || y.shouldTouch) &&
|
|
1070
|
-
},
|
|
1071
|
-
for (const
|
|
1072
|
-
if (!c.hasOwnProperty(
|
|
1069
|
+
(y.shouldDirty || y.shouldTouch) && N(l, b, y.shouldTouch, y.shouldDirty, !0), y.shouldValidate && _e(l);
|
|
1070
|
+
}, M = (l, c, y) => {
|
|
1071
|
+
for (const x in c) {
|
|
1072
|
+
if (!c.hasOwnProperty(x))
|
|
1073
1073
|
return;
|
|
1074
|
-
const b = c[
|
|
1075
|
-
(i.array.has(l) || q(b) ||
|
|
1074
|
+
const b = c[x], g = l + "." + x, V = S(o, g);
|
|
1075
|
+
(i.array.has(l) || q(b) || V && !V._f) && !he(b) ? M(g, b, y) : T(g, b, y);
|
|
1076
1076
|
}
|
|
1077
1077
|
}, G = (l, c, y = {}) => {
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1078
|
+
const x = S(o, l), b = i.array.has(l), g = Z(c);
|
|
1079
|
+
D(n, l, g), b ? (m.array.next({
|
|
1080
1080
|
name: l,
|
|
1081
1081
|
values: Z(n)
|
|
1082
|
-
}), (
|
|
1082
|
+
}), (d.isDirty || d.dirtyFields || h.isDirty || h.dirtyFields) && y.shouldDirty && m.state.next({
|
|
1083
1083
|
name: l,
|
|
1084
1084
|
dirtyFields: be(s, n),
|
|
1085
|
-
isDirty:
|
|
1086
|
-
})) :
|
|
1085
|
+
isDirty: J(l, g)
|
|
1086
|
+
})) : x && !x._f && !Y(g) ? M(l, g, y) : T(l, g, y), Ht(l, i) && m.state.next({ ...t, name: l }), m.state.next({
|
|
1087
1087
|
name: a.mount ? l : void 0,
|
|
1088
1088
|
values: Z(n)
|
|
1089
1089
|
});
|
|
1090
1090
|
}, ee = async (l) => {
|
|
1091
1091
|
a.mount = !0;
|
|
1092
1092
|
const c = l.target;
|
|
1093
|
-
let y = c.name,
|
|
1094
|
-
const b = S(o, y),
|
|
1095
|
-
|
|
1096
|
-
},
|
|
1093
|
+
let y = c.name, x = !0;
|
|
1094
|
+
const b = S(o, y), g = (H) => {
|
|
1095
|
+
x = Number.isNaN(H) || he(H) && isNaN(H.getTime()) || ne(H, S(n, y, H));
|
|
1096
|
+
}, V = Dt(r.mode), R = Dt(r.reValidateMode);
|
|
1097
1097
|
if (b) {
|
|
1098
1098
|
let H, oe;
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
const
|
|
1102
|
-
if (!
|
|
1099
|
+
const Ae = c.type ? Rt(b._f) : nr(l), me = l.type === De.BLUR || l.type === De.FOCUS_OUT, Pr = !fo(b._f) && !r.resolver && !S(t.errors, y) && !b._f.deps || ho(me, S(t.touchedFields, y), t.isSubmitted, R, V), qe = Ht(y, i, me);
|
|
1100
|
+
D(n, y, Ae), me ? (!c || !c.readOnly) && (b._f.onBlur && b._f.onBlur(l), f && f(0)) : b._f.onChange && b._f.onChange(l);
|
|
1101
|
+
const Ge = N(y, Ae, me), Br = !X(Ge) || qe;
|
|
1102
|
+
if (!me && m.state.next({
|
|
1103
1103
|
name: y,
|
|
1104
1104
|
type: l.type,
|
|
1105
1105
|
values: Z(n)
|
|
1106
|
-
}),
|
|
1107
|
-
return (
|
|
1108
|
-
if (!
|
|
1109
|
-
const { errors:
|
|
1110
|
-
if (
|
|
1111
|
-
const
|
|
1112
|
-
H = $t.error, y = $t.name, oe =
|
|
1106
|
+
}), Pr)
|
|
1107
|
+
return (d.isValid || h.isValid) && (r.mode === "onBlur" ? me && p() : me || p()), Br && m.state.next({ name: y, ...qe ? {} : Ge });
|
|
1108
|
+
if (!me && qe && m.state.next({ ...t }), r.resolver) {
|
|
1109
|
+
const { errors: zt } = await B([y]);
|
|
1110
|
+
if (g(Ae), x) {
|
|
1111
|
+
const Mr = jt(t.errors, o, y), $t = jt(zt, o, Mr.name || y);
|
|
1112
|
+
H = $t.error, y = $t.name, oe = X(zt);
|
|
1113
1113
|
}
|
|
1114
1114
|
} else
|
|
1115
|
-
|
|
1116
|
-
|
|
1115
|
+
C([y], !0), H = (await It(b, i.disabled, n, F, r.shouldUseNativeValidation))[y], C([y]), g(Ae), x && (H ? oe = !1 : (d.isValid || h.isValid) && (oe = await A(o, !0)));
|
|
1116
|
+
x && (b._f.deps && (!Array.isArray(b._f.deps) || b._f.deps.length > 0) && _e(b._f.deps), O(y, oe, H, Ge));
|
|
1117
1117
|
}
|
|
1118
|
-
},
|
|
1118
|
+
}, fe = (l, c) => {
|
|
1119
1119
|
if (S(t.errors, c) && l.focus)
|
|
1120
1120
|
return l.focus(), 1;
|
|
1121
1121
|
}, _e = async (l, c = {}) => {
|
|
1122
|
-
let y,
|
|
1122
|
+
let y, x;
|
|
1123
1123
|
const b = Fe(l);
|
|
1124
1124
|
if (r.resolver) {
|
|
1125
|
-
const
|
|
1126
|
-
y =
|
|
1127
|
-
} else l ? (
|
|
1128
|
-
const
|
|
1129
|
-
return await
|
|
1130
|
-
}))).every(Boolean), !(!
|
|
1125
|
+
const g = await Q(I(l) ? l : b);
|
|
1126
|
+
y = X(g), x = l ? !b.some((V) => S(g, V)) : y;
|
|
1127
|
+
} else l ? (x = (await Promise.all(b.map(async (g) => {
|
|
1128
|
+
const V = S(o, g);
|
|
1129
|
+
return await A(V && V._f ? { [g]: V } : V);
|
|
1130
|
+
}))).every(Boolean), !(!x && !t.isValid) && p()) : x = y = await A(o);
|
|
1131
1131
|
return m.state.next({
|
|
1132
|
-
...!re(l) || (
|
|
1132
|
+
...!re(l) || (d.isValid || h.isValid) && y !== t.isValid ? {} : { name: l },
|
|
1133
1133
|
...r.resolver || !l ? { isValid: y } : {},
|
|
1134
1134
|
errors: t.errors
|
|
1135
|
-
}), c.shouldFocus && !
|
|
1136
|
-
},
|
|
1135
|
+
}), c.shouldFocus && !x && Ve(o, fe, l ? b : i.mount), x;
|
|
1136
|
+
}, Ne = (l, c) => {
|
|
1137
1137
|
let y = {
|
|
1138
1138
|
...a.mount ? n : s
|
|
1139
1139
|
};
|
|
1140
|
-
return c && (y = cr(c.dirtyFields ? t.dirtyFields : t.touchedFields, y)), I(l) ? y : re(l) ? S(y, l) : l.map((
|
|
1140
|
+
return c && (y = cr(c.dirtyFields ? t.dirtyFields : t.touchedFields, y)), I(l) ? y : re(l) ? S(y, l) : l.map((x) => S(y, x));
|
|
1141
1141
|
}, St = (l, c) => ({
|
|
1142
1142
|
invalid: !!S((c || t).errors, l),
|
|
1143
1143
|
isDirty: !!S((c || t).dirtyFields, l),
|
|
1144
1144
|
error: S((c || t).errors, l),
|
|
1145
1145
|
isValidating: !!S(t.validatingFields, l),
|
|
1146
1146
|
isTouched: !!S((c || t).touchedFields, l)
|
|
1147
|
-
}),
|
|
1147
|
+
}), Vr = (l) => {
|
|
1148
1148
|
l && Fe(l).forEach((c) => U(t.errors, c)), m.state.next({
|
|
1149
1149
|
errors: l ? t.errors : {}
|
|
1150
1150
|
});
|
|
1151
1151
|
}, wt = (l, c, y) => {
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1152
|
+
const x = (S(o, l, { _f: {} })._f || {}).ref, b = S(t.errors, l) || {}, { ref: g, message: V, type: R, ...H } = b;
|
|
1153
|
+
D(t.errors, l, {
|
|
1154
1154
|
...H,
|
|
1155
1155
|
...c,
|
|
1156
|
-
ref:
|
|
1156
|
+
ref: x
|
|
1157
1157
|
}), m.state.next({
|
|
1158
1158
|
name: l,
|
|
1159
1159
|
errors: t.errors,
|
|
1160
1160
|
isValid: !1
|
|
1161
|
-
}), y && y.shouldFocus &&
|
|
1162
|
-
},
|
|
1163
|
-
next: (y) => "values" in y && l(
|
|
1164
|
-
}) :
|
|
1161
|
+
}), y && y.shouldFocus && x && x.focus && x.focus();
|
|
1162
|
+
}, Er = (l, c) => ae(l) ? m.state.subscribe({
|
|
1163
|
+
next: (y) => "values" in y && l(L(void 0, c), y)
|
|
1164
|
+
}) : L(l, c, !0), xt = (l) => m.state.subscribe({
|
|
1165
1165
|
next: (c) => {
|
|
1166
|
-
|
|
1166
|
+
yo(l.name, c.name, l.exact) && mo(c, l.formState || d, Lr, l.reRenderRoot) && l.callback({
|
|
1167
1167
|
values: { ...n },
|
|
1168
1168
|
...t,
|
|
1169
1169
|
...c,
|
|
@@ -1173,24 +1173,24 @@ function po(e = {}) {
|
|
|
1173
1173
|
}).unsubscribe, zr = (l) => (a.mount = !0, h = {
|
|
1174
1174
|
...h,
|
|
1175
1175
|
...l.formState
|
|
1176
|
-
},
|
|
1176
|
+
}, xt({
|
|
1177
1177
|
...l,
|
|
1178
1178
|
formState: h
|
|
1179
|
-
})),
|
|
1179
|
+
})), Ie = (l, c = {}) => {
|
|
1180
1180
|
for (const y of l ? Fe(l) : i.mount)
|
|
1181
1181
|
i.mount.delete(y), i.array.delete(y), c.keepValue || (U(o, y), U(n, y)), !c.keepError && U(t.errors, y), !c.keepDirty && U(t.dirtyFields, y), !c.keepTouched && U(t.touchedFields, y), !c.keepIsValidating && U(t.validatingFields, y), !r.shouldUnregister && !c.keepDefaultValue && U(s, y);
|
|
1182
1182
|
m.state.next({
|
|
1183
1183
|
values: Z(n)
|
|
1184
1184
|
}), m.state.next({
|
|
1185
1185
|
...t,
|
|
1186
|
-
...c.keepDirty ? { isDirty:
|
|
1187
|
-
}), !c.keepIsValid &&
|
|
1188
|
-
},
|
|
1186
|
+
...c.keepDirty ? { isDirty: J() } : {}
|
|
1187
|
+
}), !c.keepIsValid && p();
|
|
1188
|
+
}, Ct = ({ disabled: l, name: c }) => {
|
|
1189
1189
|
(te(l) && a.mount || l || i.disabled.has(c)) && (l ? i.disabled.add(c) : i.disabled.delete(c));
|
|
1190
|
-
},
|
|
1190
|
+
}, We = (l, c = {}) => {
|
|
1191
1191
|
let y = S(o, l);
|
|
1192
|
-
const
|
|
1193
|
-
return
|
|
1192
|
+
const x = te(c.disabled) || te(r.disabled);
|
|
1193
|
+
return D(o, l, {
|
|
1194
1194
|
...y || {},
|
|
1195
1195
|
_f: {
|
|
1196
1196
|
...y && y._f ? y._f : { ref: { name: l } },
|
|
@@ -1198,104 +1198,104 @@ function po(e = {}) {
|
|
|
1198
1198
|
mount: !0,
|
|
1199
1199
|
...c
|
|
1200
1200
|
}
|
|
1201
|
-
}), i.mount.add(l), y ?
|
|
1201
|
+
}), i.mount.add(l), y ? Ct({
|
|
1202
1202
|
disabled: te(c.disabled) ? c.disabled : r.disabled,
|
|
1203
1203
|
name: l
|
|
1204
|
-
}) :
|
|
1205
|
-
...
|
|
1204
|
+
}) : z(l, !0, c.value), {
|
|
1205
|
+
...x ? { disabled: c.disabled || r.disabled } : {},
|
|
1206
1206
|
...r.progressive ? {
|
|
1207
1207
|
required: !!c.required,
|
|
1208
|
-
min:
|
|
1209
|
-
max:
|
|
1210
|
-
minLength:
|
|
1211
|
-
maxLength:
|
|
1212
|
-
pattern:
|
|
1208
|
+
min: xe(c.min),
|
|
1209
|
+
max: xe(c.max),
|
|
1210
|
+
minLength: xe(c.minLength),
|
|
1211
|
+
maxLength: xe(c.maxLength),
|
|
1212
|
+
pattern: xe(c.pattern)
|
|
1213
1213
|
} : {},
|
|
1214
1214
|
name: l,
|
|
1215
1215
|
onChange: ee,
|
|
1216
1216
|
onBlur: ee,
|
|
1217
1217
|
ref: (b) => {
|
|
1218
1218
|
if (b) {
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1219
|
+
We(l, c), y = S(o, l);
|
|
1220
|
+
const g = I(b.value) && b.querySelectorAll && b.querySelectorAll("input,select,textarea")[0] || b, V = no(g), R = y._f.refs || [];
|
|
1221
|
+
if (V ? R.find((H) => H === g) : g === y._f.ref)
|
|
1222
1222
|
return;
|
|
1223
|
-
|
|
1223
|
+
D(o, l, {
|
|
1224
1224
|
_f: {
|
|
1225
1225
|
...y._f,
|
|
1226
|
-
...
|
|
1226
|
+
...V ? {
|
|
1227
1227
|
refs: [
|
|
1228
|
-
...
|
|
1229
|
-
|
|
1228
|
+
...R.filter(Ke),
|
|
1229
|
+
g,
|
|
1230
1230
|
...Array.isArray(S(s, l)) ? [{}] : []
|
|
1231
1231
|
],
|
|
1232
|
-
ref: { type:
|
|
1233
|
-
} : { ref:
|
|
1232
|
+
ref: { type: g.type, name: l }
|
|
1233
|
+
} : { ref: g }
|
|
1234
1234
|
}
|
|
1235
|
-
}),
|
|
1235
|
+
}), z(l, !1, void 0, g);
|
|
1236
1236
|
} else
|
|
1237
1237
|
y = S(o, l, {}), y._f && (y._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(ar(i.array, l) && a.action) && i.unMount.add(l);
|
|
1238
1238
|
}
|
|
1239
1239
|
};
|
|
1240
|
-
},
|
|
1240
|
+
}, Ue = () => r.shouldFocusError && Ve(o, fe, i.mount), $r = (l) => {
|
|
1241
1241
|
te(l) && (m.state.next({ disabled: l }), Ve(o, (c, y) => {
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
b.disabled =
|
|
1242
|
+
const x = S(o, y);
|
|
1243
|
+
x && (c.disabled = x._f.disabled || l, Array.isArray(x._f.refs) && x._f.refs.forEach((b) => {
|
|
1244
|
+
b.disabled = x._f.disabled || l;
|
|
1245
1245
|
}));
|
|
1246
1246
|
}, 0, !1));
|
|
1247
|
-
},
|
|
1248
|
-
let
|
|
1247
|
+
}, kt = (l, c) => async (y) => {
|
|
1248
|
+
let x;
|
|
1249
1249
|
y && (y.preventDefault && y.preventDefault(), y.persist && y.persist());
|
|
1250
1250
|
let b = Z(n);
|
|
1251
1251
|
if (m.state.next({
|
|
1252
1252
|
isSubmitting: !0
|
|
1253
1253
|
}), r.resolver) {
|
|
1254
|
-
const { errors:
|
|
1255
|
-
t.errors =
|
|
1254
|
+
const { errors: g, values: V } = await B();
|
|
1255
|
+
t.errors = g, b = Z(V);
|
|
1256
1256
|
} else
|
|
1257
|
-
await
|
|
1257
|
+
await A(o);
|
|
1258
1258
|
if (i.disabled.size)
|
|
1259
|
-
for (const
|
|
1260
|
-
U(b,
|
|
1261
|
-
if (U(t.errors, "root"),
|
|
1259
|
+
for (const g of i.disabled)
|
|
1260
|
+
U(b, g);
|
|
1261
|
+
if (U(t.errors, "root"), X(t.errors)) {
|
|
1262
1262
|
m.state.next({
|
|
1263
1263
|
errors: {}
|
|
1264
1264
|
});
|
|
1265
1265
|
try {
|
|
1266
1266
|
await l(b, y);
|
|
1267
|
-
} catch (
|
|
1268
|
-
|
|
1267
|
+
} catch (g) {
|
|
1268
|
+
x = g;
|
|
1269
1269
|
}
|
|
1270
1270
|
} else
|
|
1271
|
-
c && await c({ ...t.errors }, y),
|
|
1271
|
+
c && await c({ ...t.errors }, y), Ue(), setTimeout(Ue);
|
|
1272
1272
|
if (m.state.next({
|
|
1273
1273
|
isSubmitted: !0,
|
|
1274
1274
|
isSubmitting: !1,
|
|
1275
|
-
isSubmitSuccessful:
|
|
1275
|
+
isSubmitSuccessful: X(t.errors) && !x,
|
|
1276
1276
|
submitCount: t.submitCount + 1,
|
|
1277
1277
|
errors: t.errors
|
|
1278
|
-
}),
|
|
1279
|
-
throw
|
|
1280
|
-
},
|
|
1281
|
-
S(o, l) && (I(c.defaultValue) ? G(l, Z(S(s, l))) : (G(l, c.defaultValue),
|
|
1278
|
+
}), x)
|
|
1279
|
+
throw x;
|
|
1280
|
+
}, Nr = (l, c = {}) => {
|
|
1281
|
+
S(o, l) && (I(c.defaultValue) ? G(l, Z(S(s, l))) : (G(l, c.defaultValue), D(s, l, Z(c.defaultValue))), c.keepTouched || U(t.touchedFields, l), c.keepDirty || (U(t.dirtyFields, l), t.isDirty = c.defaultValue ? J(l, Z(S(s, l))) : J()), c.keepError || (U(t.errors, l), d.isValid && p()), m.state.next({ ...t }));
|
|
1282
1282
|
}, Ft = (l, c = {}) => {
|
|
1283
|
-
const y = l ? Z(l) : s,
|
|
1283
|
+
const y = l ? Z(l) : s, x = Z(y), b = X(l), g = b ? s : x;
|
|
1284
1284
|
if (c.keepDefaultValues || (s = y), !c.keepValues) {
|
|
1285
1285
|
if (c.keepDirtyValues) {
|
|
1286
|
-
const
|
|
1286
|
+
const V = /* @__PURE__ */ new Set([
|
|
1287
1287
|
...i.mount,
|
|
1288
1288
|
...Object.keys(be(s, n))
|
|
1289
1289
|
]);
|
|
1290
|
-
for (const
|
|
1291
|
-
S(t.dirtyFields,
|
|
1290
|
+
for (const R of Array.from(V))
|
|
1291
|
+
S(t.dirtyFields, R) ? D(g, R, S(n, R)) : G(R, S(g, R));
|
|
1292
1292
|
} else {
|
|
1293
1293
|
if (mt && I(l))
|
|
1294
|
-
for (const
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1297
|
-
const H = Array.isArray(
|
|
1298
|
-
if (
|
|
1294
|
+
for (const V of i.mount) {
|
|
1295
|
+
const R = S(o, V);
|
|
1296
|
+
if (R && R._f) {
|
|
1297
|
+
const H = Array.isArray(R._f.refs) ? R._f.refs[0] : R._f.ref;
|
|
1298
|
+
if (Oe(H)) {
|
|
1299
1299
|
const oe = H.closest("form");
|
|
1300
1300
|
if (oe) {
|
|
1301
1301
|
oe.reset();
|
|
@@ -1305,15 +1305,15 @@ function po(e = {}) {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
if (c.keepFieldsRef)
|
|
1308
|
-
for (const
|
|
1309
|
-
G(
|
|
1308
|
+
for (const V of i.mount)
|
|
1309
|
+
G(V, S(g, V));
|
|
1310
1310
|
else
|
|
1311
1311
|
o = {};
|
|
1312
1312
|
}
|
|
1313
|
-
n = r.shouldUnregister ? c.keepDefaultValues ? Z(s) : {} : Z(
|
|
1314
|
-
values: { ...
|
|
1313
|
+
n = r.shouldUnregister ? c.keepDefaultValues ? Z(s) : {} : Z(g), m.array.next({
|
|
1314
|
+
values: { ...g }
|
|
1315
1315
|
}), m.state.next({
|
|
1316
|
-
values: { ...
|
|
1316
|
+
values: { ...g }
|
|
1317
1317
|
});
|
|
1318
1318
|
}
|
|
1319
1319
|
i = {
|
|
@@ -1324,7 +1324,7 @@ function po(e = {}) {
|
|
|
1324
1324
|
watch: /* @__PURE__ */ new Set(),
|
|
1325
1325
|
watchAll: !1,
|
|
1326
1326
|
focus: ""
|
|
1327
|
-
}, a.mount = !
|
|
1327
|
+
}, a.mount = !d.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !X(g), a.watch = !!r.shouldUnregister, m.state.next({
|
|
1328
1328
|
submitCount: c.keepSubmitCount ? t.submitCount : 0,
|
|
1329
1329
|
isDirty: b ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !ne(l, s)),
|
|
1330
1330
|
isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
|
|
@@ -1336,32 +1336,32 @@ function po(e = {}) {
|
|
|
1336
1336
|
defaultValues: s
|
|
1337
1337
|
});
|
|
1338
1338
|
}, Vt = (l, c) => Ft(ae(l) ? l(n) : l, c), Ar = (l, c = {}) => {
|
|
1339
|
-
const y = S(o, l),
|
|
1340
|
-
if (
|
|
1341
|
-
const b =
|
|
1339
|
+
const y = S(o, l), x = y && y._f;
|
|
1340
|
+
if (x) {
|
|
1341
|
+
const b = x.refs ? x.refs[0] : x.ref;
|
|
1342
1342
|
b.focus && (b.focus(), c.shouldSelect && ae(b.select) && b.select());
|
|
1343
1343
|
}
|
|
1344
|
-
},
|
|
1344
|
+
}, Lr = (l) => {
|
|
1345
1345
|
t = {
|
|
1346
1346
|
...t,
|
|
1347
1347
|
...l
|
|
1348
1348
|
};
|
|
1349
|
-
},
|
|
1349
|
+
}, Et = {
|
|
1350
1350
|
control: {
|
|
1351
|
-
register:
|
|
1352
|
-
unregister:
|
|
1351
|
+
register: We,
|
|
1352
|
+
unregister: Ie,
|
|
1353
1353
|
getFieldState: St,
|
|
1354
|
-
handleSubmit:
|
|
1354
|
+
handleSubmit: kt,
|
|
1355
1355
|
setError: wt,
|
|
1356
|
-
_subscribe:
|
|
1357
|
-
_runSchema:
|
|
1358
|
-
_focusError:
|
|
1359
|
-
_getWatch:
|
|
1360
|
-
_getDirty:
|
|
1361
|
-
_setValid:
|
|
1356
|
+
_subscribe: xt,
|
|
1357
|
+
_runSchema: B,
|
|
1358
|
+
_focusError: Ue,
|
|
1359
|
+
_getWatch: L,
|
|
1360
|
+
_getDirty: J,
|
|
1361
|
+
_setValid: p,
|
|
1362
1362
|
_setFieldArray: $,
|
|
1363
|
-
_setDisabledField:
|
|
1364
|
-
_setErrors:
|
|
1363
|
+
_setDisabledField: Ct,
|
|
1364
|
+
_setErrors: E,
|
|
1365
1365
|
_getFieldArray: P,
|
|
1366
1366
|
_reset: Ft,
|
|
1367
1367
|
_resetDefaultValues: () => ae(r.defaultValues) && r.defaultValues().then((l) => {
|
|
@@ -1370,9 +1370,9 @@ function po(e = {}) {
|
|
|
1370
1370
|
});
|
|
1371
1371
|
}),
|
|
1372
1372
|
_removeUnmounted: K,
|
|
1373
|
-
_disableForm:
|
|
1373
|
+
_disableForm: $r,
|
|
1374
1374
|
_subjects: m,
|
|
1375
|
-
_proxyFormState:
|
|
1375
|
+
_proxyFormState: d,
|
|
1376
1376
|
get _fields() {
|
|
1377
1377
|
return o;
|
|
1378
1378
|
},
|
|
@@ -1409,26 +1409,26 @@ function po(e = {}) {
|
|
|
1409
1409
|
},
|
|
1410
1410
|
subscribe: zr,
|
|
1411
1411
|
trigger: _e,
|
|
1412
|
-
register:
|
|
1413
|
-
handleSubmit:
|
|
1414
|
-
watch:
|
|
1412
|
+
register: We,
|
|
1413
|
+
handleSubmit: kt,
|
|
1414
|
+
watch: Er,
|
|
1415
1415
|
setValue: G,
|
|
1416
|
-
getValues:
|
|
1416
|
+
getValues: Ne,
|
|
1417
1417
|
reset: Vt,
|
|
1418
|
-
resetField:
|
|
1419
|
-
clearErrors:
|
|
1420
|
-
unregister:
|
|
1418
|
+
resetField: Nr,
|
|
1419
|
+
clearErrors: Vr,
|
|
1420
|
+
unregister: Ie,
|
|
1421
1421
|
setError: wt,
|
|
1422
1422
|
setFocus: Ar,
|
|
1423
1423
|
getFieldState: St
|
|
1424
1424
|
};
|
|
1425
1425
|
return {
|
|
1426
|
-
...
|
|
1427
|
-
formControl:
|
|
1426
|
+
...Et,
|
|
1427
|
+
formControl: Et
|
|
1428
1428
|
};
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const r =
|
|
1430
|
+
function bo(e = {}) {
|
|
1431
|
+
const r = k.useRef(void 0), t = k.useRef(void 0), [o, s] = k.useState({
|
|
1432
1432
|
isDirty: !1,
|
|
1433
1433
|
isValidating: !1,
|
|
1434
1434
|
isLoading: ae(e.defaultValues),
|
|
@@ -1452,7 +1452,7 @@ function vo(e = {}) {
|
|
|
1452
1452
|
formState: o
|
|
1453
1453
|
}, e.defaultValues && !ae(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1454
1454
|
else {
|
|
1455
|
-
const { formControl: a, ...i } =
|
|
1455
|
+
const { formControl: a, ...i } = vo(e);
|
|
1456
1456
|
r.current = {
|
|
1457
1457
|
...i,
|
|
1458
1458
|
formState: o
|
|
@@ -1469,27 +1469,27 @@ function vo(e = {}) {
|
|
|
1469
1469
|
...i,
|
|
1470
1470
|
isReady: !0
|
|
1471
1471
|
})), n._formState.isReady = !0, a;
|
|
1472
|
-
}, [n]),
|
|
1472
|
+
}, [n]), k.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), k.useEffect(() => {
|
|
1473
1473
|
e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
|
|
1474
|
-
}, [n, e.mode, e.reValidateMode]),
|
|
1474
|
+
}, [n, e.mode, e.reValidateMode]), k.useEffect(() => {
|
|
1475
1475
|
e.errors && (n._setErrors(e.errors), n._focusError());
|
|
1476
|
-
}, [n, e.errors]),
|
|
1476
|
+
}, [n, e.errors]), k.useEffect(() => {
|
|
1477
1477
|
e.shouldUnregister && n._subjects.state.next({
|
|
1478
1478
|
values: n._getWatch()
|
|
1479
1479
|
});
|
|
1480
|
-
}, [n, e.shouldUnregister]),
|
|
1480
|
+
}, [n, e.shouldUnregister]), k.useEffect(() => {
|
|
1481
1481
|
if (n._proxyFormState.isDirty) {
|
|
1482
1482
|
const a = n._getDirty();
|
|
1483
1483
|
a !== o.isDirty && n._subjects.state.next({
|
|
1484
1484
|
isDirty: a
|
|
1485
1485
|
});
|
|
1486
1486
|
}
|
|
1487
|
-
}, [n, o.isDirty]),
|
|
1487
|
+
}, [n, o.isDirty]), k.useEffect(() => {
|
|
1488
1488
|
e.values && !ne(e.values, t.current) ? (n._reset(e.values, {
|
|
1489
1489
|
keepFieldsRef: !0,
|
|
1490
1490
|
...n._options.resetOptions
|
|
1491
1491
|
}), t.current = e.values, s((a) => ({ ...a }))) : n._resetDefaultValues();
|
|
1492
|
-
}, [n, e.values]),
|
|
1492
|
+
}, [n, e.values]), k.useEffect(() => {
|
|
1493
1493
|
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
1494
1494
|
}), r.current.formState = lr(o, n), r.current;
|
|
1495
1495
|
}
|
|
@@ -1508,13 +1508,13 @@ const Wt = (e, r, t) => {
|
|
|
1508
1508
|
const t = {};
|
|
1509
1509
|
for (const o in e) {
|
|
1510
1510
|
const s = S(r.fields, o), n = Object.assign(e[o] || {}, { ref: s && s.ref });
|
|
1511
|
-
if (
|
|
1511
|
+
if (So(r.names || Object.keys(e), o)) {
|
|
1512
1512
|
const a = Object.assign({}, S(t, o));
|
|
1513
|
-
|
|
1514
|
-
} else
|
|
1513
|
+
D(a, "root", n), D(t, o, a);
|
|
1514
|
+
} else D(t, o, n);
|
|
1515
1515
|
}
|
|
1516
1516
|
return t;
|
|
1517
|
-
},
|
|
1517
|
+
}, So = (e, r) => {
|
|
1518
1518
|
const t = qt(r);
|
|
1519
1519
|
return e.some((o) => qt(o).match(`^${t}\\.\\d+`));
|
|
1520
1520
|
};
|
|
@@ -1522,58 +1522,58 @@ function qt(e) {
|
|
|
1522
1522
|
return e.replace(/\]|\[/g, "");
|
|
1523
1523
|
}
|
|
1524
1524
|
function hr(e, r, t) {
|
|
1525
|
-
function o(i,
|
|
1525
|
+
function o(i, f) {
|
|
1526
1526
|
var u;
|
|
1527
1527
|
Object.defineProperty(i, "_zod", {
|
|
1528
1528
|
value: i._zod ?? {},
|
|
1529
1529
|
enumerable: !1
|
|
1530
|
-
}), (u = i._zod).traits ?? (u.traits = /* @__PURE__ */ new Set()), i._zod.traits.add(e), r(i,
|
|
1531
|
-
for (const
|
|
1532
|
-
|
|
1533
|
-
i._zod.constr = a, i._zod.def =
|
|
1530
|
+
}), (u = i._zod).traits ?? (u.traits = /* @__PURE__ */ new Set()), i._zod.traits.add(e), r(i, f);
|
|
1531
|
+
for (const d in a.prototype)
|
|
1532
|
+
d in i || Object.defineProperty(i, d, { value: a.prototype[d].bind(i) });
|
|
1533
|
+
i._zod.constr = a, i._zod.def = f;
|
|
1534
1534
|
}
|
|
1535
1535
|
const s = (t == null ? void 0 : t.Parent) ?? Object;
|
|
1536
1536
|
class n extends s {
|
|
1537
1537
|
}
|
|
1538
1538
|
Object.defineProperty(n, "name", { value: e });
|
|
1539
1539
|
function a(i) {
|
|
1540
|
-
var
|
|
1540
|
+
var f;
|
|
1541
1541
|
const u = t != null && t.Parent ? new n() : this;
|
|
1542
|
-
o(u, i), (
|
|
1543
|
-
for (const
|
|
1544
|
-
|
|
1542
|
+
o(u, i), (f = u._zod).deferred ?? (f.deferred = []);
|
|
1543
|
+
for (const d of u._zod.deferred)
|
|
1544
|
+
d();
|
|
1545
1545
|
return u;
|
|
1546
1546
|
}
|
|
1547
1547
|
return Object.defineProperty(a, "init", { value: o }), Object.defineProperty(a, Symbol.hasInstance, {
|
|
1548
1548
|
value: (i) => {
|
|
1549
|
-
var
|
|
1550
|
-
return t != null && t.Parent && i instanceof t.Parent ? !0 : (u = (
|
|
1549
|
+
var f, u;
|
|
1550
|
+
return t != null && t.Parent && i instanceof t.Parent ? !0 : (u = (f = i == null ? void 0 : i._zod) == null ? void 0 : f.traits) == null ? void 0 : u.has(e);
|
|
1551
1551
|
}
|
|
1552
1552
|
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
1553
1553
|
}
|
|
1554
|
-
class
|
|
1554
|
+
class wo extends Error {
|
|
1555
1555
|
constructor() {
|
|
1556
1556
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
const
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1559
|
+
const xo = {};
|
|
1560
|
+
function pr(e) {
|
|
1561
|
+
return xo;
|
|
1562
1562
|
}
|
|
1563
1563
|
function Co(e, r) {
|
|
1564
1564
|
return typeof r == "bigint" ? r.toString() : r;
|
|
1565
1565
|
}
|
|
1566
1566
|
const _r = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1567
1567
|
};
|
|
1568
|
-
function
|
|
1568
|
+
function Me(e) {
|
|
1569
1569
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
var s, n, a, i,
|
|
1571
|
+
function gr(e, r, t) {
|
|
1572
|
+
var s, n, a, i, f, u;
|
|
1573
1573
|
const o = { ...e, path: e.path ?? [] };
|
|
1574
1574
|
if (!e.message) {
|
|
1575
|
-
const
|
|
1576
|
-
o.message =
|
|
1575
|
+
const d = Me((a = (n = (s = e.inst) == null ? void 0 : s._zod.def) == null ? void 0 : n.error) == null ? void 0 : a.call(n, e)) ?? Me((i = r == null ? void 0 : r.error) == null ? void 0 : i.call(r, e)) ?? Me((f = t.customError) == null ? void 0 : f.call(t, e)) ?? Me((u = t.localeError) == null ? void 0 : u.call(t, e)) ?? "Invalid input";
|
|
1576
|
+
o.message = d;
|
|
1577
1577
|
}
|
|
1578
1578
|
return delete o.inst, delete o.continue, r != null && r.reportInput || delete o.input, o;
|
|
1579
1579
|
}
|
|
@@ -1588,24 +1588,24 @@ const vr = (e, r) => {
|
|
|
1588
1588
|
value: () => e.message,
|
|
1589
1589
|
enumerable: !1
|
|
1590
1590
|
});
|
|
1591
|
-
}, ko = hr("$ZodError", vr), br = hr("$ZodError", vr, { Parent: Error }),
|
|
1591
|
+
}, ko = hr("$ZodError", vr), br = hr("$ZodError", vr, { Parent: Error }), Fo = (e) => (r, t, o, s) => {
|
|
1592
1592
|
const n = o ? Object.assign(o, { async: !1 }) : { async: !1 }, a = r._zod.run({ value: t, issues: [] }, n);
|
|
1593
1593
|
if (a instanceof Promise)
|
|
1594
|
-
throw new
|
|
1594
|
+
throw new wo();
|
|
1595
1595
|
if (a.issues.length) {
|
|
1596
|
-
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((
|
|
1596
|
+
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((f) => gr(f, n, pr())));
|
|
1597
1597
|
throw _r(i, s == null ? void 0 : s.callee), i;
|
|
1598
1598
|
}
|
|
1599
1599
|
return a.value;
|
|
1600
|
-
},
|
|
1600
|
+
}, Vo = /* @__PURE__ */ Fo(br), Eo = (e) => async (r, t, o, s) => {
|
|
1601
1601
|
const n = o ? Object.assign(o, { async: !0 }) : { async: !0 };
|
|
1602
1602
|
let a = r._zod.run({ value: t, issues: [] }, n);
|
|
1603
1603
|
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
1604
|
-
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((
|
|
1604
|
+
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((f) => gr(f, n, pr())));
|
|
1605
1605
|
throw _r(i, s == null ? void 0 : s.callee), i;
|
|
1606
1606
|
}
|
|
1607
1607
|
return a.value;
|
|
1608
|
-
}, zo = /* @__PURE__ */
|
|
1608
|
+
}, zo = /* @__PURE__ */ Eo(br);
|
|
1609
1609
|
function Gt(e, r) {
|
|
1610
1610
|
try {
|
|
1611
1611
|
var t = e();
|
|
@@ -1614,39 +1614,39 @@ function Gt(e, r) {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
return t && t.then ? t.then(void 0, r) : t;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function $o(e, r) {
|
|
1618
1618
|
for (var t = {}; e.length; ) {
|
|
1619
1619
|
var o = e[0], s = o.code, n = o.message, a = o.path.join(".");
|
|
1620
1620
|
if (!t[a]) if ("unionErrors" in o) {
|
|
1621
1621
|
var i = o.unionErrors[0].errors[0];
|
|
1622
1622
|
t[a] = { message: i.message, type: i.code };
|
|
1623
1623
|
} else t[a] = { message: n, type: s };
|
|
1624
|
-
if ("unionErrors" in o && o.unionErrors.forEach(function(
|
|
1625
|
-
return
|
|
1624
|
+
if ("unionErrors" in o && o.unionErrors.forEach(function(d) {
|
|
1625
|
+
return d.errors.forEach(function(h) {
|
|
1626
1626
|
return e.push(h);
|
|
1627
1627
|
});
|
|
1628
1628
|
}), r) {
|
|
1629
|
-
var
|
|
1630
|
-
t[a] =
|
|
1629
|
+
var f = t[a].types, u = f && f[o.code];
|
|
1630
|
+
t[a] = gt(a, r, t, s, u ? [].concat(u, o.message) : o.message);
|
|
1631
1631
|
}
|
|
1632
1632
|
e.shift();
|
|
1633
1633
|
}
|
|
1634
1634
|
return t;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function No(e, r) {
|
|
1637
1637
|
for (var t = {}; e.length; ) {
|
|
1638
1638
|
var o = e[0], s = o.code, n = o.message, a = o.path.join(".");
|
|
1639
1639
|
if (!t[a]) if (o.code === "invalid_union" && o.errors.length > 0) {
|
|
1640
1640
|
var i = o.errors[0][0];
|
|
1641
1641
|
t[a] = { message: i.message, type: i.code };
|
|
1642
1642
|
} else t[a] = { message: n, type: s };
|
|
1643
|
-
if (o.code === "invalid_union" && o.errors.forEach(function(
|
|
1644
|
-
return
|
|
1643
|
+
if (o.code === "invalid_union" && o.errors.forEach(function(d) {
|
|
1644
|
+
return d.forEach(function(h) {
|
|
1645
1645
|
return e.push(h);
|
|
1646
1646
|
});
|
|
1647
1647
|
}), r) {
|
|
1648
|
-
var
|
|
1649
|
-
t[a] =
|
|
1648
|
+
var f = t[a].types, u = f && f[o.code];
|
|
1649
|
+
t[a] = gt(a, r, t, s, u ? [].concat(u, o.message) : o.message);
|
|
1650
1650
|
}
|
|
1651
1651
|
e.shift();
|
|
1652
1652
|
}
|
|
@@ -1664,7 +1664,7 @@ function Ao(e, r, t) {
|
|
|
1664
1664
|
}, function(a) {
|
|
1665
1665
|
if ((function(i) {
|
|
1666
1666
|
return Array.isArray(i == null ? void 0 : i.issues);
|
|
1667
|
-
})(a)) return { values: {}, errors: Ut(
|
|
1667
|
+
})(a)) return { values: {}, errors: Ut($o(a.errors, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
|
|
1668
1668
|
throw a;
|
|
1669
1669
|
}));
|
|
1670
1670
|
} catch (a) {
|
|
@@ -1676,13 +1676,13 @@ function Ao(e, r, t) {
|
|
|
1676
1676
|
})(e)) return function(o, s, n) {
|
|
1677
1677
|
try {
|
|
1678
1678
|
return Promise.resolve(Gt(function() {
|
|
1679
|
-
return Promise.resolve((t.mode === "sync" ?
|
|
1679
|
+
return Promise.resolve((t.mode === "sync" ? Vo : zo)(e, o, r)).then(function(a) {
|
|
1680
1680
|
return n.shouldUseNativeValidation && ut({}, n), { errors: {}, values: t.raw ? Object.assign({}, o) : a };
|
|
1681
1681
|
});
|
|
1682
1682
|
}, function(a) {
|
|
1683
1683
|
if ((function(i) {
|
|
1684
1684
|
return i instanceof ko;
|
|
1685
|
-
})(a)) return { values: {}, errors: Ut(
|
|
1685
|
+
})(a)) return { values: {}, errors: Ut(No(a.issues, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
|
|
1686
1686
|
throw a;
|
|
1687
1687
|
}));
|
|
1688
1688
|
} catch (a) {
|
|
@@ -1691,14 +1691,14 @@ function Ao(e, r, t) {
|
|
|
1691
1691
|
};
|
|
1692
1692
|
throw new Error("Invalid input: not a Zod schema");
|
|
1693
1693
|
}
|
|
1694
|
-
const Sr =
|
|
1695
|
-
function
|
|
1696
|
-
const e =
|
|
1694
|
+
const Sr = k.createContext(null);
|
|
1695
|
+
function Lo() {
|
|
1696
|
+
const e = k.useContext(Sr);
|
|
1697
1697
|
if (!e)
|
|
1698
1698
|
throw new Error("useFormContext must be used within a Form component");
|
|
1699
1699
|
return e;
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function Po({
|
|
1702
1702
|
onSubmit: e,
|
|
1703
1703
|
children: r,
|
|
1704
1704
|
schema: t,
|
|
@@ -1707,18 +1707,18 @@ function Bo({
|
|
|
1707
1707
|
reValidateMode: n = "onChange",
|
|
1708
1708
|
className: a,
|
|
1709
1709
|
style: i,
|
|
1710
|
-
formProps:
|
|
1710
|
+
formProps: f
|
|
1711
1711
|
}) {
|
|
1712
|
-
const u =
|
|
1712
|
+
const u = bo({
|
|
1713
1713
|
resolver: t ? Ao(t) : void 0,
|
|
1714
1714
|
defaultValues: o,
|
|
1715
1715
|
mode: s,
|
|
1716
1716
|
reValidateMode: n
|
|
1717
|
-
}),
|
|
1718
|
-
return /* @__PURE__ */ _(Sr.Provider, { value: u, children: /* @__PURE__ */ _("form", { ...
|
|
1717
|
+
}), d = u.handleSubmit(e);
|
|
1718
|
+
return /* @__PURE__ */ _(Sr.Provider, { value: u, children: /* @__PURE__ */ _("form", { ...f, className: a, style: i, onSubmit: d, children: typeof r == "function" ? r(u) : r }) });
|
|
1719
1719
|
}
|
|
1720
|
-
const En =
|
|
1721
|
-
formError:
|
|
1720
|
+
const En = Po, Bo = "FormError-module__formError___kaUBn", Mo = {
|
|
1721
|
+
formError: Bo
|
|
1722
1722
|
}, Ro = ({
|
|
1723
1723
|
// Color prop
|
|
1724
1724
|
color: e,
|
|
@@ -1735,15 +1735,15 @@ const En = Bo, Po = "FormError-module__formError___kaUBn", Lo = {
|
|
|
1735
1735
|
color: e || n.colors.error,
|
|
1736
1736
|
...o
|
|
1737
1737
|
// Top level style prop overrides
|
|
1738
|
-
}, i = [
|
|
1738
|
+
}, i = [Mo.formError, t].filter(Boolean).join(" ");
|
|
1739
1739
|
return /* @__PURE__ */ _("div", { ...s, className: i, style: a, role: "alert", "aria-live": "polite", children: r });
|
|
1740
|
-
},
|
|
1741
|
-
formGroup:
|
|
1740
|
+
}, Do = "FormGroup-module__formGroup___aVI-B", Oo = "FormGroup-module__inputWrapper___429QE", Ho = "FormGroup-module__indented___t61iz", jo = "FormGroup-module__disabled___W-tJ0", To = "FormGroup-module__required___mO3xA", ve = {
|
|
1741
|
+
formGroup: Do,
|
|
1742
1742
|
inputWrapper: Oo,
|
|
1743
|
-
indented:
|
|
1744
|
-
disabled:
|
|
1745
|
-
required:
|
|
1746
|
-
},
|
|
1743
|
+
indented: Ho,
|
|
1744
|
+
disabled: jo,
|
|
1745
|
+
required: To
|
|
1746
|
+
}, Io = ({
|
|
1747
1747
|
// State props
|
|
1748
1748
|
disabled: e = !1,
|
|
1749
1749
|
error: r = !1,
|
|
@@ -1756,30 +1756,30 @@ const En = Bo, Po = "FormError-module__formError___kaUBn", Lo = {
|
|
|
1756
1756
|
errorMessage: a,
|
|
1757
1757
|
labelProps: i,
|
|
1758
1758
|
// Content
|
|
1759
|
-
children:
|
|
1759
|
+
children: f,
|
|
1760
1760
|
// Style overrides
|
|
1761
1761
|
className: u,
|
|
1762
|
-
style:
|
|
1762
|
+
style: d,
|
|
1763
1763
|
// Element-specific props
|
|
1764
1764
|
divProps: h
|
|
1765
1765
|
}) => {
|
|
1766
|
-
const m = j(),
|
|
1766
|
+
const m = j(), F = [
|
|
1767
1767
|
ve.formGroup,
|
|
1768
1768
|
r ? ve.error : "",
|
|
1769
1769
|
e ? ve.disabled : "",
|
|
1770
1770
|
u
|
|
1771
1771
|
].filter(Boolean).join(" "), w = {
|
|
1772
1772
|
"--form-group-margin-bottom": `calc(${m.fonts.rhythm} * 0.35)`,
|
|
1773
|
-
...
|
|
1774
|
-
},
|
|
1775
|
-
if (
|
|
1773
|
+
...d
|
|
1774
|
+
}, p = k.Children.map(f, (C) => {
|
|
1775
|
+
if (k.isValidElement(C)) {
|
|
1776
1776
|
const $ = {};
|
|
1777
|
-
if (e &&
|
|
1778
|
-
return
|
|
1777
|
+
if (e && C.props.disabled === void 0 && ($.disabled = !0), r && C.props.error === void 0 && ($.error = !0), s && C.props.id === void 0 && C.type !== k.Fragment && ($.id = s), Object.keys($).length > 0)
|
|
1778
|
+
return k.cloneElement(C, $);
|
|
1779
1779
|
}
|
|
1780
|
-
return
|
|
1780
|
+
return C;
|
|
1781
1781
|
});
|
|
1782
|
-
return /* @__PURE__ */ W("div", { ...h, className:
|
|
1782
|
+
return /* @__PURE__ */ W("div", { ...h, className: F, style: w, children: [
|
|
1783
1783
|
n && /* @__PURE__ */ W(ft, { htmlFor: s, disabled: e, error: r, ...i, children: [
|
|
1784
1784
|
n,
|
|
1785
1785
|
t && /* @__PURE__ */ W("span", { className: ve.required, "aria-label": "required", children: [
|
|
@@ -1787,11 +1787,11 @@ const En = Bo, Po = "FormError-module__formError___kaUBn", Lo = {
|
|
|
1787
1787
|
"*"
|
|
1788
1788
|
] })
|
|
1789
1789
|
] }),
|
|
1790
|
-
/* @__PURE__ */ _("div", { className: `${ve.inputWrapper} ${o ? ve.indented : ""}`, children:
|
|
1790
|
+
/* @__PURE__ */ _("div", { className: `${ve.inputWrapper} ${o ? ve.indented : ""}`, children: p }),
|
|
1791
1791
|
r && a && /* @__PURE__ */ _(Ro, { children: a })
|
|
1792
1792
|
] });
|
|
1793
1793
|
};
|
|
1794
|
-
function
|
|
1794
|
+
function pe({
|
|
1795
1795
|
name: e,
|
|
1796
1796
|
label: r,
|
|
1797
1797
|
required: t,
|
|
@@ -1800,19 +1800,19 @@ function ge({
|
|
|
1800
1800
|
disabled: n,
|
|
1801
1801
|
className: a,
|
|
1802
1802
|
style: i,
|
|
1803
|
-
indent:
|
|
1803
|
+
indent: f,
|
|
1804
1804
|
labelProps: u
|
|
1805
1805
|
}) {
|
|
1806
|
-
const { control:
|
|
1806
|
+
const { control: d } = Lo(), {
|
|
1807
1807
|
field: h,
|
|
1808
1808
|
fieldState: { error: m }
|
|
1809
|
-
} =
|
|
1809
|
+
} = so({
|
|
1810
1810
|
name: e,
|
|
1811
|
-
control:
|
|
1811
|
+
control: d,
|
|
1812
1812
|
rules: s
|
|
1813
1813
|
});
|
|
1814
1814
|
return /* @__PURE__ */ _(
|
|
1815
|
-
|
|
1815
|
+
Io,
|
|
1816
1816
|
{
|
|
1817
1817
|
label: r,
|
|
1818
1818
|
name: e,
|
|
@@ -1822,7 +1822,7 @@ function ge({
|
|
|
1822
1822
|
required: t,
|
|
1823
1823
|
className: a,
|
|
1824
1824
|
style: i,
|
|
1825
|
-
indent:
|
|
1825
|
+
indent: f,
|
|
1826
1826
|
labelProps: u,
|
|
1827
1827
|
children: o({
|
|
1828
1828
|
value: h.value,
|
|
@@ -1830,16 +1830,16 @@ function ge({
|
|
|
1830
1830
|
onBlur: h.onBlur,
|
|
1831
1831
|
name: h.name,
|
|
1832
1832
|
error: !!m,
|
|
1833
|
-
indent:
|
|
1833
|
+
indent: f
|
|
1834
1834
|
})
|
|
1835
1835
|
}
|
|
1836
1836
|
);
|
|
1837
1837
|
}
|
|
1838
|
-
const
|
|
1839
|
-
input:
|
|
1840
|
-
sizeSmall:
|
|
1841
|
-
sizeLarge:
|
|
1842
|
-
},
|
|
1838
|
+
const Wo = "Input-module__input___WjT81", Uo = "Input-module__sizeSmall___NFvsi", qo = "Input-module__sizeLarge___4Boj3", Je = {
|
|
1839
|
+
input: Wo,
|
|
1840
|
+
sizeSmall: Uo,
|
|
1841
|
+
sizeLarge: qo
|
|
1842
|
+
}, Go = ({
|
|
1843
1843
|
color: e = "#000",
|
|
1844
1844
|
disabled: r = !1,
|
|
1845
1845
|
fontSize: t = "1em",
|
|
@@ -1850,7 +1850,7 @@ const Io = "Input-module__input___WjT81", Wo = "Input-module__sizeSmall___NFvsi"
|
|
|
1850
1850
|
fontSize: t,
|
|
1851
1851
|
opacity: r ? 0.3 : 1,
|
|
1852
1852
|
placeholderOpacity: o
|
|
1853
|
-
}),
|
|
1853
|
+
}), Zo = ({
|
|
1854
1854
|
// State props
|
|
1855
1855
|
disabled: e = !1,
|
|
1856
1856
|
error: r = !1,
|
|
@@ -1863,57 +1863,57 @@ const Io = "Input-module__input___WjT81", Wo = "Input-module__sizeSmall___NFvsi"
|
|
|
1863
1863
|
name: n = "",
|
|
1864
1864
|
placeholder: a,
|
|
1865
1865
|
placeholderOpacity: i = 0.3,
|
|
1866
|
-
type:
|
|
1866
|
+
type: f = "text",
|
|
1867
1867
|
value: u = "",
|
|
1868
1868
|
// Event handlers
|
|
1869
|
-
onChange:
|
|
1869
|
+
onChange: d,
|
|
1870
1870
|
onBlur: h,
|
|
1871
1871
|
// Standard React props
|
|
1872
1872
|
className: m,
|
|
1873
|
-
style:
|
|
1873
|
+
style: F,
|
|
1874
1874
|
// Element-specific props
|
|
1875
1875
|
inputProps: w
|
|
1876
1876
|
}) => {
|
|
1877
|
-
const
|
|
1877
|
+
const p = j(), C = p.colors.error, $ = r ? C : t || p.colors.primary, v = Go({
|
|
1878
1878
|
color: $,
|
|
1879
1879
|
disabled: e,
|
|
1880
|
-
fontSize:
|
|
1880
|
+
fontSize: p.fonts.size,
|
|
1881
1881
|
placeholderOpacity: i
|
|
1882
|
-
}),
|
|
1882
|
+
}), E = {
|
|
1883
1883
|
"--placeholder-opacity": v.placeholderOpacity,
|
|
1884
|
-
"--input-padding-small": `calc(${
|
|
1885
|
-
"--input-padding-large": `calc(${
|
|
1884
|
+
"--input-padding-small": `calc(${p.fonts.rhythm} * ${p.sizes.small.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1885
|
+
"--input-padding-large": `calc(${p.fonts.rhythm} * ${p.sizes.large.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1886
1886
|
borderColor: v.borderColor,
|
|
1887
|
-
borderWidth:
|
|
1888
|
-
borderRadius:
|
|
1887
|
+
borderWidth: p.border.width,
|
|
1888
|
+
borderRadius: p.border.radius,
|
|
1889
1889
|
color: v.color,
|
|
1890
1890
|
fontSize: v.fontSize,
|
|
1891
1891
|
opacity: v.opacity,
|
|
1892
|
-
...
|
|
1892
|
+
...F
|
|
1893
1893
|
// Top level style prop overrides
|
|
1894
|
-
},
|
|
1895
|
-
|
|
1896
|
-
o === "small" ?
|
|
1894
|
+
}, z = [
|
|
1895
|
+
Je.input,
|
|
1896
|
+
o === "small" ? Je.sizeSmall : Je.sizeLarge,
|
|
1897
1897
|
m
|
|
1898
1898
|
].filter(Boolean).join(" ");
|
|
1899
1899
|
return /* @__PURE__ */ _(
|
|
1900
1900
|
"input",
|
|
1901
1901
|
{
|
|
1902
1902
|
...w,
|
|
1903
|
-
className:
|
|
1903
|
+
className: z,
|
|
1904
1904
|
disabled: e,
|
|
1905
1905
|
id: s,
|
|
1906
1906
|
name: n,
|
|
1907
|
-
onChange:
|
|
1907
|
+
onChange: d,
|
|
1908
1908
|
onBlur: h,
|
|
1909
1909
|
placeholder: a,
|
|
1910
|
-
type:
|
|
1910
|
+
type: f,
|
|
1911
1911
|
value: u,
|
|
1912
|
-
style:
|
|
1912
|
+
style: E
|
|
1913
1913
|
}
|
|
1914
1914
|
);
|
|
1915
1915
|
};
|
|
1916
|
-
function
|
|
1916
|
+
function zn({
|
|
1917
1917
|
name: e,
|
|
1918
1918
|
label: r,
|
|
1919
1919
|
required: t,
|
|
@@ -1924,7 +1924,7 @@ function $n({
|
|
|
1924
1924
|
...i
|
|
1925
1925
|
}) {
|
|
1926
1926
|
return /* @__PURE__ */ _(
|
|
1927
|
-
|
|
1927
|
+
pe,
|
|
1928
1928
|
{
|
|
1929
1929
|
name: e,
|
|
1930
1930
|
label: r,
|
|
@@ -1933,25 +1933,25 @@ function $n({
|
|
|
1933
1933
|
disabled: s,
|
|
1934
1934
|
className: n,
|
|
1935
1935
|
style: a,
|
|
1936
|
-
children: ({ value:
|
|
1937
|
-
|
|
1936
|
+
children: ({ value: f, onChange: u, onBlur: d, name: h, error: m }) => /* @__PURE__ */ _(
|
|
1937
|
+
Zo,
|
|
1938
1938
|
{
|
|
1939
1939
|
...i,
|
|
1940
1940
|
name: h,
|
|
1941
|
-
value:
|
|
1942
|
-
onChange: (
|
|
1943
|
-
onBlur:
|
|
1941
|
+
value: f || "",
|
|
1942
|
+
onChange: (F) => u(F.target.value),
|
|
1943
|
+
onBlur: d,
|
|
1944
1944
|
error: m
|
|
1945
1945
|
}
|
|
1946
1946
|
)
|
|
1947
1947
|
}
|
|
1948
1948
|
);
|
|
1949
1949
|
}
|
|
1950
|
-
const
|
|
1951
|
-
textarea:
|
|
1952
|
-
sizeSmall:
|
|
1953
|
-
sizeLarge:
|
|
1954
|
-
},
|
|
1950
|
+
const Qo = "Textarea-module__textarea___Z-y6g", Ko = "Textarea-module__sizeSmall___HHFEM", Jo = "Textarea-module__sizeLarge___5a3sf", Xe = {
|
|
1951
|
+
textarea: Qo,
|
|
1952
|
+
sizeSmall: Ko,
|
|
1953
|
+
sizeLarge: Jo
|
|
1954
|
+
}, Xo = ({
|
|
1955
1955
|
color: e = "#000",
|
|
1956
1956
|
disabled: r = !1,
|
|
1957
1957
|
placeholderOpacity: t = 0.3
|
|
@@ -1960,7 +1960,7 @@ const Zo = "Textarea-module__textarea___Z-y6g", Qo = "Textarea-module__sizeSmall
|
|
|
1960
1960
|
borderColor: e,
|
|
1961
1961
|
opacity: r ? 0.3 : 1,
|
|
1962
1962
|
placeholderOpacity: t
|
|
1963
|
-
}),
|
|
1963
|
+
}), Yo = ({
|
|
1964
1964
|
// State props
|
|
1965
1965
|
disabled: e = !1,
|
|
1966
1966
|
error: r = !1,
|
|
@@ -1973,56 +1973,56 @@ const Zo = "Textarea-module__textarea___Z-y6g", Qo = "Textarea-module__sizeSmall
|
|
|
1973
1973
|
name: n = "",
|
|
1974
1974
|
placeholder: a,
|
|
1975
1975
|
placeholderOpacity: i = 0.3,
|
|
1976
|
-
rows:
|
|
1976
|
+
rows: f = 3,
|
|
1977
1977
|
value: u = "",
|
|
1978
1978
|
// Event handlers
|
|
1979
|
-
onChange:
|
|
1979
|
+
onChange: d,
|
|
1980
1980
|
onBlur: h,
|
|
1981
1981
|
// Standard React props
|
|
1982
1982
|
className: m,
|
|
1983
|
-
style:
|
|
1983
|
+
style: F,
|
|
1984
1984
|
// Element-specific props
|
|
1985
1985
|
textareaProps: w
|
|
1986
1986
|
}) => {
|
|
1987
|
-
const
|
|
1987
|
+
const p = j(), C = p.colors.error, $ = r ? C : t || p.colors.primary, v = Xo({
|
|
1988
1988
|
color: $,
|
|
1989
1989
|
disabled: e,
|
|
1990
1990
|
placeholderOpacity: i
|
|
1991
|
-
}),
|
|
1991
|
+
}), E = {
|
|
1992
1992
|
"--placeholder-opacity": v.placeholderOpacity,
|
|
1993
|
-
"--textarea-padding-small": `calc(${
|
|
1994
|
-
"--textarea-padding-large": `calc(${
|
|
1993
|
+
"--textarea-padding-small": `calc(${p.fonts.rhythm} * ${p.sizes.small.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1994
|
+
"--textarea-padding-large": `calc(${p.fonts.rhythm} * ${p.sizes.large.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1995
1995
|
borderColor: v.borderColor,
|
|
1996
|
-
borderWidth:
|
|
1997
|
-
borderRadius:
|
|
1996
|
+
borderWidth: p.border.width,
|
|
1997
|
+
borderRadius: p.border.radius,
|
|
1998
1998
|
color: v.color,
|
|
1999
|
-
fontSize:
|
|
1999
|
+
fontSize: p.fonts.size,
|
|
2000
2000
|
opacity: v.opacity,
|
|
2001
|
-
...
|
|
2001
|
+
...F
|
|
2002
2002
|
// Top level style overrides
|
|
2003
|
-
},
|
|
2004
|
-
|
|
2005
|
-
o === "small" ?
|
|
2003
|
+
}, z = [
|
|
2004
|
+
Xe.textarea,
|
|
2005
|
+
o === "small" ? Xe.sizeSmall : Xe.sizeLarge,
|
|
2006
2006
|
m
|
|
2007
2007
|
].filter(Boolean).join(" ");
|
|
2008
2008
|
return /* @__PURE__ */ _(
|
|
2009
2009
|
"textarea",
|
|
2010
2010
|
{
|
|
2011
2011
|
...w,
|
|
2012
|
-
className:
|
|
2012
|
+
className: z,
|
|
2013
2013
|
disabled: e,
|
|
2014
2014
|
id: s,
|
|
2015
2015
|
name: n,
|
|
2016
|
-
onChange:
|
|
2016
|
+
onChange: d,
|
|
2017
2017
|
onBlur: h,
|
|
2018
2018
|
placeholder: a,
|
|
2019
|
-
rows:
|
|
2019
|
+
rows: f,
|
|
2020
2020
|
value: u,
|
|
2021
|
-
style:
|
|
2021
|
+
style: E
|
|
2022
2022
|
}
|
|
2023
2023
|
);
|
|
2024
2024
|
};
|
|
2025
|
-
function
|
|
2025
|
+
function $n({
|
|
2026
2026
|
name: e,
|
|
2027
2027
|
label: r,
|
|
2028
2028
|
required: t,
|
|
@@ -2033,7 +2033,7 @@ function An({
|
|
|
2033
2033
|
...i
|
|
2034
2034
|
}) {
|
|
2035
2035
|
return /* @__PURE__ */ _(
|
|
2036
|
-
|
|
2036
|
+
pe,
|
|
2037
2037
|
{
|
|
2038
2038
|
name: e,
|
|
2039
2039
|
label: r,
|
|
@@ -2042,25 +2042,25 @@ function An({
|
|
|
2042
2042
|
disabled: s,
|
|
2043
2043
|
className: n,
|
|
2044
2044
|
style: a,
|
|
2045
|
-
children: ({ value:
|
|
2046
|
-
|
|
2045
|
+
children: ({ value: f, onChange: u, onBlur: d, name: h, error: m }) => /* @__PURE__ */ _(
|
|
2046
|
+
Yo,
|
|
2047
2047
|
{
|
|
2048
2048
|
...i,
|
|
2049
2049
|
name: h,
|
|
2050
|
-
value:
|
|
2051
|
-
onChange: (
|
|
2052
|
-
onBlur:
|
|
2050
|
+
value: f || "",
|
|
2051
|
+
onChange: (F) => u(F.target.value),
|
|
2052
|
+
onBlur: d,
|
|
2053
2053
|
error: m
|
|
2054
2054
|
}
|
|
2055
2055
|
)
|
|
2056
2056
|
}
|
|
2057
2057
|
);
|
|
2058
2058
|
}
|
|
2059
|
-
const
|
|
2060
|
-
select:
|
|
2061
|
-
sizeSmall:
|
|
2062
|
-
sizeLarge:
|
|
2063
|
-
},
|
|
2059
|
+
const es = "Select-module__select___cjdcr", ts = "Select-module__sizeSmall___i1quj", rs = "Select-module__sizeLarge___eBA1T", Ye = {
|
|
2060
|
+
select: es,
|
|
2061
|
+
sizeSmall: ts,
|
|
2062
|
+
sizeLarge: rs
|
|
2063
|
+
}, os = ({
|
|
2064
2064
|
color: e = "#000",
|
|
2065
2065
|
disabled: r = !1
|
|
2066
2066
|
}) => ({
|
|
@@ -2087,7 +2087,7 @@ const Yo = "Select-module__select___cjdcr", es = "Select-module__sizeSmall___i1q
|
|
|
2087
2087
|
`.trim();
|
|
2088
2088
|
return `url("data:image/svg+xml,${encodeURIComponent(a)}")`;
|
|
2089
2089
|
})(e)
|
|
2090
|
-
}),
|
|
2090
|
+
}), ss = ({
|
|
2091
2091
|
// State props
|
|
2092
2092
|
disabled: e = !1,
|
|
2093
2093
|
error: r = !1,
|
|
@@ -2101,17 +2101,17 @@ const Yo = "Select-module__select___cjdcr", es = "Select-module__sizeSmall___i1q
|
|
|
2101
2101
|
placeholder: a = "",
|
|
2102
2102
|
value: i = "",
|
|
2103
2103
|
// Event handlers
|
|
2104
|
-
onChange:
|
|
2104
|
+
onChange: f,
|
|
2105
2105
|
onBlur: u,
|
|
2106
2106
|
// Standard React props
|
|
2107
|
-
children:
|
|
2107
|
+
children: d,
|
|
2108
2108
|
className: h,
|
|
2109
2109
|
style: m,
|
|
2110
2110
|
// Element-specific props
|
|
2111
|
-
selectProps:
|
|
2111
|
+
selectProps: F
|
|
2112
2112
|
}) => {
|
|
2113
|
-
const w = j(),
|
|
2114
|
-
color:
|
|
2113
|
+
const w = j(), p = w.colors.error, C = r ? p : t || w.colors.primary, $ = os({
|
|
2114
|
+
color: C,
|
|
2115
2115
|
disabled: e
|
|
2116
2116
|
}), v = {
|
|
2117
2117
|
"--select-padding-small": `calc(${w.fonts.rhythm} * ${w.sizes.small.paddingVertical}) calc(${w.fonts.rhythm} * 1.2) calc(${w.fonts.rhythm} * ${w.sizes.small.paddingVertical}) calc(${w.fonts.rhythm} * ${w.inputs.paddingHorizontal})`,
|
|
@@ -2130,26 +2130,26 @@ const Yo = "Select-module__select___cjdcr", es = "Select-module__sizeSmall___i1q
|
|
|
2130
2130
|
opacity: $.opacity,
|
|
2131
2131
|
...m
|
|
2132
2132
|
// Top level style overrides
|
|
2133
|
-
},
|
|
2134
|
-
|
|
2135
|
-
o === "small" ?
|
|
2133
|
+
}, E = [
|
|
2134
|
+
Ye.select,
|
|
2135
|
+
o === "small" ? Ye.sizeSmall : Ye.sizeLarge,
|
|
2136
2136
|
h
|
|
2137
2137
|
].filter(Boolean).join(" ");
|
|
2138
2138
|
return /* @__PURE__ */ W(
|
|
2139
2139
|
"select",
|
|
2140
2140
|
{
|
|
2141
|
-
...
|
|
2142
|
-
className:
|
|
2141
|
+
...F,
|
|
2142
|
+
className: E,
|
|
2143
2143
|
disabled: e,
|
|
2144
2144
|
id: s,
|
|
2145
2145
|
name: n,
|
|
2146
|
-
onChange:
|
|
2146
|
+
onChange: f,
|
|
2147
2147
|
onBlur: u,
|
|
2148
2148
|
value: i,
|
|
2149
2149
|
style: v,
|
|
2150
2150
|
children: [
|
|
2151
2151
|
a !== "" && /* @__PURE__ */ _("option", { disabled: !0, value: "", children: a }),
|
|
2152
|
-
|
|
2152
|
+
d
|
|
2153
2153
|
]
|
|
2154
2154
|
}
|
|
2155
2155
|
);
|
|
@@ -2163,10 +2163,10 @@ function Nn({
|
|
|
2163
2163
|
className: n,
|
|
2164
2164
|
style: a,
|
|
2165
2165
|
children: i,
|
|
2166
|
-
...
|
|
2166
|
+
...f
|
|
2167
2167
|
}) {
|
|
2168
2168
|
return /* @__PURE__ */ _(
|
|
2169
|
-
|
|
2169
|
+
pe,
|
|
2170
2170
|
{
|
|
2171
2171
|
name: e,
|
|
2172
2172
|
label: r,
|
|
@@ -2175,22 +2175,22 @@ function Nn({
|
|
|
2175
2175
|
disabled: s,
|
|
2176
2176
|
className: n,
|
|
2177
2177
|
style: a,
|
|
2178
|
-
children: ({ value: u, onChange:
|
|
2179
|
-
|
|
2178
|
+
children: ({ value: u, onChange: d, onBlur: h, name: m, error: F }) => /* @__PURE__ */ _(
|
|
2179
|
+
ss,
|
|
2180
2180
|
{
|
|
2181
|
-
...
|
|
2181
|
+
...f,
|
|
2182
2182
|
name: m,
|
|
2183
2183
|
value: u || "",
|
|
2184
|
-
onChange: (w) =>
|
|
2184
|
+
onChange: (w) => d(w.target.value),
|
|
2185
2185
|
onBlur: h,
|
|
2186
|
-
error:
|
|
2186
|
+
error: F,
|
|
2187
2187
|
children: i
|
|
2188
2188
|
}
|
|
2189
2189
|
)
|
|
2190
2190
|
}
|
|
2191
2191
|
);
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function An({
|
|
2194
2194
|
name: e,
|
|
2195
2195
|
required: r,
|
|
2196
2196
|
rules: t,
|
|
@@ -2200,7 +2200,7 @@ function Bn({
|
|
|
2200
2200
|
...a
|
|
2201
2201
|
}) {
|
|
2202
2202
|
return /* @__PURE__ */ _(
|
|
2203
|
-
|
|
2203
|
+
pe,
|
|
2204
2204
|
{
|
|
2205
2205
|
name: e,
|
|
2206
2206
|
required: r,
|
|
@@ -2208,24 +2208,24 @@ function Bn({
|
|
|
2208
2208
|
disabled: o,
|
|
2209
2209
|
className: s,
|
|
2210
2210
|
style: n,
|
|
2211
|
-
children: ({ value: i, onChange:
|
|
2211
|
+
children: ({ value: i, onChange: f, name: u, error: d }) => /* @__PURE__ */ _(
|
|
2212
2212
|
at,
|
|
2213
2213
|
{
|
|
2214
2214
|
...a,
|
|
2215
2215
|
name: u,
|
|
2216
2216
|
checked: !!i,
|
|
2217
|
-
onChange: (h) =>
|
|
2218
|
-
error:
|
|
2217
|
+
onChange: (h) => f(h.target.checked),
|
|
2218
|
+
error: d
|
|
2219
2219
|
}
|
|
2220
2220
|
)
|
|
2221
2221
|
}
|
|
2222
2222
|
);
|
|
2223
2223
|
}
|
|
2224
|
-
const
|
|
2225
|
-
container:
|
|
2226
|
-
svg:
|
|
2227
|
-
label:
|
|
2228
|
-
},
|
|
2224
|
+
const ns = "Radio-module__container___AQxhk", as = "Radio-module__svg___zl5kF", is = "Radio-module__label___vAFIP", et = {
|
|
2225
|
+
container: ns,
|
|
2226
|
+
svg: as,
|
|
2227
|
+
label: is
|
|
2228
|
+
}, ls = ({
|
|
2229
2229
|
color: e = "#000",
|
|
2230
2230
|
disabled: r = !1
|
|
2231
2231
|
}) => ({
|
|
@@ -2244,42 +2244,42 @@ const ss = "Radio-module__container___AQxhk", ns = "Radio-module__svg___zl5kF",
|
|
|
2244
2244
|
id: n,
|
|
2245
2245
|
onChange: a,
|
|
2246
2246
|
label: i,
|
|
2247
|
-
labelStyle:
|
|
2247
|
+
labelStyle: f,
|
|
2248
2248
|
// Style overrides
|
|
2249
2249
|
className: u,
|
|
2250
|
-
style:
|
|
2250
|
+
style: d,
|
|
2251
2251
|
// Element-specific props
|
|
2252
2252
|
divProps: h
|
|
2253
2253
|
}) => {
|
|
2254
|
-
const m = j(),
|
|
2255
|
-
color:
|
|
2254
|
+
const m = j(), F = n || or(), w = m.colors.error, p = o ? w : e || m.colors.primary, C = ls({
|
|
2255
|
+
color: p,
|
|
2256
2256
|
disabled: t
|
|
2257
|
-
}), $ = (
|
|
2258
|
-
t || a(
|
|
2257
|
+
}), $ = (B) => {
|
|
2258
|
+
t || a(B);
|
|
2259
2259
|
}, v = {
|
|
2260
|
-
cursor:
|
|
2260
|
+
cursor: C.cursor,
|
|
2261
2261
|
fontSize: m.fonts.size,
|
|
2262
|
-
opacity:
|
|
2263
|
-
...
|
|
2262
|
+
opacity: C.opacity,
|
|
2263
|
+
...d
|
|
2264
2264
|
// Top level style overrides
|
|
2265
|
-
}, z = {
|
|
2266
|
-
width: "1em"
|
|
2267
2265
|
}, E = {
|
|
2266
|
+
width: "1em"
|
|
2267
|
+
}, z = {
|
|
2268
2268
|
fill: "transparent",
|
|
2269
2269
|
strokeWidth: "12.5",
|
|
2270
|
-
stroke:
|
|
2271
|
-
},
|
|
2272
|
-
fill:
|
|
2273
|
-
},
|
|
2274
|
-
return /* @__PURE__ */ W("div", { ...h, className:
|
|
2270
|
+
stroke: C.radioColor
|
|
2271
|
+
}, N = {
|
|
2272
|
+
fill: C.radioColor
|
|
2273
|
+
}, O = [et.container, u].filter(Boolean).join(" ");
|
|
2274
|
+
return /* @__PURE__ */ W("div", { ...h, className: O, style: v, children: [
|
|
2275
2275
|
/* @__PURE__ */ _(
|
|
2276
2276
|
"input",
|
|
2277
2277
|
{
|
|
2278
|
-
id:
|
|
2278
|
+
id: F,
|
|
2279
2279
|
checked: r,
|
|
2280
2280
|
disabled: t,
|
|
2281
2281
|
name: s,
|
|
2282
|
-
onChange: (
|
|
2282
|
+
onChange: (B) => $({ target: { checked: B.target.checked, name: s, type: "radio" } }),
|
|
2283
2283
|
style: { display: "none" },
|
|
2284
2284
|
type: "radio"
|
|
2285
2285
|
}
|
|
@@ -2290,21 +2290,21 @@ const ss = "Radio-module__container___AQxhk", ns = "Radio-module__svg___zl5kF",
|
|
|
2290
2290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2291
2291
|
viewBox: "0 0 100 100",
|
|
2292
2292
|
onClick: () => $({ target: { checked: !r, name: s, type: "radio" } }),
|
|
2293
|
-
className:
|
|
2294
|
-
style:
|
|
2293
|
+
className: et.svg,
|
|
2294
|
+
style: E,
|
|
2295
2295
|
children: [
|
|
2296
|
-
/* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style:
|
|
2297
|
-
r && /* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "25", style:
|
|
2296
|
+
/* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: z }),
|
|
2297
|
+
r && /* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "25", style: N })
|
|
2298
2298
|
]
|
|
2299
2299
|
}
|
|
2300
2300
|
),
|
|
2301
2301
|
i && /* @__PURE__ */ _(
|
|
2302
2302
|
ft,
|
|
2303
2303
|
{
|
|
2304
|
-
htmlFor:
|
|
2305
|
-
className:
|
|
2306
|
-
style: { paddingBottom: 0, ...
|
|
2307
|
-
color:
|
|
2304
|
+
htmlFor: F,
|
|
2305
|
+
className: et.label,
|
|
2306
|
+
style: { paddingBottom: 0, ...f },
|
|
2307
|
+
color: C.radioColor,
|
|
2308
2308
|
disabled: t,
|
|
2309
2309
|
error: o,
|
|
2310
2310
|
children: i
|
|
@@ -2312,7 +2312,7 @@ const ss = "Radio-module__container___AQxhk", ns = "Radio-module__svg___zl5kF",
|
|
|
2312
2312
|
)
|
|
2313
2313
|
] });
|
|
2314
2314
|
};
|
|
2315
|
-
function
|
|
2315
|
+
function Ln({
|
|
2316
2316
|
name: e,
|
|
2317
2317
|
label: r,
|
|
2318
2318
|
required: t,
|
|
@@ -2321,10 +2321,10 @@ function Pn({
|
|
|
2321
2321
|
className: n,
|
|
2322
2322
|
style: a,
|
|
2323
2323
|
value: i,
|
|
2324
|
-
...
|
|
2324
|
+
...f
|
|
2325
2325
|
}) {
|
|
2326
2326
|
return /* @__PURE__ */ _(
|
|
2327
|
-
|
|
2327
|
+
pe,
|
|
2328
2328
|
{
|
|
2329
2329
|
name: e,
|
|
2330
2330
|
required: t,
|
|
@@ -2332,13 +2332,13 @@ function Pn({
|
|
|
2332
2332
|
disabled: s,
|
|
2333
2333
|
className: n,
|
|
2334
2334
|
style: a,
|
|
2335
|
-
children: ({ value: u, onChange:
|
|
2335
|
+
children: ({ value: u, onChange: d, name: h, error: m }) => /* @__PURE__ */ _(
|
|
2336
2336
|
wr,
|
|
2337
2337
|
{
|
|
2338
|
-
...
|
|
2338
|
+
...f,
|
|
2339
2339
|
name: h,
|
|
2340
2340
|
checked: u === i,
|
|
2341
|
-
onChange: () =>
|
|
2341
|
+
onChange: () => d(i),
|
|
2342
2342
|
error: m,
|
|
2343
2343
|
label: r
|
|
2344
2344
|
}
|
|
@@ -2346,7 +2346,7 @@ function Pn({
|
|
|
2346
2346
|
}
|
|
2347
2347
|
);
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function Pn({
|
|
2350
2350
|
name: e,
|
|
2351
2351
|
label: r,
|
|
2352
2352
|
required: t,
|
|
@@ -2357,7 +2357,7 @@ function Ln({
|
|
|
2357
2357
|
indent: i = !0
|
|
2358
2358
|
}) {
|
|
2359
2359
|
return /* @__PURE__ */ _(
|
|
2360
|
-
|
|
2360
|
+
pe,
|
|
2361
2361
|
{
|
|
2362
2362
|
name: e,
|
|
2363
2363
|
label: r,
|
|
@@ -2371,11 +2371,11 @@ function Ln({
|
|
|
2371
2371
|
marginBottom: ".25em"
|
|
2372
2372
|
}
|
|
2373
2373
|
},
|
|
2374
|
-
children: ({ value:
|
|
2374
|
+
children: ({ value: f, onChange: u, name: d, error: h }) => /* @__PURE__ */ _(we, { children: o.map((m) => /* @__PURE__ */ _(
|
|
2375
2375
|
wr,
|
|
2376
2376
|
{
|
|
2377
|
-
name:
|
|
2378
|
-
checked:
|
|
2377
|
+
name: d,
|
|
2378
|
+
checked: f === m.value,
|
|
2379
2379
|
onChange: () => u(m.value),
|
|
2380
2380
|
label: m.label,
|
|
2381
2381
|
disabled: s || m.disabled,
|
|
@@ -2386,7 +2386,7 @@ function Ln({
|
|
|
2386
2386
|
}
|
|
2387
2387
|
);
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function Bn({
|
|
2390
2390
|
name: e,
|
|
2391
2391
|
label: r,
|
|
2392
2392
|
required: t,
|
|
@@ -2395,10 +2395,10 @@ function Rn({
|
|
|
2395
2395
|
disabled: n,
|
|
2396
2396
|
className: a,
|
|
2397
2397
|
style: i,
|
|
2398
|
-
indent:
|
|
2398
|
+
indent: f = !0
|
|
2399
2399
|
}) {
|
|
2400
2400
|
return /* @__PURE__ */ _(
|
|
2401
|
-
|
|
2401
|
+
pe,
|
|
2402
2402
|
{
|
|
2403
2403
|
name: e,
|
|
2404
2404
|
label: r,
|
|
@@ -2406,49 +2406,49 @@ function Rn({
|
|
|
2406
2406
|
disabled: n,
|
|
2407
2407
|
className: a,
|
|
2408
2408
|
style: i,
|
|
2409
|
-
indent:
|
|
2409
|
+
indent: f,
|
|
2410
2410
|
labelProps: {
|
|
2411
2411
|
style: {
|
|
2412
2412
|
marginBottom: ".25em"
|
|
2413
2413
|
}
|
|
2414
2414
|
},
|
|
2415
|
-
children: ({ value: u, onChange:
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2415
|
+
children: ({ value: u, onChange: d, name: h, error: m }) => {
|
|
2416
|
+
const F = Array.isArray(u) ? u : [], w = (p, C) => {
|
|
2417
|
+
d(C ? [...F, p] : F.filter(($) => $ !== p));
|
|
2418
2418
|
};
|
|
2419
|
-
return /* @__PURE__ */ _(we, { children: o ? o.map((
|
|
2419
|
+
return /* @__PURE__ */ _(we, { children: o ? o.map((p) => /* @__PURE__ */ _(
|
|
2420
2420
|
at,
|
|
2421
2421
|
{
|
|
2422
2422
|
name: `${h}[]`,
|
|
2423
|
-
checked:
|
|
2424
|
-
onChange: (
|
|
2425
|
-
label:
|
|
2426
|
-
disabled: n ||
|
|
2423
|
+
checked: F.includes(p.value),
|
|
2424
|
+
onChange: (C) => w(p.value, C.target.checked),
|
|
2425
|
+
label: p.label,
|
|
2426
|
+
disabled: n || p.disabled,
|
|
2427
2427
|
error: m
|
|
2428
2428
|
},
|
|
2429
|
-
|
|
2430
|
-
)) :
|
|
2431
|
-
if (
|
|
2432
|
-
const
|
|
2433
|
-
return
|
|
2429
|
+
p.value
|
|
2430
|
+
)) : k.Children.map(s, (p) => {
|
|
2431
|
+
if (k.isValidElement(p) && p.type === at) {
|
|
2432
|
+
const C = p.props.value || p.props.name;
|
|
2433
|
+
return k.cloneElement(p, {
|
|
2434
2434
|
name: `${h}[]`,
|
|
2435
|
-
checked:
|
|
2436
|
-
onChange: ($) => w(
|
|
2437
|
-
error: m ||
|
|
2438
|
-
disabled: n ||
|
|
2435
|
+
checked: F.includes(C),
|
|
2436
|
+
onChange: ($) => w(C, $.target.checked),
|
|
2437
|
+
error: m || p.props.error,
|
|
2438
|
+
disabled: n || p.props.disabled
|
|
2439
2439
|
});
|
|
2440
2440
|
}
|
|
2441
|
-
return
|
|
2441
|
+
return p;
|
|
2442
2442
|
}) });
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
2445
|
);
|
|
2446
2446
|
}
|
|
2447
|
-
const
|
|
2448
|
-
hamburger:
|
|
2449
|
-
line:
|
|
2450
|
-
open:
|
|
2451
|
-
},
|
|
2447
|
+
const cs = "Hamburger-module__hamburger___Tf4-t", us = "Hamburger-module__line___gybZM", ds = "Hamburger-module__open___gRswh", Ce = {
|
|
2448
|
+
hamburger: cs,
|
|
2449
|
+
line: us,
|
|
2450
|
+
open: ds
|
|
2451
|
+
}, fs = ({
|
|
2452
2452
|
compact: e,
|
|
2453
2453
|
color: r,
|
|
2454
2454
|
visible: t,
|
|
@@ -2462,7 +2462,7 @@ const ls = "Hamburger-module__hamburger___Tf4-t", cs = "Hamburger-module__line__
|
|
|
2462
2462
|
width: n,
|
|
2463
2463
|
height: n
|
|
2464
2464
|
};
|
|
2465
|
-
},
|
|
2465
|
+
}, ms = ({
|
|
2466
2466
|
// Color props
|
|
2467
2467
|
color: e,
|
|
2468
2468
|
// State/variant props
|
|
@@ -2476,34 +2476,34 @@ const ls = "Hamburger-module__hamburger___Tf4-t", cs = "Hamburger-module__line__
|
|
|
2476
2476
|
setOpen: a,
|
|
2477
2477
|
// Style overrides
|
|
2478
2478
|
className: i,
|
|
2479
|
-
style:
|
|
2479
|
+
style: f
|
|
2480
2480
|
}) => {
|
|
2481
|
-
const u =
|
|
2481
|
+
const u = fs({
|
|
2482
2482
|
compact: t,
|
|
2483
2483
|
color: e,
|
|
2484
2484
|
visible: r,
|
|
2485
2485
|
border: n
|
|
2486
|
-
}),
|
|
2486
|
+
}), d = [Ce.hamburger, s ? Ce.open : "", i].filter(Boolean).join(" ");
|
|
2487
2487
|
return /* @__PURE__ */ W(
|
|
2488
2488
|
"button",
|
|
2489
2489
|
{
|
|
2490
2490
|
ref: o,
|
|
2491
|
-
className:
|
|
2491
|
+
className: d,
|
|
2492
2492
|
onClick: () => a(!s),
|
|
2493
|
-
style: { ...u, ...
|
|
2493
|
+
style: { ...u, ...f },
|
|
2494
2494
|
"aria-label": "Toggle menu",
|
|
2495
2495
|
"aria-expanded": s,
|
|
2496
2496
|
children: [
|
|
2497
|
-
/* @__PURE__ */ _("div", { className:
|
|
2498
|
-
/* @__PURE__ */ _("div", { className:
|
|
2499
|
-
/* @__PURE__ */ _("div", { className:
|
|
2497
|
+
/* @__PURE__ */ _("div", { className: Ce.line }),
|
|
2498
|
+
/* @__PURE__ */ _("div", { className: Ce.line }),
|
|
2499
|
+
/* @__PURE__ */ _("div", { className: Ce.line })
|
|
2500
2500
|
]
|
|
2501
2501
|
}
|
|
2502
2502
|
);
|
|
2503
|
-
},
|
|
2504
|
-
header:
|
|
2505
|
-
container:
|
|
2506
|
-
},
|
|
2503
|
+
}, ys = "Header-module__header___RUooH", hs = "Header-module__container___t68M9", Zt = {
|
|
2504
|
+
header: ys,
|
|
2505
|
+
container: hs
|
|
2506
|
+
}, ps = ({
|
|
2507
2507
|
isSmallScreen: e = !1,
|
|
2508
2508
|
maxWidth: r,
|
|
2509
2509
|
minWidth: t,
|
|
@@ -2512,9 +2512,9 @@ const ls = "Hamburger-module__hamburger___Tf4-t", cs = "Hamburger-module__line__
|
|
|
2512
2512
|
paddingSm: n,
|
|
2513
2513
|
padding: a,
|
|
2514
2514
|
margin: i,
|
|
2515
|
-
gap:
|
|
2515
|
+
gap: f,
|
|
2516
2516
|
backgroundColor: u,
|
|
2517
|
-
color:
|
|
2517
|
+
color: d
|
|
2518
2518
|
} = {}) => {
|
|
2519
2519
|
const h = j();
|
|
2520
2520
|
return {
|
|
@@ -2524,19 +2524,19 @@ const ls = "Hamburger-module__hamburger___Tf4-t", cs = "Hamburger-module__line__
|
|
|
2524
2524
|
"--header-height": s,
|
|
2525
2525
|
"--header-padding": e ? n || h.layout.paddingSm : a || h.layout.padding,
|
|
2526
2526
|
"--header-margin": i,
|
|
2527
|
-
"--header-gap":
|
|
2527
|
+
"--header-gap": f,
|
|
2528
2528
|
backgroundColor: u,
|
|
2529
|
-
color:
|
|
2529
|
+
color: d
|
|
2530
2530
|
};
|
|
2531
2531
|
}, ie = (e) => {
|
|
2532
2532
|
const r = typeof window < "u" && typeof window.matchMedia == "function";
|
|
2533
|
-
return
|
|
2533
|
+
return Dr((n) => {
|
|
2534
2534
|
if (!r) return () => {
|
|
2535
2535
|
};
|
|
2536
2536
|
const a = window.matchMedia(e);
|
|
2537
2537
|
return a.addEventListener("change", n), () => a.removeEventListener("change", n);
|
|
2538
2538
|
}, () => r ? window.matchMedia(e).matches : !1, () => !1);
|
|
2539
|
-
},
|
|
2539
|
+
}, _s = ({
|
|
2540
2540
|
// Color props
|
|
2541
2541
|
backgroundColor: e,
|
|
2542
2542
|
color: r,
|
|
@@ -2547,88 +2547,88 @@ const ls = "Hamburger-module__hamburger___Tf4-t", cs = "Hamburger-module__line__
|
|
|
2547
2547
|
height: n,
|
|
2548
2548
|
padding: a,
|
|
2549
2549
|
paddingSm: i,
|
|
2550
|
-
margin:
|
|
2550
|
+
margin: f,
|
|
2551
2551
|
gap: u,
|
|
2552
|
-
breakpoint:
|
|
2552
|
+
breakpoint: d,
|
|
2553
2553
|
fixed: h = !1,
|
|
2554
2554
|
// Content
|
|
2555
2555
|
children: m,
|
|
2556
2556
|
// Style overrides
|
|
2557
|
-
className:
|
|
2557
|
+
className: F,
|
|
2558
2558
|
style: w,
|
|
2559
2559
|
// Element-specific props
|
|
2560
|
-
headerProps:
|
|
2560
|
+
headerProps: p
|
|
2561
2561
|
}) => {
|
|
2562
|
-
const
|
|
2563
|
-
isSmallScreen:
|
|
2562
|
+
const C = j(), $ = d || C.breakpoints.sm, { maxWidth: v, unit: E } = ze($), z = ie(`(max-width: ${v}${E})`), N = ps({
|
|
2563
|
+
isSmallScreen: z,
|
|
2564
2564
|
maxWidth: t,
|
|
2565
2565
|
minWidth: o,
|
|
2566
2566
|
width: s,
|
|
2567
2567
|
height: n,
|
|
2568
2568
|
paddingSm: i,
|
|
2569
2569
|
padding: a,
|
|
2570
|
-
margin:
|
|
2570
|
+
margin: f,
|
|
2571
2571
|
gap: u,
|
|
2572
2572
|
backgroundColor: e,
|
|
2573
2573
|
color: r
|
|
2574
|
-
}),
|
|
2575
|
-
return /* @__PURE__ */ _("header", { ...
|
|
2574
|
+
}), O = [Zt.container, F].filter(Boolean).join(" "), B = h ? { position: "fixed", top: 0, left: 0, right: 0, zIndex: 1e3 } : {};
|
|
2575
|
+
return /* @__PURE__ */ _("header", { ...p, className: Zt.header, style: B, children: /* @__PURE__ */ _(
|
|
2576
2576
|
"div",
|
|
2577
2577
|
{
|
|
2578
|
-
className:
|
|
2579
|
-
style: { ...
|
|
2578
|
+
className: O,
|
|
2579
|
+
style: { ...N, ...w },
|
|
2580
2580
|
children: m
|
|
2581
2581
|
}
|
|
2582
2582
|
) });
|
|
2583
|
-
},
|
|
2584
|
-
nav:
|
|
2585
|
-
navMobile:
|
|
2586
|
-
navHeader:
|
|
2587
|
-
compact:
|
|
2588
|
-
navDesktop:
|
|
2589
|
-
},
|
|
2590
|
-
triggerWrapper:
|
|
2583
|
+
}, gs = "ResponsiveNav-module__nav___xOfv5", vs = "ResponsiveNav-module__navMobile___h795P", bs = "ResponsiveNav-module__navHeader___Me8bB", Ss = "ResponsiveNav-module__compact___UhuAE", ws = "ResponsiveNav-module__navDesktop___9wscZ", Se = {
|
|
2584
|
+
nav: gs,
|
|
2585
|
+
navMobile: vs,
|
|
2586
|
+
navHeader: bs,
|
|
2587
|
+
compact: Ss,
|
|
2588
|
+
navDesktop: ws
|
|
2589
|
+
}, xs = "Popover-module__triggerWrapper___dZpf6", Cs = "Popover-module__popup___JAvrb", ks = "Popover-module__panelOverlay___1xDU5", Fs = "Popover-module__panelOverlayVisible___BgtIQ", Vs = "Popover-module__backdrop___e8qHL", Es = "Popover-module__panel___eUJ2E", zs = "Popover-module__panelLeft___9nSLp", $s = "Popover-module__panelRight___OrQfl", Ns = "Popover-module__panelOpen___hhvV-", As = "Popover-module__panelCloseButton___kALaN", le = {
|
|
2590
|
+
triggerWrapper: xs,
|
|
2591
2591
|
popup: Cs,
|
|
2592
2592
|
panelOverlay: ks,
|
|
2593
|
-
panelOverlayVisible:
|
|
2594
|
-
backdrop:
|
|
2595
|
-
panel:
|
|
2593
|
+
panelOverlayVisible: Fs,
|
|
2594
|
+
backdrop: Vs,
|
|
2595
|
+
panel: Es,
|
|
2596
2596
|
panelLeft: zs,
|
|
2597
|
-
panelRight:
|
|
2598
|
-
panelOpen:
|
|
2597
|
+
panelRight: $s,
|
|
2598
|
+
panelOpen: Ns,
|
|
2599
2599
|
panelCloseButton: As
|
|
2600
2600
|
};
|
|
2601
|
-
function
|
|
2602
|
-
const [t, o] =
|
|
2601
|
+
function Ls(e, r) {
|
|
2602
|
+
const [t, o] = ue(!1), [s, n] = ue(!1);
|
|
2603
2603
|
ce(() => {
|
|
2604
2604
|
r === "panel" && (e ? o(!0) : n(!1));
|
|
2605
2605
|
}, [e, r]), ce(() => {
|
|
2606
2606
|
if (r !== "panel" || !t || !e) return;
|
|
2607
|
-
let i,
|
|
2607
|
+
let i, f;
|
|
2608
2608
|
return i = requestAnimationFrame(() => {
|
|
2609
|
-
|
|
2609
|
+
f = requestAnimationFrame(() => n(!0));
|
|
2610
2610
|
}), () => {
|
|
2611
|
-
cancelAnimationFrame(i), cancelAnimationFrame(
|
|
2611
|
+
cancelAnimationFrame(i), cancelAnimationFrame(f);
|
|
2612
2612
|
};
|
|
2613
2613
|
}, [t, e, r]);
|
|
2614
|
-
const a =
|
|
2614
|
+
const a = ke(() => {
|
|
2615
2615
|
s || o(!1);
|
|
2616
2616
|
}, [s]);
|
|
2617
2617
|
return { panelMounted: t, panelVisible: s, handleTransitionEnd: a };
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2620
|
-
const [s, n] =
|
|
2619
|
+
function Ps(e, r, t, o) {
|
|
2620
|
+
const [s, n] = ue({}), a = ke(() => {
|
|
2621
2621
|
if (r !== "popup" || !t.current) return;
|
|
2622
|
-
const i = t.current.getBoundingClientRect(),
|
|
2622
|
+
const i = t.current.getBoundingClientRect(), f = {
|
|
2623
2623
|
position: "fixed",
|
|
2624
2624
|
top: i.bottom + 4,
|
|
2625
2625
|
zIndex: 999
|
|
2626
2626
|
};
|
|
2627
|
-
n(o === "bottom-start" ? { ...
|
|
2628
|
-
...
|
|
2627
|
+
n(o === "bottom-start" ? { ...f, left: i.left } : o === "bottom" ? {
|
|
2628
|
+
...f,
|
|
2629
2629
|
left: i.left + i.width / 2,
|
|
2630
2630
|
transform: "translateX(-50%)"
|
|
2631
|
-
} : { ...
|
|
2631
|
+
} : { ...f, left: i.right, transform: "translateX(-100%)" });
|
|
2632
2632
|
}, [r, o, t]);
|
|
2633
2633
|
return ce(() => {
|
|
2634
2634
|
e && r === "popup" && a();
|
|
@@ -2639,7 +2639,7 @@ function Bs(e, r, t, o) {
|
|
|
2639
2639
|
};
|
|
2640
2640
|
}, [e, r, a]), { popupPositionStyle: s };
|
|
2641
2641
|
}
|
|
2642
|
-
const
|
|
2642
|
+
const xr = ({
|
|
2643
2643
|
trigger: e,
|
|
2644
2644
|
children: r,
|
|
2645
2645
|
variant: t = "popup",
|
|
@@ -2648,51 +2648,51 @@ const Cr = ({
|
|
|
2648
2648
|
placement: n = "bottom-start",
|
|
2649
2649
|
side: a = "left",
|
|
2650
2650
|
panelWidth: i = "75%",
|
|
2651
|
-
backdropColor:
|
|
2651
|
+
backdropColor: f = "rgba(0, 0, 0, 0.5)",
|
|
2652
2652
|
hideCloseButton: u = !1,
|
|
2653
|
-
closeOnBackdropClick:
|
|
2653
|
+
closeOnBackdropClick: d = !0,
|
|
2654
2654
|
className: h,
|
|
2655
2655
|
style: m,
|
|
2656
|
-
popoverProps:
|
|
2656
|
+
popoverProps: F
|
|
2657
2657
|
}) => {
|
|
2658
|
-
const w = j(),
|
|
2659
|
-
(
|
|
2660
|
-
|
|
2658
|
+
const w = j(), p = o !== void 0, [C, $] = ue(!1), v = p ? o : C, E = Ee(null), z = Ee(null), N = ke(
|
|
2659
|
+
(M) => {
|
|
2660
|
+
p || $(M), s == null || s(M);
|
|
2661
2661
|
},
|
|
2662
|
-
[
|
|
2663
|
-
),
|
|
2662
|
+
[p, s]
|
|
2663
|
+
), O = ke(() => N(!v), [v, N]), B = ke(() => N(!1), [N]), { panelMounted: Q, panelVisible: A, handleTransitionEnd: K } = Ls(v, t), { popupPositionStyle: J } = Ps(v, t, E, n);
|
|
2664
2664
|
ce(() => {
|
|
2665
2665
|
if (!v || t !== "popup") return;
|
|
2666
|
-
const
|
|
2667
|
-
var ee,
|
|
2668
|
-
(ee =
|
|
2666
|
+
const M = (G) => {
|
|
2667
|
+
var ee, fe;
|
|
2668
|
+
(ee = z.current) != null && ee.contains(G.target) || (fe = E.current) != null && fe.contains(G.target) || B();
|
|
2669
2669
|
};
|
|
2670
|
-
return document.addEventListener("mousedown",
|
|
2671
|
-
}, [v, t,
|
|
2670
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
2671
|
+
}, [v, t, B]), ce(() => {
|
|
2672
2672
|
if (!v) return;
|
|
2673
|
-
const
|
|
2674
|
-
G.key === "Escape" &&
|
|
2673
|
+
const M = (G) => {
|
|
2674
|
+
G.key === "Escape" && B();
|
|
2675
2675
|
};
|
|
2676
|
-
return document.addEventListener("keydown",
|
|
2677
|
-
}, [v,
|
|
2676
|
+
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
2677
|
+
}, [v, B]), ce(() => {
|
|
2678
2678
|
if (!v || t !== "panel") return;
|
|
2679
|
-
const
|
|
2680
|
-
return document.body.style.position = "fixed", document.body.style.top = `-${
|
|
2681
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0,
|
|
2679
|
+
const M = window.scrollY;
|
|
2680
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${M}px`, document.body.style.width = "100%", () => {
|
|
2681
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, M);
|
|
2682
2682
|
};
|
|
2683
2683
|
}, [v, t]);
|
|
2684
|
-
const
|
|
2684
|
+
const L = e ? typeof e == "function" ? e({ onClick: O, isOpen: v }) : (
|
|
2685
2685
|
// Non-function trigger: wrap in a span that delegates clicks to the trigger element.
|
|
2686
2686
|
// The wrapped element (e.g. <button>) handles its own keyboard accessibility.
|
|
2687
2687
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2688
|
-
/* @__PURE__ */ _("span", { onClick:
|
|
2689
|
-
) : null, P = e ? /* @__PURE__ */ _("span", { ref:
|
|
2688
|
+
/* @__PURE__ */ _("span", { onClick: O, style: { cursor: "pointer", display: "contents" }, children: e })
|
|
2689
|
+
) : null, P = e ? /* @__PURE__ */ _("span", { ref: E, className: le.triggerWrapper, children: L }) : null;
|
|
2690
2690
|
if (t === "popup") {
|
|
2691
|
-
const
|
|
2691
|
+
const M = {
|
|
2692
2692
|
backgroundColor: w.colors.secondary,
|
|
2693
2693
|
borderRadius: w.border.radius,
|
|
2694
2694
|
boxShadow: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",
|
|
2695
|
-
...
|
|
2695
|
+
...J,
|
|
2696
2696
|
...m
|
|
2697
2697
|
};
|
|
2698
2698
|
return /* @__PURE__ */ W(we, { children: [
|
|
@@ -2701,10 +2701,10 @@ const Cr = ({
|
|
|
2701
2701
|
/* @__PURE__ */ _(
|
|
2702
2702
|
"div",
|
|
2703
2703
|
{
|
|
2704
|
-
ref:
|
|
2704
|
+
ref: z,
|
|
2705
2705
|
className: [le.popup, h].filter(Boolean).join(" "),
|
|
2706
|
-
style:
|
|
2707
|
-
...
|
|
2706
|
+
style: M,
|
|
2707
|
+
...F,
|
|
2708
2708
|
children: r
|
|
2709
2709
|
}
|
|
2710
2710
|
),
|
|
@@ -2723,38 +2723,38 @@ const Cr = ({
|
|
|
2723
2723
|
/* @__PURE__ */ W(
|
|
2724
2724
|
"div",
|
|
2725
2725
|
{
|
|
2726
|
-
className: [le.panelOverlay,
|
|
2726
|
+
className: [le.panelOverlay, A ? le.panelOverlayVisible : ""].filter(Boolean).join(" "),
|
|
2727
2727
|
children: [
|
|
2728
2728
|
/* @__PURE__ */ _(
|
|
2729
2729
|
"div",
|
|
2730
2730
|
{
|
|
2731
2731
|
className: le.backdrop,
|
|
2732
|
-
style: { backgroundColor:
|
|
2733
|
-
onClick:
|
|
2732
|
+
style: { backgroundColor: A ? f : "transparent" },
|
|
2733
|
+
onClick: d ? B : void 0,
|
|
2734
2734
|
role: "presentation"
|
|
2735
2735
|
}
|
|
2736
2736
|
),
|
|
2737
2737
|
/* @__PURE__ */ W(
|
|
2738
2738
|
"div",
|
|
2739
2739
|
{
|
|
2740
|
-
ref:
|
|
2740
|
+
ref: z,
|
|
2741
2741
|
className: [
|
|
2742
2742
|
le.panel,
|
|
2743
2743
|
a === "right" ? le.panelRight : le.panelLeft,
|
|
2744
|
-
|
|
2744
|
+
A ? le.panelOpen : "",
|
|
2745
2745
|
h
|
|
2746
2746
|
].filter(Boolean).join(" "),
|
|
2747
2747
|
style: T,
|
|
2748
2748
|
role: "dialog",
|
|
2749
2749
|
"aria-modal": "true",
|
|
2750
2750
|
onTransitionEnd: K,
|
|
2751
|
-
...
|
|
2751
|
+
...F,
|
|
2752
2752
|
children: [
|
|
2753
2753
|
!u && /* @__PURE__ */ _(
|
|
2754
2754
|
"button",
|
|
2755
2755
|
{
|
|
2756
2756
|
className: le.panelCloseButton,
|
|
2757
|
-
onClick:
|
|
2757
|
+
onClick: B,
|
|
2758
2758
|
"aria-label": "Close panel",
|
|
2759
2759
|
type: "button",
|
|
2760
2760
|
children: /* @__PURE__ */ _(
|
|
@@ -2790,68 +2790,38 @@ const Cr = ({
|
|
|
2790
2790
|
document.body
|
|
2791
2791
|
)
|
|
2792
2792
|
] });
|
|
2793
|
-
},
|
|
2793
|
+
}, Bs = ({
|
|
2794
2794
|
isMobile: e,
|
|
2795
2795
|
isCompact: r,
|
|
2796
2796
|
mobile: t,
|
|
2797
2797
|
desktop: o
|
|
2798
2798
|
}) => {
|
|
2799
2799
|
const s = j();
|
|
2800
|
-
return
|
|
2800
|
+
return je(() => {
|
|
2801
2801
|
if (e) {
|
|
2802
|
-
const n =
|
|
2802
|
+
const n = r || t != null && t.compact ? "1.5rem" : "2rem";
|
|
2803
2803
|
return {
|
|
2804
2804
|
navStyles: {
|
|
2805
|
-
backgroundColor:
|
|
2806
|
-
color:
|
|
2807
|
-
fontSize:
|
|
2805
|
+
backgroundColor: (t == null ? void 0 : t.backgroundColor) || s.colors.primary,
|
|
2806
|
+
color: (t == null ? void 0 : t.color) || s.colors.secondary,
|
|
2807
|
+
fontSize: n,
|
|
2808
2808
|
...t == null ? void 0 : t.style
|
|
2809
|
-
},
|
|
2810
|
-
linkActiveStyles: {
|
|
2811
|
-
backgroundColor: i,
|
|
2812
|
-
color: d
|
|
2813
|
-
},
|
|
2814
|
-
linkHoverStyles: {
|
|
2815
|
-
// No hover styles on mobile (touch devices)
|
|
2816
|
-
}
|
|
2817
|
-
};
|
|
2818
|
-
} else {
|
|
2819
|
-
const n = o == null ? void 0 : o.backgroundColor, a = (o == null ? void 0 : o.color) || s.fonts.color, i = (o == null ? void 0 : o.hoverOpacity) ?? 0.5, d = o == null ? void 0 : o.activeBackgroundColor, u = o == null ? void 0 : o.activeColor;
|
|
2820
|
-
return {
|
|
2821
|
-
navStyles: {
|
|
2822
|
-
...n && { backgroundColor: n },
|
|
2823
|
-
color: a,
|
|
2824
|
-
...o == null ? void 0 : o.style
|
|
2825
|
-
},
|
|
2826
|
-
linkActiveStyles: {
|
|
2827
|
-
...d && { backgroundColor: d },
|
|
2828
|
-
...u && { color: u },
|
|
2829
|
-
opacity: d || u ? 1 : i
|
|
2830
|
-
},
|
|
2831
|
-
linkHoverStyles: {
|
|
2832
|
-
opacity: i
|
|
2833
2809
|
}
|
|
2834
2810
|
};
|
|
2835
2811
|
}
|
|
2812
|
+
return {
|
|
2813
|
+
navStyles: {
|
|
2814
|
+
...(o == null ? void 0 : o.backgroundColor) && { backgroundColor: o.backgroundColor },
|
|
2815
|
+
color: (o == null ? void 0 : o.color) || s.fonts.color,
|
|
2816
|
+
...o == null ? void 0 : o.style
|
|
2817
|
+
}
|
|
2818
|
+
};
|
|
2836
2819
|
}, [e, r, t, o, s]);
|
|
2837
|
-
},
|
|
2820
|
+
}, Ms = dt({
|
|
2838
2821
|
isMobile: !1,
|
|
2839
2822
|
setOpen: () => {
|
|
2840
2823
|
}
|
|
2841
|
-
})
|
|
2842
|
-
function Rs(e, r, t) {
|
|
2843
|
-
return {
|
|
2844
|
-
...e,
|
|
2845
|
-
...r.backgroundColor && {
|
|
2846
|
-
"--mobile-active-bg": r.backgroundColor
|
|
2847
|
-
},
|
|
2848
|
-
...r.color && { "--mobile-active-color": r.color },
|
|
2849
|
-
...t.opacity !== void 0 && {
|
|
2850
|
-
"--desktop-hover-opacity": t.opacity
|
|
2851
|
-
}
|
|
2852
|
-
};
|
|
2853
|
-
}
|
|
2854
|
-
const Ms = ({
|
|
2824
|
+
}), Rs = ({
|
|
2855
2825
|
open: e,
|
|
2856
2826
|
setOpen: r,
|
|
2857
2827
|
hamburgerRef: t,
|
|
@@ -2860,17 +2830,17 @@ const Ms = ({
|
|
|
2860
2830
|
hamburgerOpenColor: n,
|
|
2861
2831
|
panelBackground: a,
|
|
2862
2832
|
navClassName: i,
|
|
2863
|
-
cssProps:
|
|
2833
|
+
cssProps: f,
|
|
2864
2834
|
navProps: u,
|
|
2865
|
-
content:
|
|
2835
|
+
content: d,
|
|
2866
2836
|
onNavClick: h
|
|
2867
2837
|
}) => (
|
|
2868
2838
|
// Popover handles scroll lock, Escape key, backdrop, and slide animation.
|
|
2869
2839
|
// When open, a z-index is applied to the hamburger wrapper so it stays above the
|
|
2870
2840
|
// panel overlay — without setting z-index on the global triggerWrapper (which would
|
|
2871
|
-
// cause
|
|
2841
|
+
// cause NavDropdown panel dropdowns to appear behind their own triggers).
|
|
2872
2842
|
/* @__PURE__ */ _(
|
|
2873
|
-
|
|
2843
|
+
xr,
|
|
2874
2844
|
{
|
|
2875
2845
|
variant: "panel",
|
|
2876
2846
|
side: "right",
|
|
@@ -2880,7 +2850,7 @@ const Ms = ({
|
|
|
2880
2850
|
hideCloseButton: !0,
|
|
2881
2851
|
style: { padding: 0, backgroundColor: a },
|
|
2882
2852
|
trigger: ({ isOpen: m }) => /* @__PURE__ */ _("div", { style: m ? { position: "relative", zIndex: 1001 } : void 0, children: /* @__PURE__ */ _(
|
|
2883
|
-
|
|
2853
|
+
ms,
|
|
2884
2854
|
{
|
|
2885
2855
|
hamburgerRef: t,
|
|
2886
2856
|
visible: !0,
|
|
@@ -2891,13 +2861,13 @@ const Ms = ({
|
|
|
2891
2861
|
...s == null ? void 0 : s.hamburgerProps
|
|
2892
2862
|
}
|
|
2893
2863
|
) }),
|
|
2894
|
-
children: /* @__PURE__ */ W("nav", { ...u, className: i, style:
|
|
2864
|
+
children: /* @__PURE__ */ W("nav", { ...u, className: i, style: f, onClickCapture: h, children: [
|
|
2895
2865
|
/* @__PURE__ */ _("div", { className: Se.navHeader }),
|
|
2896
|
-
typeof
|
|
2866
|
+
typeof d == "function" ? d({ setOpen: r }) : d
|
|
2897
2867
|
] })
|
|
2898
2868
|
}
|
|
2899
2869
|
)
|
|
2900
|
-
),
|
|
2870
|
+
), Ds = ({
|
|
2901
2871
|
setOpen: e,
|
|
2902
2872
|
navClassName: r,
|
|
2903
2873
|
cssProps: t,
|
|
@@ -2913,87 +2883,110 @@ const Ms = ({
|
|
|
2913
2883
|
navProps: a,
|
|
2914
2884
|
disableMobileTreatment: i = !1
|
|
2915
2885
|
}) => {
|
|
2916
|
-
const [
|
|
2917
|
-
isMobile:
|
|
2918
|
-
isCompact:
|
|
2886
|
+
const [f, u] = ue(!1), d = Ee(null), h = j(), m = { ...h.breakpoints, ...t }, { maxWidth: F, unit: w } = ze(m.md), { maxWidth: p, unit: C } = ze(m.sm), $ = ie(`(max-width: ${F}${w})`), v = ie(`(max-width: ${p}${C})`), E = i ? !1 : $, z = i ? !1 : v, { navStyles: N } = Bs({
|
|
2887
|
+
isMobile: E,
|
|
2888
|
+
isCompact: z,
|
|
2919
2889
|
mobile: e,
|
|
2920
2890
|
desktop: r
|
|
2921
|
-
}),
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
},
|
|
2925
|
-
const P = N.target;
|
|
2926
|
-
P.closest("[data-navitem-trigger]") || P.closest("a, button") && u(!1);
|
|
2927
|
-
}, K = [
|
|
2891
|
+
}), O = { ...N, ...n }, B = (K) => {
|
|
2892
|
+
const J = K.target;
|
|
2893
|
+
J.closest("[data-navdropdown-trigger]") || J.closest("a, button") && u(!1);
|
|
2894
|
+
}, Q = [
|
|
2928
2895
|
Se.nav,
|
|
2929
2896
|
Se.navMobile,
|
|
2930
|
-
|
|
2897
|
+
z || e != null && e.compact ? Se.compact : "",
|
|
2931
2898
|
s
|
|
2932
|
-
].filter(Boolean).join(" "),
|
|
2933
|
-
return /* @__PURE__ */ _(
|
|
2934
|
-
|
|
2899
|
+
].filter(Boolean).join(" "), A = [Se.nav, Se.navDesktop, s].filter(Boolean).join(" ");
|
|
2900
|
+
return /* @__PURE__ */ _(Ms.Provider, { value: { isMobile: E, setOpen: u }, children: E ? /* @__PURE__ */ _(
|
|
2901
|
+
Rs,
|
|
2935
2902
|
{
|
|
2936
|
-
open:
|
|
2903
|
+
open: f,
|
|
2937
2904
|
setOpen: u,
|
|
2938
|
-
hamburgerRef:
|
|
2939
|
-
isCompact:
|
|
2905
|
+
hamburgerRef: d,
|
|
2906
|
+
isCompact: z,
|
|
2940
2907
|
mobile: e,
|
|
2941
2908
|
hamburgerOpenColor: (e == null ? void 0 : e.hamburgerColor) || (e == null ? void 0 : e.color) || h.colors.secondary,
|
|
2942
|
-
panelBackground:
|
|
2943
|
-
navClassName:
|
|
2944
|
-
cssProps:
|
|
2909
|
+
panelBackground: N.backgroundColor,
|
|
2910
|
+
navClassName: Q,
|
|
2911
|
+
cssProps: O,
|
|
2945
2912
|
navProps: a,
|
|
2946
2913
|
content: (e == null ? void 0 : e.content) || o,
|
|
2947
2914
|
onNavClick: B
|
|
2948
2915
|
}
|
|
2949
2916
|
) : /* @__PURE__ */ _(
|
|
2950
|
-
|
|
2917
|
+
Ds,
|
|
2951
2918
|
{
|
|
2952
2919
|
setOpen: u,
|
|
2953
|
-
navClassName:
|
|
2954
|
-
cssProps:
|
|
2920
|
+
navClassName: A,
|
|
2921
|
+
cssProps: O,
|
|
2955
2922
|
navProps: a,
|
|
2956
2923
|
content: (r == null ? void 0 : r.content) || o
|
|
2957
2924
|
}
|
|
2958
2925
|
) });
|
|
2959
|
-
},
|
|
2960
|
-
trigger:
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2926
|
+
}, Os = "NavDropdown-module__trigger___1PQZp", Hs = "NavDropdown-module__chevron___ZLAV7", js = "NavDropdown-module__chevronOpen___9mgjr", tt = {
|
|
2927
|
+
trigger: Os,
|
|
2928
|
+
chevron: Hs,
|
|
2929
|
+
chevronOpen: js
|
|
2930
|
+
};
|
|
2931
|
+
function Cr({
|
|
2932
|
+
isActive: e = !1,
|
|
2933
|
+
hoverOpacity: r = 0.5,
|
|
2934
|
+
color: t
|
|
2935
|
+
} = {}) {
|
|
2936
|
+
const o = j(), [s, n] = ue(!1);
|
|
2937
|
+
return {
|
|
2938
|
+
style: {
|
|
2939
|
+
color: t || o.fonts.color,
|
|
2940
|
+
fontWeight: 700,
|
|
2941
|
+
textDecoration: "none",
|
|
2942
|
+
opacity: e || s ? r : 1
|
|
2943
|
+
},
|
|
2944
|
+
onMouseEnter: () => n(!0),
|
|
2945
|
+
onMouseLeave: () => n(!1)
|
|
2946
|
+
};
|
|
2947
|
+
}
|
|
2948
|
+
const Rn = ({
|
|
2965
2949
|
label: e,
|
|
2966
2950
|
children: r,
|
|
2967
2951
|
dropdownVariant: t = "popup",
|
|
2968
2952
|
side: o = "left",
|
|
2969
2953
|
panelWidth: s = "75%",
|
|
2970
2954
|
color: n,
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2955
|
+
hoverOpacity: a,
|
|
2956
|
+
className: i,
|
|
2957
|
+
style: f,
|
|
2958
|
+
buttonProps: u
|
|
2974
2959
|
}) => {
|
|
2975
|
-
const
|
|
2960
|
+
const [d, h] = ue(!1), {
|
|
2961
|
+
style: m,
|
|
2962
|
+
onMouseEnter: F,
|
|
2963
|
+
onMouseLeave: w
|
|
2964
|
+
} = Cr({ isActive: d, color: n, hoverOpacity: a });
|
|
2976
2965
|
return /* @__PURE__ */ _(
|
|
2977
|
-
|
|
2966
|
+
xr,
|
|
2978
2967
|
{
|
|
2979
2968
|
variant: t,
|
|
2980
2969
|
side: o,
|
|
2981
2970
|
panelWidth: s,
|
|
2982
|
-
|
|
2971
|
+
isOpen: d,
|
|
2972
|
+
onOpenChange: h,
|
|
2973
|
+
trigger: ({ onClick: p }) => /* @__PURE__ */ W(
|
|
2983
2974
|
"button",
|
|
2984
2975
|
{
|
|
2985
2976
|
type: "button",
|
|
2986
|
-
className: [
|
|
2987
|
-
style: {
|
|
2988
|
-
"data-
|
|
2989
|
-
onClick:
|
|
2990
|
-
|
|
2977
|
+
className: [tt.trigger, i].filter(Boolean).join(" "),
|
|
2978
|
+
style: { ...m, ...f },
|
|
2979
|
+
"data-navdropdown-trigger": !0,
|
|
2980
|
+
onClick: p,
|
|
2981
|
+
onMouseEnter: F,
|
|
2982
|
+
onMouseLeave: w,
|
|
2983
|
+
...u,
|
|
2991
2984
|
children: [
|
|
2992
2985
|
e,
|
|
2993
2986
|
/* @__PURE__ */ _(
|
|
2994
2987
|
"span",
|
|
2995
2988
|
{
|
|
2996
|
-
className: [
|
|
2989
|
+
className: [tt.chevron, d ? tt.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2997
2990
|
"aria-hidden": "true",
|
|
2998
2991
|
children: /* @__PURE__ */ _(
|
|
2999
2992
|
"svg",
|
|
@@ -3023,7 +3016,24 @@ const Ms = ({
|
|
|
3023
3016
|
children: r
|
|
3024
3017
|
}
|
|
3025
3018
|
);
|
|
3026
|
-
},
|
|
3019
|
+
}, Dn = ({ isActive: e, hoverOpacity: r, color: t, children: o }) => {
|
|
3020
|
+
const { style: s, onMouseEnter: n, onMouseLeave: a } = Cr({
|
|
3021
|
+
isActive: e,
|
|
3022
|
+
hoverOpacity: r,
|
|
3023
|
+
color: t
|
|
3024
|
+
});
|
|
3025
|
+
return k.cloneElement(o, {
|
|
3026
|
+
style: { ...s, ...o.props.style },
|
|
3027
|
+
onMouseEnter: (i) => {
|
|
3028
|
+
var f, u;
|
|
3029
|
+
n(), (u = (f = o.props).onMouseEnter) == null || u.call(f, i);
|
|
3030
|
+
},
|
|
3031
|
+
onMouseLeave: (i) => {
|
|
3032
|
+
var f, u;
|
|
3033
|
+
a(), (u = (f = o.props).onMouseLeave) == null || u.call(f, i);
|
|
3034
|
+
}
|
|
3035
|
+
});
|
|
3036
|
+
}, Ts = ({
|
|
3027
3037
|
// Color props
|
|
3028
3038
|
color: e,
|
|
3029
3039
|
backgroundColor: r,
|
|
@@ -3035,7 +3045,7 @@ const Ms = ({
|
|
|
3035
3045
|
// Element-specific props
|
|
3036
3046
|
divProps: n
|
|
3037
3047
|
}) => {
|
|
3038
|
-
const a = j(), i = e || a.colors.primary,
|
|
3048
|
+
const a = j(), i = e || a.colors.primary, f = r || a.colors.secondary, u = /* @__PURE__ */ _(
|
|
3039
3049
|
"div",
|
|
3040
3050
|
{
|
|
3041
3051
|
...t ? void 0 : n,
|
|
@@ -3051,10 +3061,10 @@ const Ms = ({
|
|
|
3051
3061
|
// Apply user style (can override fontSize, etc.)
|
|
3052
3062
|
border: `0.1em solid ${i}`,
|
|
3053
3063
|
// Color borders always take precedence
|
|
3054
|
-
borderTop: `0.1em solid ${
|
|
3064
|
+
borderTop: `0.1em solid ${f}`
|
|
3055
3065
|
}
|
|
3056
3066
|
}
|
|
3057
|
-
),
|
|
3067
|
+
), d = /* @__PURE__ */ W(we, { children: [
|
|
3058
3068
|
u,
|
|
3059
3069
|
/* @__PURE__ */ _("style", { children: `
|
|
3060
3070
|
@keyframes spin {
|
|
@@ -3077,29 +3087,29 @@ const Ms = ({
|
|
|
3077
3087
|
...s
|
|
3078
3088
|
// Top level style prop overrides
|
|
3079
3089
|
},
|
|
3080
|
-
children:
|
|
3090
|
+
children: d
|
|
3081
3091
|
}
|
|
3082
|
-
) :
|
|
3083
|
-
},
|
|
3084
|
-
const [t, o] =
|
|
3092
|
+
) : d;
|
|
3093
|
+
}, On = ({ children: e, loadingComponent: r }) => {
|
|
3094
|
+
const [t, o] = ue(!1);
|
|
3085
3095
|
return ce(() => {
|
|
3086
3096
|
requestAnimationFrame(() => {
|
|
3087
3097
|
o(!0);
|
|
3088
3098
|
});
|
|
3089
|
-
}, []), t ? /* @__PURE__ */ _(we, { children: e }) : r || /* @__PURE__ */ _(
|
|
3090
|
-
},
|
|
3091
|
-
backdrop:
|
|
3092
|
-
modal:
|
|
3093
|
-
header:
|
|
3094
|
-
title:
|
|
3095
|
-
closeButton:
|
|
3096
|
-
content:
|
|
3097
|
-
actions:
|
|
3098
|
-
},
|
|
3099
|
-
stack:
|
|
3100
|
-
vertical:
|
|
3101
|
-
horizontal:
|
|
3102
|
-
},
|
|
3099
|
+
}, []), t ? /* @__PURE__ */ _(we, { children: e }) : r || /* @__PURE__ */ _(Ts, {});
|
|
3100
|
+
}, Is = "Modal-module__backdrop___GVUh4", Ws = "Modal-module__modal___aD7aP", Us = "Modal-module__header___ILG9i", qs = "Modal-module__title___A5OeE", Gs = "Modal-module__closeButton___3LpSf", Zs = "Modal-module__content___dWO-B", Qs = "Modal-module__actions___hY6zi", ye = {
|
|
3101
|
+
backdrop: Is,
|
|
3102
|
+
modal: Ws,
|
|
3103
|
+
header: Us,
|
|
3104
|
+
title: qs,
|
|
3105
|
+
closeButton: Gs,
|
|
3106
|
+
content: Zs,
|
|
3107
|
+
actions: Qs
|
|
3108
|
+
}, Ks = "Stack-module__stack___yUU-B", Js = "Stack-module__vertical___sKTyQ", Xs = "Stack-module__horizontal___YsvtV", rt = {
|
|
3109
|
+
stack: Ks,
|
|
3110
|
+
vertical: Js,
|
|
3111
|
+
horizontal: Xs
|
|
3112
|
+
}, Ys = ({
|
|
3103
3113
|
// Layout props
|
|
3104
3114
|
direction: e = "row",
|
|
3105
3115
|
// Content
|
|
@@ -3116,7 +3126,7 @@ const Ms = ({
|
|
|
3116
3126
|
t
|
|
3117
3127
|
].filter(Boolean).join(" ");
|
|
3118
3128
|
return /* @__PURE__ */ _("div", { ...s, className: n, style: o, children: r });
|
|
3119
|
-
},
|
|
3129
|
+
}, en = ({
|
|
3120
3130
|
isOpen: e,
|
|
3121
3131
|
onClose: r,
|
|
3122
3132
|
children: t,
|
|
@@ -3125,16 +3135,16 @@ const Ms = ({
|
|
|
3125
3135
|
closeOnBackdropClick: n = !0,
|
|
3126
3136
|
closeOnEscape: a = !0,
|
|
3127
3137
|
actions: i = [],
|
|
3128
|
-
resolveModal:
|
|
3138
|
+
resolveModal: f,
|
|
3129
3139
|
width: u = "500px",
|
|
3130
|
-
maxWidth:
|
|
3140
|
+
maxWidth: d = "90vw",
|
|
3131
3141
|
backgroundColor: h,
|
|
3132
3142
|
backdropColor: m = "rgba(0, 0, 0, 0.5)",
|
|
3133
|
-
className:
|
|
3143
|
+
className: F,
|
|
3134
3144
|
style: w,
|
|
3135
|
-
divProps:
|
|
3145
|
+
divProps: p
|
|
3136
3146
|
}) => {
|
|
3137
|
-
const
|
|
3147
|
+
const C = j(), $ = Ee(null), v = Ee(null), { maxWidth: E } = ze(C.breakpoints.md), z = ie(`(max-width: ${E - 1}px)`);
|
|
3138
3148
|
ce(() => {
|
|
3139
3149
|
if (e)
|
|
3140
3150
|
return v.current = document.activeElement, document.body.style.overflow = "hidden", $.current && $.current.focus(), () => {
|
|
@@ -3142,41 +3152,41 @@ const Ms = ({
|
|
|
3142
3152
|
};
|
|
3143
3153
|
}, [e]), ce(() => {
|
|
3144
3154
|
if (!e || !a) return;
|
|
3145
|
-
const
|
|
3155
|
+
const A = (K) => {
|
|
3146
3156
|
K.key === "Escape" && r();
|
|
3147
3157
|
};
|
|
3148
|
-
return document.addEventListener("keydown",
|
|
3158
|
+
return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
|
|
3149
3159
|
}, [e, a, r]);
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3160
|
+
const N = (A) => {
|
|
3161
|
+
A.target === A.currentTarget && n && r();
|
|
3152
3162
|
};
|
|
3153
3163
|
if (!e) return null;
|
|
3154
|
-
const
|
|
3164
|
+
const O = {
|
|
3155
3165
|
width: u,
|
|
3156
|
-
maxWidth:
|
|
3157
|
-
backgroundColor: h ||
|
|
3158
|
-
borderRadius:
|
|
3166
|
+
maxWidth: d,
|
|
3167
|
+
backgroundColor: h || C.colors.secondary,
|
|
3168
|
+
borderRadius: C.border.radius,
|
|
3159
3169
|
...w
|
|
3160
|
-
},
|
|
3170
|
+
}, B = {
|
|
3161
3171
|
backgroundColor: m
|
|
3162
3172
|
}, Q = /* @__PURE__ */ _(
|
|
3163
3173
|
"div",
|
|
3164
3174
|
{
|
|
3165
3175
|
className: ye.backdrop,
|
|
3166
|
-
style:
|
|
3167
|
-
onClick:
|
|
3176
|
+
style: B,
|
|
3177
|
+
onClick: N,
|
|
3168
3178
|
role: "presentation",
|
|
3169
3179
|
children: /* @__PURE__ */ W(
|
|
3170
3180
|
"div",
|
|
3171
3181
|
{
|
|
3172
3182
|
ref: $,
|
|
3173
|
-
className: [ye.modal,
|
|
3174
|
-
style:
|
|
3183
|
+
className: [ye.modal, F].filter(Boolean).join(" "),
|
|
3184
|
+
style: O,
|
|
3175
3185
|
role: "dialog",
|
|
3176
3186
|
"aria-modal": "true",
|
|
3177
3187
|
"aria-labelledby": o ? "modal-title" : void 0,
|
|
3178
3188
|
tabIndex: -1,
|
|
3179
|
-
...
|
|
3189
|
+
...p,
|
|
3180
3190
|
children: [
|
|
3181
3191
|
/* @__PURE__ */ W("div", { className: ye.header, children: [
|
|
3182
3192
|
o && /* @__PURE__ */ _("h2", { id: "modal-title", className: ye.title, children: o }),
|
|
@@ -3212,16 +3222,16 @@ const Ms = ({
|
|
|
3212
3222
|
)
|
|
3213
3223
|
] }),
|
|
3214
3224
|
/* @__PURE__ */ _("div", { className: ye.content, children: t }),
|
|
3215
|
-
i.length > 0 && /* @__PURE__ */ _(
|
|
3216
|
-
|
|
3225
|
+
i.length > 0 && /* @__PURE__ */ _(Ys, { direction: z ? "column" : "row", className: ye.actions, children: i.map((A, K) => /* @__PURE__ */ _(
|
|
3226
|
+
Ir,
|
|
3217
3227
|
{
|
|
3218
|
-
color:
|
|
3219
|
-
outline:
|
|
3220
|
-
disabled:
|
|
3228
|
+
color: A.color,
|
|
3229
|
+
outline: A.variant === "outline",
|
|
3230
|
+
disabled: A.disabled,
|
|
3221
3231
|
onClick: () => {
|
|
3222
|
-
|
|
3232
|
+
A.onClick ? A.onClick(f || r) : f ? f(A.value) : r();
|
|
3223
3233
|
},
|
|
3224
|
-
children:
|
|
3234
|
+
children: A.label
|
|
3225
3235
|
},
|
|
3226
3236
|
K
|
|
3227
3237
|
)) })
|
|
@@ -3232,7 +3242,7 @@ const Ms = ({
|
|
|
3232
3242
|
);
|
|
3233
3243
|
return st(Q, document.body);
|
|
3234
3244
|
}, kr = dt(null), Hn = ({ children: e }) => {
|
|
3235
|
-
const [r, t] =
|
|
3245
|
+
const [r, t] = ue(null), o = k.useCallback((u) => new Promise((d, h) => {
|
|
3236
3246
|
const m = Math.random().toString(36).substr(2, 9);
|
|
3237
3247
|
t({
|
|
3238
3248
|
id: m,
|
|
@@ -3240,12 +3250,12 @@ const Ms = ({
|
|
|
3240
3250
|
title: u.title,
|
|
3241
3251
|
actions: u.actions,
|
|
3242
3252
|
options: u.options,
|
|
3243
|
-
resolve:
|
|
3253
|
+
resolve: d,
|
|
3244
3254
|
reject: h
|
|
3245
3255
|
});
|
|
3246
|
-
}), []), s =
|
|
3247
|
-
t((
|
|
3248
|
-
}, []), n =
|
|
3256
|
+
}), []), s = k.useCallback((u) => {
|
|
3257
|
+
t((d) => (d && d.resolve(u), null));
|
|
3258
|
+
}, []), n = k.useCallback(
|
|
3249
3259
|
(u) => o({
|
|
3250
3260
|
title: u.title || "Confirm",
|
|
3251
3261
|
content: u.message,
|
|
@@ -3253,18 +3263,18 @@ const Ms = ({
|
|
|
3253
3263
|
{
|
|
3254
3264
|
label: u.cancelLabel || "Cancel",
|
|
3255
3265
|
variant: "outline",
|
|
3256
|
-
onClick: (
|
|
3266
|
+
onClick: (d) => d(!1)
|
|
3257
3267
|
},
|
|
3258
3268
|
{
|
|
3259
3269
|
label: u.confirmLabel || "Confirm",
|
|
3260
3270
|
color: u.confirmColor,
|
|
3261
|
-
onClick: (
|
|
3271
|
+
onClick: (d) => d(!0)
|
|
3262
3272
|
}
|
|
3263
3273
|
],
|
|
3264
3274
|
options: u.options
|
|
3265
3275
|
}),
|
|
3266
3276
|
[o]
|
|
3267
|
-
), a =
|
|
3277
|
+
), a = k.useCallback(
|
|
3268
3278
|
(u) => o({
|
|
3269
3279
|
title: u.title || "Alert",
|
|
3270
3280
|
content: u.message,
|
|
@@ -3272,15 +3282,15 @@ const Ms = ({
|
|
|
3272
3282
|
{
|
|
3273
3283
|
label: u.okLabel || "OK",
|
|
3274
3284
|
color: u.okColor,
|
|
3275
|
-
onClick: (
|
|
3285
|
+
onClick: (d) => d()
|
|
3276
3286
|
}
|
|
3277
3287
|
],
|
|
3278
3288
|
options: u.options
|
|
3279
3289
|
}),
|
|
3280
3290
|
[o]
|
|
3281
|
-
), i =
|
|
3291
|
+
), i = k.useCallback(() => {
|
|
3282
3292
|
s();
|
|
3283
|
-
}, [s]),
|
|
3293
|
+
}, [s]), f = k.useMemo(
|
|
3284
3294
|
() => ({
|
|
3285
3295
|
show: o,
|
|
3286
3296
|
resolve: s,
|
|
@@ -3289,10 +3299,10 @@ const Ms = ({
|
|
|
3289
3299
|
}),
|
|
3290
3300
|
[o, s, n, a]
|
|
3291
3301
|
);
|
|
3292
|
-
return /* @__PURE__ */ W(kr.Provider, { value:
|
|
3302
|
+
return /* @__PURE__ */ W(kr.Provider, { value: f, children: [
|
|
3293
3303
|
e,
|
|
3294
3304
|
r && /* @__PURE__ */ _(
|
|
3295
|
-
|
|
3305
|
+
en,
|
|
3296
3306
|
{
|
|
3297
3307
|
isOpen: !0,
|
|
3298
3308
|
onClose: i,
|
|
@@ -3309,10 +3319,10 @@ const Ms = ({
|
|
|
3309
3319
|
if (!e)
|
|
3310
3320
|
throw new Error("useModal must be used within a ModalProvider");
|
|
3311
3321
|
return e;
|
|
3312
|
-
},
|
|
3313
|
-
section:
|
|
3314
|
-
innerDiv:
|
|
3315
|
-
},
|
|
3322
|
+
}, tn = "ResponsiveSection-module__section___gBESK", rn = "ResponsiveSection-module__innerDiv___r1bky", Qt = {
|
|
3323
|
+
section: tn,
|
|
3324
|
+
innerDiv: rn
|
|
3325
|
+
}, Fr = ({
|
|
3316
3326
|
// Color props
|
|
3317
3327
|
backgroundColor: e,
|
|
3318
3328
|
color: r,
|
|
@@ -3323,40 +3333,40 @@ const Ms = ({
|
|
|
3323
3333
|
height: n,
|
|
3324
3334
|
padding: a,
|
|
3325
3335
|
paddingSm: i,
|
|
3326
|
-
margin:
|
|
3336
|
+
margin: f,
|
|
3327
3337
|
gap: u,
|
|
3328
|
-
verticalRhythm:
|
|
3338
|
+
verticalRhythm: d = 3,
|
|
3329
3339
|
// Content
|
|
3330
3340
|
children: h,
|
|
3331
3341
|
// Style overrides
|
|
3332
3342
|
className: m,
|
|
3333
|
-
style:
|
|
3343
|
+
style: F,
|
|
3334
3344
|
// Element-specific props
|
|
3335
3345
|
sectionProps: w
|
|
3336
3346
|
}) => {
|
|
3337
|
-
const
|
|
3347
|
+
const p = j(), C = ie(`(min-width: ${p.breakpoints.sm})`), $ = {
|
|
3338
3348
|
backgroundColor: e,
|
|
3339
|
-
color: r ||
|
|
3340
|
-
margin:
|
|
3341
|
-
...
|
|
3349
|
+
color: r || p.fonts.color,
|
|
3350
|
+
margin: f,
|
|
3351
|
+
...F
|
|
3342
3352
|
// Top level style prop overrides
|
|
3343
|
-
}, v = `calc(${
|
|
3344
|
-
"--max-width": t ||
|
|
3353
|
+
}, v = `calc(${p.fonts.rhythm} * ${d})`, E = C ? a || p.layout.padding : i || p.layout.paddingSm, z = {
|
|
3354
|
+
"--max-width": t || p.layout.maxWidth,
|
|
3345
3355
|
"--min-width": o,
|
|
3346
3356
|
"--width": s,
|
|
3347
3357
|
"--height": n,
|
|
3348
|
-
"--section-padding": `${v} ${
|
|
3358
|
+
"--section-padding": `${v} ${E}`,
|
|
3349
3359
|
"--gap": u
|
|
3350
|
-
},
|
|
3351
|
-
return /* @__PURE__ */ _("section", { ...w, className:
|
|
3352
|
-
},
|
|
3353
|
-
hero:
|
|
3354
|
-
content:
|
|
3355
|
-
},
|
|
3360
|
+
}, N = [Qt.section, m].filter(Boolean).join(" ");
|
|
3361
|
+
return /* @__PURE__ */ _("section", { ...w, className: N, style: $, children: /* @__PURE__ */ _("div", { className: Qt.innerDiv, style: z, children: h }) });
|
|
3362
|
+
}, on = "Hero-module__hero___IB2tg", sn = "Hero-module__content___rkkfQ", Kt = {
|
|
3363
|
+
hero: on,
|
|
3364
|
+
content: sn
|
|
3365
|
+
}, nn = ({
|
|
3356
3366
|
isMd: e = !1,
|
|
3357
3367
|
isLg: r = !1,
|
|
3358
3368
|
theme: t
|
|
3359
|
-
}) =>
|
|
3369
|
+
}) => je(() => {
|
|
3360
3370
|
const { rhythm: o } = t.fonts;
|
|
3361
3371
|
let s = `calc(${o} * 2) 0`, n = "2rem", a = "1.125rem";
|
|
3362
3372
|
return r ? (s = `calc(${o} * 4) 0`, n = "3.5rem", a = "1.5rem") : e && (s = `calc(${o} * 3.5) 0`, n = "3rem", a = "1.25rem"), {
|
|
@@ -3377,9 +3387,9 @@ const Ms = ({
|
|
|
3377
3387
|
style: s,
|
|
3378
3388
|
...n
|
|
3379
3389
|
}) => {
|
|
3380
|
-
const a = j(), i = [Kt.hero, o].filter(Boolean).join(" "),
|
|
3390
|
+
const a = j(), i = [Kt.hero, o].filter(Boolean).join(" "), f = (r == null ? void 0 : r.md) || a.breakpoints.md, u = (r == null ? void 0 : r.lg) || a.breakpoints.lg, d = ie(`(min-width: ${f})`), h = ie(`(min-width: ${u})`), m = nn({ isMd: d, isLg: h, theme: a });
|
|
3381
3391
|
return /* @__PURE__ */ _(
|
|
3382
|
-
|
|
3392
|
+
Fr,
|
|
3383
3393
|
{
|
|
3384
3394
|
className: i,
|
|
3385
3395
|
color: e || a.fonts.color,
|
|
@@ -3388,10 +3398,10 @@ const Ms = ({
|
|
|
3388
3398
|
children: /* @__PURE__ */ _("div", { className: Kt.content, children: t })
|
|
3389
3399
|
}
|
|
3390
3400
|
);
|
|
3391
|
-
},
|
|
3392
|
-
footer:
|
|
3393
|
-
container:
|
|
3394
|
-
},
|
|
3401
|
+
}, an = "Footer-module__footer___A76NF", ln = "Footer-module__container___QneNs", Jt = {
|
|
3402
|
+
footer: an,
|
|
3403
|
+
container: ln
|
|
3404
|
+
}, cn = ({
|
|
3395
3405
|
isSmallScreen: e = !1,
|
|
3396
3406
|
maxWidth: r,
|
|
3397
3407
|
minWidth: t,
|
|
@@ -3400,9 +3410,9 @@ const Ms = ({
|
|
|
3400
3410
|
paddingSm: n,
|
|
3401
3411
|
padding: a,
|
|
3402
3412
|
margin: i,
|
|
3403
|
-
gap:
|
|
3413
|
+
gap: f,
|
|
3404
3414
|
backgroundColor: u,
|
|
3405
|
-
color:
|
|
3415
|
+
color: d
|
|
3406
3416
|
} = {}) => {
|
|
3407
3417
|
const h = j();
|
|
3408
3418
|
return {
|
|
@@ -3412,11 +3422,11 @@ const Ms = ({
|
|
|
3412
3422
|
height: s,
|
|
3413
3423
|
padding: e ? n || h.layout.paddingSm : a || h.layout.padding,
|
|
3414
3424
|
margin: i,
|
|
3415
|
-
gap:
|
|
3425
|
+
gap: f,
|
|
3416
3426
|
backgroundColor: u,
|
|
3417
|
-
color:
|
|
3427
|
+
color: d || h.fonts.color
|
|
3418
3428
|
};
|
|
3419
|
-
},
|
|
3429
|
+
}, un = ({
|
|
3420
3430
|
// Color props
|
|
3421
3431
|
backgroundColor: e,
|
|
3422
3432
|
color: r,
|
|
@@ -3427,40 +3437,40 @@ const Ms = ({
|
|
|
3427
3437
|
height: n,
|
|
3428
3438
|
padding: a,
|
|
3429
3439
|
paddingSm: i,
|
|
3430
|
-
margin:
|
|
3440
|
+
margin: f,
|
|
3431
3441
|
gap: u,
|
|
3432
|
-
breakPoint:
|
|
3442
|
+
breakPoint: d,
|
|
3433
3443
|
// Content
|
|
3434
3444
|
children: h,
|
|
3435
3445
|
// Style overrides
|
|
3436
3446
|
className: m,
|
|
3437
|
-
style:
|
|
3447
|
+
style: F,
|
|
3438
3448
|
// Element-specific props
|
|
3439
3449
|
footerProps: w
|
|
3440
3450
|
}) => {
|
|
3441
|
-
const
|
|
3442
|
-
isSmallScreen:
|
|
3451
|
+
const p = j(), C = d || p.breakpoints.sm, { maxWidth: $, unit: v } = ze(C), E = ie(`(max-width: ${$}${v})`), z = cn({
|
|
3452
|
+
isSmallScreen: E,
|
|
3443
3453
|
maxWidth: t,
|
|
3444
3454
|
minWidth: o,
|
|
3445
3455
|
width: s,
|
|
3446
3456
|
height: n,
|
|
3447
3457
|
paddingSm: i,
|
|
3448
3458
|
padding: a,
|
|
3449
|
-
margin:
|
|
3459
|
+
margin: f,
|
|
3450
3460
|
gap: u,
|
|
3451
3461
|
backgroundColor: e,
|
|
3452
3462
|
color: r
|
|
3453
|
-
}),
|
|
3454
|
-
return /* @__PURE__ */ _("footer", { ...w, className: Jt.footer, children: /* @__PURE__ */ _("div", { className:
|
|
3455
|
-
},
|
|
3456
|
-
card:
|
|
3457
|
-
icon:
|
|
3458
|
-
title:
|
|
3459
|
-
content:
|
|
3460
|
-
},
|
|
3463
|
+
}), N = [Jt.container, m].filter(Boolean).join(" ");
|
|
3464
|
+
return /* @__PURE__ */ _("footer", { ...w, className: Jt.footer, children: /* @__PURE__ */ _("div", { className: N, style: { ...z, ...F }, children: h }) });
|
|
3465
|
+
}, dn = "FeatureCard-module__card___XQt66", fn = "FeatureCard-module__icon___dXJ92", mn = "FeatureCard-module__title___KxXyA", yn = "FeatureCard-module__content___68xkw", Re = {
|
|
3466
|
+
card: dn,
|
|
3467
|
+
icon: fn,
|
|
3468
|
+
title: mn,
|
|
3469
|
+
content: yn
|
|
3470
|
+
}, hn = ({
|
|
3461
3471
|
isMd: e = !1,
|
|
3462
3472
|
theme: r
|
|
3463
|
-
}) =>
|
|
3473
|
+
}) => je(() => {
|
|
3464
3474
|
const { rhythm: t } = r.fonts;
|
|
3465
3475
|
return {
|
|
3466
3476
|
"--feature-icon-font-size": e ? "3rem" : "2.5rem",
|
|
@@ -3482,28 +3492,28 @@ const Ms = ({
|
|
|
3482
3492
|
// Element-specific props
|
|
3483
3493
|
divProps: a
|
|
3484
3494
|
}) => {
|
|
3485
|
-
const i = j(),
|
|
3495
|
+
const i = j(), f = [Re.card, s].filter(Boolean).join(" "), u = e || i.breakpoints.md, d = ie(`(min-width: ${u})`), h = hn({ isMd: d, theme: i });
|
|
3486
3496
|
return /* @__PURE__ */ W(
|
|
3487
3497
|
"div",
|
|
3488
3498
|
{
|
|
3489
3499
|
...a,
|
|
3490
|
-
className:
|
|
3500
|
+
className: f,
|
|
3491
3501
|
style: { ...h, ...n },
|
|
3492
3502
|
children: [
|
|
3493
|
-
r && /* @__PURE__ */ _("div", { className:
|
|
3494
|
-
/* @__PURE__ */ _("h3", { className:
|
|
3495
|
-
/* @__PURE__ */ _("div", { className:
|
|
3503
|
+
r && /* @__PURE__ */ _("div", { className: Re.icon, children: r }),
|
|
3504
|
+
/* @__PURE__ */ _("h3", { className: Re.title, children: t }),
|
|
3505
|
+
/* @__PURE__ */ _("div", { className: Re.content, children: o })
|
|
3496
3506
|
]
|
|
3497
3507
|
}
|
|
3498
3508
|
);
|
|
3499
|
-
},
|
|
3500
|
-
section:
|
|
3501
|
-
grid:
|
|
3502
|
-
},
|
|
3509
|
+
}, pn = "FeatureGridSection-module__section___wZrbC", _n = "FeatureGridSection-module__grid___iwPJv", Xt = {
|
|
3510
|
+
section: pn,
|
|
3511
|
+
grid: _n
|
|
3512
|
+
}, gn = ({
|
|
3503
3513
|
columns: e,
|
|
3504
3514
|
isMd: r = !1,
|
|
3505
3515
|
isLg: t = !1
|
|
3506
|
-
}) =>
|
|
3516
|
+
}) => je(() => r ? r && !t && (e === 3 || e === 4) ? {
|
|
3507
3517
|
"--grid-template-columns": "repeat(2, 1fr)"
|
|
3508
3518
|
} : {
|
|
3509
3519
|
"--grid-template-columns": {
|
|
@@ -3526,18 +3536,18 @@ const Ms = ({
|
|
|
3526
3536
|
style: n,
|
|
3527
3537
|
...a
|
|
3528
3538
|
}) => {
|
|
3529
|
-
const i = j(),
|
|
3539
|
+
const i = j(), f = [Xt.section, s].filter(Boolean).join(" "), u = (r == null ? void 0 : r.md) || i.breakpoints.md, d = (r == null ? void 0 : r.lg) || i.breakpoints.lg, h = ie(`(min-width: ${u})`), m = ie(`(min-width: ${d})`), F = gn({ columns: e, isMd: h, isLg: m }), w = {
|
|
3530
3540
|
"--section-padding-vertical": `calc(${i.fonts.rhythm} * 2)`
|
|
3531
|
-
},
|
|
3532
|
-
...
|
|
3541
|
+
}, p = {
|
|
3542
|
+
...F,
|
|
3533
3543
|
gap: t,
|
|
3534
3544
|
...n
|
|
3535
3545
|
};
|
|
3536
|
-
return /* @__PURE__ */ _(
|
|
3537
|
-
},
|
|
3538
|
-
layoutContainer:
|
|
3539
|
-
content:
|
|
3540
|
-
main:
|
|
3546
|
+
return /* @__PURE__ */ _(Fr, { className: f, style: w, ...a, children: /* @__PURE__ */ _("div", { className: Xt.grid, style: p, children: o }) });
|
|
3547
|
+
}, vn = "PageLayout-module__layoutContainer___diLdT", bn = "PageLayout-module__content___h2mBr", Sn = "PageLayout-module__main___Sw7Pv", ot = {
|
|
3548
|
+
layoutContainer: vn,
|
|
3549
|
+
content: bn,
|
|
3550
|
+
main: Sn
|
|
3541
3551
|
}, Un = ({
|
|
3542
3552
|
// Content
|
|
3543
3553
|
header: e,
|
|
@@ -3550,58 +3560,60 @@ const Ms = ({
|
|
|
3550
3560
|
headerProps: n,
|
|
3551
3561
|
footerProps: a,
|
|
3552
3562
|
divProps: i,
|
|
3553
|
-
mainProps:
|
|
3563
|
+
mainProps: f
|
|
3554
3564
|
}) => {
|
|
3555
3565
|
const u = [ot.layoutContainer, o].filter(Boolean).join(" ");
|
|
3556
3566
|
return /* @__PURE__ */ W("div", { ...i, className: u, style: s, children: [
|
|
3557
3567
|
/* @__PURE__ */ W("div", { className: ot.content, children: [
|
|
3558
|
-
e && /* @__PURE__ */ _(
|
|
3559
|
-
/* @__PURE__ */ _("main", { ...
|
|
3568
|
+
e && /* @__PURE__ */ _(_s, { ...n, children: e }),
|
|
3569
|
+
/* @__PURE__ */ _("main", { ...f, className: ot.main, children: t })
|
|
3560
3570
|
] }),
|
|
3561
|
-
r && /* @__PURE__ */ _(
|
|
3571
|
+
r && /* @__PURE__ */ _(un, { ...a, children: r })
|
|
3562
3572
|
] });
|
|
3563
3573
|
};
|
|
3564
3574
|
export {
|
|
3565
|
-
|
|
3566
|
-
|
|
3575
|
+
Ir as Button,
|
|
3576
|
+
Vn as CSSReset,
|
|
3567
3577
|
at as Checkbox,
|
|
3568
3578
|
In as FeatureCard,
|
|
3569
3579
|
Wn as FeatureGridSection,
|
|
3570
|
-
|
|
3580
|
+
un as Footer,
|
|
3571
3581
|
En as Form,
|
|
3572
|
-
|
|
3573
|
-
|
|
3582
|
+
An as FormCheckbox,
|
|
3583
|
+
Bn as FormCheckboxGroup,
|
|
3574
3584
|
Ro as FormError,
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3585
|
+
pe as FormField,
|
|
3586
|
+
Io as FormGroup,
|
|
3587
|
+
zn as FormInput,
|
|
3578
3588
|
ft as FormLabel,
|
|
3579
|
-
|
|
3580
|
-
|
|
3589
|
+
Ln as FormRadio,
|
|
3590
|
+
Pn as FormRadioGroup,
|
|
3581
3591
|
Nn as FormSelect,
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3592
|
+
$n as FormTextarea,
|
|
3593
|
+
ms as Hamburger,
|
|
3594
|
+
_s as Header,
|
|
3585
3595
|
Tn as Hero,
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3596
|
+
Zo as Input,
|
|
3597
|
+
Ts as LoadingSpinner,
|
|
3598
|
+
en as Modal,
|
|
3589
3599
|
Hn as ModalProvider,
|
|
3590
|
-
|
|
3600
|
+
Rn as NavDropdown,
|
|
3601
|
+
Dn as NavLink,
|
|
3591
3602
|
Un as PageLayout,
|
|
3592
|
-
|
|
3603
|
+
xr as Popover,
|
|
3593
3604
|
wr as Radio,
|
|
3594
3605
|
Mn as ResponsiveNav,
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3606
|
+
Ms as ResponsiveNavContext,
|
|
3607
|
+
Fr as ResponsiveSection,
|
|
3608
|
+
ss as Select,
|
|
3609
|
+
Ys as Stack,
|
|
3610
|
+
On as StyleLoader,
|
|
3611
|
+
Yo as Textarea,
|
|
3612
|
+
Fn as ThemeProvider,
|
|
3613
|
+
ze as parseBreakpoint,
|
|
3614
|
+
Lo as useFormContext,
|
|
3604
3615
|
ie as useMediaQuery,
|
|
3605
3616
|
jn as useModal,
|
|
3617
|
+
Cr as useNavLinkStyles,
|
|
3606
3618
|
j as useTheme
|
|
3607
3619
|
};
|