@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
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
14
14
|
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
import { contextMenuItemVariants } from './ContextMenuItem';
|
17
17
|
import { blackText, menuItemAppearanceStyle } from '../../constants';
|
18
18
|
import { useContextMenuContext } from '.';
|
@@ -23,13 +23,13 @@ export var ContextMenuSubTrigger = forwardRef(function (_a, ref) {
|
|
23
23
|
var iconClassName = cn('group-data-[disabled]:text-slate-8 ', appearance === 'solid' && blackText.includes(color)
|
24
24
|
? 'hover:fill-slate-12 dark:hover:fill-slateDark-1'
|
25
25
|
: "hover:fill-white dark:hover:fill-slateDark-12 ");
|
26
|
-
return (<ContextMenuPrimitive.Sub>
|
27
|
-
<ContextMenuPrimitive.SubTrigger ref={ref} className={triggerClassName} {...props}>
|
28
|
-
{children}
|
29
|
-
<div className="ml-auto pl-5 ">
|
30
|
-
<ChevronRightIcon className={iconClassName}/>
|
31
|
-
</div>
|
32
|
-
</ContextMenuPrimitive.SubTrigger>
|
26
|
+
return (<ContextMenuPrimitive.Sub>
|
27
|
+
<ContextMenuPrimitive.SubTrigger ref={ref} className={triggerClassName} {...props}>
|
28
|
+
{children}
|
29
|
+
<div className="ml-auto pl-5 ">
|
30
|
+
<ChevronRightIcon className={iconClassName}/>
|
31
|
+
</div>
|
32
|
+
</ContextMenuPrimitive.SubTrigger>
|
33
33
|
</ContextMenuPrimitive.Sub>);
|
34
34
|
});
|
35
35
|
ContextMenuSubTrigger.displayName = 'ContextMenuSubTrigger';
|
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
14
|
-
import { cn } from '
|
14
|
+
import { cn } from 'utils/utils';
|
15
15
|
export var ContextMenuTrigger = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
17
|
-
return (<ContextMenuPrimitive.Trigger ref={ref} className={cn("block border-2 border-dashed text-slate-12 dark:text-slateDark-12 rounded text-base \n select-none py-[45px] w-[300px] text-center", className)} {...props}>
|
18
|
-
{children}
|
17
|
+
return (<ContextMenuPrimitive.Trigger ref={ref} className={cn("block border-2 border-dashed text-slate-12 dark:text-slateDark-12 rounded text-base \n select-none py-[45px] w-[300px] text-center", className)} {...props}>
|
18
|
+
{children}
|
19
19
|
</ContextMenuPrimitive.Trigger>);
|
20
20
|
});
|
21
21
|
ContextMenuTrigger.displayName = 'ContextMenuTrigger';
|
@@ -33,11 +33,13 @@ var ContextMenuContext = createContext({
|
|
33
33
|
export var useContextMenuContext = function () {
|
34
34
|
return useContext(ContextMenuContext);
|
35
35
|
};
|
36
|
-
export var ContextMenu = forwardRef(function (_a) {
|
36
|
+
export var ContextMenu = forwardRef(function (_a, ref) {
|
37
37
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["children", "radius", "size", "scaling", "color", "appearance"]);
|
38
38
|
var contextValue = { radius: radius, size: size, scaling: scaling, color: color, appearance: appearance };
|
39
|
-
return (<ContextMenuContext.Provider value={contextValue}>
|
40
|
-
<
|
39
|
+
return (<ContextMenuContext.Provider value={contextValue}>
|
40
|
+
<div ref={ref}>
|
41
|
+
<ContextMenuPrimitive.Root {...props}>{children}</ContextMenuPrimitive.Root>
|
42
|
+
</div>
|
41
43
|
</ContextMenuContext.Provider>);
|
42
44
|
});
|
43
45
|
ContextMenu.displayName = 'ContextMenu';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import { DataList as DataListTheme } from '@radix-ui/themes';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { scalingVariants } from '../../constants';
|
28
28
|
import { useDataListContext } from '.';
|
29
29
|
export var dataListItemVariants = cva('flex', {
|
@@ -37,8 +37,8 @@ export var dataListItemVariants = cva('flex', {
|
|
37
37
|
export var DataListItem = forwardRef(function (_a, ref) {
|
38
38
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
39
39
|
var scaling = useDataListContext().scaling;
|
40
|
-
return (<DataListTheme.Item ref={ref} {...props} className={cn(dataListItemVariants({ scaling: scaling }), className)}>
|
41
|
-
{children}
|
40
|
+
return (<DataListTheme.Item ref={ref} {...props} className={cn(dataListItemVariants({ scaling: scaling }), className)}>
|
41
|
+
{children}
|
42
42
|
</DataListTheme.Item>);
|
43
43
|
});
|
44
44
|
DataListItem.displayName = 'DataListItem';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import { DataList as DataListTheme } from '@radix-ui/themes';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { weightVariants } from '../../constants';
|
28
28
|
import { useDataListContext } from '.';
|
29
29
|
export var dataListLabelVariants = cva('text-slateA-11 dark:text-slateDarkA-11 w-[120px] mb-1', {
|
@@ -43,8 +43,8 @@ export var dataListLabelVariants = cva('text-slateA-11 dark:text-slateDarkA-11 w
|
|
43
43
|
export var DataListLabel = forwardRef(function (_a, ref) {
|
44
44
|
var children = _a.children, className = _a.className, weight = _a.weight, color = _a.color, props = __rest(_a, ["children", "className", "weight", "color"]);
|
45
45
|
var size = useDataListContext().size;
|
46
|
-
return (<DataListTheme.Label ref={ref} {...props}>
|
47
|
-
<p className={cn(dataListLabelVariants({ weight: weight, size: size }), className)}>{children}</p>
|
46
|
+
return (<DataListTheme.Label ref={ref} {...props}>
|
47
|
+
<p className={cn(dataListLabelVariants({ weight: weight, size: size }), className)}>{children}</p>
|
48
48
|
</DataListTheme.Label>);
|
49
49
|
});
|
50
50
|
DataListLabel.displayName = 'DataListLabel';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import { DataList as DataListTheme } from '@radix-ui/themes';
|
25
25
|
import { textColorStyle, weightVariants } from '../../constants';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
import { useDataListContext } from '.';
|
29
29
|
export var dataListValueVariants = cva('text-slate-12 dark:text-slateDark-12 w-[200px]', {
|
30
30
|
variants: {
|
@@ -45,8 +45,8 @@ export var dataListValueVariants = cva('text-slate-12 dark:text-slateDark-12 w-[
|
|
45
45
|
export var DataListValue = forwardRef(function (_a, ref) {
|
46
46
|
var children = _a.children, className = _a.className, weight = _a.weight, props = __rest(_a, ["children", "className", "weight"]);
|
47
47
|
var _b = useDataListContext(), size = _b.size, color = _b.color;
|
48
|
-
return (<DataListTheme.Value ref={ref} className={cn(dataListValueVariants({ weight: weight, size: size, color: color }), className)} {...props}>
|
49
|
-
{children}
|
48
|
+
return (<DataListTheme.Value ref={ref} className={cn(dataListValueVariants({ weight: weight, size: size, color: color }), className)} {...props}>
|
49
|
+
{children}
|
50
50
|
</DataListTheme.Value>);
|
51
51
|
});
|
52
52
|
DataListValue.displayName = 'DataListValue';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { createContext, forwardRef, useContext, } from 'react';
|
13
13
|
import { DataList as DataListTheme } from '@radix-ui/themes';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export * from './DataListItem';
|
17
17
|
export * from './DataListLabel';
|
18
18
|
export * from './DataListValue';
|
@@ -39,10 +39,10 @@ export var useDataListContext = function () {
|
|
39
39
|
export var DataList = forwardRef(function (_a, ref) {
|
40
40
|
var children = _a.children, className = _a.className, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, ["children", "className", "size", "scaling", "color"]);
|
41
41
|
var contextValue = { size: size, scaling: scaling, color: color };
|
42
|
-
return (<DataListContext.Provider value={contextValue}>
|
43
|
-
<DataListTheme.Root ref={ref} {...props} className={cn(dataListVariants({ size: size }), className)}>
|
44
|
-
{children}
|
45
|
-
</DataListTheme.Root>
|
42
|
+
return (<DataListContext.Provider value={contextValue}>
|
43
|
+
<DataListTheme.Root ref={ref} {...props} className={cn(dataListVariants({ size: size }), className)}>
|
44
|
+
{children}
|
45
|
+
</DataListTheme.Root>
|
46
46
|
</DataListContext.Provider>);
|
47
47
|
});
|
48
48
|
DataList.displayName = 'DataList';
|
@@ -13,7 +13,7 @@ import React, { forwardRef } from 'react';
|
|
13
13
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
15
|
import { appearanceStyle, primaryColorStyle } from '../../constants';
|
16
|
-
import { cn } from '
|
16
|
+
import { cn } from 'utils/utils';
|
17
17
|
export var dialogActionVariants = cva('rounded-md inline-flex font-medium items-center justify-center px-[15px] hover:cursor-pointer', {
|
18
18
|
variants: {
|
19
19
|
radius: {
|
@@ -40,8 +40,8 @@ export var dialogActionVariants = cva('rounded-md inline-flex font-medium items-
|
|
40
40
|
export var DialogAction = forwardRef(function (_a, ref) {
|
41
41
|
var children = _a.children, className = _a.className, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["children", "className", "radius", "size", "color", "appearance"]);
|
42
42
|
var buttonClassName = cn(dialogActionVariants({ radius: radius, size: size, color: color }), appearanceStyle(appearance, color), className);
|
43
|
-
return (<DialogTheme.Close ref={ref} className={buttonClassName} {...props}>
|
44
|
-
{children}
|
43
|
+
return (<DialogTheme.Close ref={ref} className={buttonClassName} {...props}>
|
44
|
+
{children}
|
45
45
|
</DialogTheme.Close>);
|
46
46
|
});
|
47
47
|
DialogAction.displayName = 'DialogAction';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export var dialogCancelVariants = cva("rounded-md font-medium inline-flex justify-center items-center text-slate-11 bg-slate-3 outline-none border-none\n dark:text-slateDark-11 dark:bg-slateDark-3 dark:hover:bg-slateDarkA-4\n active:border-none hover:cursor-pointer hover:bg-slateA-4", {
|
17
17
|
variants: {
|
18
18
|
radius: {
|
@@ -36,8 +36,8 @@ export var dialogCancelVariants = cva("rounded-md font-medium inline-flex justif
|
|
36
36
|
});
|
37
37
|
export var DialogCancel = forwardRef(function (_a, ref) {
|
38
38
|
var children = _a.children, className = _a.className, radius = _a.radius, size = _a.size, props = __rest(_a, ["children", "className", "radius", "size"]);
|
39
|
-
return (<DialogTheme.Close ref={ref} className={cn(dialogCancelVariants({ radius: radius, size: size }), className)} {...props}>
|
40
|
-
{children}
|
39
|
+
return (<DialogTheme.Close ref={ref} className={cn(dialogCancelVariants({ radius: radius, size: size }), className)} {...props}>
|
40
|
+
{children}
|
41
41
|
</DialogTheme.Close>);
|
42
42
|
});
|
43
43
|
DialogCancel.displayName = 'DialogCancel';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import { cva } from 'class-variance-authority';
|
25
25
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
26
26
|
import { scalingVariants } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dialogContentVariants = cva("rounded-md focus:outline-none bg-white dark:bg-slateDark-1 \n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px]", {
|
29
29
|
variants: {
|
30
30
|
radius: {
|
@@ -49,8 +49,8 @@ export var dialogContentVariants = cva("rounded-md focus:outline-none bg-white d
|
|
49
49
|
});
|
50
50
|
export var DialogContent = forwardRef(function (_a, forwardedRef) {
|
51
51
|
var children = _a.children, className = _a.className, radius = _a.radius, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["children", "className", "radius", "size", "scaling"]);
|
52
|
-
return (<DialogTheme.Content ref={forwardedRef} className={cn(dialogContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
53
|
-
{children}
|
52
|
+
return (<DialogTheme.Content ref={forwardedRef} className={cn(dialogContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
53
|
+
{children}
|
54
54
|
</DialogTheme.Content>);
|
55
55
|
});
|
56
56
|
DialogContent.displayName = 'DialogContent';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import { cva } from 'class-variance-authority';
|
14
14
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export var dialogDescriptionVariants = cva('font-normal text-slate-12 dark:text-slateDark-12', {
|
17
17
|
variants: {
|
18
18
|
size: {
|
@@ -28,8 +28,8 @@ export var dialogDescriptionVariants = cva('font-normal text-slate-12 dark:text-
|
|
28
28
|
});
|
29
29
|
export var DialogDescription = forwardRef(function (_a, ref) {
|
30
30
|
var children = _a.children, className = _a.className, size = _a.size, props = __rest(_a, ["children", "className", "size"]);
|
31
|
-
return (<DialogTheme.Description mb="4" ref={ref} className={cn(dialogDescriptionVariants({ size: size }), className)} {...props}>
|
32
|
-
{children}
|
31
|
+
return (<DialogTheme.Description mb="4" ref={ref} className={cn(dialogDescriptionVariants({ size: size }), className)} {...props}>
|
32
|
+
{children}
|
33
33
|
</DialogTheme.Description>);
|
34
34
|
});
|
35
35
|
DialogDescription.displayName = 'DialogDescription';
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import { cva } from 'class-variance-authority';
|
14
|
-
import { cn } from '
|
14
|
+
import { cn } from 'utils/utils';
|
15
15
|
export var dialogSlotVariants = cva('flex flex-col gap-2 font-normal text-slate-12 dark:text-slateDark-12', {
|
16
16
|
variants: {
|
17
17
|
size: {
|
@@ -27,8 +27,8 @@ export var dialogSlotVariants = cva('flex flex-col gap-2 font-normal text-slate-
|
|
27
27
|
});
|
28
28
|
export var DialogSlot = forwardRef(function (_a, ref) {
|
29
29
|
var children = _a.children, className = _a.className, size = _a.size, props = __rest(_a, ["children", "className", "size"]);
|
30
|
-
return (<div ref={ref} className={cn(dialogSlotVariants({ size: size }), className)} {...props}>
|
31
|
-
{children}
|
30
|
+
return (<div ref={ref} className={cn(dialogSlotVariants({ size: size }), className)} {...props}>
|
31
|
+
{children}
|
32
32
|
</div>);
|
33
33
|
});
|
34
34
|
DialogSlot.displayName = 'DialogSlot';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import { cva } from 'class-variance-authority';
|
14
14
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export var dialogTitleVariants = cva('font-bold text-slate-12 dark:text-slateDark-12', {
|
17
17
|
variants: {
|
18
18
|
size: {
|
@@ -28,8 +28,8 @@ export var dialogTitleVariants = cva('font-bold text-slate-12 dark:text-slateDar
|
|
28
28
|
});
|
29
29
|
export var DialogTitle = forwardRef(function (_a, ref) {
|
30
30
|
var children = _a.children, className = _a.className, size = _a.size, props = __rest(_a, ["children", "className", "size"]);
|
31
|
-
return (<DialogTheme.Title ref={ref} className={cn(dialogTitleVariants({ size: size }), className)} {...props}>
|
32
|
-
{children}
|
31
|
+
return (<DialogTheme.Title ref={ref} className={cn(dialogTitleVariants({ size: size }), className)} {...props}>
|
32
|
+
{children}
|
33
33
|
</DialogTheme.Title>);
|
34
34
|
});
|
35
35
|
DialogTitle.displayName = 'DialogTitle';
|
@@ -13,8 +13,8 @@ import React, { forwardRef } from 'react';
|
|
13
13
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
14
14
|
export var DialogTrigger = forwardRef(function (_a, ref) {
|
15
15
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
16
|
-
return (<DialogTheme.Trigger ref={ref} className={className} {...props}>
|
17
|
-
{children}
|
16
|
+
return (<DialogTheme.Trigger ref={ref} className={className} {...props}>
|
17
|
+
{children}
|
18
18
|
</DialogTheme.Trigger>);
|
19
19
|
});
|
20
20
|
DialogTrigger.displayName = 'DialogTrigger';
|
@@ -20,8 +20,8 @@ export * from './DialogCancel';
|
|
20
20
|
export * from './DialogAction';
|
21
21
|
export var Dialog = forwardRef(function (_a, ref) {
|
22
22
|
var children = _a.children, color = _a.color, props = __rest(_a, ["children", "color"]);
|
23
|
-
return (<Theme accentColor={color}>
|
24
|
-
<DialogTheme.Root {...props}>{children}</DialogTheme.Root>
|
23
|
+
return (<Theme accentColor={color}>
|
24
|
+
<DialogTheme.Root {...props}>{children}</DialogTheme.Root>
|
25
25
|
</Theme>);
|
26
26
|
});
|
27
27
|
Dialog.displayName = 'Dialog';
|
@@ -24,7 +24,7 @@ import React from 'react';
|
|
24
24
|
import { Doughnut } from 'react-chartjs-2';
|
25
25
|
import { Chart as ChartJS, ArcElement, Tooltip, Legend, plugins } from 'chart.js';
|
26
26
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
import { cva } from 'class-variance-authority';
|
29
29
|
import { scalingVariants } from '../../constants';
|
30
30
|
ChartJS.register(ArcElement, Tooltip, Legend, plugins, ChartDataLabels);
|
@@ -14,10 +14,10 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
14
14
|
export var RadioContext = createContext({ selectedValue: '' });
|
15
15
|
export var DropdownMenuRadioGroup = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
17
|
-
return (<DropdownMenuPrimitive.RadioGroup ref={ref} className={className} {...props}>
|
18
|
-
<RadioContext.Provider value={{ selectedValue: value !== null && value !== void 0 ? value : '' }}>
|
19
|
-
{children}
|
20
|
-
</RadioContext.Provider>
|
17
|
+
return (<DropdownMenuPrimitive.RadioGroup ref={ref} className={className} {...props}>
|
18
|
+
<RadioContext.Provider value={{ selectedValue: value !== null && value !== void 0 ? value : '' }}>
|
19
|
+
{children}
|
20
|
+
</RadioContext.Provider>
|
21
21
|
</DropdownMenuPrimitive.RadioGroup>);
|
22
22
|
});
|
23
23
|
DropdownMenuRadioGroup.displayName = 'DropdownMenuRadioGroup';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { scalingVariants } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dropdownMenuSubContentVariants = cva("p-[5px] bg-white dark:bg-slateDark-1 will-change-[transform,opacity]\n shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] \n [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)]", {
|
29
29
|
variants: {
|
30
30
|
radius: {
|
@@ -48,14 +48,14 @@ export var dropdownMenuSubContentVariants = cva("p-[5px] bg-white dark:bg-slateD
|
|
48
48
|
});
|
49
49
|
export var DropdownMenuSubContent = forwardRef(function (_a, ref) {
|
50
50
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, size = _a.size, props = __rest(_a, ["className", "children", "radius", "scaling", "size"]);
|
51
|
-
return (<DropdownMenuPrimitive.Portal>
|
51
|
+
return (<DropdownMenuPrimitive.Portal>
|
52
52
|
<DropdownMenuPrimitive.SubContent ref={ref} className={cn(dropdownMenuSubContentVariants({
|
53
53
|
radius: radius,
|
54
54
|
size: size,
|
55
55
|
scaling: scaling,
|
56
|
-
}), className)} sideOffset={2} alignOffset={-5} {...props}>
|
57
|
-
{children}
|
58
|
-
</DropdownMenuPrimitive.SubContent>
|
56
|
+
}), className)} sideOffset={2} alignOffset={-5} {...props}>
|
57
|
+
{children}
|
58
|
+
</DropdownMenuPrimitive.SubContent>
|
59
59
|
</DropdownMenuPrimitive.Portal>);
|
60
60
|
});
|
61
61
|
DropdownMenuSubContent.displayName = 'DropdownMenuSubContent';
|
@@ -14,18 +14,18 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
14
14
|
import { menuItemAppearanceStyle } from '../../constants';
|
15
15
|
import { dropdownMenuItemVariants, DropdownMenuItemIndicator } from '.';
|
16
16
|
import { CheckIcon } from '@radix-ui/react-icons';
|
17
|
-
import { cn } from '
|
17
|
+
import { cn } from 'utils/utils';
|
18
18
|
export var DropdownMenuCheckboxItem = forwardRef(function (_a, ref) {
|
19
19
|
var className = _a.className, children = _a.children, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, shortcut = _a.shortcut, checked = _a.checked, props = __rest(_a, ["className", "children", "radius", "size", "color", "appearance", "shortcut", "checked"]);
|
20
20
|
var itemClassName = cn(dropdownMenuItemVariants({
|
21
21
|
radius: radius,
|
22
22
|
size: size,
|
23
23
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
24
|
-
return (<DropdownMenuPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
25
|
-
<DropdownMenuItemIndicator forceMount radius={'medium'} size={size}>
|
26
|
-
{checked && <CheckIcon />}
|
27
|
-
</DropdownMenuItemIndicator>
|
28
|
-
{children}
|
24
|
+
return (<DropdownMenuPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
25
|
+
<DropdownMenuItemIndicator forceMount radius={'medium'} size={size}>
|
26
|
+
{checked && <CheckIcon />}
|
27
|
+
</DropdownMenuItemIndicator>
|
28
|
+
{children}
|
29
29
|
</DropdownMenuPrimitive.CheckboxItem>);
|
30
30
|
});
|
31
31
|
DropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { scalingVariants } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dropdownMenuContentVariants = cva("p-[5px] bg-white dark:bg-slateDark-1 will-change-[transform,opacity]\n shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] \n [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)]", {
|
29
29
|
variants: {
|
30
30
|
radius: {
|
@@ -48,10 +48,10 @@ export var dropdownMenuContentVariants = cva("p-[5px] bg-white dark:bg-slateDark
|
|
48
48
|
});
|
49
49
|
export var DropdownMenuContent = forwardRef(function (_a, ref) {
|
50
50
|
var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, radius = _a.radius, props = __rest(_a, ["className", "children", "size", "scaling", "radius"]);
|
51
|
-
return (<DropdownMenuPrimitive.Portal>
|
52
|
-
<DropdownMenuPrimitive.Content ref={ref} sideOffset={5} className={cn(dropdownMenuContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
53
|
-
{children}
|
54
|
-
</DropdownMenuPrimitive.Content>
|
51
|
+
return (<DropdownMenuPrimitive.Portal>
|
52
|
+
<DropdownMenuPrimitive.Content ref={ref} sideOffset={5} className={cn(dropdownMenuContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
53
|
+
{children}
|
54
|
+
</DropdownMenuPrimitive.Content>
|
55
55
|
</DropdownMenuPrimitive.Portal>);
|
56
56
|
});
|
57
57
|
DropdownMenuContent.displayName = 'DropdownMenuContent';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { menuItemAppearanceStyle, scalingVariants, radiusVariants, blackText, } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dropdownMenuItemVariants = cva("flex group relative leading-none select-none outline-none items-center justify-between\n data-[disabled]:text-slate-8 dark:data-[disabled]:text-slateDark-8 hover:data-[disabled]:bg-transparent dark:hover:data-[disabled]:bg-transparent text-slate-12 dark:text-slateDark-12", {
|
29
29
|
variants: {
|
30
30
|
radius: __assign({}, radiusVariants['menu-item']),
|
@@ -50,9 +50,9 @@ export var DropdownMenuItem = forwardRef(function (_a, ref) {
|
|
50
50
|
if (appearance === 'solid' && !blackText.includes(color)) {
|
51
51
|
shortcutClassName = 'group-hover:text-white dark:group-hover:text-white';
|
52
52
|
}
|
53
|
-
return (<DropdownMenuPrimitive.Item ref={ref} {...props} className={itemClassName}>
|
54
|
-
{children}
|
55
|
-
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
53
|
+
return (<DropdownMenuPrimitive.Item ref={ref} {...props} className={itemClassName}>
|
54
|
+
{children}
|
55
|
+
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
56
56
|
</DropdownMenuPrimitive.Item>);
|
57
57
|
});
|
58
58
|
DropdownMenuItem.displayName = 'DropdownMenuItem';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { radiusVariants } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dropdownMenuItemIndicatorVariants = cva("absolute left-0 inline-flex items-center justify-center ml-1 border", {
|
29
29
|
variants: {
|
30
30
|
radius: __assign({}, radiusVariants['base']),
|
@@ -40,8 +40,8 @@ export var dropdownMenuItemIndicatorVariants = cva("absolute left-0 inline-flex
|
|
40
40
|
});
|
41
41
|
export var DropdownMenuItemIndicator = forwardRef(function (_a, ref) {
|
42
42
|
var className = _a.className, children = _a.children, size = _a.size, radius = _a.radius, props = __rest(_a, ["className", "children", "size", "radius"]);
|
43
|
-
return (<DropdownMenuPrimitive.ItemIndicator ref={ref} className={cn(dropdownMenuItemIndicatorVariants({ radius: radius, size: size }), className)} {...props}>
|
44
|
-
{children}
|
43
|
+
return (<DropdownMenuPrimitive.ItemIndicator ref={ref} className={cn(dropdownMenuItemIndicatorVariants({ radius: radius, size: size }), className)} {...props}>
|
44
|
+
{children}
|
45
45
|
</DropdownMenuPrimitive.ItemIndicator>);
|
46
46
|
});
|
47
47
|
DropdownMenuItemIndicator.displayName = 'DropdownMenuItemIndicator';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { scalingVariants } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
export var dropdownMenuLabelVariants = cva("flex relative leading-none select-none outline-none items-center font-normal text-slateA-11 dark:text-slateDarkA-11", {
|
29
29
|
variants: {
|
30
30
|
size: {
|
@@ -40,8 +40,8 @@ export var dropdownMenuLabelVariants = cva("flex relative leading-none select-no
|
|
40
40
|
});
|
41
41
|
export var DropdownMenuLabel = forwardRef(function (_a, ref) {
|
42
42
|
var className = _a.className, children = _a.children, size = _a.size, props = __rest(_a, ["className", "children", "size"]);
|
43
|
-
return (<DropdownMenuPrimitive.Label ref={ref} className={cn(dropdownMenuLabelVariants({ size: size }), className)} {...props}>
|
44
|
-
{children}
|
43
|
+
return (<DropdownMenuPrimitive.Label ref={ref} className={cn(dropdownMenuLabelVariants({ size: size }), className)} {...props}>
|
44
|
+
{children}
|
45
45
|
</DropdownMenuPrimitive.Label>);
|
46
46
|
});
|
47
47
|
DropdownMenuLabel.displayName = 'DropdownMenuLabel';
|
@@ -14,7 +14,7 @@ import { DropdownMenu as DropdownMenuTheme } from '@radix-ui/themes';
|
|
14
14
|
import { dropdownMenuItemVariants, DropdownMenuItemIndicator, RadioContext, } from '.';
|
15
15
|
import { menuItemAppearanceStyle } from '../../constants';
|
16
16
|
import { DotFilledIcon } from '@radix-ui/react-icons';
|
17
|
-
import { cn } from '
|
17
|
+
import { cn } from 'utils/utils';
|
18
18
|
export var DropdownMenuRadioItem = forwardRef(function (_a, ref) {
|
19
19
|
var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, radius = _a.radius, size = _a.size, props = __rest(_a, ["className", "children", "color", "appearance", "radius", "size"]);
|
20
20
|
var radioGroup = useContext(RadioContext);
|
@@ -22,11 +22,11 @@ export var DropdownMenuRadioItem = forwardRef(function (_a, ref) {
|
|
22
22
|
radius: radius,
|
23
23
|
size: size,
|
24
24
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
25
|
-
return (<DropdownMenuTheme.RadioItem ref={ref} className={itemClassName} {...props}>
|
26
|
-
<DropdownMenuItemIndicator forceMount radius={'full'} size={size}>
|
27
|
-
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
28
|
-
</DropdownMenuItemIndicator>
|
29
|
-
{children}
|
25
|
+
return (<DropdownMenuTheme.RadioItem ref={ref} className={itemClassName} {...props}>
|
26
|
+
<DropdownMenuItemIndicator forceMount radius={'full'} size={size}>
|
27
|
+
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
28
|
+
</DropdownMenuItemIndicator>
|
29
|
+
{children}
|
30
30
|
</DropdownMenuTheme.RadioItem>);
|
31
31
|
});
|
32
32
|
DropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
|
-
import { cn } from '
|
14
|
+
import { cn } from 'utils/utils';
|
15
15
|
export var DropdownMenuSeparator = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, color = _a.color, props = __rest(_a, ["className", "children", "color"]);
|
17
17
|
return (<DropdownMenuPrimitive.Separator ref={ref} className={cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className)} {...props}/>);
|
@@ -21,11 +21,11 @@ export var DropdownMenuSubTrigger = forwardRef(function (_a, ref) {
|
|
21
21
|
? 'hover:fill-slate-12 dark:hover:fill-slateDark-1'
|
22
22
|
: "hover:fill-white dark:hover:fill-slateDark-12 ");
|
23
23
|
var triggerClassName = cn(dropdownMenuItemVariants({ size: size, radius: radius }), menuItemAppearanceStyle(appearance, color), className);
|
24
|
-
return (<DropdownMenuPrimitive.SubTrigger ref={ref} className={triggerClassName} {...props}>
|
25
|
-
{children}
|
26
|
-
<div className="ml-auto pl-5 ">
|
27
|
-
<ChevronRightIcon className={iconClassName}/>
|
28
|
-
</div>
|
24
|
+
return (<DropdownMenuPrimitive.SubTrigger ref={ref} className={triggerClassName} {...props}>
|
25
|
+
{children}
|
26
|
+
<div className="ml-auto pl-5 ">
|
27
|
+
<ChevronRightIcon className={iconClassName}/>
|
28
|
+
</div>
|
29
29
|
</DropdownMenuPrimitive.SubTrigger>);
|
30
30
|
});
|
31
31
|
DropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';
|
@@ -34,8 +34,8 @@ var dropdownMenuTriggerVariants = cva('', {
|
|
34
34
|
});
|
35
35
|
export var DropdownMenuTrigger = forwardRef(function (_a, ref) {
|
36
36
|
var className = _a.className, children = _a.children, radius = _a.radius, size = _a.size, props = __rest(_a, ["className", "children", "radius", "size"]);
|
37
|
-
return (<DropdownMenuPrimitive.Trigger asChild ref={ref} className={cn(dropdownMenuTriggerVariants({ radius: radius, size: size }), className)} {...props}>
|
38
|
-
{children}
|
37
|
+
return (<DropdownMenuPrimitive.Trigger asChild ref={ref} className={cn(dropdownMenuTriggerVariants({ radius: radius, size: size }), className)} {...props}>
|
38
|
+
{children}
|
39
39
|
</DropdownMenuPrimitive.Trigger>);
|
40
40
|
});
|
41
41
|
DropdownMenuTrigger.displayName = 'DropdownMenuTrigger';
|
@@ -54,8 +54,8 @@ export var HoverCardContent = forwardRef(function (_a, ref) {
|
|
54
54
|
sizeTheme = '1';
|
55
55
|
if (size === 'large')
|
56
56
|
sizeTheme = '3';
|
57
|
-
return (<HoverCardTheme.Content ref={ref} {...props} size={sizeTheme} className={cn(hoverCardContentVariants({ size: size, scaling: scaling, weight: weight, radius: radius, color: color }), size === 'x-large' && 'rt-r-size-4', className)}>
|
58
|
-
{children}
|
57
|
+
return (<HoverCardTheme.Content ref={ref} {...props} size={sizeTheme} className={cn(hoverCardContentVariants({ size: size, scaling: scaling, weight: weight, radius: radius, color: color }), size === 'x-large' && 'rt-r-size-4', className)}>
|
58
|
+
{children}
|
59
59
|
</HoverCardTheme.Content>);
|
60
60
|
});
|
61
61
|
HoverCardContent.displayName = 'HoverCardContent';
|
@@ -13,8 +13,8 @@ import React, { forwardRef } from 'react';
|
|
13
13
|
import { HoverCard as HoverCardTheme } from '@radix-ui/themes';
|
14
14
|
export var HoverCardTrigger = forwardRef(function (_a, ref) {
|
15
15
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (<HoverCardTheme.Trigger ref={ref} className={className} {...props}>
|
17
|
-
{children}
|
16
|
+
return (<HoverCardTheme.Trigger ref={ref} className={className} {...props}>
|
17
|
+
{children}
|
18
18
|
</HoverCardTheme.Trigger>);
|
19
19
|
});
|
20
20
|
HoverCardTrigger.displayName = 'HoverCardTrigger';
|
@@ -15,8 +15,8 @@ export * from './HoverCardTrigger';
|
|
15
15
|
export * from './HoverCardContent';
|
16
16
|
export var HoverCard = forwardRef(function (_a, ref) {
|
17
17
|
var children = _a.children, props = __rest(_a, ["children"]);
|
18
|
-
return (<Theme>
|
19
|
-
<HoverCardTheme.Root {...props}>{children}</HoverCardTheme.Root>
|
18
|
+
return (<Theme>
|
19
|
+
<HoverCardTheme.Root {...props}>{children}</HoverCardTheme.Root>
|
20
20
|
</Theme>);
|
21
21
|
});
|
22
22
|
HoverCard.displayName = 'HoverCard';
|
@@ -56,8 +56,8 @@ export var IconButton = forwardRef(function (_a, ref) {
|
|
56
56
|
var width = iconSize[size];
|
57
57
|
var height = iconSize[size];
|
58
58
|
var buttonClassName = cn(iconButtonVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, true), className);
|
59
|
-
return (<button ref={ref} className={buttonClassName} {...props}>
|
60
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { width: width, height: height }); })}
|
59
|
+
return (<button ref={ref} className={buttonClassName} {...props}>
|
60
|
+
{Children.map(children, function (child) { return React.cloneElement(child, { width: width, height: height }); })}
|
61
61
|
</button>);
|
62
62
|
});
|
63
63
|
IconButton.displayName = 'IconButton';
|
@@ -43,10 +43,10 @@ var insetVariants = cva('border-[1px] border-slate-6 dark:border-slateDark-6 tex
|
|
43
43
|
});
|
44
44
|
export var Inset = forwardRef(function (_a, ref) {
|
45
45
|
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, props = __rest(_a, ["children", "className", "radius", "scaling"]);
|
46
|
-
return (<Theme>
|
47
|
-
<InsetTheme ref={ref} className={cn(insetVariants({ radius: radius, scaling: scaling }), className)} {...props}>
|
48
|
-
{children}
|
49
|
-
</InsetTheme>
|
46
|
+
return (<Theme>
|
47
|
+
<InsetTheme ref={ref} className={cn(insetVariants({ radius: radius, scaling: scaling }), className)} {...props}>
|
48
|
+
{children}
|
49
|
+
</InsetTheme>
|
50
50
|
</Theme>);
|
51
51
|
});
|
52
52
|
Inset.displayName = 'Inset';
|