labsense-ui-kit 1.1.53 → 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;
@@ -46,9 +46,10 @@ export interface ThemeColorsInterface {
46
46
  light: string;
47
47
  };
48
48
  accent: {
49
- light: string;
50
- extraLight: string;
51
- extraExtraLight: string;
49
+ light_1: string;
50
+ light_2: string;
51
+ light_3: string;
52
+ light_4: string;
52
53
  softBlue: string;
53
54
  extraSoftBlue: string;
54
55
  boldTransparent: string;
package/dist/index.js CHANGED
@@ -28,9 +28,10 @@ var light = {
28
28
  light: '#FFFFFF'
29
29
  },
30
30
  accent: {
31
- light: '#E1E8ED',
32
- extraLight: '#F5F8FA',
33
- extraExtraLight: '#F0F3F5',
31
+ light_1: '#E1E8ED',
32
+ light_2: '#F5F8FA',
33
+ light_3: '#F0F3F5',
34
+ light_4: '#ECF0F4',
34
35
  softBlue: '#D4EEFF',
35
36
  extraSoftBlue: '#E4F4FF',
36
37
  boldTransparent: '#5E5E5E80',
@@ -96,9 +97,10 @@ var dark = {
96
97
  light: '#1A1A1A'
97
98
  },
98
99
  accent: {
99
- light: '#2A2E33',
100
- extraLight: '#1F2327',
101
- extraExtraLight: '#F0F3F5',
100
+ light_1: '#2A2E33',
101
+ light_2: '#1F2327',
102
+ light_3: '#F0F3F5',
103
+ light_4: '#ECF0F4',
102
104
  softBlue: '#2C3E50',
103
105
  extraSoftBlue: '#34495E',
104
106
  boldTransparent: '#D3D3D380',
@@ -3610,7 +3612,7 @@ var TooltipContainer = styled__default.div(_templateObject$3 || (_templateObject
3610
3612
  return $minWidth != null ? $minWidth : 'auto';
3611
3613
  }, function (_ref2) {
3612
3614
  var $background = _ref2.$background;
3613
- return $background != null ? $background : colorVariables.accent.light;
3615
+ return $background != null ? $background : colorVariables.accent.light_1;
3614
3616
  }, function (_ref3) {
3615
3617
  var $gap = _ref3.$gap;
3616
3618
  return $gap != null ? $gap : '16px';
@@ -3623,7 +3625,7 @@ var TooltipContainer = styled__default.div(_templateObject$3 || (_templateObject
3623
3625
  return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["", " ", ";"])), vertical, horizontal);
3624
3626
  }, function (_ref5) {
3625
3627
  var $background = _ref5.$background;
3626
- return $background != null ? $background : colorVariables.accent.light;
3628
+ return $background != null ? $background : colorVariables.accent.light_1;
3627
3629
  }, function (_ref6) {
3628
3630
  var $tooltipPosition = _ref6.$tooltipPosition;
3629
3631
  if ($tooltipPosition.startsWith('top')) {
@@ -3649,7 +3651,7 @@ var IconTooltip = function IconTooltip(_ref7) {
3649
3651
  infoText4 = _ref7.infoText4,
3650
3652
  _ref7$tooltipCSS = _ref7.tooltipCSS,
3651
3653
  tooltipCSS = _ref7$tooltipCSS === void 0 ? {
3652
- background: colorVariables.accent.light,
3654
+ background: colorVariables.accent.light_1,
3653
3655
  color: colorVariables.text.dark,
3654
3656
  gap: '4px',
3655
3657
  minWidth: 'max-content',
@@ -4770,7 +4772,7 @@ var DropdownMenu = styled__default.div(_templateObject6$4 || (_templateObject6$4
4770
4772
  return $width ? $width : 'max-content';
4771
4773
  }, function (_ref22) {
4772
4774
  var $menuBackground = _ref22.$menuBackground;
4773
- return $menuBackground || colorVariables.accent.extraLight;
4775
+ return $menuBackground || colorVariables.accent.light_2;
4774
4776
  });
4775
4777
  var SelectedOptionsWrapper = styled__default.div(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n height: 100%;\n"])));
4776
4778
  var SelectedOptionDiv = styled__default.div(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: ", ";\n border-radius: 4px;\n padding: 6px 8px;\n box-sizing: border-box;\n gap: 6px;\n font-family: NotoSans, sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 12px;\n color: ", ";\n"])), function (_ref23) {
@@ -4794,7 +4796,7 @@ var SelectedOptionDiv = styled__default.div(_templateObject8$2 || (_templateObje
4794
4796
  case 'error':
4795
4797
  return $disabled ? colorVariables.disabled.error : colorVariables["default"].error;
4796
4798
  default:
4797
- return $selectedOptionBackground || colorVariables.accent.extraLight;
4799
+ return $selectedOptionBackground || colorVariables.accent.light_2;
4798
4800
  }
4799
4801
  }, function (_ref24) {
4800
4802
  var $selectedOptionColor = _ref24.$selectedOptionColor;
@@ -5123,7 +5125,7 @@ var DropdownButton$1 = styled__default.div(_templateObject3$7 || (_templateObjec
5123
5125
  }, function (_ref11) {
5124
5126
  var $background = _ref11.$background,
5125
5127
  $disabled = _ref11.$disabled;
5126
- return $disabled ? colorVariables.border.light : $background || colorVariables.accent.extraLight;
5128
+ return $disabled ? colorVariables.border.light : $background || colorVariables.accent.light_2;
5127
5129
  }, function (_ref12) {
5128
5130
  var $size = _ref12.$size;
5129
5131
  switch ($size) {
@@ -5197,7 +5199,7 @@ var DropdownMenu$1 = styled__default.div(_templateObject7$3 || (_templateObject7
5197
5199
  return $width ? $width : 'max-content';
5198
5200
  }, function (_ref24) {
5199
5201
  var $menuBackground = _ref24.$menuBackground;
5200
- return $menuBackground || colorVariables.accent.extraLight;
5202
+ return $menuBackground || colorVariables.accent.light_2;
5201
5203
  }, function (_ref25) {
5202
5204
  var $top = _ref25.$top;
5203
5205
  return $top && "top: " + $top + ";";
@@ -5208,7 +5210,7 @@ var DropdownMenu$1 = styled__default.div(_templateObject7$3 || (_templateObject7
5208
5210
  var OptionsWrapper = styled__default.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n max-height: 150px; \n overflow-y: auto;\n scrollbar-width: thin;\n width: 100%;\n"])));
5209
5211
  var SearchContainer$1 = styled__default.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom: 1px solid ", ";\n border-radius: ", ";\n padding: 10px 12px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n position: sticky;\n top: 0;\n z-index: 10; \n"])), function (_ref27) {
5210
5212
  var $background = _ref27.$background;
5211
- return $background || colorVariables.accent.extraLight;
5213
+ return $background || colorVariables.accent.light_2;
5212
5214
  }, function (_ref28) {
5213
5215
  var $border = _ref28.$border;
5214
5216
  return $border || 'none';
@@ -5449,7 +5451,7 @@ var useClickOutside = function useClickOutside(elRef, elCallback) {
5449
5451
 
5450
5452
  var _templateObject$d, _templateObject2$a;
5451
5453
  var ModalOverlay = styled__default.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: NotoSans, sans-serif;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
5452
- var ModalContainer = styled__default.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 100vh;\n max-width: ", ";\n overflow: visible;\n"])), colorVariables.accent.light, function (_ref) {
5454
+ var ModalContainer = styled__default.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 100vh;\n max-width: ", ";\n overflow: visible;\n"])), colorVariables.accent.light_1, function (_ref) {
5453
5455
  var $maxWidth = _ref.$maxWidth;
5454
5456
  return $maxWidth ? $maxWidth : '400px';
5455
5457
  });
@@ -6045,7 +6047,7 @@ var TextFieldWithDropdown = function TextFieldWithDropdown(_ref8) {
6045
6047
  "$position": 'relative'
6046
6048
  }, searchBox && React__default.createElement(SearchContainer$3, {
6047
6049
  "$borderBottom": searchBoxBorder,
6048
- "$background": isSearchBarEnabled ? colorVariables.text.white : colorVariables.accent.light,
6050
+ "$background": isSearchBarEnabled ? colorVariables.text.white : colorVariables.accent.light_1,
6049
6051
  "$borderRadius": searchBoxBorderRadius,
6050
6052
  ref: searchBoxRef
6051
6053
  }, React__default.createElement(Container, {
@@ -6320,7 +6322,7 @@ var Loader = function Loader(_ref4) {
6320
6322
  };
6321
6323
 
6322
6324
  var _templateObject$l;
6323
- var PageInput = styled__default.input(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 32px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n padding: 4px;\n color: ", ";\n text-align: center;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), colorVariables.accent.extraLight, colorVariables.border.light, colorVariables.text.dark);
6325
+ var PageInput = styled__default.input(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 32px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n padding: 4px;\n color: ", ";\n text-align: center;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), colorVariables.accent.light_2, colorVariables.border.light, colorVariables.text.dark);
6324
6326
  var Pagination = function Pagination(_ref) {
6325
6327
  var totalPages = _ref.totalPages,
6326
6328
  currentPage = _ref.currentPage,
@@ -6846,15 +6848,41 @@ var Table = function Table(_ref) {
6846
6848
  type: 'checkbox',
6847
6849
  checked: isAllSelected,
6848
6850
  onChange: toggleSelectAll
6849
- })), tableheaderconfig.headerdata.map(function (columndata, key) {
6851
+ })), tableheaderconfig.headerdata.map(function (columndata, index, allCols) {
6850
6852
  var _columndata$maintext;
6851
- return React__default.createElement(TableCell, {
6852
- 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, {
6853
6881
  maintext: (_columndata$maintext = columndata.maintext) != null ? _columndata$maintext : '',
6854
6882
  width: columndata.width,
6855
6883
  alignment: columndata.alignment
6856
- });
6857
- })), loading ? React__default.createElement(Container, {
6884
+ }));
6885
+ })), React__default.createElement(Divider, null), loading ? React__default.createElement(Container, {
6858
6886
  "$flexDirection": 'column',
6859
6887
  "$alignItems": 'center',
6860
6888
  "$justifyContent": 'center',
@@ -6876,7 +6904,7 @@ var Table = function Table(_ref) {
6876
6904
  "$padding": '9px 12px',
6877
6905
  "$minHeight": '30px',
6878
6906
  "$alignItems": 'center',
6879
- "$background": colorVariables.accent.light,
6907
+ "$background": colorVariables.accent.light_1,
6880
6908
  onClick: function onClick() {
6881
6909
  return toggleRoleVisibility(role);
6882
6910
  },