@zealicsolutions/web-ui 0.3.12 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/cjs/index.js +20 -20
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
  4. package/dist/cjs/src/atoms/Buttons/IconButton.d.ts +1 -1
  5. package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -0
  6. package/dist/cjs/src/containers/mock-data.d.ts +1 -0
  7. package/dist/cjs/src/containers/types/moleculeTypes.d.ts +35 -2
  8. package/dist/cjs/src/containers/types/types.d.ts +7 -4
  9. package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +11 -0
  10. package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +11 -0
  11. package/dist/cjs/src/contexts/hooks/useButtonActionsContext.d.ts +1 -0
  12. package/dist/cjs/src/contexts/index.d.ts +3 -0
  13. package/dist/cjs/src/molecules/Button/Button.d.ts +1 -2
  14. package/dist/cjs/src/molecules/Button/Button.stories.d.ts +2 -2
  15. package/dist/cjs/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
  16. package/dist/cjs/src/molecules/PdfDocument/PdfDocument.d.ts +0 -1
  17. package/dist/cjs/src/molecules/Video/Video.stories.d.ts +1 -1
  18. package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.d.ts +20 -0
  19. package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +9 -0
  20. package/dist/cjs/src/molecules/index.d.ts +1 -0
  21. package/dist/cjs/src/organisms/Consent/Consent.stories.d.ts +2 -2
  22. package/dist/cjs/src/typescript.d.ts +3 -0
  23. package/dist/esm/index.js +4 -4
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
  26. package/dist/esm/src/atoms/Buttons/IconButton.d.ts +1 -1
  27. package/dist/esm/src/containers/MoleculeItem.d.ts +1 -0
  28. package/dist/esm/src/containers/mock-data.d.ts +1 -0
  29. package/dist/esm/src/containers/types/moleculeTypes.d.ts +35 -2
  30. package/dist/esm/src/containers/types/types.d.ts +7 -4
  31. package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +11 -0
  32. package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +11 -0
  33. package/dist/esm/src/contexts/hooks/useButtonActionsContext.d.ts +1 -0
  34. package/dist/esm/src/contexts/index.d.ts +3 -0
  35. package/dist/esm/src/molecules/Button/Button.d.ts +1 -2
  36. package/dist/esm/src/molecules/Button/Button.stories.d.ts +2 -2
  37. package/dist/esm/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
  38. package/dist/esm/src/molecules/PdfDocument/PdfDocument.d.ts +0 -1
  39. package/dist/esm/src/molecules/Video/Video.stories.d.ts +1 -1
  40. package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.d.ts +20 -0
  41. package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +9 -0
  42. package/dist/esm/src/molecules/index.d.ts +1 -0
  43. package/dist/esm/src/organisms/Consent/Consent.stories.d.ts +2 -2
  44. package/dist/esm/src/typescript.d.ts +3 -0
  45. package/dist/index.d.ts +82 -8
  46. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { ComponentStory } from '@storybook/react';
1
+ import type { StoryFn } from '@storybook/react';
2
2
  import { TextButtonProps } from 'atoms/Buttons/TextButton';
3
3
  import { FC } from 'react';
4
4
  import { IconButton as IconButtonComponent } from './IconButton';
@@ -11,6 +11,6 @@ declare const _default: {
11
11
  }, never>;
12
12
  };
13
13
  export default _default;
14
- export declare const TouchableOpacity: ComponentStory<FC<TouchableOpacityProps>>;
15
- export declare const TextButton: ComponentStory<FC<TextButtonProps>>;
16
- export declare const IconButton: ComponentStory<typeof IconButtonComponent>;
14
+ export declare const TouchableOpacity: StoryFn<FC<TouchableOpacityProps>>;
15
+ export declare const TextButton: StoryFn<FC<TextButtonProps>>;
16
+ export declare const IconButton: StoryFn<typeof IconButtonComponent>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ThemeColors } from 'theme';
3
3
  import { IconNames, TouchableOpacityProps } from 'atoms';
