@solace-health/ui 0.9.64 → 0.9.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import * as he from 'contentful';
13
13
  import { useMenuState, useClick, ControlledMenu, MenuButton, MenuItem, FocusableItem, MenuHeader, MenuDivider } from '@szhsin/react-menu';
14
14
  import { DateTime, Duration } from 'luxon';
15
15
  import { IMaskMixin } from 'react-imask';
16
- import l6, { getGeocode } from 'use-places-autocomplete';
16
+ import s6, { getGeocode } from 'use-places-autocomplete';
17
17
  import { useLoadScript } from '@react-google-maps/api';
18
18
 
19
19
  var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",fail:"#ff0000",gray:"#f3f3f3"},breakpoint:{small:"500px",medium:"800px",large:"1200px"},typography:{family:{body:"Lato, helvetica, sans-serif",heading:"'Mollie Glaston', serif",subHeading:"'Cinzel', sans-serif",script:"'Dancing Script', sans-serif"},weight:{normal:400,medium:500,semiBold:600,bold:700}}},at={components:{Switch:{handleSize:24,trackHeight:28,trackMinWidth:67},Tabs:{inkBarColor:"#285E50",itemActiveColor:"#285E50",itemSelectedColor:"#285E50",itemHoverColor:"#285E50",titleFontSize:16,colorBorderSecondary:"#AFC8BF"},Segmented:{fontSize:16,borderRadius:6,borderRadiusXS:6,controlHeight:36,controlHeightSM:30,controlHeightLG:40,itemColor:"#555555",itemActiveBg:"rgba(0, 0, 0, 0)",itemSelectedBg:"#fff",itemHoverBg:"rgba(212, 226, 221, 0.2)",colorBgLayout:"rgb(233, 240, 238)",itemHoverColor:"rgb(85, 85, 85)",itemSelectedColor:"#555555"},Collapse:{headerBg:"rgb(255, 255, 255)",colorBorder:"rgb(175, 200, 191)",colorFillAlter:"rgb(255, 255, 255)",fontSize:18,padding:20,contentPadding:"0px 16px 16px",headerPadding:"25px 16px",borderRadiusLG:10}},token:{colorInfo:"#285E50",colorLink:"#285E50",colorWarning:"#D7A13B",colorError:"#EE2932",colorPrimary:"#285E50",colorPrimaryActive:"#1D4339",fontFamily:"Lato, helvetica, sans-serif",fontSize:16,fontSizeSM:14,fontSizeLG:18,borderRadius:8,borderRadiusLG:20,colorBgMask:"rgba(0, 0, 0, 0.2)"}},st=({children:e,theme:t={}})=>jsx(ConfigProvider,{theme:{...at,...t},children:e});var lt=({children:e,theme:t={}})=>jsx(st,{theme:t,children:e});var A2=(i=>(i.XL="xl",i.LG="lg",i.MD="md",i.SM="sm",i.XS="xs",i))(A2||{});var pt=d.p`
@@ -166,6 +166,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
166
166
  cursor: pointer;
167
167
  line-height: 1;
168
168
  font-weight: 700;
169
+ text-decoration: underline;
169
170
 
170
171
  &:hover {
171
172
  text-decoration: none;
@@ -177,7 +178,6 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
177
178
  display: block;
178
179
  width: 100%;
179
180
  height: 1px;
180
- background: #101010;
181
181
  }
182
182
  `,_t=({children:e,isSubmitting:t=!1,toolTip:o={title:"",color:"black"},...r})=>jsx(Tooltip,{title:o?.title,color:"#E9F0EE",overlayInnerStyle:{color:"#1D4339",padding:"24px",fontSize:"18px"},children:jsx(Vt,{block:!0,type:"primary",loading:t,...r,children:e})}),zt=({children:e,isSubmitting:t=!1,toolTip:o={title:"",color:"black"},...r})=>jsx(Tooltip,{title:o?.title,color:"#E9F0EE",overlayInnerStyle:{color:"#1D4339",padding:"24px",fontSize:"18px"},children:jsx(Et,{block:!0,loading:t,...r,children:e})}),Pt=({children:e,isSubmitting:t=!1,toolTip:o={title:"",color:"black"},...r})=>jsx(Tooltip,{title:o?.title,color:"#E9F0EE",overlayInnerStyle:{color:"#1D4339",padding:"24px",fontSize:"18px"},children:jsx(Zt,{block:!0,loading:t,...r,children:e})}),Ft=({children:e,isSubmitting:t=!1,toolTip:o={title:"",color:"black"},...r})=>jsx(Tooltip,{title:o?.title,color:"#E9F0EE",overlayInnerStyle:{color:"#1D4339",padding:"24px",fontSize:"18px"},children:jsx(O1,{block:!0,type:"text",loading:t,...r,children:e})}),Dt=({children:e,toolTip:t={title:"",color:"black"},...o})=>jsx(Tooltip,{title:t?.title,color:"#E9F0EE",overlayInnerStyle:{color:"#1D4339",padding:"24px",fontSize:"18px"},children:jsx(Bt,{type:"link",...o,children:e})}),l2={Primary:_t,Outline:Pt,Unstyled:Ft,Secondary:zt,Link:Dt};var $t=d(Collapse)`
