labsense-ui-kit 1.1.76 → 1.1.78
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/Themes/Colors.d.ts +1 -0
- package/dist/Themes/ThemeProviderWrapper.d.ts +7 -0
- package/dist/Themes/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/useTheme.d.ts +3 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +261 -215
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +262 -217
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useId } from 'react';
|
|
2
|
-
import styled, { css, keyframes, styled as styled$1 } from 'styled-components';
|
|
2
|
+
import styled, { css, keyframes, useTheme as useTheme$1, styled as styled$1 } from 'styled-components';
|
|
3
3
|
import { useNavigate, NavLink, useLocation } from 'react-router-dom';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { toast } from 'react-hot-toast';
|
|
@@ -159,13 +159,15 @@ var dark = {
|
|
|
159
159
|
};
|
|
160
160
|
var getCurrentTheme = function getCurrentTheme() {
|
|
161
161
|
if (typeof document !== 'undefined') {
|
|
162
|
-
|
|
162
|
+
var isDarkClass = document.documentElement.classList.contains('dark');
|
|
163
|
+
return isDarkClass ? 'dark' : 'light';
|
|
163
164
|
}
|
|
164
|
-
return light;
|
|
165
|
+
return 'light';
|
|
165
166
|
};
|
|
166
167
|
var colorVariables = new Proxy({}, {
|
|
167
168
|
get: function get(_, prop) {
|
|
168
|
-
var
|
|
169
|
+
var currentThemeName = getCurrentTheme();
|
|
170
|
+
var currentTheme = themes[currentThemeName];
|
|
169
171
|
return currentTheme[prop];
|
|
170
172
|
}
|
|
171
173
|
});
|
|
@@ -4820,8 +4822,9 @@ var DropdownButton = styled.div(_templateObject2$7 || (_templateObject2$7 = _tag
|
|
|
4820
4822
|
return $height || '100%';
|
|
4821
4823
|
}, function (_ref8) {
|
|
4822
4824
|
var $border = _ref8.$border,
|
|
4823
|
-
$isOpen = _ref8.$isOpen
|
|
4824
|
-
|
|
4825
|
+
$isOpen = _ref8.$isOpen,
|
|
4826
|
+
theme = _ref8.theme;
|
|
4827
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
4825
4828
|
}, function (_ref9) {
|
|
4826
4829
|
var $borderRadius = _ref9.$borderRadius;
|
|
4827
4830
|
return $borderRadius || '8px';
|
|
@@ -4830,30 +4833,32 @@ var DropdownButton = styled.div(_templateObject2$7 || (_templateObject2$7 = _tag
|
|
|
4830
4833
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4831
4834
|
}, function (_ref11) {
|
|
4832
4835
|
var $background = _ref11.$background,
|
|
4833
|
-
$disabled = _ref11.$disabled
|
|
4836
|
+
$disabled = _ref11.$disabled,
|
|
4837
|
+
theme = _ref11.theme;
|
|
4834
4838
|
switch ($background) {
|
|
4835
4839
|
case 'dark':
|
|
4836
|
-
return $disabled ?
|
|
4840
|
+
return $disabled ? theme.disabled.secondary : theme.text.dark;
|
|
4837
4841
|
case 'medium':
|
|
4838
|
-
return $disabled ?
|
|
4842
|
+
return $disabled ? theme.disabled.secondary : theme.text.medium;
|
|
4839
4843
|
case 'light':
|
|
4840
|
-
return $disabled ?
|
|
4844
|
+
return $disabled ? theme.disabled.secondary : theme.text.light;
|
|
4841
4845
|
case 'white':
|
|
4842
|
-
return $disabled ?
|
|
4846
|
+
return $disabled ? theme.disabled.secondary : theme.text.white;
|
|
4843
4847
|
case 'warning':
|
|
4844
|
-
return $disabled ?
|
|
4848
|
+
return $disabled ? theme.disabled.secondary : theme["default"].warning;
|
|
4845
4849
|
case 'info':
|
|
4846
|
-
return $disabled ?
|
|
4850
|
+
return $disabled ? theme.disabled.secondary : theme["default"].info;
|
|
4847
4851
|
case 'success':
|
|
4848
|
-
return $disabled ?
|
|
4852
|
+
return $disabled ? theme.disabled.secondary : theme["default"].success;
|
|
4849
4853
|
case 'error':
|
|
4850
|
-
return $disabled ?
|
|
4854
|
+
return $disabled ? theme.disabled.secondary : theme["default"].error;
|
|
4851
4855
|
default:
|
|
4852
|
-
return $disabled ?
|
|
4856
|
+
return $disabled ? theme.disabled.secondary : $background;
|
|
4853
4857
|
}
|
|
4854
4858
|
}, function (_ref12) {
|
|
4855
|
-
var $color = _ref12.$color
|
|
4856
|
-
|
|
4859
|
+
var $color = _ref12.$color,
|
|
4860
|
+
theme = _ref12.theme;
|
|
4861
|
+
return $color || theme.text.medium;
|
|
4857
4862
|
}, function (_ref13) {
|
|
4858
4863
|
var $size = _ref13.$size;
|
|
4859
4864
|
switch ($size) {
|
|
@@ -4887,24 +4892,25 @@ var TitleText = styled.div(_templateObject3$5 || (_templateObject3$5 = _taggedTe
|
|
|
4887
4892
|
$size = _ref17.$size;
|
|
4888
4893
|
return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
|
|
4889
4894
|
}, function (_ref18) {
|
|
4890
|
-
var $titleColor = _ref18.$titleColor
|
|
4895
|
+
var $titleColor = _ref18.$titleColor,
|
|
4896
|
+
theme = _ref18.theme;
|
|
4891
4897
|
switch ($titleColor) {
|
|
4892
4898
|
case 'dark':
|
|
4893
|
-
return
|
|
4899
|
+
return theme.text.dark;
|
|
4894
4900
|
case 'medium':
|
|
4895
|
-
return
|
|
4901
|
+
return theme.text.medium;
|
|
4896
4902
|
case 'light':
|
|
4897
|
-
return
|
|
4903
|
+
return theme.text.light;
|
|
4898
4904
|
case 'white':
|
|
4899
|
-
return
|
|
4905
|
+
return theme.text.white;
|
|
4900
4906
|
case 'warning':
|
|
4901
|
-
return
|
|
4907
|
+
return theme["default"].warning;
|
|
4902
4908
|
case 'info':
|
|
4903
|
-
return
|
|
4909
|
+
return theme["default"].info;
|
|
4904
4910
|
case 'success':
|
|
4905
|
-
return
|
|
4911
|
+
return theme["default"].success;
|
|
4906
4912
|
case 'error':
|
|
4907
|
-
return
|
|
4913
|
+
return theme["default"].error;
|
|
4908
4914
|
default:
|
|
4909
4915
|
return $titleColor;
|
|
4910
4916
|
}
|
|
@@ -4913,126 +4919,139 @@ var Container$2 = styled.div(_templateObject4$4 || (_templateObject4$4 = _tagged
|
|
|
4913
4919
|
var LabelText = styled.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 400;\n font-style:", ";\n color: ", ";\n"])), function (_ref19) {
|
|
4914
4920
|
var $labelStyle = _ref19.$labelStyle;
|
|
4915
4921
|
return $labelStyle;
|
|
4916
|
-
},
|
|
4917
|
-
var
|
|
4918
|
-
|
|
4922
|
+
}, function (_ref20) {
|
|
4923
|
+
var theme = _ref20.theme;
|
|
4924
|
+
return theme.text.medium;
|
|
4925
|
+
});
|
|
4926
|
+
var DropdownMenu = styled.div(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n max-height: 156px;\n padding: 4px;\n box-sizing: border-box;\n border: ", ";\n border-radius: ", ";\n width: ", ";\n background: ", ";\n display: flex;\n flex-direction: column;\n gap: 4px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n margin-top: 8px;\n overflow-y: auto;\n position: absolute;\n z-index: 2;\n scrollbar-width: thin;\n"])), function (_ref21) {
|
|
4927
|
+
var theme = _ref21.theme;
|
|
4928
|
+
return "1px solid " + theme.border.light;
|
|
4929
|
+
}, function (_ref22) {
|
|
4930
|
+
var $optionsBorderRadius = _ref22.$optionsBorderRadius;
|
|
4919
4931
|
return $optionsBorderRadius || '8px';
|
|
4920
|
-
}, function (
|
|
4921
|
-
var $width =
|
|
4932
|
+
}, function (_ref23) {
|
|
4933
|
+
var $width = _ref23.$width;
|
|
4922
4934
|
return $width ? $width : 'max-content';
|
|
4923
|
-
}, function (
|
|
4924
|
-
var $menuBackground =
|
|
4925
|
-
|
|
4935
|
+
}, function (_ref24) {
|
|
4936
|
+
var $menuBackground = _ref24.$menuBackground,
|
|
4937
|
+
theme = _ref24.theme;
|
|
4938
|
+
return $menuBackground || theme.accent.light_2;
|
|
4926
4939
|
});
|
|
4927
4940
|
var SelectedOptionsWrapper = styled.div(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n height: 100%;\n"])));
|
|
4928
|
-
var SelectedOptionDiv = styled.div(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: ", ";\n border-radius: 4px;\n padding: 6px 8px;\n box-sizing: border-box;\n gap: 6px;\n font-family: NotoSans, sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 12px;\n color: ", ";\n"])), function (
|
|
4929
|
-
var $selectedOptionBackground =
|
|
4930
|
-
$disabled =
|
|
4941
|
+
var SelectedOptionDiv = styled.div(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: ", ";\n border-radius: 4px;\n padding: 6px 8px;\n box-sizing: border-box;\n gap: 6px;\n font-family: NotoSans, sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 12px;\n color: ", ";\n"])), function (_ref25) {
|
|
4942
|
+
var $selectedOptionBackground = _ref25.$selectedOptionBackground,
|
|
4943
|
+
$disabled = _ref25.$disabled,
|
|
4944
|
+
theme = _ref25.theme;
|
|
4931
4945
|
switch ($selectedOptionBackground) {
|
|
4932
4946
|
case 'dark':
|
|
4933
|
-
return
|
|
4947
|
+
return theme.text.dark;
|
|
4934
4948
|
case 'medium':
|
|
4935
|
-
return
|
|
4949
|
+
return theme.text.medium;
|
|
4936
4950
|
case 'light':
|
|
4937
|
-
return
|
|
4951
|
+
return theme.text.light;
|
|
4938
4952
|
case 'white':
|
|
4939
|
-
return
|
|
4953
|
+
return theme.text.white;
|
|
4940
4954
|
case 'warning':
|
|
4941
|
-
return $disabled ?
|
|
4955
|
+
return $disabled ? theme.disabled.warning : theme["default"].warning;
|
|
4942
4956
|
case 'info':
|
|
4943
|
-
return $disabled ?
|
|
4957
|
+
return $disabled ? theme.disabled.info : theme["default"].info;
|
|
4944
4958
|
case 'success':
|
|
4945
|
-
return $disabled ?
|
|
4959
|
+
return $disabled ? theme.disabled.success : theme["default"].success;
|
|
4946
4960
|
case 'error':
|
|
4947
|
-
return $disabled ?
|
|
4961
|
+
return $disabled ? theme.disabled.error : theme["default"].error;
|
|
4948
4962
|
default:
|
|
4949
|
-
return $selectedOptionBackground ||
|
|
4963
|
+
return $selectedOptionBackground || theme.accent.light_2;
|
|
4950
4964
|
}
|
|
4951
|
-
}, function (
|
|
4952
|
-
var $selectedOptionColor =
|
|
4965
|
+
}, function (_ref26) {
|
|
4966
|
+
var $selectedOptionColor = _ref26.$selectedOptionColor,
|
|
4967
|
+
theme = _ref26.theme;
|
|
4953
4968
|
switch ($selectedOptionColor) {
|
|
4954
4969
|
case 'dark':
|
|
4955
|
-
return
|
|
4970
|
+
return theme.text.dark;
|
|
4956
4971
|
case 'medium':
|
|
4957
|
-
return
|
|
4972
|
+
return theme.text.medium;
|
|
4958
4973
|
case 'light':
|
|
4959
|
-
return
|
|
4974
|
+
return theme.text.light;
|
|
4960
4975
|
case 'white':
|
|
4961
|
-
return
|
|
4976
|
+
return theme.text.white;
|
|
4962
4977
|
case 'warning':
|
|
4963
|
-
return
|
|
4978
|
+
return theme["default"].warning;
|
|
4964
4979
|
case 'info':
|
|
4965
|
-
return
|
|
4980
|
+
return theme["default"].info;
|
|
4966
4981
|
case 'success':
|
|
4967
|
-
return
|
|
4982
|
+
return theme["default"].success;
|
|
4968
4983
|
case 'error':
|
|
4969
|
-
return
|
|
4984
|
+
return theme["default"].error;
|
|
4970
4985
|
default:
|
|
4971
4986
|
return $selectedOptionColor;
|
|
4972
4987
|
}
|
|
4973
4988
|
});
|
|
4974
|
-
var RemoveIcon = styled.div(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n > div {\n cursor: ", ";\n }\n"])), function (
|
|
4975
|
-
var $disabled = _ref25.$disabled;
|
|
4976
|
-
return $disabled ? 'not-allowed' : 'pointer';
|
|
4977
|
-
}, function (_ref26) {
|
|
4978
|
-
var removeIconBackground = _ref26.removeIconBackground,
|
|
4979
|
-
$type = _ref26.$type;
|
|
4980
|
-
return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
|
|
4981
|
-
}, function (_ref27) {
|
|
4989
|
+
var RemoveIcon = styled.div(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n > div {\n cursor: ", ";\n }\n"])), function (_ref27) {
|
|
4982
4990
|
var $disabled = _ref27.$disabled;
|
|
4983
4991
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4992
|
+
}, function (_ref28) {
|
|
4993
|
+
var removeIconBackground = _ref28.removeIconBackground,
|
|
4994
|
+
$type = _ref28.$type,
|
|
4995
|
+
theme = _ref28.theme;
|
|
4996
|
+
return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : theme.disabled.primary;
|
|
4997
|
+
}, function (_ref29) {
|
|
4998
|
+
var $disabled = _ref29.$disabled;
|
|
4999
|
+
return $disabled ? 'not-allowed' : 'pointer';
|
|
4984
5000
|
});
|
|
4985
5001
|
var TextWrapper = styled.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 4px;\n"])));
|
|
4986
|
-
var Asterisk = styled.span(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 10px;\n height: fit-content;\n position: absolute;\n top: -2px;\n right: -8px;\n"])),
|
|
4987
|
-
var
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5002
|
+
var Asterisk = styled.span(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 10px;\n height: fit-content;\n position: absolute;\n top: -2px;\n right: -8px;\n"])), function (_ref30) {
|
|
5003
|
+
var theme = _ref30.theme;
|
|
5004
|
+
return theme["default"].error;
|
|
5005
|
+
});
|
|
5006
|
+
var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
5007
|
+
var title = _ref31.title,
|
|
5008
|
+
titleWeight = _ref31.titleWeight,
|
|
5009
|
+
titleSize = _ref31.titleSize,
|
|
5010
|
+
_ref31$titleColor = _ref31.titleColor,
|
|
5011
|
+
titleColor = _ref31$titleColor === void 0 ? colorVariables.text.dark : _ref31$titleColor,
|
|
5012
|
+
_ref31$labelText = _ref31.labelText,
|
|
5013
|
+
labelText = _ref31$labelText === void 0 ? 'Select Cameras' : _ref31$labelText,
|
|
5014
|
+
labelStyle = _ref31.labelStyle,
|
|
5015
|
+
labelColor = _ref31.labelColor,
|
|
5016
|
+
_ref31$replaceLabel = _ref31.replaceLabel,
|
|
5017
|
+
replaceLabel = _ref31$replaceLabel === void 0 ? true : _ref31$replaceLabel,
|
|
5018
|
+
options = _ref31.options,
|
|
5019
|
+
width = _ref31.width,
|
|
5020
|
+
optionWidth = _ref31.optionWidth,
|
|
5021
|
+
height = _ref31.height,
|
|
5022
|
+
placeholder = _ref31.placeholder,
|
|
5023
|
+
border = _ref31.border,
|
|
5024
|
+
_ref31$background = _ref31.background,
|
|
5025
|
+
background = _ref31$background === void 0 ? colorVariables["default"].tertiary : _ref31$background,
|
|
5026
|
+
selectedOptionBackground = _ref31.selectedOptionBackground,
|
|
5027
|
+
selectedOptionColor = _ref31.selectedOptionColor,
|
|
5028
|
+
_ref31$menuBackground = _ref31.menuBackground,
|
|
5029
|
+
menuBackground = _ref31$menuBackground === void 0 ? 'white' : _ref31$menuBackground,
|
|
5030
|
+
optionsBorderRadius = _ref31.optionsBorderRadius,
|
|
5031
|
+
borderRadius = _ref31.borderRadius,
|
|
5032
|
+
removeIconBackground = _ref31.removeIconBackground,
|
|
5033
|
+
handleSelectChange = _ref31.handleSelectChange,
|
|
5034
|
+
selectedOptions = _ref31.selectedOptions,
|
|
5035
|
+
placeholderColor = _ref31.placeholderColor,
|
|
5036
|
+
optionBorder = _ref31.optionBorder,
|
|
5037
|
+
optionColor = _ref31.optionColor,
|
|
5038
|
+
searchIcon = _ref31.searchIcon,
|
|
5039
|
+
searchbarTextColor = _ref31.searchbarTextColor,
|
|
5040
|
+
searchBoxBackground = _ref31.searchBoxBackground,
|
|
5041
|
+
searchBoxBorder = _ref31.searchBoxBorder,
|
|
5042
|
+
searchBoxBorderRadius = _ref31.searchBoxBorderRadius,
|
|
5043
|
+
size = _ref31.size,
|
|
5044
|
+
removeIcon = _ref31.removeIcon,
|
|
5045
|
+
type = _ref31.type,
|
|
5046
|
+
icon = _ref31.icon,
|
|
5047
|
+
_ref31$disabled = _ref31.disabled,
|
|
5048
|
+
disabled = _ref31$disabled === void 0 ? false : _ref31$disabled,
|
|
5049
|
+
_ref31$required = _ref31.required,
|
|
5050
|
+
required = _ref31$required === void 0 ? false : _ref31$required,
|
|
5051
|
+
_ref31$searchBox = _ref31.searchBox,
|
|
5052
|
+
searchBox = _ref31$searchBox === void 0 ? true : _ref31$searchBox,
|
|
5053
|
+
_ref31$NoOptionsText = _ref31.NoOptionsText,
|
|
5054
|
+
NoOptionsText = _ref31$NoOptionsText === void 0 ? 'No Options Available' : _ref31$NoOptionsText;
|
|
5036
5055
|
var _useState = useState(false),
|
|
5037
5056
|
isOpen = _useState[0],
|
|
5038
5057
|
setIsOpen = _useState[1];
|
|
@@ -5220,24 +5239,25 @@ var TitleText$1 = styled.label(_templateObject$c || (_templateObject$c = _tagged
|
|
|
5220
5239
|
return "\n font-size: 14px;\n line-height: 14px;\n ";
|
|
5221
5240
|
}
|
|
5222
5241
|
}, function (_ref3) {
|
|
5223
|
-
var $titlecolor = _ref3.$titlecolor
|
|
5242
|
+
var $titlecolor = _ref3.$titlecolor,
|
|
5243
|
+
theme = _ref3.theme;
|
|
5224
5244
|
switch ($titlecolor) {
|
|
5225
5245
|
case 'dark':
|
|
5226
|
-
return
|
|
5246
|
+
return theme.text.dark;
|
|
5227
5247
|
case 'medium':
|
|
5228
|
-
return
|
|
5248
|
+
return theme.text.medium;
|
|
5229
5249
|
case 'light':
|
|
5230
|
-
return
|
|
5250
|
+
return theme.text.light;
|
|
5231
5251
|
case 'white':
|
|
5232
|
-
return
|
|
5252
|
+
return theme.text.white;
|
|
5233
5253
|
case 'warning':
|
|
5234
|
-
return
|
|
5254
|
+
return theme["default"].warning;
|
|
5235
5255
|
case 'info':
|
|
5236
|
-
return
|
|
5256
|
+
return theme["default"].info;
|
|
5237
5257
|
case 'success':
|
|
5238
|
-
return
|
|
5258
|
+
return theme["default"].success;
|
|
5239
5259
|
case 'error':
|
|
5240
|
-
return
|
|
5260
|
+
return theme["default"].error;
|
|
5241
5261
|
default:
|
|
5242
5262
|
return $titlecolor;
|
|
5243
5263
|
}
|
|
@@ -5260,8 +5280,9 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5260
5280
|
return $borderRadius || '8px';
|
|
5261
5281
|
}, function (_ref9) {
|
|
5262
5282
|
var $border = _ref9.$border,
|
|
5263
|
-
$isOpen = _ref9.$isOpen
|
|
5264
|
-
|
|
5283
|
+
$isOpen = _ref9.$isOpen,
|
|
5284
|
+
theme = _ref9.theme;
|
|
5285
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
5265
5286
|
}, function (_ref10) {
|
|
5266
5287
|
var $size = _ref10.$size;
|
|
5267
5288
|
switch ($size) {
|
|
@@ -5274,8 +5295,9 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5274
5295
|
}
|
|
5275
5296
|
}, function (_ref11) {
|
|
5276
5297
|
var $background = _ref11.$background,
|
|
5277
|
-
$disabled = _ref11.$disabled
|
|
5278
|
-
|
|
5298
|
+
$disabled = _ref11.$disabled,
|
|
5299
|
+
theme = _ref11.theme;
|
|
5300
|
+
return $disabled ? theme.border.light : $background || theme.accent.light_2;
|
|
5279
5301
|
}, function (_ref12) {
|
|
5280
5302
|
var $size = _ref12.$size;
|
|
5281
5303
|
switch ($size) {
|
|
@@ -5297,10 +5319,11 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5297
5319
|
return '14px';
|
|
5298
5320
|
}
|
|
5299
5321
|
});
|
|
5300
|
-
var Options = styled.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n padding: 5px 10px;\n width: 100%;\n font-size: ", ";\n font-weight: ", ";\n background-color: ", ";\n\n \n &:hover {\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n
|
|
5322
|
+
var Options = styled.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n padding: 5px 10px;\n width: 100%;\n font-size: ", ";\n font-weight: ", ";\n background-color: ", ";\n\n \n &:hover {\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n }\n\n"])), function (_ref14) {
|
|
5301
5323
|
var $optionColor = _ref14.$optionColor,
|
|
5302
|
-
$optionSelected = _ref14.$optionSelected
|
|
5303
|
-
|
|
5324
|
+
$optionSelected = _ref14.$optionSelected,
|
|
5325
|
+
theme = _ref14.theme;
|
|
5326
|
+
return $optionSelected ? theme.text.white : $optionColor || theme.text.medium;
|
|
5304
5327
|
}, function (_ref15) {
|
|
5305
5328
|
var $optionFontSize = _ref15.$optionFontSize;
|
|
5306
5329
|
return $optionFontSize || '14px';
|
|
@@ -5309,11 +5332,18 @@ var Options = styled.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemp
|
|
|
5309
5332
|
return $optionFontWeight || 400;
|
|
5310
5333
|
}, function (_ref17) {
|
|
5311
5334
|
var $optionBackgroundColor = _ref17.$optionBackgroundColor,
|
|
5312
|
-
$optionSelected = _ref17.$optionSelected
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
var
|
|
5335
|
+
$optionSelected = _ref17.$optionSelected,
|
|
5336
|
+
theme = _ref17.theme;
|
|
5337
|
+
return $optionSelected ? theme["default"].primary : $optionBackgroundColor || theme["default"].tertiary;
|
|
5338
|
+
}, function (_ref18) {
|
|
5339
|
+
var theme = _ref18.theme;
|
|
5340
|
+
return theme.hover.primary;
|
|
5341
|
+
}, function (_ref19) {
|
|
5342
|
+
var theme = _ref19.theme;
|
|
5343
|
+
return theme.text.white;
|
|
5344
|
+
});
|
|
5345
|
+
var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n font-style: ", ";\n color: ", ";\n"])), function (_ref20) {
|
|
5346
|
+
var $size = _ref20.$size;
|
|
5317
5347
|
switch ($size) {
|
|
5318
5348
|
case 'small':
|
|
5319
5349
|
return '14px';
|
|
@@ -5322,8 +5352,8 @@ var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _tagged
|
|
|
5322
5352
|
default:
|
|
5323
5353
|
return '14px';
|
|
5324
5354
|
}
|
|
5325
|
-
}, function (
|
|
5326
|
-
var $size =
|
|
5355
|
+
}, function (_ref21) {
|
|
5356
|
+
var $size = _ref21.$size;
|
|
5327
5357
|
switch ($size) {
|
|
5328
5358
|
case 'small':
|
|
5329
5359
|
return '12px';
|
|
@@ -5332,98 +5362,109 @@ var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _tagged
|
|
|
5332
5362
|
default:
|
|
5333
5363
|
return '14px';
|
|
5334
5364
|
}
|
|
5335
|
-
}, function (
|
|
5336
|
-
var $fontStyle =
|
|
5365
|
+
}, function (_ref22) {
|
|
5366
|
+
var $fontStyle = _ref22.$fontStyle;
|
|
5337
5367
|
return $fontStyle || '';
|
|
5338
|
-
}, function (
|
|
5339
|
-
var $color =
|
|
5340
|
-
$disabled =
|
|
5341
|
-
|
|
5368
|
+
}, function (_ref23) {
|
|
5369
|
+
var $color = _ref23.$color,
|
|
5370
|
+
$disabled = _ref23.$disabled,
|
|
5371
|
+
theme = _ref23.theme;
|
|
5372
|
+
return $disabled ? theme.text.medium : $color || theme.text.medium;
|
|
5342
5373
|
});
|
|
5343
5374
|
var NoOptions = styled(Span)(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 100%;\n padding: 12px;\n font-size: 14px;\n font-weight: 400;\n"])));
|
|
5344
|
-
var DropdownMenu$1 = styled.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border:
|
|
5345
|
-
var
|
|
5375
|
+
var DropdownMenu$1 = styled.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border: ", ";\n border-radius: ", ";\n min-width: 100%;\n width: ", ";\n background: ", ";\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n overflow: hidden; \n position: absolute;\n z-index: 1;\n ", "\n ", "\n \n"])), function (_ref24) {
|
|
5376
|
+
var theme = _ref24.theme;
|
|
5377
|
+
return "1px solid " + theme.border.light;
|
|
5378
|
+
}, function (_ref25) {
|
|
5379
|
+
var $optionsBorderRadius = _ref25.$optionsBorderRadius;
|
|
5346
5380
|
return $optionsBorderRadius || '8px';
|
|
5347
|
-
}, function (
|
|
5348
|
-
var $width =
|
|
5381
|
+
}, function (_ref26) {
|
|
5382
|
+
var $width = _ref26.$width;
|
|
5349
5383
|
return $width ? $width : 'max-content';
|
|
5350
|
-
}, function (
|
|
5351
|
-
var $menuBackground =
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5384
|
+
}, function (_ref27) {
|
|
5385
|
+
var $menuBackground = _ref27.$menuBackground,
|
|
5386
|
+
theme = _ref27.theme;
|
|
5387
|
+
return $menuBackground || theme.accent.light_2;
|
|
5388
|
+
}, function (_ref28) {
|
|
5389
|
+
var $top = _ref28.$top;
|
|
5355
5390
|
return $top && "top: " + $top + ";";
|
|
5356
|
-
}, function (
|
|
5357
|
-
var $bottom =
|
|
5391
|
+
}, function (_ref29) {
|
|
5392
|
+
var $bottom = _ref29.$bottom;
|
|
5358
5393
|
return $bottom && "bottom: " + $bottom + ";";
|
|
5359
5394
|
});
|
|
5360
5395
|
var OptionsWrapper = styled.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n max-height: 150px; \n overflow-y: auto;\n scrollbar-width: thin;\n width: 100%;\n"])));
|
|
5361
|
-
var SearchContainer$1 = styled.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom:
|
|
5362
|
-
var $background =
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5396
|
+
var SearchContainer$1 = styled.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom: ", ";\n border-radius: ", ";\n padding: 10px 12px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n position: sticky;\n top: 0;\n z-index: 10; \n"])), function (_ref30) {
|
|
5397
|
+
var $background = _ref30.$background,
|
|
5398
|
+
theme = _ref30.theme;
|
|
5399
|
+
return $background || theme.accent.light_2;
|
|
5400
|
+
}, function (_ref31) {
|
|
5401
|
+
var $border = _ref31.$border;
|
|
5366
5402
|
return $border || 'none';
|
|
5367
|
-
},
|
|
5368
|
-
var
|
|
5403
|
+
}, function (_ref32) {
|
|
5404
|
+
var theme = _ref32.theme;
|
|
5405
|
+
return "1px solid " + theme.border.light;
|
|
5406
|
+
}, function (_ref33) {
|
|
5407
|
+
var $borderRadius = _ref33.$borderRadius;
|
|
5369
5408
|
return $borderRadius || '8px 8px 0 0';
|
|
5370
5409
|
});
|
|
5371
|
-
var SearchBar$1 = styled.input(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: transparent;\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), function (
|
|
5372
|
-
var $inputColor =
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5410
|
+
var SearchBar$1 = styled.input(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: transparent;\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), function (_ref34) {
|
|
5411
|
+
var $inputColor = _ref34.$inputColor,
|
|
5412
|
+
theme = _ref34.theme;
|
|
5413
|
+
return $inputColor || theme.text.medium;
|
|
5414
|
+
}, function (_ref35) {
|
|
5415
|
+
var $placeholderColor = _ref35.$placeholderColor,
|
|
5416
|
+
theme = _ref35.theme;
|
|
5417
|
+
return $placeholderColor || theme.text.light;
|
|
5377
5418
|
});
|
|
5378
|
-
var SelectOption = function SelectOption(
|
|
5419
|
+
var SelectOption = function SelectOption(_ref36) {
|
|
5379
5420
|
var _options$find;
|
|
5380
|
-
var title =
|
|
5381
|
-
titlecolor =
|
|
5382
|
-
titleWeight =
|
|
5383
|
-
options =
|
|
5384
|
-
value =
|
|
5385
|
-
onChange =
|
|
5386
|
-
|
|
5387
|
-
disabled =
|
|
5388
|
-
size =
|
|
5389
|
-
width =
|
|
5390
|
-
|
|
5391
|
-
labelText =
|
|
5392
|
-
border =
|
|
5393
|
-
background =
|
|
5394
|
-
|
|
5395
|
-
padding =
|
|
5396
|
-
borderRadius =
|
|
5397
|
-
optionColor =
|
|
5398
|
-
optionFontSize =
|
|
5399
|
-
optionFontWeight =
|
|
5400
|
-
optionBackgroundColor =
|
|
5401
|
-
menuBackground =
|
|
5402
|
-
optionsBorderRadius =
|
|
5403
|
-
color =
|
|
5404
|
-
required =
|
|
5405
|
-
|
|
5406
|
-
NoOptionsText =
|
|
5407
|
-
positionRef =
|
|
5408
|
-
fontStyle =
|
|
5409
|
-
icon =
|
|
5410
|
-
|
|
5411
|
-
searchBox =
|
|
5412
|
-
searchBoxBackground =
|
|
5413
|
-
searchBoxBorder =
|
|
5414
|
-
searchBoxBorderRadius =
|
|
5415
|
-
searchIcon =
|
|
5416
|
-
|
|
5417
|
-
placeholderText =
|
|
5418
|
-
|
|
5419
|
-
iconColor =
|
|
5420
|
-
placeholderColor =
|
|
5421
|
-
inputColor =
|
|
5422
|
-
|
|
5423
|
-
iconSize =
|
|
5424
|
-
|
|
5425
|
-
allowDeselect =
|
|
5426
|
-
titleRightNode =
|
|
5421
|
+
var title = _ref36.title,
|
|
5422
|
+
titlecolor = _ref36.titlecolor,
|
|
5423
|
+
titleWeight = _ref36.titleWeight,
|
|
5424
|
+
options = _ref36.options,
|
|
5425
|
+
value = _ref36.value,
|
|
5426
|
+
onChange = _ref36.onChange,
|
|
5427
|
+
_ref36$disabled = _ref36.disabled,
|
|
5428
|
+
disabled = _ref36$disabled === void 0 ? false : _ref36$disabled,
|
|
5429
|
+
size = _ref36.size,
|
|
5430
|
+
width = _ref36.width,
|
|
5431
|
+
_ref36$labelText = _ref36.labelText,
|
|
5432
|
+
labelText = _ref36$labelText === void 0 ? 'Select' : _ref36$labelText,
|
|
5433
|
+
border = _ref36.border,
|
|
5434
|
+
background = _ref36.background,
|
|
5435
|
+
_ref36$padding = _ref36.padding,
|
|
5436
|
+
padding = _ref36$padding === void 0 ? '0px' : _ref36$padding,
|
|
5437
|
+
borderRadius = _ref36.borderRadius,
|
|
5438
|
+
optionColor = _ref36.optionColor,
|
|
5439
|
+
optionFontSize = _ref36.optionFontSize,
|
|
5440
|
+
optionFontWeight = _ref36.optionFontWeight,
|
|
5441
|
+
optionBackgroundColor = _ref36.optionBackgroundColor,
|
|
5442
|
+
menuBackground = _ref36.menuBackground,
|
|
5443
|
+
optionsBorderRadius = _ref36.optionsBorderRadius,
|
|
5444
|
+
color = _ref36.color,
|
|
5445
|
+
required = _ref36.required,
|
|
5446
|
+
_ref36$NoOptionsText = _ref36.NoOptionsText,
|
|
5447
|
+
NoOptionsText = _ref36$NoOptionsText === void 0 ? 'No Options Available' : _ref36$NoOptionsText,
|
|
5448
|
+
positionRef = _ref36.positionRef,
|
|
5449
|
+
fontStyle = _ref36.fontStyle,
|
|
5450
|
+
icon = _ref36.icon,
|
|
5451
|
+
_ref36$searchBox = _ref36.searchBox,
|
|
5452
|
+
searchBox = _ref36$searchBox === void 0 ? true : _ref36$searchBox,
|
|
5453
|
+
searchBoxBackground = _ref36.searchBoxBackground,
|
|
5454
|
+
searchBoxBorder = _ref36.searchBoxBorder,
|
|
5455
|
+
searchBoxBorderRadius = _ref36.searchBoxBorderRadius,
|
|
5456
|
+
searchIcon = _ref36.searchIcon,
|
|
5457
|
+
_ref36$placeholderTex = _ref36.placeholderText,
|
|
5458
|
+
placeholderText = _ref36$placeholderTex === void 0 ? 'Search...' : _ref36$placeholderTex,
|
|
5459
|
+
_ref36$iconColor = _ref36.iconColor,
|
|
5460
|
+
iconColor = _ref36$iconColor === void 0 ? colorVariables.text.medium : _ref36$iconColor,
|
|
5461
|
+
placeholderColor = _ref36.placeholderColor,
|
|
5462
|
+
inputColor = _ref36.inputColor,
|
|
5463
|
+
_ref36$iconSize = _ref36.iconSize,
|
|
5464
|
+
iconSize = _ref36$iconSize === void 0 ? 16 : _ref36$iconSize,
|
|
5465
|
+
_ref36$allowDeselect = _ref36.allowDeselect,
|
|
5466
|
+
allowDeselect = _ref36$allowDeselect === void 0 ? true : _ref36$allowDeselect,
|
|
5467
|
+
titleRightNode = _ref36.titleRightNode;
|
|
5427
5468
|
var _useState = useState(false),
|
|
5428
5469
|
dropUp = _useState[0],
|
|
5429
5470
|
setDropUp = _useState[1];
|
|
@@ -5712,6 +5753,10 @@ var useNotification = function useNotification() {
|
|
|
5712
5753
|
};
|
|
5713
5754
|
};
|
|
5714
5755
|
|
|
5756
|
+
var useTheme = function useTheme() {
|
|
5757
|
+
return useTheme$1();
|
|
5758
|
+
};
|
|
5759
|
+
|
|
5715
5760
|
var _templateObject$e, _templateObject2$b;
|
|
5716
5761
|
var SearchContainer$2 = styled.div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n padding: 5.5px 8px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n // cursor: ", ";\n transition: all 0.3s ease;\n\n &:focus-within {\n border: 1px solid ", ";\n }\n"])), function (_ref) {
|
|
5717
5762
|
var $background = _ref.$background;
|
|
@@ -7308,5 +7353,5 @@ var InternalTabs = function InternalTabs(_ref) {
|
|
|
7308
7353
|
}));
|
|
7309
7354
|
};
|
|
7310
7355
|
|
|
7311
|
-
export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, CheckBox, CircularLoader, CircularProgress, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, IconTooltip, InternalTabs, Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, colorVariables, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCustomModal, useNotification };
|
|
7356
|
+
export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, CheckBox, CircularLoader, CircularProgress, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, IconTooltip, InternalTabs, Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, colorVariables, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCustomModal, useNotification, useTheme };
|
|
7312
7357
|
//# sourceMappingURL=index.modern.js.map
|