@yahoo/uds-mobile 1.0.0 → 1.1.0-beta.1

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 (252) hide show
  1. package/CONTRIBUTING.md +25 -1
  2. package/README.md +1 -1
  3. package/dist/bin/{uds/dist/fixtures.mjs → fixtures/dist/index.mjs} +28 -10
  4. package/dist/bin/{uds/dist/tokens/consts/fontDeclarationsMap.mjs → fonts/dist/index.mjs} +220 -49
  5. package/dist/bin/generateTheme.mjs +10 -8
  6. package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +1 -1
  7. package/dist/bin/modes/dist/index.mjs +6 -0
  8. package/dist/bin/{uds/dist/tokens/configs/palette/alwaysPalette.mjs → palette/dist/index.mjs} +1 -1
  9. package/dist/components/Avatar.d.cts +2 -2
  10. package/dist/components/Avatar.d.cts.map +1 -1
  11. package/dist/components/Avatar.d.mts +2 -2
  12. package/dist/components/Badge.d.cts +3 -3
  13. package/dist/components/Badge.d.cts.map +1 -1
  14. package/dist/components/Badge.d.mts +3 -3
  15. package/dist/components/Badge.mjs.map +1 -1
  16. package/dist/components/Box.cjs +1 -1
  17. package/dist/components/Box.d.cts +3 -3
  18. package/dist/components/Box.d.cts.map +1 -1
  19. package/dist/components/Box.d.mts +3 -3
  20. package/dist/components/Box.d.mts.map +1 -1
  21. package/dist/components/Box.mjs +1 -1
  22. package/dist/components/Box.mjs.map +1 -1
  23. package/dist/components/Button.cjs +7 -7
  24. package/dist/components/Button.d.cts +3 -4
  25. package/dist/components/Button.d.cts.map +1 -1
  26. package/dist/components/Button.d.mts +3 -4
  27. package/dist/components/Button.d.mts.map +1 -1
  28. package/dist/components/Button.mjs +2 -2
  29. package/dist/components/Button.mjs.map +1 -1
  30. package/dist/components/Checkbox.cjs +4 -4
  31. package/dist/components/Checkbox.d.cts +1 -1
  32. package/dist/components/Checkbox.d.mts +3 -3
  33. package/dist/components/Checkbox.mjs +1 -1
  34. package/dist/components/Checkbox.mjs.map +1 -1
  35. package/dist/components/Chip.d.cts +1 -1
  36. package/dist/components/Chip.d.mts +3 -3
  37. package/dist/components/Chip.mjs.map +1 -1
  38. package/dist/components/HStack.d.cts +2 -2
  39. package/dist/components/HStack.d.mts +2 -2
  40. package/dist/components/Icon.d.cts +4 -5
  41. package/dist/components/Icon.d.cts.map +1 -1
  42. package/dist/components/Icon.d.mts +4 -5
  43. package/dist/components/Icon.d.mts.map +1 -1
  44. package/dist/components/Icon.mjs.map +1 -1
  45. package/dist/components/IconButton.cjs +5 -5
  46. package/dist/components/IconButton.d.cts +3 -4
  47. package/dist/components/IconButton.d.cts.map +1 -1
  48. package/dist/components/IconButton.d.mts +3 -4
  49. package/dist/components/IconButton.d.mts.map +1 -1
  50. package/dist/components/IconButton.mjs +1 -1
  51. package/dist/components/IconButton.mjs.map +1 -1
  52. package/dist/components/IconSlot.d.cts +2 -2
  53. package/dist/components/IconSlot.d.mts +2 -2
  54. package/dist/components/Image.d.cts +3 -3
  55. package/dist/components/Image.d.mts +3 -3
  56. package/dist/components/Image.mjs.map +1 -1
  57. package/dist/components/Input.d.cts +3 -3
  58. package/dist/components/Input.d.mts +3 -3
  59. package/dist/components/Input.mjs.map +1 -1
  60. package/dist/components/Link.d.cts +3 -4
  61. package/dist/components/Link.d.cts.map +1 -1
  62. package/dist/components/Link.d.mts +3 -4
  63. package/dist/components/Link.d.mts.map +1 -1
  64. package/dist/components/Link.mjs.map +1 -1
  65. package/dist/components/Pressable.d.cts +3 -3
  66. package/dist/components/Pressable.d.cts.map +1 -1
  67. package/dist/components/Pressable.d.mts +3 -3
  68. package/dist/components/Radio.cjs +4 -4
  69. package/dist/components/Radio.d.cts +3 -3
  70. package/dist/components/Radio.d.cts.map +1 -1
  71. package/dist/components/Radio.d.mts +3 -3
  72. package/dist/components/Radio.d.mts.map +1 -1
  73. package/dist/components/Radio.mjs +1 -1
  74. package/dist/components/Radio.mjs.map +1 -1
  75. package/dist/components/Screen.d.cts +2 -2
  76. package/dist/components/Screen.d.cts.map +1 -1
  77. package/dist/components/Screen.d.mts +2 -2
  78. package/dist/components/Switch.d.cts +3 -3
  79. package/dist/components/Switch.d.mts +3 -3
  80. package/dist/components/Switch.mjs.map +1 -1
  81. package/dist/components/Text.d.cts +2 -2
  82. package/dist/components/Text.d.cts.map +1 -1
  83. package/dist/components/Text.d.mts +2 -2
  84. package/dist/components/Text.d.mts.map +1 -1
  85. package/dist/components/VStack.d.cts +2 -2
  86. package/dist/components/VStack.d.cts.map +1 -1
  87. package/dist/components/VStack.d.mts +2 -2
  88. package/dist/components/VStack.d.mts.map +1 -1
  89. package/dist/icons/dist/glyphMap.cjs +3069 -3024
  90. package/dist/icons/dist/glyphMap.d.cts +2 -2
  91. package/dist/icons/dist/glyphMap.d.cts.map +1 -1
  92. package/dist/icons/dist/glyphMap.d.mts +2 -2
  93. package/dist/icons/dist/glyphMap.d.mts.map +1 -1
  94. package/dist/icons/dist/glyphMap.mjs +3069 -3024
  95. package/dist/icons/dist/glyphMap.mjs.map +1 -1
  96. package/dist/icons/dist/svgMap.cjs +421 -421
  97. package/dist/icons/dist/svgMap.d.cts.map +1 -1
  98. package/dist/icons/dist/svgMap.d.mts.map +1 -1
  99. package/dist/icons/dist/svgMap.mjs +421 -421
  100. package/dist/icons/dist/svgMap.mjs.map +1 -1
  101. package/dist/icons/dist/tokens.mjs.map +1 -1
  102. package/dist/{uds/dist/tokens/configs/motion.cjs → motion-tokens/dist/index.cjs} +2 -2
  103. package/dist/{uds/dist/tokens/configs/motion.d.mts → motion-tokens/dist/index.d.cts} +4 -4
  104. package/dist/motion-tokens/dist/index.d.cts.map +1 -0
  105. package/dist/{uds/dist/tokens/configs/motion.d.cts → motion-tokens/dist/index.d.mts} +4 -4
  106. package/dist/motion-tokens/dist/index.d.mts.map +1 -0
  107. package/dist/{uds/dist/tokens/configs/motion.mjs → motion-tokens/dist/index.mjs} +3 -3
  108. package/dist/motion-tokens/dist/index.mjs.map +1 -0
  109. package/dist/motion.cjs +12 -12
  110. package/dist/motion.d.cts +2 -3
  111. package/dist/motion.d.cts.map +1 -1
  112. package/dist/motion.d.mts +2 -3
  113. package/dist/motion.d.mts.map +1 -1
  114. package/dist/motion.mjs +1 -1
  115. package/dist/motion.mjs.map +1 -1
  116. package/dist/types/dist/index.d.cts +247 -0
  117. package/dist/types/dist/index.d.cts.map +1 -0
  118. package/dist/types/dist/index.d.mts +247 -0
  119. package/dist/types/dist/index.d.mts.map +1 -0
  120. package/generated/styles.cjs +3 -0
  121. package/generated/styles.d.ts +3 -3
  122. package/generated/styles.mjs +3 -0
  123. package/generated/unistyles.d.ts +15 -0
  124. package/package.json +2 -35
  125. package/dist/bin/uds/dist/tokens/consts/defaultModes.mjs +0 -6
  126. package/dist/icons/dist/types.d.cts +0 -24
  127. package/dist/icons/dist/types.d.cts.map +0 -1
  128. package/dist/icons/dist/types.d.mts +0 -24
  129. package/dist/icons/dist/types.d.mts.map +0 -1
  130. package/dist/uds/dist/components/Box.d.cts +0 -3
  131. package/dist/uds/dist/components/Box.d.mts +0 -3
  132. package/dist/uds/dist/components/Divider/Divider.d.cts +0 -3
  133. package/dist/uds/dist/components/Divider/Divider.d.mts +0 -3
  134. package/dist/uds/dist/components/Divider/DividerCore.d.cts +0 -4
  135. package/dist/uds/dist/components/Divider/DividerCore.d.mts +0 -4
  136. package/dist/uds/dist/components/Divider/DividerInternal.d.cts +0 -4
  137. package/dist/uds/dist/components/Divider/DividerInternal.d.mts +0 -4
  138. package/dist/uds/dist/components/Divider/index.d.cts +0 -2
  139. package/dist/uds/dist/components/Divider/index.d.mts +0 -2
  140. package/dist/uds/dist/components/FormLabel.d.cts +0 -3
  141. package/dist/uds/dist/components/FormLabel.d.mts +0 -4
  142. package/dist/uds/dist/components/HStack.d.cts +0 -4
  143. package/dist/uds/dist/components/HStack.d.mts +0 -4
  144. package/dist/uds/dist/components/Icon.d.cts +0 -3
  145. package/dist/uds/dist/components/Icon.d.mts +0 -3
  146. package/dist/uds/dist/components/Image.d.cts +0 -2
  147. package/dist/uds/dist/components/Image.d.mts +0 -3
  148. package/dist/uds/dist/components/Link.d.cts +0 -3
  149. package/dist/uds/dist/components/Link.d.mts +0 -3
  150. package/dist/uds/dist/components/Text.d.cts +0 -3
  151. package/dist/uds/dist/components/Text.d.mts +0 -3
  152. package/dist/uds/dist/components/VStack.d.cts +0 -4
  153. package/dist/uds/dist/components/VStack.d.mts +0 -4
  154. package/dist/uds/dist/components/client/Avatar/Avatar.d.cts +0 -2
  155. package/dist/uds/dist/components/client/Avatar/Avatar.d.mts +0 -3
  156. package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.cts +0 -2
  157. package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.mts +0 -3
  158. package/dist/uds/dist/components/client/Avatar/AvatarImage.d.cts +0 -4
  159. package/dist/uds/dist/components/client/Avatar/AvatarImage.d.mts +0 -5
  160. package/dist/uds/dist/components/client/Avatar/AvatarText.d.cts +0 -3
  161. package/dist/uds/dist/components/client/Avatar/AvatarText.d.mts +0 -4
  162. package/dist/uds/dist/components/client/Avatar/index.d.cts +0 -5
  163. package/dist/uds/dist/components/client/Avatar/index.d.mts +0 -5
  164. package/dist/uds/dist/components/client/Badge.d.cts +0 -3
  165. package/dist/uds/dist/components/client/Badge.d.mts +0 -3
  166. package/dist/uds/dist/components/client/Button.d.cts +0 -3
  167. package/dist/uds/dist/components/client/Button.d.mts +0 -3
  168. package/dist/uds/dist/components/client/Checkbox.d.cts +0 -3
  169. package/dist/uds/dist/components/client/Checkbox.d.mts +0 -3
  170. package/dist/uds/dist/components/client/Chip/Chip.d.cts +0 -4
  171. package/dist/uds/dist/components/client/Chip/Chip.d.mts +0 -4
  172. package/dist/uds/dist/components/client/Chip/ChipBase.d.cts +0 -4
  173. package/dist/uds/dist/components/client/Chip/ChipBase.d.mts +0 -4
  174. package/dist/uds/dist/components/client/Chip/ChipButton.d.cts +0 -4
  175. package/dist/uds/dist/components/client/Chip/ChipButton.d.mts +0 -4
  176. package/dist/uds/dist/components/client/Chip/ChipDismissible.d.cts +0 -4
  177. package/dist/uds/dist/components/client/Chip/ChipDismissible.d.mts +0 -4
  178. package/dist/uds/dist/components/client/Chip/ChipLink.d.cts +0 -4
  179. package/dist/uds/dist/components/client/Chip/ChipLink.d.mts +0 -4
  180. package/dist/uds/dist/components/client/Chip/ChipToggle.d.cts +0 -4
  181. package/dist/uds/dist/components/client/Chip/ChipToggle.d.mts +0 -4
  182. package/dist/uds/dist/components/client/Chip/index.d.cts +0 -6
  183. package/dist/uds/dist/components/client/Chip/index.d.mts +0 -6
  184. package/dist/uds/dist/components/client/IconButton.d.cts +0 -3
  185. package/dist/uds/dist/components/client/IconButton.d.mts +0 -3
  186. package/dist/uds/dist/components/client/Input/Input.d.cts +0 -4
  187. package/dist/uds/dist/components/client/Input/Input.d.mts +0 -4
  188. package/dist/uds/dist/components/client/Input/InputHelpText.d.cts +0 -2
  189. package/dist/uds/dist/components/client/Input/InputHelpText.d.mts +0 -3
  190. package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.cts +0 -5
  191. package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.mts +0 -6
  192. package/dist/uds/dist/components/client/Input/index.d.cts +0 -3
  193. package/dist/uds/dist/components/client/Input/index.d.mts +0 -3
  194. package/dist/uds/dist/components/client/Menu/Menu.Content.d.cts +0 -4
  195. package/dist/uds/dist/components/client/Menu/Menu.Content.d.mts +0 -4
  196. package/dist/uds/dist/components/client/Menu/Menu.Divider.d.cts +0 -3
  197. package/dist/uds/dist/components/client/Menu/Menu.Divider.d.mts +0 -3
  198. package/dist/uds/dist/components/client/Menu/Menu.Item.d.cts +0 -4
  199. package/dist/uds/dist/components/client/Menu/Menu.Item.d.mts +0 -4
  200. package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +0 -4
  201. package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.mts +0 -4
  202. package/dist/uds/dist/components/client/Menu/Menu.Provider.d.cts +0 -2
  203. package/dist/uds/dist/components/client/Menu/Menu.Provider.d.mts +0 -3
  204. package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.cts +0 -4
  205. package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.mts +0 -4
  206. package/dist/uds/dist/components/client/Menu/Menu.d.cts +0 -2
  207. package/dist/uds/dist/components/client/Menu/Menu.d.mts +0 -2
  208. package/dist/uds/dist/components/client/Menu/Menu.index.d.cts +0 -7
  209. package/dist/uds/dist/components/client/Menu/Menu.index.d.mts +0 -7
  210. package/dist/uds/dist/components/client/Menu/index.d.cts +0 -9
  211. package/dist/uds/dist/components/client/Menu/index.d.mts +0 -9
  212. package/dist/uds/dist/components/client/Pressable.d.cts +0 -3
  213. package/dist/uds/dist/components/client/Pressable.d.mts +0 -3
  214. package/dist/uds/dist/components/client/Radio/Radio.d.cts +0 -3
  215. package/dist/uds/dist/components/client/Radio/Radio.d.mts +0 -3
  216. package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.cts +0 -3
  217. package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.mts +0 -3
  218. package/dist/uds/dist/components/client/Radio/index.d.cts +0 -3
  219. package/dist/uds/dist/components/client/Radio/index.d.mts +0 -3
  220. package/dist/uds/dist/components/client/SpringMotionConfig.d.cts +0 -3
  221. package/dist/uds/dist/components/client/SpringMotionConfig.d.mts +0 -3
  222. package/dist/uds/dist/components/client/Switch.d.cts +0 -3
  223. package/dist/uds/dist/components/client/Switch.d.mts +0 -3
  224. package/dist/uds/dist/components/client/index.d.cts +0 -33
  225. package/dist/uds/dist/components/client/index.d.mts +0 -33
  226. package/dist/uds/dist/components/index.d.cts +0 -40
  227. package/dist/uds/dist/components/index.d.mts +0 -40
  228. package/dist/uds/dist/index.d.cts +0 -46
  229. package/dist/uds/dist/index.d.mts +0 -46
  230. package/dist/uds/dist/styles/styler.d.cts +0 -2
  231. package/dist/uds/dist/styles/styler.d.mts +0 -2
  232. package/dist/uds/dist/styles/stylerTypes.d.cts +0 -2
  233. package/dist/uds/dist/styles/stylerTypes.d.mts +0 -2
  234. package/dist/uds/dist/tokens/automation/configs/avatar.d.cts +0 -2
  235. package/dist/uds/dist/tokens/automation/configs/avatar.d.mts +0 -2
  236. package/dist/uds/dist/tokens/automation/properties.d.cts +0 -3
  237. package/dist/uds/dist/tokens/automation/properties.d.mts +0 -3
  238. package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.cts +0 -3
  239. package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.mts +0 -3
  240. package/dist/uds/dist/tokens/configs/motion.d.cts.map +0 -1
  241. package/dist/uds/dist/tokens/configs/motion.d.mts.map +0 -1
  242. package/dist/uds/dist/tokens/configs/motion.mjs.map +0 -1
  243. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts +0 -32
  244. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts.map +0 -1
  245. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts +0 -32
  246. package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts.map +0 -1
  247. package/dist/uds/dist/tokens/types.d.cts +0 -426
  248. package/dist/uds/dist/tokens/types.d.cts.map +0 -1
  249. package/dist/uds/dist/tokens/types.d.mts +0 -426
  250. package/dist/uds/dist/tokens/types.d.mts.map +0 -1
  251. package/dist/uds/dist/types.d.cts +0 -2
  252. package/dist/uds/dist/types.d.mts +0 -2
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { IconSlotType } from "./IconSlot.cjs";
3
- import * as react11 from "react";
3
+ import * as react0 from "react";
4
4
  import { View, ViewProps } from "react-native";
