@wallarm-org/design-system 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/AlertClose.js +19 -21
- package/dist/components/Drawer/DrawerClose.js +0 -3
- package/dist/components/Drawer/DrawerResizeHandle.js +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +9 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +37 -3
- package/dist/components/DropdownMenu/DropdownMenuContent.d.ts +5 -5
- package/dist/components/DropdownMenu/DropdownMenuContent.js +24 -21
- package/dist/components/DropdownMenu/DropdownMenuContext.d.ts +6 -0
- package/dist/components/DropdownMenu/DropdownMenuContext.js +4 -0
- package/dist/components/DropdownMenu/DropdownMenuContextTrigger.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuContextTrigger.js +8 -0
- package/dist/components/DropdownMenu/DropdownMenuGroup.d.ts +5 -2
- package/dist/components/DropdownMenu/DropdownMenuGroup.js +8 -3
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts +5 -7
- package/dist/components/DropdownMenu/DropdownMenuItem.js +9 -2
- package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts +2 -4
- package/dist/components/DropdownMenu/DropdownMenuLabel.js +1 -2
- package/dist/components/DropdownMenu/DropdownMenuSeparator.d.ts +3 -4
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js +3 -3
- package/dist/components/DropdownMenu/DropdownMenuTrigger.d.ts +9 -2
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js +4 -3
- package/dist/components/DropdownMenu/DropdownMenuTriggerItem.d.ts +10 -0
- package/dist/components/DropdownMenu/{DropdownMenuSubTrigger.js → DropdownMenuTriggerItem.js} +4 -5
- package/dist/components/DropdownMenu/classes.js +4 -4
- package/dist/components/DropdownMenu/index.d.ts +6 -4
- package/dist/components/DropdownMenu/index.js +7 -5
- package/dist/components/Field/FieldLabel.d.ts +3 -3
- package/dist/components/Field/FieldLabel.js +3 -10
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +3 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -7
- package/dist/components/OverflowTooltip/OverflowTooltipContent.d.ts +1 -3
- package/dist/components/OverflowTooltip/OverflowTooltipContent.js +1 -2
- package/dist/components/ScrollArea/ScrollArea.d.ts +1 -2
- package/dist/components/ScrollArea/ScrollArea.js +5 -3
- package/dist/components/ScrollArea/ScrollAreaScrollbar.js +1 -1
- package/dist/components/ScrollArea/ScrollAreaViewport.js +2 -1
- package/dist/components/Separator/Separator.d.ts +4 -3
- package/dist/components/Separator/Separator.js +4 -4
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/components/Skeleton/Skeleton.js +42 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/SwitchLabel.d.ts +1 -1
- package/dist/components/Switch/SwitchLabel.js +2 -2
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/Table.js +22 -0
- package/dist/components/Table/TableActionBar/TableActionBar.d.ts +5 -0
- package/dist/components/Table/TableActionBar/TableActionBar.js +30 -0
- package/dist/components/Table/TableActionBar/TableActionBarAnchor.d.ts +6 -0
- package/dist/components/Table/TableActionBar/TableActionBarAnchor.js +23 -0
- package/dist/components/Table/TableActionBar/TableActionBarProvider.d.ts +6 -0
- package/dist/components/Table/TableActionBar/TableActionBarProvider.js +27 -0
- package/dist/components/Table/TableActionBar/TableActionBarSelection.d.ts +2 -0
- package/dist/components/Table/TableActionBar/TableActionBarSelection.js +54 -0
- package/dist/components/Table/TableActionBar/index.d.ts +3 -0
- package/dist/components/Table/TableActionBar/index.js +4 -0
- package/dist/components/Table/TableBody.d.ts +2 -0
- package/dist/components/Table/TableBody.js +23 -0
- package/dist/components/Table/TableBodyCell.d.ts +12 -0
- package/dist/components/Table/TableBodyCell.js +32 -0
- package/dist/components/Table/TableBodyVirtualized.d.ts +2 -0
- package/dist/components/Table/TableBodyVirtualized.js +60 -0
- package/dist/components/Table/TableColGroup.d.ts +16 -0
- package/dist/components/Table/TableColGroup.js +33 -0
- package/dist/components/Table/TableContext/TableContext.d.ts +2 -0
- package/dist/components/Table/TableContext/TableContext.js +3 -0
- package/dist/components/Table/TableContext/TableProvider.d.ts +2 -0
- package/dist/components/Table/TableContext/TableProvider.js +264 -0
- package/dist/components/Table/TableContext/index.d.ts +4 -0
- package/dist/components/Table/TableContext/index.js +4 -0
- package/dist/components/Table/TableContext/types.d.ts +30 -0
- package/dist/components/Table/TableContext/types.js +0 -0
- package/dist/components/Table/TableContext/useTableContext.d.ts +2 -0
- package/dist/components/Table/TableContext/useTableContext.js +8 -0
- package/dist/components/Table/TableEmptyState.d.ts +6 -0
- package/dist/components/Table/TableEmptyState.js +15 -0
- package/dist/components/Table/TableExpandedRow.d.ts +9 -0
- package/dist/components/Table/TableExpandedRow.js +28 -0
- package/dist/components/Table/TableHead.d.ts +2 -0
- package/dist/components/Table/TableHead.js +17 -0
- package/dist/components/Table/TableHeadCell.d.ts +9 -0
- package/dist/components/Table/TableHeadCell.js +90 -0
- package/dist/components/Table/TableHeadCellMenu.d.ts +9 -0
- package/dist/components/Table/TableHeadCellMenu.js +174 -0
- package/dist/components/Table/TableInner.d.ts +10 -0
- package/dist/components/Table/TableInner.js +91 -0
- package/dist/components/Table/TableLoadingState.d.ts +2 -0
- package/dist/components/Table/TableLoadingState.js +31 -0
- package/dist/components/Table/TableResizeHandler.d.ts +9 -0
- package/dist/components/Table/TableResizeHandler.js +13 -0
- package/dist/components/Table/TableRow.d.ts +12 -0
- package/dist/components/Table/TableRow.js +73 -0
- package/dist/components/Table/TableScrollHandler.d.ts +7 -0
- package/dist/components/Table/TableScrollHandler.js +80 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenu.d.ts +2 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenu.js +163 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuItem.d.ts +7 -0
- package/dist/components/Table/TableSettingsMenu/TableSettingsMenuItem.js +54 -0
- package/dist/components/Table/TableSettingsMenu/index.d.ts +1 -0
- package/dist/components/Table/TableSettingsMenu/index.js +2 -0
- package/dist/components/Table/TableSortHandler.d.ts +9 -0
- package/dist/components/Table/TableSortHandler.js +53 -0
- package/dist/components/Table/classes.d.ts +16 -0
- package/dist/components/Table/classes.js +69 -0
- package/dist/components/Table/hooks/index.d.ts +2 -0
- package/dist/components/Table/hooks/index.js +3 -0
- package/dist/components/Table/hooks/useHorizontalScrollState.d.ts +9 -0
- package/dist/components/Table/hooks/useHorizontalScrollState.js +38 -0
- package/dist/components/Table/hooks/useTableState.d.ts +1 -0
- package/dist/components/Table/hooks/useTableState.js +23 -0
- package/dist/components/Table/index.d.ts +7 -0
- package/dist/components/Table/index.js +6 -0
- package/dist/components/Table/lib/constants.d.ts +10 -0
- package/dist/components/Table/lib/constants.js +47 -0
- package/dist/components/Table/lib/createExpandColumn.d.ts +6 -0
- package/dist/components/Table/lib/createExpandColumn.js +45 -0
- package/dist/components/Table/lib/createSelectionColumn.d.ts +7 -0
- package/dist/components/Table/lib/createSelectionColumn.js +70 -0
- package/dist/components/Table/lib/createTableColumnHelper.d.ts +6 -0
- package/dist/components/Table/lib/createTableColumnHelper.js +13 -0
- package/dist/components/Table/lib/getDndStyles.d.ts +10 -0
- package/dist/components/Table/lib/getDndStyles.js +8 -0
- package/dist/components/Table/lib/getPinningStyles.d.ts +6 -0
- package/dist/components/Table/lib/getPinningStyles.js +10 -0
- package/dist/components/Table/lib/index.d.ts +8 -0
- package/dist/components/Table/lib/index.js +9 -0
- package/dist/components/Table/lib/isLastPinnedLeft.d.ts +9 -0
- package/dist/components/Table/lib/isLastPinnedLeft.js +6 -0
- package/dist/components/Table/lib/useColumnDnd.d.ts +14 -0
- package/dist/components/Table/lib/useColumnDnd.js +27 -0
- package/dist/components/Table/mocks.d.ts +47 -0
- package/dist/components/Table/mocks.js +860 -0
- package/dist/components/Table/primitives/TBody.d.ts +1 -0
- package/dist/components/Table/primitives/TBody.js +10 -0
- package/dist/components/Table/primitives/THead.d.ts +1 -0
- package/dist/components/Table/primitives/THead.js +10 -0
- package/dist/components/Table/primitives/Td.d.ts +7 -0
- package/dist/components/Table/primitives/Td.js +18 -0
- package/dist/components/Table/primitives/Th.d.ts +7 -0
- package/dist/components/Table/primitives/Th.js +18 -0
- package/dist/components/Table/primitives/Tr.d.ts +1 -0
- package/dist/components/Table/primitives/Tr.js +11 -0
- package/dist/components/Table/primitives/index.d.ts +5 -0
- package/dist/components/Table/primitives/index.js +6 -0
- package/dist/components/Table/types.d.ts +129 -0
- package/dist/components/Table/types.js +0 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +16 -2
- package/dist/components/Tooltip/Tooltip.figma.js +7 -10
- package/dist/components/Tooltip/Tooltip.js +29 -5
- package/dist/components/Tooltip/TooltipContent.d.ts +3 -3
- package/dist/components/Tooltip/TooltipContent.js +13 -12
- package/dist/components/Tooltip/TooltipTrigger.d.ts +7 -2
- package/dist/components/Tooltip/TooltipTrigger.js +3 -4
- package/dist/components/Tooltip/index.d.ts +1 -2
- package/dist/components/Tooltip/index.js +1 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/useIsKeyPressed.d.ts +1 -0
- package/dist/hooks/useIsKeyPressed.js +22 -0
- package/dist/icons/Bug.d.ts +3 -0
- package/dist/icons/Bug.js +98 -0
- package/dist/icons/EllipsisVertical.d.ts +3 -0
- package/dist/icons/EllipsisVertical.js +28 -0
- package/dist/icons/Eye.d.ts +3 -0
- package/dist/icons/Eye.js +28 -0
- package/dist/icons/EyeOff.d.ts +3 -0
- package/dist/icons/EyeOff.js +42 -0
- package/dist/icons/GripVertical.d.ts +3 -0
- package/dist/icons/GripVertical.js +51 -0
- package/dist/icons/MoveDown.d.ts +3 -0
- package/dist/icons/MoveDown.js +26 -0
- package/dist/icons/MoveUp.d.ts +3 -0
- package/dist/icons/MoveUp.js +26 -0
- package/dist/icons/MoveVertical.d.ts +3 -0
- package/dist/icons/MoveVertical.js +34 -0
- package/dist/icons/Pin.d.ts +3 -0
- package/dist/icons/Pin.js +26 -0
- package/dist/icons/PinOff.d.ts +3 -0
- package/dist/icons/PinOff.js +42 -0
- package/dist/icons/Settings.d.ts +3 -0
- package/dist/icons/Settings.js +26 -0
- package/dist/icons/Settings2.d.ts +3 -0
- package/dist/icons/Settings2.js +46 -0
- package/dist/icons/index.d.ts +12 -0
- package/dist/icons/index.js +13 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -3
- package/dist/metadata/components.json +852 -236
- package/dist/theme/semantic.css +2 -0
- package/package.json +6 -5
- package/dist/components/DropdownMenu/DropdownMenuPortal.d.ts +0 -3
- package/dist/components/DropdownMenu/DropdownMenuPortal.js +0 -7
- package/dist/components/DropdownMenu/DropdownMenuSub.d.ts +0 -3
- package/dist/components/DropdownMenu/DropdownMenuSub.js +0 -7
- package/dist/components/DropdownMenu/DropdownMenuSubContent.d.ts +0 -7
- package/dist/components/DropdownMenu/DropdownMenuSubContent.js +0 -14
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +0 -12
- package/dist/components/Label/Label.d.ts +0 -6
- package/dist/components/Label/Label.js +0 -10
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/Label/index.js +0 -2
- package/dist/components/Tooltip/TooltipProvider.d.ts +0 -3
- package/dist/components/Tooltip/TooltipProvider.js +0 -7
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { X } from "../../icons/index.js";
|
|
3
3
|
import { Button } from "../Button/index.js";
|
|
4
|
-
import { Tooltip, TooltipContent,
|
|
5
|
-
const AlertClose = ({ ref, onClick, ...props })=>/*#__PURE__*/
|
|
6
|
-
children:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
children: /*#__PURE__*/ jsx(X, {})
|
|
19
|
-
})
|
|
20
|
-
}),
|
|
21
|
-
/*#__PURE__*/ jsx(TooltipContent, {
|
|
22
|
-
children: "Close"
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip/index.js";
|
|
5
|
+
const AlertClose = ({ ref, onClick, ...props })=>/*#__PURE__*/ jsxs(Tooltip, {
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
8
|
+
asChild: true,
|
|
9
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
10
|
+
...props,
|
|
11
|
+
ref: ref,
|
|
12
|
+
variant: "ghost",
|
|
13
|
+
color: "neutral",
|
|
14
|
+
size: "small",
|
|
15
|
+
"aria-label": "close",
|
|
16
|
+
onClick: onClick,
|
|
17
|
+
children: /*#__PURE__*/ jsx(X, {})
|
|
23
18
|
})
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ jsx(TooltipContent, {
|
|
21
|
+
children: "Close"
|
|
22
|
+
})
|
|
23
|
+
]
|
|
26
24
|
});
|
|
27
25
|
AlertClose.displayName = 'AlertClose';
|
|
28
26
|
export { AlertClose };
|
|
@@ -16,7 +16,6 @@ const DrawerClose = ({ children, asChild = false, ref })=>{
|
|
|
16
16
|
children: children
|
|
17
17
|
});
|
|
18
18
|
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
19
|
-
delayDuration: 300,
|
|
20
19
|
children: [
|
|
21
20
|
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
22
21
|
asChild: true,
|
|
@@ -34,8 +33,6 @@ const DrawerClose = ({ children, asChild = false, ref })=>{
|
|
|
34
33
|
})
|
|
35
34
|
}),
|
|
36
35
|
/*#__PURE__*/ jsxs(TooltipContent, {
|
|
37
|
-
side: "bottom",
|
|
38
|
-
sideOffset: 4,
|
|
39
36
|
children: [
|
|
40
37
|
"Close ",
|
|
41
38
|
closeOnEscape && /*#__PURE__*/ jsx(Kbd, {
|
|
@@ -66,6 +66,9 @@ const DrawerResizeHandle = ({ ref })=>{
|
|
|
66
66
|
]);
|
|
67
67
|
const barIsVisible = isHovered || isDragging;
|
|
68
68
|
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
69
|
+
positioning: {
|
|
70
|
+
placement: 'left'
|
|
71
|
+
},
|
|
69
72
|
open: isHovered && !isDragging,
|
|
70
73
|
children: [
|
|
71
74
|
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
@@ -78,7 +81,6 @@ const DrawerResizeHandle = ({ ref })=>{
|
|
|
78
81
|
onMouseDown: handleMouseDown
|
|
79
82
|
}),
|
|
80
83
|
/*#__PURE__*/ jsx(TooltipContent, {
|
|
81
|
-
side: "left",
|
|
82
84
|
children: "Drag to resize"
|
|
83
85
|
})
|
|
84
86
|
]
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
interface DropdownMenuProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
modal?: boolean;
|
|
8
|
+
}
|
|
3
9
|
export declare const DropdownMenu: FC<DropdownMenuProps>;
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
4
|
+
import { DropdownMenuContext, useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
5
|
+
const ROOT_POSITIONING = {
|
|
6
|
+
placement: 'bottom-start',
|
|
7
|
+
gutter: 4,
|
|
8
|
+
overflowPadding: 4
|
|
9
|
+
};
|
|
10
|
+
const SUB_POSITIONING = {
|
|
11
|
+
placement: 'right-start',
|
|
12
|
+
gutter: 4,
|
|
13
|
+
offset: {
|
|
14
|
+
crossAxis: -9
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const DropdownMenu = ({ children, open, defaultOpen, onOpenChange, ...props })=>{
|
|
18
|
+
const parent = useDropdownMenuContext();
|
|
19
|
+
const isNested = null !== parent;
|
|
20
|
+
const handleOpenChange = (details)=>{
|
|
21
|
+
onOpenChange?.(details.open);
|
|
22
|
+
};
|
|
23
|
+
const ctx = useMemo(()=>({
|
|
24
|
+
isNested: true
|
|
25
|
+
}), []);
|
|
26
|
+
return /*#__PURE__*/ jsx(DropdownMenuContext, {
|
|
27
|
+
value: ctx,
|
|
28
|
+
children: /*#__PURE__*/ jsx(Menu.Root, {
|
|
29
|
+
...props,
|
|
30
|
+
positioning: isNested ? SUB_POSITIONING : ROOT_POSITIONING,
|
|
31
|
+
open: open,
|
|
32
|
+
defaultOpen: defaultOpen,
|
|
33
|
+
onOpenChange: handleOpenChange,
|
|
34
|
+
lazyMount: true,
|
|
35
|
+
unmountOnExit: true,
|
|
36
|
+
children: children
|
|
37
|
+
})
|
|
5
38
|
});
|
|
39
|
+
};
|
|
6
40
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
7
41
|
export { DropdownMenu };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ref?: Ref<
|
|
5
|
-
}
|
|
1
|
+
import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
interface DropdownMenuContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
ref?: Ref<HTMLDivElement>;
|
|
5
|
+
}
|
|
6
6
|
export declare const DropdownMenuContent: FC<DropdownMenuContentProps>;
|
|
7
7
|
export {};
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
|
+
import { Portal } from "@ark-ui/react/portal";
|
|
3
4
|
import { cn } from "../../utils/cn.js";
|
|
4
5
|
import { ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaViewport } from "../ScrollArea/index.js";
|
|
5
6
|
import { dropdownMenuClassNames } from "./classes.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
const DropdownMenuContent = ({ className, children, ref, ...props })=>/*#__PURE__*/ jsx(Portal, {
|
|
8
|
+
children: /*#__PURE__*/ jsx(Menu.Positioner, {
|
|
9
|
+
children: /*#__PURE__*/ jsx(Menu.Content, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: cn(dropdownMenuClassNames, 'max-h-(--available-height)', 'origin-[--transform-origin]', className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /*#__PURE__*/ jsxs(ScrollArea, {
|
|
14
|
+
className: cn('flex flex-col min-h-0'),
|
|
15
|
+
style: {
|
|
16
|
+
position: 'static'
|
|
17
|
+
},
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsx(ScrollAreaViewport, {
|
|
20
|
+
children: /*#__PURE__*/ jsx(ScrollAreaContent, {
|
|
21
|
+
className: cn('flex flex-col gap-1'),
|
|
22
|
+
children: children
|
|
23
|
+
})
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsx(ScrollAreaScrollbar, {}),
|
|
26
|
+
/*#__PURE__*/ jsx(ScrollAreaCorner, {})
|
|
27
|
+
]
|
|
28
|
+
})
|
|
26
29
|
})
|
|
27
30
|
})
|
|
28
31
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { DropdownMenuItemVariantsProps } from './DropdownMenuItem';
|
|
3
|
+
interface DropdownMenuContextTriggerProps extends HTMLAttributes<HTMLButtonElement>, DropdownMenuItemVariantsProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
inset?: boolean;
|
|
7
|
+
ref?: Ref<HTMLButtonElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const DropdownMenuContextTrigger: FC<DropdownMenuContextTriggerProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
|
+
const DropdownMenuContextTrigger = ({ variant = 'default', inset = false, children, ...props })=>/*#__PURE__*/ jsx(Menu.ContextTrigger, {
|
|
4
|
+
...props,
|
|
5
|
+
children: children
|
|
6
|
+
});
|
|
7
|
+
DropdownMenuContextTrigger.displayName = 'DropdownMenuContextTrigger';
|
|
8
|
+
export { DropdownMenuContextTrigger };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type FC, type HTMLAttributes, type Ref } from 'react';
|
|
2
|
+
type DropdownMenuGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
ref?: Ref<HTMLDivElement>;
|
|
4
|
+
};
|
|
3
5
|
export declare const DropdownMenuGroup: FC<DropdownMenuGroupProps>;
|
|
6
|
+
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
4
|
+
const DropdownMenuGroup = (props)=>{
|
|
5
|
+
const id = useId();
|
|
6
|
+
return /*#__PURE__*/ jsx(Menu.ItemGroup, {
|
|
7
|
+
...props,
|
|
8
|
+
id: id
|
|
5
9
|
});
|
|
10
|
+
};
|
|
6
11
|
DropdownMenuGroup.displayName = 'DropdownMenuGroup';
|
|
7
12
|
export { DropdownMenuGroup };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Item } from '@radix-ui/react-dropdown-menu';
|
|
1
|
+
import { type FC, type HTMLAttributes, type Ref } from 'react';
|
|
3
2
|
import type { VariantProps } from 'class-variance-authority';
|
|
4
3
|
import { dropdownMenuItemVariants } from './classes';
|
|
5
|
-
type DropdownMenuItemNativeProps = ComponentPropsWithoutRef<typeof Item>;
|
|
6
4
|
export type DropdownMenuItemVariantsProps = VariantProps<typeof dropdownMenuItemVariants>;
|
|
7
|
-
export interface
|
|
5
|
+
export interface DropdownMenuItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'id'>, DropdownMenuItemVariantsProps {
|
|
8
6
|
inset?: boolean;
|
|
9
|
-
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onSelect?: () => void;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
|
-
type DropdownMenuItemProps = DropdownMenuItemNativeProps & DropdownMenuItemVariantsProps & DropdownMenuItemBaseProps;
|
|
12
11
|
export declare const DropdownMenuItem: FC<DropdownMenuItemProps>;
|
|
13
|
-
export {};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
4
|
import { cn } from "../../utils/cn.js";
|
|
4
5
|
import { dropdownMenuItemVariants } from "./classes.js";
|
|
5
|
-
const DropdownMenuItem = ({ inset = false, variant = 'default', ...props })
|
|
6
|
+
const DropdownMenuItem = ({ inset = false, variant = 'default', onSelect, disabled, ...props })=>{
|
|
7
|
+
const id = useId();
|
|
8
|
+
return /*#__PURE__*/ jsx(Menu.Item, {
|
|
6
9
|
...props,
|
|
10
|
+
value: id,
|
|
11
|
+
disabled: disabled,
|
|
12
|
+
onSelect: onSelect,
|
|
7
13
|
className: cn(dropdownMenuItemVariants({
|
|
8
14
|
variant,
|
|
9
15
|
inset
|
|
10
16
|
}))
|
|
11
17
|
});
|
|
18
|
+
};
|
|
12
19
|
DropdownMenuItem.displayName = 'DropdownMenuItem';
|
|
13
20
|
export { DropdownMenuItem };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { Label } from '@radix-ui/react-dropdown-menu';
|
|
1
|
+
import type { FC, HTMLAttributes, Ref } from 'react';
|
|
3
2
|
import type { VariantProps } from 'class-variance-authority';
|
|
4
3
|
import { dropdownMenuLabelVariants } from './classes';
|
|
5
|
-
type DropdownMenuLabelNativeProps = ComponentPropsWithoutRef<typeof Label>;
|
|
6
4
|
type DropdownMenuLabelVariantsProps = VariantProps<typeof dropdownMenuLabelVariants>;
|
|
7
|
-
export type DropdownMenuLabelProps =
|
|
5
|
+
export type DropdownMenuLabelProps = HTMLAttributes<HTMLDivElement> & DropdownMenuLabelVariantsProps & {
|
|
8
6
|
ref?: Ref<HTMLDivElement>;
|
|
9
7
|
};
|
|
10
8
|
export declare const DropdownMenuLabel: FC<DropdownMenuLabelProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Label } from "@radix-ui/react-dropdown-menu";
|
|
3
2
|
import { cn } from "../../utils/cn.js";
|
|
4
3
|
import { dropdownMenuLabelVariants } from "./classes.js";
|
|
5
|
-
const DropdownMenuLabel = ({ className, inset, ...props })=>/*#__PURE__*/ jsx(
|
|
4
|
+
const DropdownMenuLabel = ({ className, inset, ...props })=>/*#__PURE__*/ jsx("div", {
|
|
6
5
|
className: cn(dropdownMenuLabelVariants({
|
|
7
6
|
inset
|
|
8
7
|
}), className),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ref?: Ref<HTMLDivElement>;
|
|
1
|
+
import type { FC, HTMLAttributes, Ref } from 'react';
|
|
2
|
+
export type DropdownMenuSeparatorProps = HTMLAttributes<HTMLHRElement> & {
|
|
3
|
+
ref?: Ref<HTMLHRElement>;
|
|
5
4
|
};
|
|
6
5
|
export declare const DropdownMenuSeparator: FC<DropdownMenuSeparatorProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
|
-
const DropdownMenuSeparator = ({ className, ...props })=>/*#__PURE__*/ jsx(Separator, {
|
|
5
|
-
className: cn('mx-8 my-4 h-px bg-border-primary', className),
|
|
4
|
+
const DropdownMenuSeparator = ({ className, ...props })=>/*#__PURE__*/ jsx(Menu.Separator, {
|
|
5
|
+
className: cn('mx-8 my-4 h-px bg-border-primary border-none', className),
|
|
6
6
|
...props
|
|
7
7
|
});
|
|
8
8
|
DropdownMenuSeparator.displayName = 'DropdownMenuSeparator';
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { DropdownMenuItemVariantsProps } from './DropdownMenuItem';
|
|
3
|
+
interface DropdownMenuTriggerProps extends HTMLAttributes<HTMLButtonElement>, DropdownMenuItemVariantsProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
inset?: boolean;
|
|
7
|
+
ref?: Ref<HTMLButtonElement>;
|
|
8
|
+
}
|
|
3
9
|
export declare const DropdownMenuTrigger: FC<DropdownMenuTriggerProps>;
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const DropdownMenuTrigger = (props)=>/*#__PURE__*/ jsx(Trigger, {
|
|
4
|
-
...props
|
|
2
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
|
+
const DropdownMenuTrigger = ({ variant = 'default', inset = false, children, ...props })=>/*#__PURE__*/ jsx(Menu.Trigger, {
|
|
4
|
+
...props,
|
|
5
|
+
children: children
|
|
5
6
|
});
|
|
6
7
|
DropdownMenuTrigger.displayName = 'DropdownMenuTrigger';
|
|
7
8
|
export { DropdownMenuTrigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { DropdownMenuItemVariantsProps } from './DropdownMenuItem';
|
|
3
|
+
interface DropdownMenuTriggerProps extends HTMLAttributes<HTMLButtonElement>, DropdownMenuItemVariantsProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
inset?: boolean;
|
|
7
|
+
ref?: Ref<HTMLButtonElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const DropdownMenuTriggerItem: FC<DropdownMenuTriggerProps>;
|
|
10
|
+
export {};
|
package/dist/components/DropdownMenu/{DropdownMenuSubTrigger.js → DropdownMenuTriggerItem.js}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
3
|
import { ChevronRight } from "../../icons/index.js";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
5
|
import { dropdownMenuItemVariants } from "./classes.js";
|
|
6
|
-
const
|
|
7
|
-
...props,
|
|
6
|
+
const DropdownMenuTriggerItem = ({ variant = 'default', inset = false, children })=>/*#__PURE__*/ jsxs(Menu.TriggerItem, {
|
|
8
7
|
className: cn(dropdownMenuItemVariants({
|
|
9
8
|
variant,
|
|
10
9
|
inset
|
|
@@ -17,5 +16,5 @@ const DropdownMenuSubTrigger = ({ inset = false, variant = 'default', children,
|
|
|
17
16
|
})
|
|
18
17
|
]
|
|
19
18
|
});
|
|
20
|
-
|
|
21
|
-
export {
|
|
19
|
+
DropdownMenuTriggerItem.displayName = 'DropdownMenuTriggerItem';
|
|
20
|
+
export { DropdownMenuTriggerItem };
|
|
@@ -4,14 +4,14 @@ const dropdownMenuClassNames = cn('flex flex-col gap-1 min-w-128', 'z-50 overflo
|
|
|
4
4
|
const dropdownMenuItemVariants = cva([
|
|
5
5
|
'flex items-center gap-8 rounded-6 px-8 py-6 text-sm',
|
|
6
6
|
'relative cursor-pointer select-none outline-none transition-colors',
|
|
7
|
-
'data-
|
|
7
|
+
'data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
8
8
|
'[&_svg]:pointer-events-none [&_svg]:icon-md [&>svg]:icon-md [&>svg]:shrink-0'
|
|
9
9
|
], {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: cn('text-text-primary', 'not-data-disabled:hover:bg-states-primary-hover', 'not-data-disabled:focus:bg-states-primary-hover', 'not-data-disabled:active:bg-states-primary-pressed', 'not-data-disabled:data-[state=open]:bg-states-primary-hover'),
|
|
13
|
-
brand: cn('text-text-brand', 'not-data-disabled:hover:bg-states-brand-hover', 'not-data-disabled:focus:bg-states-brand-hover', 'not-data-disabled:active:bg-states-brand-pressed', 'not-data-disabled:data-[state=open]:bg-states-brand-hover'),
|
|
14
|
-
destructive: cn('text-text-danger', 'not-data-disabled:hover:bg-states-danger-hover', 'not-data-disabled:focus:bg-states-danger-hover', 'not-data-disabled:active:bg-states-danger-pressed', 'not-data-disabled:data-[state=open]:bg-states-danger-hover')
|
|
12
|
+
default: cn('text-text-primary', 'not-data-disabled:hover:bg-states-primary-hover', 'not-data-disabled:focus:bg-states-primary-hover', 'not-data-disabled:data-highlighted:bg-states-primary-hover', 'not-data-disabled:active:bg-states-primary-pressed', 'not-data-disabled:data-[state=open]:bg-states-primary-hover'),
|
|
13
|
+
brand: cn('text-text-brand', 'not-data-disabled:hover:bg-states-brand-hover', 'not-data-disabled:focus:bg-states-brand-hover', 'not-data-disabled:data-highlighted:bg-states-brand-hover', 'not-data-disabled:active:bg-states-brand-pressed', 'not-data-disabled:data-[state=open]:bg-states-brand-hover'),
|
|
14
|
+
destructive: cn('text-text-danger', 'not-data-disabled:hover:bg-states-danger-hover', 'not-data-disabled:focus:bg-states-danger-hover', 'not-data-disabled:data-highlighted:bg-states-danger-hover', 'not-data-disabled:active:bg-states-danger-pressed', 'not-data-disabled:data-[state=open]:bg-states-danger-hover')
|
|
15
15
|
},
|
|
16
16
|
inset: {
|
|
17
17
|
true: 'pl-32'
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export { dropdownMenuClassNames, dropdownMenuItemVariants, dropdownMenuLabelVariants, } from './classes';
|
|
2
2
|
export { DropdownMenu } from './DropdownMenu';
|
|
3
3
|
export { DropdownMenuContent } from './DropdownMenuContent';
|
|
4
|
+
export { DropdownMenuContextTrigger } from './DropdownMenuContextTrigger';
|
|
4
5
|
export { DropdownMenuGroup } from './DropdownMenuGroup';
|
|
5
6
|
export { DropdownMenuItem } from './DropdownMenuItem';
|
|
7
|
+
export { DropdownMenuItemContent } from './DropdownMenuItemContent';
|
|
8
|
+
export { DropdownMenuItemDescription } from './DropdownMenuItemDescription';
|
|
9
|
+
export { DropdownMenuItemIcon } from './DropdownMenuItemIcon';
|
|
10
|
+
export { DropdownMenuItemText } from './DropdownMenuItemText';
|
|
6
11
|
export { DropdownMenuLabel } from './DropdownMenuLabel';
|
|
7
|
-
export { DropdownMenuPortal } from './DropdownMenuPortal';
|
|
8
12
|
export { DropdownMenuSeparator } from './DropdownMenuSeparator';
|
|
9
13
|
export { DropdownMenuShortcut } from './DropdownMenuShortcut';
|
|
10
|
-
export { DropdownMenuSub } from './DropdownMenuSub';
|
|
11
|
-
export { DropdownMenuSubContent } from './DropdownMenuSubContent';
|
|
12
|
-
export { DropdownMenuSubTrigger } from './DropdownMenuSubTrigger';
|
|
13
14
|
export { DropdownMenuTrigger } from './DropdownMenuTrigger';
|
|
15
|
+
export { DropdownMenuTriggerItem } from './DropdownMenuTriggerItem';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { dropdownMenuClassNames, dropdownMenuItemVariants, dropdownMenuLabelVariants } from "./classes.js";
|
|
2
2
|
import { DropdownMenu } from "./DropdownMenu.js";
|
|
3
3
|
import { DropdownMenuContent } from "./DropdownMenuContent.js";
|
|
4
|
+
import { DropdownMenuContextTrigger } from "./DropdownMenuContextTrigger.js";
|
|
4
5
|
import { DropdownMenuGroup } from "./DropdownMenuGroup.js";
|
|
5
6
|
import { DropdownMenuItem } from "./DropdownMenuItem.js";
|
|
7
|
+
import { DropdownMenuItemContent } from "./DropdownMenuItemContent.js";
|
|
8
|
+
import { DropdownMenuItemDescription } from "./DropdownMenuItemDescription.js";
|
|
9
|
+
import { DropdownMenuItemIcon } from "./DropdownMenuItemIcon.js";
|
|
10
|
+
import { DropdownMenuItemText } from "./DropdownMenuItemText.js";
|
|
6
11
|
import { DropdownMenuLabel } from "./DropdownMenuLabel.js";
|
|
7
|
-
import { DropdownMenuPortal } from "./DropdownMenuPortal.js";
|
|
8
12
|
import { DropdownMenuSeparator } from "./DropdownMenuSeparator.js";
|
|
9
13
|
import { DropdownMenuShortcut } from "./DropdownMenuShortcut.js";
|
|
10
|
-
import { DropdownMenuSub } from "./DropdownMenuSub.js";
|
|
11
|
-
import { DropdownMenuSubContent } from "./DropdownMenuSubContent.js";
|
|
12
|
-
import { DropdownMenuSubTrigger } from "./DropdownMenuSubTrigger.js";
|
|
13
14
|
import { DropdownMenuTrigger } from "./DropdownMenuTrigger.js";
|
|
14
|
-
|
|
15
|
+
import { DropdownMenuTriggerItem } from "./DropdownMenuTriggerItem.js";
|
|
16
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuContextTrigger, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DropdownMenuTriggerItem, dropdownMenuClassNames, dropdownMenuItemVariants, dropdownMenuLabelVariants };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
type LabelProps =
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { Field as ArkUiField } from '@ark-ui/react/field';
|
|
3
|
+
type LabelProps = ArkUiField.LabelProps;
|
|
4
4
|
export declare const FieldLabel: FC<LabelProps>;
|
|
5
5
|
export {};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { mergeProps } from "@ark-ui/react/utils";
|
|
2
|
+
import { Field } from "@ark-ui/react/field";
|
|
4
3
|
import { cn } from "../../utils/cn.js";
|
|
5
|
-
|
|
6
|
-
const FieldLabel = (props)=>{
|
|
7
|
-
const field = useFieldContext();
|
|
8
|
-
const mergedProps = mergeProps(field?.getLabelProps(), props);
|
|
9
|
-
return /*#__PURE__*/ jsx(Label, {
|
|
4
|
+
const FieldLabel = (props)=>/*#__PURE__*/ jsx(Field.Label, {
|
|
10
5
|
...props,
|
|
11
|
-
...mergedProps,
|
|
12
6
|
"data-slot": "field-label",
|
|
13
|
-
className: cn('group/field-label
|
|
7
|
+
className: cn('group/field-label flex w-fit gap-4 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50', 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:rounded-8 has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4')
|
|
14
8
|
});
|
|
15
|
-
};
|
|
16
9
|
FieldLabel.displayName = 'FieldLabel';
|
|
17
10
|
export { FieldLabel };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { TooltipProps } from '../Tooltip/Tooltip';
|
|
2
3
|
export interface OverflowTooltipProps {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
forceTooltip?: boolean;
|
|
6
|
+
positioning?: TooltipProps['positioning'];
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* Root component for OverflowTooltip.
|
|
8
10
|
* Automatically detects overflow in child elements.
|
|
9
11
|
*/
|
|
10
12
|
export declare const OverflowTooltip: {
|
|
11
|
-
({ children, forceTooltip }: OverflowTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
({ children, forceTooltip, positioning, }: OverflowTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
displayName: string;
|
|
13
15
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { Tooltip
|
|
3
|
+
import { Tooltip } from "../Tooltip/index.js";
|
|
4
4
|
import { OverflowTooltipContext } from "./OverflowTooltipContext.js";
|
|
5
|
-
const OverflowTooltip = ({ children, forceTooltip = false })=>{
|
|
5
|
+
const OverflowTooltip = ({ children, forceTooltip = false, positioning })=>{
|
|
6
6
|
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
7
7
|
const shouldShowTooltip = isOverflowing || forceTooltip;
|
|
8
8
|
return /*#__PURE__*/ jsx(OverflowTooltipContext.Provider, {
|
|
@@ -11,11 +11,10 @@ const OverflowTooltip = ({ children, forceTooltip = false })=>{
|
|
|
11
11
|
setIsOverflowing,
|
|
12
12
|
forceTooltip
|
|
13
13
|
},
|
|
14
|
-
children: /*#__PURE__*/ jsx(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
14
|
+
children: /*#__PURE__*/ jsx(Tooltip, {
|
|
15
|
+
open: shouldShowTooltip ? void 0 : false,
|
|
16
|
+
positioning: positioning,
|
|
17
|
+
children: children
|
|
19
18
|
})
|
|
20
19
|
});
|
|
21
20
|
};
|
|
@@ -2,14 +2,12 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export interface OverflowTooltipContentProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
6
5
|
maxWidth?: number;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
8
|
* Content component for the overflow tooltip.
|
|
10
|
-
* Wraps the TooltipContent from Radix UI.
|
|
11
9
|
*/
|
|
12
10
|
export declare const OverflowTooltipContent: {
|
|
13
|
-
({ children, className,
|
|
11
|
+
({ children, className, maxWidth, }: OverflowTooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
12
|
displayName: string;
|
|
15
13
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { TooltipContent } from "../Tooltip/index.js";
|
|
4
|
-
const OverflowTooltipContent = ({ children, className,
|
|
5
|
-
side: side,
|
|
4
|
+
const OverflowTooltipContent = ({ children, className, maxWidth = 400 })=>/*#__PURE__*/ jsx(TooltipContent, {
|
|
6
5
|
className: cn('whitespace-normal wrap-break-word', className),
|
|
7
6
|
style: {
|
|
8
7
|
maxWidth
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
1
|
import { ScrollArea as ArkUiScrollArea } from '@ark-ui/react/scroll-area';
|
|
3
2
|
export type ScrollAreaProps = ArkUiScrollArea.RootProps;
|
|
4
|
-
export declare const ScrollArea:
|
|
3
|
+
export declare const ScrollArea: import("react").ForwardRefExoticComponent<ArkUiScrollArea.RootProps & import("react").RefAttributes<HTMLDivElement>>;
|