@multiplatform.one/components 7.6.3 → 7.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) 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 +13 -29
  4. package/dist/cjs/Alert/index.native.js +17 -37
  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.native.js.map +1 -1
  8. package/dist/cjs/Avatar/index.native.js.map +1 -1
  9. package/dist/cjs/Badge/index.cjs +4 -3
  10. package/dist/cjs/Badge/index.native.js +7 -6
  11. package/dist/cjs/Badge/index.native.js.map +1 -1
  12. package/dist/cjs/Button.native.js.map +1 -1
  13. package/dist/cjs/Card.cjs +1 -9
  14. package/dist/cjs/Card.native.js +2 -7
  15. package/dist/cjs/Card.native.js.map +1 -1
  16. package/dist/cjs/CardFooter.cjs +1 -9
  17. package/dist/cjs/CardFooter.native.js +2 -7
  18. package/dist/cjs/CardFooter.native.js.map +1 -1
  19. package/dist/cjs/CardHeader.cjs +1 -9
  20. package/dist/cjs/CardHeader.native.js +2 -7
  21. package/dist/cjs/CardHeader.native.js.map +1 -1
  22. package/dist/cjs/Carousel/index.native.js +1 -1
  23. package/dist/cjs/Carousel/index.native.js.map +1 -1
  24. package/dist/cjs/Chip/index.native.js.map +1 -1
  25. package/dist/cjs/ContextMenu/index.native.js.map +1 -1
  26. package/dist/cjs/CopyField/index.native.js.map +1 -1
  27. package/dist/cjs/DotIndicator/index.native.js.map +1 -1
  28. package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
  29. package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
  30. package/dist/cjs/Heading.native.js.map +1 -1
  31. package/dist/cjs/Meter/index.native.js +1 -1
  32. package/dist/cjs/Meter/index.native.js.map +1 -1
  33. package/dist/cjs/Meter/meter.native.js.map +1 -1
  34. package/dist/cjs/Pagination.native.js +1 -1
  35. package/dist/cjs/Pagination.native.js.map +1 -1
  36. package/dist/cjs/ProgressSteps/index.cjs +13 -6
  37. package/dist/cjs/ProgressSteps/index.native.js +14 -6
  38. package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
  39. package/dist/cjs/Quote/index.native.js.map +1 -1
  40. package/dist/cjs/Separator/index.native.js.map +1 -1
  41. package/dist/cjs/SheetModal/detents.cjs +46 -0
  42. package/dist/cjs/SheetModal/detents.native.js +54 -0
  43. package/dist/cjs/SheetModal/detents.native.js.map +1 -0
  44. package/dist/cjs/SheetModal/index.native.js +8 -11
  45. package/dist/cjs/SheetModal/index.native.js.map +1 -1
  46. package/dist/cjs/Skeleton/index.native.js.map +1 -1
  47. package/dist/cjs/SkipLink/index.native.js.map +1 -1
  48. package/dist/cjs/SortableList/SortableHandle.native.js.map +1 -1
  49. package/dist/cjs/SortableList/index.cjs +1 -1
  50. package/dist/cjs/SortableList/index.native.js +1 -1
  51. package/dist/cjs/SortableList/index.native.js.map +1 -1
  52. package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
  53. package/dist/cjs/Tabs/index.native.js.map +1 -1
  54. package/dist/cjs/Text.native.js.map +1 -1
  55. package/dist/cjs/Toast/index.native.js.map +1 -1
  56. package/dist/cjs/Toast/store.native.js.map +1 -1
  57. package/dist/cjs/Tooltip/nativePress.native.js.map +1 -1
  58. package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
  59. package/dist/cjs/TreeSelect/index.native.js +1 -1
  60. package/dist/cjs/TreeSelect/index.native.js.map +1 -1
  61. package/dist/cjs/TreeSelect/treeSelectModel.native.js.map +1 -1
  62. package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
  63. package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
  64. package/dist/cjs/Video/types.native.js.map +1 -1
  65. package/dist/cjs/Wheel/index.native.js.map +1 -1
  66. package/dist/cjs/Wizard/index.native.js +2 -2
  67. package/dist/cjs/Wizard/index.native.js.map +1 -1
  68. package/dist/cjs/actions/ActionBar.cjs +3 -1
  69. package/dist/cjs/actions/ActionBar.native.js +11 -2
  70. package/dist/cjs/actions/ActionBar.native.js.map +1 -1
  71. package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
  72. package/dist/cjs/actions/devWarn.native.js.map +1 -1
  73. package/dist/cjs/actions/index.native.js.map +1 -1
  74. package/dist/cjs/actions/severity.native.js.map +1 -1
  75. package/dist/cjs/charts/Axis.native.js.map +1 -1
  76. package/dist/cjs/charts/BarChart.native.js.map +1 -1
  77. package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
  78. package/dist/cjs/charts/LineChart.native.js.map +1 -1
  79. package/dist/cjs/charts/PieChart.native.js.map +1 -1
  80. package/dist/cjs/charts/Sparkline.native.js.map +1 -1
  81. package/dist/cjs/charts/accessibility.native.js.map +1 -1
  82. package/dist/cjs/charts/composeChart.native.js.map +1 -1
  83. package/dist/cjs/charts/index.native.js.map +1 -1
  84. package/dist/cjs/charts/math.native.js.map +1 -1
  85. package/dist/cjs/charts/series.native.js.map +1 -1
  86. package/dist/cjs/charts/svg.native.js.map +1 -1
  87. package/dist/cjs/charts/types.native.js.map +1 -1
  88. package/dist/cjs/charts/useChartTheme.native.js.map +1 -1
  89. package/dist/cjs/code/Code/index.cjs +2 -15
  90. package/dist/cjs/code/Code/index.native.js +3 -13
  91. package/dist/cjs/code/Code/index.native.js.map +1 -1
  92. package/dist/cjs/code/CodeBlock/index.native.js +6 -6
  93. package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
  94. package/dist/cjs/code/HighlightedCode/index.cjs +0 -5
  95. package/dist/cjs/code/HighlightedCode/index.native.js +0 -5
  96. package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
  97. package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
  98. package/dist/cjs/code/Pre/index.native.js.map +1 -1
  99. package/dist/cjs/code/index.native.js +5 -5
  100. package/dist/cjs/code/index.native.js.map +1 -1
  101. package/dist/cjs/componentColors.native.js.map +1 -1
  102. package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
  103. package/dist/cjs/feedback/NotifyHost.native.js +2 -2
  104. package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
  105. package/dist/cjs/feedback/copy.native.js.map +1 -1
  106. package/dist/cjs/feedback/index.native.js.map +1 -1
  107. package/dist/cjs/feedback/notify.native.js.map +1 -1
  108. package/dist/cjs/feedback/route.native.js.map +1 -1
  109. package/dist/cjs/feedback/store.native.js.map +1 -1
  110. package/dist/cjs/hooks/index.native.js +1 -1
  111. package/dist/cjs/hooks/index.native.js.map +1 -1
  112. package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
  113. package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -1
  114. package/dist/cjs/icons/CheckRegular.native.js.map +1 -1
  115. package/dist/cjs/icons/MinusRegular.native.js.map +1 -1
  116. package/dist/cjs/icons/index.native.js.map +1 -1
  117. package/dist/cjs/icons/lucide.native.js.map +1 -1
  118. package/dist/cjs/icons/themed.native.js.map +1 -1
  119. package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
  120. package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
  121. package/dist/cjs/images/Image/index.native.js +1 -1
  122. package/dist/cjs/images/Image/shared.native.js +1 -1
  123. package/dist/cjs/images/Image/shared.native.js.map +1 -1
  124. package/dist/cjs/images/Image/types.native.js.map +1 -1
  125. package/dist/cjs/images/index.native.js.map +1 -1
  126. package/dist/cjs/index.native.js +29 -29
  127. package/dist/cjs/index.native.js.map +1 -1
  128. package/dist/cjs/knobImmuneExports.cjs +8 -0
  129. package/dist/cjs/knobImmuneExports.native.js +8 -0
  130. package/dist/cjs/knobImmuneExports.native.js.map +1 -1
  131. package/dist/cjs/layouts/AsyncBoundary.native.js +2 -2
  132. package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
  133. package/dist/cjs/layouts/Debug/index.native.js.map +1 -1
  134. package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
  135. package/dist/cjs/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  136. package/dist/cjs/layouts/PageTemplates.native.js.map +1 -1
  137. package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
  138. package/dist/cjs/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  139. package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
  140. package/dist/cjs/layouts/attachments.native.js +1 -1
  141. package/dist/cjs/layouts/attachments.native.js.map +1 -1
  142. package/dist/cjs/layouts/breadcrumbs.cjs +3 -1
  143. package/dist/cjs/layouts/breadcrumbs.native.js +3 -1
  144. package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
  145. package/dist/cjs/layouts/index.native.js +3 -3
  146. package/dist/cjs/layouts/index.native.js.map +1 -1
  147. package/dist/cjs/layouts/page.native.js.map +1 -1
  148. package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -1
  149. package/dist/cjs/layouts/sidebar.native.js.map +1 -1
  150. package/dist/cjs/layouts/tags.native.js +1 -1
  151. package/dist/cjs/layouts/tags.native.js.map +1 -1
  152. package/dist/cjs/layouts/timeline.native.js +2 -2
  153. package/dist/cjs/layouts/timeline.native.js.map +1 -1
  154. package/dist/cjs/layouts/toolbar.native.js.map +1 -1
  155. package/dist/cjs/shared/actionScan.native.js.map +1 -1
  156. package/dist/cjs/shared/i18n.native.js.map +1 -1
  157. package/dist/cjs/shared/t.native.js.map +1 -1
  158. package/dist/cjs/shared/textRidesText.native.js.map +1 -1
  159. package/dist/cjs/shared/useKeyboardInset.native.js.map +1 -1
  160. package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -1
  161. package/dist/cjs/surfaces.native.js +1 -1
  162. package/dist/cjs/surfaces.native.js.map +1 -1
  163. package/dist/cjs/tamagui.cjs +5 -0
  164. package/dist/cjs/tamagui.native.js +5 -0
  165. package/dist/cjs/tamagui.native.js.map +1 -1
  166. package/dist/cjs/testSetup.native.js.map +1 -1
  167. package/dist/cjs/utils/setTinted.native.js.map +1 -1
  168. package/dist/cjs/utils/unwrapText.native.js.map +1 -1
  169. package/dist/cjs/views/Calendar.native.js.map +1 -1
  170. package/dist/cjs/views/Dashboard.cjs +3 -3
  171. package/dist/cjs/views/Dashboard.native.js +4 -4
  172. package/dist/cjs/views/Dashboard.native.js.map +1 -1
  173. package/dist/cjs/views/Gantt.native.js +1 -1
  174. package/dist/cjs/views/Gantt.native.js.map +1 -1
  175. package/dist/cjs/views/ImageGrid.native.js +1 -1
  176. package/dist/cjs/views/ImageGrid.native.js.map +1 -1
  177. package/dist/cjs/views/List.cjs +4 -5
  178. package/dist/cjs/views/List.native.js +4 -5
  179. package/dist/cjs/views/List.native.js.map +1 -1
  180. package/dist/cjs/views/ReportBuilder.native.js +1 -1
  181. package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
  182. package/dist/cjs/views/TreeView.cjs +4 -1
  183. package/dist/cjs/views/TreeView.native.js +3 -0
  184. package/dist/cjs/views/TreeView.native.js.map +1 -1
  185. package/dist/cjs/views/calendarMath.native.js.map +1 -1
  186. package/dist/cjs/views/ganttMath.native.js.map +1 -1
  187. package/dist/cjs/views/index.native.js +1 -1
  188. package/dist/cjs/views/index.native.js.map +1 -1
  189. package/dist/cjs/views/kanbanDnd.native.js.map +1 -1
  190. package/dist/cjs/views/treeViewDnd.native.js.map +1 -1
  191. package/dist/cjs/views/treeViewLayout.native.js.map +1 -1
  192. package/dist/cjs/views/treeViewMotion.native.js.map +1 -1
  193. package/dist/esm/Alert/index.mjs +14 -31
  194. package/dist/esm/Alert/index.mjs.map +1 -1
  195. package/dist/esm/Alert/index.native.js +36 -57
  196. package/dist/esm/Alert/index.native.js.map +1 -1
  197. package/dist/esm/Badge/index.mjs +4 -3
  198. package/dist/esm/Badge/index.mjs.map +1 -1
  199. package/dist/esm/Badge/index.native.js +7 -6
  200. package/dist/esm/Badge/index.native.js.map +1 -1
  201. package/dist/esm/Card.mjs +3 -11
  202. package/dist/esm/Card.mjs.map +1 -1
  203. package/dist/esm/Card.native.js +7 -12
  204. package/dist/esm/Card.native.js.map +1 -1
  205. package/dist/esm/CardFooter.mjs +3 -11
  206. package/dist/esm/CardFooter.mjs.map +1 -1
  207. package/dist/esm/CardFooter.native.js +6 -11
  208. package/dist/esm/CardFooter.native.js.map +1 -1
  209. package/dist/esm/CardHeader.mjs +3 -11
  210. package/dist/esm/CardHeader.mjs.map +1 -1
  211. package/dist/esm/CardHeader.native.js +6 -11
  212. package/dist/esm/CardHeader.native.js.map +1 -1
  213. package/dist/esm/ProgressSteps/index.mjs +14 -7
  214. package/dist/esm/ProgressSteps/index.mjs.map +1 -1
  215. package/dist/esm/ProgressSteps/index.native.js +15 -7
  216. package/dist/esm/ProgressSteps/index.native.js.map +1 -1
  217. package/dist/esm/SheetModal/detents.mjs +19 -0
  218. package/dist/esm/SheetModal/detents.mjs.map +1 -0
  219. package/dist/esm/SheetModal/detents.native.js +24 -0
  220. package/dist/esm/SheetModal/detents.native.js.map +1 -0
  221. package/dist/esm/SheetModal/index.mjs.map +1 -1
  222. package/dist/esm/SheetModal/index.native.js +7 -10
  223. package/dist/esm/SheetModal/index.native.js.map +1 -1
  224. package/dist/esm/SortableList/index.mjs +1 -1
  225. package/dist/esm/SortableList/index.mjs.map +1 -1
  226. package/dist/esm/SortableList/index.native.js +1 -1
  227. package/dist/esm/SortableList/index.native.js.map +1 -1
  228. package/dist/esm/actions/ActionBar.mjs +6 -4
  229. package/dist/esm/actions/ActionBar.mjs.map +1 -1
  230. package/dist/esm/actions/ActionBar.native.js +13 -4
  231. package/dist/esm/actions/ActionBar.native.js.map +1 -1
  232. package/dist/esm/code/Code/index.mjs +2 -15
  233. package/dist/esm/code/Code/index.mjs.map +1 -1
  234. package/dist/esm/code/Code/index.native.js +6 -16
  235. package/dist/esm/code/Code/index.native.js.map +1 -1
  236. package/dist/esm/code/HighlightedCode/index.mjs +0 -5
  237. package/dist/esm/code/HighlightedCode/index.mjs.map +1 -1
  238. package/dist/esm/code/HighlightedCode/index.native.js +0 -5
  239. package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
  240. package/dist/esm/knobImmuneExports.mjs +8 -0
  241. package/dist/esm/knobImmuneExports.mjs.map +1 -1
  242. package/dist/esm/knobImmuneExports.native.js +8 -0
  243. package/dist/esm/knobImmuneExports.native.js.map +1 -1
  244. package/dist/esm/layouts/breadcrumbs.mjs +3 -1
  245. package/dist/esm/layouts/breadcrumbs.mjs.map +1 -1
  246. package/dist/esm/layouts/breadcrumbs.native.js +3 -1
  247. package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
  248. package/dist/esm/tamagui.mjs +3 -2
  249. package/dist/esm/tamagui.mjs.map +1 -1
  250. package/dist/esm/tamagui.native.js +3 -2
  251. package/dist/esm/tamagui.native.js.map +1 -1
  252. package/dist/esm/views/Dashboard.mjs +3 -3
  253. package/dist/esm/views/Dashboard.mjs.map +1 -1
  254. package/dist/esm/views/Dashboard.native.js +3 -3
  255. package/dist/esm/views/Dashboard.native.js.map +1 -1
  256. package/dist/esm/views/List.mjs +4 -5
  257. package/dist/esm/views/List.mjs.map +1 -1
  258. package/dist/esm/views/List.native.js +4 -5
  259. package/dist/esm/views/List.native.js.map +1 -1
  260. package/dist/esm/views/TreeView.mjs +4 -1
  261. package/dist/esm/views/TreeView.mjs.map +1 -1
  262. package/dist/esm/views/TreeView.native.js +3 -0
  263. package/dist/esm/views/TreeView.native.js.map +1 -1
  264. package/dist/jsx/Alert/index.mjs +14 -31
  265. package/dist/jsx/Alert/index.mjs.map +1 -1
  266. package/dist/jsx/Alert/index.native.js +17 -37
  267. package/dist/jsx/Alert/index.native.js.map +1 -1
  268. package/dist/jsx/Badge/index.mjs +4 -3
  269. package/dist/jsx/Badge/index.mjs.map +1 -1
  270. package/dist/jsx/Badge/index.native.js +7 -6
  271. package/dist/jsx/Badge/index.native.js.map +1 -1
  272. package/dist/jsx/Card.mjs +3 -11
  273. package/dist/jsx/Card.mjs.map +1 -1
  274. package/dist/jsx/Card.native.js +2 -7
  275. package/dist/jsx/Card.native.js.map +1 -1
  276. package/dist/jsx/CardFooter.mjs +3 -11
  277. package/dist/jsx/CardFooter.mjs.map +1 -1
  278. package/dist/jsx/CardFooter.native.js +2 -7
  279. package/dist/jsx/CardFooter.native.js.map +1 -1
  280. package/dist/jsx/CardHeader.mjs +3 -11
  281. package/dist/jsx/CardHeader.mjs.map +1 -1
  282. package/dist/jsx/CardHeader.native.js +2 -7
  283. package/dist/jsx/CardHeader.native.js.map +1 -1
  284. package/dist/jsx/ProgressSteps/index.mjs +14 -7
  285. package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
  286. package/dist/jsx/ProgressSteps/index.native.js +14 -6
  287. package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
  288. package/dist/jsx/SheetModal/detents.mjs +19 -0
  289. package/dist/jsx/SheetModal/detents.mjs.map +1 -0
  290. package/dist/jsx/SheetModal/detents.native.js +54 -0
  291. package/dist/jsx/SheetModal/detents.native.js.map +1 -0
  292. package/dist/jsx/SheetModal/index.mjs.map +1 -1
  293. package/dist/jsx/SheetModal/index.native.js +8 -11
  294. package/dist/jsx/SheetModal/index.native.js.map +1 -1
  295. package/dist/jsx/SortableList/index.mjs +1 -1
  296. package/dist/jsx/SortableList/index.mjs.map +1 -1
  297. package/dist/jsx/SortableList/index.native.js +1 -1
  298. package/dist/jsx/SortableList/index.native.js.map +1 -1
  299. package/dist/jsx/actions/ActionBar.mjs +6 -4
  300. package/dist/jsx/actions/ActionBar.mjs.map +1 -1
  301. package/dist/jsx/actions/ActionBar.native.js +11 -2
  302. package/dist/jsx/actions/ActionBar.native.js.map +1 -1
  303. package/dist/jsx/code/Code/index.mjs +2 -15
  304. package/dist/jsx/code/Code/index.mjs.map +1 -1
  305. package/dist/jsx/code/Code/index.native.js +3 -13
  306. package/dist/jsx/code/Code/index.native.js.map +1 -1
  307. package/dist/jsx/code/CodeBlock/index.native.js +1 -1
  308. package/dist/jsx/code/HighlightedCode/index.mjs +0 -5
  309. package/dist/jsx/code/HighlightedCode/index.mjs.map +1 -1
  310. package/dist/jsx/code/HighlightedCode/index.native.js +0 -5
  311. package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
  312. package/dist/jsx/code/index.native.js +1 -1
  313. package/dist/jsx/feedback/NotifyHost.native.js +1 -1
  314. package/dist/jsx/index.native.js +1 -1
  315. package/dist/jsx/knobImmuneExports.mjs +8 -0
  316. package/dist/jsx/knobImmuneExports.mjs.map +1 -1
  317. package/dist/jsx/knobImmuneExports.native.js +8 -0
  318. package/dist/jsx/knobImmuneExports.native.js.map +1 -1
  319. package/dist/jsx/layouts/AsyncBoundary.native.js +1 -1
  320. package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
  321. package/dist/jsx/layouts/breadcrumbs.mjs +3 -1
  322. package/dist/jsx/layouts/breadcrumbs.mjs.map +1 -1
  323. package/dist/jsx/layouts/breadcrumbs.native.js +3 -1
  324. package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
  325. package/dist/jsx/tamagui.mjs +3 -2
  326. package/dist/jsx/tamagui.mjs.map +1 -1
  327. package/dist/jsx/tamagui.native.js +5 -0
  328. package/dist/jsx/tamagui.native.js.map +1 -1
  329. package/dist/jsx/views/Dashboard.mjs +3 -3
  330. package/dist/jsx/views/Dashboard.mjs.map +1 -1
  331. package/dist/jsx/views/Dashboard.native.js +3 -3
  332. package/dist/jsx/views/Dashboard.native.js.map +1 -1
  333. package/dist/jsx/views/List.mjs +4 -5
  334. package/dist/jsx/views/List.mjs.map +1 -1
  335. package/dist/jsx/views/List.native.js +4 -5
  336. package/dist/jsx/views/List.native.js.map +1 -1
  337. package/dist/jsx/views/TreeView.mjs +4 -1
  338. package/dist/jsx/views/TreeView.mjs.map +1 -1
  339. package/dist/jsx/views/TreeView.native.js +3 -0
  340. package/dist/jsx/views/TreeView.native.js.map +1 -1
  341. package/package.json +9 -9
  342. package/src/Alert/index.tsx +9 -4
  343. package/src/AnimateHeight/AnimateHeight.stories.spec.tsx +37 -0
  344. package/src/AnimateHeight/AnimateHeight.stories.tsx +95 -0
  345. package/src/Avatar/Avatar.spec.tsx +4 -1
  346. package/src/Badge/Badge.spec.tsx +10 -11
  347. package/src/Badge/index.tsx +7 -6
  348. package/src/Button.spec.tsx +26 -15
  349. package/src/Card.tsx +8 -3
  350. package/src/CardFooter.spec.tsx +1 -1
  351. package/src/CardFooter.tsx +6 -3
  352. package/src/CardHeader.spec.tsx +1 -1
  353. package/src/CardHeader.tsx +6 -3
  354. package/src/Chip/Chip.spec.tsx +1 -1
  355. package/src/Pagination.spec.tsx +1 -1
  356. package/src/ProgressSteps/ProgressSteps.spec.tsx +29 -2
  357. package/src/ProgressSteps/index.tsx +21 -7
  358. package/src/SheetModal/SheetModal.spec.tsx +88 -0
  359. package/src/SheetModal/SheetModal.stories.spec.tsx +54 -0
  360. package/src/SheetModal/SheetModal.stories.tsx +109 -0
  361. package/src/SheetModal/detents.ts +55 -0
  362. package/src/SheetModal/index.native.tsx +13 -12
  363. package/src/SheetModal/index.tsx +5 -2
  364. package/src/Skeleton/Skeleton.spec.tsx +1 -1
  365. package/src/SortableList/SortableList.spec.tsx +41 -0
  366. package/src/SortableList/SortableList.stories.tsx +35 -2
  367. package/src/SortableList/index.tsx +1 -1
  368. package/src/TreeSelect/TreeSelect.stories.tsx +76 -1
  369. package/src/Wheel/Wheel.spec.tsx +1 -1
  370. package/src/actions/ActionBar.stories.spec.tsx +45 -0
  371. package/src/actions/ActionBar.stories.tsx +161 -0
  372. package/src/actions/ActionBar.tsx +8 -1
  373. package/src/charts/Axis.stories.spec.tsx +86 -0
  374. package/src/charts/Axis.stories.tsx +186 -0
  375. package/src/charts/ChartSurface.stories.spec.tsx +43 -0
  376. package/src/charts/ChartSurface.stories.tsx +148 -0
  377. package/src/code/Code/code.spec.tsx +27 -1
  378. package/src/code/Code/index.tsx +9 -2
  379. package/src/code/HighlightedCode/index.tsx +0 -1
  380. package/src/code/highlightedCode.spec.tsx +10 -1
  381. package/src/knobImmuneExports.ts +11 -0
  382. package/src/layouts/AsyncBoundary.spec.tsx +1 -1
  383. package/src/layouts/breadcrumbs.spec.tsx +17 -0
  384. package/src/layouts/breadcrumbs.tsx +19 -2
  385. package/src/layouts/tags.r7.spec.tsx +3 -1
  386. package/src/tamagui.ts +8 -0
  387. package/src/views/Dashboard.tsx +3 -3
  388. package/src/views/List.spec.tsx +42 -1
  389. package/src/views/List.tsx +6 -5
  390. package/src/views/TreeView.spec.tsx +26 -0
  391. package/src/views/TreeView.tsx +3 -0
  392. package/types/Alert/index.d.ts.map +1 -1
  393. package/types/Badge/index.d.ts.map +1 -1
  394. package/types/Card.d.ts.map +1 -1
  395. package/types/CardFooter.d.ts.map +1 -1
  396. package/types/CardHeader.d.ts.map +1 -1
  397. package/types/ProgressSteps/index.d.ts.map +1 -1
  398. package/types/SheetModal/detents.d.ts +38 -0
  399. package/types/SheetModal/detents.d.ts.map +1 -0
  400. package/types/SheetModal/index.d.ts +1 -1
  401. package/types/SheetModal/index.d.ts.map +1 -1
  402. package/types/SheetModal/index.native.d.ts +1 -1
  403. package/types/SheetModal/index.native.d.ts.map +1 -1
  404. package/types/actions/ActionBar.d.ts.map +1 -1
  405. package/types/code/Code/index.d.ts.map +1 -1
  406. package/types/code/HighlightedCode/index.d.ts.map +1 -1
  407. package/types/knobImmuneExports.d.ts.map +1 -1
  408. package/types/layouts/breadcrumbs.d.ts +7 -1
  409. package/types/layouts/breadcrumbs.d.ts.map +1 -1
  410. package/types/tamagui.d.ts +3 -1
  411. package/types/tamagui.d.ts.map +1 -1
  412. package/types/views/List.d.ts.map +1 -1
  413. package/types/views/TreeView.d.ts.map +1 -1
