@slotted/react 0.1.0-beta.41 → 0.1.0-beta.43

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 (554) hide show
  1. package/dist/{accordion-n5D6mcmS.js → accordion-xW-aFeGb.js} +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/{action-bar-Cq4dt4hP.js → action-bar-BSUuY6pJ.js} +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/{action-sheet-dNnB26br.js → action-sheet-BouG2qh_.js} +1 -1
  6. package/dist/action-sheet.js +1 -1
  7. package/dist/{app-shell-DyPHYe4K.js → app-shell-DsWhsSMU.js} +128 -111
  8. package/dist/app-shell.js +2 -2
  9. package/dist/attachment-TZykYNu5.js +300 -0
  10. package/dist/attachment.js +2 -2
  11. package/dist/{avatar-group-bJaZE1_C.js → avatar-group-Bzmmj2HI.js} +2 -1
  12. package/dist/avatar-group.js +1 -1
  13. package/dist/{calendar-DRuJ7z0H.js → calendar-YQ784o4d.js} +139 -123
  14. package/dist/calendar.js +1 -1
  15. package/dist/{carousel-B9nMK7Yf.js → carousel-CRNz-T3g.js} +1 -1
  16. package/dist/carousel.js +1 -1
  17. package/dist/{cascader-CivJ76VR.js → cascader-fq8fNWSr.js} +1 -1
  18. package/dist/cascader.js +1 -1
  19. package/dist/{chart-CgXbG6gZ.js → chart-vedR0BDN.js} +1 -1
  20. package/dist/chart.js +1 -1
  21. package/dist/{checkbox-D3E4gzMe.js → checkbox-DsJhlB5c.js} +3 -3
  22. package/dist/{checkbox-group-Dg5YN3fx.js → checkbox-group-pvX9R_yS.js} +2 -2
  23. package/dist/checkbox-group.js +1 -1
  24. package/dist/checkbox.js +1 -1
  25. package/dist/{collapsible-CT4_3aXm.js → collapsible-KzBs5HvA.js} +2 -2
  26. package/dist/collapsible.js +1 -1
  27. package/dist/{color-picker-CeOl4ikV.js → color-picker-i-MJ5VVs.js} +4 -4
  28. package/dist/color-picker.js +1 -1
  29. package/dist/{column-manager-CnOhzVGP.js → column-manager-D028QbfO.js} +5 -5
  30. package/dist/column-manager.js +1 -1
  31. package/dist/{combobox-C2qlkTw6.js → combobox-599heRN_.js} +1 -1
  32. package/dist/combobox.js +1 -1
  33. package/dist/{command-palette-C90CzfQi.js → command-palette-Bgf5tfCI.js} +160 -156
  34. package/dist/command-palette.js +1 -1
  35. package/dist/{context-menu-WiKS4Zwv.js → context-menu-WM_tT9hz.js} +1 -1
  36. package/dist/context-menu.js +1 -1
  37. package/dist/{currency-field-LAawS9qo.js → currency-field-rS36pjCO.js} +1 -1
  38. package/dist/currency-field.js +1 -1
  39. package/dist/{dashboard-grid-Zzqmbzqq.js → dashboard-grid-Dh2Q3IQv.js} +2 -2
  40. package/dist/dashboard-grid.js +1 -1
  41. package/dist/{data-grid-Y5aX9njc.js → data-grid-DUft3rJb.js} +17 -17
  42. package/dist/data-grid.js +1 -1
  43. package/dist/{data-list-CyEq7M2D.js → data-list-Dv3orBtf.js} +17 -17
  44. package/dist/data-list.js +1 -1
  45. package/dist/{date-field-CxubN_3u.js → date-field-BZ5JcvXJ.js} +1 -1
  46. package/dist/date-field.js +1 -1
  47. package/dist/{date-picker-6hj83x5D.js → date-picker-BvEbsbJC.js} +4 -4
  48. package/dist/date-picker.js +2 -2
  49. package/dist/{date-range-picker-CBWnFTgL.js → date-range-picker-uIr-yReE.js} +5 -5
  50. package/dist/date-range-picker.js +1 -1
  51. package/dist/{datetime-field-GMIqBuTa.js → datetime-field-DDs3mV9Z.js} +1 -1
  52. package/dist/datetime-field.js +1 -1
  53. package/dist/{datetime-picker-DwUYd3zF.js → datetime-picker-DDYXqrjm.js} +6 -6
  54. package/dist/datetime-picker.js +1 -1
  55. package/dist/{datetime-range-picker-CX_tBt6b.js → datetime-range-picker-CFTHW771.js} +6 -6
  56. package/dist/datetime-range-picker.js +1 -1
  57. package/dist/detail-panel-Cke3ZFU3.js +342 -0
  58. package/dist/detail-panel.js +2 -2
  59. package/dist/docs/accordion.examples.md +743 -0
  60. package/dist/docs/accordion.json +84 -28
  61. package/dist/docs/accordion.md +56 -152
  62. package/dist/docs/action-bar.examples.md +768 -0
  63. package/dist/docs/action-bar.json +74 -50
  64. package/dist/docs/action-bar.md +49 -311
  65. package/dist/docs/action-sheet.examples.md +771 -0
  66. package/dist/docs/action-sheet.json +91 -51
  67. package/dist/docs/action-sheet.md +72 -233
  68. package/dist/docs/app-shell.examples.md +1221 -64
  69. package/dist/docs/app-shell.json +99 -60
  70. package/dist/docs/app-shell.md +93 -57
  71. package/dist/docs/attachment.examples.md +689 -0
  72. package/dist/docs/attachment.json +69 -37
  73. package/dist/docs/attachment.md +44 -203
  74. package/dist/docs/avatar-group.json +111 -23
  75. package/dist/docs/avatar-group.md +487 -28
  76. package/dist/docs/breadcrumb.json +64 -16
  77. package/dist/docs/breadcrumb.md +489 -56
  78. package/dist/docs/button-group.json +98 -2
  79. package/dist/docs/button-group.md +411 -8
  80. package/dist/docs/calendar.examples.md +512 -0
  81. package/dist/docs/calendar.json +72 -24
  82. package/dist/docs/calendar.md +18 -147
  83. package/dist/docs/carousel.examples.md +868 -0
  84. package/dist/docs/carousel.json +58 -50
  85. package/dist/docs/carousel.md +66 -300
  86. package/dist/docs/cascader.examples.md +1269 -0
  87. package/dist/docs/cascader.json +72 -16
  88. package/dist/docs/cascader.md +78 -154
  89. package/dist/docs/chart.examples.md +734 -24
  90. package/dist/docs/chart.json +93 -13
  91. package/dist/docs/chart.md +28 -7
  92. package/dist/docs/clock.json +71 -15
  93. package/dist/docs/clock.md +326 -21
  94. package/dist/docs/code-block.json +79 -55
  95. package/dist/docs/code-block.md +417 -74
  96. package/dist/docs/collapsible.examples.md +575 -0
  97. package/dist/docs/collapsible.json +89 -49
  98. package/dist/docs/collapsible.md +47 -197
  99. package/dist/docs/color-picker.json +60 -12
  100. package/dist/docs/color-picker.md +245 -22
  101. package/dist/docs/column-manager.examples.md +764 -0
  102. package/dist/docs/column-manager.json +68 -12
  103. package/dist/docs/column-manager.md +44 -203
  104. package/dist/docs/command-palette.examples.md +747 -0
  105. package/dist/docs/command-palette.json +48 -24
  106. package/dist/docs/command-palette.md +60 -339
  107. package/dist/docs/context-menu.json +58 -18
  108. package/dist/docs/context-menu.md +442 -77
  109. package/dist/docs/currency-field.examples.md +355 -73
  110. package/dist/docs/currency-field.json +96 -64
  111. package/dist/docs/currency-field.md +57 -50
  112. package/dist/docs/dashboard-grid.examples.md +629 -0
  113. package/dist/docs/dashboard-grid.json +64 -16
  114. package/dist/docs/dashboard-grid.md +34 -152
  115. package/dist/docs/data-list.examples.md +1556 -0
  116. package/dist/docs/data-list.json +58 -18
  117. package/dist/docs/data-list.md +139 -224
  118. package/dist/docs/date-field.examples.md +543 -0
  119. package/dist/docs/date-field.json +64 -24
  120. package/dist/docs/date-field.md +22 -168
  121. package/dist/docs/datetime-field.examples.md +699 -0
  122. package/dist/docs/datetime-field.json +79 -31
  123. package/dist/docs/datetime-field.md +24 -269
  124. package/dist/docs/datetime-range-picker.examples.md +682 -0
  125. package/dist/docs/datetime-range-picker.json +117 -61
  126. package/dist/docs/datetime-range-picker.md +59 -224
  127. package/dist/docs/description-list.examples.md +652 -0
  128. package/dist/docs/description-list.json +49 -25
  129. package/dist/docs/description-list.md +33 -188
  130. package/dist/docs/detail-panel.examples.md +1177 -0
  131. package/dist/docs/detail-panel.json +69 -53
  132. package/dist/docs/detail-panel.md +114 -324
  133. package/dist/docs/entity-picker.examples.md +1037 -0
  134. package/dist/docs/entity-picker.json +66 -18
  135. package/dist/docs/entity-picker.md +56 -246
  136. package/dist/docs/event-calendar.examples.md +749 -49
  137. package/dist/docs/event-calendar.json +46 -22
  138. package/dist/docs/event-calendar.md +81 -11
  139. package/dist/docs/field-group.examples.md +554 -0
  140. package/dist/docs/field-group.json +98 -34
  141. package/dist/docs/field-group.md +55 -133
  142. package/dist/docs/field.json +15 -1
  143. package/dist/docs/field.md +3 -1
  144. package/dist/docs/filter-bar.examples.md +772 -0
  145. package/dist/docs/filter-bar.json +41 -25
  146. package/dist/docs/filter-bar.md +42 -246
  147. package/dist/docs/floating-panel.json +56 -0
  148. package/dist/docs/floating-panel.md +329 -8
  149. package/dist/docs/form.examples.md +579 -0
  150. package/dist/docs/form.json +87 -39
  151. package/dist/docs/form.md +53 -177
  152. package/dist/docs/fullscreen.examples.md +558 -0
  153. package/dist/docs/fullscreen.json +58 -18
  154. package/dist/docs/fullscreen.md +50 -169
  155. package/dist/docs/highlight.json +57 -25
  156. package/dist/docs/highlight.md +402 -50
  157. package/dist/docs/hover-card.json +65 -17
  158. package/dist/docs/hover-card.md +422 -64
  159. package/dist/docs/icon.json +85 -5
  160. package/dist/docs/icon.md +401 -10
  161. package/dist/docs/image.examples.md +670 -0
  162. package/dist/docs/image.json +44 -28
  163. package/dist/docs/image.md +24 -176
  164. package/dist/docs/import-export-center.examples.md +1280 -0
  165. package/dist/docs/import-export-center.json +67 -27
  166. package/dist/docs/import-export-center.md +121 -226
  167. package/dist/docs/list-item.examples.md +769 -0
  168. package/dist/docs/list-item.json +110 -38
  169. package/dist/docs/list-item.md +84 -201
  170. package/dist/docs/listbox.examples.md +858 -0
  171. package/dist/docs/listbox.json +76 -28
  172. package/dist/docs/listbox.md +41 -263
  173. package/dist/docs/loading-overlay.examples.md +577 -0
  174. package/dist/docs/loading-overlay.json +55 -23
  175. package/dist/docs/loading-overlay.md +49 -168
  176. package/dist/docs/markdown.json +79 -55
  177. package/dist/docs/markdown.md +581 -85
  178. package/dist/docs/media-viewer.examples.md +1038 -0
  179. package/dist/docs/media-viewer.json +70 -15
  180. package/dist/docs/media-viewer.md +84 -135
  181. package/dist/docs/menu.json +67 -0
  182. package/dist/docs/menu.md +8 -1
  183. package/dist/docs/menubar.json +55 -15
  184. package/dist/docs/menubar.md +488 -42
  185. package/dist/docs/message-scroller.examples.md +1193 -0
  186. package/dist/docs/message-scroller.json +41 -17
  187. package/dist/docs/message-scroller.md +80 -134
  188. package/dist/docs/message.examples.md +944 -0
  189. package/dist/docs/message.json +64 -16
  190. package/dist/docs/message.md +34 -326
  191. package/dist/docs/meter.json +58 -26
  192. package/dist/docs/meter.md +312 -32
  193. package/dist/docs/navigation-menu.examples.md +1107 -0
  194. package/dist/docs/navigation-menu.json +57 -41
  195. package/dist/docs/navigation-menu.md +105 -298
  196. package/dist/docs/notification-center.examples.md +1045 -0
  197. package/dist/docs/notification-center.json +71 -15
  198. package/dist/docs/notification-center.md +76 -266
  199. package/dist/docs/otp-input.examples.md +490 -0
  200. package/dist/docs/otp-input.json +65 -25
  201. package/dist/docs/otp-input.md +20 -191
  202. package/dist/docs/page-header.examples.md +1041 -0
  203. package/dist/docs/page-header.json +75 -43
  204. package/dist/docs/page-header.md +79 -291
  205. package/dist/docs/page.examples.md +633 -0
  206. package/dist/docs/page.json +48 -16
  207. package/dist/docs/page.md +62 -129
  208. package/dist/docs/pagination.json +89 -33
  209. package/dist/docs/pagination.md +462 -55
  210. package/dist/docs/popover.json +1 -1
  211. package/dist/docs/popover.md +1 -1
  212. package/dist/docs/prompt-composer.examples.md +630 -0
  213. package/dist/docs/prompt-composer.json +66 -18
  214. package/dist/docs/prompt-composer.md +35 -161
  215. package/dist/docs/prose.json +69 -37
  216. package/dist/docs/prose.md +393 -75
  217. package/dist/docs/rating.examples.md +525 -0
  218. package/dist/docs/rating.json +92 -28
  219. package/dist/docs/rating.md +27 -241
  220. package/dist/docs/saved-views.examples.md +1108 -0
  221. package/dist/docs/saved-views.json +53 -21
  222. package/dist/docs/saved-views.md +86 -171
  223. package/dist/docs/scroll-area.examples.md +837 -0
  224. package/dist/docs/scroll-area.json +64 -24
  225. package/dist/docs/scroll-area.md +57 -140
  226. package/dist/docs/section.examples.md +676 -0
  227. package/dist/docs/section.json +68 -20
  228. package/dist/docs/section.md +39 -162
  229. package/dist/docs/segmented-control.examples.md +480 -0
  230. package/dist/docs/segmented-control.json +76 -28
  231. package/dist/docs/segmented-control.md +20 -191
  232. package/dist/docs/select.json +55 -1
  233. package/dist/docs/select.md +7 -2
  234. package/dist/docs/side-navigation.examples.md +1468 -0
  235. package/dist/docs/side-navigation.json +53 -53
  236. package/dist/docs/side-navigation.md +79 -354
  237. package/dist/docs/slider.examples.md +505 -0
  238. package/dist/docs/slider.json +91 -51
  239. package/dist/docs/slider.md +47 -212
  240. package/dist/docs/sparkline.json +60 -36
  241. package/dist/docs/sparkline.md +447 -71
  242. package/dist/docs/split-button.examples.md +509 -0
  243. package/dist/docs/split-button.json +73 -41
  244. package/dist/docs/split-button.md +64 -194
  245. package/dist/docs/splitter.examples.md +921 -0
  246. package/dist/docs/splitter.json +94 -46
  247. package/dist/docs/splitter.md +75 -182
  248. package/dist/docs/stat-card.examples.md +725 -0
  249. package/dist/docs/stat-card.json +89 -41
  250. package/dist/docs/stat-card.md +55 -227
  251. package/dist/docs/status-indicator.json +80 -32
  252. package/dist/docs/status-indicator.md +409 -65
  253. package/dist/docs/stepper.json +53 -21
  254. package/dist/docs/stepper.md +369 -48
  255. package/dist/docs/table-of-contents.examples.md +550 -0
  256. package/dist/docs/table-of-contents.json +60 -28
  257. package/dist/docs/table-of-contents.md +70 -205
  258. package/dist/docs/tags-input.examples.md +541 -0
  259. package/dist/docs/tags-input.json +64 -16
  260. package/dist/docs/tags-input.md +15 -262
  261. package/dist/docs/time-field.examples.md +587 -0
  262. package/dist/docs/time-field.json +69 -29
  263. package/dist/docs/time-field.md +21 -223
  264. package/dist/docs/time-picker.json +117 -53
  265. package/dist/docs/time-picker.md +499 -54
  266. package/dist/docs/time-range-picker.examples.md +750 -0
  267. package/dist/docs/time-range-picker.json +139 -75
  268. package/dist/docs/time-range-picker.md +63 -225
  269. package/dist/docs/timeline.examples.md +617 -0
  270. package/dist/docs/timeline.json +44 -28
  271. package/dist/docs/timeline.md +34 -208
  272. package/dist/docs/toggle-group.examples.md +584 -0
  273. package/dist/docs/toggle-group.json +84 -20
  274. package/dist/docs/toggle-group.md +17 -182
  275. package/dist/docs/toggle.json +93 -37
  276. package/dist/docs/toggle.md +304 -51
  277. package/dist/docs/toolbar.json +56 -16
  278. package/dist/docs/toolbar.md +357 -63
  279. package/dist/docs/top-navigation.examples.md +1206 -140
  280. package/dist/docs/top-navigation.json +49 -33
  281. package/dist/docs/top-navigation.md +87 -36
  282. package/dist/docs/tour.examples.md +960 -0
  283. package/dist/docs/tour.json +57 -25
  284. package/dist/docs/tour.md +60 -244
  285. package/dist/docs/transfer.examples.md +631 -0
  286. package/dist/docs/transfer.json +80 -16
  287. package/dist/docs/transfer.md +41 -170
  288. package/dist/docs/typography.json +96 -0
  289. package/dist/docs/typography.md +352 -4
  290. package/dist/docs/upload.examples.md +555 -53
  291. package/dist/docs/upload.json +62 -30
  292. package/dist/docs/upload.md +46 -11
  293. package/dist/docs/wizard.examples.md +1389 -0
  294. package/dist/docs/wizard.json +89 -49
  295. package/dist/docs/wizard.md +122 -263
  296. package/dist/{drawer-Du1aC1px.js → drawer-CQagePr_.js} +256 -256
  297. package/dist/drawer.js +1 -1
  298. package/dist/{entity-picker-BwJX0gNJ.js → entity-picker-C78f3Z0o.js} +11 -8
  299. package/dist/entity-picker.js +1 -1
  300. package/dist/{event-calendar-DzlL95E4.js → event-calendar-DJPoCi-O.js} +5 -5
  301. package/dist/event-calendar.js +1 -1
  302. package/dist/field-C-HRhke0.js +421 -0
  303. package/dist/{field-group-7zV68b3d.js → field-group-CU0PasvW.js} +1 -1
  304. package/dist/field-group.js +1 -1
  305. package/dist/field.js +1 -1
  306. package/dist/{filter-bar-DMuP5P6e.js → filter-bar-D61wiQFP.js} +11 -11
  307. package/dist/filter-bar.js +1 -1
  308. package/dist/{hover-card-CWCSZ5_p.js → hover-card-CTItbEfH.js} +2 -2
  309. package/dist/hover-card.js +1 -1
  310. package/dist/{import-export-center-DzAUMTq5.js → import-export-center-mqvmlzwB.js} +45 -37
  311. package/dist/import-export-center.js +1 -1
  312. package/dist/index.js +132 -132
  313. package/dist/{listbox-CWU3DiEt.js → listbox-ZqiJ2yer.js} +1 -1
  314. package/dist/listbox.js +1 -1
  315. package/dist/{markdown-7wOBMXTl.js → markdown-8CtV4k44.js} +3 -3
  316. package/dist/markdown.js +1 -1
  317. package/dist/{media-viewer-zEXcwfEY.js → media-viewer-C_cbuAq-.js} +64 -60
  318. package/dist/media-viewer.js +2 -2
  319. package/dist/menu-parts-DXs5YuUA.js +932 -0
  320. package/dist/menu.js +1 -1
  321. package/dist/{menubar-k8Q4_p9l.js → menubar-CVoAFc6r.js} +2 -2
  322. package/dist/menubar.js +1 -1
  323. package/dist/message-P91bEGyV.js +455 -0
  324. package/dist/message.js +2 -2
  325. package/dist/{multi-select-DEd_92BC.js → multi-select-Dc2d6dDB.js} +1 -1
  326. package/dist/multi-select.js +1 -1
  327. package/dist/{number-field-BJKoidAE.js → number-field-BQ54hXmk.js} +1 -1
  328. package/dist/number-field.js +1 -1
  329. package/dist/{otp-input-Czz9Z6dQ.js → otp-input-DRooqa3f.js} +1 -1
  330. package/dist/otp-input.js +1 -1
  331. package/dist/{page-header-DmwBGwlm.js → page-header-jeAIQSZM.js} +103 -108
  332. package/dist/page-header.js +1 -1
  333. package/dist/{pagination-D0PUAFYm.js → pagination-BRXuyPzo.js} +1 -1
  334. package/dist/pagination.js +1 -1
  335. package/dist/{picker-frame-CT5WNEnw.js → picker-frame-B6sPCP5Y.js} +1 -1
  336. package/dist/{popover-B2t__iNO.js → popover-1DlOu95x.js} +198 -197
  337. package/dist/popover.js +1 -1
  338. package/dist/{prompt-composer-Lsfcz_i9.js → prompt-composer-tYIs39rn.js} +1 -1
  339. package/dist/prompt-composer.js +1 -1
  340. package/dist/{radio-group-_ZRUgcI5.js → radio-group-AW3xcYYh.js} +2 -2
  341. package/dist/radio-group.js +1 -1
  342. package/dist/{rating-C6AkIIUi.js → rating-h3qdHLNi.js} +1 -1
  343. package/dist/rating.js +1 -1
  344. package/dist/{saved-views-zM-DxT1F.js → saved-views-nqn0SDXn.js} +4 -4
  345. package/dist/saved-views.js +1 -1
  346. package/dist/section-CVTQdWBl.js +216 -0
  347. package/dist/section.js +2 -2
  348. package/dist/{segmented-control-D52GeOlS.js → segmented-control-BSMVjukr.js} +3 -3
  349. package/dist/segmented-control.js +1 -1
  350. package/dist/select-d448Wkzb.js +1124 -0
  351. package/dist/select.js +1 -1
  352. package/dist/{side-navigation-CtZuP87S.js → side-navigation-BQzBxz2B.js} +220 -220
  353. package/dist/side-navigation.js +1 -1
  354. package/dist/{slider-DQqQ0skr.js → slider-DQ2CnxTO.js} +1 -1
  355. package/dist/slider.js +1 -1
  356. package/dist/{split-button-BYowsA6Q.js → split-button-D4MPKSB2.js} +1 -1
  357. package/dist/split-button.js +1 -1
  358. package/dist/{stat-card-CL3Xe6pV.js → stat-card-BpGZiFbG.js} +12 -14
  359. package/dist/stat-card.js +1 -1
  360. package/dist/{stepper-DHdrANZI.js → stepper-Cxb_tHnA.js} +130 -127
  361. package/dist/stepper.js +2 -2
  362. package/dist/styles/action-bar.css +1 -1
  363. package/dist/styles/app-shell.css +1 -1
  364. package/dist/styles/carousel.css +1 -1
  365. package/dist/styles/cascader.css +2 -0
  366. package/dist/styles/chart.css +1 -1
  367. package/dist/styles/checkbox-group.css +2 -0
  368. package/dist/styles/checkbox.css +2 -0
  369. package/dist/styles/color-picker.css +3 -3
  370. package/dist/styles/column-manager.css +2 -2
  371. package/dist/styles/combobox.css +2 -0
  372. package/dist/styles/context-menu.css +1 -1
  373. package/dist/styles/currency-field.css +2 -0
  374. package/dist/styles/dashboard-grid.css +2 -2
  375. package/dist/styles/data-grid.css +4 -4
  376. package/dist/styles/data-list.css +3 -1
  377. package/dist/styles/date-field.css +2 -0
  378. package/dist/styles/date-picker.css +3 -1
  379. package/dist/styles/date-range-picker.css +3 -1
  380. package/dist/styles/datetime-field.css +2 -0
  381. package/dist/styles/datetime-picker.css +3 -1
  382. package/dist/styles/datetime-range-picker.css +3 -1
  383. package/dist/styles/entity-picker.css +3 -1
  384. package/dist/styles/event-calendar.css +2 -2
  385. package/dist/styles/field-group.css +2 -0
  386. package/dist/styles/field.css +2 -0
  387. package/dist/styles/filter-bar.css +4 -4
  388. package/dist/styles/floating-panel.css +1 -1
  389. package/dist/styles/hover-card.css +1 -1
  390. package/dist/styles/import-export-center.css +3 -3
  391. package/dist/styles/index.css +10 -10
  392. package/dist/styles/listbox.css +2 -0
  393. package/dist/styles/markdown.css +2 -0
  394. package/dist/styles/menu.css +1 -1
  395. package/dist/styles/menubar.css +1 -1
  396. package/dist/styles/multi-select.css +2 -0
  397. package/dist/styles/number-field.css +2 -0
  398. package/dist/styles/otp-input.css +2 -0
  399. package/dist/styles/pagination.css +1 -1
  400. package/dist/styles/popover.css +1 -1
  401. package/dist/styles/prompt-composer.css +2 -0
  402. package/dist/styles/radio-group.css +2 -0
  403. package/dist/styles/rating.css +2 -0
  404. package/dist/styles/saved-views.css +3 -3
  405. package/dist/styles/segmented-control.css +2 -0
  406. package/dist/styles/select.css +3 -1
  407. package/dist/styles/side-navigation.css +1 -1
  408. package/dist/styles/slider.css +2 -0
  409. package/dist/styles/split-button.css +1 -1
  410. package/dist/styles/switch.css +2 -0
  411. package/dist/styles/table.css +3 -3
  412. package/dist/styles/tags-input.css +2 -0
  413. package/dist/styles/text-field.css +2 -0
  414. package/dist/styles/textarea.css +2 -0
  415. package/dist/styles/time-field.css +2 -0
  416. package/dist/styles/time-picker.css +3 -1
  417. package/dist/styles/time-range-picker.css +3 -1
  418. package/dist/styles/toggle-group.css +3 -1
  419. package/dist/styles/toolbar.css +1 -1
  420. package/dist/styles/top-navigation.css +1 -1
  421. package/dist/styles/transfer.css +2 -0
  422. package/dist/styles/upload.css +2 -0
  423. package/dist/styles.css +1 -1
  424. package/dist/{switch-CcZAVLiW.js → switch-DxMukg7F.js} +1 -1
  425. package/dist/switch.js +1 -1
  426. package/dist/{table-D4oX9Gvn.js → table-BecApjeD.js} +13 -13
  427. package/dist/table.js +1 -1
  428. package/dist/{tags-input-O87zTh7h.js → tags-input-CqCeLtk-.js} +1 -1
  429. package/dist/tags-input.js +1 -1
  430. package/dist/{text-field-Cnjc7LB5.js → text-field-CMOkJ9Z6.js} +1 -1
  431. package/dist/text-field.js +1 -1
  432. package/dist/{textarea-DcA7jwOM.js → textarea-DfqPfXTr.js} +1 -1
  433. package/dist/textarea.js +1 -1
  434. package/dist/{time-field-BanhrUvf.js → time-field-GyLQsxcc.js} +1 -1
  435. package/dist/time-field.js +1 -1
  436. package/dist/{time-picker-Cu1iV039.js → time-picker-CGHPnust.js} +3 -3
  437. package/dist/time-picker.js +1 -1
  438. package/dist/{time-range-picker-sdbaFJFN.js → time-range-picker-BMRtAqPy.js} +4 -4
  439. package/dist/time-range-picker.js +1 -1
  440. package/dist/{timeline-BiL2CXfn.js → timeline-ZngK6zLC.js} +9 -6
  441. package/dist/timeline.js +1 -1
  442. package/dist/{toggle-zDTD5G3H.js → toggle-DSEEtL3Y.js} +7 -2
  443. package/dist/{toggle-group-D7GQyNQP.js → toggle-group-DZEWkVRo.js} +8 -3
  444. package/dist/toggle-group.js +1 -1
  445. package/dist/toggle.js +1 -1
  446. package/dist/{toolbar-DOV4BKY8.js → toolbar-BP7ka6lN.js} +1 -1
  447. package/dist/toolbar.js +1 -1
  448. package/dist/top-navigation-YSEQzBhD.js +744 -0
  449. package/dist/top-navigation.js +2 -2
  450. package/dist/{transfer-CuLlF_nY.js → transfer-Cv5yQuTN.js} +5 -5
  451. package/dist/transfer.js +1 -1
  452. package/dist/types/app-shell/app-shell-parts.d.ts +7 -0
  453. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  454. package/dist/types/app-shell/index.d.ts +1 -1
  455. package/dist/types/app-shell/index.d.ts.map +1 -1
  456. package/dist/types/attachment/attachment-parts.d.ts +24 -11
  457. package/dist/types/attachment/attachment-parts.d.ts.map +1 -1
  458. package/dist/types/attachment/attachment.d.ts +3 -3
  459. package/dist/types/attachment/attachment.d.ts.map +1 -1
  460. package/dist/types/avatar-group/avatar-group.d.ts.map +1 -1
  461. package/dist/types/calendar/calendar.d.ts.map +1 -1
  462. package/dist/types/calendar/use-clock-today.d.ts +10 -0
  463. package/dist/types/calendar/use-clock-today.d.ts.map +1 -0
  464. package/dist/types/carousel/carousel-parts.d.ts +2 -2
  465. package/dist/types/command-palette/command-palette.d.ts.map +1 -1
  466. package/dist/types/data-list/data-list.d.ts.map +1 -1
  467. package/dist/types/detail-panel/detail-panel-parts.d.ts +10 -3
  468. package/dist/types/detail-panel/detail-panel-parts.d.ts.map +1 -1
  469. package/dist/types/detail-panel/detail-panel.d.ts.map +1 -1
  470. package/dist/types/detail-panel/detail-panel.types.d.ts +7 -0
  471. package/dist/types/detail-panel/detail-panel.types.d.ts.map +1 -1
  472. package/dist/types/entity-picker/entity-picker.d.ts.map +1 -1
  473. package/dist/types/field/field-defaults.d.ts +1 -1
  474. package/dist/types/field/field-defaults.d.ts.map +1 -1
  475. package/dist/types/field/field-help-sheet.d.ts +15 -0
  476. package/dist/types/field/field-help-sheet.d.ts.map +1 -0
  477. package/dist/types/field/field-parts.d.ts +1 -1
  478. package/dist/types/field/field-parts.d.ts.map +1 -1
  479. package/dist/types/field/field.types.d.ts +11 -0
  480. package/dist/types/field/field.types.d.ts.map +1 -1
  481. package/dist/types/field/index.d.ts +1 -1
  482. package/dist/types/field/index.d.ts.map +1 -1
  483. package/dist/types/import-export-center/import-export-center.d.ts.map +1 -1
  484. package/dist/types/media-viewer/index.d.ts +2 -2
  485. package/dist/types/media-viewer/index.d.ts.map +1 -1
  486. package/dist/types/media-viewer/media-viewer-bar.d.ts +3 -1
  487. package/dist/types/media-viewer/media-viewer-bar.d.ts.map +1 -1
  488. package/dist/types/media-viewer/media-viewer.types.d.ts +1 -0
  489. package/dist/types/media-viewer/media-viewer.types.d.ts.map +1 -1
  490. package/dist/types/menu/index.d.ts +1 -1
  491. package/dist/types/menu/index.d.ts.map +1 -1
  492. package/dist/types/menu/menu-defaults.d.ts.map +1 -1
  493. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  494. package/dist/types/menu/menu-sheet-step.d.ts +6 -0
  495. package/dist/types/menu/menu-sheet-step.d.ts.map +1 -0
  496. package/dist/types/menu/menu.d.ts +1 -1
  497. package/dist/types/menu/menu.d.ts.map +1 -1
  498. package/dist/types/menu/menu.types.d.ts +15 -0
  499. package/dist/types/menu/menu.types.d.ts.map +1 -1
  500. package/dist/types/menu/use-menu-sheet.d.ts +9 -0
  501. package/dist/types/menu/use-menu-sheet.d.ts.map +1 -0
  502. package/dist/types/message/message-parts.d.ts +7 -0
  503. package/dist/types/message/message-parts.d.ts.map +1 -1
  504. package/dist/types/message/message.d.ts.map +1 -1
  505. package/dist/types/page-header/page-header-parts.d.ts.map +1 -1
  506. package/dist/types/pagination/pagination-parts.d.ts.map +1 -1
  507. package/dist/types/picker-panel/picker-layer.d.ts +4 -1
  508. package/dist/types/picker-panel/picker-layer.d.ts.map +1 -1
  509. package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
  510. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  511. package/dist/types/section/section-parts.d.ts +16 -8
  512. package/dist/types/section/section-parts.d.ts.map +1 -1
  513. package/dist/types/section/section.d.ts.map +1 -1
  514. package/dist/types/segmented-control/segmented-control-parts.d.ts.map +1 -1
  515. package/dist/types/select/index.d.ts +1 -1
  516. package/dist/types/select/index.d.ts.map +1 -1
  517. package/dist/types/select/select-defaults.d.ts.map +1 -1
  518. package/dist/types/select/select-parts.d.ts.map +1 -1
  519. package/dist/types/select/select.d.ts +6 -2
  520. package/dist/types/select/select.d.ts.map +1 -1
  521. package/dist/types/select/select.types.d.ts +9 -0
  522. package/dist/types/select/select.types.d.ts.map +1 -1
  523. package/dist/types/select/use-select-sheet.d.ts +9 -0
  524. package/dist/types/select/use-select-sheet.d.ts.map +1 -0
  525. package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
  526. package/dist/types/stat-card/stat-card-delta.d.ts.map +1 -1
  527. package/dist/types/stat-card/stat-card-parts.d.ts +3 -3
  528. package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
  529. package/dist/types/stepper/stepper-parts.d.ts +11 -2
  530. package/dist/types/stepper/stepper-parts.d.ts.map +1 -1
  531. package/dist/types/stepper/stepper.d.ts.map +1 -1
  532. package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
  533. package/dist/types/toggle/toggle.d.ts.map +1 -1
  534. package/dist/types/toggle/toggle.types.d.ts +4 -1
  535. package/dist/types/toggle/toggle.types.d.ts.map +1 -1
  536. package/dist/types/toggle-group/toggle-group-parts.d.ts.map +1 -1
  537. package/dist/types/toggle-group/toggle-group.types.d.ts +4 -1
  538. package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
  539. package/dist/types/top-navigation/top-navigation.d.ts.map +1 -1
  540. package/dist/{upload-CPl38p-S.js → upload-CuMOaPK3.js} +1 -1
  541. package/dist/upload.js +1 -1
  542. package/dist/{use-date-picker-DWV7KWS7.js → use-date-picker-DdSX3RE4.js} +2 -2
  543. package/dist/{use-picker-draft-BJlHcb6J.js → use-picker-draft-I_pxqYsc.js} +48 -35
  544. package/dist/{wizard-4c0X7Bx_.js → wizard-Dfryz1id.js} +214 -214
  545. package/dist/wizard.js +1 -1
  546. package/package.json +6 -6
  547. package/dist/attachment-MqczA38F.js +0 -292
  548. package/dist/detail-panel-EImAtksY.js +0 -327
  549. package/dist/field-vOVzvq5t.js +0 -368
  550. package/dist/menu-parts-DgL617_H.js +0 -814
  551. package/dist/message-D1Dd6Y2k.js +0 -452
  552. package/dist/section-D_qOfdxR.js +0 -213
  553. package/dist/select-BkUuIVBK.js +0 -1017
  554. package/dist/top-navigation-D3rpgBV2.js +0 -744
