@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
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor } from 'lib/types';
|
4
|
+
import { IColor } from '../../../lib/types';
|
5
5
|
import { menubarTriggerVariants } from './MenubarTrigger';
|
6
6
|
import { menubarItemVariants } from './MenubarItem';
|
7
7
|
export interface MenubarProps extends VariantProps<typeof menubarVariants>, VariantProps<typeof menubarTriggerVariants>, VariantProps<typeof menubarItemVariants> {
|
@@ -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 { createContext, forwardRef, useContext, useMemo, } 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 { radiusVariants, scalingVariants } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { radiusVariants, scalingVariants } from '../../../lib/constants';
|
28
29
|
export var menubarVariants = cva('flex p-1 shadow bg-white dark:bg-slateDark-1', {
|
29
30
|
variants: {
|
30
31
|
radius: __assign({}, radiusVariants['base']),
|
@@ -54,11 +55,7 @@ export var MenubarRoot = forwardRef(function (_a, ref) {
|
|
54
55
|
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'ghost' : _c, _d = _a.itemAppearance, itemAppearance = _d === void 0 ? 'solid' : _d, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "appearance", "itemAppearance"]);
|
55
56
|
var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color, appearance: appearance, itemAppearance: itemAppearance }); }, [radius, size, scaling, color, appearance, itemAppearance]);
|
56
57
|
var menuClassName = cn(menubarVariants({ radius: radius, scaling: scaling, size: size }), appearance === 'solid' && "bg-".concat(color, "-9 dark:bg-$").concat(color, "Dark-9"), className);
|
57
|
-
return (
|
58
|
-
<MenubarPrimitive.Root ref={ref} className={menuClassName} {...props}>
|
59
|
-
{children}
|
60
|
-
</MenubarPrimitive.Root>
|
61
|
-
</MenubarContext.Provider>);
|
58
|
+
return (_jsx(MenubarContext.Provider, { value: contextValue, children: _jsx(MenubarPrimitive.Root, __assign({ ref: ref, className: menuClassName }, props, { children: children })) }));
|
62
59
|
});
|
63
60
|
MenubarRoot.displayName = 'Menubar.Root';
|
64
61
|
export default MenubarRoot;
|
@@ -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,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 } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
15
27
|
export var MenubarSeparator = forwardRef(function (_a, ref) {
|
16
28
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
17
|
-
return (
|
18
|
-
{children}
|
19
|
-
</MenubarPrimitive.Separator>);
|
29
|
+
return (_jsx(MenubarPrimitive.Separator, __assign({ ref: ref, className: cn('h-[1px] m-[5px] bg-slate-6 dark:bg-slateDark-6', className) }, props, { children: children })));
|
20
30
|
});
|
21
31
|
MenubarSeparator.displayName = 'Menubar.Separator';
|
@@ -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 MenubarSub = forwardRef(function (_a, ref) {
|
15
27
|
var children = _a.children, props = __rest(_a, ["children"]);
|
16
|
-
return
|
28
|
+
return _jsx(MenubarPrimitive.Sub, __assign({}, props, { children: children }));
|
17
29
|
});
|
18
30
|
MenubarSub.displayName = 'Menubar.Sub';
|
@@ -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 { radiusVariants } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { radiusVariants } from '../../../lib/constants';
|
28
29
|
import { useMenubarContext } from './MenubarRoot';
|
29
30
|
export var menubarSubContentVariants = 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: {
|
@@ -42,11 +43,9 @@ export var menubarSubContentVariants = cva("p-[5px] w-fit bg-white dark:bg-slate
|
|
42
43
|
export var MenubarSubContent = forwardRef(function (_a, ref) {
|
43
44
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
44
45
|
var _b = useMenubarContext(), radius = _b.radius, size = _b.size;
|
45
|
-
return (
|
46
|
+
return (_jsx(MenubarPrimitive.SubContent, __assign({ ref: ref, className: cn(menubarSubContentVariants({
|
46
47
|
radius: radius,
|
47
48
|
size: size,
|
48
|
-
}), className)
|
49
|
-
{children}
|
50
|
-
</MenubarPrimitive.SubContent>);
|
49
|
+
}), className), alignOffset: -5 }, props, { children: children })));
|
51
50
|
});
|
52
51
|
MenubarSubContent.displayName = 'Menubar.SubContent';
|
@@ -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 } from 'react';
|
13
25
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
14
26
|
import { ChevronRightIcon } from '@radix-ui/react-icons';
|
15
|
-
import { cn } from 'lib/utils/utils';
|
16
|
-
import { blackText, menuItemAppearanceStyle } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { blackText, menuItemAppearanceStyle } from '../../../lib/constants';
|
17
29
|
import { menubarItemVariants } from './MenubarItem';
|
18
30
|
import { useMenubarContext } from './MenubarRoot';
|
19
31
|
export var MenubarSubTrigger = forwardRef(function (_a, ref) {
|
@@ -24,11 +36,6 @@ export var MenubarSubTrigger = forwardRef(function (_a, ref) {
|
|
24
36
|
if (itemAppearance === 'solid' && !blackText.includes(color)) {
|
25
37
|
iconClassName = 'group-hover:text-white dark:group-hover:text-slateDark-1';
|
26
38
|
}
|
27
|
-
return (
|
28
|
-
{children}
|
29
|
-
<div className={iconClassName}>
|
30
|
-
<ChevronRightIcon />
|
31
|
-
</div>
|
32
|
-
</MenubarPrimitive.SubTrigger>);
|
39
|
+
return (_jsxs(MenubarPrimitive.SubTrigger, __assign({ ref: ref, className: triggerClassName }, props, { children: [children, _jsx("div", { className: iconClassName, children: _jsx(ChevronRightIcon, {}) })] })));
|
33
40
|
});
|
34
41
|
MenubarSubTrigger.displayName = 'Menubar.SubTrigger';
|
@@ -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 { appearanceStyle, scalingVariants } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { appearanceStyle, scalingVariants } from '../../../lib/constants';
|
28
29
|
import { useMenubarContext } from './MenubarRoot';
|
29
30
|
export var menubarTriggerVariants = cva("flex items-center justify-between gap-[2px] outline-none select-none leading-none py-1 px-3 \n font-medium truncate w-fit", {
|
30
31
|
variants: {
|
@@ -51,8 +52,6 @@ export var MenubarTrigger = forwardRef(function (_a, ref) {
|
|
51
52
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
52
53
|
var _b = useMenubarContext(), scaling = _b.scaling, size = _b.size, radius = _b.radius, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'ghost' : _d;
|
53
54
|
var triggerClassName = cn(menubarTriggerVariants({ scaling: scaling, size: size, radius: radius }), appearanceStyle(appearance, color), className);
|
54
|
-
return (
|
55
|
-
{children}
|
56
|
-
</MenubarPrimitive.Trigger>);
|
55
|
+
return (_jsx(MenubarPrimitive.Trigger, __assign({ ref: ref, className: triggerClassName }, props, { children: children })));
|
57
56
|
});
|
58
57
|
MenubarTrigger.displayName = 'Menubar.Trigger';
|
package/dist/lib/components/NavigationMenu/{NavigationMenuContent.jsx → NavigationMenuContent.js}
RENAMED
@@ -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 NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
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 { useNavigationMenuContext } from './NavigationMenuRoot';
|
29
30
|
export var navigationMenuContentVariants = cva("text-slate-12 dark:text-slateDark-12 bg-white dark:bg-slateDark-1 p-2 cursor-pointer", {
|
30
31
|
variants: {
|
@@ -42,8 +43,6 @@ export var navigationMenuContentVariants = cva("text-slate-12 dark:text-slateDar
|
|
42
43
|
export var NavigationMenuContent = forwardRef(function (_a, ref) {
|
43
44
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
44
45
|
var _b = useNavigationMenuContext(), radius = _b.radius, size = _b.size;
|
45
|
-
return (
|
46
|
-
{children}
|
47
|
-
</NavigationMenuPrimitive.Content>);
|
46
|
+
return (_jsx(NavigationMenuPrimitive.Content, __assign({ ref: ref, className: cn("data-[motion=from-start]:animate-enterFromLeft data-[motion=from-end]:animate-enterFromRight data-[motion=to-start]:animate-exitToLeft data-[motion=to-end]:animate-exitToRight absolute left-0 top-0 w-full sm:w-auto", navigationMenuContentVariants({ radius: radius, size: size }), className) }, props, { children: children })));
|
48
47
|
});
|
49
48
|
NavigationMenuContent.displayName = 'NavigationMenu.Content';
|
@@ -0,0 +1,31 @@
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
25
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
27
|
+
export var NavigationMenuIndicator = forwardRef(function (_a, ref) {
|
28
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
29
|
+
return (_jsxs(NavigationMenuPrimitive.Indicator, __assign({ ref: ref, className: "data-[state=visible]:animate-fadeIn data-[state=hidden]:animate-fadeOut top-full z-[1] flex h-[10px] items-end justify-center overflow-hidden transition-[width,transform_250ms_ease]" }, props, { children: [_jsx("div", { className: cn("relative top-[70%] h-[10px] w-[10px] rotate-[45deg] rounded-tl-[2px] bg-white shadow shadow-slate-4 dark:bg-slateDark-2 dark:shadow-slateDark-4", className) }), children] })));
|
30
|
+
});
|
31
|
+
NavigationMenuIndicator.displayName = 'NavigationMenu.Indicator';
|
@@ -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 * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
14
26
|
export var NavigationMenuItem = forwardRef(function (_a, ref) {
|
15
27
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (
|
17
|
-
{children}
|
18
|
-
</NavigationMenuPrimitive.Item>);
|
28
|
+
return (_jsx(NavigationMenuPrimitive.Item, __assign({ ref: ref, className: className }, props, { children: children })));
|
19
29
|
});
|
20
30
|
NavigationMenuItem.displayName = 'NavigationMenu.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 NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { appearanceStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
28
|
+
import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
28
29
|
import { useNavigationMenuContext } from './NavigationMenuRoot';
|
29
30
|
export var navigationMenuLinkVariants = cva("block select-none leading-none outline-none py-1 px-3 cursor-alias hover:underline font-medium", {
|
30
31
|
variants: {
|
@@ -45,8 +46,6 @@ export var NavigationMenuLink = forwardRef(function (_a, ref) {
|
|
45
46
|
var children = _a.children, className = _a.className, href = _a.href, props = __rest(_a, ["children", "className", "href"]);
|
46
47
|
var _b = useNavigationMenuContext(), scaling = _b.scaling, size = _b.size, radius = _b.radius, _c = _b.color, color = _c === void 0 ? 'red' : _c, _d = _b.appearance, appearance = _d === void 0 ? 'ghost' : _d;
|
47
48
|
var linkClassName = cn(navigationMenuLinkVariants({ scaling: scaling, size: size, radius: radius }), appearanceStyle(appearance, color), className);
|
48
|
-
return (
|
49
|
-
{children}
|
50
|
-
</NavigationMenuPrimitive.Link>);
|
49
|
+
return (_jsx(NavigationMenuPrimitive.Link, __assign({ ref: ref, href: href, title: href, className: linkClassName }, props, { children: children })));
|
51
50
|
});
|
52
51
|
NavigationMenuLink.displayName = 'NavigationMenu.Link';
|
@@ -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 NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { appearanceStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
28
|
+
import { appearanceStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
28
29
|
import { NavigationMenuIndicator } from './NavigationMenuIndicator';
|
29
30
|
import { useNavigationMenuContext } from './NavigationMenuRoot';
|
30
31
|
export var navigationMenuListVariants = cva('flex p-1 space-x-1 shadow-slate-4 shadow dark:shadow-slateDark-4 bg-white dark:bg-slateDark-1', {
|
@@ -41,9 +42,6 @@ export var NavigationMenuList = forwardRef(function (_a, ref) {
|
|
41
42
|
var children = _a.children, className = _a.className, _b = _a.isShowIndicator, isShowIndicator = _b === void 0 ? true : _b, props = __rest(_a, ["children", "className", "isShowIndicator"]);
|
42
43
|
var _c = useNavigationMenuContext(), scaling = _c.scaling, radius = _c.radius, _d = _c.appearance, appearance = _d === void 0 ? 'ghost' : _d, _e = _c.color, color = _e === void 0 ? 'red' : _e;
|
43
44
|
var navigationMenuListClassName = cn(navigationMenuListVariants({ scaling: scaling, radius: radius }), appearanceStyle(appearance, color, false), 'border-none', appearance === 'ghost' && 'bg-white', className);
|
44
|
-
return (
|
45
|
-
{children}
|
46
|
-
{isShowIndicator && <NavigationMenuIndicator />}
|
47
|
-
</NavigationMenuPrimitive.List>);
|
45
|
+
return (_jsxs(NavigationMenuPrimitive.List, __assign({ ref: ref, className: navigationMenuListClassName }, props, { children: [children, isShowIndicator && _jsx(NavigationMenuIndicator, {})] })));
|
48
46
|
});
|
49
47
|
NavigationMenuList.displayName = 'NavigationMenu.List';
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { navigationMenuListVariants } from './NavigationMenuList';
|
5
5
|
import { navigationMenuTriggerVariants } from './NavigationMenuTrigger';
|
6
6
|
import { navigationMenuLinkVariants } from './NavigationMenuLink';
|
7
|
-
import { IColor } from 'lib/types';
|
7
|
+
import { IColor } from '../../../lib/types';
|
8
8
|
export interface NavigationMenuProps extends VariantProps<typeof navigationMenuListVariants>, VariantProps<typeof navigationMenuTriggerVariants>, VariantProps<typeof navigationMenuLinkVariants> {
|
9
9
|
appearance?: 'ghost' | 'solid';
|
10
10
|
color?: IColor;
|
@@ -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,9 +20,10 @@ 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, createContext, useContext, useMemo, } from 'react';
|
13
25
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
14
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
15
27
|
var NavigationMenuContext = createContext({
|
16
28
|
radius: 'medium',
|
17
29
|
scaling: '100%',
|
@@ -25,11 +37,7 @@ export var useNavigationMenuContext = function () {
|
|
25
37
|
export var NavigationMenuRoot = forwardRef(function (_a, ref) {
|
26
38
|
var className = _a.className, children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, appearance = _a.appearance, props = __rest(_a, ["className", "children", "radius", "size", "scaling", "color", "appearance"]);
|
27
39
|
var contextValue = useMemo(function () { return ({ radius: radius, size: size, scaling: scaling, color: color, appearance: appearance }); }, [radius, size, scaling, color, appearance]);
|
28
|
-
return (
|
29
|
-
<NavigationMenuPrimitive.Root ref={ref} className={cn('relative flex', className)} {...props}>
|
30
|
-
{children}
|
31
|
-
</NavigationMenuPrimitive.Root>
|
32
|
-
</NavigationMenuContext.Provider>);
|
40
|
+
return (_jsx(NavigationMenuContext.Provider, { value: contextValue, children: _jsx(NavigationMenuPrimitive.Root, __assign({ ref: ref, className: cn('relative flex', className) }, props, { children: children })) }));
|
33
41
|
});
|
34
42
|
NavigationMenuRoot.displayName = 'NavigationMenu.Root';
|
35
43
|
export default NavigationMenuRoot;
|
package/dist/lib/components/NavigationMenu/{NavigationMenuTrigger.jsx → NavigationMenuTrigger.js}
RENAMED
@@ -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 NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { appearanceStyle, scalingVariants } from 'lib/constants';
|
28
|
+
import { appearanceStyle, scalingVariants } from '../../../lib/constants';
|
28
29
|
import { CaretDownIcon } from '@radix-ui/react-icons';
|
29
30
|
import { useNavigationMenuContext } from './NavigationMenuRoot';
|
30
31
|
export var navigationMenuTriggerVariants = cva("flex items-center justify-between outline-none select-none leading-none py-1 px-3 font-medium", {
|
@@ -52,9 +53,6 @@ export var NavigationMenuTrigger = forwardRef(function (_a, ref) {
|
|
52
53
|
var children = _a.children, className = _a.className, _b = _a.isShowIcon, isShowIcon = _b === void 0 ? true : _b, props = __rest(_a, ["children", "className", "isShowIcon"]);
|
53
54
|
var _c = useNavigationMenuContext(), scaling = _c.scaling, size = _c.size, radius = _c.radius, _d = _c.color, color = _d === void 0 ? 'red' : _d, _e = _c.appearance, appearance = _e === void 0 ? 'ghost' : _e;
|
54
55
|
var triggerClassName = cn(navigationMenuTriggerVariants({ scaling: scaling, size: size, radius: radius }), appearanceStyle(appearance, color), className);
|
55
|
-
return (
|
56
|
-
{children}
|
57
|
-
{isShowIcon && (<CaretDownIcon className={cn("relative top-[1px] transition-transform duration-[250] ease-in group-data-[state=open]:-rotate-180")} aria-hidden/>)}
|
58
|
-
</NavigationMenuPrimitive.Trigger>);
|
56
|
+
return (_jsxs(NavigationMenuPrimitive.Trigger, __assign({ ref: ref, className: triggerClassName }, props, { children: [children, isShowIcon && (_jsx(CaretDownIcon, { className: cn("relative top-[1px] transition-transform duration-[250] ease-in group-data-[state=open]:-rotate-180"), "aria-hidden": true }))] })));
|
59
57
|
});
|
60
58
|
NavigationMenuTrigger.displayName = 'NavigationMenu.Trigger';
|
package/dist/lib/components/NavigationMenu/{NavigationMenuViewport.jsx → NavigationMenuViewport.js}
RENAMED
@@ -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 NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
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, scalingVariants, weightVariants } from 'lib/constants';
|
28
|
+
import { radiusVariants, scalingVariants, weightVariants } from '../../../lib/constants';
|
28
29
|
import { useNavigationMenuContext } from './NavigationMenuRoot';
|
29
30
|
export var navigationViewportVariants = cva("data-[state=open]:animate-scaleIn data-[state=closed]:animate-scaleOut relative mt-[10px] \n h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden \n transition-[width,_height] duration-300 shadow-slate-4 shadow dark:shadow-slateDark-4\n sm:w-[var(--radix-navigation-menu-viewport-width)]", {
|
30
31
|
variants: {
|
@@ -47,8 +48,6 @@ export var NavigationMenuViewport = forwardRef(function (_a, ref) {
|
|
47
48
|
var className = _a.className, props = __rest(_a, ["className"]);
|
48
49
|
var _b = useNavigationMenuContext(), size = _b.size, scaling = _b.scaling, radius = _b.radius;
|
49
50
|
var viewportClassName = cn(navigationViewportVariants({ size: size, scaling: scaling, radius: radius }), className);
|
50
|
-
return (
|
51
|
-
<NavigationMenuPrimitive.Viewport ref={ref} className={viewportClassName} {...props}/>
|
52
|
-
</div>);
|
51
|
+
return (_jsx("div", { className: "perspective-[2000px] absolute left-0 top-full flex w-full", children: _jsx(NavigationMenuPrimitive.Viewport, __assign({ ref: ref, className: viewportClassName }, props)) }));
|
53
52
|
});
|
54
53
|
NavigationMenuViewport.displayName = 'NavigationMenu.Viewport';
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IChartDataLabels, IChartDatasets, IChartLegend, IChartTitle } from 'lib/types';
|
2
|
+
import { IChartDataLabels, IChartDatasets, IChartLegend, IChartTitle } from '../../../lib/types';
|
4
3
|
export interface PieChartProps extends VariantProps<typeof PieVariants> {
|
5
4
|
labels?: string[];
|
6
5
|
appearance?: 'solid' | 'soft';
|
@@ -17,7 +16,7 @@ declare const PieVariants: (props?: ({
|
|
17
16
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
18
17
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
19
18
|
declare const PieChart: {
|
20
|
-
({ labels, title, legend, datasets, datalabels, scaling, className, appearance, isColorMixed, ...rest }: PieChartProps):
|
19
|
+
({ labels, title, legend, datasets, datalabels, scaling, className, appearance, isColorMixed, ...rest }: PieChartProps): import("react/jsx-runtime").JSX.Element;
|
21
20
|
displayName: string;
|
22
21
|
};
|
23
22
|
export default PieChart;
|
@@ -20,14 +20,14 @@ 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
24
|
import { Pie } from 'react-chartjs-2';
|
25
25
|
import { Chart as ChartJS, ArcElement, Tooltip, Legend, plugins } from 'chart.js';
|
26
26
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { cva } from 'class-variance-authority';
|
29
|
-
import { scalingVariants } from 'lib/constants';
|
30
|
-
import { chartColorList, chartAlphaColorList } from 'lib/color/constants';
|
29
|
+
import { scalingVariants } from '../../../lib/constants';
|
30
|
+
import { chartColorList, chartAlphaColorList } from '../../../lib/color/constants';
|
31
31
|
ChartJS.register(ArcElement, Tooltip, Legend, plugins, ChartDataLabels);
|
32
32
|
ChartJS.defaults.set('plugins.datalabels', {
|
33
33
|
display: false,
|
@@ -53,13 +53,13 @@ var PieChart = function (_a) {
|
|
53
53
|
datasets.forEach(function (dataset, index) {
|
54
54
|
datasets[index] = __assign(__assign({}, dataset), { backgroundColor: getChartColor(isColorMixed, appearance), borderColor: getChartColor(isColorMixed, 'solid') });
|
55
55
|
});
|
56
|
-
return (
|
56
|
+
return (_jsx(Pie, __assign({ data: { labels: labels, datasets: datasets }, options: {
|
57
57
|
plugins: {
|
58
58
|
title: title,
|
59
59
|
legend: legend,
|
60
60
|
datalabels: datalabels,
|
61
61
|
},
|
62
|
-
}
|
62
|
+
}, className: cn(PieVariants({ scaling: scaling }), className) }, rest)));
|
63
63
|
};
|
64
64
|
PieChart.displayName = 'PieChart';
|
65
65
|
export default PieChart;
|
@@ -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 { Popover as PopoverTheme } from '@radix-ui/themes';
|
15
27
|
import { PopoverContext } from './PopoverRoot';
|
16
|
-
import { cn } from 'lib/utils/utils';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
17
29
|
export var popoverCloseVariants = cva('', {
|
18
30
|
variants: {
|
19
31
|
radius: {
|
@@ -31,8 +43,6 @@ export var popoverCloseVariants = cva('', {
|
|
31
43
|
export var PopoverClose = forwardRef(function (_a, ref) {
|
32
44
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
33
45
|
var radius = useContext(PopoverContext).radius;
|
34
|
-
return (
|
35
|
-
{children}
|
36
|
-
</PopoverTheme.Close>);
|
46
|
+
return (_jsx(PopoverTheme.Close, __assign({ ref: ref, className: cn(popoverCloseVariants({ radius: radius }), className) }, props, { children: children })));
|
37
47
|
});
|
38
48
|
PopoverClose.displayName = 'Popover.Close';
|
@@ -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 { scalingVariants } from '../../../lib/constants';
|
25
26
|
import { Popover as PopoverTheme } from '@radix-ui/themes';
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
28
|
import { PopoverContext } from './PopoverRoot';
|
28
|
-
import { cn } from 'lib/utils/utils';
|
29
|
+
import { cn } from '../../../lib/utils/utils';
|
29
30
|
export var popoverContentVariants = cva('flex gap-2 bg-white dark:bg-slateDark-1 border-slateA-6 dark:border-slateDarkA-6', {
|
30
31
|
variants: {
|
31
32
|
radius: {
|
@@ -59,8 +60,6 @@ export var PopoverContent = forwardRef(function (_a, ref) {
|
|
59
60
|
sizeTheme = '3';
|
60
61
|
if (size === 'x-large')
|
61
62
|
sizeTheme = '4';
|
62
|
-
return (
|
63
|
-
{children}
|
64
|
-
</PopoverTheme.Content>);
|
63
|
+
return (_jsx(PopoverTheme.Content, __assign({ ref: ref, size: sizeTheme, className: cn(popoverContentVariants({ size: size, radius: radius, scaling: scaling }), className) }, props, { children: children })));
|
65
64
|
});
|
66
65
|
PopoverContent.displayName = 'Popover.Content';
|
@@ -7,6 +7,6 @@ export interface PopoverProps extends VariantProps<typeof popoverContentVariants
|
|
7
7
|
}
|
8
8
|
export declare const PopoverContext: React.Context<PopoverProps>;
|
9
9
|
export declare const PopoverRoot: {
|
10
|
-
({ children, radius, size, scaling, ...props }: ComponentPropsWithoutRef<typeof PopoverTheme.Root> & PopoverProps):
|
10
|
+
({ children, radius, size, scaling, ...props }: ComponentPropsWithoutRef<typeof PopoverTheme.Root> & PopoverProps): import("react/jsx-runtime").JSX.Element;
|
11
11
|
displayName: string;
|
12
12
|
};
|