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.js
CHANGED
|
@@ -163,13 +163,15 @@ var dark = {
|
|
|
163
163
|
};
|
|
164
164
|
var getCurrentTheme = function getCurrentTheme() {
|
|
165
165
|
if (typeof document !== 'undefined') {
|
|
166
|
-
|
|
166
|
+
var isDarkClass = document.documentElement.classList.contains('dark');
|
|
167
|
+
return isDarkClass ? 'dark' : 'light';
|
|
167
168
|
}
|
|
168
|
-
return light;
|
|
169
|
+
return 'light';
|
|
169
170
|
};
|
|
170
171
|
var colorVariables = new Proxy({}, {
|
|
171
172
|
get: function get(_, prop) {
|
|
172
|
-
var
|
|
173
|
+
var currentThemeName = getCurrentTheme();
|
|
174
|
+
var currentTheme = themes[currentThemeName];
|
|
173
175
|
return currentTheme[prop];
|
|
174
176
|
}
|
|
175
177
|
});
|
|
@@ -4824,8 +4826,9 @@ var DropdownButton = styled__default.div(_templateObject2$7 || (_templateObject2
|
|
|
4824
4826
|
return $height || '100%';
|
|
4825
4827
|
}, function (_ref8) {
|
|
4826
4828
|
var $border = _ref8.$border,
|
|
4827
|
-
$isOpen = _ref8.$isOpen
|
|
4828
|
-
|
|
4829
|
+
$isOpen = _ref8.$isOpen,
|
|
4830
|
+
theme = _ref8.theme;
|
|
4831
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
4829
4832
|
}, function (_ref9) {
|
|
4830
4833
|
var $borderRadius = _ref9.$borderRadius;
|
|
4831
4834
|
return $borderRadius || '8px';
|
|
@@ -4834,30 +4837,32 @@ var DropdownButton = styled__default.div(_templateObject2$7 || (_templateObject2
|
|
|
4834
4837
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4835
4838
|
}, function (_ref11) {
|
|
4836
4839
|
var $background = _ref11.$background,
|
|
4837
|
-
$disabled = _ref11.$disabled
|
|
4840
|
+
$disabled = _ref11.$disabled,
|
|
4841
|
+
theme = _ref11.theme;
|
|
4838
4842
|
switch ($background) {
|
|
4839
4843
|
case 'dark':
|
|
4840
|
-
return $disabled ?
|
|
4844
|
+
return $disabled ? theme.disabled.secondary : theme.text.dark;
|
|
4841
4845
|
case 'medium':
|
|
4842
|
-
return $disabled ?
|
|
4846
|
+
return $disabled ? theme.disabled.secondary : theme.text.medium;
|
|
4843
4847
|
case 'light':
|
|
4844
|
-
return $disabled ?
|
|
4848
|
+
return $disabled ? theme.disabled.secondary : theme.text.light;
|
|
4845
4849
|
case 'white':
|
|
4846
|
-
return $disabled ?
|
|
4850
|
+
return $disabled ? theme.disabled.secondary : theme.text.white;
|
|
4847
4851
|
case 'warning':
|
|
4848
|
-
return $disabled ?
|
|
4852
|
+
return $disabled ? theme.disabled.secondary : theme["default"].warning;
|
|
4849
4853
|
case 'info':
|
|
4850
|
-
return $disabled ?
|
|
4854
|
+
return $disabled ? theme.disabled.secondary : theme["default"].info;
|
|
4851
4855
|
case 'success':
|
|
4852
|
-
return $disabled ?
|
|
4856
|
+
return $disabled ? theme.disabled.secondary : theme["default"].success;
|
|
4853
4857
|
case 'error':
|
|
4854
|
-
return $disabled ?
|
|
4858
|
+
return $disabled ? theme.disabled.secondary : theme["default"].error;
|
|
4855
4859
|
default:
|
|
4856
|
-
return $disabled ?
|
|
4860
|
+
return $disabled ? theme.disabled.secondary : $background;
|
|
4857
4861
|
}
|
|
4858
4862
|
}, function (_ref12) {
|
|
4859
|
-
var $color = _ref12.$color
|
|
4860
|
-
|
|
4863
|
+
var $color = _ref12.$color,
|
|
4864
|
+
theme = _ref12.theme;
|
|
4865
|
+
return $color || theme.text.medium;
|
|
4861
4866
|
}, function (_ref13) {
|
|
4862
4867
|
var $size = _ref13.$size;
|
|
4863
4868
|
switch ($size) {
|
|
@@ -4891,24 +4896,25 @@ var TitleText = styled__default.div(_templateObject3$5 || (_templateObject3$5 =
|
|
|
4891
4896
|
$size = _ref17.$size;
|
|
4892
4897
|
return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
|
|
4893
4898
|
}, function (_ref18) {
|
|
4894
|
-
var $titleColor = _ref18.$titleColor
|
|
4899
|
+
var $titleColor = _ref18.$titleColor,
|
|
4900
|
+
theme = _ref18.theme;
|
|
4895
4901
|
switch ($titleColor) {
|
|
4896
4902
|
case 'dark':
|
|
4897
|
-
return
|
|
4903
|
+
return theme.text.dark;
|
|
4898
4904
|
case 'medium':
|
|
4899
|
-
return
|
|
4905
|
+
return theme.text.medium;
|
|
4900
4906
|
case 'light':
|
|
4901
|
-
return
|
|
4907
|
+
return theme.text.light;
|
|
4902
4908
|
case 'white':
|
|
4903
|
-
return
|
|
4909
|
+
return theme.text.white;
|
|
4904
4910
|
case 'warning':
|
|
4905
|
-
return
|
|
4911
|
+
return theme["default"].warning;
|
|
4906
4912
|
case 'info':
|
|
4907
|
-
return
|
|
4913
|
+
return theme["default"].info;
|
|
4908
4914
|
case 'success':
|
|
4909
|
-
return
|
|
4915
|
+
return theme["default"].success;
|
|
4910
4916
|
case 'error':
|
|
4911
|
-
return
|
|
4917
|
+
return theme["default"].error;
|
|
4912
4918
|
default:
|
|
4913
4919
|
return $titleColor;
|
|
4914
4920
|
}
|
|
@@ -4917,126 +4923,139 @@ var Container$2 = styled__default.div(_templateObject4$4 || (_templateObject4$4
|
|
|
4917
4923
|
var LabelText = styled__default.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 400;\n font-style:", ";\n color: ", ";\n"])), function (_ref19) {
|
|
4918
4924
|
var $labelStyle = _ref19.$labelStyle;
|
|
4919
4925
|
return $labelStyle;
|
|
4920
|
-
},
|
|
4921
|
-
var
|
|
4922
|
-
|
|
4926
|
+
}, function (_ref20) {
|
|
4927
|
+
var theme = _ref20.theme;
|
|
4928
|
+
return theme.text.medium;
|
|
4929
|
+
});
|
|
4930
|
+
var DropdownMenu = styled__default.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) {
|
|
4931
|
+
var theme = _ref21.theme;
|
|
4932
|
+
return "1px solid " + theme.border.light;
|
|
4933
|
+
}, function (_ref22) {
|
|
4934
|
+
var $optionsBorderRadius = _ref22.$optionsBorderRadius;
|
|
4923
4935
|
return $optionsBorderRadius || '8px';
|
|
4924
|
-
}, function (
|
|
4925
|
-
var $width =
|
|
4936
|
+
}, function (_ref23) {
|
|
4937
|
+
var $width = _ref23.$width;
|
|
4926
4938
|
return $width ? $width : 'max-content';
|
|
4927
|
-
}, function (
|
|
4928
|
-
var $menuBackground =
|
|
4929
|
-
|
|
4939
|
+
}, function (_ref24) {
|
|
4940
|
+
var $menuBackground = _ref24.$menuBackground,
|
|
4941
|
+
theme = _ref24.theme;
|
|
4942
|
+
return $menuBackground || theme.accent.light_2;
|
|
4930
4943
|
});
|
|
4931
4944
|
var SelectedOptionsWrapper = styled__default.div(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n height: 100%;\n"])));
|
|
4932
|
-
var SelectedOptionDiv = styled__default.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 (
|
|
4933
|
-
var $selectedOptionBackground =
|
|
4934
|
-
$disabled =
|
|
4945
|
+
var SelectedOptionDiv = styled__default.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) {
|
|
4946
|
+
var $selectedOptionBackground = _ref25.$selectedOptionBackground,
|
|
4947
|
+
$disabled = _ref25.$disabled,
|
|
4948
|
+
theme = _ref25.theme;
|
|
4935
4949
|
switch ($selectedOptionBackground) {
|
|
4936
4950
|
case 'dark':
|
|
4937
|
-
return
|
|
4951
|
+
return theme.text.dark;
|
|
4938
4952
|
case 'medium':
|
|
4939
|
-
return
|
|
4953
|
+
return theme.text.medium;
|
|
4940
4954
|
case 'light':
|
|
4941
|
-
return
|
|
4955
|
+
return theme.text.light;
|
|
4942
4956
|
case 'white':
|
|
4943
|
-
return
|
|
4957
|
+
return theme.text.white;
|
|
4944
4958
|
case 'warning':
|
|
4945
|
-
return $disabled ?
|
|
4959
|
+
return $disabled ? theme.disabled.warning : theme["default"].warning;
|
|
4946
4960
|
case 'info':
|
|
4947
|
-
return $disabled ?
|
|
4961
|
+
return $disabled ? theme.disabled.info : theme["default"].info;
|
|
4948
4962
|
case 'success':
|
|
4949
|
-
return $disabled ?
|
|
4963
|
+
return $disabled ? theme.disabled.success : theme["default"].success;
|
|
4950
4964
|
case 'error':
|
|
4951
|
-
return $disabled ?
|
|
4965
|
+
return $disabled ? theme.disabled.error : theme["default"].error;
|
|
4952
4966
|
default:
|
|
4953
|
-
return $selectedOptionBackground ||
|
|
4967
|
+
return $selectedOptionBackground || theme.accent.light_2;
|
|
4954
4968
|
}
|
|
4955
|
-
}, function (
|
|
4956
|
-
var $selectedOptionColor =
|
|
4969
|
+
}, function (_ref26) {
|
|
4970
|
+
var $selectedOptionColor = _ref26.$selectedOptionColor,
|
|
4971
|
+
theme = _ref26.theme;
|
|
4957
4972
|
switch ($selectedOptionColor) {
|
|
4958
4973
|
case 'dark':
|
|
4959
|
-
return
|
|
4974
|
+
return theme.text.dark;
|
|
4960
4975
|
case 'medium':
|
|
4961
|
-
return
|
|
4976
|
+
return theme.text.medium;
|
|
4962
4977
|
case 'light':
|
|
4963
|
-
return
|
|
4978
|
+
return theme.text.light;
|
|
4964
4979
|
case 'white':
|
|
4965
|
-
return
|
|
4980
|
+
return theme.text.white;
|
|
4966
4981
|
case 'warning':
|
|
4967
|
-
return
|
|
4982
|
+
return theme["default"].warning;
|
|
4968
4983
|
case 'info':
|
|
4969
|
-
return
|
|
4984
|
+
return theme["default"].info;
|
|
4970
4985
|
case 'success':
|
|
4971
|
-
return
|
|
4986
|
+
return theme["default"].success;
|
|
4972
4987
|
case 'error':
|
|
4973
|
-
return
|
|
4988
|
+
return theme["default"].error;
|
|
4974
4989
|
default:
|
|
4975
4990
|
return $selectedOptionColor;
|
|
4976
4991
|
}
|
|
4977
4992
|
});
|
|
4978
|
-
var RemoveIcon = styled__default.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 (
|
|
4979
|
-
var $disabled = _ref25.$disabled;
|
|
4980
|
-
return $disabled ? 'not-allowed' : 'pointer';
|
|
4981
|
-
}, function (_ref26) {
|
|
4982
|
-
var removeIconBackground = _ref26.removeIconBackground,
|
|
4983
|
-
$type = _ref26.$type;
|
|
4984
|
-
return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
|
|
4985
|
-
}, function (_ref27) {
|
|
4993
|
+
var RemoveIcon = styled__default.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) {
|
|
4986
4994
|
var $disabled = _ref27.$disabled;
|
|
4987
4995
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
4996
|
+
}, function (_ref28) {
|
|
4997
|
+
var removeIconBackground = _ref28.removeIconBackground,
|
|
4998
|
+
$type = _ref28.$type,
|
|
4999
|
+
theme = _ref28.theme;
|
|
5000
|
+
return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : theme.disabled.primary;
|
|
5001
|
+
}, function (_ref29) {
|
|
5002
|
+
var $disabled = _ref29.$disabled;
|
|
5003
|
+
return $disabled ? 'not-allowed' : 'pointer';
|
|
4988
5004
|
});
|
|
4989
5005
|
var TextWrapper = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 4px;\n"])));
|
|
4990
|
-
var Asterisk = styled__default.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"])),
|
|
4991
|
-
var
|
|
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
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5006
|
+
var Asterisk = styled__default.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) {
|
|
5007
|
+
var theme = _ref30.theme;
|
|
5008
|
+
return theme["default"].error;
|
|
5009
|
+
});
|
|
5010
|
+
var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
5011
|
+
var title = _ref31.title,
|
|
5012
|
+
titleWeight = _ref31.titleWeight,
|
|
5013
|
+
titleSize = _ref31.titleSize,
|
|
5014
|
+
_ref31$titleColor = _ref31.titleColor,
|
|
5015
|
+
titleColor = _ref31$titleColor === void 0 ? colorVariables.text.dark : _ref31$titleColor,
|
|
5016
|
+
_ref31$labelText = _ref31.labelText,
|
|
5017
|
+
labelText = _ref31$labelText === void 0 ? 'Select Cameras' : _ref31$labelText,
|
|
5018
|
+
labelStyle = _ref31.labelStyle,
|
|
5019
|
+
labelColor = _ref31.labelColor,
|
|
5020
|
+
_ref31$replaceLabel = _ref31.replaceLabel,
|
|
5021
|
+
replaceLabel = _ref31$replaceLabel === void 0 ? true : _ref31$replaceLabel,
|
|
5022
|
+
options = _ref31.options,
|
|
5023
|
+
width = _ref31.width,
|
|
5024
|
+
optionWidth = _ref31.optionWidth,
|
|
5025
|
+
height = _ref31.height,
|
|
5026
|
+
placeholder = _ref31.placeholder,
|
|
5027
|
+
border = _ref31.border,
|
|
5028
|
+
_ref31$background = _ref31.background,
|
|
5029
|
+
background = _ref31$background === void 0 ? colorVariables["default"].tertiary : _ref31$background,
|
|
5030
|
+
selectedOptionBackground = _ref31.selectedOptionBackground,
|
|
5031
|
+
selectedOptionColor = _ref31.selectedOptionColor,
|
|
5032
|
+
_ref31$menuBackground = _ref31.menuBackground,
|
|
5033
|
+
menuBackground = _ref31$menuBackground === void 0 ? 'white' : _ref31$menuBackground,
|
|
5034
|
+
optionsBorderRadius = _ref31.optionsBorderRadius,
|
|
5035
|
+
borderRadius = _ref31.borderRadius,
|
|
5036
|
+
removeIconBackground = _ref31.removeIconBackground,
|
|
5037
|
+
handleSelectChange = _ref31.handleSelectChange,
|
|
5038
|
+
selectedOptions = _ref31.selectedOptions,
|
|
5039
|
+
placeholderColor = _ref31.placeholderColor,
|
|
5040
|
+
optionBorder = _ref31.optionBorder,
|
|
5041
|
+
optionColor = _ref31.optionColor,
|
|
5042
|
+
searchIcon = _ref31.searchIcon,
|
|
5043
|
+
searchbarTextColor = _ref31.searchbarTextColor,
|
|
5044
|
+
searchBoxBackground = _ref31.searchBoxBackground,
|
|
5045
|
+
searchBoxBorder = _ref31.searchBoxBorder,
|
|
5046
|
+
searchBoxBorderRadius = _ref31.searchBoxBorderRadius,
|
|
5047
|
+
size = _ref31.size,
|
|
5048
|
+
removeIcon = _ref31.removeIcon,
|
|
5049
|
+
type = _ref31.type,
|
|
5050
|
+
icon = _ref31.icon,
|
|
5051
|
+
_ref31$disabled = _ref31.disabled,
|
|
5052
|
+
disabled = _ref31$disabled === void 0 ? false : _ref31$disabled,
|
|
5053
|
+
_ref31$required = _ref31.required,
|
|
5054
|
+
required = _ref31$required === void 0 ? false : _ref31$required,
|
|
5055
|
+
_ref31$searchBox = _ref31.searchBox,
|
|
5056
|
+
searchBox = _ref31$searchBox === void 0 ? true : _ref31$searchBox,
|
|
5057
|
+
_ref31$NoOptionsText = _ref31.NoOptionsText,
|
|
5058
|
+
NoOptionsText = _ref31$NoOptionsText === void 0 ? 'No Options Available' : _ref31$NoOptionsText;
|
|
5040
5059
|
var _useState = React.useState(false),
|
|
5041
5060
|
isOpen = _useState[0],
|
|
5042
5061
|
setIsOpen = _useState[1];
|
|
@@ -5224,24 +5243,25 @@ var TitleText$1 = styled__default.label(_templateObject$c || (_templateObject$c
|
|
|
5224
5243
|
return "\n font-size: 14px;\n line-height: 14px;\n ";
|
|
5225
5244
|
}
|
|
5226
5245
|
}, function (_ref3) {
|
|
5227
|
-
var $titlecolor = _ref3.$titlecolor
|
|
5246
|
+
var $titlecolor = _ref3.$titlecolor,
|
|
5247
|
+
theme = _ref3.theme;
|
|
5228
5248
|
switch ($titlecolor) {
|
|
5229
5249
|
case 'dark':
|
|
5230
|
-
return
|
|
5250
|
+
return theme.text.dark;
|
|
5231
5251
|
case 'medium':
|
|
5232
|
-
return
|
|
5252
|
+
return theme.text.medium;
|
|
5233
5253
|
case 'light':
|
|
5234
|
-
return
|
|
5254
|
+
return theme.text.light;
|
|
5235
5255
|
case 'white':
|
|
5236
|
-
return
|
|
5256
|
+
return theme.text.white;
|
|
5237
5257
|
case 'warning':
|
|
5238
|
-
return
|
|
5258
|
+
return theme["default"].warning;
|
|
5239
5259
|
case 'info':
|
|
5240
|
-
return
|
|
5260
|
+
return theme["default"].info;
|
|
5241
5261
|
case 'success':
|
|
5242
|
-
return
|
|
5262
|
+
return theme["default"].success;
|
|
5243
5263
|
case 'error':
|
|
5244
|
-
return
|
|
5264
|
+
return theme["default"].error;
|
|
5245
5265
|
default:
|
|
5246
5266
|
return $titlecolor;
|
|
5247
5267
|
}
|
|
@@ -5264,8 +5284,9 @@ var DropdownButton$1 = styled__default.div(_templateObject3$7 || (_templateObjec
|
|
|
5264
5284
|
return $borderRadius || '8px';
|
|
5265
5285
|
}, function (_ref9) {
|
|
5266
5286
|
var $border = _ref9.$border,
|
|
5267
|
-
$isOpen = _ref9.$isOpen
|
|
5268
|
-
|
|
5287
|
+
$isOpen = _ref9.$isOpen,
|
|
5288
|
+
theme = _ref9.theme;
|
|
5289
|
+
return $isOpen ? "1px solid " + theme.text.dark : $border || "1px solid " + theme.border.light;
|
|
5269
5290
|
}, function (_ref10) {
|
|
5270
5291
|
var $size = _ref10.$size;
|
|
5271
5292
|
switch ($size) {
|
|
@@ -5278,8 +5299,9 @@ var DropdownButton$1 = styled__default.div(_templateObject3$7 || (_templateObjec
|
|
|
5278
5299
|
}
|
|
5279
5300
|
}, function (_ref11) {
|
|
5280
5301
|
var $background = _ref11.$background,
|
|
5281
|
-
$disabled = _ref11.$disabled
|
|
5282
|
-
|
|
5302
|
+
$disabled = _ref11.$disabled,
|
|
5303
|
+
theme = _ref11.theme;
|
|
5304
|
+
return $disabled ? theme.border.light : $background || theme.accent.light_2;
|
|
5283
5305
|
}, function (_ref12) {
|
|
5284
5306
|
var $size = _ref12.$size;
|
|
5285
5307
|
switch ($size) {
|
|
@@ -5301,10 +5323,11 @@ var DropdownButton$1 = styled__default.div(_templateObject3$7 || (_templateObjec
|
|
|
5301
5323
|
return '14px';
|
|
5302
5324
|
}
|
|
5303
5325
|
});
|
|
5304
|
-
var Options = styled__default.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
|
|
5326
|
+
var Options = styled__default.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) {
|
|
5305
5327
|
var $optionColor = _ref14.$optionColor,
|
|
5306
|
-
$optionSelected = _ref14.$optionSelected
|
|
5307
|
-
|
|
5328
|
+
$optionSelected = _ref14.$optionSelected,
|
|
5329
|
+
theme = _ref14.theme;
|
|
5330
|
+
return $optionSelected ? theme.text.white : $optionColor || theme.text.medium;
|
|
5308
5331
|
}, function (_ref15) {
|
|
5309
5332
|
var $optionFontSize = _ref15.$optionFontSize;
|
|
5310
5333
|
return $optionFontSize || '14px';
|
|
@@ -5313,11 +5336,18 @@ var Options = styled__default.div(_templateObject4$5 || (_templateObject4$5 = _t
|
|
|
5313
5336
|
return $optionFontWeight || 400;
|
|
5314
5337
|
}, function (_ref17) {
|
|
5315
5338
|
var $optionBackgroundColor = _ref17.$optionBackgroundColor,
|
|
5316
|
-
$optionSelected = _ref17.$optionSelected
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
var
|
|
5339
|
+
$optionSelected = _ref17.$optionSelected,
|
|
5340
|
+
theme = _ref17.theme;
|
|
5341
|
+
return $optionSelected ? theme["default"].primary : $optionBackgroundColor || theme["default"].tertiary;
|
|
5342
|
+
}, function (_ref18) {
|
|
5343
|
+
var theme = _ref18.theme;
|
|
5344
|
+
return theme.hover.primary;
|
|
5345
|
+
}, function (_ref19) {
|
|
5346
|
+
var theme = _ref19.theme;
|
|
5347
|
+
return theme.text.white;
|
|
5348
|
+
});
|
|
5349
|
+
var LabelText$1 = styled__default.div(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n font-style: ", ";\n color: ", ";\n"])), function (_ref20) {
|
|
5350
|
+
var $size = _ref20.$size;
|
|
5321
5351
|
switch ($size) {
|
|
5322
5352
|
case 'small':
|
|
5323
5353
|
return '14px';
|
|
@@ -5326,8 +5356,8 @@ var LabelText$1 = styled__default.div(_templateObject5$5 || (_templateObject5$5
|
|
|
5326
5356
|
default:
|
|
5327
5357
|
return '14px';
|
|
5328
5358
|
}
|
|
5329
|
-
}, function (
|
|
5330
|
-
var $size =
|
|
5359
|
+
}, function (_ref21) {
|
|
5360
|
+
var $size = _ref21.$size;
|
|
5331
5361
|
switch ($size) {
|
|
5332
5362
|
case 'small':
|
|
5333
5363
|
return '12px';
|
|
@@ -5336,98 +5366,109 @@ var LabelText$1 = styled__default.div(_templateObject5$5 || (_templateObject5$5
|
|
|
5336
5366
|
default:
|
|
5337
5367
|
return '14px';
|
|
5338
5368
|
}
|
|
5339
|
-
}, function (
|
|
5340
|
-
var $fontStyle =
|
|
5369
|
+
}, function (_ref22) {
|
|
5370
|
+
var $fontStyle = _ref22.$fontStyle;
|
|
5341
5371
|
return $fontStyle || '';
|
|
5342
|
-
}, function (
|
|
5343
|
-
var $color =
|
|
5344
|
-
$disabled =
|
|
5345
|
-
|
|
5372
|
+
}, function (_ref23) {
|
|
5373
|
+
var $color = _ref23.$color,
|
|
5374
|
+
$disabled = _ref23.$disabled,
|
|
5375
|
+
theme = _ref23.theme;
|
|
5376
|
+
return $disabled ? theme.text.medium : $color || theme.text.medium;
|
|
5346
5377
|
});
|
|
5347
5378
|
var NoOptions = styled__default(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"])));
|
|
5348
|
-
var DropdownMenu$1 = styled__default.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border:
|
|
5349
|
-
var
|
|
5379
|
+
var DropdownMenu$1 = styled__default.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) {
|
|
5380
|
+
var theme = _ref24.theme;
|
|
5381
|
+
return "1px solid " + theme.border.light;
|
|
5382
|
+
}, function (_ref25) {
|
|
5383
|
+
var $optionsBorderRadius = _ref25.$optionsBorderRadius;
|
|
5350
5384
|
return $optionsBorderRadius || '8px';
|
|
5351
|
-
}, function (
|
|
5352
|
-
var $width =
|
|
5385
|
+
}, function (_ref26) {
|
|
5386
|
+
var $width = _ref26.$width;
|
|
5353
5387
|
return $width ? $width : 'max-content';
|
|
5354
|
-
}, function (
|
|
5355
|
-
var $menuBackground =
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5388
|
+
}, function (_ref27) {
|
|
5389
|
+
var $menuBackground = _ref27.$menuBackground,
|
|
5390
|
+
theme = _ref27.theme;
|
|
5391
|
+
return $menuBackground || theme.accent.light_2;
|
|
5392
|
+
}, function (_ref28) {
|
|
5393
|
+
var $top = _ref28.$top;
|
|
5359
5394
|
return $top && "top: " + $top + ";";
|
|
5360
|
-
}, function (
|
|
5361
|
-
var $bottom =
|
|
5395
|
+
}, function (_ref29) {
|
|
5396
|
+
var $bottom = _ref29.$bottom;
|
|
5362
5397
|
return $bottom && "bottom: " + $bottom + ";";
|
|
5363
5398
|
});
|
|
5364
5399
|
var OptionsWrapper = styled__default.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n max-height: 150px; \n overflow-y: auto;\n scrollbar-width: thin;\n width: 100%;\n"])));
|
|
5365
|
-
var SearchContainer$1 = styled__default.div(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom:
|
|
5366
|
-
var $background =
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5400
|
+
var SearchContainer$1 = styled__default.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) {
|
|
5401
|
+
var $background = _ref30.$background,
|
|
5402
|
+
theme = _ref30.theme;
|
|
5403
|
+
return $background || theme.accent.light_2;
|
|
5404
|
+
}, function (_ref31) {
|
|
5405
|
+
var $border = _ref31.$border;
|
|
5370
5406
|
return $border || 'none';
|
|
5371
|
-
},
|
|
5372
|
-
var
|
|
5407
|
+
}, function (_ref32) {
|
|
5408
|
+
var theme = _ref32.theme;
|
|
5409
|
+
return "1px solid " + theme.border.light;
|
|
5410
|
+
}, function (_ref33) {
|
|
5411
|
+
var $borderRadius = _ref33.$borderRadius;
|
|
5373
5412
|
return $borderRadius || '8px 8px 0 0';
|
|
5374
5413
|
});
|
|
5375
|
-
var SearchBar$1 = styled__default.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 (
|
|
5376
|
-
var $inputColor =
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5414
|
+
var SearchBar$1 = styled__default.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) {
|
|
5415
|
+
var $inputColor = _ref34.$inputColor,
|
|
5416
|
+
theme = _ref34.theme;
|
|
5417
|
+
return $inputColor || theme.text.medium;
|
|
5418
|
+
}, function (_ref35) {
|
|
5419
|
+
var $placeholderColor = _ref35.$placeholderColor,
|
|
5420
|
+
theme = _ref35.theme;
|
|
5421
|
+
return $placeholderColor || theme.text.light;
|
|
5381
5422
|
});
|
|
5382
|
-
var SelectOption = function SelectOption(
|
|
5423
|
+
var SelectOption = function SelectOption(_ref36) {
|
|
5383
5424
|
var _options$find;
|
|
5384
|
-
var title =
|
|
5385
|
-
titlecolor =
|
|
5386
|
-
titleWeight =
|
|
5387
|
-
options =
|
|
5388
|
-
value =
|
|
5389
|
-
onChange =
|
|
5390
|
-
|
|
5391
|
-
disabled =
|
|
5392
|
-
size =
|
|
5393
|
-
width =
|
|
5394
|
-
|
|
5395
|
-
labelText =
|
|
5396
|
-
border =
|
|
5397
|
-
background =
|
|
5398
|
-
|
|
5399
|
-
padding =
|
|
5400
|
-
borderRadius =
|
|
5401
|
-
optionColor =
|
|
5402
|
-
optionFontSize =
|
|
5403
|
-
optionFontWeight =
|
|
5404
|
-
optionBackgroundColor =
|
|
5405
|
-
menuBackground =
|
|
5406
|
-
optionsBorderRadius =
|
|
5407
|
-
color =
|
|
5408
|
-
required =
|
|
5409
|
-
|
|
5410
|
-
NoOptionsText =
|
|
5411
|
-
positionRef =
|
|
5412
|
-
fontStyle =
|
|
5413
|
-
icon =
|
|
5414
|
-
|
|
5415
|
-
searchBox =
|
|
5416
|
-
searchBoxBackground =
|
|
5417
|
-
searchBoxBorder =
|
|
5418
|
-
searchBoxBorderRadius =
|
|
5419
|
-
searchIcon =
|
|
5420
|
-
|
|
5421
|
-
placeholderText =
|
|
5422
|
-
|
|
5423
|
-
iconColor =
|
|
5424
|
-
placeholderColor =
|
|
5425
|
-
inputColor =
|
|
5426
|
-
|
|
5427
|
-
iconSize =
|
|
5428
|
-
|
|
5429
|
-
allowDeselect =
|
|
5430
|
-
titleRightNode =
|
|
5425
|
+
var title = _ref36.title,
|
|
5426
|
+
titlecolor = _ref36.titlecolor,
|
|
5427
|
+
titleWeight = _ref36.titleWeight,
|
|
5428
|
+
options = _ref36.options,
|
|
5429
|
+
value = _ref36.value,
|
|
5430
|
+
onChange = _ref36.onChange,
|
|
5431
|
+
_ref36$disabled = _ref36.disabled,
|
|
5432
|
+
disabled = _ref36$disabled === void 0 ? false : _ref36$disabled,
|
|
5433
|
+
size = _ref36.size,
|
|
5434
|
+
width = _ref36.width,
|
|
5435
|
+
_ref36$labelText = _ref36.labelText,
|
|
5436
|
+
labelText = _ref36$labelText === void 0 ? 'Select' : _ref36$labelText,
|
|
5437
|
+
border = _ref36.border,
|
|
5438
|
+
background = _ref36.background,
|
|
5439
|
+
_ref36$padding = _ref36.padding,
|
|
5440
|
+
padding = _ref36$padding === void 0 ? '0px' : _ref36$padding,
|
|
5441
|
+
borderRadius = _ref36.borderRadius,
|
|
5442
|
+
optionColor = _ref36.optionColor,
|
|
5443
|
+
optionFontSize = _ref36.optionFontSize,
|
|
5444
|
+
optionFontWeight = _ref36.optionFontWeight,
|
|
5445
|
+
optionBackgroundColor = _ref36.optionBackgroundColor,
|
|
5446
|
+
menuBackground = _ref36.menuBackground,
|
|
5447
|
+
optionsBorderRadius = _ref36.optionsBorderRadius,
|
|
5448
|
+
color = _ref36.color,
|
|
5449
|
+
required = _ref36.required,
|
|
5450
|
+
_ref36$NoOptionsText = _ref36.NoOptionsText,
|
|
5451
|
+
NoOptionsText = _ref36$NoOptionsText === void 0 ? 'No Options Available' : _ref36$NoOptionsText,
|
|
5452
|
+
positionRef = _ref36.positionRef,
|
|
5453
|
+
fontStyle = _ref36.fontStyle,
|
|
5454
|
+
icon = _ref36.icon,
|
|
5455
|
+
_ref36$searchBox = _ref36.searchBox,
|
|
5456
|
+
searchBox = _ref36$searchBox === void 0 ? true : _ref36$searchBox,
|
|
5457
|
+
searchBoxBackground = _ref36.searchBoxBackground,
|
|
5458
|
+
searchBoxBorder = _ref36.searchBoxBorder,
|
|
5459
|
+
searchBoxBorderRadius = _ref36.searchBoxBorderRadius,
|
|
5460
|
+
searchIcon = _ref36.searchIcon,
|
|
5461
|
+
_ref36$placeholderTex = _ref36.placeholderText,
|
|
5462
|
+
placeholderText = _ref36$placeholderTex === void 0 ? 'Search...' : _ref36$placeholderTex,
|
|
5463
|
+
_ref36$iconColor = _ref36.iconColor,
|
|
5464
|
+
iconColor = _ref36$iconColor === void 0 ? colorVariables.text.medium : _ref36$iconColor,
|
|
5465
|
+
placeholderColor = _ref36.placeholderColor,
|
|
5466
|
+
inputColor = _ref36.inputColor,
|
|
5467
|
+
_ref36$iconSize = _ref36.iconSize,
|
|
5468
|
+
iconSize = _ref36$iconSize === void 0 ? 16 : _ref36$iconSize,
|
|
5469
|
+
_ref36$allowDeselect = _ref36.allowDeselect,
|
|
5470
|
+
allowDeselect = _ref36$allowDeselect === void 0 ? true : _ref36$allowDeselect,
|
|
5471
|
+
titleRightNode = _ref36.titleRightNode;
|
|
5431
5472
|
var _useState = React.useState(false),
|
|
5432
5473
|
dropUp = _useState[0],
|
|
5433
5474
|
setDropUp = _useState[1];
|
|
@@ -5716,6 +5757,10 @@ var useNotification = function useNotification() {
|
|
|
5716
5757
|
};
|
|
5717
5758
|
};
|
|
5718
5759
|
|
|
5760
|
+
var useTheme = function useTheme() {
|
|
5761
|
+
return styled.useTheme();
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5719
5764
|
var _templateObject$e, _templateObject2$b;
|
|
5720
5765
|
var SearchContainer$2 = styled__default.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) {
|
|
5721
5766
|
var $background = _ref.$background;
|
|
@@ -7358,4 +7403,5 @@ exports.timeStringToSeconds = timeStringToSeconds;
|
|
|
7358
7403
|
exports.useClickOutside = useClickOutside;
|
|
7359
7404
|
exports.useCustomModal = useCustomModal;
|
|
7360
7405
|
exports.useNotification = useNotification;
|
|
7406
|
+
exports.useTheme = useTheme;
|
|
7361
7407
|
//# sourceMappingURL=index.js.map
|