@verifiedinc-public/shared-ui-elements 2.2.1 → 3.0.2-beta.1

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.
@@ -0,0 +1,12 @@
1
+ import { ButtonProps } from '@mui/material';
2
+ /**
3
+ * A button designed to look like a link
4
+ * indicates an action that is available, but that we don't want to emphasize.
5
+ *
6
+ * LinkButton is an abstraction over the MUI Button component
7
+ * encapsulating props shared by buttons of this type.
8
+ * See the Button component docs for props, options, etc. https://mui.com/components/buttons/
9
+ *
10
+ * @param {ButtonProps} props LinkButton takes the same props as the MUI button component
11
+ */
12
+ export declare const LinkButton: ({ children, type, variant, size, color, ...props }: ButtonProps) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ButtonProps } from '@mui/material';
2
+ export declare const TextButton: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export * from './LinkButton';
2
+ export * from './TextButton';
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { TextFieldProps } from '@mui/material';
3
+ /**
4
+ * An input for email addresses
5
+ *
6
+ * EmailInput is an abstraction over the MUI TextField component
7
+ * encapsulating props shared by inputs of this type.
8
+ * See the TextField component docs for additional props, options, etc. https://mui.com/components/text-fields/
9
+ *
10
+ * @param {TextFieldProps} props EmailInput takes the same props as the MUI TextField component
11
+ * with default values for name ('email'), type ('email'), id ('email') and label ('Email')
12
+ */
13
+ export declare const EmailInput: FC<TextFieldProps>;
@@ -3,3 +3,4 @@ export * from './SSNInput';
3
3
  export * from './SelectInput';
4
4
  export * from './PhoneInput';
5
5
  export * from './OTPInput';
6
+ export * from './EmailInput';
@@ -1,11 +1,12 @@
1
- export * from './Button';
1
+ export * from './buttons';
2
+ export * from './typographies';
2
3
  export * from './Typography';
3
4
  export * from './CredentialRequestsEditor';
4
- export * from './terms/AcceptTermsNotice';
5
+ export * from './terms';
5
6
  export * from './When';
6
7
  export * from './Alert';
7
8
  export * from './Image';
8
- export * from './form/';
9
+ export * from './form';
9
10
  export * from './verified';
10
11
  export * from './QRCodeDisplay';
11
12
  export * from './Snackbar';
@@ -1 +1 @@
1
- "use strict";import{A as a,a as s,g as e,e as r,B as n,C as t,d as o,D as i,E as p,F as d,I as u,O as c,P as m,Q as l,R as B,S as I,b as h,f as P,T as S,V as b,c as g,W as A,u as C}from"../shared/index-w5CoDyk5.mjs";import{SnackbarProvider as T}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,n as Button,t as CredentialRequestsEditor,o as CustomAlertComponent,i as DateInput,p as ExactBirthdayBanner,d as FullWidthAlert,u as Image,c as OTPInput,m as PhoneInput,l as QRCodeDisplay,B as ResendPhoneBanner,I as SSNInput,h as SelectInput,T as SnackbarProvider,P as TestPhoneNumbersBanner,S as Typography,b as VerifiedImage,g as VerifiedIncLogo,A as When,C as useSnackbar};
1
+ "use strict";import{A as a,d as s,l as e,B as r,C as t,i as n,D as o,E as i,j as p,F as c,I as u,c as d,L as l,O as m,P as I,g as P,b as h,Q as B,R as S,e as g,S as k,f as y,k as T,T as b,a as A,V as C,h as L,W as f,u as E}from"../shared/index-BrylaQlu.mjs";import{SnackbarProvider as N}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,t as CredentialRequestsEditor,n as CustomAlertComponent,o as DateInput,i as EmailInput,p as ExactBirthdayBanner,c as FullWidthAlert,u as Image,d as LegalLink,l as LinkButton,m as OTPInput,I as Paragraph,P as PhoneInput,h as PrivacyPolicyNotice,B as QRCodeDisplay,S as ResendPhoneBanner,g as SSNInput,k as SectionHeader,y as SelectInput,N as SnackbarProvider,T as TestPhoneNumbersBanner,b as TextButton,A as Typography,C as VerifiedImage,L as VerifiedIncLogo,f as When,E as useSnackbar};
@@ -3,5 +3,4 @@ import { LinkProps } from '@mui/material';
3
3
  * A component which renders a link syled following advice from our legal counsel for linking to legal documents
4
4
  * like terms of use, privacy policy, etc
5
5
  */
6
- declare const LegalLink: ({ sx, ...props }: LinkProps) => import("react").JSX.Element;
7
- export default LegalLink;
6
+ export declare const LegalLink: ({ sx, ...props }: LinkProps) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PrivacyPolicyNotice: () => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './PrivacyPolicyNotice';
2
+ export * from './AcceptTermsNotice';
3
+ export * from './LegalLink';
@@ -0,0 +1,6 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ /**
3
+ * A typography component for paragraph text
4
+ * The primary text component, intended for use for most body content text.
5
+ */
6
+ export declare const Paragraph: ({ children, sx, ...props }: TypographyProps) => import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ /**
3
+ * A typography component for section header text
4
+ * A secondary header, it is intended for use with sections within a page, below the PageHeader
5
+ */
6
+ export declare const SectionHeader: ({ children, ...props }: TypographyProps) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Paragraph';
2
+ export * from './SectionHeader';
@@ -6,14 +6,7 @@ export interface UseDisclosureProps {
6
6
  onOpen?: () => void;
7
7
  id?: string;
8
8
  }
