@verifiedinc-public/shared-ui-elements 6.4.1 → 6.5.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/form/AddressInput/autofill.hook.d.ts +10 -0
- package/dist/components/form/AddressInput/context.d.ts +14 -0
- package/dist/components/form/AddressInput/hook.d.ts +22 -0
- package/dist/components/form/AddressInput/index.d.ts +29 -0
- package/dist/components/form/AddressInput/types.d.ts +25 -0
- package/dist/components/form/AddressInput/utils.d.ts +6 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/ContentWithLoader-C6e2MTxG.mjs +155 -0
- package/dist/shared/toSentenceCase-C6ZGgmg7.mjs +1 -0
- package/dist/utils/address/index.mjs +4 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/string/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/shared/ContentWithLoader-BVi0FJOo.mjs +0 -158
- /package/dist/{components/form/OneClickForm/utils/addressFormatter.d.ts → utils/address/index.d.ts} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";function e(t){return`${t.charAt(0).toUpperCase()}${t.slice(1).toLowerCase()}`}export{e as t};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
"use strict";const p={US:"United States"},u=e=>p[e]||e,h=e=>{const t=e.split(","),r=t.slice(0,t.length-2).join(",").trim(),s=t[t.length-2].trim(),o=t[t.length-1].trim(),[n,...l]=o.split(" "),i=l.join(" "),[c,m]=n.split("-"),d=u(c);return`${r}
|
2
|
+
${s}, ${m}, ${i}
|
3
|
+
${d}`},a=e=>{const{line1:t,line2:r,city:s,state:o,zipCode:n,country:l}=e,i=[];t!=null&&t.trim()&&i.push(t.trim()),r!=null&&r.trim()&&i.push(r.trim()),s!=null&&s.trim()&&i.push(s.trim()),o!=null&&o.trim()&&i.push(o.trim()),l!=null&&l.trim()&&i.push(l.trim());const c=i.join(", ");return n!=null&&n.trim()?c.concat(" ",n.trim()):c},f=e=>{const t=a(e),r=t.indexOf(", "),s=t.indexOf(", ",r+2);return e.line2&&r!==-1&&s!==-1?t.substring(0,s)+`
|
4
|
+
`+t.substring(s+2):t},g=e=>{if(!e)return null;const t={country:"US"};try{const r=e.split(",").map(n=>n.trim());if(!r[0]||(t.line1=r[0],!r[1])||(t.city=r[1],!r[2]))return t;const s=r[2],o=s.match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);if(o)t.state=o[1],t.zipCode=o[2];else{const n=/^[A-Z]{2}$/;if(n.test(r[2]))t.state=r[2],r.length>3&&(t.zipCode=r[r.length-1]);else{const l=s.match(/(\d{5}(?:-\d{4})?)$/);if(l){t.zipCode=l[0];const i=s.replace(l[0],"").trim();n.test(i)&&(t.state=i)}}}return t}catch{return t}};export{h as addressFormatter,g as fromUSAddress,u as parseCountryCode,a as toUSaddress,f as toUSaddressPretty};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as
|
1
|
+
"use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as r,c as t,t as e,u as m}from"../shared/uuidColor-DxkgIjlu.mjs";import{c as i,g as d,a as p,p as n,s as f,v as l}from"../shared/phone-DCga5nUC.mjs";import{masks as C}from"./masks/index.mjs";import{o as T}from"../shared/omitProperty-CgN5EPAy.mjs";import{D as P,a as D,m as F,s as h}from"../shared/makeGoogleFont-DJFPTTVt.mjs";import{toCapitalize as y}from"./string/index.mjs";import{t as U}from"../shared/toSentenceCase-C6ZGgmg7.mjs";import{k as g}from"../shared/formatKebabToPretty-Du43TgPC.mjs";import{alpha as S,contrastColor as c,darken as k,getThemeFromPrimaryColor as u,lighten as Y}from"./color/index.mjs";import{addressFormatter as M,fromUSAddress as A,parseCountryCode as E,toUSaddress as N,toUSaddressPretty as b}from"./address/index.mjs";export{P as DEFAULT_FONT_FAMILY,D as DEFAULT_FONT_WEIGHTS,M as addressFormatter,S as alpha,c as contrastColor,i as countries,k as darken,s as formatDateMMDDYYYY,o as formatDateMMYY,r as formatDateToTimestamp,t as formatExtendedDate,A as fromUSAddress,d as getPhoneData,p as getPhoneDataByFieldName,u as getThemeFromPrimaryColor,g as kebabCaseToPretty,Y as lighten,F as makeGoogleFontUrl,C as masks,T as omitProperties,E as parseCountryCode,n as parseToPhoneNational,f as sortByCountryName,h as ssnFormatter,y as toCapitalize,U as toSentenceCase,N as toUSaddress,b as toUSaddressPretty,e as toUTCMilliseconds,m as uuidToHashedColor,l as validatePhone,a as wrapPromise};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{k as
|
1
|
+
"use strict";import{t as e}from"../../shared/toSentenceCase-C6ZGgmg7.mjs";import{k as o}from"../../shared/formatKebabToPretty-Du43TgPC.mjs";function r(a){return a.split(" ").map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1).toLowerCase()}`).join(" ")}export{o as kebabCaseToPretty,r as toCapitalize,e as toSentenceCase};
|