@lotte-innovate/ui-component-test 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +163 -163
- package/dist/Typography/Header/index.d.ts +1 -1
- package/dist/Typography/Header/index.jsx +4 -4
- package/dist/Typography/Text/index.jsx +4 -4
- package/dist/Typography/index.d.ts +2 -2
- package/dist/Typography/index.js +2 -3
- package/dist/app/layout.jsx +2 -2
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +6 -39
- package/dist/app/template/colorPicker.d.ts +1 -1
- package/dist/app/template/colorPicker.jsx +7 -7
- package/dist/app/template/theme.jsx +6 -33
- package/dist/components/Accordion/index.jsx +13 -13
- package/dist/components/AlertDialog/AlertDialogAction.jsx +3 -3
- package/dist/components/AlertDialog/AlertDialogCancel.jsx +3 -3
- package/dist/components/AlertDialog/AlertDialogContent.jsx +6 -6
- package/dist/components/AlertDialog/AlertDialogDescription.jsx +3 -3
- package/dist/components/AlertDialog/AlertDialogTitle.jsx +3 -3
- package/dist/components/AlertDialog/AlertDialogTrigger.jsx +3 -3
- package/dist/components/AlertDialog/index.jsx +4 -2
- package/dist/components/AspectRatio/index.jsx +3 -3
- package/dist/components/Avatar/index.jsx +6 -6
- package/dist/components/Badge/index.jsx +2 -2
- package/dist/components/BubbleChart/index.jsx +1 -1
- package/dist/components/Button/index.jsx +3 -3
- package/dist/components/Callout/CalloutIcon.jsx +7 -7
- package/dist/components/Callout/CalloutText.jsx +3 -3
- package/dist/components/Callout/index.jsx +5 -5
- package/dist/components/Card/index.jsx +3 -3
- package/dist/components/Checkbox/index.jsx +10 -10
- package/dist/components/CheckboxCard/index.jsx +4 -4
- package/dist/components/CheckboxGroup/CheckboxGroupItem.jsx +4 -4
- package/dist/components/CheckboxGroup/index.jsx +5 -5
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.jsx +6 -6
- package/dist/components/ContextMenu/ContextMenuContent.jsx +5 -5
- package/dist/components/ContextMenu/ContextMenuGroup.jsx +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuItemIndicator.jsx +3 -3
- package/dist/components/ContextMenu/ContextMenuLabel.jsx +3 -3
- package/dist/components/ContextMenu/ContextMenuRadioGroup.jsx +4 -4
- package/dist/components/ContextMenu/ContextMenuRadioItem.jsx +6 -6
- package/dist/components/ContextMenu/ContextMenuSeparator.jsx +3 -3
- package/dist/components/ContextMenu/ContextMenuSubContent.jsx +6 -6
- package/dist/components/ContextMenu/ContextMenuSubTrigger.jsx +8 -8
- package/dist/components/ContextMenu/ContextMenuTrigger.jsx +3 -3
- package/dist/components/ContextMenu/index.jsx +5 -3
- package/dist/components/DataList/DataListItem.jsx +3 -3
- package/dist/components/DataList/DataListLabel.jsx +3 -3
- package/dist/components/DataList/DataListValue.jsx +3 -3
- package/dist/components/DataList/index.jsx +5 -5
- package/dist/components/Dialog/DialogAction.jsx +3 -3
- package/dist/components/Dialog/DialogCancel.jsx +3 -3
- package/dist/components/Dialog/DialogContent.jsx +3 -3
- package/dist/components/Dialog/DialogDescription.jsx +3 -3
- package/dist/components/Dialog/DialogSlot.jsx +3 -3
- package/dist/components/Dialog/DialogTitle.jsx +3 -3
- package/dist/components/Dialog/DialogTrigger.jsx +2 -2
- package/dist/components/Dialog/index.jsx +2 -2
- package/dist/components/DoughnutChart/index.jsx +1 -1
- package/dist/components/DropdownMenu/DropdonMenuRadioGroup.jsx +4 -4
- package/dist/components/DropdownMenu/DropdonMenuSubContent.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.jsx +6 -6
- package/dist/components/DropdownMenu/DropdownMenuContent.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuItem.jsx +4 -4
- package/dist/components/DropdownMenu/DropdownMenuItemIndicator.jsx +3 -3
- package/dist/components/DropdownMenu/DropdownMenuLable.jsx +3 -3
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.jsx +6 -6
- package/dist/components/DropdownMenu/DropdownMenuSeparator.jsx +1 -1
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.jsx +5 -5
- package/dist/components/DropdownMenu/DropdownMenuTrigger.jsx +2 -2
- package/dist/components/HoverCard/HoverCardContent.jsx +2 -2
- package/dist/components/HoverCard/HoverCardTrigger.jsx +2 -2
- package/dist/components/HoverCard/index.jsx +2 -2
- package/dist/components/IconButton/index.jsx +2 -2
- package/dist/components/Inset/index.jsx +4 -4
- package/dist/components/Label/index.jsx +2 -2
- package/dist/components/Menubar/MenubarCheckboxItem.jsx +6 -6
- package/dist/components/Menubar/MenubarContent.jsx +5 -5
- package/dist/components/Menubar/MenubarItem.jsx +4 -4
- package/dist/components/Menubar/MenubarItemIndicator.jsx +3 -3
- package/dist/components/Menubar/MenubarRadioGroup.jsx +4 -4
- package/dist/components/Menubar/MenubarRadioItem.jsx +6 -6
- package/dist/components/Menubar/MenubarSeparator.jsx +3 -3
- package/dist/components/Menubar/MenubarSubContent.jsx +3 -3
- package/dist/components/Menubar/MenubarSubTrigger.jsx +6 -6
- package/dist/components/Menubar/MenubarTrigger.jsx +3 -3
- package/dist/components/Menubar/index.jsx +5 -5
- package/dist/components/NavigationMenu/NavigationMenuContent.jsx +3 -3
- package/dist/components/NavigationMenu/NavigationMenuIndicator.jsx +4 -4
- package/dist/components/NavigationMenu/NavigationMenuItem.jsx +2 -2
- package/dist/components/NavigationMenu/NavigationMenuLink.jsx +3 -3
- package/dist/components/NavigationMenu/NavigationMenuList.jsx +4 -4
- package/dist/components/NavigationMenu/NavigationMenuTrigger.jsx +4 -4
- package/dist/components/NavigationMenu/NavigationMenuViewport.jsx +3 -3
- package/dist/components/NavigationMenu/index.jsx +5 -5
- package/dist/components/PieChart/index.jsx +1 -1
- package/dist/components/Popover/PopoverClose.jsx +2 -2
- package/dist/components/Popover/PopoverContent.jsx +2 -2
- package/dist/components/Popover/PopoverTrigger.jsx +2 -2
- package/dist/components/Popover/index.jsx +2 -2
- package/dist/components/Progress/index.jsx +2 -2
- package/dist/components/Radio/index.jsx +7 -7
- package/dist/components/RadioCards/RadioCardsItem.jsx +2 -2
- package/dist/components/RadioCards/index.jsx +4 -4
- package/dist/components/RadioGroup/RadioGroupItem.jsx +2 -2
- package/dist/components/RadioGroup/index.jsx +4 -4
- package/dist/components/ScrollArea/index.jsx +4 -4
- package/dist/components/SegmentedControl/SegmentedControlItem.jsx +2 -2
- package/dist/components/SegmentedControl/index.jsx +4 -4
- package/dist/components/Select/index.jsx +20 -18
- package/dist/components/Separator/index.jsx +5 -5
- package/dist/components/Skeleton/index.jsx +5 -5
- package/dist/components/Slider/index.jsx +3 -3
- package/dist/components/Spinner/index.jsx +4 -4
- package/dist/components/TabNav/index.jsx +6 -6
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/index.jsx +17 -17
- package/dist/components/Tabs/index.jsx +10 -10
- package/dist/components/TextArea/index.jsx +2 -2
- package/dist/components/TextField/index.jsx +7 -7
- package/dist/components/Toast/ToastActionButton.jsx +3 -3
- package/dist/components/Toast/ToastDescription.jsx +5 -5
- package/dist/components/Toast/ToastTitle.jsx +3 -3
- package/dist/components/Toast/index.jsx +8 -8
- package/dist/components/Toggle/ToggleWithText.jsx +3 -3
- package/dist/components/Toggle/index.jsx +2 -2
- package/dist/components/ToggleGroup/index.jsx +4 -4
- package/dist/components/ToggleGroup/toggleGroupItem.jsx +2 -2
- package/dist/components/ToggleSwitch/index.jsx +5 -5
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.jsx +11 -11
- package/dist/components/index.d.ts +0 -2
- package/dist/index.d.ts +2 -5
- package/dist/index.js +0 -3
- package/dist/stories/Welcome.jsx +19 -19
- package/dist/stories/accordion/Accordion.stories.jsx +19 -19
- package/dist/stories/alert-dialog/AlertDialog.stories.jsx +14 -14
- package/dist/stories/aspect-ratio/AspectRatio.stories.jsx +29 -29
- package/dist/stories/avatar/Avatar.stories.jsx +12 -12
- package/dist/stories/badge/Badge.stories.jsx +44 -44
- package/dist/stories/bubble-chart/BubbleChart.stories.jsx +9 -9
- package/dist/stories/button/Button.stories.jsx +34 -34
- package/dist/stories/button/IconButton.stories.jsx +14 -14
- package/dist/stories/callout/Callout.stories.jsx +107 -107
- package/dist/stories/card/Card.stories.jsx +51 -51
- package/dist/stories/checkbox/Checkbox.stories.jsx +57 -57
- package/dist/stories/checkbox/CheckboxCard.stories.jsx +36 -36
- package/dist/stories/checkbox/CheckboxGroup.stories.jsx +73 -73
- package/dist/stories/context-menu/ContextMenu.stories.jsx +70 -70
- package/dist/stories/data-list/DataList.stories.jsx +102 -102
- package/dist/stories/dialog/Dialog.stories.jsx +24 -24
- package/dist/stories/doughnut-chart/DoughnutChart.stories.jsx +9 -9
- package/dist/stories/dropdown-menu/DropdownMenu.stories.jsx +96 -96
- package/dist/stories/header/Header.stories.jsx +20 -20
- package/dist/stories/hover-card/HoverCard.stories.jsx +28 -28
- package/dist/stories/inset/Inset.stories.jsx +16 -16
- package/dist/stories/label/Label.stories.jsx +22 -22
- package/dist/stories/menubar/Menubar.stories.jsx +38 -38
- package/dist/stories/navigation-menu/NavigationMenu.stories.d.ts +11 -11
- package/dist/stories/navigation-menu/NavigationMenu.stories.jsx +67 -67
- package/dist/stories/pie-chart/PieChart.stories.jsx +20 -20
- package/dist/stories/popover/Popover.stories.jsx +34 -34
- package/dist/stories/progress/Progress.stories.jsx +6 -6
- package/dist/stories/radio/Radio.stories.jsx +11 -11
- package/dist/stories/radio/RadioCards.stories.jsx +60 -60
- package/dist/stories/radio/RadioGroup.stories.jsx +55 -55
- package/dist/stories/scroll-area/ScrollArea.stories.jsx +61 -61
- package/dist/stories/segmented-control/SegmentedControl.stories.jsx +22 -22
- package/dist/stories/select/Select.stories.jsx +62 -62
- package/dist/stories/separator/Separator.stories.jsx +25 -25
- package/dist/stories/skeleton/Skeleton.stories.jsx +28 -28
- package/dist/stories/slider/Slider.stories.jsx +12 -12
- package/dist/stories/spinner/Spinner.stories.jsx +26 -26
- package/dist/stories/switch/Switch.stories.jsx +12 -12
- package/dist/stories/tab-nav/TabNav.stories.jsx +10 -10
- package/dist/stories/table/Table.stories.jsx +28 -28
- package/dist/stories/tabs/Tabs.stories.jsx +18 -18
- package/dist/stories/text/Text.stories.jsx +16 -16
- package/dist/stories/textArea/TextArea.stories.jsx +17 -17
- package/dist/stories/textfield/TextField.stories.jsx +33 -33
- package/dist/stories/toast/Toast.stories.jsx +19 -19
- package/dist/stories/toggle/Toggle.stories.jsx +18 -18
- package/dist/stories/toggle/ToggleGroup.stories.jsx +34 -34
- package/dist/stories/tooltip/Tooltip.stories.jsx +14 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +120 -118
- package/dist/app/template/badgeTemplate.d.ts +0 -12
- package/dist/app/template/badgeTemplate.jsx +0 -82
- package/dist/app/template/buttonTemplate.d.ts +0 -12
- package/dist/app/template/buttonTemplate.jsx +0 -82
- package/dist/app/template/textTemplate.d.ts +0 -11
- package/dist/app/template/textTemplate.jsx +0 -72
@@ -41,10 +41,10 @@ export var SegmentedControl = forwardRef(function (_a, ref) {
|
|
41
41
|
sizeTheme = '1';
|
42
42
|
if (size === 'large')
|
43
43
|
sizeTheme = '3';
|
44
|
-
return (<Theme>
|
45
|
-
<SegmentedControlTheme.Root ref={ref} size={sizeTheme} radius={radius} variant={appearance} className={cn(segmentedControlVariants({ scaling: scaling }), className)} {...props}>
|
46
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { appearance: appearance }); })}
|
47
|
-
</SegmentedControlTheme.Root>
|
44
|
+
return (<Theme>
|
45
|
+
<SegmentedControlTheme.Root ref={ref} size={sizeTheme} radius={radius} variant={appearance} className={cn(segmentedControlVariants({ scaling: scaling }), className)} {...props}>
|
46
|
+
{Children.map(children, function (child) { return React.cloneElement(child, { appearance: appearance }); })}
|
47
|
+
</SegmentedControlTheme.Root>
|
48
48
|
</Theme>);
|
49
49
|
});
|
50
50
|
SegmentedControl.displayName = 'SegmentedControl';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import { Theme, Select as SelectTheme } from '@radix-ui/themes';
|
24
24
|
import React from 'react';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { radiusVariants, selectAppearanceStyle } from '../../constants';
|
28
28
|
var selectVariants = cva('', {
|
29
29
|
variants: {
|
@@ -33,17 +33,19 @@ var selectVariants = cva('', {
|
|
33
33
|
radius: 'medium',
|
34
34
|
},
|
35
35
|
});
|
36
|
-
export var Select = React.forwardRef(function (_a) {
|
36
|
+
export var Select = React.forwardRef(function (_a, ref) {
|
37
37
|
var scaling = _a.scaling, size = _a.size, color = _a.color, children = _a.children, props = __rest(_a, ["scaling", "size", "color", "children"]);
|
38
38
|
var sizeTheme = '2';
|
39
39
|
if (size === 'small')
|
40
40
|
sizeTheme = '1';
|
41
41
|
if (size === 'large')
|
42
42
|
sizeTheme = '3';
|
43
|
-
return (<Theme scaling={scaling} accentColor={color} hasBackground={false}>
|
44
|
-
<
|
45
|
-
{
|
46
|
-
|
43
|
+
return (<Theme scaling={scaling} accentColor={color} hasBackground={false}>
|
44
|
+
<div ref={ref}>
|
45
|
+
<SelectTheme.Root size={sizeTheme} {...props}>
|
46
|
+
{children}
|
47
|
+
</SelectTheme.Root>
|
48
|
+
</div>
|
47
49
|
</Theme>);
|
48
50
|
});
|
49
51
|
Select.displayName = 'Select';
|
@@ -51,8 +53,8 @@ export var SelectTrigger = React.forwardRef(function (_a, forwardedRef) {
|
|
51
53
|
var _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, color = _a.color, size = _a.size, radius = _a.radius, children = _a.children, className = _a.className, props = __rest(_a, ["appearance", "color", "size", "radius", "children", "className"]);
|
52
54
|
if (!color)
|
53
55
|
color = 'red';
|
54
|
-
return (<SelectTheme.Trigger ref={forwardedRef} variant={appearance} radius={radius} className={cn(selectVariants({ radius: radius }), selectAppearanceStyle(appearance, color), className)} {...props}>
|
55
|
-
{children}
|
56
|
+
return (<SelectTheme.Trigger ref={forwardedRef} variant={appearance} radius={radius} className={cn(selectVariants({ radius: radius }), selectAppearanceStyle(appearance, color), className)} {...props}>
|
57
|
+
{children}
|
56
58
|
</SelectTheme.Trigger>);
|
57
59
|
});
|
58
60
|
SelectTrigger.displayName = 'SelectTrigger';
|
@@ -62,36 +64,36 @@ export var SelectContent = React.forwardRef(function (_a, forwardedRef) {
|
|
62
64
|
color = 'red';
|
63
65
|
if (radius === 'full')
|
64
66
|
radius = 'large';
|
65
|
-
return (<SelectTheme.Content ref={forwardedRef} color={color} {...props} className={cn(selectVariants({ radius: radius }), className)}>
|
66
|
-
{children}
|
67
|
+
return (<SelectTheme.Content ref={forwardedRef} color={color} {...props} className={cn(selectVariants({ radius: radius }), className)}>
|
68
|
+
{children}
|
67
69
|
</SelectTheme.Content>);
|
68
70
|
});
|
69
71
|
SelectContent.displayName = 'SelectContent';
|
70
72
|
export var SelectItem = React.forwardRef(function (_a, forwardedRef) {
|
71
73
|
var value = _a.value, children = _a.children, className = _a.className, radius = _a.radius, props = __rest(_a, ["value", "children", "className", "radius"]);
|
72
|
-
return (<SelectTheme.Item ref={forwardedRef} value={value} {...props} className={cn(selectVariants({ radius: radius }), className)}>
|
73
|
-
{children}
|
74
|
+
return (<SelectTheme.Item ref={forwardedRef} value={value} {...props} className={cn(selectVariants({ radius: radius }), className)}>
|
75
|
+
{children}
|
74
76
|
</SelectTheme.Item>);
|
75
77
|
});
|
76
78
|
SelectItem.displayName = 'SelectItem';
|
77
79
|
export var SelectGroup = React.forwardRef(function (_a, forwardedRef) {
|
78
80
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
79
|
-
return (<SelectTheme.Group ref={forwardedRef} {...props} className={className}>
|
80
|
-
{children}
|
81
|
+
return (<SelectTheme.Group ref={forwardedRef} {...props} className={className}>
|
82
|
+
{children}
|
81
83
|
</SelectTheme.Group>);
|
82
84
|
});
|
83
85
|
SelectGroup.displayName = 'SelectGroup';
|
84
86
|
export var SelectLabel = React.forwardRef(function (_a, forwardedRef) {
|
85
87
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
86
|
-
return (<SelectTheme.Label ref={forwardedRef} {...props} className={className}>
|
87
|
-
{children}
|
88
|
+
return (<SelectTheme.Label ref={forwardedRef} {...props} className={className}>
|
89
|
+
{children}
|
88
90
|
</SelectTheme.Label>);
|
89
91
|
});
|
90
92
|
SelectLabel.displayName = 'SelectLabel';
|
91
93
|
export var SelectSeparator = React.forwardRef(function (_a, forwardedRef) {
|
92
94
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
93
|
-
return (<SelectTheme.Separator ref={forwardedRef} {...props} className={className}>
|
94
|
-
{children}
|
95
|
+
return (<SelectTheme.Separator ref={forwardedRef} {...props} className={className}>
|
96
|
+
{children}
|
95
97
|
</SelectTheme.Separator>);
|
96
98
|
});
|
97
99
|
SelectSeparator.displayName = 'SelectSeparator';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React from 'react';
|
24
24
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { bgColorStyle, scalingVariants } from '../../constants';
|
27
27
|
import { Separator as SeparatorTheme, Theme } from '@radix-ui/themes';
|
28
28
|
var separatorVariants = cva('', {
|
@@ -40,10 +40,10 @@ export var Separator = React.forwardRef(function (_a, forwardedRef) {
|
|
40
40
|
sizeTheme = '3';
|
41
41
|
if (size === 'fill-large')
|
42
42
|
sizeTheme = '4';
|
43
|
-
return (<Theme hasBackground={false} className="flex justify-center items-center">
|
44
|
-
<SeparatorTheme orientation={orientation} size={sizeTheme} className={cn("bg-".concat(color, "A-6 dark:bg-").concat(color, "DarkA-6"), separatorVariants({ scaling: scaling }), className)} {...props}>
|
45
|
-
{children}
|
46
|
-
</SeparatorTheme>
|
43
|
+
return (<Theme hasBackground={false} className="flex justify-center items-center">
|
44
|
+
<SeparatorTheme orientation={orientation} size={sizeTheme} className={cn("bg-".concat(color, "A-6 dark:bg-").concat(color, "DarkA-6"), separatorVariants({ scaling: scaling }), className)} {...props}>
|
45
|
+
{children}
|
46
|
+
</SeparatorTheme>
|
47
47
|
</Theme>);
|
48
48
|
});
|
49
49
|
Separator.displayName = 'Separator';
|
@@ -24,7 +24,7 @@ import React from 'react';
|
|
24
24
|
import '@radix-ui/themes/styles.css';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { Theme, Skeleton as SkeletonTheme } from '@radix-ui/themes';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
import { radiusVariants } from '../../constants';
|
29
29
|
var separatorVariants = cva('', {
|
30
30
|
variants: {
|
@@ -36,10 +36,10 @@ var separatorVariants = cva('', {
|
|
36
36
|
});
|
37
37
|
export var Skeleton = React.forwardRef(function (_a, forwardedRef) {
|
38
38
|
var children = _a.children, className = _a.className, radius = _a.radius, loading = _a.loading, width = _a.width, height = _a.height, skeletonProps = __rest(_a, ["children", "className", "radius", "loading", "width", "height"]);
|
39
|
-
return (<Theme>
|
40
|
-
<SkeletonTheme ref={forwardedRef} loading={loading} width={width} height={height} className={cn('', radius && cn(separatorVariants({ radius: radius }), className))} {...skeletonProps}>
|
41
|
-
{children}
|
42
|
-
</SkeletonTheme>
|
39
|
+
return (<Theme>
|
40
|
+
<SkeletonTheme ref={forwardedRef} loading={loading} width={width} height={height} className={cn('', radius && cn(separatorVariants({ radius: radius }), className))} {...skeletonProps}>
|
41
|
+
{children}
|
42
|
+
</SkeletonTheme>
|
43
43
|
</Theme>);
|
44
44
|
});
|
45
45
|
Skeleton.displayName = 'Skeleton';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React from 'react';
|
24
24
|
import '@radix-ui/themes/styles.css';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { radiusVariants } from '../../constants';
|
28
28
|
import { Theme, Slider as SliderTheme } from '@radix-ui/themes';
|
29
29
|
var sliderVariants = cva('relative flex items-center select-none touch-none w-[200px] h-5', {
|
@@ -43,8 +43,8 @@ export var Slider = React.forwardRef(function (_a, forwardedRef) {
|
|
43
43
|
sizeTheme = '1';
|
44
44
|
if (size === 'large')
|
45
45
|
sizeTheme = '3';
|
46
|
-
return (<Theme accentColor={color} scaling={scaling} hasBackground={false}>
|
47
|
-
<SliderTheme ref={forwardedRef} variant={appearance} size={sizeTheme} radius={radius} color={color} className={cn(sliderVariants({ radius: radius }), className)} {...sliderProps}/>
|
46
|
+
return (<Theme accentColor={color} scaling={scaling} hasBackground={false}>
|
47
|
+
<SliderTheme ref={forwardedRef} variant={appearance} size={sizeTheme} radius={radius} color={color} className={cn(sliderVariants({ radius: radius }), className)} {...sliderProps}/>
|
48
48
|
</Theme>);
|
49
49
|
});
|
50
50
|
Slider.displayName = 'Slider';
|
@@ -40,10 +40,10 @@ export var Spinner = React.forwardRef(function (_a, forwardedRef) {
|
|
40
40
|
sizeTheme = '1';
|
41
41
|
if (size === 'large')
|
42
42
|
sizeTheme = '3';
|
43
|
-
return (<Theme hasBackground={false}>
|
44
|
-
<SpinnerTheme ref={forwardedRef} loading={loading} size={sizeTheme} className={cn('', spinnerVariants({ scaling: scaling }), className)} {...spinnerProps}>
|
45
|
-
{children}
|
46
|
-
</SpinnerTheme>
|
43
|
+
return (<Theme hasBackground={false}>
|
44
|
+
<SpinnerTheme ref={forwardedRef} loading={loading} size={sizeTheme} className={cn('', spinnerVariants({ scaling: scaling }), className)} {...spinnerProps}>
|
45
|
+
{children}
|
46
|
+
</SpinnerTheme>
|
47
47
|
</Theme>);
|
48
48
|
});
|
49
49
|
Spinner.displayName = 'Spinner';
|
@@ -23,17 +23,17 @@ export var TabNav = React.forwardRef(function (_a, ref) {
|
|
23
23
|
var sizeTheme = '2';
|
24
24
|
if (size === 'small')
|
25
25
|
sizeTheme = '1';
|
26
|
-
return (<Theme accentColor={color} hasBackground={false}>
|
27
|
-
<TabNavTheme.Root ref={ref} size={sizeTheme} className={cn('', tabNavVariants({}), className)} {...rootProps}>
|
28
|
-
{children}
|
29
|
-
</TabNavTheme.Root>
|
26
|
+
return (<Theme accentColor={color} hasBackground={false}>
|
27
|
+
<TabNavTheme.Root ref={ref} size={sizeTheme} className={cn('', tabNavVariants({}), className)} {...rootProps}>
|
28
|
+
{children}
|
29
|
+
</TabNavTheme.Root>
|
30
30
|
</Theme>);
|
31
31
|
});
|
32
32
|
TabNav.displayName = 'TabNav';
|
33
33
|
export var TabNavLink = React.forwardRef(function (_a, ref) {
|
34
34
|
var className = _a.className, children = _a.children, href = _a.href, linkProps = __rest(_a, ["className", "children", "href"]);
|
35
|
-
return (<TabNavTheme.Link ref={ref} className={cn('text-slateA-11 dark:text-slateDarkA-11 data-[state=active]:text-slateA-12 dark:data-[state=active]:text-slateDarkA-12', tabNavVariants({}), className)} href={href} {...linkProps}>
|
36
|
-
{children}
|
35
|
+
return (<TabNavTheme.Link ref={ref} className={cn('text-slateA-11 dark:text-slateDarkA-11 data-[state=active]:text-slateA-12 dark:data-[state=active]:text-slateDarkA-12', tabNavVariants({}), className)} href={href} {...linkProps}>
|
36
|
+
{children}
|
37
37
|
</TabNavTheme.Link>);
|
38
38
|
});
|
39
39
|
TabNavLink.displayName = 'TabNav.Link';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import { IColor } from 'types';
|
4
|
+
import { Table as TableTheme } from '@radix-ui/themes';
|
4
5
|
export interface TableProps extends VariantProps<typeof tableVariants> {
|
5
6
|
color?: IColor;
|
6
7
|
appearance?: 'ghost' | 'surface';
|
@@ -14,7 +15,7 @@ export declare const Table: React.ForwardRefExoticComponent<Omit<React.DetailedH
|
|
14
15
|
export declare const TableHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableSectionElement>>;
|
15
16
|
export declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableSectionElement>>;
|
16
17
|
export declare const TableRow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableRowElement>>;
|
17
|
-
export declare const TableCell: React.ForwardRefExoticComponent<Omit<
|
18
|
+
export declare const TableCell: React.ForwardRefExoticComponent<Omit<TableTheme.CellProps & React.RefAttributes<HTMLTableDataCellElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableDataCellElement>>;
|
18
19
|
export declare const TableColumnHeaderCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableHeaderCellElement>>;
|
19
20
|
export declare const TableRowHeaderCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & TableProps & React.RefAttributes<HTMLTableHeaderCellElement>>;
|
20
21
|
export default Table;
|
@@ -43,7 +43,7 @@ var tableRowVariants = cva('', {
|
|
43
43
|
},
|
44
44
|
},
|
45
45
|
});
|
46
|
-
export var Table = React.forwardRef(function (_a) {
|
46
|
+
export var Table = React.forwardRef(function (_a, ref) {
|
47
47
|
var className = _a.className, children = _a.children, appearance = _a.appearance, scaling = _a.scaling, size = _a.size, radius = _a.radius, tableProps = __rest(_a, ["className", "children", "appearance", "scaling", "size", "radius"]);
|
48
48
|
var sizeTheme = '2';
|
49
49
|
if (size === 'small')
|
@@ -52,52 +52,52 @@ export var Table = React.forwardRef(function (_a) {
|
|
52
52
|
sizeTheme = '3';
|
53
53
|
if (radius === 'full')
|
54
54
|
radius = 'large';
|
55
|
-
return (<Theme hasBackground={false}>
|
56
|
-
<TableTheme.Root className={cn('', tableVariants({ scaling: scaling, radius: radius }), className)} variant={appearance} size={sizeTheme} {...tableProps}>
|
57
|
-
{children}
|
58
|
-
</TableTheme.Root>
|
55
|
+
return (<Theme hasBackground={false}>
|
56
|
+
<TableTheme.Root ref={ref} className={cn('', tableVariants({ scaling: scaling, radius: radius }), className)} variant={appearance} size={sizeTheme} {...tableProps}>
|
57
|
+
{children}
|
58
|
+
</TableTheme.Root>
|
59
59
|
</Theme>);
|
60
60
|
});
|
61
61
|
Table.displayName = 'Table';
|
62
62
|
export var TableHeader = React.forwardRef(function (_a, forwardedRef) {
|
63
63
|
var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
|
64
|
-
return (<TableTheme.Header ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
65
|
-
{children}
|
64
|
+
return (<TableTheme.Header ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
65
|
+
{children}
|
66
66
|
</TableTheme.Header>);
|
67
67
|
});
|
68
68
|
TableHeader.displayName = 'TableHeader';
|
69
69
|
export var TableBody = React.forwardRef(function (_a, forwardedRef) {
|
70
70
|
var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
|
71
|
-
return (<TableTheme.Body ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
72
|
-
{children}
|
71
|
+
return (<TableTheme.Body ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
72
|
+
{children}
|
73
73
|
</TableTheme.Body>);
|
74
74
|
});
|
75
75
|
TableBody.displayName = 'TableBody';
|
76
76
|
export var TableRow = React.forwardRef(function (_a, forwardedRef) {
|
77
77
|
var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
|
78
|
-
return (<TableTheme.Row ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
79
|
-
{children}
|
78
|
+
return (<TableTheme.Row ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
79
|
+
{children}
|
80
80
|
</TableTheme.Row>);
|
81
81
|
});
|
82
82
|
TableRow.displayName = 'TableRow';
|
83
83
|
export var TableCell = React.forwardRef(function (_a, forwardedRef) {
|
84
84
|
var className = _a.className, children = _a.children, scaling = _a.scaling, cellProps = __rest(_a, ["className", "children", "scaling"]);
|
85
|
-
return (<TableTheme.Cell className={cn('', tableVariants({ scaling: scaling }), className)}>
|
86
|
-
{children}
|
85
|
+
return (<TableTheme.Cell className={cn('', tableVariants({ scaling: scaling }), className)} {...cellProps} ref={forwardedRef}>
|
86
|
+
{children}
|
87
87
|
</TableTheme.Cell>);
|
88
88
|
});
|
89
89
|
TableCell.displayName = 'TableCell';
|
90
90
|
export var TableColumnHeaderCell = React.forwardRef(function (_a, forwardedRef) {
|
91
91
|
var className = _a.className, children = _a.children, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "scaling", "size"]);
|
92
|
-
return (<TableTheme.ColumnHeaderCell ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: size }), className)} {...props}>
|
93
|
-
{children}
|
92
|
+
return (<TableTheme.ColumnHeaderCell ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), tableRowVariants({ size: size }), className)} {...props}>
|
93
|
+
{children}
|
94
94
|
</TableTheme.ColumnHeaderCell>);
|
95
95
|
});
|
96
96
|
TableColumnHeaderCell.displayName = 'TableColumnHeaderCell';
|
97
97
|
export var TableRowHeaderCell = React.forwardRef(function (_a, forwardedRef) {
|
98
98
|
var className = _a.className, children = _a.children, scaling = _a.scaling, props = __rest(_a, ["className", "children", "scaling"]);
|
99
|
-
return (<TableTheme.RowHeaderCell ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
100
|
-
{children}
|
99
|
+
return (<TableTheme.RowHeaderCell ref={forwardedRef} className={cn('', tableVariants({ scaling: scaling }), className)} {...props}>
|
100
|
+
{children}
|
101
101
|
</TableTheme.RowHeaderCell>);
|
102
102
|
});
|
103
103
|
TableRowHeaderCell.displayName = 'TableRowHeaderCell';
|
@@ -34,10 +34,10 @@ export var Tabs = React.forwardRef(function (_a, forwardedRef) {
|
|
34
34
|
var className = _a.className, children = _a.children, color = _a.color, rootProps = __rest(_a, ["className", "children", "color"]);
|
35
35
|
if (!color)
|
36
36
|
color = 'red';
|
37
|
-
return (<Theme accentColor={color} hasBackground={false}>
|
38
|
-
<TabsTheme.Root {...rootProps} ref={forwardedRef} className={cn('', className)}>
|
39
|
-
{children}
|
40
|
-
</TabsTheme.Root>
|
37
|
+
return (<Theme accentColor={color} hasBackground={false}>
|
38
|
+
<TabsTheme.Root {...rootProps} ref={forwardedRef} className={cn('', className)}>
|
39
|
+
{children}
|
40
|
+
</TabsTheme.Root>
|
41
41
|
</Theme>);
|
42
42
|
});
|
43
43
|
Tabs.displayName = 'Tabs';
|
@@ -46,22 +46,22 @@ export var TabsList = React.forwardRef(function (_a, forwardedRef) {
|
|
46
46
|
var sizeTheme = '2';
|
47
47
|
if (size === 'small')
|
48
48
|
sizeTheme = '1';
|
49
|
-
return (<TabsTheme.List ref={forwardedRef} size={sizeTheme} {...listProps} className={cn('', className)}>
|
50
|
-
{children}
|
49
|
+
return (<TabsTheme.List ref={forwardedRef} size={sizeTheme} {...listProps} className={cn('', className)}>
|
50
|
+
{children}
|
51
51
|
</TabsTheme.List>);
|
52
52
|
});
|
53
53
|
TabsList.displayName = 'TabsList';
|
54
54
|
export var TabsTrigger = React.forwardRef(function (_a, forwardedRef) {
|
55
55
|
var className = _a.className, weight = _a.weight, children = _a.children, triggerProps = __rest(_a, ["className", "weight", "children"]);
|
56
|
-
return (<TabsTheme.Trigger ref={forwardedRef} className={cn('text-slateA-11 dark:text-slateDarkA-11 data-[state=active]:text-slateA-12 dark:data-[state=active]:text-slateDarkA-12', className)} {...triggerProps}>
|
57
|
-
{children}
|
56
|
+
return (<TabsTheme.Trigger ref={forwardedRef} className={cn('text-slateA-11 dark:text-slateDarkA-11 data-[state=active]:text-slateA-12 dark:data-[state=active]:text-slateDarkA-12', className)} {...triggerProps}>
|
57
|
+
{children}
|
58
58
|
</TabsTheme.Trigger>);
|
59
59
|
});
|
60
60
|
TabsTrigger.displayName = 'TabsTrigger';
|
61
61
|
export var TabsContent = React.forwardRef(function (_a, forwardedRef) {
|
62
62
|
var className = _a.className, weight = _a.weight, children = _a.children, contentProps = __rest(_a, ["className", "weight", "children"]);
|
63
|
-
return (<TabsTheme.Content ref={forwardedRef} {...contentProps} className={cn('mt-3', className)}>
|
64
|
-
{children}
|
63
|
+
return (<TabsTheme.Content ref={forwardedRef} {...contentProps} className={cn('mt-3', className)}>
|
64
|
+
{children}
|
65
65
|
</TabsTheme.Content>);
|
66
66
|
});
|
67
67
|
TabsContent.displayName = 'TabsTrigger';
|
@@ -51,8 +51,8 @@ export var TextArea = React.forwardRef(function (_a, forwardedRef) {
|
|
51
51
|
sizeTheme = '3';
|
52
52
|
if (!color)
|
53
53
|
color = 'red';
|
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>
|
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
56
|
</Theme>);
|
57
57
|
});
|
58
58
|
TextArea.displayName = 'TextArea';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React from 'react';
|
24
24
|
import '@radix-ui/themes/styles.css';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { bgColorStyle, radiusVariants } from '../../constants';
|
28
28
|
import { Theme, TextField as TextFieldTheme } from '@radix-ui/themes';
|
29
29
|
var textFieldVariants = cva('', {
|
@@ -41,17 +41,17 @@ export var TextField = React.forwardRef(function (_a, forwardedRef) {
|
|
41
41
|
sizeTheme = '1';
|
42
42
|
if (size === 'large')
|
43
43
|
sizeTheme = '3';
|
44
|
-
return (<Theme scaling={scaling} accentColor={color} hasBackground={false}>
|
45
|
-
<TextFieldTheme.Root ref={forwardedRef} variant={appearance} size={sizeTheme} radius={radius} color={color} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
46
|
-
{children}
|
47
|
-
</TextFieldTheme.Root>
|
44
|
+
return (<Theme scaling={scaling} accentColor={color} hasBackground={false}>
|
45
|
+
<TextFieldTheme.Root ref={forwardedRef} variant={appearance} size={sizeTheme} radius={radius} color={color} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
46
|
+
{children}
|
47
|
+
</TextFieldTheme.Root>
|
48
48
|
</Theme>);
|
49
49
|
});
|
50
50
|
TextField.displayName = 'TextField';
|
51
51
|
export var TextFieldSlot = React.forwardRef(function (_a, forwardedRef) {
|
52
52
|
var className = _a.className, color = _a.color, side = _a.side, radius = _a.radius, children = _a.children, sliderProps = __rest(_a, ["className", "color", "side", "radius", "children"]);
|
53
|
-
return (<TextFieldTheme.Slot ref={forwardedRef} color={color} side={side} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
54
|
-
{children}
|
53
|
+
return (<TextFieldTheme.Slot ref={forwardedRef} color={color} side={side} className={cn(textFieldVariants({ radius: radius }), className)} {...sliderProps}>
|
54
|
+
{children}
|
55
55
|
</TextFieldTheme.Slot>);
|
56
56
|
});
|
57
57
|
TextFieldSlot.displayName = 'TextFieldSlot';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import Button from 'components/Button';
|
28
28
|
import { appearanceStyle, radiusVariants, scalingVariants } from '../../constants';
|
29
29
|
import { useToastContext } from '.';
|
@@ -61,8 +61,8 @@ export var ToastActionButton = forwardRef(function (_a, ref) {
|
|
61
61
|
var buttonClassName = cn(toastActionButtonVariants({ size: size, radius: radius, scaling: scaling }), color && semantics.includes(color)
|
62
62
|
? getSemanticsStyle(color)
|
63
63
|
: appearanceStyle(appearance, color !== null && color !== void 0 ? color : 'red'), className);
|
64
|
-
return (<ToastPrimitive.Action ref={ref} altText={altText} {...props} className={buttonClassName} asChild>
|
65
|
-
<Button>{children}</Button>
|
64
|
+
return (<ToastPrimitive.Action ref={ref} altText={altText} {...props} className={buttonClassName} asChild>
|
65
|
+
<Button>{children}</Button>
|
66
66
|
</ToastPrimitive.Action>);
|
67
67
|
});
|
68
68
|
ToastActionButton.displayName = 'ToastActionButton';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
import { useToastContext } from '.';
|
17
17
|
export var toastDescriptionVariants = cva('flex m-0 text-wrap text-slate-11 dark:text-slateDark-11', {
|
18
18
|
variants: {
|
@@ -36,10 +36,10 @@ export var toastDescriptionVariants = cva('flex m-0 text-wrap text-slate-11 dark
|
|
36
36
|
export var ToastDescription = forwardRef(function (_a, ref) {
|
37
37
|
var className = _a.className, children = _a.children, contentText = _a.contentText, props = __rest(_a, ["className", "children", "contentText"]);
|
38
38
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
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>
|
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
43
|
</ToastPrimitive.Description>);
|
44
44
|
});
|
45
45
|
ToastDescription.displayName = 'ToastDescription';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
import { useToastContext } from '.';
|
17
17
|
export var toastTitleVariants = cva('flex mb-[5px] text-slate-12 dark:text-slateDark-12 text-wrap break-words font-medium', {
|
18
18
|
variants: {
|
@@ -36,8 +36,8 @@ export var toastTitleVariants = cva('flex mb-[5px] text-slate-12 dark:text-slate
|
|
36
36
|
export var ToastTitle = forwardRef(function (_a, ref) {
|
37
37
|
var className = _a.className, children = _a.children, titleText = _a.titleText, props = __rest(_a, ["className", "children", "titleText"]);
|
38
38
|
var _b = useToastContext(), size = _b.size, color = _b.color;
|
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>
|
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
41
|
</ToastPrimitive.Title>);
|
42
42
|
});
|
43
43
|
ToastTitle.displayName = 'ToastTitle';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef, createContext, useContext, } from 'react';
|
24
24
|
import ReactDOM from 'react-dom';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
28
28
|
import { scalingVariants } from '../../constants';
|
29
29
|
export * from './ToastTitle';
|
@@ -87,13 +87,13 @@ export var Toast = forwardRef(function (_a, ref) {
|
|
87
87
|
var contextValue = { radius: radius, size: size, scaling: scaling, color: color };
|
88
88
|
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 ";
|
89
89
|
var toastClassName = cn(toastVariants({ radius: radius, scaling: scaling, size: size, color: color }), toastRootStyle, className);
|
90
|
-
return ReactDOM.createPortal(<ToastContext.Provider value={contextValue}>
|
91
|
-
<ToastPrimitive.Provider swipeDirection="right" duration={duration}>
|
92
|
-
<ToastPrimitive.Root ref={ref} className={toastClassName} open={openToast} onOpenChange={setOpenToast} {...props}>
|
93
|
-
{children}
|
94
|
-
</ToastPrimitive.Root>
|
95
|
-
<ToastPrimitive.Viewport className={cn(toastViewportVariants({ toastPosition: toastPosition }))}/>
|
96
|
-
</ToastPrimitive.Provider>
|
90
|
+
return ReactDOM.createPortal(<ToastContext.Provider value={contextValue}>
|
91
|
+
<ToastPrimitive.Provider swipeDirection="right" duration={duration}>
|
92
|
+
<ToastPrimitive.Root ref={ref} className={toastClassName} open={openToast} onOpenChange={setOpenToast} {...props}>
|
93
|
+
{children}
|
94
|
+
</ToastPrimitive.Root>
|
95
|
+
<ToastPrimitive.Viewport className={cn(toastViewportVariants({ toastPosition: toastPosition }))}/>
|
96
|
+
</ToastPrimitive.Provider>
|
97
97
|
</ToastContext.Provider>, document.body);
|
98
98
|
});
|
99
99
|
Toast.displayName = 'Toast';
|
@@ -49,11 +49,11 @@ export var IconScaling = {
|
|
49
49
|
};
|
50
50
|
export var ToggleWithText = forwardRef(function (_a, ref) {
|
51
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"]);
|
52
|
-
return (<TogglePrimitive.Root ref={ref} className={cn(toggleWithTextVariants({ radius: radius, size: size, scaling: scaling }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
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
53
|
{Children.map(children, function (child) {
|
54
54
|
return React.cloneElement(child, { className: IconScaling[size] });
|
55
|
-
})}
|
56
|
-
{text}
|
55
|
+
})}
|
56
|
+
{text}
|
57
57
|
</TogglePrimitive.Root>);
|
58
58
|
});
|
59
59
|
ToggleWithText.displayName = 'ToggleWithText';
|
@@ -49,10 +49,10 @@ export var IconScaling = {
|
|
49
49
|
};
|
50
50
|
export var Toggle = forwardRef(function (_a, ref) {
|
51
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"]);
|
52
|
-
return (<TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ radius: radius, size: size, scaling: scaling }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
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
53
|
{Children.map(children, function (child) {
|
54
54
|
return React.cloneElement(child, { className: IconScaling[size] });
|
55
|
-
})}
|
55
|
+
})}
|
56
56
|
</TogglePrimitive.Root>);
|
57
57
|
});
|
58
58
|
Toggle.displayName = 'Toggle';
|
@@ -36,10 +36,10 @@ var toggleVariants = cva('inline-flex', {
|
|
36
36
|
});
|
37
37
|
export var ToggleGroup = forwardRef(function (_a, ref) {
|
38
38
|
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"]);
|
39
|
-
return type === 'single' ? (<ToggleGroupPrimitive.Root ref={ref} type={type} value={value} defaultValue={defaultValue} className={cn(toggleVariants({ scaling: scaling }), className)} {...props}>
|
40
|
-
{children}
|
41
|
-
</ToggleGroupPrimitive.Root>) : (<ToggleGroupPrimitive.Root ref={ref} type={type} value={value} defaultValue={defaultValue} className={cn(toggleVariants({ scaling: scaling }), className)} {...props}>
|
42
|
-
{children}
|
39
|
+
return type === 'single' ? (<ToggleGroupPrimitive.Root ref={ref} type={type} value={value} defaultValue={defaultValue} className={cn(toggleVariants({ scaling: scaling }), className)} {...props}>
|
40
|
+
{children}
|
41
|
+
</ToggleGroupPrimitive.Root>) : (<ToggleGroupPrimitive.Root ref={ref} type={type} value={value} defaultValue={defaultValue} className={cn(toggleVariants({ scaling: scaling }), className)} {...props}>
|
42
|
+
{children}
|
43
43
|
</ToggleGroupPrimitive.Root>);
|
44
44
|
});
|
45
45
|
ToggleGroup.displayName = 'ToggleGroup';
|
@@ -33,10 +33,10 @@ export var IconScaling = {
|
|
33
33
|
};
|
34
34
|
export var ToggleGroupItem = forwardRef(function (_a, ref) {
|
35
35
|
var className = _a.className, children = _a.children, value = _a.value, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'surface' : _d, props = __rest(_a, ["className", "children", "value", "size", "color", "appearance"]);
|
36
|
-
return (<ToggleGroupPrimitive.Item ref={ref} value={value} className={cn(toggleGroupItemVariants({ size: size }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
36
|
+
return (<ToggleGroupPrimitive.Item ref={ref} value={value} className={cn(toggleGroupItemVariants({ size: size }), toggleAppearanceStyle(appearance, color, true, 'data-[state=on]:'), className)} {...props}>
|
37
37
|
{Children.map(children, function (child) {
|
38
38
|
return React.cloneElement(child, { className: IconScaling[size] });
|
39
|
-
})}
|
39
|
+
})}
|
40
40
|
</ToggleGroupPrimitive.Item>);
|
41
41
|
});
|
42
42
|
ToggleGroupItem.displayName = 'ToggleGroupItem';
|
@@ -64,11 +64,11 @@ export var ToggleSwitch = React.forwardRef(function (_a, forwardedRef) {
|
|
64
64
|
sizeTheme = '1';
|
65
65
|
if (size === 'large')
|
66
66
|
sizeTheme = '3';
|
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)}></SwitchTheme>
|
70
|
-
{children}
|
71
|
-
</Text>
|
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)}></SwitchTheme>
|
70
|
+
{children}
|
71
|
+
</Text>
|
72
72
|
</Theme>);
|
73
73
|
});
|
74
74
|
ToggleSwitch.displayName = 'ToggleSwitch';
|
@@ -11,7 +11,7 @@ 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 | typeof Symbol.unscopables | "
|
14
|
+
scaling?: number | typeof Symbol.iterator | typeof Symbol.unscopables | "map" | "filter" | "fill" | "values" | "concat" | "indexOf" | "lastIndexOf" | "slice" | "length" | "includes" | "at" | "toLocaleString" | "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?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
16
16
|
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
17
17
|
color?: string | null | undefined;
|