@neo4j-ndl/react 3.0.0-alpha-5f92d5f → 3.0.0-alpha-328a5a4
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/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/avatar/Avatar.js.map +1 -1
- package/lib/cjs/banner/Banner.js +3 -2
- package/lib/cjs/banner/Banner.js.map +1 -1
- package/lib/cjs/breadcrumbs/Breadcrumbs.js +2 -2
- package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/cjs/button/Button.js.map +1 -1
- package/lib/cjs/button/IconButton.js +1 -1
- package/lib/cjs/button/IconButton.js.map +1 -1
- package/lib/cjs/button/IconButtonArray.js +1 -1
- package/lib/cjs/button/IconButtonArray.js.map +1 -1
- package/lib/cjs/callout/Callout.js.map +1 -1
- package/lib/cjs/charts/ChartTooltip.js +1 -1
- package/lib/cjs/charts/ChartTooltip.js.map +1 -1
- package/lib/cjs/charts/Charts.js.map +1 -1
- package/lib/cjs/code/Code.js +1 -1
- package/lib/cjs/code/Code.js.map +1 -1
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +4 -6
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/divider/Divider.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js +7 -0
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/layout/Box.js.map +1 -1
- package/lib/cjs/layout/Flex.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/cjs/{dropdown → select}/Overrides.js +2 -2
- package/lib/cjs/select/Overrides.js.map +1 -0
- package/lib/cjs/{dropdown/Dropdown.js → select/Select.js} +4 -4
- package/lib/cjs/select/Select.js.map +1 -0
- package/lib/cjs/{dropdown → select}/index.js +1 -1
- package/lib/cjs/select/index.js.map +1 -0
- package/lib/cjs/{dropdown → select}/types.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/slider/Slider.js.map +1 -1
- package/lib/cjs/status-indicator/StatusIndicator.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/text-link/TextLink.js.map +1 -1
- package/lib/cjs/typography/Typography.js +3 -3
- package/lib/cjs/typography/Typography.js.map +1 -1
- package/lib/cjs/typography/types.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/esm/accordion/Accordion.js.map +1 -1
- package/lib/esm/avatar/Avatar.js.map +1 -1
- package/lib/esm/banner/Banner.js +3 -2
- package/lib/esm/banner/Banner.js.map +1 -1
- package/lib/esm/breadcrumbs/Breadcrumbs.js +2 -2
- package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/esm/button/Button.js.map +1 -1
- package/lib/esm/button/IconButton.js +1 -1
- package/lib/esm/button/IconButton.js.map +1 -1
- package/lib/esm/button/IconButtonArray.js +1 -1
- package/lib/esm/button/IconButtonArray.js.map +1 -1
- package/lib/esm/callout/Callout.js.map +1 -1
- package/lib/esm/charts/ChartTooltip.js +1 -1
- package/lib/esm/charts/ChartTooltip.js.map +1 -1
- package/lib/esm/charts/Charts.js.map +1 -1
- package/lib/esm/code/Code.js +1 -1
- package/lib/esm/code/Code.js.map +1 -1
- package/lib/esm/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/data-grid/Components.js +4 -6
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/dialog/Dialog.js.map +1 -1
- package/lib/esm/divider/Divider.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +1 -1
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js +7 -0
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/layout/Box.js.map +1 -1
- package/lib/esm/layout/Flex.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/esm/{dropdown → select}/Overrides.js +2 -2
- package/lib/esm/select/Overrides.js.map +1 -0
- package/lib/esm/{dropdown/Dropdown.js → select/Select.js} +5 -5
- package/lib/esm/select/Select.js.map +1 -0
- package/lib/esm/{dropdown → select}/index.js +1 -1
- package/lib/esm/select/index.js.map +1 -0
- package/lib/esm/{dropdown → select}/types.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/slider/Slider.js.map +1 -1
- package/lib/esm/status-indicator/StatusIndicator.js.map +1 -1
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/text-link/TextLink.js.map +1 -1
- package/lib/esm/typography/Typography.js +3 -3
- package/lib/esm/typography/Typography.js.map +1 -1
- package/lib/esm/typography/types.js.map +1 -1
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/_common/CodeBlockWrapper.d.ts +5 -3
- package/lib/types/_common/types.d.ts +26 -18
- package/lib/types/accordion/Accordion.d.ts +3 -3
- package/lib/types/avatar/Avatar.d.ts +2 -4
- package/lib/types/banner/Banner.d.ts +8 -6
- package/lib/types/breadcrumbs/Breadcrumbs.d.ts +8 -10
- package/lib/types/button/Button.d.ts +2 -3
- package/lib/types/button/IconButton.d.ts +4 -18
- package/lib/types/button/IconButtonArray.d.ts +7 -8
- package/lib/types/callout/Callout.d.ts +2 -4
- package/lib/types/charts/ChartTooltip.d.ts +19 -12
- package/lib/types/charts/Charts.d.ts +5 -3
- package/lib/types/code/Code.d.ts +2 -2
- package/lib/types/context-menu/ContextMenu.d.ts +12 -23
- package/lib/types/dialog/Dialog.d.ts +10 -23
- package/lib/types/divider/Divider.d.ts +2 -5
- package/lib/types/drawer/Drawer.d.ts +23 -8
- package/lib/types/dropdown-button/DropdownButton.d.ts +2 -4
- package/lib/types/graph-label/GraphLabel.d.ts +2 -3
- package/lib/types/index.d.ts +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts +3 -5
- package/lib/types/label/Label.d.ts +2 -4
- package/lib/types/layout/Box.d.ts +2 -3
- package/lib/types/layout/Flex.d.ts +2 -4
- package/lib/types/loading-spinner/LoadingSpinner.d.ts +3 -5
- package/lib/types/popover/Popover.d.ts +2 -4
- package/lib/types/progress-bar/ProgressBar.d.ts +3 -6
- package/lib/types/segmented-control/SegmentedControl.d.ts +13 -12
- package/lib/types/{dropdown → select}/Overrides.d.ts +6 -6
- package/lib/types/{dropdown/Dropdown.d.ts → select/Select.d.ts} +3 -5
- package/lib/types/{dropdown → select}/index.d.ts +1 -1
- package/lib/types/{dropdown → select}/types.d.ts +8 -8
- package/lib/types/side-navigation/SideNavigation.d.ts +3 -4
- package/lib/types/slider/Slider.d.ts +3 -3
- package/lib/types/status-indicator/StatusIndicator.d.ts +3 -5
- package/lib/types/tabs/Tabs.d.ts +18 -7
- package/lib/types/text-link/TextLink.d.ts +2 -4
- package/lib/types/typography/Typography.d.ts +22 -12
- package/lib/types/typography/types.d.ts +14 -1
- package/lib/types/wizard/Wizard.d.ts +3 -5
- package/package.json +3 -3
- package/lib/cjs/dropdown/Dropdown.js.map +0 -1
- package/lib/cjs/dropdown/Overrides.js.map +0 -1
- package/lib/cjs/dropdown/index.js.map +0 -1
- package/lib/esm/dropdown/Dropdown.js.map +0 -1
- package/lib/esm/dropdown/Overrides.js.map +0 -1
- package/lib/esm/dropdown/index.js.map +0 -1
- /package/lib/cjs/{dropdown → select}/types.js +0 -0
- /package/lib/esm/{dropdown → select}/types.js +0 -0
|
@@ -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
|
|
22
|
+
import { type PolymorphicPropsWithRef, type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
*
|
|
@@ -42,7 +42,6 @@ export type BannerActionsProps = {
|
|
|
42
42
|
} | {
|
|
43
43
|
as: React.ElementType;
|
|
44
44
|
});
|
|
45
|
-
type BannerActionsComponent = <T extends React.ElementType = 'a'>(props: PolymorphicComponentPropsWithRef<T, BannerActionsProps>) => React.ReactNode | null;
|
|
46
45
|
export interface BannerCommonProps {
|
|
47
46
|
/** Title of the banner */
|
|
48
47
|
title?: string | React.ReactNode;
|
|
@@ -57,7 +56,6 @@ export interface BannerCommonProps {
|
|
|
57
56
|
hasIcon?: boolean;
|
|
58
57
|
/** Shows Action buttons in the footer */
|
|
59
58
|
actions?: React.ComponentProps<typeof BannerActions>[];
|
|
60
|
-
htmlAttributes?: HtmlAttributes<'div'>;
|
|
61
59
|
children?: React.ReactNode;
|
|
62
60
|
className?: string;
|
|
63
61
|
}
|
|
@@ -93,8 +91,12 @@ type NonCloseableBannerProps = {
|
|
|
93
91
|
type BannerCloseProps = CloseableBannerProps | NonCloseableBannerProps;
|
|
94
92
|
export type BannerProps = BannerCommonProps & BannerCloseProps & BannerUsageProps;
|
|
95
93
|
export type BannerType = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
96
|
-
declare const BannerActions:
|
|
97
|
-
declare const BannerNamespace: React.ForwardRefExoticComponent<
|
|
98
|
-
|
|
94
|
+
declare const BannerActions: PolymorphicForwardRefExoticComponent<'a', BannerActionsProps>;
|
|
95
|
+
declare const BannerNamespace: Omit<React.ForwardRefExoticComponent<BannerProps & {
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
}>, "$$typeof"> & Omit<React.ExoticComponent<BannerProps & {
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
}>, never> & (<InstanceT extends React.ElementType = "div">(props: PolymorphicPropsWithRef<InstanceT, BannerProps>) => React.ReactElement | null) & {
|
|
100
|
+
Actions: PolymorphicForwardRefExoticComponent<"a", BannerActionsProps>;
|
|
99
101
|
};
|
|
100
102
|
export { BannerNamespace as Banner };
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { type ContextMenuProps } from '../context-menu';
|
|
23
|
-
import { type
|
|
23
|
+
import { type PolymorphicPropsWithRef, type PolymorphicForwardRefExoticComponent, type PolymorphicPropsWithoutRef, type HtmlAttributes } from '../_common/types';
|
|
24
24
|
export interface BreadcrumbsBaseItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'onClick'> {
|
|
25
25
|
children?: React.ReactNode;
|
|
26
26
|
className?: string;
|
|
@@ -28,8 +28,7 @@ export interface BreadcrumbsBaseItemProps extends Omit<React.HTMLProps<HTMLLIEle
|
|
|
28
28
|
isCurrentPage?: boolean;
|
|
29
29
|
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, href: string) => void;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
export interface BreadcrumbsGroupItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as'> {
|
|
31
|
+
export interface BreadcrumbsGroupItemProps {
|
|
33
32
|
children?: React.ReactNode;
|
|
34
33
|
className?: string;
|
|
35
34
|
}
|
|
@@ -57,7 +56,6 @@ export interface BreadcrumbsEllipsisMenuProps extends Omit<ContextMenuProps, 'is
|
|
|
57
56
|
onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
58
57
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
59
58
|
}
|
|
60
|
-
type BreadcrumbsEllipsisMenuComponent = <T extends React.ElementType = 'span'>(props: PolymorphicComponentPropsWithRef<T, BreadcrumbsEllipsisMenuProps>) => React.ReactNode | null;
|
|
61
59
|
export interface BreadcrumbsMenuItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'onClick'> {
|
|
62
60
|
children: React.ReactNode;
|
|
63
61
|
className?: string;
|
|
@@ -70,25 +68,25 @@ export interface BreadcrumbsProps {
|
|
|
70
68
|
className?: string;
|
|
71
69
|
}
|
|
72
70
|
declare const Breadcrumbs: {
|
|
73
|
-
<T extends React.ElementType = "nav">({ as, children, className, htmlAttributes, }:
|
|
71
|
+
<T extends React.ElementType = "nav">({ as, children, className, htmlAttributes, }: PolymorphicPropsWithoutRef<T, BreadcrumbsMenuItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
74
72
|
displayName: string;
|
|
75
73
|
} & {
|
|
76
|
-
BaseItem:
|
|
74
|
+
BaseItem: PolymorphicForwardRefExoticComponent<"a", BreadcrumbsBaseItemProps>;
|
|
77
75
|
GroupItem: {
|
|
78
|
-
|
|
76
|
+
({ as, children, className, style, htmlAttributes, }: PolymorphicPropsWithRef<"li", BreadcrumbsGroupItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
79
77
|
displayName: string;
|
|
80
78
|
};
|
|
81
79
|
Item: {
|
|
82
|
-
<T extends React.ElementType = "a">({ as, children, className, hasSeparator, href, isCurrentPage, onClick, htmlAttributes, }:
|
|
80
|
+
<T extends React.ElementType = "a">({ as, children, className, hasSeparator, href, isCurrentPage, onClick, htmlAttributes, }: PolymorphicPropsWithRef<T, BreadcrumbsItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
83
81
|
displayName: string;
|
|
84
82
|
};
|
|
85
83
|
ItemMenu: {
|
|
86
84
|
({ children, className, isOpen, onClick, onClose, htmlAttributes, }: BreadcrumbsItemMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
87
85
|
displayName: string;
|
|
88
86
|
};
|
|
89
|
-
EllipsisMenu:
|
|
87
|
+
EllipsisMenu: <T extends React.ElementType = "span">({ as, children, className, isOpen, onClick, onClose, onKeyDown, htmlAttributes, }: PolymorphicPropsWithoutRef<T, BreadcrumbsEllipsisMenuProps>) => import("react/jsx-runtime").JSX.Element;
|
|
90
88
|
MenuItem: {
|
|
91
|
-
<T extends React.ElementType = "span">({ as, children, className, href, isCurrentPage, onClick, htmlAttributes, }:
|
|
89
|
+
<T extends React.ElementType = "span">({ as, children, className, href, isCurrentPage, onClick, htmlAttributes, }: PolymorphicPropsWithoutRef<T, BreadcrumbsMenuItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
92
90
|
displayName: string;
|
|
93
91
|
};
|
|
94
92
|
};
|
|
@@ -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
|
|
22
|
+
import { type HtmlAttributes, type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
*
|
|
@@ -65,6 +65,5 @@ type FilledButtonProps = BaseButtonProps & {
|
|
|
65
65
|
color?: 'primary' | 'danger';
|
|
66
66
|
};
|
|
67
67
|
export type ButtonProps = OutlinedButtonProps | TextButtonProps | FilledButtonProps;
|
|
68
|
-
|
|
69
|
-
export declare const Button: ButtonComponent;
|
|
68
|
+
export declare const Button: PolymorphicForwardRefExoticComponent<'button', ButtonProps>;
|
|
70
69
|
export {};
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { type ButtonSizes } from '../button';
|
|
23
|
-
import { type
|
|
23
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
*
|
|
@@ -28,7 +28,7 @@ import { type PolymorphicComponentPropsWithRef } from '../_common/types';
|
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type IconButtonProps = {
|
|
32
32
|
children: React.ReactNode;
|
|
33
33
|
/** If the icon button is in disabled state */
|
|
34
34
|
isDisabled?: boolean;
|
|
@@ -48,21 +48,7 @@ export interface IconButtonProps {
|
|
|
48
48
|
isActive?: boolean;
|
|
49
49
|
/** aria-label - {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label} */
|
|
50
50
|
ariaLabel: string;
|
|
51
|
-
/** classNames */
|
|
52
|
-
className?: string;
|
|
53
51
|
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
54
52
|
onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
as?: 'button';
|
|
58
|
-
type?: 'button' | 'submit' | 'reset';
|
|
59
|
-
}
|
|
60
|
-
interface IconButtonAsAnchorProps {
|
|
61
|
-
as: 'a';
|
|
62
|
-
href: string;
|
|
63
|
-
}
|
|
64
|
-
type IconButtonComponent = <C extends React.ElementType = 'button'>(props: PolymorphicComponentPropsWithRef<C, IconButtonProps & (IconButtonAsButtonProps | IconButtonAsAnchorProps | {
|
|
65
|
-
as: React.ElementType;
|
|
66
|
-
})>) => React.ReactNode | null;
|
|
67
|
-
export declare const IconButton: IconButtonComponent;
|
|
68
|
-
export {};
|
|
53
|
+
};
|
|
54
|
+
export declare const IconButton: PolymorphicForwardRefExoticComponent<'button', IconButtonProps>;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { type IconButtonProps } from './IconButton';
|
|
23
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
23
24
|
/**
|
|
24
25
|
* Types
|
|
25
26
|
*/
|
|
@@ -33,14 +34,12 @@ export interface IconButtonArrayProps {
|
|
|
33
34
|
export interface CollapsibleButtonWrapperProps {
|
|
34
35
|
children: React.ReactElement<IconButtonProps> | React.ReactElement<IconButtonProps>[];
|
|
35
36
|
}
|
|
36
|
-
export declare const IconButtonArrayComponent:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
as?: React.ElementType<any> | undefined;
|
|
43
|
-
} & IconButtonArrayProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>> & {
|
|
37
|
+
export declare const IconButtonArrayComponent: PolymorphicForwardRefExoticComponent<'div', IconButtonArrayProps>;
|
|
38
|
+
declare const IconButtonArray: Omit<React.ForwardRefExoticComponent<IconButtonArrayProps & {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}>, "$$typeof"> & Omit<React.ExoticComponent<IconButtonArrayProps & {
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}>, never> & (<InstanceT extends React.ElementType = "div">(props: import("../_common/types").PolymorphicPropsWithRef<InstanceT, IconButtonArrayProps>) => React.ReactElement | null) & {
|
|
44
43
|
CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps>;
|
|
45
44
|
};
|
|
46
45
|
export { IconButtonArray };
|
|
@@ -19,6 +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 PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
22
23
|
/**
|
|
23
24
|
*
|
|
24
25
|
*
|
|
@@ -45,7 +46,4 @@ export type CalloutType = 'note' | 'important' | 'example' | 'tip';
|
|
|
45
46
|
*
|
|
46
47
|
*
|
|
47
48
|
*/
|
|
48
|
-
export declare const Callout:
|
|
49
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
50
|
-
as?: React.ElementType<any> | undefined;
|
|
51
|
-
} & CalloutProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
|
|
49
|
+
export declare const Callout: PolymorphicForwardRefExoticComponent<'div', CalloutProps>;
|
|
@@ -27,10 +27,15 @@ export interface ChartTooltipProps {
|
|
|
27
27
|
isOpen?: boolean;
|
|
28
28
|
style: React.CSSProperties;
|
|
29
29
|
}
|
|
30
|
-
export declare const ChartTooltipComponent: React.ForwardRefExoticComponent<{
|
|
31
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
30
|
+
export declare const ChartTooltipComponent: React.ForwardRefExoticComponent<ChartTooltipProps & {
|
|
32
31
|
as?: React.ElementType<any> | undefined;
|
|
33
|
-
|
|
32
|
+
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
33
|
+
className?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
} & React.RefAttributes<unknown>>;
|
|
36
|
+
type ChartTooltipTitleProps = {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
};
|
|
34
39
|
export type ChartTooltipContentProps = {
|
|
35
40
|
leftElement?: React.ReactNode;
|
|
36
41
|
rightElement?: React.ReactNode;
|
|
@@ -41,18 +46,20 @@ export type ChartTooltipContentProps = {
|
|
|
41
46
|
type: 'warning' | 'danger';
|
|
42
47
|
};
|
|
43
48
|
};
|
|
44
|
-
declare const ChartTooltip: React.ForwardRefExoticComponent<{
|
|
45
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
49
|
+
declare const ChartTooltip: React.ForwardRefExoticComponent<ChartTooltipProps & {
|
|
46
50
|
as?: React.ElementType<any> | undefined;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
52
|
+
className?: string;
|
|
53
|
+
style?: React.CSSProperties;
|
|
54
|
+
} & React.RefAttributes<unknown>> & {
|
|
55
|
+
Title: React.ForwardRefExoticComponent<ChartTooltipTitleProps & React.RefAttributes<HTMLSpanElement>>;
|
|
51
56
|
Content: React.ForwardRefExoticComponent<ChartTooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
-
Link: React.ForwardRefExoticComponent<Omit<{
|
|
53
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
57
|
+
Link: React.ForwardRefExoticComponent<Omit<import("../text-link").TextLinkProps & {
|
|
54
58
|
as?: React.ElementType<any> | undefined;
|
|
55
|
-
|
|
59
|
+
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
60
|
+
className?: string;
|
|
61
|
+
style?: React.CSSProperties;
|
|
62
|
+
} & {
|
|
56
63
|
ref?: any;
|
|
57
64
|
}, "ref"> & React.RefAttributes<unknown>>;
|
|
58
65
|
};
|
|
@@ -73,10 +73,12 @@ export interface ChartsProps {
|
|
|
73
73
|
height?: number;
|
|
74
74
|
}
|
|
75
75
|
export declare const ChartsContext: import("react").Context<ChartsContextType>;
|
|
76
|
-
declare const Charts: import("react").ForwardRefExoticComponent<{
|
|
77
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<import("react").ElementType<any>> | undefined;
|
|
76
|
+
declare const Charts: import("react").ForwardRefExoticComponent<ChartsProps & {
|
|
78
77
|
as?: import("react").ElementType<any> | undefined;
|
|
79
|
-
|
|
78
|
+
htmlAttributes?: import("../_common/types").HtmlAttributes<import("react").ElementType<any>> | undefined;
|
|
79
|
+
className?: string;
|
|
80
|
+
style?: import("react").CSSProperties;
|
|
81
|
+
} & import("react").RefAttributes<unknown>> & {
|
|
80
82
|
Chart: import("react").ForwardRefExoticComponent<import("./Chart").ChartProps & import("react").RefAttributes<unknown>> & {
|
|
81
83
|
Line: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Line").LineProps & import("react").RefAttributes<SVGPathElement>>>;
|
|
82
84
|
};
|
package/lib/types/code/Code.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { type IconButton } from '../button';
|
|
23
23
|
import { type LanguageProp } from './languages';
|
|
24
|
-
import { type
|
|
24
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
25
25
|
export interface InlineProps {
|
|
26
26
|
type: 'inline';
|
|
27
27
|
maxHeight?: never;
|
|
@@ -52,5 +52,5 @@ export interface CommonProps {
|
|
|
52
52
|
}
|
|
53
53
|
type ConditionalProps = InlineProps | BlockProps;
|
|
54
54
|
type Props = CommonProps & ConditionalProps;
|
|
55
|
-
export declare const Code:
|
|
55
|
+
export declare const Code: PolymorphicForwardRefExoticComponent<'button', Props>;
|
|
56
56
|
export {};
|
|
@@ -21,20 +21,18 @@
|
|
|
21
21
|
|
|
22
22
|
import React from 'react';
|
|
23
23
|
import { type DividerProps } from '../divider';
|
|
24
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
24
25
|
export interface MenuItemProps {
|
|
25
|
-
title:
|
|
26
|
+
title: React.ReactNode;
|
|
26
27
|
icon?: React.ReactNode;
|
|
27
|
-
description?:
|
|
28
|
+
description?: React.ReactNode;
|
|
28
29
|
isDisabled?: boolean;
|
|
29
30
|
className?: string;
|
|
30
31
|
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
31
32
|
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
32
33
|
children?: React.ReactNode;
|
|
33
34
|
}
|
|
34
|
-
declare const MenuItem:
|
|
35
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
36
|
-
as?: React.ElementType<any> | undefined;
|
|
37
|
-
} & MenuItemProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
|
|
35
|
+
declare const MenuItem: PolymorphicForwardRefExoticComponent<'button', MenuItemProps>;
|
|
38
36
|
export type NestedMenuItemProps = Omit<React.ComponentProps<typeof MenuItem>, 'children'>;
|
|
39
37
|
export interface ContextMenuProps {
|
|
40
38
|
isOpen?: boolean;
|
|
@@ -46,7 +44,7 @@ export interface ContextMenuProps {
|
|
|
46
44
|
className?: string;
|
|
47
45
|
title?: string;
|
|
48
46
|
isDisabled?: boolean;
|
|
49
|
-
description?:
|
|
47
|
+
description?: React.ReactNode;
|
|
50
48
|
}
|
|
51
49
|
export interface MenuItemsProps {
|
|
52
50
|
children: React.ReactNode;
|
|
@@ -56,26 +54,17 @@ export interface MenuSubheaderProps {
|
|
|
56
54
|
}
|
|
57
55
|
export interface MenuHeaderProps {
|
|
58
56
|
/** Header title text */
|
|
59
|
-
title:
|
|
57
|
+
title: React.ReactNode;
|
|
60
58
|
/** Header description text */
|
|
61
|
-
description?:
|
|
59
|
+
description?: React.ReactNode;
|
|
62
60
|
/** Additional classes */
|
|
63
61
|
className?: string;
|
|
64
62
|
}
|
|
65
|
-
declare const Menu: React.ForwardRefExoticComponent<ContextMenuProps & React.RefAttributes<
|
|
66
|
-
Item:
|
|
67
|
-
|
|
68
|
-
|
|
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>>;
|
|
74
|
-
Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLHRElement>>;
|
|
63
|
+
declare const Menu: React.ForwardRefExoticComponent<ContextMenuProps & React.RefAttributes<HTMLDivElement>> & {
|
|
64
|
+
Item: PolymorphicForwardRefExoticComponent<"button", MenuItemProps>;
|
|
65
|
+
Items: PolymorphicForwardRefExoticComponent<"div", MenuItemsProps>;
|
|
66
|
+
Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
67
|
Subheader: (props: MenuSubheaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
-
Header:
|
|
77
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
78
|
-
as?: React.ElementType<any> | undefined;
|
|
79
|
-
} & MenuHeaderProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
|
|
68
|
+
Header: PolymorphicForwardRefExoticComponent<"div", MenuHeaderProps>;
|
|
80
69
|
};
|
|
81
70
|
export { Menu };
|
|
@@ -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 HtmlAttributes, type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
23
23
|
import { type ModalProps } from '../modal';
|
|
24
24
|
export interface DialogBaseProps {
|
|
25
25
|
className?: string;
|
|
@@ -42,26 +42,13 @@ export interface DialogProps extends Omit<ModalProps, 'onClose'> {
|
|
|
42
42
|
}
|
|
43
43
|
export declare const Dialog: {
|
|
44
44
|
({ isOpen, onClose, children, type, size, hasDisabledCloseButton, modalProps, htmlAttributes, }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
-
Actions:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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>>;
|
|
45
|
+
Actions: PolymorphicForwardRefExoticComponent<"div", DialogBaseProps>;
|
|
46
|
+
Header: PolymorphicForwardRefExoticComponent<"h4", DialogHeaderProps>;
|
|
47
|
+
Subtitle: PolymorphicForwardRefExoticComponent<"div", DialogBaseProps>;
|
|
48
|
+
Description: PolymorphicForwardRefExoticComponent<"div", DialogBaseProps>;
|
|
49
|
+
Content: PolymorphicForwardRefExoticComponent<"div", DialogBaseProps>;
|
|
67
50
|
};
|
|
51
|
+
type DialogHeaderProps = Omit<DialogBaseProps, 'children'> & {
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -19,11 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import
|
|
23
|
-
import { type PolymorphicComponentPropsWithRef } from '../_common/types';
|
|
22
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
24
23
|
export interface DividerProps {
|
|
25
24
|
orientation?: 'horizontal' | 'vertical';
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
export declare const Divider: DividerComponent;
|
|
29
|
-
export {};
|
|
26
|
+
export declare const Divider: PolymorphicForwardRefExoticComponent<'div', DividerProps>;
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { FloatingPortal } from '@floating-ui/react';
|
|
22
22
|
import { type ResizableProps } from 're-resizable';
|
|
23
|
-
import React, { type ComponentProps
|
|
24
|
-
import { type
|
|
23
|
+
import React, { type ComponentProps } from 'react';
|
|
24
|
+
import { type HtmlAttributes, type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
25
25
|
export type DrawerPosition = 'left' | 'right';
|
|
26
26
|
export type DrawerType = 'overlay' | 'push';
|
|
27
27
|
export interface DrawerProps {
|
|
@@ -49,12 +49,27 @@ export interface DrawerProps {
|
|
|
49
49
|
*/
|
|
50
50
|
portalProps?: ComponentProps<typeof FloatingPortal>;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
export declare const DrawerComponent: PolymorphicForwardRefExoticComponent<'div', DrawerProps>;
|
|
53
|
+
type DrawerHeaderProps = {
|
|
54
|
+
children: React.ReactNode;
|
|
55
|
+
className?: string;
|
|
56
|
+
htmlAttributes?: HtmlAttributes<'h5'>;
|
|
57
|
+
};
|
|
58
|
+
type DrawerActionsProps = {
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
htmlAttributes?: HtmlAttributes<'div'>;
|
|
62
|
+
};
|
|
63
|
+
type DrawerBodyProps = {
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
className?: string;
|
|
66
|
+
htmlAttributes?: HtmlAttributes<'div'>;
|
|
67
|
+
};
|
|
68
|
+
declare const Drawer: Omit<React.ForwardRefExoticComponent<DrawerProps & {
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}>, "$$typeof"> & Omit<React.ExoticComponent<DrawerProps & {
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
}>, never> & (<InstanceT extends React.ElementType = "div">(props: import("../_common/types").PolymorphicPropsWithRef<InstanceT, DrawerProps>) => React.ReactElement | null) & {
|
|
58
73
|
Header: ({ children, className, ...restProps }: DrawerHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
74
|
Actions: ({ children, className, ...restProps }: DrawerActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
60
75
|
Body: ({ children, className, ...restProps }: DrawerBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React, { type ReactElement } from 'react';
|
|
22
|
-
import { type
|
|
22
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
*
|
|
@@ -50,6 +50,4 @@ export interface DropdownButtonProps {
|
|
|
50
50
|
*
|
|
51
51
|
*
|
|
52
52
|
*/
|
|
53
|
-
|
|
54
|
-
export declare const DropdownButton: DropdownButtonComponent;
|
|
55
|
-
export {};
|
|
53
|
+
export declare const DropdownButton: PolymorphicForwardRefExoticComponent<'button', DropdownButtonProps>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import React from 'react';
|
|
23
|
-
import { type
|
|
23
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
*
|
|
@@ -41,6 +41,5 @@ type GraphLabelProps = {
|
|
|
41
41
|
/** If the element is selected */
|
|
42
42
|
isSelected?: boolean;
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
export declare const GraphLabel: GraphLabelComponent;
|
|
44
|
+
export declare const GraphLabel: PolymorphicForwardRefExoticComponent<'button', GraphLabelProps>;
|
|
46
45
|
export {};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export * from './data-grid';
|
|
|
39
39
|
export * from './text-input';
|
|
40
40
|
export * from './text-area';
|
|
41
41
|
export * from './text-link';
|
|
42
|
-
export * from './
|
|
42
|
+
export * from './select';
|
|
43
43
|
export * from './tag';
|
|
44
44
|
export * from './theme';
|
|
45
45
|
export * from './widget';
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import
|
|
22
|
+
import { type ComponentPropsWithoutRef, type InputHTMLAttributes, type ReactNode } from 'react';
|
|
23
23
|
import { type TooltipObjectProps } from '../_common/input/types';
|
|
24
24
|
import { Typography } from '../typography';
|
|
25
25
|
import { type TypographyVariants } from '../typography/types';
|
|
26
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
26
27
|
export interface InlineEditProps {
|
|
27
28
|
/** Label text */
|
|
28
29
|
label?: ReactNode;
|
|
@@ -80,7 +81,4 @@ export interface InlineEditProps {
|
|
|
80
81
|
/** View mode Typography's props */
|
|
81
82
|
typographyProps?: ComponentPropsWithoutRef<typeof Typography>;
|
|
82
83
|
}
|
|
83
|
-
export declare const InlineEdit:
|
|
84
|
-
htmlAttributes?: import("../_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
85
|
-
as?: React.ElementType<any> | undefined;
|
|
86
|
-
} & InlineEditProps & import("../_common/types").CommonComponentProps & React.RefAttributes<unknown>>;
|
|
84
|
+
export declare const InlineEdit: PolymorphicForwardRefExoticComponent<'div', InlineEditProps>;
|
|
@@ -19,6 +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 PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
22
23
|
/**
|
|
23
24
|
*
|
|
24
25
|
*
|
|
@@ -37,7 +38,4 @@ export interface EventTypeLabelProps {
|
|
|
37
38
|
/** If label should have an icon */
|
|
38
39
|
hasIcon?: boolean;
|
|
39
40
|
}
|
|
40
|
-
export declare const Label:
|
|
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>>;
|
|
41
|
+
export declare const Label: PolymorphicForwardRefExoticComponent<'span', EventTypeLabelProps>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { type Radius, type Spacing } from './types';
|
|
23
|
-
import { type
|
|
23
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
24
24
|
type BaseBoxProps = {
|
|
25
25
|
/**
|
|
26
26
|
* @default tokens.space['4']
|
|
@@ -53,10 +53,9 @@ type BaseBoxProps = {
|
|
|
53
53
|
children?: React.ReactNode;
|
|
54
54
|
style?: React.CSSProperties;
|
|
55
55
|
};
|
|
56
|
-
type BoxComponent = <T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, BaseBoxProps>) => React.ReactNode | null;
|
|
57
56
|
/**
|
|
58
57
|
* Box is a general-purpose container that allows for controlled use of design tokens.
|
|
59
58
|
* Use the given props to configure display behavior and styling that aligns with Needle's tokens.
|
|
60
59
|
*/
|
|
61
|
-
export declare const Box:
|
|
60
|
+
export declare const Box: PolymorphicForwardRefExoticComponent<'div', BaseBoxProps>;
|
|
62
61
|
export {};
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import React from 'react';
|
|
23
23
|
import { type Radius, type Spacing } from './types';
|
|
24
|
-
import { type
|
|
25
|
-
type AllowedFlexElements = 'div' | 'span' | 'ul' | 'ol' | 'li';
|
|
24
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
26
25
|
type BaseFlexProps = {
|
|
27
26
|
/**
|
|
28
27
|
* @default tokens.space['4']
|
|
@@ -67,10 +66,9 @@ type BaseFlexProps = {
|
|
|
67
66
|
children?: React.ReactNode;
|
|
68
67
|
style?: React.CSSProperties;
|
|
69
68
|
};
|
|
70
|
-
type FlexComponent = <T extends AllowedFlexElements = 'div'>(props: PolymorphicComponentPropsWithRef<T, BaseFlexProps>) => React.ReactNode | null;
|
|
71
69
|
/**
|
|
72
70
|
* Flex is a general-purpose container that helps
|
|
73
71
|
* lay out components with consistent spacing in a row or column.
|
|
74
72
|
*/
|
|
75
|
-
export declare const Flex:
|
|
73
|
+
export declare const Flex: PolymorphicForwardRefExoticComponent<'div', BaseFlexProps>;
|
|
76
74
|
export {};
|
|
@@ -18,7 +18,8 @@
|
|
|
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
|
-
|
|
21
|
+
|
|
22
|
+
import { type PolymorphicForwardRefExoticComponent } from '../_common/types';
|
|
22
23
|
/**
|
|
23
24
|
*
|
|
24
25
|
*
|
|
@@ -36,7 +37,4 @@ export type LoadingSpinnerProps = {
|
|
|
36
37
|
*
|
|
37
38
|
*
|
|
38
39
|
*/
|
|
39
|
-
export declare const LoadingSpinner:
|
|
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>>;
|
|
40
|
+
export declare const LoadingSpinner: PolymorphicForwardRefExoticComponent<'div', LoadingSpinnerProps>;
|