@yahoo/uds-mobile 2.24.0-beta.4 → 2.24.0-beta.6

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.
Files changed (195) hide show
  1. package/dist/components/Avatar/AvatarIcon.cjs +8 -2
  2. package/dist/components/Avatar/AvatarIcon.d.cts.map +1 -1
  3. package/dist/components/Avatar/AvatarIcon.d.ts.map +1 -1
  4. package/dist/components/Avatar/AvatarIcon.js +9 -3
  5. package/dist/components/Avatar/AvatarIcon.js.map +1 -1
  6. package/dist/components/Avatar/AvatarImage.cjs +9 -2
  7. package/dist/components/Avatar/AvatarImage.d.cts.map +1 -1
  8. package/dist/components/Avatar/AvatarImage.d.ts.map +1 -1
  9. package/dist/components/Avatar/AvatarImage.js +10 -3
  10. package/dist/components/Avatar/AvatarImage.js.map +1 -1
  11. package/dist/components/Avatar/AvatarText.cjs +8 -2
  12. package/dist/components/Avatar/AvatarText.d.cts.map +1 -1
  13. package/dist/components/Avatar/AvatarText.d.ts.map +1 -1
  14. package/dist/components/Avatar/AvatarText.js +9 -3
  15. package/dist/components/Avatar/AvatarText.js.map +1 -1
  16. package/dist/components/Avatar/types.d.cts +7 -3
  17. package/dist/components/Avatar/types.d.cts.map +1 -1
  18. package/dist/components/Avatar/types.d.ts +7 -3
  19. package/dist/components/Avatar/types.d.ts.map +1 -1
  20. package/dist/components/Avatar/useAvatarFontScale.cjs +16 -0
  21. package/dist/components/Avatar/useAvatarFontScale.d.cts +7 -0
  22. package/dist/components/Avatar/useAvatarFontScale.d.cts.map +1 -0
  23. package/dist/components/Avatar/useAvatarFontScale.d.ts +7 -0
  24. package/dist/components/Avatar/useAvatarFontScale.d.ts.map +1 -0
  25. package/dist/components/Avatar/useAvatarFontScale.js +16 -0
  26. package/dist/components/Avatar/useAvatarFontScale.js.map +1 -0
  27. package/dist/components/Avatar/utils.cjs +9 -6
  28. package/dist/components/Avatar/utils.d.cts +2 -2
  29. package/dist/components/Avatar/utils.d.cts.map +1 -1
  30. package/dist/components/Avatar/utils.d.ts +2 -2
  31. package/dist/components/Avatar/utils.d.ts.map +1 -1
  32. package/dist/components/Avatar/utils.js +9 -6
  33. package/dist/components/Avatar/utils.js.map +1 -1
  34. package/dist/components/Button/buttonTheme.cjs +10 -6
  35. package/dist/components/Button/buttonTheme.d.cts +10 -5
  36. package/dist/components/Button/buttonTheme.d.cts.map +1 -1
  37. package/dist/components/Button/buttonTheme.d.ts +10 -5
  38. package/dist/components/Button/buttonTheme.d.ts.map +1 -1
  39. package/dist/components/Button/buttonTheme.js +10 -6
  40. package/dist/components/Button/buttonTheme.js.map +1 -1
  41. package/dist/components/Button.cjs +22 -9
  42. package/dist/components/Button.d.cts.map +1 -1
  43. package/dist/components/Button.d.ts.map +1 -1
  44. package/dist/components/Button.js +22 -9
  45. package/dist/components/Button.js.map +1 -1
  46. package/dist/components/Checkbox.cjs +7 -3
  47. package/dist/components/Checkbox.js +7 -3
  48. package/dist/components/Checkbox.js.map +1 -1
  49. package/dist/components/Chip/ChipBase.cjs +22 -19
  50. package/dist/components/Chip/ChipBase.js +22 -19
  51. package/dist/components/Chip/ChipBase.js.map +1 -1
  52. package/dist/components/Icon.cjs +5 -4
  53. package/dist/components/Icon.d.cts.map +1 -1
  54. package/dist/components/Icon.d.ts.map +1 -1
  55. package/dist/components/Icon.js +5 -4
  56. package/dist/components/Icon.js.map +1 -1
  57. package/dist/components/Input.cjs +54 -18
  58. package/dist/components/Input.d.cts +5 -0
  59. package/dist/components/Input.d.cts.map +1 -1
  60. package/dist/components/Input.d.ts +5 -0
  61. package/dist/components/Input.d.ts.map +1 -1
  62. package/dist/components/Input.js +54 -18
  63. package/dist/components/Input.js.map +1 -1
  64. package/dist/components/InputHelpText.cjs +6 -1
  65. package/dist/components/InputHelpText.d.cts +2 -0
  66. package/dist/components/InputHelpText.d.cts.map +1 -1
  67. package/dist/components/InputHelpText.d.ts +2 -0
  68. package/dist/components/InputHelpText.d.ts.map +1 -1
  69. package/dist/components/InputHelpText.js +6 -1
  70. package/dist/components/InputHelpText.js.map +1 -1
  71. package/dist/components/Link.cjs +10 -1
  72. package/dist/components/Link.d.cts +6 -0
  73. package/dist/components/Link.d.cts.map +1 -1
  74. package/dist/components/Link.d.ts +6 -0
  75. package/dist/components/Link.d.ts.map +1 -1
  76. package/dist/components/Link.js +10 -1
  77. package/dist/components/Link.js.map +1 -1
  78. package/dist/components/Pagination/Pagination.cjs +18 -10
  79. package/dist/components/Pagination/Pagination.d.cts +2 -0
  80. package/dist/components/Pagination/Pagination.d.cts.map +1 -1
  81. package/dist/components/Pagination/Pagination.d.ts +2 -0
  82. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  83. package/dist/components/Pagination/Pagination.js +18 -10
  84. package/dist/components/Pagination/Pagination.js.map +1 -1
  85. package/dist/components/Pagination/PaginationEllipsis.cjs +8 -2
  86. package/dist/components/Pagination/PaginationEllipsis.d.cts.map +1 -1
  87. package/dist/components/Pagination/PaginationEllipsis.d.ts.map +1 -1
  88. package/dist/components/Pagination/PaginationEllipsis.js +9 -3
  89. package/dist/components/Pagination/PaginationEllipsis.js.map +1 -1
  90. package/dist/components/Pagination/PaginationItem.cjs +2 -1
  91. package/dist/components/Pagination/PaginationItem.js +2 -1
  92. package/dist/components/Pagination/PaginationItem.js.map +1 -1
  93. package/dist/components/Pagination/PaginationLink.cjs +2 -1
  94. package/dist/components/Pagination/PaginationLink.js +2 -1
  95. package/dist/components/Pagination/PaginationLink.js.map +1 -1
  96. package/dist/components/Pagination/PaginationNext.cjs +3 -1
  97. package/dist/components/Pagination/PaginationNext.js +3 -1
  98. package/dist/components/Pagination/PaginationNext.js.map +1 -1
  99. package/dist/components/Pagination/PaginationPrev.cjs +3 -1
  100. package/dist/components/Pagination/PaginationPrev.js +3 -1
  101. package/dist/components/Pagination/PaginationPrev.js.map +1 -1
  102. package/dist/components/Pagination/paginationContext.d.cts +2 -0
  103. package/dist/components/Pagination/paginationContext.d.cts.map +1 -1
  104. package/dist/components/Pagination/paginationContext.d.ts +2 -0
  105. package/dist/components/Pagination/paginationContext.d.ts.map +1 -1
  106. package/dist/components/Pagination/paginationContext.js.map +1 -1
  107. package/dist/components/Pagination/usePaginationControlStyles.cjs +8 -1
  108. package/dist/components/Pagination/usePaginationControlStyles.d.cts.map +1 -1
  109. package/dist/components/Pagination/usePaginationControlStyles.d.ts.map +1 -1
  110. package/dist/components/Pagination/usePaginationControlStyles.js +9 -2
  111. package/dist/components/Pagination/usePaginationControlStyles.js.map +1 -1
  112. package/dist/components/Radio/Radio.cjs +2 -1
  113. package/dist/components/Radio/Radio.js +2 -1
  114. package/dist/components/Radio/Radio.js.map +1 -1
  115. package/dist/components/Select/Select.cjs +11 -2
  116. package/dist/components/Select/Select.d.cts +2 -0
  117. package/dist/components/Select/Select.d.cts.map +1 -1
  118. package/dist/components/Select/Select.d.ts +2 -0
  119. package/dist/components/Select/Select.d.ts.map +1 -1
  120. package/dist/components/Select/Select.js +11 -2
  121. package/dist/components/Select/Select.js.map +1 -1
  122. package/dist/components/Select/SelectItem.cjs +26 -15
  123. package/dist/components/Select/SelectItem.d.cts.map +1 -1
  124. package/dist/components/Select/SelectItem.d.ts.map +1 -1
  125. package/dist/components/Select/SelectItem.js +26 -15
  126. package/dist/components/Select/SelectItem.js.map +1 -1
  127. package/dist/components/Select/SelectTrigger.cjs +28 -13
  128. package/dist/components/Select/SelectTrigger.d.cts.map +1 -1
  129. package/dist/components/Select/SelectTrigger.d.ts.map +1 -1
  130. package/dist/components/Select/SelectTrigger.js +28 -13
  131. package/dist/components/Select/SelectTrigger.js.map +1 -1
  132. package/dist/components/Select/types.d.cts +2 -0
  133. package/dist/components/Select/types.d.cts.map +1 -1
  134. package/dist/components/Select/types.d.ts +2 -0
  135. package/dist/components/Select/types.d.ts.map +1 -1
  136. package/dist/components/Switch.cjs +5 -3
  137. package/dist/components/Switch.d.cts.map +1 -1
  138. package/dist/components/Switch.d.ts.map +1 -1
  139. package/dist/components/Switch.js +5 -3
  140. package/dist/components/Switch.js.map +1 -1
  141. package/dist/components/Tabs/Tab.cjs +6 -2
  142. package/dist/components/Tabs/Tab.d.cts.map +1 -1
  143. package/dist/components/Tabs/Tab.d.ts.map +1 -1
  144. package/dist/components/Tabs/Tab.js +6 -2
  145. package/dist/components/Tabs/Tab.js.map +1 -1
  146. package/dist/components/Text.cjs +4 -0
  147. package/dist/components/Text.d.cts.map +1 -1
  148. package/dist/components/Text.d.ts.map +1 -1
  149. package/dist/components/Text.js +4 -0
  150. package/dist/components/Text.js.map +1 -1
  151. package/dist/components/UDSProvider.cjs +1 -1
  152. package/dist/components/UDSProvider.js +1 -1
  153. package/dist/fontScaling/FontScalingContext.cjs +14 -0
  154. package/dist/fontScaling/FontScalingContext.d.cts +7 -1
  155. package/dist/fontScaling/FontScalingContext.d.cts.map +1 -1
  156. package/dist/fontScaling/FontScalingContext.d.ts +7 -1
  157. package/dist/fontScaling/FontScalingContext.d.ts.map +1 -1
  158. package/dist/fontScaling/FontScalingContext.js +15 -2
  159. package/dist/fontScaling/FontScalingContext.js.map +1 -1
  160. package/dist/fontScaling/androidNonlinearFontScaling.cjs +174 -0
  161. package/dist/fontScaling/androidNonlinearFontScaling.d.cts +7 -0
  162. package/dist/fontScaling/androidNonlinearFontScaling.d.cts.map +1 -0
  163. package/dist/fontScaling/androidNonlinearFontScaling.d.ts +7 -0
  164. package/dist/fontScaling/androidNonlinearFontScaling.d.ts.map +1 -0
  165. package/dist/fontScaling/androidNonlinearFontScaling.js +175 -0
  166. package/dist/fontScaling/androidNonlinearFontScaling.js.map +1 -0
  167. package/dist/fontScaling/constants.cjs +33 -0
  168. package/dist/fontScaling/constants.d.cts +11 -1
  169. package/dist/fontScaling/constants.d.cts.map +1 -1
  170. package/dist/fontScaling/constants.d.ts +11 -1
  171. package/dist/fontScaling/constants.d.ts.map +1 -1
  172. package/dist/fontScaling/constants.js +33 -1
  173. package/dist/fontScaling/constants.js.map +1 -1
  174. package/dist/fontScaling/index.cjs +2 -1
  175. package/dist/fontScaling/index.d.cts +2 -2
  176. package/dist/fontScaling/index.d.ts +2 -2
  177. package/dist/fontScaling/index.js +3 -3
  178. package/dist/fontScaling/useFontScale.cjs +13 -4
  179. package/dist/fontScaling/useFontScale.d.cts +8 -3
  180. package/dist/fontScaling/useFontScale.d.cts.map +1 -1
  181. package/dist/fontScaling/useFontScale.d.ts +8 -3
  182. package/dist/fontScaling/useFontScale.d.ts.map +1 -1
  183. package/dist/fontScaling/useFontScale.js +14 -5
  184. package/dist/fontScaling/useFontScale.js.map +1 -1
  185. package/dist/jest/mocks/styles.cjs +13 -1
  186. package/dist/jest/mocks/styles.d.cts.map +1 -1
  187. package/dist/jest/mocks/styles.d.ts.map +1 -1
  188. package/dist/jest/mocks/styles.js +13 -1
  189. package/dist/jest/mocks/styles.js.map +1 -1
  190. package/dist/portal.cjs +8 -2
  191. package/dist/portal.d.cts.map +1 -1
  192. package/dist/portal.d.ts.map +1 -1
  193. package/dist/portal.js +8 -2
  194. package/dist/portal.js.map +1 -1
  195. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { TextVariant } from "../components/Text.cjs";