5
5
 
6
6
  //#region src/components/Avatar.d.ts
@@ -54,7 +54,7 @@ interface AvatarProps extends ViewProps {
54
54
  *
55
55
  * @see The {@link https://uds.build/docs/components/avatar Avatar Docs} for more info
56
56
  */
57
- declare const Avatar: react11.ForwardRefExoticComponent<AvatarProps & react11.RefAttributes<View>>;
57
+ declare const Avatar: react0.ForwardRefExoticComponent<AvatarProps & react0.RefAttributes<View>>;
58
58
  //#endregion
59
59
  export { Avatar, type AvatarProps };
60
60
  //# sourceMappingURL=Avatar.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.cts","names":[],"sources":["../../src/components/Avatar.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAWK,UAAA;;AAL0C,KAQ1C,aAAA,GAHU,SAAA,GAAA,WAAA;AAAA;AAGG,KAGb,oBAAA,GAAoB,OAAA,GAAA,MAAA,GAAA,cAAA,GAAA,UAAA,GAAA,YAAA,GAAA,aAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,MAAA,CAAA;AAAA,UASf,WAAA,SAAoB,SAAR,CAAA;EAQb;EAEG,GAAA,CAAA,EAAA,MAAA;EAEH;EAEgB,GAAA,CAAA,EAAA,MAAA;EAdK;EAAS,QAAA,CAAA,EAAA,MAAA;EA0EjC;EAAM,IAAA,CAAA,EAlEH,UAkEG;EAAA;EAAA,OAAA,CAAA,EAhEA,aAgEA;EAAA;EAAA,IAAA,CAAA,EA9DH,YA8DG;;yBA5Da;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4DnB,QAAM,OAAA,CAAA,0BAAA,cAAA,OAAA,CAAA,cAAA"}
1
+ {"version":3,"file":"Avatar.d.cts","names":[],"sources":["../../src/components/Avatar.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAWK,UAAA;;AAL0C,KAQ1C,aAAA,GAHU,SAAA,GAAA,WAAA;AAAA;AAGG,KAGb,oBAAA,GAAoB,OAAA,GAAA,MAAA,GAAA,cAAA,GAAA,UAAA,GAAA,YAAA,GAAA,aAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,MAAA,CAAA;AAAA,UASf,WAAA,SAAoB,SAAR,CAAA;EAQb;EAEG,GAAA,CAAA,EAAA,MAAA;EAEH;EAEgB,GAAA,CAAA,EAAA,MAAA;EAdK;EAAS,QAAA,CAAA,EAAA,MAAA;EA0EjC;EAAM,IAAA,CAAA,EAlEH,UAkEG;EAAA;EAAA,OAAA,CAAA,EAhEA,aAgEA;EAAA;EAAA,IAAA,CAAA,EA9DH,YA8DG;;yBA5Da;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4DnB,QAAM,MAAA,CAAA,0BAAA,cAAA,MAAA,CAAA,cAAA"}
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { IconSlotType } from "./IconSlot.mjs";
3
- import * as react0 from "react";
3
+ import * as react1 from "react";
4
4
  import { View, ViewProps } from "react-native";
5
5
 
6
6
  //#region src/components/Avatar.d.ts
@@ -54,7 +54,7 @@ interface AvatarProps extends ViewProps {
54
54
  *
55
55
  * @see The {@link https://uds.build/docs/components/avatar Avatar Docs} for more info
56
56
  */
57
- declare const Avatar: react0.ForwardRefExoticComponent<AvatarProps & react0.RefAttributes<View>>;
57
+ declare const Avatar: react1.ForwardRefExoticComponent<AvatarProps & react1.RefAttributes<View>>;
58
58
  //#endregion
59
59
  export { Avatar, type AvatarProps };
60
60
  //# sourceMappingURL=Avatar.d.mts.map
@@ -1,7 +1,7 @@
1
1
 
2
- import { BadgeSize, BadgeVariant } from "../uds/dist/tokens/types.cjs";
2
+ import { BadgeSize, BadgeVariant } from "../types/dist/index.cjs";
3
3
  import { IconSlotType } from "./IconSlot.cjs";
4
- import * as react14 from "react";
4
+ import * as react3 from "react";
5
5
  import { Ref } from "react";
6
6
  import { View, ViewProps } from "react-native";
7
7
 
@@ -37,7 +37,7 @@ interface BadgeProps extends ViewProps {
37
37
  * <Badge variant="alert" startIcon="Warning">Error</Badge>
38
38
  * ```
39
39
  */
40
- declare const Badge: react14.NamedExoticComponent<BadgeProps>;
40
+ declare const Badge: react3.NamedExoticComponent<BadgeProps>;
41
41
  //#endregion
42
42
  export { Badge, type BadgeProps };
43
43
  //# sourceMappingURL=Badge.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.cts","names":[],"sources":["../../src/components/Badge.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAWU,UAAA,SAAmB;;YAEjB;EAFF;EAEE,IAAA,CAAA,EAEH,SAFG;EAEH,QAAA,CAAA,EAAA,MAAA;EAIK;EACF,QAAA,CAAA,EAAA,MAAA;EAKA,SAAA,CAAA,EANE,YAMF;EAAJ,OAAA,CAAA,EALI,YAKJ;EAdqB,6BAAA,CAAA,EAAA,MAAA;EAAS,mBAAA,CAAA,EAAA,MAAA;EAgChC,yBAAK,CAAA,EAAA,MAAA;;QAlBH,IAAI;;;;;;;;;;;;;;;;;cAkBN,OAAK,OAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"Badge.d.cts","names":[],"sources":["../../src/components/Badge.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAWU,UAAA,SAAmB;;YAEjB;EAFF;EAEE,IAAA,CAAA,EAEH,SAFG;EAEH,QAAA,CAAA,EAAA,MAAA;EAIK;EACF,QAAA,CAAA,EAAA,MAAA;EAKA,SAAA,CAAA,EANE,YAMF;EAAJ,OAAA,CAAA,EALI,YAKJ;EAdqB,6BAAA,CAAA,EAAA,MAAA;EAAS,mBAAA,CAAA,EAAA,MAAA;EAgChC,yBAAK,CAAA,EAAA,MAAA;;QAlBH,IAAI;;;;;;;;;;;;;;;;;cAkBN,OAAK,MAAA,CAAA,qBAAA"}
@@ -1,7 +1,7 @@
1
1
 
2
- import { BadgeSize, BadgeVariant } from "../uds/dist/tokens/types.mjs";
2
+ import { BadgeSize, BadgeVariant } from "../types/dist/index.mjs";
3
3
  import { IconSlotType } from "./IconSlot.mjs";
4
- import * as react6 from "react";
4
+ import * as react4 from "react";
5
5
  import { Ref } from "react";
6
6
  import { View, ViewProps } from "react-native";
7
7
 
@@ -37,7 +37,7 @@ interface BadgeProps extends ViewProps {
37
37
  * <Badge variant="alert" startIcon="Warning">Error</Badge>
38
38
  * ```
39
39
  */
40
- declare const Badge: react6.NamedExoticComponent<BadgeProps>;
40
+ declare const Badge: react4.NamedExoticComponent<BadgeProps>;
41
41
  //#endregion
42
42
  export { Badge, type BadgeProps };
43
43
  //# sourceMappingURL=Badge.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.mjs","names":["Badge"],"sources":["../../src/components/Badge.tsx"],"sourcesContent":["import type { BadgeSize, BadgeVariant } from '@yahoo/uds/tokens';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { View, ViewProps } from 'react-native';\n\nimport { badgeStyles } from '../../generated/styles';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\n\ninterface BadgeProps extends ViewProps {\n /** @default 'primary' */\n variant?: BadgeVariant;\n /** @default 'md' */\n size?: BadgeSize;\n minWidth?: number;\n /** @default 200 */\n maxWidth?: number;\n startIcon?: IconSlotType;\n endIcon?: IconSlotType;\n dangerouslySetBackgroundColor?: string;\n dangerouslySetColor?: string;\n dangerouslySetBorderColor?: string;\n dangerouslySetIconColor?: string;\n ref?: Ref<View>;\n}\n\n/**\n * **A badge component for status indicators**\n *\n * @description\n * Badges show notifications, counts, or status information on navigation items and icons.\n *\n * @example\n * ```tsx\n * import { Badge } from '~/components/ui/Badge';\n *\n * <Badge>Label</Badge>\n * <Badge variant=\"brand\" size=\"sm\">New</Badge>\n * <Badge variant=\"alert\" startIcon=\"Warning\">Error</Badge>\n * ```\n */\nconst Badge = memo(function Badge({\n variant = 'primary',\n size = 'md',\n minWidth,\n maxWidth = 200,\n startIcon,\n endIcon,\n dangerouslySetBackgroundColor,\n dangerouslySetColor,\n dangerouslySetIconColor,\n dangerouslySetBorderColor,\n children,\n style,\n ref,\n ...rest\n}: BadgeProps) {\n badgeStyles.useVariants({ size, variant });\n const rootStyles = useMemo(() => [badgeStyles.root, style], [style, badgeStyles.root]);\n\n return (\n <HStack\n ref={ref}\n alignItems=\"center\"\n overflow=\"hidden\"\n alignSelf=\"flex-start\"\n maxWidth={maxWidth}\n minWidth={minWidth}\n dangerouslySetBackgroundColor={dangerouslySetBackgroundColor}\n dangerouslySetBorderColor={dangerouslySetBorderColor}\n // Cannot memoize - styles contain theme-reactive values\n style={rootStyles}\n {...rest}\n >\n {startIcon && (\n <IconSlot\n icon={startIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n <Text\n numberOfLines={1}\n flexShrink=\"1\"\n dangerouslySetColor={dangerouslySetColor}\n style={badgeStyles.text}\n >\n {children}\n </Text>\n {endIcon && (\n <IconSlot\n icon={endIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n </HStack>\n );\n});\n\nBadge.displayName = 'Badge';\n\nexport { Badge, type BadgeProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,QAAQ,KAAK,SAASA,QAAM,EAChC,UAAU,WACV,OAAO,MACP,UACA,WAAW,KACX,WACA,SACA,+BACA,qBACA,yBACA,2BACA,UACA,OACA,KACA,GAAG,QACU;AACb,aAAY,YAAY;EAAE;EAAM;EAAS,CAAC;AAG1C,QACE,qBAAC;EACM;EACL,YAAW;EACX,UAAS;EACT,WAAU;EACA;EACA;EACqB;EACJ;EAE3B,OAbe,cAAc,CAAC,YAAY,MAAM,MAAM,EAAE,CAAC,OAAO,YAAY,KAAK,CAAC;EAclF,GAAI;;GAEH,aACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;GAEJ,oBAAC;IACC,eAAe;IACf,YAAW;IACU;IACrB,OAAO,YAAY;IAElB;KACI;GACN,WACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;;GAEG;EAEX;AAEF,MAAM,cAAc"}
1
+ {"version":3,"file":"Badge.mjs","names":["Badge"],"sources":["../../src/components/Badge.tsx"],"sourcesContent":["import type { BadgeSize, BadgeVariant } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { View, ViewProps } from 'react-native';\n\nimport { badgeStyles } from '../../generated/styles';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\n\ninterface BadgeProps extends ViewProps {\n /** @default 'primary' */\n variant?: BadgeVariant;\n /** @default 'md' */\n size?: BadgeSize;\n minWidth?: number;\n /** @default 200 */\n maxWidth?: number;\n startIcon?: IconSlotType;\n endIcon?: IconSlotType;\n dangerouslySetBackgroundColor?: string;\n dangerouslySetColor?: string;\n dangerouslySetBorderColor?: string;\n dangerouslySetIconColor?: string;\n ref?: Ref<View>;\n}\n\n/**\n * **A badge component for status indicators**\n *\n * @description\n * Badges show notifications, counts, or status information on navigation items and icons.\n *\n * @example\n * ```tsx\n * import { Badge } from '~/components/ui/Badge';\n *\n * <Badge>Label</Badge>\n * <Badge variant=\"brand\" size=\"sm\">New</Badge>\n * <Badge variant=\"alert\" startIcon=\"Warning\">Error</Badge>\n * ```\n */\nconst Badge = memo(function Badge({\n variant = 'primary',\n size = 'md',\n minWidth,\n maxWidth = 200,\n startIcon,\n endIcon,\n dangerouslySetBackgroundColor,\n dangerouslySetColor,\n dangerouslySetIconColor,\n dangerouslySetBorderColor,\n children,\n style,\n ref,\n ...rest\n}: BadgeProps) {\n badgeStyles.useVariants({ size, variant });\n const rootStyles = useMemo(() => [badgeStyles.root, style], [style, badgeStyles.root]);\n\n return (\n <HStack\n ref={ref}\n alignItems=\"center\"\n overflow=\"hidden\"\n alignSelf=\"flex-start\"\n maxWidth={maxWidth}\n minWidth={minWidth}\n dangerouslySetBackgroundColor={dangerouslySetBackgroundColor}\n dangerouslySetBorderColor={dangerouslySetBorderColor}\n // Cannot memoize - styles contain theme-reactive values\n style={rootStyles}\n {...rest}\n >\n {startIcon && (\n <IconSlot\n icon={startIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n <Text\n numberOfLines={1}\n flexShrink=\"1\"\n dangerouslySetColor={dangerouslySetColor}\n style={badgeStyles.text}\n >\n {children}\n </Text>\n {endIcon && (\n <IconSlot\n icon={endIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n </HStack>\n );\n});\n\nBadge.displayName = 'Badge';\n\nexport { Badge, type BadgeProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,QAAQ,KAAK,SAASA,QAAM,EAChC,UAAU,WACV,OAAO,MACP,UACA,WAAW,KACX,WACA,SACA,+BACA,qBACA,yBACA,2BACA,UACA,OACA,KACA,GAAG,QACU;AACb,aAAY,YAAY;EAAE;EAAM;EAAS,CAAC;AAG1C,QACE,qBAAC;EACM;EACL,YAAW;EACX,UAAS;EACT,WAAU;EACA;EACA;EACqB;EACJ;EAE3B,OAbe,cAAc,CAAC,YAAY,MAAM,MAAM,EAAE,CAAC,OAAO,YAAY,KAAK,CAAC;EAclF,GAAI;;GAEH,aACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;GAEJ,oBAAC;IACC,eAAe;IACf,YAAW;IACU;IACrB,OAAO,YAAY;IAElB;KACI;GACN,WACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;;GAEG;EAEX;AAEF,MAAM,cAAc"}
@@ -16,7 +16,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
16
16
  *
17
17
  * @example
18
18
  * ```tsx
19
- * import { Box } from '@yahoo/uds';
19
+ * import { Box } from '@yahoo/uds-mobile/Box';
20
20
  *
21
21
  * <Box backgroundColor="primary" spacing="6">
22
22
  * Any kind of content can go here!
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { SizeProps } from "../types.cjs";
3
- import * as react17 from "react";
3
+ import * as react2 from "react";
4
4
  import { Ref } from "react";
5
5
  import { View, ViewProps } from "react-native";
6
6
  import { StyleProps } from "../../generated/styles";
@@ -66,7 +66,7 @@ interface BoxProps extends ViewProps, SizeProps {
66
66
  *
67
67
  * @example
68
68
  * ```tsx
69
- * import { Box } from '@yahoo/uds';
69
+ * import { Box } from '@yahoo/uds-mobile/Box';
70
70
  *
71
71
  * <Box backgroundColor="primary" spacing="6">
72
72
  * Any kind of content can go here!
@@ -81,7 +81,7 @@ interface BoxProps extends ViewProps, SizeProps {
81
81
  *
82
82
  * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
83
83
  */
84
- declare const Box: react17.NamedExoticComponent<BoxProps>;
84
+ declare const Box: react2.NamedExoticComponent<BoxProps>;
85
85
  //#endregion
86
86
  export { Box, type BoxProps };
87
87
  //# sourceMappingURL=Box.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.cts","names":[],"sources":["../../src/components/Box.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UASU,QAAA,SAAiB,WAAW;QAC9B,IAAI;EADF,eAAS,CAAA,EAEC,UAFD,CAAA,iBAAA,CAAA;EACP,YAAA,CAAA,EAEK,UAFL,CAAA,cAAA,CAAA;EAAJ,oBAAA,CAAA,EAGiB,UAHjB,CAAA,sBAAA,CAAA;EACY,kBAAA,CAAA,EAGG,UAHH,CAAA,oBAAA,CAAA;EACH,uBAAA,CAAA,EAGW,UAHX,CAAA,yBAAA,CAAA;EACQ,qBAAA,CAAA,EAGC,UAHD,CAAA,uBAAA,CAAA;EACF,WAAA,CAAA,EAGP,UAHO,CAAA,aAAA,CAAA;EACK,gBAAA,CAAA,EAGP,UAHO,CAAA,kBAAA,CAAA;EACF,cAAA,CAAA,EAGP,UAHO,CAAA,gBAAA,CAAA;EACV,cAAA,CAAA,EAGG,UAHH,CAAA,gBAAA,CAAA;EACK,iBAAA,CAAA,EAGC,UAHD,CAAA,mBAAA,CAAA;EACF,WAAA,CAAA,EAGH,UAHG,CAAA,aAAA,CAAA;EACA,mBAAA,CAAA,E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J,YAAA,CAAA,EAGM,UAHN,CAAA,cAAA,CAAA;EACQ,SAAA,CAAA,EAGL,UAHK,CAAA,WAAA,CAAA;EACE,WAAA,CAAA,EAGL,UAHK,CAAA,aAAA,CAAA;EACJ,SAAA,CAAA,EAGH,UAHG,CAAA,WAAA,CAAA;EACH,SAAA,CAAA,EAGA,UAHA,CAAA,WAAA,CAAA;EACE,MAAA,CAAA,EAGL,UAHK,CAAA,QAAA,CAAA;EACF,6BAAA,CAAA,EAAA,MAAA;EACA,yBAAA,CAAA,EAAA,MAAA;;;;;AAjDiC;;;;;;;;;;;;;;;;;;;;;;cAgFzC,KAAG,MAAA,CAAA,qBAAA"}
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { SizeProps } from "../types.mjs";
3
- import * as react10 from "react";
3
+ import * as react3 from "react";
4
4
  import { Ref } from "react";
5
5
  import { View, ViewProps } from "react-native";
6
6
  import { StyleProps } from "../../generated/styles";
@@ -66,7 +66,7 @@ interface BoxProps extends ViewProps, SizeProps {
66
66
  *
67
67
  * @example
68
68
  * ```tsx
69
- * import { Box } from '@yahoo/uds';
69
+ * import { Box } from '@yahoo/uds-mobile/Box';
70
70
  *
71
71
  * <Box backgroundColor="primary" spacing="6">
72
72
  * Any kind of content can go here!
@@ -81,7 +81,7 @@ interface BoxProps extends ViewProps, SizeProps {
81
81
  *
82
82
  * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
83
83
  */
84
- declare const Box: react10.NamedExoticComponent<BoxProps>;
84
+ declare const Box: react3.NamedExoticComponent<BoxProps>;
85
85
  //#endregion
86
86
  export { Box, type BoxProps };
87
87
  //# sourceMappingURL=Box.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.mts","names":[],"sources":["../../src/components/Box.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UASU,QAAA,SAAiB,WAAW;QAC9B,IAAI;EADF,eAAS,CAAA,EAEC,UAFD,CAAA,iBAAA,CAAA;EACP,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IH,UAJG,CAAA,SAAA,CAAA;EACF,QAAA,CAAA,EAIA,UAJA,CAAA,UAAA,CAAA;EACM,OAAA,CAAA,EAOP,UAPO,CAAA,SAAA,CAAA;EAEP,iBAAA,CAAA,EAMU,UANV,CAAA,mBAAA,CAAA;EACC,eAAA,CAAA,EAMO,UANP,CAAA,iBAAA,CAAA;EAID,aAAA,CAAA,EAGM,UAHN,CAAA,eAAA,CAAA;EACU,UAAA,CAAA,EAGP,UAHO,CAAA,YAAA,CAAA;EACF,YAAA,CAAA,EAGH,UAHG,CAAA,cAAA,CAAA;EACF,UAAA,CAAA,EAGH,UAHG,CAAA,YAAA,CAAA;EACH,MAAA,CAAA,EAGJ,UAHI,CAAA,QAAA,CAAA;EACE,cAAA,CAAA,EAGE,UAHF,CAAA,gBAAA,CAAA;EACF,gBAAA,CAAA,EAGM,UAHN,CAAA,kBAAA,CAAA;EACJ,YAAA,CAAA,EAGM,UAHN,CAAA,cAAA,CAAA;EACQ,SAAA,CAAA,EAGL,UAHK,CAAA,WAAA,CAAA;EACE,WAAA,CAAA,EAGL,UAHK,CAAA,aAAA,CAAA;EACJ,SAAA,CAAA,EAGH,UAHG,CAAA,WAAA,CAAA;EACH,SAAA,CAAA,EAGA,UAHA,CAAA,WAAA,CAAA;EACE,MAAA,CAAA,EAGL,UAHK,CAAA,QAAA,CAAA;EACF,6BAAA,CAAA,EAAA,MAAA;EACA,yBAAA,CAAA,EAAA,MAAA;;;;;AAjDiC;;;;;;;;;;;;;;;;;;;;;;cAgFzC,KAAG,MAAA,CAAA,qBAAA"}
@@ -15,7 +15,7 @@ import { jsx } from "react/jsx-runtime";
15
15
  *
16
16
  * @example
17
17
  * ```tsx
18
- * import { Box } from '@yahoo/uds';
18
+ * import { Box } from '@yahoo/uds-mobile/Box';
19
19
  *
20
20
  * <Box backgroundColor="primary" spacing="6">
21
21
  * Any kind of content can go here!
@@ -1 +1 @@
1
- {"version":3,"file":"Box.mjs","names":["Box"],"sources":["../../src/components/Box.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport type { SizeProps } from '../types';\n\ninterface BoxProps extends ViewProps, SizeProps {\n ref?: Ref<View>;\n backgroundColor?: StyleProps['backgroundColor'];\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n alignContent?: StyleProps['alignContent'];\n alignItems?: StyleProps['alignItems'];\n alignSelf?: StyleProps['alignSelf'];\n flex?: StyleProps['flex'];\n flexDirection?: StyleProps['flexDirection'];\n flexGrow?: StyleProps['flexGrow'];\n flexShrink?: StyleProps['flexShrink'];\n flexWrap?: StyleProps['flexWrap'];\n justifyContent?: StyleProps['justifyContent'];\n // flexBasis?: StyleProps['flexBasis'];\n display?: StyleProps['display'];\n overflow?: StyleProps['overflow'];\n // overflowX?: StyleProps['overflowX'];\n // overflowY?: StyleProps['overflowY'];\n // position?: StyleProps['position'];\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n columnGap?: StyleProps['columnGap'];\n rowGap?: StyleProps['rowGap'];\n dangerouslySetBackgroundColor?: string;\n dangerouslySetBorderColor?: string;\n}\n\n/**\n * **📦 A layout component that can be used to compose other components**\n *\n * @description\n * The most simple component we ship - a div. But with all the power of the UDS design system.\n * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,\n * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.\n *\n * @example\n * ```tsx\n * import { Box } from '@yahoo/uds';\n *\n * <Box backgroundColor=\"primary\" spacing=\"6\">\n * Any kind of content can go here!\n * </Box>\n * ```\n *\n * @usage\n * - If you need to div-like container to apply padding, shapes, or other styling.\n * - If you're creating card components.\n *\n * @see The {@link https://uds.build/docs/components/box Box Docs} for more info\n *\n * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)\n */\nconst Box = memo(function Box({\n // background\n backgroundColor,\n dangerouslySetBackgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n dangerouslySetBorderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display = 'flex',\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // size\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n // // shadow\n // dropShadow,\n // insetShadow,\n // // nested border radius\n // nestedBorderRadius,\n // nestedBorderRadiusSize = nestedBorderRadius ? borderRadius : undefined,\n // nestedBorderRadiusSpacing = nestedBorderRadius ? spacing : undefined,\n // nestedBorderRadiusWidth = nestedBorderRadius ? borderWidth : undefined,\n // style - extracted to merge with variants\n style,\n ref,\n // rest\n ...props\n}: BoxProps) {\n const variants = {\n // background\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n // nestedBorderRadius,\n // nestedBorderRadiusSize,\n // nestedBorderRadiusSpacing,\n // nestedBorderRadiusWidth,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display,\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // rest\n };\n\n styles.useVariants(variants);\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const boxStyles = useMemo(\n () => [\n dangerouslySetBackgroundColor\n ? { backgroundColor: dangerouslySetBackgroundColor }\n : undefined,\n dangerouslySetBorderColor ? { borderColor: dangerouslySetBorderColor } : undefined,\n width ? { width } : undefined,\n height ? { height } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n styles.foundation,\n style,\n ],\n [\n dangerouslySetBackgroundColor,\n dangerouslySetBorderColor,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n styles.foundation,\n style,\n ],\n );\n\n // Merge variant styles with user-provided style prop\n // User styles come last so they can override variant styles if needed\n return <View ref={ref} style={boxStyles} {...props} />;\n});\n\nBox.displayName = 'Box';\n\nexport { Box, type BoxProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,MAAM,MAAM,KAAK,SAASA,MAAI,EAE5B,iBACA,+BAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,2BACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,cACA,YACA,WACA,MACA,eACA,UACA,YACA,UACA,gBAGA,UAAU,QACV,UAKA,SACA,mBACA,iBACA,eACA,YACA,cACA,YACA,QACA,gBACA,kBACA,cACA,WACA,aACA,WACA,WACA,QAEA,OACA,QACA,UACA,UACA,WACA,WAUA,OACA,KAEA,GAAG,SACQ;CACX,MAAM,WAAW;EAEf;EAEA;EACA;EACA;EACA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAED;AAED,QAAO,YAAY,SAAS;AAkC5B,QAAO,oBAAC;EAAU;EAAK,OA/BL,cACV;GACJ,gCACI,EAAE,iBAAiB,+BAA+B,GAClD;GACJ,4BAA4B,EAAE,aAAa,2BAA2B,GAAG;GACzE,QAAQ,EAAE,OAAO,GAAG;GACpB,SAAS,EAAE,QAAQ,GAAG;GACtB,WAAW,EAAE,UAAU,GAAG;GAC1B,WAAW,EAAE,UAAU,GAAG;GAC1B,YAAY,EAAE,WAAW,GAAG;GAC5B,YAAY,EAAE,WAAW,GAAG;GAC5B,OAAO;GACP;GACD,EACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;GACD,CACF;EAIwC,GAAI;GAAS;EACtD;AAEF,IAAI,cAAc"}
1
+ {"version":3,"file":"Box.mjs","names":["Box"],"sources":["../../src/components/Box.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport type { SizeProps } from '../types';\n\ninterface BoxProps extends ViewProps, SizeProps {\n ref?: Ref<View>;\n backgroundColor?: StyleProps['backgroundColor'];\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n alignContent?: StyleProps['alignContent'];\n alignItems?: StyleProps['alignItems'];\n alignSelf?: StyleProps['alignSelf'];\n flex?: StyleProps['flex'];\n flexDirection?: StyleProps['flexDirection'];\n flexGrow?: StyleProps['flexGrow'];\n flexShrink?: StyleProps['flexShrink'];\n flexWrap?: StyleProps['flexWrap'];\n justifyContent?: StyleProps['justifyContent'];\n // flexBasis?: StyleProps['flexBasis'];\n display?: StyleProps['display'];\n overflow?: StyleProps['overflow'];\n // overflowX?: StyleProps['overflowX'];\n // overflowY?: StyleProps['overflowY'];\n // position?: StyleProps['position'];\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n columnGap?: StyleProps['columnGap'];\n rowGap?: StyleProps['rowGap'];\n dangerouslySetBackgroundColor?: string;\n dangerouslySetBorderColor?: string;\n}\n\n/**\n * **📦 A layout component that can be used to compose other components**\n *\n * @description\n * The most simple component we ship - a div. But with all the power of the UDS design system.\n * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,\n * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.\n *\n * @example\n * ```tsx\n * import { Box } from '@yahoo/uds-mobile/Box';\n *\n * <Box backgroundColor=\"primary\" spacing=\"6\">\n * Any kind of content can go here!\n * </Box>\n * ```\n *\n * @usage\n * - If you need to div-like container to apply padding, shapes, or other styling.\n * - If you're creating card components.\n *\n * @see The {@link https://uds.build/docs/components/box Box Docs} for more info\n *\n * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)\n */\nconst Box = memo(function Box({\n // background\n backgroundColor,\n dangerouslySetBackgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n dangerouslySetBorderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display = 'flex',\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // size\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n // // shadow\n // dropShadow,\n // insetShadow,\n // // nested border radius\n // nestedBorderRadius,\n // nestedBorderRadiusSize = nestedBorderRadius ? borderRadius : undefined,\n // nestedBorderRadiusSpacing = nestedBorderRadius ? spacing : undefined,\n // nestedBorderRadiusWidth = nestedBorderRadius ? borderWidth : undefined,\n // style - extracted to merge with variants\n style,\n ref,\n // rest\n ...props\n}: BoxProps) {\n const variants = {\n // background\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n // nestedBorderRadius,\n // nestedBorderRadiusSize,\n // nestedBorderRadiusSpacing,\n // nestedBorderRadiusWidth,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display,\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // rest\n };\n\n styles.useVariants(variants);\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const boxStyles = useMemo(\n () => [\n dangerouslySetBackgroundColor\n ? { backgroundColor: dangerouslySetBackgroundColor }\n : undefined,\n dangerouslySetBorderColor ? { borderColor: dangerouslySetBorderColor } : undefined,\n width ? { width } : undefined,\n height ? { height } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n styles.foundation,\n style,\n ],\n [\n dangerouslySetBackgroundColor,\n dangerouslySetBorderColor,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n styles.foundation,\n style,\n ],\n );\n\n // Merge variant styles with user-provided style prop\n // User styles come last so they can override variant styles if needed\n return <View ref={ref} style={boxStyles} {...props} />;\n});\n\nBox.displayName = 'Box';\n\nexport { Box, type BoxProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,MAAM,MAAM,KAAK,SAASA,MAAI,EAE5B,iBACA,+BAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,2BACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,cACA,YACA,WACA,MACA,eACA,UACA,YACA,UACA,gBAGA,UAAU,QACV,UAKA,SACA,mBACA,iBACA,eACA,YACA,cACA,YACA,QACA,gBACA,kBACA,cACA,WACA,aACA,WACA,WACA,QAEA,OACA,QACA,UACA,UACA,WACA,WAUA,OACA,KAEA,GAAG,SACQ;CACX,MAAM,WAAW;EAEf;EAEA;EACA;EACA;EACA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAED;AAED,QAAO,YAAY,SAAS;AAkC5B,QAAO,oBAAC;EAAU;EAAK,OA/BL,cACV;GACJ,gCACI,EAAE,iBAAiB,+BAA+B,GAClD;GACJ,4BAA4B,EAAE,aAAa,2BAA2B,GAAG;GACzE,QAAQ,EAAE,OAAO,GAAG;GACpB,SAAS,EAAE,QAAQ,GAAG;GACtB,WAAW,EAAE,UAAU,GAAG;GAC1B,WAAW,EAAE,UAAU,GAAG;GAC1B,YAAY,EAAE,WAAW,GAAG;GAC5B,YAAY,EAAE,WAAW,GAAG;GAC5B,OAAO;GACP;GACD,EACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;GACD,CACF;EAIwC,GAAI;GAAS;EACtD;AAEF,IAAI,cAAc"}
@@ -1,7 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- const require_motion = require('../uds/dist/tokens/configs/motion.cjs');
4
- const require_motion$1 = require('../motion.cjs');
3
+ const require_index = require('../motion-tokens/dist/index.cjs');
4
+ const require_motion = require('../motion.cjs');
5
5
  const require_components_IconSlot = require('./IconSlot.cjs');
6
6
  const require_components_Text = require('./Text.cjs');
7
7
  const require_components_Pressable = require('./Pressable.cjs');
@@ -32,7 +32,7 @@ function interpolateShadowAlpha(shadow, alpha) {
32
32
  * Uses staggered animation: opacity waits until halfway through width animation.
33
33
  */
34
34
  function AnimatedIconSlot({ children, visible, iconSize, gap }) {
35
- const progress = (0, react_native_reanimated.useDerivedValue)(() => (0, react_native_reanimated.withSpring)(visible ? 1 : 0, require_motion$1.BUTTON_SPRING_CONFIG), [visible]);
35
+ const progress = (0, react_native_reanimated.useDerivedValue)(() => (0, react_native_reanimated.withSpring)(visible ? 1 : 0, require_motion.BUTTON_SPRING_CONFIG), [visible]);
36
36
  const animatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
37
37
  const totalWidth = iconSize + gap;
38
38
  return {
@@ -70,7 +70,7 @@ function AnimatedIconSlot({ children, visible, iconSize, gap }) {
70
70
  *
71
71
  * @see The {@link https://uds.build/docs/components/button Button Docs} for more info
72
72
  */
73
- const Button = (0, react.memo)(function Button$1({ variant = "primary", size = "md", iconVariant = "outline", startIcon, endIcon, loading, disabled, width, children, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
73
+ const Button = (0, react.memo)(function Button$1({ variant = "primary", size = "md", iconVariant = "outline", startIcon, endIcon, loading, disabled, width: _width, children, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
74
74
  const shouldAnimate = !disableEffects;
75
75
  const [pressed, setPressed] = (0, react.useState)(false);
76
76
  generated_styles.buttonStyles.useVariants({
@@ -82,10 +82,10 @@ const Button = (0, react.memo)(function Button$1({ variant = "primary", size = "
82
82
  const buttonGap = generated_styles.buttonStyles.root.gap;
83
83
  const iconSize = generated_styles.buttonStyles.icon.fontSize;
84
84
  const animatedTheme = (0, react_native_unistyles_reanimated.useAnimatedTheme)();
85
- const scale = (0, react_native_reanimated.useSharedValue)(require_motion.SCALE_EFFECTS.none);
85
+ const scale = (0, react_native_reanimated.useSharedValue)(require_index.SCALE_EFFECTS.none);
86
86
  const handlePressIn = (0, react.useCallback)((event) => {
87
87
  setPressed(true);
88
- if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_motion.SCALE_EFFECTS.down, require_motion$1.BUTTON_SPRING_CONFIG);
88
+ if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_index.SCALE_EFFECTS.down, require_motion.BUTTON_SPRING_CONFIG);
89
89
  onPressIn?.(event);
90
90
  }, [
91
91
  shouldAnimate,
@@ -94,7 +94,7 @@ const Button = (0, react.memo)(function Button$1({ variant = "primary", size = "
94
94
  ]);
95
95
  const handlePressOut = (0, react.useCallback)((event) => {
96
96
  setPressed(false);
97
- if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_motion.SCALE_EFFECTS.none, require_motion$1.BUTTON_SPRING_CONFIG);
97
+ if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_index.SCALE_EFFECTS.none, require_motion.BUTTON_SPRING_CONFIG);
98
98
  onPressOut?.(event);
99
99
  }, [
100
100
  shouldAnimate,
@@ -1,9 +1,8 @@
1
1
 
2
- import { IconVariant } from "../icons/dist/types.cjs";
3
- import { ButtonSize, ButtonVariantFlat } from "../uds/dist/tokens/types.cjs";
2
+ import { ButtonSize, ButtonVariantFlat, IconVariant } from "../types/dist/index.cjs";
4
3
  import { IconSlotType } from "./IconSlot.cjs";
5
4
  import { PressableProps as PressableProps$1 } from "./Pressable.cjs";
6
- import * as react13 from "react";
5
+ import * as react1 from "react";
7
6
  import { Ref } from "react";
8
7
  import { View } from "react-native";
9
8
 
@@ -50,7 +49,7 @@ interface ButtonProps extends Omit<PressableProps$1, 'children' | 'disabled'> {
50
49
  *
51
50
  * @see The {@link https://uds.build/docs/components/button Button Docs} for more info
52
51
  */
53
- declare const Button: react13.NamedExoticComponent<ButtonProps>;
52
+ declare const Button: react1.NamedExoticComponent<ButtonProps>;
54
53
  //#endregion
55
54
  export { Button, type ButtonProps };
56
55
  //# sourceMappingURL=Button.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.cts","names":[],"sources":["../../src/components/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA2GU,WAAA,SAAoB,KAAK;;YAEvB;;EAFF,IAAA,CAAA,EAID,UAJa;EAAa;EAEvB,WAAA,CAAA,EAII,WAJJ;EAEH,SAAA,CAAA,EAGK,YAHL;EAEO,OAAA,CAAA,EAEJ,YAFI;EACF,OAAA,CAAA,EAAA,OAAA;EACF,QAAA,CAAA,EAAA,OAAA;EAGC,QAAM,CAAA,EAAN,KAAA,CAAM,SAAA;EAMP;;;;EA8BN,cA4JJ,CAAA,EAAA,OA5JU;QA9BJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;cA8BN,QAAM,OAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"Button.d.cts","names":[],"sources":["../../src/components/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;UA2GU,WAAA,SAAoB,KAAK;;YAEvB;EAFF;EAAyB,IAAA,CAAA,EAI1B,UAJ0B;EAEvB;EAEH,WAAA,CAAA,EAEO,WAFP;EAEO,SAAA,CAAA,EACF,YADE;EACF,OAAA,CAAA,EACF,YADE;EACF,OAAA,CAAA,EAAA,OAAA;EAGC,QAAM,CAAA,EAAA,OAAA;EAMP,QAAA,CAAA,EANC,KAAA,CAAM,SAMP;EAAJ;;;AAjB0B;;QAiB1B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;cA8BN,QAAM,MAAA,CAAA,qBAAA"}
@@ -1,9 +1,8 @@
1
1
 
2
- import { IconVariant } from "../icons/dist/types.mjs";
3
- import { ButtonSize, ButtonVariantFlat } from "../uds/dist/tokens/types.mjs";
2
+ import { ButtonSize, ButtonVariantFlat, IconVariant } from "../types/dist/index.mjs";
4
3
  import { IconSlotType } from "./IconSlot.mjs";
5
4
  import { PressableProps as PressableProps$1 } from "./Pressable.mjs";
6
- import * as react17 from "react";
5
+ import * as react0 from "react";
7
6
  import { Ref } from "react";
8
7
  import { View } from "react-native";
9
8
 
@@ -50,7 +49,7 @@ interface ButtonProps extends Omit<PressableProps$1, 'children' | 'disabled'> {
50
49
  *
51
50
  * @see The {@link https://uds.build/docs/components/button Button Docs} for more info
52
51
  */
53
- declare const Button: react17.NamedExoticComponent<ButtonProps>;
52
+ declare const Button: react0.NamedExoticComponent<ButtonProps>;
54
53
  //#endregion
55
54
  export { Button, type ButtonProps };
56
55
  //# sourceMappingURL=Button.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.mts","names":[],"sources":["../../src/components/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA2GU,WAAA,SAAoB,KAAK;;YAEvB;;EAFF,IAAA,CAAA,EAID,UAJa;EAAa;EAEvB,WAAA,CAAA,EAII,WAJJ;EAEH,SAAA,CAAA,EAGK,YAHL;EAEO,OAAA,CAAA,EAEJ,YAFI;EACF,OAAA,CAAA,EAAA,OAAA;EACF,QAAA,CAAA,EAAA,OAAA;EAGC,QAAM,CAAA,EAAN,KAAA,CAAM,SAAA;EAMP;;;;EA8BN,cA4JJ,CAAA,EAAA,OA5JU;QA9BJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;cA8BN,QAAM,OAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"Button.d.mts","names":[],"sources":["../../src/components/Button.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;UA2GU,WAAA,SAAoB,KAAK;;YAEvB;EAFF;EAAyB,IAAA,CAAA,EAI1B,UAJ0B;EAEvB;EAEH,WAAA,CAAA,EAEO,WAFP;EAEO,SAAA,CAAA,EACF,YADE;EACF,OAAA,CAAA,EACF,YADE;EACF,OAAA,CAAA,EAAA,OAAA;EAGC,QAAM,CAAA,EAAA,OAAA;EAMP,QAAA,CAAA,EANC,KAAA,CAAM,SAMP;EAAJ;;;AAjB0B;;QAiB1B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;cA8BN,QAAM,MAAA,CAAA,qBAAA"}
@@ -1,5 +1,5 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
- import { SCALE_EFFECTS } from "../uds/dist/tokens/configs/motion.mjs";
2
+ import { SCALE_EFFECTS } from "../motion-tokens/dist/index.mjs";
3
3
  import { BUTTON_SPRING_CONFIG } from "../motion.mjs";
4
4
  import { IconSlot } from "./IconSlot.mjs";
5
5
  import { Text as Text$1 } from "./Text.mjs";
@@ -68,7 +68,7 @@ function AnimatedIconSlot({ children, visible, iconSize, gap }) {
68
68
  *
69
69
  * @see The {@link https://uds.build/docs/components/button Button Docs} for more info
70
70
  */
71
- const Button = memo(function Button$1({ variant = "primary", size = "md", iconVariant = "outline", startIcon, endIcon, loading, disabled, width, children, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
71
+ const Button = memo(function Button$1({ variant = "primary", size = "md", iconVariant = "outline", startIcon, endIcon, loading, disabled, width: _width, children, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
72
72
  const shouldAnimate = !disableEffects;
73
73
  const [pressed, setPressed] = useState(false);
74
74
  buttonStyles.useVariants({
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","names":["Button","Text"],"sources":["../../src/components/Button.tsx"],"sourcesContent":["import type { ButtonSize, ButtonVariantFlat, IconVariant } from '@yahoo/uds/tokens';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useMemo, useState } from 'react';\nimport type { View } from 'react-native';\nimport { ActivityIndicator } from 'react-native';\nimport Animated, {\n Easing,\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport { useAnimatedTheme } from 'react-native-unistyles/reanimated';\n\nimport { buttonStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport type { PressableProps } from './Pressable';\nimport { AnimatedPressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Animation Helpers */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Interpolates a boxShadow string by scaling the alpha of all colors.\n * This allows smooth fade-in/out of shadows.\n */\nfunction interpolateShadowAlpha(shadow: string, alpha: number): string {\n 'worklet';\n if (!shadow || alpha >= 1) {\n return shadow;\n }\n if (alpha <= 0) {\n return '';\n }\n\n return shadow.replace(/rgba\\(([^,]+),\\s*([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/g, (_, r, g, b, a) => {\n const newAlpha = parseFloat(a) * alpha;\n return `rgba(${r}, ${g}, ${b}, ${newAlpha.toFixed(3)})`;\n });\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animated Icon Slot */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Animated wrapper for icon/loading content.\n * Matches web Button icon animation: scale 0.7→1, opacity 0→1, width 0→auto\n * Uses staggered animation: opacity waits until halfway through width animation.\n */\nfunction AnimatedIconSlot({\n children,\n visible,\n iconSize,\n gap,\n}: {\n children: React.ReactNode;\n visible: boolean;\n iconSize: number;\n gap: number;\n}) {\n // Use useDerivedValue instead of useEffect + useSharedValue\n // This is the idiomatic Reanimated pattern for deriving animated values from React state\n const progress = useDerivedValue(\n () => withSpring(visible ? 1 : 0, BUTTON_SPRING_CONFIG),\n [visible],\n );\n\n const animatedStyle = useAnimatedStyle(() => {\n // Total width includes icon + gap when visible\n const totalWidth = iconSize + gap;\n const width = interpolate(progress.value, [0, 1], [0, totalWidth]);\n\n // Staggered animation: opacity starts at 50% of width animation\n // On enter: width expands first, then icon fades in\n // On exit: icon fades out first, then width collapses\n const opacity = interpolate(progress.value, [0.5, 1], [0, 1], 'clamp');\n const scale = interpolate(progress.value, [0.5, 1], [0.7, 1], 'clamp');\n\n return {\n width,\n opacity,\n transform: [{ scale }],\n overflow: 'hidden' as const,\n };\n });\n\n return <Animated.View style={animatedStyle}>{children}</Animated.View>;\n}\n\n// function LoadingIcon({ size, variant }: { size: ButtonSize, variant: ButtonVariantFlat }) {\n// const { theme } = useUnistyles();\n// const themeKey = `buttonVariant${variantToCapitalMap[variant]}IconRest` as const;\n// const iconSize = theme.components.buttonSizeLgIconRest.fontSize;\n// return <ActivityIndicator size={iconSize} color={theme.colors.text.primary} />;\n// }\n\n/* -------------------------------------------------------------------------- */\n/* Button Props */\n/* -------------------------------------------------------------------------- */\n\ninterface ButtonProps extends Omit<PressableProps, 'children' | 'disabled'> {\n /** @default 'primary' */\n variant?: ButtonVariantFlat;\n /** @default 'md' */\n size?: ButtonSize;\n /** @default 'outline' */\n iconVariant?: IconVariant;\n startIcon?: IconSlotType;\n endIcon?: IconSlotType;\n loading?: boolean;\n disabled?: boolean;\n children?: React.ReactNode;\n /**\n * Disable motion effects (scale on press, icon animations)\n * @default false\n */\n disableEffects?: boolean;\n ref?: Ref<View>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Button Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **🖲️ A button element that can be used to trigger an action**\n *\n * @description\n * A button is a fundamental component used to trigger an action or event.\n * Buttons are interactive elements that users can click, tap, or otherwise\n * engage with to submit forms, open dialogues, or perform any other interaction.\n *\n * Features animated scale effect on press and smooth icon transitions matching\n * the web UDS Button behavior.\n *\n * @example\n * ```tsx\n * import { Button } from '@yahoo/uds-mobile';\n *\n * <Button onPress={() => console.log('pressed')}>Save</Button>\n * <Button variant=\"secondary\">Cancel</Button>\n * <Button startIcon=\"Add\" variant=\"brand\">Add Item</Button>\n * <Button loading>Saving...</Button>\n * ```\n *\n * @see The {@link https://uds.build/docs/components/button Button Docs} for more info\n */\nconst Button = memo(function Button({\n variant = 'primary',\n size = 'md',\n iconVariant = 'outline',\n startIcon,\n endIcon,\n loading,\n disabled,\n width,\n children,\n style,\n accessibilityLabel,\n accessibilityHint,\n disableEffects = false,\n onPressIn,\n onPressOut,\n ref,\n ...props\n}: ButtonProps) {\n const shouldAnimate = !disableEffects;\n\n /* --------------------------------- State ---------------------------------- */\n const [pressed, setPressed] = useState(false);\n\n buttonStyles.useVariants({ size, variant, disabled, pressed });\n\n // Get gap and icon size from current variant styles\n const buttonGap = buttonStyles.root.gap;\n const iconSize = buttonStyles.icon.fontSize;\n\n // Get animated theme for boxShadow (useAnimatedVariantColor doesn't support non-color props)\n const animatedTheme = useAnimatedTheme();\n\n /* ------------------------------- Animation -------------------------------- */\n const scale = useSharedValue<number>(SCALE_EFFECTS.none);\n\n const handlePressIn = useCallback(\n (event: Parameters<NonNullable<PressableProps['onPressIn']>>[0]) => {\n setPressed(true);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.down, BUTTON_SPRING_CONFIG);\n }\n onPressIn?.(event);\n },\n [shouldAnimate, scale, onPressIn],\n );\n\n const handlePressOut = useCallback(\n (event: Parameters<NonNullable<PressableProps['onPressOut']>>[0]) => {\n setPressed(false);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG);\n }\n onPressOut?.(event);\n },\n [shouldAnimate, scale, onPressOut],\n );\n\n /* -------------------------------- Content --------------------------------- */\n const childrenNode =\n children &&\n (isValidElement(children) ? (\n children\n ) : (\n <Text numberOfLines={1} textAlign=\"center\" style={buttonStyles.text}>\n {children}\n </Text>\n ));\n\n const a11yState = useMemo(() => ({ disabled, busy: loading }), [disabled, loading]);\n\n /* --------------------------------- Styles --------------------------------- */\n // Animate pressed state for shadow (0 = rest, 1 = pressed)\n const pressProgress = useDerivedValue(\n () => withTiming(pressed ? 1 : 0, { duration: 220, easing: Easing.bezier(0, 0, 0.2, 1) }),\n [pressed],\n );\n\n // Animate using Unistyles' variant color system + boxShadow from theme\n const animatedStyles = useAnimatedStyle(() => {\n // Get boxShadow from theme using flattened path (no camelCase conversion needed!)\n const components = animatedTheme.value.components;\n const buttonVariantPath = `button/variant/${variant}/root/pressed` as const;\n const shadowPressed = components[buttonVariantPath].boxShadow;\n\n return {\n transform: [{ scale: scale.value }],\n // backgroundColor: withTiming(backgroundColor.value, {\n // duration: 220,\n // easing: Easing.bezier(0, 0, 0.2, 1),\n // }),\n // borderColor: withTiming(borderColor.value, {\n // duration: 220,\n // easing: Easing.bezier(0, 0, 0.2, 1),\n // }),\n // Animate shadow by interpolating its color alpha\n boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\n };\n });\n\n // Determine what should be visible in start slot\n const showLoading = !!loading;\n const showStartIcon = !!startIcon && !loading;\n const showEndIcon = !!endIcon && !loading;\n\n // Start slot: either loading spinner or start icon\n const startContent = (\n <AnimatedIconSlot visible={showLoading || showStartIcon} iconSize={iconSize} gap={buttonGap}>\n {showLoading ? (\n <ActivityIndicator size={buttonStyles.icon.fontSize} color={buttonStyles.icon.color} />\n ) : (\n <IconSlot icon={startIcon} variant={iconVariant} style={buttonStyles.icon} />\n )}\n </AnimatedIconSlot>\n );\n\n // End slot: only end icon (no loading here)\n const endContent = (\n <AnimatedIconSlot visible={showEndIcon} iconSize={iconSize} gap={buttonGap}>\n <IconSlot icon={endIcon} variant={iconVariant} style={buttonStyles.icon} />\n </AnimatedIconSlot>\n );\n\n const rootStyles = useMemo(\n () => [\n buttonStyles.root,\n animatedStyles,\n typeof style === 'function' ? style({ pressed }) : style,\n ],\n [buttonStyles.root, animatedStyles, style, pressed],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <AnimatedPressable\n ref={ref}\n disabled={disabled}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n accessibilityLabel={loading ? `${accessibilityLabel ?? ''}, loading` : accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole=\"button\"\n accessibilityState={a11yState}\n alignContent=\"center\"\n style={rootStyles}\n {...props}\n >\n {startContent}\n {childrenNode}\n {endContent}\n </AnimatedPressable>\n );\n});\n\nButton.displayName = 'Button';\n\nexport { Button, type ButtonProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,SAAS,uBAAuB,QAAgB,OAAuB;AACrE;AACA,KAAI,CAAC,UAAU,SAAS,EACtB,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAGT,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a;IAAQ;GAC1D;CAGrB,MAAM,aAAa,cACX;EACJ,aAAa;EACb;EACA,OAAO,UAAU,aAAa,MAAM,EAAE,SAAS,CAAC,GAAG;EACpD,EACD;EAAC,aAAa;EAAM;EAAgB;EAAO;EAAQ,CACpD;AAGD,QACE,qBAAC;EACM;EACK;EACV,WAAW;EACX,YAAY;EACZ,eAAc;EACd,YAAW;EACX,gBAAe;EACf,UAAS;EACT,oBAAoB,UAAU,GAAG,sBAAsB,GAAG,aAAa;EACpD;EACnB,mBAAkB;EAClB,oBAAoB;EACpB,cAAa;EACb,OAAO;EACP,GAAI;;GAEH;GACA;GACA;;GACiB;EAEtB;AAEF,OAAO,cAAc"}
1
+ {"version":3,"file":"Button.mjs","names":["Button","Text"],"sources":["../../src/components/Button.tsx"],"sourcesContent":["import type { ButtonSize, ButtonVariantFlat, IconVariant } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useMemo, useState } from 'react';\nimport type { View } from 'react-native';\nimport { ActivityIndicator } from 'react-native';\nimport Animated, {\n Easing,\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport { useAnimatedTheme } from 'react-native-unistyles/reanimated';\n\nimport { buttonStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport type { PressableProps } from './Pressable';\nimport { AnimatedPressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Animation Helpers */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Interpolates a boxShadow string by scaling the alpha of all colors.\n * This allows smooth fade-in/out of shadows.\n */\nfunction interpolateShadowAlpha(shadow: string, alpha: number): string {\n 'worklet';\n if (!shadow || alpha >= 1) {\n return shadow;\n }\n if (alpha <= 0) {\n return '';\n }\n\n return shadow.replace(/rgba\\(([^,]+),\\s*([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/g, (_, r, g, b, a) => {\n const newAlpha = parseFloat(a) * alpha;\n return `rgba(${r}, ${g}, ${b}, ${newAlpha.toFixed(3)})`;\n });\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animated Icon Slot */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Animated wrapper for icon/loading content.\n * Matches web Button icon animation: scale 0.7→1, opacity 0→1, width 0→auto\n * Uses staggered animation: opacity waits until halfway through width animation.\n */\nfunction AnimatedIconSlot({\n children,\n visible,\n iconSize,\n gap,\n}: {\n children: React.ReactNode;\n visible: boolean;\n iconSize: number;\n gap: number;\n}) {\n // Use useDerivedValue instead of useEffect + useSharedValue\n // This is the idiomatic Reanimated pattern for deriving animated values from React state\n const progress = useDerivedValue(\n () => withSpring(visible ? 1 : 0, BUTTON_SPRING_CONFIG),\n [visible],\n );\n\n const animatedStyle = useAnimatedStyle(() => {\n // Total width includes icon + gap when visible\n const totalWidth = iconSize + gap;\n const width = interpolate(progress.value, [0, 1], [0, totalWidth]);\n\n // Staggered animation: opacity starts at 50% of width animation\n // On enter: width expands first, then icon fades in\n // On exit: icon fades out first, then width collapses\n const opacity = interpolate(progress.value, [0.5, 1], [0, 1], 'clamp');\n const scale = interpolate(progress.value, [0.5, 1], [0.7, 1], 'clamp');\n\n return {\n width,\n opacity,\n transform: [{ scale }],\n overflow: 'hidden' as const,\n };\n });\n\n return <Animated.View style={animatedStyle}>{children}</Animated.View>;\n}\n\n// function LoadingIcon({ size, variant }: { size: ButtonSize, variant: ButtonVariantFlat }) {\n// const { theme } = useUnistyles();\n// const themeKey = `buttonVariant${variantToCapitalMap[variant]}IconRest` as const;\n// const iconSize = theme.components.buttonSizeLgIconRest.fontSize;\n// return <ActivityIndicator size={iconSize} color={theme.colors.text.primary} />;\n// }\n\n/* -------------------------------------------------------------------------- */\n/* Button Props */\n/* -------------------------------------------------------------------------- */\n\ninterface ButtonProps extends Omit<PressableProps, 'children' | 'disabled'> {\n /** @default 'primary' */\n variant?: ButtonVariantFlat;\n /** @default 'md' */\n size?: ButtonSize;\n /** @default 'outline' */\n iconVariant?: IconVariant;\n startIcon?: IconSlotType;\n endIcon?: IconSlotType;\n loading?: boolean;\n disabled?: boolean;\n children?: React.ReactNode;\n /**\n * Disable motion effects (scale on press, icon animations)\n * @default false\n */\n disableEffects?: boolean;\n ref?: Ref<View>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Button Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **🖲️ A button element that can be used to trigger an action**\n *\n * @description\n * A button is a fundamental component used to trigger an action or event.\n * Buttons are interactive elements that users can click, tap, or otherwise\n * engage with to submit forms, open dialogues, or perform any other interaction.\n *\n * Features animated scale effect on press and smooth icon transitions matching\n * the web UDS Button behavior.\n *\n * @example\n * ```tsx\n * import { Button } from '@yahoo/uds-mobile';\n *\n * <Button onPress={() => console.log('pressed')}>Save</Button>\n * <Button variant=\"secondary\">Cancel</Button>\n * <Button startIcon=\"Add\" variant=\"brand\">Add Item</Button>\n * <Button loading>Saving...</Button>\n * ```\n *\n * @see The {@link https://uds.build/docs/components/button Button Docs} for more info\n */\nconst Button = memo(function Button({\n variant = 'primary',\n size = 'md',\n iconVariant = 'outline',\n startIcon,\n endIcon,\n loading,\n disabled,\n width: _width,\n children,\n style,\n accessibilityLabel,\n accessibilityHint,\n disableEffects = false,\n onPressIn,\n onPressOut,\n ref,\n ...props\n}: ButtonProps) {\n const shouldAnimate = !disableEffects;\n\n /* --------------------------------- State ---------------------------------- */\n const [pressed, setPressed] = useState(false);\n\n buttonStyles.useVariants({ size, variant, disabled, pressed });\n\n // Get gap and icon size from current variant styles\n const buttonGap = buttonStyles.root.gap;\n const iconSize = buttonStyles.icon.fontSize;\n\n // Get animated theme for boxShadow (useAnimatedVariantColor doesn't support non-color props)\n const animatedTheme = useAnimatedTheme();\n\n /* ------------------------------- Animation -------------------------------- */\n const scale = useSharedValue<number>(SCALE_EFFECTS.none);\n\n const handlePressIn = useCallback(\n (event: Parameters<NonNullable<PressableProps['onPressIn']>>[0]) => {\n setPressed(true);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.down, BUTTON_SPRING_CONFIG);\n }\n onPressIn?.(event);\n },\n [shouldAnimate, scale, onPressIn],\n );\n\n const handlePressOut = useCallback(\n (event: Parameters<NonNullable<PressableProps['onPressOut']>>[0]) => {\n setPressed(false);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG);\n }\n onPressOut?.(event);\n },\n [shouldAnimate, scale, onPressOut],\n );\n\n /* -------------------------------- Content --------------------------------- */\n const childrenNode =\n children &&\n (isValidElement(children) ? (\n children\n ) : (\n <Text numberOfLines={1} textAlign=\"center\" style={buttonStyles.text}>\n {children}\n </Text>\n ));\n\n const a11yState = useMemo(() => ({ disabled, busy: loading }), [disabled, loading]);\n\n /* --------------------------------- Styles --------------------------------- */\n // Animate pressed state for shadow (0 = rest, 1 = pressed)\n const pressProgress = useDerivedValue(\n () => withTiming(pressed ? 1 : 0, { duration: 220, easing: Easing.bezier(0, 0, 0.2, 1) }),\n [pressed],\n );\n\n // Animate using Unistyles' variant color system + boxShadow from theme\n const animatedStyles = useAnimatedStyle(() => {\n // Get boxShadow from theme using flattened path (no camelCase conversion needed!)\n const components = animatedTheme.value.components;\n const buttonVariantPath = `button/variant/${variant}/root/pressed` as const;\n const shadowPressed = components[buttonVariantPath].boxShadow;\n\n return {\n transform: [{ scale: scale.value }],\n // backgroundColor: withTiming(backgroundColor.value, {\n // duration: 220,\n // easing: Easing.bezier(0, 0, 0.2, 1),\n // }),\n // borderColor: withTiming(borderColor.value, {\n // duration: 220,\n // easing: Easing.bezier(0, 0, 0.2, 1),\n // }),\n // Animate shadow by interpolating its color alpha\n boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\n };\n });\n\n // Determine what should be visible in start slot\n const showLoading = !!loading;\n const showStartIcon = !!startIcon && !loading;\n const showEndIcon = !!endIcon && !loading;\n\n // Start slot: either loading spinner or start icon\n const startContent = (\n <AnimatedIconSlot visible={showLoading || showStartIcon} iconSize={iconSize} gap={buttonGap}>\n {showLoading ? (\n <ActivityIndicator size={buttonStyles.icon.fontSize} color={buttonStyles.icon.color} />\n ) : (\n <IconSlot icon={startIcon} variant={iconVariant} style={buttonStyles.icon} />\n )}\n </AnimatedIconSlot>\n );\n\n // End slot: only end icon (no loading here)\n const endContent = (\n <AnimatedIconSlot visible={showEndIcon} iconSize={iconSize} gap={buttonGap}>\n <IconSlot icon={endIcon} variant={iconVariant} style={buttonStyles.icon} />\n </AnimatedIconSlot>\n );\n\n const rootStyles = useMemo(\n () => [\n buttonStyles.root,\n animatedStyles,\n typeof style === 'function' ? style({ pressed }) : style,\n ],\n [buttonStyles.root, animatedStyles, style, pressed],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <AnimatedPressable\n ref={ref}\n disabled={disabled}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n accessibilityLabel={loading ? `${accessibilityLabel ?? ''}, loading` : accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole=\"button\"\n accessibilityState={a11yState}\n alignContent=\"center\"\n style={rootStyles}\n {...props}\n >\n {startContent}\n {childrenNode}\n {endContent}\n </AnimatedPressable>\n );\n});\n\nButton.displayName = 'Button';\n\nexport { Button, type ButtonProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,SAAS,uBAAuB,QAAgB,OAAuB;AACrE;AACA,KAAI,CAAC,UAAU,SAAS,EACtB,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAGT,QAAO,OAAO,QAAQ,sDAAsD,GAAG,GAAG,GAAG,GAAG,MAAM;AAE5F,SAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KADZ,WAAW,EAAE,GAAG,OACS,QAAQ,EAAE,CA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EAAO;EAAQ,CACpD;AAGD,QACE,qBAAC;EACM;EACK;EACV,WAAW;EACX,YAAY;EACZ,eAAc;EACd,YAAW;EACX,gBAAe;EACf,UAAS;EACT,oBAAoB,UAAU,GAAG,sBAAsB,GAAG,aAAa;EACpD;EACnB,mBAAkB;EAClB,oBAAoB;EACpB,cAAa;EACb,OAAO;EACP,GAAI;;GAEH;GACA;GACA;;GACiB;EAEtB;AAEF,OAAO,cAAc"}
@@ -1,7 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
- const require_motion = require('../uds/dist/tokens/configs/motion.cjs');
4
- const require_motion$1 = require('../motion.cjs');
3
+ const require_index = require('../motion-tokens/dist/index.cjs');
4
+ const require_motion = require('../motion.cjs');
5
5
  const require_components_Icon = require('./Icon.cjs');
6
6
  const require_components_Text = require('./Text.cjs');
7
7
  const require_components_HStack = require('./HStack.cjs');
@@ -56,8 +56,8 @@ const Checkbox = (0, react.memo)(function Checkbox$1({ label, labelPosition = "s
56
56
  const iconName = valueState === "indeterminate" ? "Minus" : "Check";
57
57
  const showIcon = valueState !== "unchecked";
58
58
  const shouldAnimate = !reduceMotion;
59
- const scaleProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(pressed ? require_motion.SCALE_EFFECTS.down : require_motion.SCALE_EFFECTS.none, require_motion$1.BUTTON_SPRING_CONFIG) : require_motion.SCALE_EFFECTS.none, [pressed, shouldAnimate]);
60
- const iconProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(showIcon ? 1 : 0, require_motion$1.BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0, [showIcon, shouldAnimate]);
59
+ const scaleProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(pressed ? require_index.SCALE_EFFECTS.down : require_index.SCALE_EFFECTS.none, require_motion.BUTTON_SPRING_CONFIG) : require_index.SCALE_EFFECTS.none, [pressed, shouldAnimate]);
60
+ const iconProgress = (0, react_native_reanimated.useDerivedValue)(() => shouldAnimate ? (0, react_native_reanimated.withSpring)(showIcon ? 1 : 0, require_motion.BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0, [showIcon, shouldAnimate]);
61
61
  const checkboxAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({ transform: [{ scale: scaleProgress.value }] }));
62
62
  const iconAnimatedStyle = (0, react_native_reanimated.useAnimatedStyle)(() => ({
63
63
  opacity: (0, react_native_reanimated.interpolate)(iconProgress.value, [0, 1], [0, 1]),
@@ -1,5 +1,5 @@
1
1
 
2
- import { UniversalCheckboxProps } from "../uds/dist/tokens/types.cjs";
2
+ import { UniversalCheckboxProps } from "../types/dist/index.cjs";
3
3
  import * as react4 from "react";
4
4
  import { Ref } from "react";
5
5
  import { View, ViewProps } from "react-native";
@@ -1,6 +1,6 @@
1
1
 
2
- import { UniversalCheckboxProps } from "../uds/dist/tokens/types.mjs";
3
- import * as react9 from "react";
2
+ import { UniversalCheckboxProps } from "../types/dist/index.mjs";
3
+ import * as react6 from "react";
4
4
  import { Ref } from "react";
5
5
  import { View, ViewProps } from "react-native";
6
6
 
@@ -42,7 +42,7 @@ interface CheckboxProps extends Omit<ViewProps, 'style'>, UniversalCheckboxProps
42
42
  *
43
43
  * @see The {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info
44
44
  */
45
- declare const Checkbox: react9.NamedExoticComponent<CheckboxProps>;
45
+ declare const Checkbox: react6.NamedExoticComponent<CheckboxProps>;
46
46
  //#endregion
47
47
  export { Checkbox, type CheckboxProps };
48
48
  //# sourceMappingURL=Checkbox.d.mts.map
@@ -1,5 +1,5 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
- import { SCALE_EFFECTS } from "../uds/dist/tokens/configs/motion.mjs";
2
+ import { SCALE_EFFECTS } from "../motion-tokens/dist/index.mjs";
3
3
  import { BUTTON_SPRING_CONFIG } from "../motion.mjs";
4
4
  import { Icon } from "./Icon.mjs";
5
5
  import { Text } from "./Text.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.mjs","names":["VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant>","Checkbox","valueState: CheckboxValueState","styleVariant: CheckboxStyleVariant"],"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["import type { CheckboxValue, CheckboxVariant, UniversalCheckboxProps } from '@yahoo/uds/tokens';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { View, ViewProps } from 'react-native';\nimport Animated, {\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { checkboxStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Icon } from './Icon';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from CheckboxValue - maps boolean to 'checked'/'unchecked' string literals */\ntype CheckboxValueState = Exclude<CheckboxValue, boolean> | 'checked' | 'unchecked';\n\ninterface CheckboxProps extends Omit<ViewProps, 'style'>, UniversalCheckboxProps {\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the checkbox is disabled */\n disabled?: boolean;\n /** Whether the checkbox is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype CheckboxStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Checkbox Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A checkbox component**\n *\n * @componentType Client component\n *\n * @description\n * A checkbox component allows users to select one or multiple options from a set.\n * It represents a binary state, typically as checked or unchecked, and optionally\n * includes a third \"indeterminate\" state to indicate partial selection.\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@yahoo/uds-mobile';\n *\n * <Checkbox label=\"Agree to terms\" />\n * <Checkbox label=\"Subscribe\" checked={true} onChange={setChecked} />\n * <Checkbox label=\"Partial\" checked=\"indeterminate\" />\n * ```\n *\n * @usage\n * - Forms: For selecting options\n * - Settings: For toggling preferences\n * - Filters: For multi-select filtering\n *\n * @see The {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info\n */\nconst Checkbox = memo(function Checkbox({\n // Checkbox props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: CheckboxProps) {\n const generatedId = useId();\n const uid = `uds-checkbox-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<CheckboxValue>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: CheckboxValueState = useMemo(() => {\n if (checked === 'indeterminate') {\n return 'indeterminate';\n }\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n const iconName = valueState === 'indeterminate' ? 'Minus' : 'Check';\n const showIcon = valueState !== 'unchecked';\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n // Icon visibility animation\n // When reduceMotion is true, still show/hide the icon but without animation\n const iconProgress = useDerivedValue(\n () => (shouldAnimate ? withSpring(showIcon ? 1 : 0, BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0),\n [showIcon, shouldAnimate],\n );\n\n const checkboxAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n const iconAnimatedStyle = useAnimatedStyle(() => ({\n opacity: interpolate(iconProgress.value, [0, 1], [0, 1]),\n transform: [{ scale: interpolate(iconProgress.value, [0, 1], [0.5, 1]) }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = checked === 'indeterminate' ? true : !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: CheckboxStyleVariant = hasError\n ? VARIANT_ERROR_MAP[variantProp]\n : variantProp;\n\n checkboxStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked, indeterminate\n disabled,\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [checkboxStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [checkboxStyles.root, disabled],\n );\n\n const checkboxBoxStyle = useMemo(\n () => [\n checkboxStyles.checkbox,\n { alignItems: 'center' as const, justifyContent: 'center' as const },\n checkboxAnimatedStyle,\n ],\n [checkboxStyles.checkbox, checkboxAnimatedStyle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={checkboxStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={checkboxStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, checkboxStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked:\n valueState === 'checked'\n ? true\n : valueState === 'indeterminate'\n ? ('mixed' as const)\n : false,\n }),\n [disabled, valueState],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"checkbox\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={checkboxBoxStyle}>\n <Animated.View style={iconAnimatedStyle}>\n <Icon name={iconName} size=\"sm\" style={checkboxStyles.checkboxIcon} />\n </Animated.View>\n </Animated.View>\n\n {labelContent}\n </Pressable>\n );\n});\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;;;;;;;;AA4CA,MAAMA,oBAAmE;CACvE,SAAS;CACT,WAAW;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD,MAAM,WAAW,KAAK,SAASC,WAAS,EAEtC,OACA,gBAAgB,SAChB,SAAS,cAAc,WACvB,OAAO,MACP,SAAS,aACT,UACA,cAEA,gBACA,UACA,UACA,UACA,KACA,GAAG,aACa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AEf;GACS;EAEd;AAEF,SAAS,cAAc"}
1
+ {"version":3,"file":"Checkbox.mjs","names":["VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant>","Checkbox","valueState: CheckboxValueState","styleVariant: CheckboxStyleVariant"],"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["import type { CheckboxValue, CheckboxVariant, UniversalCheckboxProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { isValidElement, memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { View, ViewProps } from 'react-native';\nimport Animated, {\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { checkboxStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport { HStack } from './HStack';\nimport { Icon } from './Icon';\nimport { Pressable } from './Pressable';\nimport { Text } from './Text';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\n/** Derived from CheckboxValue - maps boolean to 'checked'/'unchecked' string literals */\ntype CheckboxValueState = Exclude<CheckboxValue, boolean> | 'checked' | 'unchecked';\n\ninterface CheckboxProps extends Omit<ViewProps, 'style'>, UniversalCheckboxProps {\n ref?: Ref<View>;\n /** Default checked state for uncontrolled mode */\n defaultChecked?: boolean;\n /** Whether the checkbox is disabled */\n disabled?: boolean;\n /** Whether the checkbox is required */\n required?: boolean;\n /** Callback fired when the checked state changes */\n onChange?: (checked: boolean) => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Variant Mapping */\n/* -------------------------------------------------------------------------- */\n\n/** All style variants available in the generated styles (includes error variants) */\ntype CheckboxStyleVariant = 'primary' | 'secondary' | 'alert' | 'alert-secondary';\n\nconst VARIANT_ERROR_MAP: Record<CheckboxVariant, CheckboxStyleVariant> = {\n primary: 'alert',\n secondary: 'alert-secondary',\n};\n\n/* -------------------------------------------------------------------------- */\n/* Checkbox Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **⚙️ A checkbox component**\n *\n * @componentType Client component\n *\n * @description\n * A checkbox component allows users to select one or multiple options from a set.\n * It represents a binary state, typically as checked or unchecked, and optionally\n * includes a third \"indeterminate\" state to indicate partial selection.\n *\n * @example\n * ```tsx\n * import { Checkbox } from '@yahoo/uds-mobile';\n *\n * <Checkbox label=\"Agree to terms\" />\n * <Checkbox label=\"Subscribe\" checked={true} onChange={setChecked} />\n * <Checkbox label=\"Partial\" checked=\"indeterminate\" />\n * ```\n *\n * @usage\n * - Forms: For selecting options\n * - Settings: For toggling preferences\n * - Filters: For multi-select filtering\n *\n * @see The {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info\n */\nconst Checkbox = memo(function Checkbox({\n // Checkbox props\n label,\n labelPosition = 'start',\n variant: variantProp = 'primary',\n size = 'md',\n checked: checkedProp,\n hasError,\n reduceMotion,\n // Native props\n defaultChecked,\n disabled,\n required,\n onChange,\n ref,\n ...viewProps\n}: CheckboxProps) {\n const generatedId = useId();\n const uid = `uds-checkbox-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const isControlled = checkedProp !== undefined;\n const [internalChecked, setInternalChecked] = useState<CheckboxValue>(\n isControlled ? checkedProp : (defaultChecked ?? false),\n );\n const [pressed, setPressed] = useState(false);\n\n // Use controlled value if provided, otherwise use internal state\n const checked = isControlled ? checkedProp : internalChecked;\n\n /* ------------------------------ Derived Values ---------------------------- */\n const valueState: CheckboxValueState = useMemo(() => {\n if (checked === 'indeterminate') {\n return 'indeterminate';\n }\n return checked ? 'checked' : 'unchecked';\n }, [checked]);\n\n const iconName = valueState === 'indeterminate' ? 'Minus' : 'Check';\n const showIcon = valueState !== 'unchecked';\n\n /* -------------------------------- Animation ------------------------------- */\n const shouldAnimate = !reduceMotion;\n\n // Scale animation for press feedback (disabled when reduceMotion is true)\n const scaleProgress = useDerivedValue(\n () =>\n shouldAnimate\n ? withSpring(pressed ? SCALE_EFFECTS.down : SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG)\n : SCALE_EFFECTS.none, // No scale effect when reduceMotion is true\n [pressed, shouldAnimate],\n );\n\n // Icon visibility animation\n // When reduceMotion is true, still show/hide the icon but without animation\n const iconProgress = useDerivedValue(\n () => (shouldAnimate ? withSpring(showIcon ? 1 : 0, BUTTON_SPRING_CONFIG) : showIcon ? 1 : 0),\n [showIcon, shouldAnimate],\n );\n\n const checkboxAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scaleProgress.value }],\n }));\n\n const iconAnimatedStyle = useAnimatedStyle(() => ({\n opacity: interpolate(iconProgress.value, [0, 1], [0, 1]),\n transform: [{ scale: interpolate(iconProgress.value, [0, 1], [0.5, 1]) }],\n }));\n\n /* -------------------------------- Handlers -------------------------------- */\n const handlePress = useCallback(() => {\n if (disabled) {\n return;\n }\n\n const newChecked = checked === 'indeterminate' ? true : !checked;\n\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n\n onChange?.(newChecked);\n }, [disabled, checked, isControlled, onChange]);\n\n const handlePressIn = useCallback(() => {\n setPressed(true);\n }, []);\n\n const handlePressOut = useCallback(() => {\n setPressed(false);\n }, []);\n\n /* --------------------------------- Styles --------------------------------- */\n // Compute the style variant (primary/secondary maps to alert variants when hasError)\n const styleVariant: CheckboxStyleVariant = hasError\n ? VARIANT_ERROR_MAP[variantProp]\n : variantProp;\n\n checkboxStyles.useVariants({\n size,\n variant: styleVariant, // primary, secondary, alert, alert-secondary\n value: valueState, // checked, unchecked, indeterminate\n disabled,\n pressed,\n });\n\n const rootStyle = useMemo(\n () => [checkboxStyles.root, { opacity: disabled ? 0.5 : 1 }],\n [checkboxStyles.root, disabled],\n );\n\n const checkboxBoxStyle = useMemo(\n () => [\n checkboxStyles.checkbox,\n { alignItems: 'center' as const, justifyContent: 'center' as const },\n checkboxAnimatedStyle,\n ],\n [checkboxStyles.checkbox, checkboxAnimatedStyle],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n\n const content =\n typeof label === 'function' ? label() : isValidElement(label) ? label : String(label);\n\n const textContent =\n typeof content === 'string' ? <Text style={checkboxStyles.text}>{content}</Text> : content;\n\n if (required) {\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-start\">\n {textContent}\n <Text style={checkboxStyles.text}>*</Text>\n </HStack>\n );\n }\n\n return textContent;\n }, [label, required, checkboxStyles.text]);\n\n const a11yState = useMemo(\n () => ({\n disabled,\n checked:\n valueState === 'checked'\n ? true\n : valueState === 'indeterminate'\n ? ('mixed' as const)\n : false,\n }),\n [disabled, valueState],\n );\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <Pressable\n ref={ref}\n nativeID={uid}\n onPress={handlePress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n disabled={disabled}\n flexDirection={labelPosition === 'start' ? 'row' : 'row-reverse'}\n alignItems=\"center\"\n alignSelf=\"flex-start\"\n accessibilityRole=\"checkbox\"\n accessibilityState={a11yState}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...viewProps}\n style={rootStyle}\n >\n <Animated.View style={checkboxBoxStyle}>\n <Animated.View style={iconAnimatedStyle}>\n <Icon name={iconName} size=\"sm\" style={checkboxStyles.checkboxIcon} />\n </Animated.View>\n </Animated.View>\n\n {labelContent}\n </Pressable>\n );\n});\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;;;;;;;;AA4CA,MAAMA,oBAAmE;CACvE,SAAS;CACT,WAAW;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCD,MAAM,WAAW,KAAK,SAASC,WAAS,EAEtC,OACA,gBAAgB,SAChB,SAAS,cAAc,WACvB,OAAO,MACP,SAAS,aACT,UACA,cAEA,gBACA,UACA,UACA,UACA,KACA,GAAG,aACa;CAEhB,MAAM,MAAM,gBADQ,OAAO;CAI3B,MAAM,eAAe,gBAAgB;CACrC,MAAM,CAAC,iBAAiB,sBAAsB,SAC5C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cjs";
2
+ import { ChipSize, ChipVariant } from "../types/dist/index.cjs";
3
3
  import { IconSlotType } from "./IconSlot.cjs";
4
4
  import * as react5 from "react";
5
5
  import { Ref } from "react";
@@ -1,7 +1,7 @@
1
1
 
2
- import { ChipSize, ChipVariant } from "../uds/dist/tokens/types.mjs";
2
+ import { ChipSize, ChipVariant } from "../types/dist/index.mjs";
3
3
  import { IconSlotType } from "./IconSlot.mjs";
4
- import * as react3 from "react";
4
+ import * as react0 from "react";
5
5
  import { Ref } from "react";
6
6
  import { View, ViewProps } from "react-native";
7
7
 
@@ -54,7 +54,7 @@ interface ChipProps extends Omit<ViewProps, 'children'> {
54
54
  * <Chip startIcon="Star" variant="brand">Favorite</Chip>
55
55
  * ```
56
56
  */
57
- declare const Chip: react3.NamedExoticComponent<ChipProps>;
57
+ declare const Chip: react0.NamedExoticComponent<ChipProps>;
58
58
  //#endregion
59
59
  export { Chip, type ChipProps };
60
60
  //# sourceMappingURL=Chip.d.mts.map