@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.
Files changed (131) hide show
  1. package/README.md +77 -0
  2. package/dist/index.css +8917 -0
  3. package/dist/index.js +50543 -0
  4. package/dist/types/atoms/button/Button.d.ts +8 -0
  5. package/dist/types/atoms/button/index.d.ts +2 -0
  6. package/dist/types/atoms/checkboxButton/CheckboxButton.d.ts +8 -0
  7. package/dist/types/atoms/checkboxButton/index.d.ts +2 -0
  8. package/dist/types/atoms/datePicker/DatePicker.d.ts +10 -0
  9. package/dist/types/atoms/datePicker/index.d.ts +1 -0
  10. package/dist/types/atoms/description/Description.d.ts +6 -0
  11. package/dist/types/atoms/description/index.d.ts +2 -0
  12. package/dist/types/atoms/index.d.ts +21 -0
  13. package/dist/types/atoms/inputField/InputField.d.ts +10 -0
  14. package/dist/types/atoms/inputField/index.d.ts +2 -0
  15. package/dist/types/atoms/logo/Logo.d.ts +6 -0
  16. package/dist/types/atoms/logo/index.d.ts +2 -0
  17. package/dist/types/atoms/longTextField/LongTextField.d.ts +9 -0
  18. package/dist/types/atoms/longTextField/index.d.ts +2 -0
  19. package/dist/types/atoms/messageAttachment/MessageAttachment.d.ts +8 -0
  20. package/dist/types/atoms/messageAttachment/index.d.ts +2 -0
  21. package/dist/types/atoms/modal/Modal.d.ts +11 -0
  22. package/dist/types/atoms/modal/index.d.ts +1 -0
  23. package/dist/types/atoms/phoneInputField/PhoneInputField.d.ts +22 -0
  24. package/dist/types/atoms/phoneInputField/helpers.d.ts +3 -0
  25. package/dist/types/atoms/phoneInputField/index.d.ts +3 -0
  26. package/dist/types/atoms/progressIndicator/ProgressIndicator.d.ts +6 -0
  27. package/dist/types/atoms/progressIndicator/index.d.ts +1 -0
  28. package/dist/types/atoms/questionLabel/QuestionLabel.d.ts +6 -0
  29. package/dist/types/atoms/questionLabel/index.d.ts +2 -0
  30. package/dist/types/atoms/radioButton/RadioButton.d.ts +9 -0
  31. package/dist/types/atoms/radioButton/index.d.ts +2 -0
  32. package/dist/types/atoms/rangeInput/RangeInput.d.ts +18 -0
  33. package/dist/types/atoms/rangeInput/index.d.ts +2 -0
  34. package/dist/types/atoms/richTextViewer/RichTextViewer.d.ts +6 -0
  35. package/dist/types/atoms/richTextViewer/index.d.ts +1 -0
  36. package/dist/types/atoms/richTextViewer/serializeHtml.d.ts +3 -0
  37. package/dist/types/atoms/scheduling/cal.com/CalDotComScheduling.d.ts +11 -0
  38. package/dist/types/atoms/scheduling/cal.com/calDotComTypes.d.ts +8 -0
  39. package/dist/types/atoms/scheduling/cal.com/index.d.ts +2 -0
  40. package/dist/types/atoms/scheduling/index.d.ts +1 -0
  41. package/dist/types/atoms/scrollIndicator/ScrollIndicator.d.ts +2 -0
  42. package/dist/types/atoms/scrollIndicator/index.d.ts +1 -0
  43. package/dist/types/atoms/select/Select.d.ts +22 -0
  44. package/dist/types/atoms/select/index.d.ts +3 -0
  45. package/dist/types/atoms/select/types.d.ts +1 -0
  46. package/dist/types/atoms/spinner/Spinner.d.ts +7 -0
  47. package/dist/types/atoms/spinner/index.d.ts +1 -0
  48. package/dist/types/atoms/themeProvider/ThemeProvider.d.ts +6 -0
  49. package/dist/types/atoms/themeProvider/helpers.d.ts +3 -0
  50. package/dist/types/atoms/themeProvider/index.d.ts +2 -0
  51. package/dist/types/atoms/typingCaret/TypingCaret.d.ts +8 -0
  52. package/dist/types/atoms/typingCaret/index.d.ts +1 -0
  53. package/dist/types/atoms/typography/Typography.d.ts +22 -0
  54. package/dist/types/atoms/typography/index.d.ts +3 -0
  55. package/dist/types/atoms/typography/types.d.ts +3 -0
  56. package/dist/types/constants/descriptionFixture.d.ts +56 -0
  57. package/dist/types/constants/formFixture.d.ts +3 -0
  58. package/dist/types/constants/messageFixture.d.ts +56 -0
  59. package/dist/types/hooks/index.d.ts +5 -0
  60. package/dist/types/hooks/useAccentColor/index.d.ts +1 -0
  61. package/dist/types/hooks/useAccentColor/useAccentColor.d.ts +5 -0
  62. package/dist/types/hooks/useClickOutsideNotifier/index.d.ts +7 -0
  63. package/dist/types/hooks/useForm/helpers.d.ts +20 -0
  64. package/dist/types/hooks/useForm/index.d.ts +2 -0
  65. package/dist/types/hooks/useForm/types.d.ts +55 -0
  66. package/dist/types/hooks/useForm/useConversationalForm.d.ts +3 -0
  67. package/dist/types/hooks/useForm/useTraditionalForm.d.ts +3 -0
  68. package/dist/types/hooks/useHtmlScript.d.ts +5 -0
  69. package/dist/types/hooks/useScrollHint/index.d.ts +1 -0
  70. package/dist/types/hooks/useScrollHint/useScrollHint.d.ts +6 -0
  71. package/dist/types/hooks/useValidate/index.d.ts +2 -0
  72. package/dist/types/hooks/useValidate/types.d.ts +24 -0
  73. package/dist/types/hooks/useValidate/useValidate.d.ts +9 -0
  74. package/dist/types/hostedPages/activities/checklist/Checklist.d.ts +14 -0
  75. package/dist/types/hostedPages/activities/checklist/index.d.ts +2 -0
  76. package/dist/types/hostedPages/activities/cloudinary/CloudinarySingleFileUpload.d.ts +3 -0
  77. package/dist/types/hostedPages/activities/cloudinary/CloudinaryUpload.d.ts +3 -0
  78. package/dist/types/hostedPages/activities/cloudinary/components/CloudinaryUploadWidget.d.ts +10 -0
  79. package/dist/types/hostedPages/activities/cloudinary/components/index.d.ts +1 -0
  80. package/dist/types/hostedPages/activities/cloudinary/index.d.ts +2 -0
  81. package/dist/types/hostedPages/activities/cloudinary/types.d.ts +86 -0
  82. package/dist/types/hostedPages/activities/cloudinary/utils.d.ts +5 -0
  83. package/dist/types/hostedPages/activities/form/ConversationalForm.d.ts +3 -0
  84. package/dist/types/hostedPages/activities/form/TraditionalForm.d.ts +3 -0
  85. package/dist/types/hostedPages/activities/form/__testdata__/eq5d5lFixture.d.ts +51 -0
  86. package/dist/types/hostedPages/activities/form/__testdata__/testFormFixture.d.ts +5 -0
  87. package/dist/types/hostedPages/activities/form/index.d.ts +2 -0
  88. package/dist/types/hostedPages/activities/form/types.d.ts +20 -0
  89. package/dist/types/hostedPages/activities/message/Message.d.ts +3 -0
  90. package/dist/types/hostedPages/activities/message/index.d.ts +1 -0
  91. package/dist/types/hostedPages/activities/message/types.d.ts +16 -0
  92. package/dist/types/hostedPages/activities/scheduling/cal.com/CalDotcomActivity.d.ts +3 -0
  93. package/dist/types/hostedPages/activities/scheduling/cal.com/index.d.ts +1 -0
  94. package/dist/types/hostedPages/activities/scheduling/cal.com/types.d.ts +6 -0
  95. package/dist/types/hostedPages/activities/scheduling/index.d.ts +1 -0
  96. package/dist/types/hostedPages/activities/wizardForm/WizardForm.d.ts +2 -0
  97. package/dist/types/hostedPages/activities/wizardForm/__testdata__/testFormFixture.d.ts +6 -0
  98. package/dist/types/hostedPages/activities/wizardForm/index.d.ts +1 -0
  99. package/dist/types/hostedPages/index.d.ts +9 -0
  100. package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/CloseButton.d.ts +6 -0
  101. package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/index.d.ts +1 -0
  102. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/HostedPageFooter.d.ts +6 -0
  103. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/index.d.ts +1 -0
  104. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageLayout.d.ts +8 -0
  105. package/dist/types/hostedPages/layouts/HostedPageLayout/index.d.ts +2 -0
  106. package/dist/types/index.d.ts +5 -0
  107. package/dist/types/molecules/attachmentList/AttachmentList.d.ts +3 -0
  108. package/dist/types/molecules/attachmentList/index.d.ts +2 -0
  109. package/dist/types/molecules/attachmentList/types.d.ts +8 -0
  110. package/dist/types/molecules/avaGPT/avaGPT.d.ts +3 -0
  111. package/dist/types/molecules/avaGPT/index.d.ts +1 -0
  112. package/dist/types/molecules/avaGPT/types.d.ts +12 -0
  113. package/dist/types/molecules/index.d.ts +5 -0
  114. package/dist/types/molecules/multipleChoiceQuestion/MultipleChoiceQuestion.d.ts +11 -0
  115. package/dist/types/molecules/multipleChoiceQuestion/index.d.ts +1 -0
  116. package/dist/types/molecules/navbar/Navbar.d.ts +7 -0
  117. package/dist/types/molecules/navbar/index.d.ts +2 -0
  118. package/dist/types/molecules/question/Question.d.ts +4 -0
  119. package/dist/types/molecules/question/index.d.ts +1 -0
  120. package/dist/types/molecules/question/types.d.ts +31 -0
  121. package/dist/types/molecules/singleChoiceQuestion/SingleChoiceQuestion.d.ts +12 -0
  122. package/dist/types/molecules/singleChoiceQuestion/index.d.ts +1 -0
  123. package/dist/types/setupTests.d.ts +1 -0
  124. package/dist/types/types/form.d.ts +26 -0
  125. package/dist/types/types/generated/fragment-types.d.ts +0 -0
  126. package/dist/types/types/generated/types-orchestration.d.ts +1874 -0
  127. package/dist/types/types/index.d.ts +8 -0
  128. package/dist/types/types/message.d.ts +6 -0
  129. package/dist/types/types/question.d.ts +27 -0
  130. package/dist/types/types/richText.d.ts +7 -0
  131. 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,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -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,2 @@
