@delightui/components 0.1.162-alpha.0 → 0.1.162-alpha.2

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/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,15 @@ 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
+ /** @deprecated Legacy prop for backwards compatibility - use message prop instead */
281
+ hasMessage?: boolean;
280
282
  };
281
283
  /**
282
284
  * Standalone FormField props (works without Form context)
283
285
  */
284
- type StandaloneFieldProps<TValue = FieldValue> = {
286
+ type StandaloneFieldProps<TValue = FieldValue> = Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'children' | 'onChange'> & {
285
287
  /** Field name */
286
288
  name: string;
287
289
  /** Field label */
@@ -308,8 +310,10 @@ type StandaloneFieldProps<TValue = FieldValue> = {
308
310
  disabled?: boolean;
309
311
  /** Info icon element */
310
312
  infoIcon?: ReactNode;
311
- /** Field ID */
313
+ /** Field ID - for the input element */
312
314
  id?: string;
315
+ /** @deprecated Legacy prop for backwards compatibility - use message prop instead */
316
+ hasMessage?: boolean;
313
317
  };
314
318
 
315
319
  /**
@@ -1793,11 +1797,10 @@ type FormSubmitHandler<TFormValues extends FieldValues = FieldValues> = (values:
1793
1797
  /**
1794
1798
  * Form component props
1795
1799
  */
1796
- type FormProps<TFormValues extends FieldValues = FieldValues> = {
1797
- children: ReactNode;
1800
+ type FormProps<TFormValues extends FieldValues = FieldValues> = Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'ref'> & {
1798
1801
  /** Initial form values (uncontrolled mode) */
1799
1802
  defaultValues?: UseFormProps<TFormValues>['defaultValues'];
1800
- /** Form submission handler */
1803
+ /** Form submission handler - receives typed form values */
1801
1804
  onSubmit?: FormSubmitHandler<TFormValues>;
1802
1805
  /** Enable autosave functionality */
1803
1806
  autosave?: boolean;
@@ -1807,9 +1810,7 @@ type FormProps<TFormValues extends FieldValues = FieldValues> = {
1807
1810
  mode?: UseFormProps<TFormValues>['mode'];
1808
1811
  /** Additional RHF options */
1809
1812
  formOptions?: Omit<UseFormProps<TFormValues>, 'defaultValues' | 'mode'>;
1810
- /** Form HTML attributes */
1811
- className?: string;
1812
- style?: React.CSSProperties;
1813
+ /** Ref to the form element */
1813
1814
  formRef?: React.Ref<HTMLFormElement>;
1814
1815
  };
1815
1816
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.162-alpha.0",
3
+ "version": "0.1.162-alpha.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",