@zealicsolutions/web-ui 0.2.143 → 0.3.1
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 +27 -27
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
- package/dist/cjs/src/atoms/Buttons/IconButton.d.ts +1 -1
- package/dist/cjs/src/atoms/Circle/Circle.d.ts +0 -1
- package/dist/cjs/src/atoms/Input/Input.d.ts +1 -3
- package/dist/cjs/src/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/cjs/src/atoms/RadioButtons/RadioButtons.d.ts +21 -40
- package/dist/cjs/src/atoms/RadioButtons/RadioButtons.stories.d.ts +8 -22
- package/dist/cjs/src/atoms/RadioButtons/RadioOption.d.ts +3 -6
- package/dist/cjs/src/atoms/RadioButtons/helpers.d.ts +3 -9
- package/dist/cjs/src/atoms/RadioButtons/styles.d.ts +7 -7
- package/dist/cjs/src/atoms/RichTextViewer/types.d.ts +0 -1
- package/dist/cjs/src/atoms/Select/Select.d.ts +14 -19
- package/dist/cjs/src/atoms/Select/Select.stories.d.ts +1 -14
- package/dist/cjs/src/containers/MoleculeItem.d.ts +0 -1
- package/dist/cjs/src/containers/mock-data.d.ts +0 -1
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +11 -38
- package/dist/cjs/src/containers/types/types.d.ts +4 -7
- package/dist/cjs/src/contexts/MlrRichTextViewerContext/types.d.ts +0 -3
- package/dist/cjs/src/contexts/index.d.ts +0 -3
- package/dist/cjs/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/cjs/src/helpers/validations.d.ts +0 -7
- package/dist/cjs/src/molecules/Button/Button.d.ts +2 -1
- package/dist/cjs/src/molecules/Button/Button.stories.d.ts +2 -2
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +1 -18
- package/dist/cjs/src/molecules/CheckboxField/CheckboxGroup.d.ts +1 -5
- package/dist/cjs/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/cjs/src/molecules/Image/Image.d.ts +2 -3
- package/dist/cjs/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +1 -18
- package/dist/cjs/src/molecules/PdfDocument/PdfDocument.d.ts +1 -0
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +16 -41
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +10 -51
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +2 -32
- package/dist/cjs/src/molecules/TabGroup/TabGroup.d.ts +4 -2
- package/dist/cjs/src/molecules/TabGroup/styles.d.ts +3 -3
- package/dist/cjs/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/index.d.ts +0 -1
- package/dist/cjs/src/organisms/Consent/Consent.stories.d.ts +2 -2
- package/dist/cjs/src/typescript.d.ts +0 -6
- package/dist/esm/index.js +27 -27
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
- package/dist/esm/src/atoms/Buttons/IconButton.d.ts +1 -1
- package/dist/esm/src/atoms/Circle/Circle.d.ts +0 -1
- package/dist/esm/src/atoms/Input/Input.d.ts +1 -3
- package/dist/esm/src/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/esm/src/atoms/RadioButtons/RadioButtons.d.ts +21 -40
- package/dist/esm/src/atoms/RadioButtons/RadioButtons.stories.d.ts +8 -22
- package/dist/esm/src/atoms/RadioButtons/RadioOption.d.ts +3 -6
- package/dist/esm/src/atoms/RadioButtons/helpers.d.ts +3 -9
- package/dist/esm/src/atoms/RadioButtons/styles.d.ts +7 -7
- package/dist/esm/src/atoms/RichTextViewer/types.d.ts +0 -1
- package/dist/esm/src/atoms/Select/Select.d.ts +14 -19
- package/dist/esm/src/atoms/Select/Select.stories.d.ts +1 -14
- package/dist/esm/src/containers/MoleculeItem.d.ts +0 -1
- package/dist/esm/src/containers/mock-data.d.ts +0 -1
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +11 -38
- package/dist/esm/src/containers/types/types.d.ts +4 -7
- package/dist/esm/src/contexts/MlrRichTextViewerContext/types.d.ts +0 -3
- package/dist/esm/src/contexts/index.d.ts +0 -3
- package/dist/esm/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/esm/src/helpers/validations.d.ts +0 -7
- package/dist/esm/src/molecules/Button/Button.d.ts +2 -1
- package/dist/esm/src/molecules/Button/Button.stories.d.ts +2 -2
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +1 -18
- package/dist/esm/src/molecules/CheckboxField/CheckboxGroup.d.ts +1 -5
- package/dist/esm/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/esm/src/molecules/Image/Image.d.ts +2 -3
- package/dist/esm/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +1 -18
- package/dist/esm/src/molecules/PdfDocument/PdfDocument.d.ts +1 -0
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +16 -41
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +10 -51
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +2 -32
- package/dist/esm/src/molecules/TabGroup/TabGroup.d.ts +4 -2
- package/dist/esm/src/molecules/TabGroup/styles.d.ts +3 -3
- package/dist/esm/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/esm/src/molecules/index.d.ts +0 -1
- package/dist/esm/src/organisms/Consent/Consent.stories.d.ts +2 -2
- package/dist/esm/src/typescript.d.ts +0 -6
- package/dist/index.d.ts +117 -245
- package/package.json +5 -9
- package/dist/cjs/src/atoms/Input/helpers.d.ts +0 -18
- package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +0 -11
- package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +0 -11
- package/dist/cjs/src/contexts/hooks/useButtonActionsContext.d.ts +0 -1
- package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.d.ts +0 -20
- package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +0 -9
- package/dist/esm/src/atoms/Input/helpers.d.ts +0 -18
- package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +0 -11
- package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +0 -11
- package/dist/esm/src/contexts/hooks/useButtonActionsContext.d.ts +0 -1
- package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.d.ts +0 -20
- package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentStory } from '@storybook/react';
|
|
2
2
|
import { TextButtonProps } from 'atoms/Buttons/TextButton';
|
|
3
3
|
import { FC } from 'react';
|
|
4
4
|
import { IconButton as IconButtonComponent } from './IconButton';
|
|
@@ -11,6 +11,6 @@ declare const _default: {
|
|
|
11
11
|
}, never>;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
14
|
-
export declare const TouchableOpacity:
|
|
15
|
-
export declare const TextButton:
|
|
16
|
-
export declare const IconButton:
|
|
14
|
+
export declare const TouchableOpacity: ComponentStory<FC<TouchableOpacityProps>>;
|
|
15
|
+
export declare const TextButton: ComponentStory<FC<TextButtonProps>>;
|
|
16
|
+
export declare const IconButton: ComponentStory<typeof IconButtonComponent>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ThemeColors } from 'theme';
|
|
3
3
|
import { IconNames, TouchableOpacityProps } from 'atoms';
|
|
4
|
-
import
|
|
4
|
+
import { Callback } from 'typescript';
|
|
5
5
|
export declare type IconButtonProps = {
|
|
6
6
|
name: IconNames;
|
|
7
7
|
size?: number;
|
|
@@ -5,5 +5,4 @@ export declare type CircleBoxProps = {
|
|
|
5
5
|
type: CircleType;
|
|
6
6
|
};
|
|
7
7
|
export declare const Circle: ({ index, type }: CircleBoxProps) => JSX.Element;
|
|
8
|
-
export declare const CirclesWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
9
8
|
export {};
|
|
@@ -3,7 +3,6 @@ import { InputFieldTypes } from 'fieldsConfiguration/types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { ThemeColors } from 'theme/types';
|
|
5
5
|
import type { Callback, StylesType } from 'typescript';
|
|
6
|
-
import { MaskConfig } from './helpers';
|
|
7
6
|
export declare type InputFieldInternalConfigProps = Partial<{
|
|
8
7
|
textColor: ThemeColors | string;
|
|
9
8
|
textFontSize: number;
|
|
@@ -32,6 +31,5 @@ export declare type InputProps = {
|
|
|
32
31
|
onChange?: (value: string) => void;
|
|
33
32
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
34
33
|
internalConfig?: InputFieldInternalConfigProps;
|
|
35
|
-
config?: MaskConfig;
|
|
36
34
|
};
|
|
37
|
-
export declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig,
|
|
35
|
+
export declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, ...rest }: InputProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
|
|
|
3
3
|
import { InputProps } from './Input';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig,
|
|
6
|
+
component: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, ...rest }: InputProps) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Input: StoryFn<InputProps>;
|
|
@@ -1,56 +1,37 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RadioGroup } from '@mui/material';
|
|
3
|
-
import { RefCallBack } from 'react-hook-form/dist/types';
|
|
4
2
|
import { SizesTypes, ThemeColors } from 'theme';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
export declare type RadioButtonInternalConfigProps = Partial<{
|
|
3
|
+
import { StylesType } from 'typescript';
|
|
4
|
+
export declare type RadioButtonInternalConfigProps = {
|
|
8
5
|
selectedRadioOptionBackgroundColor: ThemeColors | string;
|
|
9
6
|
selectedRadioOptionIndicatorColor: ThemeColors | string;
|
|
10
7
|
buttonPadding: number;
|
|
11
8
|
textPadding: number;
|
|
12
9
|
styles: StylesType;
|
|
13
10
|
wrapperStyles: StylesType;
|
|
14
|
-
buttonOptionSpacing
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
buttonOptionSpacing?: SizesTypes;
|
|
12
|
+
};
|
|
13
|
+
export declare type RadioButtonType<T extends string = string> = {
|
|
14
|
+
id: T;
|
|
15
|
+
label?: string;
|
|
16
|
+
error?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
isRichText?: boolean;
|
|
19
|
+
};
|
|
17
20
|
export declare type RadioButtonsProps<T extends string> = Partial<{
|
|
18
|
-
|
|
19
|
-
name: string;
|
|
20
|
-
value: T;
|
|
21
|
-
options: SelectOption[];
|
|
22
|
-
onBlur: Callback;
|
|
21
|
+
isEditMode: boolean;
|
|
23
22
|
onChange: (value: T) => void;
|
|
23
|
+
value: T;
|
|
24
24
|
isRow: boolean;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isEditMode: boolean;
|
|
28
|
-
isRichText: boolean;
|
|
25
|
+
items: RadioButtonType<T>[];
|
|
26
|
+
name: string;
|
|
29
27
|
internalConfig: RadioButtonInternalConfigProps;
|
|
30
28
|
}>;
|
|
31
|
-
export declare const RadioButtons: <T extends string>({
|
|
32
|
-
|
|
33
|
-
name: string;
|
|
34
|
-
value: T;
|
|
35
|
-
options: SelectOption[];
|
|
36
|
-
onBlur: Callback;
|
|
29
|
+
export declare const RadioButtons: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: Partial<{
|
|
30
|
+
isEditMode: boolean;
|
|
37
31
|
onChange: (value: T) => void;
|
|
32
|
+
value: T;
|
|
38
33
|
isRow: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
isRichText: boolean;
|
|
43
|
-
internalConfig: Partial<{
|
|
44
|
-
selectedRadioOptionBackgroundColor: ThemeColors | string;
|
|
45
|
-
selectedRadioOptionIndicatorColor: ThemeColors | string;
|
|
46
|
-
buttonPadding: number;
|
|
47
|
-
textPadding: number;
|
|
48
|
-
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
49
|
-
wrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
50
|
-
buttonOptionSpacing: SizesTypes;
|
|
51
|
-
radioGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
52
|
-
}>;
|
|
34
|
+
items: RadioButtonType<T>[];
|
|
35
|
+
name: string;
|
|
36
|
+
internalConfig: RadioButtonInternalConfigProps;
|
|
53
37
|
}>) => JSX.Element;
|
|
54
|
-
export declare const RadioGroupWrapper: import("styled-components").StyledComponent<typeof RadioGroup, import("styled-components").DefaultTheme, StyledTransientProps<{
|
|
55
|
-
isRow: boolean;
|
|
56
|
-
}> & OverrideStyles, never>;
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentStory } from '@storybook/react';
|
|
3
3
|
import { RadioButtons as RadioButtonsComponent } from './RadioButtons';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: <T extends string>({
|
|
7
|
-
|
|
8
|
-
name: string;
|
|
9
|
-
value: T;
|
|
10
|
-
options: import("..").SelectOption[];
|
|
11
|
-
onBlur: import("../../typescript").Callback;
|
|
6
|
+
component: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: Partial<{
|
|
7
|
+
isEditMode: boolean;
|
|
12
8
|
onChange: (value: T) => void;
|
|
9
|
+
value: T;
|
|
13
10
|
isRow: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isRichText: boolean;
|
|
18
|
-
internalConfig: Partial<{
|
|
19
|
-
selectedRadioOptionBackgroundColor: string;
|
|
20
|
-
selectedRadioOptionIndicatorColor: string;
|
|
21
|
-
buttonPadding: number;
|
|
22
|
-
textPadding: number;
|
|
23
|
-
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
24
|
-
wrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
25
|
-
buttonOptionSpacing: import("theme").SizesTypes;
|
|
26
|
-
radioGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
|
27
|
-
}>;
|
|
11
|
+
items: import("./RadioButtons").RadioButtonType<T>[];
|
|
12
|
+
name: string;
|
|
13
|
+
internalConfig: import("./RadioButtons").RadioButtonInternalConfigProps;
|
|
28
14
|
}>) => JSX.Element;
|
|
29
15
|
};
|
|
30
16
|
export default _default;
|
|
31
|
-
export declare const RadioButtons:
|
|
17
|
+
export declare const RadioButtons: ComponentStory<typeof RadioButtonsComponent>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RadioButtonInternalConfigProps,
|
|
2
|
+
import { RadioButtonInternalConfigProps, RadioButtonType } from 'atoms';
|
|
3
3
|
declare type RadioOptionProps = {
|
|
4
|
-
|
|
5
|
-
isError?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
4
|
+
item: RadioButtonType;
|
|
7
5
|
isEditMode?: boolean;
|
|
8
|
-
isRichText?: boolean;
|
|
9
6
|
internalConfig?: RadioButtonInternalConfigProps;
|
|
10
7
|
};
|
|
11
|
-
export declare const RadioOption: ({
|
|
8
|
+
export declare const RadioOption: ({ item, internalConfig, isEditMode }: RadioOptionProps) => JSX.Element;
|
|
12
9
|
export {};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { RadioButtonInternalConfigProps } from 'atoms';
|
|
2
|
-
import
|
|
1
|
+
import { RadioButtonInternalConfigProps, RadioButtonType } from 'atoms';
|
|
2
|
+
import { StylesType } from 'typescript';
|
|
3
3
|
declare type RadioOptionStylesConfig = {
|
|
4
4
|
textStyles: StylesType;
|
|
5
|
-
groupWrapperStyles: StylesType;
|
|
6
5
|
radioIconWrapperStyles: StylesType;
|
|
7
6
|
radioLabelWrapperStyles: StylesType;
|
|
8
7
|
};
|
|
9
|
-
declare
|
|
10
|
-
isError: boolean;
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
internalConfig: RadioButtonInternalConfigProps;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const getRadioOptionStyles: ({ isError, disabled, internalConfig, }: GetRadioOptionStylesProps) => RadioOptionStylesConfig;
|
|
8
|
+
export declare const getRadioOptionStyles: (item: RadioButtonType, internalConfig?: RadioButtonInternalConfigProps) => RadioOptionStylesConfig;
|
|
15
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FormControlLabel, Radio } from '@mui/material';
|
|
2
|
-
import
|
|
3
|
-
export declare const RadioLabelWrapper: import("styled-components").StyledComponent<typeof FormControlLabel, import("styled-components").DefaultTheme,
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export declare const RadioIconWrapper: import("styled-components").StyledComponent<typeof Radio, import("styled-components").DefaultTheme,
|
|
2
|
+
import { OverrideStyles } from 'typescript';
|
|
3
|
+
export declare const RadioLabelWrapper: import("styled-components").StyledComponent<typeof FormControlLabel, import("styled-components").DefaultTheme, {
|
|
4
|
+
error: boolean;
|
|
5
|
+
} & OverrideStyles, never>;
|
|
6
|
+
export declare const RadioIconWrapper: import("styled-components").StyledComponent<typeof Radio, import("styled-components").DefaultTheme, {
|
|
7
7
|
disabled: boolean;
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
error: boolean;
|
|
9
|
+
} & OverrideStyles, never>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ThemeColors } from 'theme';
|
|
3
|
-
import
|
|
4
|
-
import { RefCallBack } from 'react-hook-form/dist/types';
|
|
3
|
+
import { StylesType } from 'typescript';
|
|
5
4
|
export declare type SelectOption = {
|
|
6
5
|
id: string;
|
|
7
6
|
label: string;
|
|
8
|
-
value?: string;
|
|
9
|
-
config?: AnyObject;
|
|
10
7
|
};
|
|
11
8
|
export declare type SelectInternalConfigurationOptions = {
|
|
12
9
|
placeholderTextColor: ThemeColors | string;
|
|
@@ -18,18 +15,16 @@ export declare type SelectInternalConfigurationOptions = {
|
|
|
18
15
|
wrapperStyles: StylesType;
|
|
19
16
|
styles: StylesType;
|
|
20
17
|
};
|
|
21
|
-
export declare type SelectProps =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}>;
|
|
35
|
-
export declare const Select: ({ ref, onBlur, onChange, value, placeholder, options, disabled, optionsPresentation, isError, selectInternalConfig, isRichText, }: SelectProps) => JSX.Element;
|
|
18
|
+
export declare type SelectProps = {
|
|
19
|
+
value?: string;
|
|
20
|
+
optionsPresentation?: boolean;
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
options?: SelectOption[];
|
|
25
|
+
isError?: boolean;
|
|
26
|
+
isEditMode?: boolean;
|
|
27
|
+
selectInternalConfig?: SelectInternalConfigurationOptions;
|
|
28
|
+
isRichText?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare const Select: ({ onChange, value, placeholder, options, disabled, optionsPresentation, isError, selectInternalConfig, isRichText, }: SelectProps) => JSX.Element;
|
|
@@ -3,20 +3,7 @@ import { StoryFn } from '@storybook/react';
|
|
|
3
3
|
import { SelectProps } from './Select';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({
|
|
7
|
-
ref: import("react-hook-form").RefCallBack;
|
|
8
|
-
onBlur: import("../../typescript").Callback;
|
|
9
|
-
value: string;
|
|
10
|
-
optionsPresentation: boolean;
|
|
11
|
-
onChange: (value: string) => void;
|
|
12
|
-
placeholder: string;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
options: import("./Select").SelectOption[];
|
|
15
|
-
isError: boolean;
|
|
16
|
-
isEditMode: boolean;
|
|
17
|
-
selectInternalConfig: import("./Select").SelectInternalConfigurationOptions;
|
|
18
|
-
isRichText: boolean;
|
|
19
|
-
}>) => JSX.Element;
|
|
6
|
+
component: ({ onChange, value, placeholder, options, disabled, optionsPresentation, isError, selectInternalConfig, isRichText, }: SelectProps) => JSX.Element;
|
|
20
7
|
};
|
|
21
8
|
export default _default;
|
|
22
9
|
export declare const Select: StoryFn<SelectProps>;
|
|
@@ -3,7 +3,6 @@ import { Molecule } from 'containers';
|
|
|
3
3
|
import { TabGroupProps } from 'molecules';
|
|
4
4
|
export declare const getFullLink: (url: string) => string;
|
|
5
5
|
export declare const navigateToPage: (url: string) => void;
|
|
6
|
-
export declare const downloadFile: (url?: string, name?: string) => Promise<void>;
|
|
7
6
|
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, }: Molecule & {
|
|
8
7
|
tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
|
|
9
8
|
}) => JSX.Element;
|
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
import { SelectOption } from 'atoms';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps, CheckboxFieldProps, ImageProps, InputFieldProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
|
3
3
|
import { UseFormReturn } from 'react-hook-form';
|
|
4
4
|
import { CSSProperties } from 'styled-components';
|
|
5
|
-
import type {
|
|
6
|
-
import { ContainerComponentProps } from './types';
|
|
7
|
-
export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
|
|
8
|
-
export declare type DownloadFile = {
|
|
9
|
-
url: string;
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
declare type LinkAction = LinkAttributes;
|
|
13
|
-
declare type PopupDrawerAction = ContainerComponentProps;
|
|
14
|
-
declare type DownloadAction = DownloadFile;
|
|
15
|
-
declare type SubmitAction = AnyObject;
|
|
16
|
-
declare type CancelAction = AnyObject;
|
|
17
|
-
declare type ResetAction = AnyObject;
|
|
18
|
-
declare type DestroyAction = AnyObject;
|
|
19
|
-
declare type Action = {
|
|
20
|
-
type: ActionTypes;
|
|
21
|
-
} & Partial<{
|
|
22
|
-
link: LinkAction;
|
|
23
|
-
popup: PopupDrawerAction;
|
|
24
|
-
drawer: PopupDrawerAction;
|
|
25
|
-
download: DownloadAction;
|
|
26
|
-
submit: SubmitAction;
|
|
27
|
-
cancel: CancelAction;
|
|
28
|
-
reset: ResetAction;
|
|
29
|
-
destroy: DestroyAction;
|
|
30
|
-
}>;
|
|
5
|
+
import type { Nullable, StrictUnion } from 'typescript';
|
|
31
6
|
export declare type ImageAttributes = {
|
|
32
7
|
attributeType: 'image';
|
|
33
8
|
imageSource: string;
|
|
34
9
|
};
|
|
35
10
|
export interface TextAttributes {
|
|
36
|
-
id?: string;
|
|
37
11
|
attributeType: 'text';
|
|
38
12
|
isRichText: boolean;
|
|
39
13
|
text: string;
|
|
@@ -42,10 +16,6 @@ export interface VideoAttributes {
|
|
|
42
16
|
attributeType: 'video';
|
|
43
17
|
videoSource: string;
|
|
44
18
|
}
|
|
45
|
-
export interface ActionAttributes {
|
|
46
|
-
attributeType: 'action';
|
|
47
|
-
action: Action;
|
|
48
|
-
}
|
|
49
19
|
export interface LinkAttributes {
|
|
50
20
|
id: string;
|
|
51
21
|
attributeType: 'link';
|
|
@@ -55,7 +25,6 @@ export interface LinkAttributes {
|
|
|
55
25
|
name: string;
|
|
56
26
|
}
|
|
57
27
|
export interface SelectAttributes {
|
|
58
|
-
id?: string;
|
|
59
28
|
attributeType: 'select';
|
|
60
29
|
value: string;
|
|
61
30
|
options: SelectOption[];
|
|
@@ -73,7 +42,6 @@ export interface BaseMolecule {
|
|
|
73
42
|
id: string;
|
|
74
43
|
instance: 'molecule';
|
|
75
44
|
type: MoleculeTypes;
|
|
76
|
-
metadata?: AnyObject;
|
|
77
45
|
}
|
|
78
46
|
export interface ImageMolecule extends BaseMolecule {
|
|
79
47
|
type: 'image';
|
|
@@ -100,7 +68,7 @@ export interface ButtonMolecule extends BaseMolecule {
|
|
|
100
68
|
type: 'button';
|
|
101
69
|
attributes: {
|
|
102
70
|
title: TextAttributes;
|
|
103
|
-
|
|
71
|
+
buttonLink: LinkAttributes;
|
|
104
72
|
};
|
|
105
73
|
config: {
|
|
106
74
|
props: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
|
|
@@ -126,8 +94,14 @@ export interface TabGroupMolecule extends BaseMolecule {
|
|
|
126
94
|
type: 'header_tab_group';
|
|
127
95
|
config: {
|
|
128
96
|
props: TabGroupProps;
|
|
129
|
-
wide:
|
|
130
|
-
|
|
97
|
+
wide: {
|
|
98
|
+
containerStyle?: CSSProperties;
|
|
99
|
+
containerProps?: Record<string, unknown>;
|
|
100
|
+
};
|
|
101
|
+
compact: {
|
|
102
|
+
containerStyle?: CSSProperties;
|
|
103
|
+
containerProps?: Record<string, unknown>;
|
|
104
|
+
};
|
|
131
105
|
};
|
|
132
106
|
}
|
|
133
107
|
export interface TextInputMolecule extends BaseMolecule {
|
|
@@ -185,4 +159,3 @@ export interface CheckboxFieldMolecule extends BaseMolecule {
|
|
|
185
159
|
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule> & {
|
|
186
160
|
form?: UseFormReturn<any>;
|
|
187
161
|
};
|
|
188
|
-
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TabGroupProps } from 'molecules';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { CSSProperties } from 'styled-components';
|
|
4
|
-
import { ValidationMode } from 'react-hook-form';
|
|
5
|
-
import type { AnyObject, StylesType } from 'typescript';
|
|
6
4
|
import { Molecule } from './moleculeTypes';
|
|
5
|
+
import { ValidationMode } from 'react-hook-form';
|
|
6
|
+
import { StylesType } from 'typescript';
|
|
7
7
|
export declare type ContainerType = 'row' | 'column' | 'slider' | 'form';
|
|
8
|
-
export declare type ContainerPositionType = 'fixed' | 'sticky' | 'static'
|
|
8
|
+
export declare type ContainerPositionType = 'fixed' | 'sticky' | 'static';
|
|
9
9
|
export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
|
|
10
10
|
export declare type ContainerPropsType = Partial<{
|
|
11
11
|
position: ContainerPositionType;
|
|
@@ -30,14 +30,11 @@ export declare type ContainerComponentProps = {
|
|
|
30
30
|
id: string;
|
|
31
31
|
instance: 'container';
|
|
32
32
|
type: ContainerType;
|
|
33
|
-
items: (ContainerComponentProps | Molecule)[];
|
|
34
33
|
config: {
|
|
35
34
|
wide?: AdditionalContainerProps;
|
|
36
35
|
compact?: AdditionalContainerProps;
|
|
37
36
|
props?: ContainerPropsType;
|
|
38
37
|
};
|
|
38
|
+
items: (ContainerComponentProps | Molecule)[];
|
|
39
39
|
tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
|
|
40
|
-
metadata?: AnyObject;
|
|
41
|
-
attributes?: AnyObject;
|
|
42
|
-
containerLibraryId?: string;
|
|
43
40
|
};
|
|
@@ -2,6 +2,3 @@ export * from './MlrRichTextViewerContext/MlrRichTextViewerProvider';
|
|
|
2
2
|
export * from './MlrRichTextViewerContext/MlrRichTextViewerContext';
|
|
3
3
|
export * from './MlrRichTextViewerContext/types';
|
|
4
4
|
export * from './hooks/useMlrRichTextViewerContext';
|
|
5
|
-
export * from './hooks/useButtonActionsContext';
|
|
6
|
-
export * from './ButtonActionsContext/ButtonActionsContext';
|
|
7
|
-
export * from './ButtonActionsContext/ButtonActionsContextProvider';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ControllerProps } from 'react-hook-form';
|
|
3
3
|
import { SelectOption } from 'atoms';
|
|
4
4
|
import { InputFieldProps, SelectFieldProps } from 'molecules';
|
|
5
|
-
export declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | '
|
|
5
|
+
export declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | '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;
|
|
@@ -5,11 +5,4 @@ export declare const phoneNumberValidation: RegExp;
|
|
|
5
5
|
export declare const numberValidation: RegExp;
|
|
6
6
|
export declare const emailValidation: RegExp;
|
|
7
7
|
export declare const textValidation: RegExp;
|
|
8
|
-
export declare const dateValidation: RegExp;
|
|
9
|
-
export declare const usZipCode: RegExp;
|
|
10
8
|
export declare const getInputValidation: (type?: InputFieldTypes) => ValidationRule<RegExp> | undefined;
|
|
11
|
-
export declare const postCodeMask: RegExp[];
|
|
12
|
-
export declare const dayMonthYearDateMask: (string | RegExp)[];
|
|
13
|
-
export declare const monthYearDateMask: (string | RegExp)[];
|
|
14
|
-
export declare const phoneNumberMask: (string | RegExp)[];
|
|
15
|
-
export declare const removeMaskFromString: (inputString: string) => string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FontSizesTypes, SizesTypes, ThemeColors } from 'theme';
|
|
3
|
-
import type { Callback
|
|
3
|
+
import type { Callback } from 'typescript';
|
|
4
|
+
import { StylesType } from 'typescript';
|
|
4
5
|
export declare type ButtonVariant = 'primary' | 'secondary' | 'text' | 'custom';
|
|
5
6
|
export declare type ButtonType = 'button' | 'submit' | 'reset';
|
|
6
7
|
export declare type BaseButtonProps = PropsWithChildren<{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { StoryFn } from '@storybook/react';
|
|
3
|
-
import { Button as ButtonComponent } from 'molecules';
|
|
3
|
+
import { Button as ButtonComponent } from 'molecules/Button/Button';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ text: textProp, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: import("molecules").ButtonProps) => JSX.Element | null;
|
|
6
|
+
component: ({ text: textProp, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: import("molecules/Button/Button").ButtonProps) => JSX.Element | null;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Button: StoryFn<typeof ButtonComponent>;
|
|
@@ -26,24 +26,7 @@ declare const _default: {
|
|
|
26
26
|
}>;
|
|
27
27
|
labelsProps: import("molecules").FieldLabelsProps;
|
|
28
28
|
name: string;
|
|
29
|
-
rules: Omit<
|
|
30
|
-
required: string | import("react-hook-form").ValidationRule<boolean>;
|
|
31
|
-
min: import("react-hook-form").ValidationRule<string | number>;
|
|
32
|
-
max: import("react-hook-form").ValidationRule<string | number>;
|
|
33
|
-
maxLength: import("react-hook-form").ValidationRule<number>;
|
|
34
|
-
minLength: import("react-hook-form").ValidationRule<number>;
|
|
35
|
-
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
|
36
|
-
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
|
37
|
-
valueAsNumber: boolean;
|
|
38
|
-
valueAsDate: boolean;
|
|
39
|
-
value: any;
|
|
40
|
-
setValueAs: (value: any) => any;
|
|
41
|
-
shouldUnregister?: boolean | undefined;
|
|
42
|
-
onChange?: ((event: any) => void) | undefined;
|
|
43
|
-
onBlur?: ((event: any) => void) | undefined;
|
|
44
|
-
disabled: boolean;
|
|
45
|
-
deps: string | string[];
|
|
46
|
-
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
|
29
|
+
rules: Omit<import("react-hook-form").RegisterOptions<import("react-hook-form").FieldValues, string>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
|
47
30
|
control: import("react-hook-form").Control<any, any>;
|
|
48
31
|
required: boolean;
|
|
49
32
|
optional: boolean;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RefCallBack } from 'react-hook-form/dist/types';
|
|
3
|
-
import type { Callback } from 'typescript';
|
|
4
2
|
import { CheckboxesProps } from './CheckboxField';
|
|
5
3
|
export declare type CheckboxGroupProps = Partial<{
|
|
6
|
-
ref: RefCallBack;
|
|
7
|
-
onBlur: Callback;
|
|
8
4
|
onChange: (checkedIds: string[]) => void;
|
|
9
5
|
checkboxesProps: CheckboxesProps;
|
|
10
6
|
}>;
|
|
11
|
-
export declare const CheckboxGroup: ({
|
|
7
|
+
export declare const CheckboxGroup: ({ onChange, checkboxesProps }: CheckboxGroupProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentStory } from '@storybook/react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Drawer as DrawerComponent } from './Drawer';
|
|
4
4
|
declare const _default: {
|
|
@@ -6,4 +6,4 @@ declare const _default: {
|
|
|
6
6
|
component: ({ children, closeIconColor, ...props }: React.PropsWithChildren<import("./styles").DrawerProps>) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
|
-
export declare const Drawer:
|
|
9
|
+
export declare const Drawer: ComponentStory<typeof DrawerComponent>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StylesType } from 'typescript';
|
|
3
3
|
export declare type ImageProps = {
|
|
4
4
|
src: string;
|
|
5
5
|
} & Partial<{
|
|
6
6
|
id: string;
|
|
7
7
|
altText: string;
|
|
8
8
|
link: string;
|
|
9
|
-
onClick: Callback;
|
|
10
9
|
width: number;
|
|
11
10
|
height: number;
|
|
12
11
|
cornerRadius: number;
|
|
13
12
|
behaveAs: 'background' | 'regular';
|
|
14
13
|
styles: StylesType;
|
|
15
14
|
}>;
|
|
16
|
-
export declare const Image: ({ src,
|
|
15
|
+
export declare const Image: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
|
|
|
3
3
|
import { Image as ImageComponent } from './Image';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ src,
|
|
6
|
+
component: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: import("./Image").ImageProps) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Image: StoryFn<typeof ImageComponent>;
|
|
@@ -6,24 +6,7 @@ declare const _default: {
|
|
|
6
6
|
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, }: Partial<{
|
|
7
7
|
name: string;
|
|
8
8
|
control: import("react-hook-form").Control<any, any>;
|
|
9
|
-
rules: Omit<
|
|
10
|
-
required: string | import("react-hook-form").ValidationRule<boolean>;
|
|
11
|
-
min: import("react-hook-form").ValidationRule<string | number>;
|
|
12
|
-
max: import("react-hook-form").ValidationRule<string | number>;
|
|
13
|
-
maxLength: import("react-hook-form").ValidationRule<number>;
|
|
14
|
-
minLength: import("react-hook-form").ValidationRule<number>;
|
|
15
|
-
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
|
16
|
-
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
|
17
|
-
valueAsNumber: boolean;
|
|
18
|
-
valueAsDate: boolean;
|
|
19
|
-
value: any;
|
|
20
|
-
setValueAs: (value: any) => any;
|
|
21
|
-
shouldUnregister?: boolean | undefined;
|
|
22
|
-
onChange?: ((event: any) => void) | undefined;
|
|
23
|
-
onBlur?: ((event: any) => void) | undefined;
|
|
24
|
-
disabled: boolean;
|
|
25
|
-
deps: string | string[];
|
|
26
|
-
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
|
9
|
+
rules: Omit<import("react-hook-form").RegisterOptions<import("react-hook-form").FieldValues, string>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
|
27
10
|
required: boolean;
|
|
28
11
|
optional: boolean;
|
|
29
12
|
defaultValue: string;
|