@waggylabs/yumekit 0.4.0-beta.26 → 0.4.0-beta.27

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.
@@ -1,3 +1,5 @@
1
+ import { contrastTextColor } from '../modules/helpers.js';
2
+
1
3
  class YumeBadge extends HTMLElement {
2
4
  static get observedAttributes() {
3
5
  return ["value", "position", "alignment", "color", "size"];
@@ -69,7 +71,7 @@ class YumeBadge extends HTMLElement {
69
71
  error: ["var(--error-content--)", "var(--error-content-inverse)"],
70
72
  help: ["var(--help-content--)", "var(--help-content-inverse)"],
71
73
  };
72
- return colorMap[color] || [color, "var(--neutral-white, #fff)"];
74
+ return colorMap[color] || [color, contrastTextColor(color)];
73
75
  }
74
76
 
75
77
  getBadgePosition(position, alignment) {
package/dist/index.js CHANGED
@@ -2740,7 +2740,7 @@ class YumeBadge extends HTMLElement {
2740
2740
  error: ["var(--error-content--)", "var(--error-content-inverse)"],
2741
2741
  help: ["var(--help-content--)", "var(--help-content-inverse)"],
2742
2742
  };
2743
- return colorMap[color] || [color, "var(--neutral-white, #fff)"];
2743
+ return colorMap[color] || [color, contrastTextColor(color)];
2744
2744
  }
2745
2745
 
2746
2746
  getBadgePosition(position, alignment) {