@newtonedev/components 0.1.8 → 0.1.9

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/index.cjs CHANGED
@@ -993,6 +993,7 @@ function TextBase({
993
993
  role = "body",
994
994
  color = "primary",
995
995
  size: sizeOverride,
996
+ weight: weightOverride,
996
997
  align,
997
998
  numberOfLines,
998
999
  elevation = 1,
@@ -1009,7 +1010,7 @@ function TextBase({
1009
1010
  const { config, reportingEndpoint } = useNewtoneTheme();
1010
1011
  const size = sizeOverride ?? "md";
1011
1012
  const fontSlot = tokens.typography.fonts[scope];
1012
- const resolvedFontWeight = config.typography.roleWeights?.[role] ?? fonts.ROLE_DEFAULT_WEIGHTS[role];
1013
+ const resolvedFontWeight = weightOverride ? fonts.SEMANTIC_WEIGHT_MAP[weightOverride] : config.typography.roleWeights?.[role] ?? fonts.ROLE_DEFAULT_WEIGHTS[role];
1013
1014
  const breakpoint = useBreakpoint();
1014
1015
  const baseStep = config.typography.roles[role][size];
1015
1016
  const bpScale = fonts.BREAKPOINT_ROLE_SCALE[breakpoint][role];