@lotte-innovate/ui-component-test 0.0.47 → 0.0.49
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +281 -78
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Header/{index.js → index.jsx} +7 -4
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/Typography/Text/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Accordion/index.d.ts +1 -1
- package/dist/lib/components/Accordion/{index.js → index.jsx} +19 -7
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogAction.js → AlertDialogAction.jsx} +6 -5
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogCancel.js → AlertDialogCancel.jsx} +6 -5
- package/dist/lib/components/AlertDialog/{AlertDialogContent.js → AlertDialogContent.jsx} +9 -5
- package/dist/lib/components/AlertDialog/{AlertDialogDescription.js → AlertDialogDescription.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogRoot.js → AlertDialogRoot.jsx} +6 -14
- package/dist/lib/components/AlertDialog/{AlertDialogTitle.js → AlertDialogTitle.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogTrigger.js → AlertDialogTrigger.jsx} +6 -5
- package/dist/lib/components/AspectRatio/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Avatar/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Badge/index.d.ts +1 -1
- package/dist/lib/components/Badge/{index.js → index.jsx} +6 -5
- package/dist/lib/components/BarChart/index.d.ts +3 -2
- package/dist/lib/components/BarChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/BubbleChart/index.d.ts +3 -2
- package/dist/lib/components/BubbleChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Button/index.d.ts +1 -1
- package/dist/lib/components/Button/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Callout/{CalloutIcon.js → CalloutIcon.jsx} +10 -5
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/{CalloutRoot.js → CalloutRoot.jsx} +8 -5
- package/dist/lib/components/Callout/{CalloutText.js → CalloutText.jsx} +5 -15
- package/dist/lib/components/Card/index.d.ts +1 -1
- package/dist/lib/components/Card/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/{index.js → index.jsx} +14 -6
- package/dist/lib/components/CheckboxCard/index.d.ts +2 -2
- package/dist/lib/components/CheckboxCard/{index.js → index.jsx} +9 -7
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupItem.js → CheckboxGroupItem.jsx} +7 -15
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +2 -2
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupRoot.js → CheckboxGroupRoot.jsx} +6 -3
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuCheckboxItem.js → ContextMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/{ContextMenuContent.js → ContextMenuContent.jsx} +8 -5
- package/dist/lib/components/ContextMenu/{ContextMenuGroup.js → ContextMenuGroup.jsx} +4 -14
- package/dist/lib/components/ContextMenu/{ContextMenuItem.js → ContextMenuItem.jsx} +7 -5
- package/dist/lib/components/ContextMenu/{ContextMenuItemIndicator.js → ContextMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuLabel.js → ContextMenuLabel.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuRadioGroup.js → ContextMenuRadioGroup.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuRadioItem.js → ContextMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuRoot.js → ContextMenuRoot.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuSeparator.js → ContextMenuSeparator.jsx} +5 -15
- package/dist/lib/components/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubContent.jsx} +12 -9
- package/dist/lib/components/ContextMenu/{ContextMenuSubTrigger.js → ContextMenuSubTrigger.jsx} +11 -16
- package/dist/lib/components/ContextMenu/{ContextMenuTrigger.js → ContextMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DataList/{DataListItem.js → DataListItem.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListLabel.js → DataListLabel.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListRoot.js → DataListRoot.jsx} +7 -15
- package/dist/lib/components/DataList/{DataListValue.js → DataListValue.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogAction.js → DialogAction.jsx} +6 -16
- package/dist/lib/components/Dialog/{DialogCancel.js → DialogCancel.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogContent.js → DialogContent.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogDescription.js → DialogDescription.jsx} +5 -15
- package/dist/lib/components/Dialog/DialogRoot.d.ts +1 -1
- package/dist/lib/components/Dialog/{DialogRoot.js → DialogRoot.jsx} +6 -14
- package/dist/lib/components/Dialog/{DialogSlot.js → DialogSlot.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTitle.js → DialogTitle.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTrigger.js → DialogTrigger.jsx} +4 -14
- package/dist/lib/components/Dialog/index.d.ts +1 -1
- package/dist/lib/components/DoughnutChart/index.d.ts +3 -2
- package/dist/lib/components/DoughnutChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/DropdownMenu/{DropdonMenuRadioGroup.js → DropdonMenuRadioGroup.jsx} +3 -13
- package/dist/lib/components/DropdownMenu/{DropdonMenuSubContent.js → DropdonMenuSubContent.jsx} +12 -9
- package/dist/lib/components/DropdownMenu/{DropdownMenuCheckboxItem.js → DropdownMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/{DropdownMenuContent.js → DropdownMenuContent.jsx} +8 -5
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuItem.js → DropdownMenuItem.jsx} +7 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuItemIndicator.js → DropdownMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuLable.js → DropdownMenuLable.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuRadioItem.js → DropdownMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +2 -2
- package/dist/lib/components/DropdownMenu/{DropdownMenuRoot.js → DropdownMenuRoot.jsx} +4 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSeparator.js → DropdownMenuSeparator.jsx} +3 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuSub.js → DropdownMenuSub.jsx} +2 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSubTrigger.js → DropdownMenuSubTrigger.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuTrigger.js → DropdownMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/index.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardContent.js → HoverCardContent.jsx} +6 -5
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardRoot.js → HoverCardRoot.jsx} +6 -14
- package/dist/lib/components/HoverCard/{HoverCardTrigger.js → HoverCardTrigger.jsx} +4 -14
- package/dist/lib/components/HoverCard/index.d.ts +1 -1
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/IconButton/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Inset/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/{index.js → index.jsx} +5 -4
- package/dist/lib/components/LineChart/index.d.ts +3 -2
- package/dist/lib/components/LineChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/Menubar/{MenubarCheckboxItem.js → MenubarCheckboxItem.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarContent.js → MenubarContent.jsx} +12 -9
- package/dist/lib/components/Menubar/{MenubarItem.js → MenubarItem.jsx} +7 -5
- package/dist/lib/components/Menubar/{MenubarItemIndicator.js → MenubarItemIndicator.jsx} +6 -5
- package/dist/lib/components/Menubar/{MenubarMenu.js → MenubarMenu.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarRadioGroup.js → MenubarRadioGroup.jsx} +6 -14
- package/dist/lib/components/Menubar/{MenubarRadioItem.js → MenubarRadioItem.jsx} +9 -16
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/{MenubarRoot.js → MenubarRoot.jsx} +8 -5
- package/dist/lib/components/Menubar/{MenubarSeparator.js → MenubarSeparator.jsx} +5 -15
- package/dist/lib/components/Menubar/{MenubarSub.js → MenubarSub.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarSubContent.js → MenubarSubContent.jsx} +7 -6
- package/dist/lib/components/Menubar/{MenubarSubTrigger.js → MenubarSubTrigger.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarTrigger.js → MenubarTrigger.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuContent.js → NavigationMenuContent.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.jsx +22 -0
- package/dist/lib/components/NavigationMenu/{NavigationMenuItem.js → NavigationMenuItem.jsx} +4 -14
- package/dist/lib/components/NavigationMenu/{NavigationMenuLink.js → NavigationMenuLink.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuList.js → NavigationMenuList.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/{NavigationMenuRoot.js → NavigationMenuRoot.jsx} +7 -15
- package/dist/lib/components/NavigationMenu/{NavigationMenuTrigger.js → NavigationMenuTrigger.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuViewport.js → NavigationMenuViewport.jsx} +6 -5
- package/dist/lib/components/PieChart/index.d.ts +3 -2
- package/dist/lib/components/PieChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/Popover/{PopoverClose.js → PopoverClose.jsx} +5 -15
- package/dist/lib/components/Popover/{PopoverContent.js → PopoverContent.jsx} +6 -5
- package/dist/lib/components/Popover/PopoverRoot.d.ts +1 -1
- package/dist/lib/components/Popover/{PopoverRoot.js → PopoverRoot.jsx} +6 -14
- package/dist/lib/components/Popover/{PopoverTrigger.js → PopoverTrigger.jsx} +4 -14
- package/dist/lib/components/Popover/index.d.ts +1 -1
- package/dist/lib/components/Progress/{index.js → index.jsx} +6 -5
- package/dist/lib/components/RadarChart/index.d.ts +3 -2
- package/dist/lib/components/RadarChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Radio/index.d.ts +1 -1
- package/dist/lib/components/Radio/{index.js → index.jsx} +10 -15
- package/dist/lib/components/RadioCards/{RadioCardsItem.js → RadioCardsItem.jsx} +5 -15
- package/dist/lib/components/RadioCards/{RadioCardsRoot.js → RadioCardsRoot.jsx} +10 -5
- package/dist/lib/components/RadioGroup/{RadioGroupItem.js → RadioGroupItem.jsx} +5 -15
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +1 -1
- package/dist/lib/components/RadioGroup/{RadioGroupRoot.js → RadioGroupRoot.jsx} +9 -15
- package/dist/lib/components/ScrollArea/{index.js → index.jsx} +6 -14
- package/dist/lib/components/SegmentedControl/{SegmentedControlItem.js → SegmentedControlItem.jsx} +5 -15
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +1 -1
- package/dist/lib/components/SegmentedControl/{SegmentedControlRoot.js → SegmentedControlRoot.jsx} +7 -4
- package/dist/lib/components/SegmentedControl/index.d.ts +1 -1
- package/dist/lib/components/Select/index.d.ts +1 -1
- package/dist/lib/components/Select/{index.js → index.jsx} +27 -10
- package/dist/lib/components/Separator/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Spinner/index.d.ts +1 -1
- package/dist/lib/components/Spinner/{index.js → index.jsx} +7 -4
- package/dist/lib/components/TabNav/{index.js → index.jsx} +9 -15
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/{index.js → index.jsx} +25 -10
- package/dist/lib/components/Tabs/{index.js → index.jsx} +16 -7
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/{index.js → index.jsx} +5 -4
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/{index.js → index.jsx} +10 -5
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastActionButton.js → ToastActionButton.jsx} +7 -6
- package/dist/lib/components/Toast/ToastDescription.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastDescription.js → ToastDescription.jsx} +7 -15
- package/dist/lib/components/Toast/{ToastRoot.js → ToastRoot.jsx} +11 -5
- package/dist/lib/components/Toast/ToastTitle.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastTitle.js → ToastTitle.jsx} +5 -15
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/{ToggleWithText.js → ToggleWithText.jsx} +9 -7
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/{index.js → index.jsx} +6 -5
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupItem.js → ToggleGroupItem.jsx} +6 -16
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupRoot.js → ToggleGroupRoot.jsx} +10 -5
- package/dist/lib/components/ToggleSwitch/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Tooltip/index.d.ts +1 -1
- package/dist/lib/components/Tooltip/{index.js → index.jsx} +13 -4
- package/dist/lib/constants.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/lib/utils/useDarkMode.js +1 -1
- package/package.json +2 -4
- package/dist/globals.css +0 -4
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -31
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -141
- /package/dist/lib/components/AlertDialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Callout/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/CheckboxGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ContextMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DataList/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Dialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DropdownMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/HoverCard/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Menubar/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/NavigationMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Popover/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioCards/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/SegmentedControl/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Toast/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ToggleGroup/{index.js → index.jsx} +0 -0
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
23
|
import React from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
25
|
import { TextArea as TextAreaTheme, Theme } from '@radix-ui/themes';
|
27
|
-
import { cn } from '
|
28
|
-
import { radiusVariants, scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { radiusVariants, scalingVariants } from 'lib/constants';
|
29
28
|
var textAreaNavVariants = cva('w-[250px]', {
|
30
29
|
variants: {
|
31
30
|
size: {
|
@@ -52,7 +51,9 @@ export var TextArea = React.forwardRef(function (_a, forwardedRef) {
|
|
52
51
|
sizeTheme = '3';
|
53
52
|
if (!color)
|
54
53
|
color = 'red';
|
55
|
-
return (
|
54
|
+
return (<Theme hasBackground={false} accentColor={color}>
|
55
|
+
<TextAreaTheme ref={forwardedRef} variant={appearance} size={sizeTheme} className={cn(textAreaNavVariants({ size: size, scaling: scaling, radius: radius }), size === 'x-large' && 'rt-r-size-4', className)} {...textAreaProps}></TextAreaTheme>
|
56
|
+
</Theme>);
|
56
57
|
});
|
57
58
|
TextArea.displayName = 'TextArea';
|
58
59
|
export default TextArea;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import { TextField as TextFieldTheme } from '@radix-ui/themes';
|
4
|
-
import { IScaling } from '
|
4
|
+
import { IScaling } from 'lib/types';
|
5
5
|
export interface TextFieldProps extends VariantProps<typeof textFieldVariants> {
|
6
6
|
appearance?: 'classic' | 'soft' | 'surface';
|
7
7
|
label?: string;
|
@@ -20,11 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
23
|
import React from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
27
|
-
import { bgColorStyle, radiusVariants } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
26
|
+
import { bgColorStyle, radiusVariants } from 'lib/constants';
|
28
27
|
import { Theme, TextField as TextFieldTheme } from '@radix-ui/themes';
|
29
28
|
var textFieldVariants = cva('', {
|
30
29
|
variants: {
|
@@ -41,12 +40,18 @@ export var Root = React.forwardRef(function (_a, forwardedRef) {
|
|
41
40
|
sizeTheme = '1';
|
42
41
|
if (size === 'large')
|
43
42
|
sizeTheme = '3';
|
44
|
-
return (
|
43
|
+
return (<Theme scaling={scaling} accentColor={color} hasBackground={false}>
|
44
|
+
<TextFieldTheme.Root ref={forwardedRef} variant={appearance} size={sizeTheme} radius={radius} color={color} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
45
|
+
{children}
|
46
|
+
</TextFieldTheme.Root>
|
47
|
+
</Theme>);
|
45
48
|
});
|
46
49
|
Root.displayName = 'TextField.Root';
|
47
50
|
export var Slot = React.forwardRef(function (_a, forwardedRef) {
|
48
51
|
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
|
-
return (
|
52
|
+
return (<TextFieldTheme.Slot ref={forwardedRef} color={color} side={side} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
53
|
+
{children}
|
54
|
+
</TextFieldTheme.Slot>);
|
50
55
|
});
|
51
56
|
Slot.displayName = 'TextField.Slot';
|
52
57
|
var TextField = {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface ToastActionButtonProps extends VariantProps<typeof toastActionButtonVariants> {
|
6
6
|
altText?: string;
|
7
7
|
appearance?: IAppearance;
|
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import Button from '
|
29
|
-
import { appearanceStyle, radiusVariants, scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import Button from 'lib/components/Button';
|
28
|
+
import { appearanceStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
30
29
|
import { useToastContext } from './ToastRoot';
|
31
30
|
export var toastActionButtonVariants = cva("absolute items-center justify-center", {
|
32
31
|
variants: {
|
@@ -62,6 +61,8 @@ export var ToastActionButton = forwardRef(function (_a, ref) {
|
|
62
61
|
var buttonClassName = cn(toastActionButtonVariants({ size: size, radius: radius, scaling: scaling }), color && semantics.includes(color)
|
63
62
|
? getSemanticsStyle(color)
|
64
63
|
: appearanceStyle(appearance, color !== null && color !== void 0 ? color : 'red'), className);
|
65
|
-
return (
|
64
|
+
return (<ToastPrimitive.Action ref={ref} altText={altText} {...props} className={buttonClassName} asChild>
|
65
|
+
<Button>{children}</Button>
|
66
|
+
</ToastPrimitive.Action>);
|
66
67
|
});
|
67
68
|
ToastActionButton.displayName = 'Toast.ActionButton';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface ToastDescriptionProps extends VariantProps<typeof toastDescriptionVariants> {
|
6
6
|
contentText?: string;
|
7
7
|
appearance?: IAppearance;
|
@@ -1,14 +1,3 @@
|
|
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
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,11 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
26
14
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { useToastContext } from './ToastRoot';
|
29
17
|
export var toastDescriptionVariants = cva('flex m-0 text-wrap text-slate-11 dark:text-slateDark-11', {
|
30
18
|
variants: {
|
@@ -48,6 +36,10 @@ export var toastDescriptionVariants = cva('flex m-0 text-wrap text-slate-11 dark
|
|
48
36
|
export var ToastDescription = forwardRef(function (_a, ref) {
|
49
37
|
var className = _a.className, children = _a.children, contentText = _a.contentText, props = __rest(_a, ["className", "children", "contentText"]);
|
50
38
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
51
|
-
return (
|
39
|
+
return (<ToastPrimitive.Description ref={ref} {...props}>
|
40
|
+
<p className={cn(toastDescriptionVariants({ size: size, color: color }), className)}>
|
41
|
+
{contentText !== null && contentText !== void 0 ? contentText : children}
|
42
|
+
</p>
|
43
|
+
</ToastPrimitive.Description>);
|
52
44
|
});
|
53
45
|
ToastDescription.displayName = 'Toast.Description';
|
@@ -20,11 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef, createContext, useContext, useMemo, } from 'react';
|
23
|
+
import React, { forwardRef, createContext, useContext, useMemo, } from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
27
|
-
import { scalingVariants } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
26
|
+
import { scalingVariants } from 'lib/constants';
|
28
27
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
29
28
|
export var toastVariants = cva('flex bg-white dark:bg-slateDark-1', {
|
30
29
|
variants: {
|
@@ -84,7 +83,14 @@ export var ToastRoot = forwardRef(function (_a, ref) {
|
|
84
83
|
var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color }); }, [radius, size, scaling, color]);
|
85
84
|
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
85
|
var toastClassName = cn(toastVariants({ radius: radius, scaling: scaling, size: size, color: color }), toastRootStyle, className);
|
87
|
-
return (
|
86
|
+
return (<ToastContext.Provider value={contextValue}>
|
87
|
+
<ToastPrimitive.Provider swipeDirection="right" duration={duration}>
|
88
|
+
<ToastPrimitive.Root ref={ref} className={toastClassName} open={openToast} onOpenChange={setOpenToast} {...props}>
|
89
|
+
{children}
|
90
|
+
</ToastPrimitive.Root>
|
91
|
+
<ToastPrimitive.Viewport className={cn(toastViewportVariants({ toastPosition: toastPosition }))}/>
|
92
|
+
</ToastPrimitive.Provider>
|
93
|
+
</ToastContext.Provider>);
|
88
94
|
});
|
89
95
|
ToastRoot.displayName = 'Toast.Root';
|
90
96
|
export default ToastRoot;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface ToastTitleProps extends VariantProps<typeof toastTitleVariants> {
|
6
6
|
titleText?: string;
|
7
7
|
appearance?: IAppearance;
|
@@ -1,14 +1,3 @@
|
|
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
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,11 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
26
14
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { useToastContext } from './ToastRoot';
|
29
17
|
export var toastTitleVariants = cva('flex mb-[5px] text-slate-12 dark:text-slateDark-12 text-wrap break-words font-medium', {
|
30
18
|
variants: {
|
@@ -48,6 +36,8 @@ export var toastTitleVariants = cva('flex mb-[5px] text-slate-12 dark:text-slate
|
|
48
36
|
export var ToastTitle = forwardRef(function (_a, ref) {
|
49
37
|
var className = _a.className, children = _a.children, titleText = _a.titleText, props = __rest(_a, ["className", "children", "titleText"]);
|
50
38
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
51
|
-
return (
|
39
|
+
return (<ToastPrimitive.Title ref={ref} {...props}>
|
40
|
+
<p className={cn(toastTitleVariants({ size: size, color: color }), className)}>{titleText !== null && titleText !== void 0 ? titleText : children}</p>
|
41
|
+
</ToastPrimitive.Title>);
|
52
42
|
});
|
53
43
|
ToastTitle.displayName = 'Toast.Title';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface ToggleWithTextProps extends VariantProps<typeof toggleWithTextVariants> {
|
6
6
|
text?: string;
|
7
7
|
appearance?: IAppearance;
|
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
24
23
|
import React, { Children, forwardRef } from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
25
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
27
|
-
import { radiusVariants, toggleAppearanceStyle } from '
|
28
|
-
import { scalingVariants } from '
|
29
|
-
import { cn } from '
|
26
|
+
import { radiusVariants, toggleAppearanceStyle } from 'lib/constants';
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
28
|
+
import { cn } from 'lib/utils/utils';
|
30
29
|
var toggleWithTextVariants = cva('flex items-center justify-center box-border font-medium', {
|
31
30
|
variants: {
|
32
31
|
radius: __assign({}, radiusVariants['base']),
|
@@ -50,9 +49,12 @@ export var IconScaling = {
|
|
50
49
|
};
|
51
50
|
export var ToggleWithText = forwardRef(function (_a, ref) {
|
52
51
|
var className = _a.className, children = _a.children, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'surface' : _d, text = _a.text, props = __rest(_a, ["className", "children", "radius", "size", "scaling", "color", "appearance", "text"]);
|
53
|
-
return (
|
54
|
-
|
55
|
-
|
52
|
+
return (<TogglePrimitive.Root ref={ref} className={cn(toggleWithTextVariants({ radius: radius, size: size, scaling: scaling }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
53
|
+
{Children.map(children, function (child) {
|
54
|
+
return React.cloneElement(child, { className: IconScaling[size] });
|
55
|
+
})}
|
56
|
+
{text}
|
57
|
+
</TogglePrimitive.Root>);
|
56
58
|
});
|
57
59
|
ToggleWithText.displayName = 'ToggleWithText';
|
58
60
|
export default ToggleWithText;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export * from './ToggleWithText';
|
6
6
|
export interface ToggleProps extends VariantProps<typeof toggleVariants> {
|
7
7
|
size?: 'small' | 'medium' | 'large';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
23
|
import React, { Children, forwardRef } from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
25
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
27
|
-
import { radiusVariants, scalingVariants, toggleAppearanceStyle } from '
|
28
|
-
import { cn } from '
|
26
|
+
import { radiusVariants, scalingVariants, toggleAppearanceStyle } from 'lib/constants';
|
27
|
+
import { cn } from 'lib/utils/utils';
|
29
28
|
export * from './ToggleWithText';
|
30
29
|
var toggleVariants = cva('grid place-content-center items-center justify-center box-border"', {
|
31
30
|
variants: {
|
@@ -50,9 +49,11 @@ export var IconScaling = {
|
|
50
49
|
};
|
51
50
|
export var Toggle = forwardRef(function (_a, ref) {
|
52
51
|
var className = _a.className, children = _a.children, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'surface' : _d, props = __rest(_a, ["className", "children", "radius", "size", "scaling", "color", "appearance"]);
|
53
|
-
return (
|
52
|
+
return (<TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ radius: radius, size: size, scaling: scaling }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
53
|
+
{Children.map(children, function (child) {
|
54
54
|
return React.cloneElement(child, { className: IconScaling[size] });
|
55
|
-
})
|
55
|
+
})}
|
56
|
+
</TogglePrimitive.Root>);
|
56
57
|
});
|
57
58
|
Toggle.displayName = 'Toggle';
|
58
59
|
export default Toggle;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface ToggleGroupItemProps extends VariantProps<typeof toggleGroupItemVariants> {
|
6
6
|
appearance?: IAppearance;
|
7
7
|
size?: 'small' | 'medium' | 'large';
|
@@ -1,14 +1,3 @@
|
|
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
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,13 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
24
12
|
import React, { Children, forwardRef, useContext, } from 'react';
|
25
13
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
26
14
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { toggleAppearanceStyle } from '
|
15
|
+
import { toggleAppearanceStyle } from 'lib/constants';
|
28
16
|
import { ToggleGroupContext } from './ToggleGroupRoot';
|
29
|
-
import { cn } from '
|
17
|
+
import { cn } from 'lib/utils/utils';
|
30
18
|
export var toggleGroupItemVariants = cva('grid place-content-center mr-[-1px] first:rounded-l last:rounded-r', {
|
31
19
|
variants: {
|
32
20
|
size: {
|
@@ -47,8 +35,10 @@ export var IconScaling = {
|
|
47
35
|
export var ToggleGroupItem = forwardRef(function (_a, ref) {
|
48
36
|
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
49
37
|
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;
|
50
|
-
return (
|
38
|
+
return (<ToggleGroupPrimitive.Item ref={ref} value={value} className={cn(toggleGroupItemVariants({ size: size }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
39
|
+
{Children.map(children, function (child) {
|
51
40
|
return React.cloneElement(child, { className: IconScaling[size !== null && size !== void 0 ? size : 'medium'] });
|
52
|
-
})
|
41
|
+
})}
|
42
|
+
</ToggleGroupPrimitive.Item>);
|
53
43
|
});
|
54
44
|
ToggleGroupItem.displayName = 'ToggleGroup.Item';
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
4
|
import { toggleGroupItemVariants } from './ToggleGroupItem';
|
5
|
-
import { IAppearance, IColor } from '
|
5
|
+
import { IAppearance, IColor } from 'lib/types';
|
6
6
|
export interface ToggleGroupProps extends VariantProps<typeof toggleVariants>, VariantProps<typeof toggleGroupItemVariants> {
|
7
7
|
appearance?: IAppearance;
|
8
8
|
color?: IColor;
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { createContext, forwardRef } from 'react';
|
23
|
+
import React, { createContext, forwardRef } from 'react';
|
25
24
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { scalingVariants } from '
|
28
|
-
import { cn } from '
|
26
|
+
import { scalingVariants } from 'lib/constants';
|
27
|
+
import { cn } from 'lib/utils/utils';
|
29
28
|
var toggleVariants = cva('inline-flex', {
|
30
29
|
variants: {
|
31
30
|
scaling: __assign({}, scalingVariants),
|
@@ -43,6 +42,12 @@ export var ToggleGroupRoot = forwardRef(function (_a, ref) {
|
|
43
42
|
var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["className", "children", "scaling", "size", "color", "appearance"]);
|
44
43
|
var type = __assign({}, props).type;
|
45
44
|
var contextValue = { size: size, color: color, appearance: appearance };
|
46
|
-
return (
|
45
|
+
return (<ToggleGroupContext.Provider value={contextValue}>
|
46
|
+
{type === 'single' ? (<ToggleGroupPrimitive.Root className={cn(toggleVariants({ scaling: scaling }), className)} {...props} ref={ref}>
|
47
|
+
{children}
|
48
|
+
</ToggleGroupPrimitive.Root>) : (<ToggleGroupPrimitive.Root className={cn(toggleVariants({ scaling: scaling }), className)} {...props} ref={ref}>
|
49
|
+
{children}
|
50
|
+
</ToggleGroupPrimitive.Root>)}
|
51
|
+
</ToggleGroupContext.Provider>);
|
47
52
|
});
|
48
53
|
ToggleGroupRoot.displayName = 'ToggleGroup.Root';
|
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
23
|
import React from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
27
|
-
import { radiusVariants, scalingVariants } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
26
|
+
import { radiusVariants, scalingVariants } from 'lib/constants';
|
28
27
|
import { Switch as SwitchTheme, Theme } from '@radix-ui/themes';
|
29
|
-
import { Text } from '
|
28
|
+
import { Text } from 'lib/Typography/Text';
|
30
29
|
var toggleSwitchVariants = cva('', {
|
31
30
|
variants: {
|
32
31
|
scaling: __assign({}, scalingVariants),
|
@@ -65,7 +64,12 @@ export var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {
|
|
65
64
|
sizeTheme = '1';
|
66
65
|
if (size === 'large')
|
67
66
|
sizeTheme = '3';
|
68
|
-
return (
|
67
|
+
return (<Theme className="flex" accentColor={color} hasBackground={false}>
|
68
|
+
<Text as="label" className={cn('flex items-center', SwitchLabelVariants({ size: size, scaling: scaling }))}>
|
69
|
+
<SwitchTheme ref={forwardedRef} {...switchProps} variant={appearance} radius={radius} size={sizeTheme} color={color} className={cn(toggleSwitchVariants({ scaling: scaling, radius: radius, size: size }), className)} aria-label="Switch"></SwitchTheme>
|
70
|
+
{children}
|
71
|
+
</Text>
|
72
|
+
</Theme>);
|
69
73
|
});
|
70
74
|
ToggleSwitch.displayName = 'ToggleSwitch';
|
71
75
|
export default ToggleSwitch;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor } from '
|
4
|
+
import { IColor } from 'lib/types';
|
5
5
|
export interface TooltipProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof tooltipVariants> {
|
6
6
|
label?: string;
|
7
7
|
defaultValue?: string;
|
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
23
|
// your-tooltip.jsx
|
25
24
|
import React from 'react';
|
26
25
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { cn } from '
|
29
|
-
import { primaryColorStyle, radiusVariants, weightVariants } from '
|
27
|
+
import { cn } from 'lib/utils/utils';
|
28
|
+
import { primaryColorStyle, radiusVariants, weightVariants } from 'lib/constants';
|
30
29
|
var tooltipVariants = cva('bg-slate-12 text-slate-1 dark:bg-slateDark-12 dark:text-slateDark-1 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade select-none rounded-[4px] px-[9px] py-[6px] text-[12px] leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]', {
|
31
30
|
variants: {
|
32
31
|
weight: __assign({}, weightVariants),
|
@@ -43,7 +42,17 @@ var Tooltip = React.forwardRef(function (_a, ref) {
|
|
43
42
|
var arrowColor = color
|
44
43
|
? "fill-".concat(color, "-9 dark:fill-").concat(color, "Dark-9")
|
45
44
|
: 'fill-slate-12 dark:fill-slateDark-12';
|
46
|
-
return (
|
45
|
+
return (<TooltipPrimitive.Provider>
|
46
|
+
<TooltipPrimitive.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>
|
47
|
+
<TooltipPrimitive.Trigger className="cursor-pointer text-slate-12 dark:text-slateDark-12" asChild>
|
48
|
+
{children}
|
49
|
+
</TooltipPrimitive.Trigger>
|
50
|
+
<TooltipPrimitive.Content align="center" {...props} side={side} className={cn('mr-2', tooltipVariants({ weight: weight, radius: radius, color: color }), className)} sideOffset={5}>
|
51
|
+
{content}
|
52
|
+
<TooltipPrimitive.Arrow width={11} height={5} className={arrowColor}/>
|
53
|
+
</TooltipPrimitive.Content>
|
54
|
+
</TooltipPrimitive.Root>
|
55
|
+
</TooltipPrimitive.Provider>);
|
47
56
|
});
|
48
57
|
Tooltip.displayName = 'Tooltip';
|
49
58
|
export default Tooltip;
|
package/dist/lib/constants.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ColorStyle, DarkColorStyle, colorOptions, chartColorOptions } from '
|
2
|
-
import * as lightColors from '
|
1
|
+
import { ColorStyle, DarkColorStyle, colorOptions, chartColorOptions } from 'lib/color/constants';
|
2
|
+
import * as lightColors from 'lib/color/light';
|
3
3
|
export var radiusOptions = ['none', 'small', 'medium', 'large', 'full'];
|
4
4
|
export var typoSizeOptions = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
5
5
|
export var scalingOptions = ['90%', '95%', '100%', '105%', '110%'];
|
package/dist/lib/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './components';
|
2
|
-
export * from './Typography';
|
1
|
+
export * from './components/index';
|
2
|
+
export * from './Typography/index';
|
package/dist/lib/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './components';
|
2
|
-
export * from './Typography';
|
1
|
+
export * from './components/index';
|
2
|
+
export * from './Typography/index';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lotte-innovate/ui-component-test",
|
3
3
|
"description": "Lotte UI Library",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.49",
|
5
5
|
"private": false,
|
6
6
|
"type": "module",
|
7
7
|
"files": [
|
@@ -38,18 +38,16 @@
|
|
38
38
|
"scripts": {
|
39
39
|
"dev": "next dev",
|
40
40
|
"lint": "next lint",
|
41
|
-
"prepare": "next build",
|
42
41
|
"start": "next start",
|
43
42
|
"storybook": "cross-env NODE_OPTIONS='--max-old-space-size=8192' storybook dev -p 6006",
|
44
43
|
"chromatic": "cross-env npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN",
|
45
44
|
"compile": "tsc --jsx react-jsx",
|
46
|
-
"build": "next build && npm run compile",
|
47
45
|
"build:css": "npx tailwindcss -i src/app/globals.css -o dist/globals.css --minify",
|
48
46
|
"build-storybook": "storybook build",
|
49
47
|
"clean": "rimraf dist && mkdir dist",
|
50
48
|
"update-tailwind": "node update-tailwind-import.js",
|
51
49
|
"build:all": "npm run clean && npm run compile && node src/utils/move.js && npm run build:css && tsc-alias && npm run update-tailwind",
|
52
|
-
"publish:npm": "
|
50
|
+
"publish:npm": "rm -rf dist && mkdir dist && tsc"
|
53
51
|
},
|
54
52
|
"dependencies": {
|
55
53
|
"@babel/runtime": "^7.24.7",
|