3
3
  import { FontScalingCapValue } from "./types.cjs";
4
+ import { TextProps } from "react-native";
4
5
 
5
6
  //#region src/fontScaling/constants.d.ts
6
7
  /**
@@ -44,6 +45,15 @@ declare const DEFAULT_MAX_FONT_SIZE_MULTIPLIERS: Readonly<Partial<Record<TextVar
44
45
  * supported ceiling rather than a looser per-variant cap.
45
46
  */
46
47
  declare const DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = 2;
48
+ /**
49
+ * iOS Dynamic Type curve used by each UDS typography tier. React Native uses
50
+ * the selected system text style's curve while preserving the configured UDS
51
+ * font size. Android ignores `dynamicTypeRamp` and continues to use its native
52
+ * nonlinear font scaling.
53
+ *
54
+ * Keys are base variants; `/emphasized` twins resolve to their base.
55
+ */
56
+ declare const DEFAULT_DYNAMIC_TYPE_RAMPS: Readonly<Partial<Record<TextVariant, NonNullable<TextProps['dynamicTypeRamp']>>>>;
47
57
  //#endregion
48
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
58
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
49
59
  //# sourceMappingURL=constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","names":[],"sources":["../../src/fontScaling/constants.ts"],"mappings":";;;;;;;AACmD;;;;;AAarB;;;;cAAxB,wBAAA;;;;;;;;;;;;;AAgB0E;;cAA1E,gBAAA,EAAkB,QAAA,CAAS,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;;;cAgCvD,iCAAA,EAAmC,QAAA,CACvC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;cAexB,wCAAA"}
1
+ {"version":3,"file":"constants.d.cts","names":[],"sources":["../../src/fontScaling/constants.ts"],"mappings":";;;;;;;;AAGmD;;;;;AAarB;;;;cAAxB,wBAAA;;;;;;;;;;;;;AAgB0E;;cAA1E,gBAAA,EAAkB,QAAA,CAAS,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;;;cAgCvD,iCAAA,EAAmC,QAAA,CACvC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;cAexB,wCAAA;AAf2C;;;;;AAeH;;;AAfG,cAyB3C,0BAAA,EAA4B,QAAA,CAChC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,WAAA,CAAY,SAAA"}
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { TextVariant } from "../components/Text.js";
3
3
  import { FontScalingCapValue } from "./types.js";
4
+ import { TextProps } from "react-native";
4
5
 
5
6
  //#region src/fontScaling/constants.d.ts
6
7
  /**
@@ -44,6 +45,15 @@ declare const DEFAULT_MAX_FONT_SIZE_MULTIPLIERS: Readonly<Partial<Record<TextVar
44
45
  * supported ceiling rather than a looser per-variant cap.
45
46
  */
46
47
  declare const DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = 2;
48
+ /**
49
+ * iOS Dynamic Type curve used by each UDS typography tier. React Native uses
50
+ * the selected system text style's curve while preserving the configured UDS
51
+ * font size. Android ignores `dynamicTypeRamp` and continues to use its native
52
+ * nonlinear font scaling.
53
+ *
54
+ * Keys are base variants; `/emphasized` twins resolve to their base.
55
+ */
56
+ declare const DEFAULT_DYNAMIC_TYPE_RAMPS: Readonly<Partial<Record<TextVariant, NonNullable<TextProps['dynamicTypeRamp']>>>>;
47
57
  //#endregion
