@neo4j-ndl/react 0.6.1 → 0.7.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.
Files changed (49) hide show
  1. package/lib/cjs/_common/utils.js +8 -1
  2. package/lib/cjs/_common/utils.js.map +1 -1
  3. package/lib/cjs/button/IconButton.js +1 -1
  4. package/lib/cjs/button/IconButton.js.map +1 -1
  5. package/lib/cjs/drag-and-drop/DragAndDrop.js +46 -25
  6. package/lib/cjs/drag-and-drop/DragAndDrop.js.map +1 -1
  7. package/lib/cjs/dropdown/Dropdown.js +2 -2
  8. package/lib/cjs/dropdown/Dropdown.js.map +1 -1
  9. package/lib/cjs/graph-label/GraphLabel.js +118 -0
  10. package/lib/cjs/graph-label/GraphLabel.js.map +1 -0
  11. package/lib/cjs/graph-label/index.js +29 -0
  12. package/lib/cjs/graph-label/index.js.map +1 -0
  13. package/lib/cjs/index.js +1 -0
  14. package/lib/cjs/index.js.map +1 -1
  15. package/lib/cjs/table/Table.js +5 -0
  16. package/lib/cjs/table/Table.js.map +1 -1
  17. package/lib/cjs/wizard/Wizard.js +98 -0
  18. package/lib/cjs/wizard/Wizard.js.map +1 -0
  19. package/lib/cjs/wizard/index.js +37 -0
  20. package/lib/cjs/wizard/index.js.map +1 -0
  21. package/lib/esm/_common/utils.js +6 -0
  22. package/lib/esm/_common/utils.js.map +1 -1
  23. package/lib/esm/button/IconButton.js +1 -1
  24. package/lib/esm/button/IconButton.js.map +1 -1
  25. package/lib/esm/drag-and-drop/DragAndDrop.js +46 -25
  26. package/lib/esm/drag-and-drop/DragAndDrop.js.map +1 -1
  27. package/lib/esm/dropdown/Dropdown.js +2 -2
  28. package/lib/esm/dropdown/Dropdown.js.map +1 -1
  29. package/lib/esm/graph-label/GraphLabel.js +113 -0
  30. package/lib/esm/graph-label/GraphLabel.js.map +1 -0
  31. package/lib/esm/graph-label/index.js +22 -0
  32. package/lib/esm/graph-label/index.js.map +1 -0
  33. package/lib/esm/index.js +1 -0
  34. package/lib/esm/index.js.map +1 -1
  35. package/lib/esm/table/Table.js +5 -0
  36. package/lib/esm/table/Table.js.map +1 -1
  37. package/lib/esm/wizard/Wizard.js +88 -0
  38. package/lib/esm/wizard/Wizard.js.map +1 -0
  39. package/lib/esm/wizard/index.js +21 -0
  40. package/lib/esm/wizard/index.js.map +1 -0
  41. package/lib/types/_common/utils.d.ts +4 -0
  42. package/lib/types/drag-and-drop/DragAndDrop.d.ts +1 -1
  43. package/lib/types/graph-label/GraphLabel.d.ts +70 -0
  44. package/lib/types/graph-label/index.d.ts +21 -0
  45. package/lib/types/index.d.ts +1 -0
  46. package/lib/types/table/Table.d.ts +9 -6
  47. package/lib/types/wizard/Wizard.d.ts +31 -0
  48. package/lib/types/wizard/index.d.ts +20 -0
  49. package/package.json +4 -3
@@ -0,0 +1,70 @@
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 React from 'react';
22
+ import { ElementBase } from '../helpers';
23
+ /**
24
+ *
25
+ *
26
+ * Types
27
+ *
28
+ *
29
+ */
30
+ declare type NodeLabelProps = {
31
+ children?: React.ReactNode;
32
+ /** Sets the label to the disabled style */
33
+ disabled?: boolean;
34
+ /** Additional classes only applicable to type node*/
35
+ className?: string;
36
+ /** The background color of the label only applicable to type node*/
37
+ color?: string;
38
+ /** If the element is selected */
39
+ selected?: boolean;
40
+ } & ElementBase<HTMLButtonElement>;
41
+ declare type RelationshipLabelProps = {
42
+ children?: React.ReactNode;
43
+ /** Sets the label to the disabled style */
44
+ disabled?: boolean;
45
+ /** If the element is selected */
46
+ selected?: boolean;
47
+ } & ElementBase<HTMLButtonElement>;
48
+ declare type PropertyKeyLabelProps = {
49
+ children?: React.ReactNode;
50
+ /** Sets the label to the disabled style */
51
+ disabled?: boolean;
52
+ /** If the element is selected */
53
+ selected?: boolean;
54
+ } & ElementBase<HTMLButtonElement>;
55
+ declare type GraphLabelProps = ({
56
+ type: 'node';
57
+ } & NodeLabelProps) | ({
58
+ type: 'relationship';
59
+ } & RelationshipLabelProps) | ({
60
+ type: 'propertyKey';
61
+ } & PropertyKeyLabelProps);
62
+ /**
63
+ *
64
+ *
65
+ * GraphLabel Component
66
+ *
67
+ *
68
+ */
69
+ declare const GraphLabel: React.ForwardRefExoticComponent<GraphLabelProps & React.RefAttributes<HTMLDivElement>>;
70
+ export default GraphLabel;
@@ -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 { default as GraphLabel } from './GraphLabel';
@@ -39,3 +39,4 @@ export * from './drag-and-drop';
39
39
  export * from './text-input';
