@cryptlex/web-components 6.6.6-alpha64 → 6.6.6-alpha66
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.
|
@@ -1 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
import { formOptions, revalidateLogic } from '@tanstack/react-form';
|
|
2
|
+
import { Button } from '../components/button';
|
|
3
|
+
import { TfCheckbox } from '../components/checkbox';
|
|
4
|
+
import { TfMultiSelect } from '../components/multi-select';
|
|
5
|
+
import { TfNumberField } from '../components/numberfield';
|
|
6
|
+
import { TfSingleSelect } from '../components/select';
|
|
7
|
+
import { TfTextField } from '../components/textfield';
|
|
8
|
+
/** Don't put this in the same file as form-context.tsx, this causes circular dependencies. */
|
|
9
|
+
/** TODO, lazy loading when fieldComponents are large */
|
|
10
|
+
/**
|
|
11
|
+
* Builder for form logic and user interfaces
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A small builder that wires the form library to the concrete UI components used across the app.
|
|
15
|
+
* `createFormHook` returns a `useAppForm` hook which contains standard wiring and default components for
|
|
16
|
+
* fields and form-level controls.
|
|
17
|
+
*
|
|
18
|
+
* It exports only the `useAppForm` hook. Consumers (forms in codebase) call `useAppForm` to access the form API and default components.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useAppForm: <TFormData, TOnMount extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: import('@tanstack/react-form').FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import('@tanstack/react-form').AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
21
|
+
readonly TfTextField: typeof TfTextField;
|
|
22
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
23
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
24
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
25
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
26
|
+
}, {
|
|
27
|
+
readonly Button: typeof Button;
|
|
28
|
+
}>, withForm: <TFormData, TOnMount extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import('@tanstack/react-form').WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
29
|
+
readonly TfTextField: typeof TfTextField;
|
|
30
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
31
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
32
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
33
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
34
|
+
}, {
|
|
35
|
+
readonly Button: typeof Button;
|
|
36
|
+
}, TRenderProps>) => import('react').FunctionComponent<import('react').PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
37
|
+
form: import('@tanstack/react-form').AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
38
|
+
readonly TfTextField: typeof TfTextField;
|
|
39
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
40
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
41
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
42
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
43
|
+
}, {
|
|
44
|
+
readonly Button: typeof Button;
|
|
45
|
+
}>;
|
|
46
|
+
}>>, withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends object = {}>({ render, props, defaultValues, }: import('@tanstack/react-form').WithFieldGroupProps<TFieldGroupData, {
|
|
47
|
+
readonly TfTextField: typeof TfTextField;
|
|
48
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
49
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
50
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
51
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
52
|
+
}, {
|
|
53
|
+
readonly Button: typeof Button;
|
|
54
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import('@tanstack/react-form').DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import('@tanstack/react-form').FieldsMap<TFormData, TFieldGroupData>, TOnMount extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/react-form').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/react-form').FormAsyncValidateOrFn<TFormData> | undefined, TFormSubmitMeta>(params: import('react').PropsWithChildren<NoInfer<TRenderProps> & {
|
|
55
|
+
form: import('@tanstack/react-form').AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
56
|
+
readonly TfTextField: typeof TfTextField;
|
|
57
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
58
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
59
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
60
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
61
|
+
}, {
|
|
62
|
+
readonly Button: typeof Button;
|
|
63
|
+
}> | import('@tanstack/react-form').AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import('@tanstack/react-form').FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
64
|
+
readonly TfTextField: typeof TfTextField;
|
|
65
|
+
readonly TfNumberField: typeof TfNumberField;
|
|
66
|
+
readonly TfMultiSelect: typeof TfMultiSelect;
|
|
67
|
+
readonly TfSingleSelect: typeof TfSingleSelect;
|
|
68
|
+
readonly TfCheckbox: typeof TfCheckbox;
|
|
69
|
+
}, {
|
|
70
|
+
readonly Button: typeof Button;
|
|
71
|
+
}>;
|
|
72
|
+
fields: TFields;
|
|
73
|
+
}>) => ReturnType<import('react').FunctionComponent>;
|
|
74
|
+
export { formOptions, revalidateLogic };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createFormHook as o
|
|
1
|
+
import{createFormHook as o}from"@tanstack/react-form";import{formOptions as y,revalidateLogic as z}from"@tanstack/react-form";import{Button as r}from"../components/button.js";import{TfCheckbox as t}from"../components/checkbox.js";import{TfMultiSelect as m}from"../components/multi-select.js";import{TfNumberField as i}from"../components/numberfield.js";import{TfSingleSelect as p}from"../components/select.js";import{TfTextField as e}from"../components/textfield.js";import{formContext as f,fieldContext as l}from"./form-context.js";import"react/jsx-runtime";import"class-variance-authority";import"react-aria-components";import"./theme.js";import"clsx";import"../components/loader.js";import"../components/icons.js";import"react";import"../components/form.js";import"../components/menu.js";import"../components/list-box.js";import"./form.js";import"../components/popover.js";import"../components/kbd.js";const{useAppForm:M,withForm:N,withFieldGroup:O}=o({fieldComponents:{TfTextField:e,TfNumberField:i,TfMultiSelect:m,TfSingleSelect:p,TfCheckbox:t},formComponents:{Button:r},fieldContext:l,formContext:f});export{y as formOptions,z as revalidateLogic,M as useAppForm,O as withFieldGroup,N as withForm};
|
|
2
2
|
//# sourceMappingURL=form-hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-hook.js","sources":["../../lib/utilities/form-hook.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"form-hook.js","sources":["../../lib/utilities/form-hook.tsx"],"sourcesContent":["import { createFormHook, formOptions, revalidateLogic } from '@tanstack/react-form';\nimport { Button } from '../components/button';\nimport { TfCheckbox } from '../components/checkbox';\nimport { TfMultiSelect } from '../components/multi-select';\nimport { TfNumberField } from '../components/numberfield';\nimport { TfSingleSelect } from '../components/select';\nimport { TfTextField } from '../components/textfield';\nimport { fieldContext, formContext } from '../utilities/form-context';\n\n/** Don't put this in the same file as form-context.tsx, this causes circular dependencies. */\n/** TODO, lazy loading when fieldComponents are large */\n/**\n * Builder for form logic and user interfaces\n */\n/**\n * A small builder that wires the form library to the concrete UI components used across the app.\n * `createFormHook` returns a `useAppForm` hook which contains standard wiring and default components for\n * fields and form-level controls.\n *\n * It exports only the `useAppForm` hook. Consumers (forms in codebase) call `useAppForm` to access the form API and default components.\n */\nexport const { useAppForm, withForm, withFieldGroup } = createFormHook({\n fieldComponents: {\n TfTextField,\n TfNumberField,\n TfMultiSelect,\n TfSingleSelect,\n TfCheckbox,\n },\n formComponents: {\n Button,\n },\n fieldContext,\n formContext,\n});\n\nexport { formOptions, revalidateLogic };\n"],"names":["useAppForm","withForm","withFieldGroup","createFormHook","TfTextField","TfNumberField","TfMultiSelect","TfSingleSelect","TfCheckbox","Button","fieldContext","formContext"],"mappings":"y4BAqBO,KAAM,CAAE,WAAAA,EAAY,SAAAC,EAAU,eAAAC,CAAA,EAAmBC,EAAe,CACnE,gBAAiB,CACb,YAAAC,EACA,cAAAC,EACA,cAAAC,EACA,eAAAC,EACA,WAAAC,CAAA,EAEJ,eAAgB,CACZ,OAAAC,CAAA,EAEJ,aAAAC,EACA,YAAAC,CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptlex/web-components",
|
|
3
|
-
"version": "6.6.6-
|
|
3
|
+
"version": "6.6.6-alpha66",
|
|
4
4
|
"description": "React component library for Cryptlex web applications",
|
|
5
5
|
"author": "Cryptlex",
|
|
6
6
|
"type": "module",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"*.{ts,tsx,css,scss,json}": "prettier --write"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@cryptlex/web-api-types": "2.
|
|
51
|
+
"@cryptlex/web-api-types": "2.105.0",
|
|
52
52
|
"@dnd-kit/core": "6.3.1",
|
|
53
53
|
"@dnd-kit/sortable": "10.0.0",
|
|
54
54
|
"@dnd-kit/utilities": "3.2.2",
|