48
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
58
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
49
59
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","names":[],"sources":["../../src/fontScaling/constants.ts"],"mappings":";;;;;;;AACmD;;;;;AAarB;;;;cAAxB,wBAAA;;;;;;;;;;;;;AAgB0E;;cAA1E,gBAAA,EAAkB,QAAA,CAAS,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;;;cAgCvD,iCAAA,EAAmC,QAAA,CACvC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;cAexB,wCAAA"}
1
+ {"version":3,"file":"constants.d.ts","names":[],"sources":["../../src/fontScaling/constants.ts"],"mappings":";;;;;;;;AAGmD;;;;;AAarB;;;;cAAxB,wBAAA;;;;;;;;;;;;;AAgB0E;;cAA1E,gBAAA,EAAkB,QAAA,CAAS,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;;;cAgCvD,iCAAA,EAAmC,QAAA,CACvC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,mBAAA;;;;;;cAexB,wCAAA;AAf2C;;;;;AAeH;;;AAfG,cAyB3C,0BAAA,EAA4B,QAAA,CAChC,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,WAAA,CAAY,SAAA"}
@@ -64,7 +64,39 @@ const DEFAULT_MAX_FONT_SIZE_MULTIPLIERS = Object.freeze(Object.fromEntries(Objec
64
64
  * supported ceiling rather than a looser per-variant cap.
65
65
  */
66
66
  const DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = 2;
67
+ /**
68
+ * iOS Dynamic Type curve used by each UDS typography tier. React Native uses
69
+ * the selected system text style's curve while preserving the configured UDS
70
+ * font size. Android ignores `dynamicTypeRamp` and continues to use its native
71
+ * nonlinear font scaling.
72
+ *
73
+ * Keys are base variants; `/emphasized` twins resolve to their base.
74
+ */
75
+ const DEFAULT_DYNAMIC_TYPE_RAMPS = {
76
+ display1: "largeTitle",
77
+ display2: "largeTitle",
78
+ display3: "largeTitle",
79
+ title1: "title1",
80
+ title2: "title2",
81
+ title3: "title3",
82
+ title4: "title3",
83
+ headline1: "headline",
84
+ body1: "body",
85
+ label1: "callout",
86
+ label2: "subheadline",
87
+ label3: "footnote",
88
+ label4: "caption1",
89
+ caption1: "caption1",
90
+ caption2: "caption2",
91
+ legal1: "caption2",
92
+ ui1: "title3",
93
+ ui2: "title3",
94
+ ui3: "callout",
95
+ ui4: "subheadline",
96
+ ui5: "footnote",
97
+ ui6: "caption2"
98
+ };
67
99
  //#endregion
68
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
100
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE };
69
101
 
70
102
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../src/fontScaling/constants.ts"],"sourcesContent":["import type { TextVariant } from '../components/Text';\nimport type { FontScalingCapValue } from './types';\n\n/**\n * The largest OS font scale UDS components are designed to support.\n *\n * Yahoo's inclusive-design guidance is to solve for text scaling up to 2x, so\n * no default cap exceeds it. Apple's Accessibility Nutrition Label for Larger\n * Text is claimable at \"at least 200% or the maximum font size for the\n * system\", so a 2x ceiling still qualifies. Note that iOS offers scales beyond\n * this (up to 3.571x): with this ceiling in place the top accessibility sizes\n * render alike, and an app that wants to follow the OS further can raise or\n * remove the caps via `UDSFontScalingProvider`.\n */\nconst MAX_SUPPORTED_FONT_SCALE = 2;\n\n/**\n * How far each text style would grow if only legibility mattered, following\n * the shape of Apple's Dynamic Type ramps: the larger a style starts, the less\n * it multiplies. At iOS's largest accessibility size the system grows body\n * (17pt) by 3.12x but largeTitle (34pt) by only ~1.71x, and UDS display tiers\n * are larger than largeTitle, so they taper hardest.\n *\n * Caps are chosen by the size a style starts at rather than by which family it\n * belongs to, which is why `ui1` (24pt) matches `title3` (24pt) and `ui2`\n * (20pt) matches `title4` (20pt). `null` means \"no cap from the curve\" — those\n * are reading sizes, where legibility argues for following the OS.\n *\n * The exported defaults are this curve clamped to {@link MAX_SUPPORTED_FONT_SCALE}.\n */\nconst TYPE_SCALE_CURVE: Readonly<Partial<Record<TextVariant, FontScalingCapValue>>> = {\n display1: 1.5,\n display2: 1.6,\n display3: 1.75,\n title1: 1.8,\n title2: 2,\n title3: 2.2,\n title4: 2.4,\n headline1: 2.5,\n ui1: 2.2,\n ui2: 2.4,\n body1: null,\n label1: null,\n label2: null,\n label3: null,\n label4: null,\n caption1: null,\n caption2: null,\n legal1: null,\n ui3: null,\n ui4: null,\n ui5: null,\n ui6: null,\n};\n\n/**\n * Default per-variant caps on OS font scaling, applied by `Text` when no\n * explicit prop or provider config overrides them: the legibility curve in\n * {@link TYPE_SCALE_CURVE}, clamped to the 2x we support.\n *\n * Keys are base variants; `/emphasized` twins resolve to their base.\n */\nconst DEFAULT_MAX_FONT_SIZE_MULTIPLIERS: Readonly<\n Partial<Record<TextVariant, FontScalingCapValue>>\n> = Object.freeze(\n Object.fromEntries(\n Object.entries(TYPE_SCALE_CURVE).map(([variant, cap]) => [\n variant,\n cap === null ? MAX_SUPPORTED_FONT_SCALE : Math.min(cap, MAX_SUPPORTED_FONT_SCALE),\n ]),\n ) as Partial<Record<TextVariant, FontScalingCapValue>>,\n);\n\n/**\n * Default cap for control-internal text and icons (Button, Checkbox, Radio,\n * Switch, Chip, Tabs, Icon). Controls have bounded layouts, so they get the\n * supported ceiling rather than a looser per-variant cap.\n */\nconst DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = MAX_SUPPORTED_FONT_SCALE;\n\nexport {\n DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER,\n DEFAULT_MAX_FONT_SIZE_MULTIPLIERS,\n MAX_SUPPORTED_FONT_SCALE,\n TYPE_SCALE_CURVE,\n};\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,2BAA2B;;;;;;;;;;;;;;;AAgBjC,MAAM,mBAAgF;CACpF,UAAU;CACV,UAAU;CACV,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,KAAK;CACL,KAAK;CACL,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,UAAU;CACV,QAAQ;CACR,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN;;;;;;;;AASD,MAAM,oCAEF,OAAO,OACT,OAAO,YACL,OAAO,QAAQ,iBAAiB,CAAC,KAAK,CAAC,SAAS,SAAS,CACvD,SACA,QAAQ,OAAA,IAAkC,KAAK,IAAI,KAAA,EAA8B,CAClF,CAAC,CACH,CACF;;;;;;AAOD,MAAM,2CAAA"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../src/fontScaling/constants.ts"],"sourcesContent":["import type { TextProps as RNTextProps } from 'react-native';\n\nimport type { TextVariant } from '../components/Text';\nimport type { FontScalingCapValue } from './types';\n\n/**\n * The largest OS font scale UDS components are designed to support.\n *\n * Yahoo's inclusive-design guidance is to solve for text scaling up to 2x, so\n * no default cap exceeds it. Apple's Accessibility Nutrition Label for Larger\n * Text is claimable at \"at least 200% or the maximum font size for the\n * system\", so a 2x ceiling still qualifies. Note that iOS offers scales beyond\n * this (up to 3.571x): with this ceiling in place the top accessibility sizes\n * render alike, and an app that wants to follow the OS further can raise or\n * remove the caps via `UDSFontScalingProvider`.\n */\nconst MAX_SUPPORTED_FONT_SCALE = 2;\n\n/**\n * How far each text style would grow if only legibility mattered, following\n * the shape of Apple's Dynamic Type ramps: the larger a style starts, the less\n * it multiplies. At iOS's largest accessibility size the system grows body\n * (17pt) by 3.12x but largeTitle (34pt) by only ~1.71x, and UDS display tiers\n * are larger than largeTitle, so they taper hardest.\n *\n * Caps are chosen by the size a style starts at rather than by which family it\n * belongs to, which is why `ui1` (24pt) matches `title3` (24pt) and `ui2`\n * (20pt) matches `title4` (20pt). `null` means \"no cap from the curve\" — those\n * are reading sizes, where legibility argues for following the OS.\n *\n * The exported defaults are this curve clamped to {@link MAX_SUPPORTED_FONT_SCALE}.\n */\nconst TYPE_SCALE_CURVE: Readonly<Partial<Record<TextVariant, FontScalingCapValue>>> = {\n display1: 1.5,\n display2: 1.6,\n display3: 1.75,\n title1: 1.8,\n title2: 2,\n title3: 2.2,\n title4: 2.4,\n headline1: 2.5,\n ui1: 2.2,\n ui2: 2.4,\n body1: null,\n label1: null,\n label2: null,\n label3: null,\n label4: null,\n caption1: null,\n caption2: null,\n legal1: null,\n ui3: null,\n ui4: null,\n ui5: null,\n ui6: null,\n};\n\n/**\n * Default per-variant caps on OS font scaling, applied by `Text` when no\n * explicit prop or provider config overrides them: the legibility curve in\n * {@link TYPE_SCALE_CURVE}, clamped to the 2x we support.\n *\n * Keys are base variants; `/emphasized` twins resolve to their base.\n */\nconst DEFAULT_MAX_FONT_SIZE_MULTIPLIERS: Readonly<\n Partial<Record<TextVariant, FontScalingCapValue>>\n> = Object.freeze(\n Object.fromEntries(\n Object.entries(TYPE_SCALE_CURVE).map(([variant, cap]) => [\n variant,\n cap === null ? MAX_SUPPORTED_FONT_SCALE : Math.min(cap, MAX_SUPPORTED_FONT_SCALE),\n ]),\n ) as Partial<Record<TextVariant, FontScalingCapValue>>,\n);\n\n/**\n * Default cap for control-internal text and icons (Button, Checkbox, Radio,\n * Switch, Chip, Tabs, Icon). Controls have bounded layouts, so they get the\n * supported ceiling rather than a looser per-variant cap.\n */\nconst DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = MAX_SUPPORTED_FONT_SCALE;\n\n/**\n * iOS Dynamic Type curve used by each UDS typography tier. React Native uses\n * the selected system text style's curve while preserving the configured UDS\n * font size. Android ignores `dynamicTypeRamp` and continues to use its native\n * nonlinear font scaling.\n *\n * Keys are base variants; `/emphasized` twins resolve to their base.\n */\nconst DEFAULT_DYNAMIC_TYPE_RAMPS: Readonly<\n Partial<Record<TextVariant, NonNullable<RNTextProps['dynamicTypeRamp']>>>\n> = {\n display1: 'largeTitle',\n display2: 'largeTitle',\n display3: 'largeTitle',\n title1: 'title1',\n title2: 'title2',\n title3: 'title3',\n title4: 'title3',\n headline1: 'headline',\n body1: 'body',\n label1: 'callout',\n label2: 'subheadline',\n label3: 'footnote',\n label4: 'caption1',\n caption1: 'caption1',\n caption2: 'caption2',\n legal1: 'caption2',\n ui1: 'title3',\n ui2: 'title3',\n ui3: 'callout',\n ui4: 'subheadline',\n ui5: 'footnote',\n ui6: 'caption2',\n};\n\nexport {\n DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER,\n DEFAULT_DYNAMIC_TYPE_RAMPS,\n DEFAULT_MAX_FONT_SIZE_MULTIPLIERS,\n MAX_SUPPORTED_FONT_SCALE,\n TYPE_SCALE_CURVE,\n};\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,2BAA2B;;;;;;;;;;;;;;;AAgBjC,MAAM,mBAAgF;CACpF,UAAU;CACV,UAAU;CACV,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,KAAK;CACL,KAAK;CACL,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,UAAU;CACV,QAAQ;CACR,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN;;;;;;;;AASD,MAAM,oCAEF,OAAO,OACT,OAAO,YACL,OAAO,QAAQ,iBAAiB,CAAC,KAAK,CAAC,SAAS,SAAS,CACvD,SACA,QAAQ,OAAA,IAAkC,KAAK,IAAI,KAAA,EAA8B,CAClF,CAAC,CACH,CACF;;;;;;AAOD,MAAM,2CAAA;;;;;;;;;AAUN,MAAM,6BAEF;CACF,UAAU;CACV,UAAU;CACV,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,UAAU;CACV,QAAQ;CACR,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN"}
@@ -1,10 +1,11 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_fontScaling_useFontScale = require("./useFontScale.cjs");
4
3
  const require_fontScaling_FontScalingContext = require("./FontScalingContext.cjs");
4
+ const require_fontScaling_useFontScale = require("./useFontScale.cjs");
5
5
  const require_fontScaling_constants = require("./constants.cjs");
6
6
  const require_fontScaling_useMaxFontSizeMultiplier = require("./useMaxFontSizeMultiplier.cjs");
7
7
  exports.DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER = require_fontScaling_constants.DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER;