183
183
  .ant-collapse-header {
@@ -1057,7 +1057,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1057
1057
  margin-bottom: 5px;
1058
1058
  font-weight: ${({isLabelBold:e})=>e?"bold":"regular"};
1059
1059
  text-align: start;
1060
- `,P8=({label:e=null,isLabelBold:t=!0,name:o,required:r=!1,disabled:n=!1,defaultValue:i=void 0,options:a={},...s})=>{let{control:c,formState:{errors:l}}=useFormContext(),m=!!l[o];return jsxs(Fragment$1,{children:[e&&jsx(z8,{size:"lg",isLabelBold:t,children:e}),jsx(Controller,{render:({field:f})=>jsx(p2,{disabled:n,...s,...f,hasError:m}),name:o,defaultValue:i,rules:{required:r},control:c,...a}),m&&jsx(L,{text:l[o]?.message?.toString(),includeIcon:!1})]})},F1=P8;var T8=({label:e,name:t,formOptions:o={},description:r="",previewOnly:n=!1,errorMessage:i=void 0,advocateSignatureNeeded:a=!1,showIcon:s=!0,formStyle:c="MINIMAL",...l})=>{let{register:m,control:f,setValue:g,getValues:h,formState:{errors:x}}=useFormContext(),b=useRef(null),H=useRef(null),E=useRef(null),Z=useRef(null),B=[b,H,E,Z];useEffect(()=>{if(c==="MINIMAL")return;let _=h()[t];if(!_)return;let K=JSON.parse(_);B.forEach(a1=>{let M1=a1.current;M1&&(M1.value=K[M1.name]);});},[]);let S=()=>{let u=B.reduce((K,a1)=>a1.current?{...K,[a1.current.name]:a1.current.value}:K,{}),_=JSON.stringify(u);g(t,_,{shouldDirty:!0});},y=({field:u})=>jsx("input",{...u,style:{display:"none"}}),w=({field:u})=>jsxs(Fragment$1,{children:[jsxs(Qe,{previewOnly:n,children:[s&&jsx(N1,{}),jsx(e3,{...u,...l})]}),jsx("label",{htmlFor:t,children:jsx(C.Body,{children:e})})]}),p=jsxs(je,{children:[a&&jsxs(_2,{children:[jsxs(z2,{children:[jsx(F2,{placeholder:"Advocate Signature",disabled:n,...m("advocatesignature",o),ref:b,onChange:S,hasError:!!x?.advocate_signature}),jsx(P1,{children:"Advocate Signature"}),x?.advocate_signature&&jsx(L,{text:i,includeIcon:!1})]}),jsxs(P2,{children:[jsx(F1,{disabled:n,name:"advocatedate",ref:H,onChange:S}),jsx(P1,{children:"Advocate Signature"})]})]}),jsxs(_2,{children:[jsxs(z2,{children:[jsx(F2,{placeholder:"Client Signature",disabled:n,...m("clientsignature",o),ref:E,onChange:S,hasError:!!x?.clientsignature}),jsx(P1,{children:"Client Signature"}),x?.clientSignature&&jsx(L,{text:i,includeIcon:!1})]}),jsxs(P2,{children:[jsx(F1,{disabled:n,ref:Z,onChange:S,name:"clientdate"}),jsx(P1,{children:"Client Signature"})]})]})]});return jsxs(Ye,{previewOnly:n,children:[e&&jsx(P,{label:e,required:!0,isLabelBold:!0}),r,c!=="MINIMAL"?p:null,jsx(Controller,{render:c==="MINIMAL"?w:y,name:t,rules:o,control:f})]})},t3=T8;d.div`
1060
+ `,P8=({label:e=null,isLabelBold:t=!0,name:o,required:r=!1,disabled:n=!1,defaultValue:i=void 0,options:a={},...s})=>{let{control:c,formState:{errors:l}}=useFormContext(),m=!!l[o];return jsxs(Fragment$1,{children:[e&&jsx(z8,{size:"lg",isLabelBold:t,children:e}),jsx(Controller,{render:({field:f})=>jsx(p2,{disabled:n,...s,...f,hasError:m}),name:o,defaultValue:i,rules:{required:r},control:c,...a}),m&&jsx(L,{text:l[o]?.message?.toString(),includeIcon:!1})]})},F1=P8;var T8=({label:e,name:t,formOptions:o={},description:r="",previewOnly:n=!1,errorMessage:i=void 0,advocateSignatureNeeded:a=!1,showIcon:s=!0,formStyle:c="MINIMAL",...l})=>{let{register:m,control:f,setValue:g,getValues:h,formState:{errors:x}}=useFormContext(),b=useRef(null),H=useRef(null),E=useRef(null),Z=useRef(null),B=[b,H,E,Z];useEffect(()=>{if(c==="MINIMAL")return;let _=h()[t];if(!_)return;let K=JSON.parse(_);B.forEach(i1=>{let M1=i1.current;M1&&(M1.value=K[M1.name]);});},[]);let S=()=>{let u=B.reduce((K,i1)=>i1.current?{...K,[i1.current.name]:i1.current.value}:K,{}),_=JSON.stringify(u);g(t,_,{shouldDirty:!0});},y=({field:u})=>jsx("input",{...u,style:{display:"none"}}),w=({field:u})=>jsxs(Fragment$1,{children:[jsxs(Qe,{previewOnly:n,children:[s&&jsx(N1,{}),jsx(e3,{...u,...l})]}),jsx("label",{htmlFor:t,children:jsx(C.Body,{children:e})})]}),p=jsxs(je,{children:[a&&jsxs(_2,{children:[jsxs(z2,{children:[jsx(F2,{placeholder:"Advocate Signature",disabled:n,...m("advocatesignature",o),ref:b,onChange:S,hasError:!!x?.advocate_signature}),jsx(P1,{children:"Advocate Signature"}),x?.advocate_signature&&jsx(L,{text:i,includeIcon:!1})]}),jsxs(P2,{children:[jsx(F1,{disabled:n,name:"advocatedate",ref:H,onChange:S}),jsx(P1,{children:"Advocate Signature"})]})]}),jsxs(_2,{children:[jsxs(z2,{children:[jsx(F2,{placeholder:"Client Signature",disabled:n,...m("clientsignature",o),ref:E,onChange:S,hasError:!!x?.clientsignature}),jsx(P1,{children:"Client Signature"}),x?.clientSignature&&jsx(L,{text:i,includeIcon:!1})]}),jsxs(P2,{children:[jsx(F1,{disabled:n,ref:Z,onChange:S,name:"clientdate"}),jsx(P1,{children:"Client Signature"})]})]})]});return jsxs(Ye,{previewOnly:n,children:[e&&jsx(P,{label:e,required:!0,isLabelBold:!0}),r,c!=="MINIMAL"?p:null,jsx(Controller,{render:c==="MINIMAL"?w:y,name:t,rules:o,control:f})]})},t3=T8;d.div`
1061
1061
  margin-bottom: 32px;
1062
1062
  `;var o3=d.div`
1063
1063
  display: ${e=>e.isColumns?"grid":"flex"};
@@ -1316,16 +1316,16 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1316
1316
  border-radius: 10px;
1317
1317
  `;var Q8=d(C.Body)`
1318
1318
  margin-bottom: 12px;
1319
- `,j8=({label:e="",name:t,details:o="",placeholder:r="",className:n="",options:i=[],disabled:a=!1,mode:s=void 0,previewOnly:c=!1,isLabelBold:l=!0,formOptions:m={},onChange:f=()=>null,showPreview:g=!1,containerStyle:h={},allowClear:x=!0,loading:b=!1,value:H=void 0,errorMessage:E=void 0,defaultValue:Z=void 0})=>{let B=useFormContext();B.register(t,m);let{control:S,formState:{errors:y},getValues:w}=useFormContext(),p=!!y?.[t],_=w()[t],K=D=>{B.setValue(t,D),B.trigger(t),f(D);},a1=(D,H1)=>(H1?.label?.toString().toLowerCase()??"").includes(D.toLowerCase()),M1=(D,H1)=>{let rt=D?.label?.toString().toLowerCase()??"",nt=H1?.label?.toString().toLowerCase()??"";return rt.localeCompare(nt)},ot=({field:D})=>jsx(Select,{allowClear:x,loading:b,mode:s,showSearch:!0,onChange:K,placeholder:r,options:i,disabled:a||c,className:n,popupClassName:n,value:D.value??H,defaultValue:i.find(H1=>H1.value===Z),style:{width:"100%"},filterOption:a1,filterSort:M1});return jsxs("div",{style:h,children:[e&&jsx(P,{label:e,isLabelBold:l,required:!!m.required}),o&&jsx(Q8,{children:o}),jsx(Controller,{control:S,name:t,rules:m,render:ot}),a&&g&&jsx(Fragment$1,{children:"The test"}),jsx(V3,{children:i.map(D=>jsx(E3,{selected:D.value===_,children:D.label}))}),p&&jsx(L,{text:E,includeIcon:!1})]})},B3=j8;var i6=({label:e="Submit",isSubmitting:t=!1,hideWhenInvalid:o=!1,...r})=>{let n=useFormContext(),{isValid:i}=n.formState,s=useSpring((o?i:!0)?{position:"relative",zIndex:0,opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:250}}:{opacity:0,transform:"translate(0px, -3px)",display:"none",config:{duration:250}});return jsx(animated.div,{style:s,...r,children:jsx(l2.Primary,{htmlType:"submit",isSubmitting:t,...r,children:e})})},z3=i6;var C6=d.div`
1319
+ `,j8=({label:e="",name:t,details:o="",placeholder:r="",className:n="",options:i=[],disabled:a=!1,mode:s=void 0,previewOnly:c=!1,isLabelBold:l=!0,formOptions:m={},onChange:f=()=>null,showPreview:g=!1,containerStyle:h={},allowClear:x=!0,loading:b=!1,value:H=void 0,errorMessage:E=void 0,defaultValue:Z=void 0})=>{let B=useFormContext();B.register(t,m);let{control:S,formState:{errors:y},getValues:w}=useFormContext(),p=!!y?.[t],_=w()[t],K=D=>{B.setValue(t,D),B.trigger(t),f(D);},i1=(D,H1)=>(H1?.label?.toString().toLowerCase()??"").includes(D.toLowerCase()),M1=(D,H1)=>{let rt=D?.label?.toString().toLowerCase()??"",nt=H1?.label?.toString().toLowerCase()??"";return rt.localeCompare(nt)},ot=({field:D})=>jsx(Select,{allowClear:x,loading:b,mode:s,showSearch:!0,onChange:K,placeholder:r,options:i,disabled:a||c,className:n,popupClassName:n,value:D.value??H,defaultValue:i.find(H1=>H1.value===Z),style:{width:"100%"},filterOption:i1,filterSort:M1});return jsxs("div",{style:h,children:[e&&jsx(P,{label:e,isLabelBold:l,required:!!m.required}),o&&jsx(Q8,{children:o}),jsx(Controller,{control:S,name:t,rules:m,render:ot}),c&&g&&jsx(V3,{children:i.map(D=>jsx(E3,{selected:D.value===_,children:D.label}))}),p&&jsx(L,{text:E,includeIcon:!1})]})},B3=j8;var n6=({label:e="Submit",isSubmitting:t=!1,hideWhenInvalid:o=!1,...r})=>{let n=useFormContext(),{isValid:i}=n.formState,s=useSpring((o?i:!0)?{position:"relative",zIndex:0,opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:250}}:{opacity:0,transform:"translate(0px, -3px)",display:"none",config:{duration:250}});return jsx(animated.div,{style:s,...r,children:jsx(l2.Primary,{htmlType:"submit",isSubmitting:t,...r,children:e})})},z3=n6;var d6=d.div`
1320
1320
  position: relative;
1321
1321
  margin-bottom: 24px;
1322
1322
  z-index: 20;
1323
- `,c6=d(C.Body)`
1323
+ `,C6=d(C.Body)`
1324
1324
  margin-bottom: 5px;
1325
1325
  font-weight: bold;
1326
- `,m6=d(C.Body)`
1326
+ `,c6=d(C.Body)`
1327
1327
  margin-bottom: 12px;
1328
- `,f6=d.div`
1328
+ `,m6=d.div`
1329
1329
  position: relative;
1330
1330
  display: flex;
1331
1331
  align-items: center;
@@ -1336,7 +1336,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1336
1336
  border-radius: 8px;
1337
1337
  height: 50px;
1338
1338
  background-color: #fff;
1339
- `,g6=d(animated.div)`
1339
+ `,f6=d(animated.div)`
1340
1340
  position: absolute;
1341
1341
  background: #fff;
1342
1342
  border-radius: 8px;
@@ -1346,7 +1346,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1346
1346
  right: 0;
1347
1347
  max-height: 180px;
1348
1348
  overflow: scroll;
1349
- `,u6=d(animated.div)`
1349
+ `,g6=d(animated.div)`
1350
1350
  position: absolute;
1351
1351
  display: block;
1352
1352
  width: 45px;
@@ -1360,7 +1360,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1360
1360
  right: 20px;
1361
1361
  top: 17px;
1362
1362
  }
