@goodhood-web/nebenan-base 3.4.0-development.47 → 3.4.0-development.49
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/index.d.ts +2 -1
- package/index.js +101 -102
- package/index.mjs +16645 -13919
- package/lib/Forms/DynamicForm/DynamicForm.d.ts +1 -1
- package/lib/Forms/Fields/CodeField/CodeField.d.ts +3 -0
- package/lib/Forms/Fields/CodeField/CodeField.types.d.ts +9 -0
- package/lib/Forms/Fields/FormButton/FormButtonProps.d.ts +16 -0
- package/lib/Forms/Fields/FormCodeField.d.ts +5 -0
- package/lib/Forms/Fields/FormContentCreatorTile.d.ts +6 -0
- package/lib/Forms/Fields/FormGenderSelector.d.ts +5 -0
- package/lib/Forms/Fields/FormHeader/FormHeader.d.ts +3 -0
- package/lib/Forms/Fields/FormHeader/FormHeader.types.d.ts +10 -0
- package/lib/Forms/Fields/FormHeader/components/PhoneNumber.d.ts +4 -0
- package/lib/Forms/Fields/FormNameAbbreviation.d.ts +7 -0
- package/lib/Forms/Fields/FormPasswordField.d.ts +5 -0
- package/lib/Forms/Fields/FormPhoneInput.d.ts +5 -0
- package/lib/Forms/Fields/FormSelectInput.d.ts +12 -0
- package/lib/Forms/Fields/FormTextInput.d.ts +1 -1
- package/lib/Forms/Fields/GenderSelector/GenderSelector.d.ts +3 -0
- package/lib/Forms/Fields/GenderSelector/GenderSelector.types.d.ts +19 -0
- package/lib/Forms/Fields/GenderSelector/GenderSelector.utils.d.ts +4 -0
- package/lib/Forms/Fields/NameAbbreviation/NameAbbreviation.d.ts +3 -0
- package/lib/Forms/Fields/NameAbbreviation/NameAbbreviation.types.d.ts +11 -0
- package/lib/Forms/Fields/PasswordField/PasswordField.d.ts +3 -0
- package/lib/Forms/Fields/PasswordField/PasswordField.types.d.ts +16 -0
- package/lib/Forms/Fields/PasswordField/utils.d.ts +1 -0
- package/lib/Forms/Fields/PhoneInput/PhoneInput.d.ts +3 -0
- package/lib/Forms/Fields/PhoneInput/PhoneInput.types.d.ts +16 -0
- package/lib/Forms/Fields/PhoneInput/util.d.ts +153 -0
- package/lib/Forms/Fields/SelectInput/SelectInput.d.ts +3 -0
- package/lib/Forms/Fields/SelectInput/SelectInput.types.d.ts +31 -0
- package/lib/Forms/Fields/SelectInput/components/Input/Input.d.ts +3 -0
- package/lib/Forms/Fields/SelectInput/components/Input/Input.type.d.ts +5 -0
- package/lib/Forms/Fields/SelectInput/components/OptionsList/OptionsList.d.ts +3 -0
- package/lib/Forms/Fields/SelectInput/components/OptionsList/OptionsList.types.d.ts +11 -0
- package/lib/Forms/Fields/SelectInput/utils.d.ts +4 -0
- package/lib/Forms/Fields/index.d.ts +3 -1
- package/lib/Forms/Fields/utils.d.ts +1 -0
- package/lib/Forms/Form/Form.d.ts +1 -1
- package/lib/Forms/Form/Form.types.d.ts +12 -3
- package/lib/Forms/Form/utils/parseApiErrors.d.ts +5 -0
- package/lib/Forms/Form/utils/utils.d.ts +4 -0
- package/lib/Forms/Form.store.d.ts +7 -0
- package/lib/Forms/GridForm/GridForm.d.ts +1 -1
- package/lib/Forms/Wizard/Wizard.d.ts +1 -1
- package/lib/Forms/Wizard/Wizard.types.d.ts +70 -4
- package/lib/Forms/Wizard/WizardContext.d.ts +8 -1
- package/lib/Forms/Wizard/useWizard.d.ts +6 -1
- package/lib/Grids/Grid/Grid.types.d.ts +6 -5
- package/lib/Grids/Grid/GridItem/GridItem.d.ts +1 -1
- package/lib/Grids/Grid/GridItem/GridItem.types.d.ts +1 -0
- package/lib/MobileLayout/MobileLayout.types.d.ts +1 -0
- package/lib/Registration/Registration.d.ts +3 -0
- package/lib/Registration/Registration.store.d.ts +4 -0
- package/lib/Registration/Registration.types.d.ts +17 -0
- package/lib/Registration/RegistrationCard/RegistrationCard.d.ts +9 -0
- package/lib/Registration/RegistrationFieldMappings/RegistrationFieldMappings.d.ts +3 -0
- package/lib/Registration/RegistrationForm/FieldMappings/FieldMappings.d.ts +3 -0
- package/lib/Registration/RegistrationForm/RegistrationForm.d.ts +3 -0
- package/lib/Registration/RegistrationForm/RegistrationForm.types.d.ts +5 -0
- package/lib/Registration/RegistrationForm/Steps/Address.d.ts +2 -0
- package/lib/Registration/RegistrationForm/Steps/Email.d.ts +3 -0
- package/lib/Registration/RegistrationForm/Steps/Name.d.ts +2 -0
- package/lib/Registration/RegistrationForm/Steps/index.d.ts +4 -0
- package/lib/Registration/RegistrationForm/network.d.ts +4 -0
- package/lib/Registration/VerificationForm/FieldMappings/FieldMappings.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/Gps.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/InviteCode.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/Methods.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/PostalCode.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/PostalCodeRequested.d.ts +2 -0
- package/lib/Registration/VerificationForm/Steps/Sms.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/SmsCode.d.ts +3 -0
- package/lib/Registration/VerificationForm/Steps/index.d.ts +7 -0
- package/lib/Registration/VerificationForm/VerificationForm.d.ts +3 -0
- package/lib/Registration/VerificationForm/VerificationForm.types.d.ts +10 -0
- package/lib/Registration/VerificationForm/data.d.ts +553 -0
- package/lib/Registration/VerificationForm/network.d.ts +7 -0
- package/lib/Registration/VerificationForm/utils.d.ts +67 -0
- package/lib/Registration/components/MandatoryEmailConfirmation/MandatoryEmailConfirmation.d.ts +3 -0
- package/lib/Registration/components/MandatoryEmailConfirmation/MandatoryEmailConfirmation.types.d.ts +3 -0
- package/lib/Registration/components/MandatoryEmailConfirmation/utils.d.ts +4 -0
- package/lib/Registration/components/SuccessScreen/SuccessScreen.d.ts +2 -0
- package/lib/Registration/utils.d.ts +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { WizardStepT } from '../Wizard/Wizard.types';
|
|
3
|
-
export declare function DynamicForm({ fields, onSubmit }: PropsWithChildren<WizardStepT>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function DynamicForm({ fields, formError, formFieldMap, formKey, id, onSubmit, spacing, validationMode, validationSchema, }: PropsWithChildren<WizardStepT>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default DynamicForm;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonVariationProps } from '../../../../../../ui/src/lib/Atoms/Buttons/Button/Button.types';
|
|
3
|
+
import { TextButtonProps } from '../../../../../../ui/src/lib/Atoms/Buttons/TextButton/TextButton.types';
|
|
4
|
+
export type FormButtonProps = {
|
|
5
|
+
color?: TextButtonProps['color'];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
goTo?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
size?: ButtonVariationProps['size'];
|
|
11
|
+
text?: string;
|
|
12
|
+
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
13
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'text';
|
|
14
|
+
};
|
|
15
|
+
declare const FormButton: ({ color, disabled, goTo, label, onClick, size, text, type, variant, }: FormButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default FormButton;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { CodeInputProps } from './CodeField/CodeField.types';
|
|
3
|
+
export type FormCodeInputProps = UseControllerProps & Omit<CodeInputProps, 'onComplete' | 'errorText'>;
|
|
4
|
+
export declare const FormCodeField: ({ disabled, length, name, rules, type, variant, }: FormCodeInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default FormCodeField;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContentCreatorTileProps } from '../../../../../ui/src/lib/Atoms/Buttons/Tiles/ContentCreatorTile/ContentCreatorTile.types';
|
|
2
|
+
export type FormContentCreatorTileProps = ContentCreatorTileProps & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const FormContentCreatorTile: ({ description, headline, id, isActive, isPending, sticker, }: FormContentCreatorTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default FormContentCreatorTile;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { GenderSelectorProps } from './GenderSelector/GenderSelector.types';
|
|
3
|
+
export type FormGenderSelectorProps = UseControllerProps & Partial<GenderSelectorProps>;
|
|
4
|
+
export declare const FormGenderSelector: ({ name, rules, selectedGender, }: FormGenderSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default FormGenderSelector;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StickerProps } from '../../../../../../ui/src/lib/Atoms/Badges/Sticker/Sticker.types';
|
|
2
|
+
import { NoticeInfoProps, NoticeWarningProps } from '../../../../../../ui/src/lib/Molecules/Notices/Notice/Notice.types';
|
|
3
|
+
export interface FormHeaderProps {
|
|
4
|
+
description?: string;
|
|
5
|
+
header: string;
|
|
6
|
+
notice?: NoticeWarningProps | NoticeInfoProps;
|
|
7
|
+
phoneNr?: boolean;
|
|
8
|
+
sticker?: StickerProps;
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { NameAbbreviationProps } from './NameAbbreviation/NameAbbreviation.types';
|
|
3
|
+
export type FormNameAbbreviationProps = UseControllerProps & Partial<NameAbbreviationProps> & {
|
|
4
|
+
defaultChecked?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const FormNameAbbreviation: ({ defaultChecked, label, name, rules, }: FormNameAbbreviationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default FormNameAbbreviation;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { PasswordFieldProps } from './PasswordField/PasswordField.types';
|
|
3
|
+
export type FormPasswordFieldProps = UseControllerProps & Partial<PasswordFieldProps>;
|
|
4
|
+
declare const FormPasswordField: ({ colorScheme, id, label, name, passwordHint, progressBar, rules, size, value, }: FormPasswordFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default FormPasswordField;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { default as PhoneInputProps } from './PhoneInput/PhoneInput.types';
|
|
3
|
+
export type FormPhoneInputProps = UseControllerProps & Omit<PhoneInputProps, 'onChange'>;
|
|
4
|
+
export declare const FormPhoneInput: ({ disabledSelect, inputId, name, placeholder, rules, selectId, size, styleInput, styleSelect, }: FormPhoneInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default FormPhoneInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { SelectInputProps } from './SelectInput/SelectInput.types';
|
|
3
|
+
type FormSelectInputApi = {
|
|
4
|
+
api: {
|
|
5
|
+
dataId: string;
|
|
6
|
+
endpoint: string;
|
|
7
|
+
key: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type FormSelectInputProps = UseControllerProps & Omit<SelectInputProps, 'onSelect' | 'options'> & FormSelectInputApi;
|
|
11
|
+
export declare const FormSelectInput: ({ api, className, disabled, iconButton, id, label, name, rules, sheetBreakpoint, size, style, }: FormSelectInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default FormSelectInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UseControllerProps } from 'react-hook-form';
|
|
2
2
|
import { TextInputProps } from '../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
3
3
|
export type FormTextInputProps = UseControllerProps & Partial<TextInputProps>;
|
|
4
|
-
export default function FormTextInput({ colorScheme, id, label, name, rules, size, value, ...props }: FormTextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default function FormTextInput({ colorScheme, hintText, id, label, name, rules, size, value, ...props }: FormTextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ToggleButtonGroupProps } from '../../../../../../ui/src/lib/Molecules/Selections/SelectablePillGroup/SelectablePillGroup.types';
|
|
2
|
+
export declare const GENDERS: number[];
|
|
3
|
+
export type SelectedGenderOptions = (typeof GENDER_VALUES)[keyof typeof GENDER_VALUES];
|
|
4
|
+
export type GenderSelectorProps = Omit<ToggleButtonGroupProps, 'multiselect' | 'items' | 'selectedItems'> & {
|
|
5
|
+
onChange: (value: SelectedGenderOptions) => void;
|
|
6
|
+
selectedGender: SelectedGenderOptions;
|
|
7
|
+
};
|
|
8
|
+
export declare const GENDER_LABELS: {
|
|
9
|
+
3: string;
|
|
10
|
+
0: string;
|
|
11
|
+
1: string;
|
|
12
|
+
2: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const GENDER_VALUES: {
|
|
15
|
+
3: string;
|
|
16
|
+
0: string;
|
|
17
|
+
1: string;
|
|
18
|
+
2: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SelectablePillProps } from '../../../../../../ui/src/lib/Atoms/Selectables/SelectablePill/SelectablePill.types';
|
|
2
|
+
import { SelectedGenderOptions } from './GenderSelector.types';
|
|
3
|
+
export declare const getGenders: () => SelectablePillProps[];
|
|
4
|
+
export declare const getSelectedGender: (genders: SelectablePillProps[], selectedGender: SelectedGenderOptions) => SelectablePillProps[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ToggleProps } from '../../../../../../ui/src/lib/Atoms/Inputs/Toggle/Toggle.types';
|
|
2
|
+
export interface NameAbbreviationProps extends ToggleProps {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
firstname: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
lastname: string;
|
|
7
|
+
placeholder?: {
|
|
8
|
+
firstname: string;
|
|
9
|
+
lastname: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PasswordFieldProps } from './PasswordField.types';
|
|
2
|
+
declare const PasswordField: ({ colorScheme, errorText, id, label, name, onBlur, onChange, passwordHint, progressBar, size, value, }: PasswordFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PasswordField;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TextInputProps } from '../../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
2
|
+
export type PasswordFieldProps = {
|
|
3
|
+
colorScheme?: TextInputProps['colorScheme'];
|
|
4
|
+
error?: TextInputProps['error'];
|
|
5
|
+
errorText?: TextInputProps['errorText'];
|
|
6
|
+
id?: TextInputProps['id'];
|
|
7
|
+
label?: TextInputProps['label'];
|
|
8
|
+
name: TextInputProps['name'];
|
|
9
|
+
onBlur?: TextInputProps['onBlur'];
|
|
10
|
+
onChange?: TextInputProps['onChange'];
|
|
11
|
+
passwordHint?: string;
|
|
12
|
+
progressBar?: boolean;
|
|
13
|
+
showInputHints?: TextInputProps['showInputHints'];
|
|
14
|
+
size?: TextInputProps['size'];
|
|
15
|
+
value?: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProgressBarProgress: (password: string) => number;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { default as PhoneInputProps } from './PhoneInput.types';
|
|
2
|
+
declare const PhoneInput: ({ defaultSelectValue, disabledSelect, errorText, inputId, onChange, placeholder, selectId, size, styleInput, styleSelect, value, }: PhoneInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PhoneInput;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TextInputProps } from '../../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
2
|
+
import { euCountriesOpened } from './util';
|
|
3
|
+
export type DialCode = (typeof euCountriesOpened)[number]['dial_code'];
|
|
4
|
+
export default interface PhoneInputProps {
|
|
5
|
+
defaultSelectValue?: DialCode;
|
|
6
|
+
disabledSelect?: TextInputProps['disabled'];
|
|
7
|
+
errorText?: TextInputProps['errorText'];
|
|
8
|
+
inputId?: string;
|
|
9
|
+
onChange: (selectValue: string, inputValue: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
selectId?: string;
|
|
12
|
+
size?: TextInputProps['size'];
|
|
13
|
+
styleInput?: TextInputProps['colorScheme'];
|
|
14
|
+
styleSelect?: TextInputProps['colorScheme'];
|
|
15
|
+
value?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { CountryCode } from '../../../../../../ui/src/lib/Base/FlagIcon/FlagIcon.types';
|
|
2
|
+
import { Option } from '../SelectInput/SelectInput.types';
|
|
3
|
+
export declare const euCountries: readonly [{
|
|
4
|
+
readonly code: "AT";
|
|
5
|
+
readonly dial_code: "+43";
|
|
6
|
+
readonly local_name: "Österreich";
|
|
7
|
+
readonly name: "Austria";
|
|
8
|
+
}, {
|
|
9
|
+
readonly code: "BE";
|
|
10
|
+
readonly dial_code: "+32";
|
|
11
|
+
readonly local_name: "België";
|
|
12
|
+
readonly name: "Belgium";
|
|
13
|
+
}, {
|
|
14
|
+
readonly code: "BG";
|
|
15
|
+
readonly dial_code: "+359";
|
|
16
|
+
readonly local_name: "България";
|
|
17
|
+
readonly name: "Bulgaria";
|
|
18
|
+
}, {
|
|
19
|
+
readonly code: "HR";
|
|
20
|
+
readonly dial_code: "+385";
|
|
21
|
+
readonly local_name: "Hrvatska";
|
|
22
|
+
readonly name: "Croatia";
|
|
23
|
+
}, {
|
|
24
|
+
readonly code: "CY";
|
|
25
|
+
readonly dial_code: "+357";
|
|
26
|
+
readonly local_name: "Κύπρος";
|
|
27
|
+
readonly name: "Cyprus";
|
|
28
|
+
}, {
|
|
29
|
+
readonly code: "CZ";
|
|
30
|
+
readonly dial_code: "+420";
|
|
31
|
+
readonly local_name: "Česko";
|
|
32
|
+
readonly name: "Czechia";
|
|
33
|
+
}, {
|
|
34
|
+
readonly code: "DK";
|
|
35
|
+
readonly dial_code: "+45";
|
|
36
|
+
readonly local_name: "Danmark";
|
|
37
|
+
readonly name: "Denmark";
|
|
38
|
+
}, {
|
|
39
|
+
readonly code: "EE";
|
|
40
|
+
readonly dial_code: "+372";
|
|
41
|
+
readonly local_name: "Eesti";
|
|
42
|
+
readonly name: "Estonia";
|
|
43
|
+
}, {
|
|
44
|
+
readonly code: "FI";
|
|
45
|
+
readonly dial_code: "+358";
|
|
46
|
+
readonly local_name: "Suomi";
|
|
47
|
+
readonly name: "Finland";
|
|
48
|
+
}, {
|
|
49
|
+
readonly code: "FR";
|
|
50
|
+
readonly dial_code: "+33";
|
|
51
|
+
readonly local_name: "France";
|
|
52
|
+
readonly name: "France";
|
|
53
|
+
}, {
|
|
54
|
+
readonly code: "DE";
|
|
55
|
+
readonly dial_code: "+49";
|
|
56
|
+
readonly local_name: "Deutschland";
|
|
57
|
+
readonly name: "Germany";
|
|
58
|
+
}, {
|
|
59
|
+
readonly code: "GR";
|
|
60
|
+
readonly dial_code: "+30";
|
|
61
|
+
readonly local_name: "Ελλάς";
|
|
62
|
+
readonly name: "Greece";
|
|
63
|
+
}, {
|
|
64
|
+
readonly code: "HU";
|
|
65
|
+
readonly dial_code: "+36";
|
|
66
|
+
readonly local_name: "Magyarország";
|
|
67
|
+
readonly name: "Hungary";
|
|
68
|
+
}, {
|
|
69
|
+
readonly code: "IE";
|
|
70
|
+
readonly dial_code: "+353";
|
|
71
|
+
readonly local_name: "Éire";
|
|
72
|
+
readonly name: "Ireland";
|
|
73
|
+
}, {
|
|
74
|
+
readonly code: "IT";
|
|
75
|
+
readonly dial_code: "+39";
|
|
76
|
+
readonly local_name: "Italia";
|
|
77
|
+
readonly name: "Italy";
|
|
78
|
+
}, {
|
|
79
|
+
readonly code: "LV";
|
|
80
|
+
readonly dial_code: "+371";
|
|
81
|
+
readonly local_name: "Latvija";
|
|
82
|
+
readonly name: "Latvia";
|
|
83
|
+
}, {
|
|
84
|
+
readonly code: "LT";
|
|
85
|
+
readonly dial_code: "+370";
|
|
86
|
+
readonly local_name: "Lietuva";
|
|
87
|
+
readonly name: "Lithuania";
|
|
88
|
+
}, {
|
|
89
|
+
readonly code: "LU";
|
|
90
|
+
readonly dial_code: "+352";
|
|
91
|
+
readonly local_name: "Luxembourg";
|
|
92
|
+
readonly name: "Luxembourg";
|
|
93
|
+
}, {
|
|
94
|
+
readonly code: "MT";
|
|
95
|
+
readonly dial_code: "+356";
|
|
96
|
+
readonly local_name: "Malta";
|
|
97
|
+
readonly name: "Malta";
|
|
98
|
+
}, {
|
|
99
|
+
readonly code: "NL";
|
|
100
|
+
readonly dial_code: "+31";
|
|
101
|
+
readonly local_name: "Nederland";
|
|
102
|
+
readonly name: "Netherlands";
|
|
103
|
+
}, {
|
|
104
|
+
readonly code: "PL";
|
|
105
|
+
readonly dial_code: "+48";
|
|
106
|
+
readonly local_name: "Polska";
|
|
107
|
+
readonly name: "Poland";
|
|
108
|
+
}, {
|
|
109
|
+
readonly code: "PT";
|
|
110
|
+
readonly dial_code: "+351";
|
|
111
|
+
readonly local_name: "Portugal";
|
|
112
|
+
readonly name: "Portugal";
|
|
113
|
+
}, {
|
|
114
|
+
readonly code: "RO";
|
|
115
|
+
readonly dial_code: "+40";
|
|
116
|
+
readonly local_name: "România";
|
|
117
|
+
readonly name: "Romania";
|
|
118
|
+
}, {
|
|
119
|
+
readonly code: "SK";
|
|
120
|
+
readonly dial_code: "+421";
|
|
121
|
+
readonly local_name: "Slovensko";
|
|
122
|
+
readonly name: "Slovakia";
|
|
123
|
+
}, {
|
|
124
|
+
readonly code: "SI";
|
|
125
|
+
readonly dial_code: "+386";
|
|
126
|
+
readonly local_name: "Slovenija";
|
|
127
|
+
readonly name: "Slovenia";
|
|
128
|
+
}, {
|
|
129
|
+
readonly code: "ES";
|
|
130
|
+
readonly dial_code: "+34";
|
|
131
|
+
readonly local_name: "España";
|
|
132
|
+
readonly name: "Spain";
|
|
133
|
+
}, {
|
|
134
|
+
readonly code: "SE";
|
|
135
|
+
readonly dial_code: "+46";
|
|
136
|
+
readonly local_name: "Sverige";
|
|
137
|
+
readonly name: "Sweden";
|
|
138
|
+
}];
|
|
139
|
+
export declare const euCountriesOpened: readonly [{
|
|
140
|
+
readonly code: "FR";
|
|
141
|
+
readonly dial_code: "+33";
|
|
142
|
+
}, {
|
|
143
|
+
readonly code: "DE";
|
|
144
|
+
readonly dial_code: "+49";
|
|
145
|
+
}, {
|
|
146
|
+
readonly code: "IT";
|
|
147
|
+
readonly dial_code: "+39";
|
|
148
|
+
}, {
|
|
149
|
+
readonly code: "ES";
|
|
150
|
+
readonly dial_code: "+34";
|
|
151
|
+
}];
|
|
152
|
+
export declare const isCountryCode: (code: string) => code is CountryCode;
|
|
153
|
+
export declare const getFormattedOptions: () => Option[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectInputProps } from './SelectInput.types';
|
|
2
|
+
declare const SelectInput: ({ className, defaultValue, disabled, errorText, iconButton, id, label, name, onSelect, options, readonly, sheetBreakpoint, size, style, }: SelectInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default SelectInput;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TextInputProps } from '../../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
3
|
+
import { CountryCode } from '../../../../../../ui/src/lib/Base/FlagIcon/FlagIcon.types';
|
|
4
|
+
import { SheetBreakpoint } from '../../../../../../ui/src/lib/Organisms/Modals/Sheet/Sheet.types';
|
|
5
|
+
export type Option = {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
code?: CountryCode;
|
|
8
|
+
label: string | undefined;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
export declare enum OpenState {
|
|
12
|
+
DROPDOWN = "dropdown",
|
|
13
|
+
NONE = "none",
|
|
14
|
+
SHEET = "sheet"
|
|
15
|
+
}
|
|
16
|
+
export interface SelectInputProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
errorText?: string;
|
|
21
|
+
iconButton?: TextInputProps['iconButton'];
|
|
22
|
+
id: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
onSelect: (option: string | null) => void;
|
|
26
|
+
options: Option[];
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
sheetBreakpoint?: SheetBreakpoint;
|
|
29
|
+
size?: TextInputProps['size'];
|
|
30
|
+
style?: TextInputProps['colorScheme'];
|
|
31
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TextInputProps } from '../../../../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
2
|
+
export interface InputProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
textInputProps: Pick<TextInputProps, 'size' | 'colorScheme' | 'iconButton' | 'errorText' | 'placeholder' | 'readonly' | 'label' | 'disabled' | 'flagIcon' | 'wrapperClassName' | 'onBlur' | 'onChange' | 'onKeyDown' | 'onClick' | 'name' | 'id' | 'value'>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OptionsListProps } from './OptionsList.types';
|
|
2
|
+
declare const OptionsList: ({ handleOptionKeyDown, handleOptionMouseDown, handleOptionMouseEnter, highlightedIndex, id, inputValue, isReadonly, options, }: OptionsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default OptionsList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Option } from '../../SelectInput.types';
|
|
2
|
+
export interface OptionsListProps {
|
|
3
|
+
handleOptionKeyDown: (e: React.KeyboardEvent<HTMLLIElement>, option: string) => void;
|
|
4
|
+
handleOptionMouseDown: (e: React.MouseEvent<HTMLLIElement>, option: string) => void;
|
|
5
|
+
handleOptionMouseEnter: (index: number) => void;
|
|
6
|
+
highlightedIndex: number;
|
|
7
|
+
id: string;
|
|
8
|
+
inputValue: string;
|
|
9
|
+
isReadonly?: boolean;
|
|
10
|
+
options: Option[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Option } from './SelectInput.types';
|
|
2
|
+
export declare const getFilteredOptions: (options: Option[], inputValue: string, readonly?: boolean) => Option[];
|
|
3
|
+
export declare const getFormattedOptions: (options: string[]) => Option[];
|
|
4
|
+
export declare const getSelectedOption: (options: Option[], inputValue: string) => Option;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as FormCheckboxInput } from './FormCheckboxInput';
|
|
2
|
+
import { default as FormContentCreatorTile } from './FormContentCreatorTile';
|
|
2
3
|
import { default as FormInputFieldSpecial } from './FormInputFieldSpecial';
|
|
4
|
+
import { default as FormPhoneInput } from './FormPhoneInput';
|
|
3
5
|
import { default as FormRadioButton } from './FormRadioButton';
|
|
4
6
|
import { default as FormRadioButtonCluster } from './FormRadioButtonCluster';
|
|
5
7
|
import { default as FormTextAreaInput } from './FormTextAreaInput';
|
|
6
8
|
import { default as FormTextInput } from './FormTextInput';
|
|
7
9
|
import { default as FormToggleInput } from './FormToggleInput';
|
|
8
|
-
export { FormCheckboxInput, FormRadioButton, FormRadioButtonCluster, FormTextInput,
|
|
10
|
+
export { FormCheckboxInput, FormInputFieldSpecial, FormPhoneInput, FormRadioButton, FormRadioButtonCluster, FormTextAreaInput, FormTextInput, FormContentCreatorTile, FormToggleInput, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parsePhoneNumber(phoneNumber: string, part?: 'code' | 'number' | 'full'): string;
|
package/lib/Forms/Form/Form.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
2
|
import { FormProps } from './Form.types';
|
|
3
|
-
export default function Form<FormData extends FieldValues>({ children, className, initialValues, onSubmit, validationSchema, }: FormProps<FormData>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default function Form<FormData extends FieldValues>({ children, className, id, formKey, initialValues, onSubmit, formError, validationSchema, validationMode, }: FormProps<FormData>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DefaultValues, FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { DefaultValues, FieldValues, Mode, UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import { ZodType } from 'zod';
|
|
4
|
-
|
|
4
|
+
import { TGridSpacing } from '../../Grids/Grid/Grid.types';
|
|
5
|
+
export type OnSubmitFunction<FormData extends FieldValues> = (arg: OnFormSubmitType<FormData>) => Promise<boolean | undefined | string>;
|
|
5
6
|
export type OnFormSubmitType<FormData extends FieldValues> = {
|
|
6
7
|
data: FormData;
|
|
7
8
|
methods?: UseFormReturn<FormData>;
|
|
@@ -9,7 +10,15 @@ export type OnFormSubmitType<FormData extends FieldValues> = {
|
|
|
9
10
|
export type FormProps<FormData extends FieldValues> = {
|
|
10
11
|
children: ReactNode | ReactNode[];
|
|
11
12
|
className?: string;
|
|
13
|
+
formError?: string | null;
|
|
14
|
+
formKey?: string;
|
|
15
|
+
id: string;
|
|
12
16
|
initialValues?: DefaultValues<FormData>;
|
|
13
|
-
onSubmit
|
|
17
|
+
onSubmit?: OnSubmitFunction<FormData>;
|
|
18
|
+
spacing?: TGridSpacing;
|
|
19
|
+
validationMode?: Mode;
|
|
14
20
|
validationSchema?: ZodType<FormData>;
|
|
15
21
|
};
|
|
22
|
+
export interface Data {
|
|
23
|
+
[key: string]: FieldValues;
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PrimitiveAtom } from 'jotai';
|
|
2
|
+
import { SyncStorage } from 'jotai/vanilla/utils/atomWithStorage';
|
|
3
|
+
import { Data } from './Form/Form.types';
|
|
4
|
+
export declare const sessionStorageSync: <T>() => SyncStorage<T>;
|
|
5
|
+
export declare const formAtomStorage: <T>(key: string, defaultValue: T, storage: boolean, sessionStorage?: boolean) => PrimitiveAtom<T>;
|
|
6
|
+
export declare const getFormAtom: <T>(formKey: string, storage: boolean | undefined, defaultValue: T, sessionStorage?: boolean) => PrimitiveAtom<T>;
|
|
7
|
+
export declare const getFormAtomData: (key: string, storedData: Data) => Record<string, unknown> | string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
2
|
import { FormProps } from '../Form/Form.types';
|
|
3
|
-
export declare function GridForm<FormData extends FieldValues>({ children, ...props }: FormProps<FormData>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function GridForm<FormData extends FieldValues>({ children, spacing, ...props }: FormProps<FormData>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default GridForm;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { WizardProps } from './Wizard.types';
|
|
3
|
-
export default function Wizard({ steps }: PropsWithChildren<WizardProps>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default function Wizard({ excludedSteps, formError, formFieldMap, formWrapper, id, initialStep, onStepChange, steps, }: PropsWithChildren<WizardProps>): import("react/jsx-runtime").JSX.Element | null;
|