@unif/react-native-design 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (512) hide show
  1. package/README.md +3 -4
  2. package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js +6 -4
  3. package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js.map +1 -1
  4. package/lib/module/components/business/AvatarWithRing/styles.js +15 -3
  5. package/lib/module/components/business/AvatarWithRing/styles.js.map +1 -1
  6. package/lib/module/components/business/Decorations/GradientWash.js +50 -36
  7. package/lib/module/components/business/Decorations/GradientWash.js.map +1 -1
  8. package/lib/module/components/business/Decorations/RadialHalo.js +10 -4
  9. package/lib/module/components/business/Decorations/RadialHalo.js.map +1 -1
  10. package/lib/module/components/business/Decorations/ScreenBackdrop.js +22 -14
  11. package/lib/module/components/business/Decorations/ScreenBackdrop.js.map +1 -1
  12. package/lib/module/components/business/Decorations/index.js +3 -0
  13. package/lib/module/components/business/Decorations/index.js.map +1 -1
  14. package/lib/module/components/business/GlassStats/GlassStats.js +7 -4
  15. package/lib/module/components/business/GlassStats/GlassStats.js.map +1 -1
  16. package/lib/module/components/business/GlassStats/types.js +2 -0
  17. package/lib/module/components/business/VersionPill/VersionPill.js +23 -5
  18. package/lib/module/components/business/VersionPill/VersionPill.js.map +1 -1
  19. package/lib/module/components/business/VersionPill/styles.js +1 -1
  20. package/lib/module/components/business/index.js.map +1 -1
  21. package/lib/module/components/business/useSvgId.js +20 -0
  22. package/lib/module/components/business/useSvgId.js.map +1 -0
  23. package/lib/module/components/ui/Avatar/Avatar.js +13 -8
  24. package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
  25. package/lib/module/components/ui/Avatar/styles.js +7 -7
  26. package/lib/module/components/ui/Avatar/styles.js.map +1 -1
  27. package/lib/module/components/ui/BlurLayer/BlurLayer.js +5 -1
  28. package/lib/module/components/ui/BlurLayer/BlurLayer.js.map +1 -1
  29. package/lib/module/components/ui/BlurLayer/BlurLayer.web.js +7 -1
  30. package/lib/module/components/ui/BlurLayer/BlurLayer.web.js.map +1 -1
  31. package/lib/module/components/ui/Button/Button.js +2 -1
  32. package/lib/module/components/ui/Button/Button.js.map +1 -1
  33. package/lib/module/components/ui/Button/ButtonBase.js +36 -2
  34. package/lib/module/components/ui/Button/ButtonBase.js.map +1 -1
  35. package/lib/module/components/ui/Button/styles.js +27 -25
  36. package/lib/module/components/ui/Button/styles.js.map +1 -1
  37. package/lib/module/components/ui/Card/Card.js +17 -8
  38. package/lib/module/components/ui/Card/Card.js.map +1 -1
  39. package/lib/module/components/ui/Card/styles.js +6 -1
  40. package/lib/module/components/ui/Card/styles.js.map +1 -1
  41. package/lib/module/components/ui/Carousel/Carousel.js +36 -6
  42. package/lib/module/components/ui/Carousel/Carousel.js.map +1 -1
  43. package/lib/module/components/ui/Cell/Cell.js +23 -5
  44. package/lib/module/components/ui/Cell/Cell.js.map +1 -1
  45. package/lib/module/components/ui/Cell/Leading.js +2 -2
  46. package/lib/module/components/ui/Cell/Leading.js.map +1 -1
  47. package/lib/module/components/ui/Cell/List.js +10 -5
  48. package/lib/module/components/ui/Cell/List.js.map +1 -1
  49. package/lib/module/components/ui/Cell/styles.js +7 -6
  50. package/lib/module/components/ui/Cell/styles.js.map +1 -1
  51. package/lib/module/components/ui/Checkbox/Checkbox.js +10 -8
  52. package/lib/module/components/ui/Checkbox/Checkbox.js.map +1 -1
  53. package/lib/module/components/ui/Checkbox/styles.js +9 -1
  54. package/lib/module/components/ui/Checkbox/styles.js.map +1 -1
  55. package/lib/module/components/ui/Chip/Chip.js +19 -5
  56. package/lib/module/components/ui/Chip/Chip.js.map +1 -1
  57. package/lib/module/components/ui/Confirm/ConfirmHost.js +28 -11
  58. package/lib/module/components/ui/Confirm/ConfirmHost.js.map +1 -1
  59. package/lib/module/components/ui/Confirm/confirm.js +6 -0
  60. package/lib/module/components/ui/Confirm/confirm.js.map +1 -1
  61. package/lib/module/components/ui/DrawerHeader/DrawerHeader.js +14 -9
  62. package/lib/module/components/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  63. package/lib/module/components/ui/DrawerHeader/styles.js +10 -6
  64. package/lib/module/components/ui/DrawerHeader/styles.js.map +1 -1
  65. package/lib/module/components/ui/Empty/Empty.js +5 -4
  66. package/lib/module/components/ui/Empty/Empty.js.map +1 -1
  67. package/lib/module/components/ui/EntryCard/EntryCard.js +5 -3
  68. package/lib/module/components/ui/EntryCard/EntryCard.js.map +1 -1
  69. package/lib/module/components/ui/EntryCard/styles.js +4 -4
  70. package/lib/module/components/ui/EntryCard/styles.js.map +1 -1
  71. package/lib/module/components/ui/Form/FormRow.js +1 -0
  72. package/lib/module/components/ui/Form/FormRow.js.map +1 -1
  73. package/lib/module/components/ui/Form/styles.js +3 -1
  74. package/lib/module/components/ui/Form/styles.js.map +1 -1
  75. package/lib/module/components/ui/Grid/Grid.js +39 -24
  76. package/lib/module/components/ui/Grid/Grid.js.map +1 -1
  77. package/lib/module/components/ui/Grid/styles.js +35 -46
  78. package/lib/module/components/ui/Grid/styles.js.map +1 -1
  79. package/lib/module/components/ui/Icon/Icon.js +46 -29
  80. package/lib/module/components/ui/Icon/Icon.js.map +1 -1
  81. package/lib/module/components/ui/IconButton/IconButton.js +2 -0
  82. package/lib/module/components/ui/IconButton/IconButton.js.map +1 -1
  83. package/lib/module/components/ui/Logo/Logo.js +2 -1
  84. package/lib/module/components/ui/Logo/Logo.js.map +1 -1
  85. package/lib/module/components/ui/NavBar/NavBar.js +15 -3
  86. package/lib/module/components/ui/NavBar/NavBar.js.map +1 -1
  87. package/lib/module/components/ui/PasswordInput/PasswordInput.js +43 -14
  88. package/lib/module/components/ui/PasswordInput/PasswordInput.js.map +1 -1
  89. package/lib/module/components/ui/PasswordInput/styles.js +1 -1
  90. package/lib/module/components/ui/Pulse/Pulse.js +2 -1
  91. package/lib/module/components/ui/Pulse/Pulse.js.map +1 -1
  92. package/lib/module/components/ui/Pulse/PulseDot.js +8 -10
  93. package/lib/module/components/ui/Pulse/PulseDot.js.map +1 -1
  94. package/lib/module/components/ui/Pulse/types.js +2 -0
  95. package/lib/module/components/ui/Pulse/usePulse.web.js +51 -30
  96. package/lib/module/components/ui/Pulse/usePulse.web.js.map +1 -1
  97. package/lib/module/components/ui/Radio/Radio.js +19 -5
  98. package/lib/module/components/ui/Radio/Radio.js.map +1 -1
  99. package/lib/module/components/ui/Radio/RadioGroup.js +10 -6
  100. package/lib/module/components/ui/Radio/RadioGroup.js.map +1 -1
  101. package/lib/module/components/ui/Radio/styles.js +10 -3
  102. package/lib/module/components/ui/Radio/styles.js.map +1 -1
  103. package/lib/module/components/ui/Reveal/Reveal.web.js +18 -3
  104. package/lib/module/components/ui/Reveal/Reveal.web.js.map +1 -1
  105. package/lib/module/components/ui/Search/Search.js +26 -10
  106. package/lib/module/components/ui/Search/Search.js.map +1 -1
  107. package/lib/module/components/ui/Segmented/Segmented.js +40 -30
  108. package/lib/module/components/ui/Segmented/Segmented.js.map +1 -1
  109. package/lib/module/components/ui/Segmented/styles.js +4 -2
  110. package/lib/module/components/ui/Segmented/styles.js.map +1 -1
  111. package/lib/module/components/ui/Skeleton/Skeleton.js +9 -8
  112. package/lib/module/components/ui/Skeleton/Skeleton.js.map +1 -1
  113. package/lib/module/components/ui/Spinner/Spinner.js +15 -16
  114. package/lib/module/components/ui/Spinner/Spinner.js.map +1 -1
  115. package/lib/module/components/ui/Spinner/Spinner.web.js +10 -14
  116. package/lib/module/components/ui/Spinner/Spinner.web.js.map +1 -1
  117. package/lib/module/components/ui/Spinner/shared.js +31 -0
  118. package/lib/module/components/ui/Spinner/shared.js.map +1 -0
  119. package/lib/module/components/ui/StatusDot/StatusDot.js +21 -4
  120. package/lib/module/components/ui/StatusDot/StatusDot.js.map +1 -1
  121. package/lib/module/components/ui/StatusDot/styles.js +1 -1
  122. package/lib/module/components/ui/StatusDot/types.js +2 -0
  123. package/lib/module/components/ui/Stepper/Stepper.js +46 -10
  124. package/lib/module/components/ui/Stepper/Stepper.js.map +1 -1
  125. package/lib/module/components/ui/Switch/Switch.js +6 -11
  126. package/lib/module/components/ui/Switch/Switch.js.map +1 -1
  127. package/lib/module/components/ui/Switch/Switch.web.js +2 -8
  128. package/lib/module/components/ui/Switch/Switch.web.js.map +1 -1
  129. package/lib/module/components/ui/Switch/styles.js +12 -3
  130. package/lib/module/components/ui/Switch/styles.js.map +1 -1
  131. package/lib/module/components/ui/TabBar/TabBar.js +10 -6
  132. package/lib/module/components/ui/TabBar/TabBar.js.map +1 -1
  133. package/lib/module/components/ui/TabBar/styles.js +28 -39
  134. package/lib/module/components/ui/TabBar/styles.js.map +1 -1
  135. package/lib/module/components/ui/Tabs/Tabs.js +19 -5
  136. package/lib/module/components/ui/Tabs/Tabs.js.map +1 -1
  137. package/lib/module/components/ui/Tabs/styles.js +6 -2
  138. package/lib/module/components/ui/Tabs/styles.js.map +1 -1
  139. package/lib/module/components/ui/Tabs/types.js +2 -0
  140. package/lib/module/components/ui/Tag/styles.js +15 -14
  141. package/lib/module/components/ui/Tag/styles.js.map +1 -1
  142. package/lib/module/components/ui/TextField/TextFieldBase.js +24 -6
  143. package/lib/module/components/ui/TextField/TextFieldBase.js.map +1 -1
  144. package/lib/module/components/ui/Thumbnail/Thumbnail.js +11 -3
  145. package/lib/module/components/ui/Thumbnail/Thumbnail.js.map +1 -1
  146. package/lib/module/components/ui/Thumbnail/styles.js +6 -2
  147. package/lib/module/components/ui/Thumbnail/styles.js.map +1 -1
  148. package/lib/module/components/ui/Toast/ToastHost.js +16 -5
  149. package/lib/module/components/ui/Toast/ToastHost.js.map +1 -1
  150. package/lib/module/components/ui/Toast/ToastHost.web.js +21 -4
  151. package/lib/module/components/ui/Toast/ToastHost.web.js.map +1 -1
  152. package/lib/module/components/ui/Toast/styles.js +2 -0
  153. package/lib/module/components/ui/Toast/styles.js.map +1 -1
  154. package/lib/module/components/ui/Toast/toast.js +23 -3
  155. package/lib/module/components/ui/Toast/toast.js.map +1 -1
  156. package/lib/module/components/ui/shared/badgeStyles.js +31 -0
  157. package/lib/module/components/ui/shared/badgeStyles.js.map +1 -0
  158. package/lib/module/icons/data.js +43 -18
  159. package/lib/module/icons/data.js.map +1 -1
  160. package/lib/module/theme/colors.js +28 -10
  161. package/lib/module/theme/colors.js.map +1 -1
  162. package/lib/module/theme/index.js +6 -2
  163. package/lib/module/theme/index.js.map +1 -1
  164. package/lib/module/theme/scale.js +9 -1
  165. package/lib/module/theme/scale.js.map +1 -1
  166. package/lib/module/theme/shadow.js +24 -41
  167. package/lib/module/theme/shadow.js.map +1 -1
  168. package/lib/module/theme/tokens.js +10 -5
  169. package/lib/module/theme/tokens.js.map +1 -1
  170. package/lib/module/theme/usePrefersReducedMotion.js +12 -0
  171. package/lib/module/theme/usePrefersReducedMotion.js.map +1 -0
  172. package/lib/module/theme/usePrefersReducedMotion.web.js +25 -0
  173. package/lib/module/theme/usePrefersReducedMotion.web.js.map +1 -0
  174. package/lib/module/theme/useTheme.js +13 -0
  175. package/lib/module/theme/useTheme.js.map +1 -1
  176. package/lib/module/utils/logger/logger.js +5 -1
  177. package/lib/module/utils/logger/logger.js.map +1 -1
  178. package/lib/module/utils/testID/testID.js +6 -3
  179. package/lib/module/utils/testID/testID.js.map +1 -1
  180. package/lib/typescript/src/components/business/AvatarWithRing/AvatarWithRing.d.ts +1 -1
  181. package/lib/typescript/src/components/business/AvatarWithRing/AvatarWithRing.d.ts.map +1 -1
  182. package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts +5 -5
  183. package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts.map +1 -1
  184. package/lib/typescript/src/components/business/AvatarWithRing/types.d.ts +3 -1
  185. package/lib/typescript/src/components/business/AvatarWithRing/types.d.ts.map +1 -1
  186. package/lib/typescript/src/components/business/Decorations/GradientWash.d.ts +25 -0
  187. package/lib/typescript/src/components/business/Decorations/GradientWash.d.ts.map +1 -1
  188. package/lib/typescript/src/components/business/Decorations/RadialHalo.d.ts.map +1 -1
  189. package/lib/typescript/src/components/business/Decorations/ScreenBackdrop.d.ts +1 -1
  190. package/lib/typescript/src/components/business/Decorations/ScreenBackdrop.d.ts.map +1 -1
  191. package/lib/typescript/src/components/business/Decorations/index.d.ts +1 -1
  192. package/lib/typescript/src/components/business/Decorations/index.d.ts.map +1 -1
  193. package/lib/typescript/src/components/business/Decorations/types.d.ts +2 -0
  194. package/lib/typescript/src/components/business/Decorations/types.d.ts.map +1 -1
  195. package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts +1 -1
  196. package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts.map +1 -1
  197. package/lib/typescript/src/components/business/GlassStats/styles.d.ts +2 -2
  198. package/lib/typescript/src/components/business/GlassStats/types.d.ts +5 -0
  199. package/lib/typescript/src/components/business/GlassStats/types.d.ts.map +1 -1
  200. package/lib/typescript/src/components/business/VersionPill/VersionPill.d.ts +1 -1
  201. package/lib/typescript/src/components/business/VersionPill/VersionPill.d.ts.map +1 -1
  202. package/lib/typescript/src/components/business/VersionPill/styles.d.ts +1 -1
  203. package/lib/typescript/src/components/business/VersionPill/styles.d.ts.map +1 -1
  204. package/lib/typescript/src/components/business/VersionPill/types.d.ts +13 -1
  205. package/lib/typescript/src/components/business/VersionPill/types.d.ts.map +1 -1
  206. package/lib/typescript/src/components/business/index.d.ts +1 -1
  207. package/lib/typescript/src/components/business/index.d.ts.map +1 -1
  208. package/lib/typescript/src/components/business/useSvgId.d.ts +12 -0
  209. package/lib/typescript/src/components/business/useSvgId.d.ts.map +1 -0
  210. package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts +1 -1
  211. package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts.map +1 -1
  212. package/lib/typescript/src/components/ui/Avatar/styles.d.ts +1 -1
  213. package/lib/typescript/src/components/ui/Avatar/styles.d.ts.map +1 -1
  214. package/lib/typescript/src/components/ui/Avatar/types.d.ts +3 -1
  215. package/lib/typescript/src/components/ui/Avatar/types.d.ts.map +1 -1
  216. package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts +1 -1
  217. package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts.map +1 -1
  218. package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.web.d.ts.map +1 -1
  219. package/lib/typescript/src/components/ui/Button/Button.d.ts +1 -1
  220. package/lib/typescript/src/components/ui/Button/Button.d.ts.map +1 -1
  221. package/lib/typescript/src/components/ui/Button/ButtonBase.d.ts.map +1 -1
  222. package/lib/typescript/src/components/ui/Button/styles.d.ts +2 -1
  223. package/lib/typescript/src/components/ui/Button/styles.d.ts.map +1 -1
  224. package/lib/typescript/src/components/ui/Button/types.d.ts +1 -1
  225. package/lib/typescript/src/components/ui/Button/types.d.ts.map +1 -1
  226. package/lib/typescript/src/components/ui/Card/Card.d.ts.map +1 -1
  227. package/lib/typescript/src/components/ui/Card/styles.d.ts +2 -0
  228. package/lib/typescript/src/components/ui/Card/styles.d.ts.map +1 -1
  229. package/lib/typescript/src/components/ui/Card/types.d.ts +4 -4
  230. package/lib/typescript/src/components/ui/Card/types.d.ts.map +1 -1
  231. package/lib/typescript/src/components/ui/Carousel/Carousel.d.ts +4 -11
  232. package/lib/typescript/src/components/ui/Carousel/Carousel.d.ts.map +1 -1
  233. package/lib/typescript/src/components/ui/Carousel/index.d.ts +1 -1
  234. package/lib/typescript/src/components/ui/Carousel/index.d.ts.map +1 -1
  235. package/lib/typescript/src/components/ui/Carousel/types.d.ts +4 -0
  236. package/lib/typescript/src/components/ui/Carousel/types.d.ts.map +1 -1
  237. package/lib/typescript/src/components/ui/Cell/Cell.d.ts.map +1 -1
  238. package/lib/typescript/src/components/ui/Cell/List.d.ts.map +1 -1
  239. package/lib/typescript/src/components/ui/Cell/styles.d.ts +1 -1
  240. package/lib/typescript/src/components/ui/Cell/styles.d.ts.map +1 -1
  241. package/lib/typescript/src/components/ui/Cell/types.d.ts +5 -2
  242. package/lib/typescript/src/components/ui/Cell/types.d.ts.map +1 -1
  243. package/lib/typescript/src/components/ui/Checkbox/Checkbox.d.ts.map +1 -1
  244. package/lib/typescript/src/components/ui/Checkbox/styles.d.ts +6 -0
  245. package/lib/typescript/src/components/ui/Checkbox/styles.d.ts.map +1 -1
  246. package/lib/typescript/src/components/ui/Chip/Chip.d.ts +4 -3
  247. package/lib/typescript/src/components/ui/Chip/Chip.d.ts.map +1 -1
  248. package/lib/typescript/src/components/ui/Chip/types.d.ts +2 -0
  249. package/lib/typescript/src/components/ui/Chip/types.d.ts.map +1 -1
  250. package/lib/typescript/src/components/ui/Confirm/ConfirmHost.d.ts.map +1 -1
  251. package/lib/typescript/src/components/ui/Confirm/confirm.d.ts.map +1 -1
  252. package/lib/typescript/src/components/ui/Confirm/types.d.ts +4 -2
  253. package/lib/typescript/src/components/ui/Confirm/types.d.ts.map +1 -1
  254. package/lib/typescript/src/components/ui/DrawerHeader/DrawerHeader.d.ts +1 -1
  255. package/lib/typescript/src/components/ui/DrawerHeader/DrawerHeader.d.ts.map +1 -1
  256. package/lib/typescript/src/components/ui/DrawerHeader/styles.d.ts.map +1 -1
  257. package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts +3 -1
  258. package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts.map +1 -1
  259. package/lib/typescript/src/components/ui/Empty/Empty.d.ts +2 -2
  260. package/lib/typescript/src/components/ui/Empty/Empty.d.ts.map +1 -1
  261. package/lib/typescript/src/components/ui/Empty/types.d.ts +3 -0
  262. package/lib/typescript/src/components/ui/Empty/types.d.ts.map +1 -1
  263. package/lib/typescript/src/components/ui/EntryCard/EntryCard.d.ts.map +1 -1
  264. package/lib/typescript/src/components/ui/EntryCard/styles.d.ts.map +1 -1
  265. package/lib/typescript/src/components/ui/EntryCard/types.d.ts +2 -2
  266. package/lib/typescript/src/components/ui/EntryCard/types.d.ts.map +1 -1
  267. package/lib/typescript/src/components/ui/Form/FormRow.d.ts.map +1 -1
  268. package/lib/typescript/src/components/ui/Form/styles.d.ts +1 -0
  269. package/lib/typescript/src/components/ui/Form/styles.d.ts.map +1 -1
  270. package/lib/typescript/src/components/ui/Form/types.d.ts +7 -2
  271. package/lib/typescript/src/components/ui/Form/types.d.ts.map +1 -1
  272. package/lib/typescript/src/components/ui/Grid/Grid.d.ts +1 -1
  273. package/lib/typescript/src/components/ui/Grid/Grid.d.ts.map +1 -1
  274. package/lib/typescript/src/components/ui/Grid/styles.d.ts.map +1 -1
  275. package/lib/typescript/src/components/ui/Grid/types.d.ts +4 -1
  276. package/lib/typescript/src/components/ui/Grid/types.d.ts.map +1 -1
  277. package/lib/typescript/src/components/ui/Icon/Icon.d.ts.map +1 -1
  278. package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts +1 -1
  279. package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts.map +1 -1
  280. package/lib/typescript/src/components/ui/IconButton/types.d.ts +7 -2
  281. package/lib/typescript/src/components/ui/IconButton/types.d.ts.map +1 -1
  282. package/lib/typescript/src/components/ui/Input/Input.d.ts +16 -16
  283. package/lib/typescript/src/components/ui/Input/types.d.ts +3 -2
  284. package/lib/typescript/src/components/ui/Input/types.d.ts.map +1 -1
  285. package/lib/typescript/src/components/ui/Logo/Logo.d.ts.map +1 -1
  286. package/lib/typescript/src/components/ui/NavBar/NavBar.d.ts +8 -1
  287. package/lib/typescript/src/components/ui/NavBar/NavBar.d.ts.map +1 -1
  288. package/lib/typescript/src/components/ui/NavBar/types.d.ts +5 -1
  289. package/lib/typescript/src/components/ui/NavBar/types.d.ts.map +1 -1
  290. package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts +13 -5
  291. package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts.map +1 -1
  292. package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts +1 -1
  293. package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts.map +1 -1
  294. package/lib/typescript/src/components/ui/PasswordInput/types.d.ts +7 -2
  295. package/lib/typescript/src/components/ui/PasswordInput/types.d.ts.map +1 -1
  296. package/lib/typescript/src/components/ui/Pulse/Pulse.d.ts +1 -1
  297. package/lib/typescript/src/components/ui/Pulse/Pulse.d.ts.map +1 -1
  298. package/lib/typescript/src/components/ui/Pulse/PulseDot.d.ts +1 -1
  299. package/lib/typescript/src/components/ui/Pulse/PulseDot.d.ts.map +1 -1
  300. package/lib/typescript/src/components/ui/Pulse/types.d.ts +5 -0
  301. package/lib/typescript/src/components/ui/Pulse/types.d.ts.map +1 -1
  302. package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts +12 -8
  303. package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts.map +1 -1
  304. package/lib/typescript/src/components/ui/Radio/Radio.d.ts.map +1 -1
  305. package/lib/typescript/src/components/ui/Radio/RadioGroup.d.ts.map +1 -1
  306. package/lib/typescript/src/components/ui/Radio/styles.d.ts +4 -2
  307. package/lib/typescript/src/components/ui/Radio/styles.d.ts.map +1 -1
  308. package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts +9 -0
  309. package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts.map +1 -1
  310. package/lib/typescript/src/components/ui/Search/Search.d.ts +16 -15
  311. package/lib/typescript/src/components/ui/Search/Search.d.ts.map +1 -1
  312. package/lib/typescript/src/components/ui/Search/types.d.ts +3 -1
  313. package/lib/typescript/src/components/ui/Search/types.d.ts.map +1 -1
  314. package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts +1 -1
  315. package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts.map +1 -1
  316. package/lib/typescript/src/components/ui/Segmented/styles.d.ts +1 -1
  317. package/lib/typescript/src/components/ui/Segmented/styles.d.ts.map +1 -1
  318. package/lib/typescript/src/components/ui/Segmented/types.d.ts +2 -0
  319. package/lib/typescript/src/components/ui/Segmented/types.d.ts.map +1 -1
  320. package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts +3 -2
  321. package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts.map +1 -1
  322. package/lib/typescript/src/components/ui/Spinner/Spinner.d.ts.map +1 -1
  323. package/lib/typescript/src/components/ui/Spinner/Spinner.web.d.ts.map +1 -1
  324. package/lib/typescript/src/components/ui/Spinner/shared.d.ts +5 -0
  325. package/lib/typescript/src/components/ui/Spinner/shared.d.ts.map +1 -0
  326. package/lib/typescript/src/components/ui/StatusDot/StatusDot.d.ts +1 -5
  327. package/lib/typescript/src/components/ui/StatusDot/StatusDot.d.ts.map +1 -1
  328. package/lib/typescript/src/components/ui/StatusDot/styles.d.ts +1 -1
  329. package/lib/typescript/src/components/ui/StatusDot/types.d.ts +13 -1
  330. package/lib/typescript/src/components/ui/StatusDot/types.d.ts.map +1 -1
  331. package/lib/typescript/src/components/ui/Stepper/Stepper.d.ts.map +1 -1
  332. package/lib/typescript/src/components/ui/Switch/Switch.d.ts.map +1 -1
  333. package/lib/typescript/src/components/ui/Switch/Switch.web.d.ts.map +1 -1
  334. package/lib/typescript/src/components/ui/Switch/styles.d.ts +7 -1
  335. package/lib/typescript/src/components/ui/Switch/styles.d.ts.map +1 -1
  336. package/lib/typescript/src/components/ui/TabBar/TabBar.d.ts +2 -2
  337. package/lib/typescript/src/components/ui/TabBar/TabBar.d.ts.map +1 -1
  338. package/lib/typescript/src/components/ui/TabBar/styles.d.ts.map +1 -1
  339. package/lib/typescript/src/components/ui/TabBar/types.d.ts +3 -0
  340. package/lib/typescript/src/components/ui/TabBar/types.d.ts.map +1 -1
  341. package/lib/typescript/src/components/ui/Tabs/Tabs.d.ts +1 -1
  342. package/lib/typescript/src/components/ui/Tabs/Tabs.d.ts.map +1 -1
  343. package/lib/typescript/src/components/ui/Tabs/styles.d.ts.map +1 -1
  344. package/lib/typescript/src/components/ui/Tabs/types.d.ts +9 -1
  345. package/lib/typescript/src/components/ui/Tabs/types.d.ts.map +1 -1
  346. package/lib/typescript/src/components/ui/Tag/styles.d.ts +2 -1
  347. package/lib/typescript/src/components/ui/Tag/styles.d.ts.map +1 -1
  348. package/lib/typescript/src/components/ui/Tag/types.d.ts +6 -2
  349. package/lib/typescript/src/components/ui/Tag/types.d.ts.map +1 -1
  350. package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts +16 -16
  351. package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts.map +1 -1
  352. package/lib/typescript/src/components/ui/Textarea/Textarea.d.ts +16 -16
  353. package/lib/typescript/src/components/ui/Textarea/types.d.ts +2 -1
  354. package/lib/typescript/src/components/ui/Textarea/types.d.ts.map +1 -1
  355. package/lib/typescript/src/components/ui/Thumbnail/Thumbnail.d.ts.map +1 -1
  356. package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts +3 -0
  357. package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts.map +1 -1
  358. package/lib/typescript/src/components/ui/Toast/ToastHost.d.ts.map +1 -1
  359. package/lib/typescript/src/components/ui/Toast/ToastHost.web.d.ts.map +1 -1
  360. package/lib/typescript/src/components/ui/Toast/styles.d.ts.map +1 -1
  361. package/lib/typescript/src/components/ui/Toast/toast.d.ts +0 -5
  362. package/lib/typescript/src/components/ui/Toast/toast.d.ts.map +1 -1
  363. package/lib/typescript/src/components/ui/Toast/types.d.ts +1 -1
  364. package/lib/typescript/src/components/ui/Toast/types.d.ts.map +1 -1
  365. package/lib/typescript/src/components/ui/shared/badgeStyles.d.ts +27 -0
  366. package/lib/typescript/src/components/ui/shared/badgeStyles.d.ts.map +1 -0
  367. package/lib/typescript/src/icons/data.d.ts.map +1 -1
  368. package/lib/typescript/src/icons/types.d.ts +18 -12
  369. package/lib/typescript/src/icons/types.d.ts.map +1 -1
  370. package/lib/typescript/src/theme/colors.d.ts +9 -3
  371. package/lib/typescript/src/theme/colors.d.ts.map +1 -1
  372. package/lib/typescript/src/theme/index.d.ts +3 -2
  373. package/lib/typescript/src/theme/index.d.ts.map +1 -1
  374. package/lib/typescript/src/theme/scale.d.ts.map +1 -1
  375. package/lib/typescript/src/theme/shadow.d.ts +8 -8
  376. package/lib/typescript/src/theme/shadow.d.ts.map +1 -1
  377. package/lib/typescript/src/theme/tokens.d.ts +7 -3
  378. package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
  379. package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts +8 -0
  380. package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts.map +1 -0
  381. package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts +6 -0
  382. package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts.map +1 -0
  383. package/lib/typescript/src/theme/useTheme.d.ts.map +1 -1
  384. package/lib/typescript/src/utils/logger/logger.d.ts.map +1 -1
  385. package/lib/typescript/src/utils/testID/testID.d.ts +6 -3
  386. package/lib/typescript/src/utils/testID/testID.d.ts.map +1 -1
  387. package/package.json +2 -1
  388. package/src/components/business/AvatarWithRing/AvatarWithRing.tsx +5 -4
  389. package/src/components/business/AvatarWithRing/styles.ts +21 -3
  390. package/src/components/business/AvatarWithRing/types.ts +3 -1
  391. package/src/components/business/Decorations/GradientWash.tsx +46 -22
  392. package/src/components/business/Decorations/RadialHalo.tsx +8 -4
  393. package/src/components/business/Decorations/ScreenBackdrop.tsx +23 -5
  394. package/src/components/business/Decorations/index.ts +4 -0
  395. package/src/components/business/Decorations/types.ts +2 -0
  396. package/src/components/business/GlassStats/GlassStats.tsx +8 -4
  397. package/src/components/business/GlassStats/types.ts +6 -0
  398. package/src/components/business/VersionPill/VersionPill.tsx +46 -6
  399. package/src/components/business/VersionPill/styles.ts +1 -1
  400. package/src/components/business/VersionPill/types.ts +13 -1
  401. package/src/components/business/index.ts +1 -0
  402. package/src/components/business/useSvgId.ts +17 -0
  403. package/src/components/ui/Avatar/Avatar.tsx +17 -10
  404. package/src/components/ui/Avatar/styles.ts +7 -7
  405. package/src/components/ui/Avatar/types.ts +3 -1
  406. package/src/components/ui/BlurLayer/BlurLayer.tsx +4 -1
  407. package/src/components/ui/BlurLayer/BlurLayer.web.tsx +7 -1
  408. package/src/components/ui/Button/Button.tsx +2 -1
  409. package/src/components/ui/Button/ButtonBase.tsx +26 -2
  410. package/src/components/ui/Button/styles.ts +27 -25
  411. package/src/components/ui/Button/types.ts +1 -1
  412. package/src/components/ui/Card/Card.tsx +17 -7
  413. package/src/components/ui/Card/styles.ts +5 -0
  414. package/src/components/ui/Card/types.ts +4 -4
  415. package/src/components/ui/Carousel/Carousel.tsx +44 -15
  416. package/src/components/ui/Carousel/index.ts +1 -1
  417. package/src/components/ui/Carousel/types.ts +5 -0
  418. package/src/components/ui/Cell/Cell.tsx +28 -6
  419. package/src/components/ui/Cell/Leading.tsx +2 -2
  420. package/src/components/ui/Cell/List.tsx +14 -8
  421. package/src/components/ui/Cell/styles.ts +8 -5
  422. package/src/components/ui/Cell/types.ts +5 -2
  423. package/src/components/ui/Checkbox/Checkbox.tsx +18 -5
  424. package/src/components/ui/Checkbox/styles.ts +8 -0
  425. package/src/components/ui/Chip/Chip.tsx +20 -5
  426. package/src/components/ui/Chip/types.ts +2 -0
  427. package/src/components/ui/Confirm/ConfirmHost.tsx +26 -10
  428. package/src/components/ui/Confirm/confirm.ts +8 -0
  429. package/src/components/ui/Confirm/types.ts +4 -2
  430. package/src/components/ui/DrawerHeader/DrawerHeader.tsx +18 -12
  431. package/src/components/ui/DrawerHeader/styles.ts +10 -6
  432. package/src/components/ui/DrawerHeader/types.ts +3 -1
  433. package/src/components/ui/Empty/Empty.tsx +5 -4
  434. package/src/components/ui/Empty/types.ts +3 -0
  435. package/src/components/ui/EntryCard/EntryCard.tsx +5 -3
  436. package/src/components/ui/EntryCard/styles.ts +13 -4
  437. package/src/components/ui/EntryCard/types.ts +2 -2
  438. package/src/components/ui/Form/FormRow.tsx +7 -1
  439. package/src/components/ui/Form/styles.ts +2 -0
  440. package/src/components/ui/Form/types.ts +7 -2
  441. package/src/components/ui/Grid/Grid.tsx +42 -25
  442. package/src/components/ui/Grid/styles.ts +8 -20
  443. package/src/components/ui/Grid/types.ts +4 -1
  444. package/src/components/ui/Icon/Icon.tsx +42 -27
  445. package/src/components/ui/IconButton/IconButton.tsx +2 -0
  446. package/src/components/ui/IconButton/types.ts +8 -2
  447. package/src/components/ui/Input/types.ts +3 -2
  448. package/src/components/ui/Logo/Logo.tsx +2 -1
  449. package/src/components/ui/NavBar/NavBar.tsx +16 -2
  450. package/src/components/ui/NavBar/types.ts +5 -1
  451. package/src/components/ui/PasswordInput/PasswordInput.tsx +77 -43
  452. package/src/components/ui/PasswordInput/styles.ts +1 -1
  453. package/src/components/ui/PasswordInput/types.ts +7 -2
  454. package/src/components/ui/Pulse/Pulse.tsx +2 -1
  455. package/src/components/ui/Pulse/PulseDot.tsx +7 -6
  456. package/src/components/ui/Pulse/types.ts +6 -0
  457. package/src/components/ui/Pulse/usePulse.web.ts +50 -33
  458. package/src/components/ui/Radio/Radio.tsx +29 -6
  459. package/src/components/ui/Radio/RadioGroup.tsx +10 -3
  460. package/src/components/ui/Radio/styles.ts +9 -2
  461. package/src/components/ui/Reveal/Reveal.web.tsx +18 -3
  462. package/src/components/ui/Search/Search.tsx +22 -9
  463. package/src/components/ui/Search/types.ts +7 -1
  464. package/src/components/ui/Segmented/Segmented.tsx +8 -3
  465. package/src/components/ui/Segmented/styles.ts +4 -2
  466. package/src/components/ui/Segmented/types.ts +2 -0
  467. package/src/components/ui/Skeleton/Skeleton.tsx +9 -8
  468. package/src/components/ui/Spinner/Spinner.tsx +17 -17
  469. package/src/components/ui/Spinner/Spinner.web.tsx +7 -15
  470. package/src/components/ui/Spinner/shared.ts +37 -0
  471. package/src/components/ui/StatusDot/StatusDot.tsx +21 -3
  472. package/src/components/ui/StatusDot/styles.ts +1 -1
  473. package/src/components/ui/StatusDot/types.ts +14 -1
  474. package/src/components/ui/Stepper/Stepper.tsx +45 -10
  475. package/src/components/ui/Switch/Switch.tsx +4 -10
  476. package/src/components/ui/Switch/Switch.web.tsx +2 -8
  477. package/src/components/ui/Switch/styles.ts +10 -1
  478. package/src/components/ui/TabBar/TabBar.tsx +14 -6
  479. package/src/components/ui/TabBar/styles.ts +9 -21
  480. package/src/components/ui/TabBar/types.ts +3 -0
  481. package/src/components/ui/Tabs/Tabs.tsx +24 -5
  482. package/src/components/ui/Tabs/styles.ts +6 -2
  483. package/src/components/ui/Tabs/types.ts +10 -1
  484. package/src/components/ui/Tag/styles.ts +18 -10
  485. package/src/components/ui/Tag/types.ts +6 -2
  486. package/src/components/ui/TextField/TextFieldBase.tsx +31 -6
  487. package/src/components/ui/Textarea/types.ts +2 -1
  488. package/src/components/ui/Thumbnail/Thumbnail.tsx +14 -3
  489. package/src/components/ui/Thumbnail/styles.ts +6 -2
  490. package/src/components/ui/Toast/ToastHost.tsx +16 -8
  491. package/src/components/ui/Toast/ToastHost.web.tsx +26 -4
  492. package/src/components/ui/Toast/styles.ts +2 -0
  493. package/src/components/ui/Toast/toast.ts +35 -2
  494. package/src/components/ui/Toast/types.ts +1 -1
  495. package/src/components/ui/shared/badgeStyles.ts +36 -0
  496. package/src/icons/data.ts +27 -0
  497. package/src/icons/types.ts +25 -10
  498. package/src/theme/colors.ts +29 -10
  499. package/src/theme/index.ts +10 -1
  500. package/src/theme/scale.ts +5 -1
  501. package/src/theme/shadow.ts +33 -24
  502. package/src/theme/tokens.ts +10 -5
  503. package/src/theme/usePrefersReducedMotion.ts +9 -0
  504. package/src/theme/usePrefersReducedMotion.web.ts +27 -0
  505. package/src/theme/useTheme.ts +15 -0
  506. package/src/utils/logger/logger.ts +5 -1
  507. package/src/utils/testID/testID.ts +6 -3
  508. package/lib/module/components/index.js +0 -5
  509. package/lib/module/components/index.js.map +0 -1
  510. package/lib/typescript/src/components/index.d.ts +0 -3
  511. package/lib/typescript/src/components/index.d.ts.map +0 -1
  512. package/src/components/index.ts +0 -2
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from 'react-native';
2
- import { avatar, fw, type ColorTokens } from '../../../theme';
2
+ import { avatar, fw, rf, type ColorTokens } from '../../../theme';
3
3
  import type { AvatarSize, AvatarVariant } from './types';
