@multiplatform.one/components 8.3.0 → 8.4.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 (633) hide show
  1. package/README.md +18 -3
  2. package/dist/cjs/Chip/index.cjs +1 -1
  3. package/dist/cjs/Chip/index.native.js +1 -1
  4. package/dist/cjs/Chip/index.native.js.map +1 -1
  5. package/dist/cjs/Material/blur.native.js +5 -1
  6. package/dist/cjs/Material/blur.native.js.map +1 -1
  7. package/dist/cjs/ScrollView/useRevealFocusedField.native.js +3 -2
  8. package/dist/cjs/ScrollView/useRevealFocusedField.native.js.map +1 -1
  9. package/dist/cjs/SheetModal/index.cjs +10 -1
  10. package/dist/cjs/SheetModal/index.native.js +14 -5
  11. package/dist/cjs/SheetModal/index.native.js.map +1 -1
  12. package/dist/cjs/Tabs/index.cjs +16 -39
  13. package/dist/cjs/Tabs/index.native.js +17 -40
  14. package/dist/cjs/Tabs/index.native.js.map +1 -1
  15. package/dist/cjs/Tooltip/index.native.js +9 -1
  16. package/dist/cjs/Tooltip/index.native.js.map +1 -1
  17. package/dist/cjs/appShell/AppShell.cjs +91 -107
  18. package/dist/cjs/appShell/AppShell.native.js +100 -114
  19. package/dist/cjs/appShell/AppShell.native.js.map +1 -1
  20. package/dist/cjs/appShell/Springboard.cjs +2 -2
  21. package/dist/cjs/appShell/Springboard.native.js +2 -2
  22. package/dist/cjs/appShell/Springboard.native.js.map +1 -1
  23. package/dist/cjs/appShell/SystemBar.cjs +147 -55
  24. package/dist/cjs/appShell/SystemBar.native.js +152 -59
  25. package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
  26. package/dist/cjs/appShell/TabHost.native.js +5 -2
  27. package/dist/cjs/appShell/TabHost.native.js.map +1 -1
  28. package/dist/cjs/appShell/stackBack.cjs +49 -0
  29. package/dist/cjs/appShell/stackBack.native.js +55 -0
  30. package/dist/cjs/appShell/stackBack.native.js.map +1 -0
  31. package/dist/cjs/appShell/systemBarFit.cjs +12 -2
  32. package/dist/cjs/appShell/systemBarFit.native.js +16 -2
  33. package/dist/cjs/appShell/systemBarFit.native.js.map +1 -1
  34. package/dist/cjs/code/CodeBlock/index.cjs +21 -12
  35. package/dist/cjs/code/CodeBlock/index.native.js +21 -12
  36. package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
  37. package/dist/cjs/code/HoldSelect/index.cjs +69 -0
  38. package/dist/cjs/code/HoldSelect/index.native.js +132 -0
  39. package/dist/cjs/code/HoldSelect/index.native.js.map +1 -0
  40. package/dist/cjs/code/HoldSelect/tapGate.cjs +88 -0
  41. package/dist/cjs/code/HoldSelect/tapGate.native.js +95 -0
  42. package/dist/cjs/code/HoldSelect/tapGate.native.js.map +1 -0
  43. package/dist/cjs/code/LogView.cjs +14 -3
  44. package/dist/cjs/code/LogView.native.js +15 -3
  45. package/dist/cjs/code/LogView.native.js.map +1 -1
  46. package/dist/cjs/code/index.cjs +1 -0
  47. package/dist/cjs/code/index.native.js +1 -0
  48. package/dist/cjs/code/index.native.js.map +1 -1
  49. package/dist/cjs/componentColors.cjs +5 -4
  50. package/dist/cjs/componentColors.native.js +5 -4
  51. package/dist/cjs/componentColors.native.js.map +1 -1
  52. package/dist/cjs/layouts/AsyncBoundary.cjs +21 -1
  53. package/dist/cjs/layouts/AsyncBoundary.native.js +21 -1
  54. package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
  55. package/dist/cjs/layouts/asyncFailure.cjs +15 -15
  56. package/dist/cjs/layouts/asyncFailure.native.js +15 -15
  57. package/dist/cjs/layouts/asyncFailure.native.js.map +1 -1
  58. package/dist/cjs/layouts/attachments.cjs +45 -6
  59. package/dist/cjs/layouts/attachments.native.js +47 -6
  60. package/dist/cjs/layouts/attachments.native.js.map +1 -1
  61. package/dist/cjs/layouts/page.cjs +89 -13
  62. package/dist/cjs/layouts/page.native.js +93 -14
  63. package/dist/cjs/layouts/page.native.js.map +1 -1
  64. package/dist/cjs/layouts/screenScroll.cjs +8 -4
  65. package/dist/cjs/layouts/screenScroll.native.js +12 -4
  66. package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
  67. package/dist/cjs/layouts/tags.cjs +2 -1
  68. package/dist/cjs/layouts/tags.native.js +2 -1
  69. package/dist/cjs/layouts/tags.native.js.map +1 -1
  70. package/dist/cjs/views/Dashboard.cjs +18 -5
  71. package/dist/cjs/views/Dashboard.native.js +18 -5
  72. package/dist/cjs/views/Dashboard.native.js.map +1 -1
  73. package/dist/cjs/views/FilePreview.cjs +624 -0
  74. package/dist/cjs/views/FilePreview.native.js +675 -0
  75. package/dist/cjs/views/FilePreview.native.js.map +1 -0
  76. package/dist/cjs/views/ListGroup.cjs +2 -2
  77. package/dist/cjs/views/ListGroup.native.js +2 -2
  78. package/dist/cjs/views/ListGroup.native.js.map +1 -1
  79. package/dist/cjs/views/index.cjs +13 -0
  80. package/dist/cjs/views/index.native.js +13 -0
  81. package/dist/cjs/views/index.native.js.map +1 -1
  82. package/dist/esm/Accordion/index.native.js.map +1 -1
  83. package/dist/esm/AnimateHeight/index.native.js.map +1 -1
  84. package/dist/esm/Avatar/getInitials.native.js.map +1 -1
  85. package/dist/esm/Avatar/index.native.js.map +1 -1
  86. package/dist/esm/Badge/index.native.js.map +1 -1
  87. package/dist/esm/Button.native.js.map +1 -1
  88. package/dist/esm/Carousel/geometry.native.js.map +1 -1
  89. package/dist/esm/Carousel/index.native.js.map +1 -1
  90. package/dist/esm/ChatTurn/index.native.js.map +1 -1
  91. package/dist/esm/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
  92. package/dist/esm/CheckGlyph/index.native.js.map +1 -1
  93. package/dist/esm/Chip/index.mjs +3 -3
  94. package/dist/esm/Chip/index.mjs.map +1 -1
  95. package/dist/esm/Chip/index.native.js +3 -3
  96. package/dist/esm/Chip/index.native.js.map +1 -1
  97. package/dist/esm/ChoiceChips/index.native.js.map +1 -1
  98. package/dist/esm/Collapsible.native.js.map +1 -1
  99. package/dist/esm/ContextMenu/index.native.js.map +1 -1
  100. package/dist/esm/CopyField/CopyMenuButton.native.js.map +1 -1
  101. package/dist/esm/CopyField/index.native.js.map +1 -1
  102. package/dist/esm/Dialog.native.js.map +1 -1
  103. package/dist/esm/Diff/diff.native.js.map +1 -1
  104. package/dist/esm/Diff/index.native.js.map +1 -1
  105. package/dist/esm/DotIndicator/index.native.js.map +1 -1
  106. package/dist/esm/DrillStack/DrillBar.native.js.map +1 -1
  107. package/dist/esm/DrillStack/context.native.js.map +1 -1
  108. package/dist/esm/DrillStack/drillMotion.native.js.map +1 -1
  109. package/dist/esm/DropDownPanel/index.native.js.map +1 -1
  110. package/dist/esm/DropdownMenu/index.native.js.map +1 -1
  111. package/dist/esm/DropdownMenu/menuSettle.native.js.map +1 -1
  112. package/dist/esm/ElapsedProgress/index.native.js.map +1 -1
  113. package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
  114. package/dist/esm/Heading.native.js.map +1 -1
  115. package/dist/esm/Kbd/index.native.js.map +1 -1
  116. package/dist/esm/Kbd/keys.native.js.map +1 -1
  117. package/dist/esm/Lightbox/MediaControl.native.js.map +1 -1
  118. package/dist/esm/Lightbox/index.gnome.native.js.map +1 -1
  119. package/dist/esm/Lightbox/shared.native.js.map +1 -1
  120. package/dist/esm/Lightbox/useLightbox.native.js.map +1 -1
  121. package/dist/esm/MachineLiteral/index.native.js.map +1 -1
  122. package/dist/esm/Material/blur.native.js +5 -1
  123. package/dist/esm/Material/blur.native.js.map +1 -1
  124. package/dist/esm/Material/index.native.js.map +1 -1
  125. package/dist/esm/Meter/index.native.js.map +1 -1
  126. package/dist/esm/Meter/meter.native.js.map +1 -1
  127. package/dist/esm/MiddleEllipsisText/middleSplit.native.js.map +1 -1
  128. package/dist/esm/MiddleEllipsisText/types.native.js.map +1 -1
  129. package/dist/esm/OverflowRow/index.native.js.map +1 -1
  130. package/dist/esm/Pagination.native.js.map +1 -1
  131. package/dist/esm/Popover.native.js.map +1 -1
  132. package/dist/esm/ProgressSteps/index.native.js.map +1 -1
  133. package/dist/esm/Quote/index.native.js.map +1 -1
  134. package/dist/esm/SchemeToggle/index.native.js.map +1 -1
  135. package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
  136. package/dist/esm/ScrollView/useRevealFocusedField.native.js +3 -2
  137. package/dist/esm/ScrollView/useRevealFocusedField.native.js.map +1 -1
  138. package/dist/esm/Separator/index.native.js.map +1 -1
  139. package/dist/esm/Sheet.native.js.map +1 -1
  140. package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
  141. package/dist/esm/SheetModal/SheetNavigation.native.js.map +1 -1
  142. package/dist/esm/SheetModal/detents.native.js.map +1 -1
  143. package/dist/esm/SheetModal/index.mjs +10 -1
  144. package/dist/esm/SheetModal/index.mjs.map +1 -1
  145. package/dist/esm/SheetModal/index.native.js +14 -5
  146. package/dist/esm/SheetModal/index.native.js.map +1 -1
  147. package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
  148. package/dist/esm/SheetScrollView/index.native.js.map +1 -1
  149. package/dist/esm/SheetScrollView/sheetHandoff.native.js.map +1 -1
  150. package/dist/esm/Skeleton/index.native.js.map +1 -1
  151. package/dist/esm/SkipLink/index.native.js.map +1 -1
  152. package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
  153. package/dist/esm/SortableList/index.native.js.map +1 -1
  154. package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
  155. package/dist/esm/SortableList/useUserOrder.native.js.map +1 -1
  156. package/dist/esm/SwipeDismissRow/index.native.js.map +1 -1
  157. package/dist/esm/Tabs/index.mjs +16 -40
  158. package/dist/esm/Tabs/index.mjs.map +1 -1
  159. package/dist/esm/Tabs/index.native.js +17 -41
  160. package/dist/esm/Tabs/index.native.js.map +1 -1
  161. package/dist/esm/Text.native.js.map +1 -1
  162. package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
  163. package/dist/esm/Toast/index.native.js.map +1 -1
  164. package/dist/esm/Toast/store.native.js.map +1 -1
  165. package/dist/esm/Tooltip/index.native.js +10 -2
  166. package/dist/esm/Tooltip/index.native.js.map +1 -1
  167. package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
  168. package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
  169. package/dist/esm/TreeSelect/index.native.js.map +1 -1
  170. package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
  171. package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
  172. package/dist/esm/Video/VideoFrame.native.js.map +1 -1
  173. package/dist/esm/Video/types.native.js.map +1 -1
  174. package/dist/esm/Wheel/index.native.js.map +1 -1
  175. package/dist/esm/Wizard/index.native.js.map +1 -1
  176. package/dist/esm/actions/ActionBar.native.js.map +1 -1
  177. package/dist/esm/actions/DangerSection.native.js.map +1 -1
  178. package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
  179. package/dist/esm/actions/HeaderActions.native.js.map +1 -1
  180. package/dist/esm/actions/StandardAction.native.js.map +1 -1
  181. package/dist/esm/actions/devWarn.native.js.map +1 -1
  182. package/dist/esm/actions/index.native.js.map +1 -1
  183. package/dist/esm/actions/severity.native.js.map +1 -1
  184. package/dist/esm/appShell/AppShell.mjs +91 -107
  185. package/dist/esm/appShell/AppShell.mjs.map +1 -1
  186. package/dist/esm/appShell/AppShell.native.js +100 -114
  187. package/dist/esm/appShell/AppShell.native.js.map +1 -1
  188. package/dist/esm/appShell/BottomChromeClearance.native.js.map +1 -1
  189. package/dist/esm/appShell/Dock.native.js.map +1 -1
  190. package/dist/esm/appShell/MpoTabHost.mjs.map +1 -1
  191. package/dist/esm/appShell/MpoTabHost.native.js.map +1 -1
  192. package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
  193. package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
  194. package/dist/esm/appShell/Springboard.mjs +1 -1
  195. package/dist/esm/appShell/Springboard.mjs.map +1 -1
  196. package/dist/esm/appShell/Springboard.native.js +1 -1
  197. package/dist/esm/appShell/Springboard.native.js.map +1 -1
  198. package/dist/esm/appShell/SystemBar.mjs +147 -58
  199. package/dist/esm/appShell/SystemBar.mjs.map +1 -1
  200. package/dist/esm/appShell/SystemBar.native.js +152 -62
  201. package/dist/esm/appShell/SystemBar.native.js.map +1 -1
  202. package/dist/esm/appShell/TabBar.native.js.map +1 -1
  203. package/dist/esm/appShell/TabHost.native.js +5 -2
  204. package/dist/esm/appShell/TabHost.native.js.map +1 -1
  205. package/dist/esm/appShell/appTile.native.js.map +1 -1
  206. package/dist/esm/appShell/bottomChrome.native.js.map +1 -1
  207. package/dist/esm/appShell/index.native.js.map +1 -1
  208. package/dist/esm/appShell/stackBack.mjs +23 -0
  209. package/dist/esm/appShell/stackBack.mjs.map +1 -0
  210. package/dist/esm/appShell/stackBack.native.js +26 -0
  211. package/dist/esm/appShell/stackBack.native.js.map +1 -0
  212. package/dist/esm/appShell/systemBarFit.mjs +12 -2
  213. package/dist/esm/appShell/systemBarFit.mjs.map +1 -1
  214. package/dist/esm/appShell/systemBarFit.native.js +16 -2
  215. package/dist/esm/appShell/systemBarFit.native.js.map +1 -1
  216. package/dist/esm/charts/Axis.native.js.map +1 -1
  217. package/dist/esm/charts/BarChart.native.js.map +1 -1
  218. package/dist/esm/charts/ChartDataView.native.js.map +1 -1
  219. package/dist/esm/charts/ChartSurface.native.js.map +1 -1
  220. package/dist/esm/charts/LineChart.native.js.map +1 -1
  221. package/dist/esm/charts/PieChart.native.js.map +1 -1
  222. package/dist/esm/charts/Sparkline.native.js.map +1 -1
  223. package/dist/esm/charts/accessibility.native.js.map +1 -1
  224. package/dist/esm/charts/chartHeight.native.js.map +1 -1
  225. package/dist/esm/charts/composeChart.native.js.map +1 -1
  226. package/dist/esm/charts/index.native.js.map +1 -1
  227. package/dist/esm/charts/math.native.js.map +1 -1
  228. package/dist/esm/charts/series.native.js.map +1 -1
  229. package/dist/esm/charts/svg.native.js.map +1 -1
  230. package/dist/esm/charts/types.native.js.map +1 -1
  231. package/dist/esm/charts/useChartTheme.native.js.map +1 -1
  232. package/dist/esm/code/Code/index.native.js.map +1 -1
  233. package/dist/esm/code/CodeBlock/index.mjs +21 -12
  234. package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
  235. package/dist/esm/code/CodeBlock/index.native.js +21 -12
  236. package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
  237. package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
  238. package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
  239. package/dist/esm/code/Highlighter/index.native.js.map +1 -1
  240. package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
  241. package/dist/esm/code/HoldSelect/index.mjs +42 -0
  242. package/dist/esm/code/HoldSelect/index.mjs.map +1 -0
  243. package/dist/esm/code/HoldSelect/index.native.js +102 -0
  244. package/dist/esm/code/HoldSelect/index.native.js.map +1 -0
  245. package/dist/esm/code/HoldSelect/tapGate.mjs +61 -0
  246. package/dist/esm/code/HoldSelect/tapGate.mjs.map +1 -0
  247. package/dist/esm/code/HoldSelect/tapGate.native.js +65 -0
  248. package/dist/esm/code/HoldSelect/tapGate.native.js.map +1 -0
  249. package/dist/esm/code/LogView.mjs +13 -3
  250. package/dist/esm/code/LogView.mjs.map +1 -1
  251. package/dist/esm/code/LogView.native.js +14 -3
  252. package/dist/esm/code/LogView.native.js.map +1 -1
  253. package/dist/esm/code/PayloadView/index.native.js.map +1 -1
  254. package/dist/esm/code/PayloadView/payloadModel.native.js.map +1 -1
  255. package/dist/esm/code/Pre/index.native.js.map +1 -1
  256. package/dist/esm/code/index.mjs +1 -0
  257. package/dist/esm/code/index.mjs.map +1 -1
  258. package/dist/esm/code/index.native.js +1 -0
  259. package/dist/esm/code/index.native.js.map +1 -1
  260. package/dist/esm/componentColors.mjs +5 -4
  261. package/dist/esm/componentColors.mjs.map +1 -1
  262. package/dist/esm/componentColors.native.js +5 -4
  263. package/dist/esm/componentColors.native.js.map +1 -1
  264. package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
  265. package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
  266. package/dist/esm/feedback/copy.native.js.map +1 -1
  267. package/dist/esm/feedback/index.native.js.map +1 -1
  268. package/dist/esm/feedback/notify.native.js.map +1 -1
  269. package/dist/esm/feedback/route.native.js.map +1 -1
  270. package/dist/esm/feedback/store.native.js.map +1 -1
  271. package/dist/esm/formLayouts/FormLayouts.native.js.map +1 -1
  272. package/dist/esm/formLayouts/PreferencePanel.native.js.map +1 -1
  273. package/dist/esm/formLayouts/index.native.js.map +1 -1
  274. package/dist/esm/hooks/index.native.js.map +1 -1
  275. package/dist/esm/hooks/useClipboard.native.js.map +1 -1
  276. package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
  277. package/dist/esm/icons/CheckRegular.native.js.map +1 -1
  278. package/dist/esm/icons/MinusRegular.native.js.map +1 -1
  279. package/dist/esm/icons/index.native.js.map +1 -1
  280. package/dist/esm/icons/lucide.native.js.map +1 -1
  281. package/dist/esm/icons/themed.native.js.map +1 -1
  282. package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
  283. package/dist/esm/images/Image/framing.native.js.map +1 -1
  284. package/dist/esm/images/Image/mediaRadius.native.js.map +1 -1
  285. package/dist/esm/images/Image/shared.native.js.map +1 -1
  286. package/dist/esm/images/Image/types.native.js.map +1 -1
  287. package/dist/esm/images/RemoteArt/remoteArtCache.native.js.map +1 -1
  288. package/dist/esm/images/RemoteArt/svgMarkup.native.js.map +1 -1
  289. package/dist/esm/images/RemoteArt/types.native.js.map +1 -1
  290. package/dist/esm/images/index.native.js.map +1 -1
  291. package/dist/esm/index.gnome.native.js.map +1 -1
  292. package/dist/esm/index.native.js.map +1 -1
  293. package/dist/esm/knobImmuneExports.native.js.map +1 -1
  294. package/dist/esm/layouts/AsyncBoundary.mjs +22 -2
  295. package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
  296. package/dist/esm/layouts/AsyncBoundary.native.js +22 -2
  297. package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
  298. package/dist/esm/layouts/Debug/index.native.js.map +1 -1
  299. package/dist/esm/layouts/EmptyState.native.js.map +1 -1
  300. package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
  301. package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  302. package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
  303. package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
  304. package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  305. package/dist/esm/layouts/StatusDot.native.js.map +1 -1
  306. package/dist/esm/layouts/StatusGlyphStrip.native.js.map +1 -1
  307. package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
  308. package/dist/esm/layouts/asyncFailure.mjs +15 -15
  309. package/dist/esm/layouts/asyncFailure.mjs.map +1 -1
  310. package/dist/esm/layouts/asyncFailure.native.js +15 -15
  311. package/dist/esm/layouts/asyncFailure.native.js.map +1 -1
  312. package/dist/esm/layouts/attachments.mjs +45 -6
  313. package/dist/esm/layouts/attachments.mjs.map +1 -1
  314. package/dist/esm/layouts/attachments.native.js +47 -6
  315. package/dist/esm/layouts/attachments.native.js.map +1 -1
  316. package/dist/esm/layouts/barTitleSpan.native.js.map +1 -1
  317. package/dist/esm/layouts/bottomAccessory.native.js.map +1 -1
  318. package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
  319. package/dist/esm/layouts/index.native.js.map +1 -1
  320. package/dist/esm/layouts/page.mjs +94 -18
  321. package/dist/esm/layouts/page.mjs.map +1 -1
  322. package/dist/esm/layouts/page.native.js +96 -17
  323. package/dist/esm/layouts/page.native.js.map +1 -1
  324. package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
  325. package/dist/esm/layouts/screenScroll.mjs +8 -4
  326. package/dist/esm/layouts/screenScroll.mjs.map +1 -1
  327. package/dist/esm/layouts/screenScroll.native.js +12 -4
  328. package/dist/esm/layouts/screenScroll.native.js.map +1 -1
  329. package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
  330. package/dist/esm/layouts/sidebar.native.js.map +1 -1
  331. package/dist/esm/layouts/tags.mjs +2 -1
  332. package/dist/esm/layouts/tags.mjs.map +1 -1
  333. package/dist/esm/layouts/tags.native.js +2 -1
  334. package/dist/esm/layouts/tags.native.js.map +1 -1
  335. package/dist/esm/layouts/timeline.native.js.map +1 -1
  336. package/dist/esm/layouts/toolbar.native.js.map +1 -1
  337. package/dist/esm/shared/actionScan.native.js.map +1 -1
  338. package/dist/esm/shared/i18n.native.js.map +1 -1
  339. package/dist/esm/shared/restoreRetries.native.js.map +1 -1
  340. package/dist/esm/shared/t.native.js.map +1 -1
  341. package/dist/esm/shared/textRidesText.native.js.map +1 -1
  342. package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
  343. package/dist/esm/surfaces.native.js.map +1 -1
  344. package/dist/esm/tamagui.native.js.map +1 -1
  345. package/dist/esm/testSetup.native.js.map +1 -1
  346. package/dist/esm/utils/unwrapText.native.js.map +1 -1
  347. package/dist/esm/views/Calendar.native.js.map +1 -1
  348. package/dist/esm/views/CardGrid.native.js.map +1 -1
  349. package/dist/esm/views/Dashboard.mjs +19 -6
  350. package/dist/esm/views/Dashboard.mjs.map +1 -1
  351. package/dist/esm/views/Dashboard.native.js +19 -6
  352. package/dist/esm/views/Dashboard.native.js.map +1 -1
  353. package/dist/esm/views/FilePreview.mjs +588 -0
  354. package/dist/esm/views/FilePreview.mjs.map +1 -0
  355. package/dist/esm/views/FilePreview.native.js +636 -0
  356. package/dist/esm/views/FilePreview.native.js.map +1 -0
  357. package/dist/esm/views/Gantt.native.js.map +1 -1
  358. package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
  359. package/dist/esm/views/ImageGrid.native.js.map +1 -1
  360. package/dist/esm/views/List.native.js.map +1 -1
  361. package/dist/esm/views/ListGroup.mjs +1 -1
  362. package/dist/esm/views/ListGroup.native.js +1 -1
  363. package/dist/esm/views/ListGroup.native.js.map +1 -1
  364. package/dist/esm/views/ListRow.native.js.map +1 -1
  365. package/dist/esm/views/Matrix.native.js.map +1 -1
  366. package/dist/esm/views/ReportBuilder.native.js.map +1 -1
  367. package/dist/esm/views/ShortcutCard.native.js.map +1 -1
  368. package/dist/esm/views/TreeView.native.js.map +1 -1
  369. package/dist/esm/views/calendarMath.native.js.map +1 -1
  370. package/dist/esm/views/ganttIntervals.native.js.map +1 -1
  371. package/dist/esm/views/ganttMath.native.js.map +1 -1
  372. package/dist/esm/views/index.mjs +2 -1
  373. package/dist/esm/views/index.mjs.map +1 -1
  374. package/dist/esm/views/index.native.js +2 -1
  375. package/dist/esm/views/index.native.js.map +1 -1
  376. package/dist/esm/views/kanbanDnd.native.js.map +1 -1
  377. package/dist/esm/views/matrixMath.native.js.map +1 -1
  378. package/dist/esm/views/sameNameScope.native.js.map +1 -1
  379. package/dist/esm/views/treeViewDnd.native.js.map +1 -1
  380. package/dist/esm/views/treeViewLayout.native.js.map +1 -1
  381. package/dist/esm/views/treeViewMotion.native.js.map +1 -1
  382. package/dist/esm/views/treeViewReveal.native.js.map +1 -1
  383. package/dist/esm/views/usePageFlowLoadMore.native.js.map +1 -1
  384. package/dist/esm/views/widgetChrome.native.js.map +1 -1
  385. package/dist/jsx/Chip/index.mjs +3 -3
  386. package/dist/jsx/Chip/index.mjs.map +1 -1
  387. package/dist/jsx/Chip/index.native.js +1 -1
  388. package/dist/jsx/Chip/index.native.js.map +1 -1
  389. package/dist/jsx/Material/blur.native.js +5 -1
  390. package/dist/jsx/Material/blur.native.js.map +1 -1
  391. package/dist/jsx/ScrollView/useRevealFocusedField.native.js +3 -2
  392. package/dist/jsx/ScrollView/useRevealFocusedField.native.js.map +1 -1
  393. package/dist/jsx/SheetModal/index.mjs +10 -1
  394. package/dist/jsx/SheetModal/index.mjs.map +1 -1
  395. package/dist/jsx/SheetModal/index.native.js +14 -5
  396. package/dist/jsx/SheetModal/index.native.js.map +1 -1
  397. package/dist/jsx/Tabs/index.mjs +16 -40
  398. package/dist/jsx/Tabs/index.mjs.map +1 -1
  399. package/dist/jsx/Tabs/index.native.js +17 -40
  400. package/dist/jsx/Tabs/index.native.js.map +1 -1
  401. package/dist/jsx/Tooltip/index.native.js +9 -1
  402. package/dist/jsx/Tooltip/index.native.js.map +1 -1
  403. package/dist/jsx/appShell/AppShell.mjs +91 -107
  404. package/dist/jsx/appShell/AppShell.mjs.map +1 -1
  405. package/dist/jsx/appShell/AppShell.native.js +100 -114
  406. package/dist/jsx/appShell/AppShell.native.js.map +1 -1
  407. package/dist/jsx/appShell/MpoTabHost.mjs.map +1 -1
  408. package/dist/jsx/appShell/MpoTabHost.native.js.map +1 -1
  409. package/dist/jsx/appShell/Springboard.mjs +1 -1
  410. package/dist/jsx/appShell/Springboard.mjs.map +1 -1
  411. package/dist/jsx/appShell/Springboard.native.js +2 -2
  412. package/dist/jsx/appShell/Springboard.native.js.map +1 -1
  413. package/dist/jsx/appShell/SystemBar.mjs +147 -58
  414. package/dist/jsx/appShell/SystemBar.mjs.map +1 -1
  415. package/dist/jsx/appShell/SystemBar.native.js +152 -59
  416. package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
  417. package/dist/jsx/appShell/TabHost.native.js +5 -2
  418. package/dist/jsx/appShell/TabHost.native.js.map +1 -1
  419. package/dist/jsx/appShell/stackBack.mjs +23 -0
  420. package/dist/jsx/appShell/stackBack.mjs.map +1 -0
  421. package/dist/jsx/appShell/stackBack.native.js +55 -0
  422. package/dist/jsx/appShell/stackBack.native.js.map +1 -0
  423. package/dist/jsx/appShell/systemBarFit.mjs +12 -2
  424. package/dist/jsx/appShell/systemBarFit.mjs.map +1 -1
  425. package/dist/jsx/appShell/systemBarFit.native.js +16 -2
  426. package/dist/jsx/appShell/systemBarFit.native.js.map +1 -1
  427. package/dist/jsx/code/CodeBlock/index.mjs +21 -12
  428. package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
  429. package/dist/jsx/code/CodeBlock/index.native.js +21 -12
  430. package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
  431. package/dist/jsx/code/HoldSelect/index.mjs +42 -0
  432. package/dist/jsx/code/HoldSelect/index.mjs.map +1 -0
  433. package/dist/jsx/code/HoldSelect/index.native.js +132 -0
  434. package/dist/jsx/code/HoldSelect/index.native.js.map +1 -0
  435. package/dist/jsx/code/HoldSelect/tapGate.mjs +61 -0
  436. package/dist/jsx/code/HoldSelect/tapGate.mjs.map +1 -0
  437. package/dist/jsx/code/HoldSelect/tapGate.native.js +95 -0
  438. package/dist/jsx/code/HoldSelect/tapGate.native.js.map +1 -0
  439. package/dist/jsx/code/LogView.mjs +13 -3
  440. package/dist/jsx/code/LogView.mjs.map +1 -1
  441. package/dist/jsx/code/LogView.native.js +15 -3
  442. package/dist/jsx/code/LogView.native.js.map +1 -1
  443. package/dist/jsx/code/index.mjs +1 -0
  444. package/dist/jsx/code/index.mjs.map +1 -1
  445. package/dist/jsx/code/index.native.js +1 -0
  446. package/dist/jsx/code/index.native.js.map +1 -1
  447. package/dist/jsx/componentColors.mjs +5 -4
  448. package/dist/jsx/componentColors.mjs.map +1 -1
  449. package/dist/jsx/componentColors.native.js +5 -4
  450. package/dist/jsx/componentColors.native.js.map +1 -1
  451. package/dist/jsx/layouts/AsyncBoundary.mjs +22 -2
  452. package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
  453. package/dist/jsx/layouts/AsyncBoundary.native.js +21 -1
  454. package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
  455. package/dist/jsx/layouts/asyncFailure.mjs +15 -15
  456. package/dist/jsx/layouts/asyncFailure.mjs.map +1 -1
  457. package/dist/jsx/layouts/asyncFailure.native.js +15 -15
  458. package/dist/jsx/layouts/asyncFailure.native.js.map +1 -1
  459. package/dist/jsx/layouts/attachments.mjs +45 -6
  460. package/dist/jsx/layouts/attachments.mjs.map +1 -1
  461. package/dist/jsx/layouts/attachments.native.js +47 -6
  462. package/dist/jsx/layouts/attachments.native.js.map +1 -1
  463. package/dist/jsx/layouts/page.mjs +94 -18
  464. package/dist/jsx/layouts/page.mjs.map +1 -1
  465. package/dist/jsx/layouts/page.native.js +93 -14
  466. package/dist/jsx/layouts/page.native.js.map +1 -1
  467. package/dist/jsx/layouts/screenScroll.mjs +8 -4
  468. package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
  469. package/dist/jsx/layouts/screenScroll.native.js +12 -4
  470. package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
  471. package/dist/jsx/layouts/tags.mjs +2 -1
  472. package/dist/jsx/layouts/tags.mjs.map +1 -1
  473. package/dist/jsx/layouts/tags.native.js +2 -1
  474. package/dist/jsx/layouts/tags.native.js.map +1 -1
  475. package/dist/jsx/views/Dashboard.mjs +19 -6
  476. package/dist/jsx/views/Dashboard.mjs.map +1 -1
  477. package/dist/jsx/views/Dashboard.native.js +18 -5
  478. package/dist/jsx/views/Dashboard.native.js.map +1 -1
  479. package/dist/jsx/views/FilePreview.mjs +588 -0
  480. package/dist/jsx/views/FilePreview.mjs.map +1 -0
  481. package/dist/jsx/views/FilePreview.native.js +675 -0
  482. package/dist/jsx/views/FilePreview.native.js.map +1 -0
  483. package/dist/jsx/views/ListGroup.mjs +1 -1
  484. package/dist/jsx/views/ListGroup.native.js +2 -2
  485. package/dist/jsx/views/ListGroup.native.js.map +1 -1
  486. package/dist/jsx/views/index.mjs +2 -1
  487. package/dist/jsx/views/index.mjs.map +1 -1
  488. package/dist/jsx/views/index.native.js +13 -0
  489. package/dist/jsx/views/index.native.js.map +1 -1
  490. package/package.json +8 -11
  491. package/src/Chip/index.tsx +4 -3
  492. package/src/Material/blur.native.tsx +7 -1
  493. package/src/OverflowRow/OverflowRow.native.spec.tsx +10 -0
  494. package/src/OverflowRow/OverflowRow.stories.tsx +46 -17
  495. package/src/ScrollView/useRevealFocusedField.native.ts +2 -2
  496. package/src/SheetModal/SheetModal.elevation.spec.tsx +4 -4
  497. package/src/SheetModal/SheetModal.fill.spec.tsx +47 -0
  498. package/src/SheetModal/index.native.tsx +11 -3
  499. package/src/SheetModal/index.tsx +8 -0
  500. package/src/Tabs/Tabs.edgeFades.spec.tsx +77 -0
  501. package/src/Tabs/Tabs.fades.native.spec.tsx +23 -21
  502. package/src/Tabs/Tabs.measurement.spec.tsx +3 -3
  503. package/src/Tabs/Tabs.native.spec.tsx +1 -1
  504. package/src/Tabs/index.tsx +29 -50
  505. package/src/Tooltip/Tooltip.holdCue.native.spec.tsx +71 -0
  506. package/src/Tooltip/Tooltip.spec.tsx +1 -1
  507. package/src/Tooltip/index.native.tsx +6 -1
  508. package/src/appShell/AppShell.native.spec.tsx +104 -0
  509. package/src/appShell/AppShell.spec.tsx +49 -0
  510. package/src/appShell/AppShell.stackBack.native-press.spec.tsx +61 -0
  511. package/src/appShell/AppShell.stackBack.spec.tsx +112 -0
  512. package/src/appShell/AppShell.stories.tsx +51 -1
  513. package/src/appShell/AppShell.tsx +66 -80
  514. package/src/appShell/MpoTabHost.tsx +6 -0
  515. package/src/appShell/Springboard.spec.tsx +1 -1
  516. package/src/appShell/Springboard.tsx +1 -1
  517. package/src/appShell/SystemBar.phoneWidth.spec.tsx +17 -0
  518. package/src/appShell/SystemBar.spec.tsx +155 -3
  519. package/src/appShell/SystemBar.stories.tsx +48 -3
  520. package/src/appShell/SystemBar.tsx +172 -48
  521. package/src/appShell/TabHost.native.tsx +4 -2
  522. package/src/appShell/stackBack.ts +31 -0
  523. package/src/appShell/systemBarFit.ts +10 -7
  524. package/src/checkedRow.native-press.spec.tsx +4 -4
  525. package/src/checkedRow.spec.tsx +2 -2
  526. package/src/code/CodeBlock/codeBlock.stories.ts +21 -0
  527. package/src/code/CodeBlock/index.tsx +24 -17
  528. package/src/code/HoldSelect/holdSelect.spec.tsx +128 -0
  529. package/src/code/HoldSelect/index.native.tsx +86 -0
  530. package/src/code/HoldSelect/index.tsx +53 -0
  531. package/src/code/HoldSelect/tapGate.ts +87 -0
  532. package/src/code/LogView.follow.spec.tsx +104 -0
  533. package/src/code/LogView.tsx +29 -4
  534. package/src/code/index.ts +1 -0
  535. package/src/componentColors.spec.ts +3 -3
  536. package/src/componentColors.ts +5 -4
  537. package/src/elevatedGround.spec.tsx +7 -7
  538. package/src/layouts/AsyncBoundary.reason.spec.tsx +64 -23
  539. package/src/layouts/AsyncBoundary.stories.tsx +1 -0
  540. package/src/layouts/AsyncBoundary.tsx +21 -2
  541. package/src/layouts/Attachments.stories.tsx +31 -1
  542. package/src/layouts/ScreenToolbar.stories.tsx +54 -1
  543. package/src/layouts/Sidebar.spec.tsx +6 -1
  544. package/src/layouts/asyncFailure.spec.ts +28 -13
  545. package/src/layouts/asyncFailure.ts +17 -19
  546. package/src/layouts/attachments.tsx +60 -8
  547. package/src/layouts/heroBarTitle.native-press.spec.tsx +132 -0
  548. package/src/layouts/page.tsx +136 -16
  549. package/src/layouts/screenScroll.tsx +21 -14
  550. package/src/layouts/tags.tsx +2 -1
  551. package/src/layouts/toolbarLeadingClip.spec.tsx +120 -0
  552. package/src/overlayElevation.spec.tsx +1 -1
  553. package/src/overlayGround.spec.tsx +77 -0
  554. package/src/views/Dashboard.stories.tsx +21 -0
  555. package/src/views/Dashboard.tsx +34 -7
  556. package/src/views/FilePreview.tsx +640 -0
  557. package/src/views/Kanban.spec.tsx +6 -1
  558. package/src/views/List.selection.spec.tsx +42 -0
  559. package/src/views/List.spec.tsx +1 -26
  560. package/src/views/ListGroup.states.spec.tsx +1 -1
  561. package/src/views/ListGroup.stories.tsx +119 -2
  562. package/src/views/ListGroup.tsx +1 -1
  563. package/src/views/ReportBuilder.spec.tsx +9 -4
  564. package/src/views/TreeView.spec.tsx +6 -1
  565. package/src/views/dataIdentity.spec.tsx +5 -0
  566. package/src/views/filePreview.spec.tsx +282 -0
  567. package/src/views/index.ts +17 -0
  568. package/src/views/kpiNotMeasured.spec.tsx +56 -0
  569. package/types/Chip/index.d.ts.map +1 -1
  570. package/types/Material/blur.native.d.ts.map +1 -1
  571. package/types/SheetModal/index.d.ts +6 -1
  572. package/types/SheetModal/index.d.ts.map +1 -1
  573. package/types/SheetModal/index.native.d.ts +1 -1
  574. package/types/SheetModal/index.native.d.ts.map +1 -1
  575. package/types/Tabs/index.d.ts +2 -1
  576. package/types/Tabs/index.d.ts.map +1 -1
  577. package/types/Tooltip/index.native.d.ts.map +1 -1
  578. package/types/appShell/AppShell.d.ts +5 -1
  579. package/types/appShell/AppShell.d.ts.map +1 -1
  580. package/types/appShell/MpoTabHost.d.ts +6 -0
  581. package/types/appShell/MpoTabHost.d.ts.map +1 -1
  582. package/types/appShell/Springboard.d.ts.map +1 -1
  583. package/types/appShell/SystemBar.d.ts +39 -2
  584. package/types/appShell/SystemBar.d.ts.map +1 -1
  585. package/types/appShell/TabHost.native.d.ts +1 -1
  586. package/types/appShell/TabHost.native.d.ts.map +1 -1
  587. package/types/appShell/stackBack.d.ts +3 -0
  588. package/types/appShell/stackBack.d.ts.map +1 -0
  589. package/types/appShell/systemBarFit.d.ts +1 -0
  590. package/types/appShell/systemBarFit.d.ts.map +1 -1
  591. package/types/code/CodeBlock/index.d.ts +3 -1
  592. package/types/code/CodeBlock/index.d.ts.map +1 -1
  593. package/types/code/HoldSelect/index.d.ts +16 -0
  594. package/types/code/HoldSelect/index.d.ts.map +1 -0
  595. package/types/code/HoldSelect/index.native.d.ts +17 -0
  596. package/types/code/HoldSelect/index.native.d.ts.map +1 -0
  597. package/types/code/HoldSelect/tapGate.d.ts +41 -0
  598. package/types/code/HoldSelect/tapGate.d.ts.map +1 -0
  599. package/types/code/LogView.d.ts +3 -1
  600. package/types/code/LogView.d.ts.map +1 -1
  601. package/types/code/index.d.ts +1 -0
  602. package/types/code/index.d.ts.map +1 -1
  603. package/types/componentColors.d.ts +4 -4
  604. package/types/componentColors.d.ts.map +1 -1
  605. package/types/layouts/AsyncBoundary.d.ts +3 -1
  606. package/types/layouts/AsyncBoundary.d.ts.map +1 -1
  607. package/types/layouts/asyncFailure.d.ts +4 -1
  608. package/types/layouts/asyncFailure.d.ts.map +1 -1
  609. package/types/layouts/attachments.d.ts.map +1 -1
  610. package/types/layouts/page.d.ts.map +1 -1
  611. package/types/layouts/screenScroll.d.ts +4 -2
  612. package/types/layouts/screenScroll.d.ts.map +1 -1
  613. package/types/layouts/tags.d.ts.map +1 -1
  614. package/types/views/Dashboard.d.ts +7 -1
  615. package/types/views/Dashboard.d.ts.map +1 -1
  616. package/types/views/FilePreview.d.ts +62 -0
  617. package/types/views/FilePreview.d.ts.map +1 -0
  618. package/types/views/index.d.ts +1 -0
  619. package/types/views/index.d.ts.map +1 -1
  620. package/dist/cjs/hooks/useHoldCue.cjs +0 -52
  621. package/dist/cjs/hooks/useHoldCue.native.js +0 -60
  622. package/dist/cjs/hooks/useHoldCue.native.js.map +0 -1
  623. package/dist/esm/hooks/useHoldCue.mjs +0 -26
  624. package/dist/esm/hooks/useHoldCue.mjs.map +0 -1
  625. package/dist/esm/hooks/useHoldCue.native.js +0 -31
  626. package/dist/esm/hooks/useHoldCue.native.js.map +0 -1
  627. package/dist/jsx/hooks/useHoldCue.mjs +0 -26
  628. package/dist/jsx/hooks/useHoldCue.mjs.map +0 -1
  629. package/dist/jsx/hooks/useHoldCue.native.js +0 -60
  630. package/dist/jsx/hooks/useHoldCue.native.js.map +0 -1
  631. package/src/hooks/useHoldCue.ts +0 -23
  632. package/types/hooks/useHoldCue.d.ts +0 -8
  633. package/types/hooks/useHoldCue.d.ts.map +0 -1
