mimir-ui-kit 1.27.3 → 1.27.4

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.
@@ -89,7 +89,7 @@ const Steps = forwardRef(
89
89
  const handleMouseLeave = () => {
90
90
  setHoveredStep(null);
91
91
  onStepMouseLeave && onStepMouseLeave();
92
- const zone = zones.find((zone2) => zone2.to >= (step2 + 1 || 0));
92
+ const zone = zones.find((zone2) => zone2.to >= (step2 || 0));
93
93
  if (zone) {
94
94
  setParentColor && setParentColor(zone.color);
95
95
  if (fillByActualZone) {
@@ -60,6 +60,18 @@ const Vote = forwardRef((props, ref) => {
60
60
  setHoveredScore(null);
61
61
  };
62
62
  const maxContainerWidth = resizable ? quantity * ((customSize == null ? void 0 : customSize.width) ?? StepSize[size].width) : void 0;
63
+ let showingScore;
64
+ let showingScoreBackground;
65
+ let showingScoreColor;
66
+ if (hoveredScore) {
67
+ showingScore = hoveredScore;
68
+ showingScoreBackground = currentColor;
69
+ showingScoreColor = scoreTextColor.selected;
70
+ } else {
71
+ showingScore = isZeroStep ? ZERO_VALUE : score2;
72
+ showingScoreBackground = isZeroStep ? unselectedColor : currentColor;
73
+ showingScoreColor = isZeroStep ? scoreTextColor.unselected : scoreTextColor.selected;
74
+ }
63
75
  return /* @__PURE__ */ jsxs("div", { className: classNames(cls.container, rootClassName), ref, children: [
64
76
  !withoutTitle && /* @__PURE__ */ jsx("p", { className: classNames(cls.title, titleClassName), children: title2 }),
65
77
  /* @__PURE__ */ jsx(
@@ -67,10 +79,10 @@ const Vote = forwardRef((props, ref) => {
67
79
  {
68
80
  className: classNames(cls.score, scoreClassName),
69
81
  style: {
70
- backgroundColor: isZeroStep ? unselectedColor : currentColor,
71
- color: isZeroStep ? scoreTextColor.unselected : scoreTextColor.selected
82
+ backgroundColor: showingScoreBackground,
83
+ color: showingScoreColor
72
84
  },
73
- children: isZeroStep ? ZERO_VALUE : hoveredScore || score2
85
+ children: showingScore
74
86
  }
75
87
  ),
76
88
  /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.27.3",
4
+ "version": "1.27.4",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {