labsense-ui-kit 1.1.82 → 1.1.84
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/index.d.ts +2 -2
- package/dist/index.js +154 -153
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +155 -153
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -4839,8 +4839,144 @@ var OptionComponent = function OptionComponent(_ref9) {
|
|
|
4839
4839
|
}, NoOptionsText))));
|
|
4840
4840
|
};
|
|
4841
4841
|
|
|
4842
|
-
var
|
|
4843
|
-
var
|
|
4842
|
+
var useClickOutside = function useClickOutside(elRef, elCallback) {
|
|
4843
|
+
var callbackRef = useRef(elCallback);
|
|
4844
|
+
callbackRef.current = elCallback;
|
|
4845
|
+
useEffect(function () {
|
|
4846
|
+
var handleClickOutside = function handleClickOutside(eve) {
|
|
4847
|
+
var _elRef$current;
|
|
4848
|
+
if (!(elRef !== null && elRef !== void 0 && (_elRef$current = elRef.current) !== null && _elRef$current !== void 0 && _elRef$current.contains(eve.target))) {
|
|
4849
|
+
callbackRef.current(eve);
|
|
4850
|
+
}
|
|
4851
|
+
};
|
|
4852
|
+
document.addEventListener('click', handleClickOutside, true);
|
|
4853
|
+
return function () {
|
|
4854
|
+
document.removeEventListener('click', handleClickOutside, true);
|
|
4855
|
+
};
|
|
4856
|
+
}, [elCallback, elRef]);
|
|
4857
|
+
};
|
|
4858
|
+
|
|
4859
|
+
var _templateObject$a, _templateObject2$7;
|
|
4860
|
+
var ModalOverlay = styled.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: NotoSans, sans-serif;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
|
|
4861
|
+
var ModalContainer = styled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 100vh;\n max-width: ", ";\n overflow: visible;\n"])), function (_ref) {
|
|
4862
|
+
var theme = _ref.theme;
|
|
4863
|
+
return theme.accent.light_1;
|
|
4864
|
+
}, function (_ref2) {
|
|
4865
|
+
var $maxWidth = _ref2.$maxWidth;
|
|
4866
|
+
return $maxWidth ? $maxWidth : '400px';
|
|
4867
|
+
});
|
|
4868
|
+
var Modal = function Modal(_ref3) {
|
|
4869
|
+
var isOpen = _ref3.isOpen,
|
|
4870
|
+
maxWidth = _ref3.maxWidth,
|
|
4871
|
+
children = _ref3.children;
|
|
4872
|
+
if (!isOpen) return null;
|
|
4873
|
+
return React.createElement(ModalOverlay, null, React.createElement(ModalContainer, {
|
|
4874
|
+
"$maxWidth": maxWidth,
|
|
4875
|
+
onClick: function onClick(e) {
|
|
4876
|
+
return e.stopPropagation();
|
|
4877
|
+
}
|
|
4878
|
+
}, children));
|
|
4879
|
+
};
|
|
4880
|
+
var useCustomModal = function useCustomModal(_ref4) {
|
|
4881
|
+
var maxWidth = _ref4.maxWidth;
|
|
4882
|
+
var _useState = useState(false),
|
|
4883
|
+
isOpen = _useState[0],
|
|
4884
|
+
setIsOpen = _useState[1];
|
|
4885
|
+
var createModal = function createModal(content) {
|
|
4886
|
+
return React.createElement(Modal, {
|
|
4887
|
+
isOpen: isOpen,
|
|
4888
|
+
maxWidth: maxWidth
|
|
4889
|
+
}, content);
|
|
4890
|
+
};
|
|
4891
|
+
return {
|
|
4892
|
+
setIsOpen: setIsOpen,
|
|
4893
|
+
createModal: createModal
|
|
4894
|
+
};
|
|
4895
|
+
};
|
|
4896
|
+
|
|
4897
|
+
var useNotification = function useNotification() {
|
|
4898
|
+
var sendNotification = function sendNotification(_ref) {
|
|
4899
|
+
var type = _ref.type,
|
|
4900
|
+
message = _ref.message,
|
|
4901
|
+
promiseConfig = _ref.promiseConfig,
|
|
4902
|
+
customStyle = _ref.customStyle,
|
|
4903
|
+
_ref$clearCurrent = _ref.clearCurrent,
|
|
4904
|
+
clearCurrent = _ref$clearCurrent === void 0 ? false : _ref$clearCurrent;
|
|
4905
|
+
if (clearCurrent) {
|
|
4906
|
+
toast.dismiss();
|
|
4907
|
+
}
|
|
4908
|
+
switch (type) {
|
|
4909
|
+
case 'success':
|
|
4910
|
+
toast.success(message);
|
|
4911
|
+
break;
|
|
4912
|
+
case 'error':
|
|
4913
|
+
toast.error(message);
|
|
4914
|
+
break;
|
|
4915
|
+
case 'info':
|
|
4916
|
+
toast(message, {
|
|
4917
|
+
icon: React.createElement(Container, {
|
|
4918
|
+
"$minWidth": '20px',
|
|
4919
|
+
"$height": '20px',
|
|
4920
|
+
"$width": '20px',
|
|
4921
|
+
"$alignItems": 'center',
|
|
4922
|
+
"$justifyContent": 'center',
|
|
4923
|
+
"$borderRadius": '100%',
|
|
4924
|
+
"$background": colorVariables.disabled.info
|
|
4925
|
+
}, React.createElement(Icon, {
|
|
4926
|
+
icon: 'InformationFilled',
|
|
4927
|
+
weight: '0px',
|
|
4928
|
+
size: 20,
|
|
4929
|
+
color: colorVariables["default"].info
|
|
4930
|
+
})),
|
|
4931
|
+
style: {
|
|
4932
|
+
borderRadius: '8px',
|
|
4933
|
+
background: colorVariables.text.white,
|
|
4934
|
+
color: '#363636',
|
|
4935
|
+
maxWidth: '648px'
|
|
4936
|
+
}
|
|
4937
|
+
});
|
|
4938
|
+
break;
|
|
4939
|
+
case 'promise':
|
|
4940
|
+
if (promiseConfig) {
|
|
4941
|
+
toast.promise(promiseConfig.promise, {
|
|
4942
|
+
loading: promiseConfig.loading,
|
|
4943
|
+
success: promiseConfig.success,
|
|
4944
|
+
error: promiseConfig.error
|
|
4945
|
+
}, {
|
|
4946
|
+
style: {
|
|
4947
|
+
minWidth: '300px'
|
|
4948
|
+
}
|
|
4949
|
+
});
|
|
4950
|
+
}
|
|
4951
|
+
break;
|
|
4952
|
+
case 'custom':
|
|
4953
|
+
toast(message, {
|
|
4954
|
+
icon: React.createElement(Icon, {
|
|
4955
|
+
icon: (customStyle === null || customStyle === void 0 ? void 0 : customStyle.icon) || 'Add_1',
|
|
4956
|
+
size: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconSize,
|
|
4957
|
+
weight: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconWeight
|
|
4958
|
+
}),
|
|
4959
|
+
style: {
|
|
4960
|
+
background: customStyle === null || customStyle === void 0 ? void 0 : customStyle.background,
|
|
4961
|
+
color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
|
|
4962
|
+
}
|
|
4963
|
+
});
|
|
4964
|
+
break;
|
|
4965
|
+
default:
|
|
4966
|
+
console.error('Invalid notification type or missing configuration!');
|
|
4967
|
+
}
|
|
4968
|
+
};
|
|
4969
|
+
return {
|
|
4970
|
+
sendNotification: sendNotification
|
|
4971
|
+
};
|
|
4972
|
+
};
|
|
4973
|
+
|
|
4974
|
+
var useTheme = function useTheme() {
|
|
4975
|
+
return useTheme$1();
|
|
4976
|
+
};
|
|
4977
|
+
|
|
4978
|
+
var _templateObject$b, _templateObject2$8, _templateObject3$5, _templateObject4$4, _templateObject5$4, _templateObject6$4, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2;
|
|
4979
|
+
var DropdownContainer = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n max-width: 100%;\n position: relative;\n max-height: ", ";\n"])), function (_ref) {
|
|
4844
4980
|
var $width = _ref.$width;
|
|
4845
4981
|
return $width || '100%';
|
|
4846
4982
|
}, function (_ref2) {
|
|
@@ -4850,7 +4986,7 @@ var DropdownContainer = styled.div(_templateObject$a || (_templateObject$a = _ta
|
|
|
4850
4986
|
var $replaceLabel = _ref3.$replaceLabel;
|
|
4851
4987
|
return $replaceLabel ? 'calc(100% - 22px)' : '';
|
|
4852
4988
|
});
|
|
4853
|
-
var DropdownButton = styled.div(_templateObject2$
|
|
4989
|
+
var DropdownButton = styled.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n overflow: ", ";\n padding: ", ";\n gap: 8px;\n box-sizing: border-box;\n transition: all 0.3s ease;\n width: ", ";\n height: ", ";\n border: ", ";\n border-radius: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: ", ";\n background: ", ";\n color: ", ";\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-size: ", ";\n line-height: ", ";\n"])), function (_ref4) {
|
|
4854
4990
|
var $replaceLabel = _ref4.$replaceLabel;
|
|
4855
4991
|
return $replaceLabel ? 'auto' : '';
|
|
4856
4992
|
}, function (_ref5) {
|
|
@@ -5056,8 +5192,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5056
5192
|
var title = _ref31.title,
|
|
5057
5193
|
titleWeight = _ref31.titleWeight,
|
|
5058
5194
|
titleSize = _ref31.titleSize,
|
|
5059
|
-
|
|
5060
|
-
titleColor = _ref31$titleColor === void 0 ? colorVariables.text.dark : _ref31$titleColor,
|
|
5195
|
+
titleColor = _ref31.titleColor,
|
|
5061
5196
|
_ref31$labelText = _ref31.labelText,
|
|
5062
5197
|
labelText = _ref31$labelText === void 0 ? 'Select Cameras' : _ref31$labelText,
|
|
5063
5198
|
labelStyle = _ref31.labelStyle,
|
|
@@ -5070,8 +5205,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5070
5205
|
height = _ref31.height,
|
|
5071
5206
|
placeholder = _ref31.placeholder,
|
|
5072
5207
|
border = _ref31.border,
|
|
5073
|
-
|
|
5074
|
-
background = _ref31$background === void 0 ? colorVariables["default"].tertiary : _ref31$background,
|
|
5208
|
+
background = _ref31.background,
|
|
5075
5209
|
selectedOptionBackground = _ref31.selectedOptionBackground,
|
|
5076
5210
|
selectedOptionColor = _ref31.selectedOptionColor,
|
|
5077
5211
|
_ref31$menuBackground = _ref31.menuBackground,
|
|
@@ -5101,6 +5235,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5101
5235
|
searchBox = _ref31$searchBox === void 0 ? true : _ref31$searchBox,
|
|
5102
5236
|
_ref31$NoOptionsText = _ref31.NoOptionsText,
|
|
5103
5237
|
NoOptionsText = _ref31$NoOptionsText === void 0 ? 'No Options Available' : _ref31$NoOptionsText;
|
|
5238
|
+
var themeColors = useTheme();
|
|
5104
5239
|
var _useState = useState(false),
|
|
5105
5240
|
isOpen = _useState[0],
|
|
5106
5241
|
setIsOpen = _useState[1];
|
|
@@ -5134,7 +5269,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5134
5269
|
}
|
|
5135
5270
|
};
|
|
5136
5271
|
return React.createElement(Container$2, null, title && React.createElement(TitleText, {
|
|
5137
|
-
"$titleColor": titleColor,
|
|
5272
|
+
"$titleColor": titleColor || themeColors.text.dark,
|
|
5138
5273
|
"$titleSize": titleSize,
|
|
5139
5274
|
"$size": size,
|
|
5140
5275
|
"$titleWeight": titleWeight
|
|
@@ -5148,7 +5283,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5148
5283
|
"$height": height,
|
|
5149
5284
|
"$width": width,
|
|
5150
5285
|
"$border": border,
|
|
5151
|
-
"$background": background,
|
|
5286
|
+
"$background": background || themeColors["default"].tertiary,
|
|
5152
5287
|
"$borderRadius": borderRadius,
|
|
5153
5288
|
"$size": size,
|
|
5154
5289
|
"$color": labelColor,
|
|
@@ -5172,21 +5307,21 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5172
5307
|
}, React.createElement(Icon, {
|
|
5173
5308
|
icon: 'Close',
|
|
5174
5309
|
size: (removeIcon === null || removeIcon === void 0 ? void 0 : removeIcon.size) || 6,
|
|
5175
|
-
color: removeIcon !== null && removeIcon !== void 0 && removeIcon.color || type === 'remove' ?
|
|
5310
|
+
color: removeIcon !== null && removeIcon !== void 0 && removeIcon.color || type === 'remove' ? themeColors["default"].error : themeColors.brand.primary,
|
|
5176
5311
|
weight: (removeIcon === null || removeIcon === void 0 ? void 0 : removeIcon.weight) || '0'
|
|
5177
5312
|
})));
|
|
5178
5313
|
})) : React.createElement(TextWrapper, null, icon && React.createElement(Icon, {
|
|
5179
5314
|
icon: icon.name || 'Tag',
|
|
5180
5315
|
size: icon.size || 14,
|
|
5181
5316
|
weight: icon.weight || '1',
|
|
5182
|
-
color: icon.color ||
|
|
5317
|
+
color: icon.color || themeColors.text.medium
|
|
5183
5318
|
}), React.createElement(LabelText, {
|
|
5184
5319
|
"$labelStyle": labelStyle
|
|
5185
5320
|
}, labelText)), React.createElement(Icon, {
|
|
5186
5321
|
icon: isOpen ? 'UpArrow' : 'DownArrow',
|
|
5187
5322
|
size: 7,
|
|
5188
5323
|
weight: '2px',
|
|
5189
|
-
color:
|
|
5324
|
+
color: themeColors.text.medium
|
|
5190
5325
|
})), isOpen && React.createElement(DropdownMenu, {
|
|
5191
5326
|
"$width": optionWidth,
|
|
5192
5327
|
"$menuBackground": menuBackground,
|
|
@@ -5201,7 +5336,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5201
5336
|
optionColor: optionColor,
|
|
5202
5337
|
searchIcon: searchIcon,
|
|
5203
5338
|
searchbarTextColor: searchbarTextColor,
|
|
5204
|
-
searchBoxBorder: searchBoxBorder || "1px solid " +
|
|
5339
|
+
searchBoxBorder: searchBoxBorder || "1px solid " + themeColors.border.light,
|
|
5205
5340
|
searchBoxBorderRadius: searchBoxBorderRadius || '0px',
|
|
5206
5341
|
searchBoxBackground: searchBoxBackground,
|
|
5207
5342
|
searchBox: searchBox,
|
|
@@ -5209,9 +5344,9 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref31) {
|
|
|
5209
5344
|
}))));
|
|
5210
5345
|
};
|
|
5211
5346
|
|
|
5212
|
-
var _templateObject$
|
|
5213
|
-
var SelectedOptionsWrapper$1 = styled.div(_templateObject$
|
|
5214
|
-
var SelectedOptionDiv$1 = styled.div(_templateObject2$
|
|
5347
|
+
var _templateObject$c, _templateObject2$9, _templateObject3$6;
|
|
5348
|
+
var SelectedOptionsWrapper$1 = styled.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n"])));
|
|
5349
|
+
var SelectedOptionDiv$1 = styled.div(_templateObject2$9 || (_templateObject2$9 = _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 (_ref) {
|
|
5215
5350
|
var $selectedOptionBackground = _ref.$selectedOptionBackground,
|
|
5216
5351
|
$type = _ref.$type,
|
|
5217
5352
|
theme = _ref.theme;
|
|
@@ -5274,8 +5409,8 @@ var SelectedOption = function SelectedOption(_ref4) {
|
|
|
5274
5409
|
}));
|
|
5275
5410
|
};
|
|
5276
5411
|
|
|
5277
|
-
var _templateObject$
|
|
5278
|
-
var TitleText$1 = styled.label(_templateObject$
|
|
5412
|
+
var _templateObject$d, _templateObject2$a, _templateObject3$7, _templateObject4$5, _templateObject5$5, _templateObject6$5, _templateObject7$3, _templateObject8$3, _templateObject9$3, _templateObject10$3;
|
|
5413
|
+
var TitleText$1 = styled.label(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: relative;\n width: max-content;\n white-space: nowrap;\n font-weight: ", ";\n ", "\n\n color: ", ";\n"])), function (_ref) {
|
|
5279
5414
|
var $titleWeight = _ref.$titleWeight;
|
|
5280
5415
|
return $titleWeight || 500;
|
|
5281
5416
|
}, function (_ref2) {
|
|
@@ -5314,7 +5449,7 @@ var TitleText$1 = styled.label(_templateObject$c || (_templateObject$c = _tagged
|
|
|
5314
5449
|
return $titlecolor;
|
|
5315
5450
|
}
|
|
5316
5451
|
});
|
|
5317
|
-
var DropdownContainer$1 = styled.div(_templateObject2$
|
|
5452
|
+
var DropdownContainer$1 = styled.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n width: ", ";\n max-width: 100%;\n position: relative;\n gap: 8px;\n display: flex;\n"])), function (_ref4) {
|
|
5318
5453
|
var $width = _ref4.$width;
|
|
5319
5454
|
return $width || '100%';
|
|
5320
5455
|
});
|
|
@@ -5676,139 +5811,6 @@ var SelectOption = function SelectOption(_ref36) {
|
|
|
5676
5811
|
}) : React.createElement(NoOptions, null, NoOptionsText)))));
|
|
5677
5812
|
};
|
|
5678
5813
|
|
|
5679
|
-
var useClickOutside = function useClickOutside(elRef, elCallback) {
|
|
5680
|
-
var callbackRef = useRef(elCallback);
|
|
5681
|
-
callbackRef.current = elCallback;
|
|
5682
|
-
useEffect(function () {
|
|
5683
|
-
var handleClickOutside = function handleClickOutside(eve) {
|
|
5684
|
-
var _elRef$current;
|
|
5685
|
-
if (!(elRef !== null && elRef !== void 0 && (_elRef$current = elRef.current) !== null && _elRef$current !== void 0 && _elRef$current.contains(eve.target))) {
|
|
5686
|
-
callbackRef.current(eve);
|
|
5687
|
-
}
|
|
5688
|
-
};
|
|
5689
|
-
document.addEventListener('click', handleClickOutside, true);
|
|
5690
|
-
return function () {
|
|
5691
|
-
document.removeEventListener('click', handleClickOutside, true);
|
|
5692
|
-
};
|
|
5693
|
-
}, [elCallback, elRef]);
|
|
5694
|
-
};
|
|
5695
|
-
|
|
5696
|
-
var _templateObject$d, _templateObject2$a;
|
|
5697
|
-
var ModalOverlay = styled.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: NotoSans, sans-serif;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
|
|
5698
|
-
var ModalContainer = styled.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 100vh;\n max-width: ", ";\n overflow: visible;\n"])), colorVariables.accent.light_1, function (_ref) {
|
|
5699
|
-
var $maxWidth = _ref.$maxWidth;
|
|
5700
|
-
return $maxWidth ? $maxWidth : '400px';
|
|
5701
|
-
});
|
|
5702
|
-
var Modal = function Modal(_ref2) {
|
|
5703
|
-
var isOpen = _ref2.isOpen,
|
|
5704
|
-
maxWidth = _ref2.maxWidth,
|
|
5705
|
-
children = _ref2.children;
|
|
5706
|
-
if (!isOpen) return null;
|
|
5707
|
-
return React.createElement(ModalOverlay, null, React.createElement(ModalContainer, {
|
|
5708
|
-
"$maxWidth": maxWidth,
|
|
5709
|
-
onClick: function onClick(e) {
|
|
5710
|
-
return e.stopPropagation();
|
|
5711
|
-
}
|
|
5712
|
-
}, children));
|
|
5713
|
-
};
|
|
5714
|
-
var useCustomModal = function useCustomModal(_ref3) {
|
|
5715
|
-
var maxWidth = _ref3.maxWidth;
|
|
5716
|
-
var _useState = useState(false),
|
|
5717
|
-
isOpen = _useState[0],
|
|
5718
|
-
setIsOpen = _useState[1];
|
|
5719
|
-
var createModal = function createModal(content) {
|
|
5720
|
-
return React.createElement(Modal, {
|
|
5721
|
-
isOpen: isOpen,
|
|
5722
|
-
maxWidth: maxWidth
|
|
5723
|
-
}, content);
|
|
5724
|
-
};
|
|
5725
|
-
return {
|
|
5726
|
-
setIsOpen: setIsOpen,
|
|
5727
|
-
createModal: createModal
|
|
5728
|
-
};
|
|
5729
|
-
};
|
|
5730
|
-
|
|
5731
|
-
var useNotification = function useNotification() {
|
|
5732
|
-
var sendNotification = function sendNotification(_ref) {
|
|
5733
|
-
var type = _ref.type,
|
|
5734
|
-
message = _ref.message,
|
|
5735
|
-
promiseConfig = _ref.promiseConfig,
|
|
5736
|
-
customStyle = _ref.customStyle,
|
|
5737
|
-
_ref$clearCurrent = _ref.clearCurrent,
|
|
5738
|
-
clearCurrent = _ref$clearCurrent === void 0 ? false : _ref$clearCurrent;
|
|
5739
|
-
if (clearCurrent) {
|
|
5740
|
-
toast.dismiss();
|
|
5741
|
-
}
|
|
5742
|
-
switch (type) {
|
|
5743
|
-
case 'success':
|
|
5744
|
-
toast.success(message);
|
|
5745
|
-
break;
|
|
5746
|
-
case 'error':
|
|
5747
|
-
toast.error(message);
|
|
5748
|
-
break;
|
|
5749
|
-
case 'info':
|
|
5750
|
-
toast(message, {
|
|
5751
|
-
icon: React.createElement(Container, {
|
|
5752
|
-
"$minWidth": '20px',
|
|
5753
|
-
"$height": '20px',
|
|
5754
|
-
"$width": '20px',
|
|
5755
|
-
"$alignItems": 'center',
|
|
5756
|
-
"$justifyContent": 'center',
|
|
5757
|
-
"$borderRadius": '100%',
|
|
5758
|
-
"$background": colorVariables.disabled.info
|
|
5759
|
-
}, React.createElement(Icon, {
|
|
5760
|
-
icon: 'InformationFilled',
|
|
5761
|
-
weight: '0px',
|
|
5762
|
-
size: 20,
|
|
5763
|
-
color: colorVariables["default"].info
|
|
5764
|
-
})),
|
|
5765
|
-
style: {
|
|
5766
|
-
borderRadius: '8px',
|
|
5767
|
-
background: colorVariables.text.white,
|
|
5768
|
-
color: '#363636',
|
|
5769
|
-
maxWidth: '648px'
|
|
5770
|
-
}
|
|
5771
|
-
});
|
|
5772
|
-
break;
|
|
5773
|
-
case 'promise':
|
|
5774
|
-
if (promiseConfig) {
|
|
5775
|
-
toast.promise(promiseConfig.promise, {
|
|
5776
|
-
loading: promiseConfig.loading,
|
|
5777
|
-
success: promiseConfig.success,
|
|
5778
|
-
error: promiseConfig.error
|
|
5779
|
-
}, {
|
|
5780
|
-
style: {
|
|
5781
|
-
minWidth: '300px'
|
|
5782
|
-
}
|
|
5783
|
-
});
|
|
5784
|
-
}
|
|
5785
|
-
break;
|
|
5786
|
-
case 'custom':
|
|
5787
|
-
toast(message, {
|
|
5788
|
-
icon: React.createElement(Icon, {
|
|
5789
|
-
icon: (customStyle === null || customStyle === void 0 ? void 0 : customStyle.icon) || 'Add_1',
|
|
5790
|
-
size: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconSize,
|
|
5791
|
-
weight: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconWeight
|
|
5792
|
-
}),
|
|
5793
|
-
style: {
|
|
5794
|
-
background: customStyle === null || customStyle === void 0 ? void 0 : customStyle.background,
|
|
5795
|
-
color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
|
|
5796
|
-
}
|
|
5797
|
-
});
|
|
5798
|
-
break;
|
|
5799
|
-
default:
|
|
5800
|
-
console.error('Invalid notification type or missing configuration!');
|
|
5801
|
-
}
|
|
5802
|
-
};
|
|
5803
|
-
return {
|
|
5804
|
-
sendNotification: sendNotification
|
|
5805
|
-
};
|
|
5806
|
-
};
|
|
5807
|
-
|
|
5808
|
-
var useTheme = function useTheme() {
|
|
5809
|
-
return useTheme$1();
|
|
5810
|
-
};
|
|
5811
|
-
|
|
5812
5814
|
var _templateObject$e, _templateObject2$b;
|
|
5813
5815
|
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: ", ";\n }\n"])), function (_ref) {
|
|
5814
5816
|
var $background = _ref.$background,
|
|
@@ -7508,5 +7510,5 @@ var InternalTabs = function InternalTabs(_ref) {
|
|
|
7508
7510
|
}));
|
|
7509
7511
|
};
|
|
7510
7512
|
|
|
7511
|
-
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,
|
|
7513
|
+
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, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCustomModal, useNotification, useTheme };
|
|
7512
7514
|
//# sourceMappingURL=index.modern.js.map
|