@sqlrooms/schema-tree 0.28.0 → 0.29.0-rc.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.
|
@@ -15,7 +15,7 @@ import { forwardRef, } from 'react';
|
|
|
15
15
|
*/
|
|
16
16
|
export const TreeNodeActionsMenu = (props) => {
|
|
17
17
|
const { children } = props;
|
|
18
|
-
return (_jsx("div", { className: "absolute top-px right-0 h-full opacity-0 outline-hidden group-hover:opacity-100", children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("div", { className: "bg-muted text-muted-foreground hover:text-foreground flex h-full w-7 items-center justify-center p-0 outline-hidden transition-colors", children: _jsx(EllipsisVerticalIcon, { size: "15px", className: "relative top-
|
|
18
|
+
return (_jsx("div", { className: "absolute top-px right-0 h-full opacity-0 outline-hidden group-hover:opacity-100", children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("div", { className: "bg-muted text-muted-foreground hover:text-foreground flex h-full w-7 items-center justify-center p-0 outline-hidden transition-colors", children: _jsx(EllipsisVerticalIcon, { size: "15px", className: "relative -top-px" }) }) }), _jsx(DropdownMenuContent, { align: "start", side: "bottom", children: children })] }) }));
|
|
19
19
|
};
|
|
20
20
|
export const TreeNodeActionsMenuItem = forwardRef(({ className, ...props }, ref) => {
|
|
21
21
|
const { onClick } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeActionsMenu.js","sourceRoot":"","sources":["../../src/nodes/TreeNodeActionsMenu.tsx"],"names":[],"mappings":";AAAA,4DAA4D;AAE5D,OAAO,EACL,EAAE,EACF,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAIL,UAAU,GAEX,MAAM,OAAO,CAAC;AAMf;;;;;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C/B,MAAM,EAAC,OAAO,EAAC,GAAG,KAAK,CAAC;IACxB,OAAO,CACL,KAAC,gBAAgB,IACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,KACrC,KAAK,EACT,OAAO,EACL,OAAO;YACL,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;gBACN,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,qCAAqC;gBAC5D,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;YACH,CAAC,CAAC,SAAS,GAEf,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,uBAAuB,CAAC,WAAW,GAAG,yBAAyB,CAAC","sourcesContent":["// Copyright 2022 Foursquare Labs, Inc. All Rights Reserved.\n\nimport {\n cn,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@sqlrooms/ui';\nimport {EllipsisVerticalIcon} from 'lucide-react';\nimport {\n ComponentPropsWithoutRef,\n ElementRef,\n FC,\n forwardRef,\n PropsWithChildren,\n} from 'react';\n\nexport type TreeNodeActionsMenuProps = PropsWithChildren<{\n className?: string;\n}>;\n\n/**\n * Component that renders a tree node \"more actions\" menu.\n * The menu items are passed as children.\n *\n * The menu is hidden by default and is shown when the user hovers over the node.\n * For this to work the parent element must have the `group` class.\n * It should also have classes `relative overflow-hidden`.\n *\n * @param children - The menu items.\n */\nexport const TreeNodeActionsMenu: FC<TreeNodeActionsMenuProps> = (props) => {\n const {children} = props;\n return (\n <div className=\"absolute top-px right-0 h-full opacity-0 outline-hidden group-hover:opacity-100\">\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <div className=\"bg-muted text-muted-foreground hover:text-foreground flex h-full w-7 items-center justify-center p-0 outline-hidden transition-colors\">\n <EllipsisVerticalIcon size=\"15px\" className=\"relative -top-px\" />\n </div>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" side=\"bottom\">\n {children}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n};\n\nexport const TreeNodeActionsMenuItem = forwardRef<\n ElementRef<typeof DropdownMenuItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuItem>\n>(({className, ...props}, ref) => {\n const {onClick} = props;\n return (\n <DropdownMenuItem\n ref={ref}\n className={cn('gap-2 text-xs', className)}\n {...props}\n onClick={\n onClick\n ? (evt) => {\n evt.stopPropagation(); // prevent the tree node from closing\n onClick(evt);\n }\n : undefined\n }\n />\n );\n});\nTreeNodeActionsMenuItem.displayName = 'TreeNodeActionsMenuItem';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqlrooms/schema-tree",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0-rc.0",
|
|
4
4
|
"author": "SQLRooms Contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"typedoc": "typedoc"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sqlrooms/data-table": "0.
|
|
29
|
-
"@sqlrooms/duckdb": "0.
|
|
30
|
-
"@sqlrooms/ui": "0.
|
|
31
|
-
"@sqlrooms/utils": "0.
|
|
28
|
+
"@sqlrooms/data-table": "0.29.0-rc.0",
|
|
29
|
+
"@sqlrooms/duckdb": "0.29.0-rc.0",
|
|
30
|
+
"@sqlrooms/ui": "0.29.0-rc.0",
|
|
31
|
+
"@sqlrooms/utils": "0.29.0-rc.0",
|
|
32
32
|
"lucide-react": "^0.556.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@types/react": "^19.1.13",
|
|
40
40
|
"@types/react-dom": "^19.1.9"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "afdb949c9601b4cdeaae966157a25a54aea2ae54"
|
|
43
43
|
}
|