pixelize-native-library 1.2.0 → 1.2.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 (353) hide show
  1. package/lib/module/core/MODULE.md +2 -1
  2. package/lib/module/core/gradient/AccentGradientFill.js +80 -0
  3. package/lib/module/core/gradient/darkenHex.js +13 -0
  4. package/lib/module/core/gradient/gradientStops.js +27 -0
  5. package/lib/module/core/gradient/index.js +7 -0
  6. package/lib/module/core/gradient/withAlpha.js +19 -0
  7. package/lib/module/core/haptics/MODULE.md +4 -0
  8. package/lib/module/core/haptics/context.js +7 -0
  9. package/lib/module/core/haptics/haptics.js +17 -0
  10. package/lib/module/core/haptics/index.js +6 -0
  11. package/lib/module/core/haptics/useHaptics.js +73 -0
  12. package/lib/module/core/icon/MODULE.md +16 -9
  13. package/lib/module/core/icon/icons/trending-up.js +10 -0
  14. package/lib/module/core/icon/resolve.js +2 -0
  15. package/lib/module/core/media/expoImage.js +6 -0
  16. package/lib/module/core/motion/MODULE.md +12 -12
  17. package/lib/module/core/motion/config.js +4 -1
  18. package/lib/module/core/motion/index.js +2 -1
  19. package/lib/module/core/motion/usePressState.js +145 -0
  20. package/lib/module/core/style/index.js +1 -0
  21. package/lib/module/core/style/radius.js +4 -0
  22. package/lib/module/index.js +1 -0
  23. package/lib/module/modules/accordion/Accordion.js +69 -49
  24. package/lib/module/modules/accordion/Accordion.variants.js +4 -3
  25. package/lib/module/modules/accordion/MODULE.md +2 -1
  26. package/lib/module/modules/alert-dialog/AlertDialog.js +6 -5
  27. package/lib/module/modules/alert-dialog/AlertDialog.variants.js +4 -0
  28. package/lib/module/modules/app-bar/AppBar.js +6 -4
  29. package/lib/module/modules/app-bar/AppBar.variants.js +1 -2
  30. package/lib/module/modules/avatar/Avatar.js +7 -1
  31. package/lib/module/modules/avatar/Avatar.variants.js +1 -1
  32. package/lib/module/modules/avatar/MODULE.md +2 -2
  33. package/lib/module/modules/avatar-group/AvatarGroup.js +10 -6
  34. package/lib/module/modules/avatar-group/AvatarGroup.variants.js +23 -0
  35. package/lib/module/modules/avatar-group/MODULE.md +16 -0
  36. package/lib/module/modules/badge/Badge.js +11 -5
  37. package/lib/module/modules/badge/Badge.variants.js +2 -1
  38. package/lib/module/modules/badge/MODULE.md +5 -5
  39. package/lib/module/modules/banner/Banner.js +106 -60
  40. package/lib/module/modules/banner/Banner.variants.js +2 -2
  41. package/lib/module/modules/banner/MODULE.md +7 -2
  42. package/lib/module/modules/bottom-nav/BottomNav.js +6 -3
  43. package/lib/module/modules/bottom-nav/BottomNav.variants.js +9 -10
  44. package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js +28 -4
  45. package/lib/module/modules/bottom-nav/BottomNavTab.js +28 -4
  46. package/lib/module/modules/bottom-nav/MODULE.md +10 -1
  47. package/lib/module/modules/bottom-sheet/BottomSheet.js +20 -7
  48. package/lib/module/modules/bottom-sheet/BottomSheet.variants.js +15 -5
  49. package/lib/module/modules/bottom-sheet/MODULE.md +13 -2
  50. package/lib/module/modules/button/Button.js +87 -101
  51. package/lib/module/modules/button/Button.variants.js +8 -7
  52. package/lib/module/modules/button/MODULE.md +6 -0
  53. package/lib/module/modules/button-group/ButtonGroup.js +36 -37
  54. package/lib/module/modules/button-group/ButtonGroup.variants.js +21 -46
  55. package/lib/module/modules/button-group/MODULE.md +25 -30
  56. package/lib/module/modules/card/Card.js +117 -19
  57. package/lib/module/modules/card/Card.variants.js +1 -0
  58. package/lib/module/modules/card/MODULE.md +13 -10
  59. package/lib/module/modules/charts/BarChart.js +29 -14
  60. package/lib/module/modules/charts/BarList.js +31 -18
  61. package/lib/module/modules/charts/Charts.variants.js +66 -2
  62. package/lib/module/modules/charts/DonutChart.js +9 -4
  63. package/lib/module/modules/charts/LineChart.js +5 -3
  64. package/lib/module/modules/charts/MODULE.md +24 -11
  65. package/lib/module/modules/charts/PieChart.js +13 -4
  66. package/lib/module/modules/charts/Sparkline.js +4 -2
  67. package/lib/module/modules/checkbox/Checkbox.js +10 -2
  68. package/lib/module/modules/checkbox/MODULE.md +5 -0
  69. package/lib/module/modules/chip/Chip.js +83 -38
  70. package/lib/module/modules/chip/Chip.variants.js +15 -3
  71. package/lib/module/modules/chip/MODULE.md +6 -4
  72. package/lib/module/modules/combobox/Combobox.js +93 -57
  73. package/lib/module/modules/combobox/Combobox.variants.js +22 -7
  74. package/lib/module/modules/combobox/MODULE.md +14 -4
  75. package/lib/module/modules/composer/Composer.js +9 -2
  76. package/lib/module/modules/composer/Composer.variants.js +2 -0
  77. package/lib/module/modules/composer/MODULE.md +5 -0
  78. package/lib/module/modules/copy-button/CopyButton.js +22 -4
  79. package/lib/module/modules/copy-button/CopyButton.variants.js +4 -2
  80. package/lib/module/modules/copy-button/MODULE.md +5 -0
  81. package/lib/module/modules/data-table/DataTable.js +28 -9
  82. package/lib/module/modules/data-table/DataTable.variants.js +3 -2
  83. package/lib/module/modules/data-table/MODULE.md +1 -0
  84. package/lib/module/modules/date-picker/Calendar.js +75 -29
  85. package/lib/module/modules/date-picker/DatePicker.variants.js +24 -9
  86. package/lib/module/modules/date-picker/MODULE.md +25 -4
  87. package/lib/module/modules/date-picker/PickerField.js +13 -4
  88. package/lib/module/modules/date-picker/PickerShell.js +2 -0
  89. package/lib/module/modules/date-picker/TimePicker.js +13 -18
  90. package/lib/module/modules/divider/Divider.variants.js +6 -5
  91. package/lib/module/modules/divider/MODULE.md +2 -0
  92. package/lib/module/modules/drawer/Drawer.js +20 -8
  93. package/lib/module/modules/drawer/Drawer.variants.js +4 -4
  94. package/lib/module/modules/drawer/MODULE.md +3 -0
  95. package/lib/module/modules/empty-state/EmptyState.js +18 -29
  96. package/lib/module/modules/empty-state/EmptyState.variants.js +7 -0
  97. package/lib/module/modules/empty-state/MODULE.md +1 -0
  98. package/lib/module/modules/fab/Fab.js +41 -61
  99. package/lib/module/modules/fab/Fab.variants.js +15 -1
  100. package/lib/module/modules/fab/FabGroup.js +84 -57
  101. package/lib/module/modules/fab/MODULE.md +19 -6
  102. package/lib/module/modules/file-grid/FileGrid.js +30 -16
  103. package/lib/module/modules/file-grid/FileGrid.variants.js +2 -2
  104. package/lib/module/modules/file-grid/MODULE.md +3 -1
  105. package/lib/module/modules/file-upload/FileUpload.variants.js +3 -1
  106. package/lib/module/modules/file-upload/MODULE.md +2 -0
  107. package/lib/module/modules/filter-sheet/FilterChip.js +11 -3
  108. package/lib/module/modules/filter-sheet/FilterSheetBody.js +15 -3
  109. package/lib/module/modules/filter-sheet/MODULE.md +9 -0
  110. package/lib/module/modules/folder-row/FolderRow.js +29 -17
  111. package/lib/module/modules/folder-row/FolderRow.variants.js +4 -2
  112. package/lib/module/modules/folder-row/MODULE.md +2 -1
  113. package/lib/module/modules/gantt/Gantt.js +30 -9
  114. package/lib/module/modules/gantt/Gantt.variants.js +36 -0
  115. package/lib/module/modules/gantt/MODULE.md +11 -1
  116. package/lib/module/modules/image-viewer/ImageViewer.js +35 -5
  117. package/lib/module/modules/image-viewer/MODULE.md +6 -0
  118. package/lib/module/modules/input/Input.js +20 -7
  119. package/lib/module/modules/input/Input.variants.js +8 -7
  120. package/lib/module/modules/input/MODULE.md +2 -0
  121. package/lib/module/modules/list-item/ListItem.js +48 -26
  122. package/lib/module/modules/list-item/ListItem.variants.js +11 -2
  123. package/lib/module/modules/list-item/MODULE.md +2 -3
  124. package/lib/module/modules/markdown/MODULE.md +8 -1
  125. package/lib/module/modules/markdown/Markdown.js +57 -22
  126. package/lib/module/modules/markdown/Markdown.variants.js +2 -1
  127. package/lib/module/modules/menu/MODULE.md +11 -0
  128. package/lib/module/modules/menu/Menu.js +99 -40
  129. package/lib/module/modules/menu/Menu.variants.js +3 -3
  130. package/lib/module/modules/message-bubble/MODULE.md +4 -1
  131. package/lib/module/modules/message-bubble/MessageBubble.js +4 -5
  132. package/lib/module/modules/message-bubble/MessageBubble.variants.js +5 -5
  133. package/lib/module/modules/modal/MODULE.md +11 -0
  134. package/lib/module/modules/modal/Modal.js +87 -35
  135. package/lib/module/modules/modal/Modal.variants.js +2 -2
  136. package/lib/module/modules/more-items/MODULE.md +5 -0
  137. package/lib/module/modules/more-items/MoreItems.js +7 -1
  138. package/lib/module/modules/more-items/MoreItems.variants.js +4 -1
  139. package/lib/module/modules/multi-select/MODULE.md +5 -0
  140. package/lib/module/modules/multi-select/MultiSelect.js +23 -1
  141. package/lib/module/modules/multi-select/MultiSelect.variants.js +4 -2
  142. package/lib/module/modules/number-input/MODULE.md +2 -1
  143. package/lib/module/modules/number-input/NumberInput.js +97 -84
  144. package/lib/module/modules/number-input/NumberInput.variants.js +9 -6
  145. package/lib/module/modules/org-switcher/MODULE.md +13 -1
  146. package/lib/module/modules/org-switcher/OrgSwitcher.js +13 -2
  147. package/lib/module/modules/org-switcher/OrgSwitcher.variants.js +4 -2
  148. package/lib/module/modules/pagination/MODULE.md +2 -2
  149. package/lib/module/modules/pagination/Pagination.js +76 -37
  150. package/lib/module/modules/pagination/Pagination.variants.js +4 -2
  151. package/lib/module/modules/pagination/PaginationControls.js +55 -35
  152. package/lib/module/modules/pin-input/MODULE.md +5 -1
  153. package/lib/module/modules/pin-input/PinInput.js +9 -2
  154. package/lib/module/modules/pin-input/PinInput.variants.js +2 -1
  155. package/lib/module/modules/radio-group/MODULE.md +2 -2
  156. package/lib/module/modules/radio-group/RadioGroup.js +122 -63
  157. package/lib/module/modules/radio-group/RadioGroup.variants.js +2 -1
  158. package/lib/module/modules/reorder/MODULE.md +2 -0
  159. package/lib/module/modules/reorder/Reorder.js +4 -3
  160. package/lib/module/modules/reorder/Reorder.variants.js +4 -2
  161. package/lib/module/modules/rich-text/MODULE.md +3 -1
  162. package/lib/module/modules/rich-text/RichText.js +42 -22
  163. package/lib/module/modules/rich-text-editor/MODULE.md +4 -1
  164. package/lib/module/modules/rich-text-editor/RichTextEditor.js +8 -1
  165. package/lib/module/modules/rich-text-editor/RichTextEditor.variants.js +9 -6
  166. package/lib/module/modules/screen/MODULE.md +7 -0
  167. package/lib/module/modules/screen/Screen.js +50 -17
  168. package/lib/module/modules/screen/Screen.variants.js +18 -0
  169. package/lib/module/modules/search-bar/MODULE.md +1 -0
  170. package/lib/module/modules/search-bar/SearchBar.js +46 -26
  171. package/lib/module/modules/search-bar/SearchBar.variants.js +11 -8
  172. package/lib/module/modules/section/MODULE.md +2 -0
  173. package/lib/module/modules/section/Section.js +8 -15
  174. package/lib/module/modules/section/Section.variants.js +1 -6
  175. package/lib/module/modules/segmented-control/MODULE.md +3 -1
  176. package/lib/module/modules/segmented-control/SegmentedControl.js +110 -46
  177. package/lib/module/modules/segmented-control/SegmentedControl.variants.js +3 -2
  178. package/lib/module/modules/select/MODULE.md +26 -5
  179. package/lib/module/modules/select/Select.js +39 -12
  180. package/lib/module/modules/select/Select.variants.js +36 -12
  181. package/lib/module/modules/skeleton/MODULE.md +23 -27
  182. package/lib/module/modules/skeleton/Skeleton.js +46 -51
  183. package/lib/module/modules/skeleton/Skeleton.variants.js +17 -75
  184. package/lib/module/modules/slider/MODULE.md +2 -0
  185. package/lib/module/modules/slider/Slider.js +2 -1
  186. package/lib/module/modules/stage-progress/MODULE.md +12 -8
  187. package/lib/module/modules/stage-progress/StageProgress.js +94 -47
  188. package/lib/module/modules/stage-progress/StageProgress.variants.js +17 -12
  189. package/lib/module/modules/stat-tile/MODULE.md +2 -0
  190. package/lib/module/modules/stat-tile/StatTile.js +15 -10
  191. package/lib/module/modules/stat-tile/StatTile.variants.js +2 -0
  192. package/lib/module/modules/state-block/MODULE.md +3 -0
  193. package/lib/module/modules/state-block/StateBlock.js +11 -6
  194. package/lib/module/modules/state-block/StateBlock.variants.js +7 -0
  195. package/lib/module/modules/surface/MODULE.md +59 -0
  196. package/lib/module/modules/surface/Surface.js +42 -0
  197. package/lib/module/modules/surface/Surface.variants.js +33 -0
  198. package/lib/module/modules/surface/index.js +4 -0
  199. package/lib/module/modules/swipeable-row/MODULE.md +9 -0
  200. package/lib/module/modules/swipeable-row/SwipeableRow.js +28 -7
  201. package/lib/module/modules/switch/MODULE.md +2 -0
  202. package/lib/module/modules/switch/Switch.js +8 -2
  203. package/lib/module/modules/tabs/MODULE.md +2 -1
  204. package/lib/module/modules/tabs/Tabs.js +37 -18
  205. package/lib/module/modules/tabs/Tabs.variants.js +4 -2
  206. package/lib/module/modules/text/MODULE.md +5 -2
  207. package/lib/module/modules/text/Text.js +18 -6
  208. package/lib/module/modules/text/Text.variants.js +108 -44
  209. package/lib/module/modules/textarea/MODULE.md +2 -0
  210. package/lib/module/modules/textarea/Textarea.js +3 -2
  211. package/lib/module/modules/textarea/Textarea.variants.js +2 -1
  212. package/lib/module/modules/toast/MODULE.md +8 -4
  213. package/lib/module/modules/toast/Toast.js +31 -13
  214. package/lib/module/modules/toast/Toast.variants.js +5 -0
  215. package/lib/module/modules/tooltip/MODULE.md +15 -11
  216. package/lib/module/modules/tooltip/Tooltip.js +41 -9
  217. package/lib/module/modules/tooltip/Tooltip.variants.js +8 -1
  218. package/lib/module/theme/MODULE.md +3 -1
  219. package/lib/module/theme/platform/MODULE.md +14 -2
  220. package/lib/module/theme/platform/elevation.native.js +0 -44
  221. package/lib/module/theme/platform/floatingSurface.native.js +75 -0
  222. package/lib/module/theme/platform/highlight.native.js +59 -0
  223. package/lib/module/theme/platform/index.js +5 -0
  224. package/lib/module/theme/platform/motion.native.js +31 -11
  225. package/lib/module/theme/platform/stateLayer.native.js +14 -0
  226. package/lib/module/theme/platform/surfaces.native.js +11 -0
  227. package/lib/module/theme/provider/PixelizeProvider.js +12 -5
  228. package/lib/module/theme/tokens/MODULE.md +32 -28
  229. package/lib/module/theme/tokens/THEME-CONTRACT.md +137 -0
  230. package/lib/module/theme/tokens/assertPalette.js +29 -0
  231. package/lib/module/theme/tokens/brands/emerald/palette.light.js +7 -6
  232. package/lib/module/theme/tokens/brands/lavender/palette.light.js +3 -2
  233. package/lib/module/theme/tokens/brands/meadow/palette.light.js +7 -6
  234. package/lib/module/theme/tokens/brands/radiant/palette.light.js +7 -6
  235. package/lib/module/theme/tokens/brands/rosewood/palette.light.js +7 -6
  236. package/lib/module/theme/tokens/brands/skyline/palette.light.js +7 -6
  237. package/lib/module/theme/tokens/brands/slate/palette.light.js +8 -10
  238. package/lib/module/theme/tokens/brands/storefront/palette.light.js +7 -6
  239. package/lib/module/theme/tokens/brands/zinc/palette.dark.js +3 -2
  240. package/lib/module/theme/tokens/brands/zinc/palette.light.js +3 -2
  241. package/lib/module/theme/tokens/builders/buildDarkPalette.js +3 -2
  242. package/lib/module/theme/tokens/builders/finalizePalette.js +34 -0
  243. package/lib/module/theme/tokens/builders/liftToContrast.js +44 -0
  244. package/lib/module/theme/tokens/builders/placeholderInk.js +22 -0
  245. package/lib/module/theme/tokens/builders/semanticText.js +14 -0
  246. package/lib/module/theme/tokens/builders/surfaceRungs.js +44 -0
  247. package/lib/module/theme/tokens/index.js +5 -0
  248. package/lib/module/theme/tokens/roles/index.js +5 -0
  249. package/lib/typescript/core/gradient/AccentGradientFill.d.ts +7 -0
  250. package/lib/typescript/core/gradient/darkenHex.d.ts +2 -0
  251. package/lib/typescript/core/gradient/gradientStops.d.ts +10 -0
  252. package/lib/typescript/core/gradient/index.d.ts +5 -0
  253. package/lib/typescript/core/gradient/withAlpha.d.ts +2 -0
  254. package/lib/typescript/core/haptics/context.d.ts +3 -0
  255. package/lib/typescript/core/haptics/haptics.d.ts +33 -0
  256. package/lib/typescript/core/haptics/index.d.ts +6 -0
  257. package/lib/typescript/core/haptics/useHaptics.d.ts +12 -0
  258. package/lib/typescript/core/icon/icons/trending-up.d.ts +3 -0
  259. package/lib/typescript/core/icon/names.d.ts +1 -1
  260. package/lib/typescript/core/media/expoImage.d.ts +15 -6
  261. package/lib/typescript/core/media/pickers.d.ts +5 -5
  262. package/lib/typescript/core/motion/config.d.ts +2 -1
  263. package/lib/typescript/core/motion/index.d.ts +3 -1
  264. package/lib/typescript/core/motion/usePressState.d.ts +21 -0
  265. package/lib/typescript/core/style/index.d.ts +1 -0
  266. package/lib/typescript/core/style/radius.d.ts +2 -0
  267. package/lib/typescript/index.d.ts +4 -2
  268. package/lib/typescript/modules/accordion/Accordion.variants.d.ts +2 -2
  269. package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts +1 -0
  270. package/lib/typescript/modules/avatar/Avatar.variants.d.ts +1 -1
  271. package/lib/typescript/modules/avatar-group/AvatarGroup.d.ts +4 -2
  272. package/lib/typescript/modules/avatar-group/AvatarGroup.variants.d.ts +19 -0
  273. package/lib/typescript/modules/banner/Banner.d.ts +2 -0
  274. package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts +1 -3
  275. package/lib/typescript/modules/bottom-sheet/BottomSheet.variants.d.ts +3 -1
  276. package/lib/typescript/modules/button/Button.d.ts +0 -25
  277. package/lib/typescript/modules/button/Button.variants.d.ts +6 -6
  278. package/lib/typescript/modules/button-group/ButtonGroup.d.ts +0 -19
  279. package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts +22 -56
  280. package/lib/typescript/modules/card/Card.d.ts +7 -5
  281. package/lib/typescript/modules/charts/Charts.variants.d.ts +29 -1
  282. package/lib/typescript/modules/chip/Chip.d.ts +3 -1
  283. package/lib/typescript/modules/chip/Chip.variants.d.ts +6 -2
  284. package/lib/typescript/modules/chip/index.d.ts +1 -1
  285. package/lib/typescript/modules/combobox/Combobox.variants.d.ts +17 -4
  286. package/lib/typescript/modules/data-table/DataTable.variants.d.ts +1 -1
  287. package/lib/typescript/modules/date-picker/DatePicker.variants.d.ts +15 -3
  288. package/lib/typescript/modules/date-picker/TimePicker.d.ts +1 -7
  289. package/lib/typescript/modules/divider/Divider.variants.d.ts +4 -4
  290. package/lib/typescript/modules/empty-state/EmptyState.d.ts +2 -0
  291. package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts +1 -0
  292. package/lib/typescript/modules/fab/Fab.variants.d.ts +2 -0
  293. package/lib/typescript/modules/folder-row/FolderRow.d.ts +0 -8
  294. package/lib/typescript/modules/gantt/Gantt.variants.d.ts +21 -0
  295. package/lib/typescript/modules/input/Input.variants.d.ts +6 -6
  296. package/lib/typescript/modules/list-item/ListItem.d.ts +1 -5
  297. package/lib/typescript/modules/list-item/ListItem.variants.d.ts +137 -1
  298. package/lib/typescript/modules/markdown/Markdown.d.ts +7 -0
  299. package/lib/typescript/modules/message-bubble/MessageBubble.d.ts +2 -2
  300. package/lib/typescript/modules/message-bubble/MessageBubble.variants.d.ts +1 -2
  301. package/lib/typescript/modules/number-input/NumberInput.variants.d.ts +7 -5
  302. package/lib/typescript/modules/pagination/PaginationControls.d.ts +1 -4
  303. package/lib/typescript/modules/reorder/Reorder.d.ts +1 -1
  304. package/lib/typescript/modules/screen/Screen.d.ts +3 -9
  305. package/lib/typescript/modules/screen/Screen.variants.d.ts +4 -0
  306. package/lib/typescript/modules/search-bar/SearchBar.variants.d.ts +6 -6
  307. package/lib/typescript/modules/section/Section.variants.d.ts +0 -3
  308. package/lib/typescript/modules/segmented-control/SegmentedControl.variants.d.ts +1 -1
  309. package/lib/typescript/modules/select/Select.d.ts +4 -1
  310. package/lib/typescript/modules/select/Select.variants.d.ts +22 -8
  311. package/lib/typescript/modules/select/index.d.ts +1 -1
  312. package/lib/typescript/modules/skeleton/Skeleton.d.ts +3 -18
  313. package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts +12 -68
  314. package/lib/typescript/modules/stage-progress/StageProgress.variants.d.ts +15 -6
  315. package/lib/typescript/modules/state-block/StateBlock.d.ts +4 -0
  316. package/lib/typescript/modules/state-block/StateBlock.variants.d.ts +1 -0
  317. package/lib/typescript/modules/surface/Surface.d.ts +19 -0
  318. package/lib/typescript/modules/surface/Surface.variants.d.ts +15 -0
  319. package/lib/typescript/modules/surface/index.d.ts +4 -0
  320. package/lib/typescript/modules/text/Text.d.ts +8 -4
  321. package/lib/typescript/modules/text/Text.variants.d.ts +14 -11
  322. package/lib/typescript/modules/toast/Toast.variants.d.ts +2 -0
  323. package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts +7 -0
  324. package/lib/typescript/theme/index.d.ts +1 -1
  325. package/lib/typescript/theme/platform/elevation.native.d.ts +0 -30
  326. package/lib/typescript/theme/platform/floatingSurface.native.d.ts +10 -0
  327. package/lib/typescript/theme/platform/highlight.native.d.ts +17 -0
  328. package/lib/typescript/theme/platform/index.d.ts +9 -0
  329. package/lib/typescript/theme/platform/motion.native.d.ts +33 -13
  330. package/lib/typescript/theme/platform/stateLayer.native.d.ts +11 -0
  331. package/lib/typescript/theme/platform/surfaces.native.d.ts +8 -0
  332. package/lib/typescript/theme/provider/PixelizeProvider.d.ts +1 -1
  333. package/lib/typescript/theme/provider/types.d.ts +8 -0
  334. package/lib/typescript/theme/tokens/assertPalette.d.ts +10 -0
  335. package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts +4 -3
  336. package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts +4 -3
  337. package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts +4 -3
  338. package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts +4 -3
  339. package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts +4 -3
  340. package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts +4 -3
  341. package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts +4 -3
  342. package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts +4 -3
  343. package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts +4 -3
  344. package/lib/typescript/theme/tokens/builders/finalizePalette.d.ts +4 -0
  345. package/lib/typescript/theme/tokens/builders/liftToContrast.d.ts +9 -0
  346. package/lib/typescript/theme/tokens/builders/placeholderInk.d.ts +13 -0
  347. package/lib/typescript/theme/tokens/builders/semanticText.d.ts +4 -0
  348. package/lib/typescript/theme/tokens/builders/surfaceRungs.d.ts +12 -0
  349. package/lib/typescript/theme/tokens/index.d.ts +5 -0
  350. package/lib/typescript/theme/tokens/roles/index.d.ts +1 -0
  351. package/lib/typescript/theme/tokens/types.d.ts +8 -7
  352. package/package.json +10 -2
  353. package/registry.json +5 -0
