@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,212 @@
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: surfaces
6
+ kind: foundation
7
+ title: Surfaces
8
+ layer: magma
9
+ status: decided
10
+ need: >-
11
+ Give a boundary only to what space cannot separate, so that a surface on the screen means
12
+ something: an item of a set, a thing that stays put, a dialog.
13
+ principle: >-
14
+ The interface is neutral: the page is one canvas, its sections are bare, and a surface rises
15
+ only for an item of a set, for what stays put, and for the window of a dialog.
16
+ keywords: [surface, card, band, sheet, background, elevation, container, sticky, panel, fill, well, canvas]
17
+ assumptions:
18
+ - "The surface roles of the palette (surface-default, -raised, -overlay, -muted, -sunken) flip with the mode by themselves."
19
+ components: [mds-card, mds-header, mds-header-bar, mds-status-bar, mds-modal, mds-banner, mds-button]
20
+ related: [rhythm, titles, widths, actions]
21
+ validated-on: []
22
+
23
+ variables:
24
+ content:
25
+ values: [page, section, item, fixed, edit-actions, dialog]
26
+ means: "What stands on the screen: the page itself; a group of content of one subject (the data of a record, a part of a form, the header of the page); an item of a set of alike things (a related record, a result, a person); something that stays put while the page scrolls (the bar of the application); the row of actions of a form that is the page; the window of a dialog."
27
+
28
+ cases:
29
+ - id: canvas
30
+ content: page
31
+ where: "`surface-default`, which the base styles already give the body; the content stands on it with no sheet: only the items of a set, what stays put and the window of a dialog rise from it"
32
+ serves: intuitive
33
+ carried-by: [--magma-surface-default]
34
+ - id: section
35
+ content: section
36
+ where: "bare: no surface, no border, no inset of its own; its title (`titles/section`) and `gap-between-sections` (1600) set it apart. The header of the page is the first section, in the flow, and scrolls away with the content"
37
+ serves: intuitive
38
+ carried-by: [gap-between-sections]
39
+ - id: card
40
+ content: item
41
+ where: "a card, whose boundary tells where one item ends and the next begins: `p-inset` (600) inside, `gap-between-containers` (400) between the cards, its title `titles/part`"
42
+ use: ["mds-card"]
43
+ serves: intuitive
44
+ carried-by: [mds-card, gap-between-containers]
45
+ - id: band
46
+ content: fixed
47
+ where: "a band, a strip of surface as wide as the page, drawn by the component that stays put, which keeps its room: the bar of the application (mds-header-bar in mds-header, `surface-raised`, `shadow-md-sharp`, in the flow at the top and sticky, so the page starts under it), the actions of an edit (mds-status-bar, `surface-overlay`, `shadow-md`, its room kept at the end of the page); never the header of the page (`section`) made sticky"
48
+ use: ["mds-header", "mds-header-bar", "mds-status-bar"]
49
+ serves: intuitive
50
+ carried-by: [mds-header, mds-header-bar, mds-status-bar]
51
+ - id: edit-actions
52
+ content: edit-actions
53
+ where: "an mds-status-bar docked at the bottom of the window for the whole edit, in the order of `actions/order` (Annulla, then Salva last); the form has no row at its end. A form inside a page, a dialog or a card keeps its row at its end (`actions/place`)"
54
+ use: ["mds-status-bar", "mds-button variant=dark tone=outline", "mds-button variant=primary tone=strong"]
55
+ serves: enabling
56
+ carried-by: [mds-status-bar]
57
+ - id: dialog
58
+ content: dialog
59
+ where: "the window is `mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible` for a form, a choice and a confirmation; only a dialog that announces a state the person did not ask for, with a decision (the deadline of the application), takes the variant of that state, `box`. The window never changes variant when a state arrives, and no dialog is opened to announce a state that has happened (`message-placement`)"
60
+ use: ["mds-modal", "mds-banner slot=window variant=light tone=box dismissible", "mds-banner slot=window variant=warning tone=box dismissible"]
61
+ serves: [inclusive, intuitive]
62
+ carried-by: [mds-banner slot=window variant=light tone=box]
63
+
64
+ gaps: []
65
+ not-applicable: []
66
+
67
+ always-true:
68
+ - id: tints-in-components
69
+ rule: "surface-muted and surface-sunken live inside components only (zebra rows, wells, tracks, code), never as the background of a section of a page."
70
+ serves: intuitive
71
+ checked-by: review
72
+
73
+ open-choices: []
74
+
75
+ situations:
76
+ - { situation: "The page behind a list of requests", case: canvas }
77
+ - { situation: "The data of a record: its identity, its addresses, its history", case: section }
78
+ - { situation: "The header of a page under the bar of the application", case: section, note: "in the flow, with no surface: it scrolls away with the content" }
79
+ - { situation: "The records related to a request, one card each", case: card }
80
+ - { situation: "The bar of the application, with the logo and the navigation", case: band }
81
+ - { situation: "The edit of a record, a form about four windows long", case: edit-actions }
82
+ - { situation: "The dialog New contact, a form", case: dialog }
83
+ - { situation: "The confirmation of a deletion", case: dialog, note: "the light window too: the red stands on Elimina only (actions/confirm)" }
84
+ - { situation: "The warning that the session is about to end", case: dialog, note: "a warning window, its row follows actions/banner" }
85
+ ---
86
+
87
+ # Surfaces
88
+
89
+ **The interface is neutral: the page is one canvas, its sections are bare, and a surface rises only for an item of a set, for what stays put, and for the window of a dialog.**
90
+
91
+ ## When to use it
92
+
93
+ Every time something on the screen could get a fill, a border or a shadow of its own: a group
94
+ of data, a list of results, the head of the page, a row of actions, a dialog. The domain says
95
+ when a boundary is earned; the components draw it.
96
+
97
+ Not here: the colours of the surfaces and their flip with the mode (the palette and
98
+ `docs/agents/color.md`), and the surfaces inside a component (a zebra row, the track of a
99
+ switch), which the component draws.
100
+
101
+ ## What decides it
102
+
103
+ One question: what is it? The page itself; a group of content of one subject; an item of a set
104
+ of alike things, which needs a boundary to tell where it ends; something that stays put while
105
+ the page scrolls, which needs a surface to stand above it; the row of actions of a form that is
106
+ the whole page; the window of a dialog. The rest is space and titles.
107
+
108
+ ## Cases
109
+
110
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
111
+
112
+ | Variable | Values | Means |
113
+ | --- | --- | --- |
114
+ | `content` | `page`, `section`, `item`, `fixed`, `edit-actions`, `dialog` | What stands on the screen: the page itself; a group of content of one subject (the data of a record, a part of a form, the header of the page); an item of a set of alike things (a related record, a result, a person); something that stays put while the page scrolls (the bar of the application); the row of actions of a form that is the page; the window of a dialog. |
115
+
116
+ A case that leaves a variable out holds for any of its values.
117
+
118
+ | Case | When | Where | Use | Serves | Carried by |
119
+ | --- | --- | --- | --- | --- | --- |
120
+ | `canvas` | content: page | `surface-default`, which the base styles already give the body; the content stands on it with no sheet: only the items of a set, what stays put and the window of a dialog rise from it | | intuitive | `--magma-surface-default` |
121
+ | `section` | content: section | bare: no surface, no border, no inset of its own; its title (`titles/section`) and `gap-between-sections` (1600) set it apart. The header of the page is the first section, in the flow, and scrolls away with the content | | intuitive | `gap-between-sections` |
122
+ | `card` | content: item | a card, whose boundary tells where one item ends and the next begins: `p-inset` (600) inside, `gap-between-containers` (400) between the cards, its title `titles/part` | `mds-card` | intuitive | `mds-card`, `gap-between-containers` |
123
+ | `band` | content: fixed | a band, a strip of surface as wide as the page, drawn by the component that stays put, which keeps its room: the bar of the application (mds-header-bar in mds-header, `surface-raised`, `shadow-md-sharp`, in the flow at the top and sticky, so the page starts under it), the actions of an edit (mds-status-bar, `surface-overlay`, `shadow-md`, its room kept at the end of the page); never the header of the page (`section`) made sticky | `mds-header`, `mds-header-bar`, `mds-status-bar` | intuitive | `mds-header`, `mds-header-bar`, `mds-status-bar` |
124
+ | `edit-actions` | content: edit-actions | an mds-status-bar docked at the bottom of the window for the whole edit, in the order of `actions/order` (Annulla, then Salva last); the form has no row at its end. A form inside a page, a dialog or a card keeps its row at its end (`actions/place`) | `mds-status-bar`, `mds-button variant=dark tone=outline`, `mds-button variant=primary tone=strong` | enabling | `mds-status-bar` |
125
+ | `dialog` | content: dialog | the window is `mds-banner slot="window" variant="light" tone="box" dismissible` for a form, a choice and a confirmation; only a dialog that announces a state the person did not ask for, with a decision (the deadline of the application), takes the variant of that state, `box`. The window never changes variant when a state arrives, and no dialog is opened to announce a state that has happened (`message-placement`) | `mds-modal`, `mds-banner slot=window variant=light tone=box dismissible`, `mds-banner slot=window variant=warning tone=box dismissible` | inclusive, intuitive | `mds-banner slot=window variant=light tone=box` |
126
+
127
+ No gaps: every combination has a case or is not applicable.
128
+
129
+ ## Parts
130
+
131
+ The window of a dialog, by what the dialog does:
132
+
133
+ | Dialog | Window | Row |
134
+ | --- | --- | --- |
135
+ | A form, a choice | `variant="light" tone="box"` | the main action `primary strong`, Annulla `dark outline` |
136
+ | A confirmation | `variant="light" tone="box"` | Elimina `error strong`, Annulla `dark outline`, the focus on Annulla (`actions/confirm`) |
137
+ | A state the person did not ask for, with a decision: the deadline of the application | the variant of the state, `tone="box"` | `actions/banner`: the main action `strong`, the secondary `outline`, in that variant |
138
+ | Its action fails | unchanged | the error right above the row (`actions/failed`) |
139
+ | A state that has happened | no dialog (`message-placement`) | |
140
+
141
+ What stays put, and the surface its component draws:
142
+
143
+ | Component | Surface | Where |
144
+ | --- | --- | --- |
145
+ | `mds-header-bar` (in `mds-header`) | `surface-raised`, `shadow-md-sharp` | a band across the top of the page, in the flow and sticky: the page starts under it |
146
+ | `mds-status-bar` | `surface-overlay`, `shadow-md` | docked to the bottom edge, for the actions of an edit |
147
+ | the window of a dialog | the case `dialog` | over the page, which is inert |
148
+
149
+ ## Always true
150
+
151
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
152
+
153
+ These hold in every product: a product layer cannot change them.
154
+
155
+ | Id | Rule | Serves | Carried by | Checked by |
156
+ | --- | --- | --- | --- | --- |
157
+ | `tints-in-components` | surface-muted and surface-sunken live inside components only (zebra rows, wells, tracks, code), never as the background of a section of a page. | intuitive | the guide | review |
158
+
159
+ ## Situations
160
+
161
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
162
+
163
+ 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.
164
+
165
+ | Situation | Case |
166
+ | --- | --- |
167
+ | The page behind a list of requests | `canvas` |
168
+ | The data of a record: its identity, its addresses, its history | `section` |
169
+ | The header of a page under the bar of the application | `section`: in the flow, with no surface: it scrolls away with the content |
170
+ | The records related to a request, one card each | `card` |
171
+ | The bar of the application, with the logo and the navigation | `band` |
172
+ | The edit of a record, a form about four windows long | `edit-actions` |
173
+ | The dialog New contact, a form | `dialog` |
174
+ | The confirmation of a deletion | `dialog`: the light window too: the red stands on Elimina only (actions/confirm) |
175
+ | The warning that the session is about to end | `dialog`: a warning window, its row follows actions/banner |
176
+
177
+ ## Accessibility
178
+
179
+ - A `light` window is `role="presentation"` with no live region, so an ordinary dialog does
180
+ not read itself out; a `warning` window is `role="alert"`, and a screen reader reads its
181
+ message as well as the name of the dialog. An `error` window would interrupt the screen
182
+ reader for a question nothing has gone wrong yet in, which is why a confirmation stays
183
+ `light`.
184
+ - A bar that stays put must never hide the field that has the focus (WCAG 2.4.11, Focus Not
185
+ Obscured): the page reserves the room of the bar docked at the bottom while it is visible
186
+ (#1203), and stops a field reached with Shift+Tab under the bar at the top
187
+ (`scroll-padding-top`), rules of the styles of Magma with no script.
188
+
189
+ ## Magma gaps
190
+
191
+ - `mds-card` pads each of its regions with `p-400`: it moves to one `p-inset` shared by its
192
+ regions (#1201, `rhythm/shared-inset`).
193
+ - The example "Custom Window via `window` Slot" of `mds-modal` takes the default variant of
194
+ the banner, `primary` with `tone="box"`, and Annulla `primary text`: it takes the window of
195
+ the case `dialog` (#1189, the examples of the components aligned).
196
+
197
+ ## Decisions
198
+
199
+ | Date | Decision | Why |
200
+ | --- | --- | --- |
201
+ | 2026-10-30 | The window of a dialog that announces no state is `mds-banner slot="window" variant="light" tone="box" dismissible` (`dialog`). | The interface is neutral and the accent is the colour of the actions: with `light` the title and the X take the colour of the text; a `light` banner has no live region. Rejected: `primary` `box`, the example of the guide of `mds-modal`, the title and the X in the accent and the whole dialog a live region. Chosen live (Actions, decision 11). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6524036553 |
202
+ | 2026-10-30 | The confirmation of a deletion is an ordinary dialog: the `light` window, Elimina `error strong` (`dialog`). | A confirmation asks a question, nothing has happened yet: the red stands on the action with the consequence, the form of Carbon and Primer. Rejected: an `error` window, which says something went wrong, interrupts the screen reader (`role="alert"`) and turns Annulla red. Chosen live (Actions, decision 12). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6524149839 |
203
+ | 2026-10-30 | The window never changes variant when a state arrives, and no dialog is opened to announce a state that has happened (`dialog`). | `message-placement` gives a dialog only to a decision and to a deadline of the application: the error of an action stays inside its dialog, a result goes to a toast once it closes (Actions, decision 14). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6524836581 |
204
+ | 2026-10-30 | The dialog that warns that the session is about to end has a `warning` window, its row in `actions/banner` (`dialog`). | It announces a state of the application the person did not ask for, a problem, and its actions address it. Rejected: the `light` window, where a warning nobody asked for looks like any form. Chosen live (Actions, decision 15). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6525103424 |
205
+ | 2026-10-30 | The groups of content of one subject are bare sections; a card is an item of a set of alike things (`section`, `card`). | The interface is neutral, and a boundary is for what space cannot separate; it is the form of `record-detail`, and the card keeps a meaning, a thing that opens. Rejected: every group in a card, where the boundaries multiply and the title of a group falls to the style of a part. Chosen live on the page of a record. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6527700522 |
206
+ | 2026-10-30 | A band exists only where something stays put while the page scrolls, and a component draws it; the header of the page stays in the flow (`band`). | The surface follows from staying put, and the header does not stay: its actions concern the whole set and are taken before scrolling. Measured: the bar alone covers 51 px of a 520 px window, the bar with a page band 189 px, nearly half on a phone. Rejected: the header of the page as a fixed band. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6527997628 |
207
+ | 2026-10-30 | When a form is the page, its row is an `mds-status-bar` docked at the bottom for the whole edit; a form inside a page, a dialog or a card keeps its row at its end (`edit-actions`). | Whoever corrects one field saves without scrolling, the edit bar of SAP Fiori and Salesforce, and the bar draws its own surface. Rejected: the row at the end of every form, where a correction costs a scroll of four windows. Chosen live; the recommendation changed on the render. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6530822583 |
208
+ | 2026-10-30 | The page is `surface-default` with no sheet (`canvas`); `surface-muted` and `surface-sunken` live inside components only (`tints-in-components`). | A sheet around one subject is a card around one subject, and the cards of a set would stand on their own fill (both `surface-raised`); a tinted section reads as a well, in dark as a hole. Shown live next to the alternatives and confirmed. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6531557197 |
209
+ | 2026-10-31 | The file of the domain, with the window of a dialog as one case whose Parts give the table; "a subtle section" goes from `docs/agents/color.md` and `theming.md`. | The issue of the five domains (#1197). |
210
+ | 2026-11-02 | A field stands a step off its surface: inside a surface that paints `overlay` (the window of a dialog, `mds-banner`, `mds-status-bar`, `mds-dropdown`, `mds-table`) it paints `surface-default`, passed down as `--magma-field-fill` (#1193). | The fill of a field sets it apart from where it stands, the layers of Carbon; the window keeps `overlay`, the meaning of the ladder in `theming.md`, and stands off the dimmed page in dark. Rejected: the window down a step, and the field as an outline only. Review round 1 of #1189. |
211
+ | 2026-11-02 | While an `mds-status-bar` is visible, the styles reserve its room: a box after the body and `scroll-padding-bottom`, the tallest bar for its content plus `rhythm/between-fields`, counted with `:has()` (#1203). | CSS only, no script that measures (the rule of layout); the content of the bar has limits (one line of description, at most three actions), so its tallest is known. A box, not a padding of `html`, which a reset out of any layer would zero. Rejected: a class the page writes, which a page forgets. Review round 1 of #1189. |
212
+ | 2026-11-02 | The bar of the application stands in the flow: `mds-header` is sticky at the top, the page starts under its bar, and the styles stop a field reached with Shift+Tab under it (`scroll-padding-top`, `band`). The room is the bar alone: the floating bar stands its margin lower, and the box of the header lets the clicks through. | The bar was fixed and nothing reserved its room: the title of a page stood 13 px under it instead of `gap-between-sections`, and a field could end under it. Sticky takes the room by itself, with no number to keep in step with its height; a room that followed the appearance would move the page when `appearance-set` changes it on scroll. Rejected: the bar fixed with a padding of the page from the styles, as at the bottom (#1203), a number to keep in step. A page that kept the room by hand gets it twice. Review round 1 of #1189. |
@@ -0,0 +1,208 @@
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: titles
6
+ kind: foundation
7
+ title: Titles
8
+ layer: magma
9
+ status: decided
10
+ need: >-
11
+ Tell at a glance what a title names, the whole page, a section of it, a dialog, a part or a
12
+ group of fields, and keep the outline of the page true for whoever navigates it by headings.
13
+ principle: >-
14
+ A title takes the style of its role, and its tag from the outline of the page: the two never
15
+ follow each other.
16
+ keywords: [title, heading, headline, h1, outline, typography, page title, section title, card title, legend, fieldset]
17
+ assumptions:
18
+ - "A page of an application: a page to read (an article, a commentary) is a case of its own, not looked at."
19
+ - "The sizes are those of the default theme: a theme moves a role through its tokens, and the markup stays as it is."
20
+ components: [mds-text, mds-modal, mds-banner, mds-accordion-item, mds-push-notification-item, mds-file]
21
+ related: [rhythm, surfaces, page-header]
22
+ validated-on: []
23
+
24
+ variables:
25
+ role:
26
+ values: [page, section, dialog, part, group]
27
+ means: "What the title names: the whole page, a section of the page, a dialog, a part (a card, a panel, an item of an accordion, a container a component draws), a group of fields of a form."
28
+
29
+ cases:
30
+ - id: page
31
+ role: page
32
+ where: "the style `h3` (30px), the tag `h1`"
33
+ use: ["mds-text typography=page tag=h1"]
34
+ serves: intuitive
35
+ carried-by: [text-title-page, --text-size-title-page, mds-text typography=page]
36
+ - id: section
37
+ role: section
38
+ where: "the style `h5` (20px), the tag of its place in the outline (`h2` under the page)"
39
+ use: ["mds-text typography=section tag=h2"]
40
+ serves: intuitive
41
+ carried-by: [text-title-section, --text-size-title-section, mds-text typography=section]
42
+ - id: dialog
43
+ role: dialog
44
+ where: "the style `h5`, the headline of the window; the dialog takes its name from aria-label on mds-modal, since the headline is hidden from screen readers. mds-banner draws its headline in h6 today (#1192)"
45
+ use: ["mds-modal aria-label", "mds-banner slot=window headline"]
46
+ serves: intuitive
47
+ carried-by: [text-title-dialog, --text-size-title-dialog, mds-text typography=dialog]
48
+ - id: part
49
+ role: part
50
+ where: "the style `h6` (16px, weight 700), the tag of its place (`h2` under the page, `h3` in a section); the components that draw a part give it already (the headline of mds-banner, mds-push-notification-item, mds-file); an item of an accordion is a part, `h6` by default"
51
+ use: ["mds-text typography=part", "mds-accordion-item"]
52
+ serves: intuitive
53
+ carried-by: [mds-banner, mds-push-notification-item, mds-file, text-title-part, --text-size-title-part, mds-text typography=part]
54
+ - id: group
55
+ role: group
56
+ where: "a `fieldset` with no border and no inset of its own, its title the `legend` in the style `h6`: not a heading of the page; `field-group` on the fieldset draws it, the legend `gap-title-content` (300) from its first field"
57
+ serves: [inclusive, intuitive]
58
+ carried-by: [field-group, text-title-group, --text-size-title-group]
59
+
60
+ gaps: []
61
+ not-applicable: []
62
+
63
+ always-true:
64
+ - id: one-h1
65
+ rule: The title of the page is its h1, and the only one.
66
+ serves: inclusive
67
+ checked-by: review
68
+ - id: tag-is-structure
69
+ rule: "The tag follows the outline of the page and never skips a level; the style follows the role of the title. With mds-text the tag is written whenever the style is not the level (typography=\"h3\" tag=\"h1\"): left out, the tag follows the style."
70
+ serves: inclusive
71
+ checked-by: review
72
+ - id: by-role
73
+ rule: "A title takes the style of its role, never a level chosen by eye or to get a smaller size: page h3, section and dialog h5, part and group h6 at the default theme; the styles h1, h2 and h4 have no role in a page of an application."
74
+ serves: [intuitive, flexible]
75
+ checked-by: review
76
+
77
+ open-choices: []
78
+
79
+ situations:
80
+ - { situation: "The title of a list of requests", case: page }
81
+ - { situation: "The sections Data, Documents and History of the page of a record", case: section }
82
+ - { situation: "The title of the dialog New contact", case: dialog }
83
+ - { situation: "The title of a card of a related record", case: part }
84
+ - { situation: "The questions of an accordion under a section Frequent questions", case: part, note: "the section is h5, its items h6: the section stands above them" }
85
+ - { situation: "Residence, a group of fields of the form of a change of residence", case: group }
86
+ ---
87
+
88
+ # Titles
89
+
90
+ **A title takes the style of its role, and its tag from the outline of the page: the two never follow each other.**
91
+
92
+ ## When to use it
93
+
94
+ Every time a title names something in a page of an application: the page itself, a section of
95
+ it, a dialog, a card or a panel, an item of an accordion, a group of fields. The role picks the
96
+ style; the place in the outline picks the tag.
97
+
98
+ Not here: the text that is not a title (`detail`, `caption`, `label`, the domain of the
99
+ components and of typography), and a page to read, an article or a commentary, which has a
100
+ ladder of its own not looked at yet.
101
+
102
+ ## What decides it
103
+
104
+ One question: what does the title name? The whole page; a section of the page; a dialog, which
105
+ is the context of the person while it is open; a part, a thing with a boundary of its own; a
106
+ group of fields of a form. The tag is a second, separate question: the level of the title in the
107
+ outline of the page, never skipped.
108
+
109
+ ## Cases
110
+
111
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
112
+
113
+ | Variable | Values | Means |
114
+ | --- | --- | --- |
115
+ | `role` | `page`, `section`, `dialog`, `part`, `group` | What the title names: the whole page, a section of the page, a dialog, a part (a card, a panel, an item of an accordion, a container a component draws), a group of fields of a form. |
116
+
117
+ A case that leaves a variable out holds for any of its values.
118
+
119
+ | Case | When | Where | Use | Serves | Carried by |
120
+ | --- | --- | --- | --- | --- | --- |
121
+ | `page` | role: page | the style `h3` (30px), the tag `h1` | `mds-text typography=page tag=h1` | intuitive | `text-title-page`, `--text-size-title-page`, `mds-text typography=page` |
122
+ | `section` | role: section | the style `h5` (20px), the tag of its place in the outline (`h2` under the page) | `mds-text typography=section tag=h2` | intuitive | `text-title-section`, `--text-size-title-section`, `mds-text typography=section` |
123
+ | `dialog` | role: dialog | the style `h5`, the headline of the window; the dialog takes its name from aria-label on mds-modal, since the headline is hidden from screen readers. mds-banner draws its headline in h6 today (#1192) | `mds-modal aria-label`, `mds-banner slot=window headline` | intuitive | `text-title-dialog`, `--text-size-title-dialog`, `mds-text typography=dialog` |
124
+ | `part` | role: part | the style `h6` (16px, weight 700), the tag of its place (`h2` under the page, `h3` in a section); the components that draw a part give it already (the headline of mds-banner, mds-push-notification-item, mds-file); an item of an accordion is a part, `h6` by default | `mds-text typography=part`, `mds-accordion-item` | intuitive | `mds-banner`, `mds-push-notification-item`, `mds-file`, `text-title-part`, `--text-size-title-part`, `mds-text typography=part` |
125
+ | `group` | role: group | a `fieldset` with no border and no inset of its own, its title the `legend` in the style `h6`: not a heading of the page; `field-group` on the fieldset draws it, the legend `gap-title-content` (300) from its first field | | inclusive, intuitive | `field-group`, `text-title-group`, `--text-size-title-group` |
126
+
127
+ No gaps: every combination has a case or is not applicable.
128
+
129
+ ## Parts
130
+
131
+ The ladder at the default theme, and how to write each role:
132
+
133
+ | Role | Style | Tag | `mds-text` | Without components |
134
+ | --- | --- | --- | --- | --- |
135
+ | `page` | `h3` (30px) | `h1` | `typography="page" tag="h1"` | `text-title-page` |
136
+ | `section` | `h5` (20px) | `h2` | `typography="section" tag="h2"` | `text-title-section` |
137
+ | `dialog` | `h5` | the headline of the window | drawn by `mds-banner` (`h6` until #1192) | `text-title-dialog` |
138
+ | `part` | `h6` (16px, weight 700) | the level of its place | `typography="part"` with the tag of its place | `text-title-part` |
139
+ | `group` | `h6` | `legend` | `field-group` on the `fieldset` | `text-title-group` |
140
+
141
+ The three levels read apart, 30, 20 and 16px, 1.5 and 1.25 times the level below. A theme moves
142
+ a role through its token (`--text-size-title-<role>` and its modifiers), not through the
143
+ markup; a theme that applies to a part of the page declares the role tokens again there.
144
+
145
+ ## Always true
146
+
147
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
148
+
149
+ These hold in every product: a product layer cannot change them.
150
+
151
+ | Id | Rule | Serves | Carried by | Checked by |
152
+ | --- | --- | --- | --- | --- |
153
+ | `one-h1` | The title of the page is its h1, and the only one. | inclusive | the guide | review |
154
+ | `tag-is-structure` | The tag follows the outline of the page and never skips a level; the style follows the role of the title. With mds-text the tag is written whenever the style is not the level (typography="h3" tag="h1"): left out, the tag follows the style. | inclusive | the guide | review |
155
+ | `by-role` | A title takes the style of its role, never a level chosen by eye or to get a smaller size: page h3, section and dialog h5, part and group h6 at the default theme; the styles h1, h2 and h4 have no role in a page of an application. | intuitive, flexible | the guide | review |
156
+
157
+ ## Situations
158
+
159
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
160
+
161
+ 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.
162
+
163
+ | Situation | Case |
164
+ | --- | --- |
165
+ | The title of a list of requests | `page` |
166
+ | The sections Data, Documents and History of the page of a record | `section` |
167
+ | The title of the dialog New contact | `dialog` |
168
+ | The title of a card of a related record | `part` |
169
+ | The questions of an accordion under a section Frequent questions | `part`: the section is h5, its items h6: the section stands above them |
170
+ | Residence, a group of fields of the form of a change of residence | `group` |
171
+
172
+ ## Accessibility
173
+
174
+ - The `h1` is the title of the page and the only one (`one-h1`); the headings never skip a
175
+ level (`tag-is-structure`), so the outline a screen reader lists is the structure of the page.
176
+ - A group of fields is a `fieldset` with its `legend`: tabbing into one of its fields, a screen
177
+ reader says the group before the field ("Residence, group. Town, edit"), and two fields
178
+ with the same label in two groups read apart. A heading inside the `legend` would add the
179
+ groups to the outline of the page; a heading with no `fieldset` drops the group.
180
+ - The headline of the window of a dialog is hidden from screen readers: the dialog takes its
181
+ name from `aria-label` on `mds-modal`.
182
+ - The title of an item of an accordion sits inside the button that opens it, so it is not a
183
+ heading of the page: its `typography` is a style only.
184
+
185
+ ## Magma gaps
186
+
187
+ - `mds-banner` draws its headline in `h6`, always: the window of a dialog needs `h5`, a choice
188
+ of the style of the headline (#1192).
189
+ - The examples of `mds-card-header` give 13 titles `h5` with no `tag`, so a card renders an
190
+ `<h5>` and skips the levels in between; `mds-note` does the same in 4 of its 7: they take
191
+ `h6` with the tag of their place (#1189, the examples of the components aligned).
192
+ - The items of `mds-accordion` are not in the headings of the page; the Accordion pattern of
193
+ the WAI-ARIA Authoring Practices wraps each button in a heading with its level. Whether they
194
+ should be, with a tag of their own apart from the style, is a question of the component.
195
+ - The Typography page of the docs site says the style `h1` is the title of the page: it moves
196
+ to this ladder with the pull request of the docs site that reads the domains, before this
197
+ domain is released (#1197).
198
+
199
+ ## Decisions
200
+
201
+ | Date | Decision | Why |
202
+ | --- | --- | --- |
203
+ | 2026-10-30 | In a page of an application the title of the page is `h3`, a section `h5`, a part `h6`, whatever their tag (`page`, `section`, `part`); the rules of the Foundation they stand on get their ids, `one-h1` and `tag-is-structure`. | `h6` is the style the components that draw a part give their title, so every part has one style; the page takes `h3` as the block `page-header` has it; 30, 20 and 16px read apart, the ladder of the productive applications of Carbon and Primer. Rejected: the Foundation literally (`h1` 48px, `h2`, `h4`), where the head of the page takes the room of the content and a part has two styles; one step per level (`h3`, `h4`, `h5`), where a section and a card read almost alike. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6525993908 |
204
+ | 2026-10-30 | The title of a dialog is `h5`, the style of a section (`dialog`). | While it is open the dialog is the context of the person, and its title has to stand above the titles it may hold, `h6`; in `h6` it is as tall as the values of the fields. `h5` is the size of the dialog titles of Carbon and Atlassian and of the examples of `mds-modal`. Rejected: `h6`, the dialog as a part. Chosen live on a form and on a confirmation; `mds-banner` gets a choice of the style of its headline (#1192). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6526234532 |
205
+ | 2026-10-30 | A group of fields is a `fieldset` with no border and no inset, its title the `legend` in the style `h6`, not a heading of the page (`group`). | The native grouping of related controls (WCAG technique H71): the group names every field it holds; a heading inside the `legend` adds the groups to the outline, and inside a dialog, whose title is hidden, they open it with no level above. The three forms look the same: one answer, given with its proof (the accessibility tree of Chromium) and confirmed. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6526567780 |
206
+ | 2026-10-30 | The title of an item of an accordion is `h6`, the title of a part (`part`); the default of `mds-accordion-item` moves from `h5`. | An accordion stands in a section, and the title of the section (`h5`) has to stand above its items. Rejected: `h5`, the default of today, where the section and its questions read as one level. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6526696932 |
207
+ | 2026-10-30 | The titles are carried by role names: `typography="<role>"` on `mds-text`, `text-title-<role>` without components, one token per role, `--text-size-title-<role>` (`by-role`). | The role reads in the code, so a check can tell a section from a dialog though both are `h5`, and a theme moves one role in one place. Rejected: the style of the level written by hand from the table, with a lint on the pairs of tag and style, the form the previews got wrong. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6526876032 |
208
+ | 2026-10-31 | The file of the domain: a case per role, `one-h1` and `tag-is-structure` written here from the Typography page of the docs site, which keeps the reasons around them. | The issue of the five domains (#1197): the rules the agents do not read on the docs site move into the package. |
@@ -0,0 +1,202 @@
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: widths
6
+ kind: foundation
7
+ title: Widths and alignment
8
+ layer: magma
9
+ status: decided
10
+ need: >-
11
+ Give text, forms, pages and dialogs a width that keeps them readable at every size of window
12
+ and of text, and line them up on one edge.
13
+ principle: >-
14
+ A box is as wide as its role: text and forms at the reading measure, the page in the frame of
15
+ the bar, a dialog the column of a form plus its inset; whatever is capped starts at the start
16
+ edge.
17
+ keywords: [width, max-width, measure, line length, column, container, alignment, frame, gutter, half field, dialog width]
18
+ assumptions:
19
+ - "The text is set at 16 px in Karla; the measures in ch grow with the text when the person enlarges it."
20
+ - "The rhythm is at the standard density: the dialog adds the inset of its density."
21
+ components: [mds-text, mds-input-field, mds-modal, mds-banner]
22
+ related: [rhythm, actions, surfaces, page-header]
23
+ validated-on: []
24
+
25
+ variables:
26
+ box:
27
+ values: [text, form, short-field, page, collection, dialog]
28
+ means: "The box to size: text to be read (paragraphs, list items, captions); the column of a form; a field whose answer is short (a street number, a postcode, a tax code, a date); the page; a table or a list; the window of a dialog."
29
+
30
+ cases:
31
+ - id: reading
32
+ box: text
33
+ where: "the reading measure, `56ch` (65 to 80 characters on a full line in Karla): the reset caps `p`, `li` and `figcaption`, and mds-text caps itself with those tags, so whoever writes a page writes nothing; `max-w-text` elsewhere"
34
+ serves: inclusive
35
+ carried-by: [mds-text, --magma-width-reading, max-w-text]
36
+ - id: form
37
+ box: form
38
+ where: "`max-w-form` on the form, the width of the text around it (`56ch`, 532 px at 16 px); its fields take the whole column, and its row of actions stands at the end of the column (`actions/place`)"
39
+ serves: [inclusive, enabling]
40
+ carried-by: [max-w-form, --magma-width-form]
41
+ - id: field
42
+ box: short-field
43
+ where: "half the column of its form: the whole mds-input-field (label, control, message), not the control inside it; two short fields of one subject share a row, in reading order, and under a column of `28rem` the halves take the whole column. `field-group` on the group lays them out, reading the property `short` of mds-input-field"
44
+ use: ["mds-input-field"]
45
+ serves: [enabling, intuitive]
46
+ carried-by: [field-group, mds-input-field short]
47
+ - id: page
48
+ box: [page, collection]
49
+ where: "`page-frame` on the page: at most 1280 px, centred in the window, a gutter of `600` outside it, the column the bar gives its own content; everything inside starts at the start edge of the frame, and a table or a list takes the whole frame"
50
+ serves: intuitive
51
+ carried-by: [page-frame, --magma-width-page, --magma-width-page-gutter]
52
+ - id: dialog
53
+ box: dialog
54
+ where: "at most the column of a form plus its inset, `--magma-width-dialog` (580 px at 16 px), one width for every dialog, confirmations included; on a phone the window takes the screen, as mds-modal does under 480 px; mds-modal gives it to its window"
55
+ use: ["mds-modal", "mds-banner slot=window"]
56
+ serves: [enabling, intuitive]
57
+ carried-by: [--magma-width-dialog]
58
+
59
+ gaps: []
60
+ not-applicable: []
61
+
62
+ always-true:
63
+ - id: start-edge
64
+ rule: "Capped content (text, forms) stands at the start edge of its frame, never centred inside it: the title, the text, the form and the table of a page start on the edge of the content of the bar."
65
+ serves: intuitive
66
+ checked-by: review
67
+ - id: by-role
68
+ rule: "A width is written by its role, never by its value: max-w-form, page-frame, short with field-group, the default of mds-modal; never container-sm, a max-w of a value of your own, or the threshold of the halves and the sum of the dialog copied by hand."
69
+ serves: [intuitive, flexible]
70
+ checked-by: review
71
+
72
+ open-choices: []
73
+
74
+ situations:
75
+ - { situation: "The description of a service, paragraphs to read", case: reading }
76
+ - { situation: "The form Report a problem under its introduction", case: form }
77
+ - { situation: "The street number and the postcode of an address", case: field }
78
+ - { situation: "The tax code and the date of birth of a person", case: field }
79
+ - { situation: "A list of requests in a table of six columns", case: page, note: "the table takes the whole frame" }
80
+ - { situation: "The page of a record in a window 1920 px wide", case: page, note: "the frame stops at 1280 px, the sides stay empty" }
81
+ - { situation: "The dialog New contact, a form with two short fields", case: dialog }
82
+ - { situation: "The confirmation of a deletion", case: dialog, note: "the same width as every dialog" }
83
+ ---
84
+
85
+ # Widths and alignment
86
+
87
+ **A box is as wide as its role: text and forms at the reading measure, the page in the frame of the bar, a dialog the column of a form plus its inset; whatever is capped starts at the start edge.**
88
+
89
+ ## When to use it
90
+
91
+ Every time a box could run as wide as its container: a paragraph, a form, a short field, the
92
+ content of a page, a table, the window of a dialog. The role picks the width; the edge is
93
+ always the start edge of the frame.
94
+
95
+ Not here: the space between the elements (the rhythm), and the width of a column of a table,
96
+ which the table sets from its content.
97
+
98
+ ## What decides it
99
+
100
+ One question: what is the box? Text to be read; the column of a form; a field whose answer has
101
+ a known, short length; the page; a table or a list, which use the whole frame; the window of a
102
+ dialog. A form in a dialog is the same column as a form in a page, so it moves between the two
103
+ without changing shape.
104
+
105
+ ## Cases
106
+
107
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
108
+
109
+ | Variable | Values | Means |
110
+ | --- | --- | --- |
111
+ | `box` | `text`, `form`, `short-field`, `page`, `collection`, `dialog` | The box to size: text to be read (paragraphs, list items, captions); the column of a form; a field whose answer is short (a street number, a postcode, a tax code, a date); the page; a table or a list; the window of a dialog. |
112
+
113
+ A case that leaves a variable out holds for any of its values.
114
+
115
+ | Case | When | Where | Use | Serves | Carried by |
116
+ | --- | --- | --- | --- | --- | --- |
117
+ | `reading` | box: text | the reading measure, `56ch` (65 to 80 characters on a full line in Karla): the reset caps `p`, `li` and `figcaption`, and mds-text caps itself with those tags, so whoever writes a page writes nothing; `max-w-text` elsewhere | | inclusive | `mds-text`, `--magma-width-reading`, `max-w-text` |
118
+ | `form` | box: form | `max-w-form` on the form, the width of the text around it (`56ch`, 532 px at 16 px); its fields take the whole column, and its row of actions stands at the end of the column (`actions/place`) | | inclusive, enabling | `max-w-form`, `--magma-width-form` |
119
+ | `field` | box: short-field | half the column of its form: the whole mds-input-field (label, control, message), not the control inside it; two short fields of one subject share a row, in reading order, and under a column of `28rem` the halves take the whole column. `field-group` on the group lays them out, reading the property `short` of mds-input-field | `mds-input-field` | enabling, intuitive | `field-group`, `mds-input-field short` |
120
+ | `page` | box: page or collection | `page-frame` on the page: at most 1280 px, centred in the window, a gutter of `600` outside it, the column the bar gives its own content; everything inside starts at the start edge of the frame, and a table or a list takes the whole frame | | intuitive | `page-frame`, `--magma-width-page`, `--magma-width-page-gutter` |
121
+ | `dialog` | box: dialog | at most the column of a form plus its inset, `--magma-width-dialog` (580 px at 16 px), one width for every dialog, confirmations included; on a phone the window takes the screen, as mds-modal does under 480 px; mds-modal gives it to its window | `mds-modal`, `mds-banner slot=window` | enabling, intuitive | `--magma-width-dialog` |
122
+
123
+ No gaps: every combination has a case or is not applicable.
124
+
125
+ ## Parts
126
+
127
+ The widths at 16 px, and what an agent writes:
128
+
129
+ | Role | Width | Writes | Token |
130
+ | --- | --- | --- | --- |
131
+ | `reading` | `56ch`, 532 px | nothing (the reset, `mds-text`); `max-w-text` elsewhere | `--magma-width-reading` |
132
+ | `form` | `56ch`, the column of the text | `max-w-form` on the form | `--magma-width-form` |
133
+ | `field` | half the column; the whole column under `28rem` | `short` on `mds-input-field`, `field-group` on the group | none: `28rem` lives in the utility |
134
+ | `page` | at most 1280 px, gutter `600` outside | `page-frame` on the page | `--magma-width-page`, `--magma-width-page-gutter` |
135
+ | `dialog` | `56ch` plus twice the inset, 580 px | nothing: `mds-modal` carries it | `--magma-width-dialog` |
136
+
137
+ Why `56ch`: the zero of Karla is 9.5 px at 16 px, wider than an average character, so a measure
138
+ in `ch` holds fewer characters than its number says. `56ch` is the one value whose full lines
139
+ stay inside 60 to 80 characters, under the 80 of WCAG 1.4.8.
140
+
141
+ Why `28rem`: a half has to hold the longest short answer `mds-input` knows, the tax code (16
142
+ characters, a control of 203 px); two halves and the gap need about 430 px.
143
+
144
+ A theme moves a role through its token: a theme with the page at 1024 px and the reading
145
+ measure at `65ch` moves the frame, the form and the dialog with them, and the markup stays.
146
+
147
+ ## Always true
148
+
149
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
150
+
151
+ These hold in every product: a product layer cannot change them.
152
+
153
+ | Id | Rule | Serves | Carried by | Checked by |
154
+ | --- | --- | --- | --- | --- |
155
+ | `start-edge` | Capped content (text, forms) stands at the start edge of its frame, never centred inside it: the title, the text, the form and the table of a page start on the edge of the content of the bar. | intuitive | the guide | review |
156
+ | `by-role` | A width is written by its role, never by its value: max-w-form, page-frame, short with field-group, the default of mds-modal; never container-sm, a max-w of a value of your own, or the threshold of the halves and the sum of the dialog copied by hand. | intuitive, flexible | the guide | review |
157
+
158
+ ## Situations
159
+
160
+ <!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
161
+
162
+ 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.
163
+
164
+ | Situation | Case |
165
+ | --- | --- |
166
+ | The description of a service, paragraphs to read | `reading` |
167
+ | The form Report a problem under its introduction | `form` |
168
+ | The street number and the postcode of an address | `field` |
169
+ | The tax code and the date of birth of a person | `field` |
170
+ | A list of requests in a table of six columns | `page`: the table takes the whole frame |
171
+ | The page of a record in a window 1920 px wide | `page`: the frame stops at 1280 px, the sides stay empty |
172
+ | The dialog New contact, a form with two short fields | `dialog` |
173
+ | The confirmation of a deletion | `dialog`: the same width as every dialog |
174
+
175
+ ## Accessibility
176
+
177
+ - The measures are in `ch`, so text and forms grow with the text when the person enlarges it,
178
+ and the lines stay inside the 80 characters of WCAG 1.4.8.
179
+ - The halves of short fields take the whole column under `28rem`, so a tax code is never cut on
180
+ a phone, and the message of a half stays on one line.
181
+
182
+ ## Magma gaps
183
+
184
+ - `mds-banner` keeps its close button in a column beside the whole body, so in a window the
185
+ fields end before the row of actions; with the X in the title row (`actions/dismiss`) the body
186
+ of the window is the column of a form exactly.
187
+ - In a narrow box (a dialog on a phone) `mds-banner` lets its content shrink to its text, so a
188
+ short form ends up narrower than the window. Kept aside.
189
+ - The previews of the patterns size their forms with `container-sm` (384 px): they move to
190
+ `max-w-form` (#1189, the previews redone on the rules).
191
+
192
+ ## Decisions
193
+
194
+ | Date | Decision | Why |
195
+ | --- | --- | --- |
196
+ | 2026-10-30 | Text to be read stops at `max-w-text`, and `--spacing-text` goes from `75ch` to `56ch` (`reading`). | The Foundation already writes the rule, about 60 to 80 characters; `56ch` is the value that keeps it, measured on the build: 65 to 80 characters on a full line in Karla, average 72. Rejected: `75ch`, 86 to 104 characters, over the rule and over WCAG 1.4.8. One answer, shown live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6531852144 |
197
+ | 2026-10-30 | The column of a form is the reading measure; its fields take the whole column, its row the end of it (`form`). | The messages under the fields are text to read and stay on one line; text and form end on one edge; in `ch` the column grows with the text. Rejected: `container-sm` (384 px), the width the widgets used without deciding it, where 2 of 3 messages wrapped. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6532026182 |
198
+ | 2026-10-30 | A short field is half the column, the whole `mds-input-field`; two of one subject share a row; under `28rem` the halves take the whole column (`field`). | Two widths only, so the form keeps one grid; whoever writes chooses "short" and counts no characters; the form is shorter (654 px against 837). Rejected: the control as wide as its answer (GOV.UK), one edge per field; every control on the whole column; a short field beside a free one, whose error took 5 lines. The proposal of the maintainer, chosen live over the first recommendation. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6532384527 |
199
+ | 2026-10-30 | A page stands in a frame of at most 1280 px, centred, with a gutter of `600`, the column of `mds-header-bar`; everything starts at its start edge, and tables and lists take the whole frame (`page`, `start-edge`). | The bar carries it already: the name of the application, the title and the table start on one edge at every width. Rejected: page and bar at the full width of the window, rows across the whole screen and text against the left edge. Chosen live at 1024, 1440 and 1920 px. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6532525783 |
200
+ | 2026-10-30 | The window of a dialog is the column of a form plus its inset, 580 px, one width for every dialog (`dialog`). | A form moves between a page and a dialog without changing shape: the halves stay side by side, the messages on one line. Rejected: `container-md` (448 px), whose body falls under `28rem`, so a form takes its phone shape. Chosen live. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6532648084 |
201
+ | 2026-10-30 | The widths are carried by roles: `--magma-width-*`, `max-w-form`, `page-frame`, `short` with `field-group`, the default of `mds-modal` (`by-role`). | The role reads in the code, a check can hold it, a theme moves it in one place, and the threshold and the sum of the dialog live in one place instead of in every product (the previews copied a width and got 384 px). Rejected: the values by hand, the same render with nothing a check can tell apart; the pair as a wrapper, where "short" is not on the field. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6533809808 |
202
+ | 2026-10-31 | The file of the domain; tables and lists are a value of their own in the case `page`. | The issue of the five domains (#1197); `widths/page` names tables and lists among its answers. |