@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
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { radiusVariants, scalingVariants } from '../../constants';
|
28
28
|
export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[50%] focus:outline-none\n translate-x-[-50%] translate-y-[-50%] data-[state=open]:animate-contentShow 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: {
|
@@ -43,11 +43,11 @@ export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[
|
|
43
43
|
});
|
44
44
|
export var AlertDialogContent = forwardRef(function (_a, ref) {
|
45
45
|
var className = _a.className, children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["className", "children", "radius", "size", "scaling"]);
|
46
|
-
return (<AlertDialogPrimitive.Portal>
|
47
|
-
<AlertDialogPrimitive.Overlay className="fixed data-[state=open]:animate-overlayShow inset-0"/>
|
48
|
-
<AlertDialogPrimitive.Content className={cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className)} ref={ref} {...props}>
|
49
|
-
{children}
|
50
|
-
</AlertDialogPrimitive.Content>
|
46
|
+
return (<AlertDialogPrimitive.Portal>
|
47
|
+
<AlertDialogPrimitive.Overlay className="fixed data-[state=open]:animate-overlayShow inset-0"/>
|
48
|
+
<AlertDialogPrimitive.Content className={cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className)} ref={ref} {...props}>
|
49
|
+
{children}
|
50
|
+
</AlertDialogPrimitive.Content>
|
51
51
|
</AlertDialogPrimitive.Portal>);
|
52
52
|
});
|
53
53
|
AlertDialogContent.displayName = 'AlertDialogContent';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export var alertDialogDescriptionVariants = cva("text-slate-12 dark:text-slateDark-12 font-normal", {
|
17
17
|
variants: {
|
18
18
|
size: {
|
@@ -28,8 +28,8 @@ export var alertDialogDescriptionVariants = cva("text-slate-12 dark:text-slateDa
|
|
28
28
|
});
|
29
29
|
export var AlertDialogDescription = forwardRef(function (_a, ref) {
|
30
30
|
var className = _a.className, children = _a.children, size = _a.size, contentText = _a.contentText, props = __rest(_a, ["className", "children", "size", "contentText"]);
|
31
|
-
return (<AlertDialogPrimitive.Description className={cn(alertDialogDescriptionVariants({ size: size }), className)} ref={ref} {...props}>
|
32
|
-
{contentText !== null && contentText !== void 0 ? contentText : children}
|
31
|
+
return (<AlertDialogPrimitive.Description className={cn(alertDialogDescriptionVariants({ size: size }), className)} ref={ref} {...props}>
|
32
|
+
{contentText !== null && contentText !== void 0 ? contentText : children}
|
33
33
|
</AlertDialogPrimitive.Description>);
|
34
34
|
});
|
35
35
|
AlertDialogDescription.displayName = 'AlertDialogDescription';
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef } from 'react';
|
13
13
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
14
14
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
export var alertDialogTitleVariants = cva("m-0 text-slate-12 dark:text-slateDark-12 font-bold", {
|
17
17
|
variants: {
|
18
18
|
size: {
|
@@ -28,8 +28,8 @@ export var alertDialogTitleVariants = cva("m-0 text-slate-12 dark:text-slateDark
|
|
28
28
|
});
|
29
29
|
export var AlertDialogTitle = forwardRef(function (_a, ref) {
|
30
30
|
var className = _a.className, children = _a.children, size = _a.size, titleText = _a.titleText, props = __rest(_a, ["className", "children", "size", "titleText"]);
|
31
|
-
return (<AlertDialogPrimitive.Title className={cn(alertDialogTitleVariants({ size: size }), className)} ref={ref} {...props}>
|
32
|
-
{titleText !== null && titleText !== void 0 ? titleText : children}
|
31
|
+
return (<AlertDialogPrimitive.Title className={cn(alertDialogTitleVariants({ size: size }), className)} ref={ref} {...props}>
|
32
|
+
{titleText !== null && titleText !== void 0 ? titleText : children}
|
33
33
|
</AlertDialogPrimitive.Title>);
|
34
34
|
});
|
35
35
|
AlertDialogTitle.displayName = 'AlertDialogTitle';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { radiusVariants, scalingVariants, weightVariants, primaryColorStyle, appearanceStyle, } from '../../constants';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
var buttonVariants = cva("inline-flex items-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8", {
|
29
29
|
variants: {
|
30
30
|
radius: __assign({}, radiusVariants['base']),
|
@@ -49,8 +49,8 @@ var buttonVariants = cva("inline-flex items-center transition-colors focus:outli
|
|
49
49
|
export var AlertDialogTrigger = forwardRef(function (_a, ref) {
|
50
50
|
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "weight", "color", "appearance"]);
|
51
51
|
var buttonClassName = cn(buttonVariants({ radius: radius, scaling: scaling, size: size, weight: weight, color: color }), appearanceStyle(appearance, color), className);
|
52
|
-
return (<AlertDialogPrimitive.Trigger asChild ref={ref} className={buttonClassName} {...props}>
|
53
|
-
{children}
|
52
|
+
return (<AlertDialogPrimitive.Trigger asChild ref={ref} className={buttonClassName} {...props}>
|
53
|
+
{children}
|
54
54
|
</AlertDialogPrimitive.Trigger>);
|
55
55
|
});
|
56
56
|
AlertDialogTrigger.displayName = 'AlertDialogTrigger';
|
@@ -17,9 +17,11 @@ export * from './AlertDialogTitle';
|
|
17
17
|
export * from './AlertDialogDescription';
|
18
18
|
export * from './AlertDialogCancel';
|
19
19
|
export * from './AlertDialogAction';
|
20
|
-
export var AlertDialog = forwardRef(function (_a) {
|
20
|
+
export var AlertDialog = forwardRef(function (_a, ref) {
|
21
21
|
var children = _a.children, props = __rest(_a, ["children"]);
|
22
|
-
return <
|
22
|
+
return (<div ref={ref}>
|
23
|
+
<AlertDialogPrimitive.Root {...props}>{children}</AlertDialogPrimitive.Root>
|
24
|
+
</div>);
|
23
25
|
});
|
24
26
|
AlertDialog.displayName = 'AlertDialog';
|
25
27
|
export default AlertDialog;
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
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
|
export var aspectRatioVariants = cva('', {
|
29
29
|
variants: {
|
@@ -35,8 +35,8 @@ export var aspectRatioVariants = cva('', {
|
|
35
35
|
});
|
36
36
|
var AspectRatio = forwardRef(function (_a, ref) {
|
37
37
|
var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, ["children", "className", "ratio", "scaling"]);
|
38
|
-
return (<AspectRatioPrimitive.Root ratio={ratio} ref={ref} {...props} className={cn(aspectRatioVariants({ scaling: scaling }), className)}>
|
39
|
-
{children}
|
38
|
+
return (<AspectRatioPrimitive.Root ratio={ratio} ref={ref} {...props} className={cn(aspectRatioVariants({ scaling: scaling }), className)}>
|
39
|
+
{children}
|
40
40
|
</AspectRatioPrimitive.Root>);
|
41
41
|
});
|
42
42
|
AspectRatio.displayName = 'AspectRatio';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants, } from '../../constants';
|
28
28
|
var AvatarVariants = cva('font-medium', {
|
29
29
|
variants: {
|
@@ -50,11 +50,11 @@ var AvatarVariants = cva('font-medium', {
|
|
50
50
|
});
|
51
51
|
var Avatar = forwardRef(function (_a, ref) {
|
52
52
|
var className = _a.className, fallbackClassName = _a.fallbackClassName, radius = _a.radius, scaling = _a.scaling, size = _a.size, fallbackText = _a.fallbackText, imagePath = _a.imagePath, alt = _a.alt, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color"]);
|
53
|
-
return (<AvatarPrimitive.Root className={cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, false), className)} {...props} ref={ref}>
|
54
|
-
<AvatarPrimitive.Image className="h-full w-full object-cover border-none" src={imagePath} alt={alt}/>
|
55
|
-
<AvatarPrimitive.Fallback className={cn("leading-1 flex h-full w-full items-center justify-center", className)} delayMs={300}>
|
56
|
-
{fallbackText}
|
57
|
-
</AvatarPrimitive.Fallback>
|
53
|
+
return (<AvatarPrimitive.Root className={cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, false), className)} {...props} ref={ref}>
|
54
|
+
<AvatarPrimitive.Image className="h-full w-full object-cover border-none" src={imagePath} alt={alt}/>
|
55
|
+
<AvatarPrimitive.Fallback className={cn("leading-1 flex h-full w-full items-center justify-center", className)} delayMs={300}>
|
56
|
+
{fallbackText}
|
57
|
+
</AvatarPrimitive.Fallback>
|
58
58
|
</AvatarPrimitive.Root>);
|
59
59
|
});
|
60
60
|
Avatar.displayName = 'Avatar';
|
@@ -47,8 +47,8 @@ var BadgeVariants = cva('inline-flex items-center transition-colors focus:outlin
|
|
47
47
|
var Badge = forwardRef(function (_a, ref) {
|
48
48
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, weight = _a.weight, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "radius", "scaling", "weight", "size", "color", "appearance"]);
|
49
49
|
var badgeClassName = cn(BadgeVariants({ radius: radius, scaling: scaling, weight: weight, size: size, color: color }), appearanceStyle(appearance, color, false), className);
|
50
|
-
return (<div ref={ref} className={badgeClassName} {...props}>
|
51
|
-
{children}
|
50
|
+
return (<div ref={ref} className={badgeClassName} {...props}>
|
51
|
+
{children}
|
52
52
|
</div>);
|
53
53
|
});
|
54
54
|
Badge.displayName = 'Badge';
|
@@ -25,7 +25,7 @@ import { Bubble } from 'react-chartjs-2';
|
|
25
25
|
import { Chart as ChartJS, LinearScale, PointElement, Tooltip, Legend } from 'chart.js/auto';
|
26
26
|
import { scalingVariants } from '../../constants';
|
27
27
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { cn } from '
|
28
|
+
import { cn } from 'utils/utils';
|
29
29
|
ChartJS.register(LinearScale, PointElement, Tooltip, Legend);
|
30
30
|
var bubbleChartVariants = cva('', {
|
31
31
|
variants: {
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { radiusVariants, weightVariants, primaryColorStyle, appearanceStyle, scalingVariants, } from '../../constants';
|
27
27
|
var buttonVariants = cva("inline-flex items-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8 justify-center", {
|
28
28
|
variants: {
|
@@ -49,8 +49,8 @@ var buttonVariants = cva("inline-flex items-center transition-colors focus:outli
|
|
49
49
|
export var Button = forwardRef(function (_a, ref) {
|
50
50
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "radius", "scaling", "size", "weight", "color", "appearance"]);
|
51
51
|
var buttonClassName = cn(buttonVariants({ radius: radius, scaling: scaling, size: size, weight: weight, color: color }), appearanceStyle(appearance, color, true), className);
|
52
|
-
return (<button ref={ref} className={buttonClassName} {...props}>
|
53
|
-
{children}
|
52
|
+
return (<button ref={ref} className={buttonClassName} {...props}>
|
53
|
+
{children}
|
54
54
|
</button>);
|
55
55
|
});
|
56
56
|
Button.displayName = 'Button';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import { Callout as CalloutTheme } 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 { ExclamationTriangleIcon, InfoCircledIcon, LockClosedIcon, CheckCircledIcon, } from '@radix-ui/react-icons';
|
28
28
|
import { scalingVariants } from '../../constants';
|
29
29
|
import { useCalloutContext } from '.';
|
@@ -51,12 +51,12 @@ var calloutIconVariants = cva('flex items-center text-slate-12 dark:text-slateDa
|
|
51
51
|
export var CalloutIcon = forwardRef(function (_a, ref) {
|
52
52
|
var children = _a.children, className = _a.className, iconType = _a.iconType, props = __rest(_a, ["children", "className", "iconType"]);
|
53
53
|
var _b = useCalloutContext(), scaling = _b.scaling, size = _b.size, color = _b.color;
|
54
|
-
return (<CalloutTheme.Icon ref={ref} className={cn(calloutIconVariants({ color: color, size: size, scaling: scaling }), className)} {...props}>
|
55
|
-
{iconType === 'danger' && <ExclamationTriangleIcon />}
|
56
|
-
{iconType === 'warning' && <LockClosedIcon />}
|
57
|
-
{iconType === 'success' && <CheckCircledIcon />}
|
58
|
-
{iconType === 'information' && <InfoCircledIcon />}
|
59
|
-
{children}
|
54
|
+
return (<CalloutTheme.Icon ref={ref} className={cn(calloutIconVariants({ color: color, size: size, scaling: scaling }), className)} {...props}>
|
55
|
+
{iconType === 'danger' && <ExclamationTriangleIcon />}
|
56
|
+
{iconType === 'warning' && <LockClosedIcon />}
|
57
|
+
{iconType === 'success' && <CheckCircledIcon />}
|
58
|
+
{iconType === 'information' && <InfoCircledIcon />}
|
59
|
+
{children}
|
60
60
|
</CalloutTheme.Icon>);
|
61
61
|
});
|
62
62
|
CalloutIcon.displayName = 'CalloutIcon';
|
@@ -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
|
import { useCalloutContext } from '.';
|
16
16
|
export var calloutTextVariants = cva('break-words font-normal text-slate-12 dark:text-slateDark-12 ', {
|
17
17
|
variants: {
|
@@ -35,8 +35,8 @@ export var calloutTextVariants = cva('break-words font-normal text-slate-12 dark
|
|
35
35
|
export var CalloutText = forwardRef(function (_a, ref) {
|
36
36
|
var children = _a.children, className = _a.className, contentText = _a.contentText, props = __rest(_a, ["children", "className", "contentText"]);
|
37
37
|
var _b = useCalloutContext(), size = _b.size, color = _b.color;
|
38
|
-
return (<p ref={ref} className={cn(calloutTextVariants({ size: size, color: color }), className)} {...props}>
|
39
|
-
{contentText !== null && contentText !== void 0 ? contentText : children}
|
38
|
+
return (<p ref={ref} className={cn(calloutTextVariants({ size: size, color: color }), className)} {...props}>
|
39
|
+
{contentText !== null && contentText !== void 0 ? contentText : children}
|
40
40
|
</p>);
|
41
41
|
});
|
42
42
|
CalloutText.displayName = 'CalloutText';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef, createContext, useContext, } from 'react';
|
24
24
|
import { Callout as CalloutTheme } 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 { appearanceStyle, radiusVariants, scalingVariants } from '../../constants';
|
28
28
|
export * from './CalloutIcon';
|
29
29
|
export * from './CalloutText';
|
@@ -68,10 +68,10 @@ export var Callout = forwardRef(function (_a, ref) {
|
|
68
68
|
};
|
69
69
|
var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);
|
70
70
|
var contextValue = { size: size, scaling: scaling, color: color };
|
71
|
-
return (<CalloutContext.Provider value={contextValue}>
|
72
|
-
<CalloutTheme.Root ref={ref} {...props} className={calloutClassName}>
|
73
|
-
{children}
|
74
|
-
</CalloutTheme.Root>
|
71
|
+
return (<CalloutContext.Provider value={contextValue}>
|
72
|
+
<CalloutTheme.Root ref={ref} {...props} className={calloutClassName}>
|
73
|
+
{children}
|
74
|
+
</CalloutTheme.Root>
|
75
75
|
</CalloutContext.Provider>);
|
76
76
|
});
|
77
77
|
Callout.displayName = 'Callout';
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import { cva } from 'class-variance-authority';
|
25
25
|
import { scalingVariants, weightVariants } from '../../constants';
|
26
|
-
import { cn } from '
|
26
|
+
import { cn } from 'utils/utils';
|
27
27
|
var cardVariants = cva("border border-slate-6 flex items-center text-slate-12\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\n ", {
|
28
28
|
variants: {
|
29
29
|
radius: {
|
@@ -57,8 +57,8 @@ var Card = forwardRef(function (_a, ref) {
|
|
57
57
|
if (appearance === 'ghost') {
|
58
58
|
appearanceClassName = 'border-transparent';
|
59
59
|
}
|
60
|
-
return (<div className={cn(cardVariants({ radius: radius, scaling: scaling, size: size }), appearanceClassName, className)} ref={ref} {...props}>
|
61
|
-
{children}
|
60
|
+
return (<div className={cn(cardVariants({ radius: radius, scaling: scaling, size: size }), appearanceClassName, className)} ref={ref} {...props}>
|
61
|
+
{children}
|
62
62
|
</div>);
|
63
63
|
});
|
64
64
|
Card.displayName = 'Card';
|
@@ -25,7 +25,7 @@ import { cva } from 'class-variance-authority';
|
|
25
25
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
26
26
|
import { CheckIcon, MinusIcon } from '@radix-ui/react-icons';
|
27
27
|
import { Label } from 'components/Label';
|
28
|
-
import { cn } from '
|
28
|
+
import { cn } from 'utils/utils';
|
29
29
|
import { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from '../../constants';
|
30
30
|
export var CheckboxVariants = cva("peer ring-offset-background", {
|
31
31
|
variants: {
|
@@ -82,15 +82,15 @@ var CheckboxLabelVariants = cva('', {
|
|
82
82
|
export var Checkbox = forwardRef(function (_a, ref) {
|
83
83
|
var id = _a.id, className = _a.className, children = _a.children, scaling = _a.scaling, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, _d = _a.indeterminate, indeterminate = _d === void 0 ? false : _d, props = __rest(_a, ["id", "className", "children", "scaling", "radius", "size", "color", "appearance", "indeterminate"]);
|
84
84
|
var checkboxClassName = cn(CheckboxVariants({ scaling: scaling, size: size, radius: radius }), checkboxAppearanceStyle(appearance, color, indeterminate), className);
|
85
|
-
return (<div className="flex items-center">
|
86
|
-
<CheckboxPrimitive.Root id={id} ref={ref} className={checkboxClassName} {...props}>
|
87
|
-
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current stroke-[0.5px]')}>
|
88
|
-
{indeterminate ? (<MinusIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3')}/>) : (<CheckIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }))}/>)}
|
89
|
-
</CheckboxPrimitive.Indicator>
|
90
|
-
</CheckboxPrimitive.Root>
|
91
|
-
{children && (<Label className={cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className)} htmlFor={id}>
|
92
|
-
{children}
|
93
|
-
</Label>)}
|
85
|
+
return (<div className="flex items-center">
|
86
|
+
<CheckboxPrimitive.Root id={id} ref={ref} className={checkboxClassName} {...props}>
|
87
|
+
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current stroke-[0.5px]')}>
|
88
|
+
{indeterminate ? (<MinusIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3')}/>) : (<CheckIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }))}/>)}
|
89
|
+
</CheckboxPrimitive.Indicator>
|
90
|
+
</CheckboxPrimitive.Root>
|
91
|
+
{children && (<Label className={cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className)} htmlFor={id}>
|
92
|
+
{children}
|
93
|
+
</Label>)}
|
94
94
|
</div>);
|
95
95
|
});
|
96
96
|
Checkbox.displayName = 'Checkbox';
|
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
|
|
24
24
|
import { cva } from 'class-variance-authority';
|
25
25
|
import Checkbox from 'components/Checkbox';
|
26
26
|
import { Label } from 'components/Label';
|
27
|
-
import { cn } from '
|
27
|
+
import { cn } from 'utils/utils';
|
28
28
|
import { scalingVariants } from '../../constants';
|
29
29
|
export var CheckboxCardVariants = cva("flex justify-between space-x-2 min-w-[200px] border border-slate-7 text-slate-12\n hover:border-slate-8 hover:cursor-pointer aria-disabled:bg-slate-3 aria-disabled:cursor-not-allowed aria-disabled:text-slateA-9\n dark:border-slateDark-6 dark:text-slateDark-12 dark:hover:border-slateDark-7\n dark:aria-disabled:bg-slateDark-3 dark:aria-disabled:text-slateDarkA-8", {
|
30
30
|
variants: {
|
@@ -51,9 +51,9 @@ export var CheckboxCardVariants = cva("flex justify-between space-x-2 min-w-[200
|
|
51
51
|
var CheckboxCard = forwardRef(function (_a, ref) {
|
52
52
|
var className = _a.className, children = _a.children, size = _a.size, scaling = _a.scaling, radius = _a.radius, color = _a.color, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, id = _a.id, disabled = _a.disabled, props = __rest(_a, ["className", "children", "size", "scaling", "radius", "color", "appearance", "id", "disabled"]);
|
53
53
|
var labelClassName = cn(CheckboxCardVariants({ size: size, radius: radius, scaling: scaling }), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);
|
54
|
-
return (<Label htmlFor={id} className={labelClassName} aria-disabled={disabled}>
|
55
|
-
{children}
|
56
|
-
<Checkbox className="mr-0" ref={ref} id={id} size={size} scaling={scaling} radius={radius} color={color} disabled={disabled} appearance={appearance === 'classic' ? 'classic' : 'surface'} {...props}/>
|
54
|
+
return (<Label htmlFor={id} className={labelClassName} aria-disabled={disabled}>
|
55
|
+
{children}
|
56
|
+
<Checkbox className="mr-0" ref={ref} id={id} size={size} scaling={scaling} radius={radius} color={color} disabled={disabled} appearance={appearance === 'classic' ? 'classic' : 'surface'} {...props}/>
|
57
57
|
</Label>);
|
58
58
|
});
|
59
59
|
CheckboxCard.displayName = 'CheckboxCard';
|
@@ -15,10 +15,10 @@ import { useCheckboxGroupContext } from '.';
|
|
15
15
|
export var CheckboxGroupItem = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, value = _a.value, id = _a.id, defaultValue = _a.defaultValue, props = __rest(_a, ["className", "children", "value", "id", "defaultValue"]);
|
17
17
|
var _b = useCheckboxGroupContext(), scaling = _b.scaling, size = _b.size, color = _b.color, radius = _b.radius, appearance = _b.appearance;
|
18
|
-
return (<div className="flex">
|
19
|
-
<Checkbox className={className} ref={ref} id={id} defaultChecked={defaultValue == id} scaling={scaling} radius={radius} color={color} size={size} appearance={appearance} {...props}>
|
20
|
-
{children}
|
21
|
-
</Checkbox>
|
18
|
+
return (<div className="flex">
|
19
|
+
<Checkbox className={className} ref={ref} id={id} defaultChecked={defaultValue == id} scaling={scaling} radius={radius} color={color} size={size} appearance={appearance} {...props}>
|
20
|
+
{children}
|
21
|
+
</Checkbox>
|
22
22
|
</div>);
|
23
23
|
});
|
24
24
|
CheckboxGroupItem.displayName = 'CheckboxGroupItem';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { Children, createContext, forwardRef, useContext, } from 'react';
|
2
2
|
import { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';
|
3
3
|
import { cva } from 'class-variance-authority';
|
4
|
-
import { cn } from '
|
4
|
+
import { cn } from 'utils/utils';
|
5
5
|
export * from './CheckboxGroupItem';
|
6
6
|
export var CheckboxGroupVariants = cva("", {
|
7
7
|
variants: {
|
@@ -28,10 +28,10 @@ export var useCheckboxGroupContext = function () {
|
|
28
28
|
export var CheckboxGroup = forwardRef(function (_a, ref) {
|
29
29
|
var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, size = _a.size;
|
30
30
|
var contextValue = { size: size };
|
31
|
-
return (<CheckboxGroupContext.Provider value={contextValue}>
|
32
|
-
<CheckboxGroupTheme.Root defaultValue={defaultValue} ref={ref} className={cn(CheckboxGroupVariants({ size: size }), className)}>
|
33
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); })}
|
34
|
-
</CheckboxGroupTheme.Root>
|
31
|
+
return (<CheckboxGroupContext.Provider value={contextValue}>
|
32
|
+
<CheckboxGroupTheme.Root defaultValue={defaultValue} ref={ref} className={cn(CheckboxGroupVariants({ size: size }), className)}>
|
33
|
+
{Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); })}
|
34
|
+
</CheckboxGroupTheme.Root>
|
35
35
|
</CheckboxGroupContext.Provider>);
|
36
36
|
});
|
37
37
|
CheckboxGroup.displayName = 'CheckboxGroup';
|
@@ -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 { CheckIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from '
|
15
|
+
import { cn } from 'utils/utils';
|
16
16
|
import { ContextMenuItemIndicator, contextMenuItemVariants, useContextMenuContext, } from '.';
|
17
17
|
import { menuItemAppearanceStyle } from '../../constants';
|
18
18
|
export var ContextMenuCheckboxItem = forwardRef(function (_a, ref) {
|
@@ -23,11 +23,11 @@ export var ContextMenuCheckboxItem = forwardRef(function (_a, ref) {
|
|
23
23
|
scaling: scaling,
|
24
24
|
size: size,
|
25
25
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
26
|
-
return (<ContextMenuPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
27
|
-
<ContextMenuItemIndicator forceMount radius={'medium'} size={size}>
|
28
|
-
{checked && <CheckIcon />}
|
29
|
-
</ContextMenuItemIndicator>
|
30
|
-
{children}
|
26
|
+
return (<ContextMenuPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
27
|
+
<ContextMenuItemIndicator forceMount radius={'medium'} size={size}>
|
28
|
+
{checked && <CheckIcon />}
|
29
|
+
</ContextMenuItemIndicator>
|
30
|
+
{children}
|
31
31
|
</ContextMenuPrimitive.CheckboxItem>);
|
32
32
|
});
|
33
33
|
ContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { scalingVariants } from '../../constants';
|
28
28
|
import { useContextMenuContext } from '.';
|
@@ -50,10 +50,10 @@ export var contextMenuContentVariants = cva("p-[5px] bg-white dark:bg-slateDark-
|
|
50
50
|
export var ContextMenuContent = forwardRef(function (_a, ref) {
|
51
51
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
52
52
|
var _b = useContextMenuContext(), radius = _b.radius, scaling = _b.scaling, size = _b.size;
|
53
|
-
return (<ContextMenuPrimitive.Portal>
|
54
|
-
<ContextMenuPrimitive.Content ref={ref} className={cn(contextMenuContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
55
|
-
{children}
|
56
|
-
</ContextMenuPrimitive.Content>
|
53
|
+
return (<ContextMenuPrimitive.Portal>
|
54
|
+
<ContextMenuPrimitive.Content ref={ref} className={cn(contextMenuContentVariants({ radius: radius, scaling: scaling, size: size }), className)} {...props}>
|
55
|
+
{children}
|
56
|
+
</ContextMenuPrimitive.Content>
|
57
57
|
</ContextMenuPrimitive.Portal>);
|
58
58
|
});
|
59
59
|
ContextMenuContent.displayName = 'ContextMenuContent';
|
@@ -13,8 +13,8 @@ import React, { forwardRef } from 'react';
|
|
13
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
14
14
|
export var ContextMenuGroup = forwardRef(function (_a, ref) {
|
15
15
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (<ContextMenuPrimitive.Group ref={ref} className={className} {...props}>
|
17
|
-
{children}
|
16
|
+
return (<ContextMenuPrimitive.Group ref={ref} className={className} {...props}>
|
17
|
+
{children}
|
18
18
|
</ContextMenuPrimitive.Group>);
|
19
19
|
});
|
20
20
|
ContextMenuGroup.displayName = 'ContextMenuGroup';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { blackText, menuItemAppearanceStyle, scalingVariants, radiusVariants, } from '../../constants';
|
28
28
|
import { useContextMenuContext } from '.';
|
@@ -53,9 +53,9 @@ export var ContextMenuItem = forwardRef(function (_a, ref) {
|
|
53
53
|
if (appearance === 'solid' && !blackText.includes(color)) {
|
54
54
|
shortcutClassName = 'group-hover:text-white dark:group-hover:text-slateDark-1';
|
55
55
|
}
|
56
|
-
return (<ContextMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>
|
57
|
-
{children}
|
58
|
-
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
56
|
+
return (<ContextMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>
|
57
|
+
{children}
|
58
|
+
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
59
59
|
</ContextMenuPrimitive.Item>);
|
60
60
|
});
|
61
61
|
ContextMenuItem.displayName = 'ContextMenuItem';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { CheckIcon } from '@radix-ui/react-icons';
|
27
27
|
import { cva } from 'class-variance-authority';
|
28
28
|
import { radiusVariants } from '../../constants';
|
@@ -44,8 +44,8 @@ export var ContextMenuItemIndicator = forwardRef(function (_a, ref) {
|
|
44
44
|
var className = _a.className, children = _a.children, radius = _a.radius, props = __rest(_a, ["className", "children", "radius"]);
|
45
45
|
var size = useContextMenuContext().size;
|
46
46
|
var indicatorClassName = cn(contextMenuItemIndicatorVariants({ size: size, radius: radius }), className);
|
47
|
-
return (<ContextMenuPrimitive.ItemIndicator ref={ref} className={indicatorClassName} {...props}>
|
48
|
-
{children !== null && children !== void 0 ? children : <CheckIcon />}
|
47
|
+
return (<ContextMenuPrimitive.ItemIndicator ref={ref} className={indicatorClassName} {...props}>
|
48
|
+
{children !== null && children !== void 0 ? children : <CheckIcon />}
|
49
49
|
</ContextMenuPrimitive.ItemIndicator>);
|
50
50
|
});
|
51
51
|
ContextMenuItemIndicator.displayName = 'ContextMenuItemIndicator';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { scalingVariants } from '../../constants';
|
28
28
|
import { useContextMenuContext } from '.';
|
@@ -42,8 +42,8 @@ export var contextMenuLabelVariants = cva("flex relative leading-none select-non
|
|
42
42
|
export var ContextMenuLabel = forwardRef(function (_a, ref) {
|
43
43
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
44
44
|
var _b = useContextMenuContext(), size = _b.size, scaling = _b.scaling;
|
45
|
-
return (<ContextMenuPrimitive.Label ref={ref} className={cn(contextMenuLabelVariants({ size: size, scaling: scaling }), className)} {...props}>
|
46
|
-
{children}
|
45
|
+
return (<ContextMenuPrimitive.Label ref={ref} className={cn(contextMenuLabelVariants({ size: size, scaling: scaling }), className)} {...props}>
|
46
|
+
{children}
|
47
47
|
</ContextMenuPrimitive.Label>);
|
48
48
|
});
|
49
49
|
ContextMenuLabel.displayName = 'ContextMenuLabel';
|
@@ -14,10 +14,10 @@ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
14
14
|
export var RadioContext = createContext({ selectedValue: '' });
|
15
15
|
export var ContextMenuRadioGroup = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
17
|
-
return (<ContextMenuPrimitive.RadioGroup ref={ref} className={className} {...props}>
|
18
|
-
<RadioContext.Provider value={{ selectedValue: value !== null && value !== void 0 ? value : '' }}>
|
19
|
-
{children}
|
20
|
-
</RadioContext.Provider>
|
17
|
+
return (<ContextMenuPrimitive.RadioGroup ref={ref} className={className} {...props}>
|
18
|
+
<RadioContext.Provider value={{ selectedValue: value !== null && value !== void 0 ? value : '' }}>
|
19
|
+
{children}
|
20
|
+
</RadioContext.Provider>
|
21
21
|
</ContextMenuPrimitive.RadioGroup>);
|
22
22
|
});
|
23
23
|
ContextMenuRadioGroup.displayName = 'ContextMenuRadioGroup';
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React, { forwardRef, useContext } 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
|
import { DotFilledIcon } from '@radix-ui/react-icons';
|
16
16
|
import { menuItemAppearanceStyle } from '../../constants';
|
17
17
|
import { ContextMenuItemIndicator, RadioContext, contextMenuItemVariants, useContextMenuContext, } from '.';
|
@@ -24,11 +24,11 @@ export var ContextMenuRadioItem = forwardRef(function (_a, ref) {
|
|
24
24
|
size: size,
|
25
25
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
26
26
|
var radioGroup = useContext(RadioContext);
|
27
|
-
return (<ContextMenuPrimitive.RadioItem ref={ref} className={itemClassName} {...props}>
|
28
|
-
<ContextMenuItemIndicator forceMount radius={'full'} size={size}>
|
29
|
-
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
30
|
-
</ContextMenuItemIndicator>
|
31
|
-
{children}
|
27
|
+
return (<ContextMenuPrimitive.RadioItem ref={ref} className={itemClassName} {...props}>
|
28
|
+
<ContextMenuItemIndicator forceMount radius={'full'} size={size}>
|
29
|
+
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
30
|
+
</ContextMenuItemIndicator>
|
31
|
+
{children}
|
32
32
|
</ContextMenuPrimitive.RadioItem>);
|
33
33
|
});
|
34
34
|
ContextMenuRadioItem.displayName = 'ContextMenuRadioItem';
|
@@ -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 ContextMenuSeparator = forwardRef(function (_a, ref) {
|
16
16
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
17
|
-
return (<ContextMenuPrimitive.Separator ref={ref} className={cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className)} {...props}>
|
18
|
-
{children}
|
17
|
+
return (<ContextMenuPrimitive.Separator ref={ref} className={cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className)} {...props}>
|
18
|
+
{children}
|
19
19
|
</ContextMenuPrimitive.Separator>);
|
20
20
|
});
|
21
21
|
ContextMenuSeparator.displayName = 'ContextMenuSeparator';
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
};
|
23
23
|
import React, { forwardRef } from 'react';
|
24
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
25
|
-
import { cn } from '
|
25
|
+
import { cn } from 'utils/utils';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { radiusVariants, scalingVariants } from '../../constants';
|
28
28
|
import { useContextMenuContext } from '.';
|
@@ -43,14 +43,14 @@ export var contextMenuSubContentVariants = cva("p-[5px] bg-white dark:bg-slateDa
|
|
43
43
|
});
|
44
44
|
export var ContextMenuSubContent = forwardRef(function (_a, ref) {
|
45
45
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
46
|
-
var _b = useContextMenuContext(), radius = _b.radius, size = _b.size
|
47
|
-
return (<ContextMenuPrimitive.Portal>
|
46
|
+
var _b = useContextMenuContext(), radius = _b.radius, size = _b.size;
|
47
|
+
return (<ContextMenuPrimitive.Portal>
|
48
48
|
<ContextMenuPrimitive.SubContent ref={ref} className={cn(contextMenuSubContentVariants({
|
49
49
|
radius: radius,
|
50
50
|
size: size,
|
51
|
-
}), className)} sideOffset={2} alignOffset={-5} {...props}>
|
52
|
-
{children}
|
53
|
-
</ContextMenuPrimitive.SubContent>
|
51
|
+
}), className)} sideOffset={2} alignOffset={-5} {...props}>
|
52
|
+
{children}
|
53
|
+
</ContextMenuPrimitive.SubContent>
|
54
54
|
</ContextMenuPrimitive.Portal>);
|
55
55
|
});
|
56
56
|
ContextMenuSubContent.displayName = 'ContextMenuSubContent';
|