@neo4j-ndl/react 3.0.0-alpha-9886872 → 3.0.0-alpha-5f92d5f

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 (159) hide show
  1. package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js +4 -4
  2. package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
  3. package/lib/cjs/accordion/Accordion.js +6 -5
  4. package/lib/cjs/accordion/Accordion.js.map +1 -1
  5. package/lib/cjs/avatar/Avatar.js +15 -4
  6. package/lib/cjs/avatar/Avatar.js.map +1 -1
  7. package/lib/cjs/banner/Banner.js +2 -2
  8. package/lib/cjs/banner/Banner.js.map +1 -1
  9. package/lib/cjs/button/Button.js +2 -2
  10. package/lib/cjs/button/Button.js.map +1 -1
  11. package/lib/cjs/button/IconButton.js +2 -2
  12. package/lib/cjs/button/IconButton.js.map +1 -1
  13. package/lib/cjs/button/IconButtonArray.js +2 -2
  14. package/lib/cjs/button/IconButtonArray.js.map +1 -1
  15. package/lib/cjs/callout/Callout.js +2 -2
  16. package/lib/cjs/callout/Callout.js.map +1 -1
  17. package/lib/cjs/checkbox/Checkbox.js +2 -2
  18. package/lib/cjs/checkbox/Checkbox.js.map +1 -1
  19. package/lib/cjs/code/Code.js +5 -3
  20. package/lib/cjs/code/Code.js.map +1 -1
  21. package/lib/cjs/code/languages.js +1 -0
  22. package/lib/cjs/code/languages.js.map +1 -1
  23. package/lib/cjs/context-menu/ContextMenu.js +33 -8
  24. package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
  25. package/lib/cjs/data-grid/Components.js +6 -8
  26. package/lib/cjs/data-grid/Components.js.map +1 -1
  27. package/lib/cjs/data-grid/DataGrid.js +2 -0
  28. package/lib/cjs/data-grid/DataGrid.js.map +1 -1
  29. package/lib/cjs/dialog/Dialog.js +29 -22
  30. package/lib/cjs/dialog/Dialog.js.map +1 -1
  31. package/lib/cjs/divider/Divider.js +3 -3
  32. package/lib/cjs/divider/Divider.js.map +1 -1
  33. package/lib/cjs/dropdown-button/DropdownButton.js +3 -2
  34. package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
  35. package/lib/cjs/dropzone/Dropzone.js +2 -2
  36. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  37. package/lib/cjs/inline-edit/InlineEdit.js +3 -3
  38. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  39. package/lib/cjs/label/Label.js +15 -5
  40. package/lib/cjs/label/Label.js.map +1 -1
  41. package/lib/cjs/layout/Flex.js +2 -2
  42. package/lib/cjs/layout/Flex.js.map +1 -1
  43. package/lib/cjs/loading-spinner/LoadingSpinner.js +14 -6
  44. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  45. package/lib/cjs/progress-bar/ProgressBar.js +3 -2
  46. package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
  47. package/lib/cjs/segmented-control/SegmentedControl.js +4 -4
  48. package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
  49. package/lib/cjs/side-navigation/SideNavigation.js +6 -5
  50. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  51. package/lib/cjs/slider/Slider.js +3 -2
  52. package/lib/cjs/slider/Slider.js.map +1 -1
  53. package/lib/cjs/status-indicator/StatusIndicator.js +7 -6
  54. package/lib/cjs/status-indicator/StatusIndicator.js.map +1 -1
  55. package/lib/cjs/tabs/Tabs.js +6 -6
  56. package/lib/cjs/tabs/Tabs.js.map +1 -1
  57. package/lib/cjs/tag/Tag.js.map +1 -1
  58. package/lib/cjs/text-input/TextInput.js +2 -2
  59. package/lib/cjs/text-input/TextInput.js.map +1 -1
  60. package/lib/cjs/tooltip/Tooltip.js +5 -3
  61. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  62. package/lib/cjs/tooltip/use-tooltip.js +3 -2
  63. package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
  64. package/lib/esm/_common/input/RadioAndCheckboxWrapper.js +4 -4
  65. package/lib/esm/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
  66. package/lib/esm/accordion/Accordion.js +6 -5
  67. package/lib/esm/accordion/Accordion.js.map +1 -1
  68. package/lib/esm/avatar/Avatar.js +15 -4
  69. package/lib/esm/avatar/Avatar.js.map +1 -1
  70. package/lib/esm/banner/Banner.js +2 -2
  71. package/lib/esm/banner/Banner.js.map +1 -1
  72. package/lib/esm/button/Button.js +2 -2
  73. package/lib/esm/button/Button.js.map +1 -1
  74. package/lib/esm/button/IconButton.js +2 -2
  75. package/lib/esm/button/IconButton.js.map +1 -1
  76. package/lib/esm/button/IconButtonArray.js +2 -2
  77. package/lib/esm/button/IconButtonArray.js.map +1 -1
  78. package/lib/esm/callout/Callout.js +2 -2
  79. package/lib/esm/callout/Callout.js.map +1 -1
  80. package/lib/esm/checkbox/Checkbox.js +2 -2
  81. package/lib/esm/checkbox/Checkbox.js.map +1 -1
  82. package/lib/esm/code/Code.js +5 -3
  83. package/lib/esm/code/Code.js.map +1 -1
  84. package/lib/esm/code/languages.js +1 -0
  85. package/lib/esm/code/languages.js.map +1 -1
  86. package/lib/esm/context-menu/ContextMenu.js +10 -8
  87. package/lib/esm/context-menu/ContextMenu.js.map +1 -1
  88. package/lib/esm/data-grid/Components.js +3 -7
  89. package/lib/esm/data-grid/Components.js.map +1 -1
  90. package/lib/esm/data-grid/DataGrid.js +3 -1
  91. package/lib/esm/data-grid/DataGrid.js.map +1 -1
  92. package/lib/esm/dialog/Dialog.js +31 -24
  93. package/lib/esm/dialog/Dialog.js.map +1 -1
  94. package/lib/esm/divider/Divider.js +3 -3
  95. package/lib/esm/divider/Divider.js.map +1 -1
  96. package/lib/esm/dropdown-button/DropdownButton.js +3 -2
  97. package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
  98. package/lib/esm/dropzone/Dropzone.js +2 -2
  99. package/lib/esm/dropzone/Dropzone.js.map +1 -1
  100. package/lib/esm/inline-edit/InlineEdit.js +3 -3
  101. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  102. package/lib/esm/label/Label.js +16 -3
  103. package/lib/esm/label/Label.js.map +1 -1
  104. package/lib/esm/layout/Flex.js +2 -2
  105. package/lib/esm/layout/Flex.js.map +1 -1
  106. package/lib/esm/loading-spinner/LoadingSpinner.js +15 -4
  107. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  108. package/lib/esm/progress-bar/ProgressBar.js +3 -2
  109. package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
  110. package/lib/esm/segmented-control/SegmentedControl.js +4 -4
  111. package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
  112. package/lib/esm/side-navigation/SideNavigation.js +6 -5
  113. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  114. package/lib/esm/slider/Slider.js +3 -2
  115. package/lib/esm/slider/Slider.js.map +1 -1
  116. package/lib/esm/status-indicator/StatusIndicator.js +7 -6
  117. package/lib/esm/status-indicator/StatusIndicator.js.map +1 -1
  118. package/lib/esm/tabs/Tabs.js +6 -6
  119. package/lib/esm/tabs/Tabs.js.map +1 -1
  120. package/lib/esm/tag/Tag.js.map +1 -1
  121. package/lib/esm/text-input/TextInput.js +2 -2
  122. package/lib/esm/text-input/TextInput.js.map +1 -1
  123. package/lib/esm/tooltip/Tooltip.js +5 -3
  124. package/lib/esm/tooltip/Tooltip.js.map +1 -1
  125. package/lib/esm/tooltip/use-tooltip.js +3 -2
  126. package/lib/esm/tooltip/use-tooltip.js.map +1 -1
  127. package/lib/types/_common/CodeBlockWrapper.d.ts +1 -1
  128. package/lib/types/_common/input/RadioAndCheckboxWrapper.d.ts +9 -0
  129. package/lib/types/_common/types.d.ts +12 -2
  130. package/lib/types/accordion/Accordion.d.ts +3 -7
  131. package/lib/types/avatar/Avatar.d.ts +0 -2
  132. package/lib/types/banner/Banner.d.ts +7 -5
  133. package/lib/types/button/Button.d.ts +0 -1
  134. package/lib/types/button/IconButtonArray.d.ts +2 -2
  135. package/lib/types/callout/Callout.d.ts +1 -1
  136. package/lib/types/charts/ChartTooltip.d.ts +3 -3
  137. package/lib/types/charts/Charts.d.ts +1 -1
  138. package/lib/types/code/Code.d.ts +0 -1
  139. package/lib/types/code/languages.d.ts +1 -1
  140. package/lib/types/context-menu/ContextMenu.d.ts +9 -6
  141. package/lib/types/data-grid/Components.d.ts +5 -6
  142. package/lib/types/data-grid/DataGrid.d.ts +3 -4
  143. package/lib/types/dialog/Dialog.d.ts +23 -15
  144. package/lib/types/dropzone/Dropzone.d.ts +2 -0
  145. package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
  146. package/lib/types/label/Label.d.ts +4 -3
  147. package/lib/types/loading-spinner/LoadingSpinner.d.ts +4 -4
  148. package/lib/types/popover/Popover.d.ts +1 -1
  149. package/lib/types/progress-bar/ProgressBar.d.ts +4 -1
  150. package/lib/types/segmented-control/SegmentedControl.d.ts +1 -1
  151. package/lib/types/side-navigation/SideNavigation.d.ts +7 -2
  152. package/lib/types/slider/Slider.d.ts +2 -2
  153. package/lib/types/status-indicator/StatusIndicator.d.ts +4 -4
  154. package/lib/types/tag/Tag.d.ts +1 -0
  155. package/lib/types/text-area/TextArea.d.ts +2 -2
  156. package/lib/types/text-input/TextInput.d.ts +4 -1
  157. package/lib/types/tooltip/Tooltip.d.ts +2 -1
  158. package/lib/types/tooltip/use-tooltip.d.ts +3 -1
  159. package/package.json +3 -3
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type HtmlAttributes, type PolymorphicComponentPropsWithRef } from '../_common/types';
22
+ import { type HtmlAttributes, type PolymorphicComponentProps, type PolymorphicComponentPropsWithRef } from '../_common/types';
23
23
  /**
24
24
  *
25
25
  *
@@ -34,10 +34,11 @@ export type BannerActionsProps = {
34
34
  } & ({
35
35
  as: 'button';
36
36
  /** Event handler when the action button is clicked. If set, the element is rendered as `button` */
