labsense-ui-kit 1.0.35 → 1.0.37

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.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IconNames } from '../Icons';
3
3
  export declare type buttonSizes = 'small' | 'medium' | 'large' | 'custom';
4
- export declare type buttonVariant = 'primary' | 'secondary' | 'tertiary' | 'error' | 'outline-primary' | 'outline-secondary' | 'outline-error';
4
+ export declare type buttonVariant = 'primary' | 'secondary' | 'tertiary' | 'error' | 'outline-primary' | 'outline-secondary' | 'outline-error' | 'custom';
5
5
  export declare type iconPosition = 'right' | 'left';
6
6
  export interface ButtonLoaderProps {
7
7
  loading?: boolean;
@@ -14,6 +14,7 @@ export interface ButtonProps {
14
14
  icon?: IconNames;
15
15
  size?: buttonSizes;
16
16
  background?: string;
17
+ hoverColor?: string;
17
18
  color?: string;
18
19
  fontWeight?: string;
19
20
  fontSize?: string;
@@ -23,6 +24,7 @@ export interface ButtonProps {
23
24
  borderRadius?: string;
24
25
  padding?: string;
25
26
  gap?: string;
27
+ iconClick?: () => void;
26
28
  iconPosition?: iconPosition;
27
29
  iconWeight?: string;
28
30
  iconSize?: number;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SVGProps } from "../";
3
+ declare const FilledPin: React.FC<SVGProps>;
4
+ export default FilledPin;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SVGProps } from "../";
3
+ declare const Pin: React.FC<SVGProps>;
4
+ export default Pin;
@@ -27,6 +27,7 @@ export { default as ExitFullScreen } from './ExitFullScreen';
27
27
  export { default as FaceRecognition } from './FaceRecognition';
28
28
  export { default as FilesBox } from './FilesBox';
29
29
  export { default as FilledCircle } from './FilledCircle';
30
+ export { default as FilledPin } from './FilledPin';
30
31
  export { default as Filter_1 } from './Filter_1';
31
32
  export { default as Filter_2 } from './Filter_2';
32
33
  export { default as Forward_10_Sec } from './Forward_10_Sec';
@@ -64,6 +65,7 @@ export { default as OpenBin } from './OpenBin';
64
65
  export { default as OpenEye } from './OpenEye';
65
66
  export { default as PasswordLock } from './PasswordLock';
66
67
  export { default as Phone } from './Phone';
68
+ export { default as Pin } from './Pin';
67
69
  export { default as Play } from './Play';
68
70
  export { default as Playback } from './Playback';
69
71
  export { default as PremiumBadge } from './PremiumBadge';
@@ -9,13 +9,13 @@ export interface SVGProps {
9
9
  color: string;
10
10
  weight: string;
11
11
  }
12
- export declare type IconNames = 'Add' | 'AddProfile' | 'Back' | 'Bin' | 'Bulb' | 'Business' | 'Calendar' | 'CCTV_1' | 'CCTV_2' | 'Circle' | 'CircularEdit' | 'CircularPause' | 'CircularPlay' | 'CircularWarning' | 'Client' | 'Close' | 'CloseCircle' | 'CloseEye' | 'Copy' | 'CPU' | 'Cyber' | 'DocumentBadge' | 'DownArrow' | 'Download' | 'Email' | 'ExitFullScreen' | 'FaceRecognition' | 'OpenEye' | 'FilesBox' | 'FilledCircle' | 'Filter_1' | 'Filter_2' | 'Forward_10_Sec' | 'Forward' | 'FPS' | 'Free' | 'FullScreen' | 'Grid_2x2_Hollow' | 'Grid_2x2' | 'Grid_3x3' | 'Grid_4x4' | 'Grid_5x5' | 'Hazard' | 'History' | 'Hexagon' | 'Information' | 'Key' | 'KeyDown' | 'LeftArrow' | 'Letter' | 'Live' | 'Lock' | 'Logout' | 'Maps' | 'MediumVolume' | 'Mute' | 'MuteVolume' | 'Menu' | 'NetworkStorage' | 'NoCam' | 'NoStorage' | 'Notifications' | 'OpenBin' | 'OpenEye' | 'PasswordLock' | 'Phone' | 'Play' | 'Playback' | 'PremiumBadge' | 'ProcessingBulb' | 'Profile_1' | 'Profile_2' | 'Profile_3' | 'Recording' | 'Rectangle' | 'Return' | 'Rewind_10_Sec' | 'RightArrow' | 'ROI' | 'RunAway' | 'SandTimer' | 'Search' | 'Settings' | 'Shield' | 'SlantLine' | 'SquareEdit' | 'SquareTick' | 'StorageDisks' | 'Tag' | 'Team' | 'ThreeDots' | 'ThumbsUp' | 'Tick' | 'UpArrow' | 'Video' | 'FullVolume' | 'Wallet' | 'WiFiCam' | 'Zapper';
12
+ export declare type IconNames = 'Add' | 'AddProfile' | 'Back' | 'Bin' | 'Bulb' | 'Business' | 'Calendar' | 'CCTV_1' | 'CCTV_2' | 'Circle' | 'CircularEdit' | 'CircularPause' | 'CircularPlay' | 'CircularWarning' | 'Client' | 'Close' | 'CloseCircle' | 'CloseEye' | 'Copy' | 'CPU' | 'Cyber' | 'DocumentBadge' | 'DownArrow' | 'Download' | 'Email' | 'ExitFullScreen' | 'FaceRecognition' | 'OpenEye' | 'FilesBox' | 'FilledCircle' | 'FilledPin' | 'Filter_1' | 'Filter_2' | 'Forward_10_Sec' | 'Forward' | 'FPS' | 'Free' | 'FullScreen' | 'Grid_2x2_Hollow' | 'Grid_2x2' | 'Grid_3x3' | 'Grid_4x4' | 'Grid_5x5' | 'Hazard' | 'History' | 'Hexagon' | 'Information' | 'Key' | 'KeyDown' | 'LeftArrow' | 'Letter' | 'Live' | 'Lock' | 'Logout' | 'Maps' | 'MediumVolume' | 'Mute' | 'MuteVolume' | 'Menu' | 'NetworkStorage' | 'NoCam' | 'NoStorage' | 'Notifications' | 'OpenBin' | 'OpenEye' | 'PasswordLock' | 'Phone' | 'Pin' | 'Play' | 'Playback' | 'PremiumBadge' | 'ProcessingBulb' | 'Profile_1' | 'Profile_2' | 'Profile_3' | 'Recording' | 'Rectangle' | 'Return' | 'Rewind_10_Sec' | 'RightArrow' | 'ROI' | 'RunAway' | 'SandTimer' | 'Search' | 'Settings' | 'Shield' | 'SlantLine' | 'SquareEdit' | 'SquareTick' | 'StorageDisks' | 'Tag' | 'Team' | 'ThreeDots' | 'ThumbsUp' | 'Tick' | 'UpArrow' | 'Video' | 'FullVolume' | 'Wallet' | 'WiFiCam' | 'Zapper';
13
13
  export interface IconProps {
14
14
  icon: IconNames;
15
15
  size?: number;
16
16
  color?: string;
17
17
  weight?: string;
18
- onClick?: () => void;
18
+ onClick?: (() => void) | ((e: React.MouseEvent<any>) => void);
19
19
  }
20
20
  declare const Icon: React.FC<IconProps>;
21
21
  export { Icon };
package/dist/index.js CHANGED
@@ -703,6 +703,23 @@ var FilledCircle = function FilledCircle(_ref) {
703
703
  }));