1
+ export { CheckboxButton } from './CheckboxButton';
2
+ export type { CheckboxButtonProps } from './CheckboxButton';
@@ -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,6 @@
1
+ /// <reference types="react" />
2
+ import { Nodes } from '../../types';
3
+ export interface DescriptionProps {
4
+ content: Nodes | string;
5
+ }
6
+ export declare const Description: ({ content }: DescriptionProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Description } from './Description';
2
+ export type { DescriptionProps } from './Description';
@@ -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,2 @@
1
+ export { InputField } from './InputField';
2
+ export type { InputFieldProps } from './InputField';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface LogoProps {
3
+ companyName?: string;
4
+ logo?: JSX.Element | string;
5
+ }
6
+ export declare const Logo: ({ companyName, logo, }: LogoProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Logo } from './Logo';
2
+ export type { LogoProps } from './Logo';
@@ -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,2 @@
1
+ export { LongTextField } from './LongTextField';
2
+ export type { LongTextFieldProps } from './LongTextField';
@@ -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,2 @@
1
+ export { MessageAttachment } from './MessageAttachment';
2
+ export type { MessageAttachmentProps } from './MessageAttachment';
@@ -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,3 @@
1
+ import { CountryIso2 } from 'react-international-phone';
2
+ import { CountryData } from '../../hooks/useValidate';
3
+ export declare const getDefaultCountries: (availableCountries: CountryIso2 | Array<CountryIso2> | undefined) => Array<CountryData>;
@@ -0,0 +1,3 @@
1
+ export { PhoneInputField } from './PhoneInputField';
2
+ export type { PhoneInputFieldProps } from './PhoneInputField';
3
+ export { getDefaultCountries } from './helpers';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface ProgressIndicatorProps {
3
+ percentageCompleted: number;
4
+ showPercentage?: boolean;
5
+ }
6
+ export declare const ProgressIndicator: ({ percentageCompleted, showPercentage, }: ProgressIndicatorProps) => JSX.Element;
@@ -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,2 @@
1
+ export { QuestionLabel } from './QuestionLabel';
2
+ export type { QuestionLabelProps } from './QuestionLabel';
@@ -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,2 @@
1
+ export { RadioButton } from './RadioButton';
2
+ export type { RadioButtonProps } from './RadioButton';
@@ -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,2 @@
1
+ export { RangeInput } from './RangeInput';
2
+ export type { RangeInputProps } from './RangeInput';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface RichTextViewerProps {
3
+ content: string;
4
+ }
5
+ export declare const RichTextViewer: ({ content, }: RichTextViewerProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export { RichTextViewer } from './RichTextViewer';
@@ -0,0 +1,3 @@
1
+ import { Nodes } from '../../types';
2
+ export declare const serializeHtml: (nodes: Nodes | string) => string;
3
+ export declare const generatePureHtml: (content: Nodes | string) => string;
@@ -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,2 @@
1
+ export { CalDotComScheduling, type CalDotComSchedulingProps, } from './CalDotComScheduling';
2
+ export { type BookingSuccessfulFunction as CalDotComBookingSuccessfulFunction } from './calDotComTypes';
@@ -0,0 +1 @@
1
+ export { CalDotComScheduling, type CalDotComBookingSuccessfulFunction, } from './cal.com';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ScrollIndicator: () => JSX.Element;
@@ -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,3 @@
1
+ export { Select } from './Select';
2
+ export { type SelectProps } from './Select';
3
+ export { type Option } from './types';
@@ -0,0 +1 @@
1
+ export { type Option } from '../../types/question';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface CircularSpinnerProps {
3
+ size?: 'sm' | 'base';
4
+ }
5
+ export declare const CircularSpinner: ({ size }: CircularSpinnerProps) => JSX.Element;
6
+ export declare const HorizontalSpinner: () => JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { CircularSpinner, HorizontalSpinner } from './Spinner';
@@ -0,0 +1,6 @@
1
+ import React, { FC } from 'react';
2
+ export interface ThemeProviderProps {
3
+ children: React.ReactNode | string;
4
+ accentColor?: string;
5
+ }
6
+ export declare const ThemeProvider: FC<ThemeProviderProps>;
@@ -0,0 +1,3 @@
1
+ export declare const getTextColor: (colorString: string) => string;
2
+ export declare const shadeColor: (colorString: string, percent: number) => string;
3
+ export declare const opacityColor: (colorString: string, opacity: number) => string;
@@ -0,0 +1,2 @@
1
+ export { ThemeProvider } from './ThemeProvider';
2
+ export type { ThemeProviderProps } from './ThemeProvider';
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export declare const TypingCaret: () => JSX.Element;
3
+ declare type WithCaretProps = {
4
+ Component: string;
5
+ children?: ReactNode;
6
+ } & any;
7
+ export declare const WithTypingCaret: FC<WithCaretProps>;
8
+ export {};
@@ -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 { HeadingMain, HeadingSecondary, HeadingTertiary, SubHeading, Heading5, Heading6, Text, InlineText, ExternalLink, InnerText, } from './Typography';
2
+ export type { TypographyProps } from './Typography';
3
+ export type { TextVariants } from './types';
@@ -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,3 @@
1
+ import { Form } from '../types';
2
+ export declare const form: Form;
3
+ export declare const sliderQuestionForm: Form;
@@ -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,5 @@
1
+ interface UseAccentColorHook {
2
+ accentColor: string;
3
+ }
4
+ export declare const useAccentColor: () => UseAccentColorHook;
5
+ export {};
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ export { useTraditionalForm } from './useTraditionalForm';
2
+ export { useConversationalForm } from './useConversationalForm';