@lotte-innovate/ui-component-test 0.0.37 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +133 -163
- package/dist/globals.css +4 -0
- package/dist/lib/Typography/Header/index.d.ts +2 -2
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/color/constants.d.ts +9 -0
- package/dist/lib/components/Accordion/index.d.ts +10 -4
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +16 -0
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
- package/dist/lib/components/AlertDialog/index.d.ts +10 -19
- package/dist/lib/components/Avatar/index.d.ts +5 -1
- package/dist/lib/components/Badge/index.d.ts +2 -2
- package/dist/lib/components/BarChart/index.d.ts +37 -0
- package/dist/lib/components/BubbleChart/index.d.ts +15 -19
- package/dist/lib/components/Button/index.d.ts +2 -2
- package/dist/lib/components/Callout/CalloutIcon.d.ts +2 -1
- package/dist/lib/components/Callout/CalloutRoot.d.ts +18 -0
- package/dist/lib/components/Callout/index.d.ts +6 -19
- package/dist/lib/components/Card/index.d.ts +2 -2
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +17 -0
- package/dist/lib/components/CheckboxGroup/index.d.ts +5 -16
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +13 -0
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +1 -1
- package/dist/lib/components/ContextMenu/index.d.ts +16 -24
- package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
- package/dist/lib/components/DataList/DataListRoot.d.ts +14 -0
- package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
- package/dist/lib/components/DataList/index.d.ts +7 -16
- package/dist/lib/components/Dialog/DialogAction.d.ts +1 -3
- package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogRoot.d.ts +15 -0
- package/dist/lib/components/Dialog/index.d.ts +14 -17
- package/dist/lib/components/DoughnutChart/index.d.ts +12 -14
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +0 -5
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +3 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +0 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +15 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/dist/lib/components/DropdownMenu/index.d.ts +19 -22
- package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +11 -0
- package/dist/lib/components/HoverCard/index.d.ts +9 -9
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/Inset/index.d.ts +1 -1
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/LineChart/index.d.ts +43 -0
- package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarMenu.d.ts +4 -1
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +19 -0
- package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
- package/dist/lib/components/Menubar/index.d.ts +18 -30
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +14 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
- package/dist/lib/components/NavigationMenu/index.d.ts +11 -20
- package/dist/lib/components/PieChart/index.d.ts +12 -14
- package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverRoot.d.ts +12 -0
- package/dist/lib/components/Popover/index.d.ts +10 -11
- package/dist/lib/components/Progress/index.d.ts +2 -5
- package/dist/lib/components/RadarChart/index.d.ts +19 -22
- package/dist/lib/components/Radio/index.d.ts +0 -1
- package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +13 -0
- package/dist/lib/components/RadioCards/index.d.ts +5 -13
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +15 -0
- package/dist/lib/components/RadioGroup/index.d.ts +5 -15
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +14 -0
- package/dist/lib/components/SegmentedControl/index.d.ts +5 -14
- package/dist/lib/components/Select/index.d.ts +17 -8
- package/dist/lib/components/Skeleton/index.d.ts +1 -2
- package/dist/lib/components/Slider/index.d.ts +1 -2
- package/dist/lib/components/TabNav/index.d.ts +6 -2
- package/dist/lib/components/Table/index.d.ts +17 -8
- package/dist/lib/components/Tabs/index.d.ts +11 -5
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextField/index.d.ts +7 -4
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/ToastRoot.d.ts +27 -0
- package/dist/lib/components/Toast/index.d.ts +7 -29
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +2 -2
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +15 -0
- package/dist/lib/components/ToggleGroup/index.d.ts +5 -19
- package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
- package/dist/lib/components/Tooltip/index.d.ts +4 -5
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/constants.d.ts +470 -0
- package/dist/lib/types.d.ts +70 -0
- package/dist/lib/utils/useDarkMode.d.ts +1 -0
- package/dist/lib/utils/utils.d.ts +0 -1
- package/package.json +137 -125
- package/dist/lib/Typography/Header/index.jsx +0 -58
- package/dist/lib/Typography/Text/index.jsx +0 -47
- package/dist/lib/Typography/index.js +0 -2
- package/dist/lib/color/alpha.js +0 -784
- package/dist/lib/color/constants.js +0 -200
- package/dist/lib/color/dark.js +0 -392
- package/dist/lib/color/krdsColors.js +0 -309
- package/dist/lib/color/light.js +0 -393
- package/dist/lib/components/Accordion/index.jsx +0 -70
- package/dist/lib/components/AlertDialog/AlertDialogAction.jsx +0 -60
- package/dist/lib/components/AlertDialog/AlertDialogCancel.jsx +0 -57
- package/dist/lib/components/AlertDialog/AlertDialogContent.jsx +0 -53
- package/dist/lib/components/AlertDialog/AlertDialogDescription.jsx +0 -35
- package/dist/lib/components/AlertDialog/AlertDialogTitle.jsx +0 -35
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.jsx +0 -56
- package/dist/lib/components/AlertDialog/index.jsx +0 -27
- package/dist/lib/components/AspectRatio/index.jsx +0 -43
- package/dist/lib/components/Avatar/index.jsx +0 -61
- package/dist/lib/components/Badge/index.jsx +0 -55
- package/dist/lib/components/BubbleChart/index.jsx +0 -43
- package/dist/lib/components/Button/index.jsx +0 -57
- package/dist/lib/components/Callout/CalloutIcon.jsx +0 -62
- package/dist/lib/components/Callout/CalloutText.jsx +0 -42
- package/dist/lib/components/Callout/index.jsx +0 -78
- package/dist/lib/components/Card/index.jsx +0 -65
- package/dist/lib/components/Checkbox/index.jsx +0 -97
- package/dist/lib/components/CheckboxCard/index.jsx +0 -60
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.jsx +0 -25
- package/dist/lib/components/CheckboxGroup/index.jsx +0 -38
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.jsx +0 -33
- package/dist/lib/components/ContextMenu/ContextMenuContent.jsx +0 -59
- package/dist/lib/components/ContextMenu/ContextMenuGroup.jsx +0 -20
- package/dist/lib/components/ContextMenu/ContextMenuItem.jsx +0 -61
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.jsx +0 -51
- package/dist/lib/components/ContextMenu/ContextMenuLabel.jsx +0 -49
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.jsx +0 -23
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.jsx +0 -34
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.jsx +0 -21
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.jsx +0 -56
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.jsx +0 -35
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.jsx +0 -21
- package/dist/lib/components/ContextMenu/index.jsx +0 -46
- package/dist/lib/components/DataList/DataListItem.jsx +0 -44
- package/dist/lib/components/DataList/DataListLabel.jsx +0 -50
- package/dist/lib/components/DataList/DataListValue.jsx +0 -52
- package/dist/lib/components/DataList/index.jsx +0 -49
- package/dist/lib/components/Dialog/DialogAction.jsx +0 -47
- package/dist/lib/components/Dialog/DialogCancel.jsx +0 -43
- package/dist/lib/components/Dialog/DialogContent.jsx +0 -56
- package/dist/lib/components/Dialog/DialogDescription.jsx +0 -35
- package/dist/lib/components/Dialog/DialogSlot.jsx +0 -34
- package/dist/lib/components/Dialog/DialogTitle.jsx +0 -35
- package/dist/lib/components/Dialog/DialogTrigger.jsx +0 -20
- package/dist/lib/components/Dialog/index.jsx +0 -28
- package/dist/lib/components/DoughnutChart/index.jsx +0 -46
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.jsx +0 -23
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.jsx +0 -61
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.jsx +0 -31
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.jsx +0 -57
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.jsx +0 -58
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.jsx +0 -47
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.jsx +0 -47
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.jsx +0 -32
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.jsx +0 -19
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.jsx +0 -18
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.jsx +0 -31
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.jsx +0 -41
- package/dist/lib/components/DropdownMenu/index.jsx +0 -31
- package/dist/lib/components/HoverCard/HoverCardContent.jsx +0 -60
- package/dist/lib/components/HoverCard/HoverCardTrigger.jsx +0 -20
- package/dist/lib/components/HoverCard/index.jsx +0 -23
- package/dist/lib/components/IconButton/index.jsx +0 -64
- package/dist/lib/components/Inset/index.jsx +0 -53
- package/dist/lib/components/Label/index.jsx +0 -54
- package/dist/lib/components/Menubar/MenubarCheckboxItem.jsx +0 -31
- package/dist/lib/components/Menubar/MenubarContent.jsx +0 -63
- package/dist/lib/components/Menubar/MenubarItem.jsx +0 -56
- package/dist/lib/components/Menubar/MenubarItemIndicator.jsx +0 -50
- package/dist/lib/components/Menubar/MenubarMenu.jsx +0 -18
- package/dist/lib/components/Menubar/MenubarRadioGroup.jsx +0 -23
- package/dist/lib/components/Menubar/MenubarRadioItem.jsx +0 -33
- package/dist/lib/components/Menubar/MenubarSeparator.jsx +0 -21
- package/dist/lib/components/Menubar/MenubarSub.jsx +0 -18
- package/dist/lib/components/Menubar/MenubarSubContent.jsx +0 -52
- package/dist/lib/components/Menubar/MenubarSubTrigger.jsx +0 -34
- package/dist/lib/components/Menubar/MenubarTrigger.jsx +0 -58
- package/dist/lib/components/Menubar/index.jsx +0 -76
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.jsx +0 -49
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.jsx +0 -22
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.jsx +0 -20
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.jsx +0 -52
- package/dist/lib/components/NavigationMenu/NavigationMenuList.jsx +0 -49
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.jsx +0 -60
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.jsx +0 -54
- package/dist/lib/components/NavigationMenu/index.jsx +0 -42
- package/dist/lib/components/PieChart/index.jsx +0 -46
- package/dist/lib/components/Popover/PopoverClose.jsx +0 -36
- package/dist/lib/components/Popover/PopoverContent.jsx +0 -64
- package/dist/lib/components/Popover/PopoverTrigger.jsx +0 -20
- package/dist/lib/components/Popover/index.jsx +0 -24
- package/dist/lib/components/Progress/index.jsx +0 -58
- package/dist/lib/components/RadarChart/index.jsx +0 -43
- package/dist/lib/components/Radio/index.jsx +0 -46
- package/dist/lib/components/RadioCards/RadioCardsItem.jsx +0 -42
- package/dist/lib/components/RadioCards/index.jsx +0 -46
- package/dist/lib/components/RadioGroup/RadioGroupItem.jsx +0 -34
- package/dist/lib/components/RadioGroup/index.jsx +0 -43
- package/dist/lib/components/ScrollArea/index.jsx +0 -28
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.jsx +0 -25
- package/dist/lib/components/SegmentedControl/index.jsx +0 -51
- package/dist/lib/components/Select/index.jsx +0 -100
- package/dist/lib/components/Separator/index.jsx +0 -50
- package/dist/lib/components/Skeleton/index.jsx +0 -46
- package/dist/lib/components/Slider/index.jsx +0 -51
- package/dist/lib/components/Spinner/index.jsx +0 -50
- package/dist/lib/components/TabNav/index.jsx +0 -40
- package/dist/lib/components/Table/index.jsx +0 -104
- package/dist/lib/components/Tabs/index.jsx +0 -68
- package/dist/lib/components/TextArea/index.jsx +0 -59
- package/dist/lib/components/TextField/index.jsx +0 -58
- package/dist/lib/components/Toast/ToastActionButton.jsx +0 -68
- package/dist/lib/components/Toast/ToastDescription.jsx +0 -45
- package/dist/lib/components/Toast/ToastTitle.jsx +0 -43
- package/dist/lib/components/Toast/index.jsx +0 -100
- package/dist/lib/components/Toggle/ToggleWithText.jsx +0 -59
- package/dist/lib/components/Toggle/index.jsx +0 -59
- package/dist/lib/components/ToggleGroup/index.jsx +0 -46
- package/dist/lib/components/ToggleGroup/toggleGroupItem.jsx +0 -42
- package/dist/lib/components/ToggleSwitch/index.jsx +0 -75
- package/dist/lib/components/Tooltip/index.jsx +0 -58
- package/dist/lib/components/index.js +0 -48
- package/dist/lib/constants.js +0 -569
- package/dist/lib/index.js +0 -2
- package/dist/lib/types.js +0 -1
- package/dist/lib/utils/utils.js +0 -27
- package/dist/styles.css +0 -27469
- package/dist/tailwind.config.js +0 -144
- /package/dist/lib/components/ToggleGroup/{toggleGroupItem.d.ts → ToggleGroupItem.d.ts} +0 -0
@@ -1,32 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef, useContext } from 'react';
|
13
|
-
import { DropdownMenu as DropdownMenuTheme } from '@radix-ui/themes';
|
14
|
-
import { dropdownMenuItemVariants, DropdownMenuItemIndicator, RadioContext, } from '.';
|
15
|
-
import { menuItemAppearanceStyle } from '../../../lib/constants';
|
16
|
-
import { DotFilledIcon } from '@radix-ui/react-icons';
|
17
|
-
import { cn } from '../../../lib/utils/utils';
|
18
|
-
export var DropdownMenuRadioItem = forwardRef(function (_a, ref) {
|
19
|
-
var className = _a.className, children = _a.children, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, radius = _a.radius, size = _a.size, props = __rest(_a, ["className", "children", "color", "appearance", "radius", "size"]);
|
20
|
-
var radioGroup = useContext(RadioContext);
|
21
|
-
var itemClassName = cn(dropdownMenuItemVariants({
|
22
|
-
radius: radius,
|
23
|
-
size: size,
|
24
|
-
}), 'pl-7', menuItemAppearanceStyle(appearance, color), className);
|
25
|
-
return (<DropdownMenuTheme.RadioItem ref={ref} className={itemClassName} {...props}>
|
26
|
-
<DropdownMenuItemIndicator forceMount radius={'full'} size={size}>
|
27
|
-
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
28
|
-
</DropdownMenuItemIndicator>
|
29
|
-
{children}
|
30
|
-
</DropdownMenuTheme.RadioItem>);
|
31
|
-
});
|
32
|
-
DropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';
|
@@ -1,19 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
|
-
import { cn } from '../../../lib/utils/utils';
|
15
|
-
export var DropdownMenuSeparator = forwardRef(function (_a, ref) {
|
16
|
-
var className = _a.className, children = _a.children, color = _a.color, props = __rest(_a, ["className", "children", "color"]);
|
17
|
-
return (<DropdownMenuPrimitive.Separator ref={ref} className={cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className)} {...props}/>);
|
18
|
-
});
|
19
|
-
DropdownMenuSeparator.displayName = 'DropdownMenuSeparator';
|
@@ -1,18 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
|
-
export var DropdownMenuSub = forwardRef(function (_a, ref) {
|
15
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
16
|
-
return <DropdownMenuPrimitive.Sub {...props}>{children}</DropdownMenuPrimitive.Sub>;
|
17
|
-
});
|
18
|
-
DropdownMenuSub.displayName = 'DropdownMenuSub';
|
@@ -1,31 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
|
-
import { dropdownMenuItemVariants } from './DropdownMenuItem';
|
15
|
-
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
16
|
-
import { blackText, menuItemAppearanceStyle } from '../../../lib/constants';
|
17
|
-
import { cn } from '../../../lib/utils/utils';
|
18
|
-
export var DropdownMenuSubTrigger = forwardRef(function (_a, ref) {
|
19
|
-
var className = _a.className, children = _a.children, size = _a.size, radius = _a.radius, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "size", "radius", "color", "appearance"]);
|
20
|
-
var iconClassName = cn('group-data-[disabled]:text-slate-8 ', appearance === 'solid' && blackText.includes(color)
|
21
|
-
? 'hover:fill-slate-12 dark:hover:fill-slateDark-1'
|
22
|
-
: "hover:fill-white dark:hover:fill-slateDark-12 ");
|
23
|
-
var triggerClassName = cn(dropdownMenuItemVariants({ size: size, radius: radius }), menuItemAppearanceStyle(appearance, color), className);
|
24
|
-
return (<DropdownMenuPrimitive.SubTrigger ref={ref} className={triggerClassName} {...props}>
|
25
|
-
{children}
|
26
|
-
<div className="ml-auto pl-5 ">
|
27
|
-
<ChevronRightIcon className={iconClassName}/>
|
28
|
-
</div>
|
29
|
-
</DropdownMenuPrimitive.SubTrigger>);
|
30
|
-
});
|
31
|
-
DropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';
|
@@ -1,41 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import { cva } from 'class-variance-authority';
|
14
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
15
|
-
import { cn } from '../../../lib/utils/utils';
|
16
|
-
var dropdownMenuTriggerVariants = cva('', {
|
17
|
-
variants: {
|
18
|
-
radius: {
|
19
|
-
none: 'rounded-none',
|
20
|
-
small: 'rounded-[3px]',
|
21
|
-
medium: 'rounded',
|
22
|
-
large: 'rounded-md',
|
23
|
-
full: 'rounded-md',
|
24
|
-
},
|
25
|
-
size: {
|
26
|
-
small: 'h-6 gap-1 px-2 text-xs',
|
27
|
-
medium: 'h-8 gap-2 px-3 text-sm',
|
28
|
-
},
|
29
|
-
},
|
30
|
-
defaultVariants: {
|
31
|
-
radius: 'medium',
|
32
|
-
size: 'medium',
|
33
|
-
},
|
34
|
-
});
|
35
|
-
export var DropdownMenuTrigger = forwardRef(function (_a, ref) {
|
36
|
-
var className = _a.className, children = _a.children, radius = _a.radius, size = _a.size, props = __rest(_a, ["className", "children", "radius", "size"]);
|
37
|
-
return (<DropdownMenuPrimitive.Trigger asChild ref={ref} className={cn(dropdownMenuTriggerVariants({ radius: radius, size: size }), className)} {...props}>
|
38
|
-
{children}
|
39
|
-
</DropdownMenuPrimitive.Trigger>);
|
40
|
-
});
|
41
|
-
DropdownMenuTrigger.displayName = 'DropdownMenuTrigger';
|
@@ -1,31 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
|
-
export * from './DropdownMenuTrigger';
|
15
|
-
export * from './DropdownMenuContent';
|
16
|
-
export * from './DropdonMenuSubContent';
|
17
|
-
export * from './DropdownMenuSubTrigger';
|
18
|
-
export * from './DropdownMenuItem';
|
19
|
-
export * from './DropdownMenuSeparator';
|
20
|
-
export * from './DropdownMenuLable';
|
21
|
-
export * from './DropdownMenuSub';
|
22
|
-
export * from './DropdownMenuCheckboxItem';
|
23
|
-
export * from './DropdownMenuItemIndicator';
|
24
|
-
export * from './DropdonMenuRadioGroup';
|
25
|
-
export * from './DropdownMenuRadioItem';
|
26
|
-
export var DropdownMenu = forwardRef(function (_a, ref) {
|
27
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
28
|
-
return (<DropdownMenuPrimitive.Root {...props}>{children}</DropdownMenuPrimitive.Root>);
|
29
|
-
});
|
30
|
-
DropdownMenu.displayName = 'DropdownMenu';
|
31
|
-
export default DropdownMenu;
|
@@ -1,60 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { forwardRef } from 'react';
|
24
|
-
import { primaryColorStyle, radiusVariants, weightVariants, scalingVariants } from '../../../lib/constants';
|
25
|
-
import { cva } from 'class-variance-authority';
|
26
|
-
import { HoverCard as HoverCardTheme } from '@radix-ui/themes';
|
27
|
-
import { cn } from '../../../lib/utils/utils';
|
28
|
-
export var hoverCardContentVariants = cva('', {
|
29
|
-
variants: {
|
30
|
-
radius: __assign({}, radiusVariants['base']),
|
31
|
-
size: {
|
32
|
-
small: 'text-xs w-[250px]',
|
33
|
-
medium: 'text-sm w-[300px]',
|
34
|
-
large: 'text-base w-[350px]',
|
35
|
-
'x-large': 'text-lg w-[400px]',
|
36
|
-
},
|
37
|
-
scaling: __assign({}, scalingVariants),
|
38
|
-
weight: __assign({}, weightVariants),
|
39
|
-
color: primaryColorStyle(),
|
40
|
-
},
|
41
|
-
defaultVariants: {
|
42
|
-
radius: 'medium',
|
43
|
-
size: 'medium',
|
44
|
-
scaling: '100%',
|
45
|
-
weight: 'medium',
|
46
|
-
color: 'white',
|
47
|
-
},
|
48
|
-
});
|
49
|
-
export var HoverCardContent = forwardRef(function (_a, ref) {
|
50
|
-
var className = _a.className, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, weight = _a.weight, color = _a.color, children = _a.children, props = __rest(_a, ["className", "radius", "size", "scaling", "weight", "color", "children"]);
|
51
|
-
var sizeTheme = '2';
|
52
|
-
if (size === 'small')
|
53
|
-
sizeTheme = '1';
|
54
|
-
if (size === 'large')
|
55
|
-
sizeTheme = '3';
|
56
|
-
return (<HoverCardTheme.Content ref={ref} {...props} size={sizeTheme} className={cn(hoverCardContentVariants({ size: size, scaling: scaling, weight: weight, radius: radius, color: color }), size === 'x-large' && 'rt-r-size-4', className)}>
|
57
|
-
{children}
|
58
|
-
</HoverCardTheme.Content>);
|
59
|
-
});
|
60
|
-
HoverCardContent.displayName = 'HoverCardContent';
|
@@ -1,20 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import { HoverCard as HoverCardTheme } from '@radix-ui/themes';
|
14
|
-
export var HoverCardTrigger = forwardRef(function (_a, ref) {
|
15
|
-
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (<HoverCardTheme.Trigger ref={ref} className={className} {...props}>
|
17
|
-
{children}
|
18
|
-
</HoverCardTheme.Trigger>);
|
19
|
-
});
|
20
|
-
HoverCardTrigger.displayName = 'HoverCardTrigger';
|
@@ -1,23 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import { HoverCard as HoverCardTheme, Theme } from '@radix-ui/themes';
|
14
|
-
export * from './HoverCardTrigger';
|
15
|
-
export * from './HoverCardContent';
|
16
|
-
export var HoverCard = forwardRef(function (_a, ref) {
|
17
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
18
|
-
return (<Theme>
|
19
|
-
<HoverCardTheme.Root {...props}>{children}</HoverCardTheme.Root>
|
20
|
-
</Theme>);
|
21
|
-
});
|
22
|
-
HoverCard.displayName = 'HoverCard';
|
23
|
-
export default HoverCard;
|
@@ -1,64 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { Children, forwardRef } from 'react';
|
24
|
-
import { cva } from 'class-variance-authority';
|
25
|
-
import { scalingVariants, radiusVariants, primaryColorStyle, appearanceStyle } from '../../../lib/constants';
|
26
|
-
import { cn } from '../../../lib/utils/utils';
|
27
|
-
var iconButtonVariants = cva("grid place-content-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8", {
|
28
|
-
variants: {
|
29
|
-
radius: __assign({}, radiusVariants['base']),
|
30
|
-
scaling: __assign({}, scalingVariants),
|
31
|
-
size: {
|
32
|
-
'x-small': 'p-1 w-5 h-5',
|
33
|
-
small: 'p-[6px] w-6 h-6',
|
34
|
-
medium: 'p-2 w-8 h-8',
|
35
|
-
large: 'p-[11px] w-10 h-10',
|
36
|
-
'x-large': 'p-[14px] w-12 h-12',
|
37
|
-
},
|
38
|
-
color: primaryColorStyle(),
|
39
|
-
},
|
40
|
-
defaultVariants: {
|
41
|
-
radius: 'medium',
|
42
|
-
scaling: '100%',
|
43
|
-
size: 'medium',
|
44
|
-
color: 'red',
|
45
|
-
},
|
46
|
-
});
|
47
|
-
var iconSize = {
|
48
|
-
'x-small': 12,
|
49
|
-
small: 14,
|
50
|
-
medium: 16,
|
51
|
-
large: 18,
|
52
|
-
'x-large': 20,
|
53
|
-
};
|
54
|
-
export var IconButton = forwardRef(function (_a, ref) {
|
55
|
-
var children = _a.children, className = _a.className, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, _c = _a.color, color = _c === void 0 ? 'red' : _c, _d = _a.appearance, appearance = _d === void 0 ? 'solid' : _d, props = __rest(_a, ["children", "className", "radius", "size", "scaling", "color", "appearance"]);
|
56
|
-
var width = iconSize[size];
|
57
|
-
var height = iconSize[size];
|
58
|
-
var buttonClassName = cn(iconButtonVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, true), className);
|
59
|
-
return (<button ref={ref} className={buttonClassName} {...props}>
|
60
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { width: width, height: height }); })}
|
61
|
-
</button>);
|
62
|
-
});
|
63
|
-
IconButton.displayName = 'IconButton';
|
64
|
-
export default IconButton;
|
@@ -1,53 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { forwardRef } from 'react';
|
24
|
-
import { cva } from 'class-variance-authority';
|
25
|
-
import { Inset as InsetTheme, Theme } from '@radix-ui/themes';
|
26
|
-
import { scalingVariants } from '../../../lib/constants';
|
27
|
-
import { cn } from '../../../lib/utils/utils';
|
28
|
-
var insetVariants = cva('border-[1px] border-slate-6 dark:border-slateDark-6 text-slate-12 dark:text-slateDark-12', {
|
29
|
-
variants: {
|
30
|
-
radius: {
|
31
|
-
none: 'rounded-none after:rounded-none',
|
32
|
-
small: 'rounded-[3px] after:rounded-[3px]',
|
33
|
-
medium: 'rounded after:rounded',
|
34
|
-
large: 'rounded-md after:rounded-md',
|
35
|
-
full: 'rounded-md after:rounded-md',
|
36
|
-
},
|
37
|
-
scaling: __assign({}, scalingVariants),
|
38
|
-
},
|
39
|
-
defaultVariants: {
|
40
|
-
radius: 'medium',
|
41
|
-
scaling: '100%',
|
42
|
-
},
|
43
|
-
});
|
44
|
-
export var Inset = forwardRef(function (_a, ref) {
|
45
|
-
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, props = __rest(_a, ["children", "className", "radius", "scaling"]);
|
46
|
-
return (<Theme>
|
47
|
-
<InsetTheme ref={ref} className={cn(insetVariants({ radius: radius, scaling: scaling }), className)} {...props}>
|
48
|
-
{children}
|
49
|
-
</InsetTheme>
|
50
|
-
</Theme>);
|
51
|
-
});
|
52
|
-
Inset.displayName = 'Inset';
|
53
|
-
export default Inset;
|
@@ -1,54 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
24
|
-
import React from 'react';
|
25
|
-
import { cn } from '../../../lib/utils/utils';
|
26
|
-
import { cva } from 'class-variance-authority';
|
27
|
-
import { scalingVariants, textColorStyle, weightVariants } from '../../../lib/constants';
|
28
|
-
var labeVariants = cva('text-slate-12', {
|
29
|
-
variants: {
|
30
|
-
scaling: __assign({}, scalingVariants),
|
31
|
-
weight: __assign({}, weightVariants),
|
32
|
-
size: {
|
33
|
-
small: 'text-xs',
|
34
|
-
medium: 'text-sm',
|
35
|
-
large: 'text-base',
|
36
|
-
},
|
37
|
-
color: textColorStyle(),
|
38
|
-
},
|
39
|
-
defaultVariants: {
|
40
|
-
scaling: '100%',
|
41
|
-
size: 'medium',
|
42
|
-
color: 'black',
|
43
|
-
},
|
44
|
-
});
|
45
|
-
export var Label = React.forwardRef(function (_a, forwardedRef) {
|
46
|
-
var className = _a.className, scaling = _a.scaling, weight = _a.weight, size = _a.size, color = _a.color, children = _a.children, rootProps = __rest(_a, ["className", "scaling", "weight", "size", "color", "children"]);
|
47
|
-
if (weight === 'medium' || weight === 'semibold')
|
48
|
-
weight = 'bold';
|
49
|
-
return (<LabelPrimitive.Root {...rootProps} ref={forwardedRef} className={cn('', labeVariants({ scaling: scaling, size: size, weight: weight, color: color }), className)}>
|
50
|
-
{children}
|
51
|
-
</LabelPrimitive.Root>);
|
52
|
-
});
|
53
|
-
Label.displayName = 'Label';
|
54
|
-
export default Label;
|
@@ -1,31 +0,0 @@
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
-
var t = {};
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
-
t[p] = s[p];
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
-
t[p[i]] = s[p[i]];
|
9
|
-
}
|
10
|
-
return t;
|
11
|
-
};
|
12
|
-
import React, { forwardRef } from 'react';
|
13
|
-
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
|
-
import { CheckIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from '../../../lib/utils/utils';
|
16
|
-
import { menubarItemVariants } from './MenubarItem';
|
17
|
-
import { MenubarItemIndicator } from './MenubarItemIndicator';
|
18
|
-
import { menuItemAppearanceStyle } from '../../../lib/constants';
|
19
|
-
import { useMenubarContext } from '.';
|
20
|
-
export var MenubarCheckboxItem = forwardRef(function (_a, ref) {
|
21
|
-
var children = _a.children, className = _a.className, checked = _a.checked, props = __rest(_a, ["children", "className", "checked"]);
|
22
|
-
var _b = useMenubarContext(), radius = _b.radius, scaling = _b.scaling, size = _b.size, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.itemAppearance, itemAppearance = _d === void 0 ? 'solid' : _d;
|
23
|
-
var itemClassName = cn(menubarItemVariants({ radius: radius, scaling: scaling, size: size }), 'pl-7', menuItemAppearanceStyle(itemAppearance, color), className);
|
24
|
-
return (<MenubarPrimitive.CheckboxItem ref={ref} className={itemClassName} {...props}>
|
25
|
-
<MenubarItemIndicator forceMount radius={'medium'} size={size}>
|
26
|
-
{checked && <CheckIcon />}
|
27
|
-
</MenubarItemIndicator>
|
28
|
-
{children}
|
29
|
-
</MenubarPrimitive.CheckboxItem>);
|
30
|
-
});
|
31
|
-
MenubarCheckboxItem.displayName = 'MenubarCheckboxItem';
|
@@ -1,63 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { forwardRef } from 'react';
|
24
|
-
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
25
|
-
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '../../../lib/utils/utils';
|
27
|
-
import { scalingVariants } from '../../../lib/constants';
|
28
|
-
import { useMenubarContext } from '.';
|
29
|
-
export var menubarContentVariants = 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)]", {
|
30
|
-
variants: {
|
31
|
-
radius: {
|
32
|
-
none: 'rounded-none',
|
33
|
-
small: 'rounded-[3px]',
|
34
|
-
medium: 'rounded',
|
35
|
-
large: 'rounded-md',
|
36
|
-
full: 'rounded-md',
|
37
|
-
},
|
38
|
-
size: {
|
39
|
-
small: 'p-1 min-w-[120px] max-w-[300px]',
|
40
|
-
medium: 'p-2 min-w-[136px] max-w-[300px]',
|
41
|
-
},
|
42
|
-
scaling: __assign({}, scalingVariants),
|
43
|
-
},
|
44
|
-
defaultVariants: {
|
45
|
-
radius: 'medium',
|
46
|
-
size: 'medium',
|
47
|
-
scaling: '100%',
|
48
|
-
},
|
49
|
-
});
|
50
|
-
export var MenubarContent = forwardRef(function (_a, ref) {
|
51
|
-
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
52
|
-
var _b = useMenubarContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
53
|
-
return (<MenubarPrimitive.Portal>
|
54
|
-
<MenubarPrimitive.Content ref={ref} className={cn(menubarContentVariants({
|
55
|
-
radius: radius,
|
56
|
-
size: size,
|
57
|
-
scaling: scaling,
|
58
|
-
}), className)} align="start" sideOffset={5} alignOffset={-3} {...props}>
|
59
|
-
{children}
|
60
|
-
</MenubarPrimitive.Content>
|
61
|
-
</MenubarPrimitive.Portal>);
|
62
|
-
});
|
63
|
-
MenubarContent.displayName = 'MenubarContent';
|
@@ -1,56 +0,0 @@
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { forwardRef } from 'react';
|
24
|
-
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
25
|
-
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '../../../lib/utils/utils';
|
27
|
-
import { blackText, menuItemAppearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
28
|
-
import { useMenubarContext } from '.';
|
29
|
-
export var menubarItemVariants = 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", {
|
30
|
-
variants: {
|
31
|
-
radius: __assign({}, radiusVariants['menu-item']),
|
32
|
-
size: {
|
33
|
-
small: 'text-xs h-[24px] px-2',
|
34
|
-
medium: 'text-sm h-[32px] px-3',
|
35
|
-
},
|
36
|
-
scaling: __assign({}, scalingVariants),
|
37
|
-
},
|
38
|
-
defaultVariants: {
|
39
|
-
radius: 'medium',
|
40
|
-
scaling: '100%',
|
41
|
-
size: 'medium',
|
42
|
-
},
|
43
|
-
});
|
44
|
-
export var MenubarItem = forwardRef(function (_a, ref) {
|
45
|
-
var children = _a.children, className = _a.className, shortcut = _a.shortcut, props = __rest(_a, ["children", "className", "shortcut"]);
|
46
|
-
var _b = useMenubarContext(), radius = _b.radius, scaling = _b.scaling, size = _b.size, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.itemAppearance, itemAppearance = _d === void 0 ? 'solid' : _d;
|
47
|
-
var itemClassName = cn(menubarItemVariants({ radius: radius, scaling: scaling, size: size }), menuItemAppearanceStyle(itemAppearance, color), className);
|
48
|
-
var shortcutClassName = "text-slateA-11 dark:text-slateDarkA-11 ".concat(itemAppearance === 'solid' && !blackText.includes(color)
|
49
|
-
? 'group-hover:text-white dark:group-hover:text-slateDark-1'
|
50
|
-
: '');
|
51
|
-
return (<MenubarPrimitive.Item ref={ref} className={itemClassName} {...props}>
|
52
|
-
{children}
|
53
|
-
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
54
|
-
</MenubarPrimitive.Item>);
|
55
|
-
});
|
56
|
-
MenubarItem.displayName = 'MenubarItem';
|