@manafishrov/ui 1.2.13 → 1.3.1
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/components/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker.js +5 -5
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/Field.d.ts +1 -1
- package/dist/components/Field.js +1 -1
- package/dist/components/Field.js.map +1 -1
- package/dist/components/MenuCombobox.d.ts +1 -1
- package/dist/components/MenuCombobox.js.map +1 -1
- package/dist/components/MenuComboboxList.d.ts +10 -10
- package/dist/components/MenuComboboxList.js.map +1 -1
- package/dist/components/form/AutoSubmit.d.ts +5 -0
- package/dist/components/form/AutoSubmit.js +21 -0
- package/dist/components/form/AutoSubmit.js.map +1 -0
- package/dist/components/form/Form.d.ts +99 -84
- package/dist/components/form/Form.js +62 -40
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.js +30 -27
- package/dist/components/form/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DatePicker.tsx +1 -1
- package/src/components/Field.tsx +1 -1
- package/src/components/MenuCombobox.tsx +6 -6
- package/src/components/MenuComboboxList.tsx +54 -20
- package/src/components/form/AutoSubmit.tsx +38 -0
- package/src/components/form/Form.tsx +29 -1
- package/src/components/form/index.ts +1 -0
|
@@ -1,102 +1,117 @@
|
|
|
1
|
+
import { Component, ComponentProps } from 'solid-js';
|
|
2
|
+
export type FormProps = Omit<ComponentProps<'form'>, 'onSubmit'>;
|
|
3
|
+
export declare const Form: Component<FormProps>;
|
|
1
4
|
export declare const useAppForm: <TFormData, TOnMount extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: import('solid-js').Accessor<import('@tanstack/solid-form').FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>>) => import('@tanstack/solid-form').AppFieldExtendedSolidFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
2
|
-
readonly CheckboxField:
|
|
3
|
-
readonly ComboboxField:
|
|
4
|
-
readonly DatePickerField:
|
|
5
|
-
readonly NumberInputField:
|
|
6
|
-
readonly PasswordInputField:
|
|
7
|
-
readonly PinInputField:
|
|
8
|
-
readonly RadioGroupField:
|
|
9
|
-
readonly SelectField:
|
|
10
|
-
readonly SliderField:
|
|
11
|
-
readonly SwitchField:
|
|
12
|
-
readonly TagsInputField:
|
|
13
|
-
readonly TextInputField:
|
|
14
|
-
readonly TextareaField:
|
|
5
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
6
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
7
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
8
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
9
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
10
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
11
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
12
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
13
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
14
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
15
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
16
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
17
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
15
18
|
}, {
|
|
16
|
-
readonly
|
|
19
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
20
|
+
readonly Form: Component<FormProps>;
|
|
21
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
17
22
|
}>, withForm: <TFormData, TOnMount extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends Record<string, unknown> = {}>({ render, props, }: import('@tanstack/solid-form').WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
18
|
-
readonly CheckboxField:
|
|
19
|
-
readonly ComboboxField:
|
|
20
|
-
readonly DatePickerField:
|
|
21
|
-
readonly NumberInputField:
|
|
22
|
-
readonly PasswordInputField:
|
|
23
|
-
readonly PinInputField:
|
|
24
|
-
readonly RadioGroupField:
|
|
25
|
-
readonly SelectField:
|
|
26
|
-
readonly SliderField:
|
|
27
|
-
readonly SwitchField:
|
|
28
|
-
readonly TagsInputField:
|
|
29
|
-
readonly TextInputField:
|
|
30
|
-
readonly TextareaField:
|
|
23
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
24
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
25
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
26
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
27
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
28
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
29
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
30
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
31
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
32
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
33
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
34
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
35
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
31
36
|
}, {
|
|
32
|
-
readonly
|
|
37
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
38
|
+
readonly Form: Component<FormProps>;
|
|
39
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
33
40
|
}, TRenderProps>) => (props: import('solid-js').ParentProps<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
34
41
|
form: import('@tanstack/solid-form').AppFieldExtendedSolidFormApi<[unknown] extends [TFormData] ? any : TFormData, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
35
|
-
readonly CheckboxField:
|
|
36
|
-
readonly ComboboxField:
|
|
37
|
-
readonly DatePickerField:
|
|
38
|
-
readonly NumberInputField:
|
|
39
|
-
readonly PasswordInputField:
|
|
40
|
-
readonly PinInputField:
|
|
41
|
-
readonly RadioGroupField:
|
|
42
|
-
readonly SelectField:
|
|
43
|
-
readonly SliderField:
|
|
44
|
-
readonly SwitchField:
|
|
45
|
-
readonly TagsInputField:
|
|
46
|
-
readonly TextInputField:
|
|
47
|
-
readonly TextareaField:
|
|
42
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
43
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
44
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
45
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
46
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
47
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
48
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
49
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
50
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
51
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
52
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
53
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
54
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
48
55
|
}, {
|
|
49
|
-
readonly
|
|
56
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
57
|
+
readonly Form: Component<FormProps>;
|
|
58
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
50
59
|
}>;
|
|
51
60
|
}>) => import('solid-js').JSXElement, withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends Record<string, unknown> = {}>({ render, props, defaultValues, }: import('@tanstack/solid-form').WithFieldGroupProps<TFieldGroupData, {
|
|
52
|
-
readonly CheckboxField:
|
|
53
|
-
readonly ComboboxField:
|
|
54
|
-
readonly DatePickerField:
|
|
55
|
-
readonly NumberInputField:
|
|
56
|
-
readonly PasswordInputField:
|
|
57
|
-
readonly PinInputField:
|
|
58
|
-
readonly RadioGroupField:
|
|
59
|
-
readonly SelectField:
|
|
60
|
-
readonly SliderField:
|
|
61
|
-
readonly SwitchField:
|
|
62
|
-
readonly TagsInputField:
|
|
63
|
-
readonly TextInputField:
|
|
64
|
-
readonly TextareaField:
|
|
61
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
62
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
63
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
64
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
65
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
66
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
67
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
68
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
69
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
70
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
71
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
72
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
73
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
65
74
|
}, {
|
|
66
|
-
readonly
|
|
75
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
76
|
+
readonly Form: Component<FormProps>;
|
|
77
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
67
78
|
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import('@tanstack/solid-form').DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import('@tanstack/solid-form').FieldsMap<TFormData, TFieldGroupData>, TOnMount extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/solid-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/solid-form').FormAsyncValidateOrFn<TFormData> | undefined, TFormSubmitMeta>(params: import('solid-js').ParentProps<NoInfer<TRenderProps> & {
|
|
68
79
|
form: import('@tanstack/solid-form').AppFieldExtendedSolidFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
69
|
-
readonly CheckboxField:
|
|
70
|
-
readonly ComboboxField:
|
|
71
|
-
readonly DatePickerField:
|
|
72
|
-
readonly NumberInputField:
|
|
73
|
-
readonly PasswordInputField:
|
|
74
|
-
readonly PinInputField:
|
|
75
|
-
readonly RadioGroupField:
|
|
76
|
-
readonly SelectField:
|
|
77
|
-
readonly SliderField:
|
|
78
|
-
readonly SwitchField:
|
|
79
|
-
readonly TagsInputField:
|
|
80
|
-
readonly TextInputField:
|
|
81
|
-
readonly TextareaField:
|
|
80
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
81
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
82
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
83
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
84
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
85
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
86
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
87
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
88
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
89
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
90
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
91
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
92
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
82
93
|
}, {
|
|
83
|
-
readonly
|
|
94
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
95
|
+
readonly Form: Component<FormProps>;
|
|
96
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
84
97
|
}> | import('@tanstack/solid-form').AppFieldExtendedSolidFieldGroupApi<unknown, TFormData, string | import('@tanstack/solid-form').FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
85
|
-
readonly CheckboxField:
|
|
86
|
-
readonly ComboboxField:
|
|
87
|
-
readonly DatePickerField:
|
|
88
|
-
readonly NumberInputField:
|
|
89
|
-
readonly PasswordInputField:
|
|
90
|
-
readonly PinInputField:
|
|
91
|
-
readonly RadioGroupField:
|
|
92
|
-
readonly SelectField:
|
|
93
|
-
readonly SliderField:
|
|
94
|
-
readonly SwitchField:
|
|
95
|
-
readonly TagsInputField:
|
|
96
|
-
readonly TextInputField:
|
|
97
|
-
readonly TextareaField:
|
|
98
|
+
readonly CheckboxField: Component<import('./CheckboxField').CheckboxFieldProps>;
|
|
99
|
+
readonly ComboboxField: Component<import('./ComboboxField').ComboboxFieldProps>;
|
|
100
|
+
readonly DatePickerField: Component<import('./DatePickerField').DatePickerFieldProps>;
|
|
101
|
+
readonly NumberInputField: Component<import('./NumberInputField').NumberInputFieldProps>;
|
|
102
|
+
readonly PasswordInputField: Component<import('./PasswordInputField').PasswordInputFieldProps>;
|
|
103
|
+
readonly PinInputField: Component<import('./PinInputField').PinInputFieldProps>;
|
|
104
|
+
readonly RadioGroupField: Component<import('./RadioGroupField').RadioGroupFieldProps>;
|
|
105
|
+
readonly SelectField: Component<import('./SelectField').SelectFieldProps>;
|
|
106
|
+
readonly SliderField: Component<import('./SliderField').SliderFieldProps>;
|
|
107
|
+
readonly SwitchField: Component<import('./SwitchField').SwitchFieldProps>;
|
|
108
|
+
readonly TagsInputField: Component<import('./TagsInputField').TagsInputFieldProps>;
|
|
109
|
+
readonly TextInputField: Component<import('./TextInputField').TextInputFieldProps>;
|
|
110
|
+
readonly TextareaField: Component<import('./TextareaField').TextareaFieldProps>;
|
|
98
111
|
}, {
|
|
99
|
-
readonly
|
|
112
|
+
readonly AutoSubmit: Component<import('./AutoSubmit').AutoSubmitProps>;
|
|
113
|
+
readonly Form: Component<FormProps>;
|
|
114
|
+
readonly SubmitButton: Component<import('./SubmitButton').SubmitButtonProps>;
|
|
100
115
|
}>;
|
|
101
116
|
fields: TFields;
|
|
102
117
|
}>) => import('solid-js').JSXElement;
|
|
@@ -1,48 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { spread as l, mergeProps as f, insert as n, template as s } from "solid-js/web";
|
|
2
|
+
import { createFormHook as d } from "@tanstack/solid-form";
|
|
3
|
+
import { splitProps as a } from "solid-js";
|
|
4
|
+
import { cn as u } from "../../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
|
|
5
|
+
import { AutoSubmit as c } from "./AutoSubmit.js";
|
|
6
|
+
import { CheckboxField as F } from "./CheckboxField.js";
|
|
7
|
+
import { ComboboxField as h } from "./ComboboxField.js";
|
|
8
|
+
import { useFormContext as x, fieldContext as b, formContext as C } from "./context.js";
|
|
9
|
+
import { DatePickerField as P } from "./DatePickerField.js";
|
|
10
|
+
import { NumberInputField as S } from "./NumberInputField.js";
|
|
11
|
+
import { PasswordInputField as w } from "./PasswordInputField.js";
|
|
12
|
+
import { PinInputField as I } from "./PinInputField.js";
|
|
13
|
+
import { RadioGroupField as g } from "./RadioGroupField.js";
|
|
14
|
+
import { SelectField as v } from "./SelectField.js";
|
|
15
|
+
import { SliderField as k } from "./SliderField.js";
|
|
16
|
+
import { SubmitButton as T } from "./SubmitButton.js";
|
|
17
|
+
import { SwitchField as A } from "./SwitchField.js";
|
|
18
|
+
import { TagsInputField as D } from "./TagsInputField.js";
|
|
19
|
+
import { TextareaField as G } from "./TextareaField.js";
|
|
20
|
+
import { TextInputField as _ } from "./TextInputField.js";
|
|
21
|
+
var $ = /* @__PURE__ */ s("<form>");
|
|
22
|
+
const y = (e) => {
|
|
23
|
+
const m = x(), [r, i] = a(e, ["children", "class"]);
|
|
24
|
+
return (() => {
|
|
25
|
+
var o = $();
|
|
26
|
+
return o.addEventListener("submit", (t) => {
|
|
27
|
+
t.preventDefault(), t.stopPropagation(), m.handleSubmit().catch((p) => {
|
|
28
|
+
throw p;
|
|
29
|
+
});
|
|
30
|
+
}), l(o, f({
|
|
31
|
+
get class() {
|
|
32
|
+
return u("space-y-6 relative", r.class);
|
|
33
|
+
}
|
|
34
|
+
}, i), !1, !0), n(o, () => r.children), o;
|
|
35
|
+
})();
|
|
36
|
+
}, {
|
|
37
|
+
useAppForm: oo,
|
|
38
|
+
withForm: ro,
|
|
39
|
+
withFieldGroup: to
|
|
40
|
+
} = d({
|
|
41
|
+
formContext: C,
|
|
42
|
+
fieldContext: b,
|
|
24
43
|
fieldComponents: {
|
|
25
|
-
CheckboxField:
|
|
26
|
-
ComboboxField:
|
|
27
|
-
DatePickerField:
|
|
28
|
-
NumberInputField:
|
|
29
|
-
PasswordInputField:
|
|
30
|
-
PinInputField:
|
|
31
|
-
RadioGroupField:
|
|
32
|
-
SelectField:
|
|
33
|
-
SliderField:
|
|
34
|
-
SwitchField:
|
|
35
|
-
TagsInputField:
|
|
36
|
-
TextInputField:
|
|
37
|
-
TextareaField:
|
|
44
|
+
CheckboxField: F,
|
|
45
|
+
ComboboxField: h,
|
|
46
|
+
DatePickerField: P,
|
|
47
|
+
NumberInputField: S,
|
|
48
|
+
PasswordInputField: w,
|
|
49
|
+
PinInputField: I,
|
|
50
|
+
RadioGroupField: g,
|
|
51
|
+
SelectField: v,
|
|
52
|
+
SliderField: k,
|
|
53
|
+
SwitchField: A,
|
|
54
|
+
TagsInputField: D,
|
|
55
|
+
TextInputField: _,
|
|
56
|
+
TextareaField: G
|
|
38
57
|
},
|
|
39
58
|
formComponents: {
|
|
40
|
-
|
|
59
|
+
AutoSubmit: c,
|
|
60
|
+
Form: y,
|
|
61
|
+
SubmitButton: T
|
|
41
62
|
}
|
|
42
63
|
});
|
|
43
64
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
y as Form,
|
|
66
|
+
oo as useAppForm,
|
|
67
|
+
to as withFieldGroup,
|
|
68
|
+
ro as withForm
|
|
47
69
|
};
|
|
48
70
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/solid-form';\n\nimport { CheckboxField } from './CheckboxField';\nimport { ComboboxField } from './ComboboxField';\nimport { formContext,
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/solid-form';\nimport { splitProps, type Component, type ComponentProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\n\nimport { AutoSubmit } from './AutoSubmit';\nimport { CheckboxField } from './CheckboxField';\nimport { ComboboxField } from './ComboboxField';\nimport { fieldContext, formContext, useFormContext } from './context';\nimport { DatePickerField } from './DatePickerField';\nimport { NumberInputField } from './NumberInputField';\nimport { PasswordInputField } from './PasswordInputField';\nimport { PinInputField } from './PinInputField';\nimport { RadioGroupField } from './RadioGroupField';\nimport { SelectField } from './SelectField';\nimport { SliderField } from './SliderField';\nimport { SubmitButton } from './SubmitButton';\nimport { SwitchField } from './SwitchField';\nimport { TagsInputField } from './TagsInputField';\nimport { TextareaField } from './TextareaField';\nimport { TextInputField } from './TextInputField';\n\nexport type FormProps = Omit<ComponentProps<'form'>, 'onSubmit'>;\n\nexport const Form: Component<FormProps> = (props) => {\n const form = useFormContext();\n const [local, formProps] = splitProps(props, ['children', 'class']);\n\n return (\n <form\n class={cn('space-y-6 relative', local.class)}\n onSubmit={(submitEvent) => {\n submitEvent.preventDefault();\n submitEvent.stopPropagation();\n form.handleSubmit().catch((error: unknown) => {\n throw error;\n });\n }}\n {...formProps}\n >\n {local.children}\n </form>\n );\n};\n\nexport const { useAppForm, withForm, withFieldGroup } = createFormHook({\n formContext,\n fieldContext,\n fieldComponents: {\n CheckboxField,\n ComboboxField,\n DatePickerField,\n NumberInputField,\n PasswordInputField,\n PinInputField,\n RadioGroupField,\n SelectField,\n SliderField,\n SwitchField,\n TagsInputField,\n TextInputField,\n TextareaField,\n },\n formComponents: {\n AutoSubmit,\n Form,\n SubmitButton,\n },\n});\n"],"names":["Form","props","form","useFormContext","local","formProps","splitProps","_el$","_tmpl$","addEventListener","submitEvent","preventDefault","stopPropagation","handleSubmit","catch","error","_$spread","_$mergeProps","cn","class","_$insert","children","useAppForm","withForm","withFieldGroup","createFormHook","formContext","fieldContext","fieldComponents","CheckboxField","ComboboxField","DatePickerField","NumberInputField","PasswordInputField","PinInputField","RadioGroupField","SelectField","SliderField","SwitchField","TagsInputField","TextInputField","TextareaField","formComponents","AutoSubmit","SubmitButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBO,MAAMA,IAA8BC,CAAAA,MAAU;AACnD,QAAMC,IAAOC,EAAAA,GACP,CAACC,GAAOC,CAAS,IAAIC,EAAWL,GAAO,CAAC,YAAY,OAAO,CAAC;AAElE,UAAA,MAAA;AAAA,QAAAM,IAAAC,EAAAA;AAAAD,WAAAA,EAAAE,iBAAA,UAGeC,CAAAA,MAAgB;AACzBA,MAAAA,EAAYC,eAAAA,GACZD,EAAYE,gBAAAA,GACZV,EAAKW,aAAAA,EAAeC,MAAM,CAACC,MAAmB;AAC5C,cAAMA;AAAAA,MACR,CAAC;AAAA,IACH,CAAC,GAAAC,EAAAT,GAAAU,EAAA;AAAA,MAAA,IAAA,QAAA;AAAA,eAPMC,EAAG,sBAAsBd,EAAMe,KAAK;AAAA,MAAC;AAAA,IAAA,GAQxCd,CAAS,GAAA,IAAA,EAAA,GAAAe,EAAAb,GAAA,MAEZH,EAAMiB,QAAQ,GAAAd;AAAAA,EAAA,GAAA;AAGrB,GAEa;AAAA,EAAEe,YAAAA;AAAAA,EAAYC,UAAAA;AAAAA,EAAUC,gBAAAA;AAAe,IAAIC,EAAe;AAAA,EACrEC,aAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,iBAAiB;AAAA,IACfC,eAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,eAAAA;AAAAA,EAAAA;AAAAA,EAEFC,gBAAgB;AAAA,IACdC,YAAAA;AAAAA,IACA3C,MAAAA;AAAAA,IACA4C,cAAAA;AAAAA,EAAAA;AAEJ,CAAC;"}
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fieldContext as x, formContext as
|
|
3
|
-
import { TextInputField as
|
|
4
|
-
import { TextareaField as
|
|
1
|
+
import { Form as r, useAppForm as t, withFieldGroup as m, withForm as p } from "./Form.js";
|
|
2
|
+
import { fieldContext as x, formContext as d, useFieldContext as f, useFormContext as F } from "./context.js";
|
|
3
|
+
import { TextInputField as u } from "./TextInputField.js";
|
|
4
|
+
import { TextareaField as a } from "./TextareaField.js";
|
|
5
5
|
import { NumberInputField as s } from "./NumberInputField.js";
|
|
6
|
-
import { PasswordInputField as
|
|
6
|
+
import { PasswordInputField as I } from "./PasswordInputField.js";
|
|
7
7
|
import { PinInputField as c } from "./PinInputField.js";
|
|
8
8
|
import { SelectField as w } from "./SelectField.js";
|
|
9
|
-
import { CheckboxField as
|
|
10
|
-
import { SwitchField as
|
|
9
|
+
import { CheckboxField as T } from "./CheckboxField.js";
|
|
10
|
+
import { SwitchField as A } from "./SwitchField.js";
|
|
11
11
|
import { RadioGroupField as g } from "./RadioGroupField.js";
|
|
12
|
-
import { SliderField as
|
|
13
|
-
import { DatePickerField as
|
|
14
|
-
import { ComboboxField as
|
|
15
|
-
import { TagsInputField as
|
|
16
|
-
import { SubmitButton as
|
|
12
|
+
import { SliderField as D } from "./SliderField.js";
|
|
13
|
+
import { DatePickerField as R } from "./DatePickerField.js";
|
|
14
|
+
import { ComboboxField as q } from "./ComboboxField.js";
|
|
15
|
+
import { TagsInputField as y } from "./TagsInputField.js";
|
|
16
|
+
import { SubmitButton as E } from "./SubmitButton.js";
|
|
17
|
+
import { AutoSubmit as J } from "./AutoSubmit.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
J as AutoSubmit,
|
|
20
|
+
T as CheckboxField,
|
|
21
|
+
q as ComboboxField,
|
|
22
|
+
R as DatePickerField,
|
|
23
|
+
r as Form,
|
|
21
24
|
s as NumberInputField,
|
|
22
|
-
|
|
25
|
+
I as PasswordInputField,
|
|
23
26
|
c as PinInputField,
|
|
24
27
|
g as RadioGroupField,
|
|
25
28
|
w as SelectField,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
D as SliderField,
|
|
30
|
+
E as SubmitButton,
|
|
31
|
+
A as SwitchField,
|
|
32
|
+
y as TagsInputField,
|
|
33
|
+
u as TextInputField,
|
|
34
|
+
a as TextareaField,
|
|
32
35
|
x as fieldContext,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
d as formContext,
|
|
37
|
+
t as useAppForm,
|
|
38
|
+
f as useFieldContext,
|
|
39
|
+
F as useFormContext,
|
|
40
|
+
m as withFieldGroup,
|
|
38
41
|
p as withForm
|
|
39
42
|
};
|
|
40
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -290,7 +290,7 @@ export const DatePickerViews: Component = () => [
|
|
|
290
290
|
<DatePickerMonthView />,
|
|
291
291
|
<DatePickerYearView />,
|
|
292
292
|
];
|
|
293
|
-
export const
|
|
293
|
+
export const DatePickerCalendar: Component<DatePickerPrimitive.RootProps> = (props) => (
|
|
294
294
|
<DatePicker {...props} inline unmountOnExit={false}>
|
|
295
295
|
<DatePickerContent class='border-none shadow-none ring-0'>
|
|
296
296
|
<DatePickerViews />
|
package/src/components/Field.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import { Separator } from '@/components/Separator';
|
|
|
16
16
|
export { useFieldset } from '@ark-ui/solid/fieldset';
|
|
17
17
|
export const FieldContext = PrimitiveField.Context;
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const Fieldset: Component<PrimitiveFieldset.RootProps> = (props) => {
|
|
20
20
|
const [local, others] = splitProps(props, ['class', 'children']);
|
|
21
21
|
return (
|
|
22
22
|
<PrimitiveFieldset.Root
|
|
@@ -178,13 +178,13 @@ export const MenuComboboxEmpty: Component<MenuComboboxEmptyProps> = (props) => {
|
|
|
178
178
|
);
|
|
179
179
|
};
|
|
180
180
|
export type {
|
|
181
|
-
|
|
181
|
+
MenuComboboxCheckboxItemData,
|
|
182
|
+
MenuComboboxItemData,
|
|
183
|
+
MenuComboboxItemGroupData,
|
|
184
|
+
MenuComboboxRadioItemGroupData,
|
|
185
|
+
MenuComboboxRadioItemData,
|
|
186
|
+
MenuComboboxSeparatorData,
|
|
182
187
|
MenuComboboxGroupedListProps,
|
|
183
188
|
MenuComboboxListProps,
|
|
184
|
-
MenuItemData,
|
|
185
|
-
MenuItemGroupData,
|
|
186
|
-
MenuRadioGroupData,
|
|
187
|
-
MenuRadioItemData,
|
|
188
|
-
MenuSeparatorData,
|
|
189
189
|
} from './MenuComboboxList';
|
|
190
190
|
export { MenuComboboxGroupedList, MenuComboboxList } from './MenuComboboxList';
|