@invana/forms 0.0.13 → 0.0.14

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.cts CHANGED
@@ -1,6 +1,4 @@
1
1
  import * as React$1 from 'react';
2
- import * as _radix_ui_react_slot from '@radix-ui/react-slot';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
2
  import * as react_hook_form from 'react-hook-form';
5
3
  import { FieldValues, FieldPath, ControllerProps, Control, UseFormReturn } from 'react-hook-form';
6
4
  export { Control, DefaultValues, FieldValues, Mode, SubmitHandler, UseFormReturn } from 'react-hook-form';
@@ -14,8 +12,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
14
12
  import { VariantProps } from 'class-variance-authority';
15
13
  import { Button } from '@invana/ui';
16
14
 
17
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
18
- declare const FormField$1: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
15
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
16
+ declare const FormField$1: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React$1.JSX.Element;
19
17
  declare const useFormField: () => {
20
18
  invalid: boolean;
21
19
  isDirty: boolean;
@@ -30,7 +28,9 @@ declare const useFormField: () => {
30
28
  };
31
29
  declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
32
30
  declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
33
- declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
31
+ declare const FormControl: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLElement> & {
32
+ children?: React$1.ReactNode;
33
+ } & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
34
34
  declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
35
35
  declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
36
36
 
@@ -269,7 +269,7 @@ interface SettingsPanelProps extends Omit<ObjectFieldProps, 'control'> {
269
269
  * All {@link ObjectFieldProps} (`name`, `fields`, `rowConfig`, `labelPosition`,
270
270
  * `size`, `columns`) are forwarded to the underlying `ObjectField`.
271
271
  */
272
- declare function SettingsPanel({ form, title, className, contentClassName, children, ...objectField }: SettingsPanelProps): react_jsx_runtime.JSX.Element;
272
+ declare function SettingsPanel({ form, title, className, contentClassName, children, ...objectField }: SettingsPanelProps): React$1.JSX.Element;
273
273
 
274
274
  interface ColorSwatchesProps {
275
275
  value?: string;
@@ -337,35 +337,35 @@ declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.Sli
337
337
 
338
338
  declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
339
339
 
340
- declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): react_jsx_runtime.JSX.Element;
340
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React$1.JSX.Element;
341
341
  declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
342
342
  variant?: "legend" | "label";
343
- }): react_jsx_runtime.JSX.Element;
344
- declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
345
- declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
346
- declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): react_jsx_runtime.JSX.Element;
347
- declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
348
- declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
343
+ }): React$1.JSX.Element;
344
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
345
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
346
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React$1.JSX.Element;
347
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
348
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
349
349
  declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
350
350
  children?: React.ReactNode;
351
- }): react_jsx_runtime.JSX.Element;
351
+ }): React$1.JSX.Element;
352
352
  declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
353
353
  errors?: Array<{
354
354
  message?: string;
355
355
  } | undefined>;
356
- }): react_jsx_runtime.JSX.Element | null;
356
+ }): React$1.JSX.Element | null;
357
357
 
358
- declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
358
+ declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
359
359
  declare const inputGroupAddonVariants: (props?: ({
360
360
  align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
361
361
  } & class_variance_authority_types.ClassProp) | undefined) => string;
362
- declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
362
+ declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React$1.JSX.Element;
363
363
  declare const inputGroupButtonVariants: (props?: ({
364
364
  size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
365
365
  } & class_variance_authority_types.ClassProp) | undefined) => string;
366
- declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
367
- declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
368
- declare function InputGroupInput({ className, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
369
- declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
366
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React$1.JSX.Element;
367
+ declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
368
+ declare function InputGroupInput({ className, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
369
+ declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): React$1.JSX.Element;
370
370
 
371
371
  export { type BooleanControl, BooleanField, Checkbox, CheckboxGroupField, ColorField, type ColorPreset, ColorSwatches, Field, type FieldBadge, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, type FieldSize, FieldTitle, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GroupConfig, IconField, IconInput, Input, InputField, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LabelPosition, NumberField, ObjectField, type ObjectFieldProps, PasswordField, PasswordInput, type PasswordInputProps, RadioField, RadioGroup, RadioGroupItem, type RowConfig, Select, SelectContent, SelectField, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SettingsPanel, type SettingsPanelProps, Slider, SliderNumber, Switch, Textarea, TextareaField, useFormField };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import * as React$1 from 'react';
2
- import * as _radix_ui_react_slot from '@radix-ui/react-slot';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
2
  import * as react_hook_form from 'react-hook-form';
5
3
  import { FieldValues, FieldPath, ControllerProps, Control, UseFormReturn } from 'react-hook-form';
6
4
  export { Control, DefaultValues, FieldValues, Mode, SubmitHandler, UseFormReturn } from 'react-hook-form';
@@ -14,8 +12,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
14
12
  import { VariantProps } from 'class-variance-authority';
15
13
  import { Button } from '@invana/ui';
16
14
 
17
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
18
- declare const FormField$1: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
15
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
16
+ declare const FormField$1: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React$1.JSX.Element;
19
17
  declare const useFormField: () => {
20
18
  invalid: boolean;
21
19
  isDirty: boolean;
@@ -30,7 +28,9 @@ declare const useFormField: () => {
30
28
  };
31
29
  declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
32
30
  declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
33
- declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
31
+ declare const FormControl: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLElement> & {
32
+ children?: React$1.ReactNode;
33
+ } & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
34
34
  declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
35
35
  declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
36
36
 
@@ -269,7 +269,7 @@ interface SettingsPanelProps extends Omit<ObjectFieldProps, 'control'> {
269
269
  * All {@link ObjectFieldProps} (`name`, `fields`, `rowConfig`, `labelPosition`,
270
270
  * `size`, `columns`) are forwarded to the underlying `ObjectField`.
271
271
  */
272
- declare function SettingsPanel({ form, title, className, contentClassName, children, ...objectField }: SettingsPanelProps): react_jsx_runtime.JSX.Element;
272
+ declare function SettingsPanel({ form, title, className, contentClassName, children, ...objectField }: SettingsPanelProps): React$1.JSX.Element;
273
273
 
274
274
  interface ColorSwatchesProps {
275
275
  value?: string;
@@ -337,35 +337,35 @@ declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.Sli
337
337
 
338
338
  declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
339
339
 
340
- declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): react_jsx_runtime.JSX.Element;
340
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React$1.JSX.Element;
341
341
  declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
342
342
  variant?: "legend" | "label";
343
- }): react_jsx_runtime.JSX.Element;
344
- declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
345
- declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
346
- declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): react_jsx_runtime.JSX.Element;
347
- declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
348
- declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
343
+ }): React$1.JSX.Element;
344
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
345
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
346
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React$1.JSX.Element;
347
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
348
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
349
349
  declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
