@apify/ui-library 1.157.3 → 1.158.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.157.3",
3
+ "version": "1.158.0",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -95,5 +95,5 @@
95
95
  "src",
96
96
  "style"
97
97
  ],
98
- "gitHead": "1b8df40de0e34029c29f0c4632d9bbf7784e0839"
98
+ "gitHead": "a95d2c32be1c155877006b808c4cf292d4c64806"
99
99
  }
@@ -75,6 +75,8 @@ export const StyledTable = styled.table`
75
75
  background-color: ${theme.color.neutral.backgroundMuted};
76
76
  border-bottom: solid 1px ${theme.color.neutral.separatorSubtle};
77
77
  color: ${theme.color.neutral.textMuted};
78
+ /* Same size the SortLabel button sets for itself, so plain and sortable headers match. */
79
+ ${theme.typography.shared.desktop.bodyS};
78
80
  }
79
81
 
80
82
  /* Body styling */
@@ -144,10 +146,10 @@ export const StyledTable = styled.table`
144
146
  }
145
147
  }
146
148
 
147
- /* Empty row */
149
+ /* Empty row. Keeps the padding every other cell has; the content (spinner, empty state) brings
150
+ its own vertical space, the same way the old table did. */
148
151
  .${tableClassNames.ROW_EMPTY_CELL} {
149
152
  text-align: center;
150
- padding: ${theme.space.space16};
151
153
  }
152
154
  `;
153
155
 
@@ -1,13 +1,20 @@
1
1
  import type { FC, ReactNode } from 'react';
2
+ import styled from 'styled-components';
2
3
 
3
- import { InlineSpinner } from '../spinner';
4
+ import { theme } from '../../design_system/theme';
5
+ import { BlockSpinner } from '../spinner';
4
6
  import { tableClassNames } from './table.styled';
5
7
  import { tableTestIds } from './table.test_ids';
6
8
 
9
+ /** `BlockSpinner` defaults to an 8rem box, which is taller than a table row needs. */
10
+ const RowSpinner = styled(BlockSpinner)`
11
+ min-height: ${theme.space.space40};
12
+ `;
13
+
7
14
  export const TableLoadingRow: FC<{ colSpan: number; children?: ReactNode }> = ({ colSpan, children }) => (
8
15
  <tr data-test={tableTestIds.LOADING_ROW} className={tableClassNames.ROW_EMPTY}>
9
16
  <td colSpan={colSpan} className={tableClassNames.ROW_EMPTY_CELL}>
10
- {children ?? <InlineSpinner />}
17
+ {children ?? <RowSpinner small />}
11
18
  </td>
12
19
  </tr>
13
20
  );