@zealicsolutions/web-ui 0.3.82 → 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 +3 -3
- 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 +1 -1
- 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/types/types.d.ts +5 -5
- package/dist/cjs/src/contexts/StateContext/StateContext.d.ts +1 -0
- package/dist/cjs/src/contexts/StateContext/StateContextProvider.d.ts +2 -1
- 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/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/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/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 +1 -1
- 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/types/types.d.ts +5 -5
- package/dist/esm/src/contexts/StateContext/StateContext.d.ts +1 -0
- package/dist/esm/src/contexts/StateContext/StateContextProvider.d.ts +2 -1
- 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/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/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/index.d.ts +33 -18
- 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;
|
@@ -58,7 +58,7 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
|
|
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;
|
@@ -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, validations, }: 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;
|
@@ -13,14 +13,14 @@ export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | '
|
|
13
13
|
export declare type StateActionType = 'visible' | 'disabled';
|
14
14
|
export declare type StateEventType = 'click' | 'view';
|
15
15
|
export declare type StateListenerConfigType = {
|
16
|
-
|
16
|
+
role: 'stateListener';
|
17
17
|
stateKey: string;
|
18
|
-
stateValue: string;
|
19
|
-
defaultState: Record<StateActionType, boolean
|
20
|
-
action: Record<StateActionType, boolean
|
18
|
+
stateValue: string | boolean;
|
19
|
+
defaultState: Partial<Record<StateActionType, boolean>>;
|
20
|
+
action: Partial<Record<StateActionType, boolean>>;
|
21
21
|
};
|
22
22
|
export declare type StateModifierConfigType = {
|
23
|
-
|
23
|
+
role: 'stateModifier';
|
24
24
|
stateKey: string;
|
25
25
|
event: StateEventType;
|
26
26
|
};
|
@@ -2,5 +2,6 @@ import { StateConfigType } from 'containers';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
3
3
|
export declare type StateContextProviderProps = PropsWithChildren<{
|
4
4
|
initStateConfig: StateConfigType;
|
5
|
+
stateHandler?: (updatedStateConfig: StateConfigType) => void;
|
5
6
|
}>;
|
6
|
-
export declare const StateContextProvider: ({ initStateConfig, children }: StateContextProviderProps) => JSX.Element;
|
7
|
+
export declare const StateContextProvider: ({ initStateConfig, children, stateHandler, }: StateContextProviderProps) => JSX.Element;
|
@@ -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,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>;
|
@@ -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>;
|
package/dist/index.d.ts
CHANGED
@@ -10,7 +10,7 @@ import { StylesType, AnyObject as AnyObject$1, Callback as Callback$1, OverrideS
|
|
10
10
|
import { RefCallBack, Control as Control$1, ControllerProps as ControllerProps$1 } from 'react-hook-form/dist/types';
|
11
11
|
import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
|
12
12
|
import * as containers from 'containers';
|
13
|
-
import { FormStateType as FormStateType$1, ContainerComponentProps as ContainerComponentProps$1, Molecule as Molecule$1, ConditionConfig as ConditionConfig$1 } from 'containers';
|
13
|
+
import { FormStateType as FormStateType$1, ContainerComponentProps as ContainerComponentProps$1, Molecule as Molecule$1, ConditionConfig as ConditionConfig$1, MetadataStateConfig as MetadataStateConfig$1 } from 'containers';
|
14
14
|
import { FieldTypes as FieldTypes$1, UIFields as UIFields$1, InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
|
15
15
|
import { ThemeColors as ThemeColors$2, FontSizesTypes as FontSizesTypes$1, SizesTypes as SizesTypes$2, BreakpointSizesTypes as BreakpointSizesTypes$1 } from 'theme/types';
|
16
16
|
import * as react_hook_form from 'react-hook-form';
|
@@ -214,6 +214,7 @@ declare type TextProps = {
|
|
214
214
|
textAlign?: TextAlign;
|
215
215
|
behaveAs?: 'text' | 'button';
|
216
216
|
seoTag?: SeoTags;
|
217
|
+
htmlElementId?: string;
|
217
218
|
};
|
218
219
|
declare type TextWrapperProps = PropsWithChildren<TextProps>;
|
219
220
|
declare const TextWrapper: ({ children, seoTag, ...textProps }: TextWrapperProps) => JSX.Element;
|
@@ -405,8 +406,9 @@ declare type RichTextEditorProps = Partial<{
|
|
405
406
|
extraTextProps: TextProps$1;
|
406
407
|
renderElementWrapperComponent: (props: AnyObject$1) => JSX.Element;
|
407
408
|
renderElementWrapperProps: AnyObject$1;
|
409
|
+
htmlElementId: string;
|
408
410
|
}>;
|
409
|
-
declare const RichTextViewer: ({ value, color, textStyles, font, numberOfLines, extraTextProps, renderElementWrapperComponent, renderElementWrapperProps, }: RichTextEditorProps) => JSX.Element | null;
|
411
|
+
declare const RichTextViewer: ({ value, color, textStyles, font, numberOfLines, extraTextProps, renderElementWrapperComponent, renderElementWrapperProps, htmlElementId, }: RichTextEditorProps) => JSX.Element | null;
|
410
412
|
|
411
413
|
declare type RadioButtonInternalConfigProps = Partial<{
|
412
414
|
selectedRadioOptionBackgroundColor: ThemeColors$1 | string;
|
@@ -991,8 +993,9 @@ declare type InputFieldProps = Partial<{
|
|
991
993
|
conditionConfig: ConditionConfig$1;
|
992
994
|
state: FormStateType$1;
|
993
995
|
formData: AnyObject$1;
|
996
|
+
htmlElementId: string;
|
994
997
|
}>;
|
995
|
-
declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: InputFieldProps) => JSX.Element | null;
|
998
|
+
declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, htmlElementId, }: InputFieldProps) => JSX.Element | null;
|
996
999
|
|
997
1000
|
declare type FieldMapperProps<T extends object> = {
|
998
1001
|
field: UIField$1<keyof T>;
|
@@ -1030,8 +1033,9 @@ declare type CheckboxFieldProps = Partial<{
|
|
1030
1033
|
state: FormStateType$1;
|
1031
1034
|
defaultValue: string[];
|
1032
1035
|
formData: AnyObject$1;
|
1036
|
+
htmlElementId: string;
|
1033
1037
|
}>;
|
1034
|
-
declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: CheckboxFieldProps) => JSX.Element | null;
|
1038
|
+
declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, htmlElementId, }: CheckboxFieldProps) => JSX.Element | null;
|
1035
1039
|
|
1036
1040
|
declare type CheckboxGroupProps = Partial<{
|
1037
1041
|
ref: RefCallBack;
|
@@ -1054,8 +1058,9 @@ declare type SelectFieldProps = Partial<{
|
|
1054
1058
|
conditionConfig: ConditionConfig$1;
|
1055
1059
|
state: FormStateType$1;
|
1056
1060
|
formData: AnyObject$1;
|
1061
|
+
htmlElementId: string;
|
1057
1062
|
}>;
|
1058
|
-
declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, }: SelectFieldProps) => JSX.Element | null;
|
1063
|
+
declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, state, htmlElementId, }: SelectFieldProps) => JSX.Element | null;
|
1059
1064
|
|
1060
1065
|
declare type CustomValidationRule<T = string> = {
|
1061
1066
|
text: string;
|
@@ -1169,8 +1174,9 @@ declare type TabGroupProps<T = string, K = string> = {
|
|
1169
1174
|
wide?: AdditionalTabContainerProps;
|
1170
1175
|
compact?: AdditionalTabContainerProps;
|
1171
1176
|
isMobile?: boolean;
|
1177
|
+
htmlElementId?: string;
|
1172
1178
|
};
|
1173
|
-
declare const TabGroup: <T extends string, K extends string>({ tabs, vertical, activeTabKey, onTabChange, tabTheme, wide, compact, tabSpacing, isMobile, ...props }: TabGroupProps<T, K>) => JSX.Element;
|
1179
|
+
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;
|
1174
1180
|
|
1175
1181
|
declare type FieldSectionProps<T extends object> = {
|
1176
1182
|
label: string;
|
@@ -1209,8 +1215,9 @@ declare type RadioButtonFieldProps<T extends string> = Partial<{
|
|
1209
1215
|
conditionConfig: ConditionConfig$1;
|
1210
1216
|
state: FormStateType$1;
|
1211
1217
|
formData: AnyObject$1;
|
1218
|
+
htmlElementId: string;
|
1212
1219
|
}>;
|
1213
|
-
declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
|
1220
|
+
declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, htmlElementId, }: Partial<{
|
1214
1221
|
name: string;
|
1215
1222
|
rules: ControllerProps$1['rules'];
|
1216
1223
|
styles: styled_components.FlattenInterpolation<styled_components.ThemedStyledProps<object, styled_components.DefaultTheme>>;
|
@@ -1255,6 +1262,7 @@ declare const RadioButtonField: <T extends string>({ name, rules, styles, contro
|
|
1255
1262
|
conditionConfig: ConditionConfig$1;
|
1256
1263
|
state: FormStateType$1;
|
1257
1264
|
formData: AnyObject$1;
|
1265
|
+
htmlElementId: string;
|
1258
1266
|
}>) => JSX.Element | null;
|
1259
1267
|
|
1260
1268
|
declare type AlertProps = {
|
@@ -1341,8 +1349,9 @@ declare type VideoProps = {
|
|
1341
1349
|
style: CSSProperties;
|
1342
1350
|
styles: StylesType;
|
1343
1351
|
template: FeedContentTemplateTypes$1;
|
1352
|
+
htmlElementId: string;
|
1344
1353
|
}>;
|
1345
|
-
declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, }: VideoProps) => JSX.Element | null;
|
1354
|
+
declare const Video: ({ style, src, width, height, template, autoplay, enableCoverImage, coverImageSrc, styles, htmlElementId, }: VideoProps) => JSX.Element | null;
|
1346
1355
|
|
1347
1356
|
declare type ImageProps = {
|
1348
1357
|
src: string;
|
@@ -1356,8 +1365,10 @@ declare type ImageProps = {
|
|
1356
1365
|
cornerRadius: number;
|
1357
1366
|
behaveAs: 'background' | 'regular';
|
1358
1367
|
styles: StylesType;
|
1368
|
+
stateConfig: MetadataStateConfig$1[];
|
1369
|
+
htmlElementId: string;
|
1359
1370
|
}>;
|
1360
|
-
declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element | null;
|
1371
|
+
declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, stateConfig, htmlElementId, }: ImageProps) => JSX.Element | null;
|
1361
1372
|
|
1362
1373
|
declare type CarouselProps = {
|
1363
1374
|
children: JSX.Element[];
|
@@ -1388,8 +1399,9 @@ declare type TextMoleculeProps = Partial<{
|
|
1388
1399
|
isRichText: boolean;
|
1389
1400
|
styles: StylesType;
|
1390
1401
|
textAlign: 'center' | 'right' | 'left';
|
1402
|
+
htmlElementId: string;
|
1391
1403
|
}> & Pick<TextProps$1, 'seoTag' | 'numberOfLines'>;
|
1392
|
-
declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
1404
|
+
declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, htmlElementId, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
|
1393
1405
|
|
1394
1406
|
declare type ButtonVariant = 'primary' | 'secondary' | 'text' | 'custom';
|
1395
1407
|
declare type ButtonType = 'button' | 'submit' | 'reset';
|
@@ -1427,8 +1439,10 @@ declare type ButtonProps = BaseButtonProps & {
|
|
1427
1439
|
isRichText?: boolean;
|
1428
1440
|
containerStyle?: StylesType;
|
1429
1441
|
buttonStyle?: StylesType;
|
1442
|
+
stateConfig?: MetadataStateConfig$1[];
|
1443
|
+
htmlElementId?: string;
|
1430
1444
|
};
|
1431
|
-
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;
|
1445
|
+
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;
|
1432
1446
|
|
1433
1447
|
declare type ZealUIModalProps = PropsWithChildren<Pick<ModalProps, 'open'>> & {
|
1434
1448
|
padding?: number | string;
|
@@ -1476,8 +1490,9 @@ declare type LinkProps = Omit<TextButtonProps$1, 'children'> & Partial<{
|
|
1476
1490
|
text: string;
|
1477
1491
|
isRichText: boolean;
|
1478
1492
|
href: string;
|
1493
|
+
htmlElementId: string;
|
1479
1494
|
}>;
|
1480
|
-
declare const Link: ({ text, isRichText, ...props }: LinkProps) => JSX.Element | null;
|
1495
|
+
declare const Link: ({ text, isRichText, htmlElementId, ...props }: LinkProps) => JSX.Element | null;
|
1481
1496
|
|
1482
1497
|
declare const Container: ({ children, wide, compact, type, props, id, metadata, isMobile, }: Partial<{
|
1483
1498
|
type: containers.ContainerType;
|
@@ -1536,7 +1551,7 @@ declare const Container: ({ children, wide, compact, type, props, id, metadata,
|
|
1536
1551
|
children?: ReactNode;
|
1537
1552
|
} & {
|
1538
1553
|
id: string;
|
1539
|
-
}) => JSX.Element;
|
1554
|
+
}) => JSX.Element | null;
|
1540
1555
|
declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, formData, setFormData, isMobile, }: ContainerComponentProps$1 & {
|
1541
1556
|
formData?: AnyObject$1 | undefined;
|
1542
1557
|
setFormData?: Dispatch<SetStateAction<AnyObject$1>> | undefined;
|
@@ -1802,14 +1817,14 @@ declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' |
|
|
1802
1817
|
declare type StateActionType = 'visible' | 'disabled';
|
1803
1818
|
declare type StateEventType = 'click' | 'view';
|
1804
1819
|
declare type StateListenerConfigType = {
|
1805
|
-
|
1820
|
+
role: 'stateListener';
|
1806
1821
|
stateKey: string;
|
1807
|
-
stateValue: string;
|
1808
|
-
defaultState: Record<StateActionType, boolean
|
1809
|
-
action: Record<StateActionType, boolean
|
1822
|
+
stateValue: string | boolean;
|
1823
|
+
defaultState: Partial<Record<StateActionType, boolean>>;
|
1824
|
+
action: Partial<Record<StateActionType, boolean>>;
|
1810
1825
|
};
|
1811
1826
|
declare type StateModifierConfigType = {
|
1812
|
-
|
1827
|
+
role: 'stateModifier';
|
1813
1828
|
stateKey: string;
|
1814
1829
|
event: StateEventType;
|
1815
1830
|
};
|