@designa8/vibedesign-nestora-ds-v1-176b 0.2.4 → 0.2.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-nestora-ds-v1-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.2.4**.
3
+ Complete design system generated by Atoms Design, version **0.2.5**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -5771,7 +5771,7 @@ var Rating = React45.forwardRef(
5771
5771
  const shown = hovered > 0 ? hovered : Math.min(Math.max(value, 0), starCount);
5772
5772
  const focusIndex = Math.min(Math.max(Math.round(value), 1), starCount);
5773
5773
  const countText = formatNumber(count);
5774
- const fillFor = (index) => clampPercent(shown - index) / 100;
5774
+ const fillFor = (index) => Math.min(Math.max(shown - index, 0), 1);
5775
5775
  const handleKey = (event) => {
5776
5776
  const current = Math.max(1, Math.round(value));
5777
5777
  let next = current;
package/dist/index.js CHANGED
@@ -5646,7 +5646,7 @@ var Rating = React45.forwardRef(
5646
5646
  const shown = hovered > 0 ? hovered : Math.min(Math.max(value, 0), starCount);
5647
5647
  const focusIndex = Math.min(Math.max(Math.round(value), 1), starCount);
5648
5648
  const countText = formatNumber(count);
5649
- const fillFor = (index) => clampPercent(shown - index) / 100;
5649
+ const fillFor = (index) => Math.min(Math.max(shown - index, 0), 1);
5650
5650
  const handleKey = (event) => {
5651
5651
  const current = Math.max(1, Math.round(value));
5652
5652
  let next = current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-nestora-ds-v1-176b",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Design system generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -148,7 +148,13 @@ export const Rating = React.forwardRef<HTMLDivElement, RatingProps>(
148
148
  const focusIndex = Math.min(Math.max(Math.round(value), 1), starCount);
149
149
  const countText = formatNumber(count);
150
150
 
151
- const fillFor = (index: number) => clampPercent(shown - index) / 100;
151
+ /**
152
+ * Share of one star that is filled, 0–1.
153
+ * `shown - index` is a star count (4.8 at index 0 leaves 3.8), so the
154
+ * leftover is clamped to a single glyph — 1 full star, 0.8 partial, 0 empty.
155
+ */
156
+ const fillFor = (index: number) =>
157
+ Math.min(Math.max(shown - index, 0), 1);
152
158
 
153
159
  const handleKey = (event: React.KeyboardEvent<HTMLButtonElement>) => {
154
160
  const current = Math.max(1, Math.round(value));
@@ -24,7 +24,11 @@ export default function Preview() {
24
24
 
25
25
  <div className="flex flex-col gap-sm">
26
26
  <span className="text-caption text-muted">Partial</span>
27
- <Rating value={3.5} readOnly />
27
+ <div className="flex flex-wrap items-center gap-lg">
28
+ <Rating value={3.5} readOnly />
29
+ <Rating value={4.8} readOnly />
30
+ <Rating value={4.8} size="sm" readOnly />
31
+ </div>
28
32
  </div>
29
33
 
30
34
  <div className="flex flex-col gap-sm">
@@ -50,7 +54,7 @@ export default function Preview() {
50
54
 
51
55
  <div className="flex flex-col gap-sm">
52
56
  <span className="text-caption text-muted">Large score with breakdown</span>
53
- <Rating variant="summary" value={4.92} readOnly breakdown={BREAKDOWN} />
57
+ <Rating variant="summary" value={4.8} readOnly breakdown={BREAKDOWN} />
54
58
  </div>
55
59
 
56
60
  <div className="flex flex-col gap-sm">