@zealicsolutions/web-ui 0.4.68 → 0.4.70

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.
@@ -3,12 +3,12 @@ export declare type CheckboxProps = {
3
3
  id: string;
4
4
  onClick: (id: string) => void;
5
5
  label: string;
6
- } & Partial<{
7
- isError: boolean;
8
- disabled: boolean;
9
- isEditMode: boolean;
10
- isSelected: boolean;
11
- isRichText: boolean;
12
- internalConfig: CheckboxInternalConfigProps;
13
- }>;
14
- export declare const Checkbox: ({ id, onClick, label, isError, disabled, isEditMode, isSelected, isRichText, internalConfig, }: CheckboxProps) => JSX.Element;
6
+ isError?: boolean;
7
+ disabled?: boolean;
8
+ isEditMode?: boolean;
9
+ isSelected?: boolean;
10
+ isRichText?: boolean;
11
+ notInteractable?: boolean;
12
+ internalConfig?: CheckboxInternalConfigProps;
13
+ };
14
+ export declare const Checkbox: ({ id, onClick, label, isError, disabled, isEditMode, isSelected, isRichText, notInteractable, internalConfig, }: CheckboxProps) => JSX.Element;
@@ -2,7 +2,7 @@ import type { ComponentStory } from '@storybook/react';
2
2
  import { Checkbox as CheckboxComponent } from './Checkbox';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ id, onClick, label, isError, disabled, isEditMode, isSelected, isRichText, internalConfig, }: import("./Checkbox").CheckboxProps) => JSX.Element;
5
+ component: ({ id, onClick, label, isError, disabled, isEditMode, isSelected, isRichText, notInteractable, internalConfig, }: import("./Checkbox").CheckboxProps) => JSX.Element;
6
6
  };
7
7
  export default _default;
8
8
  export declare const Checkbox: ComponentStory<typeof CheckboxComponent>;
@@ -1,10 +1,12 @@
1
1
  import { LinkVariant, SelectOption } from 'atoms';
