@dloizides/ui-feedback 1.19.2 → 1.20.0

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.mjs CHANGED
@@ -761,11 +761,13 @@ var TOAST_TOP_WEB = APP_HEADER_HEIGHT + HEADER_GAP;
761
761
  var GLYPHS = {
762
762
  success: "\u2713",
763
763
  error: "!",
764
- info: "i"
764
+ info: "i",
765
+ warning: "\u25B2"
765
766
  };
766
767
  function scaleFor(theme, type) {
767
768
  if (type === "error") return theme.semantic.error;
768
769
  if (type === "success") return theme.semantic.success ?? theme.palette.primary;
770
+ if (type === "warning") return theme.semantic.warning ?? theme.palette.primary;
769
771
  return theme.palette.primary;
770
772
  }
771
773
  function readableInk(fill) {
@@ -917,7 +919,8 @@ var ToastHost = ({
917
919
  () => ({
918
920
  success: resolveToastTone(theme, "success"),
919
921
  error: resolveToastTone(theme, "error"),
920
- info: resolveToastTone(theme, "info")
922
+ info: resolveToastTone(theme, "info"),
923
+ warning: resolveToastTone(theme, "warning")
921
924
  }),
922
925
  [theme]
923
926
  );
@@ -1106,6 +1109,9 @@ function createToastBus() {
1106
1109
  },
1107
1110
  info(text) {
1108
1111
  emit2(text, "info");
1112
+ },
1113
+ warning(text) {
1114
+ emit2(text, "warning");
1109
1115
  }
1110
1116
  };
1111
1117
  }