1363
- `,h6=d.div`
1363
+ `,u6=d.div`
1364
1364
  cursor: pointer;
1365
1365
  padding: 13px 24px;
1366
1366
  position: relative;
@@ -1371,7 +1371,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1371
1371
  color: #fff;
1372
1372
  }
1373
1373
  }
1374
- `,x6=d.input`
1374
+ `,h6=d.input`
1375
1375
  outline: none;
1376
1376
  border: none;
1377
1377
  background: none;
@@ -1384,24 +1384,24 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1384
1384
  padding: 0 20px;
1385
1385
  width: 100%;
1386
1386
  height: 100%;
1387
- `,y6=d(C.Body)`
1387
+ `,x6=d(C.Body)`
1388
1388
  margin-bottom: 24px;
1389
- `,b6=e=>{let t="",o="";e.address_components.forEach(i=>{let a=i.types.some(c=>c==="locality"),s=i.types.some(c=>c==="administrative_area_level_1");a?t=i.short_name:s&&(o=i.short_name);});let r=e.geometry.location.lat(),n=e.geometry.location.lng();return {city:t,state:o,lat:r,long:n}},w6=({handleSelect:e,option:t,value:o})=>{let{description:r}=t,n=r===o,i=r.replace(", USA","");return jsx(h6,{isCurrent:n,onClick:()=>e(i),children:jsx(C.Body,{size:"lg",children:i})})},v6=({label:e="",details:t="",required:o=!0,previewOnly:r=!1})=>{let n=useRef(),[i,a]=useState(!1),[s,c]=useState(!1),l=useFormContext();l.register("city",{required:o});let m=useSpring(i?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});useEffect(()=>{let y=w=>{i&&n.current&&!n.current.contains(w.target)&&a(!1);};return document.addEventListener("mousedown",w=>y(w)),()=>{document.removeEventListener("mousedown",w=>y(w));}},[i]);let f=l.getValues("city")?`${l.getValues("city")}, ${l.getValues("state")}`:"",{value:g,suggestions:{data:h,loading:x},setValue:b,clearSuggestions:H}=l6({requestOptions:{types:["locality","postal_code"],componentRestrictions:{country:"us"}}});useEffect(()=>{if(x){c(x);return}setTimeout(()=>{c(x);},2e3);},[x]);let E=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),Z=y=>{b(y.target.value),l.setValue("city",null),l.setValue("state",null),l.trigger("city"),y.target.value.length>=3&&a(!0);},B=y=>{b(y,!1),H(),!(y.length<=2)&&getGeocode({address:y}).then(w=>{let{city:p,state:u,lat:_,long:K}=b6(w[0]);l.setValue("city",p),l.setValue("state",u),l.setValue("lat",_),l.setValue("long",K),l.trigger("city");}).catch(w=>console.error(`Google Maps API error: ${w}`));},S=y=>{y.code==="Enter"&&y.preventDefault();};return jsxs(C6,{children:[jsx(c6,{size:"lg",children:e}),t&&jsx(m6,{children:t}),r?jsx(y6,{size:"md",children:f||"N/A"}):jsxs(f6,{children:[jsx(x6,{onKeyDown:S,value:g||f,onChange:y=>Z(y),type:"text"}),h.length>0&&jsx(g6,{style:m,ref:n,children:h.map(y=>jsx(w6,{handleSelect:B,option:y,value:g},y.description))}),jsx(u6,{style:E,children:jsx(H2,{size:"sm"})})]})]})},I3=e=>{let{isLoaded:t}=useLoadScript({googleMapsApiKey:e.api_key||process.env.GOOGLE_MAPS_API_KEY||"",libraries:["places"]});return t?jsx(v6,{...e}):null};var M6=({label:e="",name:t,...o})=>{let{setValue:r}=useFormContext(),n=d(C.Body)`
1389
+ `,y6=e=>{let t="",o="";e.address_components.forEach(i=>{let a=i.types.some(c=>c==="locality"),s=i.types.some(c=>c==="administrative_area_level_1");a?t=i.short_name:s&&(o=i.short_name);});let r=e.geometry.location.lat(),n=e.geometry.location.lng();return {city:t,state:o,lat:r,long:n}},b6=({handleSelect:e,option:t,value:o})=>{let{description:r}=t,n=r===o,i=r.replace(", USA","");return jsx(u6,{isCurrent:n,onClick:()=>e(i),children:jsx(C.Body,{size:"lg",children:i})})},w6=({label:e="",details:t="",required:o=!0,previewOnly:r=!1})=>{let n=useRef(),[i,a]=useState(!1),[s,c]=useState(!1),l=useFormContext();l.register("city",{required:o});let m=useSpring(i?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});useEffect(()=>{let y=w=>{i&&n.current&&!n.current.contains(w.target)&&a(!1);};return document.addEventListener("mousedown",w=>y(w)),()=>{document.removeEventListener("mousedown",w=>y(w));}},[i]);let f=l.getValues("city")?`${l.getValues("city")}, ${l.getValues("state")}`:"",{value:g,suggestions:{data:h,loading:x},setValue:b,clearSuggestions:H}=s6({requestOptions:{types:["locality","postal_code"],componentRestrictions:{country:"us"}}});useEffect(()=>{if(x){c(x);return}setTimeout(()=>{c(x);},2e3);},[x]);let E=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),Z=y=>{b(y.target.value),l.setValue("city",null),l.setValue("state",null),l.trigger("city"),y.target.value.length>=3&&a(!0);},B=y=>{b(y,!1),H(),!(y.length<=2)&&getGeocode({address:y}).then(w=>{let{city:p,state:u,lat:_,long:K}=y6(w[0]);l.setValue("city",p),l.setValue("state",u),l.setValue("lat",_),l.setValue("long",K),l.trigger("city");}).catch(w=>console.error(`Google Maps API error: ${w}`));},S=y=>{y.code==="Enter"&&y.preventDefault();};return jsxs(d6,{children:[jsx(C6,{size:"lg",children:e}),t&&jsx(c6,{children:t}),r?jsx(x6,{size:"md",children:f||"N/A"}):jsxs(m6,{children:[jsx(h6,{onKeyDown:S,value:g||f,onChange:y=>Z(y),type:"text"}),h.length>0&&jsx(f6,{style:m,ref:n,children:h.map(y=>jsx(b6,{handleSelect:B,option:y,value:g},y.description))}),jsx(g6,{style:E,children:jsx(H2,{size:"sm"})})]})]})},I3=e=>{let{isLoaded:t}=useLoadScript({googleMapsApiKey:e.api_key||process.env.GOOGLE_MAPS_API_KEY||"",libraries:["places"]});return t?jsx(w6,{...e}):null};var L6=({label:e="",name:t,...o})=>{let{setValue:r}=useFormContext(),n=d(C.Body)`
1390
1390
  margin-bottom: 5px;
