@zealicsolutions/web-ui 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/dist/cjs/index.css +246 -0
  2. package/dist/cjs/index.js +34 -32
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/src/atoms/Avatar/Avatar.d.ts +21 -0
  5. package/dist/cjs/src/atoms/Buttons/Button.d.ts +2 -2
  6. package/dist/cjs/src/atoms/Buttons/LinkButton.d.ts +3 -3
  7. package/dist/cjs/src/atoms/Divider/Divider.d.ts +9 -0
  8. package/dist/cjs/src/atoms/Icon/Icon.d.ts +4 -3
  9. package/dist/cjs/src/atoms/Input/Input.d.ts +3 -3
  10. package/dist/cjs/src/atoms/Paddings/Paddings.d.ts +6 -0
  11. package/dist/cjs/src/atoms/TextWrapper/TextWrapper.d.ts +2 -2
  12. package/dist/cjs/src/atoms/index.d.ts +3 -0
  13. package/dist/cjs/src/icons/CaretDown.d.ts +1 -1
  14. package/dist/cjs/src/index.d.ts +7 -2
  15. package/dist/cjs/src/molecules/AvatarDropdown/AvatarDropdown.d.ts +9 -0
  16. package/dist/cjs/src/molecules/MenuItems/MenuItems.d.ts +12 -0
  17. package/dist/cjs/src/molecules/Tab/Tab.d.ts +6 -4
  18. package/dist/cjs/src/molecules/TabGroup/TabGroup.d.ts +3 -2
  19. package/dist/cjs/src/molecules/index.d.ts +3 -0
  20. package/dist/cjs/src/organisms/AcquisitionForm/AcquisitionForm.d.ts +2 -2
  21. package/dist/cjs/src/organisms/ForgotPasswordForm/ForgotPasswordForm.d.ts +13 -0
  22. package/dist/cjs/src/organisms/ForgotPasswordForm/constants.d.ts +2 -0
  23. package/dist/cjs/src/organisms/Header/Header.d.ts +7 -2
  24. package/dist/cjs/src/organisms/LoginForm/LoginForm.d.ts +10 -5
  25. package/dist/cjs/src/organisms/index.d.ts +1 -0
  26. package/dist/cjs/src/pages/AuthPage/AuthDrawerContent.d.ts +11 -0
  27. package/dist/cjs/src/pages/AuthPage/AuthPage.d.ts +10 -0
  28. package/dist/cjs/src/pages/index.d.ts +1 -1
  29. package/dist/cjs/src/templates/DefaultTemplate/DefaultTemplate.d.ts +5 -4
  30. package/dist/cjs/src/theme/types.d.ts +1 -1
  31. package/dist/cjs/src/typescript.d.ts +1 -0
  32. package/dist/esm/index.css +246 -0
  33. package/dist/esm/index.js +34 -32
  34. package/dist/esm/index.js.map +1 -1
  35. package/dist/esm/src/atoms/Avatar/Avatar.d.ts +21 -0
  36. package/dist/esm/src/atoms/Buttons/Button.d.ts +2 -2
  37. package/dist/esm/src/atoms/Buttons/LinkButton.d.ts +3 -3
  38. package/dist/esm/src/atoms/Divider/Divider.d.ts +9 -0
  39. package/dist/esm/src/atoms/Icon/Icon.d.ts +4 -3
  40. package/dist/esm/src/atoms/Input/Input.d.ts +3 -3
  41. package/dist/esm/src/atoms/Paddings/Paddings.d.ts +6 -0
  42. package/dist/esm/src/atoms/TextWrapper/TextWrapper.d.ts +2 -2
  43. package/dist/esm/src/atoms/index.d.ts +3 -0
  44. package/dist/esm/src/icons/CaretDown.d.ts +1 -1
  45. package/dist/esm/src/index.d.ts +7 -2
  46. package/dist/esm/src/molecules/AvatarDropdown/AvatarDropdown.d.ts +9 -0
  47. package/dist/esm/src/molecules/MenuItems/MenuItems.d.ts +12 -0
  48. package/dist/esm/src/molecules/Tab/Tab.d.ts +6 -4
  49. package/dist/esm/src/molecules/TabGroup/TabGroup.d.ts +3 -2
  50. package/dist/esm/src/molecules/index.d.ts +3 -0
  51. package/dist/esm/src/organisms/AcquisitionForm/AcquisitionForm.d.ts +2 -2
  52. package/dist/esm/src/organisms/ForgotPasswordForm/ForgotPasswordForm.d.ts +13 -0
  53. package/dist/esm/src/organisms/ForgotPasswordForm/constants.d.ts +2 -0
  54. package/dist/esm/src/organisms/Header/Header.d.ts +7 -2
  55. package/dist/esm/src/organisms/LoginForm/LoginForm.d.ts +10 -5
  56. package/dist/esm/src/organisms/index.d.ts +1 -0
  57. package/dist/esm/src/pages/AuthPage/AuthDrawerContent.d.ts +11 -0
  58. package/dist/esm/src/pages/AuthPage/AuthPage.d.ts +10 -0
  59. package/dist/esm/src/pages/index.d.ts +1 -1
  60. package/dist/esm/src/templates/DefaultTemplate/DefaultTemplate.d.ts +5 -4
  61. package/dist/esm/src/theme/types.d.ts +1 -1
  62. package/dist/esm/src/typescript.d.ts +1 -0
  63. package/dist/index.d.ts +499 -1
  64. package/package.json +1 -1
  65. package/dist/cjs/src/pages/Registiration/index.d.ts +0 -1
  66. package/dist/cjs/src/pages/RegistrationPage/RegistrationPage.d.ts +0 -10
  67. package/dist/esm/src/pages/Registiration/index.d.ts +0 -1
  68. package/dist/esm/src/pages/RegistrationPage/RegistrationPage.d.ts +0 -10
