labsense-ui-kit 1.2.98 → 1.2.99

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.
@@ -6335,7 +6335,7 @@ var Container$1 = styled.div(_templateObject4$1 || (_templateObject4$1 = _tagged
6335
6335
  var cursor = _ref9.cursor;
6336
6336
  return cursor;
6337
6337
  });
6338
- var StyledButton = styled.button(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n pointer-events: ", ";\n cursor: ", ";\n height: max-content;\n min-height: max-content;\n width: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n outline: none;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: ", ";\n\n &:focus {\n outline: none;\n }\n\n ", "\n color: ", "; \n"])), function (_ref10) {
6338
+ var StyledButton = styled.button(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n // pointer-events: ", ";\n cursor: ", ";\n height: max-content;\n min-height: max-content;\n width: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n outline: none;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: ", ";\n\n &:focus {\n outline: none;\n }\n\n ", " \n color: ", "; \n"])), function (_ref10) {
6339
6339
  var $disabled = _ref10.$disabled;
6340
6340
  return $disabled ? 'none' : 'auto';
6341
6341
  }, function (_ref11) {
@@ -6363,21 +6363,21 @@ var StyledButton = styled.button(_templateObject5$1 || (_templateObject5$1 = _ta
6363
6363
  theme = _ref15.theme;
6364
6364
  switch ($variant) {
6365
6365
  case 'primary':
6366
- return "\n background: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.primary : "1px solid " + theme.vms["default"].primary) + ";\n &:hover {\n background: " + theme.vms.hover.primary + ";\n border: 1px solid " + theme.vms.hover.primary + ";\n }\n ";
6366
+ return "\n background: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.primary : "1px solid " + theme.vms["default"].primary) + ";\n &:hover {\n " + (!$disabled && "\n background: " + theme.vms.hover.primary + ";\n border: 1px solid " + theme.vms.hover.primary + ";\n ") + "\n }\n ";
6367
6367
  case 'secondary':
6368
- return "\n background: " + ($disabled ? theme.vms.disabled.secondary : theme.vms["default"].secondary) + "; \n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.secondary : "1px solid " + theme.vms["default"].secondary) + ";\n &:hover{\n background: " + theme.vms.hover.secondary + ";\n border: 1px solid " + theme.vms.hover.secondary + ";\n }\n ";
6368
+ return "\n background: " + ($disabled ? theme.vms.disabled.secondary : theme.vms["default"].secondary) + "; \n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.secondary : "1px solid " + theme.vms["default"].secondary) + ";\n &:hover{\n " + (!$disabled && "\n background: " + theme.vms.hover.secondary + ";\n border: 1px solid " + theme.vms.hover.secondary + ";\n ") + "\n }\n ";
6369
6369
  case 'tertiary':
6370
- return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n border: " + ($borderDefault ? "" + $borderDefault : "1px solid " + theme.vms["default"].tertiary) + ";\n &:hover {\n color: " + (!$disabled && $borderHover ? (_$borderHover$match = $borderHover.match(/#\w+/)) === null || _$borderHover$match === void 0 ? void 0 : _$borderHover$match[0] : theme.vms.hover.primary) + ";\n border: " + ($borderHover ? $borderHover : "1px solid " + theme.vms.hover.primary) + ";\n }\n ";
6370
+ return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n border: " + ($borderDefault ? "" + $borderDefault : "1px solid " + theme.vms["default"].tertiary) + ";\n &:hover {\n " + (!$disabled && "\n color: " + ($borderHover ? (_$borderHover$match = $borderHover.match(/#\w+/)) === null || _$borderHover$match === void 0 ? void 0 : _$borderHover$match[0] : theme.vms.hover.primary) + ";\n border: " + ($borderHover ? $borderHover : "1px solid " + theme.vms.hover.primary) + ";\n ") + "\n }\n ";
6371
6371
  case 'error':
6372
- return "\n background: " + ($disabled ? theme.vms.disabled.error : theme.vms["default"].error) + "; \n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.error : "1px solid " + theme.vms["default"].error) + ";\n &:hover{\n background: " + theme.vms.hover.error + ";\n border: 1px solid " + theme.vms.hover.error + ";\n }\n ";
6372
+ return "\n background: " + ($disabled ? theme.vms.disabled.error : theme.vms["default"].error) + "; \n color: " + theme.vms.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.error : "1px solid " + theme.vms["default"].error) + ";\n &:hover{\n " + (!$disabled && "\n background: " + theme.vms.hover.error + ";\n border: 1px solid " + theme.vms.hover.error + ";\n ") + "\n }\n ";
6373
6373
  case 'outline-primary':
6374
- return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.primary : "1px solid " + theme.vms["default"].primary) + ";\n &:hover{\n border: 1px solid " + theme.vms.hover.primary + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.primary + ";\n }\n ";
6374
+ return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.primary : theme.vms["default"].primary) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.primary : "1px solid " + theme.vms["default"].primary) + ";\n &:hover{\n " + (!$disabled && "\n border: 1px solid " + theme.vms.hover.primary + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.primary + ";\n ") + "\n }\n ";
6375
6375
  case 'outline-secondary':
6376
- return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.secondary : theme.vms["default"].secondary) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.secondary : "1px solid " + theme.vms["default"].secondary) + ";\n &:hover{\n border: 1px solid " + theme.vms.hover.secondary + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.secondary + ";\n }\n ";
6376
+ return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.secondary : theme.vms["default"].secondary) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.secondary : "1px solid " + theme.vms["default"].secondary) + ";\n &:hover{\n " + (!$disabled && "\n border: 1px solid " + theme.vms.hover.secondary + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.secondary + ";\n ") + "\n }\n ";
6377
6377
  case 'outline-error':