40
40
  export * from './dropdown';
41
41
  export * from './tag';
42
+ export * from './wizard';
@@ -62,10 +62,13 @@ export declare type DefaultNavigationProps<T extends object> = {
62
62
  * +----------------+
63
63
  *
64
64
  */
65
- declare const Table: <T extends object>(props: Partial<Sections> & Partial<{
66
- actionsButtons?: ((row: Row<T>) => JSX.Element | JSX.Element[]) | undefined;
67
- } & UseTableInstanceProps<T> & Partial<UsePaginationInstanceProps<T>> & {
68
- state: Partial<PaginationTableState<T>>;
69
- rows: Row<T>[];
70
- } & UsePaginationInstanceProps<T> & Pick<UseTableInstanceProps<T>, "headerGroups"> & UseSortByInstanceProps<T>> & Omit<ElementBase<HTMLDivElement>, "data" | "controls" | "headers" | "rows">) => JSX.Element;
65
+ declare const Table: {
66
+ <T extends object>(props: Partial<Sections> & Partial<{
67
+ actionsButtons?: ((row: Row<T>) => JSX.Element | JSX.Element[]) | undefined;
68
+ } & UseTableInstanceProps<T> & Partial<UsePaginationInstanceProps<T>> & {
69
+ state: Partial<PaginationTableState<T>>;
70
+ rows: Row<T>[];
71
+ } & UsePaginationInstanceProps<T> & Pick<UseTableInstanceProps<T>, "headerGroups"> & UseSortByInstanceProps<T>> & Omit<ElementBase<HTMLDivElement>, "data" | "controls" | "headers" | "rows">): JSX.Element;
72
+ RowActions: (props: ElementBase<HTMLDivElement>) => JSX.Element;
73
+ };
71
74
  export default Table;
@@ -0,0 +1,31 @@
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
+ /// <reference types="react" />
22
+ import { ElementBase } from '../helpers';
23
+ export declare const Horizontal: ({ activeStep, steps, ...props }: Omit<WizardProps, 'type'>) => JSX.Element;
24
+ export declare const Vertical: ({ activeStep, steps, ...props }: Omit<WizardProps, 'type'>) => JSX.Element;
25
+ export declare const Footer: ({ activeStep, steps, ...props }: Omit<WizardProps, 'type'>) => JSX.Element;
26
+ export interface WizardProps extends ElementBase<HTMLDivElement> {
27
+ type?: 'horizontal' | 'vertical' | 'footer';
28
+ activeStep: number;
29
+ steps: (string | JSX.Element)[];
30
+ }
31
+ export declare const Wizard: ({ type, activeStep, steps, ...props }: WizardProps) => JSX.Element;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) "Neo4j"
3
+ * Neo4j Sweden AB [http://neo4j.com]
4
+ *
5
+ * This file is part of Neo4j.
6
+ *
7
+ * Neo4j is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+ export * from './Wizard';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "React implementation of Neo4j Design System",
5
5
  "keywords": [
6
6
  "button",
@@ -68,9 +68,10 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@heroicons/react": "^1.0.5",
71
- "@neo4j-ndl/base": "^0.6.0",
71
+ "@neo4j-ndl/base": "^0.7.0",
72
72
  "classnames": "^2.3.1",
73
- "react-dropzone": "^12.0.4",
73
+ "detect-browser": "^5.3.0",
74
+ "react-dropzone": "^14.0.0",
74
75
  "react-select": "^5.3.2",
75
76
  "react-table": "^7.7.0",
76
77
  "react-use": "^17.4.0"