labsense-ui-kit 1.0.24 → 1.0.26

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.
@@ -18,6 +18,7 @@ export interface ButtonProps {
18
18
  fontWeight?: string;
19
19
  fontSize?: string;
20
20
  fontFamily?: string;
21
+ borderDefault?: string;
21
22
  borderHover?: string;
22
23
  borderRadius?: string;
23
24
  padding?: string;
package/dist/index.js CHANGED
@@ -2304,37 +2304,41 @@ 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 \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 (_ref9) {
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 ? 'not-allowed' : 'pointer';
2319
+ return disabled ? 'none' : 'auto';
2320
2320
  }, function (_ref11) {
2321
- var borderRadius = _ref11.borderRadius;
2322
- return borderRadius || '8px';
2321
+ var disabled = _ref11.disabled;
2322
+ return disabled ? 'not-allowed' : 'pointer';
2323
2323
  }, function (_ref12) {
2324
- var size = _ref12.size,
2325
- padding = _ref12.padding;
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 variant = _ref13.variant,
2329
- disabled = _ref13.disabled,
2330
- borderHover = _ref13.borderHover;
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;
2331
2335
  switch (variant) {
2332
2336
  case 'primary':
2333
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 ";
2334
2338
  case 'secondary':
2335
2339
  return "\n background: " + (disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + "; \n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n background: " + colorVariables.hover.secondary + ";\n border: 1px solid " + colorVariables.hover.secondary + ";\n }\n ";
2336
2340
  case 'tertiary':
2337
- return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: 1px solid transparent;\n &:hover {\n color: " + colorVariables.hover.primary + ";\n border: " + (borderHover ? "" + borderHover : "1px solid " + colorVariables.hover.primary) + ";\n }\n ";
2341
+ return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: " + (borderDefault ? "" + borderDefault : "1px solid " + colorVariables["default"].tertiary) + ";\n &:hover {\n color: " + colorVariables.hover.primary + ";\n border: " + (borderHover ? "" + borderHover : "1px solid " + colorVariables.hover.primary) + ";\n }\n ";
2338
2342
  case 'error':
2339
2343
  return "\n background: " + (disabled ? colorVariables.disabled.error : colorVariables["default"].error) + "; \n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n background: " + colorVariables.hover.error + ";\n border: 1px solid " + colorVariables.hover.error + ";\n }\n ";
2340
2344
  case 'outline-primary':
@@ -2346,55 +2350,56 @@ var StyledButton = styled__default.button(_templateObject5 || (_templateObject5
2346
2350
  default:
2347
2351
  return '';
2348
2352
  }
2349
- }, function (_ref14) {
2350
- var color = _ref14.color;
2353
+ }, function (_ref15) {
2354
+ var color = _ref15.color;
2351
2355
  return color;
2352
2356
  });
2353
- 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 (_ref15) {
2354
- var fontFamily = _ref15.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;
2355
2359
  return fontFamily ? fontFamily : GlobalFonts.bold;
2356
- }, function (_ref16) {
2357
- var size = _ref16.size,
2358
- fontSize = _ref16.fontSize;
2359
- return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
2360
2360
  }, function (_ref17) {
2361
- var fontWeight = _ref17.fontWeight,
2362
- size = _ref17.size;
2363
- return size === 'custom' && fontWeight || '500';
2361
+ var size = _ref17.size,
2362
+ fontSize = _ref17.fontSize;
2363
+ return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
2364
2364
  }, function (_ref18) {
2365
- var size = _ref18.size,
2366
- fontSize = _ref18.fontSize;
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;
2367
2371
  return size === 'small' ? '14px' : size === 'medium' ? '16px' : size === 'large' ? '18px' : size === 'custom' ? fontSize : '16px';
2368
2372
  });
2369
- var ButtonComponent = function ButtonComponent(_ref19) {
2370
- var onClick = _ref19.onClick,
2371
- text = _ref19.text,
2372
- size = _ref19.size,
2373
- background = _ref19.background,
2374
- color = _ref19.color,
2375
- borderHover = _ref19.borderHover,
2376
- borderRadius = _ref19.borderRadius,
2377
- fontWeight = _ref19.fontWeight,
2378
- fontSize = _ref19.fontSize,
2379
- fontFamily = _ref19.fontFamily,
2380
- padding = _ref19.padding,
2381
- icon = _ref19.icon,
2382
- gap = _ref19.gap,
2383
- _ref19$variant = _ref19.variant,
2384
- variant = _ref19$variant === void 0 ? 'primary' : _ref19$variant,
2385
- _ref19$iconPosition = _ref19.iconPosition,
2386
- iconPosition = _ref19$iconPosition === void 0 ? 'right' : _ref19$iconPosition,
2387
- _ref19$iconWeight = _ref19.iconWeight,
2388
- iconWeight = _ref19$iconWeight === void 0 ? '2' : _ref19$iconWeight,
2389
- iconSize = _ref19.iconSize,
2390
- _ref19$disabled = _ref19.disabled,
2391
- disabled = _ref19$disabled === void 0 ? false : _ref19$disabled,
2392
- _ref19$loaderProps = _ref19.loaderProps,
2393
- loaderProps = _ref19$loaderProps === void 0 ? {
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 ? {
2394
2399
  loading: false,
2395
2400
  loaderPosition: 'right',
2396
2401
  loaderColor: colorVariables.text.white
2397
- } : _ref19$loaderProps;
2402
+ } : _ref20$loaderProps;
2398
2403
  var _useState = React.useState(false),
2399
2404
  isHovered = _useState[0],
2400
2405
  setIsHovered = _useState[1];
@@ -2404,6 +2409,7 @@ var ButtonComponent = function ButtonComponent(_ref19) {
2404
2409
  disabled: disabled,
2405
2410
  onClick: onClick,
2406
2411
  background: background,
2412
+ borderDefault: borderDefault,
2407
2413
  borderHover: borderHover,
2408
2414
  borderRadius: borderRadius,
2409
2415
  size: size,
@@ -2418,7 +2424,8 @@ var ButtonComponent = function ButtonComponent(_ref19) {
2418
2424
  }
2419
2425
  }, React__default.createElement(Container, {
2420
2426
  iconPosition: iconPos,
2421
- gap: gap
2427
+ gap: gap,
2428
+ cursor: !disabled && onclick ? 'pointer' : 'default'
2422
2429
  }, icon && React__default.createElement(Icon, {
2423
2430
  icon: icon,
2424
2431
  weight: iconWeight,