@@ -1,9 +1,14 @@
1
1
  import { fireEvent } from "@testing-library/react";
2
2
  import { renderWithProviders } from "@multiplatform.one/test-utils";
3
+ import { readFileSync } from "node:fs";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
3
6
  import { useState } from "react";
4
7
  import { describe, expect, it, vi } from "vitest";
5
8
  import { SortableList } from "./index";
6
9
 
10
+ const here = dirname(fileURLToPath(import.meta.url));
11
+
7
12
  const ITEMS = [
8
13
  { id: "mon", label: "Monday standup" },
9
14
  { id: "tue", label: "Tuesday review" },
@@ -14,10 +19,14 @@ const ITEMS = [
14
19
  function Harness({
15
20
  onChange = vi.fn(),
16
21
  readOnly,
22
+ disabled,
23
+ compact,
17
24
  canReorder,
18
25
  }: {
19
26
  onChange?: (next: typeof ITEMS) => void;
20
27
  readOnly?: boolean;
28
+ disabled?: boolean;
29
+ compact?: boolean;
21
30
  canReorder?: (item: (typeof ITEMS)[number], index: number) => boolean;
22
31
  }) {
23
32
  const [items, setItems] = useState(ITEMS);
@@ -28,6 +37,8 @@ function Harness({
28
37
  getLabel={(item) => item.label}
29
38
  canReorder={canReorder}
30
39
  readOnly={readOnly}
40
+ disabled={disabled}
41
+ compact={compact}
31
42
  onChange={(next) => {
32
43
  setItems(next);
33
44
  onChange(next);
@@ -119,4 +130,34 @@ describe("SortableList", () => {
119
130
  const { container } = renderWithProviders(<Harness readOnly />);
120
131
  expect(container.querySelectorAll("[data-sortable-handle]")).toHaveLength(0);
121
132
  });
133
+
134
+ it("renders no handles when disabled (board 04)", () => {
135
+ const { container } = renderWithProviders(<Harness disabled />);
136
+ expect(container.querySelectorAll("[data-sortable-handle]")).toHaveLength(0);
137
+ });
138
+
139
+ it("renders emptyMessage when there are no rows (board 04)", () => {
140
+ const { container } = renderWithProviders(
141
+ <SortableList
142
+ items={[]}
143
+ getId={(item: { id: string }) => item.id}
144
+ getLabel={(item: { label: string }) => item.label}
145
+ emptyMessage="No rows yet"
146
+ />,
147
+ );
148
+ expect(container.textContent).toContain("No rows yet");
149
+ expect(container.querySelectorAll("[data-sortable-row]")).toHaveLength(0);
150
+ });
151
+
152
+ it("compact still renders grab handles (LC-76: density does not drop controls)", () => {
153
+ const { container } = renderWithProviders(<Harness compact />);
154
+ expect(container.querySelectorAll("[data-sortable-handle]")).toHaveLength(4);
155
+ expect(container.querySelector('[role="list"]')).toBeTruthy();
156
+ });
157
+
158
+ it("spreads the outer radius fragment on the list frame, not the nested alias", () => {
159
+ const src = readFileSync(join(here, "index.tsx"), "utf8");
160
+ expect(src).toContain("{...knobProps.borderRadius}");
161
+ expect(src).not.toContain("knobProps.borderRadiusOuter");
162
+ });
122
163
  });
@@ -21,13 +21,27 @@ const meta: Meta<typeof SortableList> = {
21
21
  },
22
22
  },
23
23
  },
24
+ argTypes: {
25
+ disabled: { control: "boolean" },
26
+ readOnly: { control: "boolean" },
27
+ compact: { control: "boolean" },
28
+ disabledStyle: { control: "select", options: ["keepLabel", "dimWhole"] },
29
+ emptyMessage: { control: "text" },
30
+ },
24
31
  };
25
32
  export default meta;
26
33
 
27
34
  type Story = StoryObj<typeof SortableList>;
28
35
 
29
- function Demo(props: { readOnly?: boolean; locked?: string }) {
30
- const [items, setItems] = useState(SEED);
36
+ function Demo(props: {
37
+ readOnly?: boolean;
38
+ locked?: string;
39
+ disabled?: boolean;
40
+ compact?: boolean;
41
+ empty?: boolean;
42
+ disabledStyle?: "keepLabel" | "dimWhole";
43
+ }) {
44
+ const [items, setItems] = useState(props.empty ? [] : SEED);
31
45
  return (
32
46
  <SortableList
33
47
  items={items}
@@ -35,6 +49,10 @@ function Demo(props: { readOnly?: boolean; locked?: string }) {
35
49
  getLabel={(item) => item.label}
36
50
  canReorder={props.locked ? (item) => item.id !== props.locked : undefined}
37
51
  readOnly={props.readOnly}
52
+ disabled={props.disabled}
53
+ compact={props.compact}
54
+ disabledStyle={props.disabledStyle}
55
+ emptyMessage="No rows yet"
38
56
  onChange={setItems}
39
57
  aria-label="Sprint rituals"
40
58
  />
@@ -53,3 +71,18 @@ export const ReadOnly: Story = {
53
71
  export const LockedRow: Story = {
54
72
  render: () => <Demo locked="tue" />,
55
73
  };
74
+
75
+ /** Board 04 — empty is a real state, not an error. */
76
+ export const Empty: Story = {
77
+ render: () => <Demo empty />,
78
+ };
79
+
80
+ /** Board 04 — disabled list keeps labels, drops the handles. */
81
+ export const Disabled: Story = {
82
+ render: () => <Demo disabled />,
83
+ };
84
+
85
+ /** Board 04 — compact nested well. */
86
+ export const Compact: Story = {
87
+ render: () => <Demo compact />,
88
+ };
@@ -90,7 +90,7 @@ export function SortableList<T>({
90
90
  <YStack
91
91
  ref={containerRef as never}
92
92
  {...knobProps.surface}
93
- {...knobProps.borderRadiusOuter}
93
+ {...knobProps.borderRadius}
94
94
  overflow="hidden"
95
95
  role="list"
96
96
  aria-label={ariaLabel}
@@ -47,7 +47,7 @@ export default meta;
47
47
 
48
48
  type Story = StoryObj<typeof TreeSelect>;
49
49
 
50
- export const Account: Story = {
50
+ export const Default: Story = {
51
51
  render: function Render() {
52
52
  const [value, setValue] = useState("hdfc");
53
53
  return (
@@ -67,6 +67,31 @@ export const Account: Story = {
67
67
  },
68
68
  };
69
69
 
70
+ export const Open: Story = {
71
+ render: function Render() {
72
+ const [value, setValue] = useState("hdfc");
73
+ const [open, setOpen] = useState(true);
74
+ return (
75
+ <YStack width={280} padding="$4">
76
+ <TreeSelect
77
+ label="Account"
78
+ nodes={accounts}
79
+ value={value}
80
+ onChange={setValue}
81
+ open={open}
82
+ onOpenChange={setOpen}
83
+ placeholder="Select account"
84
+ searchPlaceholder="Filter accounts"
85
+ emptyMessage="No matching accounts"
86
+ defaultExpandedIds={["assets", "current", "bank"]}
87
+ />
88
+ </YStack>
89
+ );
90
+ },
91
+ };
92
+
93
+ export const Account: Story = Default;
94
+
70
95
  export const Empty: Story = {
71
96
  render: () => (
72
97
  <YStack width={280} padding="$4">
@@ -74,3 +99,53 @@ export const Empty: Story = {
74
99
  </YStack>
75
100
  ),
76
101
  };
102
+
103
+ export const Disabled: Story = {
104
+ render: () => (
105
+ <YStack width={280} padding="$4">
106
+ <TreeSelect
107
+ label="Account"
108
+ nodes={accounts}
109
+ value="hdfc"
110
+ disabled
111
+ placeholder="Select account"
112
+ />
113
+ </YStack>
114
+ ),
115
+ };
116
+
117
+ export const WithError: Story = {
118
+ render: () => (
119
+ <YStack width={280} padding="$4">
120
+ <TreeSelect
121
+ label="Account"
122
+ nodes={accounts}
123
+ required
124
+ error="An account is required"
125
+ placeholder="Select account"
126
+ />
127
+ </YStack>
128
+ ),
129
+ };
130
+
131
+ export const ReadOnly: Story = {
132
+ render: () => (
133
+ <YStack width={280} padding="$4">
134
+ <TreeSelect
135
+ label="Account"
136
+ nodes={accounts}
137
+ value="hdfc"
138
+ readOnly
139
+ placeholder="Select account"
140
+ />
141
+ </YStack>
142
+ ),
143
+ };
144
+
145
+ export const Skeleton: Story = {
146
+ render: () => (
147
+ <YStack width={280} padding="$4">
148
+ <TreeSelect label="Account" nodes={accounts} skeleton placeholder="Select account" />
149
+ </YStack>
150
+ ),
151
+ };
@@ -272,7 +272,7 @@ describe("Wheel design-law (MPO-60)", () => {
272
272
  it("exposes named exports and no default", async () => {
273
273
  const mod = await import("./index");
274
274
  expect(mod.Wheel).toBe(Wheel);
275
- expect(mod.default).toBeUndefined();
275
+ expect("default" in mod).toBe(false);
276
276
  });
277
277
 
278
278
  it("selected row type stays on body weight 400, never 600 (R7 / design-audit)", () => {
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ActionBar was rendered inside DestructiveAction.stories but had no title of
3
+ * its own, so the gallery never listed it (MPO-193). These mount every
4
+ * exported story so an unrenderable one fails here, not in the Kitchen Sink.
5
+ */
6
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
7
+ import { cleanup, screen } from "@testing-library/react";
8
+ import { afterEach, describe, expect, it } from "vitest";
9
+ import meta, { Alignments, CancelNeverDisabled, Default, WithSecondary } from "./ActionBar.stories";
10
+
11
+ afterEach(cleanup);
12
+
13
+ describe("ActionBar stories", () => {
14
+ it("declares the Components/ActionBar title against the component", () => {
15
+ expect(meta.title).toBe("Components/ActionBar");
16
+ expect(meta.component).toBeDefined();
17
+ });
18
+
19
+ it("Main renders the cancel and primary slots", () => {
20
+ renderWithProviders(
21
+ <>{Default.render?.(Default.args as never, { args: Default.args } as never)}</>,
22
+ );
23
+ expect(screen.getByText("Cancel")).toBeTruthy();
24
+ expect(screen.getByText("Save changes")).toBeTruthy();
25
+ });
26
+
27
+ it("Cancel + secondary + primary renders every slot", () => {
28
+ renderWithProviders(<>{WithSecondary.render?.({} as never, {} as never)}</>);
29
+ expect(screen.getByText("Cancel")).toBeTruthy();
30
+ expect(screen.getByText("Save draft")).toBeTruthy();
31
+ expect(screen.getByText("Preview")).toBeTruthy();
32
+ expect(screen.getByText("Publish")).toBeTruthy();
33
+ });
34
+
35
+ it("Alignments renders one bar per align value", () => {
36
+ renderWithProviders(<>{Alignments.render?.({} as never, {} as never)}</>);
37
+ expect(screen.getAllByText("Confirm")).toHaveLength(3);
38
+ expect(screen.getByText('align="between"')).toBeTruthy();
39
+ });
40
+
41
+ it("the cancel-disabled story still paints a reachable cancel", () => {
42
+ renderWithProviders(<>{CancelNeverDisabled.render?.({} as never, {} as never)}</>);
43
+ expect(screen.getByText("Cancel")).toBeTruthy();
44
+ });
45
+ });
@@ -0,0 +1,161 @@
1
+ import { Button } from "@multiplatform.one/forms";
2
+ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
3
+ import { useState } from "react";
4
+ import { Paragraph, YStack } from "tamagui";
5
+ import { Card } from "../surfaces";
6
+ import { ActionBar, type ActionBarProps } from "./ActionBar";
7
+
8
+ /**
9
+ * Presses land in the story itself rather than the Actions panel: the panel's
10
+ * `action()` pulls the Storybook preview runtime into the module graph, which
11
+ * the package's own vitest run cannot load, and the colocated spec mounts
12
+ * these stories for real.
13
+ */
14
+ function useLastPressed() {
15
+ const [last, setLast] = useState<string | null>(null);
16
+ return {
17
+ last,
18
+ press: (label: string) => () => setLast(label),
19
+ readout: (
20
+ <Paragraph size="$2" color="$color11">
21
+ {last === null ? "No action pressed yet." : `Last pressed: ${last}`}
22
+ </Paragraph>
23
+ ),
24
+ };
25
+ }
26
+
27
+ const meta: Meta<typeof ActionBar> = {
28
+ title: "Components/ActionBar",
29
+ component: ActionBar,
30
+ parameters: {
31
+ status: { type: "beta" },
32
+ docs: {
33
+ description: {
34
+ component:
35
+ "The action row. Slots (`primary`, `secondary`, `cancel`) keep the primary singular by construction and order the row cancel → secondary → primary, so the trailing default lands under the thumb. `align` picks the justification: `end` for dialogs and toolbars, `start` for page-level forms. DG-ACT-05 strips `disabled` off the cancel slot and DEV-warns; DG-ACT-01 DEV-warns on a second primary, including one composed into free children; DG-OVL-04 DEV-warns past two actions inside a dialog region unless `allowManyActions` ejects.",
36
+ },
37
+ },
38
+ },
39
+ argTypes: {
40
+ align: { control: "radio", options: ["start", "end", "between"] },
41
+ allowManyActions: { control: "boolean" },
42
+ },
43
+ };
44
+ export default meta;
45
+
46
+ type Story = StoryObj<typeof ActionBar>;
47
+
48
+ function Basic(args: Partial<ActionBarProps>) {
49
+ const { press, readout } = useLastPressed();
50
+ return (
51
+ <Card maxWidth={480}>
52
+ <YStack gap="$3">
53
+ {readout}
54
+ <ActionBar
55
+ {...args}
56
+ cancel={
57
+ <Button chromeless onPress={press("Cancel")}>
58
+ Cancel
59
+ </Button>
60
+ }
61
+ primary={
62
+ <Button accent onPress={press("Save changes")}>
63
+ Save changes
64
+ </Button>
65
+ }
66
+ />
67
+ </YStack>
68
+ </Card>
69
+ );
70
+ }
71
+
72
+ function FullRow() {
73
+ const { press, readout } = useLastPressed();
74
+ return (
75
+ <Card maxWidth={520}>
76
+ <YStack gap="$3">
77
+ {readout}
78
+ <ActionBar
79
+ cancel={
80
+ <Button chromeless onPress={press("Cancel")}>
81
+ Cancel
82
+ </Button>
83
+ }
84
+ secondary={[
85
+ <Button key="draft" onPress={press("Save draft")}>
86
+ Save draft
87
+ </Button>,
88
+ <Button key="preview" onPress={press("Preview")}>
89
+ Preview
90
+ </Button>,
91
+ ]}
92
+ primary={
93
+ <Button accent onPress={press("Publish")}>
94
+ Publish
95
+ </Button>
96
+ }
97
+ />
98
+ </YStack>
99
+ </Card>
100
+ );
101
+ }
102
+
103
+ export const Default: Story = {
104
+ name: "Main",
105
+ args: { align: "end" },
106
+ render: (args) => <Basic {...args} />,
107
+ };
108
+
109
+ export const WithSecondary: Story = {
110
+ name: "Cancel + secondary + primary",
111
+ render: () => <FullRow />,
112
+ };
113
+
114
+ export const Alignments: Story = {
115
+ render: () => (
116
+ <YStack gap="$4" maxWidth={520}>
117
+ {(["start", "end", "between"] as const).map((align) => (
118
+ <Card key={align}>
119
+ <YStack gap="$2">
120
+ <Paragraph size="$2">{`align="${align}"`}</Paragraph>
121
+ <ActionBar
122
+ align={align}
123
+ cancel={<Button chromeless>Cancel</Button>}
124
+ primary={<Button accent>Confirm</Button>}
125
+ />
126
+ </YStack>
127
+ </Card>
128
+ ))}
129
+ </YStack>
130
+ ),
131
+ };
132
+
133
+ export const CancelNeverDisabled: Story = {
134
+ name: "Cancel is never disabled",
135
+ parameters: {
136
+ docs: {
137
+ description: {
138
+ story:
139
+ "DG-ACT-05: the cancel slot is handed `disabled`, the prop is stripped, and DEV logs `[actions] cancel-disabled`. A dismissal a user cannot reach is a trap, so the escape hatch stays live even while the primary is blocked. Open the console to see the warn.",
140
+ },
141
+ },
142
+ },
143
+ render: () => {
144
+ return (
145
+ <Card maxWidth={480}>
146
+ <ActionBar
147
+ cancel={
148
+ <Button chromeless disabled>
149
+ Cancel
150
+ </Button>
151
+ }
152
+ primary={
153
+ <Button accent disabled>
154
+ Save changes
155
+ </Button>
156
+ }
157
+ />
158
+ </Card>
159
+ );
160
+ },
161
+ };
@@ -10,6 +10,7 @@
10
10
 
11
11
  import {
12
12
  Children,
13
+ Fragment,
13
14
  cloneElement,
14
15
  isValidElement,
15
16
  useEffect,
@@ -194,10 +195,16 @@ export function ActionBar({
194
195
  width="100%"
195
196
  {...stackProps}
196
197
  >
198
+ {/* `secondaryItems` is a plain array (asArray), so rendering it bare made
199
+ React warn "Each child in a list should have a unique key" and name
200
+ the CALLER — the screen that passed a single element into the slot —
201
+ instead of this file. Key it here, where the array is built. */}
197
202
  {hasSlots ? (
198
203
  <>
199
204
  {cancelItems}
200
- {secondaryItems}
205
+ {secondaryItems.map((node, index) => (
206
+ <Fragment key={`mp-action-secondary-${index}`}>{node}</Fragment>
207
+ ))}
201
208
  {primary}
202
209
  </>
203
210
  ) : null}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * XAxis and YAxis are exported from the charts barrel but had no title of
3
+ * their own — only the composed charts had stories (MPO-193). happy-dom runs
4
+ * no layout, so a measured ChartSurface stays at width 0 and draws nothing;
5
+ * these specs render the same axis frame at an explicit pixel size so the
6
+ * marks the stories show are actually asserted.
7
+ */
8
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
9
+ import { cleanup, screen } from "@testing-library/react";
10
+ import { afterEach, describe, expect, it } from "vitest";
11
+ import { ChartSurface } from "./ChartSurface";
12
+ import { XAxis, YAxis } from "./Axis";
13
+ import { computeCartesianPlot } from "./composeChart";
14
+ import { createBandScale, createLinearScale } from "./math";
15
+ import meta, { AxisLineAndTicks, Default, LabelTruncation, WideValueRange } from "./Axis.stories";
16
+
17
+ afterEach(cleanup);
18
+
19
+ const categories = ["Mon", "Tue", "Wed", "Thu", "Fri"];
20
+
21
+ function Frame({ showGrid = true }: { showGrid?: boolean }) {
22
+ return (
23
+ <ChartSurface label="Axis frame" width={400} height={200}>
24
+ {(size) => {
25
+ const plot = computeCartesianPlot(size, {
26
+ showXAxis: true,
27
+ showYAxis: true,
28
+ yTickLabels: ["0", "25", "50", "75", "100"],
29
+ fontSize: 12,
30
+ });
31
+ const xScale = createBandScale({
32
+ domain: categories,
33
+ range: [plot.x, plot.x + plot.width],
34
+ });
35
+ const yScale = createLinearScale({
36
+ domain: [0, 100],
37
+ range: [plot.y + plot.height, plot.y],
38
+ });
39
+ return (
40
+ <>
41
+ <YAxis plot={plot} scale={yScale} ticks={4} showGrid={showGrid} />
42
+ <XAxis plot={plot} scale={xScale} />
43
+ </>
44
+ );
45
+ }}
46
+ </ChartSurface>
47
+ );
48
+ }
49
+
50
+ describe("Axis stories", () => {
51
+ it("declares the Components/Axis title against the component", () => {
52
+ expect(meta.title).toBe("Components/Axis");
53
+ expect(meta.component).toBeDefined();
54
+ });
55
+
56
+ it("every exported story mounts", () => {
57
+ for (const story of [Default, AxisLineAndTicks, LabelTruncation, WideValueRange]) {
58
+ renderWithProviders(<>{story.render?.({} as never, {} as never)}</>);
59
+ cleanup();
60
+ }
61
+ expect(true).toBe(true);
62
+ });
63
+
64
+ it("Long labels truncate renders both container widths", () => {
65
+ renderWithProviders(<>{LabelTruncation.render?.({} as never, {} as never)}</>);
66
+ expect(screen.getByText("520px container")).toBeTruthy();
67
+ expect(screen.getByText("280px container")).toBeTruthy();
68
+ });
69
+
70
+ it("draws one x label per category and the y grid lines at a fixed size", () => {
71
+ const { container } = renderWithProviders(<Frame />);
72
+ const labels = Array.from(container.querySelectorAll("text")).map((node) => node.textContent);
73
+ for (const category of categories) expect(labels).toContain(category);
74
+ // 4-tick hint, plus the x baseline and one tick mark per category.
75
+ expect(container.querySelectorAll("line").length).toBeGreaterThan(categories.length);
76
+ });
77
+
78
+ it("showGrid=false drops the horizontal rules", () => {
79
+ const withGrid = renderWithProviders(<Frame />).container.querySelectorAll("line").length;
80
+ cleanup();
81
+ const withoutGrid = renderWithProviders(<Frame showGrid={false} />).container.querySelectorAll(
82
+ "line",
83
+ ).length;
84
+ expect(withoutGrid).toBeLessThan(withGrid);
85
+ });
86
+ });