704
704
  };
705
705
 
706
+ var FilledPin = function FilledPin(_ref) {
707
+ var size = _ref.size,
708
+ color = _ref.color,
709
+ weight = _ref.weight;
710
+ return React__default.createElement("svg", {
711
+ width: size,
712
+ height: size,
713
+ strokeWidth: weight,
714
+ viewBox: "0 0 12 12",
715
+ fill: "none",
716
+ xmlns: "http://www.w3.org/2000/svg"
717
+ }, React__default.createElement("path", {
718
+ d: "M11.6872 4.86874L8.48645 8.06946C8.73564 8.76288 8.83892 9.9228 7.76515 11.3499C7.68996 11.4499 7.59419 11.5325 7.4843 11.5922C7.37442 11.6519 7.25299 11.6874 7.12823 11.6961C7.10772 11.6975 7.08723 11.6983 7.06676 11.6983C6.95178 11.6983 6.83794 11.6756 6.73172 11.6316C6.62551 11.5876 6.52901 11.523 6.44773 11.4417L3.81221 8.80622L1.93409 10.6843C1.85205 10.7664 1.74077 10.8125 1.62473 10.8125C1.5087 10.8125 1.39741 10.7664 1.31536 10.6844C1.23331 10.6023 1.18721 10.491 1.1872 10.375C1.1872 10.259 1.23329 10.1477 1.31533 10.0656L3.19348 8.18748L0.547145 5.54115C0.460319 5.45422 0.392756 5.34999 0.348848 5.23524C0.30494 5.12049 0.285669 4.99779 0.292287 4.8751C0.298906 4.75242 0.331266 4.6325 0.387264 4.52314C0.443262 4.41378 0.521646 4.31743 0.61732 4.24034C2.00779 3.11861 3.33866 3.33955 3.92121 3.52225L7.13095 0.312483L7.13101 0.312428C7.29525 0.148626 7.51775 0.0566406 7.74972 0.0566406C7.98168 0.0566406 8.20418 0.148626 8.36842 0.312428L11.6872 3.63128C11.7685 3.71253 11.8329 3.80899 11.8769 3.91516C11.9209 4.02132 11.9435 4.13511 11.9435 4.25002C11.9435 4.36493 11.9209 4.47872 11.8769 4.58488C11.8329 4.69104 11.7684 4.7875 11.6872 4.86874Z",
719
+ fill: color
720
+ }));
721
+ };
722
+
706
723
  var Filter_1 = function Filter_1(_ref) {
707
724
  var size = _ref.size,
708
725
  color = _ref.color,
@@ -1718,6 +1735,30 @@ var Phone = function Phone(_ref) {
1718
1735
  }));
