armtek-uikit-react 1.0.59 → 1.0.61

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.
@@ -8,6 +8,7 @@
8
8
  align-items: center;
9
9
  justify-content: center;
10
10
  font-size: 30px;
11
+ position: relative;
11
12
  &.button_icon_large{
12
13
  width: $size-large;
13
14
  font-size: 24px;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.59","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.61","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
@@ -3,8 +3,8 @@ type ItemType = Record<string, any>;
3
3
  type ClassesType<T extends ItemType> = {
4
4
  tableRowHead?: string;
5
5
  tableRow?: string | ((item: T) => string);
6
+ tableCell?: string | ((item: T, code: keyof T) => string);
6
7
  tableCellHead?: string;
7
- tableCell?: string;
8
8
  };
9
9
  export type TableColType<T extends ItemType> = {
10
10
  text: string;
@@ -12,7 +12,7 @@ export type TableColType<T extends ItemType> = {
12
12
  getTitle?: () => string | ReactNode | number;
13
13
  code: keyof T;
14
14
  };
15
- type TableProps<T extends ItemType> = Omit<ComponentPropsWithoutRef<'table'>, 'onClick'> & {
15
+ export type TableProps<T extends ItemType> = Omit<ComponentPropsWithoutRef<'table'>, 'onClick'> & {
16
16
  classes?: ClassesType<T>;
17
17
  structure: TableColType<T>[];
18
18
  items: T[];
package/ui/Table/Table.js CHANGED
@@ -22,11 +22,11 @@ export function Table(props) {
22
22
  children: /*#__PURE__*/_jsxs("tbody", {
23
23
  children: [/*#__PURE__*/_jsx(TableRow, {
24
24
  className: classes == null ? void 0 : classes.tableRowHead,
25
- children: structure.map(item => /*#__PURE__*/_jsx(TableCell, {
25
+ children: structure.map((item, index) => /*#__PURE__*/_jsx(TableCell, {
26
26
  head: true,
27
27
  className: classes == null ? void 0 : classes.tableCellHead,
28
28
  children: item.getTitle ? item.getTitle() : item.text
29
- }))
29
+ }, index))
30
30
  }), items.map((row, index) => {
31
31
  let rowClass = !!(classes != null && classes.tableRow) ? typeof classes.tableRow === 'string' ? classes.tableRow : classes.tableRow(row) : '';
32
32
  return /*#__PURE__*/_jsx(TableRow, {
@@ -35,7 +35,9 @@ export function Table(props) {
35
35
  }),
36
36
  onClick: e => onClick ? onClick(row, e) : null,
37
37
  children: structure.map((item, itemIndex) => {
38
+ let cellClass = !!(classes != null && classes.tableCell) ? typeof classes.tableCell === 'string' ? classes.tableCell : classes.tableCell(row, item.code) : '';
38
39
  return /*#__PURE__*/_jsx(TableCell, {
40
+ className: cellClass,
39
41
  children: item.getValue ? item.getValue(row) : row[item.code]
40
42
  }, itemIndex);
41
43
  })
@@ -1,3 +1,3 @@
1
- export { Table, type TableColType } from './Table';
1
+ export { Table, type TableColType, type TableProps } from './Table';
2
2
  export { TableCell } from './TableCell';
3
3
  export { TableRow } from './TableRow';