@multiplatform.one/components 7.69.2 → 7.71.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 (359) hide show
  1. package/dist/cjs/DotIndicator/index.cjs +21 -11
  2. package/dist/cjs/DotIndicator/index.native.js +21 -11
  3. package/dist/cjs/DotIndicator/index.native.js.map +1 -1
  4. package/dist/cjs/Pagination.cjs +12 -5
  5. package/dist/cjs/Pagination.native.js +12 -5
  6. package/dist/cjs/Pagination.native.js.map +1 -1
  7. package/dist/cjs/Tabs/index.cjs +5 -5
  8. package/dist/cjs/Tabs/index.native.js +5 -5
  9. package/dist/cjs/Tabs/index.native.js.map +1 -1
  10. package/dist/cjs/appShell/index.cjs +1 -3
  11. package/dist/cjs/appShell/index.native.js +0 -2
  12. package/dist/cjs/appShell/index.native.js.map +1 -1
  13. package/dist/cjs/componentColors.cjs +3 -3
  14. package/dist/cjs/componentColors.native.js +3 -3
  15. package/dist/cjs/layouts/ViewSwitcher.cjs +6 -11
  16. package/dist/cjs/layouts/ViewSwitcher.native.js +6 -11
  17. package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
  18. package/dist/cjs/layouts/bottomAccessory.cjs +173 -0
  19. package/dist/cjs/layouts/bottomAccessory.native.js +225 -0
  20. package/dist/cjs/layouts/bottomAccessory.native.js.map +1 -0
  21. package/dist/cjs/{appShell/BottomAccessory.cjs → layouts/bottomSafeArea.cjs} +12 -14
  22. package/dist/cjs/layouts/bottomSafeArea.native.js +75 -0
  23. package/dist/cjs/layouts/bottomSafeArea.native.js.map +1 -0
  24. package/dist/cjs/layouts/index.cjs +2 -0
  25. package/dist/cjs/layouts/index.native.js +2 -0
  26. package/dist/cjs/layouts/index.native.js.map +1 -1
  27. package/dist/cjs/layouts/page.cjs +16 -5
  28. package/dist/cjs/layouts/page.native.js +16 -5
  29. package/dist/cjs/layouts/page.native.js.map +1 -1
  30. package/dist/cjs/layouts/screenScroll.cjs +44 -0
  31. package/dist/cjs/layouts/screenScroll.native.js +52 -0
  32. package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
  33. package/dist/esm/DotIndicator/index.mjs +21 -11
  34. package/dist/esm/DotIndicator/index.mjs.map +1 -1
  35. package/dist/esm/DotIndicator/index.native.js +21 -11
  36. package/dist/esm/DotIndicator/index.native.js.map +1 -1
  37. package/dist/esm/Pagination.mjs +12 -5
  38. package/dist/esm/Pagination.mjs.map +1 -1
  39. package/dist/esm/Pagination.native.js +12 -5
  40. package/dist/esm/Pagination.native.js.map +1 -1
  41. package/dist/esm/Tabs/index.mjs +5 -5
  42. package/dist/esm/Tabs/index.mjs.map +1 -1
  43. package/dist/esm/Tabs/index.native.js +5 -5
  44. package/dist/esm/Tabs/index.native.js.map +1 -1
  45. package/dist/esm/appShell/index.mjs +1 -2
  46. package/dist/esm/appShell/index.mjs.map +1 -1
  47. package/dist/esm/appShell/index.native.js +1 -2
  48. package/dist/esm/appShell/index.native.js.map +1 -1
  49. package/dist/esm/componentColors.mjs +3 -3
  50. package/dist/esm/componentColors.native.js +3 -3
  51. package/dist/esm/layouts/ViewSwitcher.mjs +6 -11
  52. package/dist/esm/layouts/ViewSwitcher.mjs.map +1 -1
  53. package/dist/esm/layouts/ViewSwitcher.native.js +6 -11
  54. package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
  55. package/dist/esm/layouts/bottomAccessory.mjs +144 -0
  56. package/dist/esm/layouts/bottomAccessory.mjs.map +1 -0
  57. package/dist/esm/layouts/bottomAccessory.native.js +193 -0
  58. package/dist/esm/layouts/bottomAccessory.native.js.map +1 -0
  59. package/dist/esm/layouts/bottomSafeArea.mjs +16 -0
  60. package/dist/esm/layouts/bottomSafeArea.mjs.map +1 -0
  61. package/dist/esm/layouts/bottomSafeArea.native.js +47 -0
  62. package/dist/esm/layouts/bottomSafeArea.native.js.map +1 -0
  63. package/dist/esm/layouts/index.mjs +2 -0
  64. package/dist/esm/layouts/index.mjs.map +1 -1
  65. package/dist/esm/layouts/index.native.js +2 -0
  66. package/dist/esm/layouts/index.native.js.map +1 -1
  67. package/dist/esm/layouts/page.mjs +16 -5
  68. package/dist/esm/layouts/page.mjs.map +1 -1
  69. package/dist/esm/layouts/page.native.js +16 -5
  70. package/dist/esm/layouts/page.native.js.map +1 -1
  71. package/dist/esm/layouts/screenScroll.mjs +43 -1
  72. package/dist/esm/layouts/screenScroll.mjs.map +1 -1
  73. package/dist/esm/layouts/screenScroll.native.js +51 -1
  74. package/dist/esm/layouts/screenScroll.native.js.map +1 -1
  75. package/dist/jsx/Accordion/index.native.js.map +1 -1
  76. package/dist/jsx/Alert/index.native.js.map +1 -1
  77. package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
  78. package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
  79. package/dist/jsx/Avatar/index.native.js.map +1 -1
  80. package/dist/jsx/Badge/index.native.js.map +1 -1
  81. package/dist/jsx/Button.native.js.map +1 -1
  82. package/dist/jsx/Card.native.js.map +1 -1
  83. package/dist/jsx/CardFooter.native.js.map +1 -1
  84. package/dist/jsx/CardHeader.native.js.map +1 -1
  85. package/dist/jsx/Carousel/index.native.js.map +1 -1
  86. package/dist/jsx/Chip/index.native.js.map +1 -1
  87. package/dist/jsx/Collapsible.native.js.map +1 -1
  88. package/dist/jsx/ContextMenu/index.native.js.map +1 -1
  89. package/dist/jsx/CopyField/index.native.js.map +1 -1
  90. package/dist/jsx/Dialog.native.js.map +1 -1
  91. package/dist/jsx/DotIndicator/index.mjs +21 -11
  92. package/dist/jsx/DotIndicator/index.mjs.map +1 -1
  93. package/dist/jsx/DotIndicator/index.native.js +21 -11
  94. package/dist/jsx/DotIndicator/index.native.js.map +1 -1
  95. package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
  96. package/dist/jsx/DropdownMenu/menuSettle.native.js.map +1 -1
  97. package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
  98. package/dist/jsx/Heading.native.js.map +1 -1
  99. package/dist/jsx/Kbd/index.native.js.map +1 -1
  100. package/dist/jsx/Kbd/keys.native.js.map +1 -1
  101. package/dist/jsx/Lightbox/MediaControl.native.js.map +1 -1
  102. package/dist/jsx/Lightbox/index.gnome.native.js.map +1 -1
  103. package/dist/jsx/Lightbox/shared.native.js.map +1 -1
  104. package/dist/jsx/Lightbox/useLightbox.native.js.map +1 -1
  105. package/dist/jsx/Material/index.native.js.map +1 -1
  106. package/dist/jsx/Meter/index.native.js.map +1 -1
  107. package/dist/jsx/Meter/meter.native.js.map +1 -1
  108. package/dist/jsx/OverflowRow/index.native.js.map +1 -1
  109. package/dist/jsx/Pagination.mjs +12 -5
  110. package/dist/jsx/Pagination.mjs.map +1 -1
  111. package/dist/jsx/Pagination.native.js +12 -5
  112. package/dist/jsx/Pagination.native.js.map +1 -1
  113. package/dist/jsx/Popover.native.js.map +1 -1
  114. package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
  115. package/dist/jsx/Quote/index.native.js.map +1 -1
  116. package/dist/jsx/SchemeToggle/index.native.js.map +1 -1
  117. package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
  118. package/dist/jsx/Separator/index.native.js.map +1 -1
  119. package/dist/jsx/Sheet.native.js.map +1 -1
  120. package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
  121. package/dist/jsx/SheetModal/SheetNavigation.native.js.map +1 -1
  122. package/dist/jsx/SheetModal/detents.native.js.map +1 -1
  123. package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
  124. package/dist/jsx/Skeleton/index.native.js.map +1 -1
  125. package/dist/jsx/SkipLink/index.native.js.map +1 -1
  126. package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
  127. package/dist/jsx/SortableList/index.native.js.map +1 -1
  128. package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
  129. package/dist/jsx/Tabs/index.mjs +5 -5
  130. package/dist/jsx/Tabs/index.mjs.map +1 -1
  131. package/dist/jsx/Tabs/index.native.js +5 -5
  132. package/dist/jsx/Tabs/index.native.js.map +1 -1
  133. package/dist/jsx/Text.native.js.map +1 -1
  134. package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
  135. package/dist/jsx/Toast/index.native.js.map +1 -1
  136. package/dist/jsx/Toast/store.native.js.map +1 -1
  137. package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
  138. package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
  139. package/dist/jsx/TreeSelect/index.native.js.map +1 -1
  140. package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
  141. package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
  142. package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
  143. package/dist/jsx/Video/types.native.js.map +1 -1
  144. package/dist/jsx/Wheel/index.native.js.map +1 -1
  145. package/dist/jsx/Wizard/index.native.js.map +1 -1
  146. package/dist/jsx/actions/ActionBar.native.js.map +1 -1
  147. package/dist/jsx/actions/DangerSection.native.js.map +1 -1
  148. package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
  149. package/dist/jsx/actions/HeaderActions.native.js.map +1 -1
  150. package/dist/jsx/actions/StandardAction.native.js.map +1 -1
  151. package/dist/jsx/actions/devWarn.native.js.map +1 -1
  152. package/dist/jsx/actions/index.native.js.map +1 -1
  153. package/dist/jsx/actions/severity.native.js.map +1 -1
  154. package/dist/jsx/appShell/Dock.native.js.map +1 -1
  155. package/dist/jsx/appShell/MpoTabHost.native.js.map +1 -1
  156. package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
  157. package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
  158. package/dist/jsx/appShell/Springboard.native.js.map +1 -1
  159. package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
  160. package/dist/jsx/appShell/TabBar.native.js.map +1 -1
  161. package/dist/jsx/appShell/appTile.native.js.map +1 -1
  162. package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
  163. package/dist/jsx/appShell/index.mjs +1 -2
  164. package/dist/jsx/appShell/index.mjs.map +1 -1
  165. package/dist/jsx/appShell/index.native.js +0 -2
  166. package/dist/jsx/appShell/index.native.js.map +1 -1
  167. package/dist/jsx/charts/Axis.native.js.map +1 -1
  168. package/dist/jsx/charts/BarChart.native.js.map +1 -1
  169. package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
  170. package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
  171. package/dist/jsx/charts/LineChart.native.js.map +1 -1
  172. package/dist/jsx/charts/PieChart.native.js.map +1 -1
  173. package/dist/jsx/charts/Sparkline.native.js.map +1 -1
  174. package/dist/jsx/charts/accessibility.native.js.map +1 -1
  175. package/dist/jsx/charts/chartHeight.native.js.map +1 -1
  176. package/dist/jsx/charts/composeChart.native.js.map +1 -1
  177. package/dist/jsx/charts/index.native.js.map +1 -1
  178. package/dist/jsx/charts/math.native.js.map +1 -1
  179. package/dist/jsx/charts/series.native.js.map +1 -1
  180. package/dist/jsx/charts/svg.native.js.map +1 -1
  181. package/dist/jsx/charts/types.native.js.map +1 -1
  182. package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
  183. package/dist/jsx/code/Code/index.native.js.map +1 -1
  184. package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
  185. package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
  186. package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
  187. package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
  188. package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
  189. package/dist/jsx/code/Pre/index.native.js.map +1 -1
  190. package/dist/jsx/code/index.native.js.map +1 -1
  191. package/dist/jsx/componentColors.mjs +3 -3
  192. package/dist/jsx/componentColors.native.js +3 -3
  193. package/dist/jsx/componentColors.native.js.map +1 -1
  194. package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
  195. package/dist/jsx/feedback/NotifyHost.native.js +1 -1
  196. package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
  197. package/dist/jsx/feedback/copy.native.js.map +1 -1
  198. package/dist/jsx/feedback/index.native.js.map +1 -1
  199. package/dist/jsx/feedback/notify.native.js.map +1 -1
  200. package/dist/jsx/feedback/route.native.js.map +1 -1
  201. package/dist/jsx/feedback/store.native.js.map +1 -1
  202. package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -1
  203. package/dist/jsx/formLayouts/PreferencePanel.native.js +1 -1
  204. package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -1
  205. package/dist/jsx/formLayouts/index.native.js.map +1 -1
  206. package/dist/jsx/hooks/index.native.js.map +1 -1
  207. package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
  208. package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
  209. package/dist/jsx/hooks/useHoldCue.native.js.map +1 -1
  210. package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
  211. package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
  212. package/dist/jsx/icons/index.native.js.map +1 -1
  213. package/dist/jsx/icons/lucide.native.js.map +1 -1
  214. package/dist/jsx/icons/themed.native.js.map +1 -1
  215. package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
  216. package/dist/jsx/images/Image/framing.native.js.map +1 -1
  217. package/dist/jsx/images/Image/mediaRadius.native.js.map +1 -1
  218. package/dist/jsx/images/Image/shared.native.js.map +1 -1
  219. package/dist/jsx/images/Image/types.native.js.map +1 -1
  220. package/dist/jsx/images/index.native.js.map +1 -1
  221. package/dist/jsx/index.native.js +1 -1
  222. package/dist/jsx/index.native.js.map +1 -1
  223. package/dist/jsx/knobImmuneExports.native.js.map +1 -1
  224. package/dist/jsx/layouts/AsyncBoundary.native.js +1 -1
  225. package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
  226. package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
  227. package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
  228. package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
  229. package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  230. package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
  231. package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
  232. package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  233. package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
  234. package/dist/jsx/layouts/ViewSwitcher.mjs +6 -11
  235. package/dist/jsx/layouts/ViewSwitcher.mjs.map +1 -1
  236. package/dist/jsx/layouts/ViewSwitcher.native.js +6 -11
  237. package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
  238. package/dist/jsx/layouts/attachments.native.js.map +1 -1
  239. package/dist/jsx/layouts/bottomAccessory.mjs +144 -0
  240. package/dist/jsx/layouts/bottomAccessory.mjs.map +1 -0
  241. package/dist/jsx/layouts/bottomAccessory.native.js +225 -0
  242. package/dist/jsx/layouts/bottomAccessory.native.js.map +1 -0
  243. package/dist/jsx/layouts/bottomSafeArea.mjs +16 -0
  244. package/dist/jsx/layouts/bottomSafeArea.mjs.map +1 -0
  245. package/dist/jsx/layouts/bottomSafeArea.native.js +75 -0
  246. package/dist/jsx/layouts/bottomSafeArea.native.js.map +1 -0
  247. package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
  248. package/dist/jsx/layouts/index.mjs +2 -0
  249. package/dist/jsx/layouts/index.mjs.map +1 -1
  250. package/dist/jsx/layouts/index.native.js +2 -0
  251. package/dist/jsx/layouts/index.native.js.map +1 -1
  252. package/dist/jsx/layouts/page.mjs +16 -5
  253. package/dist/jsx/layouts/page.mjs.map +1 -1
  254. package/dist/jsx/layouts/page.native.js +16 -5
  255. package/dist/jsx/layouts/page.native.js.map +1 -1
  256. package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
  257. package/dist/jsx/layouts/screenScroll.mjs +43 -1
  258. package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
  259. package/dist/jsx/layouts/screenScroll.native.js +52 -0
  260. package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
  261. package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
  262. package/dist/jsx/layouts/sidebar.native.js.map +1 -1
  263. package/dist/jsx/layouts/tags.native.js.map +1 -1
  264. package/dist/jsx/layouts/timeline.native.js.map +1 -1
  265. package/dist/jsx/layouts/toolbar.native.js.map +1 -1
  266. package/dist/jsx/shared/actionScan.native.js.map +1 -1
  267. package/dist/jsx/shared/i18n.native.js.map +1 -1
  268. package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
  269. package/dist/jsx/shared/t.native.js.map +1 -1
  270. package/dist/jsx/shared/textRidesText.native.js.map +1 -1
  271. package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
  272. package/dist/jsx/surfaces.native.js.map +1 -1
  273. package/dist/jsx/tamagui.native.js.map +1 -1
  274. package/dist/jsx/testSetup.native.js.map +1 -1
  275. package/dist/jsx/utils/setTinted.native.js.map +1 -1
  276. package/dist/jsx/utils/unwrapText.native.js.map +1 -1
  277. package/dist/jsx/views/Calendar.native.js.map +1 -1
  278. package/dist/jsx/views/Dashboard.native.js.map +1 -1
  279. package/dist/jsx/views/Gantt.native.js.map +1 -1
  280. package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
  281. package/dist/jsx/views/ImageGrid.native.js.map +1 -1
  282. package/dist/jsx/views/List.native.js.map +1 -1
  283. package/dist/jsx/views/ListGroup.native.js.map +1 -1
  284. package/dist/jsx/views/ListRow.native.js.map +1 -1
  285. package/dist/jsx/views/Matrix.native.js.map +1 -1
  286. package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
  287. package/dist/jsx/views/ShortcutCard.native.js.map +1 -1
  288. package/dist/jsx/views/TreeView.native.js.map +1 -1
  289. package/dist/jsx/views/calendarMath.native.js.map +1 -1
  290. package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
  291. package/dist/jsx/views/ganttMath.native.js.map +1 -1
  292. package/dist/jsx/views/index.native.js.map +1 -1
  293. package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
  294. package/dist/jsx/views/matrixMath.native.js.map +1 -1
  295. package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
  296. package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
  297. package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
  298. package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
  299. package/dist/jsx/views/widgetChrome.native.js.map +1 -1
  300. package/package.json +9 -9
  301. package/src/DotIndicator/index.tsx +52 -12
  302. package/src/DotIndicator/pageControl.spec.tsx +105 -0
  303. package/src/Pagination.stories.tsx +23 -0
  304. package/src/Pagination.tsx +17 -5
  305. package/src/Tabs/Tabs.bandColor.spec.tsx +19 -8
  306. package/src/Tabs/Tabs.measurement.spec.tsx +11 -14
  307. package/src/Tabs/Tabs.native.spec.tsx +10 -3
  308. package/src/Tabs/index.tsx +5 -5
  309. package/src/accentControls.spec.tsx +190 -0
  310. package/src/appShell/TabBar.spec.tsx +1 -1
  311. package/src/appShell/index.ts +0 -1
  312. package/src/componentColors.ts +3 -3
  313. package/src/icons/slots.nativeInk.spec.tsx +2 -1
  314. package/src/layouts/ViewSwitcher.spec.tsx +12 -12
  315. package/src/layouts/ViewSwitcher.tsx +6 -7
  316. package/src/layouts/bottomAccessory.spec.tsx +147 -0
  317. package/src/layouts/bottomAccessory.tsx +206 -0
  318. package/src/layouts/bottomSafeArea.native.tsx +43 -0
  319. package/src/layouts/bottomSafeArea.tsx +13 -0
  320. package/src/layouts/index.tsx +2 -0
  321. package/src/layouts/layouts.spec.tsx +6 -9
  322. package/src/layouts/page.tsx +31 -12
  323. package/src/layouts/revealTop.spec.tsx +77 -0
  324. package/src/layouts/screenScroll.tsx +67 -1
  325. package/types/Collapsible.d.ts +1 -1
  326. package/types/DotIndicator/index.d.ts +18 -4
  327. package/types/DotIndicator/index.d.ts.map +1 -1
  328. package/types/Pagination.d.ts +7 -1
  329. package/types/Pagination.d.ts.map +1 -1
  330. package/types/Tabs/index.d.ts.map +1 -1
  331. package/types/appShell/index.d.ts +0 -1
  332. package/types/appShell/index.d.ts.map +1 -1
  333. package/types/componentColors.d.ts +3 -3
  334. package/types/layouts/ViewSwitcher.d.ts.map +1 -1
  335. package/types/layouts/bottomAccessory.d.ts +54 -0
  336. package/types/layouts/bottomAccessory.d.ts.map +1 -0
  337. package/types/layouts/bottomSafeArea.d.ts +6 -0
  338. package/types/layouts/bottomSafeArea.d.ts.map +1 -0
  339. package/types/layouts/bottomSafeArea.native.d.ts +15 -0
  340. package/types/layouts/bottomSafeArea.native.d.ts.map +1 -0
  341. package/types/layouts/index.d.ts +2 -0
  342. package/types/layouts/index.d.ts.map +1 -1
  343. package/types/layouts/page.d.ts +8 -0
  344. package/types/layouts/page.d.ts.map +1 -1
  345. package/types/layouts/screenScroll.d.ts +24 -0
  346. package/types/layouts/screenScroll.d.ts.map +1 -1
  347. package/dist/cjs/appShell/BottomAccessory.native.js +0 -53
  348. package/dist/cjs/appShell/BottomAccessory.native.js.map +0 -1
  349. package/dist/esm/appShell/BottomAccessory.mjs +0 -18
  350. package/dist/esm/appShell/BottomAccessory.mjs.map +0 -1
  351. package/dist/esm/appShell/BottomAccessory.native.js +0 -25
  352. package/dist/esm/appShell/BottomAccessory.native.js.map +0 -1
  353. package/dist/jsx/appShell/BottomAccessory.mjs +0 -18
  354. package/dist/jsx/appShell/BottomAccessory.mjs.map +0 -1
  355. package/dist/jsx/appShell/BottomAccessory.native.js +0 -53
  356. package/dist/jsx/appShell/BottomAccessory.native.js.map +0 -1
  357. package/src/appShell/BottomAccessory.tsx +0 -18
  358. package/types/appShell/BottomAccessory.d.ts +0 -11
  359. package/types/appShell/BottomAccessory.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role"],"sources":["../../../src/views/widgetChrome.tsx"],"sourcesContent":[null],"mappings":"AAAA;;AAAA,IACEA,SAAA,GAAAC,MAAA,CAAAC,cAAA;AAAA,IACAC,gBAAA,GAAAF,MAAA,CAAAG,wBAAA;AAAA,IACAC,iBAAA,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IACAC,YAAA,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IAAAC,QACK,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAEP,SAASC,IAAA,IAAAD,GAAA,EA8DHZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AA3DC;AAUL,IAAAC,WAAY,GAAAA,CAAAC,EAAA,EAASC,IAAG,EAAAC,MAAQ,EAAAC,IAAA;EAChC,IAAAF,IAAO,IAAE,OAAIA,IAAS,KAAI,mBAAAA,IAAA;IAC5B,SAAAG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,GAGO,IAAS,CAAAX,YAAA,CAAAe,IAAgB,CAAAL,EAAA,EAAAI,GAAkC,KAAAA,GAAA,KAAAF,MAAA,EAC1DnB,SAAA,CAAAiB,EAAW,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAiBI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAClC;EACA,OAAME,EAAA;AACN;AACI,IACEM,YAAQ,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IACRE,oBAAoB;AAAAhB,QACpB,CAAAgB,oBAAoB;EAAAC,cACpB,EAAAA,CAAA,KAAmBA,cAAQ;EAAAC,kBAC3B,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,eACM,EAAAA,CAAA,KAAAA;AAAA,EACR;AAEJC,MAAA,CAAAC,OAAS,GAAAR,YAAW,CAAAG,oBAAiB,CAAY;AACnD,IAAAM,kBAAA,GAAAC,OAAA;AAEO,IAAAC,YAAS,GAAAD,OAAe;AAAA,IAC7BE,cAAA,GAAAF,OAAA;AAAA,SACAL,mBAAAQ,MAAA;EACA;IAAAC,EAAA;IAAAC,OAAA;IAAA,GAAAC;EAAA,IAAAH,MAAA;EACA;IACAC,EAAA;IAOCC,OAAA;IACDC;EACA;AACA;AACA,SACEV,gBAAAW,OAAA;EAAA,IAACC,QAAA,OAAAP,YAAA,CAAAQ,gBAAA;EAAA;IAAAC,SAAA;IAAAC;EAAA,IAAAH,QAAA;EAAA,IACEL,MAAG,GAAAR,kBAAA,CAAAe,SAAA,CAAAE,aAAA;EAAA,IACHC,WAAG,GAAAN,OAAA;IAAAO,MACJ,WAAW;IAAAC,UACX,EAAAJ,OAAe,CAAAK,cAAA;IAAAC,UACf,EAAAN,OAAiB,CAAAO,cAAA;IAAAC,iBACJ,EAAIR,OAAA,CAAAS,qBAAA;IAAAb,OACjB;IAASc,IACT;EAAgB,IAEhB;EAAsC;IACxCX,SAAA;IAEJC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role","param","color","radius","children","identity","useChartPalette","single","fill","ink","useReadableTextOn","jsx","YStack","alignItems","justifyContent","backgroundColor","overflow","IconSlot","icon"],"sources":["widgetChrome.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar widgetChrome_exports = {};\n__export(widgetChrome_exports, {\n NestedIconWell: () => NestedIconWell,\n splitNestedControl: () => splitNestedControl,\n useWidgetChrome: () => useWidgetChrome\n});\nmodule.exports = __toCommonJS(widgetChrome_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_tamagui = require(\"tamagui\");\nfunction splitNestedControl(nested) {\n var { px, hitSlop, ...box } = nested;\n return {\n px,\n hitSlop,\n box\n };\n}\nfunction useWidgetChrome(onPress) {\n var resolved = (0, import_theme.useResolvedKnobs)();\n var { knobProps, control } = resolved;\n var nested = splitNestedControl(knobProps.nestedControl);\n var interactive = onPress ? {\n cursor: \"pointer\",\n hoverStyle: control.hoverKnobProps,\n pressStyle: control.pressKnobProps,\n focusVisibleStyle: control.focusVisibleKnobProps,\n onPress,\n role: \"button\"\n } : void 0;\n return {\n knobProps,\n control,\n nested,\n interactive\n };\n}\nfunction NestedIconWell(param) {\n var { color, box, px, radius, children } = param;\n var identity = (0, import_theme.useChartPalette)().single;\n var fill = color || identity;\n var ink = (0, import_theme.useReadableTextOn)(fill);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ...box,\n ...radius,\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: fill,\n color: ink,\n overflow: \"hidden\",\n \"data-nested-px\": px,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme.IconSlot, {\n icon: children,\n color: ink\n })\n });\n}\n//# sourceMappingURL=widgetChrome.js.map\n"],"mappings":"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","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/components",
3
- "version": "7.69.2",
3
+ "version": "7.71.0",
4
4
  "description": "multiplatform.one ui components",
5
5
  "keywords": [
6
6
  "components",
@@ -58,11 +58,11 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@floating-ui/react": "^0.27.20",
61
- "@multiplatform.one/forms": "^7.69.2",
62
- "@multiplatform.one/i18n": "^7.69.2",
63
- "@multiplatform.one/platform": "^7.69.2",
64
- "@multiplatform.one/router": "^7.69.2",
65
- "@multiplatform.one/theme": "^7.69.2",
61
+ "@multiplatform.one/forms": "^7.71.0",
62
+ "@multiplatform.one/i18n": "^7.71.0",
63
+ "@multiplatform.one/platform": "^7.71.0",
64
+ "@multiplatform.one/router": "^7.71.0",
65
+ "@multiplatform.one/theme": "^7.71.0",
66
66
  "@phosphor-icons/react": "^2.1.10",
67
67
  "@shopify/flash-list": "^2.3.1",
68
68
  "@tamagui/colors": "2.7.6",
@@ -89,9 +89,9 @@
89
89
  "tamagui": "2.7.6"
90
90
  },
91
91
  "devDependencies": {
92
- "@multiplatform.one/config": "7.69.2",
93
- "@multiplatform.one/storybook": "7.69.2",
94
- "@multiplatform.one/test-utils": "7.69.2",
92
+ "@multiplatform.one/config": "7.71.0",
93
+ "@multiplatform.one/storybook": "7.71.0",
94
+ "@multiplatform.one/test-utils": "7.71.0",
95
95
  "@tamagui/build": "2.7.6",
96
96
  "@testing-library/jest-dom": "^7.0.1",
97
97
  "@testing-library/react": "^16.3.3",
@@ -40,11 +40,22 @@ import { withInterp } from "../shared/t";
40
40
  export type DotVariant = "dots" | "bars" | "pills";
41
41
 
42
42
  /**
43
- * What the dots stand for. The two idioms differ only in a11y vocabulary:
43
+ * What the dots stand for. The idioms differ only in a11y vocabulary:
44
44
  * a carousel marks its current slide (`aria-current="true"`, "Go to item N"),
45
- * a wizard marks its current step (`aria-current="step"`, "Go to step N").
45
+ * a wizard marks its current step (`aria-current="step"`, "Go to step N"),
46
+ * a pager marks its current page (`aria-current="page"`, "Go to page N").
46
47
  */
47
- export type DotIdiom = "item" | "step";
48
+ export type DotIdiom = "item" | "step" | "page";
49
+
50
+ /**
51
+ * How a long strip collapses to its window.
52
+ *
53
+ * - `distance` — Instagram / Swiper `dynamicBullets`: marks shrink with their
54
+ * distance from the active one.
55
+ * - `edge` — iOS UIPageControl: every mark in the window is full size except
56
+ * the last two toward an edge with more pages beyond it.
57
+ */
58
+ export type DotWindowing = "distance" | "edge";
48
59
 
49
60
  export interface DotIndicatorProps {
50
61
  /** Total number of dots */
@@ -77,6 +88,10 @@ export interface DotIndicatorProps {
77
88
  * `data-pagination-dot`, which probes and specs already assert against.
78
89
  */
79
90
  dotStateAttribute?: string;
91
+ /** Marks shown before the strip windows (default 5) */
92
+ maxVisible?: number;
93
+ /** How the window shrinks its marks (default `distance`) */
94
+ windowing?: DotWindowing;
80
95
  }
81
96
 
82
97
  // ── Knob mappings ─────────────────────────────────────────────
@@ -135,9 +150,9 @@ function activeMarkWidth(variant: DotVariant, itemSize: number, geometryActive:
135
150
  return geometryActive;
136
151
  }
137
152
 
138
- function windowRange(active: number, total: number): [number, number] {
139
- if (total <= WINDOW) return [0, Math.max(0, total - 1)];
140
- const half = Math.floor(WINDOW / 2);
153
+ function windowRange(active: number, total: number, size: number): [number, number] {
154
+ if (total <= size) return [0, Math.max(0, total - 1)];
155
+ const half = Math.floor(size / 2);
141
156
  let start = active - half;
142
157
  let end = active + half;
143
158
  if (start < 0) {
@@ -157,9 +172,19 @@ function windowScale(
157
172
  start: number,
158
173
  end: number,
159
174
  total: number,
175
+ size: number,
176
+ windowing: DotWindowing,
160
177
  ): number {
161
- if (total <= WINDOW) return 1;
178
+ if (total <= size) return 1;
162
179
  if (index < start || index > end) return 0;
180
+ if (windowing === "edge") {
181
+ if (index === active) return 1;
182
+ const moreBefore = start > 0;
183
+ const moreAfter = end < total - 1;
184
+ if ((moreBefore && index === start) || (moreAfter && index === end)) return 0.5;
185
+ if ((moreBefore && index === start + 1) || (moreAfter && index === end - 1)) return 0.75;
186
+ return 1;
187
+ }
163
188
  const dist = Math.abs(index - active);
164
189
  if (dist === 0) return 1;
165
190
  if (dist === 1) return 0.72;
@@ -273,6 +298,8 @@ export function DotIndicator({
273
298
  activeDotSize,
274
299
  transition,
275
300
  dotStateAttribute = "data-dot-state",
301
+ maxVisible = WINDOW,
302
+ windowing = "distance",
276
303
  }: DotIndicatorProps) {
277
304
  const { t } = useTranslation();
278
305
  const { knobProps } = useResolvedKnobs();
@@ -302,9 +329,13 @@ export function DotIndicator({
302
329
  // No onChange means the indicator is read-only (informational), which is
303
330
  // different from disabled (interactive but blocked)
304
331
  const interactive = !disabled && !!onChange;
305
- const isStep = idiom === "step";
306
- const label = isStep ? t("Go to step {{number}}") : t("Go to item {{number}}");
307
- const currentValue = isStep ? "step" : "true";
332
+ const label =
333
+ idiom === "step"
334
+ ? t("Go to step {{number}}")
335
+ : idiom === "page"
336
+ ? t("Go to page {{number}}")
337
+ : t("Go to item {{number}}");
338
+ const currentValue = idiom === "item" ? "true" : idiom;
308
339
  // LC-68: motion gates on the resolved animation knob (undefined at "none"
309
340
  // / prefers-reduced-motion). Host `transition` may name the tween but cannot
310
341
  // re-enable motion the knob turned off.
@@ -312,7 +343,8 @@ export function DotIndicator({
312
343
  ? (transition ?? knobProps.motion.slide.transition)
313
344
  : undefined;
314
345
  const clampedActive = Math.min(Math.max(0, activeIndex), Math.max(0, total - 1));
315
- const [winStart, winEnd] = windowRange(clampedActive, total);
346
+ const windowSize = Math.max(1, Math.floor(maxVisible));
347
+ const [winStart, winEnd] = windowRange(clampedActive, total, windowSize);
316
348
 
317
349
  const focusMark = (index: number) => {
318
350
  requestAnimationFrame(() => {
@@ -343,7 +375,15 @@ export function DotIndicator({
343
375
  const isActive = index === activeIndex;
344
376
  // Completion is what a step ALREADY did; the current step outranks it.
345
377
  const isCompleted = !isActive && !!completedSteps?.has(index);
346
- const scale = windowScale(index, clampedActive, winStart, winEnd, total);
378
+ const scale = windowScale(
379
+ index,
380
+ clampedActive,
381
+ winStart,
382
+ winEnd,
383
+ total,
384
+ windowSize,
385
+ windowing,
386
+ );
347
387
  const hidden = scale === 0;
348
388
  const baseWidth = isActive ? activeSize : idleWidth;
349
389
  const dotWidth = Math.max(1, Math.round(baseWidth * scale));
@@ -0,0 +1,105 @@
1
+ /**
2
+ * FZ-7889: the phone list pager is the dot strip, the iOS UIPageControl
3
+ * idiom. Clay: "why don't you use the nice page[r] that I created ... It
4
+ * didn't have like the numbers in it it was like dots".
5
+ *
6
+ * - A `page` strip names its dots "Go to page N" and marks the current one
7
+ * `aria-current="page"`.
8
+ * - `windowing="edge"` shows a window of full-size dots and shrinks only the
9
+ * last two toward an edge with more pages beyond it.
10
+ * - `<Pagination variant="dots" idiom="page">` is that strip between chevrons:
11
+ * seven dots at most, every dot jumps, the forward control never submits.
12
+ */
13
+
14
+ import { fireEvent } from "@testing-library/react";
15
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
16
+ import { describe, expect, it, vi } from "vitest";
17
+ import { Pagination } from "../Pagination";
18
+ import { DotIndicator } from "./index";
19
+
20
+ const heights = (container: HTMLElement) =>
21
+ Array.from(container.querySelectorAll<HTMLElement>("[data-dot-index]"))
22
+ .filter((target) => target.getAttribute("data-dot-hidden") !== "true")
23
+ .map((target) =>
24
+ Number(target.querySelector("[data-mark-height]")?.getAttribute("data-mark-height")),
25
+ );
26
+
27
+ describe("DotIndicator page idiom (FZ-7889)", () => {
28
+ it("names its dots as pages", () => {
29
+ const { container } = renderWithProviders(
30
+ <DotIndicator total={3} activeIndex={1} idiom="page" onChange={() => {}} />,
31
+ );
32
+ expect(container.querySelectorAll("[aria-label^='Go to page']")).toHaveLength(3);
33
+ expect(container.querySelector("[aria-current='page']")?.getAttribute("aria-label")).toBe(
34
+ "Go to page 2",
35
+ );
36
+ });
37
+
38
+ it("edge windowing keeps the window full size and shrinks the two dots before more pages", () => {
39
+ const { container } = renderWithProviders(
40
+ <DotIndicator total={20} activeIndex={10} maxVisible={7} windowing="edge" />,
41
+ );
42
+ const visible = heights(container);
43
+ expect(visible).toHaveLength(7);
44
+ const full = visible[3];
45
+ expect(visible[0]).toBeLessThan(visible[1]);
46
+ expect(visible[1]).toBeLessThan(full);
47
+ expect(visible[2]).toBe(full);
48
+ expect(visible[4]).toBe(full);
49
+ expect(visible[5]).toBeLessThan(full);
50
+ expect(visible[6]).toBeLessThan(visible[5]);
51
+ });
52
+
53
+ it("at the first page no dot shrinks toward the start", () => {
54
+ const { container } = renderWithProviders(
55
+ <DotIndicator total={20} activeIndex={0} maxVisible={7} windowing="edge" />,
56
+ );
57
+ const visible = heights(container);
58
+ expect(visible).toHaveLength(7);
59
+ expect(visible[1]).toBe(visible[2]);
60
+ expect(visible[2]).toBe(visible[4]);
61
+ expect(visible[6]).toBeLessThan(visible[4]);
62
+ });
63
+
64
+ it("a short strip never windows or shrinks", () => {
65
+ const { container } = renderWithProviders(
66
+ <DotIndicator total={5} activeIndex={2} maxVisible={7} windowing="edge" />,
67
+ );
68
+ const visible = heights(container);
69
+ expect(visible).toHaveLength(5);
70
+ expect(new Set(visible).size).toBe(1);
71
+ });
72
+ });
73
+
74
+ describe("Pagination idiom page (FZ-7889)", () => {
75
+ it("is the dot strip between chevrons: no page numbers, at most seven dots", () => {
76
+ const { container, queryByText } = renderWithProviders(
77
+ <Pagination variant="dots" idiom="page" total={12} page={6} />,
78
+ );
79
+ expect(container.querySelector("[aria-label='Go to previous page']")).not.toBeNull();
80
+ expect(container.querySelector("[aria-label='Go to next page']")).not.toBeNull();
81
+ expect(container.querySelector("[aria-label='Submit']")).toBeNull();
82
+ expect(queryByText("6")).toBeNull();
83
+ expect(container.querySelectorAll("[data-pagination-dot]")).toHaveLength(12);
84
+ const shown = Array.from(container.querySelectorAll("[data-dot-index]")).filter(
85
+ (dot) => dot.getAttribute("data-dot-hidden") !== "true",
86
+ );
87
+ expect(shown).toHaveLength(7);
88
+ expect(container.querySelector("[aria-current='page']")?.getAttribute("aria-label")).toBe(
89
+ "Go to page 6",
90
+ );
91
+ });
92
+
93
+ it("every dot jumps to its page, and next stops at the last page", () => {
94
+ const onPageChange = vi.fn();
95
+ const { container } = renderWithProviders(
96
+ <Pagination variant="dots" idiom="page" total={3} page={3} onPageChange={onPageChange} />,
97
+ );
98
+ fireEvent.click(container.querySelector("[aria-label='Go to page 1']")!);
99
+ expect(onPageChange).toHaveBeenLastCalledWith(1);
100
+ const next = container.querySelector("[aria-label='Go to next page']")!;
101
+ expect(next.getAttribute("aria-disabled") === "true" || next.hasAttribute("disabled")).toBe(
102
+ true,
103
+ );
104
+ });
105
+ });
@@ -245,3 +245,26 @@ export const Simple: Story = {
245
245
  </YStack>
246
246
  ),
247
247
  };
248
+
249
+ export const PageDots: Story = {
250
+ parameters: {
251
+ docs: {
252
+ description: {
253
+ story:
254
+ 'The phone list pager (FZ-7889): `idiom="page"` on the dot strip, the iOS ' +
255
+ "UIPageControl idiom. Chevrons, no numbers, every dot jumps, and past seven pages " +
256
+ "the strip windows with the two dots toward more pages shrinking.",
257
+ },
258
+ },
259
+ },
260
+ render: () => {
261
+ const [few, setFew] = useState(2);
262
+ const [many, setMany] = useState(10);
263
+ return (
264
+ <YStack gap="$4">
265
+ <Pagination variant="dots" idiom="page" total={3} page={few} onPageChange={setFew} />
266
+ <Pagination variant="dots" idiom="page" total={20} page={many} onPageChange={setMany} />
267
+ </YStack>
268
+ );
269
+ },
270
+ };
@@ -139,8 +139,17 @@ export interface PaginationProps extends Omit<XStackProps, "children" | "onChang
139
139
  boundaryCount?: number;
140
140
  /** Show first/last double-chevron buttons (numbered variant) */
141
141
  showFirstLast?: boolean;
142
+ /**
143
+ * What a dot strip counts. `step` (default) is the wizard; `page` is the
144
+ * iOS UIPageControl pager for a list: chevrons, every dot jumps to its
145
+ * page, and a long strip windows to seven with shrinking edge dots.
146
+ */
147
+ idiom?: "step" | "page";
142
148
  }
143
149
 
150
+ /** UIPageControl shows about seven dots before it windows. */
151
+ const pageDotWindow = 7;
152
+
144
153
  export function Pagination({
145
154
  total,
146
155
  activeIndex,
@@ -161,6 +170,7 @@ export function Pagination({
161
170
  boundaryCount = 1,
162
171
  showFirstLast = false,
163
172
  openEnded = false,
173
+ idiom = "step",
164
174
  ...stackProps
165
175
  }: PaginationProps) {
166
176
  const { t } = useTranslation();
@@ -246,7 +256,8 @@ export function Pagination({
246
256
 
247
257
  const isSimple = variant === "simple";
248
258
  const isNumbered = variant === "numbered";
249
- const isPageNavigation = isNumbered || isSimple;
259
+ const pageDots = idiom === "page" && !isNumbered && !isSimple;
260
+ const isPageNavigation = isNumbered || isSimple || pageDots;
250
261
 
251
262
  // The two idioms differ in which glyphs the controls take, whether the
252
263
  // control is circular, and whether the last step submits — not in structure.
@@ -384,24 +395,25 @@ export function Pagination({
384
395
  total={total}
385
396
  activeIndex={index}
386
397
  variant={variant}
387
- idiom="step"
398
+ idiom={pageDots ? "page" : "step"}
399
+ {...(pageDots ? { maxVisible: pageDotWindow, windowing: "edge" as const } : undefined)}
388
400
  rail
389
401
  completedSteps={completedSteps}
390
402
  dotSize={step.mark}
391
403
  activeDotSize={step.active}
392
404
  transition={motionTransition}
393
405
  dotStateAttribute="data-pagination-dot"
394
- onChange={allowJumpTo && !disabled ? goTo : undefined}
406
+ onChange={(allowJumpTo || pageDots) && !disabled ? goTo : undefined}
395
407
  // A strip nobody can press has no disabled state — only a jumpable
396
408
  // one is "interactive but blocked".
397
- disabled={allowJumpTo && disabled}
409
+ disabled={(allowJumpTo || pageDots) && disabled}
398
410
  />
399
411
  )}
400
412
 
401
413
  <Button
402
414
  size={knobProps.sizeToken}
403
415
  chromeless={!submits}
404
- theme={submits ? "active" : undefined}
416
+ accent={submits}
405
417
  icon={isPageNavigation ? NextIcon : submits ? CheckIcon : NextArrowIcon}
406
418
  onPress={handleNext}
407
419
  disabled={!canNext}
@@ -1,13 +1,26 @@
1
1
  import { renderWithProviders } from "@multiplatform.one/test-utils";
2
+ import { createDefaultThemeConfig } from "@multiplatform.one/theme";
3
+ import type { ReactElement } from "react";
4
+ import { TamaguiProvider } from "tamagui";
2
5
  import { describe, expect, it } from "vitest";
3
- import { componentColors } from "../componentColors";
4
6
  import { Tabs } from "./index";
5
7
 
8
+ const houseConfig = createDefaultThemeConfig();
9
+
10
+ function renderWithHouseThemes(ui: ReactElement) {
11
+ return renderWithProviders(
12
+ <TamaguiProvider config={houseConfig.tamagui} defaultTheme="light">
13
+ {ui}
14
+ </TamaguiProvider>,
15
+ { tamagui: false },
16
+ );
17
+ }
18
+
6
19
  describe("selected tab ink follows the selection tier", () => {
7
20
  it.each([undefined, "rebeccapurple"])(
8
21
  "inherits selection ink without replacing explicit icon colour %s",
9
22
  (color) => {
10
- const result = renderWithProviders(
23
+ const result = renderWithHouseThemes(
11
24
  <Tabs
12
25
  value="one"
13
26
  items={[
@@ -16,19 +29,17 @@ describe("selected tab ink follows the selection tier", () => {
16
29
  />,
17
30
  );
18
31
  const icon = result.getByTestId("tab-icon");
19
- expect(icon.parentElement!.className).toContain("_col-color12");
32
+ expect(icon.parentElement!.className).toContain("_col-selectedCol");
20
33
  expect(icon.getAttribute("color")).toBe(color ?? null);
21
34
  },
22
35
  );
23
36
  it.each(["band", "contained", "underline"] as const)(
24
- "uses selection ink for %s tabs",
37
+ "uses the accent selected ink for %s tabs",
25
38
  (variant) => {
26
- const result = renderWithProviders(
39
+ const result = renderWithHouseThemes(
27
40
  <Tabs variant={variant} value="one" items={[{ value: "one", label: "Selected" }]} />,
28
41
  );
29
- expect(result.getByText("Selected").className).toContain(
30
- `_col-${componentColors.selection.ink.slice(1)}`,
31
- );
42
+ expect(result.getByText("Selected").className).toContain("_col-selectedCol");
32
43
  },
33
44
  );
34
45
  });
@@ -219,20 +219,17 @@ describe("Tabs selection indicator colour", () => {
219
219
  fireEvent.pointerDown(selected);
220
220
  expect(indicator.className).toContain("_bg-color5");
221
221
  fireEvent[event](selected);
222
- expect(indicator.className).toContain("_bg-color4");
222
+ expect(indicator.className).toContain("_bg-selectedBac");
223
223
  },
224
224
  );
225
225
 
226
- it.each([undefined, "accent"] as const)(
227
- "keeps %s underline on the host selection ink",
228
- (intent) => {
229
- const tree = renderSelectionTabs({ accent: intent === "accent" });
230
- act(() => observed.interactions.get("tab-5")("select", last));
231
- const indicator = tree.container.querySelector('[data-tabs-indicator="underline"]')!;
232
- expect(indicator.className).toContain("_bg-color12");
233
- expect(indicator.getAttribute("data-observed-theme")).toBe("light");
234
- },
235
- );
226
+ it.each([undefined, "accent"] as const)("keeps %s underline on the host accent", (intent) => {
227
+ const tree = renderSelectionTabs({ accent: intent === "accent" });
228
+ act(() => observed.interactions.get("tab-5")("select", last));
229
+ const indicator = tree.container.querySelector('[data-tabs-indicator="underline"]')!;
230
+ expect(indicator.className).toContain("_bg-accentBackg");
231
+ expect(indicator.getAttribute("data-observed-theme")).toBe("light");
232
+ });
236
233
 
237
234
  it.each(["error", "warning", "success"] as const)(
238
235
  "keeps %s underline in its intent theme",
@@ -245,11 +242,11 @@ describe("Tabs selection indicator colour", () => {
245
242
  },
246
243
  );
247
244
 
248
- it("paints the contained thumb with the host selection fill", () => {
245
+ it("paints the contained thumb with the host accent tint", () => {
249
246
  const tree = renderSelectionTabs({ variant: "contained" });
250
247
  act(() => observed.interactions.get("tab-5")("select", last));
251
248
  const indicator = tree.container.querySelector('[data-tabs-indicator="thumb"]')!;
252
- expect(indicator.className).toContain("_bg-color4");
249
+ expect(indicator.className).toContain("_bg-selectedBac");
253
250
  expect(indicator.getAttribute("data-observed-theme")).toBe("light");
254
251
  const selected = tree.getByRole("tab", { name: "Tab 6" });
255
252
  fireEvent.pointerEnter(selected);
@@ -258,6 +255,6 @@ describe("Tabs selection indicator colour", () => {
258
255
  expect(indicator.className).toContain("_bg-color5");
259
256
  fireEvent.pointerUp(selected);
260
257
  fireEvent.pointerLeave(selected);
261
- expect(indicator.className).toContain("_bg-color4");
258
+ expect(indicator.className).toContain("_bg-selectedBac");
262
259
  });
263
260
  });
@@ -1,7 +1,9 @@
1
1
  import { renderWithProviders } from "@multiplatform.one/test-utils";
2
+ import { createDefaultThemeConfig } from "@multiplatform.one/theme";
2
3
  import { afterEach, describe, expect, it, vi } from "vitest";
3
4
  import { Tabs } from "./index";
4
5
  import { act, cleanup } from "@testing-library/react";
6
+ import { TamaguiProvider } from "tamagui";
5
7
 
6
8
  const observed = vi.hoisted(() => ({ triggers: new Map<string, any>() }));
7
9
 
@@ -23,6 +25,8 @@ vi.mock("tamagui", async (importOriginal) => {
23
25
  };
24
26
  });
25
27
 
28
+ const houseConfig = createDefaultThemeConfig();
29
+
26
30
  afterEach(() => {
27
31
  cleanup();
28
32
  observed.triggers.clear();
@@ -31,19 +35,22 @@ afterEach(() => {
31
35
  describe("native Tabs accessibility contract", () => {
32
36
  it("paints and clears contained thumb feedback through native press handlers", () => {
33
37
  const result = renderWithProviders(
34
- <Tabs variant="contained" value="one" items={[{ value: "one", label: "One" }]} />,
38
+ <TamaguiProvider config={houseConfig.tamagui} defaultTheme="light">
39
+ <Tabs variant="contained" value="one" items={[{ value: "one", label: "One" }]} />
40
+ </TamaguiProvider>,
41
+ { tamagui: false },
35
42
  );
36
43
  act(() =>
37
44
  observed.triggers.get("one").onInteraction("select", { x: 0, y: 0, width: 100, height: 40 }),
38
45
  );
39
46
  const indicator = result.container.querySelector('[data-tabs-indicator="thumb"]')!;
40
- expect(indicator.className).toContain("_bg-color4");
47
+ expect(indicator.className).toContain("_bg-selectedBac");
41
48
  expect(observed.triggers.get("one").onPressIn).toBeTypeOf("function");
42
49
  expect(observed.triggers.get("one").onPressOut).toBeTypeOf("function");
43
50
  act(() => observed.triggers.get("one").onPressIn());
44
51
  expect(indicator.className).toContain("_bg-color5");
45
52
  act(() => observed.triggers.get("one").onPressOut());
46
- expect(indicator.className).toContain("_bg-color4");
53
+ expect(indicator.className).toContain("_bg-selectedBac");
47
54
  });
48
55
  it("names each button and exposes selected and disabled states", () => {
49
56
  const result = renderWithProviders(
@@ -625,7 +625,7 @@ function TabsRoot({
625
625
  <UnderlineIndicator
626
626
  x={activeLayout.x}
627
627
  width={activeLayout.width}
628
- backgroundColor={indicatorTheme ? "$color9" : componentColors.selection.ink}
628
+ backgroundColor={indicatorTheme ? "$color9" : componentColors.indicator.mark}
629
629
  data-tabs-indicator="underline"
630
630
  {...transitionProps(knobProps.motion.control, ["width"])}
631
631
  />
@@ -640,7 +640,7 @@ function TabsRoot({
640
640
  ? componentColors.selection.press
641
641
  : hoverValue === currentValue
642
642
  ? componentColors.selection.hover
643
- : componentColors.selection.background
643
+ : "$selectedBackground"
644
644
  }
645
645
  data-tabs-indicator="thumb"
646
646
  {...thumbRadius}
@@ -834,12 +834,12 @@ function TabsRoot({
834
834
  backgroundColor={
835
835
  isBand || isActive || isDisabled ? "transparent" : feedbackBackground
836
836
  }
837
- {...(isActive && !isDisabled ? { color: componentColors.selection.ink } : undefined)}
837
+ {...(isActive && !isDisabled ? { color: "$selectedColor" } : undefined)}
838
838
  {...(kbRing ? keyboardFocusRingProps : undefined)}
839
839
  >
840
840
  <IconSlot
841
841
  icon={item.icon}
842
- color={isActive && !isDisabled ? componentColors.selection.ink : undefined}
842
+ color={isActive && !isDisabled ? "$selectedColor" : undefined}
843
843
  />
844
844
  <TabLabel
845
845
  flexShrink={1}
@@ -851,7 +851,7 @@ function TabsRoot({
851
851
  isDisabled
852
852
  ? disabledState.textKnobProps.color
853
853
  : isActive
854
- ? componentColors.selection.ink
854
+ ? "$selectedColor"
855
855
  : knobProps.textRole.label.color
856
856
  }
857
857
  >