@maggioli-design-system/magma-react 2.9.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (618) hide show
  1. package/AGENTS.md +10 -7
  2. package/CHANGELOG.md +109 -0
  3. package/README.md +38 -0
  4. package/agents/assets.md +2 -2
  5. package/agents/color.md +7 -5
  6. package/agents/components.md +2 -2
  7. package/agents/conventions.md +1 -1
  8. package/agents/mcp.md +78 -8
  9. package/agents/{anti-patterns.md → mistakes.md} +2 -2
  10. package/agents/patterns/actions.md +393 -0
  11. package/agents/patterns/app-shell.md +223 -0
  12. package/agents/patterns/choose-items.md +18 -0
  13. package/agents/patterns/concurrent-editing.md +17 -0
  14. package/agents/patterns/confirm-action.md +216 -0
  15. package/agents/patterns/consent-and-legal.md +16 -0
  16. package/agents/patterns/density.md +236 -0
  17. package/agents/patterns/empty-state.md +201 -0
  18. package/agents/patterns/error-recovery.md +237 -0
  19. package/agents/patterns/form-and-validation.md +16 -0
  20. package/agents/patterns/item-list.md +214 -0
  21. package/agents/patterns/labels-and-values.md +184 -0
  22. package/agents/patterns/list-with-filters.md +282 -0
  23. package/agents/patterns/loading.md +221 -0
  24. package/agents/patterns/message-placement.md +304 -0
  25. package/agents/patterns/notification-center.md +18 -0
  26. package/agents/patterns/page-header.md +201 -0
  27. package/agents/patterns/permissions.md +17 -0
  28. package/agents/patterns/previews/actions/banner.html +21 -0
  29. package/agents/patterns/previews/actions/confirm.html +11 -0
  30. package/agents/patterns/previews/actions/danger-zone.html +22 -0
  31. package/agents/patterns/previews/actions/destructive-in-menu.html +19 -0
  32. package/agents/patterns/previews/actions/dismiss-message.html +15 -0
  33. package/agents/patterns/previews/actions/dismiss.html +25 -0
  34. package/agents/patterns/previews/actions/more-in-menu.html +21 -0
  35. package/agents/patterns/previews/actions/part-primary.html +28 -0
  36. package/agents/patterns/previews/actions/primary.html +20 -0
  37. package/agents/patterns/previews/actions/remove.html +44 -0
  38. package/agents/patterns/previews/actions/secondary.html +20 -0
  39. package/agents/patterns/previews/actions/stacked.html +17 -0
  40. package/agents/patterns/previews/actions/toast.html +10 -0
  41. package/agents/patterns/previews/app-shell/back-office.html +41 -0
  42. package/agents/patterns/previews/app-shell/many-sections.html +45 -0
  43. package/agents/patterns/previews/app-shell/public-service.html +31 -0
  44. package/agents/patterns/previews/confirm-action/act-then-undo.html +44 -0
  45. package/agents/patterns/previews/confirm-action/ask-before-sending.html +25 -0
  46. package/agents/patterns/previews/confirm-action/ask-first-many.html +11 -0
  47. package/agents/patterns/previews/confirm-action/ask-first.html +14 -0
  48. package/agents/patterns/previews/confirm-action/make-reversible.html +54 -0
  49. package/agents/patterns/previews/confirm-action/send-as-shown.html +57 -0
  50. package/agents/patterns/previews/empty-state/add-the-first.html +19 -0
  51. package/agents/patterns/previews/empty-state/all-done.html +15 -0
  52. package/agents/patterns/previews/empty-state/clear-filters.html +35 -0
  53. package/agents/patterns/previews/empty-state/filled-by-others.html +15 -0
  54. package/agents/patterns/previews/empty-state/not-found.html +38 -0
  55. package/agents/patterns/previews/empty-state/one-line.html +12 -0
  56. package/agents/patterns/previews/error-recovery/action-another-way.html +35 -0
  57. package/agents/patterns/previews/error-recovery/changed-meanwhile.html +26 -0
  58. package/agents/patterns/previews/error-recovery/check-or-repeat.html +38 -0
  59. package/agents/patterns/previews/error-recovery/content-another-way.html +12 -0
  60. package/agents/patterns/previews/error-recovery/partial.html +29 -0
  61. package/agents/patterns/previews/error-recovery/retry-action.html +35 -0
  62. package/agents/patterns/previews/error-recovery/retry-content.html +40 -0
  63. package/agents/patterns/previews/error-recovery/sign-in-again.html +44 -0
  64. package/agents/patterns/previews/item-list/documents-of-a-request.html +12 -0
  65. package/agents/patterns/previews/item-list/queue-of-a-desk.html +109 -0
  66. package/agents/patterns/previews/item-list/requests-of-an-office.html +74 -0
  67. package/agents/patterns/previews/item-list/requests-to-assign.html +80 -0
  68. package/agents/patterns/previews/labels-and-values/data-of-a-contact.html +31 -0
  69. package/agents/patterns/previews/labels-and-values/payment-before-paying.html +21 -0
  70. package/agents/patterns/previews/labels-and-values/what-is-sent.html +25 -0
  71. package/agents/patterns/previews/list-with-filters/act-on-many.html +121 -0
  72. package/agents/patterns/previews/list-with-filters/find-and-open.html +109 -0
  73. package/agents/patterns/previews/list-with-filters/show-new-items.html +132 -0
  74. package/agents/patterns/previews/loading/await-and-say.html +41 -0
  75. package/agents/patterns/previews/loading/await-the-control.html +28 -0
  76. package/agents/patterns/previews/loading/first-load.html +10 -0
  77. package/agents/patterns/previews/loading/keep-while-reloading.html +80 -0
  78. package/agents/patterns/previews/loading/long-load-measured.html +16 -0
  79. package/agents/patterns/previews/loading/long-load.html +12 -0
  80. package/agents/patterns/previews/loading/progress-in-place.html +52 -0
  81. package/agents/patterns/previews/loading/run-in-background.html +24 -0
  82. package/agents/patterns/previews/message-placement/action-done-elsewhere.html +38 -0
  83. package/agents/patterns/previews/message-placement/action-done-in-page.html +53 -0
  84. package/agents/patterns/previews/message-placement/action-done-in-part.html +42 -0
  85. package/agents/patterns/previews/message-placement/action-failed-elsewhere.html +40 -0
  86. package/agents/patterns/previews/message-placement/action-failed-in-place.html +31 -0
  87. package/agents/patterns/previews/message-placement/action-later.html +24 -0
  88. package/agents/patterns/previews/message-placement/action-partial-elsewhere.html +33 -0
  89. package/agents/patterns/previews/message-placement/action-partial-in-place.html +51 -0
  90. package/agents/patterns/previews/message-placement/action-taken.html +25 -0
  91. package/agents/patterns/previews/message-placement/app-deadline.html +20 -0
  92. package/agents/patterns/previews/message-placement/app-failed.html +48 -0
  93. package/agents/patterns/previews/message-placement/app-info.html +39 -0
  94. package/agents/patterns/previews/message-placement/decision.html +49 -0
  95. package/agents/patterns/previews/message-placement/field-error.html +28 -0
  96. package/agents/patterns/previews/message-placement/field-hint.html +30 -0
  97. package/agents/patterns/previews/message-placement/field-valid.html +11 -0
  98. package/agents/patterns/previews/message-placement/region-failed.html +31 -0
  99. package/agents/patterns/previews/message-placement/region-info.html +16 -0
  100. package/agents/patterns/previews/page-header/contact-being-edited.html +25 -0
  101. package/agents/patterns/previews/page-header/members-of-a-group.html +18 -0
  102. package/agents/patterns/previews/page-header/own-profile.html +17 -0
  103. package/agents/patterns/previews/page-header/request-from-the-list.html +33 -0
  104. package/agents/patterns/previews/page-header/requests-of-an-office.html +16 -0
  105. package/agents/patterns/previews/record-detail/ask-for-words.html +72 -0
  106. package/agents/patterns/previews/record-detail/edit-data.html +104 -0
  107. package/agents/patterns/previews/record-detail/read-the-data.html +80 -0
  108. package/agents/patterns/previews/record-detail/record-changed.html +87 -0
  109. package/agents/patterns/previews/record-detail/run-at-once.html +88 -0
  110. package/agents/patterns/previews/record-detail/work-on-it.html +106 -0
  111. package/agents/patterns/previews/rhythm/between-containers.html +29 -0
  112. package/agents/patterns/previews/rhythm/between-fields.html +14 -0
  113. package/agents/patterns/previews/rhythm/between-groups.html +23 -0
  114. package/agents/patterns/previews/rhythm/between-sections.html +17 -0
  115. package/agents/patterns/previews/rhythm/content-actions.html +14 -0
  116. package/agents/patterns/previews/rhythm/inline.html +12 -0
  117. package/agents/patterns/previews/rhythm/inset.html +11 -0
  118. package/agents/patterns/previews/rhythm/label-control.html +8 -0
  119. package/agents/patterns/previews/rhythm/title-content.html +10 -0
  120. package/agents/patterns/previews/surfaces/band.html +73 -0
  121. package/agents/patterns/previews/surfaces/canvas.html +66 -0
  122. package/agents/patterns/previews/surfaces/card.html +30 -0
  123. package/agents/patterns/previews/surfaces/dialog.html +28 -0
  124. package/agents/patterns/previews/surfaces/edit-actions.html +35 -0
  125. package/agents/patterns/previews/surfaces/section.html +35 -0
  126. package/agents/patterns/previews/titles/dialog.html +18 -0
  127. package/agents/patterns/previews/titles/group.html +14 -0
  128. package/agents/patterns/previews/titles/page.html +25 -0
  129. package/agents/patterns/previews/titles/part.html +24 -0
  130. package/agents/patterns/previews/titles/section.html +14 -0
  131. package/agents/patterns/previews/widths/dialog.html +33 -0
  132. package/agents/patterns/previews/widths/field.html +20 -0
  133. package/agents/patterns/previews/widths/form.html +27 -0
  134. package/agents/patterns/previews/widths/page.html +49 -0
  135. package/agents/patterns/previews/widths/reading.html +15 -0
  136. package/agents/patterns/record-detail.md +268 -0
  137. package/agents/patterns/rhythm.md +212 -0
  138. package/agents/patterns/surfaces.md +212 -0
  139. package/agents/patterns/titles.md +208 -0
  140. package/agents/patterns/widths.md +202 -0
  141. package/agents/patterns.md +121 -0
  142. package/agents/reporting.md +6 -3
  143. package/agents/theming.md +36 -12
  144. package/agents/typography.md +27 -2
  145. package/agents/variants.md +1 -1
  146. package/dist/components.js +117 -117
  147. package/dist/components.server.js +117 -117
  148. package/dist/mds-accordion-item.js +8 -3
  149. package/dist/mds-accordion-item.server.js +7 -2
  150. package/dist/mds-accordion-timer-item.js +8 -3
  151. package/dist/mds-accordion-timer-item.server.js +7 -2
  152. package/dist/mds-accordion-timer.js +11 -4
  153. package/dist/mds-accordion-timer.server.js +7 -2
  154. package/dist/mds-accordion.js +11 -4
  155. package/dist/mds-accordion.server.js +7 -2
  156. package/dist/mds-author.js +8 -3
  157. package/dist/mds-author.server.js +7 -2
  158. package/dist/mds-avatar-stack-item.js +8 -3
  159. package/dist/mds-avatar-stack-item.server.js +7 -2
  160. package/dist/mds-avatar-stack.js +8 -3
  161. package/dist/mds-avatar-stack.server.js +7 -2
  162. package/dist/mds-avatar.js +8 -3
  163. package/dist/mds-avatar.server.js +7 -2
  164. package/dist/mds-badge.js +8 -3
  165. package/dist/mds-badge.server.js +7 -2
  166. package/dist/mds-banner.js +11 -4
  167. package/dist/mds-banner.server.js +7 -2
  168. package/dist/mds-benchmark-bar.js +8 -3
  169. package/dist/mds-benchmark-bar.server.js +7 -2
  170. package/dist/mds-bibliography.js +8 -3
  171. package/dist/mds-bibliography.server.js +7 -2
  172. package/dist/mds-book.js +8 -3
  173. package/dist/mds-book.server.js +7 -2
  174. package/dist/mds-breadcrumb-item.js +11 -4
  175. package/dist/mds-breadcrumb-item.server.js +7 -2
  176. package/dist/mds-breadcrumb.js +11 -4
  177. package/dist/mds-breadcrumb.server.js +10 -3
  178. package/dist/mds-button-dropdown.js +11 -4
  179. package/dist/mds-button-dropdown.server.js +7 -2
  180. package/dist/mds-button-group.js +8 -3
  181. package/dist/mds-button-group.server.js +7 -2
  182. package/dist/mds-button.js +8 -3
  183. package/dist/mds-button.server.js +7 -2
  184. package/dist/mds-calendar-cell.js +8 -3
  185. package/dist/mds-calendar-cell.server.js +7 -2
  186. package/dist/mds-calendar.js +8 -3
  187. package/dist/mds-calendar.server.js +7 -2
  188. package/dist/mds-card-content.js +8 -3
  189. package/dist/mds-card-content.server.js +7 -2
  190. package/dist/mds-card-footer.js +8 -3
  191. package/dist/mds-card-footer.server.js +7 -2
  192. package/dist/mds-card-header.js +8 -3
  193. package/dist/mds-card-header.server.js +7 -2
  194. package/dist/mds-card-media.js +8 -3
  195. package/dist/mds-card-media.server.js +7 -2
  196. package/dist/mds-card.js +8 -3
  197. package/dist/mds-card.server.js +10 -3
  198. package/dist/mds-chip.js +8 -3
  199. package/dist/mds-chip.server.js +7 -2
  200. package/dist/mds-details.js +11 -4
  201. package/dist/mds-details.server.js +10 -3
  202. package/dist/mds-dropdown.js +8 -3
  203. package/dist/mds-dropdown.server.js +7 -2
  204. package/dist/mds-emoji.js +8 -3
  205. package/dist/mds-emoji.server.js +10 -3
  206. package/dist/mds-entity.js +8 -3
  207. package/dist/mds-entity.server.js +7 -2
  208. package/dist/mds-file-preview.js +8 -3
  209. package/dist/mds-file-preview.server.js +7 -2
  210. package/dist/mds-file.js +11 -4
  211. package/dist/mds-file.server.js +7 -2
  212. package/dist/mds-filter-item.js +11 -4
  213. package/dist/mds-filter-item.server.js +7 -2
  214. package/dist/mds-filter.js +11 -4
  215. package/dist/mds-filter.server.js +7 -2
  216. package/dist/mds-header-bar.js +11 -4
  217. package/dist/mds-header-bar.server.js +7 -2
  218. package/dist/mds-header.js +8 -3
  219. package/dist/mds-header.server.js +7 -2
  220. package/dist/mds-help.js +8 -3
  221. package/dist/mds-help.server.js +7 -2
  222. package/dist/mds-horizontal-scroll.js +8 -3
  223. package/dist/mds-horizontal-scroll.server.js +7 -2
  224. package/dist/mds-hr.js +8 -3
  225. package/dist/mds-hr.server.js +7 -2
  226. package/dist/mds-icon.js +8 -3
  227. package/dist/mds-icon.server.js +10 -3
  228. package/dist/mds-img.js +8 -3
  229. package/dist/mds-img.server.js +7 -2
  230. package/dist/mds-input-date-range-preselection.js +8 -3
  231. package/dist/mds-input-date-range-preselection.server.js +7 -2
  232. package/dist/mds-input-date-range.js +11 -4
  233. package/dist/mds-input-date-range.server.js +7 -2
  234. package/dist/mds-input-date.js +8 -3
  235. package/dist/mds-input-date.server.js +7 -2
  236. package/dist/mds-input-field.js +8 -3
  237. package/dist/mds-input-field.server.js +8 -2
  238. package/dist/mds-input-otp.js +8 -3
  239. package/dist/mds-input-otp.server.js +7 -2
  240. package/dist/mds-input-range.js +11 -4
  241. package/dist/mds-input-range.server.js +7 -2
  242. package/dist/mds-input-select.js +11 -4
  243. package/dist/mds-input-select.server.js +7 -2
  244. package/dist/mds-input-switch.js +11 -4
  245. package/dist/mds-input-switch.server.js +7 -2
  246. package/dist/mds-input-tip-item.js +8 -3
  247. package/dist/mds-input-tip-item.server.js +7 -2
  248. package/dist/mds-input-tip.js +8 -3
  249. package/dist/mds-input-tip.server.js +7 -2
  250. package/dist/mds-input-upload.js +11 -4
  251. package/dist/mds-input-upload.server.js +7 -2
  252. package/dist/mds-input.js +8 -3
  253. package/dist/mds-input.server.js +7 -2
  254. package/dist/mds-keyboard-key.js +8 -3
  255. package/dist/mds-keyboard-key.server.js +7 -2
  256. package/dist/mds-keyboard.js +8 -3
  257. package/dist/mds-keyboard.server.js +7 -2
  258. package/dist/mds-kpi-item.js +8 -3
  259. package/dist/mds-kpi-item.server.js +7 -2
  260. package/dist/mds-kpi.js +8 -3
  261. package/dist/mds-kpi.server.js +7 -2
  262. package/dist/mds-label.js +11 -4
  263. package/dist/mds-label.server.js +7 -2
  264. package/dist/mds-link.js +8 -3
  265. package/dist/mds-link.server.js +7 -2
  266. package/dist/mds-list-item.js +8 -3
  267. package/dist/mds-list-item.server.js +7 -2
  268. package/dist/mds-list.js +8 -3
  269. package/dist/mds-list.server.js +7 -2
  270. package/dist/mds-mention.js +11 -4
  271. package/dist/mds-mention.server.js +7 -2
  272. package/dist/mds-modal.js +8 -3
  273. package/dist/mds-modal.server.js +7 -2
  274. package/dist/mds-note.js +11 -4
  275. package/dist/mds-note.server.js +7 -2
  276. package/dist/mds-notification.js +8 -3
  277. package/dist/mds-notification.server.js +10 -3
  278. package/dist/mds-paginator-item.js +8 -3
  279. package/dist/mds-paginator-item.server.js +7 -2
  280. package/dist/mds-paginator.js +11 -4
  281. package/dist/mds-paginator.server.js +7 -2
  282. package/dist/mds-policy-ai.js +8 -3
  283. package/dist/mds-policy-ai.server.js +7 -2
  284. package/dist/mds-pref-animation.js +11 -4
  285. package/dist/mds-pref-animation.server.js +7 -2
  286. package/dist/mds-pref-consumption.js +11 -4
  287. package/dist/mds-pref-consumption.server.js +7 -2
  288. package/dist/mds-pref-contrast.js +11 -4
  289. package/dist/mds-pref-contrast.server.js +7 -2
  290. package/dist/mds-pref-language-item.js +11 -4
  291. package/dist/mds-pref-language-item.server.js +7 -2
  292. package/dist/mds-pref-language.js +8 -3
  293. package/dist/mds-pref-language.server.js +7 -2
  294. package/dist/mds-pref-mode.js +11 -4
  295. package/dist/mds-pref-mode.server.js +7 -2
  296. package/dist/mds-pref-theme-item.js +11 -4
  297. package/dist/mds-pref-theme-item.server.js +7 -2
  298. package/dist/mds-pref-theme.js +8 -3
  299. package/dist/mds-pref-theme.server.js +7 -2
  300. package/dist/mds-pref.js +8 -3
  301. package/dist/mds-pref.server.js +7 -2
  302. package/dist/mds-price-table-features-cell.js +8 -3
  303. package/dist/mds-price-table-features-cell.server.js +10 -3
  304. package/dist/mds-price-table-features-row.js +8 -3
  305. package/dist/mds-price-table-features-row.server.js +7 -2
  306. package/dist/mds-price-table-features.js +8 -3
  307. package/dist/mds-price-table-features.server.js +10 -3
  308. package/dist/mds-price-table-header.js +8 -3
  309. package/dist/mds-price-table-header.server.js +7 -2
  310. package/dist/mds-price-table-list-item.js +8 -3
  311. package/dist/mds-price-table-list-item.server.js +7 -2
  312. package/dist/mds-price-table-list.js +8 -3
  313. package/dist/mds-price-table-list.server.js +7 -2
  314. package/dist/mds-price-table.js +8 -3
  315. package/dist/mds-price-table.server.js +7 -2
  316. package/dist/mds-progress.js +8 -3
  317. package/dist/mds-progress.server.js +7 -2
  318. package/dist/mds-push-notification-item.js +11 -4
  319. package/dist/mds-push-notification-item.server.js +7 -2
  320. package/dist/mds-push-notification.js +8 -3
  321. package/dist/mds-push-notification.server.js +7 -2
  322. package/dist/mds-quote.js +8 -3
  323. package/dist/mds-quote.server.js +7 -2
  324. package/dist/mds-radial-menu-item.js +8 -3
  325. package/dist/mds-radial-menu-item.server.js +7 -2
  326. package/dist/mds-radial-menu.js +8 -3
  327. package/dist/mds-radial-menu.server.js +7 -2
  328. package/dist/mds-radial-progress.js +8 -3
  329. package/dist/mds-radial-progress.server.js +7 -2
  330. package/dist/mds-separator.js +8 -3
  331. package/dist/mds-separator.server.js +7 -2
  332. package/dist/mds-spinner.js +8 -3
  333. package/dist/mds-spinner.server.js +10 -3
  334. package/dist/mds-status-bar.js +8 -3
  335. package/dist/mds-status-bar.server.js +7 -2
  336. package/dist/mds-stepper-bar-item.js +11 -4
  337. package/dist/mds-stepper-bar-item.server.js +7 -2
  338. package/dist/mds-stepper-bar.js +11 -4
  339. package/dist/mds-stepper-bar.server.js +7 -2
  340. package/dist/mds-tab-bar-item.js +11 -4
  341. package/dist/mds-tab-bar-item.server.js +7 -2
  342. package/dist/mds-tab-bar.js +11 -4
  343. package/dist/mds-tab-bar.server.js +7 -2
  344. package/dist/mds-tab-item.js +8 -3
  345. package/dist/mds-tab-item.server.js +7 -2
  346. package/dist/mds-tab.js +11 -4
  347. package/dist/mds-tab.server.js +7 -2
  348. package/dist/mds-table-body.js +8 -3
  349. package/dist/mds-table-body.server.js +7 -2
  350. package/dist/mds-table-cell.js +8 -3
  351. package/dist/mds-table-cell.server.js +10 -3
  352. package/dist/mds-table-footer.js +8 -3
  353. package/dist/mds-table-footer.server.js +10 -3
  354. package/dist/mds-table-header-cell.js +11 -4
  355. package/dist/mds-table-header-cell.server.js +7 -2
  356. package/dist/mds-table-header.js +8 -3
  357. package/dist/mds-table-header.server.js +10 -3
  358. package/dist/mds-table-row.js +8 -3
  359. package/dist/mds-table-row.server.js +7 -2
  360. package/dist/mds-table.js +11 -4
  361. package/dist/mds-table.server.js +7 -2
  362. package/dist/mds-text.js +8 -3
  363. package/dist/mds-text.server.js +7 -2
  364. package/dist/mds-toast-region.js +8 -3
  365. package/dist/mds-toast-region.server.js +7 -2
  366. package/dist/mds-toast.js +11 -4
  367. package/dist/mds-toast.server.js +7 -2
  368. package/dist/mds-tooltip.js +8 -3
  369. package/dist/mds-tooltip.server.js +7 -2
  370. package/dist/mds-tree-item.js +8 -3
  371. package/dist/mds-tree-item.server.js +7 -2
  372. package/dist/mds-tree.js +8 -3
  373. package/dist/mds-tree.server.js +7 -2
  374. package/dist/mds-url-view.js +11 -4
  375. package/dist/mds-url-view.server.js +7 -2
  376. package/dist/mds-usage.js +8 -3
  377. package/dist/mds-usage.server.js +7 -2
  378. package/dist/mds-video-wall.js +8 -3
  379. package/dist/mds-video-wall.server.js +7 -2
  380. package/dist/mds-zero.js +8 -3
  381. package/dist/mds-zero.server.js +7 -2
  382. package/dist/types/components.d.ts +117 -117
  383. package/dist/types/components.server.d.ts +118 -118
  384. package/dist/types/mds-accordion-item.d.ts +4 -8
  385. package/dist/types/mds-accordion-item.server.d.ts +4 -4
  386. package/dist/types/mds-accordion-timer-item.d.ts +4 -8
  387. package/dist/types/mds-accordion-timer-item.server.d.ts +4 -4
  388. package/dist/types/mds-accordion-timer.d.ts +4 -8
  389. package/dist/types/mds-accordion-timer.server.d.ts +4 -4
  390. package/dist/types/mds-accordion.d.ts +4 -8
  391. package/dist/types/mds-accordion.server.d.ts +4 -4
  392. package/dist/types/mds-author.d.ts +2 -6
  393. package/dist/types/mds-author.server.d.ts +3 -3
  394. package/dist/types/mds-avatar-stack-item.d.ts +2 -6
  395. package/dist/types/mds-avatar-stack-item.server.d.ts +3 -3
  396. package/dist/types/mds-avatar-stack.d.ts +2 -6
  397. package/dist/types/mds-avatar-stack.server.d.ts +3 -3
  398. package/dist/types/mds-avatar.d.ts +2 -6
  399. package/dist/types/mds-avatar.server.d.ts +3 -3
  400. package/dist/types/mds-badge.d.ts +2 -6
  401. package/dist/types/mds-badge.server.d.ts +3 -3
  402. package/dist/types/mds-banner.d.ts +4 -8
  403. package/dist/types/mds-banner.server.d.ts +4 -4
  404. package/dist/types/mds-benchmark-bar.d.ts +2 -6
  405. package/dist/types/mds-benchmark-bar.server.d.ts +3 -3
  406. package/dist/types/mds-bibliography.d.ts +2 -6
  407. package/dist/types/mds-bibliography.server.d.ts +3 -3
  408. package/dist/types/mds-book.d.ts +2 -6
  409. package/dist/types/mds-book.server.d.ts +3 -3
  410. package/dist/types/mds-breadcrumb-item.d.ts +4 -8
  411. package/dist/types/mds-breadcrumb-item.server.d.ts +4 -4
  412. package/dist/types/mds-breadcrumb.d.ts +4 -8
  413. package/dist/types/mds-breadcrumb.server.d.ts +4 -4
  414. package/dist/types/mds-button-dropdown.d.ts +4 -8
  415. package/dist/types/mds-button-dropdown.server.d.ts +4 -4
  416. package/dist/types/mds-button-group.d.ts +2 -6
  417. package/dist/types/mds-button-group.server.d.ts +3 -3
  418. package/dist/types/mds-button.d.ts +2 -6
  419. package/dist/types/mds-button.server.d.ts +3 -3
  420. package/dist/types/mds-calendar-cell.d.ts +2 -6
  421. package/dist/types/mds-calendar-cell.server.d.ts +3 -3
  422. package/dist/types/mds-calendar.d.ts +4 -8
  423. package/dist/types/mds-calendar.server.d.ts +4 -4
  424. package/dist/types/mds-card-content.d.ts +2 -6
  425. package/dist/types/mds-card-content.server.d.ts +3 -3
  426. package/dist/types/mds-card-footer.d.ts +2 -6
  427. package/dist/types/mds-card-footer.server.d.ts +3 -3
  428. package/dist/types/mds-card-header.d.ts +2 -6
  429. package/dist/types/mds-card-header.server.d.ts +3 -3
  430. package/dist/types/mds-card-media.d.ts +2 -6
  431. package/dist/types/mds-card-media.server.d.ts +3 -3
  432. package/dist/types/mds-card.d.ts +2 -6
  433. package/dist/types/mds-card.server.d.ts +3 -3
  434. package/dist/types/mds-chip.d.ts +4 -8
  435. package/dist/types/mds-chip.server.d.ts +4 -4
  436. package/dist/types/mds-details.d.ts +4 -8
  437. package/dist/types/mds-details.server.d.ts +4 -4
  438. package/dist/types/mds-dropdown.d.ts +4 -8
  439. package/dist/types/mds-dropdown.server.d.ts +4 -4
  440. package/dist/types/mds-emoji.d.ts +2 -6
  441. package/dist/types/mds-emoji.server.d.ts +3 -3
  442. package/dist/types/mds-entity.d.ts +2 -6
  443. package/dist/types/mds-entity.server.d.ts +3 -3
  444. package/dist/types/mds-file-preview.d.ts +4 -8
  445. package/dist/types/mds-file-preview.server.d.ts +4 -4
  446. package/dist/types/mds-file.d.ts +4 -8
  447. package/dist/types/mds-file.server.d.ts +4 -4
  448. package/dist/types/mds-filter-item.d.ts +4 -8
  449. package/dist/types/mds-filter-item.server.d.ts +4 -4
  450. package/dist/types/mds-filter.d.ts +4 -8
  451. package/dist/types/mds-filter.server.d.ts +4 -4
  452. package/dist/types/mds-header-bar.d.ts +4 -8
  453. package/dist/types/mds-header-bar.server.d.ts +4 -4
  454. package/dist/types/mds-header.d.ts +4 -8
  455. package/dist/types/mds-header.server.d.ts +4 -4
  456. package/dist/types/mds-help.d.ts +2 -6
  457. package/dist/types/mds-help.server.d.ts +3 -3
  458. package/dist/types/mds-horizontal-scroll.d.ts +2 -6
  459. package/dist/types/mds-horizontal-scroll.server.d.ts +3 -3
  460. package/dist/types/mds-hr.d.ts +2 -6
  461. package/dist/types/mds-hr.server.d.ts +3 -3
  462. package/dist/types/mds-icon.d.ts +2 -6
  463. package/dist/types/mds-icon.server.d.ts +3 -3
  464. package/dist/types/mds-img.d.ts +4 -8
  465. package/dist/types/mds-img.server.d.ts +4 -4
  466. package/dist/types/mds-input-date-range-preselection.d.ts +2 -6
  467. package/dist/types/mds-input-date-range-preselection.server.d.ts +3 -3
  468. package/dist/types/mds-input-date-range.d.ts +4 -8
  469. package/dist/types/mds-input-date-range.server.d.ts +4 -4
  470. package/dist/types/mds-input-date.d.ts +4 -8
  471. package/dist/types/mds-input-date.server.d.ts +4 -4
  472. package/dist/types/mds-input-field.d.ts +2 -6
  473. package/dist/types/mds-input-field.server.d.ts +3 -3
  474. package/dist/types/mds-input-otp.d.ts +2 -6
  475. package/dist/types/mds-input-otp.server.d.ts +3 -3
  476. package/dist/types/mds-input-range.d.ts +4 -8
  477. package/dist/types/mds-input-range.server.d.ts +4 -4
  478. package/dist/types/mds-input-select.d.ts +4 -8
  479. package/dist/types/mds-input-select.server.d.ts +4 -4
  480. package/dist/types/mds-input-switch.d.ts +4 -8
  481. package/dist/types/mds-input-switch.server.d.ts +4 -4
  482. package/dist/types/mds-input-tip-item.d.ts +2 -6
  483. package/dist/types/mds-input-tip-item.server.d.ts +3 -3
  484. package/dist/types/mds-input-tip.d.ts +2 -6
  485. package/dist/types/mds-input-tip.server.d.ts +3 -3
  486. package/dist/types/mds-input-upload.d.ts +4 -8
  487. package/dist/types/mds-input-upload.server.d.ts +4 -4
  488. package/dist/types/mds-input.d.ts +4 -8
  489. package/dist/types/mds-input.server.d.ts +4 -4
  490. package/dist/types/mds-keyboard-key.d.ts +2 -6
  491. package/dist/types/mds-keyboard-key.server.d.ts +3 -3
  492. package/dist/types/mds-keyboard.d.ts +2 -6
  493. package/dist/types/mds-keyboard.server.d.ts +3 -3
  494. package/dist/types/mds-kpi-item.d.ts +2 -6
  495. package/dist/types/mds-kpi-item.server.d.ts +3 -3
  496. package/dist/types/mds-kpi.d.ts +2 -6
  497. package/dist/types/mds-kpi.server.d.ts +3 -3
  498. package/dist/types/mds-label.d.ts +4 -8
  499. package/dist/types/mds-label.server.d.ts +4 -4
  500. package/dist/types/mds-link.d.ts +2 -6
  501. package/dist/types/mds-link.server.d.ts +3 -3
  502. package/dist/types/mds-list-item.d.ts +2 -6
  503. package/dist/types/mds-list-item.server.d.ts +3 -3
  504. package/dist/types/mds-list.d.ts +2 -6
  505. package/dist/types/mds-list.server.d.ts +3 -3
  506. package/dist/types/mds-mention.d.ts +4 -8
  507. package/dist/types/mds-mention.server.d.ts +4 -4
  508. package/dist/types/mds-modal.d.ts +4 -8
  509. package/dist/types/mds-modal.server.d.ts +4 -4
  510. package/dist/types/mds-note.d.ts +4 -8
  511. package/dist/types/mds-note.server.d.ts +4 -4
  512. package/dist/types/mds-notification.d.ts +2 -6
  513. package/dist/types/mds-notification.server.d.ts +3 -3
  514. package/dist/types/mds-paginator-item.d.ts +2 -6
  515. package/dist/types/mds-paginator-item.server.d.ts +3 -3
  516. package/dist/types/mds-paginator.d.ts +4 -8
  517. package/dist/types/mds-paginator.server.d.ts +4 -4
  518. package/dist/types/mds-policy-ai.d.ts +2 -6
  519. package/dist/types/mds-policy-ai.server.d.ts +3 -3
  520. package/dist/types/mds-pref-animation.d.ts +4 -8
  521. package/dist/types/mds-pref-animation.server.d.ts +4 -4
  522. package/dist/types/mds-pref-consumption.d.ts +4 -8
  523. package/dist/types/mds-pref-consumption.server.d.ts +4 -4
  524. package/dist/types/mds-pref-contrast.d.ts +4 -8
  525. package/dist/types/mds-pref-contrast.server.d.ts +4 -4
  526. package/dist/types/mds-pref-language-item.d.ts +4 -8
  527. package/dist/types/mds-pref-language-item.server.d.ts +4 -4
  528. package/dist/types/mds-pref-language.d.ts +4 -8
  529. package/dist/types/mds-pref-language.server.d.ts +4 -4
  530. package/dist/types/mds-pref-mode.d.ts +4 -8
  531. package/dist/types/mds-pref-mode.server.d.ts +4 -4
  532. package/dist/types/mds-pref-theme-item.d.ts +4 -8
  533. package/dist/types/mds-pref-theme-item.server.d.ts +4 -4
  534. package/dist/types/mds-pref-theme.d.ts +4 -8
  535. package/dist/types/mds-pref-theme.server.d.ts +4 -4
  536. package/dist/types/mds-pref.d.ts +2 -6
  537. package/dist/types/mds-pref.server.d.ts +3 -3
  538. package/dist/types/mds-price-table-features-cell.d.ts +2 -6
  539. package/dist/types/mds-price-table-features-cell.server.d.ts +3 -3
  540. package/dist/types/mds-price-table-features-row.d.ts +2 -6
  541. package/dist/types/mds-price-table-features-row.server.d.ts +3 -3
  542. package/dist/types/mds-price-table-features.d.ts +2 -6
  543. package/dist/types/mds-price-table-features.server.d.ts +3 -3
  544. package/dist/types/mds-price-table-header.d.ts +2 -6
  545. package/dist/types/mds-price-table-header.server.d.ts +3 -3
  546. package/dist/types/mds-price-table-list-item.d.ts +2 -6
  547. package/dist/types/mds-price-table-list-item.server.d.ts +3 -3
  548. package/dist/types/mds-price-table-list.d.ts +2 -6
  549. package/dist/types/mds-price-table-list.server.d.ts +3 -3
  550. package/dist/types/mds-price-table.d.ts +2 -6
  551. package/dist/types/mds-price-table.server.d.ts +3 -3
  552. package/dist/types/mds-progress.d.ts +2 -6
  553. package/dist/types/mds-progress.server.d.ts +3 -3
  554. package/dist/types/mds-push-notification-item.d.ts +4 -8
  555. package/dist/types/mds-push-notification-item.server.d.ts +4 -4
  556. package/dist/types/mds-push-notification.d.ts +4 -8
  557. package/dist/types/mds-push-notification.server.d.ts +4 -4
  558. package/dist/types/mds-quote.d.ts +2 -6
  559. package/dist/types/mds-quote.server.d.ts +3 -3
  560. package/dist/types/mds-radial-menu-item.d.ts +2 -6
  561. package/dist/types/mds-radial-menu-item.server.d.ts +3 -3
  562. package/dist/types/mds-radial-menu.d.ts +2 -6
  563. package/dist/types/mds-radial-menu.server.d.ts +3 -3
  564. package/dist/types/mds-radial-progress.d.ts +2 -6
  565. package/dist/types/mds-radial-progress.server.d.ts +3 -3
  566. package/dist/types/mds-separator.d.ts +2 -6
  567. package/dist/types/mds-separator.server.d.ts +3 -3
  568. package/dist/types/mds-spinner.d.ts +2 -6
  569. package/dist/types/mds-spinner.server.d.ts +3 -3
  570. package/dist/types/mds-status-bar.d.ts +2 -6
  571. package/dist/types/mds-status-bar.server.d.ts +3 -3
  572. package/dist/types/mds-stepper-bar-item.d.ts +4 -8
  573. package/dist/types/mds-stepper-bar-item.server.d.ts +4 -4
  574. package/dist/types/mds-stepper-bar.d.ts +4 -8
  575. package/dist/types/mds-stepper-bar.server.d.ts +4 -4
  576. package/dist/types/mds-tab-bar-item.d.ts +4 -8
  577. package/dist/types/mds-tab-bar-item.server.d.ts +4 -4
  578. package/dist/types/mds-tab-bar.d.ts +4 -8
  579. package/dist/types/mds-tab-bar.server.d.ts +4 -4
  580. package/dist/types/mds-tab-item.d.ts +4 -8
  581. package/dist/types/mds-tab-item.server.d.ts +4 -4
  582. package/dist/types/mds-tab.d.ts +4 -8
  583. package/dist/types/mds-tab.server.d.ts +4 -4
  584. package/dist/types/mds-table-body.d.ts +2 -6
  585. package/dist/types/mds-table-body.server.d.ts +3 -3
  586. package/dist/types/mds-table-cell.d.ts +2 -6
  587. package/dist/types/mds-table-cell.server.d.ts +3 -3
  588. package/dist/types/mds-table-footer.d.ts +2 -6
  589. package/dist/types/mds-table-footer.server.d.ts +3 -3
  590. package/dist/types/mds-table-header-cell.d.ts +4 -8
  591. package/dist/types/mds-table-header-cell.server.d.ts +4 -4
  592. package/dist/types/mds-table-header.d.ts +2 -6
  593. package/dist/types/mds-table-header.server.d.ts +3 -3
  594. package/dist/types/mds-table-row.d.ts +2 -6
  595. package/dist/types/mds-table-row.server.d.ts +3 -3
  596. package/dist/types/mds-table.d.ts +4 -8
  597. package/dist/types/mds-table.server.d.ts +4 -4
  598. package/dist/types/mds-text.d.ts +2 -6
  599. package/dist/types/mds-text.server.d.ts +3 -3
  600. package/dist/types/mds-toast-region.d.ts +2 -6
  601. package/dist/types/mds-toast-region.server.d.ts +3 -3
  602. package/dist/types/mds-toast.d.ts +4 -8
  603. package/dist/types/mds-toast.server.d.ts +4 -4
  604. package/dist/types/mds-tooltip.d.ts +2 -6
  605. package/dist/types/mds-tooltip.server.d.ts +3 -3
  606. package/dist/types/mds-tree-item.d.ts +4 -8
  607. package/dist/types/mds-tree-item.server.d.ts +4 -4
  608. package/dist/types/mds-tree.d.ts +2 -6
  609. package/dist/types/mds-tree.server.d.ts +3 -3
  610. package/dist/types/mds-url-view.d.ts +4 -8
  611. package/dist/types/mds-url-view.server.d.ts +4 -4
  612. package/dist/types/mds-usage.d.ts +2 -6
  613. package/dist/types/mds-usage.server.d.ts +3 -3
  614. package/dist/types/mds-video-wall.d.ts +2 -6
  615. package/dist/types/mds-video-wall.server.d.ts +3 -3
  616. package/dist/types/mds-zero.d.ts +2 -6
  617. package/dist/types/mds-zero.server.d.ts +3 -3
  618. package/package.json +3 -3
