@verifiedinc-public/shared-ui-elements 1.3.2 → 2.0.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/README.md +4 -24
- package/dist/components/index.mjs +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/hooks/useSearchParams.d.ts +5 -0
- package/dist/index.mjs +1 -0
- package/dist/shared/index-CTvz4BbG.mjs +105 -0
- package/dist/shared/phone.schema-XBbyizhq.mjs +1 -0
- package/dist/shared/shadows-fgmuXym6.mjs +1 -0
- package/dist/shared/unix.schema-CMYTtXco.mjs +1 -0
- package/dist/shared/useQRCode-DXiPIj-D.mjs +1 -0
- package/dist/shared/useSearchParams-CW9y02Ym.mjs +1 -0
- package/dist/styles/index.mjs +1 -0
- package/dist/utils/masks/index.mjs +1 -0
- package/dist/utils/string/index.mjs +1 -0
- package/dist/validations/index.mjs +1 -0
- package/package.json +29 -8
- package/dist/shared-ui-elements.mjs +0 -105
- package/src/components/Alert/Alert.tsx +0 -8
- package/src/components/Alert/FullWidthAlert.tsx +0 -27
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Backdrop/index.tsx +0 -34
- package/src/components/Banners/Banner.tsx +0 -42
- package/src/components/Banners/ExactBirthdayBanner.tsx +0 -18
- package/src/components/Banners/ResendPhoneBanner.tsx +0 -55
- package/src/components/Banners/TestPhoneNumbersBanner.tsx +0 -25
- package/src/components/Banners/index.tsx +0 -4
- package/src/components/Button/index.tsx +0 -8
- package/src/components/CredentialRequestsEditor/CredentialRequestsEditor.context.tsx +0 -98
- package/src/components/CredentialRequestsEditor/components/CredentialRequestsField.tsx +0 -103
- package/src/components/CredentialRequestsEditor/components/DataFieldAccordion.tsx +0 -337
- package/src/components/CredentialRequestsEditor/components/DataFieldDeleteModal.tsx +0 -64
- package/src/components/CredentialRequestsEditor/components/DataFieldDescription.tsx +0 -68
- package/src/components/CredentialRequestsEditor/components/DataFieldMandatory.tsx +0 -84
- package/src/components/CredentialRequestsEditor/components/DataFieldMulti.tsx +0 -74
- package/src/components/CredentialRequestsEditor/components/DataFieldOptionType.tsx +0 -84
- package/src/components/CredentialRequestsEditor/components/DataFieldSection.tsx +0 -48
- package/src/components/CredentialRequestsEditor/components/DataFieldUserInput.tsx +0 -71
- package/src/components/CredentialRequestsEditor/components/RadioOption.tsx +0 -89
- package/src/components/CredentialRequestsEditor/contexts/CredentialRequestFieldContext.tsx +0 -36
- package/src/components/CredentialRequestsEditor/index.tsx +0 -15
- package/src/components/CredentialRequestsEditor/types/compositeCredentialSchema.ts +0 -1
- package/src/components/CredentialRequestsEditor/types/credentialSchemasDto.ts +0 -3
- package/src/components/CredentialRequestsEditor/types/form.ts +0 -28
- package/src/components/CredentialRequestsEditor/types/mandatoryEnum.ts +0 -5
- package/src/components/CredentialRequestsEditor/utils/buildDataFieldValue.ts +0 -65
- package/src/components/CredentialRequestsEditor/utils/prettyField.ts +0 -16
- package/src/components/Image.tsx +0 -10
- package/src/components/QRCodeDisplay/index.tsx +0 -50
- package/src/components/RequiredLabel/index.tsx +0 -15
- package/src/components/Snackbar/index.tsx +0 -156
- package/src/components/TextField/index.tsx +0 -8
- package/src/components/Tip/index.tsx +0 -18
- package/src/components/Typography/index.tsx +0 -8
- package/src/components/When.tsx +0 -28
- package/src/components/form/CountrySelector.tsx +0 -96
- package/src/components/form/DataFieldClearAdornment.tsx +0 -28
- package/src/components/form/DateInput.tsx +0 -78
- package/src/components/form/DefaultInput.tsx +0 -26
- package/src/components/form/InputMask.tsx +0 -41
- package/src/components/form/OTPInput.tsx +0 -254
- package/src/components/form/PhoneInput.tsx +0 -152
- package/src/components/form/SSNInput.tsx +0 -99
- package/src/components/form/SelectInput.tsx +0 -101
- package/src/components/form/TextMaskCustom.tsx +0 -48
- package/src/components/form/index.ts +0 -5
- package/src/components/index.ts +0 -13
- package/src/components/terms/AcceptTermsNotice.tsx +0 -27
- package/src/components/terms/LegalLink.tsx +0 -22
- package/src/components/verified/VerifiedImage.tsx +0 -272
- package/src/components/verified/VerifiedIncLogo.tsx +0 -11
- package/src/components/verified/index.ts +0 -2
- package/src/hooks/index.ts +0 -5
- package/src/hooks/useCallbackRef.ts +0 -22
- package/src/hooks/useCopyToClipboard.ts +0 -76
- package/src/hooks/useDisclosure.ts +0 -96
- package/src/hooks/useLocalStorage.ts +0 -24
- package/src/hooks/usePrevious.ts +0 -17
- package/src/hooks/useQRCode.ts +0 -62
- package/src/index.ts +0 -13
- package/src/stories/components/Alert.stories.tsx +0 -41
- package/src/stories/components/Button.stories.ts +0 -49
- package/src/stories/components/CredentialRequestsEditor.stories.tsx +0 -98
- package/src/stories/components/QRCodeDisplay.stories.tsx +0 -60
- package/src/stories/components/TextField.stories.ts +0 -59
- package/src/stories/components/Typography.stories.ts +0 -140
- package/src/stories/components/VerifiedImage.stories.tsx +0 -32
- package/src/stories/components/form/DateInput.stories.ts +0 -36
- package/src/stories/components/form/OTPInput.stories.tsx +0 -90
- package/src/stories/components/form/PhoneInput.stories.tsx +0 -34
- package/src/stories/components/form/SSNInput.stories.ts +0 -30
- package/src/stories/components/form/SelectInput.stories.ts +0 -39
- package/src/stories/hooks/useCopyToClipboard.stories.tsx +0 -45
- package/src/styles/colors.ts +0 -60
- package/src/styles/index.ts +0 -3
- package/src/styles/shadows.ts +0 -6
- package/src/styles/theme.ts +0 -257
- package/src/styles/typography.ts +0 -86
- package/src/utils/date.ts +0 -32
- package/src/utils/index.ts +0 -6
- package/src/utils/masks/index.ts +0 -6
- package/src/utils/omitProperty.ts +0 -19
- package/src/utils/phone.ts +0 -76
- package/src/utils/ssn.ts +0 -8
- package/src/utils/string/index.ts +0 -2
- package/src/utils/string/toCapitalize.ts +0 -13
- package/src/utils/string/toSentenceCase.ts +0 -7
- package/src/utils/wrapPromise.ts +0 -19
- package/src/validations/date.schema.ts +0 -18
- package/src/validations/description.schema.ts +0 -5
- package/src/validations/email.schema.ts +0 -3
- package/src/validations/field.schema.ts +0 -3
- package/src/validations/index.ts +0 -8
- package/src/validations/phone.schema.ts +0 -6
- package/src/validations/ssn.schema.ts +0 -24
- package/src/validations/state.schema.ts +0 -3
- package/src/validations/unix.schema.ts +0 -11
package/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# shared-ui-elements
|
2
2
|
|
3
|
-
|
3
|
+