@@ -13,7 +13,7 @@
13
13
  * preview offset is `resolveRowShift`, the dragged row's is the raw `translationY`.
14
14
  *
15
15
  * The list stays FULLY CONTROLLED: `items` is never mutated mid-drag. On release the pan hands off
16
- * to JS once (`runOnJS`) and commits `moveItem(items, startIndex, targetIndex)` through `onReorder`.
16
+ * to JS once (`scheduleOnRN`) and commits `moveItem(items, startIndex, targetIndex)` through `onReorder`.
17
17
  * Because the preview and the commit share the same splice semantics, the dragged row lands in the
18
18
  * slot its shifted neighbours already vacated — and passive rows snap back to 0 the instant
19
19
  * `activeIndex` goes idle, so no stale offset can outlive the drop.
@@ -37,7 +37,8 @@
37
37
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
38
38
  import { Text, View } from "react-native";
39
39
  import { Gesture, GestureDetector } from "react-native-gesture-handler";
40
- import Animated, { cancelAnimation, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
40
+ import Animated, { cancelAnimation, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
41
+ import { scheduleOnRN } from "react-native-worklets";
41
42
  import { useAnnounce } from "../../core/a11y/index.js";
42
43
  import { VirtualList } from "../../core/list/index.js";
43
44
  import { useMotion } from "../../core/motion/index.js";
@@ -136,7 +137,7 @@ export const Reorder = /*#__PURE__*/memo(function Reorder({
136
137
  "worklet";
137
138
 
138
139
  if (activeIndex.value === IDLE) return;
139
- runOnJS(endDrag)();
140
+ scheduleOnRN(endDrag);
140
141
  }), [activeIndex, targetIndex, translationY, itemCount, rowPitch, endDrag]);
141
142
  const handleMove = useCallback((fromIndex, toIndex) => {
142
143
  // A row's move button stays operable while it holds focus even at the list's end (see
@@ -167,7 +167,8 @@ export const reorderRowStructure = createThemedVariants(theme => ({
167
167
  height: REORDER_ROW_HEIGHT,
168
168
  marginBottom: theme.space[2],
169
169
  paddingHorizontal: theme.space[3],
170
- borderRadius: theme.radii.base,
170
+ borderRadius: theme.radii.md,
171
+ borderCurve: "continuous",
171
172
  columnGap: theme.space[3]
172
173
  }
173
174
  }));
@@ -188,7 +189,8 @@ export const reorderGripBarStructure = createThemedVariants(theme => ({
188
189
  base: {
189
190
  width: GRIP_BAR_WIDTH,
190
191
  height: GRIP_BAR_HEIGHT,
191
- borderRadius: theme.radii.full
192
+ borderRadius: theme.radii.full,
193
+ borderCurve: "continuous"
192
194
  }
193
195
  }));
194
196
  //# sourceMappingURL=Reorder.variants.js.map
@@ -24,11 +24,13 @@ safe schemes only) · `onImagePress` · `style` (layout-only, outermost, once, l
24
24
  into inline spans inside one `Text` — there is no per-heading node left, so heading semantics are
25
25
  unavailable in that mode.
26
26
  - Links are `accessibilityRole="link"`; images are `Pressable`s labelled from their `alt` (falling back to
27
- `Image`).
27
+ `Image`) and carry `android_ripple` (`rippleColor(theme.mode)`, `borderless: false`) on Android.
28
28
  - Colour pairs are measured across all 9 brands × both modes (`RichText.test.ts`), min ratios: text 6.10 and
29
29
  muted 6.52 and link 5.06 on the canvas · mention label 4.82 on its own `accent.subtle` pill · code and
30
30
  `pre` 5.69 on `bg.sunken`. `quoteBorder` / `border` are decorative rules (1.08–1.43:1) with no contrast
31
31
  floor — they are pinned to `border.default` and asserted never to escalate to `border.interactive`/`focus`.
32
+ - `blockquote`'s left border is `theme.borderWidths.thick` (2dp), not a raw literal `3` — a real,
33
+ visible 1px change to every rendered blockquote.
32
34
 
33
35
  ## Performance
34
36
 
@@ -8,6 +8,7 @@ import { memo, useCallback, useMemo } from "react";
8
8
  import { Linking, Platform, Pressable, StyleSheet, Text, View } from "react-native";
9
9
  import { HeadingText } from "../../core/heading/index.js";
10
10
  import { useTheme } from "../../theme/hooks.js";
11
+ import { rippleColor } from "../../theme/platform/stateLayer.native.js";
11
12
  import { BLOCK_TAGS, isBlank, isChecked, isElement, isMention, isSafeUrl, mentionLabel, MENTION_HOSTS, parseRichText, stripHtmlToText, textContent } from "./parseRichText.js";
12
13
  import { resolveRichTextColors } from "./RichText.variants.js";
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -27,9 +28,7 @@ const styles = StyleSheet.create({
27
28
  block: {
28
29
  marginBottom: 8
29
30
  },
30
- bold: {
31
- fontWeight: "700"
32
- },
31
+ bold: {},
33
32
  italic: {
34
33
  fontStyle: "italic"
35
34
  },
@@ -55,7 +54,6 @@ const styles = StyleSheet.create({
55
54
  flex: 1
56
55
  },
57
56
  quote: {
58
- borderLeftWidth: 3,
59
57
  paddingLeft: 12,
60
58
  marginBottom: 8
61
59
  },
@@ -73,16 +71,8 @@ const styles = StyleSheet.create({
73
71
  marginBottom: 8
74
72
  }
75
73
  });
76
- const WRAP_STYLES = {
77
- b: styles.bold,
78
- strong: styles.bold,
79
- i: styles.italic,
80
- em: styles.italic,
81
- u: styles.underline,
82
- s: styles.strike,
83
- del: styles.strike,
84
- strike: styles.strike
85
- };
74
+ const WRAP_TAGS = ["b", "strong", "i", "em", "u", "s", "del", "strike"];
75
+ const WRAP_TAG_SET = new Set(WRAP_TAGS);
86
76
  const RichTextLink = /*#__PURE__*/memo(function RichTextLink({
87
77
  href,
88
78
  linkStyle,
@@ -101,13 +91,19 @@ const RichTextImage = /*#__PURE__*/memo(function RichTextImage({
101
91
  src,
102
92
  label,
103
93
  mutedStyle,
94
+ mode,
104
95
  onPress
105
96
  }) {
106
97
  const handlePress = useCallback(() => onPress?.(src), [onPress, src]);
98
+ const androidRipple = useMemo(() => Platform.OS === "android" ? {
99
+ color: rippleColor(mode),
100
+ borderless: false
101
+ } : undefined, [mode]);
107
102
  return /*#__PURE__*/_jsx(Pressable, {
108
103
  accessibilityRole: "button",
109
104
  accessibilityLabel: label,
110
105
  onPress: onPress ? handlePress : undefined,
106
+ android_ripple: androidRipple,
111
107
  style: styles.imageWrap,
112
108
  children: /*#__PURE__*/_jsx(Text, {
113
109
  style: mutedStyle,
@@ -131,9 +127,9 @@ export const RichText = /*#__PURE__*/memo(function RichText({
131
127
  textDecorationLine: "underline"
132
128
  },
133
129
  mention: {
130
+ ...theme.fontStyleForWeight(theme.fontWeights.semibold),
134
131
  color: colors.mentionText,
135
- backgroundColor: colors.mentionBg,
136
- fontWeight: "600"
132
+ backgroundColor: colors.mentionBg
137
133
  },
138
134
  code: {
139
135
  fontFamily: MONO,
@@ -147,7 +143,30 @@ export const RichText = /*#__PURE__*/memo(function RichText({
147
143
  text: {
148
144
  color: colors.text
149
145
  }
150
- }), [colors]);
146
+ }), [colors, theme]);
147
+ const wrapStyles = useMemo(() => ({
148
+ b: theme.fontStyleForWeight(theme.fontWeights.bold),
149
+ strong: theme.fontStyleForWeight(theme.fontWeights.bold),
150
+ i: {
151
+ fontStyle: "italic"
152
+ },
153
+ em: {
154
+ fontStyle: "italic"
155
+ },
156
+ u: {
157
+ textDecorationLine: "underline"
158
+ },
159
+ s: {
160
+ textDecorationLine: "line-through"
161
+ },
162
+ del: {
163
+ textDecorationLine: "line-through"
164
+ },
165
+ strike: {
166
+ textDecorationLine: "line-through"
167
+ }
168
+ }), [theme]);
169
+ const headingStyle = useMemo(() => theme.fontStyleForWeight(theme.fontWeights.bold), [theme]);
151
170
  const baseTextStyle = useMemo(() => [styles.base, palette.text], [palette]);
152
171
  const rootStyle = useMemo(() => [styles.root, style], [style]);
153
172
  const tree = useMemo(() => {
@@ -184,7 +203,7 @@ export const RichText = /*#__PURE__*/memo(function RichText({
184
203
  attrs,
185
204
  children
186
205
  } = node;
187
- const wrap = WRAP_STYLES[tag];
206
+ const wrap = WRAP_TAG_SET.has(tag) ? wrapStyles[tag] : undefined;
188
207
  if (tag === "br") out.push("\n");else if (wrap) out.push(/*#__PURE__*/_jsx(Text, {
189
208
  style: wrap,
190
209
  children: renderInline(children, pre, key)
@@ -233,16 +252,16 @@ export const RichText = /*#__PURE__*/memo(function RichText({
233
252
  return /*#__PURE__*/_jsx(HeadingText, {
234
253
  accessibilityRole: "header",
235
254
  "aria-level": level,
236
- style: [styles.base, textStyle, {
255
+ style: [styles.base, textStyle, headingStyle, {
237
256
  fontSize: size,
238
- lineHeight: size + 6,
239
- fontWeight: "700"
257
+ lineHeight: size + 6
240
258
  }],
241
259
  children: renderInline(children, false, key)
242
260
  }, key);
243
261
  }
244
262
  if (tag === "blockquote") return /*#__PURE__*/_jsx(View, {
245
263
  style: [styles.quote, {
264
+ borderLeftWidth: theme.borderWidths.thick,
246
265
  borderLeftColor: colors.quoteBorder
247
266
  }],
248
267
  children: renderBlocks(children, key, {
@@ -288,6 +307,7 @@ export const RichText = /*#__PURE__*/memo(function RichText({
288
307
  src: attrs.src ?? "",
289
308
  label: attrs.alt || "Image",
290
309
  mutedStyle: palette.muted,
310
+ mode: theme.mode,
291
311
  onPress: onImagePress
292
312
  }, key);
293
313
  }
@@ -337,7 +357,7 @@ export const RichText = /*#__PURE__*/memo(function RichText({
337
357
  } catch {
338
358
  return null;
339
359
  }
340
- }, [tree, numberOfLines, colors, palette, openURL, onImagePress]);
360
+ }, [tree, numberOfLines, colors, palette, wrapStyles, headingStyle, openURL, onImagePress, theme]);
341
361
  if (!html) return null;
342
362
  if (content == null) {
343
363
  return /*#__PURE__*/_jsx(Text, {
@@ -126,7 +126,8 @@ Inside it the candidates go through `VirtualList` (`core/list`), not a `ScrollVi
126
126
  `itemHeight={MENTION_ROW_HEIGHT}` — the rows are a fixed 40dp (`richTextEditorMentionRowStructure`'s
127
127
  `minHeight`), so `getItemLayout` is exact and the list never measures. Rows are a memo'd `MentionRow`
128
128
  taking **primitives** (`id`, `label`), and `onSelect(id, label)` is one shared `useCallback` with `[]`
129
- deps rather than a closure minted per row.
129
+ deps rather than a closure minted per row. Each row also carries `android_ripple`
130
+ (`rippleColor(theme.mode)`, `borderless: false`), gated on `Platform.OS === "android"`.
130
131
 
131
132
  **`keyboardShouldPersistTaps="always"` — `"handled"` is not enough here.** The dropdown only exists
132
133
  while the mention session is live, and the session dies with the keyboard. Under RN's default
@@ -223,3 +224,5 @@ instant, and the mention dropdown is a list, where per-row animation is forbidde
223
224
 
224
225
  - Theme imports decoupled to `theme/hooks`; optional peers (reanimated, gesture-handler, flash-list) load at runtime.
225
226
  - List-heavy surfaces use `VirtualList` with device-tier window sizing where applicable.
227
+
228
+ - **Round 2 visual** — radii retarget (`radii.md`/`lg`/`xl`/`full`), `borderCurve: continuous` on md+ corners; floating surfaces wire platform elevation/highlight where applicable.
@@ -21,6 +21,7 @@ import { Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-n
21
21
  import { EnrichedTextInput } from "react-native-enriched-html";
22
22
  import { VirtualList } from "../../core/list/index.js";
23
23
  import { useTheme } from "../../theme/hooks.js";
24
+ import { rippleColor } from "../../theme/platform/stateLayer.native.js";
24
25
  import { Button } from "../button/index.js";
25
26
  import { Input } from "../input/index.js";
26
27
  import { Modal } from "../modal/index.js";
@@ -39,6 +40,10 @@ const MentionRow = /*#__PURE__*/memo(function MentionRow({
39
40
  onSelect
40
41
  }) {
41
42
  const handlePress = useCallback(() => onSelect(id, label), [onSelect, id, label]);
43
+ const androidRipple = useMemo(() => Platform.OS === "android" ? {
44
+ color: rippleColor(theme.mode),
45
+ borderless: false
46
+ } : undefined, [theme.mode]);
42
47
  const restingStyle = useMemo(() => [richTextEditorMentionRowStructure(theme), {
43
48
  backgroundColor: colors.mentionRowBackground
44
49
  }], [theme, colors.mentionRowBackground]);
@@ -55,6 +60,7 @@ const MentionRow = /*#__PURE__*/memo(function MentionRow({
55
60
  return /*#__PURE__*/_jsx(Pressable, {
56
61
  accessibilityRole: "menuitem",
57
62
  onPress: handlePress,
63
+ android_ripple: androidRipple,
58
64
  style: rowStyle,
59
65
  children: /*#__PURE__*/_jsx(Text, {
60
66
  style: labelStyle,
@@ -284,7 +290,8 @@ function RichTextEditorImpl({
284
290
  bottom: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
285
291
  borderWidth: FOCUS_RING_WIDTH,
286
292
  borderColor: theme.colors.border.focus,
287
- borderRadius: theme.radii.base + FOCUS_RING_GAP + FOCUS_RING_WIDTH
293
+ borderRadius: theme.radii.md + FOCUS_RING_GAP + FOCUS_RING_WIDTH,
294
+ borderCurve: "continuous"
288
295
  }), [theme]);
289
296
  const linkBodyStyle = useMemo(() => ({
290
297
  rowGap: theme.space[4]
@@ -167,7 +167,7 @@ export function resolveRichTextEditorColors(colors) {
167
167
  cardBorder: colors.border.interactive,
168
168
  cardBorderFocus: colors.border.focus,
169
169
  text: colors.fg.default,
170
- placeholder: colors.fg.muted,
170
+ placeholder: colors.fg.placeholder,
171
171
  cursor: colors.accent.solid,
172
172
  selection: colors.accent.subtle,
173
173
  mentionDropdownBackground: colors.bg.surface,
@@ -216,7 +216,7 @@ export function resolveRichTextEditorHtmlStyle(theme) {
216
216
  },
217
217
  codeblock: {
218
218
  color: c.fg.default,
219
- borderRadius: theme.radii.base,
219
+ borderRadius: theme.radii.md,
220
220
  backgroundColor: c.bg.sunken
221
221
  },
222
222
  code: {
@@ -262,7 +262,8 @@ export const richTextEditorLayout = createThemedVariants(theme => ({
262
262
  export const richTextEditorCardStructure = createThemedVariants(theme => ({
263
263
  base: {
264
264
  borderWidth: theme.borderWidths.thin,
265
- borderRadius: theme.radii.base
265
+ borderRadius: theme.radii.md,
266
+ borderCurve: "continuous"
266
267
  }
267
268
  }));
268
269
  export const richTextEditorToolbarStructure = createThemedVariants(theme => ({
@@ -272,8 +273,9 @@ export const richTextEditorToolbarStructure = createThemedVariants(theme => ({
272
273
  columnGap: theme.space[2],
273
274
  padding: theme.space[2],
274
275
  borderBottomWidth: theme.borderWidths.thin,
275
- borderTopLeftRadius: theme.radii.base - theme.borderWidths.thin,
276
- borderTopRightRadius: theme.radii.base - theme.borderWidths.thin
276
+ borderTopLeftRadius: theme.radii.md - theme.borderWidths.thin,
277
+ borderTopRightRadius: theme.radii.md - theme.borderWidths.thin,
278
+ borderCurve: "continuous"
277
279
  }
278
280
  }));
279
281
 
@@ -299,7 +301,8 @@ export const richTextEditorMentionDropdownStructure = createThemedVariants(theme
299
301
  right: 0,
300
302
  maxHeight: 200,
301
303
  borderWidth: theme.borderWidths.thin,
302
- borderRadius: theme.radii.base,
304
+ borderRadius: theme.radii.md,
305
+ borderCurve: "continuous",
303
306
  zIndex: theme.zIndices.dropdown,
304
307
  ...theme.elevation.md
305
308
  }
@@ -19,6 +19,7 @@ content instead of `children`.
19
19
  | Prop | Type | Default | Notes |
20
20
  |------|------|---------|-------|
21
21
  | `children` | `ReactNode` | — | Shown when `state="idle"`. |
22
+ | `appBar` | `ReactNode` | — | Top header slot. Receives top safe-area inset; body omits `top` from `edges`. |
22
23
  | `edges` | `ScreenEdge[]` | `["top"]` | Passed to `SafeAreaView`. |
23
24
  | `padded` | `boolean` | `false` | Adds theme padding around content. |
24
25
  | `keyboardAvoiding` | `boolean` | `false` | Wraps in `KeyboardAvoidingView`. |
@@ -38,6 +39,12 @@ content instead of `children`.
38
39
  Screens whose main content is already a `FlatList` should attach `RefreshControl` to that list
39
40
  directly and omit `onRefresh` here.
40
41
 
42
+ ## App bar composition
43
+
44
+ Pass `<AppBar … />` (or any header) as `appBar`. The shell paints `bg.canvas`, applies `top` safe
45
+ area to the bar, and applies the remaining `edges` to the body — the pattern apps previously
46
+ hand-rolled as `Screen` + `AppHeader`.
47
+
41
48
  ## Motion
42
49
 
43
50
  **None, deliberately.** Screen is a layout shell with no surface of its own to animate: a state
@@ -2,15 +2,7 @@
2
2
 
3
3
  /**
4
4
  * Screen — a screen shell composing SafeArea, optional KeyboardAvoidingView, optional pull-to-refresh,
5
- * and async-state slots that swap in `LoadingState` / consumer-provided empty/error content instead of
6
- * `children`. Replaces the per-app `SafeAreaView` + `KeyboardAvoidingView` + `RefreshControl` wiring
7
- * that tickets/mobile and crm-mobile each re-declared.
8
- *
9
- * Requires `react-native-safe-area-context` — Screen's whole purpose is safe-area handling; consumers
10
- * using this module are expected to install that optional peer (see MODULE.md).
11
- *
12
- * No `accessibilityRole` of its own: like `Card`, this is a layout shell — children and composed
13
- * state blocks carry their own semantics.
5
+ * optional `appBar` slot with safe-area edge splitting, and async-state slots.
14
6
  */
15
7
 
16
8
  import { memo, useMemo } from "react";
@@ -18,10 +10,11 @@ import { KeyboardAvoidingView, Platform, RefreshControl, ScrollView, View } from
18
10
  import { SafeAreaView } from "react-native-safe-area-context";
19
11
  import { useTheme, useThemeColors } from "../../theme/hooks.js";
20
12
  import { LoadingState } from "../state-block/index.js";
21
- import { SCREEN_DEFAULT_EDGES, resolveScreenColors, screenPaddedStructure, screenRootStructure, screenScrollContentStructure, screenStateSlotStructure } from "./Screen.variants.js";
22
- import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { SCREEN_DEFAULT_EDGES, resolveScreenAppBarEdges, resolveScreenBodyEdges, resolveScreenColors, screenBodyStructure, screenPaddedStructure, screenRootStructure, screenScrollContentStructure, screenShellStructure, screenStateSlotStructure } from "./Screen.variants.js";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
15
  export const Screen = /*#__PURE__*/memo(function Screen({
24
16
  children,
17
+ appBar,
25
18
  edges = SCREEN_DEFAULT_EDGES,
26
19
  padded = false,
27
20
  keyboardAvoiding = false,
@@ -38,6 +31,9 @@ export const Screen = /*#__PURE__*/memo(function Screen({
38
31
  const theme = useTheme();
39
32
  const roleColors = useThemeColors();
40
33
  const screenColors = resolveScreenColors(theme.colors);
34
+ const hasAppBar = appBar !== undefined;
35
+ const bodyEdges = useMemo(() => resolveScreenBodyEdges(edges, hasAppBar), [edges, hasAppBar]);
36
+ const appBarEdges = useMemo(() => resolveScreenAppBarEdges(edges, hasAppBar), [edges, hasAppBar]);
41
37
  const body = useMemo(() => {
42
38
  if (state === "loading") {
43
39
  return /*#__PURE__*/_jsx(View, {
@@ -76,29 +72,66 @@ export const Screen = /*#__PURE__*/memo(function Screen({
76
72
  children: body
77
73
  });
78
74
  const background = screenColors.background;
79
- const safeAreaStyle = useMemo(() => [screenRootStructure(theme), padded ? screenPaddedStructure(theme) : undefined, {
75
+ const shellStyle = useMemo(() => [screenShellStructure(theme), {
76
+ backgroundColor: background
77
+ }, style], [theme, background, style]);
78
+ const bodySafeAreaStyle = useMemo(() => [hasAppBar ? screenBodyStructure(theme) : screenRootStructure(theme), padded ? screenPaddedStructure(theme) : undefined, !hasAppBar && {
79
+ backgroundColor: background
80
+ }], [theme, padded, background, hasAppBar]);
81
+ const legacySafeAreaStyle = useMemo(() => [screenRootStructure(theme), padded ? screenPaddedStructure(theme) : undefined, {
80
82
  backgroundColor: background
81
83
  }], [theme, padded, background]);
82
- const rootStyle = useMemo(() => [...safeAreaStyle, style], [safeAreaStyle, style]);
83
- const keyboardStyle = useMemo(() => [screenRootStructure(theme), {
84
+ const legacyRootStyle = useMemo(() => [...legacySafeAreaStyle, style], [legacySafeAreaStyle, style]);
85
+ const legacyKeyboardStyle = useMemo(() => [screenRootStructure(theme), {
84
86
  backgroundColor: background
85
87
  }, style], [theme, background, style]);
88
+ const content = hasAppBar ? /*#__PURE__*/_jsxs(View, {
89
+ style: shellStyle,
90
+ testID: testID,
91
+ children: [appBarEdges.length > 0 ? /*#__PURE__*/_jsx(SafeAreaView, {
92
+ edges: appBarEdges,
93
+ children: appBar
94
+ }) : appBar, /*#__PURE__*/_jsx(SafeAreaView, {
95
+ edges: bodyEdges,
96
+ style: bodySafeAreaStyle,
97
+ children: inner
98
+ })]
99
+ }) : null;
100
+ if (hasAppBar) {
101
+ if (!keyboardAvoiding) {
102
+ return content;
103
+ }
104
+ return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
105
+ style: shellStyle,
106
+ behavior: Platform.OS === "ios" ? "padding" : "height",
107
+ keyboardVerticalOffset: keyboardVerticalOffset,
108
+ testID: testID,
109
+ children: [appBarEdges.length > 0 ? /*#__PURE__*/_jsx(SafeAreaView, {
110
+ edges: appBarEdges,
111
+ children: appBar
112
+ }) : appBar, /*#__PURE__*/_jsx(SafeAreaView, {
113
+ edges: bodyEdges,
114
+ style: bodySafeAreaStyle,
115
+ children: inner
116
+ })]
117
+ });
118
+ }
86
119
  if (!keyboardAvoiding) {
87
120
  return /*#__PURE__*/_jsx(SafeAreaView, {
88
121
  edges: edges,
89
- style: rootStyle,
122
+ style: legacyRootStyle,
90
123
  testID: testID,
91
124
  children: inner
92
125
  });
93
126
  }
94
127
  return /*#__PURE__*/_jsx(KeyboardAvoidingView, {
95
- style: keyboardStyle,
128
+ style: legacyKeyboardStyle,
96
129
  behavior: Platform.OS === "ios" ? "padding" : "height",
97
130
  keyboardVerticalOffset: keyboardVerticalOffset,
98
131
  testID: testID,
99
132
  children: /*#__PURE__*/_jsx(SafeAreaView, {
100
133
  edges: edges,
101
- style: safeAreaStyle,
134
+ style: legacySafeAreaStyle,
102
135
  children: inner
103
136
  })
104
137
  });
@@ -40,4 +40,22 @@ export const screenScrollContentStructure = createVariants({
40
40
  flexGrow: 1
41
41
  }
42
42
  });
43
+ export const screenBodyStructure = createThemedVariants(_theme => ({
44
+ base: {
45
+ flex: 1
46
+ }
47
+ }));
48
+ export const screenShellStructure = createThemedVariants(_theme => ({
49
+ base: {
50
+ flex: 1
51
+ }
52
+ }));
53
+ export function resolveScreenBodyEdges(edges, hasAppBar) {
54
+ if (!hasAppBar) return edges;
55
+ return edges.filter(edge => edge !== "top");
56
+ }
57
+ export function resolveScreenAppBarEdges(edges, hasAppBar) {
58
+ if (!hasAppBar) return [];
59
+ return edges.includes("top") ? ["top"] : [];
60
+ }
43
61
  //# sourceMappingURL=Screen.variants.js.map
@@ -76,6 +76,7 @@ above-field caption; the placeholder carries the only name it has.
76
76
  2. **Per-edge hitSlop elimination** — copied from `ButtonGroup`'s segment-edge fix, applied to the
77
77
  field/clear/cancel trio instead of a segmented row.
78
78
  3. **`bg.sunken` (not `bg.hover`) for a pressed fill** — same reasoning as `Menu`'s pressed row.
79
+ 4. **Clear/cancel presses** — `usePressState` (scale + state-layer overlay) on both affordances.
79
80
 
80
81
  ## Design decisions specific to this module
81
82
 
@@ -18,9 +18,12 @@
18
18
  * `loading` spinner — is `Spinner`'s own, which already honours reduced motion internally.
19
19
  */
20
20
 
21
- import { memo, useCallback, useEffect, useRef, useState } from "react";
21
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
22
22
  import { Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
23
+ import Animated from "react-native-reanimated";
23
24
  import { Icon } from "../../core/icon/index.js";
25
+ import { usePressState } from "../../core/motion/usePressState.js";
26
+ import { floatingBackground, floatingSurfaceStyle } from "../../theme/platform/index.js";
24
27
  import { useTheme } from "../../theme/hooks.js";
25
28
  import { Spinner } from "../spinner/index.js";
26
29
  import { resolveSearchBarAccessibility, resolveSearchBarBorderColor, resolveSearchBarColors, resolveSearchBarFieldHitSlop, resolveSearchBarTrailingHitSlop, SEARCH_BAR_SIZES, searchBarCancelStructure, searchBarClearStructure, searchBarFieldStructure, searchBarRowStructure, shouldShowClear } from "./SearchBar.variants.js";
@@ -29,6 +32,7 @@ const FOCUS_RING_WIDTH = 2;
29
32
  const FOCUS_RING_GAP = 2;
30
33
  const ICON_STROKE = 2;
31
34
  const CLEAR_ACCESSIBILITY_LABEL = "Clear search";
35
+ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
32
36
  export const SearchBar = /*#__PURE__*/memo(function SearchBar({
33
37
  value,
34
38
  onChangeText,
@@ -124,13 +128,24 @@ export const SearchBar = /*#__PURE__*/memo(function SearchBar({
124
128
  const fieldHitSlop = resolveSearchBarFieldHitSlop(size, {
125
129
  trailingAdjacent: clearVisible || showCancelButton
126
130
  });
131
+ const clearPress = usePressState(false);
132
+ const cancelPress = usePressState(false);
133
+ const overlayStaticStyle = {
134
+ backgroundColor: colors.pressedFill,
135
+ borderRadius: theme.radii.full,
136
+ borderCurve: "continuous"
137
+ };
138
+ const floatingFieldStyle = useMemo(() => ({
139
+ backgroundColor: floatingBackground(theme, "sm"),
140
+ ...floatingSurfaceStyle(theme, "sm")
141
+ }), [theme]);
127
142
  return /*#__PURE__*/_jsxs(View, {
128
143
  testID: testID,
129
144
  style: [searchBarRowStructure(theme), style],
130
145
  children: [/*#__PURE__*/_jsxs(View, {
131
146
  style: [searchBarFieldStructure(theme, {
132
147
  size
133
- }), {
148
+ }), floatingFieldStyle, {
134
149
  borderColor: resolveSearchBarBorderColor(colors, focused)
135
150
  }, disabled && styles.dimmed],
136
151
  children: [focused && !disabled && /*#__PURE__*/_jsx(View, {
@@ -144,7 +159,8 @@ export const SearchBar = /*#__PURE__*/memo(function SearchBar({
144
159
  bottom: -(FOCUS_RING_GAP + FOCUS_RING_WIDTH),
145
160
  borderWidth: FOCUS_RING_WIDTH,
146
161
  borderColor: colors.focusBorder,
147
- borderRadius: theme.radii.base + FOCUS_RING_GAP + FOCUS_RING_WIDTH
162
+ borderRadius: theme.radii.md + FOCUS_RING_GAP + FOCUS_RING_WIDTH,
163
+ borderCurve: "continuous"
148
164
  }
149
165
  }), loading ? /*#__PURE__*/_jsx(Spinner, {
150
166
  size: "sm",
@@ -189,53 +205,57 @@ export const SearchBar = /*#__PURE__*/memo(function SearchBar({
189
205
  color: colors.text,
190
206
  padding: 0
191
207
  }, theme.fontStyleForWeight(theme.fontWeights.regular), Platform.OS === "web" && styles.webOutlineReset]
192
- }), clearVisible && /*#__PURE__*/_jsx(Pressable, {
208
+ }), clearVisible && /*#__PURE__*/_jsxs(AnimatedPressable, {
193
209
  testID: testID ? `${testID}-clear` : undefined,
194
210
  accessibilityRole: "button",
195
211
  accessibilityLabel: CLEAR_ACCESSIBILITY_LABEL,
196
212
  onPress: handleClear,
213
+ onPressIn: clearPress.handlers.onPressIn,
214
+ onPressOut: clearPress.handlers.onPressOut,
215
+ onLayout: clearPress.onLayout,
197
216
  hitSlop: resolveSearchBarTrailingHitSlop(size, {
198
217
  outerRight: false
199
218
  }),
200
- style: ({
201
- pressed
202
- }) => [searchBarClearStructure(theme), pressed && {
203
- backgroundColor: colors.pressedFill
204
- }],
205
- children: ({
206
- pressed
207
- }) => /*#__PURE__*/_jsx(Icon, {
219
+ style: [searchBarClearStructure(theme), {
220
+ overflow: "hidden"
221
+ }, clearPress.animatedStyle],
222
+ children: [/*#__PURE__*/_jsx(Animated.View, {
223
+ pointerEvents: "none",
224
+ style: [StyleSheet.absoluteFill, overlayStaticStyle, clearPress.overlayStyle]
225
+ }), /*#__PURE__*/_jsx(Icon, {
208
226
  name: "x",
209
227
  size: spec.iconSize,
210
- color: pressed ? colors.onPressedFill : colors.icon,
228
+ color: clearPress.pressed ? colors.onPressedFill : colors.icon,
211
229
  strokeWidth: ICON_STROKE
212
- })
230
+ })]
213
231
  })]
214
- }), showCancelButton && /*#__PURE__*/_jsx(Pressable, {
232
+ }), showCancelButton && /*#__PURE__*/_jsxs(AnimatedPressable, {
215
233
  testID: testID ? `${testID}-cancel` : undefined,
216
234
  accessibilityRole: "button",
217
235
  accessibilityLabel: cancelLabel,
218
236
  onPress: handleCancel,
237
+ onPressIn: cancelPress.handlers.onPressIn,
238
+ onPressOut: cancelPress.handlers.onPressOut,
239
+ onLayout: cancelPress.onLayout,
219
240
  hitSlop: resolveSearchBarTrailingHitSlop(size, {
220
241
  outerRight: true
221
242
  }),
222
- style: ({
223
- pressed
224
- }) => [searchBarCancelStructure(theme, {
243
+ style: [searchBarCancelStructure(theme, {
225
244
  size
226
- }), pressed && {
227
- backgroundColor: colors.pressedFill
228
- }],
229
- children: ({
230
- pressed
231
- }) => /*#__PURE__*/_jsx(Text, {
245
+ }), {
246
+ overflow: "hidden"
247
+ }, cancelPress.animatedStyle],
248
+ children: [/*#__PURE__*/_jsx(Animated.View, {
249
+ pointerEvents: "none",
250
+ style: [StyleSheet.absoluteFill, overlayStaticStyle, cancelPress.overlayStyle]
251
+ }), /*#__PURE__*/_jsx(Text, {
232
252
  numberOfLines: 1,
233
253
  style: [theme.fontStyleForWeight(theme.fontWeights.medium), {
234
254
  fontSize: spec.fontSize,
235
- color: pressed ? colors.onPressedFill : colors.cancelLabel
255
+ color: cancelPress.pressed ? colors.onPressedFill : colors.cancelLabel
236
256
  }],
237
257
  children: cancelLabel
238
- })
258
+ })]
239
259
  })]
240
260
  });
241
261
  });