@manafishrov/ui 1.2.12 → 1.3.0
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/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/ComboboxField.d.ts +5 -3
- package/dist/components/form/ComboboxField.js +62 -63
- package/dist/components/form/ComboboxField.js.map +1 -1
- package/dist/components/form/DatePickerField.d.ts +3 -2
- package/dist/components/form/DatePickerField.js +43 -32
- package/dist/components/form/DatePickerField.js.map +1 -1
- 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/NumberInputField.d.ts +3 -3
- package/dist/components/form/NumberInputField.js +18 -19
- package/dist/components/form/NumberInputField.js.map +1 -1
- package/dist/components/form/PasswordInputField.d.ts +1 -0
- package/dist/components/form/PasswordInputField.js +23 -16
- package/dist/components/form/PasswordInputField.js.map +1 -1
- package/dist/components/form/TagsInputField.d.ts +4 -4
- package/dist/components/form/TagsInputField.js +52 -49
- package/dist/components/form/TagsInputField.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/form/AutoSubmit.tsx +38 -0
- package/src/components/form/ComboboxField.tsx +30 -25
- package/src/components/form/DatePickerField.tsx +30 -17
- package/src/components/form/Form.tsx +29 -1
- package/src/components/form/NumberInputField.tsx +5 -6
- package/src/components/form/PasswordInputField.tsx +7 -3
- package/src/components/form/TagsInputField.tsx +43 -32
- 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,8 +1,8 @@
|
|
|
1
1
|
import { Component, ComponentProps } from 'solid-js';
|
|
2
|
-
import {
|
|
3
|
-
export type NumberInputFieldProps = ComponentProps<typeof
|
|
2
|
+
import { NumberInputInput } from '../NumberInput';
|
|
3
|
+
export type NumberInputFieldProps = ComponentProps<typeof NumberInputInput> & {
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
|
|
6
|
+
showTriggers?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const NumberInputField: Component<NumberInputFieldProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createComponent as e,
|
|
2
|
-
import { Field as
|
|
3
|
-
import { NumberInput as
|
|
4
|
-
import { useFieldContext as
|
|
5
|
-
import { splitProps as
|
|
6
|
-
const
|
|
7
|
-
const t =
|
|
8
|
-
return e(
|
|
1
|
+
import { createComponent as e, Show as u } from "solid-js/web";
|
|
2
|
+
import { Field as d, FieldLabel as a, FieldContent as o, FieldError as s, FieldDescription as g } from "../Field.js";
|
|
3
|
+
import { NumberInput as m, NumberInputControl as h, NumberInputInput as p, NumberInputTriggers as c } from "../NumberInput.js";
|
|
4
|
+
import { useFieldContext as b } from "./context.js";
|
|
5
|
+
import { splitProps as f } from "solid-js";
|
|
6
|
+
const v = (n) => {
|
|
7
|
+
const t = b(), [r, l] = f(n, ["label", "description", "required", "disabled", "readOnly", "showTriggers"]);
|
|
8
|
+
return e(d, {
|
|
9
9
|
get invalid() {
|
|
10
10
|
return t().state.meta.errors.length > 0;
|
|
11
11
|
},
|
|
@@ -19,13 +19,13 @@ const y = (n) => {
|
|
|
19
19
|
return r.readOnly ?? !1;
|
|
20
20
|
},
|
|
21
21
|
get children() {
|
|
22
|
-
return [e(
|
|
22
|
+
return [e(a, {
|
|
23
23
|
get children() {
|
|
24
24
|
return r.label;
|
|
25
25
|
}
|
|
26
|
-
}), e(
|
|
26
|
+
}), e(o, {
|
|
27
27
|
get children() {
|
|
28
|
-
return [e(
|
|
28
|
+
return [e(m, {
|
|
29
29
|
get value() {
|
|
30
30
|
return String(t().state.value);
|
|
31
31
|
},
|
|
@@ -46,27 +46,26 @@ const y = (n) => {
|
|
|
46
46
|
},
|
|
47
47
|
get required() {
|
|
48
48
|
return r.required ?? !1;
|
|
49
|
-
}
|
|
50
|
-
}, l, {
|
|
49
|
+
},
|
|
51
50
|
get children() {
|
|
52
51
|
return e(h, {
|
|
53
52
|
get children() {
|
|
54
|
-
return [e(
|
|
53
|
+
return [e(p, l), e(u, {
|
|
55
54
|
get when() {
|
|
56
|
-
return r.
|
|
55
|
+
return r.showTriggers !== !1;
|
|
57
56
|
},
|
|
58
57
|
get children() {
|
|
59
|
-
return e(
|
|
58
|
+
return e(c, {});
|
|
60
59
|
}
|
|
61
60
|
})];
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
|
-
})
|
|
64
|
+
}), e(s, {
|
|
66
65
|
get errors() {
|
|
67
66
|
return t().state.meta.errors;
|
|
68
67
|
}
|
|
69
|
-
}), e(
|
|
68
|
+
}), e(g, {
|
|
70
69
|
get children() {
|
|
71
70
|
return r.description;
|
|
72
71
|
}
|
|
@@ -77,6 +76,6 @@ const y = (n) => {
|
|
|
77
76
|
});
|
|
78
77
|
};
|
|
79
78
|
export {
|
|
80
|
-
|
|
79
|
+
v as NumberInputField
|
|
81
80
|
};
|
|
82
81
|
//# sourceMappingURL=NumberInputField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof
|
|
1
|
+
{"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInputInput> & {\n label?: string;\n description?: string;\n showTriggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'showTriggers',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <NumberInputControl>\n <NumberInputInput {...others} />\n <Show when={local.showTriggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","showTriggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,cAAc,CACf;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAW;AAAA,YAAA,IACVC,QAAK;AAAA,qBAAEC,OAAOrB,IAAQQ,MAAMY,KAAK;AAAA,YAAC;AAAA,YAClCE,eAAgBC,CAAAA,MAAY;AAC1BvB,cAAAA,IAAQwB,aAAaD,EAAQE,aAAa;AAAA,YAC5C;AAAA,YACAC,QAAQA,MAAM;AACZ1B,cAAAA,EAAAA,EAAQ2B,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDpB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,YAAA,IAAAG,WAAA;AAAA,qBAAAV,EAEhCuB,GAAkB;AAAA,gBAAA,IAAAb,WAAA;AAAA,yBAAA,CAAAV,EAChBwB,GAAqB1B,CAAM,GAAAE,EAC3ByB,GAAI;AAAA,oBAAA,IAACC,OAAI;AAAA,6BAAE7B,EAAM8B,iBAAiB;AAAA,oBAAK;AAAA,oBAAA,IAAAjB,WAAA;AAAA,6BAAAV,EACrC4B,GAAmB,EAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA5B,EAIzB6B,GAAU;AAAA,YAAA,IAACxB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C8B,GAAgB;AAAA,YAAA,IAAApB,WAAA;AAAA,qBAAEb,EAAMkC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -3,5 +3,6 @@ import { PasswordInputInput } from '../PasswordInput';
|
|
|
3
3
|
export type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
showVisibilityTrigger?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const PasswordInputField: Component<PasswordInputFieldProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createComponent as e, mergeProps as
|
|
1
|
+
import { createComponent as e, mergeProps as d, Show as s } from "solid-js/web";
|
|
2
2
|
import { splitProps as a } from "solid-js";
|
|
3
|
-
import { Field as
|
|
4
|
-
import { PasswordInput as c, PasswordInputControl as m, PasswordInputInput as
|
|
3
|
+
import { Field as o, FieldLabel as u, FieldContent as g, FieldError as p, FieldDescription as h } from "../Field.js";
|
|
4
|
+
import { PasswordInput as c, PasswordInputControl as m, PasswordInputInput as f, PasswordInputVisibilityTrigger as b, PasswordInputIndicator as w } from "../PasswordInput.js";
|
|
5
5
|
import { useFieldContext as I } from "./context.js";
|
|
6
|
-
const
|
|
7
|
-
const t = I(), [r,
|
|
8
|
-
return e(
|
|
6
|
+
const C = (n) => {
|
|
7
|
+
const t = I(), [r, i] = a(n, ["label", "description", "required", "disabled", "readOnly", "showVisibilityTrigger"]);
|
|
8
|
+
return e(o, {
|
|
9
9
|
get invalid() {
|
|
10
10
|
return t().state.meta.errors.length > 0;
|
|
11
11
|
},
|
|
@@ -19,11 +19,11 @@ const v = (n) => {
|
|
|
19
19
|
return r.readOnly ?? !1;
|
|
20
20
|
},
|
|
21
21
|
get children() {
|
|
22
|
-
return [e(
|
|
22
|
+
return [e(u, {
|
|
23
23
|
get children() {
|
|
24
24
|
return r.label;
|
|
25
25
|
}
|
|
26
|
-
}), e(
|
|
26
|
+
}), e(g, {
|
|
27
27
|
get children() {
|
|
28
28
|
return [e(c, {
|
|
29
29
|
get invalid() {
|
|
@@ -41,29 +41,36 @@ const v = (n) => {
|
|
|
41
41
|
get children() {
|
|
42
42
|
return e(m, {
|
|
43
43
|
get children() {
|
|
44
|
-
return [e(
|
|
44
|
+
return [e(f, d({
|
|
45
45
|
get value() {
|
|
46
46
|
return t().state.value;
|
|
47
47
|
},
|
|
48
|
-
onInput: (
|
|
49
|
-
t().handleChange(
|
|
48
|
+
onInput: (l) => {
|
|
49
|
+
t().handleChange(l.target.value);
|
|
50
50
|
},
|
|
51
51
|
onBlur: () => {
|
|
52
52
|
t().handleBlur();
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, i)), e(s, {
|
|
55
|
+
get when() {
|
|
56
|
+
return r.showVisibilityTrigger !== !1;
|
|
57
|
+
},
|
|
55
58
|
get children() {
|
|
56
|
-
return e(b, {
|
|
59
|
+
return e(b, {
|
|
60
|
+
get children() {
|
|
61
|
+
return e(w, {});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
57
64
|
}
|
|
58
65
|
})];
|
|
59
66
|
}
|
|
60
67
|
});
|
|
61
68
|
}
|
|
62
|
-
}), e(
|
|
69
|
+
}), e(p, {
|
|
63
70
|
get errors() {
|
|
64
71
|
return t().state.meta.errors;
|
|
65
72
|
}
|
|
66
|
-
}), e(
|
|
73
|
+
}), e(h, {
|
|
67
74
|
get children() {
|
|
68
75
|
return r.description;
|
|
69
76
|
}
|
|
@@ -74,6 +81,6 @@ const v = (n) => {
|
|
|
74
81
|
});
|
|
75
82
|
};
|
|
76
83
|
export {
|
|
77
|
-
|
|
84
|
+
C as PasswordInputField
|
|
78
85
|
};
|
|
79
86
|
//# sourceMappingURL=PasswordInputField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n PasswordInput,\n PasswordInputControl,\n PasswordInputInput,\n PasswordInputVisibilityTrigger,\n PasswordInputIndicator,\n} from '@/components/PasswordInput';\n\nimport { useFieldContext } from './context';\n\nexport type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <PasswordInput\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <PasswordInputControl>\n <PasswordInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n <
|
|
1
|
+
{"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n PasswordInput,\n PasswordInputControl,\n PasswordInputInput,\n PasswordInputVisibilityTrigger,\n PasswordInputIndicator,\n} from '@/components/PasswordInput';\n\nimport { useFieldContext } from './context';\n\nexport type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {\n label?: string;\n description?: string;\n showVisibilityTrigger?: boolean;\n};\n\nexport const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'showVisibilityTrigger',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <PasswordInput\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <PasswordInputControl>\n <PasswordInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n <Show when={local.showVisibilityTrigger !== false}>\n <PasswordInputVisibilityTrigger>\n <PasswordInputIndicator />\n </PasswordInputVisibilityTrigger>\n </Show>\n </PasswordInputControl>\n </PasswordInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["PasswordInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","PasswordInput","PasswordInputControl","PasswordInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","_$Show","when","showVisibilityTrigger","PasswordInputVisibilityTrigger","PasswordInputIndicator","FieldError","FieldDescription","description"],"mappings":";;;;;AAmBO,MAAMA,IAA0DC,CAAAA,MAAU;AAC/E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,uBAAuB,CACxB;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAa;AAAA,YAAA,IACZZ,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,YAAA,IAAAG,WAAA;AAAA,qBAAAV,EAEhCe,GAAoB;AAAA,gBAAA,IAAAL,WAAA;AAAA,yBAAA,CAAAV,EAClBgB,GAAkBC,EAAA;AAAA,oBAAA,IACjBC,QAAK;AAAA,6BAAEvB,EAAAA,EAAQQ,MAAMe;AAAAA,oBAAK;AAAA,oBAC1BC,SAAUC,CAAAA,MAAU;AAClBzB,sBAAAA,EAAAA,EAAQ0B,aAAaD,EAAME,OAAOJ,KAAK;AAAA,oBACzC;AAAA,oBACAK,QAAQA,MAAM;AACZ5B,sBAAAA,EAAAA,EAAQ6B,WAAAA;AAAAA,oBACV;AAAA,kBAAA,GACI1B,CAAM,CAAA,GAAAE,EAEXyB,GAAI;AAAA,oBAAA,IAACC,OAAI;AAAA,6BAAE7B,EAAM8B,0BAA0B;AAAA,oBAAK;AAAA,oBAAA,IAAAjB,WAAA;AAAA,6BAAAV,EAC9C4B,GAA8B;AAAA,wBAAA,IAAAlB,WAAA;AAAA,iCAAAV,EAC5B6B,GAAsB,EAAA;AAAA,wBAAA;AAAA,sBAAA,CAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA7B,EAK9B8B,GAAU;AAAA,YAAA,IAACzB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C+B,GAAgB;AAAA,YAAA,IAAArB,WAAA;AAAA,qBAAEb,EAAMmC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export type TagsInputFieldProps =
|
|
1
|
+
import { Component, ComponentProps } from 'solid-js';
|
|
2
|
+
import { TagsInputInput } from '../TagsInput';
|
|
3
|
+
export type TagsInputFieldProps = ComponentProps<typeof TagsInputInput> & {
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
|
|
6
|
+
showClearTrigger?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const TagsInputField: Component<TagsInputFieldProps>;
|