@verifiedinc-public/shared-ui-elements 6.8.2 → 7.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.
Files changed (89) hide show
  1. package/dist/components/chart/index.mjs +1 -1
  2. package/dist/components/form/AddressInput/hook.d.ts +1 -3
  3. package/dist/components/form/AddressInput/index.d.ts +1 -1
  4. package/dist/components/form/NewOneClickForm/core/declarations.d.ts +4 -0
  5. package/dist/components/form/NewOneClickForm/core/fields/address.d.ts +185 -0
  6. package/dist/components/form/NewOneClickForm/core/fields/birthDate.d.ts +21 -0
  7. package/dist/components/form/NewOneClickForm/core/fields/constants.d.ts +6 -0
  8. package/dist/components/form/NewOneClickForm/core/fields/driversLicense.d.ts +291 -0
  9. package/dist/components/form/NewOneClickForm/core/fields/fullName.d.ts +94 -0
  10. package/dist/components/form/NewOneClickForm/core/fields/index.d.ts +563 -0
  11. package/dist/components/form/NewOneClickForm/core/fields/phone.d.ts +20 -0
  12. package/dist/components/form/NewOneClickForm/core/fields/sex.d.ts +29 -0
  13. package/dist/components/form/NewOneClickForm/core/fields/ssn.d.ts +21 -0
  14. package/dist/components/form/NewOneClickForm/core/fields/types.d.ts +62 -0
  15. package/dist/components/form/NewOneClickForm/core/form/form.d.ts +9 -0
  16. package/dist/components/form/NewOneClickForm/core/form/formBuilder.d.ts +11 -0
  17. package/dist/components/form/NewOneClickForm/core/form/formField.d.ts +50 -0
  18. package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.d.ts +14 -0
  19. package/dist/components/form/NewOneClickForm/core/form/index.d.ts +4 -0
  20. package/dist/components/form/NewOneClickForm/core/form/utils.d.ts +7 -0
  21. package/dist/components/form/NewOneClickForm/core/formats/address.format.d.ts +8 -0
  22. package/dist/components/form/NewOneClickForm/core/formats/date.format.d.ts +1 -0
  23. package/dist/components/form/NewOneClickForm/core/formats/index.d.ts +4 -0
  24. package/dist/components/form/NewOneClickForm/core/formats/ssn.format.d.ts +1 -0
  25. package/dist/components/form/NewOneClickForm/core/formats/state.format.d.ts +1 -0
  26. package/dist/components/form/NewOneClickForm/core/mappers/create-patch.map.d.ts +6 -0
  27. package/dist/components/form/NewOneClickForm/core/mappers/index.d.ts +2 -0
  28. package/dist/components/form/NewOneClickForm/core/mappers/share.map.d.ts +4 -0
  29. package/dist/components/form/NewOneClickForm/core/shared/us-states.d.ts +73 -0
  30. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.d.ts +37 -0
  31. package/dist/components/form/NewOneClickForm/core/validations/address/city.schema.d.ts +7 -0
  32. package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.d.ts +7 -0
  33. package/dist/components/form/NewOneClickForm/core/validations/address/index.d.ts +7 -0
  34. package/dist/components/form/NewOneClickForm/core/validations/address/line1.schema.d.ts +7 -0
  35. package/dist/components/form/NewOneClickForm/core/validations/address/line2.schema.d.ts +6 -0
  36. package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.d.ts +7 -0
  37. package/dist/components/form/NewOneClickForm/core/validations/address/zipcode.schema.d.ts +7 -0
  38. package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.d.ts +69 -0
  39. package/dist/components/form/NewOneClickForm/core/validations/driversLicense/index.d.ts +1 -0
  40. package/dist/components/form/NewOneClickForm/core/validations/index.d.ts +4 -0
  41. package/dist/components/form/NewOneClickForm/core/validations/name/first.schema.d.ts +6 -0
  42. package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.d.ts +14 -0
  43. package/dist/components/form/NewOneClickForm/core/validations/name/index.d.ts +4 -0
  44. package/dist/components/form/NewOneClickForm/core/validations/name/last.schema.d.ts +6 -0
  45. package/dist/components/form/NewOneClickForm/core/validations/name/middle.schema.d.ts +6 -0
  46. package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.d.ts +2 -0
  47. package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.d.ts +6 -0
  48. package/dist/components/form/NewOneClickForm/core/validations/other/documentNumber.schema.d.ts +6 -0
  49. package/dist/components/form/NewOneClickForm/core/validations/other/index.d.ts +6 -0
  50. package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.d.ts +6 -0
  51. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.d.ts +19 -0
  52. package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.d.ts +6 -0
  53. package/dist/components/form/NewOneClickForm/index.d.ts +3 -0
  54. package/dist/components/form/NewOneClickForm/react/core/field.hook.d.ts +83 -0
  55. package/dist/components/form/NewOneClickForm/react/core/form.context.d.ts +25 -0
  56. package/dist/components/form/NewOneClickForm/react/index.d.ts +3 -0
  57. package/dist/components/form/NewOneClickForm/react/ui/fields/input/address.field.d.ts +3 -0
  58. package/dist/components/form/NewOneClickForm/react/ui/fields/input/clear-field-adornment.d.ts +8 -0
  59. package/dist/components/form/NewOneClickForm/react/ui/fields/input/date.field.d.ts +3 -0
  60. package/dist/components/form/NewOneClickForm/react/ui/fields/input/field.d.ts +1 -0
  61. package/dist/components/form/NewOneClickForm/react/ui/fields/input/label.d.ts +3 -0
  62. package/dist/components/form/NewOneClickForm/react/ui/fields/input/select.field.d.ts +3 -0
  63. package/dist/components/form/NewOneClickForm/react/ui/fields/input/ssn.field.d.ts +3 -0
  64. package/dist/components/form/NewOneClickForm/react/ui/fields/input/text.field.d.ts +3 -0
  65. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/field.d.ts +1 -0
  66. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/multi.field.d.ts +3 -0
  67. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/single.field.d.ts +3 -0
  68. package/dist/components/form/NewOneClickForm/react/ui/fields/shared.d.ts +17 -0
  69. package/dist/components/form/NewOneClickForm/react/ui/fields/style.d.ts +28 -0
  70. package/dist/components/form/NewOneClickForm/react/ui/form-content.d.ts +9 -0
  71. package/dist/components/form/NewOneClickForm/react/ui/form.context.d.ts +29 -0
  72. package/dist/components/form/NewOneClickForm/react/ui/form.d.ts +17 -0
  73. package/dist/components/form/NewOneClickForm/react/ui/index.d.ts +1 -0
  74. package/dist/components/form/NewOneClickForm/types.d.ts +14 -0
  75. package/dist/components/index.mjs +1 -1
  76. package/dist/index.mjs +1 -1
  77. package/dist/shared/ContentWithLoader-DZt02ZR9.mjs +155 -0
  78. package/dist/shared/{SignupBigNumbers-Bfd44o0C.mjs → SignupBigNumbers-D7VQsFhd.mjs} +1 -1
  79. package/dist/shared/makeGoogleFont-Dj4rOqZX.mjs +1 -0
  80. package/dist/shared/{omitProperty-CgN5EPAy.mjs → omitProperty-Dw6AqKH-.mjs} +1 -1
  81. package/dist/shared/uuidColor-IahzMgLw.mjs +20 -0
  82. package/dist/utils/index.mjs +1 -1
  83. package/dist/utils/ssn.d.ts +1 -0
  84. package/dist/utils/string/index.mjs +1 -1
  85. package/package.json +2 -2
  86. package/dist/shared/ContentWithLoader-DRXoEKwC.mjs +0 -155
  87. package/dist/shared/makeGoogleFont-DJFPTTVt.mjs +0 -1
  88. package/dist/shared/toSentenceCase-C6ZGgmg7.mjs +0 -1
  89. package/dist/shared/uuidColor-DxkgIjlu.mjs +0 -20
