labsense-ui-kit 1.2.86 → 1.2.87

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.
@@ -14,6 +14,7 @@ export declare const DropdownMenu: import("styled-components/dist/types").IStyle
14
14
  $top?: string | undefined;
15
15
  $bottom?: string | undefined;
16
16
  $optionsAvailable: boolean;
17
+ $dropDownPosition?: "center" | "left" | "right" | undefined;
17
18
  }>> & string;
18
19
  interface Option {
19
20
  label: string;
@@ -73,6 +74,7 @@ interface SelectOption {
73
74
  gap: string;
74
75
  node: React.ReactNode;
75
76
  };
77
+ dropDownPosition?: 'left' | 'center' | 'right';
76
78
  }
77
79
  declare const SelectOption: React.FC<SelectOption>;
78
80
  export default SelectOption;
package/dist/index.js CHANGED
@@ -7783,7 +7783,7 @@ var LabelText$1 = styled__default.div(_templateObject5$5 || (_templateObject5$5
7783
7783
  return $disabled ? theme.vms.text.medium : $color || theme.vms.text.medium;
7784
7784
  });
7785
7785
  var NoOptions = styled__default(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"])));
7786
- var DropdownMenu$1 = styled__default.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) {
7786
+ var DropdownMenu$1 = styled__default.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) {
7787
7787
  var theme = _ref24.theme;
7788
7788
  return "1px solid " + theme.vms.border.light;
7789
7789
  }, function (_ref25) {
@@ -7802,79 +7802,91 @@ var DropdownMenu$1 = styled__default.div(_templateObject7$3 || (_templateObject7
7802
7802
  }, function (_ref29) {
7803
7803
  var $bottom = _ref29.$bottom;
7804
7804
  return $bottom && "bottom: " + $bottom + ";";
7805
+ }, function (_ref30) {
7806
+ var $dropDownPosition = _ref30.$dropDownPosition;
7807
+ switch ($dropDownPosition) {
7808
+ case 'center':
7809
+ return "\n left: 50%;\n transform: translateX(-50%);\n ";
7810
+ case 'right':
7811
+ return "\n right: 0;\n left: auto;\n ";
7812
+ default:
7813
+ return "\n left: 0;\n ";
7814
+ }
7805
7815
  });
7806
7816
  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"])));
7807
- var SearchContainer$1 = styled__default.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) {
7808
- var $background = _ref30.$background,
7809
- theme = _ref30.theme;
7817
+ var SearchContainer$1 = styled__default.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) {
7818
+ var $background = _ref31.$background,
7819
+ theme = _ref31.theme;
7810
7820
  return $background || theme.vms.accent.light_2;
7811
- }, function (_ref31) {
7812
- var $border = _ref31.$border;
7813
- return $border || 'none';
7814
7821
  }, function (_ref32) {
7815
- var theme = _ref32.theme;
7816
- return "1px solid " + theme.vms.border.light;
7822
+ var $border = _ref32.$border;
7823
+ return $border || 'none';
7817
7824
  }, function (_ref33) {
7818
- var $borderRadius = _ref33.$borderRadius;
7825
+ var theme = _ref33.theme;
7826
+ return "1px solid " + theme.vms.border.light;
7827
+ }, function (_ref34) {
7828
+ var $borderRadius = _ref34.$borderRadius;
7819
7829
  return $borderRadius || '8px 8px 0 0';
7820
7830
  });
7821
- var SearchBar$1 = styled__default.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) {
7822
- var $inputColor = _ref34.$inputColor,
7823
- theme = _ref34.theme;
7824
- return $inputColor || theme.vms.text.medium;
7825
- }, function (_ref35) {
7826
- var $placeholderColor = _ref35.$placeholderColor,
7831
+ var SearchBar$1 = styled__default.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) {
7832
+ var $inputColor = _ref35.$inputColor,
7827
7833
  theme = _ref35.theme;
7834
+ return $inputColor || theme.vms.text.medium;
7835
+ }, function (_ref36) {
7836
+ var $placeholderColor = _ref36.$placeholderColor,
7837
+ theme = _ref36.theme;
7828
7838
  return $placeholderColor || theme.vms.text.light;
7829
7839
  });
