@verifiedinc-public/shared-ui-elements 12.16.0 → 12.17.0

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.
@@ -1 +1 @@
1
- "use strict";import{Box as d,Autocomplete as T,Typography as k,TextField as j,useTheme as S,Paper as V}from"@mui/material";import u from"@mui/material/Unstable_Grid2";import{useDataFieldAddressInput as F}from"./hook.mjs";import{AddressInputProvider as G}from"./context.mjs";import{jsx as t,jsxs as z}from"react/jsx-runtime";function B(o){const n=S();return z(V,{...o,children:[o.children,t(d,{sx:a=>({display:"flex",justifyContent:"flex-end",p:1,pt:"1px",...a.applyStyles("dark",{opacity:.8})}),children:t("img",{src:n.palette.mode==="dark"?"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-non-white3_hdpi.png":"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png",alt:"",width:"120",height:"14"})})]})}function D({defaultValue:o,onChange:n,label:a,error:c,disabled:i,variant:g,size:h,helperText:m,inputProps:f,InputProps:P,ClearAdornment:r,onBlur:x}){const{value:v,inputValue:b,suggestions:y,isPending:s,isFetchingPlace:p,handleInputChange:C,handleOptionChange:I,handleClear:w}=F({defaultValue:o,onChange:n});return t(d,{width:"100%",children:t(T,{disableClearable:!0,freeSolo:!0,isOptionEqualToValue:(e,l)=>e?.value===l?.value,getOptionLabel:e=>typeof e=="string"?e:e?.title,filterOptions:e=>e,options:s?[]:y.map(e=>({title:e.placePrediction.text.text??"",value:e.placePrediction.place??""})),autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,noOptionsText:"No locations",value:v,inputValue:b,loading:s||p,disabled:p||i,onChange:(e,l)=>{e.preventDefault(),e.stopPropagation(),!i&&(!l||typeof l=="string"||I(l).catch(console.error))},onInputChange:(e,l)=>{C(l)},renderInput:e=>t(j,{id:e.id,disabled:e.disabled,label:a,variant:g,size:h,error:c,helperText:m,onBlur:x,inputProps:{...e.inputProps,tabIndex:0,autoCapitalize:"off",autoComplete:"street-address address-level2 address-level1 postal-code",...f},InputProps:{...e.InputProps,disableInjectingGlobalStyles:!0,endAdornment:r?t(r,{onClick:()=>{w()}}):void 0,...P},fullWidth:!0,multiline:!0}),renderOption:(e,l)=>{const{key:A,...O}=e;return t("li",{...O,children:t(u,{container:!0,sx:{alignItems:"flex-start"},children:t(u,{sx:{width:"100%",wordWrap:"break-word"},children:t(k,{variant:"body2",sx:{color:"text.secondary",textAlign:"left"},children:l?.title})})})},A)},PaperComponent:B})})}function L(o){const{service:n,...a}=o;return t(G,{googlePlacesAutocompletePlaces:n.googlePlacesAutocompletePlaces,googlePlacesGetPlace:n.googlePlacesGetPlace,children:t(D,{...a})})}export{L as AddressInput};
1
+ "use strict";import{Box as d,Autocomplete as T,Typography as k,TextField as j,useTheme as S,Paper as V}from"@mui/material";import u from"@mui/material/Unstable_Grid2";import{useDataFieldAddressInput as F}from"./hook.mjs";import{AddressInputProvider as G}from"./context.mjs";import{jsx as t,jsxs as W}from"react/jsx-runtime";function z(o){const n=S();return W(V,{...o,children:[o.children,t(d,{sx:a=>({display:"flex",justifyContent:"flex-end",p:1,pt:"1px",...a.applyStyles("dark",{opacity:.8})}),children:t("img",{src:n.palette.mode==="dark"?"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-non-white3_hdpi.png":"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png",alt:"",width:"120",height:"14"})})]})}function B({defaultValue:o,onChange:n,label:a,error:c,disabled:i,variant:g,size:h,helperText:m,inputProps:f,InputProps:P,ClearAdornment:r,onBlur:x}){const{value:v,inputValue:b,suggestions:C,isPending:s,isFetchingPlace:p,handleInputChange:y,handleOptionChange:I,handleClear:w}=F({defaultValue:o,onChange:n});return t(d,{width:"100%",children:t(T,{disableClearable:!0,freeSolo:!0,isOptionEqualToValue:(e,l)=>e?.value===l?.value,getOptionLabel:e=>typeof e=="string"?e:e?.title,filterOptions:e=>e,options:s?[]:C.map(e=>({title:e.placePrediction.text.text??"",value:e.placePrediction.place??""})),autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,noOptionsText:"No locations",value:v,inputValue:b,loading:s||p,disabled:p||i,onChange:(e,l)=>{e.preventDefault(),e.stopPropagation(),!i&&(!l||typeof l=="string"||I(l).catch(console.error))},onInputChange:(e,l)=>{y(l)},renderInput:e=>t(j,{id:e.id,disabled:e.disabled,label:a,variant:g,size:h,error:c,helperText:m,onBlur:x,inputProps:{...e.inputProps,tabIndex:0,autoCapitalize:"off",autoComplete:"street-address address-level2 address-level1 postal-code",...f},InputProps:{...e.InputProps,disableInjectingGlobalStyles:!0,endAdornment:r?t(r,{onClick:()=>{w()}}):void 0,...P},fullWidth:!0,multiline:!0}),renderOption:(e,l)=>{const{key:A,...O}=e;return t("li",{...O,children:t(u,{container:!0,sx:{alignItems:"flex-start"},children:t(u,{sx:{width:"100%",wordWrap:"break-word"},children:t(k,{component:"p",variant:"h6",color:"text.primary",fontWeight:300,sx:{textAlign:"left"},children:l?.title})})})},A)},PaperComponent:z})})}function D(o){const{service:n,...a}=o;return t(G,{googlePlacesAutocompletePlaces:n.googlePlacesAutocompletePlaces,googlePlacesGetPlace:n.googlePlacesGetPlace,children:t(B,{...a})})}export{D as AddressInput};
@@ -62,6 +62,7 @@ export declare const employer: {
62
62
  country?: string | undefined;
63
63
  zipCode?: string | undefined;
64
64
  }>>;
