@verifiedinc-public/shared-ui-elements 7.11.0 → 7.12.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tunnel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{T as o}from"../shared/index-CgwlGvef.mjs";export{o as Tunnel};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StackProps } from '@mui/material';
|
|
3
|
+
export type TunnelContext = {
|
|
4
|
+
register: (id: string, element: HTMLElement) => void;
|
|
5
|
+
unregister: (id: string) => void;
|
|
6
|
+
getTarget: (id: string) => HTMLElement | null;
|
|
7
|
+
subscribe: (id: string, callback: (element: HTMLElement | null) => void) => () => void;
|
|
8
|
+
};
|
|
9
|
+
declare function useTunnel(): TunnelContext;
|
|
10
|
+
declare function Provider({ children }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
declare function Target({ id, ...stackProps }: StackProps & {
|
|
14
|
+
id: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
declare function Source({ id, children }: {
|
|
17
|
+
id: string;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import('react').ReactPortal | null;
|
|
20
|
+
export declare const Tunnel: {
|
|
21
|
+
Provider: typeof Provider;
|
|
22
|
+
Target: typeof Target;
|
|
23
|
+
Source: typeof Source;
|
|
24
|
+
useTunnel: typeof useTunnel;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{A as a,am as s,a0 as e,c as r,aa as t,a6 as o,B as i,ac as n,ab as m,ai as d,ah as l,an as p,C as u,af as c,D as C,i as h,$ as g,h as S,a8 as T,E as f,N as y,R as P,Q as k,U as F,Z as
|
|
1
|
+
"use strict";import{A as a,am as s,a0 as e,c as r,aa as t,a6 as o,B as i,ac as n,ab as m,ai as d,ah as l,an as p,C as u,af as c,D as C,i as h,$ as g,h as S,a8 as T,E as f,N as y,R as P,Q as k,U as F,Z as D,F as B,al as b,I,b as R,L as O,M as L,X as M,g as N,k as v,a3 as w,O as U,ag as A,e as x,a4 as E,f as Y,P as G,a5 as W,_ as V,ak as H,a7 as j,S as q,d as z,ao as Q,aq as _,ap as K,a9 as X,T as Z,j as $,a as J,a1 as aa,a2 as sa,aj as ea,H as ra,v as ta,t as oa,p as ia,u as na,l as ma,r as da,G as la,z as pa,q as ua,J as ca,s as Ca,m as ha,K as ga,n as Sa,o as Ta,w as fa,V as ya,ad as Pa,W as ka,x as Fa,y as Da,ae as Ba,Y as ba}from"./shared/magic-legal-language-COI850W8.mjs";import{a as Ia,b as Ra,P as Oa,S as La}from"./shared/PageSectionHeader-lc9WunC-.mjs";import{B as Ma,C as Na,i as va,E as wa,L as Ua,j as Aa,M as xa,g as Ea,O as Ya,P as Ga,R as Wa,e as Va,d as Ha,S as ja,a as qa,b as za,k as Qa,c as _a,f as Ka,n as Xa,T as Za,W as $a,h as Ja,l as as,m as ss,u as es}from"./shared/TTSBigNumbers-CWUApa7c.mjs";import{T as rs}from"./shared/index-CgwlGvef.mjs";import{b as ts,k as os,a as is,i as ns,u as ms,j as ds,d as ls,c as ps,m as us,l as cs,e as Cs,f as hs,g as gs,h as Ss}from"./shared/magic-link-Dr2o0qhW.mjs";import{u as Ts,a as fs}from"./shared/usePrevious-Dppy11px.mjs";import{b as ys,u as Ps,c as ks,a as Fs,d as Ds,e as Bs,f as bs}from"./shared/magic-qr-code-DEnCvbjS.mjs";import{u as Is}from"./shared/useCounter-BV32zXDQ.mjs";import{u as Rs}from"./shared/useResizeObserver-D7K4jTvT.mjs";import{b as Os,a as Ls,x as Ms,m as Ns,e as vs,d as ws,q as Us,v as As,h as xs,j as Es,g as Ys,p as Gs,u as Ws,n as Vs,c as Hs,l as js,o as qs,s as zs,f as Qs,i as _s,r as Ks,t as Xs,k as Zs,w as $s,y as Js}from"./shared/colors-CSvtCJK4.mjs";import{s as ae,t as se}from"./shared/shadows-levwxV7v.mjs";import{wrapPromise as ee}from"./utils/wrapPromise/index.mjs";import{f as re,b as te,a as oe,c as ie,s as ne,t as me,u as de}from"./shared/uuidColor-CbuBMrIl.mjs";import{c as le,g as pe,a as ue,p as ce,s as Ce,v as he}from"./shared/phone-cSkbYk4g.mjs";import{masks as ge}from"./utils/masks/index.mjs";import{o as Se,s as Te,a as fe}from"./shared/ssn-I4gN8M-_.mjs";import{toCapitalize as ye,toSentenceCase as Pe}from"./utils/string/index.mjs";import{k as ke}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{g as Fe}from"./shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as De,contrastColor as Be,darken as be,getThemeFromPrimaryColor as Ie,lighten as Re}from"./utils/color/index.mjs";import{addressFormatter as Oe,fromUSAddress as Le,parseCountryCode as Me,toUSaddress as Ne,toUSaddressPretty as ve}from"./utils/address/index.mjs";import{D as we,a as Ue,m as Ae}from"./shared/makeGoogleFont-pok2oDWs.mjs";import{p as xe}from"./shared/notification-sBaCxCY5.mjs";import{M as Ee,S as Ye,U as Ge,g as We,p as Ve}from"./shared/date.schema-CmPHY0OU.mjs";import{d as He,e as je,f as qe,g as ze,s as Qe}from"./shared/unix.schema-D7g4VIKT.mjs";import{SnackbarProvider as _e}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,r as Alert,t as Backdrop,o as Banner,i as BasePhoneInput,Ma as BigNumber,n as BrandFilterInput,m as Button,d as CalendlyDialog,l as CalendlyDialogComponent,p as ContentWithLoader,u as CredentialRequestsEditor,Na as CustomAlertComponent,c as CustomDialog,we as DEFAULT_FONT_FAMILY,Ue as DEFAULT_FONT_WEIGHTS,C as DateInput,h as DateRangeInput,g as DefaultInput,S as EmailInput,va as EmptyChartSection,wa as ErrorCodesChart,T as ExactBirthdayBanner,f as ExportToPdfButton,y as Form,P as FormBuilder,k as FormField,F as FormFieldBuilder,D as FormProvider,B as FullWidthAlert,b as IconPlayer,I as Image,R as LegalLink,O as LinkButton,Ua as LoadingChartSection,L as MandatoryEnum,Ee as MaskedAndUnmaskedSSNSchema,Aa as MetricLastUpdated,xa as MonthlySignupsOverviewTable,M as NewOneClickForm,N as OTPInput,v as OneClickForm,Ea as OneClickOverTimeChart,Ya as OneClickPercentageChart,w as OneClickPoweredByVerified,U as OriginalButton,Ia as PageHeader,Ra as PageSectionHeader,Oa as Paragraph,A as PersistentDialog,x as PhoneInput,Ga as PieChart,E as PoweredByVerified,Y as PrettyPhoneInput,G as PrivacyPolicyNotice,W as QRCodeDisplay,V as RadioOption,Wa as ReasonCodesChart,H as RequiredLabel,j as ResendPhoneBanner,Va as RiskScoreBarChart,Ha as RiskScorePieChart,q as SSNInput,Ye as SSNSchema,La as SectionHeader,z as SelectInput,ja as SeriesChart,qa as SeriesChartLegend,za as SeriesPercentageChart,Qa as SignupBigNumbers,_a as SimpleBarChart,Ka as SimpleLegend,_e as SnackbarProvider,Xa as TTSBigNumbers,Q as TTSMagicButton,_ as TTSMagicLegalLanguage,K as TTSMagicQRCode,Za as TTSOverTimeChart,X as TestPhoneNumbersBanner,Z as TextButton,$ as TimezoneInput,rs as Tunnel,J as Typography,Ge as USDateSchema,aa as VerifiedImage,sa as VerifiedIncLogo,$a as When,ea as WhenStyled,Oe as addressFormatter,De as alpha,Os as black,Ls as blue,Ms as colors,Be as contrastColor,le as countries,Ns as dangerContrast,vs as darkBlue,ws as darkGreen,Us as darkGrey,As as darkGreyContrast,xs as darkRed,Es as darkYellow,be as darken,He as descriptionSchema,je as emailSchema,ra as extractChildrenFromCredentialFieldSet,ta as extractTypesFromSchema,qe as fieldSchema,oa as filterRepeatedCredentials,ia as findCorrectSchemaProperty,na as findCredentialsByType,re as formatDateMMDDYYYY,te as formatDateMMYY,oe as formatDateToTimestamp,ie as formatExtendedDate,Le as fromUSAddress,Fe as generateKeyFromString,ma as getCredentialTypeDisplayInfo,da as getCredentialValues,We as getDateSchemaWithPastValidation,la as getLastPathName,pa as getParentPath,pe as getPhoneData,ue as getPhoneDataByFieldName,ua as getReferencedSchemaNames,Ie as getThemeFromPrimaryColor,ze as getUnixSchema,Ys as green,Gs as grey,Ws as greyContrast,ca as hasMandatoryFieldEmpty,Vs as infoContrast,Ca as isNewCredentialAgainstInstance,ha as isRequiredCredentialDisplayInfo,ga as isSomeFieldInputAllowed,Sa as isValidInputCredential,ke as kebabCaseToPretty,Hs as lightBlue,js as lightGreen,qs as lightGrey,zs as lightGreyContrast,Qs as lightRed,_s as lightYellow,Re as lighten,Ta as makeCredentialDisplayInfoList,Ae as makeGoogleFontUrl,Ja as mapMonthlySignupsOverviewTableData,as as mapTTSTimeSeriesData,ss as mapTimeSeriesData,ge as masks,Se as omitProperties,Me as parseCountryCode,ce as parseToPhoneNational,Ve as phoneSchema,xe as prepareNotification,Ks as red,ae as shadows,Ce as sortByCountryName,fa as sortCredentialsBySchema,Te as ssnFormatter,fe as ssnRegex,Qe as stateSchema,ne as stringToHashedColor,Xs as textDisabled,se as theme,ye as toCapitalize,ya as toCreatePatchCredentials,Pa as toOption,Pe as toSentenceCase,ka as toShareCredentials,Ne as toUSaddress,ve as toUSaddressPretty,me as toUTCMilliseconds,Fa as transformToFormObject,Da as transformToFormSchema,Ba as useBrandFilterInput,ts as useCallbackRef,Ts as useCopyToClipboard,Is as useCounter,os as useDebounceCallback,ys as useDebounceValue,is as useDisclosure,ba as useForm,Ps as useGoogleFont,ns as useIntersectionObserver,ms as useLocalStorage,ds as useNavigatorOnline,ks as useOnClickOutside,fs as usePrevious,Fs as useQRCode,Rs as useResizeObserver,ls as useScript,ps as useSearchParams,es as useSnackbar,Ds as useStyledQRCode,us as useTTSMagicLink,Bs as useTTSMagicQRCode,bs as useTTSMagicQRCodeOptions,cs as useTTSMagicText,Cs as useThrottle,hs as useToggle,gs as useWindowScroll,Ss as useWindowSize,de as uuidToHashedColor,he as validatePhone,Zs as warningContrast,$s as white,ee as wrapPromise,Js as yellow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createContext as b,useContext as T,useState as g,useLayoutEffect as v,useCallback as i,useRef as x}from"react";import{createPortal as E}from"react-dom";import{Stack as M}from"@mui/material";import{j as m}from"./jsx-runtime-Bwwz4kRH.mjs";const p=b(null);function f(){const r=T(p);if(!r)throw new Error("useTunnel must be used within a TunnelProvider");return r}function P({children:r}){const[u,c]=g(new Map),t=x(new Map),l=i((e,n)=>{c(o=>{const a=new Map(o);return a.set(e,n),a});const s=t.current.get(e);s&&s.forEach(o=>o(n))},[]),d=i(e=>{c(s=>{const o=new Map(s);return o.delete(e),o});const n=t.current.get(e);n&&n.forEach(s=>s(null))},[]),h=i(e=>u.get(e)??null,[u]),w=i((e,n)=>{var s;t.current.has(e)||t.current.set(e,new Set),(s=t.current.get(e))==null||s.add(n);const o=u.get(e)??null;return n(o),()=>{const a=t.current.get(e);a&&(a.delete(n),a.size===0&&t.current.delete(e))}},[u]);return m.jsx(p.Provider,{value:{register:l,unregister:d,getTarget:h,subscribe:w},children:r})}function S({id:r,...u}){const{register:c,unregister:t}=f(),l=i(d=>{d?c(r,d):t(r)},[r,c,t]);return m.jsx(M,{...u,ref:l,"data-tunnel-target":r})}function j({id:r,children:u}){const{subscribe:c}=f(),[t,l]=g(null);return v(()=>c(r,l),[r,c]),t?E(u,t):null}const C={Provider:P,Target:S,Source:j,useTunnel:f};export{C as T};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verifiedinc-public/shared-ui-elements",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.12.0",
|
|
4
4
|
"description": "A set of UI components, utilities that is shareable with the core apps.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [],
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"types": "./dist/components/index.d.ts",
|
|
24
24
|
"import": "./dist/components/index.mjs"
|
|
25
25
|
},
|
|
26
|
+
"./contexts": {
|
|
27
|
+
"types": "./dist/contexts/index.d.ts",
|
|
28
|
+
"import": "./dist/contexts/index.mjs"
|
|
29
|
+
},
|
|
26
30
|
"./components/*": {
|
|
27
31
|
"types": "./dist/components/*/index.d.ts",
|
|
28
32
|
"import": "./dist/components/*/index.mjs"
|