labsense-ui-kit 1.2.66 → 1.2.68

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.
@@ -7482,11 +7482,28 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
7482
7482
  NoOptionsText = _ref31$NoOptionsText === void 0 ? 'No Options Available' : _ref31$NoOptionsText;
7483
7483
  var themeColors = useTheme();
7484
7484
  var _useState = useState(false),
7485
- isOpen = _useState[0],
7486
- setIsOpen = _useState[1];
7485
+ dropUp = _useState[0],
7486
+ setDropUp = _useState[1];
7487
+ var _useState2 = useState(false),
7488
+ isOpen = _useState2[0],
7489
+ setIsOpen = _useState2[1];
7487
7490
  var dropdownRef = useRef(null);
7488
7491
  var toggleDropdown = function toggleDropdown() {
7489
- if (!disabled) setIsOpen(function (prev) {
7492
+ if (disabled) return;
7493
+ var refToUse = dropdownRef.current;
7494
+ if (refToUse) {
7495
+ var rect = refToUse.getBoundingClientRect();
7496
+ var windowHeight = window.innerHeight;
7497
+ var spaceBelow = windowHeight - rect.bottom;
7498
+ var spaceAbove = rect.top;
7499
+ var dropdownHeight = 156;
7500
+ if (spaceBelow < dropdownHeight && spaceAbove > dropdownHeight) {
7501
+ setDropUp(true);
7502
+ } else {
7503
+ setDropUp(false);
7504
+ }
7505
+ }
7506
+ setIsOpen(function (prev) {
7490
7507
  return !prev;
7491
7508
  });
7492
7509
  };
@@ -7571,7 +7588,11 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
7571
7588
  })), isOpen && React.createElement(DropdownMenu, {
7572
7589
  "$width": optionWidth,
7573
7590
  "$menuBackground": menuBackground || themeColors.vms.text.white,
7574
- "$optionsBorderRadius": optionsBorderRadius
7591
+ "$optionsBorderRadius": optionsBorderRadius,
7592
+ style: {
7593
+ top: dropUp ? 'auto' : 'calc(100% + 8px)',
7594
+ bottom: dropUp ? 'calc(100% + 8px)' : 'auto'
7595
+ }
7575
7596
  }, React.createElement(OptionComponent, {
7576
7597
  options: options,
7577
7598
  selectedOptions: selectedOptions,
@@ -9160,7 +9181,7 @@ var CircularProgress = function CircularProgress(_ref) {
9160
9181
  "$fontSize": '12px',
9161
9182
  "$fontWeight": '500',
9162
9183
  "$color": progressColor || themeColors.vms["default"].primary
9163
- }, progress === 0 ? '-' : progress + "%"));
9184
+ }, progress === 0 ? 'N/A' : progress + "%"));
9164
9185
  };
9165
9186
 
9166
9187
  var _templateObject$m, _templateObject2$i;