1391
1391
  text-align: start;
1392
1392
  `,i=d.div`
1393
1393
  position: relative;
1394
1394
  margin-bottom: 24px;
1395
- `;return jsxs(i,{children:[e&&jsx(n,{children:e}),jsx(E2,{...o,onChange:s=>{r(t,s.value);}})]})},A3=M6;var G3=({color:e="#5A5A5A"})=>jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9999 10.9999H12.2099L11.9299 10.7299C13.1299 9.32989 13.7499 7.41989 13.4099 5.38989C12.9399 2.60989 10.6199 0.389893 7.81989 0.0498932C3.58989 -0.470107 0.0298932 3.08989 0.549893 7.31989C0.889893 10.1199 3.10989 12.4399 5.88989 12.9099C7.91989 13.2499 9.82989 12.6299 11.2299 11.4299L11.4999 11.7099V12.4999L15.7499 16.7499C16.1599 17.1599 16.8299 17.1599 17.2399 16.7499C17.6499 16.3399 17.6499 15.6699 17.2399 15.2599L12.9999 10.9999ZM6.99989 10.9999C4.50989 10.9999 2.49989 8.98989 2.49989 6.49989C2.49989 4.00989 4.50989 1.99989 6.99989 1.99989C9.48989 1.99989 11.4999 4.00989 11.4999 6.49989C11.4999 8.98989 9.48989 10.9999 6.99989 10.9999Z",fill:"#5A5A5A",color:e})});var E6=d.div`
1395
+ `;return jsxs(i,{children:[e&&jsx(n,{children:e}),jsx(E2,{...o,onChange:s=>{r(t,s.value);}})]})},A3=L6;var G3=({color:e="#5A5A5A"})=>jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9999 10.9999H12.2099L11.9299 10.7299C13.1299 9.32989 13.7499 7.41989 13.4099 5.38989C12.9399 2.60989 10.6199 0.389893 7.81989 0.0498932C3.58989 -0.470107 0.0298932 3.08989 0.549893 7.31989C0.889893 10.1199 3.10989 12.4399 5.88989 12.9099C7.91989 13.2499 9.82989 12.6299 11.2299 11.4299L11.4999 11.7099V12.4999L15.7499 16.7499C16.1599 17.1599 16.8299 17.1599 17.2399 16.7499C17.6499 16.3399 17.6499 15.6699 17.2399 15.2599L12.9999 10.9999ZM6.99989 10.9999C4.50989 10.9999 2.49989 8.98989 2.49989 6.49989C2.49989 4.00989 4.50989 1.99989 6.99989 1.99989C9.48989 1.99989 11.4999 4.00989 11.4999 6.49989C11.4999 8.98989 9.48989 10.9999 6.99989 10.9999Z",fill:"#5A5A5A",color:e})});var V6=d.div`
1396
1396
  position: relative;