@@ -0,0 +1,1556 @@
1
+ <!-- index: ./index.md -->
2
+ # data-list
3
+
4
+ `data-ui="data-list"` · Records as stacked label and value items.
5
+
6
+ ## Examples
7
+
8
+ ### Playground
9
+
10
+ An account list at a phone’s width: select two records, sort by balance from the menu, open the fields of a record. The line under the list shows the query and the selection the list asked for.
11
+
12
+ Excerpt — not a complete module
13
+
14
+ ```tsx
15
+ <DataList
16
+ columns={columns}
17
+ label="Accounts"
18
+ rowKey="id"
19
+ rows={accounts}
20
+ selectionMode="multiple"
21
+ subtitle="email"
22
+ trailing="balance"
23
+ />;
24
+ ```
25
+
26
+ ### Anatomy
27
+
28
+ Every part on one record: the checkbox and the avatar at the start, the title as a link, the subtitle, the balance at the end, four fields, the disclosure for two more, and the row’s actions.
29
+
30
+ Excerpt — not a complete module
31
+
32
+ ```tsx
33
+ const columns: GridColumn<Account>[] = [
34
+ { id: 'name', label: 'Account', rowHeader: true },
35
+ { id: 'email', label: 'Email' },
36
+ { id: 'balance', label: 'Balance', kind: 'number' },
37
+ { id: 'status', label: 'Status', priority: 1 },
38
+ { id: 'owner', label: 'Owner', priority: 2 },
39
+ { id: 'actions', label: 'Actions', kind: 'actions' },
40
+ ];
41
+ ```
42
+
43
+ ### Fields by priority, at three widths
44
+
45
+ The same record at 375, 640 and 1024 pixels. Priority orders the pairs; a phone gives one pair a line with the label beside the value, a tablet two and three columns of label over value.
46
+
47
+ Example
48
+
49
+ ```tsx
50
+ import { useState } from 'react';
51
+
52
+ import type { GridColumn } from '@slotted/core/grid';
53
+ import { DataList } from '@slotted/react/data-list';
54
+ import { Stack } from '@slotted/react/stack';
55
+ import { Text } from '@slotted/react/typography';
56
+
57
+ interface Account {
58
+ id: string;
59
+ name: string;
60
+ email: string;
61
+ balance: number;
62
+ status: string;
63
+ owner: string | null;
64
+ region: string;
65
+ }
66
+
67
+ const ACCOUNTS: Account[] = [
68
+ {
69
+ id: 'acme',
70
+ name: 'Acme Logistics',
71
+ email: 'ops@acme.example',
72
+ balance: 12480,
73
+ status: 'Active',
74
+ owner: 'Marta Silva',
75
+ region: 'Lisbon',
76
+ },
77
+ {
78
+ id: 'borealis',
79
+ name: 'Borealis Foods',
80
+ email: 'buying@borealis.example',
81
+ balance: 3902.15,
82
+ status: 'On hold',
83
+ owner: null,
84
+ region: 'Porto',
85
+ },
86
+ {
87
+ id: 'cobalt',
88
+ name: 'Cobalt Studio',
89
+ email: 'hello@cobalt.example',
90
+ balance: 48120.4,
91
+ status: 'Active',
92
+ owner: 'John Reed',
93
+ region: 'Madrid',
94
+ },
95
+ {
96
+ id: 'dunmore',
97
+ name: 'Dunmore Freight',
98
+ email: 'accounts@dunmore.example',
99
+ balance: 0,
100
+ status: 'Closed',
101
+ owner: 'Rui Neves',
102
+ region: 'Seville',
103
+ },
104
+ {
105
+ id: 'star',
106
+ name: 'Star Pharma',
107
+ email: 'purchasing@star.example',
108
+ balance: 27650.9,
109
+ status: 'Active',
110
+ owner: 'Ana Costa',
111
+ region: 'Lisbon',
112
+ },
113
+ {
114
+ id: 'tailspin',
115
+ name: 'Tailspin Market',
116
+ email: 'orders@tailspin.example',
117
+ balance: 860.5,
118
+ status: 'On hold',
119
+ owner: 'Marta Silva',
120
+ region: 'Porto',
121
+ },
122
+ ];
123
+
124
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
125
+
126
+ const COLUMNS: GridColumn<Account>[] = [
127
+ { id: 'name', label: 'Account', rowHeader: true },
128
+ { id: 'email', label: 'Email' },
129
+ {
130
+ id: 'balance',
131
+ label: 'Balance',
132
+ kind: 'number',
133
+ format: (value) => USD.format(value as number),
134
+ },
135
+ { id: 'status', label: 'Status', priority: 1 },
136
+ { id: 'owner', label: 'Owner', priority: 2 },
137
+ { id: 'region', label: 'Region', priority: 3 },
138
+ ];
139
+
140
+ export default function DataListFieldsExample() {
141
+ const [open, setOpen] = useState<readonly string[]>(['borealis']);
142
+
143
+ return (
144
+ <Stack gap={3}>
145
+ <DataList
146
+ columns={COLUMNS}
147
+ expanded={open}
148
+ fields={1}
149
+ label="Accounts"
150
+ onExpandedChange={setOpen}
151
+ rowKey="id"
152
+ rows={ACCOUNTS.slice(0, 4)}
153
+ subtitle="email"
154
+ trailing="balance"
155
+ />
156
+
157
+ <Text size="sm" tone="muted">
158
+ Records showing every field: {open.length}
159
+ </Text>
160
+ </Stack>
161
+ );
162
+ }
163
+ ```
164
+
165
+ ### A link, a command, or text
166
+
167
+ With href the title is a link and the whole record is its target; with activatable it is a button that emits onActivate; with neither the record is only read. The current record, open beside the list, carries the neutral ground.
168
+
169
+ Example
170
+
171
+ ```tsx
172
+ import { useState } from 'react';
173
+
174
+ import type { GridColumn } from '@slotted/core/grid';
175
+ import { DataList } from '@slotted/react/data-list';
176
+ import { Stack } from '@slotted/react/stack';
177
+ import { Text } from '@slotted/react/typography';
178
+
179
+ interface Account {
180
+ id: string;
181
+ name: string;
182
+ email: string;
183
+ balance: number;
184
+ status: string;
185
+ owner: string | null;
186
+ region: string;
187
+ }
188
+
189
+ const ACCOUNTS: Account[] = [
190
+ {
191
+ id: 'acme',
192
+ name: 'Acme Logistics',
193
+ email: 'ops@acme.example',
194
+ balance: 12480,
195
+ status: 'Active',
196
+ owner: 'Marta Silva',
197
+ region: 'Lisbon',
198
+ },
199
+ {
200
+ id: 'borealis',
201
+ name: 'Borealis Foods',
202
+ email: 'buying@borealis.example',
203
+ balance: 3902.15,
204
+ status: 'On hold',
205
+ owner: null,
206
+ region: 'Porto',
207
+ },
208
+ {
209
+ id: 'cobalt',
210
+ name: 'Cobalt Studio',
211
+ email: 'hello@cobalt.example',
212
+ balance: 48120.4,
213
+ status: 'Active',
214
+ owner: 'John Reed',
215
+ region: 'Madrid',
216
+ },
217
+ {
218
+ id: 'dunmore',
219
+ name: 'Dunmore Freight',
220
+ email: 'accounts@dunmore.example',
221
+ balance: 0,
222
+ status: 'Closed',
223
+ owner: 'Rui Neves',
224
+ region: 'Seville',
225
+ },
226
+ {
227
+ id: 'star',
228
+ name: 'Star Pharma',
229
+ email: 'purchasing@star.example',
230
+ balance: 27650.9,
231
+ status: 'Active',
232
+ owner: 'Ana Costa',
233
+ region: 'Lisbon',
234
+ },
235
+ {
236
+ id: 'tailspin',
237
+ name: 'Tailspin Market',
238
+ email: 'orders@tailspin.example',
239
+ balance: 860.5,
240
+ status: 'On hold',
241
+ owner: 'Marta Silva',
242
+ region: 'Porto',
243
+ },
244
+ ];
245
+
246
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
247
+
248
+ const COLUMNS: GridColumn<Account>[] = [
249
+ { id: 'name', label: 'Account', rowHeader: true },
250
+ { id: 'email', label: 'Email' },
251
+ {
252
+ id: 'balance',
253
+ label: 'Balance',
254
+ kind: 'number',
255
+ format: (value) => USD.format(value as number),
256
+ },
257
+ { id: 'status', label: 'Status', priority: 1 },
258
+ { id: 'owner', label: 'Owner', priority: 2 },
259
+ { id: 'region', label: 'Region', priority: 3 },
260
+ ];
261
+
262
+ export default function DataListActivationExample() {
263
+ const [openId, setOpenId] = useState<string | null>('acme');
264
+
265
+ return (
266
+ <Stack gap={4}>
267
+ <Text size="sm" tone="muted">
268
+ The title is a link
269
+ </Text>
270
+ <DataList
271
+ columns={COLUMNS.slice(0, 3)}
272
+ href={(account) => `#${account.id}`}
273
+ label="Accounts with links"
274
+ rowKey="id"
275
+ rows={ACCOUNTS.slice(0, 3)}
276
+ subtitle="email"
277
+ trailing="balance"
278
+ />
279
+
280
+ <Text size="sm" tone="muted">
281
+ The title is a button
282
+ </Text>
283
+ <DataList
284
+ activatable
285
+ columns={COLUMNS.slice(0, 3)}
286
+ current={openId}
287
+ label="Accounts with a command"
288
+ onActivate={({ key }) => setOpenId(key)}
289
+ rowKey="id"
290
+ rows={ACCOUNTS.slice(0, 3)}
291
+ subtitle="email"
292
+ trailing="balance"
293
+ />
294
+
295
+ <Text size="sm" tone="muted">
296
+ Open record: {openId}
297
+ </Text>
298
+ </Stack>
299
+ );
300
+ }
301
+ ```
302
+
303
+ ### Selection
304
+
305
+ Multiple: the checkbox in each record, Shift to extend from the anchor, select-all over every record the query left and the count saying how many are chosen. Single holds one key, as table does.
306
+
307
+ Example
308
+
309
+ ```tsx
310
+ import { useState } from 'react';
311
+
312
+ import type { GridColumn } from '@slotted/core/grid';
313
+ import { Button } from '@slotted/react/button';
314
+ import { DataList } from '@slotted/react/data-list';
315
+ import type { DataListSelection } from '@slotted/react/data-list';
316
+ import { Inline } from '@slotted/react/inline';
317
+ import { Stack } from '@slotted/react/stack';
318
+ import { Text } from '@slotted/react/typography';
319
+
320
+ interface Account {
321
+ id: string;
322
+ name: string;
323
+ email: string;
324
+ balance: number;
325
+ status: string;
326
+ owner: string | null;
327
+ region: string;
328
+ }
329
+
330
+ const ACCOUNTS: Account[] = [
331
+ {
332
+ id: 'acme',
333
+ name: 'Acme Logistics',
334
+ email: 'ops@acme.example',
335
+ balance: 12480,
336
+ status: 'Active',
337
+ owner: 'Marta Silva',
338
+ region: 'Lisbon',
339
+ },
340
+ {
341
+ id: 'borealis',
342
+ name: 'Borealis Foods',
343
+ email: 'buying@borealis.example',
344
+ balance: 3902.15,
345
+ status: 'On hold',
346
+ owner: null,
347
+ region: 'Porto',
348
+ },
349
+ {
350
+ id: 'cobalt',
351
+ name: 'Cobalt Studio',
352
+ email: 'hello@cobalt.example',
353
+ balance: 48120.4,
354
+ status: 'Active',
355
+ owner: 'John Reed',
356
+ region: 'Madrid',
357
+ },
358
+ {
359
+ id: 'dunmore',
360
+ name: 'Dunmore Freight',
361
+ email: 'accounts@dunmore.example',
362
+ balance: 0,
363
+ status: 'Closed',
364
+ owner: 'Rui Neves',
365
+ region: 'Seville',
366
+ },
367
+ {
368
+ id: 'star',
369
+ name: 'Star Pharma',
370
+ email: 'purchasing@star.example',
371
+ balance: 27650.9,
372
+ status: 'Active',
373
+ owner: 'Ana Costa',
374
+ region: 'Lisbon',
375
+ },
376
+ {
377
+ id: 'tailspin',
378
+ name: 'Tailspin Market',
379
+ email: 'orders@tailspin.example',
380
+ balance: 860.5,
381
+ status: 'On hold',
382
+ owner: 'Marta Silva',
383
+ region: 'Porto',
384
+ },
385
+ ];
386
+
387
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
388
+
389
+ const COLUMNS: GridColumn<Account>[] = [
390
+ { id: 'name', label: 'Account', rowHeader: true },
391
+ { id: 'email', label: 'Email' },
392
+ {
393
+ id: 'balance',
394
+ label: 'Balance',
395
+ kind: 'number',
396
+ format: (value) => USD.format(value as number),
397
+ },
398
+ { id: 'status', label: 'Status', priority: 1 },
399
+ { id: 'owner', label: 'Owner', priority: 2 },
400
+ { id: 'region', label: 'Region', priority: 3 },
401
+ ];
402
+
403
+ export default function DataListSelectionExample() {
404
+ const [chosen, setChosen] = useState<DataListSelection>(['acme', 'star']);
405
+
406
+ return (
407
+ <Stack gap={4}>
408
+ <Text size="sm" tone="muted">
409
+ Multiple, controlled
410
+ </Text>
411
+ <DataList
412
+ columns={COLUMNS.slice(0, 3)}
413
+ label="Accounts to invoice"
414
+ onValueChange={setChosen}
415
+ rowKey="id"
416
+ rows={ACCOUNTS.slice(0, 4)}
417
+ selectionMode="multiple"
418
+ subtitle="email"
419
+ trailing="balance"
420
+ value={chosen}
421
+ />
422
+ <Inline>
423
+ <Button size="sm" tone="secondary" variant="outline" onClick={() => setChosen([])}>
424
+ Clear selection
425
+ </Button>
426
+ </Inline>
427
+
428
+ <Text size="sm" tone="muted">
429
+ Single
430
+ </Text>
431
+ <DataList
432
+ columns={COLUMNS.slice(0, 3)}
433
+ label="Primary account"
434
+ rowKey="id"
435
+ rows={ACCOUNTS.slice(0, 3)}
436
+ selectionMode="single"
437
+ subtitle="email"
438
+ trailing="balance"
439
+ />
440
+ </Stack>
441
+ );
442
+ }
443
+ ```
444
+
445
+ ### Sorting without a header
446
+
447
+ The sort control is a menu of the sortable columns and a direction. The trigger names the first key; a query sorted by several keys in data-grid shows +1 and the announcement reads the whole order.
448
+
449
+ Excerpt — not a complete module
450
+
451
+ ```tsx
452
+ const [query, setQuery] = useState<GridQuery>(emptyQuery());
453
+
454
+ <DataList query={query} onQueryChange={(next) => setQuery(next)} {...list} />;
455
+ ```
456
+
457
+ ### Filtering with filter-bar and a search field
458
+
459
+ The list applies query.filter and query.search; the controls that write them are FilterBar and a TextField bound to the same query. Type “lis” to keep the Lisbon accounts.
460
+
461
+ Excerpt — not a complete module
462
+
463
+ ```tsx
464
+ <TextField
465
+ label="Search accounts"
466
+ value={query.search}
467
+ onValueChange={(search) => setQuery({ ...query, search })}
468
+ />;
469
+ <DataList query={query} onQueryChange={setQuery} {...list} />;
470
+ ```
471
+
472
+ ### Groups
473
+
474
+ query.group becomes list sections, each named by the column, the value and the count. The groups stay open: a list has no collapsible group row.
475
+
476
+ Example
477
+
478
+ ```tsx
479
+ import type { GridColumn, GridQuery } from '@slotted/core/grid';
480
+ import { DataList } from '@slotted/react/data-list';
481
+
482
+ interface Account {
483
+ id: string;
484
+ name: string;
485
+ email: string;
486
+ balance: number;
487
+ status: string;
488
+ owner: string | null;
489
+ region: string;
490
+ }
491
+
492
+ const ACCOUNTS: Account[] = [
493
+ {
494
+ id: 'acme',
495
+ name: 'Acme Logistics',
496
+ email: 'ops@acme.example',
497
+ balance: 12480,
498
+ status: 'Active',
499
+ owner: 'Marta Silva',
500
+ region: 'Lisbon',
501
+ },
502
+ {
503
+ id: 'borealis',
504
+ name: 'Borealis Foods',
505
+ email: 'buying@borealis.example',
506
+ balance: 3902.15,
507
+ status: 'On hold',
508
+ owner: null,
509
+ region: 'Porto',
510
+ },
511
+ {
512
+ id: 'cobalt',
513
+ name: 'Cobalt Studio',
514
+ email: 'hello@cobalt.example',
515
+ balance: 48120.4,
516
+ status: 'Active',
517
+ owner: 'John Reed',
518
+ region: 'Madrid',
519
+ },
520
+ {
521
+ id: 'dunmore',
522
+ name: 'Dunmore Freight',
523
+ email: 'accounts@dunmore.example',
524
+ balance: 0,
525
+ status: 'Closed',
526
+ owner: 'Rui Neves',
527
+ region: 'Seville',
528
+ },
529
+ {
530
+ id: 'star',
531
+ name: 'Star Pharma',
532
+ email: 'purchasing@star.example',
533
+ balance: 27650.9,
534
+ status: 'Active',
535
+ owner: 'Ana Costa',
536
+ region: 'Lisbon',
537
+ },
538
+ {
539
+ id: 'tailspin',
540
+ name: 'Tailspin Market',
541
+ email: 'orders@tailspin.example',
542
+ balance: 860.5,
543
+ status: 'On hold',
544
+ owner: 'Marta Silva',
545
+ region: 'Porto',
546
+ },
547
+ ];
548
+
549
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
550
+
551
+ const COLUMNS: GridColumn<Account>[] = [
552
+ { id: 'name', label: 'Account', rowHeader: true },
553
+ { id: 'email', label: 'Email' },
554
+ {
555
+ id: 'balance',
556
+ label: 'Balance',
557
+ kind: 'number',
558
+ format: (value) => USD.format(value as number),
559
+ },
560
+ { id: 'status', label: 'Status', priority: 1 },
561
+ { id: 'owner', label: 'Owner', priority: 2 },
562
+ { id: 'region', label: 'Region', priority: 3 },
563
+ ];
564
+
565
+ const BY_REGION: GridQuery = { sort: [], filter: null, search: '', page: null, group: ['region'] };
566
+
567
+ export default function DataListGroupingExample() {
568
+ return (
569
+ <DataList
570
+ columns={COLUMNS}
571
+ defaultQuery={BY_REGION}
572
+ fields={1}
573
+ label="Accounts by region"
574
+ rowKey="id"
575
+ rows={ACCOUNTS}
576
+ subtitle="email"
577
+ trailing="balance"
578
+ />
579
+ );
580
+ }
581
+ ```
582
+
583
+ ### The fields past the first few
584
+
585
+ fields sets how many a closed record shows. Show 3 more opens the rest in the same grid, and the expansion is a controlled set of keys like data-grid’s detail.
586
+
587
+ Excerpt — not a complete module
588
+
589
+ ```tsx
590
+ <DataList expanded={open} fields={2} onExpandedChange={(keys) => setOpen(keys)} {...list} />;
591
+ ```
592
+
593
+ ### Record states
594
+
595
+ Selected, current, disabled and loading on four records: selected is the accent ground with its edge, current the neutral one, disabled and loading recede and refuse the activation while keeping their width.
596
+
597
+ Example
598
+
599
+ ```tsx
600
+ import type { GridColumn } from '@slotted/core/grid';
601
+ import { DataList } from '@slotted/react/data-list';
602
+
603
+ interface Account {
604
+ id: string;
605
+ name: string;
606
+ email: string;
607
+ balance: number;
608
+ status: string;
609
+ owner: string | null;
610
+ region: string;
611
+ }
612
+
613
+ const ACCOUNTS: Account[] = [
614
+ {
615
+ id: 'acme',
616
+ name: 'Acme Logistics',
617
+ email: 'ops@acme.example',
618
+ balance: 12480,
619
+ status: 'Active',
620
+ owner: 'Marta Silva',
621
+ region: 'Lisbon',
622
+ },
623
+ {
624
+ id: 'borealis',
625
+ name: 'Borealis Foods',
626
+ email: 'buying@borealis.example',
627
+ balance: 3902.15,
628
+ status: 'On hold',
629
+ owner: null,
630
+ region: 'Porto',
631
+ },
632
+ {
633
+ id: 'cobalt',
634
+ name: 'Cobalt Studio',
635
+ email: 'hello@cobalt.example',
636
+ balance: 48120.4,
637
+ status: 'Active',
638
+ owner: 'John Reed',
639
+ region: 'Madrid',
640
+ },
641
+ {
642
+ id: 'dunmore',
643
+ name: 'Dunmore Freight',
644
+ email: 'accounts@dunmore.example',
645
+ balance: 0,
646
+ status: 'Closed',
647
+ owner: 'Rui Neves',
648
+ region: 'Seville',
649
+ },
650
+ {
651
+ id: 'star',
652
+ name: 'Star Pharma',
653
+ email: 'purchasing@star.example',
654
+ balance: 27650.9,
655
+ status: 'Active',
656
+ owner: 'Ana Costa',
657
+ region: 'Lisbon',
658
+ },
659
+ {
660
+ id: 'tailspin',
661
+ name: 'Tailspin Market',
662
+ email: 'orders@tailspin.example',
663
+ balance: 860.5,
664
+ status: 'On hold',
665
+ owner: 'Marta Silva',
666
+ region: 'Porto',
667
+ },
668
+ ];
669
+
670
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
671
+
672
+ const COLUMNS: GridColumn<Account>[] = [
673
+ { id: 'name', label: 'Account', rowHeader: true },
674
+ { id: 'email', label: 'Email' },
675
+ {
676
+ id: 'balance',
677
+ label: 'Balance',
678
+ kind: 'number',
679
+ format: (value) => USD.format(value as number),
680
+ },
681
+ { id: 'status', label: 'Status', priority: 1 },
682
+ { id: 'owner', label: 'Owner', priority: 2 },
683
+ { id: 'region', label: 'Region', priority: 3 },
684
+ ];
685
+
686
+ export default function DataListStatesExample() {
687
+ return (
688
+ <DataList
689
+ activatable
690
+ columns={COLUMNS.slice(0, 3)}
691
+ current="cobalt"
692
+ defaultValue={['acme']}
693
+ disabledKeys={['dunmore']}
694
+ label="Accounts"
695
+ loadingKeys={['borealis']}
696
+ rowKey="id"
697
+ rows={ACCOUNTS.slice(0, 4)}
698
+ selectionMode="multiple"
699
+ subtitle="email"
700
+ trailing="balance"
701
+ />
702
+ );
703
+ }
704
+ ```
705
+
706
+ ### The first load, and a refresh
707
+
708
+ With no rows the loader draws the record’s anatomy: title, subtitle, balance and four fields with their real labels. Over rows already shown a refresh keeps them and dims them; nothing moves.
709
+
710
+ Example
711
+
712
+ ```tsx
713
+ import { useState } from 'react';
714
+
715
+ import type { GridColumn } from '@slotted/core/grid';
716
+ import { Button } from '@slotted/react/button';
717
+ import { DataList } from '@slotted/react/data-list';
718
+ import { Inline } from '@slotted/react/inline';
719
+ import { Stack } from '@slotted/react/stack';
720
+ import { Text } from '@slotted/react/typography';
721
+
722
+ interface Account {
723
+ id: string;
724
+ name: string;
725
+ email: string;
726
+ balance: number;
727
+ status: string;
728
+ owner: string | null;
729
+ region: string;
730
+ }
731
+
732
+ const ACCOUNTS: Account[] = [
733
+ {
734
+ id: 'acme',
735
+ name: 'Acme Logistics',
736
+ email: 'ops@acme.example',
737
+ balance: 12480,
738
+ status: 'Active',
739
+ owner: 'Marta Silva',
740
+ region: 'Lisbon',
741
+ },
742
+ {
743
+ id: 'borealis',
744
+ name: 'Borealis Foods',
745
+ email: 'buying@borealis.example',
746
+ balance: 3902.15,
747
+ status: 'On hold',
748
+ owner: null,
749
+ region: 'Porto',
750
+ },
751
+ {
752
+ id: 'cobalt',
753
+ name: 'Cobalt Studio',
754
+ email: 'hello@cobalt.example',
755
+ balance: 48120.4,
756
+ status: 'Active',
757
+ owner: 'John Reed',
758
+ region: 'Madrid',
759
+ },
760
+ {
761
+ id: 'dunmore',
762
+ name: 'Dunmore Freight',
763
+ email: 'accounts@dunmore.example',
764
+ balance: 0,
765
+ status: 'Closed',
766
+ owner: 'Rui Neves',
767
+ region: 'Seville',
768
+ },
769
+ {
770
+ id: 'star',
771
+ name: 'Star Pharma',
772
+ email: 'purchasing@star.example',
773
+ balance: 27650.9,
774
+ status: 'Active',
775
+ owner: 'Ana Costa',
776
+ region: 'Lisbon',
777
+ },
778
+ {
779
+ id: 'tailspin',
780
+ name: 'Tailspin Market',
781
+ email: 'orders@tailspin.example',
782
+ balance: 860.5,
783
+ status: 'On hold',
784
+ owner: 'Marta Silva',
785
+ region: 'Porto',
786
+ },
787
+ ];
788
+
789
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
790
+
791
+ const COLUMNS: GridColumn<Account>[] = [
792
+ { id: 'name', label: 'Account', rowHeader: true },
793
+ { id: 'email', label: 'Email' },
794
+ {
795
+ id: 'balance',
796
+ label: 'Balance',
797
+ kind: 'number',
798
+ format: (value) => USD.format(value as number),
799
+ },
800
+ { id: 'status', label: 'Status', priority: 1 },
801
+ { id: 'owner', label: 'Owner', priority: 2 },
802
+ { id: 'region', label: 'Region', priority: 3 },
803
+ ];
804
+
805
+ export default function DataListLoadingExample() {
806
+ const [refreshing, setRefreshing] = useState(false);
807
+
808
+ function handleRefresh() {
809
+ setRefreshing(true);
810
+ setTimeout(() => setRefreshing(false), 2500);
811
+ }
812
+
813
+ return (
814
+ <Stack gap={4}>
815
+ <Text size="sm" tone="muted">
816
+ First load, no rows yet
817
+ </Text>
818
+ <DataList
819
+ columns={COLUMNS}
820
+ label="Accounts, first load"
821
+ loading
822
+ rowKey="id"
823
+ rows={[]}
824
+ skeletonRows={3}
825
+ subtitle="email"
826
+ trailing="balance"
827
+ />
828
+
829
+ <Text size="sm" tone="muted">
830
+ Refresh over the rows shown
831
+ </Text>
832
+ <DataList
833
+ columns={COLUMNS.slice(0, 3)}
834
+ label="Accounts, refresh"
835
+ loading={refreshing}
836
+ rowKey="id"
837
+ rows={ACCOUNTS.slice(0, 3)}
838
+ subtitle="email"
839
+ trailing="balance"
840
+ />
841
+ <Inline>
842
+ <Button
843
+ disabled={refreshing}
844
+ size="sm"
845
+ tone="secondary"
846
+ variant="outline"
847
+ onClick={handleRefresh}
848
+ >
849
+ Refresh
850
+ </Button>
851
+ </Inline>
852
+ </Stack>
853
+ );
854
+ }
855
+ ```
856
+
857
+ ### Empty, no results, error
858
+
859
+ Three states, each with its own next step: nothing yet, a query that left nothing and offers Clear filters, and a failure that offers Try again.
860
+
861
+ Excerpt — not a complete module
862
+
863
+ ```tsx
864
+ <DataList error={failed} onRetry={refetch} rows={rows} {...list} />;
865
+ ```
866
+
867
+ ### Load more
868
+
869
+ With hasMore the footer asks for the next page through onLoadMore; the button carries the wait and the list stays readable. The count says how many exist when the server gives totalCount.
870
+
871
+ Example
872
+
873
+ ```tsx
874
+ import { useState } from 'react';
875
+
876
+ import type { GridColumn } from '@slotted/core/grid';
877
+ import { DataList } from '@slotted/react/data-list';
878
+
879
+ interface Account {
880
+ id: string;
881
+ name: string;
882
+ email: string;
883
+ balance: number;
884
+ status: string;
885
+ owner: string | null;
886
+ region: string;
887
+ }
888
+
889
+ const ACCOUNTS: Account[] = [
890
+ {
891
+ id: 'acme',
892
+ name: 'Acme Logistics',
893
+ email: 'ops@acme.example',
894
+ balance: 12480,
895
+ status: 'Active',
896
+ owner: 'Marta Silva',
897
+ region: 'Lisbon',
898
+ },
899
+ {
900
+ id: 'borealis',
901
+ name: 'Borealis Foods',
902
+ email: 'buying@borealis.example',
903
+ balance: 3902.15,
904
+ status: 'On hold',
905
+ owner: null,
906
+ region: 'Porto',
907
+ },
908
+ {
909
+ id: 'cobalt',
910
+ name: 'Cobalt Studio',
911
+ email: 'hello@cobalt.example',
912
+ balance: 48120.4,
913
+ status: 'Active',
914
+ owner: 'John Reed',
915
+ region: 'Madrid',
916
+ },
917
+ {
918
+ id: 'dunmore',
919
+ name: 'Dunmore Freight',
920
+ email: 'accounts@dunmore.example',
921
+ balance: 0,
922
+ status: 'Closed',
923
+ owner: 'Rui Neves',
924
+ region: 'Seville',
925
+ },
926
+ {
927
+ id: 'star',
928
+ name: 'Star Pharma',
929
+ email: 'purchasing@star.example',
930
+ balance: 27650.9,
931
+ status: 'Active',
932
+ owner: 'Ana Costa',
933
+ region: 'Lisbon',
934
+ },
935
+ {
936
+ id: 'tailspin',
937
+ name: 'Tailspin Market',
938
+ email: 'orders@tailspin.example',
939
+ balance: 860.5,
940
+ status: 'On hold',
941
+ owner: 'Marta Silva',
942
+ region: 'Porto',
943
+ },
944
+ ];
945
+
946
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
947
+
948
+ const COLUMNS: GridColumn<Account>[] = [
949
+ { id: 'name', label: 'Account', rowHeader: true },
950
+ { id: 'email', label: 'Email' },
951
+ {
952
+ id: 'balance',
953
+ label: 'Balance',
954
+ kind: 'number',
955
+ format: (value) => USD.format(value as number),
956
+ },
957
+ { id: 'status', label: 'Status', priority: 1 },
958
+ { id: 'owner', label: 'Owner', priority: 2 },
959
+ { id: 'region', label: 'Region', priority: 3 },
960
+ ];
961
+
962
+ const PAGE = 3;
963
+
964
+ export default function DataListLoadMoreExample() {
965
+ const [shown, setShown] = useState(PAGE);
966
+ const [fetching, setFetching] = useState(false);
967
+
968
+ function handleLoadMore() {
969
+ setFetching(true);
970
+ setTimeout(() => {
971
+ setShown((count) => count + PAGE);
972
+ setFetching(false);
973
+ }, 1200);
974
+ }
975
+
976
+ return (
977
+ <DataList
978
+ columns={COLUMNS.slice(0, 3)}
979
+ hasMore={shown < ACCOUNTS.length}
980
+ label="Accounts"
981
+ loading={fetching}
982
+ onLoadMore={handleLoadMore}
983
+ rowKey="id"
984
+ rows={ACCOUNTS.slice(0, shown)}
985
+ subtitle="email"
986
+ totalCount={ACCOUNTS.length}
987
+ trailing="balance"
988
+ />
989
+ );
990
+ }
991
+ ```
992
+
993
+ ### Beside table, on one state
994
+
995
+ createWidthGate at COMPACT_BELOW swaps table and data-list over the same sort and selection. Resize the room: under 600 pixels the list takes over and the chosen accounts stay chosen.
996
+
997
+ Excerpt — not a complete module
998
+
999
+ ```tsx
1000
+ useEffect(() => {
1001
+ const gate = createWidthGate(frame.current!, { at: COMPACT_BELOW, onChange: setCompact });
1002
+ return gate.destroy;
1003
+ }, []);
1004
+
1005
+ return (
1006
+ <div ref={frame}>
1007
+ {compact ? (
1008
+ <DataList query={{ ...query, sort: sort ? [sort] : [] }} value={chosen} {...list} />
1009
+ ) : (
1010
+ <Table selectionMode="multiple" sort={sort} value={chosen}>
1011
+ {rows}
1012
+ </Table>
1013
+ )}
1014
+ </div>
1015
+ );
1016
+ ```
1017
+
1018
+ ### Content the columns did not plan for
1019
+
1020
+ A title in two lines, an address with no break in it, labels a translation made long and a value in another script: the pairs wrap, nothing is cut, and the Arabic value takes its own direction.
1021
+
1022
+ Excerpt — not a complete module
1023
+
1024
+ ```tsx
1025
+ <SlottedProvider catalogs={{ 'pt-BR': PT_BR }} locale="pt-BR">
1026
+ <DataList {...list} messages={{ count: '{count, plural, one {# conta} other {# contas}}' }} />
1027
+ </SlottedProvider>;
1028
+ ```
1029
+
1030
+ ### Keyboard
1031
+
1032
+ Tab moves through select-all, the sort trigger, then each record’s checkbox, title, disclosure and actions. Space toggles a checkbox, Shift+Space extends from the anchor, Enter follows the title. No arrow key is bound.
1033
+
1034
+ Excerpt — not a complete module
1035
+
1036
+ ```tsx
1037
+ const list = useRef<DataListHandle>(null);
1038
+
1039
+ list.current?.focusKey('cobalt');
1040
+ ```
1041
+
1042
+ ### What a reader hears
1043
+
1044
+ The list is named Accounts; each record is a list item whose title is its link; the checkbox is named Select and the title; the count and the sort order are announced politely.
1045
+
1046
+ Excerpt — not a complete module
1047
+
1048
+ ```tsx
1049
+ <h2 id="accounts-heading">Accounts</h2>;
1050
+ <DataList labelledBy="accounts-heading" {...list} />;
1051
+ ```
1052
+
1053
+ ### empty.tsx
1054
+
1055
+ Example
1056
+
1057
+ ```tsx
1058
+ import { useState } from 'react';
1059
+
1060
+ import type { GridColumn, GridQuery } from '@slotted/core/grid';
1061
+ import { DataList } from '@slotted/react/data-list';
1062
+ import { Stack } from '@slotted/react/stack';
1063
+ import { Text } from '@slotted/react/typography';
1064
+
1065
+ interface Account {
1066
+ id: string;
1067
+ name: string;
1068
+ email: string;
1069
+ balance: number;
1070
+ status: string;
1071
+ owner: string | null;
1072
+ region: string;
1073
+ }
1074
+
1075
+ const ACCOUNTS: Account[] = [
1076
+ {
1077
+ id: 'acme',
1078
+ name: 'Acme Logistics',
1079
+ email: 'ops@acme.example',
1080
+ balance: 12480,
1081
+ status: 'Active',
1082
+ owner: 'Marta Silva',
1083
+ region: 'Lisbon',
1084
+ },
1085
+ {
1086
+ id: 'borealis',
1087
+ name: 'Borealis Foods',
1088
+ email: 'buying@borealis.example',
1089
+ balance: 3902.15,
1090
+ status: 'On hold',
1091
+ owner: null,
1092
+ region: 'Porto',
1093
+ },
1094
+ {
1095
+ id: 'cobalt',
1096
+ name: 'Cobalt Studio',
1097
+ email: 'hello@cobalt.example',
1098
+ balance: 48120.4,
1099
+ status: 'Active',
1100
+ owner: 'John Reed',
1101
+ region: 'Madrid',
1102
+ },
1103
+ {
1104
+ id: 'dunmore',
1105
+ name: 'Dunmore Freight',
1106
+ email: 'accounts@dunmore.example',
1107
+ balance: 0,
1108
+ status: 'Closed',
1109
+ owner: 'Rui Neves',
1110
+ region: 'Seville',
1111
+ },
1112
+ {
1113
+ id: 'star',
1114
+ name: 'Star Pharma',
1115
+ email: 'purchasing@star.example',
1116
+ balance: 27650.9,
1117
+ status: 'Active',
1118
+ owner: 'Ana Costa',
1119
+ region: 'Lisbon',
1120
+ },
1121
+ {
1122
+ id: 'tailspin',
1123
+ name: 'Tailspin Market',
1124
+ email: 'orders@tailspin.example',
1125
+ balance: 860.5,
1126
+ status: 'On hold',
1127
+ owner: 'Marta Silva',
1128
+ region: 'Porto',
1129
+ },
1130
+ ];
1131
+
1132
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
1133
+
1134
+ const COLUMNS: GridColumn<Account>[] = [
1135
+ { id: 'name', label: 'Account', rowHeader: true },
1136
+ { id: 'email', label: 'Email' },
1137
+ {
1138
+ id: 'balance',
1139
+ label: 'Balance',
1140
+ kind: 'number',
1141
+ format: (value) => USD.format(value as number),
1142
+ },
1143
+ { id: 'status', label: 'Status', priority: 1 },
1144
+ { id: 'owner', label: 'Owner', priority: 2 },
1145
+ { id: 'region', label: 'Region', priority: 3 },
1146
+ ];
1147
+
1148
+ const NO_MATCH: GridQuery = { sort: [], filter: null, search: 'zzz', page: null, group: [] };
1149
+
1150
+ export default function DataListEmptyExample() {
1151
+ const [failed, setFailed] = useState(true);
1152
+
1153
+ return (
1154
+ <Stack gap={4}>
1155
+ <Text size="sm" tone="muted">
1156
+ No records yet
1157
+ </Text>
1158
+ <DataList columns={COLUMNS} label="New accounts" rowKey="id" rows={[]} />
1159
+
1160
+ <Text size="sm" tone="muted">
1161
+ A search that matches nothing
1162
+ </Text>
1163
+ <DataList
1164
+ columns={COLUMNS}
1165
+ defaultQuery={NO_MATCH}
1166
+ label="Searched accounts"
1167
+ rowKey="id"
1168
+ rows={ACCOUNTS}
1169
+ />
1170
+
1171
+ <Text size="sm" tone="muted">
1172
+ The request failed
1173
+ </Text>
1174
+ <DataList
1175
+ columns={COLUMNS}
1176
+ error={failed}
1177
+ label="Fetched accounts"
1178
+ onRetry={() => setFailed(false)}
1179
+ rowKey="id"
1180
+ rows={failed ? [] : ACCOUNTS.slice(0, 3)}
1181
+ subtitle="email"
1182
+ trailing="balance"
1183
+ />
1184
+ </Stack>
1185
+ );
1186
+ }
1187
+ ```
1188
+
1189
+ ### query.tsx
1190
+
1191
+ Example
1192
+
1193
+ ```tsx
1194
+ import { useState } from 'react';
1195
+
1196
+ import type { GridColumn, GridQuery } from '@slotted/core/grid';
1197
+ import { DataList } from '@slotted/react/data-list';
1198
+ import { Field, FieldLabel } from '@slotted/react/field';
1199
+ import { Stack } from '@slotted/react/stack';
1200
+ import { TextField } from '@slotted/react/text-field';
1201
+ import { Text } from '@slotted/react/typography';
1202
+
1203
+ interface Account {
1204
+ id: string;
1205
+ name: string;
1206
+ email: string;
1207
+ balance: number;
1208
+ status: string;
1209
+ owner: string | null;
1210
+ region: string;
1211
+ }
1212
+
1213
+ const ACCOUNTS: Account[] = [
1214
+ {
1215
+ id: 'acme',
1216
+ name: 'Acme Logistics',
1217
+ email: 'ops@acme.example',
1218
+ balance: 12480,
1219
+ status: 'Active',
1220
+ owner: 'Marta Silva',
1221
+ region: 'Lisbon',
1222
+ },
1223
+ {
1224
+ id: 'borealis',
1225
+ name: 'Borealis Foods',
1226
+ email: 'buying@borealis.example',
1227
+ balance: 3902.15,
1228
+ status: 'On hold',
1229
+ owner: null,
1230
+ region: 'Porto',
1231
+ },
1232
+ {
1233
+ id: 'cobalt',
1234
+ name: 'Cobalt Studio',
1235
+ email: 'hello@cobalt.example',
1236
+ balance: 48120.4,
1237
+ status: 'Active',
1238
+ owner: 'John Reed',
1239
+ region: 'Madrid',
1240
+ },
1241
+ {
1242
+ id: 'dunmore',
1243
+ name: 'Dunmore Freight',
1244
+ email: 'accounts@dunmore.example',
1245
+ balance: 0,
1246
+ status: 'Closed',
1247
+ owner: 'Rui Neves',
1248
+ region: 'Seville',
1249
+ },
1250
+ {
1251
+ id: 'star',
1252
+ name: 'Star Pharma',
1253
+ email: 'purchasing@star.example',
1254
+ balance: 27650.9,
1255
+ status: 'Active',
1256
+ owner: 'Ana Costa',
1257
+ region: 'Lisbon',
1258
+ },
1259
+ {
1260
+ id: 'tailspin',
1261
+ name: 'Tailspin Market',
1262
+ email: 'orders@tailspin.example',
1263
+ balance: 860.5,
1264
+ status: 'On hold',
1265
+ owner: 'Marta Silva',
1266
+ region: 'Porto',
1267
+ },
1268
+ ];
1269
+
1270
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
1271
+
1272
+ const COLUMNS: GridColumn<Account>[] = [
1273
+ { id: 'name', label: 'Account', rowHeader: true },
1274
+ { id: 'email', label: 'Email' },
1275
+ {
1276
+ id: 'balance',
1277
+ label: 'Balance',
1278
+ kind: 'number',
1279
+ format: (value) => USD.format(value as number),
1280
+ },
1281
+ { id: 'status', label: 'Status', priority: 1 },
1282
+ { id: 'owner', label: 'Owner', priority: 2 },
1283
+ { id: 'region', label: 'Region', priority: 3 },
1284
+ ];
1285
+
1286
+ const EMPTY_QUERY: GridQuery = { sort: [], filter: null, search: '', page: null, group: [] };
1287
+
1288
+ export default function DataListQueryExample() {
1289
+ const [query, setQuery] = useState<GridQuery>(EMPTY_QUERY);
1290
+ const [first] = query.sort;
1291
+
1292
+ return (
1293
+ <Stack gap={3}>
1294
+ <Field>
1295
+ <FieldLabel>Search accounts</FieldLabel>
1296
+ <TextField
1297
+ onValueChange={(search) => setQuery({ ...query, search })}
1298
+ value={query.search}
1299
+ />
1300
+ </Field>
1301
+ <DataList
1302
+ columns={COLUMNS}
1303
+ label="Accounts"
1304
+ onQueryChange={setQuery}
1305
+ query={query}
1306
+ rowKey="id"
1307
+ rows={ACCOUNTS}
1308
+ subtitle="email"
1309
+ trailing="balance"
1310
+ />
1311
+
1312
+ <Text size="sm" tone="muted">
1313
+ Sort: {first ? `${first.column}, ${first.direction}` : 'none'}
1314
+ </Text>
1315
+ </Stack>
1316
+ );
1317
+ }
1318
+ ```
1319
+
1320
+ ### sizes.tsx
1321
+
1322
+ Example
1323
+
1324
+ ```tsx
1325
+ import type { GridColumn } from '@slotted/core/grid';
1326
+ import { DataList } from '@slotted/react/data-list';
1327
+ import { Stack } from '@slotted/react/stack';
1328
+ import { Text } from '@slotted/react/typography';
1329
+
1330
+ interface Account {
1331
+ id: string;
1332
+ name: string;
1333
+ email: string;
1334
+ balance: number;
1335
+ status: string;
1336
+ owner: string | null;
1337
+ region: string;
1338
+ }
1339
+
1340
+ const ACCOUNTS: Account[] = [
1341
+ {
1342
+ id: 'acme',
1343
+ name: 'Acme Logistics',
1344
+ email: 'ops@acme.example',
1345
+ balance: 12480,
1346
+ status: 'Active',
1347
+ owner: 'Marta Silva',
1348
+ region: 'Lisbon',
1349
+ },
1350
+ {
1351
+ id: 'borealis',
1352
+ name: 'Borealis Foods',
1353
+ email: 'buying@borealis.example',
1354
+ balance: 3902.15,
1355
+ status: 'On hold',
1356
+ owner: null,
1357
+ region: 'Porto',
1358
+ },
1359
+ {
1360
+ id: 'cobalt',
1361
+ name: 'Cobalt Studio',
1362
+ email: 'hello@cobalt.example',
1363
+ balance: 48120.4,
1364
+ status: 'Active',
1365
+ owner: 'John Reed',
1366
+ region: 'Madrid',
1367
+ },
1368
+ {
1369
+ id: 'dunmore',
1370
+ name: 'Dunmore Freight',
1371
+ email: 'accounts@dunmore.example',
1372
+ balance: 0,
1373
+ status: 'Closed',
1374
+ owner: 'Rui Neves',
1375
+ region: 'Seville',
1376
+ },
1377
+ {
1378
+ id: 'star',
1379
+ name: 'Star Pharma',
1380
+ email: 'purchasing@star.example',
1381
+ balance: 27650.9,
1382
+ status: 'Active',
1383
+ owner: 'Ana Costa',
1384
+ region: 'Lisbon',
1385
+ },
1386
+ {
1387
+ id: 'tailspin',
1388
+ name: 'Tailspin Market',
1389
+ email: 'orders@tailspin.example',
1390
+ balance: 860.5,
1391
+ status: 'On hold',
1392
+ owner: 'Marta Silva',
1393
+ region: 'Porto',
1394
+ },
1395
+ ];
1396
+
1397
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
1398
+
1399
+ const COLUMNS: GridColumn<Account>[] = [
1400
+ { id: 'name', label: 'Account', rowHeader: true },
1401
+ { id: 'email', label: 'Email' },
1402
+ {
1403
+ id: 'balance',
1404
+ label: 'Balance',
1405
+ kind: 'number',
1406
+ format: (value) => USD.format(value as number),
1407
+ },
1408
+ { id: 'status', label: 'Status', priority: 1 },
1409
+ { id: 'owner', label: 'Owner', priority: 2 },
1410
+ { id: 'region', label: 'Region', priority: 3 },
1411
+ ];
1412
+
1413
+ const SIZES = ['sm', 'md', 'lg'] as const;
1414
+
1415
+ export default function DataListSizesExample() {
1416
+ return (
1417
+ <Stack gap={4}>
1418
+ {SIZES.map((size) => (
1419
+ <Stack gap={2} key={size}>
1420
+ <Text size="sm" tone="muted">
1421
+ {size}
1422
+ </Text>
1423
+ <DataList
1424
+ columns={COLUMNS.slice(0, 3)}
1425
+ label={`Accounts, ${size}`}
1426
+ rowKey="id"
1427
+ rows={ACCOUNTS.slice(0, 2)}
1428
+ size={size}
1429
+ subtitle="email"
1430
+ trailing="balance"
1431
+ />
1432
+ </Stack>
1433
+ ))}
1434
+ </Stack>
1435
+ );
1436
+ }
1437
+ ```
1438
+
1439
+ ### variants.tsx
1440
+
1441
+ Example
1442
+
1443
+ ```tsx
1444
+ import type { GridColumn } from '@slotted/core/grid';
1445
+ import { DataList } from '@slotted/react/data-list';
1446
+ import { Stack } from '@slotted/react/stack';
1447
+ import { Text } from '@slotted/react/typography';
1448
+
1449
+ interface Account {
1450
+ id: string;
1451
+ name: string;
1452
+ email: string;
1453
+ balance: number;
1454
+ status: string;
1455
+ owner: string | null;
1456
+ region: string;
1457
+ }
1458
+
1459
+ const ACCOUNTS: Account[] = [
1460
+ {
1461
+ id: 'acme',
1462
+ name: 'Acme Logistics',
1463
+ email: 'ops@acme.example',
1464
+ balance: 12480,
1465
+ status: 'Active',
1466
+ owner: 'Marta Silva',
1467
+ region: 'Lisbon',
1468
+ },
1469
+ {
1470
+ id: 'borealis',
1471
+ name: 'Borealis Foods',
1472
+ email: 'buying@borealis.example',
1473
+ balance: 3902.15,
1474
+ status: 'On hold',
1475
+ owner: null,
1476
+ region: 'Porto',
1477
+ },
1478
+ {
1479
+ id: 'cobalt',
1480
+ name: 'Cobalt Studio',
1481
+ email: 'hello@cobalt.example',
1482
+ balance: 48120.4,
1483
+ status: 'Active',
1484
+ owner: 'John Reed',
1485
+ region: 'Madrid',
1486
+ },
1487
+ {
1488
+ id: 'dunmore',
1489
+ name: 'Dunmore Freight',
1490
+ email: 'accounts@dunmore.example',
1491
+ balance: 0,
1492
+ status: 'Closed',
1493
+ owner: 'Rui Neves',
1494
+ region: 'Seville',
1495
+ },
1496
+ {
1497
+ id: 'star',
1498
+ name: 'Star Pharma',
1499
+ email: 'purchasing@star.example',
1500
+ balance: 27650.9,
1501
+ status: 'Active',
1502
+ owner: 'Ana Costa',
1503
+ region: 'Lisbon',
1504
+ },
1505
+ {
1506
+ id: 'tailspin',
1507
+ name: 'Tailspin Market',
1508
+ email: 'orders@tailspin.example',
1509
+ balance: 860.5,
1510
+ status: 'On hold',
1511
+ owner: 'Marta Silva',
1512
+ region: 'Porto',
1513
+ },
1514
+ ];
1515
+
1516
+ const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
1517
+
1518
+ const COLUMNS: GridColumn<Account>[] = [
1519
+ { id: 'name', label: 'Account', rowHeader: true },
1520
+ { id: 'email', label: 'Email' },
1521
+ {
1522
+ id: 'balance',
1523
+ label: 'Balance',
1524
+ kind: 'number',
1525
+ format: (value) => USD.format(value as number),
1526
+ },
1527
+ { id: 'status', label: 'Status', priority: 1 },
1528
+ { id: 'owner', label: 'Owner', priority: 2 },
1529
+ { id: 'region', label: 'Region', priority: 3 },
1530
+ ];
1531
+
1532
+ const VARIANTS = ['plain', 'ruled', 'framed'] as const;
1533
+
1534
+ export default function DataListVariantsExample() {
1535
+ return (
1536
+ <Stack gap={4}>
1537
+ {VARIANTS.map((variant) => (
1538
+ <Stack gap={2} key={variant}>
1539
+ <Text size="sm" tone="muted">
1540
+ {variant}
1541
+ </Text>
1542
+ <DataList
1543
+ columns={COLUMNS.slice(0, 3)}
1544
+ label={`Accounts, ${variant}`}
1545
+ rowKey="id"
1546
+ rows={ACCOUNTS.slice(0, 2)}
1547
+ subtitle="email"
1548
+ trailing="balance"
1549
+ variant={variant}
1550
+ />
1551
+ </Stack>
1552
+ ))}
1553
+ </Stack>
1554
+ );
1555
+ }
1556
+ ```