@underverse-ui/underverse 0.1.7 → 0.1.11

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
@@ -3,6 +3,8 @@ import React__default, { InputHTMLAttributes, TextareaHTMLAttributes, ReactNode,
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
6
+ import * as react_hook_form from 'react-hook-form';
7
+ import { FieldValues, SubmitHandler, FieldPath, ControllerProps } from 'react-hook-form';
6
8
  import { ClassValue } from 'clsx';
7
9
 
8
10
  declare const VARIANT_STYLES_BTN: {
@@ -156,6 +158,24 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>
156
158
  maxLength?: number;
157
159
  }
158
160
  declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
161
+ interface PasswordInputProps extends Omit<InputProps, 'type'> {
162
+ showStrength?: boolean;
163
+ strengthLabels?: string[];
164
+ }
165
+ declare const PasswordInput: React__default.ForwardRefExoticComponent<PasswordInputProps & React__default.RefAttributes<HTMLInputElement>>;
166
+ interface NumberInputProps extends Omit<InputProps, 'type' | 'value' | 'onChange'> {
167
+ min?: number;
168
+ max?: number;
169
+ step?: number;
170
+ showSteppers?: boolean;
171
+ onIncrement?: () => void;
172
+ onDecrement?: () => void;
173
+ formatThousands?: boolean;
174
+ locale?: string;
175
+ value?: number | string;
176
+ onChange?: React__default.ChangeEventHandler<HTMLInputElement>;
177
+ }
178
+ declare const NumberInput: React__default.ForwardRefExoticComponent<NumberInputProps & React__default.RefAttributes<HTMLInputElement>>;
159
179
 
160
180
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
161
181
  label?: string;
@@ -482,6 +502,28 @@ interface PaginationProps {
482
502
  };
483
503
  }
484
504
  declare const Pagination: React$1.FC<PaginationProps>;
505
+ interface SimplePaginationProps {
506
+ page: number;
507
+ totalPages: number;
508
+ onChange: (page: number) => void;
509
+ className?: string;
510
+ size?: "sm" | "md" | "lg";
511
+ variant?: "default" | "outline" | "ghost";
512
+ disabled?: boolean;
513
+ showInfo?: boolean;
514
+ totalItems?: number;
515
+ pageSize?: number;
516
+ }
517
+ declare const SimplePagination: React$1.FC<SimplePaginationProps>;
518
+ interface CompactPaginationProps {
519
+ page: number;
520
+ totalPages: number;
521
+ onChange: (page: number) => void;
522
+ className?: string;
523
+ variant?: "default" | "outline" | "ghost";
524
+ disabled?: boolean;
525
+ }
526
+ declare const CompactPagination: React$1.FC<CompactPaginationProps>;
485
527
 
486
528
  interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
487
529
  children: React__default.ReactNode;
@@ -512,6 +554,13 @@ interface DatePickerProps {
512
554
  weekdayLabels?: string[];
513
555
  }
514
556
  declare const DatePicker: React$1.FC<DatePickerProps>;
557
+ declare const DateRangePicker: React$1.FC<{
558
+ startDate?: Date;
559
+ endDate?: Date;
560
+ onChange: (start: Date, end: Date) => void;
561
+ placeholder?: string;
562
+ className?: string;
563
+ }>;
515
564
 
