@goodhood-web/nebenan-base 3.0.0-development.63 → 3.0.0-development.65
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 +4 -1
- package/index.js +83 -83
- package/index.mjs +11302 -9947
- package/lib/Forms/DynamicForm/DynamicForm.d.ts +4 -0
- package/lib/Forms/DynamicForm/DynamicForm.types.d.ts +6 -0
- package/lib/Forms/Fields/FormSubmitButton.d.ts +2 -0
- package/lib/Forms/Fields/FormTextInput.d.ts +4 -0
- package/lib/Forms/Fields/index.d.ts +3 -0
- package/lib/Forms/Form/Form.d.ts +3 -0
- package/lib/Forms/Form/Form.types.d.ts +6 -0
- package/lib/Forms/GridForm/GridForm.d.ts +3 -0
- package/lib/Forms/GridForm/GridForm.types.d.ts +3 -0
- package/lib/Forms/Wizard/Wizard.d.ts +3 -0
- package/lib/Forms/Wizard/Wizard.types.d.ts +35 -0
- package/lib/Forms/Wizard/WizardContext.d.ts +8 -0
- package/lib/Forms/Wizard/index.d.ts +3 -0
- package/lib/Forms/Wizard/useWizard.d.ts +5 -0
- package/lib/Forms/index.d.ts +5 -0
- package/lib/Grids/Grid/Grid.d.ts +3 -0
- package/lib/Grids/Grid/Grid.types.d.ts +10 -0
- package/lib/Grids/Grid/GridItem/GridItem.d.ts +3 -0
- package/lib/Grids/Grid/GridItem/GridItem.types.d.ts +6 -0
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { TextInputProps } from '../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
3
|
+
export type FormTextInputProps = UseControllerProps & Partial<TextInputProps>;
|
|
4
|
+
export default function FormTextInput({ colorScheme, name, rules, size, }: FormTextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { GridItemProps } from '../../Grids/Grid/GridItem/GridItem.types';
|
|
3
|
+
import { FormTextInputProps } from '../Fields/FormTextInput';
|
|
4
|
+
export type StepField = {
|
|
5
|
+
id: string;
|
|
6
|
+
layout?: {
|
|
7
|
+
desktop?: GridItemProps['desktop'];
|
|
8
|
+
mobile?: GridItemProps['mobile'];
|
|
9
|
+
};
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
export type TextField = StepField & FormTextInputProps & {
|
|
13
|
+
type: 'text';
|
|
14
|
+
};
|
|
15
|
+
export type SubmitField = StepField & {
|
|
16
|
+
type: 'submit';
|
|
17
|
+
};
|
|
18
|
+
export type SlotField = StepField & {
|
|
19
|
+
render: ({ key }: {
|
|
20
|
+
key: string;
|
|
21
|
+
}) => ReactNode;
|
|
22
|
+
type: 'slot';
|
|
23
|
+
};
|
|
24
|
+
export type NextField = StepField & {
|
|
25
|
+
type: 'next';
|
|
26
|
+
};
|
|
27
|
+
export type FormField = SubmitField | SlotField | TextField | NextField;
|
|
28
|
+
export type WizardStepT = {
|
|
29
|
+
fields: FormField[];
|
|
30
|
+
id: string;
|
|
31
|
+
onSubmit?: (data: object) => void;
|
|
32
|
+
};
|
|
33
|
+
export type WizardProps = {
|
|
34
|
+
steps: WizardStepT[];
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type TWizardContext = {
|
|
2
|
+
next: () => void;
|
|
3
|
+
onSumbitStep: (data: object) => void;
|
|
4
|
+
previous: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const WizardContext: import('react').Context<TWizardContext>;
|
|
7
|
+
export declare const WizardProvider: import('react').Provider<TWizardContext>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const gridSpacing: string[];
|
|
3
|
+
export type TGridSpacing = (typeof gridSpacing)[number];
|
|
4
|
+
export type GridProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
spacing?: TGridSpacing | {
|
|
7
|
+
x: TGridSpacing;
|
|
8
|
+
y: TGridSpacing;
|
|
9
|
+
};
|
|
10
|
+
};
|