@@ -0,0 +1,236 @@
1
+ ---
2
+ # A domain of Foundation, the design language (#1189): the format and the commands are in
3
+ # docs/PATTERNS.md, "A domain of Foundation". The check says what is still missing:
4
+ # nx run stencil:check.patterns (after nx run stencil:build).
5
+ id: density
6
+ kind: foundation
7
+ title: Density
8
+ layer: magma
9
+ status: decided
10
+ need: >-
11
+ Fit more or less on a screen without changing how its parts relate: more for a product that
12
+ shows a lot at once, less for a person who needs more room to point.
13
+ principle: >-
14
+ A density is one factor on every unit: the spaces, the controls and the markers shrink or grow
15
+ together, and the type stays as it is.
16
+ keywords: [density, compact, standard, comfortable, dense, roomy, unit, target size, data grid density]
17
+ assumptions:
18
+ - "The spaces, the controls and the markers are measured in the three units of the dimension axis of the themes (#691): container, control, marker."
19
+ - "The type is not part of a density: a person who needs larger text enlarges the text."
20
+ components: []
21
+ related: [rhythm]
22
+ validated-on: []
23
+
24
+ variables:
25
+ level:
26
+ values: [compact, standard, comfortable]
27
+ means: "The density in force where the element stands, as the theme of the product, a region of the page or the person chose it (scope, region)."
28
+
29
+ cases:
30
+ - id: compact
31
+ level: compact
32
+ where: "every unit at 3px, the factor 3/4: between fields 450, a button (size md) 675 high, an input (size lg) 1050, a checkbox 450; until the units ship (#691) no product has it, and nothing writes it by hand"
33
+ serves: flexible
34
+ carried-by-planned: [--magma-unit-container, --magma-unit-control, --magma-unit-marker, mds-pref-density]
35
+ - id: standard
36
+ level: standard
37
+ where: "every unit at 4px, the default: between fields 600, a button (size md) 900 high, an input (size lg) 1200, a checkbox 600; the values of today"
38
+ serves: flexible
39
+ carried-by-planned: [--magma-unit-container, --magma-unit-control, --magma-unit-marker]
40
+ - id: comfortable
41
+ level: comfortable
42
+ where: "every unit at 5px, the factor 5/4: between fields 750, a button (size md) 1125 high, an input (size lg) 1350, a checkbox 750; the level where the default button reaches 1100, the target of WCAG 2.5.5 (AAA); until the units ship (#691) no product has it"
43
+ serves: [inclusive, flexible]
44
+ carried-by-planned: [--magma-unit-container, --magma-unit-control, --magma-unit-marker, mds-pref-density]
45
+
46
+ gaps: []
47
+ not-applicable: []
48
+
49
+ always-true:
50
+ - id: scale
51
+ rule: "A density shrinks or grows every relation of the rhythm by one factor, so the proportions stay those of the standard density and rhythm/step-ratio holds at every level: never one step down per relation, never a table of its own."
52
+ serves: [intuitive, flexible]
53
+ checked-by: review
54
+ - id: controls
55
+ rule: "The controls (buttons, fields) follow the factor of the rhythm. A field is one line of text plus its padding, and only the padding follows: the text keeps its size."
56
+ serves: [intuitive, flexible]
57
+ checked-by: review
58
+ - id: markers
59
+ rule: "The markers (a checkbox, a switch, a badge, the space between a marker and its label) follow the same factor, with no exception; a marker stays centred on the first line of its label at every level."
60
+ serves: [inclusive, intuitive]
61
+ checked-by: review
62
+ - id: unit
63
+ rule: "The rhythm is measured in the container unit: each --magma-rhythm-<id> is that unit times its step (300 = 3 units). The unit is a literal, so a product that changes --spacing does not move the rhythm. Wherever a density applies, the rhythm tokens are declared again next to the units: a custom property resolves where it is declared."
64
+ serves: flexible
65
+ checked-by: review
66
+ - id: levels
67
+ rule: "Three levels, with symmetric units: compact (3px), standard (4px, the default), comfortable (5px). No other level; the names are not sm, md and lg, which belong to the size of a component."
68
+ serves: [inclusive, flexible]
69
+ checked-by: review
70
+ - id: scope
71
+ rule: "Three layers choose the density, in the order system < theme < person: the theme of the product for all of it, a region for a part of the page (data-density on any element), the person with mds-pref-density (pref-density-<level> on html)."
72
+ serves: [inclusive, flexible]
73
+ checked-by: review
74
+ - id: region
75
+ rule: "An explicit choice of the person wins over the regions: mds-pref-density takes auto (the default, the density of the product with its regions), compact, standard or comfortable, and a level the person chose applies everywhere, a compact region included."
76
+ serves: inclusive
77
+ checked-by: review
78
+ - id: dense-targets
79
+ rule: "At compact a checkbox is 450, under the 600 of WCAG 2.5.8: it passes by the spacing exception while the centres of two neighbouring checkboxes stand at least 600 apart. A list or a table that selects its rows with bare checkboxes keeps its rows at least 600 high."
80
+ serves: inclusive
81
+ checked-by: review
82
+
83
+ open-choices:
84
+ - { id: product-density, default: "standard", may: "set compact or comfortable for the whole product in its theme" }
85
+ - { id: region-density, default: "the density of the product", may: "mark a part of the page (a dense table, a side bar) with data-density" }
86
+
87
+ situations:
88
+ - { situation: "A management application whose people work through long tables all day", case: compact, note: "the theme of the product, or data-density on the table only" }
89
+ - { situation: "A form of a public service a citizen fills in once", case: standard }
90
+ - { situation: "A person who points with difficulty chooses more room in the preferences", case: comfortable, note: "it applies everywhere, the compact regions included (region)" }
91
+ ---
92
+
93
+ # Density
94
+
95
+ **A density is one factor on every unit: the spaces, the controls and the markers shrink or grow together, and the type stays as it is.**
96
+
97
+ ## When to use it
98
+
99
+ When a product, a part of a page or a person needs more or less on the screen: a management
100
+ application whose people scan long tables all day, a dense table inside an ordinary page, a
101
+ person who points with difficulty and needs larger targets. Density settles what changes and
102
+ who chooses it; the relations themselves are the domain of the rhythm, which a density scales
103
+ and never redefines.
104
+
105
+ Not here: the size of one component (`size`, a choice of the composition, not of the
106
+ density), and the size of the text, which a density never touches.
107
+
108
+ ## What decides it
109
+
110
+ One question: which level is in force where the element stands. The product sets it in its
111
+ theme, a region of the page may set its own, and the person may override both from the
112
+ preferences. The level gives the unit; everything measured in the units follows by itself.
113
+
114
+ ## Cases
115
+
116
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
117
+
118
+ | Variable | Values | Means |
119
+ | --- | --- | --- |
120
+ | `level` | `compact`, `standard`, `comfortable` | The density in force where the element stands, as the theme of the product, a region of the page or the person chose it (scope, region). |
121
+
122
+ A case that leaves a variable out holds for any of its values.
123
+
124
+ | Case | When | Where | Use | Serves | Carried by |
125
+ | --- | --- | --- | --- | --- | --- |
126
+ | `compact` | level: compact | every unit at 3px, the factor 3/4: between fields 450, a button (size md) 675 high, an input (size lg) 1050, a checkbox 450; until the units ship (#691) no product has it, and nothing writes it by hand | | flexible | planned: --magma-unit-container, --magma-unit-control, --magma-unit-marker, mds-pref-density |
127
+ | `standard` | level: standard | every unit at 4px, the default: between fields 600, a button (size md) 900 high, an input (size lg) 1200, a checkbox 600; the values of today | | flexible | planned: --magma-unit-container, --magma-unit-control, --magma-unit-marker |
128
+ | `comfortable` | level: comfortable | every unit at 5px, the factor 5/4: between fields 750, a button (size md) 1125 high, an input (size lg) 1350, a checkbox 750; the level where the default button reaches 1100, the target of WCAG 2.5.5 (AAA); until the units ship (#691) no product has it | | inclusive, flexible | planned: --magma-unit-container, --magma-unit-control, --magma-unit-marker, mds-pref-density |
129
+
130
+ No gaps: every combination has a case or is not applicable.
131
+
132
+ ## Parts
133
+
134
+ The three levels, as measured on the built components (`standard`) and in the live
135
+ comparisons (the other two):
136
+
137
+ | | `compact` | `standard` | `comfortable` |
138
+ | --- | --- | --- | --- |
139
+ | Unit | 3px | 4px | 5px |
140
+ | Factor | 3/4 | 1 | 5/4 |
141
+ | `rhythm/inline`, `title-content`, `label-control` | 225 | 300 | 375 |
142
+ | `rhythm/between-containers` | 300 | 400 | 500 |
143
+ | `rhythm/between-fields`, `rhythm/inset` | 450 | 600 | 750 |
144
+ | `rhythm/between-groups` | 750 | 1000 | 1250 |
145
+ | `rhythm/between-sections` | 1200 | 1600 | 2000 |
146
+ | `mds-button` (size `md`), height | 675 | 900 | 1125 |
147
+ | `mds-input` (size `lg`), height | 1050 | 1200 | 1350 |
148
+ | Checkbox icon | 450 | 600 | 750 |
149
+ | Switch (size `md`), height x width | 600 x 1050 | 800 x 1400 | 1000 x 1750 |
150
+ | Badge padding, block / inline | 75 / 150 | 100 / 200 | 125 / 250 |
151
+ | Between a marker and its label | 150 | 200 | 250 |
152
+
153
+ The steps of `compact` and `comfortable` are not steps of the sizing scale (225, 450, 750):
154
+ that is expected, a space is measured in the unit of its density (`rhythm/ladder-only`).
155
+
156
+ Who chooses, and how:
157
+
158
+ | Layer | Who | How |
159
+ | --- | --- | --- |
160
+ | Theme | the product, for all of it | a named theme sets the three units in its block |
161
+ | Region | the product, for a part of the page | `data-density="compact"`, `"standard"` or `"comfortable"` on any element |
162
+ | Preference | the person, for themself | mds-pref-density, next to the other `mds-pref-*`, publishes `pref-density-<level>` on `html`; `auto` keeps the product's density |
163
+
164
+ ## Always true
165
+
166
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
167
+
168
+ These hold in every product: a product layer cannot change them.
169
+
170
+ | Id | Rule | Serves | Carried by | Checked by |
171
+ | --- | --- | --- | --- | --- |
172
+ | `scale` | A density shrinks or grows every relation of the rhythm by one factor, so the proportions stay those of the standard density and rhythm/step-ratio holds at every level: never one step down per relation, never a table of its own. | intuitive, flexible | the guide | review |
173
+ | `controls` | The controls (buttons, fields) follow the factor of the rhythm. A field is one line of text plus its padding, and only the padding follows: the text keeps its size. | intuitive, flexible | the guide | review |
174
+ | `markers` | The markers (a checkbox, a switch, a badge, the space between a marker and its label) follow the same factor, with no exception; a marker stays centred on the first line of its label at every level. | inclusive, intuitive | the guide | review |
175
+ | `unit` | The rhythm is measured in the container unit: each --magma-rhythm-<id> is that unit times its step (300 = 3 units). The unit is a literal, so a product that changes --spacing does not move the rhythm. Wherever a density applies, the rhythm tokens are declared again next to the units: a custom property resolves where it is declared. | flexible | the guide | review |
176
+ | `levels` | Three levels, with symmetric units: compact (3px), standard (4px, the default), comfortable (5px). No other level; the names are not sm, md and lg, which belong to the size of a component. | inclusive, flexible | the guide | review |
177
+ | `scope` | Three layers choose the density, in the order system < theme < person: the theme of the product for all of it, a region for a part of the page (data-density on any element), the person with mds-pref-density (pref-density-<level> on html). | inclusive, flexible | the guide | review |
178
+ | `region` | An explicit choice of the person wins over the regions: mds-pref-density takes auto (the default, the density of the product with its regions), compact, standard or comfortable, and a level the person chose applies everywhere, a compact region included. | inclusive | the guide | review |
179
+ | `dense-targets` | At compact a checkbox is 450, under the 600 of WCAG 2.5.8: it passes by the spacing exception while the centres of two neighbouring checkboxes stand at least 600 apart. A list or a table that selects its rows with bare checkboxes keeps its rows at least 600 high. | inclusive | the guide | review |
180
+
181
+ ## Open choices
182
+
183
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
184
+
185
+ The default decides these; a product layer may narrow them.
186
+
187
+ | Id | Default | A product may |
188
+ | --- | --- | --- |
189
+ | `product-density` | standard | set compact or comfortable for the whole product in its theme |
190
+ | `region-density` | the density of the product | mark a part of the page (a dense table, a side bar) with data-density |
191
+
192
+ ## Situations
193
+
194
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
195
+
196
+ Situations every application has, each with its case: they give the examples, the texts and the keywords. The situations of a product's own domain go in its layer.
197
+
198
+ | Situation | Case |
199
+ | --- | --- |
200
+ | A management application whose people work through long tables all day | `compact`: the theme of the product, or data-density on the table only |
201
+ | A form of a public service a citizen fills in once | `standard` |
202
+ | A person who points with difficulty chooses more room in the preferences | `comfortable`: it applies everywhere, the compact regions included (region) |
203
+
204
+ ## Accessibility
205
+
206
+ - `comfortable` exists for the people who point with difficulty: the default button reaches
207
+ 1100, the target of WCAG 2.5.5 (AAA), and the smallest targets of the screen grow with it.
208
+ - The choice of the person wins over the product (`region`): a compact table becomes
209
+ comfortable for whoever asked for room.
210
+ - At `compact` the checkbox is under the 600 of WCAG 2.5.8 and passes by its spacing
211
+ exception (`dense-targets`): in a compact form two checkboxes stand 1050 apart (a line of
212
+ label plus 450).
213
+
214
+ ## Magma gaps
215
+
216
+ - The units are not in Magma yet: --magma-unit-container, --magma-unit-control and
217
+ --magma-unit-marker, the rhythm tokens written as multiples of the container unit, the
218
+ levels on `:root`, `[data-density]` and `:root.pref-density-<level> [data-density]`, and
219
+ mds-pref-density (#691). Until they ship every product is `standard`, and a denser screen
220
+ is not written by hand: no private variable of a component, no other step of the rhythm.
221
+ - The components measure their own sizes in pixels or in steps of `--spacing`: the icon of the
222
+ checkbox, the knob and the padding of the switch, the padding of the badge, the padding of
223
+ the controls become multiples of their unit (#691).
224
+
225
+ ## Decisions
226
+
227
+ | Date | Decision | Why |
228
+ | --- | --- | --- |
229
+ | 2026-10-30 | A denser screen shrinks every relation of the rhythm by one factor, 3/4 for the compact density (`scale`). | The proportions stay identical, so the relations read the same at every density and `rhythm/step-ratio` holds with nothing to maintain; a further density is one more factor, not one more table, the mechanism #691 drafts for the components. Rejected: one step down for each relation (200, 300, 400, 600, 1000), whose proportions change from one relation to the next. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6518870918 |
230
+ | 2026-10-30 | The controls shrink by the same factor as the rhythm (`controls`). | The dense screen is the same screen in proportion, one number for the rhythm and the controls; the compact button (675) lands next to `size="sm"` (700) and stays above 600, the minimum target of WCAG 2.5.8. Rejected: 7/8 for the controls (two numbers for one density); the controls left as they are (the fields dominate and the density gains little). Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6518991256 |
231
+ | 2026-10-30 | The rhythm is measured in the container unit of #691; a density is one factor on every unit (`unit`). | The container unit is already the room a container leaves around its content, which is `rhythm/inset`; the groups of #691 are roles of the components, and the rhythm is not one. Rejected: a unit of its own for the rhythm, which would let a theme widen the cards without widening the spaces between the fields, a case nobody has. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6519103714 |
232
+ | 2026-10-30 | Three layers choose the density: the theme, the preference of the person (mds-pref-density), a region (`data-density`), in the order system < theme < person (`scope`). | Each layer reuses a mechanism Magma has (the named themes, `mds-pref-contrast`, `data-corner-shape`), and the units are inherited custom properties, so the components follow without being wired one by one. Rejected: the theme alone; theme and region with no preference; theme and preference with no region. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6519166303 |
233
+ | 2026-10-30 | Three levels with symmetric units: `compact` 3px, `standard` 4px, `comfortable` 5px (`levels`). | `comfortable` has a reason of its own, the default button at 1100, the target of WCAG 2.5.5; the names are those of the `density` of MUI DataGrid, not the `sm`/`md`/`lg` of the size of a component. Rejected: `comfortable` at 4.5px, whose button stays under the AAA target; two levels, where a preference could only tighten. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6519246975 |
234
+ | 2026-10-30 | An explicit choice of the person wins over the regions: mds-pref-density is `auto` by default, and a level the person chose applies to the regions too (`region`). | The precedence system < theme < person carried through: a region is a decision of the product, as the theme is. Who chose `comfortable` because pointing is hard gets it where the targets are densest. Rejected: the region wins inside itself, the choice of the person included. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6519287396 |
235
+ | 2026-10-30 | The markers follow the density like the rhythm and the controls (`markers`); at `compact` the checkbox passes WCAG 2.5.8 by its spacing exception, and a list that selects its rows with bare checkboxes keeps its rows at least 600 high (`dense-targets`). | One factor on every unit, with no exception: the switch stays lower than the button at every level, and at `comfortable` the smallest targets grow too, the reason that level exists. Rejected: the markers unchanged at every density, where the compact switch stands taller than the button and the density has two rules. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6519554134 |
236
+ | 2026-10-31 | The file of the domain, with the levels as its cases, each carried by the units of #691 once they ship, and the rest as always-true rules; `product-density` and `region-density` are the open choices of a product layer. | The format of #1196 and the issue of the five domains (#1197); #1189 names density as the first open choice of a product layer. |
@@ -0,0 +1,201 @@
1
+ ---
2
+ # A Magma pattern: the format and the commands are in docs/PATTERNS.md.
3
+ id: empty-state
4
+ kind: pattern
5
+ title: An empty part of the page
6
+ group: messages-and-states
7
+ layer: magma
8
+ status: decided
9
+ need: >-
10
+ The person reaches a part of the page with nothing in it, and must understand why and what
11
+ to do next.
12
+ principle: An empty part says why it is empty and what comes next, never in a warning tone.
13
+ keywords: [empty state, empty list, no results, nothing found, no items yet, not found, all done, zero data]
14
+ not-for:
15
+ - need: a part that could not be loaded
16
+ use: error-recovery
17
+ - need: a part that is still loading
18
+ use: loading
19
+ - need: what a role is not allowed to see
20
+ use: permissions
21
+ - need: where the outcome of an action is told
22
+ use: message-placement
23
+ assumptions:
24
+ - The application knows why the part is empty (nothing yet, nothing matches, all done, does not exist).
25
+ high-stakes: false
26
+ components: [mds-zero, mds-text, mds-button, mds-img]
27
+ related: [list-with-filters, record-detail, loading, error-recovery, item-list, app-shell]
28
+ validated-on: []
29
+
30
+ variables:
31
+ cause: { values: [first-use, filtered, cleared, gone], means: "first-use: nothing yet; filtered: nothing matches the search or the filters; cleared: all handled; gone: the thing asked for does not exist" }
32
+ can-add: { values: ["yes", "no"], means: "can this person add what is missing" }
33
+ room: { values: [panel, line], means: "is there room for a panel, or only for a line (a menu, a dropdown, a cell)" }
34
+
35
+ cases:
36
+ - { id: add-the-first, cause: first-use, can-add: "yes", room: panel, where: "a panel that says what is missing and what it is for, with the action that adds the first one; an illustration may welcome", use: ["mds-zero", "mds-button slot=action"] }
37
+ - { id: filled-by-others, cause: first-use, can-add: "no", room: panel, where: "a panel that says who or what fills the part, and when; no button", use: ["mds-zero"] }
38
+ - { id: clear-filters, cause: filtered, room: panel, where: "a panel that says nothing matches, with Clear filters only; the summary of the results says it too", use: ["mds-zero", "mds-button slot=action"] }
39
+ - { id: all-done, cause: cleared, room: panel, where: "a panel that says all is done and what will come here; no button", use: ["mds-zero"] }
40
+ - { id: not-found, cause: gone, room: panel, where: "the panel takes the place of the page: its title is the h1, its action leads to the list", use: ["mds-zero", "mds-button slot=action href"] }
41
+ - { id: one-line, cause: [first-use, filtered, cleared], room: line, where: "one line of text where the items would be; the control that opened it is the way out", use: ["mds-text"] }
42
+ gaps: []
43
+ not-applicable:
44
+ - { cause: gone, room: line, why: "a thing that does not exist is reached by its address: the whole page" }
45
+
46
+ always-true:
47
+ - id: says-what-next
48
+ rule: The panel says what to do next, or, when the person has nothing to do, who or what fills the part.
49
+ checked-by: review
50
+ - id: no-warning-tone
51
+ rule: Nothing inside the panel has a warning or error tone.
52
+ checked-by: review
53
+ lint-planned: magma/no-warning-in-zero
54
+ - id: not-an-error
55
+ rule: A part that failed to load is an error, never an empty state.
56
+ checked-by: review
57
+ - id: one-cause-one-action
58
+ rule: "The action answers the cause: Clear filters for a search, never Create."
59
+ checked-by: review
60
+ - id: illustration-on-first-use
61
+ rule: An illustration only on first use; never on a search, an all-done or a missing page, where the person is working.
62
+ checked-by: review
63
+
64
+ situations:
65
+ - { situation: A new account opens its list of projects, case: add-the-first }
66
+ - { situation: "A reader opens the documents of a case, which the office has not added yet", case: filled-by-others }
67
+ - { situation: A search on a list finds nothing, case: clear-filters }
68
+ - { situation: "An operator searches for a contact by name, finds none, and may create contacts", case: clear-filters, note: "Create stays in the header of the page" }
69
+ - { situation: "The list of tasks to do is empty: all done", case: all-done }
70
+ - { situation: An address leads to a request that was deleted, case: not-found }
71
+ - { situation: A combobox finds no option for the text typed, case: one-line }
72
+ ---
73
+
74
+ # An empty part of the page
75
+
76
+ **An empty part says why it is empty and what comes next, never in a warning tone.**
77
+
78
+ ## When to use it
79
+
80
+ A list, a section or a page with nothing to show, and the reason is known: nothing yet,
81
+ nothing matches, all handled, or the thing asked for does not exist. Not a part that failed to
82
+ load (`error-recovery`): no results is not an error. Not a part that is still loading
83
+ (`loading`). Not what a role may not see (`permissions`).
84
+
85
+ ## What decides it
86
+
87
+ Three questions: why the part is empty, whether this person can add what is missing, and
88
+ whether there is room for a panel or only for a line.
89
+
90
+ ## Cases
91
+
92
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
93
+
94
+ | Variable | Values | Means |
95
+ | --- | --- | --- |
96
+ | `cause` | `first-use`, `filtered`, `cleared`, `gone` | first-use: nothing yet; filtered: nothing matches the search or the filters; cleared: all handled; gone: the thing asked for does not exist |
97
+ | `can-add` | `yes`, `no` | can this person add what is missing |
98
+ | `room` | `panel`, `line` | is there room for a panel, or only for a line (a menu, a dropdown, a cell) |
99
+
100
+ A case that leaves a variable out holds for any of its values.
101
+
102
+ | Case | When | Where | Use |
103
+ | --- | --- | --- | --- |
104
+ | `add-the-first` | cause: first-use; can-add: yes; room: panel | a panel that says what is missing and what it is for, with the action that adds the first one; an illustration may welcome | `mds-zero`, `mds-button slot=action` |
105
+ | `filled-by-others` | cause: first-use; can-add: no; room: panel | a panel that says who or what fills the part, and when; no button | `mds-zero` |
106
+ | `clear-filters` | cause: filtered; room: panel | a panel that says nothing matches, with Clear filters only; the summary of the results says it too | `mds-zero`, `mds-button slot=action` |
107
+ | `all-done` | cause: cleared; room: panel | a panel that says all is done and what will come here; no button | `mds-zero` |
108
+ | `not-found` | cause: gone; room: panel | the panel takes the place of the page: its title is the h1, its action leads to the list | `mds-zero`, `mds-button slot=action href` |
109
+ | `one-line` | cause: first-use or filtered or cleared; room: line | one line of text where the items would be; the control that opened it is the way out | `mds-text` |
110
+
111
+ Not applicable:
112
+
113
+ | When | Why |
114
+ | --- | --- |
115
+ | cause: gone; room: line | a thing that does not exist is reached by its address: the whole page |
116
+
117
+ No gaps: every combination has a case or is not applicable.
118
+
119
+ ## Parts
120
+
121
+ The panel, `mds-zero`:
122
+
123
+ - the default slot: an illustration, only in `add-the-first` and optional; Magma has none to
124
+ give, the product brings its own;
125
+ - `slot="content"`: a title that says what is missing ("No requests match"), with the heading
126
+ level of its place (`h1` when it takes the place of the page), then one sentence with why and
127
+ what comes next;
128
+ - `slot="action"`: one `mds-button`, when the person has something to do; none in
129
+ `filled-by-others` and `all-done`.
130
+
131
+ The line: one `mds-text` in the place of the items, in the muted foreground.
132
+
133
+ ## Behaviour over time
134
+
135
+ - While a new search loads, the results that were there stay: the empty state does not flash
136
+ (`loading`).
137
+ - After Clear filters, the panel is gone with its button: the focus goes to the title of the
138
+ list, as after any action whose control is gone (`record-detail`, `confirm-action`).
139
+
140
+ ## Always true
141
+
142
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
143
+
144
+ These hold in every product: a product layer cannot change them.
145
+
146
+ | Id | Rule | Checked by |
147
+ | --- | --- | --- |
148
+ | `says-what-next` | The panel says what to do next, or, when the person has nothing to do, who or what fills the part. | review |
149
+ | `no-warning-tone` | Nothing inside the panel has a warning or error tone. | review; lint `magma/no-warning-in-zero` to write |
150
+ | `not-an-error` | A part that failed to load is an error, never an empty state. | review |
151
+ | `one-cause-one-action` | The action answers the cause: Clear filters for a search, never Create. | review |
152
+ | `illustration-on-first-use` | An illustration only on first use; never on a search, an all-done or a missing page, where the person is working. | review |
153
+
154
+ ## Situations
155
+
156
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
157
+
158
+ Situations every application has, each with its case: they give the examples, the texts and the keywords. The situations of a product's own domain go in its layer.
159
+
160
+ | Situation | Case |
161
+ | --- | --- |
162
+ | A new account opens its list of projects | `add-the-first` |
163
+ | A reader opens the documents of a case, which the office has not added yet | `filled-by-others` |
164
+ | A search on a list finds nothing | `clear-filters` |
165
+ | An operator searches for a contact by name, finds none, and may create contacts | `clear-filters`: Create stays in the header of the page |
166
+ | The list of tasks to do is empty: all done | `all-done` |
167
+ | An address leads to a request that was deleted | `not-found` |
168
+ | A combobox finds no option for the text typed | `one-line` |
169
+
170
+ ## Accessibility
171
+
172
+ - The summary of the results is a status region: when a search finds nothing, screen readers
173
+ read out "No requests match" while the focus stays on the field (`list-with-filters`).
174
+ - An illustration is decorative: its alternative text is empty, the message is in the text.
175
+
176
+ ## Content
177
+
178
+ - What is missing, then why, then what comes next: "No requests match. Try other words, or
179
+ clear the filters."
180
+ - When the person has nothing to do, who fills the part and when: "No documents yet. The
181
+ office adds them when it takes up the case."
182
+ - No blame: "No requests match the filters", not "You found nothing".
183
+
184
+ ## Magma gaps
185
+
186
+ - `mds-zero`, example "Illustration Only (No Action)": its text is "Nessun risultato", a
187
+ search, which has Clear filters and no illustration; to rewrite as `filled-by-others`.
188
+ - `mds-zero`, example "Full Empty-State Panel": the text mixes "edit the filters" and
189
+ "create", the action is only Create; to rewrite as `add-the-first`.
190
+ - No illustration for empty states in `identity` (only a logo set of Maggioli Editore): the
191
+ product brings its own.
192
+
193
+ ## Decisions
194
+
195
+ | Date | Decision | Why |
196
+ | --- | --- | --- |
197
+ | 2026-10-16 | Proposed: `mds-zero` with a way out, never a warning tone | Open decision of the docs site, `agents/patterns.md`. |
198
+ | 2026-10-28 | Draft with variables; the part this person cannot fill, the all-done and the search where the person may create left as gaps | The sources do not settle them. |
199
+ | 2026-10-28 | "Always a way out" becomes `says-what-next`: an action when there is something to do, otherwise who or what fills the part (`filled-by-others`, `all-done`) | A button with nothing to do sends the person away from where they are. |
200
+ | 2026-10-28 | A search with no results offers Clear filters only, even when the person may create | One action that answers the cause; Create stays in the header of the page. |
201
+ | 2026-10-28 | An illustration only on first use, optional | It welcomes; where the person is working, the space belongs to the data (Illustration guide of the docs site). |