@multiplatform.one/components 7.66.0 → 7.67.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 (505) hide show
  1. package/dist/cjs/Accordion/index.native.js +1 -1
  2. package/dist/cjs/Accordion/index.native.js.map +1 -1
  3. package/dist/cjs/Alert/index.cjs +5 -0
  4. package/dist/cjs/Alert/index.native.js +5 -0
  5. package/dist/cjs/Alert/index.native.js.map +1 -1
  6. package/dist/cjs/AnimateHeight/index.native.js.map +1 -1
  7. package/dist/cjs/Avatar/getInitials.cjs +6 -34
  8. package/dist/cjs/Avatar/getInitials.native.js +8 -34
  9. package/dist/cjs/Avatar/getInitials.native.js.map +1 -1
  10. package/dist/cjs/Avatar/index.cjs +28 -23
  11. package/dist/cjs/Avatar/index.native.js +30 -25
  12. package/dist/cjs/Avatar/index.native.js.map +1 -1
  13. package/dist/cjs/Badge/index.native.js.map +1 -1
  14. package/dist/cjs/Button.native.js.map +1 -1
  15. package/dist/cjs/Card.cjs +67 -11
  16. package/dist/cjs/Card.native.js +71 -11
  17. package/dist/cjs/Card.native.js.map +1 -1
  18. package/dist/cjs/CardFooter.native.js.map +1 -1
  19. package/dist/cjs/CardHeader.native.js.map +1 -1
  20. package/dist/cjs/Carousel/index.native.js +3 -3
  21. package/dist/cjs/Carousel/index.native.js.map +1 -1
  22. package/dist/cjs/Chip/index.cjs +54 -8
  23. package/dist/cjs/Chip/index.native.js +57 -10
  24. package/dist/cjs/Chip/index.native.js.map +1 -1
  25. package/dist/cjs/Collapsible.native.js.map +1 -1
  26. package/dist/cjs/ContextMenu/index.native.js.map +1 -1
  27. package/dist/cjs/CopyField/index.native.js.map +1 -1
  28. package/dist/cjs/Dialog.native.js.map +1 -1
  29. package/dist/cjs/DotIndicator/index.native.js.map +1 -1
  30. package/dist/cjs/DropdownMenu/index.cjs +5 -2
  31. package/dist/cjs/DropdownMenu/index.native.js +5 -2
  32. package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
  33. package/dist/cjs/DropdownMenu/menuSettle.native.js.map +1 -1
  34. package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
  35. package/dist/cjs/Heading.native.js.map +1 -1
  36. package/dist/cjs/Kbd/index.native.js.map +1 -1
  37. package/dist/cjs/Kbd/keys.native.js.map +1 -1
  38. package/dist/cjs/Lightbox/MediaControl.native.js +1 -1
  39. package/dist/cjs/Lightbox/MediaControl.native.js.map +1 -1
  40. package/dist/cjs/Lightbox/index.gnome.native.js.map +1 -1
  41. package/dist/cjs/Lightbox/index.native.js +1 -1
  42. package/dist/cjs/Lightbox/shared.native.js.map +1 -1
  43. package/dist/cjs/Lightbox/useLightbox.native.js.map +1 -1
  44. package/dist/cjs/Material/index.native.js.map +1 -1
  45. package/dist/cjs/Meter/index.native.js +1 -1
  46. package/dist/cjs/Meter/index.native.js.map +1 -1
  47. package/dist/cjs/Meter/meter.native.js.map +1 -1
  48. package/dist/cjs/OverflowRow/index.cjs +3 -1
  49. package/dist/cjs/OverflowRow/index.native.js +4 -2
  50. package/dist/cjs/OverflowRow/index.native.js.map +1 -1
  51. package/dist/cjs/Pagination.cjs +4 -4
  52. package/dist/cjs/Pagination.native.js +4 -4
  53. package/dist/cjs/Pagination.native.js.map +1 -1
  54. package/dist/cjs/Popover.native.js.map +1 -1
  55. package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
  56. package/dist/cjs/Quote/index.native.js.map +1 -1
  57. package/dist/cjs/ScrollView/revealFocusedField.native.js.map +1 -1
  58. package/dist/cjs/Separator/index.native.js.map +1 -1
  59. package/dist/cjs/Sheet.native.js.map +1 -1
  60. package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -1
  61. package/dist/cjs/SheetModal/SheetNavigation.cjs +104 -0
  62. package/dist/cjs/SheetModal/SheetNavigation.native.js +132 -0
  63. package/dist/cjs/SheetModal/SheetNavigation.native.js.map +1 -0
  64. package/dist/cjs/SheetModal/detents.native.js.map +1 -1
  65. package/dist/cjs/SheetModal/index.cjs +24 -16
  66. package/dist/cjs/SheetModal/index.native.js +86 -58
  67. package/dist/cjs/SheetModal/index.native.js.map +1 -1
  68. package/dist/cjs/SheetModal/useSheetFrameFocus.native.js.map +1 -1
  69. package/dist/cjs/Skeleton/index.native.js.map +1 -1
  70. package/dist/cjs/SkipLink/index.native.js.map +1 -1
  71. package/dist/cjs/SortableList/SortableHandle.native.js.map +1 -1
  72. package/dist/cjs/SortableList/index.native.js.map +1 -1
  73. package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
  74. package/dist/cjs/Tabs/index.native.js +1 -1
  75. package/dist/cjs/Tabs/index.native.js.map +1 -1
  76. package/dist/cjs/Text.native.js.map +1 -1
  77. package/dist/cjs/ThemePresetPicker/index.native.js +2 -2
  78. package/dist/cjs/ThemePresetPicker/index.native.js.map +1 -1
  79. package/dist/cjs/Toast/index.native.js.map +1 -1
  80. package/dist/cjs/Toast/store.native.js.map +1 -1
  81. package/dist/cjs/Tooltip/nativePress.native.js.map +1 -1
  82. package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
  83. package/dist/cjs/TreeSelect/index.native.js +1 -1
  84. package/dist/cjs/TreeSelect/index.native.js.map +1 -1
  85. package/dist/cjs/TreeSelect/treeSelectModel.native.js.map +1 -1
  86. package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
  87. package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
  88. package/dist/cjs/Video/types.native.js.map +1 -1
  89. package/dist/cjs/Wheel/index.native.js.map +1 -1
  90. package/dist/cjs/Wizard/index.native.js +2 -2
  91. package/dist/cjs/Wizard/index.native.js.map +1 -1
  92. package/dist/cjs/actions/ActionBar.native.js.map +1 -1
  93. package/dist/cjs/actions/DangerSection.native.js.map +1 -1
  94. package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
  95. package/dist/cjs/actions/HeaderActions.native.js +2 -2
  96. package/dist/cjs/actions/HeaderActions.native.js.map +1 -1
  97. package/dist/cjs/actions/devWarn.native.js.map +1 -1
  98. package/dist/cjs/actions/index.native.js.map +1 -1
  99. package/dist/cjs/actions/severity.native.js.map +1 -1
  100. package/dist/cjs/appShell/BottomAccessory.native.js.map +1 -1
  101. package/dist/cjs/appShell/Dock.native.js.map +1 -1
  102. package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
  103. package/dist/cjs/appShell/SettingsSplit.native.js +1 -1
  104. package/dist/cjs/appShell/SettingsSplit.native.js.map +1 -1
  105. package/dist/cjs/appShell/Springboard.native.js +1 -1
  106. package/dist/cjs/appShell/Springboard.native.js.map +1 -1
  107. package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
  108. package/dist/cjs/appShell/TabBar.native.js +1 -1
  109. package/dist/cjs/appShell/TabBar.native.js.map +1 -1
  110. package/dist/cjs/appShell/TabHost.cjs +51 -0
  111. package/dist/cjs/appShell/TabHost.native.js +151 -0
  112. package/dist/cjs/appShell/TabHost.native.js.map +1 -0
  113. package/dist/cjs/appShell/appTile.native.js +1 -1
  114. package/dist/cjs/appShell/appTile.native.js.map +1 -1
  115. package/dist/cjs/appShell/bottomChrome.native.js.map +1 -1
  116. package/dist/cjs/appShell/index.cjs +2 -0
  117. package/dist/cjs/appShell/index.native.js +2 -0
  118. package/dist/cjs/appShell/index.native.js.map +1 -1
  119. package/dist/cjs/charts/Axis.native.js.map +1 -1
  120. package/dist/cjs/charts/BarChart.native.js.map +1 -1
  121. package/dist/cjs/charts/ChartDataView.native.js +1 -1
  122. package/dist/cjs/charts/ChartDataView.native.js.map +1 -1
  123. package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
  124. package/dist/cjs/charts/LineChart.native.js.map +1 -1
  125. package/dist/cjs/charts/PieChart.native.js.map +1 -1
  126. package/dist/cjs/charts/Sparkline.native.js.map +1 -1
  127. package/dist/cjs/charts/accessibility.native.js.map +1 -1
  128. package/dist/cjs/charts/chartHeight.native.js.map +1 -1
  129. package/dist/cjs/charts/composeChart.native.js.map +1 -1
  130. package/dist/cjs/charts/index.native.js.map +1 -1
  131. package/dist/cjs/charts/math.native.js.map +1 -1
  132. package/dist/cjs/charts/series.native.js.map +1 -1
  133. package/dist/cjs/charts/svg.native.js.map +1 -1
  134. package/dist/cjs/charts/types.native.js.map +1 -1
  135. package/dist/cjs/charts/useChartTheme.native.js.map +1 -1
  136. package/dist/cjs/code/Code/index.native.js.map +1 -1
  137. package/dist/cjs/code/CodeBlock/index.native.js +7 -7
  138. package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
  139. package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
  140. package/dist/cjs/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
  141. package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
  142. package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
  143. package/dist/cjs/code/Pre/index.native.js.map +1 -1
  144. package/dist/cjs/code/index.native.js +5 -5
  145. package/dist/cjs/code/index.native.js.map +1 -1
  146. package/dist/cjs/componentColors.native.js.map +1 -1
  147. package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
  148. package/dist/cjs/feedback/NotifyHost.native.js +2 -2
  149. package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
  150. package/dist/cjs/feedback/copy.native.js.map +1 -1
  151. package/dist/cjs/feedback/index.native.js.map +1 -1
  152. package/dist/cjs/feedback/notify.native.js.map +1 -1
  153. package/dist/cjs/feedback/route.native.js.map +1 -1
  154. package/dist/cjs/feedback/store.native.js.map +1 -1
  155. package/dist/cjs/formLayouts/FormLayouts.native.js +1 -1
  156. package/dist/cjs/formLayouts/FormLayouts.native.js.map +1 -1
  157. package/dist/cjs/formLayouts/PreferencePanel.native.js +2 -2
  158. package/dist/cjs/formLayouts/PreferencePanel.native.js.map +1 -1
  159. package/dist/cjs/formLayouts/index.native.js.map +1 -1
  160. package/dist/cjs/hooks/index.native.js +1 -1
  161. package/dist/cjs/hooks/index.native.js.map +1 -1
  162. package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
  163. package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -1
  164. package/dist/cjs/hooks/useHoldCue.native.js.map +1 -1
  165. package/dist/cjs/icons/CheckRegular.native.js.map +1 -1
  166. package/dist/cjs/icons/MinusRegular.native.js.map +1 -1
  167. package/dist/cjs/icons/index.native.js.map +1 -1
  168. package/dist/cjs/icons/lucide.native.js.map +1 -1
  169. package/dist/cjs/icons/themed.native.js.map +1 -1
  170. package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
  171. package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
  172. package/dist/cjs/images/Image/framing.native.js.map +1 -1
  173. package/dist/cjs/images/Image/index.native.js +1 -1
  174. package/dist/cjs/images/Image/mediaRadius.native.js.map +1 -1
  175. package/dist/cjs/images/Image/shared.native.js +1 -1
  176. package/dist/cjs/images/Image/shared.native.js.map +1 -1
  177. package/dist/cjs/images/Image/types.native.js.map +1 -1
  178. package/dist/cjs/images/index.native.js.map +1 -1
  179. package/dist/cjs/index.native.js +35 -35
  180. package/dist/cjs/index.native.js.map +1 -1
  181. package/dist/cjs/knobImmuneExports.native.js.map +1 -1
  182. package/dist/cjs/layouts/AsyncBoundary.cjs +87 -0
  183. package/dist/cjs/layouts/AsyncBoundary.native.js +93 -2
  184. package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
  185. package/dist/cjs/layouts/Debug/index.native.js.map +1 -1
  186. package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
  187. package/dist/cjs/layouts/IdentityPlate.native.js.map +1 -1
  188. package/dist/cjs/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  189. package/dist/cjs/layouts/PageTemplates.cjs +1 -0
  190. package/dist/cjs/layouts/PageTemplates.native.js +2 -0
  191. package/dist/cjs/layouts/PageTemplates.native.js.map +1 -1
  192. package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
  193. package/dist/cjs/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  194. package/dist/cjs/layouts/StatusDot.native.js.map +1 -1
  195. package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
  196. package/dist/cjs/layouts/attachments.native.js +1 -1
  197. package/dist/cjs/layouts/attachments.native.js.map +1 -1
  198. package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
  199. package/dist/cjs/layouts/index.native.js +3 -3
  200. package/dist/cjs/layouts/index.native.js.map +1 -1
  201. package/dist/cjs/layouts/page.cjs +2 -11
  202. package/dist/cjs/layouts/page.native.js +8 -17
  203. package/dist/cjs/layouts/page.native.js.map +1 -1
  204. package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -1
  205. package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
  206. package/dist/cjs/layouts/shellSidebarSlot.native.js.map +1 -1
  207. package/dist/cjs/layouts/sidebar.cjs +51 -21
  208. package/dist/cjs/layouts/sidebar.native.js +54 -24
  209. package/dist/cjs/layouts/sidebar.native.js.map +1 -1
  210. package/dist/cjs/layouts/tags.native.js +2 -2
  211. package/dist/cjs/layouts/tags.native.js.map +1 -1
  212. package/dist/cjs/layouts/timeline.native.js +2 -2
  213. package/dist/cjs/layouts/timeline.native.js.map +1 -1
  214. package/dist/cjs/layouts/toolbar.cjs +9 -6
  215. package/dist/cjs/layouts/toolbar.native.js +10 -7
  216. package/dist/cjs/layouts/toolbar.native.js.map +1 -1
  217. package/dist/cjs/shared/actionScan.native.js.map +1 -1
  218. package/dist/cjs/shared/i18n.native.js.map +1 -1
  219. package/dist/cjs/shared/restoreRetries.native.js.map +1 -1
  220. package/dist/cjs/shared/t.native.js.map +1 -1
  221. package/dist/cjs/shared/textRidesText.native.js.map +1 -1
  222. package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -1
  223. package/dist/cjs/surfaces.native.js +1 -1
  224. package/dist/cjs/surfaces.native.js.map +1 -1
  225. package/dist/cjs/tamagui.native.js +1 -1
  226. package/dist/cjs/tamagui.native.js.map +1 -1
  227. package/dist/cjs/testSetup.native.js.map +1 -1
  228. package/dist/cjs/utils/setTinted.native.js.map +1 -1
  229. package/dist/cjs/utils/unwrapText.native.js.map +1 -1
  230. package/dist/cjs/views/Calendar.native.js +1 -1
  231. package/dist/cjs/views/Calendar.native.js.map +1 -1
  232. package/dist/cjs/views/Dashboard.native.js +2 -2
  233. package/dist/cjs/views/Dashboard.native.js.map +1 -1
  234. package/dist/cjs/views/Gantt.native.js +2 -2
  235. package/dist/cjs/views/Gantt.native.js.map +1 -1
  236. package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
  237. package/dist/cjs/views/ImageGrid.cjs +55 -14
  238. package/dist/cjs/views/ImageGrid.native.js +60 -17
  239. package/dist/cjs/views/ImageGrid.native.js.map +1 -1
  240. package/dist/cjs/views/Kanban.native.js +1 -1
  241. package/dist/cjs/views/List.native.js.map +1 -1
  242. package/dist/cjs/views/ListGroup.native.js.map +1 -1
  243. package/dist/cjs/views/ListRow.native.js.map +1 -1
  244. package/dist/cjs/views/Matrix.native.js +2 -2
  245. package/dist/cjs/views/Matrix.native.js.map +1 -1
  246. package/dist/cjs/views/ReportBuilder.native.js +2 -2
  247. package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
  248. package/dist/cjs/views/ShortcutCard.native.js.map +1 -1
  249. package/dist/cjs/views/TreeView.native.js.map +1 -1
  250. package/dist/cjs/views/calendarMath.native.js.map +1 -1
  251. package/dist/cjs/views/ganttIntervals.native.js.map +1 -1
  252. package/dist/cjs/views/ganttMath.native.js.map +1 -1
  253. package/dist/cjs/views/index.cjs +2 -0
  254. package/dist/cjs/views/index.native.js +3 -1
  255. package/dist/cjs/views/index.native.js.map +1 -1
  256. package/dist/cjs/views/kanbanDnd.native.js.map +1 -1
  257. package/dist/cjs/views/matrixMath.native.js.map +1 -1
  258. package/dist/cjs/views/treeViewDnd.native.js.map +1 -1
  259. package/dist/cjs/views/treeViewLayout.native.js.map +1 -1
  260. package/dist/cjs/views/treeViewMotion.native.js.map +1 -1
  261. package/dist/cjs/views/treeViewReveal.native.js.map +1 -1
  262. package/dist/cjs/views/widgetChrome.native.js.map +1 -1
  263. package/dist/esm/Alert/index.mjs +5 -0
  264. package/dist/esm/Alert/index.mjs.map +1 -1
  265. package/dist/esm/Alert/index.native.js +5 -0
  266. package/dist/esm/Alert/index.native.js.map +1 -1
  267. package/dist/esm/Avatar/getInitials.mjs +7 -32
  268. package/dist/esm/Avatar/getInitials.mjs.map +1 -1
  269. package/dist/esm/Avatar/getInitials.native.js +9 -32
  270. package/dist/esm/Avatar/getInitials.native.js.map +1 -1
  271. package/dist/esm/Avatar/index.mjs +30 -24
  272. package/dist/esm/Avatar/index.mjs.map +1 -1
  273. package/dist/esm/Avatar/index.native.js +32 -26
  274. package/dist/esm/Avatar/index.native.js.map +1 -1
  275. package/dist/esm/Card.mjs +69 -13
  276. package/dist/esm/Card.mjs.map +1 -1
  277. package/dist/esm/Card.native.js +73 -13
  278. package/dist/esm/Card.native.js.map +1 -1
  279. package/dist/esm/Chip/index.mjs +54 -9
  280. package/dist/esm/Chip/index.mjs.map +1 -1
  281. package/dist/esm/Chip/index.native.js +57 -11
  282. package/dist/esm/Chip/index.native.js.map +1 -1
  283. package/dist/esm/DropdownMenu/index.mjs +5 -2
  284. package/dist/esm/DropdownMenu/index.mjs.map +1 -1
  285. package/dist/esm/DropdownMenu/index.native.js +5 -2
  286. package/dist/esm/DropdownMenu/index.native.js.map +1 -1
  287. package/dist/esm/OverflowRow/index.mjs +4 -2
  288. package/dist/esm/OverflowRow/index.mjs.map +1 -1
  289. package/dist/esm/OverflowRow/index.native.js +4 -2
  290. package/dist/esm/OverflowRow/index.native.js.map +1 -1
  291. package/dist/esm/Pagination.mjs +4 -4
  292. package/dist/esm/Pagination.mjs.map +1 -1
  293. package/dist/esm/Pagination.native.js +3 -3
  294. package/dist/esm/Pagination.native.js.map +1 -1
  295. package/dist/esm/SheetModal/SheetNavigation.mjs +79 -0
  296. package/dist/esm/SheetModal/SheetNavigation.mjs.map +1 -0
  297. package/dist/esm/SheetModal/SheetNavigation.native.js +104 -0
  298. package/dist/esm/SheetModal/SheetNavigation.native.js.map +1 -0
  299. package/dist/esm/SheetModal/index.mjs +25 -17
  300. package/dist/esm/SheetModal/index.mjs.map +1 -1
  301. package/dist/esm/SheetModal/index.native.js +88 -60
  302. package/dist/esm/SheetModal/index.native.js.map +1 -1
  303. package/dist/esm/appShell/TabBar.mjs.map +1 -1
  304. package/dist/esm/appShell/TabHost.mjs +25 -0
  305. package/dist/esm/appShell/TabHost.mjs.map +1 -0
  306. package/dist/esm/appShell/TabHost.native.js +118 -0
  307. package/dist/esm/appShell/TabHost.native.js.map +1 -0
  308. package/dist/esm/appShell/index.mjs +2 -1
  309. package/dist/esm/appShell/index.mjs.map +1 -1
  310. package/dist/esm/appShell/index.native.js +2 -1
  311. package/dist/esm/appShell/index.native.js.map +1 -1
  312. package/dist/esm/layouts/AsyncBoundary.mjs +87 -0
  313. package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
  314. package/dist/esm/layouts/AsyncBoundary.native.js +91 -0
  315. package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
  316. package/dist/esm/layouts/PageTemplates.mjs +2 -1
  317. package/dist/esm/layouts/PageTemplates.mjs.map +1 -1
  318. package/dist/esm/layouts/PageTemplates.native.js +3 -1
  319. package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
  320. package/dist/esm/layouts/page.mjs +2 -11
  321. package/dist/esm/layouts/page.mjs.map +1 -1
  322. package/dist/esm/layouts/page.native.js +6 -15
  323. package/dist/esm/layouts/page.native.js.map +1 -1
  324. package/dist/esm/layouts/sidebar.mjs +51 -21
  325. package/dist/esm/layouts/sidebar.mjs.map +1 -1
  326. package/dist/esm/layouts/sidebar.native.js +53 -23
  327. package/dist/esm/layouts/sidebar.native.js.map +1 -1
  328. package/dist/esm/layouts/toolbar.mjs +9 -6
  329. package/dist/esm/layouts/toolbar.mjs.map +1 -1
  330. package/dist/esm/layouts/toolbar.native.js +9 -6
  331. package/dist/esm/layouts/toolbar.native.js.map +1 -1
  332. package/dist/esm/views/ImageGrid.mjs +53 -14
  333. package/dist/esm/views/ImageGrid.mjs.map +1 -1
  334. package/dist/esm/views/ImageGrid.native.js +56 -15
  335. package/dist/esm/views/ImageGrid.native.js.map +1 -1
  336. package/dist/esm/views/index.mjs +2 -2
  337. package/dist/esm/views/index.mjs.map +1 -1
  338. package/dist/esm/views/index.native.js +2 -2
  339. package/dist/esm/views/index.native.js.map +1 -1
  340. package/dist/jsx/Alert/index.mjs +5 -0
  341. package/dist/jsx/Alert/index.mjs.map +1 -1
  342. package/dist/jsx/Alert/index.native.js +5 -0
  343. package/dist/jsx/Alert/index.native.js.map +1 -1
  344. package/dist/jsx/Avatar/getInitials.mjs +7 -32
  345. package/dist/jsx/Avatar/getInitials.mjs.map +1 -1
  346. package/dist/jsx/Avatar/getInitials.native.js +8 -34
  347. package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
  348. package/dist/jsx/Avatar/index.mjs +30 -24
  349. package/dist/jsx/Avatar/index.mjs.map +1 -1
  350. package/dist/jsx/Avatar/index.native.js +30 -25
  351. package/dist/jsx/Avatar/index.native.js.map +1 -1
  352. package/dist/jsx/Card.mjs +69 -13
  353. package/dist/jsx/Card.mjs.map +1 -1
  354. package/dist/jsx/Card.native.js +71 -11
  355. package/dist/jsx/Card.native.js.map +1 -1
  356. package/dist/jsx/Chip/index.mjs +54 -9
  357. package/dist/jsx/Chip/index.mjs.map +1 -1
  358. package/dist/jsx/Chip/index.native.js +57 -10
  359. package/dist/jsx/Chip/index.native.js.map +1 -1
  360. package/dist/jsx/DropdownMenu/index.mjs +5 -2
  361. package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
  362. package/dist/jsx/DropdownMenu/index.native.js +5 -2
  363. package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
  364. package/dist/jsx/OverflowRow/index.mjs +4 -2
  365. package/dist/jsx/OverflowRow/index.mjs.map +1 -1
  366. package/dist/jsx/OverflowRow/index.native.js +3 -1
  367. package/dist/jsx/OverflowRow/index.native.js.map +1 -1
  368. package/dist/jsx/Pagination.mjs +4 -4
  369. package/dist/jsx/Pagination.mjs.map +1 -1
  370. package/dist/jsx/Pagination.native.js +3 -3
  371. package/dist/jsx/Pagination.native.js.map +1 -1
  372. package/dist/jsx/SheetModal/SheetNavigation.mjs +79 -0
  373. package/dist/jsx/SheetModal/SheetNavigation.mjs.map +1 -0
  374. package/dist/jsx/SheetModal/SheetNavigation.native.js +132 -0
  375. package/dist/jsx/SheetModal/SheetNavigation.native.js.map +1 -0
  376. package/dist/jsx/SheetModal/index.mjs +25 -17
  377. package/dist/jsx/SheetModal/index.mjs.map +1 -1
  378. package/dist/jsx/SheetModal/index.native.js +86 -58
  379. package/dist/jsx/SheetModal/index.native.js.map +1 -1
  380. package/dist/jsx/appShell/TabBar.mjs.map +1 -1
  381. package/dist/jsx/appShell/TabBar.native.js.map +1 -1
  382. package/dist/jsx/appShell/TabHost.mjs +25 -0
  383. package/dist/jsx/appShell/TabHost.mjs.map +1 -0
  384. package/dist/jsx/appShell/TabHost.native.js +151 -0
  385. package/dist/jsx/appShell/TabHost.native.js.map +1 -0
  386. package/dist/jsx/appShell/index.mjs +2 -1
  387. package/dist/jsx/appShell/index.mjs.map +1 -1
  388. package/dist/jsx/appShell/index.native.js +2 -0
  389. package/dist/jsx/appShell/index.native.js.map +1 -1
  390. package/dist/jsx/layouts/AsyncBoundary.mjs +87 -0
  391. package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
  392. package/dist/jsx/layouts/AsyncBoundary.native.js +91 -0
  393. package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
  394. package/dist/jsx/layouts/PageTemplates.mjs +2 -1
  395. package/dist/jsx/layouts/PageTemplates.mjs.map +1 -1
  396. package/dist/jsx/layouts/PageTemplates.native.js +2 -0
  397. package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
  398. package/dist/jsx/layouts/page.mjs +2 -11
  399. package/dist/jsx/layouts/page.mjs.map +1 -1
  400. package/dist/jsx/layouts/page.native.js +6 -15
  401. package/dist/jsx/layouts/page.native.js.map +1 -1
  402. package/dist/jsx/layouts/sidebar.mjs +51 -21
  403. package/dist/jsx/layouts/sidebar.mjs.map +1 -1
  404. package/dist/jsx/layouts/sidebar.native.js +53 -23
  405. package/dist/jsx/layouts/sidebar.native.js.map +1 -1
  406. package/dist/jsx/layouts/toolbar.mjs +9 -6
  407. package/dist/jsx/layouts/toolbar.mjs.map +1 -1
  408. package/dist/jsx/layouts/toolbar.native.js +9 -6
  409. package/dist/jsx/layouts/toolbar.native.js.map +1 -1
  410. package/dist/jsx/views/ImageGrid.mjs +53 -14
  411. package/dist/jsx/views/ImageGrid.mjs.map +1 -1
  412. package/dist/jsx/views/ImageGrid.native.js +58 -15
  413. package/dist/jsx/views/ImageGrid.native.js.map +1 -1
  414. package/dist/jsx/views/index.mjs +2 -2
  415. package/dist/jsx/views/index.mjs.map +1 -1
  416. package/dist/jsx/views/index.native.js +2 -0
  417. package/dist/jsx/views/index.native.js.map +1 -1
  418. package/package.json +13 -9
  419. package/src/Alert/Alert.spec.tsx +22 -0
  420. package/src/Alert/index.tsx +5 -0
  421. package/src/Avatar/Avatar.ink.spec.tsx +74 -0
  422. package/src/Avatar/Avatar.spec.tsx +35 -8
  423. package/src/Avatar/getInitials.ts +12 -30
  424. package/src/Avatar/index.tsx +37 -22
  425. package/src/Card.spec.tsx +45 -0
  426. package/src/Card.tsx +57 -18
  427. package/src/Chip/Chip.spec.tsx +72 -1
  428. package/src/Chip/index.tsx +86 -7
  429. package/src/DropdownMenu/DropdownMenu.avatarTrigger.spec.tsx +62 -0
  430. package/src/DropdownMenu/DropdownMenu.stories.tsx +45 -0
  431. package/src/DropdownMenu/index.tsx +7 -3
  432. package/src/OverflowRow/OverflowRow.native.spec.tsx +17 -2
  433. package/src/OverflowRow/index.tsx +6 -2
  434. package/src/Pagination.tsx +10 -6
  435. package/src/SheetModal/SheetModal.fill.spec.tsx +1 -1
  436. package/src/SheetModal/SheetModal.menus.spec.tsx +125 -26
  437. package/src/SheetModal/SheetModal.native.spec.tsx +35 -0
  438. package/src/SheetModal/SheetModal.regularWidth.native.spec.tsx +117 -0
  439. package/src/SheetModal/SheetModal.stories.tsx +16 -2
  440. package/src/SheetModal/SheetNavigation.tsx +93 -0
  441. package/src/SheetModal/index.native.tsx +108 -69
  442. package/src/SheetModal/index.tsx +33 -20
  443. package/src/Tabs/Tabs.stories.tsx +2 -2
  444. package/src/Tooltip/Tooltip.spec.tsx +2 -2
  445. package/src/appShell/TabBar.tsx +5 -0
  446. package/src/appShell/TabHost.native.spec.tsx +188 -0
  447. package/src/appShell/TabHost.native.tsx +154 -0
  448. package/src/appShell/TabHost.tsx +36 -0
  449. package/src/appShell/index.ts +1 -0
  450. package/src/icons/nativeIconInk.dark.spec.tsx +159 -0
  451. package/src/layouts/AsyncBoundary.spec.tsx +24 -1
  452. package/src/layouts/AsyncBoundary.stories.tsx +8 -1
  453. package/src/layouts/AsyncBoundary.tsx +71 -2
  454. package/src/layouts/AsyncSkeleton.stories.tsx +9 -1
  455. package/src/layouts/PageTemplates.spec.tsx +28 -1
  456. package/src/layouts/PageTemplates.tsx +8 -1
  457. package/src/layouts/Sidebar.spec.tsx +48 -0
  458. package/src/layouts/layouts.spec.tsx +33 -0
  459. package/src/layouts/page.tsx +5 -12
  460. package/src/layouts/pageChrome.phone.spec.tsx +11 -5
  461. package/src/layouts/sidebar.tsx +84 -31
  462. package/src/layouts/toolbar.tsx +16 -2
  463. package/src/overlayElevation.spec.tsx +3 -4
  464. package/src/views/ImageGrid.photos.spec.tsx +46 -0
  465. package/src/views/ImageGrid.tsx +52 -27
  466. package/src/views/index.ts +8 -1
  467. package/types/Alert/index.d.ts.map +1 -1
  468. package/types/Avatar/getInitials.d.ts +3 -27
  469. package/types/Avatar/getInitials.d.ts.map +1 -1
  470. package/types/Avatar/index.d.ts +15 -2
  471. package/types/Avatar/index.d.ts.map +1 -1
  472. package/types/Card.d.ts +15 -1
  473. package/types/Card.d.ts.map +1 -1
  474. package/types/Chip/index.d.ts +38 -3
  475. package/types/Chip/index.d.ts.map +1 -1
  476. package/types/DropdownMenu/index.d.ts +2 -1
  477. package/types/DropdownMenu/index.d.ts.map +1 -1
  478. package/types/OverflowRow/index.d.ts.map +1 -1
  479. package/types/Pagination.d.ts +4 -1
  480. package/types/Pagination.d.ts.map +1 -1
  481. package/types/SheetModal/SheetNavigation.d.ts +14 -0
  482. package/types/SheetModal/SheetNavigation.d.ts.map +1 -0
  483. package/types/SheetModal/index.d.ts.map +1 -1
  484. package/types/SheetModal/index.native.d.ts +6 -0
  485. package/types/SheetModal/index.native.d.ts.map +1 -1
  486. package/types/appShell/TabBar.d.ts +8 -0
  487. package/types/appShell/TabBar.d.ts.map +1 -1
  488. package/types/appShell/TabHost.d.ts +23 -0
  489. package/types/appShell/TabHost.d.ts.map +1 -0
  490. package/types/appShell/TabHost.native.d.ts +56 -0
  491. package/types/appShell/TabHost.native.d.ts.map +1 -0
  492. package/types/appShell/index.d.ts +1 -0
  493. package/types/appShell/index.d.ts.map +1 -1
  494. package/types/layouts/AsyncBoundary.d.ts +13 -2
  495. package/types/layouts/AsyncBoundary.d.ts.map +1 -1
  496. package/types/layouts/PageTemplates.d.ts.map +1 -1
  497. package/types/layouts/page.d.ts.map +1 -1
  498. package/types/layouts/sidebar.d.ts +25 -3
  499. package/types/layouts/sidebar.d.ts.map +1 -1
  500. package/types/layouts/toolbar.d.ts +9 -0
  501. package/types/layouts/toolbar.d.ts.map +1 -1
  502. package/types/views/ImageGrid.d.ts +19 -1
  503. package/types/views/ImageGrid.d.ts.map +1 -1
  504. package/types/views/index.d.ts +1 -1
  505. package/types/views/index.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/components",
