labsense-ui-kit 1.2.86 → 1.2.88

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.
@@ -7178,6 +7178,7 @@ var OptionComponent = function OptionComponent(_ref9) {
7178
7178
  _ref9$searchBox = _ref9.searchBox,
7179
7179
  searchBox = _ref9$searchBox === void 0 ? true : _ref9$searchBox,
7180
7180
  NoOptionsText = _ref9.NoOptionsText;
7181
+ var themeColors = useTheme();
7181
7182
  var _useState = useState(''),
7182
7183
  searchQuery = _useState[0],
7183
7184
  setSearchQuery = _useState[1];
@@ -7213,7 +7214,7 @@ var OptionComponent = function OptionComponent(_ref9) {
7213
7214
  placeholder: placeholder,
7214
7215
  value: searchQuery,
7215
7216
  onChange: handleSearchChange,
7216
- "$inputColor": searchbarTextColor,
7217
+ "$inputColor": searchbarTextColor || themeColors.vms.text.white,
7217
7218
  "$placeholderColor": placeholderColor
7218
7219
  })), React.createElement(OptionContainer, null, SortedOptions.length > 0 ? SortedOptions.map(function (option, id) {
7219
7220
  return React.createElement(OptionItem, {
@@ -7779,7 +7780,7 @@ var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _tagged
7779
7780
  return $disabled ? theme.vms.text.medium : $color || theme.vms.text.medium;
7780
7781
  });
7781
7782
  var NoOptions = styled(Span)(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 100%;\n padding: 12px;\n font-size: 14px;\n font-weight: 400;\n"])));
7782
- var DropdownMenu$1 = styled.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border: ", ";\n border-radius: ", ";\n min-width: 100%;\n width: ", ";\n background: ", ";\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n overflow: hidden; \n position: absolute;\n z-index: 1;\n ", "\n ", "\n z-index: 2;\n"])), function (_ref24) {
7783
+ var DropdownMenu$1 = styled.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border: ", ";\n border-radius: ", ";\n min-width: 100%;\n width: ", ";\n background: ", ";\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n position: absolute;\n z-index: 2;\n ", "\n ", "\n\n ", "\n"])), function (_ref24) {
7783
7784
  var theme = _ref24.theme;
7784
7785
  return "1px solid " + theme.vms.border.light;
7785
7786
  }, function (_ref25) {
@@ -7798,79 +7799,91 @@ var DropdownMenu$1 = styled.div(_templateObject7$3 || (_templateObject7$3 = _tag
7798
7799
  }, function (_ref29) {
7799
7800
  var $bottom = _ref29.$bottom;
7800
7801
  return $bottom && "bottom: " + $bottom + ";";
7802
+ }, function (_ref30) {
7803
+ var $dropDownPosition = _ref30.$dropDownPosition;
7804
+ switch ($dropDownPosition) {
7805
+ case 'center':
7806
+ return "\n left: 50%;\n transform: translateX(-50%);\n ";
7807
+ case 'right':
7808
+ return "\n right: 0;\n left: auto;\n ";
7809
+ default:
7810
+ return "\n left: 0;\n ";
7811
+ }
7801
7812
  });
7802
7813
  var OptionsWrapper = styled.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n max-height: 150px; \n overflow-y: auto;\n scrollbar-width: thin;\n width: 100%;\n"])));
7803
- var SearchContainer$1 = styled.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom: ", ";\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 (_ref30) {
7804
- var $background = _ref30.$background,
7805
- theme = _ref30.theme;
7814
+ var SearchContainer$1 = styled.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom: ", ";\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 (_ref31) {
7815
+ var $background = _ref31.$background,
7816
+ theme = _ref31.theme;
7806
7817
  return $background || theme.vms.accent.light_2;
7807
- }, function (_ref31) {
7808
- var $border = _ref31.$border;
7809
- return $border || 'none';
7810
7818
  }, function (_ref32) {
7811
- var theme = _ref32.theme;
7812
- return "1px solid " + theme.vms.border.light;
7819
+ var $border = _ref32.$border;
7820
+ return $border || 'none';
7813
7821
  }, function (_ref33) {
7814
- var $borderRadius = _ref33.$borderRadius;
7822
+ var theme = _ref33.theme;
7823
+ return "1px solid " + theme.vms.border.light;
7824
+ }, function (_ref34) {
7825
+ var $borderRadius = _ref34.$borderRadius;
7815
7826
  return $borderRadius || '8px 8px 0 0';
7816
7827
  });
7817
- var SearchBar$1 = styled.input(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: transparent;\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), function (_ref34) {
7818
- var $inputColor = _ref34.$inputColor,
7819
- theme = _ref34.theme;
7820
- return $inputColor || theme.vms.text.medium;
7821
- }, function (_ref35) {
7822
- var $placeholderColor = _ref35.$placeholderColor,
7828
+ var SearchBar$1 = styled.input(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: transparent;\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), function (_ref35) {
7829
+ var $inputColor = _ref35.$inputColor,
7823
7830
  theme = _ref35.theme;
7831
+ return $inputColor || theme.vms.text.medium;
7832
+ }, function (_ref36) {
7833
+ var $placeholderColor = _ref36.$placeholderColor,
7834
+ theme = _ref36.theme;
7824
7835
  return $placeholderColor || theme.vms.text.light;
7825
7836
  });
7826
- var SelectOption = function SelectOption(_ref36) {
7837
+ var SelectOption = function SelectOption(_ref37) {
7827
7838
  var _options$find;
7828
- var title = _ref36.title,
7829
- titlecolor = _ref36.titlecolor,
7830
- titleWeight = _ref36.titleWeight,
7831
- options = _ref36.options,
7832
- value = _ref36.value,
7833
- onChange = _ref36.onChange,
7834
- _ref36$disabled = _ref36.disabled,
7835
- disabled = _ref36$disabled === void 0 ? false : _ref36$disabled,
7836
- size = _ref36.size,
7837
- width = _ref36.width,
7838
- _ref36$labelText = _ref36.labelText,
7839
- labelText = _ref36$labelText === void 0 ? 'Select' : _ref36$labelText,
7840
- border = _ref36.border,
7841
- background = _ref36.background,
7842
- _ref36$padding = _ref36.padding,
7843
- padding = _ref36$padding === void 0 ? '0px' : _ref36$padding,
7844
- borderRadius = _ref36.borderRadius,
7845
- optionColor = _ref36.optionColor,
7846
- optionFontSize = _ref36.optionFontSize,
7847
- optionFontWeight = _ref36.optionFontWeight,
7848
- optionBackgroundColor = _ref36.optionBackgroundColor,
7849
- menuBackground = _ref36.menuBackground,
7850
- optionsBorderRadius = _ref36.optionsBorderRadius,
7851
- color = _ref36.color,
7852
- required = _ref36.required,
7853
- _ref36$NoOptionsText = _ref36.NoOptionsText,
7854
- NoOptionsText = _ref36$NoOptionsText === void 0 ? 'No Options Available' : _ref36$NoOptionsText,
7855
- positionRef = _ref36.positionRef,
7856
- fontStyle = _ref36.fontStyle,
7857
- icon = _ref36.icon,
7858
- _ref36$searchBox = _ref36.searchBox,
7859
- searchBox = _ref36$searchBox === void 0 ? true : _ref36$searchBox,
7860
- searchBoxBackground = _ref36.searchBoxBackground,
7861
- searchBoxBorder = _ref36.searchBoxBorder,
7862
- searchBoxBorderRadius = _ref36.searchBoxBorderRadius,
7863
- searchIcon = _ref36.searchIcon,
7864
- _ref36$placeholderTex = _ref36.placeholderText,
7865
- placeholderText = _ref36$placeholderTex === void 0 ? 'Search...' : _ref36$placeholderTex,
7866
- iconColor = _ref36.iconColor,
7867
- placeholderColor = _ref36.placeholderColor,
7868
- inputColor = _ref36.inputColor,
7869
- _ref36$iconSize = _ref36.iconSize,
7870
- iconSize = _ref36$iconSize === void 0 ? 16 : _ref36$iconSize,
7871
- _ref36$allowDeselect = _ref36.allowDeselect,
7872
- allowDeselect = _ref36$allowDeselect === void 0 ? true : _ref36$allowDeselect,
7873
- titleRightNode = _ref36.titleRightNode;
7839
+ var title = _ref37.title,
7840
+ titlecolor = _ref37.titlecolor,
7841
+ titleWeight = _ref37.titleWeight,
7842
+ options = _ref37.options,
7843
+ value = _ref37.value,
7844
+ onChange = _ref37.onChange,
7845
+ _ref37$disabled = _ref37.disabled,
7846
+ disabled = _ref37$disabled === void 0 ? false : _ref37$disabled,
7847
+ size = _ref37.size,
7848
+ width = _ref37.width,
7849
+ _ref37$labelText = _ref37.labelText,
7850
+ labelText = _ref37$labelText === void 0 ? 'Select' : _ref37$labelText,
7851
+ border = _ref37.border,
7852
+ background = _ref37.background,
7853
+ _ref37$padding = _ref37.padding,
7854
+ padding = _ref37$padding === void 0 ? '0px' : _ref37$padding,
7855
+ borderRadius = _ref37.borderRadius,
7856
+ optionColor = _ref37.optionColor,
7857
+ optionFontSize = _ref37.optionFontSize,
7858
+ optionFontWeight = _ref37.optionFontWeight,
7859
+ optionBackgroundColor = _ref37.optionBackgroundColor,
7860
+ menuBackground = _ref37.menuBackground,
7861
+ optionsBorderRadius = _ref37.optionsBorderRadius,
7862
+ color = _ref37.color,
7863
+ required = _ref37.required,
7864
+ _ref37$NoOptionsText = _ref37.NoOptionsText,
7865
+ NoOptionsText = _ref37$NoOptionsText === void 0 ? 'No Options Available' : _ref37$NoOptionsText,
7866
+ positionRef = _ref37.positionRef,
7867
+ fontStyle = _ref37.fontStyle,
7868
+ icon = _ref37.icon,
7869
+ _ref37$searchBox = _ref37.searchBox,
7870
+ searchBox = _ref37$searchBox === void 0 ? true : _ref37$searchBox,
7871
+ searchBoxBackground = _ref37.searchBoxBackground,
7872
+ searchBoxBorder = _ref37.searchBoxBorder,
7873
+ searchBoxBorderRadius = _ref37.searchBoxBorderRadius,
7874
+ searchIcon = _ref37.searchIcon,
7875
+ _ref37$placeholderTex = _ref37.placeholderText,
7876
+ placeholderText = _ref37$placeholderTex === void 0 ? 'Search...' : _ref37$placeholderTex,
7877
+ iconColor = _ref37.iconColor,
7878
+ placeholderColor = _ref37.placeholderColor,
7879
+ inputColor = _ref37.inputColor,
7880
+ _ref37$iconSize = _ref37.iconSize,
7881
+ iconSize = _ref37$iconSize === void 0 ? 16 : _ref37$iconSize,
7882
+ _ref37$allowDeselect = _ref37.allowDeselect,
7883
+ allowDeselect = _ref37$allowDeselect === void 0 ? true : _ref37$allowDeselect,
7884
+ titleRightNode = _ref37.titleRightNode,
7885
+ _ref37$dropDownPositi = _ref37.dropDownPosition,
7886
+ dropDownPosition = _ref37$dropDownPositi === void 0 ? 'left' : _ref37$dropDownPositi;
7874
7887
  var themeColors = useTheme();
7875
7888
  var _useState = useState(false),
7876
7889
  dropUp = _useState[0],
@@ -7999,7 +8012,8 @@ var SelectOption = function SelectOption(_ref36) {
7999
8012
  "$optionsBorderRadius": optionsBorderRadius,
8000
8013
  "$optionsAvailable": options.length > 0,
8001
8014
  "$top": dropUp ? 'auto' : '126%',
8002
- "$bottom": dropUp ? '126%' : 'auto'
8015
+ "$bottom": dropUp ? '126%' : 'auto',
8016
+ "$dropDownPosition": dropDownPosition
8003
8017
  }, showSearchBox && React.createElement(SearchContainer$1, {
8004
8018
  "$background": searchBoxBackground,
8005
8019
  "$border": searchBoxBorder,