65
+ logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<[import('zod').ZodString, import('zod').ZodLiteral<"">]>>>;
65
66
  }, "strip", import('zod').ZodTypeAny, {
66
67
  name: string;
67
68
  address?: {
@@ -72,6 +73,7 @@ export declare const employer: {
72
73
  country?: "US" | undefined;
73
74
  zipCode?: string | undefined;
74
75
  } | undefined;
76
+ logoUrl?: string | null | undefined;
75
77
  legalName?: string | undefined;
76
78
  }, {
77
79
  name: string;
@@ -83,6 +85,7 @@ export declare const employer: {
83
85
  country?: string | undefined;
84
86
  zipCode?: string | undefined;
85
87
  } | undefined;
88
+ logoUrl?: string | null | undefined;
86
89
  legalName?: string | undefined;
87
90
  }>;
88
91
  }, "strip", import('zod').ZodTypeAny, {
@@ -96,6 +99,7 @@ export declare const employer: {
96
99
  country?: "US" | undefined;
97
100
  zipCode?: string | undefined;
98
101
  } | undefined;
102
+ logoUrl?: string | null | undefined;
99
103
  legalName?: string | undefined;
100
104
  };
101
105
  }, {
@@ -109,6 +113,7 @@ export declare const employer: {
109
113
  country?: string | undefined;
110
114
  zipCode?: string | undefined;
111
115
  } | undefined;
116
+ logoUrl?: string | null | undefined;
112
117
  legalName?: string | undefined;
113
118
  };
114
119
  }>;
@@ -659,6 +659,7 @@ export declare const fields: {
659
659
  country?: string | undefined;
660
660
  zipCode?: string | undefined;
661
661
  }>>;
662
+ logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<[import('zod').ZodString, import('zod').ZodLiteral<"">]>>>;
662
663
  }, "strip", import('zod').ZodTypeAny, {
663
664
  name: string;
664
665
  address?: {
@@ -669,6 +670,7 @@ export declare const fields: {
669
670
  country?: "US" | undefined;
670
671
  zipCode?: string | undefined;
671
672
  } | undefined;
673
+ logoUrl?: string | null | undefined;
672
674
  legalName?: string | undefined;
673
675
  }, {
674
676
  name: string;
@@ -680,6 +682,7 @@ export declare const fields: {
680
682
  country?: string | undefined;
681
683
  zipCode?: string | undefined;
682
684
  } | undefined;
685
+ logoUrl?: string | null | undefined;
683
686
  legalName?: string | undefined;
684
687
  }>;
685
688
  }, "strip", import('zod').ZodTypeAny, {
@@ -693,6 +696,7 @@ export declare const fields: {
693
696
  country?: "US" | undefined;
694
697
  zipCode?: string | undefined;
695
698
  } | undefined;
699
+ logoUrl?: string | null | undefined;
696
700
  legalName?: string | undefined;
697
701
  };
698
702
  }, {
@@ -706,6 +710,7 @@ export declare const fields: {
706
710
  country?: string | undefined;
707
711
  zipCode?: string | undefined;
708
712
  } | undefined;
713
+ logoUrl?: string | null | undefined;
709
714
  legalName?: string | undefined;
710
715
  };
711
716
  }>;
@@ -53,6 +53,7 @@ export declare const employerSchema: z.ZodObject<{
53
53
  country?: string | undefined;
54
54
  zipCode?: string | undefined;
55
55
  }>>;
56
+ logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
56
57
  }, "strip", z.ZodTypeAny, {
57
58
  name: string;
58
59
  address?: {
@@ -63,6 +64,7 @@ export declare const employerSchema: z.ZodObject<{
63
64
  country?: "US" | undefined;
64
65
  zipCode?: string | undefined;
65
66
  } | undefined;
67
+ logoUrl?: string | null | undefined;
66
68
  legalName?: string | undefined;
67
69
  }, {
68
70
  name: string;
@@ -74,6 +76,7 @@ export declare const employerSchema: z.ZodObject<{
74
76
  country?: string | undefined;
75
77
  zipCode?: string | undefined;
76
78
  } | undefined;
79
+ logoUrl?: string | null | undefined;
77
80
  legalName?: string | undefined;
78
81
  }>;
79
82
  }, "strip", z.ZodTypeAny, {
@@ -87,6 +90,7 @@ export declare const employerSchema: z.ZodObject<{
87
90
  country?: "US" | undefined;
88
91
  zipCode?: string | undefined;
89
92
  } | undefined;
93
+ logoUrl?: string | null | undefined;
90
94
  legalName?: string | undefined;
91
95
  };