@@ -0,0 +1,62 @@
1
+ import { z } from 'zod';
2
+ export interface TextFieldCharacteristics {
3
+ inputType: 'text';
4
+ label: string;
5
+ placeholder?: string;
6
+ }
7
+ export interface SelectFieldCharacteristics {
8
+ inputType: 'select';
9
+ label: string;
10
+ options: ReadonlyArray<{
11
+ label: string;
12
+ value: string;
13
+ }>;
14
+ }
15
+ export interface CompositeFieldCharacteristics {
16
+ inputType: 'composite';
17
+ label: string;
18
+ defaultOrder: readonly string[];
19
+ }
20
+ export interface DateFieldCharacteristics {
21
+ inputType: 'date';
22
+ label: string;
23
+ placeholder?: string;
24
+ }
25
+ export type FieldCharacteristics = TextFieldCharacteristics | SelectFieldCharacteristics | CompositeFieldCharacteristics | DateFieldCharacteristics;
26
+ export interface BaseFieldDefinition<TKey extends string, TCharacteristics extends FieldCharacteristics = FieldCharacteristics> {
27
+ key: TKey;
28
+ characteristics: TCharacteristics;
29
+ zodSchema: z.ZodTypeAny;
30
+ format?: (value: any) => string | null;
31
+ }
32
+ export interface TextFieldDefinition<TKey extends string> extends BaseFieldDefinition<TKey, TextFieldCharacteristics> {
33
+ }
34
+ export interface SelectFieldDefinition<TKey extends string> extends BaseFieldDefinition<TKey, SelectFieldCharacteristics> {
35
+ }
36
+ export interface CompositeFieldDefinition<TKey extends string> extends BaseFieldDefinition<TKey, CompositeFieldCharacteristics> {
37
+ children: Record<string, BaseFieldDefinition<string>>;
38
+ }
39
+ export interface DateFieldDefinition<TKey extends string> extends BaseFieldDefinition<TKey, DateFieldCharacteristics> {
40
+ }
41
+ export type ExtractedFieldValueType<T> = T extends {
42
+ characteristics: {
43
+ inputType: 'composite';
44
+ };
45
+ children: infer C;
46
+ } ? C extends Record<string, any> ? {
47
+ [K in keyof C]?: ExtractPrimitiveType<C[K]>;
48
+ } : never : ExtractPrimitiveType<T>;
49
+ type ExtractPrimitiveType<T> = T extends {
50
+ characteristics: {
51
+ inputType: 'text';
52
+ };
53
+ } ? string : T extends {
54
+ characteristics: {
55
+ inputType: 'select';
56
+ };
57
+ } ? string : T extends {
58
+ characteristics: {
59
+ inputType: 'date';
60
+ };
61
+ } ? string : never;
62
+ export {};
@@ -0,0 +1,9 @@
1
+ import { FormField } from './formField';
2
+ export declare class Form {
3
+ fields: Record<string, FormField>;
4
+ constructor(fields: Record<string, FormField>);
5
+ get isValid(): boolean;
6
+ get isEmpty(): boolean;
7
+ get isDirty(): boolean;
8
+ get isDisabled(): boolean;
9
+ }
@@ -0,0 +1,11 @@
1
+ import { CredentialRequest, Credential } from '../../types';
2
+ import { Form } from './form';
3
+ export declare class FormBuilder {
4
+ private readonly fieldBuilder;
5
+ createFromCredentialAndRequests(credentials: Credential[], credentialRequests: CredentialRequest[]): Form;
6
+ private createField;
7
+ private createChildFields;
8
+ private expandCredentialType;
9
+ private credentialMeetsRequirements;
10
+ private extractRequestOptions;
11
+ }
@@ -0,0 +1,50 @@
1
+ import { FieldValueDefinitions } from '../declarations';
2
+ import { BaseFieldDefinition } from '../fields';
3
+ export interface FormFieldOptions<TFieldKey extends keyof FieldValueDefinitions = keyof FieldValueDefinitions> {
4
+ children?: Record<string, FormField>;
5
+ allowUserInput?: boolean;
6
+ mandatory?: 'yes' | 'no' | 'if_available';
7
+ multi?: boolean;
8
+ variants?: Array<FormField<TFieldKey>>;
9
+ description?: string;
10
+ }
11
+ export declare class FormField<TFieldKey extends keyof FieldValueDefinitions = keyof FieldValueDefinitions> {
12
+ id: string | undefined;
13
+ private _defaultValue;
14
+ private _value;
15
+ schema: BaseFieldDefinition<string>;
16
+ children?: Record<string, FormField>;
17
+ touched: boolean;
18
+ allowUserInput: boolean;
19
+ mandatory: 'yes' | 'no' | 'if_available';
20
+ multi: boolean;
21
+ variants?: Array<FormField<TFieldKey>>;
22
+ description?: string;
23
+ constructor(id: string | undefined, defaultValue: FieldValueDefinitions[TFieldKey], value: FieldValueDefinitions[TFieldKey], schema: BaseFieldDefinition<string>, options?: FormFieldOptions<TFieldKey>);
24
+ get defaultValue(): FieldValueDefinitions[TFieldKey];
25
+ get value(): FieldValueDefinitions[TFieldKey];
26
+ set value(newValue: FieldValueDefinitions[TFieldKey]);
27
+ get hasVariants(): boolean;
28
+ get isValid(): boolean;
29
+ get isRequired(): boolean;
30
+ get isDisabled(): boolean;
31
+ get isEmpty(): boolean;
32
+ get isDirty(): boolean;
33
+ get errors(): {
34
+ error: any;
35
+ childrenErrors: Record<string, any>;
36
+ } | null;
37
+ get errorMessage(): string | null;
38
+ get displayValue(): string | any;
39
+ /**
40
+ * Replaces this field with a variant while preserving the current value
41
+ * @param variantId - The ID of the variant to replace with
42
+ */
43
+ replaceWithVariant(variantId: string): void;
44
+ /**
45
+ * Deep clones a FormField and all its nested children recursively
46
+ * @param field - The FormField to clone
47
+ * @returns A deep copy of the FormField
48
+ */
49
+ private deepCloneFormField;
50
+ }
@@ -0,0 +1,14 @@
1
+ import { Credential, CredentialRequestObject } from '../../types';
2
+ import { FieldValueDefinitions } from '../declarations';
3
+ import { BaseFieldDefinition } from '../fields';
4
+ import { FormField } from './formField';
5
+ export interface CredentialRequestOptions {
6
+ allowUserInput?: boolean;
7
+ mandatory?: 'yes' | 'no' | 'if_available';
8
+ multi?: boolean;
9
+ description?: string;
10
+ }
11
+ export declare class FormFieldBuilder {
12
+ createFromCredential<TFieldKey extends keyof FieldValueDefinitions = keyof FieldValueDefinitions>(credential: Credential, children?: Record<string, FormField<TFieldKey>>, options?: CredentialRequestOptions, variants?: Array<FormField<TFieldKey>>): FormField<TFieldKey>;
13
+ createFromSchema(requestObj: CredentialRequestObject, fieldSchema: BaseFieldDefinition<string>): FormField;
14
+ }
@@ -0,0 +1,4 @@
1
+ export * from './form';
2
+ export * from './formField';
3
+ export * from './formBuilder';
4
+ export * from './formFieldBuilder';
@@ -0,0 +1,7 @@
1
+ import { fields } from '../fields';
2
+ /**
3
+ * Normalizes a credential type string to its corresponding field key.
4
+ * @param credentialType - The credential type (e.g., "FullNameCredential")
5
+ * @returns The normalized field key (e.g., "fullName")
6
+ */
7
+ export declare function normalizeCredentialType(credentialType: string): keyof typeof fields;
@@ -0,0 +1,8 @@
1
+ export declare const addressFormat: (value: {
2
+ line1?: string;
3
+ line2?: string;
4
+ city?: string;
5
+ state?: string;
6
+ country?: string;
7
+ zipCode?: string;
8
+ }) => string | null;
@@ -0,0 +1 @@
1
+ export declare const dateFormat: (value: string) => string;
@@ -0,0 +1,4 @@
1
+ export * from './address.format';
2
+ export * from './date.format';
3
+ export * from './ssn.format';
4
+ export * from './state.format';
@@ -0,0 +1 @@
1
+ export declare const ssnFormat: (value: string) => string;
@@ -0,0 +1 @@
1
+ export declare const stateFormat: (value: string) => "Alabama" | "Alaska" | "American Samoa" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Federated States Of Micronesia" | "Florida" | "Georgia" | "Guam" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Marshall Islands" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Northern Mariana Islands" | "Ohio" | "Oklahoma" | "Oregon" | "Palau" | "Pennsylvania" | "Puerto Rico" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
@@ -0,0 +1,6 @@
1
+ import { Form } from '../form';
2
+ export type CreatePatchCredentialsResult = {
3
+ uuid?: string;
4
+ value: Record<string, any>;
5
+ };
6
+ export declare function toCreatePatchCredentials(form: Form): CreatePatchCredentialsResult[];
@@ -0,0 +1,2 @@
1
+ export * from './create-patch.map';
2
+ export * from './share.map';
@@ -0,0 +1,4 @@
1
+ import { Credential } from '../../types';
2
+ export declare const toShareCredentials: {
3
+ toShareCredentials: (credentials: Credential[]) => Credential[];
4
+ };
@@ -0,0 +1,73 @@
1
+ export declare const US_STATES_RECORD: {
2
+ readonly AL: "Alabama";
3
+ readonly AK: "Alaska";
4
+ readonly AS: "American Samoa";
5
+ readonly AZ: "Arizona";
6
+ readonly AR: "Arkansas";
7
+ readonly CA: "California";
8
+ readonly CO: "Colorado";
9
+ readonly CT: "Connecticut";
10
+ readonly DE: "Delaware";
11
+ readonly DC: "District Of Columbia";
12
+ readonly FM: "Federated States Of Micronesia";
13
+ readonly FL: "Florida";
14
+ readonly GA: "Georgia";
15
+ readonly GU: "Guam";
16
+ readonly HI: "Hawaii";
17
+ readonly ID: "Idaho";
18
+ readonly IL: "Illinois";
19
+ readonly IN: "Indiana";
20
+ readonly IA: "Iowa";
21
+ readonly KS: "Kansas";
22
+ readonly KY: "Kentucky";
23
+ readonly LA: "Louisiana";
24
+ readonly ME: "Maine";
25
+ readonly MH: "Marshall Islands";
26
+ readonly MD: "Maryland";
27
+ readonly MA: "Massachusetts";
28
+ readonly MI: "Michigan";
29
+ readonly MN: "Minnesota";
30
+ readonly MS: "Mississippi";
31
+ readonly MO: "Missouri";
32
+ readonly MT: "Montana";
33
+ readonly NE: "Nebraska";
34
+ readonly NV: "Nevada";
35
+ readonly NH: "New Hampshire";
36
+ readonly NJ: "New Jersey";
37
+ readonly NM: "New Mexico";
38
+ readonly NY: "New York";
39
+ readonly NC: "North Carolina";
40
+ readonly ND: "North Dakota";
41
+ readonly MP: "Northern Mariana Islands";
42
+ readonly OH: "Ohio";
43
+ readonly OK: "Oklahoma";
44
+ readonly OR: "Oregon";
45
+ readonly PW: "Palau";
46
+ readonly PA: "Pennsylvania";
47
+ readonly PR: "Puerto Rico";
48
+ readonly RI: "Rhode Island";
49
+ readonly SC: "South Carolina";
50
+ readonly SD: "South Dakota";
51
+ readonly TN: "Tennessee";
52
+ readonly TX: "Texas";
53
+ readonly UT: "Utah";
54
+ readonly VT: "Vermont";
55
+ readonly VI: "Virgin Islands";
56
+ readonly VA: "Virginia";
57
+ readonly WA: "Washington";
58
+ readonly WV: "West Virginia";
59
+ readonly WI: "Wisconsin";
60
+ readonly WY: "Wyoming";
61
+ };
62
+ export type USStateCode = keyof typeof US_STATES_RECORD;
63
+ export type USStateName = (typeof US_STATES_RECORD)[USStateCode];
64
+ /**
65
+ * US States and Territories with their ISO 3166-2 codes
66
+ * Used for state selection when country is US
67
+ */
68
+ export declare const US_STATES: Array<{
69
+ value: USStateCode;
70
+ label: USStateName;
71
+ }>;
72
+ export declare const US_STATE_CODES: USStateCode[];
73
+ export declare const US_STATE_NAMES: USStateName[];
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ export declare const addressSchema: z.ZodEffects<z.ZodObject<{
3
+ line1: z.ZodOptional<z.ZodString>;
4
+ line2: z.ZodOptional<z.ZodString>;
5
+ city: z.ZodOptional<z.ZodString>;
6
+ state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
7
+ country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
8
+ zipCode: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ country?: "US" | undefined;
11
+ state?: string | undefined;
12
+ line1?: string | undefined;
13
+ line2?: string | undefined;
14
+ city?: string | undefined;
15
+ zipCode?: string | undefined;
16
+ }, {
17
+ country?: string | undefined;
18
+ state?: string | undefined;
19
+ line1?: string | undefined;
20
+ line2?: string | undefined;
21
+ city?: string | undefined;
22
+ zipCode?: string | undefined;
23
+ }>, {
24
+ country?: "US" | undefined;
25
+ state?: string | undefined;
26
+ line1?: string | undefined;
27
+ line2?: string | undefined;
28
+ city?: string | undefined;
29
+ zipCode?: string | undefined;
30
+ }, {
31
+ country?: string | undefined;
32
+ state?: string | undefined;
33
+ line1?: string | undefined;
34
+ line2?: string | undefined;
35
+ city?: string | undefined;
36
+ zipCode?: string | undefined;
37
+ }>;
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const cityValidationMessage = "City is required";
3
+ /**
4
+ * Validation schema for city
5
+ * Basic string validation for city name
6
+ */
7
+ export declare const citySchema: z.ZodString;
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const countryValidationMessage = "Country must be US";
3
+ /**
4
+ * Validation schema for country
5
+ * Currently only supports US
6
+ */
7
+ export declare const countrySchema: z.ZodEffects<z.ZodString, "US", string>;
@@ -0,0 +1,7 @@
1
+ export * from './address.schema';
2
+ export * from './line1.schema';
3
+ export * from './line2.schema';
4
+ export * from './city.schema';
5
+ export * from './state.schema';
6
+ export * from './country.schema';
7
+ export * from './zipcode.schema';
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const line1ValidationMessage = "Line 1 is required";
3
+ /**
4
+ * Validation schema for address line 1
5
+ * Basic string validation for street address
6
+ */
7
+ export declare const line1Schema: z.ZodString;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for address line 2
4
+ * Basic string validation for apartment, suite, etc.
5
+ */
6
+ export declare const line2Schema: z.ZodString;
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const stateValidationMessage = "Invalid state";
3
+ /**
4
+ * Validation schema for US state
5
+ * Validates against US state codes
6
+ */
7
+ export declare const stateSchema: z.ZodEnum<[string, ...string[]]>;
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const zipCodeValidationMessage = "Invalid zip code";
3
+ /**
4
+ * Validation schema for US zip code
5
+ * Supports both 5-digit and 9-digit (with hyphen) formats
6
+ */
7
+ export declare const zipCodeSchema: z.ZodString;
@@ -0,0 +1,69 @@
1
+ import { z } from 'zod';
2
+ export declare const driversLicenseSchema: z.ZodObject<{
3
+ documentNumber: z.ZodString;
4
+ issuanceState: z.ZodEnum<[string, ...string[]]>;
5
+ issuanceDate: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
6
+ expirationDate: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
+ address: z.ZodEffects<z.ZodObject<{
8
+ line1: z.ZodOptional<z.ZodString>;
9
+ line2: z.ZodOptional<z.ZodString>;
10
+ city: z.ZodOptional<z.ZodString>;
11
+ state: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
12
+ country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
13
+ zipCode: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ country?: "US" | undefined;
16
+ state?: string | undefined;
17
+ line1?: string | undefined;
18
+ line2?: string | undefined;
19
+ city?: string | undefined;
20
+ zipCode?: string | undefined;
21
+ }, {
22
+ country?: string | undefined;
23
+ state?: string | undefined;
24
+ line1?: string | undefined;
25
+ line2?: string | undefined;
26
+ city?: string | undefined;
27
+ zipCode?: string | undefined;
28
+ }>, {
29
+ country?: "US" | undefined;
30
+ state?: string | undefined;
31
+ line1?: string | undefined;
32
+ line2?: string | undefined;
33
+ city?: string | undefined;
34
+ zipCode?: string | undefined;
35
+ }, {
36
+ country?: string | undefined;
37
+ state?: string | undefined;
38
+ line1?: string | undefined;
39
+ line2?: string | undefined;
40
+ city?: string | undefined;
41
+ zipCode?: string | undefined;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ address: {
45
+ country?: "US" | undefined;
46
+ state?: string | undefined;
47
+ line1?: string | undefined;
48
+ line2?: string | undefined;
49
+ city?: string | undefined;
50
+ zipCode?: string | undefined;
51
+ };
52
+ documentNumber: string;
53
+ issuanceState: string;
54
+ issuanceDate: string;
55
+ expirationDate: string;
56
+ }, {
57
+ address: {
58
+ country?: string | undefined;
59
+ state?: string | undefined;
60
+ line1?: string | undefined;
61
+ line2?: string | undefined;
62
+ city?: string | undefined;
63
+ zipCode?: string | undefined;
64
+ };
65
+ documentNumber: string;
66
+ issuanceState: string;
67
+ issuanceDate: string;
68
+ expirationDate: string;
69
+ }>;
@@ -0,0 +1 @@
1
+ export * from './driversLicense.schema';
@@ -0,0 +1,4 @@
1
+ export * from './address';
2
+ export * from './name';
3
+ export * from './driversLicense';
4
+ export * from './other';
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for first name
4
+ * Basic string validation for first name
5
+ */
6
+ export declare const firstSchema: z.ZodString;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const fullNameSchema: z.ZodObject<{
3
+ firstName: z.ZodString;
4
+ lastName: z.ZodString;
5
+ middleName: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ firstName: string;
8
+ lastName: string;
9
+ middleName: string;
10
+ }, {
11
+ firstName: string;
12
+ lastName: string;
13
+ middleName: string;
14
+ }>;
@@ -0,0 +1,4 @@
1
+ export * from './fullName.schema';
2
+ export * from './first.schema';
3
+ export * from './last.schema';
4
+ export * from './middle.schema';
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for last name
4
+ * Basic string validation for last name
5
+ */
6
+ export declare const lastSchema: z.ZodString;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for middle name
4
+ * Basic string validation for middle name
5
+ */
6
+ export declare const middleSchema: z.ZodString;
@@ -0,0 +1,2 @@
1
+ import * as zod from 'zod';
2
+ export declare const birthDateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>, string, string>;
@@ -0,0 +1,6 @@
1
+ import * as zod from 'zod';
2
+ export declare const validateTimestamp: (timestampString: string) => boolean;
3
+ export declare const validateMinimumDate1900: (timestampString: string) => boolean;
4
+ export declare const refineTimestamp: (value: string) => boolean;
5
+ export declare const refineMinimumDate1900: (value: string) => boolean;
6
+ export declare const dateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for document number
4
+ * Basic string validation for document number
5
+ */
6
+ export declare const documentNumberSchema: z.ZodString;
@@ -0,0 +1,6 @@
1
+ export * from './phone.schema';
2
+ export * from './sex.schema';
3
+ export * from './ssn.schema';
4
+ export * from './birthDate.schema';
5
+ export * from './date.schema';
6
+ export * from './documentNumber.schema';
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for phone field in forms
4
+ * Basic string validation for phone number input
5
+ */
6
+ export declare const phoneSchema: z.ZodEffects<z.ZodString, string, string>;
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Sex options for selection
4
+ */
5
+ export declare const sexOptions: readonly [{
6
+ readonly label: "Male";
7
+ readonly value: "Male";
8
+ }, {
9
+ readonly label: "Female";
10
+ readonly value: "Female";
11
+ }, {
12
+ readonly label: "Non-Binary";
13
+ readonly value: "Non-Binary";
14
+ }];
15
+ /**
16
+ * Validation schema for sex selection
17
+ * Validates against predefined sex options
18
+ */
19
+ export declare const sexSchema: z.ZodEnum<[string, ...string[]]>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validation schema for SSN field in forms
4
+ * Supports both masked (•••-••-1234) and unmasked (123456789) formats
5
+ */
6
+ export declare const ssnSchema: z.ZodEffects<z.ZodString, string, string>;
@@ -0,0 +1,3 @@
1
+ export * from './core/form';
2
+ export * from './core/mappers';
3
+ export * from './react/ui';