shadcn-ui-react 0.7.7 → 0.7.9
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/bin/shadcn-ui-react.mjs +1 -1
- package/dist/index.cjs +1542 -1160
- package/dist/index.d.cts +90 -56
- package/dist/index.d.ts +90 -56
- package/dist/index.js +1499 -1117
- package/dist/style.css +136 -22
- package/package.json +20 -19
package/dist/index.d.cts
CHANGED
|
@@ -18,9 +18,9 @@ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
|
18
18
|
import * as vaul from 'vaul';
|
|
19
19
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
20
20
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
21
|
-
import { FieldValues, UseFormReturn, SubmitHandler, SubmitErrorHandler, FieldPath, Control, RegisterOptions, FieldPathValue, FieldError } from 'react-hook-form';
|
|
22
21
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
23
22
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
23
|
+
import { FieldValues, FieldPath, RegisterOptions, FieldError, UseFormReturn, SubmitHandler, SubmitErrorHandler, Control, FieldPathValue } from 'react-hook-form';
|
|
24
24
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
25
25
|
import { LucideProps } from 'lucide-react';
|
|
26
26
|
import * as input_otp from 'input-otp';
|
|
@@ -195,9 +195,9 @@ declare const CarouselNext: React$1.ForwardRefExoticComponent<Omit<React$1.Butto
|
|
|
195
195
|
loaderClassName?: string;
|
|
196
196
|
} & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
197
197
|
|
|
198
|
-
type CheckboxSize =
|
|
199
|
-
type CheckboxVariant =
|
|
200
|
-
interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
|
|
198
|
+
type CheckboxSize = "sm" | "md" | "lg";
|
|
199
|
+
type CheckboxVariant = "default" | "outline" | "soft" | "success" | "destructive";
|
|
200
|
+
interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "size"> {
|
|
201
201
|
size?: CheckboxSize;
|
|
202
202
|
variant?: CheckboxVariant;
|
|
203
203
|
invalid?: boolean;
|
|
@@ -376,6 +376,68 @@ declare const DropdownMenuShortcut: {
|
|
|
376
376
|
displayName: string;
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
+
type SelectOption<TData = unknown> = {
|
|
380
|
+
value: string;
|
|
381
|
+
label: React$1.ReactNode;
|
|
382
|
+
disabled?: boolean;
|
|
383
|
+
data?: TData;
|
|
384
|
+
};
|
|
385
|
+
type FormInputVariantProps = "outline" | "soft" | "ghost" | "filled" | "flushed" | "unstyled" | "link";
|
|
386
|
+
declare const formInputVariants: Record<FormInputVariantProps, string>;
|
|
387
|
+
type InputVariant = keyof typeof formInputVariants;
|
|
388
|
+
type SizeProps$1 = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
389
|
+
type VariantProps = InputVariant;
|
|
390
|
+
type SizeClasses = {
|
|
391
|
+
control: string;
|
|
392
|
+
flushedControl: string;
|
|
393
|
+
linkControl: string;
|
|
394
|
+
selectItem: string;
|
|
395
|
+
searchInput: string;
|
|
396
|
+
checkbox: string;
|
|
397
|
+
label: string;
|
|
398
|
+
description: string;
|
|
399
|
+
message: string;
|
|
400
|
+
};
|
|
401
|
+
type CustomSize = Partial<SizeClasses>;
|
|
402
|
+
|
|
403
|
+
type FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
404
|
+
name: TName;
|
|
405
|
+
};
|
|
406
|
+
declare const FormFieldContext: React$1.Context<FormFieldContextValue<FieldValues, string> | null>;
|
|
407
|
+
type FieldRules$1<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled" | "size">;
|
|
408
|
+
declare function getErrorMessage(error?: FieldError): string | undefined;
|
|
409
|
+
declare function normalizeSearchText(value: React$1.ReactNode): string;
|
|
410
|
+
declare function getDefaultOptionValue<TItem>(item: TItem): string;
|
|
411
|
+
declare function getDefaultOptionLabel<TItem>(item: TItem): React$1.ReactNode;
|
|
412
|
+
declare function getNextEnabledIndex<TItem>(options: SelectOption<TItem>[], currentIndex: number, direction: 1 | -1): number;
|
|
413
|
+
type FormItemContextValue = {
|
|
414
|
+
id: string;
|
|
415
|
+
};
|
|
416
|
+
declare const FormItemContext: React$1.Context<FormItemContextValue | null>;
|
|
417
|
+
declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
418
|
+
declare const useFormField: () => {
|
|
419
|
+
id: string;
|
|
420
|
+
formItemId: string;
|
|
421
|
+
formDescriptionId: string;
|
|
422
|
+
formMessageId: string;
|
|
423
|
+
error: undefined;
|
|
424
|
+
} | {
|
|
425
|
+
invalid: boolean;
|
|
426
|
+
isDirty: boolean;
|
|
427
|
+
isTouched: boolean;
|
|
428
|
+
isValidating: boolean;
|
|
429
|
+
error?: FieldError;
|
|
430
|
+
id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
formItemId: string;
|
|
433
|
+
formDescriptionId: string;
|
|
434
|
+
formMessageId: string;
|
|
435
|
+
};
|
|
436
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
437
|
+
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
438
|
+
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
439
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
440
|
+
|
|
379
441
|
type FormProps<TFieldValues extends FieldValues> = {
|
|
380
442
|
children: React$1.ReactNode;
|
|
381
443
|
methods: UseFormReturn<TFieldValues>;
|
|
@@ -385,7 +447,7 @@ type FormProps<TFieldValues extends FieldValues> = {
|
|
|
385
447
|
};
|
|
386
448
|
declare function Form<TFieldValues extends FieldValues>({ children, methods, onSubmit, onError, formProps }: FormProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
387
449
|
|
|
388
|
-
type CheckboxRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>,
|
|
450
|
+
type CheckboxRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
389
451
|
type FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
|
|
390
452
|
name: TName;
|
|
391
453
|
control?: Control<TFieldValues>;
|
|
@@ -403,15 +465,16 @@ type FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath
|
|
|
403
465
|
messageClassName?: string;
|
|
404
466
|
requiredLabelClassName?: string;
|
|
405
467
|
onChange?: (checked: boolean) => void;
|
|
406
|
-
} & Omit<CheckboxProps,
|
|
468
|
+
} & Omit<CheckboxProps, "checked" | "defaultChecked" | "onCheckedChange">;
|
|
407
469
|
declare const FormCheckbox: {
|
|
408
470
|
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, rules, shouldUnregister, defaultValue, label, description, requiredLabel, className, itemClassName, checkboxClassName, labelClassName, descriptionClassName, messageClassName, requiredLabelClassName, onChange, ...checkboxProps }: FormCheckboxProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
409
471
|
displayName: string;
|
|
410
472
|
};
|
|
411
473
|
|
|
412
474
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
413
|
-
size?:
|
|
414
|
-
|
|
475
|
+
size?: SizeProps$1;
|
|
476
|
+
customSize?: CustomSize;
|
|
477
|
+
variant?: VariantProps;
|
|
415
478
|
leading?: React$1.ReactNode;
|
|
416
479
|
trailing?: React$1.ReactNode;
|
|
417
480
|
invalid?: boolean;
|
|
@@ -421,18 +484,6 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
421
484
|
}
|
|
422
485
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
423
486
|
|
|
424
|
-
type SelectOption<TData = unknown> = {
|
|
425
|
-
value: string;
|
|
426
|
-
label: React$1.ReactNode;
|
|
427
|
-
disabled?: boolean;
|
|
428
|
-
data?: TData;
|
|
429
|
-
};
|
|
430
|
-
type InputVariantProps = "outline" | "soft" | "ghost" | "filled" | "flushed" | "unstyled" | "link";
|
|
431
|
-
declare const inputVariants: Record<InputVariantProps, string>;
|
|
432
|
-
type InputVariant = keyof typeof inputVariants;
|
|
433
|
-
declare const variants: Record<InputVariant, string>;
|
|
434
|
-
type SizeProps$1 = "sm" | "md" | "lg";
|
|
435
|
-
type VariantProps = InputVariant;
|
|
436
487
|
type FieldRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled" | "size">;
|
|
437
488
|
type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
|
|
438
489
|
name: TName;
|
|
@@ -444,6 +495,7 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
|
|
|
444
495
|
requiredLabel?: boolean;
|
|
445
496
|
placeholder?: string;
|
|
446
497
|
size?: SizeProps$1;
|
|
498
|
+
customSize?: CustomSize;
|
|
447
499
|
variant?: VariantProps;
|
|
448
500
|
leading?: React$1.ReactNode;
|
|
449
501
|
trailing?: React$1.ReactNode;
|
|
@@ -457,36 +509,14 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
|
|
|
457
509
|
onChange?: (value: string) => void;
|
|
458
510
|
} & Omit<InputProps, "name" | "defaultValue" | "size" | "value" | "onChange">;
|
|
459
511
|
declare const FormField: {
|
|
460
|
-
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, classNameDefault, itemClassName, labelClassName, messageClassName, requiredLabelClassName, variant, size, rules, shouldUnregister, defaultValue, leading, trailing, invalid, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
512
|
+
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, classNameDefault, itemClassName, labelClassName, messageClassName, requiredLabelClassName, variant, size, customSize, rules, shouldUnregister, defaultValue, leading, trailing, invalid, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
461
513
|
displayName: string;
|
|
462
514
|
};
|
|
463
|
-
|
|
464
|
-
declare const useFormField: () => {
|
|
465
|
-
id: string;
|
|
466
|
-
formItemId: string;
|
|
467
|
-
formDescriptionId: string;
|
|
468
|
-
formMessageId: string;
|
|
469
|
-
error: undefined;
|
|
470
|
-
} | {
|
|
471
|
-
invalid: boolean;
|
|
472
|
-
isDirty: boolean;
|
|
473
|
-
isTouched: boolean;
|
|
474
|
-
isValidating: boolean;
|
|
475
|
-
error?: FieldError;
|
|
476
|
-
id: string;
|
|
477
|
-
name: string;
|
|
478
|
-
formItemId: string;
|
|
479
|
-
formDescriptionId: string;
|
|
480
|
-
formMessageId: string;
|
|
481
|
-
};
|
|
482
|
-
declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
483
|
-
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
484
|
-
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
485
|
-
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
515
|
+
|
|
486
516
|
type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption> = {
|
|
487
517
|
name: TName;
|
|
488
518
|
control?: Control<TFieldValues>;
|
|
489
|
-
rules?: FieldRules<TFieldValues, TName>;
|
|
519
|
+
rules?: FieldRules$1<TFieldValues, TName>;
|
|
490
520
|
shouldUnregister?: boolean;
|
|
491
521
|
defaultValue?: FieldPathValue<TFieldValues, TName>;
|
|
492
522
|
label?: React$1.ReactNode;
|
|
@@ -503,6 +533,7 @@ type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends Field
|
|
|
503
533
|
onChangeItem?: (item: TItem | null) => void;
|
|
504
534
|
disabled?: boolean;
|
|
505
535
|
size?: SizeProps$1;
|
|
536
|
+
customSize?: CustomSize;
|
|
506
537
|
variant?: VariantProps;
|
|
507
538
|
invalid?: boolean;
|
|
508
539
|
searchable?: boolean;
|
|
@@ -511,12 +542,14 @@ type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends Field
|
|
|
511
542
|
className?: string;
|
|
512
543
|
itemClassName?: string;
|
|
513
544
|
contentClassName?: string;
|
|
545
|
+
searchInputClassName?: string;
|
|
514
546
|
labelClassName?: string;
|
|
515
547
|
messageClassName?: string;
|
|
516
548
|
requiredLabelClassName?: string;
|
|
549
|
+
position?: "item-aligned" | "popper";
|
|
517
550
|
};
|
|
518
551
|
declare const FormSelect: {
|
|
519
|
-
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption
|
|
552
|
+
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption>({ name, control, rules, shouldUnregister, defaultValue, placeholder, label, requiredLabel, className, itemClassName, contentClassName, searchInputClassName, labelClassName, messageClassName, requiredLabelClassName, options, items, getOptionValue, getOptionLabel, getOptionDisabled, getOptionData, children, onChange, onChangeItem, disabled, size, customSize, variant, invalid, searchable, searchPlaceholder, emptyText, position, }: CustomFormSelectProps<TFieldValues, TName, TItem>): react_jsx_runtime.JSX.Element;
|
|
520
553
|
displayName: string;
|
|
521
554
|
};
|
|
522
555
|
|
|
@@ -695,15 +728,12 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React$1.Com
|
|
|
695
728
|
declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
696
729
|
declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
697
730
|
|
|
698
|
-
|
|
731
|
+
interface SearchInputProps extends Omit<InputProps, "value" | "defaultValue" | "onChange" | "type"> {
|
|
699
732
|
value?: string;
|
|
700
|
-
placeholder?: string;
|
|
701
|
-
className?: string;
|
|
702
|
-
classNameDefault?: boolean;
|
|
703
733
|
debounceTime?: number;
|
|
704
|
-
onSearch: (searchTerm
|
|
705
|
-
}
|
|
706
|
-
declare
|
|
734
|
+
onSearch: (searchTerm: string) => void;
|
|
735
|
+
}
|
|
736
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
707
737
|
|
|
708
738
|
type SearchableSelectOption<TData = unknown> = {
|
|
709
739
|
value: string;
|
|
@@ -712,7 +742,7 @@ type SearchableSelectOption<TData = unknown> = {
|
|
|
712
742
|
keywords?: string;
|
|
713
743
|
data?: TData;
|
|
714
744
|
};
|
|
715
|
-
type SearchableSelectProps<TData = unknown> =
|
|
745
|
+
type SearchableSelectProps<TData = unknown> = {
|
|
716
746
|
items: SearchableSelectOption<TData>[];
|
|
717
747
|
value?: string;
|
|
718
748
|
defaultValue?: string;
|
|
@@ -720,12 +750,16 @@ type SearchableSelectProps<TData = unknown> = Omit<React$1.ComponentPropsWithout
|
|
|
720
750
|
placeholder?: string;
|
|
721
751
|
searchPlaceholder?: string;
|
|
722
752
|
emptyText?: React$1.ReactNode;
|
|
753
|
+
disabled?: boolean;
|
|
754
|
+
name?: string;
|
|
755
|
+
required?: boolean;
|
|
723
756
|
triggerClassName?: string;
|
|
724
757
|
contentClassName?: string;
|
|
725
758
|
itemClassName?: string;
|
|
726
759
|
searchInputClassName?: string;
|
|
727
760
|
};
|
|
728
|
-
declare function
|
|
761
|
+
declare function SearchableSelectBase<TData = unknown>({ items, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, disabled, name, required, triggerClassName, contentClassName, itemClassName, searchInputClassName, }: SearchableSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
762
|
+
declare const SearchableSelect: typeof SearchableSelectBase;
|
|
729
763
|
|
|
730
764
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
731
765
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1195,4 +1229,4 @@ declare function PaginationSection({ totalPosts, postsPerPage, currentPage, setC
|
|
|
1195
1229
|
|
|
1196
1230
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1197
1231
|
|
|
1198
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomFormFieldProps, type CustomFormSelectProps, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, type DataTableProps, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, type DropzoneProps, FileUpload, type FileUploadProps, Form, FormCheckbox, type FormCheckboxProps, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, type IconButtonProps, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps,
|
|
1232
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, type CheckboxRules, type CheckboxSize, type CheckboxVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomFormFieldProps, type CustomFormSelectProps, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, type DataTableProps, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, type DropzoneProps, type FieldRules$1 as FieldRules, FileUpload, type FileUploadProps, Form, FormCheckbox, type FormCheckboxProps, FormControl, FormDescription, FormField, FormFieldContext, type FormFieldContextValue, FormItem, FormItemContext, FormLabel, FormMessage, type FormProps, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, type IconButtonProps, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, type PageHeadProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarProvider, Skeleton, Slider, ToasterSonner as SonnerToaster, type SonnerToasterProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToasterSonner, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiCheckbox, type UiCheckboxProps, UiInput, type UiInputProps, UiSelect, type UiSelectOption, type UiSelectProps, badgeVariants, buttonVariants, cn, getDefaultOptionLabel, getDefaultOptionValue, getErrorMessage, getNextEnabledIndex, iconButtonVariants, navigationMenuTriggerStyle, normalizeSearchText, reducer, toast, toggleVariants, useFormField, useSidebar, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
|
18
18
|
import * as vaul from 'vaul';
|
|
19
19
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
20
20
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
21
|
-
import { FieldValues, UseFormReturn, SubmitHandler, SubmitErrorHandler, FieldPath, Control, RegisterOptions, FieldPathValue, FieldError } from 'react-hook-form';
|
|
22
21
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
23
22
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
23
|
+
import { FieldValues, FieldPath, RegisterOptions, FieldError, UseFormReturn, SubmitHandler, SubmitErrorHandler, Control, FieldPathValue } from 'react-hook-form';
|
|
24
24
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
25
25
|
import { LucideProps } from 'lucide-react';
|
|
26
26
|
import * as input_otp from 'input-otp';
|
|
@@ -195,9 +195,9 @@ declare const CarouselNext: React$1.ForwardRefExoticComponent<Omit<React$1.Butto
|
|
|
195
195
|
loaderClassName?: string;
|
|
196
196
|
} & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
197
197
|
|
|
198
|
-
type CheckboxSize =
|
|
199
|
-
type CheckboxVariant =
|
|
200
|
-
interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
|
|
198
|
+
type CheckboxSize = "sm" | "md" | "lg";
|
|
199
|
+
type CheckboxVariant = "default" | "outline" | "soft" | "success" | "destructive";
|
|
200
|
+
interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "size"> {
|
|
201
201
|
size?: CheckboxSize;
|
|
202
202
|
variant?: CheckboxVariant;
|
|
203
203
|
invalid?: boolean;
|
|
@@ -376,6 +376,68 @@ declare const DropdownMenuShortcut: {
|
|
|
376
376
|
displayName: string;
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
+
type SelectOption<TData = unknown> = {
|
|
380
|
+
value: string;
|
|
381
|
+
label: React$1.ReactNode;
|
|
382
|
+
disabled?: boolean;
|
|
383
|
+
data?: TData;
|
|
384
|
+
};
|
|
385
|
+
type FormInputVariantProps = "outline" | "soft" | "ghost" | "filled" | "flushed" | "unstyled" | "link";
|
|
386
|
+
declare const formInputVariants: Record<FormInputVariantProps, string>;
|
|
387
|
+
type InputVariant = keyof typeof formInputVariants;
|
|
388
|
+
type SizeProps$1 = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
389
|
+
type VariantProps = InputVariant;
|
|
390
|
+
type SizeClasses = {
|
|
391
|
+
control: string;
|
|
392
|
+
flushedControl: string;
|
|
393
|
+
linkControl: string;
|
|
394
|
+
selectItem: string;
|
|
395
|
+
searchInput: string;
|
|
396
|
+
checkbox: string;
|
|
397
|
+
label: string;
|
|
398
|
+
description: string;
|
|
399
|
+
message: string;
|
|
400
|
+
};
|
|
401
|
+
type CustomSize = Partial<SizeClasses>;
|
|
402
|
+
|
|
403
|
+
type FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
404
|
+
name: TName;
|
|
405
|
+
};
|
|
406
|
+
declare const FormFieldContext: React$1.Context<FormFieldContextValue<FieldValues, string> | null>;
|
|
407
|
+
type FieldRules$1<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled" | "size">;
|
|
408
|
+
declare function getErrorMessage(error?: FieldError): string | undefined;
|
|
409
|
+
declare function normalizeSearchText(value: React$1.ReactNode): string;
|
|
410
|
+
declare function getDefaultOptionValue<TItem>(item: TItem): string;
|
|
411
|
+
declare function getDefaultOptionLabel<TItem>(item: TItem): React$1.ReactNode;
|
|
412
|
+
declare function getNextEnabledIndex<TItem>(options: SelectOption<TItem>[], currentIndex: number, direction: 1 | -1): number;
|
|
413
|
+
type FormItemContextValue = {
|
|
414
|
+
id: string;
|
|
415
|
+
};
|
|
416
|
+
declare const FormItemContext: React$1.Context<FormItemContextValue | null>;
|
|
417
|
+
declare const FormItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
418
|
+
declare const useFormField: () => {
|
|
419
|
+
id: string;
|
|
420
|
+
formItemId: string;
|
|
421
|
+
formDescriptionId: string;
|
|
422
|
+
formMessageId: string;
|
|
423
|
+
error: undefined;
|
|
424
|
+
} | {
|
|
425
|
+
invalid: boolean;
|
|
426
|
+
isDirty: boolean;
|
|
427
|
+
isTouched: boolean;
|
|
428
|
+
isValidating: boolean;
|
|
429
|
+
error?: FieldError;
|
|
430
|
+
id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
formItemId: string;
|
|
433
|
+
formDescriptionId: string;
|
|
434
|
+
formMessageId: string;
|
|
435
|
+
};
|
|
436
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
437
|
+
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
438
|
+
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
439
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
440
|
+
|
|
379
441
|
type FormProps<TFieldValues extends FieldValues> = {
|
|
380
442
|
children: React$1.ReactNode;
|
|
381
443
|
methods: UseFormReturn<TFieldValues>;
|
|
@@ -385,7 +447,7 @@ type FormProps<TFieldValues extends FieldValues> = {
|
|
|
385
447
|
};
|
|
386
448
|
declare function Form<TFieldValues extends FieldValues>({ children, methods, onSubmit, onError, formProps }: FormProps<TFieldValues>): react_jsx_runtime.JSX.Element;
|
|
387
449
|
|
|
388
|
-
type CheckboxRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>,
|
|
450
|
+
type CheckboxRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
389
451
|
type FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
|
|
390
452
|
name: TName;
|
|
391
453
|
control?: Control<TFieldValues>;
|
|
@@ -403,15 +465,16 @@ type FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath
|
|
|
403
465
|
messageClassName?: string;
|
|
404
466
|
requiredLabelClassName?: string;
|
|
405
467
|
onChange?: (checked: boolean) => void;
|
|
406
|
-
} & Omit<CheckboxProps,
|
|
468
|
+
} & Omit<CheckboxProps, "checked" | "defaultChecked" | "onCheckedChange">;
|
|
407
469
|
declare const FormCheckbox: {
|
|
408
470
|
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, rules, shouldUnregister, defaultValue, label, description, requiredLabel, className, itemClassName, checkboxClassName, labelClassName, descriptionClassName, messageClassName, requiredLabelClassName, onChange, ...checkboxProps }: FormCheckboxProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
409
471
|
displayName: string;
|
|
410
472
|
};
|
|
411
473
|
|
|
412
474
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
413
|
-
size?:
|
|
414
|
-
|
|
475
|
+
size?: SizeProps$1;
|
|
476
|
+
customSize?: CustomSize;
|
|
477
|
+
variant?: VariantProps;
|
|
415
478
|
leading?: React$1.ReactNode;
|
|
416
479
|
trailing?: React$1.ReactNode;
|
|
417
480
|
invalid?: boolean;
|
|
@@ -421,18 +484,6 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
421
484
|
}
|
|
422
485
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
423
486
|
|
|
424
|
-
type SelectOption<TData = unknown> = {
|
|
425
|
-
value: string;
|
|
426
|
-
label: React$1.ReactNode;
|
|
427
|
-
disabled?: boolean;
|
|
428
|
-
data?: TData;
|
|
429
|
-
};
|
|
430
|
-
type InputVariantProps = "outline" | "soft" | "ghost" | "filled" | "flushed" | "unstyled" | "link";
|
|
431
|
-
declare const inputVariants: Record<InputVariantProps, string>;
|
|
432
|
-
type InputVariant = keyof typeof inputVariants;
|
|
433
|
-
declare const variants: Record<InputVariant, string>;
|
|
434
|
-
type SizeProps$1 = "sm" | "md" | "lg";
|
|
435
|
-
type VariantProps = InputVariant;
|
|
436
487
|
type FieldRules<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues, TName>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled" | "size">;
|
|
437
488
|
type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
|
|
438
489
|
name: TName;
|
|
@@ -444,6 +495,7 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
|
|
|
444
495
|
requiredLabel?: boolean;
|
|
445
496
|
placeholder?: string;
|
|
446
497
|
size?: SizeProps$1;
|
|
498
|
+
customSize?: CustomSize;
|
|
447
499
|
variant?: VariantProps;
|
|
448
500
|
leading?: React$1.ReactNode;
|
|
449
501
|
trailing?: React$1.ReactNode;
|
|
@@ -457,36 +509,14 @@ type CustomFormFieldProps<TFieldValues extends FieldValues, TName extends FieldP
|
|
|
457
509
|
onChange?: (value: string) => void;
|
|
458
510
|
} & Omit<InputProps, "name" | "defaultValue" | "size" | "value" | "onChange">;
|
|
459
511
|
declare const FormField: {
|
|
460
|
-
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, classNameDefault, itemClassName, labelClassName, messageClassName, requiredLabelClassName, variant, size, rules, shouldUnregister, defaultValue, leading, trailing, invalid, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
512
|
+
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ name, control, label, placeholder, requiredLabel, className, classNameDefault, itemClassName, labelClassName, messageClassName, requiredLabelClassName, variant, size, customSize, rules, shouldUnregister, defaultValue, leading, trailing, invalid, onChange, ...inputProps }: CustomFormFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
461
513
|
displayName: string;
|
|
462
514
|
};
|
|
463
|
-
|
|
464
|
-
declare const useFormField: () => {
|
|
465
|
-
id: string;
|
|
466
|
-
formItemId: string;
|
|
467
|
-
formDescriptionId: string;
|
|
468
|
-
formMessageId: string;
|
|
469
|
-
error: undefined;
|
|
470
|
-
} | {
|
|
471
|
-
invalid: boolean;
|
|
472
|
-
isDirty: boolean;
|
|
473
|
-
isTouched: boolean;
|
|
474
|
-
isValidating: boolean;
|
|
475
|
-
error?: FieldError;
|
|
476
|
-
id: string;
|
|
477
|
-
name: string;
|
|
478
|
-
formItemId: string;
|
|
479
|
-
formDescriptionId: string;
|
|
480
|
-
formMessageId: string;
|
|
481
|
-
};
|
|
482
|
-
declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & React$1.RefAttributes<HTMLLabelElement>>;
|
|
483
|
-
declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
484
|
-
declare const FormDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
485
|
-
declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
515
|
+
|
|
486
516
|
type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption> = {
|
|
487
517
|
name: TName;
|
|
488
518
|
control?: Control<TFieldValues>;
|
|
489
|
-
rules?: FieldRules<TFieldValues, TName>;
|
|
519
|
+
rules?: FieldRules$1<TFieldValues, TName>;
|
|
490
520
|
shouldUnregister?: boolean;
|
|
491
521
|
defaultValue?: FieldPathValue<TFieldValues, TName>;
|
|
492
522
|
label?: React$1.ReactNode;
|
|
@@ -503,6 +533,7 @@ type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends Field
|
|
|
503
533
|
onChangeItem?: (item: TItem | null) => void;
|
|
504
534
|
disabled?: boolean;
|
|
505
535
|
size?: SizeProps$1;
|
|
536
|
+
customSize?: CustomSize;
|
|
506
537
|
variant?: VariantProps;
|
|
507
538
|
invalid?: boolean;
|
|
508
539
|
searchable?: boolean;
|
|
@@ -511,12 +542,14 @@ type CustomFormSelectProps<TFieldValues extends FieldValues, TName extends Field
|
|
|
511
542
|
className?: string;
|
|
512
543
|
itemClassName?: string;
|
|
513
544
|
contentClassName?: string;
|
|
545
|
+
searchInputClassName?: string;
|
|
514
546
|
labelClassName?: string;
|
|
515
547
|
messageClassName?: string;
|
|
516
548
|
requiredLabelClassName?: string;
|
|
549
|
+
position?: "item-aligned" | "popper";
|
|
517
550
|
};
|
|
518
551
|
declare const FormSelect: {
|
|
519
|
-
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption
|
|
552
|
+
<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TItem = SelectOption>({ name, control, rules, shouldUnregister, defaultValue, placeholder, label, requiredLabel, className, itemClassName, contentClassName, searchInputClassName, labelClassName, messageClassName, requiredLabelClassName, options, items, getOptionValue, getOptionLabel, getOptionDisabled, getOptionData, children, onChange, onChangeItem, disabled, size, customSize, variant, invalid, searchable, searchPlaceholder, emptyText, position, }: CustomFormSelectProps<TFieldValues, TName, TItem>): react_jsx_runtime.JSX.Element;
|
|
520
553
|
displayName: string;
|
|
521
554
|
};
|
|
522
555
|
|
|
@@ -695,15 +728,12 @@ declare const ResizableHandle: ({ withHandle, className, ...props }: React$1.Com
|
|
|
695
728
|
declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
696
729
|
declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
697
730
|
|
|
698
|
-
|
|
731
|
+
interface SearchInputProps extends Omit<InputProps, "value" | "defaultValue" | "onChange" | "type"> {
|
|
699
732
|
value?: string;
|
|
700
|
-
placeholder?: string;
|
|
701
|
-
className?: string;
|
|
702
|
-
classNameDefault?: boolean;
|
|
703
733
|
debounceTime?: number;
|
|
704
|
-
onSearch: (searchTerm
|
|
705
|
-
}
|
|
706
|
-
declare
|
|
734
|
+
onSearch: (searchTerm: string) => void;
|
|
735
|
+
}
|
|
736
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
707
737
|
|
|
708
738
|
type SearchableSelectOption<TData = unknown> = {
|
|
709
739
|
value: string;
|
|
@@ -712,7 +742,7 @@ type SearchableSelectOption<TData = unknown> = {
|
|
|
712
742
|
keywords?: string;
|
|
713
743
|
data?: TData;
|
|
714
744
|
};
|
|
715
|
-
type SearchableSelectProps<TData = unknown> =
|
|
745
|
+
type SearchableSelectProps<TData = unknown> = {
|
|
716
746
|
items: SearchableSelectOption<TData>[];
|
|
717
747
|
value?: string;
|
|
718
748
|
defaultValue?: string;
|
|
@@ -720,12 +750,16 @@ type SearchableSelectProps<TData = unknown> = Omit<React$1.ComponentPropsWithout
|
|
|
720
750
|
placeholder?: string;
|
|
721
751
|
searchPlaceholder?: string;
|
|
722
752
|
emptyText?: React$1.ReactNode;
|
|
753
|
+
disabled?: boolean;
|
|
754
|
+
name?: string;
|
|
755
|
+
required?: boolean;
|
|
723
756
|
triggerClassName?: string;
|
|
724
757
|
contentClassName?: string;
|
|
725
758
|
itemClassName?: string;
|
|
726
759
|
searchInputClassName?: string;
|
|
727
760
|
};
|
|
728
|
-
declare function
|
|
761
|
+
declare function SearchableSelectBase<TData = unknown>({ items, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, disabled, name, required, triggerClassName, contentClassName, itemClassName, searchInputClassName, }: SearchableSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
762
|
+
declare const SearchableSelect: typeof SearchableSelectBase;
|
|
729
763
|
|
|
730
764
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
731
765
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1195,4 +1229,4 @@ declare function PaginationSection({ totalPosts, postsPerPage, currentPage, setC
|
|
|
1195
1229
|
|
|
1196
1230
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1197
1231
|
|
|
1198
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomFormFieldProps, type CustomFormSelectProps, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, type DataTableProps, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, type DropzoneProps, FileUpload, type FileUploadProps, Form, FormCheckbox, type FormCheckboxProps, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, type IconButtonProps, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps,
|
|
1232
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, type CheckboxRules, type CheckboxSize, type CheckboxVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomFormFieldProps, type CustomFormSelectProps, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, type DataTableProps, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, type DropzoneProps, type FieldRules$1 as FieldRules, FileUpload, type FileUploadProps, Form, FormCheckbox, type FormCheckboxProps, FormControl, FormDescription, FormField, FormFieldContext, type FormFieldContextValue, FormItem, FormItemContext, FormLabel, FormMessage, type FormProps, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, type IconButtonProps, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, type PageHeadProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarProvider, Skeleton, Slider, ToasterSonner as SonnerToaster, type SonnerToasterProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, ToasterSonner, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiCheckbox, type UiCheckboxProps, UiInput, type UiInputProps, UiSelect, type UiSelectOption, type UiSelectProps, badgeVariants, buttonVariants, cn, getDefaultOptionLabel, getDefaultOptionValue, getErrorMessage, getNextEnabledIndex, iconButtonVariants, navigationMenuTriggerStyle, normalizeSearchText, reducer, toast, toggleVariants, useFormField, useSidebar, useToast };
|