@lotte-innovate/ui-component-test 0.1.17 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +71 -71
- package/dist/globals.css +4 -4
- package/dist/lib/components/Accordion/index.d.ts +10 -4
- package/dist/lib/components/Accordion/index.js +17 -11
- package/dist/lib/components/AlertDialog/AlertDialogAction.js +4 -2
- package/dist/lib/components/AlertDialog/AlertDialogCancel.js +9 -5
- package/dist/lib/components/AlertDialog/AlertDialogContent.js +4 -2
- package/dist/lib/components/AlertDialog/AlertDialogDescription.js +4 -2
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +16 -0
- package/dist/lib/components/AlertDialog/AlertDialogRoot.js +46 -0
- package/dist/lib/components/AlertDialog/AlertDialogTitle.js +4 -2
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.js +2 -2
- package/dist/lib/components/AlertDialog/index.d.ts +10 -19
- package/dist/lib/components/AlertDialog/index.js +15 -35
- package/dist/lib/components/Avatar/index.d.ts +3 -0
- package/dist/lib/components/Avatar/index.js +3 -2
- package/dist/lib/components/BarChart/index.d.ts +5 -3
- package/dist/lib/components/BarChart/index.js +12 -1
- package/dist/lib/components/BubbleChart/index.d.ts +3 -0
- package/dist/lib/components/Callout/CalloutIcon.js +3 -3
- package/dist/lib/components/Callout/CalloutRoot.d.ts +18 -0
- package/dist/lib/components/Callout/CalloutRoot.js +72 -0
- package/dist/lib/components/Callout/CalloutText.js +2 -2
- package/dist/lib/components/Callout/index.d.ts +6 -19
- package/dist/lib/components/Callout/index.js +7 -73
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +2 -2
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +16 -0
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +34 -0
- package/dist/lib/components/CheckboxGroup/index.d.ts +5 -16
- package/dist/lib/components/CheckboxGroup/index.js +3 -34
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +4 -2
- package/dist/lib/components/ContextMenu/ContextMenuContent.js +2 -2
- package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.js +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.js +2 -2
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +2 -2
- package/dist/lib/components/ContextMenu/ContextMenuLabel.js +2 -2
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +5 -2
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +13 -0
- package/dist/lib/components/ContextMenu/ContextMenuRoot.js +42 -0
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.js +4 -3
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +2 -2
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +2 -2
- package/dist/lib/components/ContextMenu/index.d.ts +16 -24
- package/dist/lib/components/ContextMenu/index.js +27 -52
- package/dist/lib/components/DataList/DataListItem.js +2 -2
- package/dist/lib/components/DataList/DataListLabel.js +2 -2
- package/dist/lib/components/DataList/DataListRoot.d.ts +14 -0
- package/dist/lib/components/DataList/DataListRoot.js +54 -0
- package/dist/lib/components/DataList/DataListValue.js +2 -2
- package/dist/lib/components/DataList/index.d.ts +7 -16
- package/dist/lib/components/DataList/index.js +5 -56
- package/dist/lib/components/Dialog/DialogAction.d.ts +0 -2
- package/dist/lib/components/Dialog/DialogAction.js +7 -5
- package/dist/lib/components/Dialog/DialogCancel.js +5 -3
- package/dist/lib/components/Dialog/DialogContent.js +5 -3
- package/dist/lib/components/Dialog/DialogDescription.js +5 -3
- package/dist/lib/components/Dialog/DialogRoot.d.ts +12 -0
- package/dist/lib/components/Dialog/DialogRoot.js +37 -0
- package/dist/lib/components/Dialog/DialogSlot.js +5 -3
- package/dist/lib/components/Dialog/DialogTitle.js +5 -3
- package/dist/lib/components/Dialog/DialogTrigger.js +1 -1
- package/dist/lib/components/Dialog/index.d.ts +11 -17
- package/dist/lib/components/Dialog/index.js +17 -36
- package/dist/lib/components/DoughnutChart/index.js +9 -18
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +0 -5
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +3 -4
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +5 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +7 -4
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.js +5 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +2 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.js +5 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +5 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +0 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.js +5 -6
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +8 -6
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +12 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +38 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +5 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +2 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +5 -3
- package/dist/lib/components/DropdownMenu/index.d.ts +16 -22
- package/dist/lib/components/DropdownMenu/index.js +27 -41
- package/dist/lib/components/HoverCard/HoverCardContent.js +5 -3
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +8 -0
- package/dist/lib/components/HoverCard/HoverCardRoot.js +38 -0
- package/dist/lib/components/HoverCard/HoverCardTrigger.js +1 -1
- package/dist/lib/components/HoverCard/index.d.ts +6 -9
- package/dist/lib/components/HoverCard/index.js +7 -31
- package/dist/lib/components/LineChart/index.d.ts +87 -0
- package/dist/lib/components/LineChart/index.js +58 -0
- package/dist/lib/components/Menubar/MenubarCheckboxItem.js +2 -2
- package/dist/lib/components/Menubar/MenubarContent.js +2 -2
- package/dist/lib/components/Menubar/MenubarItem.js +2 -2
- package/dist/lib/components/Menubar/MenubarItemIndicator.js +2 -2
- package/dist/lib/components/Menubar/MenubarMenu.js +1 -1
- package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -1
- package/dist/lib/components/Menubar/MenubarRadioItem.js +2 -2
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +19 -0
- package/dist/lib/components/Menubar/MenubarRoot.js +61 -0
- package/dist/lib/components/Menubar/MenubarSeparator.js +1 -1
- package/dist/lib/components/Menubar/MenubarSub.js +1 -1
- package/dist/lib/components/Menubar/MenubarSubContent.js +2 -2
- package/dist/lib/components/Menubar/MenubarSubTrigger.js +2 -2
- package/dist/lib/components/Menubar/MenubarTrigger.js +2 -2
- package/dist/lib/components/Menubar/index.d.ts +16 -30
- package/dist/lib/components/Menubar/index.js +27 -71
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.js +2 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.js +2 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuList.js +2 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +14 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +43 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +2 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +2 -2
- package/dist/lib/components/NavigationMenu/index.d.ts +11 -20
- package/dist/lib/components/NavigationMenu/index.js +9 -49
- package/dist/lib/components/PieChart/index.js +9 -18
- package/dist/lib/components/Popover/PopoverClose.js +5 -3
- package/dist/lib/components/Popover/PopoverContent.js +5 -3
- package/dist/lib/components/Popover/PopoverRoot.d.ts +9 -0
- package/dist/lib/components/Popover/PopoverRoot.js +36 -0
- package/dist/lib/components/Popover/PopoverTrigger.js +1 -1
- package/dist/lib/components/Popover/index.d.ts +7 -11
- package/dist/lib/components/Popover/index.js +9 -32
- package/dist/lib/components/RadioCards/RadioCardsItem.js +5 -3
- package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +14 -0
- package/dist/lib/components/RadioCards/RadioCardsRoot.js +46 -0
- package/dist/lib/components/RadioCards/index.d.ts +5 -13
- package/dist/lib/components/RadioCards/index.js +5 -41
- package/dist/lib/components/RadioGroup/RadioGroupItem.js +5 -3
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +16 -0
- package/dist/lib/components/RadioGroup/RadioGroupRoot.js +53 -0
- package/dist/lib/components/RadioGroup/index.d.ts +5 -15
- package/dist/lib/components/RadioGroup/index.js +5 -49
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +14 -0
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +47 -0
- package/dist/lib/components/SegmentedControl/index.d.ts +5 -14
- package/dist/lib/components/SegmentedControl/index.js +5 -46
- package/dist/lib/components/Select/index.d.ts +16 -7
- package/dist/lib/components/Select/index.js +23 -14
- package/dist/lib/components/TabNav/index.d.ts +6 -2
- package/dist/lib/components/TabNav/index.js +9 -5
- package/dist/lib/components/Table/index.d.ts +16 -7
- package/dist/lib/components/Table/index.js +23 -14
- package/dist/lib/components/Tabs/index.d.ts +10 -4
- package/dist/lib/components/Tabs/index.js +15 -9
- package/dist/lib/components/TextField/index.d.ts +6 -2
- package/dist/lib/components/TextField/index.js +8 -4
- package/dist/lib/components/Toast/ToastActionButton.js +2 -2
- package/dist/lib/components/Toast/ToastDescription.js +2 -2
- package/dist/lib/components/Toast/ToastRoot.d.ts +27 -0
- package/dist/lib/components/Toast/ToastRoot.js +90 -0
- package/dist/lib/components/Toast/ToastTitle.js +2 -2
- package/dist/lib/components/Toast/index.d.ts +7 -29
- package/dist/lib/components/Toast/index.js +9 -92
- package/dist/lib/components/ToggleGroup/{toggleGroupItem.js → ToggleGroupItem.js} +6 -4
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +18 -0
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +47 -0
- package/dist/lib/components/ToggleGroup/index.d.ts +5 -19
- package/dist/lib/components/ToggleGroup/index.js +5 -41
- package/dist/lib/components/Tooltip/index.d.ts +3 -3
- package/dist/lib/components/Tooltip/index.js +3 -2
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +1 -0
- package/dist/lib/constants.d.ts +0 -9
- package/dist/lib/constants.js +0 -7
- package/package.json +131 -132
- /package/dist/lib/components/ToggleGroup/{toggleGroupItem.d.ts → ToggleGroupItem.d.ts} +0 -0
@@ -12,6 +12,10 @@ declare const textFieldVariants: (props?: ({
|
|
12
12
|
radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
|
13
13
|
color?: string | null | undefined;
|
14
14
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
15
|
-
export declare const
|
16
|
-
export declare const
|
15
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<TextFieldTheme.RootProps & React.RefAttributes<HTMLInputElement>, "ref"> & TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
16
|
+
export declare const Slot: React.ForwardRefExoticComponent<Omit<TextFieldTheme.SlotProps & React.RefAttributes<HTMLDivElement>, "ref"> & TextFieldProps & React.RefAttributes<HTMLDivElement>>;
|
17
|
+
declare const TextField: {
|
18
|
+
Root: React.ForwardRefExoticComponent<Omit<TextFieldTheme.RootProps & React.RefAttributes<HTMLInputElement>, "ref"> & TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
19
|
+
Slot: React.ForwardRefExoticComponent<Omit<TextFieldTheme.SlotProps & React.RefAttributes<HTMLDivElement>, "ref"> & TextFieldProps & React.RefAttributes<HTMLDivElement>>;
|
20
|
+
};
|
17
21
|
export default TextField;
|
@@ -32,7 +32,7 @@ var textFieldVariants = cva('', {
|
|
32
32
|
color: bgColorStyle(),
|
33
33
|
},
|
34
34
|
});
|
35
|
-
export var
|
35
|
+
export var Root = React.forwardRef(function (_a, forwardedRef) {
|
36
36
|
var className = _a.className, color = _a.color, size = _a.size, appearance = _a.appearance, _b = _a.scaling, scaling = _b === void 0 ? '100%' : _b, radius = _a.radius, children = _a.children, sliderProps = __rest(_a, ["className", "color", "size", "appearance", "scaling", "radius", "children"]);
|
37
37
|
if (!color)
|
38
38
|
color = 'red';
|
@@ -43,10 +43,14 @@ export var TextField = React.forwardRef(function (_a, forwardedRef) {
|
|
43
43
|
sizeTheme = '3';
|
44
44
|
return (_jsx(Theme, { scaling: scaling, accentColor: color, hasBackground: false, children: _jsx(TextFieldTheme.Root, __assign({ ref: forwardedRef, variant: appearance, size: sizeTheme, radius: radius, color: color, className: cn(textFieldVariants({ radius: radius }), className) }, sliderProps, { children: children })) }));
|
45
45
|
});
|
46
|
-
|
47
|
-
export var
|
46
|
+
Root.displayName = 'TextField.Root';
|
47
|
+
export var Slot = React.forwardRef(function (_a, forwardedRef) {
|
48
48
|
var className = _a.className, color = _a.color, side = _a.side, radius = _a.radius, children = _a.children, sliderProps = __rest(_a, ["className", "color", "side", "radius", "children"]);
|
49
49
|
return (_jsx(TextFieldTheme.Slot, __assign({ ref: forwardedRef, color: color, side: side, className: cn(textFieldVariants({ radius: radius }), className) }, sliderProps, { children: children })));
|
50
50
|
});
|
51
|
-
|
51
|
+
Slot.displayName = 'TextField.Slot';
|
52
|
+
var TextField = {
|
53
|
+
Root: Root,
|
54
|
+
Slot: Slot,
|
55
|
+
};
|
52
56
|
export default TextField;
|
@@ -27,7 +27,7 @@ import { cva } from 'class-variance-authority';
|
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import Button from '../../../lib/components/Button';
|
29
29
|
import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
30
|
-
import { useToastContext } from '
|
30
|
+
import { useToastContext } from './ToastRoot';
|
31
31
|
export var toastActionButtonVariants = cva("absolute items-center justify-center", {
|
32
32
|
variants: {
|
33
33
|
radius: __assign({}, radiusVariants['base']),
|
@@ -64,4 +64,4 @@ export var ToastActionButton = forwardRef(function (_a, ref) {
|
|
64
64
|
: appearanceStyle(appearance, color !== null && color !== void 0 ? color : 'red'), className);
|
65
65
|
return (_jsx(ToastPrimitive.Action, __assign({ ref: ref, altText: altText }, props, { className: buttonClassName, asChild: true, children: _jsx(Button, { children: children }) })));
|
66
66
|
});
|
67
|
-
ToastActionButton.displayName = '
|
67
|
+
ToastActionButton.displayName = 'Toast.ActionButton';
|
@@ -25,7 +25,7 @@ import { forwardRef } from 'react';
|
|
25
25
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
|
-
import { useToastContext } from '
|
28
|
+
import { useToastContext } from './ToastRoot';
|
29
29
|
export var toastDescriptionVariants = cva('flex m-0 text-wrap text-slate-11 dark:text-slateDark-11', {
|
30
30
|
variants: {
|
31
31
|
size: {
|
@@ -50,4 +50,4 @@ export var ToastDescription = forwardRef(function (_a, ref) {
|
|
50
50
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
51
51
|
return (_jsx(ToastPrimitive.Description, __assign({ ref: ref }, props, { children: _jsx("p", { className: cn(toastDescriptionVariants({ size: size, color: color }), className), children: contentText !== null && contentText !== void 0 ? contentText : children }) })));
|
52
52
|
});
|
53
|
-
ToastDescription.displayName = '
|
53
|
+
ToastDescription.displayName = 'Toast.Description';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
3
|
+
import * as ToastPrimitive from '@radix-ui/react-toast';
|
4
|
+
import { toastTitleVariants } from './ToastTitle';
|
5
|
+
import { toastDescriptionVariants } from './ToastDescription';
|
6
|
+
import { toastActionButtonVariants } from './ToastActionButton';
|
7
|
+
export interface ToastProps extends VariantProps<typeof toastVariants>, VariantProps<typeof toastTitleVariants>, VariantProps<typeof toastDescriptionVariants>, VariantProps<typeof toastActionButtonVariants>, VariantProps<typeof toastViewportVariants> {
|
8
|
+
className?: string;
|
9
|
+
openToast?: boolean;
|
10
|
+
duration?: number;
|
11
|
+
titleText?: string;
|
12
|
+
contentText?: string;
|
13
|
+
color?: 'danger' | 'warning' | 'success' | 'information' | null;
|
14
|
+
setOpenToast?: Dispatch<SetStateAction<boolean>>;
|
15
|
+
}
|
16
|
+
export declare const toastVariants: (props?: ({
|
17
|
+
radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
|
18
|
+
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
19
|
+
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
20
|
+
color?: "danger" | "warning" | "success" | "information" | null | undefined;
|
21
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
22
|
+
export declare const toastViewportVariants: (props?: ({
|
23
|
+
toastPosition?: "top_center" | "top_left" | "top_right" | "bottom_center" | "bottom_left" | "bottom_right" | null | undefined;
|
24
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
25
|
+
export declare const useToastContext: () => ToastProps;
|
26
|
+
export declare const ToastRoot: React.ForwardRefExoticComponent<ToastPrimitive.ToastProviderProps & ToastProps & React.RefAttributes<never>>;
|
27
|
+
export default ToastRoot;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef, createContext, useContext, useMemo, } from 'react';
|
25
|
+
import { cva } from 'class-variance-authority';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
27
|
+
import { scalingVariants } from '../../../lib/constants';
|
28
|
+
import * as ToastPrimitive from '@radix-ui/react-toast';
|
29
|
+
export var toastVariants = cva('flex bg-white dark:bg-slateDark-1', {
|
30
|
+
variants: {
|
31
|
+
radius: {
|
32
|
+
none: 'rounded-none',
|
33
|
+
small: 'rounded-[3px]',
|
34
|
+
medium: 'rounded',
|
35
|
+
large: 'rounded-md',
|
36
|
+
full: 'rounded-md',
|
37
|
+
},
|
38
|
+
size: {
|
39
|
+
small: 'w-[300px] min-h-[55px] p-3',
|
40
|
+
medium: 'w-[400px] min-h-[63px] p-3',
|
41
|
+
large: 'w-[400px] min-h-[84px] p-4',
|
42
|
+
'x-large': 'w-[400px] min-h-[88px] p-4',
|
43
|
+
},
|
44
|
+
scaling: __assign({}, scalingVariants),
|
45
|
+
color: {
|
46
|
+
danger: 'bg-red-3 dark:bg-redDark-3',
|
47
|
+
warning: 'bg-amber-3 dark:bg-amberDark-3',
|
48
|
+
success: 'bg-green-3 dark:bg-greenDark-3',
|
49
|
+
information: 'bg-sky-3 dark:bg-skyDark-3',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
defaultVariants: {
|
53
|
+
radius: 'medium',
|
54
|
+
scaling: '100%',
|
55
|
+
size: 'medium',
|
56
|
+
},
|
57
|
+
});
|
58
|
+
export var toastViewportVariants = cva("[--viewport-padding:_25px] fixed flex flex-col outline-none gap-[10px]\n p-[var(--viewport-padding)] m-0 list-none z-[987654321]", {
|
59
|
+
variants: {
|
60
|
+
toastPosition: {
|
61
|
+
top_center: 'top-0 left-1/2 transform -translate-x-1/2',
|
62
|
+
top_left: 'top-0 left-0',
|
63
|
+
top_right: 'top-0 right-0',
|
64
|
+
bottom_center: 'bottom-0 left-1/2 transform -translate-x-1/2',
|
65
|
+
bottom_left: 'bottom-0 left-0',
|
66
|
+
bottom_right: 'bottom-0 right-0',
|
67
|
+
},
|
68
|
+
},
|
69
|
+
defaultVariants: {
|
70
|
+
toastPosition: 'top_right',
|
71
|
+
},
|
72
|
+
});
|
73
|
+
var ToastContext = createContext({
|
74
|
+
radius: 'medium',
|
75
|
+
scaling: '100%',
|
76
|
+
size: 'medium',
|
77
|
+
color: null,
|
78
|
+
});
|
79
|
+
export var useToastContext = function () {
|
80
|
+
return useContext(ToastContext);
|
81
|
+
};
|
82
|
+
export var ToastRoot = forwardRef(function (_a, ref) {
|
83
|
+
var className = _a.className, children = _a.children, openToast = _a.openToast, radius = _a.radius, scaling = _a.scaling, size = _a.size, color = _a.color, _b = _a.duration, duration = _b === void 0 ? 3000 : _b, _c = _a.toastPosition, toastPosition = _c === void 0 ? 'top_right' : _c, setOpenToast = _a.setOpenToast, props = __rest(_a, ["className", "children", "openToast", "radius", "scaling", "size", "color", "duration", "toastPosition", "setOpenToast"]);
|
84
|
+
var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color }); }, [radius, size, scaling, color]);
|
85
|
+
var toastRootStyle = "\n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] \n flex flex-col px-[15px] relative justify-center\n data-[state=open]:animate-slideIn \n data-[state=closed]:animate-hide \n data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] \n data-[swipe=cancel]:translate-x-0 \n data-[swipe=cancel]:transition-[transform_200ms_ease-out] \n data-[swipe=end]:animate-swipeOut\n ";
|
86
|
+
var toastClassName = cn(toastVariants({ radius: radius, scaling: scaling, size: size, color: color }), toastRootStyle, className);
|
87
|
+
return (_jsx(ToastContext.Provider, { value: contextValue, children: _jsxs(ToastPrimitive.Provider, { swipeDirection: "right", duration: duration, children: [_jsx(ToastPrimitive.Root, __assign({ ref: ref, className: toastClassName, open: openToast, onOpenChange: setOpenToast }, props, { children: children })), _jsx(ToastPrimitive.Viewport, { className: cn(toastViewportVariants({ toastPosition: toastPosition })) })] }) }));
|
88
|
+
});
|
89
|
+
ToastRoot.displayName = 'Toast.Root';
|
90
|
+
export default ToastRoot;
|
@@ -25,7 +25,7 @@ import { forwardRef } from 'react';
|
|
25
25
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
|
-
import { useToastContext } from '
|
28
|
+
import { useToastContext } from './ToastRoot';
|
29
29
|
export var toastTitleVariants = cva('flex mb-[5px] text-slate-12 dark:text-slateDark-12 text-wrap break-words font-medium', {
|
30
30
|
variants: {
|
31
31
|
size: {
|
@@ -50,4 +50,4 @@ export var ToastTitle = forwardRef(function (_a, ref) {
|
|
50
50
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
51
51
|
return (_jsx(ToastPrimitive.Title, __assign({ ref: ref }, props, { children: _jsx("p", { className: cn(toastTitleVariants({ size: size, color: color }), className), children: titleText !== null && titleText !== void 0 ? titleText : children }) })));
|
52
52
|
});
|
53
|
-
ToastTitle.displayName = '
|
53
|
+
ToastTitle.displayName = 'Toast.Title';
|
@@ -1,30 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
export * from './ToastDescription';
|
9
|
-
export * from './ToastActionButton';
|
10
|
-
export interface ToastProps extends VariantProps<typeof toastVariants>, VariantProps<typeof toastTitleVariants>, VariantProps<typeof toastDescriptionVariants>, VariantProps<typeof toastActionButtonVariants>, VariantProps<typeof toastViewportVariants> {
|
11
|
-
className?: string;
|
12
|
-
openToast?: boolean;
|
13
|
-
duration?: number;
|
14
|
-
titleText?: string;
|
15
|
-
contentText?: string;
|
16
|
-
color?: 'danger' | 'warning' | 'success' | 'information' | null;
|
17
|
-
setOpenToast?: Dispatch<SetStateAction<boolean>>;
|
18
|
-
}
|
19
|
-
export declare const toastVariants: (props?: ({
|
20
|
-
radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
|
21
|
-
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
22
|
-
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
23
|
-
color?: "danger" | "warning" | "success" | "information" | null | undefined;
|
24
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
25
|
-
export declare const toastViewportVariants: (props?: ({
|
26
|
-
toastPosition?: "top_center" | "top_left" | "top_right" | "bottom_center" | "bottom_left" | "bottom_right" | null | undefined;
|
27
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
28
|
-
export declare const useToastContext: () => ToastProps;
|
29
|
-
export declare const Toast: React.ForwardRefExoticComponent<ToastPrimitive.ToastProviderProps & ToastProps & React.RefAttributes<never>>;
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const Toast: {
|
3
|
+
Root: import("react").ForwardRefExoticComponent<import("@radix-ui/react-toast").ToastProviderProps & import("./ToastRoot").ToastProps & import("react").RefAttributes<never>>;
|
4
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastTitleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./ToastTitle").ToastTitleProps & import("react").RefAttributes<HTMLDivElement>>;
|
5
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastDescriptionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./ToastDescription").ToastDescriptionProps & import("react").RefAttributes<HTMLDivElement>>;
|
6
|
+
ActionButton: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-toast").ToastActionProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./ToastActionButton").ToastActionButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
7
|
+
};
|
30
8
|
export default Toast;
|
@@ -1,94 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
return __assign.apply(this, arguments);
|
1
|
+
import { ToastRoot as Root } from './ToastRoot';
|
2
|
+
import { ToastTitle as Title } from './ToastTitle';
|
3
|
+
import { ToastDescription as Description } from './ToastDescription';
|
4
|
+
import { ToastActionButton as ActionButton } from './ToastActionButton';
|
5
|
+
var Toast = {
|
6
|
+
Root: Root,
|
7
|
+
Title: Title,
|
8
|
+
Description: Description,
|
9
|
+
ActionButton: ActionButton,
|
11
10
|
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
-
import { forwardRef, createContext, useContext, } from 'react';
|
25
|
-
import ReactDOM from 'react-dom';
|
26
|
-
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '../../../lib/utils/utils';
|
28
|
-
import * as ToastPrimitive from '@radix-ui/react-toast';
|
29
|
-
import { scalingVariants } from '../../../lib/constants';
|
30
|
-
export * from './ToastTitle';
|
31
|
-
export * from './ToastDescription';
|
32
|
-
export * from './ToastActionButton';
|
33
|
-
export var toastVariants = cva('flex bg-white dark:bg-slateDark-1', {
|
34
|
-
variants: {
|
35
|
-
radius: {
|
36
|
-
none: 'rounded-none',
|
37
|
-
small: 'rounded-[3px]',
|
38
|
-
medium: 'rounded',
|
39
|
-
large: 'rounded-md',
|
40
|
-
full: 'rounded-md',
|
41
|
-
},
|
42
|
-
size: {
|
43
|
-
small: 'w-[300px] min-h-[55px] p-3',
|
44
|
-
medium: 'w-[400px] min-h-[63px] p-3',
|
45
|
-
large: 'w-[400px] min-h-[84px] p-4',
|
46
|
-
'x-large': 'w-[400px] min-h-[88px] p-4',
|
47
|
-
},
|
48
|
-
scaling: __assign({}, scalingVariants),
|
49
|
-
color: {
|
50
|
-
danger: 'bg-red-3 dark:bg-redDark-3',
|
51
|
-
warning: 'bg-amber-3 dark:bg-amberDark-3',
|
52
|
-
success: 'bg-green-3 dark:bg-greenDark-3',
|
53
|
-
information: 'bg-sky-3 dark:bg-skyDark-3',
|
54
|
-
},
|
55
|
-
},
|
56
|
-
defaultVariants: {
|
57
|
-
radius: 'medium',
|
58
|
-
scaling: '100%',
|
59
|
-
size: 'medium',
|
60
|
-
},
|
61
|
-
});
|
62
|
-
export var toastViewportVariants = cva("[--viewport-padding:_25px] fixed flex flex-col outline-none gap-[10px]\n p-[var(--viewport-padding)] m-0 list-none z-[987654321]", {
|
63
|
-
variants: {
|
64
|
-
toastPosition: {
|
65
|
-
top_center: 'top-0 left-1/2 transform -translate-x-1/2',
|
66
|
-
top_left: 'top-0 left-0',
|
67
|
-
top_right: 'top-0 right-0',
|
68
|
-
bottom_center: 'bottom-0 left-1/2 transform -translate-x-1/2',
|
69
|
-
bottom_left: 'bottom-0 left-0',
|
70
|
-
bottom_right: 'bottom-0 right-0',
|
71
|
-
},
|
72
|
-
},
|
73
|
-
defaultVariants: {
|
74
|
-
toastPosition: 'top_right',
|
75
|
-
},
|
76
|
-
});
|
77
|
-
var ToastContext = createContext({
|
78
|
-
radius: 'medium',
|
79
|
-
scaling: '100%',
|
80
|
-
size: 'medium',
|
81
|
-
color: null,
|
82
|
-
});
|
83
|
-
export var useToastContext = function () {
|
84
|
-
return useContext(ToastContext);
|
85
|
-
};
|
86
|
-
export var Toast = forwardRef(function (_a, ref) {
|
87
|
-
var className = _a.className, children = _a.children, openToast = _a.openToast, radius = _a.radius, scaling = _a.scaling, size = _a.size, color = _a.color, _b = _a.duration, duration = _b === void 0 ? 3000 : _b, _c = _a.toastPosition, toastPosition = _c === void 0 ? 'top_right' : _c, setOpenToast = _a.setOpenToast, props = __rest(_a, ["className", "children", "openToast", "radius", "scaling", "size", "color", "duration", "toastPosition", "setOpenToast"]);
|
88
|
-
var contextValue = { radius: radius, size: size, scaling: scaling, color: color };
|
89
|
-
var toastRootStyle = "\n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] \n flex flex-col px-[15px] relative justify-center\n data-[state=open]:animate-slideIn \n data-[state=closed]:animate-hide \n data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] \n data-[swipe=cancel]:translate-x-0 \n data-[swipe=cancel]:transition-[transform_200ms_ease-out] \n data-[swipe=end]:animate-swipeOut\n ";
|
90
|
-
var toastClassName = cn(toastVariants({ radius: radius, scaling: scaling, size: size, color: color }), toastRootStyle, className);
|
91
|
-
return ReactDOM.createPortal(_jsx(ToastContext.Provider, { value: contextValue, children: _jsxs(ToastPrimitive.Provider, { swipeDirection: "right", duration: duration, children: [_jsx(ToastPrimitive.Root, __assign({ ref: ref, className: toastClassName, open: openToast, onOpenChange: setOpenToast }, props, { children: children })), _jsx(ToastPrimitive.Viewport, { className: cn(toastViewportVariants({ toastPosition: toastPosition })) })] }) }), document.body);
|
92
|
-
});
|
93
|
-
Toast.displayName = 'Toast';
|
94
11
|
export default Toast;
|
@@ -21,10 +21,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
21
|
return t;
|
22
22
|
};
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
-
import React, { Children, forwardRef } from 'react';
|
24
|
+
import React, { Children, forwardRef, useContext, } from 'react';
|
25
25
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { toggleAppearanceStyle } from '../../../lib/constants';
|
28
|
+
import { ToggleGroupContext } from './ToggleGroupRoot';
|
28
29
|
import { cn } from '../../../lib/utils/utils';
|
29
30
|
export var toggleGroupItemVariants = cva('grid place-content-center mr-[-1px] first:rounded-l last:rounded-r', {
|
30
31
|
variants: {
|
@@ -44,9 +45,10 @@ export var IconScaling = {
|
|
44
45
|
large: 'w-[18px]',
|
45
46
|
};
|
46
47
|
export var ToggleGroupItem = forwardRef(function (_a, ref) {
|
47
|
-
var className = _a.className, children = _a.children, value = _a.value,
|
48
|
+
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
49
|
+
var _b = useContext(ToggleGroupContext), size = _b.size, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'surface' : _d;
|
48
50
|
return (_jsx(ToggleGroupPrimitive.Item, __assign({ ref: ref, value: value, className: cn(toggleGroupItemVariants({ size: size }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className) }, props, { children: Children.map(children, function (child) {
|
49
|
-
return React.cloneElement(child, { className: IconScaling[size] });
|
51
|
+
return React.cloneElement(child, { className: IconScaling[size !== null && size !== void 0 ? size : 'medium'] });
|
50
52
|
}) })));
|
51
53
|
});
|
52
|
-
ToggleGroupItem.displayName = '
|
54
|
+
ToggleGroupItem.displayName = 'ToggleGroup.Item';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import { toggleGroupItemVariants } from './ToggleGroupItem';
|
5
|
+
import { IAppearance, IColor } from '../../../lib/types';
|
6
|
+
export interface ToggleGroupProps<T> extends VariantProps<typeof toggleVariants>, VariantProps<typeof toggleGroupItemVariants> {
|
7
|
+
type?: 'single' | 'multiple';
|
8
|
+
appearance?: IAppearance;
|
9
|
+
color?: IColor;
|
10
|
+
defaultValue?: T;
|
11
|
+
value?: T;
|
12
|
+
}
|
13
|
+
declare const toggleVariants: (props?: ({
|
14
|
+
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
15
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
16
|
+
export declare const ToggleGroupContext: React.Context<ToggleGroupProps<string>>;
|
17
|
+
export declare const ToggleGroupRoot: React.ForwardRefExoticComponent<(React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<(ToggleGroupPrimitive.ToggleGroupSingleProps | ToggleGroupPrimitive.ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>> & ToggleGroupProps<string> & ToggleGroupProps<string[]>) & React.RefAttributes<HTMLDivElement>>;
|
18
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
+
var t = {};
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
+
t[p] = s[p];
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
+
t[p[i]] = s[p[i]];
|
20
|
+
}
|
21
|
+
return t;
|
22
|
+
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { createContext, forwardRef } from 'react';
|
25
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
26
|
+
import { cva } from 'class-variance-authority';
|
27
|
+
import { scalingVariants } from '../../../lib/constants';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
29
|
+
var toggleVariants = cva('inline-flex', {
|
30
|
+
variants: {
|
31
|
+
scaling: __assign({}, scalingVariants),
|
32
|
+
},
|
33
|
+
defaultVariants: {
|
34
|
+
scaling: '100%',
|
35
|
+
},
|
36
|
+
});
|
37
|
+
export var ToggleGroupContext = createContext({
|
38
|
+
size: 'medium',
|
39
|
+
color: 'red',
|
40
|
+
appearance: 'surface',
|
41
|
+
});
|
42
|
+
export var ToggleGroupRoot = forwardRef(function (_a, ref) {
|
43
|
+
var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, value = _a.value, type = _a.type, onValueChange = _a.onValueChange, scaling = _a.scaling, size = _a.size, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["className", "children", "defaultValue", "value", "type", "onValueChange", "scaling", "size", "color", "appearance"]);
|
44
|
+
var contextValue = { size: size, color: color, appearance: appearance };
|
45
|
+
return (_jsx(ToggleGroupContext.Provider, { value: contextValue, children: _jsx(ToggleGroupPrimitive.Root, __assign({ ref: ref, type: type, value: value, defaultValue: defaultValue, className: cn(toggleVariants({ scaling: scaling }), className) }, props, { children: children })) }));
|
46
|
+
});
|
47
|
+
ToggleGroupRoot.displayName = 'ToggleGroup.Root';
|
@@ -1,20 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
export * from './toggleGroupItem';
|
7
|
-
export interface ToggleGroupSingleProps extends VariantProps<typeof toggleVariants>, VariantProps<typeof toggleGroupItemVariants> {
|
8
|
-
appearance?: IAppearance;
|
9
|
-
defaultValue?: string;
|
10
|
-
value?: string;
|
11
|
-
}
|
12
|
-
export interface ToggleGroupMultipleProps extends VariantProps<typeof toggleVariants>, VariantProps<typeof toggleGroupItemVariants> {
|
13
|
-
defaultValue?: string[];
|
14
|
-
value?: string[];
|
15
|
-
}
|
16
|
-
declare const toggleVariants: (props?: ({
|
17
|
-
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
18
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
19
|
-
export declare const ToggleGroup: React.ForwardRefExoticComponent<(React.ComponentPropsWithoutRef<React.ForwardRefExoticComponent<(ToggleGroupPrimitive.ToggleGroupSingleProps | ToggleGroupPrimitive.ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>> & ToggleGroupSingleProps & ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const ToggleGroup: {
|
3
|
+
Root: import("react").ForwardRefExoticComponent<(import("react").ComponentPropsWithoutRef<import("react").ForwardRefExoticComponent<(import("@radix-ui/react-toggle-group").ToggleGroupSingleProps | import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps) & import("react").RefAttributes<HTMLDivElement>>> & import("./ToggleGroupRoot").ToggleGroupProps<string> & import("./ToggleGroupRoot").ToggleGroupProps<string[]>) & import("react").RefAttributes<HTMLDivElement>>;
|
4
|
+
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-toggle-group").ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./ToggleGroupItem").ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
5
|
+
};
|
20
6
|
export default ToggleGroup;
|
@@ -1,43 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
1
|
+
import { ToggleGroupRoot } from './ToggleGroupRoot';
|
2
|
+
import { ToggleGroupItem } from './ToggleGroupItem';
|
3
|
+
var ToggleGroup = {
|
4
|
+
Root: ToggleGroupRoot,
|
5
|
+
Item: ToggleGroupItem,
|
11
6
|
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
-
import { forwardRef } from 'react';
|
25
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
26
|
-
import { cva } from 'class-variance-authority';
|
27
|
-
import { scalingVariants } from '../../../lib/constants';
|
28
|
-
import { cn } from '../../../lib/utils/utils';
|
29
|
-
export * from './toggleGroupItem';
|
30
|
-
var toggleVariants = cva('inline-flex', {
|
31
|
-
variants: {
|
32
|
-
scaling: __assign({}, scalingVariants),
|
33
|
-
},
|
34
|
-
defaultVariants: {
|
35
|
-
scaling: '100%',
|
36
|
-
},
|
37
|
-
});
|
38
|
-
export var ToggleGroup = forwardRef(function (_a, ref) {
|
39
|
-
var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, value = _a.value, type = _a.type, onValueChange = _a.onValueChange, scaling = _a.scaling, props = __rest(_a, ["className", "children", "defaultValue", "value", "type", "onValueChange", "scaling"]);
|
40
|
-
return type === 'single' ? (_jsx(ToggleGroupPrimitive.Root, __assign({ ref: ref, type: type, value: value, defaultValue: defaultValue, className: cn(toggleVariants({ scaling: scaling }), className) }, props, { children: children }))) : (_jsx(ToggleGroupPrimitive.Root, __assign({ ref: ref, type: type, value: value, defaultValue: defaultValue, className: cn(toggleVariants({ scaling: scaling }), className) }, props, { children: children })));
|
41
|
-
});
|
42
|
-
ToggleGroup.displayName = 'ToggleGroup';
|
43
7
|
export default ToggleGroup;
|
@@ -11,10 +11,10 @@ export interface TooltipProps extends React.InputHTMLAttributes<HTMLInputElement
|
|
11
11
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
12
12
|
}
|
13
13
|
declare const tooltipVariants: (props?: ({
|
14
|
-
scaling?: number | typeof Symbol.iterator |
|
14
|
+
scaling?: number | typeof Symbol.iterator | "concat" | "indexOf" | "lastIndexOf" | "slice" | "length" | "includes" | "at" | "toLocaleString" | typeof Symbol.unscopables | "map" | "filter" | "fill" | "values" | "toString" | "pop" | "push" | "join" | "reverse" | "shift" | "sort" | "splice" | "unshift" | "every" | "some" | "forEach" | "reduce" | "reduceRight" | "find" | "findIndex" | "copyWithin" | "entries" | "keys" | "flatMap" | "flat" | "findLast" | "findLastIndex" | "toReversed" | "toSorted" | "toSpliced" | "with" | null | undefined;
|
15
15
|
weight?: "bold" | "medium" | "regular" | "semibold" | null | undefined;
|
16
16
|
radius?: "small" | "none" | "medium" | "large" | "full" | null | undefined;
|
17
17
|
color?: string | null | undefined;
|
18
18
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
19
|
-
|
20
|
-
export
|
19
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipProps & TooltipProps & React.RefAttributes<never>>;
|
20
|
+
export default Tooltip;
|
@@ -35,7 +35,7 @@ var tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:te
|
|
35
35
|
color: primaryColorStyle(),
|
36
36
|
},
|
37
37
|
});
|
38
|
-
|
38
|
+
var Tooltip = React.forwardRef(function (_a) {
|
39
39
|
var content = _a.content, scaling = _a.scaling, weight = _a.weight, color = _a.color, radius = _a.radius, children = _a.children, defaultOpen = _a.defaultOpen, open = _a.open, className = _a.className, side = _a.side, onOpenChange = _a.onOpenChange, props = __rest(_a, ["content", "scaling", "weight", "color", "radius", "children", "defaultOpen", "open", "className", "side", "onOpenChange"]);
|
40
40
|
if (!side)
|
41
41
|
side = 'top';
|
@@ -46,4 +46,5 @@ export var Tooltip = React.forwardRef(function (_a) {
|
|
46
46
|
: 'fill-slate-12 dark:fill-slateDark-12';
|
47
47
|
return (_jsx(TooltipPrimitive.Provider, { children: _jsxs(TooltipPrimitive.Root, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange, children: [_jsx(TooltipPrimitive.Trigger, { className: "cursor-pointer text-slate-12 dark:text-slateDark-12", asChild: true, children: children }), _jsxs(TooltipPrimitive.Content, __assign({ align: "center" }, props, { side: side, className: cn('mr-2', tooltipVariants({ scaling: scaling, weight: weight, radius: radius, color: color }), className), sideOffset: 5, children: [content, _jsx(TooltipPrimitive.Arrow, { width: 11, height: 5, className: arrowColor })] }))] }) }));
|
48
48
|
});
|
49
|
-
Tooltip.displayName =
|
49
|
+
Tooltip.displayName = 'Tooltip';
|
50
|
+
export default Tooltip;
|
@@ -40,6 +40,7 @@ export { default as Toast } from './Toast';
|
|
40
40
|
export { default as Toggle } from './Toggle';
|
41
41
|
export { default as ToggleGroup } from './ToggleGroup';
|
42
42
|
export { default as ToggleSwitch } from './ToggleSwitch';
|
43
|
+
export { default as Tooltip } from './Tooltip';
|
43
44
|
export { default as BubbleChart } from './BubbleChart';
|
44
45
|
export { default as RadarChart } from './RadarChart';
|
45
46
|
export { default as PieChart } from './PieChart';
|
@@ -41,6 +41,7 @@ export { default as Toast } from './Toast';
|
|
41
41
|
export { default as Toggle } from './Toggle';
|
42
42
|
export { default as ToggleGroup } from './ToggleGroup';
|
43
43
|
export { default as ToggleSwitch } from './ToggleSwitch';
|
44
|
+
export { default as Tooltip } from './Tooltip';
|
44
45
|
// Chart
|
45
46
|
export { default as BubbleChart } from './BubbleChart';
|
46
47
|
export { default as RadarChart } from './RadarChart';
|
package/dist/lib/constants.d.ts
CHANGED
@@ -437,15 +437,6 @@ export declare const chartDatasetsArgsTypes: {
|
|
437
437
|
};
|
438
438
|
};
|
439
439
|
};
|
440
|
-
'datasets[n].barThickness': {
|
441
|
-
description: string;
|
442
|
-
table: {
|
443
|
-
category: string;
|
444
|
-
type: {
|
445
|
-
summary: string;
|
446
|
-
};
|
447
|
-
};
|
448
|
-
};
|
449
440
|
'datasets[n].hoverBackgroundColor': {
|
450
441
|
description: string;
|
451
442
|
table: {
|
package/dist/lib/constants.js
CHANGED
@@ -338,13 +338,6 @@ export var chartDatasetsArgsTypes = {
|
|
338
338
|
type: { summary: 'number' },
|
339
339
|
},
|
340
340
|
},
|
341
|
-
'datasets[n].barThickness': {
|
342
|
-
description: '데이터셋 바 두께',
|
343
|
-
table: {
|
344
|
-
category: 'Dataset Props',
|
345
|
-
type: { summary: 'number' },
|
346
|
-
},
|
347
|
-
},
|
348
341
|
'datasets[n].hoverBackgroundColor': {
|
349
342
|
description: '데이터셋 마우스 호버 시 배경 색상',
|
350
343
|
table: {
|