@solace-health/ui 0.10.177 → 0.10.178
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -976,7 +976,7 @@ The mask that was received is: ${JSON.stringify(A)}`);return A.map(g=>g instance
|
|
|
976
976
|
align-items: center;
|
|
977
977
|
justify-content: center;
|
|
978
978
|
padding-right: 1rem;
|
|
979
|
-
`;var UC=({color:A="#5A5A5A",size:C=21})=>jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:C,height:C,viewBox:"0 0 21 21",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.19934 1.57751L2.02083 2.75603L5.4083 6.14349C5.09278 6.40498 4.78053 6.6858 4.47171 6.98444C3.7807 7.65269 3.15554 8.36611 2.60521 9.07983C2.27313 9.51051 2.03735 9.84931 1.90826 10.0511L1.62109 10.5001L1.90826 10.9491C2.03735 11.151 2.27313 11.4898 2.60521 11.9205C3.15554 12.6342 3.7807 13.3476 4.47171 14.0159C6.49722 15.9746 8.67067 17.1668 10.9436 17.1668C12.3777 17.1668 13.7721 16.6922 15.1148 15.85L18.6875 19.4227L19.866 18.2442L3.19934 1.57751ZM13.8974 14.6326L12.6379 13.3731C12.1421 13.6656 11.5639 13.8334 10.9466 13.8334C9.10567 13.8334 7.61328 12.341 7.61328 10.5C7.61328 9.88272 7.78109 9.30459 8.07359 8.80878L6.5933 7.3285C6.2705 7.58882 5.94924 7.87411 5.63032 8.18252C5.00182 8.79032 4.42895 9.44408 3.92508 10.0975C3.81626 10.2387 3.7157 10.3733 3.62376 10.5001C3.7157 10.627 3.81626 10.7616 3.92508 10.9028C4.42895 11.5562 5.00182 12.21 5.63032 12.8178C7.37487 14.5048 9.18939 15.5001 10.9436 15.5001C11.9171 15.5001 12.9091 15.1937 13.8974 14.6326ZM9.33572 10.0709C9.29934 10.2078 9.27995 10.3517 9.27995 10.5C9.27995 11.4205 10.0261 12.1667 10.9466 12.1667C11.095 12.1667 11.2388 12.1473 11.3758 12.1109L9.33572 10.0709ZM17.6889 13.7426L16.5104 12.5641C17.0388 12.0298 17.5246 11.4662 17.959 10.9027C18.0679 10.7616 18.1684 10.6269 18.2604 10.5001C18.1684 10.3733 18.0679 10.2387 17.959 10.0975C17.4552 9.44405 16.8823 8.79029 16.2538 8.1825C14.5093 6.49543 12.6947 5.50012 10.9405 5.50012C10.5052 5.50012 10.0663 5.56139 9.6256 5.6793L8.30729 4.36099C9.16766 4.01794 10.0464 3.83346 10.9405 3.83346C13.2135 3.83346 15.3869 5.02564 17.4124 6.98441C18.1034 7.65266 18.7286 8.36609 19.2789 9.07981C19.611 9.51049 19.8468 9.84928 19.9759 10.0511L20.263 10.5001L19.9759 10.9491C19.8468 11.151 19.611 11.4898 19.2789 11.9204C18.8029 12.5377 18.271 13.1548 17.6889 13.7426Z",fill:A})});var HC=({color:A="#5A5A5A",size:C=21})=>jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:C,height:C*.65,viewBox:"0 0 20 13",fill:"none",children:jsxRuntime.jsx("path",{d:"M9.94792 10.3334C10.9896 10.3334 11.875 9.96879 12.6042 9.23962C13.3333 8.51046 13.6979 7.62504 13.6979 6.58337C13.6979 5.54171 13.3333 4.65629 12.6042 3.92712C11.875 3.19796 10.9896 2.83337 9.94792 2.83337C8.90625 2.83337 8.02083 3.19796 7.29167 3.92712C6.5625 4.65629 6.19792 5.54171 6.19792 6.58337C6.19792 7.62504 6.5625 8.51046 7.29167 9.23962C8.02083 9.96879 8.90625 10.3334 9.94792 10.3334ZM9.94792 8.83337C9.32292 8.83337 8.79167 8.61462 8.35417 8.17712C7.91667 7.73962 7.69792 7.20837 7.69792 6.58337C7.69792 5.95837 7.91667 5.42712 8.35417 4.98962C8.79167 4.55212 9.32292 4.33337 9.94792 4.33337C10.5729 4.33337 11.1042 4.55212 11.5417 4.98962C11.9792 5.42712 12.1979 5.95837 12.1979 6.58337C12.1979 7.20837 11.9792 7.73962 11.5417 8.17712C11.1042 8.61462 10.5729 8.83337 9.94792 8.83337ZM9.94792 12.8334C7.92014 12.8334 6.07292 12.2674 4.40625 11.1355C2.73958 10.0035 1.53125 8.48615 0.78125 6.58337C1.53125 4.6806 2.73958 3.16324 4.40625 2.03129C6.07292 0.899346 7.92014 0.333374 9.94792 0.333374C11.9757 0.333374 13.8229 0.899346 15.4896 2.03129C17.1562 3.16324 18.3646 4.6806 19.1146 6.58337C18.3646 8.48615 17.1562 10.0035 15.4896 11.1355C13.8229 12.2674 11.9757 12.8334 9.94792 12.8334ZM9.94792 11.1667C11.5174 11.1667 12.9583 10.7535 14.2708 9.92712C15.5833 9.10073 16.5868 7.98615 17.2813 6.58337C16.5868 5.1806 15.5833 4.06601 14.2708 3.23962C12.9583 2.41323 11.5174 2.00004 9.94792 2.00004C8.37847 2.00004 6.9375 2.41323 5.625 3.23962C4.3125 4.06601 3.30903 5.1806 2.61458 6.58337C3.30903 7.98615 4.3125 9.10073 5.625 9.92712C6.9375 10.7535 8.37847 11.1667 9.94792 11.1667Z",fill:A})});var Ft=({previewOnly:A=!1,format:C,onAccept:g=void 0,...E})=>{let[B,I]=Jo.useState(!1),Q=E?.status==="error",t=["SSN"].some(r=>r===C),o=(()=>{switch(C){case"phone":return "(000) 000-0000";case"MBI":return "****-***-****";case"email":return /^\S*@?\S*$/;case"SSN":return [{mask:B?"000-00-0000":"XXX-XX-0000",definitions:{X:{mask:"0",displayChar:"\u25CF",placeholderChar:"#"}},lazy:!1,overwrite:"shift"}];case"SSN":return "00000";case"currency":return [{mask:"$num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:",",padFractionalZeros:!0,radix:".",mapToRadix:["."]}}}];default:return ""}})();return jsxRuntime.jsxs(PC,{children:[jsxRuntime.jsx(RC,{format:C,mask:o,unmask:!0,onAccept:g,disabled:A,error:Q,...E}),Q&&!t&&!!E?.suffix&&jsxRuntime.jsx(qC,{children:E.suffix}),t&&jsxRuntime.jsx(xC,{onClick:()=>I(!B),children:B?jsxRuntime.jsx(HC,{}):jsxRuntime.jsx(UC,{})})]})},MC=Ft;var H1={Area:vC,Text:wC,Number:mC,Password:VC,Mask:MC};var SC=A=>{let C;switch(A){case"MBI":C={value:/^[1-9]{1}[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz]{1}[0-9]{1}-?[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz]{1}[0-9]{1}-?[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz|^0-9]{1}[0-9]{1}[0-9]{1}/g,message:"Invalid medicare number"};break;case"zipcode":C={value:/\d{5}/,message:"Invalid zipcode"};break;case"phone":C={value:/\d{10}/,message:"Invalid phone number"};break;case"SSN":C={value:/\d{9}/,message:"Invalid social security number"};break;case"currency":C={value:/\d*(?:\.\d{2})?/,message:"Invalid amount"};break;case"email":C={value
|
|
979
|
+
`;var UC=({color:A="#5A5A5A",size:C=21})=>jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:C,height:C,viewBox:"0 0 21 21",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.19934 1.57751L2.02083 2.75603L5.4083 6.14349C5.09278 6.40498 4.78053 6.6858 4.47171 6.98444C3.7807 7.65269 3.15554 8.36611 2.60521 9.07983C2.27313 9.51051 2.03735 9.84931 1.90826 10.0511L1.62109 10.5001L1.90826 10.9491C2.03735 11.151 2.27313 11.4898 2.60521 11.9205C3.15554 12.6342 3.7807 13.3476 4.47171 14.0159C6.49722 15.9746 8.67067 17.1668 10.9436 17.1668C12.3777 17.1668 13.7721 16.6922 15.1148 15.85L18.6875 19.4227L19.866 18.2442L3.19934 1.57751ZM13.8974 14.6326L12.6379 13.3731C12.1421 13.6656 11.5639 13.8334 10.9466 13.8334C9.10567 13.8334 7.61328 12.341 7.61328 10.5C7.61328 9.88272 7.78109 9.30459 8.07359 8.80878L6.5933 7.3285C6.2705 7.58882 5.94924 7.87411 5.63032 8.18252C5.00182 8.79032 4.42895 9.44408 3.92508 10.0975C3.81626 10.2387 3.7157 10.3733 3.62376 10.5001C3.7157 10.627 3.81626 10.7616 3.92508 10.9028C4.42895 11.5562 5.00182 12.21 5.63032 12.8178C7.37487 14.5048 9.18939 15.5001 10.9436 15.5001C11.9171 15.5001 12.9091 15.1937 13.8974 14.6326ZM9.33572 10.0709C9.29934 10.2078 9.27995 10.3517 9.27995 10.5C9.27995 11.4205 10.0261 12.1667 10.9466 12.1667C11.095 12.1667 11.2388 12.1473 11.3758 12.1109L9.33572 10.0709ZM17.6889 13.7426L16.5104 12.5641C17.0388 12.0298 17.5246 11.4662 17.959 10.9027C18.0679 10.7616 18.1684 10.6269 18.2604 10.5001C18.1684 10.3733 18.0679 10.2387 17.959 10.0975C17.4552 9.44405 16.8823 8.79029 16.2538 8.1825C14.5093 6.49543 12.6947 5.50012 10.9405 5.50012C10.5052 5.50012 10.0663 5.56139 9.6256 5.6793L8.30729 4.36099C9.16766 4.01794 10.0464 3.83346 10.9405 3.83346C13.2135 3.83346 15.3869 5.02564 17.4124 6.98441C18.1034 7.65266 18.7286 8.36609 19.2789 9.07981C19.611 9.51049 19.8468 9.84928 19.9759 10.0511L20.263 10.5001L19.9759 10.9491C19.8468 11.151 19.611 11.4898 19.2789 11.9204C18.8029 12.5377 18.271 13.1548 17.6889 13.7426Z",fill:A})});var HC=({color:A="#5A5A5A",size:C=21})=>jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:C,height:C*.65,viewBox:"0 0 20 13",fill:"none",children:jsxRuntime.jsx("path",{d:"M9.94792 10.3334C10.9896 10.3334 11.875 9.96879 12.6042 9.23962C13.3333 8.51046 13.6979 7.62504 13.6979 6.58337C13.6979 5.54171 13.3333 4.65629 12.6042 3.92712C11.875 3.19796 10.9896 2.83337 9.94792 2.83337C8.90625 2.83337 8.02083 3.19796 7.29167 3.92712C6.5625 4.65629 6.19792 5.54171 6.19792 6.58337C6.19792 7.62504 6.5625 8.51046 7.29167 9.23962C8.02083 9.96879 8.90625 10.3334 9.94792 10.3334ZM9.94792 8.83337C9.32292 8.83337 8.79167 8.61462 8.35417 8.17712C7.91667 7.73962 7.69792 7.20837 7.69792 6.58337C7.69792 5.95837 7.91667 5.42712 8.35417 4.98962C8.79167 4.55212 9.32292 4.33337 9.94792 4.33337C10.5729 4.33337 11.1042 4.55212 11.5417 4.98962C11.9792 5.42712 12.1979 5.95837 12.1979 6.58337C12.1979 7.20837 11.9792 7.73962 11.5417 8.17712C11.1042 8.61462 10.5729 8.83337 9.94792 8.83337ZM9.94792 12.8334C7.92014 12.8334 6.07292 12.2674 4.40625 11.1355C2.73958 10.0035 1.53125 8.48615 0.78125 6.58337C1.53125 4.6806 2.73958 3.16324 4.40625 2.03129C6.07292 0.899346 7.92014 0.333374 9.94792 0.333374C11.9757 0.333374 13.8229 0.899346 15.4896 2.03129C17.1562 3.16324 18.3646 4.6806 19.1146 6.58337C18.3646 8.48615 17.1562 10.0035 15.4896 11.1355C13.8229 12.2674 11.9757 12.8334 9.94792 12.8334ZM9.94792 11.1667C11.5174 11.1667 12.9583 10.7535 14.2708 9.92712C15.5833 9.10073 16.5868 7.98615 17.2813 6.58337C16.5868 5.1806 15.5833 4.06601 14.2708 3.23962C12.9583 2.41323 11.5174 2.00004 9.94792 2.00004C8.37847 2.00004 6.9375 2.41323 5.625 3.23962C4.3125 4.06601 3.30903 5.1806 2.61458 6.58337C3.30903 7.98615 4.3125 9.10073 5.625 9.92712C6.9375 10.7535 8.37847 11.1667 9.94792 11.1667Z",fill:A})});var Ft=({previewOnly:A=!1,format:C,onAccept:g=void 0,...E})=>{let[B,I]=Jo.useState(!1),Q=E?.status==="error",t=["SSN"].some(r=>r===C),o=(()=>{switch(C){case"phone":return "(000) 000-0000";case"MBI":return "****-***-****";case"email":return /^\S*@?\S*$/;case"SSN":return [{mask:B?"000-00-0000":"XXX-XX-0000",definitions:{X:{mask:"0",displayChar:"\u25CF",placeholderChar:"#"}},lazy:!1,overwrite:"shift"}];case"SSN":return "00000";case"currency":return [{mask:"$num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:",",padFractionalZeros:!0,radix:".",mapToRadix:["."]}}}];default:return ""}})();return jsxRuntime.jsxs(PC,{children:[jsxRuntime.jsx(RC,{format:C,mask:o,unmask:!0,onAccept:g,disabled:A,error:Q,...E}),Q&&!t&&!!E?.suffix&&jsxRuntime.jsx(qC,{children:E.suffix}),t&&jsxRuntime.jsx(xC,{onClick:()=>I(!B),children:B?jsxRuntime.jsx(HC,{}):jsxRuntime.jsx(UC,{})})]})},MC=Ft;var H1={Area:vC,Text:wC,Number:mC,Password:VC,Mask:MC};var SC=A=>{let C;switch(A){case"MBI":C={value:/^[1-9]{1}[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz]{1}[0-9]{1}-?[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz]{1}[0-9]{1}-?[^SLOIBZsloibz|^0-9]{1}[^SLOIBZsloibz|^0-9]{1}[0-9]{1}[0-9]{1}/g,message:"Invalid medicare number"};break;case"zipcode":C={value:/\d{5}/,message:"Invalid zipcode"};break;case"phone":C={value:/\d{10}/,message:"Invalid phone number"};break;case"SSN":C={value:/\d{9}/,message:"Invalid social security number"};break;case"currency":C={value:/\d*(?:\.\d{2})?/,message:"Invalid amount"};break;case"email":C={value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Invalid email address"};break;default:C=A;}return C};var yt=({name:A,label:C=null,details:g=null,formOptions:E={},pattern:B=void 0,format:I=void 0,textArea:Q=!1,password:e=!1,isLabelBold:t=!0,errorMessage:o="This field is required",disableErrorState:r=!1,...i})=>{let{control:n,formState:{errors:s}}=reactHookForm.useFormContext(),a=r?!1:!!reactHookForm.get(s,A),x=reactHookForm.get(s,A)?.message?.toString()||o,q=({field:f})=>Q?jsxRuntime.jsx(H1.Area,{status:a?"error":"",suffix:a?jsxRuntime.jsx(y.ErrorExclamation,{}):null,...i,...f}):I?jsxRuntime.jsx(H1.Mask,{name:f.name,onBlur:f.onBlur,format:I,onAccept:U=>f.onChange(U),ref:f.ref,value:f.value,status:a?"error":"",suffix:a?jsxRuntime.jsx(y.ErrorExclamation,{}):null,...i}):e?jsxRuntime.jsx(H1.Password,{status:a?"error":"",suffix:a?jsxRuntime.jsx(y.ErrorExclamation,{}):null,...i,...f}):jsxRuntime.jsx(H1.Text,{status:a?"error":"",suffix:a?jsxRuntime.jsx(y.ErrorExclamation,{}):null,...i,...f}),M=B?{pattern:SC(B)}:{};return jsxRuntime.jsxs("div",{style:{width:"100%"},children:[jsxRuntime.jsx(_,{label:C,isLabelBold:t,required:!!E.required,details:g}),jsxRuntime.jsx(hC,{children:jsxRuntime.jsx(reactHookForm.Controller,{render:q,name:A,rules:{...M,...E},control:n})}),a&&jsxRuntime.jsx(Z,{text:x,includeIcon:!1})]})},Q5=yt;var Tt=({label:A=null,isLabelBold:C=!0,name:g,disabled:E=!1,defaultValue:B=void 0,formOptions:I={},errorMessage:Q="This field is required.",options:e={},style:t={},...o})=>{let{control:r,formState:{errors:i}}=reactHookForm.useFormContext(),n=!!reactHookForm.get(i,g),s=reactHookForm.get(i,g)?.message?.toString()||Q;return jsxRuntime.jsxs("div",{style:t,children:[jsxRuntime.jsx(_,{label:A,isLabelBold:C,required:!!I.required}),jsxRuntime.jsx(reactHookForm.Controller,{render:({field:a})=>jsxRuntime.jsx(H1.Number,{disabled:E,status:n?"error":"",suffix:n?jsxRuntime.jsx(y.ErrorExclamation,{}):null,...o,...a}),name:g,defaultValue:B,rules:I,control:r,...e}),n&&jsxRuntime.jsx(Z,{text:s,includeIcon:!1})]})},XC=Tt;var FC=r2__default.default.div`
|
|
980
980
|
position: relative;
|
|
981
981
|
margin-bottom: 24px;
|
|
982
982
|
|