3
- "version": "7.66.0",
3
+ "version": "7.67.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.66.0",
62
- "@multiplatform.one/i18n": "^7.66.0",
63
- "@multiplatform.one/platform": "^7.66.0",
64
- "@multiplatform.one/router": "^7.66.0",
65
- "@multiplatform.one/theme": "^7.66.0",
61
+ "@multiplatform.one/forms": "^7.67.0",
62
+ "@multiplatform.one/i18n": "^7.67.0",
63
+ "@multiplatform.one/platform": "^7.67.0",
64
+ "@multiplatform.one/router": "^7.67.0",
65
+ "@multiplatform.one/theme": "^7.67.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.66.0",
93
- "@multiplatform.one/storybook": "7.66.0",
94
- "@multiplatform.one/test-utils": "7.66.0",
92
+ "@multiplatform.one/config": "7.67.0",
93
+ "@multiplatform.one/storybook": "7.67.0",
94
+ "@multiplatform.one/test-utils": "7.67.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",
@@ -126,6 +126,7 @@
126
126
  "react-native": ">=0.83.0",
127
127
  "react-native-reanimated": "^4.2.0",
128
128
  "react-native-safe-area-context": "*",
129
+ "react-native-screens": "*",
129
130
  "react-native-svg": "*",
130
131
  "refractor": "^4.9.0",
