@maggioli-design-system/magma-react 2.8.0 → 2.10.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.
- package/AGENTS.md +10 -7
- package/CHANGELOG.md +108 -0
- package/README.md +38 -0
- package/agents/assets.md +1 -1
- package/agents/color.md +5 -3
- package/agents/components.md +2 -2
- package/agents/conventions.md +1 -1
- package/agents/mcp.md +78 -8
- package/agents/{anti-patterns.md → mistakes.md} +2 -2
- package/agents/patterns/actions.md +393 -0
- package/agents/patterns/app-shell.md +223 -0
- package/agents/patterns/choose-items.md +18 -0
- package/agents/patterns/concurrent-editing.md +17 -0
- package/agents/patterns/confirm-action.md +216 -0
- package/agents/patterns/consent-and-legal.md +16 -0
- package/agents/patterns/density.md +236 -0
- package/agents/patterns/empty-state.md +201 -0
- package/agents/patterns/error-recovery.md +237 -0
- package/agents/patterns/form-and-validation.md +16 -0
- package/agents/patterns/item-list.md +214 -0
- package/agents/patterns/labels-and-values.md +184 -0
- package/agents/patterns/list-with-filters.md +282 -0
- package/agents/patterns/loading.md +221 -0
- package/agents/patterns/message-placement.md +304 -0
- package/agents/patterns/notification-center.md +18 -0
- package/agents/patterns/page-header.md +201 -0
- package/agents/patterns/permissions.md +17 -0
- package/agents/patterns/previews/actions/banner.html +21 -0
- package/agents/patterns/previews/actions/confirm.html +11 -0
- package/agents/patterns/previews/actions/danger-zone.html +22 -0
- package/agents/patterns/previews/actions/destructive-in-menu.html +19 -0
- package/agents/patterns/previews/actions/dismiss-message.html +15 -0
- package/agents/patterns/previews/actions/dismiss.html +25 -0
- package/agents/patterns/previews/actions/more-in-menu.html +21 -0
- package/agents/patterns/previews/actions/part-primary.html +28 -0
- package/agents/patterns/previews/actions/primary.html +20 -0
- package/agents/patterns/previews/actions/remove.html +44 -0
- package/agents/patterns/previews/actions/secondary.html +20 -0
- package/agents/patterns/previews/actions/stacked.html +17 -0
- package/agents/patterns/previews/actions/toast.html +10 -0
- package/agents/patterns/previews/app-shell/back-office.html +41 -0
- package/agents/patterns/previews/app-shell/many-sections.html +45 -0
- package/agents/patterns/previews/app-shell/public-service.html +31 -0
- package/agents/patterns/previews/confirm-action/act-then-undo.html +44 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.html +25 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.html +11 -0
- package/agents/patterns/previews/confirm-action/ask-first.html +14 -0
- package/agents/patterns/previews/confirm-action/make-reversible.html +54 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.html +57 -0
- package/agents/patterns/previews/empty-state/add-the-first.html +19 -0
- package/agents/patterns/previews/empty-state/all-done.html +15 -0
- package/agents/patterns/previews/empty-state/clear-filters.html +35 -0
- package/agents/patterns/previews/empty-state/filled-by-others.html +15 -0
- package/agents/patterns/previews/empty-state/not-found.html +38 -0
- package/agents/patterns/previews/empty-state/one-line.html +12 -0
- package/agents/patterns/previews/error-recovery/action-another-way.html +35 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.html +26 -0
- package/agents/patterns/previews/error-recovery/check-or-repeat.html +38 -0
- package/agents/patterns/previews/error-recovery/content-another-way.html +12 -0
- package/agents/patterns/previews/error-recovery/partial.html +29 -0
- package/agents/patterns/previews/error-recovery/retry-action.html +35 -0
- package/agents/patterns/previews/error-recovery/retry-content.html +40 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.html +44 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.html +12 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.html +109 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.html +74 -0
- package/agents/patterns/previews/item-list/requests-to-assign.html +80 -0
- package/agents/patterns/previews/labels-and-values/data-of-a-contact.html +31 -0
- package/agents/patterns/previews/labels-and-values/payment-before-paying.html +21 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.html +25 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.html +121 -0
- package/agents/patterns/previews/list-with-filters/find-and-open.html +109 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.html +132 -0
- package/agents/patterns/previews/loading/await-and-say.html +41 -0
- package/agents/patterns/previews/loading/await-the-control.html +28 -0
- package/agents/patterns/previews/loading/first-load.html +10 -0
- package/agents/patterns/previews/loading/keep-while-reloading.html +80 -0
- package/agents/patterns/previews/loading/long-load-measured.html +16 -0
- package/agents/patterns/previews/loading/long-load.html +12 -0
- package/agents/patterns/previews/loading/progress-in-place.html +52 -0
- package/agents/patterns/previews/loading/run-in-background.html +24 -0
- package/agents/patterns/previews/message-placement/action-done-elsewhere.html +38 -0
- package/agents/patterns/previews/message-placement/action-done-in-page.html +53 -0
- package/agents/patterns/previews/message-placement/action-done-in-part.html +42 -0
- package/agents/patterns/previews/message-placement/action-failed-elsewhere.html +40 -0
- package/agents/patterns/previews/message-placement/action-failed-in-place.html +31 -0
- package/agents/patterns/previews/message-placement/action-later.html +24 -0
- package/agents/patterns/previews/message-placement/action-partial-elsewhere.html +33 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.html +51 -0
- package/agents/patterns/previews/message-placement/action-taken.html +25 -0
- package/agents/patterns/previews/message-placement/app-deadline.html +20 -0
- package/agents/patterns/previews/message-placement/app-failed.html +48 -0
- package/agents/patterns/previews/message-placement/app-info.html +39 -0
- package/agents/patterns/previews/message-placement/decision.html +49 -0
- package/agents/patterns/previews/message-placement/field-error.html +28 -0
- package/agents/patterns/previews/message-placement/field-hint.html +30 -0
- package/agents/patterns/previews/message-placement/field-valid.html +11 -0
- package/agents/patterns/previews/message-placement/region-failed.html +31 -0
- package/agents/patterns/previews/message-placement/region-info.html +16 -0
- package/agents/patterns/previews/page-header/contact-being-edited.html +25 -0
- package/agents/patterns/previews/page-header/members-of-a-group.html +18 -0
- package/agents/patterns/previews/page-header/own-profile.html +17 -0
- package/agents/patterns/previews/page-header/request-from-the-list.html +33 -0
- package/agents/patterns/previews/page-header/requests-of-an-office.html +16 -0
- package/agents/patterns/previews/record-detail/ask-for-words.html +72 -0
- package/agents/patterns/previews/record-detail/edit-data.html +104 -0
- package/agents/patterns/previews/record-detail/read-the-data.html +80 -0
- package/agents/patterns/previews/record-detail/record-changed.html +87 -0
- package/agents/patterns/previews/record-detail/run-at-once.html +88 -0
- package/agents/patterns/previews/record-detail/work-on-it.html +106 -0
- package/agents/patterns/previews/rhythm/between-containers.html +29 -0
- package/agents/patterns/previews/rhythm/between-fields.html +14 -0
- package/agents/patterns/previews/rhythm/between-groups.html +23 -0
- package/agents/patterns/previews/rhythm/between-sections.html +17 -0
- package/agents/patterns/previews/rhythm/content-actions.html +14 -0
- package/agents/patterns/previews/rhythm/inline.html +12 -0
- package/agents/patterns/previews/rhythm/inset.html +11 -0
- package/agents/patterns/previews/rhythm/label-control.html +8 -0
- package/agents/patterns/previews/rhythm/title-content.html +10 -0
- package/agents/patterns/previews/surfaces/band.html +73 -0
- package/agents/patterns/previews/surfaces/canvas.html +66 -0
- package/agents/patterns/previews/surfaces/card.html +30 -0
- package/agents/patterns/previews/surfaces/dialog.html +28 -0
- package/agents/patterns/previews/surfaces/edit-actions.html +35 -0
- package/agents/patterns/previews/surfaces/section.html +35 -0
- package/agents/patterns/previews/titles/dialog.html +18 -0
- package/agents/patterns/previews/titles/group.html +14 -0
- package/agents/patterns/previews/titles/page.html +25 -0
- package/agents/patterns/previews/titles/part.html +24 -0
- package/agents/patterns/previews/titles/section.html +14 -0
- package/agents/patterns/previews/widths/dialog.html +33 -0
- package/agents/patterns/previews/widths/field.html +20 -0
- package/agents/patterns/previews/widths/form.html +27 -0
- package/agents/patterns/previews/widths/page.html +49 -0
- package/agents/patterns/previews/widths/reading.html +15 -0
- package/agents/patterns/record-detail.md +268 -0
- package/agents/patterns/rhythm.md +212 -0
- package/agents/patterns/surfaces.md +212 -0
- package/agents/patterns/titles.md +208 -0
- package/agents/patterns/widths.md +202 -0
- package/agents/patterns.md +121 -0
- package/agents/reporting.md +6 -3
- package/agents/theming.md +22 -3
- package/agents/typography.md +27 -2
- package/agents/variants.md +1 -1
- package/dist/components.js +117 -117
- package/dist/components.server.js +117 -117
- package/dist/mds-accordion-item.js +8 -3
- package/dist/mds-accordion-item.server.js +7 -2
- package/dist/mds-accordion-timer-item.js +8 -3
- package/dist/mds-accordion-timer-item.server.js +7 -2
- package/dist/mds-accordion-timer.js +11 -4
- package/dist/mds-accordion-timer.server.js +7 -2
- package/dist/mds-accordion.js +11 -4
- package/dist/mds-accordion.server.js +7 -2
- package/dist/mds-author.js +8 -3
- package/dist/mds-author.server.js +7 -2
- package/dist/mds-avatar-stack-item.js +8 -3
- package/dist/mds-avatar-stack-item.server.js +7 -2
- package/dist/mds-avatar-stack.js +8 -3
- package/dist/mds-avatar-stack.server.js +7 -2
- package/dist/mds-avatar.js +8 -3
- package/dist/mds-avatar.server.js +7 -2
- package/dist/mds-badge.js +8 -3
- package/dist/mds-badge.server.js +7 -2
- package/dist/mds-banner.js +11 -4
- package/dist/mds-banner.server.js +7 -2
- package/dist/mds-benchmark-bar.js +8 -3
- package/dist/mds-benchmark-bar.server.js +7 -2
- package/dist/mds-bibliography.js +8 -3
- package/dist/mds-bibliography.server.js +7 -2
- package/dist/mds-book.js +8 -3
- package/dist/mds-book.server.js +8 -2
- package/dist/mds-breadcrumb-item.js +11 -4
- package/dist/mds-breadcrumb-item.server.js +7 -2
- package/dist/mds-breadcrumb.js +11 -4
- package/dist/mds-breadcrumb.server.js +10 -3
- package/dist/mds-button-dropdown.js +11 -4
- package/dist/mds-button-dropdown.server.js +7 -2
- package/dist/mds-button-group.js +8 -3
- package/dist/mds-button-group.server.js +7 -2
- package/dist/mds-button.js +8 -3
- package/dist/mds-button.server.js +7 -2
- package/dist/mds-calendar-cell.js +8 -3
- package/dist/mds-calendar-cell.server.js +7 -2
- package/dist/mds-calendar.js +8 -3
- package/dist/mds-calendar.server.js +7 -2
- package/dist/mds-card-content.js +8 -3
- package/dist/mds-card-content.server.js +7 -2
- package/dist/mds-card-footer.js +8 -3
- package/dist/mds-card-footer.server.js +7 -2
- package/dist/mds-card-header.js +8 -3
- package/dist/mds-card-header.server.js +7 -2
- package/dist/mds-card-media.js +8 -3
- package/dist/mds-card-media.server.js +7 -2
- package/dist/mds-card.js +8 -3
- package/dist/mds-card.server.js +10 -3
- package/dist/mds-chip.js +8 -3
- package/dist/mds-chip.server.js +7 -2
- package/dist/mds-details.js +11 -4
- package/dist/mds-details.server.js +10 -3
- package/dist/mds-dropdown.js +8 -3
- package/dist/mds-dropdown.server.js +7 -2
- package/dist/mds-emoji.js +8 -3
- package/dist/mds-emoji.server.js +10 -3
- package/dist/mds-entity.js +8 -3
- package/dist/mds-entity.server.js +7 -2
- package/dist/mds-file-preview.js +8 -3
- package/dist/mds-file-preview.server.js +7 -2
- package/dist/mds-file.js +11 -4
- package/dist/mds-file.server.js +7 -2
- package/dist/mds-filter-item.js +11 -4
- package/dist/mds-filter-item.server.js +7 -2
- package/dist/mds-filter.js +11 -4
- package/dist/mds-filter.server.js +7 -2
- package/dist/mds-header-bar.js +11 -4
- package/dist/mds-header-bar.server.js +7 -2
- package/dist/mds-header.js +8 -3
- package/dist/mds-header.server.js +7 -2
- package/dist/mds-help.js +8 -3
- package/dist/mds-help.server.js +7 -2
- package/dist/mds-horizontal-scroll.js +8 -3
- package/dist/mds-horizontal-scroll.server.js +7 -2
- package/dist/mds-hr.js +8 -3
- package/dist/mds-hr.server.js +7 -2
- package/dist/mds-icon.js +8 -3
- package/dist/mds-icon.server.js +10 -3
- package/dist/mds-img.js +8 -3
- package/dist/mds-img.server.js +7 -2
- package/dist/mds-input-date-range-preselection.js +8 -3
- package/dist/mds-input-date-range-preselection.server.js +7 -2
- package/dist/mds-input-date-range.js +11 -4
- package/dist/mds-input-date-range.server.js +7 -2
- package/dist/mds-input-date.js +8 -3
- package/dist/mds-input-date.server.js +7 -2
- package/dist/mds-input-field.js +8 -3
- package/dist/mds-input-field.server.js +8 -2
- package/dist/mds-input-otp.js +8 -3
- package/dist/mds-input-otp.server.js +7 -2
- package/dist/mds-input-range.js +11 -4
- package/dist/mds-input-range.server.js +7 -2
- package/dist/mds-input-select.js +11 -4
- package/dist/mds-input-select.server.js +7 -2
- package/dist/mds-input-switch.js +11 -4
- package/dist/mds-input-switch.server.js +7 -2
- package/dist/mds-input-tip-item.js +8 -3
- package/dist/mds-input-tip-item.server.js +7 -2
- package/dist/mds-input-tip.js +8 -3
- package/dist/mds-input-tip.server.js +7 -2
- package/dist/mds-input-upload.js +11 -4
- package/dist/mds-input-upload.server.js +7 -2
- package/dist/mds-input.js +8 -3
- package/dist/mds-input.server.js +7 -2
- package/dist/mds-keyboard-key.js +8 -3
- package/dist/mds-keyboard-key.server.js +7 -2
- package/dist/mds-keyboard.js +8 -3
- package/dist/mds-keyboard.server.js +7 -2
- package/dist/mds-kpi-item.js +8 -3
- package/dist/mds-kpi-item.server.js +7 -2
- package/dist/mds-kpi.js +8 -3
- package/dist/mds-kpi.server.js +7 -2
- package/dist/mds-label.js +11 -4
- package/dist/mds-label.server.js +7 -2
- package/dist/mds-link.js +8 -3
- package/dist/mds-link.server.js +7 -2
- package/dist/mds-list-item.js +8 -3
- package/dist/mds-list-item.server.js +7 -2
- package/dist/mds-list.js +8 -3
- package/dist/mds-list.server.js +7 -2
- package/dist/mds-mention.js +11 -4
- package/dist/mds-mention.server.js +7 -2
- package/dist/mds-modal.js +8 -3
- package/dist/mds-modal.server.js +7 -2
- package/dist/mds-note.js +11 -4
- package/dist/mds-note.server.js +7 -2
- package/dist/mds-notification.js +8 -3
- package/dist/mds-notification.server.js +10 -3
- package/dist/mds-paginator-item.js +8 -3
- package/dist/mds-paginator-item.server.js +7 -2
- package/dist/mds-paginator.js +11 -4
- package/dist/mds-paginator.server.js +7 -2
- package/dist/mds-policy-ai.js +8 -3
- package/dist/mds-policy-ai.server.js +7 -2
- package/dist/mds-pref-animation.js +11 -4
- package/dist/mds-pref-animation.server.js +7 -2
- package/dist/mds-pref-consumption.js +11 -4
- package/dist/mds-pref-consumption.server.js +7 -2
- package/dist/mds-pref-contrast.js +11 -4
- package/dist/mds-pref-contrast.server.js +7 -2
- package/dist/mds-pref-language-item.js +11 -4
- package/dist/mds-pref-language-item.server.js +7 -2
- package/dist/mds-pref-language.js +8 -3
- package/dist/mds-pref-language.server.js +7 -2
- package/dist/mds-pref-mode.js +11 -4
- package/dist/mds-pref-mode.server.js +7 -2
- package/dist/mds-pref-theme-item.js +11 -4
- package/dist/mds-pref-theme-item.server.js +7 -2
- package/dist/mds-pref-theme.js +8 -3
- package/dist/mds-pref-theme.server.js +7 -2
- package/dist/mds-pref.js +8 -3
- package/dist/mds-pref.server.js +7 -2
- package/dist/mds-price-table-features-cell.js +8 -3
- package/dist/mds-price-table-features-cell.server.js +10 -3
- package/dist/mds-price-table-features-row.js +8 -3
- package/dist/mds-price-table-features-row.server.js +7 -2
- package/dist/mds-price-table-features.js +8 -3
- package/dist/mds-price-table-features.server.js +10 -3
- package/dist/mds-price-table-header.js +8 -3
- package/dist/mds-price-table-header.server.js +7 -2
- package/dist/mds-price-table-list-item.js +8 -3
- package/dist/mds-price-table-list-item.server.js +7 -2
- package/dist/mds-price-table-list.js +8 -3
- package/dist/mds-price-table-list.server.js +7 -2
- package/dist/mds-price-table.js +8 -3
- package/dist/mds-price-table.server.js +7 -2
- package/dist/mds-progress.js +8 -3
- package/dist/mds-progress.server.js +7 -2
- package/dist/mds-push-notification-item.js +11 -4
- package/dist/mds-push-notification-item.server.js +7 -2
- package/dist/mds-push-notification.js +8 -3
- package/dist/mds-push-notification.server.js +7 -2
- package/dist/mds-quote.js +8 -3
- package/dist/mds-quote.server.js +7 -2
- package/dist/mds-radial-menu-item.js +8 -3
- package/dist/mds-radial-menu-item.server.js +7 -2
- package/dist/mds-radial-menu.js +8 -3
- package/dist/mds-radial-menu.server.js +7 -2
- package/dist/mds-radial-progress.js +8 -3
- package/dist/mds-radial-progress.server.js +7 -2
- package/dist/mds-separator.js +8 -3
- package/dist/mds-separator.server.js +7 -2
- package/dist/mds-spinner.js +8 -3
- package/dist/mds-spinner.server.js +10 -3
- package/dist/mds-status-bar.js +8 -3
- package/dist/mds-status-bar.server.js +7 -2
- package/dist/mds-stepper-bar-item.js +11 -4
- package/dist/mds-stepper-bar-item.server.js +7 -2
- package/dist/mds-stepper-bar.js +11 -4
- package/dist/mds-stepper-bar.server.js +7 -2
- package/dist/mds-tab-bar-item.js +11 -4
- package/dist/mds-tab-bar-item.server.js +7 -2
- package/dist/mds-tab-bar.js +11 -4
- package/dist/mds-tab-bar.server.js +7 -2
- package/dist/mds-tab-item.js +8 -3
- package/dist/mds-tab-item.server.js +7 -2
- package/dist/mds-tab.js +11 -4
- package/dist/mds-tab.server.js +7 -2
- package/dist/mds-table-body.js +8 -3
- package/dist/mds-table-body.server.js +7 -2
- package/dist/mds-table-cell.js +8 -3
- package/dist/mds-table-cell.server.js +10 -3
- package/dist/mds-table-footer.js +8 -3
- package/dist/mds-table-footer.server.js +10 -3
- package/dist/mds-table-header-cell.js +11 -4
- package/dist/mds-table-header-cell.server.js +7 -2
- package/dist/mds-table-header.js +8 -3
- package/dist/mds-table-header.server.js +10 -3
- package/dist/mds-table-row.js +8 -3
- package/dist/mds-table-row.server.js +7 -2
- package/dist/mds-table.js +11 -4
- package/dist/mds-table.server.js +7 -2
- package/dist/mds-text.js +8 -3
- package/dist/mds-text.server.js +7 -2
- package/dist/mds-toast-region.js +8 -3
- package/dist/mds-toast-region.server.js +7 -2
- package/dist/mds-toast.js +11 -4
- package/dist/mds-toast.server.js +7 -2
- package/dist/mds-tooltip.js +8 -3
- package/dist/mds-tooltip.server.js +7 -2
- package/dist/mds-tree-item.js +8 -3
- package/dist/mds-tree-item.server.js +7 -2
- package/dist/mds-tree.js +8 -3
- package/dist/mds-tree.server.js +7 -2
- package/dist/mds-url-view.js +11 -4
- package/dist/mds-url-view.server.js +7 -2
- package/dist/mds-usage.js +8 -3
- package/dist/mds-usage.server.js +7 -2
- package/dist/mds-video-wall.js +8 -3
- package/dist/mds-video-wall.server.js +7 -2
- package/dist/mds-zero.js +8 -3
- package/dist/mds-zero.server.js +7 -2
- package/dist/types/components.d.ts +117 -117
- package/dist/types/components.server.d.ts +118 -118
- package/dist/types/mds-accordion-item.d.ts +4 -8
- package/dist/types/mds-accordion-item.server.d.ts +4 -4
- package/dist/types/mds-accordion-timer-item.d.ts +4 -8
- package/dist/types/mds-accordion-timer-item.server.d.ts +4 -4
- package/dist/types/mds-accordion-timer.d.ts +4 -8
- package/dist/types/mds-accordion-timer.server.d.ts +4 -4
- package/dist/types/mds-accordion.d.ts +4 -8
- package/dist/types/mds-accordion.server.d.ts +4 -4
- package/dist/types/mds-author.d.ts +2 -6
- package/dist/types/mds-author.server.d.ts +3 -3
- package/dist/types/mds-avatar-stack-item.d.ts +2 -6
- package/dist/types/mds-avatar-stack-item.server.d.ts +3 -3
- package/dist/types/mds-avatar-stack.d.ts +2 -6
- package/dist/types/mds-avatar-stack.server.d.ts +3 -3
- package/dist/types/mds-avatar.d.ts +2 -6
- package/dist/types/mds-avatar.server.d.ts +3 -3
- package/dist/types/mds-badge.d.ts +2 -6
- package/dist/types/mds-badge.server.d.ts +3 -3
- package/dist/types/mds-banner.d.ts +4 -8
- package/dist/types/mds-banner.server.d.ts +4 -4
- package/dist/types/mds-benchmark-bar.d.ts +2 -6
- package/dist/types/mds-benchmark-bar.server.d.ts +3 -3
- package/dist/types/mds-bibliography.d.ts +2 -6
- package/dist/types/mds-bibliography.server.d.ts +3 -3
- package/dist/types/mds-book.d.ts +2 -6
- package/dist/types/mds-book.server.d.ts +3 -3
- package/dist/types/mds-breadcrumb-item.d.ts +4 -8
- package/dist/types/mds-breadcrumb-item.server.d.ts +4 -4
- package/dist/types/mds-breadcrumb.d.ts +4 -8
- package/dist/types/mds-breadcrumb.server.d.ts +4 -4
- package/dist/types/mds-button-dropdown.d.ts +4 -8
- package/dist/types/mds-button-dropdown.server.d.ts +4 -4
- package/dist/types/mds-button-group.d.ts +2 -6
- package/dist/types/mds-button-group.server.d.ts +3 -3
- package/dist/types/mds-button.d.ts +2 -6
- package/dist/types/mds-button.server.d.ts +3 -3
- package/dist/types/mds-calendar-cell.d.ts +2 -6
- package/dist/types/mds-calendar-cell.server.d.ts +3 -3
- package/dist/types/mds-calendar.d.ts +4 -8
- package/dist/types/mds-calendar.server.d.ts +4 -4
- package/dist/types/mds-card-content.d.ts +2 -6
- package/dist/types/mds-card-content.server.d.ts +3 -3
- package/dist/types/mds-card-footer.d.ts +2 -6
- package/dist/types/mds-card-footer.server.d.ts +3 -3
- package/dist/types/mds-card-header.d.ts +2 -6
- package/dist/types/mds-card-header.server.d.ts +3 -3
- package/dist/types/mds-card-media.d.ts +2 -6
- package/dist/types/mds-card-media.server.d.ts +3 -3
- package/dist/types/mds-card.d.ts +2 -6
- package/dist/types/mds-card.server.d.ts +3 -3
- package/dist/types/mds-chip.d.ts +4 -8
- package/dist/types/mds-chip.server.d.ts +4 -4
- package/dist/types/mds-details.d.ts +4 -8
- package/dist/types/mds-details.server.d.ts +4 -4
- package/dist/types/mds-dropdown.d.ts +4 -8
- package/dist/types/mds-dropdown.server.d.ts +4 -4
- package/dist/types/mds-emoji.d.ts +2 -6
- package/dist/types/mds-emoji.server.d.ts +3 -3
- package/dist/types/mds-entity.d.ts +2 -6
- package/dist/types/mds-entity.server.d.ts +3 -3
- package/dist/types/mds-file-preview.d.ts +4 -8
- package/dist/types/mds-file-preview.server.d.ts +4 -4
- package/dist/types/mds-file.d.ts +4 -8
- package/dist/types/mds-file.server.d.ts +4 -4
- package/dist/types/mds-filter-item.d.ts +4 -8
- package/dist/types/mds-filter-item.server.d.ts +4 -4
- package/dist/types/mds-filter.d.ts +4 -8
- package/dist/types/mds-filter.server.d.ts +4 -4
- package/dist/types/mds-header-bar.d.ts +4 -8
- package/dist/types/mds-header-bar.server.d.ts +4 -4
- package/dist/types/mds-header.d.ts +4 -8
- package/dist/types/mds-header.server.d.ts +4 -4
- package/dist/types/mds-help.d.ts +2 -6
- package/dist/types/mds-help.server.d.ts +3 -3
- package/dist/types/mds-horizontal-scroll.d.ts +2 -6
- package/dist/types/mds-horizontal-scroll.server.d.ts +3 -3
- package/dist/types/mds-hr.d.ts +2 -6
- package/dist/types/mds-hr.server.d.ts +3 -3
- package/dist/types/mds-icon.d.ts +2 -6
- package/dist/types/mds-icon.server.d.ts +3 -3
- package/dist/types/mds-img.d.ts +4 -8
- package/dist/types/mds-img.server.d.ts +4 -4
- package/dist/types/mds-input-date-range-preselection.d.ts +2 -6
- package/dist/types/mds-input-date-range-preselection.server.d.ts +3 -3
- package/dist/types/mds-input-date-range.d.ts +4 -8
- package/dist/types/mds-input-date-range.server.d.ts +4 -4
- package/dist/types/mds-input-date.d.ts +4 -8
- package/dist/types/mds-input-date.server.d.ts +4 -4
- package/dist/types/mds-input-field.d.ts +2 -6
- package/dist/types/mds-input-field.server.d.ts +3 -3
- package/dist/types/mds-input-otp.d.ts +2 -6
- package/dist/types/mds-input-otp.server.d.ts +3 -3
- package/dist/types/mds-input-range.d.ts +4 -8
- package/dist/types/mds-input-range.server.d.ts +4 -4
- package/dist/types/mds-input-select.d.ts +4 -8
- package/dist/types/mds-input-select.server.d.ts +4 -4
- package/dist/types/mds-input-switch.d.ts +4 -8
- package/dist/types/mds-input-switch.server.d.ts +4 -4
- package/dist/types/mds-input-tip-item.d.ts +2 -6
- package/dist/types/mds-input-tip-item.server.d.ts +3 -3
- package/dist/types/mds-input-tip.d.ts +2 -6
- package/dist/types/mds-input-tip.server.d.ts +3 -3
- package/dist/types/mds-input-upload.d.ts +4 -8
- package/dist/types/mds-input-upload.server.d.ts +4 -4
- package/dist/types/mds-input.d.ts +4 -8
- package/dist/types/mds-input.server.d.ts +4 -4
- package/dist/types/mds-keyboard-key.d.ts +2 -6
- package/dist/types/mds-keyboard-key.server.d.ts +3 -3
- package/dist/types/mds-keyboard.d.ts +2 -6
- package/dist/types/mds-keyboard.server.d.ts +3 -3
- package/dist/types/mds-kpi-item.d.ts +2 -6
- package/dist/types/mds-kpi-item.server.d.ts +3 -3
- package/dist/types/mds-kpi.d.ts +2 -6
- package/dist/types/mds-kpi.server.d.ts +3 -3
- package/dist/types/mds-label.d.ts +4 -8
- package/dist/types/mds-label.server.d.ts +4 -4
- package/dist/types/mds-link.d.ts +2 -6
- package/dist/types/mds-link.server.d.ts +3 -3
- package/dist/types/mds-list-item.d.ts +2 -6
- package/dist/types/mds-list-item.server.d.ts +3 -3
- package/dist/types/mds-list.d.ts +2 -6
- package/dist/types/mds-list.server.d.ts +3 -3
- package/dist/types/mds-mention.d.ts +4 -8
- package/dist/types/mds-mention.server.d.ts +4 -4
- package/dist/types/mds-modal.d.ts +4 -8
- package/dist/types/mds-modal.server.d.ts +4 -4
- package/dist/types/mds-note.d.ts +4 -8
- package/dist/types/mds-note.server.d.ts +4 -4
- package/dist/types/mds-notification.d.ts +2 -6
- package/dist/types/mds-notification.server.d.ts +3 -3
- package/dist/types/mds-paginator-item.d.ts +2 -6
- package/dist/types/mds-paginator-item.server.d.ts +3 -3
- package/dist/types/mds-paginator.d.ts +4 -8
- package/dist/types/mds-paginator.server.d.ts +4 -4
- package/dist/types/mds-policy-ai.d.ts +2 -6
- package/dist/types/mds-policy-ai.server.d.ts +3 -3
- package/dist/types/mds-pref-animation.d.ts +4 -8
- package/dist/types/mds-pref-animation.server.d.ts +4 -4
- package/dist/types/mds-pref-consumption.d.ts +4 -8
- package/dist/types/mds-pref-consumption.server.d.ts +4 -4
- package/dist/types/mds-pref-contrast.d.ts +4 -8
- package/dist/types/mds-pref-contrast.server.d.ts +4 -4
- package/dist/types/mds-pref-language-item.d.ts +4 -8
- package/dist/types/mds-pref-language-item.server.d.ts +4 -4
- package/dist/types/mds-pref-language.d.ts +4 -8
- package/dist/types/mds-pref-language.server.d.ts +4 -4
- package/dist/types/mds-pref-mode.d.ts +4 -8
- package/dist/types/mds-pref-mode.server.d.ts +4 -4
- package/dist/types/mds-pref-theme-item.d.ts +4 -8
- package/dist/types/mds-pref-theme-item.server.d.ts +4 -4
- package/dist/types/mds-pref-theme.d.ts +4 -8
- package/dist/types/mds-pref-theme.server.d.ts +4 -4
- package/dist/types/mds-pref.d.ts +2 -6
- package/dist/types/mds-pref.server.d.ts +3 -3
- package/dist/types/mds-price-table-features-cell.d.ts +2 -6
- package/dist/types/mds-price-table-features-cell.server.d.ts +3 -3
- package/dist/types/mds-price-table-features-row.d.ts +2 -6
- package/dist/types/mds-price-table-features-row.server.d.ts +3 -3
- package/dist/types/mds-price-table-features.d.ts +2 -6
- package/dist/types/mds-price-table-features.server.d.ts +3 -3
- package/dist/types/mds-price-table-header.d.ts +2 -6
- package/dist/types/mds-price-table-header.server.d.ts +3 -3
- package/dist/types/mds-price-table-list-item.d.ts +2 -6
- package/dist/types/mds-price-table-list-item.server.d.ts +3 -3
- package/dist/types/mds-price-table-list.d.ts +2 -6
- package/dist/types/mds-price-table-list.server.d.ts +3 -3
- package/dist/types/mds-price-table.d.ts +2 -6
- package/dist/types/mds-price-table.server.d.ts +3 -3
- package/dist/types/mds-progress.d.ts +2 -6
- package/dist/types/mds-progress.server.d.ts +3 -3
- package/dist/types/mds-push-notification-item.d.ts +4 -8
- package/dist/types/mds-push-notification-item.server.d.ts +4 -4
- package/dist/types/mds-push-notification.d.ts +4 -8
- package/dist/types/mds-push-notification.server.d.ts +4 -4
- package/dist/types/mds-quote.d.ts +2 -6
- package/dist/types/mds-quote.server.d.ts +3 -3
- package/dist/types/mds-radial-menu-item.d.ts +2 -6
- package/dist/types/mds-radial-menu-item.server.d.ts +3 -3
- package/dist/types/mds-radial-menu.d.ts +2 -6
- package/dist/types/mds-radial-menu.server.d.ts +3 -3
- package/dist/types/mds-radial-progress.d.ts +2 -6
- package/dist/types/mds-radial-progress.server.d.ts +3 -3
- package/dist/types/mds-separator.d.ts +2 -6
- package/dist/types/mds-separator.server.d.ts +3 -3
- package/dist/types/mds-spinner.d.ts +2 -6
- package/dist/types/mds-spinner.server.d.ts +3 -3
- package/dist/types/mds-status-bar.d.ts +2 -6
- package/dist/types/mds-status-bar.server.d.ts +3 -3
- package/dist/types/mds-stepper-bar-item.d.ts +4 -8
- package/dist/types/mds-stepper-bar-item.server.d.ts +4 -4
- package/dist/types/mds-stepper-bar.d.ts +4 -8
- package/dist/types/mds-stepper-bar.server.d.ts +4 -4
- package/dist/types/mds-tab-bar-item.d.ts +4 -8
- package/dist/types/mds-tab-bar-item.server.d.ts +4 -4
- package/dist/types/mds-tab-bar.d.ts +4 -8
- package/dist/types/mds-tab-bar.server.d.ts +4 -4
- package/dist/types/mds-tab-item.d.ts +4 -8
- package/dist/types/mds-tab-item.server.d.ts +4 -4
- package/dist/types/mds-tab.d.ts +4 -8
- package/dist/types/mds-tab.server.d.ts +4 -4
- package/dist/types/mds-table-body.d.ts +2 -6
- package/dist/types/mds-table-body.server.d.ts +3 -3
- package/dist/types/mds-table-cell.d.ts +2 -6
- package/dist/types/mds-table-cell.server.d.ts +3 -3
- package/dist/types/mds-table-footer.d.ts +2 -6
- package/dist/types/mds-table-footer.server.d.ts +3 -3
- package/dist/types/mds-table-header-cell.d.ts +4 -8
- package/dist/types/mds-table-header-cell.server.d.ts +4 -4
- package/dist/types/mds-table-header.d.ts +2 -6
- package/dist/types/mds-table-header.server.d.ts +3 -3
- package/dist/types/mds-table-row.d.ts +2 -6
- package/dist/types/mds-table-row.server.d.ts +3 -3
- package/dist/types/mds-table.d.ts +4 -8
- package/dist/types/mds-table.server.d.ts +4 -4
- package/dist/types/mds-text.d.ts +2 -6
- package/dist/types/mds-text.server.d.ts +3 -3
- package/dist/types/mds-toast-region.d.ts +2 -6
- package/dist/types/mds-toast-region.server.d.ts +3 -3
- package/dist/types/mds-toast.d.ts +4 -8
- package/dist/types/mds-toast.server.d.ts +4 -4
- package/dist/types/mds-tooltip.d.ts +2 -6
- package/dist/types/mds-tooltip.server.d.ts +3 -3
- package/dist/types/mds-tree-item.d.ts +4 -8
- package/dist/types/mds-tree-item.server.d.ts +4 -4
- package/dist/types/mds-tree.d.ts +2 -6
- package/dist/types/mds-tree.server.d.ts +3 -3
- package/dist/types/mds-url-view.d.ts +4 -8
- package/dist/types/mds-url-view.server.d.ts +4 -4
- package/dist/types/mds-usage.d.ts +2 -6
- package/dist/types/mds-usage.server.d.ts +3 -3
- package/dist/types/mds-video-wall.d.ts +2 -6
- package/dist/types/mds-video-wall.server.d.ts +3 -3
- package/dist/types/mds-zero.d.ts +2 -6
- package/dist/types/mds-zero.server.d.ts +3 -3
- 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. |
|