2
- import { AdditionalTabContainerProps, AvatarDropdownMenuConfigType, AvatarDropdownProps, ButtonProps, CheckboxFieldProps, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
2
+ import { AdditionalTabContainerProps, AvatarDropdownMenuConfigType, AvatarDropdownProps, ButtonProps, CheckboxFieldProps, ChecklistItem, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
3
3
  import { Dispatch, SetStateAction } from 'react';
4
4
  import { UseFormReturn } from 'react-hook-form';
5
5
  import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
6
+ import { SizesTypes } from 'theme';
7
+ import { CheckboxInternalConfigProps } from 'atoms/Checkbox/types';
8
+ import { MaskConfig } from 'atoms/Input/helpers';
6
9
  import { ConditionConfig, ContainerComponentProps, MetadataType } from './types';
7
- import { MaskConfig } from '../../atoms/Input/helpers';
8
10
  export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
9
11
  export declare type DataModelFieldFormatCodeTypes = 'date' | 'email' | 'string' | 'integer' | 'boolean' | 'numeric' | 'zip_code' | 'phone_number';
10
12
  export declare type DataModelFieldFormatValueTypes = 'any' | 'text' | 'email' | 'integer' | 'numerical' | 'us_zip_code' | 'phone_number' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'year_month_day_date';
@@ -126,7 +128,13 @@ export interface ProcessStepsAttributes {
126
128
  steps: ProcessStep[];
127
129
  };
128
130
  }
129
- export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link' | 'password_setup_field' | 'account_button' | 'process_steps';
131
+ export interface ChecklistAttributes {
132
+ checklist: {
133
+ attributeType: 'checklist';
134
+ items: ChecklistItem[];
135
+ };
136
+ }
137
+ export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link' | 'password_setup_field' | 'account_button' | 'process_steps' | 'checklist';
130
138
  export interface BaseMolecule {
131
139
  id: string;
132
140
  type: MoleculeTypes;
@@ -311,7 +319,16 @@ export interface ProcessStepsMoleculeType extends BaseMolecule {
311
319
  organismMoleculeLibraryId: string;
312
320
  attributes: ProcessStepsAttributes;
313
321
  }
314
- export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule | PasswordSetupMolecule | AccountButtonMolecule | ProcessStepsMoleculeType> & Partial<{
322
+ export interface ChecklistsMolecule extends BaseMolecule {
323
+ type: 'checklist';
324
+ config: {
325
+ props: {
326
+ gap: SizesTypes;
327
+ } & CheckboxInternalConfigProps;
328
+ };
329
+ attributes: ChecklistAttributes;
330
+ }
331
+ export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule | PasswordSetupMolecule | AccountButtonMolecule | ProcessStepsMoleculeType | ChecklistsMolecule> & Partial<{
315
332
  form: UseFormReturn<any>;
316
333
  formData: AnyObject;
317
334
  setFormData: Dispatch<SetStateAction<AnyObject>>;
@@ -1,4 +1,4 @@
1
- import { ContainerComponentProps, Molecule } from 'containers';
1
+ import { ContainerComponentProps, MetadataType, Molecule } from 'containers';
2
2
  import { InputFieldTypes } from 'fieldsConfiguration';
3
3
  import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
4
4
  import { Dispatch, SetStateAction } from 'react';
@@ -25,9 +25,7 @@ export declare type OrganismContextType = {
25
25
  editable?: boolean;
26
26
  isFormInEditMode?: boolean;
27
27
  isConfigurationMode?: boolean;
28
- organismMetadata?: {
29
- stateListenerId?: string;
30
- } & AnyObject;
28
+ organismMetadata?: MetadataType;
31
29
  onConfigurationItemClicked: (itemInfo?: Omit<ConfigurationItem, 'organismId'>) => void;
32
30
  selectedConfigurationItemId?: string;
33
31
  };
@@ -0,0 +1,32 @@
1
+ import type { StoryFn } from '@storybook/react';
2
+ import { CheckboxGroup as CheckboxGroupComponent } from 'molecules';
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ ref, onBlur, onChange, checkboxesProps }: Partial<{
6
+ ref: import("react-hook-form").RefCallBack;
7
+ onBlur: import("../../typescript").Callback;
8
+ onChange: (checkedIds: string[]) => void;
9
+ checkboxesProps: Partial<{
10
+ checkboxGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
11
+ checkboxFieldWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
12
+ onChange: (id: string) => void;
13
+ disabled: boolean;
14
+ options?: import("../..").SelectOption[] | undefined;
15
+ selectedIds?: string[] | undefined;
16
+ isError?: boolean | undefined;
17
+ isEditMode?: boolean | undefined;
18
+ isRichText: boolean;
19
+ internalConfig: Partial<{
20
+ selectedCheckboxBackgroundColor: string;
21
+ selectedCheckboxIconColor: string;
22
+ buttonPadding: number;
23
+ textPadding: number;
24
+ styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
25
+ wrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
26
+ buttonOptionSpacing?: import("theme").SizesTypes | undefined;
27
+ }>;
28
+ }>;
29
+ }>) => JSX.Element;
30
+ };
31
+ export default _default;
32
+ export declare const CheckboxGroup: StoryFn<typeof CheckboxGroupComponent>;
@@ -0,0 +1,23 @@
1
+ import { SizesTypes } from 'theme';
2
+ import { CheckboxInternalConfigProps } from 'atoms/Checkbox/types';
3
+ import type { Nullable } from 'typescript';
4
+ export declare type ChecklistItem = {
5
+ id: string;
6
+ isChecked: boolean;
7
+ eventId: Nullable<string>;
8
+ type: 'user_interactive' | 'system_controlled';
9
+ label: {
10
+ text: string;
11
+ isRichText: boolean;
12
+ };
13
+ };
14
+ export declare type ChecklistProps = {
15
+ items: ChecklistItem[];
16
+ props: {
17
+ gap: SizesTypes;
18
+ } & CheckboxInternalConfigProps;
19
+ };
20
+ export declare const Checklist: ({ items, props: { gap, ...checkboxProps }, }: ChecklistProps) => JSX.Element;
21
+ export declare const ChecklistWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
22
+ $gap: SizesTypes;
23
+ }, never>;
@@ -0,0 +1,8 @@
1
+ import type { StoryFn } from '@storybook/react';
2
+ import { Checklist as ChecklistComponent } from 'molecules';
3
+ declare const _default: {
4
+ title: string;
5
+ component: ({ items, props: { gap, ...checkboxProps }, }: import("molecules").ChecklistProps) => JSX.Element;
6
+ };
7
+ export default _default;
8
+ export declare const Checklist: StoryFn<typeof ChecklistComponent>;
@@ -30,3 +30,4 @@ export * from './Button/Button';
30
30
  export * from './ZealUIModal/ZealUIModal';
31
31
  export * from './Consent/Consent';
32
32
  export * from './Link/Link';
33
+ export * from './Checklist/Checklist';