@verifiedinc-public/shared-ui-elements 8.0.1 → 8.11.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
+ "use strict";import*as t from"zod";import{z as i}from"zod";const r=t.string().refine(e=>/\+1\d{3}\d{3}\d{4}/.test(e),"Phone is invalid"),n=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,a=i.string().regex(n),d=i.string().refine(e=>/^•••-••-(\d{4})$/.test(e)||n.test(e),{message:"Invalid SSN"}),g=t.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const s=Date.parse(String(new Date(e)));return!isNaN(s)}return!1},"Date is invalid"),o=e=>t.date().refine(s=>s.getTime()<Date.now(),{message:e}),f=i.string().refine(e=>/^[0-9]{10}$/.test(e),"Invalid NPI");export{d as M,a as S,g as U,o as g,f as n,r as p};
@@ -10,3 +10,4 @@ export * from './color';
10
10
  export * from './address';
11
11
  export * from './makeGoogleFont';
12
12
  export * from './notification';
13
+ export * from './logo';
@@ -1 +1 @@
1
- "use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as r,c as e,s as t,t as m,u as i}from"../shared/uuidColor-CbuBMrIl.mjs";import{c as n,g as p,a as d,p as f,s as l,v as C}from"../shared/phone-cSkbYk4g.mjs";import{masks as T}from"./masks/index.mjs";import{o as g,s as h,a as F}from"../shared/ssn-I4gN8M-_.mjs";import{toCapitalize as y,toSentenceCase as D}from"./string/index.mjs";import{k as P}from"../shared/formatKebabToPretty-Du43TgPC.mjs";import{g as S}from"../shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as U,contrastColor as c,darken as u,getThemeFromPrimaryColor as k,lighten as M}from"./color/index.mjs";import{addressFormatter as Y,fromUSAddress as A,parseCountryCode as N,toUSaddress as _,toUSaddressPretty as b}from"./address/index.mjs";import{D as x,a as E,m as H}from"../shared/makeGoogleFont-pok2oDWs.mjs";import{p as L}from"../shared/notification-sBaCxCY5.mjs";export{x as DEFAULT_FONT_FAMILY,E as DEFAULT_FONT_WEIGHTS,Y as addressFormatter,U as alpha,c as contrastColor,n as countries,u as darken,s as formatDateMMDDYYYY,o as formatDateMMYY,r as formatDateToTimestamp,e as formatExtendedDate,A as fromUSAddress,S as generateKeyFromString,p as getPhoneData,d as getPhoneDataByFieldName,k as getThemeFromPrimaryColor,P as kebabCaseToPretty,M as lighten,H as makeGoogleFontUrl,T as masks,g as omitProperties,N as parseCountryCode,f as parseToPhoneNational,L as prepareNotification,l as sortByCountryName,h as ssnFormatter,F as ssnRegex,t as stringToHashedColor,y as toCapitalize,D as toSentenceCase,_ as toUSaddress,b as toUSaddressPretty,m as toUTCMilliseconds,i as uuidToHashedColor,C as validatePhone,a as wrapPromise};
1
+ "use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as r,c as e,s as t,t as m,u as i}from"../shared/uuidColor-CbuBMrIl.mjs";import{c as p,g as n,a as d,p as f,s as l,v as C}from"../shared/phone-cSkbYk4g.mjs";import{masks as g}from"./masks/index.mjs";import{o as T,s as h,a as F}from"../shared/ssn-I4gN8M-_.mjs";import{toCapitalize as y,toSentenceCase as D}from"./string/index.mjs";import{k as P}from"../shared/formatKebabToPretty-Du43TgPC.mjs";import{g as S}from"../shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as U,contrastColor as c,darken as u,getThemeFromPrimaryColor as k,lighten as M}from"./color/index.mjs";import{addressFormatter as Y,fromUSAddress as A,parseCountryCode as L,toUSaddress as N,toUSaddressPretty as v}from"./address/index.mjs";import{D as _,a as b,m as x}from"../shared/makeGoogleFont-pok2oDWs.mjs";import{p as E}from"../shared/notification-sBaCxCY5.mjs";import{resolveLogo as H}from"./logo/index.mjs";export{_ as DEFAULT_FONT_FAMILY,b as DEFAULT_FONT_WEIGHTS,Y as addressFormatter,U as alpha,c as contrastColor,p as countries,u as darken,s as formatDateMMDDYYYY,o as formatDateMMYY,r as formatDateToTimestamp,e as formatExtendedDate,A as fromUSAddress,S as generateKeyFromString,n as getPhoneData,d as getPhoneDataByFieldName,k as getThemeFromPrimaryColor,P as kebabCaseToPretty,M as lighten,x as makeGoogleFontUrl,g as masks,T as omitProperties,L as parseCountryCode,f as parseToPhoneNational,E as prepareNotification,H as resolveLogo,l as sortByCountryName,h as ssnFormatter,F as ssnRegex,t as stringToHashedColor,y as toCapitalize,D as toSentenceCase,N as toUSaddress,v as toUSaddressPretty,m as toUTCMilliseconds,i as uuidToHashedColor,C as validatePhone,a as wrapPromise};
@@ -0,0 +1,5 @@
1
+ export declare function resolveLogo({ urlString, size, token, }: {
2
+ urlString?: string;
3
+ size?: number;
4
+ token?: string;
5
+ }): string | undefined;
@@ -0,0 +1 @@
1
+ "use strict";function m({urlString:h,size:i=320,token:o}){try{let e=h;if(!e)return;const s="logo.clearbit.com",a="img.logo.dev",n=new URL(e).hostname;if(n!==s&&n!==a)return e;n===s&&(e=e.replace(s,a));const c=new URL(e);let t=c.pathname.substring(1);if(t.startsWith("http://")||t.startsWith("https://"))try{t=new URL(t).hostname}catch{t=t.replace(/^https?:\/\//,"").split("/")[0]}const r=new URL(`https://${a}/${t}`);return c.searchParams.forEach((l,g)=>{r.searchParams.set(g,l)}),r.searchParams.set("size",i.toString()),o&&r.searchParams.set("token",o),r.toString()}catch{return}}export{m as resolveLogo};
@@ -6,3 +6,4 @@ export * from './phone.schema';
6
6
  export * from './ssn.schema';
7
7
  export * from './state.schema';
8
8
  export * from './unix.schema';
9
+ export * from './npi.schema';
@@ -1 +1 @@
1
- "use strict";import{M as a,S as s,U as e,g as m,p as S}from"../shared/date.schema-CmPHY0OU.mjs";import{d as t,e as h,f as c,g as i,s as o}from"../shared/unix.schema-D7g4VIKT.mjs";export{a as MaskedAndUnmaskedSSNSchema,s as SSNSchema,e as USDateSchema,t as descriptionSchema,h as emailSchema,c as fieldSchema,m as getDateSchemaWithPastValidation,i as getUnixSchema,S as phoneSchema,o as stateSchema};
1
+ "use strict";import{M as a,S as s,U as e,g as m,n as S,p as h}from"../shared/npi.schema-BsAQ0yLj.mjs";import{d as t,e as c,f as i,g as n,s as o}from"../shared/unix.schema-D7g4VIKT.mjs";export{a as MaskedAndUnmaskedSSNSchema,s as SSNSchema,e as USDateSchema,t as descriptionSchema,c as emailSchema,i as fieldSchema,m as getDateSchemaWithPastValidation,n as getUnixSchema,S as npiSchema,h as phoneSchema,o as stateSchema};
@@ -0,0 +1,2 @@
1
+ import { z as zod } from 'zod';
2
+ export declare const npiSchema: zod.ZodEffects<zod.ZodString, string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "8.0.1",
3
+ "version": "8.11.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -1 +0,0 @@
1
- "use strict";import*as t from"zod";import{z as i}from"zod";const a=t.string().refine(e=>/\+1\d{3}\d{3}\d{4}/.test(e),"Phone is invalid"),r=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,n=i.string().regex(r),d=i.string().refine(e=>/^•••-••-(\d{4})$/.test(e)||r.test(e),{message:"Invalid SSN"}),g=t.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const s=Date.parse(String(new Date(e)));return!isNaN(s)}return!1},"Date is invalid"),o=e=>t.date().refine(s=>s.getTime()<Date.now(),{message:e});export{d as M,n as S,g as U,o as g,a as p};