1397
1397
  margin-bottom: 24px;
1398
1398
  z-index: 20;
1399
- `,Z6=d(C.Body)`
1399
+ `,E6=d(C.Body)`
1400
1400
  margin-bottom: 5px;
1401
1401
  font-weight: bold;
1402
- `,B6=d(C.Body)`
1402
+ `,Z6=d(C.Body)`
1403
1403
  margin-bottom: 12px;
1404
- `,_6=d.div`
1404
+ `,B6=d.div`
1405
1405
  position: relative;
1406
1406
  padding: 15px 23px;
1407
1407
  margin-top: 8px;
@@ -1418,7 +1418,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1418
1418
  left: 25px;
1419
1419
  top: 17px;
1420
1420
  }
1421
- `,z6=d(animated.div)`
1421
+ `,_6=d(animated.div)`
1422
1422
  position: absolute;
1423
1423
  background: #fff;
1424
1424
  border-radius: 8px;
@@ -1438,7 +1438,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1438
1438
  background: #3f937c;
1439
1439
  }
1440
1440
  }
1441
- `,P6=d.input`
1441
+ `,z6=d.input`
1442
1442
  outline: none;
1443
1443
  border: none;
1444
1444
  background: none;
@@ -1450,7 +1450,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1450
1450
  width: 100%;
