@lotte-innovate/ui-component-test 0.0.49 → 0.0.51
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +78 -281
- package/dist/globals.css +4 -0
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Header/{index.jsx → index.js} +4 -7
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/Typography/Text/{index.jsx → index.js} +5 -8
- package/dist/lib/components/Accordion/index.d.ts +1 -1
- package/dist/lib/components/Accordion/{index.jsx → index.js} +7 -19
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogAction.jsx → AlertDialogAction.js} +5 -6
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogCancel.jsx → AlertDialogCancel.js} +5 -6
- package/dist/lib/components/AlertDialog/{AlertDialogContent.jsx → AlertDialogContent.js} +5 -9
- package/dist/lib/components/AlertDialog/{AlertDialogDescription.jsx → AlertDialogDescription.js} +15 -5
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogRoot.jsx → AlertDialogRoot.js} +14 -6
- package/dist/lib/components/AlertDialog/{AlertDialogTitle.jsx → AlertDialogTitle.js} +15 -5
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +1 -1
- package/dist/lib/components/AlertDialog/{AlertDialogTrigger.jsx → AlertDialogTrigger.js} +5 -6
- package/dist/lib/components/AspectRatio/{index.jsx → index.js} +5 -6
- package/dist/lib/components/Avatar/{index.jsx → index.js} +5 -9
- package/dist/lib/components/Badge/index.d.ts +1 -1
- package/dist/lib/components/Badge/{index.jsx → index.js} +5 -6
- package/dist/lib/components/BarChart/index.d.ts +2 -3
- package/dist/lib/components/BarChart/{index.jsx → index.js} +7 -6
- package/dist/lib/components/BubbleChart/index.d.ts +2 -3
- package/dist/lib/components/BubbleChart/{index.jsx → index.js} +7 -7
- package/dist/lib/components/Button/index.d.ts +1 -1
- package/dist/lib/components/Button/{index.jsx → index.js} +5 -6
- package/dist/lib/components/Callout/{CalloutIcon.jsx → CalloutIcon.js} +5 -10
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/{CalloutRoot.jsx → CalloutRoot.js} +5 -8
- package/dist/lib/components/Callout/{CalloutText.jsx → CalloutText.js} +15 -5
- package/dist/lib/components/Card/index.d.ts +1 -1
- package/dist/lib/components/Card/{index.jsx → index.js} +5 -6
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/{index.jsx → index.js} +6 -14
- package/dist/lib/components/CheckboxCard/index.d.ts +2 -2
- package/dist/lib/components/CheckboxCard/{index.jsx → index.js} +7 -9
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupItem.jsx → CheckboxGroupItem.js} +15 -7
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +2 -2
- package/dist/lib/components/CheckboxGroup/{CheckboxGroupRoot.jsx → CheckboxGroupRoot.js} +3 -6
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuCheckboxItem.jsx → ContextMenuCheckboxItem.js} +16 -9
- package/dist/lib/components/ContextMenu/{ContextMenuContent.jsx → ContextMenuContent.js} +5 -8
- package/dist/lib/components/ContextMenu/{ContextMenuGroup.jsx → ContextMenuGroup.js} +14 -4
- package/dist/lib/components/ContextMenu/{ContextMenuItem.jsx → ContextMenuItem.js} +5 -7
- package/dist/lib/components/ContextMenu/{ContextMenuItemIndicator.jsx → ContextMenuItemIndicator.js} +5 -6
- package/dist/lib/components/ContextMenu/{ContextMenuLabel.jsx → ContextMenuLabel.js} +5 -6
- package/dist/lib/components/ContextMenu/{ContextMenuRadioGroup.jsx → ContextMenuRadioGroup.js} +14 -6
- package/dist/lib/components/ContextMenu/{ContextMenuRadioItem.jsx → ContextMenuRadioItem.js} +16 -9
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +1 -1
- package/dist/lib/components/ContextMenu/{ContextMenuRoot.jsx → ContextMenuRoot.js} +14 -6
- package/dist/lib/components/ContextMenu/{ContextMenuSeparator.jsx → ContextMenuSeparator.js} +15 -5
- package/dist/lib/components/ContextMenu/{ContextMenuSubContent.jsx → ContextMenuSubContent.js} +9 -12
- package/dist/lib/components/ContextMenu/{ContextMenuSubTrigger.jsx → ContextMenuSubTrigger.js} +16 -11
- package/dist/lib/components/ContextMenu/{ContextMenuTrigger.jsx → ContextMenuTrigger.js} +15 -5
- package/dist/lib/components/DataList/{DataListItem.jsx → DataListItem.js} +5 -6
- package/dist/lib/components/DataList/{DataListLabel.jsx → DataListLabel.js} +5 -6
- package/dist/lib/components/DataList/{DataListRoot.jsx → DataListRoot.js} +15 -7
- package/dist/lib/components/DataList/{DataListValue.jsx → DataListValue.js} +5 -6
- package/dist/lib/components/Dialog/{DialogAction.jsx → DialogAction.js} +16 -6
- package/dist/lib/components/Dialog/{DialogCancel.jsx → DialogCancel.js} +15 -5
- package/dist/lib/components/Dialog/{DialogContent.jsx → DialogContent.js} +5 -6
- package/dist/lib/components/Dialog/{DialogDescription.jsx → DialogDescription.js} +15 -5
- package/dist/lib/components/Dialog/DialogRoot.d.ts +1 -1
- package/dist/lib/components/Dialog/{DialogRoot.jsx → DialogRoot.js} +14 -6
- package/dist/lib/components/Dialog/{DialogSlot.jsx → DialogSlot.js} +15 -5
- package/dist/lib/components/Dialog/{DialogTitle.jsx → DialogTitle.js} +15 -5
- package/dist/lib/components/Dialog/{DialogTrigger.jsx → DialogTrigger.js} +14 -4
- package/dist/lib/components/Dialog/index.d.ts +1 -1
- package/dist/lib/components/DoughnutChart/index.d.ts +2 -3
- package/dist/lib/components/DoughnutChart/{index.jsx → index.js} +6 -6
- package/dist/lib/components/DropdownMenu/{DropdonMenuRadioGroup.jsx → DropdonMenuRadioGroup.js} +13 -3
- package/dist/lib/components/DropdownMenu/{DropdonMenuSubContent.jsx → DropdonMenuSubContent.js} +9 -12
- package/dist/lib/components/DropdownMenu/{DropdownMenuCheckboxItem.jsx → DropdownMenuCheckboxItem.js} +16 -9
- package/dist/lib/components/DropdownMenu/{DropdownMenuContent.jsx → DropdownMenuContent.js} +5 -8
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuItem.jsx → DropdownMenuItem.js} +5 -7
- package/dist/lib/components/DropdownMenu/{DropdownMenuItemIndicator.jsx → DropdownMenuItemIndicator.js} +5 -6
- package/dist/lib/components/DropdownMenu/{DropdownMenuLable.jsx → DropdownMenuLable.js} +15 -5
- package/dist/lib/components/DropdownMenu/{DropdownMenuRadioItem.jsx → DropdownMenuRadioItem.js} +16 -9
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +2 -2
- package/dist/lib/components/DropdownMenu/{DropdownMenuRoot.jsx → DropdownMenuRoot.js} +14 -4
- package/dist/lib/components/DropdownMenu/{DropdownMenuSeparator.jsx → DropdownMenuSeparator.js} +15 -3
- package/dist/lib/components/DropdownMenu/{DropdownMenuSub.jsx → DropdownMenuSub.js} +14 -2
- package/dist/lib/components/DropdownMenu/{DropdownMenuSubTrigger.jsx → DropdownMenuSubTrigger.js} +16 -9
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/{DropdownMenuTrigger.jsx → DropdownMenuTrigger.js} +15 -5
- package/dist/lib/components/DropdownMenu/index.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardContent.jsx → HoverCardContent.js} +5 -6
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +1 -1
- package/dist/lib/components/HoverCard/{HoverCardRoot.jsx → HoverCardRoot.js} +14 -6
- package/dist/lib/components/HoverCard/{HoverCardTrigger.jsx → HoverCardTrigger.js} +14 -4
- 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.jsx → index.js} +4 -5
- package/dist/lib/components/Inset/{index.jsx → index.js} +5 -8
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/{index.jsx → index.js} +4 -5
- package/dist/lib/components/LineChart/index.d.ts +2 -3
- package/dist/lib/components/LineChart/{index.jsx → index.js} +7 -6
- package/dist/lib/components/Menubar/{MenubarCheckboxItem.jsx → MenubarCheckboxItem.js} +16 -9
- package/dist/lib/components/Menubar/{MenubarContent.jsx → MenubarContent.js} +9 -12
- package/dist/lib/components/Menubar/{MenubarItem.jsx → MenubarItem.js} +5 -7
- package/dist/lib/components/Menubar/{MenubarItemIndicator.jsx → MenubarItemIndicator.js} +5 -6
- package/dist/lib/components/Menubar/{MenubarMenu.jsx → MenubarMenu.js} +14 -2
- package/dist/lib/components/Menubar/{MenubarRadioGroup.jsx → MenubarRadioGroup.js} +14 -6
- package/dist/lib/components/Menubar/{MenubarRadioItem.jsx → MenubarRadioItem.js} +16 -9
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/{MenubarRoot.jsx → MenubarRoot.js} +5 -8
- package/dist/lib/components/Menubar/{MenubarSeparator.jsx → MenubarSeparator.js} +15 -5
- package/dist/lib/components/Menubar/{MenubarSub.jsx → MenubarSub.js} +14 -2
- package/dist/lib/components/Menubar/{MenubarSubContent.jsx → MenubarSubContent.js} +6 -7
- package/dist/lib/components/Menubar/{MenubarSubTrigger.jsx → MenubarSubTrigger.js} +16 -9
- package/dist/lib/components/Menubar/{MenubarTrigger.jsx → MenubarTrigger.js} +5 -6
- package/dist/lib/components/NavigationMenu/{NavigationMenuContent.jsx → NavigationMenuContent.js} +5 -6
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +31 -0
- package/dist/lib/components/NavigationMenu/{NavigationMenuItem.jsx → NavigationMenuItem.js} +14 -4
- package/dist/lib/components/NavigationMenu/{NavigationMenuLink.jsx → NavigationMenuLink.js} +5 -6
- package/dist/lib/components/NavigationMenu/{NavigationMenuList.jsx → NavigationMenuList.js} +5 -7
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/{NavigationMenuRoot.jsx → NavigationMenuRoot.js} +15 -7
- package/dist/lib/components/NavigationMenu/{NavigationMenuTrigger.jsx → NavigationMenuTrigger.js} +5 -7
- package/dist/lib/components/NavigationMenu/{NavigationMenuViewport.jsx → NavigationMenuViewport.js} +5 -6
- package/dist/lib/components/PieChart/index.d.ts +2 -3
- package/dist/lib/components/PieChart/{index.jsx → index.js} +6 -6
- package/dist/lib/components/Popover/{PopoverClose.jsx → PopoverClose.js} +15 -5
- package/dist/lib/components/Popover/{PopoverContent.jsx → PopoverContent.js} +5 -6
- package/dist/lib/components/Popover/PopoverRoot.d.ts +1 -1
- package/dist/lib/components/Popover/{PopoverRoot.jsx → PopoverRoot.js} +14 -6
- package/dist/lib/components/Popover/{PopoverTrigger.jsx → PopoverTrigger.js} +14 -4
- package/dist/lib/components/Popover/index.d.ts +1 -1
- package/dist/lib/components/Progress/{index.jsx → index.js} +5 -6
- package/dist/lib/components/RadarChart/index.d.ts +2 -3
- package/dist/lib/components/RadarChart/{index.jsx → index.js} +7 -7
- package/dist/lib/components/Radio/index.d.ts +1 -1
- package/dist/lib/components/Radio/{index.jsx → index.js} +15 -10
- package/dist/lib/components/RadioCards/{RadioCardsItem.jsx → RadioCardsItem.js} +15 -5
- package/dist/lib/components/RadioCards/{RadioCardsRoot.jsx → RadioCardsRoot.js} +5 -10
- package/dist/lib/components/RadioGroup/{RadioGroupItem.jsx → RadioGroupItem.js} +15 -5
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +1 -1
- package/dist/lib/components/RadioGroup/{RadioGroupRoot.jsx → RadioGroupRoot.js} +15 -9
- package/dist/lib/components/ScrollArea/{index.jsx → index.js} +14 -6
- package/dist/lib/components/SegmentedControl/{SegmentedControlItem.jsx → SegmentedControlItem.js} +15 -5
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +1 -1
- package/dist/lib/components/SegmentedControl/{SegmentedControlRoot.jsx → SegmentedControlRoot.js} +4 -7
- 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.jsx → index.js} +10 -27
- package/dist/lib/components/Separator/{index.jsx → index.js} +4 -7
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/{index.jsx → index.js} +4 -7
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/{index.jsx → index.js} +4 -5
- package/dist/lib/components/Spinner/index.d.ts +1 -1
- package/dist/lib/components/Spinner/{index.jsx → index.js} +4 -7
- package/dist/lib/components/TabNav/{index.jsx → index.js} +15 -9
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/{index.jsx → index.js} +10 -25
- package/dist/lib/components/Tabs/{index.jsx → index.js} +7 -16
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/{index.jsx → index.js} +4 -5
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/{index.jsx → index.js} +5 -10
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastActionButton.jsx → ToastActionButton.js} +6 -7
- package/dist/lib/components/Toast/ToastDescription.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastDescription.jsx → ToastDescription.js} +15 -7
- package/dist/lib/components/Toast/{ToastRoot.jsx → ToastRoot.js} +5 -11
- package/dist/lib/components/Toast/ToastTitle.d.ts +1 -1
- package/dist/lib/components/Toast/{ToastTitle.jsx → ToastTitle.js} +15 -5
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/{ToggleWithText.jsx → ToggleWithText.js} +7 -9
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/{index.jsx → index.js} +5 -6
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupItem.jsx → ToggleGroupItem.js} +16 -6
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +1 -1
- package/dist/lib/components/ToggleGroup/{ToggleGroupRoot.jsx → ToggleGroupRoot.js} +5 -10
- package/dist/lib/components/ToggleSwitch/{index.jsx → index.js} +5 -9
- package/dist/lib/components/Tooltip/index.d.ts +1 -1
- package/dist/lib/components/Tooltip/{index.jsx → index.js} +4 -13
- 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/dist/tailwind.config.d.ts +3 -0
- package/dist/tailwind.config.js +141 -0
- package/package.json +4 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.jsx +0 -22
- /package/dist/lib/components/AlertDialog/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/Callout/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/CheckboxGroup/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/ContextMenu/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/DataList/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/Dialog/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/DropdownMenu/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/HoverCard/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/Menubar/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/NavigationMenu/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/Popover/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/RadioCards/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/RadioGroup/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/SegmentedControl/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/Toast/{index.jsx → index.js} +0 -0
- /package/dist/lib/components/ToggleGroup/{index.jsx → index.js} +0 -0
package/dist/lib/components/DropdownMenu/{DropdownMenuSubTrigger.jsx → DropdownMenuSubTrigger.js}
RENAMED
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,13 +20,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef, useContext } from 'react';
|
13
25
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
14
26
|
import { dropdownMenuItemVariants } from './DropdownMenuItem';
|
15
27
|
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
16
|
-
import { blackText, menuItemAppearanceStyle } from 'lib/constants';
|
28
|
+
import { blackText, menuItemAppearanceStyle } from '../../../lib/constants';
|
17
29
|
import { DropdownMenuContext } from './DropdownMenuRoot';
|
18
|
-
import { cn } from 'lib/utils/utils';
|
30
|
+
import { cn } from '../../../lib/utils/utils';
|
19
31
|
export var DropdownMenuSubTrigger = forwardRef(function (_a, ref) {
|
20
32
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
21
33
|
var _b = useContext(DropdownMenuContext), size = _b.size, radius = _b.radius, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'solid' : _d;
|
@@ -23,11 +35,6 @@ export var DropdownMenuSubTrigger = forwardRef(function (_a, ref) {
|
|
23
35
|
? 'hover:fill-slate-12 dark:hover:fill-slateDark-1'
|
24
36
|
: "hover:fill-white dark:hover:fill-slateDark-12 ");
|
25
37
|
var triggerClassName = cn(dropdownMenuItemVariants({ size: size, radius: radius }), menuItemAppearanceStyle(appearance, color), className);
|
26
|
-
return (
|
27
|
-
{children}
|
28
|
-
<div className="ml-auto pl-5">
|
29
|
-
<ChevronRightIcon className={iconClassName}/>
|
30
|
-
</div>
|
31
|
-
</DropdownMenuPrimitive.SubTrigger>);
|
38
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ ref: ref, className: triggerClassName }, props, { children: [children, _jsx("div", { className: "ml-auto pl-5", children: _jsx(ChevronRightIcon, { className: iconClassName }) })] })));
|
32
39
|
});
|
33
40
|
DropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
4
|
-
import { IColor } from 'lib/types';
|
4
|
+
import { IColor } from '../../../lib/types';
|
5
5
|
export interface DropdownMenuTriggerProps extends VariantProps<typeof dropdownMenuTriggerVariants> {
|
6
6
|
color?: IColor;
|
7
7
|
appearance?: 'classic' | 'surface';
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef, useContext } from 'react';
|
13
25
|
import { cva } from 'class-variance-authority';
|
14
26
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
15
27
|
import { DropdownMenuContext } from './DropdownMenuRoot';
|
16
|
-
import { cn } from 'lib/utils/utils';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
17
29
|
var dropdownMenuTriggerVariants = cva('', {
|
18
30
|
variants: {
|
19
31
|
radius: {
|
@@ -36,8 +48,6 @@ var dropdownMenuTriggerVariants = cva('', {
|
|
36
48
|
export var DropdownMenuTrigger = forwardRef(function (_a, ref) {
|
37
49
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
38
50
|
var _b = useContext(DropdownMenuContext), radius = _b.radius, size = _b.size;
|
39
|
-
return (
|
40
|
-
{children}
|
41
|
-
</DropdownMenuPrimitive.Trigger>);
|
51
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, __assign({ asChild: true, ref: ref, className: cn(dropdownMenuTriggerVariants({ radius: radius, size: size }), className) }, props, { children: children })));
|
42
52
|
});
|
43
53
|
DropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const DropdownMenu: {
|
3
3
|
Root: {
|
4
|
-
({ children, radius, size, scaling, color, appearance, ...props }: import("@radix-ui/react-dropdown-menu").DropdownMenuProps & import("./DropdownMenuRoot").DropdownMenuProps): import("react").JSX.Element;
|
4
|
+
({ children, radius, size, scaling, color, appearance, ...props }: import("@radix-ui/react-dropdown-menu").DropdownMenuProps & import("./DropdownMenuRoot").DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
5
5
|
displayName: string;
|
6
6
|
};
|
7
7
|
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dropdown-menu").DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./DropdownMenuTrigger").DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
@@ -20,12 +20,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
24
|
-
import {
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef, useContext } from 'react';
|
25
|
+
import { primaryColorStyle, radiusVariants, weightVariants, scalingVariants } from '../../../lib/constants';
|
25
26
|
import { cva } from 'class-variance-authority';
|
26
27
|
import { HoverCard as HoverCardTheme } from '@radix-ui/themes';
|
27
28
|
import { HoverCardContext } from './HoverCardRoot';
|
28
|
-
import { cn } from 'lib/utils/utils';
|
29
|
+
import { cn } from '../../../lib/utils/utils';
|
29
30
|
export var hoverCardContentVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
radius: __assign({}, radiusVariants['base']),
|
@@ -55,8 +56,6 @@ export var HoverCardContent = forwardRef(function (_a, ref) {
|
|
55
56
|
sizeTheme = '1';
|
56
57
|
if (size === 'large')
|
57
58
|
sizeTheme = '3';
|
58
|
-
return (
|
59
|
-
{children}
|
60
|
-
</HoverCardTheme.Content>);
|
59
|
+
return (_jsx(HoverCardTheme.Content, __assign({ 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), children: children })));
|
61
60
|
});
|
62
61
|
HoverCardContent.displayName = 'HoverCard.Content';
|
@@ -6,6 +6,6 @@ export interface HoverCardProps extends VariantProps<typeof hoverCardContentVari
|
|
6
6
|
}
|
7
7
|
export declare const HoverCardContext: React.Context<HoverCardProps>;
|
8
8
|
export declare const HoverCardRoot: {
|
9
|
-
({ children, radius, size, scaling, weight, color, ...props }: ComponentPropsWithoutRef<typeof HoverCardTheme.Root> & HoverCardProps):
|
9
|
+
({ children, radius, size, scaling, weight, color, ...props }: ComponentPropsWithoutRef<typeof HoverCardTheme.Root> & HoverCardProps): import("react/jsx-runtime").JSX.Element;
|
10
10
|
displayName: string;
|
11
11
|
};
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,7 +20,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { createContext } from 'react';
|
13
25
|
import { HoverCard as HoverCardTheme, Theme } from '@radix-ui/themes';
|
14
26
|
export var HoverCardContext = createContext({
|
15
27
|
radius: 'medium',
|
@@ -21,10 +33,6 @@ export var HoverCardContext = createContext({
|
|
21
33
|
export var HoverCardRoot = function (_a) {
|
22
34
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, weight = _a.weight, color = _a.color, props = __rest(_a, ["children", "radius", "size", "scaling", "weight", "color"]);
|
23
35
|
var contextValue = { radius: radius, size: size, scaling: scaling, weight: weight, color: color };
|
24
|
-
return (
|
25
|
-
<HoverCardContext.Provider value={contextValue}>
|
26
|
-
<HoverCardTheme.Root {...props}>{children}</HoverCardTheme.Root>
|
27
|
-
</HoverCardContext.Provider>
|
28
|
-
</Theme>);
|
36
|
+
return (_jsx(Theme, { children: _jsx(HoverCardContext.Provider, { value: contextValue, children: _jsx(HoverCardTheme.Root, __assign({}, props, { children: children })) }) }));
|
29
37
|
};
|
30
38
|
HoverCardRoot.displayName = 'HoverCard.Root';
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
13
25
|
import { HoverCard as HoverCardTheme } from '@radix-ui/themes';
|
14
26
|
export var HoverCardTrigger = forwardRef(function (_a, ref) {
|
15
27
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (
|
17
|
-
{children}
|
18
|
-
</HoverCardTheme.Trigger>);
|
28
|
+
return (_jsx(HoverCardTheme.Trigger, __assign({ ref: ref, className: className }, props, { children: children })));
|
19
29
|
});
|
20
30
|
HoverCardTrigger.displayName = 'HoverCard.Trigger';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const HoverCard: {
|
3
3
|
Root: {
|
4
|
-
({ children, radius, size, scaling, weight, color, ...props }: import("@radix-ui/themes/dist/cjs/components/hover-card").RootProps & import("./HoverCardRoot").HoverCardProps): import("react").JSX.Element;
|
4
|
+
({ children, radius, size, scaling, weight, color, ...props }: import("@radix-ui/themes/dist/cjs/components/hover-card").RootProps & import("./HoverCardRoot").HoverCardProps): import("react/jsx-runtime").JSX.Element;
|
5
5
|
displayName: string;
|
6
6
|
};
|
7
7
|
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/hover-card").TriggerProps & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IAppearance } from 'lib/types';
|
3
|
+
import { IAppearance } from '../../../lib/types';
|
4
4
|
export interface IconButtonProps extends VariantProps<typeof iconButtonVariants> {
|
5
5
|
appearance?: IAppearance;
|
6
6
|
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
@@ -20,10 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import React, { Children, forwardRef } from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { scalingVariants, radiusVariants, primaryColorStyle, appearanceStyle } from 'lib/constants';
|
26
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { scalingVariants, radiusVariants, primaryColorStyle, appearanceStyle } from '../../../lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
27
28
|
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
29
|
variants: {
|
29
30
|
radius: __assign({}, radiusVariants['base']),
|
@@ -56,9 +57,7 @@ export var IconButton = forwardRef(function (_a, ref) {
|
|
56
57
|
var width = iconSize[size];
|
57
58
|
var height = iconSize[size];
|
58
59
|
var buttonClassName = cn(iconButtonVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, true), className);
|
59
|
-
return (
|
60
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { width: width, height: height }); })}
|
61
|
-
</button>);
|
60
|
+
return (_jsx("button", __assign({ ref: ref, className: buttonClassName }, props, { children: Children.map(children, function (child) { return React.cloneElement(child, { width: width, height: height }); }) })));
|
62
61
|
});
|
63
62
|
IconButton.displayName = 'IconButton';
|
64
63
|
export default IconButton;
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
26
|
import { Inset as InsetTheme, Theme } from '@radix-ui/themes';
|
26
|
-
import { scalingVariants } from 'lib/constants';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { scalingVariants } from '../../../lib/constants';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
28
29
|
var insetVariants = cva('border-[1px] border-slate-6 dark:border-slateDark-6 text-slate-12 dark:text-slateDark-12', {
|
29
30
|
variants: {
|
30
31
|
radius: {
|
@@ -43,11 +44,7 @@ var insetVariants = cva('border-[1px] border-slate-6 dark:border-slateDark-6 tex
|
|
43
44
|
});
|
44
45
|
export var Inset = forwardRef(function (_a, ref) {
|
45
46
|
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, props = __rest(_a, ["children", "className", "radius", "scaling"]);
|
46
|
-
return (
|
47
|
-
<InsetTheme ref={ref} className={cn(insetVariants({ radius: radius, scaling: scaling }), className)} {...props}>
|
48
|
-
{children}
|
49
|
-
</InsetTheme>
|
50
|
-
</Theme>);
|
47
|
+
return (_jsx(Theme, { children: _jsx(InsetTheme, __assign({ ref: ref, className: cn(insetVariants({ radius: radius, scaling: scaling }), className) }, props, { children: children })) }));
|
51
48
|
});
|
52
49
|
Inset.displayName = 'Inset';
|
53
50
|
export default Inset;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
2
2
|
import React from 'react';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor } from 'lib/types';
|
4
|
+
import { IColor } from '../../../lib/types';
|
5
5
|
export interface LabelProps extends VariantProps<typeof labeVariants> {
|
6
6
|
defaultValue?: string;
|
7
7
|
color?: IColor;
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
24
25
|
import React from 'react';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { scalingVariants, textColorStyle, weightVariants } from 'lib/constants';
|
28
|
+
import { scalingVariants, textColorStyle, weightVariants } from '../../../lib/constants';
|
28
29
|
var labeVariants = cva('text-slate-12', {
|
29
30
|
variants: {
|
30
31
|
scaling: __assign({}, scalingVariants),
|
@@ -46,9 +47,7 @@ export var Label = React.forwardRef(function (_a, forwardedRef) {
|
|
46
47
|
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
48
|
if (weight === 'medium' || weight === 'semibold')
|
48
49
|
weight = 'bold';
|
49
|
-
return (
|
50
|
-
{children}
|
51
|
-
</LabelPrimitive.Root>);
|
50
|
+
return (_jsx(LabelPrimitive.Root, __assign({}, rootProps, { ref: forwardedRef, className: cn('', labeVariants({ scaling: scaling, size: size, weight: weight, color: color }), className), children: children })));
|
52
51
|
});
|
53
52
|
Label.displayName = 'Label';
|
54
53
|
export default Label;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IChartDatasets, IChartLegend, IChartTitle } from 'lib/types';
|
2
|
+
import { IChartDatasets, IChartLegend, IChartTitle } from '../../../lib/types';
|
4
3
|
export interface BorderRadius {
|
5
4
|
topLeft: number;
|
6
5
|
topRight: number;
|
@@ -38,7 +37,7 @@ declare const lineChartVariants: (props?: ({
|
|
38
37
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
39
38
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
40
39
|
declare const LineChart: {
|
41
|
-
({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, appearance, scales, isColorMixed, ...props }: LineChartProps): import("react").JSX.Element;
|
40
|
+
({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, appearance, scales, isColorMixed, ...props }: LineChartProps): import("react/jsx-runtime").JSX.Element;
|
42
41
|
displayName: string;
|
43
42
|
};
|
44
43
|
export default LineChart;
|
@@ -20,13 +20,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import { Line } from 'react-chartjs-2';
|
24
25
|
import { Chart as ChartJS, CategoryScale, LinearScale, Tooltip, Legend, LineElement, PointElement, } from 'chart.js/auto';
|
25
|
-
import { scalingVariants } from 'lib/constants';
|
26
|
+
import { scalingVariants } from '../../../lib/constants';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
28
|
-
import { chartAlphaColorList, chartColorList } from 'lib/color/constants';
|
29
|
-
import { useDarkMode } from 'lib/utils/useDarkMode';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
29
|
+
import { chartAlphaColorList, chartColorList } from '../../../lib/color/constants';
|
30
|
+
import { useDarkMode } from '../../../lib/utils/useDarkMode';
|
30
31
|
ChartJS.register(CategoryScale, LinearScale, LineElement, PointElement, Tooltip, Legend);
|
31
32
|
var lineChartVariants = cva('', {
|
32
33
|
variants: {
|
@@ -47,14 +48,14 @@ var LineChart = function (_a) {
|
|
47
48
|
? colorset[index % colorset.length]
|
48
49
|
: colorAlphaset[index % colorset.length] });
|
49
50
|
});
|
50
|
-
return (
|
51
|
+
return (_jsx(Line, __assign({ data: { labels: labels, datasets: datasets }, options: {
|
51
52
|
plugins: {
|
52
53
|
title: title,
|
53
54
|
legend: legend,
|
54
55
|
},
|
55
56
|
indexAxis: indexAxis,
|
56
57
|
scales: __assign(__assign({}, defaultScales.linescale), scales),
|
57
|
-
}
|
58
|
+
}, className: cn(lineChartVariants({ scaling: scaling }), className), width: width, height: height }, props)));
|
58
59
|
};
|
59
60
|
LineChart.displayName = 'LineChart';
|
60
61
|
export default LineChart;
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,23 +20,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
26
|
import { CheckIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
16
28
|
import { menubarItemVariants } from './MenubarItem';
|
17
29
|
import { MenubarItemIndicator } from './MenubarItemIndicator';
|
18
|
-
import { menuItemAppearanceStyle } from 'lib/constants';
|
30
|
+
import { menuItemAppearanceStyle } from '../../../lib/constants';
|
19
31
|
import { useMenubarContext } from './MenubarRoot';
|
20
32
|
export var MenubarCheckboxItem = forwardRef(function (_a, ref) {
|
21
33
|
var children = _a.children, className = _a.className, checked = _a.checked, props = __rest(_a, ["children", "className", "checked"]);
|
22
34
|
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
35
|
var itemClassName = cn(menubarItemVariants({ radius: radius, scaling: scaling, size: size }), 'pl-7', menuItemAppearanceStyle(itemAppearance, color), className);
|
24
|
-
return (
|
25
|
-
<MenubarItemIndicator forceMount radius={'medium'} size={size}>
|
26
|
-
{checked && <CheckIcon />}
|
27
|
-
</MenubarItemIndicator>
|
28
|
-
{children}
|
29
|
-
</MenubarPrimitive.CheckboxItem>);
|
36
|
+
return (_jsxs(MenubarPrimitive.CheckboxItem, __assign({ ref: ref, className: itemClassName }, props, { children: [_jsx(MenubarItemIndicator, { forceMount: true, radius: 'medium', size: size, children: checked && _jsx(CheckIcon, {}) }), children] })));
|
30
37
|
});
|
31
38
|
MenubarCheckboxItem.displayName = 'Menubar.CheckboxItem';
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
24
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
25
26
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from 'lib/utils/utils';
|
27
|
-
import { scalingVariants } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { scalingVariants } from '../../../lib/constants';
|
28
29
|
import { useMenubarContext } from './MenubarRoot';
|
29
30
|
export var menubarContentVariants = cva("p-[5px] w-fit 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
31
|
variants: {
|
@@ -50,14 +51,10 @@ export var menubarContentVariants = cva("p-[5px] w-fit bg-white dark:bg-slateDar
|
|
50
51
|
export var MenubarContent = forwardRef(function (_a, ref) {
|
51
52
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
52
53
|
var _b = useMenubarContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
53
|
-
return (
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}), className)} align="start" sideOffset={5} alignOffset={-3} {...props}>
|
59
|
-
{children}
|
60
|
-
</MenubarPrimitive.Content>
|
61
|
-
</MenubarPrimitive.Portal>);
|
54
|
+
return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, __assign({ ref: ref, className: cn(menubarContentVariants({
|
55
|
+
radius: radius,
|
56
|
+
size: size,
|
57
|
+
scaling: scaling,
|
58
|
+
}), className), align: "start", sideOffset: 5, alignOffset: -3 }, props, { children: children })) }));
|
62
59
|
});
|
63
60
|
MenubarContent.displayName = 'Menubar.Content';
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
24
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
25
26
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from 'lib/utils/utils';
|
27
|
-
import { blackText, menuItemAppearanceStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { blackText, menuItemAppearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
28
29
|
import { useMenubarContext } from './MenubarRoot';
|
29
30
|
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
31
|
variants: {
|
@@ -48,9 +49,6 @@ export var MenubarItem = forwardRef(function (_a, ref) {
|
|
48
49
|
var shortcutClassName = "text-slateA-11 dark:text-slateDarkA-11 ".concat(itemAppearance === 'solid' && !blackText.includes(color)
|
49
50
|
? 'group-hover:text-white dark:group-hover:text-slateDark-1'
|
50
51
|
: '');
|
51
|
-
return (
|
52
|
-
{children}
|
53
|
-
{shortcut && <span className={shortcutClassName}>{shortcut}</span>}
|
54
|
-
</MenubarPrimitive.Item>);
|
52
|
+
return (_jsxs(MenubarPrimitive.Item, __assign({ ref: ref, className: itemClassName }, props, { children: [children, shortcut && _jsx("span", { className: shortcutClassName, children: shortcut })] })));
|
55
53
|
});
|
56
54
|
MenubarItem.displayName = 'Menubar.Item';
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
24
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { radiusVariants } from 'lib/constants';
|
28
|
+
import { radiusVariants } from '../../../lib/constants';
|
28
29
|
import { useMenubarContext } from './MenubarRoot';
|
29
30
|
export var menubarItemIndicatorVariants = cva("absolute left-0 inline-flex items-center justify-center ml-1 border", {
|
30
31
|
variants: {
|
@@ -43,8 +44,6 @@ export var MenubarItemIndicator = forwardRef(function (_a, ref) {
|
|
43
44
|
var children = _a.children, className = _a.className, radius = _a.radius, props = __rest(_a, ["children", "className", "radius"]);
|
44
45
|
var size = useMenubarContext().size;
|
45
46
|
var indicatorClassName = cn(menubarItemIndicatorVariants({ size: size, radius: radius }), className);
|
46
|
-
return (
|
47
|
-
{children}
|
48
|
-
</MenubarPrimitive.ItemIndicator>);
|
47
|
+
return (_jsx(MenubarPrimitive.ItemIndicator, __assign({ ref: ref, className: indicatorClassName }, props, { children: children })));
|
49
48
|
});
|
50
49
|
MenubarItemIndicator.displayName = 'Menubar.ItemIndicator';
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,10 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
26
|
export var MenubarMenu = forwardRef(function (_a, ref) {
|
15
27
|
var children = _a.children, props = __rest(_a, ["children"]);
|
16
|
-
return
|
28
|
+
return _jsx(MenubarPrimitive.Menu, __assign({}, props, { children: children }));
|
17
29
|
});
|
18
30
|
MenubarMenu.displayName = 'Menubar.Menu';
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,15 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { createContext, forwardRef } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
26
|
export var RadioContext = createContext({ selectedValue: '' });
|
15
27
|
export var MenubarRadioGroup = forwardRef(function (_a, ref) {
|
16
28
|
var children = _a.children, className = _a.className, value = _a.value, props = __rest(_a, ["children", "className", "value"]);
|
17
|
-
return (
|
18
|
-
<RadioContext.Provider value={{ selectedValue: value !== null && value !== void 0 ? value : '' }}>
|
19
|
-
{children}
|
20
|
-
</RadioContext.Provider>
|
21
|
-
</MenubarPrimitive.RadioGroup>);
|
29
|
+
return (_jsx(MenubarPrimitive.RadioGroup, __assign({ ref: ref, className: className }, props, { children: _jsx(RadioContext.Provider, { value: { selectedValue: value !== null && value !== void 0 ? value : '' }, children: children }) })));
|
22
30
|
});
|
23
31
|
MenubarRadioGroup.displayName = 'Menubar.RadioGroup';
|
@@ -1,3 +1,14 @@
|
|
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
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef, useContext } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
26
|
import { DotFilledIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from 'lib/utils/utils';
|
16
|
-
import { menuItemAppearanceStyle } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { menuItemAppearanceStyle } from '../../../lib/constants';
|
17
29
|
import { menubarItemVariants } from './MenubarItem';
|
18
30
|
import { MenubarItemIndicator } from './MenubarItemIndicator';
|
19
31
|
import { RadioContext } from './MenubarRadioGroup';
|
@@ -23,11 +35,6 @@ export var MenubarRadioItem = forwardRef(function (_a, ref) {
|
|
23
35
|
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;
|
24
36
|
var itemClassName = cn(menubarItemVariants({ radius: radius, scaling: scaling, size: size }), 'pl-7', menuItemAppearanceStyle(itemAppearance, color), className);
|
25
37
|
var radioGroup = useContext(RadioContext);
|
26
|
-
return (
|
27
|
-
<MenubarItemIndicator forceMount radius={'full'} size={size}>
|
28
|
-
{radioGroup.selectedValue === props.value && <DotFilledIcon />}
|
29
|
-
</MenubarItemIndicator>
|
30
|
-
{children}
|
31
|
-
</MenubarPrimitive.RadioItem>);
|
38
|
+
return (_jsxs(MenubarPrimitive.RadioItem, __assign({ ref: ref, className: itemClassName }, props, { children: [_jsx(MenubarItemIndicator, { forceMount: true, radius: 'full', size: size, children: radioGroup.selectedValue === props.value && _jsx(DotFilledIcon, {}) }), children] })));
|
32
39
|
});
|
33
40
|
MenubarRadioItem.displayName = 'Menubar.RadioItem';
|