@solace-health/ui 0.9.1 → 0.9.3
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 +53 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +50 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var reactHookForm = require('react-hook-form');
|
|
|
9
9
|
var D2 = require('react');
|
|
10
10
|
var ee = require('dayjs');
|
|
11
11
|
var Vo = require('react-lottie-player');
|
|
12
|
-
var
|
|
12
|
+
var b2 = require('contentful');
|
|
13
13
|
var reactMenu = require('@szhsin/react-menu');
|
|
14
14
|
var luxon = require('luxon');
|
|
15
15
|
var reactImask = require('react-imask');
|
|
@@ -40,10 +40,10 @@ var n__default = /*#__PURE__*/_interopDefault(n);
|
|
|
40
40
|
var D2__default = /*#__PURE__*/_interopDefault(D2);
|
|
41
41
|
var ee__default = /*#__PURE__*/_interopDefault(ee);
|
|
42
42
|
var Vo__default = /*#__PURE__*/_interopDefault(Vo);
|
|
43
|
-
var
|
|
43
|
+
var b2__namespace = /*#__PURE__*/_interopNamespace(b2);
|
|
44
44
|
var j5__default = /*#__PURE__*/_interopDefault(j5);
|
|
45
45
|
|
|
46
|
-
var N={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}}},yt={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)"}},
|
|
46
|
+
var N={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}}},yt={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)"}},bt=({children:e,theme:t={}})=>jsxRuntime.jsx(antd.ConfigProvider,{theme:{...yt,...t},children:e});var xt=({children:e,theme:t={}})=>jsxRuntime.jsx(bt,{theme:t,children:e});var Be=(s=>(s.XL="xl",s.LG="lg",s.MD="md",s.SM="sm",s.XS="xs",s))(Be||{});var wt=n__default.default.p`
|
|
47
47
|
transition: font-size 0.25s;
|
|
48
48
|
color: ${e=>e.color||"#101010"};
|
|
49
49
|
font-family: ${({theme:e})=>e.typography.family.body};
|
|
@@ -146,7 +146,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
146
146
|
`}
|
|
147
147
|
`,Vt=({className:e="",children:t="",size:o="md",allCaps:r=!1,color:i=""})=>jsxRuntime.jsx(Pt,{allCaps:r,className:e,size:o,style:{color:i},children:t}),De=Vt;var Rt=n__default.default.span`
|
|
148
148
|
margin: 0;
|
|
149
|
-
`,Et=({children:e,as:t,length:o=120})=>{let i=((s,l,a="...")=>{let
|
|
149
|
+
`,Et=({children:e,as:t,length:o=120})=>{let i=((s,l,a="...")=>{let c=s.length>l?a:"";return s.substring(0,l)+c})(e,o);return jsxRuntime.jsx(Rt,{as:t,children:i})},Te=Et;var d={Body:Re,Display:Ee,Error:q,Header:De,Truncated:Te};var _t=({size:e=31})=>jsxRuntime.jsx("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M15.3559 14.2494C13.361 14.2494 11.6748 13.5607 10.2973 12.1832C8.91986 10.8058 8.23113 9.11961 8.23113 7.12469C8.23113 5.12978 8.91986 3.4436 10.2973 2.06616C11.6748 0.688721 13.361 0 15.3559 0C17.3508 0 19.037 0.688721 20.4145 2.06616C21.7919 3.4436 22.4807 5.12978 22.4807 7.12469C22.4807 9.11961 21.7919 10.8058 20.4145 12.1832C19.037 13.5607 17.3508 14.2494 15.3559 14.2494ZM0.5 31V27.1345C0.5 25.8207 0.777916 24.6964 1.33375 23.7616C1.88958 22.8268 2.6728 22.1068 3.68341 21.6015C5.55303 20.6414 7.44791 19.934 9.36806 19.4792C11.2882 19.0244 13.2842 18.7971 15.3559 18.7971C17.4276 18.7971 19.4236 19.0118 21.3437 19.4413C23.2639 19.8708 25.1588 20.5909 27.0284 21.6015C28.039 22.0562 28.8222 22.7637 29.378 23.7237C29.9339 24.6838 30.2118 25.8207 30.2118 27.1345V31H0.5Z",fill:"white"})}),Ot=n__default.default(d.Display)`
|
|
150
150
|
color: white;
|
|
151
151
|
`,$t=({size:e=46,style:t={},src:o="",user:r={profile_image_url:"",first_name:"",last_name:""}})=>{let i={flex:"none",display:"flex",alignItems:"center",justifyContent:"center",...t};return o||r.profile_image_url?jsxRuntime.jsx(antd.Avatar,{size:e,draggable:!1,style:i,src:o||r.profile_image_url}):r.first_name&&r.last_name?jsxRuntime.jsx(antd.Avatar,{size:e,draggable:!1,gap:0,style:{backgroundColor:"#285E50",color:"white",...i},children:jsxRuntime.jsxs(Ot,{size:"xs",children:[r.first_name[0],r.last_name[0]]})}):jsxRuntime.jsx(antd.Avatar,{size:e,gap:6,draggable:!1,style:{backgroundColor:"#285E50",padding:8,...i},icon:jsxRuntime.jsx(_t,{})})},Zt=$t;var Q=n__default.default(antd.Button)`
|
|
152
152
|
height: 50px;
|
|
@@ -227,7 +227,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
227
227
|
padding-top: 0;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
`,ro=e=>{let t=reactHookForm.get(e,"isActive",!1),o=web.useSpring(t?{transform:"rotate(0deg)",config:web.config.stiff}:{transform:"rotate(180deg)",config:web.config.stiff});return jsxRuntime.jsx(web.animated.div,{style:o,children:jsxRuntime.jsx("svg",{width:"16",height:"10",viewBox:"0 0 16 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M1.58301 8.24927L7.99968 1.8326L14.4163 8.24927",stroke:"black",strokeWidth:"1.66756",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})},no=({items:e,onChange:t=()=>null})=>{let o=Array.isArray(e)?e:[e];return jsxRuntime.jsx(oo,{items:o,expandIcon:ro,defaultActiveKey:["1"],onChange:i=>t(i),expandIconPosition:"end"})},io=no;var lo=({value:e=null,onChange:t,startRange:o=null,endRange:r=null})=>{let[i,s]=D2.useState(!1);return jsxRuntime.jsx(antd.DatePicker,{disabledDate:a=>a?!!(o&&a<ee__default.default(o).endOf("day")||r&&a>ee__default.default(r).endOf("day")):!1,onChange:(a,
|
|
230
|
+
`,ro=e=>{let t=reactHookForm.get(e,"isActive",!1),o=web.useSpring(t?{transform:"rotate(0deg)",config:web.config.stiff}:{transform:"rotate(180deg)",config:web.config.stiff});return jsxRuntime.jsx(web.animated.div,{style:o,children:jsxRuntime.jsx("svg",{width:"16",height:"10",viewBox:"0 0 16 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M1.58301 8.24927L7.99968 1.8326L14.4163 8.24927",stroke:"black",strokeWidth:"1.66756",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})},no=({items:e,onChange:t=()=>null})=>{let o=Array.isArray(e)?e:[e];return jsxRuntime.jsx(oo,{items:o,expandIcon:ro,defaultActiveKey:["1"],onChange:i=>t(i),expandIconPosition:"end"})},io=no;var lo=({value:e=null,onChange:t,startRange:o=null,endRange:r=null})=>{let[i,s]=D2.useState(!1);return jsxRuntime.jsx(antd.DatePicker,{disabledDate:a=>a?!!(o&&a<ee__default.default(o).endOf("day")||r&&a>ee__default.default(r).endOf("day")):!1,onChange:(a,c)=>{t&&t(c);},onFocus:()=>{s(!0);},onBlur:()=>{s(!1);},value:e?ee__default.default(e):ee__default.default(),style:{width:"100%",height:"50px",boxSizing:"border-box",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:i?N.colors.secondaryGreen:"#5a5a5a",padding:"20px 23px",backgroundColor:"#fff",fontFamily:N.typography.family.body,fontWeight:N.typography.weight.normal,fontStyle:"normal",fontSize:"16px",outlineStyle:"none",boxShadow:i?`0 0 0 1px ${N.colors.secondaryGreen}`:"none"}})},he=lo;var mo=({isOpen:e,onClose:t,children:o,title:r="",placement:i="bottom",headerStyle:s={display:"none"},...l})=>{let a=i==="bottom"?{borderTopLeftRadius:32,borderTopRightRadius:32}:{borderBottomLeftRadius:32,borderBottomRightRadius:32};return jsxRuntime.jsx(antd.Drawer,{style:a,headerStyle:s,title:r,placement:i,onClose:t,open:e,contentWrapperStyle:{...a},...l,children:o})},fo=mo;var Oe=({color:e="#101010"})=>jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:e,fill:"none",strokeMiterlimit:"10",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M8 12H16",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12 16L12 8",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});var $e=({color:e="#101010"})=>jsxRuntime.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("g",{clipPath:"url(#clip0_737_13769)",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4824 3.49935V4.8833H19.5883H19.59V4.88688C20.2552 4.88867 20.8581 5.16797 21.2934 5.62093C21.7253 6.07031 21.9948 6.69157 21.9965 7.37907H22V7.38265V20.5007V20.5024H21.9965C21.9948 21.1899 21.7253 21.8148 21.2882 22.2677C20.8546 22.7153 20.2552 22.9946 19.5918 22.9964V23H19.5883H8.92926H8.92753V22.9964C8.26414 22.9946 7.6595 22.7153 7.22415 22.2624C6.79226 21.813 6.52276 21.1917 6.52103 20.5042H6.51758V20.5007V17.5627H4.41168H4.40995V17.5591C3.74657 17.5573 3.14192 17.278 2.70657 16.825C2.27468 16.3757 2.00518 15.7544 2.00346 15.0669H2V15.0633V3.49935V3.49756H2.00346C2.00518 2.80827 2.27641 2.18343 2.71176 1.73226C3.14537 1.28467 3.74484 1.00537 4.40822 1.00358V1H4.41168H15.0707H15.0725V1.00358C15.7376 1.00537 16.3405 1.28467 16.7758 1.73763C17.2077 2.18701 17.4772 2.80827 17.479 3.49577H17.4824V3.49935ZM15.6547 4.8833V3.49935V3.49577H15.6581C15.6581 3.33285 15.5907 3.18245 15.4836 3.07145C15.3783 2.96224 15.2314 2.89242 15.0742 2.89242V2.896H15.0725H4.41341H4.40995V2.89242C4.25274 2.89242 4.10763 2.96224 4.00052 3.07324C3.89514 3.18245 3.82776 3.33464 3.82776 3.49756H3.83122V3.49935V15.0633V15.0669H3.82776C3.82776 15.2298 3.89514 15.3802 4.00225 15.4912C4.10763 15.6004 4.25447 15.6702 4.41168 15.6702V15.6667H4.41341H6.51931V7.38265V7.38086H6.52276C6.52449 6.69157 6.79572 6.06673 7.23106 5.61556C7.66468 5.16797 8.26414 4.88867 8.92753 4.88688V4.8833H8.93098H15.6547ZM20.1705 20.5007V7.38265V7.37907H20.174C20.174 7.21615 20.1066 7.06576 19.9995 6.95475C19.8941 6.84554 19.7473 6.77572 19.59 6.77572V6.7793H19.5883H8.92926H8.9258V6.77572C8.76859 6.77572 8.62348 6.84554 8.51637 6.95654C8.41099 7.06576 8.34361 7.21794 8.34361 7.38086H8.34707V7.38265V20.5007V20.5042H8.34361C8.34361 20.6672 8.41099 20.8175 8.5181 20.9285C8.62348 21.0378 8.77032 21.1076 8.92753 21.1076V21.104H8.92926H19.5883H19.5918V21.1076C19.749 21.1076 19.8941 21.0378 20.0012 20.9268C20.1066 20.8175 20.174 20.6654 20.174 20.5024H20.1705V20.5007Z",fill:e})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_737_13769",children:jsxRuntime.jsx("rect",{width:"20",height:"22",fill:"white",transform:"translate(2 1)"})})})]});var Ae=({color:e="#555555",direction:t="left"})=>jsxRuntime.jsx("svg",{width:"9",height:"16",viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${{left:"0deg",up:"90deg",right:"180deg",down:"270deg"}[t]})`},children:jsxRuntime.jsx("path",{d:"M8.33162 2.58137C8.72214 2.19085 8.72214 1.55769 8.33162 1.16716C7.94109 0.776637 7.30793 0.776637 6.91741 1.16716L0.792405 7.29216C0.401881 7.68269 0.401881 8.31585 0.792405 8.70637L6.91741 14.8314C7.30793 15.2219 7.94109 15.2219 8.33162 14.8314C8.72214 14.4409 8.72214 13.8077 8.33162 13.4172L2.91373 7.99927L8.33162 2.58137Z",fill:e})});var Fe=()=>jsxRuntime.jsxs("svg",{width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M3.83398 6.95215H17.1673",stroke:"#D7A13B",strokeWidth:"1.33424",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{fill:"none",d:"M16.334 3.61865H4.66732C4.20708 3.61865 3.83398 3.99175 3.83398 4.45199V16.1187C3.83398 16.5789 4.20708 16.952 4.66732 16.952H16.334C16.7942 16.952 17.1673 16.5789 17.1673 16.1187V4.45199C17.1673 3.99175 16.7942 3.61865 16.334 3.61865Z",stroke:"#D7A13B",strokeWidth:"1.33424",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M13.834 1.95264V3.6193",stroke:"#D7A13B",strokeWidth:"1.33424",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M7.16602 1.95264V3.6193",stroke:"#D7A13B",strokeWidth:"1.33424",strokeLinecap:"round",strokeLinejoin:"round"})]});var Ie=n__default.default.div`
|
|
231
231
|
border-radius: 6px;
|
|
232
232
|
border: 1px solid #285e50;
|
|
233
233
|
background: ${({checked:e})=>e?"#285e50":"#fff"};
|
|
@@ -292,7 +292,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
292
292
|
stroke: ${({color:e})=>e||"#fff"};
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
`,
|
|
295
|
+
`,xe=({color:e=void 0,size:t="sm"})=>jsxRuntime.jsx(Mo,{color:e,size:t,children:jsxRuntime.jsx("div",{className:"loader",children:jsxRuntime.jsx("svg",{className:"circular-loader",viewBox:"25 25 50 50",children:jsxRuntime.jsx("circle",{className:"loader-path",cx:"50",cy:"50",r:"20",fill:"none"})})})});var zo=(o=>(o.LOADING_LISTINGS="loadingListings",o.LOADING_ACCOUNT="loadingAccount",o))(zo||{}),A=class{client;constructor(t){this.client=b2__namespace.createClient(t);}async getLottieFile({slug:t}){let r=(await this.client.getEntries({content_type:"lottie"})).items.find(i=>i.fields.slug===t);return r?r.fields.lottieFile:(console.warn(`Lottie file not found for slug ${t}`),null)}async getImage(t){let r=(await this.client.getEntries({content_type:"image"})).items.find(i=>i.fields.slug===t);return r?r.fields.image.fields.file.url:null}};var Eo=({animationData:e,height:t,width:o,loop:r})=>{let i=web.useSpring({from:{opacity:0},to:{opacity:1}});return jsxRuntime.jsx(web.animated.div,{style:i,children:jsxRuntime.jsx(Vo__default.default,{loop:r,animationData:e,play:!0,style:{width:o,height:t},rendererSettings:{preserveAspectRatio:"xMidYMid slice"}})})},Do=({height:e,width:t,loop:o,slug:r,contentfulConfig:i})=>{let[s,l]=D2.useState();return D2.useEffect(()=>{new A(i).getLottieFile({slug:r}).then(a=>{l(a);});},[]),s?jsxRuntime.jsx(Eo,{animationData:s,height:e,width:t,loop:o}):null};var $o=n__default.default(antd.Modal)`
|
|
296
296
|
border-radius: 20px;
|
|
297
297
|
@media (max-width: 620px) {
|
|
298
298
|
max-width: 100dvw;
|
|
@@ -327,7 +327,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
327
327
|
margin-right: 10px;
|
|
328
328
|
`,M2=n__default.default.div`
|
|
329
329
|
display: flex;
|
|
330
|
-
border: 1px solid #555555;
|
|
330
|
+
border: ${e=>`1px solid ${e?.borderColor?e.borderColor:"#555555"}`};
|
|
331
331
|
height: 50px;
|
|
332
332
|
border-radius: 8px;
|
|
333
333
|
padding: 0 18px;
|
|
@@ -397,7 +397,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
397
397
|
outline: none;
|
|
398
398
|
}
|
|
399
399
|
.szh-menu__item--hover {
|
|
400
|
-
background-color: #
|
|
400
|
+
background-color: #e9f0ee;
|
|
401
401
|
}
|
|
402
402
|
.szh-menu__item--focusable {
|
|
403
403
|
cursor: default;
|
|
@@ -537,36 +537,35 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
537
537
|
.szh-menu--state-opening.szh-menu--dir-left {
|
|
538
538
|
animation: szh-menu-show-slide-left 0.15s ease-out;
|
|
539
539
|
}
|
|
540
|
-
|
|
540
|
+
|
|
541
541
|
.szh-menu--state-closing.szh-menu--dir-left {
|
|
542
542
|
animation: szh-menu-hide-slide-left 0.15s ease-in forwards;
|
|
543
543
|
}
|
|
544
|
-
|
|
544
|
+
|
|
545
545
|
.szh-menu--state-opening.szh-menu--dir-right {
|
|
546
546
|
animation: szh-menu-show-slide-right 0.15s ease-out;
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
|
|
549
549
|
.szh-menu--state-closing.szh-menu--dir-right {
|
|
550
550
|
animation: szh-menu-hide-slide-right 0.15s ease-in forwards;
|
|
551
551
|
}
|
|
552
|
-
|
|
552
|
+
|
|
553
553
|
.szh-menu--state-opening.szh-menu--dir-top {
|
|
554
554
|
animation: szh-menu-show-slide-top 0.15s ease-out;
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
|
|
557
557
|
.szh-menu--state-closing.szh-menu--dir-top {
|
|
558
558
|
animation: szh-menu-hide-slide-top 0.15s ease-in forwards;
|
|
559
559
|
}
|
|
560
|
-
|
|
560
|
+
|
|
561
561
|
.szh-menu--state-opening.szh-menu--dir-bottom {
|
|
562
562
|
animation: szh-menu-show-slide-bottom 0.15s ease-out;
|
|
563
563
|
}
|
|
564
|
-
|
|
564
|
+
|
|
565
565
|
.szh-menu--state-closing.szh-menu--dir-bottom {
|
|
566
566
|
animation: szh-menu-hide-slide-bottom 0.15s ease-in forwards;
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
`;function ve({isActive:e,color:t="#000"}){let o=web.useSpring(e?{transform:"rotate(0deg)",config:web.config.stiff}:{transform:"rotate(180deg)",config:web.config.stiff});return jsxRuntime.jsx(web.animated.div,{style:{...o,display:"flex",alignItems:"center"},children:jsxRuntime.jsx(R.Caret,{direction:"up",color:t})})}var m1=({children:e,cta:t,onItemClick:o=()=>null,onMenuChange:r=()=>null,className:i="",menuProps:s={menuButton:null},caretColor:l="#000"})=>{let a={overflow:"auto",position:"archor",viewScroll:"auto",boundingBoxPadding:"20 0 50 0",gap:10,transition:!0,transitionTimeout:50},m=D2.useRef(null),[d,u]=reactMenu.useMenuState({transition:!0}),g=reactMenu.useClick(d.state,u),C=d.state==="open"||d.state==="opening";return D2.useEffect(()=>{r(d.state);},[d.state]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(M2,{className:`${i} ${C?"menu-open":"menu-closed"}`,ref:m,...g,children:[jsxRuntime.jsx(S2,{children:t}),jsxRuntime.jsx(ve,{isActive:C,color:l}),jsxRuntime.jsx(reactMenu.ControlledMenu,{...d,anchorRef:m,onClose:()=>u(!1),onItemClick:o,onMenuChange:r,...a,...s,children:e})]})})},f1=({label:e,className:t=""})=>jsxRuntime.jsx(reactMenu.MenuButton,{className:t,children:e}),g1=({label:e,value:t,selected:o=!1,onClick:r=()=>null,disabled:i=!1,linkTo:s="",className:l=""})=>jsxRuntime.jsx(reactMenu.MenuItem,{className:`${l} ${o?"active":"inactive"}`,value:t,onClick:r,href:s,disabled:i,children:e}),u1=({value:e,onChange:t=()=>null,className:o=""})=>jsxRuntime.jsx(reactMenu.FocusableItem,{children:({ref:r})=>jsxRuntime.jsx("input",{className:o,ref:r,type:"text",placeholder:"Type to filter",value:e,onChange:t})}),C1=({children:e,className:t=""})=>jsxRuntime.jsx(reactMenu.MenuHeader,{className:t,children:e}),h1=({className:e=""})=>jsxRuntime.jsx(reactMenu.MenuDivider,{className:e}),J={Button:f1,Container:m1,Search:u1,Divider:h1,Header:C1,Item:g1};n__default.default.div`
|
|
568
|
+
`;function ve({isActive:e,color:t="#000"}){let o=web.useSpring(e?{transform:"rotate(0deg)",config:web.config.stiff}:{transform:"rotate(180deg)",config:web.config.stiff});return jsxRuntime.jsx(web.animated.div,{style:{...o,display:"flex",alignItems:"center"},children:jsxRuntime.jsx(R.Caret,{direction:"up",color:t})})}var m1=({children:e,cta:t,onItemClick:o=()=>null,onMenuChange:r=()=>null,className:i="",menuProps:s={menuButton:null},caretColor:l="#000",borderColor:a="#555555"})=>{let c={overflow:"auto",position:"archor",viewScroll:"auto",boundingBoxPadding:"20 0 50 0",gap:10,transition:!0,transitionTimeout:50},m=D2.useRef(null),[f,g]=reactMenu.useMenuState({transition:!0}),C=reactMenu.useClick(f.state,g),h=f.state==="open"||f.state==="opening";return D2.useEffect(()=>{r(f.state);},[f.state]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(M2,{className:`${i} ${h?"menu-open":"menu-closed"}`,ref:m,borderColor:a,...C,children:[jsxRuntime.jsx(S2,{children:t}),jsxRuntime.jsx(ve,{isActive:h,color:l}),jsxRuntime.jsx(reactMenu.ControlledMenu,{...f,anchorRef:m,onClose:()=>g(!1),onItemClick:o,onMenuChange:r,...c,...s,children:e})]})})},f1=({label:e,className:t=""})=>jsxRuntime.jsx(reactMenu.MenuButton,{className:t,children:e}),g1=({label:e,value:t,selected:o=!1,onClick:r=()=>null,disabled:i=!1,linkTo:s="",className:l=""})=>jsxRuntime.jsx(reactMenu.MenuItem,{className:`${l} ${o?"active":"inactive"}`,value:t,onClick:r,href:s,disabled:i,children:e}),u1=({value:e,onChange:t=()=>null,className:o=""})=>jsxRuntime.jsx(reactMenu.FocusableItem,{children:({ref:r})=>jsxRuntime.jsx("input",{className:o,ref:r,type:"text",placeholder:"Type to filter",value:e,onChange:t})}),C1=({children:e,className:t=""})=>jsxRuntime.jsx(reactMenu.MenuHeader,{className:t,children:e}),h1=({className:e=""})=>jsxRuntime.jsx(reactMenu.MenuDivider,{className:e}),J={Button:f1,Container:m1,Search:u1,Divider:h1,Header:C1,Item:g1};n__default.default.div`
|
|
570
569
|
padding: 0 20px;
|
|
571
570
|
border-radius: 10px;
|
|
572
571
|
border: 1px solid #7f7f7f;
|
|
@@ -578,16 +577,16 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
578
577
|
align-items: center;
|
|
579
578
|
box-sizing: border-box;
|
|
580
579
|
`;var P2=n__default.default(J.Container)`
|
|
581
|
-
max-width:
|
|
580
|
+
max-width: 140px;
|
|
582
581
|
`,V2=n__default.default(J.Item)`
|
|
583
582
|
&.szh-menu__item {
|
|
584
|
-
min-width:
|
|
583
|
+
min-width: 145px;
|
|
585
584
|
}
|
|
586
585
|
`;n__default.default(J.Divider)`
|
|
587
586
|
&.szh-menu__divider {
|
|
588
587
|
margin: 0;
|
|
589
588
|
}
|
|
590
|
-
`;var L1=({startTime:e="00:00",endTime:t="24:00",interval:o=30,defaultValue:r="",onChange:i=()=>null})=>{let[s,l]=D2.useState(),
|
|
589
|
+
`;var L1=({startTime:e="00:00",endTime:t="24:00",interval:o=30,defaultValue:r="",onChange:i=()=>null})=>{let[s,l]=D2.useState(),c=D2.useCallback(()=>{let f=luxon.DateTime.fromFormat(t,"HH:mm"),g=luxon.Duration.fromObject({minutes:o}),C=[],h=luxon.DateTime.fromFormat(e,"hh:mm");for(;h<=f;)C.push({label:h.toFormat("h:mm a"),value:{hour:h.toFormat("HH"),min:h.toFormat("mm"),raw:h.toFormat("HH:mm"),formatted:h.toFormat("h:mm a")}}),h=h.plus(g);return C},[e,t,o,r])();return D2.useEffect(()=>{let f=c.find(g=>g.value.raw===(r||e));l(f);},[r]),jsxRuntime.jsx(P2,{onItemClick:f=>{let g=c.find(C=>C.value.raw===f.value.raw);l(g),i(f);},cta:jsxRuntime.jsx(d.Body,{size:"lg",children:s?.value.formatted||"-"}),children:c.map(f=>jsxRuntime.jsx(V2,{label:f.label,value:f.value,selected:f.value.raw===s?.value.raw},f.label))})},Le=L1;var H1=({defaultState:e=!1,name:t,label:o={active:"YES",inactive:"NO"},handleEvent:r=null,value:i,disabled:s=!1,loading:l=!1})=>{let a=reactHookForm.useFormContext();D2.useEffect(()=>{a&&e&&a.setValue(t,i);},[]);let c=m=>{s||(a&&a.setValue(t,m?i:null),r&&r(m));};return jsxRuntime.jsx(antd.Switch,{defaultChecked:e,checkedChildren:o.active,unCheckedChildren:o.inactive,loading:l,disabled:s,onChange:c})},Se=H1;var B1=n__default.default.div`
|
|
591
590
|
display: inline-block;
|
|
592
591
|
`,R1=({className:e="",children:t,content:o,...r})=>jsxRuntime.jsx(antd.Tooltip,{placement:"topLeft",color:"#E9F0EE",title:o,arrow:{pointAtCenter:!0},overlayClassName:e,...r,children:jsxRuntime.jsx(B1,{children:t})}),E1=n__default.default(R1)`
|
|
593
592
|
max-width: 355px;
|
|
@@ -688,11 +687,11 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
688
687
|
font-size: 16px;
|
|
689
688
|
font-weight: 400;
|
|
690
689
|
line-height: normal;
|
|
691
|
-
`,O2=({steps:e})=>{let t=e.map((o,r)=>jsxRuntime.jsxs(I1,{children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx(N1,{children:r+1})}),jsxRuntime.jsxs(G1,{children:[jsxRuntime.jsx(W1,{children:o.title}),jsxRuntime.jsx(X1,{children:o.description})]})]},o.title));return jsxRuntime.jsx(F1,{children:t})};var K1={Horizontal:T2,Vertical:O2};var q1=n__default.default(
|
|
690
|
+
`,O2=({steps:e})=>{let t=e.map((o,r)=>jsxRuntime.jsxs(I1,{children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx(N1,{children:r+1})}),jsxRuntime.jsxs(G1,{children:[jsxRuntime.jsx(W1,{children:o.title}),jsxRuntime.jsx(X1,{children:o.description})]})]},o.title));return jsxRuntime.jsx(F1,{children:t})};var K1={Horizontal:T2,Vertical:O2};var q1=n__default.default(d.Body)`
|
|
692
691
|
margin-bottom: 5px;
|
|
693
692
|
font-weight: ${({isLabelBold:e})=>e?"bold":"regular"};
|
|
694
693
|
text-align: start;
|
|
695
|
-
`,Q1=n__default.default(
|
|
694
|
+
`,Q1=n__default.default(d.Body)`
|
|
696
695
|
margin-bottom: 5px;
|
|
697
696
|
`,j1=n__default.default.input`
|
|
698
697
|
width: 100%;
|
|
@@ -737,9 +736,9 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
737
736
|
outline-style: solid;
|
|
738
737
|
border-color: ${({theme:e})=>e.colors.secondaryGreen};
|
|
739
738
|
}
|
|
740
|
-
`,$2=n__default.default(
|
|
739
|
+
`,$2=n__default.default(d.Body)`
|
|
741
740
|
margin-bottom: 24px;
|
|
742
|
-
`,o5=({name:e,label:t=null,details:o=null,type:r="text",options:i={},previewOnly:s=!1,textArea:l=!1,marginBottom:a="24px",isLabelBold:
|
|
741
|
+
`,o5=({name:e,label:t=null,details:o=null,type:r="text",options:i={},previewOnly:s=!1,textArea:l=!1,marginBottom:a="24px",isLabelBold:c=!0,format:m=String,errorMessage:f="This field is required",...g})=>{let{register:C,control:h,getValues:x,formState:{errors:v}}=reactHookForm.useFormContext();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t&&jsxRuntime.jsx(q1,{size:"lg",isLabelBold:c,children:t}),o&&jsxRuntime.jsx(Q1,{children:o}),l?jsxRuntime.jsx("div",{children:s?jsxRuntime.jsx($2,{size:"md",children:x(e)||"N/A"}):jsxRuntime.jsx(t5,{...g,...C(e,i),marginBottom:a})}):jsxRuntime.jsx("div",{style:{width:"100%"},children:s?jsxRuntime.jsx($2,{size:"md",children:x(e)||"N/A"}):jsxRuntime.jsxs("div",{style:{marginBottom:v?.[e]?"6px":a,display:"flex",flexDirection:"column"},children:[jsxRuntime.jsx(reactHookForm.Controller,{render:S=>jsxRuntime.jsx(e5,{...g,unmask:!1,mask:m,name:S.field.name,onBlur:S.field.onBlur,defaultValue:i.value||S.field.value,onAccept:V=>S.field.onChange({target:{value:V}}),marginBottom:a,type:r}),name:e,rules:i,control:h}),v?.[e]&&jsxRuntime.jsx(q,{children:f})]})})]})},F=o5;var i5=n__default.default.div`
|
|
743
742
|
margin-bottom: 32px;
|
|
744
743
|
`,s5=n__default.default.div`
|
|
745
744
|
display: ${({inline:e})=>e?"flex":"block"};
|
|
@@ -812,10 +811,10 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
812
811
|
&:checked + label::before {
|
|
813
812
|
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMC42NjY3IDEuNTAwMTJMNC4yNTAwNCA3LjkxNjc5TDEuMzMzMzcgNS4wMDAxMiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==");
|
|
814
813
|
}
|
|
815
|
-
`,p5=n__default.default(
|
|
814
|
+
`,p5=n__default.default(d.Body)`
|
|
816
815
|
margin-bottom: 5px;
|
|
817
816
|
font-weight: bold;
|
|
818
|
-
`,d5=n__default.default(
|
|
817
|
+
`,d5=n__default.default(d.Body)`
|
|
819
818
|
margin-bottom: 5px;
|
|
820
819
|
`,c5=n__default.default.div`
|
|
821
820
|
display: flex;
|
|
@@ -826,7 +825,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
826
825
|
input[type="text"] {
|
|
827
826
|
margin: 0;
|
|
828
827
|
}
|
|
829
|
-
`,le=({option:e,name:t,...o})=>{let{register:r}=reactHookForm.useFormContext();return jsxRuntime.jsxs(a5,{children:[jsxRuntime.jsx(l5,{type:"checkbox",value:e.value,...r(t),...o}),jsxRuntime.jsx("label",{htmlFor:t,children:jsxRuntime.jsx(
|
|
828
|
+
`,le=({option:e,name:t,...o})=>{let{register:r}=reactHookForm.useFormContext();return jsxRuntime.jsxs(a5,{children:[jsxRuntime.jsx(l5,{type:"checkbox",value:e.value,...r(t),...o}),jsxRuntime.jsx("label",{htmlFor:t,children:jsxRuntime.jsx(d.Body,{children:e.label})})]})},A2=({name:e,label:t,details:o="",options:r=[],inline:i=!1,other:s={},...l})=>jsxRuntime.jsxs(i5,{children:[jsxRuntime.jsx(p5,{size:"lg",children:t}),o&&jsxRuntime.jsx(d5,{children:o}),jsxRuntime.jsxs(s5,{inline:i,children:[r.map(a=>jsxRuntime.jsx(le,{option:a,name:e,...l},`${e}-${a.value}`)),s.label&&jsxRuntime.jsxs(c5,{children:[jsxRuntime.jsx(le,{option:{label:s.label,value:"other"},name:e,...l},e),jsxRuntime.jsx(F,{name:`${e}_other`,...l})]})]})]});var g5=({formMethods:e=null,formOptions:t={},onSubmit:o,children:r,className:i=""})=>{let s={mode:"onBlur",...t},l=reactHookForm.useForm(s),a=e||l,c=m=>o(m);return jsxRuntime.jsx(reactHookForm.FormProvider,{...a,children:jsxRuntime.jsx("form",{className:i,onSubmit:a.handleSubmit(c),children:r})})},I2=g5;var C5=({label:e,name:t,options:o={},...r})=>{let{register:i}=reactHookForm.useFormContext(),s=n__default.default.div`
|
|
830
829
|
position: relative;
|
|
831
830
|
margin-bottom: 24px;
|
|
832
831
|
|
|
@@ -848,19 +847,19 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
848
847
|
position: absolute;
|
|
849
848
|
top: -3px;
|
|
850
849
|
padding: 0 0 0 30px;
|
|
851
|
-
font-family: ${({theme:
|
|
852
|
-
font-weight: ${({theme:
|
|
850
|
+
font-family: ${({theme:c})=>c.typography.family.script};
|
|
851
|
+
font-weight: ${({theme:c})=>c.typography.weight.normal};
|
|
853
852
|
font-size: 24px;
|
|
854
853
|
font-style: normal;
|
|
855
854
|
width: 100%;
|
|
856
|
-
`;return jsxRuntime.jsxs(s,{children:[jsxRuntime.jsxs(l,{children:[jsxRuntime.jsx(ne,{}),jsxRuntime.jsx(a,{...i(t,o),...r})]}),jsxRuntime.jsx("label",{htmlFor:t,children:jsxRuntime.jsx(
|
|
855
|
+
`;return jsxRuntime.jsxs(s,{children:[jsxRuntime.jsxs(l,{children:[jsxRuntime.jsx(ne,{}),jsxRuntime.jsx(a,{...i(t,o),...r})]}),jsxRuntime.jsx("label",{htmlFor:t,children:jsxRuntime.jsx(d.Body,{children:e})})]})},G2=C5;var h5=n__default.default.div`
|
|
857
856
|
margin-bottom: 32px;
|
|
858
857
|
`,y5=n__default.default.div`
|
|
859
858
|
display: ${({inline:e})=>e?"flex":"block"};
|
|
860
859
|
gap: 20px;
|
|
861
860
|
flex-wrap: wrap;
|
|
862
861
|
margin: 20px 0;
|
|
863
|
-
`,
|
|
862
|
+
`,b5=n__default.default.div`
|
|
864
863
|
display: flex;
|
|
865
864
|
gap: 30rem;
|
|
866
865
|
align-items: center;
|
|
@@ -871,7 +870,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
871
870
|
label {
|
|
872
871
|
padding-left: 32px;
|
|
873
872
|
}
|
|
874
|
-
`,
|
|
873
|
+
`,x5=n__default.default.input`
|
|
875
874
|
-webkit-appearance: none;
|
|
876
875
|
position: absolute;
|
|
877
876
|
appearance: none;
|
|
@@ -925,10 +924,10 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
925
924
|
transform: scale(1.65);
|
|
926
925
|
background: #1d4339;
|
|
927
926
|
}
|
|
928
|
-
`,w5=n__default.default(
|
|
927
|
+
`,w5=n__default.default(d.Body)`
|
|
929
928
|
margin-bottom: 5px;
|
|
930
929
|
font-weight: bold;
|
|
931
|
-
`,v5=n__default.default(
|
|
930
|
+
`,v5=n__default.default(d.Body)`
|
|
932
931
|
margin-bottom: 5px;
|
|
933
932
|
`,k5=n__default.default.div`
|
|
934
933
|
display: flex;
|
|
@@ -938,7 +937,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
938
937
|
input[type="text"] {
|
|
939
938
|
margin: 0;
|
|
940
939
|
}
|
|
941
|
-
`,de=({option:e,name:t,inline:o,...r})=>{let{register:i}=reactHookForm.useFormContext();return jsxRuntime.jsxs(
|
|
940
|
+
`,de=({option:e,name:t,inline:o,...r})=>{let{register:i}=reactHookForm.useFormContext();return jsxRuntime.jsxs(b5,{inline:o,children:[jsxRuntime.jsx(x5,{type:"radio",value:e.value,...i(t),...r}),jsxRuntime.jsx("label",{htmlFor:t,children:jsxRuntime.jsx(d.Body,{children:e.label})})]})},X2=({name:e,label:t,details:o="",options:r=[],inline:i=!1,allowOther:s=!1,...l})=>jsxRuntime.jsxs(h5,{children:[jsxRuntime.jsx(w5,{size:"lg",children:t}),o&&jsxRuntime.jsx(v5,{children:o}),jsxRuntime.jsxs(y5,{inline:i,children:[r.map(a=>jsxRuntime.jsx(de,{option:a,name:e,inline:i,...l},`${e}-${a.value}`)),s&&jsxRuntime.jsxs(k5,{children:[jsxRuntime.jsx(de,{option:{label:"Other",value:"other"},name:e,inline:i,...l},e),jsxRuntime.jsx(F,{name:`${e}_other`,...l})]})]})]}),L5=n__default.default.div`
|
|
942
941
|
width: 100%;
|
|
943
942
|
`,S5=({hasError:e,selected:t})=>e?"red":t?"#285E50":"#7f7f7f",M5=n__default.default.label`
|
|
944
943
|
display: flex;
|
|
@@ -1001,7 +1000,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1001
1000
|
&:checked {
|
|
1002
1001
|
border: 0.15em solid #1d4339;
|
|
1003
1002
|
}
|
|
1004
|
-
`,P5=n__default.default(
|
|
1003
|
+
`,P5=n__default.default(d.Body)`
|
|
1005
1004
|
color: #000;
|
|
1006
1005
|
font-family: Lato;
|
|
1007
1006
|
font-size: 18px;
|
|
@@ -1024,11 +1023,11 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1024
1023
|
position: relative;
|
|
1025
1024
|
margin-bottom: 24px;
|
|
1026
1025
|
z-index: 40;
|
|
1027
|
-
`,$5=n__default.default(
|
|
1026
|
+
`,$5=n__default.default(d.Body)`
|
|
1028
1027
|
margin-bottom: 5px;
|
|
1029
1028
|
font-weight: ${({isLabelBold:e})=>e?"bold":"regular"};
|
|
1030
1029
|
text-align: start;
|
|
1031
|
-
`,Z5=n__default.default(
|
|
1030
|
+
`,Z5=n__default.default(d.Body)`
|
|
1032
1031
|
margin-bottom: 12px;
|
|
1033
1032
|
`,A5=n__default.default.div`
|
|
1034
1033
|
position: relative;
|
|
@@ -1090,16 +1089,16 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1090
1089
|
position: absolute;
|
|
1091
1090
|
top: 0;
|
|
1092
1091
|
left: 0;
|
|
1093
|
-
`,W5=n__default.default(
|
|
1092
|
+
`,W5=n__default.default(d.Body)`
|
|
1094
1093
|
margin-bottom: 24px;
|
|
1095
|
-
`,X5=({label:e="",name:t,details:o="",placeholder:r="",options:i=[],allowInput:s=!1,previewOnly:l=!1,isLabelBold:a=!0,formOptions:
|
|
1094
|
+
`,X5=({label:e="",name:t,details:o="",placeholder:r="",options:i=[],allowInput:s=!1,previewOnly:l=!1,isLabelBold:a=!0,formOptions:c={},onChange:m=()=>null})=>{let f=D2.useRef(),g=reactHookForm.useFormContext();g.register(t,c);let[C,h]=D2.useState(!1),[x,v]=D2.useState(""),[S,V]=D2.useState(i),$=web.useSpring(C?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});D2.useEffect(()=>{let u=p=>{C&&f.current&&!f.current.contains(p.target)&&h(!1);};return document.addEventListener("mousedown",p=>u(p)),()=>{document.removeEventListener("mousedown",p=>u(p));}},[C]);let T=i.find(u=>u.value===g.getValues(t))?.label,_=u=>{v(""),g.setValue(t,u.value),g.trigger(t),m&&m(u),h(!1);};D2.useEffect(()=>{if(h(!!x),x){let u=i.filter(p=>p.value.match(x.toLowerCase()));V(u),g.setValue(t,x);}else V(i);},[x,i.length]);let y=u=>{u.code==="Enter"&&u.preventDefault();};return jsxRuntime.jsxs(O5,{children:[jsxRuntime.jsx($5,{size:"lg",isLabelBold:a,children:e}),o&&jsxRuntime.jsx(Z5,{children:o}),l?jsxRuntime.jsx(W5,{size:"md",children:T||"N/A"}):jsxRuntime.jsxs(A5,{onClick:()=>h(!C),children:[T||jsxRuntime.jsx("i",{children:r}),s&&jsxRuntime.jsx(G5,{onKeyDown:y,value:x,onChange:u=>v(u.target.value),type:"text"}),jsxRuntime.jsx(R.Caret,{direction:C?"up":"down"}),jsxRuntime.jsx(F5,{style:$,ref:f,children:S.map(u=>{let{label:p}=u,b=u.label===T;return jsxRuntime.jsxs(I5,{onClick:()=>_(u),children:[jsxRuntime.jsx(d.Body,{size:"lg",children:p}),jsxRuntime.jsx(N5,{isCurrent:b,children:jsxRuntime.jsx(R.Check,{color:"#fff"})})]},u.value)})})]})]})},U2=X5;var Y5=({label:e="Submit",isSubmitting:t=!1,hideWhenInvalid:o=!1,...r})=>{let i=reactHookForm.useFormContext(),{isValid:s}=i.formState,a=web.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 jsxRuntime.jsx(web.animated.div,{style:a,...r,children:jsxRuntime.jsx(Ce.Primary,{htmlType:"submit",isSubmitting:t,...r,children:e})})},q2=Y5;var o3=n__default.default.div`
|
|
1096
1095
|
position: relative;
|
|
1097
1096
|
margin-bottom: 24px;
|
|
1098
1097
|
z-index: 20;
|
|
1099
|
-
`,r3=n__default.default(
|
|
1098
|
+
`,r3=n__default.default(d.Body)`
|
|
1100
1099
|
margin-bottom: 5px;
|
|
1101
1100
|
font-weight: bold;
|
|
1102
|
-
`,n3=n__default.default(
|
|
1101
|
+
`,n3=n__default.default(d.Body)`
|
|
1103
1102
|
margin-bottom: 12px;
|
|
1104
1103
|
`,i3=n__default.default.div`
|
|
1105
1104
|
position: relative;
|
|
@@ -1160,22 +1159,22 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1160
1159
|
padding: 0 20px;
|
|
1161
1160
|
width: 100%;
|
|
1162
1161
|
height: 100%;
|
|
1163
|
-
`,d3=n__default.default(
|
|
1162
|
+
`,d3=n__default.default(d.Body)`
|
|
1164
1163
|
margin-bottom: 24px;
|
|
1165
|
-
`,c3=e=>{let t="",o="";e.address_components.forEach(s=>{let l=s.types.some(
|
|
1164
|
+
`,c3=e=>{let t="",o="";e.address_components.forEach(s=>{let l=s.types.some(c=>c==="locality"),a=s.types.some(c=>c==="administrative_area_level_1");l?t=s.short_name:a&&(o=s.short_name);});let r=e.geometry.location.lat(),i=e.geometry.location.lng();return {city:t,state:o,lat:r,long:i}},m3=({handleSelect:e,option:t,value:o})=>{let{description:r}=t,i=r===o,s=r.replace(", USA","");return jsxRuntime.jsx(l3,{isCurrent:i,onClick:()=>e(s),children:jsxRuntime.jsx(d.Body,{size:"lg",children:s})})},f3=({label:e="",details:t="",required:o=!0,previewOnly:r=!1})=>{let i=D2.useRef(),[s,l]=D2.useState(!1),[a,c]=D2.useState(!1),m=reactHookForm.useFormContext();m.register("city",{required:o});let f=web.useSpring(s?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});D2.useEffect(()=>{let y=u=>{s&&i.current&&!i.current.contains(u.target)&&l(!1);};return document.addEventListener("mousedown",u=>y(u)),()=>{document.removeEventListener("mousedown",u=>y(u));}},[s]);let g=m.getValues("city")?`${m.getValues("city")}, ${m.getValues("state")}`:"",{value:C,suggestions:{data:h,loading:x},setValue:v,clearSuggestions:S}=j5__default.default({requestOptions:{types:["locality","postal_code"],componentRestrictions:{country:"us"}}});D2.useEffect(()=>{if(x){c(x);return}setTimeout(()=>{c(x);},2e3);},[x]);let V=web.useSpring(a?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),$=y=>{v(y.target.value),m.setValue("city",null),m.setValue("state",null),m.trigger("city"),y.target.value.length>=3&&l(!0);},T=y=>{v(y,!1),S(),!(y.length<=2)&&j5.getGeocode({address:y}).then(u=>{let{city:p,state:b,lat:ge,long:Ct}=c3(u[0]);m.setValue("city",p),m.setValue("state",b),m.setValue("lat",ge),m.setValue("long",Ct),m.trigger("city");}).catch(u=>console.error(`Google Maps API error: ${u}`));},_=y=>{y.code==="Enter"&&y.preventDefault();};return jsxRuntime.jsxs(o3,{children:[jsxRuntime.jsx(r3,{size:"lg",children:e}),t&&jsxRuntime.jsx(n3,{children:t}),r?jsxRuntime.jsx(d3,{size:"md",children:g||"N/A"}):jsxRuntime.jsxs(i3,{children:[jsxRuntime.jsx(p3,{onKeyDown:_,value:C||g,onChange:y=>$(y),type:"text"}),h.length>0&&jsxRuntime.jsx(s3,{style:f,ref:i,children:h.map(y=>jsxRuntime.jsx(m3,{handleSelect:T,option:y,value:C},y.description))}),jsxRuntime.jsx(a3,{style:V,children:jsxRuntime.jsx(xe,{size:"sm"})})]})]})},rt=e=>{let{isLoaded:t}=api.useLoadScript({googleMapsApiKey:e.api_key||process.env.GOOGLE_MAPS_API_KEY||"",libraries:["places"]});return t?jsxRuntime.jsx(f3,{...e}):null};var u3=({label:e="",name:t,...o})=>{let{setValue:r}=reactHookForm.useFormContext(),i=n__default.default(d.Body)`
|
|
1166
1165
|
margin-bottom: 5px;
|
|
1167
1166
|
text-align: start;
|
|
1168
1167
|
`,s=n__default.default.div`
|
|
1169
1168
|
position: relative;
|
|
1170
1169
|
margin-bottom: 24px;
|
|
1171
|
-
`;return jsxRuntime.jsxs(s,{children:[e&&jsxRuntime.jsx(i,{children:e}),jsxRuntime.jsx(Le,{...o,onChange:a=>{r(t,a.value);}})]})},it=u3;var at=({color:e="#5A5A5A"})=>jsxRuntime.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.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
|
|
1170
|
+
`;return jsxRuntime.jsxs(s,{children:[e&&jsxRuntime.jsx(i,{children:e}),jsxRuntime.jsx(Le,{...o,onChange:a=>{r(t,a.value);}})]})},it=u3;var at=({color:e="#5A5A5A"})=>jsxRuntime.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.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 x3=n__default.default.div`
|
|
1172
1171
|
position: relative;
|
|
1173
1172
|
margin-bottom: 24px;
|
|
1174
1173
|
z-index: 20;
|
|
1175
|
-
`,w3=n__default.default(
|
|
1174
|
+
`,w3=n__default.default(d.Body)`
|
|
1176
1175
|
margin-bottom: 5px;
|
|
1177
1176
|
font-weight: bold;
|
|
1178
|
-
`,v3=n__default.default(
|
|
1177
|
+
`,v3=n__default.default(d.Body)`
|
|
1179
1178
|
margin-bottom: 12px;
|
|
1180
1179
|
`,k3=n__default.default.div`
|
|
1181
1180
|
position: relative;
|
|
@@ -1251,14 +1250,14 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1251
1250
|
border: 0.766898px solid;
|
|
1252
1251
|
border-color: ${e=>e.isCurrent?"#285E50 !important":"#3f937c"};
|
|
1253
1252
|
background: ${e=>e.isCurrent?"#285E50 !important":"#FFF"};
|
|
1254
|
-
`,H3=({label:e="",name:t,details:o="",options:r=[],previewOnly:i=!1})=>{let s=D2.useRef(),l=reactHookForm.useFormContext(),[a,
|
|
1253
|
+
`,H3=({label:e="",name:t,details:o="",options:r=[],previewOnly:i=!1})=>{let s=D2.useRef(),l=reactHookForm.useFormContext(),[a,c]=D2.useState(!1),[m,f]=D2.useState(""),[g,C]=D2.useState(l.getValues(t)||[]),h=D2.useRef({search:m,keywords:g});D2.useEffect(()=>{h.current={search:m,keywords:g};},[m,g]);let[x,v]=D2.useState(r),S=web.useSpring(a?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}}),V=r.find(p=>p===l.getValues(t)),$=p=>{let b=[...h.current.keywords,p];f(""),C(b),l.setValue(t,b),c(!1);},T=p=>p?p.charAt(0).toUpperCase()+p.slice(1).toLowerCase():"",_=()=>{if(!h.current.search)return;let p=T(h.current.search);$(p);};D2.useEffect(()=>{let p=b=>{a&&s.current&&!s.current.contains(b.target)&&(_(),c(!1));};return document.addEventListener("mousedown",b=>p(b)),()=>{document.removeEventListener("mousedown",b=>p(b));}},[a]);let y=p=>{p.code==="Enter"&&(_(),p.preventDefault());},u=p=>{let b=g.filter(ge=>ge!==p);C(b),f(""),l.setValue(t,b);};return D2.useEffect(()=>{if(c(!!m),m){let p=r.filter(b=>b.toLowerCase().match(m.toLowerCase()));v(p);}else v(r);},[m]),D2.useEffect(()=>{let p=r.filter(b=>!g.includes(b));v(p);},[g]),jsxRuntime.jsxs(x3,{children:[jsxRuntime.jsx(w3,{size:"lg",children:e}),o&&jsxRuntime.jsx(v3,{children:o}),!i&&jsxRuntime.jsxs(k3,{onClick:()=>c(!a),children:[jsxRuntime.jsx(at,{}),V,jsxRuntime.jsx(S3,{onKeyDown:y,value:m,onChange:p=>f(p.target.value),type:"text",style:{marginLeft:"45px",width:"calc(100% - 80px)"}}),jsxRuntime.jsxs(L3,{style:S,ref:s,children:[x.map(p=>{let b=p===V;return jsxRuntime.jsxs(pt,{onClick:()=>$(p),children:[jsxRuntime.jsx(d.Body,{size:"lg",children:p}),jsxRuntime.jsx(z3,{isCurrent:b,children:jsxRuntime.jsx(R.Check,{color:"#fff"})})]},p)}),!x.length&&jsxRuntime.jsx(pt,{onClick:()=>_(),children:jsxRuntime.jsx(d.Body,{size:"lg",children:"Add Option"})},"add")]})]}),jsxRuntime.jsxs("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"},children:[i&&g.length===0&&"N/A",g.map(p=>jsxRuntime.jsxs(M3,{onClick:()=>u(p),children:[p,!i&&jsxRuntime.jsx(re,{})]},p))]})]})},dt=H3;var B3=({label:e=null,isLabelBold:t=!0,name:o,options:r={},...i})=>{let{control:s}=reactHookForm.useFormContext(),l=n__default.default(d.Body)`
|
|
1255
1254
|
margin-bottom: 5px;
|
|
1256
|
-
font-weight: ${({isLabelBold:
|
|
1255
|
+
font-weight: ${({isLabelBold:c})=>c?"bold":"regular"};
|
|
1257
1256
|
text-align: start;
|
|
1258
1257
|
`,a=n__default.default.div`
|
|
1259
1258
|
position: relative;
|
|
1260
1259
|
margin-bottom: 24px;
|
|
1261
|
-
`;return jsxRuntime.jsxs(a,{children:[e&&jsxRuntime.jsx(l,{size:"lg",isLabelBold:t,children:e}),jsxRuntime.jsx(reactHookForm.Controller,{render:({field:
|
|
1260
|
+
`;return jsxRuntime.jsxs(a,{children:[e&&jsxRuntime.jsx(l,{size:"lg",isLabelBold:t,children:e}),jsxRuntime.jsx(reactHookForm.Controller,{render:({field:c})=>jsxRuntime.jsx(he,{...i,...c}),name:o,control:s,...r})]})},mt=B3;var T3={Container:I2,Checkbox:le,CheckboxGroup:A2,DateSelect:mt,TextInput:F,TimeSelect:it,Radio:de,RadioGroup:X2,CardRadioGroup:K2,Select:U2,Signature:G2,Submit:q2,LocationSelect:rt,Keyword:dt,Toggle:Se};var $3=n__default.default(web.animated.div)`
|
|
1262
1261
|
max-height: ${({size:e})=>(e||58)+24}px;
|
|
1263
1262
|
padding: 12px;
|
|
1264
1263
|
display: flex;
|
|
@@ -1290,7 +1289,7 @@ var N={colors:{primary:"#1D4339",secondaryGreen:"#285E50",lightGreen:"#BED3CC",f
|
|
|
1290
1289
|
margin: 0;
|
|
1291
1290
|
line-height: 12px;
|
|
1292
1291
|
color: #1d4339;
|
|
1293
|
-
`,I3=({contentfulConfig:e,size:t=58})=>{let[o,r]=D2.useState(""),[i,s]=web.useSpring(()=>({from:{width:t+24,backgroundColor:"#fff",color:"#ffffff"}}));D2.useEffect(()=>{new A(e).getImage("vanta-logo").then(C=>{r(C);});},[]);let[l,a]=web.useSpring(()=>({from:{opacity:0},delay:100})),
|
|
1292
|
+
`,I3=({contentfulConfig:e,size:t=58})=>{let[o,r]=D2.useState(""),[i,s]=web.useSpring(()=>({from:{width:t+24,backgroundColor:"#fff",color:"#ffffff"}}));D2.useEffect(()=>{new A(e).getImage("vanta-logo").then(C=>{r(C);});},[]);let[l,a]=web.useSpring(()=>({from:{opacity:0},delay:100})),c=C=>({width:C?198+t:t+24,backgroundColor:C?"#d4e2dd":"#fff"}),m=C=>({opacity:C?1:0}),f=()=>{s(c(!0)),a(m(!0));},g=()=>{s(c(!1)),a(m(!1));};return o?jsxRuntime.jsxs($3,{style:i,onMouseEnter:f,onMouseLeave:g,size:t,children:[jsxRuntime.jsx("img",{alt:"Vanta Logo",src:o,height:t,width:t}),jsxRuntime.jsxs(Z3,{style:l,children:[jsxRuntime.jsx(d.Body,{children:jsxRuntime.jsx(A3,{children:"Guaranteed Security"})}),jsxRuntime.jsx(d.Body,{size:"xs",children:jsxRuntime.jsx(F3,{children:"We're committed to protecting your privacy. Solace is safe, secure, and HIPAA compliant\u2014 certified by Vanta."})})]})]}):null},N3=I3;
|
|
1294
1293
|
|
|
1295
1294
|
Object.defineProperty(exports, 'styled', {
|
|
1296
1295
|
enumerable: true,
|
|
@@ -1313,7 +1312,7 @@ exports.DateSelect = he;
|
|
|
1313
1312
|
exports.Drawer = fo;
|
|
1314
1313
|
exports.Form = T3;
|
|
1315
1314
|
exports.Icons = R;
|
|
1316
|
-
exports.LoadingSpinner =
|
|
1315
|
+
exports.LoadingSpinner = xe;
|
|
1317
1316
|
exports.LottieAnimation = Do;
|
|
1318
1317
|
exports.Menu = J;
|
|
1319
1318
|
exports.Modal = Ao;
|
|
@@ -1322,12 +1321,12 @@ exports.Progress = No;
|
|
|
1322
1321
|
exports.Segmented = Ko;
|
|
1323
1322
|
exports.Size = Be;
|
|
1324
1323
|
exports.SolaceLogo = Uo;
|
|
1325
|
-
exports.SolaceThemeProvider =
|
|
1324
|
+
exports.SolaceThemeProvider = xt;
|
|
1326
1325
|
exports.Tabs = Qo;
|
|
1327
1326
|
exports.TimeSelect = Le;
|
|
1328
1327
|
exports.Toggle = Se;
|
|
1329
1328
|
exports.Tooltip = D1;
|
|
1330
|
-
exports.Typography =
|
|
1329
|
+
exports.Typography = d;
|
|
1331
1330
|
exports.VantaLogo = N3;
|
|
1332
1331
|
//# sourceMappingURL=out.js.map
|
|
1333
1332
|
//# sourceMappingURL=index.cjs.map
|