labsense-ui-kit 1.1.76 → 1.1.77
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/ThemeProviderWrapper.d.ts +7 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/useTheme.d.ts +3 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +256 -212
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +257 -214
- 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';
|
|
@@ -4820,8 +4820,9 @@ var DropdownButton = styled.div(_templateObject2$7 || (_templateObject2$7 = _tag
|
|
|
4820
4820
|
return $height || '100%';
|
|
4821
4821
|
}, function (_ref8) {
|
|
4822
4822
|
var $border = _ref8.$border,
|
|
4823
|
-
$isOpen = _ref8.$isOpen
|
|
4824
|
-
|
|
4823
|
+
$isOpen = _ref8.$isOpen,
|
|
4824
|
+
theme = _ref8.theme;
|
|
4825
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
4825
4826
|
}, function (_ref9) {
|
|
4826
4827
|
var $borderRadius = _ref9.$borderRadius;
|
|
4827
4828
|
return $borderRadius || '8px';
|
|
@@ -4830,30 +4831,32 @@ var DropdownButton = styled.div(_templateObject2$7 || (_templateObject2$7 = _tag
|
|
|
4830
4831
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4831
4832
|
}, function (_ref11) {
|
|
4832
4833
|
var $background = _ref11.$background,
|
|
4833
|
-
$disabled = _ref11.$disabled
|
|
4834
|
+
$disabled = _ref11.$disabled,
|
|
4835
|
+
theme = _ref11.theme;
|
|
4834
4836
|
switch ($background) {
|
|
4835
4837
|
case 'dark':
|
|
4836
|
-
return $disabled ?
|
|
4838
|
+
return $disabled ? theme.disabled.secondary : theme.text.dark;
|
|
4837
4839
|
case 'medium':
|
|
4838
|
-
return $disabled ?
|
|
4840
|
+
return $disabled ? theme.disabled.secondary : theme.text.medium;
|
|
4839
4841
|
case 'light':
|
|
4840
|
-
return $disabled ?
|
|
4842
|
+
return $disabled ? theme.disabled.secondary : theme.text.light;
|
|
4841
4843
|
case 'white':
|
|
4842
|
-
return $disabled ?
|
|
4844
|
+
return $disabled ? theme.disabled.secondary : theme.text.white;
|
|
4843
4845
|
case 'warning':
|
|
4844
|
-
return $disabled ?
|
|
4846
|
+
return $disabled ? theme.disabled.secondary : theme["default"].warning;
|
|
4845
4847
|
case 'info':
|
|
4846
|
-
return $disabled ?
|
|
4848
|
+
return $disabled ? theme.disabled.secondary : theme["default"].info;
|
|
4847
4849
|
case 'success':
|
|
4848
|
-
return $disabled ?
|
|
4850
|
+
return $disabled ? theme.disabled.secondary : theme["default"].success;
|
|
4849
4851
|
case 'error':
|
|
4850
|
-
return $disabled ?
|
|
4852
|
+
return $disabled ? theme.disabled.secondary : theme["default"].error;
|
|
4851
4853
|
default:
|
|
4852
|
-
return $disabled ?
|
|
4854
|
+
return $disabled ? theme.disabled.secondary : $background;
|
|
4853
4855
|
}
|
|
4854
4856
|
}, function (_ref12) {
|
|
4855
|
-
var $color = _ref12.$color
|
|
4856
|
-
|
|
4857
|
+
var $color = _ref12.$color,
|
|
4858
|
+
theme = _ref12.theme;
|
|
4859
|
+
return $color || theme.text.medium;
|
|
4857
4860
|
}, function (_ref13) {
|
|
4858
4861
|
var $size = _ref13.$size;
|
|
4859
4862
|
switch ($size) {
|
|
@@ -4887,24 +4890,25 @@ var TitleText = styled.div(_templateObject3$5 || (_templateObject3$5 = _taggedTe
|
|
|
4887
4890
|
$size = _ref17.$size;
|
|
4888
4891
|
return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
|
|
4889
4892
|
}, function (_ref18) {
|
|
4890
|
-
var $titleColor = _ref18.$titleColor
|
|
4893
|
+
var $titleColor = _ref18.$titleColor,
|
|
4894
|
+
theme = _ref18.theme;
|
|
4891
4895
|
switch ($titleColor) {
|
|
4892
4896
|
case 'dark':
|
|
4893
|
-
return
|
|
4897
|
+
return theme.text.dark;
|
|
4894
4898
|
case 'medium':
|
|
4895
|
-
return
|
|
4899
|
+
return theme.text.medium;
|
|
4896
4900
|
case 'light':
|
|
4897
|
-
return
|
|
4901
|
+
return theme.text.light;
|
|
4898
4902
|
case 'white':
|
|
4899
|
-
return
|
|
4903
|
+
return theme.text.white;
|
|
4900
4904
|
case 'warning':
|
|
4901
|
-
return
|
|
4905
|
+
return theme["default"].warning;
|
|
4902
4906
|
case 'info':
|
|
4903
|
-
return
|
|
4907
|
+
return theme["default"].info;
|
|
4904
4908
|
case 'success':
|
|
4905
|
-
return
|
|
4909
|
+
return theme["default"].success;
|
|
4906
4910
|
case 'error':
|
|
4907
|
-
return
|
|
4911
|
+
return theme["default"].error;
|
|
4908
4912
|
default:
|
|
4909
4913
|
return $titleColor;
|
|
4910
4914
|
}
|
|
@@ -4913,126 +4917,139 @@ var Container$2 = styled.div(_templateObject4$4 || (_templateObject4$4 = _tagged
|
|
|
4913
4917
|
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
4918
|
var $labelStyle = _ref19.$labelStyle;
|
|
4915
4919
|
return $labelStyle;
|
|
4916
|
-
},
|
|
4917
|
-
var
|
|
4918
|
-
|
|
4920
|
+
}, function (_ref20) {
|
|
4921
|
+
var theme = _ref20.theme;
|
|
4922
|
+
return theme.text.medium;
|
|
4923
|
+
});
|
|
4924
|
+
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) {
|
|
4925
|
+
var theme = _ref21.theme;
|
|
4926
|
+
return "1px solid " + theme.border.light;
|
|
4927
|
+
}, function (_ref22) {
|
|
4928
|
+
var $optionsBorderRadius = _ref22.$optionsBorderRadius;
|
|
4919
4929
|
return $optionsBorderRadius || '8px';
|
|
4920
|
-
}, function (
|
|
4921
|
-
var $width =
|
|
4930
|
+
}, function (_ref23) {
|
|
4931
|
+
var $width = _ref23.$width;
|
|
4922
4932
|
return $width ? $width : 'max-content';
|
|
4923
|
-
}, function (
|
|
4924
|
-
var $menuBackground =
|
|
4925
|
-
|
|
4933
|
+
}, function (_ref24) {
|
|
4934
|
+
var $menuBackground = _ref24.$menuBackground,
|
|
4935
|
+
theme = _ref24.theme;
|
|
4936
|
+
return $menuBackground || theme.accent.light_2;
|
|
4926
4937
|
});
|
|
4927
4938
|
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 =
|
|
4939
|
+
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) {
|
|
4940
|
+
var $selectedOptionBackground = _ref25.$selectedOptionBackground,
|
|
4941
|
+
$disabled = _ref25.$disabled,
|
|
4942
|
+
theme = _ref25.theme;
|
|
4931
4943
|
switch ($selectedOptionBackground) {
|
|
4932
4944
|
case 'dark':
|
|
4933
|
-
return
|
|
4945
|
+
return theme.text.dark;
|
|
4934
4946
|
case 'medium':
|
|
4935
|
-
return
|
|
4947
|
+
return theme.text.medium;
|
|
4936
4948
|
case 'light':
|
|
4937
|
-
return
|
|
4949
|
+
return theme.text.light;
|
|
4938
4950
|
case 'white':
|
|
4939
|
-
return
|
|
4951
|
+
return theme.text.white;
|
|
4940
4952
|
case 'warning':
|
|
4941
|
-
return $disabled ?
|
|
4953
|
+
return $disabled ? theme.disabled.warning : theme["default"].warning;
|
|
4942
4954
|
case 'info':
|
|
4943
|
-
return $disabled ?
|
|
4955
|
+
return $disabled ? theme.disabled.info : theme["default"].info;
|
|
4944
4956
|
case 'success':
|
|
4945
|
-
return $disabled ?
|
|
4957
|
+
return $disabled ? theme.disabled.success : theme["default"].success;
|
|
4946
4958
|
case 'error':
|
|
4947
|
-
return $disabled ?
|
|
4959
|
+
return $disabled ? theme.disabled.error : theme["default"].error;
|
|
4948
4960
|
default:
|
|
4949
|
-
return $selectedOptionBackground ||
|
|
4961
|
+
return $selectedOptionBackground || theme.accent.light_2;
|
|
4950
4962
|
}
|
|
4951
|
-
}, function (
|
|
4952
|
-
var $selectedOptionColor =
|
|
4963
|
+
}, function (_ref26) {
|
|
4964
|
+
var $selectedOptionColor = _ref26.$selectedOptionColor,
|
|
4965
|
+
theme = _ref26.theme;
|
|
4953
4966
|
switch ($selectedOptionColor) {
|
|
4954
4967
|
case 'dark':
|
|
4955
|
-
return
|
|
4968
|
+
return theme.text.dark;
|
|
4956
4969
|
case 'medium':
|
|
4957
|
-
return
|
|
4970
|
+
return theme.text.medium;
|
|
4958
4971
|
case 'light':
|
|
4959
|
-
return
|
|
4972
|
+
return theme.text.light;
|
|
4960
4973
|
case 'white':
|
|
4961
|
-
return
|
|
4974
|
+
return theme.text.white;
|
|
4962
4975
|
case 'warning':
|
|
4963
|
-
return
|
|
4976
|
+
return theme["default"].warning;
|
|
4964
4977
|
case 'info':
|
|
4965
|
-
return
|
|
4978
|
+
return theme["default"].info;
|
|
4966
4979
|
case 'success':
|
|
4967
|
-
return
|
|
4980
|
+
return theme["default"].success;
|
|
4968
4981
|
case 'error':
|
|
4969
|
-
return
|
|
4982
|
+
return theme["default"].error;
|
|
4970
4983
|
default:
|
|
4971
4984
|
return $selectedOptionColor;
|
|
4972
4985
|
}
|
|
4973
4986
|
});
|
|
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) {
|
|
4987
|
+
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
4988
|
var $disabled = _ref27.$disabled;
|
|
4983
4989
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4990
|
+
}, function (_ref28) {
|
|
4991
|
+
var removeIconBackground = _ref28.removeIconBackground,
|
|
4992
|
+
$type = _ref28.$type,
|
|
4993
|
+
theme = _ref28.theme;
|
|
4994
|
+
return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : theme.disabled.primary;
|
|
4995
|
+
}, function (_ref29) {
|
|
4996
|
+
var $disabled = _ref29.$disabled;
|
|
4997
|
+
return $disabled ? 'not-allowed' : 'pointer';
|
|
4984
4998
|
});
|
|
4985
4999
|
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
|
-
|
|
5000
|
+
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) {
|
|
5001
|
+
var theme = _ref30.theme;
|
|
5002
|
+
return theme["default"].error;
|
|
5003
|
+
});
|
|
5004
|
+
var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
5005
|
+
var title = _ref31.title,
|
|
5006
|
+
titleWeight = _ref31.titleWeight,
|
|
5007
|
+
titleSize = _ref31.titleSize,
|
|
5008
|
+
_ref31$titleColor = _ref31.titleColor,
|
|
5009
|
+
titleColor = _ref31$titleColor === void 0 ? colorVariables.text.dark : _ref31$titleColor,
|
|
5010
|
+
_ref31$labelText = _ref31.labelText,
|
|
5011
|
+
labelText = _ref31$labelText === void 0 ? 'Select Cameras' : _ref31$labelText,
|
|
5012
|
+
labelStyle = _ref31.labelStyle,
|
|
5013
|
+
labelColor = _ref31.labelColor,
|
|
5014
|
+
_ref31$replaceLabel = _ref31.replaceLabel,
|
|
5015
|
+
replaceLabel = _ref31$replaceLabel === void 0 ? true : _ref31$replaceLabel,
|
|
5016
|
+
options = _ref31.options,
|
|
5017
|
+
width = _ref31.width,
|
|
5018
|
+
optionWidth = _ref31.optionWidth,
|
|
5019
|
+
height = _ref31.height,
|
|
5020
|
+
placeholder = _ref31.placeholder,
|
|
5021
|
+
border = _ref31.border,
|
|
5022
|
+
_ref31$background = _ref31.background,
|
|
5023
|
+
background = _ref31$background === void 0 ? colorVariables["default"].tertiary : _ref31$background,
|
|
5024
|
+
selectedOptionBackground = _ref31.selectedOptionBackground,
|
|
5025
|
+
selectedOptionColor = _ref31.selectedOptionColor,
|
|
5026
|
+
_ref31$menuBackground = _ref31.menuBackground,
|
|
5027
|
+
menuBackground = _ref31$menuBackground === void 0 ? 'white' : _ref31$menuBackground,
|
|
5028
|
+
optionsBorderRadius = _ref31.optionsBorderRadius,
|
|
5029
|
+
borderRadius = _ref31.borderRadius,
|
|
5030
|
+
removeIconBackground = _ref31.removeIconBackground,
|
|
5031
|
+
handleSelectChange = _ref31.handleSelectChange,
|
|
5032
|
+
selectedOptions = _ref31.selectedOptions,
|
|
5033
|
+
placeholderColor = _ref31.placeholderColor,
|
|
5034
|
+
optionBorder = _ref31.optionBorder,
|
|
5035
|
+
optionColor = _ref31.optionColor,
|
|
5036
|
+
searchIcon = _ref31.searchIcon,
|
|
5037
|
+
searchbarTextColor = _ref31.searchbarTextColor,
|
|
5038
|
+
searchBoxBackground = _ref31.searchBoxBackground,
|
|
5039
|
+
searchBoxBorder = _ref31.searchBoxBorder,
|
|
5040
|
+
searchBoxBorderRadius = _ref31.searchBoxBorderRadius,
|
|
5041
|
+
size = _ref31.size,
|
|
5042
|
+
removeIcon = _ref31.removeIcon,
|
|
5043
|
+
type = _ref31.type,
|
|
5044
|
+
icon = _ref31.icon,
|
|
5045
|
+
_ref31$disabled = _ref31.disabled,
|
|
5046
|
+
disabled = _ref31$disabled === void 0 ? false : _ref31$disabled,
|
|
5047
|
+
_ref31$required = _ref31.required,
|
|
5048
|
+
required = _ref31$required === void 0 ? false : _ref31$required,
|
|
5049
|
+
_ref31$searchBox = _ref31.searchBox,
|
|
5050
|
+
searchBox = _ref31$searchBox === void 0 ? true : _ref31$searchBox,
|
|
5051
|
+
_ref31$NoOptionsText = _ref31.NoOptionsText,
|
|
5052
|
+
NoOptionsText = _ref31$NoOptionsText === void 0 ? 'No Options Available' : _ref31$NoOptionsText;
|
|
5036
5053
|
var _useState = useState(false),
|
|
5037
5054
|
isOpen = _useState[0],
|
|
5038
5055
|
setIsOpen = _useState[1];
|
|
@@ -5220,24 +5237,25 @@ var TitleText$1 = styled.label(_templateObject$c || (_templateObject$c = _tagged
|
|
|
5220
5237
|
return "\n font-size: 14px;\n line-height: 14px;\n ";
|
|
5221
5238
|
}
|
|
5222
5239
|
}, function (_ref3) {
|
|
5223
|
-
var $titlecolor = _ref3.$titlecolor
|
|
5240
|
+
var $titlecolor = _ref3.$titlecolor,
|
|
5241
|
+
theme = _ref3.theme;
|
|
5224
5242
|
switch ($titlecolor) {
|
|
5225
5243
|
case 'dark':
|
|
5226
|
-
return
|
|
5244
|
+
return theme.text.dark;
|
|
5227
5245
|
case 'medium':
|
|
5228
|
-
return
|
|
5246
|
+
return theme.text.medium;
|
|
5229
5247
|
case 'light':
|
|
5230
|
-
return
|
|
5248
|
+
return theme.text.light;
|
|
5231
5249
|
case 'white':
|
|
5232
|
-
return
|
|
5250
|
+
return theme.text.white;
|
|
5233
5251
|
case 'warning':
|
|
5234
|
-
return
|
|
5252
|
+
return theme["default"].warning;
|
|
5235
5253
|
case 'info':
|
|
5236
|
-
return
|
|
5254
|
+
return theme["default"].info;
|
|
5237
5255
|
case 'success':
|
|
5238
|
-
return
|
|
5256
|
+
return theme["default"].success;
|
|
5239
5257
|
case 'error':
|
|
5240
|
-
return
|
|
5258
|
+
return theme["default"].error;
|
|
5241
5259
|
default:
|
|
5242
5260
|
return $titlecolor;
|
|
5243
5261
|
}
|
|
@@ -5260,8 +5278,9 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5260
5278
|
return $borderRadius || '8px';
|
|
5261
5279
|
}, function (_ref9) {
|
|
5262
5280
|
var $border = _ref9.$border,
|
|
5263
|
-
$isOpen = _ref9.$isOpen
|
|
5264
|
-
|
|
5281
|
+
$isOpen = _ref9.$isOpen,
|
|
5282
|
+
theme = _ref9.theme;
|
|
5283
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
5265
5284
|
}, function (_ref10) {
|
|
5266
5285
|
var $size = _ref10.$size;
|
|
5267
5286
|
switch ($size) {
|
|
@@ -5274,8 +5293,9 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5274
5293
|
}
|
|
5275
5294
|
}, function (_ref11) {
|
|
5276
5295
|
var $background = _ref11.$background,
|
|
5277
|
-
$disabled = _ref11.$disabled
|
|
5278
|
-
|
|
5296
|
+
$disabled = _ref11.$disabled,
|
|
5297
|
+
theme = _ref11.theme;
|
|
5298
|
+
return $disabled ? theme.border.light : $background || theme.accent.light_2;
|
|
5279
5299
|
}, function (_ref12) {
|
|
5280
5300
|
var $size = _ref12.$size;
|
|
5281
5301
|
switch ($size) {
|
|
@@ -5297,10 +5317,11 @@ var DropdownButton$1 = styled.div(_templateObject3$7 || (_templateObject3$7 = _t
|
|
|
5297
5317
|
return '14px';
|
|
5298
5318
|
}
|
|
5299
5319
|
});
|
|
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
|
|
5320
|
+
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
5321
|
var $optionColor = _ref14.$optionColor,
|
|
5302
|
-
$optionSelected = _ref14.$optionSelected
|
|
5303
|
-
|
|
5322
|
+
$optionSelected = _ref14.$optionSelected,
|
|
5323
|
+
theme = _ref14.theme;
|
|
5324
|
+
return $optionSelected ? theme.text.white : $optionColor || theme.text.medium;
|
|
5304
5325
|
}, function (_ref15) {
|
|
5305
5326
|
var $optionFontSize = _ref15.$optionFontSize;
|
|
5306
5327
|
return $optionFontSize || '14px';
|
|
@@ -5309,11 +5330,18 @@ var Options = styled.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemp
|
|
|
5309
5330
|
return $optionFontWeight || 400;
|
|
5310
5331
|
}, function (_ref17) {
|
|
5311
5332
|
var $optionBackgroundColor = _ref17.$optionBackgroundColor,
|
|
5312
|
-
$optionSelected = _ref17.$optionSelected
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
var
|
|
5333
|
+
$optionSelected = _ref17.$optionSelected,
|
|
5334
|
+
theme = _ref17.theme;
|
|
5335
|
+
return $optionSelected ? theme["default"].primary : $optionBackgroundColor || theme["default"].tertiary;
|
|
5336
|
+
}, function (_ref18) {
|
|
5337
|
+
var theme = _ref18.theme;
|
|
5338
|
+
return theme.hover.primary;
|
|
5339
|
+
}, function (_ref19) {
|
|
5340
|
+
var theme = _ref19.theme;
|
|
5341
|
+
return theme.text.white;
|
|
5342
|
+
});
|
|
5343
|
+
var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n font-style: ", ";\n color: ", ";\n"])), function (_ref20) {
|
|
5344
|
+
var $size = _ref20.$size;
|
|
5317
5345
|
switch ($size) {
|
|
5318
5346
|
case 'small':
|
|
5319
5347
|
return '14px';
|
|
@@ -5322,8 +5350,8 @@ var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _tagged
|
|
|
5322
5350
|
default:
|
|
5323
5351
|
return '14px';
|
|
5324
5352
|
}
|
|
5325
|
-
}, function (
|
|
5326
|
-
var $size =
|
|
5353
|
+
}, function (_ref21) {
|
|
5354
|
+
var $size = _ref21.$size;
|
|
5327
5355
|
switch ($size) {
|
|
5328
5356
|
case 'small':
|
|
5329
5357
|
return '12px';
|
|
@@ -5332,98 +5360,109 @@ var LabelText$1 = styled.div(_templateObject5$5 || (_templateObject5$5 = _tagged
|
|
|
5332
5360
|
default:
|
|
5333
5361
|
return '14px';
|
|
5334
5362
|
}
|
|
5335
|
-
}, function (
|
|
5336
|
-
var $fontStyle =
|
|
5363
|
+
}, function (_ref22) {
|
|
5364
|
+
var $fontStyle = _ref22.$fontStyle;
|
|
5337
5365
|
return $fontStyle || '';
|
|
5338
|
-
}, function (
|
|
5339
|
-
var $color =
|
|
5340
|
-
$disabled =
|
|
5341
|
-
|
|
5366
|
+
}, function (_ref23) {
|
|
5367
|
+
var $color = _ref23.$color,
|
|
5368
|
+
$disabled = _ref23.$disabled,
|
|
5369
|
+
theme = _ref23.theme;
|
|
5370
|
+
return $disabled ? theme.text.medium : $color || theme.text.medium;
|
|
5342
5371
|
});
|
|
5343
5372
|
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
|
|
5373
|
+
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) {
|
|
5374
|
+
var theme = _ref24.theme;
|
|
5375
|
+
return "1px solid " + theme.border.light;
|
|
5376
|
+
}, function (_ref25) {
|
|
5377
|
+
var $optionsBorderRadius = _ref25.$optionsBorderRadius;
|
|
5346
5378
|
return $optionsBorderRadius || '8px';
|
|
5347
|
-
}, function (
|
|
5348
|
-
var $width =
|
|
5379
|
+
}, function (_ref26) {
|
|
5380
|
+
var $width = _ref26.$width;
|
|
5349
5381
|
return $width ? $width : 'max-content';
|
|
5350
|
-
}, function (
|
|
5351
|
-
var $menuBackground =
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5382
|
+
}, function (_ref27) {
|
|
5383
|
+
var $menuBackground = _ref27.$menuBackground,
|
|
5384
|
+
theme = _ref27.theme;
|
|
5385
|
+
return $menuBackground || theme.accent.light_2;
|
|
5386
|
+
}, function (_ref28) {
|
|
5387
|
+
var $top = _ref28.$top;
|
|
5355
5388
|
return $top && "top: " + $top + ";";
|
|
5356
|
-
}, function (
|
|
5357
|
-
var $bottom =
|
|
5389
|
+
}, function (_ref29) {
|
|
5390
|
+
var $bottom = _ref29.$bottom;
|
|
5358
5391
|
return $bottom && "bottom: " + $bottom + ";";
|
|
5359
5392
|
});
|
|
5360
5393
|
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
|
-
|
|
5394
|
+
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) {
|
|
5395
|
+
var $background = _ref30.$background,
|
|
5396
|
+
theme = _ref30.theme;
|
|
5397
|
+
return $background || theme.accent.light_2;
|
|
5398
|
+
}, function (_ref31) {
|
|
5399
|
+
var $border = _ref31.$border;
|
|
5366
5400
|
return $border || 'none';
|
|
5367
|
-
},
|
|
5368
|
-
var
|
|
5401
|
+
}, function (_ref32) {
|
|
5402
|
+
var theme = _ref32.theme;
|
|
5403
|
+
return "1px solid " + theme.border.light;
|
|
5404
|
+
}, function (_ref33) {
|
|
5405
|
+
var $borderRadius = _ref33.$borderRadius;
|
|
5369
5406
|
return $borderRadius || '8px 8px 0 0';
|
|
5370
5407
|
});
|
|
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
|
-
|
|
5408
|
+
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) {
|
|
5409
|
+
var $inputColor = _ref34.$inputColor,
|
|
5410
|
+
theme = _ref34.theme;
|
|
5411
|
+
return $inputColor || theme.text.medium;
|
|
5412
|
+
}, function (_ref35) {
|
|
5413
|
+
var $placeholderColor = _ref35.$placeholderColor,
|
|
5414
|
+
theme = _ref35.theme;
|
|
5415
|
+
return $placeholderColor || theme.text.light;
|
|
5377
5416
|
});
|
|
5378
|
-
var SelectOption = function SelectOption(
|
|
5417
|
+
var SelectOption = function SelectOption(_ref36) {
|
|
5379
5418
|
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 =
|
|
5419
|
+
var title = _ref36.title,
|
|
5420
|
+
titlecolor = _ref36.titlecolor,
|
|
5421
|
+
titleWeight = _ref36.titleWeight,
|
|
5422
|
+
options = _ref36.options,
|
|
5423
|
+
value = _ref36.value,
|
|
5424
|
+
onChange = _ref36.onChange,
|
|
5425
|
+
_ref36$disabled = _ref36.disabled,
|
|
5426
|
+
disabled = _ref36$disabled === void 0 ? false : _ref36$disabled,
|
|
5427
|
+
size = _ref36.size,
|
|
5428
|
+
width = _ref36.width,
|
|
5429
|
+
_ref36$labelText = _ref36.labelText,
|
|
5430
|
+
labelText = _ref36$labelText === void 0 ? 'Select' : _ref36$labelText,
|
|
5431
|
+
border = _ref36.border,
|
|
5432
|
+
background = _ref36.background,
|
|
5433
|
+
_ref36$padding = _ref36.padding,
|
|
5434
|
+
padding = _ref36$padding === void 0 ? '0px' : _ref36$padding,
|
|
5435
|
+
borderRadius = _ref36.borderRadius,
|
|
5436
|
+
optionColor = _ref36.optionColor,
|
|
5437
|
+
optionFontSize = _ref36.optionFontSize,
|
|
5438
|
+
optionFontWeight = _ref36.optionFontWeight,
|
|
5439
|
+
optionBackgroundColor = _ref36.optionBackgroundColor,
|
|
5440
|
+
menuBackground = _ref36.menuBackground,
|
|
5441
|
+
optionsBorderRadius = _ref36.optionsBorderRadius,
|
|
5442
|
+
color = _ref36.color,
|
|
5443
|
+
required = _ref36.required,
|
|
5444
|
+
_ref36$NoOptionsText = _ref36.NoOptionsText,
|
|
5445
|
+
NoOptionsText = _ref36$NoOptionsText === void 0 ? 'No Options Available' : _ref36$NoOptionsText,
|
|
5446
|
+
positionRef = _ref36.positionRef,
|
|
5447
|
+
fontStyle = _ref36.fontStyle,
|
|
5448
|
+
icon = _ref36.icon,
|
|
5449
|
+
_ref36$searchBox = _ref36.searchBox,
|
|
5450
|
+
searchBox = _ref36$searchBox === void 0 ? true : _ref36$searchBox,
|
|
5451
|
+
searchBoxBackground = _ref36.searchBoxBackground,
|
|
5452
|
+
searchBoxBorder = _ref36.searchBoxBorder,
|
|
5453
|
+
searchBoxBorderRadius = _ref36.searchBoxBorderRadius,
|
|
5454
|
+
searchIcon = _ref36.searchIcon,
|
|
5455
|
+
_ref36$placeholderTex = _ref36.placeholderText,
|
|
5456
|
+
placeholderText = _ref36$placeholderTex === void 0 ? 'Search...' : _ref36$placeholderTex,
|
|
5457
|
+
_ref36$iconColor = _ref36.iconColor,
|
|
5458
|
+
iconColor = _ref36$iconColor === void 0 ? colorVariables.text.medium : _ref36$iconColor,
|
|
5459
|
+
placeholderColor = _ref36.placeholderColor,
|
|
5460
|
+
inputColor = _ref36.inputColor,
|
|
5461
|
+
_ref36$iconSize = _ref36.iconSize,
|
|
5462
|
+
iconSize = _ref36$iconSize === void 0 ? 16 : _ref36$iconSize,
|
|
5463
|
+
_ref36$allowDeselect = _ref36.allowDeselect,
|
|
5464
|
+
allowDeselect = _ref36$allowDeselect === void 0 ? true : _ref36$allowDeselect,
|
|
5465
|
+
titleRightNode = _ref36.titleRightNode;
|
|
5427
5466
|
var _useState = useState(false),
|
|
5428
5467
|
dropUp = _useState[0],
|
|
5429
5468
|
setDropUp = _useState[1];
|
|
@@ -5712,6 +5751,10 @@ var useNotification = function useNotification() {
|
|
|
5712
5751
|
};
|
|
5713
5752
|
};
|
|
5714
5753
|
|
|
5754
|
+
var useTheme = function useTheme() {
|
|
5755
|
+
return useTheme$1();
|
|
5756
|
+
};
|
|
5757
|
+
|
|
5715
5758
|
var _templateObject$e, _templateObject2$b;
|
|
5716
5759
|
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
5760
|
var $background = _ref.$background;
|
|
@@ -7308,5 +7351,5 @@ var InternalTabs = function InternalTabs(_ref) {
|
|
|
7308
7351
|
}));
|
|
7309
7352
|
};
|
|
7310
7353
|
|
|
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 };
|
|
7354
|
+
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
7355
|
//# sourceMappingURL=index.modern.js.map
|