1451
1451
  height: 100%;
1452
1452
  padding-left: 10px;
1453
- `,F6=d.div`
1453
+ `,P6=d.div`
1454
1454
  height: 32px;
1455
1455
  border-radius: 32px;
1456
1456
  margin-right: 10px;
@@ -1461,7 +1461,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1461
1461
  align-items: center;
1462
1462
  display: flex;
1463
1463
  margin-top: 8px;
1464
- `,D6=d.div`
1464
+ `,F6=d.div`
1465
1465
  display: flex;
1466
1466
  align-items: center;
1467
1467
  justify-content: center;
@@ -1475,7 +1475,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1475
1475
  border: 0.766898px solid;
1476
1476
  border-color: ${e=>e.isCurrent?"#285E50 !important":"#3f937c"};
1477
1477
  background: ${e=>e.isCurrent?"#285E50 !important":"#FFF"};
1478
- `,R6=({label:e="",name:t,details:o="",options:r=[],previewOnly:n=!1})=>{let i=useRef(),a=useFormContext(),[s,c]=useState(!1),[l,m]=useState(""),[f,g]=useState(a.getValues(t)||[]),h=useRef({search:l,keywords:f});useEffect(()=>{h.current={search:l,keywords:f};},[l,f]);let[x,b]=useState(r),H=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}}),E=r.find(p=>p===a.getValues(t)),Z=p=>{let u=[...h.current.keywords,p];m(""),g(u),a.setValue(t,u),c(!1);},B=p=>p?p.charAt(0).toUpperCase()+p.slice(1).toLowerCase():"",S=()=>{if(!h.current.search)return;let p=B(h.current.search);Z(p);};useEffect(()=>{let p=u=>{s&&i.current&&!i.current.contains(u.target)&&(S(),c(!1));};return document.addEventListener("mousedown",u=>p(u)),()=>{document.removeEventListener("mousedown",u=>p(u));}},[s]);let y=p=>{p.code==="Enter"&&(S(),p.preventDefault());},w=p=>{let u=f.filter(_=>_!==p);g(u),m(""),a.setValue(t,u);};return useEffect(()=>{if(c(!!l),l){let p=r.filter(u=>u.toLowerCase().match(l.toLowerCase()));b(p);}else b(r);},[l]),useEffect(()=>{let p=r.filter(u=>!f.includes(u));b(p);},[f]),jsxs(E6,{children:[jsx(Z6,{size:"lg",children:e}),o&&jsx(B6,{children:o}),!n&&jsxs(_6,{onClick:()=>c(!s),children:[jsx(G3,{}),E,jsx(P6,{onKeyDown:y,value:l,onChange:p=>m(p.target.value),type:"text",style:{marginLeft:"45px",width:"calc(100% - 80px)"}}),jsxs(z6,{style:H,ref:i,children:[x.map(p=>{let u=p===E;return jsxs(W3,{onClick:()=>Z(p),children:[jsx(C.Body,{size:"lg",children:p}),jsx(D6,{isCurrent:u,children:jsx(v.Check,{color:"#fff"})})]},p)}),!x.length&&jsx(W3,{onClick:()=>S(),children:jsx(C.Body,{size:"lg",children:"Add Option"})},"add")]})]}),jsxs("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"},children:[n&&f.length===0&&"N/A",f.map(p=>jsxs(F6,{onClick:()=>w(p),children:[p,!n&&jsx(G1,{})]},p))]})]})},U3=R6;var J3=d.div`
1478
+ `,D6=({label:e="",name:t,details:o="",options:r=[],previewOnly:n=!1})=>{let i=useRef(),a=useFormContext(),[s,c]=useState(!1),[l,m]=useState(""),[f,g]=useState(a.getValues(t)||[]),h=useRef({search:l,keywords:f});useEffect(()=>{h.current={search:l,keywords:f};},[l,f]);let[x,b]=useState(r),H=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}}),E=r.find(p=>p===a.getValues(t)),Z=p=>{let u=[...h.current.keywords,p];m(""),g(u),a.setValue(t,u),c(!1);},B=p=>p?p.charAt(0).toUpperCase()+p.slice(1).toLowerCase():"",S=()=>{if(!h.current.search)return;let p=B(h.current.search);Z(p);};useEffect(()=>{let p=u=>{s&&i.current&&!i.current.contains(u.target)&&(S(),c(!1));};return document.addEventListener("mousedown",u=>p(u)),()=>{document.removeEventListener("mousedown",u=>p(u));}},[s]);let y=p=>{p.code==="Enter"&&(S(),p.preventDefault());},w=p=>{let u=f.filter(_=>_!==p);g(u),m(""),a.setValue(t,u);};return useEffect(()=>{if(c(!!l),l){let p=r.filter(u=>u.toLowerCase().match(l.toLowerCase()));b(p);}else b(r);},[l]),useEffect(()=>{let p=r.filter(u=>!f.includes(u));b(p);},[f]),jsxs(V6,{children:[jsx(E6,{size:"lg",children:e}),o&&jsx(Z6,{children:o}),!n&&jsxs(B6,{onClick:()=>c(!s),children:[jsx(G3,{}),E,jsx(z6,{onKeyDown:y,value:l,onChange:p=>m(p.target.value),type:"text",style:{marginLeft:"45px",width:"calc(100% - 80px)"}}),jsxs(_6,{style:H,ref:i,children:[x.map(p=>{let u=p===E;return jsxs(W3,{onClick:()=>Z(p),children:[jsx(C.Body,{size:"lg",children:p}),jsx(F6,{isCurrent:u,children:jsx(v.Check,{color:"#fff"})})]},p)}),!x.length&&jsx(W3,{onClick:()=>S(),children:jsx(C.Body,{size:"lg",children:"Add Option"})},"add")]})]}),jsxs("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"},children:[n&&f.length===0&&"N/A",f.map(p=>jsxs(P6,{onClick:()=>w(p),children:[p,!n&&jsx(G1,{})]},p))]})]})},U3=D6;var J3=d.div`
1479
1479
  display: flex;
