@multiplatform.one/components 7.65.1 → 7.65.2

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 (322) hide show
  1. package/dist/cjs/Alert/index.cjs +26 -5
  2. package/dist/cjs/Alert/index.native.js +26 -5
  3. package/dist/cjs/Alert/index.native.js.map +1 -1
  4. package/dist/cjs/images/Image/framing.cjs +29 -0
  5. package/dist/cjs/images/Image/framing.native.js +32 -0
  6. package/dist/cjs/images/Image/framing.native.js.map +1 -0
  7. package/dist/cjs/images/Image/shared.cjs +2 -2
  8. package/dist/cjs/images/Image/shared.native.js +2 -2
  9. package/dist/cjs/images/Image/shared.native.js.map +1 -1
  10. package/dist/cjs/views/Dashboard.cjs +16 -131
  11. package/dist/cjs/views/Dashboard.native.js +16 -131
  12. package/dist/cjs/views/Dashboard.native.js.map +1 -1
  13. package/dist/cjs/views/List.cjs +14 -189
  14. package/dist/cjs/views/List.native.js +14 -193
  15. package/dist/cjs/views/List.native.js.map +1 -1
  16. package/dist/cjs/views/ListGroup.cjs +181 -0
  17. package/dist/cjs/views/ListGroup.native.js +194 -0
  18. package/dist/cjs/views/ListGroup.native.js.map +1 -0
  19. package/dist/cjs/views/ListRow.cjs +266 -0
  20. package/dist/cjs/views/ListRow.native.js +274 -0
  21. package/dist/cjs/views/ListRow.native.js.map +1 -0
  22. package/dist/cjs/views/ShortcutCard.cjs +100 -0
  23. package/dist/cjs/views/ShortcutCard.native.js +104 -0
  24. package/dist/cjs/views/ShortcutCard.native.js.map +1 -0
  25. package/dist/cjs/views/index.cjs +3 -0
  26. package/dist/cjs/views/index.native.js +3 -0
  27. package/dist/cjs/views/index.native.js.map +1 -1
  28. package/dist/cjs/views/widgetChrome.cjs +93 -0
  29. package/dist/cjs/views/widgetChrome.native.js +95 -0
  30. package/dist/cjs/views/widgetChrome.native.js.map +1 -0
  31. package/dist/esm/Alert/index.mjs +27 -6
  32. package/dist/esm/Alert/index.mjs.map +1 -1
  33. package/dist/esm/Alert/index.native.js +27 -6
  34. package/dist/esm/Alert/index.native.js.map +1 -1
  35. package/dist/esm/images/Image/framing.mjs +4 -0
  36. package/dist/esm/images/Image/framing.mjs.map +1 -0
  37. package/dist/esm/images/Image/framing.native.js +4 -0
  38. package/dist/esm/images/Image/framing.native.js.map +1 -0
  39. package/dist/esm/images/Image/shared.mjs +2 -2
  40. package/dist/esm/images/Image/shared.mjs.map +1 -1
  41. package/dist/esm/images/Image/shared.native.js +2 -2
  42. package/dist/esm/images/Image/shared.native.js.map +1 -1
  43. package/dist/esm/views/Dashboard.mjs +6 -121
  44. package/dist/esm/views/Dashboard.mjs.map +1 -1
  45. package/dist/esm/views/Dashboard.native.js +6 -121
  46. package/dist/esm/views/Dashboard.native.js.map +1 -1
  47. package/dist/esm/views/List.mjs +8 -186
  48. package/dist/esm/views/List.mjs.map +1 -1
  49. package/dist/esm/views/List.native.js +8 -190
  50. package/dist/esm/views/List.native.js.map +1 -1
  51. package/dist/esm/views/ListGroup.mjs +144 -0
  52. package/dist/esm/views/ListGroup.mjs.map +1 -0
  53. package/dist/esm/views/ListGroup.native.js +154 -0
  54. package/dist/esm/views/ListGroup.native.js.map +1 -0
  55. package/dist/esm/views/ListRow.mjs +234 -0
  56. package/dist/esm/views/ListRow.mjs.map +1 -0
  57. package/dist/esm/views/ListRow.native.js +239 -0
  58. package/dist/esm/views/ListRow.native.js.map +1 -0
  59. package/dist/esm/views/ShortcutCard.mjs +75 -0
  60. package/dist/esm/views/ShortcutCard.mjs.map +1 -0
  61. package/dist/esm/views/ShortcutCard.native.js +76 -0
  62. package/dist/esm/views/ShortcutCard.native.js.map +1 -0
  63. package/dist/esm/views/index.mjs +2 -2
  64. package/dist/esm/views/index.mjs.map +1 -1
  65. package/dist/esm/views/index.native.js +2 -2
  66. package/dist/esm/views/index.native.js.map +1 -1
  67. package/dist/esm/views/widgetChrome.mjs +66 -0
  68. package/dist/esm/views/widgetChrome.mjs.map +1 -0
  69. package/dist/esm/views/widgetChrome.native.js +65 -0
  70. package/dist/esm/views/widgetChrome.native.js.map +1 -0
  71. package/dist/jsx/Accordion/index.native.js.map +1 -1
  72. package/dist/jsx/Alert/index.mjs +27 -6
  73. package/dist/jsx/Alert/index.mjs.map +1 -1
  74. package/dist/jsx/Alert/index.native.js +26 -5
  75. package/dist/jsx/Alert/index.native.js.map +1 -1
  76. package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
  77. package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
  78. package/dist/jsx/Avatar/index.native.js.map +1 -1
  79. package/dist/jsx/Badge/index.native.js.map +1 -1
  80. package/dist/jsx/Button.native.js.map +1 -1
  81. package/dist/jsx/Card.native.js.map +1 -1
  82. package/dist/jsx/CardFooter.native.js.map +1 -1
  83. package/dist/jsx/CardHeader.native.js.map +1 -1
  84. package/dist/jsx/Carousel/index.native.js.map +1 -1
  85. package/dist/jsx/Chip/index.native.js.map +1 -1
  86. package/dist/jsx/Collapsible.native.js.map +1 -1
  87. package/dist/jsx/ContextMenu/index.native.js.map +1 -1
  88. package/dist/jsx/CopyField/index.native.js.map +1 -1
  89. package/dist/jsx/Dialog.native.js.map +1 -1
  90. package/dist/jsx/DotIndicator/index.native.js.map +1 -1
  91. package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
  92. package/dist/jsx/DropdownMenu/menuSettle.native.js.map +1 -1
  93. package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
  94. package/dist/jsx/Heading.native.js.map +1 -1
  95. package/dist/jsx/Kbd/index.native.js.map +1 -1
  96. package/dist/jsx/Kbd/keys.native.js.map +1 -1
  97. package/dist/jsx/Material/index.native.js.map +1 -1
  98. package/dist/jsx/Meter/index.native.js.map +1 -1
  99. package/dist/jsx/Meter/meter.native.js.map +1 -1
  100. package/dist/jsx/OverflowRow/index.native.js.map +1 -1
  101. package/dist/jsx/Pagination.native.js.map +1 -1
  102. package/dist/jsx/Popover.native.js.map +1 -1
  103. package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
  104. package/dist/jsx/Quote/index.native.js.map +1 -1
  105. package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
  106. package/dist/jsx/Separator/index.native.js.map +1 -1
  107. package/dist/jsx/Sheet.native.js.map +1 -1
  108. package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
  109. package/dist/jsx/SheetModal/detents.native.js.map +1 -1
  110. package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
  111. package/dist/jsx/Skeleton/index.native.js.map +1 -1
  112. package/dist/jsx/SkipLink/index.native.js.map +1 -1
  113. package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
  114. package/dist/jsx/SortableList/index.native.js.map +1 -1
  115. package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
  116. package/dist/jsx/Tabs/index.native.js.map +1 -1
  117. package/dist/jsx/Text.native.js.map +1 -1
  118. package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
  119. package/dist/jsx/Toast/index.native.js.map +1 -1
  120. package/dist/jsx/Toast/store.native.js.map +1 -1
  121. package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
  122. package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
  123. package/dist/jsx/TreeSelect/index.native.js.map +1 -1
  124. package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
  125. package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
  126. package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
  127. package/dist/jsx/Video/types.native.js.map +1 -1
  128. package/dist/jsx/Wheel/index.native.js.map +1 -1
  129. package/dist/jsx/Wizard/index.native.js.map +1 -1
  130. package/dist/jsx/actions/ActionBar.native.js.map +1 -1
  131. package/dist/jsx/actions/DangerSection.native.js.map +1 -1
  132. package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
  133. package/dist/jsx/actions/HeaderActions.native.js.map +1 -1
  134. package/dist/jsx/actions/devWarn.native.js.map +1 -1
  135. package/dist/jsx/actions/index.native.js.map +1 -1
  136. package/dist/jsx/actions/severity.native.js.map +1 -1
  137. package/dist/jsx/appShell/BottomAccessory.native.js.map +1 -1
  138. package/dist/jsx/appShell/Dock.native.js.map +1 -1
  139. package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
  140. package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
  141. package/dist/jsx/appShell/Springboard.native.js.map +1 -1
  142. package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
  143. package/dist/jsx/appShell/TabBar.native.js.map +1 -1
  144. package/dist/jsx/appShell/appTile.native.js.map +1 -1
  145. package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
  146. package/dist/jsx/appShell/index.native.js.map +1 -1
  147. package/dist/jsx/charts/Axis.native.js.map +1 -1
  148. package/dist/jsx/charts/BarChart.native.js.map +1 -1
  149. package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
  150. package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
  151. package/dist/jsx/charts/LineChart.native.js.map +1 -1
  152. package/dist/jsx/charts/PieChart.native.js.map +1 -1
  153. package/dist/jsx/charts/Sparkline.native.js.map +1 -1
  154. package/dist/jsx/charts/accessibility.native.js.map +1 -1
  155. package/dist/jsx/charts/chartHeight.native.js.map +1 -1
  156. package/dist/jsx/charts/composeChart.native.js.map +1 -1
  157. package/dist/jsx/charts/index.native.js.map +1 -1
  158. package/dist/jsx/charts/math.native.js.map +1 -1
  159. package/dist/jsx/charts/series.native.js.map +1 -1
  160. package/dist/jsx/charts/svg.native.js.map +1 -1
  161. package/dist/jsx/charts/types.native.js.map +1 -1
  162. package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
  163. package/dist/jsx/code/Code/index.native.js.map +1 -1
  164. package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
  165. package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
  166. package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
  167. package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
  168. package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
  169. package/dist/jsx/code/Pre/index.native.js.map +1 -1
  170. package/dist/jsx/code/index.native.js.map +1 -1
  171. package/dist/jsx/componentColors.native.js.map +1 -1
  172. package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
  173. package/dist/jsx/feedback/NotifyHost.native.js +1 -1
  174. package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
  175. package/dist/jsx/feedback/copy.native.js.map +1 -1
  176. package/dist/jsx/feedback/index.native.js.map +1 -1
  177. package/dist/jsx/feedback/notify.native.js.map +1 -1
  178. package/dist/jsx/feedback/route.native.js.map +1 -1
  179. package/dist/jsx/feedback/store.native.js.map +1 -1
  180. package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -1
  181. package/dist/jsx/formLayouts/PreferencePanel.native.js +1 -1
  182. package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -1
  183. package/dist/jsx/formLayouts/index.native.js.map +1 -1
  184. package/dist/jsx/hooks/index.native.js.map +1 -1
  185. package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
  186. package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
  187. package/dist/jsx/hooks/useHoldCue.native.js.map +1 -1
  188. package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
  189. package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
  190. package/dist/jsx/icons/index.native.js.map +1 -1
  191. package/dist/jsx/icons/lucide.native.js.map +1 -1
  192. package/dist/jsx/icons/themed.native.js.map +1 -1
  193. package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
  194. package/dist/jsx/images/Image/framing.mjs +4 -0
  195. package/dist/jsx/images/Image/framing.mjs.map +1 -0
  196. package/dist/jsx/images/Image/framing.native.js +32 -0
  197. package/dist/jsx/images/Image/framing.native.js.map +1 -0
  198. package/dist/jsx/images/Image/shared.mjs +2 -2
  199. package/dist/jsx/images/Image/shared.mjs.map +1 -1
  200. package/dist/jsx/images/Image/shared.native.js +2 -2
  201. package/dist/jsx/images/Image/shared.native.js.map +1 -1
  202. package/dist/jsx/images/Image/types.native.js.map +1 -1
  203. package/dist/jsx/images/index.native.js.map +1 -1
  204. package/dist/jsx/index.native.js +1 -1
  205. package/dist/jsx/index.native.js.map +1 -1
  206. package/dist/jsx/knobImmuneExports.native.js.map +1 -1
  207. package/dist/jsx/layouts/AsyncBoundary.native.js +1 -1
  208. package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
  209. package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
  210. package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
  211. package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
  212. package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  213. package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
  214. package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
  215. package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  216. package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
  217. package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
  218. package/dist/jsx/layouts/attachments.native.js.map +1 -1
  219. package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
  220. package/dist/jsx/layouts/index.native.js.map +1 -1
  221. package/dist/jsx/layouts/page.native.js.map +1 -1
  222. package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
  223. package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
  224. package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
  225. package/dist/jsx/layouts/sidebar.native.js.map +1 -1
  226. package/dist/jsx/layouts/tags.native.js.map +1 -1
  227. package/dist/jsx/layouts/timeline.native.js.map +1 -1
  228. package/dist/jsx/layouts/toolbar.native.js.map +1 -1
  229. package/dist/jsx/shared/actionScan.native.js.map +1 -1
  230. package/dist/jsx/shared/i18n.native.js.map +1 -1
  231. package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
  232. package/dist/jsx/shared/t.native.js.map +1 -1
  233. package/dist/jsx/shared/textRidesText.native.js.map +1 -1
  234. package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
  235. package/dist/jsx/surfaces.native.js.map +1 -1
  236. package/dist/jsx/tamagui.native.js.map +1 -1
  237. package/dist/jsx/testSetup.native.js.map +1 -1
  238. package/dist/jsx/utils/setTinted.native.js.map +1 -1
  239. package/dist/jsx/utils/unwrapText.native.js.map +1 -1
  240. package/dist/jsx/views/Calendar.native.js.map +1 -1
  241. package/dist/jsx/views/Dashboard.mjs +6 -121
  242. package/dist/jsx/views/Dashboard.mjs.map +1 -1
  243. package/dist/jsx/views/Dashboard.native.js +16 -131
  244. package/dist/jsx/views/Dashboard.native.js.map +1 -1
  245. package/dist/jsx/views/Gantt.native.js.map +1 -1
  246. package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
  247. package/dist/jsx/views/ImageGrid.native.js.map +1 -1
  248. package/dist/jsx/views/List.mjs +8 -186
  249. package/dist/jsx/views/List.mjs.map +1 -1
  250. package/dist/jsx/views/List.native.js +14 -193
  251. package/dist/jsx/views/List.native.js.map +1 -1
  252. package/dist/jsx/views/ListGroup.mjs +144 -0
  253. package/dist/jsx/views/ListGroup.mjs.map +1 -0
  254. package/dist/jsx/views/ListGroup.native.js +194 -0
  255. package/dist/jsx/views/ListGroup.native.js.map +1 -0
  256. package/dist/jsx/views/ListRow.mjs +234 -0
  257. package/dist/jsx/views/ListRow.mjs.map +1 -0
  258. package/dist/jsx/views/ListRow.native.js +274 -0
  259. package/dist/jsx/views/ListRow.native.js.map +1 -0
  260. package/dist/jsx/views/Matrix.native.js.map +1 -1
  261. package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
  262. package/dist/jsx/views/ShortcutCard.mjs +75 -0
  263. package/dist/jsx/views/ShortcutCard.mjs.map +1 -0
  264. package/dist/jsx/views/ShortcutCard.native.js +104 -0
  265. package/dist/jsx/views/ShortcutCard.native.js.map +1 -0
  266. package/dist/jsx/views/TreeView.native.js.map +1 -1
  267. package/dist/jsx/views/calendarMath.native.js.map +1 -1
  268. package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
  269. package/dist/jsx/views/ganttMath.native.js.map +1 -1
  270. package/dist/jsx/views/index.mjs +2 -2
  271. package/dist/jsx/views/index.mjs.map +1 -1
  272. package/dist/jsx/views/index.native.js +3 -0
  273. package/dist/jsx/views/index.native.js.map +1 -1
  274. package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
  275. package/dist/jsx/views/matrixMath.native.js.map +1 -1
  276. package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
  277. package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
  278. package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
  279. package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
  280. package/dist/jsx/views/widgetChrome.mjs +66 -0
  281. package/dist/jsx/views/widgetChrome.mjs.map +1 -0
  282. package/dist/jsx/views/widgetChrome.native.js +95 -0
  283. package/dist/jsx/views/widgetChrome.native.js.map +1 -0
  284. package/package.json +9 -9
  285. package/src/Alert/Alert.spec.tsx +79 -0
  286. package/src/Alert/Alert.stories.tsx +32 -1
  287. package/src/Alert/index.tsx +54 -5
  288. package/src/images/Image/framing.ts +8 -0
  289. package/src/images/Image/shared.ts +2 -7
  290. package/src/overlayElevation.spec.tsx +3 -1
  291. package/src/views/Dashboard.tsx +5 -146
  292. package/src/views/Kanban.native.spec.tsx +2 -2
  293. package/src/views/List.tsx +22 -237
  294. package/src/views/ListGroup.spec.tsx +220 -0
  295. package/src/views/ListGroup.stories.tsx +83 -0
  296. package/src/views/ListGroup.tsx +189 -0
  297. package/src/views/ListRow.tsx +282 -0
  298. package/src/views/ShortcutCard.spec.tsx +40 -0
  299. package/src/views/ShortcutCard.stories.tsx +50 -1
  300. package/src/views/ShortcutCard.tsx +88 -0
  301. package/src/views/index.ts +6 -0
  302. package/src/views/widgetChrome.tsx +73 -0
  303. package/types/Alert/index.d.ts +9 -0
  304. package/types/Alert/index.d.ts.map +1 -1
  305. package/types/images/Image/framing.d.ts +7 -0
  306. package/types/images/Image/framing.d.ts.map +1 -0
  307. package/types/images/Image/shared.d.ts +1 -6
  308. package/types/images/Image/shared.d.ts.map +1 -1
  309. package/types/views/Dashboard.d.ts +2 -15
  310. package/types/views/Dashboard.d.ts.map +1 -1
  311. package/types/views/List.d.ts +3 -66
  312. package/types/views/List.d.ts.map +1 -1
  313. package/types/views/ListGroup.d.ts +43 -0
  314. package/types/views/ListGroup.d.ts.map +1 -0
  315. package/types/views/ListRow.d.ts +88 -0
  316. package/types/views/ListRow.d.ts.map +1 -0
  317. package/types/views/ShortcutCard.d.ts +26 -0
  318. package/types/views/ShortcutCard.d.ts.map +1 -0
  319. package/types/views/index.d.ts +1 -1
  320. package/types/views/index.d.ts.map +1 -1
  321. package/types/views/widgetChrome.d.ts +72 -0
  322. package/types/views/widgetChrome.d.ts.map +1 -0
