adminium 1.0.1-patch.2 → 1.0.1-patch.3

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
@@ -10,9 +10,7 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
10
10
  import { RowData, Table, SortingState, ColumnFiltersState, Row, Cell, Column, HeaderGroup, Header } from '@tanstack/react-table';
11
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
12
12
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
13
- import * as react_hook_form from 'react-hook-form';
14
- import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
15
- import { Slot } from '@radix-ui/react-slot';
13
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
16
14
  import { ClassValue } from 'clsx';
17
15
 
18
16
  declare const alertVariants: (props?: ({
@@ -435,31 +433,33 @@ declare function DropdownMenuSeparator({ className, ...props }: React$1.Componen
435
433
  declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
436
434
  declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
437
435
 
438
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
439
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
440
- declare const useFormField: () => {
441
- invalid: boolean;
442
- isDirty: boolean;
443
- isTouched: boolean;
444
- isValidating: boolean;
445
- error?: react_hook_form.FieldError;
446
- id: string;
447
- name: string;
448
- formItemId: string;
449
- formDescriptionId: string;
450
- formMessageId: string;
451
- };
452
- declare function FormItem({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
453
- declare function FormLabel({ className, ...props }: React$1.ComponentProps<typeof Label$1.Root>): react_jsx_runtime.JSX.Element;
454
- declare function FormControl({ ...props }: React$1.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
455
- declare function FormDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element | null;
456
- declare function FormMessage({ className, children, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element | null;
457
-
458
436
  declare const labelVariants: (props?: ({
459
437
  variant?: "primary" | "secondary" | null | undefined;
460
438
  } & class_variance_authority_types.ClassProp) | undefined) => string;
461
439
  declare function Label({ className, variant, ...props }: React$1.ComponentProps<typeof Label$1.Root> & VariantProps<typeof labelVariants>): react_jsx_runtime.JSX.Element;
462
440
 
441
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): react_jsx_runtime.JSX.Element;
442
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
443
+ variant?: "legend" | "label";
444
+ }): react_jsx_runtime.JSX.Element;
445
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
446
+ declare const fieldVariants: (props?: ({
447
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
448
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
449
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): react_jsx_runtime.JSX.Element;
450
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
451
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): react_jsx_runtime.JSX.Element;
452
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
453
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
454
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
455
+ children?: React.ReactNode;
456
+ }): react_jsx_runtime.JSX.Element;
457
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
458
+ errors?: Array<{
459
+ message?: string;
460
+ } | undefined>;
461
+ }): react_jsx_runtime.JSX.Element | null;
462
+
463
463
  declare function ScrollArea({ className, viewportClassName, children, viewportRef, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Root> & {
464
464
  viewportRef?: React$1.Ref<HTMLDivElement>;
465
465
  viewportClassName?: string;
@@ -479,6 +479,8 @@ type ScrollspyProps = {
479
479
  };
480
480
  declare function Scrollspy({ children, targetRef, onUpdate, className, offset, smooth, dataAttribute, history, }: ScrollspyProps): react_jsx_runtime.JSX.Element;
481
481
 
482
+ declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
483
+
482
484
  declare const Select: ({ indicatorPosition, indicatorVisibility, indicator, ...props }: {
483
485
  indicatorPosition?: "left" | "right";
484
486
  indicatorVisibility?: boolean;
@@ -520,4 +522,4 @@ declare function useMounted(): boolean;
520
522
  */
521
523
  declare function cn(...inputs: ClassValue[]): string;
522
524
 
523
- export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, type DataGridApiFetchParams, type DataGridApiResponse, DataGridColumnHeader, type DataGridColumnHeaderProps, DataGridColumnVisibility, DataGridContainer, type DataGridContextProps, DataGridPagination, type DataGridPaginationProps, type DataGridProps, DataGridProvider, type DataGridRequestParams, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useFormField, useIsMobile, useMounted };
525
+ export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, type DataGridApiFetchParams, type DataGridApiResponse, DataGridColumnHeader, type DataGridColumnHeaderProps, DataGridColumnVisibility, DataGridContainer, type DataGridContextProps, DataGridPagination, type DataGridPaginationProps, type DataGridProps, DataGridProvider, type DataGridRequestParams, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useIsMobile, useMounted };
package/dist/index.d.ts CHANGED
@@ -10,9 +10,7 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
10
10
  import { RowData, Table, SortingState, ColumnFiltersState, Row, Cell, Column, HeaderGroup, Header } from '@tanstack/react-table';
11
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
12
12
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
13
- import * as react_hook_form from 'react-hook-form';
14
- import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
15
- import { Slot } from '@radix-ui/react-slot';
13
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
16
14
  import { ClassValue } from 'clsx';
17
15
 
18
16
  declare const alertVariants: (props?: ({
@@ -435,31 +433,33 @@ declare function DropdownMenuSeparator({ className, ...props }: React$1.Componen
435
433
  declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
436
434
  declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
437
435
 
438
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
439
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
440
- declare const useFormField: () => {
441
- invalid: boolean;
442
- isDirty: boolean;
443
- isTouched: boolean;
444
- isValidating: boolean;
445
- error?: react_hook_form.FieldError;
446
- id: string;
447
- name: string;
448
- formItemId: string;
449
- formDescriptionId: string;
450
- formMessageId: string;
451
- };
452
- declare function FormItem({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
453
- declare function FormLabel({ className, ...props }: React$1.ComponentProps<typeof Label$1.Root>): react_jsx_runtime.JSX.Element;
454
- declare function FormControl({ ...props }: React$1.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
455
- declare function FormDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element | null;
456
- declare function FormMessage({ className, children, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element | null;
457
-
458
436
  declare const labelVariants: (props?: ({
459
437
  variant?: "primary" | "secondary" | null | undefined;
460
438
  } & class_variance_authority_types.ClassProp) | undefined) => string;
461
439
  declare function Label({ className, variant, ...props }: React$1.ComponentProps<typeof Label$1.Root> & VariantProps<typeof labelVariants>): react_jsx_runtime.JSX.Element;
462
440
 
441
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): react_jsx_runtime.JSX.Element;
442
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
443
+ variant?: "legend" | "label";
444
+ }): react_jsx_runtime.JSX.Element;
445
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
446
+ declare const fieldVariants: (props?: ({
447
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
448
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
449
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): react_jsx_runtime.JSX.Element;
450
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
451
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): react_jsx_runtime.JSX.Element;
452
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
453
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
454
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
455
+ children?: React.ReactNode;
456
+ }): react_jsx_runtime.JSX.Element;
457
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
458
+ errors?: Array<{
459
+ message?: string;
460
+ } | undefined>;
461
+ }): react_jsx_runtime.JSX.Element | null;
462
+
463
463
  declare function ScrollArea({ className, viewportClassName, children, viewportRef, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Root> & {
464
464
  viewportRef?: React$1.Ref<HTMLDivElement>;
465
465
  viewportClassName?: string;
@@ -479,6 +479,8 @@ type ScrollspyProps = {
479
479
  };
480
480
  declare function Scrollspy({ children, targetRef, onUpdate, className, offset, smooth, dataAttribute, history, }: ScrollspyProps): react_jsx_runtime.JSX.Element;
481
481
 
482
+ declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
483
+
482
484
  declare const Select: ({ indicatorPosition, indicatorVisibility, indicator, ...props }: {
483
485
  indicatorPosition?: "left" | "right";
484
486
  indicatorVisibility?: boolean;
@@ -520,4 +522,4 @@ declare function useMounted(): boolean;
520
522
  */
521
523
  declare function cn(...inputs: ClassValue[]): string;
522
524
 
523
- export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, type DataGridApiFetchParams, type DataGridApiResponse, DataGridColumnHeader, type DataGridColumnHeaderProps, DataGridColumnVisibility, DataGridContainer, type DataGridContextProps, DataGridPagination, type DataGridPaginationProps, type DataGridProps, DataGridProvider, type DataGridRequestParams, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useFormField, useIsMobile, useMounted };
525
+ export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, type DataGridApiFetchParams, type DataGridApiResponse, DataGridColumnHeader, type DataGridColumnHeaderProps, DataGridColumnVisibility, DataGridContainer, type DataGridContextProps, DataGridPagination, type DataGridPaginationProps, type DataGridProps, DataGridProvider, type DataGridRequestParams, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useIsMobile, useMounted };
package/dist/index.js CHANGED
@@ -4,18 +4,17 @@ import { twMerge } from 'tailwind-merge';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { ChevronDown, X, Check, Minus, ChevronRight, Circle, ChevronUp, ChevronLeftIcon, ChevronRightIcon, ArrowDown, ArrowUp, ChevronsUpDown, ArrowLeftToLine, ArrowRightToLine, ArrowLeft, ArrowRight, Settings2, PinOff } from 'lucide-react';
6
6
  import * as SlotPrimitive2 from '@radix-ui/react-slot';
7
- import { Slot } from '@radix-ui/react-slot';
8
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
8
  import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Popover as Popover$1, Avatar as Avatar$1, Select as Select$1, Label, ScrollArea as ScrollArea$1 } from 'radix-ui';
10
9
  import { Drawer as Drawer$1 } from 'vaul';
11
10
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
12
11
  import * as React from 'react';
13
- import { createContext, useContext, Fragment as Fragment$1, isValidElement, useRef, useCallback, useEffect } from 'react';
12
+ import { createContext, useContext, Fragment as Fragment$1, isValidElement, useMemo, useRef, useCallback, useEffect } from 'react';
14
13
  import { useMotionValue, useSpring, useTransform, AnimatePresence, motion } from 'motion/react';
15
14
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
16
15
  import { flexRender } from '@tanstack/react-table';
17
16
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
18
- import { FormProvider, Controller, useFormContext } from 'react-hook-form';
17
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
18
 
20
19
  // src/lib/utils.ts
21
20
  function cn(...inputs) {
@@ -3721,122 +3720,228 @@ function Label2({
3721
3720
  }
3722
3721
  );
3723
3722
  }
3724
- var Form = FormProvider;
3725
- var FormFieldContext = React.createContext(
3726
- {}
3727
- );
3728
- var FormField = ({
3729
- ...props
3730
- }) => {
3731
- return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
3732
- };
3733
- var useFormField = () => {
3734
- const fieldContext = React.useContext(FormFieldContext);
3735
- const itemContext = React.useContext(FormItemContext);
3736
- const { getFieldState, formState } = useFormContext();
3737
- const fieldState = getFieldState(fieldContext.name, formState);
3738
- if (!fieldContext) {
3739
- throw new Error("useFormField should be used within <FormField>");
3740
- }
3741
- const { id } = itemContext;
3742
- return {
3743
- id,
3744
- name: fieldContext.name,
3745
- formItemId: `${id}-form-item`,
3746
- formDescriptionId: `${id}-form-item-description`,
3747
- formMessageId: `${id}-form-item-message`,
3748
- ...fieldState
3749
- };
3750
- };
3751
- var FormItemContext = React.createContext(
3752
- {}
3723
+ var Separator2 = React.forwardRef(
3724
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
3725
+ SeparatorPrimitive.Root,
3726
+ {
3727
+ ref,
3728
+ decorative,
3729
+ orientation,
3730
+ className: cn(
3731
+ "shrink-0 bg-border",
3732
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
3733
+ className
3734
+ ),
3735
+ ...props
3736
+ }
3737
+ )
3753
3738
  );
3754
- function FormItem({
3739
+ Separator2.displayName = SeparatorPrimitive.Root.displayName;
3740
+ function FieldSet({ className, ...props }) {
3741
+ return /* @__PURE__ */ jsx(
3742
+ "fieldset",
3743
+ {
3744
+ "data-slot": "field-set",
3745
+ className: cn(
3746
+ "flex flex-col gap-6",
3747
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
3748
+ className
3749
+ ),
3750
+ ...props
3751
+ }
3752
+ );
3753
+ }
3754
+ function FieldLegend({
3755
3755
  className,
3756
+ variant = "legend",
3756
3757
  ...props
3757
3758
  }) {
3758
- const id = React.useId();
3759
- return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(FormItemInner, { className, ...props }) });
3759
+ return /* @__PURE__ */ jsx(
3760
+ "legend",
3761
+ {
3762
+ "data-slot": "field-legend",
3763
+ "data-variant": variant,
3764
+ className: cn(
3765
+ "mb-3 font-medium",
3766
+ "data-[variant=legend]:text-base",
3767
+ "data-[variant=label]:text-sm",
3768
+ className
3769
+ ),
3770
+ ...props
3771
+ }
3772
+ );
3760
3773
  }
3761
- function FormItemInner({
3774
+ function FieldGroup({ className, ...props }) {
3775
+ return /* @__PURE__ */ jsx(
3776
+ "div",
3777
+ {
3778
+ "data-slot": "field-group",
3779
+ className: cn(
3780
+ "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
3781
+ className
3782
+ ),
3783
+ ...props
3784
+ }
3785
+ );
3786
+ }
3787
+ var fieldVariants = cva(
3788
+ "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
3789
+ {
3790
+ variants: {
3791
+ orientation: {
3792
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
3793
+ horizontal: [
3794
+ "flex-row items-center",
3795
+ "[&>[data-slot=field-label]]:flex-auto",
3796
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
3797
+ ],
3798
+ responsive: [
3799
+ "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
3800
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
3801
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
3802
+ ]
3803
+ }
3804
+ },
3805
+ defaultVariants: {
3806
+ orientation: "vertical"
3807
+ }
3808
+ }
3809
+ );
3810
+ function Field({
3762
3811
  className,
3812
+ orientation = "vertical",
3763
3813
  ...props
3764
3814
  }) {
3765
- const { error } = useFormField();
3766
3815
  return /* @__PURE__ */ jsx(
3767
3816
  "div",
3768
3817
  {
3769
- "data-slot": "form-item",
3770
- className: cn("flex flex-col gap-2.5", className),
3771
- "data-invalid": !!error,
3818
+ role: "group",
3819
+ "data-slot": "field",
3820
+ "data-orientation": orientation,
3821
+ className: cn(fieldVariants({ orientation }), className),
3772
3822
  ...props
3773
3823
  }
3774
3824
  );
3775
3825
  }
3776
- function FormLabel({
3826
+ function FieldContent({ className, ...props }) {
3827
+ return /* @__PURE__ */ jsx(
3828
+ "div",
3829
+ {
3830
+ "data-slot": "field-content",
3831
+ className: cn(
3832
+ "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
3833
+ className
3834
+ ),
3835
+ ...props
3836
+ }
3837
+ );
3838
+ }
3839
+ function FieldLabel({
3777
3840
  className,
3778
3841
  ...props
3779
3842
  }) {
3780
- const { formItemId } = useFormField();
3781
3843
  return /* @__PURE__ */ jsx(
3782
3844
  Label2,
3783
3845
  {
3784
- "data-slot": "form-label",
3785
- className: cn("font-medium text-foreground", className),
3786
- htmlFor: formItemId,
3846
+ "data-slot": "field-label",
3847
+ className: cn(
3848
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
3849
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
3850
+ "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
3851
+ className
3852
+ ),
3787
3853
  ...props
3788
3854
  }
3789
3855
  );
3790
3856
  }
3791
- function FormControl({ ...props }) {
3792
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
3857
+ function FieldTitle({ className, ...props }) {
3793
3858
  return /* @__PURE__ */ jsx(
3794
- Slot,
3859
+ "div",
3795
3860
  {
3796
- "data-slot": "form-control",
3797
- id: formItemId,
3798
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
3799
- "aria-invalid": !!error,
3861
+ "data-slot": "field-label",
3862
+ className: cn(
3863
+ "flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
3864
+ className
3865
+ ),
3800
3866
  ...props
3801
3867
  }
3802
3868
  );
3803
3869
  }
3804
- function FormDescription({
3870
+ function FieldDescription({ className, ...props }) {
3871
+ return /* @__PURE__ */ jsx(
3872
+ "p",
3873
+ {
3874
+ "data-slot": "field-description",
3875
+ className: cn(
3876
+ "text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
3877
+ "nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
3878
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
3879
+ className
3880
+ ),
3881
+ ...props
3882
+ }
3883
+ );
3884
+ }
3885
+ function FieldSeparator({
3886
+ children,
3805
3887
  className,
3806
3888
  ...props
3807
3889
  }) {
3808
- const { formDescriptionId, error } = useFormField();
3809
- if (error) {
3810
- return null;
3811
- }
3812
- return /* @__PURE__ */ jsx(
3890
+ return /* @__PURE__ */ jsxs(
3813
3891
  "div",
3814
3892
  {
3815
- "data-slot": "form-description",
3816
- id: formDescriptionId,
3817
- className: cn("text-xs text-muted-foreground -mt-0.5", className),
3818
- ...props
3893
+ "data-slot": "field-separator",
3894
+ "data-content": !!children,
3895
+ className: cn(
3896
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
3897
+ className
3898
+ ),
3899
+ ...props,
3900
+ children: [
3901
+ /* @__PURE__ */ jsx(Separator2, { className: "absolute inset-0 top-1/2" }),
3902
+ children && /* @__PURE__ */ jsx(
3903
+ "span",
3904
+ {
3905
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
3906
+ "data-slot": "field-separator-content",
3907
+ children
3908
+ }
3909
+ )
3910
+ ]
3819
3911
  }
3820
3912
  );
3821
3913
  }
3822
- function FormMessage({
3914
+ function FieldError({
3823
3915
  className,
3824
3916
  children,
3917
+ errors,
3825
3918
  ...props
3826
3919
  }) {
3827
- const { error, formMessageId } = useFormField();
3828
- const body = error ? String(error?.message) : children;
3829
- if (!body) {
3920
+ const content = useMemo(() => {
3921
+ if (children) {
3922
+ return children;
3923
+ }
3924
+ if (!errors) {
3925
+ return null;
3926
+ }
3927
+ if (errors?.length === 1 && errors[0]?.message) {
3928
+ return errors[0].message;
3929
+ }
3930
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
3931
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
3932
+ ) });
3933
+ }, [children, errors]);
3934
+ if (!content) {
3830
3935
  return null;
3831
3936
  }
3832
3937
  return /* @__PURE__ */ jsx(
3833
3938
  "div",
3834
3939
  {
3835
- "data-slot": "form-message",
3836
- id: formMessageId,
3837
- className: cn("-mt-0.5 text-xs font-normal text-destructive", className),
3940
+ role: "alert",
3941
+ "data-slot": "field-error",
3942
+ className: cn("text-destructive text-sm font-normal", className),
3838
3943
  ...props,
3839
- children: body
3944
+ children: content
3840
3945
  }
3841
3946
  );
3842
3947
  }
@@ -4076,6 +4181,6 @@ function useMounted() {
4076
4181
  return mounted;
4077
4182
  }
4078
4183
 
4079
- export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, DataGridColumnHeader, DataGridColumnVisibility, DataGridContainer, DataGridPagination, DataGridProvider, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label2 as Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useFormField, useIsMobile, useMounted };
4184
+ export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, DataGridColumnHeader, DataGridColumnVisibility, DataGridContainer, DataGridPagination, DataGridProvider, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, 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, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label2 as Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useIsMobile, useMounted };
4080
4185
  //# sourceMappingURL=index.js.map
4081
4186
  //# sourceMappingURL=index.js.map