@algorithm-shift/design-system 1.2.41 → 1.2.43

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.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1 from 'react';
3
3
  import { z } from 'zod';
4
+ import { UseFormReturn } from 'react-hook-form';
4
5
  import { ClassValue } from 'clsx';
5
6
 
6
7
  interface ElementProps {
@@ -32,7 +33,6 @@ type InputProperties = {
32
33
  label?: string;
33
34
  text?: string;
34
35
  hasFormContainer?: boolean;
35
- validateOnMount?: boolean;
36
36
  defaultValue?: string | boolean;
37
37
  onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
38
38
  };
@@ -296,7 +296,7 @@ type CanvasAction = {
296
296
  };
297
297
  declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
298
298
 
299
- interface FormWrapperProps<T extends z.ZodObject<any>> {
299
+ interface FormProps<T extends z.ZodObject<any>> {
300
300
  validation?: any[];
301
301
  formName?: string;
302
302
  defaultValues?: Partial<z.infer<T>> | any;
@@ -304,9 +304,19 @@ interface FormWrapperProps<T extends z.ZodObject<any>> {
304
304
  onSubmit?: (data: z.infer<T>) => void;
305
305
  onReset?: () => void;
306
306
  }
307
+ declare const Form: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormProps<T>) => react_jsx_runtime.JSX.Element;
308
+
309
+ interface FormWrapperProps<T extends z.ZodObject<any>> {
310
+ validation?: any[];
311
+ formName?: string;
312
+ defaultValues?: Partial<z.infer<T>> | any;
313
+ children?: React$1.ReactNode | ((form: UseFormReturn<z.infer<T>>) => React$1.ReactNode);
314
+ onSubmit?: (data: z.infer<T>) => void;
315
+ onReset?: () => void;
316
+ }
307
317
  declare const FormWrapper: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
308
318
 
309
319
  declare function cn(...inputs: ClassValue[]): string;
310
320
  declare function getInitials(name: string): string;
311
321
 
312
- export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, FormWrapper as Form, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, getInitials, showSonnerToast, stateReducer, useAppState };
322
+ export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Form, FormWrapper, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, getInitials, showSonnerToast, stateReducer, useAppState };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1 from 'react';
3
3
  import { z } from 'zod';
4
+ import { UseFormReturn } from 'react-hook-form';
4
5
  import { ClassValue } from 'clsx';
5
6
 
6
7
  interface ElementProps {
@@ -32,7 +33,6 @@ type InputProperties = {
32
33
  label?: string;
33
34
  text?: string;
34
35
  hasFormContainer?: boolean;
35
- validateOnMount?: boolean;
36
36
  defaultValue?: string | boolean;
37
37
  onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
38
38
  };
@@ -296,7 +296,7 @@ type CanvasAction = {
296
296
  };
297
297
  declare function stateReducer(state: CanvasState, action: CanvasAction): CanvasState;
298
298
 
299
- interface FormWrapperProps<T extends z.ZodObject<any>> {
299
+ interface FormProps<T extends z.ZodObject<any>> {
300
300
  validation?: any[];
301
301
  formName?: string;
302
302
  defaultValues?: Partial<z.infer<T>> | any;
@@ -304,9 +304,19 @@ interface FormWrapperProps<T extends z.ZodObject<any>> {
304
304
  onSubmit?: (data: z.infer<T>) => void;
305
305
  onReset?: () => void;
306
306
  }
307
+ declare const Form: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormProps<T>) => react_jsx_runtime.JSX.Element;
308
+
309
+ interface FormWrapperProps<T extends z.ZodObject<any>> {
310
+ validation?: any[];
311
+ formName?: string;
312
+ defaultValues?: Partial<z.infer<T>> | any;
313
+ children?: React$1.ReactNode | ((form: UseFormReturn<z.infer<T>>) => React$1.ReactNode);
314
+ onSubmit?: (data: z.infer<T>) => void;
315
+ onReset?: () => void;
316
+ }
307
317
  declare const FormWrapper: <T extends z.ZodObject<any>>({ validation, defaultValues, children, onSubmit, onReset, }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
308
318
 
309
319
  declare function cn(...inputs: ClassValue[]): string;
310
320
  declare function getInitials(name: string): string;
311
321
 
312
- export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, FormWrapper as Form, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, getInitials, showSonnerToast, stateReducer, useAppState };
322
+ export { ChartComponent as BarChart, Breadcrumb, ButtonWrapper as Button, SplitButton as ButtonGroup, CheckboxInput as Checkbox, Container, DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Form, FormWrapper, Grid as GridLayout, ImageControl as Image, Modal, MultiCheckbox, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, DonutChart as PieChart, RadioInput as RadioGroup, RichText, SearchInput as Search, Shape, Spacer, StagesComponent as Stages, StateProvider, SwitchToggle, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Typography, UrlInput as URL, cn, getInitials, showSonnerToast, stateReducer, useAppState };