92
96
  }, {
@@ -100,6 +104,7 @@ export declare const employerSchema: z.ZodObject<{
100
104
  country?: string | undefined;
101
105
  zipCode?: string | undefined;
102
106
  } | undefined;
107
+ logoUrl?: string | null | undefined;
103
108
  legalName?: string | undefined;
104
109
  };
105
110
  }>;
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";import{employerNameSchema as m}from"./employerName.schema.mjs";import{legalNameSchema as o}from"./legalName.schema.mjs";import{requiredAddressSchema as a}from"../address/address.schema.mjs";const r=e.object({employer:e.object({name:m,legalName:o.optional(),address:a.optional()})});export{r as employerSchema};
1
+ "use strict";import{z as e}from"zod";import{employerNameSchema as o}from"./employerName.schema.mjs";import{legalNameSchema as r}from"./legalName.schema.mjs";import{requiredAddressSchema as m}from"../address/address.schema.mjs";const a=e.object({employer:e.object({name:o,legalName:r.optional(),address:m.optional(),logoUrl:e.union([e.string().url(),e.literal("")]).nullish()})});export{a as employerSchema};
@@ -1 +1 @@
1
- "use strict";import{useState as x}from"react";import{Stack as A,TextField as P,Box as I}from"@mui/material";import{AddressInput as S}from"../../../../../AddressInput/index.mjs";import{useFormField as B}from"../../../core/field.hook.mjs";import{RequiredLabel as U,toFieldValueAttribute as n}from"../shared.mjs";import{useOneClickForm as j}from"../../form.context.mjs";import{jsxs as D,jsx as s}from"react/jsx-runtime";import{addressFormat as T}from"../../../../core/formats/address.format.mjs";function q({fieldKey:h}){var u,m;const{options:r}=j(),{field:l,setValue:b}=B({key:h}),[C,k]=x({});if(!l)return null;const c=l.value;if(!c)return null;const t=c.employer,a=t.address??{},d=r.features.enableUserPrivacy,o=e=>{k(i=>i[e]?i:{...i,[e]:!0})},p=e=>{b({employer:{...t,...e}})},f=e=>{const i=Object.values(e).some(Boolean);p({address:i?e:void 0}),o("address")},z=((m=(u=l.errors)==null?void 0:u.error)==null?void 0:m.issues)??[],v=e=>{var i;if(!(!l.touched&&!C[e]))return(i=z.find(F=>F.path[1]===e))==null?void 0:i.message},y=v("name"),g=v("address");return D(A,{spacing:2,children:[s(P,{"data-testid":"data-field-atomic-employer.name","data-verified-sdk-field-value":n(t.name,d),fullWidth:!0,size:"small",label:s(U,{required:l.isRequired,children:"Name"}),value:t.name??"",onChange:e=>{p({name:e.target.value}),o("name")},onBlur:()=>o("name"),error:!!y,helperText:y,disabled:l.isDisabled,InputProps:{"data-mask-me":!0},inputProps:{autoCorrect:"off"}}),s(I,{"data-testid":"data-field-composite-employer.address","data-verified-sdk-field-value":n(a.line1?T(a):void 0,d),width:"100%",children:s(S,{size:"small",label:"Address",defaultValue:{line1:a.line1,city:a.city,state:a.state,zipCode:a.zipCode,country:a.country??"US"},onChange:e=>{typeof e!="string"&&f({line1:e?.line1,line2:a.line2??"",city:e?.city,state:e?.state,zipCode:e?.zipCode,country:e?.country==="US"?"US":void 0})},onBlur:()=>o("address"),error:!!g,helperText:g,disabled:l.isDisabled,InputProps:{"data-mask-me":!0},service:{googlePlacesAutocompletePlaces:r.servicePaths.googlePlacesAutocompletePlaces,googlePlacesGetPlace:r.servicePaths.googlePlacesGetPlace}})}),s(P,{"data-testid":"data-field-atomic-employer.address.line2","data-verified-sdk-field-value":n(a.line2,d),fullWidth:!0,size:"small",label:"Line 2",value:a.line2??"",onChange:e=>f({...a,line2:e.target.value}),disabled:l.isDisabled,InputProps:{"data-mask-me":!0},inputProps:{autoCorrect:"off"}})]})}export{q as EmployerInputField};
1
+ "use strict";import{useState as x}from"react";import{Stack as A,TextField as P,Box as I}from"@mui/material";import{AddressInput as S}from"../../../../../AddressInput/index.mjs";import{useFormField as U}from"../../../core/field.hook.mjs";import{RequiredLabel as B,toFieldValueAttribute as n}from"../shared.mjs";import{useOneClickForm as j}from"../../form.context.mjs";import{jsxs as D,jsx as s}from"react/jsx-runtime";import{addressFormat as T}from"../../../../core/formats/address.format.mjs";function q({fieldKey:h}){var u,m;const{options:r}=j(),{field:l,setValue:b}=U({key:h}),[C,k]=x({});if(!l)return null;const c=l.value;if(!c)return null;const t=c.employer,a=t.address??{},d=r.features.enableUserPrivacy,o=e=>{k(i=>i[e]?i:{...i,[e]:!0})},p=e=>{b({employer:{...t,...e}})},f=e=>{const i=Object.values(e).some(Boolean);p({address:i?e:void 0}),o("address")},z=((m=(u=l.errors)==null?void 0:u.error)==null?void 0:m.issues)??[],v=e=>{var i;if(!(!l.touched&&!C[e]))return(i=z.find(F=>F.path[1]===e))==null?void 0:i.message},y=v("name"),g=v("address");return D(A,{spacing:2,children:[s(P,{"data-testid":"data-field-atomic-employer.name","data-verified-sdk-field-value":n(t.name,d),fullWidth:!0,size:"small",label:s(B,{required:l.isRequired,children:"Name"}),value:t.name??"",onChange:e=>{p({name:e.target.value,logoUrl:void 0}),o("name")},onBlur:()=>o("name"),error:!!y,helperText:y,disabled:l.isDisabled,InputProps:{"data-mask-me":!0},inputProps:{autoCorrect:"off"}}),s(I,{"data-testid":"data-field-composite-employer.address","data-verified-sdk-field-value":n(a.line1?T(a):void 0,d),width:"100%",children:s(S,{size:"small",label:"Address",defaultValue:{line1:a.line1,city:a.city,state:a.state,zipCode:a.zipCode,country:a.country??"US"},onChange:e=>{typeof e!="string"&&f({line1:e?.line1,line2:a.line2??"",city:e?.city,state:e?.state,zipCode:e?.zipCode,country:e?.country==="US"?"US":void 0})},onBlur:()=>o("address"),error:!!g,helperText:g,disabled:l.isDisabled,InputProps:{"data-mask-me":!0},service:{googlePlacesAutocompletePlaces:r.servicePaths.googlePlacesAutocompletePlaces,googlePlacesGetPlace:r.servicePaths.googlePlacesGetPlace}})}),s(P,{"data-testid":"data-field-atomic-employer.address.line2","data-verified-sdk-field-value":n(a.line2,d),fullWidth:!0,size:"small",label:"Line 2",value:a.line2??"",onChange:e=>f({...a,line2:e.target.value}),disabled:l.isDisabled,InputProps:{"data-mask-me":!0},inputProps:{autoCorrect:"off"}})]})}export{q as EmployerInputField};
@@ -1 +1 @@
1
- "use strict";import{Stack as n,MenuItem as f,Typography as s}from"@mui/material";import{useFormField as p}from"../../../core/field.hook.mjs";import{useOneClickForm as v}from"../../form.context.mjs";import{toFieldValueAttribute as m}from"../shared.mjs";import{FieldSectionTitle as y,FieldSectionContent as h,FieldLabelBase as b}from"../style.mjs";import{VariantSelectField as F}from"./variantSelect.field.mjs";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{addressFormat as g}from"../../../../core/formats/address.format.mjs";function u({label:a,value:l,testId:t,fieldValue:r}){return o(n,{direction:"row","data-testid":t,"data-verified-sdk-field-value":r,children:[i(b,{label:a}),i(s,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:l})]})}function c({item:a}){var l;const{options:t}=v(),r=t.features.enableUserPrivacy,e=(l=a.address)!=null&&l.line1?g(a.address):null;return o(n,{spacing:1.25,children:[i(u,{label:"Name",value:a.name,testId:"data-field-atomic-employer.name",fieldValue:m(a.name,r)}),e&&i(u,{label:"Address",value:e,testId:"data-field-composite-employer.address",fieldValue:m(e,r)})]})}function k({fieldKey:a}){var l;const{field:t}=p({key:a});if(!t)return null;if(!t.hasVariants){const e=(l=t.value)==null?void 0:l.employer;return e?o(n,{spacing:1.25,children:[i(y,{fieldKey:a}),i(h,{spacing:1.25,children:i(c,{item:e})})]}):null}const r=t.variants??[];return i(F,{fieldKey:a,testId:`data-employer-select-${a}`,renderValue:()=>{var e;const d=(e=t.value)==null?void 0:e.employer;return d?i(c,{item:d}):null},children:r.map(e=>i(f,{value:e.id,onClick:d=>d.stopPropagation(),sx:{maxWidth:"100%",whiteSpace:"pre-wrap"},children:i(s,{variant:"body1",fontWeight:500,children:e.displayValue??"-"})},e.id))})}export{k as EmployerField};
1
+ "use strict";import{Stack as d,MenuItem as F,Typography as m,Avatar as k}from"@mui/material";import{useFormField as w}from"../../../core/field.hook.mjs";import{useOneClickForm as U}from"../../form.context.mjs";import{toFieldValueAttribute as f}from"../shared.mjs";import{FieldSectionTitle as V,FieldSectionContent as I,FieldLabelBase as S}from"../style.mjs";import{VariantSelectField as A}from"./variantSelect.field.mjs";import{jsxs as s,jsx as r}from"react/jsx-runtime";import{addressFormat as v}from"../../../../core/formats/address.format.mjs";const g=48;function y({name:l,logoUrl:i,size:a}){var t;return r(k,{draggable:!1,alt:l,src:i??void 0,sx:{bgcolor:"primary.main",width:a,height:a,borderRadius:a>=g?2:1,flexShrink:0},slotProps:{img:{onLoad:e=>{e.currentTarget.style.display=""},onError:e=>{e.currentTarget.style.display="none"}}},children:(t=l[0])==null?void 0:t.toUpperCase()})}function h({label:l,value:i,testId:a,fieldValue:t}){return s(d,{direction:"row","data-testid":a,"data-verified-sdk-field-value":t,children:[r(S,{label:l}),r(m,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:i})]})}function b({item:l}){var i;const{options:a}=U(),t=a.features.enableUserPrivacy,e=(i=l.address)!=null&&i.line1?v(l.address):null,n=s(d,{spacing:1.25,children:[r(h,{label:"Name",value:l.name,testId:"data-field-atomic-employer.name",fieldValue:f(l.name,t)}),e&&r(h,{label:"Address",value:e,testId:"data-field-composite-employer.address",fieldValue:f(e,t)})]});return l.logoUrl?s(d,{direction:"row",spacing:1.5,py:1,children:[r(y,{name:l.name,logoUrl:l.logoUrl,size:g}),n]}):n}function z({fieldKey:l}){var i;const{field:a}=w({key:l});if(!a)return null;if(!a.hasVariants){const e=(i=a.value)==null?void 0:i.employer;return e?s(d,{spacing:1.25,children:[r(V,{fieldKey:l}),r(I,{spacing:1.25,children:r(b,{item:e})})]}):null}const t=a.variants??[];return r(A,{fieldKey:l,testId:`data-employer-select-${l}`,renderValue:()=>{var e;const n=(e=a.value)==null?void 0:e.employer;return n?r(b,{item:n}):null},children:t.map(e=>{var n,c;const o=(n=e.value)==null?void 0:n.employer,u=o?.name??e.displayValue??"-",p=(c=o?.address)!=null&&c.line1?v(o.address):null;return r(F,{value:e.id,onClick:x=>x.stopPropagation(),sx:{maxWidth:"100%",whiteSpace:"pre-wrap"},children:s(d,{direction:"row",spacing:1.5,alignItems:"center",children:[r(y,{name:u,logoUrl:o?.logoUrl,size:32}),s(d,{sx:{alignItems:"flex-start",textAlign:"left"},children:[r(m,{variant:"body1",fontWeight:500,children:u}),p&&r(m,{variant:"body2",color:"text.primary",children:p})]})]})},e.id)})})}export{z as EmployerField};
@@ -1 +1 @@
1
- "use strict";import{Stack as i,MenuItem as k,Avatar as g,Typography as m}from"@mui/material";import{useFormField as I}from"../../../core/field.hook.mjs";import{FieldSectionTitle as S,FieldSectionContent as F,FieldLabelBase as f,FieldDescriptionBase as A}from"../style.mjs";import{VariantSelectField as B}from"./variantSelect.field.mjs";import{jsxs as a,jsx as e}from"react/jsx-runtime";import{maskMemberId as v}from"../../../../core/formats/healthInsurance.format.mjs";const y=48;function x({item:n}){var t,s,r,o,d;return e(i,{py:1,children:a(i,{direction:"row",sx:{flex:1},spacing:1.5,children:[e(g,{draggable:!1,src:((t=n.payer)==null?void 0:t.logoUrl)??"",sx:{bgcolor:"primary.main",width:y,height:y,borderRadius:2,flexShrink:0},slotProps:{img:{onError:c=>{c.currentTarget.style.display="none"}}},children:(o=(r=(s=n.payer)==null?void 0:s.name)==null?void 0:r[0])==null?void 0:o.toUpperCase()}),a(i,{direction:"column",spacing:1.5,children:[e(i,{direction:"row",spacing:1.5,children:a(i,{direction:"row",sx:{flex:1},children:[e(f,{label:"Insurer"}),e(m,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:(d=n.payer)==null?void 0:d.name})]})}),a(i,{direction:"row",children:[e(f,{label:"Member ID"}),a(i,{children:[e(m,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:v(n.memberId)}),e(A,{description:"Hidden for privacy"})]})]})]})]})})}function C({fieldKey:n}){const{field:t}=I({key:n});if(!t)return null;if(!t.hasVariants){const r=t.value;return r?a(i,{spacing:1.25,children:[e(S,{fieldKey:n}),e(F,{spacing:1.25,children:e(x,{item:r})})]}):null}const s=t.variants??[];return e(B,{fieldKey:n,testId:`data-health-insurance-select-${n}`,renderValue:()=>{const r=t.value;return r?e(x,{item:r}):null},children:s.map(r=>{var o,d,c,u,h;const l=r.value,b=((o=l?.payer)==null?void 0:o.name)??"-",w=l!=null&&l.memberId?v(l.memberId):"-";return e(k,{value:r.id,onClick:p=>p.stopPropagation(),sx:{maxWidth:"100%",whiteSpace:"pre-wrap"},children:a(i,{direction:"row",spacing:1.5,alignItems:"center",children:[e(g,{draggable:!1,src:((d=l?.payer)==null?void 0:d.logoUrl)??"",sx:{bgcolor:"primary.main",width:32,height:32,borderRadius:1,flexShrink:0},slotProps:{img:{onError:p=>{p.currentTarget.style.display="none"}}},children:(h=(u=(c=l?.payer)==null?void 0:c.name)==null?void 0:u[0])==null?void 0:h.toUpperCase()}),a(i,{sx:{alignItems:"flex-start",textAlign:"left"},children:[e(m,{variant:"body1",fontWeight:500,children:b}),e(m,{variant:"caption",color:"text.secondary",children:w})]})]})},r.id)})})}export{C as HealthInsuranceField};
1
+ "use strict";import{Stack as i,MenuItem as k,Avatar as g,Typography as m}from"@mui/material";import{useFormField as I}from"../../../core/field.hook.mjs";import{FieldSectionTitle as S,FieldSectionContent as F,FieldLabelBase as f,FieldDescriptionBase as A}from"../style.mjs";import{VariantSelectField as B}from"./variantSelect.field.mjs";import{jsxs as a,jsx as e}from"react/jsx-runtime";import{maskMemberId as v}from"../../../../core/formats/healthInsurance.format.mjs";const y=48;function x({item:n}){var t,s,r,o,d;return e(i,{py:1,children:a(i,{direction:"row",sx:{flex:1},spacing:1.5,children:[e(g,{draggable:!1,src:((t=n.payer)==null?void 0:t.logoUrl)??"",sx:{bgcolor:"primary.main",width:y,height:y,borderRadius:2,flexShrink:0},slotProps:{img:{onError:c=>{c.currentTarget.style.display="none"}}},children:(o=(r=(s=n.payer)==null?void 0:s.name)==null?void 0:r[0])==null?void 0:o.toUpperCase()}),a(i,{direction:"column",spacing:1.5,children:[e(i,{direction:"row",spacing:1.5,children:a(i,{direction:"row",sx:{flex:1},children:[e(f,{label:"Insurer"}),e(m,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:(d=n.payer)==null?void 0:d.name})]})}),a(i,{direction:"row",children:[e(f,{label:"Member ID"}),a(i,{children:[e(m,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:v(n.memberId)}),e(A,{description:"Hidden for privacy"})]})]})]})]})})}function C({fieldKey:n}){const{field:t}=I({key:n});if(!t)return null;if(!t.hasVariants){const r=t.value;return r?a(i,{spacing:1.25,children:[e(S,{fieldKey:n}),e(F,{spacing:1.25,children:e(x,{item:r})})]}):null}const s=t.variants??[];return e(B,{fieldKey:n,testId:`data-health-insurance-select-${n}`,renderValue:()=>{const r=t.value;return r?e(x,{item:r}):null},children:s.map(r=>{var o,d,c,u,h;const l=r.value,b=((o=l?.payer)==null?void 0:o.name)??"-",w=l!=null&&l.memberId?v(l.memberId):"-";return e(k,{value:r.id,onClick:p=>p.stopPropagation(),sx:{maxWidth:"100%",whiteSpace:"pre-wrap"},children:a(i,{direction:"row",spacing:1.5,alignItems:"center",children:[e(g,{draggable:!1,src:((d=l?.payer)==null?void 0:d.logoUrl)??"",sx:{bgcolor:"primary.main",width:32,height:32,borderRadius:1,flexShrink:0},slotProps:{img:{onError:p=>{p.currentTarget.style.display="none"}}},children:(h=(u=(c=l?.payer)==null?void 0:c.name)==null?void 0:u[0])==null?void 0:h.toUpperCase()}),a(i,{sx:{alignItems:"flex-start",textAlign:"left"},children:[e(m,{variant:"body1",fontWeight:500,children:b}),e(m,{variant:"body2",color:"text.primary",children:w})]})]})},r.id)})})}export{C as HealthInsuranceField};
@@ -40,6 +40,7 @@ export declare const makeAttributes: ({ userPrivacyEnabled, field, fieldKey, opt
40
40
  country?: "US" | undefined;
41
41
  zipCode?: string | undefined;
42
42
  } | undefined;
43
+ logoUrl?: string | null | undefined;
43
44
  legalName?: string | undefined;
44
45
  };
