@zealicsolutions/web-ui 0.0.8 → 0.0.9
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.
- package/dist/cjs/index.js +46 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/assets/index.d.ts +1 -0
- package/dist/cjs/src/atoms/GoogleMap/GoogleMap.d.ts +13 -0
- package/dist/cjs/src/atoms/GoogleMap/GoogleMap.stories.d.ts +12 -0
- package/dist/cjs/src/atoms/index.d.ts +1 -0
- package/dist/cjs/src/fieldsConfiguration/mock.d.ts +5 -0
- package/dist/cjs/src/fieldsConfiguration/utils.d.ts +2 -0
- package/dist/cjs/src/icons/Edit.d.ts +3 -0
- package/dist/cjs/src/icons/Save.d.ts +3 -0
- package/dist/cjs/src/icons/index.d.ts +2 -0
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/cjs/src/molecules/Drawer/Drawer.d.ts +1 -1
- package/dist/cjs/src/molecules/Drawer/Drawer.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/Drawer/styles.d.ts +13 -1
- package/dist/cjs/src/molecules/FieldMapper/FieldMapper.d.ts +3 -2
- package/dist/cjs/src/molecules/FieldSection/FieldSection.d.ts +10 -0
- package/dist/cjs/src/molecules/FieldSection/FieldSection.stories.d.ts +9 -0
- package/dist/cjs/src/molecules/SelectField/SelectField.d.ts +1 -1
- package/dist/cjs/src/molecules/index.d.ts +1 -0
- package/dist/cjs/src/organisms/AccountInformation/AccountInformation.d.ts +11 -0
- package/dist/cjs/src/organisms/ProfileInformation/ProfileInformation.d.ts +19 -0
- package/dist/cjs/src/organisms/ProfileInformation/ProfileInformation.stories.d.ts +9 -0
- package/dist/cjs/src/organisms/index.d.ts +1 -0
- package/dist/cjs/src/theme/provider.d.ts +4 -1
- package/dist/esm/index.js +46 -37
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/assets/index.d.ts +1 -0
- package/dist/esm/src/atoms/GoogleMap/GoogleMap.d.ts +13 -0
- package/dist/esm/src/atoms/GoogleMap/GoogleMap.stories.d.ts +12 -0
- package/dist/esm/src/atoms/index.d.ts +1 -0
- package/dist/esm/src/fieldsConfiguration/mock.d.ts +5 -0
- package/dist/esm/src/fieldsConfiguration/utils.d.ts +2 -0
- package/dist/esm/src/icons/Edit.d.ts +3 -0
- package/dist/esm/src/icons/Save.d.ts +3 -0
- package/dist/esm/src/icons/index.d.ts +2 -0
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/esm/src/molecules/Drawer/Drawer.d.ts +1 -1
- package/dist/esm/src/molecules/Drawer/Drawer.stories.d.ts +1 -1
- package/dist/esm/src/molecules/Drawer/styles.d.ts +13 -1
- package/dist/esm/src/molecules/FieldMapper/FieldMapper.d.ts +3 -2
- package/dist/esm/src/molecules/FieldSection/FieldSection.d.ts +10 -0
- package/dist/esm/src/molecules/FieldSection/FieldSection.stories.d.ts +9 -0
- package/dist/esm/src/molecules/SelectField/SelectField.d.ts +1 -1
- package/dist/esm/src/molecules/index.d.ts +1 -0
- package/dist/esm/src/organisms/AccountInformation/AccountInformation.d.ts +11 -0
- package/dist/esm/src/organisms/ProfileInformation/ProfileInformation.d.ts +19 -0
- package/dist/esm/src/organisms/ProfileInformation/ProfileInformation.stories.d.ts +9 -0
- package/dist/esm/src/organisms/index.d.ts +1 -0
- package/dist/esm/src/theme/provider.d.ts +4 -1
- package/dist/index.d.ts +57 -8
- package/package.json +2 -1
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap';
|
3
|
+
import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
|
4
|
+
export declare type MapPosition = {
|
5
|
+
lat: number;
|
6
|
+
lng: number;
|
7
|
+
};
|
8
|
+
export declare type GoogleMapProps = {
|
9
|
+
position: MapPosition;
|
10
|
+
} & WithScriptjsProps & WithGoogleMapProps;
|
11
|
+
export declare const GoogleMap: React.ComponentClass<{
|
12
|
+
position: MapPosition;
|
13
|
+
} & WithScriptjsProps & WithGoogleMapProps, any>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
/// <reference types="react-google-maps/types" />
|
3
|
+
import type { ComponentStory } from '@storybook/react';
|
4
|
+
import { GoogleMap as GoogleMapComponent } from './GoogleMap';
|
5
|
+
declare const _default: {
|
6
|
+
title: string;
|
7
|
+
component: import("react").ComponentClass<{
|
8
|
+
position: import("./GoogleMap").MapPosition;
|
9
|
+
} & import("react-google-maps/lib/withScriptjs").WithScriptjsProps & import("react-google-maps/lib/withGoogleMap").WithGoogleMapProps, any>;
|
10
|
+
};
|
11
|
+
export default _default;
|
12
|
+
export declare const GoogleMap: ComponentStory<typeof GoogleMapComponent>;
|
@@ -4,3 +4,8 @@ import { SetPasswordFields } from 'organisms/SetPasswordForm/types';
|
|
4
4
|
export declare const acquisitionFormMockFields: UIFields<any>;
|
5
5
|
export declare const setPasswordMockFields: UIFields<SetPasswordFields>;
|
6
6
|
export declare const loginMockFields: UIFields<LoginFields>;
|
7
|
+
export declare const sectionMockFields: UIFields<any>;
|
8
|
+
export declare const profileInformationMockForm: {
|
9
|
+
label: string;
|
10
|
+
fields: UIFields<any>;
|
11
|
+
}[];
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { UIFields } from 'fieldsConfiguration/types';
|
2
|
+
import { FieldSectionProps } from 'molecules';
|
2
3
|
import { DeepPartial, FieldValues, FormState } from 'react-hook-form';
|
3
4
|
export declare const getInitialValuesFromFields: <T extends object>(fields: UIFields<T>) => DeepPartial<T>;
|
4
5
|
export declare const isFormValid: <T extends FieldValues>(formState: FormState<T>) => boolean;
|
6
|
+
export declare const getFieldsFromFieldSections: <T extends object>(sections: Pick<FieldSectionProps<T>, "fields">[]) => UIFields<T>;
|
@@ -3,7 +3,7 @@ import { Control } from 'react-hook-form/dist/types';
|
|
3
3
|
import { CheckBoxProps } from '../../atoms';
|
4
4
|
export declare type CheckboxFieldProps = {
|
5
5
|
name: string;
|
6
|
-
control
|
6
|
+
control?: Control<any>;
|
7
7
|
defaultValue?: boolean;
|
8
8
|
checkboxProps: Omit<CheckBoxProps, 'error' | 'onClick' | 'value'>;
|
9
9
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
2
2
|
import { DrawerProps } from './styles';
|
3
|
-
export declare const Drawer: ({ children, ...props }: PropsWithChildren<DrawerProps>) => JSX.Element;
|
3
|
+
export declare const Drawer: ({ children, closeIconColor, ...props }: PropsWithChildren<DrawerProps>) => JSX.Element;
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { Drawer as DrawerComponent } from './Drawer';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ children, ...props }: React.PropsWithChildren<import("./styles").DrawerProps>) => JSX.Element;
|
6
|
+
component: ({ children, closeIconColor, ...props }: React.PropsWithChildren<import("./styles").DrawerProps>) => JSX.Element;
|
7
7
|
};
|
8
8
|
export default _default;
|
9
9
|
export declare const Drawer: ComponentStory<typeof DrawerComponent>;
|
@@ -1,9 +1,21 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { SizesTypes, ThemeColors } from 'theme/types';
|
1
3
|
import { Drawer as DrawerComponent, DrawerProps as DrawerComponentProps } from '@mui/material';
|
2
4
|
export declare type Anchor = 'top' | 'left' | 'bottom' | 'right';
|
3
5
|
export declare type DrawerProps = DrawerComponentProps & {
|
4
6
|
anchor: Anchor;
|
7
|
+
padding?: SizesTypes | number;
|
8
|
+
closeIconColor?: ThemeColors | string;
|
5
9
|
};
|
6
10
|
export declare const BaseDrawer: import("styled-components").StyledComponent<typeof DrawerComponent, import("styled-components").DefaultTheme, DrawerComponentProps & {
|
7
11
|
anchor: Anchor;
|
12
|
+
padding?: number | SizesTypes | undefined;
|
13
|
+
closeIconColor?: string | undefined;
|
14
|
+
}, never>;
|
15
|
+
export declare const IconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
16
|
+
activeOpacity?: number | undefined;
|
17
|
+
withoutOpacityEffect?: boolean | undefined;
|
18
|
+
disabled?: boolean | undefined;
|
19
|
+
} & {
|
20
|
+
children?: import("react").ReactNode;
|
8
21
|
}, never>;
|
9
|
-
export declare const IconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -3,7 +3,8 @@ import { Control } from 'react-hook-form/dist/types';
|
|
3
3
|
import { UIField } from '../../fieldsConfiguration';
|
4
4
|
export declare type FieldMapperProps<T extends object> = {
|
5
5
|
field: UIField<keyof T>;
|
6
|
-
|
6
|
+
isEditMode?: boolean;
|
7
|
+
control?: Control<T>;
|
7
8
|
spacer?: number;
|
8
9
|
};
|
9
|
-
export declare const FieldMapper: <T extends object>({ field, spacer, control, }: FieldMapperProps<T>) => JSX.Element;
|
10
|
+
export declare const FieldMapper: <T extends object>({ field, isEditMode, spacer, control, }: FieldMapperProps<T>) => JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Control } from 'react-hook-form/dist/types';
|
3
|
+
import { UIFields } from '../../fieldsConfiguration';
|
4
|
+
export declare type FieldSectionProps<T extends object> = {
|
5
|
+
label: string;
|
6
|
+
control?: Control<T>;
|
7
|
+
isEditMode?: boolean;
|
8
|
+
fields: UIFields<T>;
|
9
|
+
};
|
10
|
+
export declare const FieldSection: <T extends object>({ fields, label, isEditMode, control, }: FieldSectionProps<T>) => JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { ComponentStory } from '@storybook/react';
|
3
|
+
import { FieldSection as FieldSectionComponent } from './FieldSection';
|
4
|
+
declare const _default: {
|
5
|
+
title: string;
|
6
|
+
component: <T extends object>({ fields, label, isEditMode, control, }: import("./FieldSection").FieldSectionProps<T>) => JSX.Element;
|
7
|
+
};
|
8
|
+
export default _default;
|
9
|
+
export declare const FieldSection: ComponentStory<typeof FieldSectionComponent>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Control } from 'react-hook-form';
|
3
|
+
import { GoogleMapProps } from '../../atoms';
|
4
|
+
import { FieldSectionProps } from '../../molecules';
|
5
|
+
export declare type AccountInformationProps<T extends object> = {
|
6
|
+
fieldSections: Pick<FieldSectionProps<T>, 'fields' | 'label'>[];
|
7
|
+
control: Control<any>;
|
8
|
+
isEditMode?: boolean;
|
9
|
+
mapConfig: GoogleMapProps;
|
10
|
+
};
|
11
|
+
export declare const AccountInformation: <T extends object>({ fieldSections, control, isEditMode, mapConfig, }: AccountInformationProps<T>) => JSX.Element;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import type { Callback } from 'typescript';
|
3
|
+
import { AvatarProps } from '../../atoms';
|
4
|
+
import { TabProps } from '../../molecules/Tab/Tab';
|
5
|
+
export declare type ProfileInformationProps<TabKeys extends string> = {
|
6
|
+
backgroundImageUrl: string;
|
7
|
+
avatarProps: AvatarProps;
|
8
|
+
tabs: TabProps<string, TabKeys>[];
|
9
|
+
tabContents: Record<TabKeys, () => ReactNode>;
|
10
|
+
initialTabKey: TabKeys;
|
11
|
+
title: string;
|
12
|
+
editIcons?: {
|
13
|
+
isEditMode: boolean;
|
14
|
+
onSave: Callback;
|
15
|
+
onEdit: Callback;
|
16
|
+
onClose: Callback;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare const ProfileInformation: <TabKeys extends string>({ avatarProps, backgroundImageUrl, initialTabKey, tabs, title, editIcons, tabContents, }: ProfileInformationProps<TabKeys>) => JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { ComponentStory } from '@storybook/react';
|
3
|
+
import { ProfileInformation as ProfileInformationComponent } from './ProfileInformation';
|
4
|
+
declare const _default: {
|
5
|
+
title: string;
|
6
|
+
component: <TabKeys extends string>({ avatarProps, backgroundImageUrl, initialTabKey, tabs, title, editIcons, tabContents, }: import("./ProfileInformation").ProfileInformationProps<TabKeys>) => JSX.Element;
|
7
|
+
};
|
8
|
+
export default _default;
|
9
|
+
export declare const ProfileInformation: ComponentStory<typeof ProfileInformationComponent>;
|
@@ -3,4 +3,5 @@ export * from './AcquisitionForm/AcquisitionForm';
|
|
3
3
|
export * from './LoginForm/LoginForm';
|
4
4
|
export * from './TwoFactorAuth/TwoFactorAuth';
|
5
5
|
export * from './Header/Header';
|
6
|
+
export * from './ProfileInformation/ProfileInformation';
|
6
7
|
export * from './ForgotPasswordForm/ForgotPasswordForm';
|
@@ -1,2 +1,5 @@
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
2
|
-
|
2
|
+
import { DefaultTheme } from 'styled-components';
|
3
|
+
export declare const ZealThemeProvider: (props: PropsWithChildren<{
|
4
|
+
theme?: DefaultTheme;
|
5
|
+
}>) => JSX.Element;
|