@neo4j-ndl/react 1.5.11 → 1.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 (38) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/lib/LICENSES.txt +207 -1
  3. package/lib/NOTICE.txt +4 -2
  4. package/lib/cjs/_common/utils.js.map +1 -1
  5. package/lib/cjs/index.js +1 -0
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/textarea/Textarea.js +85 -0
  8. package/lib/cjs/textarea/Textarea.js.map +1 -0
  9. package/lib/cjs/textarea/index.js +29 -0
  10. package/lib/cjs/textarea/index.js.map +1 -0
  11. package/lib/cjs/tooltip/SmartTooltip.js +4 -87
  12. package/lib/cjs/tooltip/SmartTooltip.js.map +1 -1
  13. package/lib/cjs/tooltip/Tip.js +169 -0
  14. package/lib/cjs/tooltip/Tip.js.map +1 -0
  15. package/lib/cjs/tooltip/index.js +3 -1
  16. package/lib/cjs/tooltip/index.js.map +1 -1
  17. package/lib/esm/_common/utils.js.map +1 -1
  18. package/lib/esm/index.js +1 -0
  19. package/lib/esm/index.js.map +1 -1
  20. package/lib/esm/textarea/Textarea.js +80 -0
  21. package/lib/esm/textarea/Textarea.js.map +1 -0
  22. package/lib/esm/textarea/index.js +22 -0
  23. package/lib/esm/textarea/index.js.map +1 -0
  24. package/lib/esm/tooltip/SmartTooltip.js +5 -65
  25. package/lib/esm/tooltip/SmartTooltip.js.map +1 -1
  26. package/lib/esm/tooltip/Tip.js +141 -0
  27. package/lib/esm/tooltip/Tip.js.map +1 -0
  28. package/lib/esm/tooltip/index.js +1 -0
  29. package/lib/esm/tooltip/index.js.map +1 -1
  30. package/lib/types/_common/utils.d.ts +1 -2
  31. package/lib/types/index.d.ts +1 -0
  32. package/lib/types/text-input/TextInput.d.ts +1 -1
  33. package/lib/types/textarea/Textarea.d.ts +56 -0
  34. package/lib/types/textarea/index.d.ts +21 -0
  35. package/lib/types/tooltip/SmartTooltip.d.ts +1 -1
  36. package/lib/types/tooltip/Tip.d.ts +62 -0
  37. package/lib/types/tooltip/index.d.ts +1 -0
  38. package/package.json +4 -3
@@ -40,7 +40,7 @@ export interface TextInputProperties extends Omit<CommonInputProps, 'label'> {
40
40
  isOptional?: boolean;
41
41
  /** Information to be displayed in the information tooltip */
42
42
  informationIconText?: string;
43
- /** Pass props to the underlaying SmartTooltip component */
43
+ /** Pass props to the underlying SmartTooltip component */
44
44
  smartTooltipProps?: SmartTooltipProps;
45
45
  }
46
46
  /**
@@ -0,0 +1,56 @@
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 { ComponentPropsWithoutRef, ReactNode } from 'react';
22
+ import { SmartTooltipProps } from '../tooltip/SmartTooltip';
23
+ /**
24
+ *
25
+ *
26
+ * Types
27
+ *
28
+ *
29
+ */
30
+ export interface TextareaProps extends Omit<Omit<ComponentPropsWithoutRef<'textarea'>, 'nonce' | 'size'>, 'label'> {
31
+ /** Label text */
32
+ label?: ReactNode;
33
+ /** Displays with fluid width */
34
+ fluid?: boolean;
35
+ /** Help message */
36
+ helpText?: string;
37
+ /** Error message */
38
+ errorText?: string;
39
+ /** Size of the textarea */
40
+ size?: 'small' | 'large';
41
+ /** If the component is optional to fill in */
42
+ isOptional?: boolean;
43
+ /** Information to be displayed in the information tooltip */
44
+ informationIconText?: string;
45
+ /** Pass props to the underlaying SmartTooltip component */
46
+ smartTooltipProps?: SmartTooltipProps;
47
+ }
48
+ /**
49
+ *
50
+ *
51
+ * Textarea Component
52
+ *
53
+ *
54
+ */
55
+ declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
56
+ export default Textarea;
@@ -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 Textarea } from './Textarea';
@@ -32,5 +32,5 @@ export interface SmartTooltipProps extends Omit<TooltipProps, 'arrowPosition'> {
32
32
  */
33
33
  portal?: boolean;
34
34
  }