@@ -98,13 +98,20 @@ export function SheetModal({
98
98
  snapPoint,
99
99
  scrollable,
100
100
  fill = false,
101
+ flush = false,
101
102
  }: SheetModalProps) {
102
- const header =
103
+ const { t } = useTranslation();
104
+ const { knobProps } = useResolvedKnobs();
105
+ const sheetHeader =
103
106
  headerContent || headerActions ? (
104
107
  <SheetHeader header={headerContent} actions={headerActions} />
105
108
  ) : null;
106
- const { t } = useTranslation();
107
- const { knobProps } = useResolvedKnobs();
109
+ const header =
110
+ sheetHeader && flush ? (
111
+ <YStack paddingHorizontal={knobProps.panelPadding.padding}>{sheetHeader}</YStack>
112
+ ) : (
113
+ sheetHeader
114
+ );
108
115
  const windowZIndex = useOverlayZIndex("sheet");
109
116
  const slideTransition = knobProps.motion.slide.transition;
110
117
  const slideDuration = motionDurationMs(slideTransition);
@@ -513,6 +520,7 @@ export function SheetModal({
513
520
  <YStack
514
521
  testID="sheet-modal-content"
515
522
  padding={knobProps.panelPadding.padding}
523
+ {...(flush ? { paddingHorizontal: 0, paddingBottom: 0 } : null)}
516
524
  gap={knobProps.gap.gap}
517
525
  flexShrink={1}
518
526
  {...(fill ? fillSlot : null)}
@@ -62,6 +62,11 @@ export interface SheetModalProps {
62
62
  * then mounts nothing. Off by default, so existing sheets are unchanged.
63
63
  */
64
64
  fill?: boolean;
65
+ /**
66
+ * The body runs to the frame's side and bottom edges, as a document viewer
67
+ * does (Quick Look, Files); the header keeps the panel inset.
68
+ */
69
+ flush?: boolean;
65
70
  }
66
71
 
67
72
  const IN_DIALOG_REGION = { inDialogRegion: true } as const;
@@ -146,6 +151,7 @@ export function SheetModal({
146
151
  snapPoint,
147
152
  scrollable,
148
153
  fill = false,
154
+ flush = false,
149
155
  }: SheetModalProps) {
150
156
  const titleId = useId();
151
157
  const overlayHeader = isOverlayHeader(headerContent);
@@ -198,6 +204,7 @@ export function SheetModal({
198
204
  "data-sheet-form": regular ? "panel" : "bottom",
199
205
  } as Record<string, unknown>)}
200
206
  {...knobProps.gap}
207
+ {...(flush ? { paddingHorizontal: 0, paddingBottom: 0, gap: 0 } : null)}
201
208
  {...(snap.snapPointsMode === "fit"
202
209
  ? { maxHeight: Math.round(windowHeight * largeDetentRatio) }
203
210
  : null)}
@@ -219,6 +226,7 @@ export function SheetModal({
219
226
  <View
220
227
  id={overlayHeader || headerActions ? undefined : titleId}
221
228
  {...(fill ? nonShrinking : null)}
229
+ {...(flush ? { paddingHorizontal: knobProps.panelPadding.padding } : null)}
222
230
  >
223
231
  <OverlayTitleIdContext.Provider value={overlayHeader ? titleId : undefined}>
224
232
  {header}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * LC-120 on the web Tabs strip (FZ-8080). The strip's ends fade through the
3
+ * house LinearGradient in the strip's own surface, the same fade native draws,
4
+ * never a CSS mask on the scroller.
5
+ */
6
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
7
+ import { getRgba } from "@tamagui/core";
8
+ import { act, cleanup } from "@testing-library/react";
9
+ import { createElement, forwardRef, useImperativeHandle } from "react";
10
+ import { useTheme } from "tamagui";
11
+ import { afterEach, describe, expect, it, vi } from "vitest";
12
+ import { Tabs } from "./index";
13
+
14
+ const web = vi.hoisted(() => ({ scroll: undefined as Record<string, any> | undefined }));
15
+
16
+ vi.mock("tamagui/linear-gradient", () => ({
17
+ LinearGradient: (props: Record<string, unknown>) =>
18
+ createElement("span", { "data-colors": JSON.stringify(props.colors) }),
19
+ }));
20
+
21
+ vi.mock("../ScrollView", async () => {
22
+ const React = await import("react");
23
+ return {
24
+ ScrollView: forwardRef(function WebScroll(props: Record<string, any>, ref) {
25
+ web.scroll = props;
26
+ useImperativeHandle(ref, () => ({ scrollTo() {} }), []);
27
+ return React.createElement("div", { "data-tabs-scroll": "true" }, props.children);
28
+ }),
29
+ };
30
+ });
31
+
32
+ afterEach(() => {
33
+ cleanup();
34
+ web.scroll = undefined;
35
+ });
36
+
37
+ const items = Array.from({ length: 9 }, (_, i) => ({ value: `t${i}`, label: `Section ${i}` }));
38
+ const seen = { background: "" };
39
+
40
+ function Probe() {
41
+ seen.background = String(useTheme().background?.val);
42
+ return null;
43
+ }
44
+
45
+ function settle(viewport: number, content: number) {
46
+ act(() => web.scroll!.onLayout({ nativeEvent: { layout: { width: viewport, height: 44 } } }));
47
+ act(() => web.scroll!.onContentSizeChange(content, 44));
48
+ }
49
+
50
+ function colors(side: "left" | "right"): string[] | undefined {
51
+ const node = document.querySelector(`[data-tabs-fade="${side}"] [data-colors]`);
52
+ return node ? JSON.parse(node.getAttribute("data-colors")!) : undefined;
53
+ }
54
+
55
+ describe("web Tabs overflow fades (LC-120, FZ-8080)", () => {
56
+ it("paints no CSS mask on the scroller", () => {
57
+ renderWithProviders(<Tabs items={items} />);
58
+ settle(390, 900);
59
+ const style = (web.scroll!.style ?? {}) as Record<string, unknown>;
60
+ expect(style.maskImage).toBeUndefined();
61
+ expect(style.WebkitMaskImage).toBeUndefined();
62
+ });
63
+
64
+ it("lays the strip's surface over the end it can scroll toward", () => {
65
+ renderWithProviders(
66
+ <>
67
+ <Probe />
68
+ <Tabs items={items} />
69
+ </>,
70
+ );
71
+ settle(390, 900);
72
+ const surface = seen.background;
73
+ const rgba = getRgba(surface)!;
74
+ expect(colors("left")).toBeUndefined();
75
+ expect(colors("right")).toEqual([`rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)`, surface]);
76
+ });
77
+ });
@@ -1,13 +1,14 @@
1
1
  /**
2
- * LC-120 on the native Tabs strip (FZ-7831). Web fades the strip's ends with a
3
- * CSS mask; native has no mask, so the strip lays a gradient of its own
4
- * surface over each end it can scroll toward. These cases drive the native
2
+ * LC-120 on the native Tabs strip (FZ-7831). The strip lays a gradient of its
3
+ * own surface over each end it can scroll toward, the same LinearGradient web
4
+ * draws (FZ-8080). These cases drive the native
5
5
  * scroll callbacks (layout, content size, scroll) the way React Native fires
6
6
  * them on iOS and Android, LTR and RTL.
7
7
  */
8
8
  import { renderWithProviders } from "@multiplatform.one/test-utils";
9
9
  import { act, cleanup } from "@testing-library/react";
10
- import { forwardRef, useImperativeHandle } from "react";
10
+ import { getRgba } from "@tamagui/core";
11
+ import { createElement, forwardRef, useImperativeHandle } from "react";
11
12
  import { Theme, useTheme } from "tamagui";
12
13
  import { afterEach, describe, expect, it, vi } from "vitest";
13
14
  import { TABS_EDGE_FADE, Tabs, tabsFadeEdge, type TabsProps } from "./index";
@@ -37,6 +38,11 @@ vi.mock("react-native-web", async (importOriginal) => {
37
38
  };
38
39
  });
39
40
 
41
+ vi.mock("tamagui/linear-gradient", () => ({
42
+ LinearGradient: (props: Record<string, unknown>) =>
43
+ createElement("span", { "data-colors": JSON.stringify(props.colors) }),
44
+ }));
45
+
40
46
  vi.mock("../hooks/useDirection", () => ({ useDirection: () => native.direction }));
41
47
 
42
48
  vi.mock("../ScrollView", async () => {
@@ -93,12 +99,14 @@ function shown() {
93
99
  return { left: Boolean(fade("left")), right: Boolean(fade("right")) };
94
100
  }
95
101
 
96
- /** [colour, opacity] at the gradient's physical left and right. */
97
- function stops(side: "left" | "right") {
98
- return Array.from(fade(side)!.querySelectorAll("stop")).map((stop) => [
99
- stop.getAttribute("stop-color"),
100
- stop.getAttribute("stop-opacity"),
101
- ]);
102
+ /** The gradient's colours from its physical left to its physical right. */
103
+ function colors(side: "left" | "right"): string[] {
104
+ return JSON.parse(fade(side)!.querySelector("[data-colors]")!.getAttribute("data-colors")!);
105
+ }
106
+
107
+ function clear(color: string) {
108
+ const rgba = getRgba(color)!;
109
+ return `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)`;
102
110
  }
103
111
 
104
112
  describe("native Tabs overflow fades (LC-120, FZ-7831)", () => {
@@ -127,24 +135,18 @@ describe("native Tabs overflow fades (LC-120, FZ-7831)", () => {
127
135
  scrollTo(250);
128
136
  const surface = seen.background;
129
137
  expect(surface).toMatch(/\S/);
130
- expect(stops("left")).toEqual([
131
- [surface, "1"],
132
- [surface, "0"],
133
- ]);
134
- expect(stops("right")).toEqual([
135
- [surface, "0"],
136
- [surface, "1"],
137
- ]);
138
+ expect(colors("left")).toEqual([surface, clear(surface)]);
139
+ expect(colors("right")).toEqual([clear(surface), surface]);
138
140
  });
139
141
 
140
142
  it("follows the dark theme's surface", () => {
141
143
  render({}, "light");
142
144
  settle(390, 900);
143
- const light = stops("right")[1]![0];
145
+ const light = colors("right")[1];
144
146
  cleanup();
145
147
  render({}, "dark");
146
148
  settle(390, 900);
147
- const dark = stops("right")[1]![0];
149
+ const dark = colors("right")[1];
148
150
  expect(dark).toBe(seen.background);
149
151
  expect(dark).not.toBe(light);
150
152
  });
@@ -164,7 +166,7 @@ describe("native Tabs overflow fades (LC-120, FZ-7831)", () => {
164
166
  render();
165
167
  settle(390, 900);
166
168
  expect(shown()).toEqual({ left: true, right: false });
167
- expect(stops("left").map(([, opacity]) => opacity)).toEqual(["1", "0"]);
169
+ expect(colors("left")[0]).toBe(seen.background);
168
170
  scrollTo(510);
169
171
  expect(shown()).toEqual({ left: false, right: true });
170
172
  });
@@ -217,7 +217,7 @@ describe("Tabs selection indicator colour", () => {
217
217
  const selected = tree.getByRole("tab", { name: "Tab 6" });
218
218
  if (event === "pointerLeave") fireEvent.pointerEnter(selected);
219
219
  fireEvent.pointerDown(selected);
220
- expect(indicator.className).toContain("_bg-color5");
220
+ expect(indicator.className).toContain("_bg-selectPress");
221
221
  fireEvent[event](selected);
222
222
  expect(indicator.className).toContain("_bg-selectedBac");
223
223
  },
@@ -250,9 +250,9 @@ describe("Tabs selection indicator colour", () => {
250
250
  expect(indicator.getAttribute("data-observed-theme")).toBe("light");
251
251
  const selected = tree.getByRole("tab", { name: "Tab 6" });
252
252
  fireEvent.pointerEnter(selected);
253
- expect(indicator.className).toContain("_bg-color5");
253
+ expect(indicator.className).toContain("_bg-selectPress");
254
254
  fireEvent.pointerDown(selected);
255
- expect(indicator.className).toContain("_bg-color5");
255
+ expect(indicator.className).toContain("_bg-selectPress");
256
256
  fireEvent.pointerUp(selected);
257
257
  fireEvent.pointerLeave(selected);
258
258
  expect(indicator.className).toContain("_bg-selectedBac");
@@ -48,7 +48,7 @@ describe("native Tabs accessibility contract", () => {
48
48
  expect(observed.triggers.get("one").onPressIn).toBeTypeOf("function");
49
49
  expect(observed.triggers.get("one").onPressOut).toBeTypeOf("function");
50
50
  act(() => observed.triggers.get("one").onPressIn());
51
- expect(indicator.className).toContain("_bg-color5");
51
+ expect(indicator.className).toContain("_bg-selectPress");
52
52
  act(() => observed.triggers.get("one").onPressOut());
53
53
  expect(indicator.className).toContain("_bg-selectedBac");
54
54
  });
@@ -36,6 +36,7 @@ import {
36
36
  stackEdgeRadius,
37
37
  stackRadiusProps,
38
38
  Surface,
39
+ useElevatedSurface,
39
40
  useResolvedKnobs,
40
41
  wasKeyboardFocus,
41
42
  type GroupPosition,
@@ -44,20 +45,8 @@ import {
44
45
  import type { ReactNode } from "react";
45
46
  import React from "react";
46
47
  import { Platform } from "react-native";
47
- import {
48
- Defs as TSvgDefs,
49
- LinearGradient as TSvgLinearGradient,
50
- Rect as TSvgRect,
51
- Stop as TSvgStop,
52
- Svg as TSvg,
53
- } from "@tamagui/react-native-svg";
54
- import type {
55
- Defs as RNSvgDefs,
56
- LinearGradient as RNSvgLinearGradient,
57
- Rect as RNSvgRect,
58
- Stop as RNSvgStop,
59
- Svg as RNSvg,
60
- } from "react-native-svg";
48
+ import { getRgba } from "@tamagui/core";
49
+ import { LinearGradient } from "tamagui/linear-gradient";
61
50
  import { useDirection } from "../hooks/useDirection";
62
51
  import { usePageChromeInset } from "../layouts/pageHeadingScope";
63
52
  import { useTranslation } from "../shared/i18n";
@@ -77,15 +66,9 @@ import {
77
66
  } from "tamagui";
78
67
  import { componentColors } from "../componentColors";
79
68
  import { ScrollView } from "../ScrollView";
69
+ import "../linearGradientSetup";
80
70
 
81
- // The shim ships no types; it is react-native-svg on native (as charts/svg.ts).
82
- const Svg = TSvg as unknown as typeof RNSvg;
83
- const SvgDefs = TSvgDefs as unknown as typeof RNSvgDefs;
84
- const SvgLinearGradient = TSvgLinearGradient as unknown as typeof RNSvgLinearGradient;
85
- const SvgStop = TSvgStop as unknown as typeof RNSvgStop;
86
- const SvgRect = TSvgRect as unknown as typeof RNSvgRect;
87
-
88
- /** Width of each overflow edge fade, web mask and native gradient alike. */
71
+ /** Width of each overflow edge fade. */
89
72
  export const TABS_EDGE_FADE = 32;
90
73
 
91
74
  // ── Types ─────────────────────────────────────────────────────
@@ -239,8 +222,8 @@ export function tabsFadeEdge(side: "left" | "right", direction: TabsDirection):
239
222
  }
240
223
 
241
224
  /**
242
- * One native edge fade: the strip's own surface colour, opaque at the edge
243
- * and clear toward the tabs, laid over the scroller and never hit-tested.
225
+ * One edge fade: the strip's own surface colour, opaque at the edge and clear
226
+ * toward the tabs, laid over the scroller and never hit-tested.
244
227
  */
245
228
  function TabsEdgeFade({
246
229
  side,
@@ -251,7 +234,8 @@ function TabsEdgeFade({
251
234
  color: string;
252
235
  direction: TabsDirection;
253
236
  }) {
254
- const id = `mpTabsFade${React.useId().replace(/[^a-zA-Z0-9]/g, "")}`;
237
+ const rgba = getRgba(color);
238
+ const clear = rgba ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)` : "transparent";
255
239
  return (
256
240
  <View
257
241
  pointerEvents="none"
@@ -260,19 +244,18 @@ function TabsEdgeFade({
260
244
  bottom={0}
261
245
  width={TABS_EDGE_FADE}
262
246
  zIndex={1}
263
- style={{ [tabsFadeEdge(side, direction)]: 0 }}
247
+ style={{ [isWeb ? side : tabsFadeEdge(side, direction)]: 0 }}
264
248
  data-tabs-fade={side}
265
249
  testID={`tabs-fade-${side}`}
266
250
  >
267
- <Svg width="100%" height="100%" pointerEvents="none">
268
- <SvgDefs>
269
- <SvgLinearGradient id={id} x1="0" y1="0" x2="1" y2="0">
270
- <SvgStop offset="0" stopColor={color} stopOpacity={side === "left" ? 1 : 0} />
271
- <SvgStop offset="1" stopColor={color} stopOpacity={side === "left" ? 0 : 1} />
272
- </SvgLinearGradient>
273
- </SvgDefs>
274
- <SvgRect x="0" y="0" width="100%" height="100%" fill={`url(#${id})`} />
275
- </Svg>
251
+ <LinearGradient
252
+ pointerEvents="none"
253
+ width="100%"
254
+ height="100%"
255
+ colors={side === "left" ? [color, clear] : [clear, color]}
256
+ start={[0, 0]}
257
+ end={[1, 0]}
258
+ />
276
259
  </View>
277
260
  );
278
261
  }
@@ -520,13 +503,15 @@ function TabsRoot({
520
503
 
521
504
  // Overflow tracking for edge fades + keep-active-visible scrolling
522
505
  const theme = useTheme();
523
- // A scrolling strip paints no fill of its own: its surface is the theme's.
524
- // Read only on native, so web never subscribes to a value it does not paint.
525
- const stripSurface = isWeb
526
- ? "transparent"
527
- : String(
528
- theme[componentColors.surface.background.slice(1) as "background"]?.val ?? "transparent",
529
- );
506
+ // A scrolling strip paints no fill of its own: its surface is the theme's,
507
+ // or the elevated surface it sits on.
508
+ const elevatedGround = useElevatedSurface();
509
+ const surfaceKey = (
510
+ elevatedGround ? knobProps.elevatedSurface.backgroundColor : componentColors.surface.background
511
+ ) as string;
512
+ const stripSurface = String(
513
+ theme[surfaceKey.replace(/^\$/, "") as "background"]?.val ?? surfaceKey,
514
+ );
530
515
  const scrollRef = React.useRef<ScrollView>(null);
531
516
  const tabRefs = React.useRef(new Map<string, HTMLElement>());
532
517
  const scrollMetrics = React.useRef({ offset: 0, viewport: 0, content: 0, scrolled: false });
@@ -617,11 +602,6 @@ function TabsRoot({
617
602
  ? undefined
618
603
  : stackRadiusProps(activePosition, outerRadiusToken, "horizontal");
619
604
 
620
- // Web edge fades: a scroll-state mask keeps the fade background-agnostic.
621
- // Native has no mask, so it lays a gradient of the strip's surface over the
622
- // same edges (TabsEdgeFade).
623
- const maskStyle: Record<string, string> | undefined = isWeb ? tabsEdgeMask(fades) : undefined;
624
-
625
605
  const indicatorContent =
626
606
  activeLayout && !isBand ? (
627
607
  isUnderline ? (
@@ -910,7 +890,6 @@ function TabsRoot({
910
890
  horizontal
911
891
  showsHorizontalScrollIndicator={false}
912
892
  scrollEventThrottle={16}
913
- style={maskStyle as never}
914
893
  // Slop padding keeps the 44px press floor from being clipped when
915
894
  // the painted tab is smaller than the floor (LC-54 / nested scale).
916
895
  contentContainerStyle={{ paddingVertical: slop }}
@@ -930,10 +909,10 @@ function TabsRoot({
930
909
  {tabList}
931
910
  </TabStripScroll>
932
911
  )}
933
- {!isWeb && !equalDistribution && fades.left ? (
912
+ {!equalDistribution && fades.left ? (
934
913
  <TabsEdgeFade side="left" color={stripSurface} direction={direction} />
935
914
  ) : null}
936
- {!isWeb && !equalDistribution && fades.right ? (
915
+ {!equalDistribution && fades.right ? (
937
916
  <TabsEdgeFade side="right" color={stripSurface} direction={direction} />
938
917
  ) : null}
939
918
  </StripWrapper>
@@ -0,0 +1,71 @@
1
+ import { holdCueScale, holdCueStartMs } from "@multiplatform.one/forms";
2
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
3
+ import { act, fireEvent, screen } from "@testing-library/react";
4
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
5
+ import { Tooltip } from "./index.native";
6
+ import { TOOLTIP_NATIVE_LONG_PRESS_MS } from "./nativePress";
7
+
8
+ beforeEach(() => {
9
+ vi.useFakeTimers();
10
+ });
11
+ afterEach(() => {
12
+ vi.useRealTimers();
13
+ });
14
+
15
+ type Pressed = (event?: unknown) => void;
16
+
17
+ function HeldTarget(props: {
18
+ onPressIn?: Pressed;
19
+ onPressOut?: Pressed;
20
+ scale?: number;
21
+ "data-hold"?: string;
22
+ }) {
23
+ return (
24
+ <button
25
+ type="button"
26
+ data-testid="held"
27
+ data-hold={props["data-hold"]}
28
+ data-scale={props.scale}
29
+ onMouseDown={() => props.onPressIn?.()}
30
+ onMouseUp={() => props.onPressOut?.()}
31
+ >
32
+ Info
33
+ </button>
34
+ );
35
+ }
36
+
37
+ describe("native Tooltip hold cue (LC-197, FZ-8902)", () => {
38
+ it("shows the cue partway to the long press and clears it on release", () => {
39
+ renderWithProviders(
40
+ <Tooltip content="Details">
41
+ <HeldTarget />
42
+ </Tooltip>,
43
+ );
44
+ const target = screen.getByTestId("held");
45
+ expect(holdCueStartMs).toBeLessThan(TOOLTIP_NATIVE_LONG_PRESS_MS);
46
+ fireEvent.mouseDown(target);
47
+ expect(target).not.toHaveAttribute("data-hold");
48
+ act(() => {
49
+ vi.advanceTimersByTime(holdCueStartMs);
50
+ });
51
+ expect(target).toHaveAttribute("data-hold", "progress");
52
+ expect(target).toHaveAttribute("data-scale", String(holdCueScale));
53
+ fireEvent.mouseUp(target);
54
+ expect(target).not.toHaveAttribute("data-hold");
55
+ expect(target).not.toHaveAttribute("data-scale");
56
+ });
57
+
58
+ it("drops the cue once the tooltip opens", () => {
59
+ renderWithProviders(
60
+ <Tooltip content="Details">
61
+ <HeldTarget />
62
+ </Tooltip>,
63
+ );
64
+ const target = screen.getByTestId("held");
65
+ fireEvent.mouseDown(target);
66
+ act(() => {
67
+ vi.advanceTimersByTime(TOOLTIP_NATIVE_LONG_PRESS_MS);
68
+ });
69
+ expect(target).not.toHaveAttribute("data-hold");
70
+ });
71
+ });
@@ -179,7 +179,7 @@ describe("Tooltip arrow shares the content fill", () => {
179
179
  for (const scheme of ["light", "dark"] as const) {
180
180
  it(`${scheme} resolves the same token on content and arrow`, async () => {
181
181
  let expectedFill: string | undefined;
182
- const key = scheme === "dark" ? "color4" : "background";
182
+ const key = scheme === "dark" ? "color5" : "background";
183
183
  function Probe() {
184
184
  const theme = useTheme();
185
185
  expectedFill = theme[key]?.val;
@@ -13,7 +13,7 @@ import {
13
13
  useResolvedKnobs,
14
14
  warnTooltipOnDisabled,
15
15
  } from "@multiplatform.one/theme";
16
- import { useOverlayZIndex } from "@multiplatform.one/forms";
16
+ import { holdCueScale, useHoldCue, useOverlayZIndex } from "@multiplatform.one/forms";
17
17
 
18
18
  import React from "react";
19
19
  import { Pressable, StyleSheet } from "react-native";
@@ -100,6 +100,7 @@ export function Tooltip({
100
100
  [setOpen, delay],
101
101
  );
102
102
  React.useEffect(() => () => press.dispose(), [press]);
103
+ const hold = useHoldCue();
103
104
 
104
105
  React.useEffect(() => {
105
106
  if (!open) {
@@ -128,15 +129,19 @@ export function Tooltip({
128
129
  onPressIn: (event: unknown) => {
129
130
  (children.props as { onPressIn?: PressHandler }).onPressIn?.(event);
130
131
  press.pressIn();
132
+ hold.start();
131
133
  },
132
134
  onPressOut: (event: unknown) => {
133
135
  (children.props as { onPressOut?: PressHandler }).onPressOut?.(event);
134
136
  press.pressOut();
137
+ hold.stop();
135
138
  },
136
139
  onLongPress: (event: unknown) => {
137
140
  (children.props as { onLongPress?: PressHandler }).onLongPress?.(event);
138
141
  press.longPress();
142
+ hold.stop();
139
143
  },
144
+ ...(hold.holding && !open ? { scale: holdCueScale, "data-hold": "progress" } : null),
140
145
  })
141
146
  : children;
142
147
 
@@ -0,0 +1,104 @@
1
+ /**
2
+ * LC-289 SHELL-KEEPS-ROUTE on the native path (FZ-9270): rotating an iPad or
3
+ * entering split view flips the size class, and the routed screen stays
4
+ * mounted inside the system tab host it sat in.
5
+ */
6
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
7
+ import { HouseIcon, SparkleIcon } from "@phosphor-icons/react";
8
+ import { cleanup, fireEvent, screen } from "@testing-library/react";
9
+ import { useEffect } from "react";
10
+ import { afterEach, describe, expect, it, vi } from "vitest";
11
+ import { AppShell, type AppShellDestination } from "./AppShell";
12
+ import type { NativeTabs } from "./TabHost.native";
13
+
14
+ const size = vi.hoisted(() => ({ value: "compact" as string }));
15
+ vi.mock("@multiplatform.one/theme", async (importOriginal) => ({
16
+ ...(await importOriginal<typeof import("@multiplatform.one/theme")>()),
17
+ useLayoutSizeClass: () => size.value,
18
+ }));
19
+ vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
20
+ ...(await importOriginal<typeof import("@multiplatform.one/platform")>()),
21
+ isWeb: false,
22
+ }));
23
+ vi.mock("./TabHost", async () => {
24
+ const native = await import("./TabHost.native");
25
+ const { MpoTabHost } = await import("./MpoTabHost");
26
+ const fakeTabs: NativeTabs = {
27
+ Host: ({ children, tabBarHidden }) => (
28
+ <div data-testid="native-host" data-hidden={String(Boolean(tabBarHidden))}>
29
+ {children}
30
+ </div>
31
+ ),
32
+ Screen: ({ children, tabKey }) => (
33
+ <section data-testid={`native-screen-${tabKey}`}>{children}</section>
34
+ ),
35
+ };
36
+ return {
37
+ ...native,
38
+ TabHost: (props: Parameters<typeof native.TabHost>[0]) =>
39
+ native.itemsHaveNativeIcons(props.items, "ios") ? (
40
+ <native.NativeTabHost tabs={fakeTabs} {...props} />
41
+ ) : (
42
+ <MpoTabHost {...props} />
43
+ ),
44
+ };
45
+ });
46
+
47
+ afterEach(() => {
48
+ cleanup();
49
+ size.value = "compact";
50
+ });
51
+
52
+ const destinations: AppShellDestination[] = [
53
+ { key: "/", label: "Home", icon: HouseIcon, nativeIcon: { sfSymbol: "house" } },
54
+ { key: "/pokemon", label: "Pokemon", icon: SparkleIcon, nativeIcon: { sfSymbol: "sparkles" } },
55
+ ];
56
+
57
+ function Routed({ onMount }: { onMount: () => void }) {
58
+ useEffect(onMount, []);
59
+ return <input aria-label="Name" defaultValue="" />;
60
+ }
61
+
62
+ function frame(path: string, onMount: () => void) {
63
+ return (
64
+ <AppShell
65
+ destinations={destinations}
66
+ path={path}
67
+ onNavigate={() => {}}
68
+ title="multiplatform.one"
69
+ ownChrome={["/desk"]}
70
+ >
71
+ <Routed onMount={onMount} />
72
+ </AppShell>
73
+ );
74
+ }
75
+
76
+ describe("AppShell on native across a size-class change (LC-289)", () => {
77
+ it.each([
78
+ ["a tab root", "/pokemon"],
79
+ ["a pushed route", "/pokemon/pikachu"],
80
+ ["an own-chrome route", "/desk"],
81
+ ])("keeps the routed screen and its form state on %s", (_, path) => {
82
+ const onMount = vi.fn();
83
+ size.value = "expanded";
84
+ const view = renderWithProviders(frame(path, onMount));
85
+ fireEvent.change(screen.getByLabelText("Name"), { target: { value: "Pikachu" } });
86
+ for (const next of ["compact", "medium", "compact", "expanded"]) {
87
+ size.value = next;
88
+ view.rerender(frame(path, onMount));
89
+ }
90
+ expect(onMount).toHaveBeenCalledTimes(1);
91
+ expect((screen.getByLabelText("Name") as HTMLInputElement).value).toBe("Pikachu");
92
+ });
93
+
94
+ it("hides the system tab bar at regular width and shows it on a phone's tab root", () => {
95
+ size.value = "expanded";
96
+ const view = renderWithProviders(frame("/pokemon", () => {}));
97
+ expect(screen.getByTestId("native-host").getAttribute("data-hidden")).toBe("true");
98
+ expect(screen.getByTestId("app-shell-sidebar")).toBeTruthy();
99
+ size.value = "compact";
100
+ view.rerender(frame("/pokemon", () => {}));
101
+ expect(screen.getByTestId("native-host").getAttribute("data-hidden")).toBe("false");
102
+ expect(screen.queryByTestId("app-shell-sidebar")).toBeNull();
103
+ });
104
+ });