1480
1480
  flex: 1;
1481
1481
  align-items: center;
@@ -1485,7 +1485,7 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1485
1485
  gap: 8px;
1486
1486
  `,O2=d(C.Body)`
1487
1487
  color: rgba(135, 135, 135);
1488
- `;var{Dragger:I6}=Upload,T6=({label:e="",name:t,disabled:o=!1,description:r="",isLabelBold:n=!0,formOptions:i={},onChange:a=()=>null,defaultValue:s=void 0,containerStyle:c={},errorMessage:l=void 0})=>{useFormContext().register(t,i);let{formState:{errors:f}}=useFormContext(),g=!!f?.[t],h=()=>{console.log("Dropped files");};return jsxs("div",{style:c,children:[e&&jsx(P,{label:e,isLabelBold:n,required:!!i.required}),r,jsxs(I6,{name:"file",multiple:!0,action:"https://run.mocky.io/v3/435e224c-44fb-4773-9faf-380c5e6a2188",onChange:a,onDrop:h,capture:void 0,disabled:o,children:[jsx(v.Attachment,{}),jsxs(J3,{children:[jsx(O2,{children:jsx("span",{style:{fontWeight:"bold"},children:"DRAG FILE HERE"})}),jsx(O2,{size:"sm",children:"or, click to browse(10 MB max)"})]})]}),s?jsxs(Fragment$1,{children:["Current Value: ",s]}):null,g&&jsx(L,{text:l,includeIcon:!1})]})},q3=T6;var X6={Container:qe,Checkbox:Y1,CheckboxGroup:Je,DateSelect:F1,TextInput:w1,TimeSelect:A3,Radio:e2,RadioGroup:f3,CardRadioGroup:g3,Select:S3,SelectMenu:B3,Signature:t3,Submit:z3,LocationSelect:I3,Keyword:U3,Toggle:Z2,FileUpload:q3};var q6=d(animated.div)`
1488
+ `;var{Dragger:O6}=Upload,I6=({label:e="",name:t,disabled:o=!1,description:r="",isLabelBold:n=!0,formOptions:i={},onChange:a=()=>null,defaultValue:s=void 0,containerStyle:c={},errorMessage:l=void 0})=>{useFormContext().register(t,i);let{formState:{errors:f}}=useFormContext(),g=!!f?.[t],h=()=>{console.log("Dropped files");};return jsxs("div",{style:c,children:[e&&jsx(P,{label:e,isLabelBold:n,required:!!i.required}),r,jsxs(O6,{name:"file",multiple:!0,action:"https://run.mocky.io/v3/435e224c-44fb-4773-9faf-380c5e6a2188",onChange:a,onDrop:h,capture:void 0,disabled:o,children:[jsx(v.Attachment,{}),jsxs(J3,{children:[jsx(O2,{children:jsx("span",{style:{fontWeight:"bold"},children:"DRAG FILE HERE"})}),jsx(O2,{size:"sm",children:"or, click to browse(10 MB max)"})]})]}),s?jsxs(Fragment$1,{children:["Current Value: ",s]}):null,g&&jsx(L,{text:l,includeIcon:!1})]})},q3=I6;var U6={Container:qe,Checkbox:Y1,CheckboxGroup:Je,DateSelect:F1,TextInput:w1,TimeSelect:A3,Radio:e2,RadioGroup:f3,CardRadioGroup:g3,Select:S3,SelectMenu:B3,Signature:t3,Submit:z3,LocationSelect:I3,Keyword:U3,Toggle:Z2,FileUpload:q3};var K6=d(animated.div)`
1489
1489
  max-height: ${({size:e})=>(e||58)+24}px;
1490
1490
  padding: 12px;
1491
1491
  display: flex;
@@ -1499,25 +1499,25 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1499
1499
  &:hover {
1500
1500
  border-radius: 40px;
1501
1501
  }
1502
- `,Y6=d(animated.div)`
1502
+ `,q6=d(animated.div)`
1503
1503
  display: flex;
1504
1504
  flex-direction: column;
1505
1505
  flex-wrap: wrap;
1506
1506
  min-width: 180px;
1507
1507
  max-width: 180px;
1508
1508
  margin-left: 12px;
1509
- `,Q6=d.span`
1509
+ `,Y6=d.span`
1510
1510
  font-weight: 700;
1511
1511
  letter-spacing: 0.157px;
1512
1512
  color: #1d4339;
1513
- `,j6=d.p`
1513
+ `,Q6=d.p`
1514
1514
  font-size: 10px;
1515
1515
  letter-spacing: 0.157px;
1516
1516
  text-align: left;
1517
1517
  margin: 0;
1518
1518
  line-height: 12px;
1519
1519
  color: #1d4339;