9
- type HTMLProps = React.HTMLAttributes<HTMLElement>;
10
- /**
11
- * `useDisclosure` is a custom hook used to help handle common open, close, or toggle scenarios.
12
- * It can be used to control feedback component such as `Modal`, `AlertDialog`, `Drawer`, etc.
13
- *
14
- * @see Docs https://chakra-ui.com/docs/hooks/use-disclosure
15
- */
16
- export declare function useDisclosure(props?: UseDisclosureProps): {
9
+ export interface UseDisclosureReturn {
17
10
  open: boolean;
18
11
  onOpen: () => void;
19
12
  onClose: () => void;
@@ -21,6 +14,13 @@ export declare function useDisclosure(props?: UseDisclosureProps): {
21
14
  isControlled: boolean;
22
15
  getButtonProps: (props?: HTMLProps) => HTMLProps;
23
16
  getDisclosureProps: (props?: HTMLProps) => HTMLProps;
24
- };
25
- export type UseDisclosureReturn = ReturnType<typeof useDisclosure>;
17
+ }
18
+ type HTMLProps = React.HTMLAttributes<HTMLElement>;
19
+ /**
20
+ * `useDisclosure` is a custom hook used to help handle common open, close, or toggle scenarios.
21
+ * It can be used to control feedback component such as `Modal`, `AlertDialog`, `Drawer`, etc.
22
+ *
23
+ * @see Docs https://chakra-ui.com/docs/hooks/use-disclosure
24
+ */
25
+ export declare function useDisclosure(props?: UseDisclosureProps): UseDisclosureReturn;
26
26
  export {};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use strict";import{A as n,a as i,g as l,e as m,B as u,C as c,d,D as h,E as p,F as g,I as S,O as f,P as D,Q as k,R as y,S as C,b,f as w,T as P,V as B,c as T,W as I,h as N,i as R,j as Y,o as v,p as F,s as M,u as W,v as x}from"./shared/index-w5CoDyk5.mjs";import{c as A,a as G,e as U,b as V,k as j,u as E,f as Q,d as z,g as O,h as q,i as H,j as L}from"./shared/useIntersectionObserver-BX_TdOtC.mjs";import{u as $}from"./shared/useQRCode-DXiPIj-D.mjs";import{u as J}from"./shared/useCounter-BV32zXDQ.mjs";import{b as K,a as X,v as Z,e as _,d as aa,p as sa,u as ea,h as ta,j as ra,g as oa,o as na,s as ia,m as la,c as ma,l as ua,n as ca,q as da,f as ha,i as pa,r as ga,z as Sa,t as fa,x as Da,k as ka,w as ya,y as Ca}from"./shared/shadows-BUr4KsFQ.mjs";import{masks as ba}from"./utils/masks/index.mjs";import{M as wa,S as Pa,U as Ba,d as Ta,e as Ia,f as Na,g as Ra,a as Ya,s as va}from"./shared/unix.schema-CMYTtXco.mjs";import{p as Fa}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Ma}from"notistack";async function Wa(s){try{return[await s,null]}catch(a){return[null,a]}}const xa=s=>{let a=new Date(Number(s));if(!s){const e=new Date;a=new Date(e.getFullYear(),e.getMonth(),e.getDate())}const t=String(a.getDate()).padStart(2,"0"),r=String(a.getMonth()+1).padStart(2,"0"),o=a.getFullYear();return[r,t,o].join("/")},Aa=s=>{const a=new Date(s);return a.setUTCHours(12),String(+a)},Ga=s=>s.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{n as AcceptTermsNotice,i as Alert,l as Backdrop,m as Banner,u as Button,c as CredentialRequestsEditor,d as CustomAlertComponent,h as DateInput,p as ExactBirthdayBanner,g as FullWidthAlert,S as Image,wa as MaskedAndUnmaskedSSNSchema,f as OTPInput,D as PhoneInput,k as QRCodeDisplay,y as ResendPhoneBanner,C as SSNInput,Pa as SSNSchema,b as SelectInput,Ma as SnackbarProvider,w as TestPhoneNumbersBanner,P as Typography,Ba as USDateSchema,B as VerifiedImage,T as VerifiedIncLogo,I as When,K as black,X as blue,Z as colors,N as countries,_ as darkBlue,aa as darkGreen,sa as darkGrey,ea as darkGreyContrast,ta as darkRed,ra as darkYellow,Ta as descriptionSchema,Ia as emailSchema,Na as fieldSchema,xa as formatDateMMDDYYYY,Aa as formatDateToTimestamp,Ra as getDateSchemaWithPastValidation,R as getPhoneData,Y as getPhoneDataByFieldName,Ya as getUnixSchema,oa as green,na as grey,ia as greyContrast,la as infoContrast,ma as lightBlue,ua as lightGreen,ca as lightGrey,da as lightGreyContrast,ha as lightRed,pa as lightYellow,ba as masks,v as omitProperties,F as parseToPhoneNational,Fa as phoneSchema,ga as red,Sa as shadows,M as sortByCountryName,Ga as ssnFormatter,va as stateSchema,fa as textDisabled,Da as theme,A as useCallbackRef,G as useCopyToClipboard,J as useCounter,U as useDebounceValue,V as useDisclosure,j as useIntersectionObserver,E as useLocalStorage,$ as useQRCode,Q as useScript,z as useSearchParams,W as useSnackbar,O as useThrottle,q as useToggle,H as useWindowScroll,L as useWindowSize,x as validatePhone,ka as warningContrast,ya as white,Wa as wrapPromise,Ca as yellow};
1
+ "use strict";import{A as n,d as i,l,B as m,C as u,i as c,D as d,E as h,j as p,F as g,I as S,c as f,L as k,O as y,P as D,g as P,b as C,Q as b,R as w,e as B,S as T,f as I,k as N,T as Y,a as v,V as R,h as x,W as A,m as F,n as G,o as L,q as M,p as U,s as W,u as j,v as E}from"./shared/index-BrylaQlu.mjs";import{c as V,a as O,e as Q,b as q,k as z,u as H,f as J,d as X,g as _,h as $,i as K,j as Z}from"./shared/useIntersectionObserver-BX_TdOtC.mjs";import{u as aa}from"./shared/useQRCode-DXiPIj-D.mjs";import{u as sa}from"./shared/useCounter-BV32zXDQ.mjs";import{b as ea,a as ta,v as ra,e as oa,d as na,p as ia,u as la,h as ma,j as ua,g as ca,o as da,s as ha,m as pa,c as ga,l as Sa,n as fa,q as ka,f as ya,i as Da,r as Pa,z as Ca,t as ba,x as wa,k as Ba,w as Ta,y as Ia}from"./shared/shadows-CNjkm81P.mjs";import{masks as Na}from"./utils/masks/index.mjs";import{M as Ya,S as va,U as Ra,d as xa,e as Aa,f as Fa,g as Ga,a as La,s as Ma}from"./shared/unix.schema-CMYTtXco.mjs";import{p as Ua}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Wa}from"notistack";async function ja(s){try{return[await s,null]}catch(a){return[null,a]}}const Ea=s=>{let a=new Date(Number(s));if(!s){const e=new Date;a=new Date(e.getFullYear(),e.getMonth(),e.getDate())}const t=String(a.getDate()).padStart(2,"0"),r=String(a.getMonth()+1).padStart(2,"0"),o=a.getFullYear();return[r,t,o].join("/")},Va=s=>{const a=new Date(s);return a.setUTCHours(12),String(+a)},Oa=s=>s.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{n as AcceptTermsNotice,i as Alert,l as Backdrop,m as Banner,u as CredentialRequestsEditor,c as CustomAlertComponent,d as DateInput,h as EmailInput,p as ExactBirthdayBanner,g as FullWidthAlert,S as Image,f as LegalLink,k as LinkButton,Ya as MaskedAndUnmaskedSSNSchema,y as OTPInput,D as Paragraph,P as PhoneInput,C as PrivacyPolicyNotice,b as QRCodeDisplay,w as ResendPhoneBanner,B as SSNInput,va as SSNSchema,T as SectionHeader,I as SelectInput,Wa as SnackbarProvider,N as TestPhoneNumbersBanner,Y as TextButton,v as Typography,Ra as USDateSchema,R as VerifiedImage,x as VerifiedIncLogo,A as When,ea as black,ta as blue,ra as colors,F as countries,oa as darkBlue,na as darkGreen,ia as darkGrey,la as darkGreyContrast,ma as darkRed,ua as darkYellow,xa as descriptionSchema,Aa as emailSchema,Fa as fieldSchema,Ea as formatDateMMDDYYYY,Va as formatDateToTimestamp,Ga as getDateSchemaWithPastValidation,G as getPhoneData,L as getPhoneDataByFieldName,La as getUnixSchema,ca as green,da as grey,ha as greyContrast,pa as infoContrast,ga as lightBlue,Sa as lightGreen,fa as lightGrey,ka as lightGreyContrast,ya as lightRed,Da as lightYellow,Na as masks,M as omitProperties,U as parseToPhoneNational,Ua as phoneSchema,Pa as red,Ca as shadows,W as sortByCountryName,Oa as ssnFormatter,Ma as stateSchema,ba as textDisabled,wa as theme,V as useCallbackRef,O as useCopyToClipboard,sa as useCounter,Q as useDebounceValue,q as useDisclosure,z as useIntersectionObserver,H as useLocalStorage,aa as useQRCode,J as useScript,X as useSearchParams,j as useSnackbar,_ as useThrottle,$ as useToggle,K as useWindowScroll,Z as useWindowSize,E as validatePhone,Ba as warningContrast,Ta as white,ja as wrapPromise,Ia as yellow};