@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,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
try: Look at the start edge: the name of the application in the bar, the title and the table start on one line, and the table takes the whole frame. Narrow the stage: the gutter stays the same at every width.
|
|
3
|
+
height: 520
|
|
4
|
+
whole-page: true
|
|
5
|
+
-->
|
|
6
|
+
<mds-header>
|
|
7
|
+
<mds-header-bar>
|
|
8
|
+
<mds-text typography="h6" tag="p">Servizi demografici</mds-text>
|
|
9
|
+
<mds-button slot="nav" href="#" aria-current="page" variant="dark" tone="weak">Pratiche</mds-button>
|
|
10
|
+
<mds-button slot="nav" href="#" variant="dark" tone="text">Archivio</mds-button>
|
|
11
|
+
<mds-button id="persona" slot="nav" icon="mi/baseline/account-circle" variant="dark" tone="text" aria-label="Account di Mario Rossi"></mds-button>
|
|
12
|
+
</mds-header-bar>
|
|
13
|
+
<nav slot="menu" class="grid gap-inline p-inset">
|
|
14
|
+
<mds-button href="#" aria-current="page" variant="dark" tone="weak" class="w-full justify-start">Pratiche</mds-button>
|
|
15
|
+
<mds-button href="#" variant="dark" tone="text" class="w-full justify-start">Archivio</mds-button>
|
|
16
|
+
<mds-separator></mds-separator>
|
|
17
|
+
<mds-text typography="detail" tag="p" class="text-fg-muted">Mario Rossi</mds-text>
|
|
18
|
+
<mds-button href="#" variant="dark" tone="text" class="w-full justify-start">Profilo</mds-button>
|
|
19
|
+
<mds-button href="#" variant="dark" tone="text" class="w-full justify-start">Esci</mds-button>
|
|
20
|
+
</nav>
|
|
21
|
+
</mds-header>
|
|
22
|
+
<mds-dropdown target="#persona" placement="bottom-end" strategy="fixed">
|
|
23
|
+
<mds-text typography="detail" tag="p" class="text-fg-muted">Mario Rossi</mds-text>
|
|
24
|
+
<mds-button href="#" icon="mi/baseline/person" variant="dark" tone="text" label="Profilo"></mds-button>
|
|
25
|
+
<mds-separator></mds-separator>
|
|
26
|
+
<mds-button href="#" icon="mi/baseline/logout" variant="dark" tone="text" label="Esci"></mds-button>
|
|
27
|
+
</mds-dropdown>
|
|
28
|
+
<main class="page-frame grid gap-between-sections py-between-sections">
|
|
29
|
+
<header class="grid gap-title-content">
|
|
30
|
+
<mds-text typography="page" tag="h1">Pratiche di residenza</mds-text>
|
|
31
|
+
<mds-text typography="detail" tag="p" class="text-fg-muted">Le richieste degli ultimi trenta giorni, dalla più recente.</mds-text>
|
|
32
|
+
</header>
|
|
33
|
+
<mds-table class="w-full">
|
|
34
|
+
<mds-table-header>
|
|
35
|
+
<mds-table-header-cell label="Protocollo"></mds-table-header-cell>
|
|
36
|
+
<mds-table-header-cell label="Richiedente"></mds-table-header-cell>
|
|
37
|
+
</mds-table-header>
|
|
38
|
+
<mds-table-body>
|
|
39
|
+
<mds-table-row>
|
|
40
|
+
<mds-table-cell><mds-text typography="detail">2026/0412</mds-text></mds-table-cell>
|
|
41
|
+
<mds-table-cell><mds-text typography="detail">Giulia Bianchi</mds-text></mds-table-cell>
|
|
42
|
+
</mds-table-row>
|
|
43
|
+
<mds-table-row>
|
|
44
|
+
<mds-table-cell><mds-text typography="detail">2026/0398</mds-text></mds-table-cell>
|
|
45
|
+
<mds-table-cell><mds-text typography="detail">Luca Ferri</mds-text></mds-table-cell>
|
|
46
|
+
</mds-table-row>
|
|
47
|
+
</mds-table-body>
|
|
48
|
+
</mds-table>
|
|
49
|
+
</main>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
try: Narrow the stage with the handle at its right: the lines stay at about 70 characters, and follow the stage only once it is narrower than the measure.
|
|
3
|
+
-->
|
|
4
|
+
<div class="grid gap-title-content">
|
|
5
|
+
<mds-text typography="h3" tag="h1">Cambio di residenza</mds-text>
|
|
6
|
+
<mds-text typography="detail" tag="p">
|
|
7
|
+
Comunica il nuovo indirizzo entro venti giorni dal trasloco. L'ufficio anagrafe verifica la
|
|
8
|
+
dimora abituale con un sopralluogo della polizia locale e, se la verifica conferma quanto
|
|
9
|
+
dichiarato, registra la nuova residenza dalla data della richiesta.
|
|
10
|
+
</mds-text>
|
|
11
|
+
<mds-text typography="detail" tag="p">
|
|
12
|
+
A ogni passaggio della pratica ti scriviamo alla posta certificata che indichi: la conferma
|
|
13
|
+
della richiesta, la data del sopralluogo e l'esito della verifica.
|
|
14
|
+
</mds-text>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
---
|
|
2
|
+
# A Magma pattern: the format and the commands are in docs/PATTERNS.md.
|
|
3
|
+
id: record-detail
|
|
4
|
+
kind: pattern
|
|
5
|
+
title: Record detail
|
|
6
|
+
group: data
|
|
7
|
+
layer: magma
|
|
8
|
+
status: decided
|
|
9
|
+
need: >-
|
|
10
|
+
The person opens one record to read it and act on it, then goes back to the list as it was.
|
|
11
|
+
principle: The page shows the record as the back end saved it, and only the actions its status allows.
|
|
12
|
+
keywords: [detail, record, details page, view, status, actions, tabs, documents, history, edit, back to list]
|
|
13
|
+
not-for:
|
|
14
|
+
- need: finding the record in a long list
|
|
15
|
+
use: list-with-filters
|
|
16
|
+
- need: an action that cannot be taken back
|
|
17
|
+
use: confirm-action
|
|
18
|
+
- need: what a role may not see or do on the record
|
|
19
|
+
use: permissions
|
|
20
|
+
- need: two people changing the same record at the same time
|
|
21
|
+
use: concurrent-editing
|
|
22
|
+
- need: a record that does not exist
|
|
23
|
+
use: empty-state
|
|
24
|
+
- need: a record that is loading, or could not be loaded
|
|
25
|
+
use: loading
|
|
26
|
+
assumptions:
|
|
27
|
+
- The back end returns the record after every action, with its status and the actions the status allows.
|
|
28
|
+
- The application knows whether other people or systems change the record while it is on screen.
|
|
29
|
+
high-stakes: false
|
|
30
|
+
components: [mds-text, mds-badge, mds-button, mds-dropdown, mds-separator, mds-tab, mds-tab-item, mds-file, mds-author, mds-modal, mds-input-field, mds-input, mds-banner]
|
|
31
|
+
related: [list-with-filters, message-placement, confirm-action, empty-state, loading, error-recovery, form-and-validation, concurrent-editing, permissions, page-header, labels-and-values, app-shell]
|
|
32
|
+
validated-on: []
|
|
33
|
+
|
|
34
|
+
variables:
|
|
35
|
+
process: { values: ["yes", "no"], means: "yes: the record moves through a process, with a status, the actions the status allows and a history (a request, a payment); no: a record of data with no process (a contact, a product)" }
|
|
36
|
+
action: { values: [none, at-once, with-words, edit], means: "what the person is doing: none, reading; at-once, an action that needs nothing (take in charge); with-words, an action that needs a note or a reason (request documents, close with a reason); edit, changing the data of the record" }
|
|
37
|
+
changes: { values: ["no", by-others], means: "by-others: other people or systems change the record while it is on screen" }
|
|
38
|
+
|
|
39
|
+
cases:
|
|
40
|
+
- { id: work-on-it, process: "yes", action: none, changes: "no", where: "back to the list; the number, the subject as the heading, the status, where it belongs and when it arrived; the actions the status allows, the main one last; the parts in tabs (data, documents, history)", use: ["mds-text tag=h1", "mds-badge", "mds-button", "mds-tab", "mds-tab-item href", "mds-file", "mds-author"] }
|
|
41
|
+
- { id: read-the-data, process: "no", action: none, changes: "no", where: "back to the list; the name as the heading; Edit, and Delete last in the menu of the record, after a separator, in the error text tone with its icon (it asks first); the data as labels and values, the parts in tabs when there is more than one", use: ["mds-text tag=h1", "mds-button", "mds-dropdown", "mds-separator", "mds-button variant=error tone=text icon", "mds-text tag=dl"], see: confirm-action }
|
|
42
|
+
- { id: run-at-once, action: at-once, changes: "no", where: "the button waits; then the page shows the record the back end returns, the outcome is a toast, and the focus goes to the heading when the button is gone", use: ["mds-button await"], see: message-placement }
|
|
43
|
+
- { id: ask-for-words, action: with-words, changes: "no", where: "a dialog named after the action, with a required field; left empty, the field says what is missing and takes the focus; the confirm button repeats the action; a failure stays in the dialog with what was written", use: ["mds-modal", "mds-input-field", "mds-input type=textarea required", "mds-button type=submit await"] }
|
|
44
|
+
- { id: edit-data, action: edit, changes: "no", where: "Edit, one of the actions the status allows, turns the page into the form, at the address of the record with /edit; Save returns to the detail with a toast and the focus on the heading; Cancel or Back return to it as it was", use: ["mds-button"], see: form-and-validation }
|
|
45
|
+
- { id: record-changed, changes: by-others, action: [none, at-once, with-words], where: "an info banner under the identity says who changed the record and when, and that the actions on screen may no longer hold; Show, its action, loads the record again; nothing else changes before the click; then the banner goes and the focus goes to the heading", use: ["mds-banner variant=info", "mds-button slot=action variant=info tone=strong"] }
|
|
46
|
+
gaps: []
|
|
47
|
+
not-applicable:
|
|
48
|
+
- { action: edit, changes: by-others, why: "two people changing the same record at the same time is the candidate concurrent-editing" }
|
|
49
|
+
|
|
50
|
+
always-true:
|
|
51
|
+
- id: status-decides-actions
|
|
52
|
+
rule: Only the actions the status allows are on screen; never an action shown disabled to guess about.
|
|
53
|
+
checked-by: review
|
|
54
|
+
- id: main-action-last
|
|
55
|
+
rule: "The main action comes last, in the strong tone; the others are outlined, `variant=\"dark\" tone=\"outline\"`; an action that destroys the record is never among them, it goes last in the menu of the record."
|
|
56
|
+
checked-by: review
|
|
57
|
+
- id: shows-what-was-saved
|
|
58
|
+
rule: After an action the page shows the record the back end returns, never a guess of the page.
|
|
59
|
+
checked-by: review
|
|
60
|
+
- id: address-holds-record-and-tab
|
|
61
|
+
rule: "The address holds the record and the tab: a link to the history of a record opens on its history."
|
|
62
|
+
checked-by: review
|
|
63
|
+
- id: back-as-it-was
|
|
64
|
+
rule: Back to the list returns to it with its search, its filters and its page.
|
|
65
|
+
checked-by: review
|
|
66
|
+
- id: focus-to-heading
|
|
67
|
+
rule: When the control of an action is gone, the focus goes to the heading of the page, never to the top of the page.
|
|
68
|
+
checked-by: review
|
|
69
|
+
- id: keep-the-work
|
|
70
|
+
from: error-recovery
|
|
71
|
+
- id: verb-not-ok
|
|
72
|
+
from: confirm-action
|
|
73
|
+
- id: not-an-error
|
|
74
|
+
from: empty-state
|
|
75
|
+
- id: nothing-moves-by-itself
|
|
76
|
+
from: list-with-filters
|
|
77
|
+
|
|
78
|
+
open-choices:
|
|
79
|
+
- { id: next-record, default: "none: Back returns to the list as it was", may: "add Previous and Next, which follow the query of the list, for a product that works through a queue" }
|
|
80
|
+
|
|
81
|
+
situations:
|
|
82
|
+
- { situation: An operator opens a request from the list and reads its documents, case: work-on-it }
|
|
83
|
+
- { situation: "A colleague sends a link to the history of a request", case: work-on-it, note: "it opens on the History tab" }
|
|
84
|
+
- { situation: A contact opens from the address book, case: read-the-data }
|
|
85
|
+
- { situation: A request is taken in charge, case: run-at-once }
|
|
86
|
+
- { situation: "Documents are requested from the applicant, with a note", case: ask-for-words }
|
|
87
|
+
- { situation: A request is closed with a reason, case: ask-for-words }
|
|
88
|
+
- { situation: "An operator works through a queue of requests, one after the other", case: work-on-it, note: "Previous and Next are a choice of the product (next-record)" }
|
|
89
|
+
- { situation: The address of a contact is corrected, case: edit-data }
|
|
90
|
+
- { situation: A colleague takes the request in charge while it is open, case: record-changed }
|
|
91
|
+
- { situation: A contact is deleted, use: confirm-action }
|
|
92
|
+
- { situation: Two people change the same contact at the same time, use: concurrent-editing }
|
|
93
|
+
- { situation: An address leads to a request that was deleted, use: empty-state }
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
# Record detail
|
|
97
|
+
|
|
98
|
+
**The page shows the record as the back end saved it, and only the actions its status allows.**
|
|
99
|
+
|
|
100
|
+
## When to use it
|
|
101
|
+
|
|
102
|
+
The page of one record people work on over time, opened from a list (`list-with-filters`) or a
|
|
103
|
+
link: a request, a payment, a document; or a record of data with no process, a contact, a
|
|
104
|
+
product. Something else fits better: a record with a few fields and nothing to do with it goes
|
|
105
|
+
in its row of the list, or in a panel next to it, with no page of its own; records to compare go
|
|
106
|
+
in the list, side by side in its columns.
|
|
107
|
+
|
|
108
|
+
## What decides it
|
|
109
|
+
|
|
110
|
+
Three questions: whether the record moves through a process (a status, actions, a history),
|
|
111
|
+
what the person is doing on it (reading, an action that needs nothing, an action that needs
|
|
112
|
+
words, changing its data), and whether other people change it while it is on screen.
|
|
113
|
+
|
|
114
|
+
## Cases
|
|
115
|
+
|
|
116
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
117
|
+
|
|
118
|
+
| Variable | Values | Means |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| `process` | `yes`, `no` | yes: the record moves through a process, with a status, the actions the status allows and a history (a request, a payment); no: a record of data with no process (a contact, a product) |
|
|
121
|
+
| `action` | `none`, `at-once`, `with-words`, `edit` | what the person is doing: none, reading; at-once, an action that needs nothing (take in charge); with-words, an action that needs a note or a reason (request documents, close with a reason); edit, changing the data of the record |
|
|
122
|
+
| `changes` | `no`, `by-others` | by-others: other people or systems change the record while it is on screen |
|
|
123
|
+
|
|
124
|
+
A case that leaves a variable out holds for any of its values.
|
|
125
|
+
|
|
126
|
+
| Case | When | Where | Use |
|
|
127
|
+
| --- | --- | --- | --- |
|
|
128
|
+
| `work-on-it` | process: yes; action: none; changes: no | back to the list; the number, the subject as the heading, the status, where it belongs and when it arrived; the actions the status allows, the main one last; the parts in tabs (data, documents, history) | `mds-text tag=h1`, `mds-badge`, `mds-button`, `mds-tab`, `mds-tab-item href`, `mds-file`, `mds-author` |
|
|
129
|
+
| `read-the-data` | process: no; action: none; changes: no | back to the list; the name as the heading; Edit, and Delete last in the menu of the record, after a separator, in the error text tone with its icon (it asks first); the data as labels and values, the parts in tabs when there is more than one; see `confirm-action` | `mds-text tag=h1`, `mds-button`, `mds-dropdown`, `mds-separator`, `mds-button variant=error tone=text icon`, `mds-text tag=dl` |
|
|
130
|
+
| `run-at-once` | action: at-once; changes: no | the button waits; then the page shows the record the back end returns, the outcome is a toast, and the focus goes to the heading when the button is gone; see `message-placement` | `mds-button await` |
|
|
131
|
+
| `ask-for-words` | action: with-words; changes: no | a dialog named after the action, with a required field; left empty, the field says what is missing and takes the focus; the confirm button repeats the action; a failure stays in the dialog with what was written | `mds-modal`, `mds-input-field`, `mds-input type=textarea required`, `mds-button type=submit await` |
|
|
132
|
+
| `edit-data` | action: edit; changes: no | Edit, one of the actions the status allows, turns the page into the form, at the address of the record with /edit; Save returns to the detail with a toast and the focus on the heading; Cancel or Back return to it as it was; see `form-and-validation` | `mds-button` |
|
|
133
|
+
| `record-changed` | action: none or at-once or with-words; changes: by-others | an info banner under the identity says who changed the record and when, and that the actions on screen may no longer hold; Show, its action, loads the record again; nothing else changes before the click; then the banner goes and the focus goes to the heading | `mds-banner variant=info`, `mds-button slot=action variant=info tone=strong` |
|
|
134
|
+
|
|
135
|
+
Not applicable:
|
|
136
|
+
|
|
137
|
+
| When | Why |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| action: edit; changes: by-others | two people changing the same record at the same time is the candidate concurrent-editing |
|
|
140
|
+
|
|
141
|
+
No gaps: every combination has a case or is not applicable.
|
|
142
|
+
|
|
143
|
+
## Parts
|
|
144
|
+
|
|
145
|
+
- **Back to the list**: a link that returns to the list as it was.
|
|
146
|
+
- **The identity**: the number of the record, small, above its subject, which is the heading of
|
|
147
|
+
the page (`h1`, `tabindex="-1"` so the focus can go to it); the status as `mds-badge`; a line
|
|
148
|
+
with where it belongs and when it arrived.
|
|
149
|
+
- **The actions**: the ones the status allows, as `mds-button`, the main one last in the strong
|
|
150
|
+
tone. Back to the list, the identity and the actions are the block `page-header`.
|
|
151
|
+
- **The tabs**: the data, the documents and the history, one at a time (`mds-tab`), only when
|
|
152
|
+
there is more than one part; a section of their own, right under the header.
|
|
153
|
+
- **The data**: labels and values, in two columns when there is room: the block
|
|
154
|
+
`labels-and-values`, a `dl` of `mds-text` (`tag="dt"`, `tag="dd"`).
|
|
155
|
+
- **The documents**: one `mds-file` for each file.
|
|
156
|
+
- **The history**: who did what, and when (`mds-author`), the newest first, with the note written
|
|
157
|
+
with the action.
|
|
158
|
+
|
|
159
|
+
## Behaviour over time
|
|
160
|
+
|
|
161
|
+
- The first load is `loading`; a record that does not exist is the `not-found` case of
|
|
162
|
+
`empty-state`; a record that could not be loaded is `retry-content` of `error-recovery`.
|
|
163
|
+
- An action that needs nothing runs at once; one that needs words asks for them in a dialog
|
|
164
|
+
first.
|
|
165
|
+
- After an action the status, the actions and the history come from the answer of the back end;
|
|
166
|
+
the outcome is a toast (`message-placement`); the button that ran it may be gone, so the focus
|
|
167
|
+
goes to the heading.
|
|
168
|
+
- A failed action changes nothing: the record stays as it was, the dialog stays open with what
|
|
169
|
+
was written, and a banner in it says to try again.
|
|
170
|
+
- When the list opened the record, Back to the list goes back in the history of the browser, and
|
|
171
|
+
the list comes back with its query; from a link, it opens the list with no filters.
|
|
172
|
+
- A record that is deleted takes the person back to the list, with a toast (`message-placement`).
|
|
173
|
+
- Edit turns the page into the form, at its own address: Back leaves it, a reload keeps it. What
|
|
174
|
+
is checked and when, and what happens to changes not saved, is `form-and-validation`.
|
|
175
|
+
- Someone else changes the record: an info banner under the identity says who and when ("Anna
|
|
176
|
+
Bianchi took the request in charge at 10:42") and that the actions may no longer hold, and
|
|
177
|
+
Show loads it again; the banner goes and the focus goes to the heading. Nothing else changes
|
|
178
|
+
before that: the banner pushes the content down once, when it comes. An action sent
|
|
179
|
+
meanwhile, from the page or from an open dialog, that the new status no longer allows is
|
|
180
|
+
refused by the back end: `changed-meanwhile` of `error-recovery`.
|
|
181
|
+
|
|
182
|
+
## Always true
|
|
183
|
+
|
|
184
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
185
|
+
|
|
186
|
+
These hold in every product: a product layer cannot change them.
|
|
187
|
+
|
|
188
|
+
| Id | Rule | Checked by |
|
|
189
|
+
| --- | --- | --- |
|
|
190
|
+
| `status-decides-actions` | Only the actions the status allows are on screen; never an action shown disabled to guess about. | review |
|
|
191
|
+
| `main-action-last` | The main action comes last, in the strong tone; the others are outlined, `variant="dark" tone="outline"`; an action that destroys the record is never among them, it goes last in the menu of the record. | review |
|
|
192
|
+
| `shows-what-was-saved` | After an action the page shows the record the back end returns, never a guess of the page. | review |
|
|
193
|
+
| `address-holds-record-and-tab` | The address holds the record and the tab: a link to the history of a record opens on its history. | review |
|
|
194
|
+
| `back-as-it-was` | Back to the list returns to it with its search, its filters and its page. | review |
|
|
195
|
+
| `focus-to-heading` | When the control of an action is gone, the focus goes to the heading of the page, never to the top of the page. | review |
|
|
196
|
+
| `keep-the-work` | A failure never loses what the person wrote or chose. (from `error-recovery`) | review |
|
|
197
|
+
| `verb-not-ok` | The confirm button repeats the verb ("Delete"), never "OK" or "Yes". (from `confirm-action`) | review; a lint on the known words is possible |
|
|
198
|
+
| `not-an-error` | A part that failed to load is an error, never an empty state. (from `empty-state`) | review |
|
|
199
|
+
| `nothing-moves-by-itself` | Items added or changed by others never move what is on screen; they wait until the person asks for them. (from `list-with-filters`) | review |
|
|
200
|
+
|
|
201
|
+
## Open choices
|
|
202
|
+
|
|
203
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
204
|
+
|
|
205
|
+
The default decides these; a product layer may narrow them.
|
|
206
|
+
|
|
207
|
+
| Id | Default | A product may |
|
|
208
|
+
| --- | --- | --- |
|
|
209
|
+
| `next-record` | none: Back returns to the list as it was | add Previous and Next, which follow the query of the list, for a product that works through a queue |
|
|
210
|
+
|
|
211
|
+
## Situations
|
|
212
|
+
|
|
213
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
214
|
+
|
|
215
|
+
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.
|
|
216
|
+
|
|
217
|
+
| Situation | Case |
|
|
218
|
+
| --- | --- |
|
|
219
|
+
| An operator opens a request from the list and reads its documents | `work-on-it` |
|
|
220
|
+
| A colleague sends a link to the history of a request | `work-on-it`: it opens on the History tab |
|
|
221
|
+
| A contact opens from the address book | `read-the-data` |
|
|
222
|
+
| A request is taken in charge | `run-at-once` |
|
|
223
|
+
| Documents are requested from the applicant, with a note | `ask-for-words` |
|
|
224
|
+
| A request is closed with a reason | `ask-for-words` |
|
|
225
|
+
| An operator works through a queue of requests, one after the other | `work-on-it`: Previous and Next are a choice of the product (next-record) |
|
|
226
|
+
| The address of a contact is corrected | `edit-data` |
|
|
227
|
+
| A colleague takes the request in charge while it is open | `record-changed` |
|
|
228
|
+
| A contact is deleted | not here: `confirm-action` |
|
|
229
|
+
| Two people change the same contact at the same time | not here: `concurrent-editing` |
|
|
230
|
+
| An address leads to a request that was deleted | not here: `empty-state` |
|
|
231
|
+
|
|
232
|
+
## Accessibility
|
|
233
|
+
|
|
234
|
+
- The subject is the heading of the page; the number above it and the line below are text.
|
|
235
|
+
- The outcome of an action is a toast in the `mds-toast-region`, read out without moving the
|
|
236
|
+
focus.
|
|
237
|
+
- The dialog is named by its title and takes the focus when it opens; the required field says in
|
|
238
|
+
words what is missing.
|
|
239
|
+
- The data is a description list, so every value is read with its label.
|
|
240
|
+
- The line of a change made by others is read out when it appears, without moving the focus.
|
|
241
|
+
- The documents are buttons, announced as such and opened from the keyboard (`mds-file`).
|
|
242
|
+
|
|
243
|
+
## Content
|
|
244
|
+
|
|
245
|
+
- The heading is what the record is about, "Change of residence"; the number goes above it,
|
|
246
|
+
smaller: people recognise a subject, and copy a number.
|
|
247
|
+
- Actions are named after what they do to the record, with a verb: "Request documents", "Close
|
|
248
|
+
request", never "OK" or "Proceed"; the confirm button of a dialog repeats it.
|
|
249
|
+
- The text of a dialog says what follows: who receives what, and whether it can be undone.
|
|
250
|
+
- A line of the history says who did what, and when; the note stays as it was written.
|
|
251
|
+
- The outcome of an action is in the past: "The request was closed."
|
|
252
|
+
|
|
253
|
+
## Magma gaps
|
|
254
|
+
|
|
255
|
+
- No component for labels and values in two columns: a `dl` of `mds-text` with `tag="dt"` and
|
|
256
|
+
`tag="dd"`, laid out as the block `labels-and-values` says.
|
|
257
|
+
|
|
258
|
+
## Decisions
|
|
259
|
+
|
|
260
|
+
| Date | Decision | Why |
|
|
261
|
+
| --- | --- | --- |
|
|
262
|
+
| 2026-10-29 | The status decides the actions, an action that needs words asks for them first, the page shows what the back end returns, a failed action changes nothing, the address holds the record and the tab, Back returns to the list as it was, not found is not an error | The draft page of the docs site, `patterns/record-detail`, and its example. |
|
|
263
|
+
| 2026-10-29 | Draft with variables; changing the data and the record changed by others left as gaps | The sources do not settle them. |
|
|
264
|
+
| 2026-10-29 | Edit turns the page into the form, at its own address (`edit-data`) | One rule for any length of form; Back and a reload work; the form follows `form-and-validation`. |
|
|
265
|
+
| 2026-10-29 | A change made by others waits behind a line with who, when and Show (`record-changed`) | As in `list-with-filters`: nothing moves under the pointer, and the person learns before the click that an action may no longer hold. |
|
|
266
|
+
| 2026-10-29 | Previous and Next are a product's choice (`next-record`) | Most records are opened one at a time; a product that works through a queue adds them. |
|
|
267
|
+
| 2026-10-31 | The actions other than the main one are outlined (`variant="dark" tone="outline"`); Delete leaves the row for the menu of the record, last after a separator, in the error text tone with its icon | The design language, #1189: `actions/secondary`, `actions/destructive-in-menu` and the severity of a deletion (level 2: the menu of the item, and a confirmation that names it). |
|
|
268
|
+
| 2026-11-03 | A record changed by others shows an info banner under the identity, with Show (`record-changed`), not the quiet line of `show-new-items` | The change of the record that is open can make its actions wrong, and the banner is not missed; it moves the content once, which the line of a list avoids. Chosen in review round 2 of the previews (https://github.com/magma-design-system/magma/issues/1233), over the line. |
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rhythm
|
|
3
|
+
kind: foundation
|
|
4
|
+
title: Rhythm
|
|
5
|
+
layer: magma
|
|
6
|
+
status: decided
|
|
7
|
+
need: >-
|
|
8
|
+
Space two elements of a composition by how they relate, so that each one stands nearer to
|
|
9
|
+
what it belongs to than to its neighbour.
|
|
10
|
+
principle: >-
|
|
11
|
+
The space between two elements says how they relate: one step of a ladder for each relation,
|
|
12
|
+
never a value of your own.
|
|
13
|
+
keywords: [rhythm, spacing, space, gap, padding, margin, proximity, distance, inset, ladder]
|
|
14
|
+
assumptions:
|
|
15
|
+
- "The values are those of the standard density: a denser or a roomier screen scales every step by one factor (the domain density)."
|
|
16
|
+
- "The space inside a control (the padding of a button, of an input) is the component's own, not a relation."
|
|
17
|
+
components: [mds-input-field, mds-banner, mds-note, mds-dropdown, mds-card]
|
|
18
|
+
related: []
|
|
19
|
+
validated-on: []
|
|
20
|
+
|
|
21
|
+
variables:
|
|
22
|
+
relation:
|
|
23
|
+
values: [inline, title-content, label-control, between-fields, content-actions, between-groups, between-sections, inset, between-containers]
|
|
24
|
+
means: "How the two elements relate: side by side in one row, a title and what it names, a label and its control, two fields of a group, the content of a container and the row of actions that closes it, two groups of a section, two sections of the page, the content and the edge of its container, two containers with a boundary of their own."
|
|
25
|
+
|
|
26
|
+
cases:
|
|
27
|
+
- id: inline
|
|
28
|
+
relation: inline
|
|
29
|
+
where: "`gap-inline` (300) between elements side by side in one row: the actions of a row, a field and the button beside it"
|
|
30
|
+
serves: intuitive
|
|
31
|
+
carried-by: [--magma-rhythm-inline, gap-inline]
|
|
32
|
+
- id: title-content
|
|
33
|
+
relation: title-content
|
|
34
|
+
where: "`gap-title-content` (300) between a title and the content it names"
|
|
35
|
+
serves: intuitive
|
|
36
|
+
carried-by: [--magma-rhythm-title-content, gap-title-content]
|
|
37
|
+
- id: label-control
|
|
38
|
+
relation: label-control
|
|
39
|
+
where: "`gap-label-control` (300) between the label of a field, its control and its message"
|
|
40
|
+
serves: intuitive
|
|
41
|
+
carried-by: [mds-input-field, --magma-rhythm-label-control, gap-label-control]
|
|
42
|
+
- id: between-fields
|
|
43
|
+
relation: between-fields
|
|
44
|
+
where: "`gap-between-fields` (600) between two fields of a form, or two rows of data"
|
|
45
|
+
serves: intuitive
|
|
46
|
+
carried-by: [--magma-rhythm-between-fields, gap-between-fields]
|
|
47
|
+
- id: content-actions
|
|
48
|
+
relation: content-actions
|
|
49
|
+
where: "`gap-content-actions` (600) between the content of a container and the row of actions that closes it: the footer of a card, the row of a form, the actions of the window of a dialog"
|
|
50
|
+
serves: intuitive
|
|
51
|
+
carried-by: [mds-card, --magma-rhythm-content-actions, gap-content-actions]
|
|
52
|
+
- id: between-groups
|
|
53
|
+
relation: between-groups
|
|
54
|
+
where: "`gap-between-groups` (1000) between two groups of fields of one form (the fieldsets of personal data and of residence)"
|
|
55
|
+
serves: intuitive
|
|
56
|
+
carried-by: [--magma-rhythm-between-groups, gap-between-groups]
|
|
57
|
+
- id: between-sections
|
|
58
|
+
relation: between-sections
|
|
59
|
+
where: "`gap-between-sections` (1600) between two sections of a page, each with its title"
|
|
60
|
+
serves: intuitive
|
|
61
|
+
carried-by: [--magma-rhythm-between-sections, gap-between-sections]
|
|
62
|
+
- id: inset
|
|
63
|
+
relation: inset
|
|
64
|
+
where: "`p-inset` (600) inside a container of a part (a card, a banner, a note, a dropdown, the window of a dialog), shared by its regions"
|
|
65
|
+
serves: intuitive
|
|
66
|
+
carried-by: [mds-card, mds-banner, mds-note, mds-dropdown, --magma-rhythm-inset, p-inset]
|
|
67
|
+
- id: between-containers
|
|
68
|
+
relation: between-containers
|
|
69
|
+
where: "`gap-between-containers` (400) between containers with a boundary of their own (the cards of a section, of a grid, of a list of cards)"
|
|
70
|
+
serves: intuitive
|
|
71
|
+
carried-by: [--magma-rhythm-between-containers, gap-between-containers]
|
|
72
|
+
|
|
73
|
+
gaps: []
|
|
74
|
+
not-applicable: []
|
|
75
|
+
|
|
76
|
+
always-true:
|
|
77
|
+
- id: step-ratio
|
|
78
|
+
rule: "Between relations with no boundary, each step is at least 1.5 times the step it contains: an element stands nearer to what it belongs to than to its neighbour."
|
|
79
|
+
serves: intuitive
|
|
80
|
+
checked-by: review
|
|
81
|
+
- id: shared-inset
|
|
82
|
+
rule: "The regions of a container share its inset: the title, the content and the actions of a card stand inside one p-600, their paddings never add up."
|
|
83
|
+
serves: intuitive
|
|
84
|
+
carried-by: [mds-card, mds-banner]
|
|
85
|
+
checked-by: review
|
|
86
|
+
- id: media-bleed
|
|
87
|
+
rule: "The media of a container (the image of a card) reaches the edges of the container it touches and stands from the other regions as they stand from each other: the inset keeps text away from the edge, and an image has no text to keep away."
|
|
88
|
+
serves: intuitive
|
|
89
|
+
carried-by: [mds-card]
|
|
90
|
+
checked-by: review
|
|
91
|
+
- id: ladder-only
|
|
92
|
+
rule: "Every space between the elements of a composition is the step of its relation: 300, 400 between containers only, 600, 1000, 1600 at the standard density. No other value, no Tailwind t-shirt name (gap-lg)."
|
|
93
|
+
serves: [intuitive, flexible]
|
|
94
|
+
checked-by: review
|
|
95
|
+
note: "check.patterns will hold the previews to it (#1189, the previews redone on the rules)"
|
|
96
|
+
|
|
97
|
+
open-choices: []
|
|
98
|
+
|
|
99
|
+
situations:
|
|
100
|
+
- { situation: "Annulla and Salva side by side at the end of a form", case: inline }
|
|
101
|
+
- { situation: "The title of a card and its text", case: title-content }
|
|
102
|
+
- { situation: "The label of a field above its input", case: label-control }
|
|
103
|
+
- { situation: "The fields of a form in a dialog", case: between-fields }
|
|
104
|
+
- { situation: "Apri under the data of a card in a list of requests", case: content-actions }
|
|
105
|
+
- { situation: "The personal data and the residence of a long form, each in its fieldset", case: between-groups }
|
|
106
|
+
- { situation: "The sections of the page of a record", case: between-sections }
|
|
107
|
+
- { situation: "The header of a page and the content under it", case: between-sections, note: "the header (the block page-header) is the first section of the page" }
|
|
108
|
+
- { situation: "The content of a card, a banner or the window of a dialog", case: inset }
|
|
109
|
+
- { situation: "The cards of a list of results", case: between-containers }
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
# Rhythm
|
|
113
|
+
|
|
114
|
+
**The space between two elements says how they relate: one step of a ladder for each relation, never a value of your own.**
|
|
115
|
+
|
|
116
|
+
## When to use it
|
|
117
|
+
|
|
118
|
+
Every time two elements stand together in a composition: in a page, a form, a dialog, a card,
|
|
119
|
+
a banner. The relation between them picks the step; the step is never chosen by eye.
|
|
120
|
+
|
|
121
|
+
Not here: the space inside a control (the padding of a button, the height of an input), which
|
|
122
|
+
the component draws and the density scales; the width of a column or of a dialog, which is the
|
|
123
|
+
domain of the widths.
|
|
124
|
+
|
|
125
|
+
## What decides it
|
|
126
|
+
|
|
127
|
+
One question: how do the two elements relate? Side by side in one row; a title and the content
|
|
128
|
+
it names; a label and its control; two fields of one group; the content of a container and the
|
|
129
|
+
row of actions that closes it; two groups of one form; two sections of the page; the content and
|
|
130
|
+
the edge of the container around it; two containers that have a boundary of their own (a border,
|
|
131
|
+
a shadow, a surface). An image is not text: it reaches the edges of its container instead of
|
|
132
|
+
keeping the inset from them (`media-bleed`).
|
|
133
|
+
|
|
134
|
+
## Cases
|
|
135
|
+
|
|
136
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
137
|
+
|
|
138
|
+
| Variable | Values | Means |
|
|
139
|
+
| --- | --- | --- |
|
|
140
|
+
| `relation` | `inline`, `title-content`, `label-control`, `between-fields`, `content-actions`, `between-groups`, `between-sections`, `inset`, `between-containers` | How the two elements relate: side by side in one row, a title and what it names, a label and its control, two fields of a group, the content of a container and the row of actions that closes it, two groups of a section, two sections of the page, the content and the edge of its container, two containers with a boundary of their own. |
|
|
141
|
+
|
|
142
|
+
A case that leaves a variable out holds for any of its values.
|
|
143
|
+
|
|
144
|
+
| Case | When | Where | Use | Serves | Carried by |
|
|
145
|
+
| --- | --- | --- | --- | --- | --- |
|
|
146
|
+
| `inline` | relation: inline | `gap-inline` (300) between elements side by side in one row: the actions of a row, a field and the button beside it | | intuitive | `--magma-rhythm-inline`, `gap-inline` |
|
|
147
|
+
| `title-content` | relation: title-content | `gap-title-content` (300) between a title and the content it names | | intuitive | `--magma-rhythm-title-content`, `gap-title-content` |
|
|
148
|
+
| `label-control` | relation: label-control | `gap-label-control` (300) between the label of a field, its control and its message | | intuitive | `mds-input-field`, `--magma-rhythm-label-control`, `gap-label-control` |
|
|
149
|
+
| `between-fields` | relation: between-fields | `gap-between-fields` (600) between two fields of a form, or two rows of data | | intuitive | `--magma-rhythm-between-fields`, `gap-between-fields` |
|
|
150
|
+
| `content-actions` | relation: content-actions | `gap-content-actions` (600) between the content of a container and the row of actions that closes it: the footer of a card, the row of a form, the actions of the window of a dialog | | intuitive | `mds-card`, `--magma-rhythm-content-actions`, `gap-content-actions` |
|
|
151
|
+
| `between-groups` | relation: between-groups | `gap-between-groups` (1000) between two groups of fields of one form (the fieldsets of personal data and of residence) | | intuitive | `--magma-rhythm-between-groups`, `gap-between-groups` |
|
|
152
|
+
| `between-sections` | relation: between-sections | `gap-between-sections` (1600) between two sections of a page, each with its title | | intuitive | `--magma-rhythm-between-sections`, `gap-between-sections` |
|
|
153
|
+
| `inset` | relation: inset | `p-inset` (600) inside a container of a part (a card, a banner, a note, a dropdown, the window of a dialog), shared by its regions | | intuitive | `mds-card`, `mds-banner`, `mds-note`, `mds-dropdown`, `--magma-rhythm-inset`, `p-inset` |
|
|
154
|
+
| `between-containers` | relation: between-containers | `gap-between-containers` (400) between containers with a boundary of their own (the cards of a section, of a grid, of a list of cards) | | intuitive | `--magma-rhythm-between-containers`, `gap-between-containers` |
|
|
155
|
+
|
|
156
|
+
No gaps: every combination has a case or is not applicable.
|
|
157
|
+
|
|
158
|
+
## Always true
|
|
159
|
+
|
|
160
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
161
|
+
|
|
162
|
+
These hold in every product: a product layer cannot change them.
|
|
163
|
+
|
|
164
|
+
| Id | Rule | Serves | Carried by | Checked by |
|
|
165
|
+
| --- | --- | --- | --- | --- |
|
|
166
|
+
| `step-ratio` | Between relations with no boundary, each step is at least 1.5 times the step it contains: an element stands nearer to what it belongs to than to its neighbour. | intuitive | the guide | review |
|
|
167
|
+
| `shared-inset` | The regions of a container share its inset: the title, the content and the actions of a card stand inside one p-600, their paddings never add up. | intuitive | `mds-card`, `mds-banner` | review |
|
|
168
|
+
| `media-bleed` | The media of a container (the image of a card) reaches the edges of the container it touches and stands from the other regions as they stand from each other: the inset keeps text away from the edge, and an image has no text to keep away. | intuitive | `mds-card` | review |
|
|
169
|
+
| `ladder-only` | Every space between the elements of a composition is the step of its relation: 300, 400 between containers only, 600, 1000, 1600 at the standard density. No other value, no Tailwind t-shirt name (gap-lg). | intuitive, flexible | the guide | review; check.patterns will hold the previews to it (#1189, the previews redone on the rules) |
|
|
170
|
+
|
|
171
|
+
## Situations
|
|
172
|
+
|
|
173
|
+
<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
|
|
177
|
+
| Situation | Case |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| Annulla and Salva side by side at the end of a form | `inline` |
|
|
180
|
+
| The title of a card and its text | `title-content` |
|
|
181
|
+
| The label of a field above its input | `label-control` |
|
|
182
|
+
| The fields of a form in a dialog | `between-fields` |
|
|
183
|
+
| Apri under the data of a card in a list of requests | `content-actions` |
|
|
184
|
+
| The personal data and the residence of a long form, each in its fieldset | `between-groups` |
|
|
185
|
+
| The sections of the page of a record | `between-sections` |
|
|
186
|
+
| The header of a page and the content under it | `between-sections`: the header (the block page-header) is the first section of the page |
|
|
187
|
+
| The content of a card, a banner or the window of a dialog | `inset` |
|
|
188
|
+
| The cards of a list of results | `between-containers` |
|
|
189
|
+
|
|
190
|
+
## Magma gaps
|
|
191
|
+
|
|
192
|
+
- `mds-banner` draws its 600 (the inset, the space between its body and its actions) with
|
|
193
|
+
`--spacing(600)`, not with the roles: a density theme does not move it (`inset`,
|
|
194
|
+
`content-actions`).
|
|
195
|
+
- The previews of the patterns use other steps (300 between fields, 200 between actions): they
|
|
196
|
+
are redone on these rules (#1189, "The previews and the Layout of the blocks redone on the
|
|
197
|
+
rules").
|
|
198
|
+
|
|
199
|
+
## Decisions
|
|
200
|
+
|
|
201
|
+
| Date | Decision | Why |
|
|
202
|
+
| --- | --- | --- |
|
|
203
|
+
| 2026-10-29 | The space by relation, in steps of `--spacing`: in a row 200, a title and its content 300, between fields 600, between groups 1000, between sections 1600; each step at least 1.5 times the one it contains (`step-ratio`). | An element stands nearer to what it belongs to than to its neighbour; the ladder starts from the 300 that `mds-input-field` puts between a label and its control. Rejected: the scale of the previews (200, 200, 300, 600, 600), with fields as near as a label to its control. Comment on #1189: https://github.com/magma-design-system/magma/issues/1189#issuecomment-6510058376 |
|
|
204
|
+
| 2026-10-30 | The inset of a container of a part is `p-600`, shared by its regions (`inset`, `shared-inset`). | Banner, note and dropdown already pad 600; a card that pads 400 in each region puts its title 800 from its content, farther than two fields. Rejected: the card of today; `p-400` shared. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6510576013 |
|
|
205
|
+
| 2026-10-30 | In a row 300, not 200: the ladder has four steps, 300, 600, 1000, 1600 (`inline`). | The 200 between the actions of a row came from the previews, and no rule had chosen it; next to an inset of 600 and fields at 600 it was too tight. Rejected: 200; 400, the cap of the 1.5 rule. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6510635910 |
|
|
206
|
+
| 2026-10-30 | The ids: a domain of `kind: foundation`, the file `rhythm`, its relations the cases and its rules the always-true entries, cited `{ id, from: rhythm }`, in short `rhythm/<id>`. | An id is a contract in the format of the patterns, and every decision names the id it decides. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6516863055 |
|
|
207
|
+
| 2026-10-30 | Between containers with a boundary `gap-400`; the 400 joins the ladder for this relation only, and `step-ratio` holds for the relations with no boundary (`between-containers`, `ladder-only`). | A boundary (a border, a shadow, a surface) separates by itself. Chosen live against 600 (as the inset) and 1000 (as between groups). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6517707506 |
|
|
208
|
+
| 2026-10-30 | The carriers: a role token per relation, `--magma-rhythm-<id>`, bridged to Tailwind as `--spacing-<id>` (`gap-<id>`, `p-<id>`); the components paint with the tokens, and a density redefines them. | An agent writes the relation, never its step, and a density or a theme moves every space from one place. Rejected: utilities with a fixed property (`rhythm-inset`); numeric steps with a guide and a lint rule. https://github.com/magma-design-system/magma/issues/1189#issuecomment-6518548217 |
|
|
209
|
+
| 2026-10-31 | The principle each rule serves (`serves`), written with the format (#1196): intuitive for every relation and rule, since the relation reads from the space without being learned, the same in every product; `ladder-only` flexible too, one ladder a density or a theme moves at once. | Foundation asks every decision to say the principle it serves (the Principles page of the docs site). Proposed with the format, to confirm in its review. |
|
|
210
|
+
| 2026-10-31 | The header of a page and the content under it are two sections: `between-sections`, `gap-1600`; the header is the first section of the page. | The header names the whole page, so at the step of the sections it belongs to none of them (`step-ratio`); no new relation. Rejected: `gap-1000`, which puts the header nearer to the first section than that one to the next. Chosen live on a record with sections and on a list (#1210, `page-header`). |
|
|
211
|
+
| 2026-11-02 | The media of a card reaches the edges of the card it touches and stands 300 from the other regions (`media-bleed`); the sides follow the layout the card picks with its container query, never a class or the order of the slots. | The inset keeps text away from the edge, and an image has no text to protect; the title stays 300 from what it names (`step-ratio`); the cards with an image of today stay edge to edge. Rejected: the media inside the inset with a radius of its own (48 px narrower, two nested radii); the media at the edges with the text 600 from it, as from an edge, which puts the title of a card 600 from the image it names. Chosen live on a set of cards at two widths (#1201). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6571508146 |
|
|
212
|
+
| 2026-11-02 | The row of actions that closes a container stands 600 from its content, a relation of its own (`content-actions`), as the row of a form and the actions of the window of a dialog. | The actions act on the whole container, not on its last line: at 300 the footer of a card stood nearer to the last row of data than the rows to each other (`step-ratio`). Rejected: one gap of 300 between every region of a card. Chosen live on cards with rows of data and with an image (#1201). https://github.com/magma-design-system/magma/issues/1189#issuecomment-6571508481 |
|