ui-soxo-bootstrap-core 2.6.62-dev.2 → 2.6.62-dev.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,16 @@ import { Table } from 'antd';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { GlobalContext } from '../../../Store';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import './table.scss';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Table with the theme styling.
|
|
10
|
+
*
|
|
11
|
+
* `freezeHeader` keeps the header row fixed while the rows scroll vertically. It is opt-in,
|
|
12
|
+
* use it for long lists only. The header cells stay inside the same table as the rows
|
|
13
|
+
* (see table.scss), so the columns always line up with the header.
|
|
14
|
+
*/
|
|
15
|
+
const TableComponent = ({ columns, dataSource, loading, fixed, scroll, summary, pagination, title, onChange, freezeHeader }) => {
|
|
7
16
|
const { state } = useContext(GlobalContext);
|
|
8
17
|
|
|
9
18
|
useEffect(() => {}, [state.theme.colors]);
|
|
@@ -60,6 +69,7 @@ const TableComponent = ({ columns, dataSource, loading, fixed, scroll, summary,
|
|
|
60
69
|
<Table
|
|
61
70
|
title={title ? () => title : undefined}
|
|
62
71
|
scroll={scroll}
|
|
72
|
+
className={freezeHeader ? 'frozen-header-table' : undefined}
|
|
63
73
|
dataSource={dataSource}
|
|
64
74
|
loading={loading}
|
|
65
75
|
bordered
|
|
@@ -86,10 +96,12 @@ TableComponent.propTypes = {
|
|
|
86
96
|
columns: PropTypes.array.isRequired,
|
|
87
97
|
data: PropTypes.array.isRequired,
|
|
88
98
|
loading: PropTypes.bool,
|
|
99
|
+
freezeHeader: PropTypes.bool,
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
TableComponent.defaultProps = {
|
|
92
103
|
loading: false,
|
|
104
|
+
freezeHeader: false,
|
|
93
105
|
};
|
|
94
106
|
|
|
95
107
|
export default TableComponent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Table with a frozen header (freezeHeader).
|
|
2
|
+
//
|
|
3
|
+
// Not the antd `scroll.y` : there the header is a separate table and takes its column
|
|
4
|
+
// widths from the body, so a header wider than its cells wraps or overlaps. Here the
|
|
5
|
+
// header stays in the same table as the rows, the content scrolls in both directions
|
|
6
|
+
// and the header cells stick to the top of it.
|
|
7
|
+
.frozen-header-table {
|
|
8
|
+
.ant-table-content {
|
|
9
|
+
// rows scroll under the header, the pagination below the table stays in view
|
|
10
|
+
max-height: max(400px, calc(100vh - 220px));
|
|
11
|
+
overflow: auto !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// antd draws the top line of a bordered table on the `table` element, which scrolls
|
|
15
|
+
// away with the rows. Draw it on the content wrapper instead, that one stays in place.
|
|
16
|
+
&.ant-table-wrapper .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content {
|
|
17
|
+
border-top: 1px solid #f0f0f0;
|
|
18
|
+
|
|
19
|
+
>table {
|
|
20
|
+
border-top: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ant-table-thead>tr>th {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: 3;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Header cells of the fixed columns stick to the top and to the side,
|
|
31
|
+
// above the header cells that scroll
|
|
32
|
+
.ant-table-thead>tr>th.ant-table-cell-fix-left,
|
|
33
|
+
.ant-table-thead>tr>th.ant-table-cell-fix-right {
|
|
34
|
+
top: 0;
|
|
35
|
+
z-index: 4;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
-webkit-tap-highlight-color: transparent;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
/* Thin connecting
|
|
345
|
+
/* Thin connecting "strip" drawn into the gap toward the next step.
|
|
346
346
|
Width matches the strip's gap so it spans the space without overhanging. */
|
|
347
347
|
.steps-breadcrumb-item:not(:last-child)::after {
|
|
348
348
|
content: '';
|
|
@@ -350,9 +350,9 @@
|
|
|
350
350
|
left: 100%;
|
|
351
351
|
top: 50%;
|
|
352
352
|
width: clamp(28px, 3vw, 52px);
|
|
353
|
-
height:
|
|
354
|
-
|
|
355
|
-
transform: translateY(-50%);
|
|
353
|
+
height: 0px;
|
|
354
|
+
border-top: 0.5px solid #ffffff66;
|
|
355
|
+
transform: translateY(-50%) rotate(0deg);
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
.steps-breadcrumb-item:active {
|
|
@@ -414,11 +414,11 @@
|
|
|
414
414
|
color: #253a5b;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
/* COMPLETED —
|
|
417
|
+
/* COMPLETED — translucent white circle (was solid navy/blue). */
|
|
418
418
|
.steps-breadcrumb-item.completed .steps-breadcrumb-index {
|
|
419
|
-
background: #
|
|
420
|
-
border-color: #
|
|
421
|
-
color: #
|
|
419
|
+
background: #ffffff80;
|
|
420
|
+
border-color: #ffffff80;
|
|
421
|
+
color: #253a5b;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
/* Primary CTA (Start / Verify Profile / Next / Finish) — dark navy pill. */
|