labsense-ui-kit 1.0.25 → 1.0.27
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/index.js +60 -56
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -56
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2304,31 +2304,34 @@ var LoaderWrapper = styled__default.div(_templateObject3$1 || (_templateObject3$
|
|
|
2304
2304
|
var loaderPosition = _ref6.loaderPosition;
|
|
2305
2305
|
return loaderPosition === 'left' ? '4px' : '0';
|
|
2306
2306
|
});
|
|
2307
|
-
var Container = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: ", ";\n gap: ", ";\n"])), function (_ref7) {
|
|
2307
|
+
var Container = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: ", ";\n gap: ", ";\n svg {\n cursor: ", ";\n }\n"])), function (_ref7) {
|
|
2308
2308
|
var iconPosition = _ref7.iconPosition;
|
|
2309
2309
|
return iconPosition === 'right' ? 'row-reverse' : 'row';
|
|
2310
2310
|
}, function (_ref8) {
|
|
2311
2311
|
var gap = _ref8.gap;
|
|
2312
2312
|
return gap || '4px';
|
|
2313
|
+
}, function (_ref9) {
|
|
2314
|
+
var cursor = _ref9.cursor;
|
|
2315
|
+
return cursor;
|
|
2313
2316
|
});
|
|
2314
|
-
var StyledButton = styled__default.button(_templateObject5 || (_templateObject5 = _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 (
|
|
2315
|
-
var disabled = _ref9.disabled;
|
|
2316
|
-
return disabled ? 'none' : 'auto';
|
|
2317
|
-
}, function (_ref10) {
|
|
2317
|
+
var StyledButton = styled__default.button(_templateObject5 || (_templateObject5 = _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) {
|
|
2318
2318
|
var disabled = _ref10.disabled;
|
|
2319
|
-
return disabled ? '
|
|
2319
|
+
return disabled ? 'none' : 'auto';
|
|
2320
2320
|
}, function (_ref11) {
|
|
2321
|
-
var
|
|
2322
|
-
return
|
|
2321
|
+
var disabled = _ref11.disabled;
|
|
2322
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
2323
2323
|
}, function (_ref12) {
|
|
2324
|
-
var
|
|
2325
|
-
|
|
2326
|
-
return size === 'small' ? '8px 12.2px' : size === 'medium' ? '10px 19px' : size === 'large' ? '12px 24.5px' : size === 'custom' ? padding : '10px 16px';
|
|
2324
|
+
var borderRadius = _ref12.borderRadius;
|
|
2325
|
+
return borderRadius || '8px';
|
|
2327
2326
|
}, function (_ref13) {
|
|
2328
|
-
var
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2327
|
+
var size = _ref13.size,
|
|
2328
|
+
padding = _ref13.padding;
|
|
2329
|
+
return size === 'small' ? '8px 12.2px' : size === 'medium' ? '10px 19px' : size === 'large' ? '12px 24.5px' : size === 'custom' ? padding : '10px 16px';
|
|
2330
|
+
}, function (_ref14) {
|
|
2331
|
+
var variant = _ref14.variant,
|
|
2332
|
+
disabled = _ref14.disabled,
|
|
2333
|
+
borderHover = _ref14.borderHover,
|
|
2334
|
+
borderDefault = _ref14.borderDefault;
|
|
2332
2335
|
switch (variant) {
|
|
2333
2336
|
case 'primary':
|
|
2334
2337
|
return "\n background: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.primary : "1px solid " + colorVariables["default"].primary) + ";\n &:hover {\n background: " + colorVariables.hover.primary + ";\n border: 1px solid " + colorVariables.hover.primary + ";\n }\n ";
|
|
@@ -2347,56 +2350,56 @@ var StyledButton = styled__default.button(_templateObject5 || (_templateObject5
|
|
|
2347
2350
|
default:
|
|
2348
2351
|
return '';
|
|
2349
2352
|
}
|
|
2350
|
-
}, function (
|
|
2351
|
-
var color =
|
|
2353
|
+
}, function (_ref15) {
|
|
2354
|
+
var color = _ref15.color;
|
|
2352
2355
|
return color;
|
|
2353
2356
|
});
|
|
2354
|
-
var ButtonText = styled__default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n"])), function (
|
|
2355
|
-
var fontFamily =
|
|
2357
|
+
var ButtonText = styled__default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n"])), function (_ref16) {
|
|
2358
|
+
var fontFamily = _ref16.fontFamily;
|
|
2356
2359
|
return fontFamily ? fontFamily : GlobalFonts.bold;
|
|
2357
|
-
}, function (_ref16) {
|
|
2358
|
-
var size = _ref16.size,
|
|
2359
|
-
fontSize = _ref16.fontSize;
|
|
2360
|
-
return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
|
|
2361
2360
|
}, function (_ref17) {
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2364
|
-
return size === 'custom'
|
|
2361
|
+
var size = _ref17.size,
|
|
2362
|
+
fontSize = _ref17.fontSize;
|
|
2363
|
+
return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
|
|
2365
2364
|
}, function (_ref18) {
|
|
2366
|
-
var
|
|
2367
|
-
|
|
2365
|
+
var fontWeight = _ref18.fontWeight,
|
|
2366
|
+
size = _ref18.size;
|
|
2367
|
+
return size === 'custom' && fontWeight || '500';
|
|
2368
|
+
}, function (_ref19) {
|
|
2369
|
+
var size = _ref19.size,
|
|
2370
|
+
fontSize = _ref19.fontSize;
|
|
2368
2371
|
return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
|
|
2369
2372
|
});
|
|
2370
|
-
var ButtonComponent = function ButtonComponent(
|
|
2371
|
-
var onClick =
|
|
2372
|
-
text =
|
|
2373
|
-
size =
|
|
2374
|
-
background =
|
|
2375
|
-
color =
|
|
2376
|
-
borderDefault =
|
|
2377
|
-
borderHover =
|
|
2378
|
-
borderRadius =
|
|
2379
|
-
fontWeight =
|
|
2380
|
-
fontSize =
|
|
2381
|
-
fontFamily =
|
|
2382
|
-
padding =
|
|
2383
|
-
icon =
|
|
2384
|
-
gap =
|
|
2385
|
-
|
|
2386
|
-
variant =
|
|
2387
|
-
|
|
2388
|
-
iconPosition =
|
|
2389
|
-
|
|
2390
|
-
iconWeight =
|
|
2391
|
-
iconSize =
|
|
2392
|
-
|
|
2393
|
-
disabled =
|
|
2394
|
-
|
|
2395
|
-
loaderProps =
|
|
2373
|
+
var ButtonComponent = function ButtonComponent(_ref20) {
|
|
2374
|
+
var onClick = _ref20.onClick,
|
|
2375
|
+
text = _ref20.text,
|
|
2376
|
+
size = _ref20.size,
|
|
2377
|
+
background = _ref20.background,
|
|
2378
|
+
color = _ref20.color,
|
|
2379
|
+
borderDefault = _ref20.borderDefault,
|
|
2380
|
+
borderHover = _ref20.borderHover,
|
|
2381
|
+
borderRadius = _ref20.borderRadius,
|
|
2382
|
+
fontWeight = _ref20.fontWeight,
|
|
2383
|
+
fontSize = _ref20.fontSize,
|
|
2384
|
+
fontFamily = _ref20.fontFamily,
|
|
2385
|
+
padding = _ref20.padding,
|
|
2386
|
+
icon = _ref20.icon,
|
|
2387
|
+
gap = _ref20.gap,
|
|
2388
|
+
_ref20$variant = _ref20.variant,
|
|
2389
|
+
variant = _ref20$variant === void 0 ? 'primary' : _ref20$variant,
|
|
2390
|
+
_ref20$iconPosition = _ref20.iconPosition,
|
|
2391
|
+
iconPosition = _ref20$iconPosition === void 0 ? 'right' : _ref20$iconPosition,
|
|
2392
|
+
_ref20$iconWeight = _ref20.iconWeight,
|
|
2393
|
+
iconWeight = _ref20$iconWeight === void 0 ? '2' : _ref20$iconWeight,
|
|
2394
|
+
iconSize = _ref20.iconSize,
|
|
2395
|
+
_ref20$disabled = _ref20.disabled,
|
|
2396
|
+
disabled = _ref20$disabled === void 0 ? false : _ref20$disabled,
|
|
2397
|
+
_ref20$loaderProps = _ref20.loaderProps,
|
|
2398
|
+
loaderProps = _ref20$loaderProps === void 0 ? {
|
|
2396
2399
|
loading: false,
|
|
2397
2400
|
loaderPosition: 'right',
|
|
2398
2401
|
loaderColor: colorVariables.text.white
|
|
2399
|
-
} :
|
|
2402
|
+
} : _ref20$loaderProps;
|
|
2400
2403
|
var _useState = React.useState(false),
|
|
2401
2404
|
isHovered = _useState[0],
|
|
2402
2405
|
setIsHovered = _useState[1];
|
|
@@ -2421,7 +2424,8 @@ var ButtonComponent = function ButtonComponent(_ref19) {
|
|
|
2421
2424
|
}
|
|
2422
2425
|
}, React__default.createElement(Container, {
|
|
2423
2426
|
iconPosition: iconPos,
|
|
2424
|
-
gap: gap
|
|
2427
|
+
gap: gap,
|
|
2428
|
+
cursor: !disabled && typeof onClick === 'function' ? 'pointer' : 'default'
|
|
2425
2429
|
}, icon && React__default.createElement(Icon, {
|
|
2426
2430
|
icon: icon,
|
|
2427
2431
|
weight: iconWeight,
|