35
- declare const SmartTooltip: React.ForwardRefExoticComponent<Omit<SmartTooltipProps, "ref"> & React.RefAttributes<HTMLElement>>;
35
+ declare const SmartTooltip: React.ForwardRefExoticComponent<Omit<SmartTooltipProps, "ref"> & React.RefAttributes<unknown>>;
36
36
  export default SmartTooltip;
@@ -0,0 +1,62 @@
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, { ReactNode } from 'react';
22
+ import type { Side } from '@floating-ui/core/src/types';
23
+ import { TooltipProps } from './Tooltip';
24
+ import type { PressEvent } from '@react-types/shared';
25
+ export interface ToggletipActionProps extends Omit<React.HTMLProps<HTMLAnchorElement>, 'onClick'> {
26
+ /** Label of the action item */
27
+ label: string;
28
+ /** Event handler when the action button is clicked. If set, the element is rendered as `button` */
29
+ onClick?: (event: PressEvent) => void;
30
+ /** Experimental: this can be surfaced from every tap-able component in Needle v2 */
31
+ onPress?: (event: PressEvent) => void;
32
+ /** Link to redirect to when the action button is clicked. If set, the element is rendered as `a`. Ignored if `onClick` prop is passed */
33
+ href?: string;
34
+ /** Sets how to open the link. Only applicable when `href` is passed */
35
+ target?: '_blank' | '_self' | '_parent' | '_top';
36
+ }
37
+ declare type SmartTooltipProps = {
38
+ type: 'tooltip';
39
+ };
40
+ declare type ToggleTipCustomProps = {
41
+ type: 'toggletip';
42
+ /** Title of the Toggletip **/
43
+ title?: string | ReactNode;
44
+ /** Shows Action buttons in the footer */
45
+ actions?: ToggletipActionProps[];
46
+ /** Callback function on toggletip close. */
47
+ onClose?: (event: React.MouseEvent | React.TouchEvent | React.KeyboardEvent | undefined) => void;
48
+ };
49
+ export interface TipProps extends Omit<TooltipProps, 'arrowPosition'> {
50
+ /** Allowed places of the tooltip */
51
+ allowedPlacements?: Side[];
52
+ /** If you want controlled open/close behavior pass an open prop */
53
+ open?: boolean;
54
+ /**
55
+ * If the tooltip is being cut-off by a parent element,
56
+ * it will render in a Portal targeting body
57
+ */
58
+ portal?: boolean;
59
+ }
60
+ export declare type ToogleTipProps = TipProps & ToggleTipCustomProps;
61
+ declare const Tip: React.ForwardRefExoticComponent<(Omit<ToogleTipProps, "ref"> | Omit<TipProps & SmartTooltipProps, "ref">) & React.RefAttributes<unknown>>;
62
+ export default Tip;
@@ -20,3 +20,4 @@
20
20
  */
21
21
  export { default as Tooltip } from './Tooltip';
22
22
  export { default as SmartTooltip } from './SmartTooltip';
23
+ export { default as Tip } from './Tip';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "1.5.11",
3
+ "version": "1.7.0",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -89,14 +89,15 @@
89
89
  "react": ">=16.8.0"
90
90
  },
91
91
  "dependencies": {
92
- "@floating-ui/react-dom-interactions": "^0.12.0",
92
+ "@floating-ui/react": "^0.24.2",
93
93
  "@heroicons/react": "2.0.13",
94
94
  "@neo4j-cypher/react-codemirror": "^1.0.1",
95
- "@neo4j-ndl/base": "^1.5.7",
95
+ "@neo4j-ndl/base": "^1.7.0",
96
96
  "@tanstack/react-table": "^8.5.22",
97
97
  "classnames": "^2.3.1",
98
98
  "detect-browser": "^5.3.0",
99
99
  "re-resizable": "^6.9.9",
100
+ "react-aria": "^3.25.0",
100
101
  "react-dropzone": "^14.0.0",
101
102
  "react-focus-lock": "^2.9.4",
102
103
  "react-select": "5.7.0",