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