@helloimjolopez-pathway/pathway-components 0.2.1 → 0.2.2

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.
@@ -398,8 +398,8 @@ export function Button({
398
398
  };
399
399
 
400
400
  // Icon slot wrapper, iconWrap = outer slot size, iconInner = rendered glyph size.
401
- // fontVariationSettings overrides the global opsz:24 from preview-head.html, // all button icon sizes (14 to 18px) sit below the minimum opsz axis value (20),
402
- // so opsz:20 is the correct optical size for the tightest stroke rendering.
401
+ // opsz 24, as Figma draws its icons, so the glyph fills the slot in Figma's
402
+ // proportion (changed 2026-11-03; opsz 20 drew it about 6% small).
403
403
  const iconWrapStyle = {
404
404
  display: "inline-flex",
405
405
  alignItems: "center",
@@ -410,7 +410,7 @@ export function Button({
410
410
  fontSize: sz.iconInner,
411
411
  color: iconColor,
412
412
  transition: "color var(--motion-duration-2) var(--motion-easing-standard)",
413
- fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20",
413
+ fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24",
414
414
  };
415
415
 
416
416
  // Outer button element, handles the touch-target zone
@@ -34,9 +34,12 @@
34
34
  * SideNav is FILL 1 throughout; the Widget header is FILL 0.
35
35
  * wght 400 everywhere in Pathway.
36
36
  * GRAD 0 everywhere in Pathway.
37
- * opsz matched to the font size, which is what keeps the stroke weight even
38
- * across sizes. A 16px icon at opsz 20 is visibly lighter than it
39
- * should be, and that defect shipped once in the SideNav rail.
37
+ * opsz 24 everywhere in Pathway (changed 2026-11-03). Figma's icons are the
38
+ * font's opsz-24 artwork scaled to each frame, so the glyph fills its
39
+ * box in the same proportion at every size. Tracking opsz to the frame
40
+ * (which the font clamps to 20 below 20px) redrew each glyph about 6%
41
+ * smaller inside the same box: a 16 help icon drew 12.5 against
42
+ * Figma's 13.33.
40
43
  *
41
44
  * SIZE IS THE FRAME, NEVER THE VECTOR. Figma nests a wrapper (24), an icon
42
45
  * frame (16) and the drawn vector (~12), because the Material grid has about
@@ -58,8 +61,8 @@ export const ICON_SOURCES = {
58
61
  webSymbols: "https://github.com/google/material-design-icons/tree/master/symbols/web",
59
62
  };
60
63
 
61
- /** Pathway's fixed axis values. Only FILL and opsz ever vary. */
62
- export const AXES = { wght: 400, GRAD: 0 };
64
+ /** Pathway's fixed axis values. Only FILL ever varies. */
65
+ export const AXES = { wght: 400, GRAD: 0, opsz: 24 };
63
66
 
64
67
  /**
65
68
  * The per-size table from docs/design-system-spec.md §7.2. `wrapper` is the
@@ -109,10 +112,9 @@ export function Icon({
109
112
  display: "block",
110
113
  flexShrink: 0,
111
114
  color,
112
- // opsz TRACKS THE FONT SIZE. Pinning it to 20 while the glyph renders
113
- // at 16 makes the stroke too light, which is what went wrong in the
114
- // collapsed SideNav rail.
115
- fontVariationSettings: `'FILL' ${fill}, 'wght' ${AXES.wght}, 'GRAD' ${AXES.GRAD}, 'opsz' ${frame}`,
115
+ // opsz is fixed at 24, Figma's artwork, so the glyph fills the frame
116
+ // exactly as it does in Figma. See AXES.
117
+ fontVariationSettings: `'FILL' ${fill}, 'wght' ${AXES.wght}, 'GRAD' ${AXES.GRAD}, 'opsz' ${AXES.opsz}`,
116
118
  ...style,
117
119
  }}
118
120
  {...rest}
@@ -276,10 +276,9 @@ export function SideNavItem({
276
276
  // parent is centred by its line box, not by its own art, so
277
277
  // it rode high inside the 24px wrap.
278
278
  display: "block",
279
- // opsz MUST match fontSize. It said 20 against a 16px size,
280
- // so the glyph was drawn on a 20px grid and scaled down into
281
- // a 16px box, which shifts the art off centre.
282
- fontVariationSettings: `'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' ${L.iconInner}` }}>
279
+ // opsz 24, as Figma draws its icons, so the glyph fills the
280
+ // box in Figma's proportion (changed 2026-11-03).
281
+ fontVariationSettings: `'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24` }}>
283
282
  {item.icon}
284
283
  </span>
285
284
  : React.cloneElement(item.icon, { style: { color: iconColor } })}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloimjolopez-pathway/pathway-components",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Pathway Design System React components",
5
5
  "type": "module",
6
6
  "sideEffects": false,