package/dist/index.d.ts CHANGED
@@ -1 +1,499 @@
1
- export { Button } from 'atoms';
1
+ /// <reference types="react" />
2
+ import { Callback, StylesType } from 'typescript';
3
+ import * as react from 'react';
4
+ import { PropsWithChildren, ReactNode, Dispatch, SetStateAction } from 'react';
5
+ import * as styled_components from 'styled-components';
6
+ import { DefaultTheme, CSSProperties } from 'styled-components';
7
+ import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
8
+ import { InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
9
+ import { SizesTypes as SizesTypes$1, ThemeColors as ThemeColors$1 } from 'theme/types';
10
+ import { SizesTypes as SizesTypes$2, ThemeColors as ThemeColors$2 } from 'theme';
11
+ import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
12
+ import { Control } from 'react-hook-form/dist/types';
13
+ import { SelectOption as SelectOption$1 } from 'atoms/Select/types';
14
+ import { DrawerProps as DrawerProps$1 } from '@mui/material';
15
+ import { SetPasswordFields, SetPasswordRuleValidation } from 'organisms/SetPasswordForm/types';
16
+
17
+ declare type BaseButtonProps = {
18
+ onClick?: Callback;
19
+ variant?: 'primary' | 'secondary';
20
+ disabled?: boolean;
21
+ fullWidth?: boolean;
22
+ };
23
+ declare type ButtonProps = BaseButtonProps & {
24
+ fullWidth?: boolean;
25
+ text?: string;
26
+ loading?: boolean;
27
+ };
28
+ declare const Button: ({ text, onClick, loading, disabled, variant, fullWidth, }: ButtonProps) => JSX.Element;
29
+
30
+ declare type TouchableOpacityProps = PropsWithChildren<{
31
+ activeOpacity?: number;
32
+ withoutOpacityEffect?: boolean;
33
+ disabled?: boolean;
34
+ }>;
35
+ declare const TouchableOpacity: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
36
+ activeOpacity?: number | undefined;
37
+ withoutOpacityEffect?: boolean | undefined;
38
+ disabled?: boolean | undefined;
39
+ } & {
40
+ children?: react.ReactNode;
41
+ }, never>;
42
+
43
+ declare type CheckBoxProps = {
44
+ value: boolean;
45
+ onClick: (value: boolean) => void;
46
+ disabled?: boolean;
47
+ error?: boolean;
48
+ label?: string;
49
+ };
50
+ declare const Checkbox: ({ label, onClick, value, disabled, error }: CheckBoxProps) => JSX.Element;
51
+
52
+ declare type SelectOption = {
53
+ id: string;
54
+ label: string;
55
+ };
56
+ declare type SelectProps = {
57
+ value?: string;
58
+ onChange?: (value: string) => void;
59
+ placeholder?: string;
60
+ disabled?: boolean;
61
+ options: SelectOption[];
62
+ isError?: boolean;
63
+ isEditMode?: boolean;
64
+ };
65
+
66
+ declare const Select: ({ onChange, value, placeholder, options, disabled, isError, }: SelectProps) => JSX.Element;
67
+
68
+ declare type InputIconProps = {
69
+ name: IconNames$1;
70
+ onClick?: Callback;
71
+ };
72
+ declare type InputProps = {
73
+ value?: string;
74
+ leftIcon?: InputIconProps;
75
+ rightIcon?: InputIconProps;
76
+ onBlur?: Callback;
77
+ type?: InputFieldTypes$1;
78
+ placeholder?: string;
79
+ disabled?: boolean;
80
+ isEditMode?: boolean;
81
+ isError?: boolean;
82
+ maxLength?: number;
83
+ onChange?: (value: string) => void;
84
+ };
85
+ declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, ...rest }: InputProps) => JSX.Element;
86
+
87
+ declare type TextTypes = 'primary' | 'secondary' | 'error' | 'success';
88
+ declare type TextWrapperProps = {
89
+ children: ReactNode;
90
+ variant: SizesTypes$1;
91
+ layout?: 'div' | 'span';
92
+ type?: TextTypes;
93
+ styles?: StylesType;
94
+ color?: ThemeColors$1 | string;
95
+ };
96
+ declare const TextWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, TextWrapperProps, never>;
97
+
98
+ declare const defaultTheme: DefaultTheme;
99
+
100
+ declare const ZealThemeProvider: (props: PropsWithChildren<{}>) => JSX.Element;
101
+
102
+ declare type ThemeColors = 'primary' | 'secondary' | 'background' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'indigo' | 'blue' | 'white' | 'black' | 'indigoTint' | 'indigoTint2' | 'success' | 'error' | 'warning';
103
+ declare type SizesTypes = '2XL' | 'XL' | 'L' | 'M' | 'S' | 'XS';
104
+ declare type ThemeColorsType = Record<ThemeColors, string>;
105
+ declare type ThemeTextType = Record<SizesTypes, {
106
+ 'font-weight': string;
107
+ 'font-size': number;
108
+ 'line-height': number;
109
+ }>;
110
+ declare type ThemeSizesType = Record<SizesTypes, number>;
111
+
112
+ declare type IconProps = {
113
+ name: IconNames;
114
+ size?: number;
115
+ color?: ThemeColors | string;
116
+ pointerEvents?: 'auto' | 'none';
117
+ };
118
+ declare const availableIcons: {
119
+ CaretDown: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
120
+ CaretUp: ({ color, ...props }: Omit<IconProps, "name">) => JSX.Element;
121
+ Filter: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
122
+ Check: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
123
+ Info: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
124
+ View: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
125
+ Hide: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
126
+ Close: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
127
+ Minus: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
128
+ InfoBoxIcon: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
129
+ Warning: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
130
+ Bell: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
131
+ Mobile: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
132
+ Mail: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
133
+ };
134
+ declare type IconNames = keyof typeof availableIcons;
135
+ declare const Icon: ({ name, color, ...props }: IconProps) => JSX.Element;
136
+
137
+ declare type SpacerProps = {
138
+ width?: SizesTypes$2 | number;
139
+ height?: SizesTypes$2 | number;
140
+ layout?: 'div' | 'span';
141
+ };
142
+ declare const Spacer: styled_components.StyledComponent<"div", styled_components.DefaultTheme, SpacerProps, never>;
143
+
144
+ declare const Spinner: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
145
+ color?: ThemeColors$1 | undefined;
146
+ size?: SizesTypes$1 | undefined;
147
+ }, never>;
148
+
149
+ declare type ImageProps = {
150
+ src: string;
151
+ alt?: string;
152
+ styles?: CSSProperties;
153
+ };
154
+ declare const Image: (props: ImageProps) => JSX.Element;
155
+
156
+ declare type LinkButtonProps = PropsWithChildren<{
157
+ activeOpacity?: number;
158
+ withoutOpacityEffect?: boolean;
159
+ disabled?: boolean;
160
+ onClick?: Callback;
161
+ }>;
162
+ declare const LinkButton: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
163
+ activeOpacity?: number | undefined;
164
+ withoutOpacityEffect?: boolean | undefined;
165
+ disabled?: boolean | undefined;
166
+ } & {
167
+ children?: react.ReactNode;
168
+ } & {
169
+ activeOpacity?: number | undefined;
170
+ withoutOpacityEffect?: boolean | undefined;
171
+ disabled?: boolean | undefined;
172
+ onClick?: Callback | undefined;
173
+ }, never>;
174
+
175
+ declare type ValidationTagStatus = 'DEFAULT' | 'ERROR' | 'SUCCESS';
176
+ declare type ValidationTagProps = {
177
+ status: ValidationTagStatus;
178
+ text: string;
179
+ };
180
+ declare const ValidationTag: ({ text, status }: ValidationTagProps) => JSX.Element;
181
+
182
+ declare type TooltipProps = Pick<TooltipProps$1, 'overlay' | 'placement' | 'trigger' | 'visible' | 'children'>;
183
+ declare const StyleWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
184
+ declare const Tooltip: ({ trigger, placement, ...props }: TooltipProps) => JSX.Element;
185
+
186
+ declare type ToastType = 'success' | 'infoTierOne' | 'infoTierTwo' | 'warning' | 'error';
187
+ declare type ToastParams = {
188
+ message: string;
189
+ type?: ToastType;
190
+ duration?: number;
191
+ };
192
+
193
+ declare const toast: ({ message, type, duration }: ToastParams) => void | undefined;
194
+
195
+ declare type AvatarProps = {
196
+ size?: SizesTypes | number;
197
+ withShadow?: boolean;
198
+ label?: string;
199
+ backgroundColor?: ThemeColors;
200
+ textConfig?: {
201
+ color?: ThemeColors;
202
+ font?: SizesTypes;
203
+ };
204
+ content: {
205
+ initials?: string;
206
+ iconName?: IconNames;
207
+ imageUrl?: string;
208
+ };
209
+ onPress?: Callback;
210
+ };
211
+ declare const Avatar: ({ size, withShadow, label, backgroundColor, onPress, content: { initials, iconName, imageUrl }, textConfig: { color, font }, }: AvatarProps) => JSX.Element;
212
+
213
+ declare type HorizontalPaddingProps = {
214
+ padding: SizesTypes$2 | number;
215
+ };
216
+ declare const HorizontalPadding: styled_components.StyledComponent<"div", styled_components.DefaultTheme, HorizontalPaddingProps, never>;
217
+ declare const VerticalPadding: styled_components.StyledComponent<"div", styled_components.DefaultTheme, HorizontalPaddingProps, never>;
218
+
219
+ declare type DividerProps = {
220
+ type?: 'horizontal' | 'vertical';
221
+ color?: ThemeColors$2 | string;
222
+ marginVertical?: SizesTypes$2 | number;
223
+ marginHorizontal?: SizesTypes$2 | number;
224
+ weight?: number;
225
+ };
226
+ declare const Divider: styled_components.StyledComponent<"div", styled_components.DefaultTheme, DividerProps, never>;
227
+
228
+ declare type FieldRuleLabelTypes = 'OPTIONAL' | 'REQUIRED';
229
+ declare type FieldLabelsProps = {
230
+ label: string;
231
+ tooltipText?: string;
232
+ isError?: boolean;
233
+ ruleLabel?: FieldRuleLabelTypes;
234
+ };
235
+ declare const FieldLabels: ({ label, isError, ruleLabel, tooltipText }: FieldLabelsProps) => JSX.Element;
236
+
237
+ declare type InputFieldProps = {
238
+ name: string;
239
+ control?: Control<any>;
240
+ required?: boolean;
241
+ optional?: boolean;
242
+ defaultValue?: string;
243
+ inputProps: InputProps;
244
+ styles?: CSSProperties;
245
+ labelsProps?: FieldLabelsProps;
246
+ };
247
+ declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, }: InputFieldProps) => JSX.Element;
248
+
249
+ declare type InputFieldTypes = 'number' | 'text' | 'email' | 'password';
250
+ declare type UIField<T = string> = (UIInputField | UISelectField | UICheckboxField) & {
251
+ name: T;
252
+ value?: string;
253
+ label?: string;
254
+ placeholder?: string;
255
+ required?: boolean;
256
+ optional?: boolean;
257
+ tooltip?: string;
258
+ };
259
+ declare type UIInputField = {
260
+ type: 'input';
261
+ inputType?: InputFieldTypes;
262
+ maxLength?: number;
263
+ };
264
+ declare type UISelectField = {
265
+ type: 'select';
266
+ options: SelectOption$1[];
267
+ };
268
+ declare type UICheckboxField = {
269
+ type: 'checkbox';
270
+ checkboxLabel?: string;
271
+ };
272
+ declare type UIFields<T extends object> = UIField<keyof T>[];
273
+
274
+ declare type FieldMapperProps<T extends object> = {
275
+ field: UIField<keyof T>;
276
+ control: Control<T>;
277
+ spacer?: number;
278
+ };
279
+ declare const FieldMapper: <T extends object>({ field, spacer, control, }: FieldMapperProps<T>) => JSX.Element;
280
+
281
+ declare type CheckboxFieldProps = {
282
+ name: string;
283
+ control: Control<any>;
284
+ defaultValue?: boolean;
285
+ checkboxProps: Omit<CheckBoxProps, 'error' | 'onClick' | 'value'>;
286
+ };
287
+ declare const CheckboxField: ({ control, name, checkboxProps, defaultValue, }: CheckboxFieldProps) => JSX.Element;
288
+
289
+ declare type SelectFieldProps = {
290
+ selectProps: SelectProps;
291
+ labelsProps?: FieldLabelsProps;
292
+ name: string;
293
+ control: Control<any>;
294
+ required?: boolean;
295
+ optional?: boolean;
296
+ defaultValue?: string;
297
+ styles?: CSSProperties;
298
+ };
299
+ declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, }: SelectFieldProps) => JSX.Element;
300
+
301
+ declare type CustomValidationRule<T = string> = {
302
+ text: string;
303
+ validate: (value?: T) => boolean;
304
+ };
305
+ declare type CustomValidationProps<T = string> = {
306
+ label?: string;
307
+ value: T;
308
+ isSubmitted?: boolean;
309
+ rules: CustomValidationRule<T>[];
310
+ };
311
+ declare const CustomValidation: <T extends string = string>({ rules, value, isSubmitted, label, }: CustomValidationProps<T>) => JSX.Element;
312
+
313
+ declare type BaseSelectableProps<T> = {
314
+ iconName: IconNames;
315
+ infoText: string;
316
+ isActive?: boolean;
317
+ onClick?: (value: T) => void;
318
+ value: T;
319
+ };
320
+
321
+ declare type SelectableCardGroupProps<T> = {
322
+ cards: BaseSelectableProps<T>[];
323
+ handleChange?: (value: T | undefined) => void;
324
+ spacing?: SizesTypes;
325
+ initialValue?: T;
326
+ };
327
+ declare const SelectableCardGroup: <T extends string>({ cards, handleChange, spacing, initialValue, }: SelectableCardGroupProps<T>) => JSX.Element;
328
+
329
+ declare type BannerProps = {
330
+ backgroundImage: ImageProps;
331
+ title: string;
332
+ description?: string;
333
+ button?: ButtonProps;
334
+ };
335
+ declare const Banner: ({ backgroundImage, button, title, description }: BannerProps) => JSX.Element;
336
+
337
+ declare type Anchor = 'top' | 'left' | 'bottom' | 'right';
338
+ declare type DrawerProps = DrawerProps$1 & {
339
+ anchor: Anchor;
340
+ };
341
+
342
+ declare const Drawer: ({ children, ...props }: PropsWithChildren<DrawerProps>) => JSX.Element;
343
+
344
+ declare type InfoBoxProps = {
345
+ title: string;
346
+ description?: string;
347
+ linkButton?: LinkButtonProps;
348
+ icon?: IconNames;
349
+ };
350
+ declare const InfoBox: ({ title, icon, description, linkButton }: InfoBoxProps) => JSX.Element;
351
+
352
+ declare type MenuItem<T> = {
353
+ id: T;
354
+ title: string;
355
+ onClick?: (id: T) => void;
356
+ };
357
+ declare type MenuItemsProps<T> = {
358
+ title?: string;
359
+ onItemPress?: (id: T) => void;
360
+ options: MenuItem<T>[];
361
+ };
362
+ declare const MenuItems: <T extends string | number>({ title, onItemPress, options, }: MenuItemsProps<T>) => JSX.Element;
363
+
364
+ declare type AvatarDropdownProps<T> = {
365
+ avatarProps: AvatarProps;
366
+ menuConfig: MenuItemsProps<T>;
367
+ };
368
+ declare const AvatarDropdown: <T extends string | number>({ avatarProps, menuConfig, }: AvatarDropdownProps<T>) => JSX.Element;
369
+
370
+ declare type TabProps<T = string, K = string> = {
371
+ tabKey: T;
372
+ text: string;
373
+ disabled?: boolean;
374
+ isActive?: boolean;
375
+ onClick?: (key: T) => void;
376
+ options?: MenuItemsProps<T>[];
377
+ onOptionClick?: (optionKey: K) => void;
378
+ };
379
+
380
+ declare type TabGroupProps<T = string, K = string> = {
381
+ tabs: Pick<TabProps<T>, 'text' | 'tabKey' | 'disabled' | 'options'>[];
382
+ activeTabKey: T;
383
+ spacing?: SizesTypes$1;
384
+ onTabChange?: (tabKey: T) => void;
385
+ onOptionClick?: (optionKey: K) => void;
386
+ };
387
+ declare const TabGroup: <T extends string, K extends string>({ tabs, spacing, activeTabKey, onTabChange, }: TabGroupProps<T, K>) => JSX.Element;
388
+
389
+ declare type SetPasswordFormProps = {
390
+ fields: UIFields<SetPasswordFields>;
391
+ logoUrl: string;
392
+ isLoading?: boolean;
393
+ validations: SetPasswordRuleValidation[];
394
+ onSubmit: (values: SetPasswordFields) => void;
395
+ onBack: () => void;
396
+ };
397
+ declare const SetPasswordForm: ({ logoUrl, fields, validations, onBack, onSubmit, isLoading, }: SetPasswordFormProps) => JSX.Element;
398
+
399
+ declare type AcquisitionFormProps<T extends object> = {
400
+ fields: UIFields<T>;
401
+ logoUrl: string;
402
+ isLoading?: boolean;
403
+ onSubmit: (values: T) => void;
404
+ onLinkButtonClick?: Callback;
405
+ };
406
+ declare const AcquisitionForm: <T extends object>({ logoUrl, fields, onSubmit, onLinkButtonClick, isLoading, }: AcquisitionFormProps<T>) => JSX.Element;
407
+
408
+ declare type LoginFields = {
409
+ email: string;
410
+ password: string;
411
+ rememberMe: boolean;
412
+ };
413
+
414
+ declare type VerificationCodeForm = {
415
+ code: string;
416
+ };
417
+ declare type AuthMethod = 'email' | 'sms';
418
+ declare type TwoFactorAuthProps = {
419
+ logoUrl: string;
420
+ onNext?: (authMethod: AuthMethod) => Promise<void>;
421
+ onSubmit?: (values: VerificationCodeForm) => void;
422
+ onBack?: () => void;
423
+ };
424
+ declare const TwoFactorAuth: ({ logoUrl, onSubmit, onBack, onNext }: TwoFactorAuthProps) => JSX.Element;
425
+
426
+ declare type LoginFormProps = {
427
+ fields: UIFields<LoginFields>;
428
+ logoUrl: string;
429
+ isLoading?: boolean;
430
+ twoFactorAuthConfig?: {
431
+ twoFactorShow: boolean;
432
+ twoFactorAuthProps: TwoFactorAuthProps;
433
+ };
434
+ onSubmit: (values: LoginFields) => void;
435
+ onSignUpButtonClick?: Callback;
436
+ onForgotPasswordButtonClick?: Callback;
437
+ };
438
+ declare const LoginForm: ({ logoUrl, fields, onSubmit, onSignUpButtonClick, isLoading, twoFactorAuthConfig, onForgotPasswordButtonClick, }: LoginFormProps) => JSX.Element;
439
+
440
+ declare type ImportantLink = {
441
+ text: string;
442
+ href: string;
443
+ };
444
+ declare type HeaderProps = {
445
+ links?: ImportantLink[];
446
+ logoUrl: string;
447
+ tabs: TabGroupProps['tabs'];
448
+ withAvatar?: {
449
+ props: AvatarDropdownProps<string>;
450
+ };
451
+ onActionButtonClick?: Callback;
452
+ };
453
+ declare const Header: ({ logoUrl, links, onActionButtonClick, tabs, withAvatar }: HeaderProps) => JSX.Element;
454
+
455
+ declare type EmailAddressFields = {
456
+ email: string;
457
+ };
458
+ declare type ForgotPasswordFormProps = {
459
+ logoUrl: string;
460
+ isLoading?: boolean;
461
+ onSubmit?: (values: EmailAddressFields) => void;
462
+ onBack?: Callback;
463
+ };
464
+ declare const ForgotPasswordForm: ({ logoUrl, onBack, onSubmit, isLoading, }: ForgotPasswordFormProps) => JSX.Element;
465
+
466
+ declare type DefaultTemplateProps = {
467
+ header: HeaderProps;
468
+ banner?: BannerProps;
469
+ renderContent: () => JSX.Element;
470
+ };
471
+ declare const DefaultTemplate: ({ banner, header, renderContent }: DefaultTemplateProps) => JSX.Element;
472
+
473
+ declare type AuthDrawerContentType = 'sign-up' | 'sign-in' | 'set-password' | 'forgot-password';
474
+ declare type AuthDrawerContentProps = {
475
+ type: AuthDrawerContentType;
476
+ acquisitionFormConfig: AcquisitionFormProps<any>;
477
+ loginFormConfig: LoginFormProps;
478
+ forgotPasswordConfig: ForgotPasswordFormProps;
479
+ setPasswordConfig: SetPasswordFormProps;
480
+ };
481
+
482
+ declare type RegistrationPageProps = {
483
+ templateConfig: DefaultTemplateProps;
484
+ drawerConfig: Pick<DrawerProps, 'open' | 'onClose'>;
485
+ drawerContentConfig: AuthDrawerContentProps;
486
+ };
487
+ declare const AuthPage: ({ templateConfig, drawerContentConfig, drawerConfig, }: RegistrationPageProps) => JSX.Element;
488
+
489
+ interface Helpers {
490
+ goToNextStep: () => void;
491
+ goToPrevStep: () => void;
492
+ reset: () => void;
493
+ canGoToNextStep: boolean;
494
+ canGoToPrevStep: boolean;
495
+ setStep: Dispatch<SetStateAction<number>>;
496
+ }
497
+ declare const useStep: (maxStep: number) => [number, Helpers];
498
+
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"
@@ -1 +0,0 @@
1
- export declare const page = "page";
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { DrawerProps } from '../../molecules/Drawer/styles';
3
- import { AcquisitionFormProps } from '../../organisms';
4
- import { DefaultTemplateProps } from '../../templates';
5
- export declare type RegistrationPageProps<T extends object> = {
6
- templateConfig: DefaultTemplateProps;
7
- acquisitionFormConfig: AcquisitionFormProps<T>;
8
- drawerConfig: Pick<DrawerProps, 'open' | 'onClose'>;
9
- };
10
- export declare const RegistrationPage: <T extends object>({ templateConfig, acquisitionFormConfig, drawerConfig, }: RegistrationPageProps<T>) => JSX.Element;
@@ -1 +0,0 @@
1
- export declare const page = "page";
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { DrawerProps } from '../../molecules/Drawer/styles';
3
- import { AcquisitionFormProps } from '../../organisms';
4
- import { DefaultTemplateProps } from '../../templates';
5
- export declare type RegistrationPageProps<T extends object> = {
6
- templateConfig: DefaultTemplateProps;
7
- acquisitionFormConfig: AcquisitionFormProps<T>;
8
- drawerConfig: Pick<DrawerProps, 'open' | 'onClose'>;
9
- };
10
- export declare const RegistrationPage: <T extends object>({ templateConfig, acquisitionFormConfig, drawerConfig, }: RegistrationPageProps<T>) => JSX.Element;