1719
1736
  };
1720
1737
 
1738
+ var Pin = function Pin(_ref) {
1739
+ var size = _ref.size,
1740
+ color = _ref.color,
1741
+ weight = _ref.weight;
1742
+ return React__default.createElement("svg", {
1743
+ width: size,
1744
+ height: size,
1745
+ strokeWidth: weight,
1746
+ viewBox: "0 0 12 12",
1747
+ fill: "none",
1748
+ xmlns: "http://www.w3.org/2000/svg"
1749
+ }, React__default.createElement("path", {
1750
+ d: "M3.8125 8.1875L1.625 10.375",
1751
+ stroke: color,
1752
+ strokeLinecap: "round",
1753
+ strokeLinejoin: "round"
1754
+ }), React__default.createElement("path", {
1755
+ d: "M7.44034 0.621793L4.03095 4.03118C4.03095 4.03118 2.5137 3.27256 0.891958 4.58082C0.844068 4.61937 0.804824 4.66757 0.776778 4.72228C0.748731 4.77699 0.732509 4.83698 0.729164 4.89837C0.72582 4.95976 0.735429 5.02117 0.757367 5.0786C0.779305 5.13603 0.81308 5.18821 0.856499 5.23173L6.75709 11.1323C6.80128 11.1766 6.85447 11.2109 6.91305 11.2329C6.97164 11.2549 7.03426 11.264 7.09668 11.2597C7.15911 11.2554 7.21988 11.2377 7.27489 11.2079C7.3299 11.1781 7.37786 11.1368 7.41554 11.0868C7.87454 10.4768 8.59547 9.22272 7.96845 7.96868L11.3778 4.55929C11.4599 4.47725 11.506 4.36597 11.506 4.24993C11.506 4.1339 11.4599 4.02262 11.3778 3.94057L8.05906 0.621793C7.97701 0.539746 7.86573 0.493652 7.7497 0.493652C7.63367 0.493652 7.52239 0.539746 7.44034 0.621793Z",
1756
+ stroke: color,
1757
+ strokeLinecap: "round",
1758
+ strokeLinejoin: "round"
1759
+ }));
1760
+ };
1761
+
1721
1762
  var Play = function Play(_ref) {
1722
1763
  var size = _ref.size,
1723
1764
  color = _ref.color,
@@ -2457,6 +2498,7 @@ var IconSVGs = {
2457
2498
  FaceRecognition: FaceRecognition,
2458
2499
  FilesBox: FilesBox,
2459
2500
  FilledCircle: FilledCircle,
2501
+ FilledPin: FilledPin,
2460
2502
  Filter_1: Filter_1,
2461
2503
  Filter_2: Filter_2,
2462
2504
  Forward_10_Sec: Forward_10_Sec,
@@ -2494,6 +2536,7 @@ var IconSVGs = {
2494
2536
  OpenEye: OpenEye,
2495
2537
  PasswordLock: PasswordLock,
2496
2538
  Phone: Phone,
2539
+ Pin: Pin,
2497
2540
  Play: Play,
2498
2541
  Playback: Playback,
2499
2542
  PremiumBadge: PremiumBadge,
@@ -2748,7 +2791,9 @@ var StyledButton = styled__default.button(_templateObject5 || (_templateObject5
2748
2791
  var variant = _ref14.variant,
2749
2792
  disabled = _ref14.disabled,
2750
2793
  borderHover = _ref14.borderHover,
2751
- borderDefault = _ref14.borderDefault;
2794
+ borderDefault = _ref14.borderDefault,
2795
+ background = _ref14.background,
2796
+ color = _ref14.color;
2752
2797
  switch (variant) {
2753
2798
  case 'primary':
2754
2799
  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 ";
@@ -2764,6 +2809,8 @@ var StyledButton = styled__default.button(_templateObject5 || (_templateObject5
2764
2809
  return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.secondary + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.secondary + ";\n }\n ";
2765
2810
  case 'outline-error':
2766
2811
  return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.error : colorVariables["default"].error) + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.error + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.error + ";\n }\n ";
2812
+ case 'custom':
2813
+ return "\n background: " + background + ";\n color: " + color + ";\n border: " + ("1px solid " + borderDefault) + ";\n &:hover{\n border: 1px solid " + borderHover + ";\n color: " + color + ";\n background: " + borderHover + ";\n }\n ";
2767
2814
  default:
2768
2815
  return '';
2769
2816
  }
@@ -2792,6 +2839,7 @@ var ButtonComponent = function ButtonComponent(_ref20) {
2792
2839
  text = _ref20.text,
2793
2840
  size = _ref20.size,
2794
2841
  background = _ref20.background,
2842
+ hoverColor = _ref20.hoverColor,
2795
2843
  color = _ref20.color,
2796
2844
  borderDefault = _ref20.borderDefault,
2797
2845
  borderHover = _ref20.borderHover,
@@ -2800,10 +2848,11 @@ var ButtonComponent = function ButtonComponent(_ref20) {
2800
2848
  fontSize = _ref20.fontSize,
2801
2849
  fontFamily = _ref20.fontFamily,
2802
2850
  padding = _ref20.padding,
2803
- icon = _ref20.icon,
2804
2851
  gap = _ref20.gap,
2805
2852
  _ref20$variant = _ref20.variant,
2806
2853
  variant = _ref20$variant === void 0 ? 'primary' : _ref20$variant,
2854
+ icon = _ref20.icon,
2855
+ iconClick = _ref20.iconClick,
2807
2856
  _ref20$iconPosition = _ref20.iconPosition,
2808
2857
  iconPosition = _ref20$iconPosition === void 0 ? 'right' : _ref20$iconPosition,
2809
2858
  _ref20$iconWeight = _ref20.iconWeight,
@@ -2847,7 +2896,13 @@ var ButtonComponent = function ButtonComponent(_ref20) {
2847
2896
  icon: icon,
2848
2897
  weight: iconWeight,
2849
2898
  size: iconSize ? iconSize : size === 'small' ? 6 : size === 'medium' ? 8 : 10,
2850
- color: variant === 'tertiary' && isHovered ? colorVariables.hover.primary : variant === 'tertiary' && disabled ? colorVariables.disabled.primary : variant === 'tertiary' ? colorVariables["default"].primary : variant === 'outline-primary' && isHovered ? colorVariables.text.white : variant === 'outline-primary' && disabled ? colorVariables.disabled.primary : variant === 'outline-primary' ? colorVariables["default"].primary : variant === 'outline-secondary' && isHovered ? colorVariables.text.white : variant === 'outline-secondary' && disabled ? colorVariables.disabled.secondary : variant === 'outline-secondary' ? colorVariables["default"].secondary : variant === 'outline-error' && isHovered ? colorVariables.text.white : variant === 'outline-error' && disabled ? colorVariables.disabled.error : variant === 'outline-error' ? colorVariables["default"].error : color ? color : colorVariables.text.white
2899
+ onClick: function onClick(e) {
2900
+ if (iconClick) {
2901
+ e.stopPropagation();
2902
+ iconClick();
2903
+ }
2904
+ },
2905
+ color: variant === 'tertiary' && isHovered ? colorVariables.hover.primary : variant === 'tertiary' && disabled ? colorVariables.disabled.primary : variant === 'tertiary' ? colorVariables["default"].primary : variant === 'outline-primary' && isHovered ? colorVariables.text.white : variant === 'outline-primary' && disabled ? colorVariables.disabled.primary : variant === 'outline-primary' ? colorVariables["default"].primary : variant === 'outline-secondary' && isHovered ? colorVariables.text.white : variant === 'outline-secondary' && disabled ? colorVariables.disabled.secondary : variant === 'outline-secondary' ? colorVariables["default"].secondary : variant === 'outline-error' && isHovered ? colorVariables.text.white : variant === 'outline-error' && disabled ? colorVariables.disabled.error : variant === 'outline-error' ? colorVariables["default"].error : isHovered ? hoverColor : color ? color : colorVariables.text.white
2851
2906
  }), text && React__default.createElement(ButtonText, {
2852
2907
  size: size,
2853
2908
  fontFamily: fontFamily,