37
- onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
37
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
38
38
  } | {
39
39
  as?: 'a';
40
40
  href?: string;
41
+ target?: React.ComponentPropsWithoutRef<'a'>['target'];
41
42
  } | {
42
43
  as: React.ElementType;
43
44
  });
@@ -55,7 +56,7 @@ export interface BannerCommonProps {
55
56
  /** Shows status icon. Icon is automatically picked based on `type` value */
56
57
  hasIcon?: boolean;
57
58
  /** Shows Action buttons in the footer */
58
- actions?: BannerActionsProps[];
59
+ actions?: React.ComponentProps<typeof BannerActions>[];
59
60
  htmlAttributes?: HtmlAttributes<'div'>;
60
61
  children?: React.ReactNode;
61
62
  className?: string;
@@ -83,7 +84,7 @@ type CloseableBannerProps = {
83
84
  /** Shows close icon. Expects onClose to be passed */
84
85
  isCloseable: true;
85
86
  /** Event handler when close icon is clicked */
86
- onClose: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
87
+ onClose: (e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
87
88
  };
88
89
  type NonCloseableBannerProps = {
89
90
  isCloseable?: false;
@@ -92,7 +93,8 @@ type NonCloseableBannerProps = {
92
93
  type BannerCloseProps = CloseableBannerProps | NonCloseableBannerProps;
93
94
  export type BannerProps = BannerCommonProps & BannerCloseProps & BannerUsageProps;
94
95
  export type BannerType = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
95
- declare const BannerNamespace: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>> & {
96
+ declare const BannerActions: BannerActionsComponent;
97
+ declare const BannerNamespace: React.ForwardRefExoticComponent<PolymorphicComponentProps<React.ElementType<any>, BannerProps> & React.RefAttributes<unknown>> & {
96
98
  Actions: BannerActionsComponent;
97
99
  };
98
100
  export { BannerNamespace as Banner };
@@ -45,7 +45,6 @@ type BaseButtonProps = {
45
45
  onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
46
46
  /** OnKeyDown callback */
47
47
  onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
48
- className?: string;
49
48
  } & ({
50
49
  as: 'a';
51
50
  href: HtmlAttributes<'a'>['href'];
@@ -36,11 +36,11 @@ export interface CollapsibleButtonWrapperProps {
36
36
  export declare const IconButtonArrayComponent: React.ForwardRefExoticComponent<{
37
37
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
38
38
  as?: React.ElementType<any> | undefined;
39
- } & IconButtonArrayProps & React.RefAttributes<unknown>>;
39
+ } & IconButtonArrayProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
40
40
  declare const IconButtonArray: React.ForwardRefExoticComponent<{
41
41
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
42
42
  as?: React.ElementType<any> | undefined;
43
- } & IconButtonArrayProps & React.RefAttributes<unknown>> & {
43
+ } & IconButtonArrayProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>> & {
44
44
  CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps>;
45
45
  };
46
46
  export { IconButtonArray };
@@ -48,4 +48,4 @@ export type CalloutType = 'note' | 'important' | 'example' | 'tip';
48
48
  export declare const Callout: React.ForwardRefExoticComponent<{
49
49
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
50
50
  as?: React.ElementType<any> | undefined;
51
- } & CalloutProps & React.RefAttributes<unknown>>;
51
+ } & CalloutProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -30,7 +30,7 @@ export interface ChartTooltipProps {
30
30
  export declare const ChartTooltipComponent: React.ForwardRefExoticComponent<{
31
31
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
32
32
  as?: React.ElementType<any> | undefined;
33
- } & ChartTooltipProps & React.RefAttributes<unknown>>;
33
+ } & ChartTooltipProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
34
34
  export type ChartTooltipContentProps = {
35
35
  leftElement?: React.ReactNode;
36
36
  rightElement?: React.ReactNode;
@@ -44,7 +44,7 @@ export type ChartTooltipContentProps = {
44
44
  declare const ChartTooltip: React.ForwardRefExoticComponent<{
45
45
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
46
46
  as?: React.ElementType<any> | undefined;
47
- } & ChartTooltipProps & React.RefAttributes<unknown>> & {
47
+ } & ChartTooltipProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>> & {
48
48
  Title: React.ForwardRefExoticComponent<{
49
49
  children: React.ReactNode;
50
50
  } & React.RefAttributes<unknown>>;
@@ -52,7 +52,7 @@ declare const ChartTooltip: React.ForwardRefExoticComponent<{
52
52
  Link: React.ForwardRefExoticComponent<Omit<{
53
53
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
54
54
  as?: React.ElementType<any> | undefined;
55
- } & import("../text-link").TextLinkProps & {
55
+ } & import("../text-link").TextLinkProps & import("../_common/types").CommonComponentProps & {
56
56
  ref?: any;
57
57
  }, "ref"> & React.RefAttributes<unknown>>;
58
58
  };
@@ -76,7 +76,7 @@ export declare const ChartsContext: import("react").Context<ChartsContextType>;
76
76
  declare const Charts: import("react").ForwardRefExoticComponent<{
77
77
  htmlAttributes?: import("../_common/types").HtmlAttributes<import("react").ElementType<any>> | undefined;
78
78
  as?: import("react").ElementType<any> | undefined;
79
- } & ChartsProps & import("react").RefAttributes<unknown>> & {
79
+ } & ChartsProps & import("../_common/types").CommonComponentProps & import("react").RefAttributes<unknown>> & {
80
80
  Chart: import("react").ForwardRefExoticComponent<import("./Chart").ChartProps & import("react").RefAttributes<unknown>> & {
81
81
  Line: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Line").LineProps & import("react").RefAttributes<SVGPathElement>>>;
82
82
  };
@@ -49,7 +49,6 @@ export interface BlockProps {
49
49
  export interface CommonProps {
50
50
  code: string;
51
51
  isDisabled?: boolean;
52
- className?: string;
53
52
  }
54
53
  type ConditionalProps = InlineProps | BlockProps;
55
54
  type Props = CommonProps & ConditionalProps;
@@ -18,5 +18,5 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
- export declare const Languages: readonly ["asciidoc", "bash", "c", "csharp", "css", "css-extras", "cypher", "docker", "json", "go", "graphql", "java", "javadoc", "javascript", "jsx", "kotlin", "php", "python", "regex", "rust", "sql", "typescript"];
21
+ export declare const Languages: readonly ["asciidoc", "bash", "c", "csharp", "css", "css-extras", "cypher", "docker", "json", "go", "graphql", "java", "javadoc", "javascript", "jsx", "kotlin", "php", "python", "regex", "rust", "sql", "typescript", "yaml"];
22
22
  export type LanguageProp = (typeof Languages)[number];
@@ -27,14 +27,14 @@ export interface MenuItemProps {
27
27
  description?: string;
28
28
  isDisabled?: boolean;
29
29
  className?: string;
30
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
30
+ onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
31
31
  onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
32
32
  children?: React.ReactNode;
33
33
  }
34
34
  declare const MenuItem: React.ForwardRefExoticComponent<{
35
35
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
36
36
  as?: React.ElementType<any> | undefined;
37
- } & MenuItemProps & React.RefAttributes<unknown>>;
37
+ } & MenuItemProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
38
38
  export type NestedMenuItemProps = Omit<React.ComponentProps<typeof MenuItem>, 'children'>;
39
39
  export interface ContextMenuProps {
40
40
  isOpen?: boolean;
@@ -45,11 +45,11 @@ export interface ContextMenuProps {
45
45
  minWidth?: number;
46
46
  className?: string;
47
47
  title?: string;
48
+ isDisabled?: boolean;
48
49
  description?: string;
49
50
  }
50
51
  export interface MenuItemsProps {
51
52
  children: React.ReactNode;
52
- className?: string;
53
53
  }
54
54
  export interface MenuSubheaderProps {
55
55
  title: string;
@@ -66,13 +66,16 @@ declare const Menu: React.ForwardRefExoticComponent<ContextMenuProps & React.Ref
66
66
  Item: React.ForwardRefExoticComponent<{
67
67
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
68
68
  as?: React.ElementType<any> | undefined;
69
- } & MenuItemProps & React.RefAttributes<unknown>>;
70
- Items: ({ children, className }: MenuItemsProps) => import("react/jsx-runtime").JSX.Element;
69
+ } & MenuItemProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
70
+ Items: React.ForwardRefExoticComponent<{
71
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
72
+ as?: React.ElementType<any> | undefined;
73
+ } & MenuItemsProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
71
74
  Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLHRElement>>;
72
75
  Subheader: (props: MenuSubheaderProps) => import("react/jsx-runtime").JSX.Element;
73
76
  Header: React.ForwardRefExoticComponent<{
74
77
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
75
78
  as?: React.ElementType<any> | undefined;
76
- } & MenuHeaderProps & React.RefAttributes<unknown>>;
79
+ } & MenuHeaderProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
77
80
  };
78
81
  export { Menu };
@@ -22,6 +22,7 @@ import { type Cell, type CellContext, type Header as HeaderType, type Row, type
22
22
  import { type IconButtonProps } from '../button';
23
23
  import { Menu } from '../context-menu';
24
24
  import { type ColumnAction } from './datagrid-types';
25
+ import NoDataIllustration from './illustrations/NoData';
25
26
  type MenuItemProps = React.ComponentProps<typeof Menu.Item>;
26
27
  export declare const DEFAULT_SORT_ACTIONS: (cell: HeaderType<any, unknown>) => {
27
28
  [key in SortDirection | 'default']: ColumnAction;
@@ -32,7 +33,7 @@ export interface CommonInnerProps<T = HTMLDivElement> {
32
33
  innerProps?: {
33
34
  className?: string;
34
35
  style?: React.CSSProperties;
35
- onClick?: (e: React.MouseEvent<T>) => void;
36
+ onClick?: (e: React.MouseEvent<T, MouseEvent>) => void;
36
37
  htmlAttributes?: React.HTMLAttributes<T>;
37
38
  };
38
39
  }
@@ -99,6 +100,8 @@ declare const PaginationNumericButtons: () => import("react/jsx-runtime").JSX.El
99
100
  declare const Pagination: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
100
101
  declare const Navigation: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
101
102
  declare const LoadingPlaceholder: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
103
+ declare const NoDataPlaceholder: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
104
+ export declare const NoDataPlaceholderContentWrapper: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
102
105
  export interface InlineEditCellProps<T extends RowData> {
103
106
  cell: CellContext<T, unknown>;
104
107
  value: string;
@@ -113,8 +116,4 @@ export interface DropDownCellProps<T extends RowData> {
113
116
  portalTarget?: HTMLElement;
114
117
  }
115
118
  declare const DropDownCell: <T extends RowData>({ cell, options, portalTarget, }: DropDownCellProps<T>) => import("react/jsx-runtime").JSX.Element | null;
116
- declare const NoDataPlaceholder: (({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element) & {
117
- Content: ({ children, innerProps, }: CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
118
- Illustration: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
119
- };
120
- export { ResizingBar, Header, Body, BodyCell, BodyRow, InlineEditCell, DropDownCell, RowActionCell, HeaderCell, HeaderTitle, Navigation, TableResults, RowsPerPage, Pagination, PaginationNumericButtons, PaginationArrowButton, PaginationNumericButton, NoDataPlaceholder, LoadingPlaceholder, Scrollable, };
119
+ export { ResizingBar, Header, Body, BodyCell, BodyRow, InlineEditCell, DropDownCell, RowActionCell, HeaderCell, HeaderTitle, Navigation, TableResults, RowsPerPage, Pagination, PaginationNumericButtons, PaginationArrowButton, PaginationNumericButton, NoDataPlaceholder, NoDataIllustration, LoadingPlaceholder, Scrollable, };
@@ -43,10 +43,9 @@ export declare const DataGridComponents: {
43
43
  PaginationNumericButton: ({ currentIndex, isSelected, children, innerProps, }: import("./Components").PaginationNumericButtonProps) => import("react/jsx-runtime").JSX.Element;
44
44
  PaginationArrowButton: ({ action, children, innerProps, }: import("./Components").PaginationArrowButtonProps) => import("react/jsx-runtime").JSX.Element;
45
45
  LoadingPlaceholder: ({ children, innerProps, }: import("./Components").CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
46
- NoDataPlaceholder: (({ children, innerProps, }: import("./Components").CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element) & {
47
- Content: ({ children, innerProps, }: import("./Components").CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
48
- Illustration: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
49
- };
46
+ NoDataPlaceholder: ({ children, innerProps, }: import("./Components").CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
47
+ NoDataIllustration: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
48
+ NoDataPlaceholderContentWrapper: ({ children, innerProps, }: import("./Components").CommonInnerProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
50
49
  Scrollable: ({ children, innerProps }: import("./Components").CommonInnerProps) => import("react/jsx-runtime").JSX.Element;
51
50
  };
52
51
  declare enum BorderStyleEnum {
@@ -28,11 +28,10 @@ export interface DialogBaseProps {
28
28
  htmlAttributes?: HtmlAttributes<'div'>;
29
29
  }
30
30
  export declare enum DialogCloseReason {
31
- BACKDROP_CLICK = "backdropClick",
32
31
  ESCAPE_KEY_DOWN = "escapeKeyDown",
33
32
  CLOSE_BUTTON_CLICK = "closeButtonClick"
34
33
  }
35
- export type DialogType = 'info' | 'success' | 'warning' | 'danger';
34
+ export type DialogType = 'info' | 'warning' | 'danger';
36
35
  export interface DialogProps extends Omit<ModalProps, 'onClose'> {
37
36
  isOpen: boolean;
38
37
  type?: DialogType;
@@ -43,17 +42,26 @@ export interface DialogProps extends Omit<ModalProps, 'onClose'> {
43
42
  }
44
43
  export declare const Dialog: {
45
44
  ({ isOpen, onClose, children, type, size, hasDisabledCloseButton, modalProps, htmlAttributes, }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
46
- Actions: ({ children, className, htmlAttributes, }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element;
47
- Header: ({ children, className, htmlAttributes, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
48
- Subtitle: ({ children, className, htmlAttributes, }: DialogSubtitleProps) => import("react/jsx-runtime").JSX.Element;
49
- Description: ({ children, className, htmlAttributes, }: DialogDescriptionProps) => import("react/jsx-runtime").JSX.Element;
50
- Content: ({ children, className, htmlAttributes, }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
45
+ Actions: React.ForwardRefExoticComponent<{
46
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
47
+ as?: React.ElementType<any> | undefined;
48
+ } & DialogBaseProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
49
+ Header: React.ForwardRefExoticComponent<{
50
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
51
+ as?: React.ElementType<any> | undefined;
52
+ } & Omit<DialogBaseProps, "children"> & {
53
+ children?: React.ReactNode;
54
+ } & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
55
+ Subtitle: React.ForwardRefExoticComponent<{
56
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
57
+ as?: React.ElementType<any> | undefined;
58
+ } & DialogBaseProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
59
+ Description: React.ForwardRefExoticComponent<{
60
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
61
+ as?: React.ElementType<any> | undefined;
62
+ } & DialogBaseProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
63
+ Content: React.ForwardRefExoticComponent<{
64
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
65
+ as?: React.ElementType<any> | undefined;
66
+ } & DialogBaseProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
51
67
  };
52
- type DialogActionsProps = DialogBaseProps;
53
- type DialogHeaderProps = Omit<DialogBaseProps, 'children'> & {
54
- children?: React.ReactNode;
55
- };
56
- type DialogSubtitleProps = DialogBaseProps;
57
- type DialogDescriptionProps = DialogBaseProps;
58
- type DialogContentProps = DialogBaseProps;
59
- export {};
@@ -51,6 +51,8 @@ export interface DropzoneProps {
51
51
  htmlAttributes?: HtmlAttributes<'div'>;
52
52
  /** classNames */
53
53
  className?: string;
54
+ /** Extra styles */
55
+ style?: React.CSSProperties;
54
56
  }
55
57
  export interface DropzoneLoadingProgressBarProps {
56
58
  /** The percentage of the progress bar. */
@@ -83,4 +83,4 @@ export interface InlineEditProps {
83
83
  export declare const InlineEdit: React.ForwardRefExoticComponent<{
84
84
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
85
85
  as?: React.ElementType<any> | undefined;
86
- } & InlineEditProps & React.RefAttributes<unknown>>;
86
+ } & InlineEditProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -19,7 +19,6 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type HtmlAttributes } from '../_common/types';
23
22
  /**
24
23
  *
25
24
  *
@@ -37,6 +36,8 @@ export interface EventTypeLabelProps {
37
36
  fill?: 'filled' | 'outlined' | 'semi-filled' | 'clean';
38
37
  /** If label should have an icon */
39
38
  hasIcon?: boolean;
40
- htmlAttributes: HtmlAttributes<'span'>;
41
39
  }
42
- export declare const Label: React.ForwardRefExoticComponent<EventTypeLabelProps & React.RefAttributes<HTMLSpanElement>>;
40
+ export declare const Label: React.ForwardRefExoticComponent<{
41
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
42
+ as?: React.ElementType<any> | undefined;
43
+ } & EventTypeLabelProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -19,7 +19,6 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type HtmlAttributes } from '../_common/types';
23
22
  /**
24
23
  *
25
24
  *
@@ -29,8 +28,6 @@ import { type HtmlAttributes } from '../_common/types';
29
28
  */
30
29
  export type LoadingSpinnerProps = {
31
30
  size?: 'small' | 'medium' | 'large';
32
- className?: string;
33
- htmlAttributes?: HtmlAttributes<'div'>;
34
31
  };
35
32
  /**
36
33
  *
@@ -39,4 +36,7 @@ export type LoadingSpinnerProps = {
39
36
  *
40
37
  *
41
38
  */
42
- export declare const LoadingSpinner: React.ForwardRefExoticComponent<LoadingSpinnerProps & React.RefAttributes<HTMLDivElement>>;
39
+ export declare const LoadingSpinner: React.ForwardRefExoticComponent<{
40
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
41
+ as?: React.ElementType<any> | undefined;
42
+ } & LoadingSpinnerProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -47,7 +47,7 @@ export declare const Popover: {
47
47
  Content: React.ForwardRefExoticComponent<{
48
48
  htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
49
49
  as?: React.ElementType<any> | undefined;
50
- } & PopoverContentProps & React.RefAttributes<unknown>>;
50
+ } & PopoverContentProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
51
51
  };
52
52
  export interface PopoverTriggerProps {
53
53
  children: React.ReactNode;
@@ -28,4 +28,7 @@ export interface ProgressBarProps {
28
28
  /** HTML attributes */
29
29
  htmlAttributes?: HtmlAttributes<'div'>;
30
30
  }
31
- export declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
31
+ export declare const ProgressBar: React.ForwardRefExoticComponent<{
32
+ htmlAttributes?: HtmlAttributes<React.ElementType<any>> | undefined;
33
+ as?: React.ElementType<any> | undefined;
34
+ } & ProgressBarProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -48,6 +48,6 @@ declare const SegmentedControl: SegmentControlComponent & {
48
48
  className?: string;
49
49
  children?: React.ReactNode;
50
50
  value: string;
51
- } & React.RefAttributes<unknown>>;
51
+ } & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
52
52
  };
53
53
  export { SegmentedControl };
@@ -44,7 +44,7 @@ export type SideNavigationListProps = {
44
44
  /** HTML attributes */
45
45
  htmlAttributes?: HtmlAttributes<'ul'>;
46
46
  };
47
- export interface SideNavigationItemProps {
47
+ export type SideNavigationItemProps = {
48
48
  icon?: React.ReactNode;
49
49
  children?: React.ReactNode;
50
50
  isSelected?: boolean;
@@ -52,7 +52,12 @@ export interface SideNavigationItemProps {
52
52
  isSelectable?: boolean;
53
53
  className?: string;
54
54
  style?: React.CSSProperties;
55
- }
55
+ } & ({
56
+ as: 'button';
57
+ onClick: () => void;
58
+ } | {
59
+ as?: React.ElementType;
60
+ });
56
61
  type SideNavigationItemComponent = <T extends React.ElementType = 'a'>(props: PolymorphicComponentPropsWithRef<T, SideNavigationItemProps>) => React.ReactNode | null;
57
62
  export interface SideNavigationItemBadgeProps {
58
63
  children?: number;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type HtmlAttributes } from '../_common/types';
22
+ import { type PolymorphicComponentProps, type HtmlAttributes } from '../_common/types';
23
23
  export interface SliderPropsBase {
24
24
  /** Forwards the props to the slider container's wrapper */
25
25
  /** Forwards the input element(s) of the slider */
@@ -75,5 +75,5 @@ type RangeSlider = SliderPropsBase & {
75
75
  className?: string;
76
76
  };
77
77
  export type SliderProps = SingleSlider | RangeSlider;
78
- export declare const Slider: (props: SliderProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
78
+ export declare const Slider: <T extends React.ElementType = "div">(props: PolymorphicComponentProps<T, SliderProps> & React.RefAttributes<unknown>) => React.ReactElement | null;
79
79
  export {};
@@ -19,11 +19,11 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import { type HtmlAttributes } from '../_common/types';
23
22
  export interface StatusIndicatorProps {
24
23
  /** Status indicator type. Defaults to "unknown". */
25
24
  type?: 'unknown' | 'success' | 'info' | 'warning' | 'danger';
26
- htmlAttributes?: HtmlAttributes<'span'>;
27
- className?: string;
28
25
  }
29
- export declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
26
+ export declare const StatusIndicator: React.ForwardRefExoticComponent<{
27
+ htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
28
+ as?: React.ElementType<any> | undefined;
29
+ } & StatusIndicatorProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
@@ -34,6 +34,7 @@ export interface CommonTagProps {
34
34
  /** Size of the tag */
35
35
  size?: 'small' | 'medium' | 'large';
36
36
  className?: string;
37
+ style?: React.CSSProperties;
37
38
  htmlAttributes?: HtmlAttributes<'div'>;
38
39
  }
39
40
  export interface RemovableTagProps extends CommonTagProps {
@@ -58,8 +58,8 @@ export interface TextAreaProps {
58
58
  */
59
59
  style?: React.CSSProperties;
60
60
  isReadOnly?: boolean;
61
- value?: string;
62
- placeholder?: string;
61
+ value?: React.ComponentPropsWithoutRef<'textarea'>['value'];
62
+ placeholder?: React.ComponentPropsWithoutRef<'textarea'>['placeholder'];
63
63
  }
64
64
  /**
65
65
  *
@@ -37,7 +37,9 @@ export interface TextInputProps {
37
37
  isOptional?: boolean;
38
38
  isDisabled?: boolean;
39
39
  isRequired?: boolean;
40
- value?: string;
40
+ value?: React.ComponentPropsWithoutRef<'input'>['value'];
41
+ placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];
42
+ onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];
41
43
  /** Displays with fluid width */
42
44
  isFluid?: boolean;
43
45
  /** Information to be displayed in the information tooltip */
@@ -46,6 +48,7 @@ export interface TextInputProps {
46
48
  label?: string | React.ReactNode;
47
49
  /** Classname to the `input` element */
48
50
  className?: string;
51
+ style?: React.CSSProperties;
49
52
  /** Pass props to the underlying Tip component */
50
53
  tooltipProps?: TooltipObjectProps;
51
54
  htmlAttributes?: HtmlAttributes<'input'>;
@@ -29,9 +29,10 @@ export interface TooltipProps {
29
29
  placement?: Placement;
30
30
  isOpen?: boolean;
31
31
  type: 'simple' | 'rich';
32
+ isPortaled?: boolean;
32
33
  onOpenChange?: (open: boolean) => void;
33
34
  }
34
- export declare function Tooltip({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function Tooltip({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
35
36
  export declare namespace Tooltip {
36
37
  var Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
37
38
  var Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLElement>>;
@@ -26,11 +26,13 @@ export interface TooltipOptions {
26
26
  isOpen?: boolean;
27
27
  onOpenChange?: (open: boolean) => void;
28
28
  type?: 'simple' | 'rich';
29
+ isPortaled?: boolean;
29
30
  }
30
- export declare function useTooltip({ isInitialOpen, placement, isOpen: controlledOpen, onOpenChange: setControlledOpen, type, }?: TooltipOptions): {
31
+ export declare function useTooltip({ isInitialOpen, placement, isOpen: controlledOpen, onOpenChange: setControlledOpen, type, isPortaled, }?: TooltipOptions): {
31
32
  isOpen: boolean;
32
33
  setOpen: (open: boolean) => void;
33
34
  type: 'simple' | 'rich';
35
+ isPortaled: boolean;
34
36
  } & UseInteractionsReturn & UseFloatingReturn<ReferenceType>;
35
37
  type ContextType = ReturnType<typeof useTooltip> | null;
36
38
  export declare const TooltipContext: import("react").Context<ContextType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "3.0.0-alpha-9886872",
3
+ "version": "3.0.0-alpha-5f92d5f",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -66,7 +66,7 @@
66
66
  "@tanstack/react-table": "8.20.5",
67
67
  "react": ">=16.8.0",
68
68
  "react-dom": ">=16.8.0",
69
- "@neo4j-ndl/base": "^3.0.0-alpha-9886872"
69
+ "@neo4j-ndl/base": "^3.0.0-alpha-5f92d5f"
70
70
  },
71
71
  "dependencies": {
72
72
  "@dnd-kit/core": "6.1.0",
@@ -93,7 +93,7 @@
93
93
  "sonner": "1.4.41",
94
94
  "tinycolor2": "1.6.0",
95
95
  "usehooks-ts": "3.1.0",
96
- "@neo4j-ndl/base": "3.0.0-alpha-9886872"
96
+ "@neo4j-ndl/base": "3.0.0-alpha-5f92d5f"
97
97
  },
98
98
  "scripts": {
99
99
  "generate-component": "node ./scripts/component-generator.js",