@solace-health/ui 0.10.299 → 0.10.300

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 CHANGED
@@ -1534,7 +1534,7 @@ The mask that was received is: ${JSON.stringify(C)}`);return C.map(t=>t instance
1534
1534
  display: flex;
1535
1535
  flex-flow: column;
1536
1536
  gap: var(--spacing-m, 1rem);
1537
- `;var v8=({option:C,name:e,inline:t,previewOnly:o=!1,hasError:r=!1,formOptions:i={},...n})=>{let{register:a}=reactHookForm.useFormContext();return jsxRuntime.jsxs(Yr,{inline:t,children:[jsxRuntime.jsx(Kr,{type:"radio",...a(e,i),value:C.value,previewOnly:o,disabled:o,hasError:r,...n}),jsxRuntime.jsx("label",{htmlFor:e,children:jsxRuntime.jsx(w.Body,{children:C.label})})]})},Li=({name:C,label:e,details:t="",options:o=[],inline:r=!1,allowOther:i=!1,previewOnly:n=!1,formOptions:a={},errorMessage:l=void 0,...p})=>{let{formState:{errors:L}}=reactHookForm.useFormContext(),d=!!reactHookForm.get(L,C);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(q,{label:e,required:!!a.required,isLabelBold:!0,details:t}),jsxRuntime.jsxs(Jr,{inline:r,isColumns:o.length>5,children:[o.map(c=>jsxRuntime.jsx(v8,{option:c,name:C,inline:r,previewOnly:n,formOptions:a,...p,hasError:d},`${C}-${c.value}`)),i&&jsxRuntime.jsxs(Qr,{children:[jsxRuntime.jsx(v8,{option:{label:"Other",value:"other"},name:C,inline:r,...p},C),jsxRuntime.jsx(d5,{name:`${C}_other`,...p})]})]}),d&&jsxRuntime.jsx(N,{text:l,includeIcon:!1})]})},jc=({option:C,name:e,formOptions:t})=>{let{register:o,watch:r,formState:i}=reactHookForm.useFormContext(),n=r(e)===C.value;return jsxRuntime.jsxs(jr,{selected:n,hasError:!!i.errors[e],disabled:C.disabled||!1,children:[jsxRuntime.jsxs(Ci,{children:[jsxRuntime.jsxs(ti,{selected:n,children:[C.icon||null,C.label]}),jsxRuntime.jsx(ei,{type:"radio",value:C.value,...o(e,t)})]}),C.description&&jsxRuntime.jsx(oi,{selected:n,children:C.description})]})},di=({name:C,label:e=null,className:t="",options:o,formOptions:r={},id:i=""})=>jsxRuntime.jsxs(x6,{className:t,id:i,children:[e&&jsxRuntime.jsx(y6,{size:"lg",children:e}),jsxRuntime.jsx("div",{children:o.map(n=>jsxRuntime.jsx(jc,{option:n,name:C,formOptions:r},`${n.label}-${n.value}`))})]}),Cm=({option:C,name:e,formOptions:t,showCaret:o=!1,onClick:r=void 0,onMouseEnter:i=()=>null,onMouseLeave:n=()=>null})=>{let{register:a,watch:l}=reactHookForm.useFormContext(),p=l(e)===C.value,[L,d]=Df.useState(!1),c=L9[C.icon],f=web.useSpring(L?{transform:"translate(8px, 0px)"}:{transform:"translate(0px, 0px)"}),g=()=>{d(!0),i(C.value);},M=()=>{d(!1),n(C.value);};return jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsx(si,{type:"radio",onClick:E=>r?r(E.currentTarget.value):null,value:C.value,...a(e,t),onMouseEnter:g,onMouseLeave:M}),jsxRuntime.jsxs(ri,{selected:p,children:[jsxRuntime.jsxs(antd.Flex,{align:"center",gap:16,children:[jsxRuntime.jsx(ii,{children:jsxRuntime.jsx(c,{active:p||L})}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:4,flexDirection:"column"},children:[jsxRuntime.jsx(ai,{children:C.label}),C?.description&&jsxRuntime.jsx(li,{children:C.description})]})]}),o&&jsxRuntime.jsx(ni,{style:f,children:jsxRuntime.jsx(T.Caret,{direction:"right",color:p||L?"#285E50":"#7F7F7F"})})]})]})},fi=({name:C,label:e=null,className:t="",options:o,onClick:r=void 0,onMouseEnter:i=()=>null,onMouseLeave:n=()=>null,showCaret:a=!1,formOptions:l={}})=>jsxRuntime.jsxs(x6,{className:t,children:[e&&jsxRuntime.jsx(y6,{size:"lg",children:e}),jsxRuntime.jsx(pi,{children:o.map(p=>jsxRuntime.jsx(Cm,{option:p,name:C,onClick:r,onMouseEnter:i,onMouseLeave:n,formOptions:l,showCaret:a},`${p.label}-${p.value}`))})]}),ci=({options:C,name:e,formOptions:t=void 0,disabled:o=!1,errorMessage:r=void 0,onChange:i=()=>null})=>{let{control:n,formState:a}=reactHookForm.useFormContext(),l=!!a.errors[e];return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactHookForm.Controller,{rules:t,control:n,name:e,render:({field:p})=>jsxRuntime.jsx(w6,{options:C,disabled:o,...p,onChange:L=>{p.onChange(L),i(L.target.value);}})}),l&&jsxRuntime.jsx(N,{text:r,includeIcon:!1})]})};var mi=$__default.default.div`
1537
+ `;var v8=({option:C,name:e,inline:t,previewOnly:o=!1,hasError:r=!1,formOptions:i={},...n})=>{let{register:a}=reactHookForm.useFormContext();return jsxRuntime.jsxs(Yr,{inline:t,children:[jsxRuntime.jsx(Kr,{type:"radio",...a(e,i),value:C.value,previewOnly:o,disabled:o,hasError:r,...n}),jsxRuntime.jsx("label",{htmlFor:e,children:jsxRuntime.jsx(w.Body,{children:C.label})})]})},Li=({name:C,label:e,details:t="",options:o=[],inline:r=!1,allowOther:i=!1,previewOnly:n=!1,formOptions:a={},errorMessage:l=void 0,showErrorMessage:p=!0,...L})=>{let{formState:{errors:d}}=reactHookForm.useFormContext(),c=!!reactHookForm.get(d,C);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(q,{label:e,required:!!a.required,isLabelBold:!0,details:t}),jsxRuntime.jsxs(Jr,{inline:r,isColumns:o.length>5,children:[o.map(f=>jsxRuntime.jsx(v8,{option:f,name:C,inline:r,previewOnly:n,formOptions:a,...L,hasError:c},`${C}-${f.value}`)),i&&jsxRuntime.jsxs(Qr,{children:[jsxRuntime.jsx(v8,{option:{label:"Other",value:"other"},name:C,inline:r,...L},C),jsxRuntime.jsx(d5,{name:`${C}_other`,...L})]})]}),p&&c&&jsxRuntime.jsx(N,{text:l,includeIcon:!1})]})},jc=({option:C,name:e,formOptions:t})=>{let{register:o,watch:r,formState:i}=reactHookForm.useFormContext(),n=r(e)===C.value;return jsxRuntime.jsxs(jr,{selected:n,hasError:!!i.errors[e],disabled:C.disabled||!1,children:[jsxRuntime.jsxs(Ci,{children:[jsxRuntime.jsxs(ti,{selected:n,children:[C.icon||null,C.label]}),jsxRuntime.jsx(ei,{type:"radio",value:C.value,...o(e,t)})]}),C.description&&jsxRuntime.jsx(oi,{selected:n,children:C.description})]})},di=({name:C,label:e=null,className:t="",options:o,formOptions:r={},id:i=""})=>jsxRuntime.jsxs(x6,{className:t,id:i,children:[e&&jsxRuntime.jsx(y6,{size:"lg",children:e}),jsxRuntime.jsx("div",{children:o.map(n=>jsxRuntime.jsx(jc,{option:n,name:C,formOptions:r},`${n.label}-${n.value}`))})]}),Cm=({option:C,name:e,formOptions:t,showCaret:o=!1,onClick:r=void 0,onMouseEnter:i=()=>null,onMouseLeave:n=()=>null})=>{let{register:a,watch:l}=reactHookForm.useFormContext(),p=l(e)===C.value,[L,d]=Df.useState(!1),c=L9[C.icon],f=web.useSpring(L?{transform:"translate(8px, 0px)"}:{transform:"translate(0px, 0px)"}),g=()=>{d(!0),i(C.value);},M=()=>{d(!1),n(C.value);};return jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsx(si,{type:"radio",onClick:E=>r?r(E.currentTarget.value):null,value:C.value,...a(e,t),onMouseEnter:g,onMouseLeave:M}),jsxRuntime.jsxs(ri,{selected:p,children:[jsxRuntime.jsxs(antd.Flex,{align:"center",gap:16,children:[jsxRuntime.jsx(ii,{children:jsxRuntime.jsx(c,{active:p||L})}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:4,flexDirection:"column"},children:[jsxRuntime.jsx(ai,{children:C.label}),C?.description&&jsxRuntime.jsx(li,{children:C.description})]})]}),o&&jsxRuntime.jsx(ni,{style:f,children:jsxRuntime.jsx(T.Caret,{direction:"right",color:p||L?"#285E50":"#7F7F7F"})})]})]})},fi=({name:C,label:e=null,className:t="",options:o,onClick:r=void 0,onMouseEnter:i=()=>null,onMouseLeave:n=()=>null,showCaret:a=!1,formOptions:l={}})=>jsxRuntime.jsxs(x6,{className:t,children:[e&&jsxRuntime.jsx(y6,{size:"lg",children:e}),jsxRuntime.jsx(pi,{children:o.map(p=>jsxRuntime.jsx(Cm,{option:p,name:C,onClick:r,onMouseEnter:i,onMouseLeave:n,formOptions:l,showCaret:a},`${p.label}-${p.value}`))})]}),ci=({options:C,name:e,formOptions:t=void 0,disabled:o=!1,errorMessage:r=void 0,showErrorMessage:i=!0,onChange:n=()=>null})=>{let{control:a,formState:l}=reactHookForm.useFormContext(),p=!!l.errors[e];return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactHookForm.Controller,{rules:t,control:a,name:e,render:({field:L})=>jsxRuntime.jsx(w6,{options:C,disabled:o,...L,onChange:d=>{L.onChange(d),n(d.target.value);}})}),i&&p&&jsxRuntime.jsx(N,{text:r,includeIcon:!1})]})};var mi=$__default.default.div`
1538
1538
  position: relative;
1539
1539
  margin-bottom: 24px;
1540
1540
  z-index: 40;