@up42/up-components 5.3.1 → 5.4.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.
@@ -11,10 +11,6 @@ export type FeatureCardProps = CardProps & {
11
11
  info?: ReactNode;
12
12
  actions?: ReactNode;
13
13
  };
14
- /**
15
- * Whether the card is selectable.
16
- */
17
- isSelectable?: boolean;
18
14
  /**
19
15
  * Applies the selected state to the card from the parent.
20
16
  */
@@ -45,10 +41,6 @@ export declare const FeatureCard: React.ForwardRefExoticComponent<Omit<import("@
45
41
  info?: ReactNode;
46
42
  actions?: ReactNode;
47
43
  } | undefined;
48
- /**
49
- * Whether the card is selectable.
50
- */
51
- isSelectable?: boolean | undefined;
52
44
  /**
53
45
  * Applies the selected state to the card from the parent.
54
46
  */
@@ -5,7 +5,7 @@ export type IconAction = {
5
5
  name: IconProps['name'];
6
6
  tooltip?: string;
7
7
  isActive?: boolean;
8
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
8
+ onClick: (event: React.MouseEvent<HTMLElement>) => void;
9
9
  isDisabled?: boolean;
10
10
  sx?: SxProps;
11
11
  };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ToggleButtonProps as MUIToggleButtonProps } from '@mui/material/ToggleButton';
3
+ import { IconProps } from 'components/Icon/Icon';
4
+ type ToggleButtonColor = 'primary' | 'info';
5
+ export type ToggleButtonProps = Omit<MUIToggleButtonProps, 'size' | 'color' | 'value'> & {
6
+ size?: 'medium' | 'slim';
7
+ color?: ToggleButtonColor;
8
+ iconName: IconProps['name'];
9
+ value?: string;
10
+ };
11
+ /**
12
+ * Documentation: https://up-components.up42.com/?path=/docs/data-entry-togglebutton--docs
13
+ */
14
+ export declare const ToggleButton: ({ size, color, value, iconName, ...props }: ToggleButtonProps) => React.JSX.Element;
15
+ export {};
@@ -58,6 +58,7 @@ export { CodeSnippet, type CodeSnippetProps, type CodeSnippetItemProps } from '.
58
58
  export { Table, TableBody, TableCell, TableHead, TableContainer, TableRow, TableFooter, TablePagination, TableSortLabel, type TableProps, type TableBodyProps, type TableCellProps, type TableHeadProps, type TableContainerProps, type TableRowProps, type TableFooterProps, type TablePaginationProps, type TableSortLabelProps, } from './components/Table/Table';
59
59
  export { DataGrid, GridRow, GridCell, GridEditInputCell, GridCellModes, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridRowCount, GridSelectedRowCount, gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridRowsLookupSelector, GRID_DETAIL_PANEL_TOGGLE_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, useGridApiContext, useGridApiRef, useGridSelector, } from './components/DataGrid/DataGrid';
60
60
  export type { GridColDef, GridRenderEditCellParams, GridCellModesModel, GridCellParams, GridRenderCellParams, GridRowId, GridRowParams, GridRowSelectionModel, GridRowsProp, GridSortModel, GridTreeNodeWithRender, GridColumnHeaderParams, GridEditCellProps, GridInitialState, GridPreProcessEditCellProps, } from './components/DataGrid/DataGrid';
61
+ export { ToggleButton, type ToggleButtonProps } from './components/ToggleButton/ToggleButton';
61
62
  export { capitalize } from './utils/helpers/capitalize';
62
63
  export { copyToClipboard } from './utils/helpers/copyToClipboard';
63
64
  export { formatNumber } from './utils/helpers/formatNumber';
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ import { TableSortLabelProps as TableSortLabelProps$1 } from '@mui/material/Tabl
22
22
  import { TableFooterProps as TableFooterProps$1 } from '@mui/material/TableFooter';
23
23
  import { DataGridPremiumProps } from '@mui/x-data-grid-premium';
24
24
  export { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, GridCell, GridCellModes, GridCellModesModel, GridCellParams, GridColDef, GridColumnHeaderParams, GridEditCellProps, GridEditInputCell, GridFooter, GridInitialState, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPreProcessEditCellProps, GridRenderCellParams, GridRenderEditCellParams, GridRow, GridRowCount, GridRowId, GridRowParams, GridRowSelectionModel, GridRowsProp, GridSelectedRowCount, GridSortModel, GridTreeNodeWithRender, gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridRowsLookupSelector, useGridApiContext, useGridApiRef, useGridSelector } from '@mui/x-data-grid-premium';
