@texturehq/edges 5.0.1 → 5.1.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/{TimeField-rRIt80g3.d.ts → TimeField-DVuYVoDw.d.ts} +88 -1
- package/dist/{TimeField-CJUNJDQT.d.cts → TimeField-DsHO9pLs.d.cts} +88 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +2 -2
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.d.cts +22 -3
- package/dist/rhf/index.d.ts +22 -3
- package/dist/rhf/index.js +2 -2
- package/dist/rhf/index.js.map +1 -1
- package/dist/styles.css +14 -0
- package/package.json +1 -1
package/dist/rhf/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FieldValues, FieldPath, Path, UseFormProps, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';
|
|
1
|
+
import { FieldValues, FieldPath, FieldPathValue, Path, UseFormProps, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';
|
|
2
2
|
export { Controller, useFieldArray, useFormContext, useWatch } from 'react-hook-form';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { Key, DateValue } from 'react-aria-components';
|
|
6
|
-
import { A as Autocomplete, C as Checkbox, a as CheckboxGroup, b as ColorField, N as NumberField, R as RadioCardGroup,
|
|
6
|
+
import { A as Autocomplete, C as Checkbox, a as CheckboxGroup, b as ColorField, M as MultiSelect, c as MultiSelectOption, N as NumberField, R as RadioCardGroup, d as RadioGroup, S as Select, e as Switch, T as TextArea, f as TextField, g as TimeFieldProps, B as Button } from '../TimeField-DsHO9pLs.cjs';
|
|
7
7
|
import { a as DateField, b as FileUpload, c as RichTextEditor } from '../RichTextEditor-B_GaE_Yf.cjs';
|
|
8
8
|
import '@phosphor-icons/react';
|
|
9
9
|
|
|
@@ -45,6 +45,25 @@ interface FormFileUploadProps<T extends FieldValues> extends Omit<React.Componen
|
|
|
45
45
|
}
|
|
46
46
|
declare function FormFileUpload<T extends FieldValues>({ name, defaultValue, errorBelow, ...rest }: FormFileUploadProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Paths in `T` whose value is a string array. `MultiSelect` spreads its value, so a
|
|
50
|
+
* scalar path would turn a string into character-by-character selections and a
|
|
51
|
+
* non-iterable would throw — neither of which the old `FieldPath<T>` prevented.
|
|
52
|
+
*
|
|
53
|
+
* Built from `FieldPathValue` rather than RHF's own `FieldPathByValue`, which only
|
|
54
|
+
* exists from 7.35. This package declares `react-hook-form` at `^7.x`, so a consumer
|
|
55
|
+
* on an earlier 7 must still typecheck; `FieldPathValue` has been there since 7.0.
|
|
56
|
+
*/
|
|
57
|
+
type ArrayFieldPath<T extends FieldValues> = {
|
|
58
|
+
[K in FieldPath<T>]: FieldPathValue<T, K> extends string[] | undefined ? K : never;
|
|
59
|
+
}[FieldPath<T>];
|
|
60
|
+
interface FormMultiSelectProps<T extends FieldValues> extends Omit<React.ComponentProps<typeof MultiSelect>, "value" | "defaultValue" | "onChange" | "errorMessage" | "inputRef" | "options"> {
|
|
61
|
+
name: ArrayFieldPath<T>;
|
|
62
|
+
options: readonly MultiSelectOption[];
|
|
63
|
+
defaultValue?: string[];
|
|
64
|
+
}
|
|
65
|
+
declare function FormMultiSelect<T extends FieldValues>({ name, defaultValue, ...rest }: FormMultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
48
67
|
interface FormNumberFieldProps<T extends FieldValues> extends Omit<React.ComponentProps<typeof NumberField>, "value" | "defaultValue" | "onChange"> {
|
|
49
68
|
name: FieldPath<T>;
|
|
50
69
|
defaultValue?: number;
|
|
@@ -178,4 +197,4 @@ declare function useAutoSave<TValues extends Record<string, unknown>>({ delayMs,
|
|
|
178
197
|
|
|
179
198
|
declare function focusFirstError(formEl: HTMLFormElement): void;
|
|
180
199
|
|
|
181
|
-
export { ErrorSummary, type ErrorSummaryProps, FieldArrayList, type FieldArrayListProps, FormAutocomplete, type FormAutocompleteProps, FormCheckbox, FormCheckboxGroup, type FormCheckboxGroupProps, type FormCheckboxProps, FormColorField, type FormColorFieldProps, FormDateField, type FormDateFieldProps, FormFileUpload, type FormFileUploadProps, FormNumberField, type FormNumberFieldProps, FormProvider, type FormProviderProps, FormRadioCardGroup, type FormRadioCardGroupProps, FormRadioGroup, type FormRadioGroupProps, FormRichTextEditor, type FormRichTextEditorProps, FormSaveBar, type FormSaveBarProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextArea, type FormTextAreaProps, FormTextField, type FormTextFieldProps, FormTimeField, type FormTimeFieldProps, SubmitButton, type SubmitButtonProps, type UseAutoSaveOptions, focusFirstError, useAutoSave, useScrollIntoViewOnError };
|
|
200
|
+
export { ErrorSummary, type ErrorSummaryProps, FieldArrayList, type FieldArrayListProps, FormAutocomplete, type FormAutocompleteProps, FormCheckbox, FormCheckboxGroup, type FormCheckboxGroupProps, type FormCheckboxProps, FormColorField, type FormColorFieldProps, FormDateField, type FormDateFieldProps, FormFileUpload, type FormFileUploadProps, FormMultiSelect, type FormMultiSelectProps, FormNumberField, type FormNumberFieldProps, FormProvider, type FormProviderProps, FormRadioCardGroup, type FormRadioCardGroupProps, FormRadioGroup, type FormRadioGroupProps, FormRichTextEditor, type FormRichTextEditorProps, FormSaveBar, type FormSaveBarProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextArea, type FormTextAreaProps, FormTextField, type FormTextFieldProps, FormTimeField, type FormTimeFieldProps, SubmitButton, type SubmitButtonProps, type UseAutoSaveOptions, focusFirstError, useAutoSave, useScrollIntoViewOnError };
|
package/dist/rhf/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FieldValues, FieldPath, Path, UseFormProps, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';
|
|
1
|
+
import { FieldValues, FieldPath, FieldPathValue, Path, UseFormProps, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';
|
|
2
2
|
export { Controller, useFieldArray, useFormContext, useWatch } from 'react-hook-form';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { Key, DateValue } from 'react-aria-components';
|
|
6
|
-
import { A as Autocomplete, C as Checkbox, a as CheckboxGroup, b as ColorField, N as NumberField, R as RadioCardGroup,
|
|
6
|
+
import { A as Autocomplete, C as Checkbox, a as CheckboxGroup, b as ColorField, M as MultiSelect, c as MultiSelectOption, N as NumberField, R as RadioCardGroup, d as RadioGroup, S as Select, e as Switch, T as TextArea, f as TextField, g as TimeFieldProps, B as Button } from '../TimeField-DVuYVoDw.js';
|
|
7
7
|
import { a as DateField, b as FileUpload, c as RichTextEditor } from '../RichTextEditor-B_GaE_Yf.js';
|
|
8
8
|
import '@phosphor-icons/react';
|
|
9
9
|
|
|
@@ -45,6 +45,25 @@ interface FormFileUploadProps<T extends FieldValues> extends Omit<React.Componen
|
|
|
45
45
|
}
|
|
46
46
|
declare function FormFileUpload<T extends FieldValues>({ name, defaultValue, errorBelow, ...rest }: FormFileUploadProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Paths in `T` whose value is a string array. `MultiSelect` spreads its value, so a
|
|
50
|
+
* scalar path would turn a string into character-by-character selections and a
|
|
51
|
+
* non-iterable would throw — neither of which the old `FieldPath<T>` prevented.
|
|
52
|
+
*
|
|
53
|
+
* Built from `FieldPathValue` rather than RHF's own `FieldPathByValue`, which only
|
|
54
|
+
* exists from 7.35. This package declares `react-hook-form` at `^7.x`, so a consumer
|
|
55
|
+
* on an earlier 7 must still typecheck; `FieldPathValue` has been there since 7.0.
|
|
56
|
+
*/
|
|
57
|
+
type ArrayFieldPath<T extends FieldValues> = {
|
|
58
|
+
[K in FieldPath<T>]: FieldPathValue<T, K> extends string[] | undefined ? K : never;
|
|
59
|
+
}[FieldPath<T>];
|
|
60
|
+
interface FormMultiSelectProps<T extends FieldValues> extends Omit<React.ComponentProps<typeof MultiSelect>, "value" | "defaultValue" | "onChange" | "errorMessage" | "inputRef" | "options"> {
|
|
61
|
+
name: ArrayFieldPath<T>;
|
|
62
|
+
options: readonly MultiSelectOption[];
|
|
63
|
+
defaultValue?: string[];
|
|
64
|
+
}
|
|
65
|
+
declare function FormMultiSelect<T extends FieldValues>({ name, defaultValue, ...rest }: FormMultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
48
67
|
interface FormNumberFieldProps<T extends FieldValues> extends Omit<React.ComponentProps<typeof NumberField>, "value" | "defaultValue" | "onChange"> {
|
|
49
68
|
name: FieldPath<T>;
|
|
50
69
|
defaultValue?: number;
|
|
@@ -178,4 +197,4 @@ declare function useAutoSave<TValues extends Record<string, unknown>>({ delayMs,
|
|
|
178
197
|
|
|
179
198
|
declare function focusFirstError(formEl: HTMLFormElement): void;
|
|
180
199
|
|
|
181
|
-
export { ErrorSummary, type ErrorSummaryProps, FieldArrayList, type FieldArrayListProps, FormAutocomplete, type FormAutocompleteProps, FormCheckbox, FormCheckboxGroup, type FormCheckboxGroupProps, type FormCheckboxProps, FormColorField, type FormColorFieldProps, FormDateField, type FormDateFieldProps, FormFileUpload, type FormFileUploadProps, FormNumberField, type FormNumberFieldProps, FormProvider, type FormProviderProps, FormRadioCardGroup, type FormRadioCardGroupProps, FormRadioGroup, type FormRadioGroupProps, FormRichTextEditor, type FormRichTextEditorProps, FormSaveBar, type FormSaveBarProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextArea, type FormTextAreaProps, FormTextField, type FormTextFieldProps, FormTimeField, type FormTimeFieldProps, SubmitButton, type SubmitButtonProps, type UseAutoSaveOptions, focusFirstError, useAutoSave, useScrollIntoViewOnError };
|
|
200
|
+
export { ErrorSummary, type ErrorSummaryProps, FieldArrayList, type FieldArrayListProps, FormAutocomplete, type FormAutocompleteProps, FormCheckbox, FormCheckboxGroup, type FormCheckboxGroupProps, type FormCheckboxProps, FormColorField, type FormColorFieldProps, FormDateField, type FormDateFieldProps, FormFileUpload, type FormFileUploadProps, FormMultiSelect, type FormMultiSelectProps, FormNumberField, type FormNumberFieldProps, FormProvider, type FormProviderProps, FormRadioCardGroup, type FormRadioCardGroupProps, FormRadioGroup, type FormRadioGroupProps, FormRichTextEditor, type FormRichTextEditorProps, FormSaveBar, type FormSaveBarProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextArea, type FormTextAreaProps, FormTextField, type FormTextFieldProps, FormTimeField, type FormTimeFieldProps, SubmitButton, type SubmitButtonProps, type UseAutoSaveOptions, focusFirstError, useAutoSave, useScrollIntoViewOnError };
|