@yahoo/uds-mobile 1.0.0

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 (447) hide show
  1. package/CONTRIBUTING.md +1174 -0
  2. package/README.md +614 -0
  3. package/cli/uds-mobile.js +10 -0
  4. package/dist/_virtual/rolldown_runtime.cjs +30 -0
  5. package/dist/bin/generateTheme.mjs +390 -0
  6. package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +74 -0
  7. package/dist/bin/uds/dist/fixtures.mjs +404 -0
  8. package/dist/bin/uds/dist/tokens/configs/palette/alwaysPalette.mjs +23 -0
  9. package/dist/bin/uds/dist/tokens/consts/defaultModes.mjs +6 -0
  10. package/dist/bin/uds/dist/tokens/consts/fontDeclarationsMap.mjs +652 -0
  11. package/dist/bin/uds-mobile.mjs +256 -0
  12. package/dist/components/Avatar.cjs +109 -0
  13. package/dist/components/Avatar.d.cts +60 -0
  14. package/dist/components/Avatar.d.cts.map +1 -0
  15. package/dist/components/Avatar.d.mts +60 -0
  16. package/dist/components/Avatar.d.mts.map +1 -0
  17. package/dist/components/Avatar.mjs +109 -0
  18. package/dist/components/Avatar.mjs.map +1 -0
  19. package/dist/components/Badge.cjs +68 -0
  20. package/dist/components/Badge.d.cts +43 -0
  21. package/dist/components/Badge.d.cts.map +1 -0
  22. package/dist/components/Badge.d.mts +43 -0
  23. package/dist/components/Badge.d.mts.map +1 -0
  24. package/dist/components/Badge.mjs +68 -0
  25. package/dist/components/Badge.mjs.map +1 -0
  26. package/dist/components/Box.cjs +114 -0
  27. package/dist/components/Box.d.cts +87 -0
  28. package/dist/components/Box.d.cts.map +1 -0
  29. package/dist/components/Box.d.mts +87 -0
  30. package/dist/components/Box.d.mts.map +1 -0
  31. package/dist/components/Box.mjs +114 -0
  32. package/dist/components/Box.mjs.map +1 -0
  33. package/dist/components/Button.cjs +187 -0
  34. package/dist/components/Button.d.cts +56 -0
  35. package/dist/components/Button.d.cts.map +1 -0
  36. package/dist/components/Button.d.mts +56 -0
  37. package/dist/components/Button.d.mts.map +1 -0
  38. package/dist/components/Button.mjs +186 -0
  39. package/dist/components/Button.mjs.map +1 -0
  40. package/dist/components/Checkbox.cjs +156 -0
  41. package/dist/components/Checkbox.d.cts +48 -0
  42. package/dist/components/Checkbox.d.cts.map +1 -0
  43. package/dist/components/Checkbox.d.mts +48 -0
  44. package/dist/components/Checkbox.d.mts.map +1 -0
  45. package/dist/components/Checkbox.mjs +155 -0
  46. package/dist/components/Checkbox.mjs.map +1 -0
  47. package/dist/components/Chip.cjs +124 -0
  48. package/dist/components/Chip.d.cts +60 -0
  49. package/dist/components/Chip.d.cts.map +1 -0
  50. package/dist/components/Chip.d.mts +60 -0
  51. package/dist/components/Chip.d.mts.map +1 -0
  52. package/dist/components/Chip.mjs +124 -0
  53. package/dist/components/Chip.mjs.map +1 -0
  54. package/dist/components/HStack.cjs +46 -0
  55. package/dist/components/HStack.d.cts +41 -0
  56. package/dist/components/HStack.d.cts.map +1 -0
  57. package/dist/components/HStack.d.mts +41 -0
  58. package/dist/components/HStack.d.mts.map +1 -0
  59. package/dist/components/HStack.mjs +46 -0
  60. package/dist/components/HStack.mjs.map +1 -0
  61. package/dist/components/Icon.cjs +150 -0
  62. package/dist/components/Icon.d.cts +90 -0
  63. package/dist/components/Icon.d.cts.map +1 -0
  64. package/dist/components/Icon.d.mts +90 -0
  65. package/dist/components/Icon.d.mts.map +1 -0
  66. package/dist/components/Icon.mjs +148 -0
  67. package/dist/components/Icon.mjs.map +1 -0
  68. package/dist/components/IconButton.cjs +127 -0
  69. package/dist/components/IconButton.d.cts +46 -0
  70. package/dist/components/IconButton.d.cts.map +1 -0
  71. package/dist/components/IconButton.d.mts +46 -0
  72. package/dist/components/IconButton.d.mts.map +1 -0
  73. package/dist/components/IconButton.mjs +127 -0
  74. package/dist/components/IconButton.mjs.map +1 -0
  75. package/dist/components/IconSlot.cjs +55 -0
  76. package/dist/components/IconSlot.d.cts +45 -0
  77. package/dist/components/IconSlot.d.cts.map +1 -0
  78. package/dist/components/IconSlot.d.mts +45 -0
  79. package/dist/components/IconSlot.d.mts.map +1 -0
  80. package/dist/components/IconSlot.mjs +55 -0
  81. package/dist/components/IconSlot.mjs.map +1 -0
  82. package/dist/components/Image.cjs +104 -0
  83. package/dist/components/Image.d.cts +85 -0
  84. package/dist/components/Image.d.cts.map +1 -0
  85. package/dist/components/Image.d.mts +85 -0
  86. package/dist/components/Image.d.mts.map +1 -0
  87. package/dist/components/Image.mjs +104 -0
  88. package/dist/components/Image.mjs.map +1 -0
  89. package/dist/components/Input.cjs +174 -0
  90. package/dist/components/Input.d.cts +39 -0
  91. package/dist/components/Input.d.cts.map +1 -0
  92. package/dist/components/Input.d.mts +39 -0
  93. package/dist/components/Input.d.mts.map +1 -0
  94. package/dist/components/Input.mjs +174 -0
  95. package/dist/components/Input.mjs.map +1 -0
  96. package/dist/components/Link.cjs +139 -0
  97. package/dist/components/Link.d.cts +45 -0
  98. package/dist/components/Link.d.cts.map +1 -0
  99. package/dist/components/Link.d.mts +45 -0
  100. package/dist/components/Link.d.mts.map +1 -0
  101. package/dist/components/Link.mjs +138 -0
  102. package/dist/components/Link.mjs.map +1 -0
  103. package/dist/components/Pressable.cjs +120 -0
  104. package/dist/components/Pressable.d.cts +90 -0
  105. package/dist/components/Pressable.d.cts.map +1 -0
  106. package/dist/components/Pressable.d.mts +90 -0
  107. package/dist/components/Pressable.d.mts.map +1 -0
  108. package/dist/components/Pressable.mjs +118 -0
  109. package/dist/components/Pressable.mjs.map +1 -0
  110. package/dist/components/Radio.cjs +153 -0
  111. package/dist/components/Radio.d.cts +46 -0
  112. package/dist/components/Radio.d.cts.map +1 -0
  113. package/dist/components/Radio.d.mts +46 -0
  114. package/dist/components/Radio.d.mts.map +1 -0
  115. package/dist/components/Radio.mjs +152 -0
  116. package/dist/components/Radio.mjs.map +1 -0
  117. package/dist/components/Screen.cjs +89 -0
  118. package/dist/components/Screen.d.cts +53 -0
  119. package/dist/components/Screen.d.cts.map +1 -0
  120. package/dist/components/Screen.d.mts +53 -0
  121. package/dist/components/Screen.d.mts.map +1 -0
  122. package/dist/components/Screen.mjs +89 -0
  123. package/dist/components/Screen.mjs.map +1 -0
  124. package/dist/components/Switch.cjs +172 -0
  125. package/dist/components/Switch.d.cts +42 -0
  126. package/dist/components/Switch.d.cts.map +1 -0
  127. package/dist/components/Switch.d.mts +42 -0
  128. package/dist/components/Switch.d.mts.map +1 -0
  129. package/dist/components/Switch.mjs +171 -0
  130. package/dist/components/Switch.mjs.map +1 -0
  131. package/dist/components/Text.cjs +107 -0
  132. package/dist/components/Text.d.cts +96 -0
  133. package/dist/components/Text.d.cts.map +1 -0
  134. package/dist/components/Text.d.mts +96 -0
  135. package/dist/components/Text.d.mts.map +1 -0
  136. package/dist/components/Text.mjs +107 -0
  137. package/dist/components/Text.mjs.map +1 -0
  138. package/dist/components/VStack.cjs +46 -0
  139. package/dist/components/VStack.d.cts +41 -0
  140. package/dist/components/VStack.d.cts.map +1 -0
  141. package/dist/components/VStack.d.mts +41 -0
  142. package/dist/components/VStack.d.mts.map +1 -0
  143. package/dist/components/VStack.mjs +46 -0
  144. package/dist/components/VStack.mjs.map +1 -0
  145. package/dist/icons/dist/glyphMap.cjs +5475 -0
  146. package/dist/icons/dist/glyphMap.d.cts +10 -0
  147. package/dist/icons/dist/glyphMap.d.cts.map +1 -0
  148. package/dist/icons/dist/glyphMap.d.mts +10 -0
  149. package/dist/icons/dist/glyphMap.d.mts.map +1 -0
  150. package/dist/icons/dist/glyphMap.mjs +5474 -0
  151. package/dist/icons/dist/glyphMap.mjs.map +1 -0
  152. package/dist/icons/dist/svgMap.cjs +525 -0
  153. package/dist/icons/dist/svgMap.d.cts +10 -0
  154. package/dist/icons/dist/svgMap.d.cts.map +1 -0
  155. package/dist/icons/dist/svgMap.d.mts +10 -0
  156. package/dist/icons/dist/svgMap.d.mts.map +1 -0
  157. package/dist/icons/dist/svgMap.mjs +524 -0
  158. package/dist/icons/dist/svgMap.mjs.map +1 -0
  159. package/dist/icons/dist/tokens.cjs +13 -0
  160. package/dist/icons/dist/tokens.mjs +13 -0
  161. package/dist/icons/dist/tokens.mjs.map +1 -0
  162. package/dist/icons/dist/types.d.cts +24 -0
  163. package/dist/icons/dist/types.d.cts.map +1 -0
  164. package/dist/icons/dist/types.d.mts +24 -0
  165. package/dist/icons/dist/types.d.mts.map +1 -0
  166. package/dist/motion.cjs +56 -0
  167. package/dist/motion.d.cts +46 -0
  168. package/dist/motion.d.cts.map +1 -0
  169. package/dist/motion.d.mts +46 -0
  170. package/dist/motion.d.mts.map +1 -0
  171. package/dist/motion.mjs +52 -0
  172. package/dist/motion.mjs.map +1 -0
  173. package/dist/types.cjs +1 -0
  174. package/dist/types.d.cts +13 -0
  175. package/dist/types.d.cts.map +1 -0
  176. package/dist/types.d.mts +13 -0
  177. package/dist/types.d.mts.map +1 -0
  178. package/dist/types.mjs +2 -0
  179. package/dist/uds/dist/components/Box.d.cts +3 -0
  180. package/dist/uds/dist/components/Box.d.mts +3 -0
  181. package/dist/uds/dist/components/Divider/Divider.d.cts +3 -0
  182. package/dist/uds/dist/components/Divider/Divider.d.mts +3 -0
  183. package/dist/uds/dist/components/Divider/DividerCore.d.cts +4 -0
  184. package/dist/uds/dist/components/Divider/DividerCore.d.mts +4 -0
  185. package/dist/uds/dist/components/Divider/DividerInternal.d.cts +4 -0
  186. package/dist/uds/dist/components/Divider/DividerInternal.d.mts +4 -0
  187. package/dist/uds/dist/components/Divider/index.d.cts +2 -0
  188. package/dist/uds/dist/components/Divider/index.d.mts +2 -0
  189. package/dist/uds/dist/components/FormLabel.d.cts +3 -0
  190. package/dist/uds/dist/components/FormLabel.d.mts +4 -0
  191. package/dist/uds/dist/components/HStack.d.cts +4 -0
  192. package/dist/uds/dist/components/HStack.d.mts +4 -0
  193. package/dist/uds/dist/components/Icon.d.cts +3 -0
  194. package/dist/uds/dist/components/Icon.d.mts +3 -0
  195. package/dist/uds/dist/components/Image.d.cts +2 -0
  196. package/dist/uds/dist/components/Image.d.mts +3 -0
  197. package/dist/uds/dist/components/Link.d.cts +3 -0
  198. package/dist/uds/dist/components/Link.d.mts +3 -0
  199. package/dist/uds/dist/components/Text.d.cts +3 -0
  200. package/dist/uds/dist/components/Text.d.mts +3 -0
  201. package/dist/uds/dist/components/VStack.d.cts +4 -0
  202. package/dist/uds/dist/components/VStack.d.mts +4 -0
  203. package/dist/uds/dist/components/client/Avatar/Avatar.d.cts +2 -0
  204. package/dist/uds/dist/components/client/Avatar/Avatar.d.mts +3 -0
  205. package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.cts +2 -0
  206. package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.mts +3 -0
  207. package/dist/uds/dist/components/client/Avatar/AvatarImage.d.cts +4 -0
  208. package/dist/uds/dist/components/client/Avatar/AvatarImage.d.mts +5 -0
  209. package/dist/uds/dist/components/client/Avatar/AvatarText.d.cts +3 -0
  210. package/dist/uds/dist/components/client/Avatar/AvatarText.d.mts +4 -0
  211. package/dist/uds/dist/components/client/Avatar/index.d.cts +5 -0
  212. package/dist/uds/dist/components/client/Avatar/index.d.mts +5 -0
  213. package/dist/uds/dist/components/client/Badge.d.cts +3 -0
  214. package/dist/uds/dist/components/client/Badge.d.mts +3 -0
  215. package/dist/uds/dist/components/client/Button.d.cts +3 -0
  216. package/dist/uds/dist/components/client/Button.d.mts +3 -0
  217. package/dist/uds/dist/components/client/Checkbox.d.cts +3 -0
  218. package/dist/uds/dist/components/client/Checkbox.d.mts +3 -0
  219. package/dist/uds/dist/components/client/Chip/Chip.d.cts +4 -0
  220. package/dist/uds/dist/components/client/Chip/Chip.d.mts +4 -0
  221. package/dist/uds/dist/components/client/Chip/ChipBase.d.cts +4 -0
  222. package/dist/uds/dist/components/client/Chip/ChipBase.d.mts +4 -0
  223. package/dist/uds/dist/components/client/Chip/ChipButton.d.cts +4 -0
  224. package/dist/uds/dist/components/client/Chip/ChipButton.d.mts +4 -0
  225. package/dist/uds/dist/components/client/Chip/ChipDismissible.d.cts +4 -0
  226. package/dist/uds/dist/components/client/Chip/ChipDismissible.d.mts +4 -0
  227. package/dist/uds/dist/components/client/Chip/ChipLink.d.cts +4 -0
  228. package/dist/uds/dist/components/client/Chip/ChipLink.d.mts +4 -0
  229. package/dist/uds/dist/components/client/Chip/ChipToggle.d.cts +4 -0
  230. package/dist/uds/dist/components/client/Chip/ChipToggle.d.mts +4 -0
  231. package/dist/uds/dist/components/client/Chip/index.d.cts +6 -0
  232. package/dist/uds/dist/components/client/Chip/index.d.mts +6 -0
  233. package/dist/uds/dist/components/client/IconButton.d.cts +3 -0
  234. package/dist/uds/dist/components/client/IconButton.d.mts +3 -0
  235. package/dist/uds/dist/components/client/Input/Input.d.cts +4 -0
  236. package/dist/uds/dist/components/client/Input/Input.d.mts +4 -0
  237. package/dist/uds/dist/components/client/Input/InputHelpText.d.cts +2 -0
  238. package/dist/uds/dist/components/client/Input/InputHelpText.d.mts +3 -0
  239. package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.cts +5 -0
  240. package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.mts +6 -0
  241. package/dist/uds/dist/components/client/Input/index.d.cts +3 -0
  242. package/dist/uds/dist/components/client/Input/index.d.mts +3 -0
  243. package/dist/uds/dist/components/client/Menu/Menu.Content.d.cts +4 -0
  244. package/dist/uds/dist/components/client/Menu/Menu.Content.d.mts +4 -0
  245. package/dist/uds/dist/components/client/Menu/Menu.Divider.d.cts +3 -0
  246. package/dist/uds/dist/components/client/Menu/Menu.Divider.d.mts +3 -0
  247. package/dist/uds/dist/components/client/Menu/Menu.Item.d.cts +4 -0
  248. package/dist/uds/dist/components/client/Menu/Menu.Item.d.mts +4 -0
  249. package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +4 -0
  250. package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.mts +4 -0
  251. package/dist/uds/dist/components/client/Menu/Menu.Provider.d.cts +2 -0
  252. package/dist/uds/dist/components/client/Menu/Menu.Provider.d.mts +3 -0
  253. package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.cts +4 -0
  254. package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.mts +4 -0
  255. package/dist/uds/dist/components/client/Menu/Menu.d.cts +2 -0
  256. package/dist/uds/dist/components/client/Menu/Menu.d.mts +2 -0
  257. package/dist/uds/dist/components/client/Menu/Menu.index.d.cts +7 -0
  258. package/dist/uds/dist/components/client/Menu/Menu.index.d.mts +7 -0
  259. package/dist/uds/dist/components/client/Menu/index.d.cts +9 -0
  260. package/dist/uds/dist/components/client/Menu/index.d.mts +9 -0
  261. package/dist/uds/dist/components/client/Pressable.d.cts +3 -0
  262. package/dist/uds/dist/components/client/Pressable.d.mts +3 -0
  263. package/dist/uds/dist/components/client/Radio/Radio.d.cts +3 -0
  264. package/dist/uds/dist/components/client/Radio/Radio.d.mts +3 -0
  265. package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.cts +3 -0
  266. package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.mts +3 -0
  267. package/dist/uds/dist/components/client/Radio/index.d.cts +3 -0
  268. package/dist/uds/dist/components/client/Radio/index.d.mts +3 -0
  269. package/dist/uds/dist/components/client/SpringMotionConfig.d.cts +3 -0
  270. package/dist/uds/dist/components/client/SpringMotionConfig.d.mts +3 -0
  271. package/dist/uds/dist/components/client/Switch.d.cts +3 -0
  272. package/dist/uds/dist/components/client/Switch.d.mts +3 -0
  273. package/dist/uds/dist/components/client/index.d.cts +33 -0
  274. package/dist/uds/dist/components/client/index.d.mts +33 -0
  275. package/dist/uds/dist/components/index.d.cts +40 -0
  276. package/dist/uds/dist/components/index.d.mts +40 -0
  277. package/dist/uds/dist/index.d.cts +46 -0
  278. package/dist/uds/dist/index.d.mts +46 -0
  279. package/dist/uds/dist/styles/styler.d.cts +2 -0
  280. package/dist/uds/dist/styles/styler.d.mts +2 -0
  281. package/dist/uds/dist/styles/stylerTypes.d.cts +2 -0
  282. package/dist/uds/dist/styles/stylerTypes.d.mts +2 -0
  283. package/dist/uds/dist/tokens/automation/configs/avatar.d.cts +2 -0
  284. package/dist/uds/dist/tokens/automation/configs/avatar.d.mts +2 -0
  285. package/dist/uds/dist/tokens/automation/properties.d.cts +3 -0
  286. package/dist/uds/dist/tokens/automation/properties.d.mts +3 -0
  287. package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.cts +3 -0
  288. package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.mts +3 -0
  289. package/dist/uds/dist/tokens/configs/motion.cjs +109 -0
  290. package/dist/uds/dist/tokens/configs/motion.d.cts +20 -0
  291. package/dist/uds/dist/tokens/configs/motion.d.cts.map +1 -0
  292. package/dist/uds/dist/tokens/configs/motion.d.mts +20 -0
  293. package/dist/uds/dist/tokens/configs/motion.d.mts.map +1 -0
  294. package/dist/uds/dist/tokens/configs/motion.mjs +108 -0
  295. package/dist/uds/dist/tokens/configs/motion.mjs.map +1 -0
  296. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts +32 -0
  297. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts.map +1 -0
  298. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts +32 -0
  299. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts.map +1 -0
  300. package/dist/uds/dist/tokens/types.d.cts +426 -0
  301. package/dist/uds/dist/tokens/types.d.cts.map +1 -0
  302. package/dist/uds/dist/tokens/types.d.mts +426 -0
  303. package/dist/uds/dist/tokens/types.d.mts.map +1 -0
  304. package/dist/uds/dist/types.d.cts +2 -0
  305. package/dist/uds/dist/types.d.mts +2 -0
  306. package/fonts/centra-no2-black-italic.otf +0 -0
  307. package/fonts/centra-no2-black.otf +0 -0
  308. package/fonts/centra-no2-bold-italic.otf +0 -0
  309. package/fonts/centra-no2-bold.otf +0 -0
  310. package/fonts/centra-no2-book-italic.otf +0 -0
  311. package/fonts/centra-no2-book.otf +0 -0
  312. package/fonts/centra-no2-extrabold-italic.otf +0 -0
  313. package/fonts/centra-no2-extrabold.otf +0 -0
  314. package/fonts/centra-no2-hairline-italic.otf +0 -0
  315. package/fonts/centra-no2-hairline.otf +0 -0
  316. package/fonts/centra-no2-light-italic.otf +0 -0
  317. package/fonts/centra-no2-light.otf +0 -0
  318. package/fonts/centra-no2-medium-italic.otf +0 -0
  319. package/fonts/centra-no2-medium.otf +0 -0
  320. package/fonts/centra-no2-thin-italic.otf +0 -0
  321. package/fonts/centra-no2-thin.otf +0 -0
  322. package/fonts/gelica-black-italic.otf +0 -0
  323. package/fonts/gelica-black.otf +0 -0
  324. package/fonts/gelica-bold-italic.otf +0 -0
  325. package/fonts/gelica-bold.otf +0 -0
  326. package/fonts/gelica-extra-light-italic.otf +0 -0
  327. package/fonts/gelica-extra-light.otf +0 -0
  328. package/fonts/gelica-light-italic.otf +0 -0
  329. package/fonts/gelica-light.otf +0 -0
  330. package/fonts/gelica-medium-italic.otf +0 -0
  331. package/fonts/gelica-medium.otf +0 -0
  332. package/fonts/gelica-regular-italic.otf +0 -0
  333. package/fonts/gelica-regular.otf +0 -0
  334. package/fonts/gelica-semi-bold-italic.otf +0 -0
  335. package/fonts/gelica-semi-bold.otf +0 -0
  336. package/fonts/index.cjs +270 -0
  337. package/fonts/index.d.ts +10 -0
  338. package/fonts/index.mjs +272 -0
  339. package/fonts/inter-black.ttf +0 -0
  340. package/fonts/inter-bold.ttf +0 -0
  341. package/fonts/inter-extra-bold.ttf +0 -0
  342. package/fonts/inter-extra-light.ttf +0 -0
  343. package/fonts/inter-light.ttf +0 -0
  344. package/fonts/inter-medium.ttf +0 -0
  345. package/fonts/inter-regular.ttf +0 -0
  346. package/fonts/inter-semi-bold.ttf +0 -0
  347. package/fonts/inter-thin.ttf +0 -0
  348. package/fonts/roboto-mono-bold-italic.ttf +0 -0
  349. package/fonts/roboto-mono-bold.ttf +0 -0
  350. package/fonts/roboto-mono-light-italic.ttf +0 -0
  351. package/fonts/roboto-mono-light.ttf +0 -0
  352. package/fonts/roboto-mono-medium-italic.ttf +0 -0
  353. package/fonts/roboto-mono-medium.ttf +0 -0
  354. package/fonts/roboto-mono-regular-italic.ttf +0 -0
  355. package/fonts/roboto-mono-regular.ttf +0 -0
  356. package/fonts/roboto-mono-thin-italic.ttf +0 -0
  357. package/fonts/roboto-mono-thin.ttf +0 -0
  358. package/fonts/uds-icons.ttf +0 -0
  359. package/fonts/yahoo-product-sans-bold.otf +0 -0
  360. package/fonts/yahoo-product-sans-extended-black-italic.ttf +0 -0
  361. package/fonts/yahoo-product-sans-extended-black.ttf +0 -0
  362. package/fonts/yahoo-product-sans-extended-bold-italic.ttf +0 -0
  363. package/fonts/yahoo-product-sans-extended-bold.ttf +0 -0
  364. package/fonts/yahoo-product-sans-extended-light-italic.ttf +0 -0
  365. package/fonts/yahoo-product-sans-extended-light.ttf +0 -0
  366. package/fonts/yahoo-product-sans-extended-medium-italic.ttf +0 -0
  367. package/fonts/yahoo-product-sans-extended-medium.ttf +0 -0
  368. package/fonts/yahoo-product-sans-extended-regular-italic.ttf +0 -0
  369. package/fonts/yahoo-product-sans-extended-regular.ttf +0 -0
  370. package/fonts/yahoo-product-sans-extended-semibold-italic.ttf +0 -0
  371. package/fonts/yahoo-product-sans-extended-semibold.ttf +0 -0
  372. package/fonts/yahoo-product-sans-medium.otf +0 -0
  373. package/fonts/yahoo-product-sans-regular.otf +0 -0
  374. package/fonts/yahoo-sans-beta-bold.otf +0 -0
  375. package/fonts/yahoo-sans-beta-medium.otf +0 -0
  376. package/fonts/yahoo-sans-beta-regular.otf +0 -0
  377. package/fonts/yahoo-sans-black.otf +0 -0
  378. package/fonts/yahoo-sans-bold.otf +0 -0
  379. package/fonts/yahoo-sans-condensed-black.otf +0 -0
  380. package/fonts/yahoo-sans-condensed-bold.otf +0 -0
  381. package/fonts/yahoo-sans-condensed-light.otf +0 -0
  382. package/fonts/yahoo-sans-condensed-medium.otf +0 -0
  383. package/fonts/yahoo-sans-condensed-regular.otf +0 -0
  384. package/fonts/yahoo-sans-condensed-xbold.ttf +0 -0
  385. package/fonts/yahoo-sans-cr4-bold.ttf +0 -0
  386. package/fonts/yahoo-sans-cr4-medium.ttf +0 -0
  387. package/fonts/yahoo-sans-cr4-regular.ttf +0 -0
  388. package/fonts/yahoo-sans-extrabold.otf +0 -0
  389. package/fonts/yahoo-sans-extralight.otf +0 -0
  390. package/fonts/yahoo-sans-italic.otf +0 -0
  391. package/fonts/yahoo-sans-light.otf +0 -0
  392. package/fonts/yahoo-sans-medium.otf +0 -0
  393. package/fonts/yahoo-sans-regular-italic.otf +0 -0
  394. package/fonts/yahoo-sans-regular.otf +0 -0
  395. package/fonts/yahoo-sans-semibold.otf +0 -0
  396. package/fonts/yahoo-serif-display-black.otf +0 -0
  397. package/fonts/yahoo-serif-display-bold.otf +0 -0
  398. package/fonts/yahoo-serif-display-extrabold.otf +0 -0
  399. package/fonts/yahoo-serif-display-light.otf +0 -0
  400. package/fonts/yahoo-serif-display-regular.otf +0 -0
  401. package/fonts/yahoo-serif-text-bold-italic.ttf +0 -0
  402. package/fonts/yahoo-serif-text-bold.otf +0 -0
  403. package/fonts/yahoo-serif-text-italic.otf +0 -0
  404. package/fonts/yahoo-serif-text-regular.otf +0 -0
  405. package/fonts/yas-black-italic.otf +0 -0
  406. package/fonts/yas-black.otf +0 -0
  407. package/fonts/yas-bold-italic.otf +0 -0
  408. package/fonts/yas-bold.otf +0 -0
  409. package/fonts/yas-condensed-black-italic.otf +0 -0
  410. package/fonts/yas-condensed-black.otf +0 -0
  411. package/fonts/yas-condensed-bold-italic.otf +0 -0
  412. package/fonts/yas-condensed-bold.otf +0 -0
  413. package/fonts/yas-condensed-light-italic.otf +0 -0
  414. package/fonts/yas-condensed-light.otf +0 -0
  415. package/fonts/yas-condensed-medium-italic.otf +0 -0
  416. package/fonts/yas-condensed-medium.otf +0 -0
  417. package/fonts/yas-condensed-regular-italic.otf +0 -0
  418. package/fonts/yas-condensed-regular.otf +0 -0
  419. package/fonts/yas-condensed-semibold-italic.otf +0 -0
  420. package/fonts/yas-condensed-semibold.otf +0 -0
  421. package/fonts/yas-extended-black-italic.otf +0 -0
  422. package/fonts/yas-extended-black.otf +0 -0
  423. package/fonts/yas-extended-bold-italic.otf +0 -0
  424. package/fonts/yas-extended-bold.otf +0 -0
  425. package/fonts/yas-extended-light-italic.otf +0 -0
  426. package/fonts/yas-extended-light.otf +0 -0
  427. package/fonts/yas-extended-medium-italic.otf +0 -0
  428. package/fonts/yas-extended-medium.otf +0 -0
  429. package/fonts/yas-extended-regular-italic.otf +0 -0
  430. package/fonts/yas-extended-regular.otf +0 -0
  431. package/fonts/yas-extended-semibold-italic.otf +0 -0
  432. package/fonts/yas-extended-semibold.otf +0 -0
  433. package/fonts/yas-light-italic.otf +0 -0
  434. package/fonts/yas-light.otf +0 -0
  435. package/fonts/yas-medium-italic.otf +0 -0
  436. package/fonts/yas-medium.otf +0 -0
  437. package/fonts/yas-regular-italic.otf +0 -0
  438. package/fonts/yas-regular.otf +0 -0
  439. package/fonts/yas-semibold-italic.otf +0 -0
  440. package/fonts/yas-semibold.otf +0 -0
  441. package/generated/styles.cjs +4510 -0
  442. package/generated/styles.d.cts +1 -0
  443. package/generated/styles.d.mts +1 -0
  444. package/generated/styles.d.ts +2965 -0
  445. package/generated/styles.mjs +4510 -0
  446. package/generated/unistyles.d.ts +4320 -0
  447. package/package.json +308 -0
