@zealicsolutions/web-ui 0.3.81 → 0.3.83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +16 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/atoms/RichTextViewer/RichTextViewer.d.ts +2 -1
- package/dist/cjs/src/atoms/TextWrapper/TextWrapper.d.ts +1 -0
- package/dist/cjs/src/containers/Container.d.ts +2 -2
- package/dist/cjs/src/containers/Container.stories.d.ts +2 -1
- package/dist/cjs/src/containers/FormStepContainer.d.ts +3 -2
- package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/cjs/src/containers/helpers.d.ts +2 -0
- package/dist/cjs/src/containers/hooks/useStateClickModifierHandler.d.ts +2 -0
- package/dist/cjs/src/containers/hooks/useStateListenerValue.d.ts +5 -0
- package/dist/cjs/src/containers/hooks/useStateViewModifierHandler.d.ts +2 -0
- package/dist/cjs/src/containers/mock-data.d.ts +1 -0
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +24 -5
- package/dist/cjs/src/containers/types/types.d.ts +23 -2
- package/dist/cjs/src/contexts/StateContext/StateContext.d.ts +7 -0
- package/dist/cjs/src/contexts/StateContext/StateContextProvider.d.ts +7 -0
- package/dist/cjs/src/contexts/hooks/index.d.ts +1 -0
- package/dist/cjs/src/contexts/hooks/useStateContext.d.ts +1 -0
- package/dist/cjs/src/fieldsConfiguration/mock.d.ts +2 -0
- package/dist/cjs/src/molecules/Button/Button.d.ts +4 -1
- package/dist/cjs/src/molecules/Button/Button.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.d.ts +2 -1
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/Consent/ConsentMolecule.d.ts +2 -1
- package/dist/cjs/src/molecules/FieldLabels/FieldLabels.d.ts +2 -2
- package/dist/cjs/src/molecules/Image/Image.d.ts +4 -1
- package/dist/cjs/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/InputField/InputField.d.ts +2 -1
- package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/Link/Link.d.ts +2 -1
- package/dist/cjs/src/molecules/Link/Link.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/PasswordSetup/PasswordSetup.d.ts +18 -0
- package/dist/cjs/src/molecules/PasswordSetup/PasswordSetup.stories.d.ts +8 -0
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +3 -1
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.d.ts +2 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/TabGroup/TabGroup.d.ts +2 -1
- package/dist/cjs/src/molecules/TabGroup/TabGroup.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/TextMolecule/TextMolecule.d.ts +2 -1
- package/dist/cjs/src/molecules/TextMolecule/TextMolecule.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/Video/Video.d.ts +2 -1
- package/dist/cjs/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/cjs/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/atoms/RichTextViewer/RichTextViewer.d.ts +2 -1
- package/dist/esm/src/atoms/TextWrapper/TextWrapper.d.ts +1 -0
- package/dist/esm/src/containers/Container.d.ts +2 -2
- package/dist/esm/src/containers/Container.stories.d.ts +2 -1
- package/dist/esm/src/containers/FormStepContainer.d.ts +3 -2
- package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/esm/src/containers/helpers.d.ts +2 -0
- package/dist/esm/src/containers/hooks/useStateClickModifierHandler.d.ts +2 -0
- package/dist/esm/src/containers/hooks/useStateListenerValue.d.ts +5 -0
- package/dist/esm/src/containers/hooks/useStateViewModifierHandler.d.ts +2 -0
- package/dist/esm/src/containers/mock-data.d.ts +1 -0
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +24 -5
- package/dist/esm/src/containers/types/types.d.ts +23 -2
- package/dist/esm/src/contexts/StateContext/StateContext.d.ts +7 -0
- package/dist/esm/src/contexts/StateContext/StateContextProvider.d.ts +7 -0
- package/dist/esm/src/contexts/hooks/index.d.ts +1 -0
- package/dist/esm/src/contexts/hooks/useStateContext.d.ts +1 -0
- package/dist/esm/src/fieldsConfiguration/mock.d.ts +2 -0
- package/dist/esm/src/molecules/Button/Button.d.ts +4 -1
- package/dist/esm/src/molecules/Button/Button.stories.d.ts +1 -1
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.d.ts +2 -1
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/Consent/ConsentMolecule.d.ts +2 -1
- package/dist/esm/src/molecules/FieldLabels/FieldLabels.d.ts +2 -2
- package/dist/esm/src/molecules/Image/Image.d.ts +4 -1
- package/dist/esm/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/esm/src/molecules/InputField/InputField.d.ts +2 -1
- package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/Link/Link.d.ts +2 -1
- package/dist/esm/src/molecules/Link/Link.stories.d.ts +1 -1
- package/dist/esm/src/molecules/PasswordSetup/PasswordSetup.d.ts +18 -0
- package/dist/esm/src/molecules/PasswordSetup/PasswordSetup.stories.d.ts +8 -0
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +3 -1
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/SelectField/SelectField.d.ts +2 -1
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/TabGroup/TabGroup.d.ts +2 -1
- package/dist/esm/src/molecules/TabGroup/TabGroup.stories.d.ts +1 -1
- package/dist/esm/src/molecules/TextMolecule/TextMolecule.d.ts +2 -1
- package/dist/esm/src/molecules/TextMolecule/TextMolecule.stories.d.ts +1 -1
- package/dist/esm/src/molecules/Video/Video.d.ts +2 -1
- package/dist/esm/src/molecules/Video/Video.stories.d.ts +1 -1
- package/dist/esm/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/index.d.ts +78 -22
- package/package.json +1 -1
@@ -15,5 +15,6 @@ export declare type RichTextEditorProps = Partial<{
|
|
15
15
|
extraTextProps: TextProps;
|
16
16
|
renderElementWrapperComponent: (props: AnyObject) => JSX.Element;
|
17
17
|
renderElementWrapperProps: AnyObject;
|
18
|
+
htmlElementId: string;
|
18
19
|
}>;
|
19
|
-
export declare const RichTextViewer: ({ value, color, textStyles, font, numberOfLines, extraTextProps, renderElementWrapperComponent, renderElementWrapperProps, }: RichTextEditorProps) => JSX.Element | null;
|
20
|
+
export declare const RichTextViewer: ({ value, color, textStyles, font, numberOfLines, extraTextProps, renderElementWrapperComponent, renderElementWrapperProps, htmlElementId, }: RichTextEditorProps) => JSX.Element | null;
|
@@ -14,6 +14,7 @@ export declare type TextProps = {
|
|
14
14
|
textAlign?: TextAlign;
|
15
15
|
behaveAs?: 'text' | 'button';
|
16
16
|
seoTag?: SeoTags;
|
17
|
+
htmlElementId?: string;
|
17
18
|
};
|
18
19
|
export declare type TextWrapperProps = PropsWithChildren<TextProps>;
|
19
20
|
export declare const TextWrapper: ({ children, seoTag, ...textProps }: TextWrapperProps) => JSX.Element;
|
@@ -52,13 +52,13 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
|
|
52
52
|
activeChildrenIds: string[];
|
53
53
|
activeOrganismIds: string[];
|
54
54
|
}>;
|
55
|
-
metadata:
|
55
|
+
metadata: import("containers").MetadataType;
|
56
56
|
isMobile: boolean;
|
57
57
|
}> & {
|
58
58
|
children?: ReactNode;
|
59
59
|
} & {
|
60
60
|
id: string;
|
61
|
-
}) => JSX.Element;
|
61
|
+
}) => JSX.Element | null;
|
62
62
|
export declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, formData, setFormData, isMobile, }: ContainerComponentProps & {
|
63
63
|
formData?: AnyObject | undefined;
|
64
64
|
setFormData?: Dispatch<SetStateAction<AnyObject>> | undefined;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Meta, StoryFn } from '@storybook/react';
|
2
|
-
import { ContainerComponent, ContainerComponentProps } from 'containers';
|
2
|
+
import { ContainerComponent, ContainerComponentProps, StateConfigType } from 'containers';
|
3
3
|
declare const meta: Meta<typeof ContainerComponent>;
|
4
4
|
export default meta;
|
5
5
|
declare type Story = StoryFn<ContainerComponentProps>;
|
6
6
|
export declare const Container: Story;
|
7
|
+
export declare const stateObject: StateConfigType;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { FormStepContainerProps } from 'containers';
|
1
|
+
import { FormStepContainerProps, MetadataType } from 'containers';
|
2
2
|
import { PropsWithChildren } from 'react';
|
3
3
|
export declare type StepContainerProps = PropsWithChildren<Partial<FormStepContainerProps>> & {
|
4
4
|
id: string;
|
5
|
+
metadata?: MetadataType;
|
5
6
|
};
|
6
|
-
export declare const FormStepContainer: ({ order, id }: StepContainerProps) => JSX.Element | null;
|
7
|
+
export declare const FormStepContainer: ({ order, id, metadata }: StepContainerProps) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import { TabGroupProps } from 'molecules';
|
|
3
3
|
export declare const getFullLink: (url: string) => string;
|
4
4
|
export declare const navigateToPage: (url: string) => void;
|
5
5
|
export declare const downloadFile: (url?: string, name?: string) => Promise<void>;
|
6
|
-
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id, formData, setFormData, isMobile, }: Molecule & {
|
6
|
+
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id, formData, setFormData, isMobile, validations, metadata, }: Molecule & {
|
7
7
|
tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
|
8
8
|
isMobile?: boolean | undefined;
|
9
9
|
}) => JSX.Element | null;
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { ContainerScrollBehaviourType, Padding } from 'containers/types/types';
|
2
2
|
import { ThemeSizesType } from 'theme';
|
3
|
+
import { Nullable } from 'typescript';
|
3
4
|
export declare const getScrollBehaviour: (scrollBehaviour?: ContainerScrollBehaviourType) => "overflow-y: scroll" | "overflow-x: scroll" | "overflow: visible" | "overflow: unset";
|
4
5
|
export declare const getPadding: (padding: Padding, sizes: ThemeSizesType) => string;
|
6
|
+
export declare const isInViewport: (element: Nullable<HTMLElement>) => boolean;
|
@@ -11,3 +11,4 @@ export declare const rowRepeaterContainerSingle: ContainerComponentProps;
|
|
11
11
|
export declare const columnRepeaterContainer: ContainerComponentProps;
|
12
12
|
export declare const outlinedColumnContainer: ContainerComponentProps;
|
13
13
|
export declare const headerContainer: ContainerComponentProps;
|
14
|
+
export declare const headerContainerWithTabs: ContainerComponentProps;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { LinkVariant, SelectOption } from 'atoms';
|
2
2
|
import { AdditionalTabContainerProps, ButtonProps, CheckboxFieldProps, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
3
|
+
import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
|
3
4
|
import { Dispatch, SetStateAction } from 'react';
|
4
5
|
import { UseFormReturn } from 'react-hook-form';
|
5
6
|
import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
|
6
|
-
import { ConditionConfig, ContainerComponentProps } from './types';
|
7
|
+
import { ConditionConfig, ContainerComponentProps, MetadataType } from './types';
|
7
8
|
export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
|
8
9
|
export declare type DownloadFile = {
|
9
10
|
url: string;
|
@@ -28,7 +29,7 @@ declare type Action = {
|
|
28
29
|
reset: ResetAction;
|
29
30
|
destroy: DestroyAction;
|
30
31
|
}>;
|
31
|
-
export declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown';
|
32
|
+
export declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
|
32
33
|
export declare type ImageAttributes = {
|
33
34
|
attributeType: 'image';
|
34
35
|
imageSource: string;
|
@@ -87,12 +88,12 @@ export interface ColorAttributes {
|
|
87
88
|
attributeType: 'color';
|
88
89
|
color: string;
|
89
90
|
}
|
90
|
-
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link';
|
91
|
+
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link' | 'password_setup_field';
|
91
92
|
export interface BaseMolecule {
|
92
93
|
id: string;
|
93
94
|
instance: 'molecule';
|
94
95
|
type: MoleculeTypes;
|
95
|
-
metadata?:
|
96
|
+
metadata?: MetadataType;
|
96
97
|
}
|
97
98
|
export interface ImageMolecule extends BaseMolecule {
|
98
99
|
type: 'image';
|
@@ -232,9 +233,27 @@ export interface LinkMolecule extends BaseMolecule {
|
|
232
233
|
}>;
|
233
234
|
};
|
234
235
|
}
|
235
|
-
export
|
236
|
+
export interface PasswordSetupMolecule extends BaseMolecule {
|
237
|
+
type: 'password_setup_field';
|
238
|
+
attributes: Partial<{
|
239
|
+
passwordFieldLabel: TextAttributes;
|
240
|
+
reenteredPasswordFieldLabel: TextAttributes;
|
241
|
+
passwordFieldRequired: BooleanAttributes;
|
242
|
+
reenteredPasswordFieldRequired: BooleanAttributes;
|
243
|
+
dataModelField: DataConnectionAttributes;
|
244
|
+
}>;
|
245
|
+
config: {
|
246
|
+
props: {
|
247
|
+
validationLabel?: string;
|
248
|
+
passwordInputProps: InputFieldProps;
|
249
|
+
reenteredPasswordInputProps: InputFieldProps;
|
250
|
+
};
|
251
|
+
};
|
252
|
+
}
|
253
|
+
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule | PasswordSetupMolecule> & Partial<{
|
236
254
|
form: UseFormReturn<any>;
|
237
255
|
formData: AnyObject;
|
238
256
|
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
257
|
+
validations: PasswordRuleValidation[];
|
239
258
|
}>;
|
240
259
|
export {};
|
@@ -10,6 +10,26 @@ export declare type ContainerTemplateType = 'row_content_container';
|
|
10
10
|
export declare type WrappedContainerType = Extract<ContainerType, 'slider' | 'form' | 'form_step'>;
|
11
11
|
export declare type ContainerPositionType = 'fixed' | 'sticky' | 'static' | 'relative';
|
12
12
|
export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
|
13
|
+
export declare type StateActionType = 'visible' | 'disabled';
|
14
|
+
export declare type StateEventType = 'click' | 'view';
|
15
|
+
export declare type StateListenerConfigType = {
|
16
|
+
role: 'stateListener';
|
17
|
+
stateKey: string;
|
18
|
+
stateValue: string | boolean;
|
19
|
+
defaultState: Partial<Record<StateActionType, boolean>>;
|
20
|
+
action: Partial<Record<StateActionType, boolean>>;
|
21
|
+
};
|
22
|
+
export declare type StateModifierConfigType = {
|
23
|
+
role: 'stateModifier';
|
24
|
+
stateKey: string;
|
25
|
+
event: StateEventType;
|
26
|
+
};
|
27
|
+
export declare type MetadataStateConfig = StateListenerConfigType | StateModifierConfigType;
|
28
|
+
export declare type MetadataType = AnyObject & {
|
29
|
+
stateConfig: MetadataStateConfig[];
|
30
|
+
notEditable?: boolean;
|
31
|
+
hasOwnButton?: boolean;
|
32
|
+
};
|
13
33
|
export declare type SliderProps = {
|
14
34
|
autoplay?: boolean;
|
15
35
|
autoplayDuration?: number;
|
@@ -48,7 +68,7 @@ export declare type ContainerProps = PropsWithChildren<Partial<{
|
|
48
68
|
wide: AdditionalContainerProps;
|
49
69
|
compact: AdditionalContainerProps;
|
50
70
|
props: ContainerPropsType;
|
51
|
-
metadata:
|
71
|
+
metadata: MetadataType;
|
52
72
|
isMobile: boolean;
|
53
73
|
}>>;
|
54
74
|
export declare type ContainerComponentProps = {
|
@@ -62,7 +82,7 @@ export declare type ContainerComponentProps = {
|
|
62
82
|
props: ContainerPropsType;
|
63
83
|
}>;
|
64
84
|
tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
|
65
|
-
metadata?:
|
85
|
+
metadata?: MetadataType;
|
66
86
|
attributes?: AnyObject;
|
67
87
|
containerLibraryId?: string;
|
68
88
|
isMobile?: boolean;
|
@@ -83,3 +103,4 @@ export declare type ConditionConfig = Nullable<{
|
|
83
103
|
segmentationType: SegmentationType;
|
84
104
|
criteriaList: ConditionCriteria[];
|
85
105
|
}>;
|
106
|
+
export declare type StateConfigType = Record<string, Nullable<boolean | string>>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { StateConfigType } from 'containers';
|
3
|
+
export declare type StateContextType = {
|
4
|
+
stateConfig: StateConfigType;
|
5
|
+
stateHandler?: (updatedStateConfig: StateConfigType) => void;
|
6
|
+
};
|
7
|
+
export declare const StateContext: import("react").Context<StateContextType>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { StateConfigType } from 'containers';
|
2
|
+
import { PropsWithChildren } from 'react';
|
3
|
+
export declare type StateContextProviderProps = PropsWithChildren<{
|
4
|
+
initStateConfig: StateConfigType;
|
5
|
+
stateHandler?: (updatedStateConfig: StateConfigType) => void;
|
6
|
+
}>;
|
7
|
+
export declare const StateContextProvider: ({ initStateConfig, children, stateHandler, }: StateContextProviderProps) => JSX.Element;
|
@@ -2,3 +2,4 @@ export { useFormStepContext } from './useFormStepContext';
|
|
2
2
|
export { useButtonActionsContext } from './useButtonActionsContext';
|
3
3
|
export { useMlrRichTextViewerContext } from './useMlrRichTextViewerContext';
|
4
4
|
export { useOrganismContext } from './useOrganismContext';
|
5
|
+
export { useStateContext } from './useStateContext';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useStateContext: () => import("contexts/StateContext/StateContext").StateContextType;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { UIFields } from 'fieldsConfiguration/types';
|
2
|
+
import { PasswordFields } from 'molecules/PasswordSetup/PasswordSetup';
|
2
3
|
import { LoginFields } from 'organisms/LoginForm/types';
|
3
4
|
import { SetPasswordFields } from 'organisms/SetPasswordForm/types';
|
4
5
|
export declare const acquisitionFormMockFields: UIFields<Record<string, string>>;
|
5
6
|
export declare const setPasswordMockFields: UIFields<SetPasswordFields>;
|
7
|
+
export declare const passwordMockFields: UIFields<PasswordFields>;
|
6
8
|
export declare const loginMockFields: UIFields<LoginFields>;
|
7
9
|
export declare const sectionMockFields: UIFields<Record<string, string>>;
|
8
10
|
export declare const profileInformationMockForm: {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { MetadataStateConfig } from 'containers';
|
1
2
|
import { PropsWithChildren } from 'react';
|
2
3
|
import { FontSizesTypes, SizesTypes, ThemeColors } from 'theme';
|
3
4
|
import type { Callback, StylesType } from 'typescript';
|
@@ -37,5 +38,7 @@ export declare type ButtonProps = BaseButtonProps & {
|
|
37
38
|
isRichText?: boolean;
|
38
39
|
containerStyle?: StylesType;
|
39
40
|
buttonStyle?: StylesType;
|
41
|
+
stateConfig?: MetadataStateConfig[];
|
42
|
+
htmlElementId?: string;
|
40
43
|
};
|
41
|
-
export declare const Button: ({ text, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: ButtonProps) => JSX.Element | null;
|
44
|
+
export declare const Button: ({ text, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, stateConfig, htmlElementId, ...props }: ButtonProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Button as ButtonComponent } from 'molecules';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ text, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: import("molecules").ButtonProps) => JSX.Element | null;
|
5
|
+
component: ({ text, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, stateConfig, htmlElementId, ...props }: import("molecules").ButtonProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Button: StoryFn<typeof ButtonComponent>;
|
@@ -29,5 +29,6 @@ export declare type CheckboxFieldProps = Partial<{
|
|
29
29
|
state: FormStateType;
|
30
30
|
defaultValue: string[];
|
31
31
|
formData: AnyObject;
|
32
|
+
htmlElementId: string;
|
32
33
|
}>;
|
33
|
-
export declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: CheckboxFieldProps) => JSX.Element | null;
|
34
|
+
export declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, htmlElementId, }: CheckboxFieldProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { CheckboxField as CheckboxFieldComponent } from 'molecules';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: Partial<{
|
5
|
+
component: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, htmlElementId, }: Partial<{
|
6
6
|
checkboxesProps: Partial<{
|
7
7
|
checkboxGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
8
8
|
checkboxFieldWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
@@ -51,6 +51,7 @@ declare const _default: {
|
|
51
51
|
state: import("../..").FormStateType;
|
52
52
|
defaultValue: string[];
|
53
53
|
formData: import("../../typescript").AnyObject;
|
54
|
+
htmlElementId: string;
|
54
55
|
}>) => JSX.Element | null;
|
55
56
|
};
|
56
57
|
export default _default;
|
@@ -4,6 +4,7 @@ declare type ConsentMoleculeProps = {
|
|
4
4
|
attributes: ConsentFieldMolecule['attributes'];
|
5
5
|
config: ConsentFieldMolecule['config'];
|
6
6
|
formData?: AnyObject;
|
7
|
+
htmlElementId?: string;
|
7
8
|
};
|
8
|
-
export declare const ConsentMolecule: ({ attributes, formData, config }: ConsentMoleculeProps) => JSX.Element | null;
|
9
|
+
export declare const ConsentMolecule: ({ attributes, formData, config, htmlElementId, }: ConsentMoleculeProps) => JSX.Element | null;
|
9
10
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { StylesType } from 'typescript';
|
2
1
|
import { FontSizesTypes, ThemeColors } from 'theme';
|
2
|
+
import type { Nullable, StylesType } from 'typescript';
|
3
3
|
export declare type FieldRuleLabelTypes = 'OPTIONAL' | 'REQUIRED';
|
4
4
|
export declare type LabelInternalConfig = {
|
5
5
|
fontVariant: FontSizesTypes;
|
@@ -33,7 +33,7 @@ export declare type FieldLabelsProps = {
|
|
33
33
|
tooltipText?: string;
|
34
34
|
isError?: boolean;
|
35
35
|
isTooltipVisible?: boolean;
|
36
|
-
ruleLabel?: FieldRuleLabelTypes
|
36
|
+
ruleLabel?: Nullable<FieldRuleLabelTypes>;
|
37
37
|
labelInternalConfig?: LabelInternalConfig;
|
38
38
|
ruleLabelInternalConfig?: RuleLabelInternalConfig;
|
39
39
|
tooltipInternalConfig?: TooltipInternalConfig;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { MetadataStateConfig } from 'containers';
|
1
2
|
import { Callback, StylesType } from 'typescript';
|
2
3
|
export declare type ImageProps = {
|
3
4
|
src: string;
|
@@ -11,5 +12,7 @@ export declare type ImageProps = {
|
|
11
12
|
cornerRadius: number;
|
12
13
|
behaveAs: 'background' | 'regular';
|
13
14
|
styles: StylesType;
|
15
|
+
stateConfig: MetadataStateConfig[];
|
16
|
+
htmlElementId: string;
|
14
17
|
}>;
|
15
|
-
export declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element | null;
|
18
|
+
export declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, stateConfig, htmlElementId, }: ImageProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Image as ImageComponent } from './Image';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: import("./Image").ImageProps) => JSX.Element | null;
|
5
|
+
component: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, stateConfig, htmlElementId, }: import("./Image").ImageProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Image: StoryFn<typeof ImageComponent>;
|
@@ -16,5 +16,6 @@ export declare type InputFieldProps = Partial<{
|
|
16
16
|
conditionConfig: ConditionConfig;
|
17
17
|
state: FormStateType;
|
18
18
|
formData: AnyObject;
|
19
|
+
htmlElementId: string;
|
19
20
|
}>;
|
20
|
-
export declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: InputFieldProps) => JSX.Element | null;
|
21
|
+
export declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, htmlElementId, }: InputFieldProps) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import { StoryFn } from '@storybook/react';
|
|
3
3
|
import { InputFieldProps } from './InputField';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: Partial<{
|
6
|
+
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, htmlElementId, }: Partial<{
|
7
7
|
name: string;
|
8
8
|
control: import("react-hook-form").Control<any, any>;
|
9
9
|
rules: Omit<Partial<{
|
@@ -62,6 +62,7 @@ declare const _default: {
|
|
62
62
|
conditionConfig: import("../..").ConditionConfig;
|
63
63
|
state: import("../..").FormStateType;
|
64
64
|
formData: import("typescript").AnyObject;
|
65
|
+
htmlElementId: string;
|
65
66
|
}>) => JSX.Element | null;
|
66
67
|
};
|
67
68
|
export default _default;
|
@@ -3,5 +3,6 @@ export declare type LinkProps = Omit<TextButtonProps, 'children'> & Partial<{
|
|
3
3
|
text: string;
|
4
4
|
isRichText: boolean;
|
5
5
|
href: string;
|
6
|
+
htmlElementId: string;
|
6
7
|
}>;
|
7
|
-
export declare const Link: ({ text, isRichText, ...props }: LinkProps) => JSX.Element | null;
|
8
|
+
export declare const Link: ({ text, isRichText, htmlElementId, ...props }: LinkProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Link as LinkComponent } from 'molecules';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ text, isRichText, ...props }: import("molecules").LinkProps) => JSX.Element | null;
|
5
|
+
component: ({ text, isRichText, htmlElementId, ...props }: import("molecules").LinkProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Link: StoryFn<typeof LinkComponent>;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { UIFields } from 'fieldsConfiguration';
|
2
|
+
import { MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
4
|
+
export declare type PasswordRuleValidation = {
|
5
|
+
label: string;
|
6
|
+
rule: MaxRuleValidation | MinRuleValidation;
|
7
|
+
};
|
8
|
+
export declare type PasswordFields = {
|
9
|
+
password: string;
|
10
|
+
reenteredPassword?: string;
|
11
|
+
};
|
12
|
+
export declare type PasswordSetupProps = {
|
13
|
+
fields: UIFields<PasswordFields>;
|
14
|
+
validations: PasswordRuleValidation[];
|
15
|
+
form?: UseFormReturn<any>;
|
16
|
+
validationLabel?: string;
|
17
|
+
};
|
18
|
+
export declare const PasswordSetup: ({ fields, validations, form, validationLabel, }: PasswordSetupProps) => JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ComponentStory } from '@storybook/react';
|
2
|
+
import { PasswordSetup as PasswordSetupComponent } from './PasswordSetup';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: ({ fields, validations, form, validationLabel, }: import("./PasswordSetup").PasswordSetupProps) => JSX.Element;
|
6
|
+
};
|
7
|
+
export default _default;
|
8
|
+
export declare const PasswordSetup: ComponentStory<typeof PasswordSetupComponent>;
|
@@ -17,8 +17,9 @@ export declare type RadioButtonFieldProps<T extends string> = Partial<{
|
|
17
17
|
conditionConfig: ConditionConfig;
|
18
18
|
state: FormStateType;
|
19
19
|
formData: AnyObject;
|
20
|
+
htmlElementId: string;
|
20
21
|
}>;
|
21
|
-
export declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
|
22
|
+
export declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, htmlElementId, }: Partial<{
|
22
23
|
name: string;
|
23
24
|
rules: ControllerProps['rules'];
|
24
25
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
@@ -63,4 +64,5 @@ export declare const RadioButtonField: <T extends string>({ name, rules, styles,
|
|
63
64
|
conditionConfig: ConditionConfig;
|
64
65
|
state: FormStateType;
|
65
66
|
formData: AnyObject;
|
67
|
+
htmlElementId: string;
|
66
68
|
}>) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { ComponentStory } from '@storybook/react';
|
|
2
2
|
import { RadioButtonField as RadioButtonFieldComponent } from './RadioButtonField';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
|
5
|
+
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, htmlElementId, }: Partial<{
|
6
6
|
name: string;
|
7
7
|
rules: Omit<Partial<{
|
8
8
|
required: string | import("react-hook-form").ValidationRule<boolean>;
|
@@ -64,6 +64,7 @@ declare const _default: {
|
|
64
64
|
conditionConfig: import("../..").ConditionConfig;
|
65
65
|
state: import("../..").FormStateType;
|
66
66
|
formData: import("typescript").AnyObject;
|
67
|
+
htmlElementId: string;
|
67
68
|
}>) => JSX.Element | null;
|
68
69
|
};
|
69
70
|
export default _default;
|
@@ -17,5 +17,6 @@ export declare type SelectFieldProps = Partial<{
|
|
17
17
|
conditionConfig: ConditionConfig;
|
18
18
|
state: FormStateType;
|
19
19
|
formData: AnyObject;
|
20
|
+
htmlElementId: string;
|
20
21
|
}>;
|
21
|
-
export declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, }: SelectFieldProps) => JSX.Element | null;
|
22
|
+
export declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, htmlElementId, }: SelectFieldProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import { StoryFn } from '@storybook/react';
|
|
2
2
|
import { SelectFieldProps } from './SelectField';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, }: Partial<{
|
5
|
+
component: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, htmlElementId, }: Partial<{
|
6
6
|
selectProps: Partial<{
|
7
7
|
ref: import("react-hook-form").RefCallBack;
|
8
8
|
onBlur: import("typescript").Callback;
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
45
45
|
conditionConfig: import("../..").ConditionConfig;
|
46
46
|
state: import("../..").FormStateType;
|
47
47
|
formData: import("typescript").AnyObject;
|
48
|
+
htmlElementId: string;
|
48
49
|
}>) => JSX.Element | null;
|
49
50
|
};
|
50
51
|
export default _default;
|
@@ -24,5 +24,6 @@ export declare type TabGroupProps<T = string, K = string> = {
|
|
24
24
|
wide?: AdditionalTabContainerProps;
|
25
25
|
compact?: AdditionalTabContainerProps;
|
26
26
|
isMobile?: boolean;
|
27
|
+
htmlElementId?: string;
|
27
28
|
};
|
28
|
-
export declare const TabGroup: <T extends string, K extends string>({ tabs, vertical, activeTabKey, onTabChange, tabTheme, wide, compact, tabSpacing, isMobile, ...props }: TabGroupProps<T, K>) => JSX.Element;
|
29
|
+
export declare const TabGroup: <T extends string, K extends string>({ tabs, vertical, activeTabKey, onTabChange, tabTheme, wide, compact, tabSpacing, isMobile, htmlElementId, ...props }: TabGroupProps<T, K>) => JSX.Element;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { TabGroupProps } from './TabGroup';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: <T extends string, K extends string>({ tabs, vertical, activeTabKey, onTabChange, tabTheme, wide, compact, tabSpacing, isMobile, ...props }: TabGroupProps<T, K>) => JSX.Element;
|
5
|
+
component: <T extends string, K extends string>({ tabs, vertical, activeTabKey, onTabChange, tabTheme, wide, compact, tabSpacing, isMobile, htmlElementId, ...props }: TabGroupProps<T, K>) => JSX.Element;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const TabGroup: StoryFn<TabGroupProps>;
|
@@ -13,5 +13,6 @@ export declare type TextMoleculeProps = Partial<{
|
|
13
13
|
isRichText: boolean;
|
14
14
|
styles: StylesType;
|
15
15
|
textAlign: 'center' | 'right' | 'left';
|
16
|
+
htmlElementId: string;
|
16
17
|
}> & Pick<TextProps, 'seoTag' | 'numberOfLines'>;
|
17
|
-
export declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
18
|
+
export declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, htmlElementId, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { TextMoleculeProps } from './TextMolecule';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
5
|
+
component: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, htmlElementId, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const TextMolecule: StoryFn<TextMoleculeProps>;
|
@@ -12,5 +12,6 @@ export declare type VideoProps = {
|
|
12
12
|
style: CSSProperties;
|
13
13
|
styles: StylesType;
|
14
14
|
template: FeedContentTemplateTypes;
|
15
|
+
htmlElementId: string;
|
15
16
|
}>;
|
16
|
-
export declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, }: VideoProps) => JSX.Element | null;
|
17
|
+
export declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, }: VideoProps) => JSX.Element | null;
|
@@ -2,7 +2,7 @@ import type { StoryFn } from '@storybook/react';
|
|
2
2
|
import { Video as VideoComponent } from './Video';
|
3
3
|
declare const _default: {
|
4
4
|
title: string;
|
5
|
-
component: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, }: import("./Video").VideoProps) => JSX.Element | null;
|
5
|
+
component: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, }: import("./Video").VideoProps) => JSX.Element | null;
|
6
6
|
};
|
7
7
|
export default _default;
|
8
8
|
export declare const Video: StoryFn<typeof VideoComponent>;
|
@@ -15,5 +15,5 @@ export declare const CloseButton: import("styled-components").StyledComponent<"d
|
|
15
15
|
disabled?: boolean | undefined;
|
16
16
|
} & {
|
17
17
|
children?: import("react").ReactNode;
|
18
|
-
} & Pick<FeedContentProps, "
|
18
|
+
} & Pick<FeedContentProps, "feedContentTemplate" | "withCloseIcon">, never>;
|
19
19
|
export declare const PdfWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<FeedContentProps, "showDefaultDocumentStyles">, never>;
|