labsense-ui-kit 1.1.98 → 1.1.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.
@@ -13,6 +13,7 @@ export interface ButtonProps {
13
13
  text?: string;
14
14
  icon?: IconNames;
15
15
  size?: buttonSizes;
16
+ buttonWidth?: string;
16
17
  background?: string;
17
18
  hoverColor?: string;
18
19
  color?: string;
package/dist/index.js CHANGED
@@ -4088,29 +4088,32 @@ var Container$1 = styled__default.div(_templateObject4$1 || (_templateObject4$1
4088
4088
  var cursor = _ref9.cursor;
4089
4089
  return cursor;
4090
4090
  });
4091
- var StyledButton = styled__default.button(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n pointer-events: ", ";\n cursor: ", ";\n height: max-content;\n min-height: max-content;\n width: max-content;\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) {
4091
+ var StyledButton = styled__default.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) {
4092
4092
  var $disabled = _ref10.$disabled;
4093
4093
  return $disabled ? 'none' : 'auto';
4094
4094
  }, function (_ref11) {
4095
4095
  var $disabled = _ref11.$disabled;
4096
4096
  return $disabled ? 'not-allowed' : 'pointer';
4097
4097
  }, function (_ref12) {
4098
- var $borderRadius = _ref12.$borderRadius;
4099
- return $borderRadius || '8px';
4098
+ var buttonWidth = _ref12.buttonWidth;
4099
+ return buttonWidth;
4100
4100
  }, function (_ref13) {
4101
- var $size = _ref13.$size,
4102
- $padding = _ref13.$padding;
4103
- return $size === 'small' ? '8px 12.2px' : $size === 'medium' ? '10px 19px' : $size === 'large' ? '12px 24.5px' : $size === 'custom' ? $padding : '10px 16px';
4101
+ var $borderRadius = _ref13.$borderRadius;
4102
+ return $borderRadius || '8px';
4104
4103
  }, function (_ref14) {
4104
+ var $size = _ref14.$size,
4105
+ $padding = _ref14.$padding;
4106
+ return $size === 'small' ? '8px 12.2px' : $size === 'medium' ? '10px 19px' : $size === 'large' ? '12px 24.5px' : $size === 'custom' ? $padding : '10px 16px';
4107
+ }, function (_ref15) {
4105
4108
  var _$borderHover$match;
4106
- var $variant = _ref14.$variant,
4107
- $disabled = _ref14.$disabled,
4108
- $borderHover = _ref14.$borderHover,
4109
- $borderDefault = _ref14.$borderDefault,
4110
- $background = _ref14.$background,
4111
- $color = _ref14.$color,
4112
- $colorHover = _ref14.$colorHover,
4113
- theme = _ref14.theme;
4109
+ var $variant = _ref15.$variant,
4110
+ $disabled = _ref15.$disabled,
4111
+ $borderHover = _ref15.$borderHover,
4112
+ $borderDefault = _ref15.$borderDefault,
4113
+ $background = _ref15.$background,
4114
+ $color = _ref15.$color,
4115
+ $colorHover = _ref15.$colorHover,
4116
+ theme = _ref15.theme;
4114
4117
  switch ($variant) {
4115
4118
  case 'primary':
4116
4119
  return "\n background: " + ($disabled ? theme.disabled.primary : theme["default"].primary) + ";\n color: " + theme.text.white + ";\n border: " + ($disabled ? "1px solid " + theme.disabled.primary : "1px solid " + theme["default"].primary) + ";\n &:hover {\n background: " + theme.hover.primary + ";\n border: 1px solid " + theme.hover.primary + ";\n }\n ";
@@ -4131,58 +4134,60 @@ var StyledButton = styled__default.button(_templateObject5$1 || (_templateObject
4131
4134
  default:
4132
4135
  return '';
4133
4136
  }
4134
- }, function (_ref15) {
4135
- var color = _ref15.color;
4137
+ }, function (_ref16) {
4138
+ var color = _ref16.color;
4136
4139
  return color;
4137
4140
  });
4138
- var ButtonText = styled__default.span(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n"])), function (_ref16) {
4139
- var $fontFamily = _ref16.$fontFamily;
4141
+ var ButtonText = styled__default.span(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n"])), function (_ref17) {
4142
+ var $fontFamily = _ref17.$fontFamily;
4140
4143
  return $fontFamily ? $fontFamily : GlobalFonts.bold;
4141
- }, function (_ref17) {
4142
- var $size = _ref17.$size,
4143
- $fontSize = _ref17.$fontSize;
4144
- return $size === 'small' ? '14px' : $size === 'medium' ? '16px' : $size === 'large' ? '18px' : $size === 'custom' ? $fontSize : '16px';
4145
4144
  }, function (_ref18) {
4146
- var $fontWeight = _ref18.$fontWeight,
4147
- $size = _ref18.$size;
4148
- return $size === 'custom' && $fontWeight || '500';
4145
+ var $size = _ref18.$size,
4146
+ $fontSize = _ref18.$fontSize;
4147
+ return $size === 'small' ? '14px' : $size === 'medium' ? '16px' : $size === 'large' ? '18px' : $size === 'custom' ? $fontSize : '16px';
4149
4148
  }, function (_ref19) {
4150
- var $size = _ref19.$size,
4151
- $fontSize = _ref19.$fontSize;
4149
+ var $fontWeight = _ref19.$fontWeight,
4150
+ $size = _ref19.$size;
4151
+ return $size === 'custom' && $fontWeight || '500';
4152
+ }, function (_ref20) {
4153
+ var $size = _ref20.$size,
4154
+ $fontSize = _ref20.$fontSize;
4152
4155
  return $size === 'small' ? '14px' : $size === 'medium' ? '16px' : $size === 'large' ? '18px' : $size === 'custom' ? $fontSize : '16px';
4153
4156
  });
4154
- var ButtonComponent = function ButtonComponent(_ref20) {
4155
- var onClick = _ref20.onClick,
4156
- text = _ref20.text,
4157
- size = _ref20.size,
4158
- background = _ref20.background,
4159
- hoverColor = _ref20.hoverColor,
4160
- color = _ref20.color,
4161
- colorHover = _ref20.colorHover,
4162
- borderDefault = _ref20.borderDefault,
4163
- borderHover = _ref20.borderHover,
4164
- borderRadius = _ref20.borderRadius,
4165
- fontWeight = _ref20.fontWeight,
4166
- fontSize = _ref20.fontSize,
4167
- fontFamily = _ref20.fontFamily,
4168
- padding = _ref20.padding,
4169
- gap = _ref20.gap,
4170
- _ref20$variant = _ref20.variant,
4171
- variant = _ref20$variant === void 0 ? 'primary' : _ref20$variant,
4172
- icon = _ref20.icon,
4173
- iconClick = _ref20.iconClick,
4174
- _ref20$iconPosition = _ref20.iconPosition,
4175
- iconPosition = _ref20$iconPosition === void 0 ? 'right' : _ref20$iconPosition,
4176
- _ref20$iconWeight = _ref20.iconWeight,
4177
- iconWeight = _ref20$iconWeight === void 0 ? '2' : _ref20$iconWeight,
4178
- iconSize = _ref20.iconSize,
4179
- _ref20$disabled = _ref20.disabled,
4180
- disabled = _ref20$disabled === void 0 ? false : _ref20$disabled,
4181
- _ref20$loaderProps = _ref20.loaderProps,
4182
- loaderProps = _ref20$loaderProps === void 0 ? {
4157
+ var ButtonComponent = function ButtonComponent(_ref21) {
4158
+ var onClick = _ref21.onClick,
4159
+ text = _ref21.text,
4160
+ size = _ref21.size,
4161
+ _ref21$buttonWidth = _ref21.buttonWidth,
4162
+ buttonWidth = _ref21$buttonWidth === void 0 ? 'max-content' : _ref21$buttonWidth,
4163
+ background = _ref21.background,
4164
+ hoverColor = _ref21.hoverColor,
4165
+ color = _ref21.color,
4166
+ colorHover = _ref21.colorHover,
4167
+ borderDefault = _ref21.borderDefault,
4168
+ borderHover = _ref21.borderHover,
4169
+ borderRadius = _ref21.borderRadius,
4170
+ fontWeight = _ref21.fontWeight,
4171
+ fontSize = _ref21.fontSize,
4172
+ fontFamily = _ref21.fontFamily,
4173
+ padding = _ref21.padding,
4174
+ gap = _ref21.gap,
4175
+ _ref21$variant = _ref21.variant,
4176
+ variant = _ref21$variant === void 0 ? 'primary' : _ref21$variant,
4177
+ icon = _ref21.icon,
4178
+ iconClick = _ref21.iconClick,
4179
+ _ref21$iconPosition = _ref21.iconPosition,
4180
+ iconPosition = _ref21$iconPosition === void 0 ? 'right' : _ref21$iconPosition,
4181
+ _ref21$iconWeight = _ref21.iconWeight,
4182
+ iconWeight = _ref21$iconWeight === void 0 ? '2' : _ref21$iconWeight,
4183
+ iconSize = _ref21.iconSize,
4184
+ _ref21$disabled = _ref21.disabled,
4185
+ disabled = _ref21$disabled === void 0 ? false : _ref21$disabled,
4186
+ _ref21$loaderProps = _ref21.loaderProps,
4187
+ loaderProps = _ref21$loaderProps === void 0 ? {
4183
4188
  loading: false,
4184
4189
  loaderPosition: 'right'
4185
- } : _ref20$loaderProps;
4190
+ } : _ref21$loaderProps;
4186
4191
  var themeColors = useTheme();
4187
4192
  var _useState = React.useState(false),
4188
4193
  isHovered = _useState[0],
@@ -4192,6 +4197,7 @@ var ButtonComponent = function ButtonComponent(_ref20) {
4192
4197
  return React__default.createElement(StyledButton, {
4193
4198
  "$disabled": disabled,
4194
4199
  onClick: onClick,
4200
+ buttonWidth: buttonWidth,
4195
4201
  "$background": background,
4196
4202
  "$borderDefault": borderDefault,
4197
4203
  "$borderHover": borderHover,