8
+ exports.DEFAULT_DYNAMIC_TYPE_RAMPS = require_fontScaling_constants.DEFAULT_DYNAMIC_TYPE_RAMPS;
8
9
  exports.DEFAULT_MAX_FONT_SIZE_MULTIPLIERS = require_fontScaling_constants.DEFAULT_MAX_FONT_SIZE_MULTIPLIERS;
9
10
  exports.MAX_SUPPORTED_FONT_SCALE = require_fontScaling_constants.MAX_SUPPORTED_FONT_SCALE;
10
11
  exports.TYPE_SCALE_CURVE = require_fontScaling_constants.TYPE_SCALE_CURVE;
@@ -2,7 +2,7 @@
2
2
  import { TextVariant } from "../components/Text.cjs";
3
3
  import { FontScalingCapValue, FontScalingConfig } from "./types.cjs";
4
4
  import { UDSFontScalingProvider, UDSFontScalingProviderProps } from "./FontScalingContext.cjs";
5
- import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.cjs";
5
+ import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.cjs";
6
6
  import { useFontScale } from "./useFontScale.cjs";
7
7
  import { useMaxFontSizeMultiplier } from "./useMaxFontSizeMultiplier.cjs";
8
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, type FontScalingCapValue, type FontScalingConfig, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, type TextVariant, UDSFontScalingProvider, type UDSFontScalingProviderProps, useFontScale, useMaxFontSizeMultiplier };
8
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, type FontScalingCapValue, type FontScalingConfig, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, type TextVariant, UDSFontScalingProvider, type UDSFontScalingProviderProps, useFontScale, useMaxFontSizeMultiplier };
@@ -2,7 +2,7 @@
2
2
  import { TextVariant } from "../components/Text.js";
3
3
  import { FontScalingCapValue, FontScalingConfig } from "./types.js";
4
4
  import { UDSFontScalingProvider, UDSFontScalingProviderProps } from "./FontScalingContext.js";
5
- import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.js";
5
+ import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.js";
6
6
  import { useFontScale } from "./useFontScale.js";
7
7
  import { useMaxFontSizeMultiplier } from "./useMaxFontSizeMultiplier.js";
8
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, type FontScalingCapValue, type FontScalingConfig, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, type TextVariant, UDSFontScalingProvider, type UDSFontScalingProviderProps, useFontScale, useMaxFontSizeMultiplier };
8
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, type FontScalingCapValue, type FontScalingConfig, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, type TextVariant, UDSFontScalingProvider, type UDSFontScalingProviderProps, useFontScale, useMaxFontSizeMultiplier };
@@ -1,6 +1,6 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
- import { useFontScale } from "./useFontScale.js";
3
2
  import { UDSFontScalingProvider } from "./FontScalingContext.js";
4
- import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.js";
3
+ import { useFontScale } from "./useFontScale.js";
4
+ import { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE } from "./constants.js";
5
5
  import { useMaxFontSizeMultiplier } from "./useMaxFontSizeMultiplier.js";
6
- export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, UDSFontScalingProvider, useFontScale, useMaxFontSizeMultiplier };
6
+ export { DEFAULT_CONTROL_MAX_FONT_SIZE_MULTIPLIER, DEFAULT_DYNAMIC_TYPE_RAMPS, DEFAULT_MAX_FONT_SIZE_MULTIPLIERS, MAX_SUPPORTED_FONT_SCALE, TYPE_SCALE_CURVE, UDSFontScalingProvider, useFontScale, useMaxFontSizeMultiplier };
@@ -1,6 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../_virtual/_rolldown/runtime.cjs");
4
+ const require_fontScaling_androidNonlinearFontScaling = require("./androidNonlinearFontScaling.cjs");
4
5
  let react = require("react");
5
6
  let react_native = require("react-native");
6
7
  //#region src/fontScaling/useFontScale.ts
@@ -12,21 +13,29 @@ function getFontScale() {
12
13
  return react_native.Dimensions.get("window").fontScale;
13
14
  }
14
15
  /**
15
- * The current OS font scale, clamped to `[1, cap]`, for sizing containers
16
- * around scaled text (e.g. a checkbox box growing with its checkmark).
16
+ * The effective scale for `fontSize`, clamped to `[1, cap]`, for sizing
17
+ * containers around scaled text (e.g. a checkbox box growing with its
18
+ * checkmark).
17
19
  *
18
20
  * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1
19
21
  * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result
20
22
  * is never below 1 so containers never shrink under their token metrics
21
23
  * (font scales < 1 shrink text only, as today).
22
24
  *
25
+ * Pass the SP size that the geometry accompanies on Android so this mirrors
26
+ * Android 14+'s nonlinear scaling. Omitting `fontSize` preserves the legacy
27
+ * scalar behavior for custom callers that do not know their base size.
28
+ *
23
29
  * Subscribes to font-scale changes only — rotation does not re-render, and
24
30
  * components re-render solely when the user changes the OS text size.
25
31
  */