@@ -1,4 +1,3 @@
1
- import { IconSlot } from "@multiplatform.one/theme";
2
1
  import { Meter } from "../Meter";
3
2
  import { ChartDataView } from "../charts/ChartDataView";
4
3
  import { BarChart } from "../charts/BarChart";
@@ -13,26 +12,15 @@ import {
13
12
  formatNumber,
14
13
  formatPercent,
15
14
  useResolvedKnobs,
16
- useChartPalette,
17
- useReadableTextOn,
18
15
  } from "@multiplatform.one/theme";
19
16
  import React, { useCallback, useMemo, useState, type ReactNode } from "react";
20
17
  import { useTranslation } from "../shared/i18n";
21
- import {
22
- SizableText,
23
- Text,
24
- XStack,
25
- YStack,
26
- isWeb,
27
- type YStackProps,
28
- type FontSizeTokens,
29
- H2,
30
- H3,
31
- H4,
32
- H5,
33
- H6,
34
- } from "tamagui";
18
+ import { Text, XStack, YStack, isWeb, type YStackProps, H2, H3, H4, H5, H6 } from "tamagui";
35
19
  import { ScrollView } from "../ScrollView";
20
+ import { NestedIconWell, useWidgetChrome } from "./widgetChrome";
21
+ import { ShortcutCard, type ShortcutConfig } from "./ShortcutCard";
22
+
23
+ export { ShortcutCard, type ShortcutCardProps, type ShortcutConfig } from "./ShortcutCard";
36
24
 
