labsense-ui-kit 1.1.98 → 1.1.100
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.
- package/dist/Buttons/Button.d.ts +1 -0
- package/dist/index.js +63 -57
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +63 -57
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/Buttons/Button.d.ts
CHANGED
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:
|
|
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 $
|
|
4099
|
-
return $
|
|
4098
|
+
var $buttonWidth = _ref12.$buttonWidth;
|
|
4099
|
+
return $buttonWidth;
|
|
4100
4100
|
}, function (_ref13) {
|
|
4101
|
-
var $
|
|
4102
|
-
|
|
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 =
|
|
4107
|
-
$disabled =
|
|
4108
|
-
$borderHover =
|
|
4109
|
-
$borderDefault =
|
|
4110
|
-
$background =
|
|
4111
|
-
$color =
|
|
4112
|
-
$colorHover =
|
|
4113
|
-
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 (
|
|
4135
|
-
var 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 (
|
|
4139
|
-
var $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 $
|
|
4147
|
-
$
|
|
4148
|
-
return $size === 'custom'
|
|
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 $
|
|
4151
|
-
$
|
|
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(
|
|
4155
|
-
var onClick =
|
|
4156
|
-
text =
|
|
4157
|
-
size =
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
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
|
-
} :
|
|
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,
|