@zealicsolutions/web-ui 0.3.93 → 0.3.95

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.
@@ -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
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ControllerProps } from 'react-hook-form';
3
2
  import { SelectOption } from 'atoms';
4
3
  import { InputFieldProps, SelectFieldProps } from 'molecules';
5
- export declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'any';
4
+ import { ControllerProps } from 'react-hook-form';
5
+ export declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'username' | 'any';
6
6
  export declare type FieldTypes = 'input' | 'select' | 'checkbox';
7
7
  export declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
8
8
  name: T;
@@ -9,6 +9,7 @@ export declare const monthDayYearDateValidation: RegExp;
9
9
  export declare const dayMonthYearDateValidation: RegExp;
10
10
  export declare const monthYearDateValidation: RegExp;
11
11
  export declare const usZipCode: RegExp;
12
+ export declare const usernameValidation: RegExp;
12
13
  export declare const getInputValidation: (type?: InputFieldTypes) => ValidationRule<RegExp> | undefined;
13
14
  export declare const postCodeMask: RegExp[];
14
15
  export declare const dayMonthYearDateMask: (string | RegExp)[];
@@ -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>;
package/dist/index.d.ts CHANGED
@@ -13,11 +13,11 @@ import * as containers from 'containers';
13
13
  import { FormStateType as FormStateType$1, ContainerComponentProps as ContainerComponentProps$1, Molecule as Molecule$1, StateConfigType as StateConfigType$1, ConditionConfig as ConditionConfig$1, MetadataStateConfig as MetadataStateConfig$1 } from 'containers';
14
14
  import { FieldTypes as FieldTypes$1, UIFields as UIFields$1, InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
15
15
  import { ThemeColors as ThemeColors$2, FontSizesTypes as FontSizesTypes$1, SizesTypes as SizesTypes$2, BreakpointSizesTypes as BreakpointSizesTypes$1 } from 'theme/types';
16
- import * as react_hook_form from 'react-hook-form';
17
- import { ControllerProps, DeepPartial, FieldValues, FormState, Control, UseFormReturn, ValidationMode } from 'react-hook-form';
18
16
  import * as atoms from 'atoms';
19
17
  import { SelectOption as SelectOption$1, TextProps as TextProps$1, IconNames as IconNames$2, TouchableOpacityProps as TouchableOpacityProps$1, AvatarProps as AvatarProps$1, TabProps as TabProps$1, InputProps as InputProps$1, SelectProps as SelectProps$1, RegularImageProps as RegularImageProps$1, TextButtonProps as TextButtonProps$1, TabTheme as TabTheme$1, RadioButtonsProps as RadioButtonsProps$1, RadioButtonInternalConfigProps as RadioButtonInternalConfigProps$1, HorizontalButtonsProps as HorizontalButtonsProps$1, IconProps as IconProps$1, LinkVariant as LinkVariant$1 } from 'atoms';
20
18
  import { InputFieldProps as InputFieldProps$1, SelectFieldProps as SelectFieldProps$1, FieldSectionProps as FieldSectionProps$1, BaseButtonProps as BaseButtonProps$1, MenuItem as MenuItem$1, ConsentProps as ConsentProps$1, HeroImageProps as HeroImageProps$1, ColumnsProps as ColumnsProps$1, EmphasizedTextProps as EmphasizedTextProps$1, TabGroupProps as TabGroupProps$1, AvatarDropdownProps as AvatarDropdownProps$1, FeedContentHeaderProps as FeedContentHeaderProps$1, AlertProps as AlertProps$1, BottomNaVBarItemProps as BottomNaVBarItemProps$1, ButtonProps as ButtonProps$1, MenuItemsProps as MenuItemsProps$1, ImageProps as ImageProps$1, TextMoleculeProps as TextMoleculeProps$1, AdditionalTabContainerProps as AdditionalTabContainerProps$1, RadioButtonFieldProps as RadioButtonFieldProps$1, CheckboxFieldProps as CheckboxFieldProps$1, ConsentType as ConsentType$1, LinkProps as LinkProps$1, AvatarDropdownMenuConfigType as AvatarDropdownMenuConfigType$1 } from 'molecules';
19
+ import * as react_hook_form from 'react-hook-form';
20
+ import { ControllerProps, DeepPartial, FieldValues, FormState, Control, UseFormReturn, ValidationMode } from 'react-hook-form';
21
21
  import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
22
22
  import { WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap';
23
23
  import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
@@ -123,7 +123,7 @@ declare type AnyObject = Record<string, unknown>;
123
123
 
124
124
  declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
125
125
 
126
- declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'any';
126
+ declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'username' | 'any';
127
127
  declare type FieldTypes = 'input' | 'select' | 'checkbox';
128
128
  declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
129
129
  name: T;
@@ -1111,8 +1111,9 @@ declare type CustomValidationProps<T = string> = {
1111
1111
  isSubmitted?: boolean;
1112
1112
  rules: CustomValidationRule<T>[];
1113
1113
  spacer?: number;
1114
+ validationState?: FormStateType$1;
1114
1115
  };
1115
- declare const CustomValidation: <T extends string = string>({ rules, value, isSubmitted, label, spacer, }: CustomValidationProps<T>) => JSX.Element;
1116
+ declare const CustomValidation: <T extends string = string>({ rules, value, isSubmitted, label, spacer, validationState, }: CustomValidationProps<T>) => JSX.Element;
1116
1117
 
1117
1118
  declare type BaseSelectableProps<T> = {
1118
1119
  iconName: IconNames$2;
@@ -1622,7 +1623,7 @@ declare type Action = {
1622
1623
  reset: ResetAction;
1623
1624
  destroy: DestroyAction;
1624
1625
  }>;
1625
- declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
1626
+ declare type FormStateType = 'default' | 'success' | 'error' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
1626
1627
  declare type ImageAttributes = {
1627
1628
  attributeType: 'image';
1628
1629
  imageSource: string;
@@ -1839,6 +1840,7 @@ interface PasswordSetupMolecule extends BaseMolecule {
1839
1840
  config: {
1840
1841
  props: {
1841
1842
  validationLabel?: string;
1843
+ state?: FormStateType;
1842
1844
  passwordInputProps: InputFieldProps$1;
1843
1845
  reenteredPasswordInputProps: InputFieldProps$1;
1844
1846
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "0.3.93",
3
+ "version": "0.3.95",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"