37
25
  /**
38
26
  * LC-17 SECTION-HEADING-SCALE + DG-A11Y-02: card sub-titles read at the ONE
@@ -42,20 +30,6 @@ import { ScrollView } from "../ScrollView";
42
30
  const SECTION_HEADING_TAGS = { 2: H2, 3: H3, 4: H4, 5: H5, 6: H6 } as const;
43
31
  export type CardHeadingLevel = 2 | 3 | 4 | 5 | 6;
44
32
 
45
- function splitNestedControl(nested: {
46
- px: number;
47
- hitSlop: { top: number; bottom: number; left: number; right: number };
48
- width: number;
49
- height: number;
50
- minWidth: number;
51
- maxWidth: number;
52
- minHeight: number;
53
- maxHeight: number;
54
- }) {
55
- const { px, hitSlop, ...box } = nested;
56
- return { px, hitSlop, box };
57
- }
58
-
59
33
  function trendFill(color: string): string {
60
34
  if (color === componentColors.semantic.success) return "$green4";
61
35
  if (color === componentColors.semantic.error) return "$red4";
@@ -152,18 +126,6 @@ export interface ProgressConfig {
152
126
  color?: string;
153
127
  }
154
128
 
155
- /**
156
- * Frappe workspace shortcut: label + nested count pill.
157
- */
158
- export interface ShortcutConfig {
159
- id: string;
160
- title: string;
161
- count?: number | string;
162
- icon?: React.ReactNode;
163
- color?: string;
164
- onClick?: () => void;
165
- }
166
-
167
129
  /**
168
130
  * Frappe link card / Polaris resource list / Grafana table-lite.
169
131
  */
