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.
@@ -6813,73 +6813,71 @@ var useNotification = function useNotification() {
6813
6813
  if (clearCurrent) {
6814
6814
  toast.remove();
6815
6815
  }
6816
- toast.remove(toastId);
6817
- Promise.resolve().then(function () {
6818
- switch (type) {
6819
- case 'success':
6820
- toast.success(message, {
6821
- id: toastId
6822
- });
6823
- break;
6824
- case 'error':
6825
- toast.error(message, {
6826
- id: toastId
6827
- });
6828
- break;
6829
- case 'info':
6830
- toast(message, {
6831
- id: toastId,
6832
- icon: React.createElement(Container, {
6833
- "$minWidth": '20px',
6834
- "$height": '20px',
6835
- "$width": '20px',
6836
- "$alignItems": 'center',
6837
- "$justifyContent": 'center',
6838
- "$borderRadius": '100%',
6839
- "$background": themeColors.vms.disabled.info
6840
- }, React.createElement(Icon, {
6841
- icon: 'InformationFilled',
6842
- size: 20,
6843
- color: themeColors.vms["default"].info
6844
- })),
6845
- style: {
6846
- borderRadius: '8px',
6847
- background: themeColors.vms.text.white,
6848
- color: themeColors.vms.text.dark,
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
- break;
6867
- case 'custom':
6868
- toast(message, {
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
- background: customStyle === null || customStyle === void 0 ? void 0 : customStyle.background,
6877
- color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
6861
+ minWidth: '300px'
6878
6862
  }
6879
6863
  });
6880
- break;
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