@delightui/components 0.1.162-alpha.0 → 0.1.162-alpha.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/cjs/components/molecules/FormField/FormField.presenter.d.ts +2 -0
- package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +5 -5
- package/dist/cjs/components/organisms/Form/Form.presenter.d.ts +272 -3
- package/dist/cjs/components/organisms/Form/Form.types.d.ts +4 -7
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/molecules/FormField/FormField.presenter.d.ts +2 -0
- package/dist/esm/components/molecules/FormField/FormField.types.d.ts +5 -5
- package/dist/esm/components/organisms/Form/Form.presenter.d.ts +272 -3
- package/dist/esm/components/organisms/Form/Form.types.d.ts +4 -7
- package/dist/esm/library.js +2 -2
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +8 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, InputHTMLAttributes, TextareaHTMLAttributes, ComponentType, LiHTMLAttributes, CSSProperties, TableHTMLAttributes, TdHTMLAttributes, ReactElement, AriaRole, KeyboardEventHandler, Ref } from 'react';
|
|
3
|
+
import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, InputHTMLAttributes, TextareaHTMLAttributes, ComponentType, LiHTMLAttributes, CSSProperties, FormHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ReactElement, AriaRole, KeyboardEventHandler, Ref } from 'react';
|
|
4
4
|
import { FieldValues, Path, PathValue, UseFormProps } from 'react-hook-form';
|
|
5
5
|
import { LinkProps } from 'react-router-dom';
|
|
6
6
|
import { Plugin } from 'flatpickr/dist/types/options';
|
|
@@ -247,7 +247,7 @@ type AsyncFieldValidationFunction<TValue = FieldValue> = (value: TValue) => Prom
|
|
|
247
247
|
/**
|
|
248
248
|
* FormField component props for use within a Form
|
|
249
249
|
*/
|
|
250
|
-
type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>> = {
|
|
250
|
+
type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>> = Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'children'> & {
|
|
251
251
|
/** Field name (must match form value key) - type-safe */
|
|
252
252
|
name: TName;
|
|
253
253
|
/** Field label */
|
|
@@ -275,13 +275,13 @@ type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extend
|
|
|
275
275
|
invalid?: boolean;
|
|
276
276
|
/** Info icon element */
|
|
277
277
|
infoIcon?: ReactNode;
|
|
278
|
-
/** Field ID */
|
|
278
|
+
/** Field ID - for the input element */
|
|
279
279
|
id?: string;
|
|
280
280
|
};
|
|
281
281
|
/**
|
|
282
282
|
* Standalone FormField props (works without Form context)
|
|
283
283
|
*/
|
|
284
|
-
type StandaloneFieldProps<TValue = FieldValue> = {
|
|
284
|
+
type StandaloneFieldProps<TValue = FieldValue> = Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'children' | 'onChange'> & {
|
|
285
285
|
/** Field name */
|
|
286
286
|
name: string;
|
|
287
287
|
/** Field label */
|
|
@@ -308,7 +308,7 @@ type StandaloneFieldProps<TValue = FieldValue> = {
|
|
|
308
308
|
disabled?: boolean;
|
|
309
309
|
/** Info icon element */
|
|
310
310
|
infoIcon?: ReactNode;
|
|
311
|
-
/** Field ID */
|
|
311
|
+
/** Field ID - for the input element */
|
|
312
312
|
id?: string;
|
|
313
313
|
};
|
|
314
314
|
|
|
@@ -1793,11 +1793,10 @@ type FormSubmitHandler<TFormValues extends FieldValues = FieldValues> = (values:
|
|
|
1793
1793
|
/**
|
|
1794
1794
|
* Form component props
|
|
1795
1795
|
*/
|
|
1796
|
-
type FormProps<TFormValues extends FieldValues = FieldValues> = {
|
|
1797
|
-
children: ReactNode;
|
|
1796
|
+
type FormProps<TFormValues extends FieldValues = FieldValues> = Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'ref'> & {
|
|
1798
1797
|
/** Initial form values (uncontrolled mode) */
|
|
1799
1798
|
defaultValues?: UseFormProps<TFormValues>['defaultValues'];
|
|
1800
|
-
/** Form submission handler */
|
|
1799
|
+
/** Form submission handler - receives typed form values */
|
|
1801
1800
|
onSubmit?: FormSubmitHandler<TFormValues>;
|
|
1802
1801
|
/** Enable autosave functionality */
|
|
1803
1802
|
autosave?: boolean;
|
|
@@ -1807,9 +1806,7 @@ type FormProps<TFormValues extends FieldValues = FieldValues> = {
|
|
|
1807
1806
|
mode?: UseFormProps<TFormValues>['mode'];
|
|
1808
1807
|
/** Additional RHF options */
|
|
1809
1808
|
formOptions?: Omit<UseFormProps<TFormValues>, 'defaultValues' | 'mode'>;
|
|
1810
|
-
/**
|
|
1811
|
-
className?: string;
|
|
1812
|
-
style?: React.CSSProperties;
|
|
1809
|
+
/** Ref to the form element */
|
|
1813
1810
|
formRef?: React.Ref<HTMLFormElement>;
|
|
1814
1811
|
};
|
|
1815
1812
|
/**
|