@lotte-innovate/ui-component-test 0.0.47 → 0.0.49
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +281 -78
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Header/{index.js → index.jsx} +7 -4
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/Typography/Text/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Accordion/index.d.ts +1 -1
- package/dist/lib/components/Accordion/{index.js → index.jsx} +19 -7
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogAction.js → AlertDialogAction.jsx} +6 -5
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogCancel.js → AlertDialogCancel.jsx} +6 -5
- package/dist/lib/components/AlertDialog/{AlertDialogContent.js → AlertDialogContent.jsx} +9 -5
- package/dist/lib/components/AlertDialog/{AlertDialogDescription.js → AlertDialogDescription.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogRoot.js → AlertDialogRoot.jsx} +6 -14
- package/dist/lib/components/AlertDialog/{AlertDialogTitle.js → AlertDialogTitle.jsx} +5 -15
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogTrigger.js → AlertDialogTrigger.jsx} +6 -5
- package/dist/lib/components/AspectRatio/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Avatar/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Badge/index.d.ts +1 -1
- package/dist/lib/components/Badge/{index.js → index.jsx} +6 -5
- package/dist/lib/components/BarChart/index.d.ts +3 -2
- package/dist/lib/components/BarChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/BubbleChart/index.d.ts +3 -2
- package/dist/lib/components/BubbleChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Button/index.d.ts +1 -1
- package/dist/lib/components/Button/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Callout/{CalloutIcon.js → CalloutIcon.jsx} +10 -5
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/{CalloutRoot.js → CalloutRoot.jsx} +8 -5
- package/dist/lib/components/Callout/{CalloutText.js → CalloutText.jsx} +5 -15
- package/dist/lib/components/Card/index.d.ts +1 -1
- package/dist/lib/components/Card/{index.js → index.jsx} +6 -5
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/{index.js → index.jsx} +14 -6
- package/dist/lib/components/CheckboxCard/index.d.ts +2 -2
- package/dist/lib/components/CheckboxCard/{index.js → index.jsx} +9 -7
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupItem.js → CheckboxGroupItem.jsx} +7 -15
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +2 -2
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupRoot.js → CheckboxGroupRoot.jsx} +6 -3
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuCheckboxItem.js → ContextMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/{ContextMenuContent.js → ContextMenuContent.jsx} +8 -5
- package/dist/lib/components/ContextMenu/{ContextMenuGroup.js → ContextMenuGroup.jsx} +4 -14
- package/dist/lib/components/ContextMenu/{ContextMenuItem.js → ContextMenuItem.jsx} +7 -5
- package/dist/lib/components/ContextMenu/{ContextMenuItemIndicator.js → ContextMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuLabel.js → ContextMenuLabel.jsx} +6 -5
- package/dist/lib/components/ContextMenu/{ContextMenuRadioGroup.js → ContextMenuRadioGroup.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuRadioItem.js → ContextMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuRoot.js → ContextMenuRoot.jsx} +6 -14
- package/dist/lib/components/ContextMenu/{ContextMenuSeparator.js → ContextMenuSeparator.jsx} +5 -15
- package/dist/lib/components/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubContent.jsx} +12 -9
- package/dist/lib/components/ContextMenu/{ContextMenuSubTrigger.js → ContextMenuSubTrigger.jsx} +11 -16
- package/dist/lib/components/ContextMenu/{ContextMenuTrigger.js → ContextMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DataList/{DataListItem.js → DataListItem.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListLabel.js → DataListLabel.jsx} +6 -5
- package/dist/lib/components/DataList/{DataListRoot.js → DataListRoot.jsx} +7 -15
- package/dist/lib/components/DataList/{DataListValue.js → DataListValue.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogAction.js → DialogAction.jsx} +6 -16
- package/dist/lib/components/Dialog/{DialogCancel.js → DialogCancel.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogContent.js → DialogContent.jsx} +6 -5
- package/dist/lib/components/Dialog/{DialogDescription.js → DialogDescription.jsx} +5 -15
- package/dist/lib/components/Dialog/DialogRoot.d.ts +1 -1
- package/dist/lib/components/Dialog/{DialogRoot.js → DialogRoot.jsx} +6 -14
- package/dist/lib/components/Dialog/{DialogSlot.js → DialogSlot.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTitle.js → DialogTitle.jsx} +5 -15
- package/dist/lib/components/Dialog/{DialogTrigger.js → DialogTrigger.jsx} +4 -14
- package/dist/lib/components/Dialog/index.d.ts +1 -1
- package/dist/lib/components/DoughnutChart/index.d.ts +3 -2
- package/dist/lib/components/DoughnutChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/DropdownMenu/{DropdonMenuRadioGroup.js → DropdonMenuRadioGroup.jsx} +3 -13
- package/dist/lib/components/DropdownMenu/{DropdonMenuSubContent.js → DropdonMenuSubContent.jsx} +12 -9
- package/dist/lib/components/DropdownMenu/{DropdownMenuCheckboxItem.js → DropdownMenuCheckboxItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/{DropdownMenuContent.js → DropdownMenuContent.jsx} +8 -5
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuItem.js → DropdownMenuItem.jsx} +7 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuItemIndicator.js → DropdownMenuItemIndicator.jsx} +6 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuLable.js → DropdownMenuLable.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuRadioItem.js → DropdownMenuRadioItem.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +2 -2
- package/dist/lib/components/DropdownMenu/{DropdownMenuRoot.js → DropdownMenuRoot.jsx} +4 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSeparator.js → DropdownMenuSeparator.jsx} +3 -15
- package/dist/lib/components/DropdownMenu/{DropdownMenuSub.js → DropdownMenuSub.jsx} +2 -14
- package/dist/lib/components/DropdownMenu/{DropdownMenuSubTrigger.js → DropdownMenuSubTrigger.jsx} +9 -16
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuTrigger.js → DropdownMenuTrigger.jsx} +5 -15
- package/dist/lib/components/DropdownMenu/index.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardContent.js → HoverCardContent.jsx} +6 -5
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardRoot.js → HoverCardRoot.jsx} +6 -14
- package/dist/lib/components/HoverCard/{HoverCardTrigger.js → HoverCardTrigger.jsx} +4 -14
- package/dist/lib/components/HoverCard/index.d.ts +1 -1
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/IconButton/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Inset/{index.js → index.jsx} +8 -5
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/{index.js → index.jsx} +5 -4
- package/dist/lib/components/LineChart/index.d.ts +3 -2
- package/dist/lib/components/LineChart/{index.js → index.jsx} +6 -7
- package/dist/lib/components/Menubar/{MenubarCheckboxItem.js → MenubarCheckboxItem.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarContent.js → MenubarContent.jsx} +12 -9
- package/dist/lib/components/Menubar/{MenubarItem.js → MenubarItem.jsx} +7 -5
- package/dist/lib/components/Menubar/{MenubarItemIndicator.js → MenubarItemIndicator.jsx} +6 -5
- package/dist/lib/components/Menubar/{MenubarMenu.js → MenubarMenu.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarRadioGroup.js → MenubarRadioGroup.jsx} +6 -14
- package/dist/lib/components/Menubar/{MenubarRadioItem.js → MenubarRadioItem.jsx} +9 -16
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/{MenubarRoot.js → MenubarRoot.jsx} +8 -5
- package/dist/lib/components/Menubar/{MenubarSeparator.js → MenubarSeparator.jsx} +5 -15
- package/dist/lib/components/Menubar/{MenubarSub.js → MenubarSub.jsx} +2 -14
- package/dist/lib/components/Menubar/{MenubarSubContent.js → MenubarSubContent.jsx} +7 -6
- package/dist/lib/components/Menubar/{MenubarSubTrigger.js → MenubarSubTrigger.jsx} +9 -16
- package/dist/lib/components/Menubar/{MenubarTrigger.js → MenubarTrigger.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuContent.js → NavigationMenuContent.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.jsx +22 -0
- package/dist/lib/components/NavigationMenu/{NavigationMenuItem.js → NavigationMenuItem.jsx} +4 -14
- package/dist/lib/components/NavigationMenu/{NavigationMenuLink.js → NavigationMenuLink.jsx} +6 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuList.js → NavigationMenuList.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/{NavigationMenuRoot.js → NavigationMenuRoot.jsx} +7 -15
- package/dist/lib/components/NavigationMenu/{NavigationMenuTrigger.js → NavigationMenuTrigger.jsx} +7 -5
- package/dist/lib/components/NavigationMenu/{NavigationMenuViewport.js → NavigationMenuViewport.jsx} +6 -5
- package/dist/lib/components/PieChart/index.d.ts +3 -2
- package/dist/lib/components/PieChart/{index.js → index.jsx} +6 -6
- package/dist/lib/components/Popover/{PopoverClose.js → PopoverClose.jsx} +5 -15
- package/dist/lib/components/Popover/{PopoverContent.js → PopoverContent.jsx} +6 -5
- package/dist/lib/components/Popover/PopoverRoot.d.ts +1 -1
- package/dist/lib/components/Popover/{PopoverRoot.js → PopoverRoot.jsx} +6 -14
- package/dist/lib/components/Popover/{PopoverTrigger.js → PopoverTrigger.jsx} +4 -14
- package/dist/lib/components/Popover/index.d.ts +1 -1
- package/dist/lib/components/Progress/{index.js → index.jsx} +6 -5
- package/dist/lib/components/RadarChart/index.d.ts +3 -2
- package/dist/lib/components/RadarChart/{index.js → index.jsx} +7 -7
- package/dist/lib/components/Radio/index.d.ts +1 -1
- package/dist/lib/components/Radio/{index.js → index.jsx} +10 -15
- package/dist/lib/components/RadioCards/{RadioCardsItem.js → RadioCardsItem.jsx} +5 -15
- package/dist/lib/components/RadioCards/{RadioCardsRoot.js → RadioCardsRoot.jsx} +10 -5
- package/dist/lib/components/RadioGroup/{RadioGroupItem.js → RadioGroupItem.jsx} +5 -15
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +1 -1
- package/dist/lib/components/RadioGroup/{RadioGroupRoot.js → RadioGroupRoot.jsx} +9 -15
- package/dist/lib/components/ScrollArea/{index.js → index.jsx} +6 -14
- package/dist/lib/components/SegmentedControl/{SegmentedControlItem.js → SegmentedControlItem.jsx} +5 -15
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +1 -1
- package/dist/lib/components/SegmentedControl/{SegmentedControlRoot.js → SegmentedControlRoot.jsx} +7 -4
- package/dist/lib/components/SegmentedControl/index.d.ts +1 -1
- package/dist/lib/components/Select/index.d.ts +1 -1
- package/dist/lib/components/Select/{index.js → index.jsx} +27 -10
- package/dist/lib/components/Separator/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/{index.js → index.jsx} +7 -4
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/{index.js → index.jsx} +5 -4
- package/dist/lib/components/Spinner/index.d.ts +1 -1
- package/dist/lib/components/Spinner/{index.js → index.jsx} +7 -4
- package/dist/lib/components/TabNav/{index.js → index.jsx} +9 -15
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/{index.js → index.jsx} +25 -10
- package/dist/lib/components/Tabs/{index.js → index.jsx} +16 -7
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/{index.js → index.jsx} +5 -4
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/{index.js → index.jsx} +10 -5
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastActionButton.js → ToastActionButton.jsx} +7 -6
- package/dist/lib/components/Toast/ToastDescription.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastDescription.js → ToastDescription.jsx} +7 -15
- package/dist/lib/components/Toast/{ToastRoot.js → ToastRoot.jsx} +11 -5
- package/dist/lib/components/Toast/ToastTitle.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastTitle.js → ToastTitle.jsx} +5 -15
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/{ToggleWithText.js → ToggleWithText.jsx} +9 -7
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/{index.js → index.jsx} +6 -5
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupItem.js → ToggleGroupItem.jsx} +6 -16
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupRoot.js → ToggleGroupRoot.jsx} +10 -5
- package/dist/lib/components/ToggleSwitch/{index.js → index.jsx} +9 -5
- package/dist/lib/components/Tooltip/index.d.ts +1 -1
- package/dist/lib/components/Tooltip/{index.js → index.jsx} +13 -4
- package/dist/lib/constants.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/lib/utils/useDarkMode.js +1 -1
- package/package.json +2 -4
- package/dist/globals.css +0 -4
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -31
- package/dist/tailwind.config.d.ts +0 -3
- package/dist/tailwind.config.js +0 -141
- /package/dist/lib/components/AlertDialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Callout/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/CheckboxGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ContextMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DataList/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Dialog/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/DropdownMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/HoverCard/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Menubar/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/NavigationMenu/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Popover/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioCards/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/RadioGroup/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/SegmentedControl/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/Toast/{index.js → index.jsx} +0 -0
- /package/dist/lib/components/ToggleGroup/{index.js → index.jsx} +0 -0
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import { cva } from 'class-variance-authority';
|
26
|
-
import Checkbox from '
|
27
|
-
import { Label } from '
|
28
|
-
import { cn } from '
|
29
|
-
import { scalingVariants } from '
|
25
|
+
import Checkbox from 'lib/components/Checkbox';
|
26
|
+
import { Label } from 'lib/components/Label';
|
27
|
+
import { cn } from 'lib/utils/utils';
|
28
|
+
import { scalingVariants } from 'lib/constants';
|
30
29
|
export var CheckboxCardVariants = cva("flex justify-between space-x-2 w-fit 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", {
|
31
30
|
variants: {
|
32
31
|
radius: {
|
@@ -52,7 +51,10 @@ export var CheckboxCardVariants = cva("flex justify-between space-x-2 w-fit min-
|
|
52
51
|
var CheckboxCard = forwardRef(function (_a, ref) {
|
53
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"]);
|
54
53
|
var labelClassName = cn(CheckboxCardVariants({ size: size, radius: radius, scaling: scaling }), appearance === 'classic' ? 'shadow-card-classic dark:shadow-card-dark-classic' : '', className);
|
55
|
-
return (
|
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
|
+
</Label>);
|
56
58
|
});
|
57
59
|
CheckboxCard.displayName = 'CheckboxCard';
|
58
60
|
export default CheckboxCard;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
3
|
-
import { CheckboxProps } from '
|
3
|
+
import { CheckboxProps } from 'lib/components/Checkbox';
|
4
4
|
export declare const CheckboxGroupItem: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
5
5
|
export default CheckboxGroupItem;
|
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,14 +9,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import
|
25
|
-
import Checkbox from '../../../lib/components/Checkbox';
|
12
|
+
import React, { forwardRef } from 'react';
|
13
|
+
import Checkbox from 'lib/components/Checkbox';
|
26
14
|
import { useCheckboxGroupContext } from './CheckboxGroupRoot';
|
27
15
|
export var CheckboxGroupItem = forwardRef(function (_a, ref) {
|
28
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"]);
|
29
17
|
var _b = useCheckboxGroupContext(), scaling = _b.scaling, size = _b.size, color = _b.color, radius = _b.radius, appearance = _b.appearance;
|
30
|
-
return (
|
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
|
+
</div>);
|
31
23
|
});
|
32
24
|
CheckboxGroupItem.displayName = 'CheckboxGroup.Item';
|
33
25
|
export default CheckboxGroupItem;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
2
|
import { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';
|
3
|
-
import { CheckboxVariants } from '
|
3
|
+
import { CheckboxVariants } from 'lib/components/Checkbox';
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
5
|
-
import { IAppearance, IColor } from '
|
5
|
+
import { IAppearance, IColor } from 'lib/types';
|
6
6
|
export interface CheckboxGroupRootProps extends VariantProps<typeof CheckboxGroupVariants>, VariantProps<typeof CheckboxVariants> {
|
7
7
|
children?: ReactNode;
|
8
8
|
defaultValue?: string[];
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
1
|
import React, { Children, createContext, forwardRef, useContext, useMemo, } from 'react';
|
3
2
|
import { CheckboxGroup as CheckboxGroupTheme } from '@radix-ui/themes';
|
4
3
|
import { cva } from 'class-variance-authority';
|
5
|
-
import { cn } from '
|
4
|
+
import { cn } from 'lib/utils/utils';
|
6
5
|
export var CheckboxGroupVariants = cva("", {
|
7
6
|
variants: {
|
8
7
|
size: {
|
@@ -28,7 +27,11 @@ export var useCheckboxGroupContext = function () {
|
|
28
27
|
export var CheckboxGroupRoot = forwardRef(function (_a, ref) {
|
29
28
|
var className = _a.className, children = _a.children, defaultValue = _a.defaultValue, scaling = _a.scaling, size = _a.size, color = _a.color, radius = _a.radius, appearance = _a.appearance;
|
30
29
|
var contextValue = useMemo(function () { return ({ scaling: scaling, size: size, color: color, radius: radius, appearance: appearance }); }, [scaling, size, color, radius, appearance]);
|
31
|
-
return (
|
30
|
+
return (<CheckboxGroupContext.Provider value={contextValue}>
|
31
|
+
<CheckboxGroupTheme.Root ref={ref} defaultValue={defaultValue} className={cn(CheckboxGroupVariants({ size: size }), className)}>
|
32
|
+
{Children.map(children, function (child) { return React.cloneElement(child, { defaultValue: defaultValue }); })}
|
33
|
+
</CheckboxGroupTheme.Root>
|
34
|
+
</CheckboxGroupContext.Provider>);
|
32
35
|
});
|
33
36
|
CheckboxGroupRoot.displayName = 'CheckboxGroup.Root';
|
34
37
|
export default CheckboxGroupRoot;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const CheckboxGroup: {
|
3
3
|
Root: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/checkbox-group").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./CheckboxGroupRoot").CheckboxGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
4
|
-
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("
|
4
|
+
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("lib/components/Checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
5
5
|
};
|
6
6
|
export default CheckboxGroup;
|
package/dist/lib/components/ContextMenu/{ContextMenuCheckboxItem.js → ContextMenuCheckboxItem.jsx}
RENAMED
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,13 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
14
|
import { CheckIcon } from '@radix-ui/react-icons';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { useContextMenuContext } from './ContextMenuRoot';
|
29
|
-
import { menuItemAppearanceStyle } from '
|
17
|
+
import { menuItemAppearanceStyle } from 'lib/constants';
|
30
18
|
import { contextMenuItemVariants } from './ContextMenuItem';
|
31
19
|
import { ContextMenuItemIndicator } from './ContextMenuItemIndicator';
|
32
20
|
export var ContextMenuCheckboxItem = forwardRef(function (_a, ref) {
|
@@ -37,6 +25,11 @@ export var ContextMenuCheckboxItem = forwardRef(function (_a, ref) {
|
|
37
25
|
scaling: scaling,
|
38
26
|
size: size,
|
39
27
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
40
|
-
return (
|
28
|
+
return (<ContextMenuPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
29
|
+
<ContextMenuItemIndicator forceMount radius={'medium'} size={size}>
|
30
|
+
{checked && <CheckIcon />}
|
31
|
+
</ContextMenuItemIndicator>
|
32
|
+
{children}
|
33
|
+
</ContextMenuPrimitive.CheckboxItem>);
|
41
34
|
});
|
42
35
|
ContextMenuCheckboxItem.displayName = 'ContextMenu.CheckboxItem';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { scalingVariants } from '
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
29
28
|
import { useContextMenuContext } from './ContextMenuRoot';
|
30
29
|
export var contextMenuContentVariants = 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)]", {
|
31
30
|
variants: {
|
@@ -51,6 +50,10 @@ export var contextMenuContentVariants = cva("p-[5px] bg-white dark:bg-slateDark-
|
|
51
50
|
export var ContextMenuContent = forwardRef(function (_a, ref) {
|
52
51
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
53
52
|
var _b = useContextMenuContext(), radius = _b.radius, scaling = _b.scaling, size = _b.size;
|
54
|
-
return (
|
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
|
+
</ContextMenuPrimitive.Portal>);
|
55
58
|
});
|
56
59
|
ContextMenuContent.displayName = 'ContextMenu.Content';
|
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,11 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
14
|
export var ContextMenuGroup = forwardRef(function (_a, ref) {
|
27
15
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
28
|
-
return (
|
16
|
+
return (<ContextMenuPrimitive.Group ref={ref} className={className} {...props}>
|
17
|
+
{children}
|
18
|
+
</ContextMenuPrimitive.Group>);
|
29
19
|
});
|
30
20
|
ContextMenuGroup.displayName = 'ContextMenu.Group';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { blackText, menuItemAppearanceStyle, scalingVariants, radiusVariants } from '
|
27
|
+
import { blackText, menuItemAppearanceStyle, scalingVariants, radiusVariants } from 'lib/constants';
|
29
28
|
import { useContextMenuContext } from './ContextMenuRoot';
|
30
29
|
export var contextMenuItemVariants = cva("flex group relative leading-none select-none outline-none items-center justify-between font-normal\n data-[disabled]:text-slate-8 data-[disabled]:cursor-not-allowed text-slate-12 dark:text-slateDark-12\n data-[disabled]:hover:bg-transparent dark:data-[disabled]:text-slateDark-8 data-[disabled]:dark:hover:bg-transparent", {
|
31
30
|
variants: {
|
@@ -54,6 +53,9 @@ export var ContextMenuItem = forwardRef(function (_a, ref) {
|
|
54
53
|
if (appearance === 'solid' && !blackText.includes(color)) {
|
55
54
|
shortcutClassName = 'group-hover:text-white dark:group-hover:text-slateDark-1';
|
56
55
|
}
|
57
|
-
return (
|
56
|
+
return (<ContextMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>
|
57
|
+
{children}
|
58
|
+
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
59
|
+
</ContextMenuPrimitive.Item>);
|
58
60
|
});
|
59
61
|
ContextMenuItem.displayName = 'ContextMenu.Item';
|
package/dist/lib/components/ContextMenu/{ContextMenuItemIndicator.js → ContextMenuItemIndicator.jsx}
RENAMED
@@ -20,13 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
27
26
|
import { CheckIcon } from '@radix-ui/react-icons';
|
28
27
|
import { cva } from 'class-variance-authority';
|
29
|
-
import { radiusVariants } from '
|
28
|
+
import { radiusVariants } from 'lib/constants';
|
30
29
|
import { useContextMenuContext } from './ContextMenuRoot';
|
31
30
|
export var contextMenuItemIndicatorVariants = cva("absolute left-0 inline-flex items-center justify-center ml-1 border", {
|
32
31
|
variants: {
|
@@ -45,6 +44,8 @@ export var ContextMenuItemIndicator = forwardRef(function (_a, ref) {
|
|
45
44
|
var className = _a.className, children = _a.children, radius = _a.radius, props = __rest(_a, ["className", "children", "radius"]);
|
46
45
|
var size = useContextMenuContext().size;
|
47
46
|
var indicatorClassName = cn(contextMenuItemIndicatorVariants({ size: size, radius: radius }), className);
|
48
|
-
return (
|
47
|
+
return (<ContextMenuPrimitive.ItemIndicator ref={ref} className={indicatorClassName} {...props}>
|
48
|
+
{children !== null && children !== void 0 ? children : <CheckIcon />}
|
49
|
+
</ContextMenuPrimitive.ItemIndicator>);
|
49
50
|
});
|
50
51
|
ContextMenuItemIndicator.displayName = 'ContextMenu.ItemIndicator';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { scalingVariants } from '
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
29
28
|
import { useContextMenuContext } from './ContextMenuRoot';
|
30
29
|
export var contextMenuLabelVariants = cva("flex relative leading-none select-none outline-none items-center \n text-slate-11 dark:text-slateDarkA-11 font-normal", {
|
31
30
|
variants: {
|
@@ -43,6 +42,8 @@ export var contextMenuLabelVariants = cva("flex relative leading-none select-non
|
|
43
42
|
export var ContextMenuLabel = forwardRef(function (_a, ref) {
|
44
43
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
45
44
|
var _b = useContextMenuContext(), size = _b.size, scaling = _b.scaling;
|
46
|
-
return (
|
45
|
+
return (<ContextMenuPrimitive.Label ref={ref} className={cn(contextMenuLabelVariants({ size: size, scaling: scaling }), className)} {...props}>
|
46
|
+
{children}
|
47
|
+
</ContextMenuPrimitive.Label>);
|
47
48
|
});
|
48
49
|
ContextMenuLabel.displayName = 'ContextMenu.Label';
|
package/dist/lib/components/ContextMenu/{ContextMenuRadioGroup.js → ContextMenuRadioGroup.jsx}
RENAMED
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,12 +9,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { createContext, forwardRef } from 'react';
|
12
|
+
import React, { createContext, forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
14
|
export var RadioContext = createContext({ selectedValue: '' });
|
27
15
|
export var ContextMenuRadioGroup = forwardRef(function (_a, ref) {
|
28
16
|
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
29
|
-
return (
|
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
|
+
</ContextMenuPrimitive.RadioGroup>);
|
30
22
|
});
|
31
23
|
ContextMenuRadioGroup.displayName = 'ContextMenu.RadioGroup';
|
package/dist/lib/components/ContextMenu/{ContextMenuRadioItem.js → ContextMenuRadioItem.jsx}
RENAMED
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,12 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef, useContext } from 'react';
|
12
|
+
import React, { forwardRef, useContext } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
14
|
+
import { cn } from 'lib/utils/utils';
|
27
15
|
import { DotFilledIcon } from '@radix-ui/react-icons';
|
28
|
-
import { menuItemAppearanceStyle } from '
|
16
|
+
import { menuItemAppearanceStyle } from 'lib/constants';
|
29
17
|
import { useContextMenuContext } from './ContextMenuRoot';
|
30
18
|
import { contextMenuItemVariants } from './ContextMenuItem';
|
31
19
|
import { RadioContext } from './ContextMenuRadioGroup';
|
@@ -39,6 +27,11 @@ export var ContextMenuRadioItem = forwardRef(function (_a, ref) {
|
|
39
27
|
size: size,
|
40
28
|
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
41
29
|
var radioGroup = useContext(RadioContext);
|
42
|
-
return (
|
30
|
+
return (<ContextMenuPrimitive.RadioItem ref={ref} className={itemClassName} {...props}>
|
31
|
+
<ContextMenuItemIndicator forceMount radius={'full'} size={size}>
|
32
|
+
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
33
|
+
</ContextMenuItemIndicator>
|
34
|
+
{children}
|
35
|
+
</ContextMenuPrimitive.RadioItem>);
|
43
36
|
});
|
44
37
|
ContextMenuRadioItem.displayName = 'ContextMenu.RadioItem';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor } from '
|
4
|
+
import { IColor } from 'lib/types';
|
5
5
|
import { contextMenuContentVariants } from './ContextMenuContent';
|
6
6
|
import { contextMenuItemVariants } from './ContextMenuItem';
|
7
7
|
export interface ContextMenuProps extends VariantProps<typeof contextMenuContentVariants>, VariantProps<typeof contextMenuItemVariants> {
|
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,8 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { createContext, forwardRef, useContext, useMemo, } from 'react';
|
12
|
+
import React, { createContext, forwardRef, useContext, useMemo, } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
14
|
var ContextMenuContext = createContext({
|
27
15
|
radius: 'medium',
|
@@ -36,7 +24,11 @@ export var useContextMenuContext = function () {
|
|
36
24
|
export var ContextMenuRoot = forwardRef(function (_a, ref) {
|
37
25
|
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
26
|
var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color, appearance: appearance }); }, [radius, size, scaling, color, appearance]);
|
39
|
-
return (
|
27
|
+
return (<ContextMenuContext.Provider value={contextValue}>
|
28
|
+
<div ref={ref}>
|
29
|
+
<ContextMenuPrimitive.Root {...props}>{children}</ContextMenuPrimitive.Root>
|
30
|
+
</div>
|
31
|
+
</ContextMenuContext.Provider>);
|
40
32
|
});
|
41
33
|
ContextMenuRoot.displayName = 'ContextMenu.Root';
|
42
34
|
export default ContextMenuRoot;
|
package/dist/lib/components/ContextMenu/{ContextMenuSeparator.js → ContextMenuSeparator.jsx}
RENAMED
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,12 +9,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
14
|
+
import { cn } from 'lib/utils/utils';
|
27
15
|
export var ContextMenuSeparator = forwardRef(function (_a, ref) {
|
28
16
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
29
|
-
return (
|
17
|
+
return (<ContextMenuPrimitive.Separator ref={ref} className={cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className)} {...props}>
|
18
|
+
{children}
|
19
|
+
</ContextMenuPrimitive.Separator>);
|
30
20
|
});
|
31
21
|
ContextMenuSeparator.displayName = 'ContextMenu.Separator';
|
package/dist/lib/components/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubContent.jsx}
RENAMED
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { radiusVariants, scalingVariants } from '
|
27
|
+
import { radiusVariants, scalingVariants } from 'lib/constants';
|
29
28
|
import { useContextMenuContext } from './ContextMenuRoot';
|
30
29
|
export var contextMenuSubContentVariants = 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)]", {
|
31
30
|
variants: {
|
@@ -45,10 +44,14 @@ export var contextMenuSubContentVariants = cva("p-[5px] bg-white dark:bg-slateDa
|
|
45
44
|
export var ContextMenuSubContent = forwardRef(function (_a, ref) {
|
46
45
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
47
46
|
var _b = useContextMenuContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
48
|
-
return (
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
return (<ContextMenuPrimitive.Portal>
|
48
|
+
<ContextMenuPrimitive.SubContent ref={ref} className={cn(contextMenuSubContentVariants({
|
49
|
+
radius: radius,
|
50
|
+
size: size,
|
51
|
+
scaling: scaling,
|
52
|
+
}), className)} sideOffset={2} alignOffset={-5} {...props}>
|
53
|
+
{children}
|
54
|
+
</ContextMenuPrimitive.SubContent>
|
55
|
+
</ContextMenuPrimitive.Portal>);
|
53
56
|
});
|
54
57
|
ContextMenuSubContent.displayName = 'ContextMenu.SubContent';
|
package/dist/lib/components/ContextMenu/{ContextMenuSubTrigger.js → ContextMenuSubTrigger.jsx}
RENAMED
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,13 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
14
|
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { contextMenuItemVariants } from './ContextMenuItem';
|
29
|
-
import { blackText, menuItemAppearanceStyle } from '
|
17
|
+
import { blackText, menuItemAppearanceStyle } from 'lib/constants';
|
30
18
|
import { useContextMenuContext } from './ContextMenuRoot';
|
31
19
|
export var ContextMenuSubTrigger = forwardRef(function (_a, ref) {
|
32
20
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
@@ -35,6 +23,13 @@ export var ContextMenuSubTrigger = forwardRef(function (_a, ref) {
|
|
35
23
|
var iconClassName = cn('group-data-[disabled]:text-slate-8 ', appearance === 'solid' && blackText.includes(color)
|
36
24
|
? 'hover:fill-slate-12 dark:hover:fill-slateDark-1'
|
37
25
|
: "hover:fill-white dark:hover:fill-slateDark-12 ");
|
38
|
-
return (
|
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
|
+
</ContextMenuPrimitive.Sub>);
|
39
34
|
});
|
40
35
|
ContextMenuSubTrigger.displayName = 'ContextMenu.SubTrigger';
|
@@ -1,14 +1,3 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
13
2
|
var t = {};
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -20,12 +9,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
9
|
}
|
21
10
|
return t;
|
22
11
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
12
|
+
import React, { forwardRef } from 'react';
|
25
13
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
26
|
-
import { cn } from '
|
14
|
+
import { cn } from 'lib/utils/utils';
|
27
15
|
export var ContextMenuTrigger = forwardRef(function (_a, ref) {
|
28
16
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
29
|
-
return (
|
17
|
+
return (<ContextMenuPrimitive.Trigger ref={ref} className={cn("flex text-slate-12 dark:text-slateDark-12 text-base text-center justify-center", className)} {...props}>
|
18
|
+
{children}
|
19
|
+
</ContextMenuPrimitive.Trigger>);
|
30
20
|
});
|
31
21
|
ContextMenuTrigger.displayName = 'ContextMenu.Trigger';
|
@@ -20,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import {
|
24
|
-
import { forwardRef } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import { DataList as DataListTheme } from '@radix-ui/themes';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
29
28
|
import { useDataListContext } from './DataListRoot';
|
30
29
|
export var dataListItemVariants = cva('flex', {
|
31
30
|
variants: {
|
@@ -38,6 +37,8 @@ export var dataListItemVariants = cva('flex', {
|
|
38
37
|
export var DataListItem = forwardRef(function (_a, ref) {
|
39
38
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
40
39
|
var scaling = useDataListContext().scaling;
|
41
|
-
return (
|
40
|
+
return (<DataListTheme.Item ref={ref} {...props} className={cn(dataListItemVariants({ scaling: scaling }), className)}>
|
41
|
+
{children}
|
42
|
+
</DataListTheme.Item>);
|
42
43
|
});
|
43
44
|
DataListItem.displayName = 'DataList.Item';
|