@up42/up-components 4.7.2 → 4.9.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.
@@ -0,0 +1,30 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { CardProps } from '@mui/material';
3
+ export type FeatureCardProps = CardProps & {
4
+ banner?: ReactNode;
5
+ header?: {
6
+ title: ReactNode;
7
+ actions?: ReactNode;
8
+ };
9
+ footer?: {
10
+ info?: ReactNode;
11
+ actions?: ReactNode;
12
+ };
13
+ /**
14
+ * Whether the card is selectable.
15
+ */
16
+ isSelectable?: boolean;
17
+ /**
18
+ * Applies the selected state to the card from the parent.
19
+ */
20
+ selected?: boolean;
21
+ /**
22
+ * Whether the card is hoverable.
23
+ */
24
+ isHoverable?: boolean;
25
+ /**
26
+ * Applies the hovered state to the card from the parent.
27
+ */
28
+ hovered?: boolean;
29
+ };
30
+ export declare const FeatureCard: ({ children, header, footer, banner, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { SxProps } from '@mui/material';
3
+ import { IconProps } from 'components/Icon/Icon';
4
+ export type IconAction = {
5
+ name: IconProps['name'];
6
+ tooltip?: string;
7
+ isActive?: boolean;
8
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
+ isDisabled?: boolean;
10
+ sx?: SxProps;
11
+ };
12
+ export type MenuAction = {
13
+ label: string;
14
+ onClick: (event: React.MouseEvent<HTMLLIElement>) => void;
15
+ sx?: SxProps;
16
+ };
17
+ export type FeatureCardHeaderActionsProps = {
18
+ iconActions?: IconAction[];
19
+ menuActions?: MenuAction[];
20
+ };
21
+ export declare const FeatureCardHeaderActions: ({ iconActions, menuActions }: FeatureCardHeaderActionsProps) => React.JSX.Element;
@@ -45,6 +45,8 @@ export { Badge, type BadgeProps } from './components/Badge/Badge';
45
45
  export { Tag, type TagProps } from './components/Tag/Tag';
46
46
  export { DateTime, type DateTimeProps } from './components/DateTime/DateTime';
47
47
  export { Divider, type DividerProps } from './components/Divider/Divider';
48
+ export { FeatureCard, type FeatureCardProps } from './components/FeatureCard/FeatureCard';
49
+ export { FeatureCardHeaderActions, type IconAction, type MenuAction, type FeatureCardHeaderActionsProps, } from './components/FeatureCardHeaderActions/FeatureCardHeaderActions';
48
50
  export { DocumentationPopover, type DocumentationPopoverProps, } from './components/DocumentationPopover/DocumentationPopover';
49
51
  export { CodeInline, type CodeInlineProps } from './components/CodeInline/CodeInline';
50
52
  export { CodeSnippet, type CodeSnippetProps, type CodeSnippetItemProps } from './components/CodeSnippet/CodeSnippet';