@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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/FeatureCard/FeatureCard.d.ts +30 -0
- package/dist/cjs/types/components/FeatureCardHeaderActions/FeatureCardHeaderActions.d.ts +21 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/FeatureCard/FeatureCard.d.ts +30 -0
- package/dist/esm/types/components/FeatureCardHeaderActions/FeatureCardHeaderActions.d.ts +21 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +56 -4
- package/package.json +1 -1
|
@@ -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';
|
package/dist/index.d.ts
CHANGED
|
@@ -4641,14 +4641,14 @@ declare namespace icons {
|
|
|
4641
4641
|
};
|
|
4642
4642
|
}
|
|
4643
4643
|
|
|
4644
|
-
type IconProps = {
|
|
4644
|
+
type IconProps$1 = {
|
|
4645
4645
|
name: keyof typeof icons;
|
|
4646
4646
|
} & Omit<SvgIconProps, 'children' | 'inheritViewBox' | 'shapeRendering' | 'viewBox'>;
|
|
4647
4647
|
/**
|
|
4648
4648
|
* Documentation: https://up-components.up42.com/?path=/docs/data-display-icon--docs
|
|
4649
4649
|
* Icons: https://up-components.up42.com/?path=/docs/icons--docs
|
|
4650
4650
|
*/
|
|
4651
|
-
declare const Icon: ({ name, ...props }: IconProps) => React__default.JSX.Element;
|
|
4651
|
+
declare const Icon: ({ name, ...props }: IconProps$1) => React__default.JSX.Element;
|
|
4652
4652
|
|
|
4653
4653
|
var _path$4, _path2$4, _path3$4, _path4$4, _path5$4, _path6$4, _path7$4, _path8$4, _circle, _path9$3, _path0$3;
|
|
4654
4654
|
function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
|
|
@@ -5095,6 +5095,58 @@ declare const Divider: React__default.ForwardRefExoticComponent<Omit<Omit<Divide
|
|
|
5095
5095
|
size?: "small" | "large" | "medium" | undefined;
|
|
5096
5096
|
}, "ref"> & React__default.RefAttributes<unknown>>;
|
|
5097
5097
|
|
|
5098
|
+
type FeatureCardProps = CardProps & {
|
|
5099
|
+
banner?: ReactNode;
|
|
5100
|
+
header?: {
|
|
5101
|
+
title: ReactNode;
|
|
5102
|
+
actions?: ReactNode;
|
|
5103
|
+
};
|
|
5104
|
+
footer?: {
|
|
5105
|
+
info?: ReactNode;
|
|
5106
|
+
actions?: ReactNode;
|
|
5107
|
+
};
|
|
5108
|
+
/**
|
|
5109
|
+
* Whether the card is selectable.
|
|
5110
|
+
*/
|
|
5111
|
+
isSelectable?: boolean;
|
|
5112
|
+
/**
|
|
5113
|
+
* Applies the selected state to the card from the parent.
|
|
5114
|
+
*/
|
|
5115
|
+
selected?: boolean;
|
|
5116
|
+
/**
|
|
5117
|
+
* Whether the card is hoverable.
|
|
5118
|
+
*/
|
|
5119
|
+
isHoverable?: boolean;
|
|
5120
|
+
/**
|
|
5121
|
+
* Applies the hovered state to the card from the parent.
|
|
5122
|
+
*/
|
|
5123
|
+
hovered?: boolean;
|
|
5124
|
+
};
|
|
5125
|
+
declare const FeatureCard: ({ children, header, footer, banner, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React__default.JSX.Element;
|
|
5126
|
+
|
|
5127
|
+
type IconProps = {
|
|
5128
|
+
name: keyof typeof icons
|
|
5129
|
+
} & Omit<SvgIconProps, 'children' | 'inheritViewBox' | 'shapeRendering' | 'viewBox'>
|
|
5130
|
+
|
|
5131
|
+
type IconAction = {
|
|
5132
|
+
name: IconProps['name'];
|
|
5133
|
+
tooltip?: string;
|
|
5134
|
+
isActive?: boolean;
|
|
5135
|
+
onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
5136
|
+
isDisabled?: boolean;
|
|
5137
|
+
sx?: SxProps;
|
|
5138
|
+
};
|
|
5139
|
+
type MenuAction = {
|
|
5140
|
+
label: string;
|
|
5141
|
+
onClick: (event: React__default.MouseEvent<HTMLLIElement>) => void;
|
|
5142
|
+
sx?: SxProps;
|
|
5143
|
+
};
|
|
5144
|
+
type FeatureCardHeaderActionsProps = {
|
|
5145
|
+
iconActions?: IconAction[];
|
|
5146
|
+
menuActions?: MenuAction[];
|
|
5147
|
+
};
|
|
5148
|
+
declare const FeatureCardHeaderActions: ({ iconActions, menuActions }: FeatureCardHeaderActionsProps) => React__default.JSX.Element;
|
|
5149
|
+
|
|
5098
5150
|
type DocumentationPopoverProps = {
|
|
5099
5151
|
title: string;
|
|
5100
5152
|
children: React__default.ReactNode;
|
|
@@ -5342,5 +5394,5 @@ type ContextState = {
|
|
|
5342
5394
|
*/
|
|
5343
5395
|
declare const useAlert: () => ContextState;
|
|
5344
5396
|
|
|
5345
|
-
export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EmptyState, FormCheckbox, FormDatePicker, FormDateRangePicker, FormDateRangePickerList, FormDateTimePicker, FormInput, FormRadio, FormSelect, FormSwitch, GridContainer, GridItem, Icon, Illustration, InfoCard, InfoModal, InfoPopover, Input, Link, Loading, Logo, NotFound, PageContainer, PageHeader, Radio, Select, Slider, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination };
|
|
5346
|
-
export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EmptyStateProps, FormCheckboxProps, FormDatePickerProps, FormDateRangePickerListProps, FormDateRangePickerProps, FormDateTimePickerProps, FormInputProps, FormRadioProps, FormSelectProps, FormSwitchProps, GridContainerProps, GridItemProps, IconProps, IllustrationProps, InfoCardProps, InfoModalProps, InfoPopoverProps, InputProps, LinkProps, LoadingProps, LogoProps, NotFoundProps, PageContainerProps, PageHeaderProps, PaginatedResponse, RadioProps, SelectProps, SliderProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagProps, TypographyProps };
|
|
5397
|
+
export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EmptyState, FeatureCard, FeatureCardHeaderActions, FormCheckbox, FormDatePicker, FormDateRangePicker, FormDateRangePickerList, FormDateTimePicker, FormInput, FormRadio, FormSelect, FormSwitch, GridContainer, GridItem, Icon, Illustration, InfoCard, InfoModal, InfoPopover, Input, Link, Loading, Logo, NotFound, PageContainer, PageHeader, Radio, Select, Slider, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination };
|
|
5398
|
+
export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EmptyStateProps, FeatureCardHeaderActionsProps, FeatureCardProps, FormCheckboxProps, FormDatePickerProps, FormDateRangePickerListProps, FormDateRangePickerProps, FormDateTimePickerProps, FormInputProps, FormRadioProps, FormSelectProps, FormSwitchProps, GridContainerProps, GridItemProps, IconAction, IconProps$1 as IconProps, IllustrationProps, InfoCardProps, InfoModalProps, InfoPopoverProps, InputProps, LinkProps, LoadingProps, LogoProps, MenuAction, NotFoundProps, PageContainerProps, PageHeaderProps, PaginatedResponse, RadioProps, SelectProps, SliderProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagProps, TypographyProps };
|