@verifiedinc-public/shared-ui-elements 5.0.4 → 5.1.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 +2 -0
- package/dist/components/animation/index.d.ts +1 -0
- package/dist/components/animation/index.mjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/useNavigatorOnline-LJuH4983.mjs +1 -0
- package/dist/shared/useResizeObserver-D434c1uN.mjs +1 -0
- package/package.json +1 -1
- package/dist/shared/useNavigatorOnline-D2MaaBCr.mjs +0 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{C as
|
1
|
+
"use strict";import{C as i,M as n,f as r,a as e,d as m,c as l,b as f,e as h}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 d}from"../../shared/useResizeObserver-D434c1uN.mjs";function M(s){const o=p(null),[,a]=d(o);return t.jsx(u.div,{style:{height:a,transition:"height 75ms ease-out"},children:t.jsx("div",{ref:o,children:s.children})})}export{M as AnimateHeight,i as Counter,n as MotionBox,r as MotionButton,e as MotionStack,m as MotionTableCell,l as MotionTableRow,f as MotionTbody,h as MotionTypography};
|
package/dist/hooks/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{b as s,d as a,a as e,j as u,u as o,
|
1
|
+
"use strict";import{b as s,d as a,a as e,j as u,u as o,k as r,e as i,c as t,f as l,g as m,h as c,i as n}from"../shared/useNavigatorOnline-LJuH4983.mjs";import{u as p,a as f}from"../shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as b,u as C}from"../shared/useOnClickOutside-P5GTcgh8.mjs";import{u as d}from"../shared/useCounter-BV32zXDQ.mjs";import{u as O}from"../shared/useResizeObserver-D434c1uN.mjs";export{s as useCallbackRef,p as useCopyToClipboard,d as useCounter,a as useDebounceValue,e as useDisclosure,u as useIntersectionObserver,o as useLocalStorage,r as useNavigatorOnline,b as useOnClickOutside,f as usePrevious,C as useQRCode,O as useResizeObserver,i as useScript,t as useSearchParams,l as useThrottle,m as useToggle,c as useWindowScroll,n as useWindowSize};
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as e,c as t,l as r,B as o,n as i,m as n,C as m,D as l,f as u,E as c,j as
|
1
|
+
"use strict";import{A as e,c as t,l as r,B as o,n as i,m as n,C as m,D as l,f as u,E as c,j as p,F as d,I as h,b as S,L as g,O as C,h as f,e as k,P,Q as y,R as b,S as B,d as D,k as T,T as v,g as I,a as O,V as R,i as w,o as N,t as L,u as M}from"./shared/index-Cj3wekcx.mjs";import{a as E,b as Y,P as x,S as F}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as z,C as G,i as W,E as A,L as U,j,M as H,g as V,O as q,P as Q,R as $,e as J,d as K,S as X,a as Z,b as _,k as aa,c as sa,f as ea,W as ta,l as ra,o as oa,n as ia,p as na,h as ma,m as la,u as ua,q as ca}from"./shared/SignupBigNumbers-8kKjFq0L.mjs";import{b as pa,d as da,a as ha,j as Sa,u as ga,k as Ca,e as fa,c as ka,f as Pa,g as ya,h as ba,i as Ba}from"./shared/useNavigatorOnline-LJuH4983.mjs";import{u as Da,a as Ta}from"./shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as va,u as Ia}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as Oa}from"./shared/useCounter-BV32zXDQ.mjs";import{u as Ra}from"./shared/useResizeObserver-D434c1uN.mjs";import{b as wa,a as Na,v as La,e as Ma,d as Ea,p as Ya,u as xa,h as Fa,j as za,g as Ga,o as Wa,s as Aa,m as Ua,c as ja,l as Ha,n as Va,q as qa,f as Qa,i as $a,r as Ja,z as Ka,t as Xa,x as Za,k as _a,w as as,y as ss}from"./shared/shadows-Dhd7FrwF.mjs";import{c as es,g as ts,a as rs,p as os,s as is,v as ns}from"./shared/phone-D5XIxT7-.mjs";import{masks as ms}from"./utils/masks/index.mjs";import{toCapitalize as ls,toSentenceCase as us}from"./utils/string/index.mjs";import{k as cs}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{M as ps,S as ds,U as hs,d as Ss,e as gs,f as Cs,g as fs,a as ks,s as Ps}from"./shared/unix.schema-CMYTtXco.mjs";import{p as ys}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as bs}from"notistack";async function Bs(a){try{return[await a,null]}catch(s){return[null,s]}}const Ds=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,z as BigNumber,i as BrandFilterInput,n as Button,m as CredentialRequestsEditor,G as CustomAlertComponent,l as DateInput,u as DateRangeInput,c as EmailInput,W as EmptyChartSection,A as ErrorCodesChart,p as ExactBirthdayBanner,d as FullWidthAlert,h as Image,S as LegalLink,g as LinkButton,U as LoadingChartSection,ps as MaskedAndUnmaskedSSNSchema,j as MetricLastUpdated,H as MonthlySignupsOverviewTable,C as OTPInput,f as OneClickForm,V as OneClickOverTimeChart,q as OneClickPercentageChart,E as PageHeader,Y as PageSectionHeader,x as Paragraph,k as PhoneInput,Q as PieChart,P as PrivacyPolicyNotice,y as QRCodeDisplay,$ as ReasonCodesChart,b as ResendPhoneBanner,J as RiskScoreBarChart,K as RiskScorePieChart,B as SSNInput,ds as SSNSchema,F as SectionHeader,D as SelectInput,X as SeriesChart,Z as SeriesChartLegend,_ as SeriesPercentageChart,aa as SignupBigNumbers,sa as SimpleBarChart,ea as SimpleLegend,bs as SnackbarProvider,T as TestPhoneNumbersBanner,v as TextButton,I as TimezoneInput,O as Typography,hs as USDateSchema,R as VerifiedImage,w as VerifiedIncLogo,ta as When,wa as black,Na as blue,La as colors,es as countries,Ma as darkBlue,Ea as darkGreen,Ya as darkGrey,xa as darkGreyContrast,Fa as darkRed,za as darkYellow,Ss as descriptionSchema,gs as emailSchema,Cs as fieldSchema,ra as formatDateMMDDYYYY,oa as formatDateMMYY,ia as formatDateToTimestamp,na as formatExtendedDate,fs as getDateSchemaWithPastValidation,ts as getPhoneData,rs as getPhoneDataByFieldName,ks as getUnixSchema,Ga as green,Wa as grey,Aa as greyContrast,Ua as infoContrast,cs as kebabCaseToPretty,ja as lightBlue,Ha as lightGreen,Va as lightGrey,qa as lightGreyContrast,Qa as lightRed,$a as lightYellow,ma as mapMonthlySignupsOverviewTableData,la as mapTimeSeriesData,ms as masks,N as omitProperties,os as parseToPhoneNational,ys as phoneSchema,Ja as red,Ka as shadows,is as sortByCountryName,Ds as ssnFormatter,Ps as stateSchema,Xa as textDisabled,Za as theme,ls as toCapitalize,L as toOption,us as toSentenceCase,M as useBrandFilterInput,pa as useCallbackRef,Da as useCopyToClipboard,Oa as useCounter,da as useDebounceValue,ha as useDisclosure,Sa as useIntersectionObserver,ga as useLocalStorage,Ca as useNavigatorOnline,va as useOnClickOutside,Ta as usePrevious,Ia as useQRCode,Ra as useResizeObserver,fa as useScript,ka as useSearchParams,ua as useSnackbar,Pa as useThrottle,ya as useToggle,ba as useWindowScroll,Ba as useWindowSize,ca as uuidToHashedColor,ns as validatePhone,_a as warningContrast,as as white,Bs as wrapPromise,ss as yellow};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{useRef as y,useInsertionEffect as C,useCallback as w,useState as d,useId as x,useEffect as g,useLayoutEffect as I,useSyncExternalStore as A}from"react";function k(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=y(()=>{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 z(e={}){const{onClose:r,onOpen:o,open:t,id:i}=e,n=E(o),s=E(r),[a,l]=d(e.defaultOpen??!1),c=t??a,u=t!==void 0,m=x(),f=i??`disclosure-${m}`,h=w(()=>{u||l(!1),s?.()},[u,s]),p=w(()=>{u||l(!0),n?.()},[u,n]),b=w(()=>{c?h():p()},[c,p,h]);function S(v={}){return{...v,"aria-expanded":c,"aria-controls":f,onClick(O){var L;(L=v.onClick)==null||L.call(v,O),b()}}}function T(v={}){return{...v,hidden:!c,id:f}}return{open:c,onOpen:p,onClose:h,onToggle:b,isControlled:u,getButtonProps:S,getDisclosureProps:T}}function D(e){return new URLSearchParams(e??window.location.search)}function P(e,r=250){const[o,t]=d(e);return g(()=>{const i=setTimeout(()=>{t(e)},r);return()=>{clearTimeout(i)}},[e,r]),o}function W(e,r={removeOnUnmount:!1}){const[o,t]=d("loading"),i=y(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 a=()=>{n?.setAttribute("data-status","ready"),t("ready"),c()},l=()=>{n?.setAttribute("data-status","error"),t("error"),c()},c=()=>{n?.removeEventListener("load",a),n?.removeEventListener("error",l)};n.addEventListener("load",a),n.addEventListener("error",l);const u=i.current.removeOnUnmount;return()=>{u&&(n?.remove(),c())}}else t("unknown")},[e]),o}function j(e,r=500){const[o,t]=d(e),i=y(Date.now());return g(()=>{const n=Date.now(),s=n-i.current;if(s>=r)i.current=n,t(e);else{const a=r-s,l=window.setTimeout(()=>{i.current=Date.now(),t(e)},a);return()=>{window.clearTimeout(l)}}},[e,r]),o}function U(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 H(){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 J(){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 a=e?.current;let l;if(a){if(i&&n.isIntersecting)return;const c=m=>{const[f]=m;s({isIntersecting:f.isIntersecting,entry:f})},u=new IntersectionObserver(c,{threshold:r,root:o,rootMargin:t});u.observe(a),l=()=>{u.disconnect()}}return()=>{l&&l()}},[e,r,o,t,i,n.isIntersecting]),n}function $(){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)}export{z as a,E as b,D as c,P as d,W as e,j as f,U as g,H as h,J as i,N as j,$ as k,k as u};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{useRef as i,useSyncExternalStore as c}from"react";function s(n){const e=i(["auto","auto"]);return c(t=>{if(typeof window>"u"||typeof ResizeObserver>"u")return()=>{};if(!n.current)return()=>{};const r=new ResizeObserver(t);return r.observe(n.current),()=>{r.disconnect()}},()=>{var t;if(typeof window>"u")return e.current;const r=(t=n.current)==null?void 0:t.getBoundingClientRect(),u=r?.width??"auto",o=r?.height??"auto";return(e.current[0]!==u||e.current[1]!==o)&&(e.current=[u,o]),e.current},()=>e.current)}export{s as u};
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";import{useRef as g,useInsertionEffect as x,useCallback as w,useState as d,useId as z,useEffect as h,useLayoutEffect as I,useSyncExternalStore as S}from"react";function A(e){return{set:t=>{const o=typeof t=="string"?t:JSON.stringify(t);localStorage.setItem(e,o)},get:()=>{const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return t}return null},remove:()=>{localStorage.removeItem(e)}}}function E(e,t=[]){const o=g(()=>{throw new Error("Cannot call an event handler while rendering.")});return x(()=>{o.current=e}),w((...n)=>{var i;return(i=o.current)==null?void 0:i.call(o,...n)},t)}function R(e={}){const{onClose:t,onOpen:o,open:n,id:i}=e,r=E(o),s=E(t),[a,u]=d(e.defaultOpen??!1),c=n??a,l=n!==void 0,m=z(),f=i??`disclosure-${m}`,p=w(()=>{l||u(!1),s?.()},[l,s]),y=w(()=>{l||u(!0),r?.()},[l,r]),b=w(()=>{c?p():y()},[c,y,p]);function O(v={}){return{...v,"aria-expanded":c,"aria-controls":f,onClick(C){var L;(L=v.onClick)==null||L.call(v,C),b()}}}function T(v={}){return{...v,hidden:!c,id:f}}return{open:c,onOpen:y,onClose:p,onToggle:b,isControlled:l,getButtonProps:O,getDisclosureProps:T}}function k(e){return new URLSearchParams(e??window.location.search)}function D(e,t=250){const[o,n]=d(e);return h(()=>{const i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),o}function P(e,t={removeOnUnmount:!1}){const[o,n]=d("loading"),i=g(t);return h(()=>{let r=document.querySelector(`script[src="${e}"]`);const s=r?.getAttribute("data-status");if(s){n(s);return}if(r===null){r=document.createElement("script"),r.src=e,r.async=!0,r.setAttribute("data-status","loading"),document.body.appendChild(r);const a=()=>{r?.setAttribute("data-status","ready"),n("ready"),c()},u=()=>{r?.setAttribute("data-status","error"),n("error"),c()},c=()=>{r?.removeEventListener("load",a),r?.removeEventListener("error",u)};r.addEventListener("load",a),r.addEventListener("error",u);const l=i.current.removeOnUnmount;return()=>{l&&(r?.remove(),c())}}else n("unknown")},[e]),o}function U(e,t=500){const[o,n]=d(e),i=g(Date.now());return h(()=>{const r=Date.now(),s=r-i.current;if(s>=t)i.current=r,n(e);else{const a=t-s,u=window.setTimeout(()=>{i.current=Date.now(),n(e)},a);return()=>{window.clearTimeout(u)}}},[e,t]),o}function W(e){const[t,o]=d(()=>typeof e=="boolean"?e:!!e),n=w(i=>{if(typeof i=="boolean"){o(i);return}o(r=>!r)},[]);return[t,n]}function j(){const[e,t]=d({x:0,y:0}),o=w((...n)=>{if(n.length===1&&typeof n[0]=="object")window.scrollTo(n[0]);else if(n.length===2)window.scrollTo(n[0],n[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 n=()=>{t({x:window.scrollX,y:window.scrollY})};return n(),window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}},[]),{...e,scrollTo:o}}function B(){const[e,t]=d({width:window.innerWidth,height:window.innerHeight});return I(()=>{const o=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),e}function H(e,{threshold:t=0,root:o=null,rootMargin:n="0%",freezeOnceVisible:i=!1}={}){const[r,s]=d({isIntersecting:!1,entry:null});return h(()=>{const a=e?.current;let u;if(a){if(i&&r.isIntersecting)return;const c=m=>{const[f]=m;s({isIntersecting:f.isIntersecting,entry:f})},l=new IntersectionObserver(c,{threshold:t,root:o,rootMargin:n});l.observe(a),u=()=>{l.disconnect()}}return()=>{u&&u()}},[e,t,o,n,i,r.isIntersecting]),r}function J(e){const t=g(["auto","auto"]);return S(o=>{if(typeof window>"u"||typeof ResizeObserver>"u")return()=>{};if(!e.current)return()=>{};const n=new ResizeObserver(o);return n.observe(e.current),()=>{n.disconnect()}},()=>{var o;if(typeof window>"u")return t.current;const n=(o=e.current)==null?void 0:o.getBoundingClientRect(),i=n?.width??"auto",r=n?.height??"auto";return(t.current[0]!==i||t.current[1]!==r)&&(t.current=[i,r]),t.current},()=>t.current)}function N(){return S(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)}export{R as a,E as b,k as c,D as d,P as e,U as f,W as g,j as h,B as i,H as j,J as k,N as l,A as u};
|