131
132
  "rehype-autolink-headings": "^6.1.1 || ^7.0.0",
@@ -169,6 +170,9 @@
169
170
  "react-native-safe-area-context": {
170
171
  "optional": true
171
172
  },
173
+ "react-native-screens": {
174
+ "optional": true
175
+ },
172
176
  "react-native-svg": {
173
177
  "optional": true
174
178
  },
@@ -298,6 +298,28 @@ describe("Alert action labels — weight 400 on the TEXT NODE (R7 / §6.1)", ()
298
298
  });
299
299
  });
300
300
 
301
+ describe("Alert action targets size to their labels on web (FZ-8000)", () => {
302
+ afterEach(cleanup);
303
+
304
+ it("keeps each press group out of CSS size containment", () => {
305
+ renderWithProviders(
306
+ <Alert
307
+ intent="error"
308
+ actionLabel="Try again"
309
+ secondaryActionLabel="Ignore"
310
+ onAction={() => {}}
311
+ onSecondaryAction={() => {}}
312
+ >
313
+ Custom labels
314
+ </Alert>,
315
+ );
316
+ for (const label of ["Try again", "Ignore"]) {
317
+ const target = document.querySelector(`[aria-label="${label}"]`) as HTMLElement;
318
+ expect(target.style.containerType).toBe("normal");
319
+ }
320
+ });
321
+ });
322
+
301
323
  describe("Alert spacing roles hold at every size token (LC-100)", () => {
302
324
  afterEach(cleanup);
303
325
 
@@ -258,6 +258,11 @@ function AlertAction({
258
258
  return (
259
259
  <AlertActionTarget
260
260
  group={"alertAction" as unknown as undefined}
261
+ // A tamagui group is a CSS size container on web (container-type:
262
+ // inline-size), which drops the label from the target's intrinsic
263
+ // width: the pill collapsed to the 44px floor, "Try again" wrapped and
264
+ // two actions touched (FZ-8000). The group only carries press state.
265
+ {...(isWeb ? { style: { containerType: "normal" } } : {})}
261
266
  className="mp-chip-dismiss"
262
267
  aria-label={accessibilityLabel ?? label}
263
268
  {...pressTargetStyle()}
@@ -0,0 +1,74 @@
1
+ import { cleanup, render } from "@testing-library/react";
2
+ import { createDefaultThemeConfig, normalizeToHex } from "@multiplatform.one/theme";
3
+ import { expect, it } from "vitest";
4
+ import { TamaguiProvider, Theme } from "tamagui";
5
+ import { Avatar } from "./index";
6
+
7
+ // FZ-7889 / LC-08: the initials disc is the theme's accent tint and ink
8
+ // (LC-131), the same for every name, never a fixed hue palette.
9
+ it.each(["light", "dark"] as const)(
10
+ "paints the %s theme's accent tint and ink, the same for every name",
11
+ (scheme) => {
12
+ const config = createDefaultThemeConfig({});
13
+ const themes = config.tamagui.themes as unknown as Record<
14
+ string,
15
+ Record<string, { val: string } | undefined>
16
+ >;
17
+ for (const hue of ["orange", "purple", "blue"]) {
18
+ const token = (key: string) =>
19
+ normalizeToHex(themes[`${scheme}_${hue}`]?.[key]?.val ?? themes[scheme]?.[key]?.val ?? "");
20
+ const paint = (name: string) => {
21
+ const view = render(
22
+ <TamaguiProvider config={config.tamagui} defaultTheme={scheme}>
23
+ <Theme name={hue}>
24
+ <Avatar name={name} />
25
+ </Theme>
26
+ </TamaguiProvider>,
27
+ );
28
+ const face = view.container.querySelector("[data-avatar-px]") as HTMLElement;
29
+ const ink = view.container.querySelector("[data-avatar-initials]") as HTMLElement;
30
+ const result = {
31
+ fill: normalizeToHex(getComputedStyle(face).backgroundColor),
32
+ ink: normalizeToHex(getComputedStyle(ink).color),
33
+ };
34
+ cleanup();
35
+ return result;
36
+ };
37
+ const clay = paint("Clay Risser");
38
+ expect(clay).toEqual(paint("Ada Lovelace"));
39
+ expect(clay).toEqual({ fill: token("selectedBackground"), ink: token("selectedColor") });
40
+ }
41
+ },
42
+ );
43
+
44
+ // LC-84: the no-name person glyph takes the same ink as the initials, resolved
45
+ // to a concrete paint, since native SVG has no currentColor to inherit.
46
+ it.each(["light", "dark"] as const)("paints the %s fallback glyph in the accent ink", (scheme) => {
47
+ const config = createDefaultThemeConfig({});
48
+ const themes = config.tamagui.themes as unknown as Record<
49
+ string,
50
+ Record<string, { val: string } | undefined>
51
+ >;
52
+ const view = render(
53
+ <TamaguiProvider config={config.tamagui} defaultTheme={scheme}>
54
+ <Theme name="orange">
55
+ <Avatar />
56
+ </Theme>
57
+ </TamaguiProvider>,
58
+ );
59
+ const glyph = view.container.querySelector("[data-avatar-glyph]") as HTMLElement;
60
+ const ink = themes[`${scheme}_orange`]?.selectedColor?.val ?? themes[scheme]?.selectedColor?.val;
61
+ expect(normalizeToHex(glyph.getAttribute("data-avatar-glyph") ?? "")).toBe(
62
+ normalizeToHex(ink ?? ""),
63
+ );
64
+ expect(glyph.querySelector("svg")?.getAttribute("fill")).toBe(
65
+ glyph.getAttribute("data-avatar-glyph"),
66
+ );
67
+ const px = Number(
68
+ view.container.querySelector("[data-avatar-px]")?.getAttribute("data-avatar-px"),
69
+ );
70
+ expect(Number(glyph.querySelector("svg")?.getAttribute("width")) / px).toBeGreaterThanOrEqual(
71
+ 0.55,
72
+ );
73
+ cleanup();
74
+ });
@@ -3,7 +3,7 @@ import { Preset, Surface, useReadableTextOn } from "@multiplatform.one/theme";
3
3
  import { cleanup, fireEvent } from "@testing-library/react";
4
4
  import { afterEach, describe, expect, it, vi } from "vitest";
5
5
  import { SizableText } from "tamagui";
6
- import { Avatar, fallbackTone, fallbackToneIndex, getInitials } from "./index";
6
+ import { Avatar, getInitials, initialsFill, initialsMetrics } from "./index";
7
7
 
8
8
  afterEach(cleanup);
9
9
 
@@ -14,6 +14,8 @@ describe("getInitials", () => {
14
14
 
15
15
  it("splits email / dotted local parts", () => {
16
16
  expect(getInitials("john.doe@example.com")).toBe("JD");
17
+ expect(getInitials("jane@example.com")).toBe("J");
18
+ expect(getInitials("sam@example.com")).toBe("S");
17
19
  });
18
20
 
19
21
  it("falls back to two chars of a single token", () => {
@@ -25,14 +27,39 @@ describe("getInitials", () => {
25
27
  });
26
28
  });
27
29
 
28
- describe("fallbackTone", () => {
29
- it("is stable for the same seed", () => {
30
- expect(fallbackToneIndex("Ada Lovelace")).toBe(fallbackToneIndex("Ada Lovelace"));
31
- expect(fallbackTone("Ada Lovelace")).toEqual(fallbackTone("Ada Lovelace"));
32
- });
30
+ // FZ-7889: Clay's nav bar "CL" filled the circle edge to edge on a fixed
31
+ // purple disc. LC-08: the initials' em is 40% of the diameter, centred on a
32
+ // line of their own, on the theme's accent tint (LC-131), never a hue palette
33
+ // (Avatar.ink.spec.tsx, its own file: it mounts the default theme config).
34
+ describe("Avatar initials (LC-08)", () => {
35
+ const initialsNode = (container: HTMLElement) =>
36
+ container.querySelector("[data-avatar-initials]") as HTMLElement | null;
37
+
38
+ it.each([20, 28, 36, 44, 64, 96])(
39
+ "a %ipx circle sets its initials at 0.4 of its diameter",
40
+ (px) => {
41
+ const { fontPx, lineHeightPx } = initialsMetrics(px);
42
+ expect(initialsFill).toBe(0.4);
43
+ expect(fontPx / px).toBeGreaterThanOrEqual(0.38);
44
+ expect(fontPx / px).toBeLessThanOrEqual(0.42);
45
+ // Two capitals run about 1.4 em: they clear the circle's sides at every size.
46
+ expect(fontPx * 1.4).toBeLessThan(px);
47
+ // The line box holds the glyphs and still fits the circle, so centring the
48
+ // line centres the capitals.
49
+ expect(lineHeightPx).toBeGreaterThanOrEqual(fontPx);
50
+ expect(lineHeightPx).toBeLessThanOrEqual(px);
51
+ },
52
+ );
33
53
 
34
- it("diverges for different names", () => {
35
- expect(fallbackTone("Ada Lovelace")?.bg).not.toBe(fallbackTone("Grace Hopper")?.bg);
54
+ it("renders the initials at that size, centred on their own line", () => {
55
+ const { container } = renderWithProviders(<Avatar name="Clay Risser" size={28} />);
56
+ const node = initialsNode(container);
57
+ expect(node?.textContent).toBe("CR");
58
+ expect(node?.getAttribute("data-avatar-initials")).toBe(String(initialsMetrics(28).fontPx));
59
+ const classes = String(node?.className);
60
+ expect(classes).toMatch(/_fos-11px/);
61
+ expect(classes).toMatch(/_lh-13px/);
62
+ expect(classes).toMatch(/_ta-center/);
36
63
  });
37
64
  });
38
65
 
@@ -1,10 +1,21 @@
1
1
  /**
2
2
  * Derive up to two initials from a display name or email local-part.
3
- * "Ada Lovelace" → "AL", "john.doe@x" → "JD", "Ada" → "AD".
3
+ * "Ada Lovelace" → "AL", "john.doe@x" → "JD", "Ada" → "AD", "jane@x" → "J".
4
+ * An email's domain is never a name: "jane@example.com" is one word, not
5
+ * "Jane Example".
4
6
  */
5
7
  export function getInitials(name: string): string {
6
8
  const trimmed = (name ?? "").trim();
7
9
  if (!trimmed) return "?";
10
+ const at = trimmed.indexOf("@");
11
+ if (at > 0) {
12
+ const local = trimmed
13
+ .slice(0, at)
14
+ .split(/[._-]+/)
15
+ .filter(Boolean);
16
+ if (local.length >= 2) return ((local[0][0] ?? "") + (local[1][0] ?? "")).toUpperCase();
17
+ return (local[0]?.[0] ?? "?").toUpperCase();
18
+ }
8
19
  const parts = trimmed.split(/[\s@._-]+/).filter(Boolean);
9
20
  if (parts.length >= 2) {
10
21
  const a = parts[0][0] ?? "";
@@ -13,32 +24,3 @@ export function getInitials(name: string): string {
13
24
  }
14
25
  return trimmed.substring(0, 2).toUpperCase();
15
26
  }
16
-
17
- /**
18
- * Polaris-style deterministic initials fill. Tokens only — the same seed
19
- * always lands on the same ramp pair so two "AB" avatars match.
20
- */
21
- export const FALLBACK_TONES = [
22
- { bg: "$blue4", fg: "$blue12" },
23
- { bg: "$green4", fg: "$green12" },
24
- { bg: "$orange4", fg: "$orange12" },
25
- { bg: "$purple4", fg: "$purple12" },
26
- { bg: "$yellow4", fg: "$yellow12" },
27
- { bg: "$red4", fg: "$red12" },
28
- ] as const;
29
-
30
- export type FallbackTone = (typeof FALLBACK_TONES)[number];
31
-
32
- export function fallbackToneIndex(seed: string): number {
33
- let hash = 0;
34
- for (let i = 0; i < seed.length; i++) {
35
- hash = (Math.imul(hash, 31) + seed.charCodeAt(i)) | 0;
36
- }
37
- return Math.abs(hash) % FALLBACK_TONES.length;
38
- }
39
-
40
- export function fallbackTone(seed: string | undefined): FallbackTone | undefined {
41
- const trimmed = (seed ?? "").trim();
42
- if (!trimmed) return undefined;
43
- return FALLBACK_TONES[fallbackToneIndex(trimmed)];
44
- }
@@ -11,28 +11,27 @@ import {
11
11
  radiusClassProps,
12
12
  resolveRadiusClass,
13
13
  stackRadiusProps,
14
+ useGlyphColor,
14
15
  useReadableTextOn,
15
16
  useResolvedKnobs,
16
17
  sizeKeyBelow,
17
18
  } from "@multiplatform.one/theme";
18
19
  import type { BorderRadius, ControlStateProps } from "@multiplatform.one/theme";
19
- import type { FontSizeTokens, GetProps, SizeTokens } from "tamagui";
20
+ import type { GetProps, SizeTokens } from "tamagui";
20
21
  import {
21
22
  Avatar as TamaguiAvatar,
22
23
  SizableText,
23
24
  View,
24
25
  XStack,
25
- getFontSize,
26
26
  getVariableValue,
27
27
  styled,
28
28
  withStaticProperties,
29
29
  } from "tamagui";
30
30
  import { getSize } from "@tamagui/get-token";
31
31
  import { componentColors } from "../componentColors";
32
- import { fallbackTone, getInitials } from "./getInitials";
32
+ import { getInitials } from "./getInitials";
33
33
 
34
- export { fallbackTone, fallbackToneIndex, FALLBACK_TONES, getInitials } from "./getInitials";
35
- export type { FallbackTone } from "./getInitials";
34
+ export { getInitials } from "./getInitials";
36
35
 
37
36
  // ── Types ─────────────────────────────────────────────────────
38
37
 
@@ -162,15 +161,27 @@ function resolveVisualPx(
162
161
  return ambientPx;
163
162
  }
164
163
 
165
- function opticalFont(px: number): FontSizeTokens {
166
- if (px <= 20) return "$1";
167
- if (px <= 32) return "$2";
168
- return "$3";
164
+ /** LC-08: the initials' em is this share of the diameter, so two capitals sit well inside the circle. */
165
+ export const initialsFill = 0.4;
166
+
167
+ export interface InitialsMetrics {
168
+ fontPx: number;
169
+ lineHeightPx: number;
170
+ maxFontScale: number;
169
171
  }
170
172
 
171
- /** LC-158: initials grow with Dynamic Type until they fill the circle's share, never past the circle. */
172
- function initialsMaxFontScale(px: number): number {
173
- return maxFontScaleToFit(px, getFontSize(opticalFont(px)), dynamicTypeFit.medallionFill);
173
+ /**
174
+ * The initials' type for a `px` circle: the em at {@link initialsFill} of the
175
+ * diameter, a line of 1.2 em so the capitals centre on the circle's middle
176
+ * whatever line height the label knob carries, and the LC-158 Dynamic Type cap.
177
+ */
178
+ export function initialsMetrics(px: number): InitialsMetrics {
179
+ const fontPx = Math.max(8, Math.round(px * initialsFill));
180
+ return {
181
+ fontPx,
182
+ lineHeightPx: Math.round(fontPx * 1.2),
183
+ maxFontScale: maxFontScaleToFit(px, fontPx, dynamicTypeFit.medallionFill),
184
+ };
174
185
  }
175
186
 
176
187
  // The RN/Tamagui `onPress` type is `((event: GestureResponderEvent) => void)
@@ -226,13 +237,10 @@ function AvatarRoot({
226
237
  interactive && visualPx < MIN_PRESS_TARGET ? pressTargetHitSlop(visualPx) : undefined;
227
238
  const explicitBg = backgroundColor ?? fallbackBackgroundColor;
228
239
  const onExplicitBg = useReadableTextOn(explicitBg as string | undefined);
229
- const tone = fallbackBackgroundColor || backgroundColor ? undefined : fallbackTone(name);
230
- const fallbackBg = backgroundColor ?? fallbackBackgroundColor ?? tone?.bg ?? "$color4";
240
+ const fallbackBg = explicitBg ?? "$selectedBackground";
231
241
  const fallbackFg =
232
242
  fallbackColor ??
233
- (explicitBg
234
- ? (onExplicitBg ?? componentColors.text.primary)
235
- : (tone?.fg ?? componentColors.text.primary));
243
+ (explicitBg ? (onExplicitBg ?? componentColors.text.primary) : "$selectedColor");
236
244
  const identityProps = circular ? identityShapeProps : null;
237
245
  const squareRadiusPx = circular
238
246
  ? undefined
@@ -248,6 +256,8 @@ function AvatarRoot({
248
256
  const label = alt ?? name ?? (interactive ? "Avatar" : undefined);
249
257
  const initialsText = initials ?? (name ? getInitials(name) : "?");
250
258
  const pipPx = Math.max(8, Math.round(visualPx * 0.28));
259
+ const initialsType = initialsMetrics(visualPx);
260
+ const glyphInk = useGlyphColor(fallbackFg);
251
261
 
252
262
  const frame = (
253
263
  <TamaguiAvatar
@@ -309,18 +319,21 @@ function AvatarRoot({
309
319
  >
310
320
  {fallback ??
311
321
  (initialsText === "?" ? (
312
- <View {...({ color: fallbackFg } as Record<string, unknown>)}>
313
- <UserIcon size={Math.round(visualPx * 0.42)} color="currentColor" />
322
+ <View data-avatar-glyph={glyphInk}>
323
+ <UserIcon size={Math.round(visualPx * 0.56)} weight="fill" color={glyphInk} />
314
324
  </View>
315
325
  ) : (
316
326
  <SizableText
317
- {...knobProps.label}
318
- fontSize={opticalFont(visualPx)}
319
- maxFontSizeMultiplier={initialsMaxFontScale(visualPx)}
327
+ fontFamily={knobProps.label.fontFamily}
328
+ fontSize={initialsType.fontPx}
329
+ lineHeight={initialsType.lineHeightPx}
330
+ maxFontSizeMultiplier={initialsType.maxFontScale}
320
331
  fontWeight="600"
332
+ letterSpacing={0}
321
333
  color={fallbackFg}
322
334
  textAlign="center"
323
335
  userSelect="none"
336
+ data-avatar-initials={initialsType.fontPx}
324
337
  >
325
338
  {initialsText}
326
339
  </SizableText>
@@ -424,6 +437,8 @@ export const Avatar = withStaticProperties(AvatarRoot, {
424
437
  Image: TamaguiAvatar.Image,
425
438
  Fallback: TamaguiAvatar.Fallback,
426
439
  Group: AvatarGroup,
440
+ // A menu opened from an avatar is attached with no echo row (LC-112, LC-262).
441
+ iconOnly: true as const,
427
442
  });
428
443
 
429
444
  export type { AvatarProps as AvatarFrameProps };
package/src/Card.spec.tsx CHANGED
@@ -226,3 +226,48 @@ describe("Card header / footer (LC-09)", () => {
226
226
  expect(container.querySelector('[data-slot="footer"]')?.textContent).toContain("Actions");
227
227
  });
228
228
  });
229
+
230
+ describe("Card media and overlay (FZ-8000)", () => {
231
+ it("lays media flush over an inset body, clipped by the card radius", () => {
232
+ const result = renderWithProviders(
233
+ <Card testID="media-card" media={<span data-testid="art" />}>
234
+ <span data-testid="title" />
235
+ </Card>,
236
+ );
237
+ const card = result.getByTestId("media-card");
238
+ expect(card.getAttribute("data-card-media")).toBe("");
239
+ expect(card.className).toMatch(/_pt-0px/);
240
+ expect(card.className).toMatch(/_ox-hidden/);
241
+ const slot = card.querySelector("[data-card-media-slot]") as HTMLElement;
242
+ const body = card.querySelector("[data-card-body]") as HTMLElement;
243
+ expect(slot.contains(result.getByTestId("art"))).toBe(true);
244
+ expect(body.contains(result.getByTestId("title"))).toBe(true);
245
+ expect(slot.className).not.toMatch(/_pt-/);
246
+ expect(body.className).toMatch(/_pt-(?!0px)/);
247
+ expect(slot.compareDocumentPosition(body) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
248
+ });
249
+
250
+ it("keeps the inset on the frame when there is no media", () => {
251
+ const result = renderWithProviders(<Card testID="plain-card">body</Card>);
252
+ const card = result.getByTestId("plain-card");
253
+ expect(card.hasAttribute("data-card-media")).toBe(false);
254
+ expect(card.querySelector("[data-card-body]")).toBeNull();
255
+ });
256
+
257
+ it("lays the overlay over the whole card, after media and body", () => {
258
+ const result = renderWithProviders(
259
+ <Card
260
+ testID="linked-card"
261
+ media={<span data-testid="art" />}
262
+ overlay={<a data-testid="stretched" href="/record" />}
263
+ >
264
+ title
265
+ </Card>,
266
+ );
267
+ const link = result.getByTestId("stretched");
268
+ const layer = link.parentElement as HTMLElement;
269
+ expect(layer.className).toMatch(/_pos-absolute/);
270
+ const body = result.getByTestId("linked-card").querySelector("[data-card-body]") as Element;
271
+ expect(body.compareDocumentPosition(link) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
272
+ });
273
+ });
package/src/Card.tsx CHANGED
@@ -6,11 +6,13 @@ import {
6
6
  } from "@multiplatform.one/theme";
7
7
  import { CardFooter } from "./CardFooter";
8
8
  import { CardHeader } from "./CardHeader";
9
+ import type { ReactNode } from "react";
9
10
  import {
10
11
  Card as TamaguiCard,
11
12
  type CardProps as TamaguiCardProps,
12
13
  type SizeTokens,
13
14
  withStaticProperties,
15
+ YStack,
14
16
  } from "tamagui";
15
17
 
16
18
  /**
@@ -31,6 +33,11 @@ import {
31
33
  *
32
34
  * Padding contract: Card owns the inset (knob `panelPadding`) on every tier —
33
35
  * Header/Footer are zero-padding rows (LC-09); vertical rhythm is the Card gap.
36
+ *
37
+ * Media (full bleed): `media` sits flush at the top edge, clipped by the
38
+ * card's own radius, and the inset moves to the body under it (a record's
39
+ * image well over its title, Material's media card). `overlay` lays one
40
+ * layer over the whole card, such as a stretched link.
34
41
  */
35
42
 
36
43
  export type SurfaceTier = "content" | "elevated" | "feature";
@@ -39,6 +46,14 @@ export interface CardProps extends Omit<TamaguiCardProps, "size"> {
39
46
  tier?: SurfaceTier;
40
47
  /** Control size forwarded to every part inside the card. */
41
48
  size?: SizeTokens;
49
+ /** Full-bleed media above the body: no inset, clipped by the card radius. */
50
+ media?: ReactNode;
51
+ /**
52
+ * A layer over the whole card, above media and body: the stretched link
53
+ * that makes a routed card one target (LC-74). A control that must stay
54
+ * pressable over it (a favorite toggle) sits at a higher `zIndex`.
55
+ */
56
+ overlay?: ReactNode;
42
57
  }
43
58
 
44
59
  export type { CardFooterProps } from "./CardFooter";
@@ -62,7 +77,17 @@ function hostData(attrs: Record<string, string>): Record<string, unknown> {
62
77
  return { dataSet };
63
78
  }
64
79
 
65
- function CardRoot({ children, tier = "content", size, ...props }: CardProps) {
80
+ const paddingKey = /^padding/;
81
+
82
+ function CardOverlay({ children }: { children: ReactNode }) {
83
+ return (
84
+ <YStack position="absolute" top={0} left={0} right={0} bottom={0} zIndex={1}>
85
+ {children}
86
+ </YStack>
87
+ );
88
+ }
89
+
90
+ function CardRoot({ children, tier = "content", size, media, overlay, ...props }: CardProps) {
66
91
  const { knobProps } = useResolvedKnobs({ component: "Card", size });
67
92
  const parentPainted = SurfaceContext.useStyledContext().painted ?? false;
68
93
  // Axiom 1 child-clip cap: the padded container's radius may not exceed its
@@ -80,28 +105,42 @@ function CardRoot({ children, tier = "content", size, ...props }: CardProps) {
80
105
  const radiusKnob = Object.entries(borderRadiusMap).find(
81
106
  ([, token]) => token === knobProps.borderRadius.borderRadius,
82
107
  )?.[0];
108
+ const data = hostData({
109
+ "data-tier": tier,
110
+ "data-size-token": knobProps.sizeToken,
111
+ "data-nested-px": String(knobProps.nestedControl.px),
112
+ ...(media != null ? { "data-card-media": "" } : {}),
113
+ ...(tier !== "feature" && radiusKnob
114
+ ? {
115
+ "data-constraint-container": "Card",
116
+ "data-radius-knob": radiusKnob,
117
+ }
118
+ : {}),
119
+ });
120
+ if (media != null) {
121
+ const inset = {
122
+ ...knobProps.panelPadding,
123
+ ...Object.fromEntries(Object.entries(tierProps).filter(([key]) => paddingKey.test(key))),
124
+ };
125
+ return (
126
+ <TamaguiCard {...tierProps} {...data} padding={0} gap={0} overflow="hidden" {...props}>
127
+ <Surface size={size} painted elevated={tier === "elevated" && !parentPainted}>
128
+ <YStack {...hostData({ "data-card-media-slot": "" })}>{media}</YStack>
129
+ <YStack {...inset} {...knobProps.gap} {...hostData({ "data-card-body": "" })}>
130
+ {children}
131
+ </YStack>
132
+ {overlay != null ? <CardOverlay>{overlay}</CardOverlay> : null}
133
+ </Surface>
134
+ </TamaguiCard>
135
+ );
136
+ }
83
137
  // panelPadding first so tier recipes may override (feature uses a larger
84
138
  // inset); elevatedSurface carries no padding of its own.
85
139
  return (
86
- <TamaguiCard
87
- {...knobProps.panelPadding}
88
- {...tierProps}
89
- {...knobProps.gap}
90
- {...hostData({
91
- "data-tier": tier,
92
- "data-size-token": knobProps.sizeToken,
93
- "data-nested-px": String(knobProps.nestedControl.px),
94
- ...(tier !== "feature" && radiusKnob
95
- ? {
96
- "data-constraint-container": "Card",
97
- "data-radius-knob": radiusKnob,
98
- }
99
- : {}),
100
- })}
101
- {...props}
102
- >
140
+ <TamaguiCard {...knobProps.panelPadding} {...tierProps} {...knobProps.gap} {...data} {...props}>
103
141
  <Surface size={size} painted elevated={tier === "elevated" && !parentPainted}>
104
142
  {children}
143
+ {overlay != null ? <CardOverlay>{overlay}</CardOverlay> : null}
105
144
  </Surface>
106
145
  </TamaguiCard>
107
146
  );
@@ -12,7 +12,23 @@ import {
12
12
  defaultScaleInputs,
13
13
  } from "@multiplatform.one/theme";
14
14
  import { TagIcon } from "@phosphor-icons/react";
15
- import { Chip, ChipFrame, ChipText, chipFrameGeometry, chipIconSize, chipTone } from "./index";
15
+ import {
16
+ Chip,
17
+ ChipFrame,
18
+ ChipText,
19
+ chipFrameGeometry,
20
+ chipIconSize,
21
+ chipSwatch,
22
+ chipTone,
23
+ } from "./index";
24
+
25
+ const greenSteps = {
26
+ tint: "$green4",
27
+ hoverTint: "$green5",
28
+ fill: "$green11",
29
+ text: "$green12",
30
+ border: "$green7",
31
+ };
16
32
 
17
33
  describe("Chip", () => {
18
34
  it("renders its label", () => {
@@ -308,3 +324,58 @@ it("forwards an explicit accessible label to the interactive chip", () => {
308
324
  );
309
325
  expect(result.getByRole("button", { name: "Preset: Bold" })).toBeDefined();
310
326
  });
327
+
328
+ describe("Chip for data-driven facets (FZ-8000)", () => {
329
+ it("paints any theme ramp at the named colours' steps", () => {
330
+ expect(chipSwatch("teal")).toEqual({
331
+ tint: "$teal4",
332
+ hoverTint: "$teal5",
333
+ fill: "$teal11",
334
+ fillText: "$color1",
335
+ text: "$teal12",
336
+ border: "$teal7",
337
+ });
338
+ expect(chipSwatch("green")).toEqual({ ...chipSwatch("teal"), ...greenSteps });
339
+ expect(chipSwatch(undefined)).toEqual(chipSwatch("gray"));
340
+ });
341
+
342
+ it("shows a count after the label in the label's ink", () => {
343
+ const result = renderWithProviders(
344
+ <Chip color="red" count={12}>
345
+ Fire
346
+ </Chip>,
347
+ );
348
+ const count = result.container.querySelector("[data-chip-count]") as HTMLElement;
349
+ expect(count.textContent).toBe("12");
350
+ expect(count.className).toContain("_col-red12");
351
+ expect(
352
+ result.getByText("Fire").compareDocumentPosition(count) & Node.DOCUMENT_POSITION_FOLLOWING,
353
+ ).toBeTruthy();
354
+ });
355
+
356
+ it("is a radio inside a single-select group: aria-checked and a roving tab stop", () => {
357
+ const onKeyDown = vi.fn((event: KeyboardEvent) => event.preventDefault());
358
+ const onPress = vi.fn();
359
+ const result = renderWithProviders(
360
+ <>
361
+ <Chip role="radio" selected tabIndex={0} onPress={onPress} onKeyDown={onKeyDown}>
362
+ On
363
+ </Chip>
364
+ <Chip role="radio" selected={false} tabIndex={-1} onPress={onPress}>
365
+ Off
366
+ </Chip>
367
+ </>,
368
+ );
369
+ const [on, off] = result.getAllByRole("radio");
370
+ expect(on.getAttribute("aria-checked")).toBe("true");
371
+ expect(on.hasAttribute("aria-pressed")).toBe(false);
372
+ expect(on.getAttribute("tabindex")).toBe("0");
373
+ expect(off.getAttribute("aria-checked")).toBe("false");
374
+ expect(off.getAttribute("tabindex")).toBe("-1");
375
+ fireEvent.keyDown(on, { key: "Enter" });
376
+ expect(onKeyDown).toHaveBeenCalledTimes(1);
377
+ expect(onPress).not.toHaveBeenCalled();
378
+ fireEvent.keyDown(off, { key: "Enter" });
379
+ expect(onPress).toHaveBeenCalledTimes(1);
380
+ });
381
+ });