25
+ import { ToggleButtonProps as ToggleButtonProps$1 } from '@mui/material/ToggleButton';
25
26
 
26
27
  interface UpComponentsProviderProps extends Omit<ThemeProviderProps, 'theme'> {
27
28
  licenseKey: string;
@@ -5191,10 +5192,6 @@ type FeatureCardProps = CardProps & {
5191
5192
  info?: ReactNode;
5192
5193
  actions?: ReactNode;
5193
5194
  };
5194
- /**
5195
- * Whether the card is selectable.
5196
- */
5197
- isSelectable?: boolean;
5198
5195
  /**
5199
5196
  * Applies the selected state to the card from the parent.
5200
5197
  */
@@ -5225,10 +5222,6 @@ declare const FeatureCard: React__default.ForwardRefExoticComponent<Omit<_mui_ma
5225
5222
  info?: ReactNode;
5226
5223
  actions?: ReactNode;
5227
5224
  } | undefined;
5228
- /**
5229
- * Whether the card is selectable.
5230
- */
5231
- isSelectable?: boolean | undefined;
5232
5225
  /**
5233
5226
  * Applies the selected state to the card from the parent.
5234
5227
  */
@@ -5262,7 +5255,7 @@ type IconAction = {
5262
5255
  name: IconProps['name'];
5263
5256
  tooltip?: string;
5264
5257
  isActive?: boolean;
5265
- onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
5258
+ onClick: (event: React__default.MouseEvent<HTMLElement>) => void;
5266
5259
  isDisabled?: boolean;
5267
5260
  sx?: SxProps;
5268
5261
  };
@@ -5455,6 +5448,18 @@ declare const TableFooter: ({ children, ...props }: TableFooterProps) => React__
5455
5448
  */
5456
5449
  declare const DataGrid: ({ autoHeight, pageSizeOptions, disableRowSelectionOnClick, pagination, ...props }: DataGridPremiumProps) => React__default.JSX.Element;
5457
5450
 
5451
+ type ToggleButtonColor = 'primary' | 'info';
5452
+ type ToggleButtonProps = Omit<ToggleButtonProps$1, 'size' | 'color' | 'value'> & {
5453
+ size?: 'medium' | 'slim';
5454
+ color?: ToggleButtonColor;
5455
+ iconName: IconProps['name'];
5456
+ value?: string;
5457
+ };
5458
+ /**
5459
+ * Documentation: https://up-components.up42.com/?path=/docs/data-entry-togglebutton--docs
5460
+ */
5461
+ declare const ToggleButton: ({ size, color, value, iconName, ...props }: ToggleButtonProps) => React__default.JSX.Element;
5462
+
5458
5463
  /**
5459
5464
  * It should to be noted that this helper isn't equivalent to `text-transform: capitalize`.
5460
5465
  * A strict capitalization should uppercase the first letter of each word in the sentence.
@@ -5647,5 +5652,5 @@ type ContextState = {
5647
5652
  */
5648
5653
  declare const useAlert: () => ContextState;
5649
5654
 
5650
- export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EditTagsButton, EmptyState, FeatureCard, FeatureCardHeader, FeatureCardHeaderActions, FeatureFlagCheckbox, 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, StatusLight, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, TagsList, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination, useToggle };
5651
- export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EditTagsButtonProps, EmptyStateProps, FeatureCardHeaderActionsProps, FeatureCardHeaderProps, FeatureCardProps, FeatureFlagCheckboxProps, 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, StatusLightProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagItem, TagProps, TagsListProps, TypographyProps, UseToggleResult };
5655
+ export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EditTagsButton, EmptyState, FeatureCard, FeatureCardHeader, FeatureCardHeaderActions, FeatureFlagCheckbox, 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, StatusLight, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, TagsList, ToggleButton, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination, useToggle };
5656
+ export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EditTagsButtonProps, EmptyStateProps, FeatureCardHeaderActionsProps, FeatureCardHeaderProps, FeatureCardProps, FeatureFlagCheckboxProps, 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, StatusLightProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagItem, TagProps, TagsListProps, ToggleButtonProps, TypographyProps, UseToggleResult };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",