7830
- var SelectOption = function SelectOption(_ref36) {
7840
+ var SelectOption = function SelectOption(_ref37) {
7831
7841
  var _options$find;
7832
- var title = _ref36.title,
7833
- titlecolor = _ref36.titlecolor,
7834
- titleWeight = _ref36.titleWeight,
7835
- options = _ref36.options,
7836
- value = _ref36.value,
7837
- onChange = _ref36.onChange,
7838
- _ref36$disabled = _ref36.disabled,
7839
- disabled = _ref36$disabled === void 0 ? false : _ref36$disabled,
7840
- size = _ref36.size,
7841
- width = _ref36.width,
7842
- _ref36$labelText = _ref36.labelText,
7843
- labelText = _ref36$labelText === void 0 ? 'Select' : _ref36$labelText,
7844
- border = _ref36.border,
7845
- background = _ref36.background,
7846
- _ref36$padding = _ref36.padding,
7847
- padding = _ref36$padding === void 0 ? '0px' : _ref36$padding,
7848
- borderRadius = _ref36.borderRadius,
7849
- optionColor = _ref36.optionColor,
7850
- optionFontSize = _ref36.optionFontSize,
7851
- optionFontWeight = _ref36.optionFontWeight,
7852
- optionBackgroundColor = _ref36.optionBackgroundColor,
7853
- menuBackground = _ref36.menuBackground,
7854
- optionsBorderRadius = _ref36.optionsBorderRadius,
7855
- color = _ref36.color,
7856
- required = _ref36.required,
7857
- _ref36$NoOptionsText = _ref36.NoOptionsText,
7858
- NoOptionsText = _ref36$NoOptionsText === void 0 ? 'No Options Available' : _ref36$NoOptionsText,
7859
- positionRef = _ref36.positionRef,
7860
- fontStyle = _ref36.fontStyle,
7861
- icon = _ref36.icon,
7862
- _ref36$searchBox = _ref36.searchBox,
7863
- searchBox = _ref36$searchBox === void 0 ? true : _ref36$searchBox,
7864
- searchBoxBackground = _ref36.searchBoxBackground,
7865
- searchBoxBorder = _ref36.searchBoxBorder,
7866
- searchBoxBorderRadius = _ref36.searchBoxBorderRadius,
7867
- searchIcon = _ref36.searchIcon,
7868
- _ref36$placeholderTex = _ref36.placeholderText,
7869
- placeholderText = _ref36$placeholderTex === void 0 ? 'Search...' : _ref36$placeholderTex,
7870
- iconColor = _ref36.iconColor,
7871
- placeholderColor = _ref36.placeholderColor,
7872
- inputColor = _ref36.inputColor,
7873
- _ref36$iconSize = _ref36.iconSize,
7874
- iconSize = _ref36$iconSize === void 0 ? 16 : _ref36$iconSize,
7875
- _ref36$allowDeselect = _ref36.allowDeselect,
7876
- allowDeselect = _ref36$allowDeselect === void 0 ? true : _ref36$allowDeselect,
7877
- titleRightNode = _ref36.titleRightNode;
7842
+ var title = _ref37.title,
7843
+ titlecolor = _ref37.titlecolor,
7844
+ titleWeight = _ref37.titleWeight,
7845
+ options = _ref37.options,
7846
+ value = _ref37.value,
7847
+ onChange = _ref37.onChange,
7848
+ _ref37$disabled = _ref37.disabled,
7849
+ disabled = _ref37$disabled === void 0 ? false : _ref37$disabled,
7850
+ size = _ref37.size,
7851
+ width = _ref37.width,
7852
+ _ref37$labelText = _ref37.labelText,
7853
+ labelText = _ref37$labelText === void 0 ? 'Select' : _ref37$labelText,
7854
+ border = _ref37.border,
7855
+ background = _ref37.background,
7856
+ _ref37$padding = _ref37.padding,
7857
+ padding = _ref37$padding === void 0 ? '0px' : _ref37$padding,
7858
+ borderRadius = _ref37.borderRadius,
7859
+ optionColor = _ref37.optionColor,
7860
+ optionFontSize = _ref37.optionFontSize,
7861
+ optionFontWeight = _ref37.optionFontWeight,
7862
+ optionBackgroundColor = _ref37.optionBackgroundColor,
7863
+ menuBackground = _ref37.menuBackground,
7864
+ optionsBorderRadius = _ref37.optionsBorderRadius,
7865
+ color = _ref37.color,
7866
+ required = _ref37.required,
7867
+ _ref37$NoOptionsText = _ref37.NoOptionsText,
7868
+ NoOptionsText = _ref37$NoOptionsText === void 0 ? 'No Options Available' : _ref37$NoOptionsText,
7869
+ positionRef = _ref37.positionRef,
7870
+ fontStyle = _ref37.fontStyle,
7871
+ icon = _ref37.icon,
7872
+ _ref37$searchBox = _ref37.searchBox,
7873
+ searchBox = _ref37$searchBox === void 0 ? true : _ref37$searchBox,
7874
+ searchBoxBackground = _ref37.searchBoxBackground,
7875
+ searchBoxBorder = _ref37.searchBoxBorder,
7876
+ searchBoxBorderRadius = _ref37.searchBoxBorderRadius,
7877
+ searchIcon = _ref37.searchIcon,
7878
+ _ref37$placeholderTex = _ref37.placeholderText,
7879
+ placeholderText = _ref37$placeholderTex === void 0 ? 'Search...' : _ref37$placeholderTex,
7880
+ iconColor = _ref37.iconColor,
7881
+ placeholderColor = _ref37.placeholderColor,
7882
+ inputColor = _ref37.inputColor,
7883
+ _ref37$iconSize = _ref37.iconSize,
7884
+ iconSize = _ref37$iconSize === void 0 ? 16 : _ref37$iconSize,
7885
+ _ref37$allowDeselect = _ref37.allowDeselect,
7886
+ allowDeselect = _ref37$allowDeselect === void 0 ? true : _ref37$allowDeselect,
7887
+ titleRightNode = _ref37.titleRightNode,
7888
+ _ref37$dropDownPositi = _ref37.dropDownPosition,
7889
+ dropDownPosition = _ref37$dropDownPositi === void 0 ? 'left' : _ref37$dropDownPositi;
7878
7890
  var themeColors = useTheme();
7879
7891
  var _useState = React.useState(false),
7880
7892
  dropUp = _useState[0],
@@ -8003,7 +8015,8 @@ var SelectOption = function SelectOption(_ref36) {
8003
8015
  "$optionsBorderRadius": optionsBorderRadius,
8004
8016
  "$optionsAvailable": options.length > 0,
8005
8017
  "$top": dropUp ? 'auto' : '126%',
8006
- "$bottom": dropUp ? '126%' : 'auto'
8018
+ "$bottom": dropUp ? '126%' : 'auto',
8019
+ "$dropDownPosition": dropDownPosition
8007
8020
  }, showSearchBox && React__default.createElement(SearchContainer$1, {
8008
8021
  "$background": searchBoxBackground,
8009
8022
  "$border": searchBoxBorder,