1520
- `,e9=({contentfulConfig:e,size:t=58})=>{let[o,r]=useState(""),[n,i]=useSpring(()=>({from:{width:t+24,backgroundColor:"#fff",color:"#ffffff"}}));useEffect(()=>{new y1(e).getImage("vanta-logo").then(g=>{r(g);});},[]);let[a,s]=useSpring(()=>({from:{opacity:0},delay:100})),c=g=>({width:g?198+t:t+24,backgroundColor:g?"#d4e2dd":"#fff"}),l=g=>({opacity:g?1:0}),m=()=>{i(c(!0)),s(l(!0));},f=()=>{i(c(!1)),s(l(!1));};return o?jsxs(q6,{style:n,onMouseEnter:m,onMouseLeave:f,size:t,children:[jsx("img",{alt:"Vanta Logo",src:o,height:t,width:t}),jsxs(Y6,{style:a,children:[jsx(C.Body,{children:jsx(Q6,{children:"Guaranteed Security"})}),jsx(C.Body,{size:"xs",children:jsx(j6,{children:"We're committed to protecting your privacy. Solace is safe, secure, and HIPAA compliant\u2014 certified by Vanta."})})]})]}):null},t9=e9;function I2({isActive:e,color:t="#000"}){let o=useSpring(e?{transform:"rotate(0deg)",config:config.stiff}:{transform:"rotate(180deg)",config:config.stiff});return jsx(animated.div,{style:{...o,display:"flex",alignItems:"center"},children:jsx(v.Caret,{direction:"up",color:t})})}var i9=d(Menu)`
1520
+ `,j6=({contentfulConfig:e,size:t=58})=>{let[o,r]=useState(""),[n,i]=useSpring(()=>({from:{width:t+24,backgroundColor:"#fff",color:"#ffffff"}}));useEffect(()=>{new y1(e).getImage("vanta-logo").then(g=>{r(g);});},[]);let[a,s]=useSpring(()=>({from:{opacity:0},delay:100})),c=g=>({width:g?198+t:t+24,backgroundColor:g?"#d4e2dd":"#fff"}),l=g=>({opacity:g?1:0}),m=()=>{i(c(!0)),s(l(!0));},f=()=>{i(c(!1)),s(l(!1));};return o?jsxs(K6,{style:n,onMouseEnter:m,onMouseLeave:f,size:t,children:[jsx("img",{alt:"Vanta Logo",src:o,height:t,width:t}),jsxs(q6,{style:a,children:[jsx(C.Body,{children:jsx(Y6,{children:"Guaranteed Security"})}),jsx(C.Body,{size:"xs",children:jsx(Q6,{children:"We're committed to protecting your privacy. Solace is safe, secure, and HIPAA compliant\u2014 certified by Vanta."})})]})]}):null},e9=j6;function I2({isActive:e,color:t="#000"}){let o=useSpring(e?{transform:"rotate(0deg)",config:config.stiff}:{transform:"rotate(180deg)",config:config.stiff});return jsx(animated.div,{style:{...o,display:"flex",alignItems:"center"},children:jsx(v.Caret,{direction:"up",color:t})})}var n9=d(Menu)`
1521
1521
  .ant-menu-submenu {
1522
1522
  background-color: #fff;
1523
1523
  color: #555555 !important;
@@ -1560,8 +1560,8 @@ var u1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
1560
1560
  background-color: #fff !important;
1561
1561
  color: #000 !important;
1562
1562
  }
1563
- `,a9=({children:e,...t})=>jsx(i9,{...t,expandIcon:o=>!o?.hideExpandIcon&&jsx(I2,{isActive:o.isOpen,color:"#555555"}),children:e}),s9=({children:e,...t})=>jsx(Menu.Item,{...t,children:e}),l9=e=>jsx(Menu.Divider,{...e}),p9=({children:e,...t})=>jsx(Menu.SubMenu,{...t,children:e}),d9={Container:a9,MenuDivider:l9,MenuItem:s9,SubMenuContainer:p9};
1563
+ `,i9=({children:e,...t})=>jsx(n9,{...t,expandIcon:o=>!o?.hideExpandIcon&&jsx(I2,{isActive:o.isOpen,color:"#555555"}),children:e}),a9=({children:e,...t})=>jsx(Menu.Item,{...t,children:e}),s9=e=>jsx(Menu.Divider,{...e}),l9=({children:e,...t})=>jsx(Menu.SubMenu,{...t,children:e}),p9={Container:i9,MenuDivider:s9,MenuItem:a9,SubMenuContainer:l9};
1564
1564
 
1565
- export { Ht as Avatar, l2 as Button, Wt as Collapse, y1 as Contentful, $0 as ContentfulLottieFileSlug, p2 as DateSelect, Qt as Drawer, m8 as Dropdown, L as ErrorTypography, X6 as Form, v as Icons, H2 as LoadingSpinner, K0 as LottieAnimation, _1 as Menu, t4 as Modal, d9 as NavigationMenu, p8 as NumberedProgressSteps, O0 as Pill, n4 as Progress, l4 as Segmented, A2 as Size, d4 as SolaceLogo, lt as SolaceThemeProvider, m4 as Tabs, E2 as TimeSelect, Z2 as Toggle, q4 as Tooltip, C as Typography, t9 as VantaLogo };
1565
+ export { Ht as Avatar, l2 as Button, Wt as Collapse, y1 as Contentful, $0 as ContentfulLottieFileSlug, p2 as DateSelect, Qt as Drawer, m8 as Dropdown, L as ErrorTypography, U6 as Form, v as Icons, H2 as LoadingSpinner, K0 as LottieAnimation, _1 as Menu, t4 as Modal, p9 as NavigationMenu, p8 as NumberedProgressSteps, O0 as Pill, n4 as Progress, l4 as Segmented, A2 as Size, d4 as SolaceLogo, lt as SolaceThemeProvider, m4 as Tabs, E2 as TimeSelect, Z2 as Toggle, q4 as Tooltip, C as Typography, e9 as VantaLogo };
1566
1566
  //# sourceMappingURL=out.js.map
1567
1567
  //# sourceMappingURL=index.js.map