labsense-ui-kit 1.3.86 → 1.3.87
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.js +60 -62
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6813,73 +6813,71 @@ var useNotification = function useNotification() {
|
|
|
6813
6813
|
if (clearCurrent) {
|
|
6814
6814
|
toast.remove();
|
|
6815
6815
|
}
|
|
6816
|
-
toast.
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
maxWidth: '648px'
|
|
6850
|
-
}
|
|
6851
|
-
});
|
|
6852
|
-
break;
|
|
6853
|
-
case 'promise':
|
|
6854
|
-
if (promiseConfig) {
|
|
6855
|
-
toast.promise(promiseConfig.promise, {
|
|
6856
|
-
loading: promiseConfig.loading,
|
|
6857
|
-
success: promiseConfig.success,
|
|
6858
|
-
error: promiseConfig.error
|
|
6859
|
-
}, {
|
|
6860
|
-
id: toastId,
|
|
6861
|
-
style: {
|
|
6862
|
-
minWidth: '300px'
|
|
6863
|
-
}
|
|
6864
|
-
});
|
|
6816
|
+
toast.dismiss(toastId);
|
|
6817
|
+
switch (type) {
|
|
6818
|
+
case 'success':
|
|
6819
|
+
toast.success(message, {
|
|
6820
|
+
id: toastId
|
|
6821
|
+
});
|
|
6822
|
+
break;
|
|
6823
|
+
case 'error':
|
|
6824
|
+
toast.error(message, {
|
|
6825
|
+
id: toastId
|
|
6826
|
+
});
|
|
6827
|
+
break;
|
|
6828
|
+
case 'info':
|
|
6829
|
+
toast(message, {
|
|
6830
|
+
id: toastId,
|
|
6831
|
+
icon: React.createElement(Container, {
|
|
6832
|
+
"$minWidth": '20px',
|
|
6833
|
+
"$height": '20px',
|
|
6834
|
+
"$width": '20px',
|
|
6835
|
+
"$alignItems": 'center',
|
|
6836
|
+
"$justifyContent": 'center',
|
|
6837
|
+
"$borderRadius": '100%',
|
|
6838
|
+
"$background": themeColors.vms.disabled.info
|
|
6839
|
+
}, React.createElement(Icon, {
|
|
6840
|
+
icon: 'InformationFilled',
|
|
6841
|
+
size: 20,
|
|
6842
|
+
color: themeColors.vms["default"].info
|
|
6843
|
+
})),
|
|
6844
|
+
style: {
|
|
6845
|
+
borderRadius: '8px',
|
|
6846
|
+
background: themeColors.vms.text.white,
|
|
6847
|
+
color: themeColors.vms.text.dark,
|
|
6848
|
+
maxWidth: '648px'
|
|
6865
6849
|
}
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6850
|
+
});
|
|
6851
|
+
break;
|
|
6852
|
+
case 'promise':
|
|
6853
|
+
if (promiseConfig) {
|
|
6854
|
+
toast.promise(promiseConfig.promise, {
|
|
6855
|
+
loading: promiseConfig.loading,
|
|
6856
|
+
success: promiseConfig.success,
|
|
6857
|
+
error: promiseConfig.error
|
|
6858
|
+
}, {
|
|
6869
6859
|
id: toastId,
|
|
6870
|
-
icon: React.createElement(Icon, {
|
|
6871
|
-
icon: (customStyle === null || customStyle === void 0 ? void 0 : customStyle.icon) || 'Add_1',
|
|
6872
|
-
size: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconSize,
|
|
6873
|
-
weight: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconWeight
|
|
6874
|
-
}),
|
|
6875
6860
|
style: {
|
|
6876
|
-
|
|
6877
|
-
color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
|
|
6861
|
+
minWidth: '300px'
|
|
6878
6862
|
}
|
|
6879
6863
|
});
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6864
|
+
}
|
|
6865
|
+
break;
|
|
6866
|
+
case 'custom':
|
|
6867
|
+
toast(message, {
|
|
6868
|
+
id: toastId,
|
|
6869
|
+
icon: React.createElement(Icon, {
|
|
6870
|
+
icon: (customStyle === null || customStyle === void 0 ? void 0 : customStyle.icon) || 'Add_1',
|
|
6871
|
+
size: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconSize,
|
|
6872
|
+
weight: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconWeight
|
|
6873
|
+
}),
|
|
6874
|
+
style: {
|
|
6875
|
+
background: customStyle === null || customStyle === void 0 ? void 0 : customStyle.background,
|
|
6876
|
+
color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
|
|
6877
|
+
}
|
|
6878
|
+
});
|
|
6879
|
+
break;
|
|
6880
|
+
}
|
|
6883
6881
|
};
|
|
6884
6882
|
return {
|
|
6885
6883
|
sendNotification: sendNotification
|