labsense-ui-kit 1.1.54 → 1.1.55

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.
@@ -7,6 +7,7 @@ interface HeaderCellConfig {
7
7
  maintext?: string;
8
8
  alignment?: string;
9
9
  CustomFunction?: React.ReactElement;
10
+ legend?: string;
10
11
  }
11
12
  interface HeaderConfig {
12
13
  headercolor?: string;
package/dist/index.js CHANGED
@@ -6848,15 +6848,41 @@ var Table = function Table(_ref) {
6848
6848
  type: 'checkbox',
6849
6849
  checked: isAllSelected,
6850
6850
  onChange: toggleSelectAll
6851
- })), tableheaderconfig.headerdata.map(function (columndata, key) {
6851
+ })), tableheaderconfig.headerdata.map(function (columndata, index, allCols) {
6852
6852
  var _columndata$maintext;
6853
- return React__default.createElement(TableCell, {
6854
- key: key,
6853
+ var currentLegend = columndata.legend || '';
6854
+ var prevLegend = index > 0 ? allCols[index - 1].legend || '' : '';
6855
+ var isFirstOfGroup = currentLegend && currentLegend !== prevLegend;
6856
+ var isInLegendGroup = !!currentLegend;
6857
+ return React__default.createElement(Container, {
6858
+ key: index,
6859
+ "$flexDirection": 'column',
6860
+ "$width": columndata.width || '100px',
6861
+ "$gap": '8px'
6862
+ }, tableheaderconfig.headerdata.some(function (col) {
6863
+ return !!col.legend;
6864
+ }) && React__default.createElement(Container, {
6865
+ "$alignItems": 'center',
6866
+ "$height": '16px'
6867
+ }, isInLegendGroup ? React__default.createElement(Container, null, isFirstOfGroup ? React__default.createElement(Container, null, React__default.createElement(Span, {
6868
+ "$fontSize": '12px',
6869
+ "$fontWeight": '400',
6870
+ "$width": 'max-content',
6871
+ "$lineHeight": 'normal'
6872
+ }, currentLegend), React__default.createElement(Container, {
6873
+ "$flex": '1',
6874
+ "$height": '1px',
6875
+ "$background": colorVariables.border.extraLight
6876
+ })) : React__default.createElement(Container, {
6877
+ "$flex": '1',
6878
+ "$height": '1px',
6879
+ "$background": colorVariables.border.extraLight
6880
+ })) : null), React__default.createElement(TableCell, {
6855
6881
  maintext: (_columndata$maintext = columndata.maintext) != null ? _columndata$maintext : '',
6856
6882
  width: columndata.width,
6857
6883
  alignment: columndata.alignment
6858
- });
6859
- })), loading ? React__default.createElement(Container, {
6884
+ }));
6885
+ })), React__default.createElement(Divider, null), loading ? React__default.createElement(Container, {
6860
6886
  "$flexDirection": 'column',
6861
6887
  "$alignItems": 'center',
6862
6888
  "$justifyContent": 'center',