4
4
 
5
5
  /** Avatar 静态 base —— 圆形容器(borderRadius / 尺寸由 sizingFor 派生)。 */
@@ -24,19 +24,19 @@ export const styles = StyleSheet.create({
24
24
  export function sizingFor(size: AvatarSize): { box: number; fs: number } {
25
25
  switch (size) {
26
26
  case 'xs':
27
- return { box: avatar.xs, fs: 10 };
27
+ return { box: avatar.xs, fs: rf(10) };
28
28
  case 'sm':
29
- return { box: avatar.sm, fs: 12 };
29
+ return { box: avatar.sm, fs: rf(12) };
30
30
  case 'md':
31
- return { box: avatar.md, fs: 13 };
31
+ return { box: avatar.md, fs: rf(13) };
32
32
  case 'lg':
33
- return { box: avatar.lg, fs: 15 };
33
+ return { box: avatar.lg, fs: rf(15) };
34
34
  case 'xl':
35
- return { box: avatar.xl, fs: 20 };
35
+ return { box: avatar.xl, fs: rf(20) };
36
36
  }
37
37
  }
38
38
 
39
- /** Avatar 配色推导:4 种 variant → { bg, fg }。签名与 Tag/Tool 的 paletteFor 一致。 */
39
+ /** Avatar 配色推导:4 种 variant → { bg, fg }。签名与 Tag/Button 的 paletteFor 一致。 */
40
40
  export function paletteFor(
41
41
  variant: AvatarVariant,
42
42
  c: ColorTokens
@@ -1,4 +1,4 @@
1
- import type { ImageSourcePropType } from 'react-native';
1
+ import type { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
2
2
 
3
3
  /** 头像尺寸(对应 avatar.xs..xl):xs=18 / sm=28 / md=32 / lg=40 / xl=56 */
4
4
  export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -27,6 +27,8 @@ export type AvatarProps = {
27
27
  * 提供时优先渲染 image;onError 触发后自动 fallback 到 label。
28
28
  */
29
29
  source?: ImageSourcePropType;
30
+ /** 容器附加样式(margin / position 等布局微调)。 */
31
+ style?: StyleProp<ViewStyle>;
30
32
  /** E2E / 测试定位 */
31
33
  testID?: string;
32
34
  };
@@ -9,7 +9,7 @@ import type { BlurLayerProps } from './types';
9
9
  * blurType 跟 scheme 自动切(亮 'light' / 暗 'dark',避免暗色奶白雾)。
10
10
  *
11
11
  * - `'soft'` 玻璃数据条 / 小区域
12
- * - `'strong'` 焦点引导 backdrop(BottomSheet blur 模式) */
12
+ * - `'strong'` 焦点引导 backdrop(sheet 类浮层) */
13
13
  export function BlurLayer({
14
14
  intensity,
15
15
  tint,
@@ -32,6 +32,9 @@ export function BlurLayer({
32
32
  style={StyleSheet.absoluteFill}
33
33
  blurType={blurType}
34
34
  blurAmount={blurTokens[intensity]}
35
+ // iOS「降低透明度」开启时 BlurView 用纯色替换模糊;库默认 #FFFFFF 在暗色 scheme
36
+ // 下整面刺眼白底。传随 scheme 的 surface 色,与下方 tint 层视觉一致([M-6])。
37
+ reducedTransparencyFallbackColor={c.surface}
35
38
  />
36
39
  <View
37
40
  style={[
@@ -22,7 +22,13 @@ export function BlurLayer({
22
22
  const blurAmount = blurTokens[intensity];
23
23
  const defaultTint =
24
24
  intensity === 'strong' ? c.sheetBackdrop : c.glassTintLight;
25
- // RN style typedef 不识别 web-only 属性,cast 绕过 TS;RN-Web 浏览器侧原样输出
25
+ // RN style typedef 不识别 web-only 属性,cast 绕过 TS;RN-Web 浏览器侧原样输出。
26
+ // [L-15] saturate(180%):苹果 HIG 玻璃效果的标准值,增强模糊后的颜色鲜艳度,
27
+ // 与 macOS / iOS 系统 vibrancy 视觉一致;降低会让玻璃面板显得灰暗脱色。
28
+ // [L-15] opacity:0.96(暗色):暗色 scheme 下 backdrop-filter 在 Chromium 中
29
+ // opacity=1 时存在渲染 artifact(模糊层与底层内容边界锯齿),降到 0.96 消除;
30
+ // 亮色 scheme 不受影响故保持 1。native 端 BlurLayer.tsx 用双层 View 实现,
31
+ // 语义等价(tint 层覆盖 BlurView),无需此 opacity 补丁。
26
32
  const webBlurStyle = {
27
33
  backdropFilter: `blur(${blurAmount}px) saturate(180%)`,
28
34
  WebkitBackdropFilter: `blur(${blurAmount}px) saturate(180%)`,
@@ -7,7 +7,7 @@ import { makeStyles } from './styles';
7
7
  import type { ButtonProps } from './types';
8
8
 
9
9
  /**
10
- * 6 variant × 3 size 文本按钮。
10
+ * 7 variant × 3 size 文本按钮。
11
11
  * 内部组合 ButtonBase + content(label + 可选 leftIcon / rightIcon),
12
12
  * ButtonBase 接管 chrome(sizing / palette / disabled / loading / a11y)。
13
13
  *
@@ -48,6 +48,7 @@ export function Button({
48
48
  ) : null}
49
49
  <Text
50
50
  style={[styles.label, { color: palette.fg, fontSize: sizing.fs }]}
51
+ numberOfLines={1}
51
52
  >
52
53
  {label}
53
54
  </Text>
@@ -6,7 +6,12 @@ import {
6
6
  type ViewStyle,
7
7
  } from 'react-native';
8
8
  import { Pressable } from 'react-native-gesture-handler';
9
- import { useColors, useThemedStyles } from '../../../theme';
9
+ import {
10
+ fixed,
11
+ pressedOpacity,
12
+ useColors,
13
+ useThemedStyles,
14
+ } from '../../../theme';
10
15
  import { makeStyles, paletteFor, sizingFor } from './styles';
11
16
  import type {
12
17
  ButtonBaseRenderContext,
@@ -61,6 +66,24 @@ export function ButtonBase({
61
66
  const isText = variant === 'text';
62
67
  const isInteractive = !disabled && !loading;
63
68
 
69
+ // [M-7] 触控目标补偿:hitSlop 向外扩展命中区域到 fixed.hitTarget(44pt)。
70
+ // 公式:vertical slop = max(0, (hitTarget - h) / 2);square 时同补 horizontal。
71
+ // text variant height=undefined(仅行内文字高 ~18pt),无法从 sizing.h 推算,
72
+ // 保守固定补到 44pt 等效(top+bottom ≈ 13pt each)。
73
+ // ⚠ hitSlop 不越父边界;相邻可按压元素建议间距 ≥ 2×slop 以防重叠裁决。
74
+ const hitSlop = useMemo(() => {
75
+ if (isText) {
76
+ // text 无 chrome,仅靠行高无法可靠获取实际高度,固定补至 44pt
77
+ const v = Math.round((fixed.hitTarget - 18) / 2);
78
+ return { top: v, bottom: v, left: 0, right: 0 };
79
+ }
80
+ const v = Math.max(0, Math.round((fixed.hitTarget - sizing.h) / 2));
81
+ if (square) {
82
+ return { top: v, bottom: v, left: v, right: v };
83
+ }
84
+ return { top: v, bottom: v, left: 0, right: 0 };
85
+ }, [isText, sizing.h, square]);
86
+
64
87
  return (
65
88
  <Pressable
66
89
  accessibilityRole={accessibilityRole}
@@ -69,6 +92,7 @@ export function ButtonBase({
69
92
  accessibilityHint={accessibilityHint}
70
93
  disabled={!isInteractive}
71
94
  onPress={onPress}
95
+ hitSlop={hitSlop}
72
96
  testID={testID}
73
97
  style={({ pressed }) => [
74
98
  styles.base,
@@ -82,7 +106,7 @@ export function ButtonBase({
82
106
  backgroundColor: palette.bg,
83
107
  borderColor: palette.border ?? 'transparent',
84
108
  borderWidth: palette.border ? 1 : 0,
85
- opacity: disabled ? 0.5 : pressed ? 0.7 : 1,
109
+ opacity: disabled ? 0.5 : pressed ? pressedOpacity : 1,
86
110
  alignSelf: block ? 'stretch' : 'flex-start',
87
111
  // 非 block 用 undefined 而非硬编码 0:Yoga 的 resolveFlexGrow 里显式 flexGrow
88
112
  // 优先级高于 flex 简写,写死 0 会让调用方 style={{ flex: 1 }} 失效(按钮撑不开 /
@@ -33,35 +33,37 @@ export const makeStyles = (_c: ColorTokens) =>
33
33
  * h 走 control.<size>,br 走 radius.<size>,gap / px 走 space[].
34
34
  * 新增 size 在 types.ts 加 union + 这里加 case。 */
35
35
  export function sizingFor(size: ButtonSize): ButtonSizing {
36
- if (size === 'lg') {
37
- return {
38
- h: control.lg,
39
- px: r(18),
40
- fs: t.body,
41
- br: radius.lg,
42
- gap: space['2'],
43
- };
44
- }
45
- if (size === 'sm') {
46
- return {
47
- h: control.sm,
48
- px: space['4'],
49
- fs: t.xxs,
50
- br: radius.sm,
51
- gap: space['1'],
52
- };
36
+ switch (size) {
37
+ case 'lg':
38
+ return {
39
+ h: control.lg,
40
+ px: r(18),
41
+ fs: t.body,
42
+ br: radius.lg,
43
+ gap: space['2'],
44
+ };
45
+ case 'sm':
46
+ return {
47
+ h: control.sm,
48
+ px: space['4'],
49
+ fs: t.xxs,
50
+ br: radius.sm,
51
+ gap: space['1'],
52
+ };
53
+ case 'md':
54
+ return {
55
+ h: control.md,
56
+ px: space['6'],
57
+ fs: t.sm,
58
+ br: radius.md,
59
+ gap: space['2'],
60
+ };
53
61
  }
54
- return {
55
- h: control.md,
56
- px: space['6'],
57
- fs: t.sm,
58
- br: radius.md,
59
- gap: space['2'],
60
- };
61
62
  }
62
63
 
63
64
  /** Button 配色推导:7 种 variant → { bg, fg, border }。签名与 Tag/Avatar 的 paletteFor 一致。
64
- * text / ghost / neutral 共用 'transparent' 底,差异在 fg。 */
65
+ * text / ghost / neutral 共用 'transparent' 底;ghost↔text palette 字节级同一,
66
+ * 差异在几何:text variant 在 ButtonBase 撕除高度与内边距。 */
65
67
  export function paletteFor(
66
68
  variant: ButtonVariant,
67
69
  c: ColorTokens
@@ -25,7 +25,7 @@ export type ButtonVariant =
25
25
  | 'text';
26
26
 
27
27
  export type ButtonProps = {
28
- /** 按钮文案;icon-only 场景请用其他组件(Pressable + Icon) */
28
+ /** 按钮文案;icon-only 场景请用 IconButton */
29
29
  label: string;
30
30
  /** 点击回调;disabled / loading 时不触发 */
31
31
  onPress?: () => void;
@@ -17,23 +17,33 @@ export function Card({
17
17
  }: CardProps): React.JSX.Element {
18
18
  const styles = useThemedStyles(makeStyles);
19
19
  const shadow = useShadow();
20
+ const br = borderRadius ?? radius.xl;
20
21
 
22
+ // 双层:外层持底色 + 阴影 + 圆角(无 overflow,阴影不被裁);内层持 overflow hidden
23
+ // 按圆角裁内容 + padding + 可选边框。[H-4] iOS 上 overflow 与阴影同层会裁掉阴影。
21
24
  return (
22
25
  <View
23
26
  testID={testID}
24
27
  style={[
25
28
  styles.base,
26
- { borderRadius: borderRadius ?? radius.xl },
27
- !bare && { padding: padding ?? space[6] },
29
+ { borderRadius: br },
28
30
  variantToStyle(variant, shadow, styles),
29
- borderColor != null && {
30
- borderColor,
31
- borderWidth: borderWidth ?? 2,
32
- },
33
31
  style,
34
32
  ]}
35
33
  >
36
- {children}
34
+ <View
35
+ style={[
36
+ styles.clip,
37
+ { borderRadius: br },
38
+ !bare && { padding: padding ?? space[6] },
39
+ borderColor != null && {
40
+ borderColor,
41
+ borderWidth: borderWidth ?? 2,
42
+ },
43
+ ]}
44
+ >
45
+ {children}
46
+ </View>
37
47
  </View>
38
48
  );
39
49
  }
@@ -4,8 +4,13 @@ import type { CardVariant } from './types';
4
4
 
5
5
  export const makeStyles = (c: ColorTokens) =>
6
6
  StyleSheet.create({
7
+ // 外层:底色 + 阴影(iOS 阴影需不透明背景才投影)。overflow hidden 不放这层 ——
8
+ // 否则 iOS 会把 View 自己的卡片阴影一起裁掉([H-4])。
7
9
  base: {
8
10
  backgroundColor: c.surface,
11
+ },
12
+ // 内层:overflow hidden 按圆角裁剪内容(如贴边媒体),不影响外层阴影。
13
+ clip: {
9
14
  overflow: 'hidden',
10
15
  },
11
16
  flat: {},
@@ -3,7 +3,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
4
  /**
5
5
  * Card **视觉变体**(控制装饰,跟 `bare` 是正交维度):
6
- * - `default`:白底 + 阴影 + 边框(标准卡片)
6
+ * - `default`:白底 + 阴影(标准卡片;默认无边框,传 `borderColor` 才显示边框)
7
7
  * - `plain`:仅白底(无阴影无边框,承载更轻量,如 chat 气泡内嵌组件)
8
8
  * - `flat`:**deprecated** — 等价于 `plain`,新代码请用 `plain`。
9
9
  */
@@ -16,11 +16,11 @@ export type CardProps = {
16
16
  variant?: CardVariant;
17
17
  /** 自定义内边距(覆盖默认 padding) */
18
18
  padding?: number;
19
- /** 自定义圆角(覆盖默认 radius.md) */
19
+ /** 自定义圆角(覆盖默认 radius.xl) */
20
20
  borderRadius?: number;
21
- /** 自定义边框色(覆盖默认 c.outline;仅 default/flat 有边框) */
21
+ /** 边框色 —— 传入即显示边框(任何 variant 生效;默认无边框) */
22
22
  borderColor?: string;
23
- /** 自定义边框宽度(覆盖默认 1;仅 default/flat 有边框) */
23
+ /** 边框宽度(默认 2;仅在传了 borderColor 时生效) */
24
24
  borderWidth?: number;
25
25
  /**
26
26
  * 「裸壳」模式:把 padding 设为 0,children 紧贴 Card 边缘渲染。
@@ -6,7 +6,7 @@ import ReanimatedCarousel, {
6
6
  import { useSharedValue } from 'react-native-reanimated';
7
7
  import { space, useThemedStyles } from '../../../theme';
8
8
  import { makeCarouselStyles } from './styles';
9
- import type { CarouselProps } from './types';
9
+ import type { CarouselProps, ICarouselInstance } from './types';
10
10
 
11
11
  /** Carousel —— 包装 `react-native-reanimated-carousel@5.0.0-beta.5`。
12
12
  *
@@ -16,21 +16,28 @@ import type { CarouselProps } from './types';
16
16
  * 用 Pagination.Custom 而非 Basic:Basic 的 activeDot 用 translateX 推进
17
17
  * 内层 fill,外壳宽度等于 dotStyle.width,activeDotStyle.width 只影响内层,
18
18
  * 做不出"active 4 → 12 长条"。Custom 自己 interpolate width/height/bg。
19
+ *
20
+ * forwardRef 透传 ICarouselInstance —— 解锁 a11y 暂停(ref.current.scrollTo)
21
+ * 以及宿主页面的命令式 scrollTo / prev / next。
19
22
  */
20
23
  // T 约束 object —— `Pagination.Basic<T extends {}>` 需要 object
21
- export function Carousel<T extends object>({
22
- items,
23
- renderItem,
24
- height,
25
- itemWidth,
26
- autoPlay,
27
- showIndicator = true,
28
- indicatorPosition = 'bottom',
29
- onPressItem,
30
- getAccessibilityLabel,
31
- style,
32
- testID,
33
- }: CarouselProps<T>): React.JSX.Element {
24
+ function CarouselInner<T extends object>(
25
+ {
26
+ items,
27
+ renderItem,
28
+ height,
29
+ itemWidth,
30
+ autoPlay,
31
+ loop = true,
32
+ showIndicator = true,
33
+ indicatorPosition = 'bottom',
34
+ onPressItem,
35
+ getAccessibilityLabel,
36
+ style,
37
+ testID,
38
+ }: CarouselProps<T>,
39
+ ref: React.Ref<ICarouselInstance>
40
+ ): React.JSX.Element {
34
41
  const { width: screenWidth } = useWindowDimensions();
35
42
  const width = itemWidth ?? screenWidth;
36
43
  const styles = useThemedStyles(makeCarouselStyles);
@@ -54,14 +61,24 @@ export function Carousel<T extends object>({
54
61
  // v5 把 width / height prop deprecate,迁到 style
55
62
  style={{ width, height }}
56
63
  data={data}
57
- loop
64
+ loop={loop}
58
65
  autoPlay={!!autoPlay}
59
66
  autoPlayInterval={autoPlay}
60
67
  onProgressChange={progress}
68
+ ref={ref}
61
69
  renderItem={({ item, index }) => (
70
+ // RN Pressable 而非 RNGH Pressable:Carousel 的 GestureDetector 已挂在
71
+ // ReanimatedCarousel 内部,外层再套 RNGH Pressable 会产生手势冲突;
72
+ // 用 RN 原生 Pressable 让库自己的拖拽手势优先,tap 仍正常触发。
62
73
  <Pressable
63
74
  onPress={() => onPressItem?.(item, index)}
64
75
  style={{ width, height }}
76
+ // [L-92] 恒产出兜底:testID 缺失时用 'carousel' 前缀而非 undefined。
77
+ // 与 childTestID「父缺失返 undefined」语义不同,不替换为 childTestID。
78
+ // 原因:renderItem 须向 ReanimatedCarousel 提供稳定可预期的子项 testID
79
+ // 用于 E2E 定位,哪怕调用方未传 testID 也能用 carousel-item-0 等定位;
80
+ // 副作用:同屏两个未传 testID 的 Carousel 会碰撞 carousel-item-N。
81
+ // 建议:多 Carousel 场景请务必传 testID 以避免碰撞。
65
82
  testID={`${testID ?? 'carousel'}-item-${index}`}
66
83
  // 只在真正可点时声明 button 语义,纯展示型不标 button 避免读屏器误导
67
84
  {...(onPressItem
@@ -78,6 +95,9 @@ export function Carousel<T extends object>({
78
95
  )}
79
96
  />
80
97
  {showIndicator && items.length > 1 ? (
98
+ // importantForAccessibility="no" —— dots 仅视觉辅助,SR 不需要读出
99
+ // 每个 dot 的状态(已由 accessibilityRole=tab / accessibilityState.selected 表达
100
+ // 的场景另论,这里 Pagination.Custom 无内置 a11y 语义,对 SR 隐藏比误读更优)。
81
101
  <Pagination.Custom<T>
82
102
  progress={progress}
83
103
  data={data}
@@ -88,8 +108,17 @@ export function Carousel<T extends object>({
88
108
  ? styles.dotsWrapOverlay
89
109
  : styles.dotsWrapBottom
90
110
  }
111
+ // @ts-expect-error — importantForAccessibility 是 RN View prop,
112
+ // Pagination.Custom containerStyle 走 ViewStyle 但 TS 类型未收录该 prop
113
+ importantForAccessibility="no-hide-descendants"
114
+ accessibilityElementsHidden={true}
91
115
  />
92
116
  ) : null}
93
117
  </View>
94
118
  );
95
119
  }
120
+
121
+ // forwardRef 不支持泛型函数组件直接推断 T,需要手动标注 + 类型断言
122
+ export const Carousel = React.forwardRef(CarouselInner) as <T extends object>(
123
+ props: CarouselProps<T> & { ref?: React.Ref<ICarouselInstance> }
124
+ ) => React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { Carousel } from './Carousel';
2
- export type { CarouselProps } from './types';
2
+ export type { CarouselProps, ICarouselInstance } from './types';
@@ -1,6 +1,9 @@
1
+ import type { ICarouselInstance } from 'react-native-reanimated-carousel';
1
2
  import type { ReactNode } from 'react';
2
3
  import type { StyleProp, ViewStyle } from 'react-native';
3
4
 
5
+ export type { ICarouselInstance };
6
+
4
7
  /** Indicator 位置策略:
5
8
  * - 'bottom'(默认):指示器独立行,跟 Carousel 下方;容器高度 = height + 16
6
9
  * - 'overlay-bottom-right':指示器 absolute 浮在 Carousel 右下角,不占额外高度 */
@@ -19,6 +22,8 @@ export type CarouselProps<T> = {
19
22
  itemWidth?: number;
20
23
  /** autoPlay 间隔 ms,undefined / 0 不自动 */
21
24
  autoPlay?: number;
25
+ /** 是否循环播放,默认 true。传 false 时首尾不循环,可配合 a11y 暂停控制。 */
26
+ loop?: boolean;
22
27
  /** 是否显示底部 dot indicator,默认 true */
23
28
  showIndicator?: boolean;
24
29
  /** indicator 位置策略,默认 'bottom' */
@@ -1,13 +1,22 @@
1
1
  import React from 'react';
2
2
  import { type StyleProp, Text, type TextStyle, View } from 'react-native';
3
3
  import { Pressable } from 'react-native-gesture-handler';
4
- import { useColors, useThemedStyles } from '../../../theme';
4
+ import { pressedOpacity, r, useColors, useThemedStyles } from '../../../theme';
5
5
  import { Icon } from '../Icon';
6
6
  import { useListVariant } from './context';
7
7
  import { Leading } from './Leading';
8
8
  import { makeStyles } from './styles';
9
9
  import type { CellProps } from './types';
10
10
 
11
+ /** extra 是否包含可交互控件(Switch/Stepper/Checkbox 等 ReactNode)。
12
+ * 用于决定 Pressable 外壳是否关闭 accessible —— 若外壳 accessible=true 且 extra 也是
13
+ * 独立 accessible 控件,SR 会产生「双播报 + 控件被遮挡无法直接激活」的体验缺陷。
14
+ * 规则:extra 是 ReactNode(非 string / null / undefined)时判定为「可能含控件」。
15
+ * 使用方若明确 extra 是纯展示 ReactNode,可通过 accessibilityHint='none' 绕过(暂不加 prop)。*/
16
+ function extraHasInteractiveNode(extra: CellProps['extra']): boolean {
17
+ return extra != null && typeof extra !== 'string';
18
+ }
19
+
11
20
  function renderSlot(
12
21
  value: React.ReactNode,
13
22
  textStyle: StyleProp<TextStyle>,
@@ -77,7 +86,7 @@ export function Cell({
77
86
  {arrow && !danger ? (
78
87
  <Icon
79
88
  name="chevron-right"
80
- size={flush ? 18 : 20}
89
+ size={r(flush ? 18 : 20)}
81
90
  color={c.foregroundSubtle}
82
91
  style={flush ? styles.chevronFlush : undefined}
83
92
  />
@@ -86,19 +95,32 @@ export function Cell({
86
95
  );
87
96
 
88
97
  if (onPress) {
98
+ // 若 extra 含交互控件(Switch/Stepper 等),外壳 Pressable 关闭 accessible,
99
+ // 让 SR 直接穿透读取控件本身,避免双播报和控件被遮挡无法激活的体验缺陷。
100
+ const hasInteractiveExtra = extraHasInteractiveNode(extra);
101
+
102
+ // 默认 a11y label:title + desc 拼接,给 SR 用户同时听到主副信息。
103
+ // 有 accessibilityLabel 显式覆盖时走 prop,否则组合 title+desc。
104
+ const defaultLabel =
105
+ typeof title === 'string'
106
+ ? typeof desc === 'string' && desc
107
+ ? `${title},${desc}`
108
+ : title
109
+ : undefined;
110
+
89
111
  return (
90
112
  <Pressable
91
113
  onPress={onPress}
92
114
  disabled={disabled}
93
115
  accessibilityRole="button"
94
- accessibilityLabel={
95
- accessibilityLabel ?? (typeof title === 'string' ? title : undefined)
96
- }
116
+ accessibilityLabel={accessibilityLabel ?? defaultLabel}
97
117
  accessibilityHint={accessibilityHint}
98
118
  accessibilityState={disabled ? { disabled: true } : undefined}
119
+ // extra 含控件时外壳不作为独立 a11y 元素,让 SR 穿透到 extra 控件
120
+ accessible={hasInteractiveExtra ? false : undefined}
99
121
  testID={testID}
100
122
  style={({ pressed }) => [
101
- { opacity: disabled ? 0.5 : pressed ? 0.7 : 1 },
123
+ { opacity: disabled ? 0.5 : pressed ? pressedOpacity : 1 },
102
124
  ]}
103
125
  >
104
126
  {inner}
@@ -41,7 +41,7 @@ export function Leading({
41
41
  >
42
42
  <Icon
43
43
  name={slot as IconName}
44
- size={16}
44
+ size={r(16)}
45
45
  color={danger ? c.error : c.primary}
46
46
  />
47
47
  </View>
@@ -50,7 +50,7 @@ export function Leading({
50
50
  return (
51
51
  <Icon
52
52
  name={slot as IconName}
53
- size={22}
53
+ size={r(22)}
54
54
  color={danger ? c.error : c.foregroundMuted}
55
55
  />
56
56
  );
@@ -24,14 +24,20 @@ export function List({
24
24
  return (
25
25
  <ListVariantContext.Provider value="flush">
26
26
  <View style={[styles.listFlush, style]} testID={testID}>
27
- {items.map((child, i) => (
28
- <React.Fragment key={i}>
29
- {i > 0 && divider === 'full' ? (
30
- <View style={styles.separator} />
31
- ) : null}
32
- {child}
33
- </React.Fragment>
34
- ))}
27
+ {items.map((child, i) => {
28
+ // 优先使用 caller 传入的 key(React.Children.toArray 已将 key 注入 child),
29
+ // 回退到索引确保 reconciler 稳定 —— 避免 caller key 丢失导致不必要重挂载。
30
+ const key =
31
+ React.isValidElement(child) && child.key != null ? child.key : i;
32
+ return (
33
+ <React.Fragment key={key}>
34
+ {i > 0 && divider === 'full' ? (
35
+ <View style={styles.separator} />
36
+ ) : null}
37
+ {child}
38
+ </React.Fragment>
39
+ );
40
+ })}
35
41
  </View>
36
42
  </ListVariantContext.Provider>
37
43
  );
@@ -1,7 +1,9 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
  import {
3
+ fixed,
3
4
  fw,
4
5
  r,
6
+ rf,
5
7
  radius,
6
8
  space,
7
9
  type as t,
@@ -26,7 +28,8 @@ export const makeStyles = (c: ColorTokens) =>
26
28
  gap: space[4],
27
29
  paddingHorizontal: r(11),
28
30
  paddingVertical: r(11),
29
- minHeight: 0,
31
+ // [M-7] flush 可按压行高约 39pt < iOS HIG 44pt;用 minHeight 撑到 fixed.hitTarget
32
+ minHeight: fixed.hitTarget,
30
33
  },
31
34
  cellFlushWithDesc: {
32
35
  paddingVertical: r(9),
@@ -43,10 +46,10 @@ export const makeStyles = (c: ColorTokens) =>
43
46
  lineHeight: t.body * 1.3,
44
47
  },
45
48
  titleFlush: {
46
- fontSize: r(13),
49
+ fontSize: rf(13),
47
50
  fontWeight: fw.medium,
48
51
  letterSpacing: -0.1,
49
- lineHeight: r(13) * 1.3,
52
+ lineHeight: rf(13) * 1.3,
50
53
  color: c.foreground,
51
54
  },
52
55
  desc: {
@@ -55,7 +58,7 @@ export const makeStyles = (c: ColorTokens) =>
55
58
  lineHeight: t.xs * 1.4,
56
59
  },
57
60
  descFlush: {
58
- fontSize: r(11),
61
+ fontSize: rf(11),
59
62
  color: c.foregroundMuted,
60
63
  opacity: 0.55,
61
64
  marginTop: r(1),
@@ -65,7 +68,7 @@ export const makeStyles = (c: ColorTokens) =>
65
68
  color: c.foregroundSubtle,
66
69
  },
67
70
  extraFlush: {
68
- fontSize: r(11),
71
+ fontSize: rf(11),
69
72
  color: c.foregroundMuted,
70
73
  opacity: 0.55,
71
74
  },
@@ -9,7 +9,10 @@ export type CellProps = {
9
9
  titleLines?: number;
10
10
  /** 副标题;string 自动 numberOfLines=2,传 ReactNode 完全自定义 */
11
11
  desc?: ReactNode;
12
- /** 右侧 slot —— 字符串自动套 Text;传 ReactNode 放 Switch / Stepper / Tag 等控件 */
12
+ /** 右侧 slot —— 字符串自动套 Text;传 ReactNode 放 Switch / Stepper / Tag 等控件。
13
+ * **a11y 边界**:extra 为 ReactNode 时,外壳 Pressable 会关闭 `accessible`,
14
+ * 让 SR 直接穿透到 extra 控件(避免双播报);extra 的 a11y 由其自身负责。
15
+ * 若 extra 是纯展示 ReactNode 且仍需外壳播报,请改用 string 或传 `accessibilityLabel`。 */
13
16
  extra?: ReactNode;
14
17
  /** 显示右侧 chevron-right 图标,常配合 onPress 表示「可进入下一级」 */
15
18
  arrow?: boolean;
@@ -31,7 +34,7 @@ export type CellProps = {
31
34
  /** 显式 SR 朗读文案,覆盖 Cell 默认从 string title 推断的 fallback。
32
35
  * title 是 ReactNode(自定义渲染)时尤其需要,否则 SR 用户听不到任何内容。 */
33
36
  accessibilityLabel?: string;
34
- /** SR 朗读 hint —— 说明 tap 后行为( CLAUDE.md a11y 章节,短 ≤8 字)。
37
+ /** SR 朗读 hint —— 说明 tap 后行为( ≤8 字)。
35
38
  * 常用:"查看详情" / "打开应用" 等;onPress 缺省时此 prop 无意义。 */
36
39
  accessibilityHint?: string;
37
40
  };