@solace-health/ui 0.4.5 → 0.4.6
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -312,7 +312,7 @@ var w2=(s=>(s.XL="xl",s.LG="lg",s.MD="md",s.SM="sm",s.XS="xs",s))(w2||{});var X1
|
|
|
312
312
|
`}
|
|
313
313
|
`,K3=({className:e="",children:t="",size:o="md",allCaps:r=!1,color:i=""})=>jsxRuntime.jsx(X3,{allCaps:r,className:e,size:o,style:{color:i},children:t}),a1=K3;var U3=n__default.default.span`
|
|
314
314
|
margin: 0;
|
|
315
|
-
`,Y3=({children:e,as:t,length:o=120})=>{let i=((s,p,a="...")=>{let c=s.length>p?a:"";return s.substring(0,p)+c})(e,o);return jsxRuntime.jsx(U3,{as:t,children:i})},l1=Y3;var d={Body:i1,Display:s1,Error:e2,Header:a1,Truncated:l1};var t5=({startTime:e="00:00",endTime:t="24:00",interval:o=30,defaultValue:r="",onChange:i=()=>null})=>{let[s,p]=react$1.useState("closed"),[a,c]=react$1.useState(),h=react$1.useCallback(()=>{let C=luxon.DateTime.fromFormat(t,"HH:mm"),u=luxon.Duration.fromObject({minutes:o}),v=[],w=luxon.DateTime.fromFormat(e,"hh:mm");for(;w<C;)v.push({label:w.toFormat("h:mm a"),value:{hour:w.toFormat("HH"),min:w.toFormat("mm"),raw:w.toFormat("HH:mm"),formatted:w.toFormat("h:mm a")}}),w=w.plus(u);return v},[e,t,o,r])();return react$1.useEffect(()=>{let C=h.find(u=>u.value.raw===(r||e));c(C);},[]),jsxRuntime.jsx(o1,{onItemClick:C=>{let u=h.find(v=>v.value.raw===C.value.raw);c(u),i(C);},onMenuChange:C=>p(C),cta:jsxRuntime.jsxs(t1,{children:[jsxRuntime.jsx(d.Body,{size:"lg",children:a?.value.formatted||"-"}),jsxRuntime.jsx(z.Caret,{direction:["open","opening"].includes(s)?"up":"down"})]}),children:h.map((C,u,v)=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(n1,{label:C.label,value:C.value},C.label),v.length-1!==u&&jsxRuntime.jsx(r1,{})]}))})},g2=t5;var n5=(t=>(t.LOADING_LISTINGS="loadingListings",t))(n5||{}),I=class{client;constructor(t){this.client=g1__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 p5=({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(s5__default.default,{loop:r,animationData:e,play:!0,style:{width:o,height:t},rendererSettings:{preserveAspectRatio:"xMidYMid slice"}})})},d5=({height:e,width:t,loop:o,slug:r,contentfulConfig:i})=>{let[s,p]=react$1.useState();return react$1.useEffect(()=>{new I(i).getLottieFile({slug:r}).then(a=>{p(a);});},[]),s?jsxRuntime.jsx(p5,{animationData:s,height:e,width:t,loop:o}):null};var f5=n__default.default.div`
|
|
315
|
+
`,Y3=({children:e,as:t,length:o=120})=>{let i=((s,p,a="...")=>{let c=s.length>p?a:"";return s.substring(0,p)+c})(e,o);return jsxRuntime.jsx(U3,{as:t,children:i})},l1=Y3;var d={Body:i1,Display:s1,Error:e2,Header:a1,Truncated:l1};var t5=({startTime:e="00:00",endTime:t="24:00",interval:o=30,defaultValue:r="",onChange:i=()=>null})=>{let[s,p]=react$1.useState("closed"),[a,c]=react$1.useState(),h=react$1.useCallback(()=>{let C=luxon.DateTime.fromFormat(t,"HH:mm"),u=luxon.Duration.fromObject({minutes:o}),v=[],w=luxon.DateTime.fromFormat(e,"hh:mm");for(;w<C;)v.push({label:w.toFormat("h:mm a"),value:{hour:w.toFormat("HH"),min:w.toFormat("mm"),raw:w.toFormat("HH:mm"),formatted:w.toFormat("h:mm a")}}),w=w.plus(u);return v},[e,t,o,r])();return react$1.useEffect(()=>{let C=h.find(u=>u.value.raw===(r||e));c(C);},[r]),jsxRuntime.jsx(o1,{onItemClick:C=>{let u=h.find(v=>v.value.raw===C.value.raw);c(u),i(C);},onMenuChange:C=>p(C),cta:jsxRuntime.jsxs(t1,{children:[jsxRuntime.jsx(d.Body,{size:"lg",children:a?.value.formatted||"-"}),jsxRuntime.jsx(z.Caret,{direction:["open","opening"].includes(s)?"up":"down"})]}),children:h.map((C,u,v)=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(n1,{label:C.label,value:C.value},C.label),v.length-1!==u&&jsxRuntime.jsx(r1,{})]}))})},g2=t5;var n5=(t=>(t.LOADING_LISTINGS="loadingListings",t))(n5||{}),I=class{client;constructor(t){this.client=g1__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 p5=({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(s5__default.default,{loop:r,animationData:e,play:!0,style:{width:o,height:t},rendererSettings:{preserveAspectRatio:"xMidYMid slice"}})})},d5=({height:e,width:t,loop:o,slug:r,contentfulConfig:i})=>{let[s,p]=react$1.useState();return react$1.useEffect(()=>{new I(i).getLottieFile({slug:r}).then(a=>{p(a);});},[]),s?jsxRuntime.jsx(p5,{animationData:s,height:e,width:t,loop:o}):null};var f5=n__default.default.div`
|
|
316
316
|
align-items: center;
|
|
317
317
|
background-color: rgba(0, 0, 0, 0.2);
|
|
318
318
|
bottom: 0;
|