@yh-ui/theme 1.0.53 → 1.0.55

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/theme.cjs CHANGED
@@ -801,6 +801,8 @@ class ThemeManager {
801
801
  Object.entries(semanticColors).forEach(([state, value]) => {
802
802
  styles[`--yh-color-${cssVar}-${state}`] = value;
803
803
  });
804
+ const textContrastColor = getTextColorForBackground(baseColor);
805
+ styles[`--yh-color-${cssVar}-text`] = textContrastColor;
804
806
  const rgb = hexToRgb(baseColor);
805
807
  if (rgb) {
806
808
  styles[`--yh-color-${cssVar}-rgb`] = `${rgb.r}, ${rgb.g}, ${rgb.b}`;
package/dist/theme.mjs CHANGED
@@ -719,6 +719,8 @@ export class ThemeManager {
719
719
  Object.entries(semanticColors).forEach(([state, value]) => {
720
720
  styles[`--yh-color-${cssVar}-${state}`] = value;
721
721
  });
722
+ const textContrastColor = getTextColorForBackground(baseColor);
723
+ styles[`--yh-color-${cssVar}-text`] = textContrastColor;
722
724
  const rgb = hexToRgb(baseColor);
723
725
  if (rgb) {
724
726
  styles[`--yh-color-${cssVar}-rgb`] = `${rgb.r}, ${rgb.g}, ${rgb.b}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yh-ui/theme",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "YH-UI theme and design tokens",
5
5
  "type": "module",
6
6
  "sideEffects": [