@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,3 +1,14 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,7 +20,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { createContext } from 'react';
|
13
25
|
import { Theme, Popover as PopoverTheme } from '@radix-ui/themes';
|
14
26
|
export var PopoverContext = createContext({
|
15
27
|
radius: 'medium',
|
@@ -19,10 +31,6 @@ export var PopoverContext = createContext({
|
|
19
31
|
export var PopoverRoot = function (_a) {
|
20
32
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["children", "radius", "size", "scaling"]);
|
21
33
|
var contextValue = { radius: radius, size: size, scaling: scaling };
|
22
|
-
return (
|
23
|
-
<PopoverContext.Provider value={contextValue}>
|
24
|
-
<PopoverTheme.Root {...props}>{children}</PopoverTheme.Root>
|
25
|
-
</PopoverContext.Provider>
|
26
|
-
</Theme>);
|
34
|
+
return (_jsx(Theme, { children: _jsx(PopoverContext.Provider, { value: contextValue, children: _jsx(PopoverTheme.Root, __assign({}, props, { children: children })) }) }));
|
27
35
|
};
|
28
36
|
PopoverRoot.displayName = 'Popover.Root';
|
@@ -1,3 +1,14 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,12 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
13
25
|
import { Popover as PopoverTheme } from '@radix-ui/themes';
|
14
26
|
export var PopoverTrigger = forwardRef(function (_a, ref) {
|
15
27
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (
|
17
|
-
{children}
|
18
|
-
</PopoverTheme.Trigger>);
|
28
|
+
return (_jsx(PopoverTheme.Trigger, __assign({ ref: ref }, props, { className: className, children: children })));
|
19
29
|
});
|
20
30
|
PopoverTrigger.displayName = 'Popover.Trigger';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const Popover: {
|
3
3
|
Root: {
|
4
|
-
({ children, radius, size, scaling, ...props }: import("@radix-ui/themes/dist/cjs/components/popover").RootProps & import("./PopoverRoot").PopoverProps): import("react").JSX.Element;
|
4
|
+
({ children, radius, size, scaling, ...props }: import("@radix-ui/themes/dist/cjs/components/popover").RootProps & import("./PopoverRoot").PopoverProps): import("react/jsx-runtime").JSX.Element;
|
5
5
|
displayName: string;
|
6
6
|
};
|
7
7
|
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/popover").TriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { scalingVariants } from 'lib/constants';
|
26
|
+
import { scalingVariants } from '../../../lib/constants';
|
26
27
|
import { Theme, Progress as ProgressTheme } from '@radix-ui/themes';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
28
29
|
var progressVariants = cva('w-[300px]', {
|
29
30
|
variants: {
|
30
31
|
radius: {
|
@@ -49,9 +50,7 @@ var progressVariants = cva('w-[300px]', {
|
|
49
50
|
});
|
50
51
|
export var Progress = forwardRef(function (_a, ref) {
|
51
52
|
var className = _a.className, radius = _a.radius, size = _a.size, value = _a.value, _b = _a.appearance, appearance = _b === void 0 ? 'surface' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, scaling = _a.scaling, props = __rest(_a, ["className", "radius", "size", "value", "appearance", "color", "scaling"]);
|
52
|
-
return (
|
53
|
-
<ProgressTheme ref={ref} value={value} variant={appearance} className={cn(progressVariants({ radius: radius, size: size, scaling: scaling }), className)} {...props}/>
|
54
|
-
</Theme>);
|
53
|
+
return (_jsx(Theme, { accentColor: color, children: _jsx(ProgressTheme, __assign({ ref: ref, value: value, variant: appearance, className: cn(progressVariants({ radius: radius, size: size, scaling: scaling }), className) }, props)) }));
|
55
54
|
});
|
56
55
|
Progress.displayName = 'Progress';
|
57
56
|
export default Progress;
|
@@ -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
|
type IRadarChartDataset = IChartDatasets & {
|
5
4
|
data: number[];
|
6
5
|
pointBackgroundColor?: string;
|
@@ -27,7 +26,7 @@ declare const radarChartVariants: (props?: ({
|
|
27
26
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
28
27
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
29
28
|
export declare const RadarChart: {
|
30
|
-
({ className, title, legend, datalabels, datasets, labels, width, height, scaling, appearance, isColorMixed, ...props }: RadarChartProps):
|
29
|
+
({ className, title, legend, datalabels, datasets, labels, width, height, scaling, appearance, isColorMixed, ...props }: RadarChartProps): import("react/jsx-runtime").JSX.Element;
|
31
30
|
displayName: string;
|
32
31
|
};
|
33
32
|
export default RadarChart;
|
@@ -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 { cva } from 'class-variance-authority';
|
25
|
-
import { scalingVariants } from 'lib/constants';
|
25
|
+
import { scalingVariants } from '../../../lib/constants';
|
26
26
|
import { Radar } from 'react-chartjs-2';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { Chart as ChartJS, RadialLinearScale, PointElement, LineElement, Filler, Tooltip, Legend, plugins, } from 'chart.js/auto';
|
29
|
-
import { chartColorList, chartAlphaColorList } from 'lib/color/constants';
|
30
|
-
import { useDarkMode } from 'lib/utils/useDarkMode';
|
29
|
+
import { chartColorList, chartAlphaColorList } from '../../../lib/color/constants';
|
30
|
+
import { useDarkMode } from '../../../lib/utils/useDarkMode';
|
31
31
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
32
32
|
ChartJS.register(RadialLinearScale, PointElement, LineElement, Filler, Tooltip, Legend, plugins, ChartDataLabels);
|
33
33
|
ChartJS.defaults.set('plugins.datalabels', {
|
@@ -60,7 +60,7 @@ export var RadarChart = function (_a) {
|
|
60
60
|
dataset.backgroundColor = ChartColor[index];
|
61
61
|
dataset.borderColor = BorderColor[index];
|
62
62
|
});
|
63
|
-
return (
|
63
|
+
return (_jsx(Radar, __assign({ data: { labels: labels, datasets: datasets }, options: {
|
64
64
|
plugins: {
|
65
65
|
title: title,
|
66
66
|
legend: legend,
|
@@ -70,7 +70,7 @@ export var RadarChart = function (_a) {
|
|
70
70
|
suggestedMin: 50,
|
71
71
|
suggestedMax: 100,
|
72
72
|
} }, defaultScales.linescale),
|
73
|
-
}
|
73
|
+
}, className: cn(radarChartVariants({ scaling: scaling }), className), width: width, height: height }, props)));
|
74
74
|
};
|
75
75
|
RadarChart.displayName = 'RadarChart';
|
76
76
|
export default RadarChart;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IScaling } from 'lib/types';
|
3
|
+
import { IScaling } from '../../../lib/types';
|
4
4
|
export interface RadioProps extends VariantProps<typeof radioVariants> {
|
5
5
|
size?: any;
|
6
6
|
scaling?: IScaling;
|
@@ -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
|
};
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
12
24
|
import React from 'react';
|
13
25
|
import { cva } from 'class-variance-authority';
|
14
26
|
import { Theme, Radio as RadioTheme, Flex } from '@radix-ui/themes';
|
15
|
-
import { Text } from 'lib/Typography/Text';
|
16
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { Text } from '../../../lib/Typography/Text';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
17
29
|
var radioVariants = cva('font-normal', {
|
18
30
|
variants: {
|
19
31
|
size: {
|
@@ -35,14 +47,7 @@ export var Radio = React.forwardRef(function (_a, ref) {
|
|
35
47
|
sizeTheme = '1';
|
36
48
|
if (size === 'large')
|
37
49
|
sizeTheme = '3';
|
38
|
-
return (
|
39
|
-
<Flex asChild className={cn(radioVariants({ size: size }), className)}>
|
40
|
-
<Text as="label" size={sizeTheme}>
|
41
|
-
<RadioTheme ref={ref} value={value} variant={appearance} size={sizeTheme} {...props}/>
|
42
|
-
{children}
|
43
|
-
</Text>
|
44
|
-
</Flex>
|
45
|
-
</Theme>);
|
50
|
+
return (_jsx(Theme, { accentColor: color, scaling: scaling, children: _jsx(Flex, { asChild: true, className: cn(radioVariants({ size: size }), className), children: _jsxs(Text, { as: "label", size: sizeTheme, children: [_jsx(RadioTheme, __assign({ ref: ref, value: value, variant: appearance, size: sizeTheme }, props)), children] }) }) }));
|
46
51
|
});
|
47
52
|
Radio.displayName = 'Radio';
|
48
53
|
export default Radio;
|
@@ -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, useContext } from 'react';
|
13
25
|
import { cva } from 'class-variance-authority';
|
14
26
|
import { RadioCards as RadioCardsTheme } from '@radix-ui/themes';
|
15
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
16
28
|
import { RadioCardsContext } from './RadioCardsRoot';
|
17
29
|
export var radioCardsItemVariants = cva('min-w-[200px] bg-white dark:bg-slateDark-1 text-slateA-12 dark:text-slateDarkA-12 border-slateA-6 dark:border-slateDarkA-6 font-normal disabled:text-slateA-9 dark:disabled:text-slateDarkA-9', {
|
18
30
|
variants: {
|
@@ -37,8 +49,6 @@ export var radioCardsItemVariants = cva('min-w-[200px] bg-white dark:bg-slateDar
|
|
37
49
|
export var RadioCardsItem = forwardRef(function (_a, ref) {
|
38
50
|
var children = _a.children, className = _a.className, value = _a.value, props = __rest(_a, ["children", "className", "value"]);
|
39
51
|
var _b = useContext(RadioCardsContext), radius = _b.radius, size = _b.size;
|
40
|
-
return (
|
41
|
-
{children}
|
42
|
-
</RadioCardsTheme.Item>);
|
52
|
+
return (_jsx(RadioCardsTheme.Item, __assign({ ref: ref, value: value, className: cn(radioCardsItemVariants({ radius: radius, size: size }), className) }, props, { children: children })));
|
43
53
|
});
|
44
54
|
RadioCardsItem.displayName = 'RadioCards.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 { createContext, forwardRef } from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { scalingVariants } from 'lib/constants';
|
26
|
+
import { scalingVariants } from '../../../lib/constants';
|
26
27
|
import { Theme, RadioCards as RadioCardsTheme } from '@radix-ui/themes';
|
27
|
-
import { cn } from 'lib/utils/utils';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
28
29
|
var radioCardsVariants = cva('flex items-center gap-2', {
|
29
30
|
variants: {
|
30
31
|
scaling: __assign({}, scalingVariants),
|
@@ -40,12 +41,6 @@ export var RadioCardsContext = createContext({
|
|
40
41
|
export var RadioCardsRoot = forwardRef(function (_a, ref) {
|
41
42
|
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 ? 'surface' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "color", "appearance"]);
|
42
43
|
var contextValue = { radius: radius, size: size };
|
43
|
-
return (
|
44
|
-
<RadioCardsContext.Provider value={contextValue}>
|
45
|
-
<RadioCardsTheme.Root ref={ref} variant={appearance} className={cn(radioCardsVariants({ scaling: scaling }), className)} {...props}>
|
46
|
-
{children}
|
47
|
-
</RadioCardsTheme.Root>
|
48
|
-
</RadioCardsContext.Provider>
|
49
|
-
</Theme>);
|
44
|
+
return (_jsx(Theme, { accentColor: color, children: _jsx(RadioCardsContext.Provider, { value: contextValue, children: _jsx(RadioCardsTheme.Root, __assign({ ref: ref, variant: appearance, className: cn(radioCardsVariants({ scaling: scaling }), className) }, props, { children: children })) }) }));
|
50
45
|
});
|
51
46
|
RadioCardsRoot.displayName = 'RadioCards.Root';
|
@@ -1,3 +1,14 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,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 { RadioGroup as RadioGroupTheme } from '@radix-ui/themes';
|
15
27
|
import { RadioGroupContext } from './RadioGroupRoot';
|
16
|
-
import { cn } from 'lib/utils/utils';
|
28
|
+
import { cn } from '../../../lib/utils/utils';
|
17
29
|
var radioGroupItemVariants = cva('font-normal text-slate-12 dark:text-slateDark-12', {
|
18
30
|
variants: {
|
19
31
|
size: {
|
@@ -29,8 +41,6 @@ var radioGroupItemVariants = cva('font-normal text-slate-12 dark:text-slateDark-
|
|
29
41
|
export var RadioGroupItem = forwardRef(function (_a, ref) {
|
30
42
|
var className = _a.className, children = _a.children, value = _a.value, props = __rest(_a, ["className", "children", "value"]);
|
31
43
|
var size = useContext(RadioGroupContext).size;
|
32
|
-
return (
|
33
|
-
{children}
|
34
|
-
</RadioGroupTheme.Item>);
|
44
|
+
return (_jsx(RadioGroupTheme.Item, __assign({ ref: ref, value: value, className: cn(radioGroupItemVariants({ size: size }), className) }, props, { children: children })));
|
35
45
|
});
|
36
46
|
RadioGroupItem.displayName = 'RadioGroup.Item';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RadioGroup as RadioGroupTheme } from '@radix-ui/themes';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IScaling } from 'lib/types';
|
4
|
+
import { IScaling } from '../../../lib/types';
|
5
5
|
export interface RadioGroupProps extends VariantProps<typeof radioGroupVariants> {
|
6
6
|
scaling?: IScaling;
|
7
7
|
size?: 'small' | 'medium' | 'large';
|
@@ -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 { createContext, forwardRef } from 'react';
|
13
25
|
import { Theme, RadioGroup as RadioGroupTheme } from '@radix-ui/themes';
|
14
26
|
import { cva } from 'class-variance-authority';
|
15
|
-
import { cn } from 'lib/utils/utils';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
16
28
|
var radioGroupVariants = cva('', {
|
17
29
|
variants: {
|
18
30
|
size: {
|
@@ -36,12 +48,6 @@ export var RadioGroupRoot = forwardRef(function (_a, ref) {
|
|
36
48
|
sizeTheme = '1';
|
37
49
|
if (size === 'large')
|
38
50
|
sizeTheme = '3';
|
39
|
-
return (
|
40
|
-
<RadioGroupContext.Provider value={contextValue}>
|
41
|
-
<RadioGroupTheme.Root ref={ref} size={sizeTheme} variant={appearance} className={cn(radioGroupVariants({ size: size }), className)} {...props}>
|
42
|
-
{children}
|
43
|
-
</RadioGroupTheme.Root>
|
44
|
-
</RadioGroupContext.Provider>
|
45
|
-
</Theme>);
|
51
|
+
return (_jsx(Theme, { accentColor: color, scaling: scaling, children: _jsx(RadioGroupContext.Provider, { value: contextValue, children: _jsx(RadioGroupTheme.Root, __assign({ ref: ref, size: sizeTheme, variant: appearance, className: cn(radioGroupVariants({ size: size }), className) }, props, { children: children })) }) }));
|
46
52
|
});
|
47
53
|
RadioGroupRoot.displayName = 'RadioGroup.Root';
|
@@ -1,3 +1,14 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,7 +20,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
20
|
}
|
10
21
|
return t;
|
11
22
|
};
|
12
|
-
import
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
+
import { forwardRef } from 'react';
|
13
25
|
import { Theme, ScrollArea as ScrollAreaTheme } from '@radix-ui/themes';
|
14
26
|
export var ScrollArea = forwardRef(function (_a, ref) {
|
15
27
|
var className = _a.className, children = _a.children, scrollbars = _a.scrollbars, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'small' : _b, props = __rest(_a, ["className", "children", "scrollbars", "radius", "size"]);
|
@@ -18,11 +30,7 @@ export var ScrollArea = forwardRef(function (_a, ref) {
|
|
18
30
|
sizeTheme = '2';
|
19
31
|
if (size === 'large')
|
20
32
|
sizeTheme = '3';
|
21
|
-
return (
|
22
|
-
<ScrollAreaTheme ref={ref} scrollbars={scrollbars} radius={radius} size={sizeTheme} className={className} {...props}>
|
23
|
-
{children}
|
24
|
-
</ScrollAreaTheme>
|
25
|
-
</Theme>);
|
33
|
+
return (_jsx(Theme, { children: _jsx(ScrollAreaTheme, __assign({ ref: ref, scrollbars: scrollbars, radius: radius, size: sizeTheme, className: className }, props, { children: children })) }));
|
26
34
|
});
|
27
35
|
ScrollArea.displayName = 'ScrollArea';
|
28
36
|
export default ScrollArea;
|
package/dist/lib/components/SegmentedControl/{SegmentedControlItem.jsx → SegmentedControlItem.js}
RENAMED
@@ -1,3 +1,14 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
2
13
|
var t = {};
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -9,17 +20,16 @@ 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 { SegmentedControl as SegmentedControlTheme } from '@radix-ui/themes';
|
14
|
-
import { cn } from 'lib/utils/utils';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
15
27
|
export var SegmentedControlItem = forwardRef(function (_a, ref) {
|
16
28
|
var children = _a.children, className = _a.className, appearance = _a.appearance, props = __rest(_a, ["children", "className", "appearance"]);
|
17
29
|
var appearanceClassName = '';
|
18
30
|
if (appearance === 'classic') {
|
19
31
|
appearanceClassName = 'dark:data-[state=on]:shadow-segmented-control-dark-classic';
|
20
32
|
}
|
21
|
-
return (
|
22
|
-
{children}
|
23
|
-
</SegmentedControlTheme.Item>);
|
33
|
+
return (_jsx(SegmentedControlTheme.Item, __assign({ ref: ref, className: cn(appearanceClassName, className) }, props, { children: children })));
|
24
34
|
});
|
25
35
|
SegmentedControlItem.displayName = 'SegmentedControl.Item';
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import { SegmentedControl as SegmentedControlTheme } from '@radix-ui/themes';
|
4
4
|
export * from './SegmentedControlItem';
|
5
|
-
import { ISize } from 'lib/types';
|
5
|
+
import { ISize } from '../../../lib/types';
|
6
6
|
export interface SegmentedControlProps extends VariantProps<typeof segmentedControlVariants> {
|
7
7
|
appearance?: 'surface' | 'classic';
|
8
8
|
size?: Exclude<ISize, 'x-small' | 'x-large'>;
|
package/dist/lib/components/SegmentedControl/{SegmentedControlRoot.jsx → SegmentedControlRoot.js}
RENAMED
@@ -20,12 +20,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import React, { Children, forwardRef } from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
26
|
import { SegmentedControl as SegmentedControlTheme, Theme } from '@radix-ui/themes';
|
26
|
-
import { scalingVariants } from 'lib/constants';
|
27
|
+
import { scalingVariants } from '../../../lib/constants';
|
27
28
|
export * from './SegmentedControlItem';
|
28
|
-
import { cn } from 'lib/utils/utils';
|
29
|
+
import { cn } from '../../../lib/utils/utils';
|
29
30
|
var segmentedControlVariants = cva('text-slateA-12 dark:text-slateDarkA-12', {
|
30
31
|
variants: {
|
31
32
|
scaling: __assign({}, scalingVariants),
|
@@ -41,10 +42,6 @@ export var SegmentedControlRoot = forwardRef(function (_a, ref) {
|
|
41
42
|
sizeTheme = '1';
|
42
43
|
if (size === 'large')
|
43
44
|
sizeTheme = '3';
|
44
|
-
return (
|
45
|
-
<SegmentedControlTheme.Root ref={ref} size={sizeTheme} radius={radius} variant={appearance} className={cn(segmentedControlVariants({ scaling: scaling }), className)} {...props}>
|
46
|
-
{Children.map(children, function (child) { return React.cloneElement(child, { appearance: appearance }); })}
|
47
|
-
</SegmentedControlTheme.Root>
|
48
|
-
</Theme>);
|
45
|
+
return (_jsx(Theme, { children: _jsx(SegmentedControlTheme.Root, __assign({ ref: ref, size: sizeTheme, radius: radius, variant: appearance, className: cn(segmentedControlVariants({ scaling: scaling }), className) }, props, { children: Children.map(children, function (child) { return React.cloneElement(child, { appearance: appearance }); }) })) }));
|
49
46
|
});
|
50
47
|
SegmentedControlRoot.displayName = 'SegmentedControl.Root';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const SegmentedControl: {
|
3
3
|
Root: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/segmented-control").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./SegmentedControlRoot").SegmentedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
4
|
-
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/segmented-control").ItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("lib/components/SegmentedControl/SegmentedControlItem").SegmentedControlItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
4
|
+
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/segmented-control").ItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("../../../lib/components/SegmentedControl/SegmentedControlItem").SegmentedControlItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
5
5
|
};
|
6
6
|
export default SegmentedControl;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Select as SelectTheme } from '@radix-ui/themes';
|
2
2
|
import React from 'react';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IScaling } from 'lib/types';
|
4
|
+
import { IScaling } from '../../../lib/types';
|
5
5
|
export interface SelectProps extends VariantProps<typeof selectVariants> {
|
6
6
|
label?: string;
|
7
7
|
defaultValue?: string;
|
@@ -20,11 +20,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import { Theme, Select as SelectTheme } from '@radix-ui/themes';
|
24
25
|
import React from 'react';
|
25
26
|
import { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from 'lib/utils/utils';
|
27
|
-
import { radiusVariants, selectAppearanceStyle } from 'lib/constants';
|
27
|
+
import { cn } from '../../../lib/utils/utils';
|
28
|
+
import { radiusVariants, selectAppearanceStyle } from '../../../lib/constants';
|
28
29
|
var selectVariants = cva('', {
|
29
30
|
variants: {
|
30
31
|
radius: __assign({}, radiusVariants['base']),
|
@@ -40,22 +41,14 @@ export var Root = React.forwardRef(function (_a, ref) {
|
|
40
41
|
sizeTheme = '1';
|
41
42
|
if (size === 'large')
|
42
43
|
sizeTheme = '3';
|
43
|
-
return (
|
44
|
-
<div ref={ref}>
|
45
|
-
<SelectTheme.Root size={sizeTheme} {...props}>
|
46
|
-
{children}
|
47
|
-
</SelectTheme.Root>
|
48
|
-
</div>
|
49
|
-
</Theme>);
|
44
|
+
return (_jsx(Theme, { scaling: scaling, accentColor: color, hasBackground: false, children: _jsx("div", { ref: ref, children: _jsx(SelectTheme.Root, __assign({ size: sizeTheme }, props, { children: children })) }) }));
|
50
45
|
});
|
51
46
|
Root.displayName = 'Select.Root';
|
52
47
|
export var Trigger = React.forwardRef(function (_a, forwardedRef) {
|
53
48
|
var _b = _a.appearance, appearance = _b === void 0 ? 'classic' : _b, color = _a.color, size = _a.size, radius = _a.radius, children = _a.children, className = _a.className, props = __rest(_a, ["appearance", "color", "size", "radius", "children", "className"]);
|
54
49
|
if (!color)
|
55
50
|
color = 'red';
|
56
|
-
return (
|
57
|
-
{children}
|
58
|
-
</SelectTheme.Trigger>);
|
51
|
+
return (_jsx(SelectTheme.Trigger, __assign({ ref: forwardedRef, variant: appearance, radius: radius, className: cn(selectVariants({ radius: radius }), selectAppearanceStyle(appearance, color), className) }, props, { children: children })));
|
59
52
|
});
|
60
53
|
Trigger.displayName = 'Select.Trigger';
|
61
54
|
export var Content = React.forwardRef(function (_a, forwardedRef) {
|
@@ -64,37 +57,27 @@ export var Content = React.forwardRef(function (_a, forwardedRef) {
|
|
64
57
|
color = 'red';
|
65
58
|
if (radius === 'full')
|
66
59
|
radius = 'large';
|
67
|
-
return (
|
68
|
-
{children}
|
69
|
-
</SelectTheme.Content>);
|
60
|
+
return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, color: color }, props, { className: cn(selectVariants({ radius: radius }), className), children: children })));
|
70
61
|
});
|
71
62
|
Content.displayName = 'Select.Content';
|
72
63
|
export var Item = React.forwardRef(function (_a, forwardedRef) {
|
73
64
|
var value = _a.value, children = _a.children, className = _a.className, radius = _a.radius, props = __rest(_a, ["value", "children", "className", "radius"]);
|
74
|
-
return (
|
75
|
-
{children}
|
76
|
-
</SelectTheme.Item>);
|
65
|
+
return (_jsx(SelectTheme.Item, __assign({ ref: forwardedRef, value: value }, props, { className: cn(selectVariants({ radius: radius }), className), children: children })));
|
77
66
|
});
|
78
67
|
Item.displayName = 'Select.Item';
|
79
68
|
export var Group = React.forwardRef(function (_a, forwardedRef) {
|
80
69
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
81
|
-
return (
|
82
|
-
{children}
|
83
|
-
</SelectTheme.Group>);
|
70
|
+
return (_jsx(SelectTheme.Group, __assign({ ref: forwardedRef }, props, { className: className, children: children })));
|
84
71
|
});
|
85
72
|
Group.displayName = 'Select.Group';
|
86
73
|
export var Label = React.forwardRef(function (_a, forwardedRef) {
|
87
74
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
88
|
-
return (
|
89
|
-
{children}
|
90
|
-
</SelectTheme.Label>);
|
75
|
+
return (_jsx(SelectTheme.Label, __assign({ ref: forwardedRef }, props, { className: className, children: children })));
|
91
76
|
});
|
92
77
|
Label.displayName = 'Select.Label';
|
93
78
|
export var Separator = React.forwardRef(function (_a, forwardedRef) {
|
94
79
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
95
|
-
return (
|
96
|
-
{children}
|
97
|
-
</SelectTheme.Separator>);
|
80
|
+
return (_jsx(SelectTheme.Separator, __assign({ ref: forwardedRef }, props, { className: className, children: children })));
|
98
81
|
});
|
99
82
|
Separator.displayName = 'Select.Separator';
|
100
83
|
var Select = {
|
@@ -20,10 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import React from 'react';
|
24
25
|
import { cva } from 'class-variance-authority';
|
25
|
-
import { cn } from 'lib/utils/utils';
|
26
|
-
import { bgColorStyle, scalingVariants } from 'lib/constants';
|
26
|
+
import { cn } from '../../../lib/utils/utils';
|
27
|
+
import { bgColorStyle, scalingVariants } from '../../../lib/constants';
|
27
28
|
import { Separator as SeparatorTheme, Theme } from '@radix-ui/themes';
|
28
29
|
var separatorVariants = cva('', {
|
29
30
|
variants: {
|
@@ -40,11 +41,7 @@ export var Separator = React.forwardRef(function (_a, forwardedRef) {
|
|
40
41
|
sizeTheme = '3';
|
41
42
|
if (size === 'fill-large')
|
42
43
|
sizeTheme = '4';
|
43
|
-
return (
|
44
|
-
<SeparatorTheme orientation={orientation} size={sizeTheme} className={cn("bg-".concat(color, "A-6 dark:bg-").concat(color, "DarkA-6"), separatorVariants({ scaling: scaling }), className)} {...props}>
|
45
|
-
{children}
|
46
|
-
</SeparatorTheme>
|
47
|
-
</Theme>);
|
44
|
+
return (_jsx(Theme, { hasBackground: false, className: "flex justify-center items-center", children: _jsx(SeparatorTheme, __assign({ orientation: orientation, size: sizeTheme, className: cn("bg-".concat(color, "A-6 dark:bg-").concat(color, "DarkA-6"), separatorVariants({ scaling: scaling }), className) }, props, { children: children })) }));
|
48
45
|
});
|
49
46
|
Separator.displayName = 'Separator';
|
50
47
|
export default Separator;
|