@@ -0,0 +1,89 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
+ const require_components_HStack = require('./HStack.cjs');
4
+ const require_components_VStack = require('./VStack.cjs');
5
+ let react = require("react");
6
+ let react_native = require("react-native");
7
+ let generated_styles = require("../../generated/styles");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ let react_native_unistyles = require("react-native-unistyles");
10
+
11
+ //#region src/components/Screen.tsx
12
+ /**
13
+ * **📱 A screen container with safe area handling**
14
+ *
15
+ * @description
16
+ * A scrollable screen component that handles safe area insets and provides
17
+ * consistent padding and background styling. Uses Unistyles' built-in
18
+ * safe area insets via the `rt` runtime object.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { Screen } from '@yahoo/uds-mobile';
23
+ *
24
+ * <Screen backgroundColor="primary" spacingHorizontal="6">
25
+ * <Text>Screen content</Text>
26
+ * </Screen>
27
+ *
28
+ * // With sticky header
29
+ * <Screen
30
+ * stickyHeader={<Text>Header</Text>}
31
+ * stickyHeaderProps={{ backgroundColor: 'secondary' }}
32
+ * >
33
+ * <Text>Content</Text>
34
+ * </Screen>
35
+ * ```
36
+ *
37
+ * @usage
38
+ * - Use as the root component for screens
39
+ * - Use stickyHeader for persistent header content
40
+ * - Content is automatically scrollable
41
+ *
42
+ * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
43
+ */
44
+ const Screen = (0, react.memo)(function Screen$1({ children, backgroundColor = "primary", spacingHorizontal = "6", spacingTop = "6", gap, stickyHeader, stickyHeaderProps, style, ref, ...props }) {
45
+ const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};
46
+ generated_styles.styles.useVariants({
47
+ backgroundColor,
48
+ flex: "1",
49
+ flexDirection: "column",
50
+ columnGap: gap
51
+ });
52
+ const scrollStyles = (0, react.useMemo)(() => [generated_styles.styles.foundation, style], [generated_styles.styles.foundation, style]);
53
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
54
+ backgroundColor: "primary",
55
+ style: screenStyles.wrapper,
56
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.ScrollView, {
57
+ ref,
58
+ style: scrollStyles,
59
+ stickyHeaderIndices: stickyHeader ? [0] : void 0,
60
+ ...props,
61
+ children: [stickyHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_HStack.HStack, {
62
+ spacingHorizontal: "6",
63
+ spacingBottom: "4",
64
+ backgroundColor: "primary",
65
+ justifyContent: "flex-end",
66
+ style: stickyHeaderStyle,
67
+ ...stickyHeaderPropsWithoutStyle,
68
+ children: stickyHeader
69
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
70
+ flex: "1",
71
+ spacingHorizontal,
72
+ spacingTop,
73
+ gap,
74
+ children
75
+ })]
76
+ })
77
+ });
78
+ });
79
+ Screen.displayName = "Screen";
80
+ const screenStyles = react_native_unistyles.StyleSheet.create((_theme, rt) => ({ wrapper: {
81
+ flex: 1,
82
+ paddingTop: rt.insets.top,
83
+ paddingBottom: rt.insets.bottom,
84
+ paddingLeft: rt.insets.left,
85
+ paddingRight: rt.insets.right
86
+ } }));
87
+
88
+ //#endregion
89
+ exports.Screen = Screen;
@@ -0,0 +1,53 @@
1
+
2
+ import { HStackProps } from "./HStack.cjs";
3
+ import * as react1 from "react";
4
+ import { ReactNode, Ref } from "react";
5
+ import { ScrollView, ScrollViewProps } from "react-native";
6
+ import { StyleProps } from "../../generated/styles";
7
+
8
+ //#region src/components/Screen.d.ts
9
+ interface ScreenProps extends ScrollViewProps {
10
+ ref?: Ref<ScrollView>;
11
+ backgroundColor?: StyleProps['backgroundColor'];
12
+ spacingHorizontal?: StyleProps['spacingHorizontal'];
13
+ spacingTop?: StyleProps['spacingTop'];
14
+ gap?: StyleProps['columnGap'];
15
+ stickyHeader?: ReactNode;
16
+ stickyHeaderProps?: HStackProps;
17
+ }
18
+ /**
19
+ * **📱 A screen container with safe area handling**
20
+ *
21
+ * @description
22
+ * A scrollable screen component that handles safe area insets and provides
23
+ * consistent padding and background styling. Uses Unistyles' built-in
24
+ * safe area insets via the `rt` runtime object.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * import { Screen } from '@yahoo/uds-mobile';
29
+ *
30
+ * <Screen backgroundColor="primary" spacingHorizontal="6">
31
+ * <Text>Screen content</Text>
32
+ * </Screen>
33
+ *
34
+ * // With sticky header
35
+ * <Screen
36
+ * stickyHeader={<Text>Header</Text>}
37
+ * stickyHeaderProps={{ backgroundColor: 'secondary' }}
38
+ * >
39
+ * <Text>Content</Text>
40
+ * </Screen>
41
+ * ```
42
+ *
43
+ * @usage
44
+ * - Use as the root component for screens
45
+ * - Use stickyHeader for persistent header content
46
+ * - Content is automatically scrollable
47
+ *
48
+ * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
49
+ */
50
+ declare const Screen: react1.NamedExoticComponent<ScreenProps>;
51
+ //#endregion
52
+ export { Screen, type ScreenProps };
53
+ //# sourceMappingURL=Screen.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.d.cts","names":[],"sources":["../../src/components/Screen.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAYU,WAAA,SAAoB;QACtB,IAAI;EADF,eAAY,CAAA,EAGF,UAHE,CAAA,iBAAA,CAAA;EACV,iBAAA,CAAA,EAIU,UAJV,CAAA,mBAAA,CAAA;EAAJ,UAAA,CAAA,EAKO,UALP,CAAA,YAAA,CAAA;EAEY,GAAA,CAAA,EAIZ,UAJY,CAAA,WAAA,CAAA;EAEE,YAAA,CAAA,EAIL,SAJK;EACP,iBAAA,CAAA,EAIO,WAJP;;;;;;AAN8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CvC,QAAM,MAAA,CAAA,qBAAA"}
@@ -0,0 +1,53 @@
1
+
2
+ import { HStackProps } from "./HStack.mjs";
3
+ import * as react14 from "react";
4
+ import { ReactNode, Ref } from "react";
5
+ import { ScrollView, ScrollViewProps } from "react-native";
6
+ import { StyleProps } from "../../generated/styles";
7
+
8
+ //#region src/components/Screen.d.ts
9
+ interface ScreenProps extends ScrollViewProps {
10
+ ref?: Ref<ScrollView>;
11
+ backgroundColor?: StyleProps['backgroundColor'];
12
+ spacingHorizontal?: StyleProps['spacingHorizontal'];
13
+ spacingTop?: StyleProps['spacingTop'];
14
+ gap?: StyleProps['columnGap'];
15
+ stickyHeader?: ReactNode;
16
+ stickyHeaderProps?: HStackProps;
17
+ }
18
+ /**
19
+ * **📱 A screen container with safe area handling**
20
+ *
21
+ * @description
22
+ * A scrollable screen component that handles safe area insets and provides
23
+ * consistent padding and background styling. Uses Unistyles' built-in
24
+ * safe area insets via the `rt` runtime object.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * import { Screen } from '@yahoo/uds-mobile';
29
+ *
30
+ * <Screen backgroundColor="primary" spacingHorizontal="6">
31
+ * <Text>Screen content</Text>
32
+ * </Screen>
33
+ *
34
+ * // With sticky header
35
+ * <Screen
36
+ * stickyHeader={<Text>Header</Text>}
37
+ * stickyHeaderProps={{ backgroundColor: 'secondary' }}
38
+ * >
39
+ * <Text>Content</Text>
40
+ * </Screen>
41
+ * ```
42
+ *
43
+ * @usage
44
+ * - Use as the root component for screens
45
+ * - Use stickyHeader for persistent header content
46
+ * - Content is automatically scrollable
47
+ *
48
+ * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
49
+ */
50
+ declare const Screen: react14.NamedExoticComponent<ScreenProps>;
51
+ //#endregion
52
+ export { Screen, type ScreenProps };
53
+ //# sourceMappingURL=Screen.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.d.mts","names":[],"sources":["../../src/components/Screen.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAYU,WAAA,SAAoB;QACtB,IAAI;EADF,eAAY,CAAA,EAGF,UAHE,CAAA,iBAAA,CAAA;EACV,iBAAA,CAAA,EAIU,UAJV,CAAA,mBAAA,CAAA;EAAJ,UAAA,CAAA,EAKO,UALP,CAAA,YAAA,CAAA;EAEY,GAAA,CAAA,EAIZ,UAJY,CAAA,WAAA,CAAA;EAEE,YAAA,CAAA,EAIL,SAJK;EACP,iBAAA,CAAA,EAIO,WAJP;;;;;;AAN8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CvC,QAAM,OAAA,CAAA,qBAAA"}
@@ -0,0 +1,89 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { HStack } from "./HStack.mjs";
3
+ import { VStack } from "./VStack.mjs";
4
+ import { memo, useMemo } from "react";
5
+ import { ScrollView } from "react-native";
6
+ import { styles } from "../../generated/styles";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { StyleSheet } from "react-native-unistyles";
9
+
10
+ //#region src/components/Screen.tsx
11
+ /**
12
+ * **📱 A screen container with safe area handling**
13
+ *
14
+ * @description
15
+ * A scrollable screen component that handles safe area insets and provides
16
+ * consistent padding and background styling. Uses Unistyles' built-in
17
+ * safe area insets via the `rt` runtime object.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * import { Screen } from '@yahoo/uds-mobile';
22
+ *
23
+ * <Screen backgroundColor="primary" spacingHorizontal="6">
24
+ * <Text>Screen content</Text>
25
+ * </Screen>
26
+ *
27
+ * // With sticky header
28
+ * <Screen
29
+ * stickyHeader={<Text>Header</Text>}
30
+ * stickyHeaderProps={{ backgroundColor: 'secondary' }}
31
+ * >
32
+ * <Text>Content</Text>
33
+ * </Screen>
34
+ * ```
35
+ *
36
+ * @usage
37
+ * - Use as the root component for screens
38
+ * - Use stickyHeader for persistent header content
39
+ * - Content is automatically scrollable
40
+ *
41
+ * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
42
+ */
43
+ const Screen = memo(function Screen$1({ children, backgroundColor = "primary", spacingHorizontal = "6", spacingTop = "6", gap, stickyHeader, stickyHeaderProps, style, ref, ...props }) {
44
+ const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};
45
+ styles.useVariants({
46
+ backgroundColor,
47
+ flex: "1",
48
+ flexDirection: "column",
49
+ columnGap: gap
50
+ });
51
+ const scrollStyles = useMemo(() => [styles.foundation, style], [styles.foundation, style]);
52
+ return /* @__PURE__ */ jsx(VStack, {
53
+ backgroundColor: "primary",
54
+ style: screenStyles.wrapper,
55
+ children: /* @__PURE__ */ jsxs(ScrollView, {
56
+ ref,
57
+ style: scrollStyles,
58
+ stickyHeaderIndices: stickyHeader ? [0] : void 0,
59
+ ...props,
60
+ children: [stickyHeader && /* @__PURE__ */ jsx(HStack, {
61
+ spacingHorizontal: "6",
62
+ spacingBottom: "4",
63
+ backgroundColor: "primary",
64
+ justifyContent: "flex-end",
65
+ style: stickyHeaderStyle,
66
+ ...stickyHeaderPropsWithoutStyle,
67
+ children: stickyHeader
68
+ }), /* @__PURE__ */ jsx(VStack, {
69
+ flex: "1",
70
+ spacingHorizontal,
71
+ spacingTop,
72
+ gap,
73
+ children
74
+ })]
75
+ })
76
+ });
77
+ });
78
+ Screen.displayName = "Screen";
79
+ const screenStyles = StyleSheet.create((_theme, rt) => ({ wrapper: {
80
+ flex: 1,
81
+ paddingTop: rt.insets.top,
82
+ paddingBottom: rt.insets.bottom,
83
+ paddingLeft: rt.insets.left,
84
+ paddingRight: rt.insets.right
85
+ } }));
86
+
87
+ //#endregion
88
+ export { Screen };
89
+ //# sourceMappingURL=Screen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.mjs","names":["Screen"],"sources":["../../src/components/Screen.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ScrollViewProps, ViewProps } from 'react-native';\nimport { ScrollView } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport type { HStackProps } from './HStack';\nimport { HStack } from './HStack';\nimport { VStack } from './VStack';\n\ninterface ScreenProps extends ScrollViewProps {\n ref?: Ref<ScrollView>;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Spacing\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingTop?: StyleProps['spacingTop'];\n gap?: StyleProps['columnGap'];\n // Header\n stickyHeader?: ReactNode;\n stickyHeaderProps?: HStackProps;\n}\n\n/**\n * **📱 A screen container with safe area handling**\n *\n * @description\n * A scrollable screen component that handles safe area insets and provides\n * consistent padding and background styling. Uses Unistyles' built-in\n * safe area insets via the `rt` runtime object.\n *\n * @example\n * ```tsx\n * import { Screen } from '@yahoo/uds-mobile';\n *\n * <Screen backgroundColor=\"primary\" spacingHorizontal=\"6\">\n * <Text>Screen content</Text>\n * </Screen>\n *\n * // With sticky header\n * <Screen\n * stickyHeader={<Text>Header</Text>}\n * stickyHeaderProps={{ backgroundColor: 'secondary' }}\n * >\n * <Text>Content</Text>\n * </Screen>\n * ```\n *\n * @usage\n * - Use as the root component for screens\n * - Use stickyHeader for persistent header content\n * - Content is automatically scrollable\n *\n * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info\n */\nconst Screen = memo(function Screen({\n children,\n // Background\n backgroundColor = 'primary',\n // Spacing\n spacingHorizontal = '6',\n spacingTop = '6',\n gap,\n // Header\n stickyHeader,\n stickyHeaderProps,\n style,\n ref,\n ...props\n}: ScreenProps) {\n const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};\n\n styles.useVariants({\n backgroundColor,\n flex: '1',\n flexDirection: 'column',\n columnGap: gap,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const scrollStyles = useMemo(\n () => [styles.foundation as ViewProps['style'], style],\n [styles.foundation, style],\n );\n\n return (\n <VStack backgroundColor=\"primary\" style={screenStyles.wrapper}>\n <ScrollView\n ref={ref}\n style={scrollStyles}\n stickyHeaderIndices={stickyHeader ? [0] : undefined}\n {...props}\n >\n {stickyHeader && (\n <HStack\n spacingHorizontal=\"6\"\n spacingBottom=\"4\"\n backgroundColor=\"primary\"\n justifyContent=\"flex-end\"\n style={stickyHeaderStyle}\n {...stickyHeaderPropsWithoutStyle}\n >\n {stickyHeader}\n </HStack>\n )}\n <VStack flex=\"1\" spacingHorizontal={spacingHorizontal} spacingTop={spacingTop} gap={gap}>\n {children}\n </VStack>\n </ScrollView>\n </VStack>\n );\n});\n\nScreen.displayName = 'Screen';\n\nconst screenStyles = StyleSheet.create((_theme, rt) => ({\n wrapper: {\n flex: 1, // apply insets to the container,\n // so it will add required paddings\n paddingTop: rt.insets.top,\n paddingBottom: rt.insets.bottom,\n paddingLeft: rt.insets.left,\n paddingRight: rt.insets.right,\n },\n}));\n\nexport { Screen, type ScreenProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,MAAM,SAAS,KAAK,SAASA,SAAO,EAClC,UAEA,kBAAkB,WAElB,oBAAoB,KACpB,aAAa,KACb,KAEA,cACA,mBACA,OACA,KACA,GAAG,SACW;CACd,MAAM,EAAE,OAAO,mBAAmB,GAAG,kCAAkC,qBAAqB,EAAE;AAE9F,QAAO,YAAY;EACjB;EACA,MAAM;EACN,eAAe;EACf,WAAW;EACZ,CAAC;CAGF,MAAM,eAAe,cACb,CAAC,OAAO,YAAkC,MAAM,EACtD,CAAC,OAAO,YAAY,MAAM,CAC3B;AAED,QACE,oBAAC;EAAO,iBAAgB;EAAU,OAAO,aAAa;YACpD,qBAAC;GACM;GACL,OAAO;GACP,qBAAqB,eAAe,CAAC,EAAE,GAAG;GAC1C,GAAI;cAEH,gBACC,oBAAC;IACC,mBAAkB;IAClB,eAAc;IACd,iBAAgB;IAChB,gBAAe;IACf,OAAO;IACP,GAAI;cAEH;KACM,EAEX,oBAAC;IAAO,MAAK;IAAuB;IAA+B;IAAiB;IACjF;KACM;IACE;GACN;EAEX;AAEF,OAAO,cAAc;AAErB,MAAM,eAAe,WAAW,QAAQ,QAAQ,QAAQ,EACtD,SAAS;CACP,MAAM;CAEN,YAAY,GAAG,OAAO;CACtB,eAAe,GAAG,OAAO;CACzB,aAAa,GAAG,OAAO;CACvB,cAAc,GAAG,OAAO;CACzB,EACF,EAAE"}
@@ -0,0 +1,172 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
+ const require_components_IconSlot = require('./IconSlot.cjs');
4
+ const require_components_Text = require('./Text.cjs');
5
+ const require_components_HStack = require('./HStack.cjs');
6
+ let react = require("react");
7
+ let react_native = require("react-native");
8
+ let generated_styles = require("../../generated/styles");
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ let react_native_unistyles = require("react-native-unistyles");
11
+ let react_native_reanimated = require("react-native-reanimated");
12
+ react_native_reanimated = require_rolldown_runtime.__toESM(react_native_reanimated);
13
+ let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
14
+
15
+ //#region src/components/Switch.tsx
16
+ const HANDLE_TRAVEL = {
17
+ md: 20,
18
+ sm: 12
19
+ };
20
+ const ANIMATION_DURATION = 120;
21
+ /**
22
+ * **Switch component for toggling options**
23
+ *
24
+ * @description
25
+ * A switch (also called a toggle) is a binary on/off input control.
26
+ * It allows users to pick between two clearly opposite choices.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { Switch } from '@yahoo/uds-mobile';
31
+ *
32
+ * <Switch label="Notifications" />
33
+ * <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
34
+ * <Switch onIcon="Check" offIcon="Cross" label="Sync" />
35
+ * ```
36
+ *
37
+ * @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
38
+ */
39
+ const Switch = (0, react.memo)(function Switch$1({ isOn: isOnProp, defaultIsOn = false, onChange, label, labelPosition = "start", size = "md", onIcon, offIcon, disabled = false, required, accessibilityHint, reduceMotion = false, ref }) {
40
+ const isControlled = isOnProp !== void 0;
41
+ const [internalIsOn, setInternalIsOn] = (0, react.useState)(defaultIsOn);
42
+ const [prefersReducedMotion, setPrefersReducedMotion] = (0, react.useState)(false);
43
+ const isOn = isControlled ? isOnProp : internalIsOn;
44
+ (0, react.useEffect)(() => {
45
+ const checkReducedMotion = async () => {
46
+ setPrefersReducedMotion(await react_native.AccessibilityInfo.isReduceMotionEnabled());
47
+ };
48
+ checkReducedMotion();
49
+ const subscription = react_native.AccessibilityInfo.addEventListener("reduceMotionChanged", setPrefersReducedMotion);
50
+ return () => subscription.remove();
51
+ }, []);
52
+ const animationDuration = reduceMotion || prefersReducedMotion ? 0 : ANIMATION_DURATION;
53
+ const progress = (0, react_native_reanimated.useDerivedValue)(() => (0, react_native_reanimated.withTiming)(isOn ? 1 : 0, { duration: animationDuration }), [isOn, animationDuration]);
54
+ const travelDistance = HANDLE_TRAVEL[size];
55
+ const handlePress = (0, react.useCallback)(() => {
56
+ if (disabled) return;
57
+ const newValue = !isOn;
58
+ if (!isControlled) setInternalIsOn(newValue);
59
+ onChange?.(newValue);
60
+ }, [
61
+ disabled,
62
+ isOn,
63
+ isControlled,
64
+ onChange
65
+ ]);
66
+ generated_styles.switchStyles.useVariants({
67
+ size,
68
+ variant: isOn ? "on" : "off"
69
+ });
70
+ const trackBackgroundColor = (0, react_native_unistyles_reanimated.useAnimatedVariantColor)(generated_styles.switchStyles.switch, "backgroundColor");
71
+ const animatedTrackStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
72
+ "worklet";
73
+ return { backgroundColor: (0, react_native_reanimated.withTiming)(trackBackgroundColor.value, { duration: animationDuration }) };
74
+ });
75
+ const animatedHandleStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
76
+ "worklet";
77
+ return { transform: [{ translateX: progress.value * travelDistance }] };
78
+ });
79
+ const rootStyle = (0, react.useMemo)(() => [generated_styles.switchStyles.root, switchStaticStyles.root({ disabled })], [generated_styles.switchStyles.root, disabled]);
80
+ const trackStyle = (0, react.useMemo)(() => [
81
+ generated_styles.switchStyles.switch,
82
+ switchStaticStyles.track,
83
+ animatedTrackStyle
84
+ ], [generated_styles.switchStyles.switch, animatedTrackStyle]);
85
+ const handleStyle = (0, react.useMemo)(() => [
86
+ generated_styles.switchStyles.handle,
87
+ switchStaticStyles.handle,
88
+ animatedHandleStyle
89
+ ], [generated_styles.switchStyles.handle, animatedHandleStyle]);
90
+ const accessibilityLabel = typeof label === "string" ? label : void 0;
91
+ const resolvedAccessibilityHint = accessibilityHint ?? "Double tap to toggle";
92
+ const resolvedLabel = typeof label === "function" ? label() : label;
93
+ const labelContent = resolvedLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_HStack.HStack, {
94
+ gap: "2",
95
+ alignItems: "center",
96
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
97
+ style: generated_styles.switchStyles.text,
98
+ children: resolvedLabel
99
+ }), required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
100
+ color: "alert",
101
+ children: "*"
102
+ })]
103
+ });
104
+ const a11yValue = (0, react.useMemo)(() => ({ text: isOn ? "On" : "Off" }), [isOn]);
105
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.Pressable, {
106
+ ref,
107
+ onPress: handlePress,
108
+ disabled,
109
+ accessible: true,
110
+ accessibilityRole: "switch",
111
+ accessibilityState: {
112
+ checked: isOn,
113
+ disabled
114
+ },
115
+ accessibilityLabel,
116
+ accessibilityHint: resolvedAccessibilityHint,
117
+ accessibilityValue: a11yValue,
118
+ style: rootStyle,
119
+ children: [
120
+ labelPosition === "end" && labelContent,
121
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
122
+ style: trackStyle,
123
+ importantForAccessibility: "no-hide-descendants",
124
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native_reanimated.default.View, {
125
+ style: handleStyle,
126
+ children: [onIcon && isOn && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
127
+ style: switchStaticStyles.iconContainer,
128
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
129
+ icon: onIcon,
130
+ variant: "fill",
131
+ style: generated_styles.switchStyles.handleIcon
132
+ })
133
+ }), offIcon && !isOn && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
134
+ style: switchStaticStyles.iconContainer,
135
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
136
+ icon: offIcon,
137
+ variant: "fill",
138
+ style: generated_styles.switchStyles.handleIcon
139
+ })
140
+ })]
141
+ })
142
+ }),
143
+ labelPosition === "start" && labelContent
144
+ ]
145
+ });
146
+ });
147
+ Switch.displayName = "Switch";
148
+ const switchStaticStyles = react_native_unistyles.StyleSheet.create((theme) => ({
149
+ handle: {
150
+ borderRadius: theme.borderRadius.full,
151
+ alignItems: "center",
152
+ justifyContent: "center"
153
+ },
154
+ iconContainer: {
155
+ position: "absolute",
156
+ alignItems: "center",
157
+ justifyContent: "center"
158
+ },
159
+ track: {
160
+ justifyContent: "center",
161
+ borderRadius: theme.borderRadius.full
162
+ },
163
+ root: ({ disabled }) => ({
164
+ flexDirection: "row",
165
+ alignItems: "center",
166
+ alignSelf: "flex-start",
167
+ opacity: disabled ? .5 : 1
168
+ })
169
+ }));
170
+
171
+ //#endregion
172
+ exports.Switch = Switch;
@@ -0,0 +1,42 @@
1
+
2
+ import { UniversalSwitchProps } from "../uds/dist/tokens/types.cjs";
3
+ import { IconSlotType } from "./IconSlot.cjs";
4
+ import * as react18 from "react";
5
+ import { Ref } from "react";
6
+ import { AccessibilityProps, View } from "react-native";
7
+
8
+ //#region src/components/Switch.d.ts
9
+ interface SwitchProps extends UniversalSwitchProps<IconSlotType> {
10
+ /** Ref to the underlying View */
11
+ ref?: Ref<View>;
12
+ /** Callback when the switch value changes */
13
+ onChange?: (value: boolean) => void;
14
+ /** Whether the switch is disabled */
15
+ disabled?: boolean;
16
+ /** Whether the switch is required (shows asterisk with label) */
17
+ required?: boolean;
18
+ /** Accessibility hint describing what happens when activated */
19
+ accessibilityHint?: AccessibilityProps['accessibilityHint'];
20
+ }
21
+ /**
22
+ * **Switch component for toggling options**
23
+ *
24
+ * @description
25
+ * A switch (also called a toggle) is a binary on/off input control.
26
+ * It allows users to pick between two clearly opposite choices.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { Switch } from '@yahoo/uds-mobile';
31
+ *
32
+ * <Switch label="Notifications" />
33
+ * <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
34
+ * <Switch onIcon="Check" offIcon="Cross" label="Sync" />
35
+ * ```
36
+ *
37
+ * @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
38
+ */
39
+ declare const Switch: react18.NamedExoticComponent<SwitchProps>;
40
+ //#endregion
41
+ export { Switch, type SwitchProps };
42
+ //# sourceMappingURL=Switch.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.cts","names":[],"sources":["../../src/components/Switch.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAeU,WAAA,SAAoB,qBAAqB;;QAE3C,IAAI;EAFF;EAAyC,QAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAA,IAAA;EAEvC;EAAJ,QAAA,CAAA,EAAA,OAAA;EAQc;EAVQ,QAAA,CAAA,EAAA,OAAA;EAAoB;EAsC5C,iBA8IJ,CAAA,EA1KoB,kBA4BV,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;cAAN,QAAM,OAAA,CAAA,qBAAA"}
@@ -0,0 +1,42 @@
1
+
2
+ import { UniversalSwitchProps } from "../uds/dist/tokens/types.mjs";
3
+ import { IconSlotType } from "./IconSlot.mjs";
4
+ import * as react16 from "react";
5
+ import { Ref } from "react";
6
+ import { AccessibilityProps, View } from "react-native";
7
+
8
+ //#region src/components/Switch.d.ts
9
+ interface SwitchProps extends UniversalSwitchProps<IconSlotType> {
10
+ /** Ref to the underlying View */
11
+ ref?: Ref<View>;
12
+ /** Callback when the switch value changes */
13
+ onChange?: (value: boolean) => void;
14
+ /** Whether the switch is disabled */
15
+ disabled?: boolean;
16
+ /** Whether the switch is required (shows asterisk with label) */
17
+ required?: boolean;
18
+ /** Accessibility hint describing what happens when activated */
19
+ accessibilityHint?: AccessibilityProps['accessibilityHint'];
20
+ }
21
+ /**
22
+ * **Switch component for toggling options**
23
+ *
24
+ * @description
25
+ * A switch (also called a toggle) is a binary on/off input control.
26
+ * It allows users to pick between two clearly opposite choices.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { Switch } from '@yahoo/uds-mobile';
31
+ *
32
+ * <Switch label="Notifications" />
33
+ * <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
34
+ * <Switch onIcon="Check" offIcon="Cross" label="Sync" />
35
+ * ```
36
+ *
37
+ * @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
38
+ */
39
+ declare const Switch: react16.NamedExoticComponent<SwitchProps>;
40
+ //#endregion
41
+ export { Switch, type SwitchProps };
42
+ //# sourceMappingURL=Switch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.mts","names":[],"sources":["../../src/components/Switch.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAeU,WAAA,SAAoB,qBAAqB;;QAE3C,IAAI;EAFF;EAAyC,QAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAA,IAAA;EAEvC;EAAJ,QAAA,CAAA,EAAA,OAAA;EAQc;EAVQ,QAAA,CAAA,EAAA,OAAA;EAAoB;EAsC5C,iBA8IJ,CAAA,EA1KoB,kBA4BV,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;cAAN,QAAM,OAAA,CAAA,qBAAA"}