@sphereon/ui-components.ssi-react 0.5.0 → 0.5.1-next.4

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.
@@ -3,7 +3,7 @@ import { Stack } from '@mui/material';
3
3
  import { GoToInputContainer, GoToInputStyled, PaginationContainerStyled, PaginationStyled } from '../../../../styles';
4
4
  import { Localization } from '@sphereon/ui-components.core';
5
5
  const PaginationControls = (props) => {
6
- const { onKeyDown, containerStyle, goToInputId = 'goTo' } = props;
7
- return (_jsxs(PaginationContainerStyled, { style: containerStyle, children: [_jsx(Stack, { children: _jsx(PaginationStyled, { ...props }) }), _jsxs(GoToInputContainer, { children: [Localization.translate('table_pagination_input_caption_go_to'), _jsx(GoToInputStyled, { id: goToInputId, onKeyDown: onKeyDown }), Localization.translate('table_pagination_input_caption_page')] })] }));
6
+ const { onKeyDown, containerStyle, goToInputId = 'goTo', ...paginationProps } = props;
7
+ return (_jsxs(PaginationContainerStyled, { style: containerStyle, children: [_jsx(Stack, { children: _jsx(PaginationStyled, { ...paginationProps }) }), _jsxs(GoToInputContainer, { children: [Localization.translate('table_pagination_input_caption_go_to'), _jsx(GoToInputStyled, { id: goToInputId, onKeyDown: onKeyDown }), Localization.translate('table_pagination_input_caption_page')] })] }));
8
8
  };
9
9
  export default PaginationControls;
@@ -3,11 +3,17 @@ import { ButtonIcon, Localization, statusColors } from '@sphereon/ui-components.
3
3
  import IconButton from '../../../buttons/IconButton';
4
4
  import PrimaryButton from '../../../buttons/PrimaryButton';
5
5
  import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, TableViewHeaderStaticActionsContainerStyled as StaticActionsContainer, } from '../../../../styles';
6
+ const headerActionButtonStyle = {
7
+ width: 'fit-content',
8
+ minWidth: '180px',
9
+ flexShrink: 0,
10
+ whiteSpace: 'nowrap',
11
+ };
6
12
  const SSITableViewHeader = (props) => {
7
13
  const { enableFiltering = false, enableMostRecent = false, actions = [], onDelete } = props;
8
14
  const onDeleteClick = async () => {
9
15
  await onDelete?.();
10
16
  };
11
- return (_jsxs(Container, { children: [_jsx(StaticActionsContainer, { children: onDelete && (_jsx(IconButton, { caption: Localization.translate('action_delete_label'), icon: ButtonIcon.DELETE, iconColor: statusColors.error, onClick: onDeleteClick })) }), _jsx(ContentContainer, { style: { width: 'fit-content' }, children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(IconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(PrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) })] }));
17
+ return (_jsxs(Container, { children: [_jsx(StaticActionsContainer, { children: onDelete && (_jsx(IconButton, { caption: Localization.translate('action_delete_label'), icon: ButtonIcon.DELETE, iconColor: statusColors.error, onClick: onDeleteClick })) }), _jsx(ContentContainer, { style: { width: 'fit-content' }, children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(IconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(PrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon, style: headerActionButtonStyle }, index)))] }) })] }));
12
18
  };
13
19
  export default SSITableViewHeader;
@@ -135,7 +135,7 @@ const SSITableView = (props) => {
135
135
  transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
136
136
  ? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
137
137
  : '',
138
- } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
138
+ } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { "$enableHover": enableRowHover, onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
139
139
  ...(cell.column.columnDef.minSize && { minWidth: cell.column.columnDef.minSize }),
140
140
  ...(cell.column.columnDef.maxSize && { maxWidth: cell.column.columnDef.maxSize }),
141
141
  ...(cell.column.columnDef.size !== 0 && { width: cell.column.columnDef.size }),
@@ -4,7 +4,7 @@ export declare const SSITableViewLabelCellStyled: IStyledComponent<'web', React.
4
4
  export declare const SSITableViewTableContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>>;
5
5
  export declare const SSITableViewHeaderRowContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
6
6
  export declare const SSITableViewRowContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> & {
7
- enableHover?: boolean;
7
+ $enableHover?: boolean;
8
8
  }>;
9
9
  export declare const SSITableViewCellContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>>;
10
10
  export declare const SSITableViewHeaderCellContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
@@ -28,7 +28,7 @@ export const SSITableViewRowContainerStyled = styled.tr `
28
28
  border-bottom: 1px solid ${borderColors.lightGrey};
29
29
  }
30
30
 
31
- ${props => props.enableHover &&
31
+ ${props => props.$enableHover &&
32
32
  css `
33
33
  &:hover {
34
34
  background-color: #ececec; // TODO
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.5.0",
4
+ "version": "0.5.1-next.4+b2b924b",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -50,7 +50,7 @@
50
50
  "@mui/x-date-pickers": "^8.18.0",
51
51
  "@sphereon/ssi-sdk.data-store-types": "0.37.0",
52
52
  "@sphereon/ssi-types": "0.37.0",
53
- "@sphereon/ui-components.core": "0.5.0",
53
+ "@sphereon/ui-components.core": "0.5.1-next.4+b2b924b",
54
54
  "@tanstack/react-table": "^8.9.3",
55
55
  "ajv": "^8.17.1",
56
56
  "ajv-formats": "^3.0.1",
@@ -72,5 +72,5 @@
72
72
  "peerDependencies": {
73
73
  "react": ">= 18"
74
74
  },
75
- "gitHead": "b8da30f97e814cf7b8bf0ae6cd1917683f9715e6"
75
+ "gitHead": "b2b924b7baae7f3d4f2675c5023ba44900c7f603"
76
76
  }