@solace-health/ui 0.9.35 → 0.9.36
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.cjs +21 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -12,7 +12,7 @@ export { default as styled } from '@emotion/styled';
|
|
|
12
12
|
import * as _emotion_react from '@emotion/react';
|
|
13
13
|
import * as react_hook_form from 'react-hook-form';
|
|
14
14
|
import { UseFormReturn } from 'react-hook-form';
|
|
15
|
-
export { FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
15
|
+
export { Controller, FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { MenuDividerProps } from 'antd/es/menu';
|
|
17
17
|
import { MenuItemType } from 'antd/es/menu/hooks/useItems';
|
|
18
18
|
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { default as styled } from '@emotion/styled';
|
|
|
12
12
|
import * as _emotion_react from '@emotion/react';
|
|
13
13
|
import * as react_hook_form from 'react-hook-form';
|
|
14
14
|
import { UseFormReturn } from 'react-hook-form';
|
|
15
|
-
export { FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
15
|
+
export { Controller, FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { MenuDividerProps } from 'antd/es/menu';
|
|
17
17
|
import { MenuItemType } from 'antd/es/menu/hooks/useItems';
|
|
18
18
|
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import '@emotion/react';
|
|
|
5
5
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
6
6
|
import { animated, useSpring, config } from '@react-spring/web';
|
|
7
7
|
import { useFormContext, get, Controller, useForm, FormProvider } from 'react-hook-form';
|
|
8
|
-
export { FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
8
|
+
export { Controller, FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form';
|
|
9
9
|
import o3, { Fragment, useState, useEffect, useMemo, useRef, useCallback } from 'react';
|
|
10
10
|
import v1 from 'dayjs';
|
|
11
11
|
import Lt from 'react-lottie-player';
|
|
@@ -336,12 +336,12 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
336
336
|
left: 2px;
|
|
337
337
|
right: 0;
|
|
338
338
|
z-index: -1;
|
|
339
|
-
`,R5=({active:e=!1,color:t="#555555"})=>{let o=useSpring(e?{opacity:1,transform:"translate(0px, 0px)"}:{opacity:0,transform:"translate(-2px, -4px)"});return jsxs(st,{children:[jsx("svg",{width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("g",{id:"financial-report",children:jsx("path",{id:"Vector",d:"M13.5 26.1406H14M13.5 23.1406H14M13.5 20.1406H14M16 26.1406H20M16 23.1406H20.5M21.5 12.1406H24.5M13.5 12.1406H19.5M16 20.1406H19.5M13.5 15.1406H26.5M25 26.1406V26.6406M25 19.6406V20.1406M26.5 21.6406C26.5 20.8121 25.828 20.1406 25 20.1406C24.172 20.1406 23.5 20.8121 23.5 21.6406C23.5 22.4691 24.172 23.1406 25 23.1406C25.828 23.1406 26.5 23.8121 26.5 24.6406C26.5 25.4691 25.828 26.1406 25 26.1406C24.172 26.1406 23.5 25.4691 23.5 24.6406M6.5 27.1406H9.5M11 6.14062H28.5C29.6045 6.14062 30.5 7.03612 30.5 8.14062V31.1406H9.5V8.14062C9.5 7.03612 8.6045 6.14062 7.5 6.14062C6.3955 6.14062 5.5 7.03612 5.5 8.14062V25.1406C5.5 26.2451 4.6045 27.1406 3.5 27.1406C2.3955 27.1406 1.5 26.2451 1.5 25.1406V2.14062H22.5V4.14062",stroke:t,"stroke-linecap":"round","stroke-linejoin":"round"})})}),jsx(at,{style:o,children:jsxs("svg",{width:"26",height:"30",viewBox:"0 0 26 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M1.49997 28C0.499943 25 -1.00001 4.00004 1.49997 2.00004C3.99995 4.3869e-05 13.9999 0.0454984 17.4999 1.00004C20.9999 1.95459 23.9999 5.00004 24.9999 7.00004C26 9.00004 25.5 16 25.5 18C25.5 20 18.4999 27 16.5 28C14.5 29 2.5 31 1.49997 28Z",fill:"url(#paint0_linear_13770_33952)"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_13770_33952",x1:"1.49994",y1:"2.50004",x2:"20.9999",y2:"24.5",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopColor:"#AFC8BF"}),jsx("stop",{offset:"1",stopColor:"#DEB260"})]})})]})})]})};var T5=()=>jsx("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{id:"Vector",d:"M0 14V12H2V14H0ZM4 14V12H6V14H4ZM8 14V12H10V14H8ZM0 10V8H2V10H0ZM4 10V8H6V10H4ZM8 10V8H10V10H8ZM0 6V4H2V6H0ZM4 6V4H6V6H4ZM8 6V4H10V6H8ZM0 2V0H2V2H0ZM4 2V0H6V2H4ZM8 2V0H10V2H8Z",fill:"black"})});var
|
|
339
|
+
`,R5=({active:e=!1,color:t="#555555"})=>{let o=useSpring(e?{opacity:1,transform:"translate(0px, 0px)"}:{opacity:0,transform:"translate(-2px, -4px)"});return jsxs(st,{children:[jsx("svg",{width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("g",{id:"financial-report",children:jsx("path",{id:"Vector",d:"M13.5 26.1406H14M13.5 23.1406H14M13.5 20.1406H14M16 26.1406H20M16 23.1406H20.5M21.5 12.1406H24.5M13.5 12.1406H19.5M16 20.1406H19.5M13.5 15.1406H26.5M25 26.1406V26.6406M25 19.6406V20.1406M26.5 21.6406C26.5 20.8121 25.828 20.1406 25 20.1406C24.172 20.1406 23.5 20.8121 23.5 21.6406C23.5 22.4691 24.172 23.1406 25 23.1406C25.828 23.1406 26.5 23.8121 26.5 24.6406C26.5 25.4691 25.828 26.1406 25 26.1406C24.172 26.1406 23.5 25.4691 23.5 24.6406M6.5 27.1406H9.5M11 6.14062H28.5C29.6045 6.14062 30.5 7.03612 30.5 8.14062V31.1406H9.5V8.14062C9.5 7.03612 8.6045 6.14062 7.5 6.14062C6.3955 6.14062 5.5 7.03612 5.5 8.14062V25.1406C5.5 26.2451 4.6045 27.1406 3.5 27.1406C2.3955 27.1406 1.5 26.2451 1.5 25.1406V2.14062H22.5V4.14062",stroke:t,"stroke-linecap":"round","stroke-linejoin":"round"})})}),jsx(at,{style:o,children:jsxs("svg",{width:"26",height:"30",viewBox:"0 0 26 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M1.49997 28C0.499943 25 -1.00001 4.00004 1.49997 2.00004C3.99995 4.3869e-05 13.9999 0.0454984 17.4999 1.00004C20.9999 1.95459 23.9999 5.00004 24.9999 7.00004C26 9.00004 25.5 16 25.5 18C25.5 20 18.4999 27 16.5 28C14.5 29 2.5 31 1.49997 28Z",fill:"url(#paint0_linear_13770_33952)"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_13770_33952",x1:"1.49994",y1:"2.50004",x2:"20.9999",y2:"24.5",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopColor:"#AFC8BF"}),jsx("stop",{offset:"1",stopColor:"#DEB260"})]})})]})})]})};var T5=()=>jsx("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{id:"Vector",d:"M0 14V12H2V14H0ZM4 14V12H6V14H4ZM8 14V12H10V14H8ZM0 10V8H2V10H0ZM4 10V8H6V10H4ZM8 10V8H10V10H8ZM0 6V4H2V6H0ZM4 6V4H6V6H4ZM8 6V4H10V6H8ZM0 2V0H2V2H0ZM4 2V0H6V2H4ZM8 2V0H10V2H8Z",fill:"black"})});var v={AddCircle:v2,Books:s5,Tools:z5,Files:_5,Records:F5,Bank:D5,Copy:M2,Caret:H2,Calendar:k2,CalendarClock:l5,Draggable:T5,Invoice:R5,Celebrate:d5,Checkbox:V2,ErrorExclamation:P2,Form:m5,FramedPainting:f5,House:V5,NoteDocument:n5,CircleExclamation:Z2,Check:B2,Close:H1,DefaultFile:F2,Heart:O2,HeartPulse:A2,IdBadge:I2,Key:u5,LightBulb:G2,LocationPin:U2,Message:x5,MoneyLayered:b5,Permissions:X2,Phone:J2,RatingStar:q2,ReceptionBell:v5,Rose:L5,Sparkles:Q2,Sun:e5,Signature:k1,TaskList:k5,Trash:o5};var pt=i.span`
|
|
340
340
|
display: flex;
|
|
341
341
|
align-items: center;
|
|
342
342
|
gap: 8px;
|
|
343
343
|
margin-bottom: ${({marginBottom:e})=>e}px;
|
|
344
|
-
`,dt=({children:e=null,text:t="",includeIcon:o=!0,marginBottom:r=0})=>jsxs(pt,{marginBottom:r,children:[o&&jsx(
|
|
344
|
+
`,dt=({children:e=null,text:t="",includeIcon:o=!0,marginBottom:r=0})=>jsxs(pt,{marginBottom:r,children:[o&&jsx(v.ErrorExclamation,{}),jsx(d.Body,{size:"xs",color:"red",children:e||t})]}),f1=dt;var gt=i(Tag)`
|
|
345
345
|
font-size: 16px;
|
|
346
346
|
height: 24px;
|
|
347
347
|
padding: 0 10px;
|
|
@@ -688,7 +688,7 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
688
688
|
.szh-menu--state-closing.szh-menu--dir-bottom {
|
|
689
689
|
animation: szh-menu-hide-slide-bottom 0.15s ease-in forwards;
|
|
690
690
|
}
|
|
691
|
-
`;function a2({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(
|
|
691
|
+
`;function a2({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 so=({children:e,cta:t,onItemClick:o=()=>null,onMenuChange:r=()=>null,className:n="",menuProps:s={menuButton:null},caretColor:a="#000",borderColor:l="#555555"})=>{let m={overflow:"auto",position:"archor",viewScroll:"auto",boundingBoxPadding:"20 0 50 0",gap:10,transition:!0,transitionTimeout:50},p=useRef(null),[c,g]=useMenuState({transition:!0}),f=useClick(c.state,g),u=c.state==="open"||c.state==="opening";return useEffect(()=>{r(c.state);},[c.state]),jsx(Fragment$1,{children:jsxs(J5,{className:`${n} ${u?"menu-open":"menu-closed"}`,ref:p,borderColor:l,...f,children:[jsx(K5,{children:t}),jsx(a2,{isActive:u,color:a}),jsx(ControlledMenu,{...c,anchorRef:p,onClose:()=>g(!1),onItemClick:o,onMenuChange:r,...m,...s,children:e})]})})},ao=({label:e,className:t=""})=>jsx(MenuButton,{className:t,children:e}),lo=({label:e,value:t,selected:o=!1,onClick:r=()=>null,disabled:n=!1,linkTo:s="",className:a=""})=>jsx(MenuItem,{className:`${a} ${o?"active":"inactive"}`,value:t,onClick:r,href:s,disabled:n,children:e}),po=({value:e,onChange:t=()=>null,className:o=""})=>jsx(FocusableItem,{children:({ref:r})=>jsx("input",{className:o,ref:r,type:"text",placeholder:"Type to filter",value:e,onChange:t})}),Co=({children:e,className:t=""})=>jsx(MenuHeader,{className:t,children:e}),mo=({className:e=""})=>jsx(MenuDivider,{className:e}),g1={Button:ao,Container:so,Search:po,Divider:mo,Header:Co,Item:lo};i.div`
|
|
692
692
|
padding: 0 20px;
|
|
693
693
|
border-radius: 10px;
|
|
694
694
|
border: 1px solid #7f7f7f;
|
|
@@ -877,7 +877,7 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
877
877
|
}
|
|
878
878
|
`;i(d.Body)`
|
|
879
879
|
margin-bottom: 24px;
|
|
880
|
-
`;var Qo=({name:e,label:t=null,details:o=null,type:r="text",options:n={},previewOnly:s=!1,textArea:a=!1,marginBottom:l="24px",isLabelBold:m=!0,format:p=String,errorMessage:c="This field is required",required:g=!1,...f})=>{let{register:u,control:b,
|
|
880
|
+
`;var Qo=({name:e,label:t=null,details:o=null,type:r="text",options:n={},previewOnly:s=!1,textArea:a=!1,marginBottom:l="24px",isLabelBold:m=!0,format:p=String,errorMessage:c="This field is required",required:g=!1,...f})=>{let{register:u,control:b,formState:{errors:w}}=useFormContext();return jsxs(Fragment$1,{children:[t&&jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[jsx(Jo,{size:"lg",isLabelBold:m,children:t}),g&&jsx("div",{style:{color:"#DA4D54"},children:"*"})]}),o&&jsx(Yo,{children:o}),a?jsx("div",{children:s?jsx(a3,{...f,...u(e,n),marginBottom:l,error:w?.[e],disabled:!0,style:{backgroundColor:"#EEEEEE",color:"#7F7F7F",borderStyle:"none",marginBottom:24}}):jsx(a3,{...f,...u(e,n),marginBottom:l,error:w?.[e]})}):jsx("div",{style:{width:"100%"},children:s?jsx(s3,{size:"md",...f,disabled:!0,style:{backgroundColor:"#EEEEEE",color:"#7F7F7F",borderStyle:"none",marginBottom:24}}):jsxs("div",{style:{marginBottom:w?.[e]?"6px":l,display:"flex",flexDirection:"column",position:"relative"},children:[jsx(Controller,{render:Z=>jsx(s3,{...f,unmask:!1,mask:p,name:Z.field.name,onBlur:Z.field.onBlur,defaultValue:n.value||Z.field.value,onAccept:E=>Z.field.onChange({target:{value:E}}),marginBottom:l,type:r,error:w?.[e]}),name:e,rules:n,control:b}),jsx(Ko,{children:w?.[e]&&jsx(v.ErrorExclamation,{})}),w?.[e]&&jsx(f1,{text:c,includeIcon:!1})]})})]})},s1=Qo;var t4=i.div`
|
|
881
881
|
margin-bottom: 32px;
|
|
882
882
|
`,o4=i.div`
|
|
883
883
|
display: ${({inline:e})=>e?"flex":"block"};
|
|
@@ -1233,7 +1233,7 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
1233
1233
|
left: 0;
|
|
1234
1234
|
`;i(d.Body)`
|
|
1235
1235
|
margin-bottom: 24px;
|
|
1236
|
-
`;var T4=({label:e="",name:t,details:o="",placeholder:r="",options:n=[],allowInput:s=!1,previewOnly:a=!1,isLabelBold:l=!0,formOptions:m={},onChange:p=()=>null})=>{let c=useRef(),g=useFormContext();g.register(t,m);let[f,u]=useState(!1),[b,
|
|
1236
|
+
`;var T4=({label:e="",name:t,details:o="",placeholder:r="",options:n=[],allowInput:s=!1,previewOnly:a=!1,isLabelBold:l=!0,formOptions:m={},onChange:p=()=>null})=>{let c=useRef(),g=useFormContext();g.register(t,m);let[f,u]=useState(!1),[b,w]=useState(""),[Z,E]=useState(n),e1=useSpring(f?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});useEffect(()=>{let h=C=>{f&&c.current&&!c.current.contains(C.target)&&u(!1);};return document.addEventListener("mousedown",C=>h(C)),()=>{document.removeEventListener("mousedown",C=>h(C));}},[f]);let t1=n.find(h=>h.value===g.getValues(t))?.label,W=h=>{w(""),g.setValue(t,h.value),g.trigger(t),p&&p(h),u(!1);};useEffect(()=>{if(u(!!b),b){let h=n.filter(C=>C.value.toLowerCase().match(b.toLowerCase()));E(h),g.setValue(t,b);}else E(n);},[b,n.length]);let x=h=>{h.code==="Enter"&&h.preventDefault();};return jsxs(E4,{children:[jsx(F4,{size:"lg",isLabelBold:l,children:e}),o&&jsx(P4,{children:o}),a?jsxs(h3,{onClick:()=>u(!f),previewOnly:!0,children:[jsx("i",{style:{color:"#7F7F7F"},children:"--Select--"}),jsx(v.Caret,{direction:"down",color:"#7F7F7F"})]}):jsxs(h3,{onClick:()=>u(!f),children:[t1||jsx("i",{children:r}),s&&jsx(A4,{onKeyDown:x,value:b,onChange:h=>w(h.target.value),type:"text"}),jsx(v.Caret,{direction:f?"up":"down"}),jsx(D4,{style:e1,ref:c,children:Z.map(h=>{let{label:C}=h,y=h.label===t1;return jsxs(O4,{onClick:()=>W(h),children:[jsx(d.Body,{size:"lg",children:C}),jsx(R4,{isCurrent:y,children:jsx(v.Check,{color:"#fff"})})]},h.value)})})]})]})},x3=T4;var N4=({label:e="Submit",isSubmitting:t=!1,hideWhenInvalid:o=!1,...r})=>{let n=useFormContext(),{isValid:s}=n.formState,l=useSpring((o?s:!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:l,...r,children:jsx(G1.Primary,{htmlType:"submit",isSubmitting:t,...r,children:e})})},b3=N4;var Y4=i.div`
|
|
1237
1237
|
position: relative;
|
|
1238
1238
|
margin-bottom: 24px;
|
|
1239
1239
|
z-index: 20;
|
|
@@ -1303,7 +1303,7 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
1303
1303
|
height: 100%;
|
|
1304
1304
|
`,n8=i(d.Body)`
|
|
1305
1305
|
margin-bottom: 24px;
|
|
1306
|
-
`,i8=e=>{let t="",o="";e.address_components.forEach(s=>{let a=s.types.some(m=>m==="locality"),l=s.types.some(m=>m==="administrative_area_level_1");a?t=s.short_name:l&&(o=s.short_name);});let r=e.geometry.location.lat(),n=e.geometry.location.lng();return {city:t,state:o,lat:r,long:n}},s8=({handleSelect:e,option:t,value:o})=>{let{description:r}=t,n=r===o,s=r.replace(", USA","");return jsx(o8,{isCurrent:n,onClick:()=>e(s),children:jsx(d.Body,{size:"lg",children:s})})},a8=({label:e="",details:t="",required:o=!0,previewOnly:r=!1})=>{let n=useRef(),[s,a]=useState(!1),[l,m]=useState(!1),p=useFormContext();p.register("city",{required:o});let c=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});useEffect(()=>{let x=h=>{s&&n.current&&!n.current.contains(h.target)&&a(!1);};return document.addEventListener("mousedown",h=>x(h)),()=>{document.removeEventListener("mousedown",h=>x(h));}},[s]);let g=p.getValues("city")?`${p.getValues("city")}, ${p.getValues("state")}`:"",{value:f,suggestions:{data:u,loading:b},setValue:
|
|
1306
|
+
`,i8=e=>{let t="",o="";e.address_components.forEach(s=>{let a=s.types.some(m=>m==="locality"),l=s.types.some(m=>m==="administrative_area_level_1");a?t=s.short_name:l&&(o=s.short_name);});let r=e.geometry.location.lat(),n=e.geometry.location.lng();return {city:t,state:o,lat:r,long:n}},s8=({handleSelect:e,option:t,value:o})=>{let{description:r}=t,n=r===o,s=r.replace(", USA","");return jsx(o8,{isCurrent:n,onClick:()=>e(s),children:jsx(d.Body,{size:"lg",children:s})})},a8=({label:e="",details:t="",required:o=!0,previewOnly:r=!1})=>{let n=useRef(),[s,a]=useState(!1),[l,m]=useState(!1),p=useFormContext();p.register("city",{required:o});let c=useSpring(s?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});useEffect(()=>{let x=h=>{s&&n.current&&!n.current.contains(h.target)&&a(!1);};return document.addEventListener("mousedown",h=>x(h)),()=>{document.removeEventListener("mousedown",h=>x(h));}},[s]);let g=p.getValues("city")?`${p.getValues("city")}, ${p.getValues("state")}`:"",{value:f,suggestions:{data:u,loading:b},setValue:w,clearSuggestions:Z}=X4({requestOptions:{types:["locality","postal_code"],componentRestrictions:{country:"us"}}});useEffect(()=>{if(b){m(b);return}setTimeout(()=>{m(b);},2e3);},[b]);let E=useSpring(l?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),e1=x=>{w(x.target.value),p.setValue("city",null),p.setValue("state",null),p.trigger("city"),x.target.value.length>=3&&a(!0);},t1=x=>{w(x,!1),Z(),!(x.length<=2)&&getGeocode({address:x}).then(h=>{let{city:C,state:y,lat:I1,long:I3}=i8(h[0]);p.setValue("city",C),p.setValue("state",y),p.setValue("lat",I1),p.setValue("long",I3),p.trigger("city");}).catch(h=>console.error(`Google Maps API error: ${h}`));},W=x=>{x.code==="Enter"&&x.preventDefault();};return jsxs(Y4,{children:[jsx(q4,{size:"lg",children:e}),t&&jsx(Q4,{children:t}),r?jsx(n8,{size:"md",children:g||"N/A"}):jsxs(j4,{children:[jsx(r8,{onKeyDown:W,value:f||g,onChange:x=>e1(x),type:"text"}),u.length>0&&jsx(e8,{style:c,ref:n,children:u.map(x=>jsx(s8,{handleSelect:t1,option:x,value:f},x.description))}),jsx(t8,{style:E,children:jsx(i2,{size:"sm"})})]})]})},k3=e=>{let{isLoaded:t}=useLoadScript({googleMapsApiKey:e.api_key||process.env.GOOGLE_MAPS_API_KEY||"",libraries:["places"]});return t?jsx(a8,{...e}):null};var p8=({label:e="",name:t,...o})=>{let{setValue:r}=useFormContext(),n=i(d.Body)`
|
|
1307
1307
|
margin-bottom: 5px;
|
|
1308
1308
|
text-align: start;
|
|
1309
1309
|
`,s=i.div`
|
|
@@ -1392,14 +1392,14 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
1392
1392
|
border: 0.766898px solid;
|
|
1393
1393
|
border-color: ${e=>e.isCurrent?"#285E50 !important":"#3f937c"};
|
|
1394
1394
|
background: ${e=>e.isCurrent?"#285E50 !important":"#FFF"};
|
|
1395
|
-
`,v8=({label:e="",name:t,details:o="",options:r=[],previewOnly:n=!1})=>{let s=useRef(),a=useFormContext(),[l,m]=useState(!1),[p,c]=useState(""),[g,f]=useState(a.getValues(t)||[]),u=useRef({search:p,keywords:g});useEffect(()=>{u.current={search:p,keywords:g};},[p,g]);let[b,
|
|
1395
|
+
`,v8=({label:e="",name:t,details:o="",options:r=[],previewOnly:n=!1})=>{let s=useRef(),a=useFormContext(),[l,m]=useState(!1),[p,c]=useState(""),[g,f]=useState(a.getValues(t)||[]),u=useRef({search:p,keywords:g});useEffect(()=>{u.current={search:p,keywords:g};},[p,g]);let[b,w]=useState(r),Z=useSpring(l?{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(C=>C===a.getValues(t)),e1=C=>{let y=[...u.current.keywords,C];c(""),f(y),a.setValue(t,y),m(!1);},t1=C=>C?C.charAt(0).toUpperCase()+C.slice(1).toLowerCase():"",W=()=>{if(!u.current.search)return;let C=t1(u.current.search);e1(C);};useEffect(()=>{let C=y=>{l&&s.current&&!s.current.contains(y.target)&&(W(),m(!1));};return document.addEventListener("mousedown",y=>C(y)),()=>{document.removeEventListener("mousedown",y=>C(y));}},[l]);let x=C=>{C.code==="Enter"&&(W(),C.preventDefault());},h=C=>{let y=g.filter(I1=>I1!==C);f(y),c(""),a.setValue(t,y);};return useEffect(()=>{if(m(!!p),p){let C=r.filter(y=>y.toLowerCase().match(p.toLowerCase()));w(C);}else w(r);},[p]),useEffect(()=>{let C=r.filter(y=>!g.includes(y));w(C);},[g]),jsxs(f8,{children:[jsx(g8,{size:"lg",children:e}),o&&jsx(u8,{children:o}),!n&&jsxs(h8,{onClick:()=>m(!l),children:[jsx(z3,{}),E,jsx(y8,{onKeyDown:x,value:p,onChange:C=>c(C.target.value),type:"text",style:{marginLeft:"45px",width:"calc(100% - 80px)"}}),jsxs(x8,{style:Z,ref:s,children:[b.map(C=>{let y=C===E;return jsxs(_3,{onClick:()=>e1(C),children:[jsx(d.Body,{size:"lg",children:C}),jsx(w8,{isCurrent:y,children:jsx(v.Check,{color:"#fff"})})]},C)}),!b.length&&jsx(_3,{onClick:()=>W(),children:jsx(d.Body,{size:"lg",children:"Add Option"})},"add")]})]}),jsxs("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"},children:[n&&g.length===0&&"N/A",g.map(C=>jsxs(b8,{onClick:()=>h(C),children:[C,!n&&jsx(H1,{})]},C))]})]})},E3=v8;var H8=({label:e=null,isLabelBold:t=!0,name:o,options:r={},...n})=>{let{control:s,formState:{errors:a}}=useFormContext(),l=!!a[o],m=i(d.Body)`
|
|
1396
1396
|
margin-bottom: 5px;
|
|
1397
1397
|
font-weight: ${({isLabelBold:c})=>c?"bold":"regular"};
|
|
1398
1398
|
text-align: start;
|
|
1399
1399
|
`,p=i.div`
|
|
1400
1400
|
position: relative;
|
|
1401
1401
|
margin-bottom: 24px;
|
|
1402
|
-
`;return jsxs(p,{children:[e&&jsx(m,{size:"lg",isLabelBold:t,children:e}),jsx(Controller,{render:({field:c})=>jsx(N1,{...n,...c,hasError:l}),name:o,control:s,...r}),l&&jsx(f1,{text:a[o]?.message?.toString(),includeIcon:!1})]})},P3=H8;var
|
|
1402
|
+
`;return jsxs(p,{children:[e&&jsx(m,{size:"lg",isLabelBold:t,children:e}),jsx(Controller,{render:({field:c})=>jsx(N1,{...n,...c,hasError:l}),name:o,control:s,...r}),l&&jsx(f1,{text:a[o]?.message?.toString(),includeIcon:!1})]})},P3=H8;var _8={Container:d3,Checkbox:E1,CheckboxGroup:l3,DateSelect:P3,TextInput:s1,TimeSelect:V3,Radio:F1,RadioGroup:f3,CardRadioGroup:g3,Select:x3,Signature:m3,Submit:b3,LocationSelect:k3,Keyword:E3,Toggle:d2};var P8=i(animated.div)`
|
|
1403
1403
|
max-height: ${({size:e})=>(e||58)+24}px;
|
|
1404
1404
|
padding: 12px;
|
|
1405
1405
|
display: flex;
|
|
@@ -1413,25 +1413,25 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
1413
1413
|
&:hover {
|
|
1414
1414
|
border-radius: 40px;
|
|
1415
1415
|
}
|
|
1416
|
-
`,
|
|
1416
|
+
`,D8=i(animated.div)`
|
|
1417
1417
|
display: flex;
|
|
1418
1418
|
flex-direction: column;
|
|
1419
1419
|
flex-wrap: wrap;
|
|
1420
1420
|
min-width: 180px;
|
|
1421
1421
|
max-width: 180px;
|
|
1422
1422
|
margin-left: 12px;
|
|
1423
|
-
`,
|
|
1423
|
+
`,O8=i.span`
|
|
1424
1424
|
font-weight: 700;
|
|
1425
1425
|
letter-spacing: 0.157px;
|
|
1426
1426
|
color: #1d4339;
|
|
1427
|
-
`,
|
|
1427
|
+
`,R8=i.p`
|
|
1428
1428
|
font-size: 10px;
|
|
1429
1429
|
letter-spacing: 0.157px;
|
|
1430
1430
|
text-align: left;
|
|
1431
1431
|
margin: 0;
|
|
1432
1432
|
line-height: 12px;
|
|
1433
1433
|
color: #1d4339;
|
|
1434
|
-
`,
|
|
1434
|
+
`,A8=({contentfulConfig:e,size:t=58})=>{let[o,r]=useState(""),[n,s]=useSpring(()=>({from:{width:t+24,backgroundColor:"#fff",color:"#ffffff"}}));useEffect(()=>{new i1(e).getImage("vanta-logo").then(f=>{r(f);});},[]);let[a,l]=useSpring(()=>({from:{opacity:0},delay:100})),m=f=>({width:f?198+t:t+24,backgroundColor:f?"#d4e2dd":"#fff"}),p=f=>({opacity:f?1:0}),c=()=>{s(m(!0)),l(p(!0));},g=()=>{s(m(!1)),l(p(!1));};return o?jsxs(P8,{style:n,onMouseEnter:c,onMouseLeave:g,size:t,children:[jsx("img",{alt:"Vanta Logo",src:o,height:t,width:t}),jsxs(D8,{style:a,children:[jsx(d.Body,{children:jsx(O8,{children:"Guaranteed Security"})}),jsx(d.Body,{size:"xs",children:jsx(R8,{children:"We're committed to protecting your privacy. Solace is safe, secure, and HIPAA compliant\u2014 certified by Vanta."})})]})]}):null},T8=A8;function f2({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 N8=i(Menu)`
|
|
1435
1435
|
.ant-menu-submenu {
|
|
1436
1436
|
background-color: #fff;
|
|
1437
1437
|
color: #555555 !important;
|
|
@@ -1471,8 +1471,8 @@ var o1={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",
|
|
|
1471
1471
|
background-color: #fff !important;
|
|
1472
1472
|
color: #000 !important;
|
|
1473
1473
|
}
|
|
1474
|
-
`,
|
|
1474
|
+
`,U8=({children:e,...t})=>jsx(N8,{...t,expandIcon:o=>jsx(f2,{isActive:o.isOpen,color:"#555555"}),children:e}),W8=({children:e,...t})=>jsx(Menu.Item,{...t,children:e}),X8=e=>jsx(Menu.Divider,{...e}),K8=({children:e,...t})=>jsx(Menu.SubMenu,{...t,children:e}),J8={Container:U8,MenuDivider:X8,MenuItem:W8,SubMenuContainer:K8};
|
|
1475
1475
|
|
|
1476
|
-
export { le as Avatar, G1 as Button, Ve as Collapse, i1 as Contentful, wt as ContentfulLottieFileSlug, N1 as DateSelect, Pe as Drawer, f1 as ErrorTypography,
|
|
1476
|
+
export { le as Avatar, G1 as Button, Ve as Collapse, i1 as Contentful, wt as ContentfulLottieFileSlug, N1 as DateSelect, Pe as Drawer, f1 as ErrorTypography, _8 as Form, v as Icons, i2 as LoadingSpinner, Vt as LottieAnimation, g1 as Menu, Ft as Modal, J8 as NavigationMenu, Go as NumberedProgressSteps, ht as Pill, Ot as Progress, It as Segmented, u2 as Size, Gt as SolaceLogo, U3 as SolaceThemeProvider, Wt as Tabs, p2 as TimeSelect, d2 as Toggle, zo as Tooltip, d as Typography, T8 as VantaLogo };
|
|
1477
1477
|
//# sourceMappingURL=out.js.map
|
|
1478
1478
|
//# sourceMappingURL=index.js.map
|