4
- import { Callback } from 'typescript';
4
+ import type { Callback } from 'typescript';
5
5
  export declare type IconButtonProps = {
6
6
  name: IconNames;
7
7
  size?: number;
@@ -3,6 +3,7 @@ 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>;
6
7
  export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, }: Molecule & {
7
8
  tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
8
9
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
1
  import { ContainerComponentProps } from 'containers';
2
+ export declare const sliderContainerProps: ContainerComponentProps;
2
3
  export declare const formContainerProps: ContainerComponentProps;
3
4
  export declare const columnContainerProps: ContainerComponentProps;
@@ -2,12 +2,38 @@ 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 { Nullable, StrictUnion } from 'typescript';
5
+ import type { AnyObject, Nullable, StrictUnion } from 'typescript';
6
+ import { ContainerComponentProps } from './types';
7
+ export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
8
+ export declare type DownloadFile = {
9
+ url: string;
10
+ name: string;
11
+ };
12
+ declare type LinkAction = LinkAttributes;
13
+ declare type PopupDrawerAction = ContainerComponentProps;
14
+ declare type DownloadAction = DownloadFile;
15
+ declare type SubmitAction = AnyObject;
16
+ declare type CancelAction = AnyObject;
17
+ declare type ResetAction = AnyObject;
18
+ declare type DestroyAction = AnyObject;
19
+ declare type Action = {
20
+ type: ActionTypes;
21
+ } & Partial<{
22
+ link: LinkAction;
23
+ popup: PopupDrawerAction;
24
+ drawer: PopupDrawerAction;
25
+ download: DownloadAction;
26
+ submit: SubmitAction;
27
+ cancel: CancelAction;
28
+ reset: ResetAction;
29
+ destroy: DestroyAction;
30
+ }>;
6
31
  export declare type ImageAttributes = {
7
32
  attributeType: 'image';
8
33
  imageSource: string;
9
34
  };
10
35
  export interface TextAttributes {
36
+ id?: string;
11
37
  attributeType: 'text';
12
38
  isRichText: boolean;
13
39
  text: string;
@@ -16,6 +42,10 @@ export interface VideoAttributes {
16
42
  attributeType: 'video';
17
43
  videoSource: string;
18
44
  }
45
+ export interface ActionAttributes {
46
+ attributeType: 'action';
47
+ action: Action;
48
+ }
19
49
  export interface LinkAttributes {
20
50
  id: string;
21
51
  attributeType: 'link';
@@ -25,6 +55,7 @@ export interface LinkAttributes {
25
55
  name: string;
26
56
  }
27
57
  export interface SelectAttributes {
58
+ id?: string;
28
59
  attributeType: 'select';
29
60
  value: string;
30
61
  options: SelectOption[];
@@ -42,6 +73,7 @@ export interface BaseMolecule {
42
73
  id: string;
43
74
  instance: 'molecule';
44
75
  type: MoleculeTypes;
76
+ metadata?: AnyObject;
45
77
  }
46
78
  export interface ImageMolecule extends BaseMolecule {
47
79
  type: 'image';
@@ -68,7 +100,7 @@ export interface ButtonMolecule extends BaseMolecule {
68
100
  type: 'button';
69
101
  attributes: {
70
102
  title: TextAttributes;
71
- buttonLink: LinkAttributes;
103
+ action: ActionAttributes;
72
104
  };
73
105
  config: {
74
106
  props: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
@@ -153,3 +185,4 @@ export interface CheckboxFieldMolecule extends BaseMolecule {
153
185
  export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule> & {
154
186
  form?: UseFormReturn<any>;
155
187
  };
188
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { TabGroupProps } from 'molecules';
2
2
  import { PropsWithChildren } from 'react';
3
3
  import { CSSProperties } from 'styled-components';
4
- import { Molecule } from './moleculeTypes';
5
4
  import { ValidationMode } from 'react-hook-form';
6
- import { StylesType } from 'typescript';
5
+ import type { AnyObject, StylesType } from 'typescript';
6
+ import { Molecule } from './moleculeTypes';
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' | 'relative';
9
9
  export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
10
10
  export declare type ContainerPropsType = Partial<{
11
11
  position: ContainerPositionType;
@@ -30,11 +30,14 @@ export declare type ContainerComponentProps = {
30
30
  id: string;
31
31
  instance: 'container';
32
32
  type: ContainerType;
33
+ items: (ContainerComponentProps | Molecule)[];
33
34
  config: {
34
35
  wide?: AdditionalContainerProps;
35
36
  compact?: AdditionalContainerProps;
36
37
  props?: ContainerPropsType;
37
38
  };
38
- items: (ContainerComponentProps | Molecule)[];
39
39
  tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
40
+ metadata?: AnyObject;
41
+ attributes?: AnyObject;
42
+ containerLibraryId?: string;
40
43
  };
@@ -0,0 +1,11 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { ContainerComponentProps } from 'containers';
3
+ export declare type ButtonActionsContextType = {
4
+ actionContent?: ContainerComponentProps;
5
+ setActionContent: Dispatch<SetStateAction<ContainerComponentProps>>;
6
+ isModalVisible: boolean;
7
+ setModalVisible: Dispatch<SetStateAction<boolean>>;
8
+ isDrawerVisible: boolean;
9
+ setDrawerVisible: Dispatch<SetStateAction<boolean>>;
10
+ };
11
+ export declare const ButtonActionsContext: import("react").Context<ButtonActionsContextType>;
@@ -0,0 +1,11 @@
1
+ import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
2
+ import { ContainerComponentProps } from 'containers';
3
+ export declare type ButtonActionsProviderProps = PropsWithChildren<Partial<{
4
+ actionContent: ContainerComponentProps;
5
+ setActionContent: Dispatch<SetStateAction<ContainerComponentProps>>;
6
+ isModalVisible: boolean;
7
+ setModalVisible: Dispatch<SetStateAction<boolean>>;
8
+ setDrawerVisible: Dispatch<SetStateAction<boolean>>;
9
+ isDrawerVisible: boolean;
10
+ }>>;
11
+ export declare const ButtonActionsProvider: ({ children }: ButtonActionsProviderProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const useButtonActionsContext: () => import("contexts/ButtonActionsContext/ButtonActionsContext").ButtonActionsContextType;
@@ -2,3 +2,6 @@ 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,7 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { FontSizesTypes, SizesTypes, ThemeColors } from 'theme';
3
- import type { Callback } from 'typescript';
4
- import { StylesType } from 'typescript';
3
+ import type { Callback, StylesType } from 'typescript';
5
4
  export declare type ButtonVariant = 'primary' | 'secondary' | 'text' | 'custom';
6
5
  export declare type ButtonType = 'button' | 'submit' | 'reset';
7
6
  export declare type BaseButtonProps = PropsWithChildren<{
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { StoryFn } from '@storybook/react';
3
- import { Button as ButtonComponent } from 'molecules/Button/Button';
3
+ import { Button as ButtonComponent } from 'molecules';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: ({ text: textProp, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: import("molecules/Button/Button").ButtonProps) => JSX.Element | null;
6
+ component: ({ text: textProp, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: import("molecules").ButtonProps) => JSX.Element | null;
7
7
  };
8
8
  export default _default;
9
9
  export declare const Button: StoryFn<typeof ButtonComponent>;
@@ -1,4 +1,4 @@
1
- import type { ComponentStory } from '@storybook/react';
1
+ import type { StoryFn } from '@storybook/react';
2
2
  import React from 'react';
3
3
  import { Drawer as DrawerComponent } from './Drawer';
4
4
  declare const _default: {
@@ -6,4 +6,4 @@ declare const _default: {
6
6
  component: ({ children, closeIconColor, ...props }: React.PropsWithChildren<import("./styles").DrawerProps>) => JSX.Element;
7
7
  };
8
8
  export default _default;
9
- export declare const Drawer: ComponentStory<typeof DrawerComponent>;
9
+ export declare const Drawer: StoryFn<typeof DrawerComponent>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import 'react-pdf/dist/esm/Page/AnnotationLayer.css';
3
2
  import { ThemeColors } from 'theme';
4
3
  export declare type PdfDocumentProps = {
5
4
  source: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { StoryFn } from '@storybook/react';
2
+ import type { StoryFn } from '@storybook/react';
3
3
  import { Video as VideoComponent } from './Video';
4
4
  declare const _default: {
5
5
  title: string;
@@ -0,0 +1,20 @@
1
+ import { ModalProps as MUIModalProps } from '@mui/material';
2
+ import React, { KeyboardEvent, PropsWithChildren } from 'react';
3
+ import { CSSProperties } from 'styled-components';
4
+ import type { Callback, OverrideStyles } from 'typescript';
5
+ export declare type ZealUIModalProps = PropsWithChildren<Pick<MUIModalProps, 'open'>> & {
6
+ padding?: number | string;
7
+ wrapperStyles?: CSSProperties;
8
+ onKeyDown?: <T extends HTMLElement>(event: KeyboardEvent<T>) => void;
9
+ modalStyles?: CSSProperties;
10
+ onClose?: Callback;
11
+ };
12
+ export declare const ZealUIModal: ({ children, wrapperStyles, padding, onKeyDown, modalStyles, ...rest }: ZealUIModalProps) => JSX.Element;
13
+ export declare const ModalWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, OverrideStyles, never>;
14
+ export declare const IconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
15
+ activeOpacity?: number | undefined;
16
+ withoutOpacityEffect?: boolean | undefined;
17
+ disabled?: boolean | undefined;
18
+ } & {
19
+ children?: React.ReactNode;
20
+ }, never>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { StoryFn } from '@storybook/react';
3
+ import { ZealUIModal as ZealUIModalComponent } from './ZealUIModal';
4
+ declare const _default: {
5
+ title: string;
6
+ component: ({ children, wrapperStyles, padding, onKeyDown, modalStyles, ...rest }: import("./ZealUIModal").ZealUIModalProps) => JSX.Element;
7
+ };
8
+ export default _default;
9
+ export declare const ZealUIModal: StoryFn<typeof ZealUIModalComponent>;
@@ -27,3 +27,4 @@ export * from './Image/Image';
27
27
  export * from './Caruser/Carousel';
28
28
  export * from './TextMolecule/TextMolecule';
29
29
  export * from './Button/Button';
30
+ export * from './ZealUIModal/ZealUIModal';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { ComponentStory } from '@storybook/react';
2
+ import type { StoryFn } from '@storybook/react';
3
3
  import { Consent as ConsentComponent } from './Consent';
4
4
  declare const _default: {
5
5
  title: string;
6
6
  component: <T extends string>({ text, consentCaptureProps, containerStyles, clearStyles, }: import("./Consent").ConsentProps<T>) => JSX.Element;
7
7
  };
8
8
  export default _default;
9
- export declare const Consent: ComponentStory<typeof ConsentComponent>;
9
+ export declare const Consent: StoryFn<typeof ConsentComponent>;
@@ -1,4 +1,5 @@
1
1
  import { DefaultTheme, ThemedCssFunction } from 'styled-components';
2
+ export declare type FileType = 'image' | 'video' | 'document' | 'audio';
2
3
  export declare type StylesType = ReturnType<ThemedCssFunction<DefaultTheme>>;
3
4
  export declare type StyledTransientProps<T> = {
4
5
  [K in keyof T & string as `$${K}`]: T[K];
@@ -11,4 +12,6 @@ export declare type Nullable<T> = T | null;
11
12
  declare type UnionKeys<T> = T extends any ? keyof T : never;
12
13
  declare type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
13
14
  export declare type StrictUnion<T> = StrictUnionHelper<T, T>;
15
+ export declare type AnyObject = Record<string, unknown>;
16
+ export declare type LooseObject = Record<string, any>;
14
17
  export {};
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import * as React$1 from 'react';
3
- import React__default, { PropsWithChildren, ReactNode, Dispatch, SetStateAction, CSSProperties as CSSProperties$1, ComponentType } from 'react';
3
+ import React__default, { PropsWithChildren, ReactNode, Dispatch, SetStateAction, CSSProperties as CSSProperties$1, ComponentType, KeyboardEvent } from 'react';
4
4
  import * as styled_components from 'styled-components';
5
5
  import { CSSProperties, DefaultTheme } from 'styled-components';
6
6
  import { ThemeColors as ThemeColors$1, SizesTypes as SizesTypes$1, FontSizesTypes as FontSizesTypes$2 } from 'theme';
7
7
  import * as typescript from 'typescript';
8
- import { StylesType, Callback as Callback$1, OverrideStyles, StyledTransientProps, Nullable, StrictUnion } from 'typescript';
8
+ import { StylesType, Callback as Callback$1, OverrideStyles, StyledTransientProps, Nullable, AnyObject, StrictUnion } from 'typescript';
9
9
  import { RefCallBack, Control as Control$1, ControllerProps as ControllerProps$1 } from 'react-hook-form/dist/types';
10
10
  import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
11
11
  import { InputFieldTypes as InputFieldTypes$1, FieldTypes as FieldTypes$1, UIFields as UIFields$2 } from 'fieldsConfiguration/types';
@@ -16,7 +16,7 @@ import { WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap';
16
16
  import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
17
17
  import * as atoms from 'atoms';
18
18
  import { TextProps as TextProps$1, IconNames as IconNames$2, TouchableOpacityProps as TouchableOpacityProps$1, AvatarProps as AvatarProps$1, TabProps as TabProps$1, RadioButtonsProps as RadioButtonsProps$1, SelectOption as SelectOption$1, InputProps as InputProps$1, SelectProps as SelectProps$1, RegularImageProps as RegularImageProps$1, TextButtonProps as TextButtonProps$1, TabTheme as TabTheme$1, RadioButtonInternalConfigProps as RadioButtonInternalConfigProps$1, HorizontalButtonsProps as HorizontalButtonsProps$1, IconProps as IconProps$1 } from 'atoms';
19
- import { RadioGroup, DrawerProps as DrawerProps$1 } from '@mui/material';
19
+ import { RadioGroup, DrawerProps as DrawerProps$1, ModalProps } from '@mui/material';
20
20
  import { UIFields as UIFields$1, UIField as UIField$1 } from 'fieldsConfiguration';
21
21
  import { MaxRuleValidation, MinRuleValidation, SetPasswordFields } from 'organisms/SetPasswordForm/types';
22
22
  import { ConsentProps as ConsentProps$1, FilteredFeedContentType as FilteredFeedContentType$1, HeroSliderProps as HeroSliderProps$1, ProcessTrackerProps as ProcessTrackerProps$1, ProcessTrackerStatus as ProcessTrackerStatus$1 } from 'organisms';
@@ -36,9 +36,10 @@ import { AlertProps as AlertProps$2 } from 'molecules/Alert/Alert';
36
36
  import { LoginFields as LoginFields$1 } from 'organisms/LoginForm/types';
37
37
  import { AnnotationsList as AnnotationsList$1 } from 'contexts/MlrRichTextViewerContext/types';
38
38
  import * as contexts_MlrRichTextViewerContext_MlrRichTextViewerContext from 'contexts/MlrRichTextViewerContext/MlrRichTextViewerContext';
39
+ import * as contexts_ButtonActionsContext_ButtonActionsContext from 'contexts/ButtonActionsContext/ButtonActionsContext';
40
+ import { ContainerComponentProps as ContainerComponentProps$1, ContainerProps as ContainerProps$1, Molecule as Molecule$1 } from 'containers';
39
41
  export * from 'helpers/constants';
40
42
  import { CheckboxInternalConfigProps as CheckboxInternalConfigProps$1 } from 'atoms/Checkbox/types';
41
- import { ContainerProps as ContainerProps$1, ContainerComponentProps as ContainerComponentProps$1, Molecule as Molecule$1 } from 'containers';
42
43
  import * as containers_types_types from 'containers/types/types';
43
44
  import { ContainerProps as ContainerProps$2 } from 'containers/types/types';
44
45
 
@@ -888,6 +889,28 @@ declare type AnnotationsList = {
888
889
 
889
890
  declare const useMlrRichTextViewerContext: () => contexts_MlrRichTextViewerContext_MlrRichTextViewerContext.MlrRichTextViewerContextType;
890
891
 
892
+ declare const useButtonActionsContext: () => contexts_ButtonActionsContext_ButtonActionsContext.ButtonActionsContextType;
893
+
894
+ declare type ButtonActionsContextType = {
895
+ actionContent?: ContainerComponentProps$1;
896
+ setActionContent: Dispatch<SetStateAction<ContainerComponentProps$1>>;
897
+ isModalVisible: boolean;
898
+ setModalVisible: Dispatch<SetStateAction<boolean>>;
899
+ isDrawerVisible: boolean;
900
+ setDrawerVisible: Dispatch<SetStateAction<boolean>>;
901
+ };
902
+ declare const ButtonActionsContext: React$1.Context<ButtonActionsContextType>;
903
+
904
+ declare type ButtonActionsProviderProps = PropsWithChildren<Partial<{
905
+ actionContent: ContainerComponentProps$1;
906
+ setActionContent: Dispatch<SetStateAction<ContainerComponentProps$1>>;
907
+ isModalVisible: boolean;
908
+ setModalVisible: Dispatch<SetStateAction<boolean>>;
909
+ setDrawerVisible: Dispatch<SetStateAction<boolean>>;
910
+ isDrawerVisible: boolean;
911
+ }>>;
912
+ declare const ButtonActionsProvider: ({ children }: ButtonActionsProviderProps) => JSX.Element;
913
+
891
914
  declare type FieldRuleLabelTypes = 'OPTIONAL' | 'REQUIRED';
892
915
  declare type LabelInternalConfig = {
893
916
  fontVariant: FontSizesTypes$2;
@@ -1362,14 +1385,56 @@ declare type ButtonProps = BaseButtonProps & {
1362
1385
  };
1363
1386
  declare const Button: ({ text: textProp, onClick, loading, disabled, variant, isRichText, fullWidth, elementId, link, containerStyle, children, buttonStyle, size, textColor, inactiveTextColor, state, href, ...props }: ButtonProps) => JSX.Element | null;
1364
1387
 
1388
+ declare type ZealUIModalProps = PropsWithChildren<Pick<ModalProps, 'open'>> & {
1389
+ padding?: number | string;
1390
+ wrapperStyles?: CSSProperties;
1391
+ onKeyDown?: <T extends HTMLElement>(event: KeyboardEvent<T>) => void;
1392
+ modalStyles?: CSSProperties;
1393
+ onClose?: Callback$1;
1394
+ };
1395
+ declare const ZealUIModal: ({ children, wrapperStyles, padding, onKeyDown, modalStyles, ...rest }: ZealUIModalProps) => JSX.Element;
1396
+ declare const ModalWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, OverrideStyles, never>;
1397
+ declare const IconWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
1398
+ activeOpacity?: number | undefined;
1399
+ withoutOpacityEffect?: boolean | undefined;
1400
+ disabled?: boolean | undefined;
1401
+ } & {
1402
+ children?: React__default.ReactNode;
1403
+ }, never>;
1404
+
1365
1405
  declare const Container: ({ children, wide, compact, type, props }: ContainerProps$1) => JSX.Element;
1366
1406
  declare const ContainerComponent: ({ type, items, config, tabsProps }: ContainerComponentProps$1) => JSX.Element | null;
1367
1407
 
1408
+ declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
1409
+ declare type DownloadFile = {
1410
+ url: string;
1411
+ name: string;
1412
+ };
1413
+ declare type LinkAction = LinkAttributes;
1414
+ declare type PopupDrawerAction = ContainerComponentProps;
1415
+ declare type DownloadAction = DownloadFile;
1416
+ declare type SubmitAction = AnyObject;
1417
+ declare type CancelAction = AnyObject;
1418
+ declare type ResetAction = AnyObject;
1419
+ declare type DestroyAction = AnyObject;
1420
+ declare type Action = {
1421
+ type: ActionTypes;
1422
+ } & Partial<{
1423
+ link: LinkAction;
1424
+ popup: PopupDrawerAction;
1425
+ drawer: PopupDrawerAction;
1426
+ download: DownloadAction;
1427
+ submit: SubmitAction;
1428
+ cancel: CancelAction;
1429
+ reset: ResetAction;
1430
+ destroy: DestroyAction;
1431
+ }>;
1368
1432
  declare type ImageAttributes = {
1369
1433
  attributeType: 'image';
1370
1434
  imageSource: string;
1371
1435
  };
1372
1436
  interface TextAttributes {
1437
+ id?: string;
1373
1438
  attributeType: 'text';
1374
1439
  isRichText: boolean;
1375
1440
  text: string;
@@ -1378,6 +1443,10 @@ interface VideoAttributes {
1378
1443
  attributeType: 'video';
1379
1444
  videoSource: string;
1380
1445
  }
1446
+ interface ActionAttributes {
1447
+ attributeType: 'action';
1448
+ action: Action;
1449
+ }
1381
1450
  interface LinkAttributes {
1382
1451
  id: string;
1383
1452
  attributeType: 'link';
@@ -1387,6 +1456,7 @@ interface LinkAttributes {
1387
1456
  name: string;
1388
1457
  }
1389
1458
  interface SelectAttributes {
1459
+ id?: string;
1390
1460
  attributeType: 'select';
1391
1461
  value: string;
1392
1462
  options: SelectOption$1[];
@@ -1404,6 +1474,7 @@ interface BaseMolecule {
1404
1474
  id: string;
1405
1475
  instance: 'molecule';
1406
1476
  type: MoleculeTypes;
1477
+ metadata?: AnyObject;
1407
1478
  }
1408
1479
  interface ImageMolecule extends BaseMolecule {
1409
1480
  type: 'image';
@@ -1430,7 +1501,7 @@ interface ButtonMolecule extends BaseMolecule {
1430
1501
  type: 'button';
1431
1502
  attributes: {
1432
1503
  title: TextAttributes;
1433
- buttonLink: LinkAttributes;
1504
+ action: ActionAttributes;
1434
1505
  };
1435
1506
  config: {
1436
1507
  props: Partial<Omit<ButtonProps$1, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
@@ -1517,7 +1588,7 @@ declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMol
1517
1588
  };
1518
1589
 
1519
1590
  declare type ContainerType = 'row' | 'column' | 'slider' | 'form';
1520
- declare type ContainerPositionType = 'fixed' | 'sticky' | 'static';
1591
+ declare type ContainerPositionType = 'fixed' | 'sticky' | 'static' | 'relative';
1521
1592
  declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
1522
1593
  declare type ContainerPropsType = Partial<{
1523
1594
  position: ContainerPositionType;
@@ -1542,13 +1613,16 @@ declare type ContainerComponentProps = {
1542
1613
  id: string;
1543
1614
  instance: 'container';
1544
1615
  type: ContainerType;
1616
+ items: (ContainerComponentProps | Molecule)[];
1545
1617
  config: {
1546
1618
  wide?: AdditionalContainerProps;
1547
1619
  compact?: AdditionalContainerProps;
1548
1620
  props?: ContainerPropsType;
1549
1621
  };
1550
- items: (ContainerComponentProps | Molecule)[];
1551
1622
  tabsProps?: Pick<TabGroupProps$1, 'tabs' | 'activeTabKey' | 'onTabChange'>;
1623
+ metadata?: AnyObject;
1624
+ attributes?: AnyObject;
1625
+ containerLibraryId?: string;
1552
1626
  };
1553
1627
 
1554
1628
  declare const ContainerWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, Pick<ContainerProps$2, "type"> & {
@@ -1568,4 +1642,4 @@ declare const OrganismItem: ({ item, tabsProps, }: {
1568
1642
  tabsProps?: Pick<TabGroupProps$1<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
1569
1643
  }) => JSX.Element | null;
1570
1644
 
1571
- export { AcquisitionForm, AcquisitionFormProps, AdditionalContainerProps, AdditionalTabContainerProps, Alert, AlertProps, AnnotationsList, ArrowIconWrapper, AuthMethod, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, BackgroundImage, BaseButtonProps, BaseMolecule, Body, BodyProps, BooleanAttributes, BottomNaVBarItemProps, BottomNavBarItem, BottomNavBarNavigation, BottomNavBarNavigationProps, BreakpointSizesTypes, Button, ButtonMolecule, ButtonProps, ButtonType, ButtonVariant, ButtonsWrapper, COMMUNICATION_LINK_DATA_TEXT, COMMUNICATION_LINK_DATA_URL, COMMUNICATION_LINK_ELEMENT_ID, CaretIconWrapper, Carousel, CarouselProps, Checkbox, CheckboxField, CheckboxFieldMolecule, CheckboxFieldProps, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CheckboxesProps, Circle, CircleBoxProps, CirclesWrapper, CircularIndicator, CircularIndicatorProps, CircularIndicatorStyledComponent, ColumnItem, Columns, ColumnsProps, Consent, ConsentProps, Container, ContainerComponent, ContainerComponentProps, ContainerPositionType, ContainerProps, ContainerPropsType, ContainerScrollBehaviourType, ContainerType, ContainerWrapper, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, Drawer, DynamicContentZone, DynamicContentZoneProps, DynamicElementProps, EmphasizedText, EmphasizedTextProps, ErrorText, FeedContent, FeedContentContainer, FeedContentContainerProps, FeedContentHeader, FeedContentHeaderProps, FeedTemplateKeys, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldSection, FieldSectionProps, FieldTypes, FilteredFeedContentType, FontSizesTypes, FontWeight, Footer, FooterContactInfo, FooterLink, FooterProps, ForgotPasswordForm, ForgotPasswordFormProps, GoogleMap, GoogleMapProps, Header, HeaderProps, HeroImage, HeroImageAlignment, HeroImageProps, HeroImageTemplate, HeroSlider, HeroSliderProps, HeroSliderWrapper, HorizontalButtons, HorizontalButtonsField, HorizontalButtonsProps, HorizontalPadding, HorizontalPaddingProps, ISI, ISIProps, Icon, IconButton, IconButtonProps, IconNames, IconProps, Image, ImageAttributes, ImageMolecule, ImageProps, Input, InputField, InputFieldInternalConfigProps, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, IterableAttributes, LabelInternalConfig, LinkAttributes, LoginForm, LoginFormProps, MATRIX_MESSAGE_DATA_ID, MATRIX_MESSAGE_ELEMENT_ID, MapPosition, MenuItem, MenuItems, MenuItemsProps, MenuNavigation, MenuNavigationProps, MlrRichTextViewerContext, MlrRichTextViewerContextType, MlrRichTextViewerProvider, MlrRichTextViewerProviderProps, Molecule, MoleculeTypes, NavigationDotsWrapper, OrganismItem, OrientationType, PdfDocument, PdfDocumentProps, ProcessTracker, ProcessTrackerProps, ProcessTrackerStatus, ProfileInformation, ProfileInformationProps, RadioButtonField, RadioButtonFieldMolecule, RadioButtonFieldProps, RadioButtonInternalConfigProps, RadioButtons, RadioButtonsProps, RadioGroupWrapper, RegularImage, RegularImageProps, RichTextEditorProps, RichTextViewer, RuleLabelInternalConfig, Select, SelectAttributes, SelectField, SelectFieldMolecule, SelectFieldProps, SelectInternalConfigurationOptions, SelectOption, SelectProps, SelectableCardGroup, SelectableCardGroupProps, SeoTags, SetPasswordForm, SetPasswordFormProps, SetPasswordRuleValidation, SizesTypes, Slide, SlidesWrapper, Spacer, SpacerProps, Spinner, Stepper, StepperProps, StyleWrapper, SubscribePanel, Tab, TabGroup, TabGroupMolecule, TabGroupProps, TabOption, TabProps, TabTheme, TabType, TextAlign, TextAttributes, TextButton, TextButtonProps, TextInputMolecule, TextMolecule, TextMoleculeProps, TextMoleculeType, TextProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeDevicesType, ThemeSizesType, ThemeTextType, Tooltip, TooltipInternalConfig, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, Video, VideoAttributes, VideoMolecule, VideoProps, Wrapper, ZealTheme, ZealThemeProvider, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getFieldsFromFieldSections, getInitialValuesFromFields, isFormValid, loginMockFields, profileInformationMockForm, sectionMockFields, setPasswordMockFields, showAcceptToastMessage, toast, toastStyles, useMediaQuery, useMlrRichTextViewerContext, useRequiredConsentsAcceptedValues, useStep };
1645
+ export { AcquisitionForm, AcquisitionFormProps, ActionAttributes, ActionTypes, AdditionalContainerProps, AdditionalTabContainerProps, Alert, AlertProps, AnnotationsList, ArrowIconWrapper, AuthMethod, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, BackgroundImage, BaseButtonProps, BaseMolecule, Body, BodyProps, BooleanAttributes, BottomNaVBarItemProps, BottomNavBarItem, BottomNavBarNavigation, BottomNavBarNavigationProps, BreakpointSizesTypes, Button, ButtonActionsContext, ButtonActionsContextType, ButtonActionsProvider, ButtonActionsProviderProps, ButtonMolecule, ButtonProps, ButtonType, ButtonVariant, ButtonsWrapper, COMMUNICATION_LINK_DATA_TEXT, COMMUNICATION_LINK_DATA_URL, COMMUNICATION_LINK_ELEMENT_ID, CaretIconWrapper, Carousel, CarouselProps, Checkbox, CheckboxField, CheckboxFieldMolecule, CheckboxFieldProps, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CheckboxesProps, Circle, CircleBoxProps, CirclesWrapper, CircularIndicator, CircularIndicatorProps, CircularIndicatorStyledComponent, ColumnItem, Columns, ColumnsProps, Consent, ConsentProps, Container, ContainerComponent, ContainerComponentProps, ContainerPositionType, ContainerProps, ContainerPropsType, ContainerScrollBehaviourType, ContainerType, ContainerWrapper, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, DownloadFile, Drawer, DynamicContentZone, DynamicContentZoneProps, DynamicElementProps, EmphasizedText, EmphasizedTextProps, ErrorText, FeedContent, FeedContentContainer, FeedContentContainerProps, FeedContentHeader, FeedContentHeaderProps, FeedTemplateKeys, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldSection, FieldSectionProps, FieldTypes, FilteredFeedContentType, FontSizesTypes, FontWeight, Footer, FooterContactInfo, FooterLink, FooterProps, ForgotPasswordForm, ForgotPasswordFormProps, GoogleMap, GoogleMapProps, Header, HeaderProps, HeroImage, HeroImageAlignment, HeroImageProps, HeroImageTemplate, HeroSlider, HeroSliderProps, HeroSliderWrapper, HorizontalButtons, HorizontalButtonsField, HorizontalButtonsProps, HorizontalPadding, HorizontalPaddingProps, ISI, ISIProps, Icon, IconButton, IconButtonProps, IconNames, IconProps, IconWrapper, Image, ImageAttributes, ImageMolecule, ImageProps, Input, InputField, InputFieldInternalConfigProps, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, IterableAttributes, LabelInternalConfig, LinkAttributes, LoginForm, LoginFormProps, MATRIX_MESSAGE_DATA_ID, MATRIX_MESSAGE_ELEMENT_ID, MapPosition, MenuItem, MenuItems, MenuItemsProps, MenuNavigation, MenuNavigationProps, MlrRichTextViewerContext, MlrRichTextViewerContextType, MlrRichTextViewerProvider, MlrRichTextViewerProviderProps, ModalWrapper, Molecule, MoleculeTypes, NavigationDotsWrapper, OrganismItem, OrientationType, PdfDocument, PdfDocumentProps, ProcessTracker, ProcessTrackerProps, ProcessTrackerStatus, ProfileInformation, ProfileInformationProps, RadioButtonField, RadioButtonFieldMolecule, RadioButtonFieldProps, RadioButtonInternalConfigProps, RadioButtons, RadioButtonsProps, RadioGroupWrapper, RegularImage, RegularImageProps, RichTextEditorProps, RichTextViewer, RuleLabelInternalConfig, Select, SelectAttributes, SelectField, SelectFieldMolecule, SelectFieldProps, SelectInternalConfigurationOptions, SelectOption, SelectProps, SelectableCardGroup, SelectableCardGroupProps, SeoTags, SetPasswordForm, SetPasswordFormProps, SetPasswordRuleValidation, SizesTypes, Slide, SlidesWrapper, Spacer, SpacerProps, Spinner, Stepper, StepperProps, StyleWrapper, SubscribePanel, Tab, TabGroup, TabGroupMolecule, TabGroupProps, TabOption, TabProps, TabTheme, TabType, TextAlign, TextAttributes, TextButton, TextButtonProps, TextInputMolecule, TextMolecule, TextMoleculeProps, TextMoleculeType, TextProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeDevicesType, ThemeSizesType, ThemeTextType, Tooltip, TooltipInternalConfig, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, Video, VideoAttributes, VideoMolecule, VideoProps, Wrapper, ZealTheme, ZealThemeProvider, ZealUIModal, ZealUIModalProps, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getFieldsFromFieldSections, getInitialValuesFromFields, isFormValid, loginMockFields, profileInformationMockForm, sectionMockFields, setPasswordMockFields, showAcceptToastMessage, toast, toastStyles, useButtonActionsContext, useMediaQuery, useMlrRichTextViewerContext, useRequiredConsentsAcceptedValues, useStep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"