react-luna-form 0.0.33 → 0.0.35
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/dist/client/cjs/index.js +1 -1
- package/dist/client/esm/index.js +1 -1
- package/dist/config/cjs/index.js +1 -1
- package/dist/config/esm/index.js +1 -1
- package/dist/server/cjs/index.js +1 -1
- package/dist/server/esm/index.js +1 -1
- package/dist/types/luna-core/src/helper/input.d.ts +1 -1
- package/dist/types/luna-core/src/type.d.ts +19 -0
- package/dist/types/luna-core/src/util/constant.d.ts +3 -0
- package/dist/types/luna-core/src/util/date.d.ts +10 -0
- package/dist/types/luna-core/src/util/is-input.d.ts +3 -1
- package/package.json +2 -2
- package/dist/types/client/component/field/field-list.d.ts +0 -2
- package/dist/types/client/component/field/field-with-state.d.ts +0 -13
- package/dist/types/client/component/field/field.d.ts +0 -7
- package/dist/types/client/component/form-content.d.ts +0 -20
- package/dist/types/client/component/form.d.ts +0 -20
- package/dist/types/client/component/guard/list-guard.d.ts +0 -2
- package/dist/types/client/component/guard/visibility-guard.d.ts +0 -6
- package/dist/types/client/component/input.d.ts +0 -16
- package/dist/types/client/component/slot/slot.d.ts +0 -7
- package/dist/types/client/hook/use-data-source.d.ts +0 -3
- package/dist/types/client/hook/use-fetch.d.ts +0 -3
- package/dist/types/client/hook/use-field-list.d.ts +0 -2
- package/dist/types/client/hook/use-form-action.d.ts +0 -13
- package/dist/types/client/hook/use-input.d.ts +0 -2
- package/dist/types/client/hook/use-schema.d.ts +0 -2
- package/dist/types/client/hook/use-store.d.ts +0 -1
- package/dist/types/client/hook/use-timeout.d.ts +0 -1
- package/dist/types/client/hook/use-value.d.ts +0 -6
- package/dist/types/client/index.d.ts +0 -3
- package/dist/types/client/lib/error-store.d.ts +0 -7
- package/dist/types/client/lib/source-store.d.ts +0 -5
- package/dist/types/client/lib/state-store.d.ts +0 -5
- package/dist/types/client/lib/store-helper.d.ts +0 -26
- package/dist/types/client/lib/value-store.d.ts +0 -10
- package/dist/types/component/chevron-icon.d.ts +0 -3
- package/dist/types/component/column.d.ts +0 -5
- package/dist/types/component/control.d.ts +0 -5
- package/dist/types/component/description.d.ts +0 -3
- package/dist/types/component/field/field-base.d.ts +0 -12
- package/dist/types/component/field/field-error.d.ts +0 -5
- package/dist/types/component/field/field-group.d.ts +0 -8
- package/dist/types/component/field/field-horizontal.d.ts +0 -2
- package/dist/types/component/field/field-list-item.d.ts +0 -8
- package/dist/types/component/field/field-list.d.ts +0 -7
- package/dist/types/component/field/field-set-advanced.d.ts +0 -5
- package/dist/types/component/field/field-set-base.d.ts +0 -7
- package/dist/types/component/field/field-set.d.ts +0 -6
- package/dist/types/component/field/field-vertical.d.ts +0 -2
- package/dist/types/component/field/field.d.ts +0 -10
- package/dist/types/component/form.d.ts +0 -13
- package/dist/types/component/formatted-description.d.ts +0 -7
- package/dist/types/component/group.d.ts +0 -4
- package/dist/types/component/input/input-base.d.ts +0 -9
- package/dist/types/component/input-group.d.ts +0 -10
- package/dist/types/component/input-label.d.ts +0 -9
- package/dist/types/component/label.d.ts +0 -7
- package/dist/types/component/legend.d.ts +0 -4
- package/dist/types/component/list.d.ts +0 -5
- package/dist/types/component/separator.d.ts +0 -1
- package/dist/types/component/slot/list-slot.d.ts +0 -2
- package/dist/types/component/slot/slot-base.d.ts +0 -16
- package/dist/types/component/slot/slot-create.d.ts +0 -10
- package/dist/types/component/slot/slot-list.d.ts +0 -12
- package/dist/types/component/slot/slot.d.ts +0 -7
- package/dist/types/config/index.d.ts +0 -31
- package/dist/types/lib/render-If-exists.d.ts +0 -1
- package/dist/types/lib/string.d.ts +0 -1
- package/dist/types/server/component/fallback.d.ts +0 -7
- package/dist/types/server/component/form.d.ts +0 -13
- package/dist/types/server/component/input.d.ts +0 -13
- package/dist/types/server/index.d.ts +0 -4
- package/dist/types/type.d.ts +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-luna-form",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "A React library for building forms based on JSON",
|
|
5
5
|
"main": "./dist/client/cjs/index.js",
|
|
6
6
|
"module": "./dist/client/esm/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"eslint-plugin-react": "7.37.5",
|
|
34
34
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
35
35
|
"eslint-plugin-react-refresh": "0.5.2",
|
|
36
|
-
"@luna-form/core": "0.0.
|
|
36
|
+
"@luna-form/core": "0.0.35"
|
|
37
37
|
},
|
|
38
38
|
"license": "Apache-2.0",
|
|
39
39
|
"repository": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function withError<P extends {
|
|
2
|
-
errors?: Record<string, string[]>;
|
|
3
|
-
field: {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
}>(Component: React.ComponentType<P>): (props: Readonly<P>) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export declare function withState<P extends {
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
field: {
|
|
10
|
-
name: string;
|
|
11
|
-
hidden?: boolean;
|
|
12
|
-
};
|
|
13
|
-
}>(Component: React.ComponentType<P>): (props: Readonly<P>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const Field: (props: Readonly<Readonly<Readonly<{
|
|
2
|
-
children: import("../../../type").Children;
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
errors?: Record<string, string[]>;
|
|
5
|
-
field: import("@luna-form/core").Field;
|
|
6
|
-
style?: import("@luna-form/core").Style;
|
|
7
|
-
}>>>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type FormState } from '../hook/use-form-action';
|
|
2
|
-
import type { Config, Control } from '../../type';
|
|
3
|
-
import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
|
|
4
|
-
export declare function FormContent<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
|
|
5
|
-
action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
|
|
6
|
-
children?: Control;
|
|
7
|
-
config: Config;
|
|
8
|
-
context?: Record<string, unknown>;
|
|
9
|
-
definition?: Definition;
|
|
10
|
-
lang?: string;
|
|
11
|
-
onSuccess?: (data: T) => void;
|
|
12
|
-
onValueChange?: (input: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: unknown;
|
|
15
|
-
}) => void;
|
|
16
|
-
readOnly?: boolean;
|
|
17
|
-
sections: Sections;
|
|
18
|
-
translations?: Record<string, Record<string, string>>;
|
|
19
|
-
value?: Nullable<T>;
|
|
20
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Config, Control } from '../../type';
|
|
2
|
-
import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
|
|
3
|
-
import type { FormState } from '../hook/use-form-action';
|
|
4
|
-
export declare function Form<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
|
|
5
|
-
action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
|
|
6
|
-
children?: Control;
|
|
7
|
-
config: Config;
|
|
8
|
-
context?: Record<string, unknown>;
|
|
9
|
-
definition?: Definition;
|
|
10
|
-
lang?: string;
|
|
11
|
-
onSuccess?: (data: T) => void;
|
|
12
|
-
onValueChange?: (input: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: unknown;
|
|
15
|
-
}) => void;
|
|
16
|
-
readOnly?: boolean;
|
|
17
|
-
sections: Sections;
|
|
18
|
-
translations?: Record<string, Record<string, string>>;
|
|
19
|
-
value?: Nullable<T>;
|
|
20
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type AriaAttributes, type CommonProps, type DataAttributes, type Field, type Nullable, type Schema } from '@luna-form/core';
|
|
2
|
-
import type { Config, InputChange } from '../../type';
|
|
3
|
-
export declare function Input(props: Readonly<{
|
|
4
|
-
ariaAttributes?: AriaAttributes;
|
|
5
|
-
commonProps: CommonProps;
|
|
6
|
-
config: Config;
|
|
7
|
-
context?: Record<string, unknown>;
|
|
8
|
-
dataAttributes?: DataAttributes;
|
|
9
|
-
field: Field;
|
|
10
|
-
horizontal?: boolean;
|
|
11
|
-
onMount: (name: string, schema: Schema, field: Field) => void;
|
|
12
|
-
onUnmount: (name: string) => void;
|
|
13
|
-
onValueChange?: (input: InputChange) => void;
|
|
14
|
-
translations?: Record<string, string>;
|
|
15
|
-
value?: Nullable<Record<string, unknown>>;
|
|
16
|
-
}>): import("react").ReactNode;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const Slot: (props: Readonly<{
|
|
2
|
-
children: import("../../../type").Children;
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
fields?: import("@luna-form/core").Fields;
|
|
5
|
-
style?: import("@luna-form/core").Style;
|
|
6
|
-
value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
|
|
7
|
-
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Field, type Nullable } from '@luna-form/core';
|
|
2
|
-
import type { Config } from '../../type';
|
|
3
|
-
export declare function useDataSource(field: Field, config: Config, value?: Nullable<Record<string, unknown>>): readonly [Nullable<unknown[]>, (target: string, value: import("@luna-form/core").DataSource | undefined) => void];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Field, type FormStateError, type Nullable, type Schemas, type ZodSchema } from '@luna-form/core';
|
|
2
|
-
export type FormState<T> = {
|
|
3
|
-
data: Nullable<T>;
|
|
4
|
-
error: Nullable<FormStateError>;
|
|
5
|
-
success: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type FormActionOptions<T> = {
|
|
8
|
-
onSuccess?: (data: T) => void;
|
|
9
|
-
preserveValues?: boolean;
|
|
10
|
-
translations?: Record<string, string>;
|
|
11
|
-
validation?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare function useFormState<T, F = Record<string, unknown>>(getSchema: () => readonly [Schemas, Field[]], action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>, options?: FormActionOptions<T>): readonly [(payload: FormData) => void, FormState<T>, boolean];
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { Field, Schema } from '@luna-form/core';
|
|
2
|
-
export declare function useInput(field: Field, onMount: (name: string, schema: Schema, field: Field) => void, onUnmount: (name: string) => void, translations?: Record<string, string>): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useStore(): (names: string | string[]) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useTimeout(): (callback: () => void, delay: number) => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type Field, type Nullable } from '@luna-form/core';
|
|
2
|
-
export declare function useValue(field: Field, currentValue?: Nullable<Record<string, unknown>>): {
|
|
3
|
-
readonly setValue: (newValue: unknown) => void;
|
|
4
|
-
readonly shouldSkipOnChange: () => boolean;
|
|
5
|
-
readonly value: {} | undefined;
|
|
6
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const clearInputErrorAtom: import("jotai").WritableAtom<null, [names: string[]], void> & {
|
|
2
|
-
init: null;
|
|
3
|
-
};
|
|
4
|
-
export declare const reportErrorAtom: import("jotai").WritableAtom<null, [newValue: Record<string, string[]>], void> & {
|
|
5
|
-
init: null;
|
|
6
|
-
};
|
|
7
|
-
export declare const reportInputErrorAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<string[] | undefined, [newValue: string[] | undefined], void>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DataSource } from '@luna-form/core';
|
|
2
|
-
export declare const reportSourceAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<DataSource | undefined, [target: string, value: DataSource | undefined], void>>;
|
|
3
|
-
export declare const clearInputSourceAtom: import("jotai").WritableAtom<null, [contributorNames: string[]], void> & {
|
|
4
|
-
init: null;
|
|
5
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FieldState } from '@luna-form/core';
|
|
2
|
-
export declare const fieldStateAtom: import("jotai").PrimitiveAtom<Record<string, FieldState>> & {
|
|
3
|
-
init: Record<string, FieldState>;
|
|
4
|
-
};
|
|
5
|
-
export declare const reportFieldStateAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<FieldState | undefined, [newValue: FieldState | undefined], void>>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type PrimitiveAtom } from 'jotai';
|
|
2
|
-
interface NestedAtomFamilyOptions<TInner> {
|
|
3
|
-
merge?: (values: TInner[]) => TInner | undefined;
|
|
4
|
-
validateTarget?: (target: string) => boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function omitKey<T extends Record<string, unknown>>(obj: T, key: string): T;
|
|
7
|
-
export declare function createNestedRecordAtomFamily<TInner, TRecord extends Record<string, Record<string, TInner>> = Record<string, Record<string, TInner>>>(baseAtom: PrimitiveAtom<TRecord>, options?: NestedAtomFamilyOptions<TInner>): import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<TInner | undefined, [target: string, value: TInner | undefined], void>>;
|
|
8
|
-
export declare function createNestedClearAtom<TInner>(baseAtom: PrimitiveAtom<Record<string, Record<string, TInner>>>): import("jotai").WritableAtom<null, [contributorNames: string[]], void> & {
|
|
9
|
-
init: null;
|
|
10
|
-
};
|
|
11
|
-
export declare function createAtomStore<T>(initialValue?: Record<string, T>): {
|
|
12
|
-
atom: PrimitiveAtom<Record<string, T>> & {
|
|
13
|
-
init: Record<string, T>;
|
|
14
|
-
};
|
|
15
|
-
clearAll: import("jotai").WritableAtom<null, [], void> & {
|
|
16
|
-
init: null;
|
|
17
|
-
};
|
|
18
|
-
clear: import("jotai").WritableAtom<null, [names: string[]], void> & {
|
|
19
|
-
init: null;
|
|
20
|
-
};
|
|
21
|
-
bulkReport: import("jotai").WritableAtom<null, [newValue: Record<string, T>], void> & {
|
|
22
|
-
init: null;
|
|
23
|
-
};
|
|
24
|
-
report: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<NonNullable<T> | undefined, [newValue: T | undefined], void>>;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const valueAtom: import("jotai").PrimitiveAtom<Record<string, unknown>> & {
|
|
2
|
-
init: Record<string, unknown>;
|
|
3
|
-
};
|
|
4
|
-
export declare const clearAllValueAtom: import("jotai").WritableAtom<null, [], void> & {
|
|
5
|
-
init: null;
|
|
6
|
-
};
|
|
7
|
-
export declare const clearInputValueAtom: import("jotai").WritableAtom<null, [names: string[]], void> & {
|
|
8
|
-
init: null;
|
|
9
|
-
};
|
|
10
|
-
export declare const reportValueAtom: import("jotai-family").AtomFamily<string, import("jotai").WritableAtom<{} | undefined, [newValue: unknown], void>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type FieldLayoutProps = {
|
|
2
|
-
children: React.ReactNode;
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
errors?: string[];
|
|
5
|
-
isCheckbox?: boolean;
|
|
6
|
-
isReversed?: boolean;
|
|
7
|
-
isClickable?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function FieldBase(props: Readonly<FieldLayoutProps & {
|
|
10
|
-
className?: string;
|
|
11
|
-
orientation: 'horizontal' | 'vertical';
|
|
12
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type List, type Nullable } from '@luna-form/core';
|
|
2
|
-
export type ListProps = Readonly<{
|
|
3
|
-
children: (index: number) => React.ReactNode;
|
|
4
|
-
field: List;
|
|
5
|
-
value?: Nullable<Record<string, unknown>>;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function FieldList(props: ListProps): import("react/jsx-runtime").JSX.Element[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Field, type Style } from '@luna-form/core';
|
|
2
|
-
import type { Children } from '../../type';
|
|
3
|
-
export type FieldProps = Readonly<{
|
|
4
|
-
children: Children;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
errors?: Record<string, string[]>;
|
|
7
|
-
field: Field;
|
|
8
|
-
style?: Style;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function Field(props: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Definition, type Sections } from '@luna-form/core';
|
|
2
|
-
import type { Config, Control, Slot } from '../type';
|
|
3
|
-
export declare function Form(props: Readonly<{
|
|
4
|
-
action?: (formData: FormData) => void;
|
|
5
|
-
children: Slot;
|
|
6
|
-
config: Config;
|
|
7
|
-
control?: Control;
|
|
8
|
-
definition?: Definition;
|
|
9
|
-
isPending?: boolean;
|
|
10
|
-
noValidate?: boolean;
|
|
11
|
-
readOnly?: boolean;
|
|
12
|
-
sections: Sections;
|
|
13
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Config } from '../type';
|
|
2
|
-
export declare function FormattedDescription(props: Readonly<{
|
|
3
|
-
config?: Config;
|
|
4
|
-
context?: Record<string, unknown>;
|
|
5
|
-
text?: string;
|
|
6
|
-
translations?: Record<string, string>;
|
|
7
|
-
}>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Field } from '@luna-form/core';
|
|
2
|
-
import type { Children } from '../../type';
|
|
3
|
-
export declare function InputBase(props: Readonly<{
|
|
4
|
-
children: Children;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
errors?: string[];
|
|
7
|
-
field: Field;
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
}>): import("react").ReactNode;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Config } from '../type';
|
|
2
|
-
import type { Field } from '@luna-form/core';
|
|
3
|
-
export declare function InputGroup(props: Readonly<{
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
config?: Config;
|
|
6
|
-
context?: Record<string, unknown>;
|
|
7
|
-
field: Field;
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
translations?: Record<string, string>;
|
|
10
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Field } from '@luna-form/core';
|
|
2
|
-
import type { Config } from '../type';
|
|
3
|
-
export declare function InputLabel(props: Readonly<{
|
|
4
|
-
config?: Config;
|
|
5
|
-
context?: Record<string, unknown>;
|
|
6
|
-
field: Field;
|
|
7
|
-
horizontal?: boolean;
|
|
8
|
-
translations?: Record<string, string>;
|
|
9
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Separator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Fields, type Nullable, type Style } from '@luna-form/core';
|
|
2
|
-
import type { Children } from '../../type';
|
|
3
|
-
import type { FieldProps } from '../field/field';
|
|
4
|
-
import type { ListProps } from '../field/field-list';
|
|
5
|
-
export type SlotComponents = {
|
|
6
|
-
field: React.ComponentType<FieldProps>;
|
|
7
|
-
list: React.ComponentType<ListProps>;
|
|
8
|
-
};
|
|
9
|
-
export declare function SlotBase(props: Readonly<{
|
|
10
|
-
children: Children;
|
|
11
|
-
components: SlotComponents;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
fields?: Fields;
|
|
14
|
-
style?: Style;
|
|
15
|
-
value?: Nullable<Record<string, unknown>>;
|
|
16
|
-
}>): import("react/jsx-runtime").JSX.Element[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Children } from '../../type';
|
|
2
|
-
import type { Fields, Nullable, Style } from '@luna-form/core';
|
|
3
|
-
import type { SlotComponents } from './slot-base';
|
|
4
|
-
export declare function createSlot(components: SlotComponents): (props: Readonly<{
|
|
5
|
-
children: Children;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
fields?: Fields;
|
|
8
|
-
style?: Style;
|
|
9
|
-
value?: Nullable<Record<string, unknown>>;
|
|
10
|
-
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type List, type Nullable, type Style } from '@luna-form/core';
|
|
2
|
-
import { type SlotComponents } from './slot-base';
|
|
3
|
-
import type { Children } from '../../type';
|
|
4
|
-
export declare function SlotList(props: Readonly<{
|
|
5
|
-
children: Children;
|
|
6
|
-
components: SlotComponents;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
field: List;
|
|
9
|
-
index: number;
|
|
10
|
-
style?: Style;
|
|
11
|
-
value?: Nullable<Record<string, unknown>>;
|
|
12
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const Slot: (props: Readonly<{
|
|
2
|
-
children: import("../../type").Children;
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
fields?: import("@luna-form/core").Fields;
|
|
5
|
-
style?: import("@luna-form/core").Style;
|
|
6
|
-
value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
|
|
7
|
-
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type Environment, type Protocol } from '@luna-form/core';
|
|
2
|
-
import type { AlertProps, Config, InputConfig } from '../type';
|
|
3
|
-
export declare function defineConfig<T extends React.ElementType>(options: Readonly<{
|
|
4
|
-
alert?: React.ComponentType<AlertProps>;
|
|
5
|
-
env?: Environment;
|
|
6
|
-
fetcher?: {
|
|
7
|
-
remotePatterns?: Array<{
|
|
8
|
-
hostname?: string;
|
|
9
|
-
port?: number;
|
|
10
|
-
protocol?: Protocol;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
13
|
-
inputs: Array<InputConfig<T>>;
|
|
14
|
-
style?: {
|
|
15
|
-
compact?: boolean;
|
|
16
|
-
horizontal?: boolean;
|
|
17
|
-
showOptionalLabel?: boolean;
|
|
18
|
-
};
|
|
19
|
-
validation?: {
|
|
20
|
-
blur?: boolean;
|
|
21
|
-
change?: boolean;
|
|
22
|
-
showError?: boolean;
|
|
23
|
-
submit?: boolean;
|
|
24
|
-
};
|
|
25
|
-
}>): Config;
|
|
26
|
-
export declare const defineCheckbox: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
|
|
27
|
-
export declare const defineInput: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
|
|
28
|
-
export declare const defineRadio: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
|
|
29
|
-
export declare const defineSelect: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
|
|
30
|
-
export declare const defineTextArea: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
|
|
31
|
-
export declare function defineCustomInput<T extends React.ElementType>(types: string | string[], input: React.ComponentProps<T>): InputConfig<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renderIfExists<T>(value: T | undefined | null, render: (value: T) => React.ReactNode): React.ReactNode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function formatMarkdown(text?: string): React.ReactNode;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Config } from '../../type';
|
|
2
|
-
import type { Definition, Sections } from '@luna-form/core';
|
|
3
|
-
export declare function Form(props: Readonly<{
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
config: Config;
|
|
6
|
-
context?: Record<string, unknown>;
|
|
7
|
-
definition?: Definition;
|
|
8
|
-
lang?: string;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
sections: Sections;
|
|
11
|
-
translations?: Record<string, Record<string, string>>;
|
|
12
|
-
value?: Record<string, unknown>;
|
|
13
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '@luna-form/core';
|
|
2
|
-
import type { Config } from '../../type';
|
|
3
|
-
export declare function Input(props: Readonly<{
|
|
4
|
-
ariaAttributes?: AriaAttributes;
|
|
5
|
-
commonProps: CommonProps;
|
|
6
|
-
config: Config;
|
|
7
|
-
context?: Record<string, unknown>;
|
|
8
|
-
dataAttributes?: DataAttributes;
|
|
9
|
-
field: Field;
|
|
10
|
-
horizontal?: boolean;
|
|
11
|
-
translations?: Record<string, string>;
|
|
12
|
-
value?: Record<string, unknown>;
|
|
13
|
-
}>): import("react").ReactNode;
|