@neo4j-ndl/react 3.3.23 → 3.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/lib/cjs/code/Code.js +2 -2
- package/lib/cjs/code/Code.js.map +1 -1
- package/lib/cjs/{_common → conditional-wrap}/ConditionalWrap.js +0 -1
- package/lib/cjs/conditional-wrap/ConditionalWrap.js.map +1 -0
- package/lib/cjs/conditional-wrap/index.js +38 -0
- package/lib/cjs/conditional-wrap/index.js.map +1 -0
- package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js +32 -0
- package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -0
- package/lib/cjs/{_common/coditionalWrap.js → conditional-wrap/stories/conditional-wrap.stories.js} +21 -8
- package/lib/cjs/conditional-wrap/stories/conditional-wrap.stories.js.map +1 -0
- package/lib/cjs/conditional-wrap/stories/index.js +31 -0
- package/lib/cjs/conditional-wrap/stories/index.js.map +1 -0
- package/lib/cjs/context-menu/ContextMenu.js +2 -2
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +3 -6
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/graph-label/GraphLabel.js +26 -10
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/skeleton/Skeleton.js +2 -2
- package/lib/cjs/skeleton/Skeleton.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightTarget.js +2 -2
- package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +3 -3
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +2 -2
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/code/Code.js +1 -1
- package/lib/esm/code/Code.js.map +1 -1
- package/lib/esm/{_common → conditional-wrap}/ConditionalWrap.js +0 -1
- package/lib/esm/conditional-wrap/ConditionalWrap.js.map +1 -0
- package/lib/{types/_common/coditionalWrap.d.ts → esm/conditional-wrap/index.js} +2 -7
- package/lib/esm/conditional-wrap/index.js.map +1 -0
- package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js +30 -0
- package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -0
- package/lib/esm/conditional-wrap/stories/conditional-wrap.stories.js +40 -0
- package/lib/esm/conditional-wrap/stories/conditional-wrap.stories.js.map +1 -0
- package/lib/esm/{_common/coditionalWrap.js → conditional-wrap/stories/index.js} +4 -6
- package/lib/esm/conditional-wrap/stories/index.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +1 -1
- package/lib/esm/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +1 -1
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/graph-label/GraphLabel.js +26 -10
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/skeleton/Skeleton.js +1 -1
- package/lib/esm/skeleton/Skeleton.js.map +1 -1
- package/lib/esm/spotlight/SpotlightTarget.js +1 -1
- package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js +1 -1
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +2 -2
- package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/types/{_common → conditional-wrap}/ConditionalWrap.d.ts +7 -6
- package/lib/types/conditional-wrap/index.d.ts +21 -0
- package/lib/types/conditional-wrap/stories/conditional-wrap-default.story.d.ts +22 -0
- package/lib/types/conditional-wrap/stories/conditional-wrap.stories.d.ts +32 -0
- package/lib/types/conditional-wrap/stories/index.d.ts +22 -0
- package/lib/types/graph-label/GraphLabel.d.ts +3 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +2 -2
- package/lib/cjs/_common/ConditionalWrap.js.map +0 -1
- package/lib/cjs/_common/coditionalWrap.js.map +0 -1
- package/lib/esm/_common/ConditionalWrap.js.map +0 -1
- package/lib/esm/_common/coditionalWrap.js.map +0 -1
|
@@ -32,7 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
33
33
|
*/
|
|
34
34
|
import React from 'react';
|
|
35
|
-
import { ConditionalWrap } from '../
|
|
35
|
+
import { ConditionalWrap } from '../conditional-wrap';
|
|
36
36
|
import { IconButton } from '../button';
|
|
37
37
|
import { Checkbox } from '../checkbox';
|
|
38
38
|
import { ChevronDownIconOutline, ChevronRightIconOutline } from '../icons';
|
|
@@ -138,7 +138,7 @@ export const TreeViewTextItem = React.forwardRef(function TreeViewTextItem(_a, r
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
onItemsChanged(newItems, { item, reason: 'selected' });
|
|
141
|
-
}, "aria-label": item.data.text }) }))), _jsx(Skeleton, Object.assign({ onBackground: "weak", variant: "rectangular", height: "20px" }, item.skeletonProps, { isLoading: item.isSkeletonLoading, children: _jsx(ConditionalWrap, { shouldWrap: item.data.onTextClick !== undefined,
|
|
141
|
+
}, "aria-label": item.data.text }) }))), _jsx(Skeleton, Object.assign({ onBackground: "weak", variant: "rectangular", height: "20px" }, item.skeletonProps, { isLoading: item.isSkeletonLoading, children: _jsx(ConditionalWrap, { shouldWrap: item.data.onTextClick !== undefined, wrap: (children) => (_jsx("button", { onClick: item.data.onTextClick, className: "ndl-tree-view-text-clickable", tabIndex: tabIndex, children: children })), children: _jsx(Typography, { variant: item.canHaveSubItems ? 'subheading-small' : 'body-medium', htmlAttributes: {
|
|
142
142
|
style: {
|
|
143
143
|
overflow: 'hidden',
|
|
144
144
|
textOverflow: 'ellipsis',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeViewTextItem.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewTextItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TreeViewTextItem.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewTextItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG,CACjC,IAAqC,EACrC,KAAwC,EAC/B,EAAE;IACX,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzD,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG,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|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
+
type ConditionalWrapProps = {
|
|
23
|
+
shouldWrap: boolean;
|
|
24
|
+
wrap: (children: React.ReactNode) => React.ReactNode;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
};
|
|
22
27
|
/**
|
|
23
28
|
* Component to enable conditional
|
|
24
29
|
* wrapping of components
|
|
25
30
|
*/
|
|
26
|
-
export declare const ConditionalWrap: ({ shouldWrap, wrap, children, }:
|
|
27
|
-
|
|
28
|
-
wrap: (children: React.ReactNode) => React.ReactNode;
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
}) => React.ReactNode;
|
|
31
|
-
export default ConditionalWrap;
|
|
31
|
+
export declare const ConditionalWrap: ({ shouldWrap, wrap, children, }: ConditionalWrapProps) => React.ReactNode;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './ConditionalWrap';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default Component;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { type StoryObj } from '@storybook/react';
|
|
22
|
+
declare const componentMeta: {
|
|
23
|
+
title: string;
|
|
24
|
+
component: ({ shouldWrap, wrap, children, }: {
|
|
25
|
+
shouldWrap: boolean;
|
|
26
|
+
wrap: (children: React.ReactNode) => React.ReactNode;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}) => import("react").ReactNode;
|
|
29
|
+
};
|
|
30
|
+
export default componentMeta;
|
|
31
|
+
type Story = StoryObj<typeof componentMeta>;
|
|
32
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as ConditionalWrapDefault } from './conditional-wrap-default.story';
|
|
22
|
+
export declare const ConditionalWrapDefaultSrc: string;
|
|
@@ -29,7 +29,7 @@ import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
type GraphLabelProps = {
|
|
32
|
-
type: 'node' | 'relationship' | 'propertyKey';
|
|
32
|
+
type: 'node' | 'relationship' | 'propertyKey' | 'relationshipLeft' | 'relationshipRight';
|
|
33
33
|
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
34
34
|
style?: React.CSSProperties;
|
|
35
35
|
children?: React.ReactNode;
|
|
@@ -42,6 +42,8 @@ type GraphLabelProps = {
|
|
|
42
42
|
isSelected?: boolean;
|
|
43
43
|
/** If the label is fluid */
|
|
44
44
|
isFluid?: boolean;
|
|
45
|
+
/** The size of the label */
|
|
46
|
+
size?: 'small' | 'medium';
|
|
45
47
|
};
|
|
46
48
|
export declare const GraphLabel: PolymorphicForwardRefExoticComponent<'button', GraphLabelProps>;
|
|
47
49
|
export {};
|
package/lib/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@tanstack/react-table": "8.20.5",
|
|
66
66
|
"react": ">=16.8.0",
|
|
67
67
|
"react-dom": ">=16.8.0",
|
|
68
|
-
"@neo4j-ndl/base": "^3.3.
|
|
68
|
+
"@neo4j-ndl/base": "^3.3.14"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@dnd-kit/core": "6.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrap.js","sourceRoot":"","sources":["../../../src/_common/ConditionalWrap.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIH;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EACV,IAAI,EACJ,QAAQ,GAKT,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AARlC,QAAA,eAAe,mBAQmB;AAE/C,kBAAe,uBAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coditionalWrap.js","sourceRoot":"","sources":["../../../src/_common/coditionalWrap.tsx"],"names":[],"mappings":";;;;AA2BO,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EAAE,SAAS,EACrB,OAAO,EACP,QAAQ,GACa,EAAE,EAAE;IACzB,OAAO,SAAS,CAAC,CAAC,CAAC,2DAAG,OAAO,CAAC,QAAQ,CAAC,GAAI,CAAC,CAAC,CAAC,2DAAG,QAAQ,GAAI,CAAC;AAChE,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrap.js","sourceRoot":"","sources":["../../../src/_common/ConditionalWrap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EACV,IAAI,EACJ,QAAQ,GAKT,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE/C,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coditionalWrap.js","sourceRoot":"","sources":["../../../src/_common/coditionalWrap.tsx"],"names":[],"mappings":";AA2BA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EAAE,SAAS,EACrB,OAAO,EACP,QAAQ,GACa,EAAE,EAAE;IACzB,OAAO,SAAS,CAAC,CAAC,CAAC,4BAAG,OAAO,CAAC,QAAQ,CAAC,GAAI,CAAC,CAAC,CAAC,4BAAG,QAAQ,GAAI,CAAC;AAChE,CAAC,CAAC"}
|