6378
- return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.error : theme.vms["default"].error) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.error : "1px solid " + theme.vms["default"].error) + ";\n &:hover{\n border: 1px solid " + theme.vms.hover.error + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.error + ";\n }\n ";
6378
+ return "\n background: " + theme.vms["default"].tertiary + ";\n color: " + ($disabled ? theme.vms.disabled.error : theme.vms["default"].error) + ";\n border: " + ($disabled ? "1px solid " + theme.vms.disabled.error : "1px solid " + theme.vms["default"].error) + ";\n &:hover{\n " + (!$disabled && "\n border: 1px solid " + theme.vms.hover.error + ";\n color: " + theme.vms.text.white + ";\n background: " + theme.vms.hover.error + ";\n ") + "\n }\n ";
6379
6379
  case 'custom':
6380
- return "\n background: " + $background + ";\n color: " + $color + ";\n border: " + ("1px solid " + $borderDefault) + ";\n &:hover{\n border: 1px solid " + $borderHover + ";\n color: " + $colorHover + ";\n background: " + $borderHover + ";\n }\n ";
6380
+ return "\n background: " + $background + ";\n color: " + $color + ";\n border: " + ("1px solid " + $borderDefault) + ";\n &:hover{\n " + (!$disabled && "\n border: 1px solid " + $borderHover + ";\n color: " + $colorHover + ";\n background: " + $borderHover + ";\n ") + "\n }\n ";
6381
6381
  default:
6382
6382
  return '';
6383
6383
  }
@@ -6455,10 +6455,10 @@ var ButtonComponent = function ButtonComponent(_ref21) {
6455
6455
  "$padding": padding,
6456
6456
  "$variant": variant,
6457
6457
  onMouseEnter: function onMouseEnter() {
6458
- return setIsHovered(true);
6458
+ if (!disabled) setIsHovered(true);
6459
6459
  },
6460
6460
  onMouseLeave: function onMouseLeave() {
6461
- return setIsHovered(false);
6461
+ if (!disabled) setIsHovered(false);
6462
6462
  }
6463
6463
  }, React.createElement(Container$1, {
6464
6464
  "$iconPosition": iconPos,