350
350
  children?: React.ReactNode;
351
- }): react_jsx_runtime.JSX.Element;
351
+ }): React$1.JSX.Element;
352
352
  declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
353
353
  errors?: Array<{
354
354
  message?: string;
355
355
  } | undefined>;
356
- }): react_jsx_runtime.JSX.Element | null;
356
+ }): React$1.JSX.Element | null;
357
357
 
358
- declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
358
+ declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
359
359
  declare const inputGroupAddonVariants: (props?: ({
360
360
  align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
361
361
  } & class_variance_authority_types.ClassProp) | undefined) => string;
362
- declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
362
+ declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React$1.JSX.Element;
363
363
  declare const inputGroupButtonVariants: (props?: ({
364
364
  size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
365
365
  } & class_variance_authority_types.ClassProp) | undefined) => string;
366
- declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
367
- declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
368
- declare function InputGroupInput({ className, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
369
- declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
366
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React$1.JSX.Element;
367
+ declare function InputGroupText({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
368
+ declare function InputGroupInput({ className, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
369
+ declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<"textarea">): React$1.JSX.Element;
370
370
 
371
371
  export { type BooleanControl, BooleanField, Checkbox, CheckboxGroupField, ColorField, type ColorPreset, ColorSwatches, Field, type FieldBadge, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, type FieldSize, FieldTitle, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GroupConfig, IconField, IconInput, Input, InputField, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LabelPosition, NumberField, ObjectField, type ObjectFieldProps, PasswordField, PasswordInput, type PasswordInputProps, RadioField, RadioGroup, RadioGroupItem, type RowConfig, Select, SelectContent, SelectField, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SettingsPanel, type SettingsPanelProps, Slider, SliderNumber, Switch, Textarea, TextareaField, useFormField };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invana/forms",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Invana Design System - Composable form building blocks (FormField + ObjectField + leaf inputs)",
5
5
  "homepage": "https://github.com/invana/design-kit#readme",
6
6
  "type": "module",
@@ -43,30 +43,30 @@
43
43
  "react": "^18 || ^19",
44
44
  "react-dom": "^18 || ^19",
45
45
  "react-hook-form": "^7",
46
- "@invana/ui": "0.0.13",
47
- "@invana/styling": "0.0.13"
46
+ "@invana/ui": "0.0.14",
47
+ "@invana/styling": "0.0.14"
48
48
  },
49
49
  "dependencies": {
50
- "@radix-ui/react-checkbox": "^1.3.3",
51
- "@radix-ui/react-label": "^2.1.8",
52
- "@radix-ui/react-radio-group": "^1.3.8",
53
- "@radix-ui/react-select": "^2.2.6",
54
- "@radix-ui/react-slider": "^1.3.6",
55
- "@radix-ui/react-slot": "^1.2.4",
56
- "@radix-ui/react-switch": "^1.2.6",
50
+ "@radix-ui/react-checkbox": "^1.3.7",
51
+ "@radix-ui/react-label": "^2.1.11",
52
+ "@radix-ui/react-radio-group": "^1.4.3",
53
+ "@radix-ui/react-select": "^2.3.3",
54
+ "@radix-ui/react-slider": "^1.4.3",
55
+ "@radix-ui/react-slot": "^1.3.0",
56
+ "@radix-ui/react-switch": "^1.3.3",
57
57
  "class-variance-authority": "^0.7.1",
58
- "lucide-react": "^0.562.0"
58
+ "lucide-react": "^1.24.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/react": "^19.2.5",
61
+ "@types/react": "^19.2.17",
62
62
  "@types/react-dom": "^19.2.3",
63
- "react": "^19.2.0",
64
- "react-dom": "^19.2.0",
65
- "react-hook-form": "^7.69.0",
66
- "tsup": "^8.3.5",
63
+ "react": "^19.2.7",
64
+ "react-dom": "^19.2.7",
65
+ "react-hook-form": "^7.81.0",
66
+ "tsup": "^8.5.1",
67
67
  "typescript": "~5.9.3",
68
- "@invana/styling": "0.0.13",
69
- "@invana/ui": "0.0.13"
68
+ "@invana/styling": "0.0.14",
69
+ "@invana/ui": "0.0.14"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "tsup",