@verifiedinc-public/shared-ui-elements 5.20.9 → 5.21.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.
- package/dist/components/animation/AnimatedHeight.d.ts +5 -1
- package/dist/components/animation/index.mjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/useInlineScript.d.ts +12 -0
- package/dist/hooks/useScript.d.ts +3 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/useDebounceCallback-HZNAtMNH.mjs +1 -0
- package/package.json +1 -1
- package/dist/shared/useDebounceCallback-CO7X29ng.mjs +0 -1
@@ -1,2 +1,6 @@
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
2
|
-
|
2
|
+
type AnimateHeightProps = {
|
3
|
+
duration?: number;
|
4
|
+
};
|
5
|
+
export declare function AnimateHeight(props: PropsWithChildren<AnimateHeightProps>): ReactElement;
|
6
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{C as s,M as n,f as r,a as e,d as m,c as d,b as f,e as l}from"../../shared/motions-BBPeWBPV.mjs";import{j as
|
1
|
+
"use strict";import{C as s,M as n,f as r,a as e,d as m,c as d,b as f,e as l}from"../../shared/motions-BBPeWBPV.mjs";import{j as t}from"../../shared/jsx-runtime-DHlBLioN.mjs";import{useRef as p}from"react";import{motion as u}from"framer-motion";import{u as M}from"../../shared/useResizeObserver-D434c1uN.mjs";function c(o){const a=p(null),[,i]=M(a);return t.jsx(u.div,{animate:{height:i,transition:{duration:o.duration??.2}},children:t.jsx("div",{ref:a,children:o.children})})}export{c as AnimateHeight,s as Counter,n as MotionBox,r as MotionButton,e as MotionStack,m as MotionTableCell,d as MotionTableRow,f as MotionTbody,l as MotionTypography};
|
package/dist/hooks/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{b as s,k as a,a as e,i as u,u as o,j as r,d as i,c as t,e as l,f as c,g as m,h as n}from"../shared/useDebounceCallback-
|
1
|
+
"use strict";import{b as s,k as a,a as e,i as u,u as o,j as r,d as i,c as t,e as l,f as c,g as m,h as n}from"../shared/useDebounceCallback-HZNAtMNH.mjs";import{u as b,a as p}from"../shared/usePrevious-DG_IMu2h.mjs";import{a as f,b as d,u as C}from"../shared/useOnClickOutside-DgJxDzLx.mjs";import{u as O}from"../shared/useCounter-BV32zXDQ.mjs";import{u as S}from"../shared/useResizeObserver-D434c1uN.mjs";export{s as useCallbackRef,b as useCopyToClipboard,O as useCounter,a as useDebounceCallback,f as useDebounceValue,e as useDisclosure,u as useIntersectionObserver,o as useLocalStorage,r as useNavigatorOnline,d as useOnClickOutside,p as usePrevious,C as useQRCode,S as useResizeObserver,i as useScript,t as useSearchParams,l as useThrottle,c as useToggle,m as useWindowScroll,n as useWindowSize};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Custom React hook for loading external inline scripts.
|
3
|
+
* @param name
|
4
|
+
* @param script
|
5
|
+
* @param options
|
6
|
+
* @returns
|
7
|
+
*/
|
8
|
+
export declare function useInlineScript(name: string, scriptString: string, options?: {
|
9
|
+
addToHead?: boolean;
|
10
|
+
removeOnUnmount?: boolean;
|
11
|
+
nonce?: string;
|
12
|
+
}): void;
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as a,c as s,N as e,H as r,W as t,U as o,C as i,D as n,f as m,E as l,J as d,F as p,I as c,b as u,L as h,M as C,O as S,h as g,G as f,e as y,P as k,Q as P,R as b,S as B,d as T,K as D,T as I,g as R,a as v,V as w,B as N,y as O,s as F,q as M,l as L,r as x,i as E,o as Y,x as A,w as V,n as z,z as G,p as U,j as W,k as j,m as q,t as H,X as Q,u as K,v as J,Y as Z}from"./shared/index-BxpdKG6F.mjs";import{a as X,b as $,P as _,S as aa}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as sa,C as ea,i as ra,E as ta,L as oa,j as ia,M as na,g as ma,O as la,P as da,R as pa,e as ca,d as ua,S as ha,a as Ca,b as Sa,k as ga,c as fa,f as ya,W as ka,h as Pa,m as ba,u as Ba}from"./shared/SignupBigNumbers-DHYEwrnQ.mjs";import{b as Ta,k as Da,a as Ia,i as Ra,u as va,j as wa,d as Na,c as Oa,e as Fa,f as Ma,g as La,h as xa}from"./shared/useDebounceCallback-
|
1
|
+
"use strict";import{A as a,c as s,N as e,H as r,W as t,U as o,C as i,D as n,f as m,E as l,J as d,F as p,I as c,b as u,L as h,M as C,O as S,h as g,G as f,e as y,P as k,Q as P,R as b,S as B,d as T,K as D,T as I,g as R,a as v,V as w,B as N,y as O,s as F,q as M,l as L,r as x,i as E,o as Y,x as A,w as V,n as z,z as G,p as U,j as W,k as j,m as q,t as H,X as Q,u as K,v as J,Y as Z}from"./shared/index-BxpdKG6F.mjs";import{a as X,b as $,P as _,S as aa}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as sa,C as ea,i as ra,E as ta,L as oa,j as ia,M as na,g as ma,O as la,P as da,R as pa,e as ca,d as ua,S as ha,a as Ca,b as Sa,k as ga,c as fa,f as ya,W as ka,h as Pa,m as ba,u as Ba}from"./shared/SignupBigNumbers-DHYEwrnQ.mjs";import{b as Ta,k as Da,a as Ia,i as Ra,u as va,j as wa,d as Na,c as Oa,e as Fa,f as Ma,g as La,h as xa}from"./shared/useDebounceCallback-HZNAtMNH.mjs";import{u as Ea,a as Ya}from"./shared/usePrevious-DG_IMu2h.mjs";import{a as Aa,b as Va,u as za}from"./shared/useOnClickOutside-DgJxDzLx.mjs";import{u as Ga}from"./shared/useCounter-BV32zXDQ.mjs";import{u as Ua}from"./shared/useResizeObserver-D434c1uN.mjs";import{b as Wa,a as ja,x as qa,m as Ha,e as Qa,d as Ka,q as Ja,v as Za,h as Xa,j as $a,g as _a,p as as,u as ss,n as es,c as rs,l as ts,o as os,s as is,f as ns,i as ms,r as ls,A as ds,t as ps,z as cs,k as us,w as hs,y as Cs}from"./shared/shadows-DlwsIS8Q.mjs";import{wrapPromise as Ss}from"./utils/wrapPromise/index.mjs";import{f as gs,b as fs,a as ys,c as ks,u as Ps}from"./shared/uuidColor-LRbEKYAZ.mjs";import{c as bs,g as Bs,a as Ts,p as Ds,s as Is,v as Rs}from"./shared/phone-eqP--V9t.mjs";import{masks as vs}from"./utils/masks/index.mjs";import{o as ws}from"./shared/omitProperty-DZYdN2vK.mjs";import{s as Ns}from"./shared/ssn-CTUJ2_Vl.mjs";import{toCapitalize as Os,toSentenceCase as Fs}from"./utils/string/index.mjs";import{k as Ms}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{contrastColor as Ls,darken as xs,lighten as Es}from"./utils/color/index.mjs";import{U as Ys,d as As,e as Vs,f as zs,g as Gs,a as Us,s as Ws}from"./shared/unix.schema-CM7mF14M.mjs";import{M as js,S as qs,p as Hs}from"./shared/ssn.schema-CX80CpX4.mjs";import{SnackbarProvider as Qs}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,sa as BigNumber,t as BrandFilterInput,o as Button,i as CredentialRequestsEditor,ea as CustomAlertComponent,n as DateInput,m as DateRangeInput,l as EmailInput,ra as EmptyChartSection,ta as ErrorCodesChart,d as ExactBirthdayBanner,p as FullWidthAlert,c as Image,u as LegalLink,h as LinkButton,oa as LoadingChartSection,C as MandatoryEnum,js as MaskedAndUnmaskedSSNSchema,ia as MetricLastUpdated,na as MonthlySignupsOverviewTable,S as OTPInput,g as OneClickForm,ma as OneClickOverTimeChart,la as OneClickPercentageChart,f as OneClickPoweredByVerified,X as PageHeader,$ as PageSectionHeader,_ as Paragraph,y as PhoneInput,da as PieChart,k as PrivacyPolicyNotice,P as QRCodeDisplay,pa as ReasonCodesChart,b as ResendPhoneBanner,ca as RiskScoreBarChart,ua as RiskScorePieChart,B as SSNInput,qs as SSNSchema,aa as SectionHeader,T as SelectInput,ha as SeriesChart,Ca as SeriesChartLegend,Sa as SeriesPercentageChart,ga as SignupBigNumbers,fa as SimpleBarChart,ya as SimpleLegend,Qs as SnackbarProvider,D as TestPhoneNumbersBanner,I as TextButton,R as TimezoneInput,v as Typography,Ys as USDateSchema,w as VerifiedImage,N as VerifiedIncLogo,ka as When,Wa as black,ja as blue,qa as colors,Ls as contrastColor,bs as countries,Ha as dangerContrast,Qa as darkBlue,Ka as darkGreen,Ja as darkGrey,Za as darkGreyContrast,Xa as darkRed,$a as darkYellow,xs as darken,As as descriptionSchema,Vs as emailSchema,O as extractChildrenFromCredentialFieldSet,F as extractTypesFromSchema,zs as fieldSchema,M as filterRepeatedCredentials,L as findCorrectSchemaProperty,x as findCredentialsByType,gs as formatDateMMDDYYYY,fs as formatDateMMYY,ys as formatDateToTimestamp,ks as formatExtendedDate,E as getCredentialTypeDisplayInfo,Y as getCredentialValues,Gs as getDateSchemaWithPastValidation,A as getLastPathName,V as getParentPath,Bs as getPhoneData,Ts as getPhoneDataByFieldName,z as getReferencedSchemaNames,Us as getUnixSchema,_a as green,as as grey,ss as greyContrast,G as hasMandatoryFieldEmpty,es as infoContrast,U as isNewCredentialAgainstInstance,W as isRequiredCredentialDisplayInfo,j as isValidInputCredential,Ms as kebabCaseToPretty,rs as lightBlue,ts as lightGreen,os as lightGrey,is as lightGreyContrast,ns as lightRed,ms as lightYellow,Es as lighten,q as makeCredentialDisplayInfoList,Pa as mapMonthlySignupsOverviewTableData,ba as mapTimeSeriesData,vs as masks,ws as omitProperties,Ds as parseToPhoneNational,Hs as phoneSchema,ls as red,ds as shadows,Is as sortByCountryName,H as sortCredentialsBySchema,Ns as ssnFormatter,Ws as stateSchema,ps as textDisabled,cs as theme,Os as toCapitalize,Q as toOption,Fs as toSentenceCase,K as transformToFormObject,J as transformToFormSchema,Z as useBrandFilterInput,Ta as useCallbackRef,Ea as useCopyToClipboard,Ga as useCounter,Da as useDebounceCallback,Aa as useDebounceValue,Ia as useDisclosure,Ra as useIntersectionObserver,va as useLocalStorage,wa as useNavigatorOnline,Va as useOnClickOutside,Ya as usePrevious,za as useQRCode,Ua as useResizeObserver,Na as useScript,Oa as useSearchParams,Ba as useSnackbar,Fa as useThrottle,Ma as useToggle,La as useWindowScroll,xa as useWindowSize,Ps as uuidToHashedColor,Rs as validatePhone,us as warningContrast,hs as white,Ss as wrapPromise,Cs as yellow};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{useRef as h,useInsertionEffect as x,useCallback as w,useState as d,useId as k,useEffect as g,useLayoutEffect as I,useSyncExternalStore as A,useMemo as P}from"react";import{d as S}from"./useOnClickOutside-DgJxDzLx.mjs";function D(e){return{set:r=>{const o=typeof r=="string"?r:JSON.stringify(r);localStorage.setItem(e,o)},get:()=>{const r=localStorage.getItem(e);if(r)try{return JSON.parse(r)}catch{return r}return null},remove:()=>{localStorage.removeItem(e)}}}function E(e,r=[]){const o=h(()=>{throw new Error("Cannot call an event handler while rendering.")});return x(()=>{o.current=e}),w((...t)=>{var i;return(i=o.current)==null?void 0:i.call(o,...t)},r)}function H(e={}){const{onClose:r,onOpen:o,open:t,id:i}=e,n=E(o),s=E(r),[c,l]=d(e.defaultOpen??!1),u=t??c,a=t!==void 0,m=k(),f=i??`disclosure-${m}`,p=w(()=>{a||l(!1),s?.()},[a,s]),y=w(()=>{a||l(!0),n?.()},[a,n]),b=w(()=>{u?p():y()},[u,y,p]);function T(v={}){return{...v,"aria-expanded":u,"aria-controls":f,onClick(O){var L;(L=v.onClick)==null||L.call(v,O),b()}}}function C(v={}){return{...v,hidden:!u,id:f}}return{open:u,onOpen:y,onClose:p,onToggle:b,isControlled:a,getButtonProps:T,getDisclosureProps:C}}function U(e){return new URLSearchParams(e??window.location.search)}function W(e,r={addToHead:!1,removeOnUnmount:!1,nonce:void 0}){const[o,t]=d("loading"),i=h(r);return g(()=>{let n=document.querySelector(`script[src="${e}"]`);const s=n?.getAttribute("data-status");if(s){t(s);return}if(n===null){n=document.createElement("script"),n.src=e,n.async=!0,n.setAttribute("data-status","loading"),i.current.nonce&&n.setAttribute("nonce",i.current.nonce),i.current.addToHead?document.head.appendChild(n):document.body.appendChild(n);const c=()=>{n?.setAttribute("data-status","ready"),t("ready"),u()},l=()=>{n?.setAttribute("data-status","error"),t("error"),u()},u=()=>{n?.removeEventListener("load",c),n?.removeEventListener("error",l)};n.addEventListener("load",c),n.addEventListener("error",l);const a=i.current.removeOnUnmount;return()=>{a&&(n?.remove(),u())}}else t("unknown")},[e]),o}function j(e,r=500){const[o,t]=d(e),i=h(Date.now());return g(()=>{const n=Date.now(),s=n-i.current;if(s>=r)i.current=n,t(e);else{const c=r-s,l=window.setTimeout(()=>{i.current=Date.now(),t(e)},c);return()=>{window.clearTimeout(l)}}},[e,r]),o}function z(e){const[r,o]=d(()=>typeof e=="boolean"?e:!!e),t=w(i=>{if(typeof i=="boolean"){o(i);return}o(n=>!n)},[]);return[r,t]}function J(){const[e,r]=d({x:0,y:0}),o=w((...t)=>{if(t.length===1&&typeof t[0]=="object")window.scrollTo(t[0]);else if(t.length===2)window.scrollTo(t[0],t[1]);else throw new Error("Invalid arguments passed to scrollTo. Expected either ScrollToOptions object or x,y coordinates. See https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo")},[]);return I(()=>{const t=()=>{r({x:window.scrollX,y:window.scrollY})};return t(),window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",t)}},[]),{...e,scrollTo:o}}function M(){const[e,r]=d({width:window.innerWidth,height:window.innerHeight});return I(()=>{const o=()=>{r({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),e}function N(e,{threshold:r=0,root:o=null,rootMargin:t="0%",freezeOnceVisible:i=!1}={}){const[n,s]=d({isIntersecting:!1,entry:null});return g(()=>{const c=e?.current;let l;if(c){if(i&&n.isIntersecting)return;const u=m=>{const[f]=m;s({isIntersecting:f.isIntersecting,entry:f})},a=new IntersectionObserver(u,{threshold:r,root:o,rootMargin:t});a.observe(c),l=()=>{a.disconnect()}}return()=>{l&&l()}},[e,r,o,t,i,n.isIntersecting]),n}function R(){return A(e=>typeof window>"u"?()=>{}:(window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}),()=>typeof navigator>"u"?!0:navigator.onLine,()=>!0)}function $(e,r=500,o){const t=h(),i=P(()=>{const n=S(e,r,o),s=(...c)=>n(...c);return s.cancel=()=>{n.cancel()},s.isPending=()=>!!t.current,s.flush=()=>n.flush(),s},[e,r,o]);return g(()=>{t.current=S(e,r,o)},[e,r,o]),g(()=>()=>{t.current&&t.current.cancel()},[]),i}export{H as a,E as b,U as c,W as d,j as e,z as f,J as g,M as h,N as i,R as j,$ as k,D as u};
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";import{useRef as h,useInsertionEffect as C,useCallback as w,useState as d,useId as k,useEffect as g,useLayoutEffect as I,useSyncExternalStore as A,useMemo as P}from"react";import{d as S}from"./useOnClickOutside-DgJxDzLx.mjs";function U(e){return{set:r=>{const o=typeof r=="string"?r:JSON.stringify(r);localStorage.setItem(e,o)},get:()=>{const r=localStorage.getItem(e);if(r)try{return JSON.parse(r)}catch{return r}return null},remove:()=>{localStorage.removeItem(e)}}}function E(e,r=[]){const o=h(()=>{throw new Error("Cannot call an event handler while rendering.")});return C(()=>{o.current=e}),w((...t)=>{var i;return(i=o.current)==null?void 0:i.call(o,...t)},r)}function W(e={}){const{onClose:r,onOpen:o,open:t,id:i}=e,n=E(o),s=E(r),[c,l]=d(e.defaultOpen??!1),u=t??c,a=t!==void 0,m=k(),f=i??`disclosure-${m}`,p=w(()=>{a||l(!1),s?.()},[a,s]),y=w(()=>{a||l(!0),n?.()},[a,n]),b=w(()=>{u?p():y()},[u,y,p]);function O(v={}){return{...v,"aria-expanded":u,"aria-controls":f,onClick(x){var L;(L=v.onClick)==null||L.call(v,x),b()}}}function T(v={}){return{...v,hidden:!u,id:f}}return{open:u,onOpen:y,onClose:p,onToggle:b,isControlled:a,getButtonProps:O,getDisclosureProps:T}}function j(e){return new URLSearchParams(e??window.location.search)}function z(e,r={removeOnUnmount:!1}){const[o,t]=d("loading"),i=h(r);return g(()=>{let n=document.querySelector(`script[src="${e}"]`);const s=n?.getAttribute("data-status");if(s){t(s);return}if(n===null){n=document.createElement("script"),n.src=e,n.async=!0,n.setAttribute("data-status","loading"),document.body.appendChild(n);const c=()=>{n?.setAttribute("data-status","ready"),t("ready"),u()},l=()=>{n?.setAttribute("data-status","error"),t("error"),u()},u=()=>{n?.removeEventListener("load",c),n?.removeEventListener("error",l)};n.addEventListener("load",c),n.addEventListener("error",l);const a=i.current.removeOnUnmount;return()=>{a&&(n?.remove(),u())}}else t("unknown")},[e]),o}function D(e,r=500){const[o,t]=d(e),i=h(Date.now());return g(()=>{const n=Date.now(),s=n-i.current;if(s>=r)i.current=n,t(e);else{const c=r-s,l=window.setTimeout(()=>{i.current=Date.now(),t(e)},c);return()=>{window.clearTimeout(l)}}},[e,r]),o}function H(e){const[r,o]=d(()=>typeof e=="boolean"?e:!!e),t=w(i=>{if(typeof i=="boolean"){o(i);return}o(n=>!n)},[]);return[r,t]}function J(){const[e,r]=d({x:0,y:0}),o=w((...t)=>{if(t.length===1&&typeof t[0]=="object")window.scrollTo(t[0]);else if(t.length===2)window.scrollTo(t[0],t[1]);else throw new Error("Invalid arguments passed to scrollTo. Expected either ScrollToOptions object or x,y coordinates. See https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo")},[]);return I(()=>{const t=()=>{r({x:window.scrollX,y:window.scrollY})};return t(),window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",t)}},[]),{...e,scrollTo:o}}function M(){const[e,r]=d({width:window.innerWidth,height:window.innerHeight});return I(()=>{const o=()=>{r({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),e}function N(e,{threshold:r=0,root:o=null,rootMargin:t="0%",freezeOnceVisible:i=!1}={}){const[n,s]=d({isIntersecting:!1,entry:null});return g(()=>{const c=e?.current;let l;if(c){if(i&&n.isIntersecting)return;const u=m=>{const[f]=m;s({isIntersecting:f.isIntersecting,entry:f})},a=new IntersectionObserver(u,{threshold:r,root:o,rootMargin:t});a.observe(c),l=()=>{a.disconnect()}}return()=>{l&&l()}},[e,r,o,t,i,n.isIntersecting]),n}function R(){return A(e=>typeof window>"u"?()=>{}:(window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}),()=>typeof navigator>"u"?!0:navigator.onLine,()=>!0)}function $(e,r=500,o){const t=h(),i=P(()=>{const n=S(e,r,o),s=(...c)=>n(...c);return s.cancel=()=>{n.cancel()},s.isPending=()=>!!t.current,s.flush=()=>n.flush(),s},[e,r,o]);return g(()=>{t.current=S(e,r,o)},[e,r,o]),g(()=>()=>{t.current&&t.current.cancel()},[]),i}export{W as a,E as b,j as c,z as d,D as e,H as f,J as g,M as h,N as i,R as j,$ as k,U as u};
|