@zealicsolutions/web-ui 0.3.92 → 0.3.94

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ declare type Action = {
28
28
  reset: ResetAction;
29
29
  destroy: DestroyAction;
30
30
  }>;
31
- export declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
31
+ export declare type FormStateType = 'default' | 'success' | 'error' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
32
32
  export declare type ImageAttributes = {
33
33
  attributeType: 'image';
34
34
  imageSource: string;
@@ -245,6 +245,7 @@ export interface PasswordSetupMolecule extends BaseMolecule {
245
245
  config: {
246
246
  props: {
247
247
  validationLabel?: string;
248
+ state?: FormStateType;
248
249
  passwordInputProps: InputFieldProps;
249
250
  reenteredPasswordInputProps: InputFieldProps;
250
251
  };
@@ -10,7 +10,7 @@ export declare type OrganismContextType = {
10
10
  submitHandler?: (data: {
11
11
  formId: string;
12
12
  data: AnyObject;
13
- }[]) => void;
13
+ }) => void;
14
14
  validations?: PasswordRuleValidation[];
15
15
  editable?: boolean;
16
16
  };
@@ -8,7 +8,7 @@ export declare type FormStepContextProviderProps = PropsWithChildren<Partial<{
8
8
  submitHandler: (data: {
9
9
  formId: string;
10
10
  data: AnyObject;
11
- }[]) => void;
11
+ }) => void;
12
12
  validations: PasswordRuleValidation[];
13
13
  editable: boolean;
14
14
  }>>;
@@ -1,3 +1,4 @@
1
+ import { FormStateType } from 'containers';
1
2
  export declare type CustomValidationRule<T = string> = {
2
3
  text: string;
3
4
  validate: (value?: T) => boolean;
@@ -8,5 +9,6 @@ export declare type CustomValidationProps<T = string> = {
8
9
  isSubmitted?: boolean;
9
10
  rules: CustomValidationRule<T>[];
10
11
  spacer?: number;
12
+ validationState?: FormStateType;
11
13
  };
12
- export declare const CustomValidation: <T extends string = string>({ rules, value, isSubmitted, label, spacer, }: CustomValidationProps<T>) => JSX.Element;
14
+ export declare const CustomValidation: <T extends string = string>({ rules, value, isSubmitted, label, spacer, validationState, }: CustomValidationProps<T>) => JSX.Element;
@@ -2,7 +2,7 @@ import type { ComponentStory } from '@storybook/react';
2
2
  import { CustomValidation as CustomValidationComponent } from './CustomValidation';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: <T extends string = string>({ rules, value, isSubmitted, label, spacer, }: import("./CustomValidation").CustomValidationProps<T>) => JSX.Element;
5
+ component: <T extends string = string>({ rules, value, isSubmitted, label, spacer, validationState, }: import("./CustomValidation").CustomValidationProps<T>) => JSX.Element;
6
6
  };
7
7
  export default _default;
8
8
  export declare const CustomValidation: ComponentStory<typeof CustomValidationComponent>;
@@ -1,3 +1,4 @@
1
+ import { FormStateType } from 'containers';
1
2
  import { UIFields } from 'fieldsConfiguration';
2
3
  import { MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
3
4
  import { UseFormReturn } from 'react-hook-form';
@@ -14,5 +15,6 @@ export declare type PasswordSetupProps = {
14
15
  validations: PasswordRuleValidation[];
15
16
  form?: UseFormReturn<any>;
16
17
  validationLabel?: string;
18
+ validationState?: FormStateType;
17
19
  };
18
- export declare const PasswordSetup: ({ fields, validations, form, validationLabel, }: PasswordSetupProps) => JSX.Element;
20
+ export declare const PasswordSetup: ({ fields, validations, form, validationLabel, validationState, }: PasswordSetupProps) => JSX.Element;
@@ -2,7 +2,7 @@ import type { ComponentStory } from '@storybook/react';
2
2
  import { PasswordSetup as PasswordSetupComponent } from './PasswordSetup';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ fields, validations, form, validationLabel, }: import("./PasswordSetup").PasswordSetupProps) => JSX.Element;
5
+ component: ({ fields, validations, form, validationLabel, validationState, }: import("./PasswordSetup").PasswordSetupProps) => JSX.Element;
6
6
  };
7
7
  export default _default;
8
8
  export declare const PasswordSetup: ComponentStory<typeof PasswordSetupComponent>;