@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
package/dist/lib/components/AlertDialog/{AlertDialogDescription.js → AlertDialogDescription.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,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 AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
14
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { useAlertDialogContext } from './AlertDialogRoot';
|
29
17
|
export var alertDialogDescriptionVariants = cva("text-slate-12 dark:text-slateDark-12 font-normal", {
|
30
18
|
variants: {
|
@@ -42,6 +30,8 @@ export var alertDialogDescriptionVariants = cva("text-slate-12 dark:text-slateDa
|
|
42
30
|
export var AlertDialogDescription = forwardRef(function (_a, ref) {
|
43
31
|
var className = _a.className, children = _a.children, contentText = _a.contentText, props = __rest(_a, ["className", "children", "contentText"]);
|
44
32
|
var size = useAlertDialogContext().size;
|
45
|
-
return (
|
33
|
+
return (<AlertDialogPrimitive.Description className={cn(alertDialogDescriptionVariants({ size: size }), className)} ref={ref} {...props}>
|
34
|
+
{contentText !== null && contentText !== void 0 ? contentText : children}
|
35
|
+
</AlertDialogPrimitive.Description>);
|
46
36
|
});
|
47
37
|
AlertDialogDescription.displayName = 'AlertDialog.Description';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance, IColor } from '
|
4
|
+
import { IAppearance, IColor } from 'lib/types';
|
5
5
|
import { alertDialogContentVariants } from './AlertDialogContent';
|
6
6
|
import { alertDialogTitleVariants } from './AlertDialogTitle';
|
7
7
|
import { alertDialogDescriptionVariants } from './AlertDialogDescription';
|
@@ -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 { forwardRef, createContext, useContext, useMemo, } from 'react';
|
12
|
+
import React, { forwardRef, createContext, useContext, useMemo, } from 'react';
|
25
13
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
14
|
var AlertDialogContext = createContext({
|
27
15
|
size: 'medium',
|
@@ -41,6 +29,10 @@ export var AlertDialogRoot = forwardRef(function (_a, ref) {
|
|
41
29
|
scaling: scaling,
|
42
30
|
color: color,
|
43
31
|
}); }, [radius, size, scaling, color]);
|
44
|
-
return (
|
32
|
+
return (<AlertDialogContext.Provider value={contextValue}>
|
33
|
+
<div ref={ref}>
|
34
|
+
<AlertDialogPrimitive.Root {...props}>{children}</AlertDialogPrimitive.Root>
|
35
|
+
</div>
|
36
|
+
</AlertDialogContext.Provider>);
|
45
37
|
});
|
46
38
|
AlertDialogRoot.displayName = 'AlertDialog.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,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 AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
14
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
15
|
+
import { cn } from 'lib/utils/utils';
|
28
16
|
import { useAlertDialogContext } from './AlertDialogRoot';
|
29
17
|
export var alertDialogTitleVariants = cva("m-0 text-slate-12 dark:text-slateDark-12 font-bold", {
|
30
18
|
variants: {
|
@@ -42,6 +30,8 @@ export var alertDialogTitleVariants = cva("m-0 text-slate-12 dark:text-slateDark
|
|
42
30
|
export var AlertDialogTitle = forwardRef(function (_a, ref) {
|
43
31
|
var className = _a.className, children = _a.children, titleText = _a.titleText, props = __rest(_a, ["className", "children", "titleText"]);
|
44
32
|
var size = useAlertDialogContext().size;
|
45
|
-
return (
|
33
|
+
return (<AlertDialogPrimitive.Title className={cn(alertDialogTitleVariants({ size: size }), className)} ref={ref} {...props}>
|
34
|
+
{titleText !== null && titleText !== void 0 ? titleText : children}
|
35
|
+
</AlertDialogPrimitive.Title>);
|
46
36
|
});
|
47
37
|
AlertDialogTitle.displayName = 'AlertDialog.Title';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IAppearance, IColor } from '
|
4
|
+
import { IAppearance, IColor } from 'lib/types';
|
5
5
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
6
6
|
color?: IColor;
|
7
7
|
appearance?: IAppearance;
|
@@ -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 * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { radiusVariants, scalingVariants, weightVariants, primaryColorStyle, appearanceStyle, } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { radiusVariants, scalingVariants, weightVariants, primaryColorStyle, appearanceStyle, } from 'lib/constants';
|
29
28
|
var buttonVariants = cva("inline-flex items-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8", {
|
30
29
|
variants: {
|
31
30
|
radius: __assign({}, radiusVariants['base']),
|
@@ -50,6 +49,8 @@ var buttonVariants = cva("inline-flex items-center transition-colors focus:outli
|
|
50
49
|
export var AlertDialogTrigger = forwardRef(function (_a, ref) {
|
51
50
|
var children = _a.children, className = _a.className, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["children", "className", "radius", "scaling", "size", "weight", "color", "appearance"]);
|
52
51
|
var buttonClassName = cn(buttonVariants({ radius: radius, scaling: scaling, size: size, weight: weight, color: color }), appearanceStyle(appearance, color), className);
|
53
|
-
return (
|
52
|
+
return (<AlertDialogPrimitive.Trigger asChild ref={ref} className={buttonClassName} {...props}>
|
53
|
+
{children}
|
54
|
+
</AlertDialogPrimitive.Trigger>);
|
54
55
|
});
|
55
56
|
AlertDialogTrigger.displayName = 'AlertDialog.Trigger';
|
@@ -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 * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
29
28
|
export var aspectRatioVariants = cva('', {
|
30
29
|
variants: {
|
31
30
|
scaling: __assign({}, scalingVariants),
|
@@ -36,7 +35,9 @@ export var aspectRatioVariants = cva('', {
|
|
36
35
|
});
|
37
36
|
var AspectRatio = forwardRef(function (_a, ref) {
|
38
37
|
var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, ["children", "className", "ratio", "scaling"]);
|
39
|
-
return (
|
38
|
+
return (<AspectRatioPrimitive.Root ratio={ratio} ref={ref} {...props} className={cn(aspectRatioVariants({ scaling: scaling }), className)}>
|
39
|
+
{children}
|
40
|
+
</AspectRatioPrimitive.Root>);
|
40
41
|
});
|
41
42
|
AspectRatio.displayName = 'AspectRatio';
|
42
43
|
export default AspectRatio;
|
@@ -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 * as AvatarPrimitive from '@radix-ui/react-avatar';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
29
28
|
var AvatarVariants = cva('font-medium', {
|
30
29
|
variants: {
|
31
30
|
radius: __assign({}, radiusVariants['base']),
|
@@ -52,7 +51,12 @@ var AvatarVariants = cva('font-medium', {
|
|
52
51
|
var Avatar = forwardRef(function (_a, ref) {
|
53
52
|
var className = _a.className, fallbackClassName = _a.fallbackClassName, radius = _a.radius, scaling = _a.scaling, size = _a.size, fallbackText = _a.fallbackText, imagePath = _a.imagePath, alt = _a.alt, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, title = _a.title, _d = _a.delayMs, delayMs = _d === void 0 ? 300 : _d, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color", "ariaLabel", "ariaLabelledby", "title", "delayMs"]);
|
54
53
|
var imgAltText = alt || ariaLabel || fallbackText || 'Avatar Image';
|
55
|
-
return (
|
54
|
+
return (<AvatarPrimitive.Root className={cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, color, false), className)} {...props} ref={ref} role="img" aria-label={ariaLabel || imgAltText} aria-labelledby={ariaLabelledby} title={title || imgAltText} tabIndex={0}>
|
55
|
+
<AvatarPrimitive.Image className="h-full w-full border-none object-cover" src={imagePath} alt={imgAltText} title={title || imgAltText}/>
|
56
|
+
<AvatarPrimitive.Fallback className={cn("leading-1 flex h-full w-full items-center justify-center", className)} delayMs={delayMs} aria-hidden="true">
|
57
|
+
{fallbackText}
|
58
|
+
</AvatarPrimitive.Fallback>
|
59
|
+
</AvatarPrimitive.Root>);
|
56
60
|
});
|
57
61
|
Avatar.displayName = 'Avatar';
|
58
62
|
export default Avatar;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IColor, IAppearance, ISize, IWeight } from '
|
3
|
+
import { IColor, IAppearance, ISize, IWeight } from 'lib/types';
|
4
4
|
export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof BadgeVariants> {
|
5
5
|
color?: IColor;
|
6
6
|
appearance?: Exclude<IAppearance, 'classic' | 'ghost'>;
|
@@ -20,11 +20,10 @@ 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
|
-
import { cn } from '
|
27
|
-
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants, weightVariants, } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
26
|
+
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants, weightVariants, } from 'lib/constants';
|
28
27
|
var BadgeVariants = cva('inline-flex items-center transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 w-fit', {
|
29
28
|
variants: {
|
30
29
|
radius: __assign({}, radiusVariants['base']),
|
@@ -48,7 +47,9 @@ var BadgeVariants = cva('inline-flex items-center transition-colors focus:outlin
|
|
48
47
|
var Badge = forwardRef(function (_a, ref) {
|
49
48
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, weight = _a.weight, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "radius", "scaling", "weight", "size", "color", "appearance"]);
|
50
49
|
var badgeClassName = cn(BadgeVariants({ radius: radius, scaling: scaling, weight: weight, size: size, color: color }), appearanceStyle(appearance, color, false), className);
|
51
|
-
return (
|
50
|
+
return (<div ref={ref} className={badgeClassName} {...props}>
|
51
|
+
{children}
|
52
|
+
</div>);
|
52
53
|
});
|
53
54
|
Badge.displayName = 'Badge';
|
54
55
|
export default Badge;
|
@@ -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;
|
@@ -31,7 +32,7 @@ declare const barChartVariants: (props?: ({
|
|
31
32
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
32
33
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
33
34
|
declare const BarChart: {
|
34
|
-
({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, appearance, isColorMixed, ...props }: BarChartProps): import("react
|
35
|
+
({ className, title, datasets, labels, scaling, legend, width, height, indexAxis, appearance, isColorMixed, ...props }: BarChartProps): import("react").JSX.Element;
|
35
36
|
displayName: string;
|
36
37
|
};
|
37
38
|
export default BarChart;
|
@@ -20,14 +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";
|
24
23
|
import { Bar } from 'react-chartjs-2';
|
25
24
|
import { Chart as ChartJS, CategoryScale, LinearScale, BarElement, Tooltip, Legend, } from 'chart.js/auto';
|
26
|
-
import { scalingVariants } from '
|
25
|
+
import { scalingVariants } from 'lib/constants';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { cn } from '
|
29
|
-
import { chartAlphaColorList, chartColorList } from '
|
30
|
-
import { useDarkMode } from '
|
27
|
+
import { cn } from 'lib/utils/utils';
|
28
|
+
import { chartAlphaColorList, chartColorList } from 'lib/color/constants';
|
29
|
+
import { useDarkMode } from 'lib/utils/useDarkMode';
|
31
30
|
ChartJS.register(CategoryScale, LinearScale, BarElement, Tooltip, Legend);
|
32
31
|
var barChartVariants = cva('', {
|
33
32
|
variants: {
|
@@ -50,14 +49,14 @@ var BarChart = function (_a) {
|
|
50
49
|
}
|
51
50
|
}
|
52
51
|
});
|
53
|
-
return (
|
52
|
+
return (<Bar data={{ labels: labels, datasets: datasets }} options={{
|
54
53
|
plugins: {
|
55
54
|
title: title,
|
56
55
|
legend: legend,
|
57
56
|
},
|
58
57
|
indexAxis: indexAxis,
|
59
58
|
scales: __assign({}, defaultScales.linescale),
|
60
|
-
}
|
59
|
+
}} className={cn(barChartVariants({ scaling: scaling }), className)} width={width} height={height} {...props}/>);
|
61
60
|
};
|
62
61
|
BarChart.displayName = 'BarChart';
|
63
62
|
export default BarChart;
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
2
|
-
import { IChartDataLabels, IChartDatasets, IChartLegend, IChartTitle } from '
|
3
|
+
import { IChartDataLabels, IChartDatasets, IChartLegend, IChartTitle } from 'lib/types';
|
3
4
|
type IBubbleChartDataset = IChartDatasets & {
|
4
5
|
data: {
|
5
6
|
x: number;
|
@@ -22,7 +23,7 @@ declare const bubbleChartVariants: (props?: ({
|
|
22
23
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
23
24
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
24
25
|
export declare const BubbleChart: {
|
25
|
-
({ className, title, legend, datalabels, datasets, scaling, width, height, appearance, isColorMixed, ...props }: BubbleChartProps):
|
26
|
+
({ className, title, legend, datalabels, datasets, scaling, width, height, appearance, isColorMixed, ...props }: BubbleChartProps): React.JSX.Element;
|
26
27
|
displayName: string;
|
27
28
|
};
|
28
29
|
export default BubbleChart;
|
@@ -20,15 +20,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
20
20
|
}
|
21
21
|
return t;
|
22
22
|
};
|
23
|
-
import
|
23
|
+
import React from 'react';
|
24
24
|
import { Bubble } from 'react-chartjs-2';
|
25
25
|
import { Chart as ChartJS, LinearScale, PointElement, Tooltip, Legend, plugins, } from 'chart.js/auto';
|
26
|
-
import { scalingVariants } from '
|
26
|
+
import { scalingVariants } from 'lib/constants';
|
27
27
|
import { cva } from 'class-variance-authority';
|
28
|
-
import { chartColorList, chartAlphaColorList } from '
|
28
|
+
import { chartColorList, chartAlphaColorList } from 'lib/color/constants';
|
29
29
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
30
|
-
import { useDarkMode } from '
|
31
|
-
import { cn } from '
|
30
|
+
import { useDarkMode } from 'lib/utils/useDarkMode';
|
31
|
+
import { cn } from 'lib/utils/utils';
|
32
32
|
ChartJS.register(LinearScale, PointElement, Tooltip, Legend, plugins, ChartDataLabels);
|
33
33
|
ChartJS.defaults.set('plugins.datalabels', {
|
34
34
|
display: false,
|
@@ -60,14 +60,14 @@ export var BubbleChart = function (_a) {
|
|
60
60
|
dataset.backgroundColor = ChartColor[index];
|
61
61
|
dataset.borderColor = BorderColor[index];
|
62
62
|
});
|
63
|
-
return (
|
63
|
+
return (<Bubble data={{ datasets: datasets }} options={{
|
64
64
|
plugins: {
|
65
65
|
title: title,
|
66
66
|
legend: legend,
|
67
67
|
datalabels: datalabels,
|
68
68
|
},
|
69
69
|
scales: __assign({}, defaultScales.linescale),
|
70
|
-
}
|
70
|
+
}} className={cn(bubbleChartVariants({ scaling: scaling }), className)} width={width} height={height} {...props}/>);
|
71
71
|
};
|
72
72
|
BubbleChart.displayName = 'BubbleChart';
|
73
73
|
export default BubbleChart;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IAppearance, IColor } from '
|
3
|
+
import { IAppearance, IColor } from 'lib/types';
|
4
4
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
5
5
|
color?: IColor;
|
6
6
|
appearance?: IAppearance;
|
@@ -20,11 +20,10 @@ 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
|
-
import { cn } from '
|
27
|
-
import { radiusVariants, weightVariants, primaryColorStyle, appearanceStyle, scalingVariants, } from '
|
25
|
+
import { cn } from 'lib/utils/utils';
|
26
|
+
import { radiusVariants, weightVariants, primaryColorStyle, appearanceStyle, scalingVariants, } from 'lib/constants';
|
28
27
|
var buttonVariants = cva("inline-flex items-center w-fit transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8 justify-center", {
|
29
28
|
variants: {
|
30
29
|
radius: __assign({}, radiusVariants['base']),
|
@@ -50,7 +49,9 @@ var buttonVariants = cva("inline-flex items-center w-fit transition-colors focus
|
|
50
49
|
export var Button = forwardRef(function (_a, ref) {
|
51
50
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, size = _a.size, weight = _a.weight, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "radius", "scaling", "size", "weight", "color", "appearance"]);
|
52
51
|
var buttonClassName = cn(buttonVariants({ radius: radius, scaling: scaling, size: size, weight: weight, color: color }), appearanceStyle(appearance, color, true), className);
|
53
|
-
return (
|
52
|
+
return (<button ref={ref} className={buttonClassName} {...props}>
|
53
|
+
{children}
|
54
|
+
</button>);
|
54
55
|
});
|
55
56
|
Button.displayName = 'Button';
|
56
57
|
export default Button;
|
@@ -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 } from 'react';
|
23
|
+
import React, { forwardRef } from 'react';
|
25
24
|
import { Callout as CalloutTheme } from '@radix-ui/themes';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
26
|
import { ExclamationTriangleIcon, InfoCircledIcon, LockClosedIcon, CheckCircledIcon, } from '@radix-ui/react-icons';
|
28
|
-
import { scalingVariants } from '
|
29
|
-
import { cn } from '
|
27
|
+
import { scalingVariants } from 'lib/constants';
|
28
|
+
import { cn } from 'lib/utils/utils';
|
30
29
|
import { useCalloutContext } from './CalloutRoot';
|
31
30
|
var calloutIconVariants = cva('flex items-center text-slate-12 dark:text-slateDark-12', {
|
32
31
|
variants: {
|
@@ -52,6 +51,12 @@ var calloutIconVariants = cva('flex items-center text-slate-12 dark:text-slateDa
|
|
52
51
|
export var CalloutIcon = forwardRef(function (_a, ref) {
|
53
52
|
var children = _a.children, className = _a.className, iconType = _a.iconType, props = __rest(_a, ["children", "className", "iconType"]);
|
54
53
|
var _b = useCalloutContext(), scaling = _b.scaling, size = _b.size, color = _b.color;
|
55
|
-
return (
|
54
|
+
return (<CalloutTheme.Icon ref={ref} className={cn(calloutIconVariants({ color: color, size: size, scaling: scaling }), className)} {...props}>
|
55
|
+
{iconType === 'danger' && <ExclamationTriangleIcon />}
|
56
|
+
{iconType === 'warning' && <LockClosedIcon />}
|
57
|
+
{iconType === 'success' && <CheckCircledIcon />}
|
58
|
+
{iconType === 'information' && <InfoCircledIcon />}
|
59
|
+
{children}
|
60
|
+
</CalloutTheme.Icon>);
|
56
61
|
});
|
57
62
|
CalloutIcon.displayName = 'Callout.Icon';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import { calloutTextVariants } from './CalloutText';
|
4
|
-
import { IAppearance } from '
|
4
|
+
import { IAppearance } from 'lib/types';
|
5
5
|
export interface CalloutProps extends VariantProps<typeof calloutVariants>, VariantProps<typeof calloutTextVariants> {
|
6
6
|
contentText?: string;
|
7
7
|
appearance?: Exclude<IAppearance, 'classic' | 'ghost' | 'solid'>;
|
@@ -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, createContext, useContext, useMemo, } from 'react';
|
23
|
+
import React, { forwardRef, createContext, useContext, useMemo, } from 'react';
|
25
24
|
import { Callout as CalloutTheme } from '@radix-ui/themes';
|
26
25
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { cn } from '
|
28
|
-
import { appearanceStyle, radiusVariants, scalingVariants } from '
|
26
|
+
import { cn } from 'lib/utils/utils';
|
27
|
+
import { appearanceStyle, radiusVariants, scalingVariants } from 'lib/constants';
|
29
28
|
var calloutVariants = cva('flex w-fit max-w-[600px]', {
|
30
29
|
variants: {
|
31
30
|
radius: __assign({}, radiusVariants['large']),
|
@@ -67,6 +66,10 @@ export var CalloutRoot = forwardRef(function (_a, ref) {
|
|
67
66
|
};
|
68
67
|
var calloutClassName = cn(calloutVariants({ radius: radius, scaling: scaling, size: size, color: color }), appearanceStyle(appearance, colorMap[color], false), className);
|
69
68
|
var contextValue = useMemo(function () { return ({ size: size, scaling: scaling, color: color }); }, [size, scaling, color]);
|
70
|
-
return (
|
69
|
+
return (<CalloutContext.Provider value={contextValue}>
|
70
|
+
<CalloutTheme.Root ref={ref} {...props} className={calloutClassName}>
|
71
|
+
{children}
|
72
|
+
</CalloutTheme.Root>
|
73
|
+
</CalloutContext.Provider>);
|
71
74
|
});
|
72
75
|
CalloutRoot.displayName = 'Callout.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,10 +9,9 @@ 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 { cva } from 'class-variance-authority';
|
26
|
-
import { cn } from '
|
14
|
+
import { cn } from 'lib/utils/utils';
|
27
15
|
import { useCalloutContext } from './CalloutRoot';
|
28
16
|
export var calloutTextVariants = cva('break-words font-normal text-slate-12 dark:text-slateDark-12', {
|
29
17
|
variants: {
|
@@ -47,6 +35,8 @@ export var calloutTextVariants = cva('break-words font-normal text-slate-12 dark
|
|
47
35
|
export var CalloutText = forwardRef(function (_a, ref) {
|
48
36
|
var children = _a.children, className = _a.className, contentText = _a.contentText, props = __rest(_a, ["children", "className", "contentText"]);
|
49
37
|
var _b = useCalloutContext(), size = _b.size, color = _b.color;
|
50
|
-
return (
|
38
|
+
return (<p ref={ref} className={cn(calloutTextVariants({ size: size, color: color }), className)} {...props}>
|
39
|
+
{contentText !== null && contentText !== void 0 ? contentText : children}
|
40
|
+
</p>);
|
51
41
|
});
|
52
42
|
CalloutText.displayName = 'Callout.Text';
|
@@ -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 CardProps extends VariantProps<typeof cardVariants> {
|
5
5
|
appearance?: Exclude<IAppearance, 'solid' | 'outline'>;
|
6
6
|
}
|
@@ -20,11 +20,10 @@ 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
|
-
import { scalingVariants, weightVariants } from '
|
27
|
-
import { cn } from '
|
25
|
+
import { scalingVariants, weightVariants } from 'lib/constants';
|
26
|
+
import { cn } from 'lib/utils/utils';
|
28
27
|
var cardVariants = cva("border border-slate-6 flex items-center text-slate-12\n dark:border-slateDarkA-6 dark:text-slateDarkA-12\n ", {
|
29
28
|
variants: {
|
30
29
|
radius: {
|
@@ -58,7 +57,9 @@ var Card = forwardRef(function (_a, ref) {
|
|
58
57
|
if (appearance === 'ghost') {
|
59
58
|
appearanceClassName = 'border-transparent';
|
60
59
|
}
|
61
|
-
return (
|
60
|
+
return (<div className={cn(cardVariants({ radius: radius, scaling: scaling, size: size }), appearanceClassName, className)} ref={ref} {...props}>
|
61
|
+
{children}
|
62
|
+
</div>);
|
62
63
|
});
|
63
64
|
Card.displayName = 'Card';
|
64
65
|
export default Card;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
4
|
-
import { IAppearance, IColor } from '
|
4
|
+
import { IAppearance, IColor } from 'lib/types';
|
5
5
|
export interface CheckboxProps extends VariantProps<typeof CheckboxVariants> {
|
6
6
|
id: string;
|
7
7
|
color?: IColor;
|
@@ -20,14 +20,13 @@ 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 * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
27
26
|
import { CheckIcon, MinusIcon } from '@radix-ui/react-icons';
|
28
|
-
import { Label } from '
|
29
|
-
import { cn } from '
|
30
|
-
import { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from '
|
27
|
+
import { Label } from 'lib/components/Label';
|
28
|
+
import { cn } from 'lib/utils/utils';
|
29
|
+
import { checkboxAppearanceStyle, radiusVariants, scalingVariants, textColorStyle, } from 'lib/constants';
|
31
30
|
export var CheckboxVariants = cva("peer ring-offset-background", {
|
32
31
|
variants: {
|
33
32
|
size: {
|
@@ -83,7 +82,16 @@ var CheckboxLabelVariants = cva('', {
|
|
83
82
|
export var Checkbox = forwardRef(function (_a, ref) {
|
84
83
|
var id = _a.id, className = _a.className, children = _a.children, scaling = _a.scaling, radius = _a.radius, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'surface' : _c, _d = _a.indeterminate, indeterminate = _d === void 0 ? false : _d, props = __rest(_a, ["id", "className", "children", "scaling", "radius", "size", "color", "appearance", "indeterminate"]);
|
85
84
|
var checkboxClassName = cn(CheckboxVariants({ scaling: scaling, size: size, radius: radius }), checkboxAppearanceStyle(appearance, color, indeterminate), className);
|
86
|
-
return (
|
85
|
+
return (<div className="flex items-center">
|
86
|
+
<CheckboxPrimitive.Root id={id} ref={ref} className={checkboxClassName} {...props}>
|
87
|
+
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current stroke-[0.5px]')}>
|
88
|
+
{indeterminate ? (<MinusIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }), 'w-3')}/>) : (<CheckIcon className={cn(CheckboxIndicatorVariants({ scaling: scaling, size: size }))}/>)}
|
89
|
+
</CheckboxPrimitive.Indicator>
|
90
|
+
</CheckboxPrimitive.Root>
|
91
|
+
{children && (<Label className={cn(CheckboxLabelVariants({ scaling: scaling, size: size }), className)} htmlFor={id}>
|
92
|
+
{children}
|
93
|
+
</Label>)}
|
94
|
+
</div>);
|
87
95
|
});
|
88
96
|
Checkbox.displayName = 'Checkbox';
|
89
97
|
export default Checkbox;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IColor, IRadius, IScaling } from '
|
5
|
-
import { CheckboxVariants } from '
|
4
|
+
import { IColor, IRadius, IScaling } from 'lib/types';
|
5
|
+
import { CheckboxVariants } from 'lib/components/Checkbox';
|
6
6
|
export interface CheckboxCardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof CheckboxVariants> {
|
7
7
|
id: string;
|
8
8
|
scaling?: IScaling;
|