45
46
  } | {
@@ -91,6 +92,7 @@ export declare const getFieldValue: (field: FormField, options: OneClickFormOpti
91
92
  country?: "US" | undefined;
92
93
  zipCode?: string | undefined;
93
94
  } | undefined;
95
+ logoUrl?: string | null | undefined;
94
96
  legalName?: string | undefined;
95
97
  };
96
98
  } | {
@@ -1 +1 @@
1
- "use strict";import{createTheme as l}from"@mui/material";import{colors as t}from"./colors.mjs";import{typography as n}from"./typography.mjs";import{ensureWcagAAContrast as o}from"../utils/color/index.mjs";function d(r){return typeof r=="object"&&r!==null&&typeof r.main=="string"}function u(r){const{palette:i}=r,a=i.background.default;return i.text.primary=o(i.text.primary,a),i.text.secondary=o(i.text.secondary,a),i.text.disabled=o(i.text.disabled,a),Object.values(i).forEach(e=>{d(e)&&(e.main=o(e.main,a),typeof e.dark=="string"&&(e.dark=o(e.dark,a)),typeof e.contrastText=="string"&&(e.contrastText=o(e.contrastText,e.main)))}),r}const p=({primaryFontFace:r,wcagAAEnabled:i,...a})=>{const e=l({breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536}},typography:{fontFamily:r.style.fontFamily,...n},palette:{text:{disabled:t.textDisabled},primary:{main:t.green,light:t.lightGreen,dark:t.darkGreen,contrastText:t.white},secondary:{main:t.blue,light:t.lightBlue,dark:t.darkBlue,contrastText:t.white},error:{main:t.red,light:t.lightRed,dark:t.darkRed,contrastText:t.white},warning:{main:t.yellow,light:t.yellow,dark:t.darkYellow,contrastText:t.white},success:{main:t.green,light:t.green,dark:t.darkGreen,contrastText:t.white},info:{main:t.blue,light:t.lightBlue,dark:t.darkBlue,contrastText:t.infoContrast},neutral:{main:t.grey,light:t.lightGrey,dark:t.darkGrey},neutralContrast:{main:t.greyContrast,light:t.lightGreyContrast,dark:t.darkGreyContrast},warningContrast:{main:t.warningContrast},infoContrast:{main:t.infoContrast},dangerContrast:{main:t.dangerContrast}},components:{MuiAlert:{styleOverrides:{action:{overflowWrap:"normal",display:"flex",alignItems:"center",padding:"8px 0",marginRight:0,"& button, & a":{lineHeight:"0"}}}},MuiAlertTitle:{styleOverrides:{root:{...n.body2,fontSize:"1.1rem",fontWeight:700}}},MuiListItemIcon:{styleOverrides:{root:{minWidth:34}}},MuiListItemText:{styleOverrides:{primary:{fontSize:"1rem",fontWeight:800}}},MuiFab:{styleOverrides:{circular:{width:42,height:42},sizeSmall:{width:40,height:40}}},MuiIconButton:{styleOverrides:{root:{"&.Mui-disabled":{svg:{opacity:.4}}}}},MuiFormLabel:{styleOverrides:{asterisk:({theme:s})=>({color:s.palette.error.main,fontSize:"1.25em",fontWeight:700})}},MuiChip:{styleOverrides:{root:{fontWeight:400}}},MuiButton:{styleOverrides:{root:{fontWeight:800,"&.MuiButton-contained.Mui-focused, &.MuiButton-contained:focus":{boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.25),0px 6px 7px 0px rgba(0,0,0,0.18),0px 1px 12px 0px rgba(0,0,0,0.16)"}}}},MuiDialog:{defaultProps:{maxWidth:"xs"}},MuiDialogTitle:{styleOverrides:{root:{fontSize:20,fontWeight:800,textAlign:"center"}}},MuiDialogContent:{styleOverrides:{root:{paddingTop:"8px!important",paddingBottom:8}}},MuiDialogActions:{styleOverrides:{root:{paddingLeft:24,paddingRight:24,paddingBottom:24,justifyContent:"space-between","& .MuiButton-root":{marginTop:0}}}},MuiRadio:{styleOverrides:{root:{"&.Mui-disabled":{color:`${t.grey} !important`}}}},MuiTableRow:{styleOverrides:{root:{"& th.MuiTableCell-root":{fontSize:12,fontWeight:700,letterSpacing:1},"& td.MuiTableCell-root":{fontSize:20,fontWeight:300}}}},MuiInputBase:{styleOverrides:{root:{"& .MuiInputBase-input":{fontSize:20,fontWeight:300},"& .MuiInputBase-input:not(.MuiInputBase-inputSizeSmall):not(.MuiAutocomplete-input):not(.MuiInputBase-inputMultiline)":{paddingTop:13.625,paddingBottom:13.625},"& .MuiInputBase-input.MuiAutocomplete-input:not(.MuiInputBase-inputSizeSmall)":{paddingTop:4.625,paddingBottom:4.625},"&.MuiInputBase-multiline.MuiInputBase-sizeSmall":{paddingRight:"14px!important"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{root:{'&[data-shrink="false"]':{fontSize:20,fontWeight:300,transform:"translate(14px, 14px) scale(1)","& span[data-asterisk]":{display:"none"},"&.MuiInputLabel-sizeSmall":{transform:"translate(14px, 9px) scale(1)"}}}}},MuiOutlinedInput:{defaultProps:{notched:!0}},MuiTextField:{defaultProps:{variant:"outlined",size:"medium",InputLabelProps:{shrink:!0}},styleOverrides:{root:{"& .MuiInputBase-multiline textarea":{minHeight:28.75}}}},MuiSelect:{defaultProps:{variant:"outlined",size:"medium",MenuProps:{disableScrollLock:!0}},styleOverrides:{select:{display:"flex",alignItems:"center"}}},MuiAutocomplete:{defaultProps:{size:"medium"}},MuiFormHelperText:{styleOverrides:{root:{wordBreak:"break-word"}}}},...a});return i?u(e):e};export{p as theme};
1
+ "use strict";import{createTheme as l}from"@mui/material";import{colors as t}from"./colors.mjs";import{typography as s}from"./typography.mjs";import{ensureWcagAAContrast as o}from"../utils/color/index.mjs";function d(r){return typeof r=="object"&&r!==null&&typeof r.main=="string"}function u(r){const{palette:i}=r,a=i.background.default;return i.text.primary=o(i.text.primary,a),i.text.secondary=o(i.text.secondary,a),i.text.disabled=o(i.text.disabled,a),Object.values(i).forEach(e=>{d(e)&&(e.main=o(e.main,a),typeof e.dark=="string"&&(e.dark=o(e.dark,a)),typeof e.contrastText=="string"&&(e.contrastText=o(e.contrastText,e.main)))}),r}const p=({primaryFontFace:r,wcagAAEnabled:i,...a})=>{const e=l({breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536}},typography:{fontFamily:r.style.fontFamily,...s},palette:{text:{disabled:t.textDisabled},primary:{main:t.green,light:t.lightGreen,dark:t.darkGreen,contrastText:t.white},secondary:{main:t.blue,light:t.lightBlue,dark:t.darkBlue,contrastText:t.white},error:{main:t.red,light:t.lightRed,dark:t.darkRed,contrastText:t.white},warning:{main:t.yellow,light:t.yellow,dark:t.darkYellow,contrastText:t.white},success:{main:t.green,light:t.green,dark:t.darkGreen,contrastText:t.white},info:{main:t.blue,light:t.lightBlue,dark:t.darkBlue,contrastText:t.infoContrast},neutral:{main:t.grey,light:t.lightGrey,dark:t.darkGrey},neutralContrast:{main:t.greyContrast,light:t.lightGreyContrast,dark:t.darkGreyContrast},warningContrast:{main:t.warningContrast},infoContrast:{main:t.infoContrast},dangerContrast:{main:t.dangerContrast}},components:{MuiAlert:{styleOverrides:{action:{overflowWrap:"normal",display:"flex",alignItems:"center",padding:"8px 0",marginRight:0,"& button, & a":{lineHeight:"0"}}}},MuiAlertTitle:{styleOverrides:{root:{...s.body2,fontSize:"1.1rem",fontWeight:700}}},MuiListItemIcon:{styleOverrides:{root:{minWidth:34}}},MuiListItemText:{styleOverrides:{primary:{fontSize:"1rem",fontWeight:800}}},MuiFab:{styleOverrides:{circular:{width:42,height:42},sizeSmall:{width:40,height:40}}},MuiIconButton:{styleOverrides:{root:{"&.Mui-disabled":{svg:{opacity:.4}}}}},MuiFormLabel:{styleOverrides:{asterisk:({theme:n})=>({color:n.palette.error.main,fontSize:"1.25em",fontWeight:700})}},MuiChip:{styleOverrides:{root:{fontWeight:400}}},MuiButton:{styleOverrides:{root:{fontWeight:800,"&.MuiButton-contained.Mui-focused, &.MuiButton-contained:focus":{boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.25),0px 6px 7px 0px rgba(0,0,0,0.18),0px 1px 12px 0px rgba(0,0,0,0.16)"}}}},MuiDialog:{defaultProps:{maxWidth:"xs"}},MuiDialogTitle:{styleOverrides:{root:{fontSize:20,fontWeight:800,textAlign:"center"}}},MuiDialogContent:{styleOverrides:{root:{paddingTop:"8px!important",paddingBottom:8}}},MuiDialogActions:{styleOverrides:{root:{paddingLeft:24,paddingRight:24,paddingBottom:24,justifyContent:"space-between","& .MuiButton-root":{marginTop:0}}}},MuiRadio:{styleOverrides:{root:{"&.Mui-disabled":{color:`${t.grey} !important`}}}},MuiTableRow:{styleOverrides:{root:{"& th.MuiTableCell-root":{fontSize:12,fontWeight:700,letterSpacing:1},"& td.MuiTableCell-root":{fontSize:20,fontWeight:300}}}},MuiInputBase:{styleOverrides:{root:{"& .MuiInputBase-input":{fontSize:20,fontWeight:300},"& .MuiInputBase-input:not(.MuiInputBase-inputSizeSmall):not(.MuiAutocomplete-input):not(.MuiInputBase-inputMultiline)":{paddingTop:13.625,paddingBottom:13.625},"& .MuiInputBase-input.MuiAutocomplete-input:not(.MuiInputBase-inputSizeSmall)":{paddingTop:4.625,paddingBottom:4.625},"&.MuiInputBase-multiline.MuiInputBase-sizeSmall":{paddingRight:"14px!important"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{root:{'&[data-shrink="false"]':{fontSize:20,fontWeight:300,transform:"translate(14px, 14px) scale(1)","& span[data-asterisk]":{display:"none"},"&.MuiInputLabel-sizeSmall":{transform:"translate(14px, 9px) scale(1)"}}}}},MuiOutlinedInput:{defaultProps:{notched:!0}},MuiTextField:{defaultProps:{variant:"outlined",size:"medium",InputLabelProps:{shrink:!0}},styleOverrides:{root:{"& .MuiInputBase-multiline textarea":{minHeight:28.75}}}},MuiSelect:{defaultProps:{variant:"outlined",size:"medium",MenuProps:{disableScrollLock:!0}},styleOverrides:{select:{display:"flex",alignItems:"center"}}},MuiAutocomplete:{defaultProps:{size:"medium"},styleOverrides:{loading:({theme:n})=>({color:n.palette.text.primary})}},MuiFormHelperText:{styleOverrides:{root:{wordBreak:"break-word"}}}},...a});return i?u(e):e};export{p as theme};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "12.16.0",
3
+ "version": "12.17.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "sideEffects": false,