@awell-health/ui-library 0.1.33
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/README.md +77 -0
- package/dist/index.css +8917 -0
- package/dist/index.js +50543 -0
- package/dist/types/atoms/button/Button.d.ts +8 -0
- package/dist/types/atoms/button/index.d.ts +2 -0
- package/dist/types/atoms/checkboxButton/CheckboxButton.d.ts +8 -0
- package/dist/types/atoms/checkboxButton/index.d.ts +2 -0
- package/dist/types/atoms/datePicker/DatePicker.d.ts +10 -0
- package/dist/types/atoms/datePicker/index.d.ts +1 -0
- package/dist/types/atoms/description/Description.d.ts +6 -0
- package/dist/types/atoms/description/index.d.ts +2 -0
- package/dist/types/atoms/index.d.ts +21 -0
- package/dist/types/atoms/inputField/InputField.d.ts +10 -0
- package/dist/types/atoms/inputField/index.d.ts +2 -0
- package/dist/types/atoms/logo/Logo.d.ts +6 -0
- package/dist/types/atoms/logo/index.d.ts +2 -0
- package/dist/types/atoms/longTextField/LongTextField.d.ts +9 -0
- package/dist/types/atoms/longTextField/index.d.ts +2 -0
- package/dist/types/atoms/messageAttachment/MessageAttachment.d.ts +8 -0
- package/dist/types/atoms/messageAttachment/index.d.ts +2 -0
- package/dist/types/atoms/modal/Modal.d.ts +11 -0
- package/dist/types/atoms/modal/index.d.ts +1 -0
- package/dist/types/atoms/phoneInputField/PhoneInputField.d.ts +22 -0
- package/dist/types/atoms/phoneInputField/helpers.d.ts +3 -0
- package/dist/types/atoms/phoneInputField/index.d.ts +3 -0
- package/dist/types/atoms/progressIndicator/ProgressIndicator.d.ts +6 -0
- package/dist/types/atoms/progressIndicator/index.d.ts +1 -0
- package/dist/types/atoms/questionLabel/QuestionLabel.d.ts +6 -0
- package/dist/types/atoms/questionLabel/index.d.ts +2 -0
- package/dist/types/atoms/radioButton/RadioButton.d.ts +9 -0
- package/dist/types/atoms/radioButton/index.d.ts +2 -0
- package/dist/types/atoms/rangeInput/RangeInput.d.ts +18 -0
- package/dist/types/atoms/rangeInput/index.d.ts +2 -0
- package/dist/types/atoms/richTextViewer/RichTextViewer.d.ts +6 -0
- package/dist/types/atoms/richTextViewer/index.d.ts +1 -0
- package/dist/types/atoms/richTextViewer/serializeHtml.d.ts +3 -0
- package/dist/types/atoms/scheduling/cal.com/CalDotComScheduling.d.ts +11 -0
- package/dist/types/atoms/scheduling/cal.com/calDotComTypes.d.ts +8 -0
- package/dist/types/atoms/scheduling/cal.com/index.d.ts +2 -0
- package/dist/types/atoms/scheduling/index.d.ts +1 -0
- package/dist/types/atoms/scrollIndicator/ScrollIndicator.d.ts +2 -0
- package/dist/types/atoms/scrollIndicator/index.d.ts +1 -0
- package/dist/types/atoms/select/Select.d.ts +22 -0
- package/dist/types/atoms/select/index.d.ts +3 -0
- package/dist/types/atoms/select/types.d.ts +1 -0
- package/dist/types/atoms/spinner/Spinner.d.ts +7 -0
- package/dist/types/atoms/spinner/index.d.ts +1 -0
- package/dist/types/atoms/themeProvider/ThemeProvider.d.ts +6 -0
- package/dist/types/atoms/themeProvider/helpers.d.ts +3 -0
- package/dist/types/atoms/themeProvider/index.d.ts +2 -0
- package/dist/types/atoms/typingCaret/TypingCaret.d.ts +8 -0
- package/dist/types/atoms/typingCaret/index.d.ts +1 -0
- package/dist/types/atoms/typography/Typography.d.ts +22 -0
- package/dist/types/atoms/typography/index.d.ts +3 -0
- package/dist/types/atoms/typography/types.d.ts +3 -0
- package/dist/types/constants/descriptionFixture.d.ts +56 -0
- package/dist/types/constants/formFixture.d.ts +3 -0
- package/dist/types/constants/messageFixture.d.ts +56 -0
- package/dist/types/hooks/index.d.ts +5 -0
- package/dist/types/hooks/useAccentColor/index.d.ts +1 -0
- package/dist/types/hooks/useAccentColor/useAccentColor.d.ts +5 -0
- package/dist/types/hooks/useClickOutsideNotifier/index.d.ts +7 -0
- package/dist/types/hooks/useForm/helpers.d.ts +20 -0
- package/dist/types/hooks/useForm/index.d.ts +2 -0
- package/dist/types/hooks/useForm/types.d.ts +55 -0
- package/dist/types/hooks/useForm/useConversationalForm.d.ts +3 -0
- package/dist/types/hooks/useForm/useTraditionalForm.d.ts +3 -0
- package/dist/types/hooks/useHtmlScript.d.ts +5 -0
- package/dist/types/hooks/useScrollHint/index.d.ts +1 -0
- package/dist/types/hooks/useScrollHint/useScrollHint.d.ts +6 -0
- package/dist/types/hooks/useValidate/index.d.ts +2 -0
- package/dist/types/hooks/useValidate/types.d.ts +24 -0
- package/dist/types/hooks/useValidate/useValidate.d.ts +9 -0
- package/dist/types/hostedPages/activities/checklist/Checklist.d.ts +14 -0
- package/dist/types/hostedPages/activities/checklist/index.d.ts +2 -0
- package/dist/types/hostedPages/activities/cloudinary/CloudinarySingleFileUpload.d.ts +3 -0
- package/dist/types/hostedPages/activities/cloudinary/CloudinaryUpload.d.ts +3 -0
- package/dist/types/hostedPages/activities/cloudinary/components/CloudinaryUploadWidget.d.ts +10 -0
- package/dist/types/hostedPages/activities/cloudinary/components/index.d.ts +1 -0
- package/dist/types/hostedPages/activities/cloudinary/index.d.ts +2 -0
- package/dist/types/hostedPages/activities/cloudinary/types.d.ts +86 -0
- package/dist/types/hostedPages/activities/cloudinary/utils.d.ts +5 -0
- package/dist/types/hostedPages/activities/form/ConversationalForm.d.ts +3 -0
- package/dist/types/hostedPages/activities/form/TraditionalForm.d.ts +3 -0
- package/dist/types/hostedPages/activities/form/__testdata__/eq5d5lFixture.d.ts +51 -0
- package/dist/types/hostedPages/activities/form/__testdata__/testFormFixture.d.ts +5 -0
- package/dist/types/hostedPages/activities/form/index.d.ts +2 -0
- package/dist/types/hostedPages/activities/form/types.d.ts +20 -0
- package/dist/types/hostedPages/activities/message/Message.d.ts +3 -0
- package/dist/types/hostedPages/activities/message/index.d.ts +1 -0
- package/dist/types/hostedPages/activities/message/types.d.ts +16 -0
- package/dist/types/hostedPages/activities/scheduling/cal.com/CalDotcomActivity.d.ts +3 -0
- package/dist/types/hostedPages/activities/scheduling/cal.com/index.d.ts +1 -0
- package/dist/types/hostedPages/activities/scheduling/cal.com/types.d.ts +6 -0
- package/dist/types/hostedPages/activities/scheduling/index.d.ts +1 -0
- package/dist/types/hostedPages/activities/wizardForm/WizardForm.d.ts +2 -0
- package/dist/types/hostedPages/activities/wizardForm/__testdata__/testFormFixture.d.ts +6 -0
- package/dist/types/hostedPages/activities/wizardForm/index.d.ts +1 -0
- package/dist/types/hostedPages/index.d.ts +9 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/CloseButton.d.ts +6 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/index.d.ts +1 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/HostedPageFooter.d.ts +6 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/index.d.ts +1 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageLayout.d.ts +8 -0
- package/dist/types/hostedPages/layouts/HostedPageLayout/index.d.ts +2 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/molecules/attachmentList/AttachmentList.d.ts +3 -0
- package/dist/types/molecules/attachmentList/index.d.ts +2 -0
- package/dist/types/molecules/attachmentList/types.d.ts +8 -0
- package/dist/types/molecules/avaGPT/avaGPT.d.ts +3 -0
- package/dist/types/molecules/avaGPT/index.d.ts +1 -0
- package/dist/types/molecules/avaGPT/types.d.ts +12 -0
- package/dist/types/molecules/index.d.ts +5 -0
- package/dist/types/molecules/multipleChoiceQuestion/MultipleChoiceQuestion.d.ts +11 -0
- package/dist/types/molecules/multipleChoiceQuestion/index.d.ts +1 -0
- package/dist/types/molecules/navbar/Navbar.d.ts +7 -0
- package/dist/types/molecules/navbar/index.d.ts +2 -0
- package/dist/types/molecules/question/Question.d.ts +4 -0
- package/dist/types/molecules/question/index.d.ts +1 -0
- package/dist/types/molecules/question/types.d.ts +31 -0
- package/dist/types/molecules/singleChoiceQuestion/SingleChoiceQuestion.d.ts +12 -0
- package/dist/types/molecules/singleChoiceQuestion/index.d.ts +1 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/dist/types/types/form.d.ts +26 -0
- package/dist/types/types/generated/fragment-types.d.ts +0 -0
- package/dist/types/types/generated/types-orchestration.d.ts +1874 -0
- package/dist/types/types/index.d.ts +8 -0
- package/dist/types/types/message.d.ts +6 -0
- package/dist/types/types/question.d.ts +27 -0
- package/dist/types/types/richText.d.ts +7 -0
- package/package.json +194 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { MouseEventHandler, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
5
|
+
children: React.ReactNode | string;
|
|
6
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
7
|
+
}
|
|
8
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface CheckboxButtonProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
id: string;
|
|
5
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CheckboxButton: ({ onChange, label, name, ...props }: CheckboxButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './datePicker.scss';
|
|
3
|
+
export interface DatePickerProps {
|
|
4
|
+
onChange: (date: string | null) => void;
|
|
5
|
+
label: string;
|
|
6
|
+
id: string;
|
|
7
|
+
value: Date | null;
|
|
8
|
+
mandatory?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const DatePicker: ({ id, label, onChange, value, mandatory, }: DatePickerProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DatePicker } from './DatePicker';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { Button } from './button';
|
|
2
|
+
export { CalDotComScheduling, type CalDotComBookingSuccessfulFunction, } from './scheduling';
|
|
3
|
+
export { CheckboxButton } from './checkboxButton';
|
|
4
|
+
export { CircularSpinner, HorizontalSpinner } from './spinner';
|
|
5
|
+
export { DatePicker } from './datePicker';
|
|
6
|
+
export { Description } from './description';
|
|
7
|
+
export { ExternalLink, Heading5, Heading6, HeadingMain, HeadingSecondary, HeadingTertiary, InlineText, InnerText, SubHeading, Text, } from './typography';
|
|
8
|
+
export { InputField } from './inputField';
|
|
9
|
+
export { Logo } from './logo';
|
|
10
|
+
export { LongTextField } from './longTextField';
|
|
11
|
+
export { MessageAttachment } from './messageAttachment';
|
|
12
|
+
export { Modal } from './modal';
|
|
13
|
+
export { ProgressIndicator } from './progressIndicator';
|
|
14
|
+
export { QuestionLabel } from './questionLabel';
|
|
15
|
+
export { RadioButton } from './radioButton';
|
|
16
|
+
export { RangeInput } from './rangeInput';
|
|
17
|
+
export { RichTextViewer } from './richTextViewer';
|
|
18
|
+
export { ScrollIndicator } from './scrollIndicator';
|
|
19
|
+
export { Select } from './select';
|
|
20
|
+
export { ThemeProvider } from './themeProvider';
|
|
21
|
+
export { TypingCaret, WithTypingCaret } from './typingCaret';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChangeEventHandler, InputHTMLAttributes, MouseEventHandler } from 'react';
|
|
2
|
+
export interface InputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
type: 'number' | 'text' | 'date';
|
|
4
|
+
label: string;
|
|
5
|
+
id: string;
|
|
6
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
7
|
+
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
8
|
+
mandatory?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const InputField: ({ onChange, id, label, type, mandatory, ...props }: InputFieldProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface LongTextFieldProps extends InputHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
id: string;
|
|
5
|
+
onChange: ChangeEventHandler<HTMLTextAreaElement>;
|
|
6
|
+
value?: string;
|
|
7
|
+
mandatory?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const LongTextField: ({ onChange, id, label, mandatory, ...props }: LongTextFieldProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageAttachmentProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
url: string;
|
|
5
|
+
name: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const MessageAttachment: ({ url, name, label, children, }: MessageAttachmentProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { type ButtonProps } from '../button';
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
onCloseModal: () => void;
|
|
8
|
+
icon?: 'success' | 'warning';
|
|
9
|
+
buttons: Array<React.ReactElement<ButtonProps>>;
|
|
10
|
+
}
|
|
11
|
+
export declare const Modal: FC<ModalProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal } from './Modal';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InputHTMLAttributes, MouseEventHandler } from 'react';
|
|
2
|
+
import 'react-international-phone/style.css';
|
|
3
|
+
import { CountryIso2 } from 'react-international-phone';
|
|
4
|
+
export interface PhoneInputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
label: string;
|
|
6
|
+
id: string;
|
|
7
|
+
onChange: ({ target: { value } }: {
|
|
8
|
+
target: {
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
}) => void;
|
|
12
|
+
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
13
|
+
mandatory?: boolean;
|
|
14
|
+
value: string;
|
|
15
|
+
initialCountry?: CountryIso2;
|
|
16
|
+
availableCountries?: CountryIso2 | Array<CountryIso2>;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const PhoneInputField: {
|
|
20
|
+
({ onChange, id, label, mandatory, value, placeholder, initialCountry, availableCountries, ...props }: PhoneInputFieldProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProgressIndicator, type ProgressIndicatorProps, } from './ProgressIndicator';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LabelHTMLAttributes } from 'react';
|
|
2
|
+
export interface QuestionLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
mandatory?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const QuestionLabel: ({ label, mandatory, ...props }: QuestionLabelProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
4
|
+
label: string;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
customWrapperClass?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const RadioButton: ({ onChange, label, name, customWrapperClass, ...props }: RadioButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface RangeInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
sliderConfig: {
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step_value: number;
|
|
8
|
+
display_marks: boolean;
|
|
9
|
+
min_label: string;
|
|
10
|
+
max_label: string;
|
|
11
|
+
is_value_tooltip_on: boolean;
|
|
12
|
+
show_min_max_values: boolean;
|
|
13
|
+
};
|
|
14
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
15
|
+
id: string;
|
|
16
|
+
mandatory?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const RangeInput: ({ label, onChange, id, sliderConfig, mandatory, ...props }: RangeInputProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RichTextViewer } from './RichTextViewer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { type BookingSuccessfulFunction } from './calDotComTypes';
|
|
3
|
+
export interface CalDotComSchedulingProps {
|
|
4
|
+
calLink: string;
|
|
5
|
+
onBookingSuccessful: BookingSuccessfulFunction;
|
|
6
|
+
hideEventTypeDetails?: boolean;
|
|
7
|
+
metadata?: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const CalDotComScheduling: FC<CalDotComSchedulingProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface BookingSuccessfulFunctionProps {
|
|
2
|
+
confirmed?: boolean;
|
|
3
|
+
date?: string;
|
|
4
|
+
eventType?: Record<string, unknown>;
|
|
5
|
+
booking?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare type BookingSuccessfulFunction = ({ confirmed, date, eventType, }: BookingSuccessfulFunctionProps) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CalDotComScheduling, type CalDotComBookingSuccessfulFunction, } from './cal.com';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ScrollIndicator } from './ScrollIndicator';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InputHTMLAttributes, MouseEventHandler } from 'react';
|
|
2
|
+
import { type Option } from './types';
|
|
3
|
+
export interface SelectProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
|
|
4
|
+
type: 'single' | 'multiple';
|
|
5
|
+
id: string;
|
|
6
|
+
onChange: (value: number | Array<Option>) => void;
|
|
7
|
+
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
8
|
+
mandatory?: boolean;
|
|
9
|
+
options: Array<Option>;
|
|
10
|
+
optionsShown?: number;
|
|
11
|
+
value: Array<Option> | number | undefined;
|
|
12
|
+
labels: {
|
|
13
|
+
questionLabel?: string;
|
|
14
|
+
searchPlaceholder?: string;
|
|
15
|
+
noOptions?: string;
|
|
16
|
+
customError?: string;
|
|
17
|
+
};
|
|
18
|
+
showCount?: boolean;
|
|
19
|
+
displayMaxLength?: number | null;
|
|
20
|
+
filtering?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const Select: ({ onChange, id, labels, type, mandatory, options, optionsShown, showCount, displayMaxLength, value, filtering, ...props }: SelectProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type Option } from '../../types/question';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CircularSpinner, HorizontalSpinner } from './Spinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TypingCaret, WithTypingCaret } from './TypingCaret';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { TextVariants } from './types';
|
|
3
|
+
export interface TypographyProps {
|
|
4
|
+
children: string | string[] | JSX.Element | ReactNode;
|
|
5
|
+
variant?: TextVariants;
|
|
6
|
+
color?: string;
|
|
7
|
+
spacing?: string;
|
|
8
|
+
classes?: CSSProperties | string;
|
|
9
|
+
}
|
|
10
|
+
export declare const HeadingMain: FC<TypographyProps>;
|
|
11
|
+
export declare const HeadingSecondary: FC<TypographyProps>;
|
|
12
|
+
export declare const HeadingTertiary: FC<TypographyProps>;
|
|
13
|
+
export declare const SubHeading: FC<TypographyProps>;
|
|
14
|
+
export declare const Heading5: FC<TypographyProps>;
|
|
15
|
+
export declare const Heading6: FC<TypographyProps>;
|
|
16
|
+
export declare const Text: FC<TypographyProps>;
|
|
17
|
+
export declare const InlineText: FC<TypographyProps>;
|
|
18
|
+
export declare const ExternalLink: FC<TypographyProps & {
|
|
19
|
+
href: string;
|
|
20
|
+
rel: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const InnerText: FC<TypographyProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare type HeadlineVariants = 'hugeHeadline' | 'bigHeadline' | 'headline' | 'subHeadline' | 'smallHeadline' | 'tinyHeadline' | 'tinyHeadlineCaps' | 'discreetHeadline' | 'undersizeHeadline';
|
|
2
|
+
export declare type ParagraphsVariants = 'textRegular' | 'textMedium' | 'textSmall' | 'textSmallMedium' | 'textSmallBold' | 'inputPlaceholder' | 'textTinyHint';
|
|
3
|
+
export declare type TextVariants = ParagraphsVariants | HeadlineVariants;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const descriptionFixture: ({
|
|
2
|
+
type: string;
|
|
3
|
+
children: {
|
|
4
|
+
type: string;
|
|
5
|
+
children: {
|
|
6
|
+
type: string;
|
|
7
|
+
children: {
|
|
8
|
+
text: string;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
}[];
|
|
12
|
+
url?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
type: string;
|
|
15
|
+
children: ({
|
|
16
|
+
text: string;
|
|
17
|
+
type?: undefined;
|
|
18
|
+
url?: undefined;
|
|
19
|
+
children?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
type: string;
|
|
22
|
+
url: string;
|
|
23
|
+
children: {
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
text?: undefined;
|
|
27
|
+
})[];
|
|
28
|
+
url?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
type: string;
|
|
31
|
+
children: {
|
|
32
|
+
text: string;
|
|
33
|
+
italic: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
url?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
type: string;
|
|
38
|
+
children: {
|
|
39
|
+
text: string;
|
|
40
|
+
underline: boolean;
|
|
41
|
+
}[];
|
|
42
|
+
url?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
type: string;
|
|
45
|
+
children: {
|
|
46
|
+
text: string;
|
|
47
|
+
strikethrough: boolean;
|
|
48
|
+
}[];
|
|
49
|
+
url?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
type: string;
|
|
52
|
+
url: string;
|
|
53
|
+
children: {
|
|
54
|
+
text: string;
|
|
55
|
+
}[];
|
|
56
|
+
})[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const messageFixture: ({
|
|
2
|
+
type: string;
|
|
3
|
+
children: {
|
|
4
|
+
type: string;
|
|
5
|
+
children: {
|
|
6
|
+
type: string;
|
|
7
|
+
children: {
|
|
8
|
+
text: string;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
}[];
|
|
12
|
+
url?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
type: string;
|
|
15
|
+
children: ({
|
|
16
|
+
text: string;
|
|
17
|
+
type?: undefined;
|
|
18
|
+
url?: undefined;
|
|
19
|
+
children?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
type: string;
|
|
22
|
+
url: string;
|
|
23
|
+
children: {
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
text?: undefined;
|
|
27
|
+
})[];
|
|
28
|
+
url?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
type: string;
|
|
31
|
+
children: {
|
|
32
|
+
text: string;
|
|
33
|
+
italic: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
url?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
type: string;
|
|
38
|
+
children: {
|
|
39
|
+
text: string;
|
|
40
|
+
underline: boolean;
|
|
41
|
+
}[];
|
|
42
|
+
url?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
type: string;
|
|
45
|
+
children: {
|
|
46
|
+
text: string;
|
|
47
|
+
strikethrough: boolean;
|
|
48
|
+
}[];
|
|
49
|
+
url?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
type: string;
|
|
52
|
+
url: string;
|
|
53
|
+
children: {
|
|
54
|
+
text: string;
|
|
55
|
+
}[];
|
|
56
|
+
})[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useClickOutsideNotifier } from './useClickOutsideNotifier';
|
|
2
|
+
export { useScrollHint } from './useScrollHint';
|
|
3
|
+
export { useConversationalForm, useTraditionalForm } from './useForm';
|
|
4
|
+
export { useValidate } from './useValidate';
|
|
5
|
+
export { useHtmlScript } from './useHtmlScript';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAccentColor } from './useAccentColor';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface useClickOutsideNotifierProps {
|
|
3
|
+
ref: React.RefObject<HTMLElement>;
|
|
4
|
+
clickOutsideHandler: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useClickOutsideNotifier: ({ ref, clickOutsideHandler, }: useClickOutsideNotifierProps) => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { Question, QuestionWithVisibility, FormError } from '../../types';
|
|
3
|
+
import { AnswerValue, ErrorLabels, QuestionRuleResult } from './types';
|
|
4
|
+
import { CountryIso2 } from 'react-international-phone';
|
|
5
|
+
export declare const getDefaultValue: (question: Question) => AnswerValue;
|
|
6
|
+
export declare const getInitialValues: (questions: Array<Question>) => Record<string, AnswerValue>;
|
|
7
|
+
export declare const convertToAwellInput: (formResponse: any) => {
|
|
8
|
+
question_id: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
export declare const convertToFormFormat: (answersAsString: string | undefined, questions: Array<Question>) => Record<string, AnswerValue>;
|
|
12
|
+
export declare const updateVisibility: (questions: Array<Question>, evaluation_results: Array<QuestionRuleResult>) => Array<QuestionWithVisibility>;
|
|
13
|
+
export declare const isEmpty: (value: any) => boolean;
|
|
14
|
+
interface CalculatePercentageCompletedProps {
|
|
15
|
+
currentQuestionId: string;
|
|
16
|
+
allQuestions: Question[];
|
|
17
|
+
}
|
|
18
|
+
export declare const calculatePercentageCompleted: ({ currentQuestionId, allQuestions, }: CalculatePercentageCompletedProps) => number;
|
|
19
|
+
export declare const getErrorsForQuestion: (currentQuestion: QuestionWithVisibility, formMethods: UseFormReturn<Record<string, AnswerValue>, any>, errorLabels: ErrorLabels, isValidE164Number: (number: string, availableCountries?: CountryIso2 | Array<CountryIso2> | undefined) => boolean) => Array<FormError>;
|
|
20
|
+
export {};
|