516
565
  type ComboboxOption = string | {
517
566
  label: string;
@@ -764,6 +813,44 @@ declare const TableHead: React__default.ForwardRefExoticComponent<React__default
764
813
  declare const TableCell: React__default.ForwardRefExoticComponent<React__default.TdHTMLAttributes<HTMLTableCellElement> & React__default.RefAttributes<HTMLTableCellElement>>;
765
814
  declare const TableCaption: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLTableCaptionElement> & React__default.RefAttributes<HTMLTableCaptionElement>>;
766
815
 
816
+ interface FormWrapperProps<T extends FieldValues = FieldValues> {
817
+ children: React$1.ReactNode;
818
+ onSubmit: SubmitHandler<T>;
819
+ initialValues?: Partial<T>;
820
+ validationSchema?: Record<string, any>;
821
+ className?: string;
822
+ size?: "sm" | "md" | "lg";
823
+ }
824
+ declare const Form: <T extends FieldValues = FieldValues>({ children, onSubmit, initialValues, validationSchema, className, size, ...props }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
825
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
826
+ declare const useFormField: () => {
827
+ invalid: boolean;
828
+ isDirty: boolean;
829
+ isTouched: boolean;
830
+ isValidating: boolean;
831
+ error?: react_hook_form.FieldError;
832
+ id: string;
833
+ name: string;
834
+ formItemId: string;
835
+ formDescriptionId: string;
836
+ formMessageId: string;
837
+ };
838
+ declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
839
+ declare const FormLabel: React$1.ForwardRefExoticComponent<React$1.LabelHTMLAttributes<HTMLLabelElement> & React$1.RefAttributes<HTMLLabelElement>>;
840
+ declare const FormControl: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
841
+ declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
842
+ declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
843
+ declare const FormInput: React$1.ForwardRefExoticComponent<Omit<InputProps & React$1.RefAttributes<HTMLInputElement> & {
844
+ name: string;
845
+ }, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
846
+ declare const FormCheckbox: React$1.ForwardRefExoticComponent<Omit<CheckboxProps & React$1.RefAttributes<HTMLInputElement> & {
847
+ name: string;
848
+ }, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
849
+ declare const FormActions: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
850
+ declare const FormSubmitButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps & React$1.RefAttributes<HTMLButtonElement> & {
851
+ loading?: boolean;
852
+ }, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
853
+
767
854
  interface NotificationItem {
768
855
  id: number;
769
856
  title?: string;
@@ -1154,4 +1241,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
1154
1241
  };
1155
1242
  };
1156
1243
 
1157
- export { AccessDenied, Alert, Avatar, Badge, Badge as BadgeBase, BottomSheet, Breadcrumb, Button, ButtonLoading, Card, Carousel, CategoryTreeSelect, Checkbox, ClientOnly, Combobox, DataTable, DatePicker, date as DateUtils, Drawer, DropdownMenu, FloatingContacts, GlobalLoading, GradientBadge, ImageUpload, InlineLoading, Input, InteractiveBadge, Label, LoadingBar, LoadingDots, LoadingSpinner, Modal, MultiCombobox, NotificationBadge, NotificationModal, PageLoading, Pagination, PillTabs, Popover, Progress, PulseBadge, RadioGroup, SIZE_STYLES_BTN, ScrollArea, Section, Sheet, SidebarSheet, SimpleTabs, Skeleton, SlideOver, Slider, SmartImage, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, Textarea, ToastProvider, Tooltip, type UnderverseLocale, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, cn, getUnderverseMessages, underverseMessages, useToast };
1244
+ export { AccessDenied, Alert, Avatar, Badge, Badge as BadgeBase, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, ClientOnly, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableQuery, DatePicker, type DatePickerProps, DateRangePicker, date as DateUtils, Drawer, DropdownMenu, FloatingContacts, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GlobalLoading, GradientBadge, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, LoadingBar, LoadingDots, LoadingSpinner, Modal, MultiCombobox, type MultiComboboxProps, NotificationBadge, NotificationModal, NumberInput, PageLoading, Pagination, type PaginationProps, PasswordInput, PillTabs, Popover, Progress, PulseBadge, RadioGroup, SIZE_STYLES_BTN, ScrollArea, Section, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SlideOver, Slider, SmartImage, type Sorter, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, Textarea, ToastProvider, Tooltip, type UnderverseLocale, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, cn, getUnderverseMessages, underverseMessages, useFormField, useToast };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import React__default, { InputHTMLAttributes, TextareaHTMLAttributes, ReactNode,
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
6
+ import * as react_hook_form from 'react-hook-form';
7
+ import { FieldValues, SubmitHandler, FieldPath, ControllerProps } from 'react-hook-form';
6
8
  import { ClassValue } from 'clsx';
7
9
 
8
10
  declare const VARIANT_STYLES_BTN: {
@@ -156,6 +158,24 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>
156
158
  maxLength?: number;
157
159
  }
158
160
  declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
161
+ interface PasswordInputProps extends Omit<InputProps, 'type'> {
162
+ showStrength?: boolean;
163
+ strengthLabels?: string[];
164
+ }
165
+ declare const PasswordInput: React__default.ForwardRefExoticComponent<PasswordInputProps & React__default.RefAttributes<HTMLInputElement>>;
166
+ interface NumberInputProps extends Omit<InputProps, 'type' | 'value' | 'onChange'> {
167
+ min?: number;
168
+ max?: number;
169
+ step?: number;
170
+ showSteppers?: boolean;
171
+ onIncrement?: () => void;
172
+ onDecrement?: () => void;
173
+ formatThousands?: boolean;
174
+ locale?: string;
175
+ value?: number | string;
176
+ onChange?: React__default.ChangeEventHandler<HTMLInputElement>;
177
+ }
178
+ declare const NumberInput: React__default.ForwardRefExoticComponent<NumberInputProps & React__default.RefAttributes<HTMLInputElement>>;
159
179
 
160
180
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
161
181
  label?: string;
@@ -482,6 +502,28 @@ interface PaginationProps {
482
502
  };
483
503
  }
484
504
  declare const Pagination: React$1.FC<PaginationProps>;
505
+ interface SimplePaginationProps {
506
+ page: number;
507
+ totalPages: number;
508
+ onChange: (page: number) => void;
509
+ className?: string;
510
+ size?: "sm" | "md" | "lg";
511
+ variant?: "default" | "outline" | "ghost";
512
+ disabled?: boolean;
513
+ showInfo?: boolean;
514
+ totalItems?: number;
515
+ pageSize?: number;
516
+ }
517
+ declare const SimplePagination: React$1.FC<SimplePaginationProps>;
518
+ interface CompactPaginationProps {
519
+ page: number;
520
+ totalPages: number;
521
+ onChange: (page: number) => void;
522
+ className?: string;
523
+ variant?: "default" | "outline" | "ghost";
524
+ disabled?: boolean;
525
+ }
526
+ declare const CompactPagination: React$1.FC<CompactPaginationProps>;
485
527
 
486
528
  interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
487
529
  children: React__default.ReactNode;
@@ -512,6 +554,13 @@ interface DatePickerProps {
512
554
  weekdayLabels?: string[];
513
555
  }
514
556
  declare const DatePicker: React$1.FC<DatePickerProps>;
557
+ declare const DateRangePicker: React$1.FC<{
558
+ startDate?: Date;
559
+ endDate?: Date;
560
+ onChange: (start: Date, end: Date) => void;
561
+ placeholder?: string;
562
+ className?: string;
563
+ }>;
515
564
 
516
565
  type ComboboxOption = string | {
517
566
  label: string;
@@ -764,6 +813,44 @@ declare const TableHead: React__default.ForwardRefExoticComponent<React__default
764
813
  declare const TableCell: React__default.ForwardRefExoticComponent<React__default.TdHTMLAttributes<HTMLTableCellElement> & React__default.RefAttributes<HTMLTableCellElement>>;
765
814
  declare const TableCaption: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLTableCaptionElement> & React__default.RefAttributes<HTMLTableCaptionElement>>;
766
815
 
816
+ interface FormWrapperProps<T extends FieldValues = FieldValues> {
817
+ children: React$1.ReactNode;
818
+ onSubmit: SubmitHandler<T>;
819
+ initialValues?: Partial<T>;
820
+ validationSchema?: Record<string, any>;
821
+ className?: string;
822
+ size?: "sm" | "md" | "lg";
823
+ }
824
+ declare const Form: <T extends FieldValues = FieldValues>({ children, onSubmit, initialValues, validationSchema, className, size, ...props }: FormWrapperProps<T>) => react_jsx_runtime.JSX.Element;
825
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
826
+ declare const useFormField: () => {
827
+ invalid: boolean;
828
+ isDirty: boolean;
829
+ isTouched: boolean;
830
+ isValidating: boolean;
831
+ error?: react_hook_form.FieldError;
832
+ id: string;
833
+ name: string;
834
+ formItemId: string;
835
+ formDescriptionId: string;
836
+ formMessageId: string;
837
+ };
838
+ declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
839
+ declare const FormLabel: React$1.ForwardRefExoticComponent<React$1.LabelHTMLAttributes<HTMLLabelElement> & React$1.RefAttributes<HTMLLabelElement>>;
840
+ declare const FormControl: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
841
+ declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
842
+ declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
843
+ declare const FormInput: React$1.ForwardRefExoticComponent<Omit<InputProps & React$1.RefAttributes<HTMLInputElement> & {
844
+ name: string;
845
+ }, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
846
+ declare const FormCheckbox: React$1.ForwardRefExoticComponent<Omit<CheckboxProps & React$1.RefAttributes<HTMLInputElement> & {
847
+ name: string;
848
+ }, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
849
+ declare const FormActions: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
850
+ declare const FormSubmitButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps & React$1.RefAttributes<HTMLButtonElement> & {
851
+ loading?: boolean;
852
+ }, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
853
+
767
854
  interface NotificationItem {
768
855
  id: number;
769
856
  title?: string;
@@ -1154,4 +1241,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
1154
1241
  };
1155
1242
  };
1156
1243
 
1157
- export { AccessDenied, Alert, Avatar, Badge, Badge as BadgeBase, BottomSheet, Breadcrumb, Button, ButtonLoading, Card, Carousel, CategoryTreeSelect, Checkbox, ClientOnly, Combobox, DataTable, DatePicker, date as DateUtils, Drawer, DropdownMenu, FloatingContacts, GlobalLoading, GradientBadge, ImageUpload, InlineLoading, Input, InteractiveBadge, Label, LoadingBar, LoadingDots, LoadingSpinner, Modal, MultiCombobox, NotificationBadge, NotificationModal, PageLoading, Pagination, PillTabs, Popover, Progress, PulseBadge, RadioGroup, SIZE_STYLES_BTN, ScrollArea, Section, Sheet, SidebarSheet, SimpleTabs, Skeleton, SlideOver, Slider, SmartImage, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, Textarea, ToastProvider, Tooltip, type UnderverseLocale, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, cn, getUnderverseMessages, underverseMessages, useToast };
1244
+ export { AccessDenied, Alert, Avatar, Badge, Badge as BadgeBase, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, ClientOnly, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableQuery, DatePicker, type DatePickerProps, DateRangePicker, date as DateUtils, Drawer, DropdownMenu, FloatingContacts, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GlobalLoading, GradientBadge, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, LoadingBar, LoadingDots, LoadingSpinner, Modal, MultiCombobox, type MultiComboboxProps, NotificationBadge, NotificationModal, NumberInput, PageLoading, Pagination, type PaginationProps, PasswordInput, PillTabs, Popover, Progress, PulseBadge, RadioGroup, SIZE_STYLES_BTN, ScrollArea, Section, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SlideOver, Slider, SmartImage, type Sorter, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, Textarea, ToastProvider, Tooltip, type UnderverseLocale, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, cn, getUnderverseMessages, underverseMessages, useFormField, useToast };