@sonamu-kit/react-components 0.2.4 → 0.3.0
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/components/index.d.ts +7 -7
- package/dist/components/ui/alert.d.ts +8 -2
- package/dist/components/ui/badge.d.ts +10 -2
- package/dist/components/ui/button.d.ts +28 -3
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/select/id-async-select.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts +10 -2
- package/dist/components/ui/toast.d.ts +8 -2
- package/dist/components/ui/toggle-group.d.ts +4 -4
- package/dist/components/ui/toggle.d.ts +16 -5
- package/dist/contexts/types.d.ts +1 -1
- package/dist/lib/list-helpers.d.ts +1 -1
- package/dist/react-components.es.js +24543 -27780
- package/dist/react-components.es.js.map +1 -1
- package/dist/styles/globals.css +69 -31
- package/package.json +25 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { DateRange } from 'react-day-picker';
|
|
2
2
|
export { toast, useToast } from '../hooks/use-toast';
|
|
3
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger
|
|
3
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './ui/accordion';
|
|
4
4
|
export { Alert, AlertDescription, AlertTitle } from './ui/alert';
|
|
5
5
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './ui/alert-dialog';
|
|
6
6
|
export { AspectRatio } from './ui/aspect-ratio';
|
|
@@ -12,11 +12,11 @@ export { Calendar } from './ui/calendar';
|
|
|
12
12
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './ui/card';
|
|
13
13
|
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from './ui/carousel';
|
|
14
14
|
export { Checkbox } from './ui/checkbox';
|
|
15
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger
|
|
15
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/collapsible';
|
|
16
16
|
export type { ComboboxOption } from './ui/combobox';
|
|
17
17
|
export { Combobox } from './ui/combobox';
|
|
18
18
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './ui/command';
|
|
19
|
-
export { CommonModal, commonModalAtom, useCommonModal
|
|
19
|
+
export { CommonModal, commonModalAtom, useCommonModal } from './ui/common-modal';
|
|
20
20
|
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './ui/context-menu';
|
|
21
21
|
export { DateInput, type DateInputProps } from './ui/date-input';
|
|
22
22
|
export { DatePicker, DatePickerWithDropdown } from './ui/date-picker';
|
|
@@ -30,19 +30,19 @@ export { FileInput } from './ui/file-input';
|
|
|
30
30
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from './ui/form';
|
|
31
31
|
export { HoverCard, HoverCardContent, HoverCardTrigger } from './ui/hover-card';
|
|
32
32
|
export { Input, type InputProps } from './ui/input';
|
|
33
|
-
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot
|
|
33
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from './ui/input-otp';
|
|
34
34
|
export { Label } from './ui/label';
|
|
35
35
|
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './ui/menubar';
|
|
36
36
|
export type { MonthPickerValue } from './ui/month-picker-multiple';
|
|
37
37
|
export { MonthPickerMultiple } from './ui/month-picker-multiple';
|
|
38
38
|
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle, } from './ui/navigation-menu';
|
|
39
39
|
export { Pagination } from './ui/pagination';
|
|
40
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger
|
|
40
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './ui/popover';
|
|
41
41
|
export { Progress } from './ui/progress';
|
|
42
42
|
export { RadioGroup, RadioGroupItem } from './ui/radio-group';
|
|
43
43
|
export type { RangeNumberInputProps } from './ui/range-number-input';
|
|
44
44
|
export { RangeNumberInput } from './ui/range-number-input';
|
|
45
|
-
export { ResizableHandle, ResizablePanel, ResizablePanelGroup
|
|
45
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './ui/resizable';
|
|
46
46
|
export { ScrollArea, ScrollBar } from './ui/scroll-area';
|
|
47
47
|
export type { EnumSelectProps } from './ui/select/enum-select';
|
|
48
48
|
export { EnumSelect } from './ui/select/enum-select';
|
|
@@ -69,4 +69,4 @@ export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastT
|
|
|
69
69
|
export { Toaster } from './ui/toaster';
|
|
70
70
|
export { Toggle, toggleVariants } from './ui/toggle';
|
|
71
71
|
export { ToggleGroup, ToggleGroupItem } from './ui/toggle-group';
|
|
72
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger
|
|
72
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui/tooltip';
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
declare const alertVariantsConfig: {
|
|
4
|
+
readonly variant: {
|
|
5
|
+
readonly default: "bg-background text-foreground";
|
|
6
|
+
readonly destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
3
9
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
10
|
+
readonly variant?: "default" | "destructive" | null | undefined;
|
|
5
11
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
12
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
13
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
-
export { Alert, AlertTitle, AlertDescription };
|
|
14
|
+
export { Alert, alertVariantsConfig, AlertTitle, AlertDescription };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import type * as React from "react";
|
|
3
|
+
declare const badgeVariantsConfig: {
|
|
4
|
+
readonly variant: {
|
|
5
|
+
readonly default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90";
|
|
6
|
+
readonly secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90";
|
|
7
|
+
readonly destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60";
|
|
8
|
+
readonly outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
3
11
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
12
|
+
readonly variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
14
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
15
|
asChild?: boolean;
|
|
8
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Badge, badgeVariants };
|
|
17
|
+
export { Badge, badgeVariants, badgeVariantsConfig };
|
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
declare const buttonVariantsConfig: {
|
|
4
|
+
readonly variant: {
|
|
5
|
+
readonly default: "bg-primary text-primary-foreground hover:bg-primary/90";
|
|
6
|
+
readonly destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60";
|
|
7
|
+
readonly outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50";
|
|
8
|
+
readonly secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80";
|
|
9
|
+
readonly ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50";
|
|
10
|
+
readonly link: "text-primary underline-offset-4 hover:underline";
|
|
11
|
+
readonly red: "bg-red-500 text-white hover:bg-red-600";
|
|
12
|
+
readonly yellow: "bg-yellow-500 text-white hover:bg-yellow-600";
|
|
13
|
+
readonly green: "bg-green-500 text-white hover:bg-green-600";
|
|
14
|
+
readonly blue: "bg-blue-500 text-white hover:bg-blue-600";
|
|
15
|
+
readonly cyan: "bg-cyan-500 text-white hover:bg-cyan-600";
|
|
16
|
+
readonly purple: "bg-purple-500 text-white hover:bg-purple-600";
|
|
17
|
+
readonly pink: "bg-pink-500 text-white hover:bg-pink-600";
|
|
18
|
+
readonly orange: "bg-orange-500 text-white hover:bg-orange-600";
|
|
19
|
+
};
|
|
20
|
+
readonly size: {
|
|
21
|
+
readonly xs: "h-6 px-2 py-1 text-xs [&_svg]:size-3 has-[>svg]:px-1.5 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square";
|
|
22
|
+
readonly sm: "h-7 px-3 py-1.5 text-xs [&_svg]:size-3.5 has-[>svg]:px-2 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square";
|
|
23
|
+
readonly default: "h-9 px-4 py-2 [&_svg]:size-4 has-[>svg]:px-3 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square";
|
|
24
|
+
readonly lg: "h-11 px-6 py-3 text-base [&_svg]:size-5 has-[>svg]:px-4 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square";
|
|
25
|
+
readonly xl: "h-13 px-8 py-4 text-lg [&_svg]:size-6 has-[>svg]:px-6 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
3
28
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "red" | "yellow" | "green" | "blue" | "cyan" | "purple" | "pink" | "orange" | null | undefined;
|
|
5
|
-
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
29
|
+
readonly variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "red" | "yellow" | "green" | "blue" | "cyan" | "purple" | "pink" | "orange" | null | undefined;
|
|
30
|
+
readonly size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
6
31
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
32
|
type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
33
|
asChild?: boolean;
|
|
@@ -10,4 +35,4 @@ type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVa
|
|
|
10
35
|
loading?: boolean;
|
|
11
36
|
};
|
|
12
37
|
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
export { Button, buttonVariants, type ButtonProps };
|
|
38
|
+
export { Button, buttonVariants, buttonVariantsConfig, type ButtonProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DayPicker, DateRange } from 'react-day-picker';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare function Calendar({ className, classNames, showOutsideDays, ...props }: React.ComponentProps<typeof DayPicker>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Calendar };
|
|
@@ -3,7 +3,7 @@ export type AsyncIdConfig<TSubsetKey extends string = string, _TSubsetMapping =
|
|
|
3
3
|
placeholderKey: string;
|
|
4
4
|
useList: <T extends TSubsetKey>(subset: T, params?: any, options?: {
|
|
5
5
|
enabled?: boolean;
|
|
6
|
-
}) => UseQueryResult<Record<string, unknown
|
|
6
|
+
}) => UseQueryResult<Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
type SubsetFieldKeys<TSubsetKey extends string, TSubsetMapping> = TSubsetKey extends keyof TSubsetMapping ? TSubsetMapping[TSubsetKey] extends Record<string, unknown> ? string & keyof TSubsetMapping[TSubsetKey] : string : string;
|
|
9
9
|
type SubsetRow<TSubsetKey extends string, TSubsetMapping> = TSubsetKey extends keyof TSubsetMapping ? TSubsetMapping[TSubsetKey] : Record<string, unknown>;
|
|
@@ -23,11 +23,13 @@ type IdAsyncSelectBaseProps<TSubsetKey extends string = string, TSubsetMapping =
|
|
|
23
23
|
clearable?: boolean;
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
className?: string;
|
|
26
|
+
/** true이면 키워드 없이도 마운트 시 전체 목록을 즉시 로드 (소규모 데이터셋에 적합) */
|
|
27
|
+
preload?: boolean;
|
|
26
28
|
multiple?: boolean;
|
|
27
29
|
value?: TValue | TValue[] | null;
|
|
28
30
|
onValueChange?: (value: TValue | TValue[] | undefined) => void;
|
|
29
31
|
onRowChange?: (row: OnRowChangeType<TSubset, TSubsetMapping>) => void;
|
|
30
32
|
};
|
|
31
33
|
export type IdAsyncSelectProps<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey> = IdAsyncSelectBaseProps<TSubsetKey, TSubsetMapping, TValue, TListParams, TSubset> & (DisplayFieldAsString<TSubset, TSubsetMapping> | DisplayFieldAsCallback<TSubset, TSubsetMapping>);
|
|
32
|
-
export declare function IdAsyncSelect<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey>({ config, subset, baseListParams, displayField, valueField, placeholder, clearable, disabled, className, multiple, value, onValueChange, onRowChange, }: IdAsyncSelectProps<TSubsetKey, TSubsetMapping, TValue, TListParams, TSubset>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function IdAsyncSelect<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey>({ config, subset, baseListParams, displayField, valueField, placeholder, clearable, disabled, className, multiple, preload, value, onValueChange, onRowChange, }: IdAsyncSelectProps<TSubsetKey, TSubsetMapping, TValue, TListParams, TSubset>): import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
export {};
|
|
@@ -6,8 +6,16 @@ declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.Dialo
|
|
|
6
6
|
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const sheetVariantsConfig: {
|
|
10
|
+
readonly side: {
|
|
11
|
+
readonly top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top";
|
|
12
|
+
readonly bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
|
|
13
|
+
readonly left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm";
|
|
14
|
+
readonly right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
9
17
|
declare const sheetVariants: (props?: ({
|
|
10
|
-
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
18
|
+
readonly side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
11
19
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
20
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
21
|
}
|
|
@@ -22,4 +30,4 @@ declare const SheetFooter: {
|
|
|
22
30
|
};
|
|
23
31
|
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
32
|
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
|
-
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
33
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, sheetVariantsConfig, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -3,8 +3,14 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
5
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const toastVariantsConfig: {
|
|
7
|
+
readonly variant: {
|
|
8
|
+
readonly default: "border bg-background text-foreground";
|
|
9
|
+
readonly destructive: "destructive group border-destructive bg-destructive text-destructive-foreground";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
6
12
|
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
13
|
+
readonly variant?: "default" | "destructive" | null | undefined;
|
|
8
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
15
|
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
16
|
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -12,4 +18,4 @@ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.T
|
|
|
12
18
|
declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
19
|
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
20
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
|
-
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
21
|
+
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, toastVariantsConfig, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -2,11 +2,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
|
-
variant?: "default" | "outline" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
readonly variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
readonly size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
-
variant?: "default" | "outline" | null | undefined;
|
|
10
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
9
|
+
readonly variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
readonly size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
declare const toggleVariantsConfig: {
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly default: "bg-transparent";
|
|
7
|
+
readonly outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground";
|
|
8
|
+
};
|
|
9
|
+
readonly size: {
|
|
10
|
+
readonly default: "h-10 px-3 min-w-10";
|
|
11
|
+
readonly sm: "h-9 px-2.5 min-w-9";
|
|
12
|
+
readonly lg: "h-11 px-5 min-w-11";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
4
15
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "outline" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
16
|
+
readonly variant?: "default" | "outline" | null | undefined;
|
|
17
|
+
readonly size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
18
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
19
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
-
variant?: "default" | "outline" | null | undefined;
|
|
10
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
20
|
+
readonly variant?: "default" | "outline" | null | undefined;
|
|
21
|
+
readonly size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
22
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "value" | "onValueChange"> & {
|
|
12
23
|
value?: boolean;
|
|
13
24
|
onValueChange?: (pressed: boolean) => void;
|
|
14
25
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
-
export { Toggle, toggleVariants };
|
|
26
|
+
export { Toggle, toggleVariants, toggleVariantsConfig };
|
package/dist/contexts/types.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export declare function useSelection<T>(allKeys: T[], defaultSelectedKeys?: T[])
|
|
|
15
15
|
deselectAll: () => void;
|
|
16
16
|
selectAll: () => void;
|
|
17
17
|
isAllSelected: boolean;
|
|
18
|
-
handleCheckboxClick: (e: React.MouseEvent<HTMLInputElement
|
|
18
|
+
handleCheckboxClick: (e: React.MouseEvent<HTMLInputElement>, index: number) => void;
|
|
19
19
|
};
|
|
20
20
|
export {};
|