labsense-ui-kit 1.1.43 → 1.1.45

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.
@@ -19,6 +19,7 @@ interface Option {
19
19
  interface MultiSelectDropdownProps {
20
20
  options: Option[];
21
21
  title?: string;
22
+ titleWeight?: string;
22
23
  titleSize?: number;
23
24
  titleColor?: string;
24
25
  labelText?: string;
@@ -48,6 +48,7 @@ export interface ThemeColorsInterface {
48
48
  accent: {
49
49
  light: string;
50
50
  extraLight: string;
51
+ extraExtraLight: string;
51
52
  softBlue: string;
52
53
  extraSoftBlue: string;
53
54
  boldTransparent: string;
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var light = {
30
30
  accent: {
31
31
  light: '#E1E8ED',
32
32
  extraLight: '#F5F8FA',
33
+ extraExtraLight: '#F0F3F5',
33
34
  softBlue: '#D4EEFF',
34
35
  extraSoftBlue: '#E4F4FF',
35
36
  boldTransparent: '#5E5E5E80',
@@ -97,6 +98,7 @@ var dark = {
97
98
  accent: {
98
99
  light: '#2A2E33',
99
100
  extraLight: '#1F2327',
101
+ extraExtraLight: '#F0F3F5',
100
102
  softBlue: '#2C3E50',
101
103
  extraSoftBlue: '#34495E',
102
104
  boldTransparent: '#D3D3D380',
@@ -4547,16 +4549,19 @@ var DropdownButton = styled__default.div(_templateObject2$6 || (_templateObject2
4547
4549
  return '14px';
4548
4550
  }
4549
4551
  });
4550
- var TitleText = styled__default.div(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n width: max-content;\n position: relative;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n\n color: ", ";\n"])), function (_ref15) {
4551
- var $titleSize = _ref15.$titleSize,
4552
- $size = _ref15.$size;
4553
- return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
4552
+ var TitleText = styled__default.div(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n width: max-content;\n position: relative;\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n\n color: ", ";\n"])), function (_ref15) {
4553
+ var $titleWeight = _ref15.$titleWeight;
4554
+ return $titleWeight != null ? $titleWeight : '500';
4554
4555
  }, function (_ref16) {
4555
4556
  var $titleSize = _ref16.$titleSize,
4556
4557
  $size = _ref16.$size;
4557
4558
  return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
4558
4559
  }, function (_ref17) {
4559
- var $titleColor = _ref17.$titleColor;
4560
+ var $titleSize = _ref17.$titleSize,
4561
+ $size = _ref17.$size;
4562
+ return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
4563
+ }, function (_ref18) {
4564
+ var $titleColor = _ref18.$titleColor;
4560
4565
  switch ($titleColor) {
4561
4566
  case 'dark':
4562
4567
  return colorVariables.text.dark;
@@ -4579,24 +4584,24 @@ var TitleText = styled__default.div(_templateObject3$4 || (_templateObject3$4 =
4579
4584
  }
4580
4585
  });
4581
4586
  var Container$2 = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n"])));
4582
- var LabelText = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 400;\n font-style:", ";\n color: ", ";\n"])), function (_ref18) {
4583
- var $labelStyle = _ref18.$labelStyle;
4587
+ var LabelText = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 400;\n font-style:", ";\n color: ", ";\n"])), function (_ref19) {
4588
+ var $labelStyle = _ref19.$labelStyle;
4584
4589
  return $labelStyle;
4585
4590
  }, colorVariables.text.medium);
4586
- var DropdownMenu = styled__default.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n max-height: 156px;\n padding: 4px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n width: ", ";\n background: ", ";\n display: flex;\n flex-direction: column;\n gap: 4px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n margin-top: 8px;\n overflow-y: auto;\n position: absolute;\n z-index: 2;\n scrollbar-width: thin;\n"])), colorVariables.border.light, function (_ref19) {
4587
- var $optionsBorderRadius = _ref19.$optionsBorderRadius;
4591
+ var DropdownMenu = styled__default.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n max-height: 156px;\n padding: 4px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n width: ", ";\n background: ", ";\n display: flex;\n flex-direction: column;\n gap: 4px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n margin-top: 8px;\n overflow-y: auto;\n position: absolute;\n z-index: 2;\n scrollbar-width: thin;\n"])), colorVariables.border.light, function (_ref20) {
4592
+ var $optionsBorderRadius = _ref20.$optionsBorderRadius;
4588
4593
  return $optionsBorderRadius || '8px';
4589
- }, function (_ref20) {
4590
- var $width = _ref20.$width;
4591
- return $width ? $width : 'max-content';
4592
4594
  }, function (_ref21) {
4593
- var $menuBackground = _ref21.$menuBackground;
4595
+ var $width = _ref21.$width;
4596
+ return $width ? $width : 'max-content';
4597
+ }, function (_ref22) {
4598
+ var $menuBackground = _ref22.$menuBackground;
4594
4599
  return $menuBackground || colorVariables.accent.extraLight;
4595
4600
  });
4596
4601
  var SelectedOptionsWrapper = styled__default.div(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n height: 100%;\n"])));
4597
- var SelectedOptionDiv = styled__default.div(_templateObject8$1 || (_templateObject8$1 = _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 (_ref22) {
4598
- var $selectedOptionBackground = _ref22.$selectedOptionBackground,
4599
- $disabled = _ref22.$disabled;
4602
+ var SelectedOptionDiv = styled__default.div(_templateObject8$1 || (_templateObject8$1 = _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) {
4603
+ var $selectedOptionBackground = _ref23.$selectedOptionBackground,
4604
+ $disabled = _ref23.$disabled;
4600
4605
  switch ($selectedOptionBackground) {
4601
4606
  case 'dark':
4602
4607
  return colorVariables.text.dark;
@@ -4617,8 +4622,8 @@ var SelectedOptionDiv = styled__default.div(_templateObject8$1 || (_templateObje
4617
4622
  default:
4618
4623
  return $selectedOptionBackground || colorVariables.accent.extraLight;
4619
4624
  }
4620
- }, function (_ref23) {
4621
- var $selectedOptionColor = _ref23.$selectedOptionColor;
4625
+ }, function (_ref24) {
4626
+ var $selectedOptionColor = _ref24.$selectedOptionColor;
4622
4627
  switch ($selectedOptionColor) {
4623
4628
  case 'dark':
4624
4629
  return colorVariables.text.dark;
@@ -4640,67 +4645,68 @@ var SelectedOptionDiv = styled__default.div(_templateObject8$1 || (_templateObje
4640
4645
  return $selectedOptionColor;
4641
4646
  }
4642
4647
  });
4643
- var RemoveIcon = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n > div {\n cursor: ", ";\n }\n"])), function (_ref24) {
4644
- var $disabled = _ref24.$disabled;
4648
+ var RemoveIcon = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n > div {\n cursor: ", ";\n }\n"])), function (_ref25) {
4649
+ var $disabled = _ref25.$disabled;
4645
4650
  return $disabled ? 'not-allowed' : 'pointer';
4646
- }, function (_ref25) {
4647
- var removeIconBackground = _ref25.removeIconBackground,
4648
- $type = _ref25.$type;
4649
- return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
4650
4651
  }, function (_ref26) {
4651
- var $disabled = _ref26.$disabled;
4652
+ var removeIconBackground = _ref26.removeIconBackground,
4653
+ $type = _ref26.$type;
4654
+ return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
4655
+ }, function (_ref27) {
4656
+ var $disabled = _ref27.$disabled;
4652
4657
  return $disabled ? 'not-allowed' : 'pointer';
4653
4658
  });
4654
4659
  var TextWrapper = styled__default.div(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 4px;\n"])));
4655
4660
  var Asterisk = styled__default.span(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 10px;\n height: fit-content;\n position: absolute;\n top: -2px;\n right: -8px;\n"])), colorVariables["default"].error);
4656
- var MultiSelectDropdown = function MultiSelectDropdown(_ref27) {
4657
- var title = _ref27.title,
4658
- titleSize = _ref27.titleSize,
4659
- _ref27$titleColor = _ref27.titleColor,
4660
- titleColor = _ref27$titleColor === void 0 ? colorVariables.text.dark : _ref27$titleColor,
4661
- _ref27$labelText = _ref27.labelText,
4662
- labelText = _ref27$labelText === void 0 ? 'Select Cameras' : _ref27$labelText,
4663
- labelStyle = _ref27.labelStyle,
4664
- labelColor = _ref27.labelColor,
4665
- _ref27$replaceLabel = _ref27.replaceLabel,
4666
- replaceLabel = _ref27$replaceLabel === void 0 ? true : _ref27$replaceLabel,
4667
- options = _ref27.options,
4668
- width = _ref27.width,
4669
- optionWidth = _ref27.optionWidth,
4670
- height = _ref27.height,
4671
- placeholder = _ref27.placeholder,
4672
- border = _ref27.border,
4673
- _ref27$background = _ref27.background,
4674
- background = _ref27$background === void 0 ? colorVariables["default"].tertiary : _ref27$background,
4675
- selectedOptionBackground = _ref27.selectedOptionBackground,
4676
- selectedOptionColor = _ref27.selectedOptionColor,
4677
- _ref27$menuBackground = _ref27.menuBackground,
4678
- menuBackground = _ref27$menuBackground === void 0 ? 'white' : _ref27$menuBackground,
4679
- optionsBorderRadius = _ref27.optionsBorderRadius,
4680
- borderRadius = _ref27.borderRadius,
4681
- removeIconBackground = _ref27.removeIconBackground,
4682
- handleSelectChange = _ref27.handleSelectChange,
4683
- selectedOptions = _ref27.selectedOptions,
4684
- placeholderColor = _ref27.placeholderColor,
4685
- optionBorder = _ref27.optionBorder,
4686
- optionColor = _ref27.optionColor,
4687
- searchIcon = _ref27.searchIcon,
4688
- searchbarTextColor = _ref27.searchbarTextColor,
4689
- searchBoxBackground = _ref27.searchBoxBackground,
4690
- searchBoxBorder = _ref27.searchBoxBorder,
4691
- searchBoxBorderRadius = _ref27.searchBoxBorderRadius,
4692
- size = _ref27.size,
4693
- removeIcon = _ref27.removeIcon,
4694
- type = _ref27.type,
4695
- icon = _ref27.icon,
4696
- _ref27$disabled = _ref27.disabled,
4697
- disabled = _ref27$disabled === void 0 ? false : _ref27$disabled,
4698
- _ref27$required = _ref27.required,
4699
- required = _ref27$required === void 0 ? false : _ref27$required,
4700
- _ref27$searchBox = _ref27.searchBox,
4701
- searchBox = _ref27$searchBox === void 0 ? true : _ref27$searchBox,
4702
- _ref27$NoOptionsText = _ref27.NoOptionsText,
4703
- NoOptionsText = _ref27$NoOptionsText === void 0 ? 'No Options Available' : _ref27$NoOptionsText;
4661
+ var MultiSelectDropdown = function MultiSelectDropdown(_ref28) {
4662
+ var title = _ref28.title,
4663
+ titleWeight = _ref28.titleWeight,
4664
+ titleSize = _ref28.titleSize,
4665
+ _ref28$titleColor = _ref28.titleColor,
4666
+ titleColor = _ref28$titleColor === void 0 ? colorVariables.text.dark : _ref28$titleColor,
4667
+ _ref28$labelText = _ref28.labelText,
4668
+ labelText = _ref28$labelText === void 0 ? 'Select Cameras' : _ref28$labelText,
4669
+ labelStyle = _ref28.labelStyle,
4670
+ labelColor = _ref28.labelColor,
4671
+ _ref28$replaceLabel = _ref28.replaceLabel,
4672
+ replaceLabel = _ref28$replaceLabel === void 0 ? true : _ref28$replaceLabel,
4673
+ options = _ref28.options,
4674
+ width = _ref28.width,
4675
+ optionWidth = _ref28.optionWidth,
4676
+ height = _ref28.height,
4677
+ placeholder = _ref28.placeholder,
4678
+ border = _ref28.border,
4679
+ _ref28$background = _ref28.background,
4680
+ background = _ref28$background === void 0 ? colorVariables["default"].tertiary : _ref28$background,
4681
+ selectedOptionBackground = _ref28.selectedOptionBackground,
4682
+ selectedOptionColor = _ref28.selectedOptionColor,
4683
+ _ref28$menuBackground = _ref28.menuBackground,
4684
+ menuBackground = _ref28$menuBackground === void 0 ? 'white' : _ref28$menuBackground,
4685
+ optionsBorderRadius = _ref28.optionsBorderRadius,
4686
+ borderRadius = _ref28.borderRadius,
4687
+ removeIconBackground = _ref28.removeIconBackground,
4688
+ handleSelectChange = _ref28.handleSelectChange,
4689
+ selectedOptions = _ref28.selectedOptions,
4690
+ placeholderColor = _ref28.placeholderColor,
4691
+ optionBorder = _ref28.optionBorder,
4692
+ optionColor = _ref28.optionColor,
4693
+ searchIcon = _ref28.searchIcon,
4694
+ searchbarTextColor = _ref28.searchbarTextColor,
4695
+ searchBoxBackground = _ref28.searchBoxBackground,
4696
+ searchBoxBorder = _ref28.searchBoxBorder,
4697
+ searchBoxBorderRadius = _ref28.searchBoxBorderRadius,
4698
+ size = _ref28.size,
4699
+ removeIcon = _ref28.removeIcon,
4700
+ type = _ref28.type,
4701
+ icon = _ref28.icon,
4702
+ _ref28$disabled = _ref28.disabled,
4703
+ disabled = _ref28$disabled === void 0 ? false : _ref28$disabled,
4704
+ _ref28$required = _ref28.required,
4705
+ required = _ref28$required === void 0 ? false : _ref28$required,
4706
+ _ref28$searchBox = _ref28.searchBox,
4707
+ searchBox = _ref28$searchBox === void 0 ? true : _ref28$searchBox,
4708
+ _ref28$NoOptionsText = _ref28.NoOptionsText,
4709
+ NoOptionsText = _ref28$NoOptionsText === void 0 ? 'No Options Available' : _ref28$NoOptionsText;
4704
4710
  var _useState = React.useState(false),
4705
4711
  isOpen = _useState[0],
4706
4712
  setIsOpen = _useState[1];
@@ -4736,7 +4742,8 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref27) {
4736
4742
  return React__default.createElement(Container$2, null, title && React__default.createElement(TitleText, {
4737
4743
  "$titleColor": titleColor,
4738
4744
  "$titleSize": titleSize,
4739
- "$size": size
4745
+ "$size": size,
4746
+ "$titleWeight": titleWeight
4740
4747
  }, title, required && React__default.createElement(Asterisk, null, "*")), React__default.createElement(DropdownContainer, {
4741
4748
  ref: dropdownRef,
4742
4749
  "$width": width,