@zealicsolutions/web-ui 0.3.10 → 0.3.12
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.css +246 -246
- package/dist/cjs/index.js +26 -26
- package/dist/cjs/index.js.map +1 -1
- 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 +2 -56
- package/dist/cjs/src/containers/types/types.d.ts +4 -7
- package/dist/cjs/src/contexts/index.d.ts +0 -3
- package/dist/cjs/src/molecules/Button/Button.d.ts +2 -1
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/Image/Image.d.ts +3 -2
- package/dist/cjs/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/index.d.ts +0 -1
- package/dist/cjs/src/typescript.d.ts +0 -3
- package/dist/esm/index.css +246 -246
- package/dist/esm/index.js +12 -12
- package/dist/esm/index.js.map +1 -1
- 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 +2 -56
- package/dist/esm/src/containers/types/types.d.ts +4 -7
- package/dist/esm/src/contexts/index.d.ts +0 -3
- package/dist/esm/src/molecules/Button/Button.d.ts +2 -1
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +18 -1
- package/dist/esm/src/molecules/Image/Image.d.ts +3 -2
- package/dist/esm/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +18 -1
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +18 -1
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +18 -1
- package/dist/esm/src/molecules/index.d.ts +0 -1
- package/dist/esm/src/typescript.d.ts +0 -3
- package/dist/index.d.ts +50 -141
- package/package.json +1 -1
- 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 -13
- 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 -13
@@ -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;
|
@@ -2,56 +2,12 @@ import { SelectOption } from 'atoms';
|
|
2
2
|
import { AdditionalTabContainerProps, 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 FileType = 'image' | 'video' | 'document' | 'audio';
|
9
|
-
export declare type ContentStatus = 'in_use' | 'draft';
|
10
|
-
export declare type FileMatrixMessageDTO = Readonly<Partial<{
|
11
|
-
id: string;
|
12
|
-
text: string;
|
13
|
-
label: string;
|
14
|
-
locationId: string;
|
15
|
-
}>>;
|
16
|
-
export declare type FileObjectDTO = Readonly<Partial<{
|
17
|
-
id: string;
|
18
|
-
name: string;
|
19
|
-
fileType: FileType;
|
20
|
-
description: string;
|
21
|
-
originalName: string;
|
22
|
-
url: string;
|
23
|
-
size: number;
|
24
|
-
type: FileType;
|
25
|
-
updatedAt: string;
|
26
|
-
createdAt: string;
|
27
|
-
status: ContentStatus;
|
28
|
-
tags: FileMatrixMessageDTO[];
|
29
|
-
}>> | null;
|
30
|
-
declare type LinkAction = Omit<LinkAttributes, 'attributeType'>;
|
31
|
-
declare type PopupDrawerAction = ContainerComponentProps;
|
32
|
-
declare type DownloadAction = FileObjectDTO;
|
33
|
-
declare type SubmitAction = AnyObject;
|
34
|
-
declare type CancelAction = AnyObject;
|
35
|
-
declare type ResetAction = AnyObject;
|
36
|
-
declare type DestroyAction = AnyObject;
|
37
|
-
declare type Action = {
|
38
|
-
type: ActionTypes;
|
39
|
-
} & Partial<{
|
40
|
-
link: LinkAction;
|
41
|
-
popup: PopupDrawerAction;
|
42
|
-
drawer: PopupDrawerAction;
|
43
|
-
download: DownloadAction;
|
44
|
-
submit: SubmitAction;
|
45
|
-
cancel: CancelAction;
|
46
|
-
reset: ResetAction;
|
47
|
-
destroy: DestroyAction;
|
48
|
-
}>;
|
5
|
+
import type { Nullable, StrictUnion } from 'typescript';
|
49
6
|
export declare type ImageAttributes = {
|
50
7
|
attributeType: 'image';
|
51
8
|
imageSource: string;
|
52
9
|
};
|
53
10
|
export interface TextAttributes {
|
54
|
-
id?: string;
|
55
11
|
attributeType: 'text';
|
56
12
|
isRichText: boolean;
|
57
13
|
text: string;
|
@@ -60,10 +16,6 @@ export interface VideoAttributes {
|
|
60
16
|
attributeType: 'video';
|
61
17
|
videoSource: string;
|
62
18
|
}
|
63
|
-
export interface ActionAttributes {
|
64
|
-
attributeType: 'action';
|
65
|
-
action: Action;
|
66
|
-
}
|
67
19
|
export interface LinkAttributes {
|
68
20
|
id: string;
|
69
21
|
attributeType: 'link';
|
@@ -73,7 +25,6 @@ export interface LinkAttributes {
|
|
73
25
|
name: string;
|
74
26
|
}
|
75
27
|
export interface SelectAttributes {
|
76
|
-
id?: string;
|
77
28
|
attributeType: 'select';
|
78
29
|
value: string;
|
79
30
|
options: SelectOption[];
|
@@ -91,10 +42,6 @@ export interface BaseMolecule {
|
|
91
42
|
id: string;
|
92
43
|
instance: 'molecule';
|
93
44
|
type: MoleculeTypes;
|
94
|
-
metadata?: AnyObject;
|
95
|
-
idForFrontend?: string;
|
96
|
-
moleculeLibraryId?: string;
|
97
|
-
organismLibraryMoleculeId?: string;
|
98
45
|
}
|
99
46
|
export interface ImageMolecule extends BaseMolecule {
|
100
47
|
type: 'image';
|
@@ -121,7 +68,7 @@ export interface ButtonMolecule extends BaseMolecule {
|
|
121
68
|
type: 'button';
|
122
69
|
attributes: {
|
123
70
|
title: TextAttributes;
|
124
|
-
|
71
|
+
buttonLink: LinkAttributes;
|
125
72
|
};
|
126
73
|
config: {
|
127
74
|
props: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
|
@@ -206,4 +153,3 @@ export interface CheckboxFieldMolecule extends BaseMolecule {
|
|
206
153
|
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule> & {
|
207
154
|
form?: UseFormReturn<any>;
|
208
155
|
};
|
209
|
-
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';
|
@@ -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<{
|
@@ -26,7 +26,24 @@ declare const _default: {
|
|
26
26
|
}>;
|
27
27
|
labelsProps: import("molecules").FieldLabelsProps;
|
28
28
|
name: string;
|
29
|
-
rules: Omit<
|
29
|
+
rules: Omit<Partial<{
|
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;
|
30
47
|
control: import("react-hook-form").Control<any, any>;
|
31
48
|
required: boolean;
|
32
49
|
optional: boolean;
|
@@ -1,15 +1,16 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { StylesType } from 'typescript';
|
2
|
+
import { Callback, 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;
|
9
10
|
width: number;
|
10
11
|
height: number;
|
11
12
|
cornerRadius: number;
|
12
13
|
behaveAs: 'background' | 'regular';
|
13
14
|
styles: StylesType;
|
14
15
|
}>;
|
15
|
-
export declare const Image: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
16
|
+
export declare const Image: ({ src, onClick, 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, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: import("./Image").ImageProps) => JSX.Element;
|
6
|
+
component: ({ src, onClick, 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,7 +6,24 @@ 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<
|
9
|
+
rules: Omit<Partial<{
|
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;
|
10
27
|
required: boolean;
|
11
28
|
optional: boolean;
|
12
29
|
defaultValue: string;
|
@@ -5,7 +5,24 @@ declare const _default: {
|
|
5
5
|
title: string;
|
6
6
|
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, }: Partial<{
|
7
7
|
name: string;
|
8
|
-
rules: Omit<
|
8
|
+
rules: Omit<Partial<{
|
9
|
+
required: string | import("react-hook-form").ValidationRule<boolean>;
|
10
|
+
min: import("react-hook-form").ValidationRule<string | number>;
|
11
|
+
max: import("react-hook-form").ValidationRule<string | number>;
|
12
|
+
maxLength: import("react-hook-form").ValidationRule<number>;
|
13
|
+
minLength: import("react-hook-form").ValidationRule<number>;
|
14
|
+
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
15
|
+
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
16
|
+
valueAsNumber: boolean;
|
17
|
+
valueAsDate: boolean;
|
18
|
+
value: any;
|
19
|
+
setValueAs: (value: any) => any;
|
20
|
+
shouldUnregister?: boolean | undefined;
|
21
|
+
onChange?: ((event: any) => void) | undefined;
|
22
|
+
onBlur?: ((event: any) => void) | undefined;
|
23
|
+
disabled: boolean;
|
24
|
+
deps: string | string[];
|
25
|
+
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
9
26
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
10
27
|
control: import("react-hook-form").Control<any, any>;
|
11
28
|
optional: boolean;
|
@@ -20,7 +20,24 @@ declare const _default: {
|
|
20
20
|
}>;
|
21
21
|
labelsProps: import("..").FieldLabelsProps;
|
22
22
|
name: string;
|
23
|
-
rules: Omit<
|
23
|
+
rules: Omit<Partial<{
|
24
|
+
required: string | import("react-hook-form").ValidationRule<boolean>;
|
25
|
+
min: import("react-hook-form").ValidationRule<string | number>;
|
26
|
+
max: import("react-hook-form").ValidationRule<string | number>;
|
27
|
+
maxLength: import("react-hook-form").ValidationRule<number>;
|
28
|
+
minLength: import("react-hook-form").ValidationRule<number>;
|
29
|
+
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
30
|
+
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
31
|
+
valueAsNumber: boolean;
|
32
|
+
valueAsDate: boolean;
|
33
|
+
value: any;
|
34
|
+
setValueAs: (value: any) => any;
|
35
|
+
shouldUnregister?: boolean | undefined;
|
36
|
+
onChange?: ((event: any) => void) | undefined;
|
37
|
+
onBlur?: ((event: any) => void) | undefined;
|
38
|
+
disabled: boolean;
|
39
|
+
deps: string | string[];
|
40
|
+
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
24
41
|
control: import("react-hook-form").Control<any, any>;
|
25
42
|
required: boolean;
|
26
43
|
optional: boolean;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { DefaultTheme, ThemedCssFunction } from 'styled-components';
|
2
|
-
export declare type FileType = 'image' | 'video' | 'document' | 'audio';
|
3
2
|
export declare type StylesType = ReturnType<ThemedCssFunction<DefaultTheme>>;
|
4
3
|
export declare type StyledTransientProps<T> = {
|
5
4
|
[K in keyof T & string as `$${K}`]: T[K];
|
@@ -12,6 +11,4 @@ export declare type Nullable<T> = T | null;
|
|
12
11
|
declare type UnionKeys<T> = T extends any ? keyof T : never;
|
13
12
|
declare type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
|
14
13
|
export declare type StrictUnion<T> = StrictUnionHelper<T, T>;
|
15
|
-
export declare type AnyObject = Record<string, unknown>;
|
16
|
-
export declare type LooseObject = Record<string, any>;
|
17
14
|
export {};
|