26
- function useFontScale(cap) {
32
+ function useFontScale(cap, fontSize) {
27
33
  const fontScale = (0, react.useSyncExternalStore)(subscribe, getFontScale, getFontScale);
28
34
  const effectiveCap = typeof cap === "number" && cap >= 1 ? cap : Number.POSITIVE_INFINITY;
29
- return Math.max(1, Math.min(fontScale, effectiveCap));
35
+ const cappedFontScale = Math.min(fontScale, effectiveCap);
36
+ const platformVersion = Number(react_native.Platform.Version);
37
+ const nativeScale = react_native.Platform.OS === "android" && platformVersion >= 34 && typeof fontSize === "number" && fontSize > 0 ? require_fontScaling_androidNonlinearFontScaling.convertAndroidSpToDp(fontSize, cappedFontScale) / fontSize : cappedFontScale;
38
+ return Math.max(1, nativeScale);
30
39
  }
31
40
  //#endregion
32
41
  exports.useFontScale = useFontScale;
@@ -1,18 +1,23 @@
1
1
 
2
2
  //#region src/fontScaling/useFontScale.d.ts
3
3
  /**
4
- * The current OS font scale, clamped to `[1, cap]`, for sizing containers
5
- * around scaled text (e.g. a checkbox box growing with its checkmark).
4
+ * The effective scale for `fontSize`, clamped to `[1, cap]`, for sizing
5
+ * containers around scaled text (e.g. a checkbox box growing with its
6
+ * checkmark).
6
7
  *
7
8
  * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1
8
9
  * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result
9
10
  * is never below 1 so containers never shrink under their token metrics
10
11
  * (font scales < 1 shrink text only, as today).
11
12
  *
13
+ * Pass the SP size that the geometry accompanies on Android so this mirrors
14
+ * Android 14+'s nonlinear scaling. Omitting `fontSize` preserves the legacy
15
+ * scalar behavior for custom callers that do not know their base size.
16
+ *
12
17
  * Subscribes to font-scale changes only — rotation does not re-render, and
13
18
  * components re-render solely when the user changes the OS text size.
14
19
  */
15
- declare function useFontScale(cap?: number | null): number;
20
+ declare function useFontScale(cap?: number | null, fontSize?: number): number;
16
21
  //#endregion
17
22
  export { useFontScale };
18
23
  //# sourceMappingURL=useFontScale.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFontScale.d.cts","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"mappings":";;;;;;;;;;;;;;iBA0BS,YAAA,CAAa,GAAA"}
1
+ {"version":3,"file":"useFontScale.d.cts","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAiCS,YAAA,CAAa,GAAA,kBAAqB,QAAA"}
@@ -1,18 +1,23 @@
1
1
 
2
2
  //#region src/fontScaling/useFontScale.d.ts
3
3
  /**
4
- * The current OS font scale, clamped to `[1, cap]`, for sizing containers
5
- * around scaled text (e.g. a checkbox box growing with its checkmark).
4
+ * The effective scale for `fontSize`, clamped to `[1, cap]`, for sizing
5
+ * containers around scaled text (e.g. a checkbox box growing with its
6
+ * checkmark).
6
7
  *
7
8
  * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1
8
9
  * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result
9
10
  * is never below 1 so containers never shrink under their token metrics
10
11
  * (font scales < 1 shrink text only, as today).
11
12
  *
13
+ * Pass the SP size that the geometry accompanies on Android so this mirrors
14
+ * Android 14+'s nonlinear scaling. Omitting `fontSize` preserves the legacy
15
+ * scalar behavior for custom callers that do not know their base size.
16
+ *
12
17
  * Subscribes to font-scale changes only — rotation does not re-render, and
13
18
  * components re-render solely when the user changes the OS text size.
14
19
  */
15
- declare function useFontScale(cap?: number | null): number;
20
+ declare function useFontScale(cap?: number | null, fontSize?: number): number;
16
21
  //#endregion
17
22
  export { useFontScale };
18
23
  //# sourceMappingURL=useFontScale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFontScale.d.ts","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"mappings":";;;;;;;;;;;;;;iBA0BS,YAAA,CAAa,GAAA"}
1
+ {"version":3,"file":"useFontScale.d.ts","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAiCS,YAAA,CAAa,GAAA,kBAAqB,QAAA"}
@@ -1,6 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { convertAndroidSpToDp } from "./androidNonlinearFontScaling.js";
2
3
  import { useSyncExternalStore } from "react";
3
- import { Dimensions } from "react-native";
4
+ import { Dimensions, Platform } from "react-native";
4
5
  //#region src/fontScaling/useFontScale.ts
5
6
  function subscribe(onStoreChange) {
6
7
  const subscription = Dimensions.addEventListener("change", onStoreChange);
@@ -10,21 +11,29 @@ function getFontScale() {
10
11
  return Dimensions.get("window").fontScale;
11
12
  }
12
13
  /**
13
- * The current OS font scale, clamped to `[1, cap]`, for sizing containers
14
- * around scaled text (e.g. a checkbox box growing with its checkmark).
14
+ * The effective scale for `fontSize`, clamped to `[1, cap]`, for sizing
15
+ * containers around scaled text (e.g. a checkbox box growing with its
16
+ * checkmark).
15
17
  *
16
18
  * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1
17
19
  * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result
18
20
  * is never below 1 so containers never shrink under their token metrics
19
21
  * (font scales < 1 shrink text only, as today).
20
22
  *
23
+ * Pass the SP size that the geometry accompanies on Android so this mirrors
24
+ * Android 14+'s nonlinear scaling. Omitting `fontSize` preserves the legacy
25
+ * scalar behavior for custom callers that do not know their base size.
26
+ *
21
27
  * Subscribes to font-scale changes only — rotation does not re-render, and
22
28
  * components re-render solely when the user changes the OS text size.
23
29
  */
24
- function useFontScale(cap) {
30
+ function useFontScale(cap, fontSize) {
25
31
  const fontScale = useSyncExternalStore(subscribe, getFontScale, getFontScale);
26
32
  const effectiveCap = typeof cap === "number" && cap >= 1 ? cap : Number.POSITIVE_INFINITY;
27
- return Math.max(1, Math.min(fontScale, effectiveCap));
33
+ const cappedFontScale = Math.min(fontScale, effectiveCap);
34
+ const platformVersion = Number(Platform.Version);
35
+ const nativeScale = Platform.OS === "android" && platformVersion >= 34 && typeof fontSize === "number" && fontSize > 0 ? convertAndroidSpToDp(fontSize, cappedFontScale) / fontSize : cappedFontScale;
36
+ return Math.max(1, nativeScale);
28
37
  }
29
38
  //#endregion
30
39
  export { useFontScale };
@@ -1 +1 @@
1
- {"version":3,"file":"useFontScale.js","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\nimport { Dimensions } from 'react-native';\n\nfunction subscribe(onStoreChange: () => void): () => void {\n const subscription = Dimensions.addEventListener('change', onStoreChange);\n return () => subscription.remove();\n}\n\n// Unistyles' rt.fontScale is stale when the OS text size changes while the\n// app is running; Dimensions reflects the live value on both platforms.\nfunction getFontScale(): number {\n return Dimensions.get('window').fontScale;\n}\n\n/**\n * The current OS font scale, clamped to `[1, cap]`, for sizing containers\n * around scaled text (e.g. a checkbox box growing with its checkmark).\n *\n * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1\n * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result\n * is never below 1 so containers never shrink under their token metrics\n * (font scales < 1 shrink text only, as today).\n *\n * Subscribes to font-scale changes only — rotation does not re-render, and\n * components re-render solely when the user changes the OS text size.\n */\nfunction useFontScale(cap?: number | null): number {\n const fontScale = useSyncExternalStore(subscribe, getFontScale, getFontScale);\n const effectiveCap = typeof cap === 'number' && cap >= 1 ? cap : Number.POSITIVE_INFINITY;\n return Math.max(1, Math.min(fontScale, effectiveCap));\n}\n\nexport { useFontScale };\n"],"mappings":";;;;AAGA,SAAS,UAAU,eAAuC;CACxD,MAAM,eAAe,WAAW,iBAAiB,UAAU,cAAc;CACzE,aAAa,aAAa,QAAQ;;AAKpC,SAAS,eAAuB;CAC9B,OAAO,WAAW,IAAI,SAAS,CAAC;;;;;;;;;;;;;;AAelC,SAAS,aAAa,KAA6B;CACjD,MAAM,YAAY,qBAAqB,WAAW,cAAc,aAAa;CAC7E,MAAM,eAAe,OAAO,QAAQ,YAAY,OAAO,IAAI,MAAM,OAAO;CACxE,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,WAAW,aAAa,CAAC"}
1
+ {"version":3,"file":"useFontScale.js","names":[],"sources":["../../src/fontScaling/useFontScale.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\nimport { Dimensions, Platform } from 'react-native';\n\nimport { convertAndroidSpToDp } from './androidNonlinearFontScaling';\n\nfunction subscribe(onStoreChange: () => void): () => void {\n const subscription = Dimensions.addEventListener('change', onStoreChange);\n return () => subscription.remove();\n}\n\n// Unistyles' rt.fontScale is stale when the OS text size changes while the\n// app is running; Dimensions reflects the live value on both platforms.\nfunction getFontScale(): number {\n return Dimensions.get('window').fontScale;\n}\n\n/**\n * The effective scale for `fontSize`, clamped to `[1, cap]`, for sizing\n * containers around scaled text (e.g. a checkbox box growing with its\n * checkmark).\n *\n * `cap` uses the same semantics as `maxFontSizeMultiplier`: a number >= 1\n * caps the scale; `null`, `0`, or `undefined` leave it uncapped. The result\n * is never below 1 so containers never shrink under their token metrics\n * (font scales < 1 shrink text only, as today).\n *\n * Pass the SP size that the geometry accompanies on Android so this mirrors\n * Android 14+'s nonlinear scaling. Omitting `fontSize` preserves the legacy\n * scalar behavior for custom callers that do not know their base size.\n *\n * Subscribes to font-scale changes only — rotation does not re-render, and\n * components re-render solely when the user changes the OS text size.\n */\nfunction useFontScale(cap?: number | null, fontSize?: number): number {\n const fontScale = useSyncExternalStore(subscribe, getFontScale, getFontScale);\n const effectiveCap = typeof cap === 'number' && cap >= 1 ? cap : Number.POSITIVE_INFINITY;\n const cappedFontScale = Math.min(fontScale, effectiveCap);\n const platformVersion = Number(Platform.Version);\n const nativeScale =\n Platform.OS === 'android' &&\n platformVersion >= 34 &&\n typeof fontSize === 'number' &&\n fontSize > 0\n ? convertAndroidSpToDp(fontSize, cappedFontScale) / fontSize\n : cappedFontScale;\n\n return Math.max(1, nativeScale);\n}\n\nexport { useFontScale };\n"],"mappings":";;;;;AAKA,SAAS,UAAU,eAAuC;CACxD,MAAM,eAAe,WAAW,iBAAiB,UAAU,cAAc;CACzE,aAAa,aAAa,QAAQ;;AAKpC,SAAS,eAAuB;CAC9B,OAAO,WAAW,IAAI,SAAS,CAAC;;;;;;;;;;;;;;;;;;;AAoBlC,SAAS,aAAa,KAAqB,UAA2B;CACpE,MAAM,YAAY,qBAAqB,WAAW,cAAc,aAAa;CAC7E,MAAM,eAAe,OAAO,QAAQ,YAAY,OAAO,IAAI,MAAM,OAAO;CACxE,MAAM,kBAAkB,KAAK,IAAI,WAAW,aAAa;CACzD,MAAM,kBAAkB,OAAO,SAAS,QAAQ;CAChD,MAAM,cACJ,SAAS,OAAO,aAChB,mBAAmB,MACnB,OAAO,aAAa,YACpB,WAAW,IACP,qBAAqB,UAAU,gBAAgB,GAAG,WAClD;CAEN,OAAO,KAAK,IAAI,GAAG,YAAY"}
@@ -149,6 +149,7 @@ const inputStyles = createComponentStyles({
149
149
  },
150
150
  input: {
151
151
  flex: 1,
152
+ height: 24,
152
153
  fontFamily: "YahooProductSans-Regular",
153
154
  fontSize: 16,
154
155
  lineHeight: 24,
@@ -241,7 +242,9 @@ const avatarStyles = createComponentStyles({
241
242
  justifyContent: "center",
242
243
  borderRadius: 9999,
243
244
  backgroundColor: "#E0E0E0",
244
- overflow: "hidden"
245
+ overflow: "hidden",
246
+ width: 40,
247
+ height: 40
245
248
  },
246
249
  image: {
247
250
  width: "100%",
@@ -251,6 +254,15 @@ const avatarStyles = createComponentStyles({
251
254
  fontFamily: "YahooProductSans-Medium",
252
255
  fontSize: 14,
253
256
  color: "#000000"
257
+ },
258
+ text: {
259
+ fontFamily: "YahooProductSans-Medium",
260
+ fontSize: 16,
261
+ lineHeight: 20
262
+ },
263
+ icon: {
264
+ fontSize: 24,
265
+ lineHeight: 24
254
266
  }
255
267
  });
256
268
  const badgeStyles = createComponentStyles({
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.cts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAkEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,cAmCZ,YAAA,EAAY,MAAA;AAAA,cAqBZ,WAAA,EAAW,MAAA;AAAA,cAmBX,UAAA,EAAU,MAAA;AAAA,cAsBV,aAAA,EAAa,MAAA;AAAA,cAiBb,UAAA,EAAU,MAAA;AAAA,cAgBV,WAAA,EAAW,MAAA;AAAA,cA+CX,gBAAA,EAAgB,MAAA;AAAA,cAehB,iBAAA,EAAiB,MAAA;AAAA,cA0BjB,WAAA,EAAW,MAAA;AAAA,cASX,aAAA,EAAa,MAAA;AAAA,cAmCb,UAAA,EAAU,MAAA;AAAA,cASV,gBAAA,EAAgB,MAAA;AAAA,cAuBhB,WAAA,EAAW,MAAA;AAAA,cAuCX,WAAA,EAAW,MAAA;AAAA,cAiDX,YAAA,EAAY,MAAA;AAAA,cASZ,mBAAA,EAAmB,MAAA;AAAA,cAanB,gBAAA,EAAgB,MAAA;AAAA,UAeZ,UAAA;EACf,KAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EAAA,CACC,GAAA;AAAA"}
1
+ {"version":3,"file":"styles.d.cts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA8Ga,MAAA,EAAM,MAAA;AAAA,cAKN,YAAA,EAAY,MAAA;AAAA,cAgCZ,UAAA,EAAU,MAAA;AAAA,cAUV,WAAA,EAAW,MAAA;AAAA,cAmEX,cAAA,EAAc,MAAA;AAAA,cA2Bd,YAAA,EAAY,MAAA;AAAA,cAmCZ,YAAA,EAAY,MAAA;AAAA,cAgCZ,WAAA,EAAW,MAAA;AAAA,cAmBX,UAAA,EAAU,MAAA;AAAA,cAsBV,aAAA,EAAa,MAAA;AAAA,cAiBb,UAAA,EAAU,MAAA;AAAA,cAgBV,WAAA,EAAW,MAAA;AAAA,cA+CX,gBAAA,EAAgB,MAAA;AAAA,cAehB,iBAAA,EAAiB,MAAA;AAAA,cA0BjB,WAAA,EAAW,MAAA;AAAA,cASX,aAAA,EAAa,MAAA;AAAA,cAmCb,UAAA,EAAU,MAAA;AAAA,cASV,gBAAA,EAAgB,MAAA;AAAA,cAuBhB,WAAA,EAAW,MAAA;AAAA,cAuCX,WAAA,EAAW,MAAA;AAAA,cAiDX,YAAA,EAAY,MAAA;AAAA,cASZ,mBAAA,EAAmB,MAAA;AAAA,cAanB,gBAAA,EAAgB,MAAA;AAAA,UAeZ,UAAA;EACf,KAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EAAA,CACC,GAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"mappings":";;;;;;;;;;cA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,MAAA;AAAA,cAgBV,WAAA,EAAW,MAAA;AAAA,cA+CX,gBAAA,EAAgB,MAAA;AAAA,cAehB,iBAAA,EAAiB,MAAA;AAAA,cA0BjB,WAAA,EAAW,MAAA;AAAA,cASX,aAAA,EAAa,MAAA;AAAA,cAmCb,UAAA,EAAU,MAAA;AAAA,cASV,gBAAA,EAAgB,MAAA;AAAA,cAuBhB,WAAA,EAAW,MAAA;AAAA,cAuCX,WAAA,EAAW,MAAA;AAAA,cAiDX,YAAA,EAAY,MAAA;AAAA,cASZ,mBAAA,EAAmB,MAAA;AAAA,cAanB,gBAAA,EAAgB,MAAA;AAAA,UAeZ,UAAA;EACf,KAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EAAA,CACC,GAAA;AAAA"}
@@ -149,6 +149,7 @@ const inputStyles = createComponentStyles({
149
149
  },
150
150
  input: {
151
151
  flex: 1,
152
+ height: 24,
152
153
  fontFamily: "YahooProductSans-Regular",
153
154
  fontSize: 16,
154
155
  lineHeight: 24,
@@ -241,7 +242,9 @@ const avatarStyles = createComponentStyles({
241
242
  justifyContent: "center",
242
243
  borderRadius: 9999,
243
244
  backgroundColor: "#E0E0E0",
244
- overflow: "hidden"
245
+ overflow: "hidden",
246
+ width: 40,
247
+ height: 40
245
248
  },
246
249
  image: {
247
250
  width: "100%",
@@ -251,6 +254,15 @@ const avatarStyles = createComponentStyles({
251
254
  fontFamily: "YahooProductSans-Medium",
252
255
  fontSize: 14,
253
256
  color: "#000000"
257
+ },
258
+ text: {
259
+ fontFamily: "YahooProductSans-Medium",
260
+ fontSize: 16,
261
+ lineHeight: 20
262
+ },
263
+ icon: {
264
+ fontSize: 24,
265
+ lineHeight: 24
254
266
  }
255
267
  });
256
268
  const badgeStyles = createComponentStyles({
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"sourcesContent":["/**\n * Jest mock for generated/styles.\n *\n * Provides proxy-based mocks for the generated style objects\n * (styles, buttonStyles, etc.) with useVariants as a no-op.\n */\n\n/// <reference types=\"jest\" />\n\n// Default style values for foundation\nconst defaultFoundation = {\n // Layout\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n justifyContent: 'flex-start',\n // Spacing\n padding: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n margin: 0,\n gap: 0,\n // Colors\n backgroundColor: 'transparent',\n color: '#000000',\n borderColor: 'transparent',\n // Border\n borderWidth: 0,\n borderRadius: 0,\n // Typography\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 'regular',\n // Effects\n opacity: 1,\n boxShadow: '',\n};\n\n// Create a style object with useVariants attached\nfunction createStyleObject(baseStyles: Record<string, unknown> = {}) {\n const useVariants = jest.fn();\n const proxy = new Proxy(\n { ...defaultFoundation, ...baseStyles, useVariants },\n {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return sensible defaults for unknown properties\n if (typeof prop === 'string') {\n if (prop.includes('color') || prop.includes('Color')) {\n return '#000000';\n }\n if (prop.includes('width') || prop.includes('Width')) {\n return 0;\n }\n if (prop.includes('radius') || prop.includes('Radius')) {\n return 0;\n }\n if (prop.includes('size') || prop.includes('Size')) {\n return 16;\n }\n if (prop.includes('spacing') || prop.includes('Spacing')) {\n return 0;\n }\n if (prop.includes('gap') || prop.includes('Gap')) {\n return 0;\n }\n }\n return undefined;\n },\n },\n );\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Create a component style object (like buttonStyles) with multiple style keys\nfunction createComponentStyles(styleKeys: Record<string, Record<string, unknown>>) {\n const useVariants = jest.fn();\n const result: Record<string, unknown> = { useVariants };\n\n for (const [key, baseStyles] of Object.entries(styleKeys)) {\n result[key] = createStyleObject(baseStyles);\n }\n\n const proxy = new Proxy(result, {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return a default style object for any unknown key\n if (typeof prop === 'string') {\n return createStyleObject();\n }\n return undefined;\n },\n });\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Main styles export\nexport const styles = createComponentStyles({\n foundation: defaultFoundation,\n});\n\n// Button styles\nexport const buttonStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 10,\n backgroundColor: '#6001D2',\n borderRadius: 8,\n borderWidth: 0,\n borderColor: 'transparent',\n opacity: 1,\n boxShadow: '',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#FFFFFF',\n },\n icon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#FFFFFF',\n },\n});\n\n// Text styles\nexport const textStyles = createComponentStyles({\n root: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Input styles\nexport const inputStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n inputContainer: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 12,\n paddingVertical: 10,\n backgroundColor: '#FFFFFF',\n borderRadius: 8,\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n input: {\n flex: 1,\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 16,\n lineHeight: 24,\n color: '#000000',\n },\n helperText: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n color: '#666666',\n },\n labelRequired: {\n color: '#6001D2',\n },\n inputWrapper: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n },\n inputWrapperStatic: {\n paddingHorizontal: 12,\n gap: 8,\n },\n inputWrapperDynamic: {\n borderWidth: 1,\n borderRadius: 8,\n },\n inputPlaceholder: {\n color: '#666666',\n },\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n helperIcon: {\n color: '#666666',\n },\n});\n\n// Checkbox styles\nexport const checkboxStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n checkbox: {\n width: 20,\n height: 20,\n borderRadius: 4,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n checkboxIcon: {\n color: '#6001D2',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Switch styles\nexport const switchStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n switch: {\n width: 48,\n height: 28,\n padding: 2,\n borderRadius: 14,\n backgroundColor: '#E0E0E0',\n },\n handle: {\n width: 24,\n height: 24,\n borderRadius: 12,\n backgroundColor: '#FFFFFF',\n },\n handleIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Avatar styles\nexport const avatarStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 9999,\n backgroundColor: '#E0E0E0',\n overflow: 'hidden',\n },\n image: {\n width: '100%',\n height: '100%',\n },\n initials: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n color: '#000000',\n },\n});\n\n// Badge styles\nexport const badgeStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 8,\n paddingVertical: 2,\n borderRadius: 4,\n backgroundColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n});\n\n// Chip styles\nexport const chipStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n paddingHorizontal: 12,\n paddingVertical: 6,\n borderRadius: 16,\n backgroundColor: '#F5F5F5',\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Divider styles\nexport const dividerStyles = createComponentStyles({\n root: {\n gap: 8,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n line: {\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n});\n\n// Link styles\nexport const linkStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#6001D2',\n textDecorationLine: 'underline',\n },\n});\n\n// Radio styles\nexport const radioStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n // Keys used by Radio.tsx (mirror the generated styles)\n radio: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n radioCircle: {\n backgroundColor: '#6001D2',\n },\n circle: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n dot: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: '#6001D2',\n },\n label: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// IconButton styles\nexport const iconButtonStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 8,\n backgroundColor: 'transparent',\n },\n icon: {\n fontSize: 24,\n color: '#000000',\n },\n});\n\n// BottomSheet styles\nexport const bottomSheetStyles = createComponentStyles({\n root: {\n backgroundColor: '#ffffff',\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n borderColor: '#e0e0e0',\n borderWidth: 1,\n borderRadius: 16,\n paddingHorizontal: 16,\n paddingVertical: 8,\n marginHorizontal: 8,\n marginBottom: 8,\n },\n header: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 16,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#000000',\n },\n handleIndicator: {\n backgroundColor: '#999999',\n },\n});\n\n// Scrim styles\nexport const scrimStyles = createComponentStyles({\n root: {\n backgroundColor: '#000000',\n opacity: 0.2,\n backgroundBlurRadius: 0,\n },\n});\n\n// Popover styles\nexport const popoverStyles = createComponentStyles({\n root: {\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.12)',\n },\n blur: {\n backgroundBlurRadius: 0,\n },\n closeIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n closeIconContainer: {\n padding: 8,\n },\n contentWrapper: {\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 16,\n },\n svgBase: {\n borderRadius: 16,\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n backgroundColor: '#ffffff',\n backgroundOpacity: 1,\n },\n svgBorder: {\n borderColor: '#e0e0e0',\n borderWidth: 1,\n },\n});\n\n// Tabs (tab list chrome)\nexport const tabsStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n});\n\n// Pagination styles\nexport const paginationStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n item: {\n alignItems: 'center',\n justifyContent: 'center',\n padding: 8,\n borderRadius: 999,\n },\n text: {\n fontSize: 14,\n lineHeight: 16,\n },\n icon: {\n fontSize: 16,\n lineHeight: 16,\n },\n});\n\n// Toast styles\nexport const toastStyles = createComponentStyles({\n root: {\n alignItems: 'center',\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 12,\n borderWidth: 1,\n boxShadow: '',\n flexDirection: 'row',\n gap: 8,\n paddingHorizontal: 12,\n paddingVertical: 10,\n },\n text: {\n color: '#000000',\n },\n icon: {\n color: '#000000',\n fontSize: 16,\n iconSizeToken: 'md',\n lineHeight: 16,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 12,\n iconSizeToken: 'sm',\n lineHeight: 12,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n },\n});\n\n// Modal styles\nexport const modalStyles = createComponentStyles({\n root: {\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 16,\n borderWidth: 1,\n boxShadow: '',\n paddingVertical: 32,\n },\n actions: {\n gap: 12,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 24,\n iconSizeToken: 'md',\n lineHeight: 24,\n },\n closeIconContainer: {\n padding: 8,\n },\n description: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 18,\n letterSpacing: 0,\n lineHeight: 28,\n },\n scrim: {\n padding: 32,\n },\n spacingHorizontal: {\n paddingHorizontal: 32,\n },\n title: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 28,\n letterSpacing: 0,\n lineHeight: 36,\n },\n titleDescriptionWrapper: {\n gap: 8,\n },\n});\n\n// Select styles\nexport const selectStyles = createComponentStyles({\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n});\n\nexport const selectContentStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderWidth: 1,\n borderRadius: 8,\n boxShadow: '',\n gap: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n },\n});\n\nexport const selectItemStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n paddingHorizontal: 16,\n paddingVertical: 8,\n },\n text: {\n color: '#000000',\n },\n endIcon: {\n color: '#6001D2',\n },\n});\n\n// Type for StyleProps\nexport interface StyleProps {\n color?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n [key: string]: unknown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,oBAAoB;CAExB,SAAS;CACT,eAAe;CACf,YAAY;CACZ,gBAAgB;CAEhB,SAAS;CACT,mBAAmB;CACnB,iBAAiB;CACjB,QAAQ;CACR,KAAK;CAEL,iBAAiB;CACjB,OAAO;CACP,aAAa;CAEb,aAAa;CACb,cAAc;CAEd,YAAY;CACZ,UAAU;CACV,YAAY;CACZ,YAAY;CAEZ,SAAS;CACT,WAAW;CACZ;AAGD,SAAS,kBAAkB,aAAsC,EAAE,EAAE;CACnE,MAAM,cAAc,KAAK,IAAI;CAC7B,MAAM,QAAQ,IAAI,MAChB;EAAE,GAAG;EAAmB,GAAG;EAAY;EAAa,EACpD,EACE,IAAI,QAAQ,MAAM;EAChB,IAAI,SAAS,eACX,OAAO;EAET,IAAI,QAAQ,QACV,OAAO,OAAO;EAGhB,IAAI,OAAO,SAAS,UAAU;GAC5B,IAAI,KAAK,SAAS,QAAQ,IAAI,KAAK,SAAS,QAAQ,EAClD,OAAO;GAET,IAAI,KAAK,SAAS,QAAQ,IAAI,KAAK,SAAS,QAAQ,EAClD,OAAO;GAET,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,SAAS,EACpD,OAAO;GAET,IAAI,KAAK,SAAS,OAAO,IAAI,KAAK,SAA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C;AAEF,MAAa,sBAAsB,sBAAsB,EACvD,MAAM;CACJ,iBAAiB;CACjB,aAAa;CACb,aAAa;CACb,cAAc;CACd,WAAW;CACX,KAAK;CACL,mBAAmB;CACnB,iBAAiB;CAClB,EACF,CAAC;AAEF,MAAa,mBAAmB,sBAAsB;CACpD,MAAM;EACJ,iBAAiB;EACjB,mBAAmB;EACnB,iBAAiB;EAClB;CACD,MAAM,EACJ,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACF,CAAC"}
1
+ {"version":3,"file":"styles.js","names":[],"sources":["../../../src/jest/mocks/styles.ts"],"sourcesContent":["/**\n * Jest mock for generated/styles.\n *\n * Provides proxy-based mocks for the generated style objects\n * (styles, buttonStyles, etc.) with useVariants as a no-op.\n */\n\n/// <reference types=\"jest\" />\n\n// Default style values for foundation\nconst defaultFoundation = {\n // Layout\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n justifyContent: 'flex-start',\n // Spacing\n padding: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n margin: 0,\n gap: 0,\n // Colors\n backgroundColor: 'transparent',\n color: '#000000',\n borderColor: 'transparent',\n // Border\n borderWidth: 0,\n borderRadius: 0,\n // Typography\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 'regular',\n // Effects\n opacity: 1,\n boxShadow: '',\n};\n\n// Create a style object with useVariants attached\nfunction createStyleObject(baseStyles: Record<string, unknown> = {}) {\n const useVariants = jest.fn();\n const proxy = new Proxy(\n { ...defaultFoundation, ...baseStyles, useVariants },\n {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return sensible defaults for unknown properties\n if (typeof prop === 'string') {\n if (prop.includes('color') || prop.includes('Color')) {\n return '#000000';\n }\n if (prop.includes('width') || prop.includes('Width')) {\n return 0;\n }\n if (prop.includes('radius') || prop.includes('Radius')) {\n return 0;\n }\n if (prop.includes('size') || prop.includes('Size')) {\n return 16;\n }\n if (prop.includes('spacing') || prop.includes('Spacing')) {\n return 0;\n }\n if (prop.includes('gap') || prop.includes('Gap')) {\n return 0;\n }\n }\n return undefined;\n },\n },\n );\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Create a component style object (like buttonStyles) with multiple style keys\nfunction createComponentStyles(styleKeys: Record<string, Record<string, unknown>>) {\n const useVariants = jest.fn();\n const result: Record<string, unknown> = { useVariants };\n\n for (const [key, baseStyles] of Object.entries(styleKeys)) {\n result[key] = createStyleObject(baseStyles);\n }\n\n const proxy = new Proxy(result, {\n get(target, prop) {\n if (prop === 'useVariants') {\n return useVariants;\n }\n if (prop in target) {\n return target[prop as keyof typeof target];\n }\n // Return a default style object for any unknown key\n if (typeof prop === 'string') {\n return createStyleObject();\n }\n return undefined;\n },\n });\n useVariants.mockReturnValue(proxy);\n return proxy;\n}\n\n// Main styles export\nexport const styles = createComponentStyles({\n foundation: defaultFoundation,\n});\n\n// Button styles\nexport const buttonStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 10,\n backgroundColor: '#6001D2',\n borderRadius: 8,\n borderWidth: 0,\n borderColor: 'transparent',\n opacity: 1,\n boxShadow: '',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#FFFFFF',\n },\n icon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#FFFFFF',\n },\n});\n\n// Text styles\nexport const textStyles = createComponentStyles({\n root: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Input styles\nexport const inputStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n inputContainer: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 12,\n paddingVertical: 10,\n backgroundColor: '#FFFFFF',\n borderRadius: 8,\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n input: {\n flex: 1,\n height: 24,\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 16,\n lineHeight: 24,\n color: '#000000',\n },\n helperText: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n color: '#666666',\n },\n labelRequired: {\n color: '#6001D2',\n },\n inputWrapper: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n },\n inputWrapperStatic: {\n paddingHorizontal: 12,\n gap: 8,\n },\n inputWrapperDynamic: {\n borderWidth: 1,\n borderRadius: 8,\n },\n inputPlaceholder: {\n color: '#666666',\n },\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n helperIcon: {\n color: '#666666',\n },\n});\n\n// Checkbox styles\nexport const checkboxStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n checkbox: {\n width: 20,\n height: 20,\n borderRadius: 4,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n checkboxIcon: {\n color: '#6001D2',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Switch styles\nexport const switchStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n switch: {\n width: 48,\n height: 28,\n padding: 2,\n borderRadius: 14,\n backgroundColor: '#E0E0E0',\n },\n handle: {\n width: 24,\n height: 24,\n borderRadius: 12,\n backgroundColor: '#FFFFFF',\n },\n handleIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Avatar styles\nexport const avatarStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 9999,\n backgroundColor: '#E0E0E0',\n overflow: 'hidden',\n width: 40,\n height: 40,\n },\n image: {\n width: '100%',\n height: '100%',\n },\n initials: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 16,\n lineHeight: 20,\n },\n icon: {\n fontSize: 24,\n lineHeight: 24,\n },\n});\n\n// Badge styles\nexport const badgeStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 8,\n paddingVertical: 2,\n borderRadius: 4,\n backgroundColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n});\n\n// Chip styles\nexport const chipStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n paddingHorizontal: 12,\n paddingVertical: 6,\n borderRadius: 16,\n backgroundColor: '#F5F5F5',\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n text: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// Divider styles\nexport const dividerStyles = createComponentStyles({\n root: {\n gap: 8,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 12,\n lineHeight: 16,\n color: '#000000',\n },\n line: {\n borderWidth: 1,\n borderColor: '#E0E0E0',\n },\n});\n\n// Link styles\nexport const linkStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#6001D2',\n textDecorationLine: 'underline',\n },\n});\n\n// Radio styles\nexport const radioStyles = createComponentStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n // Keys used by Radio.tsx (mirror the generated styles)\n radio: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n radioCircle: {\n backgroundColor: '#6001D2',\n },\n circle: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: '#6001D2',\n backgroundColor: 'transparent',\n },\n dot: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: '#6001D2',\n },\n label: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n text: {\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n },\n});\n\n// IconButton styles\nexport const iconButtonStyles = createComponentStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 8,\n backgroundColor: 'transparent',\n },\n icon: {\n fontSize: 24,\n color: '#000000',\n },\n});\n\n// BottomSheet styles\nexport const bottomSheetStyles = createComponentStyles({\n root: {\n backgroundColor: '#ffffff',\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n borderColor: '#e0e0e0',\n borderWidth: 1,\n borderRadius: 16,\n paddingHorizontal: 16,\n paddingVertical: 8,\n marginHorizontal: 8,\n marginBottom: 8,\n },\n header: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 16,\n letterSpacing: 0,\n lineHeight: 20,\n color: '#000000',\n },\n handleIndicator: {\n backgroundColor: '#999999',\n },\n});\n\n// Scrim styles\nexport const scrimStyles = createComponentStyles({\n root: {\n backgroundColor: '#000000',\n opacity: 0.2,\n backgroundBlurRadius: 0,\n },\n});\n\n// Popover styles\nexport const popoverStyles = createComponentStyles({\n root: {\n boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.12)',\n },\n blur: {\n backgroundBlurRadius: 0,\n },\n closeIcon: {\n fontSize: 16,\n iconSizeToken: 'sm',\n lineHeight: 16,\n color: '#000000',\n },\n closeIconContainer: {\n padding: 8,\n },\n contentWrapper: {\n gap: 8,\n paddingHorizontal: 16,\n paddingVertical: 16,\n },\n svgBase: {\n borderRadius: 16,\n backgroundBlurColor: '#ffffff',\n backgroundBlurRadius: 0,\n backgroundColor: '#ffffff',\n backgroundOpacity: 1,\n },\n svgBorder: {\n borderColor: '#e0e0e0',\n borderWidth: 1,\n },\n});\n\n// Tabs (tab list chrome)\nexport const tabsStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n});\n\n// Pagination styles\nexport const paginationStyles = createComponentStyles({\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n item: {\n alignItems: 'center',\n justifyContent: 'center',\n padding: 8,\n borderRadius: 999,\n },\n text: {\n fontSize: 14,\n lineHeight: 16,\n },\n icon: {\n fontSize: 16,\n lineHeight: 16,\n },\n});\n\n// Toast styles\nexport const toastStyles = createComponentStyles({\n root: {\n alignItems: 'center',\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 12,\n borderWidth: 1,\n boxShadow: '',\n flexDirection: 'row',\n gap: 8,\n paddingHorizontal: 12,\n paddingVertical: 10,\n },\n text: {\n color: '#000000',\n },\n icon: {\n color: '#000000',\n fontSize: 16,\n iconSizeToken: 'md',\n lineHeight: 16,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 12,\n iconSizeToken: 'sm',\n lineHeight: 12,\n },\n label: {\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 14,\n letterSpacing: 0,\n lineHeight: 20,\n },\n});\n\n// Modal styles\nexport const modalStyles = createComponentStyles({\n root: {\n backgroundBlurColor: 'rgba(255, 255, 255, 0.9)',\n backgroundBlurRadius: 0,\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderRadius: 16,\n borderWidth: 1,\n boxShadow: '',\n paddingVertical: 32,\n },\n actions: {\n gap: 12,\n },\n closeIcon: {\n color: '#000000',\n fontSize: 24,\n iconSizeToken: 'md',\n lineHeight: 24,\n },\n closeIconContainer: {\n padding: 8,\n },\n description: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Regular',\n fontSize: 18,\n letterSpacing: 0,\n lineHeight: 28,\n },\n scrim: {\n padding: 32,\n },\n spacingHorizontal: {\n paddingHorizontal: 32,\n },\n title: {\n color: '#000000',\n fontFamily: 'YahooProductSans-Medium',\n fontSize: 28,\n letterSpacing: 0,\n lineHeight: 36,\n },\n titleDescriptionWrapper: {\n gap: 8,\n },\n});\n\n// Select styles\nexport const selectStyles = createComponentStyles({\n startIcon: {\n color: '#666666',\n },\n endIcon: {\n color: '#666666',\n },\n});\n\nexport const selectContentStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n borderColor: '#E0E0E0',\n borderWidth: 1,\n borderRadius: 8,\n boxShadow: '',\n gap: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n },\n});\n\nexport const selectItemStyles = createComponentStyles({\n root: {\n backgroundColor: '#FFFFFF',\n paddingHorizontal: 16,\n paddingVertical: 8,\n },\n text: {\n color: '#000000',\n },\n endIcon: {\n color: '#6001D2',\n },\n});\n\n// Type for StyleProps\nexport interface StyleProps {\n color?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n [key: string]: unknown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,oBAAoB;CAExB,SAAS;CACT,eAAe;CACf,YAAY;CACZ,gBAAgB;CAEhB,SAAS;CACT,mBAAmB;CACnB,iBAAiB;CACjB,QAAQ;CACR,KAAK;CAEL,iBAAiB;CACjB,OAAO;CACP,aAAa;CAEb,aAAa;CACb,cAAc;CAEd,YAAY;CACZ,UAAU;CACV,YAA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ACf,YAAY;EACb;CACD,OAAO;EACL,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACF,CAAC;AAGF,MAAa,cAAc,sBAAsB;CAC/C,MAAM;EACJ,qBAAqB;EACrB,sBAAsB;EACtB,iBAAiB;EACjB,aAAa;EACb,cAAc;EACd,aAAa;EACb,WAAW;EACX,iBAAiB;EAClB;CACD,SAAS,EACP,KAAK,IACN;CACD,WAAW;EACT,OAAO;EACP,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACD,oBAAoB,EAClB,SAAS,GACV;CACD,aAAa;EACX,OAAO;EACP,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACD,OAAO,EACL,SAAS,IACV;CACD,mBAAmB,EACjB,mBAAmB,IACpB;CACD,OAAO;EACL,OAAO;EACP,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACb;CACD,yBAAyB,EACvB,KAAK,GACN;CACF,CAAC;AAGF,MAAa,eAAe,sBAAsB;CAChD,WAAW,EACT,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACF,CAAC;AAEF,MAAa,sBAAsB,sBAAsB,EACvD,MAAM;CACJ,iBAAiB;CACjB,aAAa;CACb,aAAa;CACb,cAAc;CACd,WAAW;CACX,KAAK;CACL,mBAAmB;CACnB,iBAAiB;CAClB,EACF,CAAC;AAEF,MAAa,mBAAmB,sBAAsB;CACpD,MAAM;EACJ,iBAAiB;EACjB,mBAAmB;EACnB,iBAAiB;EAClB;CACD,MAAM,EACJ,OAAO,WACR;CACD,SAAS,EACP,OAAO,WACR;CACF,CAAC"}
package/dist/portal.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./_virtual/_rolldown/runtime.cjs");
4
+ const require_fontScaling_FontScalingContext = require("./fontScaling/FontScalingContext.cjs");
4
5
  let react = require("react");
5
6
  let react_native = require("react-native");
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -41,11 +42,16 @@ const PortalHost = (0, react.memo)(function PortalHost({ state }) {
41
42
  function Portal({ children }) {
42
43
  const id = (0, react.useId)();
43
44
  const { register, unregister } = usePortalContext();
45
+ const fontScalingConfig = (0, react.useContext)(require_fontScaling_FontScalingContext.FontScalingContext);
46
+ const bridgedChildren = (0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fontScaling_FontScalingContext.FontScalingContext.Provider, {
47
+ value: fontScalingConfig,
48
+ children
49
+ }), [children, fontScalingConfig]);
44
50
  (0, react.useEffect)(() => {
45
- register(id, children);
51
+ register(id, bridgedChildren);
46
52
  }, [
47
53
  id,
48
- children,
54
+ bridgedChildren,
49
55
  register
50
56
  ]);
51
57
  (0, react.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"portal.d.cts","names":[],"sources":["../src/portal.tsx"],"mappings":";;;;;UA4CU,kBAAA;EACR,QAAA,GAAW,EAAA,UAAY,IAAA,EAAM,SAAA;EAC7B,UAAA,GAAa,EAAA;AAAA;AAAA,iBAKN,gBAAA,CAAA,GAAoB,kBAAA;AAAA,iBAgCpB,MAAA,CAAA;EAAS;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA;AAAA,iBAmBjC,cAAA,CAAA;EAAiB;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA,IAAW,OAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"portal.d.cts","names":[],"sources":["../src/portal.tsx"],"mappings":";;;;;UA8CU,kBAAA;EACR,QAAA,GAAW,EAAA,UAAY,IAAA,EAAM,SAAA;EAC7B,UAAA,GAAa,EAAA;AAAA;AAAA,iBAKN,gBAAA,CAAA,GAAoB,kBAAA;AAAA,iBAgCpB,MAAA,CAAA;EAAS;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA;AAAA,iBA+BjC,cAAA,CAAA;EAAiB;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA,IAAW,OAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"portal.d.ts","names":[],"sources":["../src/portal.tsx"],"mappings":";;;;;UA4CU,kBAAA;EACR,QAAA,GAAW,EAAA,UAAY,IAAA,EAAM,SAAA;EAC7B,UAAA,GAAa,EAAA;AAAA;AAAA,iBAKN,gBAAA,CAAA,GAAoB,kBAAA;AAAA,iBAgCpB,MAAA,CAAA;EAAS;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA;AAAA,iBAmBjC,cAAA,CAAA;EAAiB;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA,IAAW,OAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"portal.d.ts","names":[],"sources":["../src/portal.tsx"],"mappings":";;;;;UA8CU,kBAAA;EACR,QAAA,GAAW,EAAA,UAAY,IAAA,EAAM,SAAA;EAC7B,UAAA,GAAa,EAAA;AAAA;AAAA,iBAKN,gBAAA,CAAA,GAAoB,kBAAA;AAAA,iBAgCpB,MAAA,CAAA;EAAS;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA;AAAA,iBA+BjC,cAAA,CAAA;EAAiB;AAAA;EAAc,QAAA,EAAU,SAAA;AAAA,IAAW,OAAA,CAAA,GAAA,CAAA,OAAA"}
package/dist/portal.js CHANGED
@@ -1,4 +1,5 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { FontScalingContext } from "./fontScaling/FontScalingContext.js";
2
3
  import { createContext, memo, useCallback, useContext, useEffect, useId, useMemo, useReducer } from "react";
3
4
  import { StyleSheet, View } from "react-native";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -39,11 +40,16 @@ const PortalHost = memo(function PortalHost({ state }) {
39
40
  function Portal({ children }) {
40
41
  const id = useId();
41
42
  const { register, unregister } = usePortalContext();
43
+ const fontScalingConfig = useContext(FontScalingContext);
44
+ const bridgedChildren = useMemo(() => /* @__PURE__ */ jsx(FontScalingContext.Provider, {
45
+ value: fontScalingConfig,
46
+ children
47
+ }), [children, fontScalingConfig]);
42
48
  useEffect(() => {
43
- register(id, children);
49
+ register(id, bridgedChildren);
44
50
  }, [
45
51
  id,
46
- children,
52
+ bridgedChildren,
47
53
  register
48
54
  ]);
49
55
  useEffect(() => {