@zealicsolutions/web-ui 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
1
  export * from './getFieldPlaceholder';
2
2
  export * from './types';
3
3
  export * from './utils';
4
+ export * from './mock';
@@ -5,3 +5,5 @@ export * from './templates';
5
5
  export * from './pages';
6
6
  export * from './hooks';
7
7
  export * from './theme';
8
+ export * from './assets';
9
+ export * from './fieldsConfiguration';
@@ -1,3 +1,4 @@
1
1
  export * from './theme';
2
2
  export * from './provider';
3
3
  export * from './types';
4
+ export * from './toastStyles';
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { PropsWithChildren, ReactNode, Dispatch, SetStateAction } from 'react';
5
5
  import * as styled_components from 'styled-components';
6
6
  import { DefaultTheme, CSSProperties } from 'styled-components';
7
7
  import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
8
- import { InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
8
+ import { InputFieldTypes as InputFieldTypes$1, FieldTypes as FieldTypes$1, UIFields as UIFields$1 } from 'fieldsConfiguration/types';
9
9
  import { SizesTypes as SizesTypes$1, ThemeColors as ThemeColors$1 } from 'theme/types';
10
10
  import { SizesTypes as SizesTypes$2, ThemeColors as ThemeColors$2 } from 'theme';
11
11
  import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
@@ -13,6 +13,8 @@ import { Control } from 'react-hook-form/dist/types';
13
13
  import { SelectOption as SelectOption$1 } from 'atoms/Select/types';
14
14
  import { DrawerProps as DrawerProps$1 } from '@mui/material';
15
15
  import { SetPasswordFields, SetPasswordRuleValidation } from 'organisms/SetPasswordForm/types';
16
+ import { DeepPartial, FieldValues, FormState } from 'react-hook-form';
17
+ import { LoginFields as LoginFields$1 } from 'organisms/LoginForm/types';
16
18
 
17
19
  declare type BaseButtonProps = {
18
20
  onClick?: Callback;
@@ -109,6 +111,8 @@ declare type ThemeTextType = Record<SizesTypes, {
109
111
  }>;
110
112
  declare type ThemeSizesType = Record<SizesTypes, number>;
111
113
 
114
+ declare const toastStyles: styled_components.FlattenSimpleInterpolation;
115
+
112
116
  declare type IconProps = {
113
117
  name: IconNames;
114
118
  size?: number;
@@ -246,7 +250,10 @@ declare type InputFieldProps = {
246
250
  };
247
251
  declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, }: InputFieldProps) => JSX.Element;
248
252
 
253
+ declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
254
+
249
255
  declare type InputFieldTypes = 'number' | 'text' | 'email' | 'password';
256
+ declare type FieldTypes = 'input' | 'select' | 'date-picker' | 'checkbox' | 'switch';
250
257
  declare type UIField<T = string> = (UIInputField | UISelectField | UICheckboxField) & {
251
258
  name: T;
252
259
  value?: string;
@@ -271,6 +278,13 @@ declare type UICheckboxField = {
271
278
  };
272
279
  declare type UIFields<T extends object> = UIField<keyof T>[];
273
280
 
281
+ declare const getInitialValuesFromFields: <T extends object>(fields: UIFields$1<T>) => DeepPartial<T>;
282
+ declare const isFormValid: <T extends FieldValues>(formState: FormState<T>) => boolean;
283
+
284
+ declare const acquisitionFormMockFields: UIFields$1<any>;
285
+ declare const setPasswordMockFields: UIFields$1<SetPasswordFields>;
286
+ declare const loginMockFields: UIFields$1<LoginFields$1>;
287
+
274
288
  declare type FieldMapperProps<T extends object> = {
275
289
  field: UIField<keyof T>;
276
290
  control: Control<T>;
@@ -496,4 +510,7 @@ interface Helpers {
496
510
  }
497
511
  declare const useStep: (maxStep: number) => [number, Helpers];
498
512
 
499
- export { AcquisitionForm, AcquisitionFormProps, AuthMethod, AuthPage, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, Banner, BannerProps, BaseButtonProps, Button, ButtonProps, CheckBoxProps, Checkbox, CheckboxField, CheckboxFieldProps, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, Drawer, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, ForgotPasswordForm, ForgotPasswordFormProps, Header, HeaderProps, HorizontalPadding, HorizontalPaddingProps, Icon, IconNames, IconProps, Image, ImageProps, InfoBox, InfoBoxProps, Input, InputField, InputFieldProps, InputIconProps, InputProps, LinkButton, LinkButtonProps, LoginForm, LoginFormProps, MenuItem, MenuItems, MenuItemsProps, RegistrationPageProps, Select, SelectField, SelectFieldProps, SelectableCardGroup, SelectableCardGroupProps, SetPasswordForm, SetPasswordFormProps, SizesTypes, Spacer, SpacerProps, Spinner, StyleWrapper, TabGroup, TabGroupProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeSizesType, ThemeTextType, Tooltip, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, ZealThemeProvider, defaultTheme, toast, useStep };
513
+ declare const AppLogo: string;
514
+ declare const HomeBannerImage: string;
515
+
516
+ export { AcquisitionForm, AcquisitionFormProps, AppLogo, AuthMethod, AuthPage, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, Banner, BannerProps, BaseButtonProps, Button, ButtonProps, CheckBoxProps, Checkbox, CheckboxField, CheckboxFieldProps, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, Drawer, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldTypes, ForgotPasswordForm, ForgotPasswordFormProps, Header, HeaderProps, HomeBannerImage, HorizontalPadding, HorizontalPaddingProps, Icon, IconNames, IconProps, Image, ImageProps, InfoBox, InfoBoxProps, Input, InputField, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, LinkButton, LinkButtonProps, LoginForm, LoginFormProps, MenuItem, MenuItems, MenuItemsProps, RegistrationPageProps, Select, SelectField, SelectFieldProps, SelectableCardGroup, SelectableCardGroupProps, SetPasswordForm, SetPasswordFormProps, SizesTypes, Spacer, SpacerProps, Spinner, StyleWrapper, TabGroup, TabGroupProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeSizesType, ThemeTextType, Tooltip, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, ZealThemeProvider, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getInitialValuesFromFields, isFormValid, loginMockFields, setPasswordMockFields, toast, toastStyles, useStep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"