@@ -235,55 +197,6 @@ export interface DashboardProps extends Omit<YStackProps, "children"> {
235
197
  // Shared card chrome
236
198
  // ============================================================================
237
199
 
238
- function useWidgetChrome(onPress?: YStackProps["onPress"]) {
239
- const resolved = useResolvedKnobs();
240
- const { knobProps, control } = resolved;
241
- const nested = splitNestedControl(knobProps.nestedControl);
242
- const interactive = onPress
243
- ? {
244
- cursor: "pointer" as const,
245
- hoverStyle: control.hoverKnobProps,
246
- pressStyle: control.pressKnobProps,
247
- focusVisibleStyle: control.focusVisibleKnobProps,
248
- onPress,
249
- role: "button" as const,
250
- }
251
- : undefined;
252
- return { knobProps, control, nested, interactive };
253
- }
254
-
255
- function NestedIconWell({
256
- color,
257
- box,
258
- px,
259
- radius,
260
- children,
261
- }: {
262
- color?: string;
263
- box: ReturnType<typeof splitNestedControl>["box"];
264
- px: number;
265
- radius: object;
266
- children: ReactNode;
267
- }) {
268
- const identity = useChartPalette().single;
269
- const fill = color || identity;
270
- const ink = useReadableTextOn(fill);
271
- return (
272
- <YStack
273
- {...box}
274
- {...radius}
275
- alignItems="center"
276
- justifyContent="center"
277
- backgroundColor={fill as any}
278
- {...{ color: ink }}
279
- overflow="hidden"
280
- data-nested-px={px}
281
- >
282
- <IconSlot icon={children} color={ink} />
283
- </YStack>
284
- );
285
- }
286
-
287
200
  function TrendPill({
288
201
  symbol,
289
202
  value,
@@ -635,60 +548,6 @@ export function ProgressCard({ config, ...stackProps }: ProgressCardProps) {
635
548
  );
636
549
  }
637
550
 
638
- export interface ShortcutCardProps extends Omit<YStackProps, "children"> {
639
- config: ShortcutConfig;
640
- }
641
-
642
- export function ShortcutCard({ config, ...stackProps }: ShortcutCardProps) {
643
- const { knobProps, nested, interactive } = useWidgetChrome(config.onClick);
644
- const { px, box, hitSlop } = nested;
645
-
646
- return (
647
- <Card
648
- width="100%"
649
- elevation={knobProps.elevation}
650
- {...knobProps.surface}
651
- {...interactive}
652
- hitSlop={config.onClick ? hitSlop : undefined}
653
- {...stackProps}
654
- >
655
- <XStack alignItems="center" {...knobProps.gap}>
656
- {config.icon ? (
657
- <NestedIconWell color={config.color} box={box} px={px} radius={knobProps.borderRadius}>
658
- {config.icon}
659
- </NestedIconWell>
660
- ) : null}
661
- <SizableText
662
- size={knobProps.sizeToken as FontSizeTokens}
663
- {...knobProps.heading}
664
- flex={1}
665
- numberOfLines={1}
666
- >
667
- {config.title}
668
- </SizableText>
669
- {config.count != null && config.count !== "" ? (
670
- <XStack
671
- height={px}
672
- minHeight={px}
673
- maxHeight={px}
674
- minWidth={px}
675
- paddingHorizontal="$2"
676
- alignItems="center"
677
- justifyContent="center"
678
- backgroundColor="$color4"
679
- {...knobProps.borderRadius}
680
- data-nested-px={px}
681
- >
682
- <Text {...knobProps.label} color={knobProps.textAccentColor}>
683
- {config.count}
684
- </Text>
685
- </XStack>
686
- ) : null}
687
- </XStack>
688
- </Card>
689
- );
690
- }
691
-
692
551
  export interface ListCardProps extends Omit<YStackProps, "children"> {
693
552
  config: ListConfig;
694
553
  headingLevel?: CardHeadingLevel;
@@ -71,8 +71,8 @@ describe("native Kanban card elevation (FZ-7740)", () => {
71
71
  for (const stop of ["medium", "large"] as const) {
72
72
  it(`paints the theme elevation recipe at ${stop} and keeps the shadow unclipped`, () => {
73
73
  const card = renderBoard(stop);
74
- expect(card.shadowColor).toBe("$shadowColor");
75
- expect(card.shadowOpacity).toBe(1);
74
+ expect(card.shadowColor).toBe("rgb(0,0,0)");
75
+ expect(card.shadowOpacity).toBe(0.12);
76
76
  expect(card.shadowRadius).toBeGreaterThan(0);
77
77
  expect(card.elevation).toBeGreaterThan(0);
78
78
  expect(card.overflow).toBe("visible");
@@ -1,10 +1,8 @@
1
1
  import { componentColors } from "../componentColors";
2
- import { ImageFramingContext } from "../images/Image/shared";
3
2
  import { AsyncBoundary } from "../layouts/AsyncBoundary";
4
3
  import { Spinner } from "@multiplatform.one/forms";
5
4
  import { FlashList, type FlashListRef } from "@shopify/flash-list";
6
5
  import {
7
- IconSlot,
8
6
  MIN_PRESS_TARGET,
9
7
  containerCapProps,
10
8
  ensureKeyboardModalityTracking,
@@ -12,10 +10,7 @@ import {
12
10
  hairline,
13
11
  hairlineWidth,
14
12
  keyboardFocusRingProps,
15
- recipeKeyAbove,
16
- sizeRecipeForToken,
17
13
  stackRadiusProps,
18
- type SizeRecipeToken,
19
14
  Surface,
20
15
  useResolvedKnobs,
21
16
  useTouchSurface,
@@ -24,17 +19,29 @@ import {
24
19
  } from "@multiplatform.one/theme";
25
20
  import { useHotkey } from "@tanstack/react-hotkeys";
26
21
  import type { RegisterableHotkey } from "@tanstack/react-hotkeys";
27
- import React, {
28
- createContext,
29
- useCallback,
30
- useContext,
31
- useId,
32
- useRef,
33
- useState,
34
- type ReactNode,
35
- } from "react";
22
+ import React, { useCallback, useId, useRef, useState, type ReactNode } from "react";
36
23
  import { useTranslation } from "../shared/i18n";
37
- import { Text, View, XStack, YStack, isWeb, type SizeTokens, type YStackProps } from "tamagui";
24
+ import { View, XStack, YStack, type SizeTokens, type YStackProps } from "tamagui";
25
+ import { ListItemStateContext, listRowTouchProps, type ListItemState } from "./ListRow";
26
+
27
+ export {
28
+ ListRow,
29
+ ListRowFact,
30
+ ListRowMeta,
31
+ listLeadingIconSize,
32
+ listRowPressDelayMs,
33
+ listRowTouchProps,
34
+ useListItemState,
35
+ type ListItemState,
36
+ type ListRowProps,
37
+ } from "./ListRow";
38
+ export {
39
+ ListGroup,
40
+ ListGroupItem,
41
+ type ListGroupItemProps,
42
+ type ListGroupProps,
43
+ type ListGroupVariant,
44
+ } from "./ListGroup";
38
45
 
39
46
  /**
40
47
  * Configurable hotkey bindings for the List component.
@@ -56,228 +63,6 @@ export interface ListHotkeys {
56
63
  pageUp?: RegisterableHotkey;
57
64
  }
58
65
 
59
- /** Per-row interaction state passed to `renderItem` and `ListRow`. */
60
- export interface ListItemState {
61
- selected: boolean;
62
- focused: boolean;
63
- /** Ink for the selected row (LC-05 selection tier) */
64
- selectedInk?: string;
65
- }
66
-
67
- /** True inside a ListRow with a subtitle: its trailing meta is a caption. */
68
- const ListRowTwoLineContext = createContext(false);
69
-
70
- const ListItemStateContext = createContext<ListItemState>({
71
- selected: false,
72
- focused: false,
73
- });
74
-
75
- /** Read the current row's selection/focus. Defaults to idle outside a List. */
76
- export function useListItemState(): ListItemState {
77
- return useContext(ListItemStateContext);
78
- }
79
-
80
- /**
81
- * Subject-led document row (Desk list / Linear / Finder): leading glyph or
82
- * media, title (+ optional subtitle), trailing muted meta. Sits inside List's
83
- * stacked-group chrome — does not paint its own radius, fill, or ring.
84
- *
85
- * LC-155 ROW-ANATOMY: the title is the headline role, the subtitle the meta
86
- * role on one line, and with a subtitle the row is a two-line Mail row whose
87
- * trailing meta is a caption at the top right.
88
- */
89
- export interface ListRowProps {
90
- /** Leading glyph slot — fixed box so titles share one x (LC-08). */
91
- icon?: ReactNode;
92
- /**
93
- * Leading media slot (an avatar, a thumbnail): a `$true` square, and a
94
- * thumbnail inside it draws no tile of its own.
95
- */
96
- media?: ReactNode;
97
- title: ReactNode;
98
- subtitle?: ReactNode;
99
- /** Trailing Finder/Desk columns (dates, size, kind, status). */
100
- meta?: ReactNode;
101
- }
102
-
103
- function RowText({
104
- children,
105
- ...props
106
- }: { children: ReactNode } & React.ComponentProps<typeof Text>) {
107
- if (children == null || children === false) return null;
108
- if (typeof children === "string" || typeof children === "number") {
109
- return <Text {...props}>{children}</Text>;
110
- }
111
- return <>{children}</>;
112
- }
113
-
114
- /**
115
- * Trailing Finder/Desk column. Inherits selected fill ink (LC-71). `width`
116
- * fixes the column (a size token or a measured px) so the same column lines
117
- * up from row to row; rich cell content (pills, formatted cells) renders in a
118
- * box of that width instead of a Text run.
119
- */
120
- export function ListRowMeta({
121
- children,
122
- width,
123
- color,
124
- }: {
125
- children: ReactNode;
126
- width?: number | SizeTokens;
127
- color?: string;
128
- }) {
129
- const { knobProps } = useResolvedKnobs();
130
- const { selected, selectedInk } = useListItemState();
131
- const twoLine = useContext(ListRowTwoLineContext);
132
- const type = twoLine ? knobProps.textRole.caption : knobProps.label;
133
- const ink = color ?? (twoLine ? knobProps.textRole.caption.color : knobProps.textAccentColor);
134
- const resolved = selected && selectedInk ? selectedInk : ink;
135
- if (typeof children !== "string" && typeof children !== "number") {
136
- return (
137
- <XStack
138
- width={width}
139
- flexShrink={0}
140
- minWidth={0}
141
- alignItems="center"
142
- justifyContent="flex-end"
143
- overflow="hidden"
144
- {...({ "data-list-slot": "trailing", color: resolved } as Record<string, unknown>)}
145
- >
146
- {children}
147
- </XStack>
148
- );
149
- }
150
- return (
151
- <Text
152
- {...type}
153
- color={resolved}
154
- numberOfLines={1}
155
- width={width}
156
- flexShrink={0}
157
- textAlign="right"
158
- userSelect="none"
159
- >
160
- {children}
161
- </Text>
162
- );
163
- }
164
-
165
- /**
166
- * The leading glyph of a (two-line) list row: the control icon two recipe
167
- * keys above the row's size token (20 at the default `$true`), read off the
168
- * scale so a preset restyles it with every other control icon.
169
- */
170
- export function listLeadingIconSize(sizeToken: string): number {
171
- return sizeRecipeForToken(recipeKeyAbove(recipeKeyAbove(sizeToken as SizeRecipeToken))).iconSize;
172
- }
173
-
174
- export function ListRow({ icon, media, title, subtitle, meta }: ListRowProps) {
175
- const { knobProps } = useResolvedKnobs();
176
- const { selected, selectedInk } = useListItemState();
177
- const { headline, meta: metaRole } = knobProps.textRole;
178
- const selectedOverride = selected && selectedInk ? selectedInk : undefined;
179
- const ink = selectedOverride ?? knobProps.textAccentColor;
180
- const iconSize = listLeadingIconSize(knobProps.sizeToken);
181
- const leading = icon ? <IconSlot icon={icon} size={iconSize} color={ink} /> : null;
182
- const twoLine = subtitle != null && subtitle !== false;
183
-
184
- return (
185
- <ListRowTwoLineContext.Provider value={twoLine}>
186
- <XStack
187
- alignItems="center"
188
- {...knobProps.gap}
189
- flex={1}
190
- minWidth={0}
191
- width="100%"
192
- {...(twoLine ? { paddingVertical: "$1" } : null)}
193
- >
194
- {media ? (
195
- <View
196
- width="$true"
197
- height="$true"
198
- flexShrink={0}
199
- alignItems="center"
200
- justifyContent="center"
201
- overflow="hidden"
202
- {...({ "data-list-slot": "media" } as Record<string, unknown>)}
203
- >
204
- <ImageFramingContext.Provider value={false}>{media}</ImageFramingContext.Provider>
205
- </View>
206
- ) : null}
207
- {leading ? (
208
- <View
209
- width={iconSize}
210
- height={iconSize}
211
- flexShrink={0}
212
- alignItems="center"
213
- justifyContent="center"
214
- {...({ "data-list-slot": "icon", color: ink } as Record<string, unknown>)}
215
- >
216
- {leading}
217
- </View>
218
- ) : null}
219
- <YStack
220
- flex={1}
221
- minWidth={0}
222
- {...({ "data-list-slot": "title" } as Record<string, unknown>)}
223
- >
224
- <RowText
225
- {...knobProps.body}
226
- {...headline}
227
- color={selectedOverride ?? headline.color}
228
- numberOfLines={1}
229
- userSelect="none"
230
- >
231
- {title}
232
- </RowText>
233
- {twoLine ? (
234
- <RowText
235
- {...knobProps.body}
236
- {...metaRole}
237
- color={selectedOverride ?? metaRole.color}
238
- opacity={selected ? 0.85 : 1}
239
- numberOfLines={1}
240
- userSelect="none"
241
- >
242
- {subtitle}
243
- </RowText>
244
- ) : null}
245
- </YStack>
246
- {meta != null && meta !== false ? (
247
- <XStack
248
- alignItems="center"
249
- {...knobProps.gap}
250
- flexShrink={0}
251
- {...(twoLine ? { alignSelf: "flex-start" } : null)}
252
- {...({ "data-list-slot": "meta" } as Record<string, unknown>)}
253
- >
254
- {typeof meta === "string" || typeof meta === "number" ? (
255
- <ListRowMeta>{meta}</ListRowMeta>
256
- ) : (
257
- meta
258
- )}
259
- </XStack>
260
- ) : null}
261
- </XStack>
262
- </ListRowTwoLineContext.Provider>
263
- );
264
- }
265
-
266
- /**
267
- * A row in a scroller waits this long before it paints its press, the delay
268
- * UIScrollView gives its content: a touch that becomes a scroll never fills
269
- * the row it started on (LC-147).
270
- */
271
- export const listRowPressDelayMs = 150;
272
-
273
- /** What a touch surface adds to a row: the 44 floor and, on native, the press delay. */
274
- export function listRowTouchProps(touch: boolean, native = !isWeb) {
275
- if (!touch) return {};
276
- return native
277
- ? { minHeight: MIN_PRESS_TARGET, delayPressIn: listRowPressDelayMs }
278
- : { minHeight: MIN_PRESS_TARGET };
279
- }
280
-
281
66
  /**
282
67
  * Props for the generic List component.
283
68
  *