|
4
|
+

|
5
|
+
|
6
|
+
> Collection of reusable components.
|
4
7
|
|
5
8
|
## About
|
6
9
|
|
@@ -47,26 +50,3 @@ import { SomeComponent } from '@verifiedinc/shared-ui-elements';
|
|
47
50
|
```
|
48
51
|
|
49
52
|
This setup is efficient and works seamlessly with frameworks like Next.js, Vite, and other ESM-compatible environments.
|
50
|
-
|
51
|
-
### Using with Remix
|
52
|
-
|
53
|
-
Some frontend frameworks, such as Remix, have partial compatibility with ESM-only packages. To address this, the package also exposes the source files directly. This approach ensures that the Remix transpiler can properly bundle the package.
|
54
|
-
|
55
|
-
To utilize the source files in Remix, reference them directly in your import statements and adjust your `remix.config.js` as follows:
|
56
|
-
|
57
|
-
```typescript
|
58
|
-
import { SomeComponent } from '@verifiedinc/shared-ui-elements/src';
|
59
|
-
```
|
60
|
-
|
61
|
-
```js
|
62
|
-
// remix.config.js
|
63
|
-
export default {
|
64
|
-
serverDependenciesToBundle: [/@verifiedinc\/shared-ui-elements/],
|
65
|
-
};
|
66
|
-
```
|
67
|
-
|
68
|
-
### Why Two Exports?
|
69
|
-
|
70
|
-
The default `'./'` export is optimized for environments that support ESM, providing better performance and tree-shaking. However, by also exposing the raw source files, we ensure compatibility with tools like Remix, where ESM-only packages might not work seamlessly without additional configuration.
|
71
|
-
|
72
|
-
Choose the export method that best suits your project setup.
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{A as a,a as s,g as e,e as r,B as n,C as t,d as o,D as i,E as p,F as d,I as u,O as c,P as m,Q as l,R as B,S as I,b as h,f as P,T as S,V as b,c as g,W as A,u as C}from"../shared/index-CTvz4BbG.mjs";import{SnackbarProvider as T}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,n as Button,t as CredentialRequestsEditor,o as CustomAlertComponent,i as DateInput,p as ExactBirthdayBanner,d as FullWidthAlert,u as Image,c as OTPInput,m as PhoneInput,l as QRCodeDisplay,B as ResendPhoneBanner,I as SSNInput,h as SelectInput,T as SnackbarProvider,P as TestPhoneNumbersBanner,S as Typography,b as VerifiedImage,g as VerifiedIncLogo,A as When,C as useSnackbar};
|
package/dist/hooks/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{c as a,a as s,b as e,u as o,d as r}from"../shared/useSearchParams-CW9y02Ym.mjs";import{u}from"../shared/useQRCode-DXiPIj-D.mjs";export{a as useCallbackRef,s as useCopyToClipboard,e as useDisclosure,o as useLocalStorage,u as useQRCode,r as useSearchParams};
|
package/dist/index.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";import{A as n,a as i,g as m,e as l,B as d,C as c,d as u,D as h,E as p,F as g,I as S,O as f,P as y,Q as D,R as k,S as C,b as P,f as w,T as b,V as B,c as T,W as I,h as N,i as R,j as Y,o as A,p as F,s as G,u as x,v as M}from"./shared/index-CTvz4BbG.mjs";import{c as U,a as v,b as V,u as W,d as j}from"./shared/useSearchParams-CW9y02Ym.mjs";import{u as E}from"./shared/useQRCode-DXiPIj-D.mjs";import{b as q,a as L,v as O,e as Q,d as z,p as H,u as J,h as X,j as Z,g as _,o as $,s as K,m as aa,c as sa,l as ea,n as ta,q as ra,f as oa,i as na,r as ia,z as ma,t as la,x as da,k as ca,w as ua,y as ha}from"./shared/shadows-fgmuXym6.mjs";import{masks as pa}from"./utils/masks/index.mjs";import{M as ga,S as Sa,U as fa,d as ya,e as Da,f as ka,g as Ca,a as Pa,s as wa}from"./shared/unix.schema-CMYTtXco.mjs";import{p as ba}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Ba}from"notistack";async function Ta(s){try{return[await s,null]}catch(a){return[null,a]}}const Ia=s=>{let a=new Date(Number(s));if(!s){const e=new Date;a=new Date(e.getFullYear(),e.getMonth(),e.getDate())}const t=String(a.getDate()).padStart(2,"0"),r=String(a.getMonth()+1).padStart(2,"0"),o=a.getFullYear();return[r,t,o].join("/")},Na=s=>{const a=new Date(s);return a.setUTCHours(12),String(+a)},Ra=s=>s.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{n as AcceptTermsNotice,i as Alert,m as Backdrop,l as Banner,d as Button,c as CredentialRequestsEditor,u as CustomAlertComponent,h as DateInput,p as ExactBirthdayBanner,g as FullWidthAlert,S as Image,ga as MaskedAndUnmaskedSSNSchema,f as OTPInput,y as PhoneInput,D as QRCodeDisplay,k as ResendPhoneBanner,C as SSNInput,Sa as SSNSchema,P as SelectInput,Ba as SnackbarProvider,w as TestPhoneNumbersBanner,b as Typography,fa as USDateSchema,B as VerifiedImage,T as VerifiedIncLogo,I as When,q as black,L as blue,O as colors,N as countries,Q as darkBlue,z as darkGreen,H as darkGrey,J as darkGreyContrast,X as darkRed,Z as darkYellow,ya as descriptionSchema,Da as emailSchema,ka as fieldSchema,Ia as formatDateMMDDYYYY,Na as formatDateToTimestamp,Ca as getDateSchemaWithPastValidation,R as getPhoneData,Y as getPhoneDataByFieldName,Pa as getUnixSchema,_ as green,$ as grey,K as greyContrast,aa as infoContrast,sa as lightBlue,ea as lightGreen,ta as lightGrey,ra as lightGreyContrast,oa as lightRed,na as lightYellow,pa as masks,A as omitProperties,F as parseToPhoneNational,ba as phoneSchema,ia as red,ma as shadows,G as sortByCountryName,Ra as ssnFormatter,wa as stateSchema,la as textDisabled,da as theme,U as useCallbackRef,v as useCopyToClipboard,V as useDisclosure,W as useLocalStorage,E as useQRCode,j as useSearchParams,x as useSnackbar,M as validatePhone,ca as warningContrast,ua as white,Ta as wrapPromise,ha as yellow};
|