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