@mailstep/design-system 0.7.23-beta.0 → 0.7.23-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.23-beta.0",
3
+ "version": "0.7.23-beta.1",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -2,7 +2,7 @@ import { FC } from 'react';
2
2
  import { ColumnDefinitions, DataRow } from './types';
3
3
  type Props = {
4
4
  columnDefinitions: ColumnDefinitions;
5
- data: DataRow[];
5
+ data?: DataRow[];
6
6
  onRowClick?: (dataRow: DataRow) => void;
7
7
  };
8
8
  export declare const Table: FC<Props>;
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Table as TableComponent, Thead, Tr, Td, Th, Tbody } from '../../Elements/Table';
3
3
  export var Table = function (_a) {
4
4
  var columnDefinitions = _a.columnDefinitions, data = _a.data, onRowClick = _a.onRowClick;
5
- return (_jsxs(TableComponent, { children: [_jsx(Thead, { children: _jsx(Tr, { children: columnDefinitions.map(function (column) { return (_jsx(Th, { children: column.title })); }) }) }), _jsx(Tbody, { children: data.map(function (item) { return (_jsx(Tr, { onClick: function () { return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(item); }, cursor: onRowClick ? 'pointer' : 'auto', children: columnDefinitions.map(function (column) { return (_jsx(Td, { children: item[column.name] }, column.name)); }) }, item.id)); }) })] }));
5
+ return (_jsxs(TableComponent, { children: [_jsx(Thead, { children: _jsx(Tr, { children: columnDefinitions.map(function (column) { return (_jsx(Th, { children: column.title })); }) }) }), _jsx(Tbody, { children: data === null || data === void 0 ? void 0 : data.map(function (item) { return (_jsx(Tr, { onClick: function () { return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(item); }, cursor: onRowClick ? 'pointer' : 'auto', children: columnDefinitions.map(function (column) { return (_jsx(Td, { children: item[column.name] }, column.name)); }) }, item.id)); }) })] }));
6
6
  };
@@ -3,7 +3,7 @@ declare const meta: {
3
3
  title: string;
4
4
  component: import("react").FC<{
5
5
  columnDefinitions: import("../types").ColumnDefinitions;
6
- data: import("../types").DataRow[];
6
+ data?: import("../types").DataRow[] | undefined;
7
7
  onRowClick?: ((dataRow: import("../types").